arthub-table 0.0.3 → 0.0.4

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.
@@ -1,2 +1,2 @@
1
- (function(){var e={34:function(e,t,i){"use strict";var r=i(4901);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},81:function(e,t,i){"use strict";var r=i(9565),n=i(9306),o=i(8551),a=i(6823),s=i(851),l=TypeError;e.exports=function(e,t){var i=arguments.length<2?s(e):t;if(n(i))return o(r(i,e));throw new l(a(e)+" is not iterable")}},113:function(e,t,i){"use strict";var r=i(6518),n=i(9213).find,o=i(6469),a="find",s=!0;a in[]&&Array(1)[a](function(){s=!1}),r({target:"Array",proto:!0,forced:s},{find:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}}),o(a)},116:function(e,t,i){"use strict";var r=i(6518),n=i(9565),o=i(2652),a=i(9306),s=i(8551),l=i(1767),h=i(9539),d=i(4549),u=d("find",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:u},{find:function(e){s(this);try{a(e)}catch(r){h(this,"throw",r)}if(u)return n(u,this,e);var t=l(this),i=0;return o(t,function(t,r){if(e(t,i++))return r(t)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})},235:function(e,t,i){"use strict";var r=i(9213).forEach,n=i(4598),o=n("forEach");e.exports=o?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},280:function(e,t,i){"use strict";var r=i(6518),n=i(7751),o=i(6395),a=i(550),s=i(916).CONSTRUCTOR,l=i(3438),h=n("Promise"),d=o&&!s;r({target:"Promise",stat:!0,forced:o||s},{resolve:function(e){return l(d&&this===h?a:this,e)}})},283:function(e,t,i){"use strict";var r=i(9504),n=i(9039),o=i(4901),a=i(9297),s=i(3724),l=i(350).CONFIGURABLE,h=i(3706),d=i(1181),u=d.enforce,c=d.get,f=String,v=Object.defineProperty,g=r("".slice),y=r("".replace),p=r([].join),w=s&&!n(function(){return 8!==v(function(){},"length",{value:8}).length}),x=String(String).split("String"),m=e.exports=function(e,t,i){"Symbol("===g(f(t),0,7)&&(t="["+y(f(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!a(e,"name")||l&&e.name!==t)&&(s?v(e,"name",{value:t,configurable:!0}):e.name=t),w&&i&&a(i,"arity")&&e.length!==i.arity&&v(e,"length",{value:i.arity});try{i&&a(i,"constructor")&&i.constructor?s&&v(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(n){}var r=u(e);return a(r,"source")||(r.source=p(x,"string"==typeof t?t:"")),e};Function.prototype.toString=m(function(){return o(this)&&c(this).source||h(this)},"toString")},287:function(e,t,i){"use strict";var r=i(6518),n=i(2967);r({target:"Object",stat:!0},{setPrototypeOf:n})},298:function(e,t,i){"use strict";var r=i(2195),n=i(5397),o=i(8480).f,a=i(7680),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],l=function(e){try{return o(e)}catch(t){return a(s)}};e.exports.f=function(e){return s&&"Window"===r(e)?l(e):o(n(e))}},350:function(e,t,i){"use strict";var r=i(3724),n=i(9297),o=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=n(o,"name"),l=s&&"something"===function(){}.name,h=s&&(!r||r&&a(o,"name").configurable);e.exports={EXISTS:s,PROPER:l,CONFIGURABLE:h}},397:function(e,t,i){"use strict";var r=i(7751);e.exports=r("document","documentElement")},421:function(e){"use strict";e.exports={}},436:function(e,t,i){"use strict";var r,n,o,a,s=i(6518),l=i(6395),h=i(8574),d=i(4576),u=i(9167),c=i(9565),f=i(6840),v=i(2967),g=i(687),y=i(7633),p=i(9306),w=i(4901),x=i(34),m=i(679),b=i(2293),k=i(9225).set,C=i(1955),S=i(3138),I=i(1103),T=i(8265),A=i(1181),R=i(550),D=i(916),E=i(6043),P="Promise",O=D.CONSTRUCTOR,M=D.REJECTION_EVENT,B=D.SUBCLASSING,H=A.getterFor(P),F=A.set,L=R&&R.prototype,W=R,z=L,N=d.TypeError,V=d.document,_=d.process,j=E.f,Y=j,G=!!(V&&V.createEvent&&d.dispatchEvent),X="unhandledrejection",U="rejectionhandled",q=0,K=1,J=2,Q=1,Z=2,$=function(e){var t;return!(!x(e)||!w(t=e.then))&&t},ee=function(e,t){var i,r,n,o=t.value,a=t.state===K,s=a?e.ok:e.fail,l=e.resolve,h=e.reject,d=e.domain;try{s?(a||(t.rejection===Z&&oe(t),t.rejection=Q),!0===s?i=o:(d&&d.enter(),i=s(o),d&&(d.exit(),n=!0)),i===e.promise?h(new N("Promise-chain cycle")):(r=$(i))?c(r,i,l,h):l(i)):h(o)}catch(u){d&&!n&&d.exit(),h(u)}},te=function(e,t){e.notified||(e.notified=!0,C(function(){var i,r=e.reactions;while(i=r.get())ee(i,e);e.notified=!1,t&&!e.rejection&&re(e)}))},ie=function(e,t,i){var r,n;G?(r=V.createEvent("Event"),r.promise=t,r.reason=i,r.initEvent(e,!1,!0),d.dispatchEvent(r)):r={promise:t,reason:i},!M&&(n=d["on"+e])?n(r):e===X&&S("Unhandled promise rejection",i)},re=function(e){c(k,d,function(){var t,i=e.facade,r=e.value,n=ne(e);if(n&&(t=I(function(){h?_.emit("unhandledRejection",r,i):ie(X,i,r)}),e.rejection=h||ne(e)?Z:Q,t.error))throw t.value})},ne=function(e){return e.rejection!==Q&&!e.parent},oe=function(e){c(k,d,function(){var t=e.facade;h?_.emit("rejectionHandled",t):ie(U,t,e.value)})},ae=function(e,t,i){return function(r){e(t,r,i)}},se=function(e,t,i){e.done||(e.done=!0,i&&(e=i),e.value=t,e.state=J,te(e,!0))},le=function(e,t,i){if(!e.done){e.done=!0,i&&(e=i);try{if(e.facade===t)throw new N("Promise can't be resolved itself");var r=$(t);r?C(function(){var i={done:!1};try{c(r,t,ae(le,i,e),ae(se,i,e))}catch(n){se(i,n,e)}}):(e.value=t,e.state=K,te(e,!1))}catch(n){se({done:!1},n,e)}}};if(O&&(W=function(e){m(this,z),p(e),c(r,this);var t=H(this);try{e(ae(le,t),ae(se,t))}catch(i){se(t,i)}},z=W.prototype,r=function(e){F(this,{type:P,done:!1,notified:!1,parent:!1,reactions:new T,rejection:!1,state:q,value:null})},r.prototype=f(z,"then",function(e,t){var i=H(this),r=j(b(this,W));return i.parent=!0,r.ok=!w(e)||e,r.fail=w(t)&&t,r.domain=h?_.domain:void 0,i.state===q?i.reactions.add(r):C(function(){ee(r,i)}),r.promise}),n=function(){var e=new r,t=H(e);this.promise=e,this.resolve=ae(le,t),this.reject=ae(se,t)},E.f=j=function(e){return e===W||e===o?new n(e):Y(e)},!l&&w(R)&&L!==Object.prototype)){a=L.then,B||f(L,"then",function(e,t){var i=this;return new W(function(e,t){c(a,i,e,t)}).then(e,t)},{unsafe:!0});try{delete L.constructor}catch(he){}v&&v(L,z)}s({global:!0,constructor:!0,wrap:!0,forced:O},{Promise:W}),o=u.Promise,g(W,P,!1,!0),y(P)},507:function(e,t,i){"use strict";var r=i(9565);e.exports=function(e,t,i){var n,o,a=i?e:e.iterator,s=e.next;while(!(n=r(s,a)).done)if(o=t(n.value),void 0!==o)return o}},511:function(e,t,i){"use strict";var r=i(788),n=TypeError;e.exports=function(e){if(r(e))throw new n("The method doesn't accept regular expressions");return e}},533:function(e,t,i){"use strict";var r=i(9504),n=i(8014),o=i(655),a=i(2333),s=i(7750),l=r(a),h=r("".slice),d=Math.ceil,u=function(e){return function(t,i,r){var a,u,c=o(s(t)),f=n(i),v=c.length,g=void 0===r?" ":o(r);return f<=v||""===g?c:(a=f-v,u=l(g,d(a/g.length)),u.length>a&&(u=h(u,0,a)),e?c+u:u+c)}};e.exports={start:u(!1),end:u(!0)}},537:function(e,t,i){"use strict";var r=i(550),n=i(4428),o=i(916).CONSTRUCTOR;e.exports=o||!n(function(e){r.all(e).then(void 0,function(){})})},550:function(e,t,i){"use strict";var r=i(4576);e.exports=r.Promise},566:function(e,t,i){"use strict";var r=i(9504),n=i(9306),o=i(34),a=i(9297),s=i(7680),l=i(616),h=Function,d=r([].concat),u=r([].join),c={},f=function(e,t,i){if(!a(c,t)){for(var r=[],n=0;n<t;n++)r[n]="a["+n+"]";c[t]=h("C,a","return new C("+u(r,",")+")")}return c[t](e,i)};e.exports=l?h.bind:function(e){var t=n(this),i=t.prototype,r=s(arguments,1),a=function(){var i=d(r,s(arguments));return this instanceof a?f(t,i.length,i):t.apply(e,i)};return o(i)&&(a.prototype=i),a}},597:function(e,t,i){"use strict";var r=i(9039),n=i(8227),o=i(9519),a=n("species");e.exports=function(e){return o>=51||!r(function(){var t=[],i=t.constructor={};return i[a]=function(){return{foo:1}},1!==t[e](Boolean).foo})}},616:function(e,t,i){"use strict";var r=i(9039);e.exports=!r(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},655:function(e,t,i){"use strict";var r=i(6955),n=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return n(e)}},679:function(e,t,i){"use strict";var r=i(1625),n=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw new n("Incorrect invocation")}},684:function(e){"use strict";e.exports=function(e,t){var i="function"==typeof Iterator&&Iterator.prototype[e];if(i)try{i.call({next:null},t).next()}catch(r){return!0}}},687:function(e,t,i){"use strict";var r=i(4913).f,n=i(9297),o=i(8227),a=o("toStringTag");e.exports=function(e,t,i){e&&!i&&(e=e.prototype),e&&!n(e,a)&&r(e,a,{configurable:!0,value:t})}},706:function(e,t,i){"use strict";var r=i(350).PROPER,n=i(9039),o=i(7452),a="​…᠎";e.exports=function(e){return n(function(){return!!o[e]()||a[e]()!==a||r&&o[e].name!==e})}},741:function(e){"use strict";var t=Math.ceil,i=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?i:t)(r)}},744:function(e,t,i){"use strict";var r=i(9565),n=i(9504),o=i(9228),a=i(8551),s=i(34),l=i(7750),h=i(2293),d=i(7829),u=i(8014),c=i(655),f=i(5966),v=i(6682),g=i(8429),y=i(9039),p=g.UNSUPPORTED_Y,w=4294967295,x=Math.min,m=n([].push),b=n("".slice),k=!y(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var i="ab".split(e);return 2!==i.length||"a"!==i[0]||"b"!==i[1]}),C="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;o("split",function(e,t,i){var n="0".split(void 0,0).length?function(e,i){return void 0===e&&0===i?[]:r(t,this,e,i)}:t;return[function(t,i){var o=l(this),a=s(t)?f(t,e):void 0;return a?r(a,t,o,i):r(n,c(o),t,i)},function(e,r){var o=a(this),s=c(e);if(!C){var l=i(n,o,s,r,n!==t);if(l.done)return l.value}var f=h(o,RegExp),g=o.unicode,y=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(p?"g":"y"),k=new f(p?"^(?:"+o.source+")":o,y),S=void 0===r?w:r>>>0;if(0===S)return[];if(0===s.length)return null===v(k,s)?[s]:[];var I=0,T=0,A=[];while(T<s.length){k.lastIndex=p?0:T;var R,D=v(k,p?b(s,T):s);if(null===D||(R=x(u(k.lastIndex+(p?T:0)),s.length))===I)T=d(s,T,g);else{if(m(A,b(s,I,T)),A.length===S)return A;for(var E=1;E<=D.length-1;E++)if(m(A,D[E]),A.length===S)return A;T=I=R}}return m(A,b(s,I)),A}]},C||!k,p)},747:function(e,t,i){"use strict";var r=i(6699),n=i(6193),o=i(6249),a=Error.captureStackTrace;e.exports=function(e,t,i,s){o&&(a?a(e,t):r(e,"stack",n(i,s)))}},757:function(e,t,i){"use strict";var r=i(7751),n=i(4901),o=i(1625),a=i(7040),s=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return n(t)&&o(t.prototype,s(e))}},788:function(e,t,i){"use strict";var r=i(34),n=i(2195),o=i(8227),a=o("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[a])?!!t:"RegExp"===n(e))}},825:function(e,t,i){"use strict";var r=i(6518),n=i(7751),o=i(8745),a=i(566),s=i(5548),l=i(8551),h=i(34),d=i(2360),u=i(9039),c=n("Reflect","construct"),f=Object.prototype,v=[].push,g=u(function(){function e(){}return!(c(function(){},[],e)instanceof e)}),y=!u(function(){c(function(){})}),p=g||y;r({target:"Reflect",stat:!0,forced:p,sham:p},{construct:function(e,t){s(e),l(t);var i=arguments.length<3?e:s(arguments[2]);if(y&&!g)return c(e,t,i);if(e===i){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return o(v,r,t),new(o(a,e,r))}var n=i.prototype,u=d(h(n)?n:f),p=o(e,u,t);return h(p)?p:u}})},851:function(e,t,i){"use strict";var r=i(6955),n=i(5966),o=i(4117),a=i(6269),s=i(8227),l=s("iterator");e.exports=function(e){if(!o(e))return n(e,l)||n(e,"@@iterator")||a[r(e)]}},875:function(e,t,i){"use strict";var r=i(6518),n=i(9039),o=i(8981),a=i(2787),s=i(2211),l=n(function(){a(1)});r({target:"Object",stat:!0,forced:l,sham:!s},{getPrototypeOf:function(e){return a(o(e))}})},906:function(e,t,i){"use strict";i(7495);var r=i(6518),n=i(9565),o=i(4901),a=i(8551),s=i(655),l=function(){var e=!1,t=/[ac]/;return t.exec=function(){return e=!0,/./.exec.apply(this,arguments)},!0===t.test("abc")&&e}(),h=/./.test;r({target:"RegExp",proto:!0,forced:!l},{test:function(e){var t=a(this),i=s(e),r=t.exec;if(!o(r))return n(h,t,i);var l=n(r,t,i);return null!==l&&(a(l),!0)}})},916:function(e,t,i){"use strict";var r=i(4576),n=i(550),o=i(4901),a=i(2796),s=i(3706),l=i(8227),h=i(4215),d=i(6395),u=i(9519),c=n&&n.prototype,f=l("species"),v=!1,g=o(r.PromiseRejectionEvent),y=a("Promise",function(){var e=s(n),t=e!==String(n);if(!t&&66===u)return!0;if(d&&(!c["catch"]||!c["finally"]))return!0;if(!u||u<51||!/native code/.test(e)){var i=new n(function(e){e(1)}),r=function(e){e(function(){},function(){})},o=i.constructor={};if(o[f]=r,v=i.then(function(){})instanceof r,!v)return!0}return!t&&("BROWSER"===h||"DENO"===h)&&!g});e.exports={CONSTRUCTOR:y,REJECTION_EVENT:g,SUBCLASSING:v}},1034:function(e,t,i){"use strict";var r=i(9565),n=i(9297),o=i(1625),a=i(5213),s=i(7979),l=RegExp.prototype;e.exports=a.correct?function(e){return e.flags}:function(e){return a.correct||!o(l,e)||n(e,"flags")?e.flags:r(s,e)}},1056:function(e,t,i){"use strict";var r=i(4913).f;e.exports=function(e,t,i){i in e||r(e,i,{configurable:!0,get:function(){return t[i]},set:function(e){t[i]=e}})}},1072:function(e,t,i){"use strict";var r=i(1828),n=i(8727);e.exports=Object.keys||function(e){return r(e,n)}},1088:function(e,t,i){"use strict";var r=i(6518),n=i(9565),o=i(6395),a=i(350),s=i(4901),l=i(3994),h=i(2787),d=i(2967),u=i(687),c=i(6699),f=i(6840),v=i(8227),g=i(6269),y=i(7657),p=a.PROPER,w=a.CONFIGURABLE,x=y.IteratorPrototype,m=y.BUGGY_SAFARI_ITERATORS,b=v("iterator"),k="keys",C="values",S="entries",I=function(){return this};e.exports=function(e,t,i,a,v,y,T){l(i,t,a);var A,R,D,E=function(e){if(e===v&&H)return H;if(!m&&e&&e in M)return M[e];switch(e){case k:return function(){return new i(this,e)};case C:return function(){return new i(this,e)};case S:return function(){return new i(this,e)}}return function(){return new i(this)}},P=t+" Iterator",O=!1,M=e.prototype,B=M[b]||M["@@iterator"]||v&&M[v],H=!m&&B||E(v),F="Array"===t&&M.entries||B;if(F&&(A=h(F.call(new e)),A!==Object.prototype&&A.next&&(o||h(A)===x||(d?d(A,x):s(A[b])||f(A,b,I)),u(A,P,!0,!0),o&&(g[P]=I))),p&&v===C&&B&&B.name!==C&&(!o&&w?c(M,"name",C):(O=!0,H=function(){return n(B,this)})),v)if(R={values:E(C),keys:y?H:E(k),entries:E(S)},T)for(D in R)(m||O||!(D in M))&&f(M,D,R[D]);else r({target:t,proto:!0,forced:m||O},R);return o&&!T||M[b]===H||f(M,b,H,{name:v}),g[t]=H,R}},1103:function(e){"use strict";e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},1148:function(e,t,i){"use strict";var r=i(6518),n=i(9565),o=i(2652),a=i(9306),s=i(8551),l=i(1767),h=i(9539),d=i(4549),u=d("every",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:u},{every:function(e){s(this);try{a(e)}catch(r){h(this,"throw",r)}if(u)return n(u,this,e);var t=l(this),i=0;return!o(t,function(t,r){if(!e(t,i++))return r()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},1181:function(e,t,i){"use strict";var r,n,o,a=i(8622),s=i(4576),l=i(34),h=i(6699),d=i(9297),u=i(7629),c=i(6119),f=i(421),v="Object already initialized",g=s.TypeError,y=s.WeakMap,p=function(e){return o(e)?n(e):r(e,{})},w=function(e){return function(t){var i;if(!l(t)||(i=n(t)).type!==e)throw new g("Incompatible receiver, "+e+" required");return i}};if(a||u.state){var x=u.state||(u.state=new y);x.get=x.get,x.has=x.has,x.set=x.set,r=function(e,t){if(x.has(e))throw new g(v);return t.facade=e,x.set(e,t),t},n=function(e){return x.get(e)||{}},o=function(e){return x.has(e)}}else{var m=c("state");f[m]=!0,r=function(e,t){if(d(e,m))throw new g(v);return t.facade=e,h(e,m,t),t},n=function(e){return d(e,m)?e[m]:{}},o=function(e){return d(e,m)}}e.exports={set:r,get:n,has:o,enforce:p,getterFor:w}},1240:function(e,t,i){"use strict";var r=i(9504);e.exports=r(1.1.valueOf)},1278:function(e,t,i){"use strict";var r=i(6518),n=i(3724),o=i(5031),a=i(5397),s=i(7347),l=i(4659);r({target:"Object",stat:!0,sham:!n},{getOwnPropertyDescriptors:function(e){var t,i,r=a(e),n=s.f,h=o(r),d={},u=0;while(h.length>u)i=n(r,t=h[u++]),void 0!==i&&l(d,t,i);return d}})},1291:function(e,t,i){"use strict";var r=i(741);e.exports=function(e){var t=+e;return t!==t||0===t?0:r(t)}},1296:function(e,t,i){"use strict";var r=i(4495);e.exports=r&&!!Symbol["for"]&&!!Symbol.keyFor},1385:function(e,t,i){"use strict";var r=i(9539);e.exports=function(e,t,i){for(var n=e.length-1;n>=0;n--)if(void 0!==e[n])try{i=r(e[n].iterator,t,i)}catch(o){t="throw",i=o}if("throw"===t)throw i;return i}},1415:function(e,t,i){"use strict";i(2405)},1436:function(e,t,i){"use strict";var r=i(8227),n=r("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(i){try{return t[n]=!1,"/./"[e](t)}catch(r){}}return!1}},1469:function(e,t,i){"use strict";var r=i(7433);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},1481:function(e,t,i){"use strict";var r=i(6518),n=i(6043),o=i(916).CONSTRUCTOR;r({target:"Promise",stat:!0,forced:o},{reject:function(e){var t=n.f(this),i=t.reject;return i(e),t.promise}})},1510:function(e,t,i){"use strict";var r=i(6518),n=i(7751),o=i(9297),a=i(655),s=i(5745),l=i(1296),h=s("string-to-symbol-registry"),d=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!l},{for:function(e){var t=a(e);if(o(h,t))return h[t];var i=n("Symbol")(t);return h[t]=i,d[i]=t,i}})},1625:function(e,t,i){"use strict";var r=i(9504);e.exports=r({}.isPrototypeOf)},1698:function(e,t,i){"use strict";var r=i(6518),n=i(4204),o=i(9835),a=i(4916),s=!a("union")||!o("union");r({target:"Set",proto:!0,real:!0,forced:s},{union:n})},1699:function(e,t,i){"use strict";var r=i(6518),n=i(9504),o=i(511),a=i(7750),s=i(655),l=i(1436),h=n("".indexOf);r({target:"String",proto:!0,forced:!l("includes")},{includes:function(e){return!!~h(s(a(this)),s(o(e)),arguments.length>1?arguments[1]:void 0)}})},1701:function(e,t,i){"use strict";var r=i(6518),n=i(9565),o=i(9306),a=i(8551),s=i(1767),l=i(9462),h=i(6319),d=i(9539),u=i(684),c=i(4549),f=i(6395),v=!f&&!u("map",function(){}),g=!f&&!v&&c("map",TypeError),y=f||v||g,p=l(function(){var e=this.iterator,t=a(n(this.next,e)),i=this.done=!!t.done;if(!i)return h(e,this.mapper,[t.value,this.counter++],!0)});r({target:"Iterator",proto:!0,real:!0,forced:y},{map:function(e){a(this);try{o(e)}catch(t){d(this,"throw",t)}return g?n(g,this,e):new p(s(this),{mapper:e})}})},1761:function(e,t,i){"use strict";var r=i(9565),n=i(9504),o=i(9228),a=i(8551),s=i(34),l=i(8014),h=i(655),d=i(7750),u=i(5966),c=i(7829),f=i(1034),v=i(6682),g=n("".indexOf);o("match",function(e,t,i){return[function(t){var i=d(this),n=s(t)?u(t,e):void 0;return n?r(n,t,i):new RegExp(t)[e](h(i))},function(e){var r=a(this),n=h(e),o=i(t,r,n);if(o.done)return o.value;var s=h(f(r));if(-1===g(s,"g"))return v(r,n);var d=-1!==g(s,"u");r.lastIndex=0;var u,y=[],p=0;while(null!==(u=v(r,n))){var w=h(u[0]);y[p]=w,""===w&&(r.lastIndex=c(n,l(r.lastIndex),d)),p++}return 0===p?null:y}]})},1767:function(e){"use strict";e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},1828:function(e,t,i){"use strict";var r=i(9504),n=i(9297),o=i(5397),a=i(9617).indexOf,s=i(421),l=r([].push);e.exports=function(e,t){var i,r=o(e),h=0,d=[];for(i in r)!n(s,i)&&n(r,i)&&l(d,i);while(t.length>h)n(r,i=t[h++])&&(~a(d,i)||l(d,i));return d}},1951:function(e,t,i){"use strict";var r=i(8227);t.f=r},1955:function(e,t,i){"use strict";var r,n,o,a,s,l=i(4576),h=i(3389),d=i(6080),u=i(9225).set,c=i(8265),f=i(9544),v=i(4265),g=i(7860),y=i(8574),p=l.MutationObserver||l.WebKitMutationObserver,w=l.document,x=l.process,m=l.Promise,b=h("queueMicrotask");if(!b){var k=new c,C=function(){var e,t;y&&(e=x.domain)&&e.exit();while(t=k.get())try{t()}catch(i){throw k.head&&r(),i}e&&e.enter()};f||y||g||!p||!w?!v&&m&&m.resolve?(a=m.resolve(void 0),a.constructor=m,s=d(a.then,a),r=function(){s(C)}):y?r=function(){x.nextTick(C)}:(u=d(u,l),r=function(){u(C)}):(n=!0,o=w.createTextNode(""),new p(C).observe(o,{characterData:!0}),r=function(){o.data=n=!n}),b=function(e){k.head||r(),k.add(e)}}e.exports=b},2003:function(e,t,i){"use strict";var r=i(6518),n=i(6395),o=i(916).CONSTRUCTOR,a=i(550),s=i(7751),l=i(4901),h=i(6840),d=a&&a.prototype;if(r({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(e){return this.then(void 0,e)}}),!n&&l(a)){var u=s("Promise").prototype["catch"];d["catch"]!==u&&h(d,"catch",u,{unsafe:!0})}},2008:function(e,t,i){"use strict";var r=i(6518),n=i(9213).filter,o=i(597),a=o("filter");r({target:"Array",proto:!0,forced:!a},{filter:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}})},2010:function(e,t,i){"use strict";var r=i(3724),n=i(350).EXISTS,o=i(9504),a=i(2106),s=Function.prototype,l=o(s.toString),h=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,d=o(h.exec),u="name";r&&!n&&a(s,u,{configurable:!0,get:function(){try{return d(h,l(this))[1]}catch(e){return""}}})},2062:function(e,t,i){"use strict";var r=i(6518),n=i(9213).map,o=i(597),a=o("map");r({target:"Array",proto:!0,forced:!a},{map:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}})},2106:function(e,t,i){"use strict";var r=i(283),n=i(4913);e.exports=function(e,t,i){return i.get&&r(i.get,t,{getter:!0}),i.set&&r(i.set,t,{setter:!0}),n.f(e,t,i)}},2140:function(e,t,i){"use strict";var r=i(8227),n=r("toStringTag"),o={};o[n]="z",e.exports="[object z]"===String(o)},2195:function(e,t,i){"use strict";var r=i(9504),n=r({}.toString),o=r("".slice);e.exports=function(e){return o(n(e),8,-1)}},2211:function(e,t,i){"use strict";var r=i(9039);e.exports=!r(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},2259:function(e,t,i){"use strict";var r=i(5749);r("iterator")},2293:function(e,t,i){"use strict";var r=i(8551),n=i(5548),o=i(4117),a=i(8227),s=a("species");e.exports=function(e,t){var i,a=r(e).constructor;return void 0===a||o(i=r(a)[s])?t:n(i)}},2333:function(e,t,i){"use strict";var r=i(1291),n=i(655),o=i(7750),a=RangeError;e.exports=function(e){var t=n(o(this)),i="",s=r(e);if(s<0||s===1/0)throw new a("Wrong number of repetitions");for(;s>0;(s>>>=1)&&(t+=t))1&s&&(i+=t);return i}},2357:function(e,t,i){"use strict";var r=i(3724),n=i(9039),o=i(9504),a=i(2787),s=i(1072),l=i(5397),h=i(8773).f,d=o(h),u=o([].push),c=r&&n(function(){var e=Object.create(null);return e[2]=2,!d(e,2)}),f=function(e){return function(t){var i,n=l(t),o=s(n),h=c&&null===a(n),f=o.length,v=0,g=[];while(f>v)i=o[v++],r&&!(h?i in n:d(n,i))||u(g,e?[i,n[i]]:n[i]);return g}};e.exports={entries:f(!0),values:f(!1)}},2360:function(e,t,i){"use strict";var r,n=i(8551),o=i(6801),a=i(8727),s=i(421),l=i(397),h=i(4055),d=i(6119),u=">",c="<",f="prototype",v="script",g=d("IE_PROTO"),y=function(){},p=function(e){return c+v+u+e+c+"/"+v+u},w=function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t},x=function(){var e,t=h("iframe"),i="java"+v+":";return t.style.display="none",l.appendChild(t),t.src=String(i),e=t.contentWindow.document,e.open(),e.write(p("document.F=Object")),e.close(),e.F},m=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}m="undefined"!=typeof document?document.domain&&r?w(r):x():w(r);var e=a.length;while(e--)delete m[f][a[e]];return m()};s[g]=!0,e.exports=Object.create||function(e,t){var i;return null!==e?(y[f]=n(e),i=new y,y[f]=null,i[g]=e):i=m(),void 0===t?i:o.f(i,t)}},2393:function(e,t,i){"use strict";t.Ud=t.O5=void 0;var r=l(i(8841)),n=i(5208),o=i(2515),a=i(3253),s=i(5270);function l(e){return e&&e.__esModule?e:{default:e}}var h=function(e){var t=new Uint8Array(e);return(0,n.parse)((0,o.buildStream)(t),r["default"])};t.O5=h;var d=function(e){for(var t=e.pixels.length,i=new Uint8ClampedArray(4*t),r=0;r<t;r++){var n=4*r,o=e.pixels[r],a=e.colorTable[o]||[0,0,0];i[n]=a[0],i[n+1]=a[1],i[n+2]=a[2],i[n+3]=o!==e.transparentIndex?255:0}return i},u=function(e,t,i){if(e.image){var r=e.image,n=r.descriptor.width*r.descriptor.height,o=(0,s.lzw)(r.data.minCodeSize,r.data.blocks,n);r.descriptor.lct.interlaced&&(o=(0,a.deinterlace)(o,r.descriptor.width));var l={pixels:o,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return r.descriptor.lct&&r.descriptor.lct.exists?l.colorTable=r.lct:l.colorTable=t,e.gce&&(l.delay=10*(e.gce.delay||10),l.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(l.transparentIndex=e.gce.transparentColorIndex)),i&&(l.patch=d(l)),l}};var c=function(e,t){return e.frames.filter(function(e){return e.image}).map(function(i){return u(i,e.gct,t)})};t.Ud=c},2405:function(e,t,i){"use strict";var r=i(6468),n=i(6938);r("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},n)},2475:function(e,t,i){"use strict";var r=i(6518),n=i(8527),o=i(4916),a=!o("isSupersetOf",function(e){return!e});r({target:"Set",proto:!0,real:!0,forced:a},{isSupersetOf:n})},2478:function(e,t,i){"use strict";var r=i(9504),n=i(8981),o=Math.floor,a=r("".charAt),s=r("".replace),l=r("".slice),h=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,d=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,i,r,u,c){var f=i+e.length,v=r.length,g=d;return void 0!==u&&(u=n(u),g=h),s(c,g,function(n,s){var h;switch(a(s,0)){case"$":return"$";case"&":return e;case"`":return l(t,0,i);case"'":return l(t,f);case"<":h=u[l(s,1,-1)];break;default:var d=+s;if(0===d)return n;if(d>v){var c=o(d/10);return 0===c?n:c<=v?void 0===r[c-1]?a(s,1):r[c-1]+a(s,1):n}h=r[d-1]}return void 0===h?"":h})}},2489:function(e,t,i){"use strict";var r=i(6518),n=i(9565),o=i(9306),a=i(8551),s=i(1767),l=i(9462),h=i(6319),d=i(6395),u=i(9539),c=i(684),f=i(4549),v=!d&&!c("filter",function(){}),g=!d&&!v&&f("filter",TypeError),y=d||v||g,p=l(function(){var e,t,i,r=this.iterator,o=this.predicate,s=this.next;while(1){if(e=a(n(s,r)),t=this.done=!!e.done,t)return;if(i=e.value,h(r,o,[i,this.counter++],!0))return i}});r({target:"Iterator",proto:!0,real:!0,forced:y},{filter:function(e){a(this);try{o(e)}catch(t){u(this,"throw",t)}return g?n(g,this,e):new p(s(this),{predicate:e})}})},2515:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readBits=t.readArray=t.readUnsigned=t.readString=t.peekBytes=t.readBytes=t.peekByte=t.readByte=t.buildStream=void 0;var i=function(e){return{data:e,pos:0}};t.buildStream=i;var r=function(){return function(e){return e.data[e.pos++]}};t.readByte=r;var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(t){return t.data[t.pos+e]}};t.peekByte=n;var o=function(e){return function(t){return t.data.subarray(t.pos,t.pos+=e)}};t.readBytes=o;var a=function(e){return function(t){return t.data.subarray(t.pos,t.pos+e)}};t.peekBytes=a;var s=function(e){return function(t){return Array.from(o(e)(t)).map(function(e){return String.fromCharCode(e)}).join("")}};t.readString=s;var l=function(e){return function(t){var i=o(2)(t);return e?(i[1]<<8)+i[0]:(i[0]<<8)+i[1]}};t.readUnsigned=l;var h=function(e,t){return function(i,r,n){for(var a="function"===typeof t?t(i,r,n):t,s=o(e),l=new Array(a),h=0;h<a;h++)l[h]=s(i);return l}};t.readArray=h;var d=function(e,t,i){for(var r=0,n=0;n<i;n++)r+=e[t+n]&&Math.pow(2,i-n-1);return r},u=function(e){return function(t){for(var i=r()(t),n=new Array(8),o=0;o<8;o++)n[7-o]=!!(i&1<<o);return Object.keys(e).reduce(function(t,i){var r=e[i];return r.length?t[i]=d(n,r.index,r.length):t[i]=n[r.index],t},{})}};t.readBits=u},2529:function(e){"use strict";e.exports=function(e,t){return{value:e,done:t}}},2603:function(e,t,i){"use strict";var r=i(655);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:r(e)}},2652:function(e,t,i){"use strict";var r=i(6080),n=i(9565),o=i(8551),a=i(6823),s=i(4209),l=i(6198),h=i(1625),d=i(81),u=i(851),c=i(9539),f=TypeError,v=function(e,t){this.stopped=e,this.result=t},g=v.prototype;e.exports=function(e,t,i){var y,p,w,x,m,b,k,C=i&&i.that,S=!(!i||!i.AS_ENTRIES),I=!(!i||!i.IS_RECORD),T=!(!i||!i.IS_ITERATOR),A=!(!i||!i.INTERRUPTED),R=r(t,C),D=function(e){return y&&c(y,"normal"),new v(!0,e)},E=function(e){return S?(o(e),A?R(e[0],e[1],D):R(e[0],e[1])):A?R(e,D):R(e)};if(I)y=e.iterator;else if(T)y=e;else{if(p=u(e),!p)throw new f(a(e)+" is not iterable");if(s(p)){for(w=0,x=l(e);x>w;w++)if(m=E(e[w]),m&&h(g,m))return m;return new v(!1)}y=d(e,p)}b=I?e.next:y.next;while(!(k=n(b,y)).done){try{m=E(k.value)}catch(P){c(y,"throw",P)}if("object"==typeof m&&m&&h(g,m))return m}return new v(!1)}},2675:function(e,t,i){"use strict";i(6761),i(1510),i(7812),i(3110),i(9773)},2744:function(e,t,i){"use strict";var r=i(9039);e.exports=!r(function(){return Object.isExtensible(Object.preventExtensions({}))})},2762:function(e,t,i){"use strict";var r=i(6518),n=i(3802).trim,o=i(706);r({target:"String",proto:!0,forced:o("trim")},{trim:function(){return n(this)}})},2777:function(e,t,i){"use strict";var r=i(9565),n=i(34),o=i(757),a=i(5966),s=i(4270),l=i(8227),h=TypeError,d=l("toPrimitive");e.exports=function(e,t){if(!n(e)||o(e))return e;var i,l=a(e,d);if(l){if(void 0===t&&(t="default"),i=r(l,e,t),!n(i)||o(i))return i;throw new h("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},2787:function(e,t,i){"use strict";var r=i(9297),n=i(4901),o=i(8981),a=i(6119),s=i(2211),l=a("IE_PROTO"),h=Object,d=h.prototype;e.exports=s?h.getPrototypeOf:function(e){var t=o(e);if(r(t,l))return t[l];var i=t.constructor;return n(i)&&t instanceof i?i.prototype:t instanceof h?d:null}},2796:function(e,t,i){"use strict";var r=i(9039),n=i(4901),o=/#|\.prototype\./,a=function(e,t){var i=l[s(e)];return i===d||i!==h&&(n(t)?r(t):!!t)},s=a.normalize=function(e){return String(e).replace(o,".").toLowerCase()},l=a.data={},h=a.NATIVE="N",d=a.POLYFILL="P";e.exports=a},2812:function(e){"use strict";var t=TypeError;e.exports=function(e,i){if(e<i)throw new t("Not enough arguments");return e}},2839:function(e,t,i){"use strict";var r=i(4576),n=r.navigator,o=n&&n.userAgent;e.exports=o?String(o):""},2892:function(e,t,i){"use strict";var r=i(6518),n=i(6395),o=i(3724),a=i(4576),s=i(9167),l=i(9504),h=i(2796),d=i(9297),u=i(3167),c=i(1625),f=i(757),v=i(2777),g=i(9039),y=i(8480).f,p=i(7347).f,w=i(4913).f,x=i(1240),m=i(3802).trim,b="Number",k=a[b],C=s[b],S=k.prototype,I=a.TypeError,T=l("".slice),A=l("".charCodeAt),R=function(e){var t=v(e,"number");return"bigint"==typeof t?t:D(t)},D=function(e){var t,i,r,n,o,a,s,l,h=v(e,"number");if(f(h))throw new I("Cannot convert a Symbol value to a number");if("string"==typeof h&&h.length>2)if(h=m(h),t=A(h,0),43===t||45===t){if(i=A(h,2),88===i||120===i)return NaN}else if(48===t){switch(A(h,1)){case 66:case 98:r=2,n=49;break;case 79:case 111:r=8,n=55;break;default:return+h}for(o=T(h,2),a=o.length,s=0;s<a;s++)if(l=A(o,s),l<48||l>n)return NaN;return parseInt(o,r)}return+h},E=h(b,!k(" 0o1")||!k("0b1")||k("+0x1")),P=function(e){return c(S,e)&&g(function(){x(e)})},O=function(e){var t=arguments.length<1?0:k(R(e));return P(this)?u(Object(t),this,O):t};O.prototype=S,E&&!n&&(S.constructor=O),r({global:!0,constructor:!0,wrap:!0,forced:E},{Number:O});var M=function(e,t){for(var i,r=o?y(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),n=0;r.length>n;n++)d(t,i=r[n])&&!d(e,i)&&w(e,i,p(t,i))};n&&C&&M(s[b],C),(E||n)&&M(s[b],k)},2953:function(e,t,i){"use strict";var r=i(4576),n=i(7400),o=i(9296),a=i(3792),s=i(6699),l=i(687),h=i(8227),d=h("iterator"),u=a.values,c=function(e,t){if(e){if(e[d]!==u)try{s(e,d,u)}catch(r){e[d]=u}if(l(e,t,!0),n[t])for(var i in a)if(e[i]!==a[i])try{s(e,i,a[i])}catch(r){e[i]=a[i]}}};for(var f in n)c(r[f]&&r[f].prototype,f);c(o,"DOMTokenList")},2967:function(e,t,i){"use strict";var r=i(6706),n=i(34),o=i(7750),a=i(3506);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{e=r(Object.prototype,"__proto__","set"),e(i,[]),t=i instanceof Array}catch(s){}return function(i,r){return o(i),a(r),n(i)?(t?e(i,r):i.__proto__=r,i):i}}():void 0)},3061:function(e,t,i){"use strict";var r=i(9039);e.exports=function(e){return r(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})}},3063:function(e,t,i){"use strict";var r=i(2839);e.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(r)},3110:function(e,t,i){"use strict";var r=i(6518),n=i(7751),o=i(8745),a=i(9565),s=i(9504),l=i(9039),h=i(4376),d=i(4901),u=i(5810),c=i(757),f=i(2195),v=i(655),g=i(7680),y=i(8235),p=i(3392),w=i(4495),x=i(7819),m=String,b=n("JSON","stringify"),k=s(/./.exec),C=s("".charAt),S=s("".charCodeAt),I=s("".replace),T=s("".slice),A=s([].push),R=s(1.1.toString),D=/[\uD800-\uDFFF]/g,E=/^[\uD800-\uDBFF]$/,P=/^[\uDC00-\uDFFF]$/,O=p(),M=O.length,B=!w||l(function(){var e=n("Symbol")("stringify detection");return"[null]"!==b([e])||"{}"!==b({a:e})||"{}"!==b(Object(e))}),H=l(function(){return'"\\udf06\\ud834"'!==b("\udf06\ud834")||'"\\udead"'!==b("\udead")}),F=B?function(e,t){var i=g(arguments),r=W(t);if(d(r)||void 0!==e&&!c(e))return i[1]=function(e,t){if(d(r)&&(t=a(r,this,m(e),t)),!c(t))return t},o(b,null,i)}:b,L=function(e,t,i){var r=C(i,t-1),n=C(i,t+1);return k(E,e)&&!k(P,n)||k(P,e)&&!k(E,r)?"\\u"+R(S(e,0),16):e},W=function(e){if(d(e))return e;if(h(e)){for(var t=e.length,i=[],r=0;r<t;r++){var n=e[r];"string"==typeof n?A(i,n):"number"!=typeof n&&"Number"!==f(n)&&"String"!==f(n)||A(i,v(n))}var o=i.length,a=!0;return function(e,t){if(a)return a=!1,t;if(h(this))return t;for(var r=0;r<o;r++)if(i[r]===e)return t}}};b&&r({target:"JSON",stat:!0,arity:3,forced:B||H||!x},{stringify:function(e,t,i){var r=W(t),n=[],o=F(e,function(e,t){var i=d(r)?a(r,this,m(e),t):t;return!x&&u(i)?O+(A(n,i.rawJSON)-1):i},i);if("string"!=typeof o)return o;if(H&&(o=I(o,D,L)),x)return o;for(var s="",l=o.length,h=0;h<l;h++){var c=C(o,h);if('"'===c){var f=y(o,++h).end-1,v=T(o,h,f);s+=T(v,0,M)===O?n[T(v,M)]:'"'+v+'"',h=f}else s+=c}return s}})},3138:function(e){"use strict";e.exports=function(e,t){}},3167:function(e,t,i){"use strict";var r=i(4901),n=i(34),o=i(2967);e.exports=function(e,t,i){var a,s;return o&&r(a=t.constructor)&&a!==i&&n(s=a.prototype)&&s!==i.prototype&&o(e,s),e}},3179:function(e,t,i){"use strict";var r=i(2140),n=i(6955);e.exports=r?{}.toString:function(){return"[object "+n(this)+"]"}},3253:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deinterlace=void 0;var i=function(e,t){for(var i=new Array(e.length),r=e.length/t,n=function(r,n){var o=e.slice(n*t,(n+1)*t);i.splice.apply(i,[r*t,t].concat(o))},o=[0,4,2,1],a=[8,8,4,2],s=0,l=0;l<4;l++)for(var h=o[l];h<r;h+=a[l])n(h,s),s++;return i};t.deinterlace=i},3362:function(e,t,i){"use strict";i(436),i(6499),i(2003),i(7743),i(1481),i(280)},3389:function(e,t,i){"use strict";var r=i(4576),n=i(3724),o=Object.getOwnPropertyDescriptor;e.exports=function(e){if(!n)return r[e];var t=o(r,e);return t&&t.value}},3392:function(e,t,i){"use strict";var r=i(9504),n=0,o=Math.random(),a=r(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++n+o,36)}},3418:function(e,t,i){"use strict";var r=i(6518),n=i(7916),o=i(4428),a=!o(function(e){Array.from(e)});r({target:"Array",stat:!0,forced:a},{from:n})},3438:function(e,t,i){"use strict";var r=i(8551),n=i(34),o=i(6043);e.exports=function(e,t){if(r(e),n(t)&&t.constructor===e)return t;var i=o.f(e),a=i.resolve;return a(t),i.promise}},3440:function(e,t,i){"use strict";var r=i(7080),n=i(4402),o=i(9286),a=i(5170),s=i(3789),l=i(8469),h=i(507),d=n.has,u=n.remove;e.exports=function(e){var t=r(this),i=s(e),n=o(t);return a(t)<=i.size?l(t,function(e){i.includes(e)&&u(n,e)}):h(i.getIterator(),function(e){d(n,e)&&u(n,e)}),n}},3451:function(e,t,i){"use strict";var r=i(6518),n=i(9504),o=i(421),a=i(34),s=i(9297),l=i(4913).f,h=i(8480),d=i(298),u=i(4124),c=i(3392),f=i(2744),v=!1,g=c("meta"),y=0,p=function(e){l(e,g,{value:{objectID:"O"+y++,weakData:{}}})},w=function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,g)){if(!u(e))return"F";if(!t)return"E";p(e)}return e[g].objectID},x=function(e,t){if(!s(e,g)){if(!u(e))return!0;if(!t)return!1;p(e)}return e[g].weakData},m=function(e){return f&&v&&u(e)&&!s(e,g)&&p(e),e},b=function(){k.enable=function(){},v=!0;var e=h.f,t=n([].splice),i={};i[g]=1,e(i).length&&(h.f=function(i){for(var r=e(i),n=0,o=r.length;n<o;n++)if(r[n]===g){t(r,n,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:d.f}))},k=e.exports={enable:b,fastKey:w,getWeakData:x,onFreeze:m};o[g]=!0},3470:function(e){"use strict";e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}},3500:function(e,t,i){"use strict";var r=i(4576),n=i(7400),o=i(9296),a=i(235),s=i(6699),l=function(e){if(e&&e.forEach!==a)try{s(e,"forEach",a)}catch(t){e.forEach=a}};for(var h in n)n[h]&&l(r[h]&&r[h].prototype);l(o)},3506:function(e,t,i){"use strict";var r=i(3925),n=String,o=TypeError;e.exports=function(e){if(r(e))return e;throw new o("Can't set "+n(e)+" as a prototype")}},3517:function(e,t,i){"use strict";var r=i(9504),n=i(9039),o=i(4901),a=i(6955),s=i(7751),l=i(3706),h=function(){},d=s("Reflect","construct"),u=/^\s*(?:class|function)\b/,c=r(u.exec),f=!u.test(h),v=function(e){if(!o(e))return!1;try{return d(h,[],e),!0}catch(t){return!1}},g=function(e){if(!o(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!c(u,l(e))}catch(t){return!0}};g.sham=!0,e.exports=!d||n(function(){var e;return v(v.call)||!v(Object)||!v(function(){e=!0})||e})?g:v},3548:function(e,t,i){"use strict";var r=i(3724),n=i(2106),o=i(34),a=i(3925),s=i(8981),l=i(7750),h=Object.getPrototypeOf,d=Object.setPrototypeOf,u=Object.prototype,c="__proto__";if(r&&h&&d&&!(c in u))try{n(u,c,{configurable:!0,get:function(){return h(s(this))},set:function(e){var t=l(this);a(e)&&o(t)&&d(t,e)}})}catch(f){}},3579:function(e,t,i){"use strict";var r=i(6518),n=i(9565),o=i(2652),a=i(9306),s=i(8551),l=i(1767),h=i(9539),d=i(4549),u=d("some",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:u},{some:function(e){s(this);try{a(e)}catch(r){h(this,"throw",r)}if(u)return n(u,this,e);var t=l(this),i=0;return o(t,function(t,r){if(e(t,i++))return r()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},3607:function(e,t,i){"use strict";var r=i(2839),n=r.match(/AppleWebKit\/(\d+)\./);e.exports=!!n&&+n[1]},3635:function(e,t,i){"use strict";var r=i(9039),n=i(4576),o=n.RegExp;e.exports=r(function(){var e=o(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})},3640:function(e,t,i){"use strict";var r=i(8551),n=i(4270),o=TypeError;e.exports=function(e){if(r(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw new o("Incorrect hint");return n(this,e)}},3650:function(e,t,i){"use strict";var r=i(7080),n=i(4402),o=i(9286),a=i(3789),s=i(507),l=n.add,h=n.has,d=n.remove;e.exports=function(e){var t=r(this),i=a(e).getIterator(),n=o(t);return s(i,function(e){h(t,e)?d(n,e):l(n,e)}),n}},3706:function(e,t,i){"use strict";var r=i(9504),n=i(4901),o=i(7629),a=r(Function.toString);n(o.inspectSource)||(o.inspectSource=function(e){return a(e)}),e.exports=o.inspectSource},3709:function(e,t,i){"use strict";var r=i(2839),n=r.match(/firefox\/(\d+)/i);e.exports=!!n&&+n[1]},3717:function(e,t){"use strict";t.f=Object.getOwnPropertySymbols},3724:function(e,t,i){"use strict";var r=i(9039);e.exports=!r(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},3763:function(e,t,i){"use strict";var r=i(2839);e.exports=/MSIE|Trident/.test(r)},3771:function(e,t,i){"use strict";var r=i(6518),n=i(4373),o=i(6469);r({target:"Array",proto:!0},{fill:n}),o("fill")},3789:function(e,t,i){"use strict";var r=i(9306),n=i(8551),o=i(9565),a=i(1291),s=i(1767),l="Invalid size",h=RangeError,d=TypeError,u=Math.max,c=function(e,t){this.set=e,this.size=u(t,0),this.has=r(e.has),this.keys=r(e.keys)};c.prototype={getIterator:function(){return s(n(o(this.keys,this.set)))},includes:function(e){return o(this.has,this.set,e)}},e.exports=function(e){n(e);var t=+e.size;if(t!==t)throw new d(l);var i=a(t);if(i<0)throw new h(l);return new c(e,i)}},3792:function(e,t,i){"use strict";var r=i(5397),n=i(6469),o=i(6269),a=i(1181),s=i(4913).f,l=i(1088),h=i(2529),d=i(6395),u=i(3724),c="Array Iterator",f=a.set,v=a.getterFor(c);e.exports=l(Array,"Array",function(e,t){f(this,{type:c,target:r(e),index:0,kind:t})},function(){var e=v(this),t=e.target,i=e.index++;if(!t||i>=t.length)return e.target=null,h(void 0,!0);switch(e.kind){case"keys":return h(i,!1);case"values":return h(t[i],!1)}return h([i,t[i]],!1)},"values");var g=o.Arguments=o.Array;if(n("keys"),n("values"),n("entries"),!d&&u&&"values"!==g.name)try{s(g,"name",{value:"values"})}catch(y){}},3802:function(e,t,i){"use strict";var r=i(9504),n=i(7750),o=i(655),a=i(7452),s=r("".replace),l=RegExp("^["+a+"]+"),h=RegExp("(^|[^"+a+"])["+a+"]+$"),d=function(e){return function(t){var i=o(n(t));return 1&e&&(i=s(i,l,"")),2&e&&(i=s(i,h,"$1")),i}};e.exports={start:d(1),end:d(2),trim:d(3)}},3838:function(e,t,i){"use strict";var r=i(7080),n=i(5170),o=i(8469),a=i(3789);e.exports=function(e){var t=r(this),i=a(e);return!(n(t)>i.size)&&!1!==o(t,function(e){if(!i.includes(e))return!1},!0)}},3851:function(e,t,i){"use strict";var r=i(6518),n=i(9039),o=i(5397),a=i(7347).f,s=i(3724),l=!s||n(function(){a(1)});r({target:"Object",stat:!0,forced:l,sham:!s},{getOwnPropertyDescriptor:function(e,t){return a(o(e),t)}})},3853:function(e,t,i){"use strict";var r=i(6518),n=i(4449),o=i(4916),a=!o("isDisjointFrom",function(e){return!e});r({target:"Set",proto:!0,real:!0,forced:a},{isDisjointFrom:n})},3925:function(e,t,i){"use strict";var r=i(34);e.exports=function(e){return r(e)||null===e}},3994:function(e,t,i){"use strict";var r=i(7657).IteratorPrototype,n=i(2360),o=i(6980),a=i(687),s=i(6269),l=function(){return this};e.exports=function(e,t,i,h){var d=t+" Iterator";return e.prototype=n(r,{next:o(+!h,i)}),a(e,d,!1,!0),s[d]=l,e}},4055:function(e,t,i){"use strict";var r=i(4576),n=i(34),o=r.document,a=n(o)&&n(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},4114:function(e,t,i){"use strict";var r=i(6518),n=i(8981),o=i(6198),a=i(4527),s=i(6837),l=i(9039),h=l(function(){return 4294967297!==[].push.call({length:4294967296},1)}),d=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},u=h||!d();r({target:"Array",proto:!0,arity:1,forced:u},{push:function(e){var t=n(this),i=o(t),r=arguments.length;s(i+r);for(var l=0;l<r;l++)t[i]=arguments[l],i++;return a(t,i),i}})},4117:function(e){"use strict";e.exports=function(e){return null===e||void 0===e}},4124:function(e,t,i){"use strict";var r=i(9039),n=i(34),o=i(2195),a=i(5652),s=Object.isExtensible,l=r(function(){s(1)});e.exports=l||a?function(e){return!!n(e)&&((!a||"ArrayBuffer"!==o(e))&&(!s||s(e)))}:s},4204:function(e,t,i){"use strict";var r=i(7080),n=i(4402).add,o=i(9286),a=i(3789),s=i(507);e.exports=function(e){var t=r(this),i=a(e).getIterator(),l=o(t);return s(i,function(e){n(l,e)}),l}},4209:function(e,t,i){"use strict";var r=i(8227),n=i(6269),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||a[o]===e)}},4213:function(e,t,i){"use strict";var r=i(3724),n=i(9504),o=i(9565),a=i(9039),s=i(1072),l=i(3717),h=i(8773),d=i(8981),u=i(7055),c=Object.assign,f=Object.defineProperty,v=n([].concat);e.exports=!c||a(function(){if(r&&1!==c({b:1},c(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},i=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[i]=7,n.split("").forEach(function(e){t[e]=e}),7!==c({},e)[i]||s(c({},t)).join("")!==n})?function(e,t){var i=d(e),n=arguments.length,a=1,c=l.f,f=h.f;while(n>a){var g,y=u(arguments[a++]),p=c?v(s(y),c(y)):s(y),w=p.length,x=0;while(w>x)g=p[x++],r&&!o(f,y,g)||(i[g]=y[g])}return i}:c},4215:function(e,t,i){"use strict";var r=i(4576),n=i(2839),o=i(2195),a=function(e){return n.slice(0,e.length)===e};e.exports=function(){return a("Bun/")?"BUN":a("Cloudflare-Workers")?"CLOUDFLARE":a("Deno/")?"DENO":a("Node.js/")?"NODE":r.Bun&&"string"==typeof Bun.version?"BUN":r.Deno&&"object"==typeof Deno.version?"DENO":"process"===o(r.process)?"NODE":r.window&&r.document?"BROWSER":"REST"}()},4265:function(e,t,i){"use strict";var r=i(2839);e.exports=/ipad|iphone|ipod/i.test(r)&&"undefined"!=typeof Pebble},4270:function(e,t,i){"use strict";var r=i(9565),n=i(4901),o=i(34),a=TypeError;e.exports=function(e,t){var i,s;if("string"===t&&n(i=e.toString)&&!o(s=r(i,e)))return s;if(n(i=e.valueOf)&&!o(s=r(i,e)))return s;if("string"!==t&&n(i=e.toString)&&!o(s=r(i,e)))return s;throw new a("Can't convert object to primitive value")}},4298:function(e,t,i){"use strict";var r=i(6518),n=i(7240),o=i(3061);r({target:"String",proto:!0,forced:o("fixed")},{fixed:function(){return n(this,"tt","","")}})},4373:function(e,t,i){"use strict";var r=i(8981),n=i(5610),o=i(6198);e.exports=function(e){var t=r(this),i=o(t),a=arguments.length,s=n(a>1?arguments[1]:void 0,i),l=a>2?arguments[2]:void 0,h=void 0===l?i:n(l,i);while(h>s)t[s++]=e;return t}},4376:function(e,t,i){"use strict";var r=i(2195);e.exports=Array.isArray||function(e){return"Array"===r(e)}},4402:function(e,t,i){"use strict";var r=i(9504),n=Set.prototype;e.exports={Set:Set,add:r(n.add),has:r(n.has),remove:r(n["delete"]),proto:n}},4423:function(e,t,i){"use strict";var r=i(6518),n=i(9617).includes,o=i(9039),a=i(6469),s=o(function(){return!Array(1).includes()});r({target:"Array",proto:!0,forced:s},{includes:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},4428:function(e,t,i){"use strict";var r=i(8227),n=r("iterator"),o=!1;try{var a=0,s={next:function(){return{done:!!a++}},return:function(){o=!0}};s[n]=function(){return this},Array.from(s,function(){throw 2})}catch(l){}e.exports=function(e,t){try{if(!t&&!o)return!1}catch(l){return!1}var i=!1;try{var r={};r[n]=function(){return{next:function(){return{done:i=!0}}}},e(r)}catch(l){}return i}},4449:function(e,t,i){"use strict";var r=i(7080),n=i(4402).has,o=i(5170),a=i(3789),s=i(8469),l=i(507),h=i(9539);e.exports=function(e){var t=r(this),i=a(e);if(o(t)<=i.size)return!1!==s(t,function(e){if(i.includes(e))return!1},!0);var d=i.getIterator();return!1!==l(d,function(e){if(n(t,e))return h(d,"normal",!1)})}},4488:function(e,t,i){"use strict";var r=i(7680),n=Math.floor,o=function(e,t){var i=e.length;if(i<8){var a,s,l=1;while(l<i){s=l,a=e[l];while(s&&t(e[s-1],a)>0)e[s]=e[--s];s!==l++&&(e[s]=a)}}else{var h=n(i/2),d=o(r(e,0,h),t),u=o(r(e,h),t),c=d.length,f=u.length,v=0,g=0;while(v<c||g<f)e[v+g]=v<c&&g<f?t(d[v],u[g])<=0?d[v++]:u[g++]:v<c?d[v++]:u[g++]}return e};e.exports=o},4495:function(e,t,i){"use strict";var r=i(9519),n=i(9039),o=i(4576),a=o.String;e.exports=!!Object.getOwnPropertySymbols&&!n(function(){var e=Symbol("symbol detection");return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41})},4527:function(e,t,i){"use strict";var r=i(3724),n=i(4376),o=TypeError,a=Object.getOwnPropertyDescriptor,s=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=s?function(e,t){if(n(e)&&!a(e,"length").writable)throw new o("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},4549:function(e,t,i){"use strict";var r=i(4576);e.exports=function(e,t){var i=r.Iterator,n=i&&i.prototype,o=n&&n[e],a=!1;if(o)try{o.call({next:function(){return{done:!0}},return:function(){a=!0}},-1)}catch(s){s instanceof t||(a=!1)}if(!a)return o}},4554:function(e,t,i){"use strict";var r=i(6518),n=i(8981),o=i(5610),a=i(1291),s=i(6198),l=i(4527),h=i(6837),d=i(1469),u=i(4659),c=i(4606),f=i(597),v=f("splice"),g=Math.max,y=Math.min;r({target:"Array",proto:!0,forced:!v},{splice:function(e,t){var i,r,f,v,p,w,x=n(this),m=s(x),b=o(e,m),k=arguments.length;for(0===k?i=r=0:1===k?(i=0,r=m-b):(i=k-2,r=y(g(a(t),0),m-b)),h(m+i-r),f=d(x,r),v=0;v<r;v++)p=b+v,p in x&&u(f,v,x[p]);if(f.length=r,i<r){for(v=b;v<m-r;v++)p=v+r,w=v+i,p in x?x[w]=x[p]:c(x,w);for(v=m;v>m-r+i;v--)c(x,v-1)}else if(i>r)for(v=m-r;v>b;v--)p=v+r-1,w=v+i-1,p in x?x[w]=x[p]:c(x,w);for(v=0;v<i;v++)x[v+b]=arguments[v+2];return l(x,m-r+i),f}})},4576:function(e,t,i){"use strict";var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof i.g&&i.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4598:function(e,t,i){"use strict";var r=i(9039);e.exports=function(e,t){var i=[][e];return!!i&&r(function(){i.call(null,t||function(){return 1},1)})}},4601:function(e,t,i){"use strict";var r=i(7751),n=i(9297),o=i(6699),a=i(1625),s=i(2967),l=i(7740),h=i(1056),d=i(3167),u=i(2603),c=i(7584),f=i(747),v=i(3724),g=i(6395);e.exports=function(e,t,i,y){var p="stackTraceLimit",w=y?2:1,x=e.split("."),m=x[x.length-1],b=r.apply(null,x);if(b){var k=b.prototype;if(!g&&n(k,"cause")&&delete k.cause,!i)return b;var C=r("Error"),S=t(function(e,t){var i=u(y?t:e,void 0),r=y?new b(e):new b;return void 0!==i&&o(r,"message",i),f(r,S,r.stack,2),this&&a(k,this)&&d(r,this,S),arguments.length>w&&c(r,arguments[w]),r});if(S.prototype=k,"Error"!==m?s?s(S,C):l(S,C,{name:!0}):v&&p in b&&(h(S,b,p),h(S,b,"prepareStackTrace")),l(S,b),!g)try{k.name!==m&&o(k,"name",m),k.constructor=S}catch(I){}return S}}},4606:function(e,t,i){"use strict";var r=i(6823),n=TypeError;e.exports=function(e,t){if(!delete e[t])throw new n("Cannot delete property "+r(t)+" of "+r(e))}},4659:function(e,t,i){"use strict";var r=i(3724),n=i(4913),o=i(6980);e.exports=function(e,t,i){r?n.f(e,t,o(0,i)):e[t]=i}},4782:function(e,t,i){"use strict";var r=i(6518),n=i(4376),o=i(3517),a=i(34),s=i(5610),l=i(6198),h=i(5397),d=i(4659),u=i(8227),c=i(597),f=i(7680),v=c("slice"),g=u("species"),y=Array,p=Math.max;r({target:"Array",proto:!0,forced:!v},{slice:function(e,t){var i,r,u,c=h(this),v=l(c),w=s(e,v),x=s(void 0===t?v:t,v);if(n(c)&&(i=c.constructor,o(i)&&(i===y||n(i.prototype))?i=void 0:a(i)&&(i=i[g],null===i&&(i=void 0)),i===y||void 0===i))return f(c,w,x);for(r=new(void 0===i?y:i)(p(x-w,0)),u=0;w<x;w++,u++)w in c&&d(r,u,c[w]);return r.length=u,r}})},4864:function(e,t,i){"use strict";var r=i(3724),n=i(4576),o=i(9504),a=i(2796),s=i(3167),l=i(6699),h=i(2360),d=i(8480).f,u=i(1625),c=i(788),f=i(655),v=i(1034),g=i(8429),y=i(1056),p=i(6840),w=i(9039),x=i(9297),m=i(1181).enforce,b=i(7633),k=i(8227),C=i(3635),S=i(8814),I=k("match"),T=n.RegExp,A=T.prototype,R=n.SyntaxError,D=o(A.exec),E=o("".charAt),P=o("".replace),O=o("".indexOf),M=o("".slice),B=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,H=/a/g,F=/a/g,L=new T(H)!==H,W=g.MISSED_STICKY,z=g.UNSUPPORTED_Y,N=r&&(!L||W||C||S||w(function(){return F[I]=!1,T(H)!==H||T(F)===F||"/a/i"!==String(T(H,"i"))})),V=function(e){for(var t,i=e.length,r=0,n="",o=!1;r<=i;r++)t=E(e,r),"\\"!==t?o||"."!==t?("["===t?o=!0:"]"===t&&(o=!1),n+=t):n+="[\\s\\S]":n+=t+E(e,++r);return n},_=function(e){for(var t,i=e.length,r=0,n="",o=[],a=h(null),s=!1,l=!1,d=0,u="";r<=i;r++){if(t=E(e,r),"\\"===t)t+=E(e,++r);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:if(n+=t,"?:"===M(e,r+1,r+3))continue;D(B,M(e,r+1))&&(r+=2,l=!0),d++;continue;case">"===t&&l:if(""===u||x(a,u))throw new R("Invalid capture group name");a[u]=!0,o[o.length]=[u,d],l=!1,u="";continue}l?u+=t:n+=t}return[n,o]};if(a("RegExp",N)){for(var j=function(e,t){var i,r,n,o,a,h,d=u(A,this),g=c(e),y=void 0===t,p=[],w=e;if(!d&&g&&y&&e.constructor===j)return e;if((g||u(A,e))&&(e=e.source,y&&(t=v(w))),e=void 0===e?"":f(e),t=void 0===t?"":f(t),w=e,C&&"dotAll"in H&&(r=!!t&&O(t,"s")>-1,r&&(t=P(t,/s/g,""))),i=t,W&&"sticky"in H&&(n=!!t&&O(t,"y")>-1,n&&z&&(t=P(t,/y/g,""))),S&&(o=_(e),e=o[0],p=o[1]),a=s(T(e,t),d?this:A,j),(r||n||p.length)&&(h=m(a),r&&(h.dotAll=!0,h.raw=j(V(e),i)),n&&(h.sticky=!0),p.length&&(h.groups=p)),e!==w)try{l(a,"source",""===w?"(?:)":w)}catch(x){}return a},Y=d(T),G=0;Y.length>G;)y(j,T,Y[G++]);A.constructor=j,j.prototype=A,p(n,"RegExp",j,{constructor:!0})}b("RegExp")},4901:function(e){"use strict";var t="object"==typeof document&&document.all;e.exports="undefined"==typeof t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},4913:function(e,t,i){"use strict";var r=i(3724),n=i(5917),o=i(8686),a=i(8551),s=i(6969),l=TypeError,h=Object.defineProperty,d=Object.getOwnPropertyDescriptor,u="enumerable",c="configurable",f="writable";t.f=r?o?function(e,t,i){if(a(e),t=s(t),a(i),"function"===typeof e&&"prototype"===t&&"value"in i&&f in i&&!i[f]){var r=d(e,t);r&&r[f]&&(e[t]=i.value,i={configurable:c in i?i[c]:r[c],enumerable:u in i?i[u]:r[u],writable:!1})}return h(e,t,i)}:h:function(e,t,i){if(a(e),t=s(t),a(i),n)try{return h(e,t,i)}catch(r){}if("get"in i||"set"in i)throw new l("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},4916:function(e,t,i){"use strict";var r=i(7751),n=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},o=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};e.exports=function(e,t){var i=r("Set");try{(new i)[e](n(0));try{return(new i)[e](n(-1)),!1}catch(s){if(!t)return!0;try{return(new i)[e](o(-1/0)),!1}catch(l){var a=new i([1,2]);return t(a[e](o(1/0)))}}}catch(l){return!1}}},5003:function(e,t){var i,r,n;(function(o,a){r=[],i=a,n="function"===typeof i?i.apply(t,r):i,void 0===n||(e.exports=n)})("undefined"!==typeof self&&self,function(){function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(f){var i,r,n,o=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,a=/@([^@]*):(\d+):(\d+)\s*$/gi,s=o.exec(f.stack)||a.exec(f.stack),l=s&&s[1]||!1,h=s&&s[2]||!1,d=document.location.href.replace(document.location.hash,""),u=document.getElementsByTagName("script");l===d&&(i=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(h-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),n=i.replace(r,"$1").trim());for(var c=0;c<u.length;c++){if("interactive"===u[c].readyState)return u[c];if(u[c].src===l)return u[c];if(l===d&&u[c].innerHTML&&u[c].innerHTML.trim()===n)return u[c]}return null}}return e})},5024:function(e,t,i){"use strict";var r=i(6518),n=i(3650),o=i(9835),a=i(4916),s=!a("symmetricDifference")||!o("symmetricDifference");r({target:"Set",proto:!0,real:!0,forced:s},{symmetricDifference:n})},5031:function(e,t,i){"use strict";var r=i(7751),n=i(9504),o=i(8480),a=i(3717),s=i(8551),l=n([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(s(e)),i=a.f;return i?l(t,i(e)):t}},5170:function(e,t,i){"use strict";var r=i(6706),n=i(4402);e.exports=r(n.proto,"size","get")||function(e){return e.size}},5208:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loop=t.conditional=t.parse=void 0;var i=function e(t,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r;if(Array.isArray(i))i.forEach(function(i){return e(t,i,r,n)});else if("function"===typeof i)i(t,r,n,e);else{var o=Object.keys(i)[0];Array.isArray(i[o])?(n[o]={},e(t,i[o],r,n[o])):n[o]=i[o](t,r,n,e)}return r};t.parse=i;var r=function(e,t){return function(i,r,n,o){t(i,r,n)&&o(i,e,r,n)}};t.conditional=r;var n=function(e,t){return function(i,r,n,o){var a=[],s=i.pos;while(t(i,r,n)){var l={};if(o(i,e,r,l),i.pos===s)break;s=i.pos,a.push(l)}return a}};t.loop=n},5213:function(e,t,i){"use strict";var r=i(4576),n=i(9039),o=r.RegExp,a=!n(function(){var e=!0;try{o(".","d")}catch(h){e=!1}var t={},i="",r=e?"dgimsy":"gimsy",n=function(e,r){Object.defineProperty(t,e,{get:function(){return i+=r,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in e&&(a.hasIndices="d"),a)n(s,a[s]);var l=Object.getOwnPropertyDescriptor(o.prototype,"flags").get.call(t);return l!==r||i!==r});e.exports={correct:a}},5270:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lzw=void 0;var i=function(e,t,i){var r,n,o,a,s,l,h,d,u,c,f,v,g,y,p,w,x=4096,m=-1,b=i,k=new Array(i),C=new Array(x),S=new Array(x),I=new Array(x+1);for(c=e,n=1<<c,s=n+1,r=n+2,h=m,a=c+1,o=(1<<a)-1,d=0;d<n;d++)C[d]=0,S[d]=d;for(f=v=g=y=p=w=0,u=0;u<b;){if(0===y){if(v<a){f+=t[w]<<v,v+=8,w++;continue}if(d=f&o,f>>=a,v-=a,d>r||d==s)break;if(d==n){a=c+1,o=(1<<a)-1,r=n+2,h=m;continue}if(h==m){I[y++]=S[d],h=d,g=d;continue}l=d,d==r&&(I[y++]=g,d=h);while(d>n)I[y++]=S[d],d=C[d];g=255&S[d],I[y++]=g,r<x&&(C[r]=h,S[r]=g,r++,0===(r&o)&&r<x&&(a++,o+=r)),h=l}y--,k[p++]=I[y],u++}for(u=p;u<b;u++)k[u]=0;return k};t.lzw=i},5397:function(e,t,i){"use strict";var r=i(7055),n=i(7750);e.exports=function(e){return r(n(e))}},5440:function(e,t,i){"use strict";var r=i(8745),n=i(9565),o=i(9504),a=i(9228),s=i(9039),l=i(8551),h=i(4901),d=i(34),u=i(1291),c=i(8014),f=i(655),v=i(7750),g=i(7829),y=i(5966),p=i(2478),w=i(1034),x=i(6682),m=i(8227),b=m("replace"),k=Math.max,C=Math.min,S=o([].concat),I=o([].push),T=o("".indexOf),A=o("".slice),R=function(e){return void 0===e?e:String(e)},D=function(){return"$0"==="a".replace(/./,"$0")}(),E=function(){return!!/./[b]&&""===/./[b]("a","$0")}(),P=!s(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")});a("replace",function(e,t,i){var o=E?"$":"$0";return[function(e,i){var r=v(this),o=d(e)?y(e,b):void 0;return o?n(o,e,r,i):n(t,f(r),e,i)},function(e,n){var a=l(this),s=f(e);if("string"==typeof n&&-1===T(n,o)&&-1===T(n,"$<")){var d=i(t,a,s,n);if(d.done)return d.value}var v=h(n);v||(n=f(n));var y,m=f(w(a)),b=-1!==T(m,"g");b&&(y=-1!==T(m,"u"),a.lastIndex=0);var D,E=[];while(1){if(D=x(a,s),null===D)break;if(I(E,D),!b)break;var P=f(D[0]);""===P&&(a.lastIndex=g(s,c(a.lastIndex),y))}for(var O="",M=0,B=0;B<E.length;B++){D=E[B];for(var H,F=f(D[0]),L=k(C(u(D.index),s.length),0),W=[],z=1;z<D.length;z++)I(W,R(D[z]));var N=D.groups;if(v){var V=S([F],W,L,s);void 0!==N&&I(V,N),H=f(r(n,void 0,V))}else H=p(F,s,L,W,N,n);L>=M&&(O+=A(s,M,L)+H,M=L+F.length)}return O+A(s,M)}]},!P||!D||E)},5506:function(e,t,i){"use strict";var r=i(6518),n=i(2357).entries;r({target:"Object",stat:!0},{entries:function(e){return n(e)}})},5548:function(e,t,i){"use strict";var r=i(3517),n=i(6823),o=TypeError;e.exports=function(e){if(r(e))return e;throw new o(n(e)+" is not a constructor")}},5610:function(e,t,i){"use strict";var r=i(1291),n=Math.max,o=Math.min;e.exports=function(e,t){var i=r(e);return i<0?n(i+t,0):o(i,t)}},5652:function(e,t,i){"use strict";var r=i(9039);e.exports=r(function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})},5700:function(e,t,i){"use strict";var r=i(5749),n=i(8242);r("toPrimitive"),n()},5745:function(e,t,i){"use strict";var r=i(7629);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},5746:function(e,t,i){"use strict";var r=i(9565),n=i(9228),o=i(8551),a=i(34),s=i(7750),l=i(3470),h=i(655),d=i(5966),u=i(6682);n("search",function(e,t,i){return[function(t){var i=s(this),n=a(t)?d(t,e):void 0;return n?r(n,t,i):new RegExp(t)[e](h(i))},function(e){var r=o(this),n=h(e),a=i(t,r,n);if(a.done)return a.value;var s=r.lastIndex;l(s,0)||(r.lastIndex=0);var d=u(r,n);return l(r.lastIndex,s)||(r.lastIndex=s),null===d?-1:d.index}]})},5749:function(e,t,i){"use strict";var r=i(9167),n=i(9297),o=i(1951),a=i(4913).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});n(t,e)||a(t,e,{value:o.f(e)})}},5810:function(e,t,i){"use strict";var r=i(34),n=i(1181).get;e.exports=function(e){if(!r(e))return!1;var t=n(e);return!!t&&"RawJSON"===t.type}},5876:function(e,t,i){"use strict";var r=i(6518),n=i(3838),o=i(4916),a=!o("isSubsetOf",function(e){return e});r({target:"Set",proto:!0,real:!0,forced:a},{isSubsetOf:n})},5917:function(e,t,i){"use strict";var r=i(3724),n=i(9039),o=i(4055);e.exports=!r&&!n(function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},5966:function(e,t,i){"use strict";var r=i(9306),n=i(4117);e.exports=function(e,t){var i=e[t];return n(i)?void 0:r(i)}},6033:function(e,t,i){"use strict";i(8523)},6043:function(e,t,i){"use strict";var r=i(9306),n=TypeError,o=function(e){var t,i;this.promise=new e(function(e,r){if(void 0!==t||void 0!==i)throw new n("Bad Promise constructor");t=e,i=r}),this.resolve=r(t),this.reject=r(i)};e.exports.f=function(e){return new o(e)}},6080:function(e,t,i){"use strict";var r=i(7476),n=i(9306),o=i(616),a=r(r.bind);e.exports=function(e,t){return n(e),void 0===t?e:o?a(e,t):function(){return e.apply(t,arguments)}}},6099:function(e,t,i){"use strict";var r=i(2140),n=i(6840),o=i(3179);r||n(Object.prototype,"toString",o,{unsafe:!0})},6119:function(e,t,i){"use strict";var r=i(5745),n=i(3392),o=r("keys");e.exports=function(e){return o[e]||(o[e]=n(e))}},6193:function(e,t,i){"use strict";var r=i(9504),n=Error,o=r("".replace),a=function(e){return String(new n(e).stack)}("zxcasd"),s=/\n\s*at [^:]*:[^\n]*/,l=s.test(a);e.exports=function(e,t){if(l&&"string"==typeof e&&!n.prepareStackTrace)while(t--)e=o(e,s,"");return e}},6198:function(e,t,i){"use strict";var r=i(8014);e.exports=function(e){return r(e.length)}},6249:function(e,t,i){"use strict";var r=i(9039),n=i(6980);e.exports=!r(function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",n(1,7)),7!==e.stack)})},6262:function(e,t){"use strict";t.A=(e,t)=>{const i=e.__vccOpts||e;for(const[r,n]of t)i[r]=n;return i}},6269:function(e){"use strict";e.exports={}},6279:function(e,t,i){"use strict";var r=i(6840);e.exports=function(e,t,i){for(var n in t)r(e,n,t[n],i);return e}},6280:function(e,t,i){"use strict";var r=i(6518),n=i(4576),o=i(8745),a=i(4601),s="WebAssembly",l=n[s],h=7!==new Error("e",{cause:7}).cause,d=function(e,t){var i={};i[e]=a(e,t,h),r({global:!0,constructor:!0,arity:1,forced:h},i)},u=function(e,t){if(l&&l[e]){var i={};i[e]=a(s+"."+e,t,h),r({target:s,stat:!0,constructor:!0,arity:1,forced:h},i)}};d("Error",function(e){return function(t){return o(e,this,arguments)}}),d("EvalError",function(e){return function(t){return o(e,this,arguments)}}),d("RangeError",function(e){return function(t){return o(e,this,arguments)}}),d("ReferenceError",function(e){return function(t){return o(e,this,arguments)}}),d("SyntaxError",function(e){return function(t){return o(e,this,arguments)}}),d("TypeError",function(e){return function(t){return o(e,this,arguments)}}),d("URIError",function(e){return function(t){return o(e,this,arguments)}}),u("CompileError",function(e){return function(t){return o(e,this,arguments)}}),u("LinkError",function(e){return function(t){return o(e,this,arguments)}}),u("RuntimeError",function(e){return function(t){return o(e,this,arguments)}})},6319:function(e,t,i){"use strict";var r=i(8551),n=i(9539);e.exports=function(e,t,i,o){try{return o?t(r(i)[0],i[1]):t(i)}catch(a){n(e,"throw",a)}}},6395:function(e){"use strict";e.exports=!1},6468:function(e,t,i){"use strict";var r=i(6518),n=i(4576),o=i(9504),a=i(2796),s=i(6840),l=i(3451),h=i(2652),d=i(679),u=i(4901),c=i(4117),f=i(34),v=i(9039),g=i(4428),y=i(687),p=i(3167);e.exports=function(e,t,i){var w=-1!==e.indexOf("Map"),x=-1!==e.indexOf("Weak"),m=w?"set":"add",b=n[e],k=b&&b.prototype,C=b,S={},I=function(e){var t=o(k[e]);s(k,e,"add"===e?function(e){return t(this,0===e?0:e),this}:"delete"===e?function(e){return!(x&&!f(e))&&t(this,0===e?0:e)}:"get"===e?function(e){return x&&!f(e)?void 0:t(this,0===e?0:e)}:"has"===e?function(e){return!(x&&!f(e))&&t(this,0===e?0:e)}:function(e,i){return t(this,0===e?0:e,i),this})},T=a(e,!u(b)||!(x||k.forEach&&!v(function(){(new b).entries().next()})));if(T)C=i.getConstructor(t,e,w,m),l.enable();else if(a(e,!0)){var A=new C,R=A[m](x?{}:-0,1)!==A,D=v(function(){A.has(1)}),E=g(function(e){new b(e)}),P=!x&&v(function(){var e=new b,t=5;while(t--)e[m](t,t);return!e.has(-0)});E||(C=t(function(e,t){d(e,k);var i=p(new b,e,C);return c(t)||h(t,i[m],{that:i,AS_ENTRIES:w}),i}),C.prototype=k,k.constructor=C),(D||P)&&(I("delete"),I("has"),w&&I("get")),(P||R)&&I(m),x&&k.clear&&delete k.clear}return S[e]=C,r({global:!0,constructor:!0,forced:C!==b},S),y(C,e),x||i.setStrong(C,e,w),C}},6469:function(e,t,i){"use strict";var r=i(8227),n=i(2360),o=i(4913).f,a=r("unscopables"),s=Array.prototype;void 0===s[a]&&o(s,a,{configurable:!0,value:n(null)}),e.exports=function(e){s[a][e]=!0}},6499:function(e,t,i){"use strict";var r=i(6518),n=i(9565),o=i(9306),a=i(6043),s=i(1103),l=i(2652),h=i(537);r({target:"Promise",stat:!0,forced:h},{all:function(e){var t=this,i=a.f(t),r=i.resolve,h=i.reject,d=s(function(){var i=o(t.resolve),a=[],s=0,d=1;l(e,function(e){var o=s++,l=!1;d++,n(i,t,e).then(function(e){l||(l=!0,a[o]=e,--d||r(a))},h)}),--d||r(a)});return d.error&&h(d.value),i.promise}})},6518:function(e,t,i){"use strict";var r=i(4576),n=i(7347).f,o=i(6699),a=i(6840),s=i(9433),l=i(7740),h=i(2796);e.exports=function(e,t){var i,d,u,c,f,v,g=e.target,y=e.global,p=e.stat;if(d=y?r:p?r[g]||s(g,{}):r[g]&&r[g].prototype,d)for(u in t){if(f=t[u],e.dontCallGetSet?(v=n(d,u),c=v&&v.value):c=d[u],i=h(y?u:g+(p?".":"#")+u,e.forced),!i&&void 0!==c){if(typeof f==typeof c)continue;l(f,c)}(e.sham||c&&c.sham)&&o(f,"sham",!0),a(d,u,f,e)}}},6682:function(e,t,i){"use strict";var r=i(9565),n=i(8551),o=i(4901),a=i(2195),s=i(7323),l=TypeError;e.exports=function(e,t){var i=e.exec;if(o(i)){var h=r(i,e,t);return null!==h&&n(h),h}if("RegExp"===a(e))return r(s,e,t);throw new l("RegExp#exec called on incompatible receiver")}},6699:function(e,t,i){"use strict";var r=i(3724),n=i(4913),o=i(6980);e.exports=r?function(e,t,i){return n.f(e,t,o(1,i))}:function(e,t,i){return e[t]=i,e}},6706:function(e,t,i){"use strict";var r=i(9504),n=i(9306);e.exports=function(e,t,i){try{return r(n(Object.getOwnPropertyDescriptor(e,t)[i]))}catch(o){}}},6761:function(e,t,i){"use strict";var r=i(6518),n=i(4576),o=i(9565),a=i(9504),s=i(6395),l=i(3724),h=i(4495),d=i(9039),u=i(9297),c=i(1625),f=i(8551),v=i(5397),g=i(6969),y=i(655),p=i(6980),w=i(2360),x=i(1072),m=i(8480),b=i(298),k=i(3717),C=i(7347),S=i(4913),I=i(6801),T=i(8773),A=i(6840),R=i(2106),D=i(5745),E=i(6119),P=i(421),O=i(3392),M=i(8227),B=i(1951),H=i(5749),F=i(8242),L=i(687),W=i(1181),z=i(9213).forEach,N=E("hidden"),V="Symbol",_="prototype",j=W.set,Y=W.getterFor(V),G=Object[_],X=n.Symbol,U=X&&X[_],q=n.RangeError,K=n.TypeError,J=n.QObject,Q=C.f,Z=S.f,$=b.f,ee=T.f,te=a([].push),ie=D("symbols"),re=D("op-symbols"),ne=D("wks"),oe=!J||!J[_]||!J[_].findChild,ae=function(e,t,i){var r=Q(G,t);r&&delete G[t],Z(e,t,i),r&&e!==G&&Z(G,t,r)},se=l&&d(function(){return 7!==w(Z({},"a",{get:function(){return Z(this,"a",{value:7}).a}})).a})?ae:Z,le=function(e,t){var i=ie[e]=w(U);return j(i,{type:V,tag:e,description:t}),l||(i.description=t),i},he=function(e,t,i){e===G&&he(re,t,i),f(e);var r=g(t);return f(i),u(ie,r)?(i.enumerable?(u(e,N)&&e[N][r]&&(e[N][r]=!1),i=w(i,{enumerable:p(0,!1)})):(u(e,N)||Z(e,N,p(1,w(null))),e[N][r]=!0),se(e,r,i)):Z(e,r,i)},de=function(e,t){f(e);var i=v(t),r=x(i).concat(ge(i));return z(r,function(t){l&&!o(ce,i,t)||he(e,t,i[t])}),e},ue=function(e,t){return void 0===t?w(e):de(w(e),t)},ce=function(e){var t=g(e),i=o(ee,this,t);return!(this===G&&u(ie,t)&&!u(re,t))&&(!(i||!u(this,t)||!u(ie,t)||u(this,N)&&this[N][t])||i)},fe=function(e,t){var i=v(e),r=g(t);if(i!==G||!u(ie,r)||u(re,r)){var n=Q(i,r);return!n||!u(ie,r)||u(i,N)&&i[N][r]||(n.enumerable=!0),n}},ve=function(e){var t=$(v(e)),i=[];return z(t,function(e){u(ie,e)||u(P,e)||te(i,e)}),i},ge=function(e){var t=e===G,i=$(t?re:v(e)),r=[];return z(i,function(e){!u(ie,e)||t&&!u(G,e)||te(r,ie[e])}),r};h||(X=function(){if(c(U,this))throw new K("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,t=O(e),i=function(e){var r=void 0===this?n:this;r===G&&o(i,re,e),u(r,N)&&u(r[N],t)&&(r[N][t]=!1);var a=p(1,e);try{se(r,t,a)}catch(s){if(!(s instanceof q))throw s;ae(r,t,a)}};return l&&oe&&se(G,t,{configurable:!0,set:i}),le(t,e)},U=X[_],A(U,"toString",function(){return Y(this).tag}),A(X,"withoutSetter",function(e){return le(O(e),e)}),T.f=ce,S.f=he,I.f=de,C.f=fe,m.f=b.f=ve,k.f=ge,B.f=function(e){return le(M(e),e)},l&&(R(U,"description",{configurable:!0,get:function(){return Y(this).description}}),s||A(G,"propertyIsEnumerable",ce,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!h,sham:!h},{Symbol:X}),z(x(ne),function(e){H(e)}),r({target:V,stat:!0,forced:!h},{useSetter:function(){oe=!0},useSimple:function(){oe=!1}}),r({target:"Object",stat:!0,forced:!h,sham:!l},{create:ue,defineProperty:he,defineProperties:de,getOwnPropertyDescriptor:fe}),r({target:"Object",stat:!0,forced:!h},{getOwnPropertyNames:ve}),F(),L(X,V),P[N]=!0},6801:function(e,t,i){"use strict";var r=i(3724),n=i(8686),o=i(4913),a=i(8551),s=i(5397),l=i(1072);t.f=r&&!n?Object.defineProperties:function(e,t){a(e);var i,r=s(t),n=l(t),h=n.length,d=0;while(h>d)o.f(e,i=n[d++],r[i]);return e}},6823:function(e){"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(i){return"Object"}}},6837:function(e){"use strict";var t=TypeError,i=9007199254740991;e.exports=function(e){if(e>i)throw t("Maximum allowed index exceeded");return e}},6840:function(e,t,i){"use strict";var r=i(4901),n=i(4913),o=i(283),a=i(9433);e.exports=function(e,t,i,s){s||(s={});var l=s.enumerable,h=void 0!==s.name?s.name:t;if(r(i)&&o(i,h,s),s.global)l?e[t]=i:a(t,i);else{try{s.unsafe?e[t]&&(l=!0):delete e[t]}catch(d){}l?e[t]=i:n.f(e,t,{value:i,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},6910:function(e,t,i){"use strict";var r=i(6518),n=i(9504),o=i(9306),a=i(8981),s=i(6198),l=i(4606),h=i(655),d=i(9039),u=i(4488),c=i(4598),f=i(3709),v=i(3763),g=i(9519),y=i(3607),p=[],w=n(p.sort),x=n(p.push),m=d(function(){p.sort(void 0)}),b=d(function(){p.sort(null)}),k=c("sort"),C=!d(function(){if(g)return g<70;if(!(f&&f>3)){if(v)return!0;if(y)return y<603;var e,t,i,r,n="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:i=3;break;case 68:case 71:i=4;break;default:i=2}for(r=0;r<47;r++)p.push({k:t+r,v:i})}for(p.sort(function(e,t){return t.v-e.v}),r=0;r<p.length;r++)t=p[r].k.charAt(0),n.charAt(n.length-1)!==t&&(n+=t);return"DGBEFHACIJK"!==n}}),S=m||!b||!k||!C,I=function(e){return function(t,i){return void 0===i?-1:void 0===t?1:void 0!==e?+e(t,i)||0:h(t)>h(i)?1:-1}};r({target:"Array",proto:!0,forced:S},{sort:function(e){void 0!==e&&o(e);var t=a(this);if(C)return void 0===e?w(t):w(t,e);var i,r,n=[],h=s(t);for(r=0;r<h;r++)r in t&&x(n,t[r]);u(n,I(e)),i=s(n),r=0;while(r<i)t[r]=n[r++];while(r<h)l(t,r++);return t}})},6938:function(e,t,i){"use strict";var r=i(2360),n=i(2106),o=i(6279),a=i(6080),s=i(679),l=i(4117),h=i(2652),d=i(1088),u=i(2529),c=i(7633),f=i(3724),v=i(3451).fastKey,g=i(1181),y=g.set,p=g.getterFor;e.exports={getConstructor:function(e,t,i,d){var u=e(function(e,n){s(e,c),y(e,{type:t,index:r(null),first:null,last:null,size:0}),f||(e.size=0),l(n)||h(n,e[d],{that:e,AS_ENTRIES:i})}),c=u.prototype,g=p(t),w=function(e,t,i){var r,n,o=g(e),a=x(e,t);return a?a.value=i:(o.last=a={index:n=v(t,!0),key:t,value:i,previous:r=o.last,next:null,removed:!1},o.first||(o.first=a),r&&(r.next=a),f?o.size++:e.size++,"F"!==n&&(o.index[n]=a)),e},x=function(e,t){var i,r=g(e),n=v(t);if("F"!==n)return r.index[n];for(i=r.first;i;i=i.next)if(i.key===t)return i};return o(c,{clear:function(){var e=this,t=g(e),i=t.first;while(i)i.removed=!0,i.previous&&(i.previous=i.previous.next=null),i=i.next;t.first=t.last=null,t.index=r(null),f?t.size=0:e.size=0},delete:function(e){var t=this,i=g(t),r=x(t,e);if(r){var n=r.next,o=r.previous;delete i.index[r.index],r.removed=!0,o&&(o.next=n),n&&(n.previous=o),i.first===r&&(i.first=n),i.last===r&&(i.last=o),f?i.size--:t.size--}return!!r},forEach:function(e){var t,i=g(this),r=a(e,arguments.length>1?arguments[1]:void 0);while(t=t?t.next:i.first){r(t.value,t.key,this);while(t&&t.removed)t=t.previous}},has:function(e){return!!x(this,e)}}),o(c,i?{get:function(e){var t=x(this,e);return t&&t.value},set:function(e,t){return w(this,0===e?0:e,t)}}:{add:function(e){return w(this,e=0===e?0:e,e)}}),f&&n(c,"size",{configurable:!0,get:function(){return g(this).size}}),u},setStrong:function(e,t,i){var r=t+" Iterator",n=p(t),o=p(r);d(e,t,function(e,t){y(this,{type:r,target:e,state:n(e),kind:t,last:null})},function(){var e=o(this),t=e.kind,i=e.last;while(i&&i.removed)i=i.previous;return e.target&&(e.last=i=i?i.next:e.state.first)?u("keys"===t?i.key:"values"===t?i.value:[i.key,i.value],!1):(e.target=null,u(void 0,!0))},i?"entries":"values",!i,!0),c(t)}}},6955:function(e,t,i){"use strict";var r=i(2140),n=i(4901),o=i(2195),a=i(8227),s=a("toStringTag"),l=Object,h="Arguments"===o(function(){return arguments}()),d=function(e,t){try{return e[t]}catch(i){}};e.exports=r?o:function(e){var t,i,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=d(t=l(e),s))?i:h?o(t):"Object"===(r=o(t))&&n(t.callee)?"Arguments":r}},6969:function(e,t,i){"use strict";var r=i(2777),n=i(757);e.exports=function(e){var t=r(e,"string");return n(t)?t:t+""}},6980:function(e){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},7040:function(e,t,i){"use strict";var r=i(4495);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7055:function(e,t,i){"use strict";var r=i(9504),n=i(9039),o=i(2195),a=Object,s=r("".split);e.exports=n(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"===o(e)?s(e,""):a(e)}:a},7080:function(e,t,i){"use strict";var r=i(4402).has;e.exports=function(e){return r(e),e}},7240:function(e,t,i){"use strict";var r=i(9504),n=i(7750),o=i(655),a=/"/g,s=r("".replace);e.exports=function(e,t,i,r){var l=o(n(e)),h="<"+t;return""!==i&&(h+=" "+i+'="'+s(o(r),a,"&quot;")+'"'),h+">"+l+"</"+t+">"}},7323:function(e,t,i){"use strict";var r=i(9565),n=i(9504),o=i(655),a=i(7979),s=i(8429),l=i(5745),h=i(2360),d=i(1181).get,u=i(3635),c=i(8814),f=l("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,g=v,y=n("".charAt),p=n("".indexOf),w=n("".replace),x=n("".slice),m=function(){var e=/a/,t=/b*/g;return r(v,e,"a"),r(v,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),b=s.BROKEN_CARET,k=void 0!==/()??/.exec("")[1],C=m||k||b||u||c;C&&(g=function(e){var t,i,n,s,l,u,c,C=this,S=d(C),I=o(e),T=S.raw;if(T)return T.lastIndex=C.lastIndex,t=r(g,T,I),C.lastIndex=T.lastIndex,t;var A=S.groups,R=b&&C.sticky,D=r(a,C),E=C.source,P=0,O=I;if(R&&(D=w(D,"y",""),-1===p(D,"g")&&(D+="g"),O=x(I,C.lastIndex),C.lastIndex>0&&(!C.multiline||C.multiline&&"\n"!==y(I,C.lastIndex-1))&&(E="(?: "+E+")",O=" "+O,P++),i=new RegExp("^(?:"+E+")",D)),k&&(i=new RegExp("^"+E+"$(?!\\s)",D)),m&&(n=C.lastIndex),s=r(v,R?i:C,O),R?s?(s.input=x(s.input,P),s[0]=x(s[0],P),s.index=C.lastIndex,C.lastIndex+=s[0].length):C.lastIndex=0:m&&s&&(C.lastIndex=C.global?s.index+s[0].length:n),k&&s&&s.length>1&&r(f,s[0],i,function(){for(l=1;l<arguments.length-2;l++)void 0===arguments[l]&&(s[l]=void 0)}),s&&A)for(s.groups=u=h(null),l=0;l<A.length;l++)c=A[l],u[c[0]]=s[c[1]];return s}),e.exports=g},7347:function(e,t,i){"use strict";var r=i(3724),n=i(9565),o=i(8773),a=i(6980),s=i(5397),l=i(6969),h=i(9297),d=i(5917),u=Object.getOwnPropertyDescriptor;t.f=r?u:function(e,t){if(e=s(e),t=l(t),d)try{return u(e,t)}catch(i){}if(h(e,t))return a(!n(o.f,e,t),e[t])}},7400:function(e){"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},7433:function(e,t,i){"use strict";var r=i(4376),n=i(3517),o=i(34),a=i(8227),s=a("species"),l=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,n(t)&&(t===l||r(t.prototype))?t=void 0:o(t)&&(t=t[s],null===t&&(t=void 0))),void 0===t?l:t}},7452:function(e){"use strict";e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},7465:function(e,t,i){"use strict";var r=i(3724),n=i(3635),o=i(2195),a=i(2106),s=i(1181).get,l=RegExp.prototype,h=TypeError;r&&n&&a(l,"dotAll",{configurable:!0,get:function(){if(this!==l){if("RegExp"===o(this))return!!s(this).dotAll;throw new h("Incompatible receiver, RegExp required")}}})},7476:function(e,t,i){"use strict";var r=i(2195),n=i(9504);e.exports=function(e){if("Function"===r(e))return n(e)}},7495:function(e,t,i){"use strict";var r=i(6518),n=i(7323);r({target:"RegExp",proto:!0,forced:/./.exec!==n},{exec:n})},7584:function(e,t,i){"use strict";var r=i(34),n=i(6699);e.exports=function(e,t){r(t)&&"cause"in t&&n(e,"cause",t.cause)}},7588:function(e,t,i){"use strict";var r=i(6518),n=i(9565),o=i(2652),a=i(9306),s=i(8551),l=i(1767),h=i(9539),d=i(4549),u=d("forEach",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:u},{forEach:function(e){s(this);try{a(e)}catch(r){h(this,"throw",r)}if(u)return n(u,this,e);var t=l(this),i=0;o(t,function(t){e(t,i++)},{IS_RECORD:!0})}})},7629:function(e,t,i){"use strict";var r=i(6395),n=i(4576),o=i(9433),a="__core-js_shared__",s=e.exports=n[a]||o(a,{});(s.versions||(s.versions=[])).push({version:"3.47.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.47.0/LICENSE",source:"https://github.com/zloirock/core-js"})},7633:function(e,t,i){"use strict";var r=i(7751),n=i(2106),o=i(8227),a=i(3724),s=o("species");e.exports=function(e){var t=r(e);a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},7642:function(e,t,i){"use strict";var r=i(6518),n=i(3440),o=i(9039),a=i(4916),s=!a("difference",function(e){return 0===e.size}),l=s||o(function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var i=e++>1;return t.has(1)&&t.clear(),{done:i,value:2}}}}},t=new Set([1,2,3,4]);return 3!==t.difference(e).size});r({target:"Set",proto:!0,real:!0,forced:l},{difference:n})},7657:function(e,t,i){"use strict";var r,n,o,a=i(9039),s=i(4901),l=i(34),h=i(2360),d=i(2787),u=i(6840),c=i(8227),f=i(6395),v=c("iterator"),g=!1;[].keys&&(o=[].keys(),"next"in o?(n=d(d(o)),n!==Object.prototype&&(r=n)):g=!0);var y=!l(r)||a(function(){var e={};return r[v].call(e)!==e});y?r={}:f&&(r=h(r)),s(r[v])||u(r,v,function(){return this}),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:g}},7680:function(e,t,i){"use strict";var r=i(9504);e.exports=r([].slice)},7740:function(e,t,i){"use strict";var r=i(9297),n=i(5031),o=i(7347),a=i(4913);e.exports=function(e,t,i){for(var s=n(t),l=a.f,h=o.f,d=0;d<s.length;d++){var u=s[d];r(e,u)||i&&r(i,u)||l(e,u,h(t,u))}}},7743:function(e,t,i){"use strict";var r=i(6518),n=i(9565),o=i(9306),a=i(6043),s=i(1103),l=i(2652),h=i(537);r({target:"Promise",stat:!0,forced:h},{race:function(e){var t=this,i=a.f(t),r=i.reject,h=s(function(){var a=o(t.resolve);l(e,function(e){n(a,t,e).then(i.resolve,r)})});return h.error&&r(h.value),i.promise}})},7745:function(e,t,i){"use strict";var r=i(3724),n=i(8429).MISSED_STICKY,o=i(2195),a=i(2106),s=i(1181).get,l=RegExp.prototype,h=TypeError;r&&n&&a(l,"sticky",{configurable:!0,get:function(){if(this!==l){if("RegExp"===o(this))return!!s(this).sticky;throw new h("Incompatible receiver, RegExp required")}}})},7750:function(e,t,i){"use strict";var r=i(4117),n=TypeError;e.exports=function(e){if(r(e))throw new n("Can't call method on "+e);return e}},7751:function(e,t,i){"use strict";var r=i(4576),n=i(4901),o=function(e){return n(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e]):r[e]&&r[e][t]}},7764:function(e,t,i){"use strict";var r=i(8183).charAt,n=i(655),o=i(1181),a=i(1088),s=i(2529),l="String Iterator",h=o.set,d=o.getterFor(l);a(String,"String",function(e){h(this,{type:l,string:n(e),index:0})},function(){var e,t=d(this),i=t.string,n=t.index;return n>=i.length?s(void 0,!0):(e=r(i,n),t.index+=e.length,s(e,!1))})},7812:function(e,t,i){"use strict";var r=i(6518),n=i(9297),o=i(757),a=i(6823),s=i(5745),l=i(1296),h=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!l},{keyFor:function(e){if(!o(e))throw new TypeError(a(e)+" is not a symbol");if(n(h,e))return h[e]}})},7819:function(e,t,i){"use strict";var r=i(9039);e.exports=!r(function(){var e="9007199254740993",t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e})},7829:function(e,t,i){"use strict";var r=i(8183).charAt;e.exports=function(e,t,i){return t+(i?r(e,t).length:1)}},7860:function(e,t,i){"use strict";var r=i(2839);e.exports=/web0s(?!.*chrome)/i.test(r)},7916:function(e,t,i){"use strict";var r=i(6080),n=i(9565),o=i(8981),a=i(6319),s=i(4209),l=i(3517),h=i(6198),d=i(4659),u=i(81),c=i(851),f=Array;e.exports=function(e){var t=o(e),i=l(this),v=arguments.length,g=v>1?arguments[1]:void 0,y=void 0!==g;y&&(g=r(g,v>2?arguments[2]:void 0));var p,w,x,m,b,k,C=c(t),S=0;if(!C||this===f&&s(C))for(p=h(t),w=i?new this(p):f(p);p>S;S++)k=y?g(t[S],S):t[S],d(w,S,k);else for(w=i?new this:[],m=u(t,C),b=m.next;!(x=n(b,m)).done;S++)k=y?a(m,g,[x.value,S],!0):x.value,d(w,S,k);return w.length=S,w}},7979:function(e,t,i){"use strict";var r=i(8551);e.exports=function(){var e=r(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},8004:function(e,t,i){"use strict";var r=i(6518),n=i(9039),o=i(8750),a=i(4916),s=!a("intersection",function(e){return 2===e.size&&e.has(1)&&e.has(2)})||n(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))});r({target:"Set",proto:!0,real:!0,forced:s},{intersection:o})},8014:function(e,t,i){"use strict";var r=i(1291),n=Math.min;e.exports=function(e){var t=r(e);return t>0?n(t,9007199254740991):0}},8111:function(e,t,i){"use strict";var r=i(6518),n=i(4576),o=i(679),a=i(8551),s=i(4901),l=i(2787),h=i(2106),d=i(4659),u=i(9039),c=i(9297),f=i(8227),v=i(7657).IteratorPrototype,g=i(3724),y=i(6395),p="constructor",w="Iterator",x=f("toStringTag"),m=TypeError,b=n[w],k=y||!s(b)||b.prototype!==v||!u(function(){b({})}),C=function(){if(o(this,v),l(this)===v)throw new m("Abstract class Iterator not directly constructable")},S=function(e,t){g?h(v,e,{configurable:!0,get:function(){return t},set:function(t){if(a(this),this===v)throw new m("You can't redefine this property");c(this,e)?this[e]=t:d(this,e,t)}}):v[e]=t};c(v,x)||S(x,w),!k&&c(v,p)&&v[p]!==Object||S(p,C),C.prototype=v,r({global:!0,constructor:!0,forced:k},{Iterator:C})},8126:function(e,t,i){"use strict";var r=i(6518),n=i(7240),o=i(3061);r({target:"String",proto:!0,forced:o("bold")},{bold:function(){return n(this,"b","","")}})},8156:function(e,t,i){"use strict";var r=i(6518),n=i(533).start,o=i(3063);r({target:"String",proto:!0,forced:o},{padStart:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}})},8183:function(e,t,i){"use strict";var r=i(9504),n=i(1291),o=i(655),a=i(7750),s=r("".charAt),l=r("".charCodeAt),h=r("".slice),d=function(e){return function(t,i){var r,d,u=o(a(t)),c=n(i),f=u.length;return c<0||c>=f?e?"":void 0:(r=l(u,c),r<55296||r>56319||c+1===f||(d=l(u,c+1))<56320||d>57343?e?s(u,c):r:e?h(u,c,c+2):d-56320+(r-55296<<10)+65536)}};e.exports={codeAt:d(!1),charAt:d(!0)}},8227:function(e,t,i){"use strict";var r=i(4576),n=i(5745),o=i(9297),a=i(3392),s=i(4495),l=i(7040),h=r.Symbol,d=n("wks"),u=l?h["for"]||h:h&&h.withoutSetter||a;e.exports=function(e){return o(d,e)||(d[e]=s&&o(h,e)?h[e]:u("Symbol."+e)),d[e]}},8235:function(e,t,i){"use strict";var r=i(9504),n=i(9297),o=SyntaxError,a=parseInt,s=String.fromCharCode,l=r("".charAt),h=r("".slice),d=r(/./.exec),u={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},c=/^[\da-f]{4}$/i,f=/^[\u0000-\u001F]$/;e.exports=function(e,t){var i=!0,r="";while(t<e.length){var v=l(e,t);if("\\"===v){var g=h(e,t,t+2);if(n(u,g))r+=u[g],t+=2;else{if("\\u"!==g)throw new o('Unknown escape sequence: "'+g+'"');t+=2;var y=h(e,t,t+4);if(!d(c,y))throw new o("Bad Unicode escape at: "+t);r+=s(a(y,16)),t+=4}}else{if('"'===v){i=!1,t++;break}if(d(f,v))throw new o("Bad control character in string literal at: "+t);r+=v,t++}}if(i)throw new o("Unterminated string at: "+t);return{value:r,end:t}}},8237:function(e,t,i){"use strict";var r=i(6518),n=i(2652),o=i(9306),a=i(8551),s=i(1767),l=i(9539),h=i(4549),d=i(8745),u=i(9039),c=TypeError,f=u(function(){[].keys().reduce(function(){},void 0)}),v=!f&&h("reduce",c);r({target:"Iterator",proto:!0,real:!0,forced:f||v},{reduce:function(e){a(this);try{o(e)}catch(u){l(this,"throw",u)}var t=arguments.length<2,i=t?void 0:arguments[1];if(v)return d(v,this,t?[e]:[e,i]);var r=s(this),h=0;if(n(r,function(r){t?(t=!1,i=r):i=e(i,r,h),h++},{IS_RECORD:!0}),t)throw new c("Reduce of empty iterator with no initial value");return i}})},8242:function(e,t,i){"use strict";var r=i(9565),n=i(7751),o=i(8227),a=i(6840);e.exports=function(){var e=n("Symbol"),t=e&&e.prototype,i=t&&t.valueOf,s=o("toPrimitive");t&&!t[s]&&a(t,s,function(e){return r(i,this)},{arity:1})}},8265:function(e){"use strict";var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null},i=this.tail;i?i.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e){var t=this.head=e.next;return null===t&&(this.tail=null),e.item}}},e.exports=t},8335:function(e,t,i){"use strict";i(9112)},8347:function(e,t,i){"use strict";var r=i(6518),n=i(9297);r({target:"Object",stat:!0},{hasOwn:n})},8429:function(e,t,i){"use strict";var r=i(9039),n=i(4576),o=n.RegExp,a=r(function(){var e=o("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),s=a||r(function(){return!o("a","y").sticky}),l=a||r(function(){var e=o("^r","gy");return e.lastIndex=2,null!==e.exec("str")});e.exports={BROKEN_CARET:l,MISSED_STICKY:s,UNSUPPORTED_Y:a}},8469:function(e,t,i){"use strict";var r=i(9504),n=i(507),o=i(4402),a=o.Set,s=o.proto,l=r(s.forEach),h=r(s.keys),d=h(new a).next;e.exports=function(e,t,i){return i?n({iterator:h(e),next:d},t):l(e,t)}},8480:function(e,t,i){"use strict";var r=i(1828),n=i(8727),o=n.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},8523:function(e,t,i){"use strict";var r=i(6468),n=i(6938);r("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},n)},8527:function(e,t,i){"use strict";var r=i(7080),n=i(4402).has,o=i(5170),a=i(3789),s=i(507),l=i(9539);e.exports=function(e){var t=r(this),i=a(e);if(o(t)<i.size)return!1;var h=i.getIterator();return!1!==s(h,function(e){if(!n(t,e))return l(h,"normal",!1)})}},8551:function(e,t,i){"use strict";var r=i(34),n=String,o=TypeError;e.exports=function(e){if(r(e))return e;throw new o(n(e)+" is not an object")}},8574:function(e,t,i){"use strict";var r=i(4215);e.exports="NODE"===r},8598:function(e,t,i){"use strict";var r=i(6518),n=i(9504),o=i(7055),a=i(5397),s=i(4598),l=n([].join),h=o!==Object,d=h||!s("join",",");r({target:"Array",proto:!0,forced:d},{join:function(e){return l(a(this),void 0===e?",":e)}})},8622:function(e,t,i){"use strict";var r=i(4576),n=i(4901),o=r.WeakMap;e.exports=n(o)&&/native code/.test(String(o))},8686:function(e,t,i){"use strict";var r=i(3724),n=i(9039);e.exports=r&&n(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},8706:function(e,t,i){"use strict";var r=i(6518),n=i(9039),o=i(4376),a=i(34),s=i(8981),l=i(6198),h=i(6837),d=i(4659),u=i(1469),c=i(597),f=i(8227),v=i(9519),g=f("isConcatSpreadable"),y=v>=51||!n(function(){var e=[];return e[g]=!1,e.concat()[0]!==e}),p=function(e){if(!a(e))return!1;var t=e[g];return void 0!==t?!!t:o(e)},w=!y||!c("concat");r({target:"Array",proto:!0,arity:1,forced:w},{concat:function(e){var t,i,r,n,o,a=s(this),c=u(a,0),f=0;for(t=-1,r=arguments.length;t<r;t++)if(o=-1===t?a:arguments[t],p(o))for(n=l(o),h(f+n),i=0;i<n;i++,f++)i in o&&d(c,f,o[i]);else h(f+1),d(c,f++,o);return c.length=f,c}})},8727:function(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8745:function(e,t,i){"use strict";var r=i(616),n=Function.prototype,o=n.apply,a=n.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(o):function(){return a.apply(o,arguments)})},8750:function(e,t,i){"use strict";var r=i(7080),n=i(4402),o=i(5170),a=i(3789),s=i(8469),l=i(507),h=n.Set,d=n.add,u=n.has;e.exports=function(e){var t=r(this),i=a(e),n=new h;return o(t)>i.size?l(i.getIterator(),function(e){u(t,e)&&d(n,e)}):s(t,function(e){i.includes(e)&&d(n,e)}),n}},8773:function(e,t){"use strict";var i={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,n=r&&!i.call({1:2},1);t.f=n?function(e){var t=r(this,e);return!!t&&t.enumerable}:i},8781:function(e,t,i){"use strict";var r=i(350).PROPER,n=i(6840),o=i(8551),a=i(655),s=i(9039),l=i(1034),h="toString",d=RegExp.prototype,u=d[h],c=s(function(){return"/a/b"!==u.call({source:"a",flags:"b"})}),f=r&&u.name!==h;(c||f)&&n(d,h,function(){var e=o(this),t=a(e.source),i=a(l(e));return"/"+t+"/"+i},{unsafe:!0})},8814:function(e,t,i){"use strict";var r=i(9039),n=i(4576),o=n.RegExp;e.exports=r(function(){var e=o("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})},8841:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r=i(5208),n=i(2515),o={blocks:function(e){for(var t=0,i=[],r=e.data.length,o=0,a=(0,n.readByte)()(e);a!==t;a=(0,n.readByte)()(e)){if(!a)break;if(e.pos+a>=r){var s=r-e.pos;i.push((0,n.readBytes)(s)(e)),o+=s;break}i.push((0,n.readBytes)(a)(e)),o+=a}for(var l=new Uint8Array(o),h=0,d=0;d<i.length;d++)l.set(i[d],h),h+=i[d].length;return l}},a=(0,r.conditional)({gce:[{codes:(0,n.readBytes)(2)},{byteSize:(0,n.readByte)()},{extras:(0,n.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,n.readUnsigned)(!0)},{transparentColorIndex:(0,n.readByte)()},{terminator:(0,n.readByte)()}]},function(e){var t=(0,n.peekBytes)(2)(e);return 33===t[0]&&249===t[1]}),s=(0,r.conditional)({image:[{code:(0,n.readByte)()},{descriptor:[{left:(0,n.readUnsigned)(!0)},{top:(0,n.readUnsigned)(!0)},{width:(0,n.readUnsigned)(!0)},{height:(0,n.readUnsigned)(!0)},{lct:(0,n.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,r.conditional)({lct:(0,n.readArray)(3,function(e,t,i){return Math.pow(2,i.descriptor.lct.size+1)})},function(e,t,i){return i.descriptor.lct.exists}),{data:[{minCodeSize:(0,n.readByte)()},o]}]},function(e){return 44===(0,n.peekByte)()(e)}),l=(0,r.conditional)({text:[{codes:(0,n.readBytes)(2)},{blockSize:(0,n.readByte)()},{preData:function(e,t,i){return(0,n.readBytes)(i.text.blockSize)(e)}},o]},function(e){var t=(0,n.peekBytes)(2)(e);return 33===t[0]&&1===t[1]}),h=(0,r.conditional)({application:[{codes:(0,n.readBytes)(2)},{blockSize:(0,n.readByte)()},{id:function(e,t,i){return(0,n.readString)(i.blockSize)(e)}},o]},function(e){var t=(0,n.peekBytes)(2)(e);return 33===t[0]&&255===t[1]}),d=(0,r.conditional)({comment:[{codes:(0,n.readBytes)(2)},o]},function(e){var t=(0,n.peekBytes)(2)(e);return 33===t[0]&&254===t[1]}),u=[{header:[{signature:(0,n.readString)(3)},{version:(0,n.readString)(3)}]},{lsd:[{width:(0,n.readUnsigned)(!0)},{height:(0,n.readUnsigned)(!0)},{gct:(0,n.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,n.readByte)()},{pixelAspectRatio:(0,n.readByte)()}]},(0,r.conditional)({gct:(0,n.readArray)(3,function(e,t){return Math.pow(2,t.lsd.gct.size+1)})},function(e,t){return t.lsd.gct.exists}),{frames:(0,r.loop)([a,h,d,s,l],function(e){var t=(0,n.peekByte)()(e);return 33===t||44===t})}],c=u;t["default"]=c},8980:function(e,t,i){"use strict";var r=i(6518),n=i(9213).findIndex,o=i(6469),a="findIndex",s=!0;a in[]&&Array(1)[a](function(){s=!1}),r({target:"Array",proto:!0,forced:s},{findIndex:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}}),o(a)},8981:function(e,t,i){"use strict";var r=i(7750),n=Object;e.exports=function(e){return n(r(e))}},9039:function(e){"use strict";e.exports=function(e){try{return!!e()}catch(t){return!0}}},9085:function(e,t,i){"use strict";var r=i(6518),n=i(4213);r({target:"Object",stat:!0,arity:2,forced:Object.assign!==n},{assign:n})},9112:function(e,t,i){"use strict";var r=i(6518),n=i(3724),o=i(4576),a=i(7751),s=i(9504),l=i(9565),h=i(4901),d=i(34),u=i(4376),c=i(9297),f=i(655),v=i(6198),g=i(4659),y=i(9039),p=i(8235),w=i(4495),x=o.JSON,m=o.Number,b=o.SyntaxError,k=x&&x.parse,C=a("Object","keys"),S=Object.getOwnPropertyDescriptor,I=s("".charAt),T=s("".slice),A=s(/./.exec),R=s([].push),D=/^\d$/,E=/^[1-9]$/,P=/^[\d-]$/,O=/^[\t\n\r ]$/,M=0,B=1,H=function(e,t){e=f(e);var i=new z(e,0,""),r=i.parse(),n=r.value,o=i.skip(O,r.end);if(o<e.length)throw new b('Unexpected extra character: "'+I(e,o)+'" after the parsed data at: '+o);return h(t)?F({"":n},"",t,r):n},F=function(e,t,i,r){var n,o,a,s,h,f=e[t],g=r&&f===r.value,y=g&&"string"==typeof r.source?{source:r.source}:{};if(d(f)){var p=u(f),w=g?r.nodes:p?[]:{};if(p)for(n=w.length,a=v(f),s=0;s<a;s++)L(f,s,F(f,""+s,i,s<n?w[s]:void 0));else for(o=C(f),a=v(o),s=0;s<a;s++)h=o[s],L(f,h,F(f,h,i,c(w,h)?w[h]:void 0))}return l(i,e,t,f,y)},L=function(e,t,i){if(n){var r=S(e,t);if(r&&!r.configurable)return}void 0===i?delete e[t]:g(e,t,i)},W=function(e,t,i,r){this.value=e,this.end=t,this.source=i,this.nodes=r},z=function(e,t){this.source=e,this.index=t};z.prototype={fork:function(e){return new z(this.source,e)},parse:function(){var e=this.source,t=this.skip(O,this.index),i=this.fork(t),r=I(e,t);if(A(P,r))return i.number();switch(r){case"{":return i.object();case"[":return i.array();case'"':return i.string();case"t":return i.keyword(!0);case"f":return i.keyword(!1);case"n":return i.keyword(null)}throw new b('Unexpected character: "'+r+'" at: '+t)},node:function(e,t,i,r,n){return new W(t,r,e?null:T(this.source,i,r),n)},object:function(){var e=this.source,t=this.index+1,i=!1,r={},n={};while(t<e.length){if(t=this.until(['"',"}"],t),"}"===I(e,t)&&!i){t++;break}var o=this.fork(t).string(),a=o.value;t=o.end,t=this.until([":"],t)+1,t=this.skip(O,t),o=this.fork(t).parse(),g(n,a,o),g(r,a,o.value),t=this.until([",","}"],o.end);var s=I(e,t);if(","===s)i=!0,t++;else if("}"===s){t++;break}}return this.node(B,r,this.index,t,n)},array:function(){var e=this.source,t=this.index+1,i=!1,r=[],n=[];while(t<e.length){if(t=this.skip(O,t),"]"===I(e,t)&&!i){t++;break}var o=this.fork(t).parse();if(R(n,o),R(r,o.value),t=this.until([",","]"],o.end),","===I(e,t))i=!0,t++;else if("]"===I(e,t)){t++;break}}return this.node(B,r,this.index,t,n)},string:function(){var e=this.index,t=p(this.source,this.index+1);return this.node(M,t.value,e,t.end)},number:function(){var e=this.source,t=this.index,i=t;if("-"===I(e,i)&&i++,"0"===I(e,i))i++;else{if(!A(E,I(e,i)))throw new b("Failed to parse number at: "+i);i=this.skip(D,i+1)}if("."===I(e,i)&&(i=this.skip(D,i+1)),"e"===I(e,i)||"E"===I(e,i)){i++,"+"!==I(e,i)&&"-"!==I(e,i)||i++;var r=i;if(i=this.skip(D,i),r===i)throw new b("Failed to parse number's exponent value at: "+i)}return this.node(M,m(T(e,t,i)),t,i)},keyword:function(e){var t=""+e,i=this.index,r=i+t.length;if(T(this.source,i,r)!==t)throw new b("Failed to parse value at: "+i);return this.node(M,e,i,r)},skip:function(e,t){for(var i=this.source;t<i.length;t++)if(!A(e,I(i,t)))break;return t},until:function(e,t){t=this.skip(O,t);for(var i=I(this.source,t),r=0;r<e.length;r++)if(e[r]===i)return t;throw new b('Unexpected character: "'+i+'" at: '+t)}};var N=y(function(){var e,t="9007199254740993";return k(t,function(t,i,r){e=r.source}),e!==t}),V=w&&!y(function(){return 1/k("-0 \t")!==-1/0});r({target:"JSON",stat:!0,forced:N},{parse:function(e,t){return V&&!h(t)?k(e):H(e,t)}})},9167:function(e,t,i){"use strict";var r=i(4576);e.exports=r},9213:function(e,t,i){"use strict";var r=i(6080),n=i(9504),o=i(7055),a=i(8981),s=i(6198),l=i(1469),h=n([].push),d=function(e){var t=1===e,i=2===e,n=3===e,d=4===e,u=6===e,c=7===e,f=5===e||u;return function(v,g,y,p){for(var w,x,m=a(v),b=o(m),k=s(b),C=r(g,y),S=0,I=p||l,T=t?I(v,k):i||c?I(v,0):void 0;k>S;S++)if((f||S in b)&&(w=b[S],x=C(w,S,m),e))if(t)T[S]=x;else if(x)switch(e){case 3:return!0;case 5:return w;case 6:return S;case 2:h(T,w)}else switch(e){case 4:return!1;case 7:h(T,w)}return u?-1:n||d?d:T}};e.exports={forEach:d(0),map:d(1),filter:d(2),some:d(3),every:d(4),find:d(5),findIndex:d(6),filterReject:d(7)}},9225:function(e,t,i){"use strict";var r,n,o,a,s=i(4576),l=i(8745),h=i(6080),d=i(4901),u=i(9297),c=i(9039),f=i(397),v=i(7680),g=i(4055),y=i(2812),p=i(9544),w=i(8574),x=s.setImmediate,m=s.clearImmediate,b=s.process,k=s.Dispatch,C=s.Function,S=s.MessageChannel,I=s.String,T=0,A={},R="onreadystatechange";c(function(){r=s.location});var D=function(e){if(u(A,e)){var t=A[e];delete A[e],t()}},E=function(e){return function(){D(e)}},P=function(e){D(e.data)},O=function(e){s.postMessage(I(e),r.protocol+"//"+r.host)};x&&m||(x=function(e){y(arguments.length,1);var t=d(e)?e:C(e),i=v(arguments,1);return A[++T]=function(){l(t,void 0,i)},n(T),T},m=function(e){delete A[e]},w?n=function(e){b.nextTick(E(e))}:k&&k.now?n=function(e){k.now(E(e))}:S&&!p?(o=new S,a=o.port2,o.port1.onmessage=P,n=h(a.postMessage,a)):s.addEventListener&&d(s.postMessage)&&!s.importScripts&&r&&"file:"!==r.protocol&&!c(O)?(n=O,s.addEventListener("message",P,!1)):n=R in g("script")?function(e){f.appendChild(g("script"))[R]=function(){f.removeChild(this),D(e)}}:function(e){setTimeout(E(e),0)}),e.exports={set:x,clear:m}},9228:function(e,t,i){"use strict";i(7495);var r=i(9565),n=i(6840),o=i(7323),a=i(9039),s=i(8227),l=i(6699),h=s("species"),d=RegExp.prototype;e.exports=function(e,t,i,u){var c=s(e),f=!a(function(){var t={};return t[c]=function(){return 7},7!==""[e](t)}),v=f&&!a(function(){var t=!1,i=/a/;if("split"===e){var r={};r[h]=function(){return i},i={constructor:r,flags:""},i[c]=/./[c]}return i.exec=function(){return t=!0,null},i[c](""),!t});if(!f||!v||i){var g=/./[c],y=t(c,""[e],function(e,t,i,n,a){var s=t.exec;return s===o||s===d.exec?f&&!a?{done:!0,value:r(g,t,i,n)}:{done:!0,value:r(e,i,t,n)}:{done:!1}});n(String.prototype,e,y[0]),n(d,c,y[1])}u&&l(d[c],"sham",!0)}},9286:function(e,t,i){"use strict";var r=i(4402),n=i(8469),o=r.Set,a=r.add;e.exports=function(e){var t=new o;return n(e,function(e){a(t,e)}),t}},9296:function(e,t,i){"use strict";var r=i(4055),n=r("span").classList,o=n&&n.constructor&&n.constructor.prototype;e.exports=o===Object.prototype?void 0:o},9297:function(e,t,i){"use strict";var r=i(9504),n=i(8981),o=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(n(e),t)}},9306:function(e,t,i){"use strict";var r=i(4901),n=i(6823),o=TypeError;e.exports=function(e){if(r(e))return e;throw new o(n(e)+" is not a function")}},9432:function(e,t,i){"use strict";var r=i(6518),n=i(8981),o=i(1072),a=i(9039),s=a(function(){o(1)});r({target:"Object",stat:!0,forced:s},{keys:function(e){return o(n(e))}})},9433:function(e,t,i){"use strict";var r=i(4576),n=Object.defineProperty;e.exports=function(e,t){try{n(r,e,{value:t,configurable:!0,writable:!0})}catch(i){r[e]=t}return t}},9449:function(e,t,i){"use strict";var r=i(6518),n=i(7476),o=i(7347).f,a=i(8014),s=i(655),l=i(511),h=i(7750),d=i(1436),u=i(6395),c=n("".slice),f=Math.min,v=d("endsWith"),g=!u&&!v&&!!function(){var e=o(String.prototype,"endsWith");return e&&!e.writable}();r({target:"String",proto:!0,forced:!g&&!v},{endsWith:function(e){var t=s(h(this));l(e);var i=arguments.length>1?arguments[1]:void 0,r=t.length,n=void 0===i?r:f(a(i),r),o=s(e);return c(t,n-o.length,n)===o}})},9462:function(e,t,i){"use strict";var r=i(9565),n=i(2360),o=i(6699),a=i(6279),s=i(8227),l=i(1181),h=i(5966),d=i(7657).IteratorPrototype,u=i(2529),c=i(9539),f=i(1385),v=s("toStringTag"),g="IteratorHelper",y="WrapForValidIterator",p="normal",w="throw",x=l.set,m=function(e){var t=l.getterFor(e?y:g);return a(n(d),{next:function(){var i=t(this);if(e)return i.nextHandler();if(i.done)return u(void 0,!0);try{var r=i.nextHandler();return i.returnHandlerResult?r:u(r,i.done)}catch(n){throw i.done=!0,n}},return:function(){var i=t(this),n=i.iterator;if(i.done=!0,e){var o=h(n,"return");return o?r(o,n):u(void 0,!0)}if(i.inner)try{c(i.inner.iterator,p)}catch(a){return c(n,w,a)}if(i.openIters)try{f(i.openIters,p)}catch(a){return c(n,w,a)}return n&&c(n,p),u(void 0,!0)}})},b=m(!0),k=m(!1);o(k,v,"Iterator Helper"),e.exports=function(e,t,i){var r=function(r,n){n?(n.iterator=r.iterator,n.next=r.next):n=r,n.type=t?y:g,n.returnHandlerResult=!!i,n.nextHandler=e,n.counter=0,n.done=!1,x(this,n)};return r.prototype=t?b:k,r}},9463:function(e,t,i){"use strict";var r=i(6518),n=i(3724),o=i(4576),a=i(9504),s=i(9297),l=i(4901),h=i(1625),d=i(655),u=i(2106),c=i(7740),f=o.Symbol,v=f&&f.prototype;if(n&&l(f)&&(!("description"in v)||void 0!==f().description)){var g={},y=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:d(arguments[0]),t=h(v,this)?new f(e):void 0===e?f():f(e);return""===e&&(g[t]=!0),t};c(y,f),y.prototype=v,v.constructor=y;var p="Symbol(description detection)"===String(f("description detection")),w=a(v.valueOf),x=a(v.toString),m=/^Symbol\((.*)\)[^)]+$/,b=a("".replace),k=a("".slice);u(v,"description",{configurable:!0,get:function(){var e=w(this);if(s(g,e))return"";var t=x(e),i=p?k(t,7,-1):b(t,m,"$1");return""===i?void 0:i}}),r({global:!0,constructor:!0,forced:!0},{Symbol:y})}},9504:function(e,t,i){"use strict";var r=i(616),n=Function.prototype,o=n.call,a=r&&n.bind.bind(o,o);e.exports=r?a:function(e){return function(){return o.apply(e,arguments)}}},9519:function(e,t,i){"use strict";var r,n,o=i(4576),a=i(2839),s=o.process,l=o.Deno,h=s&&s.versions||l&&l.version,d=h&&h.v8;d&&(r=d.split("."),n=r[0]>0&&r[0]<4?1:+(r[0]+r[1])),!n&&a&&(r=a.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/),r&&(n=+r[1]))),e.exports=n},9539:function(e,t,i){"use strict";var r=i(9565),n=i(8551),o=i(5966);e.exports=function(e,t,i){var a,s;n(e);try{if(a=o(e,"return"),!a){if("throw"===t)throw i;return i}a=r(a,e)}catch(l){s=!0,a=l}if("throw"===t)throw i;if(s)throw a;return n(a),i}},9544:function(e,t,i){"use strict";var r=i(2839);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},9565:function(e,t,i){"use strict";var r=i(616),n=Function.prototype.call;e.exports=r?n.bind(n):function(){return n.apply(n,arguments)}},9572:function(e,t,i){"use strict";var r=i(9297),n=i(6840),o=i(3640),a=i(8227),s=a("toPrimitive"),l=Date.prototype;r(l,s)||n(l,s,o)},9617:function(e,t,i){"use strict";var r=i(5397),n=i(5610),o=i(6198),a=function(e){return function(t,i,a){var s=r(t),l=o(s);if(0===l)return!e&&-1;var h,d=n(a,l);if(e&&i!==i){while(l>d)if(h=s[d++],h!==h)return!0}else for(;l>d;d++)if((e||d in s)&&s[d]===i)return e||d||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},9773:function(e,t,i){"use strict";var r=i(6518),n=i(4495),o=i(9039),a=i(3717),s=i(8981),l=!n||o(function(){a.f(1)});r({target:"Object",stat:!0,forced:l},{getOwnPropertySymbols:function(e){var t=a.f;return t?t(s(e)):[]}})},9835:function(e){"use strict";e.exports=function(e){try{var t=new Set,i={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}},r=t[e](i);return 1===r.size&&4===r.values().next().value}catch(n){return!1}}},9868:function(e,t,i){"use strict";var r=i(6518),n=i(9504),o=i(1291),a=i(1240),s=i(2333),l=i(9039),h=RangeError,d=String,u=Math.floor,c=n(s),f=n("".slice),v=n(1.1.toFixed),g=function(e,t,i){return 0===t?i:t%2===1?g(e,t-1,i*e):g(e*e,t/2,i)},y=function(e){var t=0,i=e;while(i>=4096)t+=12,i/=4096;while(i>=2)t+=1,i/=2;return t},p=function(e,t,i){var r=-1,n=i;while(++r<6)n+=t*e[r],e[r]=n%1e7,n=u(n/1e7)},w=function(e,t){var i=6,r=0;while(--i>=0)r+=e[i],e[i]=u(r/t),r=r%t*1e7},x=function(e){var t=6,i="";while(--t>=0)if(""!==i||0===t||0!==e[t]){var r=d(e[t]);i=""===i?r:i+c("0",7-r.length)+r}return i},m=l(function(){return"0.000"!==v(8e-5,3)||"1"!==v(.9,0)||"1.25"!==v(1.255,2)||"1000000000000000128"!==v(0xde0b6b3a7640080,0)})||!l(function(){v({})});r({target:"Number",proto:!0,forced:m},{toFixed:function(e){var t,i,r,n,s=a(this),l=o(e),u=[0,0,0,0,0,0],v="",m="0";if(l<0||l>20)throw new h("Incorrect fraction digits");if(s!==s)return"NaN";if(s<=-1e21||s>=1e21)return d(s);if(s<0&&(v="-",s=-s),s>1e-21)if(t=y(s*g(2,69,1))-69,i=t<0?s*g(2,-t,1):s/g(2,t,1),i*=4503599627370496,t=52-t,t>0){p(u,0,i),r=l;while(r>=7)p(u,1e7,0),r-=7;p(u,g(10,r,1),0),r=t-1;while(r>=23)w(u,1<<23),r-=23;w(u,1<<r),p(u,1,1),w(u,2),m=x(u)}else p(u,0,i),p(u,1<<-t,0),m=x(u)+c("0",l);return l>0?(n=m.length,m=v+(n<=l?"0."+c("0",l-n)+m:f(m,0,n-l)+"."+f(m,n-l))):m=v+m,m}})}},t={};function i(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,i),o.exports}!function(){i.d=function(e,t){for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}}(),function(){i.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){i.p=""}();var r={};!function(){"use strict";if(i.r(r),i.d(r,{BooleanViewer:function(){return En},CELL_HEIGHT:function(){return v},CHECK_BOX_WIDTH:function(){return f},CSS_PREFIX:function(){return h},DATE_DISPLAY_TYPE:function(){return l},DEFAULT_GROUP_STYLES:function(){return Ci},DEFAULT_SEPARATOR_STYLES:function(){return Si},DataGrid:function(){return hn},DatetimeViewer:function(){return Rn},EMPTY_VALUE:function(){return A},ERROR_TIP_COLOR:function(){return T},FILE_TYPE_FIELDS:function(){return E},FOOTER_HEIGHT:function(){return u},FileViewer:function(){return Bo},GROUP_TABLE_CONSTANTS:function(){return ki},GroupHeaderViewer:function(){return Bn},HEADER_HEIGHT:function(){return d},HyperlinkTextViewer:function(){return fo},ImageViewer:function(){return kn},MIN_CELL_HEIGHT:function(){return y},MIN_CELL_WIDTH:function(){return g},ModuleViewer:function(){return us},NestedGridViewer:function(){return Wn},PerformanceMonitor:function(){return Jr},PersonViewer:function(){return Sn},ProgressViewer:function(){return Tn},PunchViewer:function(){return eo},READONLY_COLOR:function(){return S},READONLY_TEXT_COLOR:function(){return I},ROW_INDEX_WIDTH:function(){return c},SCROLLER_COLOR:function(){return x},SCROLLER_FOCUS_COLOR:function(){return m},SCROLLER_SIZE:function(){return w},SCROLLER_TRACK_SIZE:function(){return p},SELECT_AREA_COLOR:function(){return k},SELECT_BG_COLOR:function(){return C},SELECT_BORDER_COLOR:function(){return b},SIZE_MAP:function(){return R},SelectViewer:function(){return mn},SeparatorRowViewer:function(){return Fn},StatusViewer:function(){return On},TableActionButtonViewer:function(){return xl},TaskNodeViewer:function(){return na},TextViewer:function(){return wn},TextViewerWithSwitcher:function(){return Rs},UpstreamViewer:function(){return Qs},VALIDATOR_TYPES:function(){return D},ViewerRegistry:function(){return hi},calCrossSpan:function(){return dt},defaultViewers:function(){return Kl},getFieldStatisticTypes:function(){return Gi},getIcon:function(){return ut},getIconByFileStatus:function(){return ct},getMaxRow:function(){return ht},getPerformanceMonitor:function(){return Zr},getViewerRegistry:function(){return li},isGroupRow:function(){return xi},isNestedGridViewerData:function(){return vn},isNormalRow:function(){return bi},isPersonViewerData:function(){return cn},isProgressViewerData:function(){return fn},isSelectViewerData:function(){return un},isSeparateRow:function(){return mi},isTextViewerData:function(){return dn},registerDefaultViewers:function(){return ql},toLeaf:function(){return lt}}),"undefined"!==typeof window){var e=window.document.currentScript,t=i(5003);e=t(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:t});var n=e&&e.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);n&&(i.p=n[1])}var o=require("vue"),a=["id"];function s(e,t,i,r,n,s){var l=(0,o.resolveDirective)("loading"),h=(0,o.resolveDirective)("clickoutside");return(0,o.withDirectives)(((0,o.openBlock)(),(0,o.createElementBlock)("div",{class:(0,o.normalizeClass)(e.CSS_PREFIX)},[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)("".concat(e.CSS_PREFIX,"-main"))},[(0,o.createElementVNode)("canvas",{id:e.canvasId,class:(0,o.normalizeClass)("".concat(e.CSS_PREFIX,"-table"))},null,10,a),(0,o.withDirectives)((0,o.createElementVNode)("div",{class:(0,o.normalizeClass)("".concat(e.CSS_PREFIX,"-overlayer")),style:(0,o.normalizeStyle)({top:"".concat(e.tableHeaderHeight+1,"px")})},null,6),[[l,e.loading]])],2)],2)),[[h,e.handleclickoutside]])}i(8706),i(4423),i(4782),i(2892),i(6099),i(8781),i(1699);var l,h="xs-data-grid",d=36,u=36,c=36,f=36,v=36,g=100,y=36,p=16,w=8,x="#dee0e3",m="#bbbec4",b="rgb(82,146,247)",k="rgba(82,146,247,0.1)",C="rgba(82,146,247,0.1)",S="#f8f8f9",I="#80848f",T="#ED3F14",A="-";(function(e){e["RELATIVE"]="relative_date",e["ABSOLUTE"]="absolute_date"})(l||(l={}));var R={mini:100,small:140,medium:200,large:300},D=["month","date","datetime","number","phone","email","select"],E={AssetConvertStatusNotSupport:-3,AssetConvertStatusUnknown:-2,AssetConvertStatusFailed:-1,AssetConvertStatusSuccess:0,AssetConvertStatusSubmit:1};i(2675),i(9463),i(2259),i(3792),i(7764),i(2953);function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}i(5700),i(6280),i(9572);function O(e,t){if("object"!=P(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=P(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function M(e){var t=O(e,"string");return"symbol"==P(t)?t:t+""}function B(e,t,i){return(t=M(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i(2008),i(4114),i(8111),i(2489),i(7588),i(3851),i(1278),i(9432),i(3500);function H(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,r)}return i}function F(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?H(Object(i),!0).forEach(function(t){B(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):H(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}i(2062),i(6910),i(1701);var L=i.p+"img/icon_default.9ef1a394.svg",W=i.p+"img/img_3d.39b27128.svg",z=i.p+"img/img_aep.a898e3e7.svg",N=i.p+"img/img_ai.61f08a0a.svg",V=i.p+"img/img_audio.e4ada65c.svg",_=i.p+"img/img_enf.ad88f95d.svg",j=i.p+"img/img_excel.56663d85.svg",Y=i.p+"img/img_exe.5e3fc198.svg",G=i.p+"img/img_img.ac2e0d0c.svg",X=i.p+"img/img_mcp.393ef169.svg",U=i.p+"img/img_pdf.f4da9922.svg",q=i.p+"img/img_ppt.d172780f.svg",K=i.p+"img/img_pxcook.7e9fce57.svg",J=i.p+"img/img_rarzip7z.e3b1de82.svg",Q=i.p+"img/img_sketch.d49a9bd4.svg",Z=i.p+"img/img_video.b6ac6198.svg",$=i.p+"img/img_word.0c1d3c88.svg",ee=i.p+"img/img_x2d.6acc94f6.svg",te=i.p+"img/img_xd.cc23d09a.svg",ie=i.p+"img/icon_error_dark.2a057cdd.svg",re=i.p+"img/icon_error_light.ac6763e9.svg",ne=i.p+"img/icon_failure_dark.f68723a7.svg",oe=i.p+"img/icon_failure_light.489a7167.svg",ae=i.p+"img/icon_transform_dark.033764ea.svg",se=i.p+"img/icon_transform_light.fa9fbcbd.svg";function le(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=Array(t);i<t;i++)r[i]=e[i];return r}function he(e){if(Array.isArray(e))return le(e)}i(3418);function de(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}i(2010),i(7495),i(906);function ue(e,t){if(e){if("string"==typeof e)return le(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?le(e,t):void 0}}function ce(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function fe(e){return he(e)||de(e)||ue(e)||ce()}var ve=["mb","fbx","max","lxf","lxfml","vmd","pmd","pmx","obj","mmd","maya","3ds","bvh"],ge=["jpg","jpeg","psd","psb","tga","png","dds","tif","bmp","gif","swf"],ye=["mp4","avi","wmv","mov","flv"],pe=["rar","zip","7z","tar","gz"],we=["modelset"],xe=["imageset"],me=["versionset"],be=["mgm","html"],ke=["docx","docm","doc","odt","txt","rtf","html","epub"],Ce=["xlsx","xlsm","xls","ods","csv"],Se=["pptx","pptm","ppt","odp"],Ie=[].concat(ke,Ce,Se),Te=["pdf","svg"],Ae=["exe"],Re=["pdf"],De=["wav","mp3","wma","ogg","aac","ape","flac","m4a"],Ee=["aep","ars","aet","amx","aex","aetx","aepx"],Pe=["ai","ait","draw","idea","line"],Oe=["enf"],Me=["mcp"],Be=["x2d"],He=["xd"],Fe=["sketch","sket"],Le=["pxcp"],We="model",ze="models",Ne="image",Ve="images",_e="video",je="zipped",Ye="na",Ge="misc",Xe="iframeOffice",Ue="iframe",qe="versionset",Ke="exe",Je="audio",Qe="pdf",Ze="sketch",$e="pxcook",et="aep",tt="ai",it="enf",rt="mcp",nt="x2d",ot="xd";function at(e){if(!e||"string"!==typeof e)return Ye;var t=e.toLowerCase();return ve.indexOf(t)>=0?We:ge.indexOf(t)>=0?Ne:ye.indexOf(t)>=0?_e:pe.indexOf(t)>=0?je:we.indexOf(t)>=0?ze:xe.indexOf(t)>=0?Ve:be.indexOf(t)>=0?Ge:me.indexOf(t)>=0?qe:Ie.indexOf(t)>=0?Xe:Te.indexOf(t)>=0?Ue:Ae.indexOf(t)>=0?Ke:De.indexOf(t)>=0?Je:Re.indexOf(t)>=0?Qe:He.indexOf(t)>=0?ot:Ee.indexOf(t)>=0?et:Pe.indexOf(t)>=0?tt:Oe.indexOf(t)>=0?it:Me.indexOf(t)>=0?rt:Be.indexOf(t)>=0?nt:Fe.indexOf(t)>=0?Ze:Le.indexOf(t)>=0?$e:Ye}var st=["png","jpg","jpeg","bmp","gif","tiff","tif","webp","svg"],lt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];return e.forEach(function(e){e.children?t=t.concat(lt(e.children)):("nested"===e.type&&e.nestedColumns&&e.nestedColumns.length,t.push(e))}),t},ht=function(e){return e?e.map(function(e){return ht(e.children)+1}).sort(function(e,t){return t-e})[0]:0},dt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return void 0===t&&(t=ht(e)),e?e.map(function(e){if(e.children){var r=0,n=dt(e.children,t-1,i+1);return n.forEach(function(e){r+=e.colspan}),F(F({level:i,rowspan:1,colspan:r},e),{},{children:n})}return F({level:i,rowspan:t,colspan:1},e)}):[]};function ut(e){var t=at(e);switch(t){case"iframeOffice":return"docx"===e||"doc"===e?$:"xlsx"===e||"xls"===e||"csv"===e?j:"pptx"===e||"ppt"===e?q:L;case"iframe":return"pdf"===e?U:"svg"===e?G:L;case"exe":return Y;case"pdf":return U;case"zipped":return J;case"sketch":return Q;case"audio":return V;case"video":return Z;case"image":return G;case"model":return W;case"aep":return z;case"ai":return N;case"enf":return _;case"mcp":return X;case"x2d":return ee;case"xd":return te;case"pxcook":return K;default:return L}}function ct(e,t){if(t&&!st.includes(t.toLowerCase()))return ut(t);var i=document.documentElement.getAttribute("data-theme")||"dark";if("number"!==typeof e)return"light"===i?re:ie;var r={light:B(B(B({},E.AssetConvertStatusFailed,oe),E.AssetConvertStatusSubmit,se),"default",re),dark:B(B(B({},E.AssetConvertStatusFailed,ne),E.AssetConvertStatusSubmit,ae),"default",ie)},n=r[i]||r.dark;return n[e]||n.default}function ft(e){if(Array.isArray(e))return e}function vt(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var r,n,o,a,s=[],l=!0,h=!1;try{if(o=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(r=o.call(i)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){h=!0,n=e}finally{try{if(!l&&null!=i["return"]&&(a=i["return"](),Object(a)!==a))return}finally{if(h)throw n}}return s}}function gt(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function yt(e,t){return ft(e)||vt(e,t)||ue(e,t)||gt()}function pt(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=ue(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==i["return"]||i["return"]()}finally{if(s)throw o}}}}function wt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xt(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,M(r.key),r)}}function mt(e,t,i){return t&&xt(e.prototype,t),i&&xt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}i(113),i(8980),i(4554),i(1148),i(116),i(8237),i(3579),i(3110),i(6033),i(9085),i(8347),i(1415),i(7642),i(8004),i(3853),i(5876),i(2475),i(5024),i(1698),i(9449),i(2762),i(4298),i(8335);function bt(e){return ft(e)||de(e)||ue(e)||gt()}var kt=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";wt(this,e),B(this,"el",void 0),B(this,"dataMap",void 0),"string"===typeof t?(this.el=document.createElement(t),this.el.className=i):this.el=t,this.dataMap={}}return mt(e,[{key:"data",value:function(e,t){return void 0!==t?(this.dataMap[e]=t,this):this.dataMap[e]}},{key:"on",value:function(e,t){var i=e.split("."),r=bt(i),n=r[0],o=le(r).slice(1),a=n;return"mousewheel"===a&&/Firefox/i.test(window.navigator.userAgent)&&(a="DOMMouseScroll"),this.el.addEventListener(a,function(e){t(e);for(var i=0;i<o.length;i+=1){var r=o[i];if("left"===r&&0!==e.button)return;if("right"===r&&2!==e.button)return;"stop"===r&&e.stopPropagation()}}),this}},{key:"offset",value:function(e){var t=this;if(void 0!==e)return Object.keys(e).forEach(function(i){t.css(i,"".concat(e[i],"px"))}),this;var i=this.el,r=i.offsetTop,n=i.offsetLeft,o=i.offsetHeight,a=i.offsetWidth;return{top:r,left:n,height:o,width:a}}},{key:"scroll",value:function(e){var t=this.el;return void 0!==e&&(void 0!==e.left&&(t.scrollLeft=e.left),void 0!==e.top&&(t.scrollTop=e.top)),{left:t.scrollLeft,top:t.scrollTop}}},{key:"box",value:function(){return this.el.getBoundingClientRect()}},{key:"parent",value:function(){return new e(this.el.parentNode)}},{key:"children",value:function(){for(var e=this,t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return 0===arguments.length?this.el.childNodes:(i.forEach(function(t){return e.child(t)}),this)}},{key:"removeChild",value:function(e){this.el.removeChild(e)}},{key:"child",value:function(t){var i=t;return"string"===typeof t?i=document.createTextNode(t):t instanceof e&&(i=t.el),this.el.appendChild(i),this}},{key:"contains",value:function(e){return this.el.contains(e)}},{key:"className",value:function(e){return void 0!==e?(this.el.className=e,this):this.el.className}},{key:"addClass",value:function(e){return this.el.classList.add(e),this}},{key:"hasClass",value:function(e){return this.el.classList.contains(e)}},{key:"removeClass",value:function(e){return this.el.classList.remove(e),this}},{key:"toggle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"active";return this.toggleClass(e)}},{key:"toggleClass",value:function(e){return this.el.classList.toggle(e)}},{key:"active",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"active";return e?this.addClass(t):this.removeClass(t),this}},{key:"checked",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.active(e,"checked"),this}},{key:"disabled",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return e?this.addClass("disabled"):this.removeClass("disabled"),this}},{key:"attr",value:function(e,t){var i=this;if(void 0!==t)this.el.setAttribute(e,t);else{if("string"===typeof e)return this.el.getAttribute(e);Object.keys(e).forEach(function(t){i.el.setAttribute(t,e[t])})}return this}},{key:"removeAttr",value:function(e){return this.el.removeAttribute(e),this}},{key:"html",value:function(e){return void 0!==e?(this.el.innerHTML=e,this):this.el.innerHTML}},{key:"val",value:function(e){return void 0!==e?(this.el.value=e,this):this.el.value}},{key:"focus",value:function(){if(window.getSelection){this.el.focus();var e=window.getSelection();if(e)try{e.selectAllChildren(this.el),e.collapseToEnd()}catch(i){}}else if(document.selection){var t=document.selection.createRange();t.moveToElementText(this.el),t.collapse(!1),t.select()}}},{key:"cssRemoveKeys",value:function(){for(var e=this,t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return i.forEach(function(t){return e.el.style.removeProperty(t)}),this}},{key:"css",value:function(e,t){var i=this;return void 0===t&&"string"!==typeof e?(Object.keys(e).forEach(function(t){i.el.style[t]=e[t]}),this):void 0!==t?(this.el.style[e]=t,this):this.el.style[e]}},{key:"computedStyle",value:function(){return window.getComputedStyle(this.el,null)}},{key:"show",value:function(){return this.css("display","block"),this}},{key:"hide",value:function(){return this.css("display","none"),this}}])}(),Ct=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new kt(e,t)},St=(i(3771),i(5440),i(8126),{left:"right",right:"left"});function It(e,t,i,r){var n=t/2,o=this.ctx.measureText(String(e)).width;return o>t-2*i||"left"===r?n=o/2+i:"right"===r&&(n=t-o/2-i),n}var Tt=function(){function e(t){wt(this,e),B(this,"ctx",void 0),this.ctx=t.getContext("2d")}return mt(e,[{key:"scaleCanvas",value:function(e){this.ctx.scale(e,e)}},{key:"drawLine",value:function(e,t){if(e[0]){t=Object.assign({lineCap:"square",lineJoin:"miter",borderWidth:1,borderColor:void 0,fillColor:void 0},t),this.ctx.save(),this.ctx.beginPath(),this.ctx.moveTo(e[0][0]+.5,e[0][1]+.5);for(var i=1;i<e.length;i++)this.ctx.lineTo(e[i][0]+.5,e[i][1]+.5);this.ctx.lineWidth=t.borderWidth,this.ctx.lineCap=t.lineCap,this.ctx.lineJoin=t.lineJoin,t.lineDash&&(this.ctx.lineDashOffset=4,this.ctx.setLineDash(t.lineDash)),t.fillColor&&(this.ctx.fillStyle=t.fillColor,this.ctx.fill()),t.borderColor&&(this.ctx.strokeStyle=t.borderColor,this.ctx.stroke()),this.ctx.restore()}}},{key:"drawText",value:function(e,t,i,r){r=Object.assign({font:'normal 12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',color:"#495060",align:"center",baseLine:"middle"},r),this.ctx.font=r.font,this.ctx.fillStyle=r.color,this.ctx.textAlign=St[r.align]||r.align,this.ctx.textBaseline=r.baseLine,this.ctx.fillText(String(e),t,i)}},{key:"drawCellText",value:function(e,t,i,r,n,o,a){a=Object.assign({font:'normal 12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',color:"#495060",align:"left",baseLine:"middle",bold:!1,icon:null,iconWidth:14,iconHeight:14,iconOffsetX:0,iconOffsetY:0},a),a.bold&&(a.font=a.font.replace("normal","bold")),this.ctx.font=a.font,this.ctx.fillStyle=a.color,this.ctx.textAlign="center",this.ctx.textBaseline=a.baseLine;var s=t,l="middle"===a.baseLine?i+n/2:i,h=It.call(this,e,r,o,a.align);a.icon&&"object"===P(a.icon)&&a.icon.src&&(this.drawImage(a.icon,t+a.iconOffsetX,l-a.iconOffsetY-a.iconHeight/2,a.iconWidth,a.iconHeight),"left"===a.align&&(s+=2*a.iconWidth)),this.ctx.fillText(String(e),s+h,l),this.ctx.restore()}},{key:"drawCellAffixIcon",value:function(e,t,i,r,n,o){o=Object.assign({color:"#bbbec4",fillColor:"#fff"},o);var a=25;if(this.drawRect(t+r-a,i+1,a,n,{fillColor:o.fillColor}),"arrow"===e){var s=[[t+r-20,i+n/2-2],[t+r-15,i+n/2+3],[t+r-10,i+n/2-2]];this.drawLine(s,{borderColor:o.color,borderWidth:1})}}},{key:"drawIcon",value:function(e,t,i,r,n,o,a,s,l){l=Object.assign({font:'normal 12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',color:"#495060",align:"center",baseLine:"middle"},l);var h=this.ctx.measureText(String(t)).width,d=It.call(this,t,n,o,l.align);this.ctx.font=l.font,this.ctx.fillStyle=l.color,this.ctx.textAlign="center",this.ctx.textBaseline=l.baseLine,this.ctx.fillText(e,i+d-h/2-a,r+s),this.ctx.restore()}},{key:"drawRect",value:function(e,t,i,r,n){n=Object.assign({borderWidth:1,borderColor:void 0,fillColor:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,shadowBlur:0,shadowColor:void 0},n),this.ctx.save(),this.ctx.beginPath(),n.shadowOffsetX&&(this.ctx.shadowOffsetX=n.shadowOffsetX),n.shadowOffsetY&&(this.ctx.shadowOffsetY=n.shadowOffsetY),n.shadowBlur&&(this.ctx.shadowBlur=n.shadowBlur),n.shadowColor&&(this.ctx.shadowColor=n.shadowColor),n.fillColor&&(this.ctx.fillStyle=n.fillColor),n.borderColor&&(this.ctx.lineWidth=n.borderWidth,this.ctx.strokeStyle=n.borderColor),this.ctx.rect(e+.5,t+.5,i,r),n.fillColor&&this.ctx.fill(),n.borderColor&&this.ctx.stroke(),this.ctx.restore()}},{key:"drawRoundRect",value:function(e,t,i,r,n,o){o=Object.assign({borderWidth:1,borderColor:void 0,fillColor:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,shadowBlur:0,shadowColor:void 0},o),this.ctx.save(),this.ctx.beginPath(),o.shadowOffsetX&&(this.ctx.shadowOffsetX=o.shadowOffsetX),o.shadowOffsetY&&(this.ctx.shadowOffsetY=o.shadowOffsetY),o.shadowBlur&&(this.ctx.shadowBlur=o.shadowBlur),o.shadowColor&&(this.ctx.shadowColor=o.shadowColor),o.fillColor&&(this.ctx.fillStyle=o.fillColor),o.borderColor&&(this.ctx.lineWidth=o.borderWidth,this.ctx.strokeStyle=o.borderColor),this.ctx.moveTo(e+n,t),this.ctx.arcTo(e+i,t,e+i,t+n,n),this.ctx.arcTo(e+i,t+r,e+i-n,t+r,n),this.ctx.arcTo(e,t+r,e,t+r-n,n),this.ctx.arcTo(e,t,e+n,t,n),o.fillColor&&this.ctx.fill(),o.borderColor&&this.ctx.stroke(),this.ctx.restore()}},{key:"drawImage",value:function(e,t,i,r,n){this.ctx.drawImage(e,t,i,r,n)}},{key:"clearCanvas",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;this.ctx.clearRect(e,t,i||this.ctx.canvas.width,r||this.ctx.canvas.height)}},{key:"getTextWrapping",value:function(e,t,i){if(!e&&0!==e)return[""];this.ctx.font='normal 12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif';for(var r="".concat(e).split(""),n=r[0],o=[],a=1;a<r.length;a++)this.ctx.measureText(n).width>=t-2*i&&(o.push(n),n=""),n+=r[a];return o.push(n),o}},{key:"measureText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12;this.ctx.save(),this.ctx.font="normal ".concat(t,'px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif');var i=this.ctx.measureText(e).width;return this.ctx.restore(),i}}])}(),At=Tt;i(8598),i(825),i(875),i(3548),i(287);function Rt(e){return Rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rt(e)}function Dt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Dt=function(){return!!e})()}function Et(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pt(e,t){if(t&&("object"==P(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Et(e)}function Ot(e,t,i){return t=Rt(t),Pt(e,Dt()?Reflect.construct(t,i||[],Rt(e).constructor):t.apply(e,i))}function Mt(e,t){return Mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Mt(e,t)}function Bt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mt(e,t)}var Ht=function(){function e(t,i,r,n,o,a){wt(this,e),B(this,"grid",void 0),B(this,"x",void 0),B(this,"y",void 0),B(this,"width",void 0),B(this,"height",void 0),B(this,"fixed",void 0),this.grid=t,this.x=i,this.y=r,this.width=n||null,this.height=o||0,this.fixed=a}return mt(e,[{key:"isHorizontalVisibleOnBody",value:function(){return!(this.x+(this.width||0)-this.grid.fixedLeftWidth+this.grid.scrollX<=0||this.x+this.grid.scrollX>=this.grid.width-this.grid.fixedRightWidth)}},{key:"isVerticalVisibleOnBody",value:function(){return!(this.y+this.height-this.grid.tableHeaderHeight+this.grid.scrollY<=0||this.y+this.grid.scrollY>=this.grid.height-this.grid.horizontalScrollerSize-this.grid.footerHeight)}},{key:"isInsideHorizontalBodyBoundary",value:function(e,t){return e>this.x+this.grid.scrollX&&e<this.x+this.grid.scrollX+(this.width||0)&&e>this.grid.fixedLeftWidth&&e<this.grid.width-this.grid.fixedRightWidth}},{key:"isInsideHorizontalTableBoundary",value:function(e,t){return e>this.x+this.grid.scrollX&&e<this.x+this.grid.scrollX+(this.width||0)&&e>this.grid.fixedLeftWidth}},{key:"isInsideFixedHorizontalBodyBoundary",value:function(e,t){var i=this.grid.width-(this.grid.tableWidth-this.x-(this.width||0))-(this.width||0)-this.grid.verticalScrollerSize;return e>=i&&e<i+(this.width||0)&&"right"===this.fixed||e>this.x&&e<this.x+(this.width||0)&&"left"===this.fixed}},{key:"isInsideVerticaBodyBoundary",value:function(e,t){return t>this.y+this.grid.scrollY&&t<this.y+this.height+this.grid.scrollY&&t>this.grid.tableHeaderHeight&&t<this.grid.height-this.grid.horizontalScrollerSize-this.grid.footerHeight}},{key:"isInsideVerticaTableBoundary",value:function(e,t){return t>this.y+this.grid.scrollY&&t<this.y+this.height+this.grid.scrollY&&t>this.grid.tableHeaderHeight}},{key:"isInsideAffixIcon",value:function(e,t){return e>this.x+(this.width||0)+this.grid.scrollX-25&&e<this.x+(this.width||0)+this.grid.scrollX&&t>this.y+this.grid.scrollY+10&&t<this.y+this.height+this.grid.scrollY-10}},{key:"isInsideEditIcon",value:function(e,t){var i=14,r=8,n=5,o=this.x+(this.width||0)+this.grid.scrollX-i-r,a=this.y+this.grid.scrollY+(this.height-i)/2;return e>o-n&&e<o+i+n&&t>a-n&&t<a+i+n}},{key:"isInsideHeader",value:function(e,t){return t>this.y&&t<this.y+this.grid.tableHeaderHeight}},{key:"isInsideCheckboxBoundary",value:function(e,t){return e>this.x+c&&e<this.x+this.grid.originFixedWidth}},{key:"isInsideHeaderCheckboxBoundary",value:function(e,t){return this.isInsideHeader(e,t)&&e>=this.x&&e<this.x+this.grid.originFixedWidth}},{key:"isInsideIndexBoundary",value:function(e,t){return e>this.x&&e<this.x+c}}])}(),Ft=Ht,Lt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAB7klEQVRoQ+2ZQVLCMBSG/+foiszoDYQTyA1ELqLcANdlwULWjiegXqRwBU8gnEAc6gqG50TpDNQEG/pagpYlTZPve38mTRvCkf/oyPlRCRw6wSoBrxNo9fni5CweMqNFRBdlwjIwIWC8WtTux32a2ca2TiENT6fxa9ngaVBmnvFSNWwSVoGbhzgkwm2ZVbeNxYznUU/dma7vEJi/Hbr6CbCeTqNANZwE2oOYfah+whAFylhsawKVgHB83ifAjBcCQhAeTe5eC2h4XtZaeqm0rX7eCmzCJ5U3SXgpYILXEu1BPASwte57J+ACr6W8EnCF90pgH3hvBPaFFxXQGysATSJcuTyr8sCLCSS7wu+t9sc4q0ReeBGB9JY2q4QEvIgAgDAKVGdz2vwmIQUvJaD7ySwhCS8poPt6igLV3ZWENLy0gO6vEwUqNEno/5KN2eZ10/bAZRUr4klslNBQ6RfwvPBFJJAU74dEuqoS8EUKGKdTIiEFX7SAUUISvgyBLQlp+LIEviQAXKdfRlxWG1vbIlYhCa7MfVQCmUtVUMP/mMB8BtB5QQV165YxjXqqbrrp735eX5/OTA6fAr+vFqrufMCh41qf0oQEaoJw6ZZ7ztaMKQNjXta6ex0x5Ry+tNurY9bSSm0ZqEqgSiBnBT4BkfqPQMORwUwAAAAASUVORK5CYII=",Wt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABXUlEQVRoQ+2ZwVEDMQxFJTdACYQOQgWkA9KFvSeSTrh51QVUACVsCUkHoQGL2SMzMfMVYrOZUc5//PXft3JYM934j298fvIA/92gN7DoBkRkq6ovzLzpPaiqHph5KqXsh2E41PyrVyjnvAkhfPQe/IzfqZTyWAtRDSAin0T0tIAApKrvKaXtuVl+C6BLGH6eYb5OKaWHPwWIMXb9xxKRHwBr/nADHsB4H70BlIARLCxH/X0HYKRGoTeAEjCCheWov+8AjNQo9AZQAkawsBz19x2AkRqF3gBKwAgWlqP+vgMwUqPQG0AJGMHCctTfdwBGahR6AygBI1hYjvr7DsBIjUJvQERORHRnBNdKfowxrkwfd8dxfGPm51YTWc696PN6znkVQpgW0MJXKWVtfuCYCc0hmPmVmddEdG+hdgXtUVUnVd1d9MR0hQG6HNH10aJFIg/QgqrlTG/AQquF9huB5SxAQNMDWAAAAABJRU5ErkJggg==",zt=new Image,Nt=new Image;zt.src=Lt,Nt.src=Wt;var Vt=function(e){function t(e,i,r,n,o,a,s){var l;return wt(this,t),l=Ot(this,t,[e,r,n,o,a]),B(l,"rowIndex",void 0),B(l,"text",void 0),B(l,"checked",void 0),B(l,"borderColor",void 0),B(l,"fillColor",void 0),B(l,"borderWidth",void 0),B(l,"color",void 0),l.rowIndex=i,l.text=i+1,l.checked=!1,s&&Object.assign(l,s),l}return Bt(t,e),mt(t,[{key:"handleCheck",value:function(e){this.checked=e}},{key:"draw",value:function(){var e=this.y+this.grid.scrollY,t=(this.width||0)+(this.grid.showCheckbox?f:0);if(this.grid.painter.drawRect(this.x,e,t,this.height,{fillColor:this.fillColor,borderColor:this.borderColor,borderWidth:this.borderWidth}),this.grid.showCheckbox){var i=this.checked?zt:Nt,r=20,n=this.x+8,o=e+(this.height-r)/2;this.grid.painter.drawImage(i,n,o,r,r);var a=this.x+28,s=t-28;this.grid.painter.drawCellText(this.text,a,e,s,this.height,10,{color:this.color,align:"center"})}else this.grid.painter.drawCellText(this.text,this.x,e,this.width||0,this.height,10,{color:this.color,align:"center"})}}])}(Ft),_t=Vt;function jt(e,t,i,r){var n=Object.defineProperty;try{n({},"",{})}catch(e){n=0}jt=function(e,t,i,r){function o(t,i){jt(e,t,function(e){return this._invoke(t,i,e)})}t?n?n(e,t,{value:i,enumerable:!r,configurable:!r,writable:!r}):e[t]=i:(o("next",0),o("throw",1),o("return",2))},jt(e,t,i,r)}function Yt(){var e,t,i="function"==typeof Symbol?Symbol:{},r=i.iterator||"@@iterator",n=i.toStringTag||"@@toStringTag";function o(i,r,n,o){var l=r&&r.prototype instanceof s?r:s,h=Object.create(l.prototype);return jt(h,"_invoke",function(i,r,n){var o,s,l,h=0,d=n||[],u=!1,c={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,i){return o=t,s=0,l=e,c.n=i,a}};function f(i,r){for(s=i,l=r,t=0;!u&&h&&!n&&t<d.length;t++){var n,o=d[t],f=c.p,v=o[2];i>3?(n=v===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=f&&((n=i<2&&f<o[1])?(s=0,c.v=r,c.n=o[1]):f<v&&(n=i<3||o[0]>r||r>v)&&(o[4]=i,o[5]=r,c.n=v,s=0))}if(n||i>1)return a;throw u=!0,r}return function(n,d,v){if(h>1)throw TypeError("Generator is already running");for(u&&1===d&&f(d,v),s=d,l=v;(t=s<2?e:l)||!u;){o||(s?s<3?(s>1&&(c.n=-1),f(s,l)):c.n=l:c.v=l);try{if(h=2,o){if(s||(n="next"),t=o[n]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o["return"])&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+n+"' method"),s=1);o=e}else if((t=(u=c.n<0)?l:i.call(r,c))!==a)break}catch(t){o=e,s=1,l=t}finally{h=1}}return{value:t,done:u}}}(i,n,o),!0),h}var a={};function s(){}function l(){}function h(){}t=Object.getPrototypeOf;var d=[][r]?t(t([][r]())):(jt(t={},r,function(){return this}),t),u=h.prototype=s.prototype=Object.create(d);function c(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,jt(e,n,"GeneratorFunction")),e.prototype=Object.create(u),e}return l.prototype=h,jt(u,"constructor",h),jt(h,"constructor",l),l.displayName="GeneratorFunction",jt(h,n,"GeneratorFunction"),jt(u),jt(u,n,"Generator"),jt(u,r,function(){return this}),jt(u,"toString",function(){return"[object Generator]"}),(Yt=function(){return{w:o,m:c}})()}i(3362);function Gt(e,t,i,r,n,o,a){try{var s=e[o](a),l=s.value}catch(e){return void i(e)}s.done?t(l):Promise.resolve(l).then(r,n)}function Xt(e){return function(){var t=this,i=arguments;return new Promise(function(r,n){var o=e.apply(t,i);function a(e){Gt(o,r,n,a,s,"next",e)}function s(e){Gt(o,r,n,a,s,"throw",e)}a(void 0)})}}function Ut(e,t){if(null==e)return{};var i={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;i[r]=e[r]}return i}function qt(e,t){if(null==e)return{};var i,r,n=Ut(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)i=o[r],-1===t.indexOf(i)&&{}.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}i(4864),i(7465),i(7745);var Kt={number:/^(-?\d{1,11}(\.\d*)?)$/,phone:/^[1-9]\d{10}$/,email:/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/};function Jt(e){var t=this.columnType,i=this.type;return"date"===t||"datetime"===t||"month"===t?new Date(e):"number"===i?Number(e):e}function Qt(e,t){if(this.message)return{flag:e,message:this.message};var i="";if(!e)switch(t){case"required":i="".concat(this.validateTitle,"字段必填哦!");break;case"notMatch":i="".concat(this.validateTitle,"字段不符合预期格式哦!");break;case"notIn":i="".concat(this.validateTitle,"字段是无效值哦!");break;default:i="".concat(this.validateTitle,"字段是无效值哦!")}return{flag:e,message:i}}var Zt=function(){function e(t){wt(this,e),B(this,"validateKey",void 0),B(this,"validateTitle",void 0),B(this,"columnType",void 0),B(this,"type",void 0),B(this,"options",void 0),B(this,"required",void 0),B(this,"validator",void 0),B(this,"operator",void 0),B(this,"message",void 0),B(this,"descriptor",void 0),B(this,"pattern",void 0),B(this,"min",void 0),B(this,"max",void 0),B(this,"immediate",void 0),this.validateKey=t.key,this.validateTitle=t.title,this.columnType=t.type,this.options=t.options,Object.assign(this,t.rule)}return mt(e,[{key:"validate",value:function(){var e=Xt(Yt().m(function e(t,i){var r,n,o,a,s,l,h,d,u,c,f=this;return Yt().w(function(e){while(1)switch(e.n){case 0:if(r=this.required,n=this.validator,o=this.options,a=this.type,s=Jt.call(this,t),l="string"===typeof s?!!s.trim():!!s||0===s,!r||l){e.n=1;break}return e.a(2,Qt.call(this,!1,"required"));case 1:if(l){e.n=2;break}return e.a(2,{flag:!0});case 2:if(!Kt[a]||Kt[a].test(s)){e.n=3;break}return e.a(2,Qt.call(this,!1,"notMatch"));case 3:if("select"!==this.columnType){e.n=4;break}if(h=(o||[]).map(function(e){return e.value}).includes(s),h){e.n=4;break}return e.a(2,Qt.call(this,h,"notMatch"));case 4:if("month"!==this.columnType&&"date"!==this.columnType&&"datetime"!==this.columnType){e.n=5;break}if(d=s instanceof Date&&!isNaN(s.getTime()),d){e.n=5;break}return e.a(2,Qt.call(this,d,"notMatch"));case 5:if(!(n instanceof RegExp)){e.n=6;break}return u=new RegExp(n),e.a(2,Qt.call(this,u.test(s),"notIn"));case 6:if("function"!==typeof n){e.n=8;break}return c=!0,e.n=7,n(s,i,function(e){"string"===typeof e?(f.message=e,c=!e):!1===e&&(c=!1)});case 7:return e.a(2,Qt.call(this,c,"notIn"));case 8:return e.a(2,{flag:!0})}},e,this)}));function t(t,i){return e.apply(this,arguments)}return t}()}])}(),$t=Zt,ei=i(2393),ti=function(){function e(){var t=this;wt(this,e),B(this,"gifs",new Map),B(this,"animationFrameId",null),B(this,"isAnimating",!1),B(this,"enabled",!0),B(this,"animate",function(){if(!t.enabled)return t.isAnimating=!1,void(t.animationFrameId=null);var e=Date.now();t.gifs.forEach(function(i,r){var n=i.parsedGif.frames[i.currentFrameIndex],o=n.delay||100;e-i.lastFrameTime>=o&&(i.currentFrameIndex=(i.currentFrameIndex+1)%i.parsedGif.frames.length,i.lastFrameTime=e,t.renderFrame(r,i.currentFrameIndex))}),t.gifs.size>0?t.animationFrameId=requestAnimationFrame(t.animate):(t.isAnimating=!1,t.animationFrameId=null)})}return mt(e,[{key:"loadGif",value:function(){var e=Xt(Yt().m(function e(t){var i,r,n,o,a,s,l,h;return Yt().w(function(e){while(1)switch(e.p=e.n){case 0:if(!this.gifs.has(t)){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,fetch(t);case 2:return i=e.v,e.n=3,i.arrayBuffer();case 3:r=e.v,n=(0,ei.O5)(r),o=(0,ei.Ud)(n,!0),a=document.createElement("canvas"),a.width=n.lsd.width,a.height=n.lsd.height,s=a.getContext("2d"),l=document.createElement("canvas"),l.width=n.lsd.width,l.height=n.lsd.height,h=l.getContext("2d"),this.gifs.set(t,{url:t,parsedGif:{frames:o,width:n.lsd.width,height:n.lsd.height},currentFrameIndex:0,lastFrameTime:Date.now(),canvas:a,ctx:s,tempCanvas:l,tempCtx:h}),this.renderFrame(t,0),this.startAnimation(),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2)}},e,this,[[1,4]])}));function t(t){return e.apply(this,arguments)}return t}()},{key:"renderFrame",value:function(e,t){var i=this.gifs.get(e);if(i){var r=i.parsedGif.frames[t];if(r){var n=r.dims,o=r.patch;if(t>0){var a=i.parsedGif.frames[t-1];switch(a.disposalType){case 2:i.tempCtx.clearRect(a.dims.left,a.dims.top,a.dims.width,a.dims.height);break;case 3:break}}else i.tempCtx.clearRect(0,0,i.tempCanvas.width,i.tempCanvas.height);var s=document.createElement("canvas");s.width=n.width,s.height=n.height;var l=s.getContext("2d"),h=l.createImageData(n.width,n.height);h.data.set(o),l.putImageData(h,0,0),i.tempCtx.drawImage(s,n.left,n.top),i.ctx.clearRect(0,0,i.canvas.width,i.canvas.height),i.ctx.drawImage(i.tempCanvas,0,0)}}}},{key:"startAnimation",value:function(){this.isAnimating||(this.isAnimating=!0,this.animate())}},{key:"stopAnimation",value:function(){null!==this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.isAnimating=!1}},{key:"getGifCanvas",value:function(e){var t=this.gifs.get(e);return t?t.canvas:null}},{key:"isGifLoaded",value:function(e){return this.gifs.has(e)}},{key:"unloadGif",value:function(e){this.gifs.delete(e),0===this.gifs.size&&this.stopAnimation()}},{key:"clear",value:function(){this.gifs.clear(),this.stopAnimation()}},{key:"getLoadedGifCount",value:function(){return this.gifs.size}},{key:"pause",value:function(){this.enabled=!1,this.stopAnimation()}},{key:"resume",value:function(){this.enabled=!0,this.gifs.size>0&&this.startAnimation()}},{key:"toggle",value:function(){return this.enabled?this.pause():this.resume(),this.enabled}},{key:"isEnabled",value:function(){return this.enabled}}],[{key:"getInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}])}();B(ti,"instance",void 0);var ii=i.p+"img/icon_edit.9966e699.svg",ri=function(){function e(){wt(this,e),B(this,"imageCache",void 0),B(this,"loadingImages",void 0),B(this,"gifImages",void 0),B(this,"gifAnimationManager",void 0),B(this,"redrawCallbacks",new Set),B(this,"editIcon",null),this.imageCache=new Map,this.loadingImages=new Map,this.gifImages=new Set,this.gifAnimationManager=ti.getInstance(),this.loadEditIcon()}return mt(e,[{key:"loadEditIcon",value:function(){var e=this,t=new Image;t.onload=function(){e.editIcon=t},t.onerror=function(){},t.src=ii}},{key:"getEditIcon",value:function(){return this.editIcon}},{key:"loadImage",value:function(e){var t=this;if(this.imageCache.has(e))return Promise.resolve(this.imageCache.get(e));if(this.loadingImages.has(e))return this.loadingImages.get(e);var i=new Promise(function(i,r){var n=new Image;n.onload=function(){t.imageCache.set(e,n),t.loadingImages.delete(e),t.isGif(e)&&(t.gifImages.add(e),t.gifAnimationManager.loadGif(e).then(function(){t.triggerRedraw()}).catch(function(e){})),i(n)},n.onerror=function(){t.loadingImages.delete(e),r(new Error("Failed to load image: ".concat(e)))},n.src=e});return this.loadingImages.set(e,i),i}},{key:"getCachedImage",value:function(e){return this.imageCache.get(e)||null}},{key:"isCached",value:function(e){return this.imageCache.has(e)}},{key:"clearCache",value:function(){this.gifAnimationManager.clear(),this.imageCache.clear(),this.loadingImages.clear(),this.gifImages.clear()}},{key:"removeFromCache",value:function(e){this.gifImages.has(e)&&this.gifAnimationManager.unloadGif(e),this.imageCache.delete(e),this.loadingImages.delete(e),this.gifImages.delete(e)}},{key:"isGif",value:function(e){return e.toLowerCase().endsWith(".gif")}},{key:"getGifCanvas",value:function(e){return this.gifImages.has(e)?this.gifAnimationManager.getGifCanvas(e):null}},{key:"isAnimatedImage",value:function(e){return this.gifImages.has(e)}},{key:"hasGifImages",value:function(){return this.gifImages.size>0}},{key:"onAnimationFrame",value:function(e){this.redrawCallbacks.add(e)}},{key:"offAnimationFrame",value:function(e){this.redrawCallbacks.delete(e)}},{key:"triggerRedraw",value:function(){this.redrawCallbacks.forEach(function(e){try{e()}catch(t){}})}},{key:"getGifManager",value:function(){return this.gifAnimationManager}}],[{key:"getInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}])}();B(ri,"instance",void 0);var ni=ri,oi=function(){function e(t){wt(this,e),B(this,"columns",void 0),B(this,"data",void 0),B(this,"x",void 0),B(this,"y",void 0),B(this,"width",void 0),B(this,"height",void 0),B(this,"parentGrid",void 0),B(this,"parentCell",void 0),B(this,"painter",void 0),B(this,"rowHeight",void 0),B(this,"scrollY",void 0),B(this,"hoveredCell",void 0),B(this,"hoverRowIndex",void 0),B(this,"selectedCell",void 0),B(this,"editingCell",void 0),B(this,"displayRows",void 0),B(this,"expanded",void 0),B(this,"expandButtonHeight",void 0),B(this,"expandButtonHovered",void 0),B(this,"redrawScheduled",!1),B(this,"redrawTimer",null),B(this,"offscreenCanvas",null),B(this,"offscreenCtx",null),B(this,"cacheValid",!1),B(this,"lastDataHash",""),B(this,"progressDrag",{isDragging:!1,cell:null,startValue:0,currentValue:0}),this.columns=t.columns,this.data=t.data,this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this.parentGrid=t.parentGrid,this.parentCell=t.parentCell,this.painter=t.parentGrid.painter,this.rowHeight=28,this.scrollY=0,this.hoveredCell=null,this.hoverRowIndex=-1,this.selectedCell=null,this.editingCell=null,this.displayRows=t.displayRows,this.expanded=!1,this.expandButtonHeight=30,this.expandButtonHovered=!1}return mt(e,[{key:"getColumnWidth",value:function(e){var t=this.columns[e];return t.width||80}},{key:"getCellBounds",value:function(e,t){for(var i=this.x,r=0;r<e;r++)i+=this.getColumnWidth(r);var n=this.y+t*this.rowHeight+this.scrollY,o=this.getColumnWidth(e),a=this.rowHeight;return{x:i,y:n,width:o,height:a}}},{key:"getRequiredHeight",value:function(){var e=this.getVisibleRowCount(),t=this.needExpandButton(),i=e*this.rowHeight,r=t?this.expandButtonHeight:0;return i+r+10}},{key:"getVisibleRowCount",value:function(){return!this.displayRows||this.expanded?this.data.length:Math.min(this.displayRows,this.data.length)}},{key:"needExpandButton",value:function(){return!!this.displayRows&&this.data.length>this.displayRows&&!this.expanded}},{key:"isMouseInsideAbsolute",value:function(e,t){return e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height}},{key:"isMouseInside",value:function(e,t){return e>=0&&e<=this.width&&t>=0&&t<=this.height}},{key:"isMouseOnExpandButton",value:function(e,t){if(!this.needExpandButton())return!1;var i=this.getVisibleRowCount(),r=i*this.rowHeight;return e>=0&&e<=this.width&&t>=r&&t<=r+this.expandButtonHeight}},{key:"getCellAtPosition",value:function(e,t){if(!this.isMouseInside(e,t))return null;for(var i=0,r=-1,n=0;n<this.columns.length;n++){var o=this.getColumnWidth(n);if(e>=i&&e<i+o){r=n;break}i+=o}var a=t-this.scrollY,s=Math.floor(a/this.rowHeight),l=this.getVisibleRowCount();return r>=0&&s>=0&&s<l?{col:r,row:s}:null}},{key:"handleMouseMove",value:function(e,t){if(this.progressDrag.isDragging&&this.progressDrag.cell)return this.handleProgressDragMove(e,t),!0;if(this.isMouseOnExpandButton(e,t))return this.expandButtonHovered=!0,!0;this.expandButtonHovered=!1;var i=this.getCellAtPosition(e,t);if(i){var r=this.hoveredCell,n=!r||r.col!==i.col||r.row!==i.row;return this.hoveredCell=i,this.hoverRowIndex=i.row,this.isProgressCell(i.col)&&this.isMouseOnProgressBar(e,t,i)&&(this.parentGrid.target.style.cursor="pointer"),n&&this.parentGrid.markDirty(),!0}return this.hoveredCell?(this.hoveredCell=null,this.hoverRowIndex=-1,this.parentGrid.markDirty()):(this.hoveredCell=null,this.hoverRowIndex=-1),!1}},{key:"isProgressCell",value:function(e){var t=this.columns[e];return t&&"progress"===t.type}},{key:"isMouseOnProgressBar",value:function(e,t,i){for(var r=0,n=0;n<i.col;n++)r+=this.getColumnWidth(n);var o=this.getColumnWidth(i.col),a=i.row*this.rowHeight+this.scrollY,s=8,l=6,h=o-2*s-35,d=r+s,u=a+(this.rowHeight-l)/2,c=8;return e>=d&&e<=d+h&&t>=u-c&&t<=u+l+c}},{key:"handleMouseDown",value:function(e,t){var i=this.getCellAtPosition(e,t);if(!i)return!1;if(this.isProgressCell(i.col)&&this.isMouseOnProgressBar(e,t,i)){var r,n=this.data[i.row],o=this.columns[i.col],a=n&&null!==(r=n[o.key])&&void 0!==r?r:0;return this.progressDrag.isDragging=!0,this.progressDrag.cell=i,this.progressDrag.startValue=Number(a),this.progressDrag.currentValue=Number(a),this.parentGrid.target.style.cursor="pointer",!0}return!1}},{key:"handleProgressDragMove",value:function(e,t){if(this.progressDrag.cell){for(var i=this.progressDrag.cell,r=0,n=0;n<i.col;n++)r+=this.getColumnWidth(n);var o=this.getColumnWidth(i.col),a=8,s=o-2*a-35,l=r+a,h=e-l,d=Math.max(0,Math.min(1,h/s)),u=Math.round(100*d);u!==this.progressDrag.currentValue&&(this.progressDrag.currentValue=u,this.parentGrid.draw())}}},{key:"handleMouseUp",value:function(e,t){if(!this.progressDrag.isDragging||!this.progressDrag.cell)return!1;var i=this.progressDrag.cell,r=this.progressDrag.currentValue,n=this.progressDrag.startValue;if(this.progressDrag.isDragging=!1,this.progressDrag.cell=null,this.parentGrid.target.style.cursor="default",r!==n){var o=this.data[i.row],a=this.columns[i.col];if(o&&a){o[a.key]=r;var s=this.parentCell.rowData;this.parentGrid.afterEditCell(s)}}return this.parentGrid.draw(),!0}},{key:"isMouseOnEditIcon",value:function(e,t,i){for(var r=14,n=8,o=5,a=0,s=0;s<i.col;s++)a+=this.getColumnWidth(s);var l=this.getColumnWidth(i.col),h=i.row*this.rowHeight+this.scrollY,d=a+l-r-n,u=h+(this.rowHeight-r)/2;return e>=d-o&&e<=d+r+o&&t>=u-o&&t<=u+r+o}},{key:"isCellEditable",value:function(e){var t=this.columns[e];return"image"!==t.type}},{key:"getSelectLabel",value:function(e,t){var i=this.columns[e];if("select"===i.type&&Array.isArray(i.options)){var r,n=pt(i.options);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(t===o.value)return o.label}}catch(a){n.e(a)}finally{n.f()}}return t}},{key:"handleClick",value:function(e,t){if(this.isMouseOnExpandButton(e,t)){this.expanded=!0;var i=this.parentCell.rowData;return i._nestedExpanded||(i._nestedExpanded={}),i._nestedExpanded[this.parentCell.key]=!0,this.updateParentRowHeight(),{type:"expand",needsRedraw:!0}}var r=this.getCellAtPosition(e,t);if(r){var n=this.columns[r.col];if(n&&"boolean"===n.type&&this.isMouseOnBooleanCheckbox(e,t,r)){var o=n.key,a=this.data[r.row][o];return this.data[r.row][o]=!a,this.cacheValid=!1,{type:"booleanToggle",cell:r,needsRedraw:!0}}var s=this.isCellEditable(r.col),l=this.isMouseOnEditIcon(e,t,r);return this.parentGrid.focusCell=null,this.parentGrid.selector.show=!1,this.parentGrid.selector.isSelected=!1,this.parentGrid.selector.xArr=[-1,-1],this.parentGrid.selector.yArr=[-1,-1],this.clearOtherNestedGridsSelection(),this.selectedCell=r,s&&l?(this.editingCell=r,{type:"editIcon",cell:r}):{type:"cell",cell:r}}return null}},{key:"isMouseOnBooleanCheckbox",value:function(e,t,i){for(var r=0,n=0;n<i.col;n++)r+=this.getColumnWidth(n);var o=this.getColumnWidth(i.col),a=i.row*this.rowHeight+this.scrollY,s=14,l=r+o/2,h=a+this.rowHeight/2,d=l-s/2,u=h-s/2;return e>=d&&e<=d+s&&t>=u&&t<=u+s}},{key:"getCellEditInfo",value:function(e,t){var i=this.getCellBounds(e,t),r=this.columns[e],n=this.data[t],o=n[r.key]||"",a=String(o);if("select"===r.type&&Array.isArray(r.options)){var s,l=pt(r.options);try{for(l.s();!(s=l.n()).done;){var h=s.value;if(o===h.value){a=h.label;break}}}catch(d){l.e(d)}finally{l.f()}}return{bounds:i,column:r,value:o,displayValue:a,rowData:n}}},{key:"startEdit",value:function(e,t){this.editingCell={row:t,col:e}}},{key:"updateParentRowHeight",value:function(){var e=this.getRequiredHeight(),t=this.parentCell.rowIndex;this.parentGrid.body.resizeRow(t,e);var i=this.parentCell.rowData;i._rowHeight=e,this.parentGrid.tableHeight=this.parentGrid.body.height,this.parentGrid.scroller.reset(),this.parentGrid.draw()}},{key:"updateRowHeight",value:function(e){this.rowHeight=e,this.updateParentRowHeight()}},{key:"finishEdit",value:function(e){if(this.editingCell){var t=this.editingCell,i=t.col,r=t.row,n=this.columns[i],o=e;if("select"===n.type&&Array.isArray(n.options)){var a,s=pt(n.options);try{for(s.s();!(a=s.n()).done;){var l=a.value;if(e===l.label){o=l.value;break}}}catch(h){s.e(h)}finally{s.f()}}this.data[r][n.key]=o,this.editingCell=null,this.parentGrid.draw()}}},{key:"cancelEdit",value:function(){this.editingCell=null,this.parentGrid.draw()}},{key:"draw",value:function(){var e=this,t=this.painter.ctx,i=this.getVisibleRowCount(),r=this.needExpandButton(),n=i*this.rowHeight+(r?this.expandButtonHeight:0);t.save(),this.painter.drawRect(this.x,this.y,this.width,n,{fillColor:"#fff",borderColor:"#d0d0d0",borderWidth:1});for(var o=0;o<i;o++)for(var a=this.data[o],s=this.y+o*this.rowHeight+this.scrollY,l=this.x,h=function(){var i=e.columns[d],r=e.getColumnWidth(d),n=a[i.key]||"",h="#fff";if(e.editingCell&&e.editingCell.row===o&&(h="#f5f7fa"),e.selectedCell&&e.selectedCell.col===d&&e.selectedCell.row===o&&(h="rgba(82,146,247,0.2)"),e.painter.drawRect(l,s,r,e.rowHeight,{fillColor:h,borderColor:"#e1e6eb",borderWidth:1}),"select"===i.type){var u=e.getSelectLabel(d,n);t.save(),t.font='normal 12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',t.fillStyle="#495060";var c=i.align||"left",f=l+5;"center"===c?(t.textAlign="center",f=l+r/2):"right"===c?(t.textAlign="right",f=l+r-5):t.textAlign="left",t.textBaseline="middle",t.fillText(String(u),f,s+e.rowHeight/2),t.restore()}else if("image"===i.type)if(n&&""!==n){var v=ni.getInstance(),g=v.isAnimatedImage(n),y=g?v.getGifCanvas(n):null,p=y||v.getCachedImage(n);if(p){var w,x,m=4,b=r-2*m,k=e.rowHeight-2*m,C=p.width/p.height,S=b/k;C>S?(w=b,x=b/C):(x=k,w=k*C);var I=l+(r-w)/2,T=s+(e.rowHeight-x)/2;e.painter.drawImage(p,I,T,w,x)}else v.isCached(n)||v.loadingImages.has(n)||v.loadImage(n).then(function(){e.scheduleRedraw()}).catch(function(e){}),t.save(),t.font='normal 12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',t.fillStyle="#999",t.textAlign="center",t.textBaseline="middle",t.fillText("Loading...",l+r/2,s+e.rowHeight/2),t.restore()}else t.save(),t.font='normal 12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',t.fillStyle="#ccc",t.textAlign="center",t.textBaseline="middle",t.fillText("No Image",l+r/2,s+e.rowHeight/2),t.restore();else if("person"===i.type)e.drawPersonCell(t,n,l,s,r,e.rowHeight);else if("status"===i.type)e.drawStatusCell(t,n,i.options,l,s,r,e.rowHeight);else if("progress"===i.type)e.drawProgressCell(t,n,l,s,r,e.rowHeight,d,o);else if("datetime"===i.type||"date"===i.type||"time"===i.type)e.drawDatetimeCell(t,n,l,s,r,e.rowHeight);else if("boolean"===i.type)e.drawBooleanCell(t,n,l,s,r,e.rowHeight);else{var A=e.getDisplayValue(n);t.save(),t.font='normal 12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',t.fillStyle="#495060";var R=i.align||"left",D=l+5;"center"===R?(t.textAlign="center",D=l+r/2):"right"===R?(t.textAlign="right",D=l+r-5):t.textAlign="left",t.textBaseline="middle",t.fillText(A,D,s+e.rowHeight/2),t.restore()}var E=e.hoveredCell&&e.hoveredCell.col===d&&e.hoveredCell.row===o,P=e.editingCell&&e.editingCell.col===d&&e.editingCell.row===o;if(e.isCellEditable(d)&&E&&!P){var O=ni.getInstance(),M=O.getEditIcon();if(M){var B=14,H=8,F=l+r-B-H,L=s+(e.rowHeight-B)/2;t.save(),t.fillStyle=h,t.fillRect(F-2,L,B+4,B),t.restore(),e.painter.drawImage(M,F,L,B,B)}}l+=r},d=0;d<this.columns.length;d++)h();if(r){var u=this.y+i*this.rowHeight,c=this.expandButtonHovered?"#409eff":"#606266",f=this.expandButtonHovered?"#ecf5ff":"#f5f7fa";this.painter.drawRect(this.x,u,this.width,this.expandButtonHeight,{fillColor:f,borderColor:"#e1e6eb",borderWidth:1}),t.save(),t.font='normal 12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',t.fillStyle=c,t.textAlign="center",t.textBaseline="middle",t.fillText("展开全部 (".concat(this.data.length-i,"行)"),this.x+this.width/2,u+this.expandButtonHeight/2),t.restore()}t.restore()}},{key:"clearOtherNestedGridsSelection",value:function(){var e,t=pt(this.parentGrid.body.rows);try{for(t.s();!(e=t.n()).done;){var i,r=e.value,n=pt(r.allCells);try{for(n.s();!(i=n.n()).done;){var o=i.value;o.nestedGrid&&o.nestedGrid!==this&&(o.nestedGrid.selectedCell=null)}}catch(a){n.e(a)}finally{n.f()}}}catch(a){t.e(a)}finally{t.f()}}},{key:"ensureOffscreenCanvas",value:function(e,t){this.offscreenCanvas&&this.offscreenCanvas.width===e&&this.offscreenCanvas.height===t||(this.offscreenCanvas=document.createElement("canvas"),this.offscreenCanvas.width=e,this.offscreenCanvas.height=t,this.offscreenCtx=this.offscreenCanvas.getContext("2d"),this.cacheValid=!1)}},{key:"computeDataHash",value:function(){var e=this.getVisibleRowCount();return"".concat(this.data.length,"_").concat(this.expanded,"_").concat(e,"_").concat(this.displayRows)}},{key:"invalidateCache",value:function(){this.cacheValid=!1}},{key:"getDisplayValue",value:function(e){var t=this;if(null===e||void 0===e)return"";if("object"===P(e)){if(Array.isArray(e))return e.map(function(e){return t.getDisplayValue(e)}).join(", ");if(void 0!==e.name)return e.name;if(void 0!==e.label)return String(e.label);if(void 0!==e.value)return String(e.value);var i=String(e);return"[object Object]"===i?"":i}return String(e)}},{key:"drawPersonCell",value:function(e,t,i,r,n,o){var a,s=this;if(t){for(var l=Array.isArray(t)?t:[t],h=ni.getInstance(),d=20,u=-6,c=8,f=i+c,v=r+o/2,g=["#1890ff","#52c41a","#722ed1","#eb2f96","#fa8c16","#13c2c2","#2f54eb","#f5222d"],y=3,p=l.slice(0,y),w=0;w<p.length;w++){var x=p[w];if(x){var m=v-d/2,b=d/2;e.save(),e.beginPath(),e.arc(f+b,v,b,0,2*Math.PI),e.closePath(),e.clip();var k=x.avatar?h.getCachedImage(x.avatar):null;if(k)e.drawImage(k,f,m,d,d);else{var C,S=Math.abs(this.hashString(String(x.id||x.name||w)))%g.length;e.fillStyle=g[S],e.fillRect(f,m,d,d);var I=this.getPersonInitial(x.name||"?");e.fillStyle="#fff",e.font="bold ".concat(.5*d,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),e.textAlign="center",e.textBaseline="middle",e.fillText(I,f+b,v),!x.avatar||h.isCached(x.avatar)||null!==(C=h.loadingImages)&&void 0!==C&&C.has(x.avatar)||h.loadImage(x.avatar).then(function(){s.scheduleRedraw()}).catch(function(){})}e.restore(),e.save(),e.beginPath(),e.arc(f+b,v,b,0,2*Math.PI),e.strokeStyle="#fff",e.lineWidth=2,e.stroke(),e.restore(),f+=d+u}}if(l.length>y){var T=l.length-y;e.save(),e.beginPath(),e.arc(f+d/2,v,d/2,0,2*Math.PI),e.fillStyle="#e8e8e8",e.fill(),e.fillStyle="#666",e.font="".concat(.4*d,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),e.textAlign="center",e.textBaseline="middle",e.fillText("+".concat(T),f+d/2,v),e.restore(),f+=d+4}if(1===l.length&&null!==(a=l[0])&&void 0!==a&&a.name){f+=4,e.save(),e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.fillStyle="#333",e.textAlign="left",e.textBaseline="middle";var A=n-(f-i)-c,R=this.truncateText(e,l[0].name,A);e.fillText(R,f,v),e.restore()}}else this.drawPlaceholderText(e,"Unassigned",i,r,n,o)}},{key:"drawStatusCell",value:function(e,t,i,r,n,o,a){var s,l,h;if(t){var d=null;i&&(d=i.find(function(e){return e.value===t}));var u=(null===(s=d)||void 0===s?void 0:s.label)||String(t),c=(null===(l=d)||void 0===l?void 0:l.backgroundColor)||"#f0f0f0",f=(null===(h=d)||void 0===h?void 0:h.color)||"#666",v=8,g=6,y=18;e.save(),e.font='11px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var p=e.measureText(u).width,w=Math.min(p+2*g,o-2*v),x=r+v,m=n+(a-y)/2;this.drawRoundedRect(e,x,m,w,y,3,c),e.fillStyle=f,e.textAlign="center",e.textBaseline="middle";var b=this.truncateText(e,u,w-2*g);e.fillText(b,x+w/2,m+y/2),e.restore()}else this.drawPlaceholderText(e,"-",r,n,o,a)}},{key:"drawProgressCell",value:function(e,t,i,r,n,o,a,s){var l,h,d;d=this.progressDrag.isDragging&&this.progressDrag.cell&&void 0!==a&&void 0!==s&&this.progressDrag.cell.col===a&&this.progressDrag.cell.row===s?this.progressDrag.currentValue:Math.max(0,Math.min(100,Number(t)||0));var u=8,c=6,f=n-2*u-35,v=i+u,g=r+(o-c)/2,y="#52c41a";if(d<30?y="#ff4d4f":d<70&&(y="#faad14"),e.save(),this.drawRoundedRect(e,v,g,f,c,3,"#f0f0f0"),d>0){var p=d/100*f;this.drawRoundedRect(e,v,g,p,c,3,y)}e.font='11px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.fillStyle="#666",e.textAlign="right",e.textBaseline="middle",e.fillText("".concat(Math.round(d),"%"),i+n-u,r+o/2);var w=this.hoveredCell&&void 0!==a&&void 0!==s&&this.hoveredCell.col===a&&this.hoveredCell.row===s;if(w||this.progressDrag.isDragging&&(null===(l=this.progressDrag.cell)||void 0===l?void 0:l.col)===a&&(null===(h=this.progressDrag.cell)||void 0===h?void 0:h.row)===s){var x=v+d/100*f,m=g+c/2,b=5;e.shadowColor="rgba(0, 0, 0, 0.15)",e.shadowBlur=3,e.shadowOffsetX=0,e.shadowOffsetY=1,e.beginPath(),e.arc(x,m,b,0,2*Math.PI),e.fillStyle="#fff",e.fill(),e.shadowColor="transparent",e.shadowBlur=0,e.strokeStyle=y,e.lineWidth=2,e.stroke()}e.restore()}},{key:"drawDatetimeCell",value:function(e,t,i,r,n,o){if(t){var a="";try{var s=new Date(t);a=isNaN(s.getTime())?String(t):s.toLocaleDateString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit"})}catch(l){a=String(t)}e.save(),e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.fillStyle="#495060",e.textAlign="left",e.textBaseline="middle",e.fillText(a,i+8,r+o/2),e.restore()}else this.drawPlaceholderText(e,"-",i,r,n,o)}},{key:"drawBooleanCell",value:function(e,t,i,r,n,o){var a=Boolean(t),s=14,l=i+n/2,h=r+o/2,d=l-s/2,u=h-s/2;e.save(),e.strokeStyle=a?"#52c41a":"#d9d9d9",e.lineWidth=1,e.strokeRect(d,u,s,s),a&&(e.fillStyle="#52c41a",e.fillRect(d,u,s,s),e.strokeStyle="#fff",e.lineWidth=2,e.beginPath(),e.moveTo(d+3,h),e.lineTo(d+6,u+s-4),e.lineTo(d+s-3,u+3),e.stroke()),e.restore()}},{key:"drawPlaceholderText",value:function(e,t,i,r,n,o){e.save(),e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.fillStyle="#bbb",e.textAlign="left",e.textBaseline="middle",e.fillText(t,i+8,r+o/2),e.restore()}},{key:"drawRoundedRect",value:function(e,t,i,r,n,o,a){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.fillStyle=a,e.fill()}},{key:"truncateText",value:function(e,t,i){if(e.measureText(t).width<=i)return t;var r="...",n=t;while(n.length>0&&e.measureText(n+r).width>i)n=n.slice(0,-1);return n+r}},{key:"getPersonInitial",value:function(e){return e?/[\u4e00-\u9fa5]/.test(e[0])?e[0]:e[0].toUpperCase():"?"}},{key:"hashString",value:function(e){for(var t=0,i=0;i<e.length;i++)t=e.charCodeAt(i)+((t<<5)-t);return t}},{key:"scheduleRedraw",value:function(){var e=this;this.redrawScheduled||(this.redrawScheduled=!0,null!==this.redrawTimer&&window.clearTimeout(this.redrawTimer),this.redrawTimer=window.setTimeout(function(){e.redrawScheduled=!1,e.redrawTimer=null,e.parentGrid.draw()},50))}},{key:"updatePosition",value:function(e,t){this.x===e&&this.y===t||(this.cacheValid=!1),this.x=e,this.y=t}}])}(),ai=oi,si=(i(5506),function(){function e(){wt(this,e),B(this,"viewers",new Map),B(this,"defaultViewerType","text"),B(this,"initialized",!1),B(this,"warnedTypes",new Set)}return mt(e,[{key:"register",value:function(e,t){var i;if("function"===typeof t)try{i=new t}catch(r){i=t()}else i=t;this.viewers.set(e,i),this.initialized||"text"!==e||(this.defaultViewerType=e,this.initialized=!0)}},{key:"registerAll",value:function(e){for(var t=0,i=Object.entries(e);t<i.length;t++){var r=yt(i[t],2),n=r[0],o=r[1];this.register(n,o)}}},{key:"get",value:function(e){var t=this.viewers.get(e);if(t)return t;var i=this.viewers.get(this.defaultViewerType);return i?(this.warnedTypes.has(e)||this.warnedTypes.add(e),i):null}},{key:"has",value:function(e){return this.viewers.has(e)}},{key:"getRegisteredTypes",value:function(){return Array.from(this.viewers.keys())}},{key:"setDefaultViewerType",value:function(e){this.viewers.has(e)&&(this.defaultViewerType=e)}},{key:"getDefaultViewerType",value:function(){return this.defaultViewerType}},{key:"unregister",value:function(e){return this.viewers.delete(e)}},{key:"clear",value:function(){this.viewers.clear(),this.initialized=!1}},{key:"size",get:function(){return this.viewers.size}}],[{key:"getInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}])}());B(si,"instance",void 0);var li=function(){return si.getInstance()},hi=si,di="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAALCAYAAABLcGxfAAAAOElEQVQoU2NkQAINLf3/G2oKGfGJMYIUISsgxEbRADId3QB0MfJsQHc3LmeBbAfbMCI1EIosZHkAeThBwJAJ9eAAAAAASUVORK5CYII=",ui="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAYAAADUFP50AAABvklEQVQ4T42Sv08UQRTHv293EbXw/gMtsNDCUk0U/QdOEoKFiVFoSUj4sR7EYn+83R0SRdyFzsZCYww2aiRXkFgpmhhKWinQv+Ao1As788yc3HlcCLmp5r03n5nvvO8jdC1mPiNeZZIgtyF04aC0LYQPVDaeMfNe+zi1N6xWrwHmrQCfRJcvmr/0pq0NnnaHyfUmCLgJOGMczHy1+RaYpiuXjSN1o/X9NK5tdKto76PkyYjjes8dQ9Uomt0iZj4Jt7ID6CkOa++PgjqqsuVRkFugbFwkVvkkBFUO/ZFeiFUhHMx1vmPrnOXrINQt+NFoXaTxfL0/8OktEM0SZ8WulM0bSfLwRz9gHD86S97gZ+qVY+NDFvVIbclVhbRe3P9jhhcXH/y0SaWWz3WDQVDb7Y7tixg4sUlxVrwjkTcc+WvHdfS/LfkEOTRKiVq5I2KmOfSv9wOyyrcg5rH10YFX+WZEXqWhv3ocHGX5jEN0D2XjasujIFsa8mjgixjkSTS3dBQcq2KBAF/2m1esAx1zLezCewngFAm9Jldv2wtEu5eE5C6A3xrluAoXdjqzeqj9/8aqCuD8Qf47RNd7x/EvLrzB/TA/EB4AAAAASUVORK5CYII=",ci=["value","label"],fi=new Image,vi=new Image;fi.src=di,vi.src=ui;var gi=function(e){function t(e,i,r,n,o,a,s,l,h,d,u,c){var f,v;return wt(this,t),v=Ot(this,t,[r,a,s,l,h,d.fixed]),B(v,"colIndex",void 0),B(v,"rowIndex",void 0),B(v,"rowData",void 0),B(v,"title",void 0),B(v,"key",void 0),B(v,"labelKey",void 0),B(v,"readonly",void 0),B(v,"textAlign",void 0),B(v,"textBaseline",void 0),B(v,"dataType",void 0),B(v,"options",void 0),B(v,"render",void 0),B(v,"value",void 0),B(v,"label",void 0),B(v,"originalValue",void 0),B(v,"validator",void 0),B(v,"valid",void 0),B(v,"message",void 0),B(v,"color",void 0),B(v,"borderColor",void 0),B(v,"fillColor",void 0),B(v,"borderWidth",void 0),B(v,"nestedGrid",void 0),B(v,"hasNestedData",!1),B(v,"nestedConfig",void 0),B(v,"nestedColumns",void 0),B(v,"viewerType",void 0),B(v,"viewerData",void 0),B(v,"useViewer",void 0),B(v,"viewerConfig",void 0),v.colIndex=n,v.rowIndex=o,v.rowData=u,v.title=d.title,v.key=d.key,v.labelKey=d.label,v.fixed=d.fixed,v.readonly=d.readonly,v.textAlign=d.align||"left",v.textBaseline=d.baseline||"middle",v.dataType=d.type||"text",v.options=d.options,v.render=d.render,v.value=null===e||void 0===e?"":e,v.label="",v.originalValue=e,v.validator=new $t(d),v.valid=!0,v.message=null,Object.assign(v,c),v.setLabel(null===i||void 0===i?v.value:i),"nested"===d.type&&u._nestedData&&u._nestedData[d.key]&&(v.hasNestedData=!0,v.nestedConfig=u._nestedData[d.key],v.nestedColumns=d.nestedColumns||v.nestedConfig.columns||[]),v.viewerType=d.viewerType||d.type||"text",v.useViewer=null!==(f=d.useViewer)&&void 0!==f&&f,v.viewerConfig=v.extractViewerConfig(d),d.rule&&!1===d.rule.immediate?Pt(v):(v.validate(),v)}return Bt(t,e),mt(t,[{key:"extractViewerConfig",value:function(e){for(var t=["mode","avatarSize","maxDisplay","showText","textPosition","barHeight","color","trackColor","colorThresholds","min","max","draggable","displayType","format","showIcon","displayStyle","checkedColor","uncheckedColor","trueText","falseText","nullText","asTag","showArrow","multiple","maxTags","fit","borderRadius","placeholder","animated","alt","pathSeparator","showFullPath","tagBackgroundColor","tagBorderColor","tagColor","placeholder"],i={},r=0,n=t;r<n.length;r++){var o=n[r];void 0!==e[o]&&(i[o]=e[o])}return e.viewerConfig&&"object"===P(e.viewerConfig)&&Object.assign(i,e.viewerConfig),i}},{key:"createNestedGridLazy",value:function(){if(this.hasNestedData&&this.nestedConfig&&this.nestedColumns){var e=this.nestedColumns.reduce(function(e,t){return e+(t.width||80)},0);this.nestedGrid=new ai({columns:this.nestedColumns,data:this.nestedConfig.data||[],x:0,y:0,width:e,height:this.height-10,parentGrid:this.grid,parentCell:this,displayRows:this.nestedConfig.displayRows}),this.rowData._nestedExpanded&&this.rowData._nestedExpanded[this.key]&&(this.nestedGrid.expanded=!0)}}},{key:"buildViewerData",value:function(){var e,t=null!==this.value&&"object"===P(this.value)&&!Array.isArray(this.value),i=F({value:t?this.value.value:this.value,label:t?null!==(e=this.value.label)&&void 0!==e?e:"":this.label,options:this.options,style:{color:this.color,textAlign:this.textAlign,textBaseline:this.textBaseline},extra:{rowData:this.rowData}},this.viewerConfig);if(t){var r=this.value,n=(r.value,r.label,qt(r,ci));Object.assign(i,n)}return i}},{key:"buildRenderContext",value:function(e,t,i){var r=this,n=this.grid,o=n.painter,a=n.editor,s=this.grid.hoverRowIndex===this.rowIndex&&!this.grid.isScrolling,l=this.grid.hoverRowIndex===this.rowIndex&&this.grid.hoverColIndex===this.colIndex&&!this.grid.isScrolling,h=!!a._nestedGridContext,d=a.show&&a.yIndex===this.rowIndex&&!h,u=this.grid.body.getRow(this.rowIndex),c=!!u&&u.checked;return{ctx:o.ctx,painter:o,grid:this.grid,bounds:{x:e,y:t,width:this.width,height:this.height},rowIndex:this.rowIndex,colIndex:this.colIndex,readonly:this.readonly||!1,isHoverRow:s,isHoverCell:l,isEditing:d,isChecked:c,fillColor:i,requestRedraw:function(){return r.grid.draw()}}}},{key:"drawWithViewer",value:function(e,t,i){var r=li(),n=r.get(this.viewerType||"text");if(n){var o=this.buildRenderContext(e,t,i),a=this.viewerData||this.buildViewerData();n.draw(o,a)}else this.drawDefaultContent(e,t,i)}},{key:"drawDefaultContent",value:function(e,t,i){var r,n=this.grid,o=n.painter,a=n.editor,s=this.grid.styleManager.getCellStyle({isHeader:!1,isReadonly:this.readonly,isHover:this.grid.hoverRowIndex===this.rowIndex&&!this.grid.isScrolling,isEditing:a.show&&a.yIndex===this.rowIndex,isStriped:this.grid.striped,isChecked:(null===(r=this.grid.body.getRow(this.rowIndex))||void 0===r?void 0:r.checked)||!1,rowIndex:this.rowIndex});o.drawCellText(this.label,e,t,this.width,this.height,10,{color:s.color||this.color,align:this.textAlign,baseLine:this.textBaseline}),"select"===this.dataType&&o.drawCellAffixIcon("arrow",e,t,this.width,this.height-2,{color:"#bbbec4",fillColor:i})}},{key:"isInHorizontalAutofill",value:function(e,t){return e>this.x+this.grid.scrollX+this.width-4&&e<this.x+this.grid.scrollX+this.width+4&&e>this.grid.fixedLeftWidth&&e<this.grid.width-this.grid.fixedRightWidth+4}},{key:"isInsideFixedHorizontalAutofill",value:function(e,t){var i=this.grid.width-(this.grid.tableWidth-this.x-this.width)-this.width-this.grid.verticalScrollerSize;return e>=i+this.width-4&&e<i+this.width+4&&"right"===this.fixed||e>this.x+this.width-4&&e<this.x+this.width+4&&"left"===this.fixed}},{key:"validate",value:function(){var e=Xt(Yt().m(function e(t){var i,r,n;return Yt().w(function(e){while(1)switch(e.n){case 0:return e.n=1,this.validator.validate(this.value,t||this.rowData);case 1:i=e.v,r=i.flag,n=i.message,this.valid=r,this.message=n;case 2:return e.a(2)}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:"resetValidate",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.valid=e,this.message=t}},{key:"handleNumber",value:function(e){return 0===e||e&&!isNaN(Number(e))?Number(e):e||null}},{key:"setData",value:function(e,t){if(t||!this.readonly){var i=e;"string"===typeof i&&(i=e.trim()),"number"===this.dataType&&(i=this.handleNumber(i)),"[object Object]"===Object.prototype.toString.call(e)?(this.value=e.value,this.setLabel(e.label)):(this.grid.clipboard.isPaste||this.grid.autofill.enable?this.value=this.getMapValue(i):this.value=i,this.setLabel(i));var r=this.grid.body.getRowData(this.rowIndex);this.validate(r),this.value!==this.originalValue?this.grid.hashChange["".concat(this.colIndex,"-").concat(this.rowIndex)]=!0:delete this.grid.hashChange["".concat(this.colIndex,"-").concat(this.rowIndex)]}}},{key:"setLabel",value:function(e){var t;t="function"===typeof this.render?this.render(e):this.getMapLabel(e),this.label=null===t||void 0===t?"":t}},{key:"getMapValue",value:function(e){var t=e;if("select"===this.dataType&&Array.isArray(this.options)){var i,r=pt(this.options);try{for(r.s();!(i=r.n()).done;){var n=i.value;if(e===n.label){t=n.value;break}}}catch(o){r.e(o)}finally{r.f()}}return t}},{key:"getMapLabel",value:function(e){var t=e;if("select"===this.dataType&&Array.isArray(this.options)){var i,r=pt(this.options);try{for(r.s();!(i=r.n()).done;){var n=i.value;if(e===n.value){t=n.label;break}}}catch(o){r.e(o)}finally{r.f()}}return t}},{key:"drawLoadingIndicator",value:function(e,t,i){var r=this.grid.painter,n=r.ctx,o=14,a=8,s=e+this.width-o-a,l=t+(this.height-o)/2,h=o+a;r.drawRect(s-4,t,h+4,this.height,{fillColor:i,borderWidth:0});var d=this.grid.getLoadingImage();if(d){var u=s+o/2,c=l+o/2;n.save(),n.translate(u,c),n.rotate(this.grid.getLoadingRotation()),n.drawImage(d,-o/2,-o/2,o,o),n.restore()}else{var f=s+o/2,v=l+o/2,g=6,y=this.grid.getLoadingRotation();n.save(),n.strokeStyle="#1890ff",n.lineWidth=2,n.lineCap="round",n.beginPath(),n.arc(f,v,g,y,y+1.5*Math.PI),n.stroke(),n.restore()}}},{key:"draw",value:function(){var e,t=this,i=this.grid,r=i.painter,n=i.editor,o=i.selector,a=i.autofill,s=i.clipboard,l=i.width,h=i.tableWidth,d=i.verticalScrollerSize,u=i.scrollX,c=i.scrollY,f=i.range,v=i.fillColor,g=i.striped,y=i.styleManager,p="right"===this.fixed?l-(h-this.x-this.width)-this.width-d:"left"===this.fixed?this.x:this.x+u,w=this.y+c,x={borderColor:b,borderWidth:1,lineDash:[4,4]},m=this.grid.hoverRowIndex===this.rowIndex&&!this.grid.isScrolling,C=!!n._nestedGridContext,S=n.show&&n.yIndex===this.rowIndex&&!C,I=this.grid.body.getRow(this.rowIndex),A=!!I&&I.checked,R=y.getCellStyle({isHeader:!1,isReadonly:this.readonly,isHover:m,isEditing:S,isStriped:g,isChecked:A,rowIndex:this.rowIndex}),D=R.backgroundColor||v;if(r.ctx.save(),r.drawRect(p,w,this.width,this.height,{fillColor:D,borderColor:this.borderColor,borderWidth:1}),r.ctx.clip(),this.hasNestedData&&!this.nestedGrid&&this.createNestedGridLazy(),this.useViewer&&!this.nestedGrid)this.drawWithViewer(p,w,D);else if(this.nestedGrid)this.nestedGrid.updatePosition(p+5,w+5),this.nestedGrid.draw();else if("image"===this.dataType)if(this.value&&""!==this.value){var E=ni.getInstance(),P=E.isAnimatedImage(this.value),O=P?E.getGifCanvas(this.value):null,M=O||E.getCachedImage(this.value);if(M){var B,H,F=4,L=this.width-2*F,W=this.height-2*F,z=M.width/M.height,N=L/W;z>N?(B=L,H=L/z):(H=W,B=W*z);var V=p+(this.width-B)/2,_=w+(this.height-H)/2;r.drawImage(M,V,_,B,H)}else E.isCached(this.value)||E.loadingImages.has(this.value)||E.loadImage(this.value).then(function(){t.grid.draw()}).catch(function(e){}),r.drawCellText("Loading...",p,w,this.width,this.height,10,{color:"#999",align:"center",baseLine:this.textBaseline})}else r.drawCellText("No Image",p,w,this.width,this.height,10,{color:"#ccc",align:"center",baseLine:this.textBaseline});else r.drawCellText(this.label,p,w,this.width,this.height,10,{color:R.color||this.color,align:this.textAlign,baseLine:this.textBaseline,iconOffsetX:12,iconOffsetY:1,iconWidth:12,iconHeight:12}),"select"===this.dataType&&r.drawCellAffixIcon("arrow",p,w,this.width,this.height-2,{color:"#bbbec4",fillColor:D});var j=this.rowData[this.grid.rowKey],Y=void 0!==j&&this.grid.isLoadingCell("".concat(j,"|||").concat(this.key));Y&&this.drawLoadingIndicator(p,w,D);var G=this.grid.hoverRowIndex===this.rowIndex&&this.grid.hoverColIndex===this.colIndex&&!this.grid.isScrolling,X=!0===(null===(e=this.grid.viewerDrag)||void 0===e?void 0:e.isDragging);if(!Y&&!this.readonly&&G&&!n.show&&!this.nestedGrid&&"image"!==this.dataType&&!X){var U=ni.getInstance(),q=U.getEditIcon();if(q){var K=14,J=8,Q=p+this.width-K-J,Z=w+(this.height-K)/2;r.drawRect(Q-4,w,K+8,this.height,{fillColor:D,borderWidth:0}),r.drawImage(q,Q,Z,K,K)}}if(!this.valid){var $=[[p+this.width-8,w],[p+this.width,w],[p+this.width,w+8]];r.drawLine($,{fillColor:T})}if(o.show){var ee=o.xArr[0],te=o.xArr[1],ie=o.yArr[0],re=o.yArr[1];if(this.colIndex>=ee&&this.colIndex<=te&&this.rowIndex>=ie&&this.rowIndex<=re&&r.drawRect(p,w,this.width,this.height,{fillColor:k}),this.colIndex>=ee&&this.colIndex<=te&&this.rowIndex+1===ie){var ne=[[p,w+this.height-1],[p+this.width,w+this.height-1]];r.drawLine(ne,{borderColor:b,borderWidth:1})}if(this.colIndex>=ee&&this.colIndex<=te&&this.rowIndex===re)if(this.rowIndex===f.maxY){var oe=[[p,w+this.height],[p+this.width,w+this.height]];r.drawLine(oe,{borderColor:b,borderWidth:2})}else{var ae=[[p,w+this.height-1],[p+this.width,w+this.height-1]];r.drawLine(ae,{borderColor:b,borderWidth:1})}if(this.colIndex>=ee&&this.colIndex<=te&&this.rowIndex===ie||this.colIndex>=ee&&this.colIndex<=te&&this.rowIndex-1===re){var se=[[p,w],[p+this.width,w]];r.drawLine(se,{borderColor:b,borderWidth:1})}if(this.colIndex===ee&&this.rowIndex>=ie&&this.rowIndex<=re||this.colIndex-1===te&&this.rowIndex>=ie&&this.rowIndex<=re){var le=[[p,w],[p,w+this.height]];r.drawLine(le,{borderColor:b,borderWidth:2})}if(this.colIndex+1===ee&&this.rowIndex>=ie&&this.rowIndex<=re||this.colIndex===te&&this.rowIndex>=ie&&this.rowIndex<=re){var he=[[p+this.width,w],[p+this.width,w+this.height]];r.drawLine(he,{borderColor:b,borderWidth:2})}if(!n.show){var de=6,ue={borderColor:"#fff",borderWidth:2,fillColor:b};this.colIndex===a.xIndex&&this.rowIndex===a.yIndex&&r.drawRect(p+this.width-3,w+this.height-3,de,de,ue),this.colIndex===a.xIndex&&this.rowIndex-1===a.yIndex&&r.drawRect(p+this.width-3,w-3,de,de,ue),this.colIndex-1===a.xIndex&&this.rowIndex===a.yIndex&&r.drawRect(p-3,w+this.height-3,de,de,ue),this.colIndex-1===a.xIndex&&this.rowIndex-1===a.yIndex&&"left"!==this.fixed&&r.drawRect(p-3,w-3,de,de,ue)}if(a.enable){var ce=a.xArr[0],fe=a.xArr[1],ve=a.yArr[0],ge=a.yArr[1];if(this.colIndex>=ce&&this.colIndex<=fe&&this.rowIndex===ve){var ye=[[p,w+1],[p+this.width,w+1]];r.drawLine(ye,x)}if(this.colIndex>=ce&&this.colIndex<=fe&&this.rowIndex===ge){var pe=[[p,w+this.height-1],[p+this.width,w+this.height-1]];r.drawLine(pe,x)}if(this.colIndex===ce&&this.rowIndex>=ve&&this.rowIndex<=ge){var we=[[p+1,w],[p+1,w+this.height]];r.drawLine(we,x)}if(this.colIndex===fe&&this.rowIndex>=ve&&this.rowIndex<=ge){var xe=[[p+this.width-1,w],[p+this.width-1,w+this.height]];r.drawLine(xe,x)}}}if(s.show){var me=s.xArr[0],be=s.xArr[1],ke=s.yArr[0],Ce=s.yArr[1];if(this.colIndex>=me&&this.colIndex<=be&&this.rowIndex===ke){var Se=[[p,w+1],[p+this.width,w+1]];r.drawLine(Se,x)}if(this.colIndex>=me&&this.colIndex<=be&&this.rowIndex===Ce){var Ie=[[p,w+this.height-2],[p+this.width,w+this.height-2]];r.drawLine(Ie,x)}if(this.colIndex===me&&this.rowIndex>=ke&&this.rowIndex<=Ce){var Te=[[p+1,w],[p+1,w+this.height]];r.drawLine(Te,x)}if(this.colIndex===be&&this.rowIndex>=ke&&this.rowIndex<=Ce){var Ae=[[p+this.width-1,w],[p+this.width-1,w+this.height]];r.drawLine(Ae,x)}}r.ctx.restore()}}])}(Ft),yi=gi,pi=function(e){function t(e,i,r,n,o,a){var s;wt(this,t),s=Ot(this,t,[e,r,n,null,o]),B(s,"data",void 0),B(s,"rowIndex",void 0),B(s,"_rowId",void 0),B(s,"checked",void 0),B(s,"allCells",void 0),B(s,"fixedCells",void 0),B(s,"cells",void 0),B(s,"rowHeader",void 0),s.data=a,s.rowIndex=i,s._rowId=a._rowId||"row_".concat(i),s.checked=e.selectedRowIds.has(s._rowId),s.allCells=[],s.fixedCells=[],s.cells=[];var l={color:s.grid.color,fillColor:s.grid.fillColor,borderColor:s.grid.borderColor,borderWidth:s.grid.borderWidth};s.rowHeader=new _t(e,i,r,n,c,s.height,l),s.rowHeader.handleCheck(s.checked);for(var h=e.originFixedWidth,d=0;d<s.grid.columnsLength;d++){var u=s.grid.columns[d],f=u.width||R[u.size||"mini"];"nested"===u.type&&u.nestedColumns&&u.nestedColumns.length>0&&(f=u.nestedColumns.reduce(function(e,t){return e+(t.width||80)},0));var v="";u.fixedLeft?v="left":u.fixedRight&&(v="right"),u.fixed=v;var g=new yi(a[u.key],a[u.label],e,d,i,h,n,f,s.height,u,a,l);s.allCells.push(g),v?s.fixedCells.push(g):s.cells.push(g),h+=f}return s}return Bt(t,e),mt(t,[{key:"isInVerticalAutofill",value:function(e,t){return this.grid.autofill.yIndex===this.rowIndex&&t>this.y+this.grid.scrollY+this.height-4&&t<this.y+this.height+this.grid.scrollY+4}},{key:"handleCheck",value:function(e){var t="boolean"===typeof e?e:!this.checked;t?this.grid.selectedRowIds.add(this._rowId):this.grid.selectedRowIds.delete(this._rowId),this.checked=t,this.rowHeader.handleCheck(this.checked)}},{key:"mouseDown",value:function(e,t){var i=this,r=this.allCells[this.grid.autofill.xIndex];if(!r||!r.isInHorizontalAutofill(e,t)&&!r.isInsideFixedHorizontalAutofill(e,t))for(var n=e<=this.grid.fixedLeftWidth,o=e>=this.grid.width-this.grid.fixedRightWidth-this.grid.verticalScrollerSize,a=0;a<this.allCells.length;a++){var s=this.allCells[a];if(s.nestedGrid){if(n&&"left"!==s.fixed)continue;if(o&&"right"!==s.fixed)continue;if(!n&&!o&&s.fixed)continue;var l="right"===s.fixed?this.grid.width-(this.grid.tableWidth-s.x-s.width)-s.width-this.grid.verticalScrollerSize:"left"===s.fixed?s.x:s.x+this.grid.scrollX,h=s.y+this.grid.scrollY,d=e-l,u=t-h;if(s.nestedGrid.isMouseInside(d,u)){var c=s.nestedGrid.getCellAtPosition(d,u);if(c){var f=s.nestedGrid.columns[c.col],v=f&&"image"!==f.type;if(v&&s.nestedGrid.isMouseOnEditIcon(d,u,c))return}}}else{if(!s.readonly&&s.isInsideEditIcon(e,t))return this.grid.selectCell(s),void setTimeout(function(){i.grid.startEdit()},0);if("select"===s.dataType&&s.isInsideAffixIcon(e,t))this.grid.selectCell(s),setTimeout(function(){i.grid.startEdit()},0);else if(s.isInsideHorizontalBodyBoundary(e,t)||s.isInsideFixedHorizontalBodyBoundary(e,t)){if(this.grid.clearMultiSelect(),s.useViewer&&("boolean"===s.viewerType||"punch-timing"===s.viewerType)){var g=li(),y=g.get(s.viewerType);if(y&&y.onClick){if("boolean"===s.viewerType){var p="right"===s.fixed?this.grid.width-(this.grid.tableWidth-s.x-s.width)-s.width-this.grid.verticalScrollerSize:"left"===s.fixed?s.x:s.x+this.grid.scrollX,w=s.y+this.grid.scrollY,x=e-p,m=t-w,b=s.buildRenderContext(p,w,""),k=s.buildViewerData(),C=y.onClick(b,k,x,m);if(C&&!s.readonly){var S=s.value,I=!S,T=this.grid.body.getRowData(s.rowIndex);return s.setData(I),this.grid.afterEditCell(T),this.grid.history.pushState({before:{colIndex:s.colIndex,rowIndex:s.rowIndex,value:S},after:{colIndex:s.colIndex,rowIndex:s.rowIndex,value:I},type:"single"}),void this.grid.draw()}}if("punch-timing"===s.viewerType){var A="right"===s.fixed?this.grid.width-(this.grid.tableWidth-s.x-s.width)-s.width-this.grid.verticalScrollerSize:"left"===s.fixed?s.x:s.x+this.grid.scrollX,R=s.y+this.grid.scrollY,D=e-A,E=t-R,P=s.buildRenderContext(A,R,""),O=s.buildViewerData(),M=y.onClick(P,O,D,E);if(M)return void this.grid.draw()}}}this.grid.selectCell(s)}}}}},{key:"mouseMove",value:function(e,t){var i=this.y+this.grid.scrollY;if(t>=i&&t<=i+this.height&&(this.rowHeader.isInsideCheckboxBoundary(e,t)||this.rowHeader.isInsideIndexBoundary(e,t)))this.grid.setHoverCell(0,this.rowIndex);else for(var r=0;r<this.allCells.length;r++){var n=this.allCells[r];if(n.isInsideHorizontalTableBoundary(e,t)||n.isInsideFixedHorizontalBodyBoundary(e,t)){var o=n.colIndex,a=n.rowIndex,s=n.x,l=n.y,h=n.width,d=n.height,u=n.valid,c=n.message,f=n.fixed;this.grid.multiSelectCell(o,a,e,t),this.grid.setHoverCell(o,a),this.grid.tooltip.update({valid:u,message:c,x:s,y:l,colWidth:h,colHeight:d,fixed:f}),(!n.readonly&&n.isInsideEditIcon(e,t)||"select"===n.dataType&&n.isInsideAffixIcon(e,t))&&(this.grid.target.style.cursor="pointer")}}}},{key:"handleAutofill",value:function(e,t){var i=this.allCells[this.grid.autofill.xIndex];i&&(i.isInHorizontalAutofill(e,t)||i.isInsideFixedHorizontalAutofill(e,t))&&(this.grid.target.style.cursor="crosshair")}},{key:"handleStartAutofill",value:function(e,t){var i=this.allCells[this.grid.autofill.xIndex];i&&(i.isInHorizontalAutofill(e,t)||i.isInsideFixedHorizontalAutofill(e,t))&&this.grid.startAutofill()}},{key:"click",value:function(e,t){(this.rowHeader.isInsideCheckboxBoundary(e,t)||this.rowHeader.isInsideIndexBoundary(e,t))&&(this.handleCheck(),this.grid.handleCheckHeader())}},{key:"dbClick",value:function(e,t){for(var i=0;i<this.allCells.length;i++){var r=this.allCells[i];r.nestedGrid||(r.isInsideHorizontalBodyBoundary(e,t)||r.isInsideFixedHorizontalBodyBoundary(e,t))&&this.grid.startEdit()}}},{key:"resizeColumn",value:function(e,t){var i=this.grid.width-this.grid.tableWidth-this.grid.verticalScrollerSize-this.grid.scrollX,r=this.allCells[e];if(i<=t){r.width+=t;for(var n=e+1;n<this.grid.columnsLength;n++)this.allCells[n].x+=t}0===i&&t<=0&&(r.width+=t,this.allCells[e+1].width-=t,this.allCells[e+1].x+=t)}},{key:"resizeRow",value:function(e,t){this.rowIndex===e&&(this.height=t,this.rePaint())}},{key:"rePaint",value:function(){for(var e=0;e<this.cells.length;e++){var t=this.cells[e];t.height=this.height,t.y=this.y}for(var i=0;i<this.fixedCells.length;i++){var r=this.fixedCells[i];r.height=this.height,r.y=this.y}this.rowHeader.height=this.height,this.rowHeader.y=this.y}},{key:"draw",value:function(){for(var e=0;e<this.cells.length;e++){var t=this.cells[e];t.isHorizontalVisibleOnBody()&&t.draw()}var i=this.grid,r=i.editor,n=i.striped,o=i.styleManager,a=i.fillColor,s=this.grid.hoverRowIndex===this.rowIndex&&!this.grid.isScrolling,l=!!r._nestedGridContext,h=r.show&&r.yIndex===this.rowIndex&&!l,d=o.getCellStyle({isHeader:!1,isReadonly:!1,isHover:s,isEditing:h,isStriped:n,isChecked:this.checked,rowIndex:this.rowIndex}),u=d.backgroundColor||a;0!==this.grid.scrollX&&this.grid.painter.drawRect(this.x+this.grid.originFixedWidth,this.y+this.grid.scrollY,this.grid.fixedLeftWidth-this.grid.originFixedWidth,this.height,{fillColor:u,shadowBlur:4,shadowColor:"rgba(143, 140, 140, 0.22)",shadowOffsetX:2,shadowOffsetY:2}),this.grid.tableWidth+this.grid.verticalScrollerSize-this.grid.width+this.grid.scrollX>0&&this.grid.painter.drawRect(this.grid.width-this.grid.fixedRightWidth,this.y+this.grid.scrollY,this.grid.fixedRightWidth-this.grid.verticalScrollerSize,this.height,{fillColor:u,shadowBlur:4,shadowColor:"rgba(143, 140, 140, 0.22)",shadowOffsetX:-2,shadowOffsetY:2});for(var c=0;c<this.fixedCells.length;c++){var f=this.fixedCells[c];f.draw()}this.grid.drawFixedNestedColumnBorders(this.y+this.grid.scrollY,this.height),this.rowHeader.draw()}}])}(Ft),wi=pi;function xi(e){return null!==e&&void 0!==e&&!0===e.isGroup}function mi(e){return null!==e&&void 0!==e&&!0===e.isSeparateRow}function bi(e){return null!==e&&void 0!==e&&!xi(e)&&!mi(e)}var ki={GROUP_HEADER_HEIGHT:36,SEPARATOR_HEIGHT:12,NORMAL_ROW_HEIGHT:36,LEVEL_INDENT:20,ARROW_SIZE:16,GROUP_PADDING:8},Ci={level0BgColor:"#E3F2FD",level1BgColor:"#F5F5F5",level2BgColor:"#FAFAFA",textColor:"#333333",fontWeight:"bold",fontSize:14},Si={level0BgColor:"#E0E0E0",level1BgColor:"#EEEEEE",level2BgColor:"#F5F5F5"},Ii=function(e){function t(e,i,r,n,o,a){var s;return wt(this,t),s=Ot(this,t,[e,r,n,null,o]),B(s,"data",void 0),B(s,"rowIndex",void 0),B(s,"_rowId",void 0),B(s,"isGroupHeader",void 0),B(s,"isSeparator",void 0),B(s,"checked",!1),B(s,"rowHeader",{handleCheck:function(e){}}),B(s,"allCells",[]),B(s,"cells",[]),B(s,"fixedCells",[]),s.data=a,s.rowIndex=i,s._rowId=String(a.id)||"group_row_".concat(i),s.isGroupHeader=xi(a),s.isSeparator=mi(a),s}return Bt(t,e),mt(t,[{key:"draw",value:function(){this.isGroupHeader?this.drawGroupHeader():this.isSeparator&&this.drawSeparator()}},{key:"drawGroupHeader",value:function(){var e,t=this.data,i=t.groupLevel,r=void 0===i?0:i,n=t.expanded,o=void 0!==n&&n,a=t.name,s=t.count,l=t.showCount,h=this.grid.painter,d=h.ctx,u=this.y+this.grid.scrollY,c=Math.max(this.grid.width,this.grid.tableWidth);switch(r){case 0:e=Ci.level0BgColor;break;case 1:e=Ci.level1BgColor;break;case 2:default:e=Ci.level2BgColor;break}d.save(),d.fillStyle=e,d.fillRect(this.x,u,c,this.height);var f=r*ki.LEVEL_INDENT,v=ki.GROUP_PADDING,g=this.x+v+f;g=this.drawExpandArrow(d,g,u,o),g=this.drawGroupName(d,g,u,a),l&&void 0!==s&&this.drawCountBadge(d,g,u,s),d.strokeStyle=this.grid.borderColor,d.lineWidth=1,d.beginPath(),d.moveTo(this.x,u+this.height-.5),d.lineTo(this.x+c,u+this.height-.5),d.stroke(),d.restore()}},{key:"drawExpandArrow",value:function(e,t,i,r){var n=ki.ARROW_SIZE,o=i+(this.height-n)/2,a=t+n/2,s=o+n/2,l=5;return e.save(),e.strokeStyle="#666",e.lineWidth=2,e.lineCap="round",e.lineJoin="round",e.beginPath(),r?(e.moveTo(a-l,s-l/2),e.lineTo(a,s+l/2),e.lineTo(a+l,s-l/2)):(e.moveTo(a-l/2,s-l),e.lineTo(a+l/2,s),e.lineTo(a-l/2,s+l)),e.stroke(),e.restore(),t+n+8}},{key:"drawGroupName",value:function(e,t,i,r){var n;e.save(),e.font="".concat(Ci.fontWeight," ").concat(Ci.fontSize,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),e.fillStyle=Ci.textColor,e.textAlign="left",e.textBaseline="middle",n=Array.isArray(r)?r.join(", "):String(r||"未命名分组"),e.fillText(n,t,i+this.height/2);var o=e.measureText(n).width;return e.restore(),t+o+8}},{key:"drawCountBadge",value:function(e,t,i,r){e.save(),e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.fillStyle="#999",e.textAlign="left",e.textBaseline="middle",e.fillText("(".concat(r,")"),t,i+this.height/2),e.restore()}},{key:"drawSeparator",value:function(){var e,t=this.data,i=t.separateLevel,r=void 0===i?0:i,n=this.grid.painter,o=n.ctx,a=this.y+this.grid.scrollY,s=Math.max(this.grid.width,this.grid.tableWidth);switch(r){case 0:e=Si.level0BgColor;break;case 1:e=Si.level1BgColor;break;case 2:default:e=Si.level2BgColor;break}o.save(),o.fillStyle=e,o.fillRect(this.x,a,s,this.height),o.restore()}},{key:"isInsideExpandArrow",value:function(e,t){if(!this.isGroupHeader)return!1;var i=this.data,r=i.groupLevel,n=void 0===r?0:r,o=n*ki.LEVEL_INDENT,a=ki.GROUP_PADDING,s=ki.ARROW_SIZE,l=this.y+this.grid.scrollY,h=this.x+a+o,d=l;return e>=h&&e<=h+s+8&&t>=d&&t<=d+this.height}},{key:"isVerticalVisibleOnBody",value:function(){var e=this.y+this.grid.scrollY,t=e+this.height,i=this.grid.tableHeaderHeight,r=this.grid.height-this.grid.horizontalScrollerSize;return t>i&&e<r}},{key:"isInsideVerticaBodyBoundary",value:function(e,t){var i=this.y+this.grid.scrollY;return t>=i&&t<=i+this.height&&e>=this.x&&e<=this.grid.width-this.grid.verticalScrollerSize}},{key:"handleClick",value:function(e,t){if(this.isGroupHeader&&this.isInsideExpandArrow(e,t)){var i=this.data;return i.expanded=!i.expanded,!0}return!1}},{key:"rePaint",value:function(){}},{key:"resizeColumn",value:function(e,t){}},{key:"handleCheck",value:function(e){}},{key:"isInVerticalAutofill",value:function(e,t){return!1}},{key:"handleAutofill",value:function(e,t){}},{key:"handleStartAutofill",value:function(e,t){}},{key:"isInsideVerticaTableBoundary",value:function(e,t){return this.isInsideVerticaBodyBoundary(e,t)}},{key:"mouseMove",value:function(e,t){}},{key:"mouseDown",value:function(e,t){}},{key:"click",value:function(e,t){this.handleClick(e,t)}},{key:"dbClick",value:function(e,t){}}])}(Ft),Ti=Ii,Ai=30,Ri=36,Di=function(){function e(t,i){wt(this,e),B(this,"grid",void 0),B(this,"data",void 0),B(this,"rows",void 0),B(this,"height",void 0),B(this,"rowHeights",void 0),B(this,"rowOffsets",void 0),B(this,"visibleRowIndexes",void 0),B(this,"rowCache",void 0),B(this,"bufferSize",void 0),B(this,"addRowButtons",void 0),B(this,"hoverAddRowButtonIndex",void 0),B(this,"rowAccessTime",void 0),B(this,"maxCacheSize",void 0),this.grid=t,this.data=[],this.rows=[],this.height=0,this.rowHeights=[],this.rowOffsets=[],this.visibleRowIndexes=new Set,this.rowCache=new Map,this.bufferSize=10,this.rowAccessTime=new Map,this.maxCacheSize=500,this.addRowButtons=[],this.hoverAddRowButtonIndex=-1,this.paint(i)}return mt(e,[{key:"paint",value:function(e){this.data=e;var t=e.length;this.rowCache.clear(),this.rowAccessTime.clear(),this.visibleRowIndexes.clear(),this.rows=[],this.rowHeights=new Array(t),this.rowOffsets=new Array(t);for(var i=this.grid.tableHeaderHeight,r=0;r<t;r++){var n=e[r],o=this.grid.rowHeight||v;if(xi(n))o=n.rowHeight||ki.GROUP_HEADER_HEIGHT;else if(mi(n))o=n.rowHeight||ki.SEPARATOR_HEIGHT;else if(n.rowHeight&&"number"===typeof n.rowHeight)o=Math.max(n.rowHeight,Ai);else if(n._rowHeight&&"number"===typeof n._rowHeight)o=Math.max(n._rowHeight,Ai);else{for(var a=0,s=0;s<this.grid.columnsLength;s++){var l=this.grid.columns[s];if("nested"===l.type&&n._nestedData&&n._nestedData[l.key]){var h=n._nestedData[l.key],d=h.data||[],u=h.displayRows,c=28,f=u&&d.length>u?u:d.length,g=u&&d.length>u,y=g?30:0,p=f*c+y+10;p>a&&(a=p)}}a>0&&(o=Math.max(a,30),n._rowHeight=o)}this.rowHeights[r]=o,this.rowOffsets[r]=i,i+=o}this.height=i,this.calculateAddRowButtons(),this.updateVisibleRows(),e.length>0&&this.grid.onLoad()}},{key:"pasteData",value:function(e){var t=this.grid.editor,i=t.xIndex,r=t.yIndex,n=[i,i+e[0].length-1],o=[r,r+e.length-1],a=this.getSelectedData({xArr:n,yArr:o}),s=a.value,l={value:e,colIndex:i,rowIndex:r};if(this.grid.history.pushState({before:{value:s,colIndex:i,rowIndex:r},after:l,type:"multiple"}),this.grid.clipboard.show){var h=this.getRangeData(this.grid.clipboard);this.batchSetData({value:h,colIndex:i,rowIndex:r})}else this.batchSetData(l);for(var d=r,u=d+e.length-1,c=[],f=d;f<=u;f++)c.push(this.getRowData(f));this.grid.afterPaste(c)}},{key:"batchSetData",value:function(e){for(var t=e.colIndex,i=e.rowIndex,r=e.value,n=0;n<=r.length-1;n++)for(var o=r[n].length,a=0;a<=o-1;a++){var s=this.getRow(n+i),l=s.allCells,h=l[a+t];h.setData(r[n][a])}}},{key:"autofillData",value:function(){var e=this,t=this.grid.autofill,i=t.xArr,r=t.yArr,n=this.grid.selector,o=n.xArr,a=n.yArr;if(!(r[1]<0||i[1]<0)){if("function"===typeof this.grid.customAutofill){var s=this.getRangeData(),l=s.map(function(t,i){return t.map(function(t,r){var n=e.getRow(i+a[0]),s=n.allCells[r+o[0]];return{label:t.label,value:t.value,dataType:s.dataType}})}),h=function(t,i,r){var n=e.getRow(t),o=n.allCells[i];o.setData(r)},d=function(t){var i,r=e.getRow(a[0]);return(null===(i=r.allCells[t])||void 0===i?void 0:i.dataType)||"text"};this.grid.customAutofill({sourceData:l,targetRange:{xArr:i,yArr:r},selectionRange:{xArr:o,yArr:a},setCell:h,getCellDataType:d})}else for(var u=this.getRangeData(),c=u[0].length,f=u.length,v=0;v<=r[1]-r[0];v++)for(var g=0;g<=i[1]-i[0];g++){var y=g+i[0],p=v+r[0],w=u[v%f][g%c],x=this.getRow(p),m=x.allCells[y];m.setData(w)}var b=a[0],k=a[1],C=[];r[0]!==a[0]?b=r[0]:(b=a[1]+1,k=r[1]);for(var S=b;S<=k;S++)C.push(this.getRowData(S));this.grid.afterAutofill(C),this.grid.clearAuaofill()}}},{key:"resizeColumn",value:function(e,t){this.rowCache.forEach(function(i){void 0===i.isGroupHeader&&void 0===i.isSeparator&&i.resizeColumn(e,t)})}},{key:"resizeAllColumn",value:function(e){var t=this;this.rowCache.forEach(function(i){if(void 0===i.isGroupHeader&&void 0===i.isSeparator&&i.allCells)for(var r=t.grid.originFixedWidth,n=0;n<i.allCells.length;n++){var o=i.allCells[n],a=t.grid.columns[n],s=a&&"nested"===a.type&&a.nestedColumns?a.nestedColumns.length:1;o.width+=e*s,o.x=r,r+=o.width}})}},{key:"resizeRow",value:function(e,t){if(!(t<Ai)){var i=this.rowHeights[e],r=t-i;this.rowHeights[e]=t;for(var n=e+1;n<this.rowOffsets.length;n++)this.rowOffsets[n]+=r;if(this.height+=r,this.rowCache.has(e)){var o=this.rowCache.get(e);o.height=t,o.rePaint()}for(var a=e+1;a<this.data.length;a++)if(this.rowCache.has(a)){var s=this.rowCache.get(a);s.y=this.rowOffsets[a],s.rePaint()}}}},{key:"handleCheckRow",value:function(e){if("number"===typeof e){var t=this.getRow(e);t.handleCheck()}else for(var i=this.grid.header.checked,r=0;r<this.data.length;r++){var n=this.getRow(r);n.handleCheck(i)}}},{key:"handleCheckHeader",value:function(){for(var e=0,t=0;t<this.data.length;t++)if(this.rowCache.has(t)){var i=this.rowCache.get(t);i.checked&&e++}var r=!!e,n=e&&e<this.grid.data.length;this.grid.header.handleCheck({checked:r,indeterminate:n})}},{key:"mouseMove",value:function(e,t){var i,r=!1,n=pt(this.rows);try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.isInVerticalAutofill(e,t))o.handleAutofill(e,t),r=!0;else if(o.isInsideVerticaTableBoundary(e,t)){var a=this.getViewerCursor(o,e,t);a?this.grid.target.style.cursor=a:"pointer"===this.grid.target.style.cursor&&(this.grid.target.style.cursor=""),o.mouseMove(e,t),r=!0}}}catch(l){n.e(l)}finally{n.f()}var s=this.getAddRowButtonAtPosition(e,t);s>=0?(this.grid.target.style.cursor="pointer",this.hoverAddRowButtonIndex!==s&&(this.hoverAddRowButtonIndex=s,this.grid.markDirty()),r=!0):this.hoverAddRowButtonIndex>=0&&(this.hoverAddRowButtonIndex=-1,this.grid.markDirty()),r||this.grid.isScrolling||this.grid.setHoverCell(-1,-1)}},{key:"mouseDown",value:function(e,t){var i,r=pt(this.rows);try{for(r.s();!(i=r.n()).done;){var n=i.value;n.isInVerticalAutofill(e,t)?n.handleStartAutofill(e,t):n.isInsideVerticaBodyBoundary(e,t)&&n.mouseDown(e,t)}}catch(o){r.e(o)}finally{r.f()}}},{key:"click",value:function(e,t){var i=this.getAddRowButtonAtPosition(e,t);if(i>=0&&this.grid.onAddRow){var r=this.addRowButtons[i];this.grid.onAddRow(r.groupInfo)}else{var n,o=pt(this.rows);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.isInsideVerticaBodyBoundary(e,t))if(void 0!==a.isGroupHeader){var s=a;if(s.isInsideExpandArrow(e,t)){var l=s.data,h=!l.expanded;return l.expanded=h,void(this.grid.onGroupToggle&&this.grid.onGroupToggle(l,h))}}else{if(this.handleViewerClick(a,e,t))return;a.click(e,t)}}}catch(d){o.e(d)}finally{o.f()}}}},{key:"dbClick",value:function(e,t){var i,r=pt(this.rows);try{for(r.s();!(i=r.n()).done;){var n=i.value;if(n.isInsideVerticaBodyBoundary(e,t)){if(this.handleViewerDblClick(n,e,t))return;n.dbClick(e,t)}}}catch(o){r.e(o)}finally{r.f()}}},{key:"handleViewerDblClick",value:function(e,t,i){if(!e.allCells)return!1;var r,n=li(),o=pt(e.allCells);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=this.getCellAbsX(a),l=a.y+this.grid.scrollY;if(t>=s&&t<s+a.width&&i>=l&&i<l+a.height){var h=a.viewerType||a.dataType||"text",d=n.get(h);if(d&&"function"===typeof d.onDblClick){var u=t-s,c=i-l,f=a.buildRenderContext(a.x,a.y,"#fff"),v=a.viewerData||a.buildViewerData();if(d.onDblClick(f,v,u,c))return!0}break}}}catch(g){o.e(g)}finally{o.f()}return!1}},{key:"handleViewerClick",value:function(e,t,i){if(!e.allCells)return!1;var r,n=li(),o=pt(e.allCells);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=this.getCellAbsX(a),l=a.y+this.grid.scrollY;if(t>=s&&t<s+a.width&&i>=l&&i<l+a.height){var h=a.viewerType||a.dataType||"text",d=n.get(h);if("punch-timing"===h)break;if(d&&"function"===typeof d.onClick){var u=t-s,c=i-l,f=a.buildRenderContext(a.x,a.y,"#fff"),v=a.viewerData||a.buildViewerData();if(d.onClick(f,v,u,c))return!0}break}}}catch(g){o.e(g)}finally{o.f()}return!1}},{key:"getViewerCursor",value:function(e,t,i){if(!e.allCells)return null;if(void 0!==e.isGroupHeader)return null;var r,n=li(),o=pt(e.allCells);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=this.getCellAbsX(a),l=a.y+this.grid.scrollY;if(t>=s&&t<s+a.width&&i>=l&&i<l+a.height){var h=a.viewerType||a.dataType||"text",d=n.get(h);if(d&&"function"===typeof d.getInteractiveCursor){var u=t-s,c=i-l,f=a.buildRenderContext(a.x,a.y,"#fff"),v=a.viewerData||a.buildViewerData();return d.getInteractiveCursor(f,v,u,c)}break}}}catch(g){o.e(g)}finally{o.f()}return null}},{key:"rePaintRow",value:function(e){var t=this,i=this.getRow(e);if(!i.data._rowHeight){for(var r=i.cells.length,n=null,o=this.grid.rowHeight||v,a=0;a<r;a++){var s=i.cells[a],l=s.value,h=s.width;if(l||0===l){n=this.grid.painter.getTextWrapping(l,h,10);var d=0;if(n&&(d=n.length),d>1){var u=this.grid.rowHeight||v;u+18*(d-1)>o&&(o=u+18*(d-1))}}}var c=this.rowHeights[e],f=o-c;this.rowHeights[e]=o,i.height=o;for(var g=e+1;g<this.rowOffsets.length;g++)this.rowOffsets[g]+=f;this.height+=f}this.rowCache.forEach(function(e,i){e.y=t.rowOffsets[i],e.rePaint()})}},{key:"updateVisibleRows",value:function(){var e=this,t=-this.grid.scrollY+this.grid.tableHeaderHeight,i=t+this.grid.height-this.grid.horizontalScrollerSize-this.grid.footerHeight,r=new Set,n=Date.now(),o=this.binarySearchRow(t);o=Math.max(0,o-this.bufferSize);for(var a=o;a<this.data.length;a++){var s=this.rowOffsets[a],l=s+this.rowHeights[a];if(s>i+this.bufferSize*v)break;if(l>=t-this.bufferSize*v&&(r.add(a),this.rowAccessTime.set(a,n),!this.rowCache.has(a))){var h=this.data[a];if(xi(h)||mi(h)){var d=new Ti(this.grid,a,0,this.rowOffsets[a],this.rowHeights[a],h);this.rowCache.set(a,d)}else{var u=new wi(this.grid,a,0,this.rowOffsets[a],this.rowHeights[a],h);this.rowCache.set(a,u)}}}if(this.rowCache.size>this.maxCacheSize){var c,f=fe(this.rowAccessTime.entries()).filter(function(e){var t=yt(e,1),i=t[0];return!r.has(i)}).sort(function(e,t){return e[1]-t[1]}),g=this.rowCache.size-this.maxCacheSize,y=f.slice(0,g),p=pt(y);try{for(p.s();!(c=p.n()).done;){var w=yt(c.value,1),x=w[0];this.rowCache.delete(x),this.rowAccessTime.delete(x)}}catch(S){p.e(S)}finally{p.f()}}this.visibleRowIndexes=r,this.rows=Array.from(r).sort(function(e,t){return e-t}).map(function(t){return e.rowCache.get(t)});var m,b=pt(this.rows);try{for(b.s();!(m=b.n()).done;){var k=m.value;if(k.rowHeader){var C=this.grid.selectedRowIds.has(k._rowId);k.checked!==C&&(k.checked=C,k.rowHeader.handleCheck(C))}}}catch(S){b.e(S)}finally{b.f()}}},{key:"binarySearchRow",value:function(e){var t=0,i=this.rowOffsets.length-1,r=0;while(t<=i){var n=Math.floor((t+i)/2),o=this.rowOffsets[n],a=o+this.rowHeights[n];if(a<e)t=n+1;else{if(!(o>e))return n;r=n,i=n-1}}return r}},{key:"draw",value:function(){this.updateVisibleRows();var e,t=pt(this.rows);try{for(t.s();!(e=t.n()).done;){var i=e.value;i.isVerticalVisibleOnBody()&&i.draw()}}catch(r){t.e(r)}finally{t.f()}this.drawAddRowButtons()}},{key:"getCell",value:function(e,t){var i=this.getRow(t);if(i)return i.allCells[e]}},{key:"getRow",value:function(e){if(!(e<0||e>=this.data.length)){if(!this.rowCache.has(e)){var t=this.data[e];if(xi(t)||mi(t)){var i=new Ti(this.grid,e,0,this.rowOffsets[e],this.rowHeights[e],t);this.rowCache.set(e,i)}else{var r=new wi(this.grid,e,0,this.rowOffsets[e],this.rowHeights[e],t);this.rowCache.set(e,r)}}return this.rowCache.get(e)}}},{key:"getRangeData",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.grid.selector,t=e.xArr,i=e.yArr,r=[],n=0;n<=i[1]-i[0];n++){for(var o=[],a=0;a<=t[1]-t[0];a++){var s=this.getRow(n+i[0]),l=s.allCells[a+t[0]];o.push({label:l.label,value:l.value})}r.push(o)}return r}},{key:"getSelectedData",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.grid.selector,t=e.xArr,i=e.yArr,r=[],n="",o=0;o<=i[1]-i[0];o++){for(var a=[],s=0;s<=t[1]-t[0];s++){var l=this.getRow(o+i[0]);a.push(l.allCells[s+t[0]].label)}n+=a.join("\t")+"\r",r.push(a)}return n=n?n.replace(/\r$/,""):" ",n||(n=" "),{text:n,value:r}}},{key:"clearSelectedData",value:function(){for(var e=this.grid.selector,t=e.xArr,i=e.yArr,r=0;r<=i[1]-i[0];r++)for(var n=0;n<=t[1]-t[0];n++){var o=this.getRow(r+i[0]),a=o.allCells[n+t[0]];a.setData("")}for(var s=[],l=i[0];l<=i[1];l++)s.push(this.getRowData(l));this.grid.afterClear(s)}},{key:"getData",value:function(){var e=this;return this.data.map(function(t,i){if(e.rowCache.has(i)){var r=e.rowCache.get(i),n=r.allCells,o={};return n.forEach(function(e){o[e.key]=e.value,e.labelKey&&(o[e.labelKey]=e.label)}),Object.assign({},r.data,o)}return t})}},{key:"getCheckedRows",value:function(){var e=[];return this.rowCache.forEach(function(t){if(t.checked){var i=t.allCells,r={};i.forEach(function(e){r[e.key]=e.value,e.labelKey&&(r[e.labelKey]=e.label)}),e.push(Object.assign({},t.data,r))}}),e}},{key:"getChangedRows",value:function(){var e=this,t=new Set;Object.keys(this.grid.hashChange).forEach(function(e){t.add(Number(e.split("-")[1]))});var i=[];return Array.from(t).sort().forEach(function(t){var r=e.getRow(t),n=r.allCells,o={};n.forEach(function(e){o[e.key]=e.value,e.labelKey&&(o[e.labelKey]=e.label)}),i.push(Object.assign({},r.data,o))}),i}},{key:"validate",value:function(e){for(var t=this,i=0;i<this.data.length;i++){var r=this.getRow(i),n=r.allCells;n.forEach(function(e){var i=t.getRowData(e.rowIndex);e.validate(i)})}setTimeout(function(){var i=t.getValidations();"function"===typeof e&&e(!i.length)},0)}},{key:"validateChanged",value:function(e){var t=this,i=new Set,r=[];Object.keys(this.grid.hashChange).forEach(function(e){i.add(Number(e.split("-")[1]))}),Array.from(i).sort().forEach(function(e){r.push(t.getRow(e))}),r.map(function(e){var i=e.allCells;i.forEach(function(e){var i=t.getRowData(e.rowIndex);e.validate(i)})}),setTimeout(function(){var i=t.getValidations();"function"===typeof e&&e(!i.length)},0)}},{key:"validateField",value:function(e,t){if("number"===typeof t&&"number"===typeof e){var i=this.getCell(e,t);if(i){var r=this.getRowData(i.rowIndex);i.validate(r)}}}},{key:"getValidations",value:function(){var e=[];return this.rowCache.forEach(function(t){var i=[],r=t.allCells;r.forEach(function(e){!e.valid&&i.push({title:e.title,key:e.key,value:e.value,message:e.message})}),i.length&&e.push(i)}),e}},{key:"setValidations",value:function(e){var t=this;e&&Array.isArray(e)&&e.forEach(function(e){for(var i=0;i<t.data.length;i++)if(t.data[i][t.grid.rowKey]===e[t.grid.rowKey]){var r=t.getRow(i),n=r.allCells;n.forEach(function(t){var i=!e[t.key];Object.prototype.hasOwnProperty.call(e,t.key)&&t.resetValidate(i,e[t.key])});break}})}},{key:"clearValidations",value:function(){this.rowCache.forEach(function(e){var t=e.allCells;t.forEach(function(e){e.resetValidate()})})}},{key:"getRowData",value:function(e){var t=this.getRow(e),i={};return t.allCells.forEach(function(e){i[e.key]=e.value,e.labelKey&&(i[e.labelKey]=e.label)}),Object.assign({},t.data,i)}},{key:"getCellData",value:function(e,t){var i=this.getCell(e,t);return{title:i.title,key:i.key,value:i.value}}},{key:"updateData",value:function(e){var t=this;e&&Array.isArray(e)&&e.forEach(function(e){for(var i=0;i<t.data.length;i++)if(t.data[i][t.grid.rowKey]===e[t.grid.rowKey]){if(Object.assign(t.data[i],e),t.rowCache.has(i)){var r=t.rowCache.get(i),n=r.allCells;n.forEach(function(t){Object.prototype.hasOwnProperty.call(e,t.key)&&t.resetValidate(!0)})}break}})}},{key:"updateCellData",value:function(e){}},{key:"getCheckedRowObjects",value:function(){var e=[];return this.rowCache.forEach(function(t){t.checked&&e.push(t)}),e}},{key:"getRowAtPosition",value:function(e){var t,i=pt(this.rows);try{for(i.s();!(t=i.n()).done;){var r=t.value,n=r.y+this.grid.scrollY;if(e>=n&&e<n+r.height)return r}}catch(o){i.e(o)}finally{i.f()}return null}},{key:"calculateAddRowButtons",value:function(){if(this.addRowButtons=[],this.grid.onAddRow){var e=this.data.length;if(0===e)return this.addRowButtons.push({y:this.grid.tableHeaderHeight,groupInfo:void 0}),void(this.height+=Ri);var t=this.data.some(function(e){return xi(e)||mi(e)});if(t){for(var i=[],r=0,n=0;n<e;n++){var o=this.data[n];if(xi(o))i.push({groupId:o.id,groupName:o.name,groupLevel:o.groupLevel,path:o.path,valuePath:o.valuePath,property:o.property,value:o.value,parentId:o.parentId,hasDataRows:!1});else if(mi(o)){if(n>0&&!xi(this.data[n-1])&&!mi(this.data[n-1])){var a=this.findLeafGroupFromStack(i);if(a){var s=this.rowOffsets[n];this.addRowButtons.push({y:s,groupInfo:F({},a)}),r+=Ri;for(var l=n;l<e;l++)this.rowOffsets[l]+=Ri}}var h=o.parentId;if(void 0!==h&&null!==h)while(i.length>0){var d=i[i.length-1];if(String(d.groupId)===String(h)){i.pop();break}i.pop()}}else i.length>0&&(i[i.length-1].hasDataRows=!0)}var u=this.data[e-1];if(!xi(u)&&!mi(u)){var c=this.findLeafGroupFromStack(i);if(c){var f=this.rowOffsets[e-1]+this.rowHeights[e-1];this.addRowButtons.push({y:f,groupInfo:F({},c)}),r+=Ri}}this.height+=r}else{var v=this.rowOffsets[e-1]+this.rowHeights[e-1];this.addRowButtons.push({y:v,groupInfo:void 0}),this.height+=Ri}}}},{key:"findLeafGroupFromStack",value:function(e){for(var t=e.length-1;t>=0;t--)if(e[t].hasDataRows)return e[t];return e.length>0?e[e.length-1]:null}},{key:"drawAddRowButtons",value:function(){if(0!==this.addRowButtons.length)for(var e=this.grid.painter,t=e.ctx,i=this.grid.tableHeaderHeight,r=this.grid.height-this.grid.horizontalScrollerSize,n=Math.max(this.grid.width-this.grid.verticalScrollerSize,this.grid.tableWidth),o=0;o<this.addRowButtons.length;o++){var a=this.addRowButtons[o],s=a.y+this.grid.scrollY;if(!(s+Ri<=i||s>=r)){var l=this.hoverAddRowButtonIndex===o;t.save(),t.fillStyle=l?"#f0f5ff":"#fafafa",t.fillRect(0,s,n,Ri),t.strokeStyle=this.grid.borderColor,t.lineWidth=1,t.beginPath(),t.moveTo(0,s+Ri-.5),t.lineTo(n,s+Ri-.5),t.stroke();var h=16,d=16,u=d+h/2,c=s+Ri/2,f=h/2;t.beginPath(),t.arc(u,c,f,0,2*Math.PI),t.strokeStyle=l?"#1890ff":"#bfbfbf",t.lineWidth=1.5,t.stroke();var v=5;t.beginPath(),t.moveTo(u-v,c),t.lineTo(u+v,c),t.strokeStyle=l?"#1890ff":"#bfbfbf",t.lineWidth=1.5,t.stroke(),t.beginPath(),t.moveTo(u,c-v),t.lineTo(u,c+v),t.stroke(),t.restore()}}}},{key:"getAddRowButtonAtPosition",value:function(e,t){if(0===this.addRowButtons.length)return-1;if(e<0||e>this.grid.width-this.grid.verticalScrollerSize)return-1;for(var i=0;i<this.addRowButtons.length;i++){var r=this.addRowButtons[i],n=r.y+this.grid.scrollY;if(t>=n&&t<n+Ri)return i}return-1}},{key:"getCellAbsX",value:function(e){return"right"===e.fixed?this.grid.width-(this.grid.tableWidth-e.x-e.width)-e.width-this.grid.verticalScrollerSize:"left"===e.fixed?e.x:e.x+this.grid.scrollX}}])}(),Ei=Di,Pi=function(e){function t(e,i,r,n,o,a,s){var l,h;return wt(this,t),h=Ot(this,t,[e,r,n,o,a]),B(h,"level",void 0),B(h,"text",void 0),B(h,"colspan",void 0),B(h,"rowspan",void 0),B(h,"required",void 0),B(h,"index",void 0),B(h,"colType",void 0),B(h,"parentKey",void 0),B(h,"nestedKey",void 0),B(h,"nestedChildOffset",void 0),B(h,"colId",void 0),B(h,"color",void 0),h.fixed=s.fixed,h.level=s.level,h.text=s.title,h.colspan=s.colspan||1,h.rowspan=s.rowspan,h.required=s.rule&&s.rule.required||null,h.index=i,h.colType=s.type,h.parentKey=s.parentKey,h.nestedKey=s.nestedKey,h.nestedChildOffset=null!==(l=s.nestedChildOffset)&&void 0!==l?l:-1,h.color=s.color,"nested-child"===s.type&&void 0!==s.nestedChildOffset?h.colId="".concat(i,":").concat(s.nestedChildOffset):h.colId=String(i),h}return Bt(t,e),mt(t,[{key:"isVisibleOnScreen",value:function(){return!(this.x+(this.width||0)-this.grid.fixedLeftWidth+this.grid.scrollX<=0||this.x+this.grid.scrollX>=this.grid.width-this.grid.fixedRightWidth)}},{key:"draw",value:function(){var e=this.grid,t=e.width,i=e.tableWidth,r=e.verticalScrollerSize,n=e.scrollX,o=e.painter,a=e.fillColor,s=e.borderColor,l=e.borderWidth,h="right"===this.fixed?t-(i-this.x-(this.width||0))-(this.width||0)-r:"left"===this.fixed?this.x:this.x+n;if(o.drawRect(h,this.y,this.width||0,this.height,{fillColor:a,borderColor:s,borderWidth:l}),this.color){var d=this.width||0;"nested"===this.colType?(o.drawRect(h,this.y,d,this.height,{fillColor:this.color}),o.drawLine([[h,this.y],[h,this.y+this.height]],{borderColor:this.color,borderWidth:2}),o.drawLine([[h+d,this.y],[h+d,this.y+this.height]],{borderColor:this.color,borderWidth:2}),o.drawLine([[h,this.y],[h+d,this.y]],{borderColor:this.color,borderWidth:2})):"nested-child"===this.colType&&(0===this.nestedChildOffset&&o.drawLine([[h,this.y],[h,this.y+this.height]],{borderColor:this.color,borderWidth:2}),o.drawLine([[h+d,this.y],[h+d,this.y+this.height]],{borderColor:this.color,borderWidth:2}))}var u=this.grid.isColSelected(this.colId),c="nested"===this.colType&&this.colspan>1&&(this.grid.isColSelected(this.colId)||this.grid.isNestedParentAllChildrenSelected(this.index)),f="nested-child"===this.colType&&this.grid.isColSelected(String(this.index));if(u||c||f){o.drawRect(h,this.y,this.width||0,this.height,{fillColor:"rgba(82,146,247,0.15)"});var v=[[h,this.y+this.height],[h+(this.width||0),this.y+this.height]];o.drawLine(v,{borderColor:"rgb(82,146,247)",borderWidth:2})}this.required&&this.grid.painter.drawIcon("*",this.text,h,this.y+this.height/2,this.width||0,10,6,4,{font:'normal 20px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',color:T}),this.grid.painter.drawCellText(this.text,h,this.y,this.width||0,this.height,10,{color:this.grid.color,align:"center"})}}])}(Ft),Oi=Pi,Mi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAAATtJREFUaEPtWUFOw0AMtHuFqOUn/QEtfICfwJmABIf2O7yANv1REc11p0qPUbYrp+uiRZOr7bFnxnuJVQr/tPD5hQT+2kE6QAcuVODsCi3W7ZMGPItgrqqzC3uZywFpAHw271UTK44S6IafAF/mrg4FIWAZIxElsFz9Nip67zCPGRKC3bauFkOFUQIPqwPMnZwKAOy3b9VdsQS6wTf17aDYRThAAk6rbYLlCpnkckimAw6imiDpgEkuh2Q64CCqCTK7A9+vN6YBUsmP6/ZsCgn05aEDPUWuvkKpnc4dz/4Gcg+YwiOBlELecTrgrXAKnw6kFPKO0wFvhVP4dCClkHe8cAfws6mrwfvE//29XvyBo9vp04kJ4UVF5iI69d7zPn532ECQj1EnpmsPO7Yf78RjlctVRwdyKTkW5wh5VMYxXHcAVgAAAABJRU5ErkJggg==",Bi=new Image,Hi=new Image,Fi=new Image;function Li(e){var t=lt(e),i=t.reduce(function(e,t){return e+(t.width||R[t.size||"mini"])},0);return i}Bi.src=Lt,Hi.src=Wt,Fi.src=Mi;var Wi=function(e){function t(e,i,r){var n;return wt(this,t),n=Ot(this,t,[e,i,r]),B(n,"checked",void 0),B(n,"indeterminate",void 0),B(n,"allColumnHeaders",void 0),B(n,"fixedColumnHeaders",void 0),B(n,"columnHeaders",void 0),B(n,"resizeTarget",void 0),B(n,"resizeOriginalX",void 0),B(n,"resizeOriginalWidth",void 0),B(n,"isResizing",void 0),n.checked=!1,n.indeterminate=!1,n.allColumnHeaders=[],n.fixedColumnHeaders=[],n.columnHeaders=[],n.resizeTarget=null,n.resizeOriginalX=0,n.resizeOriginalWidth=0,n.isResizing=!1,n.paint(),n}return Bt(t,e),mt(t,[{key:"paint",value:function(){var e=this;this.allColumnHeaders=[],this.fixedColumnHeaders=[],this.columnHeaders=[];var t=this.grid.headers.some(function(e){return"nested"===e.type&&e.nestedColumns&&e.nestedColumns.length>0}),i=0,r=function(n,o,a){for(var s=n.length,l=a,h=0;h<s;h++){var d=n[h],u=e.grid.headerHeight*(d.rowspan||1),c=e.grid.headerHeight*(d.level||0),f=d.width||R[d.size||"mini"];if("nested"===d.type&&d.nestedColumns&&d.nestedColumns.length>0){f=d.nestedColumns.reduce(function(e,t){return e+(t.width||80)},0);var v="";o?v=o.fixed||"":d.fixedLeft?v="left":d.fixedRight&&(v="right"),d.fixed=v;var g=new Oi(e.grid,i,l,c,f,e.grid.headerHeight,F(F({},d),{},{level:0,rowspan:1,colspan:d.nestedColumns.length,color:d.color}));e.allColumnHeaders.push(g),v?e.fixedColumnHeaders.push(g):e.columnHeaders.push(g);for(var y=l,p=0;p<d.nestedColumns.length;p++){var w=d.nestedColumns[p],x=w.width||80,m=new Oi(e.grid,i,y,e.grid.headerHeight,x,e.grid.headerHeight,{title:w.title,key:w.key,fixed:v,level:1,rowspan:1,colspan:1,type:"nested-child",parentKey:d.key,nestedKey:w.key,nestedChildOffset:p,align:w.align,color:d.color});e.allColumnHeaders.push(m),v?e.fixedColumnHeaders.push(m):e.columnHeaders.push(m),y+=x}i++,l+=f}else if(d.children){f=Li(d.children);var b="";o?b=o.fixed||"":d.fixedLeft?b="left":d.fixedRight&&(b="right"),d.fixed=b;var k=new Oi(e.grid,i,l,c,f,u,d);e.allColumnHeaders.push(k),b?e.fixedColumnHeaders.push(k):e.columnHeaders.push(k),!d.children&&i++,d.children&&r(d.children,d,l),l+=f}else{t&&!o&&(d.rowspan=2,u=2*e.grid.headerHeight);var C="";o?C=o.fixed||"":d.fixedLeft?C="left":d.fixedRight&&(C="right"),d.fixed=C;var S=new Oi(e.grid,i,l,c,f,u,d);e.allColumnHeaders.push(S),C?e.fixedColumnHeaders.push(S):e.columnHeaders.push(S),i++,l+=f}}};r(this.grid.headers,null,this.grid.originFixedWidth)}},{key:"mouseDown",value:function(e,t,i){if(this.resizeTarget)this.resizeOriginalX=e,this.resizeOriginalWidth=this.resizeTarget.width,this.isResizing=!0;else{var r,n=pt(this.allColumnHeaders);try{for(n.s();!(r=n.n()).done;){var o=r.value,a=void 0;if(a="right"===o.fixed?this.grid.width-(this.grid.tableWidth-o.x-o.width)-o.width-this.grid.verticalScrollerSize:"left"===o.fixed?o.x:o.x+this.grid.scrollX,e>a&&e<a+o.width&&t>o.y&&t<o.y+o.height){var s=!!i&&(i.ctrlKey||i.metaKey),l=!!i&&i.shiftKey,h=o.colspan<=1||"nested"===o.colType;return!s&&!l&&this.grid.isColSelected(o.colId)&&h?void this.grid.startColDrag(o.colId,e):void this.grid.selectCols(o,i)}}}catch(d){n.e(d)}finally{n.f()}}}},{key:"resizing",value:function(e,t){if(this.isResizing){var i=this.resizeTarget.index,r=e-this.resizeOriginalX,n=this.resizeTarget.width+r,o=this.grid.columns.filter(function(e){return e.fixedRight}).length;if((i===this.grid.columnsLength-o-1||this.grid.width===this.grid.tableWidth+this.grid.verticalScrollerSize||n<g)&&n<=this.resizeOriginalWidth)return;this.grid.colResizeIndicatorX=e,this.grid.resizeColumn(i,r),this.resizeOriginalX=e}else{this.resizeTarget=null;var a,s=pt(this.allColumnHeaders);try{for(s.s();!(a=s.n()).done;){var l=a.value;e>l.x+this.grid.scrollX+l.width-4&&e<l.x+this.grid.scrollX+l.width+4&&e<this.grid.width-this.grid.verticalScrollerSize-4&&l.colspan<=1&&(this.grid.target.style.cursor="col-resize",this.resizeTarget=l)}}catch(h){s.e(h)}finally{s.f()}}}},{key:"endResize",value:function(){this.resizeTarget=null,this.isResizing=!1,this.grid.colResizeIndicatorX=-1,this.grid.markDirty()}},{key:"getColAtPosition",value:function(e,t,i){if(i){var r,n=pt(this.allColumnHeaders);try{for(n.s();!(r=n.n()).done;){var o=r.value;if("nested-child"!==o.colType&&!(o.colspan>1&&"nested"!==o.colType)){var a=void 0;if(a="right"===o.fixed?this.grid.width-(this.grid.tableWidth-o.x-o.width)-o.width-this.grid.verticalScrollerSize:"left"===o.fixed?o.x:o.x+this.grid.scrollX,e>=a&&e<a+o.width)return o}}}catch(g){n.e(g)}finally{n.f()}return null}if(void 0!==t){var s,l=pt(this.allColumnHeaders);try{for(l.s();!(s=l.n()).done;){var h=s.value,d=void 0;if(d="right"===h.fixed?this.grid.width-(this.grid.tableWidth-h.x-h.width)-h.width-this.grid.verticalScrollerSize:"left"===h.fixed?h.x:h.x+this.grid.scrollX,e>=d&&e<d+h.width&&t>=h.y&&t<h.y+h.height){if(h.colspan>1&&"nested"!==h.colType)continue;return h}}}catch(g){l.e(g)}finally{l.f()}}var u,c=pt(this.allColumnHeaders);try{for(c.s();!(u=c.n()).done;){var f=u.value;if(!(f.colspan>1)){var v=void 0;if(v="right"===f.fixed?this.grid.width-(this.grid.tableWidth-f.x-f.width)-f.width-this.grid.verticalScrollerSize:"left"===f.fixed?f.x:f.x+this.grid.scrollX,e>=v&&e<v+f.width)return f}}}catch(g){c.e(g)}finally{c.f()}return null}},{key:"handleCheck",value:function(e){e?(this.checked="boolean"===typeof e.checked?e.checked:this.checked,this.indeterminate="boolean"===typeof e.indeterminate?e.indeterminate:this.indeterminate):this.indeterminate?this.indeterminate=!1:this.checked=!this.checked}},{key:"resizeColumn",value:function(e,t){var i,r=this.grid.width-this.grid.tableWidth-this.grid.verticalScrollerSize-this.grid.scrollX,n=pt(this.allColumnHeaders);try{for(n.s();!(i=n.n()).done;){var o=i.value;r<=t&&(e>=o.index&&e<o.index+o.colspan&&(o.width+=t),o.index>e&&!(0===r&&t<=0)&&(o.x+=t)),0===r&&t<=0&&(e>=o.index&&e<o.index+o.colspan&&(o.width+=t),o.index===e+1&&(o.width-=t,o.x+=t))}}catch(a){n.e(a)}finally{n.f()}}},{key:"resizeAllColumn",value:function(e){var t,i={x:this.grid.originFixedWidth,width:0,level:0},r=pt(this.allColumnHeaders);try{for(r.s();!(t=r.n()).done;){var n=t.value;n.width+=e*n.colspan,n.level&&n.level!==i.level?n.x=i.x:n.x=i.x+i.width,i=n}}catch(o){r.e(o)}finally{r.f()}}},{key:"draw",value:function(){this.grid.painter.drawRect(this.x,this.y,this.grid.width,this.grid.tableHeaderHeight,{fillColor:"#f9f9f9",shadowBlur:4,shadowColor:"rgba(143, 140, 140, 0.22)",shadowOffsetX:0,shadowOffsetY:2});var e=this.grid.painter.ctx;e.save(),e.beginPath(),e.rect(this.grid.fixedLeftWidth,this.y,this.grid.width-this.grid.fixedLeftWidth-this.grid.fixedRightWidth,this.grid.tableHeaderHeight),e.clip();var t,i=pt(this.columnHeaders);try{for(i.s();!(t=i.n()).done;){var r=t.value;r.isVisibleOnScreen()&&r.draw()}}catch(g){i.e(g)}finally{i.f()}e.restore(),0!==this.grid.scrollX&&this.grid.painter.drawRect(this.x,this.y,this.grid.fixedLeftWidth,this.grid.tableHeaderHeight,{fillColor:"#f9f9f9",shadowBlur:4,shadowColor:"rgba(143, 140, 140, 0.22)",shadowOffsetX:2,shadowOffsetY:-2}),this.grid.tableWidth+this.grid.verticalScrollerSize-this.grid.width+this.grid.scrollX>0&&this.grid.painter.drawRect(this.grid.width-this.grid.fixedRightWidth,this.y,this.grid.fixedRightWidth-this.grid.verticalScrollerSize,this.grid.tableHeaderHeight,{fillColor:"#f9f9f9",shadowBlur:4,shadowColor:"rgba(143, 140, 140, 0.22)",shadowOffsetX:-2,shadowOffsetY:-2});var n,o=pt(this.fixedColumnHeaders);try{for(o.s();!(n=o.n()).done;){var a=n.value;a.draw()}}catch(g){o.e(g)}finally{o.f()}var s={borderColor:this.grid.borderColor,borderWidth:this.grid.borderWidth,fillColor:this.grid.fillColor},l=c+(this.grid.showCheckbox?f:0);if(this.grid.painter.drawRect(0,0,l,this.grid.tableHeaderHeight,s),this.grid.showCheckbox){var h=this.checked?this.indeterminate?Fi:Bi:Hi,d=20,u=8,v=(this.grid.tableHeaderHeight-d)/2;this.grid.painter.drawImage(h,u,v,d,d)}}}])}(Ft),zi=Wi,Ni=[{key:"max",label:"最大值"},{key:"min",label:"最小值"},{key:"sum",label:"求和"},{key:"avg",label:"平均值"}],Vi=[{key:"max",label:"最大值"},{key:"min",label:"最小值"},{key:"sum",label:"求和"},{key:"avg",label:"平均值"}],_i=[{key:"max",label:"最晚"},{key:"min",label:"最早"}],ji=[{key:"count",label:"总数"},{key:"count_missing",label:"未填"},{key:"count_value",label:"已填"},{key:"count_distinct",label:"去重计数"}],Yi=[{key:"no_show",label:"不展示"}];function Gi(e){return"numberInputEditor"===e?[].concat(ji,Ni,Yi):"durationEditor"===e?[].concat(ji,Vi,Yi):"datetimeEditor"===e?[].concat(ji,_i,Yi):[].concat(ji,Yi)}var Xi=12,Ui=8,qi="#767e89",Ki="#767e89",Ji=function(){function e(t){wt(this,e),B(this,"grid",void 0),B(this,"footerData",void 0),B(this,"hoverColIndex",void 0),this.grid=t,this.footerData={},this.hoverColIndex=-1}return mt(e,[{key:"height",get:function(){return u}},{key:"y",get:function(){return this.grid.height-this.grid.horizontalScrollerSize-this.height}},{key:"setFooterData",value:function(e){this.footerData=F({},e),this.grid.draw()}},{key:"setFooterCellData",value:function(e,t){this.footerData=F(F({},this.footerData),{},B({},e,F({},t))),this.grid.draw()}},{key:"cleanupFooterData",value:function(e){for(var t={},i=0,r=Object.keys(this.footerData);i<r.length;i++){var n=r[i];e.has(n)&&(t[n]=this.footerData[n])}this.footerData=t}},{key:"isInFooterArea",value:function(e,t){return t>=this.y&&t<this.y+this.height&&e>=0&&e<this.grid.width-this.grid.verticalScrollerSize}},{key:"getHoverColumnIndex",value:function(e){for(var t=this.grid.header.allColumnHeaders,i=0;i<t.length;i++){var r=t[i];if("nested-child"!==r.colType){var n=this.getColumnScreenX(r),o=r.width||0;if(e>=n&&e<n+o)return i}}return-1}},{key:"getColumnScreenX",value:function(e){return"right"===e.fixed?this.grid.width-(this.grid.tableWidth-e.x-(e.width||0))-(e.width||0)-this.grid.verticalScrollerSize:"left"===e.fixed?e.x:e.x+this.grid.scrollX}},{key:"onClick",value:function(e,t,i,r){if(this.isInFooterArea(e,t)){var n=this.getHoverColumnIndex(e);if(!(n<0)){var o=this.grid.header.allColumnHeaders[n];if(o){var a=o.colId,s=this.grid.headers,l=this.findColumnConfig(s,o.index),h=(null===l||void 0===l?void 0:l.editor)||"",d=this.footerData[a],u=(null===d||void 0===d?void 0:d.statisticType)||"no_show",c=Gi(h);this.grid.onFooterCellClick&&this.grid.onFooterCellClick({columnKey:a,editor:h,statisticType:u,statisticOptions:c,clientX:i,clientY:r})}}}}},{key:"findColumnConfig",value:function(e,t){if(!e)return null;var i,r=pt(e);try{for(r.s();!(i=r.n()).done;){var n=i.value;if(n.index===t)return n;if(n.children){var o=this.findColumnConfig(n.children,t);if(o)return o}}}catch(a){r.e(a)}finally{r.f()}return null}},{key:"draw",value:function(){var e=this.grid,t=e.painter,i=e.borderColor,r=e.borderWidth,n=e.width,o=e.verticalScrollerSize,a=this.y,s=n-o;t.drawRect(0,a,s,this.height,{fillColor:"#f9f9f9",borderColor:i,borderWidth:r}),t.drawLine([[0,a],[s,a]],{borderColor:i,borderWidth:r});var l=this.grid.originFixedWidth;t.drawRect(0,a,l,this.height,{fillColor:"#f9f9f9",borderColor:i,borderWidth:r});var h,d=this.grid.header.columnHeaders,u=pt(d);try{for(u.s();!(h=u.n()).done;){var c=h.value;c.isVisibleOnScreen()&&("nested-child"!==c.colType&&this.drawFooterCell(c,a))}}catch(p){u.e(p)}finally{u.f()}0!==this.grid.scrollX&&this.grid.fixedLeftWidth>0&&t.drawRect(0,a,this.grid.fixedLeftWidth,this.height,{fillColor:"#f9f9f9",shadowBlur:4,shadowColor:"rgba(143, 140, 140, 0.22)",shadowOffsetX:2,shadowOffsetY:-2}),this.grid.tableWidth+o-n+this.grid.scrollX>0&&this.grid.fixedRightWidth>0&&t.drawRect(n-this.grid.fixedRightWidth,a,this.grid.fixedRightWidth-o,this.height,{fillColor:"#f9f9f9",shadowBlur:4,shadowColor:"rgba(143, 140, 140, 0.22)",shadowOffsetX:-2,shadowOffsetY:-2});var f,v=this.grid.header.fixedColumnHeaders,g=pt(v);try{for(g.s();!(f=g.n()).done;){var y=f.value;"nested-child"!==y.colType&&this.drawFooterCell(y,a)}}catch(p){g.e(p)}finally{g.f()}t.drawRect(0,a,l,this.height,{fillColor:"#f9f9f9",borderColor:i,borderWidth:r})}},{key:"drawFooterCell",value:function(e,t){var i=this.grid,r=i.painter,n=i.borderColor,o=i.borderWidth,a=r.ctx,s=this.getColumnScreenX(e),l=e.width||0;r.drawRect(s,t,l,this.height,{fillColor:"#f9f9f9",borderColor:n,borderWidth:o});var h=e.colId,d=this.footerData[h],u=this.hoverColIndex===e.index&&!this.grid.isScrolling,c=(null===d||void 0===d?void 0:d.statisticType)||"no_show",f=null===d||void 0===d?void 0:d.value;if(a.save(),a.beginPath(),a.rect(s,t,l,this.height),a.clip(),"no_show"!==c&&f){a.font='12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',a.fillStyle=qi,a.textAlign="left",a.textBaseline="middle";var v=s+Ui,g=t+this.height/2,y=u?l-2*Ui-Xi-4:l-2*Ui;a.fillText(f,v,g,y),u&&this.drawArrowIcon(a,s+l-Ui-Xi,t)}else u&&(this.drawHintText(a,s,t,l),this.drawArrowIcon(a,s+l-Ui-Xi,t));a.restore()}},{key:"drawHintText",value:function(e,t,i,r){e.font='12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',e.fillStyle=Ki,e.textAlign="left",e.textBaseline="middle";var n=t+Ui,o=i+this.height/2,a=r-2*Ui-Xi-4;e.fillText("数据统计",n,o,a)}},{key:"drawArrowIcon",value:function(e,t,i){var r=i+this.height/2,n=8,o=5;e.beginPath(),e.moveTo(t+(Xi-n)/2,r-o/2),e.lineTo(t+Xi/2,r+o/2),e.lineTo(t+(Xi+n)/2,r-o/2),e.strokeStyle=qi,e.lineWidth=1.5,e.stroke()}}])}(),Qi=Ji;i(5746);function Zi(e){var t=e.target,i=t.innerHTML,r=this.suggest,n=this.validator,o=this.cell;if(null!==o){if(o.nestedGrid)return t.innerHTML="",void this.hide();"editable"in o&&!0===o.editable||void 0===o.editable?(this.value=i,n&&("list"===n.type?r.search(i):r.hide())):t.innerHTML=""}else this.value=i}function $i(e){if(13===e.keyCode||27===e.keyCode)return this.grid.doneEdit();!e.metaKey&&e.ctrlKey}var er=function(){function e(t){var i=this;wt(this,e),B(this,"grid",void 0),B(this,"areaEl",void 0),B(this,"textEl",void 0),B(this,"el",void 0),B(this,"type",void 0),B(this,"fixed",void 0),B(this,"selectOptions",void 0),B(this,"editorXIndex",void 0),B(this,"editorYIndex",void 0),B(this,"xIndex",void 0),B(this,"yIndex",void 0),B(this,"show",void 0),B(this,"value",void 0),B(this,"cell",void 0),B(this,"suggest",void 0),B(this,"validator",void 0),this.grid=t,this.areaEl=Ct("div","".concat(h,"-editor-area")).children(this.textEl=Ct("div","").on("input",function(e){return Zi.call(i,e)}).on("keydown",function(e){return $i.call(i,e)})),this.textEl.attr("contenteditable",!0),this.el=Ct("div","".concat(h,"-editor")).child(this.areaEl).hide(),this.type="text",this.fixed=!1,this.selectOptions=[],this.editorXIndex=0,this.editorYIndex=0,this.xIndex=0,this.yIndex=0,this.show=!1,this.value="",this.cell=null}return mt(e,[{key:"fire",value:function(e){e.nestedGrid||(this.cell=e,this.setoffset(),this.show=!0,this.el.show(),this.textEl.focus())}},{key:"hide",value:function(){this.cell=null,this.el.hide(),this.show=!1,this.value="",this.textEl.html("")}},{key:"setData",value:function(e){this.value=e,this.textEl.html(e)}},{key:"setoffset",value:function(){if(this.cell){var e=this.cell,t=e.x,i=e.y,r=e.width,n=e.height;this.el.offset({left:0,top:0}),this.areaEl.offset({left:t+this.grid.scrollX-1,top:i+this.grid.scrollY-1}),this.textEl.offset({"min-width":r+2,"min-height":n})}}}])}(),tr=er,ir=function(){function e(t){wt(this,e),B(this,"grid",void 0),B(this,"horizontalScroller",void 0),B(this,"verticalScroller",void 0),B(this,"mouseOriginalX",void 0),B(this,"mouseOriginalY",void 0),this.grid=t,this.horizontalScroller={x:0,move:!1,focus:!1,size:0,ratio:1,has:!1},this.verticalScroller={y:0,move:!1,focus:!1,size:0,ratio:1,has:!1}}return mt(e,[{key:"reset",value:function(){var e=this.grid,t=e.width,i=e.height,r=e.tableWidth,n=e.tableHeight,o=e.originFixedWidth,a=e.tableHeaderHeight,s=e.verticalScrollerSize,l=e.horizontalScrollerSize,h=t-o-s,d=i-a-l-this.grid.footerHeight,u=h/r,c=d/n;this.horizontalScroller.size=u>=1?0:parseInt(String(u*h)),this.verticalScroller.size=c>=1?0:parseInt(String(c*d)),this.horizontalScroller.size<30&&(this.horizontalScroller.size=30),this.verticalScroller.size<30&&(this.verticalScroller.size=30),this.horizontalScroller.has=!(r<=t-p),this.verticalScroller.has=!(n<=i-p-this.grid.footerHeight),this.horizontalScroller.ratio=this.horizontalScroller.has?(t-o-p-this.horizontalScroller.size-w)/(r+p-t):0,this.verticalScroller.ratio=this.verticalScroller.has?(i-a-this.grid.footerHeight-p-this.verticalScroller.size-w)/(n+p+this.grid.footerHeight-i):0}},{key:"update",value:function(e,t){"HORIZONTAL"===t?this.grid.scrollX+=e:"VERTICAL"===t&&(this.grid.scrollY+=e),this.setPosition()}},{key:"setPosition",value:function(){this.horizontalScroller.x=-parseInt(String(this.grid.scrollX*this.horizontalScroller.ratio)),this.verticalScroller.y=-parseInt(String(this.grid.scrollY*this.verticalScroller.ratio))}},{key:"isInsideHorizontalScroller",value:function(e,t){return e>=this.grid.originFixedWidth&&e<=this.grid.width-p&&t>this.grid.height-p&&t<this.grid.height-(p-w)/2}},{key:"isInsideHorizontalScrollerBar",value:function(e,t){return this.horizontalScroller.has&&e>=this.grid.originFixedWidth+this.horizontalScroller.x&&e<=this.grid.originFixedWidth+this.horizontalScroller.x+this.horizontalScroller.size+w&&t>this.grid.height-p&&t<this.grid.height}},{key:"isInsideVerticalScroller",value:function(e,t){return e>this.grid.width-p&&e<this.grid.width-(p-w)/2&&t>this.grid.tableHeaderHeight&&t<this.grid.height-p}},{key:"isInsideVerticalScrollerBar",value:function(e,t){return this.verticalScroller.has&&e>this.grid.width-p&&e<this.grid.width&&t>this.grid.tableHeaderHeight+this.verticalScroller.y&&t<this.grid.tableHeaderHeight+this.verticalScroller.y+this.verticalScroller.size+w}},{key:"mouseDown",value:function(e,t){this.isInsideHorizontalScrollerBar(e,t)?(this.mouseOriginalX=e,this.horizontalScroller.move=!0):this.isInsideVerticalScrollerBar(e,t)&&(this.mouseOriginalY=t,this.verticalScroller.move=!0)}},{key:"mouseMove",value:function(e,t){if(this.horizontalScroller.focus=!!this.isInsideHorizontalScroller(e,t),this.verticalScroller.focus=!!this.isInsideVerticalScroller(e,t),!this.grid.editor.show)if(this.horizontalScroller.move){this.grid.setScrolling(!0);var i=e-this.mouseOriginalX,r=this.horizontalScroller.x+i,n=this.grid.width-this.grid.originFixedWidth-this.horizontalScroller.size-p-w;r>0&&r<n?(this.horizontalScroller.x+=i,this.grid.scrollX=-this.horizontalScroller.x/this.horizontalScroller.ratio):r<=0?(this.horizontalScroller.x=0,this.grid.scrollX=0):(this.horizontalScroller.x=n,this.grid.scrollX=this.grid.width-this.grid.tableWidth-p),this.mouseOriginalX=e}else if(this.verticalScroller.move){this.grid.setScrolling(!0);var o=t-this.mouseOriginalY,a=this.verticalScroller.y+o,s=this.grid.height-this.grid.tableHeaderHeight-this.grid.footerHeight-this.verticalScroller.size-p-w;a>0&&a<s?(this.verticalScroller.y=a,this.grid.scrollY=-this.verticalScroller.y/this.verticalScroller.ratio):a<=0?(this.verticalScroller.y=0,this.grid.scrollY=0):(this.verticalScroller.y=s,this.grid.scrollY=this.grid.height-this.grid.tableHeight-p-this.grid.footerHeight),this.mouseOriginalY=t}}},{key:"mouseUp",value:function(){this.horizontalScroller.move=!1,this.verticalScroller.move=!1}},{key:"draw",value:function(){var e=this.grid.width-p,t=this.grid.height-p,i=p/2,r=w/2;if(this.grid.painter.drawRect(0,t,e+p,p,{fillColor:this.grid.fillColor,borderColor:this.grid.borderColor,borderWidth:this.grid.borderWidth}),this.grid.painter.drawLine([[this.grid.originFixedWidth,t],[this.grid.originFixedWidth,t+p]],{borderColor:this.grid.borderColor,borderWidth:this.grid.borderWidth}),this.grid.painter.drawLine([[e,t],[e,t+p]],{borderColor:this.grid.borderColor,borderWidth:this.grid.borderWidth}),this.horizontalScroller.has&&this.grid.painter.drawLine([[this.grid.originFixedWidth+this.horizontalScroller.x+r,t+i],[this.grid.originFixedWidth+this.horizontalScroller.x+r+this.horizontalScroller.size,t+i]],{borderColor:this.horizontalScroller.move||this.horizontalScroller.focus?m:x,borderWidth:w,lineCap:"round"}),this.grid.painter.drawRect(e,0,p,t,{fillColor:this.grid.fillColor,borderColor:this.grid.borderColor,borderWidth:this.grid.borderWidth}),this.grid.painter.drawLine([[e,this.grid.tableHeaderHeight],[e+p,this.grid.tableHeaderHeight]],{borderColor:this.grid.borderColor,borderWidth:this.grid.borderWidth}),this.verticalScroller.has&&this.grid.painter.drawLine([[e+i,this.verticalScroller.y+r+this.grid.tableHeaderHeight],[e+i,this.verticalScroller.y+r+this.grid.tableHeaderHeight+this.verticalScroller.size]],{borderColor:this.verticalScroller.move||this.verticalScroller.focus?m:x,borderWidth:w,lineCap:"round"}),this.grid.selector.show){var n=this.grid,o=n.range,a=n.height,s=n.width,l=n.tableWidth,h=n.tableHeight,d=n.scrollX,u=n.scrollY,c=n.painter,f=n.selector,v=n.autofill,g=n.verticalScrollerSize,y=this.grid.getCell(v.xIndex,v.yIndex);if(!y)return;var k="right"===y.fixed?s-(l-y.x-y.width)-y.width-g:"left"===y.fixed?y.x:y.x+d,C=y.y+u,S=f.xArr[0],I=f.xArr[1],T=f.yArr[0],A=f.yArr[1],R=6,D={borderColor:"#fff",borderWidth:2,fillColor:b};if(I===o.maxX&&(!y.fixed&&s===l+d+p||"right"===y.fixed)){var E=this.grid.getCell(I,T),P=this.grid.getCell(I,A),O=P.y-E.y,M=[[e,E.y+u],[e,E.y+O+P.height+u]];c.drawLine(M,{borderColor:b,borderWidth:2}),c.drawRect(e-3,C+y.height-3,R,R,D)}if(A===o.maxY&&a===h+u+p){var B=this.grid.getCell(S,A),H=this.grid.getCell(I,A),F=H.x-B.x,L=[[B.x+d,t],[B.x+F+H.width+d,t]];c.drawLine(L,{borderColor:b,borderWidth:2}),c.drawRect(k+y.width-3,t-3,R,R,D)}}}}])}(),rr=ir;function nr(e,t,i,r){e.addEventListener(t,i,r)}function or(e,t,i,r){e.removeEventListener(t,i,r)}function ar(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:17,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{leading:!0,trailing:!1,context:null},n=new Date(0).getTime(),o=function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];var l=(new Date).getTime();if(r.leading)l-n>i?(e.apply(r.context,a),n=l):r.trailing&&(clearTimeout(t),t=setTimeout(function(){e.apply(r.context,a)},i));else{if(t)return;t=setTimeout(function(){t=null,e.apply(r.context,a)},i)}};return o.cancel=function(){n=0,clearTimeout(t),t=null},o}function sr(e){e.preventDefault(),this.enterShift=e.shiftKey,this.doneEdit();var t=e.target.getBoundingClientRect(),i=e.clientX-t.left,r=e.clientY-t.top,n=this.scroller.isInsideHorizontalScroller(i,r)||this.scroller.isInsideHorizontalScrollerBar(i,r),o=this.scroller.isInsideVerticalScroller(i,r)||this.scroller.isInsideVerticalScrollerBar(i,r);if(n||o)this.scroller.mouseDown(i,r);else{var a=xr.call(this,i,r);if(!a){if(i<this.originFixedWidth&&r>this.tableHeaderHeight){var s=this.body.getRowAtPosition(r);if(s){var l=s.data;if(xi(l)||mi(l))return;var h=s.rowIndex,d=e.ctrlKey||e.metaKey,u=e.shiftKey;return s.checked?void this.startRowDrag(h,r):(this.rowDrag.dragStartY=r,this.rowDrag.draggedRowIndices=[h],this.rowDrag.hasStartedDragSelection=!1,this.rowDrag.isCtrlPressed=d,void(this.rowDrag.isShiftPressed=u))}}this.header.isInsideHeader(i,r)&&this.header.mouseDown(i,r,{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}),this.body.mouseDown(i,r),this.scroller.mouseDown(i,r)}}}function lr(e,t){if(!e)return!1;var i=t.parentElement;while(i&&!i.classList.contains("d-datagrid-main"))i=i.parentElement;if(!i)return!1;var r=i.querySelector(".d-datagrid-overlayer");return!(!r||!r.contains(e))}function hr(e,t){return e===t||!!lr(e,t)}function dr(e){var t=this,i=e.target,r=this.target.getBoundingClientRect(),n=e.clientX-r.left,o=e.clientY-r.top;if(this.viewerDrag.isDragging)return"canvas"===i.tagName.toLowerCase()&&e.preventDefault(),void Cr.call(this,n,o);var a=this.scroller.horizontalScroller.move||this.scroller.verticalScroller.move;if(a)return"canvas"===i.tagName.toLowerCase()&&e.preventDefault(),void this.scroller.mouseMove(n,o);if(hr(i,this.target)){"canvas"===i.tagName.toLowerCase()&&e.preventDefault(),this.target.style.cursor="default";var s=Ir.call(this,n,o);if(s&&(this.target.style.cursor=s),this.colDrag.isDragging)return this.updateColDrag(n,o),void this.edgeScroller.update(n,o);if(this.rowDrag.isDragging)return this.updateRowDrag(n,o),void this.edgeScroller.update(n,o);if(this.rowDrag.draggedRowIndices.length>0&&!this.rowDrag.isDragging&&!this.rowDrag.justFinishedDrag){var l=this.rowDrag.draggedRowIndices[0],h=this.body.getRowAtPosition(o),d=Math.abs(o-this.rowDrag.dragStartY);if(d>10&&h){if(!this.rowDrag.hasStartedDragSelection){this.rowDrag.hasStartedDragSelection=!0,this.edgeScroller.start(function(){var e=t.body.getRowAtPosition(t.edgeScroller.lastMouseY);e&&t.selectRowRange(l,e.rowIndex),t.draw()},n,o);var u,c=pt(this.selectedRowIds);try{var f=function(){var e=u.value,i=t.body.rows.find(function(t){return t._rowId===e});i&&i.rowHeader&&(i.checked=!1,i.rowHeader.handleCheck(!1))};for(c.s();!(u=c.n()).done;)f()}catch(P){c.e(P)}finally{c.f()}this.selectedRowIds.clear()}return this.selectRowRange(l,h.rowIndex),this.edgeScroller.update(n,o),void this.draw()}}var v=br.call(this,n,o);if(!v){var g,y=!1,p=!1,w=n<=this.fixedLeftWidth,x=n>=this.width-this.fixedRightWidth-this.verticalScrollerSize,m=pt(this.body.rows);try{for(m.s();!(g=m.n()).done;){var b,k=g.value,C=pt(k.allCells);try{for(C.s();!(b=C.n()).done;){var S=b.value;if(S.nestedGrid){if(w&&"left"!==S.fixed)continue;if(x&&"right"!==S.fixed)continue;if(!w&&!x&&S.fixed)continue;var I="right"===S.fixed?this.width-(this.tableWidth-S.x-S.width)-S.width-this.verticalScrollerSize:"left"===S.fixed?S.x:S.x+this.scrollX,T=S.y+this.scrollY,A=n-I,R=o-T;if(S.nestedGrid.isMouseInside(A,R)){p=!0,y=S.nestedGrid.handleMouseMove(A,R),y&&(this.target.style.cursor="pointer");break}S.nestedGrid.hoveredCell=null,S.nestedGrid.hoverRowIndex=-1}}}catch(P){C.e(P)}finally{C.f()}if(p)break}}catch(P){m.e(P)}finally{m.f()}if(p)this.setHoverCell(-1,-1),this.footer&&(this.footer.hoverColIndex=-1);else if(this.footer&&this.footer.isInFooterArea(n,o)){var D=this.footer.hoverColIndex,E=this.footer.getHoverColumnIndex(n);this.footer.hoverColIndex=E,this.target.style.cursor=E>=0?"pointer":"default",this.setHoverCell(-1,-1),D!==E&&this.draw()}else this.footer&&-1!==this.footer.hoverColIndex&&(this.footer.hoverColIndex=-1,this.draw()),(this.header.isInsideHeader(n,o)||this.header.isResizing)&&this.header.resizing(n,o),this.body.mouseMove(n,o),this.scroller.mouseMove(n,o)}}else this.setHoverCell(-1,-1)}function ur(e){var t=e.target;this.edgeScroller.stop(),"canvas"===t.tagName.toLowerCase()&&e.preventDefault();var i=this.target.getBoundingClientRect(),r=e.clientX-i.left,n=e.clientY-i.top,o=kr.call(this,r,n);if(!o)if(this.viewerDrag.isDragging)Sr.call(this,r,n);else if(this.colDrag.isDragging)this.endColDrag();else{if(this.rowDrag.isDragging)return this.endRowDrag(),void(this.rowDrag.skipNextClick=!0);if(this.rowDrag.draggedRowIndices.length>0){if(!this.rowDrag.hasStartedDragSelection){var a=this.rowDrag.draggedRowIndices[0],s=this.body.getRow(a);if(s){var l=this.rowDrag.isCtrlPressed,h=this.rowDrag.isShiftPressed;if(h)-1!==this.lastSelectedRowIndex?this.selectRowRange(this.lastSelectedRowIndex,a):s.rowHeader&&(this.selectedRowIds.add(s._rowId),s.checked=!0,s.rowHeader.handleCheck(!0)),this.lastSelectedRowIndex=a;else if(l)s.rowHeader&&s.handleCheck(!s.checked),this.lastSelectedRowIndex=a;else{this.selectedRowIds.clear();var d,u=pt(this.body.rows);try{for(u.s();!(d=u.n()).done;){var c=d.value;c.rowHeader&&(c.checked=!1,c.rowHeader.handleCheck(!1))}}catch(f){u.e(f)}finally{u.f()}s.rowHeader&&(this.selectedRowIds.add(s._rowId),s.checked=!0,s.rowHeader.handleCheck(!0)),this.lastSelectedRowIndex=a}this.draw()}}return this.rowDrag.draggedRowIndices=[],this.rowDrag.dragStartY=0,this.rowDrag.hasStartedDragSelection=!1,this.rowDrag.isCtrlPressed=!1,this.rowDrag.isShiftPressed=!1,void(this.rowDrag.skipNextClick=!0)}this.rowDrag.justFinishedDrag&&(this.rowDrag.justFinishedDrag=!1),(this.header.isInsideHeader(r,n)||this.header.isResizing)&&this.header.endResize(),this.endMultiSelect(),this.scroller.mouseUp()}}function cr(e){e.preventDefault();var t=e.target.getBoundingClientRect(),i=e.clientX-t.left,r=e.clientY-t.top,n=this.scroller.isInsideHorizontalScroller(i,r)||this.scroller.isInsideHorizontalScrollerBar(i,r),o=this.scroller.isInsideVerticalScroller(i,r)||this.scroller.isInsideVerticalScrollerBar(i,r);if(!n&&!o){var a,s=null,l=null,h=null,d=i<=this.fixedLeftWidth,u=i>=this.width-this.fixedRightWidth-this.verticalScrollerSize,c=pt(this.body.rows);try{for(c.s();!(a=c.n()).done;){var f,v=a.value,g=pt(v.allCells);try{for(g.s();!(f=g.n()).done;){var y=f.value;if(y.nestedGrid){if(d&&"left"!==y.fixed)continue;if(u&&"right"!==y.fixed)continue;if(!d&&!u&&y.fixed)continue;var p="right"===y.fixed?this.width-(this.tableWidth-y.x-y.width)-y.width-this.verticalScrollerSize:"left"===y.fixed?y.x:y.x+this.scrollX,w=y.y+this.scrollY,x=i-p,m=r-w;if(y.nestedGrid.isMouseInside(x,m)){s=y.nestedGrid.handleClick(x,m),l=y.nestedGrid,h=y;break}}}}catch(S){g.e(S)}finally{g.f()}if(s)break}}catch(S){c.e(S)}finally{c.f()}if(s)if("expand"===s.type)this.draw();else if("editIcon"===s.type&&s.cell){var b=l.getCellEditInfo(s.cell.col,s.cell.row),k={colIndex:h.colIndex,rowIndex:h.rowIndex,x:b.bounds.x-this.scrollX,y:b.bounds.y-this.scrollY,width:b.bounds.width,height:b.bounds.height,value:b.value,editable:!0,dataType:b.column.type||"text",options:b.column.options||[],fixed:h.fixed};this.focusCell=k,this.editor.cell=k,this.editor.type=b.column.type||"text",this.editor.selectOptions=b.column.options||[],this.editor.setData(b.displayValue),this.editor.show=!0,this.resetCellPosition(),this.putCell(),this.beforeEditCell(k),this.editor.el.show(),this.editor.textEl.focus(),this.editor._nestedGridContext={nestedGrid:l,colIndex:s.cell.col,rowIndex:s.cell.row},this.draw()}else if("booleanToggle"===s.type){if(h){var C=this.body.getRowData(h.rowIndex);this.afterEditCell(C)}this.draw()}else"cell"===s.type&&this.draw();else{if(this.rowDrag.skipNextClick)return void(this.rowDrag.skipNextClick=!1);if(this.colDrag.skipNextClick)return void(this.colDrag.skipNextClick=!1);if(this.footer&&this.footer.isInFooterArea(i,r))return void this.footer.onClick(i,r,e.clientX,e.clientY);this.header.isInsideHeader(i,r)||this.clearSelectedCols(),this.body.click(i,r),this.header.isInsideHeaderCheckboxBoundary(i,r)&&(this.header.handleCheck(),this.body.handleCheckRow())}}}function fr(e){e.preventDefault();var t=e.target.getBoundingClientRect(),i=e.clientX-t.left,r=e.clientY-t.top;this.body.dbClick(i,r)}function vr(e){var t=e.target.getBoundingClientRect(),i=e.clientX-t.left,r=e.clientY-t.top;if(this.header.isInsideHeader(i,r)){var n=this.header.getColAtPosition(i,r);if(n&&"nested-child"===n.colType)return;n&&this.onColumnContextMenu&&(e.preventDefault(),this.onColumnContextMenu({colId:n.colId,colIndex:n.index,colType:n.colType,colTitle:n.text,fixed:n.fixed||"",nestedChildOffset:n.nestedChildOffset,parentKey:n.parentKey,clientX:e.clientX,clientY:e.clientY}))}}function gr(){this.doneEdit()}function yr(e){if(this.editor.show){if(13===e.keyCode||27===e.keyCode){if(e.metaKey||e.ctrlKey)return;e.preventDefault(),this.doneEdit()}}else if(this.selector.show&&((e.ctrlKey&&90===e.keyCode||e.metaKey&&!e.shiftKey&&90===e.keyCode)&&(e.preventDefault(),this.history.backState()),(e.ctrlKey&&89===e.keyCode||e.metaKey&&e.shiftKey&&90===e.keyCode)&&(e.preventDefault(),this.history.forwardState()),(e.ctrlKey&&67===e.keyCode||e.metaKey&&67===e.keyCode)&&(e.preventDefault(),this.clipboard.copy()),(e.ctrlKey&&86===e.keyCode||e.metaKey&&86===e.keyCode)&&this.clipboard.paste(),(65===(e.ctrlKey&&e.keyCode)||e.metaKey&&65===e.keyCode)&&e.preventDefault(),!e.metaKey&&!e.ctrlKey))switch(e.keyCode){case 37:this.moveFocus("LEFT");break;case 38:this.moveFocus("TOP");break;case 9:case 39:this.moveFocus("RIGHT");break;case 40:this.moveFocus("BOTTOM");break;case 8:case 46:this.clearSelectedData();break;case 13:this.startEdit();break;default:}}function pr(e){if(e.preventDefault(),!this.editor.show){var t=e.deltaX,i=e.deltaY;if(this.setScrolling(!0),e.shiftKey&&0!==i&&0===t&&(t=i,i=0),Math.abs(t)>Math.abs(i)){if(this.scroller.horizontalScroller.has){var r=this.tableWidth;if(this.scrollX-t>0)this.scrollX=0;else if(r+this.verticalScrollerSize-this.width+this.scrollX<t)this.scrollX=this.width-r-this.verticalScrollerSize;else{e.preventDefault(),e.returnValue=!1,this.scrollX-=2*t;var n=this.width-r-this.verticalScrollerSize;this.scrollX=Math.max(n,Math.min(0,this.scrollX))}}}else if(this.scroller.verticalScroller.has)if(this.scrollY-i>0)this.scrollY=0;else if(this.tableHeight+this.horizontalScrollerSize+this.footerHeight-this.height+this.scrollY<i)this.scrollY=this.height-this.tableHeight-this.horizontalScrollerSize-this.footerHeight;else{e.preventDefault(),e.returnValue=!1,this.scrollY-=2*i;var o=this.height-this.tableHeight-this.horizontalScrollerSize-this.footerHeight;this.scrollY=Math.max(o,Math.min(0,this.scrollY))}this.scroller.setPosition()}}function wr(){this.resize()}function xr(e,t){var i=mr.call(this,e,t);if(i)return!0;var r=Tr.call(this,e,t);if(!r)return!1;var n=r.cell,o=r.localX,a=r.localY;if(!n.viewerType)return!1;var s=li(),l=s.get(n.viewerType);if(!l||!l.onDragStart)return!1;var h=Rr.call(this,n,r.adjustedX,r.adjustedY),d=n.viewerData||Dr(n);return!!l.onDragStart(h,d,o,a)&&(this.viewerDrag.isDragging=!0,this.viewerDrag.cell=n,this.viewerDrag.startX=o,this.viewerDrag.startY=a,this.viewerDrag.startValue=d.value,this.viewerDrag.currentValue=d.value,this.target.style.cursor="pointer",!0)}function mr(e,t){if(t<=this.tableHeaderHeight)return!1;var i=this.body.getRowAtPosition(t);if(!i)return!1;var r,n=pt(i.allCells);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(o.nestedGrid){var a=void 0;a="right"===o.fixed?this.width-(this.tableWidth-o.x-o.width)-o.width-this.verticalScrollerSize:"left"===o.fixed?o.x:o.x+this.scrollX;var s=o.y+this.scrollY,l=e-a,h=t-s;if(o.nestedGrid.isMouseInside(l,h)&&o.nestedGrid.handleMouseDown(l,h))return!0}}}catch(d){n.e(d)}finally{n.f()}return!1}function br(e,t){var i,r=pt(this.body.rows);try{for(r.s();!(i=r.n()).done;){var n,o=i.value,a=pt(o.allCells);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(s.nestedGrid&&(s.nestedGrid.progressDrag&&s.nestedGrid.progressDrag.isDragging)){var l=void 0;l="right"===s.fixed?this.width-(this.tableWidth-s.x-s.width)-s.width-this.verticalScrollerSize:"left"===s.fixed?s.x:s.x+this.scrollX;var h=s.y+this.scrollY,d=e-l,u=t-h;return s.nestedGrid.handleMouseMove(d,u),!0}}}catch(c){a.e(c)}finally{a.f()}}}catch(c){r.e(c)}finally{r.f()}return!1}function kr(e,t){var i,r=pt(this.body.rows);try{for(r.s();!(i=r.n()).done;){var n,o=i.value,a=pt(o.allCells);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(s.nestedGrid&&(s.nestedGrid.progressDrag&&s.nestedGrid.progressDrag.isDragging)){var l=void 0;l="right"===s.fixed?this.width-(this.tableWidth-s.x-s.width)-s.width-this.verticalScrollerSize:"left"===s.fixed?s.x:s.x+this.scrollX;var h=s.y+this.scrollY,d=e-l,u=t-h;return s.nestedGrid.handleMouseUp(d,u),!0}}}catch(c){a.e(c)}finally{a.f()}}}catch(c){r.e(c)}finally{r.f()}return!1}function Cr(e,t){if(this.viewerDrag.isDragging&&this.viewerDrag.cell){this.target.style.cursor="pointer";var i=this.viewerDrag.cell,r=li(),n=r.get(i.viewerType);if(n&&n.onDragMove){var o=Ar.call(this,i),a=e-o.x,s=t-o.y,l=Rr.call(this,i,o.x,o.y),h=i.viewerData||Dr(i);h.value=this.viewerDrag.currentValue;var d=n.onDragMove(l,h,a,s,this.viewerDrag.startX,this.viewerDrag.startY);void 0!==d&&d!==this.viewerDrag.currentValue&&(this.viewerDrag.currentValue=d,i.viewerData&&(i.viewerData.value=d),i.value=d,i.label=String(d),this.draw())}}}function Sr(e,t){if(this.viewerDrag.isDragging&&this.viewerDrag.cell){var i=this.viewerDrag.cell,r=this.viewerDrag.currentValue,n=this.viewerDrag.startValue;if(this.viewerDrag.isDragging=!1,this.viewerDrag.cell=null,this.target.style.cursor="default",r!==n){i.setData(r);var o=this.body.getRowData(i.rowIndex);this.afterEditCell(o),this.history.pushState({before:{colIndex:i.colIndex,rowIndex:i.rowIndex,value:n},after:{colIndex:i.colIndex,rowIndex:i.rowIndex,value:r},type:"single"})}this.draw()}}function Ir(e,t){var i=Tr.call(this,e,t);if(!i)return null;var r=i.cell,n=i.localX,o=i.localY;if(!r.viewerType)return null;var a=li(),s=a.get(r.viewerType);if(!s||!s.getInteractiveCursor)return null;var l=Rr.call(this,r,i.adjustedX,i.adjustedY),h=r.viewerData||Dr(r);return s.getInteractiveCursor(l,h,n,o)}function Tr(e,t){if(t<=this.tableHeaderHeight)return null;var i=this.body.getRowAtPosition(t);if(!i)return null;var r,n=pt(i.allCells);try{for(n.s();!(r=n.n()).done;){var o=r.value,a=Ar.call(this,o);if(e>=a.x&&e<=a.x+o.width&&t>=a.y&&t<=a.y+o.height)return{cell:o,localX:e-a.x,localY:t-a.y,adjustedX:a.x,adjustedY:a.y}}}catch(s){n.e(s)}finally{n.f()}return null}function Ar(e){var t;t="right"===e.fixed?this.width-(this.tableWidth-e.x-e.width)-e.width-this.verticalScrollerSize:"left"===e.fixed?e.x:e.x+this.scrollX;var i=e.y+this.scrollY;return{x:t,y:i}}function Rr(e,t,i){var r=this,n=this.painter,o=this.editor,a=this.hoverRowIndex===e.rowIndex&&!this.isScrolling,s=this.hoverRowIndex===e.rowIndex&&this.hoverColIndex===e.colIndex&&!this.isScrolling,l=!!o._nestedGridContext,h=o.show&&o.yIndex===e.rowIndex&&!l,d=this.body.getRow(e.rowIndex),u=!!d&&d.checked;return{ctx:n.ctx,painter:n,grid:this,bounds:{x:t,y:i,width:e.width,height:e.height},rowIndex:e.rowIndex,colIndex:e.colIndex,readonly:e.readonly||!1,isHoverRow:a,isHoverCell:s,isEditing:h,isChecked:u,fillColor:e.fillColor||"#fff",requestRedraw:function(){return r.draw()}}}function Dr(e){return F({value:e.value,label:e.label,options:e.options,style:{color:e.color,textAlign:e.textAlign,textBaseline:e.textBaseline},extra:{rowData:e.rowData}},e.viewerConfig)}var Er=function(){function e(t,i){wt(this,e),B(this,"grid",void 0),B(this,"el",void 0),B(this,"isFirefox",void 0),B(this,"eventTasks",void 0),this.grid=t,this.el=i,this.isFirefox="undefined"!==typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1,this.init()}return mt(e,[{key:"init",value:function(){var e=this.el,t=this.grid,i=this.isFirefox;this.eventTasks={clickoutside:gr.bind(t),mousedown:sr.bind(t),mousemove:dr.bind(t),mouseup:ur.bind(t),click:cr.bind(t),dblclick:fr.bind(t),contextmenu:vr.bind(t),mousewheel:pr.bind(t),keydown:yr.bind(t),resize:ar(wr,100,{context:t})},nr(e,"mousedown",this.eventTasks.mousedown,!1),nr(window,"mousemove",this.eventTasks.mousemove,!1),nr(window,"mouseup",this.eventTasks.mouseup,!1),nr(e,"click",this.eventTasks.click,!1),nr(e,"dblclick",this.eventTasks.dblclick,!1),nr(e,"contextmenu",this.eventTasks.contextmenu,!1),nr(e,i?"DOMMouseScroll":"mousewheel",this.eventTasks.mousewheel,!1),nr(window,"keydown",this.eventTasks.keydown,!1),nr(window,"resize",this.eventTasks.resize,!1)}},{key:"destroy",value:function(){var e=this.el,t=this.isFirefox;or(e,"mousedown",this.eventTasks.mousedown,!1),or(window,"mousemove",this.eventTasks.mousemove,!1),or(window,"mouseup",this.eventTasks.mouseup,!1),or(e,"click",this.eventTasks.click,!1),or(e,"dblclick",this.eventTasks.dblclick,!1),or(e,"contextmenu",this.eventTasks.contextmenu,!1),or(e,t?"DOMMouseScroll":"mousewheel",this.eventTasks.mousewheel,!1),or(window,"keydown",this.eventTasks.keydown,!1),or(window,"resize",this.eventTasks.resize,!1)}}])}(),Pr=Er,Or=function(){function e(t,i,r,n,o){wt(this,e),B(this,"grid",void 0),B(this,"x",void 0),B(this,"y",void 0),B(this,"width",void 0),B(this,"height",void 0),B(this,"valid",void 0),B(this,"message",void 0),B(this,"colWidth",void 0),B(this,"colHeight",void 0),B(this,"fixed",void 0),this.grid=t,this.x=i,this.y=r,this.width=200,this.height=90,this.valid=!0,this.message=n}return mt(e,[{key:"update",value:function(e){Object.assign(this,e)}},{key:"draw",value:function(){var e=this.grid,t=e.selector,i=e.scrollX,r=e.scrollY,n=e.width,o=e.height,a=e.tableWidth,s=e.verticalScrollerSize,l=e.color,h=e.painter;if(!this.valid&&!t.isSelected){var d=this.x+(this.colWidth||0)+2,u=this.y+1,c=d+this.width+i>n,f=u+this.height+r>o,v=c?"right"===this.fixed?n-(a-this.x-(this.colWidth||0))-(this.colWidth||0)-s-this.width-1:this.x-this.width-1:d;this.fixed||(v+=i);var g=f?this.y-(this.height-(this.colHeight||0))-1:this.y;g+=r,h.drawRoundRect(v,g,this.width,this.height,4,{shadowBlur:16,shadowColor:"rgba(28,36,56,0.16)",shadowOffsetX:0,shadowOffsetY:0,fillColor:"#fff",borderWidth:1}),h.drawCellText("数据错误",v,g+24,this.width,this.height,16,{font:'bold 14px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',color:T,align:"left",baseLine:"bottom"});for(var y=h.getTextWrapping(this.message||"",this.width,16),p=g+50,w=0;w<y.length;w++)h.drawCellText(y[w],v,p+18*w,this.width,this.height,16,{color:l,align:"left",baseLine:"bottom"})}}}])}(),Mr=Or,Br=function(){function e(t){wt(this,e),B(this,"grid",void 0),B(this,"show",void 0),B(this,"isPaste",void 0),B(this,"xArr",void 0),B(this,"yArr",void 0),B(this,"el",void 0),this.grid=t,this.show=!1,this.isPaste=!1,this.xArr=[-1,-1],this.yArr=[-1,-1]}return mt(e,[{key:"init",value:function(){var e=this,t=Ct("textarea","").on("paste",function(){return e.paste()});t.css({position:"absolute",left:"-10000px",top:"-10000px"}),this.el=t.el,document.body.appendChild(this.el)}},{key:"copy",value:function(){var e=this.grid,t=e.selector,i=e.body,r=i.getSelectedData(),n=r.text,o=document.createElement("textarea");o.value=n,document.body.appendChild(o),o.select(),document.execCommand("copy",!1),document.body.removeChild(o),this.show=!0,this.xArr=t.xArr.slice(),this.yArr=t.yArr.slice()}},{key:"paste",value:function(){this.isPaste=!0}},{key:"select",value:function(e){this.isPaste=!1;var t=this.grid,i=t.editor,r=t.selector,n=t.autofill;r.xArr.splice(1,1,i.xIndex+e[0].length-1),r.yArr.splice(1,1,i.yIndex+e.length-1),n.xIndex=r.xArr[1],n.yIndex=r.yArr[1],this.clear()}},{key:"clear",value:function(){this.show=!1,this.xArr=[-1,-1],this.yArr=[-1,-1]}}])}(),Hr=Br,Fr=function(){function e(t){wt(this,e),B(this,"grid",void 0),B(this,"history",void 0),B(this,"historyIndex",void 0),this.grid=t,this.history=[],this.historyIndex=-1}return mt(e,[{key:"pushState",value:function(e){this.history.push(e),this.history.length>20&&this.history.splice(0,1),this.historyIndex=this.history.length-1}},{key:"backState",value:function(){if(this.historyIndex>=0){var e=this.history[this.historyIndex];"single"===e.type?this.grid.setData(e.before.value,e.before):this.grid.batchSetData(e.before),this.historyIndex-=1}}},{key:"forwardState",value:function(){if(this.historyIndex<this.history.length-1){this.historyIndex+=1;var e=this.history[this.historyIndex];"single"===e.type?this.grid.setData(e.after.value,e.after):this.grid.batchSetData(e.after)}}}])}(),Lr=Fr,Wr={default:{global:{fontSize:14,fontFamily:"Arial, sans-serif",color:"#333",backgroundColor:"#fff",borderColor:"#e0e0e0",borderWidth:1,paddingTop:8,paddingRight:12,paddingBottom:8,paddingLeft:12},header:{backgroundColor:"#f5f5f5",fontWeight:"bold",color:"#333"},cell:{backgroundColor:"#fff"},readonly:{backgroundColor:"#f9f9f9",color:"#999"},striped:{enabled:!0,oddColor:"#fff",evenColor:"#f9fafc"},hover:{enabled:!0,backgroundColor:"#e6eaf0"},editing:{backgroundColor:"#e6eaf0"},checked:{enabled:!0,backgroundColor:"#e3e9ff"}},dark:{global:{fontSize:14,fontFamily:"Arial, sans-serif",color:"#e0e0e0",backgroundColor:"#1e1e1e",borderColor:"#404040",borderWidth:1,paddingTop:8,paddingRight:12,paddingBottom:8,paddingLeft:12},header:{backgroundColor:"#2d2d2d",fontWeight:"bold",color:"#fff"},cell:{backgroundColor:"#1e1e1e"},readonly:{backgroundColor:"#252525",color:"#888"},striped:{enabled:!0,oddColor:"#1e1e1e",evenColor:"#252525"},hover:{enabled:!0,backgroundColor:"#2d3748"},editing:{backgroundColor:"#2d3748"},checked:{enabled:!0,backgroundColor:"#2d3748"}},blue:{global:{fontSize:14,fontFamily:"Arial, sans-serif",color:"#333",backgroundColor:"#fff",borderColor:"#d0e3f5",borderWidth:1,paddingTop:8,paddingRight:12,paddingBottom:8,paddingLeft:12},header:{backgroundColor:"#4a90e2",fontWeight:"bold",color:"#fff"},cell:{backgroundColor:"#fff"},readonly:{backgroundColor:"#f0f7ff",color:"#999"},striped:{enabled:!0,oddColor:"#fff",evenColor:"#f0f7ff"},hover:{enabled:!0,backgroundColor:"#d0e3f5"},editing:{backgroundColor:"#d0e3f5"},checked:{enabled:!0,backgroundColor:"#e3e9ff"}}},zr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";wt(this,e),B(this,"currentTheme",void 0),B(this,"customStyles",new Map),this.currentTheme="string"===typeof t?Wr[t]||Wr.default:t}return mt(e,[{key:"setTheme",value:function(e){this.currentTheme="string"===typeof e?Wr[e]||Wr.default:e}},{key:"getTheme",value:function(){return this.currentTheme}},{key:"mergeStyles",value:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Object.assign.apply(Object,[{}].concat(fe(t.filter(Boolean))))}},{key:"getCellStyle",value:function(e){var t,i,r,n=e.isHeader,o=e.isReadonly,a=e.isHover,s=e.isEditing,l=e.isStriped,h=e.isChecked,d=e.rowIndex,u=e.customClass,c=this.mergeStyles(this.currentTheme.global);if(c=n?this.mergeStyles(c,this.currentTheme.header):this.mergeStyles(c,this.currentTheme.cell),o&&(c=this.mergeStyles(c,this.currentTheme.readonly)),l&&null!==(t=this.currentTheme.striped)&&void 0!==t&&t.enabled&&void 0!==d){var f=d%2===0?this.currentTheme.striped.evenColor:this.currentTheme.striped.oddColor;c=this.mergeStyles(c,{backgroundColor:f})}return a&&null!==(i=this.currentTheme.hover)&&void 0!==i&&i.enabled&&(c=this.mergeStyles(c,{backgroundColor:this.currentTheme.hover.backgroundColor})),s&&(c=this.mergeStyles(c,this.currentTheme.editing)),h&&null!==(r=this.currentTheme.checked)&&void 0!==r&&r.enabled&&(c=this.mergeStyles(c,{backgroundColor:this.currentTheme.checked.backgroundColor})),u&&this.customStyles.has(u)&&(c=this.mergeStyles(c,this.customStyles.get(u))),c}},{key:"registerStyle",value:function(e,t){this.customStyles.set(e,t)}},{key:"registerStyles",value:function(e){var t=this;Object.entries(e).forEach(function(e){var i=yt(e,2),r=i[0],n=i[1];t.registerStyle(r,n)})}},{key:"applyToContext",value:function(e,t){if(t.color&&(e.fillStyle=t.color),t.fontSize&&t.fontFamily){var i=t.fontWeight||"normal";e.font="".concat(i," ").concat(t.fontSize,"px ").concat(t.fontFamily)}t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline),void 0!==t.opacity&&(e.globalAlpha=t.opacity)}},{key:"parsePadding",value:function(e){if("number"===typeof e)return{top:e,right:e,bottom:e,left:e};var t=e.split(" ").map(Number);return 1===t.length?{top:t[0],right:t[0],bottom:t[0],left:t[0]}:2===t.length?{top:t[0],right:t[1],bottom:t[0],left:t[1]}:3===t.length?{top:t[0],right:t[1],bottom:t[2],left:t[1]}:{top:t[0],right:t[1],bottom:t[2],left:t[3]}}}])}(),Nr=(new zr("default"),40),Vr=2,_r=16,jr=function(){function e(t){wt(this,e),B(this,"grid",void 0),B(this,"animationId",null),B(this,"dirX",0),B(this,"dirY",0),B(this,"speedX",0),B(this,"speedY",0),B(this,"isActive",!1),B(this,"onScrollCallback",null),B(this,"_lastMouseX",0),B(this,"_lastMouseY",0),B(this,"scrollAxis","both"),this.grid=t}return mt(e,[{key:"lastMouseX",get:function(){return this._lastMouseX}},{key:"lastMouseY",get:function(){return this._lastMouseY}},{key:"start",value:function(e,t,i,r){this.isActive=!0,this.onScrollCallback=e||null,this.scrollAxis=r||"both",void 0!==t&&(this._lastMouseX=t),void 0!==i&&(this._lastMouseY=i)}},{key:"update",value:function(e,t){if(this.isActive&&this.grid){this._lastMouseX=e,this._lastMouseY=t;var i=this.getViewport(),r=this.detectEdge(e,t,i),n=r.dirX,o=r.dirY,a=r.speedX,s=r.speedY;this.dirX=n,this.dirY=o,this.speedX=a,this.speedY=s,0!==n||0!==o?this.startAnimation():this.stopAnimation()}}},{key:"stop",value:function(){this.isActive=!1,this.dirX=0,this.dirY=0,this.speedX=0,this.speedY=0,this.scrollAxis="both",this.onScrollCallback=null,this.stopAnimation()}},{key:"destroy",value:function(){this.stop(),this.grid=null}},{key:"getViewport",value:function(){var e=this.grid;return{left:e.fixedLeftWidth,top:e.tableHeaderHeight,right:e.width-e.verticalScrollerSize,bottom:e.height-e.horizontalScrollerSize}}},{key:"detectEdge",value:function(e,t,i){var r=0,n=0,o=0,a=0,s="vertical"!==this.scrollAxis,l="horizontal"!==this.scrollAxis;if(s){var h=i.left+Nr;if(e<h){r=-1;var d=Math.max(e,i.left),u=(d-i.left)/Nr;o=Vr+(1-u)*_r}var c=i.right-Nr;if(e>c){r=1;var f=Math.min(e,i.right),v=(i.right-f)/Nr;o=Vr+(1-v)*_r}}if(l){var g=i.top+Nr;if(t<g){n=-1;var y=Math.max(t,i.top),p=(y-i.top)/Nr;a=Vr+(1-p)*_r}var w=i.bottom-Nr;if(t>w){n=1;var x=Math.min(t,i.bottom),m=(i.bottom-x)/Nr;a=Vr+(1-m)*_r}}return{dirX:r,dirY:n,speedX:o,speedY:a}}},{key:"startAnimation",value:function(){var e=this;if(null===this.animationId){var t=function(){if(!e.isActive||0===e.dirX&&0===e.dirY)e.animationId=null;else{e.applyScroll();var i=e.getViewport(),r=e.detectEdge(e._lastMouseX,e._lastMouseY,i),n=r.dirX,o=r.dirY,a=r.speedX,s=r.speedY;e.dirX=n,e.dirY=o,e.speedX=a,e.speedY=s,e.animationId=0!==n||0!==o?requestAnimationFrame(t):null}};this.animationId=requestAnimationFrame(t)}}},{key:"stopAnimation",value:function(){null!==this.animationId&&(cancelAnimationFrame(this.animationId),this.animationId=null)}},{key:"applyScroll",value:function(){var e=this.grid;if(e){var t,i=!1;if(0!==this.dirX&&this.speedX>0){var r=e.scrollX;e.scrollX-=this.speedX*this.dirX;var n=e.width-e.tableWidth-e.verticalScrollerSize;e.scrollX=Math.min(0,Math.max(n,e.scrollX)),e.scrollX!==r&&(i=!0)}if(0!==this.dirY&&this.speedY>0){var o=e.scrollY;e.scrollY-=this.speedY*this.dirY;var a=e.height-e.tableHeight-e.horizontalScrollerSize;e.scrollY=Math.min(0,Math.max(a,e.scrollY)),e.scrollY!==o&&(i=!0)}if(i)null===(t=e.scroller)||void 0===t||t.setPosition(),e.markDirty(),this.onScrollCallback&&this.onScrollCallback()}}}])}(),Yr=jr,Gr=window.devicePixelRatio||1,Xr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAABD1JREFUSA2dVU1oHVUU/s6dmTd5TfLeSyKNrcHGhRA0gkjFIrgKmIUrFxbcCG5a6EJaRNPazURs/EHqQhFcClLo3p1a/AEVwY1/AVG0RmjSNPE1f+/Nm7n3+N0ZfKR9STC9j/tm7r3nfuec7/yMYI8xOKcjYuwxaPCoKMZUcBegMeeKwCxC8W2s+Or6eVnaDUZ2OqglOiwxjjvVKRhEEIhYqVBW1GiFwAYqIddGjAbc/bhqzAdLL8n12/F6FNTf0kec4pRYN0A8o0YiKP8VpQJx9MAIlfg1FdAAR4VAJiJnb56TK9uV+IPuqL+ePUnwF6AEoalU4EgHH4Qvf4VOwNEwbxunoyA9VEW/c/pe4w19rgtYSpTLxoXOw1aCUzQ68vuilhYKqcaiGvNZ6PBDfwXLXnojxSiJeQwWTztxE9wiZbznqYSriJiTN2fkEy9bUNR4RxtuE7O0pA/GeY7prT90l86k4adJ4j3pHUmi5mIfjtPLGfpZLagsDdyKDaaWX5bFQkHtbX0WHfeEt0DF0HqnoZp3V1+RX3phe3dqr+kxhPohDSO1ILeMmTGX187Ki+Ktz1OX8FrI0InLjQkNLjfPyee9ULvveO4ZmVfVOlJM/2l6bOSosSkmjTOWM0NusiBwC6dTfLk71M4np9v4SHO9yryKGJGIaVHNrH2KwcEE+WPylJP0fL0b5ztDl7v+jgn0ElcBYxH4TIYJpn2x1CG5hYQ5yZOKC+f3AtrrLAzNF1nKQvQpQizK3h+KcQOsI8vcL5K+NmiaPeW4F+q2s3gQf2Ud/F2Ae24AG4ol96W2baJ39nriGtpv9sl09zZ7QMgKXOfGMB3yGrGxgRofRUH59X5GkhQYC+WdogIQSoAlVlF/sckE3oowzvc7UoCEfekIc2iUir5j2R6C9Uz9zslfkUhQi0lVHu53lHcq6FDBAjPpCAFOwJnI4FeCZ+zDKXtIWzMMDs/hof3iH55Fle33QP0PxI15dtqrzT7MsqRvzMi6CdyPbLmMOafAZorHRy7qPf9XydgZrTbrqGuDnSBDYKv0AI0OfG14kEor/EZDu8lE7SBwuQTOZS1MjczpxF50+bP6+zq0dghjbJYV10RshxG5UYTPPIDUY3e5Zk8az1NMi7OO+h3SwPLQsb/e0By/xQGuTbbQ8pfm+xFvdDDAwhn2nx0vl62TfeWHYgT56BBW/nxe2rco8IuhCzqZA0d9ytK3rFCg5ZPZljJ81qUFkLUR2pIxiDHalHemVcoFFsuriax5PD9u+aL9c15+CgNcoWWkqfgQFvlVZBnzjZ9HBS3oDvZN9VlD1cw+qVgsbQf3cl2Kupf4cjjRAxsxHnSw45IHtJPZG9qOGNLWAcPI/I7oCamxLXTiDCv33YvF70/Sp9vGjgr+k/GKNmPcrTY76MKowuqI2LU69DCN+rBmHJoHt7D6c0K1u4x/AUXG2cTFsUKKAAAAAElFTkSuQmCC",Ur=(i(9868),{silent:0,error:1,warn:2,info:3,verbose:4}),qr={enabled:!1,logLevel:"warn",largeDataThreshold:5e3,largeColumnThreshold:50,frameTimeThreshold:16.67},Kr="[canvas-table]",Jr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};wt(this,e),B(this,"config",void 0),B(this,"timings",[]),B(this,"frameCount",0),B(this,"lastFpsTime",0),B(this,"currentFps",0),B(this,"markMap",new Map),this.config=F(F({},qr),t)}return mt(e,[{key:"setConfig",value:function(e){this.config=F(F({},this.config),e)}},{key:"isEnabled",get:function(){return this.config.enabled}},{key:"setEnabled",value:function(e){this.config.enabled=e}},{key:"mark",value:function(e){if(this.config.enabled){var t="canvas-table:".concat(e);if(this.markMap.set(t,performance.now()),"function"===typeof performance.mark)try{performance.mark(t)}catch(i){}}}},{key:"measure",value:function(e,t,i){if(!this.config.enabled)return 0;var r="canvas-table:".concat(t),n=i?"canvas-table:".concat(i):void 0,o="canvas-table:".concat(e),a=0;if(n){var s=this.markMap.get(r),l=this.markMap.get(n);void 0!==s&&void 0!==l&&(a=l-s)}else{var h=this.markMap.get(r);void 0!==h&&(a=performance.now()-h)}if("function"===typeof performance.measure)try{n?performance.measure(o,r,n):performance.measure(o,r)}catch(d){}return this.timings.push({name:e,startTime:performance.now(),duration:a}),this.log("verbose","".concat(e,": ").concat(a.toFixed(2),"ms")),a}},{key:"trackFrame",value:function(){if(this.config.enabled){this.frameCount++;var e=performance.now();e-this.lastFpsTime>=1e3&&(this.currentFps=this.frameCount,this.frameCount=0,this.lastFpsTime=e)}}},{key:"getFps",value:function(){return this.currentFps}},{key:"checkDataSize",value:function(e,t){e>this.config.largeDataThreshold&&this.log("warn","Large dataset detected: ".concat(e," rows. ")+"Consider enabling virtual scrolling or pagination for optimal performance. "+"(Threshold: ".concat(this.config.largeDataThreshold," rows)")),t>this.config.largeColumnThreshold&&this.log("warn","Many columns detected: ".concat(t," columns. ")+"Consider using fixed columns and horizontal scrolling for better UX. "+"(Threshold: ".concat(this.config.largeColumnThreshold," columns)"))}},{key:"checkFrameTime",value:function(e){this.config.enabled&&e>this.config.frameTimeThreshold&&this.log("warn","Slow frame detected: ".concat(e.toFixed(2),"ms ")+"(target: ".concat(this.config.frameTimeThreshold.toFixed(2),"ms / 60fps). ")+"Consider reducing visible data or simplifying cell viewers.")}},{key:"getTimings",value:function(){return fe(this.timings)}},{key:"getAverageDuration",value:function(e){var t=this.timings.filter(function(t){return t.name===e});if(0===t.length)return 0;var i=t.reduce(function(e,t){return e+t.duration},0);return i/t.length}},{key:"clearTimings",value:function(){if(this.timings=[],this.markMap.clear(),"function"===typeof performance.clearMarks)try{performance.clearMarks(),performance.clearMeasures()}catch(e){}}},{key:"log",value:function(e,t){var i=Ur[this.config.logLevel],r=Ur[e];if(!(r>i)){"".concat(Kr," ").concat(t);switch(e){case"error":break;case"warn":break;case"info":break;case"verbose":break}}}}])}(),Qr=null;function Zr(e){return Qr?e&&Qr.setConfig(e):Qr=new Jr(e),Qr}var $r=function(){function e(t){wt(this,e),B(this,"grid",void 0),B(this,"snapshots",void 0),this.grid=t,this.snapshots=new Map}return mt(e,[{key:"createSnapshot",value:function(e){var t={name:e,timestamp:Date.now(),visibleCells:this.captureVisibleCells(),columns:this.captureColumnConfigs(),scrollPosition:this.captureScrollPosition(),dimensions:this.captureDimensions()};return this.snapshots.set(e,t),JSON.parse(JSON.stringify(t))}},{key:"compareSnapshot",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=this.snapshots.get(e);if(!i)return{isEqual:!1,differences:[{type:"dimensions",path:"_meta",expected:e,actual:null}]};var r=[];return this.compareDimensions(i.dimensions,r,t),this.compareScrollPosition(i.scrollPosition,r,t),this.compareColumns(i.columns,r,t),this.compareVisibleCells(i.visibleCells,r,t),{isEqual:0===r.length,differences:r}}},{key:"getSnapshot",value:function(e){var t=this.snapshots.get(e);return t?JSON.parse(JSON.stringify(t)):null}},{key:"exportSnapshot",value:function(e){var t=this.snapshots.get(e);return t?JSON.stringify(t,null,2):null}},{key:"importSnapshot",value:function(e){var t=JSON.parse(e);t&&t.name&&this.snapshots.set(t.name,t)}},{key:"captureVisibleCells",value:function(){return this.grid.testGetAllVisibleCells()}},{key:"captureColumnConfigs",value:function(){for(var e=[],t=this.grid.columns,i=0;i<t.length;i++){var r=t[i],n=this.grid.testGetColumnConfig(r.key);n&&e.push(n)}return e}},{key:"captureScrollPosition",value:function(){return this.grid.testGetScrollPosition()}},{key:"captureDimensions",value:function(){return this.grid.testGetTableDimensions()}},{key:"compareDimensions",value:function(e,t,i){for(var r=this.captureDimensions(),n=["containerWidth","containerHeight","tableWidth","tableHeight","headerHeight","rowHeight","fixedLeftWidth","fixedRightWidth","totalRows","totalColumns"],o=0,a=n;o<a.length;o++){var s=a[o];this.isWithinTolerance(e[s],r[s],i)||t.push({type:"dimensions",path:"dimensions.".concat(s),expected:e[s],actual:r[s]})}}},{key:"compareScrollPosition",value:function(e,t,i){for(var r=this.captureScrollPosition(),n=["scrollX","scrollY","maxScrollX","maxScrollY"],o=0,a=n;o<a.length;o++){var s=a[o];this.isWithinTolerance(e[s],r[s],i)||t.push({type:"scroll",path:"scroll.".concat(s),expected:e[s],actual:r[s]})}for(var l=["hasHorizontalScrollbar","hasVerticalScrollbar"],h=0,d=l;h<d.length;h++){var u=d[h];e[u]!==r[u]&&t.push({type:"scroll",path:"scroll.".concat(u),expected:e[u],actual:r[u]})}}},{key:"compareColumns",value:function(e,t,i){var r=this.captureColumnConfigs();if(e.length===r.length)for(var n=0;n<e.length;n++){var o=e[n],a=r[n],s="columns[".concat(n,"]");if(o.key!==a.key&&t.push({type:"columnConfig",path:"".concat(s,".key"),expected:o.key,actual:a.key}),this.isWithinTolerance(o.width,a.width,i)||t.push({type:"columnConfig",path:"".concat(s,".width"),expected:o.width,actual:a.width}),o.fixed!==a.fixed&&t.push({type:"columnConfig",path:"".concat(s,".fixed"),expected:o.fixed,actual:a.fixed}),o.children&&a.children)if(o.children.length!==a.children.length)t.push({type:"columnConfig",path:"".concat(s,".children.length"),expected:o.children.length,actual:a.children.length});else for(var l=0;l<o.children.length;l++){var h="".concat(s,".children[").concat(l,"]");this.isWithinTolerance(o.children[l].width,a.children[l].width,i)||t.push({type:"columnConfig",path:"".concat(h,".width"),expected:o.children[l].width,actual:a.children[l].width})}}else t.push({type:"columnConfig",path:"columns.length",expected:e.length,actual:r.length})}},{key:"compareVisibleCells",value:function(e,t,i){var r=this.captureVisibleCells();e.length!==r.length&&t.push({type:"cellLayout",path:"cells.length",expected:e.length,actual:r.length});var n,o=new Map,a=pt(e);try{for(a.s();!(n=a.n()).done;){var s=n.value;o.set("".concat(s.rowId,":").concat(s.columnKey),s)}}catch(T){a.e(T)}finally{a.f()}var l,h=new Map,d=pt(r);try{for(d.s();!(l=d.n()).done;){var u=l.value;h.set("".concat(u.rowId,":").concat(u.columnKey),u)}}catch(T){d.e(T)}finally{d.f()}var c,f=pt(o);try{for(f.s();!(c=f.n()).done;){var v=yt(c.value,2),g=v[0],y=v[1],p=h.get(g);if(p)for(var w=["x","y","width","height"],x=0,m=w;x<m.length;x++){var b=m[x];this.isWithinTolerance(y[b],p[b],i)||t.push({type:"cellLayout",path:"cells[".concat(g,"].").concat(b),expected:y[b],actual:p[b]})}else t.push({type:"cellLayout",path:"cells[".concat(g,"]"),expected:y,actual:null})}}catch(T){f.e(T)}finally{f.f()}var k,C=pt(h);try{for(C.s();!(k=C.n()).done;){var S=yt(k.value,1),I=S[0];o.has(I)||t.push({type:"cellLayout",path:"cells[".concat(I,"]"),expected:null,actual:h.get(I)})}}catch(T){C.e(T)}finally{C.f()}}},{key:"isWithinTolerance",value:function(e,t,i){return Math.abs(e-t)<=i}}])}();function en(e){if("undefined"===typeof process){var t=new $r(e),i={getCellLayout:function(t,i){return e.testGetCellLayout(t,i)},getAllVisibleCells:function(){return e.testGetAllVisibleCells()},getColumnConfig:function(t){return e.testGetColumnConfig(t)},getRowData:function(t){return e.testGetRowData(t)},getScrollPosition:function(){return e.testGetScrollPosition()},getTableDimensions:function(){return e.testGetTableDimensions()},createSnapshot:function(e){return t.createSnapshot(e)},compareSnapshot:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t.compareSnapshot(e,i)},getSnapshot:function(e){return t.getSnapshot(e)},exportSnapshot:function(e){return t.exportSnapshot(e)},importSnapshot:function(e){t.importSnapshot(e)},getHeaderBodyWidthComparison:function(){return e.testGetHeaderBodyWidthComparison()}};"undefined"!==typeof window&&(window.__CANVAS_TABLE_TEST_HOOKS__=i,window.__CANVAS_TABLE_GRID__=e)}}var tn=function(){function e(t,i){var r=this;wt(this,e),B(this,"target",void 0),B(this,"scrollY",void 0),B(this,"scrollX",void 0),B(this,"checkboxWidth",void 0),B(this,"horizontalScrollerSize",void 0),B(this,"verticalScrollerSize",void 0),B(this,"tempValue",void 0),B(this,"focusCell",void 0),B(this,"enterShift",void 0),B(this,"hashChange",void 0),B(this,"selector",void 0),B(this,"editor",void 0),B(this,"autofill",void 0),B(this,"rowDrag",void 0),B(this,"colDrag",void 0),B(this,"selectedColIds",void 0),B(this,"lastSelectedColId",void 0),B(this,"viewerDrag",void 0),B(this,"painter",void 0),B(this,"clipboard",void 0),B(this,"header",void 0),B(this,"footer",void 0),B(this,"body",void 0),B(this,"scroller",void 0),B(this,"tooltip",void 0),B(this,"events",void 0),B(this,"history",void 0),B(this,"styleManager",void 0),B(this,"edgeScroller",void 0),B(this,"rowIdMap",void 0),B(this,"selectedRowIds",void 0),B(this,"lastSelectedRowIndex",void 0),B(this,"data",void 0),B(this,"color",void 0),B(this,"borderColor",void 0),B(this,"fillColor",void 0),B(this,"borderWidth",void 0),B(this,"showCheckbox",void 0),B(this,"headerHeight",void 0),B(this,"rowKey",void 0),B(this,"striped",void 0),B(this,"stripedOddColor",void 0),B(this,"stripedEvenColor",void 0),B(this,"rowHeight",void 0),B(this,"hoverRowIndex",void 0),B(this,"hoverColIndex",void 0),B(this,"isScrolling",void 0),B(this,"scrollTimer",void 0),B(this,"beforeSelectCell",void 0),B(this,"afterSelectCell",void 0),B(this,"beforeMultiSelectCell",void 0),B(this,"afterMultiSelectCell",void 0),B(this,"beforeEditCell",void 0),B(this,"afterEditCell",void 0),B(this,"beforeSelectRow",void 0),B(this,"afterSelectRow",void 0),B(this,"beforeResizeColumn",void 0),B(this,"afterResizeColumn",void 0),B(this,"beforeResizeRow",void 0),B(this,"afterResizeRow",void 0),B(this,"beforeAutofill",void 0),B(this,"afterAutofill",void 0),B(this,"customAutofill",void 0),B(this,"beforeCopy",void 0),B(this,"afterCopy",void 0),B(this,"beforePaste",void 0),B(this,"afterPaste",void 0),B(this,"afterClear",void 0),B(this,"onLoad",void 0),B(this,"onRowDragReorder",void 0),B(this,"onRowDragMove",void 0),B(this,"onGroupToggle",void 0),B(this,"onTreeExpand",void 0),B(this,"onCellTextClick",void 0),B(this,"onCellTotalNumClick",void 0),B(this,"onColumnDragReorder",void 0),B(this,"onColumnContextMenu",void 0),B(this,"onModuleOverflowClick",void 0),B(this,"onAddRow",void 0),B(this,"showFooter",void 0),B(this,"onFooterCellClick",void 0),B(this,"range",void 0),B(this,"columns",void 0),B(this,"headers",void 0),B(this,"columnsLength",void 0),B(this,"originFixedWidth",void 0),B(this,"containerOriginX",void 0),B(this,"containerOriginY",void 0),B(this,"width",void 0),B(this,"height",void 0),B(this,"_configWidth",void 0),B(this,"_configHeight",void 0),B(this,"_baseColumnWidths",[]),B(this,"fixedLeftWidth",void 0),B(this,"fixedRightWidth",void 0),B(this,"tableWidth",void 0),B(this,"tableHeight",void 0),B(this,"tableHeaderHeight",void 0),B(this,"nestedColumnColors",new Map),B(this,"isDirty",!0),B(this,"lastScrollX",0),B(this,"lastScrollY",0),B(this,"perfMonitor",void 0),B(this,"loadingCells",new Map),B(this,"loadingRotation",0),B(this,"loadingImage",null),B(this,"loadingAnimationId",null),B(this,"colResizeIndicatorX",-1),this.target=t,this.scrollY=0,this.scrollX=0,this.perfMonitor=Zr({enabled:i.debug||!1,logLevel:i.debug?"verbose":"warn"}),this.hoverRowIndex=-1,this.hoverColIndex=-1,this.isScrolling=!1,this.scrollTimer=null,this.checkboxWidth=f,this.horizontalScrollerSize=p,this.verticalScrollerSize=p,this.tempValue="",this.focusCell=null,this.enterShift=!1,this.lastSelectedRowIndex=-1,this.hashChange={},this.rowIdMap=new Map,this.selectedRowIds=new Set,this.selector={show:!1,isSelected:!1,xArr:[-1,-1],yArr:[-1,-1]},this.autofill={enable:!1,xIndex:0,yIndex:0,xArr:[-1,-1],yArr:[-1,-1]},this.rowDrag={isDragging:!1,dragStartY:0,draggedRowIndices:[],dropIndicatorType:null,dropIndicatorY:0,dropTargetRowIndex:-1,justFinishedDrag:!1,hasStartedDragSelection:!1,isCtrlPressed:!1,isShiftPressed:!1,skipNextClick:!1},this.colDrag={isDragging:!1,dragStartX:0,draggedColIds:[],dropIndicatorType:null,dropIndicatorX:0,dropTargetColId:"",dropInsertBefore:!0,justFinishedDrag:!1,skipNextClick:!1},this.selectedColIds=new Set,this.lastSelectedColId="",this.viewerDrag={isDragging:!1,cell:null,startX:0,startY:0,startValue:null,currentValue:null},this.painter=new At(t),this.styleManager=new zr(i.theme||"default"),this.initConfig(i),this.createContainer(),this.clipboard=new Hr(this),this.editor=new tr(this),this.header=new zi(this,0,0),this.footer=this.showFooter?new Qi(this):null,this.body=new Ei(this,this.data),this.scroller=new rr(this),this.edgeScroller=new Yr(this),this.setLayoutSize(i),this.initTableSize(),this.tooltip=new Mr(this,0,0),this.events=new Pr(this,t),this.history=new Lr(this);var n=ni.getInstance();n.onAnimationFrame(function(){n.hasGifImages()&&r.markDirty()}),this.preloadLoadingImage(),this.initPaint(),en(this)}return mt(e,[{key:"footerHeight",get:function(){return this.footer?this.footer.height:0}},{key:"initConfig",value:function(e){Object.assign(this,{data:[],color:"#495060",borderColor:"#e1e6eb",fillColor:"#fff",borderWidth:1,showCheckbox:!0,headerHeight:d,rowKey:"id",striped:!1,stripedOddColor:"#fff",stripedEvenColor:"#f9fafc",rowHeight:48,beforeSelectCell:function(e){},afterSelectCell:function(e){},beforeMultiSelectCell:function(e){},afterMultiSelectCell:function(e){},beforeEditCell:function(e){},afterEditCell:function(e){},beforeSelectRow:function(e){},afterSelectRow:function(e){},beforeResizeColumn:function(){},afterResizeColumn:function(){},beforeResizeRow:function(){},afterResizeRow:function(){},beforeAutofill:function(){},afterAutofill:function(e){},customAutofill:void 0,beforeCopy:function(){},afterCopy:function(){},beforePaste:function(){},afterPaste:function(e){},afterClear:function(e){},onLoad:function(){},onRowDragReorder:void 0,onRowDragMove:void 0,onGroupToggle:void 0,onTreeExpand:void 0,onCellTextClick:void 0,onCellTotalNumClick:void 0,onColumnDragReorder:void 0,onColumnContextMenu:void 0,onModuleOverflowClick:void 0,onAddRow:void 0,showFooter:!1,onFooterCellClick:void 0},e),this.range={minX:0,minY:0,maxY:this.data.length-1},this.updateColumns(e.columns||[]),this.showCheckbox||(this.checkboxWidth=0),this.originFixedWidth=c+this.checkboxWidth}},{key:"setLayoutSize",value:function(){var e,t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=this.target.parentElement,n=r.parentElement;void 0!==i.width&&(this._configWidth=i.width),void 0!==i.height&&(this._configHeight=i.height);var o=null!==(e=i.width)&&void 0!==e?e:this._configWidth,a=null!==(t=i.height)&&void 0!==t?t:this._configHeight,s="string"===typeof o&&String(o).trim().endsWith("%"),l="string"===typeof a&&String(a).trim().endsWith("%");s&&(n.style.width=o),l&&(n.style.height=a);var h=n.getBoundingClientRect();this.containerOriginX=h.left,this.containerOriginY=h.top;var d=function(e,t,i){if(void 0===e||null===e)return i;if("number"===typeof e)return e;var r=String(e).trim();if(r.endsWith("%"))return Math.floor(t);var n=parseFloat(r);return isNaN(n)?i:n};this.width=d(o,h.width,h.width),this.height=d(a,h.height,window.innerHeight-h.top),this.target.width=this.width*Gr,this.target.height=this.height*Gr,this.target.style.width=this.width+"px",this.target.style.height=this.height+"px",r.style.width=this.width+"px",r.style.height=this.height+"px",s||(n.style.width=this.width+"px"),l||(n.style.height=this.height+"px"),this.painter.scaleCanvas(Gr)}},{key:"getTableSize",value:function(){var e=this.originFixedWidth,t=p;this.header.fixedColumnHeaders.filter(function(e){return!e.level}).forEach(function(i){"left"===i.fixed&&(e+=i.width),"right"===i.fixed&&(t+=i.width)}),this.fixedLeftWidth=e,this.fixedRightWidth=t,this.tableWidth=this.header.allColumnHeaders.filter(function(e){return!e.level}).reduce(function(e,t){return e+t.width},this.originFixedWidth),this.tableHeight=this.body.height,this.scroller.reset()}},{key:"initTableSize",value:function(){this.getTableSize(),this.fillTableWidth()}},{key:"fillTableWidth",value:function(){if(this.tableWidth<=this.width-p){var e=(this.width-p-this.tableWidth)/this.columnsLength;if(e){this.header.resizeAllColumn(e),this.body.resizeAllColumn(e);for(var t=0;t<this.columns.length;t++){var i=this.columns[t],r=this.headers[t];if("nested"===i.type&&i.nestedColumns)i.nestedColumns.forEach(function(t){t.width=(t.width||R[t.size||"mini"])+e}),i.width=i.nestedColumns.reduce(function(e,t){return e+(t.width||R[t.size||"mini"])},0);else{var n=i.width||R[i.size||"mini"];i.width=n+e,r&&(r.width=i.width)}}}this.tableWidth=this.width-p,this.fixedLeftWidth=0,this.fixedRightWidth=p}this.scroller.reset()}},{key:"resize",value:function(){var e=this.scrollX,t=this.scrollY;this.setLayoutSize(),this.restoreBaseColumnWidths(),this.header.paint(),this.body.rowCache.clear(),this.initTableSize();var i=this.tableWidth-(this.width-p);this.scrollX=i<=0?0:Math.max(-i,Math.min(0,e));var r=this.tableHeight+this.footerHeight-(this.height-p);this.scrollY=r<=0?0:Math.max(-r,Math.min(0,t)),this.scroller.setPosition(),this.markDirty()}},{key:"restoreBaseColumnWidths",value:function(){if(0!==this._baseColumnWidths.length)for(var e=0;e<this.columns.length;e++){var t=this._baseColumnWidths[e];if(t){var i=this.columns[e],r=this.headers[e];if(t.nestedChildWidths&&"nested"===i.type&&i.nestedColumns)for(var n=0;n<i.nestedColumns.length;n++)void 0!==t.nestedChildWidths[n]&&(i.nestedColumns[n].width=t.nestedChildWidths[n]);i.width=t.leafWidth,!r||"nested"===i.type&&i.nestedColumns||(r.width=t.leafWidth)}}}},{key:"createContainer",value:function(){var e=Ct("div","".concat(h)),t=Ct("div","".concat(h,"-main"));t.offset({width:this.width,height:this.height}),e.children(t);var i=Ct("canvas","".concat(h,"-table")),r=new tr(this),n=Ct("div","".concat(h,"-overlayer")).children(r.el);t.children(i,n),this.target.appendChild(e.el)}},{key:"getCell",value:function(e,t){return this.body.getCell(e,t)}},{key:"selectRowRange",value:function(e,t){for(var i=Math.min(e,t),r=Math.max(e,t),n=i;n<=r;n++){var o=this.body.getRow(n);o&&o._rowId&&o.rowHeader&&!xi(o.data)&&!mi(o.data)&&(this.selectedRowIds.add(o._rowId),o.checked=!0,o.rowHeader.handleCheck(!0))}}},{key:"selectCell",value:function(e){var t=this,i=e.colIndex,r=e.rowIndex;this.clearMultiSelect();var n=!!this.editor._nestedGridContext;if(n||(this.selector.show=!0,this.selector.isSelected=!0,this.edgeScroller.start(function(){var e=t.edgeScroller.lastMouseX,i=t.edgeScroller.lastMouseY;t.body.mouseMove(e,i)})),this.clearAllNestedGridsSelection(),this.enterShift&&this.focusCell){var o=this.focusCell,a=o.colIndex,s=o.rowIndex,l=Math.min(a,i),h=Math.max(a,i),d=Math.min(s,r),u=Math.max(s,r);this.autofill.xIndex=h,this.autofill.yIndex=u,this.selector.xArr=[l,h],this.selector.yArr=[d,u]}else this.editor.xIndex=i,this.editor.yIndex=r,this.adjustBoundaryPosition();this.putCell(),this.markDirty()}},{key:"resetCellPosition",value:function(){this.selector.xArr=[this.editor.xIndex,this.editor.xIndex],this.selector.yArr=[this.editor.yIndex,this.editor.yIndex],this.autofill.xIndex=this.editor.xIndex,this.autofill.yIndex=this.editor.yIndex}},{key:"putCell",value:function(){var e=this.focusCell,t=e.x,i=e.y,r=e.width,n=e.height,o=e.value,a=e.fixed,s=e.dataType,l=e.options,h="right"===a?this.width-(this.tableWidth-t-r)-r-p:"left"===a?t:t+this.scrollX,d=i+this.scrollY;this.afterSelectCell({value:o,x:h,y:d,width:r,height:n,dataType:s,options:l,colIndex:this.focusCell.colIndex,rowIndex:this.focusCell.rowIndex})}},{key:"multiSelectCell",value:function(e,t,i,r){var n=this.selector;if(n.isSelected){var o=Math.min(e,this.editor.xIndex),a=Math.max(e,this.editor.xIndex),s=Math.min(t,this.editor.yIndex),l=Math.max(t,this.editor.yIndex);this.autofill.xIndex=a,this.autofill.yIndex=l,n.xArr=[o,a],n.yArr=[s,l],this.edgeScroller.update(i,r)}this.autofill.enable&&(this.edgeScroller.update(i,r),this.autofill.xArr=n.xArr.slice(),this.autofill.yArr=n.yArr.slice(),t>=n.yArr[0]&&t<=n.yArr[1]?e>n.xArr[1]?this.autofill.xArr.splice(1,1,e):e<n.xArr[0]&&this.autofill.xArr.splice(0,1,e):t>n.yArr[1]?this.autofill.yArr.splice(1,1,t):t<n.yArr[0]&&this.autofill.yArr.splice(0,1,t))}},{key:"endMultiSelect",value:function(){this.selector.isSelected=!1,this.edgeScroller.stop(),this.selector.show&&this.autofill.enable&&(this.body.autofillData(),this.autofill.enable=!1,this.markDirty())}},{key:"clearMultiSelect",value:function(){this.selector.xArr=[-1,-1],this.selector.yArr=[-1,-1]}},{key:"clearAllNestedGridsSelection",value:function(){var e,t=pt(this.body.rows);try{for(t.s();!(e=t.n()).done;){var i,r=e.value,n=pt(r.allCells);try{for(n.s();!(i=n.n()).done;){var o=i.value;o.nestedGrid&&(o.nestedGrid.selectedCell=null)}}catch(a){n.e(a)}finally{n.f()}}}catch(a){t.e(a)}finally{t.f()}}},{key:"selectCols",value:function(e,t){var i=this,r=e.colId,n=!!t&&(t.ctrlKey||t.metaKey),o=!!t&&t.shiftKey,a="nested"===e.colType&&e.colspan>1;if(o&&this.lastSelectedColId){var s=this.header.allColumnHeaders.filter(function(e){return"nested-child"!==e.colType&&!(e.colspan>1&&"nested"!==e.colType)}),l=s.findIndex(function(e){return e.colId===i.lastSelectedColId}),h=s.findIndex(function(e){return e.colId===r});if(l>=0&&h>=0)for(var d=Math.min(l,h),u=Math.max(l,h),c=d;c<=u;c++)this.selectedColIds.add(s[c].colId)}else if(n){if(a){this.selectedColIds.has(r)?this.selectedColIds.delete(r):this.selectedColIds.add(r);var f,v=this.getNestedChildColIds(e.index),g=pt(v);try{for(g.s();!(f=g.n()).done;){var y=f.value;this.selectedColIds.delete(y)}}catch(A){g.e(A)}finally{g.f()}}else if("nested-child"===e.colType){this.selectedColIds.has(r)?this.selectedColIds.delete(r):this.selectedColIds.add(r);var p=String(e.index);if(this.selectedColIds.has(p)){this.selectedColIds.delete(p);var w,x=this.getNestedChildColIds(e.index),m=pt(x);try{for(m.s();!(w=m.n()).done;){var b=w.value;b!==r&&this.selectedColIds.add(b)}}catch(A){m.e(A)}finally{m.f()}}}else this.selectedColIds.has(r)?this.selectedColIds.delete(r):this.selectedColIds.add(r);this.lastSelectedColId=r}else{var k=this.selectedColIds.has(r);k||(this.selectedColIds.clear(),this.selectedColIds.add(r)),this.lastSelectedColId=r}if(this.selector.show=!0,this.clearAllNestedGridsSelection(),this.selectedColIds.size>0){var C=this.getSelectedColBaseIndices(),S=Math.min.apply(Math,fe(C)),I=Math.max.apply(Math,fe(C));this.selector.xArr=[S,I],this.selector.yArr=[this.range.minY,this.range.maxY],this.editor.xIndex=S,this.editor.yIndex=this.range.minY,this.autofill.xIndex=I,this.autofill.yIndex=this.range.maxY}else{var T=e.index;this.selector.xArr=[T,T],this.selector.yArr=[this.range.minY,this.range.maxY],this.editor.xIndex=T,this.editor.yIndex=this.range.minY,this.autofill.xIndex=T,this.autofill.yIndex=this.range.maxY}this.focusCell=this.body.getCell(this.editor.xIndex,this.editor.yIndex),this.focusCell&&this.putCell(),this.markDirty()}},{key:"getNestedChildColIds",value:function(e){return this.header.allColumnHeaders.filter(function(t){return"nested-child"===t.colType&&t.index===e}).map(function(e){return e.colId})}},{key:"getSelectedColBaseIndices",value:function(){var e,t=new Set,i=pt(this.selectedColIds);try{for(i.s();!(e=i.n()).done;){var r=e.value,n=parseInt(r.split(":")[0],10);t.add(n)}}catch(o){i.e(o)}finally{i.f()}return Array.from(t)}},{key:"startColDrag",value:function(e,t){var i=this,r=Array.from(this.selectedColIds);this.selectedColIds.has(e)?this.colDrag.draggedColIds=r:(this.colDrag.draggedColIds=[e],this.selectedColIds.clear(),this.selectedColIds.add(e)),this.colDrag.isDragging=!0,this.colDrag.dragStartX=t,this.target.style.cursor="grabbing",this.edgeScroller.start(function(){i.updateColDrag(i.edgeScroller.lastMouseX,i.edgeScroller.lastMouseY)},t,0,"horizontal")}},{key:"updateColDrag",value:function(e,t){if(this.colDrag.isDragging){var i,r=this.colDrag.draggedColIds.some(function(e){return!e.includes(":")});if(i=r?this.header.getColAtPosition(e,t,!0):this.header.getColAtPosition(e,t),!i)return this.colDrag.dropIndicatorType=null,void this.draw();var n=i.colId;if(this.colDrag.draggedColIds.includes(n))return this.colDrag.dropIndicatorType=null,void this.draw();var o="right"===i.fixed?this.width-(this.tableWidth-i.x-i.width)-i.width-this.verticalScrollerSize:"left"===i.fixed?i.x:i.x+this.scrollX,a=e-o;a<i.width/2?(this.colDrag.dropIndicatorType="line",this.colDrag.dropIndicatorX=o,this.colDrag.dropTargetColId=n,this.colDrag.dropInsertBefore=!0):(this.colDrag.dropIndicatorType="line",this.colDrag.dropIndicatorX=o+i.width,this.colDrag.dropTargetColId=n,this.colDrag.dropInsertBefore=!1),this.draw()}}},{key:"endColDrag",value:function(){if(this.colDrag.isDragging){var e=this.colDrag,t=e.dropIndicatorType,i=e.dropTargetColId,r=e.dropInsertBefore,n=e.draggedColIds;this.colDrag.isDragging=!1,this.colDrag.draggedColIds=[],this.colDrag.dropIndicatorType=null,this.colDrag.dropTargetColId="",this.colDrag.justFinishedDrag=!0,this.colDrag.skipNextClick=!0,this.target.style.cursor="default",t&&i&&this.onColumnDragReorder&&this.onColumnDragReorder(n,i,r),this.draw()}}},{key:"cancelColDrag",value:function(){this.colDrag.isDragging=!1,this.colDrag.draggedColIds=[],this.colDrag.dropIndicatorType=null,this.colDrag.dropTargetColId="",this.target.style.cursor="default",this.draw()}},{key:"clearSelectedCols",value:function(){this.selectedColIds.clear(),this.lastSelectedColId="",this.markDirty()}},{key:"isColSelected",value:function(e){return this.selectedColIds.has(e)}},{key:"isNestedParentAllChildrenSelected",value:function(e){var t=this,i=this.getNestedChildColIds(e);return 0!==i.length&&i.every(function(e){return t.selectedColIds.has(e)})}},{key:"selectRows",value:function(e){var t=e.rowIndex;if(this.selector.show=!0,this.clearAllNestedGridsSelection(),this.enterShift&&this.focusCell){var i=this.focusCell.rowIndex,r=Math.min(i,t),n=Math.max(i,t);this.selector.xArr=[this.range.minX,this.range.maxX],this.selector.yArr=[r,n],this.editor.xIndex=this.range.minX,this.editor.yIndex=i,this.autofill.xIndex=this.range.maxX,this.autofill.yIndex=n}else this.selector.xArr=[this.range.minX,this.range.maxX],this.selector.yArr=[t,t],this.editor.xIndex=this.range.minX,this.editor.yIndex=t,this.autofill.xIndex=this.range.maxX,this.autofill.yIndex=t;this.focusCell=this.body.getCell(this.editor.xIndex,this.editor.yIndex),this.putCell()}},{key:"startAutofill",value:function(){this.autofill.enable=!0}},{key:"clearAuaofill",value:function(){this.selector.xArr.splice(0,1,this.autofill.xArr[0]),this.selector.xArr.splice(1,1,this.autofill.xArr[1]),this.selector.yArr.splice(0,1,this.autofill.yArr[0]),this.selector.yArr.splice(1,1,this.autofill.yArr[1]),this.autofill.xIndex=this.selector.xArr[1],this.autofill.yIndex=this.selector.yArr[1],this.autofill.xArr=[-1,-1],this.autofill.yArr=[-1,-1]}},{key:"startEdit",value:function(){!this.focusCell||this.focusCell.readonly||this.focusCell.nestedGrid||(this.editor.show=!0,this.resetCellPosition(),this.putCell(),this.beforeEditCell(this.focusCell))}},{key:"doneEdit",value:function(){var e=this.editor._nestedGridContext;if(e){var t=e.nestedGrid,i=e.colIndex,r=e.rowIndex,n=this.tempValue||this.editor.value,o=t.columns[i],a=n;if("select"===o.type&&Array.isArray(o.options)){var s,l=pt(o.options);try{for(l.s();!(s=l.n()).done;){var h=s.value;if(n===h.label){a=h.value;break}}}catch(u){l.e(u)}finally{l.f()}}return t.data[r][o.key]=a,t.editingCell=null,this.editor.hide(),delete this.editor._nestedGridContext,this.afterSelectCell(null),void this.draw()}if(this.editor.show&&this.focusCell){if(this.editor.show=!1,this.selector.show=!0,this.focusCell.value!==this.tempValue){this.history.pushState({before:{colIndex:this.focusCell.colIndex,rowIndex:this.focusCell.rowIndex,value:this.focusCell.value},after:{colIndex:this.focusCell.colIndex,rowIndex:this.focusCell.rowIndex,value:this.tempValue},type:"single"}),this.focusCell.setData(this.tempValue);var d=this.body.getRowData(this.focusCell.rowIndex);this.afterEditCell(d)}this.putCell(),this.clipboard.clear(),this.afterSelectCell(null)}}},{key:"setData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.focusCell,i=t.colIndex,r=t.rowIndex,n=this.body.getCell(i,r);n&&n.setData(e),this.focusCellByCoord(i,r)}},{key:"batchSetData",value:function(e){var t=e.colIndex,i=e.rowIndex,r=e.value;this.body.batchSetData({colIndex:t,rowIndex:i,value:r}),this.focusCellByCoord(t,i,t+r[0].length-1,i+r.length-1)}},{key:"setTempData",value:function(e){this.editor.show=!0,this.tempValue=e}},{key:"pasteData",value:function(e){e.length>0&&(this.body.pasteData(e),this.clipboard.select(e))}},{key:"clearSelectedData",value:function(){this.body.clearSelectedData()}},{key:"focusCellByCoord",value:function(e,t,i,r){this.selector.xArr=[e,i||e],this.selector.yArr=[t,r||t],this.editor.xIndex=e,this.editor.yIndex=t,this.autofill.xIndex=i||e,this.autofill.yIndex=r||t,this.focusCell=this.body.getCell(this.editor.xIndex,this.editor.yIndex)}},{key:"resizeColumn",value:function(e,t){this.header.resizeColumn(e,t),this.body.resizeColumn(e,t);var i,r=pt(this.header.allColumnHeaders);try{for(r.s();!(i=r.n()).done;){var n=i.value;!n.level&&n.index<this.columns.length&&(this.columns[n.index].width=n.width)}}catch(o){r.e(o)}finally{r.f()}this.getTableSize(),this.markDirty()}},{key:"resizeRow",value:function(e,t){this.body.resizeRow(e,t),this.getTableSize()}},{key:"handleCheckRow",value:function(e){this.body.handleCheckRow(e)}},{key:"handleCheckHeader",value:function(){this.body.handleCheckHeader()}},{key:"moveFocus",value:function(e){var t=this.editor.xIndex,i=this.editor.yIndex,r=!1;do{switch(r=!1,e){case"LEFT":this.editor.xIndex>this.range.minX&&(this.editor.xIndex--,r=!0);break;case"TOP":this.editor.yIndex>this.range.minY&&(this.editor.yIndex--,r=!0);break;case"RIGHT":this.editor.xIndex<this.range.maxX&&(this.editor.xIndex++,r=!0);break;case"BOTTOM":this.editor.yIndex<this.range.maxY&&(this.editor.yIndex++,r=!0);break;default:}if(r){var n=this.body.getCell(this.editor.xIndex,this.editor.yIndex);if(n&&!n.nestedGrid)break}}while(r);(!r||this.editor.xIndex===t&&this.editor.yIndex===i)&&(this.editor.xIndex=t,this.editor.yIndex=i),this.adjustBoundaryPosition(),this.putCell()}},{key:"adjustPosition",value:function(e,t,i,r){var n=i-this.width+p,o=r-this.height+p;n>0&&this.scroller.update(-12,"HORIZONTAL"),o>0&&this.scroller.update(-12,"VERTICAL")}},{key:"adjustBoundaryPosition",value:function(){if(this.resetCellPosition(),this.focusCell=this.body.getCell(this.editor.xIndex,this.editor.yIndex),!this.focusCell.fixed){var e=this.focusCell.x+this.focusCell.width+this.scrollX,t=this.focusCell.y+this.focusCell.height+this.scrollY,i=this.width-this.fixedRightWidth,r=this.height-p,n=this.focusCell.x+this.scrollX-this.fixedLeftWidth,o=i-e,a=this.focusCell.y+this.scrollY-this.tableHeaderHeight,s=r-t;o<0?this.scroller.update(o,"HORIZONTAL"):n<0&&this.scroller.update(-n,"HORIZONTAL"),a<0?this.scroller.update(-a,"VERTICAL"):s<0&&this.scroller.update(s,"VERTICAL")}}},{key:"initPaint",value:function(){this.perfMonitor.trackFrame();var e=this.scrollX!==this.lastScrollX||this.scrollY!==this.lastScrollY;if(this.isDirty||e){this.perfMonitor.mark("frame-start"),this.draw(),this.perfMonitor.mark("frame-end");var t=this.perfMonitor.measure("frame","frame-start","frame-end");this.perfMonitor.checkFrameTime(t),this.isDirty=!1,this.lastScrollX=this.scrollX,this.lastScrollY=this.scrollY}window.requestAnimationFrame(this.initPaint.bind(this))}},{key:"markDirty",value:function(){this.isDirty=!0}},{key:"drawContainer",value:function(){this.painter.drawRect(0,0,this.width,this.height,{borderColor:this.borderColor,fillColor:"#fff",borderWidth:this.borderWidth})}},{key:"draw",value:function(){this.painter.clearCanvas(),this.drawContainer(),this.columnsLength&&(this.body.draw(),this.drawNestedColumnBorders(),this.tooltip.draw(),this.footer&&this.footer.draw(),this.header.draw(),this.scroller.draw(),this.drawRowDragIndicator(),this.drawColDragIndicator(),this.drawColResizeIndicator())}},{key:"drawNestedColumnBorders",value:function(){var e=this;if(0!==this.nestedColumnColors.size){var t=this.painter.ctx,i=this.tableHeaderHeight,r=this.height-this.horizontalScrollerSize-this.footerHeight;if(!(i>=r)){var n,o=[],a=pt(this.nestedColumnColors);try{var s=function(){var t=yt(n.value,2),i=t[0],r=t[1],a=e.header.allColumnHeaders.find(function(e){return e.index===i&&("nested"===e.colType||!e.colType&&!e.parentKey)});if(!a)return 0;var s=a.fixed;if(s)return 0;var l=a.width||0,h=a.x+e.scrollX;if(h+l<=e.fixedLeftWidth||h>=e.width-e.fixedRightWidth)return 0;o.push({screenX:h,colW:l,color:r})};for(a.s();!(n=a.n()).done;)s()}catch(v){a.e(v)}finally{a.f()}if(o.length>0){t.save(),t.beginPath(),t.rect(this.fixedLeftWidth,i,this.width-this.fixedLeftWidth-this.fixedRightWidth,r-i),t.clip();var l,h=pt(o);try{for(h.s();!(l=h.n()).done;){var d=l.value,u=d.screenX,c=d.colW,f=d.color;t.strokeStyle=f,t.lineWidth=2,t.beginPath(),t.moveTo(u+.5,i),t.lineTo(u+.5,r),t.stroke(),t.beginPath(),t.moveTo(u+c+.5,i),t.lineTo(u+c+.5,r),t.stroke()}}catch(v){h.e(v)}finally{h.f()}t.restore()}}}}},{key:"drawFixedNestedColumnBorders",value:function(e,t){var i=this;if(0!==this.nestedColumnColors.size){var r,n=this.painter.ctx,o=pt(this.nestedColumnColors);try{var a=function(){var o=yt(r.value,2),a=o[0],s=o[1],l=i.header.allColumnHeaders.find(function(e){return e.index===a&&("nested"===e.colType||!e.colType&&!e.parentKey)});if(!l)return 0;var h=l.fixed;if(!h)return 0;var d,u=l.width||0;d="right"===h?i.width-(i.tableWidth-l.x-u)-u-i.verticalScrollerSize:l.x,n.strokeStyle=s,n.lineWidth=2,n.beginPath(),n.moveTo(d+.5,e),n.lineTo(d+.5,e+t),n.stroke(),n.beginPath(),n.moveTo(d+u+.5,e),n.lineTo(d+u+.5,e+t),n.stroke()};for(o.s();!(r=o.n()).done;)a()}catch(s){o.e(s)}finally{o.f()}}}},{key:"drawColResizeIndicator",value:function(){if(!(this.colResizeIndicatorX<0)){var e=this.colResizeIndicatorX;this.painter.drawLine([[e,0],[e,this.height]],{borderColor:"rgb(82,146,247)",borderWidth:1,lineDash:[4,4]})}}},{key:"drawRowDragIndicator",value:function(){if(this.rowDrag.isDragging&&this.rowDrag.dropIndicatorType){var e=this.rowDrag,t=e.dropIndicatorType,i=e.dropIndicatorY,r=e.dropTargetRowIndex;if("line"===t)this.painter.drawRect(0,i,this.width,3,{fillColor:"#1890ff",borderWidth:0});else if("overlay"===t){var n=this.body.getRow(r);if(n){var o,a,s=n.y+this.scrollY,l=n.height;this.painter.drawRect(0,s,this.width,l,{fillColor:"rgba(24, 144, 255, 0.1)",borderColor:"#1890ff",borderWidth:2});var h=(null===(o=this.data[r])||void 0===o?void 0:o[null===(a=this.columns[0])||void 0===a?void 0:a.key])||"行".concat(r+1),d="拖放节点移动到 ".concat(h),u=this.painter.measureText(d,14),c=12,f=u+2*c,v=32,g=(this.width-f)/2,y=s+(l-v)/2;this.painter.drawRoundRect(g,y,f,v,4,{fillColor:"#6366f1",borderWidth:0}),this.painter.drawCellText(d,g,y,f,v,14,{color:"#ffffff",align:"center",bold:!0})}}}}},{key:"drawColDragIndicator",value:function(){if(this.colDrag.isDragging&&this.colDrag.dropIndicatorType){var e=this.colDrag.dropIndicatorX;this.painter.drawRect(e-1,0,3,this.height,{fillColor:"#1890ff",borderWidth:0}),this.painter.drawLine([[e-5,0],[e+5,0],[e,8]],{fillColor:"#1890ff",borderColor:"#1890ff",borderWidth:1})}}},{key:"updateColumns",value:function(e){var t=e.some(function(e){return"nested"===e.type&&e.nestedColumns&&e.nestedColumns.length>0}),i=ht(e);t&&i<2&&(i=2),i>1&&(this.headerHeight=24),this.tableHeaderHeight=this.headerHeight*i,this.headers=dt(e,i),this.columns=lt(e),this.columnsLength=this.columns.length,this.range.maxX=this.columnsLength-1,this._baseColumnWidths=this.columns.map(function(e){var t=e.width||R[e.size||"mini"],i={leafWidth:t};return"nested"===e.type&&e.nestedColumns&&e.nestedColumns.length>0&&(i.nestedChildWidths=e.nestedColumns.map(function(e){return e.width||R[e.size||"mini"]}),i.leafWidth=i.nestedChildWidths.reduce(function(e,t){return e+t},0)),i}),this.nestedColumnColors.clear();for(var r=0;r<this.columns.length;r++){var n=this.columns[r];"nested"===n.type&&n.color&&this.nestedColumnColors.set(r,n.color)}}},{key:"loadColumns",value:function(e){this.updateColumns(e),this.header.paint(),this.getTableSize()}},{key:"loadData",value:function(e){var t=this;this.perfMonitor.mark("loadData-start"),this.data=e,this.range.maxY=e.length-1,this.perfMonitor.checkDataSize(e.length,this.columns.length),this.editor.xIndex=0,this.editor.yIndex=0,this.editor.editorXIndex=0,this.editor.editorYIndex=0,this.editor.hide(),this.focusCell=null,this.selector.show=!1,this.selector.isSelected=!1,this.selector.xArr=[-1,-1],this.selector.yArr=[-1,-1],this.autofill.enable=!1,this.autofill.xIndex=0,this.autofill.yIndex=0,this.autofill.xArr=[-1,-1],this.autofill.yArr=[-1,-1],this.clearSelectedCols(),this.rowIdMap.clear(),e.forEach(function(e,i){e._rowId&&t.rowIdMap.set(e._rowId,i)}),this.body.paint(e),this.initTableSize(),this.markDirty(),this.perfMonitor.measure("loadData","loadData-start")}},{key:"getData",value:function(){return this.doneEdit(),this.body.getData()}},{key:"getRowData",value:function(e){return this.doneEdit(),this.body.getRowData(e)}},{key:"getCheckedRows",value:function(){return this.doneEdit(),this.body.getCheckedRows()}},{key:"setSelectedRows",value:function(e){var t=this;this.selectedRowIds.clear(),e.forEach(function(e){t.selectedRowIds.add(e)}),this.draw()}},{key:"getSelectedRowIds",value:function(){return Array.from(this.selectedRowIds)}},{key:"getChangedRows",value:function(){return this.doneEdit(),this.body.getChangedRows()}},{key:"validate",value:function(e){return this.doneEdit(),this.body.validate(e)}},{key:"validateChanged",value:function(e){return this.doneEdit(),this.body.validateChanged(e)}},{key:"validateField",value:function(e,t){return this.doneEdit(),this.body.validateField(e,t)}},{key:"getValidations",value:function(){return this.doneEdit(),this.body.getValidations()}},{key:"setValidations",value:function(e){return this.body.setValidations(e)}},{key:"clearValidations",value:function(){return this.body.clearValidations()}},{key:"updateData",value:function(e){return this.body.updateData(e)}},{key:"pauseGif",value:function(){var e=ni.getInstance().getGifManager();e.pause()}},{key:"resumeGif",value:function(){var e=ni.getInstance().getGifManager();e.resume()}},{key:"toggleGif",value:function(){var e=ni.getInstance().getGifManager();return e.toggle()}},{key:"isGifEnabled",value:function(){var e=ni.getInstance().getGifManager();return e.isEnabled()}},{key:"setStriped",value:function(e){this.striped=e}},{key:"getStriped",value:function(){return this.striped}},{key:"toggleStriped",value:function(){return this.striped=!this.striped,this.striped}},{key:"setTheme",value:function(e){this.styleManager.setTheme(e),this.draw()}},{key:"getTheme",value:function(){return this.styleManager.getTheme()}},{key:"registerStyle",value:function(e,t){this.styleManager.registerStyle(e,t)}},{key:"registerStyles",value:function(e){this.styleManager.registerStyles(e)}},{key:"setRowHeight",value:function(e){this.rowHeight=e,this.body.rowCache.forEach(function(t){t.allCells.forEach(function(t){t.nestedGrid&&t.nestedGrid.updateRowHeight(e)})}),this.body.paint(this.data),this.initTableSize(),this.draw()}},{key:"getRowHeight",value:function(){return this.rowHeight}},{key:"setDateDisplayType",value:function(e){this.body.rowCache.forEach(function(t){if(t.allCells){var i,r=pt(t.allCells);try{for(r.s();!(i=r.n()).done;){var n=i.value;n.viewerConfig&&Object.hasOwn(n.viewerConfig,"datePattern")&&(n.viewerConfig.datePattern=e)}}catch(o){r.e(o)}finally{r.f()}}});var t,i=pt(this.columns);try{for(i.s();!(t=i.n()).done;){var r=t.value,n=r.viewerConfig;n&&Object.hasOwn(n,"datePattern")&&(n.datePattern=e)}}catch(o){i.e(o)}finally{i.f()}this.markDirty()}},{key:"startRowDrag",value:function(e,t){var i=this,r=this.body.getCheckedRowObjects(),n=r.map(function(e){return e.rowIndex});n.includes(e)?this.rowDrag.draggedRowIndices=n:this.rowDrag.draggedRowIndices=[e],this.rowDrag.isDragging=!0,this.rowDrag.dragStartY=t,this.target.style.cursor="grabbing",this.edgeScroller.start(function(){i.updateRowDrag(i.edgeScroller.lastMouseX,i.edgeScroller.lastMouseY)},0,t,"vertical")}},{key:"updateRowDrag",value:function(e,t){if(this.rowDrag.isDragging){var i=this.body.getRowAtPosition(t);if(!i)return this.rowDrag.dropIndicatorType=null,void this.draw();var r=i.rowIndex;if(this.rowDrag.draggedRowIndices.includes(r))return this.rowDrag.dropIndicatorType=null,void this.draw();var n=i.y+this.scrollY,o=t-n,a=.3*i.height;o<a?(this.rowDrag.dropIndicatorType="line",this.rowDrag.dropIndicatorY=n,this.rowDrag.dropTargetRowIndex=r):o>i.height-a?(this.rowDrag.dropIndicatorType="line",this.rowDrag.dropIndicatorY=n+i.height,this.rowDrag.dropTargetRowIndex=r+1):(this.rowDrag.dropIndicatorType="overlay",this.rowDrag.dropIndicatorY=n,this.rowDrag.dropTargetRowIndex=r),this.draw()}}},{key:"endRowDrag",value:function(){var e=this;if(this.rowDrag.isDragging){var t=this.rowDrag,i=t.dropIndicatorType,r=t.dropTargetRowIndex,n=t.draggedRowIndices;if(this.rowDrag.isDragging=!1,this.rowDrag.draggedRowIndices=[],this.rowDrag.dropIndicatorType=null,this.rowDrag.dropTargetRowIndex=-1,this.rowDrag.justFinishedDrag=!0,this.target.style.cursor="default",i&&r>=0){var o=n.map(function(t){return e.data[t]});if("line"===i)this.onRowDragReorder?this.onRowDragReorder(o,r):alert("行重排序:将 ".concat(o.length," 行移动到位置 ").concat(r));else if("overlay"===i){var a=this.data[r];if(this.onRowDragMove)this.onRowDragMove(o,a);else{var s,l=a[null===(s=this.columns[0])||void 0===s?void 0:s.key]||"行".concat(r+1);alert("拖放节点移动到 ".concat(l))}}}this.draw()}}},{key:"cancelRowDrag",value:function(){this.rowDrag.isDragging=!1,this.rowDrag.draggedRowIndices=[],this.rowDrag.dropIndicatorType=null,this.rowDrag.dropTargetRowIndex=-1,this.target.style.cursor="default",this.draw()}},{key:"setHoverRow",value:function(e){this.isScrolling||this.hoverRowIndex!==e&&(this.hoverRowIndex=e,this.markDirty())}},{key:"setHoverCell",value:function(e,t){this.isScrolling||this.hoverColIndex===e&&this.hoverRowIndex===t||(this.hoverColIndex=e,this.hoverRowIndex=t,this.markDirty())}},{key:"setScrolling",value:function(e){var t=this;this.isScrolling=e,e&&(this.hoverRowIndex=-1,this.hoverColIndex=-1,this.markDirty(),this.scrollTimer&&clearTimeout(this.scrollTimer),this.scrollTimer=setTimeout(function(){t.isScrolling=!1,t.scrollTimer=null},300))}},{key:"preloadLoadingImage",value:function(){var e=this,t=new Image;t.onload=function(){e.loadingImage=t},t.src=Xr}},{key:"showLoading",value:function(e,t){var i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:6e4;if(null!==e&&void 0!==e&&e.length&&null!==t&&void 0!==t&&t.length){r=Math.max(r,1e3);var n,o=pt(e);try{for(o.s();!(n=o.n()).done;){var a,s=n.value,l=pt(t);try{var h=function(){var e=a.value,t="".concat(s,"|||").concat(e),n=i.loadingCells.get(t);n&&clearTimeout(n.timeoutId);var o=window.setTimeout(function(){i.removeSingleLoading(t),0===i.loadingCells.size&&i.stopLoadingAnimation(),i.markDirty()},r);i.loadingCells.set(t,{timeoutId:o})};for(l.s();!(a=l.n()).done;)h()}catch(d){l.e(d)}finally{l.f()}}}catch(d){o.e(d)}finally{o.f()}this.startLoadingAnimation(),this.markDirty()}}},{key:"hideLoading",value:function(e,t){if(null!==e&&void 0!==e&&e.length&&null!==t&&void 0!==t&&t.length){var i,r=pt(e);try{for(r.s();!(i=r.n()).done;){var n,o=i.value,a=pt(t);try{for(a.s();!(n=a.n()).done;){var s=n.value,l="".concat(o,"|||").concat(s);this.removeSingleLoading(l)}}catch(h){a.e(h)}finally{a.f()}}}catch(h){r.e(h)}finally{r.f()}0===this.loadingCells.size&&this.stopLoadingAnimation(),this.markDirty()}}},{key:"clearAllLoading",value:function(){var e,t=pt(this.loadingCells);try{for(t.s();!(e=t.n()).done;){var i=yt(e.value,2),r=i[1];clearTimeout(r.timeoutId)}}catch(n){t.e(n)}finally{t.f()}this.loadingCells.clear(),this.stopLoadingAnimation(),this.markDirty()}},{key:"removeSingleLoading",value:function(e){var t=this.loadingCells.get(e);t&&(clearTimeout(t.timeoutId),this.loadingCells.delete(e))}},{key:"isLoadingCell",value:function(e){return this.loadingCells.has(e)}},{key:"getLoadingRotation",value:function(){return this.loadingRotation}},{key:"getLoadingImage",value:function(){return this.loadingImage}},{key:"startLoadingAnimation",value:function(){var e=this;if(null===this.loadingAnimationId){var t=function(){0!==e.loadingCells.size?(e.loadingRotation+=.1,e.loadingRotation>2*Math.PI&&(e.loadingRotation-=2*Math.PI),e.markDirty(),e.loadingAnimationId=requestAnimationFrame(t)):e.loadingAnimationId=null};this.loadingAnimationId=requestAnimationFrame(t)}}},{key:"stopLoadingAnimation",value:function(){null!==this.loadingAnimationId&&(cancelAnimationFrame(this.loadingAnimationId),this.loadingAnimationId=null)}},{key:"testGetCellLayout",value:function(e,t){var i=this.findRowIndexById(e);if(-1===i)return null;var r=this.columns.findIndex(function(e){return e.key===t});if(-1===r)return null;var n=this.body.getRow(i);if(!n)return null;var o,a=n.allCells[r];if(!a)return null;o="right"===a.fixed?this.width-(this.tableWidth-a.x-a.width)-a.width-this.verticalScrollerSize:"left"===a.fixed?a.x:a.x+this.scrollX;var s=a.y+this.scrollY,l=this.tableHeaderHeight,h=this.height-this.horizontalScrollerSize-this.footerHeight,d=0,u=this.width-this.verticalScrollerSize,c=o+a.width>d&&o<u&&s+a.height>l&&s<h;return{x:o,y:s,width:a.width,height:a.height,visible:c,columnKey:t,rowId:e,colIndex:r,rowIndex:i,fixed:a.fixed||""}}},{key:"testGetAllVisibleCells",value:function(){var e,t=[],i=this.tableHeaderHeight,r=this.height-this.horizontalScrollerSize-this.footerHeight,n=0,o=this.width-this.verticalScrollerSize,a=pt(this.body.rows);try{for(a.s();!(e=a.n()).done;){var s=e.value,l=s.data;if(!l||!0!==l.isGroup&&!0!==l.isSeparateRow){var h,d=pt(s.allCells);try{for(d.s();!(h=d.n()).done;){var u=h.value,c=void 0;c="right"===u.fixed?this.width-(this.tableWidth-u.x-u.width)-u.width-this.verticalScrollerSize:"left"===u.fixed?u.x:u.x+this.scrollX;var f=u.y+this.scrollY,v=c+u.width>n&&c<o&&f+u.height>i&&f<r;if(v){var g,y,p=null!==(g=l[this.rowKey])&&void 0!==g?g:s._rowId;t.push({x:c,y:f,width:u.width,height:u.height,visible:!0,columnKey:u.key,rowId:p,colIndex:u.colIndex,rowIndex:s.rowIndex,fixed:u.fixed||"",value:u.value,label:null!==(y=u.label)&&void 0!==y?y:""})}}}catch(w){d.e(w)}finally{d.f()}}}}catch(w){a.e(w)}finally{a.f()}return t}},{key:"testGetColumnConfig",value:function(e){var t,i=pt(this.header.allColumnHeaders);try{for(i.s();!(t=i.n()).done;){var r,n=t.value,o=n.nestedKey||(null===(r=this.columns[n.index])||void 0===r?void 0:r.key);if(o===e){var a=null;return n.colspan>1&&!n.level&&(a=this.header.allColumnHeaders.filter(function(t){return t.parentKey===e&&t.level}).map(function(e){return{key:e.nestedKey||"",title:e.text,width:e.width,fixed:e.fixed||"",visible:e.isVisibleOnScreen(),index:e.index,level:e.level||0,type:e.colType||"",children:null,colspan:e.colspan,rowspan:e.rowspan||1,parentKey:e.parentKey||null}})),{key:o,title:n.text,width:n.width,fixed:n.fixed||"",visible:n.isVisibleOnScreen(),index:n.index,level:n.level||0,type:n.colType||"",children:a,colspan:n.colspan,rowspan:n.rowspan||1,parentKey:n.parentKey||null}}}}catch(s){i.e(s)}finally{i.f()}return null}},{key:"testGetRowData",value:function(e){var t=this.findRowIndexById(e);if(-1===t)return null;var i=this.body.data[t];return i?JSON.parse(JSON.stringify(i)):null}},{key:"testGetScrollPosition",value:function(){var e=this.width-this.tableWidth-p,t=this.height-this.tableHeight-p;return{scrollX:this.scrollX,scrollY:this.scrollY,maxScrollX:Math.min(e,0),maxScrollY:Math.min(t,0),hasHorizontalScrollbar:this.scroller.horizontalScroller.has,hasVerticalScrollbar:this.scroller.verticalScroller.has}}},{key:"testGetTableDimensions",value:function(){return{containerWidth:this.width,containerHeight:this.height,tableWidth:this.tableWidth,tableHeight:this.tableHeight,headerHeight:this.tableHeaderHeight,rowHeight:this.rowHeight,fixedLeftWidth:this.fixedLeftWidth,fixedRightWidth:this.fixedRightWidth,totalRows:this.body.data.length,totalColumns:this.columnsLength}}},{key:"testGetHeaderBodyWidthComparison",value:function(){var e,t=[],i=this.header.allColumnHeaders.filter(function(e){return!e.level}),r=null,n=pt(this.body.rows);try{for(n.s();!(e=n.n()).done;){var o=e.value,a=o.data;if(!a||!0!==a.isGroup&&!0!==a.isSeparateRow){r=o;break}}}catch(g){n.e(g)}finally{n.f()}for(var s=0;s<i.length;s++){var l,h,d,u=i[s],c=this.columns[s],f="nested"===(null===c||void 0===c?void 0:c.type)&&(null===c||void 0===c||null===(l=c.nestedColumns)||void 0===l?void 0:l.length)>0,v=null!==(h=null===(d=r)||void 0===d||null===(d=d.allCells)||void 0===d||null===(d=d[s])||void 0===d?void 0:d.width)&&void 0!==h?h:-1;t.push({colIndex:s,columnKey:(null===c||void 0===c?void 0:c.key)||"",headerWidth:u.width,bodyCellWidth:v,isNested:f,match:Math.abs(u.width-v)<=1})}return t}},{key:"findRowIndexById",value:function(e){for(var t=this.body.data,i=0;i<t.length;i++){var r=t[i],n=r[this.rowKey];if(n===e||String(n)===String(e))return i}return-1}},{key:"setShowFooter",value:function(e){if(e!==this.showFooter){this.showFooter=e,this.footer=e?new Qi(this):null;var t=this.tableHeight+this.footerHeight-(this.height-p);this.scrollY=t<=0?0:Math.max(-t,Math.min(0,this.scrollY)),this.scroller.reset(),this.scroller.setPosition(),this.draw()}}},{key:"setFooterData",value:function(e){this.footer&&this.footer.setFooterData(e)}},{key:"setFooterCellData",value:function(e,t){this.footer&&this.footer.setFooterCellData(e,t)}}])}(),rn=tn,nn={mounted:function(e,t){function i(i){if(e.contains(i.target))return!1;t.value&&t.value(i)}e.__vueClickOutside__=i,document.addEventListener("click",i)},updated:function(){},unmounted:function(e){e.__vueClickOutside__&&(document.removeEventListener("click",e.__vueClickOutside__),delete e.__vueClickOutside__)}},on=nn,an=(0,o.defineComponent)({name:"DDataGrid",props:{rowKey:{type:String,default:"id"},width:[Number,String],height:[Number,String],columns:{type:Array,default:function(){return[]}},data:{type:Array,default:function(){return[]}},datePattern:{type:String,default:l.ABSOLUTE},customAutofill:{type:Function,default:void 0},debug:{type:Boolean,default:!1},showFooter:{type:Boolean,default:!1}},directives:{clickoutside:on},setup:function(e,t){var i=t.emit,r=(0,o.ref)(!(e.data.length>0)),n=(0,o.ref)(null),a="".concat(h,"-target-").concat(Math.random().toString(36).slice(2,10)),s=null,l=null,u=null,c=0,f=0,v=(0,o.computed)(function(){var t=ht(e.columns);return d*t});(0,o.watch)(function(){return e.columns},function(t){var i,r;null===(i=s)||void 0===i||i.loadColumns(t),null===(r=s)||void 0===r||r.loadData(e.data)}),(0,o.watch)(function(){return e.data},function(t){var i,n;null===(i=s)||void 0===i||i.loadColumns(e.columns),null===(n=s)||void 0===n||n.loadData(t),r.value=!1}),(0,o.watch)(function(){return e.datePattern},function(e){var t;null===(t=s)||void 0===t||t.setDateDisplayType(e)}),(0,o.watch)(function(){return e.showFooter},function(e){var t;null===(t=s)||void 0===t||t.setShowFooter(e)});var g=function(){var e;return null===(e=s)||void 0===e?void 0:e.resize()},y=function(e){var t;return null===(t=s)||void 0===t?void 0:t.loadData(e)},p=function(e){var t;return null===(t=s)||void 0===t?void 0:t.setSelectedRows(e)},w=function(){var e;return null===(e=s)||void 0===e?void 0:e.getSelectedRowIds()},x=function(){var e;return null===(e=s)||void 0===e?void 0:e.getData()},m=function(){var e;return null===(e=s)||void 0===e?void 0:e.getCheckedRows()},b=function(){var e;return null===(e=s)||void 0===e?void 0:e.getChangedRows()},k=function(e){var t;return null===(t=s)||void 0===t?void 0:t.validate(e)},C=function(e){var t;return null===(t=s)||void 0===t?void 0:t.validateChanged(e)},S=function(e,t){var i;return null===(i=s)||void 0===i?void 0:i.validateField(e,t)},I=function(){var e;return null===(e=s)||void 0===e?void 0:e.getValidations()},T=function(e){var t;return null===(t=s)||void 0===t?void 0:t.setValidations(e)},A=function(){var e;return null===(e=s)||void 0===e?void 0:e.clearValidations()},R=function(e){var t;return null===(t=s)||void 0===t?void 0:t.updateData(e)},D=function(){var e;null===(e=s)||void 0===e||e.resize()},E=function(e){n.value=e},P=function(){var e;null===(e=s)||void 0===e||e.doneEdit(),i("on-edit-done")},O=function(){var e;return null===(e=s)||void 0===e?void 0:e.toggleGif()},M=function(){var e;return null===(e=s)||void 0===e?void 0:e.toggleStriped()},B=function(e){var t;null===(t=s)||void 0===t||t.setStriped(e)},H=function(){var e;return null===(e=s)||void 0===e?void 0:e.getStriped()},F=function(e){var t;null===(t=s)||void 0===t||t.setTheme(e)},L=function(){var e;return null===(e=s)||void 0===e?void 0:e.getTheme()},W=function(e,t){var i;null===(i=s)||void 0===i||i.registerStyle(e,t)},z=function(e){var t;null===(t=s)||void 0===t||t.registerStyles(e)},N=function(e){var t;null===(t=s)||void 0===t||t.setRowHeight(e)},V=function(){var e;return null===(e=s)||void 0===e?void 0:e.getRowHeight()},_=function(e,t,i){var r;null===(r=s)||void 0===r||r.showLoading(e,t,i)},j=function(e,t){var i;null===(i=s)||void 0===i||i.hideLoading(e,t)},Y=function(){var e;null===(e=s)||void 0===e||e.clearAllLoading()},G=function(e){var t;null===(t=s)||void 0===t||t.setFooterData(e)},X=function(e,t){var i;null===(i=s)||void 0===i||i.setFooterCellData(e,t)},U=function(e){var t;null===(t=s)||void 0===t||t.setShowFooter(e)};return(0,o.onMounted)(function(){(0,o.nextTick)(function(){var t,r=document.getElementById(a),o=null===r||void 0===r||null===(t=r.parentElement)||void 0===t?void 0:t.parentElement;s=new rn(r,{rowKey:e.rowKey,width:e.width,height:e.height,columns:e.columns,data:e.data,beforeSelectCell:function(){},afterSelectCell:function(e){E(e),null===e&&i("on-edit-done")},beforeMultiSelectCell:function(){},afterMultiSelectCell:function(){},beforeEditCell:function(){var e,t,r;i("on-before-edit-cell",{cell:n.value,position:n.value?{x:n.value.x,y:n.value.y,width:n.value.width,height:n.value.height}:null,dataType:null===(e=n.value)||void 0===e?void 0:e.dataType,options:null===(t=n.value)||void 0===t?void 0:t.options,value:null===(r=n.value)||void 0===r?void 0:r.value})},afterEditCell:function(e){i("after-edit-cell",e)},afterAutofill:function(e){i("after-autofill",e)},afterPaste:function(e){i("after-paste",e)},afterClear:function(e){i("after-clear",e)},onLoad:function(){setTimeout(function(){i("on-load")},0)},onRowDragReorder:function(e,t){i("on-row-drag-reorder",e,t)},onRowDragMove:function(e,t){i("on-row-drag-move",e,t)},onGroupToggle:function(e,t){i("on-group-toggle",e,t)},onTreeExpand:function(e,t){i("on-tree-expand",e,t)},onCellTextClick:function(e,t){i("on-cell-text-click",e,t)},onCellTotalNumClick:function(e,t){i("on-cell-total-num-click",e,t)},onColumnDragReorder:function(e,t,r){i("on-column-drag-reorder",e,t,r)},onColumnContextMenu:function(e){i("on-column-context-menu",e)},onModuleOverflowClick:function(e,t,r,n){i("on-module-overflow-click",e,t,r,n)},onAddRow:function(e){i("on-add-row",e)},onFooterCellClick:function(e){i("on-footer-cell-click",e)},customAutofill:e.customAutofill,debug:e.debug,showFooter:e.showFooter}),window.grid=s,window.ImageManager=ni;var h="string"===typeof e.width&&String(e.width).includes("%")||"string"===typeof e.height&&String(e.height).includes("%")||void 0===e.width||void 0===e.height;if(h&&null!==o&&void 0!==o&&o.parentElement){var d=o.parentElement,v=d.getBoundingClientRect();c=Math.round(v.width),f=Math.round(v.height),l=new ResizeObserver(function(e){var t=e[0];if(t){var i=Math.round(t.contentRect.width),r=Math.round(t.contentRect.height);i===c&&r===f||(c=i,f=r,null!==u&&cancelAnimationFrame(u),u=requestAnimationFrame(function(){var e;u=null,null===(e=s)||void 0===e||e.resize()}))}}),l.observe(d)}})}),(0,o.onUnmounted)(function(){var e,t,i;null!==u&&(cancelAnimationFrame(u),u=null),null===(e=l)||void 0===e||e.disconnect(),l=null,null===(t=s)||void 0===t||t.clearAllLoading(),null===(i=s)||void 0===i||null===(i=i.events)||void 0===i||i.destroy()}),{CSS_PREFIX:h,canvasId:a,loading:r,focusCell:n,tableHeaderHeight:v,reload:g,loadData:y,setSelectedRows:p,getSelectedRowIds:w,getData:x,getCheckedRows:m,getChangedRows:b,validate:k,validateChanged:C,validateField:S,getValidations:I,setValidations:T,clearValidations:A,updateData:R,setFullScreen:D,selectCell:E,handleclickoutside:P,toggleGif:O,toggleStriped:M,setStriped:B,getStriped:H,setTheme:F,getTheme:L,registerStyle:W,registerStyles:z,setRowHeight:N,getRowHeight:V,showLoading:_,hideLoading:j,clearAllLoading:Y,setFooterData:G,setFooterCellData:X,setShowFooter:U}}}),sn=i(6262);const ln=(0,sn.A)(an,[["render",s]]);var hn=ln;function dn(e){return"string"===typeof e.value||"number"===typeof e.value||null===e.value}function un(e){return Array.isArray(e.options)&&e.options.length>0}function cn(e){var t=e.value;return null===t||void 0===t||(Array.isArray(t)?0===t.length||t[0]&&"object"===P(t[0])&&"name"in t[0]:"object"===P(t)&&"name"in t)}function fn(e){return"number"===typeof e.value&&void 0!==e.barHeight}function vn(e){return Array.isArray(e.value)&&Array.isArray(e.columns)}var gn,yn,pn=function(){function e(){wt(this,e),B(this,"type","text")}return mt(e,[{key:"draw",value:function(e,t){var i,r,n,o,a,s=e.painter,l=e.bounds,h=l.x,d=l.y,u=l.width,c=l.height,f=this.getDisplayText(t);""!==f&&null!==f&&void 0!==f||(f=t.placeholder||"-");var v=t.textAlign||(null===(i=t.style)||void 0===i?void 0:i.textAlign)||"left",g=(null===(r=t.style)||void 0===r?void 0:r.textBaseline)||"middle",y=(null===(n=t.style)||void 0===n?void 0:n.color)||"#333",p=null!==(o=null===(a=t.style)||void 0===a?void 0:a.padding)&&void 0!==o?o:10;t.asTag&&t.backgroundColor?this.drawTag(e,t,f):s.drawCellText(String(f),h,d,u,c,p,{color:y,align:v,baseLine:g})}},{key:"getDisplayText",value:function(e){return e.richText?this.extractPlainText(e.richText):void 0!==e.label&&null!==e.label?String(e.label):null===e.value||void 0===e.value?"":String(e.value)}},{key:"extractPlainText",value:function(e){return e.replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/&quot;/g,'"').trim()}},{key:"drawTag",value:function(e,t,i){var r,n,o,a,s=e.ctx,l=e.bounds,h=l.x,d=l.y,u=l.width,c=l.height,f=t.backgroundColor||"#f0f0f0",v=(null===(r=t.style)||void 0===r?void 0:r.color)||"#333",g=null!==(n=t.tagRadius)&&void 0!==n?n:4,y=8,p=(null===(o=t.style)||void 0===o?void 0:o.fontSize)||12;s.save(),s.font="".concat(p,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif');var w=s.measureText(i).width;s.restore();var x,m=Math.min(w+2*y,u-20),b=Math.min(20,c-8),k=t.textAlign||(null===(a=t.style)||void 0===a?void 0:a.textAlign)||"left";switch(k){case"center":x=h+(u-m)/2;break;case"right":x=h+u-m-10;break;default:x=h+10}var C=d+(c-b)/2;this.drawRoundedRect(s,x,C,m,b,g,f),s.save(),s.fillStyle=v,s.font="".concat(p,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),s.textAlign="center",s.textBaseline="middle";var S=m-2*y,I=this.truncateText(s,i,S);s.fillText(I,x+m/2,C+b/2),s.restore()}},{key:"drawRoundedRect",value:function(e,t,i,r,n,o,a){e.save(),e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.fillStyle=a,e.fill(),e.restore()}},{key:"truncateText",value:function(e,t,i){if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),wn=pn,xn=function(){function e(){wt(this,e),B(this,"type","select")}return mt(e,[{key:"draw",value:function(e,t){var i=e.fillColor,r=this.getSelectedOptions(t);if(0===r.length)return this.drawEmptyState(e),void(t.showArrow&&this.drawArrow(e,i));t.multiple?this.drawMultipleTags(e,t,r):this.drawSingleOption(e,t,r[0]),t.showArrow&&this.drawArrow(e,i)}},{key:"getSelectedOptions",value:function(e){var t=e.value,i=e.options,r=void 0===i?[]:i;if(null===t||void 0===t||""===t)return[];var n,o=Array.isArray(t)?t:[t],a=[],s=pt(o);try{var l=function(){var e=n.value,t=r.find(function(t){return t.value===e});t?a.push(t):a.push({value:e,label:String(e),backgroundColor:"#f0f0f0",color:"#666"})};for(s.s();!(n=s.n()).done;)l()}catch(h){s.e(h)}finally{s.f()}return a}},{key:"drawEmptyState",value:function(e){var t=e.painter,i=e.bounds,r=i.x,n=i.y,o=i.width,a=i.height;t.drawCellText("-",r,n,o,a,10,{color:"#bbb",align:"left",baseLine:"middle"})}},{key:"drawSingleOption",value:function(e,t,i){var r=e.painter,n=e.bounds,o=n.x,a=n.y,s=n.width,l=n.height;i.backgroundColor?this.drawTag(e,i,o+10,a+(l-20)/2,s-40):r.drawCellText(i.label,o,a,s-20,l,10,{color:i.color||"#333",align:"left",baseLine:"middle"})}},{key:"drawMultipleTags",value:function(e,t,i){var r,n=e.ctx,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=null!==(r=t.maxTags)&&void 0!==r?r:3,u=i.slice(0,d),c=i.length-d,f=10,v=6,g=20,y=a+f,p=s+(h-g)/2,w=l-30;n.save(),n.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var x,m=pt(u);try{for(m.s();!(x=m.n()).done;){var b=x.value,k=this.calculateTagWidth(n,b.label);if(y+k>a+w){var C="+".concat(i.length-u.indexOf(b));this.drawMoreIndicator(e,y,p,C);break}this.drawTag(e,b,y,p,k),y+=k+v}}catch(S){m.e(S)}finally{m.f()}c>0&&y+30<=a+w&&this.drawMoreIndicator(e,y,p,"+".concat(c)),n.restore()}},{key:"calculateTagWidth",value:function(e,t){var i=e.measureText(t).width;return Math.min(i+16,120)}},{key:"drawTag",value:function(e,t,i,r,n){var o=e.ctx,a=t.backgroundColor||"#f0f0f0",s=t.color||"#333",l=4,h=8,d=20;o.save(),o.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var u=o.measureText(t.label).width,c=Math.min(u+2*h,n);this.drawRoundedRect(o,i,r,c,d,l,a),o.fillStyle=s,o.textAlign="center",o.textBaseline="middle";var f=this.truncateText(o,t.label,c-2*h);o.fillText(f,i+c/2,r+d/2),o.restore()}},{key:"drawMoreIndicator",value:function(e,t,i,r){var n=e.ctx;n.save(),n.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',n.fillStyle="#999",n.textAlign="left",n.textBaseline="middle",n.fillText(r,t,i+10),n.restore()}},{key:"drawArrow",value:function(e,t){var i=e.painter,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height;i.drawCellAffixIcon("arrow",n,o,a,s-2,{color:"#bbbec4",fillColor:t})}},{key:"drawRoundedRect",value:function(e,t,i,r,n,o,a){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.fillStyle=a,e.fill()}},{key:"truncateText",value:function(e,t,i){if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),mn=xn,bn=function(){function e(){wt(this,e),B(this,"type","image"),B(this,"imageManager",void 0),this.imageManager=ni.getInstance()}return mt(e,[{key:"draw",value:function(e,t){var i=e.requestRedraw,r=t.value;if(r&&""!==r){var n=this.imageManager.isAnimatedImage(r),o=n?this.imageManager.getGifCanvas(r):null,a=o||this.imageManager.getCachedImage(r);a?this.drawImage(e,t,a):(this.imageManager.loadingImages.has(r)||this.imageManager.loadImage(r).then(function(){i()}).catch(function(e){i()}),this.drawPlaceholder(e,t,"Loading..."))}else this.drawPlaceholder(e,t,"No Image")}},{key:"drawImage",value:function(e,t,i){var r,n,o,a,s=e.painter,l=e.ctx,h=e.bounds,d=h.x,u=h.y,c=h.width,f=h.height,v=t.fit,g=void 0===v?"contain":v,y=t.borderRadius,p=void 0===y?0:y,w=4,x=c-2*w,m=f-2*w,b=i.width/i.height,k=x/m;switch(g){case"cover":b>k?(n=m,r=m*b):(r=x,n=x/b),o=d+(c-r)/2,a=u+(f-n)/2;break;case"fill":r=x,n=m,o=d+w,a=u+w;break;case"contain":default:b>k?(r=x,n=x/b):(n=m,r=m*b),o=d+(c-r)/2,a=u+(f-n)/2;break}p>0?this.drawRoundedImage(l,i,o,a,r,n,p):s.drawImage(i,o,a,r,n)}},{key:"drawRoundedImage",value:function(e,t,i,r,n,o,a){e.save(),e.beginPath(),e.moveTo(i+a,r),e.lineTo(i+n-a,r),e.quadraticCurveTo(i+n,r,i+n,r+a),e.lineTo(i+n,r+o-a),e.quadraticCurveTo(i+n,r+o,i+n-a,r+o),e.lineTo(i+a,r+o),e.quadraticCurveTo(i,r+o,i,r+o-a),e.lineTo(i,r+a),e.quadraticCurveTo(i,r,i+a,r),e.closePath(),e.clip(),e.drawImage(t,i,r,n,o),e.restore()}},{key:"drawPlaceholder",value:function(e,t,i){var r=e.ctx,n=e.bounds,o=n.x,a=n.y,s=n.width,l=n.height;if(t.placeholder){var h=this.imageManager.getCachedImage(t.placeholder);if(h)return void this.drawImage(e,F(F({},t),{},{value:t.placeholder}),h)}var d="No Image"===i?t.alt||"No Image":i;r.save(),r.fillStyle="#f5f5f5",r.fillRect(o+4,a+4,s-8,l-8),r.fillStyle="Loading..."===i?"#999":"#ccc",r.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',r.textAlign="center",r.textBaseline="middle",r.fillText(d,o+s/2,a+l/2),r.restore()}}])}(),kn=bn,Cn=(i(744),function(){function e(){wt(this,e),B(this,"type","person"),B(this,"imageManager",void 0),B(this,"avatarColors",["#1890ff","#52c41a","#722ed1","#eb2f96","#fa8c16","#13c2c2","#2f54eb","#f5222d"]),this.imageManager=ni.getInstance()}return mt(e,[{key:"draw",value:function(e,t){var i=t.value,r=t.placeholder,n=void 0===r?"Unassigned":r;if(null===i||void 0===i||Array.isArray(i)&&0===i.length)this.drawPlaceholder(e,n);else{var o=Array.isArray(i)?i:[i];this.drawPersons(e,t,o)}}},{key:"drawPersons",value:function(e,t,i){for(var r=e.bounds,n=e.requestRedraw,o=r.x,a=r.y,s=r.width,l=r.height,h=t.mode,d=void 0===h?"both":h,u=t.avatarSize,c=void 0===u?24:u,f=t.maxDisplay,v=void 0===f?3:f,g=10,y="avatar"===d?-8:8,p=o+g,w=a+l/2,x=i.slice(0,v),m=i.length-v,b=0;b<x.length;b++){var k=x[b],C=o+s-g-p;if(C<c)break;p+=this.drawPersonWithConstraint(e,k,p,w,d,c,C,n),p+=y}if(m>0){var S=o+s-g-p;S>=c&&this.drawRemainingCount(e,p,w,m,c)}}},{key:"calculatePersonWidth",value:function(e,t,i,r){var n=e.ctx;switch(i){case"avatar":return r;case"name":return n.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',n.measureText(t.name).width;case"both":default:return n.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',r+6+n.measureText(t.name).width}}},{key:"drawPersonWithConstraint",value:function(e,t,i,r,n,o,a,s){var l=e.ctx,h=i,d=0;if("avatar"!==n&&"both"!==n||(this.drawAvatar(e,t,h,r,o,s),h+=o+6,d+=o),"name"===n||"both"===n){l.save(),l.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',l.fillStyle="#333",l.textAlign="left",l.textBaseline="middle";var u="name"===n?i:h,c=a-("both"===n?o+6:0);if(c>0){var f=this.truncateText(l,t.name,c);l.fillText(f,u,r),d+=l.measureText(f).width,"both"===n&&(d+=6)}l.restore()}return d}},{key:"truncateText",value:function(e,t,i){var r="...",n=e.measureText(r).width,o=e.measureText(t).width;if(o<=i)return t;if(i<n)return"";var a=0,s=t.length;while(a<s){var l=Math.ceil((a+s)/2),h=t.slice(0,l)+r,d=e.measureText(h).width;d<=i?a=l:s=l-1}return a>0?t.slice(0,a)+r:r}},{key:"drawAvatar",value:function(e,t,i,r,n,o){var a=e.ctx,s=r-n/2,l=n/2,h=t.avatar,d=null;h&&(d=this.imageManager.getCachedImage(h),d||this.imageManager.loadingImages.has(h)||this.imageManager.loadImage(h).then(function(){return o()}).catch(function(){return o()})),a.save(),a.beginPath(),a.arc(i+l,r,l,0,2*Math.PI),a.closePath(),a.clip(),d?a.drawImage(d,i,s,n,n):this.drawFallbackAvatar(a,t,i,s,n,l,r),a.restore(),a.save(),a.beginPath(),a.arc(i+l,r,l,0,2*Math.PI),a.strokeStyle="#fff",a.lineWidth=2,a.stroke(),a.restore()}},{key:"drawFallbackAvatar",value:function(e,t,i,r,n,o,a){var s=this.getColorIndex(t),l=this.avatarColors[s];e.fillStyle=l,e.fillRect(i,r,n,n);var h=this.getInitial(t.name);e.fillStyle="#fff",e.font="bold ".concat(.5*n,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),e.textAlign="center",e.textBaseline="middle",e.fillText(h,i+o,a)}},{key:"getColorIndex",value:function(e){for(var t=String(e.id||e.name),i=0,r=0;r<t.length;r++)i=t.charCodeAt(r)+((i<<5)-i);return Math.abs(i)%this.avatarColors.length}},{key:"getInitial",value:function(e){if(!e)return"?";if(/[\u4e00-\u9fa5]/.test(e[0]))return e[0];var t=e.trim().split(/\s+/);return t.length>1?(t[0][0]+t[t.length-1][0]).toUpperCase():e[0].toUpperCase()}},{key:"drawRemainingCount",value:function(e,t,i,r,n){var o=e.ctx,a=n,s=a/2;o.save(),o.beginPath(),o.arc(t+s,i,s,0,2*Math.PI),o.fillStyle="#e8e8e8",o.fill(),o.fillStyle="#666",o.font="".concat(.4*a,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),o.textAlign="center",o.textBaseline="middle",o.fillText("+".concat(r),t+s,i),o.restore()}},{key:"drawPlaceholder",value:function(e,t){var i=e.painter,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height;i.drawCellText(t,n,o,a,s,10,{color:"#bbb",align:"left",baseLine:"middle"})}}])}()),Sn=Cn,In=function(){function e(){wt(this,e),B(this,"type","progress"),B(this,"defaultColor","#1890ff"),B(this,"defaultTrackColor","#e8e8e8"),B(this,"handleRadius",6),B(this,"handleBorderWidth",2),B(this,"handleColor","#ffffff"),B(this,"handleBorderColor","#52c41a")}return mt(e,[{key:"draw",value:function(e,t){var i,r,n=e.ctx,o=e.bounds,a=e.isHoverCell,s=o.x,l=o.y,h=o.width,d=o.height,u=t.value,c=t.min,f=void 0===c?0:c,v=t.max,g=void 0===v?100:v,y=t.barHeight,p=void 0===y?8:y,w=t.showText,x=void 0===w||w,m=t.textPosition,b=void 0===m?"right":m,k=t.trackColor,C=void 0===k?this.defaultTrackColor:k,S=t.draggable,I=void 0!==S&&S,T=this.normalizeValue(u,f,g),A=Math.round(100*T),R=this.getProgressColor(t,T),D=10,E=x?40:0,P=x&&"right"===b?8:0;switch(b){case"right":i=s+D,r=h-2*D-E-P;break;case"outside":i=s+D,r=h-2*D;break;case"inside":default:i=s+D,r=h-2*D;break}var O=l+(d-p)/2,M=p/2;this.drawRoundedRect(n,i,O,r,p,M,C);var B=r*T;B>0&&this.drawRoundedRect(n,i,O,B,p,M,R),x&&this.drawPercentageText(n,t,s,l,h,d,i,O,r,p,A,R),I&&a&&this.drawDragHandle(n,i,O,r,p,T)}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n=t.draggable,o=void 0!==n&&n;return o&&this.isOverDragHandle(e,t,i,r)?"pointer":null}},{key:"onDragStart",value:function(e,t,i,r){var n=t.draggable,o=void 0!==n&&n;return!!o&&this.isOverProgressBar(e,t,i,r)}},{key:"onDragMove",value:function(e,t,i,r,n,o){var a,s=e.bounds,l=s.width,h=t.min,d=void 0===h?0:h,u=t.max,c=void 0===u?100:u,f=t.showText,v=void 0===f||f,g=t.textPosition,y=void 0===g?"right":g,p=10,w=v?40:0,x=v&&"right"===y?8:0;switch(y){case"right":a=l-2*p-w-x;break;default:a=l-2*p;break}var m=i-p,b=Math.max(0,Math.min(1,m/a)),k=d+b*(c-d);return Math.round(k)}},{key:"onDragEnd",value:function(e,t,i){}},{key:"isOverDragHandle",value:function(e,t,i,r){var n,o=e.bounds,a=o.width,s=o.height,l=t.value,h=t.min,d=void 0===h?0:h,u=t.max,c=void 0===u?100:u,f=t.showText,v=void 0===f||f,g=t.textPosition,y=void 0===g?"right":g,p=10,w=v?40:0,x=v&&"right"===y?8:0;switch(y){case"right":n=a-2*p-w-x;break;default:n=a-2*p;break}var m=this.normalizeValue(l,d,c),b=p+n*m,k=s/2,C=i-b,S=r-k,I=Math.sqrt(C*C+S*S);return I<=this.handleRadius+4}},{key:"isOverProgressBar",value:function(e,t,i,r){var n,o=e.bounds,a=o.width,s=o.height,l=t.barHeight,h=void 0===l?8:l,d=t.showText,u=void 0===d||d,c=t.textPosition,f=void 0===c?"right":c,v=10,g=u?40:0,y=u&&"right"===f?8:0;switch(f){case"right":n=a-2*v-g-y;break;default:n=a-2*v;break}var p=(s-h)/2,w=6;return i>=v&&i<=v+n&&r>=p-w&&r<=p+h+w}},{key:"drawDragHandle",value:function(e,t,i,r,n,o){var a=t+r*o,s=i+n/2;e.save(),e.shadowColor="rgba(0, 0, 0, 0.15)",e.shadowBlur=4,e.shadowOffsetX=0,e.shadowOffsetY=2,e.beginPath(),e.arc(a,s,this.handleRadius,0,2*Math.PI),e.fillStyle=this.handleColor,e.fill(),e.shadowColor="transparent",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0,e.strokeStyle=this.handleBorderColor,e.lineWidth=this.handleBorderWidth,e.stroke(),e.restore()}},{key:"normalizeValue",value:function(e,t,i){if(isNaN(e)||null===e||void 0===e)return 0;var r=i-t;if(r<=0)return 0;var n=(e-t)/r;return Math.max(0,Math.min(1,n))}},{key:"getProgressColor",value:function(e,t){if(e.color)return e.color;if(e.colorThresholds&&e.colorThresholds.length>0){var i,r=100*t,n=fe(e.colorThresholds).sort(function(e,t){return e.value-t.value}),o=pt(n);try{for(o.s();!(i=o.n()).done;){var a=i.value;if(r<=a.value)return a.color}}catch(s){o.e(s)}finally{o.f()}return n[n.length-1].color}return this.defaultColor}},{key:"drawPercentageText",value:function(e,t,i,r,n,o,a,s,l,h,d,u){var c=t.textPosition,f=void 0===c?"right":c,v="".concat(d,"%"),g=10;switch(e.save(),e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',f){case"right":e.fillStyle="#666",e.textAlign="left",e.textBaseline="middle",e.fillText(v,a+l+8,r+o/2);break;case"inside":var y=l*(d/100),p=e.measureText(v).width;y>p+10?(e.fillStyle="#fff",e.textAlign="right",e.textBaseline="middle",e.fillText(v,a+y-6,r+o/2)):(e.fillStyle="#666",e.textAlign="left",e.textBaseline="middle",e.fillText(v,a+y+4,r+o/2));break;case"outside":e.fillStyle="#666",e.textAlign="right",e.textBaseline="middle",e.fillText(v,i+n-g,r+o/2);break}e.restore()}},{key:"drawRoundedRect",value:function(e,t,i,r,n,o,a){if(!(r<=0)){var s=Math.min(o,n/2,r/2);e.save(),e.beginPath(),e.moveTo(t+s,i),e.lineTo(t+r-s,i),e.quadraticCurveTo(t+r,i,t+r,i+s),e.lineTo(t+r,i+n-s),e.quadraticCurveTo(t+r,i+n,t+r-s,i+n),e.lineTo(t+s,i+n),e.quadraticCurveTo(t,i+n,t,i+n-s),e.lineTo(t,i+s),e.quadraticCurveTo(t,i,t+s,i),e.closePath(),e.fillStyle=a,e.fill(),e.restore()}}}])}(),Tn=In,An=function(){function e(){wt(this,e),B(this,"type","datetime")}return mt(e,[{key:"draw",value:function(e,t){var i=e.painter,r=e.ctx,n=e.bounds,o=n.x,a=n.y,s=n.width,l=n.height,h=t.displayType,d=void 0===h?"date":h,u=t.showIcon,c=void 0===u||u,f=t.placeholder,v=void 0===f?"-":f,g=this.formatDate(t);if(g){var y=10,p=14,w=6,x=o+y;c&&(this.drawIcon(r,d,o+y,a+(l-p)/2,p),x+=p+w),r.save(),r.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',r.fillStyle="#333",r.textAlign="left",r.textBaseline="middle",r.fillText(g,x,a+l/2),r.restore()}else i.drawCellText(v,o,a,s,l,10,{color:"#bbb",align:"left",baseLine:"middle"})}},{key:"formatDate",value:function(e){var t,i=e.value,r=e.format,n=e.displayType,o=void 0===n?"date":n;if(null===i||void 0===i||""===i)return null;if(i instanceof Date)t=i;else if("number"===typeof i)t=new Date(i);else{if("string"!==typeof i)return null;t=new Date(i)}if(isNaN(t.getTime()))return null;if(r)return this.applyFormat(t,r);switch(o){case"date":return this.applyFormat(t,"YYYY-MM-DD");case"time":return this.applyFormat(t,"HH:mm:ss");case"datetime":return this.applyFormat(t,"YYYY-MM-DD HH:mm");case"month":return this.applyFormat(t,"YYYY-MM");default:return this.applyFormat(t,"YYYY-MM-DD")}}},{key:"applyFormat",value:function(e,t){var i=e.getFullYear(),r=e.getMonth()+1,n=e.getDate(),o=e.getHours(),a=e.getMinutes(),s=e.getSeconds();return t.replace("YYYY",String(i)).replace("MM",this.padZero(r)).replace("DD",this.padZero(n)).replace("HH",this.padZero(o)).replace("mm",this.padZero(a)).replace("ss",this.padZero(s))}},{key:"padZero",value:function(e){return e<10?"0".concat(e):String(e)}},{key:"drawIcon",value:function(e,t,i,r,n){if(e.save(),e.strokeStyle="#999",e.lineWidth=1.5,"time"===t){var o=i+n/2,a=r+n/2,s=n/2-2;e.beginPath(),e.arc(o,a,s,0,2*Math.PI),e.stroke(),e.beginPath(),e.moveTo(o,a),e.lineTo(o,a-.5*s),e.stroke(),e.beginPath(),e.moveTo(o,a),e.lineTo(o+.6*s,a),e.stroke()}else{var l=2,h=i+l,d=r+l,u=n-2*l,c=n-2*l;e.beginPath(),e.roundRect(h,d+2,u,c-2,2),e.stroke(),e.beginPath(),e.moveTo(h,d+5),e.lineTo(h+u,d+5),e.stroke(),e.beginPath(),e.moveTo(h+3,d),e.lineTo(h+3,d+4),e.moveTo(h+u-3,d),e.lineTo(h+u-3,d+4),e.stroke()}e.restore()}}])}(),Rn=An,Dn=function(){function e(){wt(this,e),B(this,"type","boolean")}return mt(e,[{key:"onClick",value:function(e,t,i,r){var n=t.displayStyle,o=void 0===n?"checkbox":n,a=e.bounds,s=a.width,l=a.height;if("checkbox"===o){var h=16,d=(s-h)/2,u=(l-h)/2;return i>=d&&i<=d+h&&r>=u&&r<=u+h}if("switch"===o){var c=36,f=18,v=(s-c)/2,g=(l-f)/2;return i>=v&&i<=v+c&&r>=g&&r<=g+f}return!1}},{key:"getInteractiveCursor",value:function(e,t,i,r){return e.readonly?null:this.onClick(e,t,i,r)?"pointer":null}},{key:"draw",value:function(e,t){var i=t.displayStyle,r=void 0===i?"checkbox":i;switch(r){case"checkbox":this.drawCheckbox(e,t);break;case"switch":this.drawSwitch(e,t);break;case"text":this.drawText(e,t);break;default:this.drawCheckbox(e,t)}}},{key:"drawCheckbox",value:function(e,t){var i=e.ctx,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height,l=t.value,h=t.checkedColor,d=void 0===h?"#52c41a":h,u=t.uncheckedColor,c=void 0===u?"#d9d9d9":u,f=16,v=n+(a-f)/2,g=o+(s-f)/2,y=3;i.save(),!0===l?(this.drawRoundedRect(i,v,g,f,f,y,d),i.strokeStyle="#fff",i.lineWidth=2,i.lineCap="round",i.lineJoin="round",i.beginPath(),i.moveTo(v+4,g+f/2),i.lineTo(v+7,g+f-4),i.lineTo(v+f-4,g+4),i.stroke()):!1===l?(i.strokeStyle=c,i.lineWidth=2,this.drawRoundedRectStroke(i,v,g,f,f,y)):(this.drawRoundedRect(i,v,g,f,f,y,"#d9d9d9"),i.strokeStyle="#fff",i.lineWidth=2,i.lineCap="round",i.beginPath(),i.moveTo(v+4,g+f/2),i.lineTo(v+f-4,g+f/2),i.stroke()),i.restore()}},{key:"drawSwitch",value:function(e,t){var i=e.ctx,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height,l=t.value,h=t.checkedColor,d=void 0===h?"#1890ff":h,u=t.uncheckedColor,c=void 0===u?"#d9d9d9":u,f=36,v=18,g=n+(a-f)/2,y=o+(s-v)/2,p=v/2;i.save();var w=!0===l,x=w?d:c;this.drawRoundedRect(i,g,y,f,v,p,x);var m=(v-4)/2,b=w?g+f-m-2-m:g+2;i.beginPath(),i.arc(b+m,y+v/2,m,0,2*Math.PI),i.fillStyle="#fff",i.fill(),i.shadowColor="rgba(0, 0, 0, 0.2)",i.shadowBlur=2,i.shadowOffsetX=0,i.shadowOffsetY=1,i.restore()}},{key:"drawText",value:function(e,t){var i,r,n=e.painter,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=t.value,u=t.trueText,c=void 0===u?"Yes":u,f=t.falseText,v=void 0===f?"No":f,g=t.nullText,y=void 0===g?"N/A":g;!0===d?(i=c,r="#52c41a"):!1===d?(i=v,r="#ff4d4f"):(i=y,r="#999"),n.drawCellText(i,a,s,l,h,10,{color:r,align:"center",baseLine:"middle"})}},{key:"drawRoundedRect",value:function(e,t,i,r,n,o,a){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.fillStyle=a,e.fill()}},{key:"drawRoundedRectStroke",value:function(e,t,i,r,n,o){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.stroke()}}])}(),En=Dn,Pn=function(){function e(){wt(this,e),B(this,"type","status")}return mt(e,[{key:"draw",value:function(e,t){var i=t.value,r=t.options,n=void 0===r?[]:r,o=t.showIcon,a=void 0===o||o,s=t.asTag,l=void 0===s||s,h=this.findStatusOption(i,n);h?l?this.drawStatusTag(e,h,a):this.drawStatusText(e,h,a):this.drawPlainText(e,String(i))}},{key:"findStatusOption",value:function(e,t){return t&&0!==t.length&&t.find(function(t){return t.value===e})||null}},{key:"drawStatusTag",value:function(e,t,i){var r=e.ctx,n=e.bounds,o=n.x,a=n.y,s=n.width,l=n.height,h=10,d=12,u=6,c=8,f=22,v=4;r.save(),r.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var g=r.measureText(t.label).width,y=i?d+u:0,p=Math.min(g+y+2*c,s-2*h),w=o+h,x=a+(l-f)/2,m=t.backgroundColor||this.getTypeBackgroundColor(t.type);this.drawRoundedRect(r,w,x,p,f,v,m);var b=w+c;if(i&&t.icon){var k=x+(f-d)/2;this.drawIcon(r,t.icon,b,k,d,t.color||this.getTypeColor(t.type)),b+=d+u}r.fillStyle=t.color||this.getTypeColor(t.type),r.textAlign="left",r.textBaseline="middle";var C=p-2*c-y,S=this.truncateText(r,t.label,C);r.fillText(S,b,x+f/2),r.restore()}},{key:"drawStatusText",value:function(e,t,i){var r=e.ctx,n=e.bounds,o=n.x,a=n.y,s=n.height,l=10,h=12,d=6;r.save(),r.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var u=o+l;if(i&&t.icon){var c=a+(s-h)/2;this.drawIcon(r,t.icon,u,c,h,t.color||this.getTypeColor(t.type)),u+=h+d}r.fillStyle=t.color||this.getTypeColor(t.type),r.textAlign="left",r.textBaseline="middle",r.fillText(t.label,u,a+s/2),r.restore()}},{key:"drawPlainText",value:function(e,t){var i=e.painter,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height;i.drawCellText(t,n,o,a,s,10,{color:"#666",align:"left",baseLine:"middle"})}},{key:"drawIcon",value:function(e,t,i,r,n,o){e.save(),e.fillStyle=o,e.strokeStyle=o,e.lineWidth=1.5;var a=i+n/2,s=r+n/2,l=n/2-2;switch(t){case"dot":e.beginPath(),e.arc(a,s,.6*l,0,2*Math.PI),e.fill();break;case"check":e.beginPath(),e.moveTo(i+2,s),e.lineTo(i+.4*n,r+n-3),e.lineTo(i+n-2,r+3),e.stroke();break;case"cross":e.beginPath(),e.moveTo(i+3,r+3),e.lineTo(i+n-3,r+n-3),e.moveTo(i+n-3,r+3),e.lineTo(i+3,r+n-3),e.stroke();break;case"warning":e.beginPath(),e.moveTo(a,r+2),e.lineTo(i+n-2,r+n-2),e.lineTo(i+2,r+n-2),e.closePath(),e.stroke(),e.fillRect(a-1,r+.35*n,2,.3*n),e.fillRect(a-1,r+.7*n,2,2);break;case"info":e.beginPath(),e.arc(a,s,l,0,2*Math.PI),e.stroke(),e.fillRect(a-1,s-1,2,.3*n),e.fillRect(a-1,r+3,2,2);break;default:e.beginPath(),e.arc(a,s,.5*l,0,2*Math.PI),e.fill()}e.restore()}},{key:"getTypeBackgroundColor",value:function(e){switch(e){case"success":return"#f6ffed";case"warning":return"#fffbe6";case"error":return"#fff2f0";case"info":return"#e6f7ff";default:return"#f0f0f0"}}},{key:"getTypeColor",value:function(e){switch(e){case"success":return"#52c41a";case"warning":return"#faad14";case"error":return"#ff4d4f";case"info":return"#1890ff";default:return"#666"}}},{key:"drawRoundedRect",value:function(e,t,i,r,n,o,a){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.fillStyle=a,e.fill()}},{key:"truncateText",value:function(e,t,i){if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),On=Pn,Mn=function(){function e(){wt(this,e),B(this,"type","group-header"),B(this,"imageManager",void 0),B(this,"avatarColors",["#1890ff","#52c41a","#722ed1","#eb2f96","#fa8c16","#13c2c2","#2f54eb","#f5222d"]),this.imageManager=ni.getInstance()}return mt(e,[{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=r.x,o=r.y,a=r.height,s=t.level,l=void 0===s?0:s,h=t.expanded,d=void 0!==h&&h,u=t.groupType,c=void 0===u?"text":u,f=20*l,v=10,g=e.grid.originFixedWidth,y=n-g+v+f;switch(y=this.drawExpandIcon(i,y,o,a,d),c){case"person":y=this.drawPersonGroup(e,t,y,o,a);break;case"status":y=this.drawStatusGroup(e,t,y,o,a);break;case"date":y=this.drawDateGroup(e,t,y,o,a);break;case"text":default:y=this.drawTextGroup(e,t,y,o,a)}this.drawCountBadge(i,t,y,o,a)}},{key:"drawExpandIcon",value:function(e,t,i,r,n){var o=16,a=i+(r-o)/2;e.save(),e.strokeStyle="#666",e.lineWidth=1.5,e.lineCap="round",e.lineJoin="round";var s=t+o/2,l=a+o/2,h=4;return e.beginPath(),n?(e.moveTo(s-h,l-h/2),e.lineTo(s,l+h/2),e.lineTo(s+h,l-h/2)):(e.moveTo(s-h/2,l-h),e.lineTo(s+h/2,l),e.lineTo(s-h/2,l+h)),e.stroke(),e.restore(),t+o+8}},{key:"drawTextGroup",value:function(e,t,i,r,n){var o=e.ctx,a=t.label;t.icon;o.save(),o.font='bold 13px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',o.fillStyle="#333",o.textAlign="left",o.textBaseline="middle",o.fillText(a,i,r+n/2);var s=o.measureText(a).width;return o.restore(),i+s+8}},{key:"drawPersonGroup",value:function(e,t,i,r,n){var o=e.ctx,a=e.requestRedraw,s=t.label,l=t.person,h=20,d=r+(n-h)/2,u=i;l&&(this.drawAvatar(o,l,u,d,h,a),u+=h+6),o.save(),o.font='bold 13px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',o.fillStyle="#333",o.textAlign="left",o.textBaseline="middle",o.fillText(s,u,r+n/2);var c=o.measureText(s).width;return o.restore(),u+c+8}},{key:"drawAvatar",value:function(e,t,i,r,n,o){var a=n/2,s=r+a,l=null;if(t.avatar&&(l=this.imageManager.getCachedImage(t.avatar),l||this.imageManager.loadingImages.has(t.avatar)||this.imageManager.loadImage(t.avatar).then(function(){return o()}).catch(function(){return o()})),e.save(),e.beginPath(),e.arc(i+a,s,a,0,2*Math.PI),e.closePath(),e.clip(),l)e.drawImage(l,i,r,n,n);else{var h=this.getColorIndex(t);e.fillStyle=this.avatarColors[h],e.fillRect(i,r,n,n);var d=this.getInitial(t.name);e.fillStyle="#fff",e.font="bold ".concat(.5*n,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),e.textAlign="center",e.textBaseline="middle",e.fillText(d,i+a,s)}e.restore()}},{key:"getColorIndex",value:function(e){for(var t=String(e.id||e.name),i=0,r=0;r<t.length;r++)i=t.charCodeAt(r)+((i<<5)-i);return Math.abs(i)%this.avatarColors.length}},{key:"getInitial",value:function(e){if(!e)return"?";if(/[\u4e00-\u9fa5]/.test(e[0]))return e[0];var t=e.trim().split(/\s+/);return t.length>1?(t[0][0]+t[t.length-1][0]).toUpperCase():e[0].toUpperCase()}},{key:"drawStatusGroup",value:function(e,t,i,r,n){var o=e.ctx,a=t.label,s=t.icon,l=12,h=i;if(s){var d=r+(n-l)/2;this.drawStatusIcon(o,s,h,d,l),h+=l+6}o.save(),o.font='bold 13px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',o.fillStyle="#333",o.textAlign="left",o.textBaseline="middle",o.fillText(a,h,r+n/2);var u=o.measureText(a).width;return o.restore(),h+u+8}},{key:"drawStatusIcon",value:function(e,t,i,r,n){e.save(),e.fillStyle="#666",e.strokeStyle="#666",e.lineWidth=1.5;var o=i+n/2,a=r+n/2;switch(t){case"dot":e.beginPath(),e.arc(o,a,.3*n,0,2*Math.PI),e.fill();break;case"check":e.beginPath(),e.moveTo(i+2,a),e.lineTo(i+.4*n,r+n-2),e.lineTo(i+n-2,r+2),e.stroke();break;default:e.beginPath(),e.arc(o,a,.3*n,0,2*Math.PI),e.fill()}e.restore()}},{key:"drawDateGroup",value:function(e,t,i,r,n){var o=e.ctx,a=t.label,s=14,l=i,h=r+(n-s)/2;this.drawCalendarIcon(o,l,h,s),l+=s+6,o.save(),o.font='bold 13px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',o.fillStyle="#333",o.textAlign="left",o.textBaseline="middle",o.fillText(a,l,r+n/2);var d=o.measureText(a).width;return o.restore(),l+d+8}},{key:"drawCalendarIcon",value:function(e,t,i,r){e.save(),e.strokeStyle="#666",e.lineWidth=1.5;var n=2,o=t+n,a=i+n,s=r-2*n,l=r-2*n;e.beginPath(),e.roundRect(o,a+2,s,l-2,2),e.stroke(),e.beginPath(),e.moveTo(o,a+5),e.lineTo(o+s,a+5),e.stroke(),e.restore()}},{key:"drawCountBadge",value:function(e,t,i,r,n){var o=t.count;if(void 0!==o&&null!==o){var a="(".concat(o,")");e.save(),e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.fillStyle="#999",e.textAlign="left",e.textBaseline="middle",e.fillText(a,i,r+n/2),e.restore()}}},{key:"onClick",value:function(e,t,i,r){var n=t.level,o=void 0===n?0:n,a=20*o,s=10,l=16,h=e.grid.originFixedWidth;return i>=-h+s+a&&i<=-h+s+a+l}}])}(),Bn=Mn,Hn=function(){function e(){wt(this,e),B(this,"type","separator-row")}return mt(e,[{key:"draw",value:function(e,t){var i,r=e.ctx,n=e.bounds,o=n.x,a=n.y,s=n.width,l=n.height,h=t.separateLevel,d=void 0===h?0:h;switch(d){case 0:i=Si.level0BgColor;break;case 1:i=Si.level1BgColor;break;case 2:default:i=Si.level2BgColor;break}r.save(),r.fillStyle=i,r.fillRect(o,a,s,l),r.restore()}},{key:"onClick",value:function(e,t,i,r){return!1}},{key:"getPreferredHeight",value:function(e,t){return t.rowHeight||12}}])}(),Fn=Hn,Ln=function(){function e(){wt(this,e),B(this,"type","nested"),B(this,"gridCache",new Map)}return mt(e,[{key:"draw",value:function(e,t){var i=e.bounds,r=e.rowIndex,n=e.colIndex,o=i.x,a=i.y,s=t.value,l=t.columns,h=t.expanded;if(s&&0!==s.length){var d="".concat(r,"-").concat(n),u=this.gridCache.get(d);u?(u.updatePosition(o+5,a+5),u.data=s,u.columns=this.convertColumns(l),void 0!==h&&(u.expanded=h)):(u=this.createNestedGrid(e,t),this.gridCache.set(d,u)),u.draw()}else this.drawEmptyState(e)}},{key:"createNestedGrid",value:function(e,t){var i=e.bounds,r=e.grid,n=e.rowIndex,o=e.colIndex,a=i.x,s=i.y,l=i.width,h=i.height,d=t.value,u=t.columns,c=t.displayRows,f=t.expanded,v=this.convertColumns(u),g=v.reduce(function(e,t){return e+(t.width||80)},0),y={rowIndex:n,key:"nested_".concat(o),rowData:{_nestedExpanded:f?B({},"nested_".concat(o),!0):{}}},p=new ai({columns:v,data:d||[],x:a+5,y:s+5,width:Math.min(g,l-10),height:h-10,parentGrid:r,parentCell:y,displayRows:c});return f&&(p.expanded=!0),p}},{key:"convertColumns",value:function(e){return e.map(function(e){return F({title:e.title,key:e.key,width:e.width||80,align:e.align||"left",type:e.type||"text"},e)})}},{key:"drawEmptyState",value:function(e){var t=e.ctx,i=e.bounds,r=i.x,n=i.y,o=i.width,a=i.height;t.save(),t.fillStyle="#fafafa",t.fillRect(r+5,n+5,o-10,a-10),t.strokeStyle="#e8e8e8",t.strokeRect(r+5,n+5,o-10,a-10),t.fillStyle="#999",t.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',t.textAlign="center",t.textBaseline="middle",t.fillText("No nested data",r+o/2,n+a/2),t.restore()}},{key:"onClick",value:function(e,t,i,r){var n=e.rowIndex,o=e.colIndex,a="".concat(n,"-").concat(o),s=this.gridCache.get(a);if(s){var l=i-5,h=r-5,d=s.handleClick(l,h);return null!==d}return!1}},{key:"getPreferredHeight",value:function(e,t){var i=e.rowIndex,r=e.colIndex,n="".concat(i,"-").concat(r),o=this.gridCache.get(n);if(o)return o.getRequiredHeight();var a=t.value,s=t.displayRows;if(!a||0===a.length)return 50;var l=e.grid.rowHeight||28,h=s&&!t.expanded?Math.min(s,a.length):a.length,d=s&&a.length>s&&!t.expanded,u=d?30:0;return h*l+u+10}},{key:"getNestedGrid",value:function(e,t){return this.gridCache.get("".concat(e,"-").concat(t))}},{key:"clearCache",value:function(e,t){void 0!==e&&void 0!==t?this.gridCache.delete("".concat(e,"-").concat(t)):this.gridCache.clear()}}])}(),Wn=Ln,zn=function(){function e(){wt(this,e),B(this,"type","tree-dropdown")}return mt(e,[{key:"draw",value:function(e,t){var i=this.getPathLabels(t);0!==i.length?this.drawPathTags(e,t,i):this.drawEmptyState(e,t)}},{key:"getPathLabels",value:function(e){var t=this,i=e.value,r=e.pathSeparator,n=void 0===r?"/":r,o=e.showFullPath,a=void 0===o||o;return null===i||void 0===i||""===i?[]:Array.isArray(i)?0===i.length?[]:i.map(function(e){if("string"===typeof e)return a?e:t.getLastSegment(e,n);if(e&&"object"===P(e)){var i,r=e.path||e.label||String(null!==(i=e.value)&&void 0!==i?i:"");return a?r:t.getLastSegment(r,n)}return String(e)}):"string"===typeof i?[a?i:this.getLastSegment(i,n)]:[String(i)]}},{key:"getLastSegment",value:function(e,t){var i=e.split(t);return i[i.length-1]||e}},{key:"drawEmptyState",value:function(e,t){var i=e.painter,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height,l=t.placeholder||"-";i.drawCellText(l,n,o,a,s,10,{color:"#bbb",align:"left",baseLine:"middle"})}},{key:"drawPathTags",value:function(e,t,i){var r=this,n=e.ctx,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=10,u=8,c=24,f=s+(h-c)/2,v=l-2*d;n.save(),n.font='13px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var g,y,p=i.length,w=i.map(function(e){return r.calculateTagWidth(n,e)}),x=w.reduce(function(e,t){return e+t},0)+u*(p-1),m=n.measureText("中").width,b=n.measureText("...").width,k=8,C=m+b+2*k;if(x<=v)g=fe(w),y=p;else{var S=u*(p-1),I=v-S,T=w.reduce(function(e,t){return e+t},0),A=I/T,R=w.every(function(e){return e*A>=C});if(R)g=w.map(function(e){return e*A}),y=p;else{y=p,g=w.map(function(e){return e*A});var D,E=function(){y--;var e=w.slice(0,y),t=u*(y-1),i=v-t,r=e.reduce(function(e,t){return e+t},0);if(r<=i)return g=fe(e),0;var n=i/r,o=e.every(function(e){return e*n>=C});return o?(g=e.map(function(e){return e*n}),0):void 0};while(y>1)if(D=E(),0===D)break;1===y&&(g=[Math.min(v,w[0])])}}for(var P=a+d,O=0;O<y;O++)this.drawPathTag(e,t,i[O],P,f,g[O],c),P+=g[O]+u;n.restore()}},{key:"calculateTagWidth",value:function(e,t){var i=e.measureText(t).width;return Math.min(i+16,160)}},{key:"drawPathTag",value:function(e,t,i,r,n,o,a){var s=e.ctx,l=t.tagBackgroundColor||"#F5F5F5",h=t.tagBorderColor||"#D9D9D9",d=t.tagColor||"#333",u=4,c=8;s.save(),s.font='13px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var f=s.measureText(i).width,v=Math.min(f+2*c,o);this.drawRoundedRect(s,r,n,v,a,u,l),this.drawRoundedRectBorder(s,r,n,v,a,u,h),s.fillStyle=d,s.textAlign="center",s.textBaseline="middle";var g=this.truncateText(s,i,v-2*c);s.fillText(g,r+v/2,n+a/2),s.restore()}},{key:"drawRoundedRect",value:function(e,t,i,r,n,o,a){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.fillStyle=a,e.fill()}},{key:"drawRoundedRectBorder",value:function(e,t,i,r,n,o,a){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.strokeStyle=a,e.lineWidth=1,e.stroke()}},{key:"truncateText",value:function(e,t,i){if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>1&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),Nn=zn;i(8156);(function(e){e["APPROVED"]="approved",e["REFUSED"]="refused"})(gn||(gn={})),function(e){e["DEFAULT"]="rgba(255, 255, 255, 0.1)",e["PREVIOUS"]="rgba(255, 255, 255, 0.32)",e["TODAY_PROCESSING"]="#3f9eff",e["TODAY_APPROVED"]="#23d0a1",e["TODAY_REJECTED"]="#f86322"}(yn||(yn={}));var Vn=12,_n=4,jn=4,Yn=4,Gn=10,Xn=40,Un=6,qn=14,Kn=8;function Jn(e){if(!e)return"-";var t=new Date(e),i=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0"),n=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0");return"".concat(i,"-").concat(r," ").concat(n,":").concat(o)}function Qn(e){if(!e)return"-";var t=new Date(e),i=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=String(t.getHours()).padStart(2,"0"),a=String(t.getMinutes()).padStart(2,"0");return"".concat(i,"-").concat(r,"-").concat(n," ").concat(o,":").concat(a)}function Zn(e){var t=new Date(e),i=new Date;return t.getFullYear()===i.getFullYear()&&t.getMonth()===i.getMonth()&&t.getDate()===i.getDate()}var $n=function(){function e(){wt(this,e),B(this,"type","punch")}return mt(e,[{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height,l=t.value||{},h=t.canEdit,d=void 0!==h&&h,u=t.showLineThrow,c=void 0!==u&&u,f=t.error,v=l.created_date||0,g=l.progress||0,y=l.review_status||"",p=!!(l.punch_id&&l.punch_id>0),w=void 0===l.is_read||l.is_read;i.save();var x=d?Xn:0,m=a-x;if(p){var b=n+Gn+Vn,k=o+s/2,C=this.getRingColor(v,y);this.drawPercentRing(i,b,k,Vn,_n,g,C),Zn(v)&&this.drawReviewIcon(i,b,k,y,C);var S="".concat(Math.round(100*Math.min(g,1)),"%");i.font='bold 10px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',i.fillStyle=C,i.textAlign="left",i.textBaseline="middle";var I=n+Gn+2*Vn+jn,T=i.measureText(S).width;i.fillText(S,I,o+s/2);var A=I+T+Yn,R=n+m-A-4;this.drawDateText(i,t,v,A,o,R,s,p)}else this.drawDateText(i,t,v,n+Gn,o,m-2*Gn,s,p);d&&this.drawAfterIcons(i,n+a-Xn,o,Xn,s,e.isHoverCell),c&&this.drawStrikethrough(i,n,o,m,s),f&&this.drawErrorIcon(i,n+a-(d?Xn+16:16),o+4),p&&!w&&this.drawHintDot(i,n+a-x-4,o+4),i.restore()}},{key:"onClick",value:function(e,t,i,r){var n=e.bounds,o=n.width,a=n.height,s=t.canEdit,l=void 0!==s&&s,h=t.value||{},d=!!(h.punch_id&&h.punch_id>0);if(l){var u=o-Xn;if(i>=u&&i<=o){var c=a/2,f=u+6,v=f+qn+Kn;if(i>=f&&i<=f+qn&&r>=c-qn/2&&r<=c+qn/2)return!0;if(i>=v&&i<=v+qn&&r>=c-qn/2&&r<=c+qn/2)return!0}}if(d){var g=l?Xn:0,y=o-g;if(i>=0&&i<=y)return!0}return!1}},{key:"getInteractiveCursor",value:function(e,t,i,r){if(e.readonly)return null;var n=e.bounds,o=n.width,a=n.height,s=t.canEdit,l=void 0!==s&&s,h=t.value||{},d=!!(h.punch_id&&h.punch_id>0);if(l){var u=o-Xn;if(i>=u&&i<=o&&r>=a/2-qn/2&&r<=a/2+qn/2)return"pointer"}if(d){var c=l?Xn:0;if(i>=0&&i<=o-c)return"pointer"}return null}},{key:"getRingColor",value:function(e,t){return Zn(e)?t===gn.APPROVED?yn.TODAY_APPROVED:t===gn.REFUSED?yn.TODAY_REJECTED:yn.TODAY_PROCESSING:yn.PREVIOUS}},{key:"drawPercentRing",value:function(e,t,i,r,n,o,a){var s=r-n/2;if(e.beginPath(),e.arc(t,i,s,0,2*Math.PI),e.strokeStyle=yn.DEFAULT,e.lineWidth=n,e.lineCap="round",e.stroke(),o>0){var l=-Math.PI/2,h=l+2*Math.PI*Math.min(o,1);e.beginPath(),e.arc(t,i,s,l,h),e.strokeStyle=a,e.lineWidth=n,e.lineCap="round",e.stroke()}}},{key:"drawReviewIcon",value:function(e,t,i,r,n){r===gn.APPROVED?(e.strokeStyle=n,e.lineWidth=1.5,e.lineCap="round",e.lineJoin="round",e.beginPath(),e.moveTo(t-4,i),e.lineTo(t-1,i+3),e.lineTo(t+4,i-3),e.stroke()):r===gn.REFUSED&&(e.strokeStyle=n,e.lineWidth=1.5,e.lineCap="round",e.beginPath(),e.moveTo(t-3,i-3),e.lineTo(t+3,i+3),e.moveTo(t+3,i-3),e.lineTo(t-3,i+3),e.stroke())}},{key:"drawDateText",value:function(e,t,i,r,n,o,a,s){if(e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textBaseline="middle",e.textAlign="left",s){var h;h="punch_record"===t.key&&t.datePattern===l.ABSOLUTE?Qn(i):Jn(i),e.fillStyle="#121315";var d=this.truncateText(e,h,o);e.fillText(d,r,n+a/2)}else e.fillStyle="#121315",e.fillText("-",r,n+a/2)}},{key:"drawHintDot",value:function(e,t,i){e.beginPath(),e.arc(t,i+Un/2,Un/2,0,2*Math.PI),e.fillStyle=yn.TODAY_APPROVED,e.fill()}},{key:"drawAfterIcons",value:function(e,t,i,r,n,o){if(o){var a=i+n/2,s=t+6,l=s+qn+Kn;this.drawListIcon(e,s,a-qn/2,qn,"#8c8c8c"),this.drawEditIcon(e,l,a-qn/2,qn,"#8c8c8c")}}},{key:"drawListIcon",value:function(e,t,i,r,n){e.save(),e.strokeStyle=n,e.lineWidth=1.5,e.lineCap="round";for(var o=t+2,a=t+r-2,s=(r-4)/2,l=0;l<3;l++){var h=i+3+s*l;e.beginPath(),e.moveTo(o,h),e.lineTo(a,h),e.stroke()}e.restore()}},{key:"drawEditIcon",value:function(e,t,i,r,n){e.save(),e.strokeStyle=n,e.fillStyle=n,e.lineWidth=1.2,e.lineCap="round",e.lineJoin="round";var o=2,a=t+o,s=i+r-o,l=t+r-o,h=i+o;e.beginPath(),e.moveTo(a+2,s-2),e.lineTo(l-1,h+1),e.stroke(),e.beginPath(),e.moveTo(a,s),e.lineTo(a+3,s-1),e.lineTo(a+1,s-3),e.closePath(),e.fill(),e.restore()}},{key:"drawStrikethrough",value:function(e,t,i,r,n){e.save(),e.strokeStyle="#999",e.lineWidth=1,e.beginPath(),e.moveTo(t+4,i+n/2),e.lineTo(t+r-4,i+n/2),e.stroke(),e.restore()}},{key:"drawErrorIcon",value:function(e,t,i){var r=12,n=t+r/2;e.save(),e.fillStyle="#ff4d4f",e.beginPath(),e.moveTo(n,i),e.lineTo(t+r,i+r),e.lineTo(t,i+r),e.closePath(),e.fill(),e.fillStyle="#fff",e.font='bold 8px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textAlign="center",e.textBaseline="middle",e.fillText("!",n,i+.65*r),e.restore()}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),eo=$n,to=10,io=10,ro=30,no=20,oo=14,ao=12,so="#3f9eff",lo="#1a7ee6",ho="#bbb",uo="#3f9eff",co=function(){function e(){wt(this,e),B(this,"type","hyperlink")}return mt(e,[{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height,l=t.canEdit,h=void 0!==l&&l,d=t.showLineThrow,u=void 0!==d&&d,c=t.error,f=t.isLink,v=void 0!==f&&f,g=this.parseValue(t.value);i.save();var y=h?ro:0,p=v?no:0,w=a-y-p;if(v&&this.drawLinkIcon(i,n+w,o,no,s),this.drawHyperLinkText(i,g,n,o,w,s,e.isHoverCell),h&&this.drawEditButton(i,n+a-ro,o,ro,s,e.isHoverCell),u&&this.drawStrikethrough(i,n,o,w,s),c){var x=n+a-(h?ro+ao+4:ao+4);this.drawErrorIcon(i,x,o+4)}i.restore()}},{key:"onClick",value:function(e,t,i,r){var n=e.bounds.width,o=t.canEdit,a=void 0!==o&&o,s=t.isLink,l=void 0!==s&&s,h=this.parseValue(t.value);if(a){var d=n-ro;if(i>=d&&i<=n)return!0}if(l){var u=a?ro:0,c=no,f=n-u-c;if(i>=f&&i<=f+c)return!0}if(h.available){var v=e.ctx,g=e.bounds.height,y=a?ro:0,p=l?no:0,w=n-y-p,x=w-to-io;v.save(),v.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var m=this.truncateText(v,h.text,x),b=v.measureText(m).width;v.restore();var k=to,C=k+b,S=g/2,I=8;if(i>=k&&i<=C&&r>=S-I&&r<=S+I)return h.href&&window.open(h.href,"_blank"),!0}return!1}},{key:"getInteractiveCursor",value:function(e,t,i,r){if(e.readonly)return null;var n=e.bounds.width,o=t.canEdit,a=void 0!==o&&o,s=t.isLink,l=void 0!==s&&s,h=this.parseValue(t.value);if(a){var d=n-ro;if(i>=d&&i<=n)return"pointer"}if(l){var u=a?ro:0,c=no,f=n-u-c;if(i>=f&&i<=f+c)return"pointer"}if(h.available){var v=e.ctx,g=e.bounds.height,y=a?ro:0,p=l?no:0,w=n-y-p,x=w-to-io;v.save(),v.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var m=this.truncateText(v,h.text,x),b=v.measureText(m).width;v.restore();var k=to,C=k+b,S=g/2,I=8;if(i>=k&&i<=C&&r>=S-I&&r<=S+I)return"pointer"}return null}},{key:"parseValue",value:function(e){return Array.isArray(e)&&e.length>0?{text:e[0],href:e[1],available:!0}:{text:A,href:"",available:!1}}},{key:"drawHyperLinkText",value:function(e,t,i,r,n,o,a){e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textBaseline="middle",e.textAlign="left";var s=i+to,l=r+o/2,h=n-to-io;if(t.available){e.fillStyle=a?lo:so;var d=this.truncateText(e,t.text,h);e.fillText(d,s,l);var u=e.measureText(d).width;e.strokeStyle=a?lo:uo,e.lineWidth=1,e.beginPath(),e.moveTo(s,l+7),e.lineTo(s+u,l+7),e.stroke()}else e.fillStyle=ho,e.fillText(A,s,l)}},{key:"drawEditButton",value:function(e,t,i,r,n,o){if(o){var a=t+r/2,s=i+n/2;this.drawEditIcon(e,a-oo/2,s-oo/2,oo,"#8c8c8c")}}},{key:"drawEditIcon",value:function(e,t,i,r,n){e.save(),e.strokeStyle=n,e.fillStyle=n,e.lineWidth=1.2,e.lineCap="round",e.lineJoin="round";var o=2,a=t+o,s=i+r-o,l=t+r-o,h=i+o;e.beginPath(),e.moveTo(a+2,s-2),e.lineTo(l-1,h+1),e.stroke(),e.beginPath(),e.moveTo(a,s),e.lineTo(a+3,s-1),e.lineTo(a+1,s-3),e.closePath(),e.fill(),e.restore()}},{key:"drawLinkIcon",value:function(e,t,i,r,n){var o=t+r/2,a=i+n/2,s=12;e.save(),e.strokeStyle="#8c8c8c",e.lineWidth=1.5,e.lineCap="round",e.lineJoin="round";var l=s/2,h=2;e.beginPath(),e.moveTo(o-h,a),e.lineTo(o-h,a-l+2),e.quadraticCurveTo(o-h,a-l,o-h+2,a-l),e.lineTo(o+h-2,a-l),e.quadraticCurveTo(o+h,a-l,o+h,a-l+2),e.lineTo(o+h,a),e.stroke(),e.beginPath(),e.moveTo(o-h,a),e.lineTo(o-h,a+l-2),e.quadraticCurveTo(o-h,a+l,o-h+2,a+l),e.lineTo(o+h-2,a+l),e.quadraticCurveTo(o+h,a+l,o+h,a+l-2),e.lineTo(o+h,a),e.stroke(),e.restore()}},{key:"drawStrikethrough",value:function(e,t,i,r,n){e.save(),e.strokeStyle="#999",e.lineWidth=1,e.beginPath(),e.moveTo(t+4,i+n/2),e.lineTo(t+r-4,i+n/2),e.stroke(),e.restore()}},{key:"drawErrorIcon",value:function(e,t,i){var r=ao,n=t+r/2;e.save(),e.fillStyle="#ff4d4f",e.beginPath(),e.moveTo(n,i),e.lineTo(t+r,i+r),e.lineTo(t,i+r),e.closePath(),e.fill(),e.fillStyle="#fff",e.font='bold 8px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textAlign="center",e.textBaseline="middle",e.fillText("!",n,i+.65*r),e.restore()}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),fo=co,vo=10,go=10,yo=16,po=24,wo=4,xo=4,mo=8,bo=2,ko="#e6eaf0",Co=30,So=20,Io=14,To=12,Ao=3,Ro=80,Do="#333",Eo="#bbb",Po="#8c8c8c",Oo="#999",Mo=function(){function e(){wt(this,e),B(this,"type","file"),B(this,"imageManager",void 0),B(this,"failedImages",new Set),this.imageManager=ni.getInstance()}return mt(e,[{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=e.isHoverCell,o=r.x,a=r.y,s=r.width,l=r.height,h=t.canEdit,d=void 0!==h&&h,u=t.showLineThrow,c=void 0!==u&&u,f=t.error,v=t.isLink,g=void 0!==v&&v,y=this.parseValue(t.value);i.save();var p=this.calculateLayout(i,y,s,l,d,g);if(y.length>0?this.drawFileItems(i,e,y,p,o,a,l,t):this.drawEmptyPlaceholder(i,o,a,p.middle.width,l),g&&p.linkIcon&&this.drawLinkIcon(i,o+p.linkIcon.x,a,So,l),p.after&&n&&this.drawAfterArea(i,o+p.after.x,a,p.after.width,l,d,f),c&&this.drawStrikethrough(i,o,a,p.middle.width,l),f&&p.after){var w=o+p.after.x-To-4;this.drawErrorIcon(i,w,a+4)}i.restore()}},{key:"onClick",value:function(e,t,i,r){var n=e.ctx,o=e.bounds,a=o.width,s=o.height,l=t.canEdit,h=void 0!==l&&l,d=t.isLink,u=void 0!==d&&d,c=this.parseValue(t.value),f=this.calculateLayout(n,c,a,s,h,u);return!(!f.after||!this.isInArea(i,r,f.after))||(!!(u&&f.linkIcon&&this.isInArea(i,r,f.linkIcon))||!!this.isInArea(i,r,f.middle))}},{key:"onDblClick",value:function(e,t,i,r){var n=e.ctx,o=e.bounds,a=o.width,s=o.height,l=t.canEdit,h=void 0!==l&&l,d=t.isLink,u=void 0!==d&&d,c=this.parseValue(t.value);if(0===c.length)return!1;for(var f=this.calculateLayout(n,c,a,s,h,u),v=0;v<f.fileItems.length;v++){var g=f.fileItems[v];if(this.isInArea(i,r,g.bounds)){c[v];return!0}}return!1}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n=e.ctx,o=e.bounds,a=o.width,s=o.height,l=t.canEdit,h=void 0!==l&&l,d=t.isLink,u=void 0!==d&&d,c=this.parseValue(t.value),f=this.calculateLayout(n,c,a,s,h,u);return f.after&&this.isInArea(i,r,f.after)||u&&f.linkIcon&&this.isInArea(i,r,f.linkIcon)||c.length>0&&this.isInArea(i,r,f.middle)?"pointer":null}},{key:"parseValue",value:function(e){return e&&Array.isArray(e)?e:[]}},{key:"calculateLayout",value:function(e,t,i,r,n,o){var a=Co,s=o?So:0,l=a+s,h=i-l,d={middle:{x:0,y:0,width:h,height:r},fileItems:[],after:{x:i-a,y:0,width:a,height:r},linkIcon:o?{x:i-a-s,y:0,width:s,height:r}:null};if(t.length>0)for(var u=vo,c=h-go,f=0;f<t.length;f++){if(u>=c)break;var v=t[f],g=u;u+=mo;var y=u,p=(r-yo)/2;u+=yo;var w=null,x=v.name||"";if(x){e.save(),e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var m=Math.min(e.measureText(x).width,Ro,c-u-wo-mo);e.restore(),m>0&&(u+=wo,w={x:u,y:(r-12)/2,width:m,height:12},u+=m)}u+=mo;var b=u-g;d.fileItems.push({bounds:{x:g,y:0,width:b,height:r},thumbnail:{x:y,y:p,width:yo,height:yo},fileName:w}),u+=xo}return d}},{key:"isInArea",value:function(e,t,i){return e>=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height}},{key:"drawFileItemBackground",value:function(e,t,i,r,n){var o=po,a=i+(n-o)/2;e.save(),e.fillStyle=ko,e.beginPath(),e.moveTo(t+bo,a),e.lineTo(t+r-bo,a),e.quadraticCurveTo(t+r,a,t+r,a+bo),e.lineTo(t+r,a+o-bo),e.quadraticCurveTo(t+r,a+o,t+r-bo,a+o),e.lineTo(t+bo,a+o),e.quadraticCurveTo(t,a+o,t,a+o-bo),e.lineTo(t,a+bo),e.quadraticCurveTo(t,a,t+bo,a),e.closePath(),e.fill(),e.restore()}},{key:"drawEmptyPlaceholder",value:function(e,t,i,r,n){e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textBaseline="middle",e.textAlign="left",e.fillStyle=Eo,e.fillText(A,t+vo,i+n/2)}},{key:"drawFileItems",value:function(e,t,i,r,n,o,a,s){for(var l,h=null!==(l=s.isDisplayThumbnail)&&void 0!==l&&l,d=0;d<r.fileItems.length;d++){var u=i[d],c=r.fileItems[d];this.drawFileItemBackground(e,n+c.bounds.x,o,c.bounds.width,a);var f=n+c.thumbnail.x,v=o+c.thumbnail.y;if(this.drawThumbnail(e,t,u,f,v),!h&&c.fileName){var g=n+c.fileName.x,y=o+a/2;this.drawFileName(e,u.name||"",g,y,c.fileName.width)}}}},{key:"drawThumbnail",value:function(e,t,i,r,n){i.previewUrl?this.drawPreviewImage(e,t,i,r,n):this.drawIconByFileStatus(e,t,r,n,i.status,i.fileFormat)}},{key:"drawIconByFileStatus",value:function(e,t,i,r,n,o){var a=ct(n,o);this.drawSvgIcon(e,t,a,i,r)}},{key:"drawSvgIcon",value:function(e,t,i,r,n){var o,a=this.imageManager.getCachedImage(i);a?e.drawImage(a,r,n,yo,yo):null!==(o=this.imageManager.loadingImages)&&void 0!==o&&o.has(i)||this.imageManager.loadImage(i).then(function(){t.requestRedraw()}).catch(function(){})}},{key:"drawPreviewImage",value:function(e,t,i,r,n){var o=this,a=i.previewUrl;if(this.failedImages.has(a))this.drawIconByFileStatus(e,t,r,n,i.status,i.fileFormat);else{var s=this.imageManager.getCachedImage(a);if(s){e.save(),this.clipRoundRect(e,r,n,yo,yo,Ao);var l,h,d,u,c=s.width/s.height;c>1?(h=yo,l=yo*c,d=r-(l-yo)/2,u=n):(l=yo,h=yo/c,d=r,u=n-(h-yo)/2),e.drawImage(s,d,u,l,h),e.restore()}else{var f;null!==(f=this.imageManager.loadingImages)&&void 0!==f&&f.has(a)||this.imageManager.loadImage(a).then(function(){t.requestRedraw()}).catch(function(){o.failedImages.add(a),t.requestRedraw()}),this.drawIconByFileStatus(e,t,r,n,i.status,i.fileFormat)}}}},{key:"drawFileName",value:function(e,t,i,r,n){if(t){e.save(),e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textBaseline="middle",e.textAlign="left",e.fillStyle=Do;var o=this.truncateText(e,t,n);e.fillText(o,i,r),e.restore()}}},{key:"drawAfterArea",value:function(e,t,i,r,n,o,a){var s=t+r/2,l=i+n/2;o?a||this.drawEditIcon(e,s-Io/2,l-Io/2,Io,Po):this.drawViewIcon(e,s-Io/2,l-Io/2,Io,Po)}},{key:"drawEditIcon",value:function(e,t,i,r,n){e.save(),e.strokeStyle=n,e.fillStyle=n,e.lineWidth=1.2,e.lineCap="round",e.lineJoin="round";var o=2,a=t+o,s=i+r-o,l=t+r-o,h=i+o;e.beginPath(),e.moveTo(a+2,s-2),e.lineTo(l-1,h+1),e.stroke(),e.beginPath(),e.moveTo(a,s),e.lineTo(a+3,s-1),e.lineTo(a+1,s-3),e.closePath(),e.fill(),e.restore()}},{key:"drawViewIcon",value:function(e,t,i,r,n){e.save(),e.strokeStyle=n,e.lineWidth=1.5,e.lineCap="round";for(var o=2,a=t+o,s=t+r-o,l=(r-2*o)/3,h=0;h<3;h++){var d=i+o+l*h+l/2;e.beginPath(),e.moveTo(a,d),e.lineTo(s,d),e.stroke()}e.restore()}},{key:"drawLinkIcon",value:function(e,t,i,r,n){var o=t+r/2,a=i+n/2,s=12;e.save(),e.strokeStyle=Po,e.lineWidth=1.5,e.lineCap="round",e.lineJoin="round";var l=s/2,h=2;e.beginPath(),e.moveTo(o-h,a),e.lineTo(o-h,a-l+2),e.quadraticCurveTo(o-h,a-l,o-h+2,a-l),e.lineTo(o+h-2,a-l),e.quadraticCurveTo(o+h,a-l,o+h,a-l+2),e.lineTo(o+h,a),e.stroke(),e.beginPath(),e.moveTo(o-h,a),e.lineTo(o-h,a+l-2),e.quadraticCurveTo(o-h,a+l,o-h+2,a+l),e.lineTo(o+h-2,a+l),e.quadraticCurveTo(o+h,a+l,o+h,a+l-2),e.lineTo(o+h,a),e.stroke(),e.restore()}},{key:"drawStrikethrough",value:function(e,t,i,r,n){e.save(),e.strokeStyle=Oo,e.lineWidth=1,e.beginPath(),e.moveTo(t+4,i+n/2),e.lineTo(t+r-4,i+n/2),e.stroke(),e.restore()}},{key:"drawErrorIcon",value:function(e,t,i){var r=To,n=t+r/2;e.save(),e.fillStyle="#ff4d4f",e.beginPath(),e.moveTo(n,i),e.lineTo(t+r,i+r),e.lineTo(t,i+r),e.closePath(),e.fill(),e.fillStyle="#fff",e.font='bold 8px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textAlign="center",e.textBaseline="middle",e.fillText("!",n,i+.65*r),e.restore()}},{key:"clipRoundRect",value:function(e,t,i,r,n,o){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.clip()}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),Bo=Mo,Ho=i.p+"img/icon_folder.ea3efcce.svg",Fo=10,Lo=10,Wo=16,zo=4,No=4,Vo=8,_o=24,jo=2,Yo="#e6eaf0",Go=30,Xo=20,Uo=14,qo=12,Ko=80,Jo="#333",Qo="#bbb",Zo="#8c8c8c",$o="#999",ea="#ff4d4f",ta="#faad14",ia=Ho,ra=function(){function e(){wt(this,e),B(this,"type","task-node"),B(this,"imageManager",void 0),B(this,"failedIcons",new Set),this.imageManager=ni.getInstance()}return mt(e,[{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=e.isHoverCell,o=r.x,a=r.y,s=r.width,l=r.height,h=t.canEdit,d=void 0!==h&&h,u=t.showLineThrow,c=void 0!==u&&u,f=t.error,v=t.isLink,g=void 0!==v&&v,y=this.parseValue(t);i.save();var p=this.calculateLayout(i,y,s,l,g);if(y.length>0?this.drawTaskNodes(i,e,y,p,o,a,l):this.drawEmptyPlaceholder(i,o,a,p.middle.width,l),g&&p.linkIcon&&this.drawLinkIcon(i,o+p.linkIcon.x,a,Xo,l),p.after&&n&&!g&&this.drawAfterArea(i,o+p.after.x,a,p.after.width,l,d,f),c&&this.drawStrikethrough(i,o,a,p.middle.width,l),f&&p.after){var w=o+p.after.x-qo-4;this.drawErrorIcon(i,w,a+4,f.is_warning)}i.restore()}},{key:"onClick",value:function(e,t,i,r){var n=e.ctx,o=e.bounds,a=o.width,s=o.height,l=t.isLink,h=void 0!==l&&l,d=this.parseValue(t),u=this.calculateLayout(n,d,a,s,h);return!(!u.after||h||!this.isInArea(i,r,u.after))||(!!(h&&u.linkIcon&&this.isInArea(i,r,u.linkIcon))||!!(d.length>0&&this.isInArea(i,r,u.middle)))}},{key:"onDblClick",value:function(e,t,i,r){var n=e.ctx,o=e.bounds,a=o.width,s=o.height,l=t.isLink,h=void 0!==l&&l,d=this.parseValue(t);if(0===d.length)return!1;for(var u=this.calculateLayout(n,d,a,s,h),c=0;c<u.nodeItems.length;c++){var f=u.nodeItems[c];if(this.isInArea(i,r,f.bounds)){d[c];return!0}}return!1}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n=e.ctx,o=e.bounds,a=o.width,s=o.height,l=t.isLink,h=void 0!==l&&l,d=this.parseValue(t),u=this.calculateLayout(n,d,a,s,h);return u.after&&!h&&this.isInArea(i,r,u.after)||h&&u.linkIcon&&this.isInArea(i,r,u.linkIcon)||d.length>0&&this.isInArea(i,r,u.middle)?"pointer":null}},{key:"parseValue",value:function(e){var t=e.value,i=e.customTaskNodeInfo;if(null===t||void 0===t)return[];if(Array.isArray(t))return t;if("string"===typeof t){if(""===t)return[];var r=t.split(",").map(function(e){return parseInt(e.trim(),10)}).filter(function(e){return!isNaN(e)});return this.resolveNodesByIds(r,i)}return"number"===typeof t?this.resolveNodesByIds([t],i):[]}},{key:"resolveNodesByIds",value:function(e,t){var i,r=[],n=pt(e);try{for(n.s();!(i=n.n()).done;){var o=i.value;if(t&&t[o]){var a=t[o];r.push({id:o,name:a.name,iconFile:a.iconFile})}else r.push({id:o,name:String(o)})}}catch(s){n.e(s)}finally{n.f()}return r}},{key:"calculateLayout",value:function(e,t,i,r,n){var o=Go,a=n?Xo:0,s=o+a,l=i-s,h={middle:{x:0,y:0,width:l,height:r},nodeItems:[],after:{x:i-o,y:0,width:o,height:r},linkIcon:n?{x:i-o-a,y:0,width:a,height:r}:null};if(t.length>0)for(var d=Fo,u=l-Lo,c=0;c<t.length;c++){if(d>=u)break;var f=t[c],v=d;d+=Vo;var g=d,y=(r-Wo)/2;d+=Wo;var p=null,w=f.name||"";if(w){e.save(),e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var x=Math.min(e.measureText(w).width,Ko,u-d-zo-Vo);e.restore(),x>0&&(d+=zo,p={x:d,y:(r-12)/2,width:x,height:12},d+=x)}d+=Vo;var m=d-v;h.nodeItems.push({bounds:{x:v,y:0,width:m,height:r},icon:{x:g,y:y,width:Wo,height:Wo},name:p}),d+=No}return h}},{key:"isInArea",value:function(e,t,i){return e>=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height}},{key:"drawNodeItemBackground",value:function(e,t,i,r,n){var o=_o,a=i+(n-o)/2;e.save(),e.fillStyle=Yo,e.beginPath(),e.moveTo(t+jo,a),e.lineTo(t+r-jo,a),e.quadraticCurveTo(t+r,a,t+r,a+jo),e.lineTo(t+r,a+o-jo),e.quadraticCurveTo(t+r,a+o,t+r-jo,a+o),e.lineTo(t+jo,a+o),e.quadraticCurveTo(t,a+o,t,a+o-jo),e.lineTo(t,a+jo),e.quadraticCurveTo(t,a,t+jo,a),e.closePath(),e.fill(),e.restore()}},{key:"drawEmptyPlaceholder",value:function(e,t,i,r,n){e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textBaseline="middle",e.textAlign="left",e.fillStyle=Qo,e.fillText(A,t+Fo,i+n/2)}},{key:"drawTaskNodes",value:function(e,t,i,r,n,o,a){for(var s=0;s<r.nodeItems.length;s++){var l=i[s],h=r.nodeItems[s];this.drawNodeItemBackground(e,n+h.bounds.x,o,h.bounds.width,a);var d=n+h.icon.x,u=o+h.icon.y;if(this.drawNodeIcon(e,t,l,d,u),h.name){var c=n+h.name.x,f=o+a/2;this.drawNodeName(e,l.name||"",c,f,h.name.width)}}}},{key:"drawNodeIcon",value:function(e,t,i,r,n){var o=i.iconFile,a=o||ia;o&&this.failedIcons.has(a)?this.drawSvgIcon(e,t,ia,r,n):this.drawSvgIcon(e,t,a,r,n)}},{key:"drawSvgIcon",value:function(e,t,i,r,n){var o,a=this,s=this.imageManager.getCachedImage(i);s?e.drawImage(s,r,n,Wo,Wo):null!==(o=this.imageManager.loadingImages)&&void 0!==o&&o.has(i)||this.imageManager.loadImage(i).then(function(){t.requestRedraw()}).catch(function(){a.failedIcons.add(i),t.requestRedraw()})}},{key:"drawNodeName",value:function(e,t,i,r,n){if(t){e.save(),e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textBaseline="middle",e.textAlign="left",e.fillStyle=Jo;var o=this.truncateText(e,t,n);e.fillText(o,i,r),e.restore()}}},{key:"drawAfterArea",value:function(e,t,i,r,n,o,a){var s=t+r/2,l=i+n/2;o?a||this.drawEditIcon(e,s-Uo/2,l-Uo/2,Uo,Zo):this.drawViewIcon(e,s-Uo/2,l-Uo/2,Uo,Zo)}},{key:"drawEditIcon",value:function(e,t,i,r,n){e.save(),e.strokeStyle=n,e.fillStyle=n,e.lineWidth=1.2,e.lineCap="round",e.lineJoin="round";var o=2,a=t+o,s=i+r-o,l=t+r-o,h=i+o;e.beginPath(),e.moveTo(a+2,s-2),e.lineTo(l-1,h+1),e.stroke(),e.beginPath(),e.moveTo(a,s),e.lineTo(a+3,s-1),e.lineTo(a+1,s-3),e.closePath(),e.fill(),e.restore()}},{key:"drawViewIcon",value:function(e,t,i,r,n){e.save(),e.strokeStyle=n,e.lineWidth=1.5,e.lineCap="round";for(var o=2,a=t+o,s=t+r-o,l=(r-2*o)/3,h=0;h<3;h++){var d=i+o+l*h+l/2;e.beginPath(),e.moveTo(a,d),e.lineTo(s,d),e.stroke()}e.restore()}},{key:"drawLinkIcon",value:function(e,t,i,r,n){var o=t+r/2,a=i+n/2,s=12;e.save(),e.strokeStyle=Zo,e.lineWidth=1.5,e.lineCap="round",e.lineJoin="round";var l=s/2,h=2;e.beginPath(),e.moveTo(o-h,a),e.lineTo(o-h,a-l+2),e.quadraticCurveTo(o-h,a-l,o-h+2,a-l),e.lineTo(o+h-2,a-l),e.quadraticCurveTo(o+h,a-l,o+h,a-l+2),e.lineTo(o+h,a),e.stroke(),e.beginPath(),e.moveTo(o-h,a),e.lineTo(o-h,a+l-2),e.quadraticCurveTo(o-h,a+l,o-h+2,a+l),e.lineTo(o+h-2,a+l),e.quadraticCurveTo(o+h,a+l,o+h,a+l-2),e.lineTo(o+h,a),e.stroke(),e.restore()}},{key:"drawStrikethrough",value:function(e,t,i,r,n){e.save(),e.strokeStyle=$o,e.lineWidth=1,e.beginPath(),e.moveTo(t+4,i+n/2),e.lineTo(t+r-4,i+n/2),e.stroke(),e.restore()}},{key:"drawErrorIcon",value:function(e,t,i,r){var n=qo,o=t+n/2,a=r?ta:ea;e.save(),e.fillStyle=a,e.beginPath(),e.moveTo(o,i),e.lineTo(t+n,i+n),e.lineTo(t,i+n),e.closePath(),e.fill(),e.fillStyle="#fff",e.font='bold 8px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textAlign="center",e.textBaseline="middle",e.fillText("!",o,i+.65*n),e.restore()}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),na=ra,oa=i.p+"img/ah-icon_audio_pause.55c06fbf.svg",aa=i.p+"img/ah-icon_closeshape.82e52181.svg",sa=i.p+"img/matrix-icon_finish.617f5d3e.svg",la=i.p+"img/matrix-icon_inprogress.3781156a.svg",ha=i.p+"img/matrix-icon_supervise.edae43f0.svg",da={"ah-icon_audio_pause":oa,"ah-icon_closeshape":aa,"matrix-icon_finish":sa,"matrix-icon_inprogress":la,"matrix-icon_supervise":ha},ua="matrix-icon_supervise",ca=14,fa=4,va=8,ga=13,ya=8,pa=.4,wa=1,xa="#C4C4C4",ma="#ABABAB",ba="-",ka=function(){function e(){wt(this,e),B(this,"type","wf-state"),B(this,"imageManager",void 0),B(this,"failedIcons",new Set),this.imageManager=ni.getInstance()}return mt(e,[{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height;i.save();var l=this.parseValue(t),h=t.displayName,d=t.icon||l,u=t.iconColor||xa,c=t.color||ma;if(h||null!==t.value)if(h){var f=n+va,v=o+(s-ca)/2;this.drawIcon(i,e,d,u,f,v);var g=f+ca+fa,y=a-2*va-ca-fa;this.drawText(i,h,g,o,s,y,c)}else this.drawPlaceholder(i,t,n,o,a,s);else this.drawPlaceholder(i,t,n,o,a,s);this.drawCorner(i,t,l,n,o,a,e),i.restore()}},{key:"onClick",value:function(e,t,i,r){var n=e.bounds,o=n.width,a=n.height;if(this.isInCornerArea(i,r,o)&&this.hasValidCorner(t))return!0;var s=t.displayName;if(s){var l=va+ca+fa+this.estimateTextWidth(s),h=(a-ga)/2,d=h+ga;if(i>=va&&i<=Math.min(l,o-va)&&r>=h&&r<=d)return!0}return!1}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n=e.bounds,o=n.width,a=n.height;if(this.isInCornerArea(i,r,o)&&this.hasValidCorner(t))return e.requestRedraw(),"pointer";var s=t.displayName;if(s){var l=va+ca+fa+this.estimateTextWidth(s),h=(a-ga)/2,d=h+ga;if(i>=va&&i<=Math.min(l,o-va)&&r>=h&&r<=d)return"pointer"}return null}},{key:"parseValue",value:function(e){if(e.stateType)return e.stateType;var t=e.value;if(null!==t&&void 0!==t)"number"===typeof t||(null===t||void 0===t||t.id)}},{key:"drawIcon",value:function(e,t,i,r,n,o){var a=i&&da[i]||da[ua];i&&this.failedIcons.has(i)?this.drawSvgIcon(e,t,da[ua],r,n,o):this.drawSvgIcon(e,t,a,r,n,o)}},{key:"drawSvgIcon",value:function(e,t,i,r,n,o){var a,s=this,l=this.imageManager.getCachedImage(i);l?this.drawTintedImage(e,l,r,n,o):null!==(a=this.imageManager.loadingImages)&&void 0!==a&&a.has(i)||this.imageManager.loadImage(i).then(function(){t.requestRedraw()}).catch(function(){s.failedIcons.add(i),t.requestRedraw()})}},{key:"drawTintedImage",value:function(e,t,i,r,n){var o=ca*Gr,a=document.createElement("canvas");a.width=o,a.height=o;var s=a.getContext("2d");s?(s.drawImage(t,0,0,o,o),s.globalCompositeOperation="source-in",s.fillStyle=i,s.fillRect(0,0,o,o),e.drawImage(a,r,n,ca,ca)):e.drawImage(t,r,n,ca,ca)}},{key:"drawText",value:function(e,t,i,r,n,o,a){e.font="".concat(ga,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),e.fillStyle=a,e.textAlign="left",e.textBaseline="middle";var s=this.truncateText(e,t,o);e.fillText(s,i,r+n/2)}},{key:"drawPlaceholder",value:function(e,t,i,r,n,o){var a=t.placeholder||ba;e.font="".concat(ga,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),e.fillStyle=ma,e.textAlign="left",e.textBaseline="middle",e.fillText(a,i+va,r+o/2)}},{key:"drawCorner",value:function(e,t,i,r,n,o,a){if(this.hasValidCorner(t)){var s=t.iconColor||ma,l=a.isHoverCell&&this.isInCornerAreaFromContext(a),h=l?wa:pa;e.save(),e.globalAlpha=h,e.fillStyle=s;var d=r+o-ya,u=n;e.beginPath(),e.moveTo(d,u),e.lineTo(d+ya,u),e.lineTo(d+ya,u+ya),e.closePath(),e.fill(),e.restore()}}},{key:"hasValidCorner",value:function(e){return!(!e.extraInfo||"object"!==P(e.extraInfo))&&(0!==Object.keys(e.extraInfo).length&&(null!==e.value&&void 0!==e.value))}},{key:"isInCornerArea",value:function(e,t,i){return e>=i-ya&&e<=i&&t>=0&&t<=ya}},{key:"isInCornerAreaFromContext",value:function(e){return e.isHoverCell}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}},{key:"estimateTextWidth",value:function(e){for(var t=0,i=0;i<e.length;i++)t+=e.charCodeAt(i)>127?ga:.6*ga;return t}}])}(),Ca=ka,Sa=8,Ia=13,Ta="#ABABAB",Aa="#333",Ra="-",Da=2,Ea='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Pa=function(){function e(){wt(this,e),B(this,"type","workflow")}return mt(e,[{key:"parseValue",value:function(e){var t=e.value;return t&&Array.isArray(t)?t.filter(function(e){return"string"===typeof e&&""!==e}):[]}},{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=e.isHoverCell,o=r.x,a=r.y,s=r.width,l=r.height;i.save();var h=this.parseValue(t);if(0===h.length)this.drawPlaceholder(i,t,o,a,s,l);else{var d=h.join(", "),u=s-2*Sa;i.font="".concat(Ia,"px ").concat(Ea),i.fillStyle=Aa,i.textAlign="left",i.textBaseline="middle";var c=this.truncateText(i,d,u),f=o+Sa,v=a+l/2;if(i.fillText(c,f,v),n){var g=Math.min(i.measureText(c).width,u),y=v+Ia/2+Da;i.strokeStyle=Aa,i.lineWidth=1,i.beginPath(),i.moveTo(f,y),i.lineTo(f+g,y),i.stroke()}}i.restore()}},{key:"onClick",value:function(e,t,i,r){var n=e.bounds,o=n.width,a=n.height,s=this.parseValue(t);if(0===s.length)return!1;var l=s.join(", "),h=Sa+this.estimateTextWidth(l),d=(a-Ia)/2,u=d+Ia;return i>=Sa&&i<=Math.min(h,o-Sa)&&r>=d&&r<=u}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n=e.bounds,o=n.width,a=n.height,s=this.parseValue(t);if(0===s.length)return null;var l=s.join(", "),h=Sa+this.estimateTextWidth(l),d=(a-Ia)/2,u=d+Ia;return i>=Sa&&i<=Math.min(h,o-Sa)&&r>=d&&r<=u?"pointer":null}},{key:"drawPlaceholder",value:function(e,t,i,r,n,o){var a=t.placeholder||Ra;e.font="".concat(Ia,"px ").concat(Ea),e.fillStyle=Ta,e.textAlign="left",e.textBaseline="middle",e.fillText(a,i+Sa,r+o/2)}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}},{key:"estimateTextWidth",value:function(e){for(var t=0,i=0;i<e.length;i++)t+=e.charCodeAt(i)>127?Ia:.6*Ia;return t}}])}(),Oa=Pa,Ma=8,Ba=13,Ha="#ABABAB",Fa="#333",La="-",Wa=2,za='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Na=function(){function e(){wt(this,e),B(this,"type","file-storage-spec")}return mt(e,[{key:"parseValue",value:function(e){var t=e.value;return null===t||void 0===t||""===t?null:String(t)}},{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=e.isHoverCell,o=r.x,a=r.y,s=r.width,l=r.height;i.save();var h=this.parseValue(t);if(null===h)this.drawPlaceholder(i,t,o,a,s,l);else{var d=s-2*Ma;i.font="".concat(Ba,"px ").concat(za),i.fillStyle=Fa,i.textAlign="left",i.textBaseline="middle";var u=this.truncateText(i,h,d),c=o+Ma,f=a+l/2;if(i.fillText(u,c,f),n){var v=Math.min(i.measureText(u).width,d),g=f+Ba/2+Wa;i.strokeStyle=Fa,i.lineWidth=1,i.beginPath(),i.moveTo(c,g),i.lineTo(c+v,g),i.stroke()}}i.restore()}},{key:"onDblClick",value:function(e,t,i,r){var n=e.bounds,o=n.width,a=n.height,s=this.parseValue(t);if(null===s)return!1;var l=Ma+this.estimateTextWidth(s),h=(a-Ba)/2,d=h+Ba;return i>=Ma&&i<=Math.min(l,o-Ma)&&r>=h&&r<=d}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n=e.bounds,o=n.width,a=n.height,s=this.parseValue(t);if(null===s)return null;var l=Ma+this.estimateTextWidth(s),h=(a-Ba)/2,d=h+Ba;return i>=Ma&&i<=Math.min(l,o-Ma)&&r>=h&&r<=d?"pointer":null}},{key:"drawPlaceholder",value:function(e,t,i,r,n,o){var a=t.placeholder||La;e.font="".concat(Ba,"px ").concat(za),e.fillStyle=Ha,e.textAlign="left",e.textBaseline="middle",e.fillText(a,i+Ma,r+o/2)}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}},{key:"estimateTextWidth",value:function(e){for(var t=0,i=0;i<e.length;i++)t+=e.charCodeAt(i)>127?Ba:.6*Ba;return t}}])}(),Va=Na,_a=i.p+"img/icon_attachment.724d33ba.svg",ja=8,Ya=13,Ga="#ABABAB",Xa="#333",Ua="-",qa=2,Ka='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Ja=22,Qa=14,Za=function(){function e(){wt(this,e),B(this,"type","pivot"),B(this,"imageManager",void 0),this.imageManager=ni.getInstance()}return mt(e,[{key:"parseValue",value:function(e){var t=e.value;return null===t||void 0===t||""===t?null:String(t)}},{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=e.isHoverCell,o=r.x,a=r.y,s=r.width,l=r.height;i.save();var h=this.parseValue(t),d=!0===t.isLink,u=d?s-2*ja-Ja:s-2*ja;if(null===h)this.drawPlaceholder(i,t,o,a,s,l);else{i.font="".concat(Ya,"px ").concat(Ka),i.fillStyle=Xa,i.textAlign="left",i.textBaseline="middle";var c=this.truncateText(i,h,u),f=o+ja,v=a+l/2;if(i.fillText(c,f,v),n){var g=Math.min(i.measureText(c).width,u),y=v+Ya/2+qa;i.strokeStyle=Xa,i.lineWidth=1,i.beginPath(),i.moveTo(f,y),i.lineTo(f+g,y),i.stroke()}}d&&this.drawLinkIcon(i,e,o,a,s,l),i.restore()}},{key:"onClick",value:function(e,t,i,r){var n=e.bounds,o=n.width,a=n.height,s=this.parseValue(t);if(null===s)return!1;var l=!0===t.isLink,h=l?o-2*ja-Ja:o-2*ja,d=ja+Math.min(this.estimateTextWidth(s),h),u=(a-Ya)/2,c=u+Ya;return i>=ja&&i<=Math.min(d,o-ja)&&r>=u&&r<=c}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n=e.bounds,o=n.width,a=n.height,s=this.parseValue(t);if(null===s)return null;var l=!0===t.isLink,h=l?o-2*ja-Ja:o-2*ja,d=ja+Math.min(this.estimateTextWidth(s),h),u=(a-Ya)/2,c=u+Ya;return i>=ja&&i<=Math.min(d,o-ja)&&r>=u&&r<=c?"pointer":null}},{key:"drawPlaceholder",value:function(e,t,i,r,n,o){var a=t.placeholder||Ua;e.font="".concat(Ya,"px ").concat(Ka),e.fillStyle=Ga,e.textAlign="left",e.textBaseline="middle",e.fillText(a,i+ja,r+o/2)}},{key:"drawLinkIcon",value:function(e,t,i,r,n,o){var a,s=i+n-ja-Qa,l=r+(o-Qa)/2,h=this.imageManager.getCachedImage(_a);h?e.drawImage(h,s,l,Qa,Qa):null!==(a=this.imageManager.loadingImages)&&void 0!==a&&a.has(_a)||this.imageManager.loadImage(_a).then(function(){t.requestRedraw()}).catch(function(){})}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}},{key:"estimateTextWidth",value:function(e){for(var t=0,i=0;i<e.length;i++)t+=e.charCodeAt(i)>127?Ya:.6*Ya;return t}}])}(),$a=Za,es=4,ts=8,is=4,rs=8,ns=12,os="".concat(ns,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),as="#fff",ss="#e8e8e8",ls="#666",hs=10,ds=function(){function e(){wt(this,e),B(this,"type","module"),B(this,"overflowBoundsMap",new Map),B(this,"cellModulesMap",new Map)}return mt(e,[{key:"normalizeModules",value:function(e){if(null===e||void 0===e||""===e)return[];var t,i=Array.isArray(e)?e:[e],r=[],n=pt(i);try{for(n.s();!(t=n.n()).done;){var o=t.value;"object"===P(o)&&null!==o&&void 0!==o.id?r.push(o):"string"===typeof o&&""!==o&&r.push({id:o,name:o})}}catch(a){n.e(a)}finally{n.f()}return r}},{key:"draw",value:function(e,t){var i=t.placeholder,r=void 0===i?"-":i,n=t.showColor,o=void 0===n||n,a=t.maxDisplay,s=void 0===a?3:a,l=this.normalizeModules(t.value),h="".concat(e.rowIndex,":").concat(e.colIndex);if(0===l.length)return this.overflowBoundsMap.delete(h),this.cellModulesMap.delete(h),void this.drawPlaceholder(e,r);this.cellModulesMap.set(h,l),o?this.drawColoredTags(e,l,s,h):(this.overflowBoundsMap.delete(h),this.drawPlainText(e,l,s,r))}},{key:"onClick",value:function(e,t,i,r){var n="".concat(e.rowIndex,":").concat(e.colIndex),o=this.overflowBoundsMap.get(n);if(!o)return!1;var a=o.x,s=o.y,l=o.width,h=o.height;if(i>=a&&i<=a+l&&r>=s&&r<=s+h){var d=this.cellModulesMap.get(n)||[],u=e.grid;if(u&&u.onModuleOverflowClick){var c,f=(null===(c=t.extra)||void 0===c?void 0:c.rowData)||null;u.onModuleOverflowClick(d,f,e.rowIndex,e.colIndex)}return!0}return!1}},{key:"drawColoredTags",value:function(e,t,i,r){var n=e.ctx,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=t.slice(0,i),u=t.length-i,c=a+l-hs,f=a+hs,v=s+h/2;this.overflowBoundsMap.delete(r),n.save(),n.font=os;for(var g=0;g<d.length;g++){var y=d[g],p=y.name||y.id,w=y.color||ss,x=n.measureText(p).width,m=x+2*ts,b=ns+2*is;if(f+m>c){this.drawOverflowIndicator(n,f,v,t.length-g,r,a,s);break}var k=f,C=v-b/2;this.drawRoundRect(n,k,C,m,b,es,w);var S=w===ss;n.fillStyle=S?ls:as,n.textAlign="left",n.textBaseline="middle",n.fillText(p,k+ts,v),f+=m+rs}u>0&&f<=c&&this.drawOverflowIndicator(n,f,v,u,r,a,s),n.restore()}},{key:"drawPlainText",value:function(e,t,i,r){var n=e.painter,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=t.slice(0,i),u=t.length-i,c=d.map(function(e){return e.name||e.id}),f=c.join(", ");u>0&&(f+=" +".concat(u)),f||(f=r),n.drawCellText(f,a,s,l,h,ns,{color:"#333",align:"left",baseLine:"middle"})}},{key:"drawOverflowIndicator",value:function(e,t,i,r,n,o,a){var s="+".concat(r),l=e.measureText(s).width,h=l+2*ts,d=ns+2*is,u=i-d/2;this.drawRoundRect(e,t,u,h,d,es,"#f0f0f0"),e.fillStyle="#999",e.textAlign="left",e.textBaseline="middle",e.fillText(s,t+ts,i),this.overflowBoundsMap.set(n,{x:t-o,y:u-a,width:h,height:d})}},{key:"drawRoundRect",value:function(e,t,i,r,n,o,a){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.fillStyle=a,e.fill()}},{key:"drawPlaceholder",value:function(e,t){var i=e.painter,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height;i.drawCellText(t,n,o,a,s,10,{color:"#bbb",align:"left",baseLine:"middle"})}}])}(),us=ds,cs=(i(1761),i.p+"img/icon_singlearrowright.6adcd336.svg"),fs=i.p+"img/icon_totalNum.23a86d16.svg",vs=20,gs=16,ys=16,ps=4,ws=8,xs="#333",ms="#1890ff",bs="#faad14",ks="#ff4d4f",Cs="#d9d9d9",Ss='13px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Is='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Ts=/\[([^\]]+)\]\(([^)]+)\)/,As=function(){function e(){wt(this,e),B(this,"type","text-with-switcher"),B(this,"imageManager",void 0),B(this,"arrowImage",null),B(this,"totalNumImage",null),B(this,"loadingAngle",0),B(this,"lastLayoutBounds",null),this.imageManager=ni.getInstance(),this.preloadIcons()}return mt(e,[{key:"preloadIcons",value:function(){var e=this;this.imageManager.loadImage(cs).then(function(t){e.arrowImage=t}).catch(function(){e.arrowImage=null}),this.imageManager.loadImage(fs).then(function(t){e.totalNumImage=t}).catch(function(){e.totalNumImage=null})}},{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=e.requestRedraw,o=r.x,a=r.y,s=r.width,l=r.height,h=this.calcRightReservedWidth(i,t),d=o+ws;d=this.drawIndentLines(i,t,d,a,l);var u=d;d=this.drawExpandArrow(i,t,d,a,l,n);var c=d;d=this.drawIcon(i,t,d,a,l,n);var f=d,v=o+s-d-h-ws;d=this.drawText(i,t,d,a,l,v);var g=o+s-h,y=o+s-h;this.drawRightArea(i,t,o+s,a,l,n);var p=o+s-ws;this.lastLayoutBounds={expandStart:u-o,expandEnd:c-o,textStart:f-o,textEnd:g-o,totalNumStart:y-o,totalNumEnd:p-o,hasExpandArea:!!t.hasChildren,hasTotalNumArea:!!(t.hasChildren&&t.count&&t.count>0)}}},{key:"drawIndentLines",value:function(e,t,i,r,n){var o=t.tableTreeLevel||0;if(0===o)return i;var a=t.isLastLeafArr||[];e.save(),e.strokeStyle=Cs,e.lineWidth=1,e.setLineDash([3,3]);for(var s=0;s<o;s++){var l=i+s*vs+gs/2,h=a[s];h?(e.beginPath(),e.moveTo(l,r),e.lineTo(l,r+n),e.stroke()):(e.beginPath(),e.moveTo(l,r),e.lineTo(l,r+n/2),e.stroke())}return e.restore(),i+o*vs}},{key:"drawExpandArrow",value:function(e,t,i,r,n,o){var a=r+(n-gs)/2;if(t.loading)return this.drawLoadingSpinner(e,i,a,o),i+gs+ps;if(!t.hasChildren)return i+gs+ps;var s=this.arrowImage||this.imageManager.getCachedImage(cs);if(s){e.save();var l=i+gs/2,h=a+gs/2;t.expanded?(e.translate(l,h),e.rotate(Math.PI/2),e.drawImage(s,-gs/2,-gs/2,gs,gs)):(e.translate(l,h),e.drawImage(s,-gs/2,-gs/2,gs,gs)),e.restore()}else this.drawFallbackArrow(e,i,a,!!t.expanded);return t.expanded&&t.hasChildren&&this.drawExpandDownLine(e,i,r,n),i+gs+ps}},{key:"drawLoadingSpinner",value:function(e,t,i,r){var n=t+gs/2,o=i+gs/2,a=6;e.save(),e.strokeStyle="#121315",e.lineWidth=2,e.lineCap="round",e.beginPath(),e.arc(n,o,a,this.loadingAngle,this.loadingAngle+1.5*Math.PI),e.stroke(),e.restore(),this.loadingAngle+=.1,this.loadingAngle>2*Math.PI&&(this.loadingAngle=0),requestAnimationFrame(function(){return r()})}},{key:"drawExpandDownLine",value:function(e,t,i,r){var n=t+gs/2,o=i+(r+gs)/2,a=i+r;o>=a||(e.save(),e.strokeStyle=Cs,e.lineWidth=1,e.setLineDash([3,3]),e.beginPath(),e.moveTo(n,o),e.lineTo(n,a),e.stroke(),e.restore())}},{key:"drawFallbackArrow",value:function(e,t,i,r){var n=t+gs/2,o=i+gs/2,a=4;e.save(),e.strokeStyle="#121315",e.lineWidth=1.5,e.lineCap="round",e.lineJoin="round",e.beginPath(),r?(e.moveTo(n-a,o-a/2),e.lineTo(n,o+a/2),e.lineTo(n+a,o-a/2)):(e.moveTo(n-a/2,o-a),e.lineTo(n+a/2,o),e.lineTo(n-a/2,o+a)),e.stroke(),e.restore()}},{key:"drawIcon",value:function(e,t,i,r,n,o){var a=r+(n-ys)/2,s=i;if(t.iconFile){var l=this.imageManager.getCachedImage(t.iconFile);l?e.drawImage(l,s,a,ys,ys):this.imageManager.loadImage(t.iconFile).then(function(){return o()}).catch(function(){}),s+=ys+ps}if(t.isLinkTask&&t.linkIconFile){var h=this.imageManager.getCachedImage(t.linkIconFile);h?e.drawImage(h,s,a,ys,ys):this.imageManager.loadImage(t.linkIconFile).then(function(){return o()}).catch(function(){}),s+=ys+ps}return s}},{key:"drawText",value:function(e,t,i,r,n,o){var a=this.getDisplayText(t),s=!a;a||(a=t.placeholder||"-");var l=s?"#bfbfbf":t.color||xs;e.save(),e.font=Ss,e.textAlign="left",e.textBaseline="middle",t.weakenWord&&!s&&(e.globalAlpha=.5);var h=r+n/2,d=s?null:a.match(Ts);if(d){var u=a.substring(0,d.index||0),c=d[1],f=a.substring((d.index||0)+d[0].length),v=i;if(u){e.fillStyle=l;var g=this.truncateText(e,u,o);e.fillText(g,v,h),v+=e.measureText(g).width}var y=o-(v-i);if(y>0){e.fillStyle=ms;var p=this.truncateText(e,c,y);e.fillText(p,v,h);var w=e.measureText(p).width;e.strokeStyle=ms,e.lineWidth=1,e.setLineDash([]),e.beginPath(),e.moveTo(v,h+7),e.lineTo(v+w,h+7),e.stroke(),v+=w}if(f){var x=o-(v-i);if(x>0){e.fillStyle=l;var m=this.truncateText(e,f,x);e.fillText(m,v,h)}}}else{e.fillStyle=l;var b=t.textAlign||"left",k=this.truncateText(e,a,Math.max(0,o)),C=e.measureText(k).width,S=i;"center"===b?S=i+(o-C)/2:"right"===b&&(S=i+o-C),e.fillText(k,S,h),t.showLineThrough&&!s&&(e.strokeStyle=l,e.lineWidth=1,e.setLineDash([]),e.beginPath(),e.moveTo(S,h),e.lineTo(S+C,h),e.stroke())}return e.restore(),i+o}},{key:"calcRightReservedWidth",value:function(e,t){var i=ws;if(t.hasChildren&&t.count&&t.count>0){var r=String(t.count).length;i+=ys+ps+8*r+ps}return t.hasDownstreamNode&&(i+=ys+ps),t.error&&(i+=ys+ps),i}},{key:"drawRightArea",value:function(e,t,i,r,n,o){var a=i-ws;t.error&&(a=this.drawErrorIcon(e,t,a,r,n)),t.hasDownstreamNode&&(a=this.drawDownstreamIcon(e,a,r,n)),t.hasChildren&&t.count&&t.count>0&&this.drawTotalNum(e,t,a,r,n,o)}},{key:"drawTotalNum",value:function(e,t,i,r,n,o){var a=t.count||0,s=String(a);e.save(),e.font=Is,e.fillStyle="#999",e.textAlign="right",e.textBaseline="middle";var l=r+n/2;e.fillText(s,i,l);var h=e.measureText(s).width;i-=h+ps;var d=r+(n-ys)/2,u=this.totalNumImage||this.imageManager.getCachedImage(fs);return u&&e.drawImage(u,i-ys,d,ys,ys),e.restore(),i-ys-ps}},{key:"drawDownstreamIcon",value:function(e,t,i,r){var n=14,o=i+(r-n)/2,a=t-n;e.save(),e.strokeStyle="#999",e.lineWidth=1.5,e.lineCap="round";var s=a+n/2,l=o+n/2;return e.beginPath(),e.moveTo(s-3,l-4),e.lineTo(s-3,l+2),e.lineTo(s+3,l+2),e.stroke(),e.beginPath(),e.moveTo(s+1,l),e.lineTo(s+3,l+2),e.lineTo(s+1,l+4),e.stroke(),e.restore(),t-n-ps}},{key:"drawErrorIcon",value:function(e,t,i,r,n){if(!t.error)return i;var o=14,a=r+(n-o)/2,s=i-o,l=t.error.is_level_1_error?ks:t.error.is_warning?bs:ks;e.save();var h=s+o/2,d=a+1,u=a+o-1,c=(o-2)/2;return e.beginPath(),e.moveTo(h,d),e.lineTo(h+c,u),e.lineTo(h-c,u),e.closePath(),e.fillStyle=l,e.fill(),e.fillStyle="#fff",e.font="bold 9px sans-serif",e.textAlign="center",e.textBaseline="middle",e.fillText("!",h,a+o/2+1),e.restore(),i-o-ps}},{key:"getDisplayText",value:function(e){return e.richText?this.extractPlainText(e.richText):void 0!==e.label&&null!==e.label&&""!==e.label?String(e.label):null===e.value||void 0===e.value||""===e.value?"":String(e.value)}},{key:"extractPlainText",value:function(e){return e.replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/&quot;/g,'"').trim()}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}},{key:"calcLayoutBounds",value:function(e,t){var i=e.tableTreeLevel||0,r=ws;r+=i*vs;var n=r;r+=gs+ps;var o=r;e.iconFile&&(r+=ys+ps),e.isLinkTask&&e.linkIconFile&&(r+=ys+ps);var a=r,s=ws;if(e.hasChildren&&e.count&&e.count>0){var l=String(e.count).length;s+=ys+ps+8*l+ps}e.hasDownstreamNode&&(s+=ys+ps),e.error&&(s+=ys+ps);var h=t-s,d=t-s,u=t-ws;return{expandStart:n,expandEnd:o,textStart:a,textEnd:h,totalNumStart:d,totalNumEnd:u,hasExpandArea:!!e.hasChildren,hasTotalNumArea:!!(e.hasChildren&&e.count&&e.count>0)}}},{key:"onClick",value:function(e,t,i,r){var n,o,a=this.calcLayoutBounds(t,e.bounds.width),s=null===(n=t.extra)||void 0===n?void 0:n.rowData,l=(null===(o=e.grid.columns[e.colIndex])||void 0===o?void 0:o.key)||"";return a.hasExpandArea&&i>=a.expandStart&&i<=a.expandEnd?(e.grid.onTreeExpand&&e.grid.onTreeExpand(s,!t.expanded),!0):i>=a.textStart&&i<=a.textEnd?(e.grid.onCellTextClick&&e.grid.onCellTextClick(s,l),!0):!!(a.hasTotalNumArea&&i>=a.totalNumStart&&i<=a.totalNumEnd)&&(e.grid.onCellTotalNumClick&&e.grid.onCellTotalNumClick(s,l),!0)}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n=this.calcLayoutBounds(t,e.bounds.width);return n.hasExpandArea&&i>=n.expandStart&&i<=n.expandEnd||i>=n.textStart&&i<=n.textEnd||n.hasTotalNumArea&&i>=n.totalNumStart&&i<=n.totalNumEnd?"pointer":null}}])}(),Rs=As,Ds=8,Es=8,Ps=4,Os=6,Ms=20,Bs=11,Hs="".concat(Bs,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),Fs="#fff",Ls="#f5f5f5",Ws="#999",zs=12,Ns="#52c41a",Vs="#52c41a",_s=11,js=20,Ys=2,Gs=4,Xs=10,Us=4,qs="-",Ks="#bbb",Js=function(){function e(){wt(this,e),B(this,"type","upstream"),B(this,"imageManager",void 0),B(this,"failedImages",new Set),B(this,"pendingLoads",new Set),this.imageManager=ni.getInstance()}return mt(e,[{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height,l=Array.isArray(t.value)?t.value:[];if(i.save(),0===l.length)return this.drawEmpty(e),void i.restore();for(var h=n+Ds,d=n+a-Es,u=o+s/2,c=0;c<l.length;c++){if(h>=d)break;var f=l[c],v=this.drawModuleTag(i,f,h,u,d);if(v<=0)break;if(h+=v+Us,f.isAvailable)h=this.drawDoneStatus(i,e,f,h,u,d);else if(f.reminderProperties){var g=this.drawReminderTag(i,f,h,u,d);h+=g}c<l.length-1&&(h+=Xs/2,h<d&&(i.strokeStyle="#e8e8e8",i.lineWidth=1,i.beginPath(),i.moveTo(h,u-Ms/2+2),i.lineTo(h,u+Ms/2-2),i.stroke(),h+=Xs/2))}i.restore()}},{key:"onClick",value:function(e,t,i,r){var n=e.ctx,o=e.bounds,a=o.width,s=o.height,l=Array.isArray(t.value)?t.value:[];if(0===l.length)return!1;var h,d=this.calculateClickAreas(n,l,a,s),u=pt(d);try{for(u.s();!(h=u.n()).done;){var c=h.value;if(i>=c.x&&i<=c.x+c.width&&r>=c.y&&r<=c.y+c.height){var f=t.onClickImage;return f&&"function"===typeof f&&f(c.imageUrl,c.index,[c.assetId],t),!0}}}catch(v){u.e(v)}finally{u.f()}return!1}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n=e.ctx,o=e.bounds,a=o.width,s=o.height,l=Array.isArray(t.value)?t.value:[];if(0===l.length)return null;var h,d=this.calculateClickAreas(n,l,a,s),u=pt(d);try{for(u.s();!(h=u.n()).done;){var c=h.value;if(i>=c.x&&i<=c.x+c.width&&r>=c.y&&r<=c.y+c.height)return"pointer"}}catch(f){u.e(f)}finally{u.f()}return null}},{key:"drawEmpty",value:function(e){var t=e.painter,i=e.bounds,r=i.x,n=i.y,o=i.width,a=i.height;t.drawCellText(qs,r,n,o,a,10,{color:Ks,align:"left",baseLine:"middle"})}},{key:"drawModuleTag",value:function(e,t,i,r,n){var o=t.module;if(!o)return 0;e.save(),e.font=Hs;var a=o.displayName||"",s=e.measureText(a).width,l=s+2*Os;if(i+l>n)return e.restore(),0;var h=r-Ms/2;return this.drawRoundRect(e,i,h,l,Ms,Ps,o.bgColor||"#999"),e.fillStyle=Fs,e.textAlign="left",e.textBaseline="middle",e.fillText(a,i+Os,r),e.restore(),l}},{key:"drawReminderTag",value:function(e,t,i,r,n){var o=t.reminderProperties;if(!o)return 0;e.save(),e.font=Hs;var a=o.displayName||"",s=e.measureText(a).width,l=s+2*Os;if(i+l>n)return e.restore(),0;var h=r-Ms/2,d=!!o.bgColor;return d?(this.drawRoundRect(e,i,h,l,Ms,Ps,o.bgColor),e.fillStyle=Fs):(this.drawRoundRect(e,i,h,l,Ms,Ps,Ls),e.fillStyle=Ws),e.textAlign="left",e.textBaseline="middle",e.fillText(a,i+Os,r),e.restore(),l}},{key:"drawDoneStatus",value:function(e,t,i,r,n,o){var a,s=r;s+zs<=o&&(this.drawCheckmark(e,s,n-zs/2,zs,Ns),s+=zs+2);var l=null!==(a=i.reminderProperties)&&void 0!==a&&a.isFirstEditionTime?"初版已完成":"已完成";e.save(),e.font="".concat(_s,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif');var h=e.measureText(l).width;return s+h<=o&&(e.fillStyle=Vs,e.textAlign="left",e.textBaseline="middle",e.fillText(l,s,n),s+=h+Us),e.restore(),i.syncProperties&&i.syncProperties.length>0&&(s=this.drawPreviewImages(e,t,i.syncProperties,s,n,o)),s}},{key:"drawPreviewImages",value:function(e,t,i,r,n,o){var a,s=r,l=n-js/2,h=pt(i);try{for(h.s();!(a=h.n()).done;){var d=a.value;if(s+js>o)break;var u=d.imageUrl||"";if(!u&&d.fileFormat&&(u=ut(d.fileFormat)),u)this.drawPreviewImage(e,t,u,d.fileFormat,s,l);else{var c=ut(d.fileFormat||"png");this.drawPreviewImage(e,t,c,d.fileFormat,s,l)}s+=js+Gs}}catch(f){h.e(f)}finally{h.f()}return s}},{key:"drawPreviewImage",value:function(e,t,i,r,n,o){var a=this;if(this.failedImages.has(i)){var s=ut(r||"png");this.drawSvgIcon(e,t,s,n,o)}else{var l=this.imageManager.getCachedImage(i);if(l){e.save(),this.clipRoundRect(e,n,o,js,js,Ys);var h,d,u,c,f=l.width/l.height;f>1?(d=js,h=js*f,u=n-(h-js)/2,c=o):(h=js,d=js/f,u=n,c=o-(d-js)/2),e.drawImage(l,u,c,h,d),e.restore()}else{this.pendingLoads.has(i)||(this.pendingLoads.add(i),this.imageManager.loadImage(i).then(function(){a.pendingLoads.delete(i),t.requestRedraw()}).catch(function(){a.pendingLoads.delete(i),a.failedImages.add(i),t.requestRedraw()}));var v=ut(r||"png");this.drawSvgIcon(e,t,v,n,o)}}}},{key:"drawSvgIcon",value:function(e,t,i,r,n){var o=this,a=this.imageManager.getCachedImage(i);a?e.drawImage(a,r,n,js,js):this.pendingLoads.has(i)||(this.pendingLoads.add(i),this.imageManager.loadImage(i).then(function(){o.pendingLoads.delete(i),t.requestRedraw()}).catch(function(){o.pendingLoads.delete(i)}))}},{key:"drawCheckmark",value:function(e,t,i,r,n){e.save(),e.strokeStyle=n,e.lineWidth=1.5,e.lineCap="round",e.lineJoin="round";var o=2;e.beginPath(),e.moveTo(t+o,i+r/2),e.lineTo(t+.4*r,i+r-o),e.lineTo(t+r-o,i+o),e.stroke(),e.restore()}},{key:"calculateClickAreas",value:function(e,t,i,r){var n=[],o=Ds,a=i-Es,s=r/2;e.save();for(var l=0;l<t.length;l++){var h;if(o>=a)break;var d=t[l];e.font=Hs;var u=(null===(h=d.module)||void 0===h?void 0:h.displayName)||"",c=e.measureText(u).width,f=c+2*Os;if(o+f>a)break;if(o+=f+Us,d.isAvailable){var v;o+=zs+2;var g=null!==(v=d.reminderProperties)&&void 0!==v&&v.isFirstEditionTime?"初版已完成":"已完成";e.font="".concat(_s,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif');var y=e.measureText(g).width;if(o+=y+Us,d.syncProperties)for(var p=s-js/2,w=0;w<d.syncProperties.length;w++){if(o+js>a)break;var x=d.syncProperties[w],m=x.imageUrl||"";!m&&x.fileFormat&&(m=ut(x.fileFormat)),n.push({x:o,y:p,width:js,height:js,imageUrl:m,assetId:x.assetId,index:w}),o+=js+Gs}}else if(d.reminderProperties){e.font=Hs;var b=d.reminderProperties.displayName||"",k=e.measureText(b).width;o+=k+2*Os}l<t.length-1&&(o+=Xs)}return e.restore(),n}},{key:"drawRoundRect",value:function(e,t,i,r,n,o,a){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.fillStyle=a,e.fill()}},{key:"clipRoundRect",value:function(e,t,i,r,n,o){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.clip()}}])}(),Qs=Js,Zs=14,$s=10,el=6,tl=function(){function e(){wt(this,e),B(this,"type","punch-timing"),B(this,"timerStates",new Map)}return mt(e,[{key:"draw",value:function(e,t){var i=this.getOrCreateState(e);this.drawIcon(e,t,i),this.drawTimeText(e,t,i)}},{key:"onClick",value:function(e,t,i,r){if(e.readonly||!t.canEdit)return!1;var n=e.bounds.height,o=0,a=$s+Zs+el,s=0,l=n,h=i>=o&&i<=a&&r>=s&&r<=l;if(!h)return!1;var d=this.getOrCreateState(e);return"pause"===d.status?this.startTimer(e,d):this.pauseTimer(e,d),e.requestRedraw(),!0}},{key:"getInteractiveCursor",value:function(e,t,i,r){if(e.readonly||!t.canEdit)return null;var n=e.bounds.height,o=$s+Zs+el;return i>=0&&i<=o&&r>=0&&r<=n?"pointer":null}},{key:"dispose",value:function(){var e,t=pt(this.timerStates.values());try{for(t.s();!(e=t.n()).done;){var i=e.value;this.clearInterval(i)}}catch(r){t.e(r)}finally{t.f()}this.timerStates.clear()}},{key:"drawIcon",value:function(e,t,i){if(t.canEdit){var r=e.ctx,n=e.bounds,o=n.x,a=n.y,s=n.height,l=o+$s,h=a+(s-Zs)/2;if(r.save(),"start"===i.status){r.fillStyle="#999999";var d=3,u=Zs,c=3,f=2*d+c,v=(Zs-f)/2;r.fillRect(l+v,h,d,u),r.fillRect(l+v+d+c,h,d,u)}else r.fillStyle="#999999",r.beginPath(),r.moveTo(l,h),r.lineTo(l,h+Zs),r.lineTo(l+Zs,h+Zs/2),r.closePath(),r.fill();r.restore()}}},{key:"drawTimeText",value:function(e,t,i){var r=e.bounds,n=e.painter,o=r.x,a=r.y,s=r.width,l=r.height,h=this.getDisplayText(t,i),d=t.color||"#121315",u=10,c=t.canEdit?$s+Zs+el:0,f=o+c,v=s-c-u;n.drawCellText(h,f,a,v,l,u,{color:d,align:t.textAlign||"left",baseLine:"middle"})}},{key:"getOrCreateState",value:function(e){var t="".concat(e.rowIndex,"-").concat(e.colIndex),i=this.timerStates.get(t);return i||(i={timerId:null,startTime:null,currentTime:"00:00:00",status:"pause"},this.timerStates.set(t,i)),i}},{key:"startTimer",value:function(e,t){var i=this;this.clearInterval(t),t.startTime=Date.now(),t.status="start",t.currentTime="00:00:00",t.timerId=window.setInterval(function(){i.tick(t,e)},1e3)}},{key:"pauseTimer",value:function(e,t){this.clearInterval(t),t.status="pause"}},{key:"tick",value:function(e,t){if("start"===e.status&&e.startTime){var i=Math.floor((Date.now()-e.startTime)/1e3),r=Math.floor(i/3600).toString().padStart(2,"0"),n=Math.floor(i%3600/60).toString().padStart(2,"0"),o=(i%60).toString().padStart(2,"0");e.currentTime="".concat(r,":").concat(n,":").concat(o),t.requestRedraw()}}},{key:"clearInterval",value:function(e){null!==e.timerId&&(window.clearInterval(e.timerId),e.timerId=null)}},{key:"getDisplayText",value:function(e,t){if("start"===t.status)return t.currentTime;var i=e.value,r=e.placeholder,n=void 0===r?"00:00:00":r;return(i||0===i)&&"string"===typeof i?i:n}}])}(),il=tl,rl="-",nl="#bbb",ol=8,al=4,sl=8,ll=50,hl="#f5f5f5",dl="#333",ul="#ff9800",cl="#fff",fl="#2196f3",vl="#fff",gl="#e0e0e0",yl="#999",pl=16,wl="#666",xl=function(){function e(){wt(this,e),B(this,"type","table-action-button"),B(this,"buttonPositions",[]),B(this,"moreButtonPosition",null)}return mt(e,[{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=t.value;this.buttonPositions=[],this.moreButtonPosition=null;var o=!n||0===n.length,a=o||t.isLinkTask;if(a)this.drawEmpty(e);else{var s=r.x+ol;t.isLink&&(this.drawLinkIcon(i,s,r.y+r.height/2),s+=pl+sl);var l,h=r.width-(s-r.x),d=this.calculateVisibleButtons(i,n,h),u=d.visibleButtons,c=d.hasOverflow,f=s,v=r.y+r.height/2,g=24,y=pt(u);try{for(y.s();!(l=y.n()).done;){var p=l.value,w=this.calculateButtonWidth(i,p.displayName),x=v-g/2;this.drawButton(i,p,f,x,w,g,t.canEdit),this.buttonPositions.push({button:p,x:f,y:x,width:w,height:g}),f+=w+sl}}catch(b){y.e(b)}finally{y.f()}if(c){var m=v-g/2;this.drawMoreButton(i,f,m,ll,g),this.moreButtonPosition={x:f,y:m,width:ll,height:g}}}}},{key:"drawEmpty",value:function(e){var t=e.painter,i=e.bounds;t.drawCellText(rl,i.x,i.y,i.width,i.height,10,{align:"left",color:nl})}},{key:"calculateButtonWidth",value:function(e,t){var i=e.measureText(t).width;return i+2*ol}},{key:"calculateVisibleButtons",value:function(e,t,i){for(var r=[],n=ol,o=!1,a=0;a<t.length;a++){var s=t[a],l=this.calculateButtonWidth(e,s.displayName),h=t.length-a-1,d=h>0,u=n+l+(d?sl+ll:0);if(u>i){o=!0;break}r.push(s),n+=l+sl}return{visibleButtons:r,hasOverflow:o}}},{key:"drawMoreButton",value:function(e,t,i,r,n){e.save(),e.fillStyle=hl,this.drawRoundedRect(e,t,i,r,n,al),e.fill(),e.restore(),e.save(),e.fillStyle=dl,e.font="12px sans-serif",e.textAlign="center",e.textBaseline="middle",e.fillText("更多",t+r/2,i+n/2),e.restore()}},{key:"drawButton",value:function(e,t,i,r,n,o,a){var s,l;if(!1===a)s=gl,l=yl;else if(t.isSuperBtn){var h,d;s=null!==(h=t.backgroundColor)&&void 0!==h?h:ul,l=null!==(d=t.color)&&void 0!==d?d:cl}else if(t.isOperationBtn){var u,c;s=null!==(u=t.backgroundColor)&&void 0!==u?u:fl,l=null!==(c=t.color)&&void 0!==c?c:vl}else{var f,v;s=null!==(f=t.backgroundColor)&&void 0!==f?f:hl,l=null!==(v=t.color)&&void 0!==v?v:dl}e.save(),e.fillStyle=s,this.drawRoundedRect(e,i,r,n,o,al),e.fill(),e.restore(),e.save(),e.fillStyle=l,e.font="12px sans-serif",e.textAlign="center",e.textBaseline="middle",e.fillText(t.displayName,i+n/2,r+o/2),e.restore()}},{key:"drawRoundedRect",value:function(e,t,i,r,n,o){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.arcTo(t+r,i,t+r,i+o,o),e.lineTo(t+r,i+n-o),e.arcTo(t+r,i+n,t+r-o,i+n,o),e.lineTo(t+o,i+n),e.arcTo(t,i+n,t,i+n-o,o),e.lineTo(t,i+o),e.arcTo(t,i,t+o,i,o),e.closePath()}},{key:"drawLinkIcon",value:function(e,t,i){e.save(),e.fillStyle=wl,e.font="".concat(pl,"px sans-serif"),e.textAlign="left",e.textBaseline="middle",e.fillText("🔗",t,i),e.restore()}},{key:"onClick",value:function(e,t,i,r){if(!1===t.canEdit)return!1;var n,o=pt(this.buttonPositions);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(i>=a.x&&i<=a.x+a.width&&r>=a.y&&r<=a.y+a.height){var s=a.button,l=new MouseEvent("click");if(s.isOperationBtn&&t.onOperationBtnClick)t.onOperationBtnClick(l,{id:t.id,data:t});else if(t.onButtonClick){var h={id:t.id,operation:s};s.isSuperBtn&&(h.operation.position={x:a.x,y:a.y,width:a.width,height:a.height}),t.onButtonClick(l,h)}return!0}}}catch(c){o.e(c)}finally{o.f()}if(this.moreButtonPosition){var d=this.moreButtonPosition;if(i>=d.x&&i<=d.x+d.width&&r>=d.y&&r<=d.y+d.height){if(t.onAfterClick){var u=new MouseEvent("click");t.onAfterClick(u,{data:t,position:{x:d.x,y:d.y}})}return!0}}return!1}},{key:"getInteractiveCursor",value:function(e,t,i,r){if(!1===t.canEdit)return null;var n,o=pt(this.buttonPositions);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(i>=a.x&&i<=a.x+a.width&&r>=a.y&&r<=a.y+a.height)return"pointer"}}catch(l){o.e(l)}finally{o.f()}if(this.moreButtonPosition){var s=this.moreButtonPosition;if(i>=s.x&&i<=s.x+s.width&&r>=s.y&&r<=s.y+s.height)return"pointer"}return null}}])}(),ml={0:{color:"rgba(251, 75, 81, 1)",bgColor:"rgba(251, 75, 81, 0.2)"},1:{color:"rgba(250, 66, 180, 1)",bgColor:"rgba(250, 66, 180, 0.2)"},2:{color:"rgba(250, 179, 0, 1)",bgColor:"rgba(250, 179, 0, 0.2)"},3:{color:"rgba(0, 197, 251, 1)",bgColor:"rgba(0, 197, 251, 0.2)"},4:{color:"rgba(0, 189, 119, 1)",bgColor:"rgba(0, 189, 119, 0.2)"}};function bl(e){if(null===e||void 0===e||""===e)return null;var t="string"===typeof e?parseInt(e,10):e;return isNaN(t)?null:ml[t]?ml[t]:ml[4]}var kl=function(){function e(){wt(this,e),B(this,"type","priority-text"),B(this,"emptyValue","-")}return mt(e,[{key:"draw",value:function(e,t){var i=t.value,r=bl(i);r&&null!==i&&void 0!==i&&""!==i?this.drawPriorityTag(e,t,r):this.drawEmptyText(e,t)}},{key:"drawPriorityTag",value:function(e,t,i){var r,n,o,a,s=e.ctx,l=e.bounds,h=l.x,d=l.y,u=l.width,c=l.height,f=null!==(r=null===(n=t.style)||void 0===n?void 0:n.padding)&&void 0!==r?r:10,v=(null===(o=t.style)||void 0===o?void 0:o.fontSize)||12,g=8,y=Math.min(22,c-8),p=null!==(a=t.tagRadius)&&void 0!==a?a:2,w="P".concat(t.value);s.save(),s.font="500 ".concat(v,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif');var x,m=u-2*f,b=t.textAlign||"center";switch(b){case"center":x=h+(u-m)/2;break;case"right":x=h+u-m-f;break;default:x=h+f}var k=d+(c-y)/2;this.drawRoundedRect(s,x,k,m,y,p,i.bgColor),s.fillStyle=i.color,s.textAlign="center",s.textBaseline="middle";var C=m-2*g,S=this.truncateText(s,w,C);s.fillText(S,x+m/2,k+y/2),s.restore()}},{key:"drawEmptyText",value:function(e,t){var i,r,n=e.painter,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=null!==(i=null===(r=t.style)||void 0===r?void 0:r.padding)&&void 0!==i?i:10,u=t.placeholder||this.emptyValue;n.drawCellText(u,a,s,l,h,d,{color:"#ababab",align:"left",baseLine:"middle"})}},{key:"drawRoundedRect",value:function(e,t,i,r,n,o,a){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.fillStyle=a,e.fill()}},{key:"truncateText",value:function(e,t,i){if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),Cl=kl,Sl=[{value:"toStart",name:"未就绪",color:"#666",icon:"circle",iconColor:"#666"},{value:"toStart",name:"未开始",color:"#666",icon:"circle",iconColor:"#666"},{value:"paused",name:"已暂停",color:"#666",icon:"pause",iconColor:"#DDDFE8"},{value:"inProgress",name:"进行中",color:"#666",icon:"progress",iconColor:"#3f9eff"},{value:"complete",name:"已完成",color:"#666",icon:"check",iconColor:"#23d0a1"}];function Il(e,t){if(!e)return null;var i=t.find(function(t){return(null===t||void 0===t?void 0:t.name)===e});return i||null}var Tl=function(){function e(){wt(this,e),B(this,"type","status-text"),B(this,"emptyValue","-")}return mt(e,[{key:"draw",value:function(e,t){var i=t.value,r=t.statusList||Sl,n=Il(String(null!==i&&void 0!==i?i:""),r);n?this.drawStatusContent(e,t,n):this.drawEmptyText(e,t),t.showCorner&&t.extraInfo&&Object.keys(t.extraInfo).length>0&&n&&this.drawCorner(e,n.color)}},{key:"drawStatusContent",value:function(e,t,i){var r,n,o,a,s,l=e.ctx,h=e.bounds,d=h.x,u=h.y,c=h.width,f=h.height,v=null!==(r=null===(n=t.style)||void 0===n?void 0:n.padding)&&void 0!==r?r:10,g=null!==(o=null===(a=t.style)||void 0===a?void 0:a.fontSize)&&void 0!==o?o:12,y=null!==(s=t.iconSize)&&void 0!==s?s:14,p=6,w=!1!==t.showIcon;l.save(),l.font="".concat(g,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif');var x=d+v,m=u+f/2;if(w&&i.icon){var b=x,k=u+(f-y)/2;this.drawIcon(l,i.icon,b,k,y,i.iconColor),x+=y+p}l.fillStyle=i.color,l.textAlign="left",l.textBaseline="middle";var C=c-(x-d)-v,S=this.truncateText(l,i.name,C);l.fillText(S,x,m),l.restore()}},{key:"drawEmptyText",value:function(e,t){var i,r,n=e.painter,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=null!==(i=null===(r=t.style)||void 0===r?void 0:r.padding)&&void 0!==i?i:10,u=t.placeholder||this.emptyValue;n.drawCellText(u,a,s,l,h,d,{color:"#ababab",align:"left",baseLine:"middle"})}},{key:"drawIcon",value:function(e,t,i,r,n,o){e.save(),e.fillStyle=o,e.strokeStyle=o,e.lineWidth=1.5;var a=i+n/2,s=r+n/2,l=n/2-2;switch(t){case"circle":e.beginPath(),e.arc(a,s,l,0,2*Math.PI),e.stroke();break;case"pause":var h=.18*n,d=.5*n,u=.12*n,c=r+(n-d)/2;e.fillRect(a-u-h,c,h,d),e.fillRect(a+u,c,h,d);break;case"progress":e.beginPath(),e.arc(a,s,l,.25*-Math.PI,1.25*Math.PI,!1),e.stroke();var f=.25*-Math.PI,v=a+l*Math.cos(f),g=s+l*Math.sin(f);e.beginPath(),e.arc(v,g,1.5,0,2*Math.PI),e.fill();break;case"check":e.beginPath(),e.arc(a,s,l,0,2*Math.PI),e.fill(),e.strokeStyle="#fff",e.lineWidth=1.5,e.lineCap="round",e.lineJoin="round",e.beginPath(),e.moveTo(i+.28*n,s),e.lineTo(i+.42*n,r+.62*n),e.lineTo(i+.72*n,r+.35*n),e.stroke();break;default:e.beginPath(),e.arc(a,s,.5*l,0,2*Math.PI),e.fill()}e.restore()}},{key:"drawCorner",value:function(e,t){var i=e.ctx,r=e.bounds,n=r.x,o=r.y,a=r.width,s=6,l=t||"#ABABAB";i.save(),i.fillStyle=l,i.beginPath(),i.moveTo(n+a-s,o),i.lineTo(n+a,o),i.lineTo(n+a,o+s),i.closePath(),i.fill(),i.restore()}},{key:"truncateText",value:function(e,t,i){if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),Al=Tl;function Rl(e){return e&&Array.isArray(e)&&0!==e.length?e.map(function(e){return"string"===typeof e?{id:e,title:e}:e}):[]}var Dl=function(){function e(){wt(this,e),B(this,"type","theme"),B(this,"emptyValue","-")}return mt(e,[{key:"draw",value:function(e,t){var i=Rl(t.value);i.length>0?this.drawThemeContent(e,t,i):this.drawEmptyText(e,t)}},{key:"drawThemeContent",value:function(e,t,i){var r,n,o,a,s,l,h,d=e.ctx,u=e.bounds,c=u.x,f=u.y,v=u.width,g=u.height,y=null!==(r=null===(n=t.style)||void 0===n?void 0:n.padding)&&void 0!==r?r:10,p=null!==(o=null===(a=t.style)||void 0===a?void 0:a.fontSize)&&void 0!==o?o:12,w=null!==(s=t.iconSize)&&void 0!==s?s:14,x=6,m=!1!==t.showIcon;d.save(),d.font="".concat(p,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif');var b=c+y,k=f+g/2;if(m){var C,S=b,I=f+(g-w)/2,T=null!==(C=t.iconColor)&&void 0!==C?C:"#8c8c8c";this.drawThemeIcon(d,S,I,w,T),b+=w+x}var A=null!==(l=null===(h=t.style)||void 0===h?void 0:h.color)&&void 0!==l?l:"#333";d.fillStyle=A,d.textAlign="left",d.textBaseline="middle";var R=i[0],D=R.title||R.id,E="";i.length>1&&(E="等".concat(i.length,"个"));var P=E?d.measureText(E).width+4:0,O=v-(b-c)-y-P,M=this.truncateText(d,D,O);if(d.fillText(M,b,k),E){var B,H=d.measureText(M).width,F=b+H+4,L=null!==(B=t.suffixColor)&&void 0!==B?B:"#999";d.fillStyle=L,d.fillText(E,F,k)}d.restore()}},{key:"drawThemeIcon",value:function(e,t,i,r,n){e.save(),e.fillStyle=n,e.strokeStyle=n,e.lineWidth=1.2;var o=t+r/2,a=i+r/2,s=r/2-2;e.beginPath(),e.arc(o,a,s,0,2*Math.PI),e.stroke();var l=.2*s,h=[{angle:-Math.PI/3,offsetRatio:.55},{angle:Math.PI/6,offsetRatio:.55},{angle:2*Math.PI/3,offsetRatio:.55}];h.forEach(function(t){var i=o+s*t.offsetRatio*Math.cos(t.angle),r=a+s*t.offsetRatio*Math.sin(t.angle);e.beginPath(),e.arc(i,r,l,0,2*Math.PI),e.fill()}),e.restore()}},{key:"drawEmptyText",value:function(e,t){var i,r,n=e.painter,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=null!==(i=null===(r=t.style)||void 0===r?void 0:r.padding)&&void 0!==i?i:10,u=t.placeholder||this.emptyValue;n.drawCellText(u,a,s,l,h,d,{color:"#ababab",align:"left",baseLine:"middle"})}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),El=Dl,Pl=i.p+"img/icon_netdisc.d8bbe2e0.svg";function Ol(e){if(!e)return null;if("string"===typeof e)try{var t=JSON.parse(e);return t}catch(i){return null}return"object"===P(e)?e:null}var Ml=function(){function e(){wt(this,e),B(this,"type","itfs-path"),B(this,"imageManager",void 0),B(this,"emptyValue","-"),B(this,"defaultPathColor","#268bfb"),B(this,"defaultIconColor","#8e8e8e"),B(this,"syncOkColor","#23d0a1"),this.imageManager=ni.getInstance()}return mt(e,[{key:"draw",value:function(e,t){var i=Ol(t.value);null!==i&&void 0!==i&&i.path?this.drawPathContent(e,t,i):this.drawEmptyText(e,t)}},{key:"onClick",value:function(e,t,i,r){var n,o,a=e.bounds,s=null!==(n=null===(o=t.style)||void 0===o?void 0:o.padding)&&void 0!==n?n:10,l=!1!==t.showIcon,h=16,d=8;if(l){var u=a.width-s-h,c=(a.height-h)/2;if(i>=u&&i<=u+h&&r>=c&&r<=c+h)return!0}var f=Ol(t.value);if(null!==f&&void 0!==f&&f.path){var v=s,g=l?a.width-s-h-d:a.width-s;if(i>=v&&i<=g)return!0}return!1}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n,o,a=e.bounds,s=null!==(n=null===(o=t.style)||void 0===o?void 0:o.padding)&&void 0!==n?n:10,l=!1!==t.showIcon,h=16,d=8,u=Ol(t.value);if(null===u||void 0===u||!u.path)return null;if(l){var c=a.width-s-h,f=(a.height-h)/2;if(i>=c&&i<=c+h&&r>=f&&r<=f+h)return"pointer"}var v=s,g=l?a.width-s-h-d:a.width-s;return i>=v&&i<=g?"pointer":null}},{key:"drawPathContent",value:function(e,t,i){var r,n,o,a,s=e.ctx,l=e.bounds,h=l.x,d=l.y,u=l.width,c=l.height,f=null!==(r=null===(n=t.style)||void 0===n?void 0:n.padding)&&void 0!==r?r:10,v=null!==(o=null===(a=t.style)||void 0===a?void 0:a.fontSize)&&void 0!==o?o:12,g=t.pathColor||this.defaultPathColor,y=!1!==t.showIcon,p=16,w=8;s.save(),s.font="".concat(v,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif');var x=u-2*f;y&&(x-=p+w);var m=h+f,b=d+c/2;s.fillStyle=g,s.textAlign="left",s.textBaseline="middle";var k=this.truncateText(s,i.path,x);if(s.fillText(k,m,b),y){var C=h+u-f-p,S=d+(c-p)/2;i.isSync?this.drawSyncOkIcon(s,C,S,p):this.drawNetdiscIcon(s,e,C,S,p)}s.restore()}},{key:"drawEmptyText",value:function(e,t){var i,r,n=e.painter,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=null!==(i=null===(r=t.style)||void 0===r?void 0:r.padding)&&void 0!==i?i:10,u=t.placeholder||this.emptyValue;n.drawCellText(u,a,s,l,h,d,{color:"#ababab",align:"left",baseLine:"middle"})}},{key:"drawNetdiscIcon",value:function(e,t,i,r,n){var o=this.imageManager.getCachedImage(Pl);o?e.drawImage(o,i,r,n,n):this.imageManager.loadImage(Pl).then(function(){t.requestRedraw()}).catch(function(){})}},{key:"drawSyncOkIcon",value:function(e,t,i,r){e.save();var n=t+r/2,o=i+r/2,a=r/2-2;e.beginPath(),e.arc(n,o,a,0,2*Math.PI),e.fillStyle=this.syncOkColor,e.fill(),e.strokeStyle="#fff",e.lineWidth=1.5,e.lineCap="round",e.lineJoin="round",e.beginPath(),e.moveTo(t+.28*r,o),e.lineTo(t+.42*r,i+.62*r),e.lineTo(t+.72*r,i+.35*r),e.stroke(),e.restore()}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),Bl=Ml,Hl=function(){function e(){wt(this,e),B(this,"type","deliverable-review"),B(this,"emptyValue","-"),B(this,"reviewIconColor","#3f9eff"),B(this,"fileIconColor","#8e8e8e"),B(this,"nameColor","#333"),B(this,"nameHoverColor","#268bfb"),B(this,"editIconColor","#999")}return mt(e,[{key:"draw",value:function(e,t){var i=this.parseReviewItems(t.value);i.length>0?this.drawReviewItems(e,t,i):this.drawEmptyText(e,t),t.error&&this.drawErrorIndicator(e),t.showLineThrow&&this.drawStrikethrough(e,t,i),t.canEdit&&e.isHoverRow&&this.drawEditButton(e,t)}},{key:"onClick",value:function(e,t,i,r){var n,o,a=e.bounds,s=null!==(n=null===(o=t.style)||void 0===o?void 0:o.padding)&&void 0!==n?n:10,l=!1!==t.canEdit;if(l&&e.isHoverRow){var h=20,d=a.width-s-h,u=(a.height-h)/2;if(i>=d&&i<=d+h&&r>=u&&r<=u+h)return!0}var c=this.parseReviewItems(t.value);if(c.length>0)for(var f=24,v=4,g=(a.height-(c.length*f+(c.length-1)*v))/2,y=0;y<c.length;y++){var p=g+y*(f+v);if(r>=p&&r<=p+f&&i>=s)return!0}return!1}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n,o,a=e.bounds,s=null!==(n=null===(o=t.style)||void 0===o?void 0:o.padding)&&void 0!==n?n:10,l=!1!==t.canEdit;if(l&&e.isHoverRow){var h=20,d=a.width-s-h,u=(a.height-h)/2;if(i>=d&&i<=d+h&&r>=u&&r<=u+h)return"pointer"}var c=this.parseReviewItems(t.value);if(c.length>0)for(var f=24,v=4,g=(a.height-(c.length*f+(c.length-1)*v))/2,y=0;y<c.length;y++){var p=g+y*(f+v);if(r>=p&&r<=p+f&&i>=s&&c[y].review_id)return"pointer"}return null}},{key:"parseReviewItems",value:function(e){return e&&Array.isArray(e)?e.filter(function(e){return e&&e.name}):[]}},{key:"drawReviewItems",value:function(e,t,i){var r,n,o,a,s=e.ctx,l=e.bounds,h=l.x,d=l.y,u=l.width,c=l.height,f=null!==(r=null===(n=t.style)||void 0===n?void 0:n.padding)&&void 0!==r?r:10,v=null!==(o=null===(a=t.style)||void 0===a?void 0:a.fontSize)&&void 0!==o?o:12,g=16,y=6,p=24,w=4,x=!1!==t.canEdit,m=x?28:0;s.save(),s.font="".concat(v,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif');var b=i.length*p+(i.length-1)*w,k=d+(c-b)/2;b>c&&(k=d+4),s.beginPath(),s.rect(h,d,u,c),s.clip();for(var C=u-2*f-m,S=0;S<i.length;S++){var I=i[S],T=k+S*(p+w);if(T>d+c)break;var A=h+f,R=T+p/2,D=A,E=T+(p-g)/2,P=!!I.review_id;this.drawFileIcon(s,D,E,g,P);var O=A+g+y,M=C-g-y,B=I.review_id?this.nameHoverColor:this.nameColor;s.fillStyle=B,s.textAlign="left",s.textBaseline="middle";var H=this.truncateText(s,I.name,M);s.fillText(H,O,R)}s.restore()}},{key:"drawEmptyText",value:function(e,t){var i,r,n=e.painter,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=null!==(i=null===(r=t.style)||void 0===r?void 0:r.padding)&&void 0!==i?i:10,u=t.placeholder||this.emptyValue;n.drawCellText(u,a,s,l,h,d,{color:"#ababab",align:"left",baseLine:"middle"})}},{key:"drawFileIcon",value:function(e,t,i,r,n){e.save();var o=n?this.reviewIconColor:this.fileIconColor;e.strokeStyle=o,e.fillStyle=o,e.lineWidth=1.2,e.lineCap="round",e.lineJoin="round",n?this.drawReviewIcon(e,t,i,r,o):this.drawDocumentIcon(e,t,i,r,o),e.restore()}},{key:"drawReviewIcon",value:function(e,t,i,r,n){var o=.15*r,a=t+o,s=i+o,l=.55*r,h=.7*r,d=.15*r;e.beginPath(),e.moveTo(a,s),e.lineTo(a+l-d,s),e.lineTo(a+l,s+d),e.lineTo(a+l,s+h),e.lineTo(a,s+h),e.closePath(),e.stroke(),e.beginPath(),e.moveTo(a+l-d,s),e.lineTo(a+l-d,s+d),e.lineTo(a+l,s+d),e.stroke();var u=s+.35*h,c=s+.55*h;e.beginPath(),e.moveTo(a+o,u),e.lineTo(a+l-1.5*o,u),e.moveTo(a+o,c),e.lineTo(a+.6*l,c),e.stroke();var f=t+.72*r,v=i+.72*r,g=.2*r;e.beginPath(),e.arc(f,v,g,0,2*Math.PI),e.fillStyle=n,e.fill(),e.strokeStyle="#fff",e.lineWidth=1.2,e.beginPath(),e.moveTo(f-.4*g,v),e.lineTo(f-.05*g,v+.35*g),e.lineTo(f+.45*g,v-.3*g),e.stroke()}},{key:"drawDocumentIcon",value:function(e,t,i,r,n){var o=.2*r,a=t+o,s=i+.8*o,l=.6*r,h=.7*r,d=.15*r;e.strokeStyle=n,e.beginPath(),e.moveTo(a,s),e.lineTo(a+l-d,s),e.lineTo(a+l,s+d),e.lineTo(a+l,s+h),e.lineTo(a,s+h),e.closePath(),e.stroke(),e.beginPath(),e.moveTo(a+l-d,s),e.lineTo(a+l-d,s+d),e.lineTo(a+l,s+d),e.stroke();var u=a+.5*o,c=a+l-.5*o,f=s+.35*h,v=s+.52*h,g=s+.69*h;e.beginPath(),e.moveTo(u,f),e.lineTo(c,f),e.moveTo(u,v),e.lineTo(c,v),e.moveTo(u,g),e.lineTo(.85*c,g),e.stroke()}},{key:"drawEditButton",value:function(e,t){var i,r,n=e.ctx,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=null!==(i=null===(r=t.style)||void 0===r?void 0:r.padding)&&void 0!==i?i:10,u=20,c=14,f=a+l-d-u,v=s+(h-u)/2;n.save(),n.fillStyle="rgba(0, 0, 0, 0.04)",this.drawRoundedRect(n,f,v,u,u,3,"rgba(0, 0, 0, 0.04)");var g=f+(u-c)/2,y=v+(u-c)/2;this.drawPencilIcon(n,g,y,c,this.editIconColor),n.restore()}},{key:"drawPencilIcon",value:function(e,t,i,r,n){e.save(),e.strokeStyle=n,e.lineWidth=1.2,e.lineCap="round",e.lineJoin="round";var o=t+.2*r,a=i+.8*r,s=t+.8*r,l=i+.2*r,h=.1*r;e.beginPath(),e.moveTo(o,a),e.lineTo(s-h,l-h),e.lineTo(s+h,l+h),e.lineTo(o+2*h,a-2*h),e.closePath(),e.stroke(),e.beginPath(),e.moveTo(o,a),e.lineTo(o-.05*r,a+.05*r),e.stroke(),e.restore()}},{key:"drawErrorIndicator",value:function(e){var t=e.ctx,i=e.bounds,r=i.x,n=i.y,o=i.width,a=6;t.save(),t.fillStyle="#ff4d4f",t.beginPath(),t.moveTo(r+o-a,n),t.lineTo(r+o,n),t.lineTo(r+o,n+a),t.closePath(),t.fill(),t.restore()}},{key:"drawStrikethrough",value:function(e,t,i){var r,n;if(0!==i.length){var o=e.ctx,a=e.bounds,s=a.x,l=a.y,h=a.width,d=a.height,u=null!==(r=null===(n=t.style)||void 0===n?void 0:n.padding)&&void 0!==r?r:10;o.save(),o.strokeStyle="#999",o.lineWidth=1,o.beginPath(),o.moveTo(s+u,l+d/2),o.lineTo(s+h-u,l+d/2),o.stroke(),o.restore()}}},{key:"drawRoundedRect",value:function(e,t,i,r,n,o,a){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.fillStyle=a,e.fill()}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),Fl=Hl,Ll=10,Wl=10,zl=30,Nl=20,Vl=14,_l=12,jl="#333",Yl="#bbb";function Gl(e){if(!e)return A;var t=e.replace(/<[^>]*>/g,"");if(!t){if(e.includes("<img"))return"[图片]";if(e.includes("<video"))return"[视频]"}return t||A}var Xl=function(){function e(){wt(this,e),B(this,"type","rich-text")}return mt(e,[{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height,l=t.canEdit,h=void 0!==l&&l,d=t.showLineThrow,u=void 0!==d&&d,c=t.error,f=t.isLink,v=void 0!==f&&f,g=Gl(t.value),y=g===A;i.save();var p=h?zl:0,w=v?Nl:0,x=a-p-w;if(v&&this.drawLinkIcon(i,n+x,o,Nl,s),this.drawText(i,g,y,n,o,x,s,t),h&&this.drawEditButton(i,n+a-zl,o,zl,s,e.isHoverCell),u&&this.drawStrikethrough(i,n,o,x,s),c){var m=n+a-(h?zl+_l+4:_l+4);this.drawErrorIcon(i,m,o+4)}i.restore()}},{key:"onClick",value:function(e,t,i,r){var n=e.bounds.width,o=t.canEdit,a=void 0!==o&&o,s=t.isLink,l=void 0!==s&&s;if(a){var h=n-zl;if(i>=h&&i<=n)return!0}if(l){var d=a?zl:0,u=Nl,c=n-d-u;if(i>=c&&i<=c+u)return!0}var f=a?zl:0,v=l?Nl:0,g=n-f-v;return i>=Ll&&i<=g-Wl}},{key:"getInteractiveCursor",value:function(e,t,i,r){if(e.readonly)return null;var n=e.bounds.width,o=t.canEdit,a=void 0!==o&&o,s=t.isLink,l=void 0!==s&&s;if(a){var h=n-zl;if(i>=h&&i<=n)return"pointer"}if(l){var d=a?zl:0,u=Nl,c=n-d-u;if(i>=c&&i<=c+u)return"pointer"}return null}},{key:"drawText",value:function(e,t,i,r,n,o,a,s){e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textBaseline="middle",e.textAlign="left";var l=r+Ll,h=n+a/2,d=o-Ll-Wl;if(i){var u=s.placeholder||A;e.fillStyle=Yl,e.fillText(u,l,h)}else{var c,f;e.fillStyle=null!==(c=null===(f=s.style)||void 0===f?void 0:f.color)&&void 0!==c?c:jl;var v=this.truncateText(e,t,d);e.fillText(v,l,h)}}},{key:"drawEditButton",value:function(e,t,i,r,n,o){if(o){var a=t+r/2,s=i+n/2;this.drawEditIcon(e,a-Vl/2,s-Vl/2,Vl,"#8c8c8c")}}},{key:"drawEditIcon",value:function(e,t,i,r,n){e.save(),e.strokeStyle=n,e.fillStyle=n,e.lineWidth=1.2,e.lineCap="round",e.lineJoin="round";var o=2,a=t+o,s=i+r-o,l=t+r-o,h=i+o;e.beginPath(),e.moveTo(a+2,s-2),e.lineTo(l-1,h+1),e.stroke(),e.beginPath(),e.moveTo(a,s),e.lineTo(a+3,s-1),e.lineTo(a+1,s-3),e.closePath(),e.fill(),e.restore()}},{key:"drawLinkIcon",value:function(e,t,i,r,n){var o=t+r/2,a=i+n/2,s=12;e.save(),e.strokeStyle="#8c8c8c",e.lineWidth=1.5,e.lineCap="round",e.lineJoin="round";var l=s/2,h=2;e.beginPath(),e.moveTo(o-h,a),e.lineTo(o-h,a-l+2),e.quadraticCurveTo(o-h,a-l,o-h+2,a-l),e.lineTo(o+h-2,a-l),e.quadraticCurveTo(o+h,a-l,o+h,a-l+2),e.lineTo(o+h,a),e.stroke(),e.beginPath(),e.moveTo(o-h,a),e.lineTo(o-h,a+l-2),e.quadraticCurveTo(o-h,a+l,o-h+2,a+l),e.lineTo(o+h-2,a+l),e.quadraticCurveTo(o+h,a+l,o+h,a+l-2),e.lineTo(o+h,a),e.stroke(),e.restore()}},{key:"drawStrikethrough",value:function(e,t,i,r,n){e.save(),e.strokeStyle="#999",e.lineWidth=1,e.beginPath(),e.moveTo(t+4,i+n/2),e.lineTo(t+r-4,i+n/2),e.stroke(),e.restore()}},{key:"drawErrorIcon",value:function(e,t,i){var r=_l,n=t+r/2;e.save(),e.fillStyle="#ff4d4f",e.beginPath(),e.moveTo(n,i),e.lineTo(t+r,i+r),e.lineTo(t,i+r),e.closePath(),e.fill(),e.fillStyle="#fff",e.font='bold 8px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textAlign="center",e.textBaseline="middle",e.fillText("!",n,i+.65*r),e.restore()}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),Ul=Xl;function ql(){var e=li();e.register("text",new wn),e.register("number",new wn),e.register("select",new mn),e.register("image",new kn),e.register("person",new Sn),e.register("progress",new Tn),e.register("datetime",new Rn),e.register("date",new Rn),e.register("time",new Rn),e.register("month",new Rn),e.register("boolean",new En),e.register("checkbox",new En),e.register("status",new On),e.register("group-header",new Bn),e.register("separator-row",new Fn),e.register("nested",new Wn),e.register("tree-dropdown",new Nn),e.register("punch",new eo),e.register("hyperlink",new fo),e.register("file",new Bo),e.register("task-node",new na),e.register("wf-state",new Ca),e.register("workflow",new Oa),e.register("file-storage-spec",new Va),e.register("pivot",new $a),e.register("module",new us),e.register("text-with-switcher",new Rs),e.register("upstream",new Qs),e.register("punch-timing",new il),e.register("table-action-button",new xl),e.register("priority-text",new Cl),e.register("status-text",new Al),e.register("theme",new El),e.register("itfs-path",new Bl),e.register("deliverable-review",new Fl),e.register("rich-text",new Ul),e.setDefaultViewerType("text")}var Kl={text:wn,number:wn,select:mn,image:kn,person:Sn,progress:Tn,datetime:Rn,date:Rn,time:Rn,month:Rn,boolean:En,checkbox:En,status:On,"group-header":Bn,"separator-row":Fn,nested:Wn,"tree-dropdown":Nn,punch:eo,hyperlink:fo,file:Bo,"task-node":na,"wf-state":Ca,workflow:Oa,"file-storage-spec":Va,pivot:$a,module:us,"text-with-switcher":Rs,upstream:Qs,"punch-timing":il,"table-action-button":xl,"priority-text":Cl,"status-text":Al,theme:El,"itfs-path":Bl,"deliverable-review":Fl,"rich-text":Ul}}(),module.exports=r})();
1
+ (function(){var e={34:function(e,t,i){"use strict";var r=i(4901);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},81:function(e,t,i){"use strict";var r=i(9565),n=i(9306),o=i(8551),a=i(6823),s=i(851),l=TypeError;e.exports=function(e,t){var i=arguments.length<2?s(e):t;if(n(i))return o(r(i,e));throw new l(a(e)+" is not iterable")}},113:function(e,t,i){"use strict";var r=i(6518),n=i(9213).find,o=i(6469),a="find",s=!0;a in[]&&Array(1)[a](function(){s=!1}),r({target:"Array",proto:!0,forced:s},{find:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}}),o(a)},116:function(e,t,i){"use strict";var r=i(6518),n=i(9565),o=i(2652),a=i(9306),s=i(8551),l=i(1767),h=i(9539),d=i(4549),u=d("find",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:u},{find:function(e){s(this);try{a(e)}catch(r){h(this,"throw",r)}if(u)return n(u,this,e);var t=l(this),i=0;return o(t,function(t,r){if(e(t,i++))return r(t)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})},235:function(e,t,i){"use strict";var r=i(9213).forEach,n=i(4598),o=n("forEach");e.exports=o?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},280:function(e,t,i){"use strict";var r=i(6518),n=i(7751),o=i(6395),a=i(550),s=i(916).CONSTRUCTOR,l=i(3438),h=n("Promise"),d=o&&!s;r({target:"Promise",stat:!0,forced:o||s},{resolve:function(e){return l(d&&this===h?a:this,e)}})},283:function(e,t,i){"use strict";var r=i(9504),n=i(9039),o=i(4901),a=i(9297),s=i(3724),l=i(350).CONFIGURABLE,h=i(3706),d=i(1181),u=d.enforce,c=d.get,f=String,v=Object.defineProperty,g=r("".slice),y=r("".replace),p=r([].join),w=s&&!n(function(){return 8!==v(function(){},"length",{value:8}).length}),x=String(String).split("String"),m=e.exports=function(e,t,i){"Symbol("===g(f(t),0,7)&&(t="["+y(f(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!a(e,"name")||l&&e.name!==t)&&(s?v(e,"name",{value:t,configurable:!0}):e.name=t),w&&i&&a(i,"arity")&&e.length!==i.arity&&v(e,"length",{value:i.arity});try{i&&a(i,"constructor")&&i.constructor?s&&v(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(n){}var r=u(e);return a(r,"source")||(r.source=p(x,"string"==typeof t?t:"")),e};Function.prototype.toString=m(function(){return o(this)&&c(this).source||h(this)},"toString")},287:function(e,t,i){"use strict";var r=i(6518),n=i(2967);r({target:"Object",stat:!0},{setPrototypeOf:n})},298:function(e,t,i){"use strict";var r=i(2195),n=i(5397),o=i(8480).f,a=i(7680),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],l=function(e){try{return o(e)}catch(t){return a(s)}};e.exports.f=function(e){return s&&"Window"===r(e)?l(e):o(n(e))}},350:function(e,t,i){"use strict";var r=i(3724),n=i(9297),o=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=n(o,"name"),l=s&&"something"===function(){}.name,h=s&&(!r||r&&a(o,"name").configurable);e.exports={EXISTS:s,PROPER:l,CONFIGURABLE:h}},397:function(e,t,i){"use strict";var r=i(7751);e.exports=r("document","documentElement")},421:function(e){"use strict";e.exports={}},436:function(e,t,i){"use strict";var r,n,o,a,s=i(6518),l=i(6395),h=i(8574),d=i(4576),u=i(9167),c=i(9565),f=i(6840),v=i(2967),g=i(687),y=i(7633),p=i(9306),w=i(4901),x=i(34),m=i(679),b=i(2293),k=i(9225).set,C=i(1955),S=i(3138),I=i(1103),T=i(8265),A=i(1181),R=i(550),D=i(916),E=i(6043),P="Promise",O=D.CONSTRUCTOR,M=D.REJECTION_EVENT,B=D.SUBCLASSING,H=A.getterFor(P),F=A.set,L=R&&R.prototype,W=R,z=L,N=d.TypeError,V=d.document,_=d.process,j=E.f,Y=j,G=!!(V&&V.createEvent&&d.dispatchEvent),X="unhandledrejection",U="rejectionhandled",q=0,K=1,J=2,Q=1,Z=2,$=function(e){var t;return!(!x(e)||!w(t=e.then))&&t},ee=function(e,t){var i,r,n,o=t.value,a=t.state===K,s=a?e.ok:e.fail,l=e.resolve,h=e.reject,d=e.domain;try{s?(a||(t.rejection===Z&&oe(t),t.rejection=Q),!0===s?i=o:(d&&d.enter(),i=s(o),d&&(d.exit(),n=!0)),i===e.promise?h(new N("Promise-chain cycle")):(r=$(i))?c(r,i,l,h):l(i)):h(o)}catch(u){d&&!n&&d.exit(),h(u)}},te=function(e,t){e.notified||(e.notified=!0,C(function(){var i,r=e.reactions;while(i=r.get())ee(i,e);e.notified=!1,t&&!e.rejection&&re(e)}))},ie=function(e,t,i){var r,n;G?(r=V.createEvent("Event"),r.promise=t,r.reason=i,r.initEvent(e,!1,!0),d.dispatchEvent(r)):r={promise:t,reason:i},!M&&(n=d["on"+e])?n(r):e===X&&S("Unhandled promise rejection",i)},re=function(e){c(k,d,function(){var t,i=e.facade,r=e.value,n=ne(e);if(n&&(t=I(function(){h?_.emit("unhandledRejection",r,i):ie(X,i,r)}),e.rejection=h||ne(e)?Z:Q,t.error))throw t.value})},ne=function(e){return e.rejection!==Q&&!e.parent},oe=function(e){c(k,d,function(){var t=e.facade;h?_.emit("rejectionHandled",t):ie(U,t,e.value)})},ae=function(e,t,i){return function(r){e(t,r,i)}},se=function(e,t,i){e.done||(e.done=!0,i&&(e=i),e.value=t,e.state=J,te(e,!0))},le=function(e,t,i){if(!e.done){e.done=!0,i&&(e=i);try{if(e.facade===t)throw new N("Promise can't be resolved itself");var r=$(t);r?C(function(){var i={done:!1};try{c(r,t,ae(le,i,e),ae(se,i,e))}catch(n){se(i,n,e)}}):(e.value=t,e.state=K,te(e,!1))}catch(n){se({done:!1},n,e)}}};if(O&&(W=function(e){m(this,z),p(e),c(r,this);var t=H(this);try{e(ae(le,t),ae(se,t))}catch(i){se(t,i)}},z=W.prototype,r=function(e){F(this,{type:P,done:!1,notified:!1,parent:!1,reactions:new T,rejection:!1,state:q,value:null})},r.prototype=f(z,"then",function(e,t){var i=H(this),r=j(b(this,W));return i.parent=!0,r.ok=!w(e)||e,r.fail=w(t)&&t,r.domain=h?_.domain:void 0,i.state===q?i.reactions.add(r):C(function(){ee(r,i)}),r.promise}),n=function(){var e=new r,t=H(e);this.promise=e,this.resolve=ae(le,t),this.reject=ae(se,t)},E.f=j=function(e){return e===W||e===o?new n(e):Y(e)},!l&&w(R)&&L!==Object.prototype)){a=L.then,B||f(L,"then",function(e,t){var i=this;return new W(function(e,t){c(a,i,e,t)}).then(e,t)},{unsafe:!0});try{delete L.constructor}catch(he){}v&&v(L,z)}s({global:!0,constructor:!0,wrap:!0,forced:O},{Promise:W}),o=u.Promise,g(W,P,!1,!0),y(P)},507:function(e,t,i){"use strict";var r=i(9565);e.exports=function(e,t,i){var n,o,a=i?e:e.iterator,s=e.next;while(!(n=r(s,a)).done)if(o=t(n.value),void 0!==o)return o}},511:function(e,t,i){"use strict";var r=i(788),n=TypeError;e.exports=function(e){if(r(e))throw new n("The method doesn't accept regular expressions");return e}},533:function(e,t,i){"use strict";var r=i(9504),n=i(8014),o=i(655),a=i(2333),s=i(7750),l=r(a),h=r("".slice),d=Math.ceil,u=function(e){return function(t,i,r){var a,u,c=o(s(t)),f=n(i),v=c.length,g=void 0===r?" ":o(r);return f<=v||""===g?c:(a=f-v,u=l(g,d(a/g.length)),u.length>a&&(u=h(u,0,a)),e?c+u:u+c)}};e.exports={start:u(!1),end:u(!0)}},537:function(e,t,i){"use strict";var r=i(550),n=i(4428),o=i(916).CONSTRUCTOR;e.exports=o||!n(function(e){r.all(e).then(void 0,function(){})})},550:function(e,t,i){"use strict";var r=i(4576);e.exports=r.Promise},566:function(e,t,i){"use strict";var r=i(9504),n=i(9306),o=i(34),a=i(9297),s=i(7680),l=i(616),h=Function,d=r([].concat),u=r([].join),c={},f=function(e,t,i){if(!a(c,t)){for(var r=[],n=0;n<t;n++)r[n]="a["+n+"]";c[t]=h("C,a","return new C("+u(r,",")+")")}return c[t](e,i)};e.exports=l?h.bind:function(e){var t=n(this),i=t.prototype,r=s(arguments,1),a=function(){var i=d(r,s(arguments));return this instanceof a?f(t,i.length,i):t.apply(e,i)};return o(i)&&(a.prototype=i),a}},597:function(e,t,i){"use strict";var r=i(9039),n=i(8227),o=i(9519),a=n("species");e.exports=function(e){return o>=51||!r(function(){var t=[],i=t.constructor={};return i[a]=function(){return{foo:1}},1!==t[e](Boolean).foo})}},616:function(e,t,i){"use strict";var r=i(9039);e.exports=!r(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},655:function(e,t,i){"use strict";var r=i(6955),n=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return n(e)}},679:function(e,t,i){"use strict";var r=i(1625),n=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw new n("Incorrect invocation")}},684:function(e){"use strict";e.exports=function(e,t){var i="function"==typeof Iterator&&Iterator.prototype[e];if(i)try{i.call({next:null},t).next()}catch(r){return!0}}},687:function(e,t,i){"use strict";var r=i(4913).f,n=i(9297),o=i(8227),a=o("toStringTag");e.exports=function(e,t,i){e&&!i&&(e=e.prototype),e&&!n(e,a)&&r(e,a,{configurable:!0,value:t})}},706:function(e,t,i){"use strict";var r=i(350).PROPER,n=i(9039),o=i(7452),a="​…᠎";e.exports=function(e){return n(function(){return!!o[e]()||a[e]()!==a||r&&o[e].name!==e})}},741:function(e){"use strict";var t=Math.ceil,i=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?i:t)(r)}},744:function(e,t,i){"use strict";var r=i(9565),n=i(9504),o=i(9228),a=i(8551),s=i(34),l=i(7750),h=i(2293),d=i(7829),u=i(8014),c=i(655),f=i(5966),v=i(6682),g=i(8429),y=i(9039),p=g.UNSUPPORTED_Y,w=4294967295,x=Math.min,m=n([].push),b=n("".slice),k=!y(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var i="ab".split(e);return 2!==i.length||"a"!==i[0]||"b"!==i[1]}),C="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;o("split",function(e,t,i){var n="0".split(void 0,0).length?function(e,i){return void 0===e&&0===i?[]:r(t,this,e,i)}:t;return[function(t,i){var o=l(this),a=s(t)?f(t,e):void 0;return a?r(a,t,o,i):r(n,c(o),t,i)},function(e,r){var o=a(this),s=c(e);if(!C){var l=i(n,o,s,r,n!==t);if(l.done)return l.value}var f=h(o,RegExp),g=o.unicode,y=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(p?"g":"y"),k=new f(p?"^(?:"+o.source+")":o,y),S=void 0===r?w:r>>>0;if(0===S)return[];if(0===s.length)return null===v(k,s)?[s]:[];var I=0,T=0,A=[];while(T<s.length){k.lastIndex=p?0:T;var R,D=v(k,p?b(s,T):s);if(null===D||(R=x(u(k.lastIndex+(p?T:0)),s.length))===I)T=d(s,T,g);else{if(m(A,b(s,I,T)),A.length===S)return A;for(var E=1;E<=D.length-1;E++)if(m(A,D[E]),A.length===S)return A;T=I=R}}return m(A,b(s,I)),A}]},C||!k,p)},747:function(e,t,i){"use strict";var r=i(6699),n=i(6193),o=i(6249),a=Error.captureStackTrace;e.exports=function(e,t,i,s){o&&(a?a(e,t):r(e,"stack",n(i,s)))}},757:function(e,t,i){"use strict";var r=i(7751),n=i(4901),o=i(1625),a=i(7040),s=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return n(t)&&o(t.prototype,s(e))}},788:function(e,t,i){"use strict";var r=i(34),n=i(2195),o=i(8227),a=o("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[a])?!!t:"RegExp"===n(e))}},825:function(e,t,i){"use strict";var r=i(6518),n=i(7751),o=i(8745),a=i(566),s=i(5548),l=i(8551),h=i(34),d=i(2360),u=i(9039),c=n("Reflect","construct"),f=Object.prototype,v=[].push,g=u(function(){function e(){}return!(c(function(){},[],e)instanceof e)}),y=!u(function(){c(function(){})}),p=g||y;r({target:"Reflect",stat:!0,forced:p,sham:p},{construct:function(e,t){s(e),l(t);var i=arguments.length<3?e:s(arguments[2]);if(y&&!g)return c(e,t,i);if(e===i){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return o(v,r,t),new(o(a,e,r))}var n=i.prototype,u=d(h(n)?n:f),p=o(e,u,t);return h(p)?p:u}})},851:function(e,t,i){"use strict";var r=i(6955),n=i(5966),o=i(4117),a=i(6269),s=i(8227),l=s("iterator");e.exports=function(e){if(!o(e))return n(e,l)||n(e,"@@iterator")||a[r(e)]}},875:function(e,t,i){"use strict";var r=i(6518),n=i(9039),o=i(8981),a=i(2787),s=i(2211),l=n(function(){a(1)});r({target:"Object",stat:!0,forced:l,sham:!s},{getPrototypeOf:function(e){return a(o(e))}})},906:function(e,t,i){"use strict";i(7495);var r=i(6518),n=i(9565),o=i(4901),a=i(8551),s=i(655),l=function(){var e=!1,t=/[ac]/;return t.exec=function(){return e=!0,/./.exec.apply(this,arguments)},!0===t.test("abc")&&e}(),h=/./.test;r({target:"RegExp",proto:!0,forced:!l},{test:function(e){var t=a(this),i=s(e),r=t.exec;if(!o(r))return n(h,t,i);var l=n(r,t,i);return null!==l&&(a(l),!0)}})},916:function(e,t,i){"use strict";var r=i(4576),n=i(550),o=i(4901),a=i(2796),s=i(3706),l=i(8227),h=i(4215),d=i(6395),u=i(9519),c=n&&n.prototype,f=l("species"),v=!1,g=o(r.PromiseRejectionEvent),y=a("Promise",function(){var e=s(n),t=e!==String(n);if(!t&&66===u)return!0;if(d&&(!c["catch"]||!c["finally"]))return!0;if(!u||u<51||!/native code/.test(e)){var i=new n(function(e){e(1)}),r=function(e){e(function(){},function(){})},o=i.constructor={};if(o[f]=r,v=i.then(function(){})instanceof r,!v)return!0}return!t&&("BROWSER"===h||"DENO"===h)&&!g});e.exports={CONSTRUCTOR:y,REJECTION_EVENT:g,SUBCLASSING:v}},1034:function(e,t,i){"use strict";var r=i(9565),n=i(9297),o=i(1625),a=i(5213),s=i(7979),l=RegExp.prototype;e.exports=a.correct?function(e){return e.flags}:function(e){return a.correct||!o(l,e)||n(e,"flags")?e.flags:r(s,e)}},1056:function(e,t,i){"use strict";var r=i(4913).f;e.exports=function(e,t,i){i in e||r(e,i,{configurable:!0,get:function(){return t[i]},set:function(e){t[i]=e}})}},1072:function(e,t,i){"use strict";var r=i(1828),n=i(8727);e.exports=Object.keys||function(e){return r(e,n)}},1088:function(e,t,i){"use strict";var r=i(6518),n=i(9565),o=i(6395),a=i(350),s=i(4901),l=i(3994),h=i(2787),d=i(2967),u=i(687),c=i(6699),f=i(6840),v=i(8227),g=i(6269),y=i(7657),p=a.PROPER,w=a.CONFIGURABLE,x=y.IteratorPrototype,m=y.BUGGY_SAFARI_ITERATORS,b=v("iterator"),k="keys",C="values",S="entries",I=function(){return this};e.exports=function(e,t,i,a,v,y,T){l(i,t,a);var A,R,D,E=function(e){if(e===v&&H)return H;if(!m&&e&&e in M)return M[e];switch(e){case k:return function(){return new i(this,e)};case C:return function(){return new i(this,e)};case S:return function(){return new i(this,e)}}return function(){return new i(this)}},P=t+" Iterator",O=!1,M=e.prototype,B=M[b]||M["@@iterator"]||v&&M[v],H=!m&&B||E(v),F="Array"===t&&M.entries||B;if(F&&(A=h(F.call(new e)),A!==Object.prototype&&A.next&&(o||h(A)===x||(d?d(A,x):s(A[b])||f(A,b,I)),u(A,P,!0,!0),o&&(g[P]=I))),p&&v===C&&B&&B.name!==C&&(!o&&w?c(M,"name",C):(O=!0,H=function(){return n(B,this)})),v)if(R={values:E(C),keys:y?H:E(k),entries:E(S)},T)for(D in R)(m||O||!(D in M))&&f(M,D,R[D]);else r({target:t,proto:!0,forced:m||O},R);return o&&!T||M[b]===H||f(M,b,H,{name:v}),g[t]=H,R}},1103:function(e){"use strict";e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},1148:function(e,t,i){"use strict";var r=i(6518),n=i(9565),o=i(2652),a=i(9306),s=i(8551),l=i(1767),h=i(9539),d=i(4549),u=d("every",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:u},{every:function(e){s(this);try{a(e)}catch(r){h(this,"throw",r)}if(u)return n(u,this,e);var t=l(this),i=0;return!o(t,function(t,r){if(!e(t,i++))return r()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},1181:function(e,t,i){"use strict";var r,n,o,a=i(8622),s=i(4576),l=i(34),h=i(6699),d=i(9297),u=i(7629),c=i(6119),f=i(421),v="Object already initialized",g=s.TypeError,y=s.WeakMap,p=function(e){return o(e)?n(e):r(e,{})},w=function(e){return function(t){var i;if(!l(t)||(i=n(t)).type!==e)throw new g("Incompatible receiver, "+e+" required");return i}};if(a||u.state){var x=u.state||(u.state=new y);x.get=x.get,x.has=x.has,x.set=x.set,r=function(e,t){if(x.has(e))throw new g(v);return t.facade=e,x.set(e,t),t},n=function(e){return x.get(e)||{}},o=function(e){return x.has(e)}}else{var m=c("state");f[m]=!0,r=function(e,t){if(d(e,m))throw new g(v);return t.facade=e,h(e,m,t),t},n=function(e){return d(e,m)?e[m]:{}},o=function(e){return d(e,m)}}e.exports={set:r,get:n,has:o,enforce:p,getterFor:w}},1240:function(e,t,i){"use strict";var r=i(9504);e.exports=r(1.1.valueOf)},1278:function(e,t,i){"use strict";var r=i(6518),n=i(3724),o=i(5031),a=i(5397),s=i(7347),l=i(4659);r({target:"Object",stat:!0,sham:!n},{getOwnPropertyDescriptors:function(e){var t,i,r=a(e),n=s.f,h=o(r),d={},u=0;while(h.length>u)i=n(r,t=h[u++]),void 0!==i&&l(d,t,i);return d}})},1291:function(e,t,i){"use strict";var r=i(741);e.exports=function(e){var t=+e;return t!==t||0===t?0:r(t)}},1296:function(e,t,i){"use strict";var r=i(4495);e.exports=r&&!!Symbol["for"]&&!!Symbol.keyFor},1385:function(e,t,i){"use strict";var r=i(9539);e.exports=function(e,t,i){for(var n=e.length-1;n>=0;n--)if(void 0!==e[n])try{i=r(e[n].iterator,t,i)}catch(o){t="throw",i=o}if("throw"===t)throw i;return i}},1415:function(e,t,i){"use strict";i(2405)},1436:function(e,t,i){"use strict";var r=i(8227),n=r("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(i){try{return t[n]=!1,"/./"[e](t)}catch(r){}}return!1}},1469:function(e,t,i){"use strict";var r=i(7433);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},1481:function(e,t,i){"use strict";var r=i(6518),n=i(6043),o=i(916).CONSTRUCTOR;r({target:"Promise",stat:!0,forced:o},{reject:function(e){var t=n.f(this),i=t.reject;return i(e),t.promise}})},1510:function(e,t,i){"use strict";var r=i(6518),n=i(7751),o=i(9297),a=i(655),s=i(5745),l=i(1296),h=s("string-to-symbol-registry"),d=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!l},{for:function(e){var t=a(e);if(o(h,t))return h[t];var i=n("Symbol")(t);return h[t]=i,d[i]=t,i}})},1625:function(e,t,i){"use strict";var r=i(9504);e.exports=r({}.isPrototypeOf)},1698:function(e,t,i){"use strict";var r=i(6518),n=i(4204),o=i(9835),a=i(4916),s=!a("union")||!o("union");r({target:"Set",proto:!0,real:!0,forced:s},{union:n})},1699:function(e,t,i){"use strict";var r=i(6518),n=i(9504),o=i(511),a=i(7750),s=i(655),l=i(1436),h=n("".indexOf);r({target:"String",proto:!0,forced:!l("includes")},{includes:function(e){return!!~h(s(a(this)),s(o(e)),arguments.length>1?arguments[1]:void 0)}})},1701:function(e,t,i){"use strict";var r=i(6518),n=i(9565),o=i(9306),a=i(8551),s=i(1767),l=i(9462),h=i(6319),d=i(9539),u=i(684),c=i(4549),f=i(6395),v=!f&&!u("map",function(){}),g=!f&&!v&&c("map",TypeError),y=f||v||g,p=l(function(){var e=this.iterator,t=a(n(this.next,e)),i=this.done=!!t.done;if(!i)return h(e,this.mapper,[t.value,this.counter++],!0)});r({target:"Iterator",proto:!0,real:!0,forced:y},{map:function(e){a(this);try{o(e)}catch(t){d(this,"throw",t)}return g?n(g,this,e):new p(s(this),{mapper:e})}})},1761:function(e,t,i){"use strict";var r=i(9565),n=i(9504),o=i(9228),a=i(8551),s=i(34),l=i(8014),h=i(655),d=i(7750),u=i(5966),c=i(7829),f=i(1034),v=i(6682),g=n("".indexOf);o("match",function(e,t,i){return[function(t){var i=d(this),n=s(t)?u(t,e):void 0;return n?r(n,t,i):new RegExp(t)[e](h(i))},function(e){var r=a(this),n=h(e),o=i(t,r,n);if(o.done)return o.value;var s=h(f(r));if(-1===g(s,"g"))return v(r,n);var d=-1!==g(s,"u");r.lastIndex=0;var u,y=[],p=0;while(null!==(u=v(r,n))){var w=h(u[0]);y[p]=w,""===w&&(r.lastIndex=c(n,l(r.lastIndex),d)),p++}return 0===p?null:y}]})},1767:function(e){"use strict";e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},1828:function(e,t,i){"use strict";var r=i(9504),n=i(9297),o=i(5397),a=i(9617).indexOf,s=i(421),l=r([].push);e.exports=function(e,t){var i,r=o(e),h=0,d=[];for(i in r)!n(s,i)&&n(r,i)&&l(d,i);while(t.length>h)n(r,i=t[h++])&&(~a(d,i)||l(d,i));return d}},1951:function(e,t,i){"use strict";var r=i(8227);t.f=r},1955:function(e,t,i){"use strict";var r,n,o,a,s,l=i(4576),h=i(3389),d=i(6080),u=i(9225).set,c=i(8265),f=i(9544),v=i(4265),g=i(7860),y=i(8574),p=l.MutationObserver||l.WebKitMutationObserver,w=l.document,x=l.process,m=l.Promise,b=h("queueMicrotask");if(!b){var k=new c,C=function(){var e,t;y&&(e=x.domain)&&e.exit();while(t=k.get())try{t()}catch(i){throw k.head&&r(),i}e&&e.enter()};f||y||g||!p||!w?!v&&m&&m.resolve?(a=m.resolve(void 0),a.constructor=m,s=d(a.then,a),r=function(){s(C)}):y?r=function(){x.nextTick(C)}:(u=d(u,l),r=function(){u(C)}):(n=!0,o=w.createTextNode(""),new p(C).observe(o,{characterData:!0}),r=function(){o.data=n=!n}),b=function(e){k.head||r(),k.add(e)}}e.exports=b},2003:function(e,t,i){"use strict";var r=i(6518),n=i(6395),o=i(916).CONSTRUCTOR,a=i(550),s=i(7751),l=i(4901),h=i(6840),d=a&&a.prototype;if(r({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(e){return this.then(void 0,e)}}),!n&&l(a)){var u=s("Promise").prototype["catch"];d["catch"]!==u&&h(d,"catch",u,{unsafe:!0})}},2008:function(e,t,i){"use strict";var r=i(6518),n=i(9213).filter,o=i(597),a=o("filter");r({target:"Array",proto:!0,forced:!a},{filter:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}})},2010:function(e,t,i){"use strict";var r=i(3724),n=i(350).EXISTS,o=i(9504),a=i(2106),s=Function.prototype,l=o(s.toString),h=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,d=o(h.exec),u="name";r&&!n&&a(s,u,{configurable:!0,get:function(){try{return d(h,l(this))[1]}catch(e){return""}}})},2062:function(e,t,i){"use strict";var r=i(6518),n=i(9213).map,o=i(597),a=o("map");r({target:"Array",proto:!0,forced:!a},{map:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}})},2106:function(e,t,i){"use strict";var r=i(283),n=i(4913);e.exports=function(e,t,i){return i.get&&r(i.get,t,{getter:!0}),i.set&&r(i.set,t,{setter:!0}),n.f(e,t,i)}},2140:function(e,t,i){"use strict";var r=i(8227),n=r("toStringTag"),o={};o[n]="z",e.exports="[object z]"===String(o)},2195:function(e,t,i){"use strict";var r=i(9504),n=r({}.toString),o=r("".slice);e.exports=function(e){return o(n(e),8,-1)}},2211:function(e,t,i){"use strict";var r=i(9039);e.exports=!r(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},2259:function(e,t,i){"use strict";var r=i(5749);r("iterator")},2293:function(e,t,i){"use strict";var r=i(8551),n=i(5548),o=i(4117),a=i(8227),s=a("species");e.exports=function(e,t){var i,a=r(e).constructor;return void 0===a||o(i=r(a)[s])?t:n(i)}},2333:function(e,t,i){"use strict";var r=i(1291),n=i(655),o=i(7750),a=RangeError;e.exports=function(e){var t=n(o(this)),i="",s=r(e);if(s<0||s===1/0)throw new a("Wrong number of repetitions");for(;s>0;(s>>>=1)&&(t+=t))1&s&&(i+=t);return i}},2357:function(e,t,i){"use strict";var r=i(3724),n=i(9039),o=i(9504),a=i(2787),s=i(1072),l=i(5397),h=i(8773).f,d=o(h),u=o([].push),c=r&&n(function(){var e=Object.create(null);return e[2]=2,!d(e,2)}),f=function(e){return function(t){var i,n=l(t),o=s(n),h=c&&null===a(n),f=o.length,v=0,g=[];while(f>v)i=o[v++],r&&!(h?i in n:d(n,i))||u(g,e?[i,n[i]]:n[i]);return g}};e.exports={entries:f(!0),values:f(!1)}},2360:function(e,t,i){"use strict";var r,n=i(8551),o=i(6801),a=i(8727),s=i(421),l=i(397),h=i(4055),d=i(6119),u=">",c="<",f="prototype",v="script",g=d("IE_PROTO"),y=function(){},p=function(e){return c+v+u+e+c+"/"+v+u},w=function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t},x=function(){var e,t=h("iframe"),i="java"+v+":";return t.style.display="none",l.appendChild(t),t.src=String(i),e=t.contentWindow.document,e.open(),e.write(p("document.F=Object")),e.close(),e.F},m=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}m="undefined"!=typeof document?document.domain&&r?w(r):x():w(r);var e=a.length;while(e--)delete m[f][a[e]];return m()};s[g]=!0,e.exports=Object.create||function(e,t){var i;return null!==e?(y[f]=n(e),i=new y,y[f]=null,i[g]=e):i=m(),void 0===t?i:o.f(i,t)}},2393:function(e,t,i){"use strict";t.Ud=t.O5=void 0;var r=l(i(8841)),n=i(5208),o=i(2515),a=i(3253),s=i(5270);function l(e){return e&&e.__esModule?e:{default:e}}var h=function(e){var t=new Uint8Array(e);return(0,n.parse)((0,o.buildStream)(t),r["default"])};t.O5=h;var d=function(e){for(var t=e.pixels.length,i=new Uint8ClampedArray(4*t),r=0;r<t;r++){var n=4*r,o=e.pixels[r],a=e.colorTable[o]||[0,0,0];i[n]=a[0],i[n+1]=a[1],i[n+2]=a[2],i[n+3]=o!==e.transparentIndex?255:0}return i},u=function(e,t,i){if(e.image){var r=e.image,n=r.descriptor.width*r.descriptor.height,o=(0,s.lzw)(r.data.minCodeSize,r.data.blocks,n);r.descriptor.lct.interlaced&&(o=(0,a.deinterlace)(o,r.descriptor.width));var l={pixels:o,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return r.descriptor.lct&&r.descriptor.lct.exists?l.colorTable=r.lct:l.colorTable=t,e.gce&&(l.delay=10*(e.gce.delay||10),l.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(l.transparentIndex=e.gce.transparentColorIndex)),i&&(l.patch=d(l)),l}};var c=function(e,t){return e.frames.filter(function(e){return e.image}).map(function(i){return u(i,e.gct,t)})};t.Ud=c},2405:function(e,t,i){"use strict";var r=i(6468),n=i(6938);r("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},n)},2475:function(e,t,i){"use strict";var r=i(6518),n=i(8527),o=i(4916),a=!o("isSupersetOf",function(e){return!e});r({target:"Set",proto:!0,real:!0,forced:a},{isSupersetOf:n})},2478:function(e,t,i){"use strict";var r=i(9504),n=i(8981),o=Math.floor,a=r("".charAt),s=r("".replace),l=r("".slice),h=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,d=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,i,r,u,c){var f=i+e.length,v=r.length,g=d;return void 0!==u&&(u=n(u),g=h),s(c,g,function(n,s){var h;switch(a(s,0)){case"$":return"$";case"&":return e;case"`":return l(t,0,i);case"'":return l(t,f);case"<":h=u[l(s,1,-1)];break;default:var d=+s;if(0===d)return n;if(d>v){var c=o(d/10);return 0===c?n:c<=v?void 0===r[c-1]?a(s,1):r[c-1]+a(s,1):n}h=r[d-1]}return void 0===h?"":h})}},2489:function(e,t,i){"use strict";var r=i(6518),n=i(9565),o=i(9306),a=i(8551),s=i(1767),l=i(9462),h=i(6319),d=i(6395),u=i(9539),c=i(684),f=i(4549),v=!d&&!c("filter",function(){}),g=!d&&!v&&f("filter",TypeError),y=d||v||g,p=l(function(){var e,t,i,r=this.iterator,o=this.predicate,s=this.next;while(1){if(e=a(n(s,r)),t=this.done=!!e.done,t)return;if(i=e.value,h(r,o,[i,this.counter++],!0))return i}});r({target:"Iterator",proto:!0,real:!0,forced:y},{filter:function(e){a(this);try{o(e)}catch(t){u(this,"throw",t)}return g?n(g,this,e):new p(s(this),{predicate:e})}})},2515:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readBits=t.readArray=t.readUnsigned=t.readString=t.peekBytes=t.readBytes=t.peekByte=t.readByte=t.buildStream=void 0;var i=function(e){return{data:e,pos:0}};t.buildStream=i;var r=function(){return function(e){return e.data[e.pos++]}};t.readByte=r;var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(t){return t.data[t.pos+e]}};t.peekByte=n;var o=function(e){return function(t){return t.data.subarray(t.pos,t.pos+=e)}};t.readBytes=o;var a=function(e){return function(t){return t.data.subarray(t.pos,t.pos+e)}};t.peekBytes=a;var s=function(e){return function(t){return Array.from(o(e)(t)).map(function(e){return String.fromCharCode(e)}).join("")}};t.readString=s;var l=function(e){return function(t){var i=o(2)(t);return e?(i[1]<<8)+i[0]:(i[0]<<8)+i[1]}};t.readUnsigned=l;var h=function(e,t){return function(i,r,n){for(var a="function"===typeof t?t(i,r,n):t,s=o(e),l=new Array(a),h=0;h<a;h++)l[h]=s(i);return l}};t.readArray=h;var d=function(e,t,i){for(var r=0,n=0;n<i;n++)r+=e[t+n]&&Math.pow(2,i-n-1);return r},u=function(e){return function(t){for(var i=r()(t),n=new Array(8),o=0;o<8;o++)n[7-o]=!!(i&1<<o);return Object.keys(e).reduce(function(t,i){var r=e[i];return r.length?t[i]=d(n,r.index,r.length):t[i]=n[r.index],t},{})}};t.readBits=u},2529:function(e){"use strict";e.exports=function(e,t){return{value:e,done:t}}},2603:function(e,t,i){"use strict";var r=i(655);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:r(e)}},2652:function(e,t,i){"use strict";var r=i(6080),n=i(9565),o=i(8551),a=i(6823),s=i(4209),l=i(6198),h=i(1625),d=i(81),u=i(851),c=i(9539),f=TypeError,v=function(e,t){this.stopped=e,this.result=t},g=v.prototype;e.exports=function(e,t,i){var y,p,w,x,m,b,k,C=i&&i.that,S=!(!i||!i.AS_ENTRIES),I=!(!i||!i.IS_RECORD),T=!(!i||!i.IS_ITERATOR),A=!(!i||!i.INTERRUPTED),R=r(t,C),D=function(e){return y&&c(y,"normal"),new v(!0,e)},E=function(e){return S?(o(e),A?R(e[0],e[1],D):R(e[0],e[1])):A?R(e,D):R(e)};if(I)y=e.iterator;else if(T)y=e;else{if(p=u(e),!p)throw new f(a(e)+" is not iterable");if(s(p)){for(w=0,x=l(e);x>w;w++)if(m=E(e[w]),m&&h(g,m))return m;return new v(!1)}y=d(e,p)}b=I?e.next:y.next;while(!(k=n(b,y)).done){try{m=E(k.value)}catch(P){c(y,"throw",P)}if("object"==typeof m&&m&&h(g,m))return m}return new v(!1)}},2675:function(e,t,i){"use strict";i(6761),i(1510),i(7812),i(3110),i(9773)},2744:function(e,t,i){"use strict";var r=i(9039);e.exports=!r(function(){return Object.isExtensible(Object.preventExtensions({}))})},2762:function(e,t,i){"use strict";var r=i(6518),n=i(3802).trim,o=i(706);r({target:"String",proto:!0,forced:o("trim")},{trim:function(){return n(this)}})},2777:function(e,t,i){"use strict";var r=i(9565),n=i(34),o=i(757),a=i(5966),s=i(4270),l=i(8227),h=TypeError,d=l("toPrimitive");e.exports=function(e,t){if(!n(e)||o(e))return e;var i,l=a(e,d);if(l){if(void 0===t&&(t="default"),i=r(l,e,t),!n(i)||o(i))return i;throw new h("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},2787:function(e,t,i){"use strict";var r=i(9297),n=i(4901),o=i(8981),a=i(6119),s=i(2211),l=a("IE_PROTO"),h=Object,d=h.prototype;e.exports=s?h.getPrototypeOf:function(e){var t=o(e);if(r(t,l))return t[l];var i=t.constructor;return n(i)&&t instanceof i?i.prototype:t instanceof h?d:null}},2796:function(e,t,i){"use strict";var r=i(9039),n=i(4901),o=/#|\.prototype\./,a=function(e,t){var i=l[s(e)];return i===d||i!==h&&(n(t)?r(t):!!t)},s=a.normalize=function(e){return String(e).replace(o,".").toLowerCase()},l=a.data={},h=a.NATIVE="N",d=a.POLYFILL="P";e.exports=a},2812:function(e){"use strict";var t=TypeError;e.exports=function(e,i){if(e<i)throw new t("Not enough arguments");return e}},2839:function(e,t,i){"use strict";var r=i(4576),n=r.navigator,o=n&&n.userAgent;e.exports=o?String(o):""},2892:function(e,t,i){"use strict";var r=i(6518),n=i(6395),o=i(3724),a=i(4576),s=i(9167),l=i(9504),h=i(2796),d=i(9297),u=i(3167),c=i(1625),f=i(757),v=i(2777),g=i(9039),y=i(8480).f,p=i(7347).f,w=i(4913).f,x=i(1240),m=i(3802).trim,b="Number",k=a[b],C=s[b],S=k.prototype,I=a.TypeError,T=l("".slice),A=l("".charCodeAt),R=function(e){var t=v(e,"number");return"bigint"==typeof t?t:D(t)},D=function(e){var t,i,r,n,o,a,s,l,h=v(e,"number");if(f(h))throw new I("Cannot convert a Symbol value to a number");if("string"==typeof h&&h.length>2)if(h=m(h),t=A(h,0),43===t||45===t){if(i=A(h,2),88===i||120===i)return NaN}else if(48===t){switch(A(h,1)){case 66:case 98:r=2,n=49;break;case 79:case 111:r=8,n=55;break;default:return+h}for(o=T(h,2),a=o.length,s=0;s<a;s++)if(l=A(o,s),l<48||l>n)return NaN;return parseInt(o,r)}return+h},E=h(b,!k(" 0o1")||!k("0b1")||k("+0x1")),P=function(e){return c(S,e)&&g(function(){x(e)})},O=function(e){var t=arguments.length<1?0:k(R(e));return P(this)?u(Object(t),this,O):t};O.prototype=S,E&&!n&&(S.constructor=O),r({global:!0,constructor:!0,wrap:!0,forced:E},{Number:O});var M=function(e,t){for(var i,r=o?y(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),n=0;r.length>n;n++)d(t,i=r[n])&&!d(e,i)&&w(e,i,p(t,i))};n&&C&&M(s[b],C),(E||n)&&M(s[b],k)},2953:function(e,t,i){"use strict";var r=i(4576),n=i(7400),o=i(9296),a=i(3792),s=i(6699),l=i(687),h=i(8227),d=h("iterator"),u=a.values,c=function(e,t){if(e){if(e[d]!==u)try{s(e,d,u)}catch(r){e[d]=u}if(l(e,t,!0),n[t])for(var i in a)if(e[i]!==a[i])try{s(e,i,a[i])}catch(r){e[i]=a[i]}}};for(var f in n)c(r[f]&&r[f].prototype,f);c(o,"DOMTokenList")},2967:function(e,t,i){"use strict";var r=i(6706),n=i(34),o=i(7750),a=i(3506);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{e=r(Object.prototype,"__proto__","set"),e(i,[]),t=i instanceof Array}catch(s){}return function(i,r){return o(i),a(r),n(i)?(t?e(i,r):i.__proto__=r,i):i}}():void 0)},3061:function(e,t,i){"use strict";var r=i(9039);e.exports=function(e){return r(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})}},3063:function(e,t,i){"use strict";var r=i(2839);e.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(r)},3110:function(e,t,i){"use strict";var r=i(6518),n=i(7751),o=i(8745),a=i(9565),s=i(9504),l=i(9039),h=i(4376),d=i(4901),u=i(5810),c=i(757),f=i(2195),v=i(655),g=i(7680),y=i(8235),p=i(3392),w=i(4495),x=i(7819),m=String,b=n("JSON","stringify"),k=s(/./.exec),C=s("".charAt),S=s("".charCodeAt),I=s("".replace),T=s("".slice),A=s([].push),R=s(1.1.toString),D=/[\uD800-\uDFFF]/g,E=/^[\uD800-\uDBFF]$/,P=/^[\uDC00-\uDFFF]$/,O=p(),M=O.length,B=!w||l(function(){var e=n("Symbol")("stringify detection");return"[null]"!==b([e])||"{}"!==b({a:e})||"{}"!==b(Object(e))}),H=l(function(){return'"\\udf06\\ud834"'!==b("\udf06\ud834")||'"\\udead"'!==b("\udead")}),F=B?function(e,t){var i=g(arguments),r=W(t);if(d(r)||void 0!==e&&!c(e))return i[1]=function(e,t){if(d(r)&&(t=a(r,this,m(e),t)),!c(t))return t},o(b,null,i)}:b,L=function(e,t,i){var r=C(i,t-1),n=C(i,t+1);return k(E,e)&&!k(P,n)||k(P,e)&&!k(E,r)?"\\u"+R(S(e,0),16):e},W=function(e){if(d(e))return e;if(h(e)){for(var t=e.length,i=[],r=0;r<t;r++){var n=e[r];"string"==typeof n?A(i,n):"number"!=typeof n&&"Number"!==f(n)&&"String"!==f(n)||A(i,v(n))}var o=i.length,a=!0;return function(e,t){if(a)return a=!1,t;if(h(this))return t;for(var r=0;r<o;r++)if(i[r]===e)return t}}};b&&r({target:"JSON",stat:!0,arity:3,forced:B||H||!x},{stringify:function(e,t,i){var r=W(t),n=[],o=F(e,function(e,t){var i=d(r)?a(r,this,m(e),t):t;return!x&&u(i)?O+(A(n,i.rawJSON)-1):i},i);if("string"!=typeof o)return o;if(H&&(o=I(o,D,L)),x)return o;for(var s="",l=o.length,h=0;h<l;h++){var c=C(o,h);if('"'===c){var f=y(o,++h).end-1,v=T(o,h,f);s+=T(v,0,M)===O?n[T(v,M)]:'"'+v+'"',h=f}else s+=c}return s}})},3138:function(e){"use strict";e.exports=function(e,t){}},3167:function(e,t,i){"use strict";var r=i(4901),n=i(34),o=i(2967);e.exports=function(e,t,i){var a,s;return o&&r(a=t.constructor)&&a!==i&&n(s=a.prototype)&&s!==i.prototype&&o(e,s),e}},3179:function(e,t,i){"use strict";var r=i(2140),n=i(6955);e.exports=r?{}.toString:function(){return"[object "+n(this)+"]"}},3253:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deinterlace=void 0;var i=function(e,t){for(var i=new Array(e.length),r=e.length/t,n=function(r,n){var o=e.slice(n*t,(n+1)*t);i.splice.apply(i,[r*t,t].concat(o))},o=[0,4,2,1],a=[8,8,4,2],s=0,l=0;l<4;l++)for(var h=o[l];h<r;h+=a[l])n(h,s),s++;return i};t.deinterlace=i},3362:function(e,t,i){"use strict";i(436),i(6499),i(2003),i(7743),i(1481),i(280)},3389:function(e,t,i){"use strict";var r=i(4576),n=i(3724),o=Object.getOwnPropertyDescriptor;e.exports=function(e){if(!n)return r[e];var t=o(r,e);return t&&t.value}},3392:function(e,t,i){"use strict";var r=i(9504),n=0,o=Math.random(),a=r(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++n+o,36)}},3418:function(e,t,i){"use strict";var r=i(6518),n=i(7916),o=i(4428),a=!o(function(e){Array.from(e)});r({target:"Array",stat:!0,forced:a},{from:n})},3438:function(e,t,i){"use strict";var r=i(8551),n=i(34),o=i(6043);e.exports=function(e,t){if(r(e),n(t)&&t.constructor===e)return t;var i=o.f(e),a=i.resolve;return a(t),i.promise}},3440:function(e,t,i){"use strict";var r=i(7080),n=i(4402),o=i(9286),a=i(5170),s=i(3789),l=i(8469),h=i(507),d=n.has,u=n.remove;e.exports=function(e){var t=r(this),i=s(e),n=o(t);return a(t)<=i.size?l(t,function(e){i.includes(e)&&u(n,e)}):h(i.getIterator(),function(e){d(n,e)&&u(n,e)}),n}},3451:function(e,t,i){"use strict";var r=i(6518),n=i(9504),o=i(421),a=i(34),s=i(9297),l=i(4913).f,h=i(8480),d=i(298),u=i(4124),c=i(3392),f=i(2744),v=!1,g=c("meta"),y=0,p=function(e){l(e,g,{value:{objectID:"O"+y++,weakData:{}}})},w=function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,g)){if(!u(e))return"F";if(!t)return"E";p(e)}return e[g].objectID},x=function(e,t){if(!s(e,g)){if(!u(e))return!0;if(!t)return!1;p(e)}return e[g].weakData},m=function(e){return f&&v&&u(e)&&!s(e,g)&&p(e),e},b=function(){k.enable=function(){},v=!0;var e=h.f,t=n([].splice),i={};i[g]=1,e(i).length&&(h.f=function(i){for(var r=e(i),n=0,o=r.length;n<o;n++)if(r[n]===g){t(r,n,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:d.f}))},k=e.exports={enable:b,fastKey:w,getWeakData:x,onFreeze:m};o[g]=!0},3470:function(e){"use strict";e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}},3500:function(e,t,i){"use strict";var r=i(4576),n=i(7400),o=i(9296),a=i(235),s=i(6699),l=function(e){if(e&&e.forEach!==a)try{s(e,"forEach",a)}catch(t){e.forEach=a}};for(var h in n)n[h]&&l(r[h]&&r[h].prototype);l(o)},3506:function(e,t,i){"use strict";var r=i(3925),n=String,o=TypeError;e.exports=function(e){if(r(e))return e;throw new o("Can't set "+n(e)+" as a prototype")}},3517:function(e,t,i){"use strict";var r=i(9504),n=i(9039),o=i(4901),a=i(6955),s=i(7751),l=i(3706),h=function(){},d=s("Reflect","construct"),u=/^\s*(?:class|function)\b/,c=r(u.exec),f=!u.test(h),v=function(e){if(!o(e))return!1;try{return d(h,[],e),!0}catch(t){return!1}},g=function(e){if(!o(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!c(u,l(e))}catch(t){return!0}};g.sham=!0,e.exports=!d||n(function(){var e;return v(v.call)||!v(Object)||!v(function(){e=!0})||e})?g:v},3548:function(e,t,i){"use strict";var r=i(3724),n=i(2106),o=i(34),a=i(3925),s=i(8981),l=i(7750),h=Object.getPrototypeOf,d=Object.setPrototypeOf,u=Object.prototype,c="__proto__";if(r&&h&&d&&!(c in u))try{n(u,c,{configurable:!0,get:function(){return h(s(this))},set:function(e){var t=l(this);a(e)&&o(t)&&d(t,e)}})}catch(f){}},3579:function(e,t,i){"use strict";var r=i(6518),n=i(9565),o=i(2652),a=i(9306),s=i(8551),l=i(1767),h=i(9539),d=i(4549),u=d("some",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:u},{some:function(e){s(this);try{a(e)}catch(r){h(this,"throw",r)}if(u)return n(u,this,e);var t=l(this),i=0;return o(t,function(t,r){if(e(t,i++))return r()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},3607:function(e,t,i){"use strict";var r=i(2839),n=r.match(/AppleWebKit\/(\d+)\./);e.exports=!!n&&+n[1]},3635:function(e,t,i){"use strict";var r=i(9039),n=i(4576),o=n.RegExp;e.exports=r(function(){var e=o(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})},3640:function(e,t,i){"use strict";var r=i(8551),n=i(4270),o=TypeError;e.exports=function(e){if(r(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw new o("Incorrect hint");return n(this,e)}},3650:function(e,t,i){"use strict";var r=i(7080),n=i(4402),o=i(9286),a=i(3789),s=i(507),l=n.add,h=n.has,d=n.remove;e.exports=function(e){var t=r(this),i=a(e).getIterator(),n=o(t);return s(i,function(e){h(t,e)?d(n,e):l(n,e)}),n}},3706:function(e,t,i){"use strict";var r=i(9504),n=i(4901),o=i(7629),a=r(Function.toString);n(o.inspectSource)||(o.inspectSource=function(e){return a(e)}),e.exports=o.inspectSource},3709:function(e,t,i){"use strict";var r=i(2839),n=r.match(/firefox\/(\d+)/i);e.exports=!!n&&+n[1]},3717:function(e,t){"use strict";t.f=Object.getOwnPropertySymbols},3724:function(e,t,i){"use strict";var r=i(9039);e.exports=!r(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},3763:function(e,t,i){"use strict";var r=i(2839);e.exports=/MSIE|Trident/.test(r)},3771:function(e,t,i){"use strict";var r=i(6518),n=i(4373),o=i(6469);r({target:"Array",proto:!0},{fill:n}),o("fill")},3789:function(e,t,i){"use strict";var r=i(9306),n=i(8551),o=i(9565),a=i(1291),s=i(1767),l="Invalid size",h=RangeError,d=TypeError,u=Math.max,c=function(e,t){this.set=e,this.size=u(t,0),this.has=r(e.has),this.keys=r(e.keys)};c.prototype={getIterator:function(){return s(n(o(this.keys,this.set)))},includes:function(e){return o(this.has,this.set,e)}},e.exports=function(e){n(e);var t=+e.size;if(t!==t)throw new d(l);var i=a(t);if(i<0)throw new h(l);return new c(e,i)}},3792:function(e,t,i){"use strict";var r=i(5397),n=i(6469),o=i(6269),a=i(1181),s=i(4913).f,l=i(1088),h=i(2529),d=i(6395),u=i(3724),c="Array Iterator",f=a.set,v=a.getterFor(c);e.exports=l(Array,"Array",function(e,t){f(this,{type:c,target:r(e),index:0,kind:t})},function(){var e=v(this),t=e.target,i=e.index++;if(!t||i>=t.length)return e.target=null,h(void 0,!0);switch(e.kind){case"keys":return h(i,!1);case"values":return h(t[i],!1)}return h([i,t[i]],!1)},"values");var g=o.Arguments=o.Array;if(n("keys"),n("values"),n("entries"),!d&&u&&"values"!==g.name)try{s(g,"name",{value:"values"})}catch(y){}},3802:function(e,t,i){"use strict";var r=i(9504),n=i(7750),o=i(655),a=i(7452),s=r("".replace),l=RegExp("^["+a+"]+"),h=RegExp("(^|[^"+a+"])["+a+"]+$"),d=function(e){return function(t){var i=o(n(t));return 1&e&&(i=s(i,l,"")),2&e&&(i=s(i,h,"$1")),i}};e.exports={start:d(1),end:d(2),trim:d(3)}},3838:function(e,t,i){"use strict";var r=i(7080),n=i(5170),o=i(8469),a=i(3789);e.exports=function(e){var t=r(this),i=a(e);return!(n(t)>i.size)&&!1!==o(t,function(e){if(!i.includes(e))return!1},!0)}},3851:function(e,t,i){"use strict";var r=i(6518),n=i(9039),o=i(5397),a=i(7347).f,s=i(3724),l=!s||n(function(){a(1)});r({target:"Object",stat:!0,forced:l,sham:!s},{getOwnPropertyDescriptor:function(e,t){return a(o(e),t)}})},3853:function(e,t,i){"use strict";var r=i(6518),n=i(4449),o=i(4916),a=!o("isDisjointFrom",function(e){return!e});r({target:"Set",proto:!0,real:!0,forced:a},{isDisjointFrom:n})},3925:function(e,t,i){"use strict";var r=i(34);e.exports=function(e){return r(e)||null===e}},3994:function(e,t,i){"use strict";var r=i(7657).IteratorPrototype,n=i(2360),o=i(6980),a=i(687),s=i(6269),l=function(){return this};e.exports=function(e,t,i,h){var d=t+" Iterator";return e.prototype=n(r,{next:o(+!h,i)}),a(e,d,!1,!0),s[d]=l,e}},4055:function(e,t,i){"use strict";var r=i(4576),n=i(34),o=r.document,a=n(o)&&n(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},4114:function(e,t,i){"use strict";var r=i(6518),n=i(8981),o=i(6198),a=i(4527),s=i(6837),l=i(9039),h=l(function(){return 4294967297!==[].push.call({length:4294967296},1)}),d=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},u=h||!d();r({target:"Array",proto:!0,arity:1,forced:u},{push:function(e){var t=n(this),i=o(t),r=arguments.length;s(i+r);for(var l=0;l<r;l++)t[i]=arguments[l],i++;return a(t,i),i}})},4117:function(e){"use strict";e.exports=function(e){return null===e||void 0===e}},4124:function(e,t,i){"use strict";var r=i(9039),n=i(34),o=i(2195),a=i(5652),s=Object.isExtensible,l=r(function(){s(1)});e.exports=l||a?function(e){return!!n(e)&&((!a||"ArrayBuffer"!==o(e))&&(!s||s(e)))}:s},4204:function(e,t,i){"use strict";var r=i(7080),n=i(4402).add,o=i(9286),a=i(3789),s=i(507);e.exports=function(e){var t=r(this),i=a(e).getIterator(),l=o(t);return s(i,function(e){n(l,e)}),l}},4209:function(e,t,i){"use strict";var r=i(8227),n=i(6269),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||a[o]===e)}},4213:function(e,t,i){"use strict";var r=i(3724),n=i(9504),o=i(9565),a=i(9039),s=i(1072),l=i(3717),h=i(8773),d=i(8981),u=i(7055),c=Object.assign,f=Object.defineProperty,v=n([].concat);e.exports=!c||a(function(){if(r&&1!==c({b:1},c(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},i=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[i]=7,n.split("").forEach(function(e){t[e]=e}),7!==c({},e)[i]||s(c({},t)).join("")!==n})?function(e,t){var i=d(e),n=arguments.length,a=1,c=l.f,f=h.f;while(n>a){var g,y=u(arguments[a++]),p=c?v(s(y),c(y)):s(y),w=p.length,x=0;while(w>x)g=p[x++],r&&!o(f,y,g)||(i[g]=y[g])}return i}:c},4215:function(e,t,i){"use strict";var r=i(4576),n=i(2839),o=i(2195),a=function(e){return n.slice(0,e.length)===e};e.exports=function(){return a("Bun/")?"BUN":a("Cloudflare-Workers")?"CLOUDFLARE":a("Deno/")?"DENO":a("Node.js/")?"NODE":r.Bun&&"string"==typeof Bun.version?"BUN":r.Deno&&"object"==typeof Deno.version?"DENO":"process"===o(r.process)?"NODE":r.window&&r.document?"BROWSER":"REST"}()},4265:function(e,t,i){"use strict";var r=i(2839);e.exports=/ipad|iphone|ipod/i.test(r)&&"undefined"!=typeof Pebble},4270:function(e,t,i){"use strict";var r=i(9565),n=i(4901),o=i(34),a=TypeError;e.exports=function(e,t){var i,s;if("string"===t&&n(i=e.toString)&&!o(s=r(i,e)))return s;if(n(i=e.valueOf)&&!o(s=r(i,e)))return s;if("string"!==t&&n(i=e.toString)&&!o(s=r(i,e)))return s;throw new a("Can't convert object to primitive value")}},4298:function(e,t,i){"use strict";var r=i(6518),n=i(7240),o=i(3061);r({target:"String",proto:!0,forced:o("fixed")},{fixed:function(){return n(this,"tt","","")}})},4373:function(e,t,i){"use strict";var r=i(8981),n=i(5610),o=i(6198);e.exports=function(e){var t=r(this),i=o(t),a=arguments.length,s=n(a>1?arguments[1]:void 0,i),l=a>2?arguments[2]:void 0,h=void 0===l?i:n(l,i);while(h>s)t[s++]=e;return t}},4376:function(e,t,i){"use strict";var r=i(2195);e.exports=Array.isArray||function(e){return"Array"===r(e)}},4402:function(e,t,i){"use strict";var r=i(9504),n=Set.prototype;e.exports={Set:Set,add:r(n.add),has:r(n.has),remove:r(n["delete"]),proto:n}},4423:function(e,t,i){"use strict";var r=i(6518),n=i(9617).includes,o=i(9039),a=i(6469),s=o(function(){return!Array(1).includes()});r({target:"Array",proto:!0,forced:s},{includes:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},4428:function(e,t,i){"use strict";var r=i(8227),n=r("iterator"),o=!1;try{var a=0,s={next:function(){return{done:!!a++}},return:function(){o=!0}};s[n]=function(){return this},Array.from(s,function(){throw 2})}catch(l){}e.exports=function(e,t){try{if(!t&&!o)return!1}catch(l){return!1}var i=!1;try{var r={};r[n]=function(){return{next:function(){return{done:i=!0}}}},e(r)}catch(l){}return i}},4449:function(e,t,i){"use strict";var r=i(7080),n=i(4402).has,o=i(5170),a=i(3789),s=i(8469),l=i(507),h=i(9539);e.exports=function(e){var t=r(this),i=a(e);if(o(t)<=i.size)return!1!==s(t,function(e){if(i.includes(e))return!1},!0);var d=i.getIterator();return!1!==l(d,function(e){if(n(t,e))return h(d,"normal",!1)})}},4488:function(e,t,i){"use strict";var r=i(7680),n=Math.floor,o=function(e,t){var i=e.length;if(i<8){var a,s,l=1;while(l<i){s=l,a=e[l];while(s&&t(e[s-1],a)>0)e[s]=e[--s];s!==l++&&(e[s]=a)}}else{var h=n(i/2),d=o(r(e,0,h),t),u=o(r(e,h),t),c=d.length,f=u.length,v=0,g=0;while(v<c||g<f)e[v+g]=v<c&&g<f?t(d[v],u[g])<=0?d[v++]:u[g++]:v<c?d[v++]:u[g++]}return e};e.exports=o},4495:function(e,t,i){"use strict";var r=i(9519),n=i(9039),o=i(4576),a=o.String;e.exports=!!Object.getOwnPropertySymbols&&!n(function(){var e=Symbol("symbol detection");return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41})},4527:function(e,t,i){"use strict";var r=i(3724),n=i(4376),o=TypeError,a=Object.getOwnPropertyDescriptor,s=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=s?function(e,t){if(n(e)&&!a(e,"length").writable)throw new o("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},4549:function(e,t,i){"use strict";var r=i(4576);e.exports=function(e,t){var i=r.Iterator,n=i&&i.prototype,o=n&&n[e],a=!1;if(o)try{o.call({next:function(){return{done:!0}},return:function(){a=!0}},-1)}catch(s){s instanceof t||(a=!1)}if(!a)return o}},4554:function(e,t,i){"use strict";var r=i(6518),n=i(8981),o=i(5610),a=i(1291),s=i(6198),l=i(4527),h=i(6837),d=i(1469),u=i(4659),c=i(4606),f=i(597),v=f("splice"),g=Math.max,y=Math.min;r({target:"Array",proto:!0,forced:!v},{splice:function(e,t){var i,r,f,v,p,w,x=n(this),m=s(x),b=o(e,m),k=arguments.length;for(0===k?i=r=0:1===k?(i=0,r=m-b):(i=k-2,r=y(g(a(t),0),m-b)),h(m+i-r),f=d(x,r),v=0;v<r;v++)p=b+v,p in x&&u(f,v,x[p]);if(f.length=r,i<r){for(v=b;v<m-r;v++)p=v+r,w=v+i,p in x?x[w]=x[p]:c(x,w);for(v=m;v>m-r+i;v--)c(x,v-1)}else if(i>r)for(v=m-r;v>b;v--)p=v+r-1,w=v+i-1,p in x?x[w]=x[p]:c(x,w);for(v=0;v<i;v++)x[v+b]=arguments[v+2];return l(x,m-r+i),f}})},4576:function(e,t,i){"use strict";var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof i.g&&i.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4598:function(e,t,i){"use strict";var r=i(9039);e.exports=function(e,t){var i=[][e];return!!i&&r(function(){i.call(null,t||function(){return 1},1)})}},4601:function(e,t,i){"use strict";var r=i(7751),n=i(9297),o=i(6699),a=i(1625),s=i(2967),l=i(7740),h=i(1056),d=i(3167),u=i(2603),c=i(7584),f=i(747),v=i(3724),g=i(6395);e.exports=function(e,t,i,y){var p="stackTraceLimit",w=y?2:1,x=e.split("."),m=x[x.length-1],b=r.apply(null,x);if(b){var k=b.prototype;if(!g&&n(k,"cause")&&delete k.cause,!i)return b;var C=r("Error"),S=t(function(e,t){var i=u(y?t:e,void 0),r=y?new b(e):new b;return void 0!==i&&o(r,"message",i),f(r,S,r.stack,2),this&&a(k,this)&&d(r,this,S),arguments.length>w&&c(r,arguments[w]),r});if(S.prototype=k,"Error"!==m?s?s(S,C):l(S,C,{name:!0}):v&&p in b&&(h(S,b,p),h(S,b,"prepareStackTrace")),l(S,b),!g)try{k.name!==m&&o(k,"name",m),k.constructor=S}catch(I){}return S}}},4606:function(e,t,i){"use strict";var r=i(6823),n=TypeError;e.exports=function(e,t){if(!delete e[t])throw new n("Cannot delete property "+r(t)+" of "+r(e))}},4659:function(e,t,i){"use strict";var r=i(3724),n=i(4913),o=i(6980);e.exports=function(e,t,i){r?n.f(e,t,o(0,i)):e[t]=i}},4782:function(e,t,i){"use strict";var r=i(6518),n=i(4376),o=i(3517),a=i(34),s=i(5610),l=i(6198),h=i(5397),d=i(4659),u=i(8227),c=i(597),f=i(7680),v=c("slice"),g=u("species"),y=Array,p=Math.max;r({target:"Array",proto:!0,forced:!v},{slice:function(e,t){var i,r,u,c=h(this),v=l(c),w=s(e,v),x=s(void 0===t?v:t,v);if(n(c)&&(i=c.constructor,o(i)&&(i===y||n(i.prototype))?i=void 0:a(i)&&(i=i[g],null===i&&(i=void 0)),i===y||void 0===i))return f(c,w,x);for(r=new(void 0===i?y:i)(p(x-w,0)),u=0;w<x;w++,u++)w in c&&d(r,u,c[w]);return r.length=u,r}})},4864:function(e,t,i){"use strict";var r=i(3724),n=i(4576),o=i(9504),a=i(2796),s=i(3167),l=i(6699),h=i(2360),d=i(8480).f,u=i(1625),c=i(788),f=i(655),v=i(1034),g=i(8429),y=i(1056),p=i(6840),w=i(9039),x=i(9297),m=i(1181).enforce,b=i(7633),k=i(8227),C=i(3635),S=i(8814),I=k("match"),T=n.RegExp,A=T.prototype,R=n.SyntaxError,D=o(A.exec),E=o("".charAt),P=o("".replace),O=o("".indexOf),M=o("".slice),B=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,H=/a/g,F=/a/g,L=new T(H)!==H,W=g.MISSED_STICKY,z=g.UNSUPPORTED_Y,N=r&&(!L||W||C||S||w(function(){return F[I]=!1,T(H)!==H||T(F)===F||"/a/i"!==String(T(H,"i"))})),V=function(e){for(var t,i=e.length,r=0,n="",o=!1;r<=i;r++)t=E(e,r),"\\"!==t?o||"."!==t?("["===t?o=!0:"]"===t&&(o=!1),n+=t):n+="[\\s\\S]":n+=t+E(e,++r);return n},_=function(e){for(var t,i=e.length,r=0,n="",o=[],a=h(null),s=!1,l=!1,d=0,u="";r<=i;r++){if(t=E(e,r),"\\"===t)t+=E(e,++r);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:if(n+=t,"?:"===M(e,r+1,r+3))continue;D(B,M(e,r+1))&&(r+=2,l=!0),d++;continue;case">"===t&&l:if(""===u||x(a,u))throw new R("Invalid capture group name");a[u]=!0,o[o.length]=[u,d],l=!1,u="";continue}l?u+=t:n+=t}return[n,o]};if(a("RegExp",N)){for(var j=function(e,t){var i,r,n,o,a,h,d=u(A,this),g=c(e),y=void 0===t,p=[],w=e;if(!d&&g&&y&&e.constructor===j)return e;if((g||u(A,e))&&(e=e.source,y&&(t=v(w))),e=void 0===e?"":f(e),t=void 0===t?"":f(t),w=e,C&&"dotAll"in H&&(r=!!t&&O(t,"s")>-1,r&&(t=P(t,/s/g,""))),i=t,W&&"sticky"in H&&(n=!!t&&O(t,"y")>-1,n&&z&&(t=P(t,/y/g,""))),S&&(o=_(e),e=o[0],p=o[1]),a=s(T(e,t),d?this:A,j),(r||n||p.length)&&(h=m(a),r&&(h.dotAll=!0,h.raw=j(V(e),i)),n&&(h.sticky=!0),p.length&&(h.groups=p)),e!==w)try{l(a,"source",""===w?"(?:)":w)}catch(x){}return a},Y=d(T),G=0;Y.length>G;)y(j,T,Y[G++]);A.constructor=j,j.prototype=A,p(n,"RegExp",j,{constructor:!0})}b("RegExp")},4901:function(e){"use strict";var t="object"==typeof document&&document.all;e.exports="undefined"==typeof t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},4913:function(e,t,i){"use strict";var r=i(3724),n=i(5917),o=i(8686),a=i(8551),s=i(6969),l=TypeError,h=Object.defineProperty,d=Object.getOwnPropertyDescriptor,u="enumerable",c="configurable",f="writable";t.f=r?o?function(e,t,i){if(a(e),t=s(t),a(i),"function"===typeof e&&"prototype"===t&&"value"in i&&f in i&&!i[f]){var r=d(e,t);r&&r[f]&&(e[t]=i.value,i={configurable:c in i?i[c]:r[c],enumerable:u in i?i[u]:r[u],writable:!1})}return h(e,t,i)}:h:function(e,t,i){if(a(e),t=s(t),a(i),n)try{return h(e,t,i)}catch(r){}if("get"in i||"set"in i)throw new l("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},4916:function(e,t,i){"use strict";var r=i(7751),n=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},o=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};e.exports=function(e,t){var i=r("Set");try{(new i)[e](n(0));try{return(new i)[e](n(-1)),!1}catch(s){if(!t)return!0;try{return(new i)[e](o(-1/0)),!1}catch(l){var a=new i([1,2]);return t(a[e](o(1/0)))}}}catch(l){return!1}}},5003:function(e,t){var i,r,n;(function(o,a){r=[],i=a,n="function"===typeof i?i.apply(t,r):i,void 0===n||(e.exports=n)})("undefined"!==typeof self&&self,function(){function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(f){var i,r,n,o=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,a=/@([^@]*):(\d+):(\d+)\s*$/gi,s=o.exec(f.stack)||a.exec(f.stack),l=s&&s[1]||!1,h=s&&s[2]||!1,d=document.location.href.replace(document.location.hash,""),u=document.getElementsByTagName("script");l===d&&(i=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(h-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),n=i.replace(r,"$1").trim());for(var c=0;c<u.length;c++){if("interactive"===u[c].readyState)return u[c];if(u[c].src===l)return u[c];if(l===d&&u[c].innerHTML&&u[c].innerHTML.trim()===n)return u[c]}return null}}return e})},5024:function(e,t,i){"use strict";var r=i(6518),n=i(3650),o=i(9835),a=i(4916),s=!a("symmetricDifference")||!o("symmetricDifference");r({target:"Set",proto:!0,real:!0,forced:s},{symmetricDifference:n})},5031:function(e,t,i){"use strict";var r=i(7751),n=i(9504),o=i(8480),a=i(3717),s=i(8551),l=n([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(s(e)),i=a.f;return i?l(t,i(e)):t}},5170:function(e,t,i){"use strict";var r=i(6706),n=i(4402);e.exports=r(n.proto,"size","get")||function(e){return e.size}},5208:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loop=t.conditional=t.parse=void 0;var i=function e(t,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r;if(Array.isArray(i))i.forEach(function(i){return e(t,i,r,n)});else if("function"===typeof i)i(t,r,n,e);else{var o=Object.keys(i)[0];Array.isArray(i[o])?(n[o]={},e(t,i[o],r,n[o])):n[o]=i[o](t,r,n,e)}return r};t.parse=i;var r=function(e,t){return function(i,r,n,o){t(i,r,n)&&o(i,e,r,n)}};t.conditional=r;var n=function(e,t){return function(i,r,n,o){var a=[],s=i.pos;while(t(i,r,n)){var l={};if(o(i,e,r,l),i.pos===s)break;s=i.pos,a.push(l)}return a}};t.loop=n},5213:function(e,t,i){"use strict";var r=i(4576),n=i(9039),o=r.RegExp,a=!n(function(){var e=!0;try{o(".","d")}catch(h){e=!1}var t={},i="",r=e?"dgimsy":"gimsy",n=function(e,r){Object.defineProperty(t,e,{get:function(){return i+=r,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in e&&(a.hasIndices="d"),a)n(s,a[s]);var l=Object.getOwnPropertyDescriptor(o.prototype,"flags").get.call(t);return l!==r||i!==r});e.exports={correct:a}},5270:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lzw=void 0;var i=function(e,t,i){var r,n,o,a,s,l,h,d,u,c,f,v,g,y,p,w,x=4096,m=-1,b=i,k=new Array(i),C=new Array(x),S=new Array(x),I=new Array(x+1);for(c=e,n=1<<c,s=n+1,r=n+2,h=m,a=c+1,o=(1<<a)-1,d=0;d<n;d++)C[d]=0,S[d]=d;for(f=v=g=y=p=w=0,u=0;u<b;){if(0===y){if(v<a){f+=t[w]<<v,v+=8,w++;continue}if(d=f&o,f>>=a,v-=a,d>r||d==s)break;if(d==n){a=c+1,o=(1<<a)-1,r=n+2,h=m;continue}if(h==m){I[y++]=S[d],h=d,g=d;continue}l=d,d==r&&(I[y++]=g,d=h);while(d>n)I[y++]=S[d],d=C[d];g=255&S[d],I[y++]=g,r<x&&(C[r]=h,S[r]=g,r++,0===(r&o)&&r<x&&(a++,o+=r)),h=l}y--,k[p++]=I[y],u++}for(u=p;u<b;u++)k[u]=0;return k};t.lzw=i},5397:function(e,t,i){"use strict";var r=i(7055),n=i(7750);e.exports=function(e){return r(n(e))}},5440:function(e,t,i){"use strict";var r=i(8745),n=i(9565),o=i(9504),a=i(9228),s=i(9039),l=i(8551),h=i(4901),d=i(34),u=i(1291),c=i(8014),f=i(655),v=i(7750),g=i(7829),y=i(5966),p=i(2478),w=i(1034),x=i(6682),m=i(8227),b=m("replace"),k=Math.max,C=Math.min,S=o([].concat),I=o([].push),T=o("".indexOf),A=o("".slice),R=function(e){return void 0===e?e:String(e)},D=function(){return"$0"==="a".replace(/./,"$0")}(),E=function(){return!!/./[b]&&""===/./[b]("a","$0")}(),P=!s(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")});a("replace",function(e,t,i){var o=E?"$":"$0";return[function(e,i){var r=v(this),o=d(e)?y(e,b):void 0;return o?n(o,e,r,i):n(t,f(r),e,i)},function(e,n){var a=l(this),s=f(e);if("string"==typeof n&&-1===T(n,o)&&-1===T(n,"$<")){var d=i(t,a,s,n);if(d.done)return d.value}var v=h(n);v||(n=f(n));var y,m=f(w(a)),b=-1!==T(m,"g");b&&(y=-1!==T(m,"u"),a.lastIndex=0);var D,E=[];while(1){if(D=x(a,s),null===D)break;if(I(E,D),!b)break;var P=f(D[0]);""===P&&(a.lastIndex=g(s,c(a.lastIndex),y))}for(var O="",M=0,B=0;B<E.length;B++){D=E[B];for(var H,F=f(D[0]),L=k(C(u(D.index),s.length),0),W=[],z=1;z<D.length;z++)I(W,R(D[z]));var N=D.groups;if(v){var V=S([F],W,L,s);void 0!==N&&I(V,N),H=f(r(n,void 0,V))}else H=p(F,s,L,W,N,n);L>=M&&(O+=A(s,M,L)+H,M=L+F.length)}return O+A(s,M)}]},!P||!D||E)},5506:function(e,t,i){"use strict";var r=i(6518),n=i(2357).entries;r({target:"Object",stat:!0},{entries:function(e){return n(e)}})},5548:function(e,t,i){"use strict";var r=i(3517),n=i(6823),o=TypeError;e.exports=function(e){if(r(e))return e;throw new o(n(e)+" is not a constructor")}},5610:function(e,t,i){"use strict";var r=i(1291),n=Math.max,o=Math.min;e.exports=function(e,t){var i=r(e);return i<0?n(i+t,0):o(i,t)}},5652:function(e,t,i){"use strict";var r=i(9039);e.exports=r(function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})},5700:function(e,t,i){"use strict";var r=i(5749),n=i(8242);r("toPrimitive"),n()},5745:function(e,t,i){"use strict";var r=i(7629);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},5746:function(e,t,i){"use strict";var r=i(9565),n=i(9228),o=i(8551),a=i(34),s=i(7750),l=i(3470),h=i(655),d=i(5966),u=i(6682);n("search",function(e,t,i){return[function(t){var i=s(this),n=a(t)?d(t,e):void 0;return n?r(n,t,i):new RegExp(t)[e](h(i))},function(e){var r=o(this),n=h(e),a=i(t,r,n);if(a.done)return a.value;var s=r.lastIndex;l(s,0)||(r.lastIndex=0);var d=u(r,n);return l(r.lastIndex,s)||(r.lastIndex=s),null===d?-1:d.index}]})},5749:function(e,t,i){"use strict";var r=i(9167),n=i(9297),o=i(1951),a=i(4913).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});n(t,e)||a(t,e,{value:o.f(e)})}},5810:function(e,t,i){"use strict";var r=i(34),n=i(1181).get;e.exports=function(e){if(!r(e))return!1;var t=n(e);return!!t&&"RawJSON"===t.type}},5876:function(e,t,i){"use strict";var r=i(6518),n=i(3838),o=i(4916),a=!o("isSubsetOf",function(e){return e});r({target:"Set",proto:!0,real:!0,forced:a},{isSubsetOf:n})},5917:function(e,t,i){"use strict";var r=i(3724),n=i(9039),o=i(4055);e.exports=!r&&!n(function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},5966:function(e,t,i){"use strict";var r=i(9306),n=i(4117);e.exports=function(e,t){var i=e[t];return n(i)?void 0:r(i)}},6033:function(e,t,i){"use strict";i(8523)},6043:function(e,t,i){"use strict";var r=i(9306),n=TypeError,o=function(e){var t,i;this.promise=new e(function(e,r){if(void 0!==t||void 0!==i)throw new n("Bad Promise constructor");t=e,i=r}),this.resolve=r(t),this.reject=r(i)};e.exports.f=function(e){return new o(e)}},6080:function(e,t,i){"use strict";var r=i(7476),n=i(9306),o=i(616),a=r(r.bind);e.exports=function(e,t){return n(e),void 0===t?e:o?a(e,t):function(){return e.apply(t,arguments)}}},6099:function(e,t,i){"use strict";var r=i(2140),n=i(6840),o=i(3179);r||n(Object.prototype,"toString",o,{unsafe:!0})},6119:function(e,t,i){"use strict";var r=i(5745),n=i(3392),o=r("keys");e.exports=function(e){return o[e]||(o[e]=n(e))}},6193:function(e,t,i){"use strict";var r=i(9504),n=Error,o=r("".replace),a=function(e){return String(new n(e).stack)}("zxcasd"),s=/\n\s*at [^:]*:[^\n]*/,l=s.test(a);e.exports=function(e,t){if(l&&"string"==typeof e&&!n.prepareStackTrace)while(t--)e=o(e,s,"");return e}},6198:function(e,t,i){"use strict";var r=i(8014);e.exports=function(e){return r(e.length)}},6249:function(e,t,i){"use strict";var r=i(9039),n=i(6980);e.exports=!r(function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",n(1,7)),7!==e.stack)})},6262:function(e,t){"use strict";t.A=(e,t)=>{const i=e.__vccOpts||e;for(const[r,n]of t)i[r]=n;return i}},6269:function(e){"use strict";e.exports={}},6279:function(e,t,i){"use strict";var r=i(6840);e.exports=function(e,t,i){for(var n in t)r(e,n,t[n],i);return e}},6280:function(e,t,i){"use strict";var r=i(6518),n=i(4576),o=i(8745),a=i(4601),s="WebAssembly",l=n[s],h=7!==new Error("e",{cause:7}).cause,d=function(e,t){var i={};i[e]=a(e,t,h),r({global:!0,constructor:!0,arity:1,forced:h},i)},u=function(e,t){if(l&&l[e]){var i={};i[e]=a(s+"."+e,t,h),r({target:s,stat:!0,constructor:!0,arity:1,forced:h},i)}};d("Error",function(e){return function(t){return o(e,this,arguments)}}),d("EvalError",function(e){return function(t){return o(e,this,arguments)}}),d("RangeError",function(e){return function(t){return o(e,this,arguments)}}),d("ReferenceError",function(e){return function(t){return o(e,this,arguments)}}),d("SyntaxError",function(e){return function(t){return o(e,this,arguments)}}),d("TypeError",function(e){return function(t){return o(e,this,arguments)}}),d("URIError",function(e){return function(t){return o(e,this,arguments)}}),u("CompileError",function(e){return function(t){return o(e,this,arguments)}}),u("LinkError",function(e){return function(t){return o(e,this,arguments)}}),u("RuntimeError",function(e){return function(t){return o(e,this,arguments)}})},6319:function(e,t,i){"use strict";var r=i(8551),n=i(9539);e.exports=function(e,t,i,o){try{return o?t(r(i)[0],i[1]):t(i)}catch(a){n(e,"throw",a)}}},6395:function(e){"use strict";e.exports=!1},6468:function(e,t,i){"use strict";var r=i(6518),n=i(4576),o=i(9504),a=i(2796),s=i(6840),l=i(3451),h=i(2652),d=i(679),u=i(4901),c=i(4117),f=i(34),v=i(9039),g=i(4428),y=i(687),p=i(3167);e.exports=function(e,t,i){var w=-1!==e.indexOf("Map"),x=-1!==e.indexOf("Weak"),m=w?"set":"add",b=n[e],k=b&&b.prototype,C=b,S={},I=function(e){var t=o(k[e]);s(k,e,"add"===e?function(e){return t(this,0===e?0:e),this}:"delete"===e?function(e){return!(x&&!f(e))&&t(this,0===e?0:e)}:"get"===e?function(e){return x&&!f(e)?void 0:t(this,0===e?0:e)}:"has"===e?function(e){return!(x&&!f(e))&&t(this,0===e?0:e)}:function(e,i){return t(this,0===e?0:e,i),this})},T=a(e,!u(b)||!(x||k.forEach&&!v(function(){(new b).entries().next()})));if(T)C=i.getConstructor(t,e,w,m),l.enable();else if(a(e,!0)){var A=new C,R=A[m](x?{}:-0,1)!==A,D=v(function(){A.has(1)}),E=g(function(e){new b(e)}),P=!x&&v(function(){var e=new b,t=5;while(t--)e[m](t,t);return!e.has(-0)});E||(C=t(function(e,t){d(e,k);var i=p(new b,e,C);return c(t)||h(t,i[m],{that:i,AS_ENTRIES:w}),i}),C.prototype=k,k.constructor=C),(D||P)&&(I("delete"),I("has"),w&&I("get")),(P||R)&&I(m),x&&k.clear&&delete k.clear}return S[e]=C,r({global:!0,constructor:!0,forced:C!==b},S),y(C,e),x||i.setStrong(C,e,w),C}},6469:function(e,t,i){"use strict";var r=i(8227),n=i(2360),o=i(4913).f,a=r("unscopables"),s=Array.prototype;void 0===s[a]&&o(s,a,{configurable:!0,value:n(null)}),e.exports=function(e){s[a][e]=!0}},6499:function(e,t,i){"use strict";var r=i(6518),n=i(9565),o=i(9306),a=i(6043),s=i(1103),l=i(2652),h=i(537);r({target:"Promise",stat:!0,forced:h},{all:function(e){var t=this,i=a.f(t),r=i.resolve,h=i.reject,d=s(function(){var i=o(t.resolve),a=[],s=0,d=1;l(e,function(e){var o=s++,l=!1;d++,n(i,t,e).then(function(e){l||(l=!0,a[o]=e,--d||r(a))},h)}),--d||r(a)});return d.error&&h(d.value),i.promise}})},6518:function(e,t,i){"use strict";var r=i(4576),n=i(7347).f,o=i(6699),a=i(6840),s=i(9433),l=i(7740),h=i(2796);e.exports=function(e,t){var i,d,u,c,f,v,g=e.target,y=e.global,p=e.stat;if(d=y?r:p?r[g]||s(g,{}):r[g]&&r[g].prototype,d)for(u in t){if(f=t[u],e.dontCallGetSet?(v=n(d,u),c=v&&v.value):c=d[u],i=h(y?u:g+(p?".":"#")+u,e.forced),!i&&void 0!==c){if(typeof f==typeof c)continue;l(f,c)}(e.sham||c&&c.sham)&&o(f,"sham",!0),a(d,u,f,e)}}},6682:function(e,t,i){"use strict";var r=i(9565),n=i(8551),o=i(4901),a=i(2195),s=i(7323),l=TypeError;e.exports=function(e,t){var i=e.exec;if(o(i)){var h=r(i,e,t);return null!==h&&n(h),h}if("RegExp"===a(e))return r(s,e,t);throw new l("RegExp#exec called on incompatible receiver")}},6699:function(e,t,i){"use strict";var r=i(3724),n=i(4913),o=i(6980);e.exports=r?function(e,t,i){return n.f(e,t,o(1,i))}:function(e,t,i){return e[t]=i,e}},6706:function(e,t,i){"use strict";var r=i(9504),n=i(9306);e.exports=function(e,t,i){try{return r(n(Object.getOwnPropertyDescriptor(e,t)[i]))}catch(o){}}},6761:function(e,t,i){"use strict";var r=i(6518),n=i(4576),o=i(9565),a=i(9504),s=i(6395),l=i(3724),h=i(4495),d=i(9039),u=i(9297),c=i(1625),f=i(8551),v=i(5397),g=i(6969),y=i(655),p=i(6980),w=i(2360),x=i(1072),m=i(8480),b=i(298),k=i(3717),C=i(7347),S=i(4913),I=i(6801),T=i(8773),A=i(6840),R=i(2106),D=i(5745),E=i(6119),P=i(421),O=i(3392),M=i(8227),B=i(1951),H=i(5749),F=i(8242),L=i(687),W=i(1181),z=i(9213).forEach,N=E("hidden"),V="Symbol",_="prototype",j=W.set,Y=W.getterFor(V),G=Object[_],X=n.Symbol,U=X&&X[_],q=n.RangeError,K=n.TypeError,J=n.QObject,Q=C.f,Z=S.f,$=b.f,ee=T.f,te=a([].push),ie=D("symbols"),re=D("op-symbols"),ne=D("wks"),oe=!J||!J[_]||!J[_].findChild,ae=function(e,t,i){var r=Q(G,t);r&&delete G[t],Z(e,t,i),r&&e!==G&&Z(G,t,r)},se=l&&d(function(){return 7!==w(Z({},"a",{get:function(){return Z(this,"a",{value:7}).a}})).a})?ae:Z,le=function(e,t){var i=ie[e]=w(U);return j(i,{type:V,tag:e,description:t}),l||(i.description=t),i},he=function(e,t,i){e===G&&he(re,t,i),f(e);var r=g(t);return f(i),u(ie,r)?(i.enumerable?(u(e,N)&&e[N][r]&&(e[N][r]=!1),i=w(i,{enumerable:p(0,!1)})):(u(e,N)||Z(e,N,p(1,w(null))),e[N][r]=!0),se(e,r,i)):Z(e,r,i)},de=function(e,t){f(e);var i=v(t),r=x(i).concat(ge(i));return z(r,function(t){l&&!o(ce,i,t)||he(e,t,i[t])}),e},ue=function(e,t){return void 0===t?w(e):de(w(e),t)},ce=function(e){var t=g(e),i=o(ee,this,t);return!(this===G&&u(ie,t)&&!u(re,t))&&(!(i||!u(this,t)||!u(ie,t)||u(this,N)&&this[N][t])||i)},fe=function(e,t){var i=v(e),r=g(t);if(i!==G||!u(ie,r)||u(re,r)){var n=Q(i,r);return!n||!u(ie,r)||u(i,N)&&i[N][r]||(n.enumerable=!0),n}},ve=function(e){var t=$(v(e)),i=[];return z(t,function(e){u(ie,e)||u(P,e)||te(i,e)}),i},ge=function(e){var t=e===G,i=$(t?re:v(e)),r=[];return z(i,function(e){!u(ie,e)||t&&!u(G,e)||te(r,ie[e])}),r};h||(X=function(){if(c(U,this))throw new K("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,t=O(e),i=function(e){var r=void 0===this?n:this;r===G&&o(i,re,e),u(r,N)&&u(r[N],t)&&(r[N][t]=!1);var a=p(1,e);try{se(r,t,a)}catch(s){if(!(s instanceof q))throw s;ae(r,t,a)}};return l&&oe&&se(G,t,{configurable:!0,set:i}),le(t,e)},U=X[_],A(U,"toString",function(){return Y(this).tag}),A(X,"withoutSetter",function(e){return le(O(e),e)}),T.f=ce,S.f=he,I.f=de,C.f=fe,m.f=b.f=ve,k.f=ge,B.f=function(e){return le(M(e),e)},l&&(R(U,"description",{configurable:!0,get:function(){return Y(this).description}}),s||A(G,"propertyIsEnumerable",ce,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!h,sham:!h},{Symbol:X}),z(x(ne),function(e){H(e)}),r({target:V,stat:!0,forced:!h},{useSetter:function(){oe=!0},useSimple:function(){oe=!1}}),r({target:"Object",stat:!0,forced:!h,sham:!l},{create:ue,defineProperty:he,defineProperties:de,getOwnPropertyDescriptor:fe}),r({target:"Object",stat:!0,forced:!h},{getOwnPropertyNames:ve}),F(),L(X,V),P[N]=!0},6801:function(e,t,i){"use strict";var r=i(3724),n=i(8686),o=i(4913),a=i(8551),s=i(5397),l=i(1072);t.f=r&&!n?Object.defineProperties:function(e,t){a(e);var i,r=s(t),n=l(t),h=n.length,d=0;while(h>d)o.f(e,i=n[d++],r[i]);return e}},6823:function(e){"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(i){return"Object"}}},6837:function(e){"use strict";var t=TypeError,i=9007199254740991;e.exports=function(e){if(e>i)throw t("Maximum allowed index exceeded");return e}},6840:function(e,t,i){"use strict";var r=i(4901),n=i(4913),o=i(283),a=i(9433);e.exports=function(e,t,i,s){s||(s={});var l=s.enumerable,h=void 0!==s.name?s.name:t;if(r(i)&&o(i,h,s),s.global)l?e[t]=i:a(t,i);else{try{s.unsafe?e[t]&&(l=!0):delete e[t]}catch(d){}l?e[t]=i:n.f(e,t,{value:i,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},6910:function(e,t,i){"use strict";var r=i(6518),n=i(9504),o=i(9306),a=i(8981),s=i(6198),l=i(4606),h=i(655),d=i(9039),u=i(4488),c=i(4598),f=i(3709),v=i(3763),g=i(9519),y=i(3607),p=[],w=n(p.sort),x=n(p.push),m=d(function(){p.sort(void 0)}),b=d(function(){p.sort(null)}),k=c("sort"),C=!d(function(){if(g)return g<70;if(!(f&&f>3)){if(v)return!0;if(y)return y<603;var e,t,i,r,n="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:i=3;break;case 68:case 71:i=4;break;default:i=2}for(r=0;r<47;r++)p.push({k:t+r,v:i})}for(p.sort(function(e,t){return t.v-e.v}),r=0;r<p.length;r++)t=p[r].k.charAt(0),n.charAt(n.length-1)!==t&&(n+=t);return"DGBEFHACIJK"!==n}}),S=m||!b||!k||!C,I=function(e){return function(t,i){return void 0===i?-1:void 0===t?1:void 0!==e?+e(t,i)||0:h(t)>h(i)?1:-1}};r({target:"Array",proto:!0,forced:S},{sort:function(e){void 0!==e&&o(e);var t=a(this);if(C)return void 0===e?w(t):w(t,e);var i,r,n=[],h=s(t);for(r=0;r<h;r++)r in t&&x(n,t[r]);u(n,I(e)),i=s(n),r=0;while(r<i)t[r]=n[r++];while(r<h)l(t,r++);return t}})},6938:function(e,t,i){"use strict";var r=i(2360),n=i(2106),o=i(6279),a=i(6080),s=i(679),l=i(4117),h=i(2652),d=i(1088),u=i(2529),c=i(7633),f=i(3724),v=i(3451).fastKey,g=i(1181),y=g.set,p=g.getterFor;e.exports={getConstructor:function(e,t,i,d){var u=e(function(e,n){s(e,c),y(e,{type:t,index:r(null),first:null,last:null,size:0}),f||(e.size=0),l(n)||h(n,e[d],{that:e,AS_ENTRIES:i})}),c=u.prototype,g=p(t),w=function(e,t,i){var r,n,o=g(e),a=x(e,t);return a?a.value=i:(o.last=a={index:n=v(t,!0),key:t,value:i,previous:r=o.last,next:null,removed:!1},o.first||(o.first=a),r&&(r.next=a),f?o.size++:e.size++,"F"!==n&&(o.index[n]=a)),e},x=function(e,t){var i,r=g(e),n=v(t);if("F"!==n)return r.index[n];for(i=r.first;i;i=i.next)if(i.key===t)return i};return o(c,{clear:function(){var e=this,t=g(e),i=t.first;while(i)i.removed=!0,i.previous&&(i.previous=i.previous.next=null),i=i.next;t.first=t.last=null,t.index=r(null),f?t.size=0:e.size=0},delete:function(e){var t=this,i=g(t),r=x(t,e);if(r){var n=r.next,o=r.previous;delete i.index[r.index],r.removed=!0,o&&(o.next=n),n&&(n.previous=o),i.first===r&&(i.first=n),i.last===r&&(i.last=o),f?i.size--:t.size--}return!!r},forEach:function(e){var t,i=g(this),r=a(e,arguments.length>1?arguments[1]:void 0);while(t=t?t.next:i.first){r(t.value,t.key,this);while(t&&t.removed)t=t.previous}},has:function(e){return!!x(this,e)}}),o(c,i?{get:function(e){var t=x(this,e);return t&&t.value},set:function(e,t){return w(this,0===e?0:e,t)}}:{add:function(e){return w(this,e=0===e?0:e,e)}}),f&&n(c,"size",{configurable:!0,get:function(){return g(this).size}}),u},setStrong:function(e,t,i){var r=t+" Iterator",n=p(t),o=p(r);d(e,t,function(e,t){y(this,{type:r,target:e,state:n(e),kind:t,last:null})},function(){var e=o(this),t=e.kind,i=e.last;while(i&&i.removed)i=i.previous;return e.target&&(e.last=i=i?i.next:e.state.first)?u("keys"===t?i.key:"values"===t?i.value:[i.key,i.value],!1):(e.target=null,u(void 0,!0))},i?"entries":"values",!i,!0),c(t)}}},6955:function(e,t,i){"use strict";var r=i(2140),n=i(4901),o=i(2195),a=i(8227),s=a("toStringTag"),l=Object,h="Arguments"===o(function(){return arguments}()),d=function(e,t){try{return e[t]}catch(i){}};e.exports=r?o:function(e){var t,i,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=d(t=l(e),s))?i:h?o(t):"Object"===(r=o(t))&&n(t.callee)?"Arguments":r}},6969:function(e,t,i){"use strict";var r=i(2777),n=i(757);e.exports=function(e){var t=r(e,"string");return n(t)?t:t+""}},6980:function(e){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},7040:function(e,t,i){"use strict";var r=i(4495);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7055:function(e,t,i){"use strict";var r=i(9504),n=i(9039),o=i(2195),a=Object,s=r("".split);e.exports=n(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"===o(e)?s(e,""):a(e)}:a},7080:function(e,t,i){"use strict";var r=i(4402).has;e.exports=function(e){return r(e),e}},7240:function(e,t,i){"use strict";var r=i(9504),n=i(7750),o=i(655),a=/"/g,s=r("".replace);e.exports=function(e,t,i,r){var l=o(n(e)),h="<"+t;return""!==i&&(h+=" "+i+'="'+s(o(r),a,"&quot;")+'"'),h+">"+l+"</"+t+">"}},7323:function(e,t,i){"use strict";var r=i(9565),n=i(9504),o=i(655),a=i(7979),s=i(8429),l=i(5745),h=i(2360),d=i(1181).get,u=i(3635),c=i(8814),f=l("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,g=v,y=n("".charAt),p=n("".indexOf),w=n("".replace),x=n("".slice),m=function(){var e=/a/,t=/b*/g;return r(v,e,"a"),r(v,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),b=s.BROKEN_CARET,k=void 0!==/()??/.exec("")[1],C=m||k||b||u||c;C&&(g=function(e){var t,i,n,s,l,u,c,C=this,S=d(C),I=o(e),T=S.raw;if(T)return T.lastIndex=C.lastIndex,t=r(g,T,I),C.lastIndex=T.lastIndex,t;var A=S.groups,R=b&&C.sticky,D=r(a,C),E=C.source,P=0,O=I;if(R&&(D=w(D,"y",""),-1===p(D,"g")&&(D+="g"),O=x(I,C.lastIndex),C.lastIndex>0&&(!C.multiline||C.multiline&&"\n"!==y(I,C.lastIndex-1))&&(E="(?: "+E+")",O=" "+O,P++),i=new RegExp("^(?:"+E+")",D)),k&&(i=new RegExp("^"+E+"$(?!\\s)",D)),m&&(n=C.lastIndex),s=r(v,R?i:C,O),R?s?(s.input=x(s.input,P),s[0]=x(s[0],P),s.index=C.lastIndex,C.lastIndex+=s[0].length):C.lastIndex=0:m&&s&&(C.lastIndex=C.global?s.index+s[0].length:n),k&&s&&s.length>1&&r(f,s[0],i,function(){for(l=1;l<arguments.length-2;l++)void 0===arguments[l]&&(s[l]=void 0)}),s&&A)for(s.groups=u=h(null),l=0;l<A.length;l++)c=A[l],u[c[0]]=s[c[1]];return s}),e.exports=g},7347:function(e,t,i){"use strict";var r=i(3724),n=i(9565),o=i(8773),a=i(6980),s=i(5397),l=i(6969),h=i(9297),d=i(5917),u=Object.getOwnPropertyDescriptor;t.f=r?u:function(e,t){if(e=s(e),t=l(t),d)try{return u(e,t)}catch(i){}if(h(e,t))return a(!n(o.f,e,t),e[t])}},7400:function(e){"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},7433:function(e,t,i){"use strict";var r=i(4376),n=i(3517),o=i(34),a=i(8227),s=a("species"),l=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,n(t)&&(t===l||r(t.prototype))?t=void 0:o(t)&&(t=t[s],null===t&&(t=void 0))),void 0===t?l:t}},7452:function(e){"use strict";e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},7465:function(e,t,i){"use strict";var r=i(3724),n=i(3635),o=i(2195),a=i(2106),s=i(1181).get,l=RegExp.prototype,h=TypeError;r&&n&&a(l,"dotAll",{configurable:!0,get:function(){if(this!==l){if("RegExp"===o(this))return!!s(this).dotAll;throw new h("Incompatible receiver, RegExp required")}}})},7476:function(e,t,i){"use strict";var r=i(2195),n=i(9504);e.exports=function(e){if("Function"===r(e))return n(e)}},7495:function(e,t,i){"use strict";var r=i(6518),n=i(7323);r({target:"RegExp",proto:!0,forced:/./.exec!==n},{exec:n})},7584:function(e,t,i){"use strict";var r=i(34),n=i(6699);e.exports=function(e,t){r(t)&&"cause"in t&&n(e,"cause",t.cause)}},7588:function(e,t,i){"use strict";var r=i(6518),n=i(9565),o=i(2652),a=i(9306),s=i(8551),l=i(1767),h=i(9539),d=i(4549),u=d("forEach",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:u},{forEach:function(e){s(this);try{a(e)}catch(r){h(this,"throw",r)}if(u)return n(u,this,e);var t=l(this),i=0;o(t,function(t){e(t,i++)},{IS_RECORD:!0})}})},7629:function(e,t,i){"use strict";var r=i(6395),n=i(4576),o=i(9433),a="__core-js_shared__",s=e.exports=n[a]||o(a,{});(s.versions||(s.versions=[])).push({version:"3.47.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.47.0/LICENSE",source:"https://github.com/zloirock/core-js"})},7633:function(e,t,i){"use strict";var r=i(7751),n=i(2106),o=i(8227),a=i(3724),s=o("species");e.exports=function(e){var t=r(e);a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},7642:function(e,t,i){"use strict";var r=i(6518),n=i(3440),o=i(9039),a=i(4916),s=!a("difference",function(e){return 0===e.size}),l=s||o(function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var i=e++>1;return t.has(1)&&t.clear(),{done:i,value:2}}}}},t=new Set([1,2,3,4]);return 3!==t.difference(e).size});r({target:"Set",proto:!0,real:!0,forced:l},{difference:n})},7657:function(e,t,i){"use strict";var r,n,o,a=i(9039),s=i(4901),l=i(34),h=i(2360),d=i(2787),u=i(6840),c=i(8227),f=i(6395),v=c("iterator"),g=!1;[].keys&&(o=[].keys(),"next"in o?(n=d(d(o)),n!==Object.prototype&&(r=n)):g=!0);var y=!l(r)||a(function(){var e={};return r[v].call(e)!==e});y?r={}:f&&(r=h(r)),s(r[v])||u(r,v,function(){return this}),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:g}},7680:function(e,t,i){"use strict";var r=i(9504);e.exports=r([].slice)},7740:function(e,t,i){"use strict";var r=i(9297),n=i(5031),o=i(7347),a=i(4913);e.exports=function(e,t,i){for(var s=n(t),l=a.f,h=o.f,d=0;d<s.length;d++){var u=s[d];r(e,u)||i&&r(i,u)||l(e,u,h(t,u))}}},7743:function(e,t,i){"use strict";var r=i(6518),n=i(9565),o=i(9306),a=i(6043),s=i(1103),l=i(2652),h=i(537);r({target:"Promise",stat:!0,forced:h},{race:function(e){var t=this,i=a.f(t),r=i.reject,h=s(function(){var a=o(t.resolve);l(e,function(e){n(a,t,e).then(i.resolve,r)})});return h.error&&r(h.value),i.promise}})},7745:function(e,t,i){"use strict";var r=i(3724),n=i(8429).MISSED_STICKY,o=i(2195),a=i(2106),s=i(1181).get,l=RegExp.prototype,h=TypeError;r&&n&&a(l,"sticky",{configurable:!0,get:function(){if(this!==l){if("RegExp"===o(this))return!!s(this).sticky;throw new h("Incompatible receiver, RegExp required")}}})},7750:function(e,t,i){"use strict";var r=i(4117),n=TypeError;e.exports=function(e){if(r(e))throw new n("Can't call method on "+e);return e}},7751:function(e,t,i){"use strict";var r=i(4576),n=i(4901),o=function(e){return n(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e]):r[e]&&r[e][t]}},7764:function(e,t,i){"use strict";var r=i(8183).charAt,n=i(655),o=i(1181),a=i(1088),s=i(2529),l="String Iterator",h=o.set,d=o.getterFor(l);a(String,"String",function(e){h(this,{type:l,string:n(e),index:0})},function(){var e,t=d(this),i=t.string,n=t.index;return n>=i.length?s(void 0,!0):(e=r(i,n),t.index+=e.length,s(e,!1))})},7812:function(e,t,i){"use strict";var r=i(6518),n=i(9297),o=i(757),a=i(6823),s=i(5745),l=i(1296),h=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!l},{keyFor:function(e){if(!o(e))throw new TypeError(a(e)+" is not a symbol");if(n(h,e))return h[e]}})},7819:function(e,t,i){"use strict";var r=i(9039);e.exports=!r(function(){var e="9007199254740993",t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e})},7829:function(e,t,i){"use strict";var r=i(8183).charAt;e.exports=function(e,t,i){return t+(i?r(e,t).length:1)}},7860:function(e,t,i){"use strict";var r=i(2839);e.exports=/web0s(?!.*chrome)/i.test(r)},7916:function(e,t,i){"use strict";var r=i(6080),n=i(9565),o=i(8981),a=i(6319),s=i(4209),l=i(3517),h=i(6198),d=i(4659),u=i(81),c=i(851),f=Array;e.exports=function(e){var t=o(e),i=l(this),v=arguments.length,g=v>1?arguments[1]:void 0,y=void 0!==g;y&&(g=r(g,v>2?arguments[2]:void 0));var p,w,x,m,b,k,C=c(t),S=0;if(!C||this===f&&s(C))for(p=h(t),w=i?new this(p):f(p);p>S;S++)k=y?g(t[S],S):t[S],d(w,S,k);else for(w=i?new this:[],m=u(t,C),b=m.next;!(x=n(b,m)).done;S++)k=y?a(m,g,[x.value,S],!0):x.value,d(w,S,k);return w.length=S,w}},7979:function(e,t,i){"use strict";var r=i(8551);e.exports=function(){var e=r(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},8004:function(e,t,i){"use strict";var r=i(6518),n=i(9039),o=i(8750),a=i(4916),s=!a("intersection",function(e){return 2===e.size&&e.has(1)&&e.has(2)})||n(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))});r({target:"Set",proto:!0,real:!0,forced:s},{intersection:o})},8014:function(e,t,i){"use strict";var r=i(1291),n=Math.min;e.exports=function(e){var t=r(e);return t>0?n(t,9007199254740991):0}},8111:function(e,t,i){"use strict";var r=i(6518),n=i(4576),o=i(679),a=i(8551),s=i(4901),l=i(2787),h=i(2106),d=i(4659),u=i(9039),c=i(9297),f=i(8227),v=i(7657).IteratorPrototype,g=i(3724),y=i(6395),p="constructor",w="Iterator",x=f("toStringTag"),m=TypeError,b=n[w],k=y||!s(b)||b.prototype!==v||!u(function(){b({})}),C=function(){if(o(this,v),l(this)===v)throw new m("Abstract class Iterator not directly constructable")},S=function(e,t){g?h(v,e,{configurable:!0,get:function(){return t},set:function(t){if(a(this),this===v)throw new m("You can't redefine this property");c(this,e)?this[e]=t:d(this,e,t)}}):v[e]=t};c(v,x)||S(x,w),!k&&c(v,p)&&v[p]!==Object||S(p,C),C.prototype=v,r({global:!0,constructor:!0,forced:k},{Iterator:C})},8126:function(e,t,i){"use strict";var r=i(6518),n=i(7240),o=i(3061);r({target:"String",proto:!0,forced:o("bold")},{bold:function(){return n(this,"b","","")}})},8156:function(e,t,i){"use strict";var r=i(6518),n=i(533).start,o=i(3063);r({target:"String",proto:!0,forced:o},{padStart:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}})},8183:function(e,t,i){"use strict";var r=i(9504),n=i(1291),o=i(655),a=i(7750),s=r("".charAt),l=r("".charCodeAt),h=r("".slice),d=function(e){return function(t,i){var r,d,u=o(a(t)),c=n(i),f=u.length;return c<0||c>=f?e?"":void 0:(r=l(u,c),r<55296||r>56319||c+1===f||(d=l(u,c+1))<56320||d>57343?e?s(u,c):r:e?h(u,c,c+2):d-56320+(r-55296<<10)+65536)}};e.exports={codeAt:d(!1),charAt:d(!0)}},8227:function(e,t,i){"use strict";var r=i(4576),n=i(5745),o=i(9297),a=i(3392),s=i(4495),l=i(7040),h=r.Symbol,d=n("wks"),u=l?h["for"]||h:h&&h.withoutSetter||a;e.exports=function(e){return o(d,e)||(d[e]=s&&o(h,e)?h[e]:u("Symbol."+e)),d[e]}},8235:function(e,t,i){"use strict";var r=i(9504),n=i(9297),o=SyntaxError,a=parseInt,s=String.fromCharCode,l=r("".charAt),h=r("".slice),d=r(/./.exec),u={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},c=/^[\da-f]{4}$/i,f=/^[\u0000-\u001F]$/;e.exports=function(e,t){var i=!0,r="";while(t<e.length){var v=l(e,t);if("\\"===v){var g=h(e,t,t+2);if(n(u,g))r+=u[g],t+=2;else{if("\\u"!==g)throw new o('Unknown escape sequence: "'+g+'"');t+=2;var y=h(e,t,t+4);if(!d(c,y))throw new o("Bad Unicode escape at: "+t);r+=s(a(y,16)),t+=4}}else{if('"'===v){i=!1,t++;break}if(d(f,v))throw new o("Bad control character in string literal at: "+t);r+=v,t++}}if(i)throw new o("Unterminated string at: "+t);return{value:r,end:t}}},8237:function(e,t,i){"use strict";var r=i(6518),n=i(2652),o=i(9306),a=i(8551),s=i(1767),l=i(9539),h=i(4549),d=i(8745),u=i(9039),c=TypeError,f=u(function(){[].keys().reduce(function(){},void 0)}),v=!f&&h("reduce",c);r({target:"Iterator",proto:!0,real:!0,forced:f||v},{reduce:function(e){a(this);try{o(e)}catch(u){l(this,"throw",u)}var t=arguments.length<2,i=t?void 0:arguments[1];if(v)return d(v,this,t?[e]:[e,i]);var r=s(this),h=0;if(n(r,function(r){t?(t=!1,i=r):i=e(i,r,h),h++},{IS_RECORD:!0}),t)throw new c("Reduce of empty iterator with no initial value");return i}})},8242:function(e,t,i){"use strict";var r=i(9565),n=i(7751),o=i(8227),a=i(6840);e.exports=function(){var e=n("Symbol"),t=e&&e.prototype,i=t&&t.valueOf,s=o("toPrimitive");t&&!t[s]&&a(t,s,function(e){return r(i,this)},{arity:1})}},8265:function(e){"use strict";var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null},i=this.tail;i?i.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e){var t=this.head=e.next;return null===t&&(this.tail=null),e.item}}},e.exports=t},8335:function(e,t,i){"use strict";i(9112)},8347:function(e,t,i){"use strict";var r=i(6518),n=i(9297);r({target:"Object",stat:!0},{hasOwn:n})},8429:function(e,t,i){"use strict";var r=i(9039),n=i(4576),o=n.RegExp,a=r(function(){var e=o("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),s=a||r(function(){return!o("a","y").sticky}),l=a||r(function(){var e=o("^r","gy");return e.lastIndex=2,null!==e.exec("str")});e.exports={BROKEN_CARET:l,MISSED_STICKY:s,UNSUPPORTED_Y:a}},8469:function(e,t,i){"use strict";var r=i(9504),n=i(507),o=i(4402),a=o.Set,s=o.proto,l=r(s.forEach),h=r(s.keys),d=h(new a).next;e.exports=function(e,t,i){return i?n({iterator:h(e),next:d},t):l(e,t)}},8480:function(e,t,i){"use strict";var r=i(1828),n=i(8727),o=n.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},8523:function(e,t,i){"use strict";var r=i(6468),n=i(6938);r("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},n)},8527:function(e,t,i){"use strict";var r=i(7080),n=i(4402).has,o=i(5170),a=i(3789),s=i(507),l=i(9539);e.exports=function(e){var t=r(this),i=a(e);if(o(t)<i.size)return!1;var h=i.getIterator();return!1!==s(h,function(e){if(!n(t,e))return l(h,"normal",!1)})}},8551:function(e,t,i){"use strict";var r=i(34),n=String,o=TypeError;e.exports=function(e){if(r(e))return e;throw new o(n(e)+" is not an object")}},8574:function(e,t,i){"use strict";var r=i(4215);e.exports="NODE"===r},8598:function(e,t,i){"use strict";var r=i(6518),n=i(9504),o=i(7055),a=i(5397),s=i(4598),l=n([].join),h=o!==Object,d=h||!s("join",",");r({target:"Array",proto:!0,forced:d},{join:function(e){return l(a(this),void 0===e?",":e)}})},8622:function(e,t,i){"use strict";var r=i(4576),n=i(4901),o=r.WeakMap;e.exports=n(o)&&/native code/.test(String(o))},8686:function(e,t,i){"use strict";var r=i(3724),n=i(9039);e.exports=r&&n(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},8706:function(e,t,i){"use strict";var r=i(6518),n=i(9039),o=i(4376),a=i(34),s=i(8981),l=i(6198),h=i(6837),d=i(4659),u=i(1469),c=i(597),f=i(8227),v=i(9519),g=f("isConcatSpreadable"),y=v>=51||!n(function(){var e=[];return e[g]=!1,e.concat()[0]!==e}),p=function(e){if(!a(e))return!1;var t=e[g];return void 0!==t?!!t:o(e)},w=!y||!c("concat");r({target:"Array",proto:!0,arity:1,forced:w},{concat:function(e){var t,i,r,n,o,a=s(this),c=u(a,0),f=0;for(t=-1,r=arguments.length;t<r;t++)if(o=-1===t?a:arguments[t],p(o))for(n=l(o),h(f+n),i=0;i<n;i++,f++)i in o&&d(c,f,o[i]);else h(f+1),d(c,f++,o);return c.length=f,c}})},8727:function(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8745:function(e,t,i){"use strict";var r=i(616),n=Function.prototype,o=n.apply,a=n.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(o):function(){return a.apply(o,arguments)})},8750:function(e,t,i){"use strict";var r=i(7080),n=i(4402),o=i(5170),a=i(3789),s=i(8469),l=i(507),h=n.Set,d=n.add,u=n.has;e.exports=function(e){var t=r(this),i=a(e),n=new h;return o(t)>i.size?l(i.getIterator(),function(e){u(t,e)&&d(n,e)}):s(t,function(e){i.includes(e)&&d(n,e)}),n}},8773:function(e,t){"use strict";var i={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,n=r&&!i.call({1:2},1);t.f=n?function(e){var t=r(this,e);return!!t&&t.enumerable}:i},8781:function(e,t,i){"use strict";var r=i(350).PROPER,n=i(6840),o=i(8551),a=i(655),s=i(9039),l=i(1034),h="toString",d=RegExp.prototype,u=d[h],c=s(function(){return"/a/b"!==u.call({source:"a",flags:"b"})}),f=r&&u.name!==h;(c||f)&&n(d,h,function(){var e=o(this),t=a(e.source),i=a(l(e));return"/"+t+"/"+i},{unsafe:!0})},8814:function(e,t,i){"use strict";var r=i(9039),n=i(4576),o=n.RegExp;e.exports=r(function(){var e=o("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})},8841:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r=i(5208),n=i(2515),o={blocks:function(e){for(var t=0,i=[],r=e.data.length,o=0,a=(0,n.readByte)()(e);a!==t;a=(0,n.readByte)()(e)){if(!a)break;if(e.pos+a>=r){var s=r-e.pos;i.push((0,n.readBytes)(s)(e)),o+=s;break}i.push((0,n.readBytes)(a)(e)),o+=a}for(var l=new Uint8Array(o),h=0,d=0;d<i.length;d++)l.set(i[d],h),h+=i[d].length;return l}},a=(0,r.conditional)({gce:[{codes:(0,n.readBytes)(2)},{byteSize:(0,n.readByte)()},{extras:(0,n.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,n.readUnsigned)(!0)},{transparentColorIndex:(0,n.readByte)()},{terminator:(0,n.readByte)()}]},function(e){var t=(0,n.peekBytes)(2)(e);return 33===t[0]&&249===t[1]}),s=(0,r.conditional)({image:[{code:(0,n.readByte)()},{descriptor:[{left:(0,n.readUnsigned)(!0)},{top:(0,n.readUnsigned)(!0)},{width:(0,n.readUnsigned)(!0)},{height:(0,n.readUnsigned)(!0)},{lct:(0,n.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,r.conditional)({lct:(0,n.readArray)(3,function(e,t,i){return Math.pow(2,i.descriptor.lct.size+1)})},function(e,t,i){return i.descriptor.lct.exists}),{data:[{minCodeSize:(0,n.readByte)()},o]}]},function(e){return 44===(0,n.peekByte)()(e)}),l=(0,r.conditional)({text:[{codes:(0,n.readBytes)(2)},{blockSize:(0,n.readByte)()},{preData:function(e,t,i){return(0,n.readBytes)(i.text.blockSize)(e)}},o]},function(e){var t=(0,n.peekBytes)(2)(e);return 33===t[0]&&1===t[1]}),h=(0,r.conditional)({application:[{codes:(0,n.readBytes)(2)},{blockSize:(0,n.readByte)()},{id:function(e,t,i){return(0,n.readString)(i.blockSize)(e)}},o]},function(e){var t=(0,n.peekBytes)(2)(e);return 33===t[0]&&255===t[1]}),d=(0,r.conditional)({comment:[{codes:(0,n.readBytes)(2)},o]},function(e){var t=(0,n.peekBytes)(2)(e);return 33===t[0]&&254===t[1]}),u=[{header:[{signature:(0,n.readString)(3)},{version:(0,n.readString)(3)}]},{lsd:[{width:(0,n.readUnsigned)(!0)},{height:(0,n.readUnsigned)(!0)},{gct:(0,n.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,n.readByte)()},{pixelAspectRatio:(0,n.readByte)()}]},(0,r.conditional)({gct:(0,n.readArray)(3,function(e,t){return Math.pow(2,t.lsd.gct.size+1)})},function(e,t){return t.lsd.gct.exists}),{frames:(0,r.loop)([a,h,d,s,l],function(e){var t=(0,n.peekByte)()(e);return 33===t||44===t})}],c=u;t["default"]=c},8980:function(e,t,i){"use strict";var r=i(6518),n=i(9213).findIndex,o=i(6469),a="findIndex",s=!0;a in[]&&Array(1)[a](function(){s=!1}),r({target:"Array",proto:!0,forced:s},{findIndex:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}}),o(a)},8981:function(e,t,i){"use strict";var r=i(7750),n=Object;e.exports=function(e){return n(r(e))}},9039:function(e){"use strict";e.exports=function(e){try{return!!e()}catch(t){return!0}}},9085:function(e,t,i){"use strict";var r=i(6518),n=i(4213);r({target:"Object",stat:!0,arity:2,forced:Object.assign!==n},{assign:n})},9112:function(e,t,i){"use strict";var r=i(6518),n=i(3724),o=i(4576),a=i(7751),s=i(9504),l=i(9565),h=i(4901),d=i(34),u=i(4376),c=i(9297),f=i(655),v=i(6198),g=i(4659),y=i(9039),p=i(8235),w=i(4495),x=o.JSON,m=o.Number,b=o.SyntaxError,k=x&&x.parse,C=a("Object","keys"),S=Object.getOwnPropertyDescriptor,I=s("".charAt),T=s("".slice),A=s(/./.exec),R=s([].push),D=/^\d$/,E=/^[1-9]$/,P=/^[\d-]$/,O=/^[\t\n\r ]$/,M=0,B=1,H=function(e,t){e=f(e);var i=new z(e,0,""),r=i.parse(),n=r.value,o=i.skip(O,r.end);if(o<e.length)throw new b('Unexpected extra character: "'+I(e,o)+'" after the parsed data at: '+o);return h(t)?F({"":n},"",t,r):n},F=function(e,t,i,r){var n,o,a,s,h,f=e[t],g=r&&f===r.value,y=g&&"string"==typeof r.source?{source:r.source}:{};if(d(f)){var p=u(f),w=g?r.nodes:p?[]:{};if(p)for(n=w.length,a=v(f),s=0;s<a;s++)L(f,s,F(f,""+s,i,s<n?w[s]:void 0));else for(o=C(f),a=v(o),s=0;s<a;s++)h=o[s],L(f,h,F(f,h,i,c(w,h)?w[h]:void 0))}return l(i,e,t,f,y)},L=function(e,t,i){if(n){var r=S(e,t);if(r&&!r.configurable)return}void 0===i?delete e[t]:g(e,t,i)},W=function(e,t,i,r){this.value=e,this.end=t,this.source=i,this.nodes=r},z=function(e,t){this.source=e,this.index=t};z.prototype={fork:function(e){return new z(this.source,e)},parse:function(){var e=this.source,t=this.skip(O,this.index),i=this.fork(t),r=I(e,t);if(A(P,r))return i.number();switch(r){case"{":return i.object();case"[":return i.array();case'"':return i.string();case"t":return i.keyword(!0);case"f":return i.keyword(!1);case"n":return i.keyword(null)}throw new b('Unexpected character: "'+r+'" at: '+t)},node:function(e,t,i,r,n){return new W(t,r,e?null:T(this.source,i,r),n)},object:function(){var e=this.source,t=this.index+1,i=!1,r={},n={};while(t<e.length){if(t=this.until(['"',"}"],t),"}"===I(e,t)&&!i){t++;break}var o=this.fork(t).string(),a=o.value;t=o.end,t=this.until([":"],t)+1,t=this.skip(O,t),o=this.fork(t).parse(),g(n,a,o),g(r,a,o.value),t=this.until([",","}"],o.end);var s=I(e,t);if(","===s)i=!0,t++;else if("}"===s){t++;break}}return this.node(B,r,this.index,t,n)},array:function(){var e=this.source,t=this.index+1,i=!1,r=[],n=[];while(t<e.length){if(t=this.skip(O,t),"]"===I(e,t)&&!i){t++;break}var o=this.fork(t).parse();if(R(n,o),R(r,o.value),t=this.until([",","]"],o.end),","===I(e,t))i=!0,t++;else if("]"===I(e,t)){t++;break}}return this.node(B,r,this.index,t,n)},string:function(){var e=this.index,t=p(this.source,this.index+1);return this.node(M,t.value,e,t.end)},number:function(){var e=this.source,t=this.index,i=t;if("-"===I(e,i)&&i++,"0"===I(e,i))i++;else{if(!A(E,I(e,i)))throw new b("Failed to parse number at: "+i);i=this.skip(D,i+1)}if("."===I(e,i)&&(i=this.skip(D,i+1)),"e"===I(e,i)||"E"===I(e,i)){i++,"+"!==I(e,i)&&"-"!==I(e,i)||i++;var r=i;if(i=this.skip(D,i),r===i)throw new b("Failed to parse number's exponent value at: "+i)}return this.node(M,m(T(e,t,i)),t,i)},keyword:function(e){var t=""+e,i=this.index,r=i+t.length;if(T(this.source,i,r)!==t)throw new b("Failed to parse value at: "+i);return this.node(M,e,i,r)},skip:function(e,t){for(var i=this.source;t<i.length;t++)if(!A(e,I(i,t)))break;return t},until:function(e,t){t=this.skip(O,t);for(var i=I(this.source,t),r=0;r<e.length;r++)if(e[r]===i)return t;throw new b('Unexpected character: "'+i+'" at: '+t)}};var N=y(function(){var e,t="9007199254740993";return k(t,function(t,i,r){e=r.source}),e!==t}),V=w&&!y(function(){return 1/k("-0 \t")!==-1/0});r({target:"JSON",stat:!0,forced:N},{parse:function(e,t){return V&&!h(t)?k(e):H(e,t)}})},9167:function(e,t,i){"use strict";var r=i(4576);e.exports=r},9213:function(e,t,i){"use strict";var r=i(6080),n=i(9504),o=i(7055),a=i(8981),s=i(6198),l=i(1469),h=n([].push),d=function(e){var t=1===e,i=2===e,n=3===e,d=4===e,u=6===e,c=7===e,f=5===e||u;return function(v,g,y,p){for(var w,x,m=a(v),b=o(m),k=s(b),C=r(g,y),S=0,I=p||l,T=t?I(v,k):i||c?I(v,0):void 0;k>S;S++)if((f||S in b)&&(w=b[S],x=C(w,S,m),e))if(t)T[S]=x;else if(x)switch(e){case 3:return!0;case 5:return w;case 6:return S;case 2:h(T,w)}else switch(e){case 4:return!1;case 7:h(T,w)}return u?-1:n||d?d:T}};e.exports={forEach:d(0),map:d(1),filter:d(2),some:d(3),every:d(4),find:d(5),findIndex:d(6),filterReject:d(7)}},9225:function(e,t,i){"use strict";var r,n,o,a,s=i(4576),l=i(8745),h=i(6080),d=i(4901),u=i(9297),c=i(9039),f=i(397),v=i(7680),g=i(4055),y=i(2812),p=i(9544),w=i(8574),x=s.setImmediate,m=s.clearImmediate,b=s.process,k=s.Dispatch,C=s.Function,S=s.MessageChannel,I=s.String,T=0,A={},R="onreadystatechange";c(function(){r=s.location});var D=function(e){if(u(A,e)){var t=A[e];delete A[e],t()}},E=function(e){return function(){D(e)}},P=function(e){D(e.data)},O=function(e){s.postMessage(I(e),r.protocol+"//"+r.host)};x&&m||(x=function(e){y(arguments.length,1);var t=d(e)?e:C(e),i=v(arguments,1);return A[++T]=function(){l(t,void 0,i)},n(T),T},m=function(e){delete A[e]},w?n=function(e){b.nextTick(E(e))}:k&&k.now?n=function(e){k.now(E(e))}:S&&!p?(o=new S,a=o.port2,o.port1.onmessage=P,n=h(a.postMessage,a)):s.addEventListener&&d(s.postMessage)&&!s.importScripts&&r&&"file:"!==r.protocol&&!c(O)?(n=O,s.addEventListener("message",P,!1)):n=R in g("script")?function(e){f.appendChild(g("script"))[R]=function(){f.removeChild(this),D(e)}}:function(e){setTimeout(E(e),0)}),e.exports={set:x,clear:m}},9228:function(e,t,i){"use strict";i(7495);var r=i(9565),n=i(6840),o=i(7323),a=i(9039),s=i(8227),l=i(6699),h=s("species"),d=RegExp.prototype;e.exports=function(e,t,i,u){var c=s(e),f=!a(function(){var t={};return t[c]=function(){return 7},7!==""[e](t)}),v=f&&!a(function(){var t=!1,i=/a/;if("split"===e){var r={};r[h]=function(){return i},i={constructor:r,flags:""},i[c]=/./[c]}return i.exec=function(){return t=!0,null},i[c](""),!t});if(!f||!v||i){var g=/./[c],y=t(c,""[e],function(e,t,i,n,a){var s=t.exec;return s===o||s===d.exec?f&&!a?{done:!0,value:r(g,t,i,n)}:{done:!0,value:r(e,i,t,n)}:{done:!1}});n(String.prototype,e,y[0]),n(d,c,y[1])}u&&l(d[c],"sham",!0)}},9286:function(e,t,i){"use strict";var r=i(4402),n=i(8469),o=r.Set,a=r.add;e.exports=function(e){var t=new o;return n(e,function(e){a(t,e)}),t}},9296:function(e,t,i){"use strict";var r=i(4055),n=r("span").classList,o=n&&n.constructor&&n.constructor.prototype;e.exports=o===Object.prototype?void 0:o},9297:function(e,t,i){"use strict";var r=i(9504),n=i(8981),o=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(n(e),t)}},9306:function(e,t,i){"use strict";var r=i(4901),n=i(6823),o=TypeError;e.exports=function(e){if(r(e))return e;throw new o(n(e)+" is not a function")}},9432:function(e,t,i){"use strict";var r=i(6518),n=i(8981),o=i(1072),a=i(9039),s=a(function(){o(1)});r({target:"Object",stat:!0,forced:s},{keys:function(e){return o(n(e))}})},9433:function(e,t,i){"use strict";var r=i(4576),n=Object.defineProperty;e.exports=function(e,t){try{n(r,e,{value:t,configurable:!0,writable:!0})}catch(i){r[e]=t}return t}},9449:function(e,t,i){"use strict";var r=i(6518),n=i(7476),o=i(7347).f,a=i(8014),s=i(655),l=i(511),h=i(7750),d=i(1436),u=i(6395),c=n("".slice),f=Math.min,v=d("endsWith"),g=!u&&!v&&!!function(){var e=o(String.prototype,"endsWith");return e&&!e.writable}();r({target:"String",proto:!0,forced:!g&&!v},{endsWith:function(e){var t=s(h(this));l(e);var i=arguments.length>1?arguments[1]:void 0,r=t.length,n=void 0===i?r:f(a(i),r),o=s(e);return c(t,n-o.length,n)===o}})},9462:function(e,t,i){"use strict";var r=i(9565),n=i(2360),o=i(6699),a=i(6279),s=i(8227),l=i(1181),h=i(5966),d=i(7657).IteratorPrototype,u=i(2529),c=i(9539),f=i(1385),v=s("toStringTag"),g="IteratorHelper",y="WrapForValidIterator",p="normal",w="throw",x=l.set,m=function(e){var t=l.getterFor(e?y:g);return a(n(d),{next:function(){var i=t(this);if(e)return i.nextHandler();if(i.done)return u(void 0,!0);try{var r=i.nextHandler();return i.returnHandlerResult?r:u(r,i.done)}catch(n){throw i.done=!0,n}},return:function(){var i=t(this),n=i.iterator;if(i.done=!0,e){var o=h(n,"return");return o?r(o,n):u(void 0,!0)}if(i.inner)try{c(i.inner.iterator,p)}catch(a){return c(n,w,a)}if(i.openIters)try{f(i.openIters,p)}catch(a){return c(n,w,a)}return n&&c(n,p),u(void 0,!0)}})},b=m(!0),k=m(!1);o(k,v,"Iterator Helper"),e.exports=function(e,t,i){var r=function(r,n){n?(n.iterator=r.iterator,n.next=r.next):n=r,n.type=t?y:g,n.returnHandlerResult=!!i,n.nextHandler=e,n.counter=0,n.done=!1,x(this,n)};return r.prototype=t?b:k,r}},9463:function(e,t,i){"use strict";var r=i(6518),n=i(3724),o=i(4576),a=i(9504),s=i(9297),l=i(4901),h=i(1625),d=i(655),u=i(2106),c=i(7740),f=o.Symbol,v=f&&f.prototype;if(n&&l(f)&&(!("description"in v)||void 0!==f().description)){var g={},y=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:d(arguments[0]),t=h(v,this)?new f(e):void 0===e?f():f(e);return""===e&&(g[t]=!0),t};c(y,f),y.prototype=v,v.constructor=y;var p="Symbol(description detection)"===String(f("description detection")),w=a(v.valueOf),x=a(v.toString),m=/^Symbol\((.*)\)[^)]+$/,b=a("".replace),k=a("".slice);u(v,"description",{configurable:!0,get:function(){var e=w(this);if(s(g,e))return"";var t=x(e),i=p?k(t,7,-1):b(t,m,"$1");return""===i?void 0:i}}),r({global:!0,constructor:!0,forced:!0},{Symbol:y})}},9504:function(e,t,i){"use strict";var r=i(616),n=Function.prototype,o=n.call,a=r&&n.bind.bind(o,o);e.exports=r?a:function(e){return function(){return o.apply(e,arguments)}}},9519:function(e,t,i){"use strict";var r,n,o=i(4576),a=i(2839),s=o.process,l=o.Deno,h=s&&s.versions||l&&l.version,d=h&&h.v8;d&&(r=d.split("."),n=r[0]>0&&r[0]<4?1:+(r[0]+r[1])),!n&&a&&(r=a.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/),r&&(n=+r[1]))),e.exports=n},9539:function(e,t,i){"use strict";var r=i(9565),n=i(8551),o=i(5966);e.exports=function(e,t,i){var a,s;n(e);try{if(a=o(e,"return"),!a){if("throw"===t)throw i;return i}a=r(a,e)}catch(l){s=!0,a=l}if("throw"===t)throw i;if(s)throw a;return n(a),i}},9544:function(e,t,i){"use strict";var r=i(2839);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},9565:function(e,t,i){"use strict";var r=i(616),n=Function.prototype.call;e.exports=r?n.bind(n):function(){return n.apply(n,arguments)}},9572:function(e,t,i){"use strict";var r=i(9297),n=i(6840),o=i(3640),a=i(8227),s=a("toPrimitive"),l=Date.prototype;r(l,s)||n(l,s,o)},9617:function(e,t,i){"use strict";var r=i(5397),n=i(5610),o=i(6198),a=function(e){return function(t,i,a){var s=r(t),l=o(s);if(0===l)return!e&&-1;var h,d=n(a,l);if(e&&i!==i){while(l>d)if(h=s[d++],h!==h)return!0}else for(;l>d;d++)if((e||d in s)&&s[d]===i)return e||d||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},9773:function(e,t,i){"use strict";var r=i(6518),n=i(4495),o=i(9039),a=i(3717),s=i(8981),l=!n||o(function(){a.f(1)});r({target:"Object",stat:!0,forced:l},{getOwnPropertySymbols:function(e){var t=a.f;return t?t(s(e)):[]}})},9835:function(e){"use strict";e.exports=function(e){try{var t=new Set,i={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}},r=t[e](i);return 1===r.size&&4===r.values().next().value}catch(n){return!1}}},9868:function(e,t,i){"use strict";var r=i(6518),n=i(9504),o=i(1291),a=i(1240),s=i(2333),l=i(9039),h=RangeError,d=String,u=Math.floor,c=n(s),f=n("".slice),v=n(1.1.toFixed),g=function(e,t,i){return 0===t?i:t%2===1?g(e,t-1,i*e):g(e*e,t/2,i)},y=function(e){var t=0,i=e;while(i>=4096)t+=12,i/=4096;while(i>=2)t+=1,i/=2;return t},p=function(e,t,i){var r=-1,n=i;while(++r<6)n+=t*e[r],e[r]=n%1e7,n=u(n/1e7)},w=function(e,t){var i=6,r=0;while(--i>=0)r+=e[i],e[i]=u(r/t),r=r%t*1e7},x=function(e){var t=6,i="";while(--t>=0)if(""!==i||0===t||0!==e[t]){var r=d(e[t]);i=""===i?r:i+c("0",7-r.length)+r}return i},m=l(function(){return"0.000"!==v(8e-5,3)||"1"!==v(.9,0)||"1.25"!==v(1.255,2)||"1000000000000000128"!==v(0xde0b6b3a7640080,0)})||!l(function(){v({})});r({target:"Number",proto:!0,forced:m},{toFixed:function(e){var t,i,r,n,s=a(this),l=o(e),u=[0,0,0,0,0,0],v="",m="0";if(l<0||l>20)throw new h("Incorrect fraction digits");if(s!==s)return"NaN";if(s<=-1e21||s>=1e21)return d(s);if(s<0&&(v="-",s=-s),s>1e-21)if(t=y(s*g(2,69,1))-69,i=t<0?s*g(2,-t,1):s/g(2,t,1),i*=4503599627370496,t=52-t,t>0){p(u,0,i),r=l;while(r>=7)p(u,1e7,0),r-=7;p(u,g(10,r,1),0),r=t-1;while(r>=23)w(u,1<<23),r-=23;w(u,1<<r),p(u,1,1),w(u,2),m=x(u)}else p(u,0,i),p(u,1<<-t,0),m=x(u)+c("0",l);return l>0?(n=m.length,m=v+(n<=l?"0."+c("0",l-n)+m:f(m,0,n-l)+"."+f(m,n-l))):m=v+m,m}})}},t={};function i(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,i),o.exports}!function(){i.d=function(e,t){for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}}(),function(){i.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){i.p=""}();var r={};!function(){"use strict";if(i.r(r),i.d(r,{BooleanViewer:function(){return En},CELL_HEIGHT:function(){return v},CHECK_BOX_WIDTH:function(){return f},CSS_PREFIX:function(){return h},DATE_DISPLAY_TYPE:function(){return l},DEFAULT_GROUP_STYLES:function(){return Ci},DEFAULT_SEPARATOR_STYLES:function(){return Si},DatetimeViewer:function(){return Rn},EMPTY_VALUE:function(){return A},ERROR_TIP_COLOR:function(){return T},FILE_TYPE_FIELDS:function(){return E},FOOTER_HEIGHT:function(){return u},FileViewer:function(){return Bo},GROUP_TABLE_CONSTANTS:function(){return ki},GroupHeaderViewer:function(){return Bn},HEADER_HEIGHT:function(){return d},HyperlinkTextViewer:function(){return fo},ImageViewer:function(){return kn},MIN_CELL_HEIGHT:function(){return y},MIN_CELL_WIDTH:function(){return g},ModuleViewer:function(){return us},NestedGridViewer:function(){return Wn},PerformanceMonitor:function(){return Jr},PersonViewer:function(){return Sn},ProgressViewer:function(){return Tn},PunchViewer:function(){return eo},READONLY_COLOR:function(){return S},READONLY_TEXT_COLOR:function(){return I},ROW_INDEX_WIDTH:function(){return c},SCROLLER_COLOR:function(){return x},SCROLLER_FOCUS_COLOR:function(){return m},SCROLLER_SIZE:function(){return w},SCROLLER_TRACK_SIZE:function(){return p},SELECT_AREA_COLOR:function(){return k},SELECT_BG_COLOR:function(){return C},SELECT_BORDER_COLOR:function(){return b},SIZE_MAP:function(){return R},SelectViewer:function(){return mn},SeparatorRowViewer:function(){return Fn},StatusViewer:function(){return On},TableActionButtonViewer:function(){return xl},TaskNodeViewer:function(){return na},TextViewer:function(){return wn},TextViewerWithSwitcher:function(){return Rs},UpstreamViewer:function(){return Qs},VALIDATOR_TYPES:function(){return D},ViewerRegistry:function(){return hi},calCrossSpan:function(){return dt},default:function(){return Zl},defaultViewers:function(){return Kl},getFieldStatisticTypes:function(){return Gi},getIcon:function(){return ut},getIconByFileStatus:function(){return ct},getMaxRow:function(){return ht},getPerformanceMonitor:function(){return Zr},getViewerRegistry:function(){return li},install:function(){return Jl},isGroupRow:function(){return xi},isNestedGridViewerData:function(){return vn},isNormalRow:function(){return bi},isPersonViewerData:function(){return cn},isProgressViewerData:function(){return fn},isSelectViewerData:function(){return un},isSeparateRow:function(){return mi},isTextViewerData:function(){return dn},registerDefaultViewers:function(){return ql},toLeaf:function(){return lt}}),"undefined"!==typeof window){var e=window.document.currentScript,t=i(5003);e=t(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:t});var n=e&&e.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);n&&(i.p=n[1])}var o=require("vue"),a=["id"];function s(e,t,i,r,n,s){var l=(0,o.resolveDirective)("clickoutside");return(0,o.withDirectives)(((0,o.openBlock)(),(0,o.createElementBlock)("div",{class:(0,o.normalizeClass)(e.CSS_PREFIX)},[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)("".concat(e.CSS_PREFIX,"-main"))},[(0,o.createElementVNode)("canvas",{id:e.canvasId,class:(0,o.normalizeClass)("".concat(e.CSS_PREFIX,"-table"))},null,10,a),(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)("".concat(e.CSS_PREFIX,"-overlayer")),style:(0,o.normalizeStyle)({top:"".concat(e.tableHeaderHeight+1,"px")})},[e.loading?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:(0,o.normalizeClass)("".concat(e.CSS_PREFIX,"-loading"))},[(0,o.createElementVNode)("span",{class:(0,o.normalizeClass)("".concat(e.CSS_PREFIX,"-loading-dot"))},null,2)],2)):(0,o.createCommentVNode)("",!0)],6)],2)],2)),[[l,e.handleclickoutside]])}i(8706),i(4423),i(4782),i(2892),i(6099),i(8781),i(1699);var l,h="xs-data-grid",d=36,u=36,c=36,f=36,v=36,g=100,y=36,p=16,w=8,x="#dee0e3",m="#bbbec4",b="rgb(82,146,247)",k="rgba(82,146,247,0.1)",C="rgba(82,146,247,0.1)",S="#f8f8f9",I="#80848f",T="#ED3F14",A="-";(function(e){e["RELATIVE"]="relative_date",e["ABSOLUTE"]="absolute_date"})(l||(l={}));var R={mini:100,small:140,medium:200,large:300},D=["month","date","datetime","number","phone","email","select"],E={AssetConvertStatusNotSupport:-3,AssetConvertStatusUnknown:-2,AssetConvertStatusFailed:-1,AssetConvertStatusSuccess:0,AssetConvertStatusSubmit:1};i(2675),i(9463),i(2259),i(3792),i(7764),i(2953);function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}i(5700),i(6280),i(9572);function O(e,t){if("object"!=P(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=P(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function M(e){var t=O(e,"string");return"symbol"==P(t)?t:t+""}function B(e,t,i){return(t=M(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i(2008),i(4114),i(8111),i(2489),i(7588),i(3851),i(1278),i(9432),i(3500);function H(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,r)}return i}function F(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?H(Object(i),!0).forEach(function(t){B(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):H(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}i(2062),i(6910),i(1701);var L=i.p+"img/icon_default.9ef1a394.svg",W=i.p+"img/img_3d.39b27128.svg",z=i.p+"img/img_aep.a898e3e7.svg",N=i.p+"img/img_ai.61f08a0a.svg",V=i.p+"img/img_audio.e4ada65c.svg",_=i.p+"img/img_enf.ad88f95d.svg",j=i.p+"img/img_excel.56663d85.svg",Y=i.p+"img/img_exe.5e3fc198.svg",G=i.p+"img/img_img.ac2e0d0c.svg",X=i.p+"img/img_mcp.393ef169.svg",U=i.p+"img/img_pdf.f4da9922.svg",q=i.p+"img/img_ppt.d172780f.svg",K=i.p+"img/img_pxcook.7e9fce57.svg",J=i.p+"img/img_rarzip7z.e3b1de82.svg",Q=i.p+"img/img_sketch.d49a9bd4.svg",Z=i.p+"img/img_video.b6ac6198.svg",$=i.p+"img/img_word.0c1d3c88.svg",ee=i.p+"img/img_x2d.6acc94f6.svg",te=i.p+"img/img_xd.cc23d09a.svg",ie=i.p+"img/icon_error_dark.2a057cdd.svg",re=i.p+"img/icon_error_light.ac6763e9.svg",ne=i.p+"img/icon_failure_dark.f68723a7.svg",oe=i.p+"img/icon_failure_light.489a7167.svg",ae=i.p+"img/icon_transform_dark.033764ea.svg",se=i.p+"img/icon_transform_light.fa9fbcbd.svg";function le(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=Array(t);i<t;i++)r[i]=e[i];return r}function he(e){if(Array.isArray(e))return le(e)}i(3418);function de(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}i(2010),i(7495),i(906);function ue(e,t){if(e){if("string"==typeof e)return le(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?le(e,t):void 0}}function ce(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function fe(e){return he(e)||de(e)||ue(e)||ce()}var ve=["mb","fbx","max","lxf","lxfml","vmd","pmd","pmx","obj","mmd","maya","3ds","bvh"],ge=["jpg","jpeg","psd","psb","tga","png","dds","tif","bmp","gif","swf"],ye=["mp4","avi","wmv","mov","flv"],pe=["rar","zip","7z","tar","gz"],we=["modelset"],xe=["imageset"],me=["versionset"],be=["mgm","html"],ke=["docx","docm","doc","odt","txt","rtf","html","epub"],Ce=["xlsx","xlsm","xls","ods","csv"],Se=["pptx","pptm","ppt","odp"],Ie=[].concat(ke,Ce,Se),Te=["pdf","svg"],Ae=["exe"],Re=["pdf"],De=["wav","mp3","wma","ogg","aac","ape","flac","m4a"],Ee=["aep","ars","aet","amx","aex","aetx","aepx"],Pe=["ai","ait","draw","idea","line"],Oe=["enf"],Me=["mcp"],Be=["x2d"],He=["xd"],Fe=["sketch","sket"],Le=["pxcp"],We="model",ze="models",Ne="image",Ve="images",_e="video",je="zipped",Ye="na",Ge="misc",Xe="iframeOffice",Ue="iframe",qe="versionset",Ke="exe",Je="audio",Qe="pdf",Ze="sketch",$e="pxcook",et="aep",tt="ai",it="enf",rt="mcp",nt="x2d",ot="xd";function at(e){if(!e||"string"!==typeof e)return Ye;var t=e.toLowerCase();return ve.indexOf(t)>=0?We:ge.indexOf(t)>=0?Ne:ye.indexOf(t)>=0?_e:pe.indexOf(t)>=0?je:we.indexOf(t)>=0?ze:xe.indexOf(t)>=0?Ve:be.indexOf(t)>=0?Ge:me.indexOf(t)>=0?qe:Ie.indexOf(t)>=0?Xe:Te.indexOf(t)>=0?Ue:Ae.indexOf(t)>=0?Ke:De.indexOf(t)>=0?Je:Re.indexOf(t)>=0?Qe:He.indexOf(t)>=0?ot:Ee.indexOf(t)>=0?et:Pe.indexOf(t)>=0?tt:Oe.indexOf(t)>=0?it:Me.indexOf(t)>=0?rt:Be.indexOf(t)>=0?nt:Fe.indexOf(t)>=0?Ze:Le.indexOf(t)>=0?$e:Ye}var st=["png","jpg","jpeg","bmp","gif","tiff","tif","webp","svg"],lt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];return e.forEach(function(e){e.children?t=t.concat(lt(e.children)):("nested"===e.type&&e.nestedColumns&&e.nestedColumns.length,t.push(e))}),t},ht=function(e){return e?e.map(function(e){return ht(e.children)+1}).sort(function(e,t){return t-e})[0]:0},dt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return void 0===t&&(t=ht(e)),e?e.map(function(e){if(e.children){var r=0,n=dt(e.children,t-1,i+1);return n.forEach(function(e){r+=e.colspan}),F(F({level:i,rowspan:1,colspan:r},e),{},{children:n})}return F({level:i,rowspan:t,colspan:1},e)}):[]};function ut(e){var t=at(e);switch(t){case"iframeOffice":return"docx"===e||"doc"===e?$:"xlsx"===e||"xls"===e||"csv"===e?j:"pptx"===e||"ppt"===e?q:L;case"iframe":return"pdf"===e?U:"svg"===e?G:L;case"exe":return Y;case"pdf":return U;case"zipped":return J;case"sketch":return Q;case"audio":return V;case"video":return Z;case"image":return G;case"model":return W;case"aep":return z;case"ai":return N;case"enf":return _;case"mcp":return X;case"x2d":return ee;case"xd":return te;case"pxcook":return K;default:return L}}function ct(e,t){if(t&&!st.includes(t.toLowerCase()))return ut(t);var i=document.documentElement.getAttribute("data-theme")||"dark";if("number"!==typeof e)return"light"===i?re:ie;var r={light:B(B(B({},E.AssetConvertStatusFailed,oe),E.AssetConvertStatusSubmit,se),"default",re),dark:B(B(B({},E.AssetConvertStatusFailed,ne),E.AssetConvertStatusSubmit,ae),"default",ie)},n=r[i]||r.dark;return n[e]||n.default}function ft(e){if(Array.isArray(e))return e}function vt(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var r,n,o,a,s=[],l=!0,h=!1;try{if(o=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(r=o.call(i)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){h=!0,n=e}finally{try{if(!l&&null!=i["return"]&&(a=i["return"](),Object(a)!==a))return}finally{if(h)throw n}}return s}}function gt(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function yt(e,t){return ft(e)||vt(e,t)||ue(e,t)||gt()}function pt(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=ue(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==i["return"]||i["return"]()}finally{if(s)throw o}}}}function wt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xt(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,M(r.key),r)}}function mt(e,t,i){return t&&xt(e.prototype,t),i&&xt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}i(113),i(8980),i(4554),i(1148),i(116),i(8237),i(3579),i(3110),i(6033),i(9085),i(8347),i(1415),i(7642),i(8004),i(3853),i(5876),i(2475),i(5024),i(1698),i(9449),i(2762),i(4298),i(8335);function bt(e){return ft(e)||de(e)||ue(e)||gt()}var kt=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";wt(this,e),B(this,"el",void 0),B(this,"dataMap",void 0),"string"===typeof t?(this.el=document.createElement(t),this.el.className=i):this.el=t,this.dataMap={}}return mt(e,[{key:"data",value:function(e,t){return void 0!==t?(this.dataMap[e]=t,this):this.dataMap[e]}},{key:"on",value:function(e,t){var i=e.split("."),r=bt(i),n=r[0],o=le(r).slice(1),a=n;return"mousewheel"===a&&/Firefox/i.test(window.navigator.userAgent)&&(a="DOMMouseScroll"),this.el.addEventListener(a,function(e){t(e);for(var i=0;i<o.length;i+=1){var r=o[i];if("left"===r&&0!==e.button)return;if("right"===r&&2!==e.button)return;"stop"===r&&e.stopPropagation()}}),this}},{key:"offset",value:function(e){var t=this;if(void 0!==e)return Object.keys(e).forEach(function(i){t.css(i,"".concat(e[i],"px"))}),this;var i=this.el,r=i.offsetTop,n=i.offsetLeft,o=i.offsetHeight,a=i.offsetWidth;return{top:r,left:n,height:o,width:a}}},{key:"scroll",value:function(e){var t=this.el;return void 0!==e&&(void 0!==e.left&&(t.scrollLeft=e.left),void 0!==e.top&&(t.scrollTop=e.top)),{left:t.scrollLeft,top:t.scrollTop}}},{key:"box",value:function(){return this.el.getBoundingClientRect()}},{key:"parent",value:function(){return new e(this.el.parentNode)}},{key:"children",value:function(){for(var e=this,t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return 0===arguments.length?this.el.childNodes:(i.forEach(function(t){return e.child(t)}),this)}},{key:"removeChild",value:function(e){this.el.removeChild(e)}},{key:"child",value:function(t){var i=t;return"string"===typeof t?i=document.createTextNode(t):t instanceof e&&(i=t.el),this.el.appendChild(i),this}},{key:"contains",value:function(e){return this.el.contains(e)}},{key:"className",value:function(e){return void 0!==e?(this.el.className=e,this):this.el.className}},{key:"addClass",value:function(e){return this.el.classList.add(e),this}},{key:"hasClass",value:function(e){return this.el.classList.contains(e)}},{key:"removeClass",value:function(e){return this.el.classList.remove(e),this}},{key:"toggle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"active";return this.toggleClass(e)}},{key:"toggleClass",value:function(e){return this.el.classList.toggle(e)}},{key:"active",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"active";return e?this.addClass(t):this.removeClass(t),this}},{key:"checked",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.active(e,"checked"),this}},{key:"disabled",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return e?this.addClass("disabled"):this.removeClass("disabled"),this}},{key:"attr",value:function(e,t){var i=this;if(void 0!==t)this.el.setAttribute(e,t);else{if("string"===typeof e)return this.el.getAttribute(e);Object.keys(e).forEach(function(t){i.el.setAttribute(t,e[t])})}return this}},{key:"removeAttr",value:function(e){return this.el.removeAttribute(e),this}},{key:"html",value:function(e){return void 0!==e?(this.el.innerHTML=e,this):this.el.innerHTML}},{key:"val",value:function(e){return void 0!==e?(this.el.value=e,this):this.el.value}},{key:"focus",value:function(){if(window.getSelection){this.el.focus();var e=window.getSelection();if(e)try{e.selectAllChildren(this.el),e.collapseToEnd()}catch(i){}}else if(document.selection){var t=document.selection.createRange();t.moveToElementText(this.el),t.collapse(!1),t.select()}}},{key:"cssRemoveKeys",value:function(){for(var e=this,t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return i.forEach(function(t){return e.el.style.removeProperty(t)}),this}},{key:"css",value:function(e,t){var i=this;return void 0===t&&"string"!==typeof e?(Object.keys(e).forEach(function(t){i.el.style[t]=e[t]}),this):void 0!==t?(this.el.style[e]=t,this):this.el.style[e]}},{key:"computedStyle",value:function(){return window.getComputedStyle(this.el,null)}},{key:"show",value:function(){return this.css("display","block"),this}},{key:"hide",value:function(){return this.css("display","none"),this}}])}(),Ct=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new kt(e,t)},St=(i(3771),i(5440),i(8126),{left:"right",right:"left"});function It(e,t,i,r){var n=t/2,o=this.ctx.measureText(String(e)).width;return o>t-2*i||"left"===r?n=o/2+i:"right"===r&&(n=t-o/2-i),n}var Tt=function(){function e(t){wt(this,e),B(this,"ctx",void 0),this.ctx=t.getContext("2d")}return mt(e,[{key:"scaleCanvas",value:function(e){this.ctx.scale(e,e)}},{key:"drawLine",value:function(e,t){if(e[0]){t=Object.assign({lineCap:"square",lineJoin:"miter",borderWidth:1,borderColor:void 0,fillColor:void 0},t),this.ctx.save(),this.ctx.beginPath(),this.ctx.moveTo(e[0][0]+.5,e[0][1]+.5);for(var i=1;i<e.length;i++)this.ctx.lineTo(e[i][0]+.5,e[i][1]+.5);this.ctx.lineWidth=t.borderWidth,this.ctx.lineCap=t.lineCap,this.ctx.lineJoin=t.lineJoin,t.lineDash&&(this.ctx.lineDashOffset=4,this.ctx.setLineDash(t.lineDash)),t.fillColor&&(this.ctx.fillStyle=t.fillColor,this.ctx.fill()),t.borderColor&&(this.ctx.strokeStyle=t.borderColor,this.ctx.stroke()),this.ctx.restore()}}},{key:"drawText",value:function(e,t,i,r){r=Object.assign({font:'normal 12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',color:"#495060",align:"center",baseLine:"middle"},r),this.ctx.font=r.font,this.ctx.fillStyle=r.color,this.ctx.textAlign=St[r.align]||r.align,this.ctx.textBaseline=r.baseLine,this.ctx.fillText(String(e),t,i)}},{key:"drawCellText",value:function(e,t,i,r,n,o,a){a=Object.assign({font:'normal 12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',color:"#495060",align:"left",baseLine:"middle",bold:!1,icon:null,iconWidth:14,iconHeight:14,iconOffsetX:0,iconOffsetY:0},a),a.bold&&(a.font=a.font.replace("normal","bold")),this.ctx.font=a.font,this.ctx.fillStyle=a.color,this.ctx.textAlign="center",this.ctx.textBaseline=a.baseLine;var s=t,l="middle"===a.baseLine?i+n/2:i,h=It.call(this,e,r,o,a.align);a.icon&&"object"===P(a.icon)&&a.icon.src&&(this.drawImage(a.icon,t+a.iconOffsetX,l-a.iconOffsetY-a.iconHeight/2,a.iconWidth,a.iconHeight),"left"===a.align&&(s+=2*a.iconWidth)),this.ctx.fillText(String(e),s+h,l),this.ctx.restore()}},{key:"drawCellAffixIcon",value:function(e,t,i,r,n,o){o=Object.assign({color:"#bbbec4",fillColor:"#fff"},o);var a=25;if(this.drawRect(t+r-a,i+1,a,n,{fillColor:o.fillColor}),"arrow"===e){var s=[[t+r-20,i+n/2-2],[t+r-15,i+n/2+3],[t+r-10,i+n/2-2]];this.drawLine(s,{borderColor:o.color,borderWidth:1})}}},{key:"drawIcon",value:function(e,t,i,r,n,o,a,s,l){l=Object.assign({font:'normal 12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',color:"#495060",align:"center",baseLine:"middle"},l);var h=this.ctx.measureText(String(t)).width,d=It.call(this,t,n,o,l.align);this.ctx.font=l.font,this.ctx.fillStyle=l.color,this.ctx.textAlign="center",this.ctx.textBaseline=l.baseLine,this.ctx.fillText(e,i+d-h/2-a,r+s),this.ctx.restore()}},{key:"drawRect",value:function(e,t,i,r,n){n=Object.assign({borderWidth:1,borderColor:void 0,fillColor:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,shadowBlur:0,shadowColor:void 0},n),this.ctx.save(),this.ctx.beginPath(),n.shadowOffsetX&&(this.ctx.shadowOffsetX=n.shadowOffsetX),n.shadowOffsetY&&(this.ctx.shadowOffsetY=n.shadowOffsetY),n.shadowBlur&&(this.ctx.shadowBlur=n.shadowBlur),n.shadowColor&&(this.ctx.shadowColor=n.shadowColor),n.fillColor&&(this.ctx.fillStyle=n.fillColor),n.borderColor&&(this.ctx.lineWidth=n.borderWidth,this.ctx.strokeStyle=n.borderColor),this.ctx.rect(e+.5,t+.5,i,r),n.fillColor&&this.ctx.fill(),n.borderColor&&this.ctx.stroke(),this.ctx.restore()}},{key:"drawRoundRect",value:function(e,t,i,r,n,o){o=Object.assign({borderWidth:1,borderColor:void 0,fillColor:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,shadowBlur:0,shadowColor:void 0},o),this.ctx.save(),this.ctx.beginPath(),o.shadowOffsetX&&(this.ctx.shadowOffsetX=o.shadowOffsetX),o.shadowOffsetY&&(this.ctx.shadowOffsetY=o.shadowOffsetY),o.shadowBlur&&(this.ctx.shadowBlur=o.shadowBlur),o.shadowColor&&(this.ctx.shadowColor=o.shadowColor),o.fillColor&&(this.ctx.fillStyle=o.fillColor),o.borderColor&&(this.ctx.lineWidth=o.borderWidth,this.ctx.strokeStyle=o.borderColor),this.ctx.moveTo(e+n,t),this.ctx.arcTo(e+i,t,e+i,t+n,n),this.ctx.arcTo(e+i,t+r,e+i-n,t+r,n),this.ctx.arcTo(e,t+r,e,t+r-n,n),this.ctx.arcTo(e,t,e+n,t,n),o.fillColor&&this.ctx.fill(),o.borderColor&&this.ctx.stroke(),this.ctx.restore()}},{key:"drawImage",value:function(e,t,i,r,n){this.ctx.drawImage(e,t,i,r,n)}},{key:"clearCanvas",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;this.ctx.clearRect(e,t,i||this.ctx.canvas.width,r||this.ctx.canvas.height)}},{key:"getTextWrapping",value:function(e,t,i){if(!e&&0!==e)return[""];this.ctx.font='normal 12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif';for(var r="".concat(e).split(""),n=r[0],o=[],a=1;a<r.length;a++)this.ctx.measureText(n).width>=t-2*i&&(o.push(n),n=""),n+=r[a];return o.push(n),o}},{key:"measureText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12;this.ctx.save(),this.ctx.font="normal ".concat(t,'px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif');var i=this.ctx.measureText(e).width;return this.ctx.restore(),i}}])}(),At=Tt;i(8598),i(825),i(875),i(3548),i(287);function Rt(e){return Rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rt(e)}function Dt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Dt=function(){return!!e})()}function Et(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pt(e,t){if(t&&("object"==P(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Et(e)}function Ot(e,t,i){return t=Rt(t),Pt(e,Dt()?Reflect.construct(t,i||[],Rt(e).constructor):t.apply(e,i))}function Mt(e,t){return Mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Mt(e,t)}function Bt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mt(e,t)}var Ht=function(){function e(t,i,r,n,o,a){wt(this,e),B(this,"grid",void 0),B(this,"x",void 0),B(this,"y",void 0),B(this,"width",void 0),B(this,"height",void 0),B(this,"fixed",void 0),this.grid=t,this.x=i,this.y=r,this.width=n||null,this.height=o||0,this.fixed=a}return mt(e,[{key:"isHorizontalVisibleOnBody",value:function(){return!(this.x+(this.width||0)-this.grid.fixedLeftWidth+this.grid.scrollX<=0||this.x+this.grid.scrollX>=this.grid.width-this.grid.fixedRightWidth)}},{key:"isVerticalVisibleOnBody",value:function(){return!(this.y+this.height-this.grid.tableHeaderHeight+this.grid.scrollY<=0||this.y+this.grid.scrollY>=this.grid.height-this.grid.horizontalScrollerSize-this.grid.footerHeight)}},{key:"isInsideHorizontalBodyBoundary",value:function(e,t){return e>this.x+this.grid.scrollX&&e<this.x+this.grid.scrollX+(this.width||0)&&e>this.grid.fixedLeftWidth&&e<this.grid.width-this.grid.fixedRightWidth}},{key:"isInsideHorizontalTableBoundary",value:function(e,t){return e>this.x+this.grid.scrollX&&e<this.x+this.grid.scrollX+(this.width||0)&&e>this.grid.fixedLeftWidth}},{key:"isInsideFixedHorizontalBodyBoundary",value:function(e,t){var i=this.grid.width-(this.grid.tableWidth-this.x-(this.width||0))-(this.width||0)-this.grid.verticalScrollerSize;return e>=i&&e<i+(this.width||0)&&"right"===this.fixed||e>this.x&&e<this.x+(this.width||0)&&"left"===this.fixed}},{key:"isInsideVerticaBodyBoundary",value:function(e,t){return t>this.y+this.grid.scrollY&&t<this.y+this.height+this.grid.scrollY&&t>this.grid.tableHeaderHeight&&t<this.grid.height-this.grid.horizontalScrollerSize-this.grid.footerHeight}},{key:"isInsideVerticaTableBoundary",value:function(e,t){return t>this.y+this.grid.scrollY&&t<this.y+this.height+this.grid.scrollY&&t>this.grid.tableHeaderHeight}},{key:"isInsideAffixIcon",value:function(e,t){return e>this.x+(this.width||0)+this.grid.scrollX-25&&e<this.x+(this.width||0)+this.grid.scrollX&&t>this.y+this.grid.scrollY+10&&t<this.y+this.height+this.grid.scrollY-10}},{key:"isInsideEditIcon",value:function(e,t){var i=14,r=8,n=5,o=this.x+(this.width||0)+this.grid.scrollX-i-r,a=this.y+this.grid.scrollY+(this.height-i)/2;return e>o-n&&e<o+i+n&&t>a-n&&t<a+i+n}},{key:"isInsideHeader",value:function(e,t){return t>this.y&&t<this.y+this.grid.tableHeaderHeight}},{key:"isInsideCheckboxBoundary",value:function(e,t){return e>this.x+c&&e<this.x+this.grid.originFixedWidth}},{key:"isInsideHeaderCheckboxBoundary",value:function(e,t){return this.isInsideHeader(e,t)&&e>=this.x&&e<this.x+this.grid.originFixedWidth}},{key:"isInsideIndexBoundary",value:function(e,t){return e>this.x&&e<this.x+c}}])}(),Ft=Ht,Lt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAB7klEQVRoQ+2ZQVLCMBSG/+foiszoDYQTyA1ELqLcANdlwULWjiegXqRwBU8gnEAc6gqG50TpDNQEG/pagpYlTZPve38mTRvCkf/oyPlRCRw6wSoBrxNo9fni5CweMqNFRBdlwjIwIWC8WtTux32a2ca2TiENT6fxa9ngaVBmnvFSNWwSVoGbhzgkwm2ZVbeNxYznUU/dma7vEJi/Hbr6CbCeTqNANZwE2oOYfah+whAFylhsawKVgHB83ifAjBcCQhAeTe5eC2h4XtZaeqm0rX7eCmzCJ5U3SXgpYILXEu1BPASwte57J+ACr6W8EnCF90pgH3hvBPaFFxXQGysATSJcuTyr8sCLCSS7wu+t9sc4q0ReeBGB9JY2q4QEvIgAgDAKVGdz2vwmIQUvJaD7ySwhCS8poPt6igLV3ZWENLy0gO6vEwUqNEno/5KN2eZ10/bAZRUr4klslNBQ6RfwvPBFJJAU74dEuqoS8EUKGKdTIiEFX7SAUUISvgyBLQlp+LIEviQAXKdfRlxWG1vbIlYhCa7MfVQCmUtVUMP/mMB8BtB5QQV165YxjXqqbrrp735eX5/OTA6fAr+vFqrufMCh41qf0oQEaoJw6ZZ7ztaMKQNjXta6ex0x5Ry+tNurY9bSSm0ZqEqgSiBnBT4BkfqPQMORwUwAAAAASUVORK5CYII=",Wt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABXUlEQVRoQ+2ZwVEDMQxFJTdACYQOQgWkA9KFvSeSTrh51QVUACVsCUkHoQGL2SMzMfMVYrOZUc5//PXft3JYM934j298fvIA/92gN7DoBkRkq6ovzLzpPaiqHph5KqXsh2E41PyrVyjnvAkhfPQe/IzfqZTyWAtRDSAin0T0tIAApKrvKaXtuVl+C6BLGH6eYb5OKaWHPwWIMXb9xxKRHwBr/nADHsB4H70BlIARLCxH/X0HYKRGoTeAEjCCheWov+8AjNQo9AZQAkawsBz19x2AkRqF3gBKwAgWlqP+vgMwUqPQG0AJGMHCctTfdwBGahR6AygBI1hYjvr7DsBIjUJvQERORHRnBNdKfowxrkwfd8dxfGPm51YTWc696PN6znkVQpgW0MJXKWVtfuCYCc0hmPmVmddEdG+hdgXtUVUnVd1d9MR0hQG6HNH10aJFIg/QgqrlTG/AQquF9huB5SxAQNMDWAAAAABJRU5ErkJggg==",zt=new Image,Nt=new Image;zt.src=Lt,Nt.src=Wt;var Vt=function(e){function t(e,i,r,n,o,a,s){var l;return wt(this,t),l=Ot(this,t,[e,r,n,o,a]),B(l,"rowIndex",void 0),B(l,"text",void 0),B(l,"checked",void 0),B(l,"borderColor",void 0),B(l,"fillColor",void 0),B(l,"borderWidth",void 0),B(l,"color",void 0),l.rowIndex=i,l.text=i+1,l.checked=!1,s&&Object.assign(l,s),l}return Bt(t,e),mt(t,[{key:"handleCheck",value:function(e){this.checked=e}},{key:"draw",value:function(){var e=this.y+this.grid.scrollY,t=(this.width||0)+(this.grid.showCheckbox?f:0);if(this.grid.painter.drawRect(this.x,e,t,this.height,{fillColor:this.fillColor,borderColor:this.borderColor,borderWidth:this.borderWidth}),this.grid.showCheckbox){var i=this.checked?zt:Nt,r=20,n=this.x+8,o=e+(this.height-r)/2;this.grid.painter.drawImage(i,n,o,r,r);var a=this.x+28,s=t-28;this.grid.painter.drawCellText(this.text,a,e,s,this.height,10,{color:this.color,align:"center"})}else this.grid.painter.drawCellText(this.text,this.x,e,this.width||0,this.height,10,{color:this.color,align:"center"})}}])}(Ft),_t=Vt;function jt(e,t,i,r){var n=Object.defineProperty;try{n({},"",{})}catch(e){n=0}jt=function(e,t,i,r){function o(t,i){jt(e,t,function(e){return this._invoke(t,i,e)})}t?n?n(e,t,{value:i,enumerable:!r,configurable:!r,writable:!r}):e[t]=i:(o("next",0),o("throw",1),o("return",2))},jt(e,t,i,r)}function Yt(){var e,t,i="function"==typeof Symbol?Symbol:{},r=i.iterator||"@@iterator",n=i.toStringTag||"@@toStringTag";function o(i,r,n,o){var l=r&&r.prototype instanceof s?r:s,h=Object.create(l.prototype);return jt(h,"_invoke",function(i,r,n){var o,s,l,h=0,d=n||[],u=!1,c={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,i){return o=t,s=0,l=e,c.n=i,a}};function f(i,r){for(s=i,l=r,t=0;!u&&h&&!n&&t<d.length;t++){var n,o=d[t],f=c.p,v=o[2];i>3?(n=v===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=f&&((n=i<2&&f<o[1])?(s=0,c.v=r,c.n=o[1]):f<v&&(n=i<3||o[0]>r||r>v)&&(o[4]=i,o[5]=r,c.n=v,s=0))}if(n||i>1)return a;throw u=!0,r}return function(n,d,v){if(h>1)throw TypeError("Generator is already running");for(u&&1===d&&f(d,v),s=d,l=v;(t=s<2?e:l)||!u;){o||(s?s<3?(s>1&&(c.n=-1),f(s,l)):c.n=l:c.v=l);try{if(h=2,o){if(s||(n="next"),t=o[n]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o["return"])&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+n+"' method"),s=1);o=e}else if((t=(u=c.n<0)?l:i.call(r,c))!==a)break}catch(t){o=e,s=1,l=t}finally{h=1}}return{value:t,done:u}}}(i,n,o),!0),h}var a={};function s(){}function l(){}function h(){}t=Object.getPrototypeOf;var d=[][r]?t(t([][r]())):(jt(t={},r,function(){return this}),t),u=h.prototype=s.prototype=Object.create(d);function c(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,jt(e,n,"GeneratorFunction")),e.prototype=Object.create(u),e}return l.prototype=h,jt(u,"constructor",h),jt(h,"constructor",l),l.displayName="GeneratorFunction",jt(h,n,"GeneratorFunction"),jt(u),jt(u,n,"Generator"),jt(u,r,function(){return this}),jt(u,"toString",function(){return"[object Generator]"}),(Yt=function(){return{w:o,m:c}})()}i(3362);function Gt(e,t,i,r,n,o,a){try{var s=e[o](a),l=s.value}catch(e){return void i(e)}s.done?t(l):Promise.resolve(l).then(r,n)}function Xt(e){return function(){var t=this,i=arguments;return new Promise(function(r,n){var o=e.apply(t,i);function a(e){Gt(o,r,n,a,s,"next",e)}function s(e){Gt(o,r,n,a,s,"throw",e)}a(void 0)})}}function Ut(e,t){if(null==e)return{};var i={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;i[r]=e[r]}return i}function qt(e,t){if(null==e)return{};var i,r,n=Ut(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)i=o[r],-1===t.indexOf(i)&&{}.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}i(4864),i(7465),i(7745);var Kt={number:/^(-?\d{1,11}(\.\d*)?)$/,phone:/^[1-9]\d{10}$/,email:/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/};function Jt(e){var t=this.columnType,i=this.type;return"date"===t||"datetime"===t||"month"===t?new Date(e):"number"===i?Number(e):e}function Qt(e,t){if(this.message)return{flag:e,message:this.message};var i="";if(!e)switch(t){case"required":i="".concat(this.validateTitle,"字段必填哦!");break;case"notMatch":i="".concat(this.validateTitle,"字段不符合预期格式哦!");break;case"notIn":i="".concat(this.validateTitle,"字段是无效值哦!");break;default:i="".concat(this.validateTitle,"字段是无效值哦!")}return{flag:e,message:i}}var Zt=function(){function e(t){wt(this,e),B(this,"validateKey",void 0),B(this,"validateTitle",void 0),B(this,"columnType",void 0),B(this,"type",void 0),B(this,"options",void 0),B(this,"required",void 0),B(this,"validator",void 0),B(this,"operator",void 0),B(this,"message",void 0),B(this,"descriptor",void 0),B(this,"pattern",void 0),B(this,"min",void 0),B(this,"max",void 0),B(this,"immediate",void 0),this.validateKey=t.key,this.validateTitle=t.title,this.columnType=t.type,this.options=t.options,Object.assign(this,t.rule)}return mt(e,[{key:"validate",value:function(){var e=Xt(Yt().m(function e(t,i){var r,n,o,a,s,l,h,d,u,c,f=this;return Yt().w(function(e){while(1)switch(e.n){case 0:if(r=this.required,n=this.validator,o=this.options,a=this.type,s=Jt.call(this,t),l="string"===typeof s?!!s.trim():!!s||0===s,!r||l){e.n=1;break}return e.a(2,Qt.call(this,!1,"required"));case 1:if(l){e.n=2;break}return e.a(2,{flag:!0});case 2:if(!Kt[a]||Kt[a].test(s)){e.n=3;break}return e.a(2,Qt.call(this,!1,"notMatch"));case 3:if("select"!==this.columnType){e.n=4;break}if(h=(o||[]).map(function(e){return e.value}).includes(s),h){e.n=4;break}return e.a(2,Qt.call(this,h,"notMatch"));case 4:if("month"!==this.columnType&&"date"!==this.columnType&&"datetime"!==this.columnType){e.n=5;break}if(d=s instanceof Date&&!isNaN(s.getTime()),d){e.n=5;break}return e.a(2,Qt.call(this,d,"notMatch"));case 5:if(!(n instanceof RegExp)){e.n=6;break}return u=new RegExp(n),e.a(2,Qt.call(this,u.test(s),"notIn"));case 6:if("function"!==typeof n){e.n=8;break}return c=!0,e.n=7,n(s,i,function(e){"string"===typeof e?(f.message=e,c=!e):!1===e&&(c=!1)});case 7:return e.a(2,Qt.call(this,c,"notIn"));case 8:return e.a(2,{flag:!0})}},e,this)}));function t(t,i){return e.apply(this,arguments)}return t}()}])}(),$t=Zt,ei=i(2393),ti=function(){function e(){var t=this;wt(this,e),B(this,"gifs",new Map),B(this,"animationFrameId",null),B(this,"isAnimating",!1),B(this,"enabled",!0),B(this,"animate",function(){if(!t.enabled)return t.isAnimating=!1,void(t.animationFrameId=null);var e=Date.now();t.gifs.forEach(function(i,r){var n=i.parsedGif.frames[i.currentFrameIndex],o=n.delay||100;e-i.lastFrameTime>=o&&(i.currentFrameIndex=(i.currentFrameIndex+1)%i.parsedGif.frames.length,i.lastFrameTime=e,t.renderFrame(r,i.currentFrameIndex))}),t.gifs.size>0?t.animationFrameId=requestAnimationFrame(t.animate):(t.isAnimating=!1,t.animationFrameId=null)})}return mt(e,[{key:"loadGif",value:function(){var e=Xt(Yt().m(function e(t){var i,r,n,o,a,s,l,h;return Yt().w(function(e){while(1)switch(e.p=e.n){case 0:if(!this.gifs.has(t)){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,fetch(t);case 2:return i=e.v,e.n=3,i.arrayBuffer();case 3:r=e.v,n=(0,ei.O5)(r),o=(0,ei.Ud)(n,!0),a=document.createElement("canvas"),a.width=n.lsd.width,a.height=n.lsd.height,s=a.getContext("2d"),l=document.createElement("canvas"),l.width=n.lsd.width,l.height=n.lsd.height,h=l.getContext("2d"),this.gifs.set(t,{url:t,parsedGif:{frames:o,width:n.lsd.width,height:n.lsd.height},currentFrameIndex:0,lastFrameTime:Date.now(),canvas:a,ctx:s,tempCanvas:l,tempCtx:h}),this.renderFrame(t,0),this.startAnimation(),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2)}},e,this,[[1,4]])}));function t(t){return e.apply(this,arguments)}return t}()},{key:"renderFrame",value:function(e,t){var i=this.gifs.get(e);if(i){var r=i.parsedGif.frames[t];if(r){var n=r.dims,o=r.patch;if(t>0){var a=i.parsedGif.frames[t-1];switch(a.disposalType){case 2:i.tempCtx.clearRect(a.dims.left,a.dims.top,a.dims.width,a.dims.height);break;case 3:break}}else i.tempCtx.clearRect(0,0,i.tempCanvas.width,i.tempCanvas.height);var s=document.createElement("canvas");s.width=n.width,s.height=n.height;var l=s.getContext("2d"),h=l.createImageData(n.width,n.height);h.data.set(o),l.putImageData(h,0,0),i.tempCtx.drawImage(s,n.left,n.top),i.ctx.clearRect(0,0,i.canvas.width,i.canvas.height),i.ctx.drawImage(i.tempCanvas,0,0)}}}},{key:"startAnimation",value:function(){this.isAnimating||(this.isAnimating=!0,this.animate())}},{key:"stopAnimation",value:function(){null!==this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.isAnimating=!1}},{key:"getGifCanvas",value:function(e){var t=this.gifs.get(e);return t?t.canvas:null}},{key:"isGifLoaded",value:function(e){return this.gifs.has(e)}},{key:"unloadGif",value:function(e){this.gifs.delete(e),0===this.gifs.size&&this.stopAnimation()}},{key:"clear",value:function(){this.gifs.clear(),this.stopAnimation()}},{key:"getLoadedGifCount",value:function(){return this.gifs.size}},{key:"pause",value:function(){this.enabled=!1,this.stopAnimation()}},{key:"resume",value:function(){this.enabled=!0,this.gifs.size>0&&this.startAnimation()}},{key:"toggle",value:function(){return this.enabled?this.pause():this.resume(),this.enabled}},{key:"isEnabled",value:function(){return this.enabled}}],[{key:"getInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}])}();B(ti,"instance",void 0);var ii=i.p+"img/icon_edit.9966e699.svg",ri=function(){function e(){wt(this,e),B(this,"imageCache",void 0),B(this,"loadingImages",void 0),B(this,"gifImages",void 0),B(this,"gifAnimationManager",void 0),B(this,"redrawCallbacks",new Set),B(this,"editIcon",null),this.imageCache=new Map,this.loadingImages=new Map,this.gifImages=new Set,this.gifAnimationManager=ti.getInstance(),this.loadEditIcon()}return mt(e,[{key:"loadEditIcon",value:function(){var e=this,t=new Image;t.onload=function(){e.editIcon=t},t.onerror=function(){},t.src=ii}},{key:"getEditIcon",value:function(){return this.editIcon}},{key:"loadImage",value:function(e){var t=this;if(this.imageCache.has(e))return Promise.resolve(this.imageCache.get(e));if(this.loadingImages.has(e))return this.loadingImages.get(e);var i=new Promise(function(i,r){var n=new Image;n.onload=function(){t.imageCache.set(e,n),t.loadingImages.delete(e),t.isGif(e)&&(t.gifImages.add(e),t.gifAnimationManager.loadGif(e).then(function(){t.triggerRedraw()}).catch(function(e){})),i(n)},n.onerror=function(){t.loadingImages.delete(e),r(new Error("Failed to load image: ".concat(e)))},n.src=e});return this.loadingImages.set(e,i),i}},{key:"getCachedImage",value:function(e){return this.imageCache.get(e)||null}},{key:"isCached",value:function(e){return this.imageCache.has(e)}},{key:"clearCache",value:function(){this.gifAnimationManager.clear(),this.imageCache.clear(),this.loadingImages.clear(),this.gifImages.clear()}},{key:"removeFromCache",value:function(e){this.gifImages.has(e)&&this.gifAnimationManager.unloadGif(e),this.imageCache.delete(e),this.loadingImages.delete(e),this.gifImages.delete(e)}},{key:"isGif",value:function(e){return e.toLowerCase().endsWith(".gif")}},{key:"getGifCanvas",value:function(e){return this.gifImages.has(e)?this.gifAnimationManager.getGifCanvas(e):null}},{key:"isAnimatedImage",value:function(e){return this.gifImages.has(e)}},{key:"hasGifImages",value:function(){return this.gifImages.size>0}},{key:"onAnimationFrame",value:function(e){this.redrawCallbacks.add(e)}},{key:"offAnimationFrame",value:function(e){this.redrawCallbacks.delete(e)}},{key:"triggerRedraw",value:function(){this.redrawCallbacks.forEach(function(e){try{e()}catch(t){}})}},{key:"getGifManager",value:function(){return this.gifAnimationManager}}],[{key:"getInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}])}();B(ri,"instance",void 0);var ni=ri,oi=function(){function e(t){wt(this,e),B(this,"columns",void 0),B(this,"data",void 0),B(this,"x",void 0),B(this,"y",void 0),B(this,"width",void 0),B(this,"height",void 0),B(this,"parentGrid",void 0),B(this,"parentCell",void 0),B(this,"painter",void 0),B(this,"rowHeight",void 0),B(this,"scrollY",void 0),B(this,"hoveredCell",void 0),B(this,"hoverRowIndex",void 0),B(this,"selectedCell",void 0),B(this,"editingCell",void 0),B(this,"displayRows",void 0),B(this,"expanded",void 0),B(this,"expandButtonHeight",void 0),B(this,"expandButtonHovered",void 0),B(this,"redrawScheduled",!1),B(this,"redrawTimer",null),B(this,"offscreenCanvas",null),B(this,"offscreenCtx",null),B(this,"cacheValid",!1),B(this,"lastDataHash",""),B(this,"progressDrag",{isDragging:!1,cell:null,startValue:0,currentValue:0}),this.columns=t.columns,this.data=t.data,this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this.parentGrid=t.parentGrid,this.parentCell=t.parentCell,this.painter=t.parentGrid.painter,this.rowHeight=28,this.scrollY=0,this.hoveredCell=null,this.hoverRowIndex=-1,this.selectedCell=null,this.editingCell=null,this.displayRows=t.displayRows,this.expanded=!1,this.expandButtonHeight=30,this.expandButtonHovered=!1}return mt(e,[{key:"getColumnWidth",value:function(e){var t=this.columns[e];return t.width||80}},{key:"getCellBounds",value:function(e,t){for(var i=this.x,r=0;r<e;r++)i+=this.getColumnWidth(r);var n=this.y+t*this.rowHeight+this.scrollY,o=this.getColumnWidth(e),a=this.rowHeight;return{x:i,y:n,width:o,height:a}}},{key:"getRequiredHeight",value:function(){var e=this.getVisibleRowCount(),t=this.needExpandButton(),i=e*this.rowHeight,r=t?this.expandButtonHeight:0;return i+r+10}},{key:"getVisibleRowCount",value:function(){return!this.displayRows||this.expanded?this.data.length:Math.min(this.displayRows,this.data.length)}},{key:"needExpandButton",value:function(){return!!this.displayRows&&this.data.length>this.displayRows&&!this.expanded}},{key:"isMouseInsideAbsolute",value:function(e,t){return e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height}},{key:"isMouseInside",value:function(e,t){return e>=0&&e<=this.width&&t>=0&&t<=this.height}},{key:"isMouseOnExpandButton",value:function(e,t){if(!this.needExpandButton())return!1;var i=this.getVisibleRowCount(),r=i*this.rowHeight;return e>=0&&e<=this.width&&t>=r&&t<=r+this.expandButtonHeight}},{key:"getCellAtPosition",value:function(e,t){if(!this.isMouseInside(e,t))return null;for(var i=0,r=-1,n=0;n<this.columns.length;n++){var o=this.getColumnWidth(n);if(e>=i&&e<i+o){r=n;break}i+=o}var a=t-this.scrollY,s=Math.floor(a/this.rowHeight),l=this.getVisibleRowCount();return r>=0&&s>=0&&s<l?{col:r,row:s}:null}},{key:"handleMouseMove",value:function(e,t){if(this.progressDrag.isDragging&&this.progressDrag.cell)return this.handleProgressDragMove(e,t),!0;if(this.isMouseOnExpandButton(e,t))return this.expandButtonHovered=!0,!0;this.expandButtonHovered=!1;var i=this.getCellAtPosition(e,t);if(i){var r=this.hoveredCell,n=!r||r.col!==i.col||r.row!==i.row;return this.hoveredCell=i,this.hoverRowIndex=i.row,this.isProgressCell(i.col)&&this.isMouseOnProgressBar(e,t,i)&&(this.parentGrid.target.style.cursor="pointer"),n&&this.parentGrid.markDirty(),!0}return this.hoveredCell?(this.hoveredCell=null,this.hoverRowIndex=-1,this.parentGrid.markDirty()):(this.hoveredCell=null,this.hoverRowIndex=-1),!1}},{key:"isProgressCell",value:function(e){var t=this.columns[e];return t&&"progress"===t.type}},{key:"isMouseOnProgressBar",value:function(e,t,i){for(var r=0,n=0;n<i.col;n++)r+=this.getColumnWidth(n);var o=this.getColumnWidth(i.col),a=i.row*this.rowHeight+this.scrollY,s=8,l=6,h=o-2*s-35,d=r+s,u=a+(this.rowHeight-l)/2,c=8;return e>=d&&e<=d+h&&t>=u-c&&t<=u+l+c}},{key:"handleMouseDown",value:function(e,t){var i=this.getCellAtPosition(e,t);if(!i)return!1;if(this.isProgressCell(i.col)&&this.isMouseOnProgressBar(e,t,i)){var r,n=this.data[i.row],o=this.columns[i.col],a=n&&null!==(r=n[o.key])&&void 0!==r?r:0;return this.progressDrag.isDragging=!0,this.progressDrag.cell=i,this.progressDrag.startValue=Number(a),this.progressDrag.currentValue=Number(a),this.parentGrid.target.style.cursor="pointer",!0}return!1}},{key:"handleProgressDragMove",value:function(e,t){if(this.progressDrag.cell){for(var i=this.progressDrag.cell,r=0,n=0;n<i.col;n++)r+=this.getColumnWidth(n);var o=this.getColumnWidth(i.col),a=8,s=o-2*a-35,l=r+a,h=e-l,d=Math.max(0,Math.min(1,h/s)),u=Math.round(100*d);u!==this.progressDrag.currentValue&&(this.progressDrag.currentValue=u,this.parentGrid.draw())}}},{key:"handleMouseUp",value:function(e,t){if(!this.progressDrag.isDragging||!this.progressDrag.cell)return!1;var i=this.progressDrag.cell,r=this.progressDrag.currentValue,n=this.progressDrag.startValue;if(this.progressDrag.isDragging=!1,this.progressDrag.cell=null,this.parentGrid.target.style.cursor="default",r!==n){var o=this.data[i.row],a=this.columns[i.col];if(o&&a){o[a.key]=r;var s=this.parentCell.rowData;this.parentGrid.afterEditCell(s)}}return this.parentGrid.draw(),!0}},{key:"isMouseOnEditIcon",value:function(e,t,i){for(var r=14,n=8,o=5,a=0,s=0;s<i.col;s++)a+=this.getColumnWidth(s);var l=this.getColumnWidth(i.col),h=i.row*this.rowHeight+this.scrollY,d=a+l-r-n,u=h+(this.rowHeight-r)/2;return e>=d-o&&e<=d+r+o&&t>=u-o&&t<=u+r+o}},{key:"isCellEditable",value:function(e){var t=this.columns[e];return"image"!==t.type}},{key:"getSelectLabel",value:function(e,t){var i=this.columns[e];if("select"===i.type&&Array.isArray(i.options)){var r,n=pt(i.options);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(t===o.value)return o.label}}catch(a){n.e(a)}finally{n.f()}}return t}},{key:"handleClick",value:function(e,t){if(this.isMouseOnExpandButton(e,t)){this.expanded=!0;var i=this.parentCell.rowData;return i._nestedExpanded||(i._nestedExpanded={}),i._nestedExpanded[this.parentCell.key]=!0,this.updateParentRowHeight(),{type:"expand",needsRedraw:!0}}var r=this.getCellAtPosition(e,t);if(r){var n=this.columns[r.col];if(n&&"boolean"===n.type&&this.isMouseOnBooleanCheckbox(e,t,r)){var o=n.key,a=this.data[r.row][o];return this.data[r.row][o]=!a,this.cacheValid=!1,{type:"booleanToggle",cell:r,needsRedraw:!0}}var s=this.isCellEditable(r.col),l=this.isMouseOnEditIcon(e,t,r);return this.parentGrid.focusCell=null,this.parentGrid.selector.show=!1,this.parentGrid.selector.isSelected=!1,this.parentGrid.selector.xArr=[-1,-1],this.parentGrid.selector.yArr=[-1,-1],this.clearOtherNestedGridsSelection(),this.selectedCell=r,s&&l?(this.editingCell=r,{type:"editIcon",cell:r}):{type:"cell",cell:r}}return null}},{key:"isMouseOnBooleanCheckbox",value:function(e,t,i){for(var r=0,n=0;n<i.col;n++)r+=this.getColumnWidth(n);var o=this.getColumnWidth(i.col),a=i.row*this.rowHeight+this.scrollY,s=14,l=r+o/2,h=a+this.rowHeight/2,d=l-s/2,u=h-s/2;return e>=d&&e<=d+s&&t>=u&&t<=u+s}},{key:"getCellEditInfo",value:function(e,t){var i=this.getCellBounds(e,t),r=this.columns[e],n=this.data[t],o=n[r.key]||"",a=String(o);if("select"===r.type&&Array.isArray(r.options)){var s,l=pt(r.options);try{for(l.s();!(s=l.n()).done;){var h=s.value;if(o===h.value){a=h.label;break}}}catch(d){l.e(d)}finally{l.f()}}return{bounds:i,column:r,value:o,displayValue:a,rowData:n}}},{key:"startEdit",value:function(e,t){this.editingCell={row:t,col:e}}},{key:"updateParentRowHeight",value:function(){var e=this.getRequiredHeight(),t=this.parentCell.rowIndex;this.parentGrid.body.resizeRow(t,e);var i=this.parentCell.rowData;i._rowHeight=e,this.parentGrid.tableHeight=this.parentGrid.body.height,this.parentGrid.scroller.reset(),this.parentGrid.draw()}},{key:"updateRowHeight",value:function(e){this.rowHeight=e,this.updateParentRowHeight()}},{key:"finishEdit",value:function(e){if(this.editingCell){var t=this.editingCell,i=t.col,r=t.row,n=this.columns[i],o=e;if("select"===n.type&&Array.isArray(n.options)){var a,s=pt(n.options);try{for(s.s();!(a=s.n()).done;){var l=a.value;if(e===l.label){o=l.value;break}}}catch(h){s.e(h)}finally{s.f()}}this.data[r][n.key]=o,this.editingCell=null,this.parentGrid.draw()}}},{key:"cancelEdit",value:function(){this.editingCell=null,this.parentGrid.draw()}},{key:"draw",value:function(){var e=this,t=this.painter.ctx,i=this.getVisibleRowCount(),r=this.needExpandButton(),n=i*this.rowHeight+(r?this.expandButtonHeight:0);t.save(),this.painter.drawRect(this.x,this.y,this.width,n,{fillColor:"#fff",borderColor:"#d0d0d0",borderWidth:1});for(var o=0;o<i;o++)for(var a=this.data[o],s=this.y+o*this.rowHeight+this.scrollY,l=this.x,h=function(){var i=e.columns[d],r=e.getColumnWidth(d),n=a[i.key]||"",h="#fff";if(e.editingCell&&e.editingCell.row===o&&(h="#f5f7fa"),e.selectedCell&&e.selectedCell.col===d&&e.selectedCell.row===o&&(h="rgba(82,146,247,0.2)"),e.painter.drawRect(l,s,r,e.rowHeight,{fillColor:h,borderColor:"#e1e6eb",borderWidth:1}),"select"===i.type){var u=e.getSelectLabel(d,n);t.save(),t.font='normal 12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',t.fillStyle="#495060";var c=i.align||"left",f=l+5;"center"===c?(t.textAlign="center",f=l+r/2):"right"===c?(t.textAlign="right",f=l+r-5):t.textAlign="left",t.textBaseline="middle",t.fillText(String(u),f,s+e.rowHeight/2),t.restore()}else if("image"===i.type)if(n&&""!==n){var v=ni.getInstance(),g=v.isAnimatedImage(n),y=g?v.getGifCanvas(n):null,p=y||v.getCachedImage(n);if(p){var w,x,m=4,b=r-2*m,k=e.rowHeight-2*m,C=p.width/p.height,S=b/k;C>S?(w=b,x=b/C):(x=k,w=k*C);var I=l+(r-w)/2,T=s+(e.rowHeight-x)/2;e.painter.drawImage(p,I,T,w,x)}else v.isCached(n)||v.loadingImages.has(n)||v.loadImage(n).then(function(){e.scheduleRedraw()}).catch(function(e){}),t.save(),t.font='normal 12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',t.fillStyle="#999",t.textAlign="center",t.textBaseline="middle",t.fillText("Loading...",l+r/2,s+e.rowHeight/2),t.restore()}else t.save(),t.font='normal 12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',t.fillStyle="#ccc",t.textAlign="center",t.textBaseline="middle",t.fillText("No Image",l+r/2,s+e.rowHeight/2),t.restore();else if("person"===i.type)e.drawPersonCell(t,n,l,s,r,e.rowHeight);else if("status"===i.type)e.drawStatusCell(t,n,i.options,l,s,r,e.rowHeight);else if("progress"===i.type)e.drawProgressCell(t,n,l,s,r,e.rowHeight,d,o);else if("datetime"===i.type||"date"===i.type||"time"===i.type)e.drawDatetimeCell(t,n,l,s,r,e.rowHeight);else if("boolean"===i.type)e.drawBooleanCell(t,n,l,s,r,e.rowHeight);else{var A=e.getDisplayValue(n);t.save(),t.font='normal 12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',t.fillStyle="#495060";var R=i.align||"left",D=l+5;"center"===R?(t.textAlign="center",D=l+r/2):"right"===R?(t.textAlign="right",D=l+r-5):t.textAlign="left",t.textBaseline="middle",t.fillText(A,D,s+e.rowHeight/2),t.restore()}var E=e.hoveredCell&&e.hoveredCell.col===d&&e.hoveredCell.row===o,P=e.editingCell&&e.editingCell.col===d&&e.editingCell.row===o;if(e.isCellEditable(d)&&E&&!P){var O=ni.getInstance(),M=O.getEditIcon();if(M){var B=14,H=8,F=l+r-B-H,L=s+(e.rowHeight-B)/2;t.save(),t.fillStyle=h,t.fillRect(F-2,L,B+4,B),t.restore(),e.painter.drawImage(M,F,L,B,B)}}l+=r},d=0;d<this.columns.length;d++)h();if(r){var u=this.y+i*this.rowHeight,c=this.expandButtonHovered?"#409eff":"#606266",f=this.expandButtonHovered?"#ecf5ff":"#f5f7fa";this.painter.drawRect(this.x,u,this.width,this.expandButtonHeight,{fillColor:f,borderColor:"#e1e6eb",borderWidth:1}),t.save(),t.font='normal 12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',t.fillStyle=c,t.textAlign="center",t.textBaseline="middle",t.fillText("展开全部 (".concat(this.data.length-i,"行)"),this.x+this.width/2,u+this.expandButtonHeight/2),t.restore()}t.restore()}},{key:"clearOtherNestedGridsSelection",value:function(){var e,t=pt(this.parentGrid.body.rows);try{for(t.s();!(e=t.n()).done;){var i,r=e.value,n=pt(r.allCells);try{for(n.s();!(i=n.n()).done;){var o=i.value;o.nestedGrid&&o.nestedGrid!==this&&(o.nestedGrid.selectedCell=null)}}catch(a){n.e(a)}finally{n.f()}}}catch(a){t.e(a)}finally{t.f()}}},{key:"ensureOffscreenCanvas",value:function(e,t){this.offscreenCanvas&&this.offscreenCanvas.width===e&&this.offscreenCanvas.height===t||(this.offscreenCanvas=document.createElement("canvas"),this.offscreenCanvas.width=e,this.offscreenCanvas.height=t,this.offscreenCtx=this.offscreenCanvas.getContext("2d"),this.cacheValid=!1)}},{key:"computeDataHash",value:function(){var e=this.getVisibleRowCount();return"".concat(this.data.length,"_").concat(this.expanded,"_").concat(e,"_").concat(this.displayRows)}},{key:"invalidateCache",value:function(){this.cacheValid=!1}},{key:"getDisplayValue",value:function(e){var t=this;if(null===e||void 0===e)return"";if("object"===P(e)){if(Array.isArray(e))return e.map(function(e){return t.getDisplayValue(e)}).join(", ");if(void 0!==e.name)return e.name;if(void 0!==e.label)return String(e.label);if(void 0!==e.value)return String(e.value);var i=String(e);return"[object Object]"===i?"":i}return String(e)}},{key:"drawPersonCell",value:function(e,t,i,r,n,o){var a,s=this;if(t){for(var l=Array.isArray(t)?t:[t],h=ni.getInstance(),d=20,u=-6,c=8,f=i+c,v=r+o/2,g=["#1890ff","#52c41a","#722ed1","#eb2f96","#fa8c16","#13c2c2","#2f54eb","#f5222d"],y=3,p=l.slice(0,y),w=0;w<p.length;w++){var x=p[w];if(x){var m=v-d/2,b=d/2;e.save(),e.beginPath(),e.arc(f+b,v,b,0,2*Math.PI),e.closePath(),e.clip();var k=x.avatar?h.getCachedImage(x.avatar):null;if(k)e.drawImage(k,f,m,d,d);else{var C,S=Math.abs(this.hashString(String(x.id||x.name||w)))%g.length;e.fillStyle=g[S],e.fillRect(f,m,d,d);var I=this.getPersonInitial(x.name||"?");e.fillStyle="#fff",e.font="bold ".concat(.5*d,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),e.textAlign="center",e.textBaseline="middle",e.fillText(I,f+b,v),!x.avatar||h.isCached(x.avatar)||null!==(C=h.loadingImages)&&void 0!==C&&C.has(x.avatar)||h.loadImage(x.avatar).then(function(){s.scheduleRedraw()}).catch(function(){})}e.restore(),e.save(),e.beginPath(),e.arc(f+b,v,b,0,2*Math.PI),e.strokeStyle="#fff",e.lineWidth=2,e.stroke(),e.restore(),f+=d+u}}if(l.length>y){var T=l.length-y;e.save(),e.beginPath(),e.arc(f+d/2,v,d/2,0,2*Math.PI),e.fillStyle="#e8e8e8",e.fill(),e.fillStyle="#666",e.font="".concat(.4*d,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),e.textAlign="center",e.textBaseline="middle",e.fillText("+".concat(T),f+d/2,v),e.restore(),f+=d+4}if(1===l.length&&null!==(a=l[0])&&void 0!==a&&a.name){f+=4,e.save(),e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.fillStyle="#333",e.textAlign="left",e.textBaseline="middle";var A=n-(f-i)-c,R=this.truncateText(e,l[0].name,A);e.fillText(R,f,v),e.restore()}}else this.drawPlaceholderText(e,"Unassigned",i,r,n,o)}},{key:"drawStatusCell",value:function(e,t,i,r,n,o,a){var s,l,h;if(t){var d=null;i&&(d=i.find(function(e){return e.value===t}));var u=(null===(s=d)||void 0===s?void 0:s.label)||String(t),c=(null===(l=d)||void 0===l?void 0:l.backgroundColor)||"#f0f0f0",f=(null===(h=d)||void 0===h?void 0:h.color)||"#666",v=8,g=6,y=18;e.save(),e.font='11px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var p=e.measureText(u).width,w=Math.min(p+2*g,o-2*v),x=r+v,m=n+(a-y)/2;this.drawRoundedRect(e,x,m,w,y,3,c),e.fillStyle=f,e.textAlign="center",e.textBaseline="middle";var b=this.truncateText(e,u,w-2*g);e.fillText(b,x+w/2,m+y/2),e.restore()}else this.drawPlaceholderText(e,"-",r,n,o,a)}},{key:"drawProgressCell",value:function(e,t,i,r,n,o,a,s){var l,h,d;d=this.progressDrag.isDragging&&this.progressDrag.cell&&void 0!==a&&void 0!==s&&this.progressDrag.cell.col===a&&this.progressDrag.cell.row===s?this.progressDrag.currentValue:Math.max(0,Math.min(100,Number(t)||0));var u=8,c=6,f=n-2*u-35,v=i+u,g=r+(o-c)/2,y="#52c41a";if(d<30?y="#ff4d4f":d<70&&(y="#faad14"),e.save(),this.drawRoundedRect(e,v,g,f,c,3,"#f0f0f0"),d>0){var p=d/100*f;this.drawRoundedRect(e,v,g,p,c,3,y)}e.font='11px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.fillStyle="#666",e.textAlign="right",e.textBaseline="middle",e.fillText("".concat(Math.round(d),"%"),i+n-u,r+o/2);var w=this.hoveredCell&&void 0!==a&&void 0!==s&&this.hoveredCell.col===a&&this.hoveredCell.row===s;if(w||this.progressDrag.isDragging&&(null===(l=this.progressDrag.cell)||void 0===l?void 0:l.col)===a&&(null===(h=this.progressDrag.cell)||void 0===h?void 0:h.row)===s){var x=v+d/100*f,m=g+c/2,b=5;e.shadowColor="rgba(0, 0, 0, 0.15)",e.shadowBlur=3,e.shadowOffsetX=0,e.shadowOffsetY=1,e.beginPath(),e.arc(x,m,b,0,2*Math.PI),e.fillStyle="#fff",e.fill(),e.shadowColor="transparent",e.shadowBlur=0,e.strokeStyle=y,e.lineWidth=2,e.stroke()}e.restore()}},{key:"drawDatetimeCell",value:function(e,t,i,r,n,o){if(t){var a="";try{var s=new Date(t);a=isNaN(s.getTime())?String(t):s.toLocaleDateString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit"})}catch(l){a=String(t)}e.save(),e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.fillStyle="#495060",e.textAlign="left",e.textBaseline="middle",e.fillText(a,i+8,r+o/2),e.restore()}else this.drawPlaceholderText(e,"-",i,r,n,o)}},{key:"drawBooleanCell",value:function(e,t,i,r,n,o){var a=Boolean(t),s=14,l=i+n/2,h=r+o/2,d=l-s/2,u=h-s/2;e.save(),e.strokeStyle=a?"#52c41a":"#d9d9d9",e.lineWidth=1,e.strokeRect(d,u,s,s),a&&(e.fillStyle="#52c41a",e.fillRect(d,u,s,s),e.strokeStyle="#fff",e.lineWidth=2,e.beginPath(),e.moveTo(d+3,h),e.lineTo(d+6,u+s-4),e.lineTo(d+s-3,u+3),e.stroke()),e.restore()}},{key:"drawPlaceholderText",value:function(e,t,i,r,n,o){e.save(),e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.fillStyle="#bbb",e.textAlign="left",e.textBaseline="middle",e.fillText(t,i+8,r+o/2),e.restore()}},{key:"drawRoundedRect",value:function(e,t,i,r,n,o,a){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.fillStyle=a,e.fill()}},{key:"truncateText",value:function(e,t,i){if(e.measureText(t).width<=i)return t;var r="...",n=t;while(n.length>0&&e.measureText(n+r).width>i)n=n.slice(0,-1);return n+r}},{key:"getPersonInitial",value:function(e){return e?/[\u4e00-\u9fa5]/.test(e[0])?e[0]:e[0].toUpperCase():"?"}},{key:"hashString",value:function(e){for(var t=0,i=0;i<e.length;i++)t=e.charCodeAt(i)+((t<<5)-t);return t}},{key:"scheduleRedraw",value:function(){var e=this;this.redrawScheduled||(this.redrawScheduled=!0,null!==this.redrawTimer&&window.clearTimeout(this.redrawTimer),this.redrawTimer=window.setTimeout(function(){e.redrawScheduled=!1,e.redrawTimer=null,e.parentGrid.draw()},50))}},{key:"updatePosition",value:function(e,t){this.x===e&&this.y===t||(this.cacheValid=!1),this.x=e,this.y=t}}])}(),ai=oi,si=(i(5506),function(){function e(){wt(this,e),B(this,"viewers",new Map),B(this,"defaultViewerType","text"),B(this,"initialized",!1),B(this,"warnedTypes",new Set)}return mt(e,[{key:"register",value:function(e,t){var i;if("function"===typeof t)try{i=new t}catch(r){i=t()}else i=t;this.viewers.set(e,i),this.initialized||"text"!==e||(this.defaultViewerType=e,this.initialized=!0)}},{key:"registerAll",value:function(e){for(var t=0,i=Object.entries(e);t<i.length;t++){var r=yt(i[t],2),n=r[0],o=r[1];this.register(n,o)}}},{key:"get",value:function(e){var t=this.viewers.get(e);if(t)return t;var i=this.viewers.get(this.defaultViewerType);return i?(this.warnedTypes.has(e)||this.warnedTypes.add(e),i):null}},{key:"has",value:function(e){return this.viewers.has(e)}},{key:"getRegisteredTypes",value:function(){return Array.from(this.viewers.keys())}},{key:"setDefaultViewerType",value:function(e){this.viewers.has(e)&&(this.defaultViewerType=e)}},{key:"getDefaultViewerType",value:function(){return this.defaultViewerType}},{key:"unregister",value:function(e){return this.viewers.delete(e)}},{key:"clear",value:function(){this.viewers.clear(),this.initialized=!1}},{key:"size",get:function(){return this.viewers.size}}],[{key:"getInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}])}());B(si,"instance",void 0);var li=function(){return si.getInstance()},hi=si,di="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAALCAYAAABLcGxfAAAAOElEQVQoU2NkQAINLf3/G2oKGfGJMYIUISsgxEbRADId3QB0MfJsQHc3LmeBbAfbMCI1EIosZHkAeThBwJAJ9eAAAAAASUVORK5CYII=",ui="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAYAAADUFP50AAABvklEQVQ4T42Sv08UQRTHv293EbXw/gMtsNDCUk0U/QdOEoKFiVFoSUj4sR7EYn+83R0SRdyFzsZCYww2aiRXkFgpmhhKWinQv+Ao1As788yc3HlcCLmp5r03n5nvvO8jdC1mPiNeZZIgtyF04aC0LYQPVDaeMfNe+zi1N6xWrwHmrQCfRJcvmr/0pq0NnnaHyfUmCLgJOGMczHy1+RaYpiuXjSN1o/X9NK5tdKto76PkyYjjes8dQ9Uomt0iZj4Jt7ID6CkOa++PgjqqsuVRkFugbFwkVvkkBFUO/ZFeiFUhHMx1vmPrnOXrINQt+NFoXaTxfL0/8OktEM0SZ8WulM0bSfLwRz9gHD86S97gZ+qVY+NDFvVIbclVhbRe3P9jhhcXH/y0SaWWz3WDQVDb7Y7tixg4sUlxVrwjkTcc+WvHdfS/LfkEOTRKiVq5I2KmOfSv9wOyyrcg5rH10YFX+WZEXqWhv3ocHGX5jEN0D2XjasujIFsa8mjgixjkSTS3dBQcq2KBAF/2m1esAx1zLezCewngFAm9Jldv2wtEu5eE5C6A3xrluAoXdjqzeqj9/8aqCuD8Qf47RNd7x/EvLrzB/TA/EB4AAAAASUVORK5CYII=",ci=["value","label"],fi=new Image,vi=new Image;fi.src=di,vi.src=ui;var gi=function(e){function t(e,i,r,n,o,a,s,l,h,d,u,c){var f,v;return wt(this,t),v=Ot(this,t,[r,a,s,l,h,d.fixed]),B(v,"colIndex",void 0),B(v,"rowIndex",void 0),B(v,"rowData",void 0),B(v,"title",void 0),B(v,"key",void 0),B(v,"labelKey",void 0),B(v,"readonly",void 0),B(v,"textAlign",void 0),B(v,"textBaseline",void 0),B(v,"dataType",void 0),B(v,"options",void 0),B(v,"render",void 0),B(v,"value",void 0),B(v,"label",void 0),B(v,"originalValue",void 0),B(v,"validator",void 0),B(v,"valid",void 0),B(v,"message",void 0),B(v,"color",void 0),B(v,"borderColor",void 0),B(v,"fillColor",void 0),B(v,"borderWidth",void 0),B(v,"nestedGrid",void 0),B(v,"hasNestedData",!1),B(v,"nestedConfig",void 0),B(v,"nestedColumns",void 0),B(v,"viewerType",void 0),B(v,"viewerData",void 0),B(v,"useViewer",void 0),B(v,"viewerConfig",void 0),v.colIndex=n,v.rowIndex=o,v.rowData=u,v.title=d.title,v.key=d.key,v.labelKey=d.label,v.fixed=d.fixed,v.readonly=d.readonly,v.textAlign=d.align||"left",v.textBaseline=d.baseline||"middle",v.dataType=d.type||"text",v.options=d.options,v.render=d.render,v.value=null===e||void 0===e?"":e,v.label="",v.originalValue=e,v.validator=new $t(d),v.valid=!0,v.message=null,Object.assign(v,c),v.setLabel(null===i||void 0===i?v.value:i),"nested"===d.type&&u._nestedData&&u._nestedData[d.key]&&(v.hasNestedData=!0,v.nestedConfig=u._nestedData[d.key],v.nestedColumns=d.nestedColumns||v.nestedConfig.columns||[]),v.viewerType=d.viewerType||d.type||"text",v.useViewer=null!==(f=d.useViewer)&&void 0!==f&&f,v.viewerConfig=v.extractViewerConfig(d),d.rule&&!1===d.rule.immediate?Pt(v):(v.validate(),v)}return Bt(t,e),mt(t,[{key:"extractViewerConfig",value:function(e){for(var t=["mode","avatarSize","maxDisplay","showText","textPosition","barHeight","color","trackColor","colorThresholds","min","max","draggable","displayType","format","showIcon","displayStyle","checkedColor","uncheckedColor","trueText","falseText","nullText","asTag","showArrow","multiple","maxTags","fit","borderRadius","placeholder","animated","alt","pathSeparator","showFullPath","tagBackgroundColor","tagBorderColor","tagColor","placeholder"],i={},r=0,n=t;r<n.length;r++){var o=n[r];void 0!==e[o]&&(i[o]=e[o])}return e.viewerConfig&&"object"===P(e.viewerConfig)&&Object.assign(i,e.viewerConfig),i}},{key:"createNestedGridLazy",value:function(){if(this.hasNestedData&&this.nestedConfig&&this.nestedColumns){var e=this.nestedColumns.reduce(function(e,t){return e+(t.width||80)},0);this.nestedGrid=new ai({columns:this.nestedColumns,data:this.nestedConfig.data||[],x:0,y:0,width:e,height:this.height-10,parentGrid:this.grid,parentCell:this,displayRows:this.nestedConfig.displayRows}),this.rowData._nestedExpanded&&this.rowData._nestedExpanded[this.key]&&(this.nestedGrid.expanded=!0)}}},{key:"buildViewerData",value:function(){var e,t=null!==this.value&&"object"===P(this.value)&&!Array.isArray(this.value),i=F({value:t?this.value.value:this.value,label:t?null!==(e=this.value.label)&&void 0!==e?e:"":this.label,options:this.options,style:{color:this.color,textAlign:this.textAlign,textBaseline:this.textBaseline},extra:{rowData:this.rowData}},this.viewerConfig);if(t){var r=this.value,n=(r.value,r.label,qt(r,ci));Object.assign(i,n)}return i}},{key:"buildRenderContext",value:function(e,t,i){var r=this,n=this.grid,o=n.painter,a=n.editor,s=this.grid.hoverRowIndex===this.rowIndex&&!this.grid.isScrolling,l=this.grid.hoverRowIndex===this.rowIndex&&this.grid.hoverColIndex===this.colIndex&&!this.grid.isScrolling,h=!!a._nestedGridContext,d=a.show&&a.yIndex===this.rowIndex&&!h,u=this.grid.body.getRow(this.rowIndex),c=!!u&&u.checked;return{ctx:o.ctx,painter:o,grid:this.grid,bounds:{x:e,y:t,width:this.width,height:this.height},rowIndex:this.rowIndex,colIndex:this.colIndex,readonly:this.readonly||!1,isHoverRow:s,isHoverCell:l,isEditing:d,isChecked:c,fillColor:i,requestRedraw:function(){return r.grid.draw()}}}},{key:"drawWithViewer",value:function(e,t,i){var r=li(),n=r.get(this.viewerType||"text");if(n){var o=this.buildRenderContext(e,t,i),a=this.viewerData||this.buildViewerData();n.draw(o,a)}else this.drawDefaultContent(e,t,i)}},{key:"drawDefaultContent",value:function(e,t,i){var r,n=this.grid,o=n.painter,a=n.editor,s=this.grid.styleManager.getCellStyle({isHeader:!1,isReadonly:this.readonly,isHover:this.grid.hoverRowIndex===this.rowIndex&&!this.grid.isScrolling,isEditing:a.show&&a.yIndex===this.rowIndex,isStriped:this.grid.striped,isChecked:(null===(r=this.grid.body.getRow(this.rowIndex))||void 0===r?void 0:r.checked)||!1,rowIndex:this.rowIndex});o.drawCellText(this.label,e,t,this.width,this.height,10,{color:s.color||this.color,align:this.textAlign,baseLine:this.textBaseline}),"select"===this.dataType&&o.drawCellAffixIcon("arrow",e,t,this.width,this.height-2,{color:"#bbbec4",fillColor:i})}},{key:"isInHorizontalAutofill",value:function(e,t){return e>this.x+this.grid.scrollX+this.width-4&&e<this.x+this.grid.scrollX+this.width+4&&e>this.grid.fixedLeftWidth&&e<this.grid.width-this.grid.fixedRightWidth+4}},{key:"isInsideFixedHorizontalAutofill",value:function(e,t){var i=this.grid.width-(this.grid.tableWidth-this.x-this.width)-this.width-this.grid.verticalScrollerSize;return e>=i+this.width-4&&e<i+this.width+4&&"right"===this.fixed||e>this.x+this.width-4&&e<this.x+this.width+4&&"left"===this.fixed}},{key:"validate",value:function(){var e=Xt(Yt().m(function e(t){var i,r,n;return Yt().w(function(e){while(1)switch(e.n){case 0:return e.n=1,this.validator.validate(this.value,t||this.rowData);case 1:i=e.v,r=i.flag,n=i.message,this.valid=r,this.message=n;case 2:return e.a(2)}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:"resetValidate",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.valid=e,this.message=t}},{key:"handleNumber",value:function(e){return 0===e||e&&!isNaN(Number(e))?Number(e):e||null}},{key:"setData",value:function(e,t){if(t||!this.readonly){var i=e;"string"===typeof i&&(i=e.trim()),"number"===this.dataType&&(i=this.handleNumber(i)),"[object Object]"===Object.prototype.toString.call(e)?(this.value=e.value,this.setLabel(e.label)):(this.grid.clipboard.isPaste||this.grid.autofill.enable?this.value=this.getMapValue(i):this.value=i,this.setLabel(i));var r=this.grid.body.getRowData(this.rowIndex);this.validate(r),this.value!==this.originalValue?this.grid.hashChange["".concat(this.colIndex,"-").concat(this.rowIndex)]=!0:delete this.grid.hashChange["".concat(this.colIndex,"-").concat(this.rowIndex)]}}},{key:"setLabel",value:function(e){var t;t="function"===typeof this.render?this.render(e):this.getMapLabel(e),this.label=null===t||void 0===t?"":t}},{key:"getMapValue",value:function(e){var t=e;if("select"===this.dataType&&Array.isArray(this.options)){var i,r=pt(this.options);try{for(r.s();!(i=r.n()).done;){var n=i.value;if(e===n.label){t=n.value;break}}}catch(o){r.e(o)}finally{r.f()}}return t}},{key:"getMapLabel",value:function(e){var t=e;if("select"===this.dataType&&Array.isArray(this.options)){var i,r=pt(this.options);try{for(r.s();!(i=r.n()).done;){var n=i.value;if(e===n.value){t=n.label;break}}}catch(o){r.e(o)}finally{r.f()}}return t}},{key:"drawLoadingIndicator",value:function(e,t,i){var r=this.grid.painter,n=r.ctx,o=14,a=8,s=e+this.width-o-a,l=t+(this.height-o)/2,h=o+a;r.drawRect(s-4,t,h+4,this.height,{fillColor:i,borderWidth:0});var d=this.grid.getLoadingImage();if(d){var u=s+o/2,c=l+o/2;n.save(),n.translate(u,c),n.rotate(this.grid.getLoadingRotation()),n.drawImage(d,-o/2,-o/2,o,o),n.restore()}else{var f=s+o/2,v=l+o/2,g=6,y=this.grid.getLoadingRotation();n.save(),n.strokeStyle="#1890ff",n.lineWidth=2,n.lineCap="round",n.beginPath(),n.arc(f,v,g,y,y+1.5*Math.PI),n.stroke(),n.restore()}}},{key:"draw",value:function(){var e,t=this,i=this.grid,r=i.painter,n=i.editor,o=i.selector,a=i.autofill,s=i.clipboard,l=i.width,h=i.tableWidth,d=i.verticalScrollerSize,u=i.scrollX,c=i.scrollY,f=i.range,v=i.fillColor,g=i.striped,y=i.styleManager,p="right"===this.fixed?l-(h-this.x-this.width)-this.width-d:"left"===this.fixed?this.x:this.x+u,w=this.y+c,x={borderColor:b,borderWidth:1,lineDash:[4,4]},m=this.grid.hoverRowIndex===this.rowIndex&&!this.grid.isScrolling,C=!!n._nestedGridContext,S=n.show&&n.yIndex===this.rowIndex&&!C,I=this.grid.body.getRow(this.rowIndex),A=!!I&&I.checked,R=y.getCellStyle({isHeader:!1,isReadonly:this.readonly,isHover:m,isEditing:S,isStriped:g,isChecked:A,rowIndex:this.rowIndex}),D=R.backgroundColor||v;if(r.ctx.save(),r.drawRect(p,w,this.width,this.height,{fillColor:D,borderColor:this.borderColor,borderWidth:1}),r.ctx.clip(),this.hasNestedData&&!this.nestedGrid&&this.createNestedGridLazy(),this.useViewer&&!this.nestedGrid)this.drawWithViewer(p,w,D);else if(this.nestedGrid)this.nestedGrid.updatePosition(p+5,w+5),this.nestedGrid.draw();else if("image"===this.dataType)if(this.value&&""!==this.value){var E=ni.getInstance(),P=E.isAnimatedImage(this.value),O=P?E.getGifCanvas(this.value):null,M=O||E.getCachedImage(this.value);if(M){var B,H,F=4,L=this.width-2*F,W=this.height-2*F,z=M.width/M.height,N=L/W;z>N?(B=L,H=L/z):(H=W,B=W*z);var V=p+(this.width-B)/2,_=w+(this.height-H)/2;r.drawImage(M,V,_,B,H)}else E.isCached(this.value)||E.loadingImages.has(this.value)||E.loadImage(this.value).then(function(){t.grid.draw()}).catch(function(e){}),r.drawCellText("Loading...",p,w,this.width,this.height,10,{color:"#999",align:"center",baseLine:this.textBaseline})}else r.drawCellText("No Image",p,w,this.width,this.height,10,{color:"#ccc",align:"center",baseLine:this.textBaseline});else r.drawCellText(this.label,p,w,this.width,this.height,10,{color:R.color||this.color,align:this.textAlign,baseLine:this.textBaseline,iconOffsetX:12,iconOffsetY:1,iconWidth:12,iconHeight:12}),"select"===this.dataType&&r.drawCellAffixIcon("arrow",p,w,this.width,this.height-2,{color:"#bbbec4",fillColor:D});var j=this.rowData[this.grid.rowKey],Y=void 0!==j&&this.grid.isLoadingCell("".concat(j,"|||").concat(this.key));Y&&this.drawLoadingIndicator(p,w,D);var G=this.grid.hoverRowIndex===this.rowIndex&&this.grid.hoverColIndex===this.colIndex&&!this.grid.isScrolling,X=!0===(null===(e=this.grid.viewerDrag)||void 0===e?void 0:e.isDragging);if(!Y&&!this.readonly&&G&&!n.show&&!this.nestedGrid&&"image"!==this.dataType&&!X){var U=ni.getInstance(),q=U.getEditIcon();if(q){var K=14,J=8,Q=p+this.width-K-J,Z=w+(this.height-K)/2;r.drawRect(Q-4,w,K+8,this.height,{fillColor:D,borderWidth:0}),r.drawImage(q,Q,Z,K,K)}}if(!this.valid){var $=[[p+this.width-8,w],[p+this.width,w],[p+this.width,w+8]];r.drawLine($,{fillColor:T})}if(o.show){var ee=o.xArr[0],te=o.xArr[1],ie=o.yArr[0],re=o.yArr[1];if(this.colIndex>=ee&&this.colIndex<=te&&this.rowIndex>=ie&&this.rowIndex<=re&&r.drawRect(p,w,this.width,this.height,{fillColor:k}),this.colIndex>=ee&&this.colIndex<=te&&this.rowIndex+1===ie){var ne=[[p,w+this.height-1],[p+this.width,w+this.height-1]];r.drawLine(ne,{borderColor:b,borderWidth:1})}if(this.colIndex>=ee&&this.colIndex<=te&&this.rowIndex===re)if(this.rowIndex===f.maxY){var oe=[[p,w+this.height],[p+this.width,w+this.height]];r.drawLine(oe,{borderColor:b,borderWidth:2})}else{var ae=[[p,w+this.height-1],[p+this.width,w+this.height-1]];r.drawLine(ae,{borderColor:b,borderWidth:1})}if(this.colIndex>=ee&&this.colIndex<=te&&this.rowIndex===ie||this.colIndex>=ee&&this.colIndex<=te&&this.rowIndex-1===re){var se=[[p,w],[p+this.width,w]];r.drawLine(se,{borderColor:b,borderWidth:1})}if(this.colIndex===ee&&this.rowIndex>=ie&&this.rowIndex<=re||this.colIndex-1===te&&this.rowIndex>=ie&&this.rowIndex<=re){var le=[[p,w],[p,w+this.height]];r.drawLine(le,{borderColor:b,borderWidth:2})}if(this.colIndex+1===ee&&this.rowIndex>=ie&&this.rowIndex<=re||this.colIndex===te&&this.rowIndex>=ie&&this.rowIndex<=re){var he=[[p+this.width,w],[p+this.width,w+this.height]];r.drawLine(he,{borderColor:b,borderWidth:2})}if(!n.show){var de=6,ue={borderColor:"#fff",borderWidth:2,fillColor:b};this.colIndex===a.xIndex&&this.rowIndex===a.yIndex&&r.drawRect(p+this.width-3,w+this.height-3,de,de,ue),this.colIndex===a.xIndex&&this.rowIndex-1===a.yIndex&&r.drawRect(p+this.width-3,w-3,de,de,ue),this.colIndex-1===a.xIndex&&this.rowIndex===a.yIndex&&r.drawRect(p-3,w+this.height-3,de,de,ue),this.colIndex-1===a.xIndex&&this.rowIndex-1===a.yIndex&&"left"!==this.fixed&&r.drawRect(p-3,w-3,de,de,ue)}if(a.enable){var ce=a.xArr[0],fe=a.xArr[1],ve=a.yArr[0],ge=a.yArr[1];if(this.colIndex>=ce&&this.colIndex<=fe&&this.rowIndex===ve){var ye=[[p,w+1],[p+this.width,w+1]];r.drawLine(ye,x)}if(this.colIndex>=ce&&this.colIndex<=fe&&this.rowIndex===ge){var pe=[[p,w+this.height-1],[p+this.width,w+this.height-1]];r.drawLine(pe,x)}if(this.colIndex===ce&&this.rowIndex>=ve&&this.rowIndex<=ge){var we=[[p+1,w],[p+1,w+this.height]];r.drawLine(we,x)}if(this.colIndex===fe&&this.rowIndex>=ve&&this.rowIndex<=ge){var xe=[[p+this.width-1,w],[p+this.width-1,w+this.height]];r.drawLine(xe,x)}}}if(s.show){var me=s.xArr[0],be=s.xArr[1],ke=s.yArr[0],Ce=s.yArr[1];if(this.colIndex>=me&&this.colIndex<=be&&this.rowIndex===ke){var Se=[[p,w+1],[p+this.width,w+1]];r.drawLine(Se,x)}if(this.colIndex>=me&&this.colIndex<=be&&this.rowIndex===Ce){var Ie=[[p,w+this.height-2],[p+this.width,w+this.height-2]];r.drawLine(Ie,x)}if(this.colIndex===me&&this.rowIndex>=ke&&this.rowIndex<=Ce){var Te=[[p+1,w],[p+1,w+this.height]];r.drawLine(Te,x)}if(this.colIndex===be&&this.rowIndex>=ke&&this.rowIndex<=Ce){var Ae=[[p+this.width-1,w],[p+this.width-1,w+this.height]];r.drawLine(Ae,x)}}r.ctx.restore()}}])}(Ft),yi=gi,pi=function(e){function t(e,i,r,n,o,a){var s;wt(this,t),s=Ot(this,t,[e,r,n,null,o]),B(s,"data",void 0),B(s,"rowIndex",void 0),B(s,"_rowId",void 0),B(s,"checked",void 0),B(s,"allCells",void 0),B(s,"fixedCells",void 0),B(s,"cells",void 0),B(s,"rowHeader",void 0),s.data=a,s.rowIndex=i,s._rowId=a._rowId||"row_".concat(i),s.checked=e.selectedRowIds.has(s._rowId),s.allCells=[],s.fixedCells=[],s.cells=[];var l={color:s.grid.color,fillColor:s.grid.fillColor,borderColor:s.grid.borderColor,borderWidth:s.grid.borderWidth};s.rowHeader=new _t(e,i,r,n,c,s.height,l),s.rowHeader.handleCheck(s.checked);for(var h=e.originFixedWidth,d=0;d<s.grid.columnsLength;d++){var u=s.grid.columns[d],f=u.width||R[u.size||"mini"];"nested"===u.type&&u.nestedColumns&&u.nestedColumns.length>0&&(f=u.nestedColumns.reduce(function(e,t){return e+(t.width||80)},0));var v="";u.fixedLeft?v="left":u.fixedRight&&(v="right"),u.fixed=v;var g=new yi(a[u.key],a[u.label],e,d,i,h,n,f,s.height,u,a,l);s.allCells.push(g),v?s.fixedCells.push(g):s.cells.push(g),h+=f}return s}return Bt(t,e),mt(t,[{key:"isInVerticalAutofill",value:function(e,t){return this.grid.autofill.yIndex===this.rowIndex&&t>this.y+this.grid.scrollY+this.height-4&&t<this.y+this.height+this.grid.scrollY+4}},{key:"handleCheck",value:function(e){var t="boolean"===typeof e?e:!this.checked;t?this.grid.selectedRowIds.add(this._rowId):this.grid.selectedRowIds.delete(this._rowId),this.checked=t,this.rowHeader.handleCheck(this.checked)}},{key:"mouseDown",value:function(e,t){var i=this,r=this.allCells[this.grid.autofill.xIndex];if(!r||!r.isInHorizontalAutofill(e,t)&&!r.isInsideFixedHorizontalAutofill(e,t))for(var n=e<=this.grid.fixedLeftWidth,o=e>=this.grid.width-this.grid.fixedRightWidth-this.grid.verticalScrollerSize,a=0;a<this.allCells.length;a++){var s=this.allCells[a];if(s.nestedGrid){if(n&&"left"!==s.fixed)continue;if(o&&"right"!==s.fixed)continue;if(!n&&!o&&s.fixed)continue;var l="right"===s.fixed?this.grid.width-(this.grid.tableWidth-s.x-s.width)-s.width-this.grid.verticalScrollerSize:"left"===s.fixed?s.x:s.x+this.grid.scrollX,h=s.y+this.grid.scrollY,d=e-l,u=t-h;if(s.nestedGrid.isMouseInside(d,u)){var c=s.nestedGrid.getCellAtPosition(d,u);if(c){var f=s.nestedGrid.columns[c.col],v=f&&"image"!==f.type;if(v&&s.nestedGrid.isMouseOnEditIcon(d,u,c))return}}}else{if(!s.readonly&&s.isInsideEditIcon(e,t))return this.grid.selectCell(s),void setTimeout(function(){i.grid.startEdit()},0);if("select"===s.dataType&&s.isInsideAffixIcon(e,t))this.grid.selectCell(s),setTimeout(function(){i.grid.startEdit()},0);else if(s.isInsideHorizontalBodyBoundary(e,t)||s.isInsideFixedHorizontalBodyBoundary(e,t)){if(this.grid.clearMultiSelect(),s.useViewer&&("boolean"===s.viewerType||"punch-timing"===s.viewerType)){var g=li(),y=g.get(s.viewerType);if(y&&y.onClick){if("boolean"===s.viewerType){var p="right"===s.fixed?this.grid.width-(this.grid.tableWidth-s.x-s.width)-s.width-this.grid.verticalScrollerSize:"left"===s.fixed?s.x:s.x+this.grid.scrollX,w=s.y+this.grid.scrollY,x=e-p,m=t-w,b=s.buildRenderContext(p,w,""),k=s.buildViewerData(),C=y.onClick(b,k,x,m);if(C&&!s.readonly){var S=s.value,I=!S,T=this.grid.body.getRowData(s.rowIndex);return s.setData(I),this.grid.afterEditCell(T),this.grid.history.pushState({before:{colIndex:s.colIndex,rowIndex:s.rowIndex,value:S},after:{colIndex:s.colIndex,rowIndex:s.rowIndex,value:I},type:"single"}),void this.grid.draw()}}if("punch-timing"===s.viewerType){var A="right"===s.fixed?this.grid.width-(this.grid.tableWidth-s.x-s.width)-s.width-this.grid.verticalScrollerSize:"left"===s.fixed?s.x:s.x+this.grid.scrollX,R=s.y+this.grid.scrollY,D=e-A,E=t-R,P=s.buildRenderContext(A,R,""),O=s.buildViewerData(),M=y.onClick(P,O,D,E);if(M)return void this.grid.draw()}}}this.grid.selectCell(s)}}}}},{key:"mouseMove",value:function(e,t){var i=this.y+this.grid.scrollY;if(t>=i&&t<=i+this.height&&(this.rowHeader.isInsideCheckboxBoundary(e,t)||this.rowHeader.isInsideIndexBoundary(e,t)))this.grid.setHoverCell(0,this.rowIndex);else for(var r=0;r<this.allCells.length;r++){var n=this.allCells[r];if(n.isInsideHorizontalTableBoundary(e,t)||n.isInsideFixedHorizontalBodyBoundary(e,t)){var o=n.colIndex,a=n.rowIndex,s=n.x,l=n.y,h=n.width,d=n.height,u=n.valid,c=n.message,f=n.fixed;this.grid.multiSelectCell(o,a,e,t),this.grid.setHoverCell(o,a),this.grid.tooltip.update({valid:u,message:c,x:s,y:l,colWidth:h,colHeight:d,fixed:f}),(!n.readonly&&n.isInsideEditIcon(e,t)||"select"===n.dataType&&n.isInsideAffixIcon(e,t))&&(this.grid.target.style.cursor="pointer")}}}},{key:"handleAutofill",value:function(e,t){var i=this.allCells[this.grid.autofill.xIndex];i&&(i.isInHorizontalAutofill(e,t)||i.isInsideFixedHorizontalAutofill(e,t))&&(this.grid.target.style.cursor="crosshair")}},{key:"handleStartAutofill",value:function(e,t){var i=this.allCells[this.grid.autofill.xIndex];i&&(i.isInHorizontalAutofill(e,t)||i.isInsideFixedHorizontalAutofill(e,t))&&this.grid.startAutofill()}},{key:"click",value:function(e,t){(this.rowHeader.isInsideCheckboxBoundary(e,t)||this.rowHeader.isInsideIndexBoundary(e,t))&&(this.handleCheck(),this.grid.handleCheckHeader())}},{key:"dbClick",value:function(e,t){for(var i=0;i<this.allCells.length;i++){var r=this.allCells[i];r.nestedGrid||(r.isInsideHorizontalBodyBoundary(e,t)||r.isInsideFixedHorizontalBodyBoundary(e,t))&&this.grid.startEdit()}}},{key:"resizeColumn",value:function(e,t){var i=this.grid.width-this.grid.tableWidth-this.grid.verticalScrollerSize-this.grid.scrollX,r=this.allCells[e];if(i<=t){r.width+=t;for(var n=e+1;n<this.grid.columnsLength;n++)this.allCells[n].x+=t}0===i&&t<=0&&(r.width+=t,this.allCells[e+1].width-=t,this.allCells[e+1].x+=t)}},{key:"resizeRow",value:function(e,t){this.rowIndex===e&&(this.height=t,this.rePaint())}},{key:"rePaint",value:function(){for(var e=0;e<this.cells.length;e++){var t=this.cells[e];t.height=this.height,t.y=this.y}for(var i=0;i<this.fixedCells.length;i++){var r=this.fixedCells[i];r.height=this.height,r.y=this.y}this.rowHeader.height=this.height,this.rowHeader.y=this.y}},{key:"draw",value:function(){for(var e=0;e<this.cells.length;e++){var t=this.cells[e];t.isHorizontalVisibleOnBody()&&t.draw()}var i=this.grid,r=i.editor,n=i.striped,o=i.styleManager,a=i.fillColor,s=this.grid.hoverRowIndex===this.rowIndex&&!this.grid.isScrolling,l=!!r._nestedGridContext,h=r.show&&r.yIndex===this.rowIndex&&!l,d=o.getCellStyle({isHeader:!1,isReadonly:!1,isHover:s,isEditing:h,isStriped:n,isChecked:this.checked,rowIndex:this.rowIndex}),u=d.backgroundColor||a;0!==this.grid.scrollX&&this.grid.painter.drawRect(this.x+this.grid.originFixedWidth,this.y+this.grid.scrollY,this.grid.fixedLeftWidth-this.grid.originFixedWidth,this.height,{fillColor:u,shadowBlur:4,shadowColor:"rgba(143, 140, 140, 0.22)",shadowOffsetX:2,shadowOffsetY:2}),this.grid.tableWidth+this.grid.verticalScrollerSize-this.grid.width+this.grid.scrollX>0&&this.grid.painter.drawRect(this.grid.width-this.grid.fixedRightWidth,this.y+this.grid.scrollY,this.grid.fixedRightWidth-this.grid.verticalScrollerSize,this.height,{fillColor:u,shadowBlur:4,shadowColor:"rgba(143, 140, 140, 0.22)",shadowOffsetX:-2,shadowOffsetY:2});for(var c=0;c<this.fixedCells.length;c++){var f=this.fixedCells[c];f.draw()}this.grid.drawFixedNestedColumnBorders(this.y+this.grid.scrollY,this.height),this.rowHeader.draw()}}])}(Ft),wi=pi;function xi(e){return null!==e&&void 0!==e&&!0===e.isGroup}function mi(e){return null!==e&&void 0!==e&&!0===e.isSeparateRow}function bi(e){return null!==e&&void 0!==e&&!xi(e)&&!mi(e)}var ki={GROUP_HEADER_HEIGHT:36,SEPARATOR_HEIGHT:12,NORMAL_ROW_HEIGHT:36,LEVEL_INDENT:20,ARROW_SIZE:16,GROUP_PADDING:8},Ci={level0BgColor:"#E3F2FD",level1BgColor:"#F5F5F5",level2BgColor:"#FAFAFA",textColor:"#333333",fontWeight:"bold",fontSize:14},Si={level0BgColor:"#E0E0E0",level1BgColor:"#EEEEEE",level2BgColor:"#F5F5F5"},Ii=function(e){function t(e,i,r,n,o,a){var s;return wt(this,t),s=Ot(this,t,[e,r,n,null,o]),B(s,"data",void 0),B(s,"rowIndex",void 0),B(s,"_rowId",void 0),B(s,"isGroupHeader",void 0),B(s,"isSeparator",void 0),B(s,"checked",!1),B(s,"rowHeader",{handleCheck:function(e){}}),B(s,"allCells",[]),B(s,"cells",[]),B(s,"fixedCells",[]),s.data=a,s.rowIndex=i,s._rowId=String(a.id)||"group_row_".concat(i),s.isGroupHeader=xi(a),s.isSeparator=mi(a),s}return Bt(t,e),mt(t,[{key:"draw",value:function(){this.isGroupHeader?this.drawGroupHeader():this.isSeparator&&this.drawSeparator()}},{key:"drawGroupHeader",value:function(){var e,t=this.data,i=t.groupLevel,r=void 0===i?0:i,n=t.expanded,o=void 0!==n&&n,a=t.name,s=t.count,l=t.showCount,h=this.grid.painter,d=h.ctx,u=this.y+this.grid.scrollY,c=Math.max(this.grid.width,this.grid.tableWidth);switch(r){case 0:e=Ci.level0BgColor;break;case 1:e=Ci.level1BgColor;break;case 2:default:e=Ci.level2BgColor;break}d.save(),d.fillStyle=e,d.fillRect(this.x,u,c,this.height);var f=r*ki.LEVEL_INDENT,v=ki.GROUP_PADDING,g=this.x+v+f;g=this.drawExpandArrow(d,g,u,o),g=this.drawGroupName(d,g,u,a),l&&void 0!==s&&this.drawCountBadge(d,g,u,s),d.strokeStyle=this.grid.borderColor,d.lineWidth=1,d.beginPath(),d.moveTo(this.x,u+this.height-.5),d.lineTo(this.x+c,u+this.height-.5),d.stroke(),d.restore()}},{key:"drawExpandArrow",value:function(e,t,i,r){var n=ki.ARROW_SIZE,o=i+(this.height-n)/2,a=t+n/2,s=o+n/2,l=5;return e.save(),e.strokeStyle="#666",e.lineWidth=2,e.lineCap="round",e.lineJoin="round",e.beginPath(),r?(e.moveTo(a-l,s-l/2),e.lineTo(a,s+l/2),e.lineTo(a+l,s-l/2)):(e.moveTo(a-l/2,s-l),e.lineTo(a+l/2,s),e.lineTo(a-l/2,s+l)),e.stroke(),e.restore(),t+n+8}},{key:"drawGroupName",value:function(e,t,i,r){var n;e.save(),e.font="".concat(Ci.fontWeight," ").concat(Ci.fontSize,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),e.fillStyle=Ci.textColor,e.textAlign="left",e.textBaseline="middle",n=Array.isArray(r)?r.join(", "):String(r||"未命名分组"),e.fillText(n,t,i+this.height/2);var o=e.measureText(n).width;return e.restore(),t+o+8}},{key:"drawCountBadge",value:function(e,t,i,r){e.save(),e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.fillStyle="#999",e.textAlign="left",e.textBaseline="middle",e.fillText("(".concat(r,")"),t,i+this.height/2),e.restore()}},{key:"drawSeparator",value:function(){var e,t=this.data,i=t.separateLevel,r=void 0===i?0:i,n=this.grid.painter,o=n.ctx,a=this.y+this.grid.scrollY,s=Math.max(this.grid.width,this.grid.tableWidth);switch(r){case 0:e=Si.level0BgColor;break;case 1:e=Si.level1BgColor;break;case 2:default:e=Si.level2BgColor;break}o.save(),o.fillStyle=e,o.fillRect(this.x,a,s,this.height),o.restore()}},{key:"isInsideExpandArrow",value:function(e,t){if(!this.isGroupHeader)return!1;var i=this.data,r=i.groupLevel,n=void 0===r?0:r,o=n*ki.LEVEL_INDENT,a=ki.GROUP_PADDING,s=ki.ARROW_SIZE,l=this.y+this.grid.scrollY,h=this.x+a+o,d=l;return e>=h&&e<=h+s+8&&t>=d&&t<=d+this.height}},{key:"isVerticalVisibleOnBody",value:function(){var e=this.y+this.grid.scrollY,t=e+this.height,i=this.grid.tableHeaderHeight,r=this.grid.height-this.grid.horizontalScrollerSize;return t>i&&e<r}},{key:"isInsideVerticaBodyBoundary",value:function(e,t){var i=this.y+this.grid.scrollY;return t>=i&&t<=i+this.height&&e>=this.x&&e<=this.grid.width-this.grid.verticalScrollerSize}},{key:"handleClick",value:function(e,t){if(this.isGroupHeader&&this.isInsideExpandArrow(e,t)){var i=this.data;return i.expanded=!i.expanded,!0}return!1}},{key:"rePaint",value:function(){}},{key:"resizeColumn",value:function(e,t){}},{key:"handleCheck",value:function(e){}},{key:"isInVerticalAutofill",value:function(e,t){return!1}},{key:"handleAutofill",value:function(e,t){}},{key:"handleStartAutofill",value:function(e,t){}},{key:"isInsideVerticaTableBoundary",value:function(e,t){return this.isInsideVerticaBodyBoundary(e,t)}},{key:"mouseMove",value:function(e,t){}},{key:"mouseDown",value:function(e,t){}},{key:"click",value:function(e,t){this.handleClick(e,t)}},{key:"dbClick",value:function(e,t){}}])}(Ft),Ti=Ii,Ai=30,Ri=36,Di=function(){function e(t,i){wt(this,e),B(this,"grid",void 0),B(this,"data",void 0),B(this,"rows",void 0),B(this,"height",void 0),B(this,"rowHeights",void 0),B(this,"rowOffsets",void 0),B(this,"visibleRowIndexes",void 0),B(this,"rowCache",void 0),B(this,"bufferSize",void 0),B(this,"addRowButtons",void 0),B(this,"hoverAddRowButtonIndex",void 0),B(this,"rowAccessTime",void 0),B(this,"maxCacheSize",void 0),this.grid=t,this.data=[],this.rows=[],this.height=0,this.rowHeights=[],this.rowOffsets=[],this.visibleRowIndexes=new Set,this.rowCache=new Map,this.bufferSize=10,this.rowAccessTime=new Map,this.maxCacheSize=500,this.addRowButtons=[],this.hoverAddRowButtonIndex=-1,this.paint(i)}return mt(e,[{key:"paint",value:function(e){this.data=e;var t=e.length;this.rowCache.clear(),this.rowAccessTime.clear(),this.visibleRowIndexes.clear(),this.rows=[],this.rowHeights=new Array(t),this.rowOffsets=new Array(t);for(var i=this.grid.tableHeaderHeight,r=0;r<t;r++){var n=e[r],o=this.grid.rowHeight||v;if(xi(n))o=n.rowHeight||ki.GROUP_HEADER_HEIGHT;else if(mi(n))o=n.rowHeight||ki.SEPARATOR_HEIGHT;else if(n.rowHeight&&"number"===typeof n.rowHeight)o=Math.max(n.rowHeight,Ai);else if(n._rowHeight&&"number"===typeof n._rowHeight)o=Math.max(n._rowHeight,Ai);else{for(var a=0,s=0;s<this.grid.columnsLength;s++){var l=this.grid.columns[s];if("nested"===l.type&&n._nestedData&&n._nestedData[l.key]){var h=n._nestedData[l.key],d=h.data||[],u=h.displayRows,c=28,f=u&&d.length>u?u:d.length,g=u&&d.length>u,y=g?30:0,p=f*c+y+10;p>a&&(a=p)}}a>0&&(o=Math.max(a,30),n._rowHeight=o)}this.rowHeights[r]=o,this.rowOffsets[r]=i,i+=o}this.height=i,this.calculateAddRowButtons(),this.updateVisibleRows(),e.length>0&&this.grid.onLoad()}},{key:"pasteData",value:function(e){var t=this.grid.editor,i=t.xIndex,r=t.yIndex,n=[i,i+e[0].length-1],o=[r,r+e.length-1],a=this.getSelectedData({xArr:n,yArr:o}),s=a.value,l={value:e,colIndex:i,rowIndex:r};if(this.grid.history.pushState({before:{value:s,colIndex:i,rowIndex:r},after:l,type:"multiple"}),this.grid.clipboard.show){var h=this.getRangeData(this.grid.clipboard);this.batchSetData({value:h,colIndex:i,rowIndex:r})}else this.batchSetData(l);for(var d=r,u=d+e.length-1,c=[],f=d;f<=u;f++)c.push(this.getRowData(f));this.grid.afterPaste(c)}},{key:"batchSetData",value:function(e){for(var t=e.colIndex,i=e.rowIndex,r=e.value,n=0;n<=r.length-1;n++)for(var o=r[n].length,a=0;a<=o-1;a++){var s=this.getRow(n+i),l=s.allCells,h=l[a+t];h.setData(r[n][a])}}},{key:"autofillData",value:function(){var e=this,t=this.grid.autofill,i=t.xArr,r=t.yArr,n=this.grid.selector,o=n.xArr,a=n.yArr;if(!(r[1]<0||i[1]<0)){if("function"===typeof this.grid.customAutofill){var s=this.getRangeData(),l=s.map(function(t,i){return t.map(function(t,r){var n=e.getRow(i+a[0]),s=n.allCells[r+o[0]];return{label:t.label,value:t.value,dataType:s.dataType}})}),h=function(t,i,r){var n=e.getRow(t),o=n.allCells[i];o.setData(r)},d=function(t){var i,r=e.getRow(a[0]);return(null===(i=r.allCells[t])||void 0===i?void 0:i.dataType)||"text"};this.grid.customAutofill({sourceData:l,targetRange:{xArr:i,yArr:r},selectionRange:{xArr:o,yArr:a},setCell:h,getCellDataType:d})}else for(var u=this.getRangeData(),c=u[0].length,f=u.length,v=0;v<=r[1]-r[0];v++)for(var g=0;g<=i[1]-i[0];g++){var y=g+i[0],p=v+r[0],w=u[v%f][g%c],x=this.getRow(p),m=x.allCells[y];m.setData(w)}var b=a[0],k=a[1],C=[];r[0]!==a[0]?b=r[0]:(b=a[1]+1,k=r[1]);for(var S=b;S<=k;S++)C.push(this.getRowData(S));this.grid.afterAutofill(C),this.grid.clearAuaofill()}}},{key:"resizeColumn",value:function(e,t){this.rowCache.forEach(function(i){void 0===i.isGroupHeader&&void 0===i.isSeparator&&i.resizeColumn(e,t)})}},{key:"resizeAllColumn",value:function(e){var t=this;this.rowCache.forEach(function(i){if(void 0===i.isGroupHeader&&void 0===i.isSeparator&&i.allCells)for(var r=t.grid.originFixedWidth,n=0;n<i.allCells.length;n++){var o=i.allCells[n],a=t.grid.columns[n],s=a&&"nested"===a.type&&a.nestedColumns?a.nestedColumns.length:1;o.width+=e*s,o.x=r,r+=o.width}})}},{key:"resizeRow",value:function(e,t){if(!(t<Ai)){var i=this.rowHeights[e],r=t-i;this.rowHeights[e]=t;for(var n=e+1;n<this.rowOffsets.length;n++)this.rowOffsets[n]+=r;if(this.height+=r,this.rowCache.has(e)){var o=this.rowCache.get(e);o.height=t,o.rePaint()}for(var a=e+1;a<this.data.length;a++)if(this.rowCache.has(a)){var s=this.rowCache.get(a);s.y=this.rowOffsets[a],s.rePaint()}}}},{key:"handleCheckRow",value:function(e){if("number"===typeof e){var t=this.getRow(e);t.handleCheck()}else for(var i=this.grid.header.checked,r=0;r<this.data.length;r++){var n=this.getRow(r);n.handleCheck(i)}}},{key:"handleCheckHeader",value:function(){for(var e=0,t=0;t<this.data.length;t++)if(this.rowCache.has(t)){var i=this.rowCache.get(t);i.checked&&e++}var r=!!e,n=e&&e<this.grid.data.length;this.grid.header.handleCheck({checked:r,indeterminate:n})}},{key:"mouseMove",value:function(e,t){var i,r=!1,n=pt(this.rows);try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.isInVerticalAutofill(e,t))o.handleAutofill(e,t),r=!0;else if(o.isInsideVerticaTableBoundary(e,t)){var a=this.getViewerCursor(o,e,t);a?this.grid.target.style.cursor=a:"pointer"===this.grid.target.style.cursor&&(this.grid.target.style.cursor=""),o.mouseMove(e,t),r=!0}}}catch(l){n.e(l)}finally{n.f()}var s=this.getAddRowButtonAtPosition(e,t);s>=0?(this.grid.target.style.cursor="pointer",this.hoverAddRowButtonIndex!==s&&(this.hoverAddRowButtonIndex=s,this.grid.markDirty()),r=!0):this.hoverAddRowButtonIndex>=0&&(this.hoverAddRowButtonIndex=-1,this.grid.markDirty()),r||this.grid.isScrolling||this.grid.setHoverCell(-1,-1)}},{key:"mouseDown",value:function(e,t){var i,r=pt(this.rows);try{for(r.s();!(i=r.n()).done;){var n=i.value;n.isInVerticalAutofill(e,t)?n.handleStartAutofill(e,t):n.isInsideVerticaBodyBoundary(e,t)&&n.mouseDown(e,t)}}catch(o){r.e(o)}finally{r.f()}}},{key:"click",value:function(e,t){var i=this.getAddRowButtonAtPosition(e,t);if(i>=0&&this.grid.onAddRow){var r=this.addRowButtons[i];this.grid.onAddRow(r.groupInfo)}else{var n,o=pt(this.rows);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.isInsideVerticaBodyBoundary(e,t))if(void 0!==a.isGroupHeader){var s=a;if(s.isInsideExpandArrow(e,t)){var l=s.data,h=!l.expanded;return l.expanded=h,void(this.grid.onGroupToggle&&this.grid.onGroupToggle(l,h))}}else{if(this.handleViewerClick(a,e,t))return;a.click(e,t)}}}catch(d){o.e(d)}finally{o.f()}}}},{key:"dbClick",value:function(e,t){var i,r=pt(this.rows);try{for(r.s();!(i=r.n()).done;){var n=i.value;if(n.isInsideVerticaBodyBoundary(e,t)){if(this.handleViewerDblClick(n,e,t))return;n.dbClick(e,t)}}}catch(o){r.e(o)}finally{r.f()}}},{key:"handleViewerDblClick",value:function(e,t,i){if(!e.allCells)return!1;var r,n=li(),o=pt(e.allCells);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=this.getCellAbsX(a),l=a.y+this.grid.scrollY;if(t>=s&&t<s+a.width&&i>=l&&i<l+a.height){var h=a.viewerType||a.dataType||"text",d=n.get(h);if(d&&"function"===typeof d.onDblClick){var u=t-s,c=i-l,f=a.buildRenderContext(a.x,a.y,"#fff"),v=a.viewerData||a.buildViewerData();if(d.onDblClick(f,v,u,c))return!0}break}}}catch(g){o.e(g)}finally{o.f()}return!1}},{key:"handleViewerClick",value:function(e,t,i){if(!e.allCells)return!1;var r,n=li(),o=pt(e.allCells);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=this.getCellAbsX(a),l=a.y+this.grid.scrollY;if(t>=s&&t<s+a.width&&i>=l&&i<l+a.height){var h=a.viewerType||a.dataType||"text",d=n.get(h);if("punch-timing"===h)break;if(d&&"function"===typeof d.onClick){var u=t-s,c=i-l,f=a.buildRenderContext(a.x,a.y,"#fff"),v=a.viewerData||a.buildViewerData();if(d.onClick(f,v,u,c))return!0}break}}}catch(g){o.e(g)}finally{o.f()}return!1}},{key:"getViewerCursor",value:function(e,t,i){if(!e.allCells)return null;if(void 0!==e.isGroupHeader)return null;var r,n=li(),o=pt(e.allCells);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=this.getCellAbsX(a),l=a.y+this.grid.scrollY;if(t>=s&&t<s+a.width&&i>=l&&i<l+a.height){var h=a.viewerType||a.dataType||"text",d=n.get(h);if(d&&"function"===typeof d.getInteractiveCursor){var u=t-s,c=i-l,f=a.buildRenderContext(a.x,a.y,"#fff"),v=a.viewerData||a.buildViewerData();return d.getInteractiveCursor(f,v,u,c)}break}}}catch(g){o.e(g)}finally{o.f()}return null}},{key:"rePaintRow",value:function(e){var t=this,i=this.getRow(e);if(!i.data._rowHeight){for(var r=i.cells.length,n=null,o=this.grid.rowHeight||v,a=0;a<r;a++){var s=i.cells[a],l=s.value,h=s.width;if(l||0===l){n=this.grid.painter.getTextWrapping(l,h,10);var d=0;if(n&&(d=n.length),d>1){var u=this.grid.rowHeight||v;u+18*(d-1)>o&&(o=u+18*(d-1))}}}var c=this.rowHeights[e],f=o-c;this.rowHeights[e]=o,i.height=o;for(var g=e+1;g<this.rowOffsets.length;g++)this.rowOffsets[g]+=f;this.height+=f}this.rowCache.forEach(function(e,i){e.y=t.rowOffsets[i],e.rePaint()})}},{key:"updateVisibleRows",value:function(){var e=this,t=-this.grid.scrollY+this.grid.tableHeaderHeight,i=t+this.grid.height-this.grid.horizontalScrollerSize-this.grid.footerHeight,r=new Set,n=Date.now(),o=this.binarySearchRow(t);o=Math.max(0,o-this.bufferSize);for(var a=o;a<this.data.length;a++){var s=this.rowOffsets[a],l=s+this.rowHeights[a];if(s>i+this.bufferSize*v)break;if(l>=t-this.bufferSize*v&&(r.add(a),this.rowAccessTime.set(a,n),!this.rowCache.has(a))){var h=this.data[a];if(xi(h)||mi(h)){var d=new Ti(this.grid,a,0,this.rowOffsets[a],this.rowHeights[a],h);this.rowCache.set(a,d)}else{var u=new wi(this.grid,a,0,this.rowOffsets[a],this.rowHeights[a],h);this.rowCache.set(a,u)}}}if(this.rowCache.size>this.maxCacheSize){var c,f=fe(this.rowAccessTime.entries()).filter(function(e){var t=yt(e,1),i=t[0];return!r.has(i)}).sort(function(e,t){return e[1]-t[1]}),g=this.rowCache.size-this.maxCacheSize,y=f.slice(0,g),p=pt(y);try{for(p.s();!(c=p.n()).done;){var w=yt(c.value,1),x=w[0];this.rowCache.delete(x),this.rowAccessTime.delete(x)}}catch(S){p.e(S)}finally{p.f()}}this.visibleRowIndexes=r,this.rows=Array.from(r).sort(function(e,t){return e-t}).map(function(t){return e.rowCache.get(t)});var m,b=pt(this.rows);try{for(b.s();!(m=b.n()).done;){var k=m.value;if(k.rowHeader){var C=this.grid.selectedRowIds.has(k._rowId);k.checked!==C&&(k.checked=C,k.rowHeader.handleCheck(C))}}}catch(S){b.e(S)}finally{b.f()}}},{key:"binarySearchRow",value:function(e){var t=0,i=this.rowOffsets.length-1,r=0;while(t<=i){var n=Math.floor((t+i)/2),o=this.rowOffsets[n],a=o+this.rowHeights[n];if(a<e)t=n+1;else{if(!(o>e))return n;r=n,i=n-1}}return r}},{key:"draw",value:function(){this.updateVisibleRows();var e,t=pt(this.rows);try{for(t.s();!(e=t.n()).done;){var i=e.value;i.isVerticalVisibleOnBody()&&i.draw()}}catch(r){t.e(r)}finally{t.f()}this.drawAddRowButtons()}},{key:"getCell",value:function(e,t){var i=this.getRow(t);if(i)return i.allCells[e]}},{key:"getRow",value:function(e){if(!(e<0||e>=this.data.length)){if(!this.rowCache.has(e)){var t=this.data[e];if(xi(t)||mi(t)){var i=new Ti(this.grid,e,0,this.rowOffsets[e],this.rowHeights[e],t);this.rowCache.set(e,i)}else{var r=new wi(this.grid,e,0,this.rowOffsets[e],this.rowHeights[e],t);this.rowCache.set(e,r)}}return this.rowCache.get(e)}}},{key:"getRangeData",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.grid.selector,t=e.xArr,i=e.yArr,r=[],n=0;n<=i[1]-i[0];n++){for(var o=[],a=0;a<=t[1]-t[0];a++){var s=this.getRow(n+i[0]),l=s.allCells[a+t[0]];o.push({label:l.label,value:l.value})}r.push(o)}return r}},{key:"getSelectedData",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.grid.selector,t=e.xArr,i=e.yArr,r=[],n="",o=0;o<=i[1]-i[0];o++){for(var a=[],s=0;s<=t[1]-t[0];s++){var l=this.getRow(o+i[0]);a.push(l.allCells[s+t[0]].label)}n+=a.join("\t")+"\r",r.push(a)}return n=n?n.replace(/\r$/,""):" ",n||(n=" "),{text:n,value:r}}},{key:"clearSelectedData",value:function(){for(var e=this.grid.selector,t=e.xArr,i=e.yArr,r=0;r<=i[1]-i[0];r++)for(var n=0;n<=t[1]-t[0];n++){var o=this.getRow(r+i[0]),a=o.allCells[n+t[0]];a.setData("")}for(var s=[],l=i[0];l<=i[1];l++)s.push(this.getRowData(l));this.grid.afterClear(s)}},{key:"getData",value:function(){var e=this;return this.data.map(function(t,i){if(e.rowCache.has(i)){var r=e.rowCache.get(i),n=r.allCells,o={};return n.forEach(function(e){o[e.key]=e.value,e.labelKey&&(o[e.labelKey]=e.label)}),Object.assign({},r.data,o)}return t})}},{key:"getCheckedRows",value:function(){var e=[];return this.rowCache.forEach(function(t){if(t.checked){var i=t.allCells,r={};i.forEach(function(e){r[e.key]=e.value,e.labelKey&&(r[e.labelKey]=e.label)}),e.push(Object.assign({},t.data,r))}}),e}},{key:"getChangedRows",value:function(){var e=this,t=new Set;Object.keys(this.grid.hashChange).forEach(function(e){t.add(Number(e.split("-")[1]))});var i=[];return Array.from(t).sort().forEach(function(t){var r=e.getRow(t),n=r.allCells,o={};n.forEach(function(e){o[e.key]=e.value,e.labelKey&&(o[e.labelKey]=e.label)}),i.push(Object.assign({},r.data,o))}),i}},{key:"validate",value:function(e){for(var t=this,i=0;i<this.data.length;i++){var r=this.getRow(i),n=r.allCells;n.forEach(function(e){var i=t.getRowData(e.rowIndex);e.validate(i)})}setTimeout(function(){var i=t.getValidations();"function"===typeof e&&e(!i.length)},0)}},{key:"validateChanged",value:function(e){var t=this,i=new Set,r=[];Object.keys(this.grid.hashChange).forEach(function(e){i.add(Number(e.split("-")[1]))}),Array.from(i).sort().forEach(function(e){r.push(t.getRow(e))}),r.map(function(e){var i=e.allCells;i.forEach(function(e){var i=t.getRowData(e.rowIndex);e.validate(i)})}),setTimeout(function(){var i=t.getValidations();"function"===typeof e&&e(!i.length)},0)}},{key:"validateField",value:function(e,t){if("number"===typeof t&&"number"===typeof e){var i=this.getCell(e,t);if(i){var r=this.getRowData(i.rowIndex);i.validate(r)}}}},{key:"getValidations",value:function(){var e=[];return this.rowCache.forEach(function(t){var i=[],r=t.allCells;r.forEach(function(e){!e.valid&&i.push({title:e.title,key:e.key,value:e.value,message:e.message})}),i.length&&e.push(i)}),e}},{key:"setValidations",value:function(e){var t=this;e&&Array.isArray(e)&&e.forEach(function(e){for(var i=0;i<t.data.length;i++)if(t.data[i][t.grid.rowKey]===e[t.grid.rowKey]){var r=t.getRow(i),n=r.allCells;n.forEach(function(t){var i=!e[t.key];Object.prototype.hasOwnProperty.call(e,t.key)&&t.resetValidate(i,e[t.key])});break}})}},{key:"clearValidations",value:function(){this.rowCache.forEach(function(e){var t=e.allCells;t.forEach(function(e){e.resetValidate()})})}},{key:"getRowData",value:function(e){var t=this.getRow(e),i={};return t.allCells.forEach(function(e){i[e.key]=e.value,e.labelKey&&(i[e.labelKey]=e.label)}),Object.assign({},t.data,i)}},{key:"getCellData",value:function(e,t){var i=this.getCell(e,t);return{title:i.title,key:i.key,value:i.value}}},{key:"updateData",value:function(e){var t=this;e&&Array.isArray(e)&&e.forEach(function(e){for(var i=0;i<t.data.length;i++)if(t.data[i][t.grid.rowKey]===e[t.grid.rowKey]){if(Object.assign(t.data[i],e),t.rowCache.has(i)){var r=t.rowCache.get(i),n=r.allCells;n.forEach(function(t){Object.prototype.hasOwnProperty.call(e,t.key)&&t.resetValidate(!0)})}break}})}},{key:"updateCellData",value:function(e){}},{key:"getCheckedRowObjects",value:function(){var e=[];return this.rowCache.forEach(function(t){t.checked&&e.push(t)}),e}},{key:"getRowAtPosition",value:function(e){var t,i=pt(this.rows);try{for(i.s();!(t=i.n()).done;){var r=t.value,n=r.y+this.grid.scrollY;if(e>=n&&e<n+r.height)return r}}catch(o){i.e(o)}finally{i.f()}return null}},{key:"calculateAddRowButtons",value:function(){if(this.addRowButtons=[],this.grid.onAddRow){var e=this.data.length;if(0===e)return this.addRowButtons.push({y:this.grid.tableHeaderHeight,groupInfo:void 0}),void(this.height+=Ri);var t=this.data.some(function(e){return xi(e)||mi(e)});if(t){for(var i=[],r=0,n=0;n<e;n++){var o=this.data[n];if(xi(o))i.push({groupId:o.id,groupName:o.name,groupLevel:o.groupLevel,path:o.path,valuePath:o.valuePath,property:o.property,value:o.value,parentId:o.parentId,hasDataRows:!1});else if(mi(o)){if(n>0&&!xi(this.data[n-1])&&!mi(this.data[n-1])){var a=this.findLeafGroupFromStack(i);if(a){var s=this.rowOffsets[n];this.addRowButtons.push({y:s,groupInfo:F({},a)}),r+=Ri;for(var l=n;l<e;l++)this.rowOffsets[l]+=Ri}}var h=o.parentId;if(void 0!==h&&null!==h)while(i.length>0){var d=i[i.length-1];if(String(d.groupId)===String(h)){i.pop();break}i.pop()}}else i.length>0&&(i[i.length-1].hasDataRows=!0)}var u=this.data[e-1];if(!xi(u)&&!mi(u)){var c=this.findLeafGroupFromStack(i);if(c){var f=this.rowOffsets[e-1]+this.rowHeights[e-1];this.addRowButtons.push({y:f,groupInfo:F({},c)}),r+=Ri}}this.height+=r}else{var v=this.rowOffsets[e-1]+this.rowHeights[e-1];this.addRowButtons.push({y:v,groupInfo:void 0}),this.height+=Ri}}}},{key:"findLeafGroupFromStack",value:function(e){for(var t=e.length-1;t>=0;t--)if(e[t].hasDataRows)return e[t];return e.length>0?e[e.length-1]:null}},{key:"drawAddRowButtons",value:function(){if(0!==this.addRowButtons.length)for(var e=this.grid.painter,t=e.ctx,i=this.grid.tableHeaderHeight,r=this.grid.height-this.grid.horizontalScrollerSize,n=Math.max(this.grid.width-this.grid.verticalScrollerSize,this.grid.tableWidth),o=0;o<this.addRowButtons.length;o++){var a=this.addRowButtons[o],s=a.y+this.grid.scrollY;if(!(s+Ri<=i||s>=r)){var l=this.hoverAddRowButtonIndex===o;t.save(),t.fillStyle=l?"#f0f5ff":"#fafafa",t.fillRect(0,s,n,Ri),t.strokeStyle=this.grid.borderColor,t.lineWidth=1,t.beginPath(),t.moveTo(0,s+Ri-.5),t.lineTo(n,s+Ri-.5),t.stroke();var h=16,d=16,u=d+h/2,c=s+Ri/2,f=h/2;t.beginPath(),t.arc(u,c,f,0,2*Math.PI),t.strokeStyle=l?"#1890ff":"#bfbfbf",t.lineWidth=1.5,t.stroke();var v=5;t.beginPath(),t.moveTo(u-v,c),t.lineTo(u+v,c),t.strokeStyle=l?"#1890ff":"#bfbfbf",t.lineWidth=1.5,t.stroke(),t.beginPath(),t.moveTo(u,c-v),t.lineTo(u,c+v),t.stroke(),t.restore()}}}},{key:"getAddRowButtonAtPosition",value:function(e,t){if(0===this.addRowButtons.length)return-1;if(e<0||e>this.grid.width-this.grid.verticalScrollerSize)return-1;for(var i=0;i<this.addRowButtons.length;i++){var r=this.addRowButtons[i],n=r.y+this.grid.scrollY;if(t>=n&&t<n+Ri)return i}return-1}},{key:"getCellAbsX",value:function(e){return"right"===e.fixed?this.grid.width-(this.grid.tableWidth-e.x-e.width)-e.width-this.grid.verticalScrollerSize:"left"===e.fixed?e.x:e.x+this.grid.scrollX}}])}(),Ei=Di,Pi=function(e){function t(e,i,r,n,o,a,s){var l,h;return wt(this,t),h=Ot(this,t,[e,r,n,o,a]),B(h,"level",void 0),B(h,"text",void 0),B(h,"colspan",void 0),B(h,"rowspan",void 0),B(h,"required",void 0),B(h,"index",void 0),B(h,"colType",void 0),B(h,"parentKey",void 0),B(h,"nestedKey",void 0),B(h,"nestedChildOffset",void 0),B(h,"colId",void 0),B(h,"color",void 0),h.fixed=s.fixed,h.level=s.level,h.text=s.title,h.colspan=s.colspan||1,h.rowspan=s.rowspan,h.required=s.rule&&s.rule.required||null,h.index=i,h.colType=s.type,h.parentKey=s.parentKey,h.nestedKey=s.nestedKey,h.nestedChildOffset=null!==(l=s.nestedChildOffset)&&void 0!==l?l:-1,h.color=s.color,"nested-child"===s.type&&void 0!==s.nestedChildOffset?h.colId="".concat(i,":").concat(s.nestedChildOffset):h.colId=String(i),h}return Bt(t,e),mt(t,[{key:"isVisibleOnScreen",value:function(){return!(this.x+(this.width||0)-this.grid.fixedLeftWidth+this.grid.scrollX<=0||this.x+this.grid.scrollX>=this.grid.width-this.grid.fixedRightWidth)}},{key:"draw",value:function(){var e=this.grid,t=e.width,i=e.tableWidth,r=e.verticalScrollerSize,n=e.scrollX,o=e.painter,a=e.fillColor,s=e.borderColor,l=e.borderWidth,h="right"===this.fixed?t-(i-this.x-(this.width||0))-(this.width||0)-r:"left"===this.fixed?this.x:this.x+n;if(o.drawRect(h,this.y,this.width||0,this.height,{fillColor:a,borderColor:s,borderWidth:l}),this.color){var d=this.width||0;"nested"===this.colType?(o.drawRect(h,this.y,d,this.height,{fillColor:this.color}),o.drawLine([[h,this.y],[h,this.y+this.height]],{borderColor:this.color,borderWidth:2}),o.drawLine([[h+d,this.y],[h+d,this.y+this.height]],{borderColor:this.color,borderWidth:2}),o.drawLine([[h,this.y],[h+d,this.y]],{borderColor:this.color,borderWidth:2})):"nested-child"===this.colType&&(0===this.nestedChildOffset&&o.drawLine([[h,this.y],[h,this.y+this.height]],{borderColor:this.color,borderWidth:2}),o.drawLine([[h+d,this.y],[h+d,this.y+this.height]],{borderColor:this.color,borderWidth:2}))}var u=this.grid.isColSelected(this.colId),c="nested"===this.colType&&this.colspan>1&&(this.grid.isColSelected(this.colId)||this.grid.isNestedParentAllChildrenSelected(this.index)),f="nested-child"===this.colType&&this.grid.isColSelected(String(this.index));if(u||c||f){o.drawRect(h,this.y,this.width||0,this.height,{fillColor:"rgba(82,146,247,0.15)"});var v=[[h,this.y+this.height],[h+(this.width||0),this.y+this.height]];o.drawLine(v,{borderColor:"rgb(82,146,247)",borderWidth:2})}this.required&&this.grid.painter.drawIcon("*",this.text,h,this.y+this.height/2,this.width||0,10,6,4,{font:'normal 20px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',color:T}),this.grid.painter.drawCellText(this.text,h,this.y,this.width||0,this.height,10,{color:this.grid.color,align:"center"})}}])}(Ft),Oi=Pi,Mi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAAATtJREFUaEPtWUFOw0AMtHuFqOUn/QEtfICfwJmABIf2O7yANv1REc11p0qPUbYrp+uiRZOr7bFnxnuJVQr/tPD5hQT+2kE6QAcuVODsCi3W7ZMGPItgrqqzC3uZywFpAHw271UTK44S6IafAF/mrg4FIWAZIxElsFz9Nip67zCPGRKC3bauFkOFUQIPqwPMnZwKAOy3b9VdsQS6wTf17aDYRThAAk6rbYLlCpnkckimAw6imiDpgEkuh2Q64CCqCTK7A9+vN6YBUsmP6/ZsCgn05aEDPUWuvkKpnc4dz/4Gcg+YwiOBlELecTrgrXAKnw6kFPKO0wFvhVP4dCClkHe8cAfws6mrwfvE//29XvyBo9vp04kJ4UVF5iI69d7zPn532ECQj1EnpmsPO7Yf78RjlctVRwdyKTkW5wh5VMYxXHcAVgAAAABJRU5ErkJggg==",Bi=new Image,Hi=new Image,Fi=new Image;function Li(e){var t=lt(e),i=t.reduce(function(e,t){return e+(t.width||R[t.size||"mini"])},0);return i}Bi.src=Lt,Hi.src=Wt,Fi.src=Mi;var Wi=function(e){function t(e,i,r){var n;return wt(this,t),n=Ot(this,t,[e,i,r]),B(n,"checked",void 0),B(n,"indeterminate",void 0),B(n,"allColumnHeaders",void 0),B(n,"fixedColumnHeaders",void 0),B(n,"columnHeaders",void 0),B(n,"resizeTarget",void 0),B(n,"resizeOriginalX",void 0),B(n,"resizeOriginalWidth",void 0),B(n,"isResizing",void 0),n.checked=!1,n.indeterminate=!1,n.allColumnHeaders=[],n.fixedColumnHeaders=[],n.columnHeaders=[],n.resizeTarget=null,n.resizeOriginalX=0,n.resizeOriginalWidth=0,n.isResizing=!1,n.paint(),n}return Bt(t,e),mt(t,[{key:"paint",value:function(){var e=this;this.allColumnHeaders=[],this.fixedColumnHeaders=[],this.columnHeaders=[];var t=this.grid.headers.some(function(e){return"nested"===e.type&&e.nestedColumns&&e.nestedColumns.length>0}),i=0,r=function(n,o,a){for(var s=n.length,l=a,h=0;h<s;h++){var d=n[h],u=e.grid.headerHeight*(d.rowspan||1),c=e.grid.headerHeight*(d.level||0),f=d.width||R[d.size||"mini"];if("nested"===d.type&&d.nestedColumns&&d.nestedColumns.length>0){f=d.nestedColumns.reduce(function(e,t){return e+(t.width||80)},0);var v="";o?v=o.fixed||"":d.fixedLeft?v="left":d.fixedRight&&(v="right"),d.fixed=v;var g=new Oi(e.grid,i,l,c,f,e.grid.headerHeight,F(F({},d),{},{level:0,rowspan:1,colspan:d.nestedColumns.length,color:d.color}));e.allColumnHeaders.push(g),v?e.fixedColumnHeaders.push(g):e.columnHeaders.push(g);for(var y=l,p=0;p<d.nestedColumns.length;p++){var w=d.nestedColumns[p],x=w.width||80,m=new Oi(e.grid,i,y,e.grid.headerHeight,x,e.grid.headerHeight,{title:w.title,key:w.key,fixed:v,level:1,rowspan:1,colspan:1,type:"nested-child",parentKey:d.key,nestedKey:w.key,nestedChildOffset:p,align:w.align,color:d.color});e.allColumnHeaders.push(m),v?e.fixedColumnHeaders.push(m):e.columnHeaders.push(m),y+=x}i++,l+=f}else if(d.children){f=Li(d.children);var b="";o?b=o.fixed||"":d.fixedLeft?b="left":d.fixedRight&&(b="right"),d.fixed=b;var k=new Oi(e.grid,i,l,c,f,u,d);e.allColumnHeaders.push(k),b?e.fixedColumnHeaders.push(k):e.columnHeaders.push(k),!d.children&&i++,d.children&&r(d.children,d,l),l+=f}else{t&&!o&&(d.rowspan=2,u=2*e.grid.headerHeight);var C="";o?C=o.fixed||"":d.fixedLeft?C="left":d.fixedRight&&(C="right"),d.fixed=C;var S=new Oi(e.grid,i,l,c,f,u,d);e.allColumnHeaders.push(S),C?e.fixedColumnHeaders.push(S):e.columnHeaders.push(S),i++,l+=f}}};r(this.grid.headers,null,this.grid.originFixedWidth)}},{key:"mouseDown",value:function(e,t,i){if(this.resizeTarget)this.resizeOriginalX=e,this.resizeOriginalWidth=this.resizeTarget.width,this.isResizing=!0;else{var r,n=pt(this.allColumnHeaders);try{for(n.s();!(r=n.n()).done;){var o=r.value,a=void 0;if(a="right"===o.fixed?this.grid.width-(this.grid.tableWidth-o.x-o.width)-o.width-this.grid.verticalScrollerSize:"left"===o.fixed?o.x:o.x+this.grid.scrollX,e>a&&e<a+o.width&&t>o.y&&t<o.y+o.height){var s=!!i&&(i.ctrlKey||i.metaKey),l=!!i&&i.shiftKey,h=o.colspan<=1||"nested"===o.colType;return!s&&!l&&this.grid.isColSelected(o.colId)&&h?void this.grid.startColDrag(o.colId,e):void this.grid.selectCols(o,i)}}}catch(d){n.e(d)}finally{n.f()}}}},{key:"resizing",value:function(e,t){if(this.isResizing){var i=this.resizeTarget.index,r=e-this.resizeOriginalX,n=this.resizeTarget.width+r,o=this.grid.columns.filter(function(e){return e.fixedRight}).length;if((i===this.grid.columnsLength-o-1||this.grid.width===this.grid.tableWidth+this.grid.verticalScrollerSize||n<g)&&n<=this.resizeOriginalWidth)return;this.grid.colResizeIndicatorX=e,this.grid.resizeColumn(i,r),this.resizeOriginalX=e}else{this.resizeTarget=null;var a,s=pt(this.allColumnHeaders);try{for(s.s();!(a=s.n()).done;){var l=a.value;e>l.x+this.grid.scrollX+l.width-4&&e<l.x+this.grid.scrollX+l.width+4&&e<this.grid.width-this.grid.verticalScrollerSize-4&&l.colspan<=1&&(this.grid.target.style.cursor="col-resize",this.resizeTarget=l)}}catch(h){s.e(h)}finally{s.f()}}}},{key:"endResize",value:function(){this.resizeTarget=null,this.isResizing=!1,this.grid.colResizeIndicatorX=-1,this.grid.markDirty()}},{key:"getColAtPosition",value:function(e,t,i){if(i){var r,n=pt(this.allColumnHeaders);try{for(n.s();!(r=n.n()).done;){var o=r.value;if("nested-child"!==o.colType&&!(o.colspan>1&&"nested"!==o.colType)){var a=void 0;if(a="right"===o.fixed?this.grid.width-(this.grid.tableWidth-o.x-o.width)-o.width-this.grid.verticalScrollerSize:"left"===o.fixed?o.x:o.x+this.grid.scrollX,e>=a&&e<a+o.width)return o}}}catch(g){n.e(g)}finally{n.f()}return null}if(void 0!==t){var s,l=pt(this.allColumnHeaders);try{for(l.s();!(s=l.n()).done;){var h=s.value,d=void 0;if(d="right"===h.fixed?this.grid.width-(this.grid.tableWidth-h.x-h.width)-h.width-this.grid.verticalScrollerSize:"left"===h.fixed?h.x:h.x+this.grid.scrollX,e>=d&&e<d+h.width&&t>=h.y&&t<h.y+h.height){if(h.colspan>1&&"nested"!==h.colType)continue;return h}}}catch(g){l.e(g)}finally{l.f()}}var u,c=pt(this.allColumnHeaders);try{for(c.s();!(u=c.n()).done;){var f=u.value;if(!(f.colspan>1)){var v=void 0;if(v="right"===f.fixed?this.grid.width-(this.grid.tableWidth-f.x-f.width)-f.width-this.grid.verticalScrollerSize:"left"===f.fixed?f.x:f.x+this.grid.scrollX,e>=v&&e<v+f.width)return f}}}catch(g){c.e(g)}finally{c.f()}return null}},{key:"handleCheck",value:function(e){e?(this.checked="boolean"===typeof e.checked?e.checked:this.checked,this.indeterminate="boolean"===typeof e.indeterminate?e.indeterminate:this.indeterminate):this.indeterminate?this.indeterminate=!1:this.checked=!this.checked}},{key:"resizeColumn",value:function(e,t){var i,r=this.grid.width-this.grid.tableWidth-this.grid.verticalScrollerSize-this.grid.scrollX,n=pt(this.allColumnHeaders);try{for(n.s();!(i=n.n()).done;){var o=i.value;r<=t&&(e>=o.index&&e<o.index+o.colspan&&(o.width+=t),o.index>e&&!(0===r&&t<=0)&&(o.x+=t)),0===r&&t<=0&&(e>=o.index&&e<o.index+o.colspan&&(o.width+=t),o.index===e+1&&(o.width-=t,o.x+=t))}}catch(a){n.e(a)}finally{n.f()}}},{key:"resizeAllColumn",value:function(e){var t,i={x:this.grid.originFixedWidth,width:0,level:0},r=pt(this.allColumnHeaders);try{for(r.s();!(t=r.n()).done;){var n=t.value;n.width+=e*n.colspan,n.level&&n.level!==i.level?n.x=i.x:n.x=i.x+i.width,i=n}}catch(o){r.e(o)}finally{r.f()}}},{key:"draw",value:function(){this.grid.painter.drawRect(this.x,this.y,this.grid.width,this.grid.tableHeaderHeight,{fillColor:"#f9f9f9",shadowBlur:4,shadowColor:"rgba(143, 140, 140, 0.22)",shadowOffsetX:0,shadowOffsetY:2});var e=this.grid.painter.ctx;e.save(),e.beginPath(),e.rect(this.grid.fixedLeftWidth,this.y,this.grid.width-this.grid.fixedLeftWidth-this.grid.fixedRightWidth,this.grid.tableHeaderHeight),e.clip();var t,i=pt(this.columnHeaders);try{for(i.s();!(t=i.n()).done;){var r=t.value;r.isVisibleOnScreen()&&r.draw()}}catch(g){i.e(g)}finally{i.f()}e.restore(),0!==this.grid.scrollX&&this.grid.painter.drawRect(this.x,this.y,this.grid.fixedLeftWidth,this.grid.tableHeaderHeight,{fillColor:"#f9f9f9",shadowBlur:4,shadowColor:"rgba(143, 140, 140, 0.22)",shadowOffsetX:2,shadowOffsetY:-2}),this.grid.tableWidth+this.grid.verticalScrollerSize-this.grid.width+this.grid.scrollX>0&&this.grid.painter.drawRect(this.grid.width-this.grid.fixedRightWidth,this.y,this.grid.fixedRightWidth-this.grid.verticalScrollerSize,this.grid.tableHeaderHeight,{fillColor:"#f9f9f9",shadowBlur:4,shadowColor:"rgba(143, 140, 140, 0.22)",shadowOffsetX:-2,shadowOffsetY:-2});var n,o=pt(this.fixedColumnHeaders);try{for(o.s();!(n=o.n()).done;){var a=n.value;a.draw()}}catch(g){o.e(g)}finally{o.f()}var s={borderColor:this.grid.borderColor,borderWidth:this.grid.borderWidth,fillColor:this.grid.fillColor},l=c+(this.grid.showCheckbox?f:0);if(this.grid.painter.drawRect(0,0,l,this.grid.tableHeaderHeight,s),this.grid.showCheckbox){var h=this.checked?this.indeterminate?Fi:Bi:Hi,d=20,u=8,v=(this.grid.tableHeaderHeight-d)/2;this.grid.painter.drawImage(h,u,v,d,d)}}}])}(Ft),zi=Wi,Ni=[{key:"max",label:"最大值"},{key:"min",label:"最小值"},{key:"sum",label:"求和"},{key:"avg",label:"平均值"}],Vi=[{key:"max",label:"最大值"},{key:"min",label:"最小值"},{key:"sum",label:"求和"},{key:"avg",label:"平均值"}],_i=[{key:"max",label:"最晚"},{key:"min",label:"最早"}],ji=[{key:"count",label:"总数"},{key:"count_missing",label:"未填"},{key:"count_value",label:"已填"},{key:"count_distinct",label:"去重计数"}],Yi=[{key:"no_show",label:"不展示"}];function Gi(e){return"numberInputEditor"===e?[].concat(ji,Ni,Yi):"durationEditor"===e?[].concat(ji,Vi,Yi):"datetimeEditor"===e?[].concat(ji,_i,Yi):[].concat(ji,Yi)}var Xi=12,Ui=8,qi="#767e89",Ki="#767e89",Ji=function(){function e(t){wt(this,e),B(this,"grid",void 0),B(this,"footerData",void 0),B(this,"hoverColIndex",void 0),this.grid=t,this.footerData={},this.hoverColIndex=-1}return mt(e,[{key:"height",get:function(){return u}},{key:"y",get:function(){return this.grid.height-this.grid.horizontalScrollerSize-this.height}},{key:"setFooterData",value:function(e){this.footerData=F({},e),this.grid.draw()}},{key:"setFooterCellData",value:function(e,t){this.footerData=F(F({},this.footerData),{},B({},e,F({},t))),this.grid.draw()}},{key:"cleanupFooterData",value:function(e){for(var t={},i=0,r=Object.keys(this.footerData);i<r.length;i++){var n=r[i];e.has(n)&&(t[n]=this.footerData[n])}this.footerData=t}},{key:"isInFooterArea",value:function(e,t){return t>=this.y&&t<this.y+this.height&&e>=0&&e<this.grid.width-this.grid.verticalScrollerSize}},{key:"getHoverColumnIndex",value:function(e){for(var t=this.grid.header.allColumnHeaders,i=0;i<t.length;i++){var r=t[i];if("nested-child"!==r.colType){var n=this.getColumnScreenX(r),o=r.width||0;if(e>=n&&e<n+o)return i}}return-1}},{key:"getColumnScreenX",value:function(e){return"right"===e.fixed?this.grid.width-(this.grid.tableWidth-e.x-(e.width||0))-(e.width||0)-this.grid.verticalScrollerSize:"left"===e.fixed?e.x:e.x+this.grid.scrollX}},{key:"onClick",value:function(e,t,i,r){if(this.isInFooterArea(e,t)){var n=this.getHoverColumnIndex(e);if(!(n<0)){var o=this.grid.header.allColumnHeaders[n];if(o){var a=o.colId,s=this.grid.headers,l=this.findColumnConfig(s,o.index),h=(null===l||void 0===l?void 0:l.editor)||"",d=this.footerData[a],u=(null===d||void 0===d?void 0:d.statisticType)||"no_show",c=Gi(h);this.grid.onFooterCellClick&&this.grid.onFooterCellClick({columnKey:a,editor:h,statisticType:u,statisticOptions:c,clientX:i,clientY:r})}}}}},{key:"findColumnConfig",value:function(e,t){if(!e)return null;var i,r=pt(e);try{for(r.s();!(i=r.n()).done;){var n=i.value;if(n.index===t)return n;if(n.children){var o=this.findColumnConfig(n.children,t);if(o)return o}}}catch(a){r.e(a)}finally{r.f()}return null}},{key:"draw",value:function(){var e=this.grid,t=e.painter,i=e.borderColor,r=e.borderWidth,n=e.width,o=e.verticalScrollerSize,a=this.y,s=n-o;t.drawRect(0,a,s,this.height,{fillColor:"#f9f9f9",borderColor:i,borderWidth:r}),t.drawLine([[0,a],[s,a]],{borderColor:i,borderWidth:r});var l=this.grid.originFixedWidth;t.drawRect(0,a,l,this.height,{fillColor:"#f9f9f9",borderColor:i,borderWidth:r});var h,d=this.grid.header.columnHeaders,u=pt(d);try{for(u.s();!(h=u.n()).done;){var c=h.value;c.isVisibleOnScreen()&&("nested-child"!==c.colType&&this.drawFooterCell(c,a))}}catch(p){u.e(p)}finally{u.f()}0!==this.grid.scrollX&&this.grid.fixedLeftWidth>0&&t.drawRect(0,a,this.grid.fixedLeftWidth,this.height,{fillColor:"#f9f9f9",shadowBlur:4,shadowColor:"rgba(143, 140, 140, 0.22)",shadowOffsetX:2,shadowOffsetY:-2}),this.grid.tableWidth+o-n+this.grid.scrollX>0&&this.grid.fixedRightWidth>0&&t.drawRect(n-this.grid.fixedRightWidth,a,this.grid.fixedRightWidth-o,this.height,{fillColor:"#f9f9f9",shadowBlur:4,shadowColor:"rgba(143, 140, 140, 0.22)",shadowOffsetX:-2,shadowOffsetY:-2});var f,v=this.grid.header.fixedColumnHeaders,g=pt(v);try{for(g.s();!(f=g.n()).done;){var y=f.value;"nested-child"!==y.colType&&this.drawFooterCell(y,a)}}catch(p){g.e(p)}finally{g.f()}t.drawRect(0,a,l,this.height,{fillColor:"#f9f9f9",borderColor:i,borderWidth:r})}},{key:"drawFooterCell",value:function(e,t){var i=this.grid,r=i.painter,n=i.borderColor,o=i.borderWidth,a=r.ctx,s=this.getColumnScreenX(e),l=e.width||0;r.drawRect(s,t,l,this.height,{fillColor:"#f9f9f9",borderColor:n,borderWidth:o});var h=e.colId,d=this.footerData[h],u=this.hoverColIndex===e.index&&!this.grid.isScrolling,c=(null===d||void 0===d?void 0:d.statisticType)||"no_show",f=null===d||void 0===d?void 0:d.value;if(a.save(),a.beginPath(),a.rect(s,t,l,this.height),a.clip(),"no_show"!==c&&f){a.font='12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',a.fillStyle=qi,a.textAlign="left",a.textBaseline="middle";var v=s+Ui,g=t+this.height/2,y=u?l-2*Ui-Xi-4:l-2*Ui;a.fillText(f,v,g,y),u&&this.drawArrowIcon(a,s+l-Ui-Xi,t)}else u&&(this.drawHintText(a,s,t,l),this.drawArrowIcon(a,s+l-Ui-Xi,t));a.restore()}},{key:"drawHintText",value:function(e,t,i,r){e.font='12px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',e.fillStyle=Ki,e.textAlign="left",e.textBaseline="middle";var n=t+Ui,o=i+this.height/2,a=r-2*Ui-Xi-4;e.fillText("数据统计",n,o,a)}},{key:"drawArrowIcon",value:function(e,t,i){var r=i+this.height/2,n=8,o=5;e.beginPath(),e.moveTo(t+(Xi-n)/2,r-o/2),e.lineTo(t+Xi/2,r+o/2),e.lineTo(t+(Xi+n)/2,r-o/2),e.strokeStyle=qi,e.lineWidth=1.5,e.stroke()}}])}(),Qi=Ji;i(5746);function Zi(e){var t=e.target,i=t.innerHTML,r=this.suggest,n=this.validator,o=this.cell;if(null!==o){if(o.nestedGrid)return t.innerHTML="",void this.hide();"editable"in o&&!0===o.editable||void 0===o.editable?(this.value=i,n&&("list"===n.type?r.search(i):r.hide())):t.innerHTML=""}else this.value=i}function $i(e){if(13===e.keyCode||27===e.keyCode)return this.grid.doneEdit();!e.metaKey&&e.ctrlKey}var er=function(){function e(t){var i=this;wt(this,e),B(this,"grid",void 0),B(this,"areaEl",void 0),B(this,"textEl",void 0),B(this,"el",void 0),B(this,"type",void 0),B(this,"fixed",void 0),B(this,"selectOptions",void 0),B(this,"editorXIndex",void 0),B(this,"editorYIndex",void 0),B(this,"xIndex",void 0),B(this,"yIndex",void 0),B(this,"show",void 0),B(this,"value",void 0),B(this,"cell",void 0),B(this,"suggest",void 0),B(this,"validator",void 0),this.grid=t,this.areaEl=Ct("div","".concat(h,"-editor-area")).children(this.textEl=Ct("div","").on("input",function(e){return Zi.call(i,e)}).on("keydown",function(e){return $i.call(i,e)})),this.textEl.attr("contenteditable",!0),this.el=Ct("div","".concat(h,"-editor")).child(this.areaEl).hide(),this.type="text",this.fixed=!1,this.selectOptions=[],this.editorXIndex=0,this.editorYIndex=0,this.xIndex=0,this.yIndex=0,this.show=!1,this.value="",this.cell=null}return mt(e,[{key:"fire",value:function(e){e.nestedGrid||(this.cell=e,this.setoffset(),this.show=!0,this.el.show(),this.textEl.focus())}},{key:"hide",value:function(){this.cell=null,this.el.hide(),this.show=!1,this.value="",this.textEl.html("")}},{key:"setData",value:function(e){this.value=e,this.textEl.html(e)}},{key:"setoffset",value:function(){if(this.cell){var e=this.cell,t=e.x,i=e.y,r=e.width,n=e.height;this.el.offset({left:0,top:0}),this.areaEl.offset({left:t+this.grid.scrollX-1,top:i+this.grid.scrollY-1}),this.textEl.offset({"min-width":r+2,"min-height":n})}}}])}(),tr=er,ir=function(){function e(t){wt(this,e),B(this,"grid",void 0),B(this,"horizontalScroller",void 0),B(this,"verticalScroller",void 0),B(this,"mouseOriginalX",void 0),B(this,"mouseOriginalY",void 0),this.grid=t,this.horizontalScroller={x:0,move:!1,focus:!1,size:0,ratio:1,has:!1},this.verticalScroller={y:0,move:!1,focus:!1,size:0,ratio:1,has:!1}}return mt(e,[{key:"reset",value:function(){var e=this.grid,t=e.width,i=e.height,r=e.tableWidth,n=e.tableHeight,o=e.originFixedWidth,a=e.tableHeaderHeight,s=e.verticalScrollerSize,l=e.horizontalScrollerSize,h=t-o-s,d=i-a-l-this.grid.footerHeight,u=h/r,c=d/n;this.horizontalScroller.size=u>=1?0:parseInt(String(u*h)),this.verticalScroller.size=c>=1?0:parseInt(String(c*d)),this.horizontalScroller.size<30&&(this.horizontalScroller.size=30),this.verticalScroller.size<30&&(this.verticalScroller.size=30),this.horizontalScroller.has=!(r<=t-p),this.verticalScroller.has=!(n<=i-p-this.grid.footerHeight),this.horizontalScroller.ratio=this.horizontalScroller.has?(t-o-p-this.horizontalScroller.size-w)/(r+p-t):0,this.verticalScroller.ratio=this.verticalScroller.has?(i-a-this.grid.footerHeight-p-this.verticalScroller.size-w)/(n+p+this.grid.footerHeight-i):0}},{key:"update",value:function(e,t){"HORIZONTAL"===t?this.grid.scrollX+=e:"VERTICAL"===t&&(this.grid.scrollY+=e),this.setPosition()}},{key:"setPosition",value:function(){this.horizontalScroller.x=-parseInt(String(this.grid.scrollX*this.horizontalScroller.ratio)),this.verticalScroller.y=-parseInt(String(this.grid.scrollY*this.verticalScroller.ratio))}},{key:"isInsideHorizontalScroller",value:function(e,t){return e>=this.grid.originFixedWidth&&e<=this.grid.width-p&&t>this.grid.height-p&&t<this.grid.height-(p-w)/2}},{key:"isInsideHorizontalScrollerBar",value:function(e,t){return this.horizontalScroller.has&&e>=this.grid.originFixedWidth+this.horizontalScroller.x&&e<=this.grid.originFixedWidth+this.horizontalScroller.x+this.horizontalScroller.size+w&&t>this.grid.height-p&&t<this.grid.height}},{key:"isInsideVerticalScroller",value:function(e,t){return e>this.grid.width-p&&e<this.grid.width-(p-w)/2&&t>this.grid.tableHeaderHeight&&t<this.grid.height-p}},{key:"isInsideVerticalScrollerBar",value:function(e,t){return this.verticalScroller.has&&e>this.grid.width-p&&e<this.grid.width&&t>this.grid.tableHeaderHeight+this.verticalScroller.y&&t<this.grid.tableHeaderHeight+this.verticalScroller.y+this.verticalScroller.size+w}},{key:"mouseDown",value:function(e,t){this.isInsideHorizontalScrollerBar(e,t)?(this.mouseOriginalX=e,this.horizontalScroller.move=!0):this.isInsideVerticalScrollerBar(e,t)&&(this.mouseOriginalY=t,this.verticalScroller.move=!0)}},{key:"mouseMove",value:function(e,t){if(this.horizontalScroller.focus=!!this.isInsideHorizontalScroller(e,t),this.verticalScroller.focus=!!this.isInsideVerticalScroller(e,t),!this.grid.editor.show)if(this.horizontalScroller.move){this.grid.setScrolling(!0);var i=e-this.mouseOriginalX,r=this.horizontalScroller.x+i,n=this.grid.width-this.grid.originFixedWidth-this.horizontalScroller.size-p-w;r>0&&r<n?(this.horizontalScroller.x+=i,this.grid.scrollX=-this.horizontalScroller.x/this.horizontalScroller.ratio):r<=0?(this.horizontalScroller.x=0,this.grid.scrollX=0):(this.horizontalScroller.x=n,this.grid.scrollX=this.grid.width-this.grid.tableWidth-p),this.mouseOriginalX=e}else if(this.verticalScroller.move){this.grid.setScrolling(!0);var o=t-this.mouseOriginalY,a=this.verticalScroller.y+o,s=this.grid.height-this.grid.tableHeaderHeight-this.grid.footerHeight-this.verticalScroller.size-p-w;a>0&&a<s?(this.verticalScroller.y=a,this.grid.scrollY=-this.verticalScroller.y/this.verticalScroller.ratio):a<=0?(this.verticalScroller.y=0,this.grid.scrollY=0):(this.verticalScroller.y=s,this.grid.scrollY=this.grid.height-this.grid.tableHeight-p-this.grid.footerHeight),this.mouseOriginalY=t}}},{key:"mouseUp",value:function(){this.horizontalScroller.move=!1,this.verticalScroller.move=!1}},{key:"draw",value:function(){var e=this.grid.width-p,t=this.grid.height-p,i=p/2,r=w/2;if(this.grid.painter.drawRect(0,t,e+p,p,{fillColor:this.grid.fillColor,borderColor:this.grid.borderColor,borderWidth:this.grid.borderWidth}),this.grid.painter.drawLine([[this.grid.originFixedWidth,t],[this.grid.originFixedWidth,t+p]],{borderColor:this.grid.borderColor,borderWidth:this.grid.borderWidth}),this.grid.painter.drawLine([[e,t],[e,t+p]],{borderColor:this.grid.borderColor,borderWidth:this.grid.borderWidth}),this.horizontalScroller.has&&this.grid.painter.drawLine([[this.grid.originFixedWidth+this.horizontalScroller.x+r,t+i],[this.grid.originFixedWidth+this.horizontalScroller.x+r+this.horizontalScroller.size,t+i]],{borderColor:this.horizontalScroller.move||this.horizontalScroller.focus?m:x,borderWidth:w,lineCap:"round"}),this.grid.painter.drawRect(e,0,p,t,{fillColor:this.grid.fillColor,borderColor:this.grid.borderColor,borderWidth:this.grid.borderWidth}),this.grid.painter.drawLine([[e,this.grid.tableHeaderHeight],[e+p,this.grid.tableHeaderHeight]],{borderColor:this.grid.borderColor,borderWidth:this.grid.borderWidth}),this.verticalScroller.has&&this.grid.painter.drawLine([[e+i,this.verticalScroller.y+r+this.grid.tableHeaderHeight],[e+i,this.verticalScroller.y+r+this.grid.tableHeaderHeight+this.verticalScroller.size]],{borderColor:this.verticalScroller.move||this.verticalScroller.focus?m:x,borderWidth:w,lineCap:"round"}),this.grid.selector.show){var n=this.grid,o=n.range,a=n.height,s=n.width,l=n.tableWidth,h=n.tableHeight,d=n.scrollX,u=n.scrollY,c=n.painter,f=n.selector,v=n.autofill,g=n.verticalScrollerSize,y=this.grid.getCell(v.xIndex,v.yIndex);if(!y)return;var k="right"===y.fixed?s-(l-y.x-y.width)-y.width-g:"left"===y.fixed?y.x:y.x+d,C=y.y+u,S=f.xArr[0],I=f.xArr[1],T=f.yArr[0],A=f.yArr[1],R=6,D={borderColor:"#fff",borderWidth:2,fillColor:b};if(I===o.maxX&&(!y.fixed&&s===l+d+p||"right"===y.fixed)){var E=this.grid.getCell(I,T),P=this.grid.getCell(I,A),O=P.y-E.y,M=[[e,E.y+u],[e,E.y+O+P.height+u]];c.drawLine(M,{borderColor:b,borderWidth:2}),c.drawRect(e-3,C+y.height-3,R,R,D)}if(A===o.maxY&&a===h+u+p){var B=this.grid.getCell(S,A),H=this.grid.getCell(I,A),F=H.x-B.x,L=[[B.x+d,t],[B.x+F+H.width+d,t]];c.drawLine(L,{borderColor:b,borderWidth:2}),c.drawRect(k+y.width-3,t-3,R,R,D)}}}}])}(),rr=ir;function nr(e,t,i,r){e.addEventListener(t,i,r)}function or(e,t,i,r){e.removeEventListener(t,i,r)}function ar(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:17,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{leading:!0,trailing:!1,context:null},n=new Date(0).getTime(),o=function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];var l=(new Date).getTime();if(r.leading)l-n>i?(e.apply(r.context,a),n=l):r.trailing&&(clearTimeout(t),t=setTimeout(function(){e.apply(r.context,a)},i));else{if(t)return;t=setTimeout(function(){t=null,e.apply(r.context,a)},i)}};return o.cancel=function(){n=0,clearTimeout(t),t=null},o}function sr(e){e.preventDefault(),this.enterShift=e.shiftKey,this.doneEdit();var t=e.target.getBoundingClientRect(),i=e.clientX-t.left,r=e.clientY-t.top,n=this.scroller.isInsideHorizontalScroller(i,r)||this.scroller.isInsideHorizontalScrollerBar(i,r),o=this.scroller.isInsideVerticalScroller(i,r)||this.scroller.isInsideVerticalScrollerBar(i,r);if(n||o)this.scroller.mouseDown(i,r);else{var a=xr.call(this,i,r);if(!a){if(i<this.originFixedWidth&&r>this.tableHeaderHeight){var s=this.body.getRowAtPosition(r);if(s){var l=s.data;if(xi(l)||mi(l))return;var h=s.rowIndex,d=e.ctrlKey||e.metaKey,u=e.shiftKey;return s.checked?void this.startRowDrag(h,r):(this.rowDrag.dragStartY=r,this.rowDrag.draggedRowIndices=[h],this.rowDrag.hasStartedDragSelection=!1,this.rowDrag.isCtrlPressed=d,void(this.rowDrag.isShiftPressed=u))}}this.header.isInsideHeader(i,r)&&this.header.mouseDown(i,r,{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}),this.body.mouseDown(i,r),this.scroller.mouseDown(i,r)}}}function lr(e,t){if(!e)return!1;var i=t.parentElement;while(i&&!i.classList.contains("d-datagrid-main"))i=i.parentElement;if(!i)return!1;var r=i.querySelector(".d-datagrid-overlayer");return!(!r||!r.contains(e))}function hr(e,t){return e===t||!!lr(e,t)}function dr(e){var t=this,i=e.target,r=this.target.getBoundingClientRect(),n=e.clientX-r.left,o=e.clientY-r.top;if(this.viewerDrag.isDragging)return"canvas"===i.tagName.toLowerCase()&&e.preventDefault(),void Cr.call(this,n,o);var a=this.scroller.horizontalScroller.move||this.scroller.verticalScroller.move;if(a)return"canvas"===i.tagName.toLowerCase()&&e.preventDefault(),void this.scroller.mouseMove(n,o);if(hr(i,this.target)){"canvas"===i.tagName.toLowerCase()&&e.preventDefault(),this.target.style.cursor="default";var s=Ir.call(this,n,o);if(s&&(this.target.style.cursor=s),this.colDrag.isDragging)return this.updateColDrag(n,o),void this.edgeScroller.update(n,o);if(this.rowDrag.isDragging)return this.updateRowDrag(n,o),void this.edgeScroller.update(n,o);if(this.rowDrag.draggedRowIndices.length>0&&!this.rowDrag.isDragging&&!this.rowDrag.justFinishedDrag){var l=this.rowDrag.draggedRowIndices[0],h=this.body.getRowAtPosition(o),d=Math.abs(o-this.rowDrag.dragStartY);if(d>10&&h){if(!this.rowDrag.hasStartedDragSelection){this.rowDrag.hasStartedDragSelection=!0,this.edgeScroller.start(function(){var e=t.body.getRowAtPosition(t.edgeScroller.lastMouseY);e&&t.selectRowRange(l,e.rowIndex),t.draw()},n,o);var u,c=pt(this.selectedRowIds);try{var f=function(){var e=u.value,i=t.body.rows.find(function(t){return t._rowId===e});i&&i.rowHeader&&(i.checked=!1,i.rowHeader.handleCheck(!1))};for(c.s();!(u=c.n()).done;)f()}catch(P){c.e(P)}finally{c.f()}this.selectedRowIds.clear()}return this.selectRowRange(l,h.rowIndex),this.edgeScroller.update(n,o),void this.draw()}}var v=br.call(this,n,o);if(!v){var g,y=!1,p=!1,w=n<=this.fixedLeftWidth,x=n>=this.width-this.fixedRightWidth-this.verticalScrollerSize,m=pt(this.body.rows);try{for(m.s();!(g=m.n()).done;){var b,k=g.value,C=pt(k.allCells);try{for(C.s();!(b=C.n()).done;){var S=b.value;if(S.nestedGrid){if(w&&"left"!==S.fixed)continue;if(x&&"right"!==S.fixed)continue;if(!w&&!x&&S.fixed)continue;var I="right"===S.fixed?this.width-(this.tableWidth-S.x-S.width)-S.width-this.verticalScrollerSize:"left"===S.fixed?S.x:S.x+this.scrollX,T=S.y+this.scrollY,A=n-I,R=o-T;if(S.nestedGrid.isMouseInside(A,R)){p=!0,y=S.nestedGrid.handleMouseMove(A,R),y&&(this.target.style.cursor="pointer");break}S.nestedGrid.hoveredCell=null,S.nestedGrid.hoverRowIndex=-1}}}catch(P){C.e(P)}finally{C.f()}if(p)break}}catch(P){m.e(P)}finally{m.f()}if(p)this.setHoverCell(-1,-1),this.footer&&(this.footer.hoverColIndex=-1);else if(this.footer&&this.footer.isInFooterArea(n,o)){var D=this.footer.hoverColIndex,E=this.footer.getHoverColumnIndex(n);this.footer.hoverColIndex=E,this.target.style.cursor=E>=0?"pointer":"default",this.setHoverCell(-1,-1),D!==E&&this.draw()}else this.footer&&-1!==this.footer.hoverColIndex&&(this.footer.hoverColIndex=-1,this.draw()),(this.header.isInsideHeader(n,o)||this.header.isResizing)&&this.header.resizing(n,o),this.body.mouseMove(n,o),this.scroller.mouseMove(n,o)}}else this.setHoverCell(-1,-1)}function ur(e){var t=e.target;this.edgeScroller.stop(),"canvas"===t.tagName.toLowerCase()&&e.preventDefault();var i=this.target.getBoundingClientRect(),r=e.clientX-i.left,n=e.clientY-i.top,o=kr.call(this,r,n);if(!o)if(this.viewerDrag.isDragging)Sr.call(this,r,n);else if(this.colDrag.isDragging)this.endColDrag();else{if(this.rowDrag.isDragging)return this.endRowDrag(),void(this.rowDrag.skipNextClick=!0);if(this.rowDrag.draggedRowIndices.length>0){if(!this.rowDrag.hasStartedDragSelection){var a=this.rowDrag.draggedRowIndices[0],s=this.body.getRow(a);if(s){var l=this.rowDrag.isCtrlPressed,h=this.rowDrag.isShiftPressed;if(h)-1!==this.lastSelectedRowIndex?this.selectRowRange(this.lastSelectedRowIndex,a):s.rowHeader&&(this.selectedRowIds.add(s._rowId),s.checked=!0,s.rowHeader.handleCheck(!0)),this.lastSelectedRowIndex=a;else if(l)s.rowHeader&&s.handleCheck(!s.checked),this.lastSelectedRowIndex=a;else{this.selectedRowIds.clear();var d,u=pt(this.body.rows);try{for(u.s();!(d=u.n()).done;){var c=d.value;c.rowHeader&&(c.checked=!1,c.rowHeader.handleCheck(!1))}}catch(f){u.e(f)}finally{u.f()}s.rowHeader&&(this.selectedRowIds.add(s._rowId),s.checked=!0,s.rowHeader.handleCheck(!0)),this.lastSelectedRowIndex=a}this.draw()}}return this.rowDrag.draggedRowIndices=[],this.rowDrag.dragStartY=0,this.rowDrag.hasStartedDragSelection=!1,this.rowDrag.isCtrlPressed=!1,this.rowDrag.isShiftPressed=!1,void(this.rowDrag.skipNextClick=!0)}this.rowDrag.justFinishedDrag&&(this.rowDrag.justFinishedDrag=!1),(this.header.isInsideHeader(r,n)||this.header.isResizing)&&this.header.endResize(),this.endMultiSelect(),this.scroller.mouseUp()}}function cr(e){e.preventDefault();var t=e.target.getBoundingClientRect(),i=e.clientX-t.left,r=e.clientY-t.top,n=this.scroller.isInsideHorizontalScroller(i,r)||this.scroller.isInsideHorizontalScrollerBar(i,r),o=this.scroller.isInsideVerticalScroller(i,r)||this.scroller.isInsideVerticalScrollerBar(i,r);if(!n&&!o){var a,s=null,l=null,h=null,d=i<=this.fixedLeftWidth,u=i>=this.width-this.fixedRightWidth-this.verticalScrollerSize,c=pt(this.body.rows);try{for(c.s();!(a=c.n()).done;){var f,v=a.value,g=pt(v.allCells);try{for(g.s();!(f=g.n()).done;){var y=f.value;if(y.nestedGrid){if(d&&"left"!==y.fixed)continue;if(u&&"right"!==y.fixed)continue;if(!d&&!u&&y.fixed)continue;var p="right"===y.fixed?this.width-(this.tableWidth-y.x-y.width)-y.width-this.verticalScrollerSize:"left"===y.fixed?y.x:y.x+this.scrollX,w=y.y+this.scrollY,x=i-p,m=r-w;if(y.nestedGrid.isMouseInside(x,m)){s=y.nestedGrid.handleClick(x,m),l=y.nestedGrid,h=y;break}}}}catch(S){g.e(S)}finally{g.f()}if(s)break}}catch(S){c.e(S)}finally{c.f()}if(s)if("expand"===s.type)this.draw();else if("editIcon"===s.type&&s.cell){var b=l.getCellEditInfo(s.cell.col,s.cell.row),k={colIndex:h.colIndex,rowIndex:h.rowIndex,x:b.bounds.x-this.scrollX,y:b.bounds.y-this.scrollY,width:b.bounds.width,height:b.bounds.height,value:b.value,editable:!0,dataType:b.column.type||"text",options:b.column.options||[],fixed:h.fixed};this.focusCell=k,this.editor.cell=k,this.editor.type=b.column.type||"text",this.editor.selectOptions=b.column.options||[],this.editor.setData(b.displayValue),this.editor.show=!0,this.resetCellPosition(),this.putCell(),this.beforeEditCell(k),this.editor.el.show(),this.editor.textEl.focus(),this.editor._nestedGridContext={nestedGrid:l,colIndex:s.cell.col,rowIndex:s.cell.row},this.draw()}else if("booleanToggle"===s.type){if(h){var C=this.body.getRowData(h.rowIndex);this.afterEditCell(C)}this.draw()}else"cell"===s.type&&this.draw();else{if(this.rowDrag.skipNextClick)return void(this.rowDrag.skipNextClick=!1);if(this.colDrag.skipNextClick)return void(this.colDrag.skipNextClick=!1);if(this.footer&&this.footer.isInFooterArea(i,r))return void this.footer.onClick(i,r,e.clientX,e.clientY);this.header.isInsideHeader(i,r)||this.clearSelectedCols(),this.body.click(i,r),this.header.isInsideHeaderCheckboxBoundary(i,r)&&(this.header.handleCheck(),this.body.handleCheckRow())}}}function fr(e){e.preventDefault();var t=e.target.getBoundingClientRect(),i=e.clientX-t.left,r=e.clientY-t.top;this.body.dbClick(i,r)}function vr(e){var t=e.target.getBoundingClientRect(),i=e.clientX-t.left,r=e.clientY-t.top;if(this.header.isInsideHeader(i,r)){var n=this.header.getColAtPosition(i,r);if(n&&"nested-child"===n.colType)return;n&&this.onColumnContextMenu&&(e.preventDefault(),this.onColumnContextMenu({colId:n.colId,colIndex:n.index,colType:n.colType,colTitle:n.text,fixed:n.fixed||"",nestedChildOffset:n.nestedChildOffset,parentKey:n.parentKey,clientX:e.clientX,clientY:e.clientY}))}}function gr(){this.doneEdit()}function yr(e){if(this.editor.show){if(13===e.keyCode||27===e.keyCode){if(e.metaKey||e.ctrlKey)return;e.preventDefault(),this.doneEdit()}}else if(this.selector.show&&((e.ctrlKey&&90===e.keyCode||e.metaKey&&!e.shiftKey&&90===e.keyCode)&&(e.preventDefault(),this.history.backState()),(e.ctrlKey&&89===e.keyCode||e.metaKey&&e.shiftKey&&90===e.keyCode)&&(e.preventDefault(),this.history.forwardState()),(e.ctrlKey&&67===e.keyCode||e.metaKey&&67===e.keyCode)&&(e.preventDefault(),this.clipboard.copy()),(e.ctrlKey&&86===e.keyCode||e.metaKey&&86===e.keyCode)&&this.clipboard.paste(),(65===(e.ctrlKey&&e.keyCode)||e.metaKey&&65===e.keyCode)&&e.preventDefault(),!e.metaKey&&!e.ctrlKey))switch(e.keyCode){case 37:this.moveFocus("LEFT");break;case 38:this.moveFocus("TOP");break;case 9:case 39:this.moveFocus("RIGHT");break;case 40:this.moveFocus("BOTTOM");break;case 8:case 46:this.clearSelectedData();break;case 13:this.startEdit();break;default:}}function pr(e){if(e.preventDefault(),!this.editor.show){var t=e.deltaX,i=e.deltaY;if(this.setScrolling(!0),e.shiftKey&&0!==i&&0===t&&(t=i,i=0),Math.abs(t)>Math.abs(i)){if(this.scroller.horizontalScroller.has){var r=this.tableWidth;if(this.scrollX-t>0)this.scrollX=0;else if(r+this.verticalScrollerSize-this.width+this.scrollX<t)this.scrollX=this.width-r-this.verticalScrollerSize;else{e.preventDefault(),e.returnValue=!1,this.scrollX-=2*t;var n=this.width-r-this.verticalScrollerSize;this.scrollX=Math.max(n,Math.min(0,this.scrollX))}}}else if(this.scroller.verticalScroller.has)if(this.scrollY-i>0)this.scrollY=0;else if(this.tableHeight+this.horizontalScrollerSize+this.footerHeight-this.height+this.scrollY<i)this.scrollY=this.height-this.tableHeight-this.horizontalScrollerSize-this.footerHeight;else{e.preventDefault(),e.returnValue=!1,this.scrollY-=2*i;var o=this.height-this.tableHeight-this.horizontalScrollerSize-this.footerHeight;this.scrollY=Math.max(o,Math.min(0,this.scrollY))}this.scroller.setPosition()}}function wr(){this.resize()}function xr(e,t){var i=mr.call(this,e,t);if(i)return!0;var r=Tr.call(this,e,t);if(!r)return!1;var n=r.cell,o=r.localX,a=r.localY;if(!n.viewerType)return!1;var s=li(),l=s.get(n.viewerType);if(!l||!l.onDragStart)return!1;var h=Rr.call(this,n,r.adjustedX,r.adjustedY),d=n.viewerData||Dr(n);return!!l.onDragStart(h,d,o,a)&&(this.viewerDrag.isDragging=!0,this.viewerDrag.cell=n,this.viewerDrag.startX=o,this.viewerDrag.startY=a,this.viewerDrag.startValue=d.value,this.viewerDrag.currentValue=d.value,this.target.style.cursor="pointer",!0)}function mr(e,t){if(t<=this.tableHeaderHeight)return!1;var i=this.body.getRowAtPosition(t);if(!i)return!1;var r,n=pt(i.allCells);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(o.nestedGrid){var a=void 0;a="right"===o.fixed?this.width-(this.tableWidth-o.x-o.width)-o.width-this.verticalScrollerSize:"left"===o.fixed?o.x:o.x+this.scrollX;var s=o.y+this.scrollY,l=e-a,h=t-s;if(o.nestedGrid.isMouseInside(l,h)&&o.nestedGrid.handleMouseDown(l,h))return!0}}}catch(d){n.e(d)}finally{n.f()}return!1}function br(e,t){var i,r=pt(this.body.rows);try{for(r.s();!(i=r.n()).done;){var n,o=i.value,a=pt(o.allCells);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(s.nestedGrid&&(s.nestedGrid.progressDrag&&s.nestedGrid.progressDrag.isDragging)){var l=void 0;l="right"===s.fixed?this.width-(this.tableWidth-s.x-s.width)-s.width-this.verticalScrollerSize:"left"===s.fixed?s.x:s.x+this.scrollX;var h=s.y+this.scrollY,d=e-l,u=t-h;return s.nestedGrid.handleMouseMove(d,u),!0}}}catch(c){a.e(c)}finally{a.f()}}}catch(c){r.e(c)}finally{r.f()}return!1}function kr(e,t){var i,r=pt(this.body.rows);try{for(r.s();!(i=r.n()).done;){var n,o=i.value,a=pt(o.allCells);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(s.nestedGrid&&(s.nestedGrid.progressDrag&&s.nestedGrid.progressDrag.isDragging)){var l=void 0;l="right"===s.fixed?this.width-(this.tableWidth-s.x-s.width)-s.width-this.verticalScrollerSize:"left"===s.fixed?s.x:s.x+this.scrollX;var h=s.y+this.scrollY,d=e-l,u=t-h;return s.nestedGrid.handleMouseUp(d,u),!0}}}catch(c){a.e(c)}finally{a.f()}}}catch(c){r.e(c)}finally{r.f()}return!1}function Cr(e,t){if(this.viewerDrag.isDragging&&this.viewerDrag.cell){this.target.style.cursor="pointer";var i=this.viewerDrag.cell,r=li(),n=r.get(i.viewerType);if(n&&n.onDragMove){var o=Ar.call(this,i),a=e-o.x,s=t-o.y,l=Rr.call(this,i,o.x,o.y),h=i.viewerData||Dr(i);h.value=this.viewerDrag.currentValue;var d=n.onDragMove(l,h,a,s,this.viewerDrag.startX,this.viewerDrag.startY);void 0!==d&&d!==this.viewerDrag.currentValue&&(this.viewerDrag.currentValue=d,i.viewerData&&(i.viewerData.value=d),i.value=d,i.label=String(d),this.draw())}}}function Sr(e,t){if(this.viewerDrag.isDragging&&this.viewerDrag.cell){var i=this.viewerDrag.cell,r=this.viewerDrag.currentValue,n=this.viewerDrag.startValue;if(this.viewerDrag.isDragging=!1,this.viewerDrag.cell=null,this.target.style.cursor="default",r!==n){i.setData(r);var o=this.body.getRowData(i.rowIndex);this.afterEditCell(o),this.history.pushState({before:{colIndex:i.colIndex,rowIndex:i.rowIndex,value:n},after:{colIndex:i.colIndex,rowIndex:i.rowIndex,value:r},type:"single"})}this.draw()}}function Ir(e,t){var i=Tr.call(this,e,t);if(!i)return null;var r=i.cell,n=i.localX,o=i.localY;if(!r.viewerType)return null;var a=li(),s=a.get(r.viewerType);if(!s||!s.getInteractiveCursor)return null;var l=Rr.call(this,r,i.adjustedX,i.adjustedY),h=r.viewerData||Dr(r);return s.getInteractiveCursor(l,h,n,o)}function Tr(e,t){if(t<=this.tableHeaderHeight)return null;var i=this.body.getRowAtPosition(t);if(!i)return null;var r,n=pt(i.allCells);try{for(n.s();!(r=n.n()).done;){var o=r.value,a=Ar.call(this,o);if(e>=a.x&&e<=a.x+o.width&&t>=a.y&&t<=a.y+o.height)return{cell:o,localX:e-a.x,localY:t-a.y,adjustedX:a.x,adjustedY:a.y}}}catch(s){n.e(s)}finally{n.f()}return null}function Ar(e){var t;t="right"===e.fixed?this.width-(this.tableWidth-e.x-e.width)-e.width-this.verticalScrollerSize:"left"===e.fixed?e.x:e.x+this.scrollX;var i=e.y+this.scrollY;return{x:t,y:i}}function Rr(e,t,i){var r=this,n=this.painter,o=this.editor,a=this.hoverRowIndex===e.rowIndex&&!this.isScrolling,s=this.hoverRowIndex===e.rowIndex&&this.hoverColIndex===e.colIndex&&!this.isScrolling,l=!!o._nestedGridContext,h=o.show&&o.yIndex===e.rowIndex&&!l,d=this.body.getRow(e.rowIndex),u=!!d&&d.checked;return{ctx:n.ctx,painter:n,grid:this,bounds:{x:t,y:i,width:e.width,height:e.height},rowIndex:e.rowIndex,colIndex:e.colIndex,readonly:e.readonly||!1,isHoverRow:a,isHoverCell:s,isEditing:h,isChecked:u,fillColor:e.fillColor||"#fff",requestRedraw:function(){return r.draw()}}}function Dr(e){return F({value:e.value,label:e.label,options:e.options,style:{color:e.color,textAlign:e.textAlign,textBaseline:e.textBaseline},extra:{rowData:e.rowData}},e.viewerConfig)}var Er=function(){function e(t,i){wt(this,e),B(this,"grid",void 0),B(this,"el",void 0),B(this,"isFirefox",void 0),B(this,"eventTasks",void 0),this.grid=t,this.el=i,this.isFirefox="undefined"!==typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1,this.init()}return mt(e,[{key:"init",value:function(){var e=this.el,t=this.grid,i=this.isFirefox;this.eventTasks={clickoutside:gr.bind(t),mousedown:sr.bind(t),mousemove:dr.bind(t),mouseup:ur.bind(t),click:cr.bind(t),dblclick:fr.bind(t),contextmenu:vr.bind(t),mousewheel:pr.bind(t),keydown:yr.bind(t),resize:ar(wr,100,{context:t})},nr(e,"mousedown",this.eventTasks.mousedown,!1),nr(window,"mousemove",this.eventTasks.mousemove,!1),nr(window,"mouseup",this.eventTasks.mouseup,!1),nr(e,"click",this.eventTasks.click,!1),nr(e,"dblclick",this.eventTasks.dblclick,!1),nr(e,"contextmenu",this.eventTasks.contextmenu,!1),nr(e,i?"DOMMouseScroll":"mousewheel",this.eventTasks.mousewheel,!1),nr(window,"keydown",this.eventTasks.keydown,!1),nr(window,"resize",this.eventTasks.resize,!1)}},{key:"destroy",value:function(){var e=this.el,t=this.isFirefox;or(e,"mousedown",this.eventTasks.mousedown,!1),or(window,"mousemove",this.eventTasks.mousemove,!1),or(window,"mouseup",this.eventTasks.mouseup,!1),or(e,"click",this.eventTasks.click,!1),or(e,"dblclick",this.eventTasks.dblclick,!1),or(e,"contextmenu",this.eventTasks.contextmenu,!1),or(e,t?"DOMMouseScroll":"mousewheel",this.eventTasks.mousewheel,!1),or(window,"keydown",this.eventTasks.keydown,!1),or(window,"resize",this.eventTasks.resize,!1)}}])}(),Pr=Er,Or=function(){function e(t,i,r,n,o){wt(this,e),B(this,"grid",void 0),B(this,"x",void 0),B(this,"y",void 0),B(this,"width",void 0),B(this,"height",void 0),B(this,"valid",void 0),B(this,"message",void 0),B(this,"colWidth",void 0),B(this,"colHeight",void 0),B(this,"fixed",void 0),this.grid=t,this.x=i,this.y=r,this.width=200,this.height=90,this.valid=!0,this.message=n}return mt(e,[{key:"update",value:function(e){Object.assign(this,e)}},{key:"draw",value:function(){var e=this.grid,t=e.selector,i=e.scrollX,r=e.scrollY,n=e.width,o=e.height,a=e.tableWidth,s=e.verticalScrollerSize,l=e.color,h=e.painter;if(!this.valid&&!t.isSelected){var d=this.x+(this.colWidth||0)+2,u=this.y+1,c=d+this.width+i>n,f=u+this.height+r>o,v=c?"right"===this.fixed?n-(a-this.x-(this.colWidth||0))-(this.colWidth||0)-s-this.width-1:this.x-this.width-1:d;this.fixed||(v+=i);var g=f?this.y-(this.height-(this.colHeight||0))-1:this.y;g+=r,h.drawRoundRect(v,g,this.width,this.height,4,{shadowBlur:16,shadowColor:"rgba(28,36,56,0.16)",shadowOffsetX:0,shadowOffsetY:0,fillColor:"#fff",borderWidth:1}),h.drawCellText("数据错误",v,g+24,this.width,this.height,16,{font:'bold 14px "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif',color:T,align:"left",baseLine:"bottom"});for(var y=h.getTextWrapping(this.message||"",this.width,16),p=g+50,w=0;w<y.length;w++)h.drawCellText(y[w],v,p+18*w,this.width,this.height,16,{color:l,align:"left",baseLine:"bottom"})}}}])}(),Mr=Or,Br=function(){function e(t){wt(this,e),B(this,"grid",void 0),B(this,"show",void 0),B(this,"isPaste",void 0),B(this,"xArr",void 0),B(this,"yArr",void 0),B(this,"el",void 0),this.grid=t,this.show=!1,this.isPaste=!1,this.xArr=[-1,-1],this.yArr=[-1,-1]}return mt(e,[{key:"init",value:function(){var e=this,t=Ct("textarea","").on("paste",function(){return e.paste()});t.css({position:"absolute",left:"-10000px",top:"-10000px"}),this.el=t.el,document.body.appendChild(this.el)}},{key:"copy",value:function(){var e=this.grid,t=e.selector,i=e.body,r=i.getSelectedData(),n=r.text,o=document.createElement("textarea");o.value=n,document.body.appendChild(o),o.select(),document.execCommand("copy",!1),document.body.removeChild(o),this.show=!0,this.xArr=t.xArr.slice(),this.yArr=t.yArr.slice()}},{key:"paste",value:function(){this.isPaste=!0}},{key:"select",value:function(e){this.isPaste=!1;var t=this.grid,i=t.editor,r=t.selector,n=t.autofill;r.xArr.splice(1,1,i.xIndex+e[0].length-1),r.yArr.splice(1,1,i.yIndex+e.length-1),n.xIndex=r.xArr[1],n.yIndex=r.yArr[1],this.clear()}},{key:"clear",value:function(){this.show=!1,this.xArr=[-1,-1],this.yArr=[-1,-1]}}])}(),Hr=Br,Fr=function(){function e(t){wt(this,e),B(this,"grid",void 0),B(this,"history",void 0),B(this,"historyIndex",void 0),this.grid=t,this.history=[],this.historyIndex=-1}return mt(e,[{key:"pushState",value:function(e){this.history.push(e),this.history.length>20&&this.history.splice(0,1),this.historyIndex=this.history.length-1}},{key:"backState",value:function(){if(this.historyIndex>=0){var e=this.history[this.historyIndex];"single"===e.type?this.grid.setData(e.before.value,e.before):this.grid.batchSetData(e.before),this.historyIndex-=1}}},{key:"forwardState",value:function(){if(this.historyIndex<this.history.length-1){this.historyIndex+=1;var e=this.history[this.historyIndex];"single"===e.type?this.grid.setData(e.after.value,e.after):this.grid.batchSetData(e.after)}}}])}(),Lr=Fr,Wr={default:{global:{fontSize:14,fontFamily:"Arial, sans-serif",color:"#333",backgroundColor:"#fff",borderColor:"#e0e0e0",borderWidth:1,paddingTop:8,paddingRight:12,paddingBottom:8,paddingLeft:12},header:{backgroundColor:"#f5f5f5",fontWeight:"bold",color:"#333"},cell:{backgroundColor:"#fff"},readonly:{backgroundColor:"#f9f9f9",color:"#999"},striped:{enabled:!0,oddColor:"#fff",evenColor:"#f9fafc"},hover:{enabled:!0,backgroundColor:"#e6eaf0"},editing:{backgroundColor:"#e6eaf0"},checked:{enabled:!0,backgroundColor:"#e3e9ff"}},dark:{global:{fontSize:14,fontFamily:"Arial, sans-serif",color:"#e0e0e0",backgroundColor:"#1e1e1e",borderColor:"#404040",borderWidth:1,paddingTop:8,paddingRight:12,paddingBottom:8,paddingLeft:12},header:{backgroundColor:"#2d2d2d",fontWeight:"bold",color:"#fff"},cell:{backgroundColor:"#1e1e1e"},readonly:{backgroundColor:"#252525",color:"#888"},striped:{enabled:!0,oddColor:"#1e1e1e",evenColor:"#252525"},hover:{enabled:!0,backgroundColor:"#2d3748"},editing:{backgroundColor:"#2d3748"},checked:{enabled:!0,backgroundColor:"#2d3748"}},blue:{global:{fontSize:14,fontFamily:"Arial, sans-serif",color:"#333",backgroundColor:"#fff",borderColor:"#d0e3f5",borderWidth:1,paddingTop:8,paddingRight:12,paddingBottom:8,paddingLeft:12},header:{backgroundColor:"#4a90e2",fontWeight:"bold",color:"#fff"},cell:{backgroundColor:"#fff"},readonly:{backgroundColor:"#f0f7ff",color:"#999"},striped:{enabled:!0,oddColor:"#fff",evenColor:"#f0f7ff"},hover:{enabled:!0,backgroundColor:"#d0e3f5"},editing:{backgroundColor:"#d0e3f5"},checked:{enabled:!0,backgroundColor:"#e3e9ff"}}},zr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";wt(this,e),B(this,"currentTheme",void 0),B(this,"customStyles",new Map),this.currentTheme="string"===typeof t?Wr[t]||Wr.default:t}return mt(e,[{key:"setTheme",value:function(e){this.currentTheme="string"===typeof e?Wr[e]||Wr.default:e}},{key:"getTheme",value:function(){return this.currentTheme}},{key:"mergeStyles",value:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Object.assign.apply(Object,[{}].concat(fe(t.filter(Boolean))))}},{key:"getCellStyle",value:function(e){var t,i,r,n=e.isHeader,o=e.isReadonly,a=e.isHover,s=e.isEditing,l=e.isStriped,h=e.isChecked,d=e.rowIndex,u=e.customClass,c=this.mergeStyles(this.currentTheme.global);if(c=n?this.mergeStyles(c,this.currentTheme.header):this.mergeStyles(c,this.currentTheme.cell),o&&(c=this.mergeStyles(c,this.currentTheme.readonly)),l&&null!==(t=this.currentTheme.striped)&&void 0!==t&&t.enabled&&void 0!==d){var f=d%2===0?this.currentTheme.striped.evenColor:this.currentTheme.striped.oddColor;c=this.mergeStyles(c,{backgroundColor:f})}return a&&null!==(i=this.currentTheme.hover)&&void 0!==i&&i.enabled&&(c=this.mergeStyles(c,{backgroundColor:this.currentTheme.hover.backgroundColor})),s&&(c=this.mergeStyles(c,this.currentTheme.editing)),h&&null!==(r=this.currentTheme.checked)&&void 0!==r&&r.enabled&&(c=this.mergeStyles(c,{backgroundColor:this.currentTheme.checked.backgroundColor})),u&&this.customStyles.has(u)&&(c=this.mergeStyles(c,this.customStyles.get(u))),c}},{key:"registerStyle",value:function(e,t){this.customStyles.set(e,t)}},{key:"registerStyles",value:function(e){var t=this;Object.entries(e).forEach(function(e){var i=yt(e,2),r=i[0],n=i[1];t.registerStyle(r,n)})}},{key:"applyToContext",value:function(e,t){if(t.color&&(e.fillStyle=t.color),t.fontSize&&t.fontFamily){var i=t.fontWeight||"normal";e.font="".concat(i," ").concat(t.fontSize,"px ").concat(t.fontFamily)}t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline),void 0!==t.opacity&&(e.globalAlpha=t.opacity)}},{key:"parsePadding",value:function(e){if("number"===typeof e)return{top:e,right:e,bottom:e,left:e};var t=e.split(" ").map(Number);return 1===t.length?{top:t[0],right:t[0],bottom:t[0],left:t[0]}:2===t.length?{top:t[0],right:t[1],bottom:t[0],left:t[1]}:3===t.length?{top:t[0],right:t[1],bottom:t[2],left:t[1]}:{top:t[0],right:t[1],bottom:t[2],left:t[3]}}}])}(),Nr=(new zr("default"),40),Vr=2,_r=16,jr=function(){function e(t){wt(this,e),B(this,"grid",void 0),B(this,"animationId",null),B(this,"dirX",0),B(this,"dirY",0),B(this,"speedX",0),B(this,"speedY",0),B(this,"isActive",!1),B(this,"onScrollCallback",null),B(this,"_lastMouseX",0),B(this,"_lastMouseY",0),B(this,"scrollAxis","both"),this.grid=t}return mt(e,[{key:"lastMouseX",get:function(){return this._lastMouseX}},{key:"lastMouseY",get:function(){return this._lastMouseY}},{key:"start",value:function(e,t,i,r){this.isActive=!0,this.onScrollCallback=e||null,this.scrollAxis=r||"both",void 0!==t&&(this._lastMouseX=t),void 0!==i&&(this._lastMouseY=i)}},{key:"update",value:function(e,t){if(this.isActive&&this.grid){this._lastMouseX=e,this._lastMouseY=t;var i=this.getViewport(),r=this.detectEdge(e,t,i),n=r.dirX,o=r.dirY,a=r.speedX,s=r.speedY;this.dirX=n,this.dirY=o,this.speedX=a,this.speedY=s,0!==n||0!==o?this.startAnimation():this.stopAnimation()}}},{key:"stop",value:function(){this.isActive=!1,this.dirX=0,this.dirY=0,this.speedX=0,this.speedY=0,this.scrollAxis="both",this.onScrollCallback=null,this.stopAnimation()}},{key:"destroy",value:function(){this.stop(),this.grid=null}},{key:"getViewport",value:function(){var e=this.grid;return{left:e.fixedLeftWidth,top:e.tableHeaderHeight,right:e.width-e.verticalScrollerSize,bottom:e.height-e.horizontalScrollerSize}}},{key:"detectEdge",value:function(e,t,i){var r=0,n=0,o=0,a=0,s="vertical"!==this.scrollAxis,l="horizontal"!==this.scrollAxis;if(s){var h=i.left+Nr;if(e<h){r=-1;var d=Math.max(e,i.left),u=(d-i.left)/Nr;o=Vr+(1-u)*_r}var c=i.right-Nr;if(e>c){r=1;var f=Math.min(e,i.right),v=(i.right-f)/Nr;o=Vr+(1-v)*_r}}if(l){var g=i.top+Nr;if(t<g){n=-1;var y=Math.max(t,i.top),p=(y-i.top)/Nr;a=Vr+(1-p)*_r}var w=i.bottom-Nr;if(t>w){n=1;var x=Math.min(t,i.bottom),m=(i.bottom-x)/Nr;a=Vr+(1-m)*_r}}return{dirX:r,dirY:n,speedX:o,speedY:a}}},{key:"startAnimation",value:function(){var e=this;if(null===this.animationId){var t=function(){if(!e.isActive||0===e.dirX&&0===e.dirY)e.animationId=null;else{e.applyScroll();var i=e.getViewport(),r=e.detectEdge(e._lastMouseX,e._lastMouseY,i),n=r.dirX,o=r.dirY,a=r.speedX,s=r.speedY;e.dirX=n,e.dirY=o,e.speedX=a,e.speedY=s,e.animationId=0!==n||0!==o?requestAnimationFrame(t):null}};this.animationId=requestAnimationFrame(t)}}},{key:"stopAnimation",value:function(){null!==this.animationId&&(cancelAnimationFrame(this.animationId),this.animationId=null)}},{key:"applyScroll",value:function(){var e=this.grid;if(e){var t,i=!1;if(0!==this.dirX&&this.speedX>0){var r=e.scrollX;e.scrollX-=this.speedX*this.dirX;var n=e.width-e.tableWidth-e.verticalScrollerSize;e.scrollX=Math.min(0,Math.max(n,e.scrollX)),e.scrollX!==r&&(i=!0)}if(0!==this.dirY&&this.speedY>0){var o=e.scrollY;e.scrollY-=this.speedY*this.dirY;var a=e.height-e.tableHeight-e.horizontalScrollerSize;e.scrollY=Math.min(0,Math.max(a,e.scrollY)),e.scrollY!==o&&(i=!0)}if(i)null===(t=e.scroller)||void 0===t||t.setPosition(),e.markDirty(),this.onScrollCallback&&this.onScrollCallback()}}}])}(),Yr=jr,Gr=window.devicePixelRatio||1,Xr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAABD1JREFUSA2dVU1oHVUU/s6dmTd5TfLeSyKNrcHGhRA0gkjFIrgKmIUrFxbcCG5a6EJaRNPazURs/EHqQhFcClLo3p1a/AEVwY1/AVG0RmjSNPE1f+/Nm7n3+N0ZfKR9STC9j/tm7r3nfuec7/yMYI8xOKcjYuwxaPCoKMZUcBegMeeKwCxC8W2s+Or6eVnaDUZ2OqglOiwxjjvVKRhEEIhYqVBW1GiFwAYqIddGjAbc/bhqzAdLL8n12/F6FNTf0kec4pRYN0A8o0YiKP8VpQJx9MAIlfg1FdAAR4VAJiJnb56TK9uV+IPuqL+ePUnwF6AEoalU4EgHH4Qvf4VOwNEwbxunoyA9VEW/c/pe4w19rgtYSpTLxoXOw1aCUzQ68vuilhYKqcaiGvNZ6PBDfwXLXnojxSiJeQwWTztxE9wiZbznqYSriJiTN2fkEy9bUNR4RxtuE7O0pA/GeY7prT90l86k4adJ4j3pHUmi5mIfjtPLGfpZLagsDdyKDaaWX5bFQkHtbX0WHfeEt0DF0HqnoZp3V1+RX3phe3dqr+kxhPohDSO1ILeMmTGX187Ki+Ktz1OX8FrI0InLjQkNLjfPyee9ULvveO4ZmVfVOlJM/2l6bOSosSkmjTOWM0NusiBwC6dTfLk71M4np9v4SHO9yryKGJGIaVHNrH2KwcEE+WPylJP0fL0b5ztDl7v+jgn0ElcBYxH4TIYJpn2x1CG5hYQ5yZOKC+f3AtrrLAzNF1nKQvQpQizK3h+KcQOsI8vcL5K+NmiaPeW4F+q2s3gQf2Ud/F2Ae24AG4ol96W2baJ39nriGtpv9sl09zZ7QMgKXOfGMB3yGrGxgRofRUH59X5GkhQYC+WdogIQSoAlVlF/sckE3oowzvc7UoCEfekIc2iUir5j2R6C9Uz9zslfkUhQi0lVHu53lHcq6FDBAjPpCAFOwJnI4FeCZ+zDKXtIWzMMDs/hof3iH55Fle33QP0PxI15dtqrzT7MsqRvzMi6CdyPbLmMOafAZorHRy7qPf9XydgZrTbrqGuDnSBDYKv0AI0OfG14kEor/EZDu8lE7SBwuQTOZS1MjczpxF50+bP6+zq0dghjbJYV10RshxG5UYTPPIDUY3e5Zk8az1NMi7OO+h3SwPLQsb/e0By/xQGuTbbQ8pfm+xFvdDDAwhn2nx0vl62TfeWHYgT56BBW/nxe2rco8IuhCzqZA0d9ytK3rFCg5ZPZljJ81qUFkLUR2pIxiDHalHemVcoFFsuriax5PD9u+aL9c15+CgNcoWWkqfgQFvlVZBnzjZ9HBS3oDvZN9VlD1cw+qVgsbQf3cl2Kupf4cjjRAxsxHnSw45IHtJPZG9qOGNLWAcPI/I7oCamxLXTiDCv33YvF70/Sp9vGjgr+k/GKNmPcrTY76MKowuqI2LU69DCN+rBmHJoHt7D6c0K1u4x/AUXG2cTFsUKKAAAAAElFTkSuQmCC",Ur=(i(9868),{silent:0,error:1,warn:2,info:3,verbose:4}),qr={enabled:!1,logLevel:"warn",largeDataThreshold:5e3,largeColumnThreshold:50,frameTimeThreshold:16.67},Kr="[canvas-table]",Jr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};wt(this,e),B(this,"config",void 0),B(this,"timings",[]),B(this,"frameCount",0),B(this,"lastFpsTime",0),B(this,"currentFps",0),B(this,"markMap",new Map),this.config=F(F({},qr),t)}return mt(e,[{key:"setConfig",value:function(e){this.config=F(F({},this.config),e)}},{key:"isEnabled",get:function(){return this.config.enabled}},{key:"setEnabled",value:function(e){this.config.enabled=e}},{key:"mark",value:function(e){if(this.config.enabled){var t="canvas-table:".concat(e);if(this.markMap.set(t,performance.now()),"function"===typeof performance.mark)try{performance.mark(t)}catch(i){}}}},{key:"measure",value:function(e,t,i){if(!this.config.enabled)return 0;var r="canvas-table:".concat(t),n=i?"canvas-table:".concat(i):void 0,o="canvas-table:".concat(e),a=0;if(n){var s=this.markMap.get(r),l=this.markMap.get(n);void 0!==s&&void 0!==l&&(a=l-s)}else{var h=this.markMap.get(r);void 0!==h&&(a=performance.now()-h)}if("function"===typeof performance.measure)try{n?performance.measure(o,r,n):performance.measure(o,r)}catch(d){}return this.timings.push({name:e,startTime:performance.now(),duration:a}),this.log("verbose","".concat(e,": ").concat(a.toFixed(2),"ms")),a}},{key:"trackFrame",value:function(){if(this.config.enabled){this.frameCount++;var e=performance.now();e-this.lastFpsTime>=1e3&&(this.currentFps=this.frameCount,this.frameCount=0,this.lastFpsTime=e)}}},{key:"getFps",value:function(){return this.currentFps}},{key:"checkDataSize",value:function(e,t){e>this.config.largeDataThreshold&&this.log("warn","Large dataset detected: ".concat(e," rows. ")+"Consider enabling virtual scrolling or pagination for optimal performance. "+"(Threshold: ".concat(this.config.largeDataThreshold," rows)")),t>this.config.largeColumnThreshold&&this.log("warn","Many columns detected: ".concat(t," columns. ")+"Consider using fixed columns and horizontal scrolling for better UX. "+"(Threshold: ".concat(this.config.largeColumnThreshold," columns)"))}},{key:"checkFrameTime",value:function(e){this.config.enabled&&e>this.config.frameTimeThreshold&&this.log("warn","Slow frame detected: ".concat(e.toFixed(2),"ms ")+"(target: ".concat(this.config.frameTimeThreshold.toFixed(2),"ms / 60fps). ")+"Consider reducing visible data or simplifying cell viewers.")}},{key:"getTimings",value:function(){return fe(this.timings)}},{key:"getAverageDuration",value:function(e){var t=this.timings.filter(function(t){return t.name===e});if(0===t.length)return 0;var i=t.reduce(function(e,t){return e+t.duration},0);return i/t.length}},{key:"clearTimings",value:function(){if(this.timings=[],this.markMap.clear(),"function"===typeof performance.clearMarks)try{performance.clearMarks(),performance.clearMeasures()}catch(e){}}},{key:"log",value:function(e,t){var i=Ur[this.config.logLevel],r=Ur[e];if(!(r>i)){"".concat(Kr," ").concat(t);switch(e){case"error":break;case"warn":break;case"info":break;case"verbose":break}}}}])}(),Qr=null;function Zr(e){return Qr?e&&Qr.setConfig(e):Qr=new Jr(e),Qr}var $r=function(){function e(t){wt(this,e),B(this,"grid",void 0),B(this,"snapshots",void 0),this.grid=t,this.snapshots=new Map}return mt(e,[{key:"createSnapshot",value:function(e){var t={name:e,timestamp:Date.now(),visibleCells:this.captureVisibleCells(),columns:this.captureColumnConfigs(),scrollPosition:this.captureScrollPosition(),dimensions:this.captureDimensions()};return this.snapshots.set(e,t),JSON.parse(JSON.stringify(t))}},{key:"compareSnapshot",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=this.snapshots.get(e);if(!i)return{isEqual:!1,differences:[{type:"dimensions",path:"_meta",expected:e,actual:null}]};var r=[];return this.compareDimensions(i.dimensions,r,t),this.compareScrollPosition(i.scrollPosition,r,t),this.compareColumns(i.columns,r,t),this.compareVisibleCells(i.visibleCells,r,t),{isEqual:0===r.length,differences:r}}},{key:"getSnapshot",value:function(e){var t=this.snapshots.get(e);return t?JSON.parse(JSON.stringify(t)):null}},{key:"exportSnapshot",value:function(e){var t=this.snapshots.get(e);return t?JSON.stringify(t,null,2):null}},{key:"importSnapshot",value:function(e){var t=JSON.parse(e);t&&t.name&&this.snapshots.set(t.name,t)}},{key:"captureVisibleCells",value:function(){return this.grid.testGetAllVisibleCells()}},{key:"captureColumnConfigs",value:function(){for(var e=[],t=this.grid.columns,i=0;i<t.length;i++){var r=t[i],n=this.grid.testGetColumnConfig(r.key);n&&e.push(n)}return e}},{key:"captureScrollPosition",value:function(){return this.grid.testGetScrollPosition()}},{key:"captureDimensions",value:function(){return this.grid.testGetTableDimensions()}},{key:"compareDimensions",value:function(e,t,i){for(var r=this.captureDimensions(),n=["containerWidth","containerHeight","tableWidth","tableHeight","headerHeight","rowHeight","fixedLeftWidth","fixedRightWidth","totalRows","totalColumns"],o=0,a=n;o<a.length;o++){var s=a[o];this.isWithinTolerance(e[s],r[s],i)||t.push({type:"dimensions",path:"dimensions.".concat(s),expected:e[s],actual:r[s]})}}},{key:"compareScrollPosition",value:function(e,t,i){for(var r=this.captureScrollPosition(),n=["scrollX","scrollY","maxScrollX","maxScrollY"],o=0,a=n;o<a.length;o++){var s=a[o];this.isWithinTolerance(e[s],r[s],i)||t.push({type:"scroll",path:"scroll.".concat(s),expected:e[s],actual:r[s]})}for(var l=["hasHorizontalScrollbar","hasVerticalScrollbar"],h=0,d=l;h<d.length;h++){var u=d[h];e[u]!==r[u]&&t.push({type:"scroll",path:"scroll.".concat(u),expected:e[u],actual:r[u]})}}},{key:"compareColumns",value:function(e,t,i){var r=this.captureColumnConfigs();if(e.length===r.length)for(var n=0;n<e.length;n++){var o=e[n],a=r[n],s="columns[".concat(n,"]");if(o.key!==a.key&&t.push({type:"columnConfig",path:"".concat(s,".key"),expected:o.key,actual:a.key}),this.isWithinTolerance(o.width,a.width,i)||t.push({type:"columnConfig",path:"".concat(s,".width"),expected:o.width,actual:a.width}),o.fixed!==a.fixed&&t.push({type:"columnConfig",path:"".concat(s,".fixed"),expected:o.fixed,actual:a.fixed}),o.children&&a.children)if(o.children.length!==a.children.length)t.push({type:"columnConfig",path:"".concat(s,".children.length"),expected:o.children.length,actual:a.children.length});else for(var l=0;l<o.children.length;l++){var h="".concat(s,".children[").concat(l,"]");this.isWithinTolerance(o.children[l].width,a.children[l].width,i)||t.push({type:"columnConfig",path:"".concat(h,".width"),expected:o.children[l].width,actual:a.children[l].width})}}else t.push({type:"columnConfig",path:"columns.length",expected:e.length,actual:r.length})}},{key:"compareVisibleCells",value:function(e,t,i){var r=this.captureVisibleCells();e.length!==r.length&&t.push({type:"cellLayout",path:"cells.length",expected:e.length,actual:r.length});var n,o=new Map,a=pt(e);try{for(a.s();!(n=a.n()).done;){var s=n.value;o.set("".concat(s.rowId,":").concat(s.columnKey),s)}}catch(T){a.e(T)}finally{a.f()}var l,h=new Map,d=pt(r);try{for(d.s();!(l=d.n()).done;){var u=l.value;h.set("".concat(u.rowId,":").concat(u.columnKey),u)}}catch(T){d.e(T)}finally{d.f()}var c,f=pt(o);try{for(f.s();!(c=f.n()).done;){var v=yt(c.value,2),g=v[0],y=v[1],p=h.get(g);if(p)for(var w=["x","y","width","height"],x=0,m=w;x<m.length;x++){var b=m[x];this.isWithinTolerance(y[b],p[b],i)||t.push({type:"cellLayout",path:"cells[".concat(g,"].").concat(b),expected:y[b],actual:p[b]})}else t.push({type:"cellLayout",path:"cells[".concat(g,"]"),expected:y,actual:null})}}catch(T){f.e(T)}finally{f.f()}var k,C=pt(h);try{for(C.s();!(k=C.n()).done;){var S=yt(k.value,1),I=S[0];o.has(I)||t.push({type:"cellLayout",path:"cells[".concat(I,"]"),expected:null,actual:h.get(I)})}}catch(T){C.e(T)}finally{C.f()}}},{key:"isWithinTolerance",value:function(e,t,i){return Math.abs(e-t)<=i}}])}();function en(e){if("undefined"===typeof process){var t=new $r(e),i={getCellLayout:function(t,i){return e.testGetCellLayout(t,i)},getAllVisibleCells:function(){return e.testGetAllVisibleCells()},getColumnConfig:function(t){return e.testGetColumnConfig(t)},getRowData:function(t){return e.testGetRowData(t)},getScrollPosition:function(){return e.testGetScrollPosition()},getTableDimensions:function(){return e.testGetTableDimensions()},createSnapshot:function(e){return t.createSnapshot(e)},compareSnapshot:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t.compareSnapshot(e,i)},getSnapshot:function(e){return t.getSnapshot(e)},exportSnapshot:function(e){return t.exportSnapshot(e)},importSnapshot:function(e){t.importSnapshot(e)},getHeaderBodyWidthComparison:function(){return e.testGetHeaderBodyWidthComparison()}};"undefined"!==typeof window&&(window.__CANVAS_TABLE_TEST_HOOKS__=i,window.__CANVAS_TABLE_GRID__=e)}}var tn=function(){function e(t,i){var r=this;wt(this,e),B(this,"target",void 0),B(this,"scrollY",void 0),B(this,"scrollX",void 0),B(this,"checkboxWidth",void 0),B(this,"horizontalScrollerSize",void 0),B(this,"verticalScrollerSize",void 0),B(this,"tempValue",void 0),B(this,"focusCell",void 0),B(this,"enterShift",void 0),B(this,"hashChange",void 0),B(this,"selector",void 0),B(this,"editor",void 0),B(this,"autofill",void 0),B(this,"rowDrag",void 0),B(this,"colDrag",void 0),B(this,"selectedColIds",void 0),B(this,"lastSelectedColId",void 0),B(this,"viewerDrag",void 0),B(this,"painter",void 0),B(this,"clipboard",void 0),B(this,"header",void 0),B(this,"footer",void 0),B(this,"body",void 0),B(this,"scroller",void 0),B(this,"tooltip",void 0),B(this,"events",void 0),B(this,"history",void 0),B(this,"styleManager",void 0),B(this,"edgeScroller",void 0),B(this,"rowIdMap",void 0),B(this,"selectedRowIds",void 0),B(this,"lastSelectedRowIndex",void 0),B(this,"data",void 0),B(this,"color",void 0),B(this,"borderColor",void 0),B(this,"fillColor",void 0),B(this,"borderWidth",void 0),B(this,"showCheckbox",void 0),B(this,"headerHeight",void 0),B(this,"rowKey",void 0),B(this,"striped",void 0),B(this,"stripedOddColor",void 0),B(this,"stripedEvenColor",void 0),B(this,"rowHeight",void 0),B(this,"hoverRowIndex",void 0),B(this,"hoverColIndex",void 0),B(this,"isScrolling",void 0),B(this,"scrollTimer",void 0),B(this,"beforeSelectCell",void 0),B(this,"afterSelectCell",void 0),B(this,"beforeMultiSelectCell",void 0),B(this,"afterMultiSelectCell",void 0),B(this,"beforeEditCell",void 0),B(this,"afterEditCell",void 0),B(this,"beforeSelectRow",void 0),B(this,"afterSelectRow",void 0),B(this,"beforeResizeColumn",void 0),B(this,"afterResizeColumn",void 0),B(this,"beforeResizeRow",void 0),B(this,"afterResizeRow",void 0),B(this,"beforeAutofill",void 0),B(this,"afterAutofill",void 0),B(this,"customAutofill",void 0),B(this,"beforeCopy",void 0),B(this,"afterCopy",void 0),B(this,"beforePaste",void 0),B(this,"afterPaste",void 0),B(this,"afterClear",void 0),B(this,"onLoad",void 0),B(this,"onRowDragReorder",void 0),B(this,"onRowDragMove",void 0),B(this,"onGroupToggle",void 0),B(this,"onTreeExpand",void 0),B(this,"onCellTextClick",void 0),B(this,"onCellTotalNumClick",void 0),B(this,"onColumnDragReorder",void 0),B(this,"onColumnContextMenu",void 0),B(this,"onModuleOverflowClick",void 0),B(this,"onAddRow",void 0),B(this,"showFooter",void 0),B(this,"onFooterCellClick",void 0),B(this,"range",void 0),B(this,"columns",void 0),B(this,"headers",void 0),B(this,"columnsLength",void 0),B(this,"originFixedWidth",void 0),B(this,"containerOriginX",void 0),B(this,"containerOriginY",void 0),B(this,"width",void 0),B(this,"height",void 0),B(this,"_configWidth",void 0),B(this,"_configHeight",void 0),B(this,"_baseColumnWidths",[]),B(this,"fixedLeftWidth",void 0),B(this,"fixedRightWidth",void 0),B(this,"tableWidth",void 0),B(this,"tableHeight",void 0),B(this,"tableHeaderHeight",void 0),B(this,"nestedColumnColors",new Map),B(this,"isDirty",!0),B(this,"lastScrollX",0),B(this,"lastScrollY",0),B(this,"perfMonitor",void 0),B(this,"loadingCells",new Map),B(this,"loadingRotation",0),B(this,"loadingImage",null),B(this,"loadingAnimationId",null),B(this,"colResizeIndicatorX",-1),this.target=t,this.scrollY=0,this.scrollX=0,this.perfMonitor=Zr({enabled:i.debug||!1,logLevel:i.debug?"verbose":"warn"}),this.hoverRowIndex=-1,this.hoverColIndex=-1,this.isScrolling=!1,this.scrollTimer=null,this.checkboxWidth=f,this.horizontalScrollerSize=p,this.verticalScrollerSize=p,this.tempValue="",this.focusCell=null,this.enterShift=!1,this.lastSelectedRowIndex=-1,this.hashChange={},this.rowIdMap=new Map,this.selectedRowIds=new Set,this.selector={show:!1,isSelected:!1,xArr:[-1,-1],yArr:[-1,-1]},this.autofill={enable:!1,xIndex:0,yIndex:0,xArr:[-1,-1],yArr:[-1,-1]},this.rowDrag={isDragging:!1,dragStartY:0,draggedRowIndices:[],dropIndicatorType:null,dropIndicatorY:0,dropTargetRowIndex:-1,justFinishedDrag:!1,hasStartedDragSelection:!1,isCtrlPressed:!1,isShiftPressed:!1,skipNextClick:!1},this.colDrag={isDragging:!1,dragStartX:0,draggedColIds:[],dropIndicatorType:null,dropIndicatorX:0,dropTargetColId:"",dropInsertBefore:!0,justFinishedDrag:!1,skipNextClick:!1},this.selectedColIds=new Set,this.lastSelectedColId="",this.viewerDrag={isDragging:!1,cell:null,startX:0,startY:0,startValue:null,currentValue:null},this.painter=new At(t),this.styleManager=new zr(i.theme||"default"),this.initConfig(i),this.createContainer(),this.clipboard=new Hr(this),this.editor=new tr(this),this.header=new zi(this,0,0),this.footer=this.showFooter?new Qi(this):null,this.body=new Ei(this,this.data),this.scroller=new rr(this),this.edgeScroller=new Yr(this),this.setLayoutSize(i),this.initTableSize(),this.tooltip=new Mr(this,0,0),this.events=new Pr(this,t),this.history=new Lr(this);var n=ni.getInstance();n.onAnimationFrame(function(){n.hasGifImages()&&r.markDirty()}),this.preloadLoadingImage(),this.initPaint(),en(this)}return mt(e,[{key:"footerHeight",get:function(){return this.footer?this.footer.height:0}},{key:"initConfig",value:function(e){Object.assign(this,{data:[],color:"#495060",borderColor:"#e1e6eb",fillColor:"#fff",borderWidth:1,showCheckbox:!0,headerHeight:d,rowKey:"id",striped:!1,stripedOddColor:"#fff",stripedEvenColor:"#f9fafc",rowHeight:48,beforeSelectCell:function(e){},afterSelectCell:function(e){},beforeMultiSelectCell:function(e){},afterMultiSelectCell:function(e){},beforeEditCell:function(e){},afterEditCell:function(e){},beforeSelectRow:function(e){},afterSelectRow:function(e){},beforeResizeColumn:function(){},afterResizeColumn:function(){},beforeResizeRow:function(){},afterResizeRow:function(){},beforeAutofill:function(){},afterAutofill:function(e){},customAutofill:void 0,beforeCopy:function(){},afterCopy:function(){},beforePaste:function(){},afterPaste:function(e){},afterClear:function(e){},onLoad:function(){},onRowDragReorder:void 0,onRowDragMove:void 0,onGroupToggle:void 0,onTreeExpand:void 0,onCellTextClick:void 0,onCellTotalNumClick:void 0,onColumnDragReorder:void 0,onColumnContextMenu:void 0,onModuleOverflowClick:void 0,onAddRow:void 0,showFooter:!1,onFooterCellClick:void 0},e),this.range={minX:0,minY:0,maxY:this.data.length-1},this.updateColumns(e.columns||[]),this.showCheckbox||(this.checkboxWidth=0),this.originFixedWidth=c+this.checkboxWidth}},{key:"setLayoutSize",value:function(){var e,t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=this.target.parentElement,n=r.parentElement;void 0!==i.width&&(this._configWidth=i.width),void 0!==i.height&&(this._configHeight=i.height);var o=null!==(e=i.width)&&void 0!==e?e:this._configWidth,a=null!==(t=i.height)&&void 0!==t?t:this._configHeight,s="string"===typeof o&&String(o).trim().endsWith("%"),l="string"===typeof a&&String(a).trim().endsWith("%");s&&(n.style.width=o),l&&(n.style.height=a);var h=n.getBoundingClientRect();this.containerOriginX=h.left,this.containerOriginY=h.top;var d=function(e,t,i){if(void 0===e||null===e)return i;if("number"===typeof e)return e;var r=String(e).trim();if(r.endsWith("%"))return Math.floor(t);var n=parseFloat(r);return isNaN(n)?i:n};this.width=d(o,h.width,h.width),this.height=d(a,h.height,window.innerHeight-h.top),this.target.width=this.width*Gr,this.target.height=this.height*Gr,this.target.style.width=this.width+"px",this.target.style.height=this.height+"px",r.style.width=this.width+"px",r.style.height=this.height+"px",s||(n.style.width=this.width+"px"),l||(n.style.height=this.height+"px"),this.painter.scaleCanvas(Gr)}},{key:"getTableSize",value:function(){var e=this.originFixedWidth,t=p;this.header.fixedColumnHeaders.filter(function(e){return!e.level}).forEach(function(i){"left"===i.fixed&&(e+=i.width),"right"===i.fixed&&(t+=i.width)}),this.fixedLeftWidth=e,this.fixedRightWidth=t,this.tableWidth=this.header.allColumnHeaders.filter(function(e){return!e.level}).reduce(function(e,t){return e+t.width},this.originFixedWidth),this.tableHeight=this.body.height,this.scroller.reset()}},{key:"initTableSize",value:function(){this.getTableSize(),this.fillTableWidth()}},{key:"fillTableWidth",value:function(){if(this.tableWidth<=this.width-p){var e=(this.width-p-this.tableWidth)/this.columnsLength;if(e){this.header.resizeAllColumn(e),this.body.resizeAllColumn(e);for(var t=0;t<this.columns.length;t++){var i=this.columns[t],r=this.headers[t];if("nested"===i.type&&i.nestedColumns)i.nestedColumns.forEach(function(t){t.width=(t.width||R[t.size||"mini"])+e}),i.width=i.nestedColumns.reduce(function(e,t){return e+(t.width||R[t.size||"mini"])},0);else{var n=i.width||R[i.size||"mini"];i.width=n+e,r&&(r.width=i.width)}}}this.tableWidth=this.width-p,this.fixedLeftWidth=0,this.fixedRightWidth=p}this.scroller.reset()}},{key:"resize",value:function(){var e=this.scrollX,t=this.scrollY;this.setLayoutSize(),this.restoreBaseColumnWidths(),this.header.paint(),this.body.rowCache.clear(),this.initTableSize();var i=this.tableWidth-(this.width-p);this.scrollX=i<=0?0:Math.max(-i,Math.min(0,e));var r=this.tableHeight+this.footerHeight-(this.height-p);this.scrollY=r<=0?0:Math.max(-r,Math.min(0,t)),this.scroller.setPosition(),this.markDirty()}},{key:"restoreBaseColumnWidths",value:function(){if(0!==this._baseColumnWidths.length)for(var e=0;e<this.columns.length;e++){var t=this._baseColumnWidths[e];if(t){var i=this.columns[e],r=this.headers[e];if(t.nestedChildWidths&&"nested"===i.type&&i.nestedColumns)for(var n=0;n<i.nestedColumns.length;n++)void 0!==t.nestedChildWidths[n]&&(i.nestedColumns[n].width=t.nestedChildWidths[n]);i.width=t.leafWidth,!r||"nested"===i.type&&i.nestedColumns||(r.width=t.leafWidth)}}}},{key:"createContainer",value:function(){var e=Ct("div","".concat(h)),t=Ct("div","".concat(h,"-main"));t.offset({width:this.width,height:this.height}),e.children(t);var i=Ct("canvas","".concat(h,"-table")),r=new tr(this),n=Ct("div","".concat(h,"-overlayer")).children(r.el);t.children(i,n),this.target.appendChild(e.el)}},{key:"getCell",value:function(e,t){return this.body.getCell(e,t)}},{key:"selectRowRange",value:function(e,t){for(var i=Math.min(e,t),r=Math.max(e,t),n=i;n<=r;n++){var o=this.body.getRow(n);o&&o._rowId&&o.rowHeader&&!xi(o.data)&&!mi(o.data)&&(this.selectedRowIds.add(o._rowId),o.checked=!0,o.rowHeader.handleCheck(!0))}}},{key:"selectCell",value:function(e){var t=this,i=e.colIndex,r=e.rowIndex;this.clearMultiSelect();var n=!!this.editor._nestedGridContext;if(n||(this.selector.show=!0,this.selector.isSelected=!0,this.edgeScroller.start(function(){var e=t.edgeScroller.lastMouseX,i=t.edgeScroller.lastMouseY;t.body.mouseMove(e,i)})),this.clearAllNestedGridsSelection(),this.enterShift&&this.focusCell){var o=this.focusCell,a=o.colIndex,s=o.rowIndex,l=Math.min(a,i),h=Math.max(a,i),d=Math.min(s,r),u=Math.max(s,r);this.autofill.xIndex=h,this.autofill.yIndex=u,this.selector.xArr=[l,h],this.selector.yArr=[d,u]}else this.editor.xIndex=i,this.editor.yIndex=r,this.adjustBoundaryPosition();this.putCell(),this.markDirty()}},{key:"resetCellPosition",value:function(){this.selector.xArr=[this.editor.xIndex,this.editor.xIndex],this.selector.yArr=[this.editor.yIndex,this.editor.yIndex],this.autofill.xIndex=this.editor.xIndex,this.autofill.yIndex=this.editor.yIndex}},{key:"putCell",value:function(){var e=this.focusCell,t=e.x,i=e.y,r=e.width,n=e.height,o=e.value,a=e.fixed,s=e.dataType,l=e.options,h="right"===a?this.width-(this.tableWidth-t-r)-r-p:"left"===a?t:t+this.scrollX,d=i+this.scrollY;this.afterSelectCell({value:o,x:h,y:d,width:r,height:n,dataType:s,options:l,colIndex:this.focusCell.colIndex,rowIndex:this.focusCell.rowIndex})}},{key:"multiSelectCell",value:function(e,t,i,r){var n=this.selector;if(n.isSelected){var o=Math.min(e,this.editor.xIndex),a=Math.max(e,this.editor.xIndex),s=Math.min(t,this.editor.yIndex),l=Math.max(t,this.editor.yIndex);this.autofill.xIndex=a,this.autofill.yIndex=l,n.xArr=[o,a],n.yArr=[s,l],this.edgeScroller.update(i,r)}this.autofill.enable&&(this.edgeScroller.update(i,r),this.autofill.xArr=n.xArr.slice(),this.autofill.yArr=n.yArr.slice(),t>=n.yArr[0]&&t<=n.yArr[1]?e>n.xArr[1]?this.autofill.xArr.splice(1,1,e):e<n.xArr[0]&&this.autofill.xArr.splice(0,1,e):t>n.yArr[1]?this.autofill.yArr.splice(1,1,t):t<n.yArr[0]&&this.autofill.yArr.splice(0,1,t))}},{key:"endMultiSelect",value:function(){this.selector.isSelected=!1,this.edgeScroller.stop(),this.selector.show&&this.autofill.enable&&(this.body.autofillData(),this.autofill.enable=!1,this.markDirty())}},{key:"clearMultiSelect",value:function(){this.selector.xArr=[-1,-1],this.selector.yArr=[-1,-1]}},{key:"clearAllNestedGridsSelection",value:function(){var e,t=pt(this.body.rows);try{for(t.s();!(e=t.n()).done;){var i,r=e.value,n=pt(r.allCells);try{for(n.s();!(i=n.n()).done;){var o=i.value;o.nestedGrid&&(o.nestedGrid.selectedCell=null)}}catch(a){n.e(a)}finally{n.f()}}}catch(a){t.e(a)}finally{t.f()}}},{key:"selectCols",value:function(e,t){var i=this,r=e.colId,n=!!t&&(t.ctrlKey||t.metaKey),o=!!t&&t.shiftKey,a="nested"===e.colType&&e.colspan>1;if(o&&this.lastSelectedColId){var s=this.header.allColumnHeaders.filter(function(e){return"nested-child"!==e.colType&&!(e.colspan>1&&"nested"!==e.colType)}),l=s.findIndex(function(e){return e.colId===i.lastSelectedColId}),h=s.findIndex(function(e){return e.colId===r});if(l>=0&&h>=0)for(var d=Math.min(l,h),u=Math.max(l,h),c=d;c<=u;c++)this.selectedColIds.add(s[c].colId)}else if(n){if(a){this.selectedColIds.has(r)?this.selectedColIds.delete(r):this.selectedColIds.add(r);var f,v=this.getNestedChildColIds(e.index),g=pt(v);try{for(g.s();!(f=g.n()).done;){var y=f.value;this.selectedColIds.delete(y)}}catch(A){g.e(A)}finally{g.f()}}else if("nested-child"===e.colType){this.selectedColIds.has(r)?this.selectedColIds.delete(r):this.selectedColIds.add(r);var p=String(e.index);if(this.selectedColIds.has(p)){this.selectedColIds.delete(p);var w,x=this.getNestedChildColIds(e.index),m=pt(x);try{for(m.s();!(w=m.n()).done;){var b=w.value;b!==r&&this.selectedColIds.add(b)}}catch(A){m.e(A)}finally{m.f()}}}else this.selectedColIds.has(r)?this.selectedColIds.delete(r):this.selectedColIds.add(r);this.lastSelectedColId=r}else{var k=this.selectedColIds.has(r);k||(this.selectedColIds.clear(),this.selectedColIds.add(r)),this.lastSelectedColId=r}if(this.selector.show=!0,this.clearAllNestedGridsSelection(),this.selectedColIds.size>0){var C=this.getSelectedColBaseIndices(),S=Math.min.apply(Math,fe(C)),I=Math.max.apply(Math,fe(C));this.selector.xArr=[S,I],this.selector.yArr=[this.range.minY,this.range.maxY],this.editor.xIndex=S,this.editor.yIndex=this.range.minY,this.autofill.xIndex=I,this.autofill.yIndex=this.range.maxY}else{var T=e.index;this.selector.xArr=[T,T],this.selector.yArr=[this.range.minY,this.range.maxY],this.editor.xIndex=T,this.editor.yIndex=this.range.minY,this.autofill.xIndex=T,this.autofill.yIndex=this.range.maxY}this.focusCell=this.body.getCell(this.editor.xIndex,this.editor.yIndex),this.focusCell&&this.putCell(),this.markDirty()}},{key:"getNestedChildColIds",value:function(e){return this.header.allColumnHeaders.filter(function(t){return"nested-child"===t.colType&&t.index===e}).map(function(e){return e.colId})}},{key:"getSelectedColBaseIndices",value:function(){var e,t=new Set,i=pt(this.selectedColIds);try{for(i.s();!(e=i.n()).done;){var r=e.value,n=parseInt(r.split(":")[0],10);t.add(n)}}catch(o){i.e(o)}finally{i.f()}return Array.from(t)}},{key:"startColDrag",value:function(e,t){var i=this,r=Array.from(this.selectedColIds);this.selectedColIds.has(e)?this.colDrag.draggedColIds=r:(this.colDrag.draggedColIds=[e],this.selectedColIds.clear(),this.selectedColIds.add(e)),this.colDrag.isDragging=!0,this.colDrag.dragStartX=t,this.target.style.cursor="grabbing",this.edgeScroller.start(function(){i.updateColDrag(i.edgeScroller.lastMouseX,i.edgeScroller.lastMouseY)},t,0,"horizontal")}},{key:"updateColDrag",value:function(e,t){if(this.colDrag.isDragging){var i,r=this.colDrag.draggedColIds.some(function(e){return!e.includes(":")});if(i=r?this.header.getColAtPosition(e,t,!0):this.header.getColAtPosition(e,t),!i)return this.colDrag.dropIndicatorType=null,void this.draw();var n=i.colId;if(this.colDrag.draggedColIds.includes(n))return this.colDrag.dropIndicatorType=null,void this.draw();var o="right"===i.fixed?this.width-(this.tableWidth-i.x-i.width)-i.width-this.verticalScrollerSize:"left"===i.fixed?i.x:i.x+this.scrollX,a=e-o;a<i.width/2?(this.colDrag.dropIndicatorType="line",this.colDrag.dropIndicatorX=o,this.colDrag.dropTargetColId=n,this.colDrag.dropInsertBefore=!0):(this.colDrag.dropIndicatorType="line",this.colDrag.dropIndicatorX=o+i.width,this.colDrag.dropTargetColId=n,this.colDrag.dropInsertBefore=!1),this.draw()}}},{key:"endColDrag",value:function(){if(this.colDrag.isDragging){var e=this.colDrag,t=e.dropIndicatorType,i=e.dropTargetColId,r=e.dropInsertBefore,n=e.draggedColIds;this.colDrag.isDragging=!1,this.colDrag.draggedColIds=[],this.colDrag.dropIndicatorType=null,this.colDrag.dropTargetColId="",this.colDrag.justFinishedDrag=!0,this.colDrag.skipNextClick=!0,this.target.style.cursor="default",t&&i&&this.onColumnDragReorder&&this.onColumnDragReorder(n,i,r),this.draw()}}},{key:"cancelColDrag",value:function(){this.colDrag.isDragging=!1,this.colDrag.draggedColIds=[],this.colDrag.dropIndicatorType=null,this.colDrag.dropTargetColId="",this.target.style.cursor="default",this.draw()}},{key:"clearSelectedCols",value:function(){this.selectedColIds.clear(),this.lastSelectedColId="",this.markDirty()}},{key:"isColSelected",value:function(e){return this.selectedColIds.has(e)}},{key:"isNestedParentAllChildrenSelected",value:function(e){var t=this,i=this.getNestedChildColIds(e);return 0!==i.length&&i.every(function(e){return t.selectedColIds.has(e)})}},{key:"selectRows",value:function(e){var t=e.rowIndex;if(this.selector.show=!0,this.clearAllNestedGridsSelection(),this.enterShift&&this.focusCell){var i=this.focusCell.rowIndex,r=Math.min(i,t),n=Math.max(i,t);this.selector.xArr=[this.range.minX,this.range.maxX],this.selector.yArr=[r,n],this.editor.xIndex=this.range.minX,this.editor.yIndex=i,this.autofill.xIndex=this.range.maxX,this.autofill.yIndex=n}else this.selector.xArr=[this.range.minX,this.range.maxX],this.selector.yArr=[t,t],this.editor.xIndex=this.range.minX,this.editor.yIndex=t,this.autofill.xIndex=this.range.maxX,this.autofill.yIndex=t;this.focusCell=this.body.getCell(this.editor.xIndex,this.editor.yIndex),this.putCell()}},{key:"startAutofill",value:function(){this.autofill.enable=!0}},{key:"clearAuaofill",value:function(){this.selector.xArr.splice(0,1,this.autofill.xArr[0]),this.selector.xArr.splice(1,1,this.autofill.xArr[1]),this.selector.yArr.splice(0,1,this.autofill.yArr[0]),this.selector.yArr.splice(1,1,this.autofill.yArr[1]),this.autofill.xIndex=this.selector.xArr[1],this.autofill.yIndex=this.selector.yArr[1],this.autofill.xArr=[-1,-1],this.autofill.yArr=[-1,-1]}},{key:"startEdit",value:function(){!this.focusCell||this.focusCell.readonly||this.focusCell.nestedGrid||(this.editor.show=!0,this.resetCellPosition(),this.putCell(),this.beforeEditCell(this.focusCell))}},{key:"doneEdit",value:function(){var e=this.editor._nestedGridContext;if(e){var t=e.nestedGrid,i=e.colIndex,r=e.rowIndex,n=this.tempValue||this.editor.value,o=t.columns[i],a=n;if("select"===o.type&&Array.isArray(o.options)){var s,l=pt(o.options);try{for(l.s();!(s=l.n()).done;){var h=s.value;if(n===h.label){a=h.value;break}}}catch(u){l.e(u)}finally{l.f()}}return t.data[r][o.key]=a,t.editingCell=null,this.editor.hide(),delete this.editor._nestedGridContext,this.afterSelectCell(null),void this.draw()}if(this.editor.show&&this.focusCell){if(this.editor.show=!1,this.selector.show=!0,this.focusCell.value!==this.tempValue){this.history.pushState({before:{colIndex:this.focusCell.colIndex,rowIndex:this.focusCell.rowIndex,value:this.focusCell.value},after:{colIndex:this.focusCell.colIndex,rowIndex:this.focusCell.rowIndex,value:this.tempValue},type:"single"}),this.focusCell.setData(this.tempValue);var d=this.body.getRowData(this.focusCell.rowIndex);this.afterEditCell(d)}this.putCell(),this.clipboard.clear(),this.afterSelectCell(null)}}},{key:"setData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.focusCell,i=t.colIndex,r=t.rowIndex,n=this.body.getCell(i,r);n&&n.setData(e),this.focusCellByCoord(i,r)}},{key:"batchSetData",value:function(e){var t=e.colIndex,i=e.rowIndex,r=e.value;this.body.batchSetData({colIndex:t,rowIndex:i,value:r}),this.focusCellByCoord(t,i,t+r[0].length-1,i+r.length-1)}},{key:"setTempData",value:function(e){this.editor.show=!0,this.tempValue=e}},{key:"pasteData",value:function(e){e.length>0&&(this.body.pasteData(e),this.clipboard.select(e))}},{key:"clearSelectedData",value:function(){this.body.clearSelectedData()}},{key:"focusCellByCoord",value:function(e,t,i,r){this.selector.xArr=[e,i||e],this.selector.yArr=[t,r||t],this.editor.xIndex=e,this.editor.yIndex=t,this.autofill.xIndex=i||e,this.autofill.yIndex=r||t,this.focusCell=this.body.getCell(this.editor.xIndex,this.editor.yIndex)}},{key:"resizeColumn",value:function(e,t){this.header.resizeColumn(e,t),this.body.resizeColumn(e,t);var i,r=pt(this.header.allColumnHeaders);try{for(r.s();!(i=r.n()).done;){var n=i.value;!n.level&&n.index<this.columns.length&&(this.columns[n.index].width=n.width)}}catch(o){r.e(o)}finally{r.f()}this.getTableSize(),this.markDirty()}},{key:"resizeRow",value:function(e,t){this.body.resizeRow(e,t),this.getTableSize()}},{key:"handleCheckRow",value:function(e){this.body.handleCheckRow(e)}},{key:"handleCheckHeader",value:function(){this.body.handleCheckHeader()}},{key:"moveFocus",value:function(e){var t=this.editor.xIndex,i=this.editor.yIndex,r=!1;do{switch(r=!1,e){case"LEFT":this.editor.xIndex>this.range.minX&&(this.editor.xIndex--,r=!0);break;case"TOP":this.editor.yIndex>this.range.minY&&(this.editor.yIndex--,r=!0);break;case"RIGHT":this.editor.xIndex<this.range.maxX&&(this.editor.xIndex++,r=!0);break;case"BOTTOM":this.editor.yIndex<this.range.maxY&&(this.editor.yIndex++,r=!0);break;default:}if(r){var n=this.body.getCell(this.editor.xIndex,this.editor.yIndex);if(n&&!n.nestedGrid)break}}while(r);(!r||this.editor.xIndex===t&&this.editor.yIndex===i)&&(this.editor.xIndex=t,this.editor.yIndex=i),this.adjustBoundaryPosition(),this.putCell()}},{key:"adjustPosition",value:function(e,t,i,r){var n=i-this.width+p,o=r-this.height+p;n>0&&this.scroller.update(-12,"HORIZONTAL"),o>0&&this.scroller.update(-12,"VERTICAL")}},{key:"adjustBoundaryPosition",value:function(){if(this.resetCellPosition(),this.focusCell=this.body.getCell(this.editor.xIndex,this.editor.yIndex),!this.focusCell.fixed){var e=this.focusCell.x+this.focusCell.width+this.scrollX,t=this.focusCell.y+this.focusCell.height+this.scrollY,i=this.width-this.fixedRightWidth,r=this.height-p,n=this.focusCell.x+this.scrollX-this.fixedLeftWidth,o=i-e,a=this.focusCell.y+this.scrollY-this.tableHeaderHeight,s=r-t;o<0?this.scroller.update(o,"HORIZONTAL"):n<0&&this.scroller.update(-n,"HORIZONTAL"),a<0?this.scroller.update(-a,"VERTICAL"):s<0&&this.scroller.update(s,"VERTICAL")}}},{key:"initPaint",value:function(){this.perfMonitor.trackFrame();var e=this.scrollX!==this.lastScrollX||this.scrollY!==this.lastScrollY;if(this.isDirty||e){this.perfMonitor.mark("frame-start"),this.draw(),this.perfMonitor.mark("frame-end");var t=this.perfMonitor.measure("frame","frame-start","frame-end");this.perfMonitor.checkFrameTime(t),this.isDirty=!1,this.lastScrollX=this.scrollX,this.lastScrollY=this.scrollY}window.requestAnimationFrame(this.initPaint.bind(this))}},{key:"markDirty",value:function(){this.isDirty=!0}},{key:"drawContainer",value:function(){this.painter.drawRect(0,0,this.width,this.height,{borderColor:this.borderColor,fillColor:"#fff",borderWidth:this.borderWidth})}},{key:"draw",value:function(){this.painter.clearCanvas(),this.drawContainer(),this.columnsLength&&(this.body.draw(),this.drawNestedColumnBorders(),this.tooltip.draw(),this.footer&&this.footer.draw(),this.header.draw(),this.scroller.draw(),this.drawRowDragIndicator(),this.drawColDragIndicator(),this.drawColResizeIndicator())}},{key:"drawNestedColumnBorders",value:function(){var e=this;if(0!==this.nestedColumnColors.size){var t=this.painter.ctx,i=this.tableHeaderHeight,r=this.height-this.horizontalScrollerSize-this.footerHeight;if(!(i>=r)){var n,o=[],a=pt(this.nestedColumnColors);try{var s=function(){var t=yt(n.value,2),i=t[0],r=t[1],a=e.header.allColumnHeaders.find(function(e){return e.index===i&&("nested"===e.colType||!e.colType&&!e.parentKey)});if(!a)return 0;var s=a.fixed;if(s)return 0;var l=a.width||0,h=a.x+e.scrollX;if(h+l<=e.fixedLeftWidth||h>=e.width-e.fixedRightWidth)return 0;o.push({screenX:h,colW:l,color:r})};for(a.s();!(n=a.n()).done;)s()}catch(v){a.e(v)}finally{a.f()}if(o.length>0){t.save(),t.beginPath(),t.rect(this.fixedLeftWidth,i,this.width-this.fixedLeftWidth-this.fixedRightWidth,r-i),t.clip();var l,h=pt(o);try{for(h.s();!(l=h.n()).done;){var d=l.value,u=d.screenX,c=d.colW,f=d.color;t.strokeStyle=f,t.lineWidth=2,t.beginPath(),t.moveTo(u+.5,i),t.lineTo(u+.5,r),t.stroke(),t.beginPath(),t.moveTo(u+c+.5,i),t.lineTo(u+c+.5,r),t.stroke()}}catch(v){h.e(v)}finally{h.f()}t.restore()}}}}},{key:"drawFixedNestedColumnBorders",value:function(e,t){var i=this;if(0!==this.nestedColumnColors.size){var r,n=this.painter.ctx,o=pt(this.nestedColumnColors);try{var a=function(){var o=yt(r.value,2),a=o[0],s=o[1],l=i.header.allColumnHeaders.find(function(e){return e.index===a&&("nested"===e.colType||!e.colType&&!e.parentKey)});if(!l)return 0;var h=l.fixed;if(!h)return 0;var d,u=l.width||0;d="right"===h?i.width-(i.tableWidth-l.x-u)-u-i.verticalScrollerSize:l.x,n.strokeStyle=s,n.lineWidth=2,n.beginPath(),n.moveTo(d+.5,e),n.lineTo(d+.5,e+t),n.stroke(),n.beginPath(),n.moveTo(d+u+.5,e),n.lineTo(d+u+.5,e+t),n.stroke()};for(o.s();!(r=o.n()).done;)a()}catch(s){o.e(s)}finally{o.f()}}}},{key:"drawColResizeIndicator",value:function(){if(!(this.colResizeIndicatorX<0)){var e=this.colResizeIndicatorX;this.painter.drawLine([[e,0],[e,this.height]],{borderColor:"rgb(82,146,247)",borderWidth:1,lineDash:[4,4]})}}},{key:"drawRowDragIndicator",value:function(){if(this.rowDrag.isDragging&&this.rowDrag.dropIndicatorType){var e=this.rowDrag,t=e.dropIndicatorType,i=e.dropIndicatorY,r=e.dropTargetRowIndex;if("line"===t)this.painter.drawRect(0,i,this.width,3,{fillColor:"#1890ff",borderWidth:0});else if("overlay"===t){var n=this.body.getRow(r);if(n){var o,a,s=n.y+this.scrollY,l=n.height;this.painter.drawRect(0,s,this.width,l,{fillColor:"rgba(24, 144, 255, 0.1)",borderColor:"#1890ff",borderWidth:2});var h=(null===(o=this.data[r])||void 0===o?void 0:o[null===(a=this.columns[0])||void 0===a?void 0:a.key])||"行".concat(r+1),d="拖放节点移动到 ".concat(h),u=this.painter.measureText(d,14),c=12,f=u+2*c,v=32,g=(this.width-f)/2,y=s+(l-v)/2;this.painter.drawRoundRect(g,y,f,v,4,{fillColor:"#6366f1",borderWidth:0}),this.painter.drawCellText(d,g,y,f,v,14,{color:"#ffffff",align:"center",bold:!0})}}}}},{key:"drawColDragIndicator",value:function(){if(this.colDrag.isDragging&&this.colDrag.dropIndicatorType){var e=this.colDrag.dropIndicatorX;this.painter.drawRect(e-1,0,3,this.height,{fillColor:"#1890ff",borderWidth:0}),this.painter.drawLine([[e-5,0],[e+5,0],[e,8]],{fillColor:"#1890ff",borderColor:"#1890ff",borderWidth:1})}}},{key:"updateColumns",value:function(e){var t=e.some(function(e){return"nested"===e.type&&e.nestedColumns&&e.nestedColumns.length>0}),i=ht(e);t&&i<2&&(i=2),i>1&&(this.headerHeight=24),this.tableHeaderHeight=this.headerHeight*i,this.headers=dt(e,i),this.columns=lt(e),this.columnsLength=this.columns.length,this.range.maxX=this.columnsLength-1,this._baseColumnWidths=this.columns.map(function(e){var t=e.width||R[e.size||"mini"],i={leafWidth:t};return"nested"===e.type&&e.nestedColumns&&e.nestedColumns.length>0&&(i.nestedChildWidths=e.nestedColumns.map(function(e){return e.width||R[e.size||"mini"]}),i.leafWidth=i.nestedChildWidths.reduce(function(e,t){return e+t},0)),i}),this.nestedColumnColors.clear();for(var r=0;r<this.columns.length;r++){var n=this.columns[r];"nested"===n.type&&n.color&&this.nestedColumnColors.set(r,n.color)}}},{key:"loadColumns",value:function(e){this.updateColumns(e),this.header.paint(),this.getTableSize()}},{key:"loadData",value:function(e){var t=this;this.perfMonitor.mark("loadData-start"),this.data=e,this.range.maxY=e.length-1,this.perfMonitor.checkDataSize(e.length,this.columns.length),this.editor.xIndex=0,this.editor.yIndex=0,this.editor.editorXIndex=0,this.editor.editorYIndex=0,this.editor.hide(),this.focusCell=null,this.selector.show=!1,this.selector.isSelected=!1,this.selector.xArr=[-1,-1],this.selector.yArr=[-1,-1],this.autofill.enable=!1,this.autofill.xIndex=0,this.autofill.yIndex=0,this.autofill.xArr=[-1,-1],this.autofill.yArr=[-1,-1],this.clearSelectedCols(),this.rowIdMap.clear(),e.forEach(function(e,i){e._rowId&&t.rowIdMap.set(e._rowId,i)}),this.body.paint(e),this.initTableSize(),this.markDirty(),this.perfMonitor.measure("loadData","loadData-start")}},{key:"getData",value:function(){return this.doneEdit(),this.body.getData()}},{key:"getRowData",value:function(e){return this.doneEdit(),this.body.getRowData(e)}},{key:"getCheckedRows",value:function(){return this.doneEdit(),this.body.getCheckedRows()}},{key:"setSelectedRows",value:function(e){var t=this;this.selectedRowIds.clear(),e.forEach(function(e){t.selectedRowIds.add(e)}),this.draw()}},{key:"getSelectedRowIds",value:function(){return Array.from(this.selectedRowIds)}},{key:"getChangedRows",value:function(){return this.doneEdit(),this.body.getChangedRows()}},{key:"validate",value:function(e){return this.doneEdit(),this.body.validate(e)}},{key:"validateChanged",value:function(e){return this.doneEdit(),this.body.validateChanged(e)}},{key:"validateField",value:function(e,t){return this.doneEdit(),this.body.validateField(e,t)}},{key:"getValidations",value:function(){return this.doneEdit(),this.body.getValidations()}},{key:"setValidations",value:function(e){return this.body.setValidations(e)}},{key:"clearValidations",value:function(){return this.body.clearValidations()}},{key:"updateData",value:function(e){return this.body.updateData(e)}},{key:"pauseGif",value:function(){var e=ni.getInstance().getGifManager();e.pause()}},{key:"resumeGif",value:function(){var e=ni.getInstance().getGifManager();e.resume()}},{key:"toggleGif",value:function(){var e=ni.getInstance().getGifManager();return e.toggle()}},{key:"isGifEnabled",value:function(){var e=ni.getInstance().getGifManager();return e.isEnabled()}},{key:"setStriped",value:function(e){this.striped=e}},{key:"getStriped",value:function(){return this.striped}},{key:"toggleStriped",value:function(){return this.striped=!this.striped,this.striped}},{key:"setTheme",value:function(e){this.styleManager.setTheme(e),this.draw()}},{key:"getTheme",value:function(){return this.styleManager.getTheme()}},{key:"registerStyle",value:function(e,t){this.styleManager.registerStyle(e,t)}},{key:"registerStyles",value:function(e){this.styleManager.registerStyles(e)}},{key:"setRowHeight",value:function(e){this.rowHeight=e,this.body.rowCache.forEach(function(t){t.allCells.forEach(function(t){t.nestedGrid&&t.nestedGrid.updateRowHeight(e)})}),this.body.paint(this.data),this.initTableSize(),this.draw()}},{key:"getRowHeight",value:function(){return this.rowHeight}},{key:"setDateDisplayType",value:function(e){this.body.rowCache.forEach(function(t){if(t.allCells){var i,r=pt(t.allCells);try{for(r.s();!(i=r.n()).done;){var n=i.value;n.viewerConfig&&Object.hasOwn(n.viewerConfig,"datePattern")&&(n.viewerConfig.datePattern=e)}}catch(o){r.e(o)}finally{r.f()}}});var t,i=pt(this.columns);try{for(i.s();!(t=i.n()).done;){var r=t.value,n=r.viewerConfig;n&&Object.hasOwn(n,"datePattern")&&(n.datePattern=e)}}catch(o){i.e(o)}finally{i.f()}this.markDirty()}},{key:"startRowDrag",value:function(e,t){var i=this,r=this.body.getCheckedRowObjects(),n=r.map(function(e){return e.rowIndex});n.includes(e)?this.rowDrag.draggedRowIndices=n:this.rowDrag.draggedRowIndices=[e],this.rowDrag.isDragging=!0,this.rowDrag.dragStartY=t,this.target.style.cursor="grabbing",this.edgeScroller.start(function(){i.updateRowDrag(i.edgeScroller.lastMouseX,i.edgeScroller.lastMouseY)},0,t,"vertical")}},{key:"updateRowDrag",value:function(e,t){if(this.rowDrag.isDragging){var i=this.body.getRowAtPosition(t);if(!i)return this.rowDrag.dropIndicatorType=null,void this.draw();var r=i.rowIndex;if(this.rowDrag.draggedRowIndices.includes(r))return this.rowDrag.dropIndicatorType=null,void this.draw();var n=i.y+this.scrollY,o=t-n,a=.3*i.height;o<a?(this.rowDrag.dropIndicatorType="line",this.rowDrag.dropIndicatorY=n,this.rowDrag.dropTargetRowIndex=r):o>i.height-a?(this.rowDrag.dropIndicatorType="line",this.rowDrag.dropIndicatorY=n+i.height,this.rowDrag.dropTargetRowIndex=r+1):(this.rowDrag.dropIndicatorType="overlay",this.rowDrag.dropIndicatorY=n,this.rowDrag.dropTargetRowIndex=r),this.draw()}}},{key:"endRowDrag",value:function(){var e=this;if(this.rowDrag.isDragging){var t=this.rowDrag,i=t.dropIndicatorType,r=t.dropTargetRowIndex,n=t.draggedRowIndices;if(this.rowDrag.isDragging=!1,this.rowDrag.draggedRowIndices=[],this.rowDrag.dropIndicatorType=null,this.rowDrag.dropTargetRowIndex=-1,this.rowDrag.justFinishedDrag=!0,this.target.style.cursor="default",i&&r>=0){var o=n.map(function(t){return e.data[t]});if("line"===i)this.onRowDragReorder?this.onRowDragReorder(o,r):alert("行重排序:将 ".concat(o.length," 行移动到位置 ").concat(r));else if("overlay"===i){var a=this.data[r];if(this.onRowDragMove)this.onRowDragMove(o,a);else{var s,l=a[null===(s=this.columns[0])||void 0===s?void 0:s.key]||"行".concat(r+1);alert("拖放节点移动到 ".concat(l))}}}this.draw()}}},{key:"cancelRowDrag",value:function(){this.rowDrag.isDragging=!1,this.rowDrag.draggedRowIndices=[],this.rowDrag.dropIndicatorType=null,this.rowDrag.dropTargetRowIndex=-1,this.target.style.cursor="default",this.draw()}},{key:"setHoverRow",value:function(e){this.isScrolling||this.hoverRowIndex!==e&&(this.hoverRowIndex=e,this.markDirty())}},{key:"setHoverCell",value:function(e,t){this.isScrolling||this.hoverColIndex===e&&this.hoverRowIndex===t||(this.hoverColIndex=e,this.hoverRowIndex=t,this.markDirty())}},{key:"setScrolling",value:function(e){var t=this;this.isScrolling=e,e&&(this.hoverRowIndex=-1,this.hoverColIndex=-1,this.markDirty(),this.scrollTimer&&clearTimeout(this.scrollTimer),this.scrollTimer=setTimeout(function(){t.isScrolling=!1,t.scrollTimer=null},300))}},{key:"preloadLoadingImage",value:function(){var e=this,t=new Image;t.onload=function(){e.loadingImage=t},t.src=Xr}},{key:"showLoading",value:function(e,t){var i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:6e4;if(null!==e&&void 0!==e&&e.length&&null!==t&&void 0!==t&&t.length){r=Math.max(r,1e3);var n,o=pt(e);try{for(o.s();!(n=o.n()).done;){var a,s=n.value,l=pt(t);try{var h=function(){var e=a.value,t="".concat(s,"|||").concat(e),n=i.loadingCells.get(t);n&&clearTimeout(n.timeoutId);var o=window.setTimeout(function(){i.removeSingleLoading(t),0===i.loadingCells.size&&i.stopLoadingAnimation(),i.markDirty()},r);i.loadingCells.set(t,{timeoutId:o})};for(l.s();!(a=l.n()).done;)h()}catch(d){l.e(d)}finally{l.f()}}}catch(d){o.e(d)}finally{o.f()}this.startLoadingAnimation(),this.markDirty()}}},{key:"hideLoading",value:function(e,t){if(null!==e&&void 0!==e&&e.length&&null!==t&&void 0!==t&&t.length){var i,r=pt(e);try{for(r.s();!(i=r.n()).done;){var n,o=i.value,a=pt(t);try{for(a.s();!(n=a.n()).done;){var s=n.value,l="".concat(o,"|||").concat(s);this.removeSingleLoading(l)}}catch(h){a.e(h)}finally{a.f()}}}catch(h){r.e(h)}finally{r.f()}0===this.loadingCells.size&&this.stopLoadingAnimation(),this.markDirty()}}},{key:"clearAllLoading",value:function(){var e,t=pt(this.loadingCells);try{for(t.s();!(e=t.n()).done;){var i=yt(e.value,2),r=i[1];clearTimeout(r.timeoutId)}}catch(n){t.e(n)}finally{t.f()}this.loadingCells.clear(),this.stopLoadingAnimation(),this.markDirty()}},{key:"removeSingleLoading",value:function(e){var t=this.loadingCells.get(e);t&&(clearTimeout(t.timeoutId),this.loadingCells.delete(e))}},{key:"isLoadingCell",value:function(e){return this.loadingCells.has(e)}},{key:"getLoadingRotation",value:function(){return this.loadingRotation}},{key:"getLoadingImage",value:function(){return this.loadingImage}},{key:"startLoadingAnimation",value:function(){var e=this;if(null===this.loadingAnimationId){var t=function(){0!==e.loadingCells.size?(e.loadingRotation+=.1,e.loadingRotation>2*Math.PI&&(e.loadingRotation-=2*Math.PI),e.markDirty(),e.loadingAnimationId=requestAnimationFrame(t)):e.loadingAnimationId=null};this.loadingAnimationId=requestAnimationFrame(t)}}},{key:"stopLoadingAnimation",value:function(){null!==this.loadingAnimationId&&(cancelAnimationFrame(this.loadingAnimationId),this.loadingAnimationId=null)}},{key:"testGetCellLayout",value:function(e,t){var i=this.findRowIndexById(e);if(-1===i)return null;var r=this.columns.findIndex(function(e){return e.key===t});if(-1===r)return null;var n=this.body.getRow(i);if(!n)return null;var o,a=n.allCells[r];if(!a)return null;o="right"===a.fixed?this.width-(this.tableWidth-a.x-a.width)-a.width-this.verticalScrollerSize:"left"===a.fixed?a.x:a.x+this.scrollX;var s=a.y+this.scrollY,l=this.tableHeaderHeight,h=this.height-this.horizontalScrollerSize-this.footerHeight,d=0,u=this.width-this.verticalScrollerSize,c=o+a.width>d&&o<u&&s+a.height>l&&s<h;return{x:o,y:s,width:a.width,height:a.height,visible:c,columnKey:t,rowId:e,colIndex:r,rowIndex:i,fixed:a.fixed||""}}},{key:"testGetAllVisibleCells",value:function(){var e,t=[],i=this.tableHeaderHeight,r=this.height-this.horizontalScrollerSize-this.footerHeight,n=0,o=this.width-this.verticalScrollerSize,a=pt(this.body.rows);try{for(a.s();!(e=a.n()).done;){var s=e.value,l=s.data;if(!l||!0!==l.isGroup&&!0!==l.isSeparateRow){var h,d=pt(s.allCells);try{for(d.s();!(h=d.n()).done;){var u=h.value,c=void 0;c="right"===u.fixed?this.width-(this.tableWidth-u.x-u.width)-u.width-this.verticalScrollerSize:"left"===u.fixed?u.x:u.x+this.scrollX;var f=u.y+this.scrollY,v=c+u.width>n&&c<o&&f+u.height>i&&f<r;if(v){var g,y,p=null!==(g=l[this.rowKey])&&void 0!==g?g:s._rowId;t.push({x:c,y:f,width:u.width,height:u.height,visible:!0,columnKey:u.key,rowId:p,colIndex:u.colIndex,rowIndex:s.rowIndex,fixed:u.fixed||"",value:u.value,label:null!==(y=u.label)&&void 0!==y?y:""})}}}catch(w){d.e(w)}finally{d.f()}}}}catch(w){a.e(w)}finally{a.f()}return t}},{key:"testGetColumnConfig",value:function(e){var t,i=pt(this.header.allColumnHeaders);try{for(i.s();!(t=i.n()).done;){var r,n=t.value,o=n.nestedKey||(null===(r=this.columns[n.index])||void 0===r?void 0:r.key);if(o===e){var a=null;return n.colspan>1&&!n.level&&(a=this.header.allColumnHeaders.filter(function(t){return t.parentKey===e&&t.level}).map(function(e){return{key:e.nestedKey||"",title:e.text,width:e.width,fixed:e.fixed||"",visible:e.isVisibleOnScreen(),index:e.index,level:e.level||0,type:e.colType||"",children:null,colspan:e.colspan,rowspan:e.rowspan||1,parentKey:e.parentKey||null}})),{key:o,title:n.text,width:n.width,fixed:n.fixed||"",visible:n.isVisibleOnScreen(),index:n.index,level:n.level||0,type:n.colType||"",children:a,colspan:n.colspan,rowspan:n.rowspan||1,parentKey:n.parentKey||null}}}}catch(s){i.e(s)}finally{i.f()}return null}},{key:"testGetRowData",value:function(e){var t=this.findRowIndexById(e);if(-1===t)return null;var i=this.body.data[t];return i?JSON.parse(JSON.stringify(i)):null}},{key:"testGetScrollPosition",value:function(){var e=this.width-this.tableWidth-p,t=this.height-this.tableHeight-p;return{scrollX:this.scrollX,scrollY:this.scrollY,maxScrollX:Math.min(e,0),maxScrollY:Math.min(t,0),hasHorizontalScrollbar:this.scroller.horizontalScroller.has,hasVerticalScrollbar:this.scroller.verticalScroller.has}}},{key:"testGetTableDimensions",value:function(){return{containerWidth:this.width,containerHeight:this.height,tableWidth:this.tableWidth,tableHeight:this.tableHeight,headerHeight:this.tableHeaderHeight,rowHeight:this.rowHeight,fixedLeftWidth:this.fixedLeftWidth,fixedRightWidth:this.fixedRightWidth,totalRows:this.body.data.length,totalColumns:this.columnsLength}}},{key:"testGetHeaderBodyWidthComparison",value:function(){var e,t=[],i=this.header.allColumnHeaders.filter(function(e){return!e.level}),r=null,n=pt(this.body.rows);try{for(n.s();!(e=n.n()).done;){var o=e.value,a=o.data;if(!a||!0!==a.isGroup&&!0!==a.isSeparateRow){r=o;break}}}catch(g){n.e(g)}finally{n.f()}for(var s=0;s<i.length;s++){var l,h,d,u=i[s],c=this.columns[s],f="nested"===(null===c||void 0===c?void 0:c.type)&&(null===c||void 0===c||null===(l=c.nestedColumns)||void 0===l?void 0:l.length)>0,v=null!==(h=null===(d=r)||void 0===d||null===(d=d.allCells)||void 0===d||null===(d=d[s])||void 0===d?void 0:d.width)&&void 0!==h?h:-1;t.push({colIndex:s,columnKey:(null===c||void 0===c?void 0:c.key)||"",headerWidth:u.width,bodyCellWidth:v,isNested:f,match:Math.abs(u.width-v)<=1})}return t}},{key:"findRowIndexById",value:function(e){for(var t=this.body.data,i=0;i<t.length;i++){var r=t[i],n=r[this.rowKey];if(n===e||String(n)===String(e))return i}return-1}},{key:"setShowFooter",value:function(e){if(e!==this.showFooter){this.showFooter=e,this.footer=e?new Qi(this):null;var t=this.tableHeight+this.footerHeight-(this.height-p);this.scrollY=t<=0?0:Math.max(-t,Math.min(0,this.scrollY)),this.scroller.reset(),this.scroller.setPosition(),this.draw()}}},{key:"setFooterData",value:function(e){this.footer&&this.footer.setFooterData(e)}},{key:"setFooterCellData",value:function(e,t){this.footer&&this.footer.setFooterCellData(e,t)}}])}(),rn=tn,nn={mounted:function(e,t){function i(i){if(e.contains(i.target))return!1;t.value&&t.value(i)}e.__vueClickOutside__=i,document.addEventListener("click",i)},updated:function(){},unmounted:function(e){e.__vueClickOutside__&&(document.removeEventListener("click",e.__vueClickOutside__),delete e.__vueClickOutside__)}},on=nn,an=(0,o.defineComponent)({name:"DDataGrid",props:{rowKey:{type:String,default:"id"},width:[Number,String],height:[Number,String],columns:{type:Array,default:function(){return[]}},data:{type:Array,default:function(){return[]}},datePattern:{type:String,default:l.ABSOLUTE},customAutofill:{type:Function,default:void 0},debug:{type:Boolean,default:!1},showFooter:{type:Boolean,default:!1}},directives:{clickoutside:on},setup:function(e,t){var i=t.emit,r=(0,o.ref)(!(e.data.length>0)),n=(0,o.ref)(null),a="".concat(h,"-target-").concat(Math.random().toString(36).slice(2,10)),s=null,l=null,u=null,c=0,f=0,v=(0,o.computed)(function(){var t=ht(e.columns);return d*t});(0,o.watch)(function(){return e.columns},function(t){var i,r;null===(i=s)||void 0===i||i.loadColumns(t),null===(r=s)||void 0===r||r.loadData(e.data)}),(0,o.watch)(function(){return e.data},function(t){var i,n;null===(i=s)||void 0===i||i.loadColumns(e.columns),null===(n=s)||void 0===n||n.loadData(t),r.value=!1}),(0,o.watch)(function(){return e.datePattern},function(e){var t;null===(t=s)||void 0===t||t.setDateDisplayType(e)}),(0,o.watch)(function(){return e.showFooter},function(e){var t;null===(t=s)||void 0===t||t.setShowFooter(e)});var g=function(){var e;return null===(e=s)||void 0===e?void 0:e.resize()},y=function(e){var t;return null===(t=s)||void 0===t?void 0:t.loadData(e)},p=function(e){var t;return null===(t=s)||void 0===t?void 0:t.setSelectedRows(e)},w=function(){var e;return null===(e=s)||void 0===e?void 0:e.getSelectedRowIds()},x=function(){var e;return null===(e=s)||void 0===e?void 0:e.getData()},m=function(){var e;return null===(e=s)||void 0===e?void 0:e.getCheckedRows()},b=function(){var e;return null===(e=s)||void 0===e?void 0:e.getChangedRows()},k=function(e){var t;return null===(t=s)||void 0===t?void 0:t.validate(e)},C=function(e){var t;return null===(t=s)||void 0===t?void 0:t.validateChanged(e)},S=function(e,t){var i;return null===(i=s)||void 0===i?void 0:i.validateField(e,t)},I=function(){var e;return null===(e=s)||void 0===e?void 0:e.getValidations()},T=function(e){var t;return null===(t=s)||void 0===t?void 0:t.setValidations(e)},A=function(){var e;return null===(e=s)||void 0===e?void 0:e.clearValidations()},R=function(e){var t;return null===(t=s)||void 0===t?void 0:t.updateData(e)},D=function(){var e;null===(e=s)||void 0===e||e.resize()},E=function(e){n.value=e},P=function(){var e;null===(e=s)||void 0===e||e.doneEdit(),i("on-edit-done")},O=function(){var e;return null===(e=s)||void 0===e?void 0:e.toggleGif()},M=function(){var e;return null===(e=s)||void 0===e?void 0:e.toggleStriped()},B=function(e){var t;null===(t=s)||void 0===t||t.setStriped(e)},H=function(){var e;return null===(e=s)||void 0===e?void 0:e.getStriped()},F=function(e){var t;null===(t=s)||void 0===t||t.setTheme(e)},L=function(){var e;return null===(e=s)||void 0===e?void 0:e.getTheme()},W=function(e,t){var i;null===(i=s)||void 0===i||i.registerStyle(e,t)},z=function(e){var t;null===(t=s)||void 0===t||t.registerStyles(e)},N=function(e){var t;null===(t=s)||void 0===t||t.setRowHeight(e)},V=function(){var e;return null===(e=s)||void 0===e?void 0:e.getRowHeight()},_=function(e,t,i){var r;null===(r=s)||void 0===r||r.showLoading(e,t,i)},j=function(e,t){var i;null===(i=s)||void 0===i||i.hideLoading(e,t)},Y=function(){var e;null===(e=s)||void 0===e||e.clearAllLoading()},G=function(e){var t;null===(t=s)||void 0===t||t.setFooterData(e)},X=function(e,t){var i;null===(i=s)||void 0===i||i.setFooterCellData(e,t)},U=function(e){var t;null===(t=s)||void 0===t||t.setShowFooter(e)};return(0,o.onMounted)(function(){(0,o.nextTick)(function(){var t,r=document.getElementById(a),o=null===r||void 0===r||null===(t=r.parentElement)||void 0===t?void 0:t.parentElement;s=new rn(r,{rowKey:e.rowKey,width:e.width,height:e.height,columns:e.columns,data:e.data,beforeSelectCell:function(){},afterSelectCell:function(e){E(e),null===e&&i("on-edit-done")},beforeMultiSelectCell:function(){},afterMultiSelectCell:function(){},beforeEditCell:function(){var e,t,r;i("on-before-edit-cell",{cell:n.value,position:n.value?{x:n.value.x,y:n.value.y,width:n.value.width,height:n.value.height}:null,dataType:null===(e=n.value)||void 0===e?void 0:e.dataType,options:null===(t=n.value)||void 0===t?void 0:t.options,value:null===(r=n.value)||void 0===r?void 0:r.value})},afterEditCell:function(e){i("after-edit-cell",e)},afterAutofill:function(e){i("after-autofill",e)},afterPaste:function(e){i("after-paste",e)},afterClear:function(e){i("after-clear",e)},onLoad:function(){setTimeout(function(){i("on-load")},0)},onRowDragReorder:function(e,t){i("on-row-drag-reorder",e,t)},onRowDragMove:function(e,t){i("on-row-drag-move",e,t)},onGroupToggle:function(e,t){i("on-group-toggle",e,t)},onTreeExpand:function(e,t){i("on-tree-expand",e,t)},onCellTextClick:function(e,t){i("on-cell-text-click",e,t)},onCellTotalNumClick:function(e,t){i("on-cell-total-num-click",e,t)},onColumnDragReorder:function(e,t,r){i("on-column-drag-reorder",e,t,r)},onColumnContextMenu:function(e){i("on-column-context-menu",e)},onModuleOverflowClick:function(e,t,r,n){i("on-module-overflow-click",e,t,r,n)},onAddRow:function(e){i("on-add-row",e)},onFooterCellClick:function(e){i("on-footer-cell-click",e)},customAutofill:e.customAutofill,debug:e.debug,showFooter:e.showFooter}),window.grid=s,window.ImageManager=ni;var h="string"===typeof e.width&&String(e.width).includes("%")||"string"===typeof e.height&&String(e.height).includes("%")||void 0===e.width||void 0===e.height;if(h&&null!==o&&void 0!==o&&o.parentElement){var d=o.parentElement,v=d.getBoundingClientRect();c=Math.round(v.width),f=Math.round(v.height),l=new ResizeObserver(function(e){var t=e[0];if(t){var i=Math.round(t.contentRect.width),r=Math.round(t.contentRect.height);i===c&&r===f||(c=i,f=r,null!==u&&cancelAnimationFrame(u),u=requestAnimationFrame(function(){var e;u=null,null===(e=s)||void 0===e||e.resize()}))}}),l.observe(d)}})}),(0,o.onUnmounted)(function(){var e,t,i;null!==u&&(cancelAnimationFrame(u),u=null),null===(e=l)||void 0===e||e.disconnect(),l=null,null===(t=s)||void 0===t||t.clearAllLoading(),null===(i=s)||void 0===i||null===(i=i.events)||void 0===i||i.destroy()}),{CSS_PREFIX:h,canvasId:a,loading:r,focusCell:n,tableHeaderHeight:v,reload:g,loadData:y,setSelectedRows:p,getSelectedRowIds:w,getData:x,getCheckedRows:m,getChangedRows:b,validate:k,validateChanged:C,validateField:S,getValidations:I,setValidations:T,clearValidations:A,updateData:R,setFullScreen:D,selectCell:E,handleclickoutside:P,toggleGif:O,toggleStriped:M,setStriped:B,getStriped:H,setTheme:F,getTheme:L,registerStyle:W,registerStyles:z,setRowHeight:N,getRowHeight:V,showLoading:_,hideLoading:j,clearAllLoading:Y,setFooterData:G,setFooterCellData:X,setShowFooter:U}}}),sn=i(6262);const ln=(0,sn.A)(an,[["render",s]]);var hn=ln;function dn(e){return"string"===typeof e.value||"number"===typeof e.value||null===e.value}function un(e){return Array.isArray(e.options)&&e.options.length>0}function cn(e){var t=e.value;return null===t||void 0===t||(Array.isArray(t)?0===t.length||t[0]&&"object"===P(t[0])&&"name"in t[0]:"object"===P(t)&&"name"in t)}function fn(e){return"number"===typeof e.value&&void 0!==e.barHeight}function vn(e){return Array.isArray(e.value)&&Array.isArray(e.columns)}var gn,yn,pn=function(){function e(){wt(this,e),B(this,"type","text")}return mt(e,[{key:"draw",value:function(e,t){var i,r,n,o,a,s=e.painter,l=e.bounds,h=l.x,d=l.y,u=l.width,c=l.height,f=this.getDisplayText(t);""!==f&&null!==f&&void 0!==f||(f=t.placeholder||"-");var v=t.textAlign||(null===(i=t.style)||void 0===i?void 0:i.textAlign)||"left",g=(null===(r=t.style)||void 0===r?void 0:r.textBaseline)||"middle",y=(null===(n=t.style)||void 0===n?void 0:n.color)||"#333",p=null!==(o=null===(a=t.style)||void 0===a?void 0:a.padding)&&void 0!==o?o:10;t.asTag&&t.backgroundColor?this.drawTag(e,t,f):s.drawCellText(String(f),h,d,u,c,p,{color:y,align:v,baseLine:g})}},{key:"getDisplayText",value:function(e){return e.richText?this.extractPlainText(e.richText):void 0!==e.label&&null!==e.label?String(e.label):null===e.value||void 0===e.value?"":String(e.value)}},{key:"extractPlainText",value:function(e){return e.replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/&quot;/g,'"').trim()}},{key:"drawTag",value:function(e,t,i){var r,n,o,a,s=e.ctx,l=e.bounds,h=l.x,d=l.y,u=l.width,c=l.height,f=t.backgroundColor||"#f0f0f0",v=(null===(r=t.style)||void 0===r?void 0:r.color)||"#333",g=null!==(n=t.tagRadius)&&void 0!==n?n:4,y=8,p=(null===(o=t.style)||void 0===o?void 0:o.fontSize)||12;s.save(),s.font="".concat(p,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif');var w=s.measureText(i).width;s.restore();var x,m=Math.min(w+2*y,u-20),b=Math.min(20,c-8),k=t.textAlign||(null===(a=t.style)||void 0===a?void 0:a.textAlign)||"left";switch(k){case"center":x=h+(u-m)/2;break;case"right":x=h+u-m-10;break;default:x=h+10}var C=d+(c-b)/2;this.drawRoundedRect(s,x,C,m,b,g,f),s.save(),s.fillStyle=v,s.font="".concat(p,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),s.textAlign="center",s.textBaseline="middle";var S=m-2*y,I=this.truncateText(s,i,S);s.fillText(I,x+m/2,C+b/2),s.restore()}},{key:"drawRoundedRect",value:function(e,t,i,r,n,o,a){e.save(),e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.fillStyle=a,e.fill(),e.restore()}},{key:"truncateText",value:function(e,t,i){if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),wn=pn,xn=function(){function e(){wt(this,e),B(this,"type","select")}return mt(e,[{key:"draw",value:function(e,t){var i=e.fillColor,r=this.getSelectedOptions(t);if(0===r.length)return this.drawEmptyState(e),void(t.showArrow&&this.drawArrow(e,i));t.multiple?this.drawMultipleTags(e,t,r):this.drawSingleOption(e,t,r[0]),t.showArrow&&this.drawArrow(e,i)}},{key:"getSelectedOptions",value:function(e){var t=e.value,i=e.options,r=void 0===i?[]:i;if(null===t||void 0===t||""===t)return[];var n,o=Array.isArray(t)?t:[t],a=[],s=pt(o);try{var l=function(){var e=n.value,t=r.find(function(t){return t.value===e});t?a.push(t):a.push({value:e,label:String(e),backgroundColor:"#f0f0f0",color:"#666"})};for(s.s();!(n=s.n()).done;)l()}catch(h){s.e(h)}finally{s.f()}return a}},{key:"drawEmptyState",value:function(e){var t=e.painter,i=e.bounds,r=i.x,n=i.y,o=i.width,a=i.height;t.drawCellText("-",r,n,o,a,10,{color:"#bbb",align:"left",baseLine:"middle"})}},{key:"drawSingleOption",value:function(e,t,i){var r=e.painter,n=e.bounds,o=n.x,a=n.y,s=n.width,l=n.height;i.backgroundColor?this.drawTag(e,i,o+10,a+(l-20)/2,s-40):r.drawCellText(i.label,o,a,s-20,l,10,{color:i.color||"#333",align:"left",baseLine:"middle"})}},{key:"drawMultipleTags",value:function(e,t,i){var r,n=e.ctx,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=null!==(r=t.maxTags)&&void 0!==r?r:3,u=i.slice(0,d),c=i.length-d,f=10,v=6,g=20,y=a+f,p=s+(h-g)/2,w=l-30;n.save(),n.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var x,m=pt(u);try{for(m.s();!(x=m.n()).done;){var b=x.value,k=this.calculateTagWidth(n,b.label);if(y+k>a+w){var C="+".concat(i.length-u.indexOf(b));this.drawMoreIndicator(e,y,p,C);break}this.drawTag(e,b,y,p,k),y+=k+v}}catch(S){m.e(S)}finally{m.f()}c>0&&y+30<=a+w&&this.drawMoreIndicator(e,y,p,"+".concat(c)),n.restore()}},{key:"calculateTagWidth",value:function(e,t){var i=e.measureText(t).width;return Math.min(i+16,120)}},{key:"drawTag",value:function(e,t,i,r,n){var o=e.ctx,a=t.backgroundColor||"#f0f0f0",s=t.color||"#333",l=4,h=8,d=20;o.save(),o.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var u=o.measureText(t.label).width,c=Math.min(u+2*h,n);this.drawRoundedRect(o,i,r,c,d,l,a),o.fillStyle=s,o.textAlign="center",o.textBaseline="middle";var f=this.truncateText(o,t.label,c-2*h);o.fillText(f,i+c/2,r+d/2),o.restore()}},{key:"drawMoreIndicator",value:function(e,t,i,r){var n=e.ctx;n.save(),n.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',n.fillStyle="#999",n.textAlign="left",n.textBaseline="middle",n.fillText(r,t,i+10),n.restore()}},{key:"drawArrow",value:function(e,t){var i=e.painter,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height;i.drawCellAffixIcon("arrow",n,o,a,s-2,{color:"#bbbec4",fillColor:t})}},{key:"drawRoundedRect",value:function(e,t,i,r,n,o,a){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.fillStyle=a,e.fill()}},{key:"truncateText",value:function(e,t,i){if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),mn=xn,bn=function(){function e(){wt(this,e),B(this,"type","image"),B(this,"imageManager",void 0),this.imageManager=ni.getInstance()}return mt(e,[{key:"draw",value:function(e,t){var i=e.requestRedraw,r=t.value;if(r&&""!==r){var n=this.imageManager.isAnimatedImage(r),o=n?this.imageManager.getGifCanvas(r):null,a=o||this.imageManager.getCachedImage(r);a?this.drawImage(e,t,a):(this.imageManager.loadingImages.has(r)||this.imageManager.loadImage(r).then(function(){i()}).catch(function(e){i()}),this.drawPlaceholder(e,t,"Loading..."))}else this.drawPlaceholder(e,t,"No Image")}},{key:"drawImage",value:function(e,t,i){var r,n,o,a,s=e.painter,l=e.ctx,h=e.bounds,d=h.x,u=h.y,c=h.width,f=h.height,v=t.fit,g=void 0===v?"contain":v,y=t.borderRadius,p=void 0===y?0:y,w=4,x=c-2*w,m=f-2*w,b=i.width/i.height,k=x/m;switch(g){case"cover":b>k?(n=m,r=m*b):(r=x,n=x/b),o=d+(c-r)/2,a=u+(f-n)/2;break;case"fill":r=x,n=m,o=d+w,a=u+w;break;case"contain":default:b>k?(r=x,n=x/b):(n=m,r=m*b),o=d+(c-r)/2,a=u+(f-n)/2;break}p>0?this.drawRoundedImage(l,i,o,a,r,n,p):s.drawImage(i,o,a,r,n)}},{key:"drawRoundedImage",value:function(e,t,i,r,n,o,a){e.save(),e.beginPath(),e.moveTo(i+a,r),e.lineTo(i+n-a,r),e.quadraticCurveTo(i+n,r,i+n,r+a),e.lineTo(i+n,r+o-a),e.quadraticCurveTo(i+n,r+o,i+n-a,r+o),e.lineTo(i+a,r+o),e.quadraticCurveTo(i,r+o,i,r+o-a),e.lineTo(i,r+a),e.quadraticCurveTo(i,r,i+a,r),e.closePath(),e.clip(),e.drawImage(t,i,r,n,o),e.restore()}},{key:"drawPlaceholder",value:function(e,t,i){var r=e.ctx,n=e.bounds,o=n.x,a=n.y,s=n.width,l=n.height;if(t.placeholder){var h=this.imageManager.getCachedImage(t.placeholder);if(h)return void this.drawImage(e,F(F({},t),{},{value:t.placeholder}),h)}var d="No Image"===i?t.alt||"No Image":i;r.save(),r.fillStyle="#f5f5f5",r.fillRect(o+4,a+4,s-8,l-8),r.fillStyle="Loading..."===i?"#999":"#ccc",r.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',r.textAlign="center",r.textBaseline="middle",r.fillText(d,o+s/2,a+l/2),r.restore()}}])}(),kn=bn,Cn=(i(744),function(){function e(){wt(this,e),B(this,"type","person"),B(this,"imageManager",void 0),B(this,"avatarColors",["#1890ff","#52c41a","#722ed1","#eb2f96","#fa8c16","#13c2c2","#2f54eb","#f5222d"]),this.imageManager=ni.getInstance()}return mt(e,[{key:"draw",value:function(e,t){var i=t.value,r=t.placeholder,n=void 0===r?"Unassigned":r;if(null===i||void 0===i||Array.isArray(i)&&0===i.length)this.drawPlaceholder(e,n);else{var o=Array.isArray(i)?i:[i];this.drawPersons(e,t,o)}}},{key:"drawPersons",value:function(e,t,i){for(var r=e.bounds,n=e.requestRedraw,o=r.x,a=r.y,s=r.width,l=r.height,h=t.mode,d=void 0===h?"both":h,u=t.avatarSize,c=void 0===u?24:u,f=t.maxDisplay,v=void 0===f?3:f,g=10,y="avatar"===d?-8:8,p=o+g,w=a+l/2,x=i.slice(0,v),m=i.length-v,b=0;b<x.length;b++){var k=x[b],C=o+s-g-p;if(C<c)break;p+=this.drawPersonWithConstraint(e,k,p,w,d,c,C,n),p+=y}if(m>0){var S=o+s-g-p;S>=c&&this.drawRemainingCount(e,p,w,m,c)}}},{key:"calculatePersonWidth",value:function(e,t,i,r){var n=e.ctx;switch(i){case"avatar":return r;case"name":return n.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',n.measureText(t.name).width;case"both":default:return n.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',r+6+n.measureText(t.name).width}}},{key:"drawPersonWithConstraint",value:function(e,t,i,r,n,o,a,s){var l=e.ctx,h=i,d=0;if("avatar"!==n&&"both"!==n||(this.drawAvatar(e,t,h,r,o,s),h+=o+6,d+=o),"name"===n||"both"===n){l.save(),l.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',l.fillStyle="#333",l.textAlign="left",l.textBaseline="middle";var u="name"===n?i:h,c=a-("both"===n?o+6:0);if(c>0){var f=this.truncateText(l,t.name,c);l.fillText(f,u,r),d+=l.measureText(f).width,"both"===n&&(d+=6)}l.restore()}return d}},{key:"truncateText",value:function(e,t,i){var r="...",n=e.measureText(r).width,o=e.measureText(t).width;if(o<=i)return t;if(i<n)return"";var a=0,s=t.length;while(a<s){var l=Math.ceil((a+s)/2),h=t.slice(0,l)+r,d=e.measureText(h).width;d<=i?a=l:s=l-1}return a>0?t.slice(0,a)+r:r}},{key:"drawAvatar",value:function(e,t,i,r,n,o){var a=e.ctx,s=r-n/2,l=n/2,h=t.avatar,d=null;h&&(d=this.imageManager.getCachedImage(h),d||this.imageManager.loadingImages.has(h)||this.imageManager.loadImage(h).then(function(){return o()}).catch(function(){return o()})),a.save(),a.beginPath(),a.arc(i+l,r,l,0,2*Math.PI),a.closePath(),a.clip(),d?a.drawImage(d,i,s,n,n):this.drawFallbackAvatar(a,t,i,s,n,l,r),a.restore(),a.save(),a.beginPath(),a.arc(i+l,r,l,0,2*Math.PI),a.strokeStyle="#fff",a.lineWidth=2,a.stroke(),a.restore()}},{key:"drawFallbackAvatar",value:function(e,t,i,r,n,o,a){var s=this.getColorIndex(t),l=this.avatarColors[s];e.fillStyle=l,e.fillRect(i,r,n,n);var h=this.getInitial(t.name);e.fillStyle="#fff",e.font="bold ".concat(.5*n,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),e.textAlign="center",e.textBaseline="middle",e.fillText(h,i+o,a)}},{key:"getColorIndex",value:function(e){for(var t=String(e.id||e.name),i=0,r=0;r<t.length;r++)i=t.charCodeAt(r)+((i<<5)-i);return Math.abs(i)%this.avatarColors.length}},{key:"getInitial",value:function(e){if(!e)return"?";if(/[\u4e00-\u9fa5]/.test(e[0]))return e[0];var t=e.trim().split(/\s+/);return t.length>1?(t[0][0]+t[t.length-1][0]).toUpperCase():e[0].toUpperCase()}},{key:"drawRemainingCount",value:function(e,t,i,r,n){var o=e.ctx,a=n,s=a/2;o.save(),o.beginPath(),o.arc(t+s,i,s,0,2*Math.PI),o.fillStyle="#e8e8e8",o.fill(),o.fillStyle="#666",o.font="".concat(.4*a,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),o.textAlign="center",o.textBaseline="middle",o.fillText("+".concat(r),t+s,i),o.restore()}},{key:"drawPlaceholder",value:function(e,t){var i=e.painter,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height;i.drawCellText(t,n,o,a,s,10,{color:"#bbb",align:"left",baseLine:"middle"})}}])}()),Sn=Cn,In=function(){function e(){wt(this,e),B(this,"type","progress"),B(this,"defaultColor","#1890ff"),B(this,"defaultTrackColor","#e8e8e8"),B(this,"handleRadius",6),B(this,"handleBorderWidth",2),B(this,"handleColor","#ffffff"),B(this,"handleBorderColor","#52c41a")}return mt(e,[{key:"draw",value:function(e,t){var i,r,n=e.ctx,o=e.bounds,a=e.isHoverCell,s=o.x,l=o.y,h=o.width,d=o.height,u=t.value,c=t.min,f=void 0===c?0:c,v=t.max,g=void 0===v?100:v,y=t.barHeight,p=void 0===y?8:y,w=t.showText,x=void 0===w||w,m=t.textPosition,b=void 0===m?"right":m,k=t.trackColor,C=void 0===k?this.defaultTrackColor:k,S=t.draggable,I=void 0!==S&&S,T=this.normalizeValue(u,f,g),A=Math.round(100*T),R=this.getProgressColor(t,T),D=10,E=x?40:0,P=x&&"right"===b?8:0;switch(b){case"right":i=s+D,r=h-2*D-E-P;break;case"outside":i=s+D,r=h-2*D;break;case"inside":default:i=s+D,r=h-2*D;break}var O=l+(d-p)/2,M=p/2;this.drawRoundedRect(n,i,O,r,p,M,C);var B=r*T;B>0&&this.drawRoundedRect(n,i,O,B,p,M,R),x&&this.drawPercentageText(n,t,s,l,h,d,i,O,r,p,A,R),I&&a&&this.drawDragHandle(n,i,O,r,p,T)}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n=t.draggable,o=void 0!==n&&n;return o&&this.isOverDragHandle(e,t,i,r)?"pointer":null}},{key:"onDragStart",value:function(e,t,i,r){var n=t.draggable,o=void 0!==n&&n;return!!o&&this.isOverProgressBar(e,t,i,r)}},{key:"onDragMove",value:function(e,t,i,r,n,o){var a,s=e.bounds,l=s.width,h=t.min,d=void 0===h?0:h,u=t.max,c=void 0===u?100:u,f=t.showText,v=void 0===f||f,g=t.textPosition,y=void 0===g?"right":g,p=10,w=v?40:0,x=v&&"right"===y?8:0;switch(y){case"right":a=l-2*p-w-x;break;default:a=l-2*p;break}var m=i-p,b=Math.max(0,Math.min(1,m/a)),k=d+b*(c-d);return Math.round(k)}},{key:"onDragEnd",value:function(e,t,i){}},{key:"isOverDragHandle",value:function(e,t,i,r){var n,o=e.bounds,a=o.width,s=o.height,l=t.value,h=t.min,d=void 0===h?0:h,u=t.max,c=void 0===u?100:u,f=t.showText,v=void 0===f||f,g=t.textPosition,y=void 0===g?"right":g,p=10,w=v?40:0,x=v&&"right"===y?8:0;switch(y){case"right":n=a-2*p-w-x;break;default:n=a-2*p;break}var m=this.normalizeValue(l,d,c),b=p+n*m,k=s/2,C=i-b,S=r-k,I=Math.sqrt(C*C+S*S);return I<=this.handleRadius+4}},{key:"isOverProgressBar",value:function(e,t,i,r){var n,o=e.bounds,a=o.width,s=o.height,l=t.barHeight,h=void 0===l?8:l,d=t.showText,u=void 0===d||d,c=t.textPosition,f=void 0===c?"right":c,v=10,g=u?40:0,y=u&&"right"===f?8:0;switch(f){case"right":n=a-2*v-g-y;break;default:n=a-2*v;break}var p=(s-h)/2,w=6;return i>=v&&i<=v+n&&r>=p-w&&r<=p+h+w}},{key:"drawDragHandle",value:function(e,t,i,r,n,o){var a=t+r*o,s=i+n/2;e.save(),e.shadowColor="rgba(0, 0, 0, 0.15)",e.shadowBlur=4,e.shadowOffsetX=0,e.shadowOffsetY=2,e.beginPath(),e.arc(a,s,this.handleRadius,0,2*Math.PI),e.fillStyle=this.handleColor,e.fill(),e.shadowColor="transparent",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0,e.strokeStyle=this.handleBorderColor,e.lineWidth=this.handleBorderWidth,e.stroke(),e.restore()}},{key:"normalizeValue",value:function(e,t,i){if(isNaN(e)||null===e||void 0===e)return 0;var r=i-t;if(r<=0)return 0;var n=(e-t)/r;return Math.max(0,Math.min(1,n))}},{key:"getProgressColor",value:function(e,t){if(e.color)return e.color;if(e.colorThresholds&&e.colorThresholds.length>0){var i,r=100*t,n=fe(e.colorThresholds).sort(function(e,t){return e.value-t.value}),o=pt(n);try{for(o.s();!(i=o.n()).done;){var a=i.value;if(r<=a.value)return a.color}}catch(s){o.e(s)}finally{o.f()}return n[n.length-1].color}return this.defaultColor}},{key:"drawPercentageText",value:function(e,t,i,r,n,o,a,s,l,h,d,u){var c=t.textPosition,f=void 0===c?"right":c,v="".concat(d,"%"),g=10;switch(e.save(),e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',f){case"right":e.fillStyle="#666",e.textAlign="left",e.textBaseline="middle",e.fillText(v,a+l+8,r+o/2);break;case"inside":var y=l*(d/100),p=e.measureText(v).width;y>p+10?(e.fillStyle="#fff",e.textAlign="right",e.textBaseline="middle",e.fillText(v,a+y-6,r+o/2)):(e.fillStyle="#666",e.textAlign="left",e.textBaseline="middle",e.fillText(v,a+y+4,r+o/2));break;case"outside":e.fillStyle="#666",e.textAlign="right",e.textBaseline="middle",e.fillText(v,i+n-g,r+o/2);break}e.restore()}},{key:"drawRoundedRect",value:function(e,t,i,r,n,o,a){if(!(r<=0)){var s=Math.min(o,n/2,r/2);e.save(),e.beginPath(),e.moveTo(t+s,i),e.lineTo(t+r-s,i),e.quadraticCurveTo(t+r,i,t+r,i+s),e.lineTo(t+r,i+n-s),e.quadraticCurveTo(t+r,i+n,t+r-s,i+n),e.lineTo(t+s,i+n),e.quadraticCurveTo(t,i+n,t,i+n-s),e.lineTo(t,i+s),e.quadraticCurveTo(t,i,t+s,i),e.closePath(),e.fillStyle=a,e.fill(),e.restore()}}}])}(),Tn=In,An=function(){function e(){wt(this,e),B(this,"type","datetime")}return mt(e,[{key:"draw",value:function(e,t){var i=e.painter,r=e.ctx,n=e.bounds,o=n.x,a=n.y,s=n.width,l=n.height,h=t.displayType,d=void 0===h?"date":h,u=t.showIcon,c=void 0===u||u,f=t.placeholder,v=void 0===f?"-":f,g=this.formatDate(t);if(g){var y=10,p=14,w=6,x=o+y;c&&(this.drawIcon(r,d,o+y,a+(l-p)/2,p),x+=p+w),r.save(),r.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',r.fillStyle="#333",r.textAlign="left",r.textBaseline="middle",r.fillText(g,x,a+l/2),r.restore()}else i.drawCellText(v,o,a,s,l,10,{color:"#bbb",align:"left",baseLine:"middle"})}},{key:"formatDate",value:function(e){var t,i=e.value,r=e.format,n=e.displayType,o=void 0===n?"date":n;if(null===i||void 0===i||""===i)return null;if(i instanceof Date)t=i;else if("number"===typeof i)t=new Date(i);else{if("string"!==typeof i)return null;t=new Date(i)}if(isNaN(t.getTime()))return null;if(r)return this.applyFormat(t,r);switch(o){case"date":return this.applyFormat(t,"YYYY-MM-DD");case"time":return this.applyFormat(t,"HH:mm:ss");case"datetime":return this.applyFormat(t,"YYYY-MM-DD HH:mm");case"month":return this.applyFormat(t,"YYYY-MM");default:return this.applyFormat(t,"YYYY-MM-DD")}}},{key:"applyFormat",value:function(e,t){var i=e.getFullYear(),r=e.getMonth()+1,n=e.getDate(),o=e.getHours(),a=e.getMinutes(),s=e.getSeconds();return t.replace("YYYY",String(i)).replace("MM",this.padZero(r)).replace("DD",this.padZero(n)).replace("HH",this.padZero(o)).replace("mm",this.padZero(a)).replace("ss",this.padZero(s))}},{key:"padZero",value:function(e){return e<10?"0".concat(e):String(e)}},{key:"drawIcon",value:function(e,t,i,r,n){if(e.save(),e.strokeStyle="#999",e.lineWidth=1.5,"time"===t){var o=i+n/2,a=r+n/2,s=n/2-2;e.beginPath(),e.arc(o,a,s,0,2*Math.PI),e.stroke(),e.beginPath(),e.moveTo(o,a),e.lineTo(o,a-.5*s),e.stroke(),e.beginPath(),e.moveTo(o,a),e.lineTo(o+.6*s,a),e.stroke()}else{var l=2,h=i+l,d=r+l,u=n-2*l,c=n-2*l;e.beginPath(),e.roundRect(h,d+2,u,c-2,2),e.stroke(),e.beginPath(),e.moveTo(h,d+5),e.lineTo(h+u,d+5),e.stroke(),e.beginPath(),e.moveTo(h+3,d),e.lineTo(h+3,d+4),e.moveTo(h+u-3,d),e.lineTo(h+u-3,d+4),e.stroke()}e.restore()}}])}(),Rn=An,Dn=function(){function e(){wt(this,e),B(this,"type","boolean")}return mt(e,[{key:"onClick",value:function(e,t,i,r){var n=t.displayStyle,o=void 0===n?"checkbox":n,a=e.bounds,s=a.width,l=a.height;if("checkbox"===o){var h=16,d=(s-h)/2,u=(l-h)/2;return i>=d&&i<=d+h&&r>=u&&r<=u+h}if("switch"===o){var c=36,f=18,v=(s-c)/2,g=(l-f)/2;return i>=v&&i<=v+c&&r>=g&&r<=g+f}return!1}},{key:"getInteractiveCursor",value:function(e,t,i,r){return e.readonly?null:this.onClick(e,t,i,r)?"pointer":null}},{key:"draw",value:function(e,t){var i=t.displayStyle,r=void 0===i?"checkbox":i;switch(r){case"checkbox":this.drawCheckbox(e,t);break;case"switch":this.drawSwitch(e,t);break;case"text":this.drawText(e,t);break;default:this.drawCheckbox(e,t)}}},{key:"drawCheckbox",value:function(e,t){var i=e.ctx,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height,l=t.value,h=t.checkedColor,d=void 0===h?"#52c41a":h,u=t.uncheckedColor,c=void 0===u?"#d9d9d9":u,f=16,v=n+(a-f)/2,g=o+(s-f)/2,y=3;i.save(),!0===l?(this.drawRoundedRect(i,v,g,f,f,y,d),i.strokeStyle="#fff",i.lineWidth=2,i.lineCap="round",i.lineJoin="round",i.beginPath(),i.moveTo(v+4,g+f/2),i.lineTo(v+7,g+f-4),i.lineTo(v+f-4,g+4),i.stroke()):!1===l?(i.strokeStyle=c,i.lineWidth=2,this.drawRoundedRectStroke(i,v,g,f,f,y)):(this.drawRoundedRect(i,v,g,f,f,y,"#d9d9d9"),i.strokeStyle="#fff",i.lineWidth=2,i.lineCap="round",i.beginPath(),i.moveTo(v+4,g+f/2),i.lineTo(v+f-4,g+f/2),i.stroke()),i.restore()}},{key:"drawSwitch",value:function(e,t){var i=e.ctx,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height,l=t.value,h=t.checkedColor,d=void 0===h?"#1890ff":h,u=t.uncheckedColor,c=void 0===u?"#d9d9d9":u,f=36,v=18,g=n+(a-f)/2,y=o+(s-v)/2,p=v/2;i.save();var w=!0===l,x=w?d:c;this.drawRoundedRect(i,g,y,f,v,p,x);var m=(v-4)/2,b=w?g+f-m-2-m:g+2;i.beginPath(),i.arc(b+m,y+v/2,m,0,2*Math.PI),i.fillStyle="#fff",i.fill(),i.shadowColor="rgba(0, 0, 0, 0.2)",i.shadowBlur=2,i.shadowOffsetX=0,i.shadowOffsetY=1,i.restore()}},{key:"drawText",value:function(e,t){var i,r,n=e.painter,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=t.value,u=t.trueText,c=void 0===u?"Yes":u,f=t.falseText,v=void 0===f?"No":f,g=t.nullText,y=void 0===g?"N/A":g;!0===d?(i=c,r="#52c41a"):!1===d?(i=v,r="#ff4d4f"):(i=y,r="#999"),n.drawCellText(i,a,s,l,h,10,{color:r,align:"center",baseLine:"middle"})}},{key:"drawRoundedRect",value:function(e,t,i,r,n,o,a){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.fillStyle=a,e.fill()}},{key:"drawRoundedRectStroke",value:function(e,t,i,r,n,o){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.stroke()}}])}(),En=Dn,Pn=function(){function e(){wt(this,e),B(this,"type","status")}return mt(e,[{key:"draw",value:function(e,t){var i=t.value,r=t.options,n=void 0===r?[]:r,o=t.showIcon,a=void 0===o||o,s=t.asTag,l=void 0===s||s,h=this.findStatusOption(i,n);h?l?this.drawStatusTag(e,h,a):this.drawStatusText(e,h,a):this.drawPlainText(e,String(i))}},{key:"findStatusOption",value:function(e,t){return t&&0!==t.length&&t.find(function(t){return t.value===e})||null}},{key:"drawStatusTag",value:function(e,t,i){var r=e.ctx,n=e.bounds,o=n.x,a=n.y,s=n.width,l=n.height,h=10,d=12,u=6,c=8,f=22,v=4;r.save(),r.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var g=r.measureText(t.label).width,y=i?d+u:0,p=Math.min(g+y+2*c,s-2*h),w=o+h,x=a+(l-f)/2,m=t.backgroundColor||this.getTypeBackgroundColor(t.type);this.drawRoundedRect(r,w,x,p,f,v,m);var b=w+c;if(i&&t.icon){var k=x+(f-d)/2;this.drawIcon(r,t.icon,b,k,d,t.color||this.getTypeColor(t.type)),b+=d+u}r.fillStyle=t.color||this.getTypeColor(t.type),r.textAlign="left",r.textBaseline="middle";var C=p-2*c-y,S=this.truncateText(r,t.label,C);r.fillText(S,b,x+f/2),r.restore()}},{key:"drawStatusText",value:function(e,t,i){var r=e.ctx,n=e.bounds,o=n.x,a=n.y,s=n.height,l=10,h=12,d=6;r.save(),r.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var u=o+l;if(i&&t.icon){var c=a+(s-h)/2;this.drawIcon(r,t.icon,u,c,h,t.color||this.getTypeColor(t.type)),u+=h+d}r.fillStyle=t.color||this.getTypeColor(t.type),r.textAlign="left",r.textBaseline="middle",r.fillText(t.label,u,a+s/2),r.restore()}},{key:"drawPlainText",value:function(e,t){var i=e.painter,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height;i.drawCellText(t,n,o,a,s,10,{color:"#666",align:"left",baseLine:"middle"})}},{key:"drawIcon",value:function(e,t,i,r,n,o){e.save(),e.fillStyle=o,e.strokeStyle=o,e.lineWidth=1.5;var a=i+n/2,s=r+n/2,l=n/2-2;switch(t){case"dot":e.beginPath(),e.arc(a,s,.6*l,0,2*Math.PI),e.fill();break;case"check":e.beginPath(),e.moveTo(i+2,s),e.lineTo(i+.4*n,r+n-3),e.lineTo(i+n-2,r+3),e.stroke();break;case"cross":e.beginPath(),e.moveTo(i+3,r+3),e.lineTo(i+n-3,r+n-3),e.moveTo(i+n-3,r+3),e.lineTo(i+3,r+n-3),e.stroke();break;case"warning":e.beginPath(),e.moveTo(a,r+2),e.lineTo(i+n-2,r+n-2),e.lineTo(i+2,r+n-2),e.closePath(),e.stroke(),e.fillRect(a-1,r+.35*n,2,.3*n),e.fillRect(a-1,r+.7*n,2,2);break;case"info":e.beginPath(),e.arc(a,s,l,0,2*Math.PI),e.stroke(),e.fillRect(a-1,s-1,2,.3*n),e.fillRect(a-1,r+3,2,2);break;default:e.beginPath(),e.arc(a,s,.5*l,0,2*Math.PI),e.fill()}e.restore()}},{key:"getTypeBackgroundColor",value:function(e){switch(e){case"success":return"#f6ffed";case"warning":return"#fffbe6";case"error":return"#fff2f0";case"info":return"#e6f7ff";default:return"#f0f0f0"}}},{key:"getTypeColor",value:function(e){switch(e){case"success":return"#52c41a";case"warning":return"#faad14";case"error":return"#ff4d4f";case"info":return"#1890ff";default:return"#666"}}},{key:"drawRoundedRect",value:function(e,t,i,r,n,o,a){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.fillStyle=a,e.fill()}},{key:"truncateText",value:function(e,t,i){if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),On=Pn,Mn=function(){function e(){wt(this,e),B(this,"type","group-header"),B(this,"imageManager",void 0),B(this,"avatarColors",["#1890ff","#52c41a","#722ed1","#eb2f96","#fa8c16","#13c2c2","#2f54eb","#f5222d"]),this.imageManager=ni.getInstance()}return mt(e,[{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=r.x,o=r.y,a=r.height,s=t.level,l=void 0===s?0:s,h=t.expanded,d=void 0!==h&&h,u=t.groupType,c=void 0===u?"text":u,f=20*l,v=10,g=e.grid.originFixedWidth,y=n-g+v+f;switch(y=this.drawExpandIcon(i,y,o,a,d),c){case"person":y=this.drawPersonGroup(e,t,y,o,a);break;case"status":y=this.drawStatusGroup(e,t,y,o,a);break;case"date":y=this.drawDateGroup(e,t,y,o,a);break;case"text":default:y=this.drawTextGroup(e,t,y,o,a)}this.drawCountBadge(i,t,y,o,a)}},{key:"drawExpandIcon",value:function(e,t,i,r,n){var o=16,a=i+(r-o)/2;e.save(),e.strokeStyle="#666",e.lineWidth=1.5,e.lineCap="round",e.lineJoin="round";var s=t+o/2,l=a+o/2,h=4;return e.beginPath(),n?(e.moveTo(s-h,l-h/2),e.lineTo(s,l+h/2),e.lineTo(s+h,l-h/2)):(e.moveTo(s-h/2,l-h),e.lineTo(s+h/2,l),e.lineTo(s-h/2,l+h)),e.stroke(),e.restore(),t+o+8}},{key:"drawTextGroup",value:function(e,t,i,r,n){var o=e.ctx,a=t.label;t.icon;o.save(),o.font='bold 13px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',o.fillStyle="#333",o.textAlign="left",o.textBaseline="middle",o.fillText(a,i,r+n/2);var s=o.measureText(a).width;return o.restore(),i+s+8}},{key:"drawPersonGroup",value:function(e,t,i,r,n){var o=e.ctx,a=e.requestRedraw,s=t.label,l=t.person,h=20,d=r+(n-h)/2,u=i;l&&(this.drawAvatar(o,l,u,d,h,a),u+=h+6),o.save(),o.font='bold 13px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',o.fillStyle="#333",o.textAlign="left",o.textBaseline="middle",o.fillText(s,u,r+n/2);var c=o.measureText(s).width;return o.restore(),u+c+8}},{key:"drawAvatar",value:function(e,t,i,r,n,o){var a=n/2,s=r+a,l=null;if(t.avatar&&(l=this.imageManager.getCachedImage(t.avatar),l||this.imageManager.loadingImages.has(t.avatar)||this.imageManager.loadImage(t.avatar).then(function(){return o()}).catch(function(){return o()})),e.save(),e.beginPath(),e.arc(i+a,s,a,0,2*Math.PI),e.closePath(),e.clip(),l)e.drawImage(l,i,r,n,n);else{var h=this.getColorIndex(t);e.fillStyle=this.avatarColors[h],e.fillRect(i,r,n,n);var d=this.getInitial(t.name);e.fillStyle="#fff",e.font="bold ".concat(.5*n,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),e.textAlign="center",e.textBaseline="middle",e.fillText(d,i+a,s)}e.restore()}},{key:"getColorIndex",value:function(e){for(var t=String(e.id||e.name),i=0,r=0;r<t.length;r++)i=t.charCodeAt(r)+((i<<5)-i);return Math.abs(i)%this.avatarColors.length}},{key:"getInitial",value:function(e){if(!e)return"?";if(/[\u4e00-\u9fa5]/.test(e[0]))return e[0];var t=e.trim().split(/\s+/);return t.length>1?(t[0][0]+t[t.length-1][0]).toUpperCase():e[0].toUpperCase()}},{key:"drawStatusGroup",value:function(e,t,i,r,n){var o=e.ctx,a=t.label,s=t.icon,l=12,h=i;if(s){var d=r+(n-l)/2;this.drawStatusIcon(o,s,h,d,l),h+=l+6}o.save(),o.font='bold 13px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',o.fillStyle="#333",o.textAlign="left",o.textBaseline="middle",o.fillText(a,h,r+n/2);var u=o.measureText(a).width;return o.restore(),h+u+8}},{key:"drawStatusIcon",value:function(e,t,i,r,n){e.save(),e.fillStyle="#666",e.strokeStyle="#666",e.lineWidth=1.5;var o=i+n/2,a=r+n/2;switch(t){case"dot":e.beginPath(),e.arc(o,a,.3*n,0,2*Math.PI),e.fill();break;case"check":e.beginPath(),e.moveTo(i+2,a),e.lineTo(i+.4*n,r+n-2),e.lineTo(i+n-2,r+2),e.stroke();break;default:e.beginPath(),e.arc(o,a,.3*n,0,2*Math.PI),e.fill()}e.restore()}},{key:"drawDateGroup",value:function(e,t,i,r,n){var o=e.ctx,a=t.label,s=14,l=i,h=r+(n-s)/2;this.drawCalendarIcon(o,l,h,s),l+=s+6,o.save(),o.font='bold 13px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',o.fillStyle="#333",o.textAlign="left",o.textBaseline="middle",o.fillText(a,l,r+n/2);var d=o.measureText(a).width;return o.restore(),l+d+8}},{key:"drawCalendarIcon",value:function(e,t,i,r){e.save(),e.strokeStyle="#666",e.lineWidth=1.5;var n=2,o=t+n,a=i+n,s=r-2*n,l=r-2*n;e.beginPath(),e.roundRect(o,a+2,s,l-2,2),e.stroke(),e.beginPath(),e.moveTo(o,a+5),e.lineTo(o+s,a+5),e.stroke(),e.restore()}},{key:"drawCountBadge",value:function(e,t,i,r,n){var o=t.count;if(void 0!==o&&null!==o){var a="(".concat(o,")");e.save(),e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.fillStyle="#999",e.textAlign="left",e.textBaseline="middle",e.fillText(a,i,r+n/2),e.restore()}}},{key:"onClick",value:function(e,t,i,r){var n=t.level,o=void 0===n?0:n,a=20*o,s=10,l=16,h=e.grid.originFixedWidth;return i>=-h+s+a&&i<=-h+s+a+l}}])}(),Bn=Mn,Hn=function(){function e(){wt(this,e),B(this,"type","separator-row")}return mt(e,[{key:"draw",value:function(e,t){var i,r=e.ctx,n=e.bounds,o=n.x,a=n.y,s=n.width,l=n.height,h=t.separateLevel,d=void 0===h?0:h;switch(d){case 0:i=Si.level0BgColor;break;case 1:i=Si.level1BgColor;break;case 2:default:i=Si.level2BgColor;break}r.save(),r.fillStyle=i,r.fillRect(o,a,s,l),r.restore()}},{key:"onClick",value:function(e,t,i,r){return!1}},{key:"getPreferredHeight",value:function(e,t){return t.rowHeight||12}}])}(),Fn=Hn,Ln=function(){function e(){wt(this,e),B(this,"type","nested"),B(this,"gridCache",new Map)}return mt(e,[{key:"draw",value:function(e,t){var i=e.bounds,r=e.rowIndex,n=e.colIndex,o=i.x,a=i.y,s=t.value,l=t.columns,h=t.expanded;if(s&&0!==s.length){var d="".concat(r,"-").concat(n),u=this.gridCache.get(d);u?(u.updatePosition(o+5,a+5),u.data=s,u.columns=this.convertColumns(l),void 0!==h&&(u.expanded=h)):(u=this.createNestedGrid(e,t),this.gridCache.set(d,u)),u.draw()}else this.drawEmptyState(e)}},{key:"createNestedGrid",value:function(e,t){var i=e.bounds,r=e.grid,n=e.rowIndex,o=e.colIndex,a=i.x,s=i.y,l=i.width,h=i.height,d=t.value,u=t.columns,c=t.displayRows,f=t.expanded,v=this.convertColumns(u),g=v.reduce(function(e,t){return e+(t.width||80)},0),y={rowIndex:n,key:"nested_".concat(o),rowData:{_nestedExpanded:f?B({},"nested_".concat(o),!0):{}}},p=new ai({columns:v,data:d||[],x:a+5,y:s+5,width:Math.min(g,l-10),height:h-10,parentGrid:r,parentCell:y,displayRows:c});return f&&(p.expanded=!0),p}},{key:"convertColumns",value:function(e){return e.map(function(e){return F({title:e.title,key:e.key,width:e.width||80,align:e.align||"left",type:e.type||"text"},e)})}},{key:"drawEmptyState",value:function(e){var t=e.ctx,i=e.bounds,r=i.x,n=i.y,o=i.width,a=i.height;t.save(),t.fillStyle="#fafafa",t.fillRect(r+5,n+5,o-10,a-10),t.strokeStyle="#e8e8e8",t.strokeRect(r+5,n+5,o-10,a-10),t.fillStyle="#999",t.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',t.textAlign="center",t.textBaseline="middle",t.fillText("No nested data",r+o/2,n+a/2),t.restore()}},{key:"onClick",value:function(e,t,i,r){var n=e.rowIndex,o=e.colIndex,a="".concat(n,"-").concat(o),s=this.gridCache.get(a);if(s){var l=i-5,h=r-5,d=s.handleClick(l,h);return null!==d}return!1}},{key:"getPreferredHeight",value:function(e,t){var i=e.rowIndex,r=e.colIndex,n="".concat(i,"-").concat(r),o=this.gridCache.get(n);if(o)return o.getRequiredHeight();var a=t.value,s=t.displayRows;if(!a||0===a.length)return 50;var l=e.grid.rowHeight||28,h=s&&!t.expanded?Math.min(s,a.length):a.length,d=s&&a.length>s&&!t.expanded,u=d?30:0;return h*l+u+10}},{key:"getNestedGrid",value:function(e,t){return this.gridCache.get("".concat(e,"-").concat(t))}},{key:"clearCache",value:function(e,t){void 0!==e&&void 0!==t?this.gridCache.delete("".concat(e,"-").concat(t)):this.gridCache.clear()}}])}(),Wn=Ln,zn=function(){function e(){wt(this,e),B(this,"type","tree-dropdown")}return mt(e,[{key:"draw",value:function(e,t){var i=this.getPathLabels(t);0!==i.length?this.drawPathTags(e,t,i):this.drawEmptyState(e,t)}},{key:"getPathLabels",value:function(e){var t=this,i=e.value,r=e.pathSeparator,n=void 0===r?"/":r,o=e.showFullPath,a=void 0===o||o;return null===i||void 0===i||""===i?[]:Array.isArray(i)?0===i.length?[]:i.map(function(e){if("string"===typeof e)return a?e:t.getLastSegment(e,n);if(e&&"object"===P(e)){var i,r=e.path||e.label||String(null!==(i=e.value)&&void 0!==i?i:"");return a?r:t.getLastSegment(r,n)}return String(e)}):"string"===typeof i?[a?i:this.getLastSegment(i,n)]:[String(i)]}},{key:"getLastSegment",value:function(e,t){var i=e.split(t);return i[i.length-1]||e}},{key:"drawEmptyState",value:function(e,t){var i=e.painter,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height,l=t.placeholder||"-";i.drawCellText(l,n,o,a,s,10,{color:"#bbb",align:"left",baseLine:"middle"})}},{key:"drawPathTags",value:function(e,t,i){var r=this,n=e.ctx,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=10,u=8,c=24,f=s+(h-c)/2,v=l-2*d;n.save(),n.font='13px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var g,y,p=i.length,w=i.map(function(e){return r.calculateTagWidth(n,e)}),x=w.reduce(function(e,t){return e+t},0)+u*(p-1),m=n.measureText("中").width,b=n.measureText("...").width,k=8,C=m+b+2*k;if(x<=v)g=fe(w),y=p;else{var S=u*(p-1),I=v-S,T=w.reduce(function(e,t){return e+t},0),A=I/T,R=w.every(function(e){return e*A>=C});if(R)g=w.map(function(e){return e*A}),y=p;else{y=p,g=w.map(function(e){return e*A});var D,E=function(){y--;var e=w.slice(0,y),t=u*(y-1),i=v-t,r=e.reduce(function(e,t){return e+t},0);if(r<=i)return g=fe(e),0;var n=i/r,o=e.every(function(e){return e*n>=C});return o?(g=e.map(function(e){return e*n}),0):void 0};while(y>1)if(D=E(),0===D)break;1===y&&(g=[Math.min(v,w[0])])}}for(var P=a+d,O=0;O<y;O++)this.drawPathTag(e,t,i[O],P,f,g[O],c),P+=g[O]+u;n.restore()}},{key:"calculateTagWidth",value:function(e,t){var i=e.measureText(t).width;return Math.min(i+16,160)}},{key:"drawPathTag",value:function(e,t,i,r,n,o,a){var s=e.ctx,l=t.tagBackgroundColor||"#F5F5F5",h=t.tagBorderColor||"#D9D9D9",d=t.tagColor||"#333",u=4,c=8;s.save(),s.font='13px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var f=s.measureText(i).width,v=Math.min(f+2*c,o);this.drawRoundedRect(s,r,n,v,a,u,l),this.drawRoundedRectBorder(s,r,n,v,a,u,h),s.fillStyle=d,s.textAlign="center",s.textBaseline="middle";var g=this.truncateText(s,i,v-2*c);s.fillText(g,r+v/2,n+a/2),s.restore()}},{key:"drawRoundedRect",value:function(e,t,i,r,n,o,a){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.fillStyle=a,e.fill()}},{key:"drawRoundedRectBorder",value:function(e,t,i,r,n,o,a){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.strokeStyle=a,e.lineWidth=1,e.stroke()}},{key:"truncateText",value:function(e,t,i){if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>1&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),Nn=zn;i(8156);(function(e){e["APPROVED"]="approved",e["REFUSED"]="refused"})(gn||(gn={})),function(e){e["DEFAULT"]="rgba(255, 255, 255, 0.1)",e["PREVIOUS"]="rgba(255, 255, 255, 0.32)",e["TODAY_PROCESSING"]="#3f9eff",e["TODAY_APPROVED"]="#23d0a1",e["TODAY_REJECTED"]="#f86322"}(yn||(yn={}));var Vn=12,_n=4,jn=4,Yn=4,Gn=10,Xn=40,Un=6,qn=14,Kn=8;function Jn(e){if(!e)return"-";var t=new Date(e),i=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0"),n=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0");return"".concat(i,"-").concat(r," ").concat(n,":").concat(o)}function Qn(e){if(!e)return"-";var t=new Date(e),i=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=String(t.getHours()).padStart(2,"0"),a=String(t.getMinutes()).padStart(2,"0");return"".concat(i,"-").concat(r,"-").concat(n," ").concat(o,":").concat(a)}function Zn(e){var t=new Date(e),i=new Date;return t.getFullYear()===i.getFullYear()&&t.getMonth()===i.getMonth()&&t.getDate()===i.getDate()}var $n=function(){function e(){wt(this,e),B(this,"type","punch")}return mt(e,[{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height,l=t.value||{},h=t.canEdit,d=void 0!==h&&h,u=t.showLineThrow,c=void 0!==u&&u,f=t.error,v=l.created_date||0,g=l.progress||0,y=l.review_status||"",p=!!(l.punch_id&&l.punch_id>0),w=void 0===l.is_read||l.is_read;i.save();var x=d?Xn:0,m=a-x;if(p){var b=n+Gn+Vn,k=o+s/2,C=this.getRingColor(v,y);this.drawPercentRing(i,b,k,Vn,_n,g,C),Zn(v)&&this.drawReviewIcon(i,b,k,y,C);var S="".concat(Math.round(100*Math.min(g,1)),"%");i.font='bold 10px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',i.fillStyle=C,i.textAlign="left",i.textBaseline="middle";var I=n+Gn+2*Vn+jn,T=i.measureText(S).width;i.fillText(S,I,o+s/2);var A=I+T+Yn,R=n+m-A-4;this.drawDateText(i,t,v,A,o,R,s,p)}else this.drawDateText(i,t,v,n+Gn,o,m-2*Gn,s,p);d&&this.drawAfterIcons(i,n+a-Xn,o,Xn,s,e.isHoverCell),c&&this.drawStrikethrough(i,n,o,m,s),f&&this.drawErrorIcon(i,n+a-(d?Xn+16:16),o+4),p&&!w&&this.drawHintDot(i,n+a-x-4,o+4),i.restore()}},{key:"onClick",value:function(e,t,i,r){var n=e.bounds,o=n.width,a=n.height,s=t.canEdit,l=void 0!==s&&s,h=t.value||{},d=!!(h.punch_id&&h.punch_id>0);if(l){var u=o-Xn;if(i>=u&&i<=o){var c=a/2,f=u+6,v=f+qn+Kn;if(i>=f&&i<=f+qn&&r>=c-qn/2&&r<=c+qn/2)return!0;if(i>=v&&i<=v+qn&&r>=c-qn/2&&r<=c+qn/2)return!0}}if(d){var g=l?Xn:0,y=o-g;if(i>=0&&i<=y)return!0}return!1}},{key:"getInteractiveCursor",value:function(e,t,i,r){if(e.readonly)return null;var n=e.bounds,o=n.width,a=n.height,s=t.canEdit,l=void 0!==s&&s,h=t.value||{},d=!!(h.punch_id&&h.punch_id>0);if(l){var u=o-Xn;if(i>=u&&i<=o&&r>=a/2-qn/2&&r<=a/2+qn/2)return"pointer"}if(d){var c=l?Xn:0;if(i>=0&&i<=o-c)return"pointer"}return null}},{key:"getRingColor",value:function(e,t){return Zn(e)?t===gn.APPROVED?yn.TODAY_APPROVED:t===gn.REFUSED?yn.TODAY_REJECTED:yn.TODAY_PROCESSING:yn.PREVIOUS}},{key:"drawPercentRing",value:function(e,t,i,r,n,o,a){var s=r-n/2;if(e.beginPath(),e.arc(t,i,s,0,2*Math.PI),e.strokeStyle=yn.DEFAULT,e.lineWidth=n,e.lineCap="round",e.stroke(),o>0){var l=-Math.PI/2,h=l+2*Math.PI*Math.min(o,1);e.beginPath(),e.arc(t,i,s,l,h),e.strokeStyle=a,e.lineWidth=n,e.lineCap="round",e.stroke()}}},{key:"drawReviewIcon",value:function(e,t,i,r,n){r===gn.APPROVED?(e.strokeStyle=n,e.lineWidth=1.5,e.lineCap="round",e.lineJoin="round",e.beginPath(),e.moveTo(t-4,i),e.lineTo(t-1,i+3),e.lineTo(t+4,i-3),e.stroke()):r===gn.REFUSED&&(e.strokeStyle=n,e.lineWidth=1.5,e.lineCap="round",e.beginPath(),e.moveTo(t-3,i-3),e.lineTo(t+3,i+3),e.moveTo(t+3,i-3),e.lineTo(t-3,i+3),e.stroke())}},{key:"drawDateText",value:function(e,t,i,r,n,o,a,s){if(e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textBaseline="middle",e.textAlign="left",s){var h;h="punch_record"===t.key&&t.datePattern===l.ABSOLUTE?Qn(i):Jn(i),e.fillStyle="#121315";var d=this.truncateText(e,h,o);e.fillText(d,r,n+a/2)}else e.fillStyle="#121315",e.fillText("-",r,n+a/2)}},{key:"drawHintDot",value:function(e,t,i){e.beginPath(),e.arc(t,i+Un/2,Un/2,0,2*Math.PI),e.fillStyle=yn.TODAY_APPROVED,e.fill()}},{key:"drawAfterIcons",value:function(e,t,i,r,n,o){if(o){var a=i+n/2,s=t+6,l=s+qn+Kn;this.drawListIcon(e,s,a-qn/2,qn,"#8c8c8c"),this.drawEditIcon(e,l,a-qn/2,qn,"#8c8c8c")}}},{key:"drawListIcon",value:function(e,t,i,r,n){e.save(),e.strokeStyle=n,e.lineWidth=1.5,e.lineCap="round";for(var o=t+2,a=t+r-2,s=(r-4)/2,l=0;l<3;l++){var h=i+3+s*l;e.beginPath(),e.moveTo(o,h),e.lineTo(a,h),e.stroke()}e.restore()}},{key:"drawEditIcon",value:function(e,t,i,r,n){e.save(),e.strokeStyle=n,e.fillStyle=n,e.lineWidth=1.2,e.lineCap="round",e.lineJoin="round";var o=2,a=t+o,s=i+r-o,l=t+r-o,h=i+o;e.beginPath(),e.moveTo(a+2,s-2),e.lineTo(l-1,h+1),e.stroke(),e.beginPath(),e.moveTo(a,s),e.lineTo(a+3,s-1),e.lineTo(a+1,s-3),e.closePath(),e.fill(),e.restore()}},{key:"drawStrikethrough",value:function(e,t,i,r,n){e.save(),e.strokeStyle="#999",e.lineWidth=1,e.beginPath(),e.moveTo(t+4,i+n/2),e.lineTo(t+r-4,i+n/2),e.stroke(),e.restore()}},{key:"drawErrorIcon",value:function(e,t,i){var r=12,n=t+r/2;e.save(),e.fillStyle="#ff4d4f",e.beginPath(),e.moveTo(n,i),e.lineTo(t+r,i+r),e.lineTo(t,i+r),e.closePath(),e.fill(),e.fillStyle="#fff",e.font='bold 8px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textAlign="center",e.textBaseline="middle",e.fillText("!",n,i+.65*r),e.restore()}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),eo=$n,to=10,io=10,ro=30,no=20,oo=14,ao=12,so="#3f9eff",lo="#1a7ee6",ho="#bbb",uo="#3f9eff",co=function(){function e(){wt(this,e),B(this,"type","hyperlink")}return mt(e,[{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height,l=t.canEdit,h=void 0!==l&&l,d=t.showLineThrow,u=void 0!==d&&d,c=t.error,f=t.isLink,v=void 0!==f&&f,g=this.parseValue(t.value);i.save();var y=h?ro:0,p=v?no:0,w=a-y-p;if(v&&this.drawLinkIcon(i,n+w,o,no,s),this.drawHyperLinkText(i,g,n,o,w,s,e.isHoverCell),h&&this.drawEditButton(i,n+a-ro,o,ro,s,e.isHoverCell),u&&this.drawStrikethrough(i,n,o,w,s),c){var x=n+a-(h?ro+ao+4:ao+4);this.drawErrorIcon(i,x,o+4)}i.restore()}},{key:"onClick",value:function(e,t,i,r){var n=e.bounds.width,o=t.canEdit,a=void 0!==o&&o,s=t.isLink,l=void 0!==s&&s,h=this.parseValue(t.value);if(a){var d=n-ro;if(i>=d&&i<=n)return!0}if(l){var u=a?ro:0,c=no,f=n-u-c;if(i>=f&&i<=f+c)return!0}if(h.available){var v=e.ctx,g=e.bounds.height,y=a?ro:0,p=l?no:0,w=n-y-p,x=w-to-io;v.save(),v.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var m=this.truncateText(v,h.text,x),b=v.measureText(m).width;v.restore();var k=to,C=k+b,S=g/2,I=8;if(i>=k&&i<=C&&r>=S-I&&r<=S+I)return h.href&&window.open(h.href,"_blank"),!0}return!1}},{key:"getInteractiveCursor",value:function(e,t,i,r){if(e.readonly)return null;var n=e.bounds.width,o=t.canEdit,a=void 0!==o&&o,s=t.isLink,l=void 0!==s&&s,h=this.parseValue(t.value);if(a){var d=n-ro;if(i>=d&&i<=n)return"pointer"}if(l){var u=a?ro:0,c=no,f=n-u-c;if(i>=f&&i<=f+c)return"pointer"}if(h.available){var v=e.ctx,g=e.bounds.height,y=a?ro:0,p=l?no:0,w=n-y-p,x=w-to-io;v.save(),v.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var m=this.truncateText(v,h.text,x),b=v.measureText(m).width;v.restore();var k=to,C=k+b,S=g/2,I=8;if(i>=k&&i<=C&&r>=S-I&&r<=S+I)return"pointer"}return null}},{key:"parseValue",value:function(e){return Array.isArray(e)&&e.length>0?{text:e[0],href:e[1],available:!0}:{text:A,href:"",available:!1}}},{key:"drawHyperLinkText",value:function(e,t,i,r,n,o,a){e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textBaseline="middle",e.textAlign="left";var s=i+to,l=r+o/2,h=n-to-io;if(t.available){e.fillStyle=a?lo:so;var d=this.truncateText(e,t.text,h);e.fillText(d,s,l);var u=e.measureText(d).width;e.strokeStyle=a?lo:uo,e.lineWidth=1,e.beginPath(),e.moveTo(s,l+7),e.lineTo(s+u,l+7),e.stroke()}else e.fillStyle=ho,e.fillText(A,s,l)}},{key:"drawEditButton",value:function(e,t,i,r,n,o){if(o){var a=t+r/2,s=i+n/2;this.drawEditIcon(e,a-oo/2,s-oo/2,oo,"#8c8c8c")}}},{key:"drawEditIcon",value:function(e,t,i,r,n){e.save(),e.strokeStyle=n,e.fillStyle=n,e.lineWidth=1.2,e.lineCap="round",e.lineJoin="round";var o=2,a=t+o,s=i+r-o,l=t+r-o,h=i+o;e.beginPath(),e.moveTo(a+2,s-2),e.lineTo(l-1,h+1),e.stroke(),e.beginPath(),e.moveTo(a,s),e.lineTo(a+3,s-1),e.lineTo(a+1,s-3),e.closePath(),e.fill(),e.restore()}},{key:"drawLinkIcon",value:function(e,t,i,r,n){var o=t+r/2,a=i+n/2,s=12;e.save(),e.strokeStyle="#8c8c8c",e.lineWidth=1.5,e.lineCap="round",e.lineJoin="round";var l=s/2,h=2;e.beginPath(),e.moveTo(o-h,a),e.lineTo(o-h,a-l+2),e.quadraticCurveTo(o-h,a-l,o-h+2,a-l),e.lineTo(o+h-2,a-l),e.quadraticCurveTo(o+h,a-l,o+h,a-l+2),e.lineTo(o+h,a),e.stroke(),e.beginPath(),e.moveTo(o-h,a),e.lineTo(o-h,a+l-2),e.quadraticCurveTo(o-h,a+l,o-h+2,a+l),e.lineTo(o+h-2,a+l),e.quadraticCurveTo(o+h,a+l,o+h,a+l-2),e.lineTo(o+h,a),e.stroke(),e.restore()}},{key:"drawStrikethrough",value:function(e,t,i,r,n){e.save(),e.strokeStyle="#999",e.lineWidth=1,e.beginPath(),e.moveTo(t+4,i+n/2),e.lineTo(t+r-4,i+n/2),e.stroke(),e.restore()}},{key:"drawErrorIcon",value:function(e,t,i){var r=ao,n=t+r/2;e.save(),e.fillStyle="#ff4d4f",e.beginPath(),e.moveTo(n,i),e.lineTo(t+r,i+r),e.lineTo(t,i+r),e.closePath(),e.fill(),e.fillStyle="#fff",e.font='bold 8px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textAlign="center",e.textBaseline="middle",e.fillText("!",n,i+.65*r),e.restore()}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),fo=co,vo=10,go=10,yo=16,po=24,wo=4,xo=4,mo=8,bo=2,ko="#e6eaf0",Co=30,So=20,Io=14,To=12,Ao=3,Ro=80,Do="#333",Eo="#bbb",Po="#8c8c8c",Oo="#999",Mo=function(){function e(){wt(this,e),B(this,"type","file"),B(this,"imageManager",void 0),B(this,"failedImages",new Set),this.imageManager=ni.getInstance()}return mt(e,[{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=e.isHoverCell,o=r.x,a=r.y,s=r.width,l=r.height,h=t.canEdit,d=void 0!==h&&h,u=t.showLineThrow,c=void 0!==u&&u,f=t.error,v=t.isLink,g=void 0!==v&&v,y=this.parseValue(t.value);i.save();var p=this.calculateLayout(i,y,s,l,d,g);if(y.length>0?this.drawFileItems(i,e,y,p,o,a,l,t):this.drawEmptyPlaceholder(i,o,a,p.middle.width,l),g&&p.linkIcon&&this.drawLinkIcon(i,o+p.linkIcon.x,a,So,l),p.after&&n&&this.drawAfterArea(i,o+p.after.x,a,p.after.width,l,d,f),c&&this.drawStrikethrough(i,o,a,p.middle.width,l),f&&p.after){var w=o+p.after.x-To-4;this.drawErrorIcon(i,w,a+4)}i.restore()}},{key:"onClick",value:function(e,t,i,r){var n=e.ctx,o=e.bounds,a=o.width,s=o.height,l=t.canEdit,h=void 0!==l&&l,d=t.isLink,u=void 0!==d&&d,c=this.parseValue(t.value),f=this.calculateLayout(n,c,a,s,h,u);return!(!f.after||!this.isInArea(i,r,f.after))||(!!(u&&f.linkIcon&&this.isInArea(i,r,f.linkIcon))||!!this.isInArea(i,r,f.middle))}},{key:"onDblClick",value:function(e,t,i,r){var n=e.ctx,o=e.bounds,a=o.width,s=o.height,l=t.canEdit,h=void 0!==l&&l,d=t.isLink,u=void 0!==d&&d,c=this.parseValue(t.value);if(0===c.length)return!1;for(var f=this.calculateLayout(n,c,a,s,h,u),v=0;v<f.fileItems.length;v++){var g=f.fileItems[v];if(this.isInArea(i,r,g.bounds)){c[v];return!0}}return!1}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n=e.ctx,o=e.bounds,a=o.width,s=o.height,l=t.canEdit,h=void 0!==l&&l,d=t.isLink,u=void 0!==d&&d,c=this.parseValue(t.value),f=this.calculateLayout(n,c,a,s,h,u);return f.after&&this.isInArea(i,r,f.after)||u&&f.linkIcon&&this.isInArea(i,r,f.linkIcon)||c.length>0&&this.isInArea(i,r,f.middle)?"pointer":null}},{key:"parseValue",value:function(e){return e&&Array.isArray(e)?e:[]}},{key:"calculateLayout",value:function(e,t,i,r,n,o){var a=Co,s=o?So:0,l=a+s,h=i-l,d={middle:{x:0,y:0,width:h,height:r},fileItems:[],after:{x:i-a,y:0,width:a,height:r},linkIcon:o?{x:i-a-s,y:0,width:s,height:r}:null};if(t.length>0)for(var u=vo,c=h-go,f=0;f<t.length;f++){if(u>=c)break;var v=t[f],g=u;u+=mo;var y=u,p=(r-yo)/2;u+=yo;var w=null,x=v.name||"";if(x){e.save(),e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var m=Math.min(e.measureText(x).width,Ro,c-u-wo-mo);e.restore(),m>0&&(u+=wo,w={x:u,y:(r-12)/2,width:m,height:12},u+=m)}u+=mo;var b=u-g;d.fileItems.push({bounds:{x:g,y:0,width:b,height:r},thumbnail:{x:y,y:p,width:yo,height:yo},fileName:w}),u+=xo}return d}},{key:"isInArea",value:function(e,t,i){return e>=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height}},{key:"drawFileItemBackground",value:function(e,t,i,r,n){var o=po,a=i+(n-o)/2;e.save(),e.fillStyle=ko,e.beginPath(),e.moveTo(t+bo,a),e.lineTo(t+r-bo,a),e.quadraticCurveTo(t+r,a,t+r,a+bo),e.lineTo(t+r,a+o-bo),e.quadraticCurveTo(t+r,a+o,t+r-bo,a+o),e.lineTo(t+bo,a+o),e.quadraticCurveTo(t,a+o,t,a+o-bo),e.lineTo(t,a+bo),e.quadraticCurveTo(t,a,t+bo,a),e.closePath(),e.fill(),e.restore()}},{key:"drawEmptyPlaceholder",value:function(e,t,i,r,n){e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textBaseline="middle",e.textAlign="left",e.fillStyle=Eo,e.fillText(A,t+vo,i+n/2)}},{key:"drawFileItems",value:function(e,t,i,r,n,o,a,s){for(var l,h=null!==(l=s.isDisplayThumbnail)&&void 0!==l&&l,d=0;d<r.fileItems.length;d++){var u=i[d],c=r.fileItems[d];this.drawFileItemBackground(e,n+c.bounds.x,o,c.bounds.width,a);var f=n+c.thumbnail.x,v=o+c.thumbnail.y;if(this.drawThumbnail(e,t,u,f,v),!h&&c.fileName){var g=n+c.fileName.x,y=o+a/2;this.drawFileName(e,u.name||"",g,y,c.fileName.width)}}}},{key:"drawThumbnail",value:function(e,t,i,r,n){i.previewUrl?this.drawPreviewImage(e,t,i,r,n):this.drawIconByFileStatus(e,t,r,n,i.status,i.fileFormat)}},{key:"drawIconByFileStatus",value:function(e,t,i,r,n,o){var a=ct(n,o);this.drawSvgIcon(e,t,a,i,r)}},{key:"drawSvgIcon",value:function(e,t,i,r,n){var o,a=this.imageManager.getCachedImage(i);a?e.drawImage(a,r,n,yo,yo):null!==(o=this.imageManager.loadingImages)&&void 0!==o&&o.has(i)||this.imageManager.loadImage(i).then(function(){t.requestRedraw()}).catch(function(){})}},{key:"drawPreviewImage",value:function(e,t,i,r,n){var o=this,a=i.previewUrl;if(this.failedImages.has(a))this.drawIconByFileStatus(e,t,r,n,i.status,i.fileFormat);else{var s=this.imageManager.getCachedImage(a);if(s){e.save(),this.clipRoundRect(e,r,n,yo,yo,Ao);var l,h,d,u,c=s.width/s.height;c>1?(h=yo,l=yo*c,d=r-(l-yo)/2,u=n):(l=yo,h=yo/c,d=r,u=n-(h-yo)/2),e.drawImage(s,d,u,l,h),e.restore()}else{var f;null!==(f=this.imageManager.loadingImages)&&void 0!==f&&f.has(a)||this.imageManager.loadImage(a).then(function(){t.requestRedraw()}).catch(function(){o.failedImages.add(a),t.requestRedraw()}),this.drawIconByFileStatus(e,t,r,n,i.status,i.fileFormat)}}}},{key:"drawFileName",value:function(e,t,i,r,n){if(t){e.save(),e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textBaseline="middle",e.textAlign="left",e.fillStyle=Do;var o=this.truncateText(e,t,n);e.fillText(o,i,r),e.restore()}}},{key:"drawAfterArea",value:function(e,t,i,r,n,o,a){var s=t+r/2,l=i+n/2;o?a||this.drawEditIcon(e,s-Io/2,l-Io/2,Io,Po):this.drawViewIcon(e,s-Io/2,l-Io/2,Io,Po)}},{key:"drawEditIcon",value:function(e,t,i,r,n){e.save(),e.strokeStyle=n,e.fillStyle=n,e.lineWidth=1.2,e.lineCap="round",e.lineJoin="round";var o=2,a=t+o,s=i+r-o,l=t+r-o,h=i+o;e.beginPath(),e.moveTo(a+2,s-2),e.lineTo(l-1,h+1),e.stroke(),e.beginPath(),e.moveTo(a,s),e.lineTo(a+3,s-1),e.lineTo(a+1,s-3),e.closePath(),e.fill(),e.restore()}},{key:"drawViewIcon",value:function(e,t,i,r,n){e.save(),e.strokeStyle=n,e.lineWidth=1.5,e.lineCap="round";for(var o=2,a=t+o,s=t+r-o,l=(r-2*o)/3,h=0;h<3;h++){var d=i+o+l*h+l/2;e.beginPath(),e.moveTo(a,d),e.lineTo(s,d),e.stroke()}e.restore()}},{key:"drawLinkIcon",value:function(e,t,i,r,n){var o=t+r/2,a=i+n/2,s=12;e.save(),e.strokeStyle=Po,e.lineWidth=1.5,e.lineCap="round",e.lineJoin="round";var l=s/2,h=2;e.beginPath(),e.moveTo(o-h,a),e.lineTo(o-h,a-l+2),e.quadraticCurveTo(o-h,a-l,o-h+2,a-l),e.lineTo(o+h-2,a-l),e.quadraticCurveTo(o+h,a-l,o+h,a-l+2),e.lineTo(o+h,a),e.stroke(),e.beginPath(),e.moveTo(o-h,a),e.lineTo(o-h,a+l-2),e.quadraticCurveTo(o-h,a+l,o-h+2,a+l),e.lineTo(o+h-2,a+l),e.quadraticCurveTo(o+h,a+l,o+h,a+l-2),e.lineTo(o+h,a),e.stroke(),e.restore()}},{key:"drawStrikethrough",value:function(e,t,i,r,n){e.save(),e.strokeStyle=Oo,e.lineWidth=1,e.beginPath(),e.moveTo(t+4,i+n/2),e.lineTo(t+r-4,i+n/2),e.stroke(),e.restore()}},{key:"drawErrorIcon",value:function(e,t,i){var r=To,n=t+r/2;e.save(),e.fillStyle="#ff4d4f",e.beginPath(),e.moveTo(n,i),e.lineTo(t+r,i+r),e.lineTo(t,i+r),e.closePath(),e.fill(),e.fillStyle="#fff",e.font='bold 8px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textAlign="center",e.textBaseline="middle",e.fillText("!",n,i+.65*r),e.restore()}},{key:"clipRoundRect",value:function(e,t,i,r,n,o){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.clip()}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),Bo=Mo,Ho=i.p+"img/icon_folder.ea3efcce.svg",Fo=10,Lo=10,Wo=16,zo=4,No=4,Vo=8,_o=24,jo=2,Yo="#e6eaf0",Go=30,Xo=20,Uo=14,qo=12,Ko=80,Jo="#333",Qo="#bbb",Zo="#8c8c8c",$o="#999",ea="#ff4d4f",ta="#faad14",ia=Ho,ra=function(){function e(){wt(this,e),B(this,"type","task-node"),B(this,"imageManager",void 0),B(this,"failedIcons",new Set),this.imageManager=ni.getInstance()}return mt(e,[{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=e.isHoverCell,o=r.x,a=r.y,s=r.width,l=r.height,h=t.canEdit,d=void 0!==h&&h,u=t.showLineThrow,c=void 0!==u&&u,f=t.error,v=t.isLink,g=void 0!==v&&v,y=this.parseValue(t);i.save();var p=this.calculateLayout(i,y,s,l,g);if(y.length>0?this.drawTaskNodes(i,e,y,p,o,a,l):this.drawEmptyPlaceholder(i,o,a,p.middle.width,l),g&&p.linkIcon&&this.drawLinkIcon(i,o+p.linkIcon.x,a,Xo,l),p.after&&n&&!g&&this.drawAfterArea(i,o+p.after.x,a,p.after.width,l,d,f),c&&this.drawStrikethrough(i,o,a,p.middle.width,l),f&&p.after){var w=o+p.after.x-qo-4;this.drawErrorIcon(i,w,a+4,f.is_warning)}i.restore()}},{key:"onClick",value:function(e,t,i,r){var n=e.ctx,o=e.bounds,a=o.width,s=o.height,l=t.isLink,h=void 0!==l&&l,d=this.parseValue(t),u=this.calculateLayout(n,d,a,s,h);return!(!u.after||h||!this.isInArea(i,r,u.after))||(!!(h&&u.linkIcon&&this.isInArea(i,r,u.linkIcon))||!!(d.length>0&&this.isInArea(i,r,u.middle)))}},{key:"onDblClick",value:function(e,t,i,r){var n=e.ctx,o=e.bounds,a=o.width,s=o.height,l=t.isLink,h=void 0!==l&&l,d=this.parseValue(t);if(0===d.length)return!1;for(var u=this.calculateLayout(n,d,a,s,h),c=0;c<u.nodeItems.length;c++){var f=u.nodeItems[c];if(this.isInArea(i,r,f.bounds)){d[c];return!0}}return!1}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n=e.ctx,o=e.bounds,a=o.width,s=o.height,l=t.isLink,h=void 0!==l&&l,d=this.parseValue(t),u=this.calculateLayout(n,d,a,s,h);return u.after&&!h&&this.isInArea(i,r,u.after)||h&&u.linkIcon&&this.isInArea(i,r,u.linkIcon)||d.length>0&&this.isInArea(i,r,u.middle)?"pointer":null}},{key:"parseValue",value:function(e){var t=e.value,i=e.customTaskNodeInfo;if(null===t||void 0===t)return[];if(Array.isArray(t))return t;if("string"===typeof t){if(""===t)return[];var r=t.split(",").map(function(e){return parseInt(e.trim(),10)}).filter(function(e){return!isNaN(e)});return this.resolveNodesByIds(r,i)}return"number"===typeof t?this.resolveNodesByIds([t],i):[]}},{key:"resolveNodesByIds",value:function(e,t){var i,r=[],n=pt(e);try{for(n.s();!(i=n.n()).done;){var o=i.value;if(t&&t[o]){var a=t[o];r.push({id:o,name:a.name,iconFile:a.iconFile})}else r.push({id:o,name:String(o)})}}catch(s){n.e(s)}finally{n.f()}return r}},{key:"calculateLayout",value:function(e,t,i,r,n){var o=Go,a=n?Xo:0,s=o+a,l=i-s,h={middle:{x:0,y:0,width:l,height:r},nodeItems:[],after:{x:i-o,y:0,width:o,height:r},linkIcon:n?{x:i-o-a,y:0,width:a,height:r}:null};if(t.length>0)for(var d=Fo,u=l-Lo,c=0;c<t.length;c++){if(d>=u)break;var f=t[c],v=d;d+=Vo;var g=d,y=(r-Wo)/2;d+=Wo;var p=null,w=f.name||"";if(w){e.save(),e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';var x=Math.min(e.measureText(w).width,Ko,u-d-zo-Vo);e.restore(),x>0&&(d+=zo,p={x:d,y:(r-12)/2,width:x,height:12},d+=x)}d+=Vo;var m=d-v;h.nodeItems.push({bounds:{x:v,y:0,width:m,height:r},icon:{x:g,y:y,width:Wo,height:Wo},name:p}),d+=No}return h}},{key:"isInArea",value:function(e,t,i){return e>=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height}},{key:"drawNodeItemBackground",value:function(e,t,i,r,n){var o=_o,a=i+(n-o)/2;e.save(),e.fillStyle=Yo,e.beginPath(),e.moveTo(t+jo,a),e.lineTo(t+r-jo,a),e.quadraticCurveTo(t+r,a,t+r,a+jo),e.lineTo(t+r,a+o-jo),e.quadraticCurveTo(t+r,a+o,t+r-jo,a+o),e.lineTo(t+jo,a+o),e.quadraticCurveTo(t,a+o,t,a+o-jo),e.lineTo(t,a+jo),e.quadraticCurveTo(t,a,t+jo,a),e.closePath(),e.fill(),e.restore()}},{key:"drawEmptyPlaceholder",value:function(e,t,i,r,n){e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textBaseline="middle",e.textAlign="left",e.fillStyle=Qo,e.fillText(A,t+Fo,i+n/2)}},{key:"drawTaskNodes",value:function(e,t,i,r,n,o,a){for(var s=0;s<r.nodeItems.length;s++){var l=i[s],h=r.nodeItems[s];this.drawNodeItemBackground(e,n+h.bounds.x,o,h.bounds.width,a);var d=n+h.icon.x,u=o+h.icon.y;if(this.drawNodeIcon(e,t,l,d,u),h.name){var c=n+h.name.x,f=o+a/2;this.drawNodeName(e,l.name||"",c,f,h.name.width)}}}},{key:"drawNodeIcon",value:function(e,t,i,r,n){var o=i.iconFile,a=o||ia;o&&this.failedIcons.has(a)?this.drawSvgIcon(e,t,ia,r,n):this.drawSvgIcon(e,t,a,r,n)}},{key:"drawSvgIcon",value:function(e,t,i,r,n){var o,a=this,s=this.imageManager.getCachedImage(i);s?e.drawImage(s,r,n,Wo,Wo):null!==(o=this.imageManager.loadingImages)&&void 0!==o&&o.has(i)||this.imageManager.loadImage(i).then(function(){t.requestRedraw()}).catch(function(){a.failedIcons.add(i),t.requestRedraw()})}},{key:"drawNodeName",value:function(e,t,i,r,n){if(t){e.save(),e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textBaseline="middle",e.textAlign="left",e.fillStyle=Jo;var o=this.truncateText(e,t,n);e.fillText(o,i,r),e.restore()}}},{key:"drawAfterArea",value:function(e,t,i,r,n,o,a){var s=t+r/2,l=i+n/2;o?a||this.drawEditIcon(e,s-Uo/2,l-Uo/2,Uo,Zo):this.drawViewIcon(e,s-Uo/2,l-Uo/2,Uo,Zo)}},{key:"drawEditIcon",value:function(e,t,i,r,n){e.save(),e.strokeStyle=n,e.fillStyle=n,e.lineWidth=1.2,e.lineCap="round",e.lineJoin="round";var o=2,a=t+o,s=i+r-o,l=t+r-o,h=i+o;e.beginPath(),e.moveTo(a+2,s-2),e.lineTo(l-1,h+1),e.stroke(),e.beginPath(),e.moveTo(a,s),e.lineTo(a+3,s-1),e.lineTo(a+1,s-3),e.closePath(),e.fill(),e.restore()}},{key:"drawViewIcon",value:function(e,t,i,r,n){e.save(),e.strokeStyle=n,e.lineWidth=1.5,e.lineCap="round";for(var o=2,a=t+o,s=t+r-o,l=(r-2*o)/3,h=0;h<3;h++){var d=i+o+l*h+l/2;e.beginPath(),e.moveTo(a,d),e.lineTo(s,d),e.stroke()}e.restore()}},{key:"drawLinkIcon",value:function(e,t,i,r,n){var o=t+r/2,a=i+n/2,s=12;e.save(),e.strokeStyle=Zo,e.lineWidth=1.5,e.lineCap="round",e.lineJoin="round";var l=s/2,h=2;e.beginPath(),e.moveTo(o-h,a),e.lineTo(o-h,a-l+2),e.quadraticCurveTo(o-h,a-l,o-h+2,a-l),e.lineTo(o+h-2,a-l),e.quadraticCurveTo(o+h,a-l,o+h,a-l+2),e.lineTo(o+h,a),e.stroke(),e.beginPath(),e.moveTo(o-h,a),e.lineTo(o-h,a+l-2),e.quadraticCurveTo(o-h,a+l,o-h+2,a+l),e.lineTo(o+h-2,a+l),e.quadraticCurveTo(o+h,a+l,o+h,a+l-2),e.lineTo(o+h,a),e.stroke(),e.restore()}},{key:"drawStrikethrough",value:function(e,t,i,r,n){e.save(),e.strokeStyle=$o,e.lineWidth=1,e.beginPath(),e.moveTo(t+4,i+n/2),e.lineTo(t+r-4,i+n/2),e.stroke(),e.restore()}},{key:"drawErrorIcon",value:function(e,t,i,r){var n=qo,o=t+n/2,a=r?ta:ea;e.save(),e.fillStyle=a,e.beginPath(),e.moveTo(o,i),e.lineTo(t+n,i+n),e.lineTo(t,i+n),e.closePath(),e.fill(),e.fillStyle="#fff",e.font='bold 8px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textAlign="center",e.textBaseline="middle",e.fillText("!",o,i+.65*n),e.restore()}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),na=ra,oa=i.p+"img/ah-icon_audio_pause.55c06fbf.svg",aa=i.p+"img/ah-icon_closeshape.82e52181.svg",sa=i.p+"img/matrix-icon_finish.617f5d3e.svg",la=i.p+"img/matrix-icon_inprogress.3781156a.svg",ha=i.p+"img/matrix-icon_supervise.edae43f0.svg",da={"ah-icon_audio_pause":oa,"ah-icon_closeshape":aa,"matrix-icon_finish":sa,"matrix-icon_inprogress":la,"matrix-icon_supervise":ha},ua="matrix-icon_supervise",ca=14,fa=4,va=8,ga=13,ya=8,pa=.4,wa=1,xa="#C4C4C4",ma="#ABABAB",ba="-",ka=function(){function e(){wt(this,e),B(this,"type","wf-state"),B(this,"imageManager",void 0),B(this,"failedIcons",new Set),this.imageManager=ni.getInstance()}return mt(e,[{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height;i.save();var l=this.parseValue(t),h=t.displayName,d=t.icon||l,u=t.iconColor||xa,c=t.color||ma;if(h||null!==t.value)if(h){var f=n+va,v=o+(s-ca)/2;this.drawIcon(i,e,d,u,f,v);var g=f+ca+fa,y=a-2*va-ca-fa;this.drawText(i,h,g,o,s,y,c)}else this.drawPlaceholder(i,t,n,o,a,s);else this.drawPlaceholder(i,t,n,o,a,s);this.drawCorner(i,t,l,n,o,a,e),i.restore()}},{key:"onClick",value:function(e,t,i,r){var n=e.bounds,o=n.width,a=n.height;if(this.isInCornerArea(i,r,o)&&this.hasValidCorner(t))return!0;var s=t.displayName;if(s){var l=va+ca+fa+this.estimateTextWidth(s),h=(a-ga)/2,d=h+ga;if(i>=va&&i<=Math.min(l,o-va)&&r>=h&&r<=d)return!0}return!1}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n=e.bounds,o=n.width,a=n.height;if(this.isInCornerArea(i,r,o)&&this.hasValidCorner(t))return e.requestRedraw(),"pointer";var s=t.displayName;if(s){var l=va+ca+fa+this.estimateTextWidth(s),h=(a-ga)/2,d=h+ga;if(i>=va&&i<=Math.min(l,o-va)&&r>=h&&r<=d)return"pointer"}return null}},{key:"parseValue",value:function(e){if(e.stateType)return e.stateType;var t=e.value;if(null!==t&&void 0!==t)"number"===typeof t||(null===t||void 0===t||t.id)}},{key:"drawIcon",value:function(e,t,i,r,n,o){var a=i&&da[i]||da[ua];i&&this.failedIcons.has(i)?this.drawSvgIcon(e,t,da[ua],r,n,o):this.drawSvgIcon(e,t,a,r,n,o)}},{key:"drawSvgIcon",value:function(e,t,i,r,n,o){var a,s=this,l=this.imageManager.getCachedImage(i);l?this.drawTintedImage(e,l,r,n,o):null!==(a=this.imageManager.loadingImages)&&void 0!==a&&a.has(i)||this.imageManager.loadImage(i).then(function(){t.requestRedraw()}).catch(function(){s.failedIcons.add(i),t.requestRedraw()})}},{key:"drawTintedImage",value:function(e,t,i,r,n){var o=ca*Gr,a=document.createElement("canvas");a.width=o,a.height=o;var s=a.getContext("2d");s?(s.drawImage(t,0,0,o,o),s.globalCompositeOperation="source-in",s.fillStyle=i,s.fillRect(0,0,o,o),e.drawImage(a,r,n,ca,ca)):e.drawImage(t,r,n,ca,ca)}},{key:"drawText",value:function(e,t,i,r,n,o,a){e.font="".concat(ga,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),e.fillStyle=a,e.textAlign="left",e.textBaseline="middle";var s=this.truncateText(e,t,o);e.fillText(s,i,r+n/2)}},{key:"drawPlaceholder",value:function(e,t,i,r,n,o){var a=t.placeholder||ba;e.font="".concat(ga,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),e.fillStyle=ma,e.textAlign="left",e.textBaseline="middle",e.fillText(a,i+va,r+o/2)}},{key:"drawCorner",value:function(e,t,i,r,n,o,a){if(this.hasValidCorner(t)){var s=t.iconColor||ma,l=a.isHoverCell&&this.isInCornerAreaFromContext(a),h=l?wa:pa;e.save(),e.globalAlpha=h,e.fillStyle=s;var d=r+o-ya,u=n;e.beginPath(),e.moveTo(d,u),e.lineTo(d+ya,u),e.lineTo(d+ya,u+ya),e.closePath(),e.fill(),e.restore()}}},{key:"hasValidCorner",value:function(e){return!(!e.extraInfo||"object"!==P(e.extraInfo))&&(0!==Object.keys(e.extraInfo).length&&(null!==e.value&&void 0!==e.value))}},{key:"isInCornerArea",value:function(e,t,i){return e>=i-ya&&e<=i&&t>=0&&t<=ya}},{key:"isInCornerAreaFromContext",value:function(e){return e.isHoverCell}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}},{key:"estimateTextWidth",value:function(e){for(var t=0,i=0;i<e.length;i++)t+=e.charCodeAt(i)>127?ga:.6*ga;return t}}])}(),Ca=ka,Sa=8,Ia=13,Ta="#ABABAB",Aa="#333",Ra="-",Da=2,Ea='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Pa=function(){function e(){wt(this,e),B(this,"type","workflow")}return mt(e,[{key:"parseValue",value:function(e){var t=e.value;return t&&Array.isArray(t)?t.filter(function(e){return"string"===typeof e&&""!==e}):[]}},{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=e.isHoverCell,o=r.x,a=r.y,s=r.width,l=r.height;i.save();var h=this.parseValue(t);if(0===h.length)this.drawPlaceholder(i,t,o,a,s,l);else{var d=h.join(", "),u=s-2*Sa;i.font="".concat(Ia,"px ").concat(Ea),i.fillStyle=Aa,i.textAlign="left",i.textBaseline="middle";var c=this.truncateText(i,d,u),f=o+Sa,v=a+l/2;if(i.fillText(c,f,v),n){var g=Math.min(i.measureText(c).width,u),y=v+Ia/2+Da;i.strokeStyle=Aa,i.lineWidth=1,i.beginPath(),i.moveTo(f,y),i.lineTo(f+g,y),i.stroke()}}i.restore()}},{key:"onClick",value:function(e,t,i,r){var n=e.bounds,o=n.width,a=n.height,s=this.parseValue(t);if(0===s.length)return!1;var l=s.join(", "),h=Sa+this.estimateTextWidth(l),d=(a-Ia)/2,u=d+Ia;return i>=Sa&&i<=Math.min(h,o-Sa)&&r>=d&&r<=u}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n=e.bounds,o=n.width,a=n.height,s=this.parseValue(t);if(0===s.length)return null;var l=s.join(", "),h=Sa+this.estimateTextWidth(l),d=(a-Ia)/2,u=d+Ia;return i>=Sa&&i<=Math.min(h,o-Sa)&&r>=d&&r<=u?"pointer":null}},{key:"drawPlaceholder",value:function(e,t,i,r,n,o){var a=t.placeholder||Ra;e.font="".concat(Ia,"px ").concat(Ea),e.fillStyle=Ta,e.textAlign="left",e.textBaseline="middle",e.fillText(a,i+Sa,r+o/2)}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}},{key:"estimateTextWidth",value:function(e){for(var t=0,i=0;i<e.length;i++)t+=e.charCodeAt(i)>127?Ia:.6*Ia;return t}}])}(),Oa=Pa,Ma=8,Ba=13,Ha="#ABABAB",Fa="#333",La="-",Wa=2,za='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Na=function(){function e(){wt(this,e),B(this,"type","file-storage-spec")}return mt(e,[{key:"parseValue",value:function(e){var t=e.value;return null===t||void 0===t||""===t?null:String(t)}},{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=e.isHoverCell,o=r.x,a=r.y,s=r.width,l=r.height;i.save();var h=this.parseValue(t);if(null===h)this.drawPlaceholder(i,t,o,a,s,l);else{var d=s-2*Ma;i.font="".concat(Ba,"px ").concat(za),i.fillStyle=Fa,i.textAlign="left",i.textBaseline="middle";var u=this.truncateText(i,h,d),c=o+Ma,f=a+l/2;if(i.fillText(u,c,f),n){var v=Math.min(i.measureText(u).width,d),g=f+Ba/2+Wa;i.strokeStyle=Fa,i.lineWidth=1,i.beginPath(),i.moveTo(c,g),i.lineTo(c+v,g),i.stroke()}}i.restore()}},{key:"onDblClick",value:function(e,t,i,r){var n=e.bounds,o=n.width,a=n.height,s=this.parseValue(t);if(null===s)return!1;var l=Ma+this.estimateTextWidth(s),h=(a-Ba)/2,d=h+Ba;return i>=Ma&&i<=Math.min(l,o-Ma)&&r>=h&&r<=d}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n=e.bounds,o=n.width,a=n.height,s=this.parseValue(t);if(null===s)return null;var l=Ma+this.estimateTextWidth(s),h=(a-Ba)/2,d=h+Ba;return i>=Ma&&i<=Math.min(l,o-Ma)&&r>=h&&r<=d?"pointer":null}},{key:"drawPlaceholder",value:function(e,t,i,r,n,o){var a=t.placeholder||La;e.font="".concat(Ba,"px ").concat(za),e.fillStyle=Ha,e.textAlign="left",e.textBaseline="middle",e.fillText(a,i+Ma,r+o/2)}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}},{key:"estimateTextWidth",value:function(e){for(var t=0,i=0;i<e.length;i++)t+=e.charCodeAt(i)>127?Ba:.6*Ba;return t}}])}(),Va=Na,_a=i.p+"img/icon_attachment.724d33ba.svg",ja=8,Ya=13,Ga="#ABABAB",Xa="#333",Ua="-",qa=2,Ka='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Ja=22,Qa=14,Za=function(){function e(){wt(this,e),B(this,"type","pivot"),B(this,"imageManager",void 0),this.imageManager=ni.getInstance()}return mt(e,[{key:"parseValue",value:function(e){var t=e.value;return null===t||void 0===t||""===t?null:String(t)}},{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=e.isHoverCell,o=r.x,a=r.y,s=r.width,l=r.height;i.save();var h=this.parseValue(t),d=!0===t.isLink,u=d?s-2*ja-Ja:s-2*ja;if(null===h)this.drawPlaceholder(i,t,o,a,s,l);else{i.font="".concat(Ya,"px ").concat(Ka),i.fillStyle=Xa,i.textAlign="left",i.textBaseline="middle";var c=this.truncateText(i,h,u),f=o+ja,v=a+l/2;if(i.fillText(c,f,v),n){var g=Math.min(i.measureText(c).width,u),y=v+Ya/2+qa;i.strokeStyle=Xa,i.lineWidth=1,i.beginPath(),i.moveTo(f,y),i.lineTo(f+g,y),i.stroke()}}d&&this.drawLinkIcon(i,e,o,a,s,l),i.restore()}},{key:"onClick",value:function(e,t,i,r){var n=e.bounds,o=n.width,a=n.height,s=this.parseValue(t);if(null===s)return!1;var l=!0===t.isLink,h=l?o-2*ja-Ja:o-2*ja,d=ja+Math.min(this.estimateTextWidth(s),h),u=(a-Ya)/2,c=u+Ya;return i>=ja&&i<=Math.min(d,o-ja)&&r>=u&&r<=c}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n=e.bounds,o=n.width,a=n.height,s=this.parseValue(t);if(null===s)return null;var l=!0===t.isLink,h=l?o-2*ja-Ja:o-2*ja,d=ja+Math.min(this.estimateTextWidth(s),h),u=(a-Ya)/2,c=u+Ya;return i>=ja&&i<=Math.min(d,o-ja)&&r>=u&&r<=c?"pointer":null}},{key:"drawPlaceholder",value:function(e,t,i,r,n,o){var a=t.placeholder||Ua;e.font="".concat(Ya,"px ").concat(Ka),e.fillStyle=Ga,e.textAlign="left",e.textBaseline="middle",e.fillText(a,i+ja,r+o/2)}},{key:"drawLinkIcon",value:function(e,t,i,r,n,o){var a,s=i+n-ja-Qa,l=r+(o-Qa)/2,h=this.imageManager.getCachedImage(_a);h?e.drawImage(h,s,l,Qa,Qa):null!==(a=this.imageManager.loadingImages)&&void 0!==a&&a.has(_a)||this.imageManager.loadImage(_a).then(function(){t.requestRedraw()}).catch(function(){})}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}},{key:"estimateTextWidth",value:function(e){for(var t=0,i=0;i<e.length;i++)t+=e.charCodeAt(i)>127?Ya:.6*Ya;return t}}])}(),$a=Za,es=4,ts=8,is=4,rs=8,ns=12,os="".concat(ns,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),as="#fff",ss="#e8e8e8",ls="#666",hs=10,ds=function(){function e(){wt(this,e),B(this,"type","module"),B(this,"overflowBoundsMap",new Map),B(this,"cellModulesMap",new Map)}return mt(e,[{key:"normalizeModules",value:function(e){if(null===e||void 0===e||""===e)return[];var t,i=Array.isArray(e)?e:[e],r=[],n=pt(i);try{for(n.s();!(t=n.n()).done;){var o=t.value;"object"===P(o)&&null!==o&&void 0!==o.id?r.push(o):"string"===typeof o&&""!==o&&r.push({id:o,name:o})}}catch(a){n.e(a)}finally{n.f()}return r}},{key:"draw",value:function(e,t){var i=t.placeholder,r=void 0===i?"-":i,n=t.showColor,o=void 0===n||n,a=t.maxDisplay,s=void 0===a?3:a,l=this.normalizeModules(t.value),h="".concat(e.rowIndex,":").concat(e.colIndex);if(0===l.length)return this.overflowBoundsMap.delete(h),this.cellModulesMap.delete(h),void this.drawPlaceholder(e,r);this.cellModulesMap.set(h,l),o?this.drawColoredTags(e,l,s,h):(this.overflowBoundsMap.delete(h),this.drawPlainText(e,l,s,r))}},{key:"onClick",value:function(e,t,i,r){var n="".concat(e.rowIndex,":").concat(e.colIndex),o=this.overflowBoundsMap.get(n);if(!o)return!1;var a=o.x,s=o.y,l=o.width,h=o.height;if(i>=a&&i<=a+l&&r>=s&&r<=s+h){var d=this.cellModulesMap.get(n)||[],u=e.grid;if(u&&u.onModuleOverflowClick){var c,f=(null===(c=t.extra)||void 0===c?void 0:c.rowData)||null;u.onModuleOverflowClick(d,f,e.rowIndex,e.colIndex)}return!0}return!1}},{key:"drawColoredTags",value:function(e,t,i,r){var n=e.ctx,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=t.slice(0,i),u=t.length-i,c=a+l-hs,f=a+hs,v=s+h/2;this.overflowBoundsMap.delete(r),n.save(),n.font=os;for(var g=0;g<d.length;g++){var y=d[g],p=y.name||y.id,w=y.color||ss,x=n.measureText(p).width,m=x+2*ts,b=ns+2*is;if(f+m>c){this.drawOverflowIndicator(n,f,v,t.length-g,r,a,s);break}var k=f,C=v-b/2;this.drawRoundRect(n,k,C,m,b,es,w);var S=w===ss;n.fillStyle=S?ls:as,n.textAlign="left",n.textBaseline="middle",n.fillText(p,k+ts,v),f+=m+rs}u>0&&f<=c&&this.drawOverflowIndicator(n,f,v,u,r,a,s),n.restore()}},{key:"drawPlainText",value:function(e,t,i,r){var n=e.painter,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=t.slice(0,i),u=t.length-i,c=d.map(function(e){return e.name||e.id}),f=c.join(", ");u>0&&(f+=" +".concat(u)),f||(f=r),n.drawCellText(f,a,s,l,h,ns,{color:"#333",align:"left",baseLine:"middle"})}},{key:"drawOverflowIndicator",value:function(e,t,i,r,n,o,a){var s="+".concat(r),l=e.measureText(s).width,h=l+2*ts,d=ns+2*is,u=i-d/2;this.drawRoundRect(e,t,u,h,d,es,"#f0f0f0"),e.fillStyle="#999",e.textAlign="left",e.textBaseline="middle",e.fillText(s,t+ts,i),this.overflowBoundsMap.set(n,{x:t-o,y:u-a,width:h,height:d})}},{key:"drawRoundRect",value:function(e,t,i,r,n,o,a){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.fillStyle=a,e.fill()}},{key:"drawPlaceholder",value:function(e,t){var i=e.painter,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height;i.drawCellText(t,n,o,a,s,10,{color:"#bbb",align:"left",baseLine:"middle"})}}])}(),us=ds,cs=(i(1761),i.p+"img/icon_singlearrowright.6adcd336.svg"),fs=i.p+"img/icon_totalNum.23a86d16.svg",vs=20,gs=16,ys=16,ps=4,ws=8,xs="#333",ms="#1890ff",bs="#faad14",ks="#ff4d4f",Cs="#d9d9d9",Ss='13px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Is='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Ts=/\[([^\]]+)\]\(([^)]+)\)/,As=function(){function e(){wt(this,e),B(this,"type","text-with-switcher"),B(this,"imageManager",void 0),B(this,"arrowImage",null),B(this,"totalNumImage",null),B(this,"loadingAngle",0),B(this,"lastLayoutBounds",null),this.imageManager=ni.getInstance(),this.preloadIcons()}return mt(e,[{key:"preloadIcons",value:function(){var e=this;this.imageManager.loadImage(cs).then(function(t){e.arrowImage=t}).catch(function(){e.arrowImage=null}),this.imageManager.loadImage(fs).then(function(t){e.totalNumImage=t}).catch(function(){e.totalNumImage=null})}},{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=e.requestRedraw,o=r.x,a=r.y,s=r.width,l=r.height,h=this.calcRightReservedWidth(i,t),d=o+ws;d=this.drawIndentLines(i,t,d,a,l);var u=d;d=this.drawExpandArrow(i,t,d,a,l,n);var c=d;d=this.drawIcon(i,t,d,a,l,n);var f=d,v=o+s-d-h-ws;d=this.drawText(i,t,d,a,l,v);var g=o+s-h,y=o+s-h;this.drawRightArea(i,t,o+s,a,l,n);var p=o+s-ws;this.lastLayoutBounds={expandStart:u-o,expandEnd:c-o,textStart:f-o,textEnd:g-o,totalNumStart:y-o,totalNumEnd:p-o,hasExpandArea:!!t.hasChildren,hasTotalNumArea:!!(t.hasChildren&&t.count&&t.count>0)}}},{key:"drawIndentLines",value:function(e,t,i,r,n){var o=t.tableTreeLevel||0;if(0===o)return i;var a=t.isLastLeafArr||[];e.save(),e.strokeStyle=Cs,e.lineWidth=1,e.setLineDash([3,3]);for(var s=0;s<o;s++){var l=i+s*vs+gs/2,h=a[s];h?(e.beginPath(),e.moveTo(l,r),e.lineTo(l,r+n),e.stroke()):(e.beginPath(),e.moveTo(l,r),e.lineTo(l,r+n/2),e.stroke())}return e.restore(),i+o*vs}},{key:"drawExpandArrow",value:function(e,t,i,r,n,o){var a=r+(n-gs)/2;if(t.loading)return this.drawLoadingSpinner(e,i,a,o),i+gs+ps;if(!t.hasChildren)return i+gs+ps;var s=this.arrowImage||this.imageManager.getCachedImage(cs);if(s){e.save();var l=i+gs/2,h=a+gs/2;t.expanded?(e.translate(l,h),e.rotate(Math.PI/2),e.drawImage(s,-gs/2,-gs/2,gs,gs)):(e.translate(l,h),e.drawImage(s,-gs/2,-gs/2,gs,gs)),e.restore()}else this.drawFallbackArrow(e,i,a,!!t.expanded);return t.expanded&&t.hasChildren&&this.drawExpandDownLine(e,i,r,n),i+gs+ps}},{key:"drawLoadingSpinner",value:function(e,t,i,r){var n=t+gs/2,o=i+gs/2,a=6;e.save(),e.strokeStyle="#121315",e.lineWidth=2,e.lineCap="round",e.beginPath(),e.arc(n,o,a,this.loadingAngle,this.loadingAngle+1.5*Math.PI),e.stroke(),e.restore(),this.loadingAngle+=.1,this.loadingAngle>2*Math.PI&&(this.loadingAngle=0),requestAnimationFrame(function(){return r()})}},{key:"drawExpandDownLine",value:function(e,t,i,r){var n=t+gs/2,o=i+(r+gs)/2,a=i+r;o>=a||(e.save(),e.strokeStyle=Cs,e.lineWidth=1,e.setLineDash([3,3]),e.beginPath(),e.moveTo(n,o),e.lineTo(n,a),e.stroke(),e.restore())}},{key:"drawFallbackArrow",value:function(e,t,i,r){var n=t+gs/2,o=i+gs/2,a=4;e.save(),e.strokeStyle="#121315",e.lineWidth=1.5,e.lineCap="round",e.lineJoin="round",e.beginPath(),r?(e.moveTo(n-a,o-a/2),e.lineTo(n,o+a/2),e.lineTo(n+a,o-a/2)):(e.moveTo(n-a/2,o-a),e.lineTo(n+a/2,o),e.lineTo(n-a/2,o+a)),e.stroke(),e.restore()}},{key:"drawIcon",value:function(e,t,i,r,n,o){var a=r+(n-ys)/2,s=i;if(t.iconFile){var l=this.imageManager.getCachedImage(t.iconFile);l?e.drawImage(l,s,a,ys,ys):this.imageManager.loadImage(t.iconFile).then(function(){return o()}).catch(function(){}),s+=ys+ps}if(t.isLinkTask&&t.linkIconFile){var h=this.imageManager.getCachedImage(t.linkIconFile);h?e.drawImage(h,s,a,ys,ys):this.imageManager.loadImage(t.linkIconFile).then(function(){return o()}).catch(function(){}),s+=ys+ps}return s}},{key:"drawText",value:function(e,t,i,r,n,o){var a=this.getDisplayText(t),s=!a;a||(a=t.placeholder||"-");var l=s?"#bfbfbf":t.color||xs;e.save(),e.font=Ss,e.textAlign="left",e.textBaseline="middle",t.weakenWord&&!s&&(e.globalAlpha=.5);var h=r+n/2,d=s?null:a.match(Ts);if(d){var u=a.substring(0,d.index||0),c=d[1],f=a.substring((d.index||0)+d[0].length),v=i;if(u){e.fillStyle=l;var g=this.truncateText(e,u,o);e.fillText(g,v,h),v+=e.measureText(g).width}var y=o-(v-i);if(y>0){e.fillStyle=ms;var p=this.truncateText(e,c,y);e.fillText(p,v,h);var w=e.measureText(p).width;e.strokeStyle=ms,e.lineWidth=1,e.setLineDash([]),e.beginPath(),e.moveTo(v,h+7),e.lineTo(v+w,h+7),e.stroke(),v+=w}if(f){var x=o-(v-i);if(x>0){e.fillStyle=l;var m=this.truncateText(e,f,x);e.fillText(m,v,h)}}}else{e.fillStyle=l;var b=t.textAlign||"left",k=this.truncateText(e,a,Math.max(0,o)),C=e.measureText(k).width,S=i;"center"===b?S=i+(o-C)/2:"right"===b&&(S=i+o-C),e.fillText(k,S,h),t.showLineThrough&&!s&&(e.strokeStyle=l,e.lineWidth=1,e.setLineDash([]),e.beginPath(),e.moveTo(S,h),e.lineTo(S+C,h),e.stroke())}return e.restore(),i+o}},{key:"calcRightReservedWidth",value:function(e,t){var i=ws;if(t.hasChildren&&t.count&&t.count>0){var r=String(t.count).length;i+=ys+ps+8*r+ps}return t.hasDownstreamNode&&(i+=ys+ps),t.error&&(i+=ys+ps),i}},{key:"drawRightArea",value:function(e,t,i,r,n,o){var a=i-ws;t.error&&(a=this.drawErrorIcon(e,t,a,r,n)),t.hasDownstreamNode&&(a=this.drawDownstreamIcon(e,a,r,n)),t.hasChildren&&t.count&&t.count>0&&this.drawTotalNum(e,t,a,r,n,o)}},{key:"drawTotalNum",value:function(e,t,i,r,n,o){var a=t.count||0,s=String(a);e.save(),e.font=Is,e.fillStyle="#999",e.textAlign="right",e.textBaseline="middle";var l=r+n/2;e.fillText(s,i,l);var h=e.measureText(s).width;i-=h+ps;var d=r+(n-ys)/2,u=this.totalNumImage||this.imageManager.getCachedImage(fs);return u&&e.drawImage(u,i-ys,d,ys,ys),e.restore(),i-ys-ps}},{key:"drawDownstreamIcon",value:function(e,t,i,r){var n=14,o=i+(r-n)/2,a=t-n;e.save(),e.strokeStyle="#999",e.lineWidth=1.5,e.lineCap="round";var s=a+n/2,l=o+n/2;return e.beginPath(),e.moveTo(s-3,l-4),e.lineTo(s-3,l+2),e.lineTo(s+3,l+2),e.stroke(),e.beginPath(),e.moveTo(s+1,l),e.lineTo(s+3,l+2),e.lineTo(s+1,l+4),e.stroke(),e.restore(),t-n-ps}},{key:"drawErrorIcon",value:function(e,t,i,r,n){if(!t.error)return i;var o=14,a=r+(n-o)/2,s=i-o,l=t.error.is_level_1_error?ks:t.error.is_warning?bs:ks;e.save();var h=s+o/2,d=a+1,u=a+o-1,c=(o-2)/2;return e.beginPath(),e.moveTo(h,d),e.lineTo(h+c,u),e.lineTo(h-c,u),e.closePath(),e.fillStyle=l,e.fill(),e.fillStyle="#fff",e.font="bold 9px sans-serif",e.textAlign="center",e.textBaseline="middle",e.fillText("!",h,a+o/2+1),e.restore(),i-o-ps}},{key:"getDisplayText",value:function(e){return e.richText?this.extractPlainText(e.richText):void 0!==e.label&&null!==e.label&&""!==e.label?String(e.label):null===e.value||void 0===e.value||""===e.value?"":String(e.value)}},{key:"extractPlainText",value:function(e){return e.replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/&quot;/g,'"').trim()}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}},{key:"calcLayoutBounds",value:function(e,t){var i=e.tableTreeLevel||0,r=ws;r+=i*vs;var n=r;r+=gs+ps;var o=r;e.iconFile&&(r+=ys+ps),e.isLinkTask&&e.linkIconFile&&(r+=ys+ps);var a=r,s=ws;if(e.hasChildren&&e.count&&e.count>0){var l=String(e.count).length;s+=ys+ps+8*l+ps}e.hasDownstreamNode&&(s+=ys+ps),e.error&&(s+=ys+ps);var h=t-s,d=t-s,u=t-ws;return{expandStart:n,expandEnd:o,textStart:a,textEnd:h,totalNumStart:d,totalNumEnd:u,hasExpandArea:!!e.hasChildren,hasTotalNumArea:!!(e.hasChildren&&e.count&&e.count>0)}}},{key:"onClick",value:function(e,t,i,r){var n,o,a=this.calcLayoutBounds(t,e.bounds.width),s=null===(n=t.extra)||void 0===n?void 0:n.rowData,l=(null===(o=e.grid.columns[e.colIndex])||void 0===o?void 0:o.key)||"";return a.hasExpandArea&&i>=a.expandStart&&i<=a.expandEnd?(e.grid.onTreeExpand&&e.grid.onTreeExpand(s,!t.expanded),!0):i>=a.textStart&&i<=a.textEnd?(e.grid.onCellTextClick&&e.grid.onCellTextClick(s,l),!0):!!(a.hasTotalNumArea&&i>=a.totalNumStart&&i<=a.totalNumEnd)&&(e.grid.onCellTotalNumClick&&e.grid.onCellTotalNumClick(s,l),!0)}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n=this.calcLayoutBounds(t,e.bounds.width);return n.hasExpandArea&&i>=n.expandStart&&i<=n.expandEnd||i>=n.textStart&&i<=n.textEnd||n.hasTotalNumArea&&i>=n.totalNumStart&&i<=n.totalNumEnd?"pointer":null}}])}(),Rs=As,Ds=8,Es=8,Ps=4,Os=6,Ms=20,Bs=11,Hs="".concat(Bs,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'),Fs="#fff",Ls="#f5f5f5",Ws="#999",zs=12,Ns="#52c41a",Vs="#52c41a",_s=11,js=20,Ys=2,Gs=4,Xs=10,Us=4,qs="-",Ks="#bbb",Js=function(){function e(){wt(this,e),B(this,"type","upstream"),B(this,"imageManager",void 0),B(this,"failedImages",new Set),B(this,"pendingLoads",new Set),this.imageManager=ni.getInstance()}return mt(e,[{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height,l=Array.isArray(t.value)?t.value:[];if(i.save(),0===l.length)return this.drawEmpty(e),void i.restore();for(var h=n+Ds,d=n+a-Es,u=o+s/2,c=0;c<l.length;c++){if(h>=d)break;var f=l[c],v=this.drawModuleTag(i,f,h,u,d);if(v<=0)break;if(h+=v+Us,f.isAvailable)h=this.drawDoneStatus(i,e,f,h,u,d);else if(f.reminderProperties){var g=this.drawReminderTag(i,f,h,u,d);h+=g}c<l.length-1&&(h+=Xs/2,h<d&&(i.strokeStyle="#e8e8e8",i.lineWidth=1,i.beginPath(),i.moveTo(h,u-Ms/2+2),i.lineTo(h,u+Ms/2-2),i.stroke(),h+=Xs/2))}i.restore()}},{key:"onClick",value:function(e,t,i,r){var n=e.ctx,o=e.bounds,a=o.width,s=o.height,l=Array.isArray(t.value)?t.value:[];if(0===l.length)return!1;var h,d=this.calculateClickAreas(n,l,a,s),u=pt(d);try{for(u.s();!(h=u.n()).done;){var c=h.value;if(i>=c.x&&i<=c.x+c.width&&r>=c.y&&r<=c.y+c.height){var f=t.onClickImage;return f&&"function"===typeof f&&f(c.imageUrl,c.index,[c.assetId],t),!0}}}catch(v){u.e(v)}finally{u.f()}return!1}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n=e.ctx,o=e.bounds,a=o.width,s=o.height,l=Array.isArray(t.value)?t.value:[];if(0===l.length)return null;var h,d=this.calculateClickAreas(n,l,a,s),u=pt(d);try{for(u.s();!(h=u.n()).done;){var c=h.value;if(i>=c.x&&i<=c.x+c.width&&r>=c.y&&r<=c.y+c.height)return"pointer"}}catch(f){u.e(f)}finally{u.f()}return null}},{key:"drawEmpty",value:function(e){var t=e.painter,i=e.bounds,r=i.x,n=i.y,o=i.width,a=i.height;t.drawCellText(qs,r,n,o,a,10,{color:Ks,align:"left",baseLine:"middle"})}},{key:"drawModuleTag",value:function(e,t,i,r,n){var o=t.module;if(!o)return 0;e.save(),e.font=Hs;var a=o.displayName||"",s=e.measureText(a).width,l=s+2*Os;if(i+l>n)return e.restore(),0;var h=r-Ms/2;return this.drawRoundRect(e,i,h,l,Ms,Ps,o.bgColor||"#999"),e.fillStyle=Fs,e.textAlign="left",e.textBaseline="middle",e.fillText(a,i+Os,r),e.restore(),l}},{key:"drawReminderTag",value:function(e,t,i,r,n){var o=t.reminderProperties;if(!o)return 0;e.save(),e.font=Hs;var a=o.displayName||"",s=e.measureText(a).width,l=s+2*Os;if(i+l>n)return e.restore(),0;var h=r-Ms/2,d=!!o.bgColor;return d?(this.drawRoundRect(e,i,h,l,Ms,Ps,o.bgColor),e.fillStyle=Fs):(this.drawRoundRect(e,i,h,l,Ms,Ps,Ls),e.fillStyle=Ws),e.textAlign="left",e.textBaseline="middle",e.fillText(a,i+Os,r),e.restore(),l}},{key:"drawDoneStatus",value:function(e,t,i,r,n,o){var a,s=r;s+zs<=o&&(this.drawCheckmark(e,s,n-zs/2,zs,Ns),s+=zs+2);var l=null!==(a=i.reminderProperties)&&void 0!==a&&a.isFirstEditionTime?"初版已完成":"已完成";e.save(),e.font="".concat(_s,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif');var h=e.measureText(l).width;return s+h<=o&&(e.fillStyle=Vs,e.textAlign="left",e.textBaseline="middle",e.fillText(l,s,n),s+=h+Us),e.restore(),i.syncProperties&&i.syncProperties.length>0&&(s=this.drawPreviewImages(e,t,i.syncProperties,s,n,o)),s}},{key:"drawPreviewImages",value:function(e,t,i,r,n,o){var a,s=r,l=n-js/2,h=pt(i);try{for(h.s();!(a=h.n()).done;){var d=a.value;if(s+js>o)break;var u=d.imageUrl||"";if(!u&&d.fileFormat&&(u=ut(d.fileFormat)),u)this.drawPreviewImage(e,t,u,d.fileFormat,s,l);else{var c=ut(d.fileFormat||"png");this.drawPreviewImage(e,t,c,d.fileFormat,s,l)}s+=js+Gs}}catch(f){h.e(f)}finally{h.f()}return s}},{key:"drawPreviewImage",value:function(e,t,i,r,n,o){var a=this;if(this.failedImages.has(i)){var s=ut(r||"png");this.drawSvgIcon(e,t,s,n,o)}else{var l=this.imageManager.getCachedImage(i);if(l){e.save(),this.clipRoundRect(e,n,o,js,js,Ys);var h,d,u,c,f=l.width/l.height;f>1?(d=js,h=js*f,u=n-(h-js)/2,c=o):(h=js,d=js/f,u=n,c=o-(d-js)/2),e.drawImage(l,u,c,h,d),e.restore()}else{this.pendingLoads.has(i)||(this.pendingLoads.add(i),this.imageManager.loadImage(i).then(function(){a.pendingLoads.delete(i),t.requestRedraw()}).catch(function(){a.pendingLoads.delete(i),a.failedImages.add(i),t.requestRedraw()}));var v=ut(r||"png");this.drawSvgIcon(e,t,v,n,o)}}}},{key:"drawSvgIcon",value:function(e,t,i,r,n){var o=this,a=this.imageManager.getCachedImage(i);a?e.drawImage(a,r,n,js,js):this.pendingLoads.has(i)||(this.pendingLoads.add(i),this.imageManager.loadImage(i).then(function(){o.pendingLoads.delete(i),t.requestRedraw()}).catch(function(){o.pendingLoads.delete(i)}))}},{key:"drawCheckmark",value:function(e,t,i,r,n){e.save(),e.strokeStyle=n,e.lineWidth=1.5,e.lineCap="round",e.lineJoin="round";var o=2;e.beginPath(),e.moveTo(t+o,i+r/2),e.lineTo(t+.4*r,i+r-o),e.lineTo(t+r-o,i+o),e.stroke(),e.restore()}},{key:"calculateClickAreas",value:function(e,t,i,r){var n=[],o=Ds,a=i-Es,s=r/2;e.save();for(var l=0;l<t.length;l++){var h;if(o>=a)break;var d=t[l];e.font=Hs;var u=(null===(h=d.module)||void 0===h?void 0:h.displayName)||"",c=e.measureText(u).width,f=c+2*Os;if(o+f>a)break;if(o+=f+Us,d.isAvailable){var v;o+=zs+2;var g=null!==(v=d.reminderProperties)&&void 0!==v&&v.isFirstEditionTime?"初版已完成":"已完成";e.font="".concat(_s,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif');var y=e.measureText(g).width;if(o+=y+Us,d.syncProperties)for(var p=s-js/2,w=0;w<d.syncProperties.length;w++){if(o+js>a)break;var x=d.syncProperties[w],m=x.imageUrl||"";!m&&x.fileFormat&&(m=ut(x.fileFormat)),n.push({x:o,y:p,width:js,height:js,imageUrl:m,assetId:x.assetId,index:w}),o+=js+Gs}}else if(d.reminderProperties){e.font=Hs;var b=d.reminderProperties.displayName||"",k=e.measureText(b).width;o+=k+2*Os}l<t.length-1&&(o+=Xs)}return e.restore(),n}},{key:"drawRoundRect",value:function(e,t,i,r,n,o,a){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.fillStyle=a,e.fill()}},{key:"clipRoundRect",value:function(e,t,i,r,n,o){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.clip()}}])}(),Qs=Js,Zs=14,$s=10,el=6,tl=function(){function e(){wt(this,e),B(this,"type","punch-timing"),B(this,"timerStates",new Map)}return mt(e,[{key:"draw",value:function(e,t){var i=this.getOrCreateState(e);this.drawIcon(e,t,i),this.drawTimeText(e,t,i)}},{key:"onClick",value:function(e,t,i,r){if(e.readonly||!t.canEdit)return!1;var n=e.bounds.height,o=0,a=$s+Zs+el,s=0,l=n,h=i>=o&&i<=a&&r>=s&&r<=l;if(!h)return!1;var d=this.getOrCreateState(e);return"pause"===d.status?this.startTimer(e,d):this.pauseTimer(e,d),e.requestRedraw(),!0}},{key:"getInteractiveCursor",value:function(e,t,i,r){if(e.readonly||!t.canEdit)return null;var n=e.bounds.height,o=$s+Zs+el;return i>=0&&i<=o&&r>=0&&r<=n?"pointer":null}},{key:"dispose",value:function(){var e,t=pt(this.timerStates.values());try{for(t.s();!(e=t.n()).done;){var i=e.value;this.clearInterval(i)}}catch(r){t.e(r)}finally{t.f()}this.timerStates.clear()}},{key:"drawIcon",value:function(e,t,i){if(t.canEdit){var r=e.ctx,n=e.bounds,o=n.x,a=n.y,s=n.height,l=o+$s,h=a+(s-Zs)/2;if(r.save(),"start"===i.status){r.fillStyle="#999999";var d=3,u=Zs,c=3,f=2*d+c,v=(Zs-f)/2;r.fillRect(l+v,h,d,u),r.fillRect(l+v+d+c,h,d,u)}else r.fillStyle="#999999",r.beginPath(),r.moveTo(l,h),r.lineTo(l,h+Zs),r.lineTo(l+Zs,h+Zs/2),r.closePath(),r.fill();r.restore()}}},{key:"drawTimeText",value:function(e,t,i){var r=e.bounds,n=e.painter,o=r.x,a=r.y,s=r.width,l=r.height,h=this.getDisplayText(t,i),d=t.color||"#121315",u=10,c=t.canEdit?$s+Zs+el:0,f=o+c,v=s-c-u;n.drawCellText(h,f,a,v,l,u,{color:d,align:t.textAlign||"left",baseLine:"middle"})}},{key:"getOrCreateState",value:function(e){var t="".concat(e.rowIndex,"-").concat(e.colIndex),i=this.timerStates.get(t);return i||(i={timerId:null,startTime:null,currentTime:"00:00:00",status:"pause"},this.timerStates.set(t,i)),i}},{key:"startTimer",value:function(e,t){var i=this;this.clearInterval(t),t.startTime=Date.now(),t.status="start",t.currentTime="00:00:00",t.timerId=window.setInterval(function(){i.tick(t,e)},1e3)}},{key:"pauseTimer",value:function(e,t){this.clearInterval(t),t.status="pause"}},{key:"tick",value:function(e,t){if("start"===e.status&&e.startTime){var i=Math.floor((Date.now()-e.startTime)/1e3),r=Math.floor(i/3600).toString().padStart(2,"0"),n=Math.floor(i%3600/60).toString().padStart(2,"0"),o=(i%60).toString().padStart(2,"0");e.currentTime="".concat(r,":").concat(n,":").concat(o),t.requestRedraw()}}},{key:"clearInterval",value:function(e){null!==e.timerId&&(window.clearInterval(e.timerId),e.timerId=null)}},{key:"getDisplayText",value:function(e,t){if("start"===t.status)return t.currentTime;var i=e.value,r=e.placeholder,n=void 0===r?"00:00:00":r;return(i||0===i)&&"string"===typeof i?i:n}}])}(),il=tl,rl="-",nl="#bbb",ol=8,al=4,sl=8,ll=50,hl="#f5f5f5",dl="#333",ul="#ff9800",cl="#fff",fl="#2196f3",vl="#fff",gl="#e0e0e0",yl="#999",pl=16,wl="#666",xl=function(){function e(){wt(this,e),B(this,"type","table-action-button"),B(this,"buttonPositions",[]),B(this,"moreButtonPosition",null)}return mt(e,[{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=t.value;this.buttonPositions=[],this.moreButtonPosition=null;var o=!n||0===n.length,a=o||t.isLinkTask;if(a)this.drawEmpty(e);else{var s=r.x+ol;t.isLink&&(this.drawLinkIcon(i,s,r.y+r.height/2),s+=pl+sl);var l,h=r.width-(s-r.x),d=this.calculateVisibleButtons(i,n,h),u=d.visibleButtons,c=d.hasOverflow,f=s,v=r.y+r.height/2,g=24,y=pt(u);try{for(y.s();!(l=y.n()).done;){var p=l.value,w=this.calculateButtonWidth(i,p.displayName),x=v-g/2;this.drawButton(i,p,f,x,w,g,t.canEdit),this.buttonPositions.push({button:p,x:f,y:x,width:w,height:g}),f+=w+sl}}catch(b){y.e(b)}finally{y.f()}if(c){var m=v-g/2;this.drawMoreButton(i,f,m,ll,g),this.moreButtonPosition={x:f,y:m,width:ll,height:g}}}}},{key:"drawEmpty",value:function(e){var t=e.painter,i=e.bounds;t.drawCellText(rl,i.x,i.y,i.width,i.height,10,{align:"left",color:nl})}},{key:"calculateButtonWidth",value:function(e,t){var i=e.measureText(t).width;return i+2*ol}},{key:"calculateVisibleButtons",value:function(e,t,i){for(var r=[],n=ol,o=!1,a=0;a<t.length;a++){var s=t[a],l=this.calculateButtonWidth(e,s.displayName),h=t.length-a-1,d=h>0,u=n+l+(d?sl+ll:0);if(u>i){o=!0;break}r.push(s),n+=l+sl}return{visibleButtons:r,hasOverflow:o}}},{key:"drawMoreButton",value:function(e,t,i,r,n){e.save(),e.fillStyle=hl,this.drawRoundedRect(e,t,i,r,n,al),e.fill(),e.restore(),e.save(),e.fillStyle=dl,e.font="12px sans-serif",e.textAlign="center",e.textBaseline="middle",e.fillText("更多",t+r/2,i+n/2),e.restore()}},{key:"drawButton",value:function(e,t,i,r,n,o,a){var s,l;if(!1===a)s=gl,l=yl;else if(t.isSuperBtn){var h,d;s=null!==(h=t.backgroundColor)&&void 0!==h?h:ul,l=null!==(d=t.color)&&void 0!==d?d:cl}else if(t.isOperationBtn){var u,c;s=null!==(u=t.backgroundColor)&&void 0!==u?u:fl,l=null!==(c=t.color)&&void 0!==c?c:vl}else{var f,v;s=null!==(f=t.backgroundColor)&&void 0!==f?f:hl,l=null!==(v=t.color)&&void 0!==v?v:dl}e.save(),e.fillStyle=s,this.drawRoundedRect(e,i,r,n,o,al),e.fill(),e.restore(),e.save(),e.fillStyle=l,e.font="12px sans-serif",e.textAlign="center",e.textBaseline="middle",e.fillText(t.displayName,i+n/2,r+o/2),e.restore()}},{key:"drawRoundedRect",value:function(e,t,i,r,n,o){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.arcTo(t+r,i,t+r,i+o,o),e.lineTo(t+r,i+n-o),e.arcTo(t+r,i+n,t+r-o,i+n,o),e.lineTo(t+o,i+n),e.arcTo(t,i+n,t,i+n-o,o),e.lineTo(t,i+o),e.arcTo(t,i,t+o,i,o),e.closePath()}},{key:"drawLinkIcon",value:function(e,t,i){e.save(),e.fillStyle=wl,e.font="".concat(pl,"px sans-serif"),e.textAlign="left",e.textBaseline="middle",e.fillText("🔗",t,i),e.restore()}},{key:"onClick",value:function(e,t,i,r){if(!1===t.canEdit)return!1;var n,o=pt(this.buttonPositions);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(i>=a.x&&i<=a.x+a.width&&r>=a.y&&r<=a.y+a.height){var s=a.button,l=new MouseEvent("click");if(s.isOperationBtn&&t.onOperationBtnClick)t.onOperationBtnClick(l,{id:t.id,data:t});else if(t.onButtonClick){var h={id:t.id,operation:s};s.isSuperBtn&&(h.operation.position={x:a.x,y:a.y,width:a.width,height:a.height}),t.onButtonClick(l,h)}return!0}}}catch(c){o.e(c)}finally{o.f()}if(this.moreButtonPosition){var d=this.moreButtonPosition;if(i>=d.x&&i<=d.x+d.width&&r>=d.y&&r<=d.y+d.height){if(t.onAfterClick){var u=new MouseEvent("click");t.onAfterClick(u,{data:t,position:{x:d.x,y:d.y}})}return!0}}return!1}},{key:"getInteractiveCursor",value:function(e,t,i,r){if(!1===t.canEdit)return null;var n,o=pt(this.buttonPositions);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(i>=a.x&&i<=a.x+a.width&&r>=a.y&&r<=a.y+a.height)return"pointer"}}catch(l){o.e(l)}finally{o.f()}if(this.moreButtonPosition){var s=this.moreButtonPosition;if(i>=s.x&&i<=s.x+s.width&&r>=s.y&&r<=s.y+s.height)return"pointer"}return null}}])}(),ml={0:{color:"rgba(251, 75, 81, 1)",bgColor:"rgba(251, 75, 81, 0.2)"},1:{color:"rgba(250, 66, 180, 1)",bgColor:"rgba(250, 66, 180, 0.2)"},2:{color:"rgba(250, 179, 0, 1)",bgColor:"rgba(250, 179, 0, 0.2)"},3:{color:"rgba(0, 197, 251, 1)",bgColor:"rgba(0, 197, 251, 0.2)"},4:{color:"rgba(0, 189, 119, 1)",bgColor:"rgba(0, 189, 119, 0.2)"}};function bl(e){if(null===e||void 0===e||""===e)return null;var t="string"===typeof e?parseInt(e,10):e;return isNaN(t)?null:ml[t]?ml[t]:ml[4]}var kl=function(){function e(){wt(this,e),B(this,"type","priority-text"),B(this,"emptyValue","-")}return mt(e,[{key:"draw",value:function(e,t){var i=t.value,r=bl(i);r&&null!==i&&void 0!==i&&""!==i?this.drawPriorityTag(e,t,r):this.drawEmptyText(e,t)}},{key:"drawPriorityTag",value:function(e,t,i){var r,n,o,a,s=e.ctx,l=e.bounds,h=l.x,d=l.y,u=l.width,c=l.height,f=null!==(r=null===(n=t.style)||void 0===n?void 0:n.padding)&&void 0!==r?r:10,v=(null===(o=t.style)||void 0===o?void 0:o.fontSize)||12,g=8,y=Math.min(22,c-8),p=null!==(a=t.tagRadius)&&void 0!==a?a:2,w="P".concat(t.value);s.save(),s.font="500 ".concat(v,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif');var x,m=u-2*f,b=t.textAlign||"center";switch(b){case"center":x=h+(u-m)/2;break;case"right":x=h+u-m-f;break;default:x=h+f}var k=d+(c-y)/2;this.drawRoundedRect(s,x,k,m,y,p,i.bgColor),s.fillStyle=i.color,s.textAlign="center",s.textBaseline="middle";var C=m-2*g,S=this.truncateText(s,w,C);s.fillText(S,x+m/2,k+y/2),s.restore()}},{key:"drawEmptyText",value:function(e,t){var i,r,n=e.painter,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=null!==(i=null===(r=t.style)||void 0===r?void 0:r.padding)&&void 0!==i?i:10,u=t.placeholder||this.emptyValue;n.drawCellText(u,a,s,l,h,d,{color:"#ababab",align:"left",baseLine:"middle"})}},{key:"drawRoundedRect",value:function(e,t,i,r,n,o,a){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.fillStyle=a,e.fill()}},{key:"truncateText",value:function(e,t,i){if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),Cl=kl,Sl=[{value:"toStart",name:"未就绪",color:"#666",icon:"circle",iconColor:"#666"},{value:"toStart",name:"未开始",color:"#666",icon:"circle",iconColor:"#666"},{value:"paused",name:"已暂停",color:"#666",icon:"pause",iconColor:"#DDDFE8"},{value:"inProgress",name:"进行中",color:"#666",icon:"progress",iconColor:"#3f9eff"},{value:"complete",name:"已完成",color:"#666",icon:"check",iconColor:"#23d0a1"}];function Il(e,t){if(!e)return null;var i=t.find(function(t){return(null===t||void 0===t?void 0:t.name)===e});return i||null}var Tl=function(){function e(){wt(this,e),B(this,"type","status-text"),B(this,"emptyValue","-")}return mt(e,[{key:"draw",value:function(e,t){var i=t.value,r=t.statusList||Sl,n=Il(String(null!==i&&void 0!==i?i:""),r);n?this.drawStatusContent(e,t,n):this.drawEmptyText(e,t),t.showCorner&&t.extraInfo&&Object.keys(t.extraInfo).length>0&&n&&this.drawCorner(e,n.color)}},{key:"drawStatusContent",value:function(e,t,i){var r,n,o,a,s,l=e.ctx,h=e.bounds,d=h.x,u=h.y,c=h.width,f=h.height,v=null!==(r=null===(n=t.style)||void 0===n?void 0:n.padding)&&void 0!==r?r:10,g=null!==(o=null===(a=t.style)||void 0===a?void 0:a.fontSize)&&void 0!==o?o:12,y=null!==(s=t.iconSize)&&void 0!==s?s:14,p=6,w=!1!==t.showIcon;l.save(),l.font="".concat(g,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif');var x=d+v,m=u+f/2;if(w&&i.icon){var b=x,k=u+(f-y)/2;this.drawIcon(l,i.icon,b,k,y,i.iconColor),x+=y+p}l.fillStyle=i.color,l.textAlign="left",l.textBaseline="middle";var C=c-(x-d)-v,S=this.truncateText(l,i.name,C);l.fillText(S,x,m),l.restore()}},{key:"drawEmptyText",value:function(e,t){var i,r,n=e.painter,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=null!==(i=null===(r=t.style)||void 0===r?void 0:r.padding)&&void 0!==i?i:10,u=t.placeholder||this.emptyValue;n.drawCellText(u,a,s,l,h,d,{color:"#ababab",align:"left",baseLine:"middle"})}},{key:"drawIcon",value:function(e,t,i,r,n,o){e.save(),e.fillStyle=o,e.strokeStyle=o,e.lineWidth=1.5;var a=i+n/2,s=r+n/2,l=n/2-2;switch(t){case"circle":e.beginPath(),e.arc(a,s,l,0,2*Math.PI),e.stroke();break;case"pause":var h=.18*n,d=.5*n,u=.12*n,c=r+(n-d)/2;e.fillRect(a-u-h,c,h,d),e.fillRect(a+u,c,h,d);break;case"progress":e.beginPath(),e.arc(a,s,l,.25*-Math.PI,1.25*Math.PI,!1),e.stroke();var f=.25*-Math.PI,v=a+l*Math.cos(f),g=s+l*Math.sin(f);e.beginPath(),e.arc(v,g,1.5,0,2*Math.PI),e.fill();break;case"check":e.beginPath(),e.arc(a,s,l,0,2*Math.PI),e.fill(),e.strokeStyle="#fff",e.lineWidth=1.5,e.lineCap="round",e.lineJoin="round",e.beginPath(),e.moveTo(i+.28*n,s),e.lineTo(i+.42*n,r+.62*n),e.lineTo(i+.72*n,r+.35*n),e.stroke();break;default:e.beginPath(),e.arc(a,s,.5*l,0,2*Math.PI),e.fill()}e.restore()}},{key:"drawCorner",value:function(e,t){var i=e.ctx,r=e.bounds,n=r.x,o=r.y,a=r.width,s=6,l=t||"#ABABAB";i.save(),i.fillStyle=l,i.beginPath(),i.moveTo(n+a-s,o),i.lineTo(n+a,o),i.lineTo(n+a,o+s),i.closePath(),i.fill(),i.restore()}},{key:"truncateText",value:function(e,t,i){if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),Al=Tl;function Rl(e){return e&&Array.isArray(e)&&0!==e.length?e.map(function(e){return"string"===typeof e?{id:e,title:e}:e}):[]}var Dl=function(){function e(){wt(this,e),B(this,"type","theme"),B(this,"emptyValue","-")}return mt(e,[{key:"draw",value:function(e,t){var i=Rl(t.value);i.length>0?this.drawThemeContent(e,t,i):this.drawEmptyText(e,t)}},{key:"drawThemeContent",value:function(e,t,i){var r,n,o,a,s,l,h,d=e.ctx,u=e.bounds,c=u.x,f=u.y,v=u.width,g=u.height,y=null!==(r=null===(n=t.style)||void 0===n?void 0:n.padding)&&void 0!==r?r:10,p=null!==(o=null===(a=t.style)||void 0===a?void 0:a.fontSize)&&void 0!==o?o:12,w=null!==(s=t.iconSize)&&void 0!==s?s:14,x=6,m=!1!==t.showIcon;d.save(),d.font="".concat(p,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif');var b=c+y,k=f+g/2;if(m){var C,S=b,I=f+(g-w)/2,T=null!==(C=t.iconColor)&&void 0!==C?C:"#8c8c8c";this.drawThemeIcon(d,S,I,w,T),b+=w+x}var A=null!==(l=null===(h=t.style)||void 0===h?void 0:h.color)&&void 0!==l?l:"#333";d.fillStyle=A,d.textAlign="left",d.textBaseline="middle";var R=i[0],D=R.title||R.id,E="";i.length>1&&(E="等".concat(i.length,"个"));var P=E?d.measureText(E).width+4:0,O=v-(b-c)-y-P,M=this.truncateText(d,D,O);if(d.fillText(M,b,k),E){var B,H=d.measureText(M).width,F=b+H+4,L=null!==(B=t.suffixColor)&&void 0!==B?B:"#999";d.fillStyle=L,d.fillText(E,F,k)}d.restore()}},{key:"drawThemeIcon",value:function(e,t,i,r,n){e.save(),e.fillStyle=n,e.strokeStyle=n,e.lineWidth=1.2;var o=t+r/2,a=i+r/2,s=r/2-2;e.beginPath(),e.arc(o,a,s,0,2*Math.PI),e.stroke();var l=.2*s,h=[{angle:-Math.PI/3,offsetRatio:.55},{angle:Math.PI/6,offsetRatio:.55},{angle:2*Math.PI/3,offsetRatio:.55}];h.forEach(function(t){var i=o+s*t.offsetRatio*Math.cos(t.angle),r=a+s*t.offsetRatio*Math.sin(t.angle);e.beginPath(),e.arc(i,r,l,0,2*Math.PI),e.fill()}),e.restore()}},{key:"drawEmptyText",value:function(e,t){var i,r,n=e.painter,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=null!==(i=null===(r=t.style)||void 0===r?void 0:r.padding)&&void 0!==i?i:10,u=t.placeholder||this.emptyValue;n.drawCellText(u,a,s,l,h,d,{color:"#ababab",align:"left",baseLine:"middle"})}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),El=Dl,Pl=i.p+"img/icon_netdisc.d8bbe2e0.svg";function Ol(e){if(!e)return null;if("string"===typeof e)try{var t=JSON.parse(e);return t}catch(i){return null}return"object"===P(e)?e:null}var Ml=function(){function e(){wt(this,e),B(this,"type","itfs-path"),B(this,"imageManager",void 0),B(this,"emptyValue","-"),B(this,"defaultPathColor","#268bfb"),B(this,"defaultIconColor","#8e8e8e"),B(this,"syncOkColor","#23d0a1"),this.imageManager=ni.getInstance()}return mt(e,[{key:"draw",value:function(e,t){var i=Ol(t.value);null!==i&&void 0!==i&&i.path?this.drawPathContent(e,t,i):this.drawEmptyText(e,t)}},{key:"onClick",value:function(e,t,i,r){var n,o,a=e.bounds,s=null!==(n=null===(o=t.style)||void 0===o?void 0:o.padding)&&void 0!==n?n:10,l=!1!==t.showIcon,h=16,d=8;if(l){var u=a.width-s-h,c=(a.height-h)/2;if(i>=u&&i<=u+h&&r>=c&&r<=c+h)return!0}var f=Ol(t.value);if(null!==f&&void 0!==f&&f.path){var v=s,g=l?a.width-s-h-d:a.width-s;if(i>=v&&i<=g)return!0}return!1}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n,o,a=e.bounds,s=null!==(n=null===(o=t.style)||void 0===o?void 0:o.padding)&&void 0!==n?n:10,l=!1!==t.showIcon,h=16,d=8,u=Ol(t.value);if(null===u||void 0===u||!u.path)return null;if(l){var c=a.width-s-h,f=(a.height-h)/2;if(i>=c&&i<=c+h&&r>=f&&r<=f+h)return"pointer"}var v=s,g=l?a.width-s-h-d:a.width-s;return i>=v&&i<=g?"pointer":null}},{key:"drawPathContent",value:function(e,t,i){var r,n,o,a,s=e.ctx,l=e.bounds,h=l.x,d=l.y,u=l.width,c=l.height,f=null!==(r=null===(n=t.style)||void 0===n?void 0:n.padding)&&void 0!==r?r:10,v=null!==(o=null===(a=t.style)||void 0===a?void 0:a.fontSize)&&void 0!==o?o:12,g=t.pathColor||this.defaultPathColor,y=!1!==t.showIcon,p=16,w=8;s.save(),s.font="".concat(v,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif');var x=u-2*f;y&&(x-=p+w);var m=h+f,b=d+c/2;s.fillStyle=g,s.textAlign="left",s.textBaseline="middle";var k=this.truncateText(s,i.path,x);if(s.fillText(k,m,b),y){var C=h+u-f-p,S=d+(c-p)/2;i.isSync?this.drawSyncOkIcon(s,C,S,p):this.drawNetdiscIcon(s,e,C,S,p)}s.restore()}},{key:"drawEmptyText",value:function(e,t){var i,r,n=e.painter,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=null!==(i=null===(r=t.style)||void 0===r?void 0:r.padding)&&void 0!==i?i:10,u=t.placeholder||this.emptyValue;n.drawCellText(u,a,s,l,h,d,{color:"#ababab",align:"left",baseLine:"middle"})}},{key:"drawNetdiscIcon",value:function(e,t,i,r,n){var o=this.imageManager.getCachedImage(Pl);o?e.drawImage(o,i,r,n,n):this.imageManager.loadImage(Pl).then(function(){t.requestRedraw()}).catch(function(){})}},{key:"drawSyncOkIcon",value:function(e,t,i,r){e.save();var n=t+r/2,o=i+r/2,a=r/2-2;e.beginPath(),e.arc(n,o,a,0,2*Math.PI),e.fillStyle=this.syncOkColor,e.fill(),e.strokeStyle="#fff",e.lineWidth=1.5,e.lineCap="round",e.lineJoin="round",e.beginPath(),e.moveTo(t+.28*r,o),e.lineTo(t+.42*r,i+.62*r),e.lineTo(t+.72*r,i+.35*r),e.stroke(),e.restore()}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),Bl=Ml,Hl=function(){function e(){wt(this,e),B(this,"type","deliverable-review"),B(this,"emptyValue","-"),B(this,"reviewIconColor","#3f9eff"),B(this,"fileIconColor","#8e8e8e"),B(this,"nameColor","#333"),B(this,"nameHoverColor","#268bfb"),B(this,"editIconColor","#999")}return mt(e,[{key:"draw",value:function(e,t){var i=this.parseReviewItems(t.value);i.length>0?this.drawReviewItems(e,t,i):this.drawEmptyText(e,t),t.error&&this.drawErrorIndicator(e),t.showLineThrow&&this.drawStrikethrough(e,t,i),t.canEdit&&e.isHoverRow&&this.drawEditButton(e,t)}},{key:"onClick",value:function(e,t,i,r){var n,o,a=e.bounds,s=null!==(n=null===(o=t.style)||void 0===o?void 0:o.padding)&&void 0!==n?n:10,l=!1!==t.canEdit;if(l&&e.isHoverRow){var h=20,d=a.width-s-h,u=(a.height-h)/2;if(i>=d&&i<=d+h&&r>=u&&r<=u+h)return!0}var c=this.parseReviewItems(t.value);if(c.length>0)for(var f=24,v=4,g=(a.height-(c.length*f+(c.length-1)*v))/2,y=0;y<c.length;y++){var p=g+y*(f+v);if(r>=p&&r<=p+f&&i>=s)return!0}return!1}},{key:"getInteractiveCursor",value:function(e,t,i,r){var n,o,a=e.bounds,s=null!==(n=null===(o=t.style)||void 0===o?void 0:o.padding)&&void 0!==n?n:10,l=!1!==t.canEdit;if(l&&e.isHoverRow){var h=20,d=a.width-s-h,u=(a.height-h)/2;if(i>=d&&i<=d+h&&r>=u&&r<=u+h)return"pointer"}var c=this.parseReviewItems(t.value);if(c.length>0)for(var f=24,v=4,g=(a.height-(c.length*f+(c.length-1)*v))/2,y=0;y<c.length;y++){var p=g+y*(f+v);if(r>=p&&r<=p+f&&i>=s&&c[y].review_id)return"pointer"}return null}},{key:"parseReviewItems",value:function(e){return e&&Array.isArray(e)?e.filter(function(e){return e&&e.name}):[]}},{key:"drawReviewItems",value:function(e,t,i){var r,n,o,a,s=e.ctx,l=e.bounds,h=l.x,d=l.y,u=l.width,c=l.height,f=null!==(r=null===(n=t.style)||void 0===n?void 0:n.padding)&&void 0!==r?r:10,v=null!==(o=null===(a=t.style)||void 0===a?void 0:a.fontSize)&&void 0!==o?o:12,g=16,y=6,p=24,w=4,x=!1!==t.canEdit,m=x?28:0;s.save(),s.font="".concat(v,'px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif');var b=i.length*p+(i.length-1)*w,k=d+(c-b)/2;b>c&&(k=d+4),s.beginPath(),s.rect(h,d,u,c),s.clip();for(var C=u-2*f-m,S=0;S<i.length;S++){var I=i[S],T=k+S*(p+w);if(T>d+c)break;var A=h+f,R=T+p/2,D=A,E=T+(p-g)/2,P=!!I.review_id;this.drawFileIcon(s,D,E,g,P);var O=A+g+y,M=C-g-y,B=I.review_id?this.nameHoverColor:this.nameColor;s.fillStyle=B,s.textAlign="left",s.textBaseline="middle";var H=this.truncateText(s,I.name,M);s.fillText(H,O,R)}s.restore()}},{key:"drawEmptyText",value:function(e,t){var i,r,n=e.painter,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=null!==(i=null===(r=t.style)||void 0===r?void 0:r.padding)&&void 0!==i?i:10,u=t.placeholder||this.emptyValue;n.drawCellText(u,a,s,l,h,d,{color:"#ababab",align:"left",baseLine:"middle"})}},{key:"drawFileIcon",value:function(e,t,i,r,n){e.save();var o=n?this.reviewIconColor:this.fileIconColor;e.strokeStyle=o,e.fillStyle=o,e.lineWidth=1.2,e.lineCap="round",e.lineJoin="round",n?this.drawReviewIcon(e,t,i,r,o):this.drawDocumentIcon(e,t,i,r,o),e.restore()}},{key:"drawReviewIcon",value:function(e,t,i,r,n){var o=.15*r,a=t+o,s=i+o,l=.55*r,h=.7*r,d=.15*r;e.beginPath(),e.moveTo(a,s),e.lineTo(a+l-d,s),e.lineTo(a+l,s+d),e.lineTo(a+l,s+h),e.lineTo(a,s+h),e.closePath(),e.stroke(),e.beginPath(),e.moveTo(a+l-d,s),e.lineTo(a+l-d,s+d),e.lineTo(a+l,s+d),e.stroke();var u=s+.35*h,c=s+.55*h;e.beginPath(),e.moveTo(a+o,u),e.lineTo(a+l-1.5*o,u),e.moveTo(a+o,c),e.lineTo(a+.6*l,c),e.stroke();var f=t+.72*r,v=i+.72*r,g=.2*r;e.beginPath(),e.arc(f,v,g,0,2*Math.PI),e.fillStyle=n,e.fill(),e.strokeStyle="#fff",e.lineWidth=1.2,e.beginPath(),e.moveTo(f-.4*g,v),e.lineTo(f-.05*g,v+.35*g),e.lineTo(f+.45*g,v-.3*g),e.stroke()}},{key:"drawDocumentIcon",value:function(e,t,i,r,n){var o=.2*r,a=t+o,s=i+.8*o,l=.6*r,h=.7*r,d=.15*r;e.strokeStyle=n,e.beginPath(),e.moveTo(a,s),e.lineTo(a+l-d,s),e.lineTo(a+l,s+d),e.lineTo(a+l,s+h),e.lineTo(a,s+h),e.closePath(),e.stroke(),e.beginPath(),e.moveTo(a+l-d,s),e.lineTo(a+l-d,s+d),e.lineTo(a+l,s+d),e.stroke();var u=a+.5*o,c=a+l-.5*o,f=s+.35*h,v=s+.52*h,g=s+.69*h;e.beginPath(),e.moveTo(u,f),e.lineTo(c,f),e.moveTo(u,v),e.lineTo(c,v),e.moveTo(u,g),e.lineTo(.85*c,g),e.stroke()}},{key:"drawEditButton",value:function(e,t){var i,r,n=e.ctx,o=e.bounds,a=o.x,s=o.y,l=o.width,h=o.height,d=null!==(i=null===(r=t.style)||void 0===r?void 0:r.padding)&&void 0!==i?i:10,u=20,c=14,f=a+l-d-u,v=s+(h-u)/2;n.save(),n.fillStyle="rgba(0, 0, 0, 0.04)",this.drawRoundedRect(n,f,v,u,u,3,"rgba(0, 0, 0, 0.04)");var g=f+(u-c)/2,y=v+(u-c)/2;this.drawPencilIcon(n,g,y,c,this.editIconColor),n.restore()}},{key:"drawPencilIcon",value:function(e,t,i,r,n){e.save(),e.strokeStyle=n,e.lineWidth=1.2,e.lineCap="round",e.lineJoin="round";var o=t+.2*r,a=i+.8*r,s=t+.8*r,l=i+.2*r,h=.1*r;e.beginPath(),e.moveTo(o,a),e.lineTo(s-h,l-h),e.lineTo(s+h,l+h),e.lineTo(o+2*h,a-2*h),e.closePath(),e.stroke(),e.beginPath(),e.moveTo(o,a),e.lineTo(o-.05*r,a+.05*r),e.stroke(),e.restore()}},{key:"drawErrorIndicator",value:function(e){var t=e.ctx,i=e.bounds,r=i.x,n=i.y,o=i.width,a=6;t.save(),t.fillStyle="#ff4d4f",t.beginPath(),t.moveTo(r+o-a,n),t.lineTo(r+o,n),t.lineTo(r+o,n+a),t.closePath(),t.fill(),t.restore()}},{key:"drawStrikethrough",value:function(e,t,i){var r,n;if(0!==i.length){var o=e.ctx,a=e.bounds,s=a.x,l=a.y,h=a.width,d=a.height,u=null!==(r=null===(n=t.style)||void 0===n?void 0:n.padding)&&void 0!==r?r:10;o.save(),o.strokeStyle="#999",o.lineWidth=1,o.beginPath(),o.moveTo(s+u,l+d/2),o.lineTo(s+h-u,l+d/2),o.stroke(),o.restore()}}},{key:"drawRoundedRect",value:function(e,t,i,r,n,o,a){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+r-o,i),e.quadraticCurveTo(t+r,i,t+r,i+o),e.lineTo(t+r,i+n-o),e.quadraticCurveTo(t+r,i+n,t+r-o,i+n),e.lineTo(t+o,i+n),e.quadraticCurveTo(t,i+n,t,i+n-o),e.lineTo(t,i+o),e.quadraticCurveTo(t,i,t+o,i),e.closePath(),e.fillStyle=a,e.fill()}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),Fl=Hl,Ll=10,Wl=10,zl=30,Nl=20,Vl=14,_l=12,jl="#333",Yl="#bbb";function Gl(e){if(!e)return A;var t=e.replace(/<[^>]*>/g,"");if(!t){if(e.includes("<img"))return"[图片]";if(e.includes("<video"))return"[视频]"}return t||A}var Xl=function(){function e(){wt(this,e),B(this,"type","rich-text")}return mt(e,[{key:"draw",value:function(e,t){var i=e.ctx,r=e.bounds,n=r.x,o=r.y,a=r.width,s=r.height,l=t.canEdit,h=void 0!==l&&l,d=t.showLineThrow,u=void 0!==d&&d,c=t.error,f=t.isLink,v=void 0!==f&&f,g=Gl(t.value),y=g===A;i.save();var p=h?zl:0,w=v?Nl:0,x=a-p-w;if(v&&this.drawLinkIcon(i,n+x,o,Nl,s),this.drawText(i,g,y,n,o,x,s,t),h&&this.drawEditButton(i,n+a-zl,o,zl,s,e.isHoverCell),u&&this.drawStrikethrough(i,n,o,x,s),c){var m=n+a-(h?zl+_l+4:_l+4);this.drawErrorIcon(i,m,o+4)}i.restore()}},{key:"onClick",value:function(e,t,i,r){var n=e.bounds.width,o=t.canEdit,a=void 0!==o&&o,s=t.isLink,l=void 0!==s&&s;if(a){var h=n-zl;if(i>=h&&i<=n)return!0}if(l){var d=a?zl:0,u=Nl,c=n-d-u;if(i>=c&&i<=c+u)return!0}var f=a?zl:0,v=l?Nl:0,g=n-f-v;return i>=Ll&&i<=g-Wl}},{key:"getInteractiveCursor",value:function(e,t,i,r){if(e.readonly)return null;var n=e.bounds.width,o=t.canEdit,a=void 0!==o&&o,s=t.isLink,l=void 0!==s&&s;if(a){var h=n-zl;if(i>=h&&i<=n)return"pointer"}if(l){var d=a?zl:0,u=Nl,c=n-d-u;if(i>=c&&i<=c+u)return"pointer"}return null}},{key:"drawText",value:function(e,t,i,r,n,o,a,s){e.font='12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textBaseline="middle",e.textAlign="left";var l=r+Ll,h=n+a/2,d=o-Ll-Wl;if(i){var u=s.placeholder||A;e.fillStyle=Yl,e.fillText(u,l,h)}else{var c,f;e.fillStyle=null!==(c=null===(f=s.style)||void 0===f?void 0:f.color)&&void 0!==c?c:jl;var v=this.truncateText(e,t,d);e.fillText(v,l,h)}}},{key:"drawEditButton",value:function(e,t,i,r,n,o){if(o){var a=t+r/2,s=i+n/2;this.drawEditIcon(e,a-Vl/2,s-Vl/2,Vl,"#8c8c8c")}}},{key:"drawEditIcon",value:function(e,t,i,r,n){e.save(),e.strokeStyle=n,e.fillStyle=n,e.lineWidth=1.2,e.lineCap="round",e.lineJoin="round";var o=2,a=t+o,s=i+r-o,l=t+r-o,h=i+o;e.beginPath(),e.moveTo(a+2,s-2),e.lineTo(l-1,h+1),e.stroke(),e.beginPath(),e.moveTo(a,s),e.lineTo(a+3,s-1),e.lineTo(a+1,s-3),e.closePath(),e.fill(),e.restore()}},{key:"drawLinkIcon",value:function(e,t,i,r,n){var o=t+r/2,a=i+n/2,s=12;e.save(),e.strokeStyle="#8c8c8c",e.lineWidth=1.5,e.lineCap="round",e.lineJoin="round";var l=s/2,h=2;e.beginPath(),e.moveTo(o-h,a),e.lineTo(o-h,a-l+2),e.quadraticCurveTo(o-h,a-l,o-h+2,a-l),e.lineTo(o+h-2,a-l),e.quadraticCurveTo(o+h,a-l,o+h,a-l+2),e.lineTo(o+h,a),e.stroke(),e.beginPath(),e.moveTo(o-h,a),e.lineTo(o-h,a+l-2),e.quadraticCurveTo(o-h,a+l,o-h+2,a+l),e.lineTo(o+h-2,a+l),e.quadraticCurveTo(o+h,a+l,o+h,a+l-2),e.lineTo(o+h,a),e.stroke(),e.restore()}},{key:"drawStrikethrough",value:function(e,t,i,r,n){e.save(),e.strokeStyle="#999",e.lineWidth=1,e.beginPath(),e.moveTo(t+4,i+n/2),e.lineTo(t+r-4,i+n/2),e.stroke(),e.restore()}},{key:"drawErrorIcon",value:function(e,t,i){var r=_l,n=t+r/2;e.save(),e.fillStyle="#ff4d4f",e.beginPath(),e.moveTo(n,i),e.lineTo(t+r,i+r),e.lineTo(t,i+r),e.closePath(),e.fill(),e.fillStyle="#fff",e.font='bold 8px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',e.textAlign="center",e.textBaseline="middle",e.fillText("!",n,i+.65*r),e.restore()}},{key:"truncateText",value:function(e,t,i){if(i<=0)return"";if(e.measureText(t).width<=i)return t;var r="...",n=e.measureText(r).width,o=t;while(o.length>0&&e.measureText(o).width+n>i)o=o.slice(0,-1);return o+r}}])}(),Ul=Xl;function ql(){var e=li();e.register("text",new wn),e.register("number",new wn),e.register("select",new mn),e.register("image",new kn),e.register("person",new Sn),e.register("progress",new Tn),e.register("datetime",new Rn),e.register("date",new Rn),e.register("time",new Rn),e.register("month",new Rn),e.register("boolean",new En),e.register("checkbox",new En),e.register("status",new On),e.register("group-header",new Bn),e.register("separator-row",new Fn),e.register("nested",new Wn),e.register("tree-dropdown",new Nn),e.register("punch",new eo),e.register("hyperlink",new fo),e.register("file",new Bo),e.register("task-node",new na),e.register("wf-state",new Ca),e.register("workflow",new Oa),e.register("file-storage-spec",new Va),e.register("pivot",new $a),e.register("module",new us),e.register("text-with-switcher",new Rs),e.register("upstream",new Qs),e.register("punch-timing",new il),e.register("table-action-button",new xl),e.register("priority-text",new Cl),e.register("status-text",new Al),e.register("theme",new El),e.register("itfs-path",new Bl),e.register("deliverable-review",new Fl),e.register("rich-text",new Ul),e.setDefaultViewerType("text")}var Kl={text:wn,number:wn,select:mn,image:kn,person:Sn,progress:Tn,datetime:Rn,date:Rn,time:Rn,month:Rn,boolean:En,checkbox:En,status:On,"group-header":Bn,"separator-row":Fn,nested:Wn,"tree-dropdown":Nn,punch:eo,hyperlink:fo,file:Bo,"task-node":na,"wf-state":Ca,workflow:Oa,"file-storage-spec":Va,pivot:$a,module:us,"text-with-switcher":Rs,upstream:Qs,"punch-timing":il,"table-action-button":xl,"priority-text":Cl,"status-text":Al,theme:El,"itfs-path":Bl,"deliverable-review":Fl,"rich-text":Ul},Jl=function(e){e.component("DDataGrid",hn)};hn.install=Jl;var Ql=hn,Zl=Ql}(),module.exports=r})();
2
2
  //# sourceMappingURL=arthub-table.common.js.map