@hart365/pp-md-pptb-edition 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/pp-md-app.js +11 -11
- package/dist/icons/pp-md.svg +5 -423
- package/dist/index.html +5 -4
- package/package.json +1 -1
package/dist/assets/pp-md-app.js
CHANGED
|
@@ -36,7 +36,7 @@ Error generating stack: `+e.message+`
|
|
|
36
36
|
`,...a.current()});return/^[\t ]/.test(u)&&(u=rc(u.charCodeAt(0))+u.slice(1)),u=u?o+` `+u:o,n.options.closeAtx&&(u+=` `+o),l(),s(),u}lc.peek=uc;function lc(e){return e.value||``}function uc(){return`<`}dc.peek=fc;function dc(e,t,n,r){let i=ec(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),l=n.createTracker(r),u=l.move(`![`);return u+=l.move(n.safe(e.alt,{before:u,after:`]`,...l.current()})),u+=l.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),u+=l.move(`<`),u+=l.move(n.safe(e.url,{before:u,after:`>`,...l.current()})),u+=l.move(`>`)):(s=n.enter(`destinationRaw`),u+=l.move(n.safe(e.url,{before:u,after:e.title?` `:`)`,...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),u+=l.move(` `+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(`)`),o(),u}function fc(){return`!`}pc.peek=mc;function pc(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),l=s.move(`![`),u=n.safe(e.alt,{before:l,after:`]`,...s.current()});l+=s.move(u+`][`),o();let d=n.stack;n.stack=[],o=n.enter(`reference`);let f=n.safe(n.associationId(e),{before:l,after:`]`,...s.current()});return o(),n.stack=d,a(),i===`full`||!u||u!==f?l+=s.move(f+`]`):i===`shortcut`?l=l.slice(0,-1):l+=s.move(`]`),l}function mc(){return`!`}hc.peek=gc;function hc(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function gc(){return"`"}function _c(e,t){let n=Bt(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][a-z+.-]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}vc.peek=yc;function vc(e,t,n,r){let i=ec(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,l;if(_c(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),l=n.enter(`label`);let u=o.move(`[`);return u+=o.move(n.containerPhrasing(e,{before:u,after:`](`,...o.current()})),u+=o.move(`](`),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter(`destinationLiteral`),u+=o.move(`<`),u+=o.move(n.safe(e.url,{before:u,after:`>`,...o.current()})),u+=o.move(`>`)):(l=n.enter(`destinationRaw`),u+=o.move(n.safe(e.url,{before:u,after:e.title?` `:`)`,...o.current()}))),l(),e.title&&(l=n.enter(`title${a}`),u+=o.move(` `+i),u+=o.move(n.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),l()),u+=o.move(`)`),s(),u}function yc(e,t,n){return _c(e,n)?`<`:`[`}bc.peek=xc;function bc(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),l=s.move(`[`),u=n.containerPhrasing(e,{before:l,after:`]`,...s.current()});l+=s.move(u+`][`),o();let d=n.stack;n.stack=[],o=n.enter(`reference`);let f=n.safe(n.associationId(e),{before:l,after:`]`,...s.current()});return o(),n.stack=d,a(),i===`full`||!u||u!==f?l+=s.move(f+`]`):i===`shortcut`?l=l.slice(0,-1):l+=s.move(`]`),l}function xc(){return`[`}function Sc(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Cc(e){let t=Sc(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function wc(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Tc(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Ec(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?wc(n):Sc(n),s=e.ordered?o===`.`?`)`:`.`:Cc(n),l=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Tc(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){l=!0;break}}}}l&&(o=s),n.bulletCurrent=o;let u=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),u}function Dc(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Oc(e,t,n,r){let i=Dc(n),a=n.bulletCurrent||Sc(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let l=n.enter(`listItem`),u=n.indentLines(n.containerFlow(e,s.current()),d);return l(),u;function d(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function kc(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var Ac=Pa([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function jc(e,t,n,r){return(e.children.some(function(e){return Ac(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Mc(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Nc.peek=Pc;function Nc(e,t,n,r){let i=Mc(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),l=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),u=l.charCodeAt(0),d=ic(r.before.charCodeAt(r.before.length-1),u,i);d.inside&&(l=rc(u)+l.slice(1));let f=l.charCodeAt(l.length-1),p=ic(r.after.charCodeAt(0),f,i);p.inside&&(l=l.slice(0,-1)+rc(f));let m=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},s+l+m}function Pc(e,t,n){return n.options.strong||`*`}function Fc(e,t,n,r){return n.safe(e.value,r)}function Ic(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Lc(e,t,n){let r=(Tc(n)+(n.options.ruleSpaces?` `:``)).repeat(Ic(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Rc={blockquote:Ws,break:Js,code:Qs,definition:tc,emphasis:ac,hardBreak:Js,heading:cc,html:lc,image:dc,imageReference:pc,inlineCode:hc,link:vc,linkReference:bc,list:Ec,listItem:Oc,paragraph:kc,root:jc,strong:Nc,text:Fc,thematicBreak:Lc};function zc(){return{enter:{table:Bc,tableData:Wc,tableHeader:Wc,tableRow:Hc},exit:{codeText:Gc,table:Vc,tableData:Uc,tableHeader:Uc,tableRow:Uc}}}function Bc(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Vc(e){this.exit(e),this.data.inTable=void 0}function Hc(e){this.enter({type:`tableRow`,children:[]},e)}function Uc(e){this.exit(e)}function Wc(e){this.enter({type:`tableCell`,children:[]},e)}function Gc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Kc));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Kc(e,t){return t===`|`?t:e}function qc(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
37
37
|
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:p,table:o,tableCell:l,tableRow:s}};function o(e,t,n,r){return u(d(e,n,r),e.align)}function s(e,t,n,r){let i=u([f(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
38
38
|
`))}function l(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function u(e,t){return zs(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=f(r[i],t,n);return o(),a}function f(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=l(r[i],e,t,n);return o(),a}function p(e,t,n){let r=Rc.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function Jc(){return{exit:{taskListCheckValueChecked:Xc,taskListCheckValueUnchecked:Xc,paragraph:Zc}}}function Yc(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:Qc}}}function Xc(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Zc(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Qc(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let l=Rc.listItem(e,t,n,{...r,...s.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(e){return e+o}}function $c(){return[rs(),Ds(),Ms(),zc(),Jc()]}function el(e){return{extensions:[is(),Os(e),Ns(),qc(e),Yc()]}}var tl={tokenize:hl,partial:!0},nl={tokenize:gl,partial:!0},rl={tokenize:_l,partial:!0},il={tokenize:vl,partial:!0},al={tokenize:yl,partial:!0},ol={name:`wwwAutolink`,tokenize:pl,previous:bl},sl={name:`protocolAutolink`,tokenize:ml,previous:xl},cl={name:`emailAutolink`,tokenize:fl,previous:Sl},ll={};function ul(){return{text:ll}}for(var dl=48;dl<123;)ll[dl]=cl,dl++,dl===58?dl=65:dl===91&&(dl=97);ll[43]=cl,ll[45]=cl,ll[46]=cl,ll[95]=cl,ll[72]=[cl,sl],ll[104]=[cl,sl],ll[87]=[cl,ol],ll[119]=[cl,ol];function fl(e,t,n){let r=this,i,a;return o;function o(t){return!Cl(t)||!Sl.call(r,r.previous)||wl(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Cl(t)?(e.consume(t),s):t===64?(e.consume(t),l):n(t)}function l(t){return t===46?e.check(al,d,u)(t):t===45||t===95||tn(t)?(a=!0,e.consume(t),l):d(t)}function u(t){return e.consume(t),i=!0,l}function d(o){return a&&i&&en(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function pl(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!bl.call(r,r.previous)||wl(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(tl,e.attempt(nl,e.attempt(rl,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function ml(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&xl.call(r,r.previous)&&!wl(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(en(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),l}return n(t)}function l(t){return t===47?(e.consume(t),a?u:(a=!0,l)):n(t)}function u(t){return t===null||rn(t)||ln(t)||fn(t)||dn(t)?n(t):e.attempt(nl,e.attempt(rl,d),n)(t)}function d(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function hl(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function gl(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(il,l,s)(t):t===null||ln(t)||fn(t)||t!==45&&dn(t)?l(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function l(e){return i||r||!a?n(e):t(e)}}function _l(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(il,t,a)(o):o===null||ln(o)||fn(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function vl(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||ln(o)||fn(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||ln(e)||fn(e)?t(e):r(e)}function a(e){return en(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):en(t)?(e.consume(t),o):n(t)}}function yl(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return tn(e)?n(e):t(e)}}function bl(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ln(e)}function xl(e){return!en(e)}function Sl(e){return!(e===47||Cl(e))}function Cl(e){return e===43||e===45||e===46||e===95||tn(e)}function wl(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Tl={tokenize:Nl,partial:!0};function El(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Al,continuation:{tokenize:jl},exit:Ml}},text:{91:{name:`gfmFootnoteCall`,tokenize:kl},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Dl,resolveTo:Ol}}}}function Dl(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=$t(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Ol(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function kl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(s){if(a>999||s===93&&!o||s===null||s===91||ln(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes($t(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return ln(s)||(o=!0),a++,e.consume(s),s===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),a++,u):u(t)}}function Al(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return l;function l(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),u}function u(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,d):n(t)}function d(t){if(o>999||t===93&&!s||t===null||t===91||ln(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=$t(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),p}return ln(t)||(s=!0),o++,e.consume(t),t===92?f:d}function f(t){return t===91||t===92||t===93?(e.consume(t),o++,d):d(t)}function p(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),hn(e,m,`gfmFootnoteDefinitionWhitespace`)):n(t)}function m(e){return t(e)}}function jl(e,t,n){return e.check(An,t,e.attempt(Tl,t,n))}function Ml(e){e.exit(`gfmFootnoteDefinition`)}function Nl(e,t,n){let r=this;return hn(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Pl(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Kt(o,o.length,0,Cn(s,e.slice(r+1,n),t)),Kt(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Kt(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),l(t))}function l(a){let s=Sn(i);if(a===126)return o>1?r(a):(e.consume(a),o++,l);if(o<2&&!t)return r(a);let u=e.exit(`strikethroughSequenceTemporary`),d=Sn(a);return u._open=!d||d===2&&!!s,u._close=!s||s===2&&!!d,n(a)}}}var Fl=class{constructor(){this.map=[]}add(e,t,n){Il(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Il(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Ll(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Rl(){return{flow:{null:{name:`table`,tokenize:zl,resolveAll:Bl}}}}function zl(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?C:l;return a===C&&r.parser.lazy[r.now().line]?n(e):a(e)}function l(t){return e.enter(`tableHead`),e.enter(`tableRow`),u(t)}function u(e){return e===124?d(e):(o=!0,a+=1,d(e))}function d(t){return t===null?n(t):cn(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),m):n(t):un(t)?hn(e,d,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,d):(e.enter(`data`),f(t)))}function f(t){return t===null||t===124||ln(t)?(e.exit(`data`),d(t)):(e.consume(t),t===92?p:f)}function p(t){return t===92||t===124?(e.consume(t),f):f(t)}function m(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,un(t)?hn(e,h,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):h(t))}function h(t){return t===45||t===58?_(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),g):S(t)}function g(t){return un(t)?hn(e,_,`whitespace`)(t):_(t)}function _(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),v):t===45?(a+=1,v(t)):t===null||cn(t)?x(t):S(t)}function v(t){return t===45?(e.enter(`tableDelimiterFiller`),y(t)):S(t)}function y(t){return t===45?(e.consume(t),y):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),b):(e.exit(`tableDelimiterFiller`),b(t))}function b(t){return un(t)?hn(e,x,`whitespace`)(t):x(t)}function x(n){return n===124?h(n):n===null||cn(n)?!o||i!==a?S(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):S(n)}function S(e){return n(e)}function C(t){return e.enter(`tableRow`),w(t)}function w(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),w):n===null||cn(n)?(e.exit(`tableRow`),t(n)):un(n)?hn(e,w,`whitespace`)(n):(e.enter(`data`),T(n))}function T(t){return t===null||t===124||ln(t)?(e.exit(`data`),w(t)):(e.consume(t),t===92?E:T)}function E(t){return t===92||t===124?(e.consume(t),T):T(t)}}function Bl(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,l=0,u,d,f,p=new Fl;for(;++n<e.length;){let m=e[n],h=m[1];m[0]===`enter`?h.type===`tableHead`?(s=!1,l!==0&&(Hl(p,t,l,u,d),d=void 0,l=0),u={type:`table`,start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(n,0,[[`enter`,u,t]])):h.type===`tableRow`||h.type===`tableDelimiterRow`?(r=!0,f=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,d={type:`tableBody`,start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(n,0,[[`enter`,d,t]])),i=h.type===`tableDelimiterRow`?2:d?3:1):i&&(h.type===`data`||h.type===`tableDelimiterMarker`||h.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],f=Vl(p,t,a,i,void 0,f),a=[0,0,0,0]),o[2]=n)):h.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],f=Vl(p,t,a,i,void 0,f)),a=o,o=[a[1],n,0,0])):h.type===`tableHead`?(s=!0,l=n):h.type===`tableRow`||h.type===`tableDelimiterRow`?(l=n,a[1]===0?o[1]!==0&&(f=Vl(p,t,o,i,n,f)):(o[0]=o[1],f=Vl(p,t,a,i,n,f)),i=0):i&&(h.type===`data`||h.type===`tableDelimiterMarker`||h.type===`tableDelimiterFiller`)&&(o[3]=n)}for(l!==0&&Hl(p,t,l,u,d),p.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Ll(t.events,n))}return e}function Vl(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Ul(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Ul(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Ul(t.events,n[2]),a=Ul(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Ul(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Hl(e,t,n,r,i){let a=[],o=Ul(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Ul(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Wl={name:`tasklistCheck`,tokenize:Kl};function Gl(){return{text:{91:Wl}}}function Kl(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return ln(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return cn(r)?t(r):un(r)?e.check({tokenize:ql},t,n)(r):n(r)}}function ql(e,t,n){return hn(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Jl(e){return Yt([ul(),El(),Pl(e),Rl(),Gl()])}var Yl={};function Xl(e){let t=this,n=e||Yl,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Jl(n)),a.push($c()),o.push(el(n))}var Zl=/[#.]/g;function Ql(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){Zl.lastIndex=i;let e=Zl.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function $l(e,t,n){let r=n?au(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=Ql(n,t);let s=o.tagName.toLowerCase(),l=r?r.get(s):void 0;if(o.tagName=l||s,eu(i))a.unshift(i);else for(let[t,n]of Object.entries(i))tu(e,o.properties,t,n)}for(let e of a)nu(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function eu(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function tu(e,t,n,r){let i=Ue(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?Je(r):i.commaSeparated?ae(r):i.commaOrSpaceSeparated?Je(ae(r).join(` `)):ru(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?iu(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(ru(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function nu(e,t){if(t!=null){if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)nu(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?nu(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}}function ru(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||he(n)===he(t)))return!0}return n}function iu(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function au(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var ou=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),su=$l(Ke,`div`),cu=$l(qe,`g`,ou);function lu(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=uu(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=uu(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function uu(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
|
|
39
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var du={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`},fu={}.hasOwnProperty,pu=Object.prototype;function mu(e,t){let n=t||{};return hu({file:n.file||void 0,location:!1,schema:n.space===`svg`?qe:Ke,verbose:n.verbose||!1},e)}function hu(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},vu(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:gu(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=lu(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},vu(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},vu(e,r,n),n}default:return n=_u(e,t),n}}function gu(e,t){let n=-1,r=[];for(;++n<t.length;){let i=hu(e,t[n]);r.push(i)}return r}function _u(e,t){let n=e.schema;e.schema=t.namespaceURI===du.svg?qe:Ke;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;fu.call(pu,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?cu:su)(t.tagName,i,gu(e,t.childNodes));if(vu(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&bu(r.startTag),o=r&&r.endTag&&bu(r.endTag),s=hu(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function vu(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=yu(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function yu(e,t,n){let r=bu(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)fu.call(n.attrs,i)&&(r[Ue(e.schema,i).property]=bu(n.attrs[i]));n.startTag;let a=bu(n.startTag),o=n.endTag?bu(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function bu(e){let t=xu({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=xu({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function xu(e){return e.line&&e.column?e:void 0}var Su={},Cu={}.hasOwnProperty,wu=Us(`type`,{handlers:{root:Eu,element:ju,text:ku,comment:Au,doctype:Ou}});function Tu(e,t){let n=(t||Su).space;return wu(e,n===`svg`?qe:Ke)}function Eu(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=Nu(e.children,n,t),Pu(e,n),n}function Du(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=Nu(e.children,n,t),Pu(e,n),n}function Ou(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return Pu(e,t),t}function ku(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return Pu(e,t),t}function Au(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return Pu(e,t),t}function ju(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=qe);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&Cu.call(e.properties,a)){let t=Mu(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:du[o],childNodes:[],parentNode:null};return s.childNodes=Nu(e.children,s,r),Pu(e,s),e.tagName===`template`&&e.content&&(s.content=Du(e.content,r)),s}function Mu(e,t,n){let r=Ue(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?oe(n):Ye(n));let i={name:r.attribute,value:n===!0?``:String(n)};if(r.space&&r.space!==`html`&&r.space!==`svg`){let e=i.name.indexOf(`:`);e<0?i.prefix=``:(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=du[r.space]}return i}function Nu(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=wu(e[r],n);a.parentNode=t,i.push(a)}return i}function Pu(e,t){let n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}var Fu=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Iu=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Lu;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(Lu||={});var Ru={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function zu(e){return e>=55296&&e<=57343}function Bu(e){return e>=56320&&e<=57343}function Vu(e,t){return(e-55296)*1024+9216+t}function Hu(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Uu(e){return e>=64976&&e<=65007||Iu.has(e)}var Wu;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(Wu||={});var Gu=65536,Ku=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Gu,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(Bu(t))return this.pos++,this._addGap(),Vu(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Lu.EOF;return this._err(Wu.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Lu.EOF;let n=this.html.charCodeAt(t);return n===Lu.CARRIAGE_RETURN?Lu.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Lu.EOF;let e=this.html.charCodeAt(this.pos);return e===Lu.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,Lu.LINE_FEED):e===Lu.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,zu(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===Lu.LINE_FEED||e===Lu.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){Hu(e)?this._err(Wu.controlCharacterInInputStream):Uu(e)&&this._err(Wu.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},qu;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(qu||={});function Ju(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var Yu=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),Xu=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);String.fromCodePoint;function Zu(e){return e>=55296&&e<=57343||e>1114111?65533:Xu.get(e)??e}var Qu;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(Qu||={});var $u=32,ed;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(ed||={});function td(e){return e>=Qu.ZERO&&e<=Qu.NINE}function nd(e){return e>=Qu.UPPER_A&&e<=Qu.UPPER_F||e>=Qu.LOWER_A&&e<=Qu.LOWER_F}function rd(e){return e>=Qu.UPPER_A&&e<=Qu.UPPER_Z||e>=Qu.LOWER_A&&e<=Qu.LOWER_Z||td(e)}function eee(e){return e===Qu.EQUALS||rd(e)}var id;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(id||={});var ad;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(ad||={});var od=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=id.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ad.Strict}startEntity(e){this.decodeMode=e,this.state=id.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case id.EntityStart:return e.charCodeAt(t)===Qu.NUM?(this.state=id.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=id.NamedEntity,this.stateNamedEntity(e,t));case id.NumericStart:return this.stateNumericStart(e,t);case id.NumericDecimal:return this.stateNumericDecimal(e,t);case id.NumericHex:return this.stateNumericHex(e,t);case id.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|$u)===Qu.LOWER_X?(this.state=id.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=id.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(td(r)||nd(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(td(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Qu.SEMI)this.consumed+=1;else if(this.decodeMode===ad.Strict)return 0;return this.emitCodePoint(Zu(this.result),this.consumed),this.errors&&(e!==Qu.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&ed.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=sd(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===ad.Attribute&&(i===0||eee(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&ed.VALUE_LENGTH)>>14,i!==0){if(a===Qu.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==ad.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&ed.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~ed.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case id.NamedEntity:return this.result!==0&&(this.decodeMode!==ad.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case id.NumericDecimal:return this.emitNumericEntity(0,2);case id.NumericHex:return this.emitNumericEntity(0,3);case id.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case id.EntityStart:return 0}}};function sd(e,t,n,r){let i=(t&ed.BRANCH_LENGTH)>>7,a=t&ed.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var cd;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(cd||={});var ld;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(ld||={});var ud;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(ud||={});var dd;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(dd||={});var U;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(U||={});var fd=new Map([[dd.A,U.A],[dd.ADDRESS,U.ADDRESS],[dd.ANNOTATION_XML,U.ANNOTATION_XML],[dd.APPLET,U.APPLET],[dd.AREA,U.AREA],[dd.ARTICLE,U.ARTICLE],[dd.ASIDE,U.ASIDE],[dd.B,U.B],[dd.BASE,U.BASE],[dd.BASEFONT,U.BASEFONT],[dd.BGSOUND,U.BGSOUND],[dd.BIG,U.BIG],[dd.BLOCKQUOTE,U.BLOCKQUOTE],[dd.BODY,U.BODY],[dd.BR,U.BR],[dd.BUTTON,U.BUTTON],[dd.CAPTION,U.CAPTION],[dd.CENTER,U.CENTER],[dd.CODE,U.CODE],[dd.COL,U.COL],[dd.COLGROUP,U.COLGROUP],[dd.DD,U.DD],[dd.DESC,U.DESC],[dd.DETAILS,U.DETAILS],[dd.DIALOG,U.DIALOG],[dd.DIR,U.DIR],[dd.DIV,U.DIV],[dd.DL,U.DL],[dd.DT,U.DT],[dd.EM,U.EM],[dd.EMBED,U.EMBED],[dd.FIELDSET,U.FIELDSET],[dd.FIGCAPTION,U.FIGCAPTION],[dd.FIGURE,U.FIGURE],[dd.FONT,U.FONT],[dd.FOOTER,U.FOOTER],[dd.FOREIGN_OBJECT,U.FOREIGN_OBJECT],[dd.FORM,U.FORM],[dd.FRAME,U.FRAME],[dd.FRAMESET,U.FRAMESET],[dd.H1,U.H1],[dd.H2,U.H2],[dd.H3,U.H3],[dd.H4,U.H4],[dd.H5,U.H5],[dd.H6,U.H6],[dd.HEAD,U.HEAD],[dd.HEADER,U.HEADER],[dd.HGROUP,U.HGROUP],[dd.HR,U.HR],[dd.HTML,U.HTML],[dd.I,U.I],[dd.IMG,U.IMG],[dd.IMAGE,U.IMAGE],[dd.INPUT,U.INPUT],[dd.IFRAME,U.IFRAME],[dd.KEYGEN,U.KEYGEN],[dd.LABEL,U.LABEL],[dd.LI,U.LI],[dd.LINK,U.LINK],[dd.LISTING,U.LISTING],[dd.MAIN,U.MAIN],[dd.MALIGNMARK,U.MALIGNMARK],[dd.MARQUEE,U.MARQUEE],[dd.MATH,U.MATH],[dd.MENU,U.MENU],[dd.META,U.META],[dd.MGLYPH,U.MGLYPH],[dd.MI,U.MI],[dd.MO,U.MO],[dd.MN,U.MN],[dd.MS,U.MS],[dd.MTEXT,U.MTEXT],[dd.NAV,U.NAV],[dd.NOBR,U.NOBR],[dd.NOFRAMES,U.NOFRAMES],[dd.NOEMBED,U.NOEMBED],[dd.NOSCRIPT,U.NOSCRIPT],[dd.OBJECT,U.OBJECT],[dd.OL,U.OL],[dd.OPTGROUP,U.OPTGROUP],[dd.OPTION,U.OPTION],[dd.P,U.P],[dd.PARAM,U.PARAM],[dd.PLAINTEXT,U.PLAINTEXT],[dd.PRE,U.PRE],[dd.RB,U.RB],[dd.RP,U.RP],[dd.RT,U.RT],[dd.RTC,U.RTC],[dd.RUBY,U.RUBY],[dd.S,U.S],[dd.SCRIPT,U.SCRIPT],[dd.SEARCH,U.SEARCH],[dd.SECTION,U.SECTION],[dd.SELECT,U.SELECT],[dd.SOURCE,U.SOURCE],[dd.SMALL,U.SMALL],[dd.SPAN,U.SPAN],[dd.STRIKE,U.STRIKE],[dd.STRONG,U.STRONG],[dd.STYLE,U.STYLE],[dd.SUB,U.SUB],[dd.SUMMARY,U.SUMMARY],[dd.SUP,U.SUP],[dd.TABLE,U.TABLE],[dd.TBODY,U.TBODY],[dd.TEMPLATE,U.TEMPLATE],[dd.TEXTAREA,U.TEXTAREA],[dd.TFOOT,U.TFOOT],[dd.TD,U.TD],[dd.TH,U.TH],[dd.THEAD,U.THEAD],[dd.TITLE,U.TITLE],[dd.TR,U.TR],[dd.TRACK,U.TRACK],[dd.TT,U.TT],[dd.U,U.U],[dd.UL,U.UL],[dd.SVG,U.SVG],[dd.VAR,U.VAR],[dd.WBR,U.WBR],[dd.XMP,U.XMP]]);function pd(e){return fd.get(e)??U.UNKNOWN}var md=U,hd={[cd.HTML]:new Set([md.ADDRESS,md.APPLET,md.AREA,md.ARTICLE,md.ASIDE,md.BASE,md.BASEFONT,md.BGSOUND,md.BLOCKQUOTE,md.BODY,md.BR,md.BUTTON,md.CAPTION,md.CENTER,md.COL,md.COLGROUP,md.DD,md.DETAILS,md.DIR,md.DIV,md.DL,md.DT,md.EMBED,md.FIELDSET,md.FIGCAPTION,md.FIGURE,md.FOOTER,md.FORM,md.FRAME,md.FRAMESET,md.H1,md.H2,md.H3,md.H4,md.H5,md.H6,md.HEAD,md.HEADER,md.HGROUP,md.HR,md.HTML,md.IFRAME,md.IMG,md.INPUT,md.LI,md.LINK,md.LISTING,md.MAIN,md.MARQUEE,md.MENU,md.META,md.NAV,md.NOEMBED,md.NOFRAMES,md.NOSCRIPT,md.OBJECT,md.OL,md.P,md.PARAM,md.PLAINTEXT,md.PRE,md.SCRIPT,md.SECTION,md.SELECT,md.SOURCE,md.STYLE,md.SUMMARY,md.TABLE,md.TBODY,md.TD,md.TEMPLATE,md.TEXTAREA,md.TFOOT,md.TH,md.THEAD,md.TITLE,md.TR,md.TRACK,md.UL,md.WBR,md.XMP]),[cd.MATHML]:new Set([md.MI,md.MO,md.MN,md.MS,md.MTEXT,md.ANNOTATION_XML]),[cd.SVG]:new Set([md.TITLE,md.FOREIGN_OBJECT,md.DESC]),[cd.XLINK]:new Set,[cd.XML]:new Set,[cd.XMLNS]:new Set},gd=new Set([md.H1,md.H2,md.H3,md.H4,md.H5,md.H6]);dd.STYLE,dd.SCRIPT,dd.XMP,dd.IFRAME,dd.NOEMBED,dd.NOFRAMES,dd.PLAINTEXT;var _d;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(_d||={});var vd={DATA:_d.DATA,RCDATA:_d.RCDATA,RAWTEXT:_d.RAWTEXT,SCRIPT_DATA:_d.SCRIPT_DATA,PLAINTEXT:_d.PLAINTEXT,CDATA_SECTION:_d.CDATA_SECTION};function yd(e){return e>=Lu.DIGIT_0&&e<=Lu.DIGIT_9}function bd(e){return e>=Lu.LATIN_CAPITAL_A&&e<=Lu.LATIN_CAPITAL_Z}function xd(e){return e>=Lu.LATIN_SMALL_A&&e<=Lu.LATIN_SMALL_Z}function Sd(e){return xd(e)||bd(e)}function Cd(e){return Sd(e)||yd(e)}function wd(e){return e+32}function Td(e){return e===Lu.SPACE||e===Lu.LINE_FEED||e===Lu.TABULATION||e===Lu.FORM_FEED}function Ed(e){return Td(e)||e===Lu.SOLIDUS||e===Lu.GREATER_THAN_SIGN}function Dd(e){return e===Lu.NULL?Wu.nullCharacterReference:e>1114111?Wu.characterReferenceOutsideUnicodeRange:zu(e)?Wu.surrogateCharacterReference:Uu(e)?Wu.noncharacterCharacterReference:Hu(e)||e===Lu.CARRIAGE_RETURN?Wu.controlCharacterReference:null}var Od=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=_d.DATA,this.returnState=_d.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new Ku(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new od(Yu,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Wu.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(Wu.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=Dd(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:qu.START_TAG,tagName:``,tagID:U.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:qu.END_TAG,tagName:``,tagID:U.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:qu.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:qu.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(Ju(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(Wu.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=pd(e.tagName),e.type===qu.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(Wu.endTagWithAttributes),e.selfClosing&&this._err(Wu.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case qu.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case qu.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case qu.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:qu.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){let t=Td(e)?qu.WHITESPACE_CHARACTER:e===Lu.NULL?qu.NULL_CHARACTER:qu.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(qu.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=_d.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ad.Attribute:ad.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===_d.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===_d.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===_d.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case _d.DATA:this._stateData(e);break;case _d.RCDATA:this._stateRcdata(e);break;case _d.RAWTEXT:this._stateRawtext(e);break;case _d.SCRIPT_DATA:this._stateScriptData(e);break;case _d.PLAINTEXT:this._statePlaintext(e);break;case _d.TAG_OPEN:this._stateTagOpen(e);break;case _d.END_TAG_OPEN:this._stateEndTagOpen(e);break;case _d.TAG_NAME:this._stateTagName(e);break;case _d.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case _d.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case _d.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case _d.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case _d.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case _d.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case _d.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case _d.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case _d.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case _d.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case _d.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case _d.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case _d.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case _d.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case _d.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case _d.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case _d.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case _d.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case _d.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case _d.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case _d.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case _d.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case _d.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case _d.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case _d.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case _d.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case _d.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case _d.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case _d.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case _d.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case _d.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case _d.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case _d.BOGUS_COMMENT:this._stateBogusComment(e);break;case _d.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case _d.COMMENT_START:this._stateCommentStart(e);break;case _d.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case _d.COMMENT:this._stateComment(e);break;case _d.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case _d.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case _d.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case _d.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case _d.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case _d.COMMENT_END:this._stateCommentEnd(e);break;case _d.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case _d.DOCTYPE:this._stateDoctype(e);break;case _d.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case _d.DOCTYPE_NAME:this._stateDoctypeName(e);break;case _d.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case _d.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case _d.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case _d.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case _d.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case _d.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case _d.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case _d.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case _d.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case _d.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case _d.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case _d.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case _d.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case _d.CDATA_SECTION:this._stateCdataSection(e);break;case _d.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case _d.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case _d.CHARACTER_REFERENCE:this._stateCharacterReference();break;case _d.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case Lu.LESS_THAN_SIGN:this.state=_d.TAG_OPEN;break;case Lu.AMPERSAND:this._startCharacterReference();break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this._emitCodePoint(e);break;case Lu.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case Lu.AMPERSAND:this._startCharacterReference();break;case Lu.LESS_THAN_SIGN:this.state=_d.RCDATA_LESS_THAN_SIGN;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this._emitChars(`�`);break;case Lu.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case Lu.LESS_THAN_SIGN:this.state=_d.RAWTEXT_LESS_THAN_SIGN;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this._emitChars(`�`);break;case Lu.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case Lu.LESS_THAN_SIGN:this.state=_d.SCRIPT_DATA_LESS_THAN_SIGN;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this._emitChars(`�`);break;case Lu.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this._emitChars(`�`);break;case Lu.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Sd(e))this._createStartTagToken(),this.state=_d.TAG_NAME,this._stateTagName(e);else switch(e){case Lu.EXCLAMATION_MARK:this.state=_d.MARKUP_DECLARATION_OPEN;break;case Lu.SOLIDUS:this.state=_d.END_TAG_OPEN;break;case Lu.QUESTION_MARK:this._err(Wu.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=_d.BOGUS_COMMENT,this._stateBogusComment(e);break;case Lu.EOF:this._err(Wu.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(Wu.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=_d.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Sd(e))this._createEndTagToken(),this.state=_d.TAG_NAME,this._stateTagName(e);else switch(e){case Lu.GREATER_THAN_SIGN:this._err(Wu.missingEndTagName),this.state=_d.DATA;break;case Lu.EOF:this._err(Wu.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(Wu.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=_d.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:this.state=_d.BEFORE_ATTRIBUTE_NAME;break;case Lu.SOLIDUS:this.state=_d.SELF_CLOSING_START_TAG;break;case Lu.GREATER_THAN_SIGN:this.state=_d.DATA,this.emitCurrentTagToken();break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),t.tagName+=`�`;break;case Lu.EOF:this._err(Wu.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(bd(e)?wd(e):e)}}_stateRcdataLessThanSign(e){e===Lu.SOLIDUS?this.state=_d.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=_d.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){Sd(e)?(this.state=_d.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=_d.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=_d.BEFORE_ATTRIBUTE_NAME,!1;case Lu.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=_d.SELF_CLOSING_START_TAG,!1;case Lu.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=_d.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=_d.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===Lu.SOLIDUS?this.state=_d.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=_d.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){Sd(e)?(this.state=_d.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=_d.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=_d.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case Lu.SOLIDUS:this.state=_d.SCRIPT_DATA_END_TAG_OPEN;break;case Lu.EXCLAMATION_MARK:this.state=_d.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=_d.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){Sd(e)?(this.state=_d.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=_d.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=_d.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===Lu.HYPHEN_MINUS?(this.state=_d.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=_d.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===Lu.HYPHEN_MINUS?(this.state=_d.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=_d.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case Lu.HYPHEN_MINUS:this.state=_d.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case Lu.LESS_THAN_SIGN:this.state=_d.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this._emitChars(`�`);break;case Lu.EOF:this._err(Wu.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case Lu.HYPHEN_MINUS:this.state=_d.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case Lu.LESS_THAN_SIGN:this.state=_d.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this.state=_d.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case Lu.EOF:this._err(Wu.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=_d.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case Lu.HYPHEN_MINUS:this._emitChars(`-`);break;case Lu.LESS_THAN_SIGN:this.state=_d.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Lu.GREATER_THAN_SIGN:this.state=_d.SCRIPT_DATA,this._emitChars(`>`);break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this.state=_d.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case Lu.EOF:this._err(Wu.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=_d.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===Lu.SOLIDUS?this.state=_d.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Sd(e)?(this._emitChars(`<`),this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=_d.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Sd(e)?(this.state=_d.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=_d.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=_d.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Ru.SCRIPT,!1)&&Ed(this.preprocessor.peek(Ru.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<Ru.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=_d.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case Lu.HYPHEN_MINUS:this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case Lu.LESS_THAN_SIGN:this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this._emitChars(`�`);break;case Lu.EOF:this._err(Wu.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case Lu.HYPHEN_MINUS:this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case Lu.LESS_THAN_SIGN:this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case Lu.EOF:this._err(Wu.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case Lu.HYPHEN_MINUS:this._emitChars(`-`);break;case Lu.LESS_THAN_SIGN:this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case Lu.GREATER_THAN_SIGN:this.state=_d.SCRIPT_DATA,this._emitChars(`>`);break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case Lu.EOF:this._err(Wu.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===Lu.SOLIDUS?(this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Ru.SCRIPT,!1)&&Ed(this.preprocessor.peek(Ru.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<Ru.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=_d.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:break;case Lu.SOLIDUS:case Lu.GREATER_THAN_SIGN:case Lu.EOF:this.state=_d.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Lu.EQUALS_SIGN:this._err(Wu.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=_d.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=_d.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:case Lu.SOLIDUS:case Lu.GREATER_THAN_SIGN:case Lu.EOF:this._leaveAttrName(),this.state=_d.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Lu.EQUALS_SIGN:this._leaveAttrName(),this.state=_d.BEFORE_ATTRIBUTE_VALUE;break;case Lu.QUOTATION_MARK:case Lu.APOSTROPHE:case Lu.LESS_THAN_SIGN:this._err(Wu.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(bd(e)?wd(e):e)}}_stateAfterAttributeName(e){switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:break;case Lu.SOLIDUS:this.state=_d.SELF_CLOSING_START_TAG;break;case Lu.EQUALS_SIGN:this.state=_d.BEFORE_ATTRIBUTE_VALUE;break;case Lu.GREATER_THAN_SIGN:this.state=_d.DATA,this.emitCurrentTagToken();break;case Lu.EOF:this._err(Wu.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=_d.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:break;case Lu.QUOTATION_MARK:this.state=_d.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case Lu.APOSTROPHE:this.state=_d.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.missingAttributeValue),this.state=_d.DATA,this.emitCurrentTagToken();break;default:this.state=_d.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case Lu.QUOTATION_MARK:this.state=_d.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Lu.AMPERSAND:this._startCharacterReference();break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case Lu.EOF:this._err(Wu.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case Lu.APOSTROPHE:this.state=_d.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Lu.AMPERSAND:this._startCharacterReference();break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case Lu.EOF:this._err(Wu.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:this._leaveAttrValue(),this.state=_d.BEFORE_ATTRIBUTE_NAME;break;case Lu.AMPERSAND:this._startCharacterReference();break;case Lu.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=_d.DATA,this.emitCurrentTagToken();break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case Lu.QUOTATION_MARK:case Lu.APOSTROPHE:case Lu.LESS_THAN_SIGN:case Lu.EQUALS_SIGN:case Lu.GRAVE_ACCENT:this._err(Wu.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case Lu.EOF:this._err(Wu.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:this._leaveAttrValue(),this.state=_d.BEFORE_ATTRIBUTE_NAME;break;case Lu.SOLIDUS:this._leaveAttrValue(),this.state=_d.SELF_CLOSING_START_TAG;break;case Lu.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=_d.DATA,this.emitCurrentTagToken();break;case Lu.EOF:this._err(Wu.eofInTag),this._emitEOFToken();break;default:this._err(Wu.missingWhitespaceBetweenAttributes),this.state=_d.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case Lu.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=_d.DATA,this.emitCurrentTagToken();break}case Lu.EOF:this._err(Wu.eofInTag),this._emitEOFToken();break;default:this._err(Wu.unexpectedSolidusInTag),this.state=_d.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case Lu.GREATER_THAN_SIGN:this.state=_d.DATA,this.emitCurrentComment(t);break;case Lu.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Ru.DASH_DASH,!0)?(this._createCommentToken(Ru.DASH_DASH.length+1),this.state=_d.COMMENT_START):this._consumeSequenceIfMatch(Ru.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ru.DOCTYPE.length+1),this.state=_d.DOCTYPE):this._consumeSequenceIfMatch(Ru.CDATA_START,!0)?this.inForeignNode?this.state=_d.CDATA_SECTION:(this._err(Wu.cdataInHtmlContent),this._createCommentToken(Ru.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=_d.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Wu.incorrectlyOpenedComment),this._createCommentToken(2),this.state=_d.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case Lu.HYPHEN_MINUS:this.state=_d.COMMENT_START_DASH;break;case Lu.GREATER_THAN_SIGN:{this._err(Wu.abruptClosingOfEmptyComment),this.state=_d.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=_d.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case Lu.HYPHEN_MINUS:this.state=_d.COMMENT_END;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.abruptClosingOfEmptyComment),this.state=_d.DATA,this.emitCurrentComment(t);break;case Lu.EOF:this._err(Wu.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=_d.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case Lu.HYPHEN_MINUS:this.state=_d.COMMENT_END_DASH;break;case Lu.LESS_THAN_SIGN:t.data+=`<`,this.state=_d.COMMENT_LESS_THAN_SIGN;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),t.data+=`�`;break;case Lu.EOF:this._err(Wu.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case Lu.EXCLAMATION_MARK:t.data+=`!`,this.state=_d.COMMENT_LESS_THAN_SIGN_BANG;break;case Lu.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=_d.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===Lu.HYPHEN_MINUS?this.state=_d.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=_d.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===Lu.HYPHEN_MINUS?this.state=_d.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=_d.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==Lu.GREATER_THAN_SIGN&&e!==Lu.EOF&&this._err(Wu.nestedComment),this.state=_d.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case Lu.HYPHEN_MINUS:this.state=_d.COMMENT_END;break;case Lu.EOF:this._err(Wu.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=_d.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case Lu.GREATER_THAN_SIGN:this.state=_d.DATA,this.emitCurrentComment(t);break;case Lu.EXCLAMATION_MARK:this.state=_d.COMMENT_END_BANG;break;case Lu.HYPHEN_MINUS:t.data+=`-`;break;case Lu.EOF:this._err(Wu.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=_d.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case Lu.HYPHEN_MINUS:t.data+=`--!`,this.state=_d.COMMENT_END_DASH;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.incorrectlyClosedComment),this.state=_d.DATA,this.emitCurrentComment(t);break;case Lu.EOF:this._err(Wu.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=_d.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:this.state=_d.BEFORE_DOCTYPE_NAME;break;case Lu.GREATER_THAN_SIGN:this.state=_d.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case Lu.EOF:{this._err(Wu.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(Wu.missingWhitespaceBeforeDoctypeName),this.state=_d.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(bd(e))this._createDoctypeToken(String.fromCharCode(wd(e))),this.state=_d.DOCTYPE_NAME;else switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=_d.DOCTYPE_NAME;break;case Lu.GREATER_THAN_SIGN:{this._err(Wu.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=_d.DATA;break}case Lu.EOF:{this._err(Wu.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=_d.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:this.state=_d.AFTER_DOCTYPE_NAME;break;case Lu.GREATER_THAN_SIGN:this.state=_d.DATA,this.emitCurrentDoctype(t);break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),t.name+=`�`;break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(bd(e)?wd(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:break;case Lu.GREATER_THAN_SIGN:this.state=_d.DATA,this.emitCurrentDoctype(t);break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(Ru.PUBLIC,!1)?this.state=_d.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ru.SYSTEM,!1)?this.state=_d.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Wu.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=_d.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:this.state=_d.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case Lu.QUOTATION_MARK:this._err(Wu.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=_d.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Lu.APOSTROPHE:this._err(Wu.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=_d.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=_d.DATA,this.emitCurrentDoctype(t);break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Wu.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=_d.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:break;case Lu.QUOTATION_MARK:t.publicId=``,this.state=_d.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Lu.APOSTROPHE:t.publicId=``,this.state=_d.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=_d.DATA,this.emitCurrentDoctype(t);break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Wu.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=_d.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case Lu.QUOTATION_MARK:this.state=_d.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),t.publicId+=`�`;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=_d.DATA;break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case Lu.APOSTROPHE:this.state=_d.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),t.publicId+=`�`;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=_d.DATA;break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:this.state=_d.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case Lu.GREATER_THAN_SIGN:this.state=_d.DATA,this.emitCurrentDoctype(t);break;case Lu.QUOTATION_MARK:this._err(Wu.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=_d.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Lu.APOSTROPHE:this._err(Wu.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=_d.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Wu.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_d.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:break;case Lu.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=_d.DATA;break;case Lu.QUOTATION_MARK:t.systemId=``,this.state=_d.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Lu.APOSTROPHE:t.systemId=``,this.state=_d.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Wu.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_d.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:this.state=_d.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case Lu.QUOTATION_MARK:this._err(Wu.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=_d.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Lu.APOSTROPHE:this._err(Wu.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=_d.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_d.DATA,this.emitCurrentDoctype(t);break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Wu.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_d.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:break;case Lu.QUOTATION_MARK:t.systemId=``,this.state=_d.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Lu.APOSTROPHE:t.systemId=``,this.state=_d.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_d.DATA,this.emitCurrentDoctype(t);break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Wu.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_d.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case Lu.QUOTATION_MARK:this.state=_d.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),t.systemId+=`�`;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=_d.DATA;break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case Lu.APOSTROPHE:this.state=_d.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),t.systemId+=`�`;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=_d.DATA;break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:break;case Lu.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=_d.DATA;break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Wu.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=_d.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case Lu.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=_d.DATA;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter);break;case Lu.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case Lu.RIGHT_SQUARE_BRACKET:this.state=_d.CDATA_SECTION_BRACKET;break;case Lu.EOF:this._err(Wu.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===Lu.RIGHT_SQUARE_BRACKET?this.state=_d.CDATA_SECTION_END:(this._emitChars(`]`),this.state=_d.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case Lu.GREATER_THAN_SIGN:this.state=_d.DATA;break;case Lu.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=_d.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0){if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(Lu.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Cd(this.preprocessor.peek(1))?_d.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Cd(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===Lu.SEMICOLON&&this._err(Wu.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},kd=new Set([U.DD,U.DT,U.LI,U.OPTGROUP,U.OPTION,U.P,U.RB,U.RP,U.RT,U.RTC]),Ad=new Set([...kd,U.CAPTION,U.COLGROUP,U.TBODY,U.TD,U.TFOOT,U.TH,U.THEAD,U.TR]),jd=new Set([U.APPLET,U.CAPTION,U.HTML,U.MARQUEE,U.OBJECT,U.TABLE,U.TD,U.TEMPLATE,U.TH]),Md=new Set([...jd,U.OL,U.UL]),Nd=new Set([...jd,U.BUTTON]),Pd=new Set([U.ANNOTATION_XML,U.MI,U.MN,U.MO,U.MS,U.MTEXT]),Fd=new Set([U.DESC,U.FOREIGN_OBJECT,U.TITLE]),Id=new Set([U.TR,U.TEMPLATE,U.HTML]),Ld=new Set([U.TBODY,U.TFOOT,U.THEAD,U.TEMPLATE,U.HTML]),tee=new Set([U.TABLE,U.TEMPLATE,U.HTML]),Rd=new Set([U.TD,U.TH]),zd=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=U.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===U.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===cd.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==cd.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(gd,cd.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Rd,cd.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(tee,cd.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Ld,cd.HTML)}clearBackToTableRowContext(){this.clearBackTo(Id,cd.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===U.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===U.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case cd.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case cd.SVG:if(Fd.has(r))return!1;break;case cd.MATHML:if(Pd.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,jd)}hasInListItemScope(e){return this.hasInDynamicScope(e,Md)}hasInButtonScope(e){return this.hasInDynamicScope(e,Nd)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case cd.HTML:if(gd.has(t))return!0;if(jd.has(t))return!1;break;case cd.SVG:if(Fd.has(t))return!1;break;case cd.MATHML:if(Pd.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===cd.HTML)switch(this.tagIDs[t]){case e:return!0;case U.TABLE:case U.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===cd.HTML)switch(this.tagIDs[e]){case U.TBODY:case U.THEAD:case U.TFOOT:return!0;case U.TABLE:case U.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===cd.HTML)switch(this.tagIDs[t]){case e:return!0;case U.OPTION:case U.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&kd.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Ad.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&Ad.has(this.currentTagId);)this.pop()}},Bd=3,Vd;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(Vd||={});var Hd={type:Vd.Marker},Ud=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===Vd.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<Bd)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<Bd)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=Bd&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(Hd)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:Vd.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:Vd.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(Hd);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===Vd.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===Vd.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===Vd.Element&&t.element===e)}},Wd={createDocument(){return{nodeName:`#document`,mode:ud.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};Wd.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(Wd.isTextNode(n)){n.value+=t;return}}Wd.appendChild(e,Wd.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Wd.isTextNode(r)?r.value+=t:Wd.insertBefore(e,Wd.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName===`#text`},isCommentNode(e){return e.nodeName===`#comment`},isDocumentTypeNode(e){return e.nodeName===`#documentType`},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,`tagName`)},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Gd=`html`,Kd=`about:legacy-compat`,qd=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,Jd=`+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`),Yd=[...Jd,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],Xd=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),Zd=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],Qd=[...Zd,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function $d(e,t){return t.some(t=>e.startsWith(t))}function ef(e){return e.name===Gd&&e.publicId===null&&(e.systemId===null||e.systemId===Kd)}function tf(e){if(e.name!==Gd)return ud.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===qd)return ud.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Xd.has(n))return ud.QUIRKS;let e=t===null?Yd:Jd;if($d(n,e))return ud.QUIRKS;if(e=t===null?Zd:Qd,$d(n,e))return ud.LIMITED_QUIRKS}return ud.NO_QUIRKS}var nf={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},rf=`definitionurl`,af=`definitionURL`,of=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),sf=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:cd.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:cd.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:cd.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:cd.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:cd.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:cd.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:cd.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:cd.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:cd.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:cd.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:cd.XMLNS}]]),cf=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),lf=new Set([U.B,U.BIG,U.BLOCKQUOTE,U.BODY,U.BR,U.CENTER,U.CODE,U.DD,U.DIV,U.DL,U.DT,U.EM,U.EMBED,U.H1,U.H2,U.H3,U.H4,U.H5,U.H6,U.HEAD,U.HR,U.I,U.IMG,U.LI,U.LISTING,U.MENU,U.META,U.NOBR,U.OL,U.P,U.PRE,U.RUBY,U.S,U.SMALL,U.SPAN,U.STRONG,U.STRIKE,U.SUB,U.SUP,U.TABLE,U.TT,U.U,U.UL,U.VAR]);function uf(e){let t=e.tagID;return t===U.FONT&&e.attrs.some(({name:e})=>e===ld.COLOR||e===ld.SIZE||e===ld.FACE)||lf.has(t)}function df(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===rf){e.attrs[t].name=af;break}}function ff(e){for(let t=0;t<e.attrs.length;t++){let n=of.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function pf(e){for(let t=0;t<e.attrs.length;t++){let n=sf.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function mf(e){let t=cf.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=pd(e.tagName))}function hf(e,t){return t===cd.MATHML&&(e===U.MI||e===U.MO||e===U.MN||e===U.MS||e===U.MTEXT)}function gf(e,t,n){if(t===cd.MATHML&&e===U.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===ld.ENCODING){let t=n[e].value.toLowerCase();return t===nf.TEXT_HTML||t===nf.APPLICATION_XML}}return t===cd.SVG&&(e===U.FOREIGN_OBJECT||e===U.DESC||e===U.TITLE)}function _f(e,t,n,r){return(!r||r===cd.HTML)&&gf(e,t,n)||(!r||r===cd.MATHML)&&hf(e,t)}var vf=`hidden`,yf=8,bf=3,xf;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})(xf||={});var Sf={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Cf=new Set([U.TABLE,U.TBODY,U.TFOOT,U.THEAD,U.TR]),wf={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Wd,onParseError:null},Tf=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=xf.INITIAL,this.originalInsertionMode=xf.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...wf,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new Od(this.options,this),this.activeFormattingElements=new Ud(this.treeAdapter),this.fragmentContextID=n?pd(this.treeAdapter.getTagName(n)):U.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new zd(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...wf,...t};e??=n.treeAdapter.createElement(dd.TEMPLATE,cd.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,cd.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===U.TEMPLATE&&i.tmplInsertionModeStack.unshift(xf.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??Sf,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===cd.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,cd.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=xf.TEXT}switchToPlaintextParsing(){this.insertionMode=xf.TEXT,this.originalInsertionMode=xf.IN_BODY,this.tokenizer.state=vd.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===dd.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===cd.HTML)switch(this.fragmentContextID){case U.TITLE:case U.TEXTAREA:this.tokenizer.state=vd.RCDATA;break;case U.STYLE:case U.XMP:case U.IFRAME:case U.NOEMBED:case U.NOFRAMES:case U.NOSCRIPT:this.tokenizer.state=vd.RAWTEXT;break;case U.SCRIPT:this.tokenizer.state=vd.SCRIPT_DATA;break;case U.PLAINTEXT:this.tokenizer.state=vd.PLAINTEXT}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,cd.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,cd.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(dd.HTML,cd.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,U.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===qu.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===U.SVG&&this.treeAdapter.getTagName(t)===dd.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===cd.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===U.MGLYPH||e.tagID===U.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,cd.HTML)}_processToken(e){switch(e.type){case qu.CHARACTER:this.onCharacter(e);break;case qu.NULL_CHARACTER:this.onNullCharacter(e);break;case qu.COMMENT:this.onComment(e);break;case qu.DOCTYPE:this.onDoctype(e);break;case qu.START_TAG:this._processStartTag(e);break;case qu.END_TAG:this.onEndTag(e);break;case qu.EOF:this.onEof(e);break;case qu.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return _f(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===Vd.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=xf.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(U.P),this.openElements.popUntilTagNamePopped(U.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case U.TR:this.insertionMode=xf.IN_ROW;return;case U.TBODY:case U.THEAD:case U.TFOOT:this.insertionMode=xf.IN_TABLE_BODY;return;case U.CAPTION:this.insertionMode=xf.IN_CAPTION;return;case U.COLGROUP:this.insertionMode=xf.IN_COLUMN_GROUP;return;case U.TABLE:this.insertionMode=xf.IN_TABLE;return;case U.BODY:this.insertionMode=xf.IN_BODY;return;case U.FRAMESET:this.insertionMode=xf.IN_FRAMESET;return;case U.SELECT:this._resetInsertionModeForSelect(e);return;case U.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case U.HTML:this.insertionMode=this.headElement?xf.AFTER_HEAD:xf.BEFORE_HEAD;return;case U.TD:case U.TH:if(e>0){this.insertionMode=xf.IN_CELL;return}break;case U.HEAD:if(e>0){this.insertionMode=xf.IN_HEAD;return}}this.insertionMode=xf.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===U.TEMPLATE)break;if(e===U.TABLE){this.insertionMode=xf.IN_SELECT_IN_TABLE;return}}this.insertionMode=xf.IN_SELECT}_isElementCausesFosterParenting(e){return Cf.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case U.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===cd.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case U.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return hd[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){pte(this,e);return}switch(this.insertionMode){case xf.INITIAL:Nf(this,e);break;case xf.BEFORE_HTML:If(this,e);break;case xf.BEFORE_HEAD:Rf(this,e);break;case xf.IN_HEAD:Hf(this,e);break;case xf.IN_HEAD_NO_SCRIPT:Wf(this,e);break;case xf.AFTER_HEAD:Kf(this,e);break;case xf.IN_BODY:case xf.IN_CAPTION:case xf.IN_CELL:case xf.IN_TEMPLATE:Jf(this,e);break;case xf.TEXT:case xf.IN_SELECT:case xf.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case xf.IN_TABLE:case xf.IN_TABLE_BODY:case xf.IN_ROW:Nee(this,e);break;case xf.IN_TABLE_TEXT:Uee(this,e);break;case xf.IN_COLUMN_GROUP:Ep(this,e);break;case xf.AFTER_BODY:Ap(this,e);break;case xf.AFTER_AFTER_BODY:jp(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){fte(this,e);return}switch(this.insertionMode){case xf.INITIAL:Nf(this,e);break;case xf.BEFORE_HTML:If(this,e);break;case xf.BEFORE_HEAD:Rf(this,e);break;case xf.IN_HEAD:Hf(this,e);break;case xf.IN_HEAD_NO_SCRIPT:Wf(this,e);break;case xf.AFTER_HEAD:Kf(this,e);break;case xf.TEXT:this._insertCharacters(e);break;case xf.IN_TABLE:case xf.IN_TABLE_BODY:case xf.IN_ROW:Nee(this,e);break;case xf.IN_COLUMN_GROUP:Ep(this,e);break;case xf.AFTER_BODY:Ap(this,e);break;case xf.AFTER_AFTER_BODY:jp(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){jf(this,e);return}switch(this.insertionMode){case xf.INITIAL:case xf.BEFORE_HTML:case xf.BEFORE_HEAD:case xf.IN_HEAD:case xf.IN_HEAD_NO_SCRIPT:case xf.AFTER_HEAD:case xf.IN_BODY:case xf.IN_TABLE:case xf.IN_CAPTION:case xf.IN_COLUMN_GROUP:case xf.IN_TABLE_BODY:case xf.IN_ROW:case xf.IN_CELL:case xf.IN_SELECT:case xf.IN_SELECT_IN_TABLE:case xf.IN_TEMPLATE:case xf.IN_FRAMESET:case xf.AFTER_FRAMESET:jf(this,e);break;case xf.IN_TABLE_TEXT:wp(this,e);break;case xf.AFTER_BODY:iee(this,e);break;case xf.AFTER_AFTER_BODY:case xf.AFTER_AFTER_FRAMESET:aee(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case xf.INITIAL:oee(this,e);break;case xf.BEFORE_HEAD:case xf.IN_HEAD:case xf.IN_HEAD_NO_SCRIPT:case xf.AFTER_HEAD:this._err(e,Wu.misplacedDoctype);break;case xf.IN_TABLE_TEXT:wp(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,Wu.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?hte(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case xf.INITIAL:Nf(this,e);break;case xf.BEFORE_HTML:Pf(this,e);break;case xf.BEFORE_HEAD:see(this,e);break;case xf.IN_HEAD:zf(this,e);break;case xf.IN_HEAD_NO_SCRIPT:Uf(this,e);break;case xf.AFTER_HEAD:lee(this,e);break;case xf.IN_BODY:mp(this,e);break;case xf.IN_TABLE:xp(this,e);break;case xf.IN_TABLE_TEXT:wp(this,e);break;case xf.IN_CAPTION:Gee(this,e);break;case xf.IN_COLUMN_GROUP:Tp(this,e);break;case xf.IN_TABLE_BODY:Dp(this,e);break;case xf.IN_ROW:kp(this,e);break;case xf.IN_CELL:Yee(this,e);break;case xf.IN_SELECT:Zee(this,e);break;case xf.IN_SELECT_IN_TABLE:$ee(this,e);break;case xf.IN_TEMPLATE:tte(this,e);break;case xf.AFTER_BODY:ite(this,e);break;case xf.IN_FRAMESET:ote(this,e);break;case xf.AFTER_FRAMESET:cte(this,e);break;case xf.AFTER_AFTER_BODY:ute(this,e);break;case xf.AFTER_AFTER_FRAMESET:dte(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?gte(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case xf.INITIAL:Nf(this,e);break;case xf.BEFORE_HTML:Ff(this,e);break;case xf.BEFORE_HEAD:Lf(this,e);break;case xf.IN_HEAD:Bf(this,e);break;case xf.IN_HEAD_NO_SCRIPT:cee(this,e);break;case xf.AFTER_HEAD:Gf(this,e);break;case xf.IN_BODY:bp(this,e);break;case xf.TEXT:jee(this,e);break;case xf.IN_TABLE:Sp(this,e);break;case xf.IN_TABLE_TEXT:wp(this,e);break;case xf.IN_CAPTION:Kee(this,e);break;case xf.IN_COLUMN_GROUP:qee(this,e);break;case xf.IN_TABLE_BODY:Op(this,e);break;case xf.IN_ROW:Jee(this,e);break;case xf.IN_CELL:Xee(this,e);break;case xf.IN_SELECT:Qee(this,e);break;case xf.IN_SELECT_IN_TABLE:ete(this,e);break;case xf.IN_TEMPLATE:nte(this,e);break;case xf.AFTER_BODY:ate(this,e);break;case xf.IN_FRAMESET:ste(this,e);break;case xf.AFTER_FRAMESET:lte(this,e);break;case xf.AFTER_AFTER_BODY:jp(this,e)}}onEof(e){switch(this.insertionMode){case xf.INITIAL:Nf(this,e);break;case xf.BEFORE_HTML:If(this,e);break;case xf.BEFORE_HEAD:Rf(this,e);break;case xf.IN_HEAD:Hf(this,e);break;case xf.IN_HEAD_NO_SCRIPT:Wf(this,e);break;case xf.AFTER_HEAD:Kf(this,e);break;case xf.IN_BODY:case xf.IN_TABLE:case xf.IN_CAPTION:case xf.IN_COLUMN_GROUP:case xf.IN_TABLE_BODY:case xf.IN_ROW:case xf.IN_CELL:case xf.IN_SELECT:case xf.IN_SELECT_IN_TABLE:Aee(this,e);break;case xf.TEXT:Mee(this,e);break;case xf.IN_TABLE_TEXT:wp(this,e);break;case xf.IN_TEMPLATE:rte(this,e);break;case xf.AFTER_BODY:case xf.IN_FRAMESET:case xf.AFTER_FRAMESET:case xf.AFTER_AFTER_BODY:case xf.AFTER_AFTER_FRAMESET:Mf(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===Lu.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case xf.IN_HEAD:case xf.IN_HEAD_NO_SCRIPT:case xf.AFTER_HEAD:case xf.TEXT:case xf.IN_COLUMN_GROUP:case xf.IN_SELECT:case xf.IN_SELECT_IN_TABLE:case xf.IN_FRAMESET:case xf.AFTER_FRAMESET:this._insertCharacters(e);break;case xf.IN_BODY:case xf.IN_CAPTION:case xf.IN_CELL:case xf.IN_TEMPLATE:case xf.AFTER_BODY:case xf.AFTER_AFTER_BODY:case xf.AFTER_AFTER_FRAMESET:uee(this,e);break;case xf.IN_TABLE:case xf.IN_TABLE_BODY:case xf.IN_ROW:Nee(this,e);break;case xf.IN_TABLE_TEXT:Hee(this,e)}}};function Ef(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):kee(e,t),n}function Df(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Of(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=bf;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=kf(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function kf(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function nee(e,t,n){let r=pd(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===U.TEMPLATE&&i===cd.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function ree(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Af(e,t){for(let n=0;n<yf;n++){let n=Ef(e,t);if(!n)break;let r=Df(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=Of(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&nee(e,a,i),ree(e,r,n)}}function jf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function iee(e,t){e._appendCommentNode(t,e.openElements.items[0])}function aee(e,t){e._appendCommentNode(t,e.document)}function Mf(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function oee(e,t){e._setDocumentType(t);let n=t.forceQuirks?ud.QUIRKS:tf(t);ef(t)||e._err(t,Wu.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=xf.BEFORE_HTML}function Nf(e,t){e._err(t,Wu.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ud.QUIRKS),e.insertionMode=xf.BEFORE_HTML,e._processToken(t)}function Pf(e,t){t.tagID===U.HTML?(e._insertElement(t,cd.HTML),e.insertionMode=xf.BEFORE_HEAD):If(e,t)}function Ff(e,t){let n=t.tagID;(n===U.HTML||n===U.HEAD||n===U.BODY||n===U.BR)&&If(e,t)}function If(e,t){e._insertFakeRootElement(),e.insertionMode=xf.BEFORE_HEAD,e._processToken(t)}function see(e,t){switch(t.tagID){case U.HTML:mp(e,t);break;case U.HEAD:e._insertElement(t,cd.HTML),e.headElement=e.openElements.current,e.insertionMode=xf.IN_HEAD;break;default:Rf(e,t)}}function Lf(e,t){let n=t.tagID;n===U.HEAD||n===U.BODY||n===U.HTML||n===U.BR?Rf(e,t):e._err(t,Wu.endTagWithoutMatchingOpenElement)}function Rf(e,t){e._insertFakeElement(dd.HEAD,U.HEAD),e.headElement=e.openElements.current,e.insertionMode=xf.IN_HEAD,e._processToken(t)}function zf(e,t){switch(t.tagID){case U.HTML:mp(e,t);break;case U.BASE:case U.BASEFONT:case U.BGSOUND:case U.LINK:case U.META:e._appendElement(t,cd.HTML),t.ackSelfClosing=!0;break;case U.TITLE:e._switchToTextParsing(t,vd.RCDATA);break;case U.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,vd.RAWTEXT):(e._insertElement(t,cd.HTML),e.insertionMode=xf.IN_HEAD_NO_SCRIPT);break;case U.NOFRAMES:case U.STYLE:e._switchToTextParsing(t,vd.RAWTEXT);break;case U.SCRIPT:e._switchToTextParsing(t,vd.SCRIPT_DATA);break;case U.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=xf.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(xf.IN_TEMPLATE);break;case U.HEAD:e._err(t,Wu.misplacedStartTagForHeadElement);break;default:Hf(e,t)}}function Bf(e,t){switch(t.tagID){case U.HEAD:e.openElements.pop(),e.insertionMode=xf.AFTER_HEAD;break;case U.BODY:case U.BR:case U.HTML:Hf(e,t);break;case U.TEMPLATE:Vf(e,t);break;default:e._err(t,Wu.endTagWithoutMatchingOpenElement)}}function Vf(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==U.TEMPLATE&&e._err(t,Wu.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(U.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Wu.endTagWithoutMatchingOpenElement)}function Hf(e,t){e.openElements.pop(),e.insertionMode=xf.AFTER_HEAD,e._processToken(t)}function Uf(e,t){switch(t.tagID){case U.HTML:mp(e,t);break;case U.BASEFONT:case U.BGSOUND:case U.HEAD:case U.LINK:case U.META:case U.NOFRAMES:case U.STYLE:zf(e,t);break;case U.NOSCRIPT:e._err(t,Wu.nestedNoscriptInHead);break;default:Wf(e,t)}}function cee(e,t){switch(t.tagID){case U.NOSCRIPT:e.openElements.pop(),e.insertionMode=xf.IN_HEAD;break;case U.BR:Wf(e,t);break;default:e._err(t,Wu.endTagWithoutMatchingOpenElement)}}function Wf(e,t){let n=t.type===qu.EOF?Wu.openElementsLeftAfterEof:Wu.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=xf.IN_HEAD,e._processToken(t)}function lee(e,t){switch(t.tagID){case U.HTML:mp(e,t);break;case U.BODY:e._insertElement(t,cd.HTML),e.framesetOk=!1,e.insertionMode=xf.IN_BODY;break;case U.FRAMESET:e._insertElement(t,cd.HTML),e.insertionMode=xf.IN_FRAMESET;break;case U.BASE:case U.BASEFONT:case U.BGSOUND:case U.LINK:case U.META:case U.NOFRAMES:case U.SCRIPT:case U.STYLE:case U.TEMPLATE:case U.TITLE:e._err(t,Wu.abandonedHeadElementChild),e.openElements.push(e.headElement,U.HEAD),zf(e,t),e.openElements.remove(e.headElement);break;case U.HEAD:e._err(t,Wu.misplacedStartTagForHeadElement);break;default:Kf(e,t)}}function Gf(e,t){switch(t.tagID){case U.BODY:case U.HTML:case U.BR:Kf(e,t);break;case U.TEMPLATE:Vf(e,t);break;default:e._err(t,Wu.endTagWithoutMatchingOpenElement)}}function Kf(e,t){e._insertFakeElement(dd.BODY,U.BODY),e.insertionMode=xf.IN_BODY,qf(e,t)}function qf(e,t){switch(t.type){case qu.CHARACTER:Jf(e,t);break;case qu.WHITESPACE_CHARACTER:uee(e,t);break;case qu.COMMENT:jf(e,t);break;case qu.START_TAG:mp(e,t);break;case qu.END_TAG:bp(e,t);break;case qu.EOF:Aee(e,t)}}function uee(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Jf(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Yf(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Xf(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function dee(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,cd.HTML),e.insertionMode=xf.IN_FRAMESET)}function Zf(e,t){e.openElements.hasInButtonScope(U.P)&&e._closePElement(),e._insertElement(t,cd.HTML)}function fee(e,t){e.openElements.hasInButtonScope(U.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&gd.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,cd.HTML)}function pee(e,t){e.openElements.hasInButtonScope(U.P)&&e._closePElement(),e._insertElement(t,cd.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function mee(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(U.P)&&e._closePElement(),e._insertElement(t,cd.HTML),n||(e.formElement=e.openElements.current))}function hee(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===U.LI&&r===U.LI||(n===U.DD||n===U.DT)&&(r===U.DD||r===U.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==U.ADDRESS&&r!==U.DIV&&r!==U.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(U.P)&&e._closePElement(),e._insertElement(t,cd.HTML)}function gee(e,t){e.openElements.hasInButtonScope(U.P)&&e._closePElement(),e._insertElement(t,cd.HTML),e.tokenizer.state=vd.PLAINTEXT}function Qf(e,t){e.openElements.hasInScope(U.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(U.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,cd.HTML),e.framesetOk=!1}function _ee(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(dd.A);n&&(Af(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,cd.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function vee(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,cd.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function $f(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(U.NOBR)&&(Af(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,cd.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function yee(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,cd.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function bee(e,t){e.treeAdapter.getDocumentMode(e.document)!==ud.QUIRKS&&e.openElements.hasInButtonScope(U.P)&&e._closePElement(),e._insertElement(t,cd.HTML),e.framesetOk=!1,e.insertionMode=xf.IN_TABLE}function ep(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,cd.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function tp(e){let t=Ju(e,ld.TYPE);return t!=null&&t.toLowerCase()===vf}function np(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,cd.HTML),tp(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function rp(e,t){e._appendElement(t,cd.HTML),t.ackSelfClosing=!0}function ip(e,t){e.openElements.hasInButtonScope(U.P)&&e._closePElement(),e._appendElement(t,cd.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ap(e,t){t.tagName=dd.IMG,t.tagID=U.IMG,ep(e,t)}function op(e,t){e._insertElement(t,cd.HTML),e.skipNextNewLine=!0,e.tokenizer.state=vd.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=xf.TEXT}function sp(e,t){e.openElements.hasInButtonScope(U.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,vd.RAWTEXT)}function cp(e,t){e.framesetOk=!1,e._switchToTextParsing(t,vd.RAWTEXT)}function lp(e,t){e._switchToTextParsing(t,vd.RAWTEXT)}function up(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,cd.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===xf.IN_TABLE||e.insertionMode===xf.IN_CAPTION||e.insertionMode===xf.IN_TABLE_BODY||e.insertionMode===xf.IN_ROW||e.insertionMode===xf.IN_CELL?xf.IN_SELECT_IN_TABLE:xf.IN_SELECT}function dp(e,t){e.openElements.currentTagId===U.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,cd.HTML)}function xee(e,t){e.openElements.hasInScope(U.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,cd.HTML)}function See(e,t){e.openElements.hasInScope(U.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(U.RTC),e._insertElement(t,cd.HTML)}function fp(e,t){e._reconstructActiveFormattingElements(),df(t),pf(t),t.selfClosing?e._appendElement(t,cd.MATHML):e._insertElement(t,cd.MATHML),t.ackSelfClosing=!0}function Cee(e,t){e._reconstructActiveFormattingElements(),ff(t),pf(t),t.selfClosing?e._appendElement(t,cd.SVG):e._insertElement(t,cd.SVG),t.ackSelfClosing=!0}function pp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,cd.HTML)}function mp(e,t){switch(t.tagID){case U.I:case U.S:case U.B:case U.U:case U.EM:case U.TT:case U.BIG:case U.CODE:case U.FONT:case U.SMALL:case U.STRIKE:case U.STRONG:vee(e,t);break;case U.A:_ee(e,t);break;case U.H1:case U.H2:case U.H3:case U.H4:case U.H5:case U.H6:fee(e,t);break;case U.P:case U.DL:case U.OL:case U.UL:case U.DIV:case U.DIR:case U.NAV:case U.MAIN:case U.MENU:case U.ASIDE:case U.CENTER:case U.FIGURE:case U.FOOTER:case U.HEADER:case U.HGROUP:case U.DIALOG:case U.DETAILS:case U.ADDRESS:case U.ARTICLE:case U.SEARCH:case U.SECTION:case U.SUMMARY:case U.FIELDSET:case U.BLOCKQUOTE:case U.FIGCAPTION:Zf(e,t);break;case U.LI:case U.DD:case U.DT:hee(e,t);break;case U.BR:case U.IMG:case U.WBR:case U.AREA:case U.EMBED:case U.KEYGEN:ep(e,t);break;case U.HR:ip(e,t);break;case U.RB:case U.RTC:xee(e,t);break;case U.RT:case U.RP:See(e,t);break;case U.PRE:case U.LISTING:pee(e,t);break;case U.XMP:sp(e,t);break;case U.SVG:Cee(e,t);break;case U.HTML:Yf(e,t);break;case U.BASE:case U.LINK:case U.META:case U.STYLE:case U.TITLE:case U.SCRIPT:case U.BGSOUND:case U.BASEFONT:case U.TEMPLATE:zf(e,t);break;case U.BODY:Xf(e,t);break;case U.FORM:mee(e,t);break;case U.NOBR:$f(e,t);break;case U.MATH:fp(e,t);break;case U.TABLE:bee(e,t);break;case U.INPUT:np(e,t);break;case U.PARAM:case U.TRACK:case U.SOURCE:rp(e,t);break;case U.IMAGE:ap(e,t);break;case U.BUTTON:Qf(e,t);break;case U.APPLET:case U.OBJECT:case U.MARQUEE:yee(e,t);break;case U.IFRAME:cp(e,t);break;case U.SELECT:up(e,t);break;case U.OPTION:case U.OPTGROUP:dp(e,t);break;case U.NOEMBED:case U.NOFRAMES:lp(e,t);break;case U.FRAMESET:dee(e,t);break;case U.TEXTAREA:op(e,t);break;case U.NOSCRIPT:e.options.scriptingEnabled?lp(e,t):pp(e,t);break;case U.PLAINTEXT:gee(e,t);break;case U.COL:case U.TH:case U.TD:case U.TR:case U.HEAD:case U.FRAME:case U.TBODY:case U.TFOOT:case U.THEAD:case U.CAPTION:case U.COLGROUP:break;default:pp(e,t)}}function wee(e,t){if(e.openElements.hasInScope(U.BODY)&&(e.insertionMode=xf.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Tee(e,t){e.openElements.hasInScope(U.BODY)&&(e.insertionMode=xf.AFTER_BODY,ate(e,t))}function hp(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function gp(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(U.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(U.FORM):n&&e.openElements.remove(n))}function Eee(e){e.openElements.hasInButtonScope(U.P)||e._insertFakeElement(dd.P,U.P),e._closePElement()}function _p(e){e.openElements.hasInListItemScope(U.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(U.LI),e.openElements.popUntilTagNamePopped(U.LI))}function Dee(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function vp(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function yp(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Oee(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(dd.BR,U.BR),e.openElements.pop(),e.framesetOk=!1}function kee(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==U.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function bp(e,t){switch(t.tagID){case U.A:case U.B:case U.I:case U.S:case U.U:case U.EM:case U.TT:case U.BIG:case U.CODE:case U.FONT:case U.NOBR:case U.SMALL:case U.STRIKE:case U.STRONG:Af(e,t);break;case U.P:Eee(e);break;case U.DL:case U.UL:case U.OL:case U.DIR:case U.DIV:case U.NAV:case U.PRE:case U.MAIN:case U.MENU:case U.ASIDE:case U.BUTTON:case U.CENTER:case U.FIGURE:case U.FOOTER:case U.HEADER:case U.HGROUP:case U.DIALOG:case U.ADDRESS:case U.ARTICLE:case U.DETAILS:case U.SEARCH:case U.SECTION:case U.SUMMARY:case U.LISTING:case U.FIELDSET:case U.BLOCKQUOTE:case U.FIGCAPTION:hp(e,t);break;case U.LI:_p(e);break;case U.DD:case U.DT:Dee(e,t);break;case U.H1:case U.H2:case U.H3:case U.H4:case U.H5:case U.H6:vp(e);break;case U.BR:Oee(e);break;case U.BODY:wee(e,t);break;case U.HTML:Tee(e,t);break;case U.FORM:gp(e);break;case U.APPLET:case U.OBJECT:case U.MARQUEE:yp(e,t);break;case U.TEMPLATE:Vf(e,t);break;default:kee(e,t)}}function Aee(e,t){e.tmplInsertionModeStack.length>0?rte(e,t):Mf(e,t)}function jee(e,t){var n;t.tagID===U.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Mee(e,t){e._err(t,Wu.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Nee(e,t){if(e.openElements.currentTagId!==void 0&&Cf.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=xf.IN_TABLE_TEXT,t.type){case qu.CHARACTER:Uee(e,t);break;case qu.WHITESPACE_CHARACTER:Hee(e,t)}else Cp(e,t)}function Pee(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,cd.HTML),e.insertionMode=xf.IN_CAPTION}function Fee(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,cd.HTML),e.insertionMode=xf.IN_COLUMN_GROUP}function Iee(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(dd.COLGROUP,U.COLGROUP),e.insertionMode=xf.IN_COLUMN_GROUP,Tp(e,t)}function Lee(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,cd.HTML),e.insertionMode=xf.IN_TABLE_BODY}function Ree(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(dd.TBODY,U.TBODY),e.insertionMode=xf.IN_TABLE_BODY,Dp(e,t)}function zee(e,t){e.openElements.hasInTableScope(U.TABLE)&&(e.openElements.popUntilTagNamePopped(U.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Bee(e,t){tp(t)?e._appendElement(t,cd.HTML):Cp(e,t),t.ackSelfClosing=!0}function Vee(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,cd.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function xp(e,t){switch(t.tagID){case U.TD:case U.TH:case U.TR:Ree(e,t);break;case U.STYLE:case U.SCRIPT:case U.TEMPLATE:zf(e,t);break;case U.COL:Iee(e,t);break;case U.FORM:Vee(e,t);break;case U.TABLE:zee(e,t);break;case U.TBODY:case U.TFOOT:case U.THEAD:Lee(e,t);break;case U.INPUT:Bee(e,t);break;case U.CAPTION:Pee(e,t);break;case U.COLGROUP:Fee(e,t);break;default:Cp(e,t)}}function Sp(e,t){switch(t.tagID){case U.TABLE:e.openElements.hasInTableScope(U.TABLE)&&(e.openElements.popUntilTagNamePopped(U.TABLE),e._resetInsertionMode());break;case U.TEMPLATE:Vf(e,t);break;case U.BODY:case U.CAPTION:case U.COL:case U.COLGROUP:case U.HTML:case U.TBODY:case U.TD:case U.TFOOT:case U.TH:case U.THEAD:case U.TR:break;default:Cp(e,t)}}function Cp(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,qf(e,t),e.fosterParentingEnabled=n}function Hee(e,t){e.pendingCharacterTokens.push(t)}function Uee(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function wp(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Cp(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var Wee=new Set([U.CAPTION,U.COL,U.COLGROUP,U.TBODY,U.TD,U.TFOOT,U.TH,U.THEAD,U.TR]);function Gee(e,t){let n=t.tagID;Wee.has(n)?e.openElements.hasInTableScope(U.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(U.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=xf.IN_TABLE,xp(e,t)):mp(e,t)}function Kee(e,t){let n=t.tagID;switch(n){case U.CAPTION:case U.TABLE:e.openElements.hasInTableScope(U.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(U.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=xf.IN_TABLE,n===U.TABLE&&Sp(e,t));break;case U.BODY:case U.COL:case U.COLGROUP:case U.HTML:case U.TBODY:case U.TD:case U.TFOOT:case U.TH:case U.THEAD:case U.TR:break;default:bp(e,t)}}function Tp(e,t){switch(t.tagID){case U.HTML:mp(e,t);break;case U.COL:e._appendElement(t,cd.HTML),t.ackSelfClosing=!0;break;case U.TEMPLATE:zf(e,t);break;default:Ep(e,t)}}function qee(e,t){switch(t.tagID){case U.COLGROUP:e.openElements.currentTagId===U.COLGROUP&&(e.openElements.pop(),e.insertionMode=xf.IN_TABLE);break;case U.TEMPLATE:Vf(e,t);break;case U.COL:break;default:Ep(e,t)}}function Ep(e,t){e.openElements.currentTagId===U.COLGROUP&&(e.openElements.pop(),e.insertionMode=xf.IN_TABLE,e._processToken(t))}function Dp(e,t){switch(t.tagID){case U.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,cd.HTML),e.insertionMode=xf.IN_ROW;break;case U.TH:case U.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(dd.TR,U.TR),e.insertionMode=xf.IN_ROW,kp(e,t);break;case U.CAPTION:case U.COL:case U.COLGROUP:case U.TBODY:case U.TFOOT:case U.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=xf.IN_TABLE,xp(e,t));break;default:xp(e,t)}}function Op(e,t){let n=t.tagID;switch(t.tagID){case U.TBODY:case U.TFOOT:case U.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=xf.IN_TABLE);break;case U.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=xf.IN_TABLE,Sp(e,t));break;case U.BODY:case U.CAPTION:case U.COL:case U.COLGROUP:case U.HTML:case U.TD:case U.TH:case U.TR:break;default:Sp(e,t)}}function kp(e,t){switch(t.tagID){case U.TH:case U.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,cd.HTML),e.insertionMode=xf.IN_CELL,e.activeFormattingElements.insertMarker();break;case U.CAPTION:case U.COL:case U.COLGROUP:case U.TBODY:case U.TFOOT:case U.THEAD:case U.TR:e.openElements.hasInTableScope(U.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=xf.IN_TABLE_BODY,Dp(e,t));break;default:xp(e,t)}}function Jee(e,t){switch(t.tagID){case U.TR:e.openElements.hasInTableScope(U.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=xf.IN_TABLE_BODY);break;case U.TABLE:e.openElements.hasInTableScope(U.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=xf.IN_TABLE_BODY,Op(e,t));break;case U.TBODY:case U.TFOOT:case U.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(U.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=xf.IN_TABLE_BODY,Op(e,t));break;case U.BODY:case U.CAPTION:case U.COL:case U.COLGROUP:case U.HTML:case U.TD:case U.TH:break;default:Sp(e,t)}}function Yee(e,t){let n=t.tagID;Wee.has(n)?(e.openElements.hasInTableScope(U.TD)||e.openElements.hasInTableScope(U.TH))&&(e._closeTableCell(),kp(e,t)):mp(e,t)}function Xee(e,t){let n=t.tagID;switch(n){case U.TD:case U.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=xf.IN_ROW);break;case U.TABLE:case U.TBODY:case U.TFOOT:case U.THEAD:case U.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Jee(e,t));break;case U.BODY:case U.CAPTION:case U.COL:case U.COLGROUP:case U.HTML:break;default:bp(e,t)}}function Zee(e,t){switch(t.tagID){case U.HTML:mp(e,t);break;case U.OPTION:e.openElements.currentTagId===U.OPTION&&e.openElements.pop(),e._insertElement(t,cd.HTML);break;case U.OPTGROUP:e.openElements.currentTagId===U.OPTION&&e.openElements.pop(),e.openElements.currentTagId===U.OPTGROUP&&e.openElements.pop(),e._insertElement(t,cd.HTML);break;case U.HR:e.openElements.currentTagId===U.OPTION&&e.openElements.pop(),e.openElements.currentTagId===U.OPTGROUP&&e.openElements.pop(),e._appendElement(t,cd.HTML),t.ackSelfClosing=!0;break;case U.INPUT:case U.KEYGEN:case U.TEXTAREA:case U.SELECT:e.openElements.hasInSelectScope(U.SELECT)&&(e.openElements.popUntilTagNamePopped(U.SELECT),e._resetInsertionMode(),t.tagID!==U.SELECT&&e._processStartTag(t));break;case U.SCRIPT:case U.TEMPLATE:zf(e,t)}}function Qee(e,t){switch(t.tagID){case U.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===U.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===U.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===U.OPTGROUP&&e.openElements.pop();break;case U.OPTION:e.openElements.currentTagId===U.OPTION&&e.openElements.pop();break;case U.SELECT:e.openElements.hasInSelectScope(U.SELECT)&&(e.openElements.popUntilTagNamePopped(U.SELECT),e._resetInsertionMode());break;case U.TEMPLATE:Vf(e,t)}}function $ee(e,t){let n=t.tagID;n===U.CAPTION||n===U.TABLE||n===U.TBODY||n===U.TFOOT||n===U.THEAD||n===U.TR||n===U.TD||n===U.TH?(e.openElements.popUntilTagNamePopped(U.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Zee(e,t)}function ete(e,t){let n=t.tagID;n===U.CAPTION||n===U.TABLE||n===U.TBODY||n===U.TFOOT||n===U.THEAD||n===U.TR||n===U.TD||n===U.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(U.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Qee(e,t)}function tte(e,t){switch(t.tagID){case U.BASE:case U.BASEFONT:case U.BGSOUND:case U.LINK:case U.META:case U.NOFRAMES:case U.SCRIPT:case U.STYLE:case U.TEMPLATE:case U.TITLE:zf(e,t);break;case U.CAPTION:case U.COLGROUP:case U.TBODY:case U.TFOOT:case U.THEAD:e.tmplInsertionModeStack[0]=xf.IN_TABLE,e.insertionMode=xf.IN_TABLE,xp(e,t);break;case U.COL:e.tmplInsertionModeStack[0]=xf.IN_COLUMN_GROUP,e.insertionMode=xf.IN_COLUMN_GROUP,Tp(e,t);break;case U.TR:e.tmplInsertionModeStack[0]=xf.IN_TABLE_BODY,e.insertionMode=xf.IN_TABLE_BODY,Dp(e,t);break;case U.TD:case U.TH:e.tmplInsertionModeStack[0]=xf.IN_ROW,e.insertionMode=xf.IN_ROW,kp(e,t);break;default:e.tmplInsertionModeStack[0]=xf.IN_BODY,e.insertionMode=xf.IN_BODY,mp(e,t)}}function nte(e,t){t.tagID===U.TEMPLATE&&Vf(e,t)}function rte(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(U.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Mf(e,t)}function ite(e,t){t.tagID===U.HTML?mp(e,t):Ap(e,t)}function ate(e,t){if(t.tagID===U.HTML){if(e.fragmentContext||(e.insertionMode=xf.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===U.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else Ap(e,t)}function Ap(e,t){e.insertionMode=xf.IN_BODY,qf(e,t)}function ote(e,t){switch(t.tagID){case U.HTML:mp(e,t);break;case U.FRAMESET:e._insertElement(t,cd.HTML);break;case U.FRAME:e._appendElement(t,cd.HTML),t.ackSelfClosing=!0;break;case U.NOFRAMES:zf(e,t)}}function ste(e,t){t.tagID===U.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==U.FRAMESET&&(e.insertionMode=xf.AFTER_FRAMESET))}function cte(e,t){switch(t.tagID){case U.HTML:mp(e,t);break;case U.NOFRAMES:zf(e,t)}}function lte(e,t){t.tagID===U.HTML&&(e.insertionMode=xf.AFTER_AFTER_FRAMESET)}function ute(e,t){t.tagID===U.HTML?mp(e,t):jp(e,t)}function jp(e,t){e.insertionMode=xf.IN_BODY,qf(e,t)}function dte(e,t){switch(t.tagID){case U.HTML:mp(e,t);break;case U.NOFRAMES:zf(e,t)}}function fte(e,t){t.chars=`�`,e._insertCharacters(t)}function pte(e,t){e._insertCharacters(t),e.framesetOk=!1}function mte(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==cd.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function hte(e,t){if(uf(t))mte(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===cd.MATHML?df(t):r===cd.SVG&&(mf(t),ff(t)),pf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function gte(e,t){if(t.tagID===U.P||t.tagID===U.BR){mte(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===cd.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}dd.AREA,dd.BASE,dd.BASEFONT,dd.BGSOUND,dd.BR,dd.COL,dd.EMBED,dd.FRAME,dd.HR,dd.IMG,dd.INPUT,dd.KEYGEN,dd.LINK,dd.META,dd.PARAM,dd.SOURCE,dd.TRACK,dd.WBR;var _te=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,vte=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),yte={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function bte(e,t){let n=Nte(e),r=Us(`type`,{handlers:{root:Ste,element:Cte,text:wte,comment:Dte,doctype:Tte,raw:Ote},unknown:kte}),i={parser:n?new Tf(yte):Tf.getFragmentParser(void 0,yte),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),Mp(i,tt());let a=mu(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&Ga(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function xte(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Ste(e,t){xte(e.children,t)}function Cte(e,t){jte(e,t),xte(e.children,t),Mte(e,t)}function wte(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:qu.CHARACTER,chars:e.value,location:Np(e)};Mp(t,tt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Tte(e,t){let n={type:qu.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:Np(e)};Mp(t,tt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Ete(e,t){t.stitches=!0;let n=Pte(e);`children`in e&&`children`in n&&(n.children=bte({type:`root`,children:e.children},t.options).children),Dte({type:`comment`,value:{stitch:n}},t)}function Dte(e,t){let n=e.value,r={type:qu.COMMENT,data:n,location:Np(e)};Mp(t,tt(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Ote(e,t){if(t.parser.tokenizer.preprocessor.html=``,t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Ate(t,tt(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(_te,`<$1$2`):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function kte(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Ete(n,t);else{let e=``;throw vte.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+n.type+"` node"+e)}}function Mp(e,t){Ate(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=vd.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:``,value:``}}function Ate(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function jte(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===vd.PLAINTEXT)return;Mp(t,tt(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:du.html;i===du.html&&n===`svg`&&(i=du.svg);let a=Tu({...e,children:[]},{space:i===du.svg?`svg`:`html`}),o={type:qu.START_TAG,tagName:n,tagID:pd(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:Np(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Mte(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Fu.includes(n)||t.parser.tokenizer.state===vd.PLAINTEXT)return;Mp(t,et(e));let r={type:qu.END_TAG,tagName:n,tagID:pd(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Np(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===vd.RCDATA||t.parser.tokenizer.state===vd.RAWTEXT||t.parser.tokenizer.state===vd.SCRIPT_DATA)&&(t.parser.tokenizer.state=vd.DATA)}function Nte(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function Np(e){let t=tt(e)||{line:void 0,column:void 0,offset:void 0},n=et(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Pte(e){return`children`in e?Aa({...e,children:[]}):Aa(e)}function Fte(e){return function(t,n){return bte(t,{...e,file:n})}}var Pp=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],Fp={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...Pp,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...Pp],h2:[[`className`,`sr-only`]],img:[...Pp,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...Pp,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...Pp],table:[...Pp],ul:[...Pp,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},Ip={}.hasOwnProperty;function Ite(e,t){let n={type:`root`,children:[]},r=Lte({schema:t?{...Fp,...t}:Fp,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function Lte(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return Rte(e,n);case`doctype`:return zte(e,n);case`element`:return Bte(e,n);case`root`:return Vte(e,n);case`text`:return Hte(e,n)}}}function Rte(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return Lp(r,t),r}}function zte(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return Lp(e,t),e}}function Bte(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=Ute(e,t.children),i=Wte(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&Ip.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return Lp(o,t),o}function Vte(e,t){let n={type:`root`,children:Ute(e,t.children)};return Lp(n,t),n}function Hte(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return Lp(n,t),n}function Ute(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=Lte(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function Wte(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&Ip.call(r,n)?r[n]:void 0,o=r&&Ip.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},l={},u;for(u in s)if(Ip.call(s,u)){let t=s[u],n=Gte(e,Yte(a,u),u,t);n??=Gte(e,Yte(o,u),u,t),n!=null&&(l[u]=n)}if(i&&Ip.call(i,n)){let e=i[n];for(u in e)Ip.call(e,u)&&!Ip.call(l,u)&&(l[u]=e[u])}return l}function Gte(e,t,n,r){return t?Array.isArray(r)?Kte(e,t,n,r):qte(e,t,n,r):void 0}function Kte(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=qte(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function qte(e,t,n,r){if((typeof r==`boolean`||typeof r==`number`||typeof r==`string`)&&Jte(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function Jte(e,t,n){let r=e.schema.protocols&&Ip.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),l=i.indexOf(`/`);if(a<0||l>-1&&a>l||o>-1&&a>o||s>-1&&a>s)return!0;let u=-1;for(;++u<r.length;){let e=r[u];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function Lp(e,t){let n=rt(t);t.data&&(e.data=Aa(t.data)),n&&(e.position=n)}function Yte(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function Xte(e){return function(t){return Ite(t,e)}}var Zte,Qte,$te,Rp,zp=o((()=>{Zte=`modulepreload`,Qte=function(e){return`/`+e},$te={},Rp=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Qte(t,n),t=s(t),t in $te)return;$te[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Zte,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})}})),ene,W,Bp,Vp=o((()=>{ene=Object.defineProperty,W=(e,t)=>ene(e,`name`,{value:t,configurable:!0}),Bp=(e,t)=>{for(var n in t)ene(e,n,{get:t[n],enumerable:!0})}})),tne=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,l=`week`,u=`month`,d=`quarter`,f=`year`,p=`date`,m=`Invalid Date`,h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},v=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},y={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+v(r,2,`0`)+`:`+v(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,u),a=n-i<0,o=t.clone().add(r+(a?-1:1),u);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:f,w:l,d:s,D:p,h:o,m:a,s:i,ms:r,Q:d}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},b=`en`,x={};x[b]=_;var S=`$isDayjsObject`,C=function(e){return e instanceof D||!(!e||!e[S])},w=function e(t,n,r){var i;if(!t)return b;if(typeof t==`string`){var a=t.toLowerCase();x[a]&&(i=a),n&&(x[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;x[s]=t,i=s}return!r&&i&&(b=i),i||!r&&b},T=function(e,t){if(C(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new D(n)},E=y;E.l=w,E.i=C,E.w=function(e,t){return T(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var D=function(){function _(e){this.$L=w(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[S]=!0}var v=_.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(E.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(h);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return E},v.isValid=function(){return this.$d.toString()!==m},v.isSame=function(e,t){var n=T(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return T(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<T(e)},v.$g=function(e,t,n){return E.u(e)?this[t]:this.set(n,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var n=this,r=!!E.u(t)||t,d=E.p(e),m=function(e,t){var i=E.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},h=function(e,t){return E.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},g=this.$W,_=this.$M,v=this.$D,y=`set`+(this.$u?`UTC`:``);switch(d){case f:return r?m(1,0):m(31,11);case u:return r?m(1,_):m(0,_+1);case l:var b=this.$locale().weekStart||0,x=(g<b?g+7:g)-b;return m(r?v-x:v+(6-x),_);case s:case p:return h(y+`Hours`,0);case o:return h(y+`Minutes`,1);case a:return h(y+`Seconds`,2);case i:return h(y+`Milliseconds`,3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var n,l=E.p(e),d=`set`+(this.$u?`UTC`:``),m=(n={},n[s]=d+`Date`,n[p]=d+`Date`,n[u]=d+`Month`,n[f]=d+`FullYear`,n[o]=d+`Hours`,n[a]=d+`Minutes`,n[i]=d+`Seconds`,n[r]=d+`Milliseconds`,n)[l],h=l===s?this.$D+(t-this.$W):t;if(l===u||l===f){var g=this.clone().set(p,1);g.$d[m](h),g.init(),this.$d=g.set(p,Math.min(this.$D,g.daysInMonth())).$d}else m&&this.$d[m](h);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[E.p(e)]()},v.add=function(r,d){var p,m=this;r=Number(r);var h=E.p(d),g=function(e){var t=T(m);return E.w(t.date(t.date()+Math.round(e*r)),m)};if(h===u)return this.set(u,this.$M+r);if(h===f)return this.set(f,this.$y+r);if(h===s)return g(1);if(h===l)return g(7);var _=(p={},p[a]=t,p[o]=n,p[i]=e,p)[h]||1,v=this.$d.getTime()+r*_;return E.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||m;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=E.z(this),a=this.$H,o=this.$m,s=this.$M,l=n.weekdays,u=n.months,d=n.meridiem,f=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},p=function(e){return E.s(a%12||12,e,`0`)},h=d||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(g,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return E.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return E.s(s+1,2,`0`);case`MMM`:return f(n.monthsShort,s,u,3);case`MMMM`:return f(u,s);case`D`:return t.$D;case`DD`:return E.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return f(n.weekdaysMin,t.$W,l,2);case`ddd`:return f(n.weekdaysShort,t.$W,l,3);case`dddd`:return l[t.$W];case`H`:return String(a);case`HH`:return E.s(a,2,`0`);case`h`:return p(1);case`hh`:return p(2);case`a`:return h(a,o,!0);case`A`:return h(a,o,!1);case`m`:return String(o);case`mm`:return E.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return E.s(t.$s,2,`0`);case`SSS`:return E.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(r,p,m){var h,g=this,_=E.p(p),v=T(r),y=(v.utcOffset()-this.utcOffset())*t,b=this-v,x=function(){return E.m(g,v)};switch(_){case f:h=x()/12;break;case u:h=x();break;case d:h=x()/3;break;case l:h=(b-y)/6048e5;break;case s:h=(b-y)/864e5;break;case o:h=b/n;break;case a:h=b/t;break;case i:h=b/e;break;default:h=b}return m?h:E.a(h)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return x[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=w(e,t,!0);return r&&(n.$L=r),n},v.clone=function(){return E.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},_}(),O=D.prototype;return T.prototype=O,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,u],[`$y`,f],[`$D`,p]].forEach((function(e){O[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),T.extend=function(e,t){return e.$i||=(e(t,D,T),!0),T},T.locale=w,T.isDayjs=C,T.unix=function(e){return T(1e3*e)},T.en=x[b],T.Ls=x,T.p={},T}))})),nne,Hp,G,Up,Wp,Gp=o((()=>{Vp(),nne=d(tne(),1),Hp={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},G={trace:W((...e)=>{},`trace`),debug:W((...e)=>{},`debug`),info:W((...e)=>{},`info`),warn:W((...e)=>{},`warn`),error:W((...e)=>{},`error`),fatal:W((...e)=>{},`fatal`)},Up=W(function(e=`fatal`){let t=Hp.fatal;typeof e==`string`?e.toLowerCase()in Hp&&(t=Hp[e]):typeof e==`number`&&(t=e),G.trace=()=>{},G.debug=()=>{},G.info=()=>{},G.warn=()=>{},G.error=()=>{},G.fatal=()=>{},t<=Hp.fatal&&(G.fatal=console.error?console.error.bind(console,Wp(`FATAL`),`color: orange`):console.log.bind(console,`\x1B[35m`,Wp(`FATAL`))),t<=Hp.error&&(G.error=console.error?console.error.bind(console,Wp(`ERROR`),`color: orange`):console.log.bind(console,`\x1B[31m`,Wp(`ERROR`))),t<=Hp.warn&&(G.warn=console.warn?console.warn.bind(console,Wp(`WARN`),`color: orange`):console.log.bind(console,`\x1B[33m`,Wp(`WARN`))),t<=Hp.info&&(G.info=console.info?console.info.bind(console,Wp(`INFO`),`color: lightblue`):console.log.bind(console,`\x1B[34m`,Wp(`INFO`))),t<=Hp.debug&&(G.debug=console.debug?console.debug.bind(console,Wp(`DEBUG`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,Wp(`DEBUG`))),t<=Hp.trace&&(G.trace=console.debug?console.debug.bind(console,Wp(`TRACE`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,Wp(`TRACE`)))},`setLogLevel`),Wp=W(e=>`%c${(0,nne.default)().format(`ss.SSS`)} : ${e} : `,`format`)})),Kp,rne=o((()=>{Kp={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{let t=e/255;return e>.03928?((t+.055)/1.055)**2.4:t/12.92},hue2rgb:(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),hsl2rgb:({h:e,s:t,l:n},r)=>{if(!t)return n*2.55;e/=360,t/=100,n/=100;let i=n<.5?n*(1+t):n+t-n*t,a=2*n-i;switch(r){case`r`:return Kp.hue2rgb(a,i,e+1/3)*255;case`g`:return Kp.hue2rgb(a,i,e)*255;case`b`:return Kp.hue2rgb(a,i,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:n},r)=>{e/=255,t/=255,n/=255;let i=Math.max(e,t,n),a=Math.min(e,t,n),o=(i+a)/2;if(r===`l`)return o*100;if(i===a)return 0;let s=i-a,l=o>.5?s/(2-i-a):s/(i+a);if(r===`s`)return l*100;switch(i){case e:return((t-n)/s+(t<n?6:0))*60;case t:return((n-e)/s+2)*60;case n:return((e-t)/s+4)*60;default:return-1}}}})),ine,ane=o((()=>{ine={clamp:(e,t,n)=>t>n?Math.min(t,Math.max(n,e)):Math.min(n,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10}})),one,sne=o((()=>{one={dec2hex:e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}}})),qp,Jp=o((()=>{rne(),ane(),sne(),qp={channel:Kp,lang:ine,unit:one}})),Yp,Xp,Zp=o((()=>{Jp(),Yp={};for(let e=0;e<=255;e++)Yp[e]=qp.unit.dec2hex(e);Xp={ALL:0,RGB:1,HSL:2}})),cne,lne=o((()=>{Zp(),cne=class{constructor(){this.type=Xp.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw Error(`Cannot change both RGB and HSL channels at the same time`);this.type=e}reset(){this.type=Xp.ALL}is(e){return this.type===e}}})),une,dne=o((()=>{Jp(),lne(),Zp(),une=class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new cne}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=Xp.ALL,this}_ensureHSL(){let e=this.data,{h:t,s:n,l:r}=e;t===void 0&&(e.h=qp.channel.rgb2hsl(e,`h`)),n===void 0&&(e.s=qp.channel.rgb2hsl(e,`s`)),r===void 0&&(e.l=qp.channel.rgb2hsl(e,`l`))}_ensureRGB(){let e=this.data,{r:t,g:n,b:r}=e;t===void 0&&(e.r=qp.channel.hsl2rgb(e,`r`)),n===void 0&&(e.g=qp.channel.hsl2rgb(e,`g`)),r===void 0&&(e.b=qp.channel.hsl2rgb(e,`b`))}get r(){let e=this.data,t=e.r;return!this.type.is(Xp.HSL)&&t!==void 0?t:(this._ensureHSL(),qp.channel.hsl2rgb(e,`r`))}get g(){let e=this.data,t=e.g;return!this.type.is(Xp.HSL)&&t!==void 0?t:(this._ensureHSL(),qp.channel.hsl2rgb(e,`g`))}get b(){let e=this.data,t=e.b;return!this.type.is(Xp.HSL)&&t!==void 0?t:(this._ensureHSL(),qp.channel.hsl2rgb(e,`b`))}get h(){let e=this.data,t=e.h;return!this.type.is(Xp.RGB)&&t!==void 0?t:(this._ensureRGB(),qp.channel.rgb2hsl(e,`h`))}get s(){let e=this.data,t=e.s;return!this.type.is(Xp.RGB)&&t!==void 0?t:(this._ensureRGB(),qp.channel.rgb2hsl(e,`s`))}get l(){let e=this.data,t=e.l;return!this.type.is(Xp.RGB)&&t!==void 0?t:(this._ensureRGB(),qp.channel.rgb2hsl(e,`l`))}get a(){return this.data.a}set r(e){this.type.set(Xp.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Xp.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Xp.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Xp.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Xp.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Xp.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}})),Qp,$p=o((()=>{dne(),Qp=new une({r:0,g:0,b:0,a:0},`transparent`)})),em,fne=o((()=>{$p(),Zp(),em={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(em.re);if(!t)return;let n=t[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,l=o?8:4,u=a?0:-1,d=o?255:15;return Qp.set({r:(r>>l*(u+3)&d)*s,g:(r>>l*(u+2)&d)*s,b:(r>>l*(u+1)&d)*s,a:a?(r&d)*s/255:1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`#${Yp[Math.round(t)]}${Yp[Math.round(n)]}${Yp[Math.round(r)]}${Yp[Math.round(i*255)]}`:`#${Yp[Math.round(t)]}${Yp[Math.round(n)]}${Yp[Math.round(r)]}`}}})),tm,pne=o((()=>{Jp(),$p(),tm={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{let t=e.match(tm.hueRe);if(t){let[,e,n]=t;switch(n){case`grad`:return qp.channel.clamp.h(parseFloat(e)*.9);case`rad`:return qp.channel.clamp.h(parseFloat(e)*180/Math.PI);case`turn`:return qp.channel.clamp.h(parseFloat(e)*360)}}return qp.channel.clamp.h(parseFloat(e))},parse:e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let n=e.match(tm.re);if(!n)return;let[,r,i,a,o,s]=n;return Qp.set({h:tm._hue2deg(r),s:qp.channel.clamp.s(parseFloat(i)),l:qp.channel.clamp.l(parseFloat(a)),a:o?qp.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{let{h:t,s:n,l:r,a:i}=e;return i<1?`hsla(${qp.lang.round(t)}, ${qp.lang.round(n)}%, ${qp.lang.round(r)}%, ${i})`:`hsl(${qp.lang.round(t)}, ${qp.lang.round(n)}%, ${qp.lang.round(r)}%)`}}})),nm,mne=o((()=>{fne(),nm={colors:{aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyanaqua:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,transparent:`#00000000`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`},parse:e=>{e=e.toLowerCase();let t=nm.colors[e];if(t)return em.parse(t)},stringify:e=>{let t=em.stringify(e);for(let e in nm.colors)if(nm.colors[e]===t)return e}}})),rm,hne=o((()=>{Jp(),$p(),rm={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let n=e.match(rm.re);if(!n)return;let[,r,i,a,o,s,l,u,d]=n;return Qp.set({r:qp.channel.clamp.r(i?parseFloat(r)*2.55:parseFloat(r)),g:qp.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:qp.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:u?qp.channel.clamp.a(d?parseFloat(u)/100:parseFloat(u)):1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`rgba(${qp.lang.round(t)}, ${qp.lang.round(n)}, ${qp.lang.round(r)}, ${qp.lang.round(i)})`:`rgb(${qp.lang.round(t)}, ${qp.lang.round(n)}, ${qp.lang.round(r)})`}}})),im,am=o((()=>{fne(),pne(),mne(),hne(),Zp(),im={format:{keyword:nm,hex:em,rgb:rm,rgba:rm,hsl:tm,hsla:tm},parse:e=>{if(typeof e!=`string`)return e;let t=em.parse(e)||rm.parse(e)||tm.parse(e)||nm.parse(e);if(t)return t;throw Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Xp.HSL)||e.data.r===void 0?tm.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?rm.stringify(e):em.stringify(e)}})),gne,_ne=o((()=>{Jp(),am(),gne=(e,t)=>{let n=im.parse(e);for(let e in t)n[e]=qp.channel.clamp[e](t[e]);return im.stringify(n)}})),om,vne=o((()=>{Jp(),$p(),am(),_ne(),om=(e,t,n=0,r=1)=>{if(typeof e!=`number`)return gne(e,{a:t});let i=Qp.set({r:qp.channel.clamp.r(e),g:qp.channel.clamp.g(t),b:qp.channel.clamp.b(n),a:qp.channel.clamp.a(r)});return im.stringify(i)}})),sm,yne=o((()=>{Jp(),am(),sm=(e,t)=>qp.lang.round(im.parse(e)[t])})),bne,xne=o((()=>{Jp(),am(),bne=e=>{let{r:t,g:n,b:r}=im.parse(e),i=.2126*qp.channel.toLinear(t)+.7152*qp.channel.toLinear(n)+.0722*qp.channel.toLinear(r);return qp.lang.round(i)}})),Sne,Cne=o((()=>{xne(),Sne=e=>bne(e)>=.5})),cm,wne=o((()=>{Cne(),cm=e=>!Sne(e)})),lm,Tne=o((()=>{Jp(),am(),lm=(e,t,n)=>{let r=im.parse(e),i=r[t],a=qp.channel.clamp[t](i+n);return i!==a&&(r[t]=a),im.stringify(r)}})),um,Ene=o((()=>{Tne(),um=(e,t)=>lm(e,`l`,t)})),dm,Dne=o((()=>{Tne(),dm=(e,t)=>lm(e,`l`,-t)})),One,kne=o((()=>{Tne(),One=(e,t)=>lm(e,`a`,-t)})),K,Ane=o((()=>{am(),_ne(),K=(e,t)=>{let n=im.parse(e),r={};for(let e in t)t[e]&&(r[e]=n[e]+t[e]);return gne(e,r)}})),jne,Mne=o((()=>{am(),vne(),jne=(e,t,n=50)=>{let{r,g:i,b:a,a:o}=im.parse(e),{r:s,g:l,b:u,a:d}=im.parse(t),f=n/100,p=f*2-1,m=o-d,h=((p*m===-1?p:(p+m)/(1+p*m))+1)/2,g=1-h,_=r*h+s*g,v=i*h+l*g,y=a*h+u*g,b=o*f+d*(1-f);return om(_,v,y,b)}})),fm,Nne=o((()=>{am(),Mne(),fm=(e,t=100)=>{let n=im.parse(e);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,jne(n,e,t)}})),Pne=o((()=>{vne(),yne(),wne(),Ene(),Dne(),kne(),Ane(),Nne()})),pm=o((()=>{Pne()})),Fne=l({default:()=>ih});function Ine(e,t){this.v=e,this.k=t}function Lne(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Rne(e){if(Array.isArray(e))return e}function zne(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Bne(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
39
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var du={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`},fu={}.hasOwnProperty,pu=Object.prototype;function mu(e,t){let n=t||{};return hu({file:n.file||void 0,location:!1,schema:n.space===`svg`?qe:Ke,verbose:n.verbose||!1},e)}function hu(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},vu(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:gu(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=lu(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},vu(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},vu(e,r,n),n}default:return n=_u(e,t),n}}function gu(e,t){let n=-1,r=[];for(;++n<t.length;){let i=hu(e,t[n]);r.push(i)}return r}function _u(e,t){let n=e.schema;e.schema=t.namespaceURI===du.svg?qe:Ke;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;fu.call(pu,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?cu:su)(t.tagName,i,gu(e,t.childNodes));if(vu(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&bu(r.startTag),o=r&&r.endTag&&bu(r.endTag),s=hu(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function vu(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=yu(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function yu(e,t,n){let r=bu(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)fu.call(n.attrs,i)&&(r[Ue(e.schema,i).property]=bu(n.attrs[i]));n.startTag;let a=bu(n.startTag),o=n.endTag?bu(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function bu(e){let t=xu({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=xu({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function xu(e){return e.line&&e.column?e:void 0}var Su={},Cu={}.hasOwnProperty,wu=Us(`type`,{handlers:{root:Eu,element:ju,text:ku,comment:Au,doctype:Ou}});function Tu(e,t){let n=(t||Su).space;return wu(e,n===`svg`?qe:Ke)}function Eu(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=Nu(e.children,n,t),Pu(e,n),n}function Du(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=Nu(e.children,n,t),Pu(e,n),n}function Ou(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return Pu(e,t),t}function ku(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return Pu(e,t),t}function Au(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return Pu(e,t),t}function ju(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=qe);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&Cu.call(e.properties,a)){let t=Mu(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:du[o],childNodes:[],parentNode:null};return s.childNodes=Nu(e.children,s,r),Pu(e,s),e.tagName===`template`&&e.content&&(s.content=Du(e.content,r)),s}function Mu(e,t,n){let r=Ue(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?oe(n):Ye(n));let i={name:r.attribute,value:n===!0?``:String(n)};if(r.space&&r.space!==`html`&&r.space!==`svg`){let e=i.name.indexOf(`:`);e<0?i.prefix=``:(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=du[r.space]}return i}function Nu(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=wu(e[r],n);a.parentNode=t,i.push(a)}return i}function Pu(e,t){let n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}var Fu=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Iu=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Lu;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(Lu||={});var Ru={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function zu(e){return e>=55296&&e<=57343}function Bu(e){return e>=56320&&e<=57343}function Vu(e,t){return(e-55296)*1024+9216+t}function Hu(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Uu(e){return e>=64976&&e<=65007||Iu.has(e)}var Wu;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(Wu||={});var Gu=65536,Ku=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Gu,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(Bu(t))return this.pos++,this._addGap(),Vu(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Lu.EOF;return this._err(Wu.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Lu.EOF;let n=this.html.charCodeAt(t);return n===Lu.CARRIAGE_RETURN?Lu.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Lu.EOF;let e=this.html.charCodeAt(this.pos);return e===Lu.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,Lu.LINE_FEED):e===Lu.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,zu(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===Lu.LINE_FEED||e===Lu.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){Hu(e)?this._err(Wu.controlCharacterInInputStream):Uu(e)&&this._err(Wu.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},qu;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(qu||={});function Ju(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var Yu=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),Xu=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);String.fromCodePoint;function Zu(e){return e>=55296&&e<=57343||e>1114111?65533:Xu.get(e)??e}var Qu;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(Qu||={});var $u=32,ed;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(ed||={});function td(e){return e>=Qu.ZERO&&e<=Qu.NINE}function nd(e){return e>=Qu.UPPER_A&&e<=Qu.UPPER_F||e>=Qu.LOWER_A&&e<=Qu.LOWER_F}function rd(e){return e>=Qu.UPPER_A&&e<=Qu.UPPER_Z||e>=Qu.LOWER_A&&e<=Qu.LOWER_Z||td(e)}function eee(e){return e===Qu.EQUALS||rd(e)}var id;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(id||={});var ad;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(ad||={});var od=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=id.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ad.Strict}startEntity(e){this.decodeMode=e,this.state=id.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case id.EntityStart:return e.charCodeAt(t)===Qu.NUM?(this.state=id.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=id.NamedEntity,this.stateNamedEntity(e,t));case id.NumericStart:return this.stateNumericStart(e,t);case id.NumericDecimal:return this.stateNumericDecimal(e,t);case id.NumericHex:return this.stateNumericHex(e,t);case id.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|$u)===Qu.LOWER_X?(this.state=id.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=id.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(td(r)||nd(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(td(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Qu.SEMI)this.consumed+=1;else if(this.decodeMode===ad.Strict)return 0;return this.emitCodePoint(Zu(this.result),this.consumed),this.errors&&(e!==Qu.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&ed.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=sd(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===ad.Attribute&&(i===0||eee(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&ed.VALUE_LENGTH)>>14,i!==0){if(a===Qu.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==ad.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&ed.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~ed.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case id.NamedEntity:return this.result!==0&&(this.decodeMode!==ad.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case id.NumericDecimal:return this.emitNumericEntity(0,2);case id.NumericHex:return this.emitNumericEntity(0,3);case id.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case id.EntityStart:return 0}}};function sd(e,t,n,r){let i=(t&ed.BRANCH_LENGTH)>>7,a=t&ed.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var cd;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(cd||={});var ld;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(ld||={});var ud;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(ud||={});var dd;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(dd||={});var U;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(U||={});var fd=new Map([[dd.A,U.A],[dd.ADDRESS,U.ADDRESS],[dd.ANNOTATION_XML,U.ANNOTATION_XML],[dd.APPLET,U.APPLET],[dd.AREA,U.AREA],[dd.ARTICLE,U.ARTICLE],[dd.ASIDE,U.ASIDE],[dd.B,U.B],[dd.BASE,U.BASE],[dd.BASEFONT,U.BASEFONT],[dd.BGSOUND,U.BGSOUND],[dd.BIG,U.BIG],[dd.BLOCKQUOTE,U.BLOCKQUOTE],[dd.BODY,U.BODY],[dd.BR,U.BR],[dd.BUTTON,U.BUTTON],[dd.CAPTION,U.CAPTION],[dd.CENTER,U.CENTER],[dd.CODE,U.CODE],[dd.COL,U.COL],[dd.COLGROUP,U.COLGROUP],[dd.DD,U.DD],[dd.DESC,U.DESC],[dd.DETAILS,U.DETAILS],[dd.DIALOG,U.DIALOG],[dd.DIR,U.DIR],[dd.DIV,U.DIV],[dd.DL,U.DL],[dd.DT,U.DT],[dd.EM,U.EM],[dd.EMBED,U.EMBED],[dd.FIELDSET,U.FIELDSET],[dd.FIGCAPTION,U.FIGCAPTION],[dd.FIGURE,U.FIGURE],[dd.FONT,U.FONT],[dd.FOOTER,U.FOOTER],[dd.FOREIGN_OBJECT,U.FOREIGN_OBJECT],[dd.FORM,U.FORM],[dd.FRAME,U.FRAME],[dd.FRAMESET,U.FRAMESET],[dd.H1,U.H1],[dd.H2,U.H2],[dd.H3,U.H3],[dd.H4,U.H4],[dd.H5,U.H5],[dd.H6,U.H6],[dd.HEAD,U.HEAD],[dd.HEADER,U.HEADER],[dd.HGROUP,U.HGROUP],[dd.HR,U.HR],[dd.HTML,U.HTML],[dd.I,U.I],[dd.IMG,U.IMG],[dd.IMAGE,U.IMAGE],[dd.INPUT,U.INPUT],[dd.IFRAME,U.IFRAME],[dd.KEYGEN,U.KEYGEN],[dd.LABEL,U.LABEL],[dd.LI,U.LI],[dd.LINK,U.LINK],[dd.LISTING,U.LISTING],[dd.MAIN,U.MAIN],[dd.MALIGNMARK,U.MALIGNMARK],[dd.MARQUEE,U.MARQUEE],[dd.MATH,U.MATH],[dd.MENU,U.MENU],[dd.META,U.META],[dd.MGLYPH,U.MGLYPH],[dd.MI,U.MI],[dd.MO,U.MO],[dd.MN,U.MN],[dd.MS,U.MS],[dd.MTEXT,U.MTEXT],[dd.NAV,U.NAV],[dd.NOBR,U.NOBR],[dd.NOFRAMES,U.NOFRAMES],[dd.NOEMBED,U.NOEMBED],[dd.NOSCRIPT,U.NOSCRIPT],[dd.OBJECT,U.OBJECT],[dd.OL,U.OL],[dd.OPTGROUP,U.OPTGROUP],[dd.OPTION,U.OPTION],[dd.P,U.P],[dd.PARAM,U.PARAM],[dd.PLAINTEXT,U.PLAINTEXT],[dd.PRE,U.PRE],[dd.RB,U.RB],[dd.RP,U.RP],[dd.RT,U.RT],[dd.RTC,U.RTC],[dd.RUBY,U.RUBY],[dd.S,U.S],[dd.SCRIPT,U.SCRIPT],[dd.SEARCH,U.SEARCH],[dd.SECTION,U.SECTION],[dd.SELECT,U.SELECT],[dd.SOURCE,U.SOURCE],[dd.SMALL,U.SMALL],[dd.SPAN,U.SPAN],[dd.STRIKE,U.STRIKE],[dd.STRONG,U.STRONG],[dd.STYLE,U.STYLE],[dd.SUB,U.SUB],[dd.SUMMARY,U.SUMMARY],[dd.SUP,U.SUP],[dd.TABLE,U.TABLE],[dd.TBODY,U.TBODY],[dd.TEMPLATE,U.TEMPLATE],[dd.TEXTAREA,U.TEXTAREA],[dd.TFOOT,U.TFOOT],[dd.TD,U.TD],[dd.TH,U.TH],[dd.THEAD,U.THEAD],[dd.TITLE,U.TITLE],[dd.TR,U.TR],[dd.TRACK,U.TRACK],[dd.TT,U.TT],[dd.U,U.U],[dd.UL,U.UL],[dd.SVG,U.SVG],[dd.VAR,U.VAR],[dd.WBR,U.WBR],[dd.XMP,U.XMP]]);function pd(e){return fd.get(e)??U.UNKNOWN}var md=U,hd={[cd.HTML]:new Set([md.ADDRESS,md.APPLET,md.AREA,md.ARTICLE,md.ASIDE,md.BASE,md.BASEFONT,md.BGSOUND,md.BLOCKQUOTE,md.BODY,md.BR,md.BUTTON,md.CAPTION,md.CENTER,md.COL,md.COLGROUP,md.DD,md.DETAILS,md.DIR,md.DIV,md.DL,md.DT,md.EMBED,md.FIELDSET,md.FIGCAPTION,md.FIGURE,md.FOOTER,md.FORM,md.FRAME,md.FRAMESET,md.H1,md.H2,md.H3,md.H4,md.H5,md.H6,md.HEAD,md.HEADER,md.HGROUP,md.HR,md.HTML,md.IFRAME,md.IMG,md.INPUT,md.LI,md.LINK,md.LISTING,md.MAIN,md.MARQUEE,md.MENU,md.META,md.NAV,md.NOEMBED,md.NOFRAMES,md.NOSCRIPT,md.OBJECT,md.OL,md.P,md.PARAM,md.PLAINTEXT,md.PRE,md.SCRIPT,md.SECTION,md.SELECT,md.SOURCE,md.STYLE,md.SUMMARY,md.TABLE,md.TBODY,md.TD,md.TEMPLATE,md.TEXTAREA,md.TFOOT,md.TH,md.THEAD,md.TITLE,md.TR,md.TRACK,md.UL,md.WBR,md.XMP]),[cd.MATHML]:new Set([md.MI,md.MO,md.MN,md.MS,md.MTEXT,md.ANNOTATION_XML]),[cd.SVG]:new Set([md.TITLE,md.FOREIGN_OBJECT,md.DESC]),[cd.XLINK]:new Set,[cd.XML]:new Set,[cd.XMLNS]:new Set},gd=new Set([md.H1,md.H2,md.H3,md.H4,md.H5,md.H6]);dd.STYLE,dd.SCRIPT,dd.XMP,dd.IFRAME,dd.NOEMBED,dd.NOFRAMES,dd.PLAINTEXT;var _d;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(_d||={});var vd={DATA:_d.DATA,RCDATA:_d.RCDATA,RAWTEXT:_d.RAWTEXT,SCRIPT_DATA:_d.SCRIPT_DATA,PLAINTEXT:_d.PLAINTEXT,CDATA_SECTION:_d.CDATA_SECTION};function yd(e){return e>=Lu.DIGIT_0&&e<=Lu.DIGIT_9}function bd(e){return e>=Lu.LATIN_CAPITAL_A&&e<=Lu.LATIN_CAPITAL_Z}function xd(e){return e>=Lu.LATIN_SMALL_A&&e<=Lu.LATIN_SMALL_Z}function Sd(e){return xd(e)||bd(e)}function Cd(e){return Sd(e)||yd(e)}function wd(e){return e+32}function Td(e){return e===Lu.SPACE||e===Lu.LINE_FEED||e===Lu.TABULATION||e===Lu.FORM_FEED}function Ed(e){return Td(e)||e===Lu.SOLIDUS||e===Lu.GREATER_THAN_SIGN}function Dd(e){return e===Lu.NULL?Wu.nullCharacterReference:e>1114111?Wu.characterReferenceOutsideUnicodeRange:zu(e)?Wu.surrogateCharacterReference:Uu(e)?Wu.noncharacterCharacterReference:Hu(e)||e===Lu.CARRIAGE_RETURN?Wu.controlCharacterReference:null}var Od=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=_d.DATA,this.returnState=_d.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new Ku(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new od(Yu,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Wu.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(Wu.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=Dd(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:qu.START_TAG,tagName:``,tagID:U.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:qu.END_TAG,tagName:``,tagID:U.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:qu.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:qu.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(Ju(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(Wu.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=pd(e.tagName),e.type===qu.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(Wu.endTagWithAttributes),e.selfClosing&&this._err(Wu.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case qu.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case qu.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case qu.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:qu.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){let t=Td(e)?qu.WHITESPACE_CHARACTER:e===Lu.NULL?qu.NULL_CHARACTER:qu.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(qu.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=_d.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ad.Attribute:ad.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===_d.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===_d.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===_d.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case _d.DATA:this._stateData(e);break;case _d.RCDATA:this._stateRcdata(e);break;case _d.RAWTEXT:this._stateRawtext(e);break;case _d.SCRIPT_DATA:this._stateScriptData(e);break;case _d.PLAINTEXT:this._statePlaintext(e);break;case _d.TAG_OPEN:this._stateTagOpen(e);break;case _d.END_TAG_OPEN:this._stateEndTagOpen(e);break;case _d.TAG_NAME:this._stateTagName(e);break;case _d.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case _d.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case _d.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case _d.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case _d.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case _d.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case _d.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case _d.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case _d.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case _d.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case _d.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case _d.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case _d.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case _d.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case _d.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case _d.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case _d.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case _d.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case _d.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case _d.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case _d.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case _d.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case _d.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case _d.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case _d.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case _d.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case _d.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case _d.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case _d.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case _d.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case _d.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case _d.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case _d.BOGUS_COMMENT:this._stateBogusComment(e);break;case _d.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case _d.COMMENT_START:this._stateCommentStart(e);break;case _d.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case _d.COMMENT:this._stateComment(e);break;case _d.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case _d.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case _d.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case _d.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case _d.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case _d.COMMENT_END:this._stateCommentEnd(e);break;case _d.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case _d.DOCTYPE:this._stateDoctype(e);break;case _d.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case _d.DOCTYPE_NAME:this._stateDoctypeName(e);break;case _d.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case _d.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case _d.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case _d.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case _d.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case _d.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case _d.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case _d.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case _d.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case _d.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case _d.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case _d.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case _d.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case _d.CDATA_SECTION:this._stateCdataSection(e);break;case _d.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case _d.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case _d.CHARACTER_REFERENCE:this._stateCharacterReference();break;case _d.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case Lu.LESS_THAN_SIGN:this.state=_d.TAG_OPEN;break;case Lu.AMPERSAND:this._startCharacterReference();break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this._emitCodePoint(e);break;case Lu.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case Lu.AMPERSAND:this._startCharacterReference();break;case Lu.LESS_THAN_SIGN:this.state=_d.RCDATA_LESS_THAN_SIGN;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this._emitChars(`�`);break;case Lu.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case Lu.LESS_THAN_SIGN:this.state=_d.RAWTEXT_LESS_THAN_SIGN;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this._emitChars(`�`);break;case Lu.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case Lu.LESS_THAN_SIGN:this.state=_d.SCRIPT_DATA_LESS_THAN_SIGN;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this._emitChars(`�`);break;case Lu.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this._emitChars(`�`);break;case Lu.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Sd(e))this._createStartTagToken(),this.state=_d.TAG_NAME,this._stateTagName(e);else switch(e){case Lu.EXCLAMATION_MARK:this.state=_d.MARKUP_DECLARATION_OPEN;break;case Lu.SOLIDUS:this.state=_d.END_TAG_OPEN;break;case Lu.QUESTION_MARK:this._err(Wu.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=_d.BOGUS_COMMENT,this._stateBogusComment(e);break;case Lu.EOF:this._err(Wu.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(Wu.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=_d.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Sd(e))this._createEndTagToken(),this.state=_d.TAG_NAME,this._stateTagName(e);else switch(e){case Lu.GREATER_THAN_SIGN:this._err(Wu.missingEndTagName),this.state=_d.DATA;break;case Lu.EOF:this._err(Wu.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(Wu.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=_d.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:this.state=_d.BEFORE_ATTRIBUTE_NAME;break;case Lu.SOLIDUS:this.state=_d.SELF_CLOSING_START_TAG;break;case Lu.GREATER_THAN_SIGN:this.state=_d.DATA,this.emitCurrentTagToken();break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),t.tagName+=`�`;break;case Lu.EOF:this._err(Wu.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(bd(e)?wd(e):e)}}_stateRcdataLessThanSign(e){e===Lu.SOLIDUS?this.state=_d.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=_d.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){Sd(e)?(this.state=_d.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=_d.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=_d.BEFORE_ATTRIBUTE_NAME,!1;case Lu.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=_d.SELF_CLOSING_START_TAG,!1;case Lu.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=_d.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=_d.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===Lu.SOLIDUS?this.state=_d.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=_d.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){Sd(e)?(this.state=_d.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=_d.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=_d.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case Lu.SOLIDUS:this.state=_d.SCRIPT_DATA_END_TAG_OPEN;break;case Lu.EXCLAMATION_MARK:this.state=_d.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=_d.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){Sd(e)?(this.state=_d.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=_d.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=_d.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===Lu.HYPHEN_MINUS?(this.state=_d.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=_d.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===Lu.HYPHEN_MINUS?(this.state=_d.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=_d.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case Lu.HYPHEN_MINUS:this.state=_d.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case Lu.LESS_THAN_SIGN:this.state=_d.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this._emitChars(`�`);break;case Lu.EOF:this._err(Wu.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case Lu.HYPHEN_MINUS:this.state=_d.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case Lu.LESS_THAN_SIGN:this.state=_d.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this.state=_d.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case Lu.EOF:this._err(Wu.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=_d.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case Lu.HYPHEN_MINUS:this._emitChars(`-`);break;case Lu.LESS_THAN_SIGN:this.state=_d.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Lu.GREATER_THAN_SIGN:this.state=_d.SCRIPT_DATA,this._emitChars(`>`);break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this.state=_d.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case Lu.EOF:this._err(Wu.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=_d.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===Lu.SOLIDUS?this.state=_d.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Sd(e)?(this._emitChars(`<`),this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=_d.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Sd(e)?(this.state=_d.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=_d.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=_d.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Ru.SCRIPT,!1)&&Ed(this.preprocessor.peek(Ru.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<Ru.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=_d.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case Lu.HYPHEN_MINUS:this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case Lu.LESS_THAN_SIGN:this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this._emitChars(`�`);break;case Lu.EOF:this._err(Wu.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case Lu.HYPHEN_MINUS:this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case Lu.LESS_THAN_SIGN:this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case Lu.EOF:this._err(Wu.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case Lu.HYPHEN_MINUS:this._emitChars(`-`);break;case Lu.LESS_THAN_SIGN:this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case Lu.GREATER_THAN_SIGN:this.state=_d.SCRIPT_DATA,this._emitChars(`>`);break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case Lu.EOF:this._err(Wu.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===Lu.SOLIDUS?(this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Ru.SCRIPT,!1)&&Ed(this.preprocessor.peek(Ru.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<Ru.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=_d.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=_d.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:break;case Lu.SOLIDUS:case Lu.GREATER_THAN_SIGN:case Lu.EOF:this.state=_d.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Lu.EQUALS_SIGN:this._err(Wu.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=_d.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=_d.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:case Lu.SOLIDUS:case Lu.GREATER_THAN_SIGN:case Lu.EOF:this._leaveAttrName(),this.state=_d.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Lu.EQUALS_SIGN:this._leaveAttrName(),this.state=_d.BEFORE_ATTRIBUTE_VALUE;break;case Lu.QUOTATION_MARK:case Lu.APOSTROPHE:case Lu.LESS_THAN_SIGN:this._err(Wu.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(bd(e)?wd(e):e)}}_stateAfterAttributeName(e){switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:break;case Lu.SOLIDUS:this.state=_d.SELF_CLOSING_START_TAG;break;case Lu.EQUALS_SIGN:this.state=_d.BEFORE_ATTRIBUTE_VALUE;break;case Lu.GREATER_THAN_SIGN:this.state=_d.DATA,this.emitCurrentTagToken();break;case Lu.EOF:this._err(Wu.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=_d.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:break;case Lu.QUOTATION_MARK:this.state=_d.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case Lu.APOSTROPHE:this.state=_d.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.missingAttributeValue),this.state=_d.DATA,this.emitCurrentTagToken();break;default:this.state=_d.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case Lu.QUOTATION_MARK:this.state=_d.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Lu.AMPERSAND:this._startCharacterReference();break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case Lu.EOF:this._err(Wu.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case Lu.APOSTROPHE:this.state=_d.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Lu.AMPERSAND:this._startCharacterReference();break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case Lu.EOF:this._err(Wu.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:this._leaveAttrValue(),this.state=_d.BEFORE_ATTRIBUTE_NAME;break;case Lu.AMPERSAND:this._startCharacterReference();break;case Lu.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=_d.DATA,this.emitCurrentTagToken();break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case Lu.QUOTATION_MARK:case Lu.APOSTROPHE:case Lu.LESS_THAN_SIGN:case Lu.EQUALS_SIGN:case Lu.GRAVE_ACCENT:this._err(Wu.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case Lu.EOF:this._err(Wu.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:this._leaveAttrValue(),this.state=_d.BEFORE_ATTRIBUTE_NAME;break;case Lu.SOLIDUS:this._leaveAttrValue(),this.state=_d.SELF_CLOSING_START_TAG;break;case Lu.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=_d.DATA,this.emitCurrentTagToken();break;case Lu.EOF:this._err(Wu.eofInTag),this._emitEOFToken();break;default:this._err(Wu.missingWhitespaceBetweenAttributes),this.state=_d.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case Lu.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=_d.DATA,this.emitCurrentTagToken();break}case Lu.EOF:this._err(Wu.eofInTag),this._emitEOFToken();break;default:this._err(Wu.unexpectedSolidusInTag),this.state=_d.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case Lu.GREATER_THAN_SIGN:this.state=_d.DATA,this.emitCurrentComment(t);break;case Lu.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Ru.DASH_DASH,!0)?(this._createCommentToken(Ru.DASH_DASH.length+1),this.state=_d.COMMENT_START):this._consumeSequenceIfMatch(Ru.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ru.DOCTYPE.length+1),this.state=_d.DOCTYPE):this._consumeSequenceIfMatch(Ru.CDATA_START,!0)?this.inForeignNode?this.state=_d.CDATA_SECTION:(this._err(Wu.cdataInHtmlContent),this._createCommentToken(Ru.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=_d.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Wu.incorrectlyOpenedComment),this._createCommentToken(2),this.state=_d.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case Lu.HYPHEN_MINUS:this.state=_d.COMMENT_START_DASH;break;case Lu.GREATER_THAN_SIGN:{this._err(Wu.abruptClosingOfEmptyComment),this.state=_d.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=_d.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case Lu.HYPHEN_MINUS:this.state=_d.COMMENT_END;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.abruptClosingOfEmptyComment),this.state=_d.DATA,this.emitCurrentComment(t);break;case Lu.EOF:this._err(Wu.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=_d.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case Lu.HYPHEN_MINUS:this.state=_d.COMMENT_END_DASH;break;case Lu.LESS_THAN_SIGN:t.data+=`<`,this.state=_d.COMMENT_LESS_THAN_SIGN;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),t.data+=`�`;break;case Lu.EOF:this._err(Wu.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case Lu.EXCLAMATION_MARK:t.data+=`!`,this.state=_d.COMMENT_LESS_THAN_SIGN_BANG;break;case Lu.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=_d.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===Lu.HYPHEN_MINUS?this.state=_d.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=_d.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===Lu.HYPHEN_MINUS?this.state=_d.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=_d.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==Lu.GREATER_THAN_SIGN&&e!==Lu.EOF&&this._err(Wu.nestedComment),this.state=_d.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case Lu.HYPHEN_MINUS:this.state=_d.COMMENT_END;break;case Lu.EOF:this._err(Wu.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=_d.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case Lu.GREATER_THAN_SIGN:this.state=_d.DATA,this.emitCurrentComment(t);break;case Lu.EXCLAMATION_MARK:this.state=_d.COMMENT_END_BANG;break;case Lu.HYPHEN_MINUS:t.data+=`-`;break;case Lu.EOF:this._err(Wu.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=_d.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case Lu.HYPHEN_MINUS:t.data+=`--!`,this.state=_d.COMMENT_END_DASH;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.incorrectlyClosedComment),this.state=_d.DATA,this.emitCurrentComment(t);break;case Lu.EOF:this._err(Wu.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=_d.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:this.state=_d.BEFORE_DOCTYPE_NAME;break;case Lu.GREATER_THAN_SIGN:this.state=_d.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case Lu.EOF:{this._err(Wu.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(Wu.missingWhitespaceBeforeDoctypeName),this.state=_d.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(bd(e))this._createDoctypeToken(String.fromCharCode(wd(e))),this.state=_d.DOCTYPE_NAME;else switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=_d.DOCTYPE_NAME;break;case Lu.GREATER_THAN_SIGN:{this._err(Wu.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=_d.DATA;break}case Lu.EOF:{this._err(Wu.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=_d.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:this.state=_d.AFTER_DOCTYPE_NAME;break;case Lu.GREATER_THAN_SIGN:this.state=_d.DATA,this.emitCurrentDoctype(t);break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),t.name+=`�`;break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(bd(e)?wd(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:break;case Lu.GREATER_THAN_SIGN:this.state=_d.DATA,this.emitCurrentDoctype(t);break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(Ru.PUBLIC,!1)?this.state=_d.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ru.SYSTEM,!1)?this.state=_d.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Wu.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=_d.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:this.state=_d.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case Lu.QUOTATION_MARK:this._err(Wu.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=_d.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Lu.APOSTROPHE:this._err(Wu.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=_d.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=_d.DATA,this.emitCurrentDoctype(t);break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Wu.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=_d.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:break;case Lu.QUOTATION_MARK:t.publicId=``,this.state=_d.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Lu.APOSTROPHE:t.publicId=``,this.state=_d.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=_d.DATA,this.emitCurrentDoctype(t);break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Wu.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=_d.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case Lu.QUOTATION_MARK:this.state=_d.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),t.publicId+=`�`;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=_d.DATA;break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case Lu.APOSTROPHE:this.state=_d.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),t.publicId+=`�`;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=_d.DATA;break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:this.state=_d.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case Lu.GREATER_THAN_SIGN:this.state=_d.DATA,this.emitCurrentDoctype(t);break;case Lu.QUOTATION_MARK:this._err(Wu.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=_d.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Lu.APOSTROPHE:this._err(Wu.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=_d.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Wu.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_d.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:break;case Lu.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=_d.DATA;break;case Lu.QUOTATION_MARK:t.systemId=``,this.state=_d.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Lu.APOSTROPHE:t.systemId=``,this.state=_d.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Wu.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_d.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:this.state=_d.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case Lu.QUOTATION_MARK:this._err(Wu.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=_d.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Lu.APOSTROPHE:this._err(Wu.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=_d.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_d.DATA,this.emitCurrentDoctype(t);break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Wu.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_d.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:break;case Lu.QUOTATION_MARK:t.systemId=``,this.state=_d.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Lu.APOSTROPHE:t.systemId=``,this.state=_d.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_d.DATA,this.emitCurrentDoctype(t);break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Wu.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_d.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case Lu.QUOTATION_MARK:this.state=_d.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),t.systemId+=`�`;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=_d.DATA;break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case Lu.APOSTROPHE:this.state=_d.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter),t.systemId+=`�`;break;case Lu.GREATER_THAN_SIGN:this._err(Wu.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=_d.DATA;break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case Lu.SPACE:case Lu.LINE_FEED:case Lu.TABULATION:case Lu.FORM_FEED:break;case Lu.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=_d.DATA;break;case Lu.EOF:this._err(Wu.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Wu.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=_d.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case Lu.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=_d.DATA;break;case Lu.NULL:this._err(Wu.unexpectedNullCharacter);break;case Lu.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case Lu.RIGHT_SQUARE_BRACKET:this.state=_d.CDATA_SECTION_BRACKET;break;case Lu.EOF:this._err(Wu.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===Lu.RIGHT_SQUARE_BRACKET?this.state=_d.CDATA_SECTION_END:(this._emitChars(`]`),this.state=_d.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case Lu.GREATER_THAN_SIGN:this.state=_d.DATA;break;case Lu.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=_d.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0){if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(Lu.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Cd(this.preprocessor.peek(1))?_d.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Cd(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===Lu.SEMICOLON&&this._err(Wu.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},kd=new Set([U.DD,U.DT,U.LI,U.OPTGROUP,U.OPTION,U.P,U.RB,U.RP,U.RT,U.RTC]),Ad=new Set([...kd,U.CAPTION,U.COLGROUP,U.TBODY,U.TD,U.TFOOT,U.TH,U.THEAD,U.TR]),jd=new Set([U.APPLET,U.CAPTION,U.HTML,U.MARQUEE,U.OBJECT,U.TABLE,U.TD,U.TEMPLATE,U.TH]),Md=new Set([...jd,U.OL,U.UL]),Nd=new Set([...jd,U.BUTTON]),Pd=new Set([U.ANNOTATION_XML,U.MI,U.MN,U.MO,U.MS,U.MTEXT]),Fd=new Set([U.DESC,U.FOREIGN_OBJECT,U.TITLE]),Id=new Set([U.TR,U.TEMPLATE,U.HTML]),Ld=new Set([U.TBODY,U.TFOOT,U.THEAD,U.TEMPLATE,U.HTML]),tee=new Set([U.TABLE,U.TEMPLATE,U.HTML]),Rd=new Set([U.TD,U.TH]),zd=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=U.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===U.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===cd.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==cd.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(gd,cd.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Rd,cd.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(tee,cd.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Ld,cd.HTML)}clearBackToTableRowContext(){this.clearBackTo(Id,cd.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===U.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===U.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case cd.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case cd.SVG:if(Fd.has(r))return!1;break;case cd.MATHML:if(Pd.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,jd)}hasInListItemScope(e){return this.hasInDynamicScope(e,Md)}hasInButtonScope(e){return this.hasInDynamicScope(e,Nd)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case cd.HTML:if(gd.has(t))return!0;if(jd.has(t))return!1;break;case cd.SVG:if(Fd.has(t))return!1;break;case cd.MATHML:if(Pd.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===cd.HTML)switch(this.tagIDs[t]){case e:return!0;case U.TABLE:case U.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===cd.HTML)switch(this.tagIDs[e]){case U.TBODY:case U.THEAD:case U.TFOOT:return!0;case U.TABLE:case U.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===cd.HTML)switch(this.tagIDs[t]){case e:return!0;case U.OPTION:case U.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&kd.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Ad.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&Ad.has(this.currentTagId);)this.pop()}},Bd=3,Vd;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(Vd||={});var Hd={type:Vd.Marker},Ud=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===Vd.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<Bd)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<Bd)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=Bd&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(Hd)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:Vd.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:Vd.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(Hd);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===Vd.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===Vd.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===Vd.Element&&t.element===e)}},Wd={createDocument(){return{nodeName:`#document`,mode:ud.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};Wd.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(Wd.isTextNode(n)){n.value+=t;return}}Wd.appendChild(e,Wd.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Wd.isTextNode(r)?r.value+=t:Wd.insertBefore(e,Wd.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName===`#text`},isCommentNode(e){return e.nodeName===`#comment`},isDocumentTypeNode(e){return e.nodeName===`#documentType`},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,`tagName`)},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Gd=`html`,Kd=`about:legacy-compat`,qd=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,Jd=`+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`),Yd=[...Jd,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],Xd=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),Zd=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],Qd=[...Zd,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function $d(e,t){return t.some(t=>e.startsWith(t))}function ef(e){return e.name===Gd&&e.publicId===null&&(e.systemId===null||e.systemId===Kd)}function tf(e){if(e.name!==Gd)return ud.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===qd)return ud.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Xd.has(n))return ud.QUIRKS;let e=t===null?Yd:Jd;if($d(n,e))return ud.QUIRKS;if(e=t===null?Zd:Qd,$d(n,e))return ud.LIMITED_QUIRKS}return ud.NO_QUIRKS}var nf={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},rf=`definitionurl`,af=`definitionURL`,of=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),sf=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:cd.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:cd.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:cd.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:cd.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:cd.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:cd.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:cd.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:cd.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:cd.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:cd.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:cd.XMLNS}]]),cf=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),lf=new Set([U.B,U.BIG,U.BLOCKQUOTE,U.BODY,U.BR,U.CENTER,U.CODE,U.DD,U.DIV,U.DL,U.DT,U.EM,U.EMBED,U.H1,U.H2,U.H3,U.H4,U.H5,U.H6,U.HEAD,U.HR,U.I,U.IMG,U.LI,U.LISTING,U.MENU,U.META,U.NOBR,U.OL,U.P,U.PRE,U.RUBY,U.S,U.SMALL,U.SPAN,U.STRONG,U.STRIKE,U.SUB,U.SUP,U.TABLE,U.TT,U.U,U.UL,U.VAR]);function uf(e){let t=e.tagID;return t===U.FONT&&e.attrs.some(({name:e})=>e===ld.COLOR||e===ld.SIZE||e===ld.FACE)||lf.has(t)}function df(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===rf){e.attrs[t].name=af;break}}function ff(e){for(let t=0;t<e.attrs.length;t++){let n=of.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function pf(e){for(let t=0;t<e.attrs.length;t++){let n=sf.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function mf(e){let t=cf.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=pd(e.tagName))}function hf(e,t){return t===cd.MATHML&&(e===U.MI||e===U.MO||e===U.MN||e===U.MS||e===U.MTEXT)}function gf(e,t,n){if(t===cd.MATHML&&e===U.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===ld.ENCODING){let t=n[e].value.toLowerCase();return t===nf.TEXT_HTML||t===nf.APPLICATION_XML}}return t===cd.SVG&&(e===U.FOREIGN_OBJECT||e===U.DESC||e===U.TITLE)}function _f(e,t,n,r){return(!r||r===cd.HTML)&&gf(e,t,n)||(!r||r===cd.MATHML)&&hf(e,t)}var vf=`hidden`,yf=8,bf=3,xf;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})(xf||={});var Sf={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Cf=new Set([U.TABLE,U.TBODY,U.TFOOT,U.THEAD,U.TR]),wf={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Wd,onParseError:null},Tf=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=xf.INITIAL,this.originalInsertionMode=xf.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...wf,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new Od(this.options,this),this.activeFormattingElements=new Ud(this.treeAdapter),this.fragmentContextID=n?pd(this.treeAdapter.getTagName(n)):U.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new zd(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...wf,...t};e??=n.treeAdapter.createElement(dd.TEMPLATE,cd.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,cd.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===U.TEMPLATE&&i.tmplInsertionModeStack.unshift(xf.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??Sf,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===cd.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,cd.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=xf.TEXT}switchToPlaintextParsing(){this.insertionMode=xf.TEXT,this.originalInsertionMode=xf.IN_BODY,this.tokenizer.state=vd.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===dd.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===cd.HTML)switch(this.fragmentContextID){case U.TITLE:case U.TEXTAREA:this.tokenizer.state=vd.RCDATA;break;case U.STYLE:case U.XMP:case U.IFRAME:case U.NOEMBED:case U.NOFRAMES:case U.NOSCRIPT:this.tokenizer.state=vd.RAWTEXT;break;case U.SCRIPT:this.tokenizer.state=vd.SCRIPT_DATA;break;case U.PLAINTEXT:this.tokenizer.state=vd.PLAINTEXT}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,cd.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,cd.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(dd.HTML,cd.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,U.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===qu.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===U.SVG&&this.treeAdapter.getTagName(t)===dd.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===cd.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===U.MGLYPH||e.tagID===U.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,cd.HTML)}_processToken(e){switch(e.type){case qu.CHARACTER:this.onCharacter(e);break;case qu.NULL_CHARACTER:this.onNullCharacter(e);break;case qu.COMMENT:this.onComment(e);break;case qu.DOCTYPE:this.onDoctype(e);break;case qu.START_TAG:this._processStartTag(e);break;case qu.END_TAG:this.onEndTag(e);break;case qu.EOF:this.onEof(e);break;case qu.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return _f(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===Vd.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=xf.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(U.P),this.openElements.popUntilTagNamePopped(U.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case U.TR:this.insertionMode=xf.IN_ROW;return;case U.TBODY:case U.THEAD:case U.TFOOT:this.insertionMode=xf.IN_TABLE_BODY;return;case U.CAPTION:this.insertionMode=xf.IN_CAPTION;return;case U.COLGROUP:this.insertionMode=xf.IN_COLUMN_GROUP;return;case U.TABLE:this.insertionMode=xf.IN_TABLE;return;case U.BODY:this.insertionMode=xf.IN_BODY;return;case U.FRAMESET:this.insertionMode=xf.IN_FRAMESET;return;case U.SELECT:this._resetInsertionModeForSelect(e);return;case U.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case U.HTML:this.insertionMode=this.headElement?xf.AFTER_HEAD:xf.BEFORE_HEAD;return;case U.TD:case U.TH:if(e>0){this.insertionMode=xf.IN_CELL;return}break;case U.HEAD:if(e>0){this.insertionMode=xf.IN_HEAD;return}}this.insertionMode=xf.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===U.TEMPLATE)break;if(e===U.TABLE){this.insertionMode=xf.IN_SELECT_IN_TABLE;return}}this.insertionMode=xf.IN_SELECT}_isElementCausesFosterParenting(e){return Cf.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case U.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===cd.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case U.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return hd[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){pte(this,e);return}switch(this.insertionMode){case xf.INITIAL:Nf(this,e);break;case xf.BEFORE_HTML:If(this,e);break;case xf.BEFORE_HEAD:Rf(this,e);break;case xf.IN_HEAD:Hf(this,e);break;case xf.IN_HEAD_NO_SCRIPT:Wf(this,e);break;case xf.AFTER_HEAD:Kf(this,e);break;case xf.IN_BODY:case xf.IN_CAPTION:case xf.IN_CELL:case xf.IN_TEMPLATE:Jf(this,e);break;case xf.TEXT:case xf.IN_SELECT:case xf.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case xf.IN_TABLE:case xf.IN_TABLE_BODY:case xf.IN_ROW:Nee(this,e);break;case xf.IN_TABLE_TEXT:Uee(this,e);break;case xf.IN_COLUMN_GROUP:Ep(this,e);break;case xf.AFTER_BODY:Ap(this,e);break;case xf.AFTER_AFTER_BODY:jp(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){fte(this,e);return}switch(this.insertionMode){case xf.INITIAL:Nf(this,e);break;case xf.BEFORE_HTML:If(this,e);break;case xf.BEFORE_HEAD:Rf(this,e);break;case xf.IN_HEAD:Hf(this,e);break;case xf.IN_HEAD_NO_SCRIPT:Wf(this,e);break;case xf.AFTER_HEAD:Kf(this,e);break;case xf.TEXT:this._insertCharacters(e);break;case xf.IN_TABLE:case xf.IN_TABLE_BODY:case xf.IN_ROW:Nee(this,e);break;case xf.IN_COLUMN_GROUP:Ep(this,e);break;case xf.AFTER_BODY:Ap(this,e);break;case xf.AFTER_AFTER_BODY:jp(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){jf(this,e);return}switch(this.insertionMode){case xf.INITIAL:case xf.BEFORE_HTML:case xf.BEFORE_HEAD:case xf.IN_HEAD:case xf.IN_HEAD_NO_SCRIPT:case xf.AFTER_HEAD:case xf.IN_BODY:case xf.IN_TABLE:case xf.IN_CAPTION:case xf.IN_COLUMN_GROUP:case xf.IN_TABLE_BODY:case xf.IN_ROW:case xf.IN_CELL:case xf.IN_SELECT:case xf.IN_SELECT_IN_TABLE:case xf.IN_TEMPLATE:case xf.IN_FRAMESET:case xf.AFTER_FRAMESET:jf(this,e);break;case xf.IN_TABLE_TEXT:wp(this,e);break;case xf.AFTER_BODY:iee(this,e);break;case xf.AFTER_AFTER_BODY:case xf.AFTER_AFTER_FRAMESET:aee(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case xf.INITIAL:oee(this,e);break;case xf.BEFORE_HEAD:case xf.IN_HEAD:case xf.IN_HEAD_NO_SCRIPT:case xf.AFTER_HEAD:this._err(e,Wu.misplacedDoctype);break;case xf.IN_TABLE_TEXT:wp(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,Wu.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?hte(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case xf.INITIAL:Nf(this,e);break;case xf.BEFORE_HTML:Pf(this,e);break;case xf.BEFORE_HEAD:see(this,e);break;case xf.IN_HEAD:zf(this,e);break;case xf.IN_HEAD_NO_SCRIPT:Uf(this,e);break;case xf.AFTER_HEAD:lee(this,e);break;case xf.IN_BODY:mp(this,e);break;case xf.IN_TABLE:xp(this,e);break;case xf.IN_TABLE_TEXT:wp(this,e);break;case xf.IN_CAPTION:Gee(this,e);break;case xf.IN_COLUMN_GROUP:Tp(this,e);break;case xf.IN_TABLE_BODY:Dp(this,e);break;case xf.IN_ROW:kp(this,e);break;case xf.IN_CELL:Yee(this,e);break;case xf.IN_SELECT:Zee(this,e);break;case xf.IN_SELECT_IN_TABLE:$ee(this,e);break;case xf.IN_TEMPLATE:tte(this,e);break;case xf.AFTER_BODY:ite(this,e);break;case xf.IN_FRAMESET:ote(this,e);break;case xf.AFTER_FRAMESET:cte(this,e);break;case xf.AFTER_AFTER_BODY:ute(this,e);break;case xf.AFTER_AFTER_FRAMESET:dte(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?gte(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case xf.INITIAL:Nf(this,e);break;case xf.BEFORE_HTML:Ff(this,e);break;case xf.BEFORE_HEAD:Lf(this,e);break;case xf.IN_HEAD:Bf(this,e);break;case xf.IN_HEAD_NO_SCRIPT:cee(this,e);break;case xf.AFTER_HEAD:Gf(this,e);break;case xf.IN_BODY:bp(this,e);break;case xf.TEXT:jee(this,e);break;case xf.IN_TABLE:Sp(this,e);break;case xf.IN_TABLE_TEXT:wp(this,e);break;case xf.IN_CAPTION:Kee(this,e);break;case xf.IN_COLUMN_GROUP:qee(this,e);break;case xf.IN_TABLE_BODY:Op(this,e);break;case xf.IN_ROW:Jee(this,e);break;case xf.IN_CELL:Xee(this,e);break;case xf.IN_SELECT:Qee(this,e);break;case xf.IN_SELECT_IN_TABLE:ete(this,e);break;case xf.IN_TEMPLATE:nte(this,e);break;case xf.AFTER_BODY:ate(this,e);break;case xf.IN_FRAMESET:ste(this,e);break;case xf.AFTER_FRAMESET:lte(this,e);break;case xf.AFTER_AFTER_BODY:jp(this,e)}}onEof(e){switch(this.insertionMode){case xf.INITIAL:Nf(this,e);break;case xf.BEFORE_HTML:If(this,e);break;case xf.BEFORE_HEAD:Rf(this,e);break;case xf.IN_HEAD:Hf(this,e);break;case xf.IN_HEAD_NO_SCRIPT:Wf(this,e);break;case xf.AFTER_HEAD:Kf(this,e);break;case xf.IN_BODY:case xf.IN_TABLE:case xf.IN_CAPTION:case xf.IN_COLUMN_GROUP:case xf.IN_TABLE_BODY:case xf.IN_ROW:case xf.IN_CELL:case xf.IN_SELECT:case xf.IN_SELECT_IN_TABLE:Aee(this,e);break;case xf.TEXT:Mee(this,e);break;case xf.IN_TABLE_TEXT:wp(this,e);break;case xf.IN_TEMPLATE:rte(this,e);break;case xf.AFTER_BODY:case xf.IN_FRAMESET:case xf.AFTER_FRAMESET:case xf.AFTER_AFTER_BODY:case xf.AFTER_AFTER_FRAMESET:Mf(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===Lu.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case xf.IN_HEAD:case xf.IN_HEAD_NO_SCRIPT:case xf.AFTER_HEAD:case xf.TEXT:case xf.IN_COLUMN_GROUP:case xf.IN_SELECT:case xf.IN_SELECT_IN_TABLE:case xf.IN_FRAMESET:case xf.AFTER_FRAMESET:this._insertCharacters(e);break;case xf.IN_BODY:case xf.IN_CAPTION:case xf.IN_CELL:case xf.IN_TEMPLATE:case xf.AFTER_BODY:case xf.AFTER_AFTER_BODY:case xf.AFTER_AFTER_FRAMESET:uee(this,e);break;case xf.IN_TABLE:case xf.IN_TABLE_BODY:case xf.IN_ROW:Nee(this,e);break;case xf.IN_TABLE_TEXT:Hee(this,e)}}};function Ef(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):kee(e,t),n}function Df(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Of(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=bf;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=kf(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function kf(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function nee(e,t,n){let r=pd(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===U.TEMPLATE&&i===cd.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function ree(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Af(e,t){for(let n=0;n<yf;n++){let n=Ef(e,t);if(!n)break;let r=Df(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=Of(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&nee(e,a,i),ree(e,r,n)}}function jf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function iee(e,t){e._appendCommentNode(t,e.openElements.items[0])}function aee(e,t){e._appendCommentNode(t,e.document)}function Mf(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function oee(e,t){e._setDocumentType(t);let n=t.forceQuirks?ud.QUIRKS:tf(t);ef(t)||e._err(t,Wu.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=xf.BEFORE_HTML}function Nf(e,t){e._err(t,Wu.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ud.QUIRKS),e.insertionMode=xf.BEFORE_HTML,e._processToken(t)}function Pf(e,t){t.tagID===U.HTML?(e._insertElement(t,cd.HTML),e.insertionMode=xf.BEFORE_HEAD):If(e,t)}function Ff(e,t){let n=t.tagID;(n===U.HTML||n===U.HEAD||n===U.BODY||n===U.BR)&&If(e,t)}function If(e,t){e._insertFakeRootElement(),e.insertionMode=xf.BEFORE_HEAD,e._processToken(t)}function see(e,t){switch(t.tagID){case U.HTML:mp(e,t);break;case U.HEAD:e._insertElement(t,cd.HTML),e.headElement=e.openElements.current,e.insertionMode=xf.IN_HEAD;break;default:Rf(e,t)}}function Lf(e,t){let n=t.tagID;n===U.HEAD||n===U.BODY||n===U.HTML||n===U.BR?Rf(e,t):e._err(t,Wu.endTagWithoutMatchingOpenElement)}function Rf(e,t){e._insertFakeElement(dd.HEAD,U.HEAD),e.headElement=e.openElements.current,e.insertionMode=xf.IN_HEAD,e._processToken(t)}function zf(e,t){switch(t.tagID){case U.HTML:mp(e,t);break;case U.BASE:case U.BASEFONT:case U.BGSOUND:case U.LINK:case U.META:e._appendElement(t,cd.HTML),t.ackSelfClosing=!0;break;case U.TITLE:e._switchToTextParsing(t,vd.RCDATA);break;case U.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,vd.RAWTEXT):(e._insertElement(t,cd.HTML),e.insertionMode=xf.IN_HEAD_NO_SCRIPT);break;case U.NOFRAMES:case U.STYLE:e._switchToTextParsing(t,vd.RAWTEXT);break;case U.SCRIPT:e._switchToTextParsing(t,vd.SCRIPT_DATA);break;case U.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=xf.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(xf.IN_TEMPLATE);break;case U.HEAD:e._err(t,Wu.misplacedStartTagForHeadElement);break;default:Hf(e,t)}}function Bf(e,t){switch(t.tagID){case U.HEAD:e.openElements.pop(),e.insertionMode=xf.AFTER_HEAD;break;case U.BODY:case U.BR:case U.HTML:Hf(e,t);break;case U.TEMPLATE:Vf(e,t);break;default:e._err(t,Wu.endTagWithoutMatchingOpenElement)}}function Vf(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==U.TEMPLATE&&e._err(t,Wu.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(U.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Wu.endTagWithoutMatchingOpenElement)}function Hf(e,t){e.openElements.pop(),e.insertionMode=xf.AFTER_HEAD,e._processToken(t)}function Uf(e,t){switch(t.tagID){case U.HTML:mp(e,t);break;case U.BASEFONT:case U.BGSOUND:case U.HEAD:case U.LINK:case U.META:case U.NOFRAMES:case U.STYLE:zf(e,t);break;case U.NOSCRIPT:e._err(t,Wu.nestedNoscriptInHead);break;default:Wf(e,t)}}function cee(e,t){switch(t.tagID){case U.NOSCRIPT:e.openElements.pop(),e.insertionMode=xf.IN_HEAD;break;case U.BR:Wf(e,t);break;default:e._err(t,Wu.endTagWithoutMatchingOpenElement)}}function Wf(e,t){let n=t.type===qu.EOF?Wu.openElementsLeftAfterEof:Wu.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=xf.IN_HEAD,e._processToken(t)}function lee(e,t){switch(t.tagID){case U.HTML:mp(e,t);break;case U.BODY:e._insertElement(t,cd.HTML),e.framesetOk=!1,e.insertionMode=xf.IN_BODY;break;case U.FRAMESET:e._insertElement(t,cd.HTML),e.insertionMode=xf.IN_FRAMESET;break;case U.BASE:case U.BASEFONT:case U.BGSOUND:case U.LINK:case U.META:case U.NOFRAMES:case U.SCRIPT:case U.STYLE:case U.TEMPLATE:case U.TITLE:e._err(t,Wu.abandonedHeadElementChild),e.openElements.push(e.headElement,U.HEAD),zf(e,t),e.openElements.remove(e.headElement);break;case U.HEAD:e._err(t,Wu.misplacedStartTagForHeadElement);break;default:Kf(e,t)}}function Gf(e,t){switch(t.tagID){case U.BODY:case U.HTML:case U.BR:Kf(e,t);break;case U.TEMPLATE:Vf(e,t);break;default:e._err(t,Wu.endTagWithoutMatchingOpenElement)}}function Kf(e,t){e._insertFakeElement(dd.BODY,U.BODY),e.insertionMode=xf.IN_BODY,qf(e,t)}function qf(e,t){switch(t.type){case qu.CHARACTER:Jf(e,t);break;case qu.WHITESPACE_CHARACTER:uee(e,t);break;case qu.COMMENT:jf(e,t);break;case qu.START_TAG:mp(e,t);break;case qu.END_TAG:bp(e,t);break;case qu.EOF:Aee(e,t)}}function uee(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Jf(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Yf(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Xf(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function dee(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,cd.HTML),e.insertionMode=xf.IN_FRAMESET)}function Zf(e,t){e.openElements.hasInButtonScope(U.P)&&e._closePElement(),e._insertElement(t,cd.HTML)}function fee(e,t){e.openElements.hasInButtonScope(U.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&gd.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,cd.HTML)}function pee(e,t){e.openElements.hasInButtonScope(U.P)&&e._closePElement(),e._insertElement(t,cd.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function mee(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(U.P)&&e._closePElement(),e._insertElement(t,cd.HTML),n||(e.formElement=e.openElements.current))}function hee(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===U.LI&&r===U.LI||(n===U.DD||n===U.DT)&&(r===U.DD||r===U.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==U.ADDRESS&&r!==U.DIV&&r!==U.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(U.P)&&e._closePElement(),e._insertElement(t,cd.HTML)}function gee(e,t){e.openElements.hasInButtonScope(U.P)&&e._closePElement(),e._insertElement(t,cd.HTML),e.tokenizer.state=vd.PLAINTEXT}function Qf(e,t){e.openElements.hasInScope(U.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(U.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,cd.HTML),e.framesetOk=!1}function _ee(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(dd.A);n&&(Af(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,cd.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function vee(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,cd.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function $f(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(U.NOBR)&&(Af(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,cd.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function yee(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,cd.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function bee(e,t){e.treeAdapter.getDocumentMode(e.document)!==ud.QUIRKS&&e.openElements.hasInButtonScope(U.P)&&e._closePElement(),e._insertElement(t,cd.HTML),e.framesetOk=!1,e.insertionMode=xf.IN_TABLE}function ep(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,cd.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function tp(e){let t=Ju(e,ld.TYPE);return t!=null&&t.toLowerCase()===vf}function np(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,cd.HTML),tp(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function rp(e,t){e._appendElement(t,cd.HTML),t.ackSelfClosing=!0}function ip(e,t){e.openElements.hasInButtonScope(U.P)&&e._closePElement(),e._appendElement(t,cd.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ap(e,t){t.tagName=dd.IMG,t.tagID=U.IMG,ep(e,t)}function op(e,t){e._insertElement(t,cd.HTML),e.skipNextNewLine=!0,e.tokenizer.state=vd.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=xf.TEXT}function sp(e,t){e.openElements.hasInButtonScope(U.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,vd.RAWTEXT)}function cp(e,t){e.framesetOk=!1,e._switchToTextParsing(t,vd.RAWTEXT)}function lp(e,t){e._switchToTextParsing(t,vd.RAWTEXT)}function up(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,cd.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===xf.IN_TABLE||e.insertionMode===xf.IN_CAPTION||e.insertionMode===xf.IN_TABLE_BODY||e.insertionMode===xf.IN_ROW||e.insertionMode===xf.IN_CELL?xf.IN_SELECT_IN_TABLE:xf.IN_SELECT}function dp(e,t){e.openElements.currentTagId===U.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,cd.HTML)}function xee(e,t){e.openElements.hasInScope(U.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,cd.HTML)}function See(e,t){e.openElements.hasInScope(U.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(U.RTC),e._insertElement(t,cd.HTML)}function fp(e,t){e._reconstructActiveFormattingElements(),df(t),pf(t),t.selfClosing?e._appendElement(t,cd.MATHML):e._insertElement(t,cd.MATHML),t.ackSelfClosing=!0}function Cee(e,t){e._reconstructActiveFormattingElements(),ff(t),pf(t),t.selfClosing?e._appendElement(t,cd.SVG):e._insertElement(t,cd.SVG),t.ackSelfClosing=!0}function pp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,cd.HTML)}function mp(e,t){switch(t.tagID){case U.I:case U.S:case U.B:case U.U:case U.EM:case U.TT:case U.BIG:case U.CODE:case U.FONT:case U.SMALL:case U.STRIKE:case U.STRONG:vee(e,t);break;case U.A:_ee(e,t);break;case U.H1:case U.H2:case U.H3:case U.H4:case U.H5:case U.H6:fee(e,t);break;case U.P:case U.DL:case U.OL:case U.UL:case U.DIV:case U.DIR:case U.NAV:case U.MAIN:case U.MENU:case U.ASIDE:case U.CENTER:case U.FIGURE:case U.FOOTER:case U.HEADER:case U.HGROUP:case U.DIALOG:case U.DETAILS:case U.ADDRESS:case U.ARTICLE:case U.SEARCH:case U.SECTION:case U.SUMMARY:case U.FIELDSET:case U.BLOCKQUOTE:case U.FIGCAPTION:Zf(e,t);break;case U.LI:case U.DD:case U.DT:hee(e,t);break;case U.BR:case U.IMG:case U.WBR:case U.AREA:case U.EMBED:case U.KEYGEN:ep(e,t);break;case U.HR:ip(e,t);break;case U.RB:case U.RTC:xee(e,t);break;case U.RT:case U.RP:See(e,t);break;case U.PRE:case U.LISTING:pee(e,t);break;case U.XMP:sp(e,t);break;case U.SVG:Cee(e,t);break;case U.HTML:Yf(e,t);break;case U.BASE:case U.LINK:case U.META:case U.STYLE:case U.TITLE:case U.SCRIPT:case U.BGSOUND:case U.BASEFONT:case U.TEMPLATE:zf(e,t);break;case U.BODY:Xf(e,t);break;case U.FORM:mee(e,t);break;case U.NOBR:$f(e,t);break;case U.MATH:fp(e,t);break;case U.TABLE:bee(e,t);break;case U.INPUT:np(e,t);break;case U.PARAM:case U.TRACK:case U.SOURCE:rp(e,t);break;case U.IMAGE:ap(e,t);break;case U.BUTTON:Qf(e,t);break;case U.APPLET:case U.OBJECT:case U.MARQUEE:yee(e,t);break;case U.IFRAME:cp(e,t);break;case U.SELECT:up(e,t);break;case U.OPTION:case U.OPTGROUP:dp(e,t);break;case U.NOEMBED:case U.NOFRAMES:lp(e,t);break;case U.FRAMESET:dee(e,t);break;case U.TEXTAREA:op(e,t);break;case U.NOSCRIPT:e.options.scriptingEnabled?lp(e,t):pp(e,t);break;case U.PLAINTEXT:gee(e,t);break;case U.COL:case U.TH:case U.TD:case U.TR:case U.HEAD:case U.FRAME:case U.TBODY:case U.TFOOT:case U.THEAD:case U.CAPTION:case U.COLGROUP:break;default:pp(e,t)}}function wee(e,t){if(e.openElements.hasInScope(U.BODY)&&(e.insertionMode=xf.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Tee(e,t){e.openElements.hasInScope(U.BODY)&&(e.insertionMode=xf.AFTER_BODY,ate(e,t))}function hp(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function gp(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(U.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(U.FORM):n&&e.openElements.remove(n))}function Eee(e){e.openElements.hasInButtonScope(U.P)||e._insertFakeElement(dd.P,U.P),e._closePElement()}function _p(e){e.openElements.hasInListItemScope(U.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(U.LI),e.openElements.popUntilTagNamePopped(U.LI))}function Dee(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function vp(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function yp(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Oee(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(dd.BR,U.BR),e.openElements.pop(),e.framesetOk=!1}function kee(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==U.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function bp(e,t){switch(t.tagID){case U.A:case U.B:case U.I:case U.S:case U.U:case U.EM:case U.TT:case U.BIG:case U.CODE:case U.FONT:case U.NOBR:case U.SMALL:case U.STRIKE:case U.STRONG:Af(e,t);break;case U.P:Eee(e);break;case U.DL:case U.UL:case U.OL:case U.DIR:case U.DIV:case U.NAV:case U.PRE:case U.MAIN:case U.MENU:case U.ASIDE:case U.BUTTON:case U.CENTER:case U.FIGURE:case U.FOOTER:case U.HEADER:case U.HGROUP:case U.DIALOG:case U.ADDRESS:case U.ARTICLE:case U.DETAILS:case U.SEARCH:case U.SECTION:case U.SUMMARY:case U.LISTING:case U.FIELDSET:case U.BLOCKQUOTE:case U.FIGCAPTION:hp(e,t);break;case U.LI:_p(e);break;case U.DD:case U.DT:Dee(e,t);break;case U.H1:case U.H2:case U.H3:case U.H4:case U.H5:case U.H6:vp(e);break;case U.BR:Oee(e);break;case U.BODY:wee(e,t);break;case U.HTML:Tee(e,t);break;case U.FORM:gp(e);break;case U.APPLET:case U.OBJECT:case U.MARQUEE:yp(e,t);break;case U.TEMPLATE:Vf(e,t);break;default:kee(e,t)}}function Aee(e,t){e.tmplInsertionModeStack.length>0?rte(e,t):Mf(e,t)}function jee(e,t){var n;t.tagID===U.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Mee(e,t){e._err(t,Wu.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Nee(e,t){if(e.openElements.currentTagId!==void 0&&Cf.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=xf.IN_TABLE_TEXT,t.type){case qu.CHARACTER:Uee(e,t);break;case qu.WHITESPACE_CHARACTER:Hee(e,t)}else Cp(e,t)}function Pee(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,cd.HTML),e.insertionMode=xf.IN_CAPTION}function Fee(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,cd.HTML),e.insertionMode=xf.IN_COLUMN_GROUP}function Iee(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(dd.COLGROUP,U.COLGROUP),e.insertionMode=xf.IN_COLUMN_GROUP,Tp(e,t)}function Lee(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,cd.HTML),e.insertionMode=xf.IN_TABLE_BODY}function Ree(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(dd.TBODY,U.TBODY),e.insertionMode=xf.IN_TABLE_BODY,Dp(e,t)}function zee(e,t){e.openElements.hasInTableScope(U.TABLE)&&(e.openElements.popUntilTagNamePopped(U.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Bee(e,t){tp(t)?e._appendElement(t,cd.HTML):Cp(e,t),t.ackSelfClosing=!0}function Vee(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,cd.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function xp(e,t){switch(t.tagID){case U.TD:case U.TH:case U.TR:Ree(e,t);break;case U.STYLE:case U.SCRIPT:case U.TEMPLATE:zf(e,t);break;case U.COL:Iee(e,t);break;case U.FORM:Vee(e,t);break;case U.TABLE:zee(e,t);break;case U.TBODY:case U.TFOOT:case U.THEAD:Lee(e,t);break;case U.INPUT:Bee(e,t);break;case U.CAPTION:Pee(e,t);break;case U.COLGROUP:Fee(e,t);break;default:Cp(e,t)}}function Sp(e,t){switch(t.tagID){case U.TABLE:e.openElements.hasInTableScope(U.TABLE)&&(e.openElements.popUntilTagNamePopped(U.TABLE),e._resetInsertionMode());break;case U.TEMPLATE:Vf(e,t);break;case U.BODY:case U.CAPTION:case U.COL:case U.COLGROUP:case U.HTML:case U.TBODY:case U.TD:case U.TFOOT:case U.TH:case U.THEAD:case U.TR:break;default:Cp(e,t)}}function Cp(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,qf(e,t),e.fosterParentingEnabled=n}function Hee(e,t){e.pendingCharacterTokens.push(t)}function Uee(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function wp(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Cp(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var Wee=new Set([U.CAPTION,U.COL,U.COLGROUP,U.TBODY,U.TD,U.TFOOT,U.TH,U.THEAD,U.TR]);function Gee(e,t){let n=t.tagID;Wee.has(n)?e.openElements.hasInTableScope(U.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(U.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=xf.IN_TABLE,xp(e,t)):mp(e,t)}function Kee(e,t){let n=t.tagID;switch(n){case U.CAPTION:case U.TABLE:e.openElements.hasInTableScope(U.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(U.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=xf.IN_TABLE,n===U.TABLE&&Sp(e,t));break;case U.BODY:case U.COL:case U.COLGROUP:case U.HTML:case U.TBODY:case U.TD:case U.TFOOT:case U.TH:case U.THEAD:case U.TR:break;default:bp(e,t)}}function Tp(e,t){switch(t.tagID){case U.HTML:mp(e,t);break;case U.COL:e._appendElement(t,cd.HTML),t.ackSelfClosing=!0;break;case U.TEMPLATE:zf(e,t);break;default:Ep(e,t)}}function qee(e,t){switch(t.tagID){case U.COLGROUP:e.openElements.currentTagId===U.COLGROUP&&(e.openElements.pop(),e.insertionMode=xf.IN_TABLE);break;case U.TEMPLATE:Vf(e,t);break;case U.COL:break;default:Ep(e,t)}}function Ep(e,t){e.openElements.currentTagId===U.COLGROUP&&(e.openElements.pop(),e.insertionMode=xf.IN_TABLE,e._processToken(t))}function Dp(e,t){switch(t.tagID){case U.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,cd.HTML),e.insertionMode=xf.IN_ROW;break;case U.TH:case U.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(dd.TR,U.TR),e.insertionMode=xf.IN_ROW,kp(e,t);break;case U.CAPTION:case U.COL:case U.COLGROUP:case U.TBODY:case U.TFOOT:case U.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=xf.IN_TABLE,xp(e,t));break;default:xp(e,t)}}function Op(e,t){let n=t.tagID;switch(t.tagID){case U.TBODY:case U.TFOOT:case U.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=xf.IN_TABLE);break;case U.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=xf.IN_TABLE,Sp(e,t));break;case U.BODY:case U.CAPTION:case U.COL:case U.COLGROUP:case U.HTML:case U.TD:case U.TH:case U.TR:break;default:Sp(e,t)}}function kp(e,t){switch(t.tagID){case U.TH:case U.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,cd.HTML),e.insertionMode=xf.IN_CELL,e.activeFormattingElements.insertMarker();break;case U.CAPTION:case U.COL:case U.COLGROUP:case U.TBODY:case U.TFOOT:case U.THEAD:case U.TR:e.openElements.hasInTableScope(U.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=xf.IN_TABLE_BODY,Dp(e,t));break;default:xp(e,t)}}function Jee(e,t){switch(t.tagID){case U.TR:e.openElements.hasInTableScope(U.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=xf.IN_TABLE_BODY);break;case U.TABLE:e.openElements.hasInTableScope(U.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=xf.IN_TABLE_BODY,Op(e,t));break;case U.TBODY:case U.TFOOT:case U.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(U.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=xf.IN_TABLE_BODY,Op(e,t));break;case U.BODY:case U.CAPTION:case U.COL:case U.COLGROUP:case U.HTML:case U.TD:case U.TH:break;default:Sp(e,t)}}function Yee(e,t){let n=t.tagID;Wee.has(n)?(e.openElements.hasInTableScope(U.TD)||e.openElements.hasInTableScope(U.TH))&&(e._closeTableCell(),kp(e,t)):mp(e,t)}function Xee(e,t){let n=t.tagID;switch(n){case U.TD:case U.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=xf.IN_ROW);break;case U.TABLE:case U.TBODY:case U.TFOOT:case U.THEAD:case U.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Jee(e,t));break;case U.BODY:case U.CAPTION:case U.COL:case U.COLGROUP:case U.HTML:break;default:bp(e,t)}}function Zee(e,t){switch(t.tagID){case U.HTML:mp(e,t);break;case U.OPTION:e.openElements.currentTagId===U.OPTION&&e.openElements.pop(),e._insertElement(t,cd.HTML);break;case U.OPTGROUP:e.openElements.currentTagId===U.OPTION&&e.openElements.pop(),e.openElements.currentTagId===U.OPTGROUP&&e.openElements.pop(),e._insertElement(t,cd.HTML);break;case U.HR:e.openElements.currentTagId===U.OPTION&&e.openElements.pop(),e.openElements.currentTagId===U.OPTGROUP&&e.openElements.pop(),e._appendElement(t,cd.HTML),t.ackSelfClosing=!0;break;case U.INPUT:case U.KEYGEN:case U.TEXTAREA:case U.SELECT:e.openElements.hasInSelectScope(U.SELECT)&&(e.openElements.popUntilTagNamePopped(U.SELECT),e._resetInsertionMode(),t.tagID!==U.SELECT&&e._processStartTag(t));break;case U.SCRIPT:case U.TEMPLATE:zf(e,t)}}function Qee(e,t){switch(t.tagID){case U.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===U.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===U.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===U.OPTGROUP&&e.openElements.pop();break;case U.OPTION:e.openElements.currentTagId===U.OPTION&&e.openElements.pop();break;case U.SELECT:e.openElements.hasInSelectScope(U.SELECT)&&(e.openElements.popUntilTagNamePopped(U.SELECT),e._resetInsertionMode());break;case U.TEMPLATE:Vf(e,t)}}function $ee(e,t){let n=t.tagID;n===U.CAPTION||n===U.TABLE||n===U.TBODY||n===U.TFOOT||n===U.THEAD||n===U.TR||n===U.TD||n===U.TH?(e.openElements.popUntilTagNamePopped(U.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Zee(e,t)}function ete(e,t){let n=t.tagID;n===U.CAPTION||n===U.TABLE||n===U.TBODY||n===U.TFOOT||n===U.THEAD||n===U.TR||n===U.TD||n===U.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(U.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Qee(e,t)}function tte(e,t){switch(t.tagID){case U.BASE:case U.BASEFONT:case U.BGSOUND:case U.LINK:case U.META:case U.NOFRAMES:case U.SCRIPT:case U.STYLE:case U.TEMPLATE:case U.TITLE:zf(e,t);break;case U.CAPTION:case U.COLGROUP:case U.TBODY:case U.TFOOT:case U.THEAD:e.tmplInsertionModeStack[0]=xf.IN_TABLE,e.insertionMode=xf.IN_TABLE,xp(e,t);break;case U.COL:e.tmplInsertionModeStack[0]=xf.IN_COLUMN_GROUP,e.insertionMode=xf.IN_COLUMN_GROUP,Tp(e,t);break;case U.TR:e.tmplInsertionModeStack[0]=xf.IN_TABLE_BODY,e.insertionMode=xf.IN_TABLE_BODY,Dp(e,t);break;case U.TD:case U.TH:e.tmplInsertionModeStack[0]=xf.IN_ROW,e.insertionMode=xf.IN_ROW,kp(e,t);break;default:e.tmplInsertionModeStack[0]=xf.IN_BODY,e.insertionMode=xf.IN_BODY,mp(e,t)}}function nte(e,t){t.tagID===U.TEMPLATE&&Vf(e,t)}function rte(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(U.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Mf(e,t)}function ite(e,t){t.tagID===U.HTML?mp(e,t):Ap(e,t)}function ate(e,t){if(t.tagID===U.HTML){if(e.fragmentContext||(e.insertionMode=xf.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===U.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else Ap(e,t)}function Ap(e,t){e.insertionMode=xf.IN_BODY,qf(e,t)}function ote(e,t){switch(t.tagID){case U.HTML:mp(e,t);break;case U.FRAMESET:e._insertElement(t,cd.HTML);break;case U.FRAME:e._appendElement(t,cd.HTML),t.ackSelfClosing=!0;break;case U.NOFRAMES:zf(e,t)}}function ste(e,t){t.tagID===U.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==U.FRAMESET&&(e.insertionMode=xf.AFTER_FRAMESET))}function cte(e,t){switch(t.tagID){case U.HTML:mp(e,t);break;case U.NOFRAMES:zf(e,t)}}function lte(e,t){t.tagID===U.HTML&&(e.insertionMode=xf.AFTER_AFTER_FRAMESET)}function ute(e,t){t.tagID===U.HTML?mp(e,t):jp(e,t)}function jp(e,t){e.insertionMode=xf.IN_BODY,qf(e,t)}function dte(e,t){switch(t.tagID){case U.HTML:mp(e,t);break;case U.NOFRAMES:zf(e,t)}}function fte(e,t){t.chars=`�`,e._insertCharacters(t)}function pte(e,t){e._insertCharacters(t),e.framesetOk=!1}function mte(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==cd.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function hte(e,t){if(uf(t))mte(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===cd.MATHML?df(t):r===cd.SVG&&(mf(t),ff(t)),pf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function gte(e,t){if(t.tagID===U.P||t.tagID===U.BR){mte(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===cd.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}dd.AREA,dd.BASE,dd.BASEFONT,dd.BGSOUND,dd.BR,dd.COL,dd.EMBED,dd.FRAME,dd.HR,dd.IMG,dd.INPUT,dd.KEYGEN,dd.LINK,dd.META,dd.PARAM,dd.SOURCE,dd.TRACK,dd.WBR;var _te=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,vte=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),yte={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function bte(e,t){let n=Nte(e),r=Us(`type`,{handlers:{root:Ste,element:Cte,text:wte,comment:Dte,doctype:Tte,raw:Ote},unknown:kte}),i={parser:n?new Tf(yte):Tf.getFragmentParser(void 0,yte),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),Mp(i,tt());let a=mu(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&Ga(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function xte(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Ste(e,t){xte(e.children,t)}function Cte(e,t){jte(e,t),xte(e.children,t),Mte(e,t)}function wte(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:qu.CHARACTER,chars:e.value,location:Np(e)};Mp(t,tt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Tte(e,t){let n={type:qu.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:Np(e)};Mp(t,tt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Ete(e,t){t.stitches=!0;let n=Pte(e);`children`in e&&`children`in n&&(n.children=bte({type:`root`,children:e.children},t.options).children),Dte({type:`comment`,value:{stitch:n}},t)}function Dte(e,t){let n=e.value,r={type:qu.COMMENT,data:n,location:Np(e)};Mp(t,tt(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Ote(e,t){if(t.parser.tokenizer.preprocessor.html=``,t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Ate(t,tt(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(_te,`<$1$2`):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function kte(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Ete(n,t);else{let e=``;throw vte.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+n.type+"` node"+e)}}function Mp(e,t){Ate(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=vd.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:``,value:``}}function Ate(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function jte(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===vd.PLAINTEXT)return;Mp(t,tt(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:du.html;i===du.html&&n===`svg`&&(i=du.svg);let a=Tu({...e,children:[]},{space:i===du.svg?`svg`:`html`}),o={type:qu.START_TAG,tagName:n,tagID:pd(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:Np(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Mte(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Fu.includes(n)||t.parser.tokenizer.state===vd.PLAINTEXT)return;Mp(t,et(e));let r={type:qu.END_TAG,tagName:n,tagID:pd(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Np(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===vd.RCDATA||t.parser.tokenizer.state===vd.RAWTEXT||t.parser.tokenizer.state===vd.SCRIPT_DATA)&&(t.parser.tokenizer.state=vd.DATA)}function Nte(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function Np(e){let t=tt(e)||{line:void 0,column:void 0,offset:void 0},n=et(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Pte(e){return`children`in e?Aa({...e,children:[]}):Aa(e)}function Fte(e){return function(t,n){return bte(t,{...e,file:n})}}var Pp=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],Fp={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...Pp,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...Pp],h2:[[`className`,`sr-only`]],img:[...Pp,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...Pp,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...Pp],table:[...Pp],ul:[...Pp,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},Ip={}.hasOwnProperty;function Ite(e,t){let n={type:`root`,children:[]},r=Lte({schema:t?{...Fp,...t}:Fp,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function Lte(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return Rte(e,n);case`doctype`:return zte(e,n);case`element`:return Bte(e,n);case`root`:return Vte(e,n);case`text`:return Hte(e,n)}}}function Rte(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return Lp(r,t),r}}function zte(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return Lp(e,t),e}}function Bte(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=Ute(e,t.children),i=Wte(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&Ip.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return Lp(o,t),o}function Vte(e,t){let n={type:`root`,children:Ute(e,t.children)};return Lp(n,t),n}function Hte(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return Lp(n,t),n}function Ute(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=Lte(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function Wte(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&Ip.call(r,n)?r[n]:void 0,o=r&&Ip.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},l={},u;for(u in s)if(Ip.call(s,u)){let t=s[u],n=Gte(e,Yte(a,u),u,t);n??=Gte(e,Yte(o,u),u,t),n!=null&&(l[u]=n)}if(i&&Ip.call(i,n)){let e=i[n];for(u in e)Ip.call(e,u)&&!Ip.call(l,u)&&(l[u]=e[u])}return l}function Gte(e,t,n,r){return t?Array.isArray(r)?Kte(e,t,n,r):qte(e,t,n,r):void 0}function Kte(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=qte(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function qte(e,t,n,r){if((typeof r==`boolean`||typeof r==`number`||typeof r==`string`)&&Jte(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function Jte(e,t,n){let r=e.schema.protocols&&Ip.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),l=i.indexOf(`/`);if(a<0||l>-1&&a>l||o>-1&&a>o||s>-1&&a>s)return!0;let u=-1;for(;++u<r.length;){let e=r[u];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function Lp(e,t){let n=rt(t);t.data&&(e.data=Aa(t.data)),n&&(e.position=n)}function Yte(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function Xte(e){return function(t){return Ite(t,e)}}var Zte,Qte,$te,Rp,zp=o((()=>{Zte=`modulepreload`,Qte=function(e,t){return new URL(e,t).href},$te={},Rp=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Qte(t,n),t=s(t),t in $te)return;$te[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Zte,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})}})),ene,W,Bp,Vp=o((()=>{ene=Object.defineProperty,W=(e,t)=>ene(e,`name`,{value:t,configurable:!0}),Bp=(e,t)=>{for(var n in t)ene(e,n,{get:t[n],enumerable:!0})}})),tne=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,l=`week`,u=`month`,d=`quarter`,f=`year`,p=`date`,m=`Invalid Date`,h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},v=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},y={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+v(r,2,`0`)+`:`+v(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,u),a=n-i<0,o=t.clone().add(r+(a?-1:1),u);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:f,w:l,d:s,D:p,h:o,m:a,s:i,ms:r,Q:d}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},b=`en`,x={};x[b]=_;var S=`$isDayjsObject`,C=function(e){return e instanceof D||!(!e||!e[S])},w=function e(t,n,r){var i;if(!t)return b;if(typeof t==`string`){var a=t.toLowerCase();x[a]&&(i=a),n&&(x[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;x[s]=t,i=s}return!r&&i&&(b=i),i||!r&&b},T=function(e,t){if(C(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new D(n)},E=y;E.l=w,E.i=C,E.w=function(e,t){return T(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var D=function(){function _(e){this.$L=w(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[S]=!0}var v=_.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(E.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(h);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return E},v.isValid=function(){return this.$d.toString()!==m},v.isSame=function(e,t){var n=T(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return T(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<T(e)},v.$g=function(e,t,n){return E.u(e)?this[t]:this.set(n,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var n=this,r=!!E.u(t)||t,d=E.p(e),m=function(e,t){var i=E.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},h=function(e,t){return E.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},g=this.$W,_=this.$M,v=this.$D,y=`set`+(this.$u?`UTC`:``);switch(d){case f:return r?m(1,0):m(31,11);case u:return r?m(1,_):m(0,_+1);case l:var b=this.$locale().weekStart||0,x=(g<b?g+7:g)-b;return m(r?v-x:v+(6-x),_);case s:case p:return h(y+`Hours`,0);case o:return h(y+`Minutes`,1);case a:return h(y+`Seconds`,2);case i:return h(y+`Milliseconds`,3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var n,l=E.p(e),d=`set`+(this.$u?`UTC`:``),m=(n={},n[s]=d+`Date`,n[p]=d+`Date`,n[u]=d+`Month`,n[f]=d+`FullYear`,n[o]=d+`Hours`,n[a]=d+`Minutes`,n[i]=d+`Seconds`,n[r]=d+`Milliseconds`,n)[l],h=l===s?this.$D+(t-this.$W):t;if(l===u||l===f){var g=this.clone().set(p,1);g.$d[m](h),g.init(),this.$d=g.set(p,Math.min(this.$D,g.daysInMonth())).$d}else m&&this.$d[m](h);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[E.p(e)]()},v.add=function(r,d){var p,m=this;r=Number(r);var h=E.p(d),g=function(e){var t=T(m);return E.w(t.date(t.date()+Math.round(e*r)),m)};if(h===u)return this.set(u,this.$M+r);if(h===f)return this.set(f,this.$y+r);if(h===s)return g(1);if(h===l)return g(7);var _=(p={},p[a]=t,p[o]=n,p[i]=e,p)[h]||1,v=this.$d.getTime()+r*_;return E.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||m;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=E.z(this),a=this.$H,o=this.$m,s=this.$M,l=n.weekdays,u=n.months,d=n.meridiem,f=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},p=function(e){return E.s(a%12||12,e,`0`)},h=d||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(g,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return E.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return E.s(s+1,2,`0`);case`MMM`:return f(n.monthsShort,s,u,3);case`MMMM`:return f(u,s);case`D`:return t.$D;case`DD`:return E.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return f(n.weekdaysMin,t.$W,l,2);case`ddd`:return f(n.weekdaysShort,t.$W,l,3);case`dddd`:return l[t.$W];case`H`:return String(a);case`HH`:return E.s(a,2,`0`);case`h`:return p(1);case`hh`:return p(2);case`a`:return h(a,o,!0);case`A`:return h(a,o,!1);case`m`:return String(o);case`mm`:return E.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return E.s(t.$s,2,`0`);case`SSS`:return E.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(r,p,m){var h,g=this,_=E.p(p),v=T(r),y=(v.utcOffset()-this.utcOffset())*t,b=this-v,x=function(){return E.m(g,v)};switch(_){case f:h=x()/12;break;case u:h=x();break;case d:h=x()/3;break;case l:h=(b-y)/6048e5;break;case s:h=(b-y)/864e5;break;case o:h=b/n;break;case a:h=b/t;break;case i:h=b/e;break;default:h=b}return m?h:E.a(h)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return x[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=w(e,t,!0);return r&&(n.$L=r),n},v.clone=function(){return E.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},_}(),O=D.prototype;return T.prototype=O,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,u],[`$y`,f],[`$D`,p]].forEach((function(e){O[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),T.extend=function(e,t){return e.$i||=(e(t,D,T),!0),T},T.locale=w,T.isDayjs=C,T.unix=function(e){return T(1e3*e)},T.en=x[b],T.Ls=x,T.p={},T}))})),nne,Hp,G,Up,Wp,Gp=o((()=>{Vp(),nne=d(tne(),1),Hp={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},G={trace:W((...e)=>{},`trace`),debug:W((...e)=>{},`debug`),info:W((...e)=>{},`info`),warn:W((...e)=>{},`warn`),error:W((...e)=>{},`error`),fatal:W((...e)=>{},`fatal`)},Up=W(function(e=`fatal`){let t=Hp.fatal;typeof e==`string`?e.toLowerCase()in Hp&&(t=Hp[e]):typeof e==`number`&&(t=e),G.trace=()=>{},G.debug=()=>{},G.info=()=>{},G.warn=()=>{},G.error=()=>{},G.fatal=()=>{},t<=Hp.fatal&&(G.fatal=console.error?console.error.bind(console,Wp(`FATAL`),`color: orange`):console.log.bind(console,`\x1B[35m`,Wp(`FATAL`))),t<=Hp.error&&(G.error=console.error?console.error.bind(console,Wp(`ERROR`),`color: orange`):console.log.bind(console,`\x1B[31m`,Wp(`ERROR`))),t<=Hp.warn&&(G.warn=console.warn?console.warn.bind(console,Wp(`WARN`),`color: orange`):console.log.bind(console,`\x1B[33m`,Wp(`WARN`))),t<=Hp.info&&(G.info=console.info?console.info.bind(console,Wp(`INFO`),`color: lightblue`):console.log.bind(console,`\x1B[34m`,Wp(`INFO`))),t<=Hp.debug&&(G.debug=console.debug?console.debug.bind(console,Wp(`DEBUG`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,Wp(`DEBUG`))),t<=Hp.trace&&(G.trace=console.debug?console.debug.bind(console,Wp(`TRACE`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,Wp(`TRACE`)))},`setLogLevel`),Wp=W(e=>`%c${(0,nne.default)().format(`ss.SSS`)} : ${e} : `,`format`)})),Kp,rne=o((()=>{Kp={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{let t=e/255;return e>.03928?((t+.055)/1.055)**2.4:t/12.92},hue2rgb:(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),hsl2rgb:({h:e,s:t,l:n},r)=>{if(!t)return n*2.55;e/=360,t/=100,n/=100;let i=n<.5?n*(1+t):n+t-n*t,a=2*n-i;switch(r){case`r`:return Kp.hue2rgb(a,i,e+1/3)*255;case`g`:return Kp.hue2rgb(a,i,e)*255;case`b`:return Kp.hue2rgb(a,i,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:n},r)=>{e/=255,t/=255,n/=255;let i=Math.max(e,t,n),a=Math.min(e,t,n),o=(i+a)/2;if(r===`l`)return o*100;if(i===a)return 0;let s=i-a,l=o>.5?s/(2-i-a):s/(i+a);if(r===`s`)return l*100;switch(i){case e:return((t-n)/s+(t<n?6:0))*60;case t:return((n-e)/s+2)*60;case n:return((e-t)/s+4)*60;default:return-1}}}})),ine,ane=o((()=>{ine={clamp:(e,t,n)=>t>n?Math.min(t,Math.max(n,e)):Math.min(n,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10}})),one,sne=o((()=>{one={dec2hex:e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}}})),qp,Jp=o((()=>{rne(),ane(),sne(),qp={channel:Kp,lang:ine,unit:one}})),Yp,Xp,Zp=o((()=>{Jp(),Yp={};for(let e=0;e<=255;e++)Yp[e]=qp.unit.dec2hex(e);Xp={ALL:0,RGB:1,HSL:2}})),cne,lne=o((()=>{Zp(),cne=class{constructor(){this.type=Xp.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw Error(`Cannot change both RGB and HSL channels at the same time`);this.type=e}reset(){this.type=Xp.ALL}is(e){return this.type===e}}})),une,dne=o((()=>{Jp(),lne(),Zp(),une=class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new cne}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=Xp.ALL,this}_ensureHSL(){let e=this.data,{h:t,s:n,l:r}=e;t===void 0&&(e.h=qp.channel.rgb2hsl(e,`h`)),n===void 0&&(e.s=qp.channel.rgb2hsl(e,`s`)),r===void 0&&(e.l=qp.channel.rgb2hsl(e,`l`))}_ensureRGB(){let e=this.data,{r:t,g:n,b:r}=e;t===void 0&&(e.r=qp.channel.hsl2rgb(e,`r`)),n===void 0&&(e.g=qp.channel.hsl2rgb(e,`g`)),r===void 0&&(e.b=qp.channel.hsl2rgb(e,`b`))}get r(){let e=this.data,t=e.r;return!this.type.is(Xp.HSL)&&t!==void 0?t:(this._ensureHSL(),qp.channel.hsl2rgb(e,`r`))}get g(){let e=this.data,t=e.g;return!this.type.is(Xp.HSL)&&t!==void 0?t:(this._ensureHSL(),qp.channel.hsl2rgb(e,`g`))}get b(){let e=this.data,t=e.b;return!this.type.is(Xp.HSL)&&t!==void 0?t:(this._ensureHSL(),qp.channel.hsl2rgb(e,`b`))}get h(){let e=this.data,t=e.h;return!this.type.is(Xp.RGB)&&t!==void 0?t:(this._ensureRGB(),qp.channel.rgb2hsl(e,`h`))}get s(){let e=this.data,t=e.s;return!this.type.is(Xp.RGB)&&t!==void 0?t:(this._ensureRGB(),qp.channel.rgb2hsl(e,`s`))}get l(){let e=this.data,t=e.l;return!this.type.is(Xp.RGB)&&t!==void 0?t:(this._ensureRGB(),qp.channel.rgb2hsl(e,`l`))}get a(){return this.data.a}set r(e){this.type.set(Xp.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Xp.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Xp.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Xp.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Xp.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Xp.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}})),Qp,$p=o((()=>{dne(),Qp=new une({r:0,g:0,b:0,a:0},`transparent`)})),em,fne=o((()=>{$p(),Zp(),em={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(em.re);if(!t)return;let n=t[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,l=o?8:4,u=a?0:-1,d=o?255:15;return Qp.set({r:(r>>l*(u+3)&d)*s,g:(r>>l*(u+2)&d)*s,b:(r>>l*(u+1)&d)*s,a:a?(r&d)*s/255:1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`#${Yp[Math.round(t)]}${Yp[Math.round(n)]}${Yp[Math.round(r)]}${Yp[Math.round(i*255)]}`:`#${Yp[Math.round(t)]}${Yp[Math.round(n)]}${Yp[Math.round(r)]}`}}})),tm,pne=o((()=>{Jp(),$p(),tm={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{let t=e.match(tm.hueRe);if(t){let[,e,n]=t;switch(n){case`grad`:return qp.channel.clamp.h(parseFloat(e)*.9);case`rad`:return qp.channel.clamp.h(parseFloat(e)*180/Math.PI);case`turn`:return qp.channel.clamp.h(parseFloat(e)*360)}}return qp.channel.clamp.h(parseFloat(e))},parse:e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let n=e.match(tm.re);if(!n)return;let[,r,i,a,o,s]=n;return Qp.set({h:tm._hue2deg(r),s:qp.channel.clamp.s(parseFloat(i)),l:qp.channel.clamp.l(parseFloat(a)),a:o?qp.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{let{h:t,s:n,l:r,a:i}=e;return i<1?`hsla(${qp.lang.round(t)}, ${qp.lang.round(n)}%, ${qp.lang.round(r)}%, ${i})`:`hsl(${qp.lang.round(t)}, ${qp.lang.round(n)}%, ${qp.lang.round(r)}%)`}}})),nm,mne=o((()=>{fne(),nm={colors:{aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyanaqua:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,transparent:`#00000000`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`},parse:e=>{e=e.toLowerCase();let t=nm.colors[e];if(t)return em.parse(t)},stringify:e=>{let t=em.stringify(e);for(let e in nm.colors)if(nm.colors[e]===t)return e}}})),rm,hne=o((()=>{Jp(),$p(),rm={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let n=e.match(rm.re);if(!n)return;let[,r,i,a,o,s,l,u,d]=n;return Qp.set({r:qp.channel.clamp.r(i?parseFloat(r)*2.55:parseFloat(r)),g:qp.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:qp.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:u?qp.channel.clamp.a(d?parseFloat(u)/100:parseFloat(u)):1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`rgba(${qp.lang.round(t)}, ${qp.lang.round(n)}, ${qp.lang.round(r)}, ${qp.lang.round(i)})`:`rgb(${qp.lang.round(t)}, ${qp.lang.round(n)}, ${qp.lang.round(r)})`}}})),im,am=o((()=>{fne(),pne(),mne(),hne(),Zp(),im={format:{keyword:nm,hex:em,rgb:rm,rgba:rm,hsl:tm,hsla:tm},parse:e=>{if(typeof e!=`string`)return e;let t=em.parse(e)||rm.parse(e)||tm.parse(e)||nm.parse(e);if(t)return t;throw Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Xp.HSL)||e.data.r===void 0?tm.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?rm.stringify(e):em.stringify(e)}})),gne,_ne=o((()=>{Jp(),am(),gne=(e,t)=>{let n=im.parse(e);for(let e in t)n[e]=qp.channel.clamp[e](t[e]);return im.stringify(n)}})),om,vne=o((()=>{Jp(),$p(),am(),_ne(),om=(e,t,n=0,r=1)=>{if(typeof e!=`number`)return gne(e,{a:t});let i=Qp.set({r:qp.channel.clamp.r(e),g:qp.channel.clamp.g(t),b:qp.channel.clamp.b(n),a:qp.channel.clamp.a(r)});return im.stringify(i)}})),sm,yne=o((()=>{Jp(),am(),sm=(e,t)=>qp.lang.round(im.parse(e)[t])})),bne,xne=o((()=>{Jp(),am(),bne=e=>{let{r:t,g:n,b:r}=im.parse(e),i=.2126*qp.channel.toLinear(t)+.7152*qp.channel.toLinear(n)+.0722*qp.channel.toLinear(r);return qp.lang.round(i)}})),Sne,Cne=o((()=>{xne(),Sne=e=>bne(e)>=.5})),cm,wne=o((()=>{Cne(),cm=e=>!Sne(e)})),lm,Tne=o((()=>{Jp(),am(),lm=(e,t,n)=>{let r=im.parse(e),i=r[t],a=qp.channel.clamp[t](i+n);return i!==a&&(r[t]=a),im.stringify(r)}})),um,Ene=o((()=>{Tne(),um=(e,t)=>lm(e,`l`,t)})),dm,Dne=o((()=>{Tne(),dm=(e,t)=>lm(e,`l`,-t)})),One,kne=o((()=>{Tne(),One=(e,t)=>lm(e,`a`,-t)})),K,Ane=o((()=>{am(),_ne(),K=(e,t)=>{let n=im.parse(e),r={};for(let e in t)t[e]&&(r[e]=n[e]+t[e]);return gne(e,r)}})),jne,Mne=o((()=>{am(),vne(),jne=(e,t,n=50)=>{let{r,g:i,b:a,a:o}=im.parse(e),{r:s,g:l,b:u,a:d}=im.parse(t),f=n/100,p=f*2-1,m=o-d,h=((p*m===-1?p:(p+m)/(1+p*m))+1)/2,g=1-h,_=r*h+s*g,v=i*h+l*g,y=a*h+u*g,b=o*f+d*(1-f);return om(_,v,y,b)}})),fm,Nne=o((()=>{am(),Mne(),fm=(e,t=100)=>{let n=im.parse(e);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,jne(n,e,t)}})),Pne=o((()=>{vne(),yne(),wne(),Ene(),Dne(),kne(),Ane(),Nne()})),pm=o((()=>{Pne()})),Fne=l({default:()=>ih});function Ine(e,t){this.v=e,this.k=t}function Lne(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Rne(e){if(Array.isArray(e))return e}function zne(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Bne(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
40
40
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vne(e,t){return Rne(e)||zne(e,t)||Hne(e,t)||Bne()}function Hne(e,t){if(e){if(typeof e==`string`)return Lne(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lne(e,t):void 0}}function mm(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof Ine;Promise.resolve(s?o.v:o).then(function(n){if(s){var l=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(l,n);n=e[l](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}function hm(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return wm(e,t,n)}}function Une(e){return function(){return Tm(e,[...arguments])}}function gm(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Am;if(ym&&ym(e,null),!km(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(Yne(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Wne(e){for(let t=0;t<e.length;t++)Lm(e,t)||(e[t]=null);return e}function _m(e){let t=Sm(null);for(let r of Jne(e)){var n=Vne(r,2);let i=n[0],a=n[1];Lm(e,i)&&(t[i]=km(a)?Wne(a):a&&typeof a==`object`&&a.constructor===Object?_m(a):a)}return t}function Gne(e){switch(typeof e){case`string`:return e;case`number`:return tre(e);case`boolean`:return nre(e);case`bigint`:return Fm?Fm(e):`0`;case`symbol`:return Im?Im(e):`Symbol()`;case`undefined`:return Rm(e);case`function`:case`object`:{if(e===null)return Rm(e);let t=e,n=vm(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:Rm(e)}return Rm(e)}default:return Rm(e)}}function vm(e,t){for(;e!==null;){let n=Zne(e,t);if(n){if(n.get)return hm(n.get);if(typeof n.value==`function`)return hm(n.value)}e=Xne(e)}function n(){return null}return n}function Kne(e){try{return zm(e,``),!0}catch{return!1}}function qne(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:vre(),t=e=>qne(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==$m.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let u=e.DOMParser,d=e.trustedTypes,f=s.prototype,p=vm(f,`cloneNode`),m=vm(f,`remove`),h=vm(f,`removeAttributeNode`),g=vm(f,`nextSibling`),_=vm(f,`childNodes`),v=vm(f,`parentNode`),y=vm(f,`shadowRoot`),b=vm(f,`attributes`),x=o&&o.prototype?vm(o.prototype,`nodeType`):null,S=o&&o.prototype?vm(o.prototype,`nodeName`):null,C=o&&o.prototype?vm(o.prototype,`ownerDocument`):null,w=function(e){return x?x(e):e.nodeType},T=function(e){return S?S(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let E,D=``,O,k=!1,A=0,j=function(){if(A>0)throw Bm(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},M=function(e){j(),A++;try{return E.createHTML(e)}finally{A--}},N=function(e){j(),A++;try{return E.createScriptURL(e)}finally{A--}},P=function(){return k||=(O=yre(d,i),!0),O},F=n,I=F.implementation,L=F.createNodeIterator,R=F.createDocumentFragment,ee=F.getElementsByTagName,z=r.importNode,B=th();t.isSupported=typeof Jne==`function`&&typeof v==`function`&&I&&I.createHTMLDocument!==void 0;let V=are,te=ore,ne=sre,re=cre,ie=lre,ae=ure,oe=dre,se=pre,ce=Xm,le=null,H=gm({},[...Vm,...Hm,...Um,...Wm,...Gm]),ue=null,de=gm({},[...Km,...qm,...Jm,...Ym]),fe=Object.seal(Sm(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),pe=null,me=null,he=Object.seal(Sm(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ge=!0,_e=!0,ve=!1,ye=!0,be=!1,xe=!0,Se=!1,Ce=!1,we=null,Te=null,Ee=!1,De=!1,Oe=!1,ke=!1,Ae=!0,je=!1,Me=`user-content-`,Ne=!0,Pe=!1,Fe={},Ie=null,Le=gm({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Re=null,ze=gm({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Be=null,Ve=gm({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),He=`http://www.w3.org/1998/Math/MathML`,Ue=`http://www.w3.org/2000/svg`,We=`http://www.w3.org/1999/xhtml`,Ge=We,Ke=!1,qe=null,Je=gm({},[He,Ue,We],jm),Ye=bm([`mi`,`mo`,`mn`,`ms`,`mtext`]),Xe=gm({},Ye),Ze=bm([`annotation-xml`]),Qe=gm({},Ze),$e=gm({},[`title`,`style`,`font`,`a`,`script`]),et=null,tt=[`application/xhtml+xml`,`text/html`],nt=null,rt=null,it=n.createElement(`form`),at=function(e){return e instanceof RegExp||e instanceof Function},ot=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(rt&&rt===e)return;(!e||typeof e!=`object`)&&(e={}),e=_m(e),et=tt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,nt=et===`application/xhtml+xml`?jm:Am,le=nh(e,`ALLOWED_TAGS`,H,{transform:nt}),ue=nh(e,`ALLOWED_ATTR`,de,{transform:nt}),qe=nh(e,`ALLOWED_NAMESPACES`,Je,{transform:jm}),Be=nh(e,`ADD_URI_SAFE_ATTR`,Ve,{transform:nt,base:Ve}),Re=nh(e,`ADD_DATA_URI_TAGS`,ze,{transform:nt,base:ze}),Ie=nh(e,`FORBID_CONTENTS`,Le,{transform:nt}),pe=nh(e,`FORBID_TAGS`,_m({}),{transform:nt}),me=nh(e,`FORBID_ATTR`,_m({}),{transform:nt}),Fe=Lm(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?_m(e.USE_PROFILES):e.USE_PROFILES:!1,ge=e.ALLOW_ARIA_ATTR!==!1,_e=e.ALLOW_DATA_ATTR!==!1,ve=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ye=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,be=e.SAFE_FOR_TEMPLATES||!1,xe=e.SAFE_FOR_XML!==!1,Se=e.WHOLE_DOCUMENT||!1,De=e.RETURN_DOM||!1,Oe=e.RETURN_DOM_FRAGMENT||!1,ke=e.RETURN_TRUSTED_TYPE||!1,Ee=e.FORCE_BODY||!1,Ae=e.SANITIZE_DOM!==!1,je=e.SANITIZE_NAMED_PROPS||!1,Ne=e.KEEP_CONTENT!==!1,Pe=e.IN_PLACE||!1,ce=Kne(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Xm,Ge=typeof e.NAMESPACE==`string`?e.NAMESPACE:We,Xe=rh(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>gm({},Ye)),Qe=rh(e,`HTML_INTEGRATION_POINTS`,()=>gm({},Ze));let t=rh(e,`CUSTOM_ELEMENT_HANDLING`,()=>Sm(null));if(fe=Sm(null),Lm(t,`tagNameCheck`)&&at(t.tagNameCheck)&&(fe.tagNameCheck=t.tagNameCheck),Lm(t,`attributeNameCheck`)&&at(t.attributeNameCheck)&&(fe.attributeNameCheck=t.attributeNameCheck),Lm(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(fe.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),xm(fe),be&&(_e=!1),Oe&&(De=!0),Fe&&(le=gm({},Gm),ue=Sm(null),Fe.html===!0&&(gm(le,Vm),gm(ue,Km)),Fe.svg===!0&&(gm(le,Hm),gm(ue,qm),gm(ue,Ym)),Fe.svgFilters===!0&&(gm(le,Um),gm(ue,qm),gm(ue,Ym)),Fe.mathMl===!0&&(gm(le,Wm),gm(ue,Jm),gm(ue,Ym))),he.tagCheck=null,he.attributeCheck=null,Lm(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?he.tagCheck=e.ADD_TAGS:km(e.ADD_TAGS)&&(le===H&&(le=_m(le)),gm(le,e.ADD_TAGS,nt))),Lm(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?he.attributeCheck=e.ADD_ATTR:km(e.ADD_ATTR)&&(ue===de&&(ue=_m(ue)),gm(ue,e.ADD_ATTR,nt))),Lm(e,`ADD_FORBID_CONTENTS`)&&km(e.ADD_FORBID_CONTENTS)&&(Ie===Le&&(Ie=_m(Ie)),gm(Ie,e.ADD_FORBID_CONTENTS,nt)),Ne&&(le[`#text`]=!0),Se&&gm(le,[`html`,`head`,`body`]),le.table&&(gm(le,[`tbody`]),delete pe.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Bm(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Bm(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=E;E=e.TRUSTED_TYPES_POLICY;try{D=M(``)}catch(e){throw E=t,e}}else e.TRUSTED_TYPES_POLICY===null?(E=void 0,D=``):(E===void 0&&(E=P()),E&&typeof D==`string`&&(D=M(``)));bm&&bm(e),rt=e},st=gm({},[...Hm,...Um,...rre]),ct=gm({},[...Wm,...ire]),lt=function(e,t,n){return t.namespaceURI===We?e===`svg`:t.namespaceURI===He?e===`svg`&&(n===`annotation-xml`||Xe[n]):!!st[e]},ut=function(e,t,n){return t.namespaceURI===We?e===`math`:t.namespaceURI===Ue?e===`math`&&Qe[n]:!!ct[e]},dt=function(e,t,n){return t.namespaceURI===Ue&&!Qe[n]||t.namespaceURI===He&&!Xe[n]?!1:!ct[e]&&($e[e]||!st[e])},ft=function(e){let t=v(e);(!t||!t.tagName)&&(t={namespaceURI:Ge,tagName:`template`});let n=Am(e.tagName),r=Am(t.tagName);return qe[e.namespaceURI]?e.namespaceURI===Ue?lt(n,t,r):e.namespaceURI===He?ut(n,t,r):e.namespaceURI===We?dt(n,t,r):!!(et===`application/xhtml+xml`&&qe[e.namespaceURI]):!1},pt=function(e){Om(t.removed,{element:e});try{v(e).removeChild(e)}catch{if(m(e),!v(e))throw Bm(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},mt=function(e,t,n){try{h(e,t)}catch{try{e.removeAttribute(n)}catch{}}},ht=function(e){vt(e);let t=_(e);if(t){let e=[];Em(t,t=>{Om(e,t)}),Em(e,e=>{try{m(e)}catch{}})}let n=b(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&mt(e,r,i)}},gt=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}Om(t.removed,{attribute:r||null,from:n});try{r?h(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(De||Oe)try{pt(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},_t=function(e){let t=b(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||ue[nt(i)]||mt(e,r,i)}},vt=function(e){let t=[e];for(;t.length>0;){let e=t.pop();w(e)===$m.element&&_t(e);let n=_(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},yt=function(e,t){return xe?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},bt=function(e){if(!xe)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=w(e);if(n===$m.processingInstruction||n===$m.comment&&zm(Qm,e.data)){try{m(e)}catch{}continue}if(n===$m.element){let t=e,n=nt(T(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&yt(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=_(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},xt=function(e){let t=null,r=null;if(Ee)e=`<remove></remove>`+e;else{let t=Mm(e,/^[\r\n\t ]+/);r=t&&t[0]}et===`application/xhtml+xml`&&Ge===We&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=E?M(e):e;if(Ge===We)try{t=new u().parseFromString(i,et)}catch{}if(!t||!t.documentElement){t=I.createDocument(Ge,`template`,null);try{t.documentElement.innerHTML=Ke?D:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ge===We?ee.call(t,Se?`html`:`body`)[0]:Se?t.documentElement:a},St=function(e){let t=C?C(e):e.ownerDocument;return L.call(t||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Ct=function(e){return e=Nm(e,V,` `),e=Nm(e,te,` `),e=Nm(e,ne,` `),e},wt=function(e){e.normalize();let t=C?C(e):e.ownerDocument,n=L.call(t||e,e,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=Ct(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&Em(i,e=>{Et(e.content)&&wt(e.content)})},Tt=function(e){let t=S?S(e):null;return typeof t!=`string`||nt(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==b(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==x(e)||e.childNodes!==_(e)},Et=function(e){if(!x||typeof e!=`object`||!e)return!1;try{return x(e)===$m.documentFragment}catch{return!1}},Dt=function(e){if(!x||typeof e!=`object`||!e)return!1;try{return typeof x(e)==`number`}catch{return!1}};function Ot(e,n,r){e.length!==0&&Em(e,e=>{e.call(t,n,r,rt)})}let kt=function(e,t){return!!(xe&&e.hasChildNodes()&&!Dt(e.firstElementChild)&&zm(Zm,e.textContent)&&zm(Zm,e.innerHTML)||xe&&e.namespaceURI===We&&gre[t]&&(Dt(e.firstElementChild)||typeof e.textContent==`string`&&zm(_re[t],e.textContent))||e.nodeType===$m.processingInstruction||xe&&e.nodeType===$m.comment&&zm(Qm,e.data))},At=function(e,t){return e instanceof RegExp?zm(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},jt=function(e,t,n){if(!pe[t]&&Lt(t)&&At(fe.tagNameCheck,t))return!1;if(Ne&&!Ie[t]){let t=v(e),r=_(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?p(r[a],!0):r[a];t.insertBefore(i,g(e))}}}return pt(e),!0},Mt=function(e,t,n,r){return e.length===0?t:t===n||t===r?_m(t):t},Nt=function(e,t){return e===t||v(e)!==null?!1:(Pe&&vt(e),!0)},Pt=function(e,n){if(Ot(B.beforeSanitizeElements,e,null),Nt(e,n))return!0;if(Tt(e))return pt(e),!0;let r=nt(T(e));if(le=Mt(B.uponSanitizeElement,le,H,we),Ot(B.uponSanitizeElement,e,{tagName:r,allowedTags:le}),Nt(e,n))return!0;if(kt(e,r))return pt(e),!0;if(pe[r]||!(he.tagCheck instanceof Function&&he.tagCheck(r))&&!le[r]){let t=jt(e,r,n);return t===!1&&(Ot(B.afterSanitizeElements,e,null),Nt(e,n))?!0:t}if(w(e)===$m.element&&!ft(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&zm(mre,e.innerHTML))return pt(e),!0;if(be&&e.nodeType===$m.text){let n=Ct(e.textContent);e.textContent!==n&&(Om(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Ot(B.afterSanitizeElements,e,null),Nt(e,n)},Ft=function(e,t,r){if(me[t]||yt(t,e)||Ae&&(t===`id`||t===`name`)&&(r in n||r in it))return!1;let i=ue[t]||he.attributeCheck instanceof Function&&he.attributeCheck(t,e);return _e&&zm(re,t)||ge&&zm(ie,t)?!0:i?Be[t]||zm(ce,Nm(r,oe,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Pm(r,`data:`)===0&&Re[e]||ve&&!zm(ae,Nm(r,oe,``))?!0:!r:Lt(e)&&At(fe.tagNameCheck,e)&&At(fe.attributeNameCheck,t,e)||t===`is`&&fe.allowCustomizedBuiltInElements&&At(fe.tagNameCheck,r)},It=gm({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Lt=function(e){return!It[Am(e)]&&zm(se,e)},Rt=function(e,t,n,r){if(E&&typeof d==`object`&&typeof d.getAttributeType==`function`&&!n)switch(d.getAttributeType(e,t)){case`TrustedHTML`:return M(r);case`TrustedScriptURL`:return N(r)}return r},zt=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!Tt(e)||(pt(e),!1)}catch{return gt(t,e),!1}},Bt=function(e,n){if(Ot(B.beforeSanitizeAttributes,e,null),Nt(e,n))return;let r=e.attributes;if(!r||Tt(e))return;ue=Mt(B.uponSanitizeAttribute,ue,de,Te);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:ue,forceKeepAttr:void 0},a=r.length,o=nt(e.nodeName);for(;a--;){let n=r[a],s=n.name,l=n.namespaceURI,u=n.value,d=nt(s),f=u,p=s===`value`?f:ere(f),m=!1;if(i.attrName=d,i.attrValue=p,i.keepAttr=!0,i.forceKeepAttr=void 0,Ot(B.uponSanitizeAttribute,e,i),p=i.attrValue,je&&(d===`id`||d===`name`)&&Pm(p,Me)!==0&&(gt(s,e,n),p=Me+p,m=!0),xe&&zm(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,p)){gt(s,e,n);continue}if(d===`attributename`&&Mm(p,`href`)){gt(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){gt(s,e,n);continue}if(!ye&&zm(hre,p)){gt(s,e,n);continue}if(be&&(p=Ct(p)),!Ft(o,d,p)){gt(s,e,n);continue}p=Rt(o,d,l,p),p!==f&&zt(e,s,l,p)&&m&&Dm(t.removed)}}Ot(B.afterSanitizeAttributes,e,null),Nt(e,n)},Vt=function(e){let t=null,n=St(e);for(Ot(B.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Ot(B.uponSanitizeShadowNode,t,null),Pt(t,e),Bt(t,e),Et(t.content)&&Vt(t.content),w(t)===$m.element){let e=y(t);Et(e)&&(Ht(e),Vt(e))}Ot(B.afterSanitizeShadowDOM,e,null)},Ht=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Vt(e.shadow);continue}let n=e.node,r=w(n)===$m.element,i=_(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=S?S(n):null;if(typeof e==`string`&&nt(e)===`template`){let e=n.content;Et(e)&&t.push({node:e,shadow:null})}}if(r){let e=y(n);Et(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Ke=!e,Ke&&(e=`<!-->`),typeof e!=`string`&&!Dt(e)&&(e=Gne(e),typeof e!=`string`))throw Bm(`dirty is not a string, aborting`);if(!t.isSupported)return e;Ce?(le=we,ue=Te):ot(n),(B.uponSanitizeElement.length>0||B.uponSanitizeAttribute.length>0)&&(le=_m(le)),B.uponSanitizeAttribute.length>0&&(ue=_m(ue)),t.removed=[];let l=Pe&&typeof e!=`string`&&Dt(e);if(l){bt(e);let t=T(e);if(typeof t==`string`){let n=nt(t);if(!le[n]||pe[n])throw ht(e),Bm(`root node is forbidden and cannot be sanitized in-place`)}if(Tt(e))throw ht(e),Bm(`root node is clobbered and cannot be sanitized in-place`);try{Ht(e)}catch(t){throw ht(e),t}}else if(Dt(e))i=xt(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===$m.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Ht(i);else{if(!De&&!be&&!Se&&e.indexOf(`<`)===-1)return E&&ke?M(e):e;if(i=xt(e),!i)return De?null:ke?D:``}i&&Ee&&pt(i.firstChild);let u=l?e:i;try{let e=St(u);for(;o=e.nextNode();)Pt(o,u),Bt(o,u),Et(o.content)&&Vt(o.content)}catch(n){throw l&&(ht(e),Em(t.removed,e=>{e.element&&vt(e.element)})),n}if(l){let n=!1;if(Em(t.removed,t=>{t.element&&(t.element===e&&(n=!0),vt(t.element))}),n)throw Bm(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return be&&wt(e),e}if(De){if(be&&wt(i),Oe)for(s=R.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(ue.shadowroot||ue.shadowrootmode)&&(s=z.call(r,s,!0)),s}let d=Se?i.outerHTML:i.innerHTML;return Se&&le[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&zm(fre,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
41
41
|
`+d),be&&(d=Ct(d)),E&&ke?M(d):d},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ot(e),Ce=!0,we=le,Te=ue},t.clearConfig=function(){rt=null,Ce=!1,we=null,Te=null,E=O,D=``},t.isValidAttribute=function(e,t,n){rt||ot({});let r=nt(e),i=nt(t);return Ft(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&Lm(B,e)&&Om(B[e],t)},t.removeHook=function(e,t){if(Lm(B,e)){if(t!==void 0){let n=Qne(B[e],t);return n===-1?void 0:$ne(B[e],n,1)[0]}return Dm(B[e])}},t.removeHooks=function(e){Lm(B,e)&&(B[e]=[])},t.removeAllHooks=function(){B=th()},t}var Jne,ym,Yne,Xne,Zne,bm,xm,Sm,Cm,wm,Tm,Em,Qne,Dm,Om,$ne,km,Am,jm,Mm,Nm,Pm,ere,tre,nre,Fm,Im,Lm,Rm,zm,Bm,Vm,Hm,Um,rre,Wm,ire,Gm,Km,qm,Jm,Ym,are,ore,sre,cre,lre,Xm,ure,dre,fre,pre,Zm,Qm,mre,hre,$m,eh,gre,_re,vre,yre,th,nh,rh,ih,ah=o((()=>{mm.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},mm.prototype.next=function(e){return this._invoke(`next`,e)},mm.prototype.throw=function(e){return this._invoke(`throw`,e)},mm.prototype.return=function(e){return this._invoke(`return`,e)},Jne=Object.entries,ym=Object.setPrototypeOf,Yne=Object.isFrozen,Xne=Object.getPrototypeOf,Zne=Object.getOwnPropertyDescriptor,bm=Object.freeze,xm=Object.seal,Sm=Object.create,Cm=typeof Reflect<`u`&&Reflect,wm=Cm.apply,Tm=Cm.construct,bm||=function(e){return e},xm||=function(e){return e},wm||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},Tm||=function(e){return new e(...[...arguments].slice(1))},Em=hm(Array.prototype.forEach),Array.prototype.indexOf,Qne=hm(Array.prototype.lastIndexOf),Dm=hm(Array.prototype.pop),Om=hm(Array.prototype.push),Array.prototype.slice,$ne=hm(Array.prototype.splice),km=Array.isArray,Am=hm(String.prototype.toLowerCase),jm=hm(String.prototype.toString),Mm=hm(String.prototype.match),Nm=hm(String.prototype.replace),Pm=hm(String.prototype.indexOf),ere=hm(String.prototype.trim),tre=hm(Number.prototype.toString),nre=hm(Boolean.prototype.toString),Fm=typeof BigInt>`u`?null:hm(BigInt.prototype.toString),Im=typeof Symbol>`u`?null:hm(Symbol.prototype.toString),Lm=hm(Object.prototype.hasOwnProperty),Rm=hm(Object.prototype.toString),zm=hm(RegExp.prototype.test),Bm=Une(TypeError),Vm=bm(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Hm=bm(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Um=bm([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),rre=bm([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Wm=bm(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),ire=bm([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Gm=bm([`#text`]),Km=bm(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),qm=bm(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Jm=bm(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Ym=bm([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),are=xm(/{{[\w\W]*|^[\w\W]*}}/g),ore=xm(/<%[\w\W]*|^[\w\W]*%>/g),sre=xm(/\${[\w\W]*/g),cre=xm(/^data-[\-\w.\u00B7-\uFFFF]+$/),lre=xm(/^aria-[\-\w]+$/),Xm=xm(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ure=xm(/^(?:\w+script|data):/i),dre=xm(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fre=xm(/^html$/i),pre=xm(/^[a-z][.\w]*(-[.\w]+)+$/i),Zm=xm(/<[/\w!]/g),Qm=xm(/<[/\w]/g),mre=xm(/<\/no(script|embed|frames)/i),hre=xm(/\/>/i),$m={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},eh=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],gre=bm(gm({},eh)),_re=function(){let e={};return Em(eh,t=>{e[t]=xm(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),bm(e)}(),vre=function(){return typeof window>`u`?null:window},yre=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},th=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},nh=function(e,t,n,r){return Lm(e,t)&&km(e[t])?gm(r.base?_m(r.base):{},e[t],r.transform):n},rh=function(e,t,n){let r=Lm(e,t)?e[t]:void 0;return r&&typeof r==`object`?_m(r):n()},ih=qne()})),bre=l({ParseError:()=>yh,SETTINGS_SCHEMA:()=>Ch,__defineFunction:()=>sh,__defineMacro:()=>J,__defineSymbol:()=>q,__domTree:()=>mv,__parse:()=>lv,__renderToDomTree:()=>dv,__renderToHTMLTree:()=>fv,__setFontMetrics:()=>kre,default:()=>Boe,render:()=>sv,renderToString:()=>cv,version:()=>pv});function xre(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function Sre(e){return Object.prototype.hasOwnProperty.call(e,`default`)&&e.default!==void 0?e.default:xre(Array.isArray(e.type)?e.type[0]:e.type)}function Cre(e,t,n,r){var i=Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0,a=Object.prototype.hasOwnProperty.call(r,`processor`)?r.processor:void 0;e[t]=i===void 0?Sre(r):a?a(i):i}function wre(e){for(var t=0;t<Ih.length;t++)for(var n=Ih[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}function Tre(e){for(var t=0;t<Lh.length;t+=2)if(e>=Lh[t]&&e<=Lh[t+1])return!0;return!1}function Ere(e){return`toText`in e}function Dre(e){if(e instanceof Jh)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function Ore(e){if(e instanceof Kh)return e;throw Error(`Expected span<HtmlDomNode> but got `+String(e)+`.`)}function kre(e,t){Qh[e]=t}function oh(e,t,n){if(!Qh[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=Qh[t][r];if(!i&&e[0]in Sie&&(r=Sie[e[0]].charCodeAt(0),i=Qh[t][r]),!i&&n===`text`&&Tre(r)&&(i=Qh[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}function Are(e){var t=e>=5?0:e>=3?1:2;if(!eg[t]){var n=eg[t]={cssEmPerMu:$h.quad[t]/18};for(var r of Object.keys($h))n[r]=$h[r][t]}return eg[t]}function q(e,t,n,r,i,a){tg[e][i]={font:t,group:n,replace:r},a&&r&&(tg[e][r]=tg[e][i])}function sh(e){for(var t=e.type,n=e.names,r=e.htmlBuilder,i=e.mathmlBuilder,a=0;a<n.length;++a)Jie[n[a]]=e;t&&(r&&(Yg[t]=r),i&&(Xg[t]=i))}function ch(e){var t=e.type,n=e.htmlBuilder,r=e.mathmlBuilder;n&&(Yg[t]=n),r&&(Xg[t]=r)}function lh(e,t){var n=Rg([`katex-base`],e,t),r=Rg([`katex-strut`]);return r.style.height=Uh(n.height+n.depth),n.depth&&(r.style.verticalAlign=Uh(-n.depth)),n.children.unshift(r),n}function uh(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=$g(e,t,`root`),i;r.length===2&&r[1].hasClass(`katex-tag`)&&(i=r.pop());for(var a=[],o=[],s=0;s<r.length;s++)if(o.push(r[s]),r[s].hasClass(`mbin`)||r[s].hasClass(`mrel`)||r[s].hasClass(`allowbreak`)){for(var l=!1;s<r.length-1&&r[s+1].hasClass(`mspace`)&&!r[s+1].hasClass(`katex-newline`);)s++,o.push(r[s]),r[s].hasClass(`nobreak`)&&(l=!0);l||(a.push(lh(o,t)),o=[])}else r[s].hasClass(`katex-newline`)&&(o.pop(),o.length>0&&(a.push(lh(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(lh(o,t));var u;n?(u=lh($g(n,t,!0),t),u.classes=[`katex-tag`],a.push(u)):i&&a.push(i);var d=Rg([`katex-html`],a);if(d.setAttribute(`aria-hidden`,`true`),u){var f=u.children[0];f.style.height=Uh(d.height+d.depth),d.depth&&(f.style.verticalAlign=Uh(-d.depth))}return d}function jre(e){return new Bh(e)}function dh(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof o_&&t.text===`.`}if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof o_&&n.text===`,`}return!1}function Mre(e,t,n,r,i){var a=u_(e,n),o=a.length===1&&a[0]instanceof a_&&nae.has(a[0].type)?a[0]:new a_(`mrow`,a),s=new a_(`annotation`,[new o_(t)]);s.setAttribute(`encoding`,`application/x-tex`);var l=new a_(`semantics`,[o,s]),u=new a_(`math`,[l]);return u.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&u.setAttribute(`display`,`block`),Rg([i?`katex`:`katex-mathml`],[u])}function Nre(e){return vae.has(e)}function fh(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function ph(e){var t=mh(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function mh(e){return e.type===`atom`||yae.has(e.type)?e:null}function Pre(e,t){var n=$g(e.body,t,!0);return Rg([e.mclass],n,t)}function Fre(e,t){var n,r=u_(e.body,t);return e.mclass===`minner`?n=new a_(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new a_(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new a_(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):(e.mclass===`mopen`||e.mclass===`mclose`)&&(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`)),n}function Ire(e,t,n){var r=wae[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function Lre(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set(`\\cr`,`\\\\\\relax`),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,`\\\\`)),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new yh(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],a=0;a<t.length;a++){for(var o=t[a],s=Tae(),l=0;l<o.length;l++)if(!Eae(o[l]))s.body.push(o[l]);else{r.push(s),l+=1;var u=ph(o[l]).text,d=[,,];if(d[0]={type:`ordgroup`,mode:`math`,body:[]},d[1]={type:`ordgroup`,mode:`math`,body:[]},!`=|.`.includes(u)){if(`<>AV`.includes(u))for(var f=0;f<2;f++){for(var p=!0,m=l+1;m<o.length;m++){if(Dae(o[m],u)){p=!1,l=m;break}if(Eae(o[m]))throw new yh(`Missing a `+u+` character to complete a CD arrow.`,o[m]);d[f].body.push(o[m])}if(p)throw new yh(`Missing a `+u+` character to complete a CD arrow.`,o[l])}else throw new yh(`Expected one of "<>AV=|." after @`,o[l])}var h={type:`styling`,body:[Ire(u,d,e)],mode:`math`,style:`display`,resetFont:!0};r.push(h),s=Tae()}a%2==0?r.push(s):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}function Rre(e){return`isMiddle`in e}function hh(e,t){var n=mh(e);if(n&&Zae.has(n.text))return n;throw n?new yh(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new yh(`Invalid delimiter type '`+e.type+`'`,e)}function zre(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}function gh(e){for(var t=e.type,n=e.names,r=e.props,i=e.handler,a=e.htmlBuilder,o=e.mathmlBuilder,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l<n.length;++l)eoe[n[l]]=s;a&&(Yg[t]=a),o&&(Xg[t]=o)}function J(e,t){toe[e]=t}function Bre(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for(n===`\\relax`&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n===`\\hline`||n===`\\hdashline`;)e.consume(),t.push(n===`\\hdashline`),e.consumeSpaces(),n=e.fetch().text;return t}function _h(e){if(!e.includes(`ed`))return!e.includes(`*`)}function vh(e,t,n){var r=t.hskipBeforeAndAfter,i=t.addJot,a=t.cols,o=t.arraystretch,s=t.colSeparationType,l=t.autoTag,u=t.singleRow,d=t.emptySingleRow,f=t.maxNumCols,p=t.leqno;if(e.gullet.beginGroup(),u||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!o){var m=e.gullet.expandMacroAsText(`\\arraystretch`);if(m==null)o=1;else if(o=parseFloat(m),!o||o<0)throw new yh(`Invalid \\arraystretch: `+m)}e.gullet.beginGroup();var h=[],g=[h],_=[],v=[],y=l==null?void 0:[];function b(){l&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function x(){y&&(e.gullet.macros.get(`\\df@tag`)?(y.push(e.subparse([new j_(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):y.push(!!l&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(b(),v.push(Bre(e));;){var S=e.parseExpression(!1,u?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup();var C={type:`ordgroup`,mode:e.mode,body:S};n&&(C={type:`styling`,mode:e.mode,style:n,resetFont:!0,body:[C]}),h.push(C);var w=e.fetch().text;if(w===`&`){if(f&&h.length===f){if(u||s)throw new yh(`Too many tab characters: &`,e.nextToken);e.settings.reportNonstrict(`textEnv`,`Too few columns specified in the {array} column argument.`)}e.consume()}else if(w===`\\end`){x(),h.length===1&&C.type===`styling`&&C.body.length===1&&C.body[0].type===`ordgroup`&&C.body[0].body.length===0&&(g.length>1||!d)&&g.pop(),v.length<g.length+1&&v.push([]);break}else if(w===`\\\\`){e.consume();var T=void 0;e.gullet.future().text!==` `&&(T=e.parseSizeGroup(!0)),_.push(T?T.value:null),x(),v.push(Bre(e)),h=[],g.push(h),b()}else throw new yh(`Expected & or \\\\ or \\cr or \\end`,e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:e.mode,addJot:i,arraystretch:o,body:g,cols:a,rowGaps:_,hskipBeforeAndAfter:r,hLinesBeforeRow:v,colSeparationType:s,tags:y,leqno:p}}function Vre(e){return e.slice(0,1)===`d`?`display`:`text`}function Hre(e,t,n){for(var r=$g(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a<r.length;a++){var o=r[a].classes.indexOf(`katex-sizing`);o<0?Array.prototype.push.apply(r[a].classes,t.sizingClasses(n)):r[a].classes[o+1]===`reset-size`+t.size&&(r[a].classes[o+1]=`reset-size`+n.size),r[a].height*=i,r[a].depth*=i}return Vg(r)}function Ure(e){return e in I_}var yh,Wre,Gre,Kre,qre,bh,xh,Jre,Sh,Yre,Ch,wh,Th,Eh,Dh,Oh,kh,Ah,jh,Mh,Nh,Ph,Xre,Zre,Qre,$re,eie,tie,Fh,Ih,Lh,Rh,zh,nie,rie,iie,aie,oie,sie,cie,lie,uie,die,fie,Bh,Vh,pie,mie,Hh,Uh,Wh,Gh,hie,gie,_ie,vie,Kh,qh,yie,bie,Jh,Yh,Xh,Zh,xie,Qh,$h,Sie,eg,tg,Y,ng,X,rg,ig,ag,og,sg,cg,lg,ug,dg,fg,pg,mg,Cie,wie,hg,Tie,Eie,gg,Die,_g,vg,yg,bg,xg,Sg,Cg,wg,Tg,Eg,Dg,Og,Oie,kie,Aie,kg,jie,Mie,Nie,Ag,jg,Pie,Mg,Fie,Iie,Lie,Ng,Pg,Fg,Rie,Ig,zie,Bie,Lg,Rg,zg,Bg,Vie,Vg,Hg,Hie,Ug,Uie,Wg,Gg,Wie,Gie,Kg,qg,Jg,Kie,qie,Jie,Yg,Xg,Zg,Qg,Yie,Xie,Zie,Qie,$g,e_,$ie,t_,n_,r_,i_,a_,o_,eae,tae,nae,s_,c_,rae,l_,u_,d_,f_,iae,aae,oae,sae,cae,lae,uae,dae,fae,p_,pae,mae,m_,hae,gae,_ae,vae,yae,bae,xae,Sae,Cae,h_,g_,wae,Tae,Eae,Dae,Oae,kae,__,Aae,jae,Mae,v_,y_,Nae,Pae,Fae,Iae,b_,x_,S_,C_,Lae,Rae,zae,w_,T_,E_,Bae,Vae,Hae,Uae,D_,Wae,Gae,Kae,qae,Jae,Yae,O_,k_,Xae,Zae,Qae,$ae,eoe,toe,A_,j_,M_,noe,N_,roe,P_,ioe,aoe,ooe,soe,coe,loe,uoe,doe,foe,poe,moe,hoe,F_,goe,_oe,voe,yoe,boe,xoe,Soe,Coe,woe,Toe,Eoe,I_,Doe,Ooe,L_,R_,z_,B_,V_,koe,H_,U_,W_,G_,Aoe,joe,Moe,Noe,K_,Poe,Foe,q_,Ioe,Loe,J_,Y_,X_,Roe,Z_,Q_,$_,ev,zoe,tv,nv,rv,iv,av,ov,sv,cv,lv,uv,dv,fv,pv,mv,Boe,Voe=o((()=>{for(yh=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var l=s.slice(i,a).replace(/[^]/g,`$&̲`),u=i>15?`…`+s.slice(i-15,i):s.slice(0,i),d=a+15<s.length?s.slice(a,a+15)+`…`:s.slice(a);r+=u+l+d}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}},Wre=/([A-Z])/g,Gre=e=>e.replace(Wre,`-$1`).toLowerCase(),Kre={"&":`&`,">":`>`,"<":`<`,'"':`"`,"'":`'`},qre=/[&><"']/g,bh=e=>String(e).replace(qre,e=>Kre[e]),xh=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?xh(e.body[0]):e:e.type===`font`?xh(e.body):e,Jre=new Set([`mathord`,`textord`,`atom`]),Sh=e=>Jre.has(xh(e).type),Yre=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},Ch={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format <type>`},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color <color>`,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro <def>`,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness <size>`,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size <n>`,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}},wh=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(var t of Object.keys(Ch)){var n=Ch[t];n&&Cre(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),r&&r!==`ignore`){if(r===!0||r===`error`)throw new yh(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=Yre(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},Th=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return Ph[Xre[this.id]]}sub(){return Ph[Zre[this.id]]}fracNum(){return Ph[Qre[this.id]]}fracDen(){return Ph[$re[this.id]]}cramp(){return Ph[eie[this.id]]}text(){return Ph[tie[this.id]]}isTight(){return this.size>=2}},Eh=0,Dh=1,Oh=2,kh=3,Ah=4,jh=5,Mh=6,Nh=7,Ph=[new Th(Eh,0,!1),new Th(Dh,0,!0),new Th(Oh,1,!1),new Th(kh,1,!0),new Th(Ah,2,!1),new Th(jh,2,!0),new Th(Mh,3,!1),new Th(Nh,3,!0)],Xre=[Ah,jh,Ah,jh,Mh,Nh,Mh,Nh],Zre=[jh,jh,jh,jh,Nh,Nh,Nh,Nh],Qre=[Oh,kh,Ah,jh,Mh,Nh,Mh,Nh],$re=[kh,kh,jh,jh,Nh,Nh,Nh,Nh],eie=[Dh,Dh,kh,kh,jh,jh,Nh,Nh],tie=[Eh,Dh,Oh,kh,Oh,kh,Oh,kh],Fh={DISPLAY:Ph[Eh],TEXT:Ph[Oh],SCRIPT:Ph[Ah],SCRIPTSCRIPT:Ph[Mh]},Ih=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}],Lh=[],Ih.forEach(e=>e.blocks.forEach(e=>Lh.push(...e))),Rh=e=>e+` `+e,zh=80,nie=function(e,t){return`M95,`+(622+e+t)+`
|
|
42
42
|
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
@@ -296,7 +296,7 @@ l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
|
296
296
|
`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict(`commentAtEnd`,`% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)`)):this.tokenRegex.lastIndex=i+1,this.lex()}return new j_(r,new A_(this,t,this.tokenRegex.lastIndex))}},Ioe=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new yh(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);var e=this.undefStack.pop();for(var t of Object.keys(e))e[t]===void 0?delete this.current[t]:this.current[t]=e[t]}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return Object.prototype.hasOwnProperty.call(this.current,e)||Object.prototype.hasOwnProperty.call(this.builtins,e)}get(e){if(Object.prototype.hasOwnProperty.call(this.current,e))return this.current[e];if(Object.prototype.hasOwnProperty.call(this.builtins,e))return this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!Object.prototype.hasOwnProperty.call(i,e)&&(i[e]=Object.prototype.hasOwnProperty.call(this.current,e)?this.current[e]:void 0)}t==null?delete this.current[e]:this.current[e]=t}},Loe=toe,J(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),J(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),J(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),J(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),J(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),J(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),J(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}),J_={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15},J(`\\char`,function(e){var t=e.popToken(),n,r=0;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`"){if(t=e.popToken(),t.text[0]===`\\`)r=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new yh("\\char` missing argument");else r=t.text.charCodeAt(0)}else n=10;if(n){if(r=J_[t.text],r==null||r>=n)throw new yh(`Invalid base-`+n+` digit `+t.text);for(var i;(i=J_[e.future().text])!=null&&i<n;)r*=n,r+=i,e.popToken()}return`\\@char{`+r+`}`}),Y_=(e,t,n,r)=>{var i=e.consumeArg().tokens;if(i.length!==1)throw new yh(`\\newcommand's first argument must be a macro name`);var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new yh(`\\newcommand{`+a+`} attempting to redefine `+(a+`; use \\renewcommand`));if(!o&&!n)throw new yh(`\\renewcommand{`+a+`} when command `+a+` does not yet exist; use \\newcommand`);var s=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text===`[`){for(var l=``,u=e.expandNextToken();u.text!==`]`&&u.text!==`EOF`;)l+=u.text,u=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new yh(`Invalid number of arguments: `+l);s=parseInt(l),i=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:i,numArgs:s}),``},J(`\\newcommand`,e=>Y_(e,!1,!0,!1)),J(`\\renewcommand`,e=>Y_(e,!0,!1,!1)),J(`\\providecommand`,e=>Y_(e,!0,!0,!0)),J(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),J(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),J(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),W_[n],tg.math[n],tg.text[n]),``}),J(`\\bgroup`,`{`),J(`\\egroup`,`}`),J(`~`,`\\nobreakspace`),J(`\\lq`,"`"),J(`\\rq`,`'`),J(`\\aa`,`\\r a`),J(`\\AA`,`\\r A`),J(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),J(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),J(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),J(`ℬ`,`\\mathscr{B}`),J(`ℰ`,`\\mathscr{E}`),J(`ℱ`,`\\mathscr{F}`),J(`ℋ`,`\\mathscr{H}`),J(`ℐ`,`\\mathscr{I}`),J(`ℒ`,`\\mathscr{L}`),J(`ℳ`,`\\mathscr{M}`),J(`ℛ`,`\\mathscr{R}`),J(`ℭ`,`\\mathfrak{C}`),J(`ℌ`,`\\mathfrak{H}`),J(`ℨ`,`\\mathfrak{Z}`),J(`\\Bbbk`,`\\Bbb{k}`),J(`\\llap`,`\\mathllap{\\textrm{#1}}`),J(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),J(`\\clap`,`\\mathclap{\\textrm{#1}}`),J(`\\mathstrut`,`\\vphantom{(}`),J(`\\underbar`,`\\underline{\\text{#1}}`),J(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),J(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),J(`\\ne`,`\\neq`),J(`≠`,`\\neq`),J(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),J(`∉`,`\\notin`),J(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),J(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),J(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),J(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),J(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),J(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),J(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),J(`⟂`,`\\perp`),J(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),J(`∌`,`\\notni`),J(`⌜`,`\\ulcorner`),J(`⌝`,`\\urcorner`),J(`⌞`,`\\llcorner`),J(`⌟`,`\\lrcorner`),J(`©`,`\\copyright`),J(`®`,`\\textregistered`),J(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),J(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),J(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),J(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),J(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),J(`⋮`,`\\vdots`),J(`\\varGamma`,`\\mathit{\\Gamma}`),J(`\\varDelta`,`\\mathit{\\Delta}`),J(`\\varTheta`,`\\mathit{\\Theta}`),J(`\\varLambda`,`\\mathit{\\Lambda}`),J(`\\varXi`,`\\mathit{\\Xi}`),J(`\\varPi`,`\\mathit{\\Pi}`),J(`\\varSigma`,`\\mathit{\\Sigma}`),J(`\\varUpsilon`,`\\mathit{\\Upsilon}`),J(`\\varPhi`,`\\mathit{\\Phi}`),J(`\\varPsi`,`\\mathit{\\Psi}`),J(`\\varOmega`,`\\mathit{\\Omega}`),J(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),J(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),J(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),J(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),J(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),J(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),J(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),J(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`),X_={",":`\\dotsc`,"\\not":`\\dotsb`,"+":`\\dotsb`,"=":`\\dotsb`,"<":`\\dotsb`,">":`\\dotsb`,"-":`\\dotsb`,"*":`\\dotsb`,":":`\\dotsb`,"\\DOTSB":`\\dotsb`,"\\coprod":`\\dotsb`,"\\bigvee":`\\dotsb`,"\\bigwedge":`\\dotsb`,"\\biguplus":`\\dotsb`,"\\bigcap":`\\dotsb`,"\\bigcup":`\\dotsb`,"\\prod":`\\dotsb`,"\\sum":`\\dotsb`,"\\bigotimes":`\\dotsb`,"\\bigoplus":`\\dotsb`,"\\bigodot":`\\dotsb`,"\\bigsqcup":`\\dotsb`,"\\And":`\\dotsb`,"\\longrightarrow":`\\dotsb`,"\\Longrightarrow":`\\dotsb`,"\\longleftarrow":`\\dotsb`,"\\Longleftarrow":`\\dotsb`,"\\longleftrightarrow":`\\dotsb`,"\\Longleftrightarrow":`\\dotsb`,"\\mapsto":`\\dotsb`,"\\longmapsto":`\\dotsb`,"\\hookrightarrow":`\\dotsb`,"\\doteq":`\\dotsb`,"\\mathbin":`\\dotsb`,"\\mathrel":`\\dotsb`,"\\relbar":`\\dotsb`,"\\Relbar":`\\dotsb`,"\\xrightarrow":`\\dotsb`,"\\xleftarrow":`\\dotsb`,"\\DOTSI":`\\dotsi`,"\\int":`\\dotsi`,"\\oint":`\\dotsi`,"\\iint":`\\dotsi`,"\\iiint":`\\dotsi`,"\\iiiint":`\\dotsi`,"\\idotsint":`\\dotsi`,"\\DOTSX":`\\dotsx`},Roe=new Set([`bin`,`rel`]),J(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in X_?t=X_[n]:(n.slice(0,4)===`\\not`||n in tg.math&&Roe.has(tg.math[n].group))&&(t=`\\dotsb`),t}),Z_={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0},J(`\\dotso`,function(e){return e.future().text in Z_?`\\ldots\\,`:`\\ldots`}),J(`\\dotsc`,function(e){var t=e.future().text;return t in Z_&&t!==`,`?`\\ldots\\,`:`\\ldots`}),J(`\\cdots`,function(e){return e.future().text in Z_?`\\@cdots\\,`:`\\@cdots`}),J(`\\dotsb`,`\\cdots`),J(`\\dotsm`,`\\cdots`),J(`\\dotsi`,`\\!\\cdots`),J(`\\dotsx`,`\\ldots\\,`),J(`\\DOTSI`,`\\relax`),J(`\\DOTSB`,`\\relax`),J(`\\DOTSX`,`\\relax`),J(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),J(`\\,`,`\\tmspace+{3mu}{.1667em}`),J(`\\thinspace`,`\\,`),J(`\\>`,`\\mskip{4mu}`),J(`\\:`,`\\tmspace+{4mu}{.2222em}`),J(`\\medspace`,`\\:`),J(`\\;`,`\\tmspace+{5mu}{.2777em}`),J(`\\thickspace`,`\\;`),J(`\\!`,`\\tmspace-{3mu}{.1667em}`),J(`\\negthinspace`,`\\!`),J(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),J(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),J(`\\enspace`,`\\kern.5em `),J(`\\enskip`,`\\hskip.5em\\relax`),J(`\\quad`,`\\hskip1em\\relax`),J(`\\qquad`,`\\hskip2em\\relax`),J(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),J(`\\tag@paren`,`\\tag@literal{({#1})}`),J(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new yh(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),J(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),J(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),J(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),J(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),J(`\\newline`,`\\\\\\relax`),J(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`),Q_=Uh(Qh[`Main-Regular`][84][1]-.7*Qh[`Main-Regular`][65][1]),J(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+Q_+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),J(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+Q_+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),J(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),J(`\\@hspace`,`\\hskip #1\\relax`),J(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),J(`\\ordinarycolon`,`:`),J(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),J(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),J(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),J(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),J(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),J(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),J(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),J(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),J(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),J(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),J(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),J(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),J(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),J(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),J(`∷`,`\\dblcolon`),J(`∹`,`\\eqcolon`),J(`≔`,`\\coloneqq`),J(`≕`,`\\eqqcolon`),J(`⩴`,`\\Coloneqq`),J(`\\ratio`,`\\vcentcolon`),J(`\\coloncolon`,`\\dblcolon`),J(`\\colonequals`,`\\coloneqq`),J(`\\coloncolonequals`,`\\Coloneqq`),J(`\\equalscolon`,`\\eqqcolon`),J(`\\equalscoloncolon`,`\\Eqqcolon`),J(`\\colonminus`,`\\coloneq`),J(`\\coloncolonminus`,`\\Coloneq`),J(`\\minuscolon`,`\\eqcolon`),J(`\\minuscoloncolon`,`\\Eqcolon`),J(`\\coloncolonapprox`,`\\Colonapprox`),J(`\\coloncolonsim`,`\\Colonsim`),J(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),J(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),J(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),J(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),J(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),J(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),J(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),J(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),J(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),J(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),J(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),J(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),J(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),J(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),J(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),J(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),J(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),J(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),J(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),J(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),J(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),J(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),J(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),J(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),J(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),J(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),J(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),J(`\\imath`,`\\html@mathml{\\@imath}{ı}`),J(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),J(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),J(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),J(`⟦`,`\\llbracket`),J(`⟧`,`\\rrbracket`),J(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),J(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),J(`⦃`,`\\lBrace`),J(`⦄`,`\\rBrace`),J(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),J(`⦵`,`\\minuso`),J(`\\darr`,`\\downarrow`),J(`\\dArr`,`\\Downarrow`),J(`\\Darr`,`\\Downarrow`),J(`\\lang`,`\\langle`),J(`\\rang`,`\\rangle`),J(`\\uarr`,`\\uparrow`),J(`\\uArr`,`\\Uparrow`),J(`\\Uarr`,`\\Uparrow`),J(`\\N`,`\\mathbb{N}`),J(`\\R`,`\\mathbb{R}`),J(`\\Z`,`\\mathbb{Z}`),J(`\\alef`,`\\aleph`),J(`\\alefsym`,`\\aleph`),J(`\\Alpha`,`\\mathrm{A}`),J(`\\Beta`,`\\mathrm{B}`),J(`\\bull`,`\\bullet`),J(`\\Chi`,`\\mathrm{X}`),J(`\\clubs`,`\\clubsuit`),J(`\\cnums`,`\\mathbb{C}`),J(`\\Complex`,`\\mathbb{C}`),J(`\\Dagger`,`\\ddagger`),J(`\\diamonds`,`\\diamondsuit`),J(`\\empty`,`\\emptyset`),J(`\\Epsilon`,`\\mathrm{E}`),J(`\\Eta`,`\\mathrm{H}`),J(`\\exist`,`\\exists`),J(`\\harr`,`\\leftrightarrow`),J(`\\hArr`,`\\Leftrightarrow`),J(`\\Harr`,`\\Leftrightarrow`),J(`\\hearts`,`\\heartsuit`),J(`\\image`,`\\Im`),J(`\\infin`,`\\infty`),J(`\\Iota`,`\\mathrm{I}`),J(`\\isin`,`\\in`),J(`\\Kappa`,`\\mathrm{K}`),J(`\\larr`,`\\leftarrow`),J(`\\lArr`,`\\Leftarrow`),J(`\\Larr`,`\\Leftarrow`),J(`\\lrarr`,`\\leftrightarrow`),J(`\\lrArr`,`\\Leftrightarrow`),J(`\\Lrarr`,`\\Leftrightarrow`),J(`\\Mu`,`\\mathrm{M}`),J(`\\natnums`,`\\mathbb{N}`),J(`\\Nu`,`\\mathrm{N}`),J(`\\Omicron`,`\\mathrm{O}`),J(`\\plusmn`,`\\pm`),J(`\\rarr`,`\\rightarrow`),J(`\\rArr`,`\\Rightarrow`),J(`\\Rarr`,`\\Rightarrow`),J(`\\real`,`\\Re`),J(`\\reals`,`\\mathbb{R}`),J(`\\Reals`,`\\mathbb{R}`),J(`\\Rho`,`\\mathrm{P}`),J(`\\sdot`,`\\cdot`),J(`\\sect`,`\\S`),J(`\\spades`,`\\spadesuit`),J(`\\sub`,`\\subset`),J(`\\sube`,`\\subseteq`),J(`\\supe`,`\\supseteq`),J(`\\Tau`,`\\mathrm{T}`),J(`\\thetasym`,`\\vartheta`),J(`\\weierp`,`\\wp`),J(`\\Zeta`,`\\mathrm{Z}`),J(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),J(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),J(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),J(`\\bra`,`\\mathinner{\\langle{#1}|}`),J(`\\ket`,`\\mathinner{|{#1}\\rangle}`),J(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),J(`\\Bra`,`\\left\\langle#1\\right|`),J(`\\Ket`,`\\left|#1\\right\\rangle`),$_=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();var l=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,l(!1)),i.length&&t.macros.set(`\\|`,l(!0));var u=t.consumeArg().tokens,d=t.expandTokens([...a,...u,...n]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}},J(`\\bra@ket`,$_(!1)),J(`\\bra@set`,$_(!0)),J(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),J(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),J(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),J(`\\angln`,`{\\angl n}`),J(`\\blue`,`\\textcolor{##6495ed}{#1}`),J(`\\orange`,`\\textcolor{##ffa500}{#1}`),J(`\\pink`,`\\textcolor{##ff00af}{#1}`),J(`\\red`,`\\textcolor{##df0030}{#1}`),J(`\\green`,`\\textcolor{##28ae7b}{#1}`),J(`\\gray`,`\\textcolor{gray}{#1}`),J(`\\purple`,`\\textcolor{##9d38bd}{#1}`),J(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),J(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),J(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),J(`\\blueD`,`\\textcolor{##11accd}{#1}`),J(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),J(`\\tealA`,`\\textcolor{##94fff5}{#1}`),J(`\\tealB`,`\\textcolor{##26edd5}{#1}`),J(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),J(`\\tealD`,`\\textcolor{##01a995}{#1}`),J(`\\tealE`,`\\textcolor{##208170}{#1}`),J(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),J(`\\greenB`,`\\textcolor{##8af281}{#1}`),J(`\\greenC`,`\\textcolor{##74cf70}{#1}`),J(`\\greenD`,`\\textcolor{##1fab54}{#1}`),J(`\\greenE`,`\\textcolor{##0d923f}{#1}`),J(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),J(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),J(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),J(`\\goldD`,`\\textcolor{##e07d10}{#1}`),J(`\\goldE`,`\\textcolor{##a75a05}{#1}`),J(`\\redA`,`\\textcolor{##fca9a9}{#1}`),J(`\\redB`,`\\textcolor{##ff8482}{#1}`),J(`\\redC`,`\\textcolor{##f9685d}{#1}`),J(`\\redD`,`\\textcolor{##e84d39}{#1}`),J(`\\redE`,`\\textcolor{##bc2612}{#1}`),J(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),J(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),J(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),J(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),J(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),J(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),J(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),J(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),J(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),J(`\\purpleE`,`\\textcolor{##543b78}{#1}`),J(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),J(`\\mintB`,`\\textcolor{##edf2df}{#1}`),J(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),J(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),J(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),J(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),J(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),J(`\\grayE`,`\\textcolor{##babec2}{#1}`),J(`\\grayF`,`\\textcolor{##888d93}{#1}`),J(`\\grayG`,`\\textcolor{##626569}{#1}`),J(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),J(`\\grayI`,`\\textcolor{##21242c}{#1}`),J(`\\kaBlue`,`\\textcolor{##314453}{#1}`),J(`\\kaGreen`,`\\textcolor{##71B307}{#1}`),ev={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},zoe=class{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Ioe(Loe,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new q_(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken();var i=this.consumeArg([`]`]);r=i.tokens,n=i.end}else{var a=this.consumeArg();r=a.tokens,t=a.start,n=a.end}return this.pushToken(new j_(`EOF`,n.loc)),this.pushTokens(r),new j_(``,A_.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text===`{`)++a;else if(i.text===`}`){if(--a,a===-1)throw new yh(`Extra }`,i)}else if(i.text===`EOF`)throw new yh(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[o]:`}`)+`'`,i);if(e&&n){if((a===0||a===1&&e[o]===`{`)&&i.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}}while(a!==0||n);return r.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new yh(`The length of delimiters doesn't match the number of args!`);for(var n=t[0],r=0;r<n.length;r++){var i=this.popToken();if(n[r]!==i.text)throw new yh(`Use of the macro doesn't match its definition`,i)}}for(var a=[],o=0;o<e;o++)a.push(this.consumeArg(t&&t[o+1]).tokens);return a}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new yh(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]===`\\`&&!this.isDefined(n))throw new yh(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var s=i[o];if(s.text===`#`){if(o===0)throw new yh(`Incomplete placeholder at end of macro body`,s);if(s=i[--o],s.text===`#`)i.splice(o+1,1);else if(/^[1-9]$/.test(s.text))i.splice(o,2,...a[s.text-1]);else throw new yh(`Not a valid argument number`,s)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new j_(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&=(r.noexpand=!1,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.includes(`#`))for(var a=r.replace(/##/g,``);a.includes(`#`+(i+1));)++i;for(var o=new q_(r,this.settings),s=[],l=o.lex();l.text!==`EOF`;)s.push(l),l=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||Object.prototype.hasOwnProperty.call(W_,e)||Object.prototype.hasOwnProperty.call(tg.math,e)||Object.prototype.hasOwnProperty.call(tg.text,e)||Object.prototype.hasOwnProperty.call(ev,e)}isExpandable(e){var t=this.macros.get(e);return t==null?Object.prototype.hasOwnProperty.call(W_,e)&&!W_[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},tv=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,nv=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,ₐ:`a`,ₑ:`e`,ₕ:`h`,ᵢ:`i`,ⱼ:`j`,ₖ:`k`,ₗ:`l`,ₘ:`m`,ₙ:`n`,ₒ:`o`,ₚ:`p`,ᵣ:`r`,ₛ:`s`,ₜ:`t`,ᵤ:`u`,ᵥ:`v`,ₓ:`x`,ᵦ:`β`,ᵧ:`γ`,ᵨ:`ρ`,ᵩ:`ϕ`,ᵪ:`χ`,"⁺":`+`,"⁻":`-`,"⁼":`=`,"⁽":`(`,"⁾":`)`,"⁰":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,ᴬ:`A`,ᴮ:`B`,ᴰ:`D`,ᴱ:`E`,ᴳ:`G`,ᴴ:`H`,ᴵ:`I`,ᴶ:`J`,ᴷ:`K`,ᴸ:`L`,ᴹ:`M`,ᴺ:`N`,ᴼ:`O`,ᴾ:`P`,ᴿ:`R`,ᵀ:`T`,ᵁ:`U`,ⱽ:`V`,ᵂ:`W`,ᵃ:`a`,ᵇ:`b`,ᶜ:`c`,ᵈ:`d`,ᵉ:`e`,ᶠ:`f`,ᵍ:`g`,ʰ:`h`,ⁱ:`i`,ʲ:`j`,ᵏ:`k`,ˡ:`l`,ᵐ:`m`,ⁿ:`n`,ᵒ:`o`,ᵖ:`p`,ʳ:`r`,ˢ:`s`,ᵗ:`t`,ᵘ:`u`,ᵛ:`v`,ʷ:`w`,ˣ:`x`,ʸ:`y`,ᶻ:`z`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),rv={"́":{text:`\\'`,math:`\\acute`},"̀":{text:"\\`",math:`\\grave`},"̈":{text:`\\"`,math:`\\ddot`},"̃":{text:`\\~`,math:`\\tilde`},"̄":{text:`\\=`,math:`\\bar`},"̆":{text:`\\u`,math:`\\breve`},"̌":{text:`\\v`,math:`\\check`},"̂":{text:`\\^`,math:`\\hat`},"̇":{text:`\\.`,math:`\\dot`},"̊":{text:`\\r`,math:`\\mathring`},"̋":{text:`\\H`},"̧":{text:`\\c`}},iv={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},av=class e{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode=`math`,this.gullet=new zoe(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new yh(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{var e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new j_(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||n&&i.text===n||t&&W_[i.text]&&W_[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,n,r=0;r<e.length;r++){var i=e[r];if(i.type===`infix`){if(t!==-1)throw new yh(`only one infix operator per group`,i.token);t=r,n=i.replaceWith}}if(t!==-1&&n){var a,o,s=e.slice(0,t),l=e.slice(t+1);return a=s.length===1&&s[0].type===`ordgroup`?s[0]:{type:`ordgroup`,mode:this.mode,body:s},o=l.length===1&&l[0].type===`ordgroup`?l[0]:{type:`ordgroup`,mode:this.mode,body:l},[n===`\\\\abovefrac`?this.callFunction(n,[a,e[t],o],[]):this.callFunction(n,[a,o],[])]}return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r;do r=this.parseGroup(e);while(r?.type===`internal`);if(!r)throw new yh(`Expected group after '`+n+`'`,t);return r}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:`textord`,mode:`text`,text:e[n]});var r={type:`text`,mode:this.mode,body:t};return{type:`color`,mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t=this.parseGroup(`atom`,e);if(t?.type===`internal`||this.mode===`text`)return t;for(var n,r;;){this.consumeSpaces();var i=this.fetch();if(i.text===`\\limits`||i.text===`\\nolimits`){if(t&&t.type===`op`)t.limits=i.text===`\\limits`,t.alwaysHandleSupSub=!0;else if(t&&t.type===`operatorname`)t.alwaysHandleSupSub&&(t.limits=i.text===`\\limits`);else throw new yh(`Limit controls must follow a math operator`,i);this.consume()}else if(i.text===`^`){if(n)throw new yh(`Double superscript`,i);n=this.handleSupSubscript(`superscript`)}else if(i.text===`_`){if(r)throw new yh(`Double subscript`,i);r=this.handleSupSubscript(`subscript`)}else if(i.text===`'`){if(n)throw new yh(`Double superscript`,i);var a={type:`textord`,mode:this.mode,text:`\\prime`},o=[a];for(this.consume();this.fetch().text===`'`;)o.push(a),this.consume();this.fetch().text===`^`&&o.push(this.handleSupSubscript(`superscript`)),n={type:`ordgroup`,mode:this.mode,body:o}}else if(nv[i.text]){var s=tv.test(i.text),l=[];for(l.push(new j_(nv[i.text])),this.consume();;){var u=this.fetch().text;if(!nv[u]||tv.test(u)!==s)break;l.unshift(new j_(nv[u])),this.consume()}var d=this.subparse(l);s?r={type:`ordgroup`,mode:`math`,body:d}:n={type:`ordgroup`,mode:`math`,body:d}}else break}return n&&r?{type:`supsub`,mode:this.mode,base:t,sup:n,sub:r}:n?{type:`supsub`,mode:this.mode,base:t,sup:n}:r?{type:`supsub`,mode:this.mode,base:t,sub:r}:t}parseFunction(e,t){var n=this.fetch(),r=n.text,i=W_[r];if(!i)return null;if(this.consume(),t&&t!==`atom`&&!i.allowedInArgument)throw new yh(`Got function '`+r+`' with no arguments`+(t?` as `+t:``),n);if(this.mode===`text`&&!i.allowedInText)throw new yh(`Can't use function '`+r+`' in text mode`,n);if(this.mode===`math`&&i.allowedInMath===!1)throw new yh(`Can't use function '`+r+`' in math mode`,n);var a=this.parseArguments(r,i),o=a.args,s=a.optArgs;return this.callFunction(r,o,s,n,e)}callFunction(e,t,n,r,i){var a={funcName:e,parser:this,token:r,breakOnTokenText:i},o=W_[e];if(o&&o.handler)return o.handler(a,t,n);throw new yh(`No function handler for `+e)}parseArguments(e,t){var n=t.numOptionalArgs??0,r=t.numArgs+n;if(r===0)return{args:[],optArgs:[]};for(var i=[],a=[],o=0;o<r;o++){var s=t.argTypes?.[o],l=o<n;(`primitive`in t&&t.primitive&&s==null||t.type===`sqrt`&&o===1&&a[0]==null)&&(s=`primitive`);var u=this.parseGroupOfType(`argument to '`+e+`'`,s,l);if(l)a.push(u);else if(u!=null)i.push(u);else throw new yh(`Null argument, please report this as a bug`)}return{args:i,optArgs:a}}parseGroupOfType(e,t,n){switch(t){case`color`:return this.parseColorGroup(n);case`size`:return this.parseSizeGroup(n);case`url`:return this.parseUrlGroup(n);case`math`:case`text`:return this.parseArgumentGroup(n,t);case`hbox`:var r=this.parseArgumentGroup(n,`text`);return r==null?null:{type:`styling`,mode:r.mode,body:[r],style:`text`,resetFont:!0};case`raw`:var i=this.parseStringGroup(n);return i==null?null:{type:`raw`,mode:`text`,string:i.text};case`primitive`:if(n)throw new yh(`A primitive argument cannot be optional`);var a=this.parseGroup(e);if(a==null)throw new yh(`Expected group as `+e,this.fetch());return a;case`original`:case void 0:return this.parseArgumentGroup(n);default:throw new yh(`Unknown group type as `+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===` `;)this.consume()}parseStringGroup(e){var t=this.gullet.scanArgument(e);if(t==null)return null;for(var n=``,r;(r=this.fetch()).text!==`EOF`;)n+=r.text,this.consume();return this.consume(),t.text=n,t}parseRegexGroup(e,t){for(var n=this.fetch(),r=n,i=``,a;(a=this.fetch()).text!==`EOF`&&e.test(i+a.text);)r=a,i+=r.text,this.consume();if(i===``)throw new yh(`Invalid `+t+`: '`+n.text+`'`,n);return n.range(r,i)}parseColorGroup(e){var t=this.parseStringGroup(e);if(t==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new yh(`Invalid color: '`+t.text+`'`,t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r=`#`+r),{type:`color-token`,mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),t=!e&&this.gullet.future().text!==`{`?this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,`size`):this.parseStringGroup(e),!t)return null;!e&&t.text.length===0&&(t.text=`0pt`,n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new yh(`Invalid size: '`+t.text+`'`,t);var i={number:+(r[1]+r[2]),unit:r[3]};if(!mie(i))throw new yh(`Invalid unit: '`+i.unit+`'`,t);return{type:`size`,mode:this.mode,value:i,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode(`%`,13),this.gullet.lexer.setCatcode(`~`,12);var t=this.parseStringGroup(e);if(this.gullet.lexer.setCatcode(`%`,14),this.gullet.lexer.setCatcode(`~`,13),t==null)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,`$1`);return{type:`url`,mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(n==null)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var i=this.parseExpression(!1,`EOF`);this.expect(`EOF`),this.gullet.endGroup();var a={type:`ordgroup`,mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),a}parseGroup(e,t){var n=this.fetch(),r=n.text,i;if(r===`{`||r===`\\begingroup`){this.consume();var a=r===`{`?`}`:`\\endgroup`;this.gullet.beginGroup();var o=this.parseExpression(!1,a),s=this.fetch();this.expect(a),this.gullet.endGroup(),i={type:`ordgroup`,mode:this.mode,loc:A_.range(n,s),body:o,semisimple:r===`\\begingroup`||void 0}}else if(i=this.parseFunction(t,e)||this.parseSymbol(),i==null&&r[0]===`\\`&&!Object.prototype.hasOwnProperty.call(ev,r)){if(this.settings.throwOnError)throw new yh(`Undefined control sequence: `+r,n);i=this.formatUnsupportedCmd(r),this.consume()}return i}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n];if(r.type===`textord`){var i=r.text,a=e[n+1];if(a&&a.type===`textord`){if(i===`-`&&a.text===`-`){var o=e[n+2];n+1<t&&o&&o.type===`textord`&&o.text===`-`?(e.splice(n,3,{type:`textord`,mode:`text`,loc:A_.range(r,o),text:`---`}),t-=2):(e.splice(n,2,{type:`textord`,mode:`text`,loc:A_.range(r,a),text:`--`}),--t)}(i===`'`||i==="`")&&a.text===i&&(e.splice(n,2,{type:`textord`,mode:`text`,loc:A_.range(r,a),text:i+i}),--t)}}}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r=n.charAt(0)===`*`;if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new yh(`\\verb assertion failed --
|
|
297
297
|
please report what input caused this bug`);return n=n.slice(1,-1),{type:`verb`,mode:`text`,body:n,star:r}}Object.prototype.hasOwnProperty.call(iv,t[0])&&!tg[this.mode][t[0]]&&(this.settings.strict&&this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Accented Unicode text character "`+t[0]+`" used in math mode`,e),t=iv[t[0]]+t.slice(1));var i=Poe.exec(t);i&&(t=t.substring(0,i.index),t===`i`?t=`ı`:t===`j`&&(t=`ȷ`));var a;if(tg[this.mode][t]){this.settings.strict&&this.mode===`math`&&Tg.includes(t)&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,e);var o=tg[this.mode][t].group,s=A_.range(e);a=Nre(o)?{type:`atom`,mode:this.mode,family:o,loc:s,text:t}:{type:o,mode:this.mode,loc:s,text:t}}else if(t.charCodeAt(0)>=128)this.settings.strict&&(Tre(t.charCodeAt(0))?this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Unicode text character "`+t[0]+`" used in math mode`,e):this.settings.reportNonstrict(`unknownSymbol`,`Unrecognized Unicode character "`+t[0]+`"`+(` (`+t.charCodeAt(0)+`)`),e)),a={type:`textord`,mode:`text`,loc:A_.range(e),text:t};else return null;if(this.consume(),i)for(var l=0;l<i[0].length;l++){var u=i[0][l];if(!rv[u])throw new yh(`Unknown accent ' `+u+`'`,e);var d=rv[u][this.mode]||rv[u].text;if(!d)throw new yh(`Accent `+u+` unsupported in `+this.mode+` mode`,e);a={type:`accent`,mode:this.mode,loc:A_.range(e),label:d,isStretchy:!1,isShifty:!0,base:a}}return a}},av.endOfExpression=new Set([`}`,`\\endgroup`,`\\end`,`\\right`,`&`]),ov=function(e,t){if(!(typeof e==`string`||e instanceof String))throw TypeError(`KaTeX can only parse string typed expression`);var n=new av(e,t);delete n.gullet.macros.current[`\\df@tag`];var r=n.parse();if(delete n.gullet.macros.current[`\\current@color`],delete n.gullet.macros.current[`\\color`],n.gullet.macros.get(`\\df@tag`)){if(!t.displayMode)throw new yh(`\\tag works only in display equations`);r=[{type:`tag`,mode:`text`,body:r,tag:n.subparse([new j_(`\\df@tag`)])}]}return r},sv=function(e,t,n){t.textContent=``;var r=dv(e,n).toNode();t.appendChild(r)},typeof document<`u`&&document.compatMode!==`CSS1Compat`&&(typeof console<`u`&&console.warn(`Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype.`),sv=function(){throw new yh(`KaTeX doesn't work in quirks mode.`)}),cv=function(e,t){return dv(e,t).toMarkup()},lv=function(e,t){return ov(e,new wh(t))},uv=function(e,t,n){if(n.throwOnError||!(e instanceof yh))throw e;var r=Rg([`katex-error`],[new Jh(t)]);return r.setAttribute(`title`,e.toString()),r.setAttribute(`style`,`color:`+n.errorColor),r},dv=function(e,t){var n=new wh(t);try{return uae(ov(e,n),e,n)}catch(t){return uv(t,e,n)}},fv=function(e,t){var n=new wh(t);try{return dae(ov(e,n),e,n)}catch(t){return uv(t,e,n)}},pv=`0.18.2`,mv={Span:Kh,Anchor:qh,SymbolNode:Jh,SvgNode:Yh,PathNode:Xh,LineNode:Zh},Boe={version:pv,render:sv,renderToString:cv,ParseError:yh,SETTINGS_SCHEMA:Ch,__parse:lv,__renderToDomTree:dv,__renderToHTMLTree:fv,__setFontMetrics:kre,__defineSymbol:q,__defineFunction:sh,__defineMacro:J,__domTree:mv}}));function Hoe(){let e=`data-temp-href-target`;ih.addHook(`beforeSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(`target`)&&t.setAttribute(e,t.getAttribute(`target`)??``)}),ih.addHook(`afterSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(e)&&(t.setAttribute(`target`,t.getAttribute(e)??``),t.removeAttribute(e),t.getAttribute(`target`)===`_blank`&&t.setAttribute(`rel`,`noopener`))})}function hv(e){return[...e.cssRules].map(e=>e.cssText).join(`
|
|
298
298
|
`)}var gv,_v,vv,yv,bv,Uoe,Woe,Goe,Koe,qoe,xv,Joe,Yoe,Xoe,Zoe,Qoe,$oe,ese,tse,nse,rse,ise,ase,ose,sse,cse,Sv,Cv,wv,Tv,lse,Ev,use,dse,Dv,Ov,kv,Av,jv,Mv,Nv,Pv,Fv,fse,pse,mse,Iv,Lv,Rv,zv,hse,Bv,gse,Vv,Hv,_se,Uv,Wv,Gv,Kv,vse,qv,Jv,Yv,Xv,Zv,yse,Qv,bse,xse,$v,ey,ty,Sse,Cse,wse,Tse,ny,ry,Ese,Dse,iy,ay,Ose,kse,oy,sy,cy,ly,Ase,uy,dy,jse,Mse,fy,py,my,Nse,Pse,Fse,hy,gy,_y,vy,yy,by,xy,Sy,Cy,wy,Ty,Ey,Dy,Ise,Oy,ky,Ay,jy,My,Lse,Ny,Py,Fy,Rse,Iy=o((()=>{Gp(),Vp(),pm(),ah(),zp(),gv=W((e,t,{depth:n=2}={})=>{let r={depth:n};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(t=>gv(e,t,r)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(t=>{e.includes(t)||e.push(t)}),e;if(e==null||n<=0)return typeof e==`object`&&e&&typeof t==`object`?Object.assign(e,t):t;if(t!=null&&typeof e==`object`&&typeof t==`object`){let r=e;Object.entries(t).forEach(([t,i])=>{if(typeof i==`object`){if(i===null)return;Object.hasOwn(e,t)||Object.defineProperty(e,t,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),r[t]===void 0&&(r[t]=Array.isArray(i)?[]:{}),typeof r[t]==`object`&&(r[t]=gv(r[t],i,{depth:n-1}))}else typeof r[t]!=`object`&&(Object.hasOwn(e,t)?r[t]=i:Object.defineProperty(e,t,{value:i,writable:!0,enumerable:!0,configurable:!0}))})}return e},`assignWithDepth`),_v=gv,vv=`#ffffff`,yv=`#f2f2f2`,bv=W((e,t)=>t?K(e,{s:-40,l:10}):K(e,{s:-40,l:-10}),`mkBorder`),Uoe=class{static{W(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#fff4dd`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.useGradient=!0,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||K(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||K(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||bv(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||bv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||bv(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||bv(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||fm(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||fm(this.tertiaryColor),this.lineColor=this.lineColor||fm(this.background),this.arrowheadColor=this.arrowheadColor||fm(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?dm(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||dm(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||fm(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||um(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.vertLineColor=this.vertLineColor||`navy`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||dm(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||dm(this.mainBkg,10)):(this.rowOdd=this.rowOdd||um(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||um(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||K(this.primaryColor,{h:30}),this.cScale4=this.cScale4||K(this.primaryColor,{h:60}),this.cScale5=this.cScale5||K(this.primaryColor,{h:90}),this.cScale6=this.cScale6||K(this.primaryColor,{h:120}),this.cScale7=this.cScale7||K(this.primaryColor,{h:150}),this.cScale8=this.cScale8||K(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||K(this.primaryColor,{h:270}),this.cScale10=this.cScale10||K(this.primaryColor,{h:300}),this.cScale11=this.cScale11||K(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=dm(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=dm(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||fm(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||um(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||dm(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||K(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||K(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||K(this.primaryColor,{h:64}),this.fillType3=this.fillType3||K(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||K(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||K(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||K(this.primaryColor,{h:128}),this.fillType7=this.fillType7||K(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||K(this.primaryColor,{l:-10}),this.pie5=this.pie5||K(this.secondaryColor,{l:-10}),this.pie6=this.pie6||K(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||K(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||K(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||K(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||K(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||K(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||K(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.venn1=this.venn1??K(this.primaryColor,{l:-30}),this.venn2=this.venn2??K(this.secondaryColor,{l:-30}),this.venn3=this.venn3??K(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??K(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??K(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??K(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??K(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??K(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||`#8B0000`,cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||`#E8F5E9`,complicatedBg:this.cynefin?.complicatedBg||`#E3F2FD`,chaoticBg:this.cynefin?.chaoticBg||`#FBE9E7`,clearBg:this.cynefin?.clearBg||`#FFF8E1`,confusionBg:this.cynefin?.confusionBg||`#F3E5F5`,textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||`#dc3545`,this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||`#777`,this.archEdgeArrowColor=this.archEdgeArrowColor||`#777`,this.archEdgeWidth=this.archEdgeWidth||`3`,this.archGroupBorderColor=this.archGroupBorderColor||`#000`,this.archGroupBorderWidth=this.archGroupBorderWidth||`2px`,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||K(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||K(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||K(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||K(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||K(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||K(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||cm(this.quadrant1Fill)?um(this.quadrant1Fill):dm(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?dm(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||K(this.primaryColor,{h:-30}),this.git4=this.git4||K(this.primaryColor,{h:-60}),this.git5=this.git5||K(this.primaryColor,{h:-90}),this.git6=this.git6||K(this.primaryColor,{h:60}),this.git7=this.git7||K(this.primaryColor,{h:120}),this.darkMode?(this.git0=um(this.git0,25),this.git1=um(this.git1,25),this.git2=um(this.git2,25),this.git3=um(this.git3,25),this.git4=um(this.git4,25),this.git5=um(this.git5,25),this.git6=um(this.git6,25),this.git7=um(this.git7,25)):(this.git0=dm(this.git0,25),this.git1=dm(this.git1,25),this.git2=dm(this.git2,25),this.git3=dm(this.git3,25),this.git4=dm(this.git4,25),this.git5=dm(this.git5,25),this.git6=dm(this.git6,25),this.git7=dm(this.git7,25)),this.gitInv0=this.gitInv0||fm(this.git0),this.gitInv1=this.gitInv1||fm(this.git1),this.gitInv2=this.gitInv2||fm(this.git2),this.gitInv3=this.gitInv3||fm(this.git3),this.gitInv4=this.gitInv4||fm(this.git4),this.gitInv5=this.gitInv5||fm(this.git5),this.gitInv6=this.gitInv6||fm(this.git6),this.gitInv7=this.gitInv7||fm(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.emUiFill=this.emUiFill||`white`,this.emUiStroke=this.emUiStroke||`#dbdada`,this.emProcessorFill=this.emProcessorFill||`#edb3f6`,this.emProcessorStroke=this.emProcessorStroke||`#b88cbf`,this.emReadModelFill=this.emReadModelFill||`#d3f1a2`,this.emReadModelStroke=this.emReadModelStroke||`#a3b732`,this.emCommandFill=this.emCommandFill||`#bcd6fe`,this.emCommandStroke=this.emCommandStroke||`#679ac3`,this.emEventFill=this.emEventFill||`#ffb778`,this.emEventStroke=this.emEventStroke||`#c19a0f`,this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||`rgb(250,250,250)`,this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||`rgb(240,240,240)`,this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||vv,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||yv,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Woe=W(e=>{let t=new Uoe;return t.calculate(e),t},`getThemeVariables`),Goe=class{static{W(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=um(this.primaryColor,16),this.tertiaryColor=K(this.primaryColor,{h:-160}),this.primaryBorderColor=fm(this.background),this.secondaryBorderColor=bv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=bv(this.tertiaryColor,this.darkMode),this.primaryTextColor=fm(this.primaryColor),this.secondaryTextColor=fm(this.secondaryColor),this.tertiaryTextColor=fm(this.tertiaryColor),this.lineColor=fm(this.background),this.textColor=fm(this.background),this.mainBkg=`#1f2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=um(fm(`#323D47`),10),this.lineColor=`calculated`,this.border1=`#ccc`,this.border2=om(255,255,255,.25),this.arrowheadColor=`calculated`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.labelBackground=`#181818`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`#F9FFFE`,this.edgeLabelBackground=`calculated`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`calculated`,this.actorLineColor=`calculated`,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`calculated`,this.activationBkgColor=`calculated`,this.sequenceNumberColor=`black`,this.clusterBkg=`#302F3D`,this.sectionBkgColor=dm(`#EAE8D9`,30),this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`#EAE8D9`,this.excludeBkgColor=dm(this.sectionBkgColor,10),this.taskBorderColor=om(255,255,255,70),this.taskBkgColor=`calculated`,this.taskTextColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=om(255,255,255,50),this.activeTaskBkgColor=`#81B1DB`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#E83737`,this.critBkgColor=`#E83737`,this.taskTextDarkColor=`calculated`,this.todayLineColor=`#DB5757`,this.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=this.rowOdd||um(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||dm(this.mainBkg,10),this.labelColor=`calculated`,this.errorBkgColor=`#a44141`,this.errorTextColor=`#ddd`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`}updateColors(){this.secondBkg=um(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=um(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=um(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=fm(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#555`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=`#f4f4f4`,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=K(this.primaryColor,{h:64}),this.fillType3=K(this.secondaryColor,{h:64}),this.fillType4=K(this.primaryColor,{h:-64}),this.fillType5=K(this.secondaryColor,{h:-64}),this.fillType6=K(this.primaryColor,{h:128}),this.fillType7=K(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||`#0b0000`,this.cScale2=this.cScale2||`#4d1037`,this.cScale3=this.cScale3||`#3f5258`,this.cScale4=this.cScale4||`#4f2f1b`,this.cScale5=this.cScale5||`#6e0a0a`,this.cScale6=this.cScale6||`#3b0048`,this.cScale7=this.cScale7||`#995a01`,this.cScale8=this.cScale8||`#154706`,this.cScale9=this.cScale9||`#161722`,this.cScale10=this.cScale10||`#00296f`,this.cScale11=this.cScale11||`#01629c`,this.cScale12=this.cScale12||`#010029`,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||K(this.primaryColor,{h:30}),this.cScale4=this.cScale4||K(this.primaryColor,{h:60}),this.cScale5=this.cScale5||K(this.primaryColor,{h:90}),this.cScale6=this.cScale6||K(this.primaryColor,{h:120}),this.cScale7=this.cScale7||K(this.primaryColor,{h:150}),this.cScale8=this.cScale8||K(this.primaryColor,{h:210}),this.cScale9=this.cScale9||K(this.primaryColor,{h:270}),this.cScale10=this.cScale10||K(this.primaryColor,{h:300}),this.cScale11=this.cScale11||K(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||fm(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScalePeer`+e]=this[`cScalePeer`+e]||um(this[`cScale`+e],10);for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||K(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||K(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?`black`:this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`pie`+e]=this[`cScale`+e];this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`;for(let e=0;e<8;e++)this[`venn`+(e+1)]=this[`venn`+(e+1)]??um(this[`cScale`+e],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||`#FF6B6B`,cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||`#1B5E20`,complicatedBg:this.cynefin?.complicatedBg||`#0D47A1`,chaoticBg:this.cynefin?.chaoticBg||`#BF360C`,clearBg:this.cynefin?.clearBg||`#F57F17`,confusionBg:this.cynefin?.confusionBg||`#4A148C`,textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||K(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||K(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||K(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||K(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||K(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||K(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||cm(this.quadrant1Fill)?um(this.quadrant1Fill):dm(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22`},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||`#ff6b6b`,this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?dm(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=um(this.secondaryColor,20),this.git1=um(this.pie2||this.secondaryColor,20),this.git2=um(this.pie3||this.tertiaryColor,20),this.git3=um(this.pie4||K(this.primaryColor,{h:-30}),20),this.git4=um(this.pie5||K(this.primaryColor,{h:-60}),20),this.git5=um(this.pie6||K(this.primaryColor,{h:-90}),10),this.git6=um(this.pie7||K(this.primaryColor,{h:60}),10),this.git7=um(this.pie8||K(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||fm(this.git0),this.gitInv1=this.gitInv1||fm(this.git1),this.gitInv2=this.gitInv2||fm(this.git2),this.gitInv3=this.gitInv3||fm(this.git3),this.gitInv4=this.gitInv4||fm(this.git4),this.gitInv5=this.gitInv5||fm(this.git5),this.gitInv6=this.gitInv6||fm(this.git6),this.gitInv7=this.gitInv7||fm(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||fm(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||fm(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.emUiFill=this.emUiFill||`#2d2d2d`,this.emUiStroke=this.emUiStroke||`#555`,this.emProcessorFill=this.emProcessorFill||um(`#5a3d5c`,10),this.emProcessorStroke=this.emProcessorStroke||`#8a6d8c`,this.emReadModelFill=this.emReadModelFill||um(`#3d5a2d`,10),this.emReadModelStroke=this.emReadModelStroke||`#6d8c5c`,this.emCommandFill=this.emCommandFill||um(`#2d3d5a`,10),this.emCommandStroke=this.emCommandStroke||`#5c6d8c`,this.emEventFill=this.emEventFill||um(`#5a452d`,10),this.emEventStroke=this.emEventStroke||`#8c755c`,this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||um(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||um(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||um(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||um(this.background,2),this.nodeBorder=this.nodeBorder||`#999`}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Koe=W(e=>{let t=new Goe;return t.calculate(e),t},`getThemeVariables`),qoe=class{static{W(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#ECECFF`,this.secondaryColor=K(this.primaryColor,{h:120}),this.secondaryColor=`#ffffde`,this.tertiaryColor=K(this.primaryColor,{h:-160}),this.primaryBorderColor=bv(this.primaryColor,this.darkMode),this.secondaryBorderColor=bv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=bv(this.tertiaryColor,this.darkMode),this.primaryTextColor=fm(this.primaryColor),this.secondaryTextColor=fm(this.secondaryColor),this.tertiaryTextColor=fm(this.tertiaryColor),this.lineColor=fm(this.background),this.textColor=fm(this.background),this.background=`white`,this.mainBkg=`#ECECFF`,this.secondBkg=`#ffffde`,this.lineColor=`#333333`,this.border1=`#9370DB`,this.primaryBorderColor=bv(this.primaryColor,this.darkMode),this.border2=`#aaaa33`,this.arrowheadColor=`#333333`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.labelBackground=`rgba(232,232,232, 0.8)`,this.textColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`calculated`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.clusterBkg=`#FBFBFF`,this.sectionBkgColor=`calculated`,this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`calculated`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=`calculated`,this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor=`calculated`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`calculated`,this.critBorderColor=`calculated`,this.critBkgColor=`calculated`,this.todayLineColor=`calculated`,this.vertLineColor=`calculated`,this.sectionBkgColor=om(102,102,255,.49),this.altSectionBkgColor=`white`,this.sectionBkgColor2=`#fff400`,this.taskBorderColor=`#534fbc`,this.taskBkgColor=`#8a90dd`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`black`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`#534fbc`,this.activeTaskBkgColor=`#bfc7ff`,this.gridColor=`lightgrey`,this.doneTaskBkgColor=`lightgrey`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#ff8888`,this.critBkgColor=`red`,this.todayLineColor=`red`,this.vertLineColor=`navy`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=`calculated`,this.rowEven=`calculated`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))`,this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||K(this.primaryColor,{h:30}),this.cScale4=this.cScale4||K(this.primaryColor,{h:60}),this.cScale5=this.cScale5||K(this.primaryColor,{h:90}),this.cScale6=this.cScale6||K(this.primaryColor,{h:120}),this.cScale7=this.cScale7||K(this.primaryColor,{h:150}),this.cScale8=this.cScale8||K(this.primaryColor,{h:210}),this.cScale9=this.cScale9||K(this.primaryColor,{h:270}),this.cScale10=this.cScale10||K(this.primaryColor,{h:300}),this.cScale11=this.cScale11||K(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||dm(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||dm(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=dm(this[`cScale`+e],10),this[`cScalePeer`+e]=this[`cScalePeer`+e]||dm(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||K(this[`cScale`+e],{h:180});for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||K(this.mainBkg,{h:30,l:-(5+e*5)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||K(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!==`calculated`&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!==`calculated`){this.cScaleLabel0=this.cScaleLabel0||fm(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||fm(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||um(this.primaryColor,75)||`#ffffff`,this.rowEven=this.rowEven||um(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=K(this.primaryColor,{h:64}),this.fillType3=K(this.secondaryColor,{h:64}),this.fillType4=K(this.primaryColor,{h:-64}),this.fillType5=K(this.secondaryColor,{h:-64}),this.fillType6=K(this.primaryColor,{h:128}),this.fillType7=K(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||K(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||K(this.primaryColor,{l:-10}),this.pie5=this.pie5||K(this.secondaryColor,{l:-30}),this.pie6=this.pie6||K(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||K(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||K(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||K(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||K(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||K(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||K(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.venn1=this.venn1??K(this.primaryColor,{l:-30}),this.venn2=this.venn2??K(this.secondaryColor,{l:-30}),this.venn3=this.venn3??K(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??K(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??K(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??K(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??K(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??K(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||`#8B0000`,cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||`#E8F5E9`,complicatedBg:this.cynefin?.complicatedBg||`#E3F2FD`,chaoticBg:this.cynefin?.chaoticBg||`#FBE9E7`,clearBg:this.cynefin?.clearBg||`#FFF8E1`,confusionBg:this.cynefin?.confusionBg||`#F3E5F5`,textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||K(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||K(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||K(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||K(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||K(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||K(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||cm(this.quadrant1Fill)?um(this.quadrant1Fill):dm(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||`#dc3545`,this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||K(this.primaryColor,{h:-30}),this.git4=this.git4||K(this.primaryColor,{h:-60}),this.git5=this.git5||K(this.primaryColor,{h:-90}),this.git6=this.git6||K(this.primaryColor,{h:60}),this.git7=this.git7||K(this.primaryColor,{h:120}),this.darkMode?(this.git0=um(this.git0,25),this.git1=um(this.git1,25),this.git2=um(this.git2,25),this.git3=um(this.git3,25),this.git4=um(this.git4,25),this.git5=um(this.git5,25),this.git6=um(this.git6,25),this.git7=um(this.git7,25)):(this.git0=dm(this.git0,25),this.git1=dm(this.git1,25),this.git2=dm(this.git2,25),this.git3=dm(this.git3,25),this.git4=dm(this.git4,25),this.git5=dm(this.git5,25),this.git6=dm(this.git6,25),this.git7=dm(this.git7,25)),this.gitInv0=this.gitInv0||dm(fm(this.git0),25),this.gitInv1=this.gitInv1||fm(this.git1),this.gitInv2=this.gitInv2||fm(this.git2),this.gitInv3=this.gitInv3||fm(this.git3),this.gitInv4=this.gitInv4||fm(this.git4),this.gitInv5=this.gitInv5||fm(this.git5),this.gitInv6=this.gitInv6||fm(this.git6),this.gitInv7=this.gitInv7||fm(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||fm(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||fm(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.emUiFill=this.emUiFill||`white`,this.emUiStroke=this.emUiStroke||`#dbdada`,this.emProcessorFill=this.emProcessorFill||`#edb3f6`,this.emProcessorStroke=this.emProcessorStroke||`#b88cbf`,this.emReadModelFill=this.emReadModelFill||`#d3f1a2`,this.emReadModelStroke=this.emReadModelStroke||`#a3b732`,this.emCommandFill=this.emCommandFill||`#bcd6fe`,this.emCommandStroke=this.emCommandStroke||`#679ac3`,this.emEventFill=this.emEventFill||`#ffb778`,this.emEventStroke=this.emEventStroke||`#c19a0f`,this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||`rgb(250,250,250)`,this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||`rgb(240,240,240)`,this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||vv,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||yv}calculate(e){if(Object.keys(this).forEach(e=>{this[e]===`calculated`&&(this[e]=void 0)}),typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},xv=W(e=>{let t=new qoe;return t.calculate(e),t},`getThemeVariables`),Joe=class{static{W(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#cde498`,this.secondaryColor=`#cdffb2`,this.background=`white`,this.mainBkg=`#cde498`,this.secondBkg=`#cdffb2`,this.lineColor=`green`,this.border1=`#13540c`,this.border2=`#6eaa49`,this.arrowheadColor=`green`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.tertiaryColor=um(`#cde498`,10),this.primaryBorderColor=bv(this.primaryColor,this.darkMode),this.secondaryBorderColor=bv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=bv(this.tertiaryColor,this.darkMode),this.primaryTextColor=fm(this.primaryColor),this.secondaryTextColor=fm(this.secondaryColor),this.tertiaryTextColor=fm(this.primaryColor),this.lineColor=fm(this.background),this.textColor=fm(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`#333`,this.edgeLabelBackground=`#e8e8e8`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`#333`,this.signalTextColor=`#333`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`#326932`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`#6eaa49`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`#6eaa49`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`#487e3a`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`black`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`lightgrey`,this.doneTaskBkgColor=`lightgrey`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#ff8888`,this.critBkgColor=`red`,this.todayLineColor=`red`,this.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))`}updateColors(){this.actorBorder=dm(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||K(this.primaryColor,{h:30}),this.cScale4=this.cScale4||K(this.primaryColor,{h:60}),this.cScale5=this.cScale5||K(this.primaryColor,{h:90}),this.cScale6=this.cScale6||K(this.primaryColor,{h:120}),this.cScale7=this.cScale7||K(this.primaryColor,{h:150}),this.cScale8=this.cScale8||K(this.primaryColor,{h:210}),this.cScale9=this.cScale9||K(this.primaryColor,{h:270}),this.cScale10=this.cScale10||K(this.primaryColor,{h:300}),this.cScale11=this.cScale11||K(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||dm(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||dm(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=dm(this[`cScale`+e],10),this[`cScalePeer`+e]=this[`cScalePeer`+e]||dm(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||K(this[`cScale`+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!==`calculated`&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||K(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||K(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||um(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||um(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=K(this.primaryColor,{h:64}),this.fillType3=K(this.secondaryColor,{h:64}),this.fillType4=K(this.primaryColor,{h:-64}),this.fillType5=K(this.secondaryColor,{h:-64}),this.fillType6=K(this.primaryColor,{h:128}),this.fillType7=K(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||K(this.primaryColor,{l:-30}),this.pie5=this.pie5||K(this.secondaryColor,{l:-30}),this.pie6=this.pie6||K(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||K(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||K(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||K(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||K(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||K(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||K(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.venn1=this.venn1??K(this.primaryColor,{l:-30}),this.venn2=this.venn2??K(this.secondaryColor,{l:-30}),this.venn3=this.venn3??K(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??K(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??K(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??K(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??K(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??K(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||`#8B4513`,cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||`#C8E6C9`,complicatedBg:this.cynefin?.complicatedBg||`#DCEDC8`,chaoticBg:this.cynefin?.chaoticBg||`#FFE0B2`,clearBg:this.cynefin?.clearBg||`#FFF9C4`,confusionBg:this.cynefin?.confusionBg||`#D7CCC8`,textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||K(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||K(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||K(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||K(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||K(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||K(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||cm(this.quadrant1Fill)?um(this.quadrant1Fill):dm(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||`#dc3545`,this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||K(this.primaryColor,{h:-30}),this.git4=this.git4||K(this.primaryColor,{h:-60}),this.git5=this.git5||K(this.primaryColor,{h:-90}),this.git6=this.git6||K(this.primaryColor,{h:60}),this.git7=this.git7||K(this.primaryColor,{h:120}),this.darkMode?(this.git0=um(this.git0,25),this.git1=um(this.git1,25),this.git2=um(this.git2,25),this.git3=um(this.git3,25),this.git4=um(this.git4,25),this.git5=um(this.git5,25),this.git6=um(this.git6,25),this.git7=um(this.git7,25)):(this.git0=dm(this.git0,25),this.git1=dm(this.git1,25),this.git2=dm(this.git2,25),this.git3=dm(this.git3,25),this.git4=dm(this.git4,25),this.git5=dm(this.git5,25),this.git6=dm(this.git6,25),this.git7=dm(this.git7,25)),this.gitInv0=this.gitInv0||fm(this.git0),this.gitInv1=this.gitInv1||fm(this.git1),this.gitInv2=this.gitInv2||fm(this.git2),this.gitInv3=this.gitInv3||fm(this.git3),this.gitInv4=this.gitInv4||fm(this.git4),this.gitInv5=this.gitInv5||fm(this.git5),this.gitInv6=this.gitInv6||fm(this.git6),this.gitInv7=this.gitInv7||fm(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||fm(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||fm(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.emUiFill=this.emUiFill||`white`,this.emUiStroke=this.emUiStroke||`#dbdada`,this.emProcessorFill=this.emProcessorFill||`#edb3f6`,this.emProcessorStroke=this.emProcessorStroke||`#b88cbf`,this.emReadModelFill=this.emReadModelFill||`#d3f1a2`,this.emReadModelStroke=this.emReadModelStroke||`#a3b732`,this.emCommandFill=this.emCommandFill||`#bcd6fe`,this.emCommandStroke=this.emCommandStroke||`#679ac3`,this.emEventFill=this.emEventFill||`#ffb778`,this.emEventStroke=this.emEventStroke||`#c19a0f`,this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||`rgb(250,250,250)`,this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||`rgb(240,240,240)`,this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||vv,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||yv}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Yoe=W(e=>{let t=new Joe;return t.calculate(e),t},`getThemeVariables`),Xoe=class{static{W(this,`Theme`)}constructor(){this.primaryColor=`#eee`,this.contrast=`#707070`,this.secondaryColor=um(this.contrast,55),this.background=`#ffffff`,this.tertiaryColor=K(this.primaryColor,{h:-160}),this.primaryBorderColor=bv(this.primaryColor,this.darkMode),this.secondaryBorderColor=bv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=bv(this.tertiaryColor,this.darkMode),this.primaryTextColor=fm(this.primaryColor),this.secondaryTextColor=fm(this.secondaryColor),this.tertiaryTextColor=fm(this.tertiaryColor),this.lineColor=fm(this.background),this.textColor=fm(this.background),this.mainBkg=`#eee`,this.secondBkg=`calculated`,this.lineColor=`#666`,this.border1=`#999`,this.border2=`calculated`,this.note=`#ffa`,this.text=`#333`,this.critical=`#d42`,this.done=`#bbb`,this.arrowheadColor=`#333333`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`white`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`calculated`,this.actorLineColor=this.actorBorder,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`calculated`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`calculated`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`calculated`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`calculated`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`calculated`,this.critBkgColor=`calculated`,this.critBorderColor=`calculated`,this.todayLineColor=`calculated`,this.vertLineColor=`calculated`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.rowOdd=this.rowOdd||um(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||`#f4f4f4`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){this.secondBkg=um(this.contrast,55),this.border2=this.contrast,this.actorBorder=um(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor=`#999`,this.noteBkgColor=`#666`,this.noteTextColor=`#fff`,this.cScale0=this.cScale0||`#555`,this.cScale1=this.cScale1||`#F4F4F4`,this.cScale2=this.cScale2||`#555`,this.cScale3=this.cScale3||`#BBB`,this.cScale4=this.cScale4||`#777`,this.cScale5=this.cScale5||`#999`,this.cScale6=this.cScale6||`#DDD`,this.cScale7=this.cScale7||`#FFF`,this.cScale8=this.cScale8||`#DDD`,this.cScale9=this.cScale9||`#BBB`,this.cScale10=this.cScale10||`#999`,this.cScale11=this.cScale11||`#777`;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||fm(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||um(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||dm(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?`black`:this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||K(this.mainBkg,{l:-(5+e*5)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||K(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=um(this.contrast,30),this.sectionBkgColor2=um(this.contrast,30),this.taskBorderColor=dm(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=um(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=dm(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||`#000`,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f4f4f4`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||`#000`,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=`#222`,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=K(this.primaryColor,{h:64}),this.fillType3=K(this.secondaryColor,{h:64}),this.fillType4=K(this.primaryColor,{h:-64}),this.fillType5=K(this.secondaryColor,{h:-64}),this.fillType6=K(this.primaryColor,{h:128}),this.fillType7=K(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`pie`+e]=this[`cScale`+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`;for(let e=0;e<8;e++)this[`venn`+(e+1)]=this[`venn`+(e+1)]??this[`cScale`+e];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||`#8B0000`,cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||`#E8F5E9`,complicatedBg:this.cynefin?.complicatedBg||`#E3F2FD`,chaoticBg:this.cynefin?.chaoticBg||`#FBE9E7`,clearBg:this.cynefin?.clearBg||`#FFF8E1`,confusionBg:this.cynefin?.confusionBg||`#F3E5F5`,textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||K(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||K(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||K(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||K(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||K(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||K(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||cm(this.quadrant1Fill)?um(this.quadrant1Fill):dm(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0`},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||`#dc3545`,this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=dm(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||K(this.primaryColor,{h:-30}),this.git4=this.pie5||K(this.primaryColor,{h:-60}),this.git5=this.pie6||K(this.primaryColor,{h:-90}),this.git6=this.pie7||K(this.primaryColor,{h:60}),this.git7=this.pie8||K(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||fm(this.git0),this.gitInv1=this.gitInv1||fm(this.git1),this.gitInv2=this.gitInv2||fm(this.git2),this.gitInv3=this.gitInv3||fm(this.git3),this.gitInv4=this.gitInv4||fm(this.git4),this.gitInv5=this.gitInv5||fm(this.git5),this.gitInv6=this.gitInv6||fm(this.git6),this.gitInv7=this.gitInv7||fm(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1=`white`,this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3=`white`,this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.emUiFill=this.emUiFill||`white`,this.emUiStroke=this.emUiStroke||`#dbdada`,this.emProcessorFill=this.emProcessorFill||`#edb3f6`,this.emProcessorStroke=this.emProcessorStroke||`#b88cbf`,this.emReadModelFill=this.emReadModelFill||`#d3f1a2`,this.emReadModelStroke=this.emReadModelStroke||`#a3b732`,this.emCommandFill=this.emCommandFill||`#bcd6fe`,this.emCommandStroke=this.emCommandStroke||`#679ac3`,this.emEventFill=this.emEventFill||`#ffb778`,this.emEventStroke=this.emEventStroke||`#c19a0f`,this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||`rgb(250,250,250)`,this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||`rgb(240,240,240)`,this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||vv,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||yv}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Zoe=W(e=>{let t=new Xoe;return t.calculate(e),t},`getThemeVariables`),Qoe=class{static{W(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=bv(this.primaryColor,this.darkMode),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#000000`,this.stateBorder=`#000000`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));`,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||K(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||K(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||bv(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||bv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||bv(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||bv(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||fm(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||fm(this.tertiaryColor),this.lineColor=this.lineColor||fm(this.background),this.arrowheadColor=this.arrowheadColor||fm(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?dm(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||dm(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||fm(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=K(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||um(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||n,this.cScale3=this.cScale3||K(e,{h:30}),this.cScale4=this.cScale4||K(e,{h:60}),this.cScale5=this.cScale5||K(e,{h:90}),this.cScale6=this.cScale6||K(e,{h:120}),this.cScale7=this.cScale7||K(e,{h:150}),this.cScale8=this.cScale8||K(e,{h:210,l:150}),this.cScale9=this.cScale9||K(e,{h:270}),this.cScale10=this.cScale10||K(e,{h:300}),this.cScale11=this.cScale11||K(e,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=dm(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=dm(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||fm(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||um(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||dm(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||K(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||K(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||K(e,{h:64}),this.fillType3=this.fillType3||K(t,{h:64}),this.fillType4=this.fillType4||K(e,{h:-64}),this.fillType5=this.fillType5||K(t,{h:-64}),this.fillType6=this.fillType6||K(e,{h:128}),this.fillType7=this.fillType7||K(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||n,this.pie4=this.pie4||K(e,{l:-10}),this.pie5=this.pie5||K(t,{l:-10}),this.pie6=this.pie6||K(n,{l:-10}),this.pie7=this.pie7||K(e,{h:60,l:-10}),this.pie8=this.pie8||K(e,{h:-60,l:-10}),this.pie9=this.pie9||K(e,{h:120,l:0}),this.pie10=this.pie10||K(e,{h:60,l:-20}),this.pie11=this.pie11||K(e,{h:-60,l:-20}),this.pie12=this.pie12||K(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||K(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||K(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||K(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||K(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||K(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||K(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||cm(this.quadrant1Fill)?um(this.quadrant1Fill):dm(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?dm(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||n,this.git3=this.git3||K(e,{h:-30}),this.git4=this.git4||K(e,{h:-60}),this.git5=this.git5||K(e,{h:-90}),this.git6=this.git6||K(e,{h:60}),this.git7=this.git7||K(e,{h:120}),this.darkMode?(this.git0=um(this.git0,25),this.git1=um(this.git1,25),this.git2=um(this.git2,25),this.git3=um(this.git3,25),this.git4=um(this.git4,25),this.git5=um(this.git5,25),this.git6=um(this.git6,25),this.git7=um(this.git7,25)):(this.git0=dm(this.git0,25),this.git1=dm(this.git1,25),this.git2=dm(this.git2,25),this.git3=dm(this.git3,25),this.git4=dm(this.git4,25),this.git5=dm(this.git5,25),this.git6=dm(this.git6,25),this.git7=dm(this.git7,25)),this.gitInv0=this.gitInv0||fm(this.git0),this.gitInv1=this.gitInv1||fm(this.git1),this.gitInv2=this.gitInv2||fm(this.git2),this.gitInv3=this.gitInv3||fm(this.git3),this.gitInv4=this.gitInv4||fm(this.git4),this.gitInv5=this.gitInv5||fm(this.git5),this.gitInv6=this.gitInv6||fm(this.git6),this.gitInv7=this.gitInv7||fm(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||vv,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||yv}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},$oe=W(e=>{let t=new Qoe;return t.calculate(e),t},`getThemeVariables`),ese=class{static{W(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=um(this.primaryColor,16),this.tertiaryColor=K(this.primaryColor,{h:-160}),this.primaryBorderColor=fm(this.background),this.secondaryBorderColor=bv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=bv(this.tertiaryColor,this.darkMode),this.primaryTextColor=fm(this.primaryColor),this.secondaryTextColor=fm(this.secondaryColor),this.tertiaryTextColor=fm(this.tertiaryColor),this.mainBkg=`#2a2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=um(fm(`#323D47`),10),this.border1=`#ccc`,this.border2=om(255,255,255,.25),this.arrowheadColor=fm(this.background),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#181818`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||K(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||K(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||bv(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||bv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||bv(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||bv(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||fm(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||fm(this.tertiaryColor),this.lineColor=this.lineColor||fm(this.background),this.arrowheadColor=this.arrowheadColor||fm(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?dm(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||dm(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||fm(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||um(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||K(this.primaryColor,{h:30}),this.cScale4=this.cScale4||K(this.primaryColor,{h:60}),this.cScale5=this.cScale5||K(this.primaryColor,{h:90}),this.cScale6=this.cScale6||K(this.primaryColor,{h:120}),this.cScale7=this.cScale7||K(this.primaryColor,{h:150}),this.cScale8=this.cScale8||K(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||K(this.primaryColor,{h:270}),this.cScale10=this.cScale10||K(this.primaryColor,{h:300}),this.cScale11=this.cScale11||K(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=dm(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=dm(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||fm(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||um(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||dm(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||K(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||K(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||K(this.primaryColor,{h:64}),this.fillType3=this.fillType3||K(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||K(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||K(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||K(this.primaryColor,{h:128}),this.fillType7=this.fillType7||K(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||K(this.primaryColor,{l:-10}),this.pie5=this.pie5||K(this.secondaryColor,{l:-10}),this.pie6=this.pie6||K(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||K(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||K(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||K(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||K(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||K(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||K(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||K(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||K(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||K(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||K(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||K(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||K(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||cm(this.quadrant1Fill)?um(this.quadrant1Fill):dm(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?dm(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||`#0b0000`,this.git1=this.git1||`#4d1037`,this.git2=this.git2||`#3f5258`,this.git3=this.git3||`#4f2f1b`,this.git4=this.git4||`#6e0a0a`,this.git5=this.git5||`#3b0048`,this.git6=this.git6||`#995a01`,this.git7=this.git7||`#154706`,this.gitDarkMode=!0,this.gitDarkMode?(this.git0=um(this.git0,25),this.git1=um(this.git1,25),this.git2=um(this.git2,25),this.git3=um(this.git3,25),this.git4=um(this.git4,25),this.git5=um(this.git5,25),this.git6=um(this.git6,25),this.git7=um(this.git7,25)):(this.git0=dm(this.git0,25),this.git1=dm(this.git1,25),this.git2=dm(this.git2,25),this.git3=dm(this.git3,25),this.git4=dm(this.git4,25),this.git5=dm(this.git5,25),this.git6=dm(this.git6,25),this.git7=dm(this.git7,25)),this.gitInv0=this.gitInv0||fm(this.git0),this.gitInv1=this.gitInv1||fm(this.git1),this.gitInv2=this.gitInv2||fm(this.git2),this.gitInv3=this.gitInv3||fm(this.git3),this.gitInv4=this.gitInv4||fm(this.git4),this.gitInv5=this.gitInv5||fm(this.git5),this.gitInv6=this.gitInv6||fm(this.git6),this.gitInv7=this.gitInv7||fm(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||vv,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||yv}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},tse=W(e=>{let t=new ese;return t.calculate(e),t},`getThemeVariables`),nse=class{static{W(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=bv(`#28253D`,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.clusterBkg=`#F9F9FB`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.filterColor=`#000000`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||K(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||K(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||bv(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||bv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||bv(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||bv(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#FEF9C3`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||fm(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||fm(this.tertiaryColor),this.lineColor=this.lineColor||fm(this.background),this.arrowheadColor=this.arrowheadColor||fm(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?dm(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||dm(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||fm(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=K(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||um(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground=`#F9F9FB`,this.altBackground=`#F9F9FB`,this.stateEdgeLabelBackground=`#FFFFFF`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=this.mainBkg;if(this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=dm(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=dm(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||fm(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||um(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||dm(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||K(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||K(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||K(e,{h:64}),this.fillType3=this.fillType3||K(t,{h:64}),this.fillType4=this.fillType4||K(e,{h:-64}),this.fillType5=this.fillType5||K(t,{h:-64}),this.fillType6=this.fillType6||K(e,{h:128}),this.fillType7=this.fillType7||K(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||n,this.pie4=this.pie4||K(e,{l:-10}),this.pie5=this.pie5||K(t,{l:-10}),this.pie6=this.pie6||K(n,{l:-10}),this.pie7=this.pie7||K(e,{h:60,l:-10}),this.pie8=this.pie8||K(e,{h:-60,l:-10}),this.pie9=this.pie9||K(e,{h:120,l:0}),this.pie10=this.pie10||K(e,{h:60,l:-20}),this.pie11=this.pie11||K(e,{h:-60,l:-20}),this.pie12=this.pie12||K(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||K(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||K(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||K(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||K(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||K(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||K(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||cm(this.quadrant1Fill)?um(this.quadrant1Fill):dm(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?dm(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground=`#FFFFFF`,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||n,this.git3=this.git3||K(e,{h:-30}),this.git4=this.git4||K(e,{h:-60}),this.git5=this.git5||K(e,{h:-90}),this.git6=this.git6||K(e,{h:60}),this.git7=this.git7||K(e,{h:120}),this.darkMode?(this.git0=um(this.git0,25),this.git1=um(this.git1,25),this.git2=um(this.git2,25),this.git3=um(this.git3,25),this.git4=um(this.git4,25),this.git5=um(this.git5,25),this.git6=um(this.git6,25),this.git7=um(this.git7,25)):(this.git0=dm(this.git0,25),this.git1=dm(this.git1,25),this.git2=dm(this.git2,25),this.git3=dm(this.git3,25),this.git4=dm(this.git4,25),this.git5=dm(this.git5,25),this.git6=dm(this.git6,25),this.git7=dm(this.git7,25)),this.gitInv0=this.gitInv0||fm(this.git0),this.gitInv1=this.gitInv1||fm(this.git1),this.gitInv2=this.gitInv2||fm(this.git2),this.gitInv3=this.gitInv3||fm(this.git3),this.gitInv4=this.gitInv4||fm(this.git4),this.gitInv5=this.gitInv5||fm(this.git5),this.gitInv6=this.gitInv6||fm(this.git6),this.gitInv7=this.gitInv7||fm(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.commitLineColor=this.commitLineColor??`#BDBCCC`,this.erEdgeLabelBackground=`#FFFFFF`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||vv,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||yv}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},rse=W(e=>{let t=new nse;return t.calculate(e),t},`getThemeVariables`),ise=class{static{W(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=um(this.primaryColor,16),this.tertiaryColor=K(this.primaryColor,{h:-160}),this.primaryBorderColor=fm(this.background),this.secondaryBorderColor=bv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=bv(this.tertiaryColor,this.darkMode),this.primaryTextColor=fm(this.primaryColor),this.secondaryTextColor=fm(this.secondaryColor),this.tertiaryTextColor=fm(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=um(fm(`#323D47`),10),this.border1=`#ccc`,this.border2=om(255,255,255,.25),this.arrowheadColor=fm(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.filterColor=`#FFFFFF`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||K(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||K(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||bv(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||bv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||bv(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||bv(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||fm(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||fm(this.tertiaryColor),this.lineColor=this.lineColor||fm(this.background),this.arrowheadColor=this.arrowheadColor||fm(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?dm(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||dm(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||fm(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||um(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground=`#16141F`,this.altBackground=`#16141F`,this.compositeTitleBackground=`#16141F`,this.stateEdgeLabelBackground=`#16141F`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||K(this.primaryColor,{h:30}),this.cScale4=this.cScale4||K(this.primaryColor,{h:60}),this.cScale5=this.cScale5||K(this.primaryColor,{h:90}),this.cScale6=this.cScale6||K(this.primaryColor,{h:120}),this.cScale7=this.cScale7||K(this.primaryColor,{h:150}),this.cScale8=this.cScale8||K(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||K(this.primaryColor,{h:270}),this.cScale10=this.cScale10||K(this.primaryColor,{h:300}),this.cScale11=this.cScale11||K(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=dm(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=dm(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||fm(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||um(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||dm(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||K(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||K(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||K(this.primaryColor,{h:64}),this.fillType3=this.fillType3||K(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||K(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||K(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||K(this.primaryColor,{h:128}),this.fillType7=this.fillType7||K(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||K(this.primaryColor,{l:-10}),this.pie5=this.pie5||K(this.secondaryColor,{l:-10}),this.pie6=this.pie6||K(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||K(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||K(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||K(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||K(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||K(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||K(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||K(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||K(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||K(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||K(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||K(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||K(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||cm(this.quadrant1Fill)?um(this.quadrant1Fill):dm(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?dm(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground=`#16141F`,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||K(this.primaryColor,{h:-30}),this.git4=this.git4||K(this.primaryColor,{h:-60}),this.git5=this.git5||K(this.primaryColor,{h:-90}),this.git6=this.git6||K(this.primaryColor,{h:60}),this.git7=this.git7||K(this.primaryColor,{h:120}),this.darkMode?(this.git0=um(this.git0,25),this.git1=um(this.git1,25),this.git2=um(this.git2,25),this.git3=um(this.git3,25),this.git4=um(this.git4,25),this.git5=um(this.git5,25),this.git6=um(this.git6,25),this.git7=um(this.git7,25)):(this.git0=dm(this.git0,25),this.git1=dm(this.git1,25),this.git2=dm(this.git2,25),this.git3=dm(this.git3,25),this.git4=dm(this.git4,25),this.git5=dm(this.git5,25),this.git6=dm(this.git6,25),this.git7=dm(this.git7,25)),this.gitInv0=this.gitInv0||fm(this.git0),this.gitInv1=this.gitInv1||fm(this.git1),this.gitInv2=this.gitInv2||fm(this.git2),this.gitInv3=this.gitInv3||fm(this.git3),this.gitInv4=this.gitInv4||fm(this.git4),this.gitInv5=this.gitInv5||fm(this.git5),this.gitInv6=this.gitInv6||fm(this.git6),this.gitInv7=this.gitInv7||fm(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.commitLineColor=this.commitLineColor??`#BDBCCC`,this.erEdgeLabelBackground=`#16141F`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||vv,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||yv}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},ase=W(e=>{let t=new ise;return t.calculate(e),t},`getThemeVariables`),ose=class{static{W(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=bv(this.primaryColor,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[`#FDF4FF`,`#F0FDFA`,`#FFF7ED`,`#ECFEFF`,`#F0FDF4`,`#F5F3FF`,`#FEF2F2`,`#FEFCE8`,`#EEF2FF`,`#F7FEE7`,`#F0F9FF`,`#FFF1F2`],this.filterColor=`#000000`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||K(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||K(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||bv(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||bv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||bv(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||bv(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||fm(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||fm(this.tertiaryColor),this.lineColor=this.lineColor||fm(this.background),this.arrowheadColor=this.arrowheadColor||fm(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?dm(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||dm(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||fm(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=K(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||um(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||fm(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||um(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||dm(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||K(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||K(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||K(e,{h:64}),this.fillType3=this.fillType3||K(t,{h:64}),this.fillType4=this.fillType4||K(e,{h:-64}),this.fillType5=this.fillType5||K(t,{h:-64}),this.fillType6=this.fillType6||K(e,{h:128}),this.fillType7=this.fillType7||K(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||n,this.pie4=this.pie4||K(e,{l:-10}),this.pie5=this.pie5||K(t,{l:-10}),this.pie6=this.pie6||K(n,{l:-10}),this.pie7=this.pie7||K(e,{h:60,l:-10}),this.pie8=this.pie8||K(e,{h:-60,l:-10}),this.pie9=this.pie9||K(e,{h:120,l:0}),this.pie10=this.pie10||K(e,{h:60,l:-20}),this.pie11=this.pie11||K(e,{h:-60,l:-20}),this.pie12=this.pie12||K(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||K(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||K(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||K(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||K(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||K(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||K(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||cm(this.quadrant1Fill)?um(this.quadrant1Fill):dm(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?dm(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||n,this.git3=this.git3||K(e,{h:-30}),this.git4=this.git4||K(e,{h:-60}),this.git5=this.git5||K(e,{h:-90}),this.git6=this.git6||K(e,{h:60}),this.git7=this.git7||K(e,{h:120}),this.darkMode?(this.git0=um(this.git0,25),this.git1=um(this.git1,25),this.git2=um(this.git2,25),this.git3=um(this.git3,25),this.git4=um(this.git4,25),this.git5=um(this.git5,25),this.git6=um(this.git6,25),this.git7=um(this.git7,25)):(this.git0=dm(this.git0,25),this.git1=dm(this.git1,25),this.git2=dm(this.git2,25),this.git3=dm(this.git3,25),this.git4=dm(this.git4,25),this.git5=dm(this.git5,25),this.git6=dm(this.git6,25),this.git7=dm(this.git7,25)),this.gitInv0=this.gitInv0||fm(this.git0),this.gitInv1=this.gitInv1||fm(this.git1),this.gitInv2=this.gitInv2||fm(this.git2),this.gitInv3=this.gitInv3||fm(this.git3),this.gitInv4=this.gitInv4||fm(this.git4),this.gitInv5=this.gitInv5||fm(this.git5),this.gitInv6=this.gitInv6||fm(this.git6),this.gitInv7=this.gitInv7||fm(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??`#BDBCCC`,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.fontWeight=600,this.erEdgeLabelBackground=`#FFFFFF`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||vv,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||yv}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},sse=W(e=>{let t=new ose;return t.calculate(e),t},`getThemeVariables`),cse=class{static{W(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=um(this.primaryColor,16),this.tertiaryColor=K(this.primaryColor,{h:-160}),this.primaryBorderColor=fm(this.background),this.secondaryBorderColor=bv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=bv(this.tertiaryColor,this.darkMode),this.primaryTextColor=fm(this.primaryColor),this.secondaryTextColor=fm(this.secondaryColor),this.tertiaryTextColor=fm(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=um(fm(`#323D47`),10),this.border1=`#ccc`,this.border2=om(255,255,255,.25),this.arrowheadColor=fm(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[],this.filterColor=`#FFFFFF`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||K(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||K(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||bv(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||bv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||bv(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||bv(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||fm(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||fm(this.tertiaryColor),this.lineColor=this.lineColor||fm(this.background),this.arrowheadColor=this.arrowheadColor||fm(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?dm(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||dm(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||fm(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor=`#FFFFFF`,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||um(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||fm(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||um(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||dm(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=dm(this[`cScale`+e],75);let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||K(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||K(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||K(this.primaryColor,{h:64}),this.fillType3=this.fillType3||K(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||K(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||K(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||K(this.primaryColor,{h:128}),this.fillType7=this.fillType7||K(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||K(this.primaryColor,{l:-10}),this.pie5=this.pie5||K(this.secondaryColor,{l:-10}),this.pie6=this.pie6||K(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||K(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||K(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||K(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||K(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||K(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||K(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||K(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||K(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||K(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||K(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||K(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||K(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||cm(this.quadrant1Fill)?um(this.quadrant1Fill):dm(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?dm(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||K(this.primaryColor,{h:-30}),this.git4=this.git4||K(this.primaryColor,{h:-60}),this.git5=this.git5||K(this.primaryColor,{h:-90}),this.git6=this.git6||K(this.primaryColor,{h:60}),this.git7=this.git7||K(this.primaryColor,{h:120}),this.darkMode?(this.git0=um(this.git0,25),this.git1=um(this.git1,25),this.git2=um(this.git2,25),this.git3=um(this.git3,25),this.git4=um(this.git4,25),this.git5=um(this.git5,25),this.git6=um(this.git6,25),this.git7=um(this.git7,25)):(this.git0=dm(this.git0,25),this.git1=dm(this.git1,25),this.git2=dm(this.git2,25),this.git3=dm(this.git3,25),this.git4=dm(this.git4,25),this.git5=dm(this.git5,25),this.git6=dm(this.git6,25),this.git7=dm(this.git7,25)),this.gitInv0=this.gitInv0||fm(this.git0),this.gitInv1=this.gitInv1||fm(this.git1),this.gitInv2=this.gitInv2||fm(this.git2),this.gitInv3=this.gitInv3||fm(this.git3),this.gitInv4=this.gitInv4||fm(this.git4),this.gitInv5=this.gitInv5||fm(this.git5),this.gitInv6=this.gitInv6||fm(this.git6),this.gitInv7=this.gitInv7||fm(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.commitLineColor=this.commitLineColor??`#BDBCCC`,this.fontWeight=600,this.erEdgeLabelBackground=`#16141F`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||vv,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||yv}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Sv={base:{getThemeVariables:Woe},dark:{getThemeVariables:Koe},default:{getThemeVariables:xv},forest:{getThemeVariables:Yoe},neutral:{getThemeVariables:Zoe},neo:{getThemeVariables:$oe},"neo-dark":{getThemeVariables:tse},redux:{getThemeVariables:rse},"redux-dark":{getThemeVariables:ase},"redux-color":{getThemeVariables:sse},"redux-dark-color":{getThemeVariables:W(e=>{let t=new cse;return t.calculate(e),t},`getThemeVariables`)}},Cv={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:`basis`,padding:15,defaultRenderer:`dagre-wrapper`,wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:`arc`,ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:`"Open Sans", sans-serif`,actorFontWeight:400,noteFontSize:14,noteFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,noteFontWeight:400,noteAlign:`center`,messageFontSize:16,messageFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:`%Y-%m-%d`,topAxis:!1,displayMode:``,weekday:`sunday`},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:`"Open Sans", sans-serif`,taskMargin:50,activationWidth:10,textPlacement:`fo`,actorColours:[`#8FBC8F`,`#7CFC00`,`#00FFFF`,`#20B2AA`,`#B0E0E6`,`#FFFFE0`],sectionFills:[`#191970`,`#8B008B`,`#4B0082`,`#2F4F4F`,`#800000`,`#8B4513`,`#00008B`],sectionColours:[`#fff`],titleColor:``,titleFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,titleFontSize:`4ex`},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:`dagre-wrapper`,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:`20`,compositTitleSize:35,radius:5,defaultRenderer:`dagre-wrapper`},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:`TB`,minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:`gray`,fill:`honeydew`,fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:`right`,highlightSlice:``},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:`top`,yAxisPosition:`left`,quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:`vertical`,plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:`#f9f9f9`,text_color:`#333`,rect_border_size:`0.5px`,rect_border_color:`#bbb`,rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:`cose-bilkent`},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:``},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:`"Open Sans", sans-serif`,taskMargin:50,activationWidth:10,textPlacement:`fo`,actorColours:[`#8FBC8F`,`#7CFC00`,`#00FFFF`,`#20B2AA`,`#B0E0E6`,`#FFFFE0`],sectionFills:[`#191970`,`#8B008B`,`#4B0082`,`#2F4F4F`,`#800000`,`#8B4513`,`#00008B`],sectionColours:[`#fff`],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:`main`,mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:`"Open Sans", sans-serif`,personFontWeight:`normal`,external_personFontSize:14,external_personFontFamily:`"Open Sans", sans-serif`,external_personFontWeight:`normal`,systemFontSize:14,systemFontFamily:`"Open Sans", sans-serif`,systemFontWeight:`normal`,external_systemFontSize:14,external_systemFontFamily:`"Open Sans", sans-serif`,external_systemFontWeight:`normal`,system_dbFontSize:14,system_dbFontFamily:`"Open Sans", sans-serif`,system_dbFontWeight:`normal`,external_system_dbFontSize:14,external_system_dbFontFamily:`"Open Sans", sans-serif`,external_system_dbFontWeight:`normal`,system_queueFontSize:14,system_queueFontFamily:`"Open Sans", sans-serif`,system_queueFontWeight:`normal`,external_system_queueFontSize:14,external_system_queueFontFamily:`"Open Sans", sans-serif`,external_system_queueFontWeight:`normal`,boundaryFontSize:14,boundaryFontFamily:`"Open Sans", sans-serif`,boundaryFontWeight:`normal`,messageFontSize:12,messageFontFamily:`"Open Sans", sans-serif`,messageFontWeight:`normal`,containerFontSize:14,containerFontFamily:`"Open Sans", sans-serif`,containerFontWeight:`normal`,external_containerFontSize:14,external_containerFontFamily:`"Open Sans", sans-serif`,external_containerFontWeight:`normal`,container_dbFontSize:14,container_dbFontFamily:`"Open Sans", sans-serif`,container_dbFontWeight:`normal`,external_container_dbFontSize:14,external_container_dbFontFamily:`"Open Sans", sans-serif`,external_container_dbFontWeight:`normal`,container_queueFontSize:14,container_queueFontFamily:`"Open Sans", sans-serif`,container_queueFontWeight:`normal`,external_container_queueFontSize:14,external_container_queueFontFamily:`"Open Sans", sans-serif`,external_container_queueFontWeight:`normal`,componentFontSize:14,componentFontFamily:`"Open Sans", sans-serif`,componentFontWeight:`normal`,external_componentFontSize:14,external_componentFontFamily:`"Open Sans", sans-serif`,external_componentFontWeight:`normal`,component_dbFontSize:14,component_dbFontFamily:`"Open Sans", sans-serif`,component_dbFontWeight:`normal`,external_component_dbFontSize:14,external_component_dbFontFamily:`"Open Sans", sans-serif`,external_component_dbFontWeight:`normal`,component_queueFontSize:14,component_queueFontFamily:`"Open Sans", sans-serif`,component_queueFontWeight:`normal`,external_component_queueFontSize:14,external_component_queueFontFamily:`"Open Sans", sans-serif`,external_component_queueFontWeight:`normal`,wrap:!0,wrapPadding:10,person_bg_color:`#08427B`,person_border_color:`#073B6F`,external_person_bg_color:`#686868`,external_person_border_color:`#8A8A8A`,system_bg_color:`#1168BD`,system_border_color:`#3C7FC0`,system_db_bg_color:`#1168BD`,system_db_border_color:`#3C7FC0`,system_queue_bg_color:`#1168BD`,system_queue_border_color:`#3C7FC0`,external_system_bg_color:`#999999`,external_system_border_color:`#8A8A8A`,external_system_db_bg_color:`#999999`,external_system_db_border_color:`#8A8A8A`,external_system_queue_bg_color:`#999999`,external_system_queue_border_color:`#8A8A8A`,container_bg_color:`#438DD5`,container_border_color:`#3C7FC0`,container_db_bg_color:`#438DD5`,container_db_border_color:`#3C7FC0`,container_queue_bg_color:`#438DD5`,container_queue_border_color:`#3C7FC0`,external_container_bg_color:`#B3B3B3`,external_container_border_color:`#A6A6A6`,external_container_db_bg_color:`#B3B3B3`,external_container_db_border_color:`#A6A6A6`,external_container_queue_bg_color:`#B3B3B3`,external_container_queue_border_color:`#A6A6A6`,component_bg_color:`#85BBF0`,component_border_color:`#78A8D8`,component_db_bg_color:`#85BBF0`,component_db_border_color:`#78A8D8`,component_queue_bg_color:`#85BBF0`,component_queue_border_color:`#78A8D8`,external_component_bg_color:`#CCCCCC`,external_component_border_color:`#BFBFBF`,external_component_db_bg_color:`#CCCCCC`,external_component_db_border_color:`#BFBFBF`,external_component_queue_bg_color:`#CCCCCC`,external_component_queue_border_color:`#BFBFBF`},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:`gradient`,nodeAlignment:`justify`,showValues:!0,prefix:``,suffix:``,nodeWidth:10,nodePadding:12,labelStyle:`legacy`},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:``,filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:`default`,look:`classic`,handDrawnSeed:0,layout:`dagre`,maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:`"trebuchet ms", verdana, arial, sans-serif;`,logLevel:5,securityLevel:`strict`,startOnLoad:!0,arrowMarkerAbsolute:!1,secure:[`secure`,`securityLevel`,`startOnLoad`,`maxTextSize`,`suppressErrorRendering`,`maxEdges`],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},wv={...Cv,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:`BRANDES_KOEPF`,nodePlacementAlignment:`NONE`,forceNodeModelOrder:!1,considerModelOrder:`NODES_AND_EDGES`,keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:Sv.default.getThemeVariables(),sequence:{...Cv.sequence,messageFont:W(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`),noteFont:W(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},`noteFont`),actorFont:W(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},`actorFont`)},class:{defaultRenderer:`dagre-wrapper`,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Cv.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Cv.c4,useWidth:void 0,personFont:W(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},`personFont`),flowchart:{...Cv.flowchart,inheritDir:!1},external_personFont:W(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},`external_personFont`),systemFont:W(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},`systemFont`),external_systemFont:W(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},`external_systemFont`),system_dbFont:W(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},`system_dbFont`),external_system_dbFont:W(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},`external_system_dbFont`),system_queueFont:W(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},`system_queueFont`),external_system_queueFont:W(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},`external_system_queueFont`),containerFont:W(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},`containerFont`),external_containerFont:W(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},`external_containerFont`),container_dbFont:W(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},`container_dbFont`),external_container_dbFont:W(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},`external_container_dbFont`),container_queueFont:W(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},`container_queueFont`),external_container_queueFont:W(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},`external_container_queueFont`),componentFont:W(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},`componentFont`),external_componentFont:W(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},`external_componentFont`),component_dbFont:W(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},`component_dbFont`),external_component_dbFont:W(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},`external_component_dbFont`),component_queueFont:W(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},`component_queueFont`),external_component_queueFont:W(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},`external_component_queueFont`),boundaryFont:W(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},`boundaryFont`),messageFont:W(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`)},pie:{...Cv.pie,useWidth:984},xyChart:{...Cv.xyChart,useWidth:void 0},requirement:{...Cv.requirement,useWidth:void 0},packet:{...Cv.packet},eventmodeling:{...Cv.eventmodeling},treeView:{...Cv.treeView,useWidth:void 0},radar:{...Cv.radar},railroad:{...Cv.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...Cv.ishikawa},sankey:{...Cv.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:`,`},venn:{...Cv.venn},cynefin:{...Cv.cynefin}},Tv=W((e,t=``)=>Object.keys(e).reduce((n,r)=>Array.isArray(e[r])?n:typeof e[r]==`object`&&e[r]!==null?[...n,t+r,...Tv(e[r],``)]:[...n,t+r],[]),`keyify`),lse=new Set(Tv(wv,``)),Ev=wv,use={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},dse=W((e,t)=>{for(let n of Object.keys(e)){let r=e[n];(n.startsWith(`__`)||n.includes(`proto`)||n.includes(`constr`)||typeof r!=`string`||!t.test(r))&&(G.debug(`sanitize deleting dictionary entry:`,n,r),delete e[n])}},`sanitizeDictionaryConfig`),Dv=W(e=>{if(G.debug(`sanitizeDirective called with`,e),typeof e==`object`&&e){if(Array.isArray(e)){e.forEach(e=>Dv(e));return}for(let t of Object.keys(e)){if(G.debug(`Checking key`,t),t.startsWith(`__`)||t.includes(`proto`)||t.includes(`constr`)||!lse.has(t)||e[t]==null){G.debug(`sanitize deleting key: `,t),delete e[t];continue}if(typeof e[t]==`object`){let n=use[t];n?dse(e[t],n):(G.debug(`sanitizing object`,t),Dv(e[t]));continue}for(let n of[`themeCSS`,`fontFamily`,`altFontFamily`])t.includes(n)&&(G.debug(`sanitizing css option`,t),e[t]=Ov(e[t]))}if(e.themeVariables)for(let t of Object.keys(e.themeVariables)){let n=e.themeVariables[t];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]=``)}G.debug(`After sanitization`,e)}},`sanitizeDirective`),Ov=W(e=>{let t=0,n=0;for(let r of e){if(t<n)return`{ /* ERROR: Unbalanced CSS */ }`;r===`{`?t++:r===`}`&&n++}return t===n?e:`{ /* ERROR: Unbalanced CSS */ }`},`sanitizeCss`),kv=Object.freeze(Ev),Av=W(e=>!(e===!1||[`false`,`null`,`0`].includes(String(e).trim().toLowerCase())),`evaluate`),jv=_v({},kv),Nv=[],Pv=_v({},kv),Fv=W((e,t)=>{let n=_v({},e),r={};for(let e of t)zv(e),r=_v(r,e);if(n=_v(n,r),r.theme&&r.theme in Sv){let e=_v(_v({},Mv).themeVariables||{},r.themeVariables);n.theme&&n.theme in Sv&&(n.themeVariables=Sv[n.theme].getThemeVariables(e))}return Pv=n,_se(Pv),Pv},`updateCurrentConfig`),fse=W(e=>(jv=_v({},kv),jv=_v(jv,e),e.theme&&Sv[e.theme]&&(jv.themeVariables=Sv[e.theme].getThemeVariables(e.themeVariables)),Fv(jv,Nv),jv),`setSiteConfig`),pse=W(e=>{Mv=_v({},e)},`saveConfigFromInitialize`),mse=W(e=>(jv=_v(jv,e),Fv(jv,Nv),jv),`updateSiteConfig`),Iv=W(()=>_v({},jv),`getSiteConfig`),Lv=W(e=>(Fv(Pv,[e]),Rv()),`setConfig`),Rv=W(()=>_v({},Pv),`getConfig`),zv=W(e=>{e&&([`secure`,...jv.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(G.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith(`__`)&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]==`string`&&(e[t].includes(`<`)||e[t].includes(`>`)||e[t].includes(`url(data:`))&&delete e[t],typeof e[t]==`object`&&zv(e[t])}))},`sanitize`),hse=W(e=>{Dv(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Nv.push(e),Fv(jv,Nv)},`addDirective`),Bv=W((e=jv)=>{Nv=[],Fv(e,Nv)},`reset`),gse={LAZY_LOAD_DEPRECATED:`The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.`,FLOWCHART_HTML_LABELS_DEPRECATED:`flowchart.htmlLabels is deprecated. Please use global htmlLabels instead.`},Vv={},Hv=W(e=>{Vv[e]||(G.warn(gse[e]),Vv[e]=!0)},`issueWarning`),_se=W(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Hv(`LAZY_LOAD_DEPRECATED`)},`checkConfig`),Uv=W(()=>{let e={};Mv&&(e=_v(e,Mv));for(let t of Nv)e=_v(e,t);return e},`getUserDefinedConfig`),Wv=W(e=>(e.flowchart?.htmlLabels!=null&&Hv(`FLOWCHART_HTML_LABELS_DEPRECATED`),Av(e.htmlLabels??e.flowchart?.htmlLabels??!0)),`getEffectiveHtmlLabels`),Gv=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Kv=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,vse=/\s*%%.*\n/gm,qv=class extends Error{static{W(this,`UnknownDiagramError`)}constructor(e){super(e),this.name=`UnknownDiagramError`}},Jv={},Yv=W(function(e,t){e=e.replace(Gv,``).replace(Kv,``).replace(vse,`
|
|
299
|
-
`);for(let[n,{detector:r}]of Object.entries(Jv))if(r(e,t))return n;throw new qv(`No diagram type detected matching given configuration for text: ${e}`)},`detectType`),Xv=W((...e)=>{for(let{id:t,detector:n,loader:r}of e)Zv(t,n,r)},`registerLazyLoadedDiagrams`),Zv=W((e,t,n)=>{Jv[e]&&G.warn(`Detector with key ${e} already exists. Overwriting.`),Jv[e]={detector:t,loader:n},G.debug(`Detector with key ${e} added${n?` with loader`:``}`)},`addDetector`),yse=W(e=>Jv[e].loader,`getDiagramLoader`),Qv=/<br\s*\/?>/gi,bse=W(e=>e?ny(e).replace(/\\n/g,`#br#`).split(`#br#`):[``],`getRows`),xse=(()=>{let e=!1;return()=>{e||=(Hoe(),!0)}})(),W(Hoe,`setupDompurifyHooks`),$v=W(e=>(xse(),ih.sanitize(e)),`removeScript`),ey=W((e,t)=>{if(Wv(t)){let n=t.securityLevel;n===`antiscript`||n===`strict`||n===`sandbox`?e=$v(e):n!==`loose`&&(e=ny(e),e=e.replace(/</g,`<`).replace(/>/g,`>`),e=e.replace(/=/g,`=`),e=Tse(e))}return e},`sanitizeMore`),ty=W((e,t)=>e&&(e=t.dompurifyConfig?ih.sanitize(ey(e,t),t.dompurifyConfig).toString():ih.sanitize(ey(e,t),{FORBID_TAGS:[`style`]}).toString(),e),`sanitizeText`),Sse=W((e,t)=>typeof e==`string`?ty(e,t):e.flat().map(e=>ty(e,t)),`sanitizeTextOrArray`),Cse=W(e=>Qv.test(e),`hasBreaks`),wse=W(e=>e.split(Qv),`splitBreaks`),Tse=W(e=>e.replace(/#br#/g,`<br/>`),`placeholderToBreak`),ny=W(e=>e.replace(Qv,`#br#`),`breakToPlaceholder`),ry=W(e=>{let t=``;return e&&(t=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},`getUrl`),Ese=W(function(...e){let t=e.filter(e=>!isNaN(e));return Math.max(...t)},`getMax`),Dse=W(function(...e){let t=e.filter(e=>!isNaN(e));return Math.min(...t)},`getMin`),iy=W(function(e){let t=e.split(/(,)/),n=[];for(let e=0;e<t.length;e++){let r=t[e];if(r===`,`&&e>0&&e+1<t.length){let i=t[e-1],a=t[e+1];Ose(i,a)&&(r=i+`,`+a,e++,n.pop())}n.push(kse(r))}return n.join(``)},`parseGenericTypes`),ay=W((e,t)=>Math.max(0,e.split(t).length-1),`countOccurrence`),Ose=W((e,t)=>{let n=ay(e,`~`),r=ay(t,`~`);return n===1&&r===1},`shouldCombineSets`),kse=W(e=>{let t=ay(e,`~`),n=!1;if(t<=1)return e;t%2!=0&&e.startsWith(`~`)&&(e=e.substring(1),n=!0);let r=[...e],i=r.indexOf(`~`),a=r.lastIndexOf(`~`);for(;i!==-1&&a!==-1&&i!==a;)r[i]=`<`,r[a]=`>`,i=r.indexOf(`~`),a=r.lastIndexOf(`~`);return n&&r.unshift(`~`),r.join(``)},`processSet`),oy=W(()=>window.MathMLElement!==void 0,`isMathMLSupported`),sy=/\$\$(.*?)\$\$/g,cy=W(e=>(e.match(sy)?.length??0)>0,`hasKatex`),ly=W(async(e,t)=>{let n=document.createElement(`div`);n.innerHTML=await uy(e,t),n.id=`katex-temp`,n.style.visibility=`hidden`,n.style.position=`absolute`,n.style.top=`0`,document.querySelector(`body`)?.insertAdjacentElement(`beforeend`,n);let r={width:n.clientWidth,height:n.clientHeight};return n.remove(),r},`calculateMathMLDimensions`),Ase=W(async(e,t)=>{if(!cy(e))return e;if(!(oy()||t.legacyMathML||t.forceLegacyMathML))return e.replace(sy,`MathML is unsupported in this environment.`);{let{default:n}=await Rp(async()=>{let{default:e}=await Promise.resolve().then(()=>(Voe(),bre));return{default:e}},void 0),r=t.forceLegacyMathML||!oy()&&t.legacyMathML?`htmlAndMathml`:`mathml`;return e.split(Qv).map(e=>cy(e)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${e}</div>`:`<div>${e}</div>`).join(``).replace(sy,(e,t)=>n.renderToString(t,{throwOnError:!0,displayMode:!0,output:r}).replace(/\n/g,` `).replace(/<annotation.*<\/annotation>/g,``))}},`renderKatexUnsanitized`),uy=W(async(e,t)=>ty(await Ase(e,t),t),`renderKatexSanitized`),dy={getRows:bse,sanitizeText:ty,sanitizeTextOrArray:Sse,hasBreaks:Cse,splitBreaks:wse,lineBreakRegex:Qv,removeScript:$v,getUrl:ry,evaluate:Av,getMax:Ese,getMin:Dse},jse=W(function(e,t){for(let n of t)e.attr(n[0],n[1])},`d3Attrs`),Mse=W(function(e,t,n){let r=new Map;return n?(r.set(`width`,`100%`),r.set(`style`,`max-width: ${t}px;`)):(r.set(`height`,e),r.set(`width`,t)),r},`calculateSvgSizeAttrs`),fy=W(function(e,t,n,r){jse(e,Mse(t,n,r))},`configureSvgSize`),py=W(function(e,t,n,r){let i=t.node().getBBox(),a=i.width,o=i.height;G.info(`SVG bounds: ${a}x${o}`,i);let s=0,l=0;G.info(`Graph bounds: ${s}x${l}`,e),s=a+n*2,l=o+n*2,G.info(`Calculated bounds: ${s}x${l}`),fy(t,l,s,r);let u=`${i.x-n} ${i.y-n} ${i.width+2*n} ${i.height+2*n}`;t.attr(`viewBox`,u)},`setupGraphViewbox`),my={},W(hv,`cssStyleSheetToString`),Nse=W((e,t,n,r)=>{let i=``;return e in my&&my[e]?i=my[e]({...n,svgId:r}):G.warn(`No theme found for ${e}`),`& {
|
|
299
|
+
`);for(let[n,{detector:r}]of Object.entries(Jv))if(r(e,t))return n;throw new qv(`No diagram type detected matching given configuration for text: ${e}`)},`detectType`),Xv=W((...e)=>{for(let{id:t,detector:n,loader:r}of e)Zv(t,n,r)},`registerLazyLoadedDiagrams`),Zv=W((e,t,n)=>{Jv[e]&&G.warn(`Detector with key ${e} already exists. Overwriting.`),Jv[e]={detector:t,loader:n},G.debug(`Detector with key ${e} added${n?` with loader`:``}`)},`addDetector`),yse=W(e=>Jv[e].loader,`getDiagramLoader`),Qv=/<br\s*\/?>/gi,bse=W(e=>e?ny(e).replace(/\\n/g,`#br#`).split(`#br#`):[``],`getRows`),xse=(()=>{let e=!1;return()=>{e||=(Hoe(),!0)}})(),W(Hoe,`setupDompurifyHooks`),$v=W(e=>(xse(),ih.sanitize(e)),`removeScript`),ey=W((e,t)=>{if(Wv(t)){let n=t.securityLevel;n===`antiscript`||n===`strict`||n===`sandbox`?e=$v(e):n!==`loose`&&(e=ny(e),e=e.replace(/</g,`<`).replace(/>/g,`>`),e=e.replace(/=/g,`=`),e=Tse(e))}return e},`sanitizeMore`),ty=W((e,t)=>e&&(e=t.dompurifyConfig?ih.sanitize(ey(e,t),t.dompurifyConfig).toString():ih.sanitize(ey(e,t),{FORBID_TAGS:[`style`]}).toString(),e),`sanitizeText`),Sse=W((e,t)=>typeof e==`string`?ty(e,t):e.flat().map(e=>ty(e,t)),`sanitizeTextOrArray`),Cse=W(e=>Qv.test(e),`hasBreaks`),wse=W(e=>e.split(Qv),`splitBreaks`),Tse=W(e=>e.replace(/#br#/g,`<br/>`),`placeholderToBreak`),ny=W(e=>e.replace(Qv,`#br#`),`breakToPlaceholder`),ry=W(e=>{let t=``;return e&&(t=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},`getUrl`),Ese=W(function(...e){let t=e.filter(e=>!isNaN(e));return Math.max(...t)},`getMax`),Dse=W(function(...e){let t=e.filter(e=>!isNaN(e));return Math.min(...t)},`getMin`),iy=W(function(e){let t=e.split(/(,)/),n=[];for(let e=0;e<t.length;e++){let r=t[e];if(r===`,`&&e>0&&e+1<t.length){let i=t[e-1],a=t[e+1];Ose(i,a)&&(r=i+`,`+a,e++,n.pop())}n.push(kse(r))}return n.join(``)},`parseGenericTypes`),ay=W((e,t)=>Math.max(0,e.split(t).length-1),`countOccurrence`),Ose=W((e,t)=>{let n=ay(e,`~`),r=ay(t,`~`);return n===1&&r===1},`shouldCombineSets`),kse=W(e=>{let t=ay(e,`~`),n=!1;if(t<=1)return e;t%2!=0&&e.startsWith(`~`)&&(e=e.substring(1),n=!0);let r=[...e],i=r.indexOf(`~`),a=r.lastIndexOf(`~`);for(;i!==-1&&a!==-1&&i!==a;)r[i]=`<`,r[a]=`>`,i=r.indexOf(`~`),a=r.lastIndexOf(`~`);return n&&r.unshift(`~`),r.join(``)},`processSet`),oy=W(()=>window.MathMLElement!==void 0,`isMathMLSupported`),sy=/\$\$(.*?)\$\$/g,cy=W(e=>(e.match(sy)?.length??0)>0,`hasKatex`),ly=W(async(e,t)=>{let n=document.createElement(`div`);n.innerHTML=await uy(e,t),n.id=`katex-temp`,n.style.visibility=`hidden`,n.style.position=`absolute`,n.style.top=`0`,document.querySelector(`body`)?.insertAdjacentElement(`beforeend`,n);let r={width:n.clientWidth,height:n.clientHeight};return n.remove(),r},`calculateMathMLDimensions`),Ase=W(async(e,t)=>{if(!cy(e))return e;if(!(oy()||t.legacyMathML||t.forceLegacyMathML))return e.replace(sy,`MathML is unsupported in this environment.`);{let{default:n}=await Rp(async()=>{let{default:e}=await Promise.resolve().then(()=>(Voe(),bre));return{default:e}},void 0,import.meta.url),r=t.forceLegacyMathML||!oy()&&t.legacyMathML?`htmlAndMathml`:`mathml`;return e.split(Qv).map(e=>cy(e)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${e}</div>`:`<div>${e}</div>`).join(``).replace(sy,(e,t)=>n.renderToString(t,{throwOnError:!0,displayMode:!0,output:r}).replace(/\n/g,` `).replace(/<annotation.*<\/annotation>/g,``))}},`renderKatexUnsanitized`),uy=W(async(e,t)=>ty(await Ase(e,t),t),`renderKatexSanitized`),dy={getRows:bse,sanitizeText:ty,sanitizeTextOrArray:Sse,hasBreaks:Cse,splitBreaks:wse,lineBreakRegex:Qv,removeScript:$v,getUrl:ry,evaluate:Av,getMax:Ese,getMin:Dse},jse=W(function(e,t){for(let n of t)e.attr(n[0],n[1])},`d3Attrs`),Mse=W(function(e,t,n){let r=new Map;return n?(r.set(`width`,`100%`),r.set(`style`,`max-width: ${t}px;`)):(r.set(`height`,e),r.set(`width`,t)),r},`calculateSvgSizeAttrs`),fy=W(function(e,t,n,r){jse(e,Mse(t,n,r))},`configureSvgSize`),py=W(function(e,t,n,r){let i=t.node().getBBox(),a=i.width,o=i.height;G.info(`SVG bounds: ${a}x${o}`,i);let s=0,l=0;G.info(`Graph bounds: ${s}x${l}`,e),s=a+n*2,l=o+n*2,G.info(`Calculated bounds: ${s}x${l}`),fy(t,l,s,r);let u=`${i.x-n} ${i.y-n} ${i.width+2*n} ${i.height+2*n}`;t.attr(`viewBox`,u)},`setupGraphViewbox`),my={},W(hv,`cssStyleSheetToString`),Nse=W((e,t,n,r)=>{let i=``;return e in my&&my[e]?i=my[e]({...n,svgId:r}):G.warn(`No theme found for ${e}`),`& {
|
|
300
300
|
font-family: ${n.fontFamily};
|
|
301
301
|
font-size: ${n.fontSize};
|
|
302
302
|
fill: ${n.textColor}
|
|
@@ -560,7 +560,7 @@ ${i.join(`
|
|
|
560
560
|
L0,20`)},`requirement_arrow`),requirement_contains:W((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_containsStart`).attr(`refX`,0).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`g`);r.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),r.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),r.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10)},`requirement_contains`),requirement_arrow_neo:W((e,t,n)=>{let{themeVariables:r}=Rv(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`stroke-width`,`${i}`).attr(`viewBox`,`0 0 25 20`).append(`path`).attr(`d`,`M0,0
|
|
561
561
|
L20,10
|
|
562
562
|
M20,10
|
|
563
|
-
L0,20`).attr(`stroke-linejoin`,`miter`)},`requirement_arrow_neo`),requirement_contains_neo:W((e,t,n)=>{let{themeVariables:r}=Rv(),{strokeWidth:i}=r,a=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_containsStart`).attr(`refX`,0).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`g`);a.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),a.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),a.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10),a.selectAll(`*`).attr(`stroke-width`,`${i}`)},`requirement_contains_neo`)},AT=yOe})),xOe,SOe=o((()=>{xOe=typeof global==`object`&&global&&global.Object===Object&&global})),COe,MT,NT=o((()=>{SOe(),COe=typeof self==`object`&&self&&self.Object===Object&&self,MT=xOe||COe||Function(`return this`)()})),PT,FT=o((()=>{NT(),PT=MT.Symbol}));function wOe(e){var t=EOe.call(e,IT),n=e[IT];try{e[IT]=void 0;var r=!0}catch{}var i=DOe.call(e);return r&&(t?e[IT]=n:delete e[IT]),i}var TOe,EOe,DOe,IT,OOe=o((()=>{FT(),TOe=Object.prototype,EOe=TOe.hasOwnProperty,DOe=TOe.toString,IT=PT?PT.toStringTag:void 0}));function kOe(e){return AOe.call(e)}var AOe,jOe=o((()=>{AOe=Object.prototype.toString}));function LT(e){return e==null?e===void 0?NOe:MOe:POe&&POe in Object(e)?wOe(e):kOe(e)}var MOe,NOe,POe,RT=o((()=>{FT(),OOe(),jOe(),MOe=`[object Null]`,NOe=`[object Undefined]`,POe=PT?PT.toStringTag:void 0}));function zT(e){return typeof e==`object`&&!!e}var BT=o((()=>{}));function VT(e){return typeof e==`symbol`||zT(e)&<(e)==FOe}var FOe,HT=o((()=>{RT(),BT(),FOe=`[object Symbol]`}));function UT(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var WT=o((()=>{})),GT,KT=o((()=>{GT=Array.isArray}));function IOe(e){if(typeof e==`string`)return e;if(GT(e))return UT(e,IOe)+``;if(VT(e))return zOe?zOe.call(e):``;var t=e+``;return t==`0`&&1/e==-LOe?`-0`:t}var LOe,ROe,zOe,BOe=o((()=>{FT(),WT(),KT(),HT(),LOe=1/0,ROe=PT?PT.prototype:void 0,zOe=ROe?ROe.toString:void 0}));function VOe(e){for(var t=e.length;t--&&HOe.test(e.charAt(t)););return t}var HOe,UOe=o((()=>{HOe=/\s/}));function WOe(e){return e&&e.slice(0,VOe(e)+1).replace(GOe,``)}var GOe,KOe=o((()=>{UOe(),GOe=/^\s+/}));function qT(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var JT=o((()=>{}));function qOe(e){if(typeof e==`number`)return e;if(VT(e))return JOe;if(qT(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=qT(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=WOe(e);var n=XOe.test(e);return n||ZOe.test(e)?QOe(e.slice(2),n?2:8):YOe.test(e)?JOe:+e}var JOe,YOe,XOe,ZOe,QOe,$Oe=o((()=>{KOe(),JT(),HT(),JOe=NaN,YOe=/^[-+]0x[0-9a-f]+$/i,XOe=/^0b[01]+$/i,ZOe=/^0o[0-7]+$/i,QOe=parseInt}));function YT(e){return e?(e=qOe(e),e===XT||e===-XT?(e<0?-1:1)*eke:e===e?e:0):e===0?e:0}var XT,eke,ZT=o((()=>{$Oe(),XT=1/0,eke=17976931348623157e292}));function tke(e){var t=YT(e),n=t%1;return t===t?n?t-n:t:0}var nke=o((()=>{ZT()}));function QT(e){return e}var $T=o((()=>{}));function eE(e){if(!qT(e))return!1;var t=LT(e);return t==ike||t==ake||t==rke||t==oke}var rke,ike,ake,oke,tE=o((()=>{RT(),JT(),rke=`[object AsyncFunction]`,ike=`[object Function]`,ake=`[object GeneratorFunction]`,oke=`[object Proxy]`})),nE,ske=o((()=>{NT(),nE=MT[`__core-js_shared__`]}));function cke(e){return!!rE&&rE in e}var rE,lke=o((()=>{ske(),rE=function(){var e=/[^.]+$/.exec(nE&&nE.keys&&nE.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}()}));function iE(e){if(e!=null){try{return uke.call(e)}catch{}try{return e+``}catch{}}return``}var uke,dke=o((()=>{uke=Function.prototype.toString}));function fke(e){return!qT(e)||cke(e)?!1:(eE(e)?yke:mke).test(iE(e))}var pke,mke,hke,gke,_ke,vke,yke,bke=o((()=>{tE(),lke(),JT(),dke(),pke=/[\\^$.*+?()[\]{}|]/g,mke=/^\[object .+?Constructor\]$/,hke=Function.prototype,gke=Object.prototype,_ke=hke.toString,vke=gke.hasOwnProperty,yke=RegExp(`^`+_ke.call(vke).replace(pke,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`)}));function xke(e,t){return e?.[t]}var Ske=o((()=>{}));function aE(e,t){var n=xke(e,t);return fke(n)?n:void 0}var oE=o((()=>{bke(),Ske()})),sE,Cke=o((()=>{oE(),NT(),sE=aE(MT,`WeakMap`)})),cE,wke,Tke=o((()=>{JT(),cE=Object.create,wke=function(){function e(){}return function(t){if(!qT(t))return{};if(cE)return cE(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}()}));function Eke(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Dke=o((()=>{}));function Oke(){}var kke=o((()=>{}));function Ake(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var lE=o((()=>{}));function jke(e){var t=0,n=0;return function(){var r=Pke(),i=Nke-(r-n);if(n=r,i>0){if(++t>=Mke)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Mke,Nke,Pke,Fke=o((()=>{Mke=800,Nke=16,Pke=Date.now}));function uE(e){return function(){return e}}var Ike=o((()=>{})),dE,Lke=o((()=>{oE(),dE=function(){try{var e=aE(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),Rke,zke=o((()=>{Ike(),Lke(),$T(),Rke=dE?function(e,t){return dE(e,`toString`,{configurable:!0,enumerable:!1,value:uE(t),writable:!0})}:QT})),fE,pE=o((()=>{zke(),Fke(),fE=jke(Rke)}));function Bke(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var mE=o((()=>{}));function Vke(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var hE=o((()=>{}));function Hke(e){return e!==e}var Uke=o((()=>{}));function Wke(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var Gke=o((()=>{}));function Kke(e,t,n){return t===t?Wke(e,t,n):Vke(e,Hke,n)}var qke=o((()=>{hE(),Uke(),Gke()}));function Jke(e,t){return!!(e!=null&&e.length)&&Kke(e,t,0)>-1}var Yke=o((()=>{qke()}));function gE(e,t){var n=typeof e;return t??=Xke,!!t&&(n==`number`||n!=`symbol`&&Zke.test(e))&&e>-1&&e%1==0&&e<t}var Xke,Zke,_E=o((()=>{Xke=9007199254740991,Zke=/^(?:0|[1-9]\d*)$/}));function vE(e,t,n){t==`__proto__`&&dE?dE(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var yE=o((()=>{Lke()}));function bE(e,t){return e===t||e!==e&&t!==t}var xE=o((()=>{}));function SE(e,t,n){var r=e[t];(!(Qke.call(e,t)&&bE(r,n))||n===void 0&&!(t in e))&&vE(e,t,n)}var Qke,CE=o((()=>{yE(),xE(),Qke=Object.prototype.hasOwnProperty}));function wE(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),i?vE(n,s,l):SE(n,s,l)}return n}var TE=o((()=>{CE(),yE()}));function $ke(e,t,n){return t=EE(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=EE(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),Eke(e,this,s)}}var EE,eAe=o((()=>{Dke(),EE=Math.max}));function DE(e,t){return fE($ke(e,t,QT),e+``)}var OE=o((()=>{$T(),eAe(),pE()}));function kE(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=tAe}var tAe,AE=o((()=>{tAe=9007199254740991}));function jE(e){return e!=null&&kE(e.length)&&!eE(e)}var ME=o((()=>{tE(),AE()}));function NE(e,t,n){if(!qT(n))return!1;var r=typeof t;return(r==`number`?jE(n)&&gE(t,n.length):r==`string`&&t in n)?bE(n[t],e):!1}var PE=o((()=>{xE(),ME(),_E(),JT()}));function nAe(e){return DE(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&NE(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var rAe=o((()=>{OE(),PE()}));function FE(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||iAe)}var iAe,IE=o((()=>{iAe=Object.prototype}));function aAe(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var oAe=o((()=>{}));function sAe(e){return zT(e)&<(e)==cAe}var cAe,lAe=o((()=>{RT(),BT(),cAe=`[object Arguments]`})),LE,uAe,dAe,RE,zE=o((()=>{lAe(),BT(),LE=Object.prototype,uAe=LE.hasOwnProperty,dAe=LE.propertyIsEnumerable,RE=sAe(function(){return arguments}())?sAe:function(e){return zT(e)&&uAe.call(e,`callee`)&&!dAe.call(e,`callee`)}}));function fAe(){return!1}var pAe=o((()=>{})),BE,VE,HE,UE,WE=o((()=>{NT(),pAe(),BE=typeof exports==`object`&&exports&&!exports.nodeType&&exports,VE=BE&&typeof module==`object`&&module&&!module.nodeType&&module,HE=VE&&VE.exports===BE?MT.Buffer:void 0,UE=(HE?HE.isBuffer:void 0)||fAe}));function mAe(e){return zT(e)&&kE(e.length)&&!!GE[LT(e)]}var hAe,gAe,_Ae,vAe,yAe,bAe,xAe,SAe,CAe,wAe,TAe,EAe,DAe,OAe,kAe,AAe,jAe,MAe,NAe,PAe,FAe,IAe,LAe,RAe,GE,zAe=o((()=>{RT(),AE(),BT(),hAe=`[object Arguments]`,gAe=`[object Array]`,_Ae=`[object Boolean]`,vAe=`[object Date]`,yAe=`[object Error]`,bAe=`[object Function]`,xAe=`[object Map]`,SAe=`[object Number]`,CAe=`[object Object]`,wAe=`[object RegExp]`,TAe=`[object Set]`,EAe=`[object String]`,DAe=`[object WeakMap]`,OAe=`[object ArrayBuffer]`,kAe=`[object DataView]`,AAe=`[object Float32Array]`,jAe=`[object Float64Array]`,MAe=`[object Int8Array]`,NAe=`[object Int16Array]`,PAe=`[object Int32Array]`,FAe=`[object Uint8Array]`,IAe=`[object Uint8ClampedArray]`,LAe=`[object Uint16Array]`,RAe=`[object Uint32Array]`,GE={},GE[AAe]=GE[jAe]=GE[MAe]=GE[NAe]=GE[PAe]=GE[FAe]=GE[IAe]=GE[LAe]=GE[RAe]=!0,GE[hAe]=GE[gAe]=GE[OAe]=GE[_Ae]=GE[kAe]=GE[vAe]=GE[yAe]=GE[bAe]=GE[xAe]=GE[SAe]=GE[CAe]=GE[wAe]=GE[TAe]=GE[EAe]=GE[DAe]=!1}));function KE(e){return function(t){return e(t)}}var qE=o((()=>{})),JE,YE,XE,ZE,QE=o((()=>{SOe(),JE=typeof exports==`object`&&exports&&!exports.nodeType&&exports,YE=JE&&typeof module==`object`&&module&&!module.nodeType&&module,XE=YE&&YE.exports===JE&&xOe.process,ZE=function(){try{return YE&&YE.require&&YE.require(`util`).types||XE&&XE.binding&&XE.binding(`util`)}catch{}}()})),$E,eD,tD=o((()=>{zAe(),qE(),QE(),$E=ZE&&ZE.isTypedArray,eD=$E?KE($E):mAe}));function BAe(e,t){var n=GT(e),r=!n&&RE(e),i=!n&&!r&&UE(e),a=!n&&!r&&!i&&eD(e),o=n||r||i||a,s=o?aAe(e.length,String):[],l=s.length;for(var u in e)(t||VAe.call(e,u))&&!(o&&(u==`length`||i&&(u==`offset`||u==`parent`)||a&&(u==`buffer`||u==`byteLength`||u==`byteOffset`)||gE(u,l)))&&s.push(u);return s}var VAe,HAe=o((()=>{oAe(),zE(),KT(),WE(),_E(),tD(),VAe=Object.prototype.hasOwnProperty}));function UAe(e,t){return function(n){return e(t(n))}}var WAe=o((()=>{})),GAe,KAe=o((()=>{WAe(),GAe=UAe(Object.keys,Object)}));function qAe(e){if(!FE(e))return GAe(e);var t=[];for(var n in Object(e))JAe.call(e,n)&&n!=`constructor`&&t.push(n);return t}var JAe,nD=o((()=>{IE(),KAe(),JAe=Object.prototype.hasOwnProperty}));function rD(e){return jE(e)?BAe(e):qAe(e)}var iD=o((()=>{HAe(),nD(),ME()}));function YAe(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var XAe=o((()=>{}));function ZAe(e){if(!qT(e))return YAe(e);var t=FE(e),n=[];for(var r in e)(r!=`constructor`||!t&&QAe.call(e,r))&&n.push(r);return n}var QAe,$Ae=o((()=>{JT(),IE(),XAe(),QAe=Object.prototype.hasOwnProperty}));function aD(e){return jE(e)?BAe(e,!0):ZAe(e)}var oD=o((()=>{HAe(),$Ae(),ME()}));function sD(e,t){if(GT(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||VT(e)?!0:tje.test(e)||!eje.test(e)||t!=null&&e in Object(t)}var eje,tje,cD=o((()=>{KT(),HT(),eje=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tje=/^\w*$/})),lD,uD=o((()=>{oE(),lD=aE(Object,`create`)}));function nje(){this.__data__=lD?lD(null):{},this.size=0}var rje=o((()=>{uD()}));function ije(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var aje=o((()=>{}));function oje(e){var t=this.__data__;if(lD){var n=t[e];return n===sje?void 0:n}return cje.call(t,e)?t[e]:void 0}var sje,cje,lje=o((()=>{uD(),sje=`__lodash_hash_undefined__`,cje=Object.prototype.hasOwnProperty}));function uje(e){var t=this.__data__;return lD?t[e]!==void 0:dje.call(t,e)}var dje,fje=o((()=>{uD(),dje=Object.prototype.hasOwnProperty}));function pje(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=lD&&t===void 0?mje:t,this}var mje,hje=o((()=>{uD(),mje=`__lodash_hash_undefined__`}));function dD(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var gje=o((()=>{rje(),aje(),lje(),fje(),hje(),dD.prototype.clear=nje,dD.prototype.delete=ije,dD.prototype.get=oje,dD.prototype.has=uje,dD.prototype.set=pje}));function _je(){this.__data__=[],this.size=0}var vje=o((()=>{}));function fD(e,t){for(var n=e.length;n--;)if(bE(e[n][0],t))return n;return-1}var pD=o((()=>{xE()}));function yje(e){var t=this.__data__,n=fD(t,e);return n<0?!1:(n==t.length-1?t.pop():bje.call(t,n,1),--this.size,!0)}var bje,xje=o((()=>{pD(),bje=Array.prototype.splice}));function Sje(e){var t=this.__data__,n=fD(t,e);return n<0?void 0:t[n][1]}var Cje=o((()=>{pD()}));function wje(e){return fD(this.__data__,e)>-1}var Tje=o((()=>{pD()}));function Eje(e,t){var n=this.__data__,r=fD(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Dje=o((()=>{pD()}));function mD(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var hD=o((()=>{vje(),xje(),Cje(),Tje(),Dje(),mD.prototype.clear=_je,mD.prototype.delete=yje,mD.prototype.get=Sje,mD.prototype.has=wje,mD.prototype.set=Eje})),gD,_D=o((()=>{oE(),NT(),gD=aE(MT,`Map`)}));function Oje(){this.size=0,this.__data__={hash:new dD,map:new(gD||mD),string:new dD}}var kje=o((()=>{gje(),hD(),_D()}));function Aje(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}var jje=o((()=>{}));function vD(e,t){var n=e.__data__;return Aje(t)?n[typeof t==`string`?`string`:`hash`]:n.map}var yD=o((()=>{jje()}));function Mje(e){var t=vD(this,e).delete(e);return this.size-=+!!t,t}var Nje=o((()=>{yD()}));function Pje(e){return vD(this,e).get(e)}var Fje=o((()=>{yD()}));function Ije(e){return vD(this,e).has(e)}var Lje=o((()=>{yD()}));function Rje(e,t){var n=vD(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var zje=o((()=>{yD()}));function bD(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var xD=o((()=>{kje(),Nje(),Fje(),Lje(),zje(),bD.prototype.clear=Oje,bD.prototype.delete=Mje,bD.prototype.get=Pje,bD.prototype.has=Ije,bD.prototype.set=Rje}));function SD(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(Bje);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(SD.Cache||bD),n}var Bje,Vje=o((()=>{xD(),Bje=`Expected a function`,SD.Cache=bD}));function Hje(e){var t=SD(e,function(e){return n.size===Uje&&n.clear(),e}),n=t.cache;return t}var Uje,Wje=o((()=>{Vje(),Uje=500})),Gje,Kje,qje,Jje=o((()=>{Wje(),Gje=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Kje=/\\(\\)?/g,qje=Hje(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Gje,function(e,n,r,i){t.push(r?i.replace(Kje,`$1`):n||e)}),t})}));function Yje(e){return e==null?``:IOe(e)}var CD=o((()=>{BOe()}));function wD(e,t){return GT(e)?e:sD(e,t)?[e]:qje(Yje(e))}var TD=o((()=>{KT(),cD(),Jje(),CD()}));function ED(e){if(typeof e==`string`||VT(e))return e;var t=e+``;return t==`0`&&1/e==-Xje?`-0`:t}var Xje,DD=o((()=>{HT(),Xje=1/0}));function OD(e,t){t=wD(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[ED(t[n++])];return n&&n==r?e:void 0}var kD=o((()=>{TD(),DD()}));function Zje(e,t,n){var r=e==null?void 0:OD(e,t);return r===void 0?n:r}var Qje=o((()=>{kD()}));function AD(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var jD=o((()=>{}));function $je(e){return GT(e)||RE(e)||!!(MD&&e&&e[MD])}var MD,eMe=o((()=>{FT(),zE(),KT(),MD=PT?PT.isConcatSpreadable:void 0}));function ND(e,t,n,r,i){var a=-1,o=e.length;for(n||=$je,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?ND(s,t-1,n,r,i):AD(i,s):r||(i[i.length]=s)}return i}var PD=o((()=>{jD(),eMe()}));function FD(e){return e!=null&&e.length?ND(e,1):[]}var tMe=o((()=>{PD()}));function nMe(e){return fE($ke(e,void 0,FD),e+``)}var rMe=o((()=>{tMe(),eAe(),pE()})),ID,LD=o((()=>{WAe(),ID=UAe(Object.getPrototypeOf,Object)}));function iMe(e){if(!zT(e)||LT(e)!=aMe)return!1;var t=ID(e);if(t===null)return!0;var n=cMe.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&RD.call(n)==lMe}var aMe,oMe,sMe,RD,cMe,lMe,uMe=o((()=>{RT(),LD(),BT(),aMe=`[object Object]`,oMe=Function.prototype,sMe=Object.prototype,RD=oMe.toString,cMe=sMe.hasOwnProperty,lMe=RD.call(Object)})),dMe=o((()=>{}));function fMe(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}var pMe=o((()=>{}));function mMe(){this.__data__=new mD,this.size=0}var hMe=o((()=>{hD()}));function gMe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var _Me=o((()=>{}));function vMe(e){return this.__data__.get(e)}var yMe=o((()=>{}));function bMe(e){return this.__data__.has(e)}var xMe=o((()=>{}));function SMe(e,t){var n=this.__data__;if(n instanceof mD){var r=n.__data__;if(!gD||r.length<CMe-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new bD(r)}return n.set(e,t),this.size=n.size,this}var CMe,wMe=o((()=>{hD(),_D(),xD(),CMe=200}));function zD(e){var t=this.__data__=new mD(e);this.size=t.size}var BD=o((()=>{hD(),hMe(),_Me(),yMe(),xMe(),wMe(),zD.prototype.clear=mMe,zD.prototype.delete=gMe,zD.prototype.get=vMe,zD.prototype.has=bMe,zD.prototype.set=SMe}));function TMe(e,t){return e&&wE(t,rD(t),e)}var EMe=o((()=>{TE(),iD()}));function DMe(e,t){return e&&wE(t,aD(t),e)}var OMe=o((()=>{TE(),oD()}));function kMe(e,t){if(t)return e.slice();var n=e.length,r=WD?WD(n):new e.constructor(n);return e.copy(r),r}var VD,HD,UD,WD,AMe=o((()=>{NT(),VD=typeof exports==`object`&&exports&&!exports.nodeType&&exports,HD=VD&&typeof module==`object`&&module&&!module.nodeType&&module,UD=HD&&HD.exports===VD?MT.Buffer:void 0,WD=UD?UD.allocUnsafe:void 0}));function jMe(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var GD=o((()=>{}));function MMe(){return[]}var KD=o((()=>{})),NMe,qD,JD,YD=o((()=>{GD(),KD(),NMe=Object.prototype.propertyIsEnumerable,qD=Object.getOwnPropertySymbols,JD=qD?function(e){return e==null?[]:(e=Object(e),jMe(qD(e),function(t){return NMe.call(e,t)}))}:MMe}));function PMe(e,t){return wE(e,JD(e),t)}var FMe=o((()=>{TE(),YD()})),XD,IMe=o((()=>{jD(),LD(),YD(),KD(),XD=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)AD(t,JD(e)),e=ID(e);return t}:MMe}));function LMe(e,t){return wE(e,XD(e),t)}var RMe=o((()=>{TE(),IMe()}));function zMe(e,t,n){var r=t(e);return GT(e)?r:AD(r,n(e))}var BMe=o((()=>{jD(),KT()}));function ZD(e){return zMe(e,rD,JD)}var VMe=o((()=>{BMe(),YD(),iD()}));function HMe(e){return zMe(e,aD,XD)}var UMe=o((()=>{BMe(),IMe(),oD()})),QD,WMe=o((()=>{oE(),NT(),QD=aE(MT,`DataView`)})),$D,GMe=o((()=>{oE(),NT(),$D=aE(MT,`Promise`)})),eO,KMe=o((()=>{oE(),NT(),eO=aE(MT,`Set`)})),tO,qMe,nO,rO,iO,aO,JMe,YMe,XMe,ZMe,QMe,oO,sO,cO=o((()=>{WMe(),_D(),GMe(),KMe(),Cke(),RT(),dke(),tO=`[object Map]`,qMe=`[object Object]`,nO=`[object Promise]`,rO=`[object Set]`,iO=`[object WeakMap]`,aO=`[object DataView]`,JMe=iE(QD),YMe=iE(gD),XMe=iE($D),ZMe=iE(eO),QMe=iE(sE),oO=LT,(QD&&oO(new QD(new ArrayBuffer(1)))!=aO||gD&&oO(new gD)!=tO||$D&&oO($D.resolve())!=nO||eO&&oO(new eO)!=rO||sE&&oO(new sE)!=iO)&&(oO=function(e){var t=LT(e),n=t==qMe?e.constructor:void 0,r=n?iE(n):``;if(r)switch(r){case JMe:return aO;case YMe:return tO;case XMe:return nO;case ZMe:return rO;case QMe:return iO}return t}),sO=oO}));function $Me(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&eNe.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var eNe,tNe=o((()=>{eNe=Object.prototype.hasOwnProperty})),lO,nNe=o((()=>{NT(),lO=MT.Uint8Array}));function uO(e){var t=new e.constructor(e.byteLength);return new lO(t).set(new lO(e)),t}var dO=o((()=>{nNe()}));function rNe(e,t){var n=t?uO(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var iNe=o((()=>{dO()}));function aNe(e){var t=new e.constructor(e.source,oNe.exec(e));return t.lastIndex=e.lastIndex,t}var oNe,sNe=o((()=>{oNe=/\w*$/}));function cNe(e){return pO?Object(pO.call(e)):{}}var fO,pO,lNe=o((()=>{FT(),fO=PT?PT.prototype:void 0,pO=fO?fO.valueOf:void 0}));function uNe(e,t){var n=t?uO(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var dNe=o((()=>{dO()}));function fNe(e,t,n){var r=e.constructor;switch(t){case xNe:return uO(e);case pNe:case mNe:return new r(+e);case SNe:return rNe(e,n);case CNe:case wNe:case TNe:case ENe:case DNe:case ONe:case kNe:case ANe:case jNe:return uNe(e,n);case hNe:return new r;case gNe:case yNe:return new r(e);case _Ne:return aNe(e);case vNe:return new r;case bNe:return cNe(e)}}var pNe,mNe,hNe,gNe,_Ne,vNe,yNe,bNe,xNe,SNe,CNe,wNe,TNe,ENe,DNe,ONe,kNe,ANe,jNe,MNe=o((()=>{dO(),iNe(),sNe(),lNe(),dNe(),pNe=`[object Boolean]`,mNe=`[object Date]`,hNe=`[object Map]`,gNe=`[object Number]`,_Ne=`[object RegExp]`,vNe=`[object Set]`,yNe=`[object String]`,bNe=`[object Symbol]`,xNe=`[object ArrayBuffer]`,SNe=`[object DataView]`,CNe=`[object Float32Array]`,wNe=`[object Float64Array]`,TNe=`[object Int8Array]`,ENe=`[object Int16Array]`,DNe=`[object Int32Array]`,ONe=`[object Uint8Array]`,kNe=`[object Uint8ClampedArray]`,ANe=`[object Uint16Array]`,jNe=`[object Uint32Array]`}));function NNe(e){return typeof e.constructor==`function`&&!FE(e)?wke(ID(e)):{}}var PNe=o((()=>{Tke(),LD(),IE()}));function FNe(e){return zT(e)&&sO(e)==INe}var INe,LNe=o((()=>{cO(),BT(),INe=`[object Map]`})),mO,RNe,zNe=o((()=>{LNe(),qE(),QE(),mO=ZE&&ZE.isMap,RNe=mO?KE(mO):FNe}));function BNe(e){return zT(e)&&sO(e)==VNe}var VNe,HNe=o((()=>{cO(),BT(),VNe=`[object Set]`})),hO,UNe,WNe=o((()=>{HNe(),qE(),QE(),hO=ZE&&ZE.isSet,UNe=hO?KE(hO):BNe}));function gO(e,t,n,r,i,a){var o,s=t&GNe,l=t&KNe,u=t&qNe;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!qT(e))return e;var d=GT(e);if(d){if(o=$Me(e),!s)return Ake(e,o)}else{var f=sO(e),p=f==vO||f==QNe;if(UE(e))return kMe(e,s);if(f==yO||f==_O||p&&!i){if(o=l||p?{}:NNe(e),!s)return l?LMe(e,DMe(o,e)):PMe(e,TMe(o,e))}else{if(!bO[f])return i?e:{};o=fNe(e,f,s)}}a||=new zD;var m=a.get(e);if(m)return m;a.set(e,o),UNe(e)?e.forEach(function(r){o.add(gO(r,t,n,r,e,a))}):RNe(e)&&e.forEach(function(r,i){o.set(i,gO(r,t,n,i,e,a))});var h=d?void 0:(u?l?HMe:ZD:l?aD:rD)(e);return Bke(h||e,function(r,i){h&&(i=r,r=e[i]),SE(o,i,gO(r,t,n,i,e,a))}),o}var GNe,KNe,qNe,_O,JNe,YNe,XNe,ZNe,vO,QNe,$Ne,ePe,yO,tPe,nPe,rPe,iPe,aPe,oPe,sPe,cPe,lPe,uPe,dPe,fPe,pPe,mPe,hPe,gPe,bO,_Pe=o((()=>{BD(),mE(),CE(),EMe(),OMe(),AMe(),lE(),FMe(),RMe(),VMe(),UMe(),cO(),tNe(),MNe(),PNe(),KT(),WE(),zNe(),JT(),WNe(),iD(),oD(),GNe=1,KNe=2,qNe=4,_O=`[object Arguments]`,JNe=`[object Array]`,YNe=`[object Boolean]`,XNe=`[object Date]`,ZNe=`[object Error]`,vO=`[object Function]`,QNe=`[object GeneratorFunction]`,$Ne=`[object Map]`,ePe=`[object Number]`,yO=`[object Object]`,tPe=`[object RegExp]`,nPe=`[object Set]`,rPe=`[object String]`,iPe=`[object Symbol]`,aPe=`[object WeakMap]`,oPe=`[object ArrayBuffer]`,sPe=`[object DataView]`,cPe=`[object Float32Array]`,lPe=`[object Float64Array]`,uPe=`[object Int8Array]`,dPe=`[object Int16Array]`,fPe=`[object Int32Array]`,pPe=`[object Uint8Array]`,mPe=`[object Uint8ClampedArray]`,hPe=`[object Uint16Array]`,gPe=`[object Uint32Array]`,bO={},bO[_O]=bO[JNe]=bO[oPe]=bO[sPe]=bO[YNe]=bO[XNe]=bO[cPe]=bO[lPe]=bO[uPe]=bO[dPe]=bO[fPe]=bO[$Ne]=bO[ePe]=bO[yO]=bO[tPe]=bO[nPe]=bO[rPe]=bO[iPe]=bO[pPe]=bO[mPe]=bO[hPe]=bO[gPe]=!0,bO[ZNe]=bO[vO]=bO[aPe]=!1}));function vPe(e){return gO(e,yPe|bPe)}var yPe,bPe,xPe=o((()=>{_Pe(),yPe=1,bPe=4}));function SPe(e){return this.__data__.set(e,CPe),this}var CPe,wPe=o((()=>{CPe=`__lodash_hash_undefined__`}));function TPe(e){return this.__data__.has(e)}var EPe=o((()=>{}));function xO(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new bD;++t<n;)this.add(e[t])}var SO=o((()=>{xD(),wPe(),EPe(),xO.prototype.add=xO.prototype.push=SPe,xO.prototype.has=TPe}));function DPe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var OPe=o((()=>{}));function kPe(e,t){return e.has(t)}var CO=o((()=>{}));function APe(e,t,n,r,i,a){var o=n&jPe,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,m=n&MPe?new xO:void 0;for(a.set(e,t),a.set(t,e);++f<s;){var h=e[f],g=t[f];if(r)var _=o?r(g,h,f,t,e,a):r(h,g,f,e,t,a);if(_!==void 0){if(_)continue;p=!1;break}if(m){if(!DPe(t,function(e,t){if(!kPe(m,t)&&(h===e||i(h,e,n,r,a)))return m.push(t)})){p=!1;break}}else if(!(h===g||i(h,g,n,r,a))){p=!1;break}}return a.delete(e),a.delete(t),p}var jPe,MPe,NPe=o((()=>{SO(),OPe(),CO(),jPe=1,MPe=2}));function PPe(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}var FPe=o((()=>{}));function wO(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var TO=o((()=>{}));function IPe(e,t,n,r,i,a,o){switch(n){case YPe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case JPe:return!(e.byteLength!=t.byteLength||!a(new lO(e),new lO(t)));case zPe:case BPe:case UPe:return bE(+e,+t);case VPe:return e.name==t.name&&e.message==t.message;case WPe:case KPe:return e==t+``;case HPe:var s=PPe;case GPe:var l=r&LPe;if(s||=wO,e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;r|=RPe,o.set(e,t);var d=APe(s(e),s(t),r,i,a,o);return o.delete(e),d;case qPe:if(DO)return DO.call(e)==DO.call(t)}return!1}var LPe,RPe,zPe,BPe,VPe,HPe,UPe,WPe,GPe,KPe,qPe,JPe,YPe,EO,DO,XPe=o((()=>{FT(),nNe(),xE(),NPe(),FPe(),TO(),LPe=1,RPe=2,zPe=`[object Boolean]`,BPe=`[object Date]`,VPe=`[object Error]`,HPe=`[object Map]`,UPe=`[object Number]`,WPe=`[object RegExp]`,GPe=`[object Set]`,KPe=`[object String]`,qPe=`[object Symbol]`,JPe=`[object ArrayBuffer]`,YPe=`[object DataView]`,EO=PT?PT.prototype:void 0,DO=EO?EO.valueOf:void 0}));function ZPe(e,t,n,r,i,a){var o=n&QPe,s=ZD(e),l=s.length;if(l!=ZD(t).length&&!o)return!1;for(var u=l;u--;){var d=s[u];if(!(o?d in t:$Pe.call(t,d)))return!1}var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var m=!0;a.set(e,t),a.set(t,e);for(var h=o;++u<l;){d=s[u];var g=e[d],_=t[d];if(r)var v=o?r(_,g,d,t,e,a):r(g,_,d,e,t,a);if(!(v===void 0?g===_||i(g,_,n,r,a):v)){m=!1;break}h||=d==`constructor`}if(m&&!h){var y=e.constructor,b=t.constructor;y!=b&&`constructor`in e&&`constructor`in t&&!(typeof y==`function`&&y instanceof y&&typeof b==`function`&&b instanceof b)&&(m=!1)}return a.delete(e),a.delete(t),m}var QPe,$Pe,eFe=o((()=>{VMe(),QPe=1,$Pe=Object.prototype.hasOwnProperty}));function tFe(e,t,n,r,i,a){var o=GT(e),s=GT(t),l=o?kO:sO(e),u=s?kO:sO(t);l=l==OO?AO:l,u=u==OO?AO:u;var d=l==AO,f=u==AO,p=l==u;if(p&&UE(e)){if(!UE(t))return!1;o=!0,d=!1}if(p&&!d)return a||=new zD,o||eD(e)?APe(e,t,n,r,i,a):IPe(e,t,l,n,r,i,a);if(!(n&nFe)){var m=d&&jO.call(e,`__wrapped__`),h=f&&jO.call(t,`__wrapped__`);if(m||h){var g=m?e.value():e,_=h?t.value():t;return a||=new zD,i(g,_,n,r,a)}}return p?(a||=new zD,ZPe(e,t,n,r,i,a)):!1}var nFe,OO,kO,AO,jO,rFe=o((()=>{BD(),NPe(),XPe(),eFe(),cO(),KT(),WE(),tD(),nFe=1,OO=`[object Arguments]`,kO=`[object Array]`,AO=`[object Object]`,jO=Object.prototype.hasOwnProperty}));function MO(e,t,n,r,i){return e===t?!0:e==null||t==null||!zT(e)&&!zT(t)?e!==e&&t!==t:tFe(e,t,n,r,MO,i)}var NO=o((()=>{rFe(),BT()}));function iFe(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var l=s[0],u=e[l],d=s[1];if(o&&s[2]){if(u===void 0&&!(l in e))return!1}else{var f=new zD;if(r)var p=r(u,d,l,e,t,f);if(!(p===void 0?MO(d,u,aFe|oFe,r,f):p))return!1}}return!0}var aFe,oFe,sFe=o((()=>{BD(),NO(),aFe=1,oFe=2}));function cFe(e){return e===e&&!qT(e)}var lFe=o((()=>{JT()}));function uFe(e){for(var t=rD(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,cFe(i)]}return t}var dFe=o((()=>{lFe(),iD()}));function fFe(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}var pFe=o((()=>{}));function mFe(e){var t=uFe(e);return t.length==1&&t[0][2]?fFe(t[0][0],t[0][1]):function(n){return n===e||iFe(n,e,t)}}var hFe=o((()=>{sFe(),dFe(),pFe()}));function gFe(e,t){return e!=null&&t in Object(e)}var _Fe=o((()=>{}));function vFe(e,t,n){t=wD(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=ED(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&kE(i)&&gE(o,i)&&(GT(e)||RE(e)))}var yFe=o((()=>{TD(),zE(),KT(),_E(),AE(),DD()}));function bFe(e,t){return e!=null&&vFe(e,t,gFe)}var PO=o((()=>{_Fe(),yFe()}));function xFe(e,t){return sD(e)&&cFe(t)?fFe(ED(e),t):function(n){var r=Zje(n,e);return r===void 0&&r===t?bFe(n,e):MO(t,r,SFe|CFe)}}var SFe,CFe,wFe=o((()=>{NO(),Qje(),PO(),cD(),lFe(),pFe(),DD(),SFe=1,CFe=2}));function TFe(e){return function(t){return t?.[e]}}var FO=o((()=>{}));function EFe(e){return function(t){return OD(t,e)}}var DFe=o((()=>{kD()}));function OFe(e){return sD(e)?TFe(ED(e)):EFe(e)}var kFe=o((()=>{FO(),DFe(),cD(),DD()}));function IO(e){return typeof e==`function`?e:e==null?QT:typeof e==`object`?GT(e)?xFe(e[0],e[1]):mFe(e):OFe(e)}var LO=o((()=>{hFe(),wFe(),$T(),KT(),kFe()}));function AFe(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++i];if(n(a[l],l,a)===!1)break}return t}}var jFe=o((()=>{})),RO,zO=o((()=>{jFe(),RO=AFe()}));function BO(e,t){return e&&RO(e,t,rD)}var VO=o((()=>{zO(),iD()}));function MFe(e,t){return function(n,r){if(n==null)return n;if(!jE(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var NFe=o((()=>{ME()})),HO,UO=o((()=>{VO(),NFe(),HO=MFe(BO)})),WO,PFe=o((()=>{NT(),WO=function(){return MT.Date.now()}})),GO,FFe,IFe,LFe=o((()=>{OE(),xE(),PE(),oD(),GO=Object.prototype,FFe=GO.hasOwnProperty,IFe=DE(function(e,t){e=Object(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&NE(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],o=aD(a),s=-1,l=o.length;++s<l;){var u=o[s],d=e[u];(d===void 0||bE(d,GO[u])&&!FFe.call(e,u))&&(e[u]=a[u])}return e})}));function KO(e,t,n){(n!==void 0&&!bE(e[t],n)||n===void 0&&!(t in e))&&vE(e,t,n)}var RFe=o((()=>{yE(),xE()}));function zFe(e){return zT(e)&&jE(e)}var qO=o((()=>{ME(),BT()}));function JO(e,t){if((t!==`constructor`||typeof e[t]!=`function`)&&t!=`__proto__`)return e[t]}var BFe=o((()=>{}));function VFe(e){return wE(e,aD(e))}var HFe=o((()=>{TE(),oD()}));function UFe(e,t,n,r,i,a,o){var s=JO(e,n),l=JO(t,n),u=o.get(l);if(u){KO(e,n,u);return}var d=a?a(s,l,n+``,e,t,o):void 0,f=d===void 0;if(f){var p=GT(l),m=!p&&UE(l),h=!p&&!m&&eD(l);d=l,p||m||h?GT(s)?d=s:zFe(s)?d=Ake(s):m?(f=!1,d=kMe(l,!0)):h?(f=!1,d=uNe(l,!0)):d=[]:iMe(l)||RE(l)?(d=s,RE(s)?d=VFe(s):(!qT(s)||eE(s))&&(d=NNe(l))):f=!1}f&&(o.set(l,d),i(d,l,r,a,o),o.delete(l)),KO(e,n,d)}var WFe=o((()=>{RFe(),AMe(),dNe(),lE(),PNe(),zE(),KT(),qO(),WE(),tE(),JT(),uMe(),tD(),BFe(),HFe()}));function GFe(e,t,n,r,i){e!==t&&RO(t,function(a,o){if(i||=new zD,qT(a))UFe(e,t,o,n,GFe,r,i);else{var s=r?r(JO(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),KO(e,o,s)}},aD)}var KFe=o((()=>{BD(),RFe(),zO(),WFe(),JT(),oD(),BFe()}));function qFe(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var JFe=o((()=>{}));function YO(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var YFe=o((()=>{}));function XO(e){return typeof e==`function`?e:QT}var ZO=o((()=>{$T()}));function QO(e,t){return(GT(e)?Bke:HO)(e,XO(t))}var XFe=o((()=>{mE(),UO(),ZO(),KT()})),ZFe=o((()=>{XFe()}));function QFe(e,t){var n=[];return HO(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}var $Fe=o((()=>{UO()}));function $O(e,t){return(GT(e)?jMe:QFe)(e,IO(t,3))}var eIe=o((()=>{GD(),$Fe(),LO(),KT()}));function tIe(e){return function(t,n,r){var i=Object(t);if(!jE(t)){var a=IO(n,3);t=rD(t),n=function(e){return a(i[e],e,i)}}var o=e(t,n,r);return o>-1?i[a?t[o]:o]:void 0}}var nIe=o((()=>{LO(),ME(),iD()}));function rIe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:tke(n);return i<0&&(i=iIe(r+i,0)),Vke(e,IO(t,3),i)}var iIe,aIe=o((()=>{hE(),LO(),nke(),iIe=Math.max})),ek,oIe=o((()=>{nIe(),aIe(),ek=tIe(rIe)}));function sIe(e,t){var n=-1,r=jE(e)?Array(e.length):[];return HO(e,function(e,i,a){r[++n]=t(e,i,a)}),r}var cIe=o((()=>{UO(),ME()}));function tk(e,t){return(GT(e)?UT:sIe)(e,IO(t,3))}var lIe=o((()=>{WT(),LO(),cIe(),KT()}));function uIe(e,t){return e==null?e:RO(e,XO(t),aD)}var dIe=o((()=>{zO(),ZO(),oD()}));function fIe(e,t){return e&&BO(e,XO(t))}var pIe=o((()=>{VO(),ZO()}));function mIe(e,t){return e>t}var hIe=o((()=>{}));function gIe(e,t){return e!=null&&_Ie.call(e,t)}var _Ie,vIe=o((()=>{_Ie=Object.prototype.hasOwnProperty}));function yIe(e,t){return e!=null&&vFe(e,t,gIe)}var bIe=o((()=>{vIe(),yFe()})),xIe=o((()=>{RT(),KT(),BT()}));function SIe(e,t){return UT(t,function(t){return e[t]})}var CIe=o((()=>{WT()}));function nk(e){return e==null?[]:SIe(e,rD(e))}var wIe=o((()=>{CIe(),iD()}));function TIe(e){if(e==null)return!0;if(jE(e)&&(GT(e)||typeof e==`string`||typeof e.splice==`function`||UE(e)||eD(e)||RE(e)))return!e.length;var t=sO(e);if(t==EIe||t==DIe)return!e.size;if(FE(e))return!qAe(e).length;for(var n in e)if(OIe.call(e,n))return!1;return!0}var EIe,DIe,OIe,kIe=o((()=>{nD(),cO(),zE(),KT(),ME(),WE(),IE(),tD(),EIe=`[object Map]`,DIe=`[object Set]`,OIe=Object.prototype.hasOwnProperty}));function rk(e){return e===void 0}var AIe=o((()=>{}));function jIe(e,t){return e<t}var ik=o((()=>{}));function ak(e,t){var n={};return t=IO(t,3),BO(e,function(e,r,i){vE(n,r,t(e,r,i))}),n}var MIe=o((()=>{yE(),VO(),LO()}));function ok(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(o!=null&&(s===void 0?o===o&&!VT(o):n(o,s)))var s=o,l=a}return l}var sk=o((()=>{HT()}));function ck(e){return e&&e.length?ok(e,QT,mIe):void 0}var NIe=o((()=>{sk(),hIe(),$T()})),lk,PIe=o((()=>{KFe(),rAe(),lk=nAe(function(e,t,n){GFe(e,t,n)})}));function uk(e){return e&&e.length?ok(e,QT,jIe):void 0}var FIe=o((()=>{sk(),ik(),$T()}));function dk(e,t){return e&&e.length?ok(e,IO(t,2),jIe):void 0}var IIe=o((()=>{sk(),LO(),ik()}));function LIe(e,t,n,r){if(!qT(e))return e;t=wD(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var l=ED(t[i]),u=n;if(l===`__proto__`||l===`constructor`||l===`prototype`)return e;if(i!=o){var d=s[l];u=r?r(d,l,s):void 0,u===void 0&&(u=qT(d)?d:gE(t[i+1])?[]:{})}SE(s,l,u),s=s[l]}return e}var RIe=o((()=>{CE(),TD(),_E(),JT(),DD()}));function zIe(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=OD(e,o);n(s,o)&&LIe(a,wD(o,e),s)}return a}var BIe=o((()=>{kD(),RIe(),TD()}));function VIe(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var HIe=o((()=>{}));function UIe(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,a=VT(e),o=t!==void 0,s=t===null,l=t===t,u=VT(t);if(!s&&!u&&!a&&e>t||a&&o&&l&&!s&&!u||r&&o&&l||!n&&l||!i)return 1;if(!r&&!a&&!u&&e<t||u&&n&&i&&!r&&!a||s&&n&&i||!o&&i||!l)return-1}return 0}var WIe=o((()=>{HT()}));function GIe(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var l=UIe(i[r],a[r]);if(l)return r>=s?l:l*(n[r]==`desc`?-1:1)}return e.index-t.index}var KIe=o((()=>{WIe()}));function qIe(e,t,n){t=t.length?UT(t,function(e){return GT(e)?function(t){return OD(t,e.length===1?e[0]:e)}:e}):[QT];var r=-1;return t=UT(t,KE(IO)),VIe(sIe(e,function(e,n,i){return{criteria:UT(t,function(t){return t(e)}),index:++r,value:e}}),function(e,t){return GIe(e,t,n)})}var JIe=o((()=>{WT(),kD(),LO(),cIe(),HIe(),qE(),KIe(),$T(),KT()})),YIe=o((()=>{FO()})),fk,XIe,ZIe,QIe,pk,mk,$Ie,hk,gk,_k,eLe,vk,yk,tLe,nLe,rLe,iLe=o((()=>{fk=`\\ud800-\\udfff`,XIe=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,ZIe=`\\ufe0e\\ufe0f`,QIe=`[`+fk+`]`,pk=`[`+XIe+`]`,mk=`\\ud83c[\\udffb-\\udfff]`,$Ie=`(?:`+pk+`|`+mk+`)`,hk=`[^`+fk+`]`,gk=`(?:\\ud83c[\\udde6-\\uddff]){2}`,_k=`[\\ud800-\\udbff][\\udc00-\\udfff]`,eLe=`\\u200d`,vk=$Ie+`?`,yk=`[`+ZIe+`]?`,tLe=`(?:`+eLe+`(?:`+[hk,gk,_k].join(`|`)+`)`+yk+vk+`)*`,nLe=yk+vk+tLe,rLe=`(?:`+[hk+pk+`?`,pk,gk,_k,QIe].join(`|`)+`)`,RegExp(mk+`(?=`+mk+`)|`+rLe+nLe,`g`)})),aLe=o((()=>{YIe(),dMe(),iLe()}));function oLe(e,t){return zIe(e,t,function(t,n){return bFe(e,n)})}var sLe=o((()=>{BIe(),PO()})),bk,cLe=o((()=>{sLe(),rMe(),bk=nMe(function(e,t){return e==null?{}:oLe(e,t)})}));function lLe(e,t,n,r){for(var i=-1,a=dLe(uLe((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}var uLe,dLe,fLe=o((()=>{uLe=Math.ceil,dLe=Math.max}));function pLe(e){return function(t,n,r){return r&&typeof r!=`number`&&NE(t,n,r)&&(n=r=void 0),t=YT(t),n===void 0?(n=t,t=0):n=YT(n),r=r===void 0?t<n?1:-1:YT(r),lLe(t,n,r,e)}}var mLe=o((()=>{fLe(),PE(),ZT()})),xk,hLe=o((()=>{mLe(),xk=pLe()}));function gLe(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}var _Le=o((()=>{}));function Sk(e,t,n){var r=GT(e)?fMe:gLe,i=arguments.length<3;return r(e,IO(t,4),n,i,HO)}var vLe=o((()=>{pMe(),UO(),LO(),_Le(),KT()})),yLe=o((()=>{nD(),cO(),ME(),xIe(),aLe()})),Ck,bLe=o((()=>{PD(),JIe(),OE(),PE(),Ck=DE(function(e,t){if(e==null)return[];var n=t.length;return n>1&&NE(e,t[0],t[1])?t=[]:n>2&&NE(t[0],t[1],t[2])&&(t=[t[0]]),qIe(e,ND(t,1),[])})})),xLe,SLe=o((()=>{KMe(),kke(),TO(),xLe=eO&&1/wO(new eO([,-0]))[1]==1/0?function(e){return new eO(e)}:Oke}));function CLe(e,t,n){var r=-1,i=Jke,a=e.length,o=!0,s=[],l=s;if(n)o=!1,i=qFe;else if(a>=wLe){var u=t?null:xLe(e);if(u)return wO(u);o=!1,i=kPe,l=new xO}else l=t?[]:s;outer:for(;++r<a;){var d=e[r],f=t?t(d):d;if(d=n||d!==0?d:0,o&&f===f){for(var p=l.length;p--;)if(l[p]===f)continue outer;t&&l.push(f),s.push(d)}else i(l,f,n)||(l!==s&&l.push(f),s.push(d))}return s}var wLe,TLe=o((()=>{SO(),Yke(),JFe(),CO(),SLe(),TO(),wLe=200})),ELe,DLe=o((()=>{PD(),OE(),TLe(),qO(),ELe=DE(function(e){return CLe(ND(e,1,zFe,!0))})}));function wk(e){var t=++OLe;return Yje(e)+t}var OLe,kLe=o((()=>{CD(),OLe=0}));function ALe(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:void 0;n(o,e[r],s)}return o}var jLe=o((()=>{}));function MLe(e,t){return ALe(e||[],t||[],SE)}var NLe=o((()=>{CE(),jLe()})),Tk=o((()=>{HT(),BOe(),nke(),$T(),Cke(),Tke(),JT(),NT(),Dke(),kke(),KT(),BT(),lE(),Fke(),pE(),mE(),Yke(),_E(),CE(),TE(),rAe(),ME(),IE(),iD(),oD(),Qje(),rMe(),OE(),RT(),uMe(),yE(),DD(),CD(),dMe(),pMe(),$Oe(),PE(),_Pe(),xPe(),jD(),PD(),WT(),LO(),Ike(),UO(),EMe(),PFe(),LFe(),KFe(),SO(),JFe(),qE(),CO(),qO(),YFe(),ZFe(),jFe(),NFe(),ZO(),cO(),FPe(),xE(),eIe(),oIe(),aIe(),VO(),nIe(),hE(),lIe(),tMe(),XFe(),dIe(),pIe(),GD(),tE(),hIe(),bIe(),PO(),ZT(),qke(),xIe(),wIe(),TD(),kD(),zE(),QE(),WE(),kIe(),NO(),AE(),zNe(),sFe(),dFe(),bke(),ske(),pAe(),WNe(),tD(),AIe(),Uke(),ik(),MIe(),hFe(),wFe(),NIe(),sk(),Vje(),PIe(),FIe(),IIe(),FT(),TO(),UMe(),BIe(),JIe(),OPe(),aLe(),cLe(),kFe(),WIe(),hLe(),mLe(),vLe(),_Le(),$Fe(),RIe(),yLe(),bLe(),KD(),CIe(),oAe(),Jje(),HFe(),LD(),KOe(),UOe(),DLe(),TLe(),kLe(),FO(),NLe(),jLe()}));function PLe(e,t){e[t]?e[t]++:e[t]=1}function FLe(e,t){--e[t]||delete e[t]}function Ek(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}return i+kk+a+kk+(rk(r)?LLe:r)}function ILe(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function Dk(e,t){return Ek(e,t.v,t.w,t.name)}var LLe,Ok,kk,Ak,RLe=o((()=>{Tk(),LLe=`\0`,Ok=`\0`,kk=``,Ak=class{constructor(e={}){this._isDirected=!Object.prototype.hasOwnProperty.call(e,`directed`)||e.directed,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,`compound`)?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=uE(void 0),this._defaultEdgeLabelFn=uE(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Ok]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return eE(e)||(e=uE(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return rD(this._nodes)}sources(){var e=this;return $O(this.nodes(),function(t){return TIe(e._in[t])})}sinks(){var e=this;return $O(this.nodes(),function(t){return TIe(e._out[t])})}setNodes(e,t){var n=arguments,r=this;return QO(e,function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=Ok,this._children[e]={},this._children[Ok][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],QO(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),QO(rD(this._in[e]),t),delete this._in[e],delete this._preds[e],QO(rD(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(rk(t))t=Ok;else{t+=``;for(var n=t;!rk(n);n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==Ok)return t}}children(e){if(rk(e)&&(e=Ok),this._isCompound){var t=this._children[e];if(t)return rD(t)}else if(e===Ok)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return rD(t)}successors(e){var t=this._sucs[e];if(t)return rD(t)}neighbors(e){var t=this.predecessors(e);if(t)return ELe(t,this.successors(e))}isLeaf(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;QO(this._nodes,function(n,r){e(r)&&t.setNode(r,n)}),QO(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function i(e){var a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&QO(t.nodes(),function(e){t.setParent(e,i(e))}),t}setDefaultEdgeLabel(e){return eE(e)||(e=uE(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return nk(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return Sk(e,function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,r,i=!1,a=arguments[0];typeof a==`object`&&a&&`v`in a?(e=a.v,t=a.w,n=a.name,arguments.length===2&&(r=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),e=``+e,t=``+t,rk(n)||(n=``+n);var o=Ek(this._isDirected,e,t,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return i&&(this._edgeLabels[o]=r),this;if(!rk(n)&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[o]=i?r:this._defaultEdgeLabelFn(e,t,n);var s=ILe(this._isDirected,e,t,n);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[o]=s,PLe(this._preds[t],e),PLe(this._sucs[e],t),this._in[t][o]=s,this._out[e][o]=s,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?Dk(this._isDirected,arguments[0]):Ek(this._isDirected,e,t,n);return this._edgeLabels[r]}hasEdge(e,t,n){var r=arguments.length===1?Dk(this._isDirected,arguments[0]):Ek(this._isDirected,e,t,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?Dk(this._isDirected,arguments[0]):Ek(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],FLe(this._preds[t],e),FLe(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=nk(n);return t?$O(r,function(e){return e.v===t}):r}}outEdges(e,t){var n=this._out[e];if(n){var r=nk(n);return t?$O(r,function(e){return e.w===t}):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},Ak.prototype._nodeCount=0,Ak.prototype._edgeCount=0})),jk=o((()=>{RLe()})),zLe=l({captureNodeSizes:()=>ULe,shouldCaptureSizes:()=>BLe});function Mk(){if(!(typeof globalThis>`u`))return globalThis}function BLe(){return!!Mk()?.mermaidCaptureSizes}function VLe(){return typeof location>`u`?`browser-dev`:`${location.pathname}${location.search}`}function HLe(e,t){let n=Mk();if(!n)return;let r=t.node(),i=((r&&`ownerSVGElement`in r?r.ownerSVGElement:null)??r)?.id??`(unknown)`;n.mermaidCapturedSizes??=[];let a={svgId:i,sizes:e};n.mermaidCapturedSizes.push(a),n.mermaidLastCapturedSizes=a}function ULe(e,t){let n=[];for(let e of t.nodes)e.isGroup||n.push({id:e.id,width:e.width??0,height:e.height??0});n.length!==0&&HLe({metadata:{captureVersion:WLe,capturedAt:new Date().toISOString(),capturedFrom:VLe()},nodes:n},e)}var WLe,GLe=o((()=>{Vp(),WLe=1,W(Mk,`getCaptureGlobal`),W(BLe,`shouldCaptureSizes`),W(VLe,`capturedFromLocation`),W(HLe,`emitCapturedSizes`),W(ULe,`captureNodeSizes`)}));function Nk(e,{edgePathsClass:t=`edges edgePaths`}={}){let n=e.insert(`g`).attr(`class`,`root`);return{clusters:n.insert(`g`).attr(`class`,`clusters`),edgePaths:n.insert(`g`).attr(`class`,t),edgeLabels:n.insert(`g`).attr(`class`,`edgeLabels`),nodes:n.insert(`g`).attr(`class`,`nodes`),rootGroups:n}}async function KLe(e,t){if(t.label){let{shapeSvg:n,bbox:r}=await qw(e,t);t.labelBBox={width:r.width,height:r.height},n.remove()}else t.labelBBox={width:0,height:0}}async function Pk(e,t,n){let r=await fT(e,t,n),i=r.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,r}async function qLe(e,t){let n=new Ak({multigraph:!0,compound:!0}),r=[...t.edges],i=Oy(),a=Nk(e),{edgeLabels:o,nodes:s}=a,l=new Map,u=e.node()!=null;await Promise.all(t.nodes.map(async e=>{if(e.isGroup)u&&await KLe(s,e),n.setNode(e.id,{...e});else{if(u){let t=await Pk(s,e,{config:i,dir:e.dir});l.set(e.id,t)}n.setNode(e.id,{...e})}}));for(let e of r)u&&dOe(e)&&await DT(o,e),n.setEdge(e.start,e.end,{...e},e.id),t.edges.some(t=>t.id===e.id)||t.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:n}=await Rp(async()=>{let{captureNodeSizes:e}=await Promise.resolve().then(()=>(GLe(),zLe));return{captureNodeSizes:e}},void 0);n(e,t)}return{graph:n,groups:a,nodeElements:l}}function Fk({prepareLayout:e,measureLayout:t,runLayoutCore:n,paintLayout:r,afterPaint:i,paintOptions:a}){let o=t??Lk;return W(async function(t,s,l,u){let d=s.select(`g`);(l?.insertMarkers??AT)(d,t.markers,t.type,t.diagramId),Ik();let f={element:d,helpers:l,options:u};f.preparedLayout=await e?.(t,f);let p=await o(t,f),m=await n(t,f),h={...f,measure:p};r?await r(t,h,m):await Rk(t,h,a),await i?.(t,h,m)},`render`)}function Ik(){qDe(),uOe(),QDe(),tRe()}async function Lk(e,{element:t}){return await qLe(t,e)}async function Rk(e,t,n={}){let{measure:r}=t,{groups:i}=r;for(let r of n.getNodes?.(e,t)??e.nodes)n.skipNode?.(r,t)||await JLe(i,r,t,n);let a=XLe(e.nodes);for(let r of e.edges)ZLe(r,n)||await QLe(i,r,a,e,n,t)}async function JLe(e,t,n,r){t.clusterNode?hT(t):YLe(t,n,r)?await _T(e.clusters,t):hT(t)}function YLe(e,t,n){return e.isGroup===!0&&(n.isCluster?.(e,t)??!0)}function XLe(e){let t=new Map;for(let n of e)n?.id&&t.set(n.id,n);return t}function ZLe(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}async function QLe(e,t,n,r,i,a){let o=kT(e.edgePaths,{...t},i.clusterDb??new Map,r.type,zk(t.start,t,n,a,i),zk(t.end,t,n,a,i),r.diagramId,$Le(t,i));dOe(t)&&(wT.has(t.id)||await DT(e.edgeLabels,t),eRe(t,o))}function zk(e,t,n,r,i){return i.getEdgeNode?.(e,t,r)??(e?n.get(e)??{}:{})}function $Le(e,t){return typeof t.skipIntersect==`function`?t.skipIntersect(e):t.skipIntersect??!1}function eRe(e,t){let n=t?.updatedPath??t?.originalPath,r=Rv(),{subGraphTitleTotalMargin:i}=pT({flowchart:r.flowchart??{}});if(e.label){let r=wT.get(e.id),a=e.x,o=e.y;if(n){let r=TC.calcLabelPosition(n);G.debug(`Moving label `+e.label+` from (`,a,`,`,o,`) to (`,r.x,`,`,r.y,`) abc88`),t?.updatedPath&&(a=r.x,o=r.y)}r.attr(`transform`,`translate(${a}, ${o+i/2})`)}if(e?.startLabelLeft){let t=TT.get(e.id).startLeft,r=e?.x,i=e?.y;if(n){let t=TC.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.startLabelRight){let t=TT.get(e.id).startRight,r=e.x,i=e.y;if(n){let t=TC.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelLeft){let t=TT.get(e.id).endLeft,r=e.x,i=e.y;if(n){let t=TC.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelRight){let t=TT.get(e.id).endRight,r=e.x,i=e.y;if(n){let t=TC.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}}var Bk,Vk,Hk,tRe,Uk,nRe,Wk,Gk,rRe,Kk,qk,iRe,Jk,Yk,Xk,Zk,aRe,Qk=o((()=>{vT(),jT(),gT(),dT(),OC(),Iy(),Gp(),Vp(),jk(),zp(),W(Nk,`createLayoutElementGroups`),W(KLe,`measureGroupLabel`),W(Pk,`insertMeasuredNode`),W(qLe,`createGraphWithElements`),Bk=new Map,Vk=new Map,Hk=new Map,tRe=W(()=>{Vk.clear(),Hk.clear(),Bk.clear()},`clear`),Uk=W((e,t)=>{let n=Vk.get(t)||[];return G.trace(`In isDescendant`,t,` `,e,` = `,n.includes(e)),n.includes(e)},`isDescendant`),nRe=W((e,t)=>{let n=Vk.get(t)||[];return G.info(`Descendants of `,t,` is `,n),G.info(`Edge is `,e),e.v===t||e.w===t?!1:n?n.includes(e.v)||Uk(e.v,t)||Uk(e.w,t)||n.includes(e.w):(G.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),Wk=W((e,t,n,r)=>{G.debug(`Copying children of `,e,`root`,r,`data`,t.node(e),r);let i=t.children(e)||[];e!==r&&i.push(e),G.debug(`Copying (nodes) clusterId`,e,`nodes`,i),i.forEach(i=>{if(t.children(i).length>0)Wk(i,t,n,r);else{let a=t.node(i);G.info(`cp `,i,` to `,r,` with parent `,e),n.setNode(i,a),r!==t.parent(i)&&(G.debug(`Setting parent`,i,t.parent(i)),n.setParent(i,t.parent(i))),e!==r&&i!==e?(G.debug(`Setting parent`,i,e),n.setParent(i,e)):(G.info(`In copy `,e,`root`,r,`data`,t.node(e),r),G.debug(`Not Setting parent for node=`,i,`cluster!==rootId`,e!==r,`node!==clusterId`,i!==e));let o=t.edges(i);G.debug(`Copying Edges`,o),o.forEach(i=>{G.info(`Edge`,i);let a=t.edge(i.v,i.w,i.name);G.info(`Edge data`,a,r);try{nRe(i,r)?(G.info(`Copying as `,i.v,i.w,a,i.name),n.setEdge(i.v,i.w,a,i.name),G.info(`newGraph edges `,n.edges(),n.edge(n.edges()[0]))):G.info(`Skipping copy of edge `,i.v,`-->`,i.w,` rootId: `,r,` clusterId:`,e)}catch(e){G.error(e)}})}G.debug(`Removing node`,i),t.removeNode(i)})},`copy`),Gk=W((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)Hk.set(i,e),r=[...r,...Gk(i,t)];return r},`extractDescendants`),rRe=W((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),Kk=W((e,t,n)=>{let r=t.children(e);if(G.trace(`Searching children of id `,e,r),r.length<1)return e;let i;for(let e of r){let r=Kk(e,t,n),a=rRe(t,n,r);if(r){if(a.length>0)i=r;else return r}}return i},`findNonClusterChild`),qk=W(e=>!Bk.has(e)||!Bk.get(e).externalConnections?e:Bk.has(e)?Bk.get(e).id:e,`getAnchorId`),iRe=W((e,t)=>{if(!e||t>10){G.debug(`Opting out, no graph `);return}G.debug(`Opting in, graph `),e.nodes().forEach(function(t){e.children(t).length>0&&(G.debug(`Cluster identified`,t,` Replacement id in edges: `,Kk(t,e,t)),Vk.set(t,Gk(t,e)),Bk.set(t,{id:Kk(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let n=e.children(t),r=e.edges();n.length>0?(G.debug(`Cluster identified`,t,Vk),r.forEach(e=>{Uk(e.v,t)^Uk(e.w,t)&&(G.debug(`Edge: `,e,` leaves cluster `,t),G.debug(`Descendants of XXX `,t,`: `,Vk.get(t)),Bk.get(t).externalConnections=!0)})):G.debug(`Not a cluster `,t,Vk)});for(let t of Bk.keys()){let n=Bk.get(t).id,r=e.parent(n);r!==t&&Bk.has(r)&&!Bk.get(r).externalConnections&&(Bk.get(t).id=r);let i=e.edges().some(e=>e.v===t);if(n&&Bk.get(t)?.externalConnections&&i&&Zk(e,n,t)){let r=aRe(e,t,e.parent(n));r&&(Bk.get(t).id=r)}}e.edges().forEach(function(t){let n=e.edge(t);G.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),G.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let r=t.v,i=t.w;if(G.debug(`Fix XXX`,Bk,`ids:`,t.v,t.w,`Translating: `,Bk.get(t.v),` --- `,Bk.get(t.w)),Bk.get(t.v)||Bk.get(t.w)){if(G.debug(`Fixing and trying - removing XXX`,t.v,t.w,t.name),r=qk(t.v),i=qk(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v){let i=e.parent(r);Bk.get(i).externalConnections=!0,n.fromCluster=t.v}if(i!==t.w){let r=e.parent(i);Bk.get(r).externalConnections=!0,n.toCluster=t.w}G.debug(`Fix Replacing with XXX`,r,i,t.name),e.setEdge(r,i,n,t.name)}}),Jk(e,0),G.trace(Bk)},`adjustClustersAndEdges`),Jk=W((e,t)=>{if(t>10){G.error(`Bailing out`);return}let n=e.nodes(),r=!1;for(let t of n){let n=e.children(t);r||=n.length>0}if(!r){G.debug(`Done, no node has children`,e.nodes());return}G.debug(`Nodes = `,n,t);for(let r of n)if(G.debug(`Extracting node`,r,Bk,Bk.has(r)&&!Bk.get(r).externalConnections,!e.parent(r),e.node(r),e.children(`D`),` Depth `,t),!Bk.has(r))G.debug(`Not a cluster`,r,t);else if(!Bk.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){G.debug(`Cluster without external connections, without a parent and with children`,r,t);let n=e.graph().rankdir===`TB`?`LR`:`TB`;Bk.get(r)?.clusterData?.dir&&(n=Bk.get(r).clusterData.dir,G.debug(`Fixing dir`,Bk.get(r).clusterData.dir,n));let i=new Ak({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Wk(r,e,i,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:Bk.get(r).clusterData,label:Bk.get(r).label,graph:i})}else G.debug(`Cluster ** `,r,` **not meeting the criteria !externalConnections:`,!Bk.get(r).externalConnections,` no parent: `,!e.parent(r),` children `,e.children(r)&&e.children(r).length>0,e.children(`D`),t),G.debug(Bk);n=e.nodes(),G.debug(`New list of nodes`,n);for(let r of n){let n=e.node(r);G.debug(` Now next level`,r,n),n?.clusterNode&&Jk(n.graph,t+1)}},`extractor`),Yk=W((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=Yk(e,e.children(t));n=[...n,...r]}),n},`sorter`),Xk=W(e=>Yk(e,e.children()),`sortNodesByHierarchy`),Zk=W((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=Bk.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),aRe=W((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||Uk(i,n))continue;let r=Kk(i,e,t);if(r&&!Zk(e,r,t))return r}return null},`findSafeAnchorNode`),W(Fk,`createCommonLayoutRenderer`),W(Ik,`clearLayoutRenderState`),W(Lk,`defaultMeasureLayout`),W(Rk,`paintLayoutData`),W(JLe,`paintLayoutNode`),W(YLe,`shouldPaintAsCluster`),W(XLe,`buildNodeLookup`),W(ZLe,`shouldSkipPaintEdge`),W(QLe,`paintLayoutEdge`),W(zk,`getRenderedNode`),W($Le,`shouldSkipIntersect`),W(eRe,`positionRenderedEdgeLabel`)}));function oRe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function $k(){if(dRe)return SA;dRe=1;function e(e){return e==null}W(e,`isNothing`);function t(e){return typeof e==`object`&&!!e}W(t,`isObject`);function n(t){return Array.isArray(t)?t:e(t)?[]:[t]}W(n,`toArray`);function r(e,t){if(t){let n=Object.keys(t);for(let r=0,i=n.length;r<i;r+=1){let i=n[r];e[i]=t[i]}}return e}W(r,`extend`);function i(e,t){let n=``;for(let r=0;r<t;r+=1)n+=e;return n}W(i,`repeat`);function a(e){return e===0&&1/e==-1/0}return W(a,`isNegativeZero`),SA.isNothing=e,SA.isObject=t,SA.toArray=n,SA.repeat=i,SA.isNegativeZero=a,SA.extend=r,SA}function eA(){if(fRe)return CA;fRe=1;function e(e,t){let n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
|
|
563
|
+
L0,20`).attr(`stroke-linejoin`,`miter`)},`requirement_arrow_neo`),requirement_contains_neo:W((e,t,n)=>{let{themeVariables:r}=Rv(),{strokeWidth:i}=r,a=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_containsStart`).attr(`refX`,0).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`g`);a.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),a.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),a.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10),a.selectAll(`*`).attr(`stroke-width`,`${i}`)},`requirement_contains_neo`)},AT=yOe})),xOe,SOe=o((()=>{xOe=typeof global==`object`&&global&&global.Object===Object&&global})),COe,MT,NT=o((()=>{SOe(),COe=typeof self==`object`&&self&&self.Object===Object&&self,MT=xOe||COe||Function(`return this`)()})),PT,FT=o((()=>{NT(),PT=MT.Symbol}));function wOe(e){var t=EOe.call(e,IT),n=e[IT];try{e[IT]=void 0;var r=!0}catch{}var i=DOe.call(e);return r&&(t?e[IT]=n:delete e[IT]),i}var TOe,EOe,DOe,IT,OOe=o((()=>{FT(),TOe=Object.prototype,EOe=TOe.hasOwnProperty,DOe=TOe.toString,IT=PT?PT.toStringTag:void 0}));function kOe(e){return AOe.call(e)}var AOe,jOe=o((()=>{AOe=Object.prototype.toString}));function LT(e){return e==null?e===void 0?NOe:MOe:POe&&POe in Object(e)?wOe(e):kOe(e)}var MOe,NOe,POe,RT=o((()=>{FT(),OOe(),jOe(),MOe=`[object Null]`,NOe=`[object Undefined]`,POe=PT?PT.toStringTag:void 0}));function zT(e){return typeof e==`object`&&!!e}var BT=o((()=>{}));function VT(e){return typeof e==`symbol`||zT(e)&<(e)==FOe}var FOe,HT=o((()=>{RT(),BT(),FOe=`[object Symbol]`}));function UT(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var WT=o((()=>{})),GT,KT=o((()=>{GT=Array.isArray}));function IOe(e){if(typeof e==`string`)return e;if(GT(e))return UT(e,IOe)+``;if(VT(e))return zOe?zOe.call(e):``;var t=e+``;return t==`0`&&1/e==-LOe?`-0`:t}var LOe,ROe,zOe,BOe=o((()=>{FT(),WT(),KT(),HT(),LOe=1/0,ROe=PT?PT.prototype:void 0,zOe=ROe?ROe.toString:void 0}));function VOe(e){for(var t=e.length;t--&&HOe.test(e.charAt(t)););return t}var HOe,UOe=o((()=>{HOe=/\s/}));function WOe(e){return e&&e.slice(0,VOe(e)+1).replace(GOe,``)}var GOe,KOe=o((()=>{UOe(),GOe=/^\s+/}));function qT(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var JT=o((()=>{}));function qOe(e){if(typeof e==`number`)return e;if(VT(e))return JOe;if(qT(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=qT(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=WOe(e);var n=XOe.test(e);return n||ZOe.test(e)?QOe(e.slice(2),n?2:8):YOe.test(e)?JOe:+e}var JOe,YOe,XOe,ZOe,QOe,$Oe=o((()=>{KOe(),JT(),HT(),JOe=NaN,YOe=/^[-+]0x[0-9a-f]+$/i,XOe=/^0b[01]+$/i,ZOe=/^0o[0-7]+$/i,QOe=parseInt}));function YT(e){return e?(e=qOe(e),e===XT||e===-XT?(e<0?-1:1)*eke:e===e?e:0):e===0?e:0}var XT,eke,ZT=o((()=>{$Oe(),XT=1/0,eke=17976931348623157e292}));function tke(e){var t=YT(e),n=t%1;return t===t?n?t-n:t:0}var nke=o((()=>{ZT()}));function QT(e){return e}var $T=o((()=>{}));function eE(e){if(!qT(e))return!1;var t=LT(e);return t==ike||t==ake||t==rke||t==oke}var rke,ike,ake,oke,tE=o((()=>{RT(),JT(),rke=`[object AsyncFunction]`,ike=`[object Function]`,ake=`[object GeneratorFunction]`,oke=`[object Proxy]`})),nE,ske=o((()=>{NT(),nE=MT[`__core-js_shared__`]}));function cke(e){return!!rE&&rE in e}var rE,lke=o((()=>{ske(),rE=function(){var e=/[^.]+$/.exec(nE&&nE.keys&&nE.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}()}));function iE(e){if(e!=null){try{return uke.call(e)}catch{}try{return e+``}catch{}}return``}var uke,dke=o((()=>{uke=Function.prototype.toString}));function fke(e){return!qT(e)||cke(e)?!1:(eE(e)?yke:mke).test(iE(e))}var pke,mke,hke,gke,_ke,vke,yke,bke=o((()=>{tE(),lke(),JT(),dke(),pke=/[\\^$.*+?()[\]{}|]/g,mke=/^\[object .+?Constructor\]$/,hke=Function.prototype,gke=Object.prototype,_ke=hke.toString,vke=gke.hasOwnProperty,yke=RegExp(`^`+_ke.call(vke).replace(pke,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`)}));function xke(e,t){return e?.[t]}var Ske=o((()=>{}));function aE(e,t){var n=xke(e,t);return fke(n)?n:void 0}var oE=o((()=>{bke(),Ske()})),sE,Cke=o((()=>{oE(),NT(),sE=aE(MT,`WeakMap`)})),cE,wke,Tke=o((()=>{JT(),cE=Object.create,wke=function(){function e(){}return function(t){if(!qT(t))return{};if(cE)return cE(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}()}));function Eke(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Dke=o((()=>{}));function Oke(){}var kke=o((()=>{}));function Ake(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var lE=o((()=>{}));function jke(e){var t=0,n=0;return function(){var r=Pke(),i=Nke-(r-n);if(n=r,i>0){if(++t>=Mke)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Mke,Nke,Pke,Fke=o((()=>{Mke=800,Nke=16,Pke=Date.now}));function uE(e){return function(){return e}}var Ike=o((()=>{})),dE,Lke=o((()=>{oE(),dE=function(){try{var e=aE(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),Rke,zke=o((()=>{Ike(),Lke(),$T(),Rke=dE?function(e,t){return dE(e,`toString`,{configurable:!0,enumerable:!1,value:uE(t),writable:!0})}:QT})),fE,pE=o((()=>{zke(),Fke(),fE=jke(Rke)}));function Bke(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var mE=o((()=>{}));function Vke(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var hE=o((()=>{}));function Hke(e){return e!==e}var Uke=o((()=>{}));function Wke(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var Gke=o((()=>{}));function Kke(e,t,n){return t===t?Wke(e,t,n):Vke(e,Hke,n)}var qke=o((()=>{hE(),Uke(),Gke()}));function Jke(e,t){return!!(e!=null&&e.length)&&Kke(e,t,0)>-1}var Yke=o((()=>{qke()}));function gE(e,t){var n=typeof e;return t??=Xke,!!t&&(n==`number`||n!=`symbol`&&Zke.test(e))&&e>-1&&e%1==0&&e<t}var Xke,Zke,_E=o((()=>{Xke=9007199254740991,Zke=/^(?:0|[1-9]\d*)$/}));function vE(e,t,n){t==`__proto__`&&dE?dE(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var yE=o((()=>{Lke()}));function bE(e,t){return e===t||e!==e&&t!==t}var xE=o((()=>{}));function SE(e,t,n){var r=e[t];(!(Qke.call(e,t)&&bE(r,n))||n===void 0&&!(t in e))&&vE(e,t,n)}var Qke,CE=o((()=>{yE(),xE(),Qke=Object.prototype.hasOwnProperty}));function wE(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),i?vE(n,s,l):SE(n,s,l)}return n}var TE=o((()=>{CE(),yE()}));function $ke(e,t,n){return t=EE(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=EE(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),Eke(e,this,s)}}var EE,eAe=o((()=>{Dke(),EE=Math.max}));function DE(e,t){return fE($ke(e,t,QT),e+``)}var OE=o((()=>{$T(),eAe(),pE()}));function kE(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=tAe}var tAe,AE=o((()=>{tAe=9007199254740991}));function jE(e){return e!=null&&kE(e.length)&&!eE(e)}var ME=o((()=>{tE(),AE()}));function NE(e,t,n){if(!qT(n))return!1;var r=typeof t;return(r==`number`?jE(n)&&gE(t,n.length):r==`string`&&t in n)?bE(n[t],e):!1}var PE=o((()=>{xE(),ME(),_E(),JT()}));function nAe(e){return DE(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&NE(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var rAe=o((()=>{OE(),PE()}));function FE(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||iAe)}var iAe,IE=o((()=>{iAe=Object.prototype}));function aAe(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var oAe=o((()=>{}));function sAe(e){return zT(e)&<(e)==cAe}var cAe,lAe=o((()=>{RT(),BT(),cAe=`[object Arguments]`})),LE,uAe,dAe,RE,zE=o((()=>{lAe(),BT(),LE=Object.prototype,uAe=LE.hasOwnProperty,dAe=LE.propertyIsEnumerable,RE=sAe(function(){return arguments}())?sAe:function(e){return zT(e)&&uAe.call(e,`callee`)&&!dAe.call(e,`callee`)}}));function fAe(){return!1}var pAe=o((()=>{})),BE,VE,HE,UE,WE=o((()=>{NT(),pAe(),BE=typeof exports==`object`&&exports&&!exports.nodeType&&exports,VE=BE&&typeof module==`object`&&module&&!module.nodeType&&module,HE=VE&&VE.exports===BE?MT.Buffer:void 0,UE=(HE?HE.isBuffer:void 0)||fAe}));function mAe(e){return zT(e)&&kE(e.length)&&!!GE[LT(e)]}var hAe,gAe,_Ae,vAe,yAe,bAe,xAe,SAe,CAe,wAe,TAe,EAe,DAe,OAe,kAe,AAe,jAe,MAe,NAe,PAe,FAe,IAe,LAe,RAe,GE,zAe=o((()=>{RT(),AE(),BT(),hAe=`[object Arguments]`,gAe=`[object Array]`,_Ae=`[object Boolean]`,vAe=`[object Date]`,yAe=`[object Error]`,bAe=`[object Function]`,xAe=`[object Map]`,SAe=`[object Number]`,CAe=`[object Object]`,wAe=`[object RegExp]`,TAe=`[object Set]`,EAe=`[object String]`,DAe=`[object WeakMap]`,OAe=`[object ArrayBuffer]`,kAe=`[object DataView]`,AAe=`[object Float32Array]`,jAe=`[object Float64Array]`,MAe=`[object Int8Array]`,NAe=`[object Int16Array]`,PAe=`[object Int32Array]`,FAe=`[object Uint8Array]`,IAe=`[object Uint8ClampedArray]`,LAe=`[object Uint16Array]`,RAe=`[object Uint32Array]`,GE={},GE[AAe]=GE[jAe]=GE[MAe]=GE[NAe]=GE[PAe]=GE[FAe]=GE[IAe]=GE[LAe]=GE[RAe]=!0,GE[hAe]=GE[gAe]=GE[OAe]=GE[_Ae]=GE[kAe]=GE[vAe]=GE[yAe]=GE[bAe]=GE[xAe]=GE[SAe]=GE[CAe]=GE[wAe]=GE[TAe]=GE[EAe]=GE[DAe]=!1}));function KE(e){return function(t){return e(t)}}var qE=o((()=>{})),JE,YE,XE,ZE,QE=o((()=>{SOe(),JE=typeof exports==`object`&&exports&&!exports.nodeType&&exports,YE=JE&&typeof module==`object`&&module&&!module.nodeType&&module,XE=YE&&YE.exports===JE&&xOe.process,ZE=function(){try{return YE&&YE.require&&YE.require(`util`).types||XE&&XE.binding&&XE.binding(`util`)}catch{}}()})),$E,eD,tD=o((()=>{zAe(),qE(),QE(),$E=ZE&&ZE.isTypedArray,eD=$E?KE($E):mAe}));function BAe(e,t){var n=GT(e),r=!n&&RE(e),i=!n&&!r&&UE(e),a=!n&&!r&&!i&&eD(e),o=n||r||i||a,s=o?aAe(e.length,String):[],l=s.length;for(var u in e)(t||VAe.call(e,u))&&!(o&&(u==`length`||i&&(u==`offset`||u==`parent`)||a&&(u==`buffer`||u==`byteLength`||u==`byteOffset`)||gE(u,l)))&&s.push(u);return s}var VAe,HAe=o((()=>{oAe(),zE(),KT(),WE(),_E(),tD(),VAe=Object.prototype.hasOwnProperty}));function UAe(e,t){return function(n){return e(t(n))}}var WAe=o((()=>{})),GAe,KAe=o((()=>{WAe(),GAe=UAe(Object.keys,Object)}));function qAe(e){if(!FE(e))return GAe(e);var t=[];for(var n in Object(e))JAe.call(e,n)&&n!=`constructor`&&t.push(n);return t}var JAe,nD=o((()=>{IE(),KAe(),JAe=Object.prototype.hasOwnProperty}));function rD(e){return jE(e)?BAe(e):qAe(e)}var iD=o((()=>{HAe(),nD(),ME()}));function YAe(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var XAe=o((()=>{}));function ZAe(e){if(!qT(e))return YAe(e);var t=FE(e),n=[];for(var r in e)(r!=`constructor`||!t&&QAe.call(e,r))&&n.push(r);return n}var QAe,$Ae=o((()=>{JT(),IE(),XAe(),QAe=Object.prototype.hasOwnProperty}));function aD(e){return jE(e)?BAe(e,!0):ZAe(e)}var oD=o((()=>{HAe(),$Ae(),ME()}));function sD(e,t){if(GT(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||VT(e)?!0:tje.test(e)||!eje.test(e)||t!=null&&e in Object(t)}var eje,tje,cD=o((()=>{KT(),HT(),eje=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tje=/^\w*$/})),lD,uD=o((()=>{oE(),lD=aE(Object,`create`)}));function nje(){this.__data__=lD?lD(null):{},this.size=0}var rje=o((()=>{uD()}));function ije(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var aje=o((()=>{}));function oje(e){var t=this.__data__;if(lD){var n=t[e];return n===sje?void 0:n}return cje.call(t,e)?t[e]:void 0}var sje,cje,lje=o((()=>{uD(),sje=`__lodash_hash_undefined__`,cje=Object.prototype.hasOwnProperty}));function uje(e){var t=this.__data__;return lD?t[e]!==void 0:dje.call(t,e)}var dje,fje=o((()=>{uD(),dje=Object.prototype.hasOwnProperty}));function pje(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=lD&&t===void 0?mje:t,this}var mje,hje=o((()=>{uD(),mje=`__lodash_hash_undefined__`}));function dD(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var gje=o((()=>{rje(),aje(),lje(),fje(),hje(),dD.prototype.clear=nje,dD.prototype.delete=ije,dD.prototype.get=oje,dD.prototype.has=uje,dD.prototype.set=pje}));function _je(){this.__data__=[],this.size=0}var vje=o((()=>{}));function fD(e,t){for(var n=e.length;n--;)if(bE(e[n][0],t))return n;return-1}var pD=o((()=>{xE()}));function yje(e){var t=this.__data__,n=fD(t,e);return n<0?!1:(n==t.length-1?t.pop():bje.call(t,n,1),--this.size,!0)}var bje,xje=o((()=>{pD(),bje=Array.prototype.splice}));function Sje(e){var t=this.__data__,n=fD(t,e);return n<0?void 0:t[n][1]}var Cje=o((()=>{pD()}));function wje(e){return fD(this.__data__,e)>-1}var Tje=o((()=>{pD()}));function Eje(e,t){var n=this.__data__,r=fD(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Dje=o((()=>{pD()}));function mD(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var hD=o((()=>{vje(),xje(),Cje(),Tje(),Dje(),mD.prototype.clear=_je,mD.prototype.delete=yje,mD.prototype.get=Sje,mD.prototype.has=wje,mD.prototype.set=Eje})),gD,_D=o((()=>{oE(),NT(),gD=aE(MT,`Map`)}));function Oje(){this.size=0,this.__data__={hash:new dD,map:new(gD||mD),string:new dD}}var kje=o((()=>{gje(),hD(),_D()}));function Aje(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}var jje=o((()=>{}));function vD(e,t){var n=e.__data__;return Aje(t)?n[typeof t==`string`?`string`:`hash`]:n.map}var yD=o((()=>{jje()}));function Mje(e){var t=vD(this,e).delete(e);return this.size-=+!!t,t}var Nje=o((()=>{yD()}));function Pje(e){return vD(this,e).get(e)}var Fje=o((()=>{yD()}));function Ije(e){return vD(this,e).has(e)}var Lje=o((()=>{yD()}));function Rje(e,t){var n=vD(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var zje=o((()=>{yD()}));function bD(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var xD=o((()=>{kje(),Nje(),Fje(),Lje(),zje(),bD.prototype.clear=Oje,bD.prototype.delete=Mje,bD.prototype.get=Pje,bD.prototype.has=Ije,bD.prototype.set=Rje}));function SD(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(Bje);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(SD.Cache||bD),n}var Bje,Vje=o((()=>{xD(),Bje=`Expected a function`,SD.Cache=bD}));function Hje(e){var t=SD(e,function(e){return n.size===Uje&&n.clear(),e}),n=t.cache;return t}var Uje,Wje=o((()=>{Vje(),Uje=500})),Gje,Kje,qje,Jje=o((()=>{Wje(),Gje=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Kje=/\\(\\)?/g,qje=Hje(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Gje,function(e,n,r,i){t.push(r?i.replace(Kje,`$1`):n||e)}),t})}));function Yje(e){return e==null?``:IOe(e)}var CD=o((()=>{BOe()}));function wD(e,t){return GT(e)?e:sD(e,t)?[e]:qje(Yje(e))}var TD=o((()=>{KT(),cD(),Jje(),CD()}));function ED(e){if(typeof e==`string`||VT(e))return e;var t=e+``;return t==`0`&&1/e==-Xje?`-0`:t}var Xje,DD=o((()=>{HT(),Xje=1/0}));function OD(e,t){t=wD(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[ED(t[n++])];return n&&n==r?e:void 0}var kD=o((()=>{TD(),DD()}));function Zje(e,t,n){var r=e==null?void 0:OD(e,t);return r===void 0?n:r}var Qje=o((()=>{kD()}));function AD(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var jD=o((()=>{}));function $je(e){return GT(e)||RE(e)||!!(MD&&e&&e[MD])}var MD,eMe=o((()=>{FT(),zE(),KT(),MD=PT?PT.isConcatSpreadable:void 0}));function ND(e,t,n,r,i){var a=-1,o=e.length;for(n||=$je,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?ND(s,t-1,n,r,i):AD(i,s):r||(i[i.length]=s)}return i}var PD=o((()=>{jD(),eMe()}));function FD(e){return e!=null&&e.length?ND(e,1):[]}var tMe=o((()=>{PD()}));function nMe(e){return fE($ke(e,void 0,FD),e+``)}var rMe=o((()=>{tMe(),eAe(),pE()})),ID,LD=o((()=>{WAe(),ID=UAe(Object.getPrototypeOf,Object)}));function iMe(e){if(!zT(e)||LT(e)!=aMe)return!1;var t=ID(e);if(t===null)return!0;var n=cMe.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&RD.call(n)==lMe}var aMe,oMe,sMe,RD,cMe,lMe,uMe=o((()=>{RT(),LD(),BT(),aMe=`[object Object]`,oMe=Function.prototype,sMe=Object.prototype,RD=oMe.toString,cMe=sMe.hasOwnProperty,lMe=RD.call(Object)})),dMe=o((()=>{}));function fMe(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}var pMe=o((()=>{}));function mMe(){this.__data__=new mD,this.size=0}var hMe=o((()=>{hD()}));function gMe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var _Me=o((()=>{}));function vMe(e){return this.__data__.get(e)}var yMe=o((()=>{}));function bMe(e){return this.__data__.has(e)}var xMe=o((()=>{}));function SMe(e,t){var n=this.__data__;if(n instanceof mD){var r=n.__data__;if(!gD||r.length<CMe-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new bD(r)}return n.set(e,t),this.size=n.size,this}var CMe,wMe=o((()=>{hD(),_D(),xD(),CMe=200}));function zD(e){var t=this.__data__=new mD(e);this.size=t.size}var BD=o((()=>{hD(),hMe(),_Me(),yMe(),xMe(),wMe(),zD.prototype.clear=mMe,zD.prototype.delete=gMe,zD.prototype.get=vMe,zD.prototype.has=bMe,zD.prototype.set=SMe}));function TMe(e,t){return e&&wE(t,rD(t),e)}var EMe=o((()=>{TE(),iD()}));function DMe(e,t){return e&&wE(t,aD(t),e)}var OMe=o((()=>{TE(),oD()}));function kMe(e,t){if(t)return e.slice();var n=e.length,r=WD?WD(n):new e.constructor(n);return e.copy(r),r}var VD,HD,UD,WD,AMe=o((()=>{NT(),VD=typeof exports==`object`&&exports&&!exports.nodeType&&exports,HD=VD&&typeof module==`object`&&module&&!module.nodeType&&module,UD=HD&&HD.exports===VD?MT.Buffer:void 0,WD=UD?UD.allocUnsafe:void 0}));function jMe(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var GD=o((()=>{}));function MMe(){return[]}var KD=o((()=>{})),NMe,qD,JD,YD=o((()=>{GD(),KD(),NMe=Object.prototype.propertyIsEnumerable,qD=Object.getOwnPropertySymbols,JD=qD?function(e){return e==null?[]:(e=Object(e),jMe(qD(e),function(t){return NMe.call(e,t)}))}:MMe}));function PMe(e,t){return wE(e,JD(e),t)}var FMe=o((()=>{TE(),YD()})),XD,IMe=o((()=>{jD(),LD(),YD(),KD(),XD=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)AD(t,JD(e)),e=ID(e);return t}:MMe}));function LMe(e,t){return wE(e,XD(e),t)}var RMe=o((()=>{TE(),IMe()}));function zMe(e,t,n){var r=t(e);return GT(e)?r:AD(r,n(e))}var BMe=o((()=>{jD(),KT()}));function ZD(e){return zMe(e,rD,JD)}var VMe=o((()=>{BMe(),YD(),iD()}));function HMe(e){return zMe(e,aD,XD)}var UMe=o((()=>{BMe(),IMe(),oD()})),QD,WMe=o((()=>{oE(),NT(),QD=aE(MT,`DataView`)})),$D,GMe=o((()=>{oE(),NT(),$D=aE(MT,`Promise`)})),eO,KMe=o((()=>{oE(),NT(),eO=aE(MT,`Set`)})),tO,qMe,nO,rO,iO,aO,JMe,YMe,XMe,ZMe,QMe,oO,sO,cO=o((()=>{WMe(),_D(),GMe(),KMe(),Cke(),RT(),dke(),tO=`[object Map]`,qMe=`[object Object]`,nO=`[object Promise]`,rO=`[object Set]`,iO=`[object WeakMap]`,aO=`[object DataView]`,JMe=iE(QD),YMe=iE(gD),XMe=iE($D),ZMe=iE(eO),QMe=iE(sE),oO=LT,(QD&&oO(new QD(new ArrayBuffer(1)))!=aO||gD&&oO(new gD)!=tO||$D&&oO($D.resolve())!=nO||eO&&oO(new eO)!=rO||sE&&oO(new sE)!=iO)&&(oO=function(e){var t=LT(e),n=t==qMe?e.constructor:void 0,r=n?iE(n):``;if(r)switch(r){case JMe:return aO;case YMe:return tO;case XMe:return nO;case ZMe:return rO;case QMe:return iO}return t}),sO=oO}));function $Me(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&eNe.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var eNe,tNe=o((()=>{eNe=Object.prototype.hasOwnProperty})),lO,nNe=o((()=>{NT(),lO=MT.Uint8Array}));function uO(e){var t=new e.constructor(e.byteLength);return new lO(t).set(new lO(e)),t}var dO=o((()=>{nNe()}));function rNe(e,t){var n=t?uO(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var iNe=o((()=>{dO()}));function aNe(e){var t=new e.constructor(e.source,oNe.exec(e));return t.lastIndex=e.lastIndex,t}var oNe,sNe=o((()=>{oNe=/\w*$/}));function cNe(e){return pO?Object(pO.call(e)):{}}var fO,pO,lNe=o((()=>{FT(),fO=PT?PT.prototype:void 0,pO=fO?fO.valueOf:void 0}));function uNe(e,t){var n=t?uO(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var dNe=o((()=>{dO()}));function fNe(e,t,n){var r=e.constructor;switch(t){case xNe:return uO(e);case pNe:case mNe:return new r(+e);case SNe:return rNe(e,n);case CNe:case wNe:case TNe:case ENe:case DNe:case ONe:case kNe:case ANe:case jNe:return uNe(e,n);case hNe:return new r;case gNe:case yNe:return new r(e);case _Ne:return aNe(e);case vNe:return new r;case bNe:return cNe(e)}}var pNe,mNe,hNe,gNe,_Ne,vNe,yNe,bNe,xNe,SNe,CNe,wNe,TNe,ENe,DNe,ONe,kNe,ANe,jNe,MNe=o((()=>{dO(),iNe(),sNe(),lNe(),dNe(),pNe=`[object Boolean]`,mNe=`[object Date]`,hNe=`[object Map]`,gNe=`[object Number]`,_Ne=`[object RegExp]`,vNe=`[object Set]`,yNe=`[object String]`,bNe=`[object Symbol]`,xNe=`[object ArrayBuffer]`,SNe=`[object DataView]`,CNe=`[object Float32Array]`,wNe=`[object Float64Array]`,TNe=`[object Int8Array]`,ENe=`[object Int16Array]`,DNe=`[object Int32Array]`,ONe=`[object Uint8Array]`,kNe=`[object Uint8ClampedArray]`,ANe=`[object Uint16Array]`,jNe=`[object Uint32Array]`}));function NNe(e){return typeof e.constructor==`function`&&!FE(e)?wke(ID(e)):{}}var PNe=o((()=>{Tke(),LD(),IE()}));function FNe(e){return zT(e)&&sO(e)==INe}var INe,LNe=o((()=>{cO(),BT(),INe=`[object Map]`})),mO,RNe,zNe=o((()=>{LNe(),qE(),QE(),mO=ZE&&ZE.isMap,RNe=mO?KE(mO):FNe}));function BNe(e){return zT(e)&&sO(e)==VNe}var VNe,HNe=o((()=>{cO(),BT(),VNe=`[object Set]`})),hO,UNe,WNe=o((()=>{HNe(),qE(),QE(),hO=ZE&&ZE.isSet,UNe=hO?KE(hO):BNe}));function gO(e,t,n,r,i,a){var o,s=t&GNe,l=t&KNe,u=t&qNe;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!qT(e))return e;var d=GT(e);if(d){if(o=$Me(e),!s)return Ake(e,o)}else{var f=sO(e),p=f==vO||f==QNe;if(UE(e))return kMe(e,s);if(f==yO||f==_O||p&&!i){if(o=l||p?{}:NNe(e),!s)return l?LMe(e,DMe(o,e)):PMe(e,TMe(o,e))}else{if(!bO[f])return i?e:{};o=fNe(e,f,s)}}a||=new zD;var m=a.get(e);if(m)return m;a.set(e,o),UNe(e)?e.forEach(function(r){o.add(gO(r,t,n,r,e,a))}):RNe(e)&&e.forEach(function(r,i){o.set(i,gO(r,t,n,i,e,a))});var h=d?void 0:(u?l?HMe:ZD:l?aD:rD)(e);return Bke(h||e,function(r,i){h&&(i=r,r=e[i]),SE(o,i,gO(r,t,n,i,e,a))}),o}var GNe,KNe,qNe,_O,JNe,YNe,XNe,ZNe,vO,QNe,$Ne,ePe,yO,tPe,nPe,rPe,iPe,aPe,oPe,sPe,cPe,lPe,uPe,dPe,fPe,pPe,mPe,hPe,gPe,bO,_Pe=o((()=>{BD(),mE(),CE(),EMe(),OMe(),AMe(),lE(),FMe(),RMe(),VMe(),UMe(),cO(),tNe(),MNe(),PNe(),KT(),WE(),zNe(),JT(),WNe(),iD(),oD(),GNe=1,KNe=2,qNe=4,_O=`[object Arguments]`,JNe=`[object Array]`,YNe=`[object Boolean]`,XNe=`[object Date]`,ZNe=`[object Error]`,vO=`[object Function]`,QNe=`[object GeneratorFunction]`,$Ne=`[object Map]`,ePe=`[object Number]`,yO=`[object Object]`,tPe=`[object RegExp]`,nPe=`[object Set]`,rPe=`[object String]`,iPe=`[object Symbol]`,aPe=`[object WeakMap]`,oPe=`[object ArrayBuffer]`,sPe=`[object DataView]`,cPe=`[object Float32Array]`,lPe=`[object Float64Array]`,uPe=`[object Int8Array]`,dPe=`[object Int16Array]`,fPe=`[object Int32Array]`,pPe=`[object Uint8Array]`,mPe=`[object Uint8ClampedArray]`,hPe=`[object Uint16Array]`,gPe=`[object Uint32Array]`,bO={},bO[_O]=bO[JNe]=bO[oPe]=bO[sPe]=bO[YNe]=bO[XNe]=bO[cPe]=bO[lPe]=bO[uPe]=bO[dPe]=bO[fPe]=bO[$Ne]=bO[ePe]=bO[yO]=bO[tPe]=bO[nPe]=bO[rPe]=bO[iPe]=bO[pPe]=bO[mPe]=bO[hPe]=bO[gPe]=!0,bO[ZNe]=bO[vO]=bO[aPe]=!1}));function vPe(e){return gO(e,yPe|bPe)}var yPe,bPe,xPe=o((()=>{_Pe(),yPe=1,bPe=4}));function SPe(e){return this.__data__.set(e,CPe),this}var CPe,wPe=o((()=>{CPe=`__lodash_hash_undefined__`}));function TPe(e){return this.__data__.has(e)}var EPe=o((()=>{}));function xO(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new bD;++t<n;)this.add(e[t])}var SO=o((()=>{xD(),wPe(),EPe(),xO.prototype.add=xO.prototype.push=SPe,xO.prototype.has=TPe}));function DPe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var OPe=o((()=>{}));function kPe(e,t){return e.has(t)}var CO=o((()=>{}));function APe(e,t,n,r,i,a){var o=n&jPe,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,m=n&MPe?new xO:void 0;for(a.set(e,t),a.set(t,e);++f<s;){var h=e[f],g=t[f];if(r)var _=o?r(g,h,f,t,e,a):r(h,g,f,e,t,a);if(_!==void 0){if(_)continue;p=!1;break}if(m){if(!DPe(t,function(e,t){if(!kPe(m,t)&&(h===e||i(h,e,n,r,a)))return m.push(t)})){p=!1;break}}else if(!(h===g||i(h,g,n,r,a))){p=!1;break}}return a.delete(e),a.delete(t),p}var jPe,MPe,NPe=o((()=>{SO(),OPe(),CO(),jPe=1,MPe=2}));function PPe(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}var FPe=o((()=>{}));function wO(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var TO=o((()=>{}));function IPe(e,t,n,r,i,a,o){switch(n){case YPe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case JPe:return!(e.byteLength!=t.byteLength||!a(new lO(e),new lO(t)));case zPe:case BPe:case UPe:return bE(+e,+t);case VPe:return e.name==t.name&&e.message==t.message;case WPe:case KPe:return e==t+``;case HPe:var s=PPe;case GPe:var l=r&LPe;if(s||=wO,e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;r|=RPe,o.set(e,t);var d=APe(s(e),s(t),r,i,a,o);return o.delete(e),d;case qPe:if(DO)return DO.call(e)==DO.call(t)}return!1}var LPe,RPe,zPe,BPe,VPe,HPe,UPe,WPe,GPe,KPe,qPe,JPe,YPe,EO,DO,XPe=o((()=>{FT(),nNe(),xE(),NPe(),FPe(),TO(),LPe=1,RPe=2,zPe=`[object Boolean]`,BPe=`[object Date]`,VPe=`[object Error]`,HPe=`[object Map]`,UPe=`[object Number]`,WPe=`[object RegExp]`,GPe=`[object Set]`,KPe=`[object String]`,qPe=`[object Symbol]`,JPe=`[object ArrayBuffer]`,YPe=`[object DataView]`,EO=PT?PT.prototype:void 0,DO=EO?EO.valueOf:void 0}));function ZPe(e,t,n,r,i,a){var o=n&QPe,s=ZD(e),l=s.length;if(l!=ZD(t).length&&!o)return!1;for(var u=l;u--;){var d=s[u];if(!(o?d in t:$Pe.call(t,d)))return!1}var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var m=!0;a.set(e,t),a.set(t,e);for(var h=o;++u<l;){d=s[u];var g=e[d],_=t[d];if(r)var v=o?r(_,g,d,t,e,a):r(g,_,d,e,t,a);if(!(v===void 0?g===_||i(g,_,n,r,a):v)){m=!1;break}h||=d==`constructor`}if(m&&!h){var y=e.constructor,b=t.constructor;y!=b&&`constructor`in e&&`constructor`in t&&!(typeof y==`function`&&y instanceof y&&typeof b==`function`&&b instanceof b)&&(m=!1)}return a.delete(e),a.delete(t),m}var QPe,$Pe,eFe=o((()=>{VMe(),QPe=1,$Pe=Object.prototype.hasOwnProperty}));function tFe(e,t,n,r,i,a){var o=GT(e),s=GT(t),l=o?kO:sO(e),u=s?kO:sO(t);l=l==OO?AO:l,u=u==OO?AO:u;var d=l==AO,f=u==AO,p=l==u;if(p&&UE(e)){if(!UE(t))return!1;o=!0,d=!1}if(p&&!d)return a||=new zD,o||eD(e)?APe(e,t,n,r,i,a):IPe(e,t,l,n,r,i,a);if(!(n&nFe)){var m=d&&jO.call(e,`__wrapped__`),h=f&&jO.call(t,`__wrapped__`);if(m||h){var g=m?e.value():e,_=h?t.value():t;return a||=new zD,i(g,_,n,r,a)}}return p?(a||=new zD,ZPe(e,t,n,r,i,a)):!1}var nFe,OO,kO,AO,jO,rFe=o((()=>{BD(),NPe(),XPe(),eFe(),cO(),KT(),WE(),tD(),nFe=1,OO=`[object Arguments]`,kO=`[object Array]`,AO=`[object Object]`,jO=Object.prototype.hasOwnProperty}));function MO(e,t,n,r,i){return e===t?!0:e==null||t==null||!zT(e)&&!zT(t)?e!==e&&t!==t:tFe(e,t,n,r,MO,i)}var NO=o((()=>{rFe(),BT()}));function iFe(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var l=s[0],u=e[l],d=s[1];if(o&&s[2]){if(u===void 0&&!(l in e))return!1}else{var f=new zD;if(r)var p=r(u,d,l,e,t,f);if(!(p===void 0?MO(d,u,aFe|oFe,r,f):p))return!1}}return!0}var aFe,oFe,sFe=o((()=>{BD(),NO(),aFe=1,oFe=2}));function cFe(e){return e===e&&!qT(e)}var lFe=o((()=>{JT()}));function uFe(e){for(var t=rD(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,cFe(i)]}return t}var dFe=o((()=>{lFe(),iD()}));function fFe(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}var pFe=o((()=>{}));function mFe(e){var t=uFe(e);return t.length==1&&t[0][2]?fFe(t[0][0],t[0][1]):function(n){return n===e||iFe(n,e,t)}}var hFe=o((()=>{sFe(),dFe(),pFe()}));function gFe(e,t){return e!=null&&t in Object(e)}var _Fe=o((()=>{}));function vFe(e,t,n){t=wD(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=ED(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&kE(i)&&gE(o,i)&&(GT(e)||RE(e)))}var yFe=o((()=>{TD(),zE(),KT(),_E(),AE(),DD()}));function bFe(e,t){return e!=null&&vFe(e,t,gFe)}var PO=o((()=>{_Fe(),yFe()}));function xFe(e,t){return sD(e)&&cFe(t)?fFe(ED(e),t):function(n){var r=Zje(n,e);return r===void 0&&r===t?bFe(n,e):MO(t,r,SFe|CFe)}}var SFe,CFe,wFe=o((()=>{NO(),Qje(),PO(),cD(),lFe(),pFe(),DD(),SFe=1,CFe=2}));function TFe(e){return function(t){return t?.[e]}}var FO=o((()=>{}));function EFe(e){return function(t){return OD(t,e)}}var DFe=o((()=>{kD()}));function OFe(e){return sD(e)?TFe(ED(e)):EFe(e)}var kFe=o((()=>{FO(),DFe(),cD(),DD()}));function IO(e){return typeof e==`function`?e:e==null?QT:typeof e==`object`?GT(e)?xFe(e[0],e[1]):mFe(e):OFe(e)}var LO=o((()=>{hFe(),wFe(),$T(),KT(),kFe()}));function AFe(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++i];if(n(a[l],l,a)===!1)break}return t}}var jFe=o((()=>{})),RO,zO=o((()=>{jFe(),RO=AFe()}));function BO(e,t){return e&&RO(e,t,rD)}var VO=o((()=>{zO(),iD()}));function MFe(e,t){return function(n,r){if(n==null)return n;if(!jE(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var NFe=o((()=>{ME()})),HO,UO=o((()=>{VO(),NFe(),HO=MFe(BO)})),WO,PFe=o((()=>{NT(),WO=function(){return MT.Date.now()}})),GO,FFe,IFe,LFe=o((()=>{OE(),xE(),PE(),oD(),GO=Object.prototype,FFe=GO.hasOwnProperty,IFe=DE(function(e,t){e=Object(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&NE(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],o=aD(a),s=-1,l=o.length;++s<l;){var u=o[s],d=e[u];(d===void 0||bE(d,GO[u])&&!FFe.call(e,u))&&(e[u]=a[u])}return e})}));function KO(e,t,n){(n!==void 0&&!bE(e[t],n)||n===void 0&&!(t in e))&&vE(e,t,n)}var RFe=o((()=>{yE(),xE()}));function zFe(e){return zT(e)&&jE(e)}var qO=o((()=>{ME(),BT()}));function JO(e,t){if((t!==`constructor`||typeof e[t]!=`function`)&&t!=`__proto__`)return e[t]}var BFe=o((()=>{}));function VFe(e){return wE(e,aD(e))}var HFe=o((()=>{TE(),oD()}));function UFe(e,t,n,r,i,a,o){var s=JO(e,n),l=JO(t,n),u=o.get(l);if(u){KO(e,n,u);return}var d=a?a(s,l,n+``,e,t,o):void 0,f=d===void 0;if(f){var p=GT(l),m=!p&&UE(l),h=!p&&!m&&eD(l);d=l,p||m||h?GT(s)?d=s:zFe(s)?d=Ake(s):m?(f=!1,d=kMe(l,!0)):h?(f=!1,d=uNe(l,!0)):d=[]:iMe(l)||RE(l)?(d=s,RE(s)?d=VFe(s):(!qT(s)||eE(s))&&(d=NNe(l))):f=!1}f&&(o.set(l,d),i(d,l,r,a,o),o.delete(l)),KO(e,n,d)}var WFe=o((()=>{RFe(),AMe(),dNe(),lE(),PNe(),zE(),KT(),qO(),WE(),tE(),JT(),uMe(),tD(),BFe(),HFe()}));function GFe(e,t,n,r,i){e!==t&&RO(t,function(a,o){if(i||=new zD,qT(a))UFe(e,t,o,n,GFe,r,i);else{var s=r?r(JO(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),KO(e,o,s)}},aD)}var KFe=o((()=>{BD(),RFe(),zO(),WFe(),JT(),oD(),BFe()}));function qFe(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var JFe=o((()=>{}));function YO(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var YFe=o((()=>{}));function XO(e){return typeof e==`function`?e:QT}var ZO=o((()=>{$T()}));function QO(e,t){return(GT(e)?Bke:HO)(e,XO(t))}var XFe=o((()=>{mE(),UO(),ZO(),KT()})),ZFe=o((()=>{XFe()}));function QFe(e,t){var n=[];return HO(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}var $Fe=o((()=>{UO()}));function $O(e,t){return(GT(e)?jMe:QFe)(e,IO(t,3))}var eIe=o((()=>{GD(),$Fe(),LO(),KT()}));function tIe(e){return function(t,n,r){var i=Object(t);if(!jE(t)){var a=IO(n,3);t=rD(t),n=function(e){return a(i[e],e,i)}}var o=e(t,n,r);return o>-1?i[a?t[o]:o]:void 0}}var nIe=o((()=>{LO(),ME(),iD()}));function rIe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:tke(n);return i<0&&(i=iIe(r+i,0)),Vke(e,IO(t,3),i)}var iIe,aIe=o((()=>{hE(),LO(),nke(),iIe=Math.max})),ek,oIe=o((()=>{nIe(),aIe(),ek=tIe(rIe)}));function sIe(e,t){var n=-1,r=jE(e)?Array(e.length):[];return HO(e,function(e,i,a){r[++n]=t(e,i,a)}),r}var cIe=o((()=>{UO(),ME()}));function tk(e,t){return(GT(e)?UT:sIe)(e,IO(t,3))}var lIe=o((()=>{WT(),LO(),cIe(),KT()}));function uIe(e,t){return e==null?e:RO(e,XO(t),aD)}var dIe=o((()=>{zO(),ZO(),oD()}));function fIe(e,t){return e&&BO(e,XO(t))}var pIe=o((()=>{VO(),ZO()}));function mIe(e,t){return e>t}var hIe=o((()=>{}));function gIe(e,t){return e!=null&&_Ie.call(e,t)}var _Ie,vIe=o((()=>{_Ie=Object.prototype.hasOwnProperty}));function yIe(e,t){return e!=null&&vFe(e,t,gIe)}var bIe=o((()=>{vIe(),yFe()})),xIe=o((()=>{RT(),KT(),BT()}));function SIe(e,t){return UT(t,function(t){return e[t]})}var CIe=o((()=>{WT()}));function nk(e){return e==null?[]:SIe(e,rD(e))}var wIe=o((()=>{CIe(),iD()}));function TIe(e){if(e==null)return!0;if(jE(e)&&(GT(e)||typeof e==`string`||typeof e.splice==`function`||UE(e)||eD(e)||RE(e)))return!e.length;var t=sO(e);if(t==EIe||t==DIe)return!e.size;if(FE(e))return!qAe(e).length;for(var n in e)if(OIe.call(e,n))return!1;return!0}var EIe,DIe,OIe,kIe=o((()=>{nD(),cO(),zE(),KT(),ME(),WE(),IE(),tD(),EIe=`[object Map]`,DIe=`[object Set]`,OIe=Object.prototype.hasOwnProperty}));function rk(e){return e===void 0}var AIe=o((()=>{}));function jIe(e,t){return e<t}var ik=o((()=>{}));function ak(e,t){var n={};return t=IO(t,3),BO(e,function(e,r,i){vE(n,r,t(e,r,i))}),n}var MIe=o((()=>{yE(),VO(),LO()}));function ok(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(o!=null&&(s===void 0?o===o&&!VT(o):n(o,s)))var s=o,l=a}return l}var sk=o((()=>{HT()}));function ck(e){return e&&e.length?ok(e,QT,mIe):void 0}var NIe=o((()=>{sk(),hIe(),$T()})),lk,PIe=o((()=>{KFe(),rAe(),lk=nAe(function(e,t,n){GFe(e,t,n)})}));function uk(e){return e&&e.length?ok(e,QT,jIe):void 0}var FIe=o((()=>{sk(),ik(),$T()}));function dk(e,t){return e&&e.length?ok(e,IO(t,2),jIe):void 0}var IIe=o((()=>{sk(),LO(),ik()}));function LIe(e,t,n,r){if(!qT(e))return e;t=wD(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var l=ED(t[i]),u=n;if(l===`__proto__`||l===`constructor`||l===`prototype`)return e;if(i!=o){var d=s[l];u=r?r(d,l,s):void 0,u===void 0&&(u=qT(d)?d:gE(t[i+1])?[]:{})}SE(s,l,u),s=s[l]}return e}var RIe=o((()=>{CE(),TD(),_E(),JT(),DD()}));function zIe(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=OD(e,o);n(s,o)&&LIe(a,wD(o,e),s)}return a}var BIe=o((()=>{kD(),RIe(),TD()}));function VIe(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var HIe=o((()=>{}));function UIe(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,a=VT(e),o=t!==void 0,s=t===null,l=t===t,u=VT(t);if(!s&&!u&&!a&&e>t||a&&o&&l&&!s&&!u||r&&o&&l||!n&&l||!i)return 1;if(!r&&!a&&!u&&e<t||u&&n&&i&&!r&&!a||s&&n&&i||!o&&i||!l)return-1}return 0}var WIe=o((()=>{HT()}));function GIe(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var l=UIe(i[r],a[r]);if(l)return r>=s?l:l*(n[r]==`desc`?-1:1)}return e.index-t.index}var KIe=o((()=>{WIe()}));function qIe(e,t,n){t=t.length?UT(t,function(e){return GT(e)?function(t){return OD(t,e.length===1?e[0]:e)}:e}):[QT];var r=-1;return t=UT(t,KE(IO)),VIe(sIe(e,function(e,n,i){return{criteria:UT(t,function(t){return t(e)}),index:++r,value:e}}),function(e,t){return GIe(e,t,n)})}var JIe=o((()=>{WT(),kD(),LO(),cIe(),HIe(),qE(),KIe(),$T(),KT()})),YIe=o((()=>{FO()})),fk,XIe,ZIe,QIe,pk,mk,$Ie,hk,gk,_k,eLe,vk,yk,tLe,nLe,rLe,iLe=o((()=>{fk=`\\ud800-\\udfff`,XIe=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,ZIe=`\\ufe0e\\ufe0f`,QIe=`[`+fk+`]`,pk=`[`+XIe+`]`,mk=`\\ud83c[\\udffb-\\udfff]`,$Ie=`(?:`+pk+`|`+mk+`)`,hk=`[^`+fk+`]`,gk=`(?:\\ud83c[\\udde6-\\uddff]){2}`,_k=`[\\ud800-\\udbff][\\udc00-\\udfff]`,eLe=`\\u200d`,vk=$Ie+`?`,yk=`[`+ZIe+`]?`,tLe=`(?:`+eLe+`(?:`+[hk,gk,_k].join(`|`)+`)`+yk+vk+`)*`,nLe=yk+vk+tLe,rLe=`(?:`+[hk+pk+`?`,pk,gk,_k,QIe].join(`|`)+`)`,RegExp(mk+`(?=`+mk+`)|`+rLe+nLe,`g`)})),aLe=o((()=>{YIe(),dMe(),iLe()}));function oLe(e,t){return zIe(e,t,function(t,n){return bFe(e,n)})}var sLe=o((()=>{BIe(),PO()})),bk,cLe=o((()=>{sLe(),rMe(),bk=nMe(function(e,t){return e==null?{}:oLe(e,t)})}));function lLe(e,t,n,r){for(var i=-1,a=dLe(uLe((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}var uLe,dLe,fLe=o((()=>{uLe=Math.ceil,dLe=Math.max}));function pLe(e){return function(t,n,r){return r&&typeof r!=`number`&&NE(t,n,r)&&(n=r=void 0),t=YT(t),n===void 0?(n=t,t=0):n=YT(n),r=r===void 0?t<n?1:-1:YT(r),lLe(t,n,r,e)}}var mLe=o((()=>{fLe(),PE(),ZT()})),xk,hLe=o((()=>{mLe(),xk=pLe()}));function gLe(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}var _Le=o((()=>{}));function Sk(e,t,n){var r=GT(e)?fMe:gLe,i=arguments.length<3;return r(e,IO(t,4),n,i,HO)}var vLe=o((()=>{pMe(),UO(),LO(),_Le(),KT()})),yLe=o((()=>{nD(),cO(),ME(),xIe(),aLe()})),Ck,bLe=o((()=>{PD(),JIe(),OE(),PE(),Ck=DE(function(e,t){if(e==null)return[];var n=t.length;return n>1&&NE(e,t[0],t[1])?t=[]:n>2&&NE(t[0],t[1],t[2])&&(t=[t[0]]),qIe(e,ND(t,1),[])})})),xLe,SLe=o((()=>{KMe(),kke(),TO(),xLe=eO&&1/wO(new eO([,-0]))[1]==1/0?function(e){return new eO(e)}:Oke}));function CLe(e,t,n){var r=-1,i=Jke,a=e.length,o=!0,s=[],l=s;if(n)o=!1,i=qFe;else if(a>=wLe){var u=t?null:xLe(e);if(u)return wO(u);o=!1,i=kPe,l=new xO}else l=t?[]:s;outer:for(;++r<a;){var d=e[r],f=t?t(d):d;if(d=n||d!==0?d:0,o&&f===f){for(var p=l.length;p--;)if(l[p]===f)continue outer;t&&l.push(f),s.push(d)}else i(l,f,n)||(l!==s&&l.push(f),s.push(d))}return s}var wLe,TLe=o((()=>{SO(),Yke(),JFe(),CO(),SLe(),TO(),wLe=200})),ELe,DLe=o((()=>{PD(),OE(),TLe(),qO(),ELe=DE(function(e){return CLe(ND(e,1,zFe,!0))})}));function wk(e){var t=++OLe;return Yje(e)+t}var OLe,kLe=o((()=>{CD(),OLe=0}));function ALe(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:void 0;n(o,e[r],s)}return o}var jLe=o((()=>{}));function MLe(e,t){return ALe(e||[],t||[],SE)}var NLe=o((()=>{CE(),jLe()})),Tk=o((()=>{HT(),BOe(),nke(),$T(),Cke(),Tke(),JT(),NT(),Dke(),kke(),KT(),BT(),lE(),Fke(),pE(),mE(),Yke(),_E(),CE(),TE(),rAe(),ME(),IE(),iD(),oD(),Qje(),rMe(),OE(),RT(),uMe(),yE(),DD(),CD(),dMe(),pMe(),$Oe(),PE(),_Pe(),xPe(),jD(),PD(),WT(),LO(),Ike(),UO(),EMe(),PFe(),LFe(),KFe(),SO(),JFe(),qE(),CO(),qO(),YFe(),ZFe(),jFe(),NFe(),ZO(),cO(),FPe(),xE(),eIe(),oIe(),aIe(),VO(),nIe(),hE(),lIe(),tMe(),XFe(),dIe(),pIe(),GD(),tE(),hIe(),bIe(),PO(),ZT(),qke(),xIe(),wIe(),TD(),kD(),zE(),QE(),WE(),kIe(),NO(),AE(),zNe(),sFe(),dFe(),bke(),ske(),pAe(),WNe(),tD(),AIe(),Uke(),ik(),MIe(),hFe(),wFe(),NIe(),sk(),Vje(),PIe(),FIe(),IIe(),FT(),TO(),UMe(),BIe(),JIe(),OPe(),aLe(),cLe(),kFe(),WIe(),hLe(),mLe(),vLe(),_Le(),$Fe(),RIe(),yLe(),bLe(),KD(),CIe(),oAe(),Jje(),HFe(),LD(),KOe(),UOe(),DLe(),TLe(),kLe(),FO(),NLe(),jLe()}));function PLe(e,t){e[t]?e[t]++:e[t]=1}function FLe(e,t){--e[t]||delete e[t]}function Ek(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}return i+kk+a+kk+(rk(r)?LLe:r)}function ILe(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function Dk(e,t){return Ek(e,t.v,t.w,t.name)}var LLe,Ok,kk,Ak,RLe=o((()=>{Tk(),LLe=`\0`,Ok=`\0`,kk=``,Ak=class{constructor(e={}){this._isDirected=!Object.prototype.hasOwnProperty.call(e,`directed`)||e.directed,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,`compound`)?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=uE(void 0),this._defaultEdgeLabelFn=uE(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Ok]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return eE(e)||(e=uE(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return rD(this._nodes)}sources(){var e=this;return $O(this.nodes(),function(t){return TIe(e._in[t])})}sinks(){var e=this;return $O(this.nodes(),function(t){return TIe(e._out[t])})}setNodes(e,t){var n=arguments,r=this;return QO(e,function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=Ok,this._children[e]={},this._children[Ok][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],QO(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),QO(rD(this._in[e]),t),delete this._in[e],delete this._preds[e],QO(rD(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(rk(t))t=Ok;else{t+=``;for(var n=t;!rk(n);n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==Ok)return t}}children(e){if(rk(e)&&(e=Ok),this._isCompound){var t=this._children[e];if(t)return rD(t)}else if(e===Ok)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return rD(t)}successors(e){var t=this._sucs[e];if(t)return rD(t)}neighbors(e){var t=this.predecessors(e);if(t)return ELe(t,this.successors(e))}isLeaf(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;QO(this._nodes,function(n,r){e(r)&&t.setNode(r,n)}),QO(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function i(e){var a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&QO(t.nodes(),function(e){t.setParent(e,i(e))}),t}setDefaultEdgeLabel(e){return eE(e)||(e=uE(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return nk(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return Sk(e,function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,r,i=!1,a=arguments[0];typeof a==`object`&&a&&`v`in a?(e=a.v,t=a.w,n=a.name,arguments.length===2&&(r=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),e=``+e,t=``+t,rk(n)||(n=``+n);var o=Ek(this._isDirected,e,t,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return i&&(this._edgeLabels[o]=r),this;if(!rk(n)&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[o]=i?r:this._defaultEdgeLabelFn(e,t,n);var s=ILe(this._isDirected,e,t,n);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[o]=s,PLe(this._preds[t],e),PLe(this._sucs[e],t),this._in[t][o]=s,this._out[e][o]=s,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?Dk(this._isDirected,arguments[0]):Ek(this._isDirected,e,t,n);return this._edgeLabels[r]}hasEdge(e,t,n){var r=arguments.length===1?Dk(this._isDirected,arguments[0]):Ek(this._isDirected,e,t,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?Dk(this._isDirected,arguments[0]):Ek(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],FLe(this._preds[t],e),FLe(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=nk(n);return t?$O(r,function(e){return e.v===t}):r}}outEdges(e,t){var n=this._out[e];if(n){var r=nk(n);return t?$O(r,function(e){return e.w===t}):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},Ak.prototype._nodeCount=0,Ak.prototype._edgeCount=0})),jk=o((()=>{RLe()})),zLe=l({captureNodeSizes:()=>ULe,shouldCaptureSizes:()=>BLe});function Mk(){if(!(typeof globalThis>`u`))return globalThis}function BLe(){return!!Mk()?.mermaidCaptureSizes}function VLe(){return typeof location>`u`?`browser-dev`:`${location.pathname}${location.search}`}function HLe(e,t){let n=Mk();if(!n)return;let r=t.node(),i=((r&&`ownerSVGElement`in r?r.ownerSVGElement:null)??r)?.id??`(unknown)`;n.mermaidCapturedSizes??=[];let a={svgId:i,sizes:e};n.mermaidCapturedSizes.push(a),n.mermaidLastCapturedSizes=a}function ULe(e,t){let n=[];for(let e of t.nodes)e.isGroup||n.push({id:e.id,width:e.width??0,height:e.height??0});n.length!==0&&HLe({metadata:{captureVersion:WLe,capturedAt:new Date().toISOString(),capturedFrom:VLe()},nodes:n},e)}var WLe,GLe=o((()=>{Vp(),WLe=1,W(Mk,`getCaptureGlobal`),W(BLe,`shouldCaptureSizes`),W(VLe,`capturedFromLocation`),W(HLe,`emitCapturedSizes`),W(ULe,`captureNodeSizes`)}));function Nk(e,{edgePathsClass:t=`edges edgePaths`}={}){let n=e.insert(`g`).attr(`class`,`root`);return{clusters:n.insert(`g`).attr(`class`,`clusters`),edgePaths:n.insert(`g`).attr(`class`,t),edgeLabels:n.insert(`g`).attr(`class`,`edgeLabels`),nodes:n.insert(`g`).attr(`class`,`nodes`),rootGroups:n}}async function KLe(e,t){if(t.label){let{shapeSvg:n,bbox:r}=await qw(e,t);t.labelBBox={width:r.width,height:r.height},n.remove()}else t.labelBBox={width:0,height:0}}async function Pk(e,t,n){let r=await fT(e,t,n),i=r.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,r}async function qLe(e,t){let n=new Ak({multigraph:!0,compound:!0}),r=[...t.edges],i=Oy(),a=Nk(e),{edgeLabels:o,nodes:s}=a,l=new Map,u=e.node()!=null;await Promise.all(t.nodes.map(async e=>{if(e.isGroup)u&&await KLe(s,e),n.setNode(e.id,{...e});else{if(u){let t=await Pk(s,e,{config:i,dir:e.dir});l.set(e.id,t)}n.setNode(e.id,{...e})}}));for(let e of r)u&&dOe(e)&&await DT(o,e),n.setEdge(e.start,e.end,{...e},e.id),t.edges.some(t=>t.id===e.id)||t.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:n}=await Rp(async()=>{let{captureNodeSizes:e}=await Promise.resolve().then(()=>(GLe(),zLe));return{captureNodeSizes:e}},void 0,import.meta.url);n(e,t)}return{graph:n,groups:a,nodeElements:l}}function Fk({prepareLayout:e,measureLayout:t,runLayoutCore:n,paintLayout:r,afterPaint:i,paintOptions:a}){let o=t??Lk;return W(async function(t,s,l,u){let d=s.select(`g`);(l?.insertMarkers??AT)(d,t.markers,t.type,t.diagramId),Ik();let f={element:d,helpers:l,options:u};f.preparedLayout=await e?.(t,f);let p=await o(t,f),m=await n(t,f),h={...f,measure:p};r?await r(t,h,m):await Rk(t,h,a),await i?.(t,h,m)},`render`)}function Ik(){qDe(),uOe(),QDe(),tRe()}async function Lk(e,{element:t}){return await qLe(t,e)}async function Rk(e,t,n={}){let{measure:r}=t,{groups:i}=r;for(let r of n.getNodes?.(e,t)??e.nodes)n.skipNode?.(r,t)||await JLe(i,r,t,n);let a=XLe(e.nodes);for(let r of e.edges)ZLe(r,n)||await QLe(i,r,a,e,n,t)}async function JLe(e,t,n,r){t.clusterNode?hT(t):YLe(t,n,r)?await _T(e.clusters,t):hT(t)}function YLe(e,t,n){return e.isGroup===!0&&(n.isCluster?.(e,t)??!0)}function XLe(e){let t=new Map;for(let n of e)n?.id&&t.set(n.id,n);return t}function ZLe(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}async function QLe(e,t,n,r,i,a){let o=kT(e.edgePaths,{...t},i.clusterDb??new Map,r.type,zk(t.start,t,n,a,i),zk(t.end,t,n,a,i),r.diagramId,$Le(t,i));dOe(t)&&(wT.has(t.id)||await DT(e.edgeLabels,t),eRe(t,o))}function zk(e,t,n,r,i){return i.getEdgeNode?.(e,t,r)??(e?n.get(e)??{}:{})}function $Le(e,t){return typeof t.skipIntersect==`function`?t.skipIntersect(e):t.skipIntersect??!1}function eRe(e,t){let n=t?.updatedPath??t?.originalPath,r=Rv(),{subGraphTitleTotalMargin:i}=pT({flowchart:r.flowchart??{}});if(e.label){let r=wT.get(e.id),a=e.x,o=e.y;if(n){let r=TC.calcLabelPosition(n);G.debug(`Moving label `+e.label+` from (`,a,`,`,o,`) to (`,r.x,`,`,r.y,`) abc88`),t?.updatedPath&&(a=r.x,o=r.y)}r.attr(`transform`,`translate(${a}, ${o+i/2})`)}if(e?.startLabelLeft){let t=TT.get(e.id).startLeft,r=e?.x,i=e?.y;if(n){let t=TC.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.startLabelRight){let t=TT.get(e.id).startRight,r=e.x,i=e.y;if(n){let t=TC.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelLeft){let t=TT.get(e.id).endLeft,r=e.x,i=e.y;if(n){let t=TC.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelRight){let t=TT.get(e.id).endRight,r=e.x,i=e.y;if(n){let t=TC.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}}var Bk,Vk,Hk,tRe,Uk,nRe,Wk,Gk,rRe,Kk,qk,iRe,Jk,Yk,Xk,Zk,aRe,Qk=o((()=>{vT(),jT(),gT(),dT(),OC(),Iy(),Gp(),Vp(),jk(),zp(),W(Nk,`createLayoutElementGroups`),W(KLe,`measureGroupLabel`),W(Pk,`insertMeasuredNode`),W(qLe,`createGraphWithElements`),Bk=new Map,Vk=new Map,Hk=new Map,tRe=W(()=>{Vk.clear(),Hk.clear(),Bk.clear()},`clear`),Uk=W((e,t)=>{let n=Vk.get(t)||[];return G.trace(`In isDescendant`,t,` `,e,` = `,n.includes(e)),n.includes(e)},`isDescendant`),nRe=W((e,t)=>{let n=Vk.get(t)||[];return G.info(`Descendants of `,t,` is `,n),G.info(`Edge is `,e),e.v===t||e.w===t?!1:n?n.includes(e.v)||Uk(e.v,t)||Uk(e.w,t)||n.includes(e.w):(G.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),Wk=W((e,t,n,r)=>{G.debug(`Copying children of `,e,`root`,r,`data`,t.node(e),r);let i=t.children(e)||[];e!==r&&i.push(e),G.debug(`Copying (nodes) clusterId`,e,`nodes`,i),i.forEach(i=>{if(t.children(i).length>0)Wk(i,t,n,r);else{let a=t.node(i);G.info(`cp `,i,` to `,r,` with parent `,e),n.setNode(i,a),r!==t.parent(i)&&(G.debug(`Setting parent`,i,t.parent(i)),n.setParent(i,t.parent(i))),e!==r&&i!==e?(G.debug(`Setting parent`,i,e),n.setParent(i,e)):(G.info(`In copy `,e,`root`,r,`data`,t.node(e),r),G.debug(`Not Setting parent for node=`,i,`cluster!==rootId`,e!==r,`node!==clusterId`,i!==e));let o=t.edges(i);G.debug(`Copying Edges`,o),o.forEach(i=>{G.info(`Edge`,i);let a=t.edge(i.v,i.w,i.name);G.info(`Edge data`,a,r);try{nRe(i,r)?(G.info(`Copying as `,i.v,i.w,a,i.name),n.setEdge(i.v,i.w,a,i.name),G.info(`newGraph edges `,n.edges(),n.edge(n.edges()[0]))):G.info(`Skipping copy of edge `,i.v,`-->`,i.w,` rootId: `,r,` clusterId:`,e)}catch(e){G.error(e)}})}G.debug(`Removing node`,i),t.removeNode(i)})},`copy`),Gk=W((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)Hk.set(i,e),r=[...r,...Gk(i,t)];return r},`extractDescendants`),rRe=W((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),Kk=W((e,t,n)=>{let r=t.children(e);if(G.trace(`Searching children of id `,e,r),r.length<1)return e;let i;for(let e of r){let r=Kk(e,t,n),a=rRe(t,n,r);if(r){if(a.length>0)i=r;else return r}}return i},`findNonClusterChild`),qk=W(e=>!Bk.has(e)||!Bk.get(e).externalConnections?e:Bk.has(e)?Bk.get(e).id:e,`getAnchorId`),iRe=W((e,t)=>{if(!e||t>10){G.debug(`Opting out, no graph `);return}G.debug(`Opting in, graph `),e.nodes().forEach(function(t){e.children(t).length>0&&(G.debug(`Cluster identified`,t,` Replacement id in edges: `,Kk(t,e,t)),Vk.set(t,Gk(t,e)),Bk.set(t,{id:Kk(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let n=e.children(t),r=e.edges();n.length>0?(G.debug(`Cluster identified`,t,Vk),r.forEach(e=>{Uk(e.v,t)^Uk(e.w,t)&&(G.debug(`Edge: `,e,` leaves cluster `,t),G.debug(`Descendants of XXX `,t,`: `,Vk.get(t)),Bk.get(t).externalConnections=!0)})):G.debug(`Not a cluster `,t,Vk)});for(let t of Bk.keys()){let n=Bk.get(t).id,r=e.parent(n);r!==t&&Bk.has(r)&&!Bk.get(r).externalConnections&&(Bk.get(t).id=r);let i=e.edges().some(e=>e.v===t);if(n&&Bk.get(t)?.externalConnections&&i&&Zk(e,n,t)){let r=aRe(e,t,e.parent(n));r&&(Bk.get(t).id=r)}}e.edges().forEach(function(t){let n=e.edge(t);G.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),G.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let r=t.v,i=t.w;if(G.debug(`Fix XXX`,Bk,`ids:`,t.v,t.w,`Translating: `,Bk.get(t.v),` --- `,Bk.get(t.w)),Bk.get(t.v)||Bk.get(t.w)){if(G.debug(`Fixing and trying - removing XXX`,t.v,t.w,t.name),r=qk(t.v),i=qk(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v){let i=e.parent(r);Bk.get(i).externalConnections=!0,n.fromCluster=t.v}if(i!==t.w){let r=e.parent(i);Bk.get(r).externalConnections=!0,n.toCluster=t.w}G.debug(`Fix Replacing with XXX`,r,i,t.name),e.setEdge(r,i,n,t.name)}}),Jk(e,0),G.trace(Bk)},`adjustClustersAndEdges`),Jk=W((e,t)=>{if(t>10){G.error(`Bailing out`);return}let n=e.nodes(),r=!1;for(let t of n){let n=e.children(t);r||=n.length>0}if(!r){G.debug(`Done, no node has children`,e.nodes());return}G.debug(`Nodes = `,n,t);for(let r of n)if(G.debug(`Extracting node`,r,Bk,Bk.has(r)&&!Bk.get(r).externalConnections,!e.parent(r),e.node(r),e.children(`D`),` Depth `,t),!Bk.has(r))G.debug(`Not a cluster`,r,t);else if(!Bk.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){G.debug(`Cluster without external connections, without a parent and with children`,r,t);let n=e.graph().rankdir===`TB`?`LR`:`TB`;Bk.get(r)?.clusterData?.dir&&(n=Bk.get(r).clusterData.dir,G.debug(`Fixing dir`,Bk.get(r).clusterData.dir,n));let i=new Ak({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Wk(r,e,i,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:Bk.get(r).clusterData,label:Bk.get(r).label,graph:i})}else G.debug(`Cluster ** `,r,` **not meeting the criteria !externalConnections:`,!Bk.get(r).externalConnections,` no parent: `,!e.parent(r),` children `,e.children(r)&&e.children(r).length>0,e.children(`D`),t),G.debug(Bk);n=e.nodes(),G.debug(`New list of nodes`,n);for(let r of n){let n=e.node(r);G.debug(` Now next level`,r,n),n?.clusterNode&&Jk(n.graph,t+1)}},`extractor`),Yk=W((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=Yk(e,e.children(t));n=[...n,...r]}),n},`sorter`),Xk=W(e=>Yk(e,e.children()),`sortNodesByHierarchy`),Zk=W((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=Bk.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),aRe=W((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||Uk(i,n))continue;let r=Kk(i,e,t);if(r&&!Zk(e,r,t))return r}return null},`findSafeAnchorNode`),W(Fk,`createCommonLayoutRenderer`),W(Ik,`clearLayoutRenderState`),W(Lk,`defaultMeasureLayout`),W(Rk,`paintLayoutData`),W(JLe,`paintLayoutNode`),W(YLe,`shouldPaintAsCluster`),W(XLe,`buildNodeLookup`),W(ZLe,`shouldSkipPaintEdge`),W(QLe,`paintLayoutEdge`),W(zk,`getRenderedNode`),W($Le,`shouldSkipIntersect`),W(eRe,`positionRenderedEdgeLabel`)}));function oRe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function $k(){if(dRe)return SA;dRe=1;function e(e){return e==null}W(e,`isNothing`);function t(e){return typeof e==`object`&&!!e}W(t,`isObject`);function n(t){return Array.isArray(t)?t:e(t)?[]:[t]}W(n,`toArray`);function r(e,t){if(t){let n=Object.keys(t);for(let r=0,i=n.length;r<i;r+=1){let i=n[r];e[i]=t[i]}}return e}W(r,`extend`);function i(e,t){let n=``;for(let r=0;r<t;r+=1)n+=e;return n}W(i,`repeat`);function a(e){return e===0&&1/e==-1/0}return W(a,`isNegativeZero`),SA.isNothing=e,SA.isObject=t,SA.toArray=n,SA.repeat=i,SA.isNegativeZero=a,SA.extend=r,SA}function eA(){if(fRe)return CA;fRe=1;function e(e,t){let n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
|
|
564
564
|
|
|
565
565
|
`+e.mark.snippet),r+` `+n):r}W(e,`formatError`);function t(t,n){Error.call(this),this.name=`YAMLException`,this.reason=t,this.mark=n,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||``}return W(t,`YAMLException2`),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=W(function(t){return this.name+`: `+e(this,t)},`toString`),CA=t,CA}function sRe(){if(pRe)return wA;pRe=1;let e=$k();function t(e,t,n,r,i){let a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}W(t,`getLine`);function n(t,n){return e.repeat(` `,n-t.length)+t}W(n,`padStart`);function r(r,i){if(i=Object.create(i||null),!r.buffer)return null;i.maxLength||(i.maxLength=79),typeof i.indent!=`number`&&(i.indent=1),typeof i.linesBefore!=`number`&&(i.linesBefore=3),typeof i.linesAfter!=`number`&&(i.linesAfter=2);let a=/\r?\n|\r|\0/g,o=[0],s=[],l,u=-1;for(;l=a.exec(r.buffer);)s.push(l.index),o.push(l.index+l[0].length),r.position<=l.index&&u<0&&(u=o.length-2);u<0&&(u=o.length-1);let d=``,f=Math.min(r.line+i.linesAfter,s.length).toString().length,p=i.maxLength-(i.indent+f+3);for(let a=1;a<=i.linesBefore&&!(u-a<0);a++){let l=t(r.buffer,o[u-a],s[u-a],r.position-(o[u]-o[u-a]),p);d=e.repeat(` `,i.indent)+n((r.line-a+1).toString(),f)+` | `+l.str+`
|
|
566
566
|
`+d}let m=t(r.buffer,o[u],s[u],r.position,p);d+=e.repeat(` `,i.indent)+n((r.line+1).toString(),f)+` | `+m.str+`
|
|
@@ -916,7 +916,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
916
916
|
${e.picking?`if(outColor.a == 0.0) discard;
|
|
917
917
|
else outColor = vIndex;`:``}
|
|
918
918
|
}
|
|
919
|
-
`);i.aPosition=t.getAttribLocation(i,`aPosition`),i.aIndex=t.getAttribLocation(i,`aIndex`),i.aVertType=t.getAttribLocation(i,`aVertType`),i.aTransform=t.getAttribLocation(i,`aTransform`),i.aAtlasId=t.getAttribLocation(i,`aAtlasId`),i.aTex=t.getAttribLocation(i,`aTex`),i.aPointAPointB=t.getAttribLocation(i,`aPointAPointB`),i.aPointCPointD=t.getAttribLocation(i,`aPointCPointD`),i.aLineWidth=t.getAttribLocation(i,`aLineWidth`),i.aColor=t.getAttribLocation(i,`aColor`),i.aCornerRadius=t.getAttribLocation(i,`aCornerRadius`),i.aBorderColor=t.getAttribLocation(i,`aBorderColor`),i.uPanZoomMatrix=t.getUniformLocation(i,`uPanZoomMatrix`),i.uAtlasSize=t.getUniformLocation(i,`uAtlasSize`),i.uBGColor=t.getUniformLocation(i,`uBGColor`),i.uZoom=t.getUniformLocation(i,`uZoom`),i.uTextures=[];for(var a=0;a<this.batchManager.getMaxAtlasesPerBatch();a++)i.uTextures.push(t.getUniformLocation(i,`uTexture${a}`));return i}},{key:`_createVAO`,value:function(){var e=[0,0,1,0,1,1,0,0,1,1,0,1];this.vertexCount=e.length/2;var t=this.maxInstances,n=this.gl,r=this.program,i=n.createVertexArray();return n.bindVertexArray(i),JGe(n,`vec2`,r.aPosition,e),this.transformBuffer=YGe(n,t,r.aTransform),this.indexBuffer=yP(n,t,`vec4`,r.aIndex),this.vertTypeBuffer=yP(n,t,`int`,r.aVertType),this.atlasIdBuffer=yP(n,t,`int`,r.aAtlasId),this.texBuffer=yP(n,t,`vec4`,r.aTex),this.pointAPointBBuffer=yP(n,t,`vec4`,r.aPointAPointB),this.pointCPointDBuffer=yP(n,t,`vec4`,r.aPointCPointD),this.lineWidthBuffer=yP(n,t,`vec2`,r.aLineWidth),this.colorBuffer=yP(n,t,`vec4`,r.aColor),this.cornerRadiusBuffer=yP(n,t,`vec4`,r.aCornerRadius),this.borderColorBuffer=yP(n,t,`vec4`,r.aBorderColor),n.bindVertexArray(null),i}},{key:`buffers`,get:function(){var e=this;return this._buffers||=Object.keys(this).filter(function(e){return KP(e,`Buffer`)}).map(function(t){return e[t]}),this._buffers}},{key:`startFrame`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:jV.SCREEN;this.panZoomMatrix=e,this.renderTarget=t,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:`startBatch`,value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:`endFrame`,value:function(){this.endBatch()}},{key:`_isVisible`,value:function(e,t){return e.visible()?t&&t.isVisible?t.isVisible(e):!0:!1}},{key:`drawTexture`,value:function(e,t,n){var r=this.atlasManager,i=this.batchManager,a=r.getRenderTypeOpts(n);if(this._isVisible(e,a)&&(!e.isEdge()||this._isValidEdge(e))){if(this.renderTarget.picking&&a.getTexPickingMode){var o=a.getTexPickingMode(e);if(o===MV.IGNORE)return;if(o==MV.USE_BB){this.drawPickingRectangle(e,t,n);return}}var s=IN(r.getAtlasInfo(e,n)),l;try{for(s.s();!(l=s.n()).done;){var u=l.value,d=u.atlas,f=u.tex1,p=u.tex2;i.canAddToCurrentBatch(d)||this.endBatch();for(var m=i.getAtlasIndexForBatch(d),h=0,g=[[f,!0],[p,!1]];h<g.length;h++){var _=LN(g[h],2),v=_[0],y=_[1];if(v.w!=0){var b=this.instanceCount;this.vertTypeBuffer.getView(b)[0]=NV,vP(t,this.indexBuffer.getView(b));var x=this.atlasIdBuffer.getView(b);x[0]=m;var S=this.texBuffer.getView(b);S[0]=v.x,S[1]=v.y,S[2]=v.w,S[3]=v.h;var C=this.transformBuffer.getMatrixView(b);this.setTransformMatrix(e,C,a,u,y),this.instanceCount++,y||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(e){s.e(e)}finally{s.f()}}}},{key:`setTransformMatrix`,value:function(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=0;if(n.shapeProps&&n.shapeProps.padding&&(a=e.pstyle(n.shapeProps.padding).pfValue),r){var o=r.bb,s=r.tex1,l=r.tex2,u=s.w/(s.w+l.w);i||(u=1-u);var d=this._getAdjustedBB(o,a,i,u);this._applyTransformMatrix(t,d,n,e)}else{var f=n.getBoundingBox(e),p=this._getAdjustedBB(f,a,!0,1);this._applyTransformMatrix(t,p,n,e)}}},{key:`_applyTransformMatrix`,value:function(e,t,n,r){var i,a;ZGe(e);var o=n.getRotation?n.getRotation(r):0;if(o!==0){var s=n.getRotationPoint(r),l=s.x,u=s.y;xP(e,e,[l,u]),$Ge(e,e,o);var d=n.getRotationOffset(r);i=d.x+(t.xOffset||0),a=d.y+(t.yOffset||0)}else i=t.x1,a=t.y1;xP(e,e,[i,a]),SP(e,e,[t.w,t.h])}},{key:`_getAdjustedBB`,value:function(e,t,n,r){var i=e.x1,a=e.y1,o=e.w,s=e.h,l=e.yOffset;t&&(i-=t,a-=t,o+=2*t,s+=2*t);var u=0,d=o*r;return n&&r<1?o=d:!n&&r<1&&(u=o-d,i+=u,o=d),{x1:i,y1:a,w:o,h:s,xOffset:u,yOffset:l}}},{key:`drawPickingRectangle`,value:function(e,t,n){var r=this.atlasManager.getRenderTypeOpts(n),i=this.instanceCount;this.vertTypeBuffer.getView(i)[0]=FV,vP(t,this.indexBuffer.getView(i)),_P([0,0,0],1,this.colorBuffer.getView(i));var a=this.transformBuffer.getMatrixView(i);this.setTransformMatrix(e,a,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:`drawNode`,value:function(e,t,n){var r=this.simpleShapeOptions.get(n);if(this._isVisible(e,r)){var i=r.shapeProps,a=this._getVertTypeForShape(e,i.shape);if(a===void 0||r.isSimple&&!r.isSimple(e,this.renderTarget)){this.drawTexture(e,t,n);return}var o=this.instanceCount;if(this.vertTypeBuffer.getView(o)[0]=a,a===IV||a===LV){var s=r.getBoundingBox(e),l=this._getCornerRadius(e,i.radius,s),u=this.cornerRadiusBuffer.getView(o);u[0]=l,u[1]=l,u[2]=l,u[3]=l,a===LV&&(u[0]=0,u[2]=0)}vP(t,this.indexBuffer.getView(o));var d=this.renderTarget.picking?1:n===`node-body`?e.effectiveOpacity():1,f=this.renderTarget.picking?1:e.pstyle(i.opacity).value*d,p=e.pstyle(i.color).value;_P(p,f,this.colorBuffer.getView(o));var m=this.lineWidthBuffer.getView(o);if(m[0]=0,m[1]=0,i.border){var h=e.pstyle(`border-width`).value;if(h>0){var g=e.pstyle(`border-color`).value;_P(g,d*e.pstyle(`border-opacity`).value,this.borderColorBuffer.getView(o));var _=e.pstyle(`border-position`).value;if(_===`inside`)m[0]=0,m[1]=-h;else if(_===`outside`)m[0]=h,m[1]=0;else{var v=h/2;m[0]=v,m[1]=-v}}}var y=this.transformBuffer.getMatrixView(o);this.setTransformMatrix(e,y,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:`_getVertTypeForShape`,value:function(e,t){switch(e.pstyle(t).value){case`rectangle`:return FV;case`ellipse`:return RV;case`roundrectangle`:case`round-rectangle`:return IV;case`bottom-round-rectangle`:return LV;default:return}}},{key:`_getCornerRadius`,value:function(e,t,n){var r=n.w,i=n.h;if(e.pstyle(t).value===`auto`)return LI(r,i);var a=e.pstyle(t).pfValue,o=r/2,s=i/2;return Math.min(a,s,o)}},{key:`drawEdgeArrow`,value:function(e,t,n){if(e.visible()){var r=e._private.rscratch,i,a,o;if(n===`source`?(i=r.arrowStartX,a=r.arrowStartY,o=r.srcArrowAngle):(i=r.arrowEndX,a=r.arrowEndY,o=r.tgtArrowAngle),!(isNaN(i)||i==null||isNaN(a)||a==null||isNaN(o)||o==null)&&e.pstyle(n+`-arrow-shape`).value!==`none`){var s=e.pstyle(n+`-arrow-color`).value,l=e.pstyle(`opacity`).value*e.pstyle(`line-opacity`).value,u=e.pstyle(`width`).pfValue,d=e.pstyle(`arrow-scale`).value,f=this.r.getArrowWidth(u,d),p=this.instanceCount,m=this.transformBuffer.getMatrixView(p);ZGe(m),xP(m,m,[i,a]),SP(m,m,[f,f]),$Ge(m,m,o),this.vertTypeBuffer.getView(p)[0]=PV,vP(t,this.indexBuffer.getView(p)),_P(s,l,this.colorBuffer.getView(p)),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:`drawEdgeLine`,value:function(e,t){if(e.visible()){var n=this._getEdgePoints(e);if(n){var r=e.pstyle(`opacity`).value,i=e.pstyle(`line-opacity`).value,a=e.pstyle(`width`).pfValue,o=e.pstyle(`line-color`).value,s=r*i;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),n.length==4){var l=this.instanceCount;this.vertTypeBuffer.getView(l)[0]=aQe,vP(t,this.indexBuffer.getView(l)),_P(o,s,this.colorBuffer.getView(l));var u=this.lineWidthBuffer.getView(l);u[0]=a;var d=this.pointAPointBBuffer.getView(l);d[0]=n[0],d[1]=n[1],d[2]=n[2],d[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var f=0;f<n.length-2;f+=2){var p=this.instanceCount;this.vertTypeBuffer.getView(p)[0]=oQe,vP(t,this.indexBuffer.getView(p)),_P(o,s,this.colorBuffer.getView(p));var m=this.lineWidthBuffer.getView(p);m[0]=a;var h=n[f-2],g=n[f-1],_=n[f],v=n[f+1],y=n[f+2],b=n[f+3],x=n[f+4],S=n[f+5];f==0&&(h=2*_-y+.001,g=2*v-b+.001),f==n.length-4&&(x=2*y-_+.001,S=2*b-v+.001);var C=this.pointAPointBBuffer.getView(p);C[0]=h,C[1]=g,C[2]=_,C[3]=v;var w=this.pointCPointDBuffer.getView(p);w[0]=y,w[1]=b,w[2]=x,w[3]=S,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:`_isValidEdge`,value:function(e){var t=e._private.rscratch;return!(t.badLine||t.allpts==null||isNaN(t.allpts[0]))}},{key:`_getEdgePoints`,value:function(e){var t=e._private.rscratch;if(this._isValidEdge(e)){var n=t.allpts;if(n.length==4)return n;var r=this._getNumSegments(e);return this._getCurveSegmentPoints(n,r)}}},{key:`_getNumSegments`,value:function(e){return Math.min(15,this.maxInstances)}},{key:`_getCurveSegmentPoints`,value:function(e,t){if(e.length==4)return e;for(var n=Array((t+1)*2),r=0;r<=t;r++)if(r==0)n[0]=e[0],n[1]=e[1];else if(r==t)n[r*2]=e[e.length-2],n[r*2+1]=e[e.length-1];else{var i=r/t;this._setCurvePoint(e,i,n,r*2)}return n}},{key:`_setCurvePoint`,value:function(e,t,n,r){if(e.length<=2)n[r]=e[0],n[r+1]=e[1];else{for(var i=Array(e.length-2),a=0;a<i.length;a+=2){var o=(1-t)*e[a]+t*e[a+2],s=(1-t)*e[a+1]+t*e[a+3];i[a]=o,i[a+1]=s}return this._setCurvePoint(i,t,n,r)}}},{key:`endBatch`,value:function(){var e=this.gl,t=this.vao,n=this.vertexCount,r=this.instanceCount;if(r!==0){var i=this.renderTarget.picking?this.pickingProgram:this.program;e.useProgram(i),e.bindVertexArray(t);var a=IN(this.buffers),o;try{for(a.s();!(o=a.n()).done;)o.value.bufferSubData(r)}catch(e){a.e(e)}finally{a.f()}for(var s=this.batchManager.getAtlases(),l=0;l<s.length;l++)s[l].bufferIfNeeded(e);for(var u=0;u<s.length;u++)e.activeTexture(e.TEXTURE0+u),e.bindTexture(e.TEXTURE_2D,s[u].texture),e.uniform1i(i.uTextures[u],u);e.uniform1f(i.uZoom,zGe(this.r)),e.uniformMatrix3fv(i.uPanZoomMatrix,!1,this.panZoomMatrix),e.uniform1i(i.uAtlasSize,this.batchManager.getAtlasSize());var d=_P(this.bgColor,1);e.uniform4fv(i.uBGColor,d),e.drawArraysInstanced(e.TRIANGLES,0,n,r),e.bindVertexArray(null),e.bindTexture(e.TEXTURE_2D,null),this.debug&&this.batchDebugInfo.push({count:r,atlasCount:s.length}),this.startBatch()}}},{key:`getDebugInfo`,value:function(){var e=this.atlasManager.getDebugInfo(),t=e.reduce(function(e,t){return e+t.atlasCount},0),n=this.batchDebugInfo,r=n.reduce(function(e,t){return e+t.count},0);return{atlasInfo:e,totalAtlases:t,wrappedCount:this.wrappedCount,simpleCount:this.simpleCount,batchCount:n.length,batchInfo:n,totalInstances:r}}}])}(),cQe={},cQe.initWebgl=function(e,t){var n=this,r=n.data.contexts[n.WEBGL];e.bgColor=nKe(n),e.webglTexSize=Math.min(e.webglTexSize,r.getParameter(r.MAX_TEXTURE_SIZE)),e.webglTexRows=Math.min(e.webglTexRows,54),e.webglTexRowsNodes=Math.min(e.webglTexRowsNodes,54),e.webglBatchSize=Math.min(e.webglBatchSize,16384),e.webglTexPerBatch=Math.min(e.webglTexPerBatch,r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS)),n.webglDebug=e.webglDebug,n.webglDebugShowAtlases=e.webglDebugShowAtlases,n.pickingFrameBuffer=XGe(r),n.pickingFrameBuffer.needsDraw=!0,n.drawing=new sQe(n,r,e);var i=function(e){return function(t){return n.getTextAngle(t,e)}},a=function(e){return function(t){var n=t.pstyle(e);return n&&n.value}},o=function(e){return function(t){return t.pstyle(`${e}-opacity`).value>0}},s=function(e){return e.pstyle(`text-events`).strValue===`yes`?MV.USE_BB:MV.IGNORE},l=function(e){var t=e.position(),n=t.x,r=t.y,i=e.outerWidth(),a=e.outerHeight();return{w:i,h:a,x1:n-i/2,y1:r-a/2}};n.drawing.addAtlasCollection(`node`,{texRows:e.webglTexRowsNodes}),n.drawing.addAtlasCollection(`label`,{texRows:e.webglTexRows}),n.drawing.addTextureAtlasRenderType(`node-body`,{collection:`node`,getKey:t.getStyleKey,getBoundingBox:t.getElementBox,drawElement:t.drawElement}),n.drawing.addSimpleShapeRenderType(`node-body`,{getBoundingBox:l,isSimple:VGe,shapeProps:{shape:`shape`,color:`background-color`,opacity:`background-opacity`,radius:`corner-radius`,border:!0}}),n.drawing.addSimpleShapeRenderType(`node-overlay`,{getBoundingBox:l,isVisible:o(`overlay`),shapeProps:{shape:`overlay-shape`,color:`overlay-color`,opacity:`overlay-opacity`,padding:`overlay-padding`,radius:`overlay-corner-radius`}}),n.drawing.addSimpleShapeRenderType(`node-underlay`,{getBoundingBox:l,isVisible:o(`underlay`),shapeProps:{shape:`underlay-shape`,color:`underlay-color`,opacity:`underlay-opacity`,padding:`underlay-padding`,radius:`underlay-corner-radius`}}),n.drawing.addTextureAtlasRenderType(`label`,{collection:`label`,getTexPickingMode:s,getKey:zV(t.getLabelKey,null),getBoundingBox:BV(t.getLabelBox,null),drawClipped:!0,drawElement:t.drawLabel,getRotation:i(null),getRotationPoint:t.getLabelRotationPoint,getRotationOffset:t.getLabelRotationOffset,isVisible:a(`label`)}),n.drawing.addTextureAtlasRenderType(`edge-source-label`,{collection:`label`,getTexPickingMode:s,getKey:zV(t.getSourceLabelKey,`source`),getBoundingBox:BV(t.getSourceLabelBox,`source`),drawClipped:!0,drawElement:t.drawSourceLabel,getRotation:i(`source`),getRotationPoint:t.getSourceLabelRotationPoint,getRotationOffset:t.getSourceLabelRotationOffset,isVisible:a(`source-label`)}),n.drawing.addTextureAtlasRenderType(`edge-target-label`,{collection:`label`,getTexPickingMode:s,getKey:zV(t.getTargetLabelKey,`target`),getBoundingBox:BV(t.getTargetLabelBox,`target`),drawClipped:!0,drawElement:t.drawTargetLabel,getRotation:i(`target`),getRotationPoint:t.getTargetLabelRotationPoint,getRotationOffset:t.getTargetLabelRotationOffset,isVisible:a(`target-label`)});var u=mF(function(){console.log(`garbage collect flag set`),n.data.gc=!0},1e4);n.onUpdateEleCalcs(function(e,t){var r=!1;t&&t.length>0&&(r|=n.drawing.invalidate(t)),r&&u()}),iKe(n)},zV=function(e,t){return function(n){var r=e(n),i=rKe(n,t);return i.length>1?i.map(function(e,t){return`${r}_${t}`}):r}},BV=function(e,t){return function(n,r){var i=e(n);if(typeof r==`string`){var a=r.indexOf(`_`);if(a>0){var o=Number(r.substring(a+1)),s=rKe(n,t),l=i.h/s.length,u=l*o,d=i.y1+u;return{x1:i.x1,w:i.w,y1:d,h:l,yOffset:u}}}return i}},VV={},VV.drawPolygonPath=function(e,t,n,r,i,a){var o=r/2,s=i/2;e.beginPath&&e.beginPath(),e.moveTo(t+o*a[0],n+s*a[1]);for(var l=1;l<a.length/2;l++)e.lineTo(t+o*a[l*2],n+s*a[l*2+1]);e.closePath()},VV.drawRoundPolygonPath=function(e,t,n,r,i,a,o){o.forEach(function(t){return EGe(e,t)}),e.closePath()},VV.drawRoundRectanglePath=function(e,t,n,r,i,a){var o=r/2,s=i/2,l=a===`auto`?LI(r,i):Math.min(a,s,o);e.beginPath&&e.beginPath(),e.moveTo(t,n-s),e.arcTo(t+o,n-s,t+o,n,l),e.arcTo(t+o,n+s,t,n+s,l),e.arcTo(t-o,n+s,t-o,n,l),e.arcTo(t-o,n-s,t,n-s,l),e.lineTo(t,n-s),e.closePath()},VV.drawBottomRoundRectanglePath=function(e,t,n,r,i,a){var o=r/2,s=i/2,l=a===`auto`?LI(r,i):a;e.beginPath&&e.beginPath(),e.moveTo(t,n-s),e.lineTo(t+o,n-s),e.lineTo(t+o,n),e.arcTo(t+o,n+s,t,n+s,l),e.arcTo(t-o,n+s,t-o,n,l),e.lineTo(t-o,n-s),e.lineTo(t,n-s),e.closePath()},VV.drawCutRectanglePath=function(e,t,n,r,i,a,o){var s=r/2,l=i/2,u=o===`auto`?zI():o;e.beginPath&&e.beginPath(),e.moveTo(t-s+u,n-l),e.lineTo(t+s-u,n-l),e.lineTo(t+s,n-l+u),e.lineTo(t+s,n+l-u),e.lineTo(t+s-u,n+l),e.lineTo(t-s+u,n+l),e.lineTo(t-s,n+l-u),e.lineTo(t-s,n-l+u),e.closePath()},VV.drawBarrelPath=function(e,t,n,r,i){var a=r/2,o=i/2,s=t-a,l=t+a,u=n-o,d=n+o,f=BI(r,i),p=f.widthOffset,m=f.heightOffset,h=f.ctrlPtOffsetPct*p;e.beginPath&&e.beginPath(),e.moveTo(s,u+m),e.lineTo(s,d-m),e.quadraticCurveTo(s+h,d,s+p,d),e.lineTo(l-p,d),e.quadraticCurveTo(l-h,d,l,d-m),e.lineTo(l,u+m),e.quadraticCurveTo(l-h,u,l-p,u),e.lineTo(s+p,u),e.quadraticCurveTo(s+h,u,s,u+m),e.closePath()},lQe=Math.sin(0),uQe=Math.cos(0),HV={},UV={},dQe=Math.PI/40,WV=0*Math.PI;WV<2*Math.PI;WV+=dQe)HV[WV]=Math.sin(WV),UV[WV]=Math.cos(WV);VV.drawEllipsePath=function(e,t,n,r,i){if(e.beginPath&&e.beginPath(),e.ellipse)e.ellipse(t,n,r/2,i/2,0,0,2*Math.PI);else for(var a,o,s=r/2,l=i/2,u=0*Math.PI;u<2*Math.PI;u+=dQe)a=t-s*HV[u]*lQe+s*UV[u]*uQe,o=n+l*UV[u]*lQe+l*HV[u]*uQe,u===0?e.moveTo(a,o):e.lineTo(a,o);e.closePath()},GV={},GV.createBuffer=function(e,t){var n=document.createElement(`canvas`);return n.width=e,n.height=t,[n,n.getContext(`2d`)]},GV.bufferCanvasImage=function(e){var t=this.cy,n=t.mutableElements().boundingBox(),r=this.findContainerClientCoords(),i=e.full?Math.ceil(n.w):r[2],a=e.full?Math.ceil(n.h):r[3],o=MP(e.maxWidth)||MP(e.maxHeight),s=this.getPixelRatio(),l=1;if(e.scale!==void 0)i*=e.scale,a*=e.scale,l=e.scale;else if(o){var u=1/0,d=1/0;MP(e.maxWidth)&&(u=l*e.maxWidth/i),MP(e.maxHeight)&&(d=l*e.maxHeight/a),l=Math.min(u,d),i*=l,a*=l}o||(i*=s,a*=s,l*=s);var f=document.createElement(`canvas`);f.width=i,f.height=a,f.style.width=i+`px`,f.style.height=a+`px`;var p=f.getContext(`2d`);if(i>0&&a>0){p.clearRect(0,0,i,a),p.globalCompositeOperation=`source-over`;var m=this.getCachedZSortedEles();if(e.full)p.translate(-n.x1*l,-n.y1*l),p.scale(l,l),this.drawElements(p,m),p.scale(1/l,1/l),p.translate(n.x1*l,n.y1*l);else{var h=t.pan(),g={x:h.x*l,y:h.y*l};l*=t.zoom(),p.translate(g.x,g.y),p.scale(l,l),this.drawElements(p,m),p.scale(1/l,1/l),p.translate(-g.x,-g.y)}e.bg&&(p.globalCompositeOperation=`destination-over`,p.fillStyle=e.bg,p.rect(0,0,i,a),p.fill())}return f},GV.png=function(e){return _Ke(e,this.bufferCanvasImage(e),`image/png`)},GV.jpg=function(e){return _Ke(e,this.bufferCanvasImage(e),`image/jpeg`)},fQe={},fQe.nodeShapeImpl=function(e,t,n,r,i,a,o,s){switch(e){case`ellipse`:return this.drawEllipsePath(t,n,r,i,a);case`polygon`:return this.drawPolygonPath(t,n,r,i,a,o);case`round-polygon`:return this.drawRoundPolygonPath(t,n,r,i,a,o,s);case`roundrectangle`:case`round-rectangle`:return this.drawRoundRectanglePath(t,n,r,i,a,s);case`cutrectangle`:case`cut-rectangle`:return this.drawCutRectanglePath(t,n,r,i,a,o,s);case`bottomroundrectangle`:case`bottom-round-rectangle`:return this.drawBottomRoundRectanglePath(t,n,r,i,a,s);case`barrel`:return this.drawBarrelPath(t,n,r,i,a)}},pQe=vKe,KV=vKe.prototype,KV.CANVAS_LAYERS=3,KV.SELECT_BOX=0,KV.DRAG=1,KV.NODE=2,KV.WEBGL=3,KV.CANVAS_TYPES=[`2d`,`2d`,`2d`,`webgl2`],KV.BUFFER_COUNT=3,KV.TEXTURE_BUFFER=0,KV.MOTIONBLUR_BUFFER_NODE=1,KV.MOTIONBLUR_BUFFER_DRAG=2,KV.redrawHint=function(e,t){var n=this;switch(e){case`eles`:n.data.canvasNeedsRedraw[KV.NODE]=t;break;case`drag`:n.data.canvasNeedsRedraw[KV.DRAG]=t;break;case`select`:n.data.canvasNeedsRedraw[KV.SELECT_BOX]=t;break;case`gc`:n.data.gc=!0}},mQe=typeof Path2D<`u`,KV.path2dEnabled=function(e){if(e===void 0)return this.pathsEnabled;this.pathsEnabled=!!e},KV.usePaths=function(){return mQe&&this.pathsEnabled},KV.setImgSmoothing=function(e,t){e.imageSmoothingEnabled==null?(e.webkitImageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t):e.imageSmoothingEnabled=t},KV.getImgSmoothing=function(e){return e.imageSmoothingEnabled==null?e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled:e.imageSmoothingEnabled},KV.makeOffscreenCanvas=function(e,t){var n;return(typeof OffscreenCanvas>`u`?`undefined`:zN(OffscreenCanvas))===`undefined`?(n=this.cy.window().document.createElement(`canvas`),n.width=e,n.height=t):n=new OffscreenCanvas(e,t),n},[bV,xV,CV,TV,EV,DV,kV,cQe,VV,GV,fQe].forEach(function(e){YP(KV,e)}),hQe=[{type:`layout`,extensions:rZe},{type:`renderer`,extensions:[{name:`null`,impl:TGe},{name:`base`,impl:tV},{name:`canvas`,impl:pQe}]}],qV={},gQe={},JV=function(){if(arguments.length===2)return bKe.apply(null,arguments);if(arguments.length===3)return yKe.apply(null,arguments);if(arguments.length===4)return SKe.apply(null,arguments);if(arguments.length===5)return xKe.apply(null,arguments);IF(`Invalid extension access syntax`)},sB.prototype.extension=JV,hQe.forEach(function(e){e.extensions.forEach(function(t){yKe(e.type,t.name,t.impl)})}),YV=function(){if(!(this instanceof YV))return new YV;this.length=0},XV=YV.prototype,XV.instanceString=function(){return`stylesheet`},XV.selector=function(e){var t=this.length++;return this[t]={selector:e,properties:[]},this},XV.css=function(e,t){var n=this.length-1;if(OP(e))this[n].properties.push({name:e,value:t});else if(jP(e))for(var r=e,i=Object.keys(r),a=0;a<i.length;a++){var o=i[a],s=r[o];if(s!=null){var l=rB.properties[o]||rB.properties[UP(o)];if(l!=null){var u=l.name,d=s;this[n].properties.push({name:u,value:d})}}}return this},XV.style=XV.css,XV.generateStyle=function(e){var t=new rB(e);return this.appendToStyle(t)},XV.appendToStyle=function(e){for(var t=0;t<this.length;t++){var n=this[t],r=n.selector,i=n.properties;e.selector(r);for(var a=0;a<i.length;a++){var o=i[a];e.css(o.name,o.value)}}return e},_Qe=`3.34.2`,ZV=function(e){if(e===void 0&&(e={}),jP(e))return new sB(e);if(OP(e))return JV.apply(JV,arguments)},ZV.use=function(e){var t=Array.prototype.slice.call(arguments,1);return t.unshift(ZV),e.apply(null,t),this},ZV.warnings=function(e){return LF(e)},ZV.version=_Qe,ZV.stylesheet=ZV.Stylesheet=YV})),yQe=s(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.layoutBase=r():n.layoutBase=r()})(e,function(){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=26)})([(function(e,t,n){function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,e.exports=r}),(function(e,t,n){var r=n(2),i=n(8),a=n(9);function o(e,t,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw`Node is not incident with this edge`},o.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=[,,,,];this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o}),(function(e,t,n){function r(e){this.vGraphObject=e}e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(13),o=n(0),s=n(16),l=n(4);function u(e,t,n,o){n==null&&o==null&&(o=t),r.call(this,o),e.graphManager!=null&&(e=e.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=o,this.edges=[],this.graphManager=e,this.rect=n!=null&&t!=null?new a(t.x,t.y,n.width,n.height):new a}for(var d in u.prototype=Object.create(r.prototype),r)u[d]=r[d];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(e){this.rect.width=e},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(e){this.rect.height=e},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},u.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},u.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},u.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},u.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.target==e){if(r.source!=n)throw`Incorrect edge source!`;t.push(r)}}),t},u.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.source!=n&&r.target!=n)throw`Incorrect edge source and/or target`;(r.target==e||r.source==e)&&t.push(r)}),t},u.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach(function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw`Incorrect incidency!`;e.add(n.source)}}),e},u.prototype.withChildren=function(){var e=new Set,t,n;if(e.add(this),this.child!=null)for(var r=this.child.getNodes(),i=0;i<r.length;i++)t=r[i],n=t.withChildren(),n.forEach(function(t){e.add(t)});return e},u.prototype.getNoOfChildren=function(){var e=0,t;if(this.child==null)e=1;else for(var n=this.child.getNodes(),r=0;r<n.length;r++)t=n[r],e+=t.getNoOfChildren();return e==0&&(e=1),e},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw`assert failed`;return this.estimatedSize},u.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},u.prototype.scatter=function(){var e,t,n=-o.INITIAL_WORLD_BOUNDARY,r=o.INITIAL_WORLD_BOUNDARY;e=o.WORLD_CENTER_X+s.nextDouble()*(r-n)+n;var i=-o.INITIAL_WORLD_BOUNDARY,a=o.INITIAL_WORLD_BOUNDARY;t=o.WORLD_CENTER_Y+s.nextDouble()*(a-i)+i,this.rect.x=e,this.rect.y=t},u.prototype.updateBounds=function(){if(this.getChild()==null)throw`assert failed`;if(this.getChild().getNodes().length!=0){var e=this.getChild();if(e.updateBounds(!0),this.rect.x=e.getLeft(),this.rect.y=e.getTop(),this.setWidth(e.getRight()-e.getLeft()),this.setHeight(e.getBottom()-e.getTop()),o.NODE_DIMENSIONS_INCLUDE_LABELS){var t=e.getRight()-e.getLeft(),n=e.getBottom()-e.getTop();this.labelWidth>t&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&(this.labelPos==`center`?this.rect.y-=(this.labelHeight-n)/2:this.labelPos==`top`&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw`assert failed`;return this.inclusionTreeDepth},u.prototype.transform=function(e){var t=this.rect.x;t>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY);var n=this.rect.y;n>o.WORLD_BOUNDARY?n=o.WORLD_BOUNDARY:n<-o.WORLD_BOUNDARY&&(n=-o.WORLD_BOUNDARY);var r=new l(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=u}),(function(e,t,n){function r(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(0),o=n(6),s=n(3),l=n(1),u=n(13),d=n(12),f=n(11);function p(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,t!=null&&t instanceof o?this.graphManager=t:t!=null&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var m in p.prototype=Object.create(r.prototype),r)p[m]=r[m];p.prototype.getNodes=function(){return this.nodes},p.prototype.getEdges=function(){return this.edges},p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getParent=function(){return this.parent},p.prototype.getLeft=function(){return this.left},p.prototype.getRight=function(){return this.right},p.prototype.getTop=function(){return this.top},p.prototype.getBottom=function(){return this.bottom},p.prototype.isConnected=function(){return this.isConnected},p.prototype.add=function(e,t,n){if(t==null&&n==null){var r=e;if(this.graphManager==null)throw`Graph has no graph mgr!`;if(this.getNodes().indexOf(r)>-1)throw`Node already in graph!`;return r.owner=this,this.getNodes().push(r),r}var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw`Source or target not in graph!`;if(t.owner!=n.owner||t.owner!=this)throw`Both owners must be this graph!`;return t.owner==n.owner?(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i):null},p.prototype.remove=function(e){var t=e;if(e instanceof s){if(t==null)throw`Node is null!`;if(t.owner==null||t.owner!=this)throw`Owner graph is invalid!`;if(this.graphManager==null)throw`Owner graph manager is invalid!`;for(var n=t.edges.slice(),r,i=n.length,a=0;a<i;a++)r=n[a],r.isInterGraph?this.graphManager.remove(r):r.source.owner.remove(r);var o=this.nodes.indexOf(t);if(o==-1)throw`Node not in owner node list!`;this.nodes.splice(o,1)}else if(e instanceof l){var r=e;if(r==null)throw`Edge is null!`;if(r.source==null||r.target==null)throw`Source and/or target is null!`;if(r.source.owner==null||r.target.owner==null||r.source.owner!=this||r.target.owner!=this)throw`Source and/or target owner is invalid!`;var u=r.source.edges.indexOf(r),d=r.target.edges.indexOf(r);if(!(u>-1&&d>-1))throw`Source and/or target doesn't know this edge!`;r.source.edges.splice(u,1),r.target!=r.source&&r.target.edges.splice(d,1);var o=r.source.owner.getEdges().indexOf(r);if(o==-1)throw`Not in owner's edge list!`;r.source.owner.getEdges().splice(o,1)}},p.prototype.updateLeftTop=function(){for(var e=i.MAX_VALUE,t=i.MAX_VALUE,n,r,a,o=this.getNodes(),s=o.length,l=0;l<s;l++){var u=o[l];n=u.getTop(),r=u.getLeft(),e>n&&(e=n),t>r&&(t=r)}return e==i.MAX_VALUE?null:(a=o[0].getParent().paddingLeft==null?this.margin:o[0].getParent().paddingLeft,this.left=t-a,this.top=e-a,new d(this.left,this.top))},p.prototype.updateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,l,d,f,p=this.nodes,m=p.length,h=0;h<m;h++){var g=p[h];e&&g.child!=null&&g.updateBounds(),o=g.getLeft(),s=g.getRight(),l=g.getTop(),d=g.getBottom(),t>o&&(t=o),n<s&&(n=s),r>l&&(r=l),a<d&&(a=d)}var _=new u(t,r,n-t,a-r);t==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),f=p[0].getParent().paddingLeft==null?this.margin:p[0].getParent().paddingLeft,this.left=_.x-f,this.right=_.x+_.width+f,this.top=_.y-f,this.bottom=_.y+_.height+f},p.calculateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,l,d,f=e.length,p=0;p<f;p++){var m=e[p];o=m.getLeft(),s=m.getRight(),l=m.getTop(),d=m.getBottom(),t>o&&(t=o),n<s&&(n=s),r>l&&(r=l),a<d&&(a=d)}return new u(t,r,n-t,a-r)},p.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},p.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw`assert failed`;return this.estimatedSize},p.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,n=t.length,r=0;r<n;r++){var i=t[r];e+=i.calcEstimatedSize()}return this.estimatedSize=e==0?a.EMPTY_COMPOUND_NODE_SIZE:e/Math.sqrt(this.nodes.length),this.estimatedSize},p.prototype.updateConnected=function(){var e=this;if(this.nodes.length==0){this.isConnected=!0;return}var t=new f,n=new Set,r=this.nodes[0],i,a;for(r.withChildren().forEach(function(e){t.push(e),n.add(e)});t.length!==0;){r=t.shift(),i=r.getEdges();for(var o=i.length,s=0;s<o;s++)a=i[s].getOtherEndInGraph(r,this),a!=null&&!n.has(a)&&a.withChildren().forEach(function(e){t.push(e),n.add(e)})}if(this.isConnected=!1,n.size>=this.nodes.length){var l=0;n.forEach(function(t){t.owner==e&&l++}),l==this.nodes.length&&(this.isConnected=!0)}},e.exports=p}),(function(e,t,n){var r,i=n(1);function a(e){r=n(5),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(e,t,n,r,i){if(n==null&&r==null&&i==null){if(e==null)throw`Graph is null!`;if(t==null)throw`Parent node is null!`;if(this.graphs.indexOf(e)>-1)throw`Graph already in this graph mgr!`;if(this.graphs.push(e),e.parent!=null)throw`Already has a parent!`;if(t.child!=null)throw`Already has a child!`;return e.parent=t,t.child=e,e}i=n,r=t,n=e;var a=r.getOwner(),o=i.getOwner();if(a==null||a.getGraphManager()!=this)throw`Source not in this graph mgr!`;if(o==null||o.getGraphManager()!=this)throw`Target not in this graph mgr!`;if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw`Edge already in inter-graph edge list!`;if(this.edges.push(n),n.source==null||n.target==null)throw`Edge source and/or target is null!`;if(n.source.edges.indexOf(n)!=-1||n.target.edges.indexOf(n)!=-1)throw`Edge already in source and/or target incidency list!`;return n.source.edges.push(n),n.target.edges.push(n),n},a.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw`Graph not in this graph mgr`;if(!(t==this.rootGraph||t.parent!=null&&t.parent.graphManager==this))throw`Invalid parent node!`;var n=[];n=n.concat(t.getEdges());for(var a,o=n.length,s=0;s<o;s++)a=n[s],t.remove(a);var l=[];l=l.concat(t.getNodes());var u;o=l.length;for(var s=0;s<o;s++)u=l[s],t.remove(u);t==this.rootGraph&&this.setRootGraph(null);var d=this.graphs.indexOf(t);this.graphs.splice(d,1),t.parent=null}else if(e instanceof i){if(a=e,a==null)throw`Edge is null!`;if(!a.isInterGraph)throw`Not an inter-graph edge!`;if(a.source==null||a.target==null)throw`Source and/or target is null!`;if(a.source.edges.indexOf(a)==-1||a.target.edges.indexOf(a)==-1)throw`Source and/or target doesn't know this edge!`;var d=a.source.edges.indexOf(a);if(a.source.edges.splice(d,1),d=a.target.edges.indexOf(a),a.target.edges.splice(d,1),a.source.owner==null||a.source.owner.getGraphManager()==null)throw`Edge owner graph or owner graph manager is null!`;if(a.source.owner.getGraphManager().edges.indexOf(a)==-1)throw`Not in owner graph manager's edge list!`;var d=a.source.owner.getGraphManager().edges.indexOf(a);a.source.owner.getGraphManager().edges.splice(d,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],t=this.getGraphs(),n=t.length,r=0;r<n;r++)e=e.concat(t[r].getNodes());this.allNodes=e}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],t=this.getGraphs();t.length;for(var n=0;n<t.length;n++)e=e.concat(t[n].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw`assert failed`;this.allNodesToApplyGravitation=e},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw`Root not in this graph mgr!`;this.rootGraph=e,e.parent??=this.layout.newNode(`Root node`)},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(e,t){if(e==null||t==null)throw`assert failed`;if(e==t)return!0;var n=e.getOwner(),r;do{if(r=n.getParent(),r==null)break;if(r==t)return!0;if(n=r.getOwner(),n==null)break}while(1);n=t.getOwner();do{if(r=n.getParent(),r==null)break;if(r==e)return!0;if(n=r.getOwner(),n==null)break}while(1);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var e,t,n,r,i,a=this.getAllEdges(),o=a.length,s=0;s<o;s++){if(e=a[s],t=e.source,n=e.target,e.lca=null,e.sourceInLca=t,e.targetInLca=n,t==n){e.lca=t.getOwner();continue}for(r=t.getOwner();e.lca==null;){for(e.targetInLca=n,i=n.getOwner();e.lca==null;){if(i==r){e.lca=i;break}if(i==this.rootGraph)break;if(e.lca!=null)throw`assert failed`;e.targetInLca=i.getParent(),i=e.targetInLca.getOwner()}if(r==this.rootGraph)break;e.lca??(e.sourceInLca=r.getParent(),r=e.sourceInLca.getOwner())}if(e.lca==null)throw`assert failed`}},a.prototype.calcLowestCommonAncestor=function(e,t){if(e==t)return e.getOwner();var n=e.getOwner();do{if(n==null)break;var r=t.getOwner();do{if(r==null)break;if(r==n)return r;r=r.getParent().getOwner()}while(1);n=n.getParent().getOwner()}while(1);return n},a.prototype.calcInclusionTreeDepths=function(e,t){e==null&&t==null&&(e=this.rootGraph,t=1);for(var n,r=e.getNodes(),i=r.length,a=0;a<i;a++)n=r[a],n.inclusionTreeDepth=t,n.child!=null&&this.calcInclusionTreeDepths(n.child,t+1)},a.prototype.includesInvalidEdge=function(){for(var e,t=this.edges.length,n=0;n<t;n++)if(e=this.edges[n],this.isOneAncestorOfOther(e.source,e.target))return!0;return!1},e.exports=a}),(function(e,t,n){var r=n(0);function i(){}for(var a in r)i[a]=r[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=i}),(function(e,t,n){var r=n(12);function i(){}i.calcSeparationAmount=function(e,t,n,r){if(!e.intersects(t))throw`assert failed`;var i=[,,];this.decideDirectionsForOverlappingNodes(e,t,i),n[0]=Math.min(e.getRight(),t.getRight())-Math.max(e.x,t.x),n[1]=Math.min(e.getBottom(),t.getBottom())-Math.max(e.y,t.y),e.getX()<=t.getX()&&e.getRight()>=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]<s?s=n[0]:o=n[1],n[0]=-1*i[0]*(s/2+r),n[1]=-1*i[1]*(o/2+r)},i.decideDirectionsForOverlappingNodes=function(e,t,n){n[0]=e.getCenterX()<t.getCenterX()?-1:1,n[1]=e.getCenterY()<t.getCenterY()?-1:1},i.getIntersection2=function(e,t,n){var r=e.getCenterX(),i=e.getCenterY(),a=t.getCenterX(),o=t.getCenterY();if(e.intersects(t))return n[0]=r,n[1]=i,n[2]=a,n[3]=o,!0;var s=e.getX(),l=e.getY(),u=e.getRight(),d=e.getX(),f=e.getBottom(),p=e.getRight(),m=e.getWidthHalf(),h=e.getHeightHalf(),g=t.getX(),_=t.getY(),v=t.getRight(),y=t.getX(),b=t.getBottom(),x=t.getRight(),S=t.getWidthHalf(),C=t.getHeightHalf(),w=!1,T=!1;if(r===a){if(i>o)return n[0]=r,n[1]=l,n[2]=a,n[3]=b,!1;if(i<o)return n[0]=r,n[1]=f,n[2]=a,n[3]=_,!1}else if(i===o){if(r>a)return n[0]=s,n[1]=i,n[2]=v,n[3]=o,!1;if(r<a)return n[0]=u,n[1]=i,n[2]=g,n[3]=o,!1}else{var E=e.height/e.width,D=t.height/t.width,O=(o-i)/(a-r),k=void 0,A=void 0,j=void 0,M=void 0,N=void 0,P=void 0;if(-E===O?r>a?(n[0]=d,n[1]=f,w=!0):(n[0]=u,n[1]=l,w=!0):E===O&&(r>a?(n[0]=s,n[1]=l,w=!0):(n[0]=p,n[1]=f,w=!0)),-D===O?a>r?(n[2]=y,n[3]=b,T=!0):(n[2]=v,n[3]=_,T=!0):D===O&&(a>r?(n[2]=g,n[3]=_,T=!0):(n[2]=x,n[3]=b,T=!0)),w&&T)return!1;if(r>a?i>o?(k=this.getCardinalDirection(E,O,4),A=this.getCardinalDirection(D,O,2)):(k=this.getCardinalDirection(-E,O,3),A=this.getCardinalDirection(-D,O,1)):i>o?(k=this.getCardinalDirection(-E,O,1),A=this.getCardinalDirection(-D,O,3)):(k=this.getCardinalDirection(E,O,2),A=this.getCardinalDirection(D,O,4)),!w)switch(k){case 1:M=l,j=r+-h/O,n[0]=j,n[1]=M;break;case 2:j=p,M=i+m*O,n[0]=j,n[1]=M;break;case 3:M=f,j=r+h/O,n[0]=j,n[1]=M;break;case 4:j=d,M=i+-m*O,n[0]=j,n[1]=M}if(!T)switch(A){case 1:P=_,N=a+-C/O,n[2]=N,n[3]=P;break;case 2:N=x,P=o+S*O,n[2]=N,n[3]=P;break;case 3:P=b,N=a+C/O,n[2]=N,n[3]=P;break;case 4:N=y,P=o+-S*O,n[2]=N,n[3]=P}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(i==null)return this.getIntersection2(e,t,n);var a=e.x,o=e.y,s=t.x,l=t.y,u=n.x,d=n.y,f=i.x,p=i.y,m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0;return g=l-o,v=a-s,b=s*o-a*l,_=p-d,y=u-f,x=f*d-u*p,S=g*y-_*v,S===0?null:(m=(v*x-y*b)/S,h=(_*b-g*x)/S,new r(m,h))},i.angleOfVector=function(e,t,n,r){var i=void 0;return e===n?i=r<t?this.ONE_AND_HALF_PI:this.HALF_PI:(i=Math.atan((r-t)/(n-e)),n<e?i+=Math.PI:r<t&&(i+=this.TWO_PI)),i},i.doIntersect=function(e,t,n,r){var i=e.x,a=e.y,o=t.x,s=t.y,l=n.x,u=n.y,d=r.x,f=r.y,p=(o-i)*(f-u)-(d-l)*(s-a);if(p===0)return!1;var m=((f-u)*(d-i)+(l-d)*(f-a))/p,h=((a-s)*(d-i)+(o-i)*(f-a))/p;return 0<m&&m<1&&0<h&&h<1},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i}),(function(e,t,n){function r(){}r.sign=function(e){return e>0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r}),(function(e,t,n){function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var a=function(e){return{value:e,next:null,prev:null}},o=function(e,t,n,r){return e===null?r.head=t:e.next=t,n===null?r.tail=t:n.prev=t,t.prev=e,t.next=n,r.length++,t},s=function(e,t){var n=e.prev,r=e.next;return n===null?t.head=r:n.next=r,r===null?t.tail=n:r.prev=n,e.prev=e.next=null,t.length--,e};e.exports=function(){function e(t){var n=this;i(this,e),this.length=0,this.head=null,this.tail=null,t?.forEach(function(e){return n.push(e)})}return r(e,[{key:`size`,value:function(){return this.length}},{key:`insertBefore`,value:function(e,t){return o(t.prev,a(e),t,this)}},{key:`insertAfter`,value:function(e,t){return o(t,a(e),t.next,this)}},{key:`insertNodeBefore`,value:function(e,t){return o(t.prev,e,t,this)}},{key:`insertNodeAfter`,value:function(e,t){return o(t,e,t.next,this)}},{key:`push`,value:function(e){return o(this.tail,a(e),null,this)}},{key:`unshift`,value:function(e){return o(null,a(e),this.head,this)}},{key:`remove`,value:function(e){return s(e,this)}},{key:`pop`,value:function(){return s(this.tail,this).value}},{key:`popNode`,value:function(){return s(this.tail,this)}},{key:`shift`,value:function(){return s(this.head,this).value}},{key:`shiftNode`,value:function(){return s(this.head,this)}},{key:`get_object_at`,value:function(e){if(e<=this.length()){for(var t=1,n=this.head;t<e;)n=n.next,t++;return n.value}}},{key:`set_object_at`,value:function(e,t){if(e<=this.length()){for(var n=1,r=this.head;n<e;)r=r.next,n++;r.value=t}}}]),e}()}),(function(e,t,n){function r(e,t,n){this.x=null,this.y=null,e==null&&t==null&&n==null?(this.x=0,this.y=0):typeof e==`number`&&typeof t==`number`&&n==null?(this.x=e,this.y=t):e.constructor.name==`Point`&&t==null&&n==null&&(n=e,this.x=n.x,this.y=n.y)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.getLocation=function(){return new r(this.x,this.y)},r.prototype.setLocation=function(e,t,n){e.constructor.name==`Point`&&t==null&&n==null?(n=e,this.setLocation(n.x,n.y)):typeof e==`number`&&typeof t==`number`&&n==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},r.prototype.move=function(e,t){this.x=e,this.y=t},r.prototype.translate=function(e,t){this.x+=e,this.y+=t},r.prototype.equals=function(e){if(e.constructor.name==`Point`){var t=e;return this.x==t.x&&this.y==t.y}return this==e},r.prototype.toString=function(){return new r().constructor.name+`[x=`+this.x+`,y=`+this.y+`]`},e.exports=r}),(function(e,t,n){function r(e,t,n,r){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&n!=null&&r!=null&&(this.x=e,this.y=t,this.width=n,this.height=r)}r.prototype.getX=function(){return this.x},r.prototype.setX=function(e){this.x=e},r.prototype.getY=function(){return this.y},r.prototype.setY=function(e){this.y=e},r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(e){this.width=e},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(e){this.height=e},r.prototype.getRight=function(){return this.x+this.width},r.prototype.getBottom=function(){return this.y+this.height},r.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},r.prototype.getCenterX=function(){return this.x+this.width/2},r.prototype.getMinX=function(){return this.getX()},r.prototype.getMaxX=function(){return this.getX()+this.width},r.prototype.getCenterY=function(){return this.y+this.height/2},r.prototype.getMinY=function(){return this.getY()},r.prototype.getMaxY=function(){return this.getY()+this.height},r.prototype.getWidthHalf=function(){return this.width/2},r.prototype.getHeightHalf=function(){return this.height/2},e.exports=r}),(function(e,t,n){var r=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e};function i(){}i.lastID=0,i.createID=function(e){return i.isPrimitive(e)?e:e.uniqueID==null?(e.uniqueID=i.getString(),i.lastID++,e.uniqueID):e.uniqueID},i.getString=function(e){return e??=i.lastID,`Object#`+e},i.isPrimitive=function(e){var t=e===void 0?`undefined`:r(e);return e==null||t!=`object`&&t!=`function`},e.exports=i}),(function(e,t,n){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var i=n(0),a=n(6),o=n(3),s=n(1),l=n(5),u=n(4),d=n(17),f=n(27);function p(e){f.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,e!=null&&(this.isRemoteUse=e)}p.RANDOM_SEED=1,p.prototype=Object.create(f.prototype),p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},p.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},p.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},p.prototype.newGraphManager=function(){var e=new a(this);return this.graphManager=e,e},p.prototype.newGraph=function(e){return new l(null,this.graphManager,e)},p.prototype.newNode=function(e){return new o(this.graphManager,e)},p.prototype.newEdge=function(e){return new s(null,null,e)},p.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},p.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var e=!this.checkLayoutSuccess()&&this.layout();return i.ANIMATE!==`during`&&(e&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,e)},p.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},p.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var e=this.graphManager.getAllEdges(),t=0;t<e.length;t++)e[t];for(var n=this.graphManager.getRoot().getNodes(),t=0;t<n.length;t++)n[t];this.update(this.graphManager.getRoot())}},p.prototype.update=function(e){if(e==null)this.update2();else if(e instanceof o){var t=e;if(t.getChild()!=null)for(var n=t.getChild().getNodes(),r=0;r<n.length;r++)update(n[r]);t.vGraphObject!=null&&t.vGraphObject.update(t)}else if(e instanceof s){var i=e;i.vGraphObject!=null&&i.vGraphObject.update(i)}else if(e instanceof l){var a=e;a.vGraphObject!=null&&a.vGraphObject.update(a)}},p.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},p.prototype.transform=function(e){if(e==null)this.transform(new u(0,0));else{var t=new d,n=this.graphManager.getRoot().updateLeftTop();if(n!=null){t.setWorldOrgX(e.x),t.setWorldOrgY(e.y),t.setDeviceOrgX(n.x),t.setDeviceOrgY(n.y);for(var r=this.getAllNodes(),i,a=0;a<r.length;a++)i=r[a],i.transform(t)}}},p.prototype.positionNodesRandomly=function(e){if(e==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var t,n,r=e.getNodes(),i=0;i<r.length;i++)t=r[i],n=t.getChild(),n==null||n.getNodes().length==0?t.scatter():(this.positionNodesRandomly(n),t.updateBounds())},p.prototype.getFlatForest=function(){for(var e=[],t=!0,n=this.graphManager.getRoot().getNodes(),i=!0,a=0;a<n.length;a++)n[a].getChild()!=null&&(i=!1);if(!i)return e;var o=new Set,s=[],l=new Map,u=[];for(u=u.concat(n);u.length>0&&t;){for(s.push(u[0]);s.length>0&&t;){var d=s[0];s.splice(0,1),o.add(d);for(var f=d.getEdges(),a=0;a<f.length;a++){var p=f[a].getOtherEnd(d);if(l.get(d)!=p){if(!o.has(p))s.push(p),l.set(p,d);else{t=!1;break}}}}if(!t)e=[];else{var m=[].concat(r(o));e.push(m);for(var a=0;a<m.length;a++){var h=m[a],g=u.indexOf(h);g>-1&&u.splice(g,1)}o=new Set,l=new Map}}return e},p.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i<e.bendpoints.length;i++){var a=this.newNode(null);a.setRect(new Point(0,0),new Dimension(1,1)),r.add(a);var o=this.newEdge(null);this.graphManager.add(o,n,a),t.add(a),n=a}var o=this.newEdge(null);return this.graphManager.add(o,n,e.target),this.edgeToDummyNodes.set(e,t),e.isInterGraph()?this.graphManager.remove(e):r.remove(e),t},p.prototype.createBendpointsFromDummyNodes=function(){var e=[];e=e.concat(this.graphManager.getAllEdges()),e=[].concat(r(this.edgeToDummyNodes.keys()),e);for(var t=0;t<e.length;t++){var n=e[t];if(n.bendpoints.length>0){for(var i=this.edgeToDummyNodes.get(n),a=0;a<i.length;a++){var o=i[a],s=new u(o.getCenterX(),o.getCenterY()),l=n.bendpoints.get(a);l.x=s.x,l.y=s.y,o.getOwner().remove(o)}this.graphManager.add(n,n.source,n.target)}}},p.transform=function(e,t,n,r){if(n!=null&&r!=null){var i=t;if(e<=50){var a=t/n;i-=(t-a)/50*(50-e)}else{var o=t*r;i+=(o-t)/50*(e-50)}return i}var s,l;return e<=50?(s=9*t/500,l=t/10):(s=9*t/50,l=-8*t),s*e+l},p.findCenterOfTree=function(e){var t=[];t=t.concat(e);var n=[],r=new Map,i=!1,a=null;(t.length==1||t.length==2)&&(i=!0,a=t[0]);for(var o=0;o<t.length;o++){var s=t[o],l=s.getNeighborsList().size;r.set(s,s.getNeighborsList().size),l==1&&n.push(s)}var u=[];for(u=u.concat(n);!i;){var d=[];d=d.concat(u),u=[];for(var o=0;o<t.length;o++){var s=t[o],f=t.indexOf(s);f>=0&&t.splice(f,1),s.getNeighborsList().forEach(function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;t==1&&u.push(e),r.set(e,t)}})}n=n.concat(u),(t.length==1||t.length==2)&&(i=!0,a=t[0])}return a},p.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=p}),(function(e,t,n){function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=Math.sin(r.seed++)*1e4,r.x-Math.floor(r.x)},e.exports=r}),(function(e,t,n){var r=n(4);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return n!=0&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return n!=0&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return n!=0&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return n!=0&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i}),(function(e,t,n){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var i=n(15),a=n(7),o=n(0),s=n(8),l=n(9);function u(){i.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=a.DEFAULT_EDGE_LENGTH,this.springConstant=a.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=a.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}for(var d in u.prototype=Object.create(i.prototype),i)u[d]=i[d];u.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},u.prototype.calcIdealEdgeLengths=function(){for(var e,t,n,r,i,s,l=this.getGraphManager().getAllEdges(),u=0;u<l.length;u++)e=l[u],e.idealLength=this.idealEdgeLength,e.isInterGraph&&(n=e.getSource(),r=e.getTarget(),i=e.getSourceInLca().getEstimatedSize(),s=e.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(e.idealLength+=i+s-2*o.SIMPLE_NODE_SIZE),t=e.getLca().getInclusionTreeDepth(),e.idealLength+=a.DEFAULT_EDGE_LENGTH*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(n.getInclusionTreeDepth()+r.getInclusionTreeDepth()-2*t))},u.prototype.initSpringEmbedder=function(){var e=this.getAllNodes().length;this.incremental?(e>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(this.coolingFactor=e>a.ADAPTATION_LOWER_NODE_LIMIT?Math.max(a.COOLING_ADAPTATION_FACTOR,1-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var e=this.getAllEdges(),t,n=0;n<e.length;n++)t=e[n],this.calcSpringForce(t,t.idealLength)},u.prototype.calcRepulsionForces=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n,r,i,o,s=this.getAllNodes(),l;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&e&&this.updateGrid(),l=new Set,n=0;n<s.length;n++)i=s[n],this.calculateRepulsionForceOfANode(i,l,e,t),l.add(i);else for(n=0;n<s.length;n++)for(i=s[n],r=n+1;r<s.length;r++)o=s[r],i.getOwner()==o.getOwner()&&this.calcRepulsionForce(i,o)},u.prototype.calcGravitationalForces=function(){for(var e,t=this.getAllNodesToApplyGravitation(),n=0;n<t.length;n++)e=t[n],this.calcGravitationalForce(e)},u.prototype.moveNodes=function(){for(var e=this.getAllNodes(),t,n=0;n<e.length;n++)t=e[n],t.move()},u.prototype.calcSpringForce=function(e,t){var n=e.getSource(),r=e.getTarget(),i,a,o,s;if(this.uniformLeafNodeSizes&&n.getChild()==null&&r.getChild()==null)e.updateLengthSimple();else if(e.updateLength(),e.isOverlapingSourceAndTarget)return;i=e.getLength(),i!=0&&(a=this.springConstant*(i-t),o=a*(e.lengthX/i),s=a*(e.lengthY/i),n.springForceX+=o,n.springForceY+=s,r.springForceX-=o,r.springForceY-=s)},u.prototype.calcRepulsionForce=function(e,t){var n=e.getRect(),r=t.getRect(),i=[,,],o=[,,,,],u,d,f,p,m,h,g;if(n.intersects(r)){s.calcSeparationAmount(n,r,i,a.DEFAULT_EDGE_LENGTH/2),h=2*i[0],g=2*i[1];var _=e.noOfChildren*t.noOfChildren/(e.noOfChildren+t.noOfChildren);e.repulsionForceX-=_*h,e.repulsionForceY-=_*g,t.repulsionForceX+=_*h,t.repulsionForceY+=_*g}else this.uniformLeafNodeSizes&&e.getChild()==null&&t.getChild()==null?(u=r.getCenterX()-n.getCenterX(),d=r.getCenterY()-n.getCenterY()):(s.getIntersection(n,r,o),u=o[2]-o[0],d=o[3]-o[1]),Math.abs(u)<a.MIN_REPULSION_DIST&&(u=l.sign(u)*a.MIN_REPULSION_DIST),Math.abs(d)<a.MIN_REPULSION_DIST&&(d=l.sign(d)*a.MIN_REPULSION_DIST),f=u*u+d*d,p=Math.sqrt(f),m=this.repulsionConstant*e.noOfChildren*t.noOfChildren/f,h=m*u/p,g=m*d/p,e.repulsionForceX-=h,e.repulsionForceY-=g,t.repulsionForceX+=h,t.repulsionForceY+=g},u.prototype.calcGravitationalForce=function(e){var t=e.getOwner(),n=(t.getRight()+t.getLeft())/2,r=(t.getTop()+t.getBottom())/2,i=e.getCenterX()-n,a=e.getCenterY()-r,o=Math.abs(i)+e.getWidth()/2,s=Math.abs(a)+e.getHeight()/2,l;e.getOwner()==this.graphManager.getRoot()?(l=t.getEstimatedSize()*this.gravityRangeFactor,(o>l||s>l)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a)):(l=t.getEstimatedSize()*this.compoundGravityRangeFactor,(o>l||s>l)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant))},u.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,e||t},u.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},u.prototype.calcNoOfChildrenForAllNodes=function(){for(var e,t=this.graphManager.getAllNodes(),n=0;n<t.length;n++)e=t[n],e.noOfChildren=e.getNoOfChildren()},u.prototype.calcGrid=function(e){var t=0,n=0;t=parseInt(Math.ceil((e.getRight()-e.getLeft())/this.repulsionRange)),n=parseInt(Math.ceil((e.getBottom()-e.getTop())/this.repulsionRange));for(var r=Array(t),i=0;i<t;i++)r[i]=Array(n);for(var i=0;i<t;i++)for(var a=0;a<n;a++)r[i][a]=[];return r},u.prototype.addNodeToGrid=function(e,t,n){var r=0,i=0,a=0,o=0;r=parseInt(Math.floor((e.getRect().x-t)/this.repulsionRange)),i=parseInt(Math.floor((e.getRect().width+e.getRect().x-t)/this.repulsionRange)),a=parseInt(Math.floor((e.getRect().y-n)/this.repulsionRange)),o=parseInt(Math.floor((e.getRect().height+e.getRect().y-n)/this.repulsionRange));for(var s=r;s<=i;s++)for(var l=a;l<=o;l++)this.grid[s][l].push(e),e.setGridCoordinates(r,i,a,o)},u.prototype.updateGrid=function(){var e,t,n=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),e=0;e<n.length;e++)t=n[e],this.addNodeToGrid(t,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},u.prototype.calculateRepulsionForceOfANode=function(e,t,n,i){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&n||i){var o=new Set;e.surrounding=[];for(var s,l=this.grid,u=e.startX-1;u<e.finishX+2;u++)for(var d=e.startY-1;d<e.finishY+2;d++)if(!(u<0||d<0||u>=l.length||d>=l[0].length)){for(var f=0;f<l[u][d].length;f++)if(s=l[u][d][f],e.getOwner()==s.getOwner()&&e!=s&&!t.has(s)&&!o.has(s)){var p=Math.abs(e.getCenterX()-s.getCenterX())-(e.getWidth()/2+s.getWidth()/2),m=Math.abs(e.getCenterY()-s.getCenterY())-(e.getHeight()/2+s.getHeight()/2);p<=this.repulsionRange&&m<=this.repulsionRange&&o.add(s)}}e.surrounding=[].concat(r(o))}for(u=0;u<e.surrounding.length;u++)this.calcRepulsionForce(e,e.surrounding[u])},u.prototype.calcRepulsionRange=function(){return 0},e.exports=u}),(function(e,t,n){var r=n(1),i=n(7);function a(e,t,n){r.call(this,e,t,n),this.idealLength=i.DEFAULT_EDGE_LENGTH}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];e.exports=a}),(function(e,t,n){var r=n(3);function i(e,t,n,i){r.call(this,e,t,n,i),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];i.prototype.setGridCoordinates=function(e,t,n,r){this.startX=e,this.finishX=t,this.startY=n,this.finishY=r},e.exports=i}),(function(e,t,n){function r(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(e){this.width=e},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(e){this.height=e},e.exports=r}),(function(e,t,n){var r=n(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(e,t){var n=r.createID(e);this.contains(n)||(this.map[n]=t,this.keys.push(e))},i.prototype.contains=function(e){return r.createID(e),this.map[e]!=null},i.prototype.get=function(e){var t=r.createID(e);return this.map[t]},i.prototype.keySet=function(){return this.keys},e.exports=i}),(function(e,t,n){var r=n(14);function i(){this.set={}}i.prototype.add=function(e){var t=r.createID(e);this.contains(t)||(this.set[t]=e)},i.prototype.remove=function(e){delete this.set[r.createID(e)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(e){return this.set[r.createID(e)]==e},i.prototype.isEmpty=function(){return this.size()===0},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(e){for(var t=Object.keys(this.set),n=t.length,r=0;r<n;r++)e.push(this.set[t[r]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(e){for(var t=e.length,n=0;n<t;n++){var r=e[n];this.add(r)}},e.exports=i}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var a=n(11);e.exports=function(){function e(t,n){i(this,e),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var r=void 0;r=t instanceof a?t.size():t.length,this._quicksort(t,0,r-1)}return r(e,[{key:`_quicksort`,value:function(e,t,n){if(t<n){var r=this._partition(e,t,n);this._quicksort(e,t,r),this._quicksort(e,r+1,n)}}},{key:`_partition`,value:function(e,t,n){for(var r=this._get(e,t),i=t,a=n;;){for(;this.compareFunction(r,this._get(e,a));)a--;for(;this.compareFunction(this._get(e,i),r);)i++;if(i<a)this._swap(e,i,a),i++,a--;else return a}}},{key:`_get`,value:function(e,t){return e instanceof a?e.get_object_at(t):e[t]}},{key:`_set`,value:function(e,t,n){e instanceof a?e.set_object_at(t,n):e[t]=n}},{key:`_swap`,value:function(e,t,n){var r=this._get(e,t);this._set(e,t,this._get(e,n)),this._set(e,n,r)}},{key:`_defaultCompareFunction`,value:function(e,t){return t>e}}]),e}()}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}e.exports=function(){function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=a,this.gap_penalty=o,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=Array(this.jMax);for(var l=0;l<this.jMax;l++)this.grid[s][l]=0}this.tracebackGrid=Array(this.iMax);for(var u=0;u<this.iMax;u++){this.tracebackGrid[u]=Array(this.jMax);for(var d=0;d<this.jMax;d++)this.tracebackGrid[u][d]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return r(e,[{key:`getScore`,value:function(){return this.score}},{key:`getAlignments`,value:function(){return this.alignments}},{key:`computeGrids`,value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var t=1;t<this.iMax;t++)this.grid[t][0]=this.grid[t-1][0]+this.gap_penalty,this.tracebackGrid[t][0]=[!1,!0,!1];for(var n=1;n<this.iMax;n++)for(var r=1;r<this.jMax;r++){var i=void 0;i=this.sequence1[n-1]===this.sequence2[r-1]?this.grid[n-1][r-1]+this.match_score:this.grid[n-1][r-1]+this.mismatch_penalty;var a=this.grid[n-1][r]+this.gap_penalty,o=this.grid[n][r-1]+this.gap_penalty,s=[i,a,o],l=this.arrayAllMaxIndexes(s);this.grid[n][r]=s[l[0]],this.tracebackGrid[n][r]=[l.includes(0),l.includes(1),l.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:`alignmentTraceback`,value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:``,seq2:``});e[0];){var t=e[0],n=this.tracebackGrid[t.pos[0]][t.pos[1]];n[0]&&e.push({pos:[t.pos[0]-1,t.pos[1]-1],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),n[1]&&e.push({pos:[t.pos[0]-1,t.pos[1]],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:`-`+t.seq2}),n[2]&&e.push({pos:[t.pos[0],t.pos[1]-1],seq1:`-`+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),t.pos[0]===0&&t.pos[1]===0&&this.alignments.push({sequence1:t.seq1,sequence2:t.seq2}),e.shift()}return this.alignments}},{key:`getAllIndexes`,value:function(e,t){for(var n=[],r=-1;(r=e.indexOf(t,r+1))!==-1;)n.push(r);return n}},{key:`arrayAllMaxIndexes`,value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),e}()}),(function(e,t,n){var r=function(){};r.FDLayout=n(18),r.FDLayoutConstants=n(7),r.FDLayoutEdge=n(19),r.FDLayoutNode=n(20),r.DimensionD=n(21),r.HashMap=n(22),r.HashSet=n(23),r.IGeometry=n(8),r.IMath=n(9),r.Integer=n(10),r.Point=n(12),r.PointD=n(4),r.RandomSeed=n(16),r.RectangleD=n(13),r.Transform=n(17),r.UniqueIDGeneretor=n(14),r.Quicksort=n(24),r.LinkedList=n(11),r.LGraphObject=n(2),r.LGraph=n(5),r.LEdge=n(1),r.LGraphManager=n(6),r.LNode=n(3),r.Layout=n(15),r.LayoutConstants=n(0),r.NeedlemanWunsch=n(25),e.exports=r}),(function(e,t,n){function r(){this.listeners=[]}var i=r.prototype;i.addListener=function(e,t){this.listeners.push({event:e,callback:t})},i.removeListener=function(e,t){for(var n=this.listeners.length;n>=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n<this.listeners.length;n++){var r=this.listeners[n];e===r.event&&r.callback(t)}},e.exports=r})])})})),bQe=s(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(yQe()):typeof define==`function`&&define.amd?define([`layout-base`],r):typeof e==`object`?e.coseBase=r(yQe()):n.coseBase=r(n.layoutBase)})(e,function(e){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=7)})([(function(t,n){t.exports=e}),(function(e,t,n){var r=n(0).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=i}),(function(e,t,n){var r=n(0).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).FDLayoutNode,i=n(0).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),this.child==null||this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n=this.getChild().getNodes(),r,i=0;i<n.length;i++)r=n[i],r.getChild()==null?(r.moveBy(e,t),r.displacementX+=e,r.displacementY+=t):r.propogateDisplacementToChildren(e,t)},a.prototype.setPred1=function(e){this.pred1=e},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(e){this.next=e},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(e){this.processed=e},a.prototype.isProcessed=function(){return processed},e.exports=a}),(function(e,t,n){var r=n(0).FDLayout,i=n(4),a=n(3),o=n(5),s=n(2),l=n(1),u=n(0).FDLayoutConstants,d=n(0).LayoutConstants,f=n(0).Point,p=n(0).PointD,m=n(0).Layout,h=n(0).Integer,g=n(0).IGeometry,_=n(0).LGraph,v=n(0).Transform;function y(){r.call(this),this.toBeTiled={}}for(var b in y.prototype=Object.create(r.prototype),r)y[b]=r[b];y.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},y.prototype.newGraph=function(e){return new a(null,this.graphManager,e)},y.prototype.newNode=function(e){return new o(this.graphManager,e)},y.prototype.newEdge=function(e){return new s(null,null,e)},y.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(this.idealEdgeLength=l.DEFAULT_EDGE_LENGTH<10?10:l.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=u.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=u.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=u.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=u.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/u.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=u.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},y.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},y.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),!this.incremental){var e=this.getFlatForest();if(e.length>0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}else if(l.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n)}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0}if(this.totalIterations%u.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0}this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-this.coolingCycle**+(Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0){if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0}this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n<e.length;n++){var r=e[n].rect,i=e[n].id;t[i]={id:i,x:r.getCenterX(),y:r.getCenterY(),w:r.width,h:r.height}}return t},y.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var e=!1;if(u.ANIMATE===`during`)this.emit(`layoutstarted`);else{for(;!e;)e=this.tick();this.graphManager.updateBounds()}},y.prototype.calculateNodesToApplyGravitationTo=function(){for(var e=[],t,n=this.graphManager.getGraphs(),r=n.length,i=0;i<r;i++)t=n[i],t.updateConnected(),t.isConnected||(e=e.concat(t.getNodes()));return e},y.prototype.createBendpoints=function(){var e=[];e=e.concat(this.graphManager.getAllEdges());for(var t=new Set,n=0;n<e.length;n++){var r=e[n];if(!t.has(r)){var i=r.getSource(),a=r.getTarget();if(i==a)r.getBendpoints().push(new p),r.getBendpoints().push(new p),this.createDummyNodesForBendpoints(r),t.add(r);else{var o=[];if(o=o.concat(i.getEdgeListToNode(a)),o=o.concat(a.getEdgeListToNode(i)),!t.has(o[0])){if(o.length>1)for(var s=0;s<o.length;s++){var l=o[s];l.getBendpoints().push(new p),this.createDummyNodesForBendpoints(l)}o.forEach(function(e){t.add(e)})}}}if(t.size==e.length)break}},y.prototype.positionNodesRadially=function(e){for(var t=new f(0,0),n=Math.ceil(Math.sqrt(e.length)),r=0,i=0,a=0,o=new p(0,0),s=0;s<e.length;s++){s%n==0&&(a=0,i=r,s!=0&&(i+=l.DEFAULT_COMPONENT_SEPERATION),r=0);var u=e[s],h=m.findCenterOfTree(u);t.x=a,t.y=i,o=y.radialLayout(u,h,t),o.y>r&&(r=Math.floor(o.y)),a=Math.floor(o.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(d.WORLD_CENTER_X-o.x/2,d.WORLD_CENTER_Y-o.y/2))},y.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),l.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(t,null,0,359,0,r);var i=_.calculateBounds(e),a=new v;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o<e.length;o++)e[o].transform(a);var s=new p(i.getMaxX(),i.getMaxY());return a.inverseTransformPoint(s)},y.branchRadialLayout=function(e,t,n,r,i,a){var o=(r-n+1)/2;o<0&&(o+=180);var s=(o+n)%360*g.TWO_PI/360,l=i*Math.cos(s),u=i*Math.sin(s);e.setCenter(l,u);var d=[];d=d.concat(e.getEdges());var f=d.length;t!=null&&f--;for(var p=0,m=d.length,h,_=e.getEdgesBetween(t);_.length>1;){var v=_[0];_.splice(0,1);var b=d.indexOf(v);b>=0&&d.splice(b,1),m--,f--}h=t==null?0:(d.indexOf(_[0])+1)%m;for(var x=Math.abs(r-n)/f,S=h;p!=f;S=++S%m){var C=d[S].getOtherEnd(e);if(C!=t){var w=(n+p*x)%360,T=(w+x)%360;y.branchRadialLayout(C,e,w,T,i+a,a),p++}}},y.maxDiagonalInTree=function(e){for(var t=h.MIN_VALUE,n=0;n<e.length;n++){var r=e[n].getDiagonal();r>t&&(t=r)}return t},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i<r.length;i++){var a=r[i],s=a.getParent();this.getNodeDegreeWithChildren(a)===0&&(s.id==null||!this.getToBeTiled(s))&&n.push(a)}for(var i=0;i<n.length;i++){var a=n[i],l=a.getParent().id;t[l]===void 0&&(t[l]=[]),t[l]=t[l].concat(a)}Object.keys(t).forEach(function(n){if(t[n].length>1){var r=`DummyCompound_`+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),l=i.getChild();l.add(a);for(var u=0;u<t[n].length;u++){var d=t[n][u];l.remove(d),s.add(d)}}})},y.prototype.clearCompounds=function(){var e={},t={};this.performDFSOnCompounds();for(var n=0;n<this.compoundOrder.length;n++)t[this.compoundOrder[n].id]=this.compoundOrder[n],e[this.compoundOrder[n].id]=[].concat(this.compoundOrder[n].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[n].getChild()),this.compoundOrder[n].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(e,t)},y.prototype.clearZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(n){var r=e.idToDummyNode[n];t[n]=e.tileNodes(e.memberGroups[n],r.paddingLeft+r.paddingRight),r.rect.width=t[n].width,r.rect.height=t[n].height})},y.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;e>=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i)}},y.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach(function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a)})},y.prototype.getToBeTiled=function(e){var t=e.id;if(this.toBeTiled[t]!=null)return this.toBeTiled[t];var n=e.getChild();if(n==null)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i<r.length;i++){var a=r[i];if(this.getNodeDegree(a)>0)return this.toBeTiled[t]=!1,!1;if(a.getChild()==null){this.toBeTiled[a.id]=!1;continue}if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}return this.toBeTiled[t]=!0,!0},y.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;r<t.length;r++){var i=t[r];i.getSource().id!==i.getTarget().id&&(n+=1)}return n},y.prototype.getNodeDegreeWithChildren=function(e){var t=this.getNodeDegree(e);if(e.getChild()==null)return t;for(var n=e.getChild().getNodes(),r=0;r<n.length;r++){var i=n[r];t+=this.getNodeDegreeWithChildren(i)}return t},y.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},y.prototype.fillCompexOrderByDFS=function(e){for(var t=0;t<e.length;t++){var n=e[t];n.getChild()!=null&&this.fillCompexOrderByDFS(n.getChild().getNodes()),this.getToBeTiled(n)&&this.compoundOrder.push(n)}},y.prototype.adjustLocations=function(e,t,n,r,i){t+=r,n+=i;for(var a=t,o=0;o<e.rows.length;o++){var s=e.rows[o];t=a;for(var l=0,u=0;u<s.length;u++){var d=s[u];d.rect.x=t,d.rect.y=n,t+=d.rect.width+e.horizontalPadding,d.rect.height>l&&(l=d.rect.height)}n+=l+e.verticalPadding}},y.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var i=t[r];n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height})},y.prototype.tileNodes=function(e,t){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:l.TILING_PADDING_VERTICAL,horizontalPadding:l.TILING_PADDING_HORIZONTAL};e.sort(function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:+(e.rect.width*e.rect.height<t.rect.width*t.rect.height)});for(var r=0;r<e.length;r++){var i=e[r];n.rows.length==0?this.insertNodeToRow(n,i,0,t):this.canAddHorizontal(n,i.rect.width,i.rect.height)?this.insertNodeToRow(n,i,this.getShortestRowIndex(n),t):this.insertNodeToRow(n,i,n.rows.length,t),this.shiftToLastRow(n)}return n},y.prototype.insertNodeToRow=function(e,t,n,r){var i=r;n==e.rows.length&&(e.rows.push([]),e.rowWidth.push(i),e.rowHeight.push(0));var a=e.rowWidth[n]+t.rect.width;e.rows[n].length>0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width<a&&(e.width=a);var o=t.rect.height;n>0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},y.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]<n&&(t=r,n=e.rowWidth[r]);return t},y.prototype.getLongestRowIndex=function(e){for(var t=-1,n=Number.MIN_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]>n&&(t=r,n=e.rowWidth[r]);return t},y.prototype.canAddHorizontal=function(e,t,n){var r=this.getShortestRowIndex(e);if(r<0)return!0;var i=e.rowWidth[r];if(i+e.horizontalPadding+t<=e.width)return!0;var a=0;e.rowHeight[r]<n&&r>0&&(a=n+e.verticalPadding-e.rowHeight[r]);var o=e.width-i>=t+e.horizontalPadding?(e.height+a)/(i+t+e.horizontalPadding):(e.height+a)/e.width;a=n+e.verticalPadding;var s=e.width<t?(e.height+a)/t:(e.height+a)/e.width;return s<1&&(s=1/s),o<1&&(o=1/o),o<s},y.prototype.shiftToLastRow=function(e){var t=this.getLongestRowIndex(e),n=e.rowWidth.length-1,r=e.rows[t],i=r[r.length-1],a=i.width+e.horizontalPadding;if(e.width-e.rowWidth[n]>a&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;s<r.length;s++)r[s].height>o&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var l=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]<i.height+e.verticalPadding&&(e.rowHeight[n]=i.height+e.verticalPadding);var u=e.rowHeight[t]+e.rowHeight[n];e.height+=u-l,this.shiftToLastRow(e)}},y.prototype.tilingPreLayout=function(){l.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},y.prototype.tilingPostLayout=function(){l.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},y.prototype.reduceTrees=function(){for(var e=[],t=!0,n;t;){var r=this.graphManager.getAllNodes(),i=[];t=!1;for(var a=0;a<r.length;a++)n=r[a],n.getEdges().length==1&&!n.getEdges()[0].isInterGraph&&n.getChild()==null&&(i.push([n,n.getEdges()[0],n.getOwner()]),t=!0);if(t==1){for(var o=[],s=0;s<i.length;s++)i[s][0].getEdges().length==1&&(o.push(i[s]),i[s][0].getOwner().remove(i[s][0]));e.push(o),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},y.prototype.growTree=function(e){for(var t=e[e.length-1],n,r=0;r<t.length;r++)n=t[r],this.findPlaceforPrunedNode(n),n[2].add(n[0]),n[2].add(n[1],n[1].source,n[1].target);e.splice(e.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},y.prototype.findPlaceforPrunedNode=function(e){var t,n,r=e[0];n=r==e[1].source?e[1].target:e[1].source;var i=n.startX,a=n.finishX,o=n.startY,s=n.finishY,l=[0,0,0,0];if(o>0)for(var d=i;d<=a;d++)l[0]+=this.grid[d][o-1].length+this.grid[d][o].length-1;if(a<this.grid.length-1)for(var d=o;d<=s;d++)l[1]+=this.grid[a+1][d].length+this.grid[a][d].length-1;if(s<this.grid[0].length-1)for(var d=i;d<=a;d++)l[2]+=this.grid[d][s+1].length+this.grid[d][s].length-1;if(i>0)for(var d=o;d<=s;d++)l[3]+=this.grid[i-1][d].length+this.grid[i][d].length-1;for(var f=h.MAX_VALUE,p,m,g=0;g<l.length;g++)l[g]<f?(f=l[g],p=1,m=g):l[g]==f&&p++;if(p==3&&f==0)l[0]==0&&l[1]==0&&l[2]==0?t=1:l[0]==0&&l[1]==0&&l[3]==0?t=0:l[0]==0&&l[2]==0&&l[3]==0?t=3:l[1]==0&&l[2]==0&&l[3]==0&&(t=2);else if(p==2&&f==0){var _=Math.floor(Math.random()*2);t=l[0]==0&&l[1]==0?_==0?0:1:l[0]==0&&l[2]==0?_==0?0:2:l[0]==0&&l[3]==0?_==0?0:3:l[1]==0&&l[2]==0?_==0?1:2:l[1]==0&&l[3]==0?_==0?1:3:_==0?2:3}else if(p==4&&f==0){var _=Math.floor(Math.random()*4);t=_}else t=m;t==0?r.setCenter(n.getCenterX(),n.getCenterY()-n.getHeight()/2-u.DEFAULT_EDGE_LENGTH-r.getHeight()/2):t==1?r.setCenter(n.getCenterX()+n.getWidth()/2+u.DEFAULT_EDGE_LENGTH+r.getWidth()/2,n.getCenterY()):t==2?r.setCenter(n.getCenterX(),n.getCenterY()+n.getHeight()/2+u.DEFAULT_EDGE_LENGTH+r.getHeight()/2):r.setCenter(n.getCenterX()-n.getWidth()/2-u.DEFAULT_EDGE_LENGTH-r.getWidth()/2,n.getCenterY())},e.exports=y}),(function(e,t,n){var r={};r.layoutBase=n(0),r.CoSEConstants=n(1),r.CoSEEdge=n(2),r.CoSEGraph=n(3),r.CoSEGraphManager=n(4),r.CoSELayout=n(6),r.CoSENode=n(5),e.exports=r})])})})),xQe=s(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(bQe()):typeof define==`function`&&define.amd?define([`cose-base`],r):typeof e==`object`?e.cytoscapeCoseBilkent=r(bQe()):n.cytoscapeCoseBilkent=r(n.coseBase)})(e,function(e){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=1)})([(function(t,n){t.exports=e}),(function(e,t,n){var r=n(0).layoutBase.LayoutConstants,i=n(0).layoutBase.FDLayoutConstants,a=n(0).CoSEConstants,o=n(0).CoSELayout,s=n(0).CoSENode,l=n(0).layoutBase.PointD,u=n(0).layoutBase.DimensionD,d={ready:function(){},stop:function(){},quality:`default`,nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:`end`,animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function f(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function p(e){this.options=f(d,e),m(this.options)}var m=function(e){e.nodeRepulsion!=null&&(a.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion),e.idealEdgeLength!=null&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=e.idealEdgeLength),e.edgeElasticity!=null&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=e.edgeElasticity),e.nestingFactor!=null&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),r.QUALITY=e.quality==`draft`?0:e.quality==`proof`?2:1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!e.randomize,a.ANIMATE=i.ANIMATE=r.ANIMATE=e.animate,a.TILE=e.tile,a.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==`function`?e.tilingPaddingVertical.call():e.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==`function`?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal};p.prototype.run=function(){var e,t,n=this.options;this.idToLNode={};var r=this.layout=new o,i=this;i.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:`layoutstart`,layout:this});var a=r.newGraphManager();this.gm=a;var s=this.options.eles.nodes(),l=this.options.eles.edges();this.root=a.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(s),r);for(var u=0;u<l.length;u++){var d=l[u],f=this.idToLNode[d.data(`source`)],p=this.idToLNode[d.data(`target`)];if(f!==p&&f.getEdgesBetween(p).length==0){var m=a.add(r.newEdge(),f,p);m.id=d.id()}}var h=function(e,t){typeof e==`number`&&(e=t);var n=e.data(`id`),r=i.idToLNode[n];return{x:r.getRect().getCenterX(),y:r.getRect().getCenterY()}},g=function a(){for(var o=function(){n.fit&&n.cy.fit(n.eles,n.padding),e||(e=!0,i.cy.one(`layoutready`,n.ready),i.cy.trigger({type:`layoutready`,layout:i}))},s=i.options.refresh,l,u=0;u<s&&!l;u++)l=i.stopped||i.layout.tick();if(l){r.checkLayoutSuccess()&&!r.isSubLayout&&r.doPostLayout(),r.tilingPostLayout&&r.tilingPostLayout(),r.isLayoutFinished=!0,i.options.eles.nodes().positions(h),o(),i.cy.one(`layoutstop`,i.options.stop),i.cy.trigger({type:`layoutstop`,layout:i}),t&&cancelAnimationFrame(t),e=!1;return}var d=i.layout.getPositionsData();n.eles.nodes().positions(function(e,t){if(typeof e==`number`&&(e=t),!e.isParent()){for(var n=e.id(),r=d[n],i=e;r==null&&(r=d[i.data(`parent`)]||d[`DummyCompound_`+i.data(`parent`)],d[n]=r,i=i.parent()[0],i!=null););return r==null?{x:e.position(`x`),y:e.position(`y`)}:{x:r.x,y:r.y}}}),o(),t=requestAnimationFrame(a)};return r.addListener(`layoutstarted`,function(){i.options.animate===`during`&&(t=requestAnimationFrame(g))}),r.runLayout(),this.options.animate!==`during`&&(i.options.eles.nodes().not(`:parent`).layoutPositions(i,i.options,h),e=!1),this},p.prototype.getTopMostNodes=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].id()]=!0;return e.filter(function(e,n){typeof e==`number`&&(e=n);for(var r=e.parent()[0];r!=null;){if(t[r.id()])return!1;r=r.parent()[0]}return!0})},p.prototype.processChildrenList=function(e,t,n){for(var r=t.length,i=0;i<r;i++){var a=t[i],o=a.children(),d,f=a.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(d=a.outerWidth()!=null&&a.outerHeight()!=null?e.add(new s(n.graphManager,new l(a.position(`x`)-f.w/2,a.position(`y`)-f.h/2),new u(parseFloat(f.w),parseFloat(f.h)))):e.add(new s(this.graphManager)),d.id=a.data(`id`),d.paddingLeft=parseInt(a.css(`padding`)),d.paddingTop=parseInt(a.css(`padding`)),d.paddingRight=parseInt(a.css(`padding`)),d.paddingBottom=parseInt(a.css(`padding`)),this.options.nodeDimensionsIncludeLabels&&a.isParent()){var p=a.boundingBox({includeLabels:!0,includeNodes:!1}).w,m=a.boundingBox({includeLabels:!0,includeNodes:!1}).h,h=a.css(`text-halign`);d.labelWidth=p,d.labelHeight=m,d.labelPos=h}if(this.idToLNode[a.data(`id`)]=d,isNaN(d.rect.x)&&(d.rect.x=0),isNaN(d.rect.y)&&(d.rect.y=0),o!=null&&o.length>0){var g=n.getGraphManager().add(n.newGraph(),d);this.processChildrenList(g,o,n)}}},p.prototype.stop=function(){return this.stopped=!0,this};var h=function(e){e(`layout`,`cose-bilkent`,p)};typeof cytoscape<`u`&&h(cytoscape),e.exports=h})])})})),SQe=l({render:()=>jQe});function CQe(e,t){e.forEach(e=>{let n={id:e.id,labelText:e.label,height:e.height,width:e.width,padding:e.padding??0};Object.keys(e).forEach(t=>{[`id`,`label`,`height`,`width`,`padding`,`x`,`y`].includes(t)||(n[t]=e[t])}),t.add({group:`nodes`,data:n,position:{x:e.x??0,y:e.y??0}})})}function wQe(e,t){e.forEach(e=>{let n={id:e.id,source:e.start,target:e.end};Object.keys(e).forEach(t=>{[`id`,`start`,`end`].includes(t)||(n[t]=e[t])}),t.add({group:`edges`,data:n})})}function TQe(e){return new Promise(t=>{let n=hb(`body`).append(`div`).attr(`id`,`cy`).attr(`style`,`display:none`),r=ZV({container:document.getElementById(`cy`),style:[{selector:`edge`,style:{"curve-style":`bezier`}}]});n.remove(),CQe(e.nodes,r),wQe(e.edges,r),r.nodes().forEach(function(e){e.layoutDimensions=()=>{let t=e.data();return{w:t.width,h:t.height}}}),r.layout({name:`cose-bilkent`,quality:`proof`,styleEnabled:!1,animate:!1}).run(),r.ready(e=>{G.info(`Cytoscape ready`,e),t(r)})})}function EQe(e){return e.nodes().map(e=>{let t=e.data(),n=e.position(),r={id:t.id,x:n.x,y:n.y};return Object.keys(t).forEach(e=>{e!==`id`&&(r[e]=t[e])}),r})}function DQe(e){return e.edges().map(e=>{let t=e.data(),n=e._private.rscratch,r={id:t.id,source:t.source,target:t.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(t).forEach(e=>{[`id`,`source`,`target`].includes(e)||(r[e]=t[e])}),r})}async function OQe(e,t){G.debug(`Starting cose-bilkent layout algorithm`);try{kQe(e);let t=await TQe(e),n=EQe(t),r=DQe(t);return G.debug(`Layout completed: ${n.length} nodes, ${r.length} edges`),{nodes:n,edges:r}}catch(e){throw G.error(`Error in cose-bilkent layout algorithm:`,e),e}}function kQe(e){if(!e)throw Error(`Layout data is required`);if(!e.config)throw Error(`Configuration is required in layout data`);if(!e.rootNode)throw Error(`Root node is required`);if(!e.nodes||!Array.isArray(e.nodes))throw Error(`No nodes found in layout data`);if(!Array.isArray(e.edges))throw Error(`Edges array is required in layout data`);return!0}var AQe,jQe,MQe=o((()=>{Gp(),Vp(),vQe(),AQe=d(xQe(),1),WS(),ZV.use(AQe.default),W(CQe,`addNodes`),W(wQe,`addEdges`),W(TQe,`createCytoscapeInstance`),W(EQe,`extractPositionedNodes`),W(DQe,`extractPositionedEdges`),W(OQe,`executeCoseBilkentLayout`),W(kQe,`validateLayoutData`),jQe=W(async(e,t,{insertCluster:n,insertEdge:r,insertEdgeLabel:i,insertMarkers:a,insertNode:o,log:s,positionEdgeLabel:l},{algorithm:u})=>{let d={},f={},p=t.select(`g`);a(p,e.markers,e.type,e.diagramId);let m=p.insert(`g`).attr(`class`,`subgraphs`),h=p.insert(`g`).attr(`class`,`edgePaths`),g=p.insert(`g`).attr(`class`,`edgeLabels`),_=p.insert(`g`).attr(`class`,`nodes`);s.debug(`Inserting nodes into DOM for dimension calculation`),await Promise.all(e.nodes.map(async t=>{if(t.isGroup){let e={...t};f[t.id]=e,d[t.id]=e,await n(m,t)}else{let n={...t};d[t.id]=n;let r=await o(_,t,{config:e.config,dir:e.direction||`TB`}),i=r.node().getBBox();n.width=i.width,n.height=i.height,n.domId=r,s.debug(`Node ${t.id} dimensions: ${i.width}x${i.height}`)}})),s.debug(`Running cose-bilkent layout algorithm`);let v=await OQe({...e,nodes:e.nodes.map(e=>{let t=d[e.id];return{...e,width:t.width,height:t.height}})},e.config);s.debug(`Positioning nodes based on layout results`),v.nodes.forEach(e=>{let t=d[e.id];t?.domId&&(t.domId.attr(`transform`,`translate(${e.x}, ${e.y})`),t.x=e.x,t.y=e.y,s.debug(`Positioned node ${t.id} at center (${e.x}, ${e.y})`))}),v.edges.forEach(t=>{let n=e.edges.find(e=>e.id===t.id);n&&(n.points=[{x:t.startX,y:t.startY},{x:t.midX,y:t.midY},{x:t.endX,y:t.endY}])}),s.debug(`Inserting and positioning edges`),await Promise.all(e.edges.map(async t=>{await i(g,t);let n=d[t.start??``],a=d[t.end??``];if(n&&a){let i=v.edges.find(e=>e.id===t.id);if(i){s.debug(`APA01 positionedEdge`,i);let o={...t};l(o,r(h,o,f,e.type,n,a,e.diagramId))}else{let i={...t,points:[{x:n.x||0,y:n.y||0},{x:a.x||0,y:a.y||0}]};l(i,r(h,i,f,e.type,n,a,e.diagramId))}}})),s.debug(`Cose-bilkent rendering completed`)},`render`)})),NQe,QV,PQe,$V,eH,tH=o((()=>{vT(),jT(),gT(),dT(),OC(),Iy(),Gp(),Vp(),zp(),NQe={common:dy,getConfig:Rv,insertCluster:_T,insertEdge:kT,insertEdgeLabel:DT,insertMarkers:AT,insertNode:fT,interpolateToCurve:zSe,labelHelper:qw,log:G,positionEdgeLabel:OT},QV={},PQe=W(e=>{for(let t of e)QV[t.name]=t},`registerLayoutLoaders`),W(()=>{PQe([{name:`dagre`,loader:W(async()=>await Rp(()=>Promise.resolve().then(()=>(ZVe(),BVe)),void 0),`loader`)},{name:`swimlane`,loader:W(async()=>await Rp(()=>Promise.resolve().then(()=>(VUe(),QVe)),void 0),`loader`)},{name:`cose-bilkent`,loader:W(async()=>await Rp(()=>Promise.resolve().then(()=>(MQe(),SQe)),void 0),`loader`)}])},`registerDefaultLayoutLoaders`)(),$V=W(async(e,t)=>{if(!(e.layoutAlgorithm in QV))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=QV[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:l}=a,u=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${u}-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${u}-drop-shadow-small`).attr(`height`,`150%`).attr(`width`,`150%`).append(`feDropShadow`).attr(`dx`,`2`).attr(`dy`,`2`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,l).attr(`stop-opacity`,1)}return r.render(e,t,NQe,{algorithm:n.algorithm})},`render`),eH=W((e=``,{fallback:t=`dagre`}={})=>{if(e in QV)return e;if(t in QV)return G.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},`getRegisteredLayoutAlgorithm`)})),nH,FQe,IQe,LQe,RQe,zQe,BQe,VQe=o((()=>{nH=`comm`,FQe=`rule`,IQe=`decl`,LQe=`@import`,RQe=`@namespace`,zQe=`@keyframes`,BQe=`@layer`}));function HQe(e){return e.trim()}function UQe(e,t,n){return e.replace(t,n)}function rH(e,t){return e.charCodeAt(t)|0}function iH(e,t,n){return e.slice(t,n)}function aH(e){return e.length}function WQe(e){return e.length}function oH(e,t){return t.push(e),e}var GQe,sH,cH=o((()=>{GQe=Math.abs,sH=String.fromCharCode}));function KQe(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:mH,column:hH,length:o,return:``,siblings:s}}function qQe(){return _H}function JQe(){return _H=gH>0?rH(vH,--gH):0,hH--,_H===10&&(hH=1,mH--),_H}function lH(){return _H=gH<r$e?rH(vH,gH++):0,hH++,_H===10&&(hH=1,mH++),_H}function uH(){return rH(vH,gH)}function dH(){return gH}function fH(e,t){return iH(vH,e,t)}function pH(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function YQe(e){return mH=hH=1,r$e=aH(vH=e),gH=0,[]}function XQe(e){return vH=``,e}function ZQe(e){return HQe(fH(gH-1,e$e(e===91?e+2:e===40?e+1:e)))}function QQe(e){for(;(_H=uH())&&_H<33;)lH();return pH(e)>2||pH(_H)>3?``:` `}function $Qe(e,t){for(;--t&&lH()&&!(_H<48||_H>102||_H>57&&_H<65||_H>70&&_H<97););return fH(e,dH()+(t<6&&uH()==32&&lH()==32))}function e$e(e){for(;lH();)switch(_H){case e:return gH;case 34:case 39:e!==34&&e!==39&&e$e(_H);break;case 40:e===41&&e$e(e);break;case 92:lH()}return gH}function t$e(e,t){for(;lH()&&e+_H!==57&&(e+_H!==84||uH()!==47););return`/*`+fH(t,gH-1)+`*`+sH(e===47?e:lH())}function n$e(e){for(;!pH(uH());)lH();return fH(e,gH)}var mH,hH,r$e,gH,_H,vH,i$e=o((()=>{cH(),mH=1,hH=1,r$e=0,gH=0,_H=0,vH=``}));function a$e(e){return XQe(yH(``,null,null,null,[``],e=YQe(e),0,[0],e))}function yH(e,t,n,r,i,a,o,s,l){for(var u=0,d=0,f=o,p=0,m=0,h=0,g=1,_=1,v=1,y=0,b=0,x=``,S=i,C=a,w=r,T=x;_;)switch(h=b,b=lH()){case 40:h!=108&&rH(T,f-1)==58?(y++,T+=`(`):T+=ZQe(b);break;case 41:y--,T+=`)`;break;case 34:case 39:case 91:T+=ZQe(b);break;case 9:case 10:case 13:case 32:if(y>0){T+=sH(b);break}T+=QQe(h);break;case 92:T+=$Qe(dH()-1,7);continue;case 47:switch(uH()){case 42:case 47:oH(s$e(t$e(lH(),dH()),t,n,l),l),(pH(h||1)==5||pH(uH()||1)==5)&&aH(T)&&iH(T,-1,void 0)!==` `&&(T+=` `);break;default:T+=`/`}break;case 123*g:s[u++]=aH(T)*v;case 125*g:case 59:case 0:if(y>0&&b){T+=sH(b);break}switch(b){case 0:case 125:_=0;case 59+d:v==-1&&(T=UQe(T,/\f/g,``)),m>0&&(aH(T)-f||g===0)&&oH(m>32?c$e(T+`;`,r,n,f-1,l):c$e(UQe(T,` `,``)+`;`,r,n,f-2,l),l);break;case 59:T+=`;`;default:if(oH(w=o$e(T,t,n,u,d,i,s,x,S=[],C=[],f,a),a),b===123){if(d===0)yH(T,t,w,w,S,a,f,s,C);else{switch(p){case 99:if(rH(T,3)===110)break;case 108:if(rH(T,2)===97)break;default:d=0;case 100:case 109:case 115:}d?yH(e,w,w,r&&oH(o$e(e,w,w,0,0,i,s,x,i,S=[],f,C),C),i,C,f,s,r?S:C):yH(T,w,w,w,[``],C,0,s,C)}}}u=d=m=0,g=v=1,x=T=``,f=o;break;case 58:f=1+aH(T),m=h;default:if(g<1){if(b==123)--g;else if(b==125&&g++==0&&JQe()==125)continue}switch(T+=sH(b),b*g){case 38:v=d>0?1:(T+=`\f`,-1);break;case 44:if(y>0)break;s[u++]=(aH(T)-1)*v,v=1;break;case 64:uH()===45&&(T+=ZQe(lH())),p=uH(),d=f=aH(x=T+=n$e(dH())),b++;break;case 45:h===45&&aH(T)==2&&(g=0)}}return a}function o$e(e,t,n,r,i,a,o,s,l,u,d,f){for(var p=i-1,m=i===0?a:[``],h=WQe(m),g=0,_=0,v=0;g<r;++g)for(var y=0,b=iH(e,p+1,p=GQe(_=o[g])),x=e;y<h;++y)(x=HQe(_>0?m[y]+` `+b:UQe(b,/&\f/g,m[y])))&&(l[v++]=x);return KQe(e,t,n,i===0?FQe:s,l,u,d,f)}function s$e(e,t,n,r){return KQe(e,t,n,nH,sH(qQe()),iH(e,2,-2),0,r)}function c$e(e,t,n,r,i){return KQe(e,t,n,IQe,iH(e,0,r),iH(e,r+1,-1),r,i)}var l$e=o((()=>{VQe(),cH(),i$e()})),u$e=o((()=>{}));function d$e(e,t){for(var n=``,r=0;r<e.length;r++)n+=t(e[r],r,e,t)||``;return n}function f$e(e,t,n,r){switch(e.type){case BQe:if(e.children.length)break;case LQe:case RQe:case IQe:return e.return=e.return||e.value;case nH:return``;case zQe:return e.return=e.value+`{`+d$e(e.children,r)+`}`;case FQe:if(!aH(e.value=e.props.join(`,`)))return``}return aH(n=d$e(e.children,r))?e.return=e.value+`{`+n+`}`:``}var p$e=o((()=>{VQe(),cH()}));function m$e(e){var t=WQe(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}var h$e=o((()=>{cH()})),g$e=o((()=>{VQe(),cH(),l$e(),u$e(),i$e(),p$e(),h$e()})),_$e,bH,v$e,y$e,xH,SH,CH,wH,TH,EH=o((()=>{Iy(),Vp(),_$e=iC(),WS(),bH=W((e,t)=>{let n=e.append(`rect`);if(n.attr(`x`,t.x),n.attr(`y`,t.y),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`width`,t.width),n.attr(`height`,t.height),t.name&&n.attr(`name`,t.name),t.rx&&n.attr(`rx`,t.rx),t.ry&&n.attr(`ry`,t.ry),t.attrs!==void 0)for(let e in t.attrs)n.attr(e,t.attrs[e]);return t.class&&n.attr(`class`,t.class),n},`drawRect`),v$e=W((e,t)=>{bH(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:`rect`}).lower()},`drawBackgroundRect`),y$e=W((e,t)=>{let n=t.text.replace(Qv,` `),r=e.append(`text`);r.attr(`x`,t.x),r.attr(`y`,t.y),r.attr(`class`,`legend`),r.style(`text-anchor`,t.anchor),t.class&&r.attr(`class`,t.class);let i=r.append(`tspan`);return i.attr(`x`,t.x+t.textMargin*2),i.text(n),r},`drawText`),xH=W((e,t,n,r)=>{let i=e.append(`image`);i.attr(`x`,t),i.attr(`y`,n);let a=(0,_$e.sanitizeUrl)(r);i.attr(`xlink:href`,a)},`drawImage`),SH=W((e,t,n,r)=>{let i=e.append(`use`);i.attr(`x`,t),i.attr(`y`,n);let a=(0,_$e.sanitizeUrl)(r);i.attr(`xlink:href`,`#${a}`)},`drawEmbeddedImage`),CH=W(()=>({x:0,y:0,width:100,height:100,fill:`#EDF2AE`,stroke:`#666`,anchor:`start`,rx:0,ry:0}),`getNoteRect`),wH=W(()=>({x:0,y:0,width:100,height:100,"text-anchor":`start`,style:`#666`,textMargin:0,rx:0,ry:0,tspan:!0}),`getTextObj`),TH=W(()=>{let e=hb(`.mermaidTooltip`);return e.empty()&&(e=hb(`body`).append(`div`).attr(`class`,`mermaidTooltip`).style(`opacity`,0).style(`position`,`absolute`).style(`text-align`,`center`).style(`max-width`,`200px`).style(`padding`,`2px`).style(`font-size`,`12px`).style(`background`,`#ffffde`).style(`border`,`1px solid #333`).style(`border-radius`,`2px`).style(`pointer-events`,`none`).style(`z-index`,`100`)),e},`createTooltip`)})),b$e=l({diagram:()=>M1e});function DH(e,t,n,r,i){let a=t[e];if(!a.width){if(n)a.text=SC(a.text,i,r),a.textLines=a.text.split(dy.lineBreakRegex).length,a.width=i,a.height=_C(a.text,r);else{let e=a.text.split(dy.lineBreakRegex);a.textLines=e.length;let t=0;a.height=0,a.width=0;for(let n of e)a.width=Math.max(vC(n,r),a.width),t=_C(n,r),a.height+=t}}return a}async function x$e(e,t,n,r,i){let a=i.db,o=new S1e(i);o.data.widthLimit=n.data.widthLimit/Math.min(qH,r.length);for(let[s,l]of r.entries()){let r=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=r,r=l.image.Y+l.image.height);let u=l.wrap&&JH.wrap,d=XH(JH);d.fontSize+=2,d.fontWeight=`bold`;let f=DH(`label`,l,u,d,o.data.widthLimit);if(f.Y=r+8,r=f.Y+f.height,l.type&&l.type.text!==``){l.type.text=`[`+l.type.text+`]`;let e=DH(`type`,l,u,XH(JH),o.data.widthLimit);e.Y=r+5,r=e.Y+e.height}if(l.descr&&l.descr.text!==``){let e=XH(JH);e.fontSize-=2;let t=DH(`descr`,l,u,e,o.data.widthLimit);t.Y=r+20,r=t.Y+t.height}if(s==0||s%qH===0){let e=n.data.startx+JH.diagramMarginX,t=n.data.stopy+JH.diagramMarginY+r;o.setData(e,e,t,t)}else{let e=o.data.stopx===o.data.startx?o.data.startx:o.data.stopx+JH.diagramMarginX,t=o.data.starty;o.setData(e,e,t,t)}o.name=l.alias;let p=a.getC4ShapeArray(l.alias),m=a.getC4ShapeKeys(l.alias);m.length>0&&await T1e(o,e,p,m),t=l.alias;let h=a.getBoundaries(t);h.length>0&&await x$e(e,t,o,h,i),l.alias!==`global`&&w1e(e,l,o),n.data.stopy=Math.max(o.data.stopy+JH.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(o.data.stopx+JH.c4ShapeMargin,n.data.stopx),GH=Math.max(GH,n.data.stopx),KH=Math.max(KH,n.data.stopy)}}var OH,S$e,C$e,kH,w$e,AH,jH,MH,NH,PH,FH,IH,LH,RH,zH,T$e,E$e,D$e,O$e,k$e,A$e,j$e,M$e,N$e,P$e,F$e,I$e,L$e,R$e,z$e,B$e,V$e,H$e,U$e,W$e,G$e,K$e,q$e,J$e,Y$e,X$e,BH,VH,Z$e,Q$e,$$e,e1e,t1e,n1e,r1e,i1e,a1e,o1e,HH,UH,s1e,c1e,l1e,u1e,WH,d1e,f1e,p1e,m1e,h1e,g1e,_1e,v1e,y1e,b1e,GH,KH,x1e,qH,JH,S1e,YH,XH,C1e,w1e,T1e,E1e,D1e,O1e,k1e,A1e,j1e,M1e,N1e=o((()=>{EH(),dT(),ZS(),dw(),rC(),OC(),Iy(),Gp(),Vp(),WS(),OH=(function(){var e=W(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,24],n=[1,25],r=[1,26],i=[1,27],a=[1,28],o=[1,63],s=[1,64],l=[1,65],u=[1,66],d=[1,67],f=[1,68],p=[1,69],m=[1,29],h=[1,30],g=[1,31],_=[1,32],v=[1,33],y=[1,34],b=[1,35],x=[1,36],S=[1,37],C=[1,38],w=[1,39],T=[1,40],E=[1,41],D=[1,42],O=[1,43],k=[1,44],A=[1,45],j=[1,46],M=[1,47],N=[1,48],P=[1,50],F=[1,51],I=[1,52],L=[1,53],R=[1,54],ee=[1,55],z=[1,56],B=[1,57],V=[1,58],te=[1,59],ne=[1,60],re=[14,42],ie=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ae=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],oe=[1,82],se=[1,83],ce=[1,84],le=[1,85],H=[12,14,42],ue=[12,14,33,42],de=[12,14,33,42,76,77,79,80],fe=[12,33],pe=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],me={trace:W(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:`error`,6:`direction_tb`,7:`direction_bt`,8:`direction_rl`,9:`direction_lr`,11:`C4_CONTEXT`,12:`NEWLINE`,14:`EOF`,15:`C4_CONTAINER`,16:`C4_COMPONENT`,17:`C4_DYNAMIC`,18:`C4_DEPLOYMENT`,22:`title`,23:`accDescription`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`LBRACE`,34:`ENTERPRISE_BOUNDARY`,36:`SYSTEM_BOUNDARY`,37:`BOUNDARY`,38:`CONTAINER_BOUNDARY`,39:`NODE`,40:`NODE_L`,41:`NODE_R`,42:`RBRACE`,44:`PERSON`,45:`PERSON_EXT`,46:`SYSTEM`,47:`SYSTEM_DB`,48:`SYSTEM_QUEUE`,49:`SYSTEM_EXT`,50:`SYSTEM_EXT_DB`,51:`SYSTEM_EXT_QUEUE`,52:`CONTAINER`,53:`CONTAINER_DB`,54:`CONTAINER_QUEUE`,55:`CONTAINER_EXT`,56:`CONTAINER_EXT_DB`,57:`CONTAINER_EXT_QUEUE`,58:`COMPONENT`,59:`COMPONENT_DB`,60:`COMPONENT_QUEUE`,61:`COMPONENT_EXT`,62:`COMPONENT_EXT_DB`,63:`COMPONENT_EXT_QUEUE`,64:`REL`,65:`BIREL`,66:`REL_U`,67:`REL_D`,68:`REL_L`,69:`REL_R`,70:`REL_B`,71:`REL_INDEX`,72:`UPDATE_EL_STYLE`,73:`UPDATE_REL_STYLE`,74:`UPDATE_LAYOUT_CONFIG`,76:`STR`,77:`STR_KEY`,78:`STR_VALUE`,79:`ATTRIBUTE`,80:`ATTRIBUTE_EMPTY`},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:W(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:r.setDirection(`TB`);break;case 4:r.setDirection(`BT`);break;case 5:r.setDirection(`RL`);break;case 6:r.setDirection(`LR`);break;case 8:case 9:case 10:case 11:case 12:r.setC4Type(a[s-3]);break;case 19:r.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 20:r.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 21:this.$=a[s].trim(),r.setTitle(this.$);break;case 22:case 23:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 28:a[s].splice(2,0,`ENTERPRISE`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 29:a[s].splice(2,0,`SYSTEM`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 30:r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 31:a[s].splice(2,0,`CONTAINER`),r.addContainerBoundary(...a[s]),this.$=a[s];break;case 32:r.addDeploymentNode(`node`,...a[s]),this.$=a[s];break;case 33:r.addDeploymentNode(`nodeL`,...a[s]),this.$=a[s];break;case 34:r.addDeploymentNode(`nodeR`,...a[s]),this.$=a[s];break;case 35:r.popBoundaryParseStack();break;case 39:r.addPersonOrSystem(`person`,...a[s]),this.$=a[s];break;case 40:r.addPersonOrSystem(`external_person`,...a[s]),this.$=a[s];break;case 41:r.addPersonOrSystem(`system`,...a[s]),this.$=a[s];break;case 42:r.addPersonOrSystem(`system_db`,...a[s]),this.$=a[s];break;case 43:r.addPersonOrSystem(`system_queue`,...a[s]),this.$=a[s];break;case 44:r.addPersonOrSystem(`external_system`,...a[s]),this.$=a[s];break;case 45:r.addPersonOrSystem(`external_system_db`,...a[s]),this.$=a[s];break;case 46:r.addPersonOrSystem(`external_system_queue`,...a[s]),this.$=a[s];break;case 47:r.addContainer(`container`,...a[s]),this.$=a[s];break;case 48:r.addContainer(`container_db`,...a[s]),this.$=a[s];break;case 49:r.addContainer(`container_queue`,...a[s]),this.$=a[s];break;case 50:r.addContainer(`external_container`,...a[s]),this.$=a[s];break;case 51:r.addContainer(`external_container_db`,...a[s]),this.$=a[s];break;case 52:r.addContainer(`external_container_queue`,...a[s]),this.$=a[s];break;case 53:r.addComponent(`component`,...a[s]),this.$=a[s];break;case 54:r.addComponent(`component_db`,...a[s]),this.$=a[s];break;case 55:r.addComponent(`component_queue`,...a[s]),this.$=a[s];break;case 56:r.addComponent(`external_component`,...a[s]),this.$=a[s];break;case 57:r.addComponent(`external_component_db`,...a[s]),this.$=a[s];break;case 58:r.addComponent(`external_component_queue`,...a[s]),this.$=a[s];break;case 60:r.addRel(`rel`,...a[s]),this.$=a[s];break;case 61:r.addRel(`birel`,...a[s]),this.$=a[s];break;case 62:r.addRel(`rel_u`,...a[s]),this.$=a[s];break;case 63:r.addRel(`rel_d`,...a[s]),this.$=a[s];break;case 64:r.addRel(`rel_l`,...a[s]),this.$=a[s];break;case 65:r.addRel(`rel_r`,...a[s]),this.$=a[s];break;case 66:r.addRel(`rel_b`,...a[s]),this.$=a[s];break;case 67:a[s].splice(0,1),r.addRel(`rel`,...a[s]),this.$=a[s];break;case 68:r.updateElStyle(`update_el_style`,...a[s]),this.$=a[s];break;case 69:r.updateRelStyle(`update_rel_style`,...a[s]),this.$=a[s];break;case 70:r.updateLayoutConfig(`update_layout_config`,...a[s]),this.$=a[s];break;case 71:this.$=[a[s]];break;case 72:a[s].unshift(a[s-1]),this.$=a[s];break;case 73:case 75:this.$=a[s].trim();break;case 74:let e={};e[a[s-1].trim()]=a[s].trim(),this.$=e;break;case 76:this.$=``}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:z,71:B,72:V,73:te,74:ne},{13:70,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:z,71:B,72:V,73:te,74:ne},{13:71,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:z,71:B,72:V,73:te,74:ne},{13:72,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:z,71:B,72:V,73:te,74:ne},{13:73,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:z,71:B,72:V,73:te,74:ne},{14:[1,74]},e(re,[2,13],{43:23,29:49,30:61,32:62,20:75,34:o,36:s,37:l,38:u,39:d,40:f,41:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:z,71:B,72:V,73:te,74:ne}),e(re,[2,14]),e(ie,[2,16],{12:[1,76]}),e(re,[2,36],{12:[1,77]}),e(ae,[2,19]),e(ae,[2,20]),{25:[1,78]},{27:[1,79]},e(ae,[2,23]),{35:80,75:81,76:oe,77:se,79:ce,80:le},{35:86,75:81,76:oe,77:se,79:ce,80:le},{35:87,75:81,76:oe,77:se,79:ce,80:le},{35:88,75:81,76:oe,77:se,79:ce,80:le},{35:89,75:81,76:oe,77:se,79:ce,80:le},{35:90,75:81,76:oe,77:se,79:ce,80:le},{35:91,75:81,76:oe,77:se,79:ce,80:le},{35:92,75:81,76:oe,77:se,79:ce,80:le},{35:93,75:81,76:oe,77:se,79:ce,80:le},{35:94,75:81,76:oe,77:se,79:ce,80:le},{35:95,75:81,76:oe,77:se,79:ce,80:le},{35:96,75:81,76:oe,77:se,79:ce,80:le},{35:97,75:81,76:oe,77:se,79:ce,80:le},{35:98,75:81,76:oe,77:se,79:ce,80:le},{35:99,75:81,76:oe,77:se,79:ce,80:le},{35:100,75:81,76:oe,77:se,79:ce,80:le},{35:101,75:81,76:oe,77:se,79:ce,80:le},{35:102,75:81,76:oe,77:se,79:ce,80:le},{35:103,75:81,76:oe,77:se,79:ce,80:le},{35:104,75:81,76:oe,77:se,79:ce,80:le},e(H,[2,59]),{35:105,75:81,76:oe,77:se,79:ce,80:le},{35:106,75:81,76:oe,77:se,79:ce,80:le},{35:107,75:81,76:oe,77:se,79:ce,80:le},{35:108,75:81,76:oe,77:se,79:ce,80:le},{35:109,75:81,76:oe,77:se,79:ce,80:le},{35:110,75:81,76:oe,77:se,79:ce,80:le},{35:111,75:81,76:oe,77:se,79:ce,80:le},{35:112,75:81,76:oe,77:se,79:ce,80:le},{35:113,75:81,76:oe,77:se,79:ce,80:le},{35:114,75:81,76:oe,77:se,79:ce,80:le},{35:115,75:81,76:oe,77:se,79:ce,80:le},{20:116,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:z,71:B,72:V,73:te,74:ne},{12:[1,118],33:[1,117]},{35:119,75:81,76:oe,77:se,79:ce,80:le},{35:120,75:81,76:oe,77:se,79:ce,80:le},{35:121,75:81,76:oe,77:se,79:ce,80:le},{35:122,75:81,76:oe,77:se,79:ce,80:le},{35:123,75:81,76:oe,77:se,79:ce,80:le},{35:124,75:81,76:oe,77:se,79:ce,80:le},{35:125,75:81,76:oe,77:se,79:ce,80:le},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(re,[2,15]),e(ie,[2,17],{21:22,19:130,22:t,23:n,24:r,26:i,28:a}),e(re,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:n,24:r,26:i,28:a,34:o,36:s,37:l,38:u,39:d,40:f,41:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:z,71:B,72:V,73:te,74:ne}),e(ae,[2,21]),e(ae,[2,22]),e(H,[2,39]),e(ue,[2,71],{75:81,35:132,76:oe,77:se,79:ce,80:le}),e(de,[2,73]),{78:[1,133]},e(de,[2,75]),e(de,[2,76]),e(H,[2,40]),e(H,[2,41]),e(H,[2,42]),e(H,[2,43]),e(H,[2,44]),e(H,[2,45]),e(H,[2,46]),e(H,[2,47]),e(H,[2,48]),e(H,[2,49]),e(H,[2,50]),e(H,[2,51]),e(H,[2,52]),e(H,[2,53]),e(H,[2,54]),e(H,[2,55]),e(H,[2,56]),e(H,[2,57]),e(H,[2,58]),e(H,[2,60]),e(H,[2,61]),e(H,[2,62]),e(H,[2,63]),e(H,[2,64]),e(H,[2,65]),e(H,[2,66]),e(H,[2,67]),e(H,[2,68]),e(H,[2,69]),e(H,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(fe,[2,28]),e(fe,[2,29]),e(fe,[2,30]),e(fe,[2,31]),e(fe,[2,32]),e(fe,[2,33]),e(fe,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(ie,[2,18]),e(re,[2,38]),e(ue,[2,72]),e(de,[2,74]),e(H,[2,24]),e(H,[2,35]),e(pe,[2,25]),e(pe,[2,26],{12:[1,138]}),e(pe,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:W(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:W(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}W(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}W(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
919
|
+
`);i.aPosition=t.getAttribLocation(i,`aPosition`),i.aIndex=t.getAttribLocation(i,`aIndex`),i.aVertType=t.getAttribLocation(i,`aVertType`),i.aTransform=t.getAttribLocation(i,`aTransform`),i.aAtlasId=t.getAttribLocation(i,`aAtlasId`),i.aTex=t.getAttribLocation(i,`aTex`),i.aPointAPointB=t.getAttribLocation(i,`aPointAPointB`),i.aPointCPointD=t.getAttribLocation(i,`aPointCPointD`),i.aLineWidth=t.getAttribLocation(i,`aLineWidth`),i.aColor=t.getAttribLocation(i,`aColor`),i.aCornerRadius=t.getAttribLocation(i,`aCornerRadius`),i.aBorderColor=t.getAttribLocation(i,`aBorderColor`),i.uPanZoomMatrix=t.getUniformLocation(i,`uPanZoomMatrix`),i.uAtlasSize=t.getUniformLocation(i,`uAtlasSize`),i.uBGColor=t.getUniformLocation(i,`uBGColor`),i.uZoom=t.getUniformLocation(i,`uZoom`),i.uTextures=[];for(var a=0;a<this.batchManager.getMaxAtlasesPerBatch();a++)i.uTextures.push(t.getUniformLocation(i,`uTexture${a}`));return i}},{key:`_createVAO`,value:function(){var e=[0,0,1,0,1,1,0,0,1,1,0,1];this.vertexCount=e.length/2;var t=this.maxInstances,n=this.gl,r=this.program,i=n.createVertexArray();return n.bindVertexArray(i),JGe(n,`vec2`,r.aPosition,e),this.transformBuffer=YGe(n,t,r.aTransform),this.indexBuffer=yP(n,t,`vec4`,r.aIndex),this.vertTypeBuffer=yP(n,t,`int`,r.aVertType),this.atlasIdBuffer=yP(n,t,`int`,r.aAtlasId),this.texBuffer=yP(n,t,`vec4`,r.aTex),this.pointAPointBBuffer=yP(n,t,`vec4`,r.aPointAPointB),this.pointCPointDBuffer=yP(n,t,`vec4`,r.aPointCPointD),this.lineWidthBuffer=yP(n,t,`vec2`,r.aLineWidth),this.colorBuffer=yP(n,t,`vec4`,r.aColor),this.cornerRadiusBuffer=yP(n,t,`vec4`,r.aCornerRadius),this.borderColorBuffer=yP(n,t,`vec4`,r.aBorderColor),n.bindVertexArray(null),i}},{key:`buffers`,get:function(){var e=this;return this._buffers||=Object.keys(this).filter(function(e){return KP(e,`Buffer`)}).map(function(t){return e[t]}),this._buffers}},{key:`startFrame`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:jV.SCREEN;this.panZoomMatrix=e,this.renderTarget=t,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:`startBatch`,value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:`endFrame`,value:function(){this.endBatch()}},{key:`_isVisible`,value:function(e,t){return e.visible()?t&&t.isVisible?t.isVisible(e):!0:!1}},{key:`drawTexture`,value:function(e,t,n){var r=this.atlasManager,i=this.batchManager,a=r.getRenderTypeOpts(n);if(this._isVisible(e,a)&&(!e.isEdge()||this._isValidEdge(e))){if(this.renderTarget.picking&&a.getTexPickingMode){var o=a.getTexPickingMode(e);if(o===MV.IGNORE)return;if(o==MV.USE_BB){this.drawPickingRectangle(e,t,n);return}}var s=IN(r.getAtlasInfo(e,n)),l;try{for(s.s();!(l=s.n()).done;){var u=l.value,d=u.atlas,f=u.tex1,p=u.tex2;i.canAddToCurrentBatch(d)||this.endBatch();for(var m=i.getAtlasIndexForBatch(d),h=0,g=[[f,!0],[p,!1]];h<g.length;h++){var _=LN(g[h],2),v=_[0],y=_[1];if(v.w!=0){var b=this.instanceCount;this.vertTypeBuffer.getView(b)[0]=NV,vP(t,this.indexBuffer.getView(b));var x=this.atlasIdBuffer.getView(b);x[0]=m;var S=this.texBuffer.getView(b);S[0]=v.x,S[1]=v.y,S[2]=v.w,S[3]=v.h;var C=this.transformBuffer.getMatrixView(b);this.setTransformMatrix(e,C,a,u,y),this.instanceCount++,y||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(e){s.e(e)}finally{s.f()}}}},{key:`setTransformMatrix`,value:function(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=0;if(n.shapeProps&&n.shapeProps.padding&&(a=e.pstyle(n.shapeProps.padding).pfValue),r){var o=r.bb,s=r.tex1,l=r.tex2,u=s.w/(s.w+l.w);i||(u=1-u);var d=this._getAdjustedBB(o,a,i,u);this._applyTransformMatrix(t,d,n,e)}else{var f=n.getBoundingBox(e),p=this._getAdjustedBB(f,a,!0,1);this._applyTransformMatrix(t,p,n,e)}}},{key:`_applyTransformMatrix`,value:function(e,t,n,r){var i,a;ZGe(e);var o=n.getRotation?n.getRotation(r):0;if(o!==0){var s=n.getRotationPoint(r),l=s.x,u=s.y;xP(e,e,[l,u]),$Ge(e,e,o);var d=n.getRotationOffset(r);i=d.x+(t.xOffset||0),a=d.y+(t.yOffset||0)}else i=t.x1,a=t.y1;xP(e,e,[i,a]),SP(e,e,[t.w,t.h])}},{key:`_getAdjustedBB`,value:function(e,t,n,r){var i=e.x1,a=e.y1,o=e.w,s=e.h,l=e.yOffset;t&&(i-=t,a-=t,o+=2*t,s+=2*t);var u=0,d=o*r;return n&&r<1?o=d:!n&&r<1&&(u=o-d,i+=u,o=d),{x1:i,y1:a,w:o,h:s,xOffset:u,yOffset:l}}},{key:`drawPickingRectangle`,value:function(e,t,n){var r=this.atlasManager.getRenderTypeOpts(n),i=this.instanceCount;this.vertTypeBuffer.getView(i)[0]=FV,vP(t,this.indexBuffer.getView(i)),_P([0,0,0],1,this.colorBuffer.getView(i));var a=this.transformBuffer.getMatrixView(i);this.setTransformMatrix(e,a,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:`drawNode`,value:function(e,t,n){var r=this.simpleShapeOptions.get(n);if(this._isVisible(e,r)){var i=r.shapeProps,a=this._getVertTypeForShape(e,i.shape);if(a===void 0||r.isSimple&&!r.isSimple(e,this.renderTarget)){this.drawTexture(e,t,n);return}var o=this.instanceCount;if(this.vertTypeBuffer.getView(o)[0]=a,a===IV||a===LV){var s=r.getBoundingBox(e),l=this._getCornerRadius(e,i.radius,s),u=this.cornerRadiusBuffer.getView(o);u[0]=l,u[1]=l,u[2]=l,u[3]=l,a===LV&&(u[0]=0,u[2]=0)}vP(t,this.indexBuffer.getView(o));var d=this.renderTarget.picking?1:n===`node-body`?e.effectiveOpacity():1,f=this.renderTarget.picking?1:e.pstyle(i.opacity).value*d,p=e.pstyle(i.color).value;_P(p,f,this.colorBuffer.getView(o));var m=this.lineWidthBuffer.getView(o);if(m[0]=0,m[1]=0,i.border){var h=e.pstyle(`border-width`).value;if(h>0){var g=e.pstyle(`border-color`).value;_P(g,d*e.pstyle(`border-opacity`).value,this.borderColorBuffer.getView(o));var _=e.pstyle(`border-position`).value;if(_===`inside`)m[0]=0,m[1]=-h;else if(_===`outside`)m[0]=h,m[1]=0;else{var v=h/2;m[0]=v,m[1]=-v}}}var y=this.transformBuffer.getMatrixView(o);this.setTransformMatrix(e,y,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:`_getVertTypeForShape`,value:function(e,t){switch(e.pstyle(t).value){case`rectangle`:return FV;case`ellipse`:return RV;case`roundrectangle`:case`round-rectangle`:return IV;case`bottom-round-rectangle`:return LV;default:return}}},{key:`_getCornerRadius`,value:function(e,t,n){var r=n.w,i=n.h;if(e.pstyle(t).value===`auto`)return LI(r,i);var a=e.pstyle(t).pfValue,o=r/2,s=i/2;return Math.min(a,s,o)}},{key:`drawEdgeArrow`,value:function(e,t,n){if(e.visible()){var r=e._private.rscratch,i,a,o;if(n===`source`?(i=r.arrowStartX,a=r.arrowStartY,o=r.srcArrowAngle):(i=r.arrowEndX,a=r.arrowEndY,o=r.tgtArrowAngle),!(isNaN(i)||i==null||isNaN(a)||a==null||isNaN(o)||o==null)&&e.pstyle(n+`-arrow-shape`).value!==`none`){var s=e.pstyle(n+`-arrow-color`).value,l=e.pstyle(`opacity`).value*e.pstyle(`line-opacity`).value,u=e.pstyle(`width`).pfValue,d=e.pstyle(`arrow-scale`).value,f=this.r.getArrowWidth(u,d),p=this.instanceCount,m=this.transformBuffer.getMatrixView(p);ZGe(m),xP(m,m,[i,a]),SP(m,m,[f,f]),$Ge(m,m,o),this.vertTypeBuffer.getView(p)[0]=PV,vP(t,this.indexBuffer.getView(p)),_P(s,l,this.colorBuffer.getView(p)),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:`drawEdgeLine`,value:function(e,t){if(e.visible()){var n=this._getEdgePoints(e);if(n){var r=e.pstyle(`opacity`).value,i=e.pstyle(`line-opacity`).value,a=e.pstyle(`width`).pfValue,o=e.pstyle(`line-color`).value,s=r*i;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),n.length==4){var l=this.instanceCount;this.vertTypeBuffer.getView(l)[0]=aQe,vP(t,this.indexBuffer.getView(l)),_P(o,s,this.colorBuffer.getView(l));var u=this.lineWidthBuffer.getView(l);u[0]=a;var d=this.pointAPointBBuffer.getView(l);d[0]=n[0],d[1]=n[1],d[2]=n[2],d[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var f=0;f<n.length-2;f+=2){var p=this.instanceCount;this.vertTypeBuffer.getView(p)[0]=oQe,vP(t,this.indexBuffer.getView(p)),_P(o,s,this.colorBuffer.getView(p));var m=this.lineWidthBuffer.getView(p);m[0]=a;var h=n[f-2],g=n[f-1],_=n[f],v=n[f+1],y=n[f+2],b=n[f+3],x=n[f+4],S=n[f+5];f==0&&(h=2*_-y+.001,g=2*v-b+.001),f==n.length-4&&(x=2*y-_+.001,S=2*b-v+.001);var C=this.pointAPointBBuffer.getView(p);C[0]=h,C[1]=g,C[2]=_,C[3]=v;var w=this.pointCPointDBuffer.getView(p);w[0]=y,w[1]=b,w[2]=x,w[3]=S,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:`_isValidEdge`,value:function(e){var t=e._private.rscratch;return!(t.badLine||t.allpts==null||isNaN(t.allpts[0]))}},{key:`_getEdgePoints`,value:function(e){var t=e._private.rscratch;if(this._isValidEdge(e)){var n=t.allpts;if(n.length==4)return n;var r=this._getNumSegments(e);return this._getCurveSegmentPoints(n,r)}}},{key:`_getNumSegments`,value:function(e){return Math.min(15,this.maxInstances)}},{key:`_getCurveSegmentPoints`,value:function(e,t){if(e.length==4)return e;for(var n=Array((t+1)*2),r=0;r<=t;r++)if(r==0)n[0]=e[0],n[1]=e[1];else if(r==t)n[r*2]=e[e.length-2],n[r*2+1]=e[e.length-1];else{var i=r/t;this._setCurvePoint(e,i,n,r*2)}return n}},{key:`_setCurvePoint`,value:function(e,t,n,r){if(e.length<=2)n[r]=e[0],n[r+1]=e[1];else{for(var i=Array(e.length-2),a=0;a<i.length;a+=2){var o=(1-t)*e[a]+t*e[a+2],s=(1-t)*e[a+1]+t*e[a+3];i[a]=o,i[a+1]=s}return this._setCurvePoint(i,t,n,r)}}},{key:`endBatch`,value:function(){var e=this.gl,t=this.vao,n=this.vertexCount,r=this.instanceCount;if(r!==0){var i=this.renderTarget.picking?this.pickingProgram:this.program;e.useProgram(i),e.bindVertexArray(t);var a=IN(this.buffers),o;try{for(a.s();!(o=a.n()).done;)o.value.bufferSubData(r)}catch(e){a.e(e)}finally{a.f()}for(var s=this.batchManager.getAtlases(),l=0;l<s.length;l++)s[l].bufferIfNeeded(e);for(var u=0;u<s.length;u++)e.activeTexture(e.TEXTURE0+u),e.bindTexture(e.TEXTURE_2D,s[u].texture),e.uniform1i(i.uTextures[u],u);e.uniform1f(i.uZoom,zGe(this.r)),e.uniformMatrix3fv(i.uPanZoomMatrix,!1,this.panZoomMatrix),e.uniform1i(i.uAtlasSize,this.batchManager.getAtlasSize());var d=_P(this.bgColor,1);e.uniform4fv(i.uBGColor,d),e.drawArraysInstanced(e.TRIANGLES,0,n,r),e.bindVertexArray(null),e.bindTexture(e.TEXTURE_2D,null),this.debug&&this.batchDebugInfo.push({count:r,atlasCount:s.length}),this.startBatch()}}},{key:`getDebugInfo`,value:function(){var e=this.atlasManager.getDebugInfo(),t=e.reduce(function(e,t){return e+t.atlasCount},0),n=this.batchDebugInfo,r=n.reduce(function(e,t){return e+t.count},0);return{atlasInfo:e,totalAtlases:t,wrappedCount:this.wrappedCount,simpleCount:this.simpleCount,batchCount:n.length,batchInfo:n,totalInstances:r}}}])}(),cQe={},cQe.initWebgl=function(e,t){var n=this,r=n.data.contexts[n.WEBGL];e.bgColor=nKe(n),e.webglTexSize=Math.min(e.webglTexSize,r.getParameter(r.MAX_TEXTURE_SIZE)),e.webglTexRows=Math.min(e.webglTexRows,54),e.webglTexRowsNodes=Math.min(e.webglTexRowsNodes,54),e.webglBatchSize=Math.min(e.webglBatchSize,16384),e.webglTexPerBatch=Math.min(e.webglTexPerBatch,r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS)),n.webglDebug=e.webglDebug,n.webglDebugShowAtlases=e.webglDebugShowAtlases,n.pickingFrameBuffer=XGe(r),n.pickingFrameBuffer.needsDraw=!0,n.drawing=new sQe(n,r,e);var i=function(e){return function(t){return n.getTextAngle(t,e)}},a=function(e){return function(t){var n=t.pstyle(e);return n&&n.value}},o=function(e){return function(t){return t.pstyle(`${e}-opacity`).value>0}},s=function(e){return e.pstyle(`text-events`).strValue===`yes`?MV.USE_BB:MV.IGNORE},l=function(e){var t=e.position(),n=t.x,r=t.y,i=e.outerWidth(),a=e.outerHeight();return{w:i,h:a,x1:n-i/2,y1:r-a/2}};n.drawing.addAtlasCollection(`node`,{texRows:e.webglTexRowsNodes}),n.drawing.addAtlasCollection(`label`,{texRows:e.webglTexRows}),n.drawing.addTextureAtlasRenderType(`node-body`,{collection:`node`,getKey:t.getStyleKey,getBoundingBox:t.getElementBox,drawElement:t.drawElement}),n.drawing.addSimpleShapeRenderType(`node-body`,{getBoundingBox:l,isSimple:VGe,shapeProps:{shape:`shape`,color:`background-color`,opacity:`background-opacity`,radius:`corner-radius`,border:!0}}),n.drawing.addSimpleShapeRenderType(`node-overlay`,{getBoundingBox:l,isVisible:o(`overlay`),shapeProps:{shape:`overlay-shape`,color:`overlay-color`,opacity:`overlay-opacity`,padding:`overlay-padding`,radius:`overlay-corner-radius`}}),n.drawing.addSimpleShapeRenderType(`node-underlay`,{getBoundingBox:l,isVisible:o(`underlay`),shapeProps:{shape:`underlay-shape`,color:`underlay-color`,opacity:`underlay-opacity`,padding:`underlay-padding`,radius:`underlay-corner-radius`}}),n.drawing.addTextureAtlasRenderType(`label`,{collection:`label`,getTexPickingMode:s,getKey:zV(t.getLabelKey,null),getBoundingBox:BV(t.getLabelBox,null),drawClipped:!0,drawElement:t.drawLabel,getRotation:i(null),getRotationPoint:t.getLabelRotationPoint,getRotationOffset:t.getLabelRotationOffset,isVisible:a(`label`)}),n.drawing.addTextureAtlasRenderType(`edge-source-label`,{collection:`label`,getTexPickingMode:s,getKey:zV(t.getSourceLabelKey,`source`),getBoundingBox:BV(t.getSourceLabelBox,`source`),drawClipped:!0,drawElement:t.drawSourceLabel,getRotation:i(`source`),getRotationPoint:t.getSourceLabelRotationPoint,getRotationOffset:t.getSourceLabelRotationOffset,isVisible:a(`source-label`)}),n.drawing.addTextureAtlasRenderType(`edge-target-label`,{collection:`label`,getTexPickingMode:s,getKey:zV(t.getTargetLabelKey,`target`),getBoundingBox:BV(t.getTargetLabelBox,`target`),drawClipped:!0,drawElement:t.drawTargetLabel,getRotation:i(`target`),getRotationPoint:t.getTargetLabelRotationPoint,getRotationOffset:t.getTargetLabelRotationOffset,isVisible:a(`target-label`)});var u=mF(function(){console.log(`garbage collect flag set`),n.data.gc=!0},1e4);n.onUpdateEleCalcs(function(e,t){var r=!1;t&&t.length>0&&(r|=n.drawing.invalidate(t)),r&&u()}),iKe(n)},zV=function(e,t){return function(n){var r=e(n),i=rKe(n,t);return i.length>1?i.map(function(e,t){return`${r}_${t}`}):r}},BV=function(e,t){return function(n,r){var i=e(n);if(typeof r==`string`){var a=r.indexOf(`_`);if(a>0){var o=Number(r.substring(a+1)),s=rKe(n,t),l=i.h/s.length,u=l*o,d=i.y1+u;return{x1:i.x1,w:i.w,y1:d,h:l,yOffset:u}}}return i}},VV={},VV.drawPolygonPath=function(e,t,n,r,i,a){var o=r/2,s=i/2;e.beginPath&&e.beginPath(),e.moveTo(t+o*a[0],n+s*a[1]);for(var l=1;l<a.length/2;l++)e.lineTo(t+o*a[l*2],n+s*a[l*2+1]);e.closePath()},VV.drawRoundPolygonPath=function(e,t,n,r,i,a,o){o.forEach(function(t){return EGe(e,t)}),e.closePath()},VV.drawRoundRectanglePath=function(e,t,n,r,i,a){var o=r/2,s=i/2,l=a===`auto`?LI(r,i):Math.min(a,s,o);e.beginPath&&e.beginPath(),e.moveTo(t,n-s),e.arcTo(t+o,n-s,t+o,n,l),e.arcTo(t+o,n+s,t,n+s,l),e.arcTo(t-o,n+s,t-o,n,l),e.arcTo(t-o,n-s,t,n-s,l),e.lineTo(t,n-s),e.closePath()},VV.drawBottomRoundRectanglePath=function(e,t,n,r,i,a){var o=r/2,s=i/2,l=a===`auto`?LI(r,i):a;e.beginPath&&e.beginPath(),e.moveTo(t,n-s),e.lineTo(t+o,n-s),e.lineTo(t+o,n),e.arcTo(t+o,n+s,t,n+s,l),e.arcTo(t-o,n+s,t-o,n,l),e.lineTo(t-o,n-s),e.lineTo(t,n-s),e.closePath()},VV.drawCutRectanglePath=function(e,t,n,r,i,a,o){var s=r/2,l=i/2,u=o===`auto`?zI():o;e.beginPath&&e.beginPath(),e.moveTo(t-s+u,n-l),e.lineTo(t+s-u,n-l),e.lineTo(t+s,n-l+u),e.lineTo(t+s,n+l-u),e.lineTo(t+s-u,n+l),e.lineTo(t-s+u,n+l),e.lineTo(t-s,n+l-u),e.lineTo(t-s,n-l+u),e.closePath()},VV.drawBarrelPath=function(e,t,n,r,i){var a=r/2,o=i/2,s=t-a,l=t+a,u=n-o,d=n+o,f=BI(r,i),p=f.widthOffset,m=f.heightOffset,h=f.ctrlPtOffsetPct*p;e.beginPath&&e.beginPath(),e.moveTo(s,u+m),e.lineTo(s,d-m),e.quadraticCurveTo(s+h,d,s+p,d),e.lineTo(l-p,d),e.quadraticCurveTo(l-h,d,l,d-m),e.lineTo(l,u+m),e.quadraticCurveTo(l-h,u,l-p,u),e.lineTo(s+p,u),e.quadraticCurveTo(s+h,u,s,u+m),e.closePath()},lQe=Math.sin(0),uQe=Math.cos(0),HV={},UV={},dQe=Math.PI/40,WV=0*Math.PI;WV<2*Math.PI;WV+=dQe)HV[WV]=Math.sin(WV),UV[WV]=Math.cos(WV);VV.drawEllipsePath=function(e,t,n,r,i){if(e.beginPath&&e.beginPath(),e.ellipse)e.ellipse(t,n,r/2,i/2,0,0,2*Math.PI);else for(var a,o,s=r/2,l=i/2,u=0*Math.PI;u<2*Math.PI;u+=dQe)a=t-s*HV[u]*lQe+s*UV[u]*uQe,o=n+l*UV[u]*lQe+l*HV[u]*uQe,u===0?e.moveTo(a,o):e.lineTo(a,o);e.closePath()},GV={},GV.createBuffer=function(e,t){var n=document.createElement(`canvas`);return n.width=e,n.height=t,[n,n.getContext(`2d`)]},GV.bufferCanvasImage=function(e){var t=this.cy,n=t.mutableElements().boundingBox(),r=this.findContainerClientCoords(),i=e.full?Math.ceil(n.w):r[2],a=e.full?Math.ceil(n.h):r[3],o=MP(e.maxWidth)||MP(e.maxHeight),s=this.getPixelRatio(),l=1;if(e.scale!==void 0)i*=e.scale,a*=e.scale,l=e.scale;else if(o){var u=1/0,d=1/0;MP(e.maxWidth)&&(u=l*e.maxWidth/i),MP(e.maxHeight)&&(d=l*e.maxHeight/a),l=Math.min(u,d),i*=l,a*=l}o||(i*=s,a*=s,l*=s);var f=document.createElement(`canvas`);f.width=i,f.height=a,f.style.width=i+`px`,f.style.height=a+`px`;var p=f.getContext(`2d`);if(i>0&&a>0){p.clearRect(0,0,i,a),p.globalCompositeOperation=`source-over`;var m=this.getCachedZSortedEles();if(e.full)p.translate(-n.x1*l,-n.y1*l),p.scale(l,l),this.drawElements(p,m),p.scale(1/l,1/l),p.translate(n.x1*l,n.y1*l);else{var h=t.pan(),g={x:h.x*l,y:h.y*l};l*=t.zoom(),p.translate(g.x,g.y),p.scale(l,l),this.drawElements(p,m),p.scale(1/l,1/l),p.translate(-g.x,-g.y)}e.bg&&(p.globalCompositeOperation=`destination-over`,p.fillStyle=e.bg,p.rect(0,0,i,a),p.fill())}return f},GV.png=function(e){return _Ke(e,this.bufferCanvasImage(e),`image/png`)},GV.jpg=function(e){return _Ke(e,this.bufferCanvasImage(e),`image/jpeg`)},fQe={},fQe.nodeShapeImpl=function(e,t,n,r,i,a,o,s){switch(e){case`ellipse`:return this.drawEllipsePath(t,n,r,i,a);case`polygon`:return this.drawPolygonPath(t,n,r,i,a,o);case`round-polygon`:return this.drawRoundPolygonPath(t,n,r,i,a,o,s);case`roundrectangle`:case`round-rectangle`:return this.drawRoundRectanglePath(t,n,r,i,a,s);case`cutrectangle`:case`cut-rectangle`:return this.drawCutRectanglePath(t,n,r,i,a,o,s);case`bottomroundrectangle`:case`bottom-round-rectangle`:return this.drawBottomRoundRectanglePath(t,n,r,i,a,s);case`barrel`:return this.drawBarrelPath(t,n,r,i,a)}},pQe=vKe,KV=vKe.prototype,KV.CANVAS_LAYERS=3,KV.SELECT_BOX=0,KV.DRAG=1,KV.NODE=2,KV.WEBGL=3,KV.CANVAS_TYPES=[`2d`,`2d`,`2d`,`webgl2`],KV.BUFFER_COUNT=3,KV.TEXTURE_BUFFER=0,KV.MOTIONBLUR_BUFFER_NODE=1,KV.MOTIONBLUR_BUFFER_DRAG=2,KV.redrawHint=function(e,t){var n=this;switch(e){case`eles`:n.data.canvasNeedsRedraw[KV.NODE]=t;break;case`drag`:n.data.canvasNeedsRedraw[KV.DRAG]=t;break;case`select`:n.data.canvasNeedsRedraw[KV.SELECT_BOX]=t;break;case`gc`:n.data.gc=!0}},mQe=typeof Path2D<`u`,KV.path2dEnabled=function(e){if(e===void 0)return this.pathsEnabled;this.pathsEnabled=!!e},KV.usePaths=function(){return mQe&&this.pathsEnabled},KV.setImgSmoothing=function(e,t){e.imageSmoothingEnabled==null?(e.webkitImageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t):e.imageSmoothingEnabled=t},KV.getImgSmoothing=function(e){return e.imageSmoothingEnabled==null?e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled:e.imageSmoothingEnabled},KV.makeOffscreenCanvas=function(e,t){var n;return(typeof OffscreenCanvas>`u`?`undefined`:zN(OffscreenCanvas))===`undefined`?(n=this.cy.window().document.createElement(`canvas`),n.width=e,n.height=t):n=new OffscreenCanvas(e,t),n},[bV,xV,CV,TV,EV,DV,kV,cQe,VV,GV,fQe].forEach(function(e){YP(KV,e)}),hQe=[{type:`layout`,extensions:rZe},{type:`renderer`,extensions:[{name:`null`,impl:TGe},{name:`base`,impl:tV},{name:`canvas`,impl:pQe}]}],qV={},gQe={},JV=function(){if(arguments.length===2)return bKe.apply(null,arguments);if(arguments.length===3)return yKe.apply(null,arguments);if(arguments.length===4)return SKe.apply(null,arguments);if(arguments.length===5)return xKe.apply(null,arguments);IF(`Invalid extension access syntax`)},sB.prototype.extension=JV,hQe.forEach(function(e){e.extensions.forEach(function(t){yKe(e.type,t.name,t.impl)})}),YV=function(){if(!(this instanceof YV))return new YV;this.length=0},XV=YV.prototype,XV.instanceString=function(){return`stylesheet`},XV.selector=function(e){var t=this.length++;return this[t]={selector:e,properties:[]},this},XV.css=function(e,t){var n=this.length-1;if(OP(e))this[n].properties.push({name:e,value:t});else if(jP(e))for(var r=e,i=Object.keys(r),a=0;a<i.length;a++){var o=i[a],s=r[o];if(s!=null){var l=rB.properties[o]||rB.properties[UP(o)];if(l!=null){var u=l.name,d=s;this[n].properties.push({name:u,value:d})}}}return this},XV.style=XV.css,XV.generateStyle=function(e){var t=new rB(e);return this.appendToStyle(t)},XV.appendToStyle=function(e){for(var t=0;t<this.length;t++){var n=this[t],r=n.selector,i=n.properties;e.selector(r);for(var a=0;a<i.length;a++){var o=i[a];e.css(o.name,o.value)}}return e},_Qe=`3.34.2`,ZV=function(e){if(e===void 0&&(e={}),jP(e))return new sB(e);if(OP(e))return JV.apply(JV,arguments)},ZV.use=function(e){var t=Array.prototype.slice.call(arguments,1);return t.unshift(ZV),e.apply(null,t),this},ZV.warnings=function(e){return LF(e)},ZV.version=_Qe,ZV.stylesheet=ZV.Stylesheet=YV})),yQe=s(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.layoutBase=r():n.layoutBase=r()})(e,function(){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=26)})([(function(e,t,n){function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,e.exports=r}),(function(e,t,n){var r=n(2),i=n(8),a=n(9);function o(e,t,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw`Node is not incident with this edge`},o.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=[,,,,];this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o}),(function(e,t,n){function r(e){this.vGraphObject=e}e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(13),o=n(0),s=n(16),l=n(4);function u(e,t,n,o){n==null&&o==null&&(o=t),r.call(this,o),e.graphManager!=null&&(e=e.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=o,this.edges=[],this.graphManager=e,this.rect=n!=null&&t!=null?new a(t.x,t.y,n.width,n.height):new a}for(var d in u.prototype=Object.create(r.prototype),r)u[d]=r[d];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(e){this.rect.width=e},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(e){this.rect.height=e},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},u.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},u.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},u.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},u.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.target==e){if(r.source!=n)throw`Incorrect edge source!`;t.push(r)}}),t},u.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.source!=n&&r.target!=n)throw`Incorrect edge source and/or target`;(r.target==e||r.source==e)&&t.push(r)}),t},u.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach(function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw`Incorrect incidency!`;e.add(n.source)}}),e},u.prototype.withChildren=function(){var e=new Set,t,n;if(e.add(this),this.child!=null)for(var r=this.child.getNodes(),i=0;i<r.length;i++)t=r[i],n=t.withChildren(),n.forEach(function(t){e.add(t)});return e},u.prototype.getNoOfChildren=function(){var e=0,t;if(this.child==null)e=1;else for(var n=this.child.getNodes(),r=0;r<n.length;r++)t=n[r],e+=t.getNoOfChildren();return e==0&&(e=1),e},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw`assert failed`;return this.estimatedSize},u.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},u.prototype.scatter=function(){var e,t,n=-o.INITIAL_WORLD_BOUNDARY,r=o.INITIAL_WORLD_BOUNDARY;e=o.WORLD_CENTER_X+s.nextDouble()*(r-n)+n;var i=-o.INITIAL_WORLD_BOUNDARY,a=o.INITIAL_WORLD_BOUNDARY;t=o.WORLD_CENTER_Y+s.nextDouble()*(a-i)+i,this.rect.x=e,this.rect.y=t},u.prototype.updateBounds=function(){if(this.getChild()==null)throw`assert failed`;if(this.getChild().getNodes().length!=0){var e=this.getChild();if(e.updateBounds(!0),this.rect.x=e.getLeft(),this.rect.y=e.getTop(),this.setWidth(e.getRight()-e.getLeft()),this.setHeight(e.getBottom()-e.getTop()),o.NODE_DIMENSIONS_INCLUDE_LABELS){var t=e.getRight()-e.getLeft(),n=e.getBottom()-e.getTop();this.labelWidth>t&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&(this.labelPos==`center`?this.rect.y-=(this.labelHeight-n)/2:this.labelPos==`top`&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw`assert failed`;return this.inclusionTreeDepth},u.prototype.transform=function(e){var t=this.rect.x;t>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY);var n=this.rect.y;n>o.WORLD_BOUNDARY?n=o.WORLD_BOUNDARY:n<-o.WORLD_BOUNDARY&&(n=-o.WORLD_BOUNDARY);var r=new l(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=u}),(function(e,t,n){function r(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(0),o=n(6),s=n(3),l=n(1),u=n(13),d=n(12),f=n(11);function p(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,t!=null&&t instanceof o?this.graphManager=t:t!=null&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var m in p.prototype=Object.create(r.prototype),r)p[m]=r[m];p.prototype.getNodes=function(){return this.nodes},p.prototype.getEdges=function(){return this.edges},p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getParent=function(){return this.parent},p.prototype.getLeft=function(){return this.left},p.prototype.getRight=function(){return this.right},p.prototype.getTop=function(){return this.top},p.prototype.getBottom=function(){return this.bottom},p.prototype.isConnected=function(){return this.isConnected},p.prototype.add=function(e,t,n){if(t==null&&n==null){var r=e;if(this.graphManager==null)throw`Graph has no graph mgr!`;if(this.getNodes().indexOf(r)>-1)throw`Node already in graph!`;return r.owner=this,this.getNodes().push(r),r}var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw`Source or target not in graph!`;if(t.owner!=n.owner||t.owner!=this)throw`Both owners must be this graph!`;return t.owner==n.owner?(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i):null},p.prototype.remove=function(e){var t=e;if(e instanceof s){if(t==null)throw`Node is null!`;if(t.owner==null||t.owner!=this)throw`Owner graph is invalid!`;if(this.graphManager==null)throw`Owner graph manager is invalid!`;for(var n=t.edges.slice(),r,i=n.length,a=0;a<i;a++)r=n[a],r.isInterGraph?this.graphManager.remove(r):r.source.owner.remove(r);var o=this.nodes.indexOf(t);if(o==-1)throw`Node not in owner node list!`;this.nodes.splice(o,1)}else if(e instanceof l){var r=e;if(r==null)throw`Edge is null!`;if(r.source==null||r.target==null)throw`Source and/or target is null!`;if(r.source.owner==null||r.target.owner==null||r.source.owner!=this||r.target.owner!=this)throw`Source and/or target owner is invalid!`;var u=r.source.edges.indexOf(r),d=r.target.edges.indexOf(r);if(!(u>-1&&d>-1))throw`Source and/or target doesn't know this edge!`;r.source.edges.splice(u,1),r.target!=r.source&&r.target.edges.splice(d,1);var o=r.source.owner.getEdges().indexOf(r);if(o==-1)throw`Not in owner's edge list!`;r.source.owner.getEdges().splice(o,1)}},p.prototype.updateLeftTop=function(){for(var e=i.MAX_VALUE,t=i.MAX_VALUE,n,r,a,o=this.getNodes(),s=o.length,l=0;l<s;l++){var u=o[l];n=u.getTop(),r=u.getLeft(),e>n&&(e=n),t>r&&(t=r)}return e==i.MAX_VALUE?null:(a=o[0].getParent().paddingLeft==null?this.margin:o[0].getParent().paddingLeft,this.left=t-a,this.top=e-a,new d(this.left,this.top))},p.prototype.updateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,l,d,f,p=this.nodes,m=p.length,h=0;h<m;h++){var g=p[h];e&&g.child!=null&&g.updateBounds(),o=g.getLeft(),s=g.getRight(),l=g.getTop(),d=g.getBottom(),t>o&&(t=o),n<s&&(n=s),r>l&&(r=l),a<d&&(a=d)}var _=new u(t,r,n-t,a-r);t==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),f=p[0].getParent().paddingLeft==null?this.margin:p[0].getParent().paddingLeft,this.left=_.x-f,this.right=_.x+_.width+f,this.top=_.y-f,this.bottom=_.y+_.height+f},p.calculateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,l,d,f=e.length,p=0;p<f;p++){var m=e[p];o=m.getLeft(),s=m.getRight(),l=m.getTop(),d=m.getBottom(),t>o&&(t=o),n<s&&(n=s),r>l&&(r=l),a<d&&(a=d)}return new u(t,r,n-t,a-r)},p.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},p.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw`assert failed`;return this.estimatedSize},p.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,n=t.length,r=0;r<n;r++){var i=t[r];e+=i.calcEstimatedSize()}return this.estimatedSize=e==0?a.EMPTY_COMPOUND_NODE_SIZE:e/Math.sqrt(this.nodes.length),this.estimatedSize},p.prototype.updateConnected=function(){var e=this;if(this.nodes.length==0){this.isConnected=!0;return}var t=new f,n=new Set,r=this.nodes[0],i,a;for(r.withChildren().forEach(function(e){t.push(e),n.add(e)});t.length!==0;){r=t.shift(),i=r.getEdges();for(var o=i.length,s=0;s<o;s++)a=i[s].getOtherEndInGraph(r,this),a!=null&&!n.has(a)&&a.withChildren().forEach(function(e){t.push(e),n.add(e)})}if(this.isConnected=!1,n.size>=this.nodes.length){var l=0;n.forEach(function(t){t.owner==e&&l++}),l==this.nodes.length&&(this.isConnected=!0)}},e.exports=p}),(function(e,t,n){var r,i=n(1);function a(e){r=n(5),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(e,t,n,r,i){if(n==null&&r==null&&i==null){if(e==null)throw`Graph is null!`;if(t==null)throw`Parent node is null!`;if(this.graphs.indexOf(e)>-1)throw`Graph already in this graph mgr!`;if(this.graphs.push(e),e.parent!=null)throw`Already has a parent!`;if(t.child!=null)throw`Already has a child!`;return e.parent=t,t.child=e,e}i=n,r=t,n=e;var a=r.getOwner(),o=i.getOwner();if(a==null||a.getGraphManager()!=this)throw`Source not in this graph mgr!`;if(o==null||o.getGraphManager()!=this)throw`Target not in this graph mgr!`;if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw`Edge already in inter-graph edge list!`;if(this.edges.push(n),n.source==null||n.target==null)throw`Edge source and/or target is null!`;if(n.source.edges.indexOf(n)!=-1||n.target.edges.indexOf(n)!=-1)throw`Edge already in source and/or target incidency list!`;return n.source.edges.push(n),n.target.edges.push(n),n},a.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw`Graph not in this graph mgr`;if(!(t==this.rootGraph||t.parent!=null&&t.parent.graphManager==this))throw`Invalid parent node!`;var n=[];n=n.concat(t.getEdges());for(var a,o=n.length,s=0;s<o;s++)a=n[s],t.remove(a);var l=[];l=l.concat(t.getNodes());var u;o=l.length;for(var s=0;s<o;s++)u=l[s],t.remove(u);t==this.rootGraph&&this.setRootGraph(null);var d=this.graphs.indexOf(t);this.graphs.splice(d,1),t.parent=null}else if(e instanceof i){if(a=e,a==null)throw`Edge is null!`;if(!a.isInterGraph)throw`Not an inter-graph edge!`;if(a.source==null||a.target==null)throw`Source and/or target is null!`;if(a.source.edges.indexOf(a)==-1||a.target.edges.indexOf(a)==-1)throw`Source and/or target doesn't know this edge!`;var d=a.source.edges.indexOf(a);if(a.source.edges.splice(d,1),d=a.target.edges.indexOf(a),a.target.edges.splice(d,1),a.source.owner==null||a.source.owner.getGraphManager()==null)throw`Edge owner graph or owner graph manager is null!`;if(a.source.owner.getGraphManager().edges.indexOf(a)==-1)throw`Not in owner graph manager's edge list!`;var d=a.source.owner.getGraphManager().edges.indexOf(a);a.source.owner.getGraphManager().edges.splice(d,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],t=this.getGraphs(),n=t.length,r=0;r<n;r++)e=e.concat(t[r].getNodes());this.allNodes=e}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],t=this.getGraphs();t.length;for(var n=0;n<t.length;n++)e=e.concat(t[n].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw`assert failed`;this.allNodesToApplyGravitation=e},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw`Root not in this graph mgr!`;this.rootGraph=e,e.parent??=this.layout.newNode(`Root node`)},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(e,t){if(e==null||t==null)throw`assert failed`;if(e==t)return!0;var n=e.getOwner(),r;do{if(r=n.getParent(),r==null)break;if(r==t)return!0;if(n=r.getOwner(),n==null)break}while(1);n=t.getOwner();do{if(r=n.getParent(),r==null)break;if(r==e)return!0;if(n=r.getOwner(),n==null)break}while(1);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var e,t,n,r,i,a=this.getAllEdges(),o=a.length,s=0;s<o;s++){if(e=a[s],t=e.source,n=e.target,e.lca=null,e.sourceInLca=t,e.targetInLca=n,t==n){e.lca=t.getOwner();continue}for(r=t.getOwner();e.lca==null;){for(e.targetInLca=n,i=n.getOwner();e.lca==null;){if(i==r){e.lca=i;break}if(i==this.rootGraph)break;if(e.lca!=null)throw`assert failed`;e.targetInLca=i.getParent(),i=e.targetInLca.getOwner()}if(r==this.rootGraph)break;e.lca??(e.sourceInLca=r.getParent(),r=e.sourceInLca.getOwner())}if(e.lca==null)throw`assert failed`}},a.prototype.calcLowestCommonAncestor=function(e,t){if(e==t)return e.getOwner();var n=e.getOwner();do{if(n==null)break;var r=t.getOwner();do{if(r==null)break;if(r==n)return r;r=r.getParent().getOwner()}while(1);n=n.getParent().getOwner()}while(1);return n},a.prototype.calcInclusionTreeDepths=function(e,t){e==null&&t==null&&(e=this.rootGraph,t=1);for(var n,r=e.getNodes(),i=r.length,a=0;a<i;a++)n=r[a],n.inclusionTreeDepth=t,n.child!=null&&this.calcInclusionTreeDepths(n.child,t+1)},a.prototype.includesInvalidEdge=function(){for(var e,t=this.edges.length,n=0;n<t;n++)if(e=this.edges[n],this.isOneAncestorOfOther(e.source,e.target))return!0;return!1},e.exports=a}),(function(e,t,n){var r=n(0);function i(){}for(var a in r)i[a]=r[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=i}),(function(e,t,n){var r=n(12);function i(){}i.calcSeparationAmount=function(e,t,n,r){if(!e.intersects(t))throw`assert failed`;var i=[,,];this.decideDirectionsForOverlappingNodes(e,t,i),n[0]=Math.min(e.getRight(),t.getRight())-Math.max(e.x,t.x),n[1]=Math.min(e.getBottom(),t.getBottom())-Math.max(e.y,t.y),e.getX()<=t.getX()&&e.getRight()>=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]<s?s=n[0]:o=n[1],n[0]=-1*i[0]*(s/2+r),n[1]=-1*i[1]*(o/2+r)},i.decideDirectionsForOverlappingNodes=function(e,t,n){n[0]=e.getCenterX()<t.getCenterX()?-1:1,n[1]=e.getCenterY()<t.getCenterY()?-1:1},i.getIntersection2=function(e,t,n){var r=e.getCenterX(),i=e.getCenterY(),a=t.getCenterX(),o=t.getCenterY();if(e.intersects(t))return n[0]=r,n[1]=i,n[2]=a,n[3]=o,!0;var s=e.getX(),l=e.getY(),u=e.getRight(),d=e.getX(),f=e.getBottom(),p=e.getRight(),m=e.getWidthHalf(),h=e.getHeightHalf(),g=t.getX(),_=t.getY(),v=t.getRight(),y=t.getX(),b=t.getBottom(),x=t.getRight(),S=t.getWidthHalf(),C=t.getHeightHalf(),w=!1,T=!1;if(r===a){if(i>o)return n[0]=r,n[1]=l,n[2]=a,n[3]=b,!1;if(i<o)return n[0]=r,n[1]=f,n[2]=a,n[3]=_,!1}else if(i===o){if(r>a)return n[0]=s,n[1]=i,n[2]=v,n[3]=o,!1;if(r<a)return n[0]=u,n[1]=i,n[2]=g,n[3]=o,!1}else{var E=e.height/e.width,D=t.height/t.width,O=(o-i)/(a-r),k=void 0,A=void 0,j=void 0,M=void 0,N=void 0,P=void 0;if(-E===O?r>a?(n[0]=d,n[1]=f,w=!0):(n[0]=u,n[1]=l,w=!0):E===O&&(r>a?(n[0]=s,n[1]=l,w=!0):(n[0]=p,n[1]=f,w=!0)),-D===O?a>r?(n[2]=y,n[3]=b,T=!0):(n[2]=v,n[3]=_,T=!0):D===O&&(a>r?(n[2]=g,n[3]=_,T=!0):(n[2]=x,n[3]=b,T=!0)),w&&T)return!1;if(r>a?i>o?(k=this.getCardinalDirection(E,O,4),A=this.getCardinalDirection(D,O,2)):(k=this.getCardinalDirection(-E,O,3),A=this.getCardinalDirection(-D,O,1)):i>o?(k=this.getCardinalDirection(-E,O,1),A=this.getCardinalDirection(-D,O,3)):(k=this.getCardinalDirection(E,O,2),A=this.getCardinalDirection(D,O,4)),!w)switch(k){case 1:M=l,j=r+-h/O,n[0]=j,n[1]=M;break;case 2:j=p,M=i+m*O,n[0]=j,n[1]=M;break;case 3:M=f,j=r+h/O,n[0]=j,n[1]=M;break;case 4:j=d,M=i+-m*O,n[0]=j,n[1]=M}if(!T)switch(A){case 1:P=_,N=a+-C/O,n[2]=N,n[3]=P;break;case 2:N=x,P=o+S*O,n[2]=N,n[3]=P;break;case 3:P=b,N=a+C/O,n[2]=N,n[3]=P;break;case 4:N=y,P=o+-S*O,n[2]=N,n[3]=P}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(i==null)return this.getIntersection2(e,t,n);var a=e.x,o=e.y,s=t.x,l=t.y,u=n.x,d=n.y,f=i.x,p=i.y,m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0;return g=l-o,v=a-s,b=s*o-a*l,_=p-d,y=u-f,x=f*d-u*p,S=g*y-_*v,S===0?null:(m=(v*x-y*b)/S,h=(_*b-g*x)/S,new r(m,h))},i.angleOfVector=function(e,t,n,r){var i=void 0;return e===n?i=r<t?this.ONE_AND_HALF_PI:this.HALF_PI:(i=Math.atan((r-t)/(n-e)),n<e?i+=Math.PI:r<t&&(i+=this.TWO_PI)),i},i.doIntersect=function(e,t,n,r){var i=e.x,a=e.y,o=t.x,s=t.y,l=n.x,u=n.y,d=r.x,f=r.y,p=(o-i)*(f-u)-(d-l)*(s-a);if(p===0)return!1;var m=((f-u)*(d-i)+(l-d)*(f-a))/p,h=((a-s)*(d-i)+(o-i)*(f-a))/p;return 0<m&&m<1&&0<h&&h<1},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i}),(function(e,t,n){function r(){}r.sign=function(e){return e>0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r}),(function(e,t,n){function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var a=function(e){return{value:e,next:null,prev:null}},o=function(e,t,n,r){return e===null?r.head=t:e.next=t,n===null?r.tail=t:n.prev=t,t.prev=e,t.next=n,r.length++,t},s=function(e,t){var n=e.prev,r=e.next;return n===null?t.head=r:n.next=r,r===null?t.tail=n:r.prev=n,e.prev=e.next=null,t.length--,e};e.exports=function(){function e(t){var n=this;i(this,e),this.length=0,this.head=null,this.tail=null,t?.forEach(function(e){return n.push(e)})}return r(e,[{key:`size`,value:function(){return this.length}},{key:`insertBefore`,value:function(e,t){return o(t.prev,a(e),t,this)}},{key:`insertAfter`,value:function(e,t){return o(t,a(e),t.next,this)}},{key:`insertNodeBefore`,value:function(e,t){return o(t.prev,e,t,this)}},{key:`insertNodeAfter`,value:function(e,t){return o(t,e,t.next,this)}},{key:`push`,value:function(e){return o(this.tail,a(e),null,this)}},{key:`unshift`,value:function(e){return o(null,a(e),this.head,this)}},{key:`remove`,value:function(e){return s(e,this)}},{key:`pop`,value:function(){return s(this.tail,this).value}},{key:`popNode`,value:function(){return s(this.tail,this)}},{key:`shift`,value:function(){return s(this.head,this).value}},{key:`shiftNode`,value:function(){return s(this.head,this)}},{key:`get_object_at`,value:function(e){if(e<=this.length()){for(var t=1,n=this.head;t<e;)n=n.next,t++;return n.value}}},{key:`set_object_at`,value:function(e,t){if(e<=this.length()){for(var n=1,r=this.head;n<e;)r=r.next,n++;r.value=t}}}]),e}()}),(function(e,t,n){function r(e,t,n){this.x=null,this.y=null,e==null&&t==null&&n==null?(this.x=0,this.y=0):typeof e==`number`&&typeof t==`number`&&n==null?(this.x=e,this.y=t):e.constructor.name==`Point`&&t==null&&n==null&&(n=e,this.x=n.x,this.y=n.y)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.getLocation=function(){return new r(this.x,this.y)},r.prototype.setLocation=function(e,t,n){e.constructor.name==`Point`&&t==null&&n==null?(n=e,this.setLocation(n.x,n.y)):typeof e==`number`&&typeof t==`number`&&n==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},r.prototype.move=function(e,t){this.x=e,this.y=t},r.prototype.translate=function(e,t){this.x+=e,this.y+=t},r.prototype.equals=function(e){if(e.constructor.name==`Point`){var t=e;return this.x==t.x&&this.y==t.y}return this==e},r.prototype.toString=function(){return new r().constructor.name+`[x=`+this.x+`,y=`+this.y+`]`},e.exports=r}),(function(e,t,n){function r(e,t,n,r){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&n!=null&&r!=null&&(this.x=e,this.y=t,this.width=n,this.height=r)}r.prototype.getX=function(){return this.x},r.prototype.setX=function(e){this.x=e},r.prototype.getY=function(){return this.y},r.prototype.setY=function(e){this.y=e},r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(e){this.width=e},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(e){this.height=e},r.prototype.getRight=function(){return this.x+this.width},r.prototype.getBottom=function(){return this.y+this.height},r.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},r.prototype.getCenterX=function(){return this.x+this.width/2},r.prototype.getMinX=function(){return this.getX()},r.prototype.getMaxX=function(){return this.getX()+this.width},r.prototype.getCenterY=function(){return this.y+this.height/2},r.prototype.getMinY=function(){return this.getY()},r.prototype.getMaxY=function(){return this.getY()+this.height},r.prototype.getWidthHalf=function(){return this.width/2},r.prototype.getHeightHalf=function(){return this.height/2},e.exports=r}),(function(e,t,n){var r=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e};function i(){}i.lastID=0,i.createID=function(e){return i.isPrimitive(e)?e:e.uniqueID==null?(e.uniqueID=i.getString(),i.lastID++,e.uniqueID):e.uniqueID},i.getString=function(e){return e??=i.lastID,`Object#`+e},i.isPrimitive=function(e){var t=e===void 0?`undefined`:r(e);return e==null||t!=`object`&&t!=`function`},e.exports=i}),(function(e,t,n){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var i=n(0),a=n(6),o=n(3),s=n(1),l=n(5),u=n(4),d=n(17),f=n(27);function p(e){f.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,e!=null&&(this.isRemoteUse=e)}p.RANDOM_SEED=1,p.prototype=Object.create(f.prototype),p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},p.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},p.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},p.prototype.newGraphManager=function(){var e=new a(this);return this.graphManager=e,e},p.prototype.newGraph=function(e){return new l(null,this.graphManager,e)},p.prototype.newNode=function(e){return new o(this.graphManager,e)},p.prototype.newEdge=function(e){return new s(null,null,e)},p.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},p.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var e=!this.checkLayoutSuccess()&&this.layout();return i.ANIMATE!==`during`&&(e&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,e)},p.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},p.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var e=this.graphManager.getAllEdges(),t=0;t<e.length;t++)e[t];for(var n=this.graphManager.getRoot().getNodes(),t=0;t<n.length;t++)n[t];this.update(this.graphManager.getRoot())}},p.prototype.update=function(e){if(e==null)this.update2();else if(e instanceof o){var t=e;if(t.getChild()!=null)for(var n=t.getChild().getNodes(),r=0;r<n.length;r++)update(n[r]);t.vGraphObject!=null&&t.vGraphObject.update(t)}else if(e instanceof s){var i=e;i.vGraphObject!=null&&i.vGraphObject.update(i)}else if(e instanceof l){var a=e;a.vGraphObject!=null&&a.vGraphObject.update(a)}},p.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},p.prototype.transform=function(e){if(e==null)this.transform(new u(0,0));else{var t=new d,n=this.graphManager.getRoot().updateLeftTop();if(n!=null){t.setWorldOrgX(e.x),t.setWorldOrgY(e.y),t.setDeviceOrgX(n.x),t.setDeviceOrgY(n.y);for(var r=this.getAllNodes(),i,a=0;a<r.length;a++)i=r[a],i.transform(t)}}},p.prototype.positionNodesRandomly=function(e){if(e==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var t,n,r=e.getNodes(),i=0;i<r.length;i++)t=r[i],n=t.getChild(),n==null||n.getNodes().length==0?t.scatter():(this.positionNodesRandomly(n),t.updateBounds())},p.prototype.getFlatForest=function(){for(var e=[],t=!0,n=this.graphManager.getRoot().getNodes(),i=!0,a=0;a<n.length;a++)n[a].getChild()!=null&&(i=!1);if(!i)return e;var o=new Set,s=[],l=new Map,u=[];for(u=u.concat(n);u.length>0&&t;){for(s.push(u[0]);s.length>0&&t;){var d=s[0];s.splice(0,1),o.add(d);for(var f=d.getEdges(),a=0;a<f.length;a++){var p=f[a].getOtherEnd(d);if(l.get(d)!=p){if(!o.has(p))s.push(p),l.set(p,d);else{t=!1;break}}}}if(!t)e=[];else{var m=[].concat(r(o));e.push(m);for(var a=0;a<m.length;a++){var h=m[a],g=u.indexOf(h);g>-1&&u.splice(g,1)}o=new Set,l=new Map}}return e},p.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i<e.bendpoints.length;i++){var a=this.newNode(null);a.setRect(new Point(0,0),new Dimension(1,1)),r.add(a);var o=this.newEdge(null);this.graphManager.add(o,n,a),t.add(a),n=a}var o=this.newEdge(null);return this.graphManager.add(o,n,e.target),this.edgeToDummyNodes.set(e,t),e.isInterGraph()?this.graphManager.remove(e):r.remove(e),t},p.prototype.createBendpointsFromDummyNodes=function(){var e=[];e=e.concat(this.graphManager.getAllEdges()),e=[].concat(r(this.edgeToDummyNodes.keys()),e);for(var t=0;t<e.length;t++){var n=e[t];if(n.bendpoints.length>0){for(var i=this.edgeToDummyNodes.get(n),a=0;a<i.length;a++){var o=i[a],s=new u(o.getCenterX(),o.getCenterY()),l=n.bendpoints.get(a);l.x=s.x,l.y=s.y,o.getOwner().remove(o)}this.graphManager.add(n,n.source,n.target)}}},p.transform=function(e,t,n,r){if(n!=null&&r!=null){var i=t;if(e<=50){var a=t/n;i-=(t-a)/50*(50-e)}else{var o=t*r;i+=(o-t)/50*(e-50)}return i}var s,l;return e<=50?(s=9*t/500,l=t/10):(s=9*t/50,l=-8*t),s*e+l},p.findCenterOfTree=function(e){var t=[];t=t.concat(e);var n=[],r=new Map,i=!1,a=null;(t.length==1||t.length==2)&&(i=!0,a=t[0]);for(var o=0;o<t.length;o++){var s=t[o],l=s.getNeighborsList().size;r.set(s,s.getNeighborsList().size),l==1&&n.push(s)}var u=[];for(u=u.concat(n);!i;){var d=[];d=d.concat(u),u=[];for(var o=0;o<t.length;o++){var s=t[o],f=t.indexOf(s);f>=0&&t.splice(f,1),s.getNeighborsList().forEach(function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;t==1&&u.push(e),r.set(e,t)}})}n=n.concat(u),(t.length==1||t.length==2)&&(i=!0,a=t[0])}return a},p.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=p}),(function(e,t,n){function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=Math.sin(r.seed++)*1e4,r.x-Math.floor(r.x)},e.exports=r}),(function(e,t,n){var r=n(4);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return n!=0&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return n!=0&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return n!=0&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return n!=0&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i}),(function(e,t,n){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var i=n(15),a=n(7),o=n(0),s=n(8),l=n(9);function u(){i.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=a.DEFAULT_EDGE_LENGTH,this.springConstant=a.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=a.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}for(var d in u.prototype=Object.create(i.prototype),i)u[d]=i[d];u.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},u.prototype.calcIdealEdgeLengths=function(){for(var e,t,n,r,i,s,l=this.getGraphManager().getAllEdges(),u=0;u<l.length;u++)e=l[u],e.idealLength=this.idealEdgeLength,e.isInterGraph&&(n=e.getSource(),r=e.getTarget(),i=e.getSourceInLca().getEstimatedSize(),s=e.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(e.idealLength+=i+s-2*o.SIMPLE_NODE_SIZE),t=e.getLca().getInclusionTreeDepth(),e.idealLength+=a.DEFAULT_EDGE_LENGTH*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(n.getInclusionTreeDepth()+r.getInclusionTreeDepth()-2*t))},u.prototype.initSpringEmbedder=function(){var e=this.getAllNodes().length;this.incremental?(e>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(this.coolingFactor=e>a.ADAPTATION_LOWER_NODE_LIMIT?Math.max(a.COOLING_ADAPTATION_FACTOR,1-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var e=this.getAllEdges(),t,n=0;n<e.length;n++)t=e[n],this.calcSpringForce(t,t.idealLength)},u.prototype.calcRepulsionForces=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n,r,i,o,s=this.getAllNodes(),l;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&e&&this.updateGrid(),l=new Set,n=0;n<s.length;n++)i=s[n],this.calculateRepulsionForceOfANode(i,l,e,t),l.add(i);else for(n=0;n<s.length;n++)for(i=s[n],r=n+1;r<s.length;r++)o=s[r],i.getOwner()==o.getOwner()&&this.calcRepulsionForce(i,o)},u.prototype.calcGravitationalForces=function(){for(var e,t=this.getAllNodesToApplyGravitation(),n=0;n<t.length;n++)e=t[n],this.calcGravitationalForce(e)},u.prototype.moveNodes=function(){for(var e=this.getAllNodes(),t,n=0;n<e.length;n++)t=e[n],t.move()},u.prototype.calcSpringForce=function(e,t){var n=e.getSource(),r=e.getTarget(),i,a,o,s;if(this.uniformLeafNodeSizes&&n.getChild()==null&&r.getChild()==null)e.updateLengthSimple();else if(e.updateLength(),e.isOverlapingSourceAndTarget)return;i=e.getLength(),i!=0&&(a=this.springConstant*(i-t),o=a*(e.lengthX/i),s=a*(e.lengthY/i),n.springForceX+=o,n.springForceY+=s,r.springForceX-=o,r.springForceY-=s)},u.prototype.calcRepulsionForce=function(e,t){var n=e.getRect(),r=t.getRect(),i=[,,],o=[,,,,],u,d,f,p,m,h,g;if(n.intersects(r)){s.calcSeparationAmount(n,r,i,a.DEFAULT_EDGE_LENGTH/2),h=2*i[0],g=2*i[1];var _=e.noOfChildren*t.noOfChildren/(e.noOfChildren+t.noOfChildren);e.repulsionForceX-=_*h,e.repulsionForceY-=_*g,t.repulsionForceX+=_*h,t.repulsionForceY+=_*g}else this.uniformLeafNodeSizes&&e.getChild()==null&&t.getChild()==null?(u=r.getCenterX()-n.getCenterX(),d=r.getCenterY()-n.getCenterY()):(s.getIntersection(n,r,o),u=o[2]-o[0],d=o[3]-o[1]),Math.abs(u)<a.MIN_REPULSION_DIST&&(u=l.sign(u)*a.MIN_REPULSION_DIST),Math.abs(d)<a.MIN_REPULSION_DIST&&(d=l.sign(d)*a.MIN_REPULSION_DIST),f=u*u+d*d,p=Math.sqrt(f),m=this.repulsionConstant*e.noOfChildren*t.noOfChildren/f,h=m*u/p,g=m*d/p,e.repulsionForceX-=h,e.repulsionForceY-=g,t.repulsionForceX+=h,t.repulsionForceY+=g},u.prototype.calcGravitationalForce=function(e){var t=e.getOwner(),n=(t.getRight()+t.getLeft())/2,r=(t.getTop()+t.getBottom())/2,i=e.getCenterX()-n,a=e.getCenterY()-r,o=Math.abs(i)+e.getWidth()/2,s=Math.abs(a)+e.getHeight()/2,l;e.getOwner()==this.graphManager.getRoot()?(l=t.getEstimatedSize()*this.gravityRangeFactor,(o>l||s>l)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a)):(l=t.getEstimatedSize()*this.compoundGravityRangeFactor,(o>l||s>l)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant))},u.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,e||t},u.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},u.prototype.calcNoOfChildrenForAllNodes=function(){for(var e,t=this.graphManager.getAllNodes(),n=0;n<t.length;n++)e=t[n],e.noOfChildren=e.getNoOfChildren()},u.prototype.calcGrid=function(e){var t=0,n=0;t=parseInt(Math.ceil((e.getRight()-e.getLeft())/this.repulsionRange)),n=parseInt(Math.ceil((e.getBottom()-e.getTop())/this.repulsionRange));for(var r=Array(t),i=0;i<t;i++)r[i]=Array(n);for(var i=0;i<t;i++)for(var a=0;a<n;a++)r[i][a]=[];return r},u.prototype.addNodeToGrid=function(e,t,n){var r=0,i=0,a=0,o=0;r=parseInt(Math.floor((e.getRect().x-t)/this.repulsionRange)),i=parseInt(Math.floor((e.getRect().width+e.getRect().x-t)/this.repulsionRange)),a=parseInt(Math.floor((e.getRect().y-n)/this.repulsionRange)),o=parseInt(Math.floor((e.getRect().height+e.getRect().y-n)/this.repulsionRange));for(var s=r;s<=i;s++)for(var l=a;l<=o;l++)this.grid[s][l].push(e),e.setGridCoordinates(r,i,a,o)},u.prototype.updateGrid=function(){var e,t,n=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),e=0;e<n.length;e++)t=n[e],this.addNodeToGrid(t,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},u.prototype.calculateRepulsionForceOfANode=function(e,t,n,i){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&n||i){var o=new Set;e.surrounding=[];for(var s,l=this.grid,u=e.startX-1;u<e.finishX+2;u++)for(var d=e.startY-1;d<e.finishY+2;d++)if(!(u<0||d<0||u>=l.length||d>=l[0].length)){for(var f=0;f<l[u][d].length;f++)if(s=l[u][d][f],e.getOwner()==s.getOwner()&&e!=s&&!t.has(s)&&!o.has(s)){var p=Math.abs(e.getCenterX()-s.getCenterX())-(e.getWidth()/2+s.getWidth()/2),m=Math.abs(e.getCenterY()-s.getCenterY())-(e.getHeight()/2+s.getHeight()/2);p<=this.repulsionRange&&m<=this.repulsionRange&&o.add(s)}}e.surrounding=[].concat(r(o))}for(u=0;u<e.surrounding.length;u++)this.calcRepulsionForce(e,e.surrounding[u])},u.prototype.calcRepulsionRange=function(){return 0},e.exports=u}),(function(e,t,n){var r=n(1),i=n(7);function a(e,t,n){r.call(this,e,t,n),this.idealLength=i.DEFAULT_EDGE_LENGTH}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];e.exports=a}),(function(e,t,n){var r=n(3);function i(e,t,n,i){r.call(this,e,t,n,i),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];i.prototype.setGridCoordinates=function(e,t,n,r){this.startX=e,this.finishX=t,this.startY=n,this.finishY=r},e.exports=i}),(function(e,t,n){function r(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(e){this.width=e},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(e){this.height=e},e.exports=r}),(function(e,t,n){var r=n(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(e,t){var n=r.createID(e);this.contains(n)||(this.map[n]=t,this.keys.push(e))},i.prototype.contains=function(e){return r.createID(e),this.map[e]!=null},i.prototype.get=function(e){var t=r.createID(e);return this.map[t]},i.prototype.keySet=function(){return this.keys},e.exports=i}),(function(e,t,n){var r=n(14);function i(){this.set={}}i.prototype.add=function(e){var t=r.createID(e);this.contains(t)||(this.set[t]=e)},i.prototype.remove=function(e){delete this.set[r.createID(e)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(e){return this.set[r.createID(e)]==e},i.prototype.isEmpty=function(){return this.size()===0},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(e){for(var t=Object.keys(this.set),n=t.length,r=0;r<n;r++)e.push(this.set[t[r]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(e){for(var t=e.length,n=0;n<t;n++){var r=e[n];this.add(r)}},e.exports=i}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var a=n(11);e.exports=function(){function e(t,n){i(this,e),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var r=void 0;r=t instanceof a?t.size():t.length,this._quicksort(t,0,r-1)}return r(e,[{key:`_quicksort`,value:function(e,t,n){if(t<n){var r=this._partition(e,t,n);this._quicksort(e,t,r),this._quicksort(e,r+1,n)}}},{key:`_partition`,value:function(e,t,n){for(var r=this._get(e,t),i=t,a=n;;){for(;this.compareFunction(r,this._get(e,a));)a--;for(;this.compareFunction(this._get(e,i),r);)i++;if(i<a)this._swap(e,i,a),i++,a--;else return a}}},{key:`_get`,value:function(e,t){return e instanceof a?e.get_object_at(t):e[t]}},{key:`_set`,value:function(e,t,n){e instanceof a?e.set_object_at(t,n):e[t]=n}},{key:`_swap`,value:function(e,t,n){var r=this._get(e,t);this._set(e,t,this._get(e,n)),this._set(e,n,r)}},{key:`_defaultCompareFunction`,value:function(e,t){return t>e}}]),e}()}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}e.exports=function(){function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=a,this.gap_penalty=o,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=Array(this.jMax);for(var l=0;l<this.jMax;l++)this.grid[s][l]=0}this.tracebackGrid=Array(this.iMax);for(var u=0;u<this.iMax;u++){this.tracebackGrid[u]=Array(this.jMax);for(var d=0;d<this.jMax;d++)this.tracebackGrid[u][d]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return r(e,[{key:`getScore`,value:function(){return this.score}},{key:`getAlignments`,value:function(){return this.alignments}},{key:`computeGrids`,value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var t=1;t<this.iMax;t++)this.grid[t][0]=this.grid[t-1][0]+this.gap_penalty,this.tracebackGrid[t][0]=[!1,!0,!1];for(var n=1;n<this.iMax;n++)for(var r=1;r<this.jMax;r++){var i=void 0;i=this.sequence1[n-1]===this.sequence2[r-1]?this.grid[n-1][r-1]+this.match_score:this.grid[n-1][r-1]+this.mismatch_penalty;var a=this.grid[n-1][r]+this.gap_penalty,o=this.grid[n][r-1]+this.gap_penalty,s=[i,a,o],l=this.arrayAllMaxIndexes(s);this.grid[n][r]=s[l[0]],this.tracebackGrid[n][r]=[l.includes(0),l.includes(1),l.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:`alignmentTraceback`,value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:``,seq2:``});e[0];){var t=e[0],n=this.tracebackGrid[t.pos[0]][t.pos[1]];n[0]&&e.push({pos:[t.pos[0]-1,t.pos[1]-1],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),n[1]&&e.push({pos:[t.pos[0]-1,t.pos[1]],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:`-`+t.seq2}),n[2]&&e.push({pos:[t.pos[0],t.pos[1]-1],seq1:`-`+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),t.pos[0]===0&&t.pos[1]===0&&this.alignments.push({sequence1:t.seq1,sequence2:t.seq2}),e.shift()}return this.alignments}},{key:`getAllIndexes`,value:function(e,t){for(var n=[],r=-1;(r=e.indexOf(t,r+1))!==-1;)n.push(r);return n}},{key:`arrayAllMaxIndexes`,value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),e}()}),(function(e,t,n){var r=function(){};r.FDLayout=n(18),r.FDLayoutConstants=n(7),r.FDLayoutEdge=n(19),r.FDLayoutNode=n(20),r.DimensionD=n(21),r.HashMap=n(22),r.HashSet=n(23),r.IGeometry=n(8),r.IMath=n(9),r.Integer=n(10),r.Point=n(12),r.PointD=n(4),r.RandomSeed=n(16),r.RectangleD=n(13),r.Transform=n(17),r.UniqueIDGeneretor=n(14),r.Quicksort=n(24),r.LinkedList=n(11),r.LGraphObject=n(2),r.LGraph=n(5),r.LEdge=n(1),r.LGraphManager=n(6),r.LNode=n(3),r.Layout=n(15),r.LayoutConstants=n(0),r.NeedlemanWunsch=n(25),e.exports=r}),(function(e,t,n){function r(){this.listeners=[]}var i=r.prototype;i.addListener=function(e,t){this.listeners.push({event:e,callback:t})},i.removeListener=function(e,t){for(var n=this.listeners.length;n>=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n<this.listeners.length;n++){var r=this.listeners[n];e===r.event&&r.callback(t)}},e.exports=r})])})})),bQe=s(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(yQe()):typeof define==`function`&&define.amd?define([`layout-base`],r):typeof e==`object`?e.coseBase=r(yQe()):n.coseBase=r(n.layoutBase)})(e,function(e){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=7)})([(function(t,n){t.exports=e}),(function(e,t,n){var r=n(0).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=i}),(function(e,t,n){var r=n(0).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).FDLayoutNode,i=n(0).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),this.child==null||this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n=this.getChild().getNodes(),r,i=0;i<n.length;i++)r=n[i],r.getChild()==null?(r.moveBy(e,t),r.displacementX+=e,r.displacementY+=t):r.propogateDisplacementToChildren(e,t)},a.prototype.setPred1=function(e){this.pred1=e},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(e){this.next=e},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(e){this.processed=e},a.prototype.isProcessed=function(){return processed},e.exports=a}),(function(e,t,n){var r=n(0).FDLayout,i=n(4),a=n(3),o=n(5),s=n(2),l=n(1),u=n(0).FDLayoutConstants,d=n(0).LayoutConstants,f=n(0).Point,p=n(0).PointD,m=n(0).Layout,h=n(0).Integer,g=n(0).IGeometry,_=n(0).LGraph,v=n(0).Transform;function y(){r.call(this),this.toBeTiled={}}for(var b in y.prototype=Object.create(r.prototype),r)y[b]=r[b];y.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},y.prototype.newGraph=function(e){return new a(null,this.graphManager,e)},y.prototype.newNode=function(e){return new o(this.graphManager,e)},y.prototype.newEdge=function(e){return new s(null,null,e)},y.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(this.idealEdgeLength=l.DEFAULT_EDGE_LENGTH<10?10:l.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=u.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=u.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=u.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=u.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/u.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=u.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},y.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},y.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),!this.incremental){var e=this.getFlatForest();if(e.length>0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}else if(l.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n)}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0}if(this.totalIterations%u.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0}this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-this.coolingCycle**+(Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0){if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0}this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n<e.length;n++){var r=e[n].rect,i=e[n].id;t[i]={id:i,x:r.getCenterX(),y:r.getCenterY(),w:r.width,h:r.height}}return t},y.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var e=!1;if(u.ANIMATE===`during`)this.emit(`layoutstarted`);else{for(;!e;)e=this.tick();this.graphManager.updateBounds()}},y.prototype.calculateNodesToApplyGravitationTo=function(){for(var e=[],t,n=this.graphManager.getGraphs(),r=n.length,i=0;i<r;i++)t=n[i],t.updateConnected(),t.isConnected||(e=e.concat(t.getNodes()));return e},y.prototype.createBendpoints=function(){var e=[];e=e.concat(this.graphManager.getAllEdges());for(var t=new Set,n=0;n<e.length;n++){var r=e[n];if(!t.has(r)){var i=r.getSource(),a=r.getTarget();if(i==a)r.getBendpoints().push(new p),r.getBendpoints().push(new p),this.createDummyNodesForBendpoints(r),t.add(r);else{var o=[];if(o=o.concat(i.getEdgeListToNode(a)),o=o.concat(a.getEdgeListToNode(i)),!t.has(o[0])){if(o.length>1)for(var s=0;s<o.length;s++){var l=o[s];l.getBendpoints().push(new p),this.createDummyNodesForBendpoints(l)}o.forEach(function(e){t.add(e)})}}}if(t.size==e.length)break}},y.prototype.positionNodesRadially=function(e){for(var t=new f(0,0),n=Math.ceil(Math.sqrt(e.length)),r=0,i=0,a=0,o=new p(0,0),s=0;s<e.length;s++){s%n==0&&(a=0,i=r,s!=0&&(i+=l.DEFAULT_COMPONENT_SEPERATION),r=0);var u=e[s],h=m.findCenterOfTree(u);t.x=a,t.y=i,o=y.radialLayout(u,h,t),o.y>r&&(r=Math.floor(o.y)),a=Math.floor(o.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(d.WORLD_CENTER_X-o.x/2,d.WORLD_CENTER_Y-o.y/2))},y.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),l.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(t,null,0,359,0,r);var i=_.calculateBounds(e),a=new v;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o<e.length;o++)e[o].transform(a);var s=new p(i.getMaxX(),i.getMaxY());return a.inverseTransformPoint(s)},y.branchRadialLayout=function(e,t,n,r,i,a){var o=(r-n+1)/2;o<0&&(o+=180);var s=(o+n)%360*g.TWO_PI/360,l=i*Math.cos(s),u=i*Math.sin(s);e.setCenter(l,u);var d=[];d=d.concat(e.getEdges());var f=d.length;t!=null&&f--;for(var p=0,m=d.length,h,_=e.getEdgesBetween(t);_.length>1;){var v=_[0];_.splice(0,1);var b=d.indexOf(v);b>=0&&d.splice(b,1),m--,f--}h=t==null?0:(d.indexOf(_[0])+1)%m;for(var x=Math.abs(r-n)/f,S=h;p!=f;S=++S%m){var C=d[S].getOtherEnd(e);if(C!=t){var w=(n+p*x)%360,T=(w+x)%360;y.branchRadialLayout(C,e,w,T,i+a,a),p++}}},y.maxDiagonalInTree=function(e){for(var t=h.MIN_VALUE,n=0;n<e.length;n++){var r=e[n].getDiagonal();r>t&&(t=r)}return t},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i<r.length;i++){var a=r[i],s=a.getParent();this.getNodeDegreeWithChildren(a)===0&&(s.id==null||!this.getToBeTiled(s))&&n.push(a)}for(var i=0;i<n.length;i++){var a=n[i],l=a.getParent().id;t[l]===void 0&&(t[l]=[]),t[l]=t[l].concat(a)}Object.keys(t).forEach(function(n){if(t[n].length>1){var r=`DummyCompound_`+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),l=i.getChild();l.add(a);for(var u=0;u<t[n].length;u++){var d=t[n][u];l.remove(d),s.add(d)}}})},y.prototype.clearCompounds=function(){var e={},t={};this.performDFSOnCompounds();for(var n=0;n<this.compoundOrder.length;n++)t[this.compoundOrder[n].id]=this.compoundOrder[n],e[this.compoundOrder[n].id]=[].concat(this.compoundOrder[n].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[n].getChild()),this.compoundOrder[n].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(e,t)},y.prototype.clearZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(n){var r=e.idToDummyNode[n];t[n]=e.tileNodes(e.memberGroups[n],r.paddingLeft+r.paddingRight),r.rect.width=t[n].width,r.rect.height=t[n].height})},y.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;e>=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i)}},y.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach(function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a)})},y.prototype.getToBeTiled=function(e){var t=e.id;if(this.toBeTiled[t]!=null)return this.toBeTiled[t];var n=e.getChild();if(n==null)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i<r.length;i++){var a=r[i];if(this.getNodeDegree(a)>0)return this.toBeTiled[t]=!1,!1;if(a.getChild()==null){this.toBeTiled[a.id]=!1;continue}if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}return this.toBeTiled[t]=!0,!0},y.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;r<t.length;r++){var i=t[r];i.getSource().id!==i.getTarget().id&&(n+=1)}return n},y.prototype.getNodeDegreeWithChildren=function(e){var t=this.getNodeDegree(e);if(e.getChild()==null)return t;for(var n=e.getChild().getNodes(),r=0;r<n.length;r++){var i=n[r];t+=this.getNodeDegreeWithChildren(i)}return t},y.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},y.prototype.fillCompexOrderByDFS=function(e){for(var t=0;t<e.length;t++){var n=e[t];n.getChild()!=null&&this.fillCompexOrderByDFS(n.getChild().getNodes()),this.getToBeTiled(n)&&this.compoundOrder.push(n)}},y.prototype.adjustLocations=function(e,t,n,r,i){t+=r,n+=i;for(var a=t,o=0;o<e.rows.length;o++){var s=e.rows[o];t=a;for(var l=0,u=0;u<s.length;u++){var d=s[u];d.rect.x=t,d.rect.y=n,t+=d.rect.width+e.horizontalPadding,d.rect.height>l&&(l=d.rect.height)}n+=l+e.verticalPadding}},y.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var i=t[r];n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height})},y.prototype.tileNodes=function(e,t){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:l.TILING_PADDING_VERTICAL,horizontalPadding:l.TILING_PADDING_HORIZONTAL};e.sort(function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:+(e.rect.width*e.rect.height<t.rect.width*t.rect.height)});for(var r=0;r<e.length;r++){var i=e[r];n.rows.length==0?this.insertNodeToRow(n,i,0,t):this.canAddHorizontal(n,i.rect.width,i.rect.height)?this.insertNodeToRow(n,i,this.getShortestRowIndex(n),t):this.insertNodeToRow(n,i,n.rows.length,t),this.shiftToLastRow(n)}return n},y.prototype.insertNodeToRow=function(e,t,n,r){var i=r;n==e.rows.length&&(e.rows.push([]),e.rowWidth.push(i),e.rowHeight.push(0));var a=e.rowWidth[n]+t.rect.width;e.rows[n].length>0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width<a&&(e.width=a);var o=t.rect.height;n>0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},y.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]<n&&(t=r,n=e.rowWidth[r]);return t},y.prototype.getLongestRowIndex=function(e){for(var t=-1,n=Number.MIN_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]>n&&(t=r,n=e.rowWidth[r]);return t},y.prototype.canAddHorizontal=function(e,t,n){var r=this.getShortestRowIndex(e);if(r<0)return!0;var i=e.rowWidth[r];if(i+e.horizontalPadding+t<=e.width)return!0;var a=0;e.rowHeight[r]<n&&r>0&&(a=n+e.verticalPadding-e.rowHeight[r]);var o=e.width-i>=t+e.horizontalPadding?(e.height+a)/(i+t+e.horizontalPadding):(e.height+a)/e.width;a=n+e.verticalPadding;var s=e.width<t?(e.height+a)/t:(e.height+a)/e.width;return s<1&&(s=1/s),o<1&&(o=1/o),o<s},y.prototype.shiftToLastRow=function(e){var t=this.getLongestRowIndex(e),n=e.rowWidth.length-1,r=e.rows[t],i=r[r.length-1],a=i.width+e.horizontalPadding;if(e.width-e.rowWidth[n]>a&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;s<r.length;s++)r[s].height>o&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var l=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]<i.height+e.verticalPadding&&(e.rowHeight[n]=i.height+e.verticalPadding);var u=e.rowHeight[t]+e.rowHeight[n];e.height+=u-l,this.shiftToLastRow(e)}},y.prototype.tilingPreLayout=function(){l.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},y.prototype.tilingPostLayout=function(){l.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},y.prototype.reduceTrees=function(){for(var e=[],t=!0,n;t;){var r=this.graphManager.getAllNodes(),i=[];t=!1;for(var a=0;a<r.length;a++)n=r[a],n.getEdges().length==1&&!n.getEdges()[0].isInterGraph&&n.getChild()==null&&(i.push([n,n.getEdges()[0],n.getOwner()]),t=!0);if(t==1){for(var o=[],s=0;s<i.length;s++)i[s][0].getEdges().length==1&&(o.push(i[s]),i[s][0].getOwner().remove(i[s][0]));e.push(o),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},y.prototype.growTree=function(e){for(var t=e[e.length-1],n,r=0;r<t.length;r++)n=t[r],this.findPlaceforPrunedNode(n),n[2].add(n[0]),n[2].add(n[1],n[1].source,n[1].target);e.splice(e.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},y.prototype.findPlaceforPrunedNode=function(e){var t,n,r=e[0];n=r==e[1].source?e[1].target:e[1].source;var i=n.startX,a=n.finishX,o=n.startY,s=n.finishY,l=[0,0,0,0];if(o>0)for(var d=i;d<=a;d++)l[0]+=this.grid[d][o-1].length+this.grid[d][o].length-1;if(a<this.grid.length-1)for(var d=o;d<=s;d++)l[1]+=this.grid[a+1][d].length+this.grid[a][d].length-1;if(s<this.grid[0].length-1)for(var d=i;d<=a;d++)l[2]+=this.grid[d][s+1].length+this.grid[d][s].length-1;if(i>0)for(var d=o;d<=s;d++)l[3]+=this.grid[i-1][d].length+this.grid[i][d].length-1;for(var f=h.MAX_VALUE,p,m,g=0;g<l.length;g++)l[g]<f?(f=l[g],p=1,m=g):l[g]==f&&p++;if(p==3&&f==0)l[0]==0&&l[1]==0&&l[2]==0?t=1:l[0]==0&&l[1]==0&&l[3]==0?t=0:l[0]==0&&l[2]==0&&l[3]==0?t=3:l[1]==0&&l[2]==0&&l[3]==0&&(t=2);else if(p==2&&f==0){var _=Math.floor(Math.random()*2);t=l[0]==0&&l[1]==0?_==0?0:1:l[0]==0&&l[2]==0?_==0?0:2:l[0]==0&&l[3]==0?_==0?0:3:l[1]==0&&l[2]==0?_==0?1:2:l[1]==0&&l[3]==0?_==0?1:3:_==0?2:3}else if(p==4&&f==0){var _=Math.floor(Math.random()*4);t=_}else t=m;t==0?r.setCenter(n.getCenterX(),n.getCenterY()-n.getHeight()/2-u.DEFAULT_EDGE_LENGTH-r.getHeight()/2):t==1?r.setCenter(n.getCenterX()+n.getWidth()/2+u.DEFAULT_EDGE_LENGTH+r.getWidth()/2,n.getCenterY()):t==2?r.setCenter(n.getCenterX(),n.getCenterY()+n.getHeight()/2+u.DEFAULT_EDGE_LENGTH+r.getHeight()/2):r.setCenter(n.getCenterX()-n.getWidth()/2-u.DEFAULT_EDGE_LENGTH-r.getWidth()/2,n.getCenterY())},e.exports=y}),(function(e,t,n){var r={};r.layoutBase=n(0),r.CoSEConstants=n(1),r.CoSEEdge=n(2),r.CoSEGraph=n(3),r.CoSEGraphManager=n(4),r.CoSELayout=n(6),r.CoSENode=n(5),e.exports=r})])})})),xQe=s(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(bQe()):typeof define==`function`&&define.amd?define([`cose-base`],r):typeof e==`object`?e.cytoscapeCoseBilkent=r(bQe()):n.cytoscapeCoseBilkent=r(n.coseBase)})(e,function(e){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=1)})([(function(t,n){t.exports=e}),(function(e,t,n){var r=n(0).layoutBase.LayoutConstants,i=n(0).layoutBase.FDLayoutConstants,a=n(0).CoSEConstants,o=n(0).CoSELayout,s=n(0).CoSENode,l=n(0).layoutBase.PointD,u=n(0).layoutBase.DimensionD,d={ready:function(){},stop:function(){},quality:`default`,nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:`end`,animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function f(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function p(e){this.options=f(d,e),m(this.options)}var m=function(e){e.nodeRepulsion!=null&&(a.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion),e.idealEdgeLength!=null&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=e.idealEdgeLength),e.edgeElasticity!=null&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=e.edgeElasticity),e.nestingFactor!=null&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),r.QUALITY=e.quality==`draft`?0:e.quality==`proof`?2:1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!e.randomize,a.ANIMATE=i.ANIMATE=r.ANIMATE=e.animate,a.TILE=e.tile,a.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==`function`?e.tilingPaddingVertical.call():e.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==`function`?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal};p.prototype.run=function(){var e,t,n=this.options;this.idToLNode={};var r=this.layout=new o,i=this;i.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:`layoutstart`,layout:this});var a=r.newGraphManager();this.gm=a;var s=this.options.eles.nodes(),l=this.options.eles.edges();this.root=a.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(s),r);for(var u=0;u<l.length;u++){var d=l[u],f=this.idToLNode[d.data(`source`)],p=this.idToLNode[d.data(`target`)];if(f!==p&&f.getEdgesBetween(p).length==0){var m=a.add(r.newEdge(),f,p);m.id=d.id()}}var h=function(e,t){typeof e==`number`&&(e=t);var n=e.data(`id`),r=i.idToLNode[n];return{x:r.getRect().getCenterX(),y:r.getRect().getCenterY()}},g=function a(){for(var o=function(){n.fit&&n.cy.fit(n.eles,n.padding),e||(e=!0,i.cy.one(`layoutready`,n.ready),i.cy.trigger({type:`layoutready`,layout:i}))},s=i.options.refresh,l,u=0;u<s&&!l;u++)l=i.stopped||i.layout.tick();if(l){r.checkLayoutSuccess()&&!r.isSubLayout&&r.doPostLayout(),r.tilingPostLayout&&r.tilingPostLayout(),r.isLayoutFinished=!0,i.options.eles.nodes().positions(h),o(),i.cy.one(`layoutstop`,i.options.stop),i.cy.trigger({type:`layoutstop`,layout:i}),t&&cancelAnimationFrame(t),e=!1;return}var d=i.layout.getPositionsData();n.eles.nodes().positions(function(e,t){if(typeof e==`number`&&(e=t),!e.isParent()){for(var n=e.id(),r=d[n],i=e;r==null&&(r=d[i.data(`parent`)]||d[`DummyCompound_`+i.data(`parent`)],d[n]=r,i=i.parent()[0],i!=null););return r==null?{x:e.position(`x`),y:e.position(`y`)}:{x:r.x,y:r.y}}}),o(),t=requestAnimationFrame(a)};return r.addListener(`layoutstarted`,function(){i.options.animate===`during`&&(t=requestAnimationFrame(g))}),r.runLayout(),this.options.animate!==`during`&&(i.options.eles.nodes().not(`:parent`).layoutPositions(i,i.options,h),e=!1),this},p.prototype.getTopMostNodes=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].id()]=!0;return e.filter(function(e,n){typeof e==`number`&&(e=n);for(var r=e.parent()[0];r!=null;){if(t[r.id()])return!1;r=r.parent()[0]}return!0})},p.prototype.processChildrenList=function(e,t,n){for(var r=t.length,i=0;i<r;i++){var a=t[i],o=a.children(),d,f=a.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(d=a.outerWidth()!=null&&a.outerHeight()!=null?e.add(new s(n.graphManager,new l(a.position(`x`)-f.w/2,a.position(`y`)-f.h/2),new u(parseFloat(f.w),parseFloat(f.h)))):e.add(new s(this.graphManager)),d.id=a.data(`id`),d.paddingLeft=parseInt(a.css(`padding`)),d.paddingTop=parseInt(a.css(`padding`)),d.paddingRight=parseInt(a.css(`padding`)),d.paddingBottom=parseInt(a.css(`padding`)),this.options.nodeDimensionsIncludeLabels&&a.isParent()){var p=a.boundingBox({includeLabels:!0,includeNodes:!1}).w,m=a.boundingBox({includeLabels:!0,includeNodes:!1}).h,h=a.css(`text-halign`);d.labelWidth=p,d.labelHeight=m,d.labelPos=h}if(this.idToLNode[a.data(`id`)]=d,isNaN(d.rect.x)&&(d.rect.x=0),isNaN(d.rect.y)&&(d.rect.y=0),o!=null&&o.length>0){var g=n.getGraphManager().add(n.newGraph(),d);this.processChildrenList(g,o,n)}}},p.prototype.stop=function(){return this.stopped=!0,this};var h=function(e){e(`layout`,`cose-bilkent`,p)};typeof cytoscape<`u`&&h(cytoscape),e.exports=h})])})})),SQe=l({render:()=>jQe});function CQe(e,t){e.forEach(e=>{let n={id:e.id,labelText:e.label,height:e.height,width:e.width,padding:e.padding??0};Object.keys(e).forEach(t=>{[`id`,`label`,`height`,`width`,`padding`,`x`,`y`].includes(t)||(n[t]=e[t])}),t.add({group:`nodes`,data:n,position:{x:e.x??0,y:e.y??0}})})}function wQe(e,t){e.forEach(e=>{let n={id:e.id,source:e.start,target:e.end};Object.keys(e).forEach(t=>{[`id`,`start`,`end`].includes(t)||(n[t]=e[t])}),t.add({group:`edges`,data:n})})}function TQe(e){return new Promise(t=>{let n=hb(`body`).append(`div`).attr(`id`,`cy`).attr(`style`,`display:none`),r=ZV({container:document.getElementById(`cy`),style:[{selector:`edge`,style:{"curve-style":`bezier`}}]});n.remove(),CQe(e.nodes,r),wQe(e.edges,r),r.nodes().forEach(function(e){e.layoutDimensions=()=>{let t=e.data();return{w:t.width,h:t.height}}}),r.layout({name:`cose-bilkent`,quality:`proof`,styleEnabled:!1,animate:!1}).run(),r.ready(e=>{G.info(`Cytoscape ready`,e),t(r)})})}function EQe(e){return e.nodes().map(e=>{let t=e.data(),n=e.position(),r={id:t.id,x:n.x,y:n.y};return Object.keys(t).forEach(e=>{e!==`id`&&(r[e]=t[e])}),r})}function DQe(e){return e.edges().map(e=>{let t=e.data(),n=e._private.rscratch,r={id:t.id,source:t.source,target:t.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(t).forEach(e=>{[`id`,`source`,`target`].includes(e)||(r[e]=t[e])}),r})}async function OQe(e,t){G.debug(`Starting cose-bilkent layout algorithm`);try{kQe(e);let t=await TQe(e),n=EQe(t),r=DQe(t);return G.debug(`Layout completed: ${n.length} nodes, ${r.length} edges`),{nodes:n,edges:r}}catch(e){throw G.error(`Error in cose-bilkent layout algorithm:`,e),e}}function kQe(e){if(!e)throw Error(`Layout data is required`);if(!e.config)throw Error(`Configuration is required in layout data`);if(!e.rootNode)throw Error(`Root node is required`);if(!e.nodes||!Array.isArray(e.nodes))throw Error(`No nodes found in layout data`);if(!Array.isArray(e.edges))throw Error(`Edges array is required in layout data`);return!0}var AQe,jQe,MQe=o((()=>{Gp(),Vp(),vQe(),AQe=d(xQe(),1),WS(),ZV.use(AQe.default),W(CQe,`addNodes`),W(wQe,`addEdges`),W(TQe,`createCytoscapeInstance`),W(EQe,`extractPositionedNodes`),W(DQe,`extractPositionedEdges`),W(OQe,`executeCoseBilkentLayout`),W(kQe,`validateLayoutData`),jQe=W(async(e,t,{insertCluster:n,insertEdge:r,insertEdgeLabel:i,insertMarkers:a,insertNode:o,log:s,positionEdgeLabel:l},{algorithm:u})=>{let d={},f={},p=t.select(`g`);a(p,e.markers,e.type,e.diagramId);let m=p.insert(`g`).attr(`class`,`subgraphs`),h=p.insert(`g`).attr(`class`,`edgePaths`),g=p.insert(`g`).attr(`class`,`edgeLabels`),_=p.insert(`g`).attr(`class`,`nodes`);s.debug(`Inserting nodes into DOM for dimension calculation`),await Promise.all(e.nodes.map(async t=>{if(t.isGroup){let e={...t};f[t.id]=e,d[t.id]=e,await n(m,t)}else{let n={...t};d[t.id]=n;let r=await o(_,t,{config:e.config,dir:e.direction||`TB`}),i=r.node().getBBox();n.width=i.width,n.height=i.height,n.domId=r,s.debug(`Node ${t.id} dimensions: ${i.width}x${i.height}`)}})),s.debug(`Running cose-bilkent layout algorithm`);let v=await OQe({...e,nodes:e.nodes.map(e=>{let t=d[e.id];return{...e,width:t.width,height:t.height}})},e.config);s.debug(`Positioning nodes based on layout results`),v.nodes.forEach(e=>{let t=d[e.id];t?.domId&&(t.domId.attr(`transform`,`translate(${e.x}, ${e.y})`),t.x=e.x,t.y=e.y,s.debug(`Positioned node ${t.id} at center (${e.x}, ${e.y})`))}),v.edges.forEach(t=>{let n=e.edges.find(e=>e.id===t.id);n&&(n.points=[{x:t.startX,y:t.startY},{x:t.midX,y:t.midY},{x:t.endX,y:t.endY}])}),s.debug(`Inserting and positioning edges`),await Promise.all(e.edges.map(async t=>{await i(g,t);let n=d[t.start??``],a=d[t.end??``];if(n&&a){let i=v.edges.find(e=>e.id===t.id);if(i){s.debug(`APA01 positionedEdge`,i);let o={...t};l(o,r(h,o,f,e.type,n,a,e.diagramId))}else{let i={...t,points:[{x:n.x||0,y:n.y||0},{x:a.x||0,y:a.y||0}]};l(i,r(h,i,f,e.type,n,a,e.diagramId))}}})),s.debug(`Cose-bilkent rendering completed`)},`render`)})),NQe,QV,PQe,$V,eH,tH=o((()=>{vT(),jT(),gT(),dT(),OC(),Iy(),Gp(),Vp(),zp(),NQe={common:dy,getConfig:Rv,insertCluster:_T,insertEdge:kT,insertEdgeLabel:DT,insertMarkers:AT,insertNode:fT,interpolateToCurve:zSe,labelHelper:qw,log:G,positionEdgeLabel:OT},QV={},PQe=W(e=>{for(let t of e)QV[t.name]=t},`registerLayoutLoaders`),W(()=>{PQe([{name:`dagre`,loader:W(async()=>await Rp(()=>Promise.resolve().then(()=>(ZVe(),BVe)),void 0,import.meta.url),`loader`)},{name:`swimlane`,loader:W(async()=>await Rp(()=>Promise.resolve().then(()=>(VUe(),QVe)),void 0,import.meta.url),`loader`)},{name:`cose-bilkent`,loader:W(async()=>await Rp(()=>Promise.resolve().then(()=>(MQe(),SQe)),void 0,import.meta.url),`loader`)}])},`registerDefaultLayoutLoaders`)(),$V=W(async(e,t)=>{if(!(e.layoutAlgorithm in QV))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=QV[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:l}=a,u=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${u}-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${u}-drop-shadow-small`).attr(`height`,`150%`).attr(`width`,`150%`).append(`feDropShadow`).attr(`dx`,`2`).attr(`dy`,`2`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,l).attr(`stop-opacity`,1)}return r.render(e,t,NQe,{algorithm:n.algorithm})},`render`),eH=W((e=``,{fallback:t=`dagre`}={})=>{if(e in QV)return e;if(t in QV)return G.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},`getRegisteredLayoutAlgorithm`)})),nH,FQe,IQe,LQe,RQe,zQe,BQe,VQe=o((()=>{nH=`comm`,FQe=`rule`,IQe=`decl`,LQe=`@import`,RQe=`@namespace`,zQe=`@keyframes`,BQe=`@layer`}));function HQe(e){return e.trim()}function UQe(e,t,n){return e.replace(t,n)}function rH(e,t){return e.charCodeAt(t)|0}function iH(e,t,n){return e.slice(t,n)}function aH(e){return e.length}function WQe(e){return e.length}function oH(e,t){return t.push(e),e}var GQe,sH,cH=o((()=>{GQe=Math.abs,sH=String.fromCharCode}));function KQe(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:mH,column:hH,length:o,return:``,siblings:s}}function qQe(){return _H}function JQe(){return _H=gH>0?rH(vH,--gH):0,hH--,_H===10&&(hH=1,mH--),_H}function lH(){return _H=gH<r$e?rH(vH,gH++):0,hH++,_H===10&&(hH=1,mH++),_H}function uH(){return rH(vH,gH)}function dH(){return gH}function fH(e,t){return iH(vH,e,t)}function pH(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function YQe(e){return mH=hH=1,r$e=aH(vH=e),gH=0,[]}function XQe(e){return vH=``,e}function ZQe(e){return HQe(fH(gH-1,e$e(e===91?e+2:e===40?e+1:e)))}function QQe(e){for(;(_H=uH())&&_H<33;)lH();return pH(e)>2||pH(_H)>3?``:` `}function $Qe(e,t){for(;--t&&lH()&&!(_H<48||_H>102||_H>57&&_H<65||_H>70&&_H<97););return fH(e,dH()+(t<6&&uH()==32&&lH()==32))}function e$e(e){for(;lH();)switch(_H){case e:return gH;case 34:case 39:e!==34&&e!==39&&e$e(_H);break;case 40:e===41&&e$e(e);break;case 92:lH()}return gH}function t$e(e,t){for(;lH()&&e+_H!==57&&(e+_H!==84||uH()!==47););return`/*`+fH(t,gH-1)+`*`+sH(e===47?e:lH())}function n$e(e){for(;!pH(uH());)lH();return fH(e,gH)}var mH,hH,r$e,gH,_H,vH,i$e=o((()=>{cH(),mH=1,hH=1,r$e=0,gH=0,_H=0,vH=``}));function a$e(e){return XQe(yH(``,null,null,null,[``],e=YQe(e),0,[0],e))}function yH(e,t,n,r,i,a,o,s,l){for(var u=0,d=0,f=o,p=0,m=0,h=0,g=1,_=1,v=1,y=0,b=0,x=``,S=i,C=a,w=r,T=x;_;)switch(h=b,b=lH()){case 40:h!=108&&rH(T,f-1)==58?(y++,T+=`(`):T+=ZQe(b);break;case 41:y--,T+=`)`;break;case 34:case 39:case 91:T+=ZQe(b);break;case 9:case 10:case 13:case 32:if(y>0){T+=sH(b);break}T+=QQe(h);break;case 92:T+=$Qe(dH()-1,7);continue;case 47:switch(uH()){case 42:case 47:oH(s$e(t$e(lH(),dH()),t,n,l),l),(pH(h||1)==5||pH(uH()||1)==5)&&aH(T)&&iH(T,-1,void 0)!==` `&&(T+=` `);break;default:T+=`/`}break;case 123*g:s[u++]=aH(T)*v;case 125*g:case 59:case 0:if(y>0&&b){T+=sH(b);break}switch(b){case 0:case 125:_=0;case 59+d:v==-1&&(T=UQe(T,/\f/g,``)),m>0&&(aH(T)-f||g===0)&&oH(m>32?c$e(T+`;`,r,n,f-1,l):c$e(UQe(T,` `,``)+`;`,r,n,f-2,l),l);break;case 59:T+=`;`;default:if(oH(w=o$e(T,t,n,u,d,i,s,x,S=[],C=[],f,a),a),b===123){if(d===0)yH(T,t,w,w,S,a,f,s,C);else{switch(p){case 99:if(rH(T,3)===110)break;case 108:if(rH(T,2)===97)break;default:d=0;case 100:case 109:case 115:}d?yH(e,w,w,r&&oH(o$e(e,w,w,0,0,i,s,x,i,S=[],f,C),C),i,C,f,s,r?S:C):yH(T,w,w,w,[``],C,0,s,C)}}}u=d=m=0,g=v=1,x=T=``,f=o;break;case 58:f=1+aH(T),m=h;default:if(g<1){if(b==123)--g;else if(b==125&&g++==0&&JQe()==125)continue}switch(T+=sH(b),b*g){case 38:v=d>0?1:(T+=`\f`,-1);break;case 44:if(y>0)break;s[u++]=(aH(T)-1)*v,v=1;break;case 64:uH()===45&&(T+=ZQe(lH())),p=uH(),d=f=aH(x=T+=n$e(dH())),b++;break;case 45:h===45&&aH(T)==2&&(g=0)}}return a}function o$e(e,t,n,r,i,a,o,s,l,u,d,f){for(var p=i-1,m=i===0?a:[``],h=WQe(m),g=0,_=0,v=0;g<r;++g)for(var y=0,b=iH(e,p+1,p=GQe(_=o[g])),x=e;y<h;++y)(x=HQe(_>0?m[y]+` `+b:UQe(b,/&\f/g,m[y])))&&(l[v++]=x);return KQe(e,t,n,i===0?FQe:s,l,u,d,f)}function s$e(e,t,n,r){return KQe(e,t,n,nH,sH(qQe()),iH(e,2,-2),0,r)}function c$e(e,t,n,r,i){return KQe(e,t,n,IQe,iH(e,0,r),iH(e,r+1,-1),r,i)}var l$e=o((()=>{VQe(),cH(),i$e()})),u$e=o((()=>{}));function d$e(e,t){for(var n=``,r=0;r<e.length;r++)n+=t(e[r],r,e,t)||``;return n}function f$e(e,t,n,r){switch(e.type){case BQe:if(e.children.length)break;case LQe:case RQe:case IQe:return e.return=e.return||e.value;case nH:return``;case zQe:return e.return=e.value+`{`+d$e(e.children,r)+`}`;case FQe:if(!aH(e.value=e.props.join(`,`)))return``}return aH(n=d$e(e.children,r))?e.return=e.value+`{`+n+`}`:``}var p$e=o((()=>{VQe(),cH()}));function m$e(e){var t=WQe(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}var h$e=o((()=>{cH()})),g$e=o((()=>{VQe(),cH(),l$e(),u$e(),i$e(),p$e(),h$e()})),_$e,bH,v$e,y$e,xH,SH,CH,wH,TH,EH=o((()=>{Iy(),Vp(),_$e=iC(),WS(),bH=W((e,t)=>{let n=e.append(`rect`);if(n.attr(`x`,t.x),n.attr(`y`,t.y),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`width`,t.width),n.attr(`height`,t.height),t.name&&n.attr(`name`,t.name),t.rx&&n.attr(`rx`,t.rx),t.ry&&n.attr(`ry`,t.ry),t.attrs!==void 0)for(let e in t.attrs)n.attr(e,t.attrs[e]);return t.class&&n.attr(`class`,t.class),n},`drawRect`),v$e=W((e,t)=>{bH(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:`rect`}).lower()},`drawBackgroundRect`),y$e=W((e,t)=>{let n=t.text.replace(Qv,` `),r=e.append(`text`);r.attr(`x`,t.x),r.attr(`y`,t.y),r.attr(`class`,`legend`),r.style(`text-anchor`,t.anchor),t.class&&r.attr(`class`,t.class);let i=r.append(`tspan`);return i.attr(`x`,t.x+t.textMargin*2),i.text(n),r},`drawText`),xH=W((e,t,n,r)=>{let i=e.append(`image`);i.attr(`x`,t),i.attr(`y`,n);let a=(0,_$e.sanitizeUrl)(r);i.attr(`xlink:href`,a)},`drawImage`),SH=W((e,t,n,r)=>{let i=e.append(`use`);i.attr(`x`,t),i.attr(`y`,n);let a=(0,_$e.sanitizeUrl)(r);i.attr(`xlink:href`,`#${a}`)},`drawEmbeddedImage`),CH=W(()=>({x:0,y:0,width:100,height:100,fill:`#EDF2AE`,stroke:`#666`,anchor:`start`,rx:0,ry:0}),`getNoteRect`),wH=W(()=>({x:0,y:0,width:100,height:100,"text-anchor":`start`,style:`#666`,textMargin:0,rx:0,ry:0,tspan:!0}),`getTextObj`),TH=W(()=>{let e=hb(`.mermaidTooltip`);return e.empty()&&(e=hb(`body`).append(`div`).attr(`class`,`mermaidTooltip`).style(`opacity`,0).style(`position`,`absolute`).style(`text-align`,`center`).style(`max-width`,`200px`).style(`padding`,`2px`).style(`font-size`,`12px`).style(`background`,`#ffffde`).style(`border`,`1px solid #333`).style(`border-radius`,`2px`).style(`pointer-events`,`none`).style(`z-index`,`100`)),e},`createTooltip`)})),b$e=l({diagram:()=>M1e});function DH(e,t,n,r,i){let a=t[e];if(!a.width){if(n)a.text=SC(a.text,i,r),a.textLines=a.text.split(dy.lineBreakRegex).length,a.width=i,a.height=_C(a.text,r);else{let e=a.text.split(dy.lineBreakRegex);a.textLines=e.length;let t=0;a.height=0,a.width=0;for(let n of e)a.width=Math.max(vC(n,r),a.width),t=_C(n,r),a.height+=t}}return a}async function x$e(e,t,n,r,i){let a=i.db,o=new S1e(i);o.data.widthLimit=n.data.widthLimit/Math.min(qH,r.length);for(let[s,l]of r.entries()){let r=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=r,r=l.image.Y+l.image.height);let u=l.wrap&&JH.wrap,d=XH(JH);d.fontSize+=2,d.fontWeight=`bold`;let f=DH(`label`,l,u,d,o.data.widthLimit);if(f.Y=r+8,r=f.Y+f.height,l.type&&l.type.text!==``){l.type.text=`[`+l.type.text+`]`;let e=DH(`type`,l,u,XH(JH),o.data.widthLimit);e.Y=r+5,r=e.Y+e.height}if(l.descr&&l.descr.text!==``){let e=XH(JH);e.fontSize-=2;let t=DH(`descr`,l,u,e,o.data.widthLimit);t.Y=r+20,r=t.Y+t.height}if(s==0||s%qH===0){let e=n.data.startx+JH.diagramMarginX,t=n.data.stopy+JH.diagramMarginY+r;o.setData(e,e,t,t)}else{let e=o.data.stopx===o.data.startx?o.data.startx:o.data.stopx+JH.diagramMarginX,t=o.data.starty;o.setData(e,e,t,t)}o.name=l.alias;let p=a.getC4ShapeArray(l.alias),m=a.getC4ShapeKeys(l.alias);m.length>0&&await T1e(o,e,p,m),t=l.alias;let h=a.getBoundaries(t);h.length>0&&await x$e(e,t,o,h,i),l.alias!==`global`&&w1e(e,l,o),n.data.stopy=Math.max(o.data.stopy+JH.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(o.data.stopx+JH.c4ShapeMargin,n.data.stopx),GH=Math.max(GH,n.data.stopx),KH=Math.max(KH,n.data.stopy)}}var OH,S$e,C$e,kH,w$e,AH,jH,MH,NH,PH,FH,IH,LH,RH,zH,T$e,E$e,D$e,O$e,k$e,A$e,j$e,M$e,N$e,P$e,F$e,I$e,L$e,R$e,z$e,B$e,V$e,H$e,U$e,W$e,G$e,K$e,q$e,J$e,Y$e,X$e,BH,VH,Z$e,Q$e,$$e,e1e,t1e,n1e,r1e,i1e,a1e,o1e,HH,UH,s1e,c1e,l1e,u1e,WH,d1e,f1e,p1e,m1e,h1e,g1e,_1e,v1e,y1e,b1e,GH,KH,x1e,qH,JH,S1e,YH,XH,C1e,w1e,T1e,E1e,D1e,O1e,k1e,A1e,j1e,M1e,N1e=o((()=>{EH(),dT(),ZS(),dw(),rC(),OC(),Iy(),Gp(),Vp(),WS(),OH=(function(){var e=W(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,24],n=[1,25],r=[1,26],i=[1,27],a=[1,28],o=[1,63],s=[1,64],l=[1,65],u=[1,66],d=[1,67],f=[1,68],p=[1,69],m=[1,29],h=[1,30],g=[1,31],_=[1,32],v=[1,33],y=[1,34],b=[1,35],x=[1,36],S=[1,37],C=[1,38],w=[1,39],T=[1,40],E=[1,41],D=[1,42],O=[1,43],k=[1,44],A=[1,45],j=[1,46],M=[1,47],N=[1,48],P=[1,50],F=[1,51],I=[1,52],L=[1,53],R=[1,54],ee=[1,55],z=[1,56],B=[1,57],V=[1,58],te=[1,59],ne=[1,60],re=[14,42],ie=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ae=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],oe=[1,82],se=[1,83],ce=[1,84],le=[1,85],H=[12,14,42],ue=[12,14,33,42],de=[12,14,33,42,76,77,79,80],fe=[12,33],pe=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],me={trace:W(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:`error`,6:`direction_tb`,7:`direction_bt`,8:`direction_rl`,9:`direction_lr`,11:`C4_CONTEXT`,12:`NEWLINE`,14:`EOF`,15:`C4_CONTAINER`,16:`C4_COMPONENT`,17:`C4_DYNAMIC`,18:`C4_DEPLOYMENT`,22:`title`,23:`accDescription`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`LBRACE`,34:`ENTERPRISE_BOUNDARY`,36:`SYSTEM_BOUNDARY`,37:`BOUNDARY`,38:`CONTAINER_BOUNDARY`,39:`NODE`,40:`NODE_L`,41:`NODE_R`,42:`RBRACE`,44:`PERSON`,45:`PERSON_EXT`,46:`SYSTEM`,47:`SYSTEM_DB`,48:`SYSTEM_QUEUE`,49:`SYSTEM_EXT`,50:`SYSTEM_EXT_DB`,51:`SYSTEM_EXT_QUEUE`,52:`CONTAINER`,53:`CONTAINER_DB`,54:`CONTAINER_QUEUE`,55:`CONTAINER_EXT`,56:`CONTAINER_EXT_DB`,57:`CONTAINER_EXT_QUEUE`,58:`COMPONENT`,59:`COMPONENT_DB`,60:`COMPONENT_QUEUE`,61:`COMPONENT_EXT`,62:`COMPONENT_EXT_DB`,63:`COMPONENT_EXT_QUEUE`,64:`REL`,65:`BIREL`,66:`REL_U`,67:`REL_D`,68:`REL_L`,69:`REL_R`,70:`REL_B`,71:`REL_INDEX`,72:`UPDATE_EL_STYLE`,73:`UPDATE_REL_STYLE`,74:`UPDATE_LAYOUT_CONFIG`,76:`STR`,77:`STR_KEY`,78:`STR_VALUE`,79:`ATTRIBUTE`,80:`ATTRIBUTE_EMPTY`},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:W(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:r.setDirection(`TB`);break;case 4:r.setDirection(`BT`);break;case 5:r.setDirection(`RL`);break;case 6:r.setDirection(`LR`);break;case 8:case 9:case 10:case 11:case 12:r.setC4Type(a[s-3]);break;case 19:r.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 20:r.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 21:this.$=a[s].trim(),r.setTitle(this.$);break;case 22:case 23:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 28:a[s].splice(2,0,`ENTERPRISE`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 29:a[s].splice(2,0,`SYSTEM`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 30:r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 31:a[s].splice(2,0,`CONTAINER`),r.addContainerBoundary(...a[s]),this.$=a[s];break;case 32:r.addDeploymentNode(`node`,...a[s]),this.$=a[s];break;case 33:r.addDeploymentNode(`nodeL`,...a[s]),this.$=a[s];break;case 34:r.addDeploymentNode(`nodeR`,...a[s]),this.$=a[s];break;case 35:r.popBoundaryParseStack();break;case 39:r.addPersonOrSystem(`person`,...a[s]),this.$=a[s];break;case 40:r.addPersonOrSystem(`external_person`,...a[s]),this.$=a[s];break;case 41:r.addPersonOrSystem(`system`,...a[s]),this.$=a[s];break;case 42:r.addPersonOrSystem(`system_db`,...a[s]),this.$=a[s];break;case 43:r.addPersonOrSystem(`system_queue`,...a[s]),this.$=a[s];break;case 44:r.addPersonOrSystem(`external_system`,...a[s]),this.$=a[s];break;case 45:r.addPersonOrSystem(`external_system_db`,...a[s]),this.$=a[s];break;case 46:r.addPersonOrSystem(`external_system_queue`,...a[s]),this.$=a[s];break;case 47:r.addContainer(`container`,...a[s]),this.$=a[s];break;case 48:r.addContainer(`container_db`,...a[s]),this.$=a[s];break;case 49:r.addContainer(`container_queue`,...a[s]),this.$=a[s];break;case 50:r.addContainer(`external_container`,...a[s]),this.$=a[s];break;case 51:r.addContainer(`external_container_db`,...a[s]),this.$=a[s];break;case 52:r.addContainer(`external_container_queue`,...a[s]),this.$=a[s];break;case 53:r.addComponent(`component`,...a[s]),this.$=a[s];break;case 54:r.addComponent(`component_db`,...a[s]),this.$=a[s];break;case 55:r.addComponent(`component_queue`,...a[s]),this.$=a[s];break;case 56:r.addComponent(`external_component`,...a[s]),this.$=a[s];break;case 57:r.addComponent(`external_component_db`,...a[s]),this.$=a[s];break;case 58:r.addComponent(`external_component_queue`,...a[s]),this.$=a[s];break;case 60:r.addRel(`rel`,...a[s]),this.$=a[s];break;case 61:r.addRel(`birel`,...a[s]),this.$=a[s];break;case 62:r.addRel(`rel_u`,...a[s]),this.$=a[s];break;case 63:r.addRel(`rel_d`,...a[s]),this.$=a[s];break;case 64:r.addRel(`rel_l`,...a[s]),this.$=a[s];break;case 65:r.addRel(`rel_r`,...a[s]),this.$=a[s];break;case 66:r.addRel(`rel_b`,...a[s]),this.$=a[s];break;case 67:a[s].splice(0,1),r.addRel(`rel`,...a[s]),this.$=a[s];break;case 68:r.updateElStyle(`update_el_style`,...a[s]),this.$=a[s];break;case 69:r.updateRelStyle(`update_rel_style`,...a[s]),this.$=a[s];break;case 70:r.updateLayoutConfig(`update_layout_config`,...a[s]),this.$=a[s];break;case 71:this.$=[a[s]];break;case 72:a[s].unshift(a[s-1]),this.$=a[s];break;case 73:case 75:this.$=a[s].trim();break;case 74:let e={};e[a[s-1].trim()]=a[s].trim(),this.$=e;break;case 76:this.$=``}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:z,71:B,72:V,73:te,74:ne},{13:70,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:z,71:B,72:V,73:te,74:ne},{13:71,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:z,71:B,72:V,73:te,74:ne},{13:72,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:z,71:B,72:V,73:te,74:ne},{13:73,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:z,71:B,72:V,73:te,74:ne},{14:[1,74]},e(re,[2,13],{43:23,29:49,30:61,32:62,20:75,34:o,36:s,37:l,38:u,39:d,40:f,41:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:z,71:B,72:V,73:te,74:ne}),e(re,[2,14]),e(ie,[2,16],{12:[1,76]}),e(re,[2,36],{12:[1,77]}),e(ae,[2,19]),e(ae,[2,20]),{25:[1,78]},{27:[1,79]},e(ae,[2,23]),{35:80,75:81,76:oe,77:se,79:ce,80:le},{35:86,75:81,76:oe,77:se,79:ce,80:le},{35:87,75:81,76:oe,77:se,79:ce,80:le},{35:88,75:81,76:oe,77:se,79:ce,80:le},{35:89,75:81,76:oe,77:se,79:ce,80:le},{35:90,75:81,76:oe,77:se,79:ce,80:le},{35:91,75:81,76:oe,77:se,79:ce,80:le},{35:92,75:81,76:oe,77:se,79:ce,80:le},{35:93,75:81,76:oe,77:se,79:ce,80:le},{35:94,75:81,76:oe,77:se,79:ce,80:le},{35:95,75:81,76:oe,77:se,79:ce,80:le},{35:96,75:81,76:oe,77:se,79:ce,80:le},{35:97,75:81,76:oe,77:se,79:ce,80:le},{35:98,75:81,76:oe,77:se,79:ce,80:le},{35:99,75:81,76:oe,77:se,79:ce,80:le},{35:100,75:81,76:oe,77:se,79:ce,80:le},{35:101,75:81,76:oe,77:se,79:ce,80:le},{35:102,75:81,76:oe,77:se,79:ce,80:le},{35:103,75:81,76:oe,77:se,79:ce,80:le},{35:104,75:81,76:oe,77:se,79:ce,80:le},e(H,[2,59]),{35:105,75:81,76:oe,77:se,79:ce,80:le},{35:106,75:81,76:oe,77:se,79:ce,80:le},{35:107,75:81,76:oe,77:se,79:ce,80:le},{35:108,75:81,76:oe,77:se,79:ce,80:le},{35:109,75:81,76:oe,77:se,79:ce,80:le},{35:110,75:81,76:oe,77:se,79:ce,80:le},{35:111,75:81,76:oe,77:se,79:ce,80:le},{35:112,75:81,76:oe,77:se,79:ce,80:le},{35:113,75:81,76:oe,77:se,79:ce,80:le},{35:114,75:81,76:oe,77:se,79:ce,80:le},{35:115,75:81,76:oe,77:se,79:ce,80:le},{20:116,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:z,71:B,72:V,73:te,74:ne},{12:[1,118],33:[1,117]},{35:119,75:81,76:oe,77:se,79:ce,80:le},{35:120,75:81,76:oe,77:se,79:ce,80:le},{35:121,75:81,76:oe,77:se,79:ce,80:le},{35:122,75:81,76:oe,77:se,79:ce,80:le},{35:123,75:81,76:oe,77:se,79:ce,80:le},{35:124,75:81,76:oe,77:se,79:ce,80:le},{35:125,75:81,76:oe,77:se,79:ce,80:le},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(re,[2,15]),e(ie,[2,17],{21:22,19:130,22:t,23:n,24:r,26:i,28:a}),e(re,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:n,24:r,26:i,28:a,34:o,36:s,37:l,38:u,39:d,40:f,41:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:z,71:B,72:V,73:te,74:ne}),e(ae,[2,21]),e(ae,[2,22]),e(H,[2,39]),e(ue,[2,71],{75:81,35:132,76:oe,77:se,79:ce,80:le}),e(de,[2,73]),{78:[1,133]},e(de,[2,75]),e(de,[2,76]),e(H,[2,40]),e(H,[2,41]),e(H,[2,42]),e(H,[2,43]),e(H,[2,44]),e(H,[2,45]),e(H,[2,46]),e(H,[2,47]),e(H,[2,48]),e(H,[2,49]),e(H,[2,50]),e(H,[2,51]),e(H,[2,52]),e(H,[2,53]),e(H,[2,54]),e(H,[2,55]),e(H,[2,56]),e(H,[2,57]),e(H,[2,58]),e(H,[2,60]),e(H,[2,61]),e(H,[2,62]),e(H,[2,63]),e(H,[2,64]),e(H,[2,65]),e(H,[2,66]),e(H,[2,67]),e(H,[2,68]),e(H,[2,69]),e(H,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(fe,[2,28]),e(fe,[2,29]),e(fe,[2,30]),e(fe,[2,31]),e(fe,[2,32]),e(fe,[2,33]),e(fe,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(ie,[2,18]),e(re,[2,38]),e(ue,[2,72]),e(de,[2,74]),e(H,[2,24]),e(H,[2,35]),e(pe,[2,25]),e(pe,[2,26],{12:[1,138]}),e(pe,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:W(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:W(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}W(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}W(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
920
920
|
`+h.showPosition()+`
|
|
921
921
|
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};me.lexer=(function(){return{EOF:1,parseError:W(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:W(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:W(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:W(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:W(function(){return this._more=!0,this},`more`),reject:W(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
922
922
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:W(function(e){this.unput(this.match.slice(e))},`less`),pastInput:W(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:W(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:W(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
@@ -1402,7 +1402,7 @@ ${t}`),this.inline?`{${r}}`:r}},Z(ztt,`renderInlineTag`),Z(Btt,`renderLinkDefaul
|
|
|
1402
1402
|
`)}}},A$=class extends k${static{Z(this,`CommonValueConverter`)}runCustomConverter(e,t,n){}},j$=class extends DZ{static{Z(this,`AbstractMermaidTokenBuilder`)}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,n){let r=super.buildKeywordTokens(e,t,n);return r.forEach(e=>{this.keywords.has(e.name)&&e.PATTERN!==void 0&&(e.PATTERN=RegExp(e.PATTERN.toString()+`(?:(?=%%)|(?!\\S))`))}),r}},class extends j${static{Z(this,`CommonTokenBuilder`)}}}));function Hyt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),Nyt,Wyt);return t.ServiceRegistry.register(n),{shared:t,Radar:n}}var Uyt,Wyt,Gyt=o((()=>{M$(),Uyt=class extends j${static{Z(this,`RadarTokenBuilder`)}constructor(){super([`radar-beta`])}},Wyt={parser:{TokenBuilder:Z(()=>new Uyt,`TokenBuilder`),ValueConverter:Z(()=>new A$,`ValueConverter`)}},Z(Hyt,`createRadarServices`)}));function Kyt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),Iyt,Xyt);return t.ServiceRegistry.register(n),{shared:t,Railroad:n}}var qyt,Jyt,Yyt,Xyt,Zyt=o((()=>{M$(),qyt=class extends j${static{Z(this,`RailroadTokenBuilder`)}constructor(){super([`railroad-beta`])}},Jyt=Z(e=>{let t=e.slice(1,-1),n=``;for(let e=0;e<t.length;e++){let r=t[e];if(r===`\\`&&e+1<t.length){e++;let r=t[e];switch(r){case`n`:n+=`
|
|
1403
1403
|
`;break;case`r`:n+=`\r`;break;case`t`:n+=` `;break;default:n+=r}continue}n+=r}return n},`decodeEscapedString`),Yyt=class extends k${static{Z(this,`RailroadValueConverter`)}runConverter(e,t,n){let r=super.runConverter(e,t,n);if(e.name===`TITLE`&&typeof r==`string`){let e=r.trim();if(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))return Jyt(e)}return r}runCustomConverter(e,t,n){if(e.name===`RR_STRING`)return Jyt(t)}},Xyt={parser:{TokenBuilder:Z(()=>new qyt,`TokenBuilder`),ValueConverter:Z(()=>new Yyt,`ValueConverter`)}},Z(Kyt,`createRailroadServices`)}));function Qyt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),Fyt,nbt);return t.ServiceRegistry.register(n),{shared:t,RailroadEbnf:n}}var $yt,ebt,tbt,nbt,rbt=o((()=>{M$(),$yt=class extends j${static{Z(this,`RailroadEbnfTokenBuilder`)}constructor(){super([`railroad-ebnf-beta`])}},ebt=Z(e=>{let t=e.slice(1,-1),n=``;for(let e=0;e<t.length;e++){let r=t[e];if(r===`\\`&&e+1<t.length){e++;let r=t[e];switch(r){case`n`:n+=`
|
|
1404
1404
|
`;break;case`r`:n+=`\r`;break;case`t`:n+=` `;break;default:n+=r}continue}n+=r}return n},`decodeEscapedString`),tbt=class extends k${static{Z(this,`RailroadEbnfValueConverter`)}runConverter(e,t,n){let r=super.runConverter(e,t,n);if(e.name===`TITLE`&&typeof r==`string`){let e=r.trim();if(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))return ebt(e)}return r}runCustomConverter(e,t,n){if(e.name===`EBNF_STRING`)return ebt(t);if(e.name===`EBNF_SPECIAL_SEQUENCE`)return t.slice(1,-1).trim()}},nbt={parser:{TokenBuilder:Z(()=>new $yt,`TokenBuilder`),ValueConverter:Z(()=>new tbt,`ValueConverter`)}},Z(Qyt,`createRailroadEbnfServices`)}));function ibt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),Pyt,sbt);return t.ServiceRegistry.register(n),{shared:t,RailroadAbnf:n}}var abt,obt,sbt,cbt=o((()=>{M$(),abt=class extends j${static{Z(this,`RailroadAbnfTokenBuilder`)}constructor(){super([`railroad-abnf-beta`])}},obt=class extends k${static{Z(this,`RailroadAbnfValueConverter`)}runConverter(e,t,n){let r=super.runConverter(e,t,n);if(e.name===`TITLE`&&typeof r==`string`){let e=r.trim();if(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))return e.slice(1,-1)}return r}runCustomConverter(e,t,n){if(e.name===`ABNF_STRING`)return t.slice(1,-1)}},sbt={parser:{TokenBuilder:Z(()=>new abt,`TokenBuilder`),ValueConverter:Z(()=>new obt,`ValueConverter`)}},Z(ibt,`createRailroadAbnfServices`)}));function lbt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),Lyt,pbt);return t.ServiceRegistry.register(n),{shared:t,RailroadPeg:n}}var ubt,dbt,fbt,pbt,mbt=o((()=>{M$(),ubt=class extends j${static{Z(this,`RailroadPegTokenBuilder`)}constructor(){super([`railroad-peg-beta`])}},dbt=Z(e=>{let t=e.slice(1,-1),n=``;for(let e=0;e<t.length;e++){let r=t[e];if(r===`\\`&&e+1<t.length){e++;let r=t[e];switch(r){case`n`:n+=`
|
|
1405
|
-
`;break;case`r`:n+=`\r`;break;case`t`:n+=` `;break;default:n+=r}continue}n+=r}return n},`decodeEscapedString`),fbt=class extends k${static{Z(this,`RailroadPegValueConverter`)}runConverter(e,t,n){let r=super.runConverter(e,t,n);if(e.name===`TITLE`&&typeof r==`string`){let e=r.trim();if(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))return dbt(e)}return r}runCustomConverter(e,t,n){if(e.name===`PEG_STRING`)return dbt(t)}},pbt={parser:{TokenBuilder:Z(()=>new ubt,`TokenBuilder`),ValueConverter:Z(()=>new fbt,`ValueConverter`)}},Z(lbt,`createRailroadPegServices`)}));function hbt(e){let t=e.validation.TreemapValidator,n=e.validation.ValidationRegistry;if(n){let e={Treemap:t.checkSingleRoot.bind(t)};n.register(e,t)}}function gbt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),Ryt,xbt);return t.ServiceRegistry.register(n),hbt(n),{shared:t,Treemap:n}}var _bt,vbt,ybt,bbt,xbt,Sbt=o((()=>{M$(),_bt=class extends j${static{Z(this,`TreemapTokenBuilder`)}constructor(){super([`treemap`])}},vbt=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,ybt=class extends k${static{Z(this,`TreemapValueConverter`)}runCustomConverter(e,t,n){if(e.name===`NUMBER2`)return parseFloat(t.replace(/,/g,``));if(e.name===`SEPARATOR`||e.name===`STRING2`)return t.substring(1,t.length-1);if(e.name===`INDENTATION`)return t.length;if(e.name===`ClassDef`){if(typeof t!=`string`)return t;let e=vbt.exec(t);if(e)return{$type:`ClassDefStatement`,className:e[1],styleText:e[2]||void 0}}}},Z(hbt,`registerValidationChecks`),bbt=class{static{Z(this,`TreemapValidator`)}checkSingleRoot(e,t){let n;for(let r of e.TreemapRows)r.item&&(n===void 0&&r.indent===void 0?n=0:(r.indent===void 0||n!==void 0&&n>=parseInt(r.indent,10))&&t(`error`,`Multiple root nodes are not allowed in a treemap.`,{node:r,property:`item`}))}},xbt={parser:{TokenBuilder:Z(()=>new _bt,`TokenBuilder`),ValueConverter:Z(()=>new ybt,`ValueConverter`)},validation:{TreemapValidator:Z(()=>new bbt,`TreemapValidator`)}},Z(gbt,`createTreemapServices`)}));function Cbt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),Byt,Tbt);return t.ServiceRegistry.register(n),{shared:t,Wardley:n}}var wbt,Tbt,Ebt=o((()=>{M$(),wbt=class extends k${static{Z(this,`WardleyValueConverter`)}runCustomConverter(e,t,n){switch(e.name.toUpperCase()){case`LINK_LABEL`:return t.substring(1).trim();default:return}}},Tbt={parser:{ValueConverter:Z(()=>new wbt,`ValueConverter`)}},Z(Cbt,`createWardleyServices`)}));function Dbt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),Dyt,kbt);return t.ServiceRegistry.register(n),{shared:t,Cynefin:n}}var Obt,kbt,Abt=o((()=>{M$(),Obt=class extends j${static{Z(this,`CynefinTokenBuilder`)}constructor(){super([`cynefin-beta`])}},kbt={parser:{TokenBuilder:Z(()=>new Obt,`TokenBuilder`),ValueConverter:Z(()=>new A$,`ValueConverter`)}},Z(Dbt,`createCynefinServices`)}));function jbt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),kyt,Nbt);return t.ServiceRegistry.register(n),{shared:t,GitGraph:n}}var Mbt,Nbt,Pbt=o((()=>{M$(),Mbt=class extends j${static{Z(this,`GitGraphTokenBuilder`)}constructor(){super([`gitGraph`])}},Nbt={parser:{TokenBuilder:Z(()=>new Mbt,`TokenBuilder`),ValueConverter:Z(()=>new A$,`ValueConverter`)}},Z(jbt,`createGitGraphServices`)}));function Fbt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),Ayt,Lbt);return t.ServiceRegistry.register(n),{shared:t,Info:n}}var Ibt,Lbt,Rbt=o((()=>{M$(),Ibt=class extends j${static{Z(this,`InfoTokenBuilder`)}constructor(){super([`info`,`showInfo`])}},Lbt={parser:{TokenBuilder:Z(()=>new Ibt,`TokenBuilder`),ValueConverter:Z(()=>new A$,`ValueConverter`)}},Z(Fbt,`createInfoServices`)}));function zbt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),jyt,Vbt);return t.ServiceRegistry.register(n),{shared:t,Packet:n}}var Bbt,Vbt,Hbt=o((()=>{M$(),Bbt=class extends j${static{Z(this,`PacketTokenBuilder`)}constructor(){super([`packet`])}},Vbt={parser:{TokenBuilder:Z(()=>new Bbt,`TokenBuilder`),ValueConverter:Z(()=>new A$,`ValueConverter`)}},Z(zbt,`createPacketServices`)}));function Ubt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),Myt,Kbt);return t.ServiceRegistry.register(n),{shared:t,Pie:n}}var Wbt,Gbt,Kbt,qbt=o((()=>{M$(),Wbt=class extends j${static{Z(this,`PieTokenBuilder`)}constructor(){super([`pie`,`showData`])}},Gbt=class extends k${static{Z(this,`PieValueConverter`)}runCustomConverter(e,t,n){if(e.name===`PIE_SECTION_LABEL`)return t.replace(/"/g,``).trim()}},Kbt={parser:{TokenBuilder:Z(()=>new Wbt,`TokenBuilder`),ValueConverter:Z(()=>new Gbt,`ValueConverter`)}},Z(Ubt,`createPieServices`)}));function Jbt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),zyt,Zbt);return t.ServiceRegistry.register(n),{shared:t,TreeView:n}}var Ybt,Xbt,Zbt,Qbt=o((()=>{M$(),Ybt=class extends k${static{Z(this,`TreeViewValueConverter`)}runCustomConverter(e,t,n){if(e.name===`INDENTATION`)return t?.length||0;if(e.name===`QUOTED_NAME`)return t.substring(1,t.length-1);if(e.name===`BARE_NAME`)return t.replace(/[\t ]+$/,``);if(e.name===`CLASS_ANNOTATION`)return t.trim().substring(3).trim();if(e.name===`ICON_ANNOTATION`){let e=t.trim();return e.substring(5,e.length-1)}if(e.name===`DESC_ANNOTATION`)return t.trim().substring(2).trim()}},Xbt=class extends j${static{Z(this,`TreeViewTokenBuilder`)}constructor(){super([`treeView-beta`])}},Zbt={parser:{TokenBuilder:Z(()=>new Xbt,`TokenBuilder`),ValueConverter:Z(()=>new Ybt,`ValueConverter`)}},Z(Jbt,`createTreeViewServices`)}));function $bt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),Eyt,nxt);return t.ServiceRegistry.register(n),{shared:t,Architecture:n}}var ext,txt,nxt,rxt=o((()=>{M$(),ext=class extends j${static{Z(this,`ArchitectureTokenBuilder`)}constructor(){super([`architecture`])}},txt=class extends k${static{Z(this,`ArchitectureValueConverter`)}runCustomConverter(e,t,n){if(e.name===`ARCH_ICON`)return t.replace(/[()]/g,``).trim();if(e.name===`ARCH_TEXT_ICON`)return t.replace(/["()]/g,``);if(e.name===`ARCH_TITLE`){let e=t.replace(/^\[|]$/g,``).trim();return(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))&&(e=e.slice(1,-1),e=e.replace(/\\"/g,`"`).replace(/\\'/g,`'`)),e.trim()}}},nxt={parser:{TokenBuilder:Z(()=>new ext,`TokenBuilder`),ValueConverter:Z(()=>new txt,`ValueConverter`)}},Z($bt,`createArchitectureServices`)}));function ixt(e){let t=e.validation.EventModelingValidator,n=e.validation.ValidationRegistry;if(n){let e={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};n.register(e,t)}}function axt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),Oyt,fxt);return t.ServiceRegistry.register(n),ixt(n),{shared:t,EventModel:n}}var oxt,sxt,cxt,N$,lxt,uxt,dxt,fxt,pxt=o((()=>{M$(),oxt=class extends j${static{Z(this,`EventModelingTokenBuilder`)}constructor(){super([`eventmodeling`])}},sxt=new Set([`cmd`,`command`]),cxt=new Set([`evt`,`event`]),N$=new Set([`rmo`,`readmodel`]),lxt=new Set([`pcr`,`processor`]),uxt=new Set([`ui`]),Z(ixt,`registerValidationChecks`),dxt=class{static{Z(this,`EventModelingValidator`)}checkSourceFrameTypes(e,t){e.sourceFrames.length!==0&&(sxt.has(e.modelEntityType)?this.validateSources(e,new Set([...uxt,...lxt]),`command`,`ui or processor`,t):cxt.has(e.modelEntityType)?this.validateSources(e,sxt,`event`,`command`,t):N$.has(e.modelEntityType)?this.validateSources(e,cxt,`read model`,`event`,t):lxt.has(e.modelEntityType)?this.validateSources(e,N$,`processor`,`read model`,t):uxt.has(e.modelEntityType)&&this.validateSources(e,N$,`ui`,`read model`,t))}validateSources(e,t,n,r,i){for(let a of e.sourceFrames){let o=a.ref;o!==void 0&&!t.has(o.modelEntityType)&&i(`error`,`A ${n} can only receive input from a ${r}, not from '${o.modelEntityType}'.`,{node:e,property:`sourceFrames`})}}},fxt={parser:{TokenBuilder:Z(()=>new oxt,`TokenBuilder`),ValueConverter:Z(()=>new A$,`ValueConverter`)},validation:{EventModelingValidator:Z(()=>new dxt,`EventModelingValidator`)}},Z(axt,`createEventModelingServices`)})),mxt=l({InfoModule:()=>Lbt,createInfoServices:()=>Fbt}),hxt=o((()=>{Rbt(),M$()})),gxt=l({PacketModule:()=>Vbt,createPacketServices:()=>zbt}),_xt=o((()=>{Hbt(),M$()})),vxt=l({PieModule:()=>Kbt,createPieServices:()=>Ubt}),yxt=o((()=>{qbt(),M$()})),bxt=l({TreeViewModule:()=>Zbt,createTreeViewServices:()=>Jbt}),xxt=o((()=>{Qbt(),M$()})),Sxt=l({ArchitectureModule:()=>nxt,createArchitectureServices:()=>$bt}),Cxt=o((()=>{rxt(),M$()})),wxt=l({GitGraphModule:()=>Nbt,createGitGraphServices:()=>jbt}),Txt=o((()=>{Pbt(),M$()})),Ext=l({EventModelingModule:()=>fxt,createEventModelingServices:()=>axt}),Dxt=o((()=>{pxt(),M$()})),Oxt=l({RadarModule:()=>Wyt,createRadarServices:()=>Hyt}),kxt=o((()=>{Gyt(),M$()})),Axt=l({RailroadModule:()=>Xyt,createRailroadServices:()=>Kyt}),jxt=o((()=>{Zyt(),M$()})),Mxt=l({RailroadEbnfModule:()=>nbt,createRailroadEbnfServices:()=>Qyt}),Nxt=o((()=>{rbt(),M$()})),Pxt=l({RailroadAbnfModule:()=>sbt,createRailroadAbnfServices:()=>ibt}),Fxt=o((()=>{cbt(),M$()})),Ixt=l({RailroadPegModule:()=>pbt,createRailroadPegServices:()=>lbt}),Lxt=o((()=>{mbt(),M$()})),Rxt=l({TreemapModule:()=>xbt,createTreemapServices:()=>gbt}),zxt=o((()=>{Sbt(),M$()})),Bxt=l({WardleyModule:()=>Tbt,createWardleyServices:()=>Cbt}),Vxt=o((()=>{Ebt(),M$()})),Hxt=l({CynefinModule:()=>kbt,createCynefinServices:()=>Dbt}),Uxt=o((()=>{Abt(),M$()}));async function P$(e,t){let n=Wxt[e];if(!n)throw Error(`Unknown diagram type: ${e}`);F$[e]||await n();let r=F$[e].parse(t);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new I$(r);return r.value}var F$,Wxt,I$,L$=o((()=>{Gyt(),Zyt(),rbt(),cbt(),mbt(),Sbt(),Ebt(),Abt(),Pbt(),Rbt(),Hbt(),qbt(),Qbt(),rxt(),pxt(),M$(),zp(),F$={},Wxt={info:Z(async()=>{let{createInfoServices:e}=await Rp(async()=>{let{createInfoServices:e}=await Promise.resolve().then(()=>(hxt(),mxt));return{createInfoServices:e}},void 0);F$.info=e().Info.parser.LangiumParser},`info`),packet:Z(async()=>{let{createPacketServices:e}=await Rp(async()=>{let{createPacketServices:e}=await Promise.resolve().then(()=>(_xt(),gxt));return{createPacketServices:e}},void 0);F$.packet=e().Packet.parser.LangiumParser},`packet`),pie:Z(async()=>{let{createPieServices:e}=await Rp(async()=>{let{createPieServices:e}=await Promise.resolve().then(()=>(yxt(),vxt));return{createPieServices:e}},void 0);F$.pie=e().Pie.parser.LangiumParser},`pie`),treeView:Z(async()=>{let{createTreeViewServices:e}=await Rp(async()=>{let{createTreeViewServices:e}=await Promise.resolve().then(()=>(xxt(),bxt));return{createTreeViewServices:e}},void 0);F$.treeView=e().TreeView.parser.LangiumParser},`treeView`),architecture:Z(async()=>{let{createArchitectureServices:e}=await Rp(async()=>{let{createArchitectureServices:e}=await Promise.resolve().then(()=>(Cxt(),Sxt));return{createArchitectureServices:e}},void 0);F$.architecture=e().Architecture.parser.LangiumParser},`architecture`),gitGraph:Z(async()=>{let{createGitGraphServices:e}=await Rp(async()=>{let{createGitGraphServices:e}=await Promise.resolve().then(()=>(Txt(),wxt));return{createGitGraphServices:e}},void 0);F$.gitGraph=e().GitGraph.parser.LangiumParser},`gitGraph`),eventmodeling:Z(async()=>{let{createEventModelingServices:e}=await Rp(async()=>{let{createEventModelingServices:e}=await Promise.resolve().then(()=>(Dxt(),Ext));return{createEventModelingServices:e}},void 0);F$.eventmodeling=e().EventModel.parser.LangiumParser},`eventmodeling`),radar:Z(async()=>{let{createRadarServices:e}=await Rp(async()=>{let{createRadarServices:e}=await Promise.resolve().then(()=>(kxt(),Oxt));return{createRadarServices:e}},void 0);F$.radar=e().Radar.parser.LangiumParser},`radar`),railroad:Z(async()=>{let{createRailroadServices:e}=await Rp(async()=>{let{createRailroadServices:e}=await Promise.resolve().then(()=>(jxt(),Axt));return{createRailroadServices:e}},void 0);F$.railroad=e().Railroad.parser.LangiumParser},`railroad`),railroadEbnf:Z(async()=>{let{createRailroadEbnfServices:e}=await Rp(async()=>{let{createRailroadEbnfServices:e}=await Promise.resolve().then(()=>(Nxt(),Mxt));return{createRailroadEbnfServices:e}},void 0);F$.railroadEbnf=e().RailroadEbnf.parser.LangiumParser},`railroadEbnf`),railroadAbnf:Z(async()=>{let{createRailroadAbnfServices:e}=await Rp(async()=>{let{createRailroadAbnfServices:e}=await Promise.resolve().then(()=>(Fxt(),Pxt));return{createRailroadAbnfServices:e}},void 0);F$.railroadAbnf=e().RailroadAbnf.parser.LangiumParser},`railroadAbnf`),railroadPeg:Z(async()=>{let{createRailroadPegServices:e}=await Rp(async()=>{let{createRailroadPegServices:e}=await Promise.resolve().then(()=>(Lxt(),Ixt));return{createRailroadPegServices:e}},void 0);F$.railroadPeg=e().RailroadPeg.parser.LangiumParser},`railroadPeg`),treemap:Z(async()=>{let{createTreemapServices:e}=await Rp(async()=>{let{createTreemapServices:e}=await Promise.resolve().then(()=>(zxt(),Rxt));return{createTreemapServices:e}},void 0);F$.treemap=e().Treemap.parser.LangiumParser},`treemap`),wardley:Z(async()=>{let{createWardleyServices:e}=await Rp(async()=>{let{createWardleyServices:e}=await Promise.resolve().then(()=>(Vxt(),Bxt));return{createWardleyServices:e}},void 0);F$.wardley=e().Wardley.parser.LangiumParser},`wardley`),cynefin:Z(async()=>{let{createCynefinServices:e}=await Rp(async()=>{let{createCynefinServices:e}=await Promise.resolve().then(()=>(Uxt(),Hxt));return{createCynefinServices:e}},void 0);F$.cynefin=e().Cynefin.parser.LangiumParser},`cynefin`)},Z(P$,`parse`),I$=class extends Error{constructor(e){let t=e.lexerErrors.map(e=>`Lexer error on line ${e.line!==void 0&&!isNaN(e.line)?e.line:`?`}, column ${e.column!==void 0&&!isNaN(e.column)?e.column:`?`}: ${e.message}`).join(`
|
|
1405
|
+
`;break;case`r`:n+=`\r`;break;case`t`:n+=` `;break;default:n+=r}continue}n+=r}return n},`decodeEscapedString`),fbt=class extends k${static{Z(this,`RailroadPegValueConverter`)}runConverter(e,t,n){let r=super.runConverter(e,t,n);if(e.name===`TITLE`&&typeof r==`string`){let e=r.trim();if(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))return dbt(e)}return r}runCustomConverter(e,t,n){if(e.name===`PEG_STRING`)return dbt(t)}},pbt={parser:{TokenBuilder:Z(()=>new ubt,`TokenBuilder`),ValueConverter:Z(()=>new fbt,`ValueConverter`)}},Z(lbt,`createRailroadPegServices`)}));function hbt(e){let t=e.validation.TreemapValidator,n=e.validation.ValidationRegistry;if(n){let e={Treemap:t.checkSingleRoot.bind(t)};n.register(e,t)}}function gbt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),Ryt,xbt);return t.ServiceRegistry.register(n),hbt(n),{shared:t,Treemap:n}}var _bt,vbt,ybt,bbt,xbt,Sbt=o((()=>{M$(),_bt=class extends j${static{Z(this,`TreemapTokenBuilder`)}constructor(){super([`treemap`])}},vbt=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,ybt=class extends k${static{Z(this,`TreemapValueConverter`)}runCustomConverter(e,t,n){if(e.name===`NUMBER2`)return parseFloat(t.replace(/,/g,``));if(e.name===`SEPARATOR`||e.name===`STRING2`)return t.substring(1,t.length-1);if(e.name===`INDENTATION`)return t.length;if(e.name===`ClassDef`){if(typeof t!=`string`)return t;let e=vbt.exec(t);if(e)return{$type:`ClassDefStatement`,className:e[1],styleText:e[2]||void 0}}}},Z(hbt,`registerValidationChecks`),bbt=class{static{Z(this,`TreemapValidator`)}checkSingleRoot(e,t){let n;for(let r of e.TreemapRows)r.item&&(n===void 0&&r.indent===void 0?n=0:(r.indent===void 0||n!==void 0&&n>=parseInt(r.indent,10))&&t(`error`,`Multiple root nodes are not allowed in a treemap.`,{node:r,property:`item`}))}},xbt={parser:{TokenBuilder:Z(()=>new _bt,`TokenBuilder`),ValueConverter:Z(()=>new ybt,`ValueConverter`)},validation:{TreemapValidator:Z(()=>new bbt,`TreemapValidator`)}},Z(gbt,`createTreemapServices`)}));function Cbt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),Byt,Tbt);return t.ServiceRegistry.register(n),{shared:t,Wardley:n}}var wbt,Tbt,Ebt=o((()=>{M$(),wbt=class extends k${static{Z(this,`WardleyValueConverter`)}runCustomConverter(e,t,n){switch(e.name.toUpperCase()){case`LINK_LABEL`:return t.substring(1).trim();default:return}}},Tbt={parser:{ValueConverter:Z(()=>new wbt,`ValueConverter`)}},Z(Cbt,`createWardleyServices`)}));function Dbt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),Dyt,kbt);return t.ServiceRegistry.register(n),{shared:t,Cynefin:n}}var Obt,kbt,Abt=o((()=>{M$(),Obt=class extends j${static{Z(this,`CynefinTokenBuilder`)}constructor(){super([`cynefin-beta`])}},kbt={parser:{TokenBuilder:Z(()=>new Obt,`TokenBuilder`),ValueConverter:Z(()=>new A$,`ValueConverter`)}},Z(Dbt,`createCynefinServices`)}));function jbt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),kyt,Nbt);return t.ServiceRegistry.register(n),{shared:t,GitGraph:n}}var Mbt,Nbt,Pbt=o((()=>{M$(),Mbt=class extends j${static{Z(this,`GitGraphTokenBuilder`)}constructor(){super([`gitGraph`])}},Nbt={parser:{TokenBuilder:Z(()=>new Mbt,`TokenBuilder`),ValueConverter:Z(()=>new A$,`ValueConverter`)}},Z(jbt,`createGitGraphServices`)}));function Fbt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),Ayt,Lbt);return t.ServiceRegistry.register(n),{shared:t,Info:n}}var Ibt,Lbt,Rbt=o((()=>{M$(),Ibt=class extends j${static{Z(this,`InfoTokenBuilder`)}constructor(){super([`info`,`showInfo`])}},Lbt={parser:{TokenBuilder:Z(()=>new Ibt,`TokenBuilder`),ValueConverter:Z(()=>new A$,`ValueConverter`)}},Z(Fbt,`createInfoServices`)}));function zbt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),jyt,Vbt);return t.ServiceRegistry.register(n),{shared:t,Packet:n}}var Bbt,Vbt,Hbt=o((()=>{M$(),Bbt=class extends j${static{Z(this,`PacketTokenBuilder`)}constructor(){super([`packet`])}},Vbt={parser:{TokenBuilder:Z(()=>new Bbt,`TokenBuilder`),ValueConverter:Z(()=>new A$,`ValueConverter`)}},Z(zbt,`createPacketServices`)}));function Ubt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),Myt,Kbt);return t.ServiceRegistry.register(n),{shared:t,Pie:n}}var Wbt,Gbt,Kbt,qbt=o((()=>{M$(),Wbt=class extends j${static{Z(this,`PieTokenBuilder`)}constructor(){super([`pie`,`showData`])}},Gbt=class extends k${static{Z(this,`PieValueConverter`)}runCustomConverter(e,t,n){if(e.name===`PIE_SECTION_LABEL`)return t.replace(/"/g,``).trim()}},Kbt={parser:{TokenBuilder:Z(()=>new Wbt,`TokenBuilder`),ValueConverter:Z(()=>new Gbt,`ValueConverter`)}},Z(Ubt,`createPieServices`)}));function Jbt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),zyt,Zbt);return t.ServiceRegistry.register(n),{shared:t,TreeView:n}}var Ybt,Xbt,Zbt,Qbt=o((()=>{M$(),Ybt=class extends k${static{Z(this,`TreeViewValueConverter`)}runCustomConverter(e,t,n){if(e.name===`INDENTATION`)return t?.length||0;if(e.name===`QUOTED_NAME`)return t.substring(1,t.length-1);if(e.name===`BARE_NAME`)return t.replace(/[\t ]+$/,``);if(e.name===`CLASS_ANNOTATION`)return t.trim().substring(3).trim();if(e.name===`ICON_ANNOTATION`){let e=t.trim();return e.substring(5,e.length-1)}if(e.name===`DESC_ANNOTATION`)return t.trim().substring(2).trim()}},Xbt=class extends j${static{Z(this,`TreeViewTokenBuilder`)}constructor(){super([`treeView-beta`])}},Zbt={parser:{TokenBuilder:Z(()=>new Xbt,`TokenBuilder`),ValueConverter:Z(()=>new Ybt,`ValueConverter`)}},Z(Jbt,`createTreeViewServices`)}));function $bt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),Eyt,nxt);return t.ServiceRegistry.register(n),{shared:t,Architecture:n}}var ext,txt,nxt,rxt=o((()=>{M$(),ext=class extends j${static{Z(this,`ArchitectureTokenBuilder`)}constructor(){super([`architecture`])}},txt=class extends k${static{Z(this,`ArchitectureValueConverter`)}runCustomConverter(e,t,n){if(e.name===`ARCH_ICON`)return t.replace(/[()]/g,``).trim();if(e.name===`ARCH_TEXT_ICON`)return t.replace(/["()]/g,``);if(e.name===`ARCH_TITLE`){let e=t.replace(/^\[|]$/g,``).trim();return(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))&&(e=e.slice(1,-1),e=e.replace(/\\"/g,`"`).replace(/\\'/g,`'`)),e.trim()}}},nxt={parser:{TokenBuilder:Z(()=>new ext,`TokenBuilder`),ValueConverter:Z(()=>new txt,`ValueConverter`)}},Z($bt,`createArchitectureServices`)}));function ixt(e){let t=e.validation.EventModelingValidator,n=e.validation.ValidationRegistry;if(n){let e={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};n.register(e,t)}}function axt(e=iQ){let t=zG(RG(e),O$),n=zG(LG({shared:t}),Oyt,fxt);return t.ServiceRegistry.register(n),ixt(n),{shared:t,EventModel:n}}var oxt,sxt,cxt,N$,lxt,uxt,dxt,fxt,pxt=o((()=>{M$(),oxt=class extends j${static{Z(this,`EventModelingTokenBuilder`)}constructor(){super([`eventmodeling`])}},sxt=new Set([`cmd`,`command`]),cxt=new Set([`evt`,`event`]),N$=new Set([`rmo`,`readmodel`]),lxt=new Set([`pcr`,`processor`]),uxt=new Set([`ui`]),Z(ixt,`registerValidationChecks`),dxt=class{static{Z(this,`EventModelingValidator`)}checkSourceFrameTypes(e,t){e.sourceFrames.length!==0&&(sxt.has(e.modelEntityType)?this.validateSources(e,new Set([...uxt,...lxt]),`command`,`ui or processor`,t):cxt.has(e.modelEntityType)?this.validateSources(e,sxt,`event`,`command`,t):N$.has(e.modelEntityType)?this.validateSources(e,cxt,`read model`,`event`,t):lxt.has(e.modelEntityType)?this.validateSources(e,N$,`processor`,`read model`,t):uxt.has(e.modelEntityType)&&this.validateSources(e,N$,`ui`,`read model`,t))}validateSources(e,t,n,r,i){for(let a of e.sourceFrames){let o=a.ref;o!==void 0&&!t.has(o.modelEntityType)&&i(`error`,`A ${n} can only receive input from a ${r}, not from '${o.modelEntityType}'.`,{node:e,property:`sourceFrames`})}}},fxt={parser:{TokenBuilder:Z(()=>new oxt,`TokenBuilder`),ValueConverter:Z(()=>new A$,`ValueConverter`)},validation:{EventModelingValidator:Z(()=>new dxt,`EventModelingValidator`)}},Z(axt,`createEventModelingServices`)})),mxt=l({InfoModule:()=>Lbt,createInfoServices:()=>Fbt}),hxt=o((()=>{Rbt(),M$()})),gxt=l({PacketModule:()=>Vbt,createPacketServices:()=>zbt}),_xt=o((()=>{Hbt(),M$()})),vxt=l({PieModule:()=>Kbt,createPieServices:()=>Ubt}),yxt=o((()=>{qbt(),M$()})),bxt=l({TreeViewModule:()=>Zbt,createTreeViewServices:()=>Jbt}),xxt=o((()=>{Qbt(),M$()})),Sxt=l({ArchitectureModule:()=>nxt,createArchitectureServices:()=>$bt}),Cxt=o((()=>{rxt(),M$()})),wxt=l({GitGraphModule:()=>Nbt,createGitGraphServices:()=>jbt}),Txt=o((()=>{Pbt(),M$()})),Ext=l({EventModelingModule:()=>fxt,createEventModelingServices:()=>axt}),Dxt=o((()=>{pxt(),M$()})),Oxt=l({RadarModule:()=>Wyt,createRadarServices:()=>Hyt}),kxt=o((()=>{Gyt(),M$()})),Axt=l({RailroadModule:()=>Xyt,createRailroadServices:()=>Kyt}),jxt=o((()=>{Zyt(),M$()})),Mxt=l({RailroadEbnfModule:()=>nbt,createRailroadEbnfServices:()=>Qyt}),Nxt=o((()=>{rbt(),M$()})),Pxt=l({RailroadAbnfModule:()=>sbt,createRailroadAbnfServices:()=>ibt}),Fxt=o((()=>{cbt(),M$()})),Ixt=l({RailroadPegModule:()=>pbt,createRailroadPegServices:()=>lbt}),Lxt=o((()=>{mbt(),M$()})),Rxt=l({TreemapModule:()=>xbt,createTreemapServices:()=>gbt}),zxt=o((()=>{Sbt(),M$()})),Bxt=l({WardleyModule:()=>Tbt,createWardleyServices:()=>Cbt}),Vxt=o((()=>{Ebt(),M$()})),Hxt=l({CynefinModule:()=>kbt,createCynefinServices:()=>Dbt}),Uxt=o((()=>{Abt(),M$()}));async function P$(e,t){let n=Wxt[e];if(!n)throw Error(`Unknown diagram type: ${e}`);F$[e]||await n();let r=F$[e].parse(t);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new I$(r);return r.value}var F$,Wxt,I$,L$=o((()=>{Gyt(),Zyt(),rbt(),cbt(),mbt(),Sbt(),Ebt(),Abt(),Pbt(),Rbt(),Hbt(),qbt(),Qbt(),rxt(),pxt(),M$(),zp(),F$={},Wxt={info:Z(async()=>{let{createInfoServices:e}=await Rp(async()=>{let{createInfoServices:e}=await Promise.resolve().then(()=>(hxt(),mxt));return{createInfoServices:e}},void 0,import.meta.url);F$.info=e().Info.parser.LangiumParser},`info`),packet:Z(async()=>{let{createPacketServices:e}=await Rp(async()=>{let{createPacketServices:e}=await Promise.resolve().then(()=>(_xt(),gxt));return{createPacketServices:e}},void 0,import.meta.url);F$.packet=e().Packet.parser.LangiumParser},`packet`),pie:Z(async()=>{let{createPieServices:e}=await Rp(async()=>{let{createPieServices:e}=await Promise.resolve().then(()=>(yxt(),vxt));return{createPieServices:e}},void 0,import.meta.url);F$.pie=e().Pie.parser.LangiumParser},`pie`),treeView:Z(async()=>{let{createTreeViewServices:e}=await Rp(async()=>{let{createTreeViewServices:e}=await Promise.resolve().then(()=>(xxt(),bxt));return{createTreeViewServices:e}},void 0,import.meta.url);F$.treeView=e().TreeView.parser.LangiumParser},`treeView`),architecture:Z(async()=>{let{createArchitectureServices:e}=await Rp(async()=>{let{createArchitectureServices:e}=await Promise.resolve().then(()=>(Cxt(),Sxt));return{createArchitectureServices:e}},void 0,import.meta.url);F$.architecture=e().Architecture.parser.LangiumParser},`architecture`),gitGraph:Z(async()=>{let{createGitGraphServices:e}=await Rp(async()=>{let{createGitGraphServices:e}=await Promise.resolve().then(()=>(Txt(),wxt));return{createGitGraphServices:e}},void 0,import.meta.url);F$.gitGraph=e().GitGraph.parser.LangiumParser},`gitGraph`),eventmodeling:Z(async()=>{let{createEventModelingServices:e}=await Rp(async()=>{let{createEventModelingServices:e}=await Promise.resolve().then(()=>(Dxt(),Ext));return{createEventModelingServices:e}},void 0,import.meta.url);F$.eventmodeling=e().EventModel.parser.LangiumParser},`eventmodeling`),radar:Z(async()=>{let{createRadarServices:e}=await Rp(async()=>{let{createRadarServices:e}=await Promise.resolve().then(()=>(kxt(),Oxt));return{createRadarServices:e}},void 0,import.meta.url);F$.radar=e().Radar.parser.LangiumParser},`radar`),railroad:Z(async()=>{let{createRailroadServices:e}=await Rp(async()=>{let{createRailroadServices:e}=await Promise.resolve().then(()=>(jxt(),Axt));return{createRailroadServices:e}},void 0,import.meta.url);F$.railroad=e().Railroad.parser.LangiumParser},`railroad`),railroadEbnf:Z(async()=>{let{createRailroadEbnfServices:e}=await Rp(async()=>{let{createRailroadEbnfServices:e}=await Promise.resolve().then(()=>(Nxt(),Mxt));return{createRailroadEbnfServices:e}},void 0,import.meta.url);F$.railroadEbnf=e().RailroadEbnf.parser.LangiumParser},`railroadEbnf`),railroadAbnf:Z(async()=>{let{createRailroadAbnfServices:e}=await Rp(async()=>{let{createRailroadAbnfServices:e}=await Promise.resolve().then(()=>(Fxt(),Pxt));return{createRailroadAbnfServices:e}},void 0,import.meta.url);F$.railroadAbnf=e().RailroadAbnf.parser.LangiumParser},`railroadAbnf`),railroadPeg:Z(async()=>{let{createRailroadPegServices:e}=await Rp(async()=>{let{createRailroadPegServices:e}=await Promise.resolve().then(()=>(Lxt(),Ixt));return{createRailroadPegServices:e}},void 0,import.meta.url);F$.railroadPeg=e().RailroadPeg.parser.LangiumParser},`railroadPeg`),treemap:Z(async()=>{let{createTreemapServices:e}=await Rp(async()=>{let{createTreemapServices:e}=await Promise.resolve().then(()=>(zxt(),Rxt));return{createTreemapServices:e}},void 0,import.meta.url);F$.treemap=e().Treemap.parser.LangiumParser},`treemap`),wardley:Z(async()=>{let{createWardleyServices:e}=await Rp(async()=>{let{createWardleyServices:e}=await Promise.resolve().then(()=>(Vxt(),Bxt));return{createWardleyServices:e}},void 0,import.meta.url);F$.wardley=e().Wardley.parser.LangiumParser},`wardley`),cynefin:Z(async()=>{let{createCynefinServices:e}=await Rp(async()=>{let{createCynefinServices:e}=await Promise.resolve().then(()=>(Uxt(),Hxt));return{createCynefinServices:e}},void 0,import.meta.url);F$.cynefin=e().Cynefin.parser.LangiumParser},`cynefin`)},Z(P$,`parse`),I$=class extends Error{constructor(e){let t=e.lexerErrors.map(e=>`Lexer error on line ${e.line!==void 0&&!isNaN(e.line)?e.line:`?`}, column ${e.column!==void 0&&!isNaN(e.column)?e.column:`?`}: ${e.message}`).join(`
|
|
1406
1406
|
`),n=e.parserErrors.map(e=>`Parse error on line ${e.token.startLine!==void 0&&!isNaN(e.token.startLine)?e.token.startLine:`?`}, column ${e.token.startColumn!==void 0&&!isNaN(e.token.startColumn)?e.token.startColumn:`?`}: ${e.message}`).join(`
|
|
1407
1407
|
`);super(`Parsing failed: ${t} ${n}`),this.result=e}static{Z(this,`MermaidParseError`)}}})),Gxt=l({diagram:()=>ZSt});function R$(){return sCe({length:7})}function Kxt(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}function qxt(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}function Jxt(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),n=``;e.forEach(function(e){n+=e===t?` *`:` |`});let r=[n,t.id,t.seq];for(let e in V$.records.branches)V$.records.branches.get(e)===t.id&&r.push(e);if(G.debug(r.join(` `)),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=V$.records.commits.get(t.parents[0]);qxt(e,t,n),t.parents[1]&&e.push(V$.records.commits.get(t.parents[1]))}else if(t.parents.length==0)return;else if(t.parents[0]){let n=V$.records.commits.get(t.parents[0]);qxt(e,t,n)}e=Kxt(e,e=>e.id),Jxt(e)}var z$,Yxt,B$,V$,Xxt,Zxt,Qxt,$xt,eSt,tSt,nSt,rSt,iSt,aSt,oSt,sSt,cSt,lSt,uSt,dSt,fSt,pSt,mSt,hSt,gSt,_St,vSt,H$,U$,W$,G$,K$,q$,J$,Y$,ySt,X$,Z$,Q$,$$,e1,t1,n1,r1,bSt,xSt,SSt,CSt,wSt,TSt,ESt,DSt,OSt,kSt,ASt,jSt,MSt,NSt,PSt,FSt,ISt,i1,LSt,RSt,zSt,BSt,VSt,HSt,USt,WSt,GSt,KSt,qSt,JSt,YSt,XSt,ZSt,QSt=o((()=>{o0e(),lU(),OC(),Iy(),Gp(),Vp(),L$(),WS(),z$={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Yxt=Ev.gitGraph,B$=W(()=>yC({...Yxt,...Rv().gitGraph}),`getConfig`),V$=new sU(()=>{let e=B$(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}}),W(R$,`getID`),W(Kxt,`uniqBy`),Xxt=W(function(e){V$.records.direction=e},`setDirection`),Zxt=W(function(e){G.debug(`options str`,e),e=e?.trim(),e||=`{}`;try{V$.records.options=JSON.parse(e)}catch(e){G.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),Qxt=W(function(){return V$.records.options},`getOptions`),$xt=W(function(e){let t=e.msg,n=e.id,r=e.type,i=e.tags;G.info(`commit`,t,n,r,i),G.debug(`Entering commit:`,t,n,r,i);let a=B$();n=dy.sanitizeText(n,a),t=dy.sanitizeText(t,a),i=i?.map(e=>dy.sanitizeText(e,a));let o={id:n||V$.records.seq+`-`+R$(),message:t,seq:V$.records.seq++,type:r??z$.NORMAL,tags:i??[],parents:V$.records.head==null?[]:[V$.records.head.id],branch:V$.records.currBranch};V$.records.head=o,G.info(`main branch`,a.mainBranchName),V$.records.commits.has(o.id)&&G.warn(`Commit ID ${o.id} already exists`),V$.records.commits.set(o.id,o),V$.records.branches.set(V$.records.currBranch,o.id),G.debug(`in pushCommit `+o.id)},`commit`),eSt=W(function(e){let t=e.name,n=e.order;if(t=dy.sanitizeText(t,B$()),V$.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);V$.records.branches.set(t,V$.records.head==null?null:V$.records.head.id),V$.records.branchConfig.set(t,{name:t,order:n}),rSt(t),G.debug(`in createBranch`)},`branch`),tSt=W(e=>{let t=e.branch,n=e.id,r=e.type,i=e.tags,a=B$();t=dy.sanitizeText(t,a),n&&=dy.sanitizeText(n,a);let o=V$.records.branches.get(V$.records.currBranch),s=V$.records.branches.get(t),l=o?V$.records.commits.get(o):void 0,u=s?V$.records.commits.get(s):void 0;if(l&&u&&l.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(V$.records.currBranch===t){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${V$.records.currBranch})has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`commit`]},e}if(!V$.records.branches.has(t)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) does not exist`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},e}if(u===void 0||!u){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`"commit"`]},e}if(l===u){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(n&&V$.records.commits.has(n)){let e=Error(`Incorrect usage of "merge". Commit with id:`+n+` already exists, use different custom id`);throw e.hash={text:`merge ${t} ${n} ${r} ${i?.join(` `)}`,token:`merge ${t} ${n} ${r} ${i?.join(` `)}`,expected:[`merge ${t} ${n}_UNIQUE ${r} ${i?.join(` `)}`]},e}let d=s||``,f={id:n||`${V$.records.seq}-${R$()}`,message:`merged branch ${t} into ${V$.records.currBranch}`,seq:V$.records.seq++,parents:V$.records.head==null?[]:[V$.records.head.id,d],branch:V$.records.currBranch,type:z$.MERGE,customType:r,customId:!!n,tags:i??[]};V$.records.head=f,V$.records.commits.set(f.id,f),V$.records.branches.set(V$.records.currBranch,f.id),G.debug(V$.records.branches),G.debug(`in mergeBranch`)},`merge`),nSt=W(function(e){let t=e.id,n=e.targetId,r=e.tags,i=e.parent;G.debug(`Entering cherryPick:`,t,n,r);let a=B$();if(t=dy.sanitizeText(t,a),n=dy.sanitizeText(n,a),r=r?.map(e=>dy.sanitizeText(e,a)),i=dy.sanitizeText(i,a),!t||!V$.records.commits.has(t)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let o=V$.records.commits.get(t);if(o===void 0||!o)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(i&&!(Array.isArray(o.parents)&&o.parents.includes(i)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let s=o.branch;if(o.type===z$.MERGE&&!i)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!n||!V$.records.commits.has(n)){if(s===V$.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let e=V$.records.branches.get(V$.records.currBranch);if(e===void 0||!e){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${V$.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let a=V$.records.commits.get(e);if(a===void 0||!a){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${V$.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let l={id:V$.records.seq+`-`+R$(),message:`cherry-picked ${o?.message} into ${V$.records.currBranch}`,seq:V$.records.seq++,parents:V$.records.head==null?[]:[V$.records.head.id,o.id],branch:V$.records.currBranch,type:z$.CHERRY_PICK,tags:r?r.filter(Boolean):[`cherry-pick:${o.id}${o.type===z$.MERGE?`|parent:${i}`:``}`]};V$.records.head=l,V$.records.commits.set(l.id,l),V$.records.branches.set(V$.records.currBranch,l.id),G.debug(V$.records.branches),G.debug(`in cherryPick`)}},`cherryPick`),rSt=W(function(e){if(e=dy.sanitizeText(e,B$()),V$.records.branches.has(e)){V$.records.currBranch=e;let t=V$.records.branches.get(V$.records.currBranch);t===void 0||!t?V$.records.head=null:V$.records.head=V$.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`),W(qxt,`upsert`),W(Jxt,`prettyPrintCommitHistory`),iSt=W(function(){G.debug(V$.records.commits);let e=lSt()[0];Jxt([e])},`prettyPrint`),aSt=W(function(){V$.reset(),by()},`clear`),oSt=W(function(){return[...V$.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),sSt=W(function(){return V$.records.branches},`getBranches`),cSt=W(function(){return V$.records.commits},`getCommits`),lSt=W(function(){let e=[...V$.records.commits.values()];return e.forEach(function(e){G.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},`getCommitsArray`),uSt={commitType:z$,getConfig:B$,setDirection:Xxt,setOptions:Zxt,getOptions:Qxt,commit:$xt,branch:eSt,merge:tSt,cherryPick:nSt,checkout:rSt,prettyPrint:iSt,clear:aSt,getBranchesAsObjArray:oSt,getBranches:sSt,getCommits:cSt,getCommitsArray:lSt,getCurrentBranch:W(function(){return V$.records.currBranch},`getCurrentBranch`),getDirection:W(function(){return V$.records.direction},`getDirection`),getHead:W(function(){return V$.records.head},`getHead`),setAccTitle:xy,getAccTitle:Sy,getAccDescription:wy,setAccDescription:Cy,setDiagramTitle:Ty,getDiagramTitle:Ey},dSt=W((e,t)=>{cU(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)fSt(n,t)},`populate`),fSt=W((e,t)=>{let n={Commit:W(e=>t.commit(pSt(e)),`Commit`),Branch:W(e=>t.branch(mSt(e)),`Branch`),Merge:W(e=>t.merge(hSt(e)),`Merge`),Checkout:W(e=>t.checkout(gSt(e)),`Checkout`),CherryPicking:W(e=>t.cherryPick(_St(e)),`CherryPicking`)}[e.$type];n?n(e):G.error(`Unknown statement type: ${e.$type}`)},`parseStatement`),pSt=W(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?z$.NORMAL:z$[e.type],tags:e.tags??void 0}),`parseCommit`),mSt=W(e=>({name:e.name,order:e.order??0}),`parseBranch`),hSt=W(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:z$[e.type],tags:e.tags??void 0}),`parseMerge`),gSt=W(e=>e.branch,`parseCheckout`),_St=W(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),vSt={parse:W(async e=>{let t=await P$(`gitGraph`,e);G.debug(t),dSt(t,uSt)},`parse`)},H$=10,U$=40,W$=4,G$=2,K$=8,q$=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),J$=12,Y$=new Set([`redux-color`,`redux-dark-color`]),ySt=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),X$=W((e,t,n=!1)=>n&&e>0?(e-1)%(t-1)+1:e%t,`calcColorIndex`),Z$=new Map,Q$=new Map,$$=30,e1=new Map,t1=[],n1=0,r1=`LR`,bSt=W(()=>{Z$.clear(),Q$.clear(),e1.clear(),n1=0,t1=[],r1=`LR`},`clear`),xSt=W(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),SSt=W(e=>{let t,n,r;return r1===`BT`?(n=W((e,t)=>e<=t,`comparisonFunc`),r=1/0):(n=W((e,t)=>e>=t,`comparisonFunc`),r=0),e.forEach(e=>{let i=r1===`TB`||r1==`BT`?Q$.get(e)?.y:Q$.get(e)?.x;i!==void 0&&n(i,r)&&(t=e,r=i)}),t},`findClosestParent`),CSt=W(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=Q$.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),wSt=W((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=ESt(n),i=Math.max(r,i)):a.push(n),DSt(n,r)}),r=i,a.forEach(e=>{OSt(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=CSt(n.parents);r=Q$.get(e).y-U$,r<=i&&(i=r);let t=Z$.get(n.branch).pos,a=r-H$;Q$.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),TSt=W(e=>{let t=SSt(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=Q$.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),ESt=W(e=>TSt(e)+U$,`calculateCommitPosition`),DSt=W((e,t)=>{let n=Z$.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+H$;return Q$.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),OSt=W((e,t,n)=>{let r=Z$.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;Q$.set(e.id,{x:a,y:i})},`setRootPosition`),kSt=W((e,t,n,r,i,a)=>{let{theme:o}=Oy(),s=q$.has(o??``),l=Y$.has(o??``),u=ySt.has(o??``);if(a===z$.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10+(s?3:0)).attr(`y`,n.y-10+(s?3:0)).attr(`width`,s?14:20).attr(`height`,s?14:20).attr(`class`,`commit ${t.id} commit-highlight${X$(i,K$,l)} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6+(s?2:0)).attr(`y`,n.y-6+(s?2:0)).attr(`width`,s?8:12).attr(`height`,s?8:12).attr(`class`,`commit ${t.id} commit${X$(i,K$,l)} ${r}-inner`);else if(a===z$.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,s?7:10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,u?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,u?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,u?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,u?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,s?7:10),o.attr(`class`,`commit ${t.id} commit${X$(i,K$,l)}`),a===z$.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,s?5:6),a.attr(`class`,`commit ${r} ${t.id} commit${X$(i,K$,l)}`)}if(a===z$.REVERSE){let a=e.append(`path`),o=s?4:5;a.attr(`d`,`M ${n.x-o},${n.y-o}L${n.x+o},${n.y+o}M${n.x-o},${n.y+o}L${n.x+o},${n.y-o}`).attr(`class`,`commit ${r} ${t.id} commit${X$(i,K$,l)}`)}}},`drawCommitBullet`),ASt=W((e,t,n,r,i)=>{if(t.type!==z$.CHERRY_PICK&&(t.customId&&t.type===z$.MERGE||t.type!==z$.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),l=s.node()?.getBBox();if(l&&(o.attr(`x`,n.posWithOffset-l.width/2-G$).attr(`y`,n.y+13.5).attr(`width`,l.width+2*G$).attr(`height`,l.height+2*G$),r1===`TB`||r1===`BT`?(o.attr(`x`,n.x-(l.width+4*W$+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(l.width+4*W$)).attr(`y`,n.y+l.height-12)):s.attr(`x`,n.posWithOffset-l.width/2),i.rotateCommitLabel)){if(r1===`TB`||r1===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(l.width+10)/25*9.5,t=10+l.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}}},`drawCommitLabel`),jSt=W((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),l=e.append(`circle`),u=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),d=u.node()?.getBBox();if(!d)throw Error(`Tag bbox not found`);a=Math.max(a,d.width),o=Math.max(o,d.height),u.attr(`x`,n.posWithOffset-d.width/2),s.push({tag:u,hole:l,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:l}of s){let s=o/2,u=n.y-19.2-l;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,`
|
|
1408
1408
|
${r-a/2-W$/2},${u+G$}
|
|
@@ -3618,14 +3618,14 @@ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on l
|
|
|
3618
3618
|
`},`getStyles`),s3=class{constructor(){this.d=``}static{W(this,`PathBuilder`)}moveTo(e,t){return this.d+=`M ${e} ${t} `,this}lineTo(e,t){return this.d+=`L ${e} ${t} `,this}horizontalTo(e){return this.d+=`H ${e} `,this}verticalTo(e){return this.d+=`V ${e} `,this}arcTo(e,t,n,r,i,a,o){return this.d+=`A ${e} ${t} ${n} ${+!!r} ${+!!i} ${a} ${o} `,this}build(){return this.d.trim()}},eRt=class{constructor(e,t=a3()){this.textCache=new Map,this.svg=e,this.config=t}static{W(this,`RailroadRenderer`)}measureText(e){if(this.textCache.has(e))return this.textCache.get(e);let t=this.svg.append(`text`).attr(`font-family`,this.config.fontFamily).attr(`font-size`,this.config.fontSize).text(e),n=t.node().getBBox(),r={width:n.width,height:n.height};return t.remove(),this.textCache.set(e,r),r}renderTerminal(e,t){let n=this.measureText(t),r=n.width+this.config.padding*2,i=n.height+this.config.padding*2,a=e.append(`g`).attr(`class`,`railroad-terminal`);return a.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,r).attr(`height`,i).attr(`rx`,10).attr(`ry`,10),a.append(`text`).attr(`x`,r/2).attr(`y`,i/2).text(t),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderNonTerminal(e,t){let n=this.measureText(t),r=n.width+this.config.padding*2,i=n.height+this.config.padding*2,a=e.append(`g`).attr(`class`,`railroad-nonterminal`);return a.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,r).attr(`height`,i),a.append(`text`).attr(`x`,r/2).attr(`y`,i/2).text(t),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderSequence(e,t){let n=t.map(t=>this.renderExpression(e,t)),r=0,i=0,a=0;for(let e of n)r+=e.dimensions.width,i=Math.max(i,e.dimensions.up),a=Math.max(a,e.dimensions.down);r+=(n.length-1)*this.config.horizontalSeparation;let o=e.append(`g`).attr(`class`,`railroad-sequence`),s=0;for(let e=0;e<n.length;e++){let t=n[e],r=i-t.dimensions.up;if(o.node().appendChild(t.element).setAttribute(`transform`,`translate(${s}, ${r})`),e<n.length-1){let e=s+t.dimensions.width,n=e+this.config.horizontalSeparation,r=i;o.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new s3().moveTo(e,r).lineTo(n,r).build())}s+=t.dimensions.width+this.config.horizontalSeparation}return{element:o.node(),dimensions:{width:r,height:i+a,up:i,down:a}}}renderChoice(e,t){let n=t.map(t=>this.renderExpression(e,t)),r=0,i=0;for(let e of n)r=Math.max(r,e.dimensions.width),i+=e.dimensions.height;i+=(n.length-1)*this.config.verticalSeparation;let a=this.config.arcRadius,o=a*4,s=r+o,l=e.append(`g`).attr(`class`,`railroad-choice`),u=0,d=i/2;for(let e of n){let t=u,n=t+e.dimensions.up,i=a*2+(r-e.dimensions.width)/2;l.node().appendChild(e.element).setAttribute(`transform`,`translate(${i}, ${t})`);let o=new s3,f=n>d;n===d?o.moveTo(0,d).lineTo(i,n):o.moveTo(0,d).arcTo(a,a,0,!1,f,a,d+(f?a:-a)).lineTo(a,n-(f?a:-a)).arcTo(a,a,0,!1,!f,a*2,n).lineTo(i,n),l.append(`path`).attr(`class`,`railroad-line`).attr(`d`,o.build());let p=new s3,m=i+e.dimensions.width,h=s-a*2;n===d?p.moveTo(m,n).lineTo(s,d):p.moveTo(m,n).lineTo(h,n).arcTo(a,a,0,!1,!f,s-a,n+(f?-a:a)).lineTo(s-a,d+(f?a:-a)).arcTo(a,a,0,!1,f,s,d),l.append(`path`).attr(`class`,`railroad-line`).attr(`d`,p.build()),u+=e.dimensions.height+this.config.verticalSeparation}return{element:l.node(),dimensions:{width:s,height:i,up:d,down:i-d}}}renderOptional(e,t){let n=this.renderExpression(e,t),r=this.config.arcRadius,i=r*2,a=n.dimensions.width+r*4,o=n.dimensions.height+i,s=e.append(`g`).attr(`class`,`railroad-optional`),l=r*2,u=i;s.node().appendChild(n.element).setAttribute(`transform`,`translate(${l}, ${u})`);let d=u+n.dimensions.up,f=new s3().moveTo(0,d).lineTo(r*2,d);s.append(`path`).attr(`class`,`railroad-line`).attr(`d`,f.build());let p=new s3().moveTo(l+n.dimensions.width,d).lineTo(a,d);s.append(`path`).attr(`class`,`railroad-line`).attr(`d`,p.build());let m=new s3().moveTo(0,d).arcTo(r,r,0,!1,!1,r,d-r).lineTo(r,r).arcTo(r,r,0,!1,!0,r*2,0).lineTo(a-r*2,0).arcTo(r,r,0,!1,!0,a-r,r).lineTo(a-r,d-r).arcTo(r,r,0,!1,!1,a,d);return s.append(`path`).attr(`class`,`railroad-line`).attr(`d`,m.build()),{element:s.node(),dimensions:{width:a,height:o,up:d,down:o-d}}}renderRepetition(e,t,n){let r=this.renderExpression(e,t),i=this.config.arcRadius,a=i*2,o=r.dimensions.width+i*4,s=n===0,l=r.dimensions.height+a+(s?a:0),u=e.append(`g`).attr(`class`,`railroad-repetition`),d=i*2,f=s?a:0;u.node().appendChild(r.element).setAttribute(`transform`,`translate(${d}, ${f})`);let p=f+r.dimensions.up;u.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new s3().moveTo(0,p).lineTo(i*2,p).build()),u.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new s3().moveTo(d+r.dimensions.width,p).lineTo(o,p).build());let m=f+r.dimensions.height+i,h=new s3().moveTo(d+r.dimensions.width,p).arcTo(i,i,0,!1,!0,d+r.dimensions.width+i,p+i).lineTo(d+r.dimensions.width+i,m).arcTo(i,i,0,!1,!0,d+r.dimensions.width,m+i).lineTo(i*2,m+i).arcTo(i,i,0,!1,!0,i,m).lineTo(i,p+i).arcTo(i,i,0,!1,!0,i*2,p);if(u.append(`path`).attr(`class`,`railroad-line`).attr(`d`,h.build()),s){let e=new s3().moveTo(0,p).arcTo(i,i,0,!1,!1,i,p-i).lineTo(i,i).arcTo(i,i,0,!1,!0,i*2,0).lineTo(o-i*2,0).arcTo(i,i,0,!1,!0,o-i,i).lineTo(o-i,p-i).arcTo(i,i,0,!1,!1,o,p);u.append(`path`).attr(`class`,`railroad-line`).attr(`d`,e.build())}return{element:u.node(),dimensions:{width:o,height:l,up:p,down:l-p}}}renderSpecial(e,t){let n=this.measureText(`? `+t+` ?`),r=n.width+this.config.padding*2,i=n.height+this.config.padding*2,a=e.append(`g`).attr(`class`,`railroad-special`);return a.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,r).attr(`height`,i),a.append(`text`).attr(`x`,r/2).attr(`y`,i/2).text(`? `+t+` ?`),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderExpression(e,t){switch(t.type){case`terminal`:return this.renderTerminal(e,t.value);case`nonterminal`:return this.renderNonTerminal(e,t.name);case`sequence`:return this.renderSequence(e,t.elements);case`choice`:return this.renderChoice(e,t.alternatives);case`optional`:return this.renderOptional(e,t.element);case`repetition`:return this.renderRepetition(e,t.element,t.min);case`special`:return this.renderSpecial(e,t.text);default:throw Error(`Unknown node type: ${t.type}`)}}renderRule(e,t){let n=this.svg.append(`g`).attr(`class`,`railroad-rule`).attr(`transform`,`translate(0, ${t})`),r=e.name+` =`,i=this.measureText(r).width+20,a=i+20,o=n.append(`g`),s=this.renderExpression(o,e.definition),l=Math.max(20,s.dimensions.up),u=l-s.dimensions.up;return o.attr(`transform`,`translate(${a}, ${u})`),n.append(`g`).attr(`class`,`railroad-rule-name-group`).append(`text`).attr(`class`,`railroad-rule-name`).attr(`x`,0).attr(`y`,l).text(r),n.append(`g`).attr(`class`,`railroad-start`).append(`circle`).attr(`cx`,i).attr(`cy`,l).attr(`r`,this.config.markerRadius),n.append(`g`).attr(`class`,`railroad-end`).append(`circle`).attr(`cx`,a+s.dimensions.width+10).attr(`cy`,l).attr(`r`,this.config.markerRadius),n.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new s3().moveTo(i+this.config.markerRadius,l).lineTo(a,l).build()),n.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new s3().moveTo(a+s.dimensions.width,l).lineTo(a+s.dimensions.width+10-this.config.markerRadius,l).build()),{height:Math.max(40,u+s.dimensions.height+this.config.padding*2),width:a+s.dimensions.width+10+this.config.markerRadius}}renderDiagram(e){let t=this.config.padding,n=0;for(let r of e){let e=this.renderRule(r,t);t+=e.height+this.config.verticalSeparation,n=Math.max(n,e.width)}return{width:n+this.config.padding*2,height:t+this.config.padding}}},tRt=W((e,t,n)=>{fy(e,t.height,t.width,n),e.attr(`viewBox`,`0 0 ${t.width} ${t.height}`)},`configureRailroadSvgSize`),c3={draw:W((e,t,n)=>{G.debug(`[Railroad] Rendering diagram
|
|
3619
3619
|
`+e);try{let e=GS(t);e.attr(`class`,`railroad-diagram`);let n=Rv().railroad?.useMaxWidth??!0,r=t3.getRules();if(G.debug(`[Railroad] Rendering ${r.length} rules`),r.length===0){G.warn(`[Railroad] No rules to render`),tRt(e,{height:100,width:200},n);return}tRt(e,new eRt(e,a3()).renderDiagram(r),n),G.debug(`[Railroad] Render complete`)}catch(e){throw G.error(`[Railroad] Render error:`,e),e}},`draw`)}})),nRt=l({default:()=>sRt,diagram:()=>oRt}),rRt,u3,iRt,aRt,oRt,sRt,cRt=o((()=>{l3(),lU(),KS(),Iy(),Gp(),Vp(),L$(),rRt=Kyt().Railroad.parser.LangiumParser,u3=W(e=>{switch(e.$type){case`RailroadTerminalExpr`:return{type:`terminal`,value:e.value};case`RailroadNonTerminalExpr`:return{type:`nonterminal`,name:e.name};case`RailroadSpecialExpr`:return{type:`special`,text:e.text};case`RailroadSequenceExpr`:{let t=e.elements.map(u3);return t.length===1?t[0]:{type:`sequence`,elements:t}}case`RailroadChoiceExpr`:{let t=e.alternatives.map(u3);return t.length===1?t[0]:{type:`choice`,alternatives:t}}case`RailroadOptionalExpr`:return{type:`optional`,element:u3(e.element)};case`RailroadOneOrMoreExpr`:return{type:`repetition`,element:u3(e.element),min:1,max:1/0};case`RailroadZeroOrMoreExpr`:return{type:`repetition`,element:u3(e.element),min:0,max:1/0};default:throw Error(`Unsupported railroad expression: ${e.$type}`)}},`transformExpression`),iRt=W(e=>({name:e.name,definition:u3(e.definition)}),`transformRule`),aRt=W(e=>{cU(e,t3),e.title&&t3.setTitle(e.title),e.rules.map(e=>t3.addRule(iRt(e)))},`populateDb`),oRt={parser:{parse:W(e=>{t3.clear(),G.debug(`[Railroad Parser] Starting Langium parse`);let t=rRt.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new I$(t);let n=t.value;G.debug(`[Railroad Parser] Parsed rules:`,n.rules.length),aRt(n),G.debug(`[Railroad Parser] Parse complete`)},`parse`),parser:{yy:t3}},db:t3,renderer:c3,styles:o3},sRt=oRt})),lRt=l({diagram:()=>_Rt}),uRt,d3,dRt,fRt,pRt,mRt,hRt,gRt,_Rt,vRt=o((()=>{l3(),lU(),KS(),Iy(),Gp(),Vp(),L$(),uRt=Qyt().RailroadEbnf.parser.LangiumParser,d3=W(e=>{let t=e.alternatives.map(dRt);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformChoice`),dRt=W(e=>{let t=e.elements.map(mRt);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),fRt=W(e=>{switch(e.$type){case`EbnfTerminal`:return{type:`terminal`,value:e.value};case`EbnfNonTerminal`:return{type:`nonterminal`,name:e.name};case`EbnfSpecial`:return{type:`special`,text:e.text};case`EbnfGroup`:return d3(e.element);case`EbnfOptional`:return{type:`optional`,element:d3(e.element)};case`EbnfRepetition`:return{type:`repetition`,element:d3(e.element),min:0,max:1/0};default:throw Error(`Unsupported EBNF primary node: ${e.$type}`)}},`transformPrimary`),pRt=W((e,t)=>{switch(t.$type){case`EbnfOptionalPostfix`:return{type:`optional`,element:e};case`EbnfZeroOrMorePostfix`:return{type:`repetition`,element:e,min:0,max:1/0};case`EbnfOneOrMorePostfix`:return{type:`repetition`,element:e,min:1,max:1/0};case`EbnfExceptionPostfix`:return{type:`sequence`,elements:[e,{type:`terminal`,value:`-`},fRt(t.except)]};default:throw Error(`Unsupported EBNF postfix node: ${t.$type}`)}},`transformPostfix`),mRt=W(e=>e.postfixes.reduce((e,t)=>pRt(e,t),fRt(e.base)),`transformTerm`),hRt=W(e=>({name:e.name,definition:d3(e.definition)}),`transformRule`),gRt=W(e=>{cU(e,t3),e.title&&t3.setTitle(e.title),e.rules.map(e=>t3.addRule(hRt(e)))},`populateDb`),_Rt={parser:{parse:W(e=>{t3.clear(),G.debug(`[EBNF Parser] Starting Langium parse`);let t=uRt.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new I$(t);let n=t.value;G.debug(`[EBNF Parser] Parsed rules:`,n.rules.length),gRt(n),G.debug(`[EBNF Parser] Parse complete`)},`parse`),parser:{yy:t3}},db:t3,renderer:c3,styles:o3}})),yRt=l({diagram:()=>DRt}),bRt,f3,xRt,SRt,CRt,wRt,TRt,ERt,DRt,ORt=o((()=>{l3(),lU(),KS(),Iy(),Gp(),Vp(),L$(),bRt=ibt().RailroadAbnf.parser.LangiumParser,f3=W(e=>{let t=e.alternatives.map(xRt);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),xRt=W(e=>{let t=e.elements.map(CRt);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),SRt=W(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),CRt=W(e=>{let t=wRt(e.primary);if(!e.repeat)return t;let{min:n,max:r}=SRt(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),wRt=W(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return f3(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:f3(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),TRt=W(e=>({name:e.name,definition:f3(e.definition)}),`transformRule`),ERt=W(e=>{cU(e,t3),e.title&&t3.setTitle(e.title),e.rules.map(e=>t3.addRule(TRt(e)))},`populateDb`),DRt={parser:{parse:W(e=>{t3.clear(),G.debug(`[ABNF Parser] Starting Langium parse`);let t=bRt.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new I$(t);let n=t.value;G.debug(`[ABNF Parser] Parsed rules:`,n.rules.length),ERt(n),G.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:t3}},db:t3,renderer:c3,styles:o3}})),kRt=l({diagram:()=>zRt}),ARt,jRt,MRt,NRt,PRt,FRt,IRt,LRt,RRt,zRt,BRt=o((()=>{l3(),lU(),KS(),Iy(),Gp(),Vp(),L$(),ARt=lbt().RailroadPeg.parser.LangiumParser,jRt=W(e=>{let t=e.alternatives.map(MRt);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformOrderedChoice`),MRt=W(e=>{let t=e.elements.map(NRt);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),NRt=W(e=>{let t=FRt(e.suffix);return e.operator?{type:`special`,text:e.operator===`&`?`&${PRt(t)}`:`!${PRt(t)}`}:t},`transformPrefix`),PRt=W(e=>{switch(e.type){case`terminal`:return`"${e.value}"`;case`nonterminal`:return e.name;case`special`:return e.text;default:return`(...)`}},`nodeToLabel`),FRt=W(e=>{let t=IRt(e.primary);if(!e.operator)return t;switch(e.operator){case`?`:return{type:`optional`,element:t};case`*`:return{type:`repetition`,element:t,min:0,max:1/0};case`+`:return{type:`repetition`,element:t,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${e.operator}`)}},`transformSuffix`),IRt=W(e=>{switch(e.$type){case`PegLiteral`:return{type:`terminal`,value:e.value};case`PegIdentifier`:return{type:`nonterminal`,name:e.name};case`PegGroup`:return jRt(e.element);case`PegAny`:return{type:`special`,text:e.dot};default:throw Error(`Unsupported PEG primary node: ${e.$type}`)}},`transformPrimary`),LRt=W(e=>({name:e.name,definition:jRt(e.definition)}),`transformRule`),RRt=W(e=>{cU(e,t3),e.title&&t3.setTitle(e.title),e.rules.map(e=>t3.addRule(LRt(e)))},`populateDb`),zRt={parser:{parse:W(e=>{t3.clear(),G.debug(`[PEG Parser] Starting Langium parse`);let t=ARt.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new I$(t);let n=t.value;G.debug(`[PEG Parser] Parsed rules:`,n.rules.length),RRt(n),G.debug(`[PEG Parser] Parse complete`)},`parse`),parser:{yy:t3}},db:t3,renderer:c3,styles:o3}})),VRt=l({clearLayoutRenderState:()=>Ik,createCommonLayoutRenderer:()=>Fk,default:()=>mVt,defaultMeasureLayout:()=>Lk,paintLayoutData:()=>Rk});function HRt(e,t){e.attr(`role`,TBt),t!==``&&e.attr(`aria-roledescription`,t)}function URt(e,t,n,r){if(e.insert!==void 0){if(n){let t=`chart-desc-${r}`;e.attr(`aria-describedby`,t),e.insert(`desc`,`:first-child`).attr(`id`,t).text(n)}if(t){let n=`chart-title-${r}`;e.attr(`aria-labelledby`,n),e.insert(`title`,`:first-child`).attr(`id`,n).text(t)}}}function WRt(e){let t=e.match(Gv);if(!t)return{text:e,metadata:{}};let n=t[1],r=n?t[2].split(`
|
|
3620
3620
|
`).map(e=>e.startsWith(n)?e.slice(n.length):e).join(`
|
|
3621
|
-
`):t[2],i=KA(r,{schema:GA})??{};i=typeof i==`object`&&!Array.isArray(i)?i:{};let a={};return i.displayMode&&(a.displayMode=i.displayMode.toString()),i.title&&(a.title=i.title.toString()),i.config&&(a.config=i.config),{text:e.slice(t[0].length),metadata:a}}function GRt(e){let t=ABt(kBt(e)),n=jBt(t.text),r=yC(t.config,n.directive);return e=OBt(n.text),{code:e,title:t.title,config:r}}function KRt(e){let t=new TextEncoder().encode(e),n=Array.from(t,e=>String.fromCodePoint(e)).join(``);return btoa(n)}function qRt(e){let t=GRt(e);return Bv(),hse(t.config??{}),t}async function JRt(e,t){p3();try{let{code:t,config:n}=qRt(e);return{diagramType:(await nVt(t)).type,config:n}}catch(e){if(t?.suppressErrors)return!1;throw e}}function YRt(e,t){return e.append(`iframe`).attr(`id`,t).attr(`style`,`width: 100%; height: 100%;`).attr(`sandbox`,``)}function XRt(e={}){let t=_v({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||={},t.themeVariables.fontFamily=t.fontFamily),pse(t),t?.theme&&t.theme in Sv?t.themeVariables=Sv[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Sv.default.getThemeVariables(t.themeVariables));let n=typeof t==`object`?fse(t):Iv();Up(n.logLevel),p3()}function ZRt(e,t,n,r){HRt(t,e),URt(t,n,r,t.attr(`id`))}var QRt,$Rt,ezt,tzt,nzt,rzt,izt,azt,ozt,szt,czt,lzt,uzt,dzt,fzt,pzt,mzt,hzt,gzt,_zt,vzt,yzt,bzt,xzt,Szt,Czt,wzt,Tzt,Ezt,Dzt,Ozt,kzt,Azt,jzt,Mzt,Nzt,Pzt,Fzt,Izt,Lzt,Rzt,zzt,Bzt,Vzt,Hzt,Uzt,Wzt,Gzt,Kzt,qzt,Jzt,Yzt,Xzt,Zzt,Qzt,$zt,eBt,tBt,nBt,rBt,iBt,aBt,oBt,sBt,cBt,lBt,uBt,dBt,fBt,pBt,mBt,hBt,gBt,_Bt,vBt,yBt,bBt,xBt,SBt,CBt,p3,wBt,TBt,m3,EBt,DBt,OBt,kBt,ABt,jBt,MBt,NBt,PBt,FBt,IBt,LBt,RBt,zBt,BBt,VBt,HBt,UBt,WBt,GBt,KBt,qBt,JBt,YBt,XBt,ZBt,QBt,$Bt,eVt,tVt,nVt,h3,rVt,iVt,aVt,oVt,sVt,cVt,lVt,uVt,g3,_3,dVt,fVt,pVt,v3,mVt,hVt=o((()=>{KS(),Qk(),qA(),tH(),vT(),jT(),gT(),dT(),ZS(),dw(),rC(),OC(),Iy(),Gp(),Vp(),bwe(),WS(),g$e(),ah(),RSe(),zp(),QRt=`c4`,$Rt={id:QRt,detector:W(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(N1e(),b$e));return{diagram:e}},void 0);return{id:QRt,diagram:e}},`loader`)},ezt=`flowchart`,tzt={id:ezt,detector:W((e,t)=>t?.flowchart?.defaultRenderer===`dagre-wrapper`||t?.flowchart?.defaultRenderer===`elk`?!1:/^\s*graph/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(q1e(),K1e));return{diagram:e}},void 0);return{id:ezt,diagram:e}},`loader`)},nzt=`flowchart-v2`,rzt={id:nzt,detector:W((e,t)=>t?.flowchart?.defaultRenderer!==`dagre-d3`&&(t?.flowchart?.defaultRenderer===`elk`&&(t.layout=`elk`),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer===`dagre-wrapper`?!0:/^\s*flowchart/.test(e)),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(q1e(),K1e));return{diagram:e}},void 0);return{id:nzt,diagram:e}},`loader`)},izt=`swimlane`,azt={id:izt,detector:W(e=>/^\s*swimlane-beta\b/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(X1e(),J1e));return{diagram:e}},void 0);return{id:izt,diagram:e}},`loader`)},ozt=`er`,szt={id:ozt,detector:W(e=>/^\s*erDiagram/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(a0e(),Z1e));return{diagram:e}},void 0);return{id:ozt,diagram:e}},`loader`)},czt=`gitGraph`,lzt={id:czt,detector:W(e=>/^\s*gitGraph/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(QSt(),Gxt));return{diagram:e}},void 0);return{id:czt,diagram:e}},`loader`)},uzt=`gantt`,dzt={id:uzt,detector:W(e=>/^\s*gantt/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(cwt(),rCt));return{diagram:e}},void 0);return{id:uzt,diagram:e}},`loader`)},fzt=`info`,pzt={id:fzt,detector:W(e=>/^\s*info/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(pwt(),lwt));return{diagram:e}},void 0);return{id:fzt,diagram:e}},`loader`)},mzt=`pie`,hzt={id:mzt,detector:W(e=>/^\s*pie/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Cwt(),mwt));return{diagram:e}},void 0);return{id:mzt,diagram:e}},`loader`)},gzt=`quadrantChart`,_zt={id:gzt,detector:W(e=>/^\s*quadrantChart/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Gwt(),wwt));return{diagram:e}},void 0);return{id:gzt,diagram:e}},`loader`)},vzt=`xychart`,yzt={id:vzt,detector:W(e=>/^\s*xychart(-beta)?/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(FTt(),Kwt));return{diagram:e}},void 0);return{id:vzt,diagram:e}},`loader`)},bzt=`requirement`,xzt={id:bzt,detector:W(e=>/^\s*requirement(Diagram)?/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(WTt(),ITt));return{diagram:e}},void 0);return{id:bzt,diagram:e}},`loader`)},Szt=`sequence`,Czt={id:Szt,detector:W(e=>/^\s*sequenceDiagram/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(YEt(),GTt));return{diagram:e}},void 0);return{id:Szt,diagram:e}},`loader`)},wzt=`class`,Tzt={id:wzt,detector:W((e,t)=>t?.class?.defaultRenderer!==`dagre-wrapper`&&/^\s*classDiagram/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(oDt(),iDt));return{diagram:e}},void 0);return{id:wzt,diagram:e}},`loader`)},Ezt=`classDiagram`,Dzt={id:Ezt,detector:W((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer===`dagre-wrapper`?!0:/^\s*classDiagram-v2/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(lDt(),sDt));return{diagram:e}},void 0);return{id:Ezt,diagram:e}},`loader`)},Ozt=`state`,kzt={id:Ozt,detector:W((e,t)=>t?.state?.defaultRenderer!==`dagre-wrapper`&&/^\s*stateDiagram/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(_Ot(),QDt));return{diagram:e}},void 0);return{id:Ozt,diagram:e}},`loader`)},Azt=`stateDiagram`,jzt={id:Azt,detector:W((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer===`dagre-wrapper`),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(bOt(),vOt));return{diagram:e}},void 0);return{id:Azt,diagram:e}},`loader`)},Mzt=`journey`,Nzt={id:Mzt,detector:W(e=>/^\s*journey/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(JOt(),xOt));return{diagram:e}},void 0);return{id:Mzt,diagram:e}},`loader`)},Pzt={draw:W((e,t,n)=>{G.debug(`rendering svg for syntax error
|
|
3622
|
-
`);let r=GS(t),i=r.append(`g`);r.attr(`viewBox`,`0 0 2412 512`),fy(r,100,512,!0),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1440).attr(`y`,250).attr(`font-size`,`150px`).style(`text-anchor`,`middle`).text(`Syntax error in text`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1250).attr(`y`,400).attr(`font-size`,`100px`).style(`text-anchor`,`middle`).text(`mermaid version ${n}`)},`draw`)},Fzt=Pzt,Izt={db:{},renderer:Pzt,parser:{parse:W(()=>{},`parse`)}},Lzt=`flowchart-elk`,Rzt={id:Lzt,detector:W((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer===`elk`?(t.layout=`elk`,!0):!1,`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(q1e(),K1e));return{diagram:e}},void 0);return{id:Lzt,diagram:e}},`loader`)},zzt=`timeline`,Bzt={id:zzt,detector:W(e=>/^\s*timeline/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Gkt(),YOt));return{diagram:e}},void 0);return{id:zzt,diagram:e}},`loader`)},Vzt=`mindmap`,Hzt={id:Vzt,detector:W(e=>/^\s*mindmap/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(fAt(),iAt));return{diagram:e}},void 0);return{id:Vzt,diagram:e}},`loader`)},Uzt=`kanban`,Wzt={id:Uzt,detector:W(e=>/^\s*kanban/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(wAt(),pAt));return{diagram:e}},void 0);return{id:Uzt,diagram:e}},`loader`)},Gzt=`sankey`,Kzt={id:Gzt,detector:W(e=>/^\s*sankey(-beta)?/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Njt(),yjt));return{diagram:e}},void 0);return{id:Gzt,diagram:e}},`loader`)},qzt=`packet`,Jzt={id:qzt,detector:W(e=>/^\s*packet(-beta)?/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Kjt(),Pjt));return{diagram:e}},void 0);return{id:qzt,diagram:e}},`loader`)},Yzt=`radar`,Xzt={id:Yzt,detector:W(e=>/^\s*radar-beta/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(_Mt(),qjt));return{diagram:e}},void 0);return{id:Yzt,diagram:e}},`loader`)},Zzt=`block`,Qzt={id:Zzt,detector:W(e=>/^\s*block(-beta)?/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(ZMt(),vMt));return{diagram:e}},void 0);return{id:Zzt,diagram:e}},`loader`)},$zt=`treeView`,eBt={id:$zt,detector:W(e=>/^\s*treeView-beta/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(ONt(),QMt));return{diagram:e}},void 0);return{id:$zt,diagram:e}},`loader`)},tBt=`architecture`,nBt={id:tBt,detector:W(e=>/^\s*architecture/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(fPt(),MNt));return{diagram:e}},void 0);return{id:tBt,diagram:e}},`loader`)},rBt=`eventmodeling`,iBt={id:rBt,detector:W(e=>/^\s*eventmodeling/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(tFt(),pPt));return{diagram:e}},void 0);return{id:rBt,diagram:e}},`loader`)},aBt=`ishikawa`,oBt={id:aBt,detector:W(e=>/^\s*ishikawa(-beta)?\b/i.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(CFt(),nFt));return{diagram:e}},void 0);return{id:aBt,diagram:e}},`loader`)},sBt=`venn`,cBt={id:sBt,detector:W(e=>/^\s*venn-beta/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(RIt(),hIt));return{diagram:e}},void 0);return{id:sBt,diagram:e}},`loader`)},lBt=`treemap`,uBt={id:lBt,detector:W(e=>/^\s*treemap/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(YIt(),zIt));return{diagram:e}},void 0);return{id:lBt,diagram:e}},`loader`)},dBt=`wardley`,fBt={id:dBt,detector:W(e=>/^\s*wardley-beta/i.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(wLt(),XIt));return{diagram:e}},void 0);return{id:dBt,diagram:e}},`loader`)},pBt=`cynefin`,mBt={id:pBt,detector:W(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(VLt(),TLt));return{diagram:e}},void 0);return{id:pBt,diagram:e}},`loader`)},hBt=`railroad`,gBt={id:hBt,detector:W(e=>/^\s*railroad-beta/i.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(cRt(),nRt));return{diagram:e}},void 0);return{id:hBt,diagram:e}},`loader`)},_Bt=`railroadEbnf`,vBt={id:_Bt,detector:W(e=>/^\s*railroad-ebnf-beta/i.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(vRt(),lRt));return{diagram:e}},void 0);return{id:_Bt,diagram:e}},`loader`)},yBt=`railroadAbnf`,bBt={id:yBt,detector:W(e=>/^\s*railroad-abnf-beta/i.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(ORt(),yRt));return{diagram:e}},void 0);return{id:yBt,diagram:e}},`loader`)},xBt=`railroadPeg`,SBt={id:xBt,detector:W(e=>/^\s*railroad-peg-beta/i.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(BRt(),kRt));return{diagram:e}},void 0);return{id:xBt,diagram:e}},`loader`)},CBt=!1,p3=W(()=>{CBt||(CBt=!0,Py(`error`,Izt,e=>e.toLowerCase().trim()===`error`),Py(`---`,{db:{clear:W(()=>{},`clear`)},styles:{},renderer:{draw:W(()=>{},`draw`)},parser:{parse:W(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},`parse`)},init:W(()=>null,`init`)},e=>e.toLowerCase().trimStart().startsWith(`---`)),Xv(Rzt,Hzt,nBt),Xv($Rt,Wzt,Dzt,Tzt,szt,dzt,pzt,hzt,xzt,Czt,azt,rzt,tzt,Bzt,lzt,jzt,kzt,Nzt,_zt,Kzt,Jzt,yzt,Qzt,iBt,eBt,Xzt,oBt,uBt,gBt,vBt,bBt,SBt,cBt,fBt,mBt))},`addDiagrams`),wBt=W(async()=>{G.debug(`Loading registered diagrams`);let e=(await Promise.allSettled(Object.entries(Jv).map(async([e,{detector:t,loader:n}])=>{if(n)try{Fy(e)}catch{try{let{diagram:e,id:r}=await n();Py(r,e,t)}catch(t){throw G.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete Jv[e],t}}}))).filter(e=>e.status===`rejected`);if(e.length>0){G.error(`Failed to load ${e.length} external diagrams`);for(let t of e)G.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},`loadRegisteredDiagrams`),TBt=`graphics-document document`,W(HRt,`setA11yDiagramInfo`),W(URt,`addSVGa11yTitleDescription`),m3=class e{constructor(e,t,n,r,i){this.type=e,this.text=t,this.db=n,this.parser=r,this.renderer=i}static{W(this,`Diagram`)}static async fromText(t,n={}){let r=Rv(),i=Yv(t,r);t=hCe(t)+`
|
|
3621
|
+
`):t[2],i=KA(r,{schema:GA})??{};i=typeof i==`object`&&!Array.isArray(i)?i:{};let a={};return i.displayMode&&(a.displayMode=i.displayMode.toString()),i.title&&(a.title=i.title.toString()),i.config&&(a.config=i.config),{text:e.slice(t[0].length),metadata:a}}function GRt(e){let t=ABt(kBt(e)),n=jBt(t.text),r=yC(t.config,n.directive);return e=OBt(n.text),{code:e,title:t.title,config:r}}function KRt(e){let t=new TextEncoder().encode(e),n=Array.from(t,e=>String.fromCodePoint(e)).join(``);return btoa(n)}function qRt(e){let t=GRt(e);return Bv(),hse(t.config??{}),t}async function JRt(e,t){p3();try{let{code:t,config:n}=qRt(e);return{diagramType:(await nVt(t)).type,config:n}}catch(e){if(t?.suppressErrors)return!1;throw e}}function YRt(e,t){return e.append(`iframe`).attr(`id`,t).attr(`style`,`width: 100%; height: 100%;`).attr(`sandbox`,``)}function XRt(e={}){let t=_v({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||={},t.themeVariables.fontFamily=t.fontFamily),pse(t),t?.theme&&t.theme in Sv?t.themeVariables=Sv[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Sv.default.getThemeVariables(t.themeVariables));let n=typeof t==`object`?fse(t):Iv();Up(n.logLevel),p3()}function ZRt(e,t,n,r){HRt(t,e),URt(t,n,r,t.attr(`id`))}var QRt,$Rt,ezt,tzt,nzt,rzt,izt,azt,ozt,szt,czt,lzt,uzt,dzt,fzt,pzt,mzt,hzt,gzt,_zt,vzt,yzt,bzt,xzt,Szt,Czt,wzt,Tzt,Ezt,Dzt,Ozt,kzt,Azt,jzt,Mzt,Nzt,Pzt,Fzt,Izt,Lzt,Rzt,zzt,Bzt,Vzt,Hzt,Uzt,Wzt,Gzt,Kzt,qzt,Jzt,Yzt,Xzt,Zzt,Qzt,$zt,eBt,tBt,nBt,rBt,iBt,aBt,oBt,sBt,cBt,lBt,uBt,dBt,fBt,pBt,mBt,hBt,gBt,_Bt,vBt,yBt,bBt,xBt,SBt,CBt,p3,wBt,TBt,m3,EBt,DBt,OBt,kBt,ABt,jBt,MBt,NBt,PBt,FBt,IBt,LBt,RBt,zBt,BBt,VBt,HBt,UBt,WBt,GBt,KBt,qBt,JBt,YBt,XBt,ZBt,QBt,$Bt,eVt,tVt,nVt,h3,rVt,iVt,aVt,oVt,sVt,cVt,lVt,uVt,g3,_3,dVt,fVt,pVt,v3,mVt,hVt=o((()=>{KS(),Qk(),qA(),tH(),vT(),jT(),gT(),dT(),ZS(),dw(),rC(),OC(),Iy(),Gp(),Vp(),bwe(),WS(),g$e(),ah(),RSe(),zp(),QRt=`c4`,$Rt={id:QRt,detector:W(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(N1e(),b$e));return{diagram:e}},void 0,import.meta.url);return{id:QRt,diagram:e}},`loader`)},ezt=`flowchart`,tzt={id:ezt,detector:W((e,t)=>t?.flowchart?.defaultRenderer===`dagre-wrapper`||t?.flowchart?.defaultRenderer===`elk`?!1:/^\s*graph/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(q1e(),K1e));return{diagram:e}},void 0,import.meta.url);return{id:ezt,diagram:e}},`loader`)},nzt=`flowchart-v2`,rzt={id:nzt,detector:W((e,t)=>t?.flowchart?.defaultRenderer!==`dagre-d3`&&(t?.flowchart?.defaultRenderer===`elk`&&(t.layout=`elk`),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer===`dagre-wrapper`?!0:/^\s*flowchart/.test(e)),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(q1e(),K1e));return{diagram:e}},void 0,import.meta.url);return{id:nzt,diagram:e}},`loader`)},izt=`swimlane`,azt={id:izt,detector:W(e=>/^\s*swimlane-beta\b/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(X1e(),J1e));return{diagram:e}},void 0,import.meta.url);return{id:izt,diagram:e}},`loader`)},ozt=`er`,szt={id:ozt,detector:W(e=>/^\s*erDiagram/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(a0e(),Z1e));return{diagram:e}},void 0,import.meta.url);return{id:ozt,diagram:e}},`loader`)},czt=`gitGraph`,lzt={id:czt,detector:W(e=>/^\s*gitGraph/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(QSt(),Gxt));return{diagram:e}},void 0,import.meta.url);return{id:czt,diagram:e}},`loader`)},uzt=`gantt`,dzt={id:uzt,detector:W(e=>/^\s*gantt/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(cwt(),rCt));return{diagram:e}},void 0,import.meta.url);return{id:uzt,diagram:e}},`loader`)},fzt=`info`,pzt={id:fzt,detector:W(e=>/^\s*info/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(pwt(),lwt));return{diagram:e}},void 0,import.meta.url);return{id:fzt,diagram:e}},`loader`)},mzt=`pie`,hzt={id:mzt,detector:W(e=>/^\s*pie/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Cwt(),mwt));return{diagram:e}},void 0,import.meta.url);return{id:mzt,diagram:e}},`loader`)},gzt=`quadrantChart`,_zt={id:gzt,detector:W(e=>/^\s*quadrantChart/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Gwt(),wwt));return{diagram:e}},void 0,import.meta.url);return{id:gzt,diagram:e}},`loader`)},vzt=`xychart`,yzt={id:vzt,detector:W(e=>/^\s*xychart(-beta)?/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(FTt(),Kwt));return{diagram:e}},void 0,import.meta.url);return{id:vzt,diagram:e}},`loader`)},bzt=`requirement`,xzt={id:bzt,detector:W(e=>/^\s*requirement(Diagram)?/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(WTt(),ITt));return{diagram:e}},void 0,import.meta.url);return{id:bzt,diagram:e}},`loader`)},Szt=`sequence`,Czt={id:Szt,detector:W(e=>/^\s*sequenceDiagram/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(YEt(),GTt));return{diagram:e}},void 0,import.meta.url);return{id:Szt,diagram:e}},`loader`)},wzt=`class`,Tzt={id:wzt,detector:W((e,t)=>t?.class?.defaultRenderer!==`dagre-wrapper`&&/^\s*classDiagram/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(oDt(),iDt));return{diagram:e}},void 0,import.meta.url);return{id:wzt,diagram:e}},`loader`)},Ezt=`classDiagram`,Dzt={id:Ezt,detector:W((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer===`dagre-wrapper`?!0:/^\s*classDiagram-v2/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(lDt(),sDt));return{diagram:e}},void 0,import.meta.url);return{id:Ezt,diagram:e}},`loader`)},Ozt=`state`,kzt={id:Ozt,detector:W((e,t)=>t?.state?.defaultRenderer!==`dagre-wrapper`&&/^\s*stateDiagram/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(_Ot(),QDt));return{diagram:e}},void 0,import.meta.url);return{id:Ozt,diagram:e}},`loader`)},Azt=`stateDiagram`,jzt={id:Azt,detector:W((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer===`dagre-wrapper`),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(bOt(),vOt));return{diagram:e}},void 0,import.meta.url);return{id:Azt,diagram:e}},`loader`)},Mzt=`journey`,Nzt={id:Mzt,detector:W(e=>/^\s*journey/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(JOt(),xOt));return{diagram:e}},void 0,import.meta.url);return{id:Mzt,diagram:e}},`loader`)},Pzt={draw:W((e,t,n)=>{G.debug(`rendering svg for syntax error
|
|
3622
|
+
`);let r=GS(t),i=r.append(`g`);r.attr(`viewBox`,`0 0 2412 512`),fy(r,100,512,!0),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1440).attr(`y`,250).attr(`font-size`,`150px`).style(`text-anchor`,`middle`).text(`Syntax error in text`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1250).attr(`y`,400).attr(`font-size`,`100px`).style(`text-anchor`,`middle`).text(`mermaid version ${n}`)},`draw`)},Fzt=Pzt,Izt={db:{},renderer:Pzt,parser:{parse:W(()=>{},`parse`)}},Lzt=`flowchart-elk`,Rzt={id:Lzt,detector:W((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer===`elk`?(t.layout=`elk`,!0):!1,`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(q1e(),K1e));return{diagram:e}},void 0,import.meta.url);return{id:Lzt,diagram:e}},`loader`)},zzt=`timeline`,Bzt={id:zzt,detector:W(e=>/^\s*timeline/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Gkt(),YOt));return{diagram:e}},void 0,import.meta.url);return{id:zzt,diagram:e}},`loader`)},Vzt=`mindmap`,Hzt={id:Vzt,detector:W(e=>/^\s*mindmap/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(fAt(),iAt));return{diagram:e}},void 0,import.meta.url);return{id:Vzt,diagram:e}},`loader`)},Uzt=`kanban`,Wzt={id:Uzt,detector:W(e=>/^\s*kanban/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(wAt(),pAt));return{diagram:e}},void 0,import.meta.url);return{id:Uzt,diagram:e}},`loader`)},Gzt=`sankey`,Kzt={id:Gzt,detector:W(e=>/^\s*sankey(-beta)?/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Njt(),yjt));return{diagram:e}},void 0,import.meta.url);return{id:Gzt,diagram:e}},`loader`)},qzt=`packet`,Jzt={id:qzt,detector:W(e=>/^\s*packet(-beta)?/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Kjt(),Pjt));return{diagram:e}},void 0,import.meta.url);return{id:qzt,diagram:e}},`loader`)},Yzt=`radar`,Xzt={id:Yzt,detector:W(e=>/^\s*radar-beta/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(_Mt(),qjt));return{diagram:e}},void 0,import.meta.url);return{id:Yzt,diagram:e}},`loader`)},Zzt=`block`,Qzt={id:Zzt,detector:W(e=>/^\s*block(-beta)?/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(ZMt(),vMt));return{diagram:e}},void 0,import.meta.url);return{id:Zzt,diagram:e}},`loader`)},$zt=`treeView`,eBt={id:$zt,detector:W(e=>/^\s*treeView-beta/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(ONt(),QMt));return{diagram:e}},void 0,import.meta.url);return{id:$zt,diagram:e}},`loader`)},tBt=`architecture`,nBt={id:tBt,detector:W(e=>/^\s*architecture/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(fPt(),MNt));return{diagram:e}},void 0,import.meta.url);return{id:tBt,diagram:e}},`loader`)},rBt=`eventmodeling`,iBt={id:rBt,detector:W(e=>/^\s*eventmodeling/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(tFt(),pPt));return{diagram:e}},void 0,import.meta.url);return{id:rBt,diagram:e}},`loader`)},aBt=`ishikawa`,oBt={id:aBt,detector:W(e=>/^\s*ishikawa(-beta)?\b/i.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(CFt(),nFt));return{diagram:e}},void 0,import.meta.url);return{id:aBt,diagram:e}},`loader`)},sBt=`venn`,cBt={id:sBt,detector:W(e=>/^\s*venn-beta/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(RIt(),hIt));return{diagram:e}},void 0,import.meta.url);return{id:sBt,diagram:e}},`loader`)},lBt=`treemap`,uBt={id:lBt,detector:W(e=>/^\s*treemap/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(YIt(),zIt));return{diagram:e}},void 0,import.meta.url);return{id:lBt,diagram:e}},`loader`)},dBt=`wardley`,fBt={id:dBt,detector:W(e=>/^\s*wardley-beta/i.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(wLt(),XIt));return{diagram:e}},void 0,import.meta.url);return{id:dBt,diagram:e}},`loader`)},pBt=`cynefin`,mBt={id:pBt,detector:W(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(VLt(),TLt));return{diagram:e}},void 0,import.meta.url);return{id:pBt,diagram:e}},`loader`)},hBt=`railroad`,gBt={id:hBt,detector:W(e=>/^\s*railroad-beta/i.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(cRt(),nRt));return{diagram:e}},void 0,import.meta.url);return{id:hBt,diagram:e}},`loader`)},_Bt=`railroadEbnf`,vBt={id:_Bt,detector:W(e=>/^\s*railroad-ebnf-beta/i.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(vRt(),lRt));return{diagram:e}},void 0,import.meta.url);return{id:_Bt,diagram:e}},`loader`)},yBt=`railroadAbnf`,bBt={id:yBt,detector:W(e=>/^\s*railroad-abnf-beta/i.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(ORt(),yRt));return{diagram:e}},void 0,import.meta.url);return{id:yBt,diagram:e}},`loader`)},xBt=`railroadPeg`,SBt={id:xBt,detector:W(e=>/^\s*railroad-peg-beta/i.test(e),`detector`),loader:W(async()=>{let{diagram:e}=await Rp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(BRt(),kRt));return{diagram:e}},void 0,import.meta.url);return{id:xBt,diagram:e}},`loader`)},CBt=!1,p3=W(()=>{CBt||(CBt=!0,Py(`error`,Izt,e=>e.toLowerCase().trim()===`error`),Py(`---`,{db:{clear:W(()=>{},`clear`)},styles:{},renderer:{draw:W(()=>{},`draw`)},parser:{parse:W(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},`parse`)},init:W(()=>null,`init`)},e=>e.toLowerCase().trimStart().startsWith(`---`)),Xv(Rzt,Hzt,nBt),Xv($Rt,Wzt,Dzt,Tzt,szt,dzt,pzt,hzt,xzt,Czt,azt,rzt,tzt,Bzt,lzt,jzt,kzt,Nzt,_zt,Kzt,Jzt,yzt,Qzt,iBt,eBt,Xzt,oBt,uBt,gBt,vBt,bBt,SBt,cBt,fBt,mBt))},`addDiagrams`),wBt=W(async()=>{G.debug(`Loading registered diagrams`);let e=(await Promise.allSettled(Object.entries(Jv).map(async([e,{detector:t,loader:n}])=>{if(n)try{Fy(e)}catch{try{let{diagram:e,id:r}=await n();Py(r,e,t)}catch(t){throw G.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete Jv[e],t}}}))).filter(e=>e.status===`rejected`);if(e.length>0){G.error(`Failed to load ${e.length} external diagrams`);for(let t of e)G.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},`loadRegisteredDiagrams`),TBt=`graphics-document document`,W(HRt,`setA11yDiagramInfo`),W(URt,`addSVGa11yTitleDescription`),m3=class e{constructor(e,t,n,r,i){this.type=e,this.text=t,this.db=n,this.parser=r,this.renderer=i}static{W(this,`Diagram`)}static async fromText(t,n={}){let r=Rv(),i=Yv(t,r);t=hCe(t)+`
|
|
3623
3623
|
`;try{Fy(i)}catch{let e=yse(i);if(!e)throw new qv(`Diagram ${i} not found.`);let{id:t,diagram:n}=await e();Py(t,n)}let{db:a,parser:o,renderer:s,init:l}=Fy(i);return o.parser&&(o.parser.yy=a),a.clear?.(),l?.(r),n.title&&a.setDiagramTitle?.(n.title),await o.parse(t),new e(i,t,a,o,s)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},EBt=[],DBt=W(()=>{EBt.forEach(e=>{e()}),EBt=[]},`attachFunctions`),OBt=W(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,``).trimStart(),`cleanupComments`),W(WRt,`extractFrontMatter`),kBt=W(e=>e.replace(/\r\n?/g,`
|
|
3624
3624
|
`).replace(/<(\w+)([^>]*)>/g,(e,t,n)=>`<`+t+n.replace(/="([^"]*)"/g,`='$1'`)+`>`),`cleanupText`),ABt=W(e=>{let{text:t,metadata:n}=WRt(e),{displayMode:r,title:i,config:a={}}=n;return r&&(a.gantt||={},a.gantt.displayMode=r),{title:i,config:a,text:t}},`processFrontmatter`),jBt=W(e=>{let t=TC.detectInit(e)??{},n=TC.detectDirective(e,`wrap`);return Array.isArray(n)?t.wrap=n.some(({type:e})=>e===`wrap`):n?.type===`wrap`&&(t.wrap=!0),{text:eCe(e),directive:t}},`processDirectives`),W(GRt,`preprocessDiagram`),W(KRt,`toBase64`),MBt=5e4,NBt=`graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa`,PBt=`sandbox`,FBt=`loose`,IBt=`http://www.w3.org/2000/svg`,LBt=`http://www.w3.org/1999/xlink`,RBt=`http://www.w3.org/1999/xhtml`,zBt=`100%`,BBt=`100%`,VBt=`border:0;margin:0;`,HBt=`margin:0`,UBt=`allow-top-navigation-by-user-activation allow-popups`,WBt=`The "iframe" tag is not supported by your browser.`,GBt=[`foreignobject`],KBt=[`dominant-baseline`],W(qRt,`processAndSetConfigs`),W(JRt,`parse`),qBt=W((e,t,n=[])=>`.${e} ${t} ${Ov(`{ ${n.join(` !important; `)} !important; }`)}`,`cssImportantStyles`),JBt=W((e,t=new Map)=>{let n=new CSSStyleSheet;if(e.fontFamily!==void 0&&n.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,n.cssRules.length),e.altFontFamily!==void 0&&n.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,n.cssRules.length),t instanceof Map){let r=Wv(e)?[`> *`,`span`]:[`rect`,`polygon`,`ellipse`,`circle`,`path`];t.forEach(e=>{ISe(e.styles)||r.forEach(t=>{n.insertRule(qBt(e.id,t,e.styles),n.cssRules.length)}),ISe(e.textStyles)||n.insertRule(qBt(e.id,`tspan`,(e?.textStyles||[]).map(e=>e.replace(`color`,`fill`))),n.cssRules.length)})}let r=``;if(e.themeCSS!==void 0){if(typeof n.replaceSync==`function`){let t=new CSSStyleSheet;t.replaceSync(e.themeCSS),r=hv(t)+`
|
|
3625
3625
|
`}else r+=`${e.themeCSS}
|
|
3626
3626
|
`}return r+hv(n)},`createCssStyles`),YBt=W((e,t)=>d$e(a$e(`${e}{${t}}`),m$e([W(function(t,n,r,i){if(t.type===`rule`&&Array.isArray(t.props)){if(t.parent&&t.parent.type===`@keyframes`)return;t.props=t.props.map(n=>n===e&&Array.isArray(t.children)&&t.children.every(e=>e.type===`decl`&&new Set([`font-family`,`font-size`,`fill`]).has(e.props))?n:!n.startsWith(`${e} `)&&!n.startsWith(`${e}>`)||n.startsWith(`${e} ||`)?`${e} ${n}`:n)}else t.type.startsWith(`@`)&&([`@media`,`@supports`,`@layer`,`@scope`,`@container`,`@starting-style`,`@keyframes`].includes(t.type)||(G.warn(`Removing unsupported at-rule ${t.type} from CSS`),t.type=nH))},`addNamespace`),f$e])),`compileCSS`),XBt=W((e,t,n,r)=>{let i=JBt(e,n);return YBt(r,Fse(t,i,{...e.themeVariables,theme:e.theme,look:e.look},r))},`createUserStyles`),ZBt=W((e=``,t,n)=>{let r=e;return!n&&!t&&(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,`marker-end="url(#`)),r=EC(r),r=r.replace(/<br>/g,`<br/>`),r},`cleanUpSvgCode`),QBt=W((e=``,t)=>`<iframe style="width:${zBt};height:${t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+`px`:BBt};${VBt}" src="data:text/html;charset=UTF-8;base64,${KRt(`<body style="${HBt}">${e}</body>`)}" sandbox="${UBt}">
|
|
3627
3627
|
${WBt}
|
|
3628
|
-
</iframe>`,`putIntoIFrame`),$Bt=W((e,t,n,r,i)=>{let a=e.append(`div`);a.attr(`id`,n),r&&a.attr(`style`,r);let o=a.append(`svg`).attr(`id`,t).attr(`width`,`100%`).attr(`xmlns`,IBt);return i&&o.attr(`xmlns:xlink`,i),o.append(`g`),e},`appendDivSvgG`),W(YRt,`sandboxedIframe`),eVt=W((e,t,n,r)=>{e.getElementById(t)?.remove(),e.getElementById(n)?.remove(),e.getElementById(r)?.remove()},`removeExistingElements`),tVt=W(async function(e,t,n){p3();let r=qRt(t);t=r.code;let i=Rv();G.debug(i),t.length>(i?.maxTextSize??MBt)&&(t=NBt);let a=`#${e}`,o=`i`+e,s=`#`+o,l=`d`+e,u=`#`+l,d=W(()=>{let e=hb(p?s:u).node();e&&`remove`in e&&e.remove()},`removeTempElements`),f=hb(document.body),p=i.securityLevel===PBt,m=i.securityLevel===FBt,h=i.fontFamily;n===void 0?(eVt(document,e,l,o),p?(f=hb(YRt(hb(document.body),o).nodes()[0].contentDocument.body),f.node().style.margin=`0`):f=hb(`body`),$Bt(f,e,l)):(n&&(n.innerHTML=``),p?(f=hb(YRt(hb(n),o).nodes()[0].contentDocument.body),f.node().style.margin=`0`):f=hb(n),$Bt(f,e,l,`font-family: ${h}`,LBt));let g,_;try{g=await m3.fromText(t,{title:r.title})}catch(e){if(i.suppressErrorRendering)throw d(),e;g=await m3.fromText(`error`),_=e}let v=f.select(u).node(),y=g.type,b=v.firstChild,x=b.firstChild,S=g.renderer.getClasses?.(t,g),C=XBt(i,y,S,a),w=document.createElement(`style`);w.innerHTML=C,b.insertBefore(w,x);try{await g.renderer.draw(t,e,`11.17.2`,g)}catch(n){throw i.suppressErrorRendering?d():Fzt.draw(t,e,`11.17.2`),n}let T=f.select(`${u} svg`),E=g.db.getAccTitle?.(),D=g.db.getAccDescription?.();ZRt(y,T,E,D);let O=W(()=>{f.select(`[id="${e}"]`).selectAll(`foreignobject > *`).attr(`xmlns`,RBt);let t=f.select(u).node().innerHTML;if(G.debug(`config.arrowMarkerAbsolute`,i.arrowMarkerAbsolute),t=ZBt(t,p,Av(i.arrowMarkerAbsolute)),p){let e=f.select(u+` svg`).node();t=QBt(t,e)}else m||(t=ih.sanitize(t,{ADD_TAGS:GBt,ADD_ATTR:KBt,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return DBt(),t},`serializeSvg`)();if(_)throw _;return d(),{diagramType:y,svg:O,bindFunctions:g.db.bindFunctions}},`render`),W(XRt,`initialize`),nVt=W((e,t={})=>{let{code:n}=GRt(e);return m3.fromText(n,t)},`getDiagramFromText`),W(ZRt,`addA11yInfo`),h3=Object.freeze({render:tVt,parse:JRt,getDiagramFromText:nVt,initialize:XRt,getConfig:Rv,setConfig:Lv,getSiteConfig:Iv,updateSiteConfig:mse,reset:W(()=>{Bv()},`reset`),globalReset:W(()=>{Bv(kv)},`globalReset`),defaultConfig:kv}),Up(Rv().logLevel),Bv(Rv()),rVt=W((e,t,n)=>{G.warn(e),qSe(e)?(n&&n(e.str,e.hash),t.push({...e,message:e.str,error:e})):(n&&n(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},`handleError`),iVt=W(async function(e={querySelector:`.mermaid`}){try{await aVt(e)}catch(t){if(qSe(t)&&G.error(t.str),v3.parseError&&v3.parseError(t),!e.suppressErrors)throw G.error(`Use the suppressErrors option to suppress these errors`),t}},`run`),aVt=W(async function({postRenderCallback:e,querySelector:t,nodes:n}={querySelector:`.mermaid`}){let r=h3.getConfig();G.debug(`${e?``:`No `}Callback function found`);let i;if(n)i=n;else if(t)i=document.querySelectorAll(t);else throw Error(`Nodes and querySelector are both undefined`);G.debug(`Found ${i.length} diagrams`),r?.startOnLoad!==void 0&&(G.debug(`Start On Load: `+r?.startOnLoad),h3.updateSiteConfig({startOnLoad:r?.startOnLoad}));let a=new TC.InitIDGenerator(r.deterministicIds,r.deterministicIDSeed),o,s=[];for(let t of Array.from(i)){if(G.info(`Rendering diagram: `+t.id),t.getAttribute(`data-processed`))continue;t.setAttribute(`data-processed`,`true`);let n=`mermaid-${a.next()}`;o=t.innerHTML,o=ywe(TC.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,`<br/>`);let r=TC.detectInit(o);r&&G.debug(`Detected early reinit: `,r);try{let{svg:r,bindFunctions:i}=await pVt(n,o,t);t.innerHTML=r,e&&await e(n),i&&i(t)}catch(e){rVt(e,s,v3.parseError)}}if(s.length>0)throw s[0]},`runThrowsErrors`),oVt=W(function(e){h3.initialize(e)},`initialize`),sVt=W(async function(e,t,n){G.warn(`mermaid.init is deprecated. Please use run instead.`),e&&oVt(e);let r={postRenderCallback:n,querySelector:`.mermaid`};typeof t==`string`?r.querySelector=t:t&&(r.nodes=t instanceof HTMLElement?[t]:t),await iVt(r)},`init`),cVt=W(async(e,{lazyLoad:t=!0}={})=>{p3(),Xv(...e),t===!1&&await wBt()},`registerExternalDiagrams`),lVt=W(function(){if(v3.startOnLoad){let{startOnLoad:e}=h3.getConfig();e&&v3.run().catch(e=>G.error(`Mermaid failed to initialize`,e))}},`contentLoaded`),typeof document<`u`&&window.addEventListener(`load`,lVt,!1),uVt=W(function(e){v3.parseError=e},`setParseErrorHandler`),g3=[],_3=!1,dVt=W(async()=>{if(!_3){for(_3=!0;g3.length>0;){let e=g3.shift();if(e)try{await e()}catch(e){G.error(`Error executing queue`,e)}}_3=!1}},`executeQueue`),fVt=W(async(e,t)=>new Promise((n,r)=>{let i=W(()=>new Promise((i,a)=>{h3.parse(e,t).then(e=>{i(e),n(e)},e=>{G.error(`Error parsing`,e),v3.parseError?.(e),a(e),r(e)})}),`performCall`);g3.push(i),dVt().catch(r)}),`parse`),pVt=W((e,t,n)=>new Promise((r,i)=>{let a=W(()=>new Promise((a,o)=>{h3.render(e,t,n).then(e=>{a(e),r(e)},e=>{G.error(`Error parsing`,e),v3.parseError?.(e),o(e),i(e)})}),`performCall`);g3.push(a),dVt().catch(i)}),`render`),v3={startOnLoad:!0,mermaidAPI:h3,parse:fVt,render:pVt,init:sVt,run:iVt,registerExternalDiagrams:cVt,registerLayoutLoaders:PQe,initialize:oVt,parseError:void 0,contentLoaded:lVt,setParseErrorHandler:uVt,detectType:Yv,registerIconPacks:tC,getRegisteredDiagramsMetadata:W(()=>Object.keys(Jv).map(e=>({id:e})),`getRegisteredDiagramsMetadata`)},mVt=v3}));zp();var gVt={startOnLoad:!1,securityLevel:`strict`,fontFamily:`'Segoe UI', system-ui, sans-serif`,themeVariables:{fontFamily:`'Segoe UI', system-ui, sans-serif`,fontSize:`11px`},flowchart:{useMaxWidth:!1,htmlLabels:!1},er:{useMaxWidth:!1}},y3={padding:`0.35rem 0.65rem`,background:`var(--color-surface)`,color:`var(--color-text-primary)`,border:`1px solid var(--color-border)`,borderRadius:`var(--border-radius-md)`,fontSize:`0.8125rem`,fontWeight:500,cursor:`pointer`,transition:`all var(--transition-fast)`},_Vt=Promise.resolve();function vVt(e){let t=_Vt.then(()=>new Promise((t,n)=>{let r=()=>{e().then(t,n)};typeof requestIdleCallback==`function`?requestIdleCallback(r,{timeout:500}):setTimeout(r,0)}));return _Vt=t.then(()=>void 0,()=>void 0),t}var yVt=new Map,bVt=new Set;function xVt(){bVt.forEach(e=>e())}function SVt({chart:e,caption:t=`Diagram`,onRendered:n,theme:r=`neutral`,forceRender:i=!1}){let a=(0,x.useRef)(null),o=(0,x.useRef)(null),s=(0,x.useRef)(null),[l,u]=(0,x.useState)(``),[d,f]=(0,x.useState)(!1),[p,m]=(0,x.useState)(!1),[h,g]=(0,x.useState)(1),[_,v]=(0,x.useState)(!1),[y,b]=(0,x.useState)(null),S=(0,x.useMemo)(()=>`${Math.round(h*100)}%`,[h]),C=(0,x.useId)().replace(/:/g,`_`);return(0,x.useEffect)(()=>{let e=()=>m(!0);return bVt.add(e),()=>{bVt.delete(e)}},[]),(0,x.useEffect)(()=>{if(i){queueMicrotask(()=>m(!0));return}let e=a.current;if(!e)return;if(typeof IntersectionObserver>`u`){queueMicrotask(()=>m(!0));return}let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(m(!0),t.disconnect())},{rootMargin:`400px 0px`});return t.observe(e),()=>t.disconnect()},[i]),(0,x.useEffect)(()=>{let e=()=>{v(document.fullscreenElement===a.current)};return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[]),(0,x.useEffect)(()=>{if(!p)return;let i=!0,a=`${r}::${e}`;return(async()=>{try{u(``),f(!1);let n=yVt.get(a),s;if(n)s=n.sourceId===C?n.svg:n.svg.split(n.sourceId).join(C);else{let t=(await Rp(async()=>{let{default:e}=await Promise.resolve().then(()=>(hVt(),VRt));return{default:e}},void 0)).default;if(t.initialize({...gVt,theme:r}),!i)return;let n=`m_${C}`;({svg:s}=await vVt(()=>t.render(n,e))),yVt.set(a,{svg:s,sourceId:C})}if(!i||!o.current)return;o.current.innerHTML=s;let l=o.current.querySelector(`svg`);if(!l)return;l.setAttribute(`role`,`img`),l.setAttribute(`aria-label`,t),l.setAttribute(`preserveAspectRatio`,`xMinYMin meet`);let d=l.getAttribute(`viewBox`)?.trim()?.split(/\s+/);if(d&&d.length===4){let e=Number(d[2]);Number.isFinite(e)&&e>0&&(l.style.width=`${e}px`,l.style.minWidth=`${e}px`,b(e));let t=Number(d[3]);Number.isFinite(t)&&t>0&&(l.style.height=`${t}px`)}l.removeAttribute(`width`),l.removeAttribute(`height`),Object.assign(l.style,{maxWidth:`none`,display:`block`,margin:0,fontSize:`8pt`}),l.querySelectorAll(`text`).forEach(e=>{let t=e.getAttribute(`font-size`);if(!t)e.setAttribute(`font-size`,`8pt`);else{let n=parseFloat(t),r=t.toLowerCase().includes(`pt`),i=t.toLowerCase().includes(`px`);(r&&n<8||i&&n<10.67)&&e.setAttribute(`font-size`,`8pt`)}}),f(!0)}catch(e){i&&u(`Failed to render: ${e.message}`)}finally{i&&n?.(C)}})(),()=>{i=!1}},[e,t,C,p,r]),(0,M.jsxs)(`figure`,{ref:a,"aria-label":t,style:{margin:`1.5rem 0`,width:`100%`,height:_?`100vh`:`auto`,display:`flex`,flexDirection:`column`,overflow:`visible`,background:`var(--color-surface)`,color:`var(--color-text-primary)`,padding:_?`0.75rem`:0,boxSizing:`border-box`},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`flex-end`,gap:`0.5rem`,marginBottom:`0.5rem`,position:`sticky`,top:0,zIndex:1,background:`var(--color-surface)`,padding:`0.25rem 0`},children:[(0,M.jsx)(`span`,{style:{fontSize:`0.8rem`,color:`var(--color-text-muted)`},children:S}),(0,M.jsx)(`button`,{type:`button`,onClick:()=>g(e=>Math.max(.1,e-.1)),"aria-label":`Zoom out`,style:y3,onMouseEnter:e=>{e.currentTarget.style.borderColor=`var(--color-accent)`,e.currentTarget.style.boxShadow=`0 0 0 2px rgba(37,99,235,0.1)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`var(--color-border)`,e.currentTarget.style.boxShadow=`none`},children:`−`}),(0,M.jsx)(`button`,{type:`button`,onClick:()=>g(1),"aria-label":`Reset zoom`,style:y3,onMouseEnter:e=>{e.currentTarget.style.borderColor=`var(--color-accent)`,e.currentTarget.style.boxShadow=`0 0 0 2px rgba(37,99,235,0.1)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`var(--color-border)`,e.currentTarget.style.boxShadow=`none`},children:`1×`}),(0,M.jsx)(`button`,{type:`button`,onClick:()=>{if(!s.current||!y)return;let e=s.current.clientWidth-16;g(Math.max(.1,Math.min(8,e/y*.97)))},"aria-label":`Fit to width`,disabled:!y,style:y3,onMouseEnter:e=>{e.currentTarget.style.borderColor=`var(--color-accent)`,e.currentTarget.style.boxShadow=`0 0 0 2px rgba(37,99,235,0.1)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`var(--color-border)`,e.currentTarget.style.boxShadow=`none`},children:`Fit`}),(0,M.jsx)(`button`,{type:`button`,onClick:()=>g(e=>Math.min(8,e+.1)),"aria-label":`Zoom in`,style:y3,onMouseEnter:e=>{e.currentTarget.style.borderColor=`var(--color-accent)`,e.currentTarget.style.boxShadow=`0 0 0 2px rgba(37,99,235,0.1)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`var(--color-border)`,e.currentTarget.style.boxShadow=`none`},children:`+`}),(0,M.jsx)(`button`,{type:`button`,onClick:async()=>{if(a.current)try{document.fullscreenElement===a.current?await document.exitFullscreen():await a.current.requestFullscreen()}catch{}},"aria-label":_?`Exit fullscreen`:`Fullscreen`,style:y3,onMouseEnter:e=>{e.currentTarget.style.borderColor=`var(--color-accent)`,e.currentTarget.style.boxShadow=`0 0 0 2px rgba(37,99,235,0.1)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`var(--color-border)`,e.currentTarget.style.boxShadow=`none`},children:_?`✕ Exit FS`:`⛶ Full Screen`})]}),(0,M.jsx)(`div`,{ref:s,style:{flex:_?1:void 0,minHeight:_?0:d?`auto`:`60px`,overflowX:`auto`,overflowY:`auto`,border:`1px solid var(--color-code-border)`,borderRadius:`var(--border-radius-md)`,padding:`0.5rem`,maxHeight:_?`none`:`85vh`,background:`var(--color-surface)`,cursor:h<1?`zoom-in`:h>1?`grab`:`default`},children:(0,M.jsx)(`div`,{style:{transform:`scale(${h})`,transformOrigin:`top left`,width:`max-content`,minWidth:`max-content`},children:(0,M.jsx)(`div`,{ref:o,"aria-hidden":!d})})}),l&&(0,M.jsxs)(`div`,{role:`alert`,style:{padding:`0.75rem 1rem`,background:`var(--color-error-bg)`,color:`var(--color-error)`,borderRadius:`var(--border-radius-md)`,fontSize:`0.875rem`,marginTop:`0.5rem`},children:[`⚠️ `,l]}),(0,M.jsxs)(`details`,{style:{marginTop:`0.5rem`},children:[(0,M.jsxs)(`summary`,{style:{fontSize:`0.8125rem`,color:`var(--color-text-muted)`,cursor:`pointer`},children:[`Source (`,t,`)`]}),(0,M.jsx)(`pre`,{"aria-label":`Source: ${t}`,style:{marginTop:`0.5rem`,fontSize:`0.75rem`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,background:`var(--color-code-bg)`,padding:`0.75rem`,borderRadius:`var(--border-radius-md)`,border:`1px solid var(--color-code-border)`},children:(0,M.jsx)(`code`,{children:e})})]}),t&&(0,M.jsx)(`figcaption`,{style:{textAlign:`center`,fontSize:`0.875rem`,color:`var(--color-text-secondary)`,marginTop:`0.25rem`},children:t})]})}var b3={viewer:`_viewer_9y40k_9`,toolbar:`_toolbar_9y40k_41`,viewerTitle:`_viewerTitle_9y40k_65`,actionGroups:`_actionGroups_9y40k_87`,actionGroup:`_actionGroup_9y40k_87`,exportGroup:`_exportGroup_9y40k_129`,exportMenu:`_exportMenu_9y40k_137`,headerExportMenu:`_headerExportMenu_9y40k_139`,exportLabel:`_exportLabel_9y40k_181`,dropdownArrow:`_dropdownArrow_9y40k_183`,exportMenuPanel:`_exportMenuPanel_9y40k_195`,menuBtn:`_menuBtn_9y40k_227`,btnIcon:`_btnIcon_9y40k_293`,toolbarBtn:`_toolbarBtn_9y40k_309`,primary:`_primary_9y40k_359`,searchBar:`_searchBar_9y40k_395`,searchInput:`_searchInput_9y40k_415`,searchMatchCount:`_searchMatchCount_9y40k_449`,content:`_content_9y40k_483`,copyToast:`_copyToast_9y40k_517`,exportNotice:`_exportNotice_9y40k_535`,diagramProgress:`_diagramProgress_9y40k_553`,rawSource:`_rawSource_9y40k_605`};function CVt(e,t){return`<!doctype html>
|
|
3628
|
+
</iframe>`,`putIntoIFrame`),$Bt=W((e,t,n,r,i)=>{let a=e.append(`div`);a.attr(`id`,n),r&&a.attr(`style`,r);let o=a.append(`svg`).attr(`id`,t).attr(`width`,`100%`).attr(`xmlns`,IBt);return i&&o.attr(`xmlns:xlink`,i),o.append(`g`),e},`appendDivSvgG`),W(YRt,`sandboxedIframe`),eVt=W((e,t,n,r)=>{e.getElementById(t)?.remove(),e.getElementById(n)?.remove(),e.getElementById(r)?.remove()},`removeExistingElements`),tVt=W(async function(e,t,n){p3();let r=qRt(t);t=r.code;let i=Rv();G.debug(i),t.length>(i?.maxTextSize??MBt)&&(t=NBt);let a=`#${e}`,o=`i`+e,s=`#`+o,l=`d`+e,u=`#`+l,d=W(()=>{let e=hb(p?s:u).node();e&&`remove`in e&&e.remove()},`removeTempElements`),f=hb(document.body),p=i.securityLevel===PBt,m=i.securityLevel===FBt,h=i.fontFamily;n===void 0?(eVt(document,e,l,o),p?(f=hb(YRt(hb(document.body),o).nodes()[0].contentDocument.body),f.node().style.margin=`0`):f=hb(`body`),$Bt(f,e,l)):(n&&(n.innerHTML=``),p?(f=hb(YRt(hb(n),o).nodes()[0].contentDocument.body),f.node().style.margin=`0`):f=hb(n),$Bt(f,e,l,`font-family: ${h}`,LBt));let g,_;try{g=await m3.fromText(t,{title:r.title})}catch(e){if(i.suppressErrorRendering)throw d(),e;g=await m3.fromText(`error`),_=e}let v=f.select(u).node(),y=g.type,b=v.firstChild,x=b.firstChild,S=g.renderer.getClasses?.(t,g),C=XBt(i,y,S,a),w=document.createElement(`style`);w.innerHTML=C,b.insertBefore(w,x);try{await g.renderer.draw(t,e,`11.17.2`,g)}catch(n){throw i.suppressErrorRendering?d():Fzt.draw(t,e,`11.17.2`),n}let T=f.select(`${u} svg`),E=g.db.getAccTitle?.(),D=g.db.getAccDescription?.();ZRt(y,T,E,D);let O=W(()=>{f.select(`[id="${e}"]`).selectAll(`foreignobject > *`).attr(`xmlns`,RBt);let t=f.select(u).node().innerHTML;if(G.debug(`config.arrowMarkerAbsolute`,i.arrowMarkerAbsolute),t=ZBt(t,p,Av(i.arrowMarkerAbsolute)),p){let e=f.select(u+` svg`).node();t=QBt(t,e)}else m||(t=ih.sanitize(t,{ADD_TAGS:GBt,ADD_ATTR:KBt,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return DBt(),t},`serializeSvg`)();if(_)throw _;return d(),{diagramType:y,svg:O,bindFunctions:g.db.bindFunctions}},`render`),W(XRt,`initialize`),nVt=W((e,t={})=>{let{code:n}=GRt(e);return m3.fromText(n,t)},`getDiagramFromText`),W(ZRt,`addA11yInfo`),h3=Object.freeze({render:tVt,parse:JRt,getDiagramFromText:nVt,initialize:XRt,getConfig:Rv,setConfig:Lv,getSiteConfig:Iv,updateSiteConfig:mse,reset:W(()=>{Bv()},`reset`),globalReset:W(()=>{Bv(kv)},`globalReset`),defaultConfig:kv}),Up(Rv().logLevel),Bv(Rv()),rVt=W((e,t,n)=>{G.warn(e),qSe(e)?(n&&n(e.str,e.hash),t.push({...e,message:e.str,error:e})):(n&&n(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},`handleError`),iVt=W(async function(e={querySelector:`.mermaid`}){try{await aVt(e)}catch(t){if(qSe(t)&&G.error(t.str),v3.parseError&&v3.parseError(t),!e.suppressErrors)throw G.error(`Use the suppressErrors option to suppress these errors`),t}},`run`),aVt=W(async function({postRenderCallback:e,querySelector:t,nodes:n}={querySelector:`.mermaid`}){let r=h3.getConfig();G.debug(`${e?``:`No `}Callback function found`);let i;if(n)i=n;else if(t)i=document.querySelectorAll(t);else throw Error(`Nodes and querySelector are both undefined`);G.debug(`Found ${i.length} diagrams`),r?.startOnLoad!==void 0&&(G.debug(`Start On Load: `+r?.startOnLoad),h3.updateSiteConfig({startOnLoad:r?.startOnLoad}));let a=new TC.InitIDGenerator(r.deterministicIds,r.deterministicIDSeed),o,s=[];for(let t of Array.from(i)){if(G.info(`Rendering diagram: `+t.id),t.getAttribute(`data-processed`))continue;t.setAttribute(`data-processed`,`true`);let n=`mermaid-${a.next()}`;o=t.innerHTML,o=ywe(TC.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,`<br/>`);let r=TC.detectInit(o);r&&G.debug(`Detected early reinit: `,r);try{let{svg:r,bindFunctions:i}=await pVt(n,o,t);t.innerHTML=r,e&&await e(n),i&&i(t)}catch(e){rVt(e,s,v3.parseError)}}if(s.length>0)throw s[0]},`runThrowsErrors`),oVt=W(function(e){h3.initialize(e)},`initialize`),sVt=W(async function(e,t,n){G.warn(`mermaid.init is deprecated. Please use run instead.`),e&&oVt(e);let r={postRenderCallback:n,querySelector:`.mermaid`};typeof t==`string`?r.querySelector=t:t&&(r.nodes=t instanceof HTMLElement?[t]:t),await iVt(r)},`init`),cVt=W(async(e,{lazyLoad:t=!0}={})=>{p3(),Xv(...e),t===!1&&await wBt()},`registerExternalDiagrams`),lVt=W(function(){if(v3.startOnLoad){let{startOnLoad:e}=h3.getConfig();e&&v3.run().catch(e=>G.error(`Mermaid failed to initialize`,e))}},`contentLoaded`),typeof document<`u`&&window.addEventListener(`load`,lVt,!1),uVt=W(function(e){v3.parseError=e},`setParseErrorHandler`),g3=[],_3=!1,dVt=W(async()=>{if(!_3){for(_3=!0;g3.length>0;){let e=g3.shift();if(e)try{await e()}catch(e){G.error(`Error executing queue`,e)}}_3=!1}},`executeQueue`),fVt=W(async(e,t)=>new Promise((n,r)=>{let i=W(()=>new Promise((i,a)=>{h3.parse(e,t).then(e=>{i(e),n(e)},e=>{G.error(`Error parsing`,e),v3.parseError?.(e),a(e),r(e)})}),`performCall`);g3.push(i),dVt().catch(r)}),`parse`),pVt=W((e,t,n)=>new Promise((r,i)=>{let a=W(()=>new Promise((a,o)=>{h3.render(e,t,n).then(e=>{a(e),r(e)},e=>{G.error(`Error parsing`,e),v3.parseError?.(e),o(e),i(e)})}),`performCall`);g3.push(a),dVt().catch(i)}),`render`),v3={startOnLoad:!0,mermaidAPI:h3,parse:fVt,render:pVt,init:sVt,run:iVt,registerExternalDiagrams:cVt,registerLayoutLoaders:PQe,initialize:oVt,parseError:void 0,contentLoaded:lVt,setParseErrorHandler:uVt,detectType:Yv,registerIconPacks:tC,getRegisteredDiagramsMetadata:W(()=>Object.keys(Jv).map(e=>({id:e})),`getRegisteredDiagramsMetadata`)},mVt=v3}));zp();var gVt={startOnLoad:!1,securityLevel:`strict`,fontFamily:`'Segoe UI', system-ui, sans-serif`,themeVariables:{fontFamily:`'Segoe UI', system-ui, sans-serif`,fontSize:`11px`},flowchart:{useMaxWidth:!1,htmlLabels:!1},er:{useMaxWidth:!1}},y3={padding:`0.35rem 0.65rem`,background:`var(--color-surface)`,color:`var(--color-text-primary)`,border:`1px solid var(--color-border)`,borderRadius:`var(--border-radius-md)`,fontSize:`0.8125rem`,fontWeight:500,cursor:`pointer`,transition:`all var(--transition-fast)`},_Vt=Promise.resolve();function vVt(e){let t=_Vt.then(()=>new Promise((t,n)=>{let r=()=>{e().then(t,n)};typeof requestIdleCallback==`function`?requestIdleCallback(r,{timeout:500}):setTimeout(r,0)}));return _Vt=t.then(()=>void 0,()=>void 0),t}var yVt=new Map,bVt=new Set;function xVt(){bVt.forEach(e=>e())}function SVt({chart:e,caption:t=`Diagram`,onRendered:n,theme:r=`neutral`,forceRender:i=!1}){let a=(0,x.useRef)(null),o=(0,x.useRef)(null),s=(0,x.useRef)(null),[l,u]=(0,x.useState)(``),[d,f]=(0,x.useState)(!1),[p,m]=(0,x.useState)(!1),[h,g]=(0,x.useState)(1),[_,v]=(0,x.useState)(!1),[y,b]=(0,x.useState)(null),S=(0,x.useMemo)(()=>`${Math.round(h*100)}%`,[h]),C=(0,x.useId)().replace(/:/g,`_`);return(0,x.useEffect)(()=>{let e=()=>m(!0);return bVt.add(e),()=>{bVt.delete(e)}},[]),(0,x.useEffect)(()=>{if(i){queueMicrotask(()=>m(!0));return}let e=a.current;if(!e)return;if(typeof IntersectionObserver>`u`){queueMicrotask(()=>m(!0));return}let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(m(!0),t.disconnect())},{rootMargin:`400px 0px`});return t.observe(e),()=>t.disconnect()},[i]),(0,x.useEffect)(()=>{let e=()=>{v(document.fullscreenElement===a.current)};return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[]),(0,x.useEffect)(()=>{if(!p)return;let i=!0,a=`${r}::${e}`;return(async()=>{try{u(``),f(!1);let n=yVt.get(a),s;if(n)s=n.sourceId===C?n.svg:n.svg.split(n.sourceId).join(C);else{let t=(await Rp(async()=>{let{default:e}=await Promise.resolve().then(()=>(hVt(),VRt));return{default:e}},void 0,import.meta.url)).default;if(t.initialize({...gVt,theme:r}),!i)return;let n=`m_${C}`;({svg:s}=await vVt(()=>t.render(n,e))),yVt.set(a,{svg:s,sourceId:C})}if(!i||!o.current)return;o.current.innerHTML=s;let l=o.current.querySelector(`svg`);if(!l)return;l.setAttribute(`role`,`img`),l.setAttribute(`aria-label`,t),l.setAttribute(`preserveAspectRatio`,`xMinYMin meet`);let d=l.getAttribute(`viewBox`)?.trim()?.split(/\s+/);if(d&&d.length===4){let e=Number(d[2]);Number.isFinite(e)&&e>0&&(l.style.width=`${e}px`,l.style.minWidth=`${e}px`,b(e));let t=Number(d[3]);Number.isFinite(t)&&t>0&&(l.style.height=`${t}px`)}l.removeAttribute(`width`),l.removeAttribute(`height`),Object.assign(l.style,{maxWidth:`none`,display:`block`,margin:0,fontSize:`8pt`}),l.querySelectorAll(`text`).forEach(e=>{let t=e.getAttribute(`font-size`);if(!t)e.setAttribute(`font-size`,`8pt`);else{let n=parseFloat(t),r=t.toLowerCase().includes(`pt`),i=t.toLowerCase().includes(`px`);(r&&n<8||i&&n<10.67)&&e.setAttribute(`font-size`,`8pt`)}}),f(!0)}catch(e){i&&u(`Failed to render: ${e.message}`)}finally{i&&n?.(C)}})(),()=>{i=!1}},[e,t,C,p,r]),(0,M.jsxs)(`figure`,{ref:a,"aria-label":t,style:{margin:`1.5rem 0`,width:`100%`,height:_?`100vh`:`auto`,display:`flex`,flexDirection:`column`,overflow:`visible`,background:`var(--color-surface)`,color:`var(--color-text-primary)`,padding:_?`0.75rem`:0,boxSizing:`border-box`},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`flex-end`,gap:`0.5rem`,marginBottom:`0.5rem`,position:`sticky`,top:0,zIndex:1,background:`var(--color-surface)`,padding:`0.25rem 0`},children:[(0,M.jsx)(`span`,{style:{fontSize:`0.8rem`,color:`var(--color-text-muted)`},children:S}),(0,M.jsx)(`button`,{type:`button`,onClick:()=>g(e=>Math.max(.1,e-.1)),"aria-label":`Zoom out`,style:y3,onMouseEnter:e=>{e.currentTarget.style.borderColor=`var(--color-accent)`,e.currentTarget.style.boxShadow=`0 0 0 2px rgba(37,99,235,0.1)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`var(--color-border)`,e.currentTarget.style.boxShadow=`none`},children:`−`}),(0,M.jsx)(`button`,{type:`button`,onClick:()=>g(1),"aria-label":`Reset zoom`,style:y3,onMouseEnter:e=>{e.currentTarget.style.borderColor=`var(--color-accent)`,e.currentTarget.style.boxShadow=`0 0 0 2px rgba(37,99,235,0.1)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`var(--color-border)`,e.currentTarget.style.boxShadow=`none`},children:`1×`}),(0,M.jsx)(`button`,{type:`button`,onClick:()=>{if(!s.current||!y)return;let e=s.current.clientWidth-16;g(Math.max(.1,Math.min(8,e/y*.97)))},"aria-label":`Fit to width`,disabled:!y,style:y3,onMouseEnter:e=>{e.currentTarget.style.borderColor=`var(--color-accent)`,e.currentTarget.style.boxShadow=`0 0 0 2px rgba(37,99,235,0.1)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`var(--color-border)`,e.currentTarget.style.boxShadow=`none`},children:`Fit`}),(0,M.jsx)(`button`,{type:`button`,onClick:()=>g(e=>Math.min(8,e+.1)),"aria-label":`Zoom in`,style:y3,onMouseEnter:e=>{e.currentTarget.style.borderColor=`var(--color-accent)`,e.currentTarget.style.boxShadow=`0 0 0 2px rgba(37,99,235,0.1)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`var(--color-border)`,e.currentTarget.style.boxShadow=`none`},children:`+`}),(0,M.jsx)(`button`,{type:`button`,onClick:async()=>{if(a.current)try{document.fullscreenElement===a.current?await document.exitFullscreen():await a.current.requestFullscreen()}catch{}},"aria-label":_?`Exit fullscreen`:`Fullscreen`,style:y3,onMouseEnter:e=>{e.currentTarget.style.borderColor=`var(--color-accent)`,e.currentTarget.style.boxShadow=`0 0 0 2px rgba(37,99,235,0.1)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`var(--color-border)`,e.currentTarget.style.boxShadow=`none`},children:_?`✕ Exit FS`:`⛶ Full Screen`})]}),(0,M.jsx)(`div`,{ref:s,style:{flex:_?1:void 0,minHeight:_?0:d?`auto`:`60px`,overflowX:`auto`,overflowY:`auto`,border:`1px solid var(--color-code-border)`,borderRadius:`var(--border-radius-md)`,padding:`0.5rem`,maxHeight:_?`none`:`85vh`,background:`var(--color-surface)`,cursor:h<1?`zoom-in`:h>1?`grab`:`default`},children:(0,M.jsx)(`div`,{style:{transform:`scale(${h})`,transformOrigin:`top left`,width:`max-content`,minWidth:`max-content`},children:(0,M.jsx)(`div`,{ref:o,"aria-hidden":!d})})}),l&&(0,M.jsxs)(`div`,{role:`alert`,style:{padding:`0.75rem 1rem`,background:`var(--color-error-bg)`,color:`var(--color-error)`,borderRadius:`var(--border-radius-md)`,fontSize:`0.875rem`,marginTop:`0.5rem`},children:[`⚠️ `,l]}),(0,M.jsxs)(`details`,{style:{marginTop:`0.5rem`},children:[(0,M.jsxs)(`summary`,{style:{fontSize:`0.8125rem`,color:`var(--color-text-muted)`,cursor:`pointer`},children:[`Source (`,t,`)`]}),(0,M.jsx)(`pre`,{"aria-label":`Source: ${t}`,style:{marginTop:`0.5rem`,fontSize:`0.75rem`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,background:`var(--color-code-bg)`,padding:`0.75rem`,borderRadius:`var(--border-radius-md)`,border:`1px solid var(--color-code-border)`},children:(0,M.jsx)(`code`,{children:e})})]}),t&&(0,M.jsx)(`figcaption`,{style:{textAlign:`center`,fontSize:`0.875rem`,color:`var(--color-text-secondary)`,marginTop:`0.25rem`},children:t})]})}var b3={viewer:`_viewer_9y40k_9`,toolbar:`_toolbar_9y40k_41`,viewerTitle:`_viewerTitle_9y40k_65`,actionGroups:`_actionGroups_9y40k_87`,actionGroup:`_actionGroup_9y40k_87`,exportGroup:`_exportGroup_9y40k_129`,exportMenu:`_exportMenu_9y40k_137`,headerExportMenu:`_headerExportMenu_9y40k_139`,exportLabel:`_exportLabel_9y40k_181`,dropdownArrow:`_dropdownArrow_9y40k_183`,exportMenuPanel:`_exportMenuPanel_9y40k_195`,menuBtn:`_menuBtn_9y40k_227`,btnIcon:`_btnIcon_9y40k_293`,toolbarBtn:`_toolbarBtn_9y40k_309`,primary:`_primary_9y40k_359`,searchBar:`_searchBar_9y40k_395`,searchInput:`_searchInput_9y40k_415`,searchMatchCount:`_searchMatchCount_9y40k_449`,content:`_content_9y40k_483`,copyToast:`_copyToast_9y40k_517`,exportNotice:`_exportNotice_9y40k_535`,diagramProgress:`_diagramProgress_9y40k_553`,rawSource:`_rawSource_9y40k_605`};function CVt(e,t){return`<!doctype html>
|
|
3629
3629
|
<html lang="en">
|
|
3630
3630
|
<head>
|
|
3631
3631
|
<meta charset="UTF-8" />
|
|
@@ -4194,7 +4194,7 @@ T* `):e.join(` Tj
|
|
|
4194
4194
|
`),t}},Cross:{createAppearanceStream:function(e){var t={D:{Off:P9.RadioButton.Cross.OffPushDown},N:{}};return t.N[e]=P9.RadioButton.Cross.YesNormal,t.D[e]=P9.RadioButton.Cross.YesPushDown,t},getCA:function(){return`8`},YesNormal:function(e){var t=g9(e);t.scope=e.scope;var n=[],r=P9.internal.calculateCross(e);return n.push(`q`),n.push(`1 1 `+p9(P9.internal.getWidth(e)-2)+` `+p9(P9.internal.getHeight(e)-2)+` re`),n.push(`W`),n.push(`n`),n.push(p9(r.x1.x)+` `+p9(r.x1.y)+` m`),n.push(p9(r.x2.x)+` `+p9(r.x2.y)+` l`),n.push(p9(r.x4.x)+` `+p9(r.x4.y)+` m`),n.push(p9(r.x3.x)+` `+p9(r.x3.y)+` l`),n.push(`s`),n.push(`Q`),t.stream=n.join(`
|
|
4195
4195
|
`),t},YesPushDown:function(e){var t=g9(e);t.scope=e.scope;var n=P9.internal.calculateCross(e),r=[];return r.push(`0.749023 g`),r.push(`0 0 `+p9(P9.internal.getWidth(e))+` `+p9(P9.internal.getHeight(e))+` re`),r.push(`f`),r.push(`q`),r.push(`1 1 `+p9(P9.internal.getWidth(e)-2)+` `+p9(P9.internal.getHeight(e)-2)+` re`),r.push(`W`),r.push(`n`),r.push(p9(n.x1.x)+` `+p9(n.x1.y)+` m`),r.push(p9(n.x2.x)+` `+p9(n.x2.y)+` l`),r.push(p9(n.x4.x)+` `+p9(n.x4.y)+` m`),r.push(p9(n.x3.x)+` `+p9(n.x3.y)+` l`),r.push(`s`),r.push(`Q`),t.stream=r.join(`
|
|
4196
4196
|
`),t},OffPushDown:function(e){var t=g9(e);t.scope=e.scope;var n=[];return n.push(`0.749023 g`),n.push(`0 0 `+p9(P9.internal.getWidth(e))+` `+p9(P9.internal.getHeight(e))+` re`),n.push(`f`),t.stream=n.join(`
|
|
4197
|
-
`),t}}},createDefaultAppearanceStream:function(e){var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color);return`/`+t+` `+e.fontSize+` Tf `+n}};P9.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=P9.internal.getWidth(e),n=P9.internal.getHeight(e),r=Math.min(t,n);return{x1:{x:(t-r)/2,y:(n-r)/2+r},x2:{x:(t-r)/2+r,y:(n-r)/2},x3:{x:(t-r)/2,y:(n-r)/2},x4:{x:(t-r)/2+r,y:(n-r)/2+r}}}},P9.internal.getWidth=function(e){var t=0;return L6(e)===`object`&&(t=e2t(e.Rect[2])),t},P9.internal.getHeight=function(e){var t=0;return L6(e)===`object`&&(t=e2t(e.Rect[3])),t};var m2t=l9.addField=function(e){if(l2t(this,e),!(e instanceof S9))throw Error(`Invalid argument passed to jsPDF.addField.`);var t;return(t=e).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};l9.AcroFormChoiceField=C9,l9.AcroFormListBox=w9,l9.AcroFormComboBox=T9,l9.AcroFormEditBox=E9,l9.AcroFormButton=D9,l9.AcroFormPushButton=O9,l9.AcroFormRadioButton=k9,l9.AcroFormCheckBox=j9,l9.AcroFormTextField=M9,l9.AcroFormPasswordField=N9,l9.AcroFormAppearance=P9,l9.AcroForm={ChoiceField:C9,ListBox:w9,ComboBox:T9,EditBox:E9,Button:D9,PushButton:O9,RadioButton:k9,CheckBox:j9,TextField:M9,PasswordField:N9,Appearance:P9},c9.AcroForm={ChoiceField:C9,ListBox:w9,ComboBox:T9,EditBox:E9,Button:D9,PushButton:O9,RadioButton:k9,CheckBox:j9,TextField:M9,PasswordField:N9,Appearance:P9},c9.AcroForm;function h2t(e){return e.reduce(function(e,t,n){return e[t]=n,e},{})}(function(e){var t=`addImage_`;e.__addimage__={};var n=`UNKNOWN`,r={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},i=e.__addimage__.getImageFileTypeByImageData=function(e,t){var i,a,o,s,l,u=n;if((t||=n)===`RGBA`||e.data!==void 0&&e.data instanceof Uint8ClampedArray&&`height`in e&&`width`in e)return`RGBA`;if(C(e))for(l in r)for(o=r[l],i=0;i<o.length;i+=1){for(s=!0,a=0;a<o[i].length;a+=1)if(o[i][a]!==void 0&&o[i][a]!==e[a]){s=!1;break}if(!0===s){u=l;break}}else for(l in r)for(o=r[l],i=0;i<o.length;i+=1){for(s=!0,a=0;a<o[i].length;a+=1)if(o[i][a]!==void 0&&o[i][a]!==e.charCodeAt(a)){s=!1;break}if(!0===s){u=l;break}}return u===n&&t!==n&&(u=t),u},a=function e(t){for(var n=this.internal.write,r=this.internal.putStream,i=(0,this.internal.getFilters)();i.indexOf(`FlateEncode`)!==-1;)i.splice(i.indexOf(`FlateEncode`),1);t.objectId=this.internal.newObject();var a=[];if(a.push({key:`Type`,value:`/XObject`}),a.push({key:`Subtype`,value:`/Image`}),a.push({key:`Width`,value:t.width}),a.push({key:`Height`,value:t.height}),t.colorSpace===v.INDEXED?a.push({key:`ColorSpace`,value:`[/Indexed /DeviceRGB `+(t.palette.length/3-1)+` `+(`sMask`in t&&t.sMask!==void 0?t.objectId+2:t.objectId+1)+` 0 R]`}):(a.push({key:`ColorSpace`,value:`/`+t.colorSpace}),t.colorSpace===v.DEVICE_CMYK&&a.push({key:`Decode`,value:`[1 0 1 0 1 0 1 0]`})),a.push({key:`BitsPerComponent`,value:t.bitsPerComponent}),`decodeParameters`in t&&t.decodeParameters!==void 0&&a.push({key:`DecodeParms`,value:`<<`+t.decodeParameters+`>>`}),`transparency`in t&&Array.isArray(t.transparency)&&t.transparency.length>0){for(var o=``,s=0,l=t.transparency.length;s<l;s++)o+=t.transparency[s]+` `+t.transparency[s]+` `;a.push({key:`Mask`,value:`[`+o+`]`})}t.sMask!==void 0&&a.push({key:`SMask`,value:t.objectId+1+` 0 R`});var u=t.filter===void 0?void 0:[`/`+t.filter];if(r({data:t.data,additionalKeyValues:a,alreadyAppliedFilters:u,objectId:t.objectId}),n(`endobj`),`sMask`in t&&t.sMask!==void 0){var d=t.sMaskBitsPerComponent??t.bitsPerComponent,f={width:t.width,height:t.height,colorSpace:`DeviceGray`,bitsPerComponent:d,data:t.sMask};`filter`in t&&(f.decodeParameters=`/Predictor ${t.predictor} /Colors 1 /BitsPerComponent ${d} /Columns ${t.width}`,f.filter=t.filter),e.call(this,f)}if(t.colorSpace===v.INDEXED){var p=this.internal.newObject();r({data:T(new Uint8Array(t.palette)),objectId:p}),n(`endobj`)}},o=function(){var e=this.internal.collections[t+`images`];for(var n in e)a.call(this,e[n])},s=function(){var e,n=this.internal.collections[t+`images`],r=this.internal.write;for(var i in n)r(`/I`+(e=n[i]).index,e.objectId,`0`,`R`)},l=function(){this.internal.collections[t+`images`]||(this.internal.collections[t+`images`]={},this.internal.events.subscribe(`putResources`,o),this.internal.events.subscribe(`putXobjectDict`,s))},u=function(){var e=this.internal.collections[t+`images`];return l.call(this),e},d=function(){return Object.keys(this.internal.collections[t+`images`]).length},f=function(t){return typeof e[`process`+t.toUpperCase()]==`function`},p=function(e){return L6(e)===`object`&&e.nodeType===1},m=function(t,n){if(t.nodeName===`IMG`&&t.hasAttribute(`src`)){var r=``+t.getAttribute(`src`);if(r.indexOf(`data:image/`)===0)return X7(unescape(r).split(`base64,`).pop());var i=e.loadFile(r,!0);if(i!==void 0)return i}if(t.nodeName===`CANVAS`){if(t.width===0||t.height===0)throw Error(`Given canvas must have data. Canvas width: `+t.width+`, height: `+t.height);var a;switch(n){case`PNG`:a=`image/png`;break;case`WEBP`:a=`image/webp`;break;default:a=`image/jpeg`}return X7(t.toDataURL(a,1).split(`base64,`).pop())}},h=function(e){var n=this.internal.collections[t+`images`];if(n){for(var r in n)if(e===n[r].alias)return n[r]}},g=function(e,t,n){return e||t||(e=-96,t=-96),e<0&&(e=-1*n.width*72/e/this.internal.scaleFactor),t<0&&(t=-1*n.height*72/t/this.internal.scaleFactor),e===0&&(e=t*n.width/n.height),t===0&&(t=e*n.height/n.width),[e,t]},_=function(e,t,n,r,i,a){var o=g.call(this,n,r,i),s=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString,d=u.call(this);if(n=o[0],r=o[1],d[i.index]=i,a){a*=Math.PI/180;var f=Math.cos(a),p=Math.sin(a),m=function(e){return e.toFixed(4)},h=[m(f),m(p),m(-1*p),m(f),0,0,`cm`]}this.internal.write(`q`),a?(this.internal.write([1,`0`,`0`,1,s(e),l(t+r),`cm`].join(` `)),this.internal.write(h.join(` `)),this.internal.write([s(n),`0`,`0`,s(r),`0`,`0`,`cm`].join(` `))):this.internal.write([s(n),`0`,`0`,s(r),s(e),l(t+r),`cm`].join(` `)),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,`cm`].join(` `)),this.internal.write(`/I`+i.index+` Do`),this.internal.write(`Q`)},v=e.color_spaces={DEVICE_RGB:`DeviceRGB`,DEVICE_GRAY:`DeviceGray`,DEVICE_CMYK:`DeviceCMYK`,CAL_GREY:`CalGray`,CAL_RGB:`CalRGB`,LAB:`Lab`,ICC_BASED:`ICCBased`,INDEXED:`Indexed`,PATTERN:`Pattern`,SEPARATION:`Separation`,DEVICE_N:`DeviceN`};e.decode={DCT_DECODE:`DCTDecode`,FLATE_DECODE:`FlateDecode`,LZW_DECODE:`LZWDecode`,JPX_DECODE:`JPXDecode`,JBIG2_DECODE:`JBIG2Decode`,ASCII85_DECODE:`ASCII85Decode`,ASCII_HEX_DECODE:`ASCIIHexDecode`,RUN_LENGTH_DECODE:`RunLengthDecode`,CCITT_FAX_DECODE:`CCITTFaxDecode`};var y=e.image_compression={NONE:`NONE`,FAST:`FAST`,MEDIUM:`MEDIUM`,SLOW:`SLOW`},b=e.__addimage__.sHashCode=function(e){var t,n,r=0;if(typeof e==`string`)for(n=e.length,t=0;t<n;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;else if(C(e))for(n=e.byteLength/2,t=0;t<n;t++)r=(r<<5)-r+e[t],r|=0;return r},x=e.__addimage__.validateStringAsBase64=function(e){(e||=``).toString().trim();var t=!0;return e.length===0&&(t=!1),e.length%4!=0&&(t=!1),!1===/^[A-Za-z0-9+/]+$/.test(e.substr(0,e.length-2))&&(t=!1),!1===/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(e.substr(-2))&&(t=!1),t},S=e.__addimage__.extractImageFromDataUrl=function(e){if(e==null||!(e=e.trim()).startsWith(`data:`))return null;var t=e.indexOf(`,`);return t<0?null:e.substring(0,t).trim().endsWith(`base64`)?e.substring(t+1):null};e.__addimage__.isArrayBuffer=function(e){return e instanceof ArrayBuffer};var C=e.__addimage__.isArrayBufferView=function(e){return e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array},w=e.__addimage__.binaryStringToUint8Array=function(e){for(var t=e.length,n=new Uint8Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);return n},T=e.__addimage__.arrayBufferToBinaryString=function(e){for(var t=``,n=C(e)?e:new Uint8Array(e),r=0;r<n.length;r+=8192)t+=String.fromCharCode.apply(null,n.subarray(r,r+8192));return t};e.addImage=function(){var e,t,r,i,a,o,s,u,d;if(typeof arguments[1]==`number`?(t=n,r=arguments[1],i=arguments[2],a=arguments[3],o=arguments[4],s=arguments[5],u=arguments[6],d=arguments[7]):(t=arguments[1],r=arguments[2],i=arguments[3],a=arguments[4],o=arguments[5],s=arguments[6],u=arguments[7],d=arguments[8]),L6(e=arguments[0])===`object`&&!p(e)&&`imageData`in e){var f=e;e=f.imageData,t=f.format||t||n,r=f.x||r||0,i=f.y||i||0,a=f.w||f.width||a,o=f.h||f.height||o,s=f.alias||s,u=f.compression||u,d=f.rotation||f.angle||d}var m=this.internal.getFilters();if(u===void 0&&m.indexOf(`FlateEncode`)!==-1&&(u=`SLOW`),isNaN(r)||isNaN(i))throw Error(`Invalid coordinates passed to jsPDF.addImage`);l.call(this);var h=E.call(this,e,t,s,u);return _.call(this,r,i,a,o,h,d),this};var E=function(t,r,a,o){var s,l,u;if(typeof t==`string`&&i(t)===n){t=unescape(t);var g=D(t,!1);(g!==``||(g=e.loadFile(t,!0))!==void 0)&&(t=g)}if(p(t)&&(t=m(t,r)),r=i(t,r),!f(r))throw Error(`addImage does not support files of type '`+r+`', please ensure that a plugin for '`+r+`' support is added.`);if(((u=a)==null||u.length===0)&&(a=function(e){return typeof e==`string`||C(e)?b(e):C(e.data)?b(e.data):null}(t)),(s=h.call(this,a))||(t instanceof Uint8Array||r===`RGBA`||(l=t,t=w(t)),s=this[`process`+r.toUpperCase()](t,d.call(this),a,function(t){return t&&typeof t==`string`&&(t=t.toUpperCase()),t in e.image_compression?t:y.NONE}(o),l)),!s)throw Error(`An unknown error occurred whilst processing the image.`);return s},D=e.__addimage__.convertBase64ToBinaryString=function(e,t){t=typeof t!=`boolean`||t;var n,r=``;if(typeof e==`string`){n=S(e)??e;try{r=X7(n)}catch(e){if(t)throw x(n)?Error(`atob-Error in jsPDF.convertBase64ToBinaryString `+e.message):Error(`Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString `)}}return r};e.getImageProperties=function(t){var r,a,o=``;if(p(t)&&(t=m(t)),typeof t==`string`&&i(t)===n&&((o=D(t,!1))===``&&(o=e.loadFile(t)||``),t=o),a=i(t),!f(a))throw Error(`addImage does not support files of type '`+a+`', please ensure that a plugin for '`+a+`' support is added.`);if(t instanceof Uint8Array||(t=w(t)),!(r=this[`process`+a.toUpperCase()](t)))throw Error(`An unknown error occurred whilst processing the image`);return r.fileType=a,r}})(c9.API),function(e){var t=function(e){if(e!==void 0&&e!=``)return!0};c9.API.events.push([`addPage`,function(e){this.internal.getPageInfo(e.pageNumber).pageContext.annotations=[]}]),e.events.push([`putPage`,function(e){for(var n,r,i,a=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString,s=this.internal.getPageInfoByObjId(e.objId),l=e.pageContext.annotations,u=!1,d=0;d<l.length&&!u;d++)switch((n=l[d]).type){case`link`:(t(n.options.url)||t(n.options.pageNumber))&&(u=!0);break;case`reference`:case`text`:case`freetext`:u=!0}if(u!=0){this.internal.write(`/Annots [`);for(var f=0;f<l.length;f++){n=l[f];var p=this.internal.pdfEscape,m=this.internal.getEncryptor(e.objId);switch(n.type){case`reference`:this.internal.write(` `+n.object.objId+` 0 R `);break;case`text`:var h=this.internal.newAdditionalObject(),g=this.internal.newAdditionalObject(),_=this.internal.getEncryptor(h.objId),v=n.title||`Note`;i=`<</Type /Annot /Subtype /Text `+(r=`/Rect [`+a(n.bounds.x)+` `+o(n.bounds.y+n.bounds.h)+` `+a(n.bounds.x+n.bounds.w)+` `+o(n.bounds.y)+`] `)+`/Contents (`+p(_(n.contents))+`)`,i+=` /Popup `+g.objId+` 0 R`,i+=` /P `+s.objId+` 0 R`,i+=` /T (`+p(_(v))+`) >>`,h.content=i;var y=h.objId+` 0 R`;i=`<</Type /Annot /Subtype /Popup `+(r=`/Rect [`+a(n.bounds.x+30)+` `+o(n.bounds.y+n.bounds.h)+` `+a(n.bounds.x+n.bounds.w+30)+` `+o(n.bounds.y)+`] `)+` /Parent `+y,n.open&&(i+=` /Open true`),i+=` >>`,g.content=i,this.internal.write(h.objId,`0 R`,g.objId,`0 R`);break;case`freetext`:r=`/Rect [`+a(n.bounds.x)+` `+o(n.bounds.y)+` `+a(n.bounds.x+n.bounds.w)+` `+o(n.bounds.y+n.bounds.h)+`] `;var b=`font: Helvetica,sans-serif 12.0pt; text-align:left; color:#`+(n.color||`#000000`);i=`<</Type /Annot /Subtype /FreeText `+r+`/Contents (`+p(m(n.contents))+`)`,i+=` /DS(`+p(m(b))+`)`,i+=` /Border [0 0 0]`,i+=` >>`,this.internal.write(i);break;case`link`:if(n.options.name){var x=this.annotations._nameMap[n.options.name];n.options.pageNumber=x.page,n.options.top=x.y}else n.options.top||(n.options.top=0);if(r=`/Rect [`+n.finalBounds.x+` `+n.finalBounds.y+` `+n.finalBounds.w+` `+n.finalBounds.h+`] `,i=``,n.options.url)i=`<</Type /Annot /Subtype /Link `+r+`/Border [0 0 0] /A <</S /URI /URI (`+p(m(n.options.url))+`) >>`;else if(n.options.pageNumber)switch(i=`<</Type /Annot /Subtype /Link `+r+`/Border [0 0 0] /Dest [`+this.internal.getPageInfo(n.options.pageNumber).objId+` 0 R`,n.options.magFactor=n.options.magFactor||`XYZ`,n.options.magFactor){case`Fit`:i+=` /Fit]`;break;case`FitH`:i+=` /FitH `+n.options.top+`]`;break;case`FitV`:n.options.left=n.options.left||0,i+=` /FitV `+n.options.left+`]`;break;default:var S=o(n.options.top);n.options.left=n.options.left||0,n.options.zoom===void 0&&(n.options.zoom=0),i+=` /XYZ `+n.options.left+` `+S+` `+n.options.zoom+`]`}i!=``&&(i+=` >>`,this.internal.write(i))}}this.internal.write(`]`)}}]),e.createAnnotation=function(e){var t=this.internal.getCurrentPageInfo();switch(e.type){case`link`:this.link(e.bounds.x,e.bounds.y,e.bounds.w,e.bounds.h,e);break;case`text`:case`freetext`:t.pageContext.annotations.push(e)}},e.link=function(e,t,n,r,i){var a=this.internal.getCurrentPageInfo(),o=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString;a.pageContext.annotations.push({finalBounds:{x:o(e),y:s(t),w:o(e+n),h:s(t+r)},options:i,type:`link`})},e.textWithLink=function(e,t,n,r){var i,a,o=this.getTextWidth(e),s=this.internal.getLineHeight()/this.internal.scaleFactor;if(r.maxWidth!==void 0){a=r.maxWidth;var l=this.splitTextToSize(e,a).length;i=Math.ceil(s*l)}else a=o,i=s;return this.text(e,t,n,r),n+=.2*s,r.align===`center`&&(t-=o/2),r.align===`right`&&(t-=o),this.link(t,n-s,a,i,r),o},e.getTextWidth=function(e){var t=this.internal.getFontSize();return this.getStringUnitWidth(e)*t/this.internal.scaleFactor}}(c9.API),function(e){var t={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},n={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];e.__arabicParser__={};var a=e.__arabicParser__.isInArabicSubstitutionA=function(e){return t[e.charCodeAt(0)]!==void 0},o=e.__arabicParser__.isArabicLetter=function(e){return typeof e==`string`&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(e)},s=e.__arabicParser__.isArabicEndLetter=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length<=2},l=e.__arabicParser__.isArabicAlfLetter=function(e){return o(e)&&i.indexOf(e.charCodeAt(0))>=0};e.__arabicParser__.arabicLetterHasIsolatedForm=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length>=1};var u=e.__arabicParser__.arabicLetterHasFinalForm=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length>=2};e.__arabicParser__.arabicLetterHasInitialForm=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length>=3};var d=e.__arabicParser__.arabicLetterHasMedialForm=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length==4},f=e.__arabicParser__.resolveLigatures=function(e){var t=0,r=n,i=``,a=0;for(t=0;t<e.length;t+=1)r[e.charCodeAt(t)]===void 0?(r=n,i+=e.charAt(t-a),t-=a,a=0):(a++,typeof(r=r[e.charCodeAt(t)])==`number`&&(i+=String.fromCharCode(r),r=n,a=0),t===e.length-1&&(r=n,i+=e.charAt(t-(a-1)),t-=a-1,a=0));return i};e.__arabicParser__.isArabicDiacritic=function(e){return e!==void 0&&r[e.charCodeAt(0)]!==void 0};var p=e.__arabicParser__.getCorrectForm=function(e,t,n){return o(e)?!1===a(e)?-1:!u(e)||!o(t)&&!o(n)||!o(n)&&s(t)||s(e)&&!o(t)||s(e)&&l(t)||s(e)&&s(t)?0:d(e)&&o(t)&&!s(t)&&o(n)&&u(n)?3:s(e)||!o(n)?1:2:-1},m=function(e){var n=0,r=0,i=0,a=``,s=``,l=``,u=(e||=``).split(`\\s+`),d=[];for(n=0;n<u.length;n+=1){for(d.push(``),r=0;r<u[n].length;r+=1)a=u[n][r],s=u[n][r-1],l=u[n][r+1],o(a)?(i=p(a,s,l),d[n]+=i===-1?a:String.fromCharCode(t[a.charCodeAt(0)][i])):d[n]+=a;d[n]=f(d[n])}return d.join(` `)},h=e.__arabicParser__.processArabic=e.processArabic=function(){var e,t=typeof arguments[0]==`string`?arguments[0]:arguments[0].text,n=[];if(Array.isArray(t)){var r=0;for(n=[],r=0;r<t.length;r+=1)Array.isArray(t[r])?n.push([m(t[r][0]),t[r][1],t[r][2]]):n.push([m(t[r])]);e=n}else e=m(t);return typeof arguments[0]==`string`?e:(arguments[0].text=e,arguments[0])};e.events.push([`preProcessText`,h])}(c9.API),c9.API.autoPrint=function(e){var t;return(e||={}).variant=e.variant||`non-conform`,e.variant===`javascript`?this.addJS(`print({});`):(this.internal.events.subscribe(`postPutResources`,function(){t=this.internal.newObject(),this.internal.out(`<<`),this.internal.out(`/S /Named`),this.internal.out(`/Type /Action`),this.internal.out(`/N /Print`),this.internal.out(`>>`),this.internal.out(`endobj`)}),this.internal.events.subscribe(`putCatalog`,function(){this.internal.out(`/OpenAction `+t+` 0 R`)})),this},function(e){var t=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(t){e=t}});var t=150;Object.defineProperty(this,"width",{get:function(){return t},set:function(e){t=isNaN(e)||!1===Number.isInteger(e)||e<0?150:e,this.getContext(`2d`).pageWrapXEnabled&&(this.getContext(`2d`).pageWrapX=t+1)}});var n=300;Object.defineProperty(this,"height",{get:function(){return n},set:function(e){n=isNaN(e)||!1===Number.isInteger(e)||e<0?300:e,this.getContext(`2d`).pageWrapYEnabled&&(this.getContext(`2d`).pageWrapY=n+1)}});var r=[];Object.defineProperty(this,"childNodes",{get:function(){return r},set:function(e){r=e}});var i={};Object.defineProperty(this,"style",{get:function(){return i},set:function(e){i=e}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(e,t){var n;if((e||=`2d`)!==`2d`)return null;for(n in t)this.pdf.context2d.hasOwnProperty(n)&&(this.pdf.context2d[n]=t[n]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw Error(`toDataURL is not implemented.`)},e.events.push([`initialized`,function(){this.canvas=new t,this.canvas.pdf=this}])}(c9.API),function(e){var t={left:0,top:0,bottom:0,right:0},n=!1,r=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),i.call(this))},i=function(){this.internal.__cell__.lastCell=new a,this.internal.__cell__.pages=1},a=function(){var e=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return e},set:function(t){e=t}});var t=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return t},set:function(e){t=e}});var n=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return n},set:function(e){n=e}});var r=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return r},set:function(e){r=e}});var i=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return i},set:function(e){i=e}});var a=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return a},set:function(e){a=e}});var o=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return o},set:function(e){o=e}}),this};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},a.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},e.setHeaderFunction=function(e){return r.call(this),this.internal.__cell__.headerFunction=typeof e==`function`?e:void 0,this},e.getTextDimensions=function(e,t){r.call(this);var n=(t||={}).fontSize||this.getFontSize(),i=t.font||this.getFont(),a=t.scaleFactor||this.internal.scaleFactor,o=0,s=0,l=0,u=this;if(!Array.isArray(e)&&typeof e!=`string`){if(typeof e!=`number`)throw Error(`getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.`);e=String(e)}var d=t.maxWidth;d>0?typeof e==`string`?e=this.splitTextToSize(e,d):Object.prototype.toString.call(e)===`[object Array]`&&(e=e.reduce(function(e,t){return e.concat(u.splitTextToSize(t,d))},[])):e=Array.isArray(e)?e:[e];for(var f=0;f<e.length;f++)o<(l=this.getStringUnitWidth(e[f],{font:i})*n)&&(o=l);return o!==0&&(s=e.length),{w:o/=a,h:Math.max((s*n*this.getLineHeightFactor()-n*(this.getLineHeightFactor()-1))/a,0)}},e.cellAddPage=function(){r.call(this),this.addPage();var e=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new a(e.left,e.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var o=e.cell=function(){var e=arguments[0]instanceof a?arguments[0]:new a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]);r.call(this);var i=this.internal.__cell__.lastCell,o=this.internal.__cell__.padding,s=this.internal.__cell__.margins||t,l=this.internal.__cell__.tableHeaderRow,u=this.internal.__cell__.printHeaders;return i.lineNumber!==void 0&&(i.lineNumber===e.lineNumber?(e.x=(i.x||0)+(i.width||0),e.y=i.y||0):i.y+i.height+e.height+s.bottom>this.getPageHeight()?(this.cellAddPage(),e.y=s.top,u&&l&&(this.printHeaderRow(e.lineNumber,!0),e.y+=l[0].height)):e.y=i.y+i.height||e.y),e.text[0]!==void 0&&(this.rect(e.x,e.y,e.width,e.height,!0===n?`FD`:void 0),e.align===`right`?this.text(e.text,e.x+e.width-o,e.y+o,{align:`right`,baseline:`top`}):e.align===`center`?this.text(e.text,e.x+e.width/2,e.y+o,{align:`center`,baseline:`top`,maxWidth:e.width-o-o}):this.text(e.text,e.x+o,e.y+o,{align:`left`,baseline:`top`,maxWidth:e.width-o-o})),this.internal.__cell__.lastCell=e,this};e.table=function(e,n,l,u,d){if(r.call(this),!l)throw Error(`No data for PDF table.`);var f,p,m,h,g=[],_=[],v=[],y={},b={},x=[],S=[],C=(d||={}).autoSize||!1,w=!1!==d.printHeaders,T=d.css&&d.css[`font-size`]!==void 0?16*d.css[`font-size`]:d.fontSize||12,E=d.margins||Object.assign({width:this.getPageWidth()},t),D=typeof d.padding==`number`?d.padding:3,O=d.headerBackgroundColor||`#c8c8c8`,k=d.headerTextColor||`#000`;if(i.call(this),this.internal.__cell__.printHeaders=w,this.internal.__cell__.margins=E,this.internal.__cell__.table_font_size=T,this.internal.__cell__.padding=D,this.internal.__cell__.headerBackgroundColor=O,this.internal.__cell__.headerTextColor=k,this.setFontSize(T),u==null)_=g=Object.keys(l[0]),v=g.map(function(){return`left`});else if(Array.isArray(u)&&L6(u[0])===`object`)for(g=u.map(function(e){return e.name}),_=u.map(function(e){return e.prompt||e.name||``}),v=u.map(function(e){return e.align||`left`}),f=0;f<u.length;f+=1)b[u[f].name]=.7499990551181103*u[f].width;else Array.isArray(u)&&typeof u[0]==`string`&&(_=g=u,v=g.map(function(){return`left`}));if(C||Array.isArray(u)&&typeof u[0]==`string`)for(f=0;f<g.length;f+=1){for(y[h=g[f]]=l.map(function(e){return e[h]}),this.setFont(void 0,`bold`),x.push(this.getTextDimensions(_[f],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),p=y[h],this.setFont(void 0,`normal`),m=0;m<p.length;m+=1)x.push(this.getTextDimensions(p[m],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);b[h]=Math.max.apply(null,x)+D+D,x=[]}if(w){var A={};for(f=0;f<g.length;f+=1)A[g[f]]={},A[g[f]].text=_[f],A[g[f]].align=v[f];var j=s.call(this,A,b);S=g.map(function(t){return new a(e,n,b[t],j,A[t].text,void 0,A[t].align)}),this.setTableHeaderRow(S),this.printHeaderRow(1,!1)}var M=u.reduce(function(e,t){return e[t.name]=t.align,e},{});for(f=0;f<l.length;f+=1){`rowStart`in d&&d.rowStart instanceof Function&&d.rowStart({row:f,data:l[f]},this);var N=s.call(this,l[f],b);for(m=0;m<g.length;m+=1){var P=l[f][g[m]];`cellStart`in d&&d.cellStart instanceof Function&&d.cellStart({row:f,col:m,data:P},this),o.call(this,new a(e,n,b[g[m]],N,P,f+2,M[g[m]]))}}return this.internal.__cell__.table_x=e,this.internal.__cell__.table_y=n,this};var s=function(e,t){var n=this.internal.__cell__.padding,r=this.internal.__cell__.table_font_size,i=this.internal.scaleFactor;return Object.keys(e).map(function(r){var i=e[r];return this.splitTextToSize(i.hasOwnProperty(`text`)?i.text:i,t[r]-n-n)},this).map(function(e){return this.getLineHeightFactor()*e.length*r/i+n+n},this).reduce(function(e,t){return Math.max(e,t)},0)};e.setTableHeaderRow=function(e){r.call(this),this.internal.__cell__.tableHeaderRow=e},e.printHeaderRow=function(e,t){if(r.call(this),!this.internal.__cell__.tableHeaderRow)throw Error(`Property tableHeaderRow does not exist.`);var i;if(n=!0,typeof this.internal.__cell__.headerFunction==`function`){var s=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(s[0],s[1],s[2],s[3],void 0,-1)}this.setFont(void 0,`bold`);for(var l=[],u=0;u<this.internal.__cell__.tableHeaderRow.length;u+=1){i=this.internal.__cell__.tableHeaderRow[u].clone(),t&&(i.y=this.internal.__cell__.margins.top||0,l.push(i)),i.lineNumber=e;var d=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),o.call(this,i),this.setTextColor(d)}l.length>0&&this.setTableHeaderRow(l),this.setFont(void 0,`normal`),n=!1}}(c9.API);var g2t={italic:[`italic`,`oblique`,`normal`],oblique:[`oblique`,`italic`,`normal`],normal:[`normal`,`oblique`,`italic`]},_2t=[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`],v2t=h2t(_2t),y2t=[100,200,300,400,500,600,700,800,900],b2t=h2t(y2t);function x2t(e){var t=e.family.replace(/"|'/g,``).toLowerCase(),n=function(e){return g2t[e||=`normal`]?e:`normal`}(e.style),r=function(e){return e?typeof e==`number`?e>=100&&e<=900&&e%100==0?e:400:/^\d00$/.test(e)?parseInt(e):e===`bold`?700:400:400}(e.weight),i=function(e){return typeof v2t[e||=`normal`]==`number`?e:`normal`}(e.stretch);return{family:t,style:n,weight:r,stretch:i,src:e.src||[],ref:e.ref||{name:t,style:[i,n,r].join(` `)}}}function S2t(e,t,n,r){for(var i=n;i>=0&&i<t.length;i+=r)if(e[t[i]])return e[t[i]];for(i=n;i>=0&&i<t.length;i-=r)if(e[t[i]])return e[t[i]]}var C2t={"sans-serif":`helvetica`,fixed:`courier`,monospace:`courier`,terminal:`courier`,cursive:`times`,fantasy:`times`,serif:`times`},w2t={caption:`times`,icon:`times`,menu:`times`,"message-box":`times`,"small-caption":`times`,"status-bar":`times`};function T2t(e){return[e.stretch,e.style,e.weight,e.family].join(` `)}function E2t(e){return e.trimLeft()}function D2t(e,t){for(var n=0;n<e.length;){if(e.charAt(n)===t)return[e.substring(0,n),e.substring(n+1)];n+=1}return null}function O2t(e){var t=e.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return t===null?null:[t[0],e.substring(t[0].length)]}var F9,I9,k2t,A2t,j2t,M2t=[`times`];function N2t(e,t,n,r,i){var a=4,o=I2t;switch(i){case c9.API.image_compression.FAST:a=1,o=F2t;break;case c9.API.image_compression.MEDIUM:a=6,o=L2t;break;case c9.API.image_compression.SLOW:a=9,o=R2t}e=function(e,t,n,r){for(var i,a=e.length/t,o=new Uint8Array(e.length+a),s=[P2t,F2t,I2t,L2t,R2t],l=0;l<a;l+=1){var u=l*t,d=e.subarray(u,u+t);if(r)o.set(r(d,n,i),u+l);else{for(var f=s.length,p=[],m=0;m<f;m+=1)p[m]=s[m](d,n,i);var h=B2t(p.concat());o.set(p[h],u+l)}i=d}return o}(e,t,Math.ceil(n*r/8),o);var s=EKt(e,{level:a});return c9.API.__addimage__.arrayBufferToBinaryString(s)}function P2t(e){var t=Array.apply([],e);return t.unshift(0),t}function F2t(e,t){var n=e.length,r=[];r[0]=1;for(var i=0;i<n;i+=1){var a=e[i-t]||0;r[i+1]=e[i]-a+256&255}return r}function I2t(e,t,n){var r=e.length,i=[];i[0]=2;for(var a=0;a<r;a+=1){var o=n&&n[a]||0;i[a+1]=e[a]-o+256&255}return i}function L2t(e,t,n){var r=e.length,i=[];i[0]=3;for(var a=0;a<r;a+=1){var o=e[a-t]||0,s=n&&n[a]||0;i[a+1]=e[a]+256-(o+s>>>1)&255}return i}function R2t(e,t,n){var r=e.length,i=[];i[0]=4;for(var a=0;a<r;a+=1){var o=z2t(e[a-t]||0,n&&n[a]||0,n&&n[a-t]||0);i[a+1]=e[a]-o+256&255}return i}function z2t(e,t,n){if(e===t&&t===n)return e;var r=Math.abs(t-n),i=Math.abs(e-n),a=Math.abs(e+t-n-n);return r<=i&&r<=a?e:i<=a?t:n}function B2t(e){var t=e.map(function(e){return e.reduce(function(e,t){return e+Math.abs(t)},0)});return t.indexOf(Math.min.apply(null,t))}function V2t(e,t,n){var r=t*n,i=Math.floor(r/8),a=16-(r-8*i+n),o=(1<<n)-1;return U2t(e,i)>>a&o}function H2t(e,t,n,r){var i=n*r,a=Math.floor(i/8),o=16-(i-8*a+r),s=(1<<r)-1,l=(t&s)<<o;(function(e,t,n){if(t+1<e.byteLength)e.setUint16(t,n,!1);else{var r=n>>8&255;e.setUint8(t,r)}})(e,a,U2t(e,a)&~(s<<o)&65535|l)}function U2t(e,t){return t+1<e.byteLength?e.getUint16(t,!1):e.getUint8(t)<<8}function W2t(e){var t=0;if(e[t++]!==71||e[t++]!==73||e[t++]!==70||e[t++]!==56||(e[t++]+1&253)!=56||e[t++]!==97)throw Error(`Invalid GIF 87a/89a header.`);var n=e[t++]|e[t++]<<8,r=e[t++]|e[t++]<<8,i=e[t++],a=i>>7,o=1<<1+(7&i);e[t++],e[t++];var s=null,l=null;a&&(s=t,l=o,t+=3*o);var u=!0,d=[],f=0,p=null,m=0,h=null;for(this.width=n,this.height=r;u&&t<e.length;)switch(e[t++]){case 33:switch(e[t++]){case 255:if(e[t]!==11||e[t+1]==78&&e[t+2]==69&&e[t+3]==84&&e[t+4]==83&&e[t+5]==67&&e[t+6]==65&&e[t+7]==80&&e[t+8]==69&&e[t+9]==50&&e[t+10]==46&&e[t+11]==48&&e[t+12]==3&&e[t+13]==1&&e[t+16]==0)t+=14,h=e[t++]|e[t++]<<8,t++;else for(t+=12;;){if(!((O=e[t++])>=0))throw Error(`Invalid block size`);if(O===0)break;t+=O}break;case 249:if(e[t++]!==4||e[t+4]!==0)throw Error(`Invalid graphics extension block.`);var g=e[t++];f=e[t++]|e[t++]<<8,p=e[t++],1&g||(p=null),m=g>>2&7,t++;break;case 254:for(;;){if(!((O=e[t++])>=0))throw Error(`Invalid block size`);if(O===0)break;t+=O}break;default:throw Error(`Unknown graphic control label: 0x`+e[t-1].toString(16))}break;case 44:var _=e[t++]|e[t++]<<8,v=e[t++]|e[t++]<<8,y=e[t++]|e[t++]<<8,b=e[t++]|e[t++]<<8,x=e[t++],S=x>>6&1,C=1<<1+(7&x),w=s,T=l,E=!1;x>>7&&(E=!0,w=t,T=C,t+=3*C);var D=t;for(t++;;){var O;if(!((O=e[t++])>=0))throw Error(`Invalid block size`);if(O===0)break;t+=O}d.push({x:_,y:v,width:y,height:b,has_local_palette:E,palette_offset:w,palette_size:T,data_offset:D,data_length:t-D,transparent_index:p,interlaced:!!S,delay:f,disposal:m});break;case 59:u=!1;break;default:throw Error(`Unknown gif block: 0x`+e[t-1].toString(16))}this.numFrames=function(){return d.length},this.loopCount=function(){return h},this.frameInfo=function(e){if(e<0||e>=d.length)throw Error(`Frame index out of range.`);return d[e]},this.decodeAndBlitFrameBGRA=function(t,r){var i=this.frameInfo(t),a=i.width*i.height;if(a>536870912)throw Error(`Image dimensions exceed 512MB, which is too large.`);var o=new Uint8Array(a);G2t(e,i.data_offset,o,a);var s=i.palette_offset,l=i.transparent_index;l===null&&(l=256);var u=i.width,d=n-u,f=u,p=4*(i.y*n+i.x),m=4*((i.y+i.height)*n+i.x),h=p,g=4*d;!0===i.interlaced&&(g+=4*n*7);for(var _=8,v=0,y=o.length;v<y;++v){var b=o[v];if(f===0&&(f=u,(h+=g)>=m&&(g=4*d+4*n*(_-1),h=p+(u+d)*(_<<1),_>>=1)),b===l)h+=4;else{var x=e[s+3*b],S=e[s+3*b+1],C=e[s+3*b+2];r[h++]=C,r[h++]=S,r[h++]=x,r[h++]=255}--f}},this.decodeAndBlitFrameRGBA=function(t,r){var i=this.frameInfo(t),a=i.width*i.height;if(a>536870912)throw Error(`Image dimensions exceed 512MB, which is too large.`);var o=new Uint8Array(a);G2t(e,i.data_offset,o,a);var s=i.palette_offset,l=i.transparent_index;l===null&&(l=256);var u=i.width,d=n-u,f=u,p=4*(i.y*n+i.x),m=4*((i.y+i.height)*n+i.x),h=p,g=4*d;!0===i.interlaced&&(g+=4*n*7);for(var _=8,v=0,y=o.length;v<y;++v){var b=o[v];if(f===0&&(f=u,(h+=g)>=m&&(g=4*d+4*n*(_-1),h=p+(u+d)*(_<<1),_>>=1)),b===l)h+=4;else{var x=e[s+3*b],S=e[s+3*b+1],C=e[s+3*b+2];r[h++]=x,r[h++]=S,r[h++]=C,r[h++]=255}--f}}}function G2t(e,t,n,r){for(var i=e[t++],a=1<<i,o=a+1,s=o+1,l=i+1,u=(1<<l)-1,d=0,f=0,p=0,m=e[t++],h=new Int32Array(4096),g=null;;){for(;d<16&&m!==0;)f|=e[t++]<<d,d+=8,m===1?m=e[t++]:--m;if(d<l)break;var _=f&u;if(f>>=l,d-=l,_!==a){if(_===o)break;for(var v=_<s?_:g,y=0,b=v;b>a;)b=h[b]>>8,++y;var x=b;if(p+y+(v===_?0:1)>r)return void q7.log(`Warning, gif stream longer than expected.`);n[p++]=x;var S=p+=y;for(v!==_&&(n[p++]=x),b=v;y--;)b=h[b],n[--S]=255&b,b>>=8;g!==null&&s<4096&&(h[s++]=g<<8|x,s>=u+1&&l<12&&(++l,u=u<<1|1)),g=_}else s=o+1,u=(1<<(l=i+1))-1,g=null}return p!==r&&q7.log(`Warning, gif stream shorter than expected.`),n}function K2t(e){var t,n,r,i,a,o=Math.floor,s=Array(64),l=Array(64),u=Array(64),d=Array(64),f=Array(65535),p=Array(65535),m=Array(64),h=Array(64),g=[],_=0,v=7,y=Array(64),b=Array(64),x=Array(64),S=Array(256),C=Array(2048),w=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],T=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],E=[0,1,2,3,4,5,6,7,8,9,10,11],D=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],O=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],k=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],A=[0,1,2,3,4,5,6,7,8,9,10,11],j=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],M=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function N(e,t){for(var n=0,r=0,i=[],a=1;a<=16;a++){for(var o=1;o<=e[a];o++)i[t[r]]=[],i[t[r]][0]=n,i[t[r]][1]=a,r++,n++;n*=2}return i}function P(e){for(var t=e[0],n=e[1]-1;n>=0;)t&1<<n&&(_|=1<<v),n--,--v<0&&(_==255?(F(255),F(0)):F(_),v=7,_=0)}function F(e){g.push(e)}function I(e){F(e>>8&255),F(255&e)}function L(e,t,n,r,i){for(var a,o=i[0],s=i[240],l=function(e,t){var n,r,i,a,o,s,l,u,d,f,p=0;for(d=0;d<8;++d){n=e[p],r=e[p+1],i=e[p+2],a=e[p+3],o=e[p+4],s=e[p+5],l=e[p+6];var h=n+(u=e[p+7]),g=n-u,_=r+l,v=r-l,y=i+s,b=i-s,x=a+o,S=a-o,C=h+x,w=h-x,T=_+y,E=_-y;e[p]=C+T,e[p+4]=C-T;var D=.707106781*(E+w);e[p+2]=w+D,e[p+6]=w-D;var O=.382683433*((C=S+b)-(E=v+g)),k=.5411961*C+O,A=1.306562965*E+O,j=.707106781*(T=b+v),M=g+j,N=g-j;e[p+5]=N+k,e[p+3]=N-k,e[p+1]=M+A,e[p+7]=M-A,p+=8}for(p=0,d=0;d<8;++d){n=e[p],r=e[p+8],i=e[p+16],a=e[p+24],o=e[p+32],s=e[p+40],l=e[p+48];var P=n+(u=e[p+56]),F=n-u,I=r+l,L=r-l,R=i+s,ee=i-s,z=a+o,B=a-o,V=P+z,te=P-z,ne=I+R,re=I-R;e[p]=V+ne,e[p+32]=V-ne;var ie=.707106781*(re+te);e[p+16]=te+ie,e[p+48]=te-ie;var ae=.382683433*((V=B+ee)-(re=L+F)),oe=.5411961*V+ae,se=1.306562965*re+ae,ce=.707106781*(ne=ee+L),le=F+ce,H=F-ce;e[p+40]=H+oe,e[p+24]=H-oe,e[p+8]=le+se,e[p+56]=le-se,p++}for(d=0;d<64;++d)f=e[d]*t[d],m[d]=f>0?f+.5|0:f-.5|0;return m}(e,t),u=0;u<64;++u)h[w[u]]=l[u];var d=h[0]-n;n=h[0],d==0?P(r[0]):(P(r[p[a=32767+d]]),P(f[a]));for(var g=63;g>0&&h[g]==0;)g--;if(g==0)return P(o),n;for(var _,v=1;v<=g;){for(var y=v;h[v]==0&&v<=g;)++v;var b=v-y;if(b>=16){_=b>>4;for(var x=1;x<=_;++x)P(s);b&=15}a=32767+h[v],P(i[(b<<4)+p[a]]),P(f[a]),v++}return g!=63&&P(o),n}function R(e){e=Math.min(Math.max(e,1),100),a!=e&&(function(e){for(var t=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var r=o((t[n]*e+50)/100);r=Math.min(Math.max(r,1),255),s[w[n]]=r}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],a=0;a<64;a++){var f=o((i[a]*e+50)/100);f=Math.min(Math.max(f,1),255),l[w[a]]=f}for(var p=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],m=0,h=0;h<8;h++)for(var g=0;g<8;g++)u[m]=1/(s[w[m]]*p[h]*p[g]*8),d[m]=1/(l[w[m]]*p[h]*p[g]*8),m++}(Math.floor(e<50?5e3/e:200-2*e)),a=e)}this.encode=function(e,a){a&&R(a),g=[],_=0,v=7,I(65496),I(65504),I(16),F(74),F(70),F(73),F(70),F(0),F(1),F(1),F(0),I(1),I(1),F(0),F(0),function(){I(65499),I(132),F(0);for(var e=0;e<64;e++)F(s[e]);F(1);for(var t=0;t<64;t++)F(l[t])}(),function(e,t){I(65472),I(17),F(8),I(t),I(e),F(3),F(1),F(17),F(0),F(2),F(17),F(1),F(3),F(17),F(1)}(e.width,e.height),function(){I(65476),I(418),F(0);for(var e=0;e<16;e++)F(T[e+1]);for(var t=0;t<=11;t++)F(E[t]);F(16);for(var n=0;n<16;n++)F(D[n+1]);for(var r=0;r<=161;r++)F(O[r]);F(1);for(var i=0;i<16;i++)F(k[i+1]);for(var a=0;a<=11;a++)F(A[a]);F(17);for(var o=0;o<16;o++)F(j[o+1]);for(var s=0;s<=161;s++)F(M[s])}(),I(65498),I(12),F(3),F(1),F(0),F(2),F(17),F(3),F(17),F(0),F(63),F(0);var o=0,f=0,p=0;_=0,v=7,this.encode.displayName=`_encode_`;for(var m,h,S,w,N,ee,z,B,V,te=e.data,ne=e.width,re=e.height,ie=4*ne,ae=0;ae<re;){for(m=0;m<ie;){for(N=ie*ae+m,z=-1,B=0,V=0;V<64;V++)ee=N+(B=V>>3)*ie+(z=4*(7&V)),ae+B>=re&&(ee-=ie*(ae+1+B-re)),m+z>=ie&&(ee-=m+z-ie+4),h=te[ee++],S=te[ee++],w=te[ee++],y[V]=(C[h]+C[S+256|0]+C[w+512|0]>>16)-128,b[V]=(C[h+768|0]+C[S+1024|0]+C[w+1280|0]>>16)-128,x[V]=(C[h+1280|0]+C[S+1536|0]+C[w+1792|0]>>16)-128;o=L(y,u,o,t,r),f=L(b,d,f,n,i),p=L(x,d,p,n,i),m+=32}ae+=8}if(v>=0){var oe=[];oe[1]=v+1,oe[0]=(1<<v+1)-1,P(oe)}return I(65497),new Uint8Array(g)},e||=50,function(){for(var e=String.fromCharCode,t=0;t<256;t++)S[t]=e(t)}(),t=N(T,E),n=N(k,A),r=N(D,O),i=N(j,M),function(){for(var e=1,t=2,n=1;n<=15;n++){for(var r=e;r<t;r++)p[32767+r]=n,f[32767+r]=[],f[32767+r][1]=n,f[32767+r][0]=r;for(var i=-(t-1);i<=-e;i++)p[32767+i]=n,f[32767+i]=[],f[32767+i][1]=n,f[32767+i][0]=t-1+i;e<<=1,t<<=1}}(),function(){for(var e=0;e<256;e++)C[e]=19595*e,C[e+256|0]=38470*e,C[e+512|0]=7471*e+32768,C[e+768|0]=-11059*e,C[e+1024|0]=-21709*e,C[e+1280|0]=32768*e+8421375,C[e+1536|0]=-27439*e,C[e+1792|0]=-5329*e}(),R(e)}function L9(e,t){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,[`BM`,`BA`,`CI`,`CP`,`IC`,`PT`].indexOf(this.flag)===-1)throw Error(`Invalid BMP File`);this.parseHeader(),this.parseBGR()}function q2t(e){function t(e){if(!e)throw Error(`assert :P`)}function n(e,t,n){for(var r=0;4>r;r++)if(e[t+r]!=n.charCodeAt(r))return!0;return!1}function r(e,t,n,r,i){for(var a=0;a<i;a++)e[t+a]=n[r+a]}function i(e,t,n,r){for(var i=0;i<r;i++)e[t+i]=n}function a(e){return new Int32Array(e)}function o(e,t){for(var n=[],r=0;r<e;r++)n.push(new t);return n}function s(e,t){var n=[];return function e(n,r,i){for(var a=i[r],o=0;o<a&&(n.push(i.length>r+1?[]:new t),!(i.length<r+1));o++)e(n[o],r+1,i)}(n,0,e),n}var l=function(){var e=this;function l(e,t){for(var n=1<<t-1>>>0;e&n;)n>>>=1;return n?(e&n-1)+n:e}function u(e,n,r,i,a){t(!(i%r));do e[n+(i-=r)]=a;while(0<i)}function d(e,n,r,i,o){if(t(2328>=o),512>=o)var s=a(512);else if((s=a(o))==null)return 0;return function(e,n,r,i,o,s){var d,p,m=n,h=1<<r,g=a(16),_=a(16);for(t(o!=0),t(i!=null),t(e!=null),t(0<r),p=0;p<o;++p){if(15<i[p])return 0;++g[i[p]]}if(g[0]==o)return 0;for(_[1]=0,d=1;15>d;++d){if(g[d]>1<<d)return 0;_[d+1]=_[d]+g[d]}for(p=0;p<o;++p)d=i[p],0<i[p]&&(s[_[d]++]=p);if(_[15]==1)return(i=new f).g=0,i.value=s[0],u(e,m,1,h,i),h;var v,y=-1,b=h-1,x=0,S=1,C=1,w=1<<r;for(p=0,d=1,o=2;d<=r;++d,o<<=1){if(S+=C<<=1,0>(C-=g[d]))return 0;for(;0<g[d];--g[d])(i=new f).g=d,i.value=s[p++],u(e,m+x,o,w,i),x=l(x,d)}for(d=r+1,o=2;15>=d;++d,o<<=1){if(S+=C<<=1,0>(C-=g[d]))return 0;for(;0<g[d];--g[d]){if(i=new f,(x&b)!=y){for(m+=w,v=1<<(y=d)-r;15>y&&!(0>=(v-=g[y]));)++y,v<<=1;h+=w=1<<(v=y-r),e[n+(y=x&b)].g=v+r,e[n+y].value=m-n-y}i.g=d-r,i.value=s[p++],u(e,m+(x>>r),o,w,i),x=l(x,d)}}return S==2*_[15]-1?h:0}(e,n,r,i,o,s)}function f(){this.value=this.g=0}function p(){this.value=this.g=0}function m(){this.G=o(5,f),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(Xn,p)}function h(e,n,r,i){t(e!=null),t(n!=null),t(2147483648>i),e.Ca=254,e.I=0,e.b=-8,e.Ka=0,e.oa=n,e.pa=r,e.Jd=n,e.Yc=r+i,e.Zc=4<=i?r+i-4+1:r,D(e)}function g(e,t){for(var n=0;0<t--;)n|=k(e,128)<<t;return n}function _(e,t){var n=g(e,t);return O(e)?-n:n}function v(e,n,r,i){var a,o=0;for(t(e!=null),t(n!=null),t(4294967288>i),e.Sb=i,e.Ra=0,e.u=0,e.h=0,4<i&&(i=4),a=0;a<i;++a)o+=n[r+a]<<8*a;e.Ra=o,e.bb=i,e.oa=n,e.pa=r}function y(e){for(;8<=e.u&&e.bb<e.Sb;)e.Ra>>>=8,e.Ra+=e.oa[e.pa+e.bb]<<$n-8>>>0,++e.bb,e.u-=8;w(e)&&(e.h=1,e.u=0)}function b(e,n){if(t(0<=n),!e.h&&n<=Qn){var r=C(e)&Zn[n];return e.u+=n,y(e),r}return e.h=1,e.u=0}function x(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function S(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function C(e){return e.Ra>>>(e.u&$n-1)>>>0}function w(e){return t(e.bb<=e.Sb),e.h||e.bb==e.Sb&&e.u>$n}function T(e,t){e.u=t,e.h=w(e)}function E(e){e.u>=er&&(t(e.u>=er),y(e))}function D(e){t(e!=null&&e.oa!=null),e.pa<e.Zc?(e.I=(e.oa[e.pa++]|e.I<<8)>>>0,e.b+=8):(t(e!=null&&e.oa!=null),e.pa<e.Yc?(e.b+=8,e.I=e.oa[e.pa++]|e.I<<8):e.Ka?e.b=0:(e.I<<=8,e.b+=8,e.Ka=1))}function O(e){return g(e,1)}function k(e,t){var n=e.Ca;0>e.b&&D(e);var r=e.b,i=n*t>>>8,a=(e.I>>>r>i)+0;for(a?(n-=i,e.I-=i+1<<r>>>0):n=i+1,r=n,i=0;256<=r;)i+=8,r>>=8;return r=7^i+tr[r],e.b-=r,e.Ca=(n<<r)-1,a}function A(e,t,n){e[t+0]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n}function j(e,t){return e[t+0]|e[t+1]<<8}function M(e,t){return j(e,t)|e[t+2]<<16}function N(e,t){return j(e,t)|j(e,t+2)<<16}function P(e,n){var r=1<<n;return t(e!=null),t(0<n),e.X=a(r),e.X==null?0:(e.Mb=32-n,e.Xa=n,1)}function F(e,n){t(e!=null),t(n!=null),t(e.Xa==n.Xa),r(n.X,0,e.X,0,1<<n.Xa)}function I(){this.X=[],this.Xa=this.Mb=0}function L(e,n,r,i){t(r!=null),t(i!=null);var a=r[0],o=i[0];return a==0&&(a=(e*o+n/2)/n),o==0&&(o=(n*a+e/2)/e),0>=a||0>=o?0:(r[0]=a,i[0]=o,1)}function R(e,t){return e+(1<<t)-1>>>t}function ee(e,t){return((4278255360&e)+(4278255360&t)>>>0&4278255360)+((16711935&e)+(16711935&t)>>>0&16711935)>>>0}function z(t,n){e[n]=function(n,r,i,a,o,s,l){for(var u=0;u<o;++u){var d=e[t](s[l+u-1],i,a+u);s[l+u]=ee(n[r+u],d)}}}function B(){this.ud=this.hd=this.jd=0}function V(e,t){return((4278124286&(e^t))>>>1)+(e&t)>>>0}function te(e){return 0<=e&&256>e?e:0>e?0:255<e?255:void 0}function ne(e,t){return te(e+(e-t+.5>>1))}function re(e,t,n){return Math.abs(t-n)-Math.abs(e-n)}function ie(e,t,n,r,i,a,o){for(r=a[o-1],n=0;n<i;++n)a[o+n]=r=ee(e[t+n],r)}function ae(e,t,n,r,i){for(var a=0;a<n;++a){var o=e[t+a],s=o>>8&255,l=16711935&(l=(l=16711935&o)+((s<<16)+s));r[i+a]=(4278255360&o)+l>>>0}}function oe(e,t){t.jd=255&e,t.hd=e>>8&255,t.ud=e>>16&255}function se(e,t,n,r,i,a){for(var o=0;o<r;++o){var s=t[n+o],l=s>>>8,u=s,d=255&(d=(d=s>>>16)+((e.jd<<24>>24)*(l<<24>>24)>>>5));u=255&(u=(u+=(e.hd<<24>>24)*(l<<24>>24)>>>5)+((e.ud<<24>>24)*(d<<24>>24)>>>5)),i[a+o]=(4278255360&s)+(d<<16)+u}}function ce(t,n,r,i,a){e[n]=function(e,t,n,r,o,s,l,u,d){for(r=l;r<u;++r)for(l=0;l<d;++l)o[s++]=a(n[i(e[t++])])},e[t]=function(t,n,o,s,l,u,d){var f=8>>t.b,p=t.Ea,m=t.K[0],h=t.w;if(8>f)for(t=(1<<t.b)-1,h=(1<<f)-1;n<o;++n){var g,_=0;for(g=0;g<p;++g)g&t||(_=i(s[l++])),u[d++]=a(m[_&h]),_>>=f}else e[`VP8LMapColor`+r](s,l,m,h,u,d,n,o,p)}}function le(e,t,n,r,i){for(n=t+n;t<n;){var a=e[t++];r[i++]=a>>16&255,r[i++]=a>>8&255,r[i++]=255&a}}function H(e,t,n,r,i){for(n=t+n;t<n;){var a=e[t++];r[i++]=a>>16&255,r[i++]=a>>8&255,r[i++]=255&a,r[i++]=a>>24&255}}function ue(e,t,n,r,i){for(n=t+n;t<n;){var a=(o=e[t++])>>16&240|o>>12&15,o=240&o|o>>28&15;r[i++]=a,r[i++]=o}}function de(e,t,n,r,i){for(n=t+n;t<n;){var a=(o=e[t++])>>16&248|o>>13&7,o=o>>5&224|o>>3&31;r[i++]=a,r[i++]=o}}function fe(e,t,n,r,i){for(n=t+n;t<n;){var a=e[t++];r[i++]=255&a,r[i++]=a>>8&255,r[i++]=a>>16&255}}function pe(e,t,n,i,a,o){if(o==0)for(n=t+n;t<n;)A(i,((o=e[t++])[0]>>24|o[1]>>8&65280|o[2]<<8&16711680|o[3]<<24)>>>0),a+=32;else r(i,a,e,t,n)}function me(t,n){e[n][0]=e[t+`0`],e[n][1]=e[t+`1`],e[n][2]=e[t+`2`],e[n][3]=e[t+`3`],e[n][4]=e[t+`4`],e[n][5]=e[t+`5`],e[n][6]=e[t+`6`],e[n][7]=e[t+`7`],e[n][8]=e[t+`8`],e[n][9]=e[t+`9`],e[n][10]=e[t+`10`],e[n][11]=e[t+`11`],e[n][12]=e[t+`12`],e[n][13]=e[t+`13`],e[n][14]=e[t+`0`],e[n][15]=e[t+`0`]}function he(e){return e==ei||e==ti||e==ni||e==ri}function ge(){this.eb=[],this.size=this.A=this.fb=0}function _e(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function ve(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new ge,this.f.kb=new _e,this.sd=null}function ye(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function be(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function xe(e){return alert(`todo:WebPSamplerProcessPlane`),e.T}function Se(e,t){var n=e.T,i=t.ba.f.RGBA,a=i.eb,o=i.fb+e.ka*i.A,s=Oi[t.ba.S],l=e.y,u=e.O,d=e.f,f=e.N,p=e.ea,m=e.W,h=t.cc,g=t.dc,_=t.Mc,v=t.Nc,y=e.ka,b=e.ka+e.T,x=e.U,S=x+1>>1;for(y==0?s(l,u,null,null,d,f,p,m,d,f,p,m,a,o,null,null,x):(s(t.ec,t.fc,l,u,h,g,_,v,d,f,p,m,a,o-i.A,a,o,x),++n);y+2<b;y+=2)h=d,g=f,_=p,v=m,f+=e.Rc,m+=e.Rc,o+=2*i.A,s(l,(u+=2*e.fa)-e.fa,l,u,h,g,_,v,d,f,p,m,a,o-i.A,a,o,x);return u+=e.fa,e.j+b<e.o?(r(t.ec,t.fc,l,u,x),r(t.cc,t.dc,d,f,S),r(t.Mc,t.Nc,p,m,S),n--):1&b||s(l,u,null,null,d,f,p,m,d,f,p,m,a,o+i.A,null,null,x),n}function Ce(e,n,r){var i=e.F,a=[e.J];if(i!=null){var o=e.U,s=n.ba.S,l=s==Zr||s==ni;n=n.ba.f.RGBA;var u=[0],d=e.ka;u[0]=e.T,e.Kb&&(d==0?--u[0]:(--d,a[0]-=e.width),e.j+e.ka+e.T==e.o&&(u[0]=e.o-e.j-d));var f=n.eb;d=n.fb+d*n.A,e=Ir(i,a[0],e.width,o,u,f,d+(l?0:3),n.A),t(r==u),e&&he(s)&&Pr(f,d,l,o,u,n.A)}return 0}function we(e){var t=e.ma,n=t.ba.S,r=11>n,i=n==Jr||n==Xr||n==Zr||n==Qr||n==12||he(n);if(t.memory=null,t.Ib=null,t.Jb=null,t.Nd=null,!qn(t.Oa,e,i?11:12))return 0;if(i&&he(n)&&An(),e.da)alert(`todo:use_scaling`);else{if(r){if(t.Ib=xe,e.Kb){if(n=e.U+1>>1,t.memory=a(e.U+2*n),t.memory==null)return 0;t.ec=t.memory,t.fc=0,t.cc=t.ec,t.dc=t.fc+e.U,t.Mc=t.cc,t.Nc=t.dc+n,t.Ib=Se,An()}}else alert(`todo:EmitYUV`);i&&(t.Jb=Ce,r&&On())}if(r&&!Hi){for(e=0;256>e;++e)Ui[e]=89858*(e-128)+Li>>Ii,Ki[e]=-22014*(e-128)+Li,Gi[e]=-45773*(e-128),Wi[e]=113618*(e-128)+Li>>Ii;for(e=Ri;e<zi;++e)t=76283*(e-16)+Li>>Ii,qi[e-Ri]=rt(t,255),Ji[e-Ri]=rt(t+8>>4,15);Hi=1}return 1}function Te(e){var n=e.ma,r=e.U,i=e.T;return t(!(1&e.ka)),0>=r||0>=i?0:(r=n.Ib(e,n),n.Jb!=null&&n.Jb(e,n,r),n.Dc+=r,1)}function Ee(e){e.ma.memory=null}function De(e,t,n,r){return b(e,8)==47?(t[0]=b(e,14)+1,n[0]=b(e,14)+1,r[0]=b(e,1),b(e,3)==0?!e.h:0):0}function Oe(e,t){if(4>e)return e+1;var n=e-2>>1;return(2+(1&e)<<n)+b(t,n)+1}function ke(e,t){return 120<t?t-120:1<=(n=((n=li[t-1])>>4)*e+(8-(15&n)))?n:1;var n}function Ae(e,t,n){var r=C(n),i=e[t+=255&r].g-8;return 0<i&&(T(n,n.u+8),r=C(n),t+=e[t].value,t+=r&(1<<i)-1),T(n,n.u+e[t].g),e[t].value}function je(e,n,r){return r.g+=e.g,r.value+=e.value<<n>>>0,t(8>=r.g),e.g}function Me(e,n,r){var i=e.xc;return t((n=i==0?0:e.vc[e.md*(r>>i)+(n>>i)])<e.Wb),e.Ya[n]}function Ne(e,n,i,a){var o=e.ab,s=e.c*n,l=e.C;n=l+n;var u=i,d=a;for(a=e.Ta,i=e.Ua;0<o--;){var f=e.gc[o],p=l,m=n,h=u,g=d,_=(d=a,u=i,f.Ea);switch(t(p<m),t(m<=f.nc),f.hc){case 2:ir(h,g,(m-p)*_,d,u);break;case 0:var v=p,y=m,b=d,x=u,S=(D=f).Ea;v==0&&(nr(h,g,null,null,1,b,x),ie(h,g+1,0,0,S-1,b,x+1),g+=S,x+=S,++v);for(var C=1<<D.b,w=C-1,T=R(S,D.b),E=D.K,D=D.w+(v>>D.b)*T;v<y;){var O=E,k=D,A=1;for(rr(h,g,b,x-S,1,b,x);A<S;){var j=(A&~w)+C;j>S&&(j=S),(0,lr[O[k++]>>8&15])(h,g+ +A,b,x+A-S,j-A,b,x+A),A=j}g+=S,x+=S,++v&w||(D+=T)}m!=f.nc&&r(d,u-_,d,u+(m-p-1)*_,_);break;case 1:for(_=h,y=g,S=(h=f.Ea)-(x=h&~(b=(g=1<<f.b)-1)),v=R(h,f.b),C=f.K,f=f.w+(p>>f.b)*v;p<m;){for(w=C,T=f,E=new B,D=y+x,O=y+h;y<D;)oe(w[T++],E),ur(E,_,y,g,d,u),y+=g,u+=g;y<O&&(oe(w[T++],E),ur(E,_,y,S,d,u),y+=S,u+=S),++p&b||(f+=v)}break;case 3:if(h==d&&g==u&&0<f.b){for(y=d,h=_=u+(m-p)*_-(x=(m-p)*R(f.Ea,f.b)),g=d,b=u,v=[],x=(S=x)-1;0<=x;--x)v[x]=g[b+x];for(x=S-1;0<=x;--x)y[h+x]=v[x];ar(f,p,m,d,_,d,u)}else ar(f,p,m,h,g,d,u)}u=a,d=i}d!=i&&r(a,i,u,d,s)}function Pe(e,n){var r=e.V,i=e.Ba+e.c*e.C,a=n-e.C;if(t(n<=e.l.o),t(16>=a),0<a){var o=e.l,s=e.Ta,l=e.Ua,u=o.width;if(Ne(e,a,r,i),a=l=[l],t((r=e.C)<(i=n)),t(o.v<o.va),i>o.o&&(i=o.o),r<o.j){var d=o.j-r;r=o.j,a[0]+=d*u}if(r>=i?r=0:(a[0]+=4*o.v,o.ka=r-o.j,o.U=o.va-o.v,o.T=i-r,r=1),r){if(l=l[0],11>(r=e.ca).S){var f=r.f.RGBA,p=(i=r.S,a=o.U,o=o.T,d=f.eb,f.A),m=o;for(f=f.fb+e.Ma*f.A;0<m--;){var h=s,g=l,_=a,v=d,y=f;switch(i){case qr:dr(h,g,_,v,y);break;case Jr:fr(h,g,_,v,y);break;case ei:fr(h,g,_,v,y),Pr(v,y,0,_,1,0);break;case Yr:hr(h,g,_,v,y);break;case Xr:pe(h,g,_,v,y,1);break;case ti:pe(h,g,_,v,y,1),Pr(v,y,0,_,1,0);break;case Zr:pe(h,g,_,v,y,0);break;case ni:pe(h,g,_,v,y,0),Pr(v,y,1,_,1,0);break;case Qr:pr(h,g,_,v,y);break;case ri:pr(h,g,_,v,y),Fr(v,y,_,1,0);break;case $r:mr(h,g,_,v,y);break;default:t(0)}l+=u,f+=p}e.Ma+=o}else alert(`todo:EmitRescaledRowsYUVA`);t(e.Ma<=r.height)}}e.C=n,t(e.C<=e.i)}function Fe(e){var t;if(0<e.ua)return 0;for(t=0;t<e.Wb;++t){var n=e.Ya[t].G,r=e.Ya[t].H;if(0<n[1][r[1]+0].g||0<n[2][r[2]+0].g||0<n[3][r[3]+0].g)return 0}return 1}function Ie(e,n,r,i,a,o){if(e.Z!=0){var s=e.qd,l=e.rd;for(t(Di[e.Z]!=null);n<r;++n)Di[e.Z](s,l,i,a,i,a,o),s=i,l=a,a+=o;e.qd=s,e.rd=l}}function Le(e,n){var r=e.l.ma,i=r.Z==0||r.Z==1?e.l.j:e.C;if(i=e.C<i?i:e.C,t(n<=e.l.o),n>i){var a=e.l.width,o=r.ca,s=r.tb+a*i,l=e.V,u=e.Ba+e.c*i,d=e.gc;t(e.ab==1),t(d[0].hc==3),sr(d[0],i,n,l,u,o,s),Ie(r,i,n,o,s,a)}e.C=e.Ma=n}function Re(e,n,r,i,a,o,s){var l=e.$/i,u=e.$%i,d=e.m,f=e.s,p=r+e.$,m=p;a=r+i*a;var h=r+i*o,g=280+f.ua,_=e.Pb?l:16777216,v=0<f.ua?f.Wa:null,y=f.wc,b=p<h?Me(f,u,l):null;t(e.C<o),t(h<=a);var x=!1;t:for(;;){for(;x||p<h;){var S=0;if(l>=_){var D=p-r;t((_=e).Pb),_.wd=_.m,_.xd=D,0<_.s.ua&&F(_.s.Wa,_.s.vb),_=l+di}if(u&y||(b=Me(f,u,l)),t(b!=null),b.Qb&&(n[p]=b.qb,x=!0),!x){if(E(d),b.jc){S=d,D=n;var O=p,k=b.pd[C(S)&Xn-1];t(b.jc),256>k.g?(T(S,S.u+k.g),D[O]=k.value,S=0):(T(S,S.u+k.g-256),t(256<=k.value),S=k.value),S==0&&(x=!0)}else S=Ae(b.G[0],b.H[0],d)}if(d.h)break;if(x||256>S){if(!x){if(b.nd)n[p]=(b.qb|S<<8)>>>0;else{if(E(d),x=Ae(b.G[1],b.H[1],d),E(d),D=Ae(b.G[2],b.H[2],d),O=Ae(b.G[3],b.H[3],d),d.h)break;n[p]=(O<<24|x<<16|S<<8|D)>>>0}}if(x=!1,++p,++u>=i&&(u=0,++l,s!=null&&l<=o&&!(l%16)&&s(e,l),v!=null))for(;m<p;)S=n[m++],v.X[(506832829*S&4294967295)>>>v.Mb]=S}else if(280>S){if(S=Oe(S-256,d),D=Ae(b.G[4],b.H[4],d),E(d),D=ke(i,D=Oe(D,d)),d.h)break;if(p-r<D||a-p<S)break t;for(O=0;O<S;++O)n[p+O]=n[p+O-D];for(p+=S,u+=S;u>=i;)u-=i,++l,s!=null&&l<=o&&!(l%16)&&s(e,l);if(t(p<=a),u&y&&(b=Me(f,u,l)),v!=null)for(;m<p;)S=n[m++],v.X[(506832829*S&4294967295)>>>v.Mb]=S}else{if(!(S<g))break t;for(x=S-280,t(v!=null);m<p;)S=n[m++],v.X[(506832829*S&4294967295)>>>v.Mb]=S;S=p,t(!(x>>>(D=v).Xa)),n[S]=D.X[x],x=!0}x||t(d.h==w(d))}if(e.Pb&&d.h&&p<a)t(e.m.h),e.a=5,e.m=e.wd,e.$=e.xd,0<e.s.ua&&F(e.s.vb,e.s.Wa);else{if(d.h)break t;s?.(e,l>o?o:l),e.a=0,e.$=p-r}return 1}return e.a=3,0}function ze(e){t(e!=null),e.vc=null,e.yc=null,e.Ya=null;var n=e.Wa;n!=null&&(n.X=null),e.vb=null,t(e!=null)}function Be(){var t=new vn;return t==null?null:(t.a=0,t.xb=Ei,me(`Predictor`,`VP8LPredictors`),me(`Predictor`,`VP8LPredictors_C`),me(`PredictorAdd`,`VP8LPredictorsAdd`),me(`PredictorAdd`,`VP8LPredictorsAdd_C`),ir=ae,ur=se,dr=le,fr=H,pr=ue,mr=de,hr=fe,e.VP8LMapColor32b=or,e.VP8LMapColor8b=cr,t)}function Ve(e,n,r,s,l){var u=1,p=[e],h=[n],g=s.m,_=s.s,v=null,y=0;t:for(;;){if(r)for(;u&&b(g,1);){var x=p,S=h,w=s,D=1,O=w.m,k=w.gc[w.ab],A=b(O,2);if(w.Oc&1<<A)u=0;else{switch(w.Oc|=1<<A,k.hc=A,k.Ea=x[0],k.nc=S[0],k.K=[null],++w.ab,t(4>=w.ab),A){case 0:case 1:k.b=b(O,3)+2,D=Ve(R(k.Ea,k.b),R(k.nc,k.b),0,w,k.K),k.K=k.K[0];break;case 3:var j,M=b(O,8)+1,N=16<M?0:4<M?1:2<M?2:3;if(x[0]=R(k.Ea,N),k.b=N,j=D=Ve(M,1,0,w,k.K)){var F,I=M,L=k,z=1<<(8>>L.b),B=a(z);if(B==null)j=0;else{var V=L.K[0],te=L.w;for(B[0]=L.K[0][0],F=1;F<1*I;++F)B[F]=ee(V[te+F],B[F-1]);for(;F<4*z;++F)B[F]=0;L.K[0]=null,L.K[0]=B,j=1}}D=j;break;case 2:break;default:t(0)}u=D}}if(p=p[0],h=h[0],u&&b(g,1)&&!(u=1<=(y=b(g,4))&&11>=y)){s.a=3;break t}var ne;if(ne=u)e:{var re,ie,ae,oe=s,se=p,ce=h,le=y,H=r,ue=oe.m,de=oe.s,fe=[null],pe=1,me=0,he=ui[le];r:for(;;){if(H&&b(ue,1)){var ge=b(ue,3)+2,_e=R(se,ge),ve=R(ce,ge),ye=_e*ve;if(!Ve(_e,ve,0,oe,fe))break r;for(fe=fe[0],de.xc=ge,re=0;re<ye;++re){var be=fe[re]>>8&65535;fe[re]=be,be>=pe&&(pe=be+1)}}if(ue.h)break r;for(ie=0;5>ie;++ie){var xe=oi[ie];!ie&&0<le&&(xe+=1<<le),me<xe&&(me=xe)}var Se=o(pe*he,f),Ce=pe,we=o(Ce,m);if(we==null)var Te=null;else t(65536>=Ce),Te=we;var Ee=a(me);if(Te==null||Ee==null||Se==null){oe.a=1;break r}var De=Se;for(re=ae=0;re<pe;++re){var Oe=Te[re],ke=Oe.G,Ae=Oe.H,Me=0,Ne=1,Pe=0;for(ie=0;5>ie;++ie){xe=oi[ie],ke[ie]=De,Ae[ie]=ae,!ie&&0<le&&(xe+=1<<le);n:{var Fe,Ie=xe,Le=oe,Be=Ee,He=De,Ue=ae,We=0,Ge=Le.m,Ke=b(Ge,1);if(i(Be,0,0,Ie),Ke){var qe=b(Ge,1)+1,Je=b(Ge,b(Ge,1)==0?1:8);Be[Je]=1,qe==2&&(Be[Je=b(Ge,8)]=1);var Ye=1}else{var Xe=a(19),Ze=b(Ge,4)+4;if(19<Ze){Le.a=3;var Qe=0;break n}for(Fe=0;Fe<Ze;++Fe)Xe[ci[Fe]]=b(Ge,3);var $e=void 0,et=void 0,tt=Le,nt=Xe,rt=Ie,it=Be,at=0,ot=tt.m,st=8,ct=o(128,f);i:for(;d(ct,0,7,nt,19);){if(b(ot,1)){if(($e=2+b(ot,2+2*b(ot,3)))>rt)break i}else $e=rt;for(et=0;et<rt&&$e--;){E(ot);var lt=ct[0+(127&C(ot))];T(ot,ot.u+lt.g);var ut=lt.value;if(16>ut)it[et++]=ut,ut!=0&&(st=ut);else{var dt=ut==16,ft=ut-16,pt=ai[ft],mt=b(ot,ii[ft])+pt;if(et+mt>rt)break i;for(var ht=dt?st:0;0<mt--;)it[et++]=ht}}at=1;break i}at||(tt.a=3),Ye=at}(Ye&&=!Ge.h)&&(We=d(He,Ue,8,Be,Ie)),Ye&&We!=0?Qe=We:(Le.a=3,Qe=0)}if(Qe==0)break r;if(Ne&&si[ie]==1&&(Ne=De[ae].g==0),Me+=De[ae].g,ae+=Qe,3>=ie){var gt,_t=Ee[0];for(gt=1;gt<xe;++gt)Ee[gt]>_t&&(_t=Ee[gt]);Pe+=_t}}if(Oe.nd=Ne,Oe.Qb=0,Ne&&(Oe.qb=(ke[3][Ae[3]+0].value<<24|ke[1][Ae[1]+0].value<<16|ke[2][Ae[2]+0].value)>>>0,Me==0&&256>ke[0][Ae[0]+0].value&&(Oe.Qb=1,Oe.qb+=ke[0][Ae[0]+0].value<<8)),Oe.jc=!Oe.Qb&&6>Pe,Oe.jc){var vt,yt=Oe;for(vt=0;vt<Xn;++vt){var bt=vt,xt=yt.pd[bt],St=yt.G[0][yt.H[0]+bt];256<=St.value?(xt.g=St.g+256,xt.value=St.value):(xt.g=0,xt.value=0,bt>>=je(St,8,xt),bt>>=je(yt.G[1][yt.H[1]+bt],16,xt),bt>>=je(yt.G[2][yt.H[2]+bt],0,xt),je(yt.G[3][yt.H[3]+bt],24,xt))}}}de.vc=fe,de.Wb=pe,de.Ya=Te,de.yc=Se,ne=1;break e}ne=0}if(!(u=ne)){s.a=3;break t}if(0<y){if(_.ua=1<<y,!P(_.Wa,y)){s.a=1,u=0;break t}}else _.ua=0;var Ct=s,wt=p,Tt=h,Et=Ct.s,Dt=Et.xc;if(Ct.c=wt,Ct.i=Tt,Et.md=R(wt,Dt),Et.wc=Dt==0?-1:(1<<Dt)-1,r){s.xb=Ti;break t}if((v=a(p*h))==null){s.a=1,u=0;break t}u=(u=Re(s,v,0,p,h,h,null))&&!g.h;break t}return u?(l==null?(t(v==null),t(r)):l[0]=v,s.$=0,r||ze(_)):ze(_),u}function He(e,n){var r=e.c*e.i,i=r+n+16*n;return t(e.c<=n),e.V=a(i),e.V==null?(e.Ta=null,e.Ua=0,e.a=1,0):(e.Ta=e.V,e.Ua=e.Ba+r+n,1)}function Ue(e,n){var r=e.C,i=n-r,a=e.V,o=e.Ba+e.c*r;for(t(n<=e.l.o);0<i;){var s=16<i?16:i,l=e.l.ma,u=e.l.width,d=u*s,f=l.ca,p=l.tb+u*r,m=e.Ta,h=e.Ua;Ne(e,s,a,o),Lr(m,h,f,p,d),Ie(l,r,r+s,f,p,u),i-=s,a+=s*e.c,r+=s}t(r==n),e.C=e.Ma=n}function We(){this.ub=this.yd=this.td=this.Rb=0}function Ge(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Ke(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function qe(){this.Yb=function(){var e=[];return function e(t,n,r){for(var i=r[n],a=0;a<i&&(t.push(r.length>n+1?[]:0),!(r.length<n+1));a++)e(t[a],n+1,r)}(e,0,[3,11]),e}()}function Je(){this.jb=a(3),this.Wc=s([4,8],qe),this.Xc=s([4,17],qe)}function Ye(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function Xe(){this.ld=this.La=this.dd=this.tc=0}function Ze(){this.Na=this.la=0}function Qe(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function $e(){this.ad=a(384),this.Za=0,this.Ob=a(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function et(){this.uc=this.M=this.Nb=0,this.wa=Array(new Xe),this.Y=0,this.ya=Array(new $e),this.aa=0,this.l=new it}function tt(){this.y=a(16),this.f=a(8),this.ea=a(8)}function nt(){this.cb=this.a=0,this.sc=``,this.m=new x,this.Od=new We,this.Kc=new Ge,this.ed=new Ye,this.Qa=new Ke,this.Ic=this.$c=this.Aa=0,this.D=new et,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,x),this.ia=0,this.pb=o(4,Qe),this.Pa=new Je,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new tt),this.Hd=0,this.rb=Array(new Ze),this.sb=0,this.wa=Array(new Xe),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new $e),this.L=this.aa=0,this.gd=s([4,2],Xe),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function rt(e,t){return 0>e?0:e>t?t:e}function it(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma=`void`,this.put=`VP8IoPutHook`,this.ac=`VP8IoSetupHook`,this.bc=`VP8IoTeardownHook`,this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function at(){var e=new nt;return e!=null&&(e.a=0,e.sc=`OK`,e.cb=0,e.Xb=0,mi||=lt),e}function ot(e,t,n){return e.a==0&&(e.a=t,e.sc=n,e.cb=0),0}function st(e,t,n){return 3<=n&&e[t+0]==157&&e[t+1]==1&&e[t+2]==42}function ct(e,n){if(e==null)return 0;if(e.a=0,e.sc=`OK`,n==null)return ot(e,2,`null VP8Io passed to VP8GetHeaders()`);var r=n.data,a=n.w,o=n.ha;if(4>o)return ot(e,7,`Truncated header.`);var s=r[a+0]|r[a+1]<<8|r[a+2]<<16,l=e.Od;if(l.Rb=!(1&s),l.td=s>>1&7,l.yd=s>>4&1,l.ub=s>>5,3<l.td)return ot(e,3,`Incorrect keyframe parameters.`);if(!l.yd)return ot(e,4,`Frame not displayable.`);a+=3,o-=3;var u=e.Kc;if(l.Rb){if(7>o)return ot(e,7,`cannot parse picture header`);if(!st(r,a,o))return ot(e,3,`Bad code word`);u.c=16383&(r[a+4]<<8|r[a+3]),u.Td=r[a+4]>>6,u.i=16383&(r[a+6]<<8|r[a+5]),u.Ud=r[a+6]>>6,a+=7,o-=7,e.za=u.c+15>>4,e.Ub=u.i+15>>4,n.width=u.c,n.height=u.i,n.Da=0,n.j=0,n.v=0,n.va=n.width,n.o=n.height,n.da=0,n.ib=n.width,n.hb=n.height,n.U=n.width,n.T=n.height,i((s=e.Pa).jb,0,255,s.jb.length),t((s=e.Qa)!=null),s.Cb=0,s.Bb=0,s.Fb=1,i(s.Zb,0,0,s.Zb.length),i(s.Lb,0,0,s.Lb)}if(l.ub>o)return ot(e,7,`bad partition length`);h(s=e.m,r,a,l.ub),a+=l.ub,o-=l.ub,l.Rb&&(u.Ld=O(s),u.Kd=O(s)),u=e.Qa;var d,f=e.Pa;if(t(s!=null),t(u!=null),u.Cb=O(s),u.Cb){if(u.Bb=O(s),O(s)){for(u.Fb=O(s),d=0;4>d;++d)u.Zb[d]=O(s)?_(s,7):0;for(d=0;4>d;++d)u.Lb[d]=O(s)?_(s,6):0}if(u.Bb)for(d=0;3>d;++d)f.jb[d]=O(s)?g(s,8):255}else u.Bb=0;if(s.Ka)return ot(e,3,`cannot parse segment header`);if((u=e.ed).zd=O(s),u.Tb=g(s,6),u.wb=g(s,3),u.Pc=O(s),u.Pc&&O(s)){for(f=0;4>f;++f)O(s)&&(u.vd[f]=_(s,6));for(f=0;4>f;++f)O(s)&&(u.od[f]=_(s,6))}if(e.L=u.Tb==0?0:u.zd?1:2,s.Ka)return ot(e,3,`cannot parse filter header`);var p=o;if(o=d=a,a=d+p,u=p,e.Xb=(1<<g(e.m,2))-1,p<3*(f=e.Xb))r=7;else{for(d+=3*f,u-=3*f,p=0;p<f;++p){var m=r[o+0]|r[o+1]<<8|r[o+2]<<16;m>u&&(m=u),h(e.Jc[+p],r,d,m),d+=m,u-=m,o+=3}h(e.Jc[+f],r,d,u),r=d<a?0:5}if(r!=0)return ot(e,r,`cannot parse partitions`);for(r=g(d=e.m,7),o=O(d)?_(d,4):0,a=O(d)?_(d,4):0,u=O(d)?_(d,4):0,f=O(d)?_(d,4):0,d=O(d)?_(d,4):0,p=e.Qa,m=0;4>m;++m){if(p.Cb){var v=p.Zb[m];p.Fb||(v+=r)}else{if(0<m){e.pb[m]=e.pb[0];continue}v=r}var y=e.pb[m];y.Sc[0]=fi[rt(v+o,127)],y.Sc[1]=pi[rt(v+0,127)],y.Eb[0]=2*fi[rt(v+a,127)],y.Eb[1]=101581*pi[rt(v+u,127)]>>16,8>y.Eb[1]&&(y.Eb[1]=8),y.Qc[0]=fi[rt(v+f,117)],y.Qc[1]=pi[rt(v+d,127)],y.lc=v+d}if(!l.Rb)return ot(e,4,`Not a key frame.`);for(O(s),l=e.Pa,r=0;4>r;++r){for(o=0;8>o;++o)for(a=0;3>a;++a)for(u=0;11>u;++u)f=k(s,bi[r][o][a][u])?g(s,8):vi[r][o][a][u],l.Wc[r][o].Yb[a][u]=f;for(o=0;17>o;++o)l.Xc[r][o]=l.Wc[r][xi[o]]}return e.kc=O(s),e.kc&&(e.Bd=g(s,8)),e.cb=1}function lt(e,t,n,r,i,a,o){var s=t[i].Yb[n];for(n=0;16>i;++i){if(!k(e,s[n+0]))return i;for(;!k(e,s[n+1]);)if(s=t[++i].Yb[0],n=0,i==16)return 16;var l=t[i+1].Yb;if(k(e,s[n+2])){var u=e,d=0;if(k(u,(p=s)[(f=n)+3])){if(k(u,p[f+6])){for(s=0,f=2*(d=k(u,p[f+8]))+(p=k(u,p[f+9+d])),d=0,p=hi[f];p[s];++s)d+=d+k(u,p[s]);d+=3+(8<<f)}else k(u,p[f+7])?(d=7+2*k(u,165),d+=k(u,145)):d=5+k(u,159)}else d=k(u,p[f+4])?3+k(u,p[f+5]):2;s=l[2]}else d=1,s=l[1];l=o+gi[i],0>(u=e).b&&D(u);var f,p=u.b,m=(f=u.Ca>>1)-(u.I>>p)>>31;--u.b,u.Ca+=m,u.Ca|=1,u.I-=(f+1&m)<<p,a[l]=((d^m)-m)*r[(0<i)+0]}return 16}function ut(e){var t=e.rb[e.sb-1];t.la=0,t.Na=0,i(e.zc,0,0,e.zc.length),e.ja=0}function dt(e,t,n,r,i){i=e[t+n+32*r]+(i>>3),e[t+n+32*r]=-256&i?0>i?0:255:i}function ft(e,t,n,r,i,a){dt(e,t,0,n,r+i),dt(e,t,1,n,r+a),dt(e,t,2,n,r-a),dt(e,t,3,n,r-i)}function pt(e){return(20091*e>>16)+e}function mt(e,t,n,r){var i,o=0,s=a(16);for(i=0;4>i;++i){var l=e[t+0]+e[t+8],u=e[t+0]-e[t+8],d=(35468*e[t+4]>>16)-pt(e[t+12]),f=pt(e[t+4])+(35468*e[t+12]>>16);s[o+0]=l+f,s[o+1]=u+d,s[o+2]=u-d,s[o+3]=l-f,o+=4,t++}for(i=o=0;4>i;++i)l=(e=s[o+0]+4)+s[o+8],u=e-s[o+8],d=(35468*s[o+4]>>16)-pt(s[o+12]),dt(n,r,0,0,l+(f=pt(s[o+4])+(35468*s[o+12]>>16))),dt(n,r,1,0,u+d),dt(n,r,2,0,u-d),dt(n,r,3,0,l-f),o++,r+=32}function ht(e,t,n,r){var i=e[t+0]+4,a=35468*e[t+4]>>16,o=pt(e[t+4]),s=35468*e[t+1]>>16;ft(n,r,0,i+o,e=pt(e[t+1]),s),ft(n,r,1,i+a,e,s),ft(n,r,2,i-a,e,s),ft(n,r,3,i-o,e,s)}function gt(e,t,n,r,i){mt(e,t,n,r),i&&mt(e,t+16,n,r+4)}function _t(e,t,n,r){_r(e,t+0,n,r,1),_r(e,t+32,n,r+128,1)}function vt(e,t,n,r){var i;for(e=e[t+0]+4,i=0;4>i;++i)for(t=0;4>t;++t)dt(n,r,t,i,e)}function yt(e,t,n,r){e[t+0]&&br(e,t+0,n,r),e[t+16]&&br(e,t+16,n,r+4),e[t+32]&&br(e,t+32,n,r+128),e[t+48]&&br(e,t+48,n,r+128+4)}function bt(e,t,n,r){var i,o=a(16);for(i=0;4>i;++i){var s=e[t+0+i]+e[t+12+i],l=e[t+4+i]+e[t+8+i],u=e[t+4+i]-e[t+8+i],d=e[t+0+i]-e[t+12+i];o[0+i]=s+l,o[8+i]=s-l,o[4+i]=d+u,o[12+i]=d-u}for(i=0;4>i;++i)s=(e=o[0+4*i]+3)+o[3+4*i],l=o[1+4*i]+o[2+4*i],u=o[1+4*i]-o[2+4*i],d=e-o[3+4*i],n[r+0]=s+l>>3,n[r+16]=d+u>>3,n[r+32]=s-l>>3,n[r+48]=d-u>>3,r+=64}function xt(e,t,n){var r,i=t-32,a=Gr,o=255-e[i-1];for(r=0;r<n;++r){var s,l=a,u=o+e[t-1];for(s=0;s<n;++s)e[t+s]=l[u+e[i+s]];t+=32}}function St(e,t){xt(e,t,4)}function Ct(e,t){xt(e,t,8)}function wt(e,t){xt(e,t,16)}function Tt(e,t){for(var n=0;16>n;++n)r(e,t+32*n,e,t-32,16)}function Et(e,t){for(var n=16;0<n;--n)i(e,t,e[t-1],16),t+=32}function Dt(e,t,n){for(var r=0;16>r;++r)i(t,n+32*r,e,16)}function Ot(e,t){var n,r=16;for(n=0;16>n;++n)r+=e[t-1+32*n]+e[t+n-32];Dt(r>>5,e,t)}function kt(e,t){var n,r=8;for(n=0;16>n;++n)r+=e[t-1+32*n];Dt(r>>4,e,t)}function At(e,t){var n,r=8;for(n=0;16>n;++n)r+=e[t+n-32];Dt(r>>4,e,t)}function jt(e,t){Dt(128,e,t)}function Mt(e,t,n){return e+2*t+n+2>>2}function Nt(e,t){var n,i=t-32;for(i=new Uint8Array([Mt(e[i-1],e[i+0],e[i+1]),Mt(e[i+0],e[i+1],e[i+2]),Mt(e[i+1],e[i+2],e[i+3]),Mt(e[i+2],e[i+3],e[i+4])]),n=0;4>n;++n)r(e,t+32*n,i,0,i.length)}function Pt(e,t){var n=e[t-1],r=e[t-1+32],i=e[t-1+64],a=e[t-1+96];A(e,t+0,16843009*Mt(e[t-1-32],n,r)),A(e,t+32,16843009*Mt(n,r,i)),A(e,t+64,16843009*Mt(r,i,a)),A(e,t+96,16843009*Mt(i,a,a))}function Ft(e,t){var n,r=4;for(n=0;4>n;++n)r+=e[t+n-32]+e[t-1+32*n];for(r>>=3,n=0;4>n;++n)i(e,t+32*n,r,4)}function It(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],a=e[t-1-32],o=e[t+0-32],s=e[t+1-32],l=e[t+2-32],u=e[t+3-32];e[t+0+96]=Mt(r,i,e[t-1+96]),e[t+1+96]=e[t+0+64]=Mt(n,r,i),e[t+2+96]=e[t+1+64]=e[t+0+32]=Mt(a,n,r),e[t+3+96]=e[t+2+64]=e[t+1+32]=e[t+0+0]=Mt(o,a,n),e[t+3+64]=e[t+2+32]=e[t+1+0]=Mt(s,o,a),e[t+3+32]=e[t+2+0]=Mt(l,s,o),e[t+3+0]=Mt(u,l,s)}function Lt(e,t){var n=e[t+1-32],r=e[t+2-32],i=e[t+3-32],a=e[t+4-32],o=e[t+5-32],s=e[t+6-32],l=e[t+7-32];e[t+0+0]=Mt(e[t+0-32],n,r),e[t+1+0]=e[t+0+32]=Mt(n,r,i),e[t+2+0]=e[t+1+32]=e[t+0+64]=Mt(r,i,a),e[t+3+0]=e[t+2+32]=e[t+1+64]=e[t+0+96]=Mt(i,a,o),e[t+3+32]=e[t+2+64]=e[t+1+96]=Mt(a,o,s),e[t+3+64]=e[t+2+96]=Mt(o,s,l),e[t+3+96]=Mt(s,l,l)}function Rt(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],a=e[t-1-32],o=e[t+0-32],s=e[t+1-32],l=e[t+2-32],u=e[t+3-32];e[t+0+0]=e[t+1+64]=a+o+1>>1,e[t+1+0]=e[t+2+64]=o+s+1>>1,e[t+2+0]=e[t+3+64]=s+l+1>>1,e[t+3+0]=l+u+1>>1,e[t+0+96]=Mt(i,r,n),e[t+0+64]=Mt(r,n,a),e[t+0+32]=e[t+1+96]=Mt(n,a,o),e[t+1+32]=e[t+2+96]=Mt(a,o,s),e[t+2+32]=e[t+3+96]=Mt(o,s,l),e[t+3+32]=Mt(s,l,u)}function zt(e,t){var n=e[t+0-32],r=e[t+1-32],i=e[t+2-32],a=e[t+3-32],o=e[t+4-32],s=e[t+5-32],l=e[t+6-32],u=e[t+7-32];e[t+0+0]=n+r+1>>1,e[t+1+0]=e[t+0+64]=r+i+1>>1,e[t+2+0]=e[t+1+64]=i+a+1>>1,e[t+3+0]=e[t+2+64]=a+o+1>>1,e[t+0+32]=Mt(n,r,i),e[t+1+32]=e[t+0+96]=Mt(r,i,a),e[t+2+32]=e[t+1+96]=Mt(i,a,o),e[t+3+32]=e[t+2+96]=Mt(a,o,s),e[t+3+64]=Mt(o,s,l),e[t+3+96]=Mt(s,l,u)}function Bt(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],a=e[t-1+96];e[t+0+0]=n+r+1>>1,e[t+2+0]=e[t+0+32]=r+i+1>>1,e[t+2+32]=e[t+0+64]=i+a+1>>1,e[t+1+0]=Mt(n,r,i),e[t+3+0]=e[t+1+32]=Mt(r,i,a),e[t+3+32]=e[t+1+64]=Mt(i,a,a),e[t+3+64]=e[t+2+64]=e[t+0+96]=e[t+1+96]=e[t+2+96]=e[t+3+96]=a}function Vt(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],a=e[t-1+96],o=e[t-1-32],s=e[t+0-32],l=e[t+1-32],u=e[t+2-32];e[t+0+0]=e[t+2+32]=n+o+1>>1,e[t+0+32]=e[t+2+64]=r+n+1>>1,e[t+0+64]=e[t+2+96]=i+r+1>>1,e[t+0+96]=a+i+1>>1,e[t+3+0]=Mt(s,l,u),e[t+2+0]=Mt(o,s,l),e[t+1+0]=e[t+3+32]=Mt(n,o,s),e[t+1+32]=e[t+3+64]=Mt(r,n,o),e[t+1+64]=e[t+3+96]=Mt(i,r,n),e[t+1+96]=Mt(a,i,r)}function Ht(e,t){for(var n=0;8>n;++n)r(e,t+32*n,e,t-32,8)}function Ut(e,t){for(var n=0;8>n;++n)i(e,t,e[t-1],8),t+=32}function Wt(e,t,n){for(var r=0;8>r;++r)i(t,n+32*r,e,8)}function Gt(e,t){var n,r=8;for(n=0;8>n;++n)r+=e[t+n-32]+e[t-1+32*n];Wt(r>>4,e,t)}function Kt(e,t){var n,r=4;for(n=0;8>n;++n)r+=e[t+n-32];Wt(r>>3,e,t)}function qt(e,t){var n,r=4;for(n=0;8>n;++n)r+=e[t-1+32*n];Wt(r>>3,e,t)}function Jt(e,t){Wt(128,e,t)}function Yt(e,t,n){var r=e[t-n],i=e[t+0],a=3*(i-r)+Ur[1020+e[t-2*n]-e[t+n]],o=Wr[112+(a+4>>3)];e[t-n]=Gr[255+r+Wr[112+(a+3>>3)]],e[t+0]=Gr[255+i-o]}function Xt(e,t,n,r){var i=e[t+0],a=e[t+n];return Kr[255+e[t-2*n]-e[t-n]]>r||Kr[255+a-i]>r}function Zt(e,t,n,r){return 4*Kr[255+e[t-n]-e[t+0]]+Kr[255+e[t-2*n]-e[t+n]]<=r}function Qt(e,t,n,r,i){var a=e[t-3*n],o=e[t-2*n],s=e[t-n],l=e[t+0],u=e[t+n],d=e[t+2*n],f=e[t+3*n];return 4*Kr[255+s-l]+Kr[255+o-u]>r?0:Kr[255+e[t-4*n]-a]<=i&&Kr[255+a-o]<=i&&Kr[255+o-s]<=i&&Kr[255+f-d]<=i&&Kr[255+d-u]<=i&&Kr[255+u-l]<=i}function $t(e,t,n,r){var i=2*r+1;for(r=0;16>r;++r)Zt(e,t+r,n,i)&&Yt(e,t+r,n)}function en(e,t,n,r){var i=2*r+1;for(r=0;16>r;++r)Zt(e,t+r*n,1,i)&&Yt(e,t+r*n,1)}function tn(e,t,n,r){for(var i=3;0<i;--i)$t(e,t+=4*n,n,r)}function nn(e,t,n,r){for(var i=3;0<i;--i)en(e,t+=4,n,r)}function rn(e,t,n,r,i,a,o,s){for(a=2*a+1;0<i--;){if(Qt(e,t,n,a,o)){if(Xt(e,t,n,s))Yt(e,t,n);else{var l=e,u=t,d=n,f=l[u-2*d],p=l[u-d],m=l[u+0],h=l[u+d],g=l[u+2*d],_=27*(y=Ur[1020+3*(m-p)+Ur[1020+f-h]])+63>>7,v=18*y+63>>7,y=9*y+63>>7;l[u-3*d]=Gr[255+l[u-3*d]+y],l[u-2*d]=Gr[255+f+v],l[u-d]=Gr[255+p+_],l[u+0]=Gr[255+m-_],l[u+d]=Gr[255+h-v],l[u+2*d]=Gr[255+g-y]}}t+=r}}function an(e,t,n,r,i,a,o,s){for(a=2*a+1;0<i--;){if(Qt(e,t,n,a,o)){if(Xt(e,t,n,s))Yt(e,t,n);else{var l=e,u=t,d=n,f=l[u-d],p=l[u+0],m=l[u+d],h=Wr[112+(4+(g=3*(p-f))>>3)],g=Wr[112+(g+3>>3)],_=h+1>>1;l[u-2*d]=Gr[255+l[u-2*d]+_],l[u-d]=Gr[255+f+g],l[u+0]=Gr[255+p-h],l[u+d]=Gr[255+m-_]}}t+=r}}function on(e,t,n,r,i,a){rn(e,t,n,1,16,r,i,a)}function sn(e,t,n,r,i,a){rn(e,t,1,n,16,r,i,a)}function cn(e,t,n,r,i,a){for(var o=3;0<o;--o)an(e,t+=4*n,n,1,16,r,i,a)}function ln(e,t,n,r,i,a){for(var o=3;0<o;--o)an(e,t+=4,1,n,16,r,i,a)}function un(e,t,n,r,i,a,o,s){rn(e,t,i,1,8,a,o,s),rn(n,r,i,1,8,a,o,s)}function dn(e,t,n,r,i,a,o,s){rn(e,t,1,i,8,a,o,s),rn(n,r,1,i,8,a,o,s)}function fn(e,t,n,r,i,a,o,s){an(e,t+4*i,i,1,8,a,o,s),an(n,r+4*i,i,1,8,a,o,s)}function pn(e,t,n,r,i,a,o,s){an(e,t+4,1,i,8,a,o,s),an(n,r+4,1,i,8,a,o,s)}function mn(){this.ba=new ve,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new be,this.memory=0,this.Ib=`OutputFunc`,this.Jb=`OutputAlphaFunc`,this.Nd=`OutputRowFunc`}function hn(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function gn(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function _n(){this.ua=0,this.Wa=new I,this.vb=new I,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new m,this.yc=new f}function vn(){this.xb=this.a=0,this.l=new it,this.ca=new ve,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new S,this.Pb=0,this.wd=new S,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new _n,this.ab=0,this.gc=o(4,gn),this.Oc=0}function yn(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new it,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function bn(e,t,n,r,i,a,o){for(e=e==null?0:e[t+0],t=0;t<o;++t)i[a+t]=e+n[r+t]&255,e=i[a+t]}function xn(e,t,n,r,i,a,o){var s;if(e==null)bn(null,null,n,r,i,a,o);else for(s=0;s<o;++s)i[a+s]=e[t+s]+n[r+s]&255}function Sn(e,t,n,r,i,a,o){if(e==null)bn(null,null,n,r,i,a,o);else{var s,l=e[t+0],u=l,d=l;for(s=0;s<o;++s)u=d+(l=e[t+s])-u,d=n[r+s]+(-256&u?0>u?0:255:u)&255,u=l,i[a+s]=d}}function Cn(e,n,i,o){var s=n.width,l=n.o;if(t(e!=null&&n!=null),0>i||0>=o||i+o>l)return null;if(!e.Cc){if(e.ga==null){var u;if(e.ga=new yn,(u=e.ga==null)||(u=n.width*n.o,t(e.Gb.length==0),e.Gb=a(u),e.Uc=0,e.Gb==null?u=0:(e.mb=e.Gb,e.nb=e.Uc,e.rc=null,u=1),u=!u),!u){u=e.ga;var d=e.Fa,f=e.P,p=e.qc,m=e.mb,h=e.nb,g=f+1,_=p-1,y=u.l;if(t(d!=null&&m!=null&&n!=null),Di[0]=null,Di[1]=bn,Di[2]=xn,Di[3]=Sn,u.ca=m,u.tb=h,u.c=n.width,u.i=n.height,t(0<u.c&&0<u.i),1>=p)n=0;else if(u.$a=3&d[f+0],u.Z=d[f+0]>>2&3,u.Lc=d[f+0]>>4&3,f=d[f+0]>>6&3,0>u.$a||1<u.$a||4<=u.Z||1<u.Lc||f)n=0;else if(y.put=Te,y.ac=we,y.bc=Ee,y.ma=u,y.width=n.width,y.height=n.height,y.Da=n.Da,y.v=n.v,y.va=n.va,y.j=n.j,y.o=n.o,u.$a)t:{t(u.$a==1),n=Be();e:for(;;){if(n==null){n=0;break t}if(t(u!=null),u.mc=n,n.c=u.c,n.i=u.i,n.l=u.l,n.l.ma=u,n.l.width=u.c,n.l.height=u.i,n.a=0,v(n.m,d,g,_),!Ve(u.c,u.i,1,n,null)||(n.ab==1&&n.gc[0].hc==3&&Fe(n.s)?(u.ic=1,d=n.c*n.i,n.Ta=null,n.Ua=0,n.V=a(d),n.Ba=0,n.V==null?(n.a=1,n=0):n=1):(u.ic=0,n=He(n,u.c)),!n))break e;n=1;break t}u.mc=null,n=0}else n=_>=u.c*u.i;u=!n}if(u)return null;e.ga.Lc==1?o=l-i:e.Ga=0}t(e.ga!=null),t(i+o<=l);t:{if(n=(d=e.ga).c,l=d.l.o,d.$a==0){if(g=e.rc,_=e.Vc,y=e.Fa,f=e.P+1+i*n,p=e.mb,m=e.nb+i*n,t(f<=e.P+e.qc),d.Z!=0)for(t(Di[d.Z]!=null),u=0;u<o;++u)Di[d.Z](g,_,y,f,p,m,n),g=p,_=m,m+=n,f+=n;else for(u=0;u<o;++u)r(p,m,y,f,n),g=p,_=m,m+=n,f+=n;e.rc=g,e.Vc=_}else{if(t(d.mc!=null),n=i+o,t((u=d.mc)!=null),t(n<=u.i),u.C>=n)n=1;else if(d.ic||On(),d.ic){d=u.V,g=u.Ba,_=u.c;var b=u.i,x=(y=1,f=u.$/_,p=u.$%_,m=u.m,h=u.s,u.$),S=_*b,C=_*n,T=h.wc,D=x<C?Me(h,p,f):null;t(x<=S),t(n<=b),t(Fe(h));e:for(;;){for(;!m.h&&x<C;){if(p&T||(D=Me(h,p,f)),t(D!=null),E(m),256>(b=Ae(D.G[0],D.H[0],m)))d[g+x]=b,++x,++p>=_&&(p=0,++f<=n&&!(f%16)&&Le(u,f));else{if(!(280>b)){y=0;break e}b=Oe(b-256,m);var O,k=Ae(D.G[4],D.H[4],m);if(E(m),!(x>=(k=ke(_,k=Oe(k,m)))&&S-x>=b)){y=0;break e}for(O=0;O<b;++O)d[g+x+O]=d[g+x+O-k];for(x+=b,p+=b;p>=_;)p-=_,++f<=n&&!(f%16)&&Le(u,f);x<C&&p&T&&(D=Me(h,p,f))}t(m.h==w(m))}Le(u,f>n?n:f);break e}!y||m.h&&x<S?(y=0,u.a=m.h?5:3):u.$=x,n=y}else n=Re(u,u.V,u.Ba,u.c,u.i,n,Ue);if(!n){o=0;break t}}i+o>=l&&(e.Cc=1),o=1}if(!o)return null;if(e.Cc&&((o=e.ga)!=null&&(o.mc=null),e.ga=null,0<e.Ga))return alert(`todo:WebPDequantizeLevels`),null}return e.nb+i*s}function wn(e,t,n,r,i,a){for(;0<i--;){var o,s=e,l=t+ +!!n,u=e,d=t+(n?0:3);for(o=0;o<r;++o){var f=u[d+4*o];f!=255&&(f*=32897,s[l+4*o+0]=s[l+4*o+0]*f>>23,s[l+4*o+1]=s[l+4*o+1]*f>>23,s[l+4*o+2]=s[l+4*o+2]*f>>23)}t+=a}}function Tn(e,t,n,r,i){for(;0<r--;){for(var a=0;a<n;++a){var o=e[t+2*a+0],s=15&(u=e[t+2*a+1]),l=4369*s,u=(240&u|u>>4)*l>>16;e[t+2*a+0]=(240&o|o>>4)*l>>16&240|(15&o|o<<4)*l>>16>>4&15,e[t+2*a+1]=240&u|s}t+=i}}function En(e,t,n,r,i,a,o,s){var l,u,d=255;for(u=0;u<i;++u){for(l=0;l<r;++l){var f=e[t+l];a[o+4*l]=f,d&=f}t+=n,o+=s}return d!=255}function Dn(e,t,n,r,i){for(var a=0;a<i;++a)n[r+a]=e[t+a]>>8}function On(){Pr=wn,Fr=Tn,Ir=En,Lr=Dn}function kn(n,r,i){e[n]=function(e,n,a,o,s,l,u,d,f,p,m,h,g,_,v,y,b){var x,S=b-1>>1,C=s[l+0]|u[d+0]<<16,w=f[p+0]|m[h+0]<<16;t(e!=null);var T=3*C+w+131074>>2;for(r(e[n+0],255&T,T>>16,g,_),a!=null&&(T=3*w+C+131074>>2,r(a[o+0],255&T,T>>16,v,y)),x=1;x<=S;++x){var E=s[l+x]|u[d+x]<<16,D=f[p+x]|m[h+x]<<16,O=C+E+w+D+524296,k=O+2*(E+w)>>3;T=k+C>>1,C=(O=O+2*(C+D)>>3)+E>>1,r(e[n+2*x-1],255&T,T>>16,g,_+(2*x-1)*i),r(e[n+2*x-0],255&C,C>>16,g,_+(2*x-0)*i),a!=null&&(T=O+w>>1,C=k+D>>1,r(a[o+2*x-1],255&T,T>>16,v,y+(2*x-1)*i),r(a[o+2*x+0],255&C,C>>16,v,y+(2*x+0)*i)),C=E,w=D}1&b||(T=3*C+w+131074>>2,r(e[n+b-1],255&T,T>>16,g,_+(b-1)*i),a!=null&&(T=3*w+C+131074>>2,r(a[o+b-1],255&T,T>>16,v,y+(b-1)*i)))}}function An(){Oi[qr]=ki,Oi[Jr]=ji,Oi[Yr]=Ai,Oi[Xr]=Mi,Oi[Zr]=Ni,Oi[Qr]=Pi,Oi[$r]=Fi,Oi[ei]=ji,Oi[ti]=Mi,Oi[ni]=Ni,Oi[ri]=Pi}function jn(e){return e&~Vi?0>e?0:255:e>>Bi}function Mn(e,t){return jn((19077*e>>8)+(26149*t>>8)-14234)}function Nn(e,t,n){return jn((19077*e>>8)-(6419*t>>8)-(13320*n>>8)+8708)}function Pn(e,t){return jn((19077*e>>8)+(33050*t>>8)-17685)}function Fn(e,t,n,r,i){r[i+0]=Mn(e,n),r[i+1]=Nn(e,t,n),r[i+2]=Pn(e,t)}function In(e,t,n,r,i){r[i+0]=Pn(e,t),r[i+1]=Nn(e,t,n),r[i+2]=Mn(e,n)}function Ln(e,t,n,r,i){var a=Nn(e,t,n);t=a<<3&224|Pn(e,t)>>3,r[i+0]=248&Mn(e,n)|a>>5,r[i+1]=t}function Rn(e,t,n,r,i){var a=240&Pn(e,t)|15;r[i+0]=240&Mn(e,n)|Nn(e,t,n)>>4,r[i+1]=a}function zn(e,t,n,r,i){r[i+0]=255,Fn(e,t,n,r,i+1)}function Bn(e,t,n,r,i){In(e,t,n,r,i),r[i+3]=255}function Vn(e,t,n,r,i){Fn(e,t,n,r,i),r[i+3]=255}function Hn(t,n,r){e[t]=function(e,t,i,a,o,s,l,u,d){for(var f=u+(-2&d)*r;u!=f;)n(e[t+0],i[a+0],o[s+0],l,u),n(e[t+1],i[a+0],o[s+0],l,u+r),t+=2,++a,++s,u+=2*r;1&d&&n(e[t+0],i[a+0],o[s+0],l,u)}}function Un(e,t,n){return n==0?e==0?t==0?6:5:t==0?4:0:n}function Wn(e,t,n,r,i){switch(e>>>30){case 3:_r(t,n,r,i,0);break;case 2:vr(t,n,r,i);break;case 1:br(t,n,r,i)}}function Gn(e,t){var n,a,o=t.M,s=t.Nb,l=e.oc,u=e.pc+40,d=e.oc,f=e.pc+584,p=e.oc,m=e.pc+600;for(n=0;16>n;++n)l[u+32*n-1]=129;for(n=0;8>n;++n)d[f+32*n-1]=129,p[m+32*n-1]=129;for(0<o?l[u-1-32]=d[f-1-32]=p[m-1-32]=129:(i(l,u-32-1,127,21),i(d,f-32-1,127,9),i(p,m-32-1,127,9)),a=0;a<e.za;++a){var h=t.ya[t.aa+a];if(0<a){for(n=-1;16>n;++n)r(l,u+32*n-4,l,u+32*n+12,4);for(n=-1;8>n;++n)r(d,f+32*n-4,d,f+32*n+4,4),r(p,m+32*n-4,p,m+32*n+4,4)}var g=e.Gd,_=e.Hd+a,v=h.ad,y=h.Hc;if(0<o&&(r(l,u-32,g[_].y,0,16),r(d,f-32,g[_].f,0,8),r(p,m-32,g[_].ea,0,8)),h.Za){var b=l,x=u-32+16;for(0<o&&(a>=e.za-1?i(b,x,g[_].y[15],4):r(b,x,g[_+1].y,0,4)),n=0;4>n;n++)b[x+128+n]=b[x+256+n]=b[x+384+n]=b[x+0+n];for(n=0;16>n;++n,y<<=2)b=l,x=u+Yi[n],Ci[h.Ob[n]](b,x),Wn(y,v,16*n,b,x)}else if(b=Un(a,o,h.Ob[0]),Si[b](l,u),y!=0)for(n=0;16>n;++n,y<<=2)Wn(y,v,16*n,l,u+Yi[n]);for(n=h.Gc,b=Un(a,o,h.Dd),wi[b](d,f),wi[b](p,m),y=v,b=d,x=f,255&(h=0|n)&&(170&h?yr(y,256,b,x):xr(y,256,b,x)),h=p,y=m,255&(n>>=8)&&(170&n?yr(v,320,h,y):xr(v,320,h,y)),o<e.Ub-1&&(r(g[_].y,0,l,u+480,16),r(g[_].f,0,d,f+224,8),r(g[_].ea,0,p,m+224,8)),n=8*s*e.B,g=e.sa,_=e.ta+16*a+16*s*e.R,v=e.qa,h=e.ra+8*a+n,y=e.Ha,b=e.Ia+8*a+n,n=0;16>n;++n)r(g,_+n*e.R,l,u+32*n,16);for(n=0;8>n;++n)r(v,h+n*e.B,d,f+32*n,8),r(y,b+n*e.B,p,m+32*n,8)}}function Kn(e,r,i,a,o,s,l,u,d){var f=[0],p=[0],m=0,h=d==null?0:d.kd,g=d??new hn;if(e==null||12>i)return 7;g.data=e,g.w=r,g.ha=i,r=[r],i=[i],g.gb=[g.gb];t:{var _=r,y=i,b=g.gb;if(t(e!=null),t(y!=null),t(b!=null),b[0]=0,12<=y[0]&&!n(e,_[0],`RIFF`)){if(n(e,_[0]+8,`WEBP`)){b=3;break t}var x=N(e,_[0]+4);if(12>x||4294967286<x){b=3;break t}if(h&&x>y[0]-8){b=7;break t}b[0]=x,_[0]+=12,y[0]-=12}b=0}if(b!=0)return b;for(x=0<g.gb[0],i=i[0];;){t:{var C=e;y=r,b=i;var w=f,T=p,E=_=[0];if((k=m=[m])[0]=0,8>b[0])b=7;else{if(!n(C,y[0],`VP8X`)){if(N(C,y[0]+4)!=10){b=3;break t}if(18>b[0]){b=7;break t}var D=N(C,y[0]+8),O=1+M(C,y[0]+12);if(2147483648<=O*(C=1+M(C,y[0]+15))){b=3;break t}E!=null&&(E[0]=D),w!=null&&(w[0]=O),T!=null&&(T[0]=C),y[0]+=18,b[0]-=18,k[0]=1}b=0}}if(m=m[0],_=_[0],b!=0)return b;if(y=!!(2&_),!x&&m)return 3;if(s!=null&&(s[0]=!!(16&_)),l!=null&&(l[0]=y),u!=null&&(u[0]=0),l=f[0],_=p[0],m&&y&&d==null){b=0;break}if(4>i){b=7;break}if(x&&m||!x&&!m&&!n(e,r[0],`ALPH`)){i=[i],g.na=[g.na],g.P=[g.P],g.Sa=[g.Sa];t:{D=e,b=r,x=i;var k=g.gb;w=g.na,T=g.P,E=g.Sa,O=22,t(D!=null),t(x!=null),C=b[0];var A=x[0];for(t(w!=null),t(E!=null),w[0]=null,T[0]=null,E[0]=0;;){if(b[0]=C,x[0]=A,8>A){b=7;break t}var j=N(D,C+4);if(4294967286<j){b=3;break t}var P=8+j+1&-2;if(O+=P,0<k&&O>k){b=3;break t}if(!n(D,C,`VP8 `)||!n(D,C,`VP8L`)){b=0;break t}if(A[0]<P){b=7;break t}n(D,C,`ALPH`)||(w[0]=D,T[0]=C+8,E[0]=j),C+=P,A-=P}}if(i=i[0],g.na=g.na[0],g.P=g.P[0],g.Sa=g.Sa[0],b!=0)break}i=[i],g.Ja=[g.Ja],g.xa=[g.xa];t:if(k=e,b=r,x=i,w=g.gb[0],T=g.Ja,E=g.xa,D=b[0],C=!n(k,D,`VP8 `),O=!n(k,D,`VP8L`),t(k!=null),t(x!=null),t(T!=null),t(E!=null),8>x[0])b=7;else{if(C||O){if(k=N(k,D+4),12<=w&&k>w-12){b=3;break t}if(h&&k>x[0]-8){b=7;break t}T[0]=k,b[0]+=8,x[0]-=8,E[0]=O}else E[0]=5<=x[0]&&k[D+0]==47&&!(k[D+4]>>5),T[0]=x[0];b=0}if(i=i[0],g.Ja=g.Ja[0],g.xa=g.xa[0],r=r[0],b!=0)break;if(4294967286<g.Ja)return 3;if(u==null||y||(u[0]=g.xa?2:1),l=[l],_=[_],g.xa){if(5>i){b=7;break}u=l,h=_,y=s,e==null||5>i?e=0:5<=i&&e[r+0]==47&&!(e[r+4]>>5)?(x=[0],k=[0],w=[0],v(T=new S,e,r,i),De(T,x,k,w)?(u!=null&&(u[0]=x[0]),h!=null&&(h[0]=k[0]),y!=null&&(y[0]=w[0]),e=1):e=0):e=0}else{if(10>i){b=7;break}u=_,e==null||10>i||!st(e,r+3,i-3)?e=0:(h=e[r+0]|e[r+1]<<8|e[r+2]<<16,y=16383&(e[r+7]<<8|e[r+6]),e=16383&(e[r+9]<<8|e[r+8]),1&h||3<(h>>1&7)||!(h>>4&1)||h>>5>=g.Ja||!y||!e?e=0:(l&&(l[0]=y),u&&(u[0]=e),e=1))}if(!e||(l=l[0],_=_[0],m&&(f[0]!=l||p[0]!=_)))return 3;d!=null&&(d[0]=g,d.offset=r-d.w,t(4294967286>r-d.w),t(d.offset==d.ha-i));break}return b==0||b==7&&m&&d==null?(s!=null&&(s[0]|=g.na!=null&&0<g.na.length),a!=null&&(a[0]=l),o!=null&&(o[0]=_),0):b}function qn(e,t,n){var r=t.width,i=t.height,a=0,o=0,s=r,l=i;if(t.Da=e!=null&&0<e.Da,t.Da&&(s=e.cd,l=e.bd,a=e.v,o=e.j,11>n||(a&=-2,o&=-2),0>a||0>o||0>=s||0>=l||a+s>r||o+l>i))return 0;if(t.v=a,t.j=o,t.va=a+s,t.o=o+l,t.U=s,t.T=l,t.da=e!=null&&0<e.da,t.da){if(!L(s,l,n=[e.ib],a=[e.hb]))return 0;t.ib=n[0],t.hb=a[0]}return t.ob=e!=null&&e.ob,t.Kb=e==null||!e.Sd,t.da&&(t.ob=t.ib<3*r/4&&t.hb<3*i/4,t.Kb=0),1}function Jn(e){if(e==null)return 2;if(11>e.S){var t=e.f.RGBA;t.fb+=(e.height-1)*t.A,t.A=-t.A}else t=e.f.kb,e=e.height,t.O+=(e-1)*t.fa,t.fa=-t.fa,t.N+=(e-1>>1)*t.Ab,t.Ab=-t.Ab,t.W+=(e-1>>1)*t.Db,t.Db=-t.Db,t.F!=null&&(t.J+=(e-1)*t.lb,t.lb=-t.lb);return 0}function Yn(e,t,n,r){if(r==null||0>=e||0>=t)return 2;if(n!=null){if(n.Da){var i=n.cd,o=n.bd,s=-2&n.v,l=-2&n.j;if(0>s||0>l||0>=i||0>=o||s+i>e||l+o>t)return 2;e=i,t=o}if(n.da){if(!L(e,t,i=[n.ib],o=[n.hb]))return 2;e=i[0],t=o[0]}}r.width=e,r.height=t;t:{var u=r.width,d=r.height;if(e=r.S,0>=u||0>=d||!(e>=qr&&13>e))e=2;else{if(0>=r.Rd&&r.sd==null){s=o=i=t=0;var f=(l=u*$i[e])*d;if(11>e||(o=(d+1)/2*(t=(u+1)/2),e==12&&(s=(i=u)*d)),(d=a(f+2*o+s))==null){e=1;break t}r.sd=d,11>e?((u=r.f.RGBA).eb=d,u.fb=0,u.A=l,u.size=f):((u=r.f.kb).y=d,u.O=0,u.fa=l,u.Fd=f,u.f=d,u.N=0+f,u.Ab=t,u.Cd=o,u.ea=d,u.W=0+f+o,u.Db=t,u.Ed=o,e==12&&(u.F=d,u.J=0+f+2*o),u.Tc=s,u.lb=i)}if(t=1,i=r.S,o=r.width,s=r.height,i>=qr&&13>i){if(11>i)e=r.f.RGBA,t&=(l=Math.abs(e.A))*(s-1)+o<=e.size,t&=l>=o*$i[i],t&=e.eb!=null;else{e=r.f.kb,l=(o+1)/2,f=(s+1)/2,u=Math.abs(e.fa),d=Math.abs(e.Ab);var p=Math.abs(e.Db),m=Math.abs(e.lb),h=m*(s-1)+o;t&=u*(s-1)+o<=e.Fd,t&=d*(f-1)+l<=e.Cd,t=(t&=p*(f-1)+l<=e.Ed)&u>=o&d>=l&p>=l,t&=e.y!=null,t&=e.f!=null,t&=e.ea!=null,i==12&&(t&=m>=o,t&=h<=e.Tc,t&=e.F!=null)}}else t=0;e=t?0:2}}return e!=0||n!=null&&n.fd&&(e=Jn(r)),e}var Xn=64,Zn=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Qn=24,$n=32,er=8,tr=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];z(`Predictor0`,`PredictorAdd0`),e.Predictor0=function(){return 4278190080},e.Predictor1=function(e){return e},e.Predictor2=function(e,t,n){return t[n+0]},e.Predictor3=function(e,t,n){return t[n+1]},e.Predictor4=function(e,t,n){return t[n-1]},e.Predictor5=function(e,t,n){return V(V(e,t[n+1]),t[n+0])},e.Predictor6=function(e,t,n){return V(e,t[n-1])},e.Predictor7=function(e,t,n){return V(e,t[n+0])},e.Predictor8=function(e,t,n){return V(t[n-1],t[n+0])},e.Predictor9=function(e,t,n){return V(t[n+0],t[n+1])},e.Predictor10=function(e,t,n){return V(V(e,t[n-1]),V(t[n+0],t[n+1]))},e.Predictor11=function(e,t,n){var r=t[n+0];return 0>=re(r>>24&255,e>>24&255,(t=t[n-1])>>24&255)+re(r>>16&255,e>>16&255,t>>16&255)+re(r>>8&255,e>>8&255,t>>8&255)+re(255&r,255&e,255&t)?r:e},e.Predictor12=function(e,t,n){var r=t[n+0];return(te((e>>24&255)+(r>>24&255)-((t=t[n-1])>>24&255))<<24|te((e>>16&255)+(r>>16&255)-(t>>16&255))<<16|te((e>>8&255)+(r>>8&255)-(t>>8&255))<<8|te((255&e)+(255&r)-(255&t)))>>>0},e.Predictor13=function(e,t,n){var r=t[n-1];return(ne((e=V(e,t[n+0]))>>24&255,r>>24&255)<<24|ne(e>>16&255,r>>16&255)<<16|ne(e>>8&255,r>>8&255)<<8|ne(255&e,255&r))>>>0};var nr=e.PredictorAdd0;e.PredictorAdd1=ie,z(`Predictor2`,`PredictorAdd2`),z(`Predictor3`,`PredictorAdd3`),z(`Predictor4`,`PredictorAdd4`),z(`Predictor5`,`PredictorAdd5`),z(`Predictor6`,`PredictorAdd6`),z(`Predictor7`,`PredictorAdd7`),z(`Predictor8`,`PredictorAdd8`),z(`Predictor9`,`PredictorAdd9`),z(`Predictor10`,`PredictorAdd10`),z(`Predictor11`,`PredictorAdd11`),z(`Predictor12`,`PredictorAdd12`),z(`Predictor13`,`PredictorAdd13`);var rr=e.PredictorAdd2;ce(`ColorIndexInverseTransform`,`MapARGB`,`32b`,function(e){return e>>8&255},function(e){return e}),ce(`VP8LColorIndexInverseTransformAlpha`,`MapAlpha`,`8b`,function(e){return e},function(e){return e>>8&255});var ir,ar=e.ColorIndexInverseTransform,or=e.MapARGB,sr=e.VP8LColorIndexInverseTransformAlpha,cr=e.MapAlpha,lr=e.VP8LPredictorsAdd=[];lr.length=16,(e.VP8LPredictors=[]).length=16,(e.VP8LPredictorsAdd_C=[]).length=16,(e.VP8LPredictors_C=[]).length=16;var ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr=a(511),zr=a(2041),Br=a(225),Vr=a(767),Hr=0,Ur=zr,Wr=Br,Gr=Vr,Kr=Rr,qr=0,Jr=1,Yr=2,Xr=3,Zr=4,Qr=5,$r=6,ei=7,ti=8,ni=9,ri=10,ii=[2,3,7],ai=[3,3,11],oi=[280,256,256,256,40],si=[0,1,1,1,0],ci=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],li=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],ui=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],di=8,fi=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],pi=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],mi=null,hi=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],gi=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],_i=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],vi=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],yi=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],bi=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],xi=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Si=[],Ci=[],wi=[],Ti=1,Ei=2,Di=[],Oi=[];kn(`UpsampleRgbLinePair`,Fn,3),kn(`UpsampleBgrLinePair`,In,3),kn(`UpsampleRgbaLinePair`,Vn,4),kn(`UpsampleBgraLinePair`,Bn,4),kn(`UpsampleArgbLinePair`,zn,4),kn(`UpsampleRgba4444LinePair`,Rn,2),kn(`UpsampleRgb565LinePair`,Ln,2);var ki=e.UpsampleRgbLinePair,Ai=e.UpsampleBgrLinePair,ji=e.UpsampleRgbaLinePair,Mi=e.UpsampleBgraLinePair,Ni=e.UpsampleArgbLinePair,Pi=e.UpsampleRgba4444LinePair,Fi=e.UpsampleRgb565LinePair,Ii=16,Li=1<<Ii-1,Ri=-227,zi=482,Bi=6,Vi=(256<<Bi)-1,Hi=0,Ui=a(256),Wi=a(256),Gi=a(256),Ki=a(256),qi=a(zi-Ri),Ji=a(zi-Ri);Hn(`YuvToRgbRow`,Fn,3),Hn(`YuvToBgrRow`,In,3),Hn(`YuvToRgbaRow`,Vn,4),Hn(`YuvToBgraRow`,Bn,4),Hn(`YuvToArgbRow`,zn,4),Hn(`YuvToRgba4444Row`,Rn,2),Hn(`YuvToRgb565Row`,Ln,2);var Yi=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Xi=[0,2,8],Zi=[8,7,6,4,4,2,2,2,1,1,1,1],Qi=1;this.WebPDecodeRGBA=function(e,n,s,l,u){var d=Jr,f=new mn,p=new ve;f.ba=p,p.S=d,p.width=[p.width],p.height=[p.height];var m=p.width,h=p.height,g=new ye;if(g==null||e==null)var _=2;else t(g!=null),_=Kn(e,n,s,g.width,g.height,g.Pd,g.Qd,g.format,null);if(_==0?(m!=null&&(m[0]=g.width[0]),h!=null&&(h[0]=g.height[0]),m=1):m=0,m){p.width=p.width[0],p.height=p.height[0],l!=null&&(l[0]=p.width),u!=null&&(u[0]=p.height);t:{if(l=new it,(u=new hn).data=e,u.w=n,u.ha=s,u.kd=1,n=[0],t(u!=null),((e=Kn(u.data,u.w,u.ha,null,null,null,n,null,u))==0||e==7)&&n[0]&&(e=4),(n=e)==0){if(t(f!=null),l.data=u.data,l.w=u.w+u.offset,l.ha=u.ha-u.offset,l.put=Te,l.ac=we,l.bc=Ee,l.ma=f,u.xa){if((e=Be())==null){f=1;break t}if(function(e,n){var r=[0],i=[0],a=[0];e:for(;;){if(e==null)return 0;if(n==null)return e.a=2,0;if(e.l=n,e.a=0,v(e.m,n.data,n.w,n.ha),!De(e.m,r,i,a)){e.a=3;break e}if(e.xb=Ei,n.width=r[0],n.height=i[0],!Ve(r[0],i[0],1,e,null))break e;return 1}return t(e.a!=0),0}(e,l)){if(l=(n=Yn(l.width,l.height,f.Oa,f.ba))==0){e:{l=e;r:for(;;){if(l==null){l=0;break e}if(t(l.s.yc!=null),t(l.s.Ya!=null),t(0<l.s.Wb),t((s=l.l)!=null),t((u=s.ma)!=null),l.xb!=0){if(l.ca=u.ba,l.tb=u.tb,t(l.ca!=null),!qn(u.Oa,s,Xr)){l.a=2;break r}if(!He(l,s.width)||s.da)break r;if((s.da||he(l.ca.S))&&On(),11>l.ca.S||(alert(`todo:WebPInitConvertARGBToYUV`),l.ca.f.kb.F!=null&&On()),l.Pb&&0<l.s.ua&&l.s.vb.X==null&&!P(l.s.vb,l.s.Wa.Xa)){l.a=1;break r}l.xb=0}if(!Re(l,l.V,l.Ba,l.c,l.i,s.o,Pe))break r;u.Dc=l.Ma,l=1;break e}t(l.a!=0),l=0}l=!l}l&&(n=e.a)}else n=e.a}else{if((e=new at)==null){f=1;break t}if(e.Fa=u.na,e.P=u.P,e.qc=u.Sa,ct(e,l)){if((n=Yn(l.width,l.height,f.Oa,f.ba))==0){if(e.Aa=0,s=f.Oa,t((u=e)!=null),s!=null){if(0<(m=0>(m=s.Md)?0:100<m?255:255*m/100)){for(h=g=0;4>h;++h)12>(_=u.pb[h]).lc&&(_.ia=m*Zi[0>_.lc?0:_.lc]>>3),g|=_.ia;g&&(alert(`todo:VP8InitRandom`),u.ia=1)}u.Ga=s.Id,100<u.Ga?u.Ga=100:0>u.Ga&&(u.Ga=0)}(function(e,n){if(e==null)return 0;if(n==null)return ot(e,2,`NULL VP8Io parameter in VP8Decode().`);if(!e.cb&&!ct(e,n))return 0;if(t(e.cb),n.ac==null||n.ac(n)){n.ob&&(e.L=0);var s=Xi[e.L];if(e.L==2?(e.yb=0,e.zb=0):(e.yb=n.v-s>>4,e.zb=n.j-s>>4,0>e.yb&&(e.yb=0),0>e.zb&&(e.zb=0)),e.Va=n.o+15+s>>4,e.Hb=n.va+15+s>>4,e.Hb>e.za&&(e.Hb=e.za),e.Va>e.Ub&&(e.Va=e.Ub),0<e.L){var l=e.ed;for(s=0;4>s;++s){var u;if(e.Qa.Cb){var d=e.Qa.Lb[s];e.Qa.Fb||(d+=l.Tb)}else d=l.Tb;for(u=0;1>=u;++u){var f=e.gd[s][u],p=d;if(l.Pc&&(p+=l.vd[0],u&&(p+=l.od[0])),0<(p=0>p?0:63<p?63:p)){var m=p;0<l.wb&&(m=4<l.wb?m>>2:m>>1)>9-l.wb&&(m=9-l.wb),1>m&&(m=1),f.dd=m,f.tc=2*p+m,f.ld=40<=p?2:+(15<=p)}else f.tc=0;f.La=u}}}s=0}else ot(e,6,`Frame setup failed`),s=e.a;if(s=s==0){if(s){e.$c=0,0<e.Aa||(e.Ic=Qi);e:{s=e.Ic,l=4*(m=e.za);var h=32*m,g=m+1,_=0<e.L?m*(0<e.Aa?2:1):0,v=(e.Aa==2?2:1)*m;if((f=l+832+(u=3*(16*s+Xi[e.L])/2*h)+(d=e.Fa!=null&&0<e.Fa.length?e.Kc.c*e.Kc.i:0))!=f)s=0;else{if(f>e.Vb){if(e.Vb=0,e.Ec=a(f),e.Fc=0,e.Ec==null){s=ot(e,1,`no memory during frame initialization.`);break e}e.Vb=f}f=e.Ec,p=e.Fc,e.Ac=f,e.Bc=p,p+=l,e.Gd=o(h,tt),e.Hd=0,e.rb=o(g+1,Ze),e.sb=1,e.wa=_?o(_,Xe):null,e.Y=0,e.D.Nb=0,e.D.wa=e.wa,e.D.Y=e.Y,0<e.Aa&&(e.D.Y+=m),t(!0),e.oc=f,e.pc=p,p+=832,e.ya=o(v,$e),e.aa=0,e.D.ya=e.ya,e.D.aa=e.aa,e.Aa==2&&(e.D.aa+=m),e.R=16*m,e.B=8*m,m=(h=Xi[e.L])*e.R,h=h/2*e.B,e.sa=f,e.ta=p+m,e.qa=e.sa,e.ra=e.ta+16*s*e.R+h,e.Ha=e.qa,e.Ia=e.ra+8*s*e.B+h,e.$c=0,p+=u,e.mb=d?f:null,e.nb=d?p:null,t(p+d<=e.Fc+e.Vb),ut(e),i(e.Ac,e.Bc,0,l),s=1}}if(s){if(n.ka=0,n.y=e.sa,n.O=e.ta,n.f=e.qa,n.N=e.ra,n.ea=e.Ha,n.Vd=e.Ia,n.fa=e.R,n.Rc=e.B,n.F=null,n.J=0,!Hr){for(s=-255;255>=s;++s)Rr[255+s]=0>s?-s:s;for(s=-1020;1020>=s;++s)zr[1020+s]=-128>s?-128:127<s?127:s;for(s=-112;112>=s;++s)Br[112+s]=-16>s?-16:15<s?15:s;for(s=-255;510>=s;++s)Vr[255+s]=0>s?0:255<s?255:s;Hr=1}gr=bt,_r=gt,yr=_t,br=vt,xr=yt,vr=ht,Sr=on,Cr=sn,wr=un,Tr=dn,Er=cn,Dr=ln,Or=fn,kr=pn,Ar=$t,jr=en,Mr=tn,Nr=nn,Ci[0]=Ft,Ci[1]=St,Ci[2]=Nt,Ci[3]=Pt,Ci[4]=It,Ci[5]=Rt,Ci[6]=Lt,Ci[7]=zt,Ci[8]=Vt,Ci[9]=Bt,Si[0]=Ot,Si[1]=wt,Si[2]=Tt,Si[3]=Et,Si[4]=kt,Si[5]=At,Si[6]=jt,wi[0]=Gt,wi[1]=Ct,wi[2]=Ht,wi[3]=Ut,wi[4]=qt,wi[5]=Kt,wi[6]=Jt,s=1}else s=0}s&&=function(e,n){for(e.M=0;e.M<e.Va;++e.M){var o,s=e.Jc[e.M&e.Xb],l=e.m,u=e;for(o=0;o<u.za;++o){var d=l,f=u,p=f.Ac,m=f.Bc+4*o,h=f.zc,g=f.ya[f.aa+o];if(f.Qa.Bb?g.$b=k(d,f.Pa.jb[0])?2+k(d,f.Pa.jb[2]):k(d,f.Pa.jb[1]):g.$b=0,f.kc&&(g.Ad=k(d,f.Bd)),g.Za=!k(d,145)+0,g.Za){var _=g.Ob,v=0;for(f=0;4>f;++f){var y,b=h[0+f];for(y=0;4>y;++y){b=yi[p[m+y]][b];for(var x=_i[k(d,b[0])];0<x;)x=_i[2*x+k(d,b[x])];b=-x,p[m+y]=b}r(_,v,p,m,4),v+=4,h[0+f]=b}}else b=k(d,156)?k(d,128)?1:3:k(d,163)?2:0,g.Ob[0]=b,i(p,m,b,4),i(h,0,b,4);g.Dd=k(d,142)?k(d,114)?k(d,183)?1:3:2:0}if(u.m.Ka)return ot(e,7,`Premature end-of-partition0 encountered.`);for(;e.ja<e.za;++e.ja){if(u=s,d=(l=e).rb[l.sb-1],p=l.rb[l.sb+l.ja],o=l.ya[l.aa+l.ja],m=l.kc?o.Ad:0)d.la=p.la=0,o.Za||(d.Na=p.Na=0),o.Hc=0,o.Gc=0,o.ia=0;else{var S,C;if(d=p,p=u,m=l.Pa.Xc,h=l.ya[l.aa+l.ja],g=l.pb[h.$b],f=h.ad,_=0,v=l.rb[l.sb-1],b=y=0,i(f,_,0,384),h.Za)var w=0,T=m[3];else{x=a(16);var E=d.Na+v.Na;if(E=mi(p,m[1],E,g.Eb,0,x,0),d.Na=v.Na=(0<E)+0,1<E)gr(x,0,f,_);else{var D=x[0]+3>>3;for(x=0;256>x;x+=16)f[_+x]=D}w=1,T=m[0]}var O=15&d.la,A=15&v.la;for(x=0;4>x;++x){var j=1&A;for(D=C=0;4>D;++D)O=O>>1|(j=(E=mi(p,T,E=j+(1&O),g.Sc,w,f,_))>w)<<7,C=C<<2|(3<E?3:1<E?2:f[_+0]!=0),_+=16;O>>=4,A=A>>1|j<<7,y=(y<<8|C)>>>0}for(T=O,w=A>>4,S=0;4>S;S+=2){for(C=0,O=d.la>>4+S,A=v.la>>4+S,x=0;2>x;++x){for(j=1&A,D=0;2>D;++D)E=j+(1&O),O=O>>1|(j=0<(E=mi(p,m[2],E,g.Qc,0,f,_)))<<3,C=C<<2|(3<E?3:1<E?2:f[_+0]!=0),_+=16;O>>=2,A=A>>1|j<<5}b|=C<<4*S,T|=O<<4<<S,w|=(240&A)<<S}d.la=T,v.la=w,h.Hc=y,h.Gc=b,h.ia=43690&b?0:g.ia,m=!(y|b)}if(0<l.L&&(l.wa[l.Y+l.ja]=l.gd[o.$b][o.Za],l.wa[l.Y+l.ja].La|=!m),u.Ka)return ot(e,7,`Premature end-of-file encountered.`)}if(ut(e),l=n,u=1,o=(s=e).D,d=0<s.L&&s.M>=s.zb&&s.M<=s.Va,s.Aa==0)e:{if(o.M=s.M,o.uc=d,Gn(s,o),u=1,o=(C=s.D).Nb,d=(b=Xi[s.L])*s.R,p=b/2*s.B,x=16*o*s.R,D=8*o*s.B,m=s.sa,h=s.ta-d+x,g=s.qa,f=s.ra-p+D,_=s.Ha,v=s.Ia-p+D,A=(O=C.M)==0,y=O>=s.Va-1,s.Aa==2&&Gn(s,C),C.uc)for(j=(E=s).D.M,t(E.D.uc),C=E.yb;C<E.Hb;++C){w=C,T=j;var M=(N=(V=E).D).Nb;S=V.R;var N=N.wa[N.Y+w],P=V.sa,F=V.ta+16*M*S+16*w,I=N.dd,L=N.tc;if(L!=0){if(t(3<=L),V.L==1)0<w&&jr(P,F,S,L+4),N.La&&Nr(P,F,S,L),0<T&&Ar(P,F,S,L+4),N.La&&Mr(P,F,S,L);else{var R=V.B,ee=V.qa,z=V.ra+8*M*R+8*w,B=V.Ha,V=V.Ia+8*M*R+8*w;M=N.ld,0<w&&(Cr(P,F,S,L+4,I,M),Tr(ee,z,B,V,R,L+4,I,M)),N.La&&(Dr(P,F,S,L,I,M),kr(ee,z,B,V,R,L,I,M)),0<T&&(Sr(P,F,S,L+4,I,M),wr(ee,z,B,V,R,L+4,I,M)),N.La&&(Er(P,F,S,L,I,M),Or(ee,z,B,V,R,L,I,M))}}}if(s.ia&&alert(`todo:DitherRow`),l.put!=null){if(C=16*O,O=16*(O+1),A?(l.y=s.sa,l.O=s.ta+x,l.f=s.qa,l.N=s.ra+D,l.ea=s.Ha,l.W=s.Ia+D):(C-=b,l.y=m,l.O=h,l.f=g,l.N=f,l.ea=_,l.W=v),y||(O-=b),O>l.o&&(O=l.o),l.F=null,l.J=null,s.Fa!=null&&0<s.Fa.length&&C<O&&(l.J=Cn(s,l,C,O-C),l.F=s.mb,l.F==null&&l.F.length==0)){u=ot(s,3,`Could not decode alpha data.`);break e}C<l.j&&(b=l.j-C,C=l.j,t(!(1&b)),l.O+=s.R*b,l.N+=s.B*(b>>1),l.W+=s.B*(b>>1),l.F!=null&&(l.J+=l.width*b)),C<O&&(l.O+=l.v,l.N+=l.v>>1,l.W+=l.v>>1,l.F!=null&&(l.J+=l.v),l.ka=C-l.j,l.U=l.va-l.v,l.T=O-C,u=l.put(l))}o+1!=s.Ic||y||(r(s.sa,s.ta-d,m,h+16*s.R,d),r(s.qa,s.ra-p,g,f+8*s.B,p),r(s.Ha,s.Ia-p,_,v+8*s.B,p))}if(!u)return ot(e,6,`Output aborted.`)}return 1}(e,n),n.bc!=null&&n.bc(n),s&=1}return s?(e.cb=0,s):0})(e,l)||(n=e.a)}}else n=e.a}n==0&&f.Oa!=null&&f.Oa.fd&&(n=Jn(f.ba))}f=n}d=f==0?11>d?p.f.RGBA.eb:p.f.kb.y:null}else d=null;return d};var $i=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function u(e,t){for(var n=``,r=0;r<4;r++)n+=String.fromCharCode(e[t++]);return n}function d(e,t){return e[t+0]|e[t+1]<<8}function f(e,t){return(e[t+0]|e[t+1]<<8|e[t+2]<<16)>>>0}function p(e,t){return(e[t+0]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}new l;var m=[0],h=[0],g=[],_=new l,v=e,y=function(e,t){var n={},r=0,i=!1,a=0,o=0;if(n.frames=[],!function(e,t){for(var n=0;n<4;n++)if(e[t+n]!=`RIFF`.charCodeAt(n))return!0;return!1}(e,t)){for(p(e,t+=4),t+=8;t<e.length;){var s=u(e,t),l=p(e,t+=4);t+=4;var m=l+(1&l);switch(s){case`VP8 `:case`VP8L`:n.frames[r]===void 0&&(n.frames[r]={}),(_=n.frames[r]).src_off=i?o:t-8,_.src_size=a+l+8,r++,i&&(i=!1,a=0,o=0);break;case`VP8X`:(_=n.header={}).feature_flags=e[t];var h=t+4;_.canvas_width=1+f(e,h),h+=3,_.canvas_height=1+f(e,h),h+=3;break;case`ALPH`:i=!0,a=m+8,o=t-8;break;case`ANIM`:(_=n.header).bgcolor=p(e,t),h=t+4,_.loop_count=d(e,h),h+=2;break;case`ANMF`:var g,_;(_=n.frames[r]={}).offset_x=2*f(e,t),t+=3,_.offset_y=2*f(e,t),t+=3,_.width=1+f(e,t),t+=3,_.height=1+f(e,t),t+=3,_.duration=f(e,t),t+=3,g=e[t++],_.dispose=1&g,_.blend=g>>1&1}s!=`ANMF`&&(t+=m)}return n}}(v,0);y.response=v,y.rgbaoutput=!0,y.dataurl=!1;var b=y.header?y.header:null,x=y.frames?y.frames:null;if(b){b.loop_counter=b.loop_count,m=[b.canvas_height],h=[b.canvas_width];for(var S=0;S<x.length&&x[S].blend!=0;S++);}var C=x[0],w=_.WebPDecodeRGBA(v,C.src_off,C.src_size,h,m);C.rgba=w,C.imgwidth=h[0],C.imgheight=m[0];for(var T=0;T<h[0]*m[0]*4;T++)g[T]=w[T];return this.width=h,this.height=m,this.data=g,this}function J2t(){var e,t=this.internal.__metadata__.metadata,n=unescape(encodeURIComponent(t));e=this.internal.__metadata__.rawXml?n:`<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="`+this.internal.__metadata__.namespaceUri+`"><jspdf:metadata>`+n.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)+`</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>`,this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write(`<< /Type /Metadata /Subtype /XML /Length `+e.length+` >>`),this.internal.write(`stream`),this.internal.write(e),this.internal.write(`endstream`),this.internal.write(`endobj`)}function Y2t(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write(`/Metadata `+this.internal.__metadata__.metadataObjectNumber+` 0 R`)}(function(e){var t,n,r,i,a,o,s,l,u,d=function(e){return e||={},this.isStrokeTransparent=e.isStrokeTransparent||!1,this.strokeOpacity=e.strokeOpacity||1,this.strokeStyle=e.strokeStyle||`#000000`,this.fillStyle=e.fillStyle||`#000000`,this.isFillTransparent=e.isFillTransparent||!1,this.fillOpacity=e.fillOpacity||1,this.font=e.font||`10px sans-serif`,this.textBaseline=e.textBaseline||`alphabetic`,this.textAlign=e.textAlign||`left`,this.lineWidth=e.lineWidth||1,this.lineJoin=e.lineJoin||`miter`,this.lineCap=e.lineCap||`butt`,this.path=e.path||[],this.transform=e.transform===void 0?new l:e.transform.clone(),this.globalCompositeOperation=e.globalCompositeOperation||`normal`,this.globalAlpha=e.globalAlpha||1,this.clip_path=e.clip_path||[],this.currentPoint=e.currentPoint||new o,this.miterLimit=e.miterLimit||10,this.lastPoint=e.lastPoint||new o,this.lineDashOffset=e.lineDashOffset||0,this.lineDash=e.lineDash||[],this.margin=e.margin||[0,0,0,0],this.prevPageLastElemOffset=e.prevPageLastElemOffset||0,this.ignoreClearRect=typeof e.ignoreClearRect!=`boolean`||e.ignoreClearRect,this};e.events.push([`initialized`,function(){this.context2d=new f(this),t=this.internal.f2,n=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,o=this.internal.Point,s=this.internal.Rectangle,l=this.internal.Matrix,u=new d}]);var f=function(e){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var t=e;Object.defineProperty(this,"pdf",{get:function(){return t}});var n=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return n},set:function(e){n=!!e}});var r=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return r},set:function(e){r=!!e}});var i=0;Object.defineProperty(this,"posX",{get:function(){return i},set:function(e){isNaN(e)||(i=e)}});var a=0;Object.defineProperty(this,"posY",{get:function(){return a},set:function(e){isNaN(e)||(a=e)}}),Object.defineProperty(this,"margin",{get:function(){return u.margin},set:function(e){var t;typeof e==`number`?t=[e,e,e,e]:((t=[,,,,])[0]=e[0],t[1]=e.length>=2?e[1]:t[0],t[2]=e.length>=3?e[2]:t[0],t[3]=e.length>=4?e[3]:t[1]),u.margin=t}});var o=!1;Object.defineProperty(this,"autoPaging",{get:function(){return o},set:function(e){o=e}});var s=0;Object.defineProperty(this,"lastBreak",{get:function(){return s},set:function(e){s=e}});var l=[];Object.defineProperty(this,"pageBreaks",{get:function(){return l},set:function(e){l=e}}),Object.defineProperty(this,"ctx",{get:function(){return u},set:function(e){e instanceof d&&(u=e)}}),Object.defineProperty(this,"path",{get:function(){return u.path},set:function(e){u.path=e}});var f=[];Object.defineProperty(this,"ctxStack",{get:function(){return f},set:function(e){f=e}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(e){var t=p(e);this.ctx.fillStyle=t.style,this.ctx.isFillTransparent=t.a===0,this.ctx.fillOpacity=t.a,this.pdf.setFillColor(t.r,t.g,t.b,{a:t.a}),this.pdf.setTextColor(t.r,t.g,t.b,{a:t.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(e){var t=p(e);this.ctx.strokeStyle=t.style,this.ctx.isStrokeTransparent=t.a===0,this.ctx.strokeOpacity=t.a,t.a===0?this.pdf.setDrawColor(255,255,255):(t.a,this.pdf.setDrawColor(t.r,t.g,t.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(e){[`butt`,`round`,`square`].indexOf(e)!==-1&&(this.ctx.lineCap=e,this.pdf.setLineCap(e))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(e){isNaN(e)||(this.ctx.lineWidth=e,this.pdf.setLineWidth(e))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(e){[`bevel`,`round`,`miter`].indexOf(e)!==-1&&(this.ctx.lineJoin=e,this.pdf.setLineJoin(e))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(e){isNaN(e)||(this.ctx.miterLimit=e,this.pdf.setMiterLimit(e))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(e){this.ctx.textBaseline=e}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(e){[`right`,`end`,`center`,`left`,`start`].indexOf(e)!==-1&&(this.ctx.textAlign=e)}});var m=null,h=null,g=null;Object.defineProperty(this,"fontFaces",{get:function(){return g},set:function(e){m=null,h=null,g=e}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(e){var t;if(this.ctx.font=e,(t=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(e))!==null){var n=t[1];t[2];var r=t[3],i=t[4];t[5];var a=t[6],o=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(i)[2];i=Math.floor(o===`px`?parseFloat(i)*this.pdf.internal.scaleFactor:o===`em`?parseFloat(i)*this.pdf.getFontSize():parseFloat(i)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(i);var s=function(e){var t,n,r=[],i=e.trim();if(i===``)return M2t;if(i in w2t)return[w2t[i]];for(;i!==``;){switch(n=null,t=(i=E2t(i)).charAt(0)){case`"`:case`'`:n=D2t(i.substring(1),t);break;default:n=O2t(i)}if(n===null||(r.push(n[0]),(i=E2t(n[1]))!==``&&i.charAt(0)!==`,`))return M2t;i=i.replace(/^,/,``)}return r}(a);if(this.fontFaces){var l=function(e,t,n){for(var r=(n||={}).defaultFontFamily||`times`,i=Object.assign({},C2t,n.genericFontFamilies||{}),a=null,o=null,s=0;s<t.length;++s)if(i[(a=x2t(t[s])).family]&&(a.family=i[a.family]),e.hasOwnProperty(a.family)){o=e[a.family];break}if(!(o||=e[r]))throw Error(`Could not find a font-family for the rule '`+T2t(a)+`' and default family '`+r+`'.`);if(o=function(e,t){if(t[e])return t[e];var n=v2t[e],r=S2t(t,_2t,n,n<=v2t.normal?-1:1);if(!r)throw Error(`Could not find a matching font-stretch value for `+e);return r}(a.stretch,o),o=function(e,t){if(t[e])return t[e];for(var n=g2t[e],r=0;r<n.length;++r)if(t[n[r]])return t[n[r]];throw Error(`Could not find a matching font-style for `+e)}(a.style,o),!(o=function(e,t){if(t[e])return t[e];if(e===400&&t[500])return t[500];if(e===500&&t[400])return t[400];var n=b2t[e],r=S2t(t,y2t,n,e<400?-1:1);if(!r)throw Error(`Could not find a matching font-weight for value `+e);return r}(a.weight,o)))throw Error(`Failed to resolve a font for the rule '`+T2t(a)+`'.`);return o}(function(e,t){var n=e.getFontList(),r=JSON.stringify(n);return(m===null||h!==r)&&(m=function(e){for(var t={},n=0;n<e.length;++n){var r=x2t(e[n]),i=r.family,a=r.stretch,o=r.style,s=r.weight;t[i]=t[i]||{},t[i][a]=t[i][a]||{},t[i][a][o]=t[i][a][o]||{},t[i][a][o][s]=r}return t}(function(e){var t=[];return Object.keys(e).forEach(function(n){e[n].forEach(function(e){var r=null;switch(e){case`bold`:r={family:n,weight:`bold`};break;case`italic`:r={family:n,style:`italic`};break;case`bolditalic`:r={family:n,weight:`bold`,style:`italic`};break;case``:case`normal`:r={family:n}}r!==null&&(r.ref={name:n,style:e},t.push(r))})}),t}(n).concat(t)),h=r),m}(this.pdf,this.fontFaces),s.map(function(e){return{family:e,stretch:`normal`,weight:r,style:n}}));this.pdf.setFont(l.ref.name,l.ref.style)}else{var u=``;(r===`bold`||parseInt(r,10)>=700||n===`bold`)&&(u=`bold`),n===`italic`&&(u+=`italic`),u.length===0&&(u=`normal`);for(var d=``,f={arial:`Helvetica`,Arial:`Helvetica`,verdana:`Helvetica`,Verdana:`Helvetica`,helvetica:`Helvetica`,Helvetica:`Helvetica`,"sans-serif":`Helvetica`,fixed:`Courier`,monospace:`Courier`,terminal:`Courier`,cursive:`Times`,fantasy:`Times`,serif:`Times`},p=0;p<s.length;p++){if(this.pdf.internal.getFont(s[p],u,{noFallback:!0,disableWarning:!0})!==void 0){d=s[p];break}if(u===`bolditalic`&&this.pdf.internal.getFont(s[p],`bold`,{noFallback:!0,disableWarning:!0})!==void 0)d=s[p],u=`bold`;else if(this.pdf.internal.getFont(s[p],`normal`,{noFallback:!0,disableWarning:!0})!==void 0){d=s[p],u=`normal`;break}}if(d===``){for(var g=0;g<s.length;g++)if(f[s[g]]){d=f[s[g]];break}}d=d===``?`Times`:d,this.pdf.setFont(d,u)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(e){this.ctx.globalCompositeOperation=e}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(e){this.ctx.globalAlpha=e}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(e){this.ctx.lineDashOffset=e,R.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(e){this.ctx.lineDash=e,R.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(e){this.ctx.ignoreClearRect=!!e}})};f.prototype.setLineDash=function(e){this.lineDash=e},f.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},f.prototype.fill=function(){x.call(this,`fill`,!1)},f.prototype.stroke=function(){x.call(this,`stroke`,!1)},f.prototype.beginPath=function(){this.path=[{type:`begin`}]},f.prototype.moveTo=function(e,t){if(isNaN(e)||isNaN(t))throw q7.error(`jsPDF.context2d.moveTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.moveTo`);var n=this.ctx.transform.applyToPoint(new o(e,t));this.path.push({type:`mt`,x:n.x,y:n.y}),this.ctx.lastPoint=new o(e,t)},f.prototype.closePath=function(){var e=new o(0,0),t=0;for(t=this.path.length-1;t!==-1;t--)if(this.path[t].type===`begin`&&L6(this.path[t+1])===`object`&&typeof this.path[t+1].x==`number`){e=new o(this.path[t+1].x,this.path[t+1].y);break}this.path.push({type:`close`}),this.ctx.lastPoint=new o(e.x,e.y)},f.prototype.lineTo=function(e,t){if(isNaN(e)||isNaN(t))throw q7.error(`jsPDF.context2d.lineTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.lineTo`);var n=this.ctx.transform.applyToPoint(new o(e,t));this.path.push({type:`lt`,x:n.x,y:n.y}),this.ctx.lastPoint=new o(n.x,n.y)},f.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),x.call(this,null,!0)},f.prototype.quadraticCurveTo=function(e,t,n,r){if(isNaN(n)||isNaN(r)||isNaN(e)||isNaN(t))throw q7.error(`jsPDF.context2d.quadraticCurveTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.quadraticCurveTo`);var i=this.ctx.transform.applyToPoint(new o(n,r)),a=this.ctx.transform.applyToPoint(new o(e,t));this.path.push({type:`qct`,x1:a.x,y1:a.y,x:i.x,y:i.y}),this.ctx.lastPoint=new o(i.x,i.y)},f.prototype.bezierCurveTo=function(e,t,n,r,i,a){if(isNaN(i)||isNaN(a)||isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw q7.error(`jsPDF.context2d.bezierCurveTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.bezierCurveTo`);var s=this.ctx.transform.applyToPoint(new o(i,a)),l=this.ctx.transform.applyToPoint(new o(e,t)),u=this.ctx.transform.applyToPoint(new o(n,r));this.path.push({type:`bct`,x1:l.x,y1:l.y,x2:u.x,y2:u.y,x:s.x,y:s.y}),this.ctx.lastPoint=new o(s.x,s.y)},f.prototype.arc=function(e,t,n,r,i,a){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i))throw q7.error(`jsPDF.context2d.arc: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.arc`);if(a=!!a,!this.ctx.transform.isIdentity){var s=this.ctx.transform.applyToPoint(new o(e,t));e=s.x,t=s.y;var l=this.ctx.transform.applyToPoint(new o(0,n)),u=this.ctx.transform.applyToPoint(new o(0,0));n=Math.sqrt((l.x-u.x)**2+(l.y-u.y)**2)}Math.abs(i-r)>=2*Math.PI&&(r=0,i=2*Math.PI),this.path.push({type:`arc`,x:e,y:t,radius:n,startAngle:r,endAngle:i,counterclockwise:a})},f.prototype.arcTo=function(e,t,n,r,i){throw Error(`arcTo not implemented.`)},f.prototype.rect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw q7.error(`jsPDF.context2d.rect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.rect`);this.moveTo(e,t),this.lineTo(e+n,t),this.lineTo(e+n,t+r),this.lineTo(e,t+r),this.lineTo(e,t),this.lineTo(e+n,t),this.lineTo(e,t)},f.prototype.fillRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw q7.error(`jsPDF.context2d.fillRect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.fillRect`);if(!m.call(this)){var i={};this.lineCap!==`butt`&&(i.lineCap=this.lineCap,this.lineCap=`butt`),this.lineJoin!==`miter`&&(i.lineJoin=this.lineJoin,this.lineJoin=`miter`),this.beginPath(),this.rect(e,t,n,r),this.fill(),i.hasOwnProperty(`lineCap`)&&(this.lineCap=i.lineCap),i.hasOwnProperty(`lineJoin`)&&(this.lineJoin=i.lineJoin)}},f.prototype.strokeRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw q7.error(`jsPDF.context2d.strokeRect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.strokeRect`);h.call(this)||(this.beginPath(),this.rect(e,t,n,r),this.stroke())},f.prototype.clearRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw q7.error(`jsPDF.context2d.clearRect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.clearRect`);this.ignoreClearRect||(this.fillStyle=`#ffffff`,this.fillRect(e,t,n,r))},f.prototype.save=function(e){e=typeof e!=`boolean`||e;for(var t=this.pdf.internal.getCurrentPageInfo().pageNumber,n=0;n<this.pdf.internal.getNumberOfPages();n++)this.pdf.setPage(n+1),this.pdf.internal.out(`q`);if(this.pdf.setPage(t),e){this.ctx.fontSize=this.pdf.internal.getFontSize();var r=new d(this.ctx);this.ctxStack.push(this.ctx),this.ctx=r}},f.prototype.restore=function(e){e=typeof e!=`boolean`||e;for(var t=this.pdf.internal.getCurrentPageInfo().pageNumber,n=0;n<this.pdf.internal.getNumberOfPages();n++)this.pdf.setPage(n+1),this.pdf.internal.out(`Q`);this.pdf.setPage(t),e&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},f.prototype.toDataURL=function(){throw Error(`toDataUrl not implemented.`)};var p=function(e){var t,n,r,i;if(!0===e.isCanvasGradient&&(e=e.getColor()),!e)return{r:0,g:0,b:0,a:0,style:e};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(e))t=0,n=0,r=0,i=0;else{var a=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(e);if(a!==null)t=parseInt(a[1]),n=parseInt(a[2]),r=parseInt(a[3]),i=1;else if((a=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(e))!==null)t=parseInt(a[1]),n=parseInt(a[2]),r=parseInt(a[3]),i=parseFloat(a[4]);else{if(i=1,typeof e==`string`&&e.charAt(0)!==`#`){var o=new z0t(e);e=o.ok?o.toHex():`#000000`}e.length===4?(t=e.substring(1,2),t+=t,n=e.substring(2,3),n+=n,r=e.substring(3,4),r+=r):(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7)),t=parseInt(t,16),n=parseInt(n,16),r=parseInt(r,16)}}return{r:t,g:n,b:r,a:i,style:e}},m=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},h=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};f.prototype.fillText=function(e,t,n,r){if(isNaN(t)||isNaN(n)||typeof e!=`string`)throw q7.error(`jsPDF.context2d.fillText: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.fillText`);if(r=isNaN(r)?void 0:r,!m.call(this)){var i=F(this.ctx.transform.rotation),a=this.ctx.transform.scaleX;k.call(this,{text:e,x:t,y:n,scale:a,angle:i,align:this.textAlign,maxWidth:r})}},f.prototype.strokeText=function(e,t,n,r){if(isNaN(t)||isNaN(n)||typeof e!=`string`)throw q7.error(`jsPDF.context2d.strokeText: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.strokeText`);if(!h.call(this)){r=isNaN(r)?void 0:r;var i=F(this.ctx.transform.rotation),a=this.ctx.transform.scaleX;k.call(this,{text:e,x:t,y:n,scale:a,renderingMode:`stroke`,angle:i,align:this.textAlign,maxWidth:r})}},f.prototype.measureText=function(e){if(typeof e!=`string`)throw q7.error(`jsPDF.context2d.measureText: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.measureText`);var t=this.pdf,n=this.pdf.internal.scaleFactor,r=t.internal.getFontSize(),i=t.getStringUnitWidth(e)*r/t.internal.scaleFactor;return new function(e){var t=(e||={}).width||0;return Object.defineProperty(this,"width",{get:function(){return t}}),this}({width:i*=Math.round(96*n/72*1e4)/1e4})},f.prototype.scale=function(e,t){if(isNaN(e)||isNaN(t))throw q7.error(`jsPDF.context2d.scale: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.scale`);var n=new l(e,0,0,t,0,0);this.ctx.transform=this.ctx.transform.multiply(n)},f.prototype.rotate=function(e){if(isNaN(e))throw q7.error(`jsPDF.context2d.rotate: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.rotate`);var t=new l(Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0);this.ctx.transform=this.ctx.transform.multiply(t)},f.prototype.translate=function(e,t){if(isNaN(e)||isNaN(t))throw q7.error(`jsPDF.context2d.translate: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.translate`);var n=new l(1,0,0,1,e,t);this.ctx.transform=this.ctx.transform.multiply(n)},f.prototype.transform=function(e,t,n,r,i,a){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(a))throw q7.error(`jsPDF.context2d.transform: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.transform`);var o=new l(e,t,n,r,i,a);this.ctx.transform=this.ctx.transform.multiply(o)},f.prototype.setTransform=function(e,t,n,r,i,a){e=isNaN(e)?1:e,t=isNaN(t)?0:t,n=isNaN(n)?0:n,r=isNaN(r)?1:r,i=isNaN(i)?0:i,a=isNaN(a)?0:a,this.ctx.transform=new l(e,t,n,r,i,a)};var g=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};f.prototype.drawImage=function(e,t,n,r,i,a,o,u,d){var f=this.pdf.getImageProperties(e),p=1,m=1,h=1,v=1;r!==void 0&&u!==void 0&&(h=u/r,v=d/i,p=f.width/r*u/r,m=f.height/i*d/i),a===void 0&&(a=t,o=n,t=0,n=0),r!==void 0&&u===void 0&&(u=r,d=i),r===void 0&&u===void 0&&(u=f.width,d=f.height);var x=this.ctx.transform.decompose(),C=F(x.rotate.shx),w=new l,T=(w=(w=(w=w.multiply(x.translate)).multiply(x.skew)).multiply(x.scale)).applyToRectangle(new s(a-t*h,o-n*v,r*p,i*m));if(this.autoPaging){for(var E,D=_.call(this,T),O=[],k=0;k<D.length;k+=1)O.indexOf(D[k])===-1&&O.push(D[k]);b(O);for(var A=O[0],j=O[O.length-1],M=A;M<j+1;M++){this.pdf.setPage(M);var N=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],P=M===1?this.posY+this.margin[0]:this.margin[0],I=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],L=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],R=M===1?0:I+(M-2)*L;if(this.ctx.clip_path.length!==0){var ee=this.path;E=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(E,this.posX+this.margin[3],-R+P+this.ctx.prevPageLastElemOffset),S.call(this,`fill`,!0),this.path=ee}var z=JSON.parse(JSON.stringify(T));z=y([z],this.posX+this.margin[3],-R+P+this.ctx.prevPageLastElemOffset)[0];var B=(M>A||M<j)&&g.call(this);B&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],N,L,null).clip().discardPath()),this.pdf.addImage(e,`JPEG`,z.x,z.y,z.w,z.h,null,null,C),B&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(e,`JPEG`,T.x,T.y,T.w,T.h,null,null,C)};var _=function(e,t,n){var r=[];t||=this.pdf.internal.pageSize.width,n||=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var i=this.posY+this.ctx.prevPageLastElemOffset;switch(e.type){default:case`mt`:case`lt`:r.push(Math.floor((e.y+i)/n)+1);break;case`arc`:r.push(Math.floor((e.y+i-e.radius)/n)+1),r.push(Math.floor((e.y+i+e.radius)/n)+1);break;case`qct`:var a=I(this.ctx.lastPoint.x,this.ctx.lastPoint.y,e.x1,e.y1,e.x,e.y);r.push(Math.floor((a.y+i)/n)+1),r.push(Math.floor((a.y+a.h+i)/n)+1);break;case`bct`:var o=L(this.ctx.lastPoint.x,this.ctx.lastPoint.y,e.x1,e.y1,e.x2,e.y2,e.x,e.y);r.push(Math.floor((o.y+i)/n)+1),r.push(Math.floor((o.y+o.h+i)/n)+1);break;case`rect`:r.push(Math.floor((e.y+i)/n)+1),r.push(Math.floor((e.y+e.h+i)/n)+1)}for(var s=0;s<r.length;s+=1)for(;this.pdf.internal.getNumberOfPages()<r[s];)v.call(this);return r},v=function(){var e=this.fillStyle,t=this.strokeStyle,n=this.font,r=this.lineCap,i=this.lineWidth,a=this.lineJoin;this.pdf.addPage(),this.fillStyle=e,this.strokeStyle=t,this.font=n,this.lineCap=r,this.lineWidth=i,this.lineJoin=a},y=function(e,t,n){for(var r=0;r<e.length;r++)switch(e[r].type){case`bct`:e[r].x2+=t,e[r].y2+=n;case`qct`:e[r].x1+=t,e[r].y1+=n;default:e[r].x+=t,e[r].y+=n}return e},b=function(e){return e.sort(function(e,t){return e-t})},x=function(e,t){var n=this.fillStyle,r=this.strokeStyle,i=this.lineCap,a=this.lineWidth,o=Math.abs(a*this.ctx.transform.scaleX),s=this.lineJoin;if(this.autoPaging){for(var l,u,d=JSON.parse(JSON.stringify(this.path)),f=JSON.parse(JSON.stringify(this.path)),p=[],m=0;m<f.length;m++)if(f[m].x!==void 0)for(var h=_.call(this,f[m]),x=0;x<h.length;x+=1)p.indexOf(h[x])===-1&&p.push(h[x]);for(var C=0;C<p.length;C++)for(;this.pdf.internal.getNumberOfPages()<p[C];)v.call(this);b(p);for(var w=p[0],T=p[p.length-1],E=w;E<T+1;E++){this.pdf.setPage(E),this.fillStyle=n,this.strokeStyle=r,this.lineCap=i,this.lineWidth=o,this.lineJoin=s;var D=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],O=E===1?this.posY+this.margin[0]:this.margin[0],k=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],A=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],j=E===1?0:k+(E-2)*A;if(this.ctx.clip_path.length!==0){var M=this.path;l=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(l,this.posX+this.margin[3],-j+O+this.ctx.prevPageLastElemOffset),S.call(this,e,!0),this.path=M}if(u=JSON.parse(JSON.stringify(d)),this.path=y(u,this.posX+this.margin[3],-j+O+this.ctx.prevPageLastElemOffset),!1===t||E===0){var N=(E>w||E<T)&&g.call(this);N&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],D,A,null).clip().discardPath()),S.call(this,e,t),N&&this.pdf.restoreGraphicsState()}this.lineWidth=a}this.path=d}else this.lineWidth=o,S.call(this,e,t),this.lineWidth=a},S=function(e,t){if((e!==`stroke`||t||!h.call(this))&&(e===`stroke`||t||!m.call(this))){for(var n,r,i=[],a=this.path,o=0;o<a.length;o++){var s=a[o];switch(s.type){case`begin`:i.push({begin:!0});break;case`close`:i.push({close:!0});break;case`mt`:i.push({start:s,deltas:[],abs:[]});break;case`lt`:var l=i.length;if(a[o-1]&&!isNaN(a[o-1].x)&&(n=[s.x-a[o-1].x,s.y-a[o-1].y],l>0)){for(;l>=0;l--)if(!0!==i[l-1].close&&!0!==i[l-1].begin){i[l-1].deltas.push(n),i[l-1].abs.push(s);break}}break;case`bct`:n=[s.x1-a[o-1].x,s.y1-a[o-1].y,s.x2-a[o-1].x,s.y2-a[o-1].y,s.x-a[o-1].x,s.y-a[o-1].y],i[i.length-1].deltas.push(n);break;case`qct`:var u=a[o-1].x+2/3*(s.x1-a[o-1].x),d=a[o-1].y+2/3*(s.y1-a[o-1].y),f=s.x+2/3*(s.x1-s.x),p=s.y+2/3*(s.y1-s.y),g=s.x,_=s.y;n=[u-a[o-1].x,d-a[o-1].y,f-a[o-1].x,p-a[o-1].y,g-a[o-1].x,_-a[o-1].y],i[i.length-1].deltas.push(n);break;case`arc`:i.push({deltas:[],abs:[],arc:!0}),Array.isArray(i[i.length-1].abs)&&i[i.length-1].abs.push(s)}}r=t?null:e===`stroke`?`stroke`:`fill`;for(var v=!1,y=0;y<i.length;y++)if(i[y].arc)for(var b=i[y].abs,x=0;x<b.length;x++){var S=b[x];S.type===`arc`?T.call(this,S.x,S.y,S.radius,S.startAngle,S.endAngle,S.counterclockwise,void 0,t,!v):A.call(this,S.x,S.y),v=!0}else if(!0===i[y].close)this.pdf.internal.out(`h`),v=!1;else if(!0!==i[y].begin){var C=i[y].start.x,w=i[y].start.y;j.call(this,i[y].deltas,C,w),v=!0}r&&E.call(this,r),t&&D.call(this)}},C=function(e){var t=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,n=t*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case`bottom`:return e-n;case`top`:return e+t-n;case`hanging`:return e+t-2*n;case`middle`:return e+t/2-n;default:return e}},w=function(e){return e+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};f.prototype.createLinearGradient=function(){var e=function(){};return e.colorStops=[],e.addColorStop=function(e,t){this.colorStops.push([e,t])},e.getColor=function(){return this.colorStops.length===0?`#000000`:this.colorStops[0][1]},e.isCanvasGradient=!0,e},f.prototype.createPattern=function(){return this.createLinearGradient()},f.prototype.createRadialGradient=function(){return this.createLinearGradient()};var T=function(e,t,n,r,i,a,o,s,l){for(var u=N.call(this,n,r,i,a),d=0;d<u.length;d++){var f=u[d];d===0&&(l?O.call(this,f.x1+e,f.y1+t):A.call(this,f.x1+e,f.y1+t)),M.call(this,e,t,f.x2,f.y2,f.x3,f.y3,f.x4,f.y4)}s?D.call(this):E.call(this,o)},E=function(e){switch(e){case`stroke`:this.pdf.internal.out(`S`);break;case`fill`:this.pdf.internal.out(`f`)}},D=function(){this.pdf.clip(),this.pdf.discardPath()},O=function(e,t){this.pdf.internal.out(n(e)+` `+r(t)+` m`)},k=function(e){var t;switch(e.align){case`right`:case`end`:t=`right`;break;case`center`:t=`center`;break;default:t=`left`}var n,r,i,a=this.pdf.getTextDimensions(e.text),u=C.call(this,e.y),d=w.call(this,u)-a.h,f=this.ctx.transform.applyToPoint(new o(e.x,u));if(this.autoPaging){var p=this.ctx.transform.decompose(),m=new l;m=(m=(m=m.multiply(p.translate)).multiply(p.skew)).multiply(p.scale);for(var h=this.ctx.transform.applyToRectangle(new s(e.x,u,a.w,a.h)),v=m.applyToRectangle(new s(e.x,d,a.w,a.h)),x=_.call(this,v),T=[],E=0;E<x.length;E+=1)T.indexOf(x[E])===-1&&T.push(x[E]);b(T);for(var D=T[0],O=T[T.length-1],k=D;k<O+1;k++){this.pdf.setPage(k);var A=k===1?this.posY+this.margin[0]:this.margin[0],j=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],M=this.pdf.internal.pageSize.height-this.margin[2],N=M-this.margin[0],P=this.pdf.internal.pageSize.width-this.margin[1],F=P-this.margin[3],I=k===1?0:j+(k-2)*N;if(this.ctx.clip_path.length!==0){var L=this.path;n=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(n,this.posX+this.margin[3],-1*I+A),S.call(this,`fill`,!0),this.path=L}var R=y([JSON.parse(JSON.stringify(v))],this.posX+this.margin[3],-I+A+this.ctx.prevPageLastElemOffset)[0];e.scale>=.01&&(r=this.pdf.internal.getFontSize(),this.pdf.setFontSize(r*e.scale),i=this.lineWidth,this.lineWidth=i*e.scale);var ee=this.autoPaging!==`text`;if(ee||R.y+R.h<=M){if(ee||R.y>=A&&R.x<=P){var z=ee?e.text:this.pdf.splitTextToSize(e.text,e.maxWidth||P-R.x)[0],B=y([JSON.parse(JSON.stringify(h))],this.posX+this.margin[3],-I+A+this.ctx.prevPageLastElemOffset)[0],V=ee&&(k>D||k<O)&&g.call(this);V&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],F,N,null).clip().discardPath()),this.pdf.text(z,B.x,B.y,{angle:e.angle,align:t,renderingMode:e.renderingMode}),V&&this.pdf.restoreGraphicsState()}}else R.y<M&&(this.ctx.prevPageLastElemOffset+=M-R.y);e.scale>=.01&&(this.pdf.setFontSize(r),this.lineWidth=i)}}else e.scale>=.01&&(r=this.pdf.internal.getFontSize(),this.pdf.setFontSize(r*e.scale),i=this.lineWidth,this.lineWidth=i*e.scale),this.pdf.text(e.text,f.x+this.posX,f.y+this.posY,{angle:e.angle,align:t,renderingMode:e.renderingMode,maxWidth:e.maxWidth}),e.scale>=.01&&(this.pdf.setFontSize(r),this.lineWidth=i)},A=function(e,t,i,a){i||=0,a||=0,this.pdf.internal.out(n(e+i)+` `+r(t+a)+` l`)},j=function(e,t,n){return this.pdf.lines(e,t,n,null,null)},M=function(e,n,r,o,s,l,u,d){this.pdf.internal.out([t(i(r+e)),t(a(o+n)),t(i(s+e)),t(a(l+n)),t(i(u+e)),t(a(d+n)),`c`].join(` `))},N=function(e,t,n,r){for(var i=2*Math.PI,a=Math.PI/2;t>n;)t-=i;var o=Math.abs(n-t);o<i&&r&&(o=i-o);for(var s=[],l=r?-1:1,u=t;o>1e-5;){var d=u+l*Math.min(o,a);s.push(P.call(this,e,u,d)),o-=Math.abs(d-u),u=d}return s},P=function(e,t,n){var r=(n-t)/2,i=e*Math.cos(r),a=e*Math.sin(r),o=i,s=-a,l=o*o+s*s,u=l+o*i+s*a,d=4/3*(Math.sqrt(2*l*u)-u)/(o*a-s*i),f=o-d*s,p=s+d*o,m=f,h=-p,g=r+t,_=Math.cos(g),v=Math.sin(g);return{x1:e*Math.cos(t),y1:e*Math.sin(t),x2:f*_-p*v,y2:f*v+p*_,x3:m*_-h*v,y3:m*v+h*_,x4:e*Math.cos(n),y4:e*Math.sin(n)}},F=function(e){return 180*e/Math.PI},I=function(e,t,n,r,i,a){var o=e+.5*(n-e),l=t+.5*(r-t),u=i+.5*(n-i),d=a+.5*(r-a),f=Math.min(e,i,o,u),p=Math.max(e,i,o,u),m=Math.min(t,a,l,d),h=Math.max(t,a,l,d);return new s(f,m,p-f,h-m)},L=function(e,t,n,r,i,a,o,l){var u,d,f,p,m,h,g,_,v,y,b,x,S,C,w=n-e,T=r-t,E=i-n,D=a-r,O=o-i,k=l-a;for(d=0;d<41;d++)v=(g=(f=e+(u=d/40)*w)+u*((m=n+u*E)-f))+u*(m+u*(i+u*O-m)-g),y=(_=(p=t+u*T)+u*((h=r+u*D)-p))+u*(h+u*(a+u*k-h)-_),d==0?(b=v,x=y,S=v,C=y):(b=Math.min(b,v),x=Math.min(x,y),S=Math.max(S,v),C=Math.max(C,y));return new s(Math.round(b),Math.round(x),Math.round(S-b),Math.round(C-x))},R=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var e,t,n=(e=this.ctx.lineDash,t=this.ctx.lineDashOffset,JSON.stringify({lineDash:e,lineDashOffset:t}));this.prevLineDash!==n&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=n)}}})(c9.API),function(e){var t=function(e){var t,n,r,i,a,o,s,l,u,d;for(/[^\x00-\xFF]/.test(e),n=[],r=0,i=(e+=t=`\0\0\0\0`.slice(e.length%4||4)).length;i>r;r+=4)(a=(e.charCodeAt(r)<<24)+(e.charCodeAt(r+1)<<16)+(e.charCodeAt(r+2)<<8)+e.charCodeAt(r+3))===0?n.push(122):(o=(a=((a=((a=((a=(a-(d=a%85))/85)-(u=a%85))/85)-(l=a%85))/85)-(s=a%85))/85)%85,n.push(o+33,s+33,l+33,u+33,d+33));return function(e,t){for(var n=t;n>0;n--)e.pop()}(n,t.length),String.fromCharCode.apply(String,n)+`~>`},n=function(e){var t,n,r,i,a,o=String,s=`length`,l=255,u=`charCodeAt`,d=`slice`,f=`replace`;for(e[d](-2),e=e[d](0,-2)[f](/\s/g,``)[f](`z`,`!!!!!`),r=[],i=0,a=(e+=t=`uuuuu`[d](e[s]%5||5))[s];a>i;i+=5)n=52200625*(e[u](i)-33)+614125*(e[u](i+1)-33)+7225*(e[u](i+2)-33)+85*(e[u](i+3)-33)+(e[u](i+4)-33),r.push(l&n>>24,l&n>>16,l&n>>8,l&n);return function(e,t){for(var n=t;n>0;n--)e.pop()}(r,t[s]),o.fromCharCode.apply(o,r)},r=function(e){return e.split(``).map(function(e){return(`0`+e.charCodeAt().toString(16)).slice(-2)}).join(``)+`>`},i=function(e){var t=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((e=e.replace(/\s/g,``)).indexOf(`>`)!==-1&&(e=e.substr(0,e.indexOf(`>`))),e.length%2&&(e+=`0`),!1===t.test(e))return``;for(var n=``,r=0;r<e.length;r+=2)n+=String.fromCharCode(`0x`+(e[r]+e[r+1]));return n},a=function(e){for(var t=new Uint8Array(e.length),n=e.length;n--;)t[n]=e.charCodeAt(n);return(t=EKt(t)).reduce(function(e,t){return e+String.fromCharCode(t)},``)};e.processDataByFilters=function(e,o){var s=0,l=e||``,u=[];for(typeof(o||=[])==`string`&&(o=[o]),s=0;s<o.length;s+=1)switch(o[s]){case`ASCII85Decode`:case`/ASCII85Decode`:l=n(l),u.push(`/ASCII85Encode`);break;case`ASCII85Encode`:case`/ASCII85Encode`:l=t(l),u.push(`/ASCII85Decode`);break;case`ASCIIHexDecode`:case`/ASCIIHexDecode`:l=i(l),u.push(`/ASCIIHexEncode`);break;case`ASCIIHexEncode`:case`/ASCIIHexEncode`:l=r(l),u.push(`/ASCIIHexDecode`);break;case`FlateEncode`:case`/FlateEncode`:l=a(l),u.push(`/FlateDecode`);break;default:throw Error(`The filter: "`+o[s]+`" is not implemented`)}return{data:l,reverseChain:u.reverse().join(` `)}}}(c9.API),function(e){e.loadFile=function(e,t,n){return function(e,t,n){t=!1!==t,n=typeof n==`function`?n:function(){};var r=void 0;try{r=function(e,t,n){var r=new XMLHttpRequest,i=0,a=function(e){var t=e.length,n=[],r=String.fromCharCode;for(i=0;i<t;i+=1)n.push(r(255&e.charCodeAt(i)));return n.join(``)};if(r.open(`GET`,e,!t),r.overrideMimeType(`text/plain; charset=x-user-defined`),!1===t&&(r.onload=function(){r.status===200?n(a(this.responseText)):n(void 0)}),r.send(null),t&&r.status===200)return a(r.responseText)}(e,t,n)}catch{}return r}(e,t,n)},e.allowFsRead=void 0,e.loadImageFile=e.loadFile}(c9.API),function(e){function t(){return(K7.html2canvas?Promise.resolve(K7.html2canvas):Rp(()=>Promise.resolve().then(()=>d(cZt())),void 0)).catch(function(e){return Promise.reject(Error(`Could not load html2canvas: `+e))}).then(function(e){return e.default?e.default:e})}function n(){return(K7.DOMPurify?Promise.resolve(K7.DOMPurify):Rp(()=>Promise.resolve().then(()=>(ah(),Fne)),void 0)).catch(function(e){return Promise.reject(Error(`Could not load dompurify: `+e))}).then(function(e){return e.default?e.default:e})}var r=function(e){var t=L6(e);return t===`undefined`?`undefined`:t===`string`||e instanceof String?`string`:t===`number`||e instanceof Number?`number`:t===`function`||e instanceof Function?`function`:e&&e.constructor===Array?`array`:e&&e.nodeType===1?`element`:t===`object`?`object`:`unknown`},i=function(e,t){var n=document.createElement(e);for(var r in t.className&&(n.className=t.className),t.innerHTML&&t.dompurify&&(n.innerHTML=t.dompurify.sanitize(t.innerHTML)),t.style)n.style[r]=t.style[r];return n},a=function e(t,n){for(var r=t.nodeType===3?document.createTextNode(t.nodeValue):t.cloneNode(!1),i=t.firstChild;i;i=i.nextSibling)!0!==n&&i.nodeType===1&&i.nodeName===`SCRIPT`||r.appendChild(e(i,n));return t.nodeType===1&&(t.nodeName===`CANVAS`?(r.width=t.width,r.height=t.height,r.getContext(`2d`).drawImage(t,0,0)):t.nodeName!==`TEXTAREA`&&t.nodeName!==`SELECT`||(r.value=t.value),r.addEventListener(`load`,function(){r.scrollTop=t.scrollTop,r.scrollLeft=t.scrollLeft},!0)),r},o=function e(t){var n=Object.assign(e.convert(Promise.resolve()),JSON.parse(JSON.stringify(e.template))),r=e.convert(Promise.resolve(),n);return(r=r.setProgress(1,e,1,[e])).set(t)};(o.prototype=Object.create(Promise.prototype)).constructor=o,o.convert=function(e,t){return e.__proto__=t||o.prototype,e},o.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:`file.pdf`,margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:`transparent`}},o.prototype.from=function(e,t){return this.then(function(){switch(t||=function(e){switch(r(e)){case`string`:return`string`;case`element`:return e.nodeName.toLowerCase()===`canvas`?`canvas`:`element`;default:return`unknown`}}(e),t){case`string`:return this.then(n).then(function(t){return this.set({src:i(`div`,{innerHTML:e,dompurify:t})})});case`element`:return this.set({src:e});case`canvas`:return this.set({canvas:e});case`img`:return this.set({img:e});default:return this.error(`Unknown source type.`)}})},o.prototype.to=function(e){switch(e){case`container`:return this.toContainer();case`canvas`:return this.toCanvas();case`img`:return this.toImg();case`pdf`:return this.toPdf();default:return this.error(`Invalid target.`)}},o.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error(`Cannot duplicate - no source HTML.`)},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var e={position:`relative`,display:`inline-block`,width:(typeof this.opt.width!=`number`||isNaN(this.opt.width)||typeof this.opt.windowWidth!=`number`||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+`px`,left:0,right:0,top:0,margin:`auto`,backgroundColor:this.opt.backgroundColor},t=a(this.prop.src,this.opt.html2canvas.javascriptEnabled);t.tagName===`BODY`&&(e.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+`px`),this.prop.overlay=i(`div`,{className:`html2pdf__overlay`,style:{position:`fixed`,overflow:`hidden`,zIndex:1e3,left:`-100000px`,right:0,bottom:0,top:0}}),this.prop.container=i(`div`,{className:`html2pdf__container`,style:e}),this.prop.container.appendChild(t),this.prop.container.firstChild.appendChild(i(`div`,{style:{clear:`both`,border:`0 none transparent`,margin:0,padding:0,height:0}})),this.prop.container.style.float=`none`,this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position=`relative`,this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+`px`})},o.prototype.toCanvas=function(){return this.thenList([function(){return document.body.contains(this.prop.container)||this.toContainer()}]).then(t).then(function(e){var t=Object.assign({},this.opt.html2canvas);return delete t.onrendered,e(this.prop.container,t)}).then(function(e){(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)})},o.prototype.toContext2d=function(){return this.thenList([function(){return document.body.contains(this.prop.container)||this.toContainer()}]).then(t).then(function(e){var t=this.opt.jsPDF,n=this.opt.fontFaces,r=typeof this.opt.width!=`number`||isNaN(this.opt.width)||typeof this.opt.windowWidth!=`number`||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,i=Object.assign({async:!0,allowTaint:!0,scale:r,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:`#ffffff`,imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete i.onrendered,t.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,t.context2d.posX=this.opt.x,t.context2d.posY=this.opt.y,t.context2d.margin=this.opt.margin,t.context2d.fontFaces=n,n)for(var a=0;a<n.length;++a){var o=n[a],s=o.src.find(function(e){return e.format===`truetype`});s&&t.addFont(s.url,o.ref.name,o.ref.style)}return i.windowHeight=i.windowHeight||0,i.windowHeight=i.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):i.windowHeight,t.context2d.save(!0),e(this.prop.container,i)}).then(function(e){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)})},o.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var e=this.prop.canvas.toDataURL(`image/`+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement(`img`),this.prop.img.src=e})},o.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},o.prototype.output=function(e,t,n){return(n||=`pdf`).toLowerCase()===`img`||n.toLowerCase()===`image`?this.outputImg(e,t):this.outputPdf(e,t)},o.prototype.outputPdf=function(e,t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(e,t)})},o.prototype.outputImg=function(e){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(e){case void 0:case`img`:return this.prop.img;case`datauristring`:case`dataurlstring`:return this.prop.img.src;case`datauri`:case`dataurl`:return document.location.href=this.prop.img.src;default:throw`Image output type "`+e+`" is not supported.`}})},o.prototype.save=function(e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(e?{filename:e}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},o.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},o.prototype.set=function(e){if(r(e)!==`object`)return this;var t=Object.keys(e||{}).map(function(t){if(t in o.template.prop)return function(){this.prop[t]=e[t]};switch(t){case`margin`:return this.setMargin.bind(this,e.margin);case`jsPDF`:return function(){return this.opt.jsPDF=e.jsPDF,this.setPageSize()};case`pageSize`:return this.setPageSize.bind(this,e.pageSize);default:return function(){this.opt[t]=e[t]}}},this);return this.then(function(){return this.thenList(t)})},o.prototype.get=function(e,t){return this.then(function(){var n=e in o.template.prop?this.prop[e]:this.opt[e];return t?t(n):n})},o.prototype.setMargin=function(e){return this.then(function(){switch(r(e)){case`number`:e=[e,e,e,e];case`array`:if(e.length===2&&(e=[e[0],e[1],e[0],e[1]]),e.length===4)break;default:return this.error(`Invalid margin array.`)}this.opt.margin=e}).then(this.setPageSize)},o.prototype.setPageSize=function(e){function t(e,t){return Math.floor(e*t/72*96)}return this.then(function(){(e||=c9.getPageSize(this.opt.jsPDF)).hasOwnProperty(`inner`)||(e.inner={width:e.width-this.opt.margin[1]-this.opt.margin[3],height:e.height-this.opt.margin[0]-this.opt.margin[2]},e.inner.px={width:t(e.inner.width,e.k),height:t(e.inner.height,e.k)},e.inner.ratio=e.inner.height/e.inner.width),this.prop.pageSize=e})},o.prototype.setProgress=function(e,t,n,r){return e!=null&&(this.progress.val=e),t!=null&&(this.progress.state=t),n!=null&&(this.progress.n=n),r!=null&&(this.progress.stack=r),this.progress.ratio=this.progress.val/this.progress.state,this},o.prototype.updateProgress=function(e,t,n,r){return this.setProgress(e?this.progress.val+e:null,t||null,n?this.progress.n+n:null,r?this.progress.stack.concat(r):null)},o.prototype.then=function(e,t){var n=this;return this.thenCore(e,t,function(e,t){return n.updateProgress(null,null,1,[e]),Promise.prototype.then.call(this,function(t){return n.updateProgress(null,e),t}).then(e,t).then(function(e){return n.updateProgress(1),e})})},o.prototype.thenCore=function(e,t,n){n||=Promise.prototype.then;var r=this;e&&=e.bind(r),t&&=t.bind(r);var i=Promise.toString().indexOf(`[native code]`)!==-1&&Promise.name===`Promise`?r:o.convert(Object.assign({},r),Promise.prototype),a=n.call(i,e,t);return o.convert(a,r.__proto__)},o.prototype.thenExternal=function(e,t){return Promise.prototype.then.call(this,e,t)},o.prototype.thenList=function(e){var t=this;return e.forEach(function(e){t=t.thenCore(e)}),t},o.prototype.catch=function(e){e&&=e.bind(this);var t=Promise.prototype.catch.call(this,e);return o.convert(t,this)},o.prototype.catchExternal=function(e){return Promise.prototype.catch.call(this,e)},o.prototype.error=function(e){return this.then(function(){throw Error(e)})},o.prototype.using=o.prototype.set,o.prototype.saveAs=o.prototype.save,o.prototype.export=o.prototype.output,o.prototype.run=o.prototype.then,c9.getPageSize=function(e,t,n){if(L6(e)===`object`){var r=e;e=r.orientation,t=r.unit||t,n=r.format||n}t||=`mm`,n||=`a4`,e=(``+(e||`P`)).toLowerCase();var i,a=(``+n).toLowerCase(),o={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(t){case`pt`:i=1;break;case`mm`:i=72/25.4;break;case`cm`:i=72/2.54;break;case`in`:i=72;break;case`px`:i=.75;break;case`pc`:case`em`:i=12;break;case`ex`:i=6;break;default:throw`Invalid unit: `+t}var s,l=0,u=0;if(o.hasOwnProperty(a))l=o[a][1]/i,u=o[a][0]/i;else try{l=n[1],u=n[0]}catch{throw Error(`Invalid format: `+n)}if(e===`p`||e===`portrait`)e=`p`,u>l&&(s=u,u=l,l=s);else{if(e!==`l`&&e!==`landscape`)throw`Invalid orientation: `+e;e=`l`,l>u&&(s=u,u=l,l=s)}return{width:u,height:l,unit:t,k:i,orientation:e}},e.html=function(e,t){(t||={}).callback=t.callback||function(){},t.html2canvas=t.html2canvas||{},t.html2canvas.canvas=t.html2canvas.canvas||this.canvas,t.jsPDF=t.jsPDF||this,t.fontFaces=t.fontFaces?t.fontFaces.map(x2t):null;var n=new o(t);return t.worker?n:n.from(e).doCallback()}}(c9.API),c9.API.addJS=function(e){var t,n,r=function(e){for(var t=``,n=0;n<e.length;n++){var r=e[n];if(r===`(`||r===`)`){for(var i=0,a=n-1;a>=0&&e[a]===`\\`;a--)i++;t+=i%2==0?`\\`+r:r}else t+=r}return t}(e);return this.internal.events.subscribe(`postPutResources`,function(){t=this.internal.newObject(),this.internal.out(`<<`),this.internal.out(`/Names [(EmbeddedJS) `+(t+1)+` 0 R]`),this.internal.out(`>>`),this.internal.out(`endobj`),n=this.internal.newObject(),this.internal.out(`<<`),this.internal.out(`/S /JavaScript`),this.internal.out(`/JS (`+r+`)`),this.internal.out(`>>`),this.internal.out(`endobj`)}),this.internal.events.subscribe(`putCatalog`,function(){t!==void 0&&n!==void 0&&this.internal.out(`/Names <</JavaScript `+t+` 0 R>>`)}),this},function(e){var t;e.events.push([`postPutResources`,function(){var e=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var r=e.outline.render().split(/\r\n/),i=0;i<r.length;i++){var a=r[i],o=n.exec(a);if(o!=null){var s=o[1];e.internal.newObjectDeferredBegin(s,!1)}e.internal.write(a)}if(this.outline.createNamedDestinations){var l=this.internal.pages.length,u=[];for(i=0;i<l;i++){var d=e.internal.newObject();u.push(d);var f=e.internal.getPageInfo(i+1);e.internal.write(`<< /D[`+f.objId+` 0 R /XYZ null null null]>> endobj`)}var p=e.internal.newObject();for(e.internal.write(`<< /Names [ `),i=0;i<u.length;i++)e.internal.write(`(page_`+(i+1)+`)`+u[i]+` 0 R`);e.internal.write(` ] >>`,`endobj`),t=e.internal.newObject(),e.internal.write(`<< /Dests `+p+` 0 R`),e.internal.write(`>>`,`endobj`)}}]),e.events.push([`putCatalog`,function(){var e=this;e.outline.root.children.length>0&&(e.internal.write(`/Outlines`,this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&e.internal.write(`/Names `+t+` 0 R`))}]),e.events.push([`initialized`,function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(e,t,n){var r={title:t,options:n,children:[]};return e??=this.root,e.children.push(r),r},e.outline.render=function(){return this.ctx={},this.ctx.val=``,this.ctx.pdf=e,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},e.outline.genIds_r=function(t){t.id=e.internal.newObjectDeferred();for(var n=0;n<t.children.length;n++)this.genIds_r(t.children[n])},e.outline.renderRoot=function(e){this.objStart(e),this.line(`/Type /Outlines`),e.children.length>0&&(this.line(`/First `+this.makeRef(e.children[0])),this.line(`/Last `+this.makeRef(e.children[e.children.length-1]))),this.line(`/Count `+this.count_r({count:0},e)),this.objEnd()},e.outline.renderItems=function(t){for(var n=this.ctx.pdf.internal.getVerticalCoordinateString,r=0;r<t.children.length;r++){var i=t.children[r];this.objStart(i),this.line(`/Title `+this.makeString(i.title)),this.line(`/Parent `+this.makeRef(t)),r>0&&this.line(`/Prev `+this.makeRef(t.children[r-1])),r<t.children.length-1&&this.line(`/Next `+this.makeRef(t.children[r+1])),i.children.length>0&&(this.line(`/First `+this.makeRef(i.children[0])),this.line(`/Last `+this.makeRef(i.children[i.children.length-1])));var a=this.count=this.count_r({count:0},i);if(a>0&&this.line(`/Count `+a),i.options&&i.options.pageNumber){var o=e.internal.getPageInfo(i.options.pageNumber);this.line(`/Dest [`+o.objId+` 0 R /XYZ 0 `+n(0)+` 0]`)}this.objEnd()}for(var s=0;s<t.children.length;s++)this.renderItems(t.children[s])},e.outline.line=function(e){this.ctx.val+=e+`\r
|
|
4197
|
+
`),t}}},createDefaultAppearanceStream:function(e){var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color);return`/`+t+` `+e.fontSize+` Tf `+n}};P9.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=P9.internal.getWidth(e),n=P9.internal.getHeight(e),r=Math.min(t,n);return{x1:{x:(t-r)/2,y:(n-r)/2+r},x2:{x:(t-r)/2+r,y:(n-r)/2},x3:{x:(t-r)/2,y:(n-r)/2},x4:{x:(t-r)/2+r,y:(n-r)/2+r}}}},P9.internal.getWidth=function(e){var t=0;return L6(e)===`object`&&(t=e2t(e.Rect[2])),t},P9.internal.getHeight=function(e){var t=0;return L6(e)===`object`&&(t=e2t(e.Rect[3])),t};var m2t=l9.addField=function(e){if(l2t(this,e),!(e instanceof S9))throw Error(`Invalid argument passed to jsPDF.addField.`);var t;return(t=e).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};l9.AcroFormChoiceField=C9,l9.AcroFormListBox=w9,l9.AcroFormComboBox=T9,l9.AcroFormEditBox=E9,l9.AcroFormButton=D9,l9.AcroFormPushButton=O9,l9.AcroFormRadioButton=k9,l9.AcroFormCheckBox=j9,l9.AcroFormTextField=M9,l9.AcroFormPasswordField=N9,l9.AcroFormAppearance=P9,l9.AcroForm={ChoiceField:C9,ListBox:w9,ComboBox:T9,EditBox:E9,Button:D9,PushButton:O9,RadioButton:k9,CheckBox:j9,TextField:M9,PasswordField:N9,Appearance:P9},c9.AcroForm={ChoiceField:C9,ListBox:w9,ComboBox:T9,EditBox:E9,Button:D9,PushButton:O9,RadioButton:k9,CheckBox:j9,TextField:M9,PasswordField:N9,Appearance:P9},c9.AcroForm;function h2t(e){return e.reduce(function(e,t,n){return e[t]=n,e},{})}(function(e){var t=`addImage_`;e.__addimage__={};var n=`UNKNOWN`,r={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},i=e.__addimage__.getImageFileTypeByImageData=function(e,t){var i,a,o,s,l,u=n;if((t||=n)===`RGBA`||e.data!==void 0&&e.data instanceof Uint8ClampedArray&&`height`in e&&`width`in e)return`RGBA`;if(C(e))for(l in r)for(o=r[l],i=0;i<o.length;i+=1){for(s=!0,a=0;a<o[i].length;a+=1)if(o[i][a]!==void 0&&o[i][a]!==e[a]){s=!1;break}if(!0===s){u=l;break}}else for(l in r)for(o=r[l],i=0;i<o.length;i+=1){for(s=!0,a=0;a<o[i].length;a+=1)if(o[i][a]!==void 0&&o[i][a]!==e.charCodeAt(a)){s=!1;break}if(!0===s){u=l;break}}return u===n&&t!==n&&(u=t),u},a=function e(t){for(var n=this.internal.write,r=this.internal.putStream,i=(0,this.internal.getFilters)();i.indexOf(`FlateEncode`)!==-1;)i.splice(i.indexOf(`FlateEncode`),1);t.objectId=this.internal.newObject();var a=[];if(a.push({key:`Type`,value:`/XObject`}),a.push({key:`Subtype`,value:`/Image`}),a.push({key:`Width`,value:t.width}),a.push({key:`Height`,value:t.height}),t.colorSpace===v.INDEXED?a.push({key:`ColorSpace`,value:`[/Indexed /DeviceRGB `+(t.palette.length/3-1)+` `+(`sMask`in t&&t.sMask!==void 0?t.objectId+2:t.objectId+1)+` 0 R]`}):(a.push({key:`ColorSpace`,value:`/`+t.colorSpace}),t.colorSpace===v.DEVICE_CMYK&&a.push({key:`Decode`,value:`[1 0 1 0 1 0 1 0]`})),a.push({key:`BitsPerComponent`,value:t.bitsPerComponent}),`decodeParameters`in t&&t.decodeParameters!==void 0&&a.push({key:`DecodeParms`,value:`<<`+t.decodeParameters+`>>`}),`transparency`in t&&Array.isArray(t.transparency)&&t.transparency.length>0){for(var o=``,s=0,l=t.transparency.length;s<l;s++)o+=t.transparency[s]+` `+t.transparency[s]+` `;a.push({key:`Mask`,value:`[`+o+`]`})}t.sMask!==void 0&&a.push({key:`SMask`,value:t.objectId+1+` 0 R`});var u=t.filter===void 0?void 0:[`/`+t.filter];if(r({data:t.data,additionalKeyValues:a,alreadyAppliedFilters:u,objectId:t.objectId}),n(`endobj`),`sMask`in t&&t.sMask!==void 0){var d=t.sMaskBitsPerComponent??t.bitsPerComponent,f={width:t.width,height:t.height,colorSpace:`DeviceGray`,bitsPerComponent:d,data:t.sMask};`filter`in t&&(f.decodeParameters=`/Predictor ${t.predictor} /Colors 1 /BitsPerComponent ${d} /Columns ${t.width}`,f.filter=t.filter),e.call(this,f)}if(t.colorSpace===v.INDEXED){var p=this.internal.newObject();r({data:T(new Uint8Array(t.palette)),objectId:p}),n(`endobj`)}},o=function(){var e=this.internal.collections[t+`images`];for(var n in e)a.call(this,e[n])},s=function(){var e,n=this.internal.collections[t+`images`],r=this.internal.write;for(var i in n)r(`/I`+(e=n[i]).index,e.objectId,`0`,`R`)},l=function(){this.internal.collections[t+`images`]||(this.internal.collections[t+`images`]={},this.internal.events.subscribe(`putResources`,o),this.internal.events.subscribe(`putXobjectDict`,s))},u=function(){var e=this.internal.collections[t+`images`];return l.call(this),e},d=function(){return Object.keys(this.internal.collections[t+`images`]).length},f=function(t){return typeof e[`process`+t.toUpperCase()]==`function`},p=function(e){return L6(e)===`object`&&e.nodeType===1},m=function(t,n){if(t.nodeName===`IMG`&&t.hasAttribute(`src`)){var r=``+t.getAttribute(`src`);if(r.indexOf(`data:image/`)===0)return X7(unescape(r).split(`base64,`).pop());var i=e.loadFile(r,!0);if(i!==void 0)return i}if(t.nodeName===`CANVAS`){if(t.width===0||t.height===0)throw Error(`Given canvas must have data. Canvas width: `+t.width+`, height: `+t.height);var a;switch(n){case`PNG`:a=`image/png`;break;case`WEBP`:a=`image/webp`;break;default:a=`image/jpeg`}return X7(t.toDataURL(a,1).split(`base64,`).pop())}},h=function(e){var n=this.internal.collections[t+`images`];if(n){for(var r in n)if(e===n[r].alias)return n[r]}},g=function(e,t,n){return e||t||(e=-96,t=-96),e<0&&(e=-1*n.width*72/e/this.internal.scaleFactor),t<0&&(t=-1*n.height*72/t/this.internal.scaleFactor),e===0&&(e=t*n.width/n.height),t===0&&(t=e*n.height/n.width),[e,t]},_=function(e,t,n,r,i,a){var o=g.call(this,n,r,i),s=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString,d=u.call(this);if(n=o[0],r=o[1],d[i.index]=i,a){a*=Math.PI/180;var f=Math.cos(a),p=Math.sin(a),m=function(e){return e.toFixed(4)},h=[m(f),m(p),m(-1*p),m(f),0,0,`cm`]}this.internal.write(`q`),a?(this.internal.write([1,`0`,`0`,1,s(e),l(t+r),`cm`].join(` `)),this.internal.write(h.join(` `)),this.internal.write([s(n),`0`,`0`,s(r),`0`,`0`,`cm`].join(` `))):this.internal.write([s(n),`0`,`0`,s(r),s(e),l(t+r),`cm`].join(` `)),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,`cm`].join(` `)),this.internal.write(`/I`+i.index+` Do`),this.internal.write(`Q`)},v=e.color_spaces={DEVICE_RGB:`DeviceRGB`,DEVICE_GRAY:`DeviceGray`,DEVICE_CMYK:`DeviceCMYK`,CAL_GREY:`CalGray`,CAL_RGB:`CalRGB`,LAB:`Lab`,ICC_BASED:`ICCBased`,INDEXED:`Indexed`,PATTERN:`Pattern`,SEPARATION:`Separation`,DEVICE_N:`DeviceN`};e.decode={DCT_DECODE:`DCTDecode`,FLATE_DECODE:`FlateDecode`,LZW_DECODE:`LZWDecode`,JPX_DECODE:`JPXDecode`,JBIG2_DECODE:`JBIG2Decode`,ASCII85_DECODE:`ASCII85Decode`,ASCII_HEX_DECODE:`ASCIIHexDecode`,RUN_LENGTH_DECODE:`RunLengthDecode`,CCITT_FAX_DECODE:`CCITTFaxDecode`};var y=e.image_compression={NONE:`NONE`,FAST:`FAST`,MEDIUM:`MEDIUM`,SLOW:`SLOW`},b=e.__addimage__.sHashCode=function(e){var t,n,r=0;if(typeof e==`string`)for(n=e.length,t=0;t<n;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;else if(C(e))for(n=e.byteLength/2,t=0;t<n;t++)r=(r<<5)-r+e[t],r|=0;return r},x=e.__addimage__.validateStringAsBase64=function(e){(e||=``).toString().trim();var t=!0;return e.length===0&&(t=!1),e.length%4!=0&&(t=!1),!1===/^[A-Za-z0-9+/]+$/.test(e.substr(0,e.length-2))&&(t=!1),!1===/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(e.substr(-2))&&(t=!1),t},S=e.__addimage__.extractImageFromDataUrl=function(e){if(e==null||!(e=e.trim()).startsWith(`data:`))return null;var t=e.indexOf(`,`);return t<0?null:e.substring(0,t).trim().endsWith(`base64`)?e.substring(t+1):null};e.__addimage__.isArrayBuffer=function(e){return e instanceof ArrayBuffer};var C=e.__addimage__.isArrayBufferView=function(e){return e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array},w=e.__addimage__.binaryStringToUint8Array=function(e){for(var t=e.length,n=new Uint8Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);return n},T=e.__addimage__.arrayBufferToBinaryString=function(e){for(var t=``,n=C(e)?e:new Uint8Array(e),r=0;r<n.length;r+=8192)t+=String.fromCharCode.apply(null,n.subarray(r,r+8192));return t};e.addImage=function(){var e,t,r,i,a,o,s,u,d;if(typeof arguments[1]==`number`?(t=n,r=arguments[1],i=arguments[2],a=arguments[3],o=arguments[4],s=arguments[5],u=arguments[6],d=arguments[7]):(t=arguments[1],r=arguments[2],i=arguments[3],a=arguments[4],o=arguments[5],s=arguments[6],u=arguments[7],d=arguments[8]),L6(e=arguments[0])===`object`&&!p(e)&&`imageData`in e){var f=e;e=f.imageData,t=f.format||t||n,r=f.x||r||0,i=f.y||i||0,a=f.w||f.width||a,o=f.h||f.height||o,s=f.alias||s,u=f.compression||u,d=f.rotation||f.angle||d}var m=this.internal.getFilters();if(u===void 0&&m.indexOf(`FlateEncode`)!==-1&&(u=`SLOW`),isNaN(r)||isNaN(i))throw Error(`Invalid coordinates passed to jsPDF.addImage`);l.call(this);var h=E.call(this,e,t,s,u);return _.call(this,r,i,a,o,h,d),this};var E=function(t,r,a,o){var s,l,u;if(typeof t==`string`&&i(t)===n){t=unescape(t);var g=D(t,!1);(g!==``||(g=e.loadFile(t,!0))!==void 0)&&(t=g)}if(p(t)&&(t=m(t,r)),r=i(t,r),!f(r))throw Error(`addImage does not support files of type '`+r+`', please ensure that a plugin for '`+r+`' support is added.`);if(((u=a)==null||u.length===0)&&(a=function(e){return typeof e==`string`||C(e)?b(e):C(e.data)?b(e.data):null}(t)),(s=h.call(this,a))||(t instanceof Uint8Array||r===`RGBA`||(l=t,t=w(t)),s=this[`process`+r.toUpperCase()](t,d.call(this),a,function(t){return t&&typeof t==`string`&&(t=t.toUpperCase()),t in e.image_compression?t:y.NONE}(o),l)),!s)throw Error(`An unknown error occurred whilst processing the image.`);return s},D=e.__addimage__.convertBase64ToBinaryString=function(e,t){t=typeof t!=`boolean`||t;var n,r=``;if(typeof e==`string`){n=S(e)??e;try{r=X7(n)}catch(e){if(t)throw x(n)?Error(`atob-Error in jsPDF.convertBase64ToBinaryString `+e.message):Error(`Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString `)}}return r};e.getImageProperties=function(t){var r,a,o=``;if(p(t)&&(t=m(t)),typeof t==`string`&&i(t)===n&&((o=D(t,!1))===``&&(o=e.loadFile(t)||``),t=o),a=i(t),!f(a))throw Error(`addImage does not support files of type '`+a+`', please ensure that a plugin for '`+a+`' support is added.`);if(t instanceof Uint8Array||(t=w(t)),!(r=this[`process`+a.toUpperCase()](t)))throw Error(`An unknown error occurred whilst processing the image`);return r.fileType=a,r}})(c9.API),function(e){var t=function(e){if(e!==void 0&&e!=``)return!0};c9.API.events.push([`addPage`,function(e){this.internal.getPageInfo(e.pageNumber).pageContext.annotations=[]}]),e.events.push([`putPage`,function(e){for(var n,r,i,a=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString,s=this.internal.getPageInfoByObjId(e.objId),l=e.pageContext.annotations,u=!1,d=0;d<l.length&&!u;d++)switch((n=l[d]).type){case`link`:(t(n.options.url)||t(n.options.pageNumber))&&(u=!0);break;case`reference`:case`text`:case`freetext`:u=!0}if(u!=0){this.internal.write(`/Annots [`);for(var f=0;f<l.length;f++){n=l[f];var p=this.internal.pdfEscape,m=this.internal.getEncryptor(e.objId);switch(n.type){case`reference`:this.internal.write(` `+n.object.objId+` 0 R `);break;case`text`:var h=this.internal.newAdditionalObject(),g=this.internal.newAdditionalObject(),_=this.internal.getEncryptor(h.objId),v=n.title||`Note`;i=`<</Type /Annot /Subtype /Text `+(r=`/Rect [`+a(n.bounds.x)+` `+o(n.bounds.y+n.bounds.h)+` `+a(n.bounds.x+n.bounds.w)+` `+o(n.bounds.y)+`] `)+`/Contents (`+p(_(n.contents))+`)`,i+=` /Popup `+g.objId+` 0 R`,i+=` /P `+s.objId+` 0 R`,i+=` /T (`+p(_(v))+`) >>`,h.content=i;var y=h.objId+` 0 R`;i=`<</Type /Annot /Subtype /Popup `+(r=`/Rect [`+a(n.bounds.x+30)+` `+o(n.bounds.y+n.bounds.h)+` `+a(n.bounds.x+n.bounds.w+30)+` `+o(n.bounds.y)+`] `)+` /Parent `+y,n.open&&(i+=` /Open true`),i+=` >>`,g.content=i,this.internal.write(h.objId,`0 R`,g.objId,`0 R`);break;case`freetext`:r=`/Rect [`+a(n.bounds.x)+` `+o(n.bounds.y)+` `+a(n.bounds.x+n.bounds.w)+` `+o(n.bounds.y+n.bounds.h)+`] `;var b=`font: Helvetica,sans-serif 12.0pt; text-align:left; color:#`+(n.color||`#000000`);i=`<</Type /Annot /Subtype /FreeText `+r+`/Contents (`+p(m(n.contents))+`)`,i+=` /DS(`+p(m(b))+`)`,i+=` /Border [0 0 0]`,i+=` >>`,this.internal.write(i);break;case`link`:if(n.options.name){var x=this.annotations._nameMap[n.options.name];n.options.pageNumber=x.page,n.options.top=x.y}else n.options.top||(n.options.top=0);if(r=`/Rect [`+n.finalBounds.x+` `+n.finalBounds.y+` `+n.finalBounds.w+` `+n.finalBounds.h+`] `,i=``,n.options.url)i=`<</Type /Annot /Subtype /Link `+r+`/Border [0 0 0] /A <</S /URI /URI (`+p(m(n.options.url))+`) >>`;else if(n.options.pageNumber)switch(i=`<</Type /Annot /Subtype /Link `+r+`/Border [0 0 0] /Dest [`+this.internal.getPageInfo(n.options.pageNumber).objId+` 0 R`,n.options.magFactor=n.options.magFactor||`XYZ`,n.options.magFactor){case`Fit`:i+=` /Fit]`;break;case`FitH`:i+=` /FitH `+n.options.top+`]`;break;case`FitV`:n.options.left=n.options.left||0,i+=` /FitV `+n.options.left+`]`;break;default:var S=o(n.options.top);n.options.left=n.options.left||0,n.options.zoom===void 0&&(n.options.zoom=0),i+=` /XYZ `+n.options.left+` `+S+` `+n.options.zoom+`]`}i!=``&&(i+=` >>`,this.internal.write(i))}}this.internal.write(`]`)}}]),e.createAnnotation=function(e){var t=this.internal.getCurrentPageInfo();switch(e.type){case`link`:this.link(e.bounds.x,e.bounds.y,e.bounds.w,e.bounds.h,e);break;case`text`:case`freetext`:t.pageContext.annotations.push(e)}},e.link=function(e,t,n,r,i){var a=this.internal.getCurrentPageInfo(),o=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString;a.pageContext.annotations.push({finalBounds:{x:o(e),y:s(t),w:o(e+n),h:s(t+r)},options:i,type:`link`})},e.textWithLink=function(e,t,n,r){var i,a,o=this.getTextWidth(e),s=this.internal.getLineHeight()/this.internal.scaleFactor;if(r.maxWidth!==void 0){a=r.maxWidth;var l=this.splitTextToSize(e,a).length;i=Math.ceil(s*l)}else a=o,i=s;return this.text(e,t,n,r),n+=.2*s,r.align===`center`&&(t-=o/2),r.align===`right`&&(t-=o),this.link(t,n-s,a,i,r),o},e.getTextWidth=function(e){var t=this.internal.getFontSize();return this.getStringUnitWidth(e)*t/this.internal.scaleFactor}}(c9.API),function(e){var t={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},n={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];e.__arabicParser__={};var a=e.__arabicParser__.isInArabicSubstitutionA=function(e){return t[e.charCodeAt(0)]!==void 0},o=e.__arabicParser__.isArabicLetter=function(e){return typeof e==`string`&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(e)},s=e.__arabicParser__.isArabicEndLetter=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length<=2},l=e.__arabicParser__.isArabicAlfLetter=function(e){return o(e)&&i.indexOf(e.charCodeAt(0))>=0};e.__arabicParser__.arabicLetterHasIsolatedForm=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length>=1};var u=e.__arabicParser__.arabicLetterHasFinalForm=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length>=2};e.__arabicParser__.arabicLetterHasInitialForm=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length>=3};var d=e.__arabicParser__.arabicLetterHasMedialForm=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length==4},f=e.__arabicParser__.resolveLigatures=function(e){var t=0,r=n,i=``,a=0;for(t=0;t<e.length;t+=1)r[e.charCodeAt(t)]===void 0?(r=n,i+=e.charAt(t-a),t-=a,a=0):(a++,typeof(r=r[e.charCodeAt(t)])==`number`&&(i+=String.fromCharCode(r),r=n,a=0),t===e.length-1&&(r=n,i+=e.charAt(t-(a-1)),t-=a-1,a=0));return i};e.__arabicParser__.isArabicDiacritic=function(e){return e!==void 0&&r[e.charCodeAt(0)]!==void 0};var p=e.__arabicParser__.getCorrectForm=function(e,t,n){return o(e)?!1===a(e)?-1:!u(e)||!o(t)&&!o(n)||!o(n)&&s(t)||s(e)&&!o(t)||s(e)&&l(t)||s(e)&&s(t)?0:d(e)&&o(t)&&!s(t)&&o(n)&&u(n)?3:s(e)||!o(n)?1:2:-1},m=function(e){var n=0,r=0,i=0,a=``,s=``,l=``,u=(e||=``).split(`\\s+`),d=[];for(n=0;n<u.length;n+=1){for(d.push(``),r=0;r<u[n].length;r+=1)a=u[n][r],s=u[n][r-1],l=u[n][r+1],o(a)?(i=p(a,s,l),d[n]+=i===-1?a:String.fromCharCode(t[a.charCodeAt(0)][i])):d[n]+=a;d[n]=f(d[n])}return d.join(` `)},h=e.__arabicParser__.processArabic=e.processArabic=function(){var e,t=typeof arguments[0]==`string`?arguments[0]:arguments[0].text,n=[];if(Array.isArray(t)){var r=0;for(n=[],r=0;r<t.length;r+=1)Array.isArray(t[r])?n.push([m(t[r][0]),t[r][1],t[r][2]]):n.push([m(t[r])]);e=n}else e=m(t);return typeof arguments[0]==`string`?e:(arguments[0].text=e,arguments[0])};e.events.push([`preProcessText`,h])}(c9.API),c9.API.autoPrint=function(e){var t;return(e||={}).variant=e.variant||`non-conform`,e.variant===`javascript`?this.addJS(`print({});`):(this.internal.events.subscribe(`postPutResources`,function(){t=this.internal.newObject(),this.internal.out(`<<`),this.internal.out(`/S /Named`),this.internal.out(`/Type /Action`),this.internal.out(`/N /Print`),this.internal.out(`>>`),this.internal.out(`endobj`)}),this.internal.events.subscribe(`putCatalog`,function(){this.internal.out(`/OpenAction `+t+` 0 R`)})),this},function(e){var t=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(t){e=t}});var t=150;Object.defineProperty(this,"width",{get:function(){return t},set:function(e){t=isNaN(e)||!1===Number.isInteger(e)||e<0?150:e,this.getContext(`2d`).pageWrapXEnabled&&(this.getContext(`2d`).pageWrapX=t+1)}});var n=300;Object.defineProperty(this,"height",{get:function(){return n},set:function(e){n=isNaN(e)||!1===Number.isInteger(e)||e<0?300:e,this.getContext(`2d`).pageWrapYEnabled&&(this.getContext(`2d`).pageWrapY=n+1)}});var r=[];Object.defineProperty(this,"childNodes",{get:function(){return r},set:function(e){r=e}});var i={};Object.defineProperty(this,"style",{get:function(){return i},set:function(e){i=e}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(e,t){var n;if((e||=`2d`)!==`2d`)return null;for(n in t)this.pdf.context2d.hasOwnProperty(n)&&(this.pdf.context2d[n]=t[n]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw Error(`toDataURL is not implemented.`)},e.events.push([`initialized`,function(){this.canvas=new t,this.canvas.pdf=this}])}(c9.API),function(e){var t={left:0,top:0,bottom:0,right:0},n=!1,r=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),i.call(this))},i=function(){this.internal.__cell__.lastCell=new a,this.internal.__cell__.pages=1},a=function(){var e=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return e},set:function(t){e=t}});var t=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return t},set:function(e){t=e}});var n=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return n},set:function(e){n=e}});var r=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return r},set:function(e){r=e}});var i=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return i},set:function(e){i=e}});var a=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return a},set:function(e){a=e}});var o=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return o},set:function(e){o=e}}),this};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},a.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},e.setHeaderFunction=function(e){return r.call(this),this.internal.__cell__.headerFunction=typeof e==`function`?e:void 0,this},e.getTextDimensions=function(e,t){r.call(this);var n=(t||={}).fontSize||this.getFontSize(),i=t.font||this.getFont(),a=t.scaleFactor||this.internal.scaleFactor,o=0,s=0,l=0,u=this;if(!Array.isArray(e)&&typeof e!=`string`){if(typeof e!=`number`)throw Error(`getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.`);e=String(e)}var d=t.maxWidth;d>0?typeof e==`string`?e=this.splitTextToSize(e,d):Object.prototype.toString.call(e)===`[object Array]`&&(e=e.reduce(function(e,t){return e.concat(u.splitTextToSize(t,d))},[])):e=Array.isArray(e)?e:[e];for(var f=0;f<e.length;f++)o<(l=this.getStringUnitWidth(e[f],{font:i})*n)&&(o=l);return o!==0&&(s=e.length),{w:o/=a,h:Math.max((s*n*this.getLineHeightFactor()-n*(this.getLineHeightFactor()-1))/a,0)}},e.cellAddPage=function(){r.call(this),this.addPage();var e=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new a(e.left,e.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var o=e.cell=function(){var e=arguments[0]instanceof a?arguments[0]:new a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]);r.call(this);var i=this.internal.__cell__.lastCell,o=this.internal.__cell__.padding,s=this.internal.__cell__.margins||t,l=this.internal.__cell__.tableHeaderRow,u=this.internal.__cell__.printHeaders;return i.lineNumber!==void 0&&(i.lineNumber===e.lineNumber?(e.x=(i.x||0)+(i.width||0),e.y=i.y||0):i.y+i.height+e.height+s.bottom>this.getPageHeight()?(this.cellAddPage(),e.y=s.top,u&&l&&(this.printHeaderRow(e.lineNumber,!0),e.y+=l[0].height)):e.y=i.y+i.height||e.y),e.text[0]!==void 0&&(this.rect(e.x,e.y,e.width,e.height,!0===n?`FD`:void 0),e.align===`right`?this.text(e.text,e.x+e.width-o,e.y+o,{align:`right`,baseline:`top`}):e.align===`center`?this.text(e.text,e.x+e.width/2,e.y+o,{align:`center`,baseline:`top`,maxWidth:e.width-o-o}):this.text(e.text,e.x+o,e.y+o,{align:`left`,baseline:`top`,maxWidth:e.width-o-o})),this.internal.__cell__.lastCell=e,this};e.table=function(e,n,l,u,d){if(r.call(this),!l)throw Error(`No data for PDF table.`);var f,p,m,h,g=[],_=[],v=[],y={},b={},x=[],S=[],C=(d||={}).autoSize||!1,w=!1!==d.printHeaders,T=d.css&&d.css[`font-size`]!==void 0?16*d.css[`font-size`]:d.fontSize||12,E=d.margins||Object.assign({width:this.getPageWidth()},t),D=typeof d.padding==`number`?d.padding:3,O=d.headerBackgroundColor||`#c8c8c8`,k=d.headerTextColor||`#000`;if(i.call(this),this.internal.__cell__.printHeaders=w,this.internal.__cell__.margins=E,this.internal.__cell__.table_font_size=T,this.internal.__cell__.padding=D,this.internal.__cell__.headerBackgroundColor=O,this.internal.__cell__.headerTextColor=k,this.setFontSize(T),u==null)_=g=Object.keys(l[0]),v=g.map(function(){return`left`});else if(Array.isArray(u)&&L6(u[0])===`object`)for(g=u.map(function(e){return e.name}),_=u.map(function(e){return e.prompt||e.name||``}),v=u.map(function(e){return e.align||`left`}),f=0;f<u.length;f+=1)b[u[f].name]=.7499990551181103*u[f].width;else Array.isArray(u)&&typeof u[0]==`string`&&(_=g=u,v=g.map(function(){return`left`}));if(C||Array.isArray(u)&&typeof u[0]==`string`)for(f=0;f<g.length;f+=1){for(y[h=g[f]]=l.map(function(e){return e[h]}),this.setFont(void 0,`bold`),x.push(this.getTextDimensions(_[f],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),p=y[h],this.setFont(void 0,`normal`),m=0;m<p.length;m+=1)x.push(this.getTextDimensions(p[m],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);b[h]=Math.max.apply(null,x)+D+D,x=[]}if(w){var A={};for(f=0;f<g.length;f+=1)A[g[f]]={},A[g[f]].text=_[f],A[g[f]].align=v[f];var j=s.call(this,A,b);S=g.map(function(t){return new a(e,n,b[t],j,A[t].text,void 0,A[t].align)}),this.setTableHeaderRow(S),this.printHeaderRow(1,!1)}var M=u.reduce(function(e,t){return e[t.name]=t.align,e},{});for(f=0;f<l.length;f+=1){`rowStart`in d&&d.rowStart instanceof Function&&d.rowStart({row:f,data:l[f]},this);var N=s.call(this,l[f],b);for(m=0;m<g.length;m+=1){var P=l[f][g[m]];`cellStart`in d&&d.cellStart instanceof Function&&d.cellStart({row:f,col:m,data:P},this),o.call(this,new a(e,n,b[g[m]],N,P,f+2,M[g[m]]))}}return this.internal.__cell__.table_x=e,this.internal.__cell__.table_y=n,this};var s=function(e,t){var n=this.internal.__cell__.padding,r=this.internal.__cell__.table_font_size,i=this.internal.scaleFactor;return Object.keys(e).map(function(r){var i=e[r];return this.splitTextToSize(i.hasOwnProperty(`text`)?i.text:i,t[r]-n-n)},this).map(function(e){return this.getLineHeightFactor()*e.length*r/i+n+n},this).reduce(function(e,t){return Math.max(e,t)},0)};e.setTableHeaderRow=function(e){r.call(this),this.internal.__cell__.tableHeaderRow=e},e.printHeaderRow=function(e,t){if(r.call(this),!this.internal.__cell__.tableHeaderRow)throw Error(`Property tableHeaderRow does not exist.`);var i;if(n=!0,typeof this.internal.__cell__.headerFunction==`function`){var s=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(s[0],s[1],s[2],s[3],void 0,-1)}this.setFont(void 0,`bold`);for(var l=[],u=0;u<this.internal.__cell__.tableHeaderRow.length;u+=1){i=this.internal.__cell__.tableHeaderRow[u].clone(),t&&(i.y=this.internal.__cell__.margins.top||0,l.push(i)),i.lineNumber=e;var d=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),o.call(this,i),this.setTextColor(d)}l.length>0&&this.setTableHeaderRow(l),this.setFont(void 0,`normal`),n=!1}}(c9.API);var g2t={italic:[`italic`,`oblique`,`normal`],oblique:[`oblique`,`italic`,`normal`],normal:[`normal`,`oblique`,`italic`]},_2t=[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`],v2t=h2t(_2t),y2t=[100,200,300,400,500,600,700,800,900],b2t=h2t(y2t);function x2t(e){var t=e.family.replace(/"|'/g,``).toLowerCase(),n=function(e){return g2t[e||=`normal`]?e:`normal`}(e.style),r=function(e){return e?typeof e==`number`?e>=100&&e<=900&&e%100==0?e:400:/^\d00$/.test(e)?parseInt(e):e===`bold`?700:400:400}(e.weight),i=function(e){return typeof v2t[e||=`normal`]==`number`?e:`normal`}(e.stretch);return{family:t,style:n,weight:r,stretch:i,src:e.src||[],ref:e.ref||{name:t,style:[i,n,r].join(` `)}}}function S2t(e,t,n,r){for(var i=n;i>=0&&i<t.length;i+=r)if(e[t[i]])return e[t[i]];for(i=n;i>=0&&i<t.length;i-=r)if(e[t[i]])return e[t[i]]}var C2t={"sans-serif":`helvetica`,fixed:`courier`,monospace:`courier`,terminal:`courier`,cursive:`times`,fantasy:`times`,serif:`times`},w2t={caption:`times`,icon:`times`,menu:`times`,"message-box":`times`,"small-caption":`times`,"status-bar":`times`};function T2t(e){return[e.stretch,e.style,e.weight,e.family].join(` `)}function E2t(e){return e.trimLeft()}function D2t(e,t){for(var n=0;n<e.length;){if(e.charAt(n)===t)return[e.substring(0,n),e.substring(n+1)];n+=1}return null}function O2t(e){var t=e.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return t===null?null:[t[0],e.substring(t[0].length)]}var F9,I9,k2t,A2t,j2t,M2t=[`times`];function N2t(e,t,n,r,i){var a=4,o=I2t;switch(i){case c9.API.image_compression.FAST:a=1,o=F2t;break;case c9.API.image_compression.MEDIUM:a=6,o=L2t;break;case c9.API.image_compression.SLOW:a=9,o=R2t}e=function(e,t,n,r){for(var i,a=e.length/t,o=new Uint8Array(e.length+a),s=[P2t,F2t,I2t,L2t,R2t],l=0;l<a;l+=1){var u=l*t,d=e.subarray(u,u+t);if(r)o.set(r(d,n,i),u+l);else{for(var f=s.length,p=[],m=0;m<f;m+=1)p[m]=s[m](d,n,i);var h=B2t(p.concat());o.set(p[h],u+l)}i=d}return o}(e,t,Math.ceil(n*r/8),o);var s=EKt(e,{level:a});return c9.API.__addimage__.arrayBufferToBinaryString(s)}function P2t(e){var t=Array.apply([],e);return t.unshift(0),t}function F2t(e,t){var n=e.length,r=[];r[0]=1;for(var i=0;i<n;i+=1){var a=e[i-t]||0;r[i+1]=e[i]-a+256&255}return r}function I2t(e,t,n){var r=e.length,i=[];i[0]=2;for(var a=0;a<r;a+=1){var o=n&&n[a]||0;i[a+1]=e[a]-o+256&255}return i}function L2t(e,t,n){var r=e.length,i=[];i[0]=3;for(var a=0;a<r;a+=1){var o=e[a-t]||0,s=n&&n[a]||0;i[a+1]=e[a]+256-(o+s>>>1)&255}return i}function R2t(e,t,n){var r=e.length,i=[];i[0]=4;for(var a=0;a<r;a+=1){var o=z2t(e[a-t]||0,n&&n[a]||0,n&&n[a-t]||0);i[a+1]=e[a]-o+256&255}return i}function z2t(e,t,n){if(e===t&&t===n)return e;var r=Math.abs(t-n),i=Math.abs(e-n),a=Math.abs(e+t-n-n);return r<=i&&r<=a?e:i<=a?t:n}function B2t(e){var t=e.map(function(e){return e.reduce(function(e,t){return e+Math.abs(t)},0)});return t.indexOf(Math.min.apply(null,t))}function V2t(e,t,n){var r=t*n,i=Math.floor(r/8),a=16-(r-8*i+n),o=(1<<n)-1;return U2t(e,i)>>a&o}function H2t(e,t,n,r){var i=n*r,a=Math.floor(i/8),o=16-(i-8*a+r),s=(1<<r)-1,l=(t&s)<<o;(function(e,t,n){if(t+1<e.byteLength)e.setUint16(t,n,!1);else{var r=n>>8&255;e.setUint8(t,r)}})(e,a,U2t(e,a)&~(s<<o)&65535|l)}function U2t(e,t){return t+1<e.byteLength?e.getUint16(t,!1):e.getUint8(t)<<8}function W2t(e){var t=0;if(e[t++]!==71||e[t++]!==73||e[t++]!==70||e[t++]!==56||(e[t++]+1&253)!=56||e[t++]!==97)throw Error(`Invalid GIF 87a/89a header.`);var n=e[t++]|e[t++]<<8,r=e[t++]|e[t++]<<8,i=e[t++],a=i>>7,o=1<<1+(7&i);e[t++],e[t++];var s=null,l=null;a&&(s=t,l=o,t+=3*o);var u=!0,d=[],f=0,p=null,m=0,h=null;for(this.width=n,this.height=r;u&&t<e.length;)switch(e[t++]){case 33:switch(e[t++]){case 255:if(e[t]!==11||e[t+1]==78&&e[t+2]==69&&e[t+3]==84&&e[t+4]==83&&e[t+5]==67&&e[t+6]==65&&e[t+7]==80&&e[t+8]==69&&e[t+9]==50&&e[t+10]==46&&e[t+11]==48&&e[t+12]==3&&e[t+13]==1&&e[t+16]==0)t+=14,h=e[t++]|e[t++]<<8,t++;else for(t+=12;;){if(!((O=e[t++])>=0))throw Error(`Invalid block size`);if(O===0)break;t+=O}break;case 249:if(e[t++]!==4||e[t+4]!==0)throw Error(`Invalid graphics extension block.`);var g=e[t++];f=e[t++]|e[t++]<<8,p=e[t++],1&g||(p=null),m=g>>2&7,t++;break;case 254:for(;;){if(!((O=e[t++])>=0))throw Error(`Invalid block size`);if(O===0)break;t+=O}break;default:throw Error(`Unknown graphic control label: 0x`+e[t-1].toString(16))}break;case 44:var _=e[t++]|e[t++]<<8,v=e[t++]|e[t++]<<8,y=e[t++]|e[t++]<<8,b=e[t++]|e[t++]<<8,x=e[t++],S=x>>6&1,C=1<<1+(7&x),w=s,T=l,E=!1;x>>7&&(E=!0,w=t,T=C,t+=3*C);var D=t;for(t++;;){var O;if(!((O=e[t++])>=0))throw Error(`Invalid block size`);if(O===0)break;t+=O}d.push({x:_,y:v,width:y,height:b,has_local_palette:E,palette_offset:w,palette_size:T,data_offset:D,data_length:t-D,transparent_index:p,interlaced:!!S,delay:f,disposal:m});break;case 59:u=!1;break;default:throw Error(`Unknown gif block: 0x`+e[t-1].toString(16))}this.numFrames=function(){return d.length},this.loopCount=function(){return h},this.frameInfo=function(e){if(e<0||e>=d.length)throw Error(`Frame index out of range.`);return d[e]},this.decodeAndBlitFrameBGRA=function(t,r){var i=this.frameInfo(t),a=i.width*i.height;if(a>536870912)throw Error(`Image dimensions exceed 512MB, which is too large.`);var o=new Uint8Array(a);G2t(e,i.data_offset,o,a);var s=i.palette_offset,l=i.transparent_index;l===null&&(l=256);var u=i.width,d=n-u,f=u,p=4*(i.y*n+i.x),m=4*((i.y+i.height)*n+i.x),h=p,g=4*d;!0===i.interlaced&&(g+=4*n*7);for(var _=8,v=0,y=o.length;v<y;++v){var b=o[v];if(f===0&&(f=u,(h+=g)>=m&&(g=4*d+4*n*(_-1),h=p+(u+d)*(_<<1),_>>=1)),b===l)h+=4;else{var x=e[s+3*b],S=e[s+3*b+1],C=e[s+3*b+2];r[h++]=C,r[h++]=S,r[h++]=x,r[h++]=255}--f}},this.decodeAndBlitFrameRGBA=function(t,r){var i=this.frameInfo(t),a=i.width*i.height;if(a>536870912)throw Error(`Image dimensions exceed 512MB, which is too large.`);var o=new Uint8Array(a);G2t(e,i.data_offset,o,a);var s=i.palette_offset,l=i.transparent_index;l===null&&(l=256);var u=i.width,d=n-u,f=u,p=4*(i.y*n+i.x),m=4*((i.y+i.height)*n+i.x),h=p,g=4*d;!0===i.interlaced&&(g+=4*n*7);for(var _=8,v=0,y=o.length;v<y;++v){var b=o[v];if(f===0&&(f=u,(h+=g)>=m&&(g=4*d+4*n*(_-1),h=p+(u+d)*(_<<1),_>>=1)),b===l)h+=4;else{var x=e[s+3*b],S=e[s+3*b+1],C=e[s+3*b+2];r[h++]=x,r[h++]=S,r[h++]=C,r[h++]=255}--f}}}function G2t(e,t,n,r){for(var i=e[t++],a=1<<i,o=a+1,s=o+1,l=i+1,u=(1<<l)-1,d=0,f=0,p=0,m=e[t++],h=new Int32Array(4096),g=null;;){for(;d<16&&m!==0;)f|=e[t++]<<d,d+=8,m===1?m=e[t++]:--m;if(d<l)break;var _=f&u;if(f>>=l,d-=l,_!==a){if(_===o)break;for(var v=_<s?_:g,y=0,b=v;b>a;)b=h[b]>>8,++y;var x=b;if(p+y+(v===_?0:1)>r)return void q7.log(`Warning, gif stream longer than expected.`);n[p++]=x;var S=p+=y;for(v!==_&&(n[p++]=x),b=v;y--;)b=h[b],n[--S]=255&b,b>>=8;g!==null&&s<4096&&(h[s++]=g<<8|x,s>=u+1&&l<12&&(++l,u=u<<1|1)),g=_}else s=o+1,u=(1<<(l=i+1))-1,g=null}return p!==r&&q7.log(`Warning, gif stream shorter than expected.`),n}function K2t(e){var t,n,r,i,a,o=Math.floor,s=Array(64),l=Array(64),u=Array(64),d=Array(64),f=Array(65535),p=Array(65535),m=Array(64),h=Array(64),g=[],_=0,v=7,y=Array(64),b=Array(64),x=Array(64),S=Array(256),C=Array(2048),w=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],T=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],E=[0,1,2,3,4,5,6,7,8,9,10,11],D=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],O=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],k=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],A=[0,1,2,3,4,5,6,7,8,9,10,11],j=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],M=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function N(e,t){for(var n=0,r=0,i=[],a=1;a<=16;a++){for(var o=1;o<=e[a];o++)i[t[r]]=[],i[t[r]][0]=n,i[t[r]][1]=a,r++,n++;n*=2}return i}function P(e){for(var t=e[0],n=e[1]-1;n>=0;)t&1<<n&&(_|=1<<v),n--,--v<0&&(_==255?(F(255),F(0)):F(_),v=7,_=0)}function F(e){g.push(e)}function I(e){F(e>>8&255),F(255&e)}function L(e,t,n,r,i){for(var a,o=i[0],s=i[240],l=function(e,t){var n,r,i,a,o,s,l,u,d,f,p=0;for(d=0;d<8;++d){n=e[p],r=e[p+1],i=e[p+2],a=e[p+3],o=e[p+4],s=e[p+5],l=e[p+6];var h=n+(u=e[p+7]),g=n-u,_=r+l,v=r-l,y=i+s,b=i-s,x=a+o,S=a-o,C=h+x,w=h-x,T=_+y,E=_-y;e[p]=C+T,e[p+4]=C-T;var D=.707106781*(E+w);e[p+2]=w+D,e[p+6]=w-D;var O=.382683433*((C=S+b)-(E=v+g)),k=.5411961*C+O,A=1.306562965*E+O,j=.707106781*(T=b+v),M=g+j,N=g-j;e[p+5]=N+k,e[p+3]=N-k,e[p+1]=M+A,e[p+7]=M-A,p+=8}for(p=0,d=0;d<8;++d){n=e[p],r=e[p+8],i=e[p+16],a=e[p+24],o=e[p+32],s=e[p+40],l=e[p+48];var P=n+(u=e[p+56]),F=n-u,I=r+l,L=r-l,R=i+s,ee=i-s,z=a+o,B=a-o,V=P+z,te=P-z,ne=I+R,re=I-R;e[p]=V+ne,e[p+32]=V-ne;var ie=.707106781*(re+te);e[p+16]=te+ie,e[p+48]=te-ie;var ae=.382683433*((V=B+ee)-(re=L+F)),oe=.5411961*V+ae,se=1.306562965*re+ae,ce=.707106781*(ne=ee+L),le=F+ce,H=F-ce;e[p+40]=H+oe,e[p+24]=H-oe,e[p+8]=le+se,e[p+56]=le-se,p++}for(d=0;d<64;++d)f=e[d]*t[d],m[d]=f>0?f+.5|0:f-.5|0;return m}(e,t),u=0;u<64;++u)h[w[u]]=l[u];var d=h[0]-n;n=h[0],d==0?P(r[0]):(P(r[p[a=32767+d]]),P(f[a]));for(var g=63;g>0&&h[g]==0;)g--;if(g==0)return P(o),n;for(var _,v=1;v<=g;){for(var y=v;h[v]==0&&v<=g;)++v;var b=v-y;if(b>=16){_=b>>4;for(var x=1;x<=_;++x)P(s);b&=15}a=32767+h[v],P(i[(b<<4)+p[a]]),P(f[a]),v++}return g!=63&&P(o),n}function R(e){e=Math.min(Math.max(e,1),100),a!=e&&(function(e){for(var t=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var r=o((t[n]*e+50)/100);r=Math.min(Math.max(r,1),255),s[w[n]]=r}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],a=0;a<64;a++){var f=o((i[a]*e+50)/100);f=Math.min(Math.max(f,1),255),l[w[a]]=f}for(var p=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],m=0,h=0;h<8;h++)for(var g=0;g<8;g++)u[m]=1/(s[w[m]]*p[h]*p[g]*8),d[m]=1/(l[w[m]]*p[h]*p[g]*8),m++}(Math.floor(e<50?5e3/e:200-2*e)),a=e)}this.encode=function(e,a){a&&R(a),g=[],_=0,v=7,I(65496),I(65504),I(16),F(74),F(70),F(73),F(70),F(0),F(1),F(1),F(0),I(1),I(1),F(0),F(0),function(){I(65499),I(132),F(0);for(var e=0;e<64;e++)F(s[e]);F(1);for(var t=0;t<64;t++)F(l[t])}(),function(e,t){I(65472),I(17),F(8),I(t),I(e),F(3),F(1),F(17),F(0),F(2),F(17),F(1),F(3),F(17),F(1)}(e.width,e.height),function(){I(65476),I(418),F(0);for(var e=0;e<16;e++)F(T[e+1]);for(var t=0;t<=11;t++)F(E[t]);F(16);for(var n=0;n<16;n++)F(D[n+1]);for(var r=0;r<=161;r++)F(O[r]);F(1);for(var i=0;i<16;i++)F(k[i+1]);for(var a=0;a<=11;a++)F(A[a]);F(17);for(var o=0;o<16;o++)F(j[o+1]);for(var s=0;s<=161;s++)F(M[s])}(),I(65498),I(12),F(3),F(1),F(0),F(2),F(17),F(3),F(17),F(0),F(63),F(0);var o=0,f=0,p=0;_=0,v=7,this.encode.displayName=`_encode_`;for(var m,h,S,w,N,ee,z,B,V,te=e.data,ne=e.width,re=e.height,ie=4*ne,ae=0;ae<re;){for(m=0;m<ie;){for(N=ie*ae+m,z=-1,B=0,V=0;V<64;V++)ee=N+(B=V>>3)*ie+(z=4*(7&V)),ae+B>=re&&(ee-=ie*(ae+1+B-re)),m+z>=ie&&(ee-=m+z-ie+4),h=te[ee++],S=te[ee++],w=te[ee++],y[V]=(C[h]+C[S+256|0]+C[w+512|0]>>16)-128,b[V]=(C[h+768|0]+C[S+1024|0]+C[w+1280|0]>>16)-128,x[V]=(C[h+1280|0]+C[S+1536|0]+C[w+1792|0]>>16)-128;o=L(y,u,o,t,r),f=L(b,d,f,n,i),p=L(x,d,p,n,i),m+=32}ae+=8}if(v>=0){var oe=[];oe[1]=v+1,oe[0]=(1<<v+1)-1,P(oe)}return I(65497),new Uint8Array(g)},e||=50,function(){for(var e=String.fromCharCode,t=0;t<256;t++)S[t]=e(t)}(),t=N(T,E),n=N(k,A),r=N(D,O),i=N(j,M),function(){for(var e=1,t=2,n=1;n<=15;n++){for(var r=e;r<t;r++)p[32767+r]=n,f[32767+r]=[],f[32767+r][1]=n,f[32767+r][0]=r;for(var i=-(t-1);i<=-e;i++)p[32767+i]=n,f[32767+i]=[],f[32767+i][1]=n,f[32767+i][0]=t-1+i;e<<=1,t<<=1}}(),function(){for(var e=0;e<256;e++)C[e]=19595*e,C[e+256|0]=38470*e,C[e+512|0]=7471*e+32768,C[e+768|0]=-11059*e,C[e+1024|0]=-21709*e,C[e+1280|0]=32768*e+8421375,C[e+1536|0]=-27439*e,C[e+1792|0]=-5329*e}(),R(e)}function L9(e,t){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,[`BM`,`BA`,`CI`,`CP`,`IC`,`PT`].indexOf(this.flag)===-1)throw Error(`Invalid BMP File`);this.parseHeader(),this.parseBGR()}function q2t(e){function t(e){if(!e)throw Error(`assert :P`)}function n(e,t,n){for(var r=0;4>r;r++)if(e[t+r]!=n.charCodeAt(r))return!0;return!1}function r(e,t,n,r,i){for(var a=0;a<i;a++)e[t+a]=n[r+a]}function i(e,t,n,r){for(var i=0;i<r;i++)e[t+i]=n}function a(e){return new Int32Array(e)}function o(e,t){for(var n=[],r=0;r<e;r++)n.push(new t);return n}function s(e,t){var n=[];return function e(n,r,i){for(var a=i[r],o=0;o<a&&(n.push(i.length>r+1?[]:new t),!(i.length<r+1));o++)e(n[o],r+1,i)}(n,0,e),n}var l=function(){var e=this;function l(e,t){for(var n=1<<t-1>>>0;e&n;)n>>>=1;return n?(e&n-1)+n:e}function u(e,n,r,i,a){t(!(i%r));do e[n+(i-=r)]=a;while(0<i)}function d(e,n,r,i,o){if(t(2328>=o),512>=o)var s=a(512);else if((s=a(o))==null)return 0;return function(e,n,r,i,o,s){var d,p,m=n,h=1<<r,g=a(16),_=a(16);for(t(o!=0),t(i!=null),t(e!=null),t(0<r),p=0;p<o;++p){if(15<i[p])return 0;++g[i[p]]}if(g[0]==o)return 0;for(_[1]=0,d=1;15>d;++d){if(g[d]>1<<d)return 0;_[d+1]=_[d]+g[d]}for(p=0;p<o;++p)d=i[p],0<i[p]&&(s[_[d]++]=p);if(_[15]==1)return(i=new f).g=0,i.value=s[0],u(e,m,1,h,i),h;var v,y=-1,b=h-1,x=0,S=1,C=1,w=1<<r;for(p=0,d=1,o=2;d<=r;++d,o<<=1){if(S+=C<<=1,0>(C-=g[d]))return 0;for(;0<g[d];--g[d])(i=new f).g=d,i.value=s[p++],u(e,m+x,o,w,i),x=l(x,d)}for(d=r+1,o=2;15>=d;++d,o<<=1){if(S+=C<<=1,0>(C-=g[d]))return 0;for(;0<g[d];--g[d]){if(i=new f,(x&b)!=y){for(m+=w,v=1<<(y=d)-r;15>y&&!(0>=(v-=g[y]));)++y,v<<=1;h+=w=1<<(v=y-r),e[n+(y=x&b)].g=v+r,e[n+y].value=m-n-y}i.g=d-r,i.value=s[p++],u(e,m+(x>>r),o,w,i),x=l(x,d)}}return S==2*_[15]-1?h:0}(e,n,r,i,o,s)}function f(){this.value=this.g=0}function p(){this.value=this.g=0}function m(){this.G=o(5,f),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(Xn,p)}function h(e,n,r,i){t(e!=null),t(n!=null),t(2147483648>i),e.Ca=254,e.I=0,e.b=-8,e.Ka=0,e.oa=n,e.pa=r,e.Jd=n,e.Yc=r+i,e.Zc=4<=i?r+i-4+1:r,D(e)}function g(e,t){for(var n=0;0<t--;)n|=k(e,128)<<t;return n}function _(e,t){var n=g(e,t);return O(e)?-n:n}function v(e,n,r,i){var a,o=0;for(t(e!=null),t(n!=null),t(4294967288>i),e.Sb=i,e.Ra=0,e.u=0,e.h=0,4<i&&(i=4),a=0;a<i;++a)o+=n[r+a]<<8*a;e.Ra=o,e.bb=i,e.oa=n,e.pa=r}function y(e){for(;8<=e.u&&e.bb<e.Sb;)e.Ra>>>=8,e.Ra+=e.oa[e.pa+e.bb]<<$n-8>>>0,++e.bb,e.u-=8;w(e)&&(e.h=1,e.u=0)}function b(e,n){if(t(0<=n),!e.h&&n<=Qn){var r=C(e)&Zn[n];return e.u+=n,y(e),r}return e.h=1,e.u=0}function x(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function S(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function C(e){return e.Ra>>>(e.u&$n-1)>>>0}function w(e){return t(e.bb<=e.Sb),e.h||e.bb==e.Sb&&e.u>$n}function T(e,t){e.u=t,e.h=w(e)}function E(e){e.u>=er&&(t(e.u>=er),y(e))}function D(e){t(e!=null&&e.oa!=null),e.pa<e.Zc?(e.I=(e.oa[e.pa++]|e.I<<8)>>>0,e.b+=8):(t(e!=null&&e.oa!=null),e.pa<e.Yc?(e.b+=8,e.I=e.oa[e.pa++]|e.I<<8):e.Ka?e.b=0:(e.I<<=8,e.b+=8,e.Ka=1))}function O(e){return g(e,1)}function k(e,t){var n=e.Ca;0>e.b&&D(e);var r=e.b,i=n*t>>>8,a=(e.I>>>r>i)+0;for(a?(n-=i,e.I-=i+1<<r>>>0):n=i+1,r=n,i=0;256<=r;)i+=8,r>>=8;return r=7^i+tr[r],e.b-=r,e.Ca=(n<<r)-1,a}function A(e,t,n){e[t+0]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n}function j(e,t){return e[t+0]|e[t+1]<<8}function M(e,t){return j(e,t)|e[t+2]<<16}function N(e,t){return j(e,t)|j(e,t+2)<<16}function P(e,n){var r=1<<n;return t(e!=null),t(0<n),e.X=a(r),e.X==null?0:(e.Mb=32-n,e.Xa=n,1)}function F(e,n){t(e!=null),t(n!=null),t(e.Xa==n.Xa),r(n.X,0,e.X,0,1<<n.Xa)}function I(){this.X=[],this.Xa=this.Mb=0}function L(e,n,r,i){t(r!=null),t(i!=null);var a=r[0],o=i[0];return a==0&&(a=(e*o+n/2)/n),o==0&&(o=(n*a+e/2)/e),0>=a||0>=o?0:(r[0]=a,i[0]=o,1)}function R(e,t){return e+(1<<t)-1>>>t}function ee(e,t){return((4278255360&e)+(4278255360&t)>>>0&4278255360)+((16711935&e)+(16711935&t)>>>0&16711935)>>>0}function z(t,n){e[n]=function(n,r,i,a,o,s,l){for(var u=0;u<o;++u){var d=e[t](s[l+u-1],i,a+u);s[l+u]=ee(n[r+u],d)}}}function B(){this.ud=this.hd=this.jd=0}function V(e,t){return((4278124286&(e^t))>>>1)+(e&t)>>>0}function te(e){return 0<=e&&256>e?e:0>e?0:255<e?255:void 0}function ne(e,t){return te(e+(e-t+.5>>1))}function re(e,t,n){return Math.abs(t-n)-Math.abs(e-n)}function ie(e,t,n,r,i,a,o){for(r=a[o-1],n=0;n<i;++n)a[o+n]=r=ee(e[t+n],r)}function ae(e,t,n,r,i){for(var a=0;a<n;++a){var o=e[t+a],s=o>>8&255,l=16711935&(l=(l=16711935&o)+((s<<16)+s));r[i+a]=(4278255360&o)+l>>>0}}function oe(e,t){t.jd=255&e,t.hd=e>>8&255,t.ud=e>>16&255}function se(e,t,n,r,i,a){for(var o=0;o<r;++o){var s=t[n+o],l=s>>>8,u=s,d=255&(d=(d=s>>>16)+((e.jd<<24>>24)*(l<<24>>24)>>>5));u=255&(u=(u+=(e.hd<<24>>24)*(l<<24>>24)>>>5)+((e.ud<<24>>24)*(d<<24>>24)>>>5)),i[a+o]=(4278255360&s)+(d<<16)+u}}function ce(t,n,r,i,a){e[n]=function(e,t,n,r,o,s,l,u,d){for(r=l;r<u;++r)for(l=0;l<d;++l)o[s++]=a(n[i(e[t++])])},e[t]=function(t,n,o,s,l,u,d){var f=8>>t.b,p=t.Ea,m=t.K[0],h=t.w;if(8>f)for(t=(1<<t.b)-1,h=(1<<f)-1;n<o;++n){var g,_=0;for(g=0;g<p;++g)g&t||(_=i(s[l++])),u[d++]=a(m[_&h]),_>>=f}else e[`VP8LMapColor`+r](s,l,m,h,u,d,n,o,p)}}function le(e,t,n,r,i){for(n=t+n;t<n;){var a=e[t++];r[i++]=a>>16&255,r[i++]=a>>8&255,r[i++]=255&a}}function H(e,t,n,r,i){for(n=t+n;t<n;){var a=e[t++];r[i++]=a>>16&255,r[i++]=a>>8&255,r[i++]=255&a,r[i++]=a>>24&255}}function ue(e,t,n,r,i){for(n=t+n;t<n;){var a=(o=e[t++])>>16&240|o>>12&15,o=240&o|o>>28&15;r[i++]=a,r[i++]=o}}function de(e,t,n,r,i){for(n=t+n;t<n;){var a=(o=e[t++])>>16&248|o>>13&7,o=o>>5&224|o>>3&31;r[i++]=a,r[i++]=o}}function fe(e,t,n,r,i){for(n=t+n;t<n;){var a=e[t++];r[i++]=255&a,r[i++]=a>>8&255,r[i++]=a>>16&255}}function pe(e,t,n,i,a,o){if(o==0)for(n=t+n;t<n;)A(i,((o=e[t++])[0]>>24|o[1]>>8&65280|o[2]<<8&16711680|o[3]<<24)>>>0),a+=32;else r(i,a,e,t,n)}function me(t,n){e[n][0]=e[t+`0`],e[n][1]=e[t+`1`],e[n][2]=e[t+`2`],e[n][3]=e[t+`3`],e[n][4]=e[t+`4`],e[n][5]=e[t+`5`],e[n][6]=e[t+`6`],e[n][7]=e[t+`7`],e[n][8]=e[t+`8`],e[n][9]=e[t+`9`],e[n][10]=e[t+`10`],e[n][11]=e[t+`11`],e[n][12]=e[t+`12`],e[n][13]=e[t+`13`],e[n][14]=e[t+`0`],e[n][15]=e[t+`0`]}function he(e){return e==ei||e==ti||e==ni||e==ri}function ge(){this.eb=[],this.size=this.A=this.fb=0}function _e(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function ve(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new ge,this.f.kb=new _e,this.sd=null}function ye(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function be(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function xe(e){return alert(`todo:WebPSamplerProcessPlane`),e.T}function Se(e,t){var n=e.T,i=t.ba.f.RGBA,a=i.eb,o=i.fb+e.ka*i.A,s=Oi[t.ba.S],l=e.y,u=e.O,d=e.f,f=e.N,p=e.ea,m=e.W,h=t.cc,g=t.dc,_=t.Mc,v=t.Nc,y=e.ka,b=e.ka+e.T,x=e.U,S=x+1>>1;for(y==0?s(l,u,null,null,d,f,p,m,d,f,p,m,a,o,null,null,x):(s(t.ec,t.fc,l,u,h,g,_,v,d,f,p,m,a,o-i.A,a,o,x),++n);y+2<b;y+=2)h=d,g=f,_=p,v=m,f+=e.Rc,m+=e.Rc,o+=2*i.A,s(l,(u+=2*e.fa)-e.fa,l,u,h,g,_,v,d,f,p,m,a,o-i.A,a,o,x);return u+=e.fa,e.j+b<e.o?(r(t.ec,t.fc,l,u,x),r(t.cc,t.dc,d,f,S),r(t.Mc,t.Nc,p,m,S),n--):1&b||s(l,u,null,null,d,f,p,m,d,f,p,m,a,o+i.A,null,null,x),n}function Ce(e,n,r){var i=e.F,a=[e.J];if(i!=null){var o=e.U,s=n.ba.S,l=s==Zr||s==ni;n=n.ba.f.RGBA;var u=[0],d=e.ka;u[0]=e.T,e.Kb&&(d==0?--u[0]:(--d,a[0]-=e.width),e.j+e.ka+e.T==e.o&&(u[0]=e.o-e.j-d));var f=n.eb;d=n.fb+d*n.A,e=Ir(i,a[0],e.width,o,u,f,d+(l?0:3),n.A),t(r==u),e&&he(s)&&Pr(f,d,l,o,u,n.A)}return 0}function we(e){var t=e.ma,n=t.ba.S,r=11>n,i=n==Jr||n==Xr||n==Zr||n==Qr||n==12||he(n);if(t.memory=null,t.Ib=null,t.Jb=null,t.Nd=null,!qn(t.Oa,e,i?11:12))return 0;if(i&&he(n)&&An(),e.da)alert(`todo:use_scaling`);else{if(r){if(t.Ib=xe,e.Kb){if(n=e.U+1>>1,t.memory=a(e.U+2*n),t.memory==null)return 0;t.ec=t.memory,t.fc=0,t.cc=t.ec,t.dc=t.fc+e.U,t.Mc=t.cc,t.Nc=t.dc+n,t.Ib=Se,An()}}else alert(`todo:EmitYUV`);i&&(t.Jb=Ce,r&&On())}if(r&&!Hi){for(e=0;256>e;++e)Ui[e]=89858*(e-128)+Li>>Ii,Ki[e]=-22014*(e-128)+Li,Gi[e]=-45773*(e-128),Wi[e]=113618*(e-128)+Li>>Ii;for(e=Ri;e<zi;++e)t=76283*(e-16)+Li>>Ii,qi[e-Ri]=rt(t,255),Ji[e-Ri]=rt(t+8>>4,15);Hi=1}return 1}function Te(e){var n=e.ma,r=e.U,i=e.T;return t(!(1&e.ka)),0>=r||0>=i?0:(r=n.Ib(e,n),n.Jb!=null&&n.Jb(e,n,r),n.Dc+=r,1)}function Ee(e){e.ma.memory=null}function De(e,t,n,r){return b(e,8)==47?(t[0]=b(e,14)+1,n[0]=b(e,14)+1,r[0]=b(e,1),b(e,3)==0?!e.h:0):0}function Oe(e,t){if(4>e)return e+1;var n=e-2>>1;return(2+(1&e)<<n)+b(t,n)+1}function ke(e,t){return 120<t?t-120:1<=(n=((n=li[t-1])>>4)*e+(8-(15&n)))?n:1;var n}function Ae(e,t,n){var r=C(n),i=e[t+=255&r].g-8;return 0<i&&(T(n,n.u+8),r=C(n),t+=e[t].value,t+=r&(1<<i)-1),T(n,n.u+e[t].g),e[t].value}function je(e,n,r){return r.g+=e.g,r.value+=e.value<<n>>>0,t(8>=r.g),e.g}function Me(e,n,r){var i=e.xc;return t((n=i==0?0:e.vc[e.md*(r>>i)+(n>>i)])<e.Wb),e.Ya[n]}function Ne(e,n,i,a){var o=e.ab,s=e.c*n,l=e.C;n=l+n;var u=i,d=a;for(a=e.Ta,i=e.Ua;0<o--;){var f=e.gc[o],p=l,m=n,h=u,g=d,_=(d=a,u=i,f.Ea);switch(t(p<m),t(m<=f.nc),f.hc){case 2:ir(h,g,(m-p)*_,d,u);break;case 0:var v=p,y=m,b=d,x=u,S=(D=f).Ea;v==0&&(nr(h,g,null,null,1,b,x),ie(h,g+1,0,0,S-1,b,x+1),g+=S,x+=S,++v);for(var C=1<<D.b,w=C-1,T=R(S,D.b),E=D.K,D=D.w+(v>>D.b)*T;v<y;){var O=E,k=D,A=1;for(rr(h,g,b,x-S,1,b,x);A<S;){var j=(A&~w)+C;j>S&&(j=S),(0,lr[O[k++]>>8&15])(h,g+ +A,b,x+A-S,j-A,b,x+A),A=j}g+=S,x+=S,++v&w||(D+=T)}m!=f.nc&&r(d,u-_,d,u+(m-p-1)*_,_);break;case 1:for(_=h,y=g,S=(h=f.Ea)-(x=h&~(b=(g=1<<f.b)-1)),v=R(h,f.b),C=f.K,f=f.w+(p>>f.b)*v;p<m;){for(w=C,T=f,E=new B,D=y+x,O=y+h;y<D;)oe(w[T++],E),ur(E,_,y,g,d,u),y+=g,u+=g;y<O&&(oe(w[T++],E),ur(E,_,y,S,d,u),y+=S,u+=S),++p&b||(f+=v)}break;case 3:if(h==d&&g==u&&0<f.b){for(y=d,h=_=u+(m-p)*_-(x=(m-p)*R(f.Ea,f.b)),g=d,b=u,v=[],x=(S=x)-1;0<=x;--x)v[x]=g[b+x];for(x=S-1;0<=x;--x)y[h+x]=v[x];ar(f,p,m,d,_,d,u)}else ar(f,p,m,h,g,d,u)}u=a,d=i}d!=i&&r(a,i,u,d,s)}function Pe(e,n){var r=e.V,i=e.Ba+e.c*e.C,a=n-e.C;if(t(n<=e.l.o),t(16>=a),0<a){var o=e.l,s=e.Ta,l=e.Ua,u=o.width;if(Ne(e,a,r,i),a=l=[l],t((r=e.C)<(i=n)),t(o.v<o.va),i>o.o&&(i=o.o),r<o.j){var d=o.j-r;r=o.j,a[0]+=d*u}if(r>=i?r=0:(a[0]+=4*o.v,o.ka=r-o.j,o.U=o.va-o.v,o.T=i-r,r=1),r){if(l=l[0],11>(r=e.ca).S){var f=r.f.RGBA,p=(i=r.S,a=o.U,o=o.T,d=f.eb,f.A),m=o;for(f=f.fb+e.Ma*f.A;0<m--;){var h=s,g=l,_=a,v=d,y=f;switch(i){case qr:dr(h,g,_,v,y);break;case Jr:fr(h,g,_,v,y);break;case ei:fr(h,g,_,v,y),Pr(v,y,0,_,1,0);break;case Yr:hr(h,g,_,v,y);break;case Xr:pe(h,g,_,v,y,1);break;case ti:pe(h,g,_,v,y,1),Pr(v,y,0,_,1,0);break;case Zr:pe(h,g,_,v,y,0);break;case ni:pe(h,g,_,v,y,0),Pr(v,y,1,_,1,0);break;case Qr:pr(h,g,_,v,y);break;case ri:pr(h,g,_,v,y),Fr(v,y,_,1,0);break;case $r:mr(h,g,_,v,y);break;default:t(0)}l+=u,f+=p}e.Ma+=o}else alert(`todo:EmitRescaledRowsYUVA`);t(e.Ma<=r.height)}}e.C=n,t(e.C<=e.i)}function Fe(e){var t;if(0<e.ua)return 0;for(t=0;t<e.Wb;++t){var n=e.Ya[t].G,r=e.Ya[t].H;if(0<n[1][r[1]+0].g||0<n[2][r[2]+0].g||0<n[3][r[3]+0].g)return 0}return 1}function Ie(e,n,r,i,a,o){if(e.Z!=0){var s=e.qd,l=e.rd;for(t(Di[e.Z]!=null);n<r;++n)Di[e.Z](s,l,i,a,i,a,o),s=i,l=a,a+=o;e.qd=s,e.rd=l}}function Le(e,n){var r=e.l.ma,i=r.Z==0||r.Z==1?e.l.j:e.C;if(i=e.C<i?i:e.C,t(n<=e.l.o),n>i){var a=e.l.width,o=r.ca,s=r.tb+a*i,l=e.V,u=e.Ba+e.c*i,d=e.gc;t(e.ab==1),t(d[0].hc==3),sr(d[0],i,n,l,u,o,s),Ie(r,i,n,o,s,a)}e.C=e.Ma=n}function Re(e,n,r,i,a,o,s){var l=e.$/i,u=e.$%i,d=e.m,f=e.s,p=r+e.$,m=p;a=r+i*a;var h=r+i*o,g=280+f.ua,_=e.Pb?l:16777216,v=0<f.ua?f.Wa:null,y=f.wc,b=p<h?Me(f,u,l):null;t(e.C<o),t(h<=a);var x=!1;t:for(;;){for(;x||p<h;){var S=0;if(l>=_){var D=p-r;t((_=e).Pb),_.wd=_.m,_.xd=D,0<_.s.ua&&F(_.s.Wa,_.s.vb),_=l+di}if(u&y||(b=Me(f,u,l)),t(b!=null),b.Qb&&(n[p]=b.qb,x=!0),!x){if(E(d),b.jc){S=d,D=n;var O=p,k=b.pd[C(S)&Xn-1];t(b.jc),256>k.g?(T(S,S.u+k.g),D[O]=k.value,S=0):(T(S,S.u+k.g-256),t(256<=k.value),S=k.value),S==0&&(x=!0)}else S=Ae(b.G[0],b.H[0],d)}if(d.h)break;if(x||256>S){if(!x){if(b.nd)n[p]=(b.qb|S<<8)>>>0;else{if(E(d),x=Ae(b.G[1],b.H[1],d),E(d),D=Ae(b.G[2],b.H[2],d),O=Ae(b.G[3],b.H[3],d),d.h)break;n[p]=(O<<24|x<<16|S<<8|D)>>>0}}if(x=!1,++p,++u>=i&&(u=0,++l,s!=null&&l<=o&&!(l%16)&&s(e,l),v!=null))for(;m<p;)S=n[m++],v.X[(506832829*S&4294967295)>>>v.Mb]=S}else if(280>S){if(S=Oe(S-256,d),D=Ae(b.G[4],b.H[4],d),E(d),D=ke(i,D=Oe(D,d)),d.h)break;if(p-r<D||a-p<S)break t;for(O=0;O<S;++O)n[p+O]=n[p+O-D];for(p+=S,u+=S;u>=i;)u-=i,++l,s!=null&&l<=o&&!(l%16)&&s(e,l);if(t(p<=a),u&y&&(b=Me(f,u,l)),v!=null)for(;m<p;)S=n[m++],v.X[(506832829*S&4294967295)>>>v.Mb]=S}else{if(!(S<g))break t;for(x=S-280,t(v!=null);m<p;)S=n[m++],v.X[(506832829*S&4294967295)>>>v.Mb]=S;S=p,t(!(x>>>(D=v).Xa)),n[S]=D.X[x],x=!0}x||t(d.h==w(d))}if(e.Pb&&d.h&&p<a)t(e.m.h),e.a=5,e.m=e.wd,e.$=e.xd,0<e.s.ua&&F(e.s.vb,e.s.Wa);else{if(d.h)break t;s?.(e,l>o?o:l),e.a=0,e.$=p-r}return 1}return e.a=3,0}function ze(e){t(e!=null),e.vc=null,e.yc=null,e.Ya=null;var n=e.Wa;n!=null&&(n.X=null),e.vb=null,t(e!=null)}function Be(){var t=new vn;return t==null?null:(t.a=0,t.xb=Ei,me(`Predictor`,`VP8LPredictors`),me(`Predictor`,`VP8LPredictors_C`),me(`PredictorAdd`,`VP8LPredictorsAdd`),me(`PredictorAdd`,`VP8LPredictorsAdd_C`),ir=ae,ur=se,dr=le,fr=H,pr=ue,mr=de,hr=fe,e.VP8LMapColor32b=or,e.VP8LMapColor8b=cr,t)}function Ve(e,n,r,s,l){var u=1,p=[e],h=[n],g=s.m,_=s.s,v=null,y=0;t:for(;;){if(r)for(;u&&b(g,1);){var x=p,S=h,w=s,D=1,O=w.m,k=w.gc[w.ab],A=b(O,2);if(w.Oc&1<<A)u=0;else{switch(w.Oc|=1<<A,k.hc=A,k.Ea=x[0],k.nc=S[0],k.K=[null],++w.ab,t(4>=w.ab),A){case 0:case 1:k.b=b(O,3)+2,D=Ve(R(k.Ea,k.b),R(k.nc,k.b),0,w,k.K),k.K=k.K[0];break;case 3:var j,M=b(O,8)+1,N=16<M?0:4<M?1:2<M?2:3;if(x[0]=R(k.Ea,N),k.b=N,j=D=Ve(M,1,0,w,k.K)){var F,I=M,L=k,z=1<<(8>>L.b),B=a(z);if(B==null)j=0;else{var V=L.K[0],te=L.w;for(B[0]=L.K[0][0],F=1;F<1*I;++F)B[F]=ee(V[te+F],B[F-1]);for(;F<4*z;++F)B[F]=0;L.K[0]=null,L.K[0]=B,j=1}}D=j;break;case 2:break;default:t(0)}u=D}}if(p=p[0],h=h[0],u&&b(g,1)&&!(u=1<=(y=b(g,4))&&11>=y)){s.a=3;break t}var ne;if(ne=u)e:{var re,ie,ae,oe=s,se=p,ce=h,le=y,H=r,ue=oe.m,de=oe.s,fe=[null],pe=1,me=0,he=ui[le];r:for(;;){if(H&&b(ue,1)){var ge=b(ue,3)+2,_e=R(se,ge),ve=R(ce,ge),ye=_e*ve;if(!Ve(_e,ve,0,oe,fe))break r;for(fe=fe[0],de.xc=ge,re=0;re<ye;++re){var be=fe[re]>>8&65535;fe[re]=be,be>=pe&&(pe=be+1)}}if(ue.h)break r;for(ie=0;5>ie;++ie){var xe=oi[ie];!ie&&0<le&&(xe+=1<<le),me<xe&&(me=xe)}var Se=o(pe*he,f),Ce=pe,we=o(Ce,m);if(we==null)var Te=null;else t(65536>=Ce),Te=we;var Ee=a(me);if(Te==null||Ee==null||Se==null){oe.a=1;break r}var De=Se;for(re=ae=0;re<pe;++re){var Oe=Te[re],ke=Oe.G,Ae=Oe.H,Me=0,Ne=1,Pe=0;for(ie=0;5>ie;++ie){xe=oi[ie],ke[ie]=De,Ae[ie]=ae,!ie&&0<le&&(xe+=1<<le);n:{var Fe,Ie=xe,Le=oe,Be=Ee,He=De,Ue=ae,We=0,Ge=Le.m,Ke=b(Ge,1);if(i(Be,0,0,Ie),Ke){var qe=b(Ge,1)+1,Je=b(Ge,b(Ge,1)==0?1:8);Be[Je]=1,qe==2&&(Be[Je=b(Ge,8)]=1);var Ye=1}else{var Xe=a(19),Ze=b(Ge,4)+4;if(19<Ze){Le.a=3;var Qe=0;break n}for(Fe=0;Fe<Ze;++Fe)Xe[ci[Fe]]=b(Ge,3);var $e=void 0,et=void 0,tt=Le,nt=Xe,rt=Ie,it=Be,at=0,ot=tt.m,st=8,ct=o(128,f);i:for(;d(ct,0,7,nt,19);){if(b(ot,1)){if(($e=2+b(ot,2+2*b(ot,3)))>rt)break i}else $e=rt;for(et=0;et<rt&&$e--;){E(ot);var lt=ct[0+(127&C(ot))];T(ot,ot.u+lt.g);var ut=lt.value;if(16>ut)it[et++]=ut,ut!=0&&(st=ut);else{var dt=ut==16,ft=ut-16,pt=ai[ft],mt=b(ot,ii[ft])+pt;if(et+mt>rt)break i;for(var ht=dt?st:0;0<mt--;)it[et++]=ht}}at=1;break i}at||(tt.a=3),Ye=at}(Ye&&=!Ge.h)&&(We=d(He,Ue,8,Be,Ie)),Ye&&We!=0?Qe=We:(Le.a=3,Qe=0)}if(Qe==0)break r;if(Ne&&si[ie]==1&&(Ne=De[ae].g==0),Me+=De[ae].g,ae+=Qe,3>=ie){var gt,_t=Ee[0];for(gt=1;gt<xe;++gt)Ee[gt]>_t&&(_t=Ee[gt]);Pe+=_t}}if(Oe.nd=Ne,Oe.Qb=0,Ne&&(Oe.qb=(ke[3][Ae[3]+0].value<<24|ke[1][Ae[1]+0].value<<16|ke[2][Ae[2]+0].value)>>>0,Me==0&&256>ke[0][Ae[0]+0].value&&(Oe.Qb=1,Oe.qb+=ke[0][Ae[0]+0].value<<8)),Oe.jc=!Oe.Qb&&6>Pe,Oe.jc){var vt,yt=Oe;for(vt=0;vt<Xn;++vt){var bt=vt,xt=yt.pd[bt],St=yt.G[0][yt.H[0]+bt];256<=St.value?(xt.g=St.g+256,xt.value=St.value):(xt.g=0,xt.value=0,bt>>=je(St,8,xt),bt>>=je(yt.G[1][yt.H[1]+bt],16,xt),bt>>=je(yt.G[2][yt.H[2]+bt],0,xt),je(yt.G[3][yt.H[3]+bt],24,xt))}}}de.vc=fe,de.Wb=pe,de.Ya=Te,de.yc=Se,ne=1;break e}ne=0}if(!(u=ne)){s.a=3;break t}if(0<y){if(_.ua=1<<y,!P(_.Wa,y)){s.a=1,u=0;break t}}else _.ua=0;var Ct=s,wt=p,Tt=h,Et=Ct.s,Dt=Et.xc;if(Ct.c=wt,Ct.i=Tt,Et.md=R(wt,Dt),Et.wc=Dt==0?-1:(1<<Dt)-1,r){s.xb=Ti;break t}if((v=a(p*h))==null){s.a=1,u=0;break t}u=(u=Re(s,v,0,p,h,h,null))&&!g.h;break t}return u?(l==null?(t(v==null),t(r)):l[0]=v,s.$=0,r||ze(_)):ze(_),u}function He(e,n){var r=e.c*e.i,i=r+n+16*n;return t(e.c<=n),e.V=a(i),e.V==null?(e.Ta=null,e.Ua=0,e.a=1,0):(e.Ta=e.V,e.Ua=e.Ba+r+n,1)}function Ue(e,n){var r=e.C,i=n-r,a=e.V,o=e.Ba+e.c*r;for(t(n<=e.l.o);0<i;){var s=16<i?16:i,l=e.l.ma,u=e.l.width,d=u*s,f=l.ca,p=l.tb+u*r,m=e.Ta,h=e.Ua;Ne(e,s,a,o),Lr(m,h,f,p,d),Ie(l,r,r+s,f,p,u),i-=s,a+=s*e.c,r+=s}t(r==n),e.C=e.Ma=n}function We(){this.ub=this.yd=this.td=this.Rb=0}function Ge(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Ke(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function qe(){this.Yb=function(){var e=[];return function e(t,n,r){for(var i=r[n],a=0;a<i&&(t.push(r.length>n+1?[]:0),!(r.length<n+1));a++)e(t[a],n+1,r)}(e,0,[3,11]),e}()}function Je(){this.jb=a(3),this.Wc=s([4,8],qe),this.Xc=s([4,17],qe)}function Ye(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function Xe(){this.ld=this.La=this.dd=this.tc=0}function Ze(){this.Na=this.la=0}function Qe(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function $e(){this.ad=a(384),this.Za=0,this.Ob=a(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function et(){this.uc=this.M=this.Nb=0,this.wa=Array(new Xe),this.Y=0,this.ya=Array(new $e),this.aa=0,this.l=new it}function tt(){this.y=a(16),this.f=a(8),this.ea=a(8)}function nt(){this.cb=this.a=0,this.sc=``,this.m=new x,this.Od=new We,this.Kc=new Ge,this.ed=new Ye,this.Qa=new Ke,this.Ic=this.$c=this.Aa=0,this.D=new et,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,x),this.ia=0,this.pb=o(4,Qe),this.Pa=new Je,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new tt),this.Hd=0,this.rb=Array(new Ze),this.sb=0,this.wa=Array(new Xe),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new $e),this.L=this.aa=0,this.gd=s([4,2],Xe),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function rt(e,t){return 0>e?0:e>t?t:e}function it(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma=`void`,this.put=`VP8IoPutHook`,this.ac=`VP8IoSetupHook`,this.bc=`VP8IoTeardownHook`,this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function at(){var e=new nt;return e!=null&&(e.a=0,e.sc=`OK`,e.cb=0,e.Xb=0,mi||=lt),e}function ot(e,t,n){return e.a==0&&(e.a=t,e.sc=n,e.cb=0),0}function st(e,t,n){return 3<=n&&e[t+0]==157&&e[t+1]==1&&e[t+2]==42}function ct(e,n){if(e==null)return 0;if(e.a=0,e.sc=`OK`,n==null)return ot(e,2,`null VP8Io passed to VP8GetHeaders()`);var r=n.data,a=n.w,o=n.ha;if(4>o)return ot(e,7,`Truncated header.`);var s=r[a+0]|r[a+1]<<8|r[a+2]<<16,l=e.Od;if(l.Rb=!(1&s),l.td=s>>1&7,l.yd=s>>4&1,l.ub=s>>5,3<l.td)return ot(e,3,`Incorrect keyframe parameters.`);if(!l.yd)return ot(e,4,`Frame not displayable.`);a+=3,o-=3;var u=e.Kc;if(l.Rb){if(7>o)return ot(e,7,`cannot parse picture header`);if(!st(r,a,o))return ot(e,3,`Bad code word`);u.c=16383&(r[a+4]<<8|r[a+3]),u.Td=r[a+4]>>6,u.i=16383&(r[a+6]<<8|r[a+5]),u.Ud=r[a+6]>>6,a+=7,o-=7,e.za=u.c+15>>4,e.Ub=u.i+15>>4,n.width=u.c,n.height=u.i,n.Da=0,n.j=0,n.v=0,n.va=n.width,n.o=n.height,n.da=0,n.ib=n.width,n.hb=n.height,n.U=n.width,n.T=n.height,i((s=e.Pa).jb,0,255,s.jb.length),t((s=e.Qa)!=null),s.Cb=0,s.Bb=0,s.Fb=1,i(s.Zb,0,0,s.Zb.length),i(s.Lb,0,0,s.Lb)}if(l.ub>o)return ot(e,7,`bad partition length`);h(s=e.m,r,a,l.ub),a+=l.ub,o-=l.ub,l.Rb&&(u.Ld=O(s),u.Kd=O(s)),u=e.Qa;var d,f=e.Pa;if(t(s!=null),t(u!=null),u.Cb=O(s),u.Cb){if(u.Bb=O(s),O(s)){for(u.Fb=O(s),d=0;4>d;++d)u.Zb[d]=O(s)?_(s,7):0;for(d=0;4>d;++d)u.Lb[d]=O(s)?_(s,6):0}if(u.Bb)for(d=0;3>d;++d)f.jb[d]=O(s)?g(s,8):255}else u.Bb=0;if(s.Ka)return ot(e,3,`cannot parse segment header`);if((u=e.ed).zd=O(s),u.Tb=g(s,6),u.wb=g(s,3),u.Pc=O(s),u.Pc&&O(s)){for(f=0;4>f;++f)O(s)&&(u.vd[f]=_(s,6));for(f=0;4>f;++f)O(s)&&(u.od[f]=_(s,6))}if(e.L=u.Tb==0?0:u.zd?1:2,s.Ka)return ot(e,3,`cannot parse filter header`);var p=o;if(o=d=a,a=d+p,u=p,e.Xb=(1<<g(e.m,2))-1,p<3*(f=e.Xb))r=7;else{for(d+=3*f,u-=3*f,p=0;p<f;++p){var m=r[o+0]|r[o+1]<<8|r[o+2]<<16;m>u&&(m=u),h(e.Jc[+p],r,d,m),d+=m,u-=m,o+=3}h(e.Jc[+f],r,d,u),r=d<a?0:5}if(r!=0)return ot(e,r,`cannot parse partitions`);for(r=g(d=e.m,7),o=O(d)?_(d,4):0,a=O(d)?_(d,4):0,u=O(d)?_(d,4):0,f=O(d)?_(d,4):0,d=O(d)?_(d,4):0,p=e.Qa,m=0;4>m;++m){if(p.Cb){var v=p.Zb[m];p.Fb||(v+=r)}else{if(0<m){e.pb[m]=e.pb[0];continue}v=r}var y=e.pb[m];y.Sc[0]=fi[rt(v+o,127)],y.Sc[1]=pi[rt(v+0,127)],y.Eb[0]=2*fi[rt(v+a,127)],y.Eb[1]=101581*pi[rt(v+u,127)]>>16,8>y.Eb[1]&&(y.Eb[1]=8),y.Qc[0]=fi[rt(v+f,117)],y.Qc[1]=pi[rt(v+d,127)],y.lc=v+d}if(!l.Rb)return ot(e,4,`Not a key frame.`);for(O(s),l=e.Pa,r=0;4>r;++r){for(o=0;8>o;++o)for(a=0;3>a;++a)for(u=0;11>u;++u)f=k(s,bi[r][o][a][u])?g(s,8):vi[r][o][a][u],l.Wc[r][o].Yb[a][u]=f;for(o=0;17>o;++o)l.Xc[r][o]=l.Wc[r][xi[o]]}return e.kc=O(s),e.kc&&(e.Bd=g(s,8)),e.cb=1}function lt(e,t,n,r,i,a,o){var s=t[i].Yb[n];for(n=0;16>i;++i){if(!k(e,s[n+0]))return i;for(;!k(e,s[n+1]);)if(s=t[++i].Yb[0],n=0,i==16)return 16;var l=t[i+1].Yb;if(k(e,s[n+2])){var u=e,d=0;if(k(u,(p=s)[(f=n)+3])){if(k(u,p[f+6])){for(s=0,f=2*(d=k(u,p[f+8]))+(p=k(u,p[f+9+d])),d=0,p=hi[f];p[s];++s)d+=d+k(u,p[s]);d+=3+(8<<f)}else k(u,p[f+7])?(d=7+2*k(u,165),d+=k(u,145)):d=5+k(u,159)}else d=k(u,p[f+4])?3+k(u,p[f+5]):2;s=l[2]}else d=1,s=l[1];l=o+gi[i],0>(u=e).b&&D(u);var f,p=u.b,m=(f=u.Ca>>1)-(u.I>>p)>>31;--u.b,u.Ca+=m,u.Ca|=1,u.I-=(f+1&m)<<p,a[l]=((d^m)-m)*r[(0<i)+0]}return 16}function ut(e){var t=e.rb[e.sb-1];t.la=0,t.Na=0,i(e.zc,0,0,e.zc.length),e.ja=0}function dt(e,t,n,r,i){i=e[t+n+32*r]+(i>>3),e[t+n+32*r]=-256&i?0>i?0:255:i}function ft(e,t,n,r,i,a){dt(e,t,0,n,r+i),dt(e,t,1,n,r+a),dt(e,t,2,n,r-a),dt(e,t,3,n,r-i)}function pt(e){return(20091*e>>16)+e}function mt(e,t,n,r){var i,o=0,s=a(16);for(i=0;4>i;++i){var l=e[t+0]+e[t+8],u=e[t+0]-e[t+8],d=(35468*e[t+4]>>16)-pt(e[t+12]),f=pt(e[t+4])+(35468*e[t+12]>>16);s[o+0]=l+f,s[o+1]=u+d,s[o+2]=u-d,s[o+3]=l-f,o+=4,t++}for(i=o=0;4>i;++i)l=(e=s[o+0]+4)+s[o+8],u=e-s[o+8],d=(35468*s[o+4]>>16)-pt(s[o+12]),dt(n,r,0,0,l+(f=pt(s[o+4])+(35468*s[o+12]>>16))),dt(n,r,1,0,u+d),dt(n,r,2,0,u-d),dt(n,r,3,0,l-f),o++,r+=32}function ht(e,t,n,r){var i=e[t+0]+4,a=35468*e[t+4]>>16,o=pt(e[t+4]),s=35468*e[t+1]>>16;ft(n,r,0,i+o,e=pt(e[t+1]),s),ft(n,r,1,i+a,e,s),ft(n,r,2,i-a,e,s),ft(n,r,3,i-o,e,s)}function gt(e,t,n,r,i){mt(e,t,n,r),i&&mt(e,t+16,n,r+4)}function _t(e,t,n,r){_r(e,t+0,n,r,1),_r(e,t+32,n,r+128,1)}function vt(e,t,n,r){var i;for(e=e[t+0]+4,i=0;4>i;++i)for(t=0;4>t;++t)dt(n,r,t,i,e)}function yt(e,t,n,r){e[t+0]&&br(e,t+0,n,r),e[t+16]&&br(e,t+16,n,r+4),e[t+32]&&br(e,t+32,n,r+128),e[t+48]&&br(e,t+48,n,r+128+4)}function bt(e,t,n,r){var i,o=a(16);for(i=0;4>i;++i){var s=e[t+0+i]+e[t+12+i],l=e[t+4+i]+e[t+8+i],u=e[t+4+i]-e[t+8+i],d=e[t+0+i]-e[t+12+i];o[0+i]=s+l,o[8+i]=s-l,o[4+i]=d+u,o[12+i]=d-u}for(i=0;4>i;++i)s=(e=o[0+4*i]+3)+o[3+4*i],l=o[1+4*i]+o[2+4*i],u=o[1+4*i]-o[2+4*i],d=e-o[3+4*i],n[r+0]=s+l>>3,n[r+16]=d+u>>3,n[r+32]=s-l>>3,n[r+48]=d-u>>3,r+=64}function xt(e,t,n){var r,i=t-32,a=Gr,o=255-e[i-1];for(r=0;r<n;++r){var s,l=a,u=o+e[t-1];for(s=0;s<n;++s)e[t+s]=l[u+e[i+s]];t+=32}}function St(e,t){xt(e,t,4)}function Ct(e,t){xt(e,t,8)}function wt(e,t){xt(e,t,16)}function Tt(e,t){for(var n=0;16>n;++n)r(e,t+32*n,e,t-32,16)}function Et(e,t){for(var n=16;0<n;--n)i(e,t,e[t-1],16),t+=32}function Dt(e,t,n){for(var r=0;16>r;++r)i(t,n+32*r,e,16)}function Ot(e,t){var n,r=16;for(n=0;16>n;++n)r+=e[t-1+32*n]+e[t+n-32];Dt(r>>5,e,t)}function kt(e,t){var n,r=8;for(n=0;16>n;++n)r+=e[t-1+32*n];Dt(r>>4,e,t)}function At(e,t){var n,r=8;for(n=0;16>n;++n)r+=e[t+n-32];Dt(r>>4,e,t)}function jt(e,t){Dt(128,e,t)}function Mt(e,t,n){return e+2*t+n+2>>2}function Nt(e,t){var n,i=t-32;for(i=new Uint8Array([Mt(e[i-1],e[i+0],e[i+1]),Mt(e[i+0],e[i+1],e[i+2]),Mt(e[i+1],e[i+2],e[i+3]),Mt(e[i+2],e[i+3],e[i+4])]),n=0;4>n;++n)r(e,t+32*n,i,0,i.length)}function Pt(e,t){var n=e[t-1],r=e[t-1+32],i=e[t-1+64],a=e[t-1+96];A(e,t+0,16843009*Mt(e[t-1-32],n,r)),A(e,t+32,16843009*Mt(n,r,i)),A(e,t+64,16843009*Mt(r,i,a)),A(e,t+96,16843009*Mt(i,a,a))}function Ft(e,t){var n,r=4;for(n=0;4>n;++n)r+=e[t+n-32]+e[t-1+32*n];for(r>>=3,n=0;4>n;++n)i(e,t+32*n,r,4)}function It(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],a=e[t-1-32],o=e[t+0-32],s=e[t+1-32],l=e[t+2-32],u=e[t+3-32];e[t+0+96]=Mt(r,i,e[t-1+96]),e[t+1+96]=e[t+0+64]=Mt(n,r,i),e[t+2+96]=e[t+1+64]=e[t+0+32]=Mt(a,n,r),e[t+3+96]=e[t+2+64]=e[t+1+32]=e[t+0+0]=Mt(o,a,n),e[t+3+64]=e[t+2+32]=e[t+1+0]=Mt(s,o,a),e[t+3+32]=e[t+2+0]=Mt(l,s,o),e[t+3+0]=Mt(u,l,s)}function Lt(e,t){var n=e[t+1-32],r=e[t+2-32],i=e[t+3-32],a=e[t+4-32],o=e[t+5-32],s=e[t+6-32],l=e[t+7-32];e[t+0+0]=Mt(e[t+0-32],n,r),e[t+1+0]=e[t+0+32]=Mt(n,r,i),e[t+2+0]=e[t+1+32]=e[t+0+64]=Mt(r,i,a),e[t+3+0]=e[t+2+32]=e[t+1+64]=e[t+0+96]=Mt(i,a,o),e[t+3+32]=e[t+2+64]=e[t+1+96]=Mt(a,o,s),e[t+3+64]=e[t+2+96]=Mt(o,s,l),e[t+3+96]=Mt(s,l,l)}function Rt(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],a=e[t-1-32],o=e[t+0-32],s=e[t+1-32],l=e[t+2-32],u=e[t+3-32];e[t+0+0]=e[t+1+64]=a+o+1>>1,e[t+1+0]=e[t+2+64]=o+s+1>>1,e[t+2+0]=e[t+3+64]=s+l+1>>1,e[t+3+0]=l+u+1>>1,e[t+0+96]=Mt(i,r,n),e[t+0+64]=Mt(r,n,a),e[t+0+32]=e[t+1+96]=Mt(n,a,o),e[t+1+32]=e[t+2+96]=Mt(a,o,s),e[t+2+32]=e[t+3+96]=Mt(o,s,l),e[t+3+32]=Mt(s,l,u)}function zt(e,t){var n=e[t+0-32],r=e[t+1-32],i=e[t+2-32],a=e[t+3-32],o=e[t+4-32],s=e[t+5-32],l=e[t+6-32],u=e[t+7-32];e[t+0+0]=n+r+1>>1,e[t+1+0]=e[t+0+64]=r+i+1>>1,e[t+2+0]=e[t+1+64]=i+a+1>>1,e[t+3+0]=e[t+2+64]=a+o+1>>1,e[t+0+32]=Mt(n,r,i),e[t+1+32]=e[t+0+96]=Mt(r,i,a),e[t+2+32]=e[t+1+96]=Mt(i,a,o),e[t+3+32]=e[t+2+96]=Mt(a,o,s),e[t+3+64]=Mt(o,s,l),e[t+3+96]=Mt(s,l,u)}function Bt(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],a=e[t-1+96];e[t+0+0]=n+r+1>>1,e[t+2+0]=e[t+0+32]=r+i+1>>1,e[t+2+32]=e[t+0+64]=i+a+1>>1,e[t+1+0]=Mt(n,r,i),e[t+3+0]=e[t+1+32]=Mt(r,i,a),e[t+3+32]=e[t+1+64]=Mt(i,a,a),e[t+3+64]=e[t+2+64]=e[t+0+96]=e[t+1+96]=e[t+2+96]=e[t+3+96]=a}function Vt(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],a=e[t-1+96],o=e[t-1-32],s=e[t+0-32],l=e[t+1-32],u=e[t+2-32];e[t+0+0]=e[t+2+32]=n+o+1>>1,e[t+0+32]=e[t+2+64]=r+n+1>>1,e[t+0+64]=e[t+2+96]=i+r+1>>1,e[t+0+96]=a+i+1>>1,e[t+3+0]=Mt(s,l,u),e[t+2+0]=Mt(o,s,l),e[t+1+0]=e[t+3+32]=Mt(n,o,s),e[t+1+32]=e[t+3+64]=Mt(r,n,o),e[t+1+64]=e[t+3+96]=Mt(i,r,n),e[t+1+96]=Mt(a,i,r)}function Ht(e,t){for(var n=0;8>n;++n)r(e,t+32*n,e,t-32,8)}function Ut(e,t){for(var n=0;8>n;++n)i(e,t,e[t-1],8),t+=32}function Wt(e,t,n){for(var r=0;8>r;++r)i(t,n+32*r,e,8)}function Gt(e,t){var n,r=8;for(n=0;8>n;++n)r+=e[t+n-32]+e[t-1+32*n];Wt(r>>4,e,t)}function Kt(e,t){var n,r=4;for(n=0;8>n;++n)r+=e[t+n-32];Wt(r>>3,e,t)}function qt(e,t){var n,r=4;for(n=0;8>n;++n)r+=e[t-1+32*n];Wt(r>>3,e,t)}function Jt(e,t){Wt(128,e,t)}function Yt(e,t,n){var r=e[t-n],i=e[t+0],a=3*(i-r)+Ur[1020+e[t-2*n]-e[t+n]],o=Wr[112+(a+4>>3)];e[t-n]=Gr[255+r+Wr[112+(a+3>>3)]],e[t+0]=Gr[255+i-o]}function Xt(e,t,n,r){var i=e[t+0],a=e[t+n];return Kr[255+e[t-2*n]-e[t-n]]>r||Kr[255+a-i]>r}function Zt(e,t,n,r){return 4*Kr[255+e[t-n]-e[t+0]]+Kr[255+e[t-2*n]-e[t+n]]<=r}function Qt(e,t,n,r,i){var a=e[t-3*n],o=e[t-2*n],s=e[t-n],l=e[t+0],u=e[t+n],d=e[t+2*n],f=e[t+3*n];return 4*Kr[255+s-l]+Kr[255+o-u]>r?0:Kr[255+e[t-4*n]-a]<=i&&Kr[255+a-o]<=i&&Kr[255+o-s]<=i&&Kr[255+f-d]<=i&&Kr[255+d-u]<=i&&Kr[255+u-l]<=i}function $t(e,t,n,r){var i=2*r+1;for(r=0;16>r;++r)Zt(e,t+r,n,i)&&Yt(e,t+r,n)}function en(e,t,n,r){var i=2*r+1;for(r=0;16>r;++r)Zt(e,t+r*n,1,i)&&Yt(e,t+r*n,1)}function tn(e,t,n,r){for(var i=3;0<i;--i)$t(e,t+=4*n,n,r)}function nn(e,t,n,r){for(var i=3;0<i;--i)en(e,t+=4,n,r)}function rn(e,t,n,r,i,a,o,s){for(a=2*a+1;0<i--;){if(Qt(e,t,n,a,o)){if(Xt(e,t,n,s))Yt(e,t,n);else{var l=e,u=t,d=n,f=l[u-2*d],p=l[u-d],m=l[u+0],h=l[u+d],g=l[u+2*d],_=27*(y=Ur[1020+3*(m-p)+Ur[1020+f-h]])+63>>7,v=18*y+63>>7,y=9*y+63>>7;l[u-3*d]=Gr[255+l[u-3*d]+y],l[u-2*d]=Gr[255+f+v],l[u-d]=Gr[255+p+_],l[u+0]=Gr[255+m-_],l[u+d]=Gr[255+h-v],l[u+2*d]=Gr[255+g-y]}}t+=r}}function an(e,t,n,r,i,a,o,s){for(a=2*a+1;0<i--;){if(Qt(e,t,n,a,o)){if(Xt(e,t,n,s))Yt(e,t,n);else{var l=e,u=t,d=n,f=l[u-d],p=l[u+0],m=l[u+d],h=Wr[112+(4+(g=3*(p-f))>>3)],g=Wr[112+(g+3>>3)],_=h+1>>1;l[u-2*d]=Gr[255+l[u-2*d]+_],l[u-d]=Gr[255+f+g],l[u+0]=Gr[255+p-h],l[u+d]=Gr[255+m-_]}}t+=r}}function on(e,t,n,r,i,a){rn(e,t,n,1,16,r,i,a)}function sn(e,t,n,r,i,a){rn(e,t,1,n,16,r,i,a)}function cn(e,t,n,r,i,a){for(var o=3;0<o;--o)an(e,t+=4*n,n,1,16,r,i,a)}function ln(e,t,n,r,i,a){for(var o=3;0<o;--o)an(e,t+=4,1,n,16,r,i,a)}function un(e,t,n,r,i,a,o,s){rn(e,t,i,1,8,a,o,s),rn(n,r,i,1,8,a,o,s)}function dn(e,t,n,r,i,a,o,s){rn(e,t,1,i,8,a,o,s),rn(n,r,1,i,8,a,o,s)}function fn(e,t,n,r,i,a,o,s){an(e,t+4*i,i,1,8,a,o,s),an(n,r+4*i,i,1,8,a,o,s)}function pn(e,t,n,r,i,a,o,s){an(e,t+4,1,i,8,a,o,s),an(n,r+4,1,i,8,a,o,s)}function mn(){this.ba=new ve,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new be,this.memory=0,this.Ib=`OutputFunc`,this.Jb=`OutputAlphaFunc`,this.Nd=`OutputRowFunc`}function hn(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function gn(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function _n(){this.ua=0,this.Wa=new I,this.vb=new I,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new m,this.yc=new f}function vn(){this.xb=this.a=0,this.l=new it,this.ca=new ve,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new S,this.Pb=0,this.wd=new S,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new _n,this.ab=0,this.gc=o(4,gn),this.Oc=0}function yn(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new it,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function bn(e,t,n,r,i,a,o){for(e=e==null?0:e[t+0],t=0;t<o;++t)i[a+t]=e+n[r+t]&255,e=i[a+t]}function xn(e,t,n,r,i,a,o){var s;if(e==null)bn(null,null,n,r,i,a,o);else for(s=0;s<o;++s)i[a+s]=e[t+s]+n[r+s]&255}function Sn(e,t,n,r,i,a,o){if(e==null)bn(null,null,n,r,i,a,o);else{var s,l=e[t+0],u=l,d=l;for(s=0;s<o;++s)u=d+(l=e[t+s])-u,d=n[r+s]+(-256&u?0>u?0:255:u)&255,u=l,i[a+s]=d}}function Cn(e,n,i,o){var s=n.width,l=n.o;if(t(e!=null&&n!=null),0>i||0>=o||i+o>l)return null;if(!e.Cc){if(e.ga==null){var u;if(e.ga=new yn,(u=e.ga==null)||(u=n.width*n.o,t(e.Gb.length==0),e.Gb=a(u),e.Uc=0,e.Gb==null?u=0:(e.mb=e.Gb,e.nb=e.Uc,e.rc=null,u=1),u=!u),!u){u=e.ga;var d=e.Fa,f=e.P,p=e.qc,m=e.mb,h=e.nb,g=f+1,_=p-1,y=u.l;if(t(d!=null&&m!=null&&n!=null),Di[0]=null,Di[1]=bn,Di[2]=xn,Di[3]=Sn,u.ca=m,u.tb=h,u.c=n.width,u.i=n.height,t(0<u.c&&0<u.i),1>=p)n=0;else if(u.$a=3&d[f+0],u.Z=d[f+0]>>2&3,u.Lc=d[f+0]>>4&3,f=d[f+0]>>6&3,0>u.$a||1<u.$a||4<=u.Z||1<u.Lc||f)n=0;else if(y.put=Te,y.ac=we,y.bc=Ee,y.ma=u,y.width=n.width,y.height=n.height,y.Da=n.Da,y.v=n.v,y.va=n.va,y.j=n.j,y.o=n.o,u.$a)t:{t(u.$a==1),n=Be();e:for(;;){if(n==null){n=0;break t}if(t(u!=null),u.mc=n,n.c=u.c,n.i=u.i,n.l=u.l,n.l.ma=u,n.l.width=u.c,n.l.height=u.i,n.a=0,v(n.m,d,g,_),!Ve(u.c,u.i,1,n,null)||(n.ab==1&&n.gc[0].hc==3&&Fe(n.s)?(u.ic=1,d=n.c*n.i,n.Ta=null,n.Ua=0,n.V=a(d),n.Ba=0,n.V==null?(n.a=1,n=0):n=1):(u.ic=0,n=He(n,u.c)),!n))break e;n=1;break t}u.mc=null,n=0}else n=_>=u.c*u.i;u=!n}if(u)return null;e.ga.Lc==1?o=l-i:e.Ga=0}t(e.ga!=null),t(i+o<=l);t:{if(n=(d=e.ga).c,l=d.l.o,d.$a==0){if(g=e.rc,_=e.Vc,y=e.Fa,f=e.P+1+i*n,p=e.mb,m=e.nb+i*n,t(f<=e.P+e.qc),d.Z!=0)for(t(Di[d.Z]!=null),u=0;u<o;++u)Di[d.Z](g,_,y,f,p,m,n),g=p,_=m,m+=n,f+=n;else for(u=0;u<o;++u)r(p,m,y,f,n),g=p,_=m,m+=n,f+=n;e.rc=g,e.Vc=_}else{if(t(d.mc!=null),n=i+o,t((u=d.mc)!=null),t(n<=u.i),u.C>=n)n=1;else if(d.ic||On(),d.ic){d=u.V,g=u.Ba,_=u.c;var b=u.i,x=(y=1,f=u.$/_,p=u.$%_,m=u.m,h=u.s,u.$),S=_*b,C=_*n,T=h.wc,D=x<C?Me(h,p,f):null;t(x<=S),t(n<=b),t(Fe(h));e:for(;;){for(;!m.h&&x<C;){if(p&T||(D=Me(h,p,f)),t(D!=null),E(m),256>(b=Ae(D.G[0],D.H[0],m)))d[g+x]=b,++x,++p>=_&&(p=0,++f<=n&&!(f%16)&&Le(u,f));else{if(!(280>b)){y=0;break e}b=Oe(b-256,m);var O,k=Ae(D.G[4],D.H[4],m);if(E(m),!(x>=(k=ke(_,k=Oe(k,m)))&&S-x>=b)){y=0;break e}for(O=0;O<b;++O)d[g+x+O]=d[g+x+O-k];for(x+=b,p+=b;p>=_;)p-=_,++f<=n&&!(f%16)&&Le(u,f);x<C&&p&T&&(D=Me(h,p,f))}t(m.h==w(m))}Le(u,f>n?n:f);break e}!y||m.h&&x<S?(y=0,u.a=m.h?5:3):u.$=x,n=y}else n=Re(u,u.V,u.Ba,u.c,u.i,n,Ue);if(!n){o=0;break t}}i+o>=l&&(e.Cc=1),o=1}if(!o)return null;if(e.Cc&&((o=e.ga)!=null&&(o.mc=null),e.ga=null,0<e.Ga))return alert(`todo:WebPDequantizeLevels`),null}return e.nb+i*s}function wn(e,t,n,r,i,a){for(;0<i--;){var o,s=e,l=t+ +!!n,u=e,d=t+(n?0:3);for(o=0;o<r;++o){var f=u[d+4*o];f!=255&&(f*=32897,s[l+4*o+0]=s[l+4*o+0]*f>>23,s[l+4*o+1]=s[l+4*o+1]*f>>23,s[l+4*o+2]=s[l+4*o+2]*f>>23)}t+=a}}function Tn(e,t,n,r,i){for(;0<r--;){for(var a=0;a<n;++a){var o=e[t+2*a+0],s=15&(u=e[t+2*a+1]),l=4369*s,u=(240&u|u>>4)*l>>16;e[t+2*a+0]=(240&o|o>>4)*l>>16&240|(15&o|o<<4)*l>>16>>4&15,e[t+2*a+1]=240&u|s}t+=i}}function En(e,t,n,r,i,a,o,s){var l,u,d=255;for(u=0;u<i;++u){for(l=0;l<r;++l){var f=e[t+l];a[o+4*l]=f,d&=f}t+=n,o+=s}return d!=255}function Dn(e,t,n,r,i){for(var a=0;a<i;++a)n[r+a]=e[t+a]>>8}function On(){Pr=wn,Fr=Tn,Ir=En,Lr=Dn}function kn(n,r,i){e[n]=function(e,n,a,o,s,l,u,d,f,p,m,h,g,_,v,y,b){var x,S=b-1>>1,C=s[l+0]|u[d+0]<<16,w=f[p+0]|m[h+0]<<16;t(e!=null);var T=3*C+w+131074>>2;for(r(e[n+0],255&T,T>>16,g,_),a!=null&&(T=3*w+C+131074>>2,r(a[o+0],255&T,T>>16,v,y)),x=1;x<=S;++x){var E=s[l+x]|u[d+x]<<16,D=f[p+x]|m[h+x]<<16,O=C+E+w+D+524296,k=O+2*(E+w)>>3;T=k+C>>1,C=(O=O+2*(C+D)>>3)+E>>1,r(e[n+2*x-1],255&T,T>>16,g,_+(2*x-1)*i),r(e[n+2*x-0],255&C,C>>16,g,_+(2*x-0)*i),a!=null&&(T=O+w>>1,C=k+D>>1,r(a[o+2*x-1],255&T,T>>16,v,y+(2*x-1)*i),r(a[o+2*x+0],255&C,C>>16,v,y+(2*x+0)*i)),C=E,w=D}1&b||(T=3*C+w+131074>>2,r(e[n+b-1],255&T,T>>16,g,_+(b-1)*i),a!=null&&(T=3*w+C+131074>>2,r(a[o+b-1],255&T,T>>16,v,y+(b-1)*i)))}}function An(){Oi[qr]=ki,Oi[Jr]=ji,Oi[Yr]=Ai,Oi[Xr]=Mi,Oi[Zr]=Ni,Oi[Qr]=Pi,Oi[$r]=Fi,Oi[ei]=ji,Oi[ti]=Mi,Oi[ni]=Ni,Oi[ri]=Pi}function jn(e){return e&~Vi?0>e?0:255:e>>Bi}function Mn(e,t){return jn((19077*e>>8)+(26149*t>>8)-14234)}function Nn(e,t,n){return jn((19077*e>>8)-(6419*t>>8)-(13320*n>>8)+8708)}function Pn(e,t){return jn((19077*e>>8)+(33050*t>>8)-17685)}function Fn(e,t,n,r,i){r[i+0]=Mn(e,n),r[i+1]=Nn(e,t,n),r[i+2]=Pn(e,t)}function In(e,t,n,r,i){r[i+0]=Pn(e,t),r[i+1]=Nn(e,t,n),r[i+2]=Mn(e,n)}function Ln(e,t,n,r,i){var a=Nn(e,t,n);t=a<<3&224|Pn(e,t)>>3,r[i+0]=248&Mn(e,n)|a>>5,r[i+1]=t}function Rn(e,t,n,r,i){var a=240&Pn(e,t)|15;r[i+0]=240&Mn(e,n)|Nn(e,t,n)>>4,r[i+1]=a}function zn(e,t,n,r,i){r[i+0]=255,Fn(e,t,n,r,i+1)}function Bn(e,t,n,r,i){In(e,t,n,r,i),r[i+3]=255}function Vn(e,t,n,r,i){Fn(e,t,n,r,i),r[i+3]=255}function Hn(t,n,r){e[t]=function(e,t,i,a,o,s,l,u,d){for(var f=u+(-2&d)*r;u!=f;)n(e[t+0],i[a+0],o[s+0],l,u),n(e[t+1],i[a+0],o[s+0],l,u+r),t+=2,++a,++s,u+=2*r;1&d&&n(e[t+0],i[a+0],o[s+0],l,u)}}function Un(e,t,n){return n==0?e==0?t==0?6:5:t==0?4:0:n}function Wn(e,t,n,r,i){switch(e>>>30){case 3:_r(t,n,r,i,0);break;case 2:vr(t,n,r,i);break;case 1:br(t,n,r,i)}}function Gn(e,t){var n,a,o=t.M,s=t.Nb,l=e.oc,u=e.pc+40,d=e.oc,f=e.pc+584,p=e.oc,m=e.pc+600;for(n=0;16>n;++n)l[u+32*n-1]=129;for(n=0;8>n;++n)d[f+32*n-1]=129,p[m+32*n-1]=129;for(0<o?l[u-1-32]=d[f-1-32]=p[m-1-32]=129:(i(l,u-32-1,127,21),i(d,f-32-1,127,9),i(p,m-32-1,127,9)),a=0;a<e.za;++a){var h=t.ya[t.aa+a];if(0<a){for(n=-1;16>n;++n)r(l,u+32*n-4,l,u+32*n+12,4);for(n=-1;8>n;++n)r(d,f+32*n-4,d,f+32*n+4,4),r(p,m+32*n-4,p,m+32*n+4,4)}var g=e.Gd,_=e.Hd+a,v=h.ad,y=h.Hc;if(0<o&&(r(l,u-32,g[_].y,0,16),r(d,f-32,g[_].f,0,8),r(p,m-32,g[_].ea,0,8)),h.Za){var b=l,x=u-32+16;for(0<o&&(a>=e.za-1?i(b,x,g[_].y[15],4):r(b,x,g[_+1].y,0,4)),n=0;4>n;n++)b[x+128+n]=b[x+256+n]=b[x+384+n]=b[x+0+n];for(n=0;16>n;++n,y<<=2)b=l,x=u+Yi[n],Ci[h.Ob[n]](b,x),Wn(y,v,16*n,b,x)}else if(b=Un(a,o,h.Ob[0]),Si[b](l,u),y!=0)for(n=0;16>n;++n,y<<=2)Wn(y,v,16*n,l,u+Yi[n]);for(n=h.Gc,b=Un(a,o,h.Dd),wi[b](d,f),wi[b](p,m),y=v,b=d,x=f,255&(h=0|n)&&(170&h?yr(y,256,b,x):xr(y,256,b,x)),h=p,y=m,255&(n>>=8)&&(170&n?yr(v,320,h,y):xr(v,320,h,y)),o<e.Ub-1&&(r(g[_].y,0,l,u+480,16),r(g[_].f,0,d,f+224,8),r(g[_].ea,0,p,m+224,8)),n=8*s*e.B,g=e.sa,_=e.ta+16*a+16*s*e.R,v=e.qa,h=e.ra+8*a+n,y=e.Ha,b=e.Ia+8*a+n,n=0;16>n;++n)r(g,_+n*e.R,l,u+32*n,16);for(n=0;8>n;++n)r(v,h+n*e.B,d,f+32*n,8),r(y,b+n*e.B,p,m+32*n,8)}}function Kn(e,r,i,a,o,s,l,u,d){var f=[0],p=[0],m=0,h=d==null?0:d.kd,g=d??new hn;if(e==null||12>i)return 7;g.data=e,g.w=r,g.ha=i,r=[r],i=[i],g.gb=[g.gb];t:{var _=r,y=i,b=g.gb;if(t(e!=null),t(y!=null),t(b!=null),b[0]=0,12<=y[0]&&!n(e,_[0],`RIFF`)){if(n(e,_[0]+8,`WEBP`)){b=3;break t}var x=N(e,_[0]+4);if(12>x||4294967286<x){b=3;break t}if(h&&x>y[0]-8){b=7;break t}b[0]=x,_[0]+=12,y[0]-=12}b=0}if(b!=0)return b;for(x=0<g.gb[0],i=i[0];;){t:{var C=e;y=r,b=i;var w=f,T=p,E=_=[0];if((k=m=[m])[0]=0,8>b[0])b=7;else{if(!n(C,y[0],`VP8X`)){if(N(C,y[0]+4)!=10){b=3;break t}if(18>b[0]){b=7;break t}var D=N(C,y[0]+8),O=1+M(C,y[0]+12);if(2147483648<=O*(C=1+M(C,y[0]+15))){b=3;break t}E!=null&&(E[0]=D),w!=null&&(w[0]=O),T!=null&&(T[0]=C),y[0]+=18,b[0]-=18,k[0]=1}b=0}}if(m=m[0],_=_[0],b!=0)return b;if(y=!!(2&_),!x&&m)return 3;if(s!=null&&(s[0]=!!(16&_)),l!=null&&(l[0]=y),u!=null&&(u[0]=0),l=f[0],_=p[0],m&&y&&d==null){b=0;break}if(4>i){b=7;break}if(x&&m||!x&&!m&&!n(e,r[0],`ALPH`)){i=[i],g.na=[g.na],g.P=[g.P],g.Sa=[g.Sa];t:{D=e,b=r,x=i;var k=g.gb;w=g.na,T=g.P,E=g.Sa,O=22,t(D!=null),t(x!=null),C=b[0];var A=x[0];for(t(w!=null),t(E!=null),w[0]=null,T[0]=null,E[0]=0;;){if(b[0]=C,x[0]=A,8>A){b=7;break t}var j=N(D,C+4);if(4294967286<j){b=3;break t}var P=8+j+1&-2;if(O+=P,0<k&&O>k){b=3;break t}if(!n(D,C,`VP8 `)||!n(D,C,`VP8L`)){b=0;break t}if(A[0]<P){b=7;break t}n(D,C,`ALPH`)||(w[0]=D,T[0]=C+8,E[0]=j),C+=P,A-=P}}if(i=i[0],g.na=g.na[0],g.P=g.P[0],g.Sa=g.Sa[0],b!=0)break}i=[i],g.Ja=[g.Ja],g.xa=[g.xa];t:if(k=e,b=r,x=i,w=g.gb[0],T=g.Ja,E=g.xa,D=b[0],C=!n(k,D,`VP8 `),O=!n(k,D,`VP8L`),t(k!=null),t(x!=null),t(T!=null),t(E!=null),8>x[0])b=7;else{if(C||O){if(k=N(k,D+4),12<=w&&k>w-12){b=3;break t}if(h&&k>x[0]-8){b=7;break t}T[0]=k,b[0]+=8,x[0]-=8,E[0]=O}else E[0]=5<=x[0]&&k[D+0]==47&&!(k[D+4]>>5),T[0]=x[0];b=0}if(i=i[0],g.Ja=g.Ja[0],g.xa=g.xa[0],r=r[0],b!=0)break;if(4294967286<g.Ja)return 3;if(u==null||y||(u[0]=g.xa?2:1),l=[l],_=[_],g.xa){if(5>i){b=7;break}u=l,h=_,y=s,e==null||5>i?e=0:5<=i&&e[r+0]==47&&!(e[r+4]>>5)?(x=[0],k=[0],w=[0],v(T=new S,e,r,i),De(T,x,k,w)?(u!=null&&(u[0]=x[0]),h!=null&&(h[0]=k[0]),y!=null&&(y[0]=w[0]),e=1):e=0):e=0}else{if(10>i){b=7;break}u=_,e==null||10>i||!st(e,r+3,i-3)?e=0:(h=e[r+0]|e[r+1]<<8|e[r+2]<<16,y=16383&(e[r+7]<<8|e[r+6]),e=16383&(e[r+9]<<8|e[r+8]),1&h||3<(h>>1&7)||!(h>>4&1)||h>>5>=g.Ja||!y||!e?e=0:(l&&(l[0]=y),u&&(u[0]=e),e=1))}if(!e||(l=l[0],_=_[0],m&&(f[0]!=l||p[0]!=_)))return 3;d!=null&&(d[0]=g,d.offset=r-d.w,t(4294967286>r-d.w),t(d.offset==d.ha-i));break}return b==0||b==7&&m&&d==null?(s!=null&&(s[0]|=g.na!=null&&0<g.na.length),a!=null&&(a[0]=l),o!=null&&(o[0]=_),0):b}function qn(e,t,n){var r=t.width,i=t.height,a=0,o=0,s=r,l=i;if(t.Da=e!=null&&0<e.Da,t.Da&&(s=e.cd,l=e.bd,a=e.v,o=e.j,11>n||(a&=-2,o&=-2),0>a||0>o||0>=s||0>=l||a+s>r||o+l>i))return 0;if(t.v=a,t.j=o,t.va=a+s,t.o=o+l,t.U=s,t.T=l,t.da=e!=null&&0<e.da,t.da){if(!L(s,l,n=[e.ib],a=[e.hb]))return 0;t.ib=n[0],t.hb=a[0]}return t.ob=e!=null&&e.ob,t.Kb=e==null||!e.Sd,t.da&&(t.ob=t.ib<3*r/4&&t.hb<3*i/4,t.Kb=0),1}function Jn(e){if(e==null)return 2;if(11>e.S){var t=e.f.RGBA;t.fb+=(e.height-1)*t.A,t.A=-t.A}else t=e.f.kb,e=e.height,t.O+=(e-1)*t.fa,t.fa=-t.fa,t.N+=(e-1>>1)*t.Ab,t.Ab=-t.Ab,t.W+=(e-1>>1)*t.Db,t.Db=-t.Db,t.F!=null&&(t.J+=(e-1)*t.lb,t.lb=-t.lb);return 0}function Yn(e,t,n,r){if(r==null||0>=e||0>=t)return 2;if(n!=null){if(n.Da){var i=n.cd,o=n.bd,s=-2&n.v,l=-2&n.j;if(0>s||0>l||0>=i||0>=o||s+i>e||l+o>t)return 2;e=i,t=o}if(n.da){if(!L(e,t,i=[n.ib],o=[n.hb]))return 2;e=i[0],t=o[0]}}r.width=e,r.height=t;t:{var u=r.width,d=r.height;if(e=r.S,0>=u||0>=d||!(e>=qr&&13>e))e=2;else{if(0>=r.Rd&&r.sd==null){s=o=i=t=0;var f=(l=u*$i[e])*d;if(11>e||(o=(d+1)/2*(t=(u+1)/2),e==12&&(s=(i=u)*d)),(d=a(f+2*o+s))==null){e=1;break t}r.sd=d,11>e?((u=r.f.RGBA).eb=d,u.fb=0,u.A=l,u.size=f):((u=r.f.kb).y=d,u.O=0,u.fa=l,u.Fd=f,u.f=d,u.N=0+f,u.Ab=t,u.Cd=o,u.ea=d,u.W=0+f+o,u.Db=t,u.Ed=o,e==12&&(u.F=d,u.J=0+f+2*o),u.Tc=s,u.lb=i)}if(t=1,i=r.S,o=r.width,s=r.height,i>=qr&&13>i){if(11>i)e=r.f.RGBA,t&=(l=Math.abs(e.A))*(s-1)+o<=e.size,t&=l>=o*$i[i],t&=e.eb!=null;else{e=r.f.kb,l=(o+1)/2,f=(s+1)/2,u=Math.abs(e.fa),d=Math.abs(e.Ab);var p=Math.abs(e.Db),m=Math.abs(e.lb),h=m*(s-1)+o;t&=u*(s-1)+o<=e.Fd,t&=d*(f-1)+l<=e.Cd,t=(t&=p*(f-1)+l<=e.Ed)&u>=o&d>=l&p>=l,t&=e.y!=null,t&=e.f!=null,t&=e.ea!=null,i==12&&(t&=m>=o,t&=h<=e.Tc,t&=e.F!=null)}}else t=0;e=t?0:2}}return e!=0||n!=null&&n.fd&&(e=Jn(r)),e}var Xn=64,Zn=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Qn=24,$n=32,er=8,tr=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];z(`Predictor0`,`PredictorAdd0`),e.Predictor0=function(){return 4278190080},e.Predictor1=function(e){return e},e.Predictor2=function(e,t,n){return t[n+0]},e.Predictor3=function(e,t,n){return t[n+1]},e.Predictor4=function(e,t,n){return t[n-1]},e.Predictor5=function(e,t,n){return V(V(e,t[n+1]),t[n+0])},e.Predictor6=function(e,t,n){return V(e,t[n-1])},e.Predictor7=function(e,t,n){return V(e,t[n+0])},e.Predictor8=function(e,t,n){return V(t[n-1],t[n+0])},e.Predictor9=function(e,t,n){return V(t[n+0],t[n+1])},e.Predictor10=function(e,t,n){return V(V(e,t[n-1]),V(t[n+0],t[n+1]))},e.Predictor11=function(e,t,n){var r=t[n+0];return 0>=re(r>>24&255,e>>24&255,(t=t[n-1])>>24&255)+re(r>>16&255,e>>16&255,t>>16&255)+re(r>>8&255,e>>8&255,t>>8&255)+re(255&r,255&e,255&t)?r:e},e.Predictor12=function(e,t,n){var r=t[n+0];return(te((e>>24&255)+(r>>24&255)-((t=t[n-1])>>24&255))<<24|te((e>>16&255)+(r>>16&255)-(t>>16&255))<<16|te((e>>8&255)+(r>>8&255)-(t>>8&255))<<8|te((255&e)+(255&r)-(255&t)))>>>0},e.Predictor13=function(e,t,n){var r=t[n-1];return(ne((e=V(e,t[n+0]))>>24&255,r>>24&255)<<24|ne(e>>16&255,r>>16&255)<<16|ne(e>>8&255,r>>8&255)<<8|ne(255&e,255&r))>>>0};var nr=e.PredictorAdd0;e.PredictorAdd1=ie,z(`Predictor2`,`PredictorAdd2`),z(`Predictor3`,`PredictorAdd3`),z(`Predictor4`,`PredictorAdd4`),z(`Predictor5`,`PredictorAdd5`),z(`Predictor6`,`PredictorAdd6`),z(`Predictor7`,`PredictorAdd7`),z(`Predictor8`,`PredictorAdd8`),z(`Predictor9`,`PredictorAdd9`),z(`Predictor10`,`PredictorAdd10`),z(`Predictor11`,`PredictorAdd11`),z(`Predictor12`,`PredictorAdd12`),z(`Predictor13`,`PredictorAdd13`);var rr=e.PredictorAdd2;ce(`ColorIndexInverseTransform`,`MapARGB`,`32b`,function(e){return e>>8&255},function(e){return e}),ce(`VP8LColorIndexInverseTransformAlpha`,`MapAlpha`,`8b`,function(e){return e},function(e){return e>>8&255});var ir,ar=e.ColorIndexInverseTransform,or=e.MapARGB,sr=e.VP8LColorIndexInverseTransformAlpha,cr=e.MapAlpha,lr=e.VP8LPredictorsAdd=[];lr.length=16,(e.VP8LPredictors=[]).length=16,(e.VP8LPredictorsAdd_C=[]).length=16,(e.VP8LPredictors_C=[]).length=16;var ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr=a(511),zr=a(2041),Br=a(225),Vr=a(767),Hr=0,Ur=zr,Wr=Br,Gr=Vr,Kr=Rr,qr=0,Jr=1,Yr=2,Xr=3,Zr=4,Qr=5,$r=6,ei=7,ti=8,ni=9,ri=10,ii=[2,3,7],ai=[3,3,11],oi=[280,256,256,256,40],si=[0,1,1,1,0],ci=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],li=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],ui=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],di=8,fi=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],pi=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],mi=null,hi=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],gi=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],_i=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],vi=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],yi=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],bi=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],xi=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Si=[],Ci=[],wi=[],Ti=1,Ei=2,Di=[],Oi=[];kn(`UpsampleRgbLinePair`,Fn,3),kn(`UpsampleBgrLinePair`,In,3),kn(`UpsampleRgbaLinePair`,Vn,4),kn(`UpsampleBgraLinePair`,Bn,4),kn(`UpsampleArgbLinePair`,zn,4),kn(`UpsampleRgba4444LinePair`,Rn,2),kn(`UpsampleRgb565LinePair`,Ln,2);var ki=e.UpsampleRgbLinePair,Ai=e.UpsampleBgrLinePair,ji=e.UpsampleRgbaLinePair,Mi=e.UpsampleBgraLinePair,Ni=e.UpsampleArgbLinePair,Pi=e.UpsampleRgba4444LinePair,Fi=e.UpsampleRgb565LinePair,Ii=16,Li=1<<Ii-1,Ri=-227,zi=482,Bi=6,Vi=(256<<Bi)-1,Hi=0,Ui=a(256),Wi=a(256),Gi=a(256),Ki=a(256),qi=a(zi-Ri),Ji=a(zi-Ri);Hn(`YuvToRgbRow`,Fn,3),Hn(`YuvToBgrRow`,In,3),Hn(`YuvToRgbaRow`,Vn,4),Hn(`YuvToBgraRow`,Bn,4),Hn(`YuvToArgbRow`,zn,4),Hn(`YuvToRgba4444Row`,Rn,2),Hn(`YuvToRgb565Row`,Ln,2);var Yi=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Xi=[0,2,8],Zi=[8,7,6,4,4,2,2,2,1,1,1,1],Qi=1;this.WebPDecodeRGBA=function(e,n,s,l,u){var d=Jr,f=new mn,p=new ve;f.ba=p,p.S=d,p.width=[p.width],p.height=[p.height];var m=p.width,h=p.height,g=new ye;if(g==null||e==null)var _=2;else t(g!=null),_=Kn(e,n,s,g.width,g.height,g.Pd,g.Qd,g.format,null);if(_==0?(m!=null&&(m[0]=g.width[0]),h!=null&&(h[0]=g.height[0]),m=1):m=0,m){p.width=p.width[0],p.height=p.height[0],l!=null&&(l[0]=p.width),u!=null&&(u[0]=p.height);t:{if(l=new it,(u=new hn).data=e,u.w=n,u.ha=s,u.kd=1,n=[0],t(u!=null),((e=Kn(u.data,u.w,u.ha,null,null,null,n,null,u))==0||e==7)&&n[0]&&(e=4),(n=e)==0){if(t(f!=null),l.data=u.data,l.w=u.w+u.offset,l.ha=u.ha-u.offset,l.put=Te,l.ac=we,l.bc=Ee,l.ma=f,u.xa){if((e=Be())==null){f=1;break t}if(function(e,n){var r=[0],i=[0],a=[0];e:for(;;){if(e==null)return 0;if(n==null)return e.a=2,0;if(e.l=n,e.a=0,v(e.m,n.data,n.w,n.ha),!De(e.m,r,i,a)){e.a=3;break e}if(e.xb=Ei,n.width=r[0],n.height=i[0],!Ve(r[0],i[0],1,e,null))break e;return 1}return t(e.a!=0),0}(e,l)){if(l=(n=Yn(l.width,l.height,f.Oa,f.ba))==0){e:{l=e;r:for(;;){if(l==null){l=0;break e}if(t(l.s.yc!=null),t(l.s.Ya!=null),t(0<l.s.Wb),t((s=l.l)!=null),t((u=s.ma)!=null),l.xb!=0){if(l.ca=u.ba,l.tb=u.tb,t(l.ca!=null),!qn(u.Oa,s,Xr)){l.a=2;break r}if(!He(l,s.width)||s.da)break r;if((s.da||he(l.ca.S))&&On(),11>l.ca.S||(alert(`todo:WebPInitConvertARGBToYUV`),l.ca.f.kb.F!=null&&On()),l.Pb&&0<l.s.ua&&l.s.vb.X==null&&!P(l.s.vb,l.s.Wa.Xa)){l.a=1;break r}l.xb=0}if(!Re(l,l.V,l.Ba,l.c,l.i,s.o,Pe))break r;u.Dc=l.Ma,l=1;break e}t(l.a!=0),l=0}l=!l}l&&(n=e.a)}else n=e.a}else{if((e=new at)==null){f=1;break t}if(e.Fa=u.na,e.P=u.P,e.qc=u.Sa,ct(e,l)){if((n=Yn(l.width,l.height,f.Oa,f.ba))==0){if(e.Aa=0,s=f.Oa,t((u=e)!=null),s!=null){if(0<(m=0>(m=s.Md)?0:100<m?255:255*m/100)){for(h=g=0;4>h;++h)12>(_=u.pb[h]).lc&&(_.ia=m*Zi[0>_.lc?0:_.lc]>>3),g|=_.ia;g&&(alert(`todo:VP8InitRandom`),u.ia=1)}u.Ga=s.Id,100<u.Ga?u.Ga=100:0>u.Ga&&(u.Ga=0)}(function(e,n){if(e==null)return 0;if(n==null)return ot(e,2,`NULL VP8Io parameter in VP8Decode().`);if(!e.cb&&!ct(e,n))return 0;if(t(e.cb),n.ac==null||n.ac(n)){n.ob&&(e.L=0);var s=Xi[e.L];if(e.L==2?(e.yb=0,e.zb=0):(e.yb=n.v-s>>4,e.zb=n.j-s>>4,0>e.yb&&(e.yb=0),0>e.zb&&(e.zb=0)),e.Va=n.o+15+s>>4,e.Hb=n.va+15+s>>4,e.Hb>e.za&&(e.Hb=e.za),e.Va>e.Ub&&(e.Va=e.Ub),0<e.L){var l=e.ed;for(s=0;4>s;++s){var u;if(e.Qa.Cb){var d=e.Qa.Lb[s];e.Qa.Fb||(d+=l.Tb)}else d=l.Tb;for(u=0;1>=u;++u){var f=e.gd[s][u],p=d;if(l.Pc&&(p+=l.vd[0],u&&(p+=l.od[0])),0<(p=0>p?0:63<p?63:p)){var m=p;0<l.wb&&(m=4<l.wb?m>>2:m>>1)>9-l.wb&&(m=9-l.wb),1>m&&(m=1),f.dd=m,f.tc=2*p+m,f.ld=40<=p?2:+(15<=p)}else f.tc=0;f.La=u}}}s=0}else ot(e,6,`Frame setup failed`),s=e.a;if(s=s==0){if(s){e.$c=0,0<e.Aa||(e.Ic=Qi);e:{s=e.Ic,l=4*(m=e.za);var h=32*m,g=m+1,_=0<e.L?m*(0<e.Aa?2:1):0,v=(e.Aa==2?2:1)*m;if((f=l+832+(u=3*(16*s+Xi[e.L])/2*h)+(d=e.Fa!=null&&0<e.Fa.length?e.Kc.c*e.Kc.i:0))!=f)s=0;else{if(f>e.Vb){if(e.Vb=0,e.Ec=a(f),e.Fc=0,e.Ec==null){s=ot(e,1,`no memory during frame initialization.`);break e}e.Vb=f}f=e.Ec,p=e.Fc,e.Ac=f,e.Bc=p,p+=l,e.Gd=o(h,tt),e.Hd=0,e.rb=o(g+1,Ze),e.sb=1,e.wa=_?o(_,Xe):null,e.Y=0,e.D.Nb=0,e.D.wa=e.wa,e.D.Y=e.Y,0<e.Aa&&(e.D.Y+=m),t(!0),e.oc=f,e.pc=p,p+=832,e.ya=o(v,$e),e.aa=0,e.D.ya=e.ya,e.D.aa=e.aa,e.Aa==2&&(e.D.aa+=m),e.R=16*m,e.B=8*m,m=(h=Xi[e.L])*e.R,h=h/2*e.B,e.sa=f,e.ta=p+m,e.qa=e.sa,e.ra=e.ta+16*s*e.R+h,e.Ha=e.qa,e.Ia=e.ra+8*s*e.B+h,e.$c=0,p+=u,e.mb=d?f:null,e.nb=d?p:null,t(p+d<=e.Fc+e.Vb),ut(e),i(e.Ac,e.Bc,0,l),s=1}}if(s){if(n.ka=0,n.y=e.sa,n.O=e.ta,n.f=e.qa,n.N=e.ra,n.ea=e.Ha,n.Vd=e.Ia,n.fa=e.R,n.Rc=e.B,n.F=null,n.J=0,!Hr){for(s=-255;255>=s;++s)Rr[255+s]=0>s?-s:s;for(s=-1020;1020>=s;++s)zr[1020+s]=-128>s?-128:127<s?127:s;for(s=-112;112>=s;++s)Br[112+s]=-16>s?-16:15<s?15:s;for(s=-255;510>=s;++s)Vr[255+s]=0>s?0:255<s?255:s;Hr=1}gr=bt,_r=gt,yr=_t,br=vt,xr=yt,vr=ht,Sr=on,Cr=sn,wr=un,Tr=dn,Er=cn,Dr=ln,Or=fn,kr=pn,Ar=$t,jr=en,Mr=tn,Nr=nn,Ci[0]=Ft,Ci[1]=St,Ci[2]=Nt,Ci[3]=Pt,Ci[4]=It,Ci[5]=Rt,Ci[6]=Lt,Ci[7]=zt,Ci[8]=Vt,Ci[9]=Bt,Si[0]=Ot,Si[1]=wt,Si[2]=Tt,Si[3]=Et,Si[4]=kt,Si[5]=At,Si[6]=jt,wi[0]=Gt,wi[1]=Ct,wi[2]=Ht,wi[3]=Ut,wi[4]=qt,wi[5]=Kt,wi[6]=Jt,s=1}else s=0}s&&=function(e,n){for(e.M=0;e.M<e.Va;++e.M){var o,s=e.Jc[e.M&e.Xb],l=e.m,u=e;for(o=0;o<u.za;++o){var d=l,f=u,p=f.Ac,m=f.Bc+4*o,h=f.zc,g=f.ya[f.aa+o];if(f.Qa.Bb?g.$b=k(d,f.Pa.jb[0])?2+k(d,f.Pa.jb[2]):k(d,f.Pa.jb[1]):g.$b=0,f.kc&&(g.Ad=k(d,f.Bd)),g.Za=!k(d,145)+0,g.Za){var _=g.Ob,v=0;for(f=0;4>f;++f){var y,b=h[0+f];for(y=0;4>y;++y){b=yi[p[m+y]][b];for(var x=_i[k(d,b[0])];0<x;)x=_i[2*x+k(d,b[x])];b=-x,p[m+y]=b}r(_,v,p,m,4),v+=4,h[0+f]=b}}else b=k(d,156)?k(d,128)?1:3:k(d,163)?2:0,g.Ob[0]=b,i(p,m,b,4),i(h,0,b,4);g.Dd=k(d,142)?k(d,114)?k(d,183)?1:3:2:0}if(u.m.Ka)return ot(e,7,`Premature end-of-partition0 encountered.`);for(;e.ja<e.za;++e.ja){if(u=s,d=(l=e).rb[l.sb-1],p=l.rb[l.sb+l.ja],o=l.ya[l.aa+l.ja],m=l.kc?o.Ad:0)d.la=p.la=0,o.Za||(d.Na=p.Na=0),o.Hc=0,o.Gc=0,o.ia=0;else{var S,C;if(d=p,p=u,m=l.Pa.Xc,h=l.ya[l.aa+l.ja],g=l.pb[h.$b],f=h.ad,_=0,v=l.rb[l.sb-1],b=y=0,i(f,_,0,384),h.Za)var w=0,T=m[3];else{x=a(16);var E=d.Na+v.Na;if(E=mi(p,m[1],E,g.Eb,0,x,0),d.Na=v.Na=(0<E)+0,1<E)gr(x,0,f,_);else{var D=x[0]+3>>3;for(x=0;256>x;x+=16)f[_+x]=D}w=1,T=m[0]}var O=15&d.la,A=15&v.la;for(x=0;4>x;++x){var j=1&A;for(D=C=0;4>D;++D)O=O>>1|(j=(E=mi(p,T,E=j+(1&O),g.Sc,w,f,_))>w)<<7,C=C<<2|(3<E?3:1<E?2:f[_+0]!=0),_+=16;O>>=4,A=A>>1|j<<7,y=(y<<8|C)>>>0}for(T=O,w=A>>4,S=0;4>S;S+=2){for(C=0,O=d.la>>4+S,A=v.la>>4+S,x=0;2>x;++x){for(j=1&A,D=0;2>D;++D)E=j+(1&O),O=O>>1|(j=0<(E=mi(p,m[2],E,g.Qc,0,f,_)))<<3,C=C<<2|(3<E?3:1<E?2:f[_+0]!=0),_+=16;O>>=2,A=A>>1|j<<5}b|=C<<4*S,T|=O<<4<<S,w|=(240&A)<<S}d.la=T,v.la=w,h.Hc=y,h.Gc=b,h.ia=43690&b?0:g.ia,m=!(y|b)}if(0<l.L&&(l.wa[l.Y+l.ja]=l.gd[o.$b][o.Za],l.wa[l.Y+l.ja].La|=!m),u.Ka)return ot(e,7,`Premature end-of-file encountered.`)}if(ut(e),l=n,u=1,o=(s=e).D,d=0<s.L&&s.M>=s.zb&&s.M<=s.Va,s.Aa==0)e:{if(o.M=s.M,o.uc=d,Gn(s,o),u=1,o=(C=s.D).Nb,d=(b=Xi[s.L])*s.R,p=b/2*s.B,x=16*o*s.R,D=8*o*s.B,m=s.sa,h=s.ta-d+x,g=s.qa,f=s.ra-p+D,_=s.Ha,v=s.Ia-p+D,A=(O=C.M)==0,y=O>=s.Va-1,s.Aa==2&&Gn(s,C),C.uc)for(j=(E=s).D.M,t(E.D.uc),C=E.yb;C<E.Hb;++C){w=C,T=j;var M=(N=(V=E).D).Nb;S=V.R;var N=N.wa[N.Y+w],P=V.sa,F=V.ta+16*M*S+16*w,I=N.dd,L=N.tc;if(L!=0){if(t(3<=L),V.L==1)0<w&&jr(P,F,S,L+4),N.La&&Nr(P,F,S,L),0<T&&Ar(P,F,S,L+4),N.La&&Mr(P,F,S,L);else{var R=V.B,ee=V.qa,z=V.ra+8*M*R+8*w,B=V.Ha,V=V.Ia+8*M*R+8*w;M=N.ld,0<w&&(Cr(P,F,S,L+4,I,M),Tr(ee,z,B,V,R,L+4,I,M)),N.La&&(Dr(P,F,S,L,I,M),kr(ee,z,B,V,R,L,I,M)),0<T&&(Sr(P,F,S,L+4,I,M),wr(ee,z,B,V,R,L+4,I,M)),N.La&&(Er(P,F,S,L,I,M),Or(ee,z,B,V,R,L,I,M))}}}if(s.ia&&alert(`todo:DitherRow`),l.put!=null){if(C=16*O,O=16*(O+1),A?(l.y=s.sa,l.O=s.ta+x,l.f=s.qa,l.N=s.ra+D,l.ea=s.Ha,l.W=s.Ia+D):(C-=b,l.y=m,l.O=h,l.f=g,l.N=f,l.ea=_,l.W=v),y||(O-=b),O>l.o&&(O=l.o),l.F=null,l.J=null,s.Fa!=null&&0<s.Fa.length&&C<O&&(l.J=Cn(s,l,C,O-C),l.F=s.mb,l.F==null&&l.F.length==0)){u=ot(s,3,`Could not decode alpha data.`);break e}C<l.j&&(b=l.j-C,C=l.j,t(!(1&b)),l.O+=s.R*b,l.N+=s.B*(b>>1),l.W+=s.B*(b>>1),l.F!=null&&(l.J+=l.width*b)),C<O&&(l.O+=l.v,l.N+=l.v>>1,l.W+=l.v>>1,l.F!=null&&(l.J+=l.v),l.ka=C-l.j,l.U=l.va-l.v,l.T=O-C,u=l.put(l))}o+1!=s.Ic||y||(r(s.sa,s.ta-d,m,h+16*s.R,d),r(s.qa,s.ra-p,g,f+8*s.B,p),r(s.Ha,s.Ia-p,_,v+8*s.B,p))}if(!u)return ot(e,6,`Output aborted.`)}return 1}(e,n),n.bc!=null&&n.bc(n),s&=1}return s?(e.cb=0,s):0})(e,l)||(n=e.a)}}else n=e.a}n==0&&f.Oa!=null&&f.Oa.fd&&(n=Jn(f.ba))}f=n}d=f==0?11>d?p.f.RGBA.eb:p.f.kb.y:null}else d=null;return d};var $i=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function u(e,t){for(var n=``,r=0;r<4;r++)n+=String.fromCharCode(e[t++]);return n}function d(e,t){return e[t+0]|e[t+1]<<8}function f(e,t){return(e[t+0]|e[t+1]<<8|e[t+2]<<16)>>>0}function p(e,t){return(e[t+0]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}new l;var m=[0],h=[0],g=[],_=new l,v=e,y=function(e,t){var n={},r=0,i=!1,a=0,o=0;if(n.frames=[],!function(e,t){for(var n=0;n<4;n++)if(e[t+n]!=`RIFF`.charCodeAt(n))return!0;return!1}(e,t)){for(p(e,t+=4),t+=8;t<e.length;){var s=u(e,t),l=p(e,t+=4);t+=4;var m=l+(1&l);switch(s){case`VP8 `:case`VP8L`:n.frames[r]===void 0&&(n.frames[r]={}),(_=n.frames[r]).src_off=i?o:t-8,_.src_size=a+l+8,r++,i&&(i=!1,a=0,o=0);break;case`VP8X`:(_=n.header={}).feature_flags=e[t];var h=t+4;_.canvas_width=1+f(e,h),h+=3,_.canvas_height=1+f(e,h),h+=3;break;case`ALPH`:i=!0,a=m+8,o=t-8;break;case`ANIM`:(_=n.header).bgcolor=p(e,t),h=t+4,_.loop_count=d(e,h),h+=2;break;case`ANMF`:var g,_;(_=n.frames[r]={}).offset_x=2*f(e,t),t+=3,_.offset_y=2*f(e,t),t+=3,_.width=1+f(e,t),t+=3,_.height=1+f(e,t),t+=3,_.duration=f(e,t),t+=3,g=e[t++],_.dispose=1&g,_.blend=g>>1&1}s!=`ANMF`&&(t+=m)}return n}}(v,0);y.response=v,y.rgbaoutput=!0,y.dataurl=!1;var b=y.header?y.header:null,x=y.frames?y.frames:null;if(b){b.loop_counter=b.loop_count,m=[b.canvas_height],h=[b.canvas_width];for(var S=0;S<x.length&&x[S].blend!=0;S++);}var C=x[0],w=_.WebPDecodeRGBA(v,C.src_off,C.src_size,h,m);C.rgba=w,C.imgwidth=h[0],C.imgheight=m[0];for(var T=0;T<h[0]*m[0]*4;T++)g[T]=w[T];return this.width=h,this.height=m,this.data=g,this}function J2t(){var e,t=this.internal.__metadata__.metadata,n=unescape(encodeURIComponent(t));e=this.internal.__metadata__.rawXml?n:`<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="`+this.internal.__metadata__.namespaceUri+`"><jspdf:metadata>`+n.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)+`</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>`,this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write(`<< /Type /Metadata /Subtype /XML /Length `+e.length+` >>`),this.internal.write(`stream`),this.internal.write(e),this.internal.write(`endstream`),this.internal.write(`endobj`)}function Y2t(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write(`/Metadata `+this.internal.__metadata__.metadataObjectNumber+` 0 R`)}(function(e){var t,n,r,i,a,o,s,l,u,d=function(e){return e||={},this.isStrokeTransparent=e.isStrokeTransparent||!1,this.strokeOpacity=e.strokeOpacity||1,this.strokeStyle=e.strokeStyle||`#000000`,this.fillStyle=e.fillStyle||`#000000`,this.isFillTransparent=e.isFillTransparent||!1,this.fillOpacity=e.fillOpacity||1,this.font=e.font||`10px sans-serif`,this.textBaseline=e.textBaseline||`alphabetic`,this.textAlign=e.textAlign||`left`,this.lineWidth=e.lineWidth||1,this.lineJoin=e.lineJoin||`miter`,this.lineCap=e.lineCap||`butt`,this.path=e.path||[],this.transform=e.transform===void 0?new l:e.transform.clone(),this.globalCompositeOperation=e.globalCompositeOperation||`normal`,this.globalAlpha=e.globalAlpha||1,this.clip_path=e.clip_path||[],this.currentPoint=e.currentPoint||new o,this.miterLimit=e.miterLimit||10,this.lastPoint=e.lastPoint||new o,this.lineDashOffset=e.lineDashOffset||0,this.lineDash=e.lineDash||[],this.margin=e.margin||[0,0,0,0],this.prevPageLastElemOffset=e.prevPageLastElemOffset||0,this.ignoreClearRect=typeof e.ignoreClearRect!=`boolean`||e.ignoreClearRect,this};e.events.push([`initialized`,function(){this.context2d=new f(this),t=this.internal.f2,n=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,o=this.internal.Point,s=this.internal.Rectangle,l=this.internal.Matrix,u=new d}]);var f=function(e){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var t=e;Object.defineProperty(this,"pdf",{get:function(){return t}});var n=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return n},set:function(e){n=!!e}});var r=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return r},set:function(e){r=!!e}});var i=0;Object.defineProperty(this,"posX",{get:function(){return i},set:function(e){isNaN(e)||(i=e)}});var a=0;Object.defineProperty(this,"posY",{get:function(){return a},set:function(e){isNaN(e)||(a=e)}}),Object.defineProperty(this,"margin",{get:function(){return u.margin},set:function(e){var t;typeof e==`number`?t=[e,e,e,e]:((t=[,,,,])[0]=e[0],t[1]=e.length>=2?e[1]:t[0],t[2]=e.length>=3?e[2]:t[0],t[3]=e.length>=4?e[3]:t[1]),u.margin=t}});var o=!1;Object.defineProperty(this,"autoPaging",{get:function(){return o},set:function(e){o=e}});var s=0;Object.defineProperty(this,"lastBreak",{get:function(){return s},set:function(e){s=e}});var l=[];Object.defineProperty(this,"pageBreaks",{get:function(){return l},set:function(e){l=e}}),Object.defineProperty(this,"ctx",{get:function(){return u},set:function(e){e instanceof d&&(u=e)}}),Object.defineProperty(this,"path",{get:function(){return u.path},set:function(e){u.path=e}});var f=[];Object.defineProperty(this,"ctxStack",{get:function(){return f},set:function(e){f=e}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(e){var t=p(e);this.ctx.fillStyle=t.style,this.ctx.isFillTransparent=t.a===0,this.ctx.fillOpacity=t.a,this.pdf.setFillColor(t.r,t.g,t.b,{a:t.a}),this.pdf.setTextColor(t.r,t.g,t.b,{a:t.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(e){var t=p(e);this.ctx.strokeStyle=t.style,this.ctx.isStrokeTransparent=t.a===0,this.ctx.strokeOpacity=t.a,t.a===0?this.pdf.setDrawColor(255,255,255):(t.a,this.pdf.setDrawColor(t.r,t.g,t.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(e){[`butt`,`round`,`square`].indexOf(e)!==-1&&(this.ctx.lineCap=e,this.pdf.setLineCap(e))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(e){isNaN(e)||(this.ctx.lineWidth=e,this.pdf.setLineWidth(e))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(e){[`bevel`,`round`,`miter`].indexOf(e)!==-1&&(this.ctx.lineJoin=e,this.pdf.setLineJoin(e))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(e){isNaN(e)||(this.ctx.miterLimit=e,this.pdf.setMiterLimit(e))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(e){this.ctx.textBaseline=e}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(e){[`right`,`end`,`center`,`left`,`start`].indexOf(e)!==-1&&(this.ctx.textAlign=e)}});var m=null,h=null,g=null;Object.defineProperty(this,"fontFaces",{get:function(){return g},set:function(e){m=null,h=null,g=e}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(e){var t;if(this.ctx.font=e,(t=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(e))!==null){var n=t[1];t[2];var r=t[3],i=t[4];t[5];var a=t[6],o=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(i)[2];i=Math.floor(o===`px`?parseFloat(i)*this.pdf.internal.scaleFactor:o===`em`?parseFloat(i)*this.pdf.getFontSize():parseFloat(i)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(i);var s=function(e){var t,n,r=[],i=e.trim();if(i===``)return M2t;if(i in w2t)return[w2t[i]];for(;i!==``;){switch(n=null,t=(i=E2t(i)).charAt(0)){case`"`:case`'`:n=D2t(i.substring(1),t);break;default:n=O2t(i)}if(n===null||(r.push(n[0]),(i=E2t(n[1]))!==``&&i.charAt(0)!==`,`))return M2t;i=i.replace(/^,/,``)}return r}(a);if(this.fontFaces){var l=function(e,t,n){for(var r=(n||={}).defaultFontFamily||`times`,i=Object.assign({},C2t,n.genericFontFamilies||{}),a=null,o=null,s=0;s<t.length;++s)if(i[(a=x2t(t[s])).family]&&(a.family=i[a.family]),e.hasOwnProperty(a.family)){o=e[a.family];break}if(!(o||=e[r]))throw Error(`Could not find a font-family for the rule '`+T2t(a)+`' and default family '`+r+`'.`);if(o=function(e,t){if(t[e])return t[e];var n=v2t[e],r=S2t(t,_2t,n,n<=v2t.normal?-1:1);if(!r)throw Error(`Could not find a matching font-stretch value for `+e);return r}(a.stretch,o),o=function(e,t){if(t[e])return t[e];for(var n=g2t[e],r=0;r<n.length;++r)if(t[n[r]])return t[n[r]];throw Error(`Could not find a matching font-style for `+e)}(a.style,o),!(o=function(e,t){if(t[e])return t[e];if(e===400&&t[500])return t[500];if(e===500&&t[400])return t[400];var n=b2t[e],r=S2t(t,y2t,n,e<400?-1:1);if(!r)throw Error(`Could not find a matching font-weight for value `+e);return r}(a.weight,o)))throw Error(`Failed to resolve a font for the rule '`+T2t(a)+`'.`);return o}(function(e,t){var n=e.getFontList(),r=JSON.stringify(n);return(m===null||h!==r)&&(m=function(e){for(var t={},n=0;n<e.length;++n){var r=x2t(e[n]),i=r.family,a=r.stretch,o=r.style,s=r.weight;t[i]=t[i]||{},t[i][a]=t[i][a]||{},t[i][a][o]=t[i][a][o]||{},t[i][a][o][s]=r}return t}(function(e){var t=[];return Object.keys(e).forEach(function(n){e[n].forEach(function(e){var r=null;switch(e){case`bold`:r={family:n,weight:`bold`};break;case`italic`:r={family:n,style:`italic`};break;case`bolditalic`:r={family:n,weight:`bold`,style:`italic`};break;case``:case`normal`:r={family:n}}r!==null&&(r.ref={name:n,style:e},t.push(r))})}),t}(n).concat(t)),h=r),m}(this.pdf,this.fontFaces),s.map(function(e){return{family:e,stretch:`normal`,weight:r,style:n}}));this.pdf.setFont(l.ref.name,l.ref.style)}else{var u=``;(r===`bold`||parseInt(r,10)>=700||n===`bold`)&&(u=`bold`),n===`italic`&&(u+=`italic`),u.length===0&&(u=`normal`);for(var d=``,f={arial:`Helvetica`,Arial:`Helvetica`,verdana:`Helvetica`,Verdana:`Helvetica`,helvetica:`Helvetica`,Helvetica:`Helvetica`,"sans-serif":`Helvetica`,fixed:`Courier`,monospace:`Courier`,terminal:`Courier`,cursive:`Times`,fantasy:`Times`,serif:`Times`},p=0;p<s.length;p++){if(this.pdf.internal.getFont(s[p],u,{noFallback:!0,disableWarning:!0})!==void 0){d=s[p];break}if(u===`bolditalic`&&this.pdf.internal.getFont(s[p],`bold`,{noFallback:!0,disableWarning:!0})!==void 0)d=s[p],u=`bold`;else if(this.pdf.internal.getFont(s[p],`normal`,{noFallback:!0,disableWarning:!0})!==void 0){d=s[p],u=`normal`;break}}if(d===``){for(var g=0;g<s.length;g++)if(f[s[g]]){d=f[s[g]];break}}d=d===``?`Times`:d,this.pdf.setFont(d,u)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(e){this.ctx.globalCompositeOperation=e}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(e){this.ctx.globalAlpha=e}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(e){this.ctx.lineDashOffset=e,R.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(e){this.ctx.lineDash=e,R.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(e){this.ctx.ignoreClearRect=!!e}})};f.prototype.setLineDash=function(e){this.lineDash=e},f.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},f.prototype.fill=function(){x.call(this,`fill`,!1)},f.prototype.stroke=function(){x.call(this,`stroke`,!1)},f.prototype.beginPath=function(){this.path=[{type:`begin`}]},f.prototype.moveTo=function(e,t){if(isNaN(e)||isNaN(t))throw q7.error(`jsPDF.context2d.moveTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.moveTo`);var n=this.ctx.transform.applyToPoint(new o(e,t));this.path.push({type:`mt`,x:n.x,y:n.y}),this.ctx.lastPoint=new o(e,t)},f.prototype.closePath=function(){var e=new o(0,0),t=0;for(t=this.path.length-1;t!==-1;t--)if(this.path[t].type===`begin`&&L6(this.path[t+1])===`object`&&typeof this.path[t+1].x==`number`){e=new o(this.path[t+1].x,this.path[t+1].y);break}this.path.push({type:`close`}),this.ctx.lastPoint=new o(e.x,e.y)},f.prototype.lineTo=function(e,t){if(isNaN(e)||isNaN(t))throw q7.error(`jsPDF.context2d.lineTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.lineTo`);var n=this.ctx.transform.applyToPoint(new o(e,t));this.path.push({type:`lt`,x:n.x,y:n.y}),this.ctx.lastPoint=new o(n.x,n.y)},f.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),x.call(this,null,!0)},f.prototype.quadraticCurveTo=function(e,t,n,r){if(isNaN(n)||isNaN(r)||isNaN(e)||isNaN(t))throw q7.error(`jsPDF.context2d.quadraticCurveTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.quadraticCurveTo`);var i=this.ctx.transform.applyToPoint(new o(n,r)),a=this.ctx.transform.applyToPoint(new o(e,t));this.path.push({type:`qct`,x1:a.x,y1:a.y,x:i.x,y:i.y}),this.ctx.lastPoint=new o(i.x,i.y)},f.prototype.bezierCurveTo=function(e,t,n,r,i,a){if(isNaN(i)||isNaN(a)||isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw q7.error(`jsPDF.context2d.bezierCurveTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.bezierCurveTo`);var s=this.ctx.transform.applyToPoint(new o(i,a)),l=this.ctx.transform.applyToPoint(new o(e,t)),u=this.ctx.transform.applyToPoint(new o(n,r));this.path.push({type:`bct`,x1:l.x,y1:l.y,x2:u.x,y2:u.y,x:s.x,y:s.y}),this.ctx.lastPoint=new o(s.x,s.y)},f.prototype.arc=function(e,t,n,r,i,a){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i))throw q7.error(`jsPDF.context2d.arc: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.arc`);if(a=!!a,!this.ctx.transform.isIdentity){var s=this.ctx.transform.applyToPoint(new o(e,t));e=s.x,t=s.y;var l=this.ctx.transform.applyToPoint(new o(0,n)),u=this.ctx.transform.applyToPoint(new o(0,0));n=Math.sqrt((l.x-u.x)**2+(l.y-u.y)**2)}Math.abs(i-r)>=2*Math.PI&&(r=0,i=2*Math.PI),this.path.push({type:`arc`,x:e,y:t,radius:n,startAngle:r,endAngle:i,counterclockwise:a})},f.prototype.arcTo=function(e,t,n,r,i){throw Error(`arcTo not implemented.`)},f.prototype.rect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw q7.error(`jsPDF.context2d.rect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.rect`);this.moveTo(e,t),this.lineTo(e+n,t),this.lineTo(e+n,t+r),this.lineTo(e,t+r),this.lineTo(e,t),this.lineTo(e+n,t),this.lineTo(e,t)},f.prototype.fillRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw q7.error(`jsPDF.context2d.fillRect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.fillRect`);if(!m.call(this)){var i={};this.lineCap!==`butt`&&(i.lineCap=this.lineCap,this.lineCap=`butt`),this.lineJoin!==`miter`&&(i.lineJoin=this.lineJoin,this.lineJoin=`miter`),this.beginPath(),this.rect(e,t,n,r),this.fill(),i.hasOwnProperty(`lineCap`)&&(this.lineCap=i.lineCap),i.hasOwnProperty(`lineJoin`)&&(this.lineJoin=i.lineJoin)}},f.prototype.strokeRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw q7.error(`jsPDF.context2d.strokeRect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.strokeRect`);h.call(this)||(this.beginPath(),this.rect(e,t,n,r),this.stroke())},f.prototype.clearRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw q7.error(`jsPDF.context2d.clearRect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.clearRect`);this.ignoreClearRect||(this.fillStyle=`#ffffff`,this.fillRect(e,t,n,r))},f.prototype.save=function(e){e=typeof e!=`boolean`||e;for(var t=this.pdf.internal.getCurrentPageInfo().pageNumber,n=0;n<this.pdf.internal.getNumberOfPages();n++)this.pdf.setPage(n+1),this.pdf.internal.out(`q`);if(this.pdf.setPage(t),e){this.ctx.fontSize=this.pdf.internal.getFontSize();var r=new d(this.ctx);this.ctxStack.push(this.ctx),this.ctx=r}},f.prototype.restore=function(e){e=typeof e!=`boolean`||e;for(var t=this.pdf.internal.getCurrentPageInfo().pageNumber,n=0;n<this.pdf.internal.getNumberOfPages();n++)this.pdf.setPage(n+1),this.pdf.internal.out(`Q`);this.pdf.setPage(t),e&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},f.prototype.toDataURL=function(){throw Error(`toDataUrl not implemented.`)};var p=function(e){var t,n,r,i;if(!0===e.isCanvasGradient&&(e=e.getColor()),!e)return{r:0,g:0,b:0,a:0,style:e};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(e))t=0,n=0,r=0,i=0;else{var a=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(e);if(a!==null)t=parseInt(a[1]),n=parseInt(a[2]),r=parseInt(a[3]),i=1;else if((a=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(e))!==null)t=parseInt(a[1]),n=parseInt(a[2]),r=parseInt(a[3]),i=parseFloat(a[4]);else{if(i=1,typeof e==`string`&&e.charAt(0)!==`#`){var o=new z0t(e);e=o.ok?o.toHex():`#000000`}e.length===4?(t=e.substring(1,2),t+=t,n=e.substring(2,3),n+=n,r=e.substring(3,4),r+=r):(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7)),t=parseInt(t,16),n=parseInt(n,16),r=parseInt(r,16)}}return{r:t,g:n,b:r,a:i,style:e}},m=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},h=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};f.prototype.fillText=function(e,t,n,r){if(isNaN(t)||isNaN(n)||typeof e!=`string`)throw q7.error(`jsPDF.context2d.fillText: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.fillText`);if(r=isNaN(r)?void 0:r,!m.call(this)){var i=F(this.ctx.transform.rotation),a=this.ctx.transform.scaleX;k.call(this,{text:e,x:t,y:n,scale:a,angle:i,align:this.textAlign,maxWidth:r})}},f.prototype.strokeText=function(e,t,n,r){if(isNaN(t)||isNaN(n)||typeof e!=`string`)throw q7.error(`jsPDF.context2d.strokeText: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.strokeText`);if(!h.call(this)){r=isNaN(r)?void 0:r;var i=F(this.ctx.transform.rotation),a=this.ctx.transform.scaleX;k.call(this,{text:e,x:t,y:n,scale:a,renderingMode:`stroke`,angle:i,align:this.textAlign,maxWidth:r})}},f.prototype.measureText=function(e){if(typeof e!=`string`)throw q7.error(`jsPDF.context2d.measureText: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.measureText`);var t=this.pdf,n=this.pdf.internal.scaleFactor,r=t.internal.getFontSize(),i=t.getStringUnitWidth(e)*r/t.internal.scaleFactor;return new function(e){var t=(e||={}).width||0;return Object.defineProperty(this,"width",{get:function(){return t}}),this}({width:i*=Math.round(96*n/72*1e4)/1e4})},f.prototype.scale=function(e,t){if(isNaN(e)||isNaN(t))throw q7.error(`jsPDF.context2d.scale: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.scale`);var n=new l(e,0,0,t,0,0);this.ctx.transform=this.ctx.transform.multiply(n)},f.prototype.rotate=function(e){if(isNaN(e))throw q7.error(`jsPDF.context2d.rotate: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.rotate`);var t=new l(Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0);this.ctx.transform=this.ctx.transform.multiply(t)},f.prototype.translate=function(e,t){if(isNaN(e)||isNaN(t))throw q7.error(`jsPDF.context2d.translate: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.translate`);var n=new l(1,0,0,1,e,t);this.ctx.transform=this.ctx.transform.multiply(n)},f.prototype.transform=function(e,t,n,r,i,a){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(a))throw q7.error(`jsPDF.context2d.transform: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.transform`);var o=new l(e,t,n,r,i,a);this.ctx.transform=this.ctx.transform.multiply(o)},f.prototype.setTransform=function(e,t,n,r,i,a){e=isNaN(e)?1:e,t=isNaN(t)?0:t,n=isNaN(n)?0:n,r=isNaN(r)?1:r,i=isNaN(i)?0:i,a=isNaN(a)?0:a,this.ctx.transform=new l(e,t,n,r,i,a)};var g=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};f.prototype.drawImage=function(e,t,n,r,i,a,o,u,d){var f=this.pdf.getImageProperties(e),p=1,m=1,h=1,v=1;r!==void 0&&u!==void 0&&(h=u/r,v=d/i,p=f.width/r*u/r,m=f.height/i*d/i),a===void 0&&(a=t,o=n,t=0,n=0),r!==void 0&&u===void 0&&(u=r,d=i),r===void 0&&u===void 0&&(u=f.width,d=f.height);var x=this.ctx.transform.decompose(),C=F(x.rotate.shx),w=new l,T=(w=(w=(w=w.multiply(x.translate)).multiply(x.skew)).multiply(x.scale)).applyToRectangle(new s(a-t*h,o-n*v,r*p,i*m));if(this.autoPaging){for(var E,D=_.call(this,T),O=[],k=0;k<D.length;k+=1)O.indexOf(D[k])===-1&&O.push(D[k]);b(O);for(var A=O[0],j=O[O.length-1],M=A;M<j+1;M++){this.pdf.setPage(M);var N=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],P=M===1?this.posY+this.margin[0]:this.margin[0],I=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],L=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],R=M===1?0:I+(M-2)*L;if(this.ctx.clip_path.length!==0){var ee=this.path;E=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(E,this.posX+this.margin[3],-R+P+this.ctx.prevPageLastElemOffset),S.call(this,`fill`,!0),this.path=ee}var z=JSON.parse(JSON.stringify(T));z=y([z],this.posX+this.margin[3],-R+P+this.ctx.prevPageLastElemOffset)[0];var B=(M>A||M<j)&&g.call(this);B&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],N,L,null).clip().discardPath()),this.pdf.addImage(e,`JPEG`,z.x,z.y,z.w,z.h,null,null,C),B&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(e,`JPEG`,T.x,T.y,T.w,T.h,null,null,C)};var _=function(e,t,n){var r=[];t||=this.pdf.internal.pageSize.width,n||=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var i=this.posY+this.ctx.prevPageLastElemOffset;switch(e.type){default:case`mt`:case`lt`:r.push(Math.floor((e.y+i)/n)+1);break;case`arc`:r.push(Math.floor((e.y+i-e.radius)/n)+1),r.push(Math.floor((e.y+i+e.radius)/n)+1);break;case`qct`:var a=I(this.ctx.lastPoint.x,this.ctx.lastPoint.y,e.x1,e.y1,e.x,e.y);r.push(Math.floor((a.y+i)/n)+1),r.push(Math.floor((a.y+a.h+i)/n)+1);break;case`bct`:var o=L(this.ctx.lastPoint.x,this.ctx.lastPoint.y,e.x1,e.y1,e.x2,e.y2,e.x,e.y);r.push(Math.floor((o.y+i)/n)+1),r.push(Math.floor((o.y+o.h+i)/n)+1);break;case`rect`:r.push(Math.floor((e.y+i)/n)+1),r.push(Math.floor((e.y+e.h+i)/n)+1)}for(var s=0;s<r.length;s+=1)for(;this.pdf.internal.getNumberOfPages()<r[s];)v.call(this);return r},v=function(){var e=this.fillStyle,t=this.strokeStyle,n=this.font,r=this.lineCap,i=this.lineWidth,a=this.lineJoin;this.pdf.addPage(),this.fillStyle=e,this.strokeStyle=t,this.font=n,this.lineCap=r,this.lineWidth=i,this.lineJoin=a},y=function(e,t,n){for(var r=0;r<e.length;r++)switch(e[r].type){case`bct`:e[r].x2+=t,e[r].y2+=n;case`qct`:e[r].x1+=t,e[r].y1+=n;default:e[r].x+=t,e[r].y+=n}return e},b=function(e){return e.sort(function(e,t){return e-t})},x=function(e,t){var n=this.fillStyle,r=this.strokeStyle,i=this.lineCap,a=this.lineWidth,o=Math.abs(a*this.ctx.transform.scaleX),s=this.lineJoin;if(this.autoPaging){for(var l,u,d=JSON.parse(JSON.stringify(this.path)),f=JSON.parse(JSON.stringify(this.path)),p=[],m=0;m<f.length;m++)if(f[m].x!==void 0)for(var h=_.call(this,f[m]),x=0;x<h.length;x+=1)p.indexOf(h[x])===-1&&p.push(h[x]);for(var C=0;C<p.length;C++)for(;this.pdf.internal.getNumberOfPages()<p[C];)v.call(this);b(p);for(var w=p[0],T=p[p.length-1],E=w;E<T+1;E++){this.pdf.setPage(E),this.fillStyle=n,this.strokeStyle=r,this.lineCap=i,this.lineWidth=o,this.lineJoin=s;var D=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],O=E===1?this.posY+this.margin[0]:this.margin[0],k=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],A=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],j=E===1?0:k+(E-2)*A;if(this.ctx.clip_path.length!==0){var M=this.path;l=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(l,this.posX+this.margin[3],-j+O+this.ctx.prevPageLastElemOffset),S.call(this,e,!0),this.path=M}if(u=JSON.parse(JSON.stringify(d)),this.path=y(u,this.posX+this.margin[3],-j+O+this.ctx.prevPageLastElemOffset),!1===t||E===0){var N=(E>w||E<T)&&g.call(this);N&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],D,A,null).clip().discardPath()),S.call(this,e,t),N&&this.pdf.restoreGraphicsState()}this.lineWidth=a}this.path=d}else this.lineWidth=o,S.call(this,e,t),this.lineWidth=a},S=function(e,t){if((e!==`stroke`||t||!h.call(this))&&(e===`stroke`||t||!m.call(this))){for(var n,r,i=[],a=this.path,o=0;o<a.length;o++){var s=a[o];switch(s.type){case`begin`:i.push({begin:!0});break;case`close`:i.push({close:!0});break;case`mt`:i.push({start:s,deltas:[],abs:[]});break;case`lt`:var l=i.length;if(a[o-1]&&!isNaN(a[o-1].x)&&(n=[s.x-a[o-1].x,s.y-a[o-1].y],l>0)){for(;l>=0;l--)if(!0!==i[l-1].close&&!0!==i[l-1].begin){i[l-1].deltas.push(n),i[l-1].abs.push(s);break}}break;case`bct`:n=[s.x1-a[o-1].x,s.y1-a[o-1].y,s.x2-a[o-1].x,s.y2-a[o-1].y,s.x-a[o-1].x,s.y-a[o-1].y],i[i.length-1].deltas.push(n);break;case`qct`:var u=a[o-1].x+2/3*(s.x1-a[o-1].x),d=a[o-1].y+2/3*(s.y1-a[o-1].y),f=s.x+2/3*(s.x1-s.x),p=s.y+2/3*(s.y1-s.y),g=s.x,_=s.y;n=[u-a[o-1].x,d-a[o-1].y,f-a[o-1].x,p-a[o-1].y,g-a[o-1].x,_-a[o-1].y],i[i.length-1].deltas.push(n);break;case`arc`:i.push({deltas:[],abs:[],arc:!0}),Array.isArray(i[i.length-1].abs)&&i[i.length-1].abs.push(s)}}r=t?null:e===`stroke`?`stroke`:`fill`;for(var v=!1,y=0;y<i.length;y++)if(i[y].arc)for(var b=i[y].abs,x=0;x<b.length;x++){var S=b[x];S.type===`arc`?T.call(this,S.x,S.y,S.radius,S.startAngle,S.endAngle,S.counterclockwise,void 0,t,!v):A.call(this,S.x,S.y),v=!0}else if(!0===i[y].close)this.pdf.internal.out(`h`),v=!1;else if(!0!==i[y].begin){var C=i[y].start.x,w=i[y].start.y;j.call(this,i[y].deltas,C,w),v=!0}r&&E.call(this,r),t&&D.call(this)}},C=function(e){var t=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,n=t*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case`bottom`:return e-n;case`top`:return e+t-n;case`hanging`:return e+t-2*n;case`middle`:return e+t/2-n;default:return e}},w=function(e){return e+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};f.prototype.createLinearGradient=function(){var e=function(){};return e.colorStops=[],e.addColorStop=function(e,t){this.colorStops.push([e,t])},e.getColor=function(){return this.colorStops.length===0?`#000000`:this.colorStops[0][1]},e.isCanvasGradient=!0,e},f.prototype.createPattern=function(){return this.createLinearGradient()},f.prototype.createRadialGradient=function(){return this.createLinearGradient()};var T=function(e,t,n,r,i,a,o,s,l){for(var u=N.call(this,n,r,i,a),d=0;d<u.length;d++){var f=u[d];d===0&&(l?O.call(this,f.x1+e,f.y1+t):A.call(this,f.x1+e,f.y1+t)),M.call(this,e,t,f.x2,f.y2,f.x3,f.y3,f.x4,f.y4)}s?D.call(this):E.call(this,o)},E=function(e){switch(e){case`stroke`:this.pdf.internal.out(`S`);break;case`fill`:this.pdf.internal.out(`f`)}},D=function(){this.pdf.clip(),this.pdf.discardPath()},O=function(e,t){this.pdf.internal.out(n(e)+` `+r(t)+` m`)},k=function(e){var t;switch(e.align){case`right`:case`end`:t=`right`;break;case`center`:t=`center`;break;default:t=`left`}var n,r,i,a=this.pdf.getTextDimensions(e.text),u=C.call(this,e.y),d=w.call(this,u)-a.h,f=this.ctx.transform.applyToPoint(new o(e.x,u));if(this.autoPaging){var p=this.ctx.transform.decompose(),m=new l;m=(m=(m=m.multiply(p.translate)).multiply(p.skew)).multiply(p.scale);for(var h=this.ctx.transform.applyToRectangle(new s(e.x,u,a.w,a.h)),v=m.applyToRectangle(new s(e.x,d,a.w,a.h)),x=_.call(this,v),T=[],E=0;E<x.length;E+=1)T.indexOf(x[E])===-1&&T.push(x[E]);b(T);for(var D=T[0],O=T[T.length-1],k=D;k<O+1;k++){this.pdf.setPage(k);var A=k===1?this.posY+this.margin[0]:this.margin[0],j=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],M=this.pdf.internal.pageSize.height-this.margin[2],N=M-this.margin[0],P=this.pdf.internal.pageSize.width-this.margin[1],F=P-this.margin[3],I=k===1?0:j+(k-2)*N;if(this.ctx.clip_path.length!==0){var L=this.path;n=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(n,this.posX+this.margin[3],-1*I+A),S.call(this,`fill`,!0),this.path=L}var R=y([JSON.parse(JSON.stringify(v))],this.posX+this.margin[3],-I+A+this.ctx.prevPageLastElemOffset)[0];e.scale>=.01&&(r=this.pdf.internal.getFontSize(),this.pdf.setFontSize(r*e.scale),i=this.lineWidth,this.lineWidth=i*e.scale);var ee=this.autoPaging!==`text`;if(ee||R.y+R.h<=M){if(ee||R.y>=A&&R.x<=P){var z=ee?e.text:this.pdf.splitTextToSize(e.text,e.maxWidth||P-R.x)[0],B=y([JSON.parse(JSON.stringify(h))],this.posX+this.margin[3],-I+A+this.ctx.prevPageLastElemOffset)[0],V=ee&&(k>D||k<O)&&g.call(this);V&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],F,N,null).clip().discardPath()),this.pdf.text(z,B.x,B.y,{angle:e.angle,align:t,renderingMode:e.renderingMode}),V&&this.pdf.restoreGraphicsState()}}else R.y<M&&(this.ctx.prevPageLastElemOffset+=M-R.y);e.scale>=.01&&(this.pdf.setFontSize(r),this.lineWidth=i)}}else e.scale>=.01&&(r=this.pdf.internal.getFontSize(),this.pdf.setFontSize(r*e.scale),i=this.lineWidth,this.lineWidth=i*e.scale),this.pdf.text(e.text,f.x+this.posX,f.y+this.posY,{angle:e.angle,align:t,renderingMode:e.renderingMode,maxWidth:e.maxWidth}),e.scale>=.01&&(this.pdf.setFontSize(r),this.lineWidth=i)},A=function(e,t,i,a){i||=0,a||=0,this.pdf.internal.out(n(e+i)+` `+r(t+a)+` l`)},j=function(e,t,n){return this.pdf.lines(e,t,n,null,null)},M=function(e,n,r,o,s,l,u,d){this.pdf.internal.out([t(i(r+e)),t(a(o+n)),t(i(s+e)),t(a(l+n)),t(i(u+e)),t(a(d+n)),`c`].join(` `))},N=function(e,t,n,r){for(var i=2*Math.PI,a=Math.PI/2;t>n;)t-=i;var o=Math.abs(n-t);o<i&&r&&(o=i-o);for(var s=[],l=r?-1:1,u=t;o>1e-5;){var d=u+l*Math.min(o,a);s.push(P.call(this,e,u,d)),o-=Math.abs(d-u),u=d}return s},P=function(e,t,n){var r=(n-t)/2,i=e*Math.cos(r),a=e*Math.sin(r),o=i,s=-a,l=o*o+s*s,u=l+o*i+s*a,d=4/3*(Math.sqrt(2*l*u)-u)/(o*a-s*i),f=o-d*s,p=s+d*o,m=f,h=-p,g=r+t,_=Math.cos(g),v=Math.sin(g);return{x1:e*Math.cos(t),y1:e*Math.sin(t),x2:f*_-p*v,y2:f*v+p*_,x3:m*_-h*v,y3:m*v+h*_,x4:e*Math.cos(n),y4:e*Math.sin(n)}},F=function(e){return 180*e/Math.PI},I=function(e,t,n,r,i,a){var o=e+.5*(n-e),l=t+.5*(r-t),u=i+.5*(n-i),d=a+.5*(r-a),f=Math.min(e,i,o,u),p=Math.max(e,i,o,u),m=Math.min(t,a,l,d),h=Math.max(t,a,l,d);return new s(f,m,p-f,h-m)},L=function(e,t,n,r,i,a,o,l){var u,d,f,p,m,h,g,_,v,y,b,x,S,C,w=n-e,T=r-t,E=i-n,D=a-r,O=o-i,k=l-a;for(d=0;d<41;d++)v=(g=(f=e+(u=d/40)*w)+u*((m=n+u*E)-f))+u*(m+u*(i+u*O-m)-g),y=(_=(p=t+u*T)+u*((h=r+u*D)-p))+u*(h+u*(a+u*k-h)-_),d==0?(b=v,x=y,S=v,C=y):(b=Math.min(b,v),x=Math.min(x,y),S=Math.max(S,v),C=Math.max(C,y));return new s(Math.round(b),Math.round(x),Math.round(S-b),Math.round(C-x))},R=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var e,t,n=(e=this.ctx.lineDash,t=this.ctx.lineDashOffset,JSON.stringify({lineDash:e,lineDashOffset:t}));this.prevLineDash!==n&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=n)}}})(c9.API),function(e){var t=function(e){var t,n,r,i,a,o,s,l,u,d;for(/[^\x00-\xFF]/.test(e),n=[],r=0,i=(e+=t=`\0\0\0\0`.slice(e.length%4||4)).length;i>r;r+=4)(a=(e.charCodeAt(r)<<24)+(e.charCodeAt(r+1)<<16)+(e.charCodeAt(r+2)<<8)+e.charCodeAt(r+3))===0?n.push(122):(o=(a=((a=((a=((a=(a-(d=a%85))/85)-(u=a%85))/85)-(l=a%85))/85)-(s=a%85))/85)%85,n.push(o+33,s+33,l+33,u+33,d+33));return function(e,t){for(var n=t;n>0;n--)e.pop()}(n,t.length),String.fromCharCode.apply(String,n)+`~>`},n=function(e){var t,n,r,i,a,o=String,s=`length`,l=255,u=`charCodeAt`,d=`slice`,f=`replace`;for(e[d](-2),e=e[d](0,-2)[f](/\s/g,``)[f](`z`,`!!!!!`),r=[],i=0,a=(e+=t=`uuuuu`[d](e[s]%5||5))[s];a>i;i+=5)n=52200625*(e[u](i)-33)+614125*(e[u](i+1)-33)+7225*(e[u](i+2)-33)+85*(e[u](i+3)-33)+(e[u](i+4)-33),r.push(l&n>>24,l&n>>16,l&n>>8,l&n);return function(e,t){for(var n=t;n>0;n--)e.pop()}(r,t[s]),o.fromCharCode.apply(o,r)},r=function(e){return e.split(``).map(function(e){return(`0`+e.charCodeAt().toString(16)).slice(-2)}).join(``)+`>`},i=function(e){var t=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((e=e.replace(/\s/g,``)).indexOf(`>`)!==-1&&(e=e.substr(0,e.indexOf(`>`))),e.length%2&&(e+=`0`),!1===t.test(e))return``;for(var n=``,r=0;r<e.length;r+=2)n+=String.fromCharCode(`0x`+(e[r]+e[r+1]));return n},a=function(e){for(var t=new Uint8Array(e.length),n=e.length;n--;)t[n]=e.charCodeAt(n);return(t=EKt(t)).reduce(function(e,t){return e+String.fromCharCode(t)},``)};e.processDataByFilters=function(e,o){var s=0,l=e||``,u=[];for(typeof(o||=[])==`string`&&(o=[o]),s=0;s<o.length;s+=1)switch(o[s]){case`ASCII85Decode`:case`/ASCII85Decode`:l=n(l),u.push(`/ASCII85Encode`);break;case`ASCII85Encode`:case`/ASCII85Encode`:l=t(l),u.push(`/ASCII85Decode`);break;case`ASCIIHexDecode`:case`/ASCIIHexDecode`:l=i(l),u.push(`/ASCIIHexEncode`);break;case`ASCIIHexEncode`:case`/ASCIIHexEncode`:l=r(l),u.push(`/ASCIIHexDecode`);break;case`FlateEncode`:case`/FlateEncode`:l=a(l),u.push(`/FlateDecode`);break;default:throw Error(`The filter: "`+o[s]+`" is not implemented`)}return{data:l,reverseChain:u.reverse().join(` `)}}}(c9.API),function(e){e.loadFile=function(e,t,n){return function(e,t,n){t=!1!==t,n=typeof n==`function`?n:function(){};var r=void 0;try{r=function(e,t,n){var r=new XMLHttpRequest,i=0,a=function(e){var t=e.length,n=[],r=String.fromCharCode;for(i=0;i<t;i+=1)n.push(r(255&e.charCodeAt(i)));return n.join(``)};if(r.open(`GET`,e,!t),r.overrideMimeType(`text/plain; charset=x-user-defined`),!1===t&&(r.onload=function(){r.status===200?n(a(this.responseText)):n(void 0)}),r.send(null),t&&r.status===200)return a(r.responseText)}(e,t,n)}catch{}return r}(e,t,n)},e.allowFsRead=void 0,e.loadImageFile=e.loadFile}(c9.API),function(e){function t(){return(K7.html2canvas?Promise.resolve(K7.html2canvas):Rp(()=>Promise.resolve().then(()=>d(cZt())),void 0,import.meta.url)).catch(function(e){return Promise.reject(Error(`Could not load html2canvas: `+e))}).then(function(e){return e.default?e.default:e})}function n(){return(K7.DOMPurify?Promise.resolve(K7.DOMPurify):Rp(()=>Promise.resolve().then(()=>(ah(),Fne)),void 0,import.meta.url)).catch(function(e){return Promise.reject(Error(`Could not load dompurify: `+e))}).then(function(e){return e.default?e.default:e})}var r=function(e){var t=L6(e);return t===`undefined`?`undefined`:t===`string`||e instanceof String?`string`:t===`number`||e instanceof Number?`number`:t===`function`||e instanceof Function?`function`:e&&e.constructor===Array?`array`:e&&e.nodeType===1?`element`:t===`object`?`object`:`unknown`},i=function(e,t){var n=document.createElement(e);for(var r in t.className&&(n.className=t.className),t.innerHTML&&t.dompurify&&(n.innerHTML=t.dompurify.sanitize(t.innerHTML)),t.style)n.style[r]=t.style[r];return n},a=function e(t,n){for(var r=t.nodeType===3?document.createTextNode(t.nodeValue):t.cloneNode(!1),i=t.firstChild;i;i=i.nextSibling)!0!==n&&i.nodeType===1&&i.nodeName===`SCRIPT`||r.appendChild(e(i,n));return t.nodeType===1&&(t.nodeName===`CANVAS`?(r.width=t.width,r.height=t.height,r.getContext(`2d`).drawImage(t,0,0)):t.nodeName!==`TEXTAREA`&&t.nodeName!==`SELECT`||(r.value=t.value),r.addEventListener(`load`,function(){r.scrollTop=t.scrollTop,r.scrollLeft=t.scrollLeft},!0)),r},o=function e(t){var n=Object.assign(e.convert(Promise.resolve()),JSON.parse(JSON.stringify(e.template))),r=e.convert(Promise.resolve(),n);return(r=r.setProgress(1,e,1,[e])).set(t)};(o.prototype=Object.create(Promise.prototype)).constructor=o,o.convert=function(e,t){return e.__proto__=t||o.prototype,e},o.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:`file.pdf`,margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:`transparent`}},o.prototype.from=function(e,t){return this.then(function(){switch(t||=function(e){switch(r(e)){case`string`:return`string`;case`element`:return e.nodeName.toLowerCase()===`canvas`?`canvas`:`element`;default:return`unknown`}}(e),t){case`string`:return this.then(n).then(function(t){return this.set({src:i(`div`,{innerHTML:e,dompurify:t})})});case`element`:return this.set({src:e});case`canvas`:return this.set({canvas:e});case`img`:return this.set({img:e});default:return this.error(`Unknown source type.`)}})},o.prototype.to=function(e){switch(e){case`container`:return this.toContainer();case`canvas`:return this.toCanvas();case`img`:return this.toImg();case`pdf`:return this.toPdf();default:return this.error(`Invalid target.`)}},o.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error(`Cannot duplicate - no source HTML.`)},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var e={position:`relative`,display:`inline-block`,width:(typeof this.opt.width!=`number`||isNaN(this.opt.width)||typeof this.opt.windowWidth!=`number`||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+`px`,left:0,right:0,top:0,margin:`auto`,backgroundColor:this.opt.backgroundColor},t=a(this.prop.src,this.opt.html2canvas.javascriptEnabled);t.tagName===`BODY`&&(e.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+`px`),this.prop.overlay=i(`div`,{className:`html2pdf__overlay`,style:{position:`fixed`,overflow:`hidden`,zIndex:1e3,left:`-100000px`,right:0,bottom:0,top:0}}),this.prop.container=i(`div`,{className:`html2pdf__container`,style:e}),this.prop.container.appendChild(t),this.prop.container.firstChild.appendChild(i(`div`,{style:{clear:`both`,border:`0 none transparent`,margin:0,padding:0,height:0}})),this.prop.container.style.float=`none`,this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position=`relative`,this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+`px`})},o.prototype.toCanvas=function(){return this.thenList([function(){return document.body.contains(this.prop.container)||this.toContainer()}]).then(t).then(function(e){var t=Object.assign({},this.opt.html2canvas);return delete t.onrendered,e(this.prop.container,t)}).then(function(e){(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)})},o.prototype.toContext2d=function(){return this.thenList([function(){return document.body.contains(this.prop.container)||this.toContainer()}]).then(t).then(function(e){var t=this.opt.jsPDF,n=this.opt.fontFaces,r=typeof this.opt.width!=`number`||isNaN(this.opt.width)||typeof this.opt.windowWidth!=`number`||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,i=Object.assign({async:!0,allowTaint:!0,scale:r,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:`#ffffff`,imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete i.onrendered,t.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,t.context2d.posX=this.opt.x,t.context2d.posY=this.opt.y,t.context2d.margin=this.opt.margin,t.context2d.fontFaces=n,n)for(var a=0;a<n.length;++a){var o=n[a],s=o.src.find(function(e){return e.format===`truetype`});s&&t.addFont(s.url,o.ref.name,o.ref.style)}return i.windowHeight=i.windowHeight||0,i.windowHeight=i.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):i.windowHeight,t.context2d.save(!0),e(this.prop.container,i)}).then(function(e){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)})},o.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var e=this.prop.canvas.toDataURL(`image/`+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement(`img`),this.prop.img.src=e})},o.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},o.prototype.output=function(e,t,n){return(n||=`pdf`).toLowerCase()===`img`||n.toLowerCase()===`image`?this.outputImg(e,t):this.outputPdf(e,t)},o.prototype.outputPdf=function(e,t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(e,t)})},o.prototype.outputImg=function(e){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(e){case void 0:case`img`:return this.prop.img;case`datauristring`:case`dataurlstring`:return this.prop.img.src;case`datauri`:case`dataurl`:return document.location.href=this.prop.img.src;default:throw`Image output type "`+e+`" is not supported.`}})},o.prototype.save=function(e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(e?{filename:e}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},o.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},o.prototype.set=function(e){if(r(e)!==`object`)return this;var t=Object.keys(e||{}).map(function(t){if(t in o.template.prop)return function(){this.prop[t]=e[t]};switch(t){case`margin`:return this.setMargin.bind(this,e.margin);case`jsPDF`:return function(){return this.opt.jsPDF=e.jsPDF,this.setPageSize()};case`pageSize`:return this.setPageSize.bind(this,e.pageSize);default:return function(){this.opt[t]=e[t]}}},this);return this.then(function(){return this.thenList(t)})},o.prototype.get=function(e,t){return this.then(function(){var n=e in o.template.prop?this.prop[e]:this.opt[e];return t?t(n):n})},o.prototype.setMargin=function(e){return this.then(function(){switch(r(e)){case`number`:e=[e,e,e,e];case`array`:if(e.length===2&&(e=[e[0],e[1],e[0],e[1]]),e.length===4)break;default:return this.error(`Invalid margin array.`)}this.opt.margin=e}).then(this.setPageSize)},o.prototype.setPageSize=function(e){function t(e,t){return Math.floor(e*t/72*96)}return this.then(function(){(e||=c9.getPageSize(this.opt.jsPDF)).hasOwnProperty(`inner`)||(e.inner={width:e.width-this.opt.margin[1]-this.opt.margin[3],height:e.height-this.opt.margin[0]-this.opt.margin[2]},e.inner.px={width:t(e.inner.width,e.k),height:t(e.inner.height,e.k)},e.inner.ratio=e.inner.height/e.inner.width),this.prop.pageSize=e})},o.prototype.setProgress=function(e,t,n,r){return e!=null&&(this.progress.val=e),t!=null&&(this.progress.state=t),n!=null&&(this.progress.n=n),r!=null&&(this.progress.stack=r),this.progress.ratio=this.progress.val/this.progress.state,this},o.prototype.updateProgress=function(e,t,n,r){return this.setProgress(e?this.progress.val+e:null,t||null,n?this.progress.n+n:null,r?this.progress.stack.concat(r):null)},o.prototype.then=function(e,t){var n=this;return this.thenCore(e,t,function(e,t){return n.updateProgress(null,null,1,[e]),Promise.prototype.then.call(this,function(t){return n.updateProgress(null,e),t}).then(e,t).then(function(e){return n.updateProgress(1),e})})},o.prototype.thenCore=function(e,t,n){n||=Promise.prototype.then;var r=this;e&&=e.bind(r),t&&=t.bind(r);var i=Promise.toString().indexOf(`[native code]`)!==-1&&Promise.name===`Promise`?r:o.convert(Object.assign({},r),Promise.prototype),a=n.call(i,e,t);return o.convert(a,r.__proto__)},o.prototype.thenExternal=function(e,t){return Promise.prototype.then.call(this,e,t)},o.prototype.thenList=function(e){var t=this;return e.forEach(function(e){t=t.thenCore(e)}),t},o.prototype.catch=function(e){e&&=e.bind(this);var t=Promise.prototype.catch.call(this,e);return o.convert(t,this)},o.prototype.catchExternal=function(e){return Promise.prototype.catch.call(this,e)},o.prototype.error=function(e){return this.then(function(){throw Error(e)})},o.prototype.using=o.prototype.set,o.prototype.saveAs=o.prototype.save,o.prototype.export=o.prototype.output,o.prototype.run=o.prototype.then,c9.getPageSize=function(e,t,n){if(L6(e)===`object`){var r=e;e=r.orientation,t=r.unit||t,n=r.format||n}t||=`mm`,n||=`a4`,e=(``+(e||`P`)).toLowerCase();var i,a=(``+n).toLowerCase(),o={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(t){case`pt`:i=1;break;case`mm`:i=72/25.4;break;case`cm`:i=72/2.54;break;case`in`:i=72;break;case`px`:i=.75;break;case`pc`:case`em`:i=12;break;case`ex`:i=6;break;default:throw`Invalid unit: `+t}var s,l=0,u=0;if(o.hasOwnProperty(a))l=o[a][1]/i,u=o[a][0]/i;else try{l=n[1],u=n[0]}catch{throw Error(`Invalid format: `+n)}if(e===`p`||e===`portrait`)e=`p`,u>l&&(s=u,u=l,l=s);else{if(e!==`l`&&e!==`landscape`)throw`Invalid orientation: `+e;e=`l`,l>u&&(s=u,u=l,l=s)}return{width:u,height:l,unit:t,k:i,orientation:e}},e.html=function(e,t){(t||={}).callback=t.callback||function(){},t.html2canvas=t.html2canvas||{},t.html2canvas.canvas=t.html2canvas.canvas||this.canvas,t.jsPDF=t.jsPDF||this,t.fontFaces=t.fontFaces?t.fontFaces.map(x2t):null;var n=new o(t);return t.worker?n:n.from(e).doCallback()}}(c9.API),c9.API.addJS=function(e){var t,n,r=function(e){for(var t=``,n=0;n<e.length;n++){var r=e[n];if(r===`(`||r===`)`){for(var i=0,a=n-1;a>=0&&e[a]===`\\`;a--)i++;t+=i%2==0?`\\`+r:r}else t+=r}return t}(e);return this.internal.events.subscribe(`postPutResources`,function(){t=this.internal.newObject(),this.internal.out(`<<`),this.internal.out(`/Names [(EmbeddedJS) `+(t+1)+` 0 R]`),this.internal.out(`>>`),this.internal.out(`endobj`),n=this.internal.newObject(),this.internal.out(`<<`),this.internal.out(`/S /JavaScript`),this.internal.out(`/JS (`+r+`)`),this.internal.out(`>>`),this.internal.out(`endobj`)}),this.internal.events.subscribe(`putCatalog`,function(){t!==void 0&&n!==void 0&&this.internal.out(`/Names <</JavaScript `+t+` 0 R>>`)}),this},function(e){var t;e.events.push([`postPutResources`,function(){var e=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var r=e.outline.render().split(/\r\n/),i=0;i<r.length;i++){var a=r[i],o=n.exec(a);if(o!=null){var s=o[1];e.internal.newObjectDeferredBegin(s,!1)}e.internal.write(a)}if(this.outline.createNamedDestinations){var l=this.internal.pages.length,u=[];for(i=0;i<l;i++){var d=e.internal.newObject();u.push(d);var f=e.internal.getPageInfo(i+1);e.internal.write(`<< /D[`+f.objId+` 0 R /XYZ null null null]>> endobj`)}var p=e.internal.newObject();for(e.internal.write(`<< /Names [ `),i=0;i<u.length;i++)e.internal.write(`(page_`+(i+1)+`)`+u[i]+` 0 R`);e.internal.write(` ] >>`,`endobj`),t=e.internal.newObject(),e.internal.write(`<< /Dests `+p+` 0 R`),e.internal.write(`>>`,`endobj`)}}]),e.events.push([`putCatalog`,function(){var e=this;e.outline.root.children.length>0&&(e.internal.write(`/Outlines`,this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&e.internal.write(`/Names `+t+` 0 R`))}]),e.events.push([`initialized`,function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(e,t,n){var r={title:t,options:n,children:[]};return e??=this.root,e.children.push(r),r},e.outline.render=function(){return this.ctx={},this.ctx.val=``,this.ctx.pdf=e,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},e.outline.genIds_r=function(t){t.id=e.internal.newObjectDeferred();for(var n=0;n<t.children.length;n++)this.genIds_r(t.children[n])},e.outline.renderRoot=function(e){this.objStart(e),this.line(`/Type /Outlines`),e.children.length>0&&(this.line(`/First `+this.makeRef(e.children[0])),this.line(`/Last `+this.makeRef(e.children[e.children.length-1]))),this.line(`/Count `+this.count_r({count:0},e)),this.objEnd()},e.outline.renderItems=function(t){for(var n=this.ctx.pdf.internal.getVerticalCoordinateString,r=0;r<t.children.length;r++){var i=t.children[r];this.objStart(i),this.line(`/Title `+this.makeString(i.title)),this.line(`/Parent `+this.makeRef(t)),r>0&&this.line(`/Prev `+this.makeRef(t.children[r-1])),r<t.children.length-1&&this.line(`/Next `+this.makeRef(t.children[r+1])),i.children.length>0&&(this.line(`/First `+this.makeRef(i.children[0])),this.line(`/Last `+this.makeRef(i.children[i.children.length-1])));var a=this.count=this.count_r({count:0},i);if(a>0&&this.line(`/Count `+a),i.options&&i.options.pageNumber){var o=e.internal.getPageInfo(i.options.pageNumber);this.line(`/Dest [`+o.objId+` 0 R /XYZ 0 `+n(0)+` 0]`)}this.objEnd()}for(var s=0;s<t.children.length;s++)this.renderItems(t.children[s])},e.outline.line=function(e){this.ctx.val+=e+`\r
|
|
4198
4198
|
`},e.outline.makeRef=function(e){return e.id+` 0 R`},e.outline.makeString=function(t){return`(`+e.internal.pdfEscape(t)+`)`},e.outline.objStart=function(e){this.ctx.val+=`\r
|
|
4199
4199
|
`+e.id+` 0 obj\r
|
|
4200
4200
|
<<\r
|
|
@@ -4202,7 +4202,7 @@ T* `):e.join(` Tj
|
|
|
4202
4202
|
endobj\r
|
|
4203
4203
|
`},e.outline.count_r=function(e,t){for(var n=0;n<t.children.length;n++)e.count++,this.count_r(e,t.children[n]);return e.count}}])}(c9.API),function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(e,n,r,i,a,o){var s,l=this.decode.DCT_DECODE,u=null;if(typeof e==`string`||this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e)){switch(e=a||e,e=this.__addimage__.isArrayBuffer(e)?new Uint8Array(e):e,s=function(e){for(var n,r=256*e.charCodeAt(4)+e.charCodeAt(5),i=e.length,a={width:0,height:0,numcomponents:1},o=4;o<i;o+=2){if(o+=r,t.indexOf(e.charCodeAt(o+1))!==-1){n=256*e.charCodeAt(o+5)+e.charCodeAt(o+6),a={width:256*e.charCodeAt(o+7)+e.charCodeAt(o+8),height:n,numcomponents:e.charCodeAt(o+9)};break}r=256*e.charCodeAt(o+2)+e.charCodeAt(o+3)}return a}(e=this.__addimage__.isArrayBufferView(e)?this.__addimage__.arrayBufferToBinaryString(e):e),s.numcomponents){case 1:o=this.color_spaces.DEVICE_GRAY;break;case 4:o=this.color_spaces.DEVICE_CMYK;break;case 3:o=this.color_spaces.DEVICE_RGB}u={data:e,width:s.width,height:s.height,colorSpace:o,bitsPerComponent:8,filter:l,index:n,alias:r}}return u}}(c9.API),c9.API.processPNG=function(e,t,n,r){if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){var i,a=sZt(e,{checkCrc:!0}),o=a.width,s=a.height,l=a.channels,u=a.palette,d=a.depth;i=u&&l===1?function(e){for(var t=e.width,n=e.height,r=e.data,i=e.palette,a=e.depth,o=!1,s=[],l=[],u=void 0,d=!1,f=0,p=0;p<i.length;p++){var m=NKt(i[p],4),h=m[0],g=m[1],_=m[2],v=m[3];s.push(h,g,_),v!=null&&(v===0?(f++,l.length<1&&l.push(p)):v<255&&(d=!0))}if(d||f>1){o=!0,l=void 0;var y=t*n;u=new Uint8Array(y);for(var b=new DataView(r.buffer),x=0;x<y;x++){var S=NKt(i[V2t(b,x,a)],4)[3];u[x]=S}}else f===0&&(l=void 0);return{colorSpace:`Indexed`,colorsPerPixel:1,sMaskBitsPerComponent:o?8:void 0,colorBytes:r,alphaBytes:u,needSMask:o,palette:s,mask:l}}(a):l===2||l===4?function(e){for(var t=e.data,n=e.width,r=e.height,i=e.channels,a=e.depth,o=i===2?`DeviceGray`:`DeviceRGB`,s=i-1,l=n*r,u=s,d=l*u,f=1*l,p=Math.ceil(d*a/8),m=Math.ceil(f*a/8),h=new Uint8Array(p),g=new Uint8Array(m),_=new DataView(t.buffer),v=new DataView(h.buffer),y=new DataView(g.buffer),b=!1,x=0;x<l;x++){for(var S=x*i,C=0;C<u;C++)H2t(v,V2t(_,S+C,a),x*u+C,a);var w=V2t(_,S+u,a);w<(1<<a)-1&&(b=!0),H2t(y,w,1*x,a)}return{colorSpace:o,colorsPerPixel:s,sMaskBitsPerComponent:b?a:void 0,colorBytes:h,alphaBytes:g,needSMask:b}}(a):function(e){var t=e.data,n=e.channels===1?`DeviceGray`:`DeviceRGB`;return{colorSpace:n,colorsPerPixel:n===`DeviceGray`?1:3,colorBytes:t instanceof Uint16Array?function(e){for(var t=e.length,n=new Uint8Array(2*t),r=new DataView(n.buffer,n.byteOffset,n.byteLength),i=0;i<t;i++)r.setUint16(2*i,e[i],!1);return n}(t):t,needSMask:!1}}(a);var f,p,m,h=i,g=h.colorSpace,_=h.colorsPerPixel,v=h.sMaskBitsPerComponent,y=h.colorBytes,b=h.alphaBytes,x=h.needSMask,S=h.palette,C=h.mask,w=null;return r!==c9.API.image_compression.NONE&&typeof EKt==`function`?(w=function(e){var t;switch(e){case c9.API.image_compression.FAST:t=11;break;case c9.API.image_compression.MEDIUM:t=13;break;case c9.API.image_compression.SLOW:t=14;break;default:t=12}return t}(r),f=this.decode.FLATE_DECODE,p=`/Predictor ${w} /Colors ${_} /BitsPerComponent ${d} /Columns ${o}`,e=N2t(y,Math.ceil(o*_*d/8),_,d,r),x&&(m=N2t(b,Math.ceil(o*v/8),1,v,r))):(f=void 0,p=void 0,e=y,x&&(m=b)),(this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e))&&(e=this.__addimage__.arrayBufferToBinaryString(e)),(m&&this.__addimage__.isArrayBuffer(m)||this.__addimage__.isArrayBufferView(m))&&(m=this.__addimage__.arrayBufferToBinaryString(m)),{alias:n,data:e,index:t,filter:f,decodeParameters:p,transparency:C,palette:S,sMask:m,predictor:w,width:o,height:s,bitsPerComponent:d,sMaskBitsPerComponent:v,colorSpace:g}}},function(e){e.processGIF89A=function(t,n,r,i){var a=new W2t(t),o=a.width,s=a.height,l=[];a.decodeAndBlitFrameRGBA(0,l);var u={data:l,width:o,height:s},d=new K2t(100).encode(u,100);return e.processJPEG.call(this,d,n,r,i)},e.processGIF87A=e.processGIF89A}(c9.API),L9.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=this.colors===0?1<<this.bitPP:this.colors;this.palette=Array(e);for(var t=0;t<e;t++){var n=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:i,green:r,blue:n,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},L9.prototype.parseBGR=function(){this.pos=this.offset;var e=`bit`+this.bitPP,t=this.width*this.height*4;if(t>536870912)throw Error(`Image dimensions exceed 512MB, which is too large.`);this.data=new Uint8Array(t);try{this[e]()}catch(e){q7.log(`bit decode error:`+e)}},L9.prototype.bit1=function(){var e,t=Math.ceil(this.width/8),n=t%4;for(e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,i=0;i<t;i++)for(var a=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+8*i*4,s=0;s<8&&8*i+s<this.width;s++){var l=this.palette[a>>7-s&1];this.data[o+4*s]=l.blue,this.data[o+4*s+1]=l.green,this.data[o+4*s+2]=l.red,this.data[o+4*s+3]=255}n!==0&&(this.pos+=4-n)}},L9.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<e;i++){var a=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+2*i*4,s=a>>4,l=15&a,u=this.palette[s];if(this.data[o]=u.blue,this.data[o+1]=u.green,this.data[o+2]=u.red,this.data[o+3]=255,2*i+1>=this.width)break;u=this.palette[l],this.data[o+4]=u.blue,this.data[o+4+1]=u.green,this.data[o+4+2]=u.red,this.data[o+4+3]=255}t!==0&&(this.pos+=4-t)}},L9.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var i=this.datav.getUint8(this.pos++,!0),a=n*this.width*4+4*r;if(i<this.palette.length){var o=this.palette[i];this.data[a]=o.red,this.data[a+1]=o.green,this.data[a+2]=o.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}e!==0&&(this.pos+=4-e)}},L9.prototype.bit15=function(){for(var e=this.width%3,t=31,n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<this.width;i++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(a&t)/t*255|0,s=(a>>5&t)/t*255|0,l=(a>>10&t)/t*255|0,u=a>>15?255:0,d=r*this.width*4+4*i;this.data[d]=l,this.data[d+1]=s,this.data[d+2]=o,this.data[d+3]=u}this.pos+=e}},L9.prototype.bit16=function(){for(var e=this.width%3,t=31,n=63,r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,a=0;a<this.width;a++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(o&t)/t*255|0,l=(o>>5&n)/n*255|0,u=(o>>11)/t*255|0,d=i*this.width*4+4*a;this.data[d]=u,this.data[d+1]=l,this.data[d+2]=s,this.data[d+3]=255}this.pos+=e}},L9.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=t*this.width*4+4*n;this.data[o]=a,this.data[o+1]=i,this.data[o+2]=r,this.data[o+3]=255}this.pos+=this.width%4}},L9.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=t*this.width*4+4*n;this.data[s]=a,this.data[s+1]=i,this.data[s+2]=r,this.data[s+3]=o}},L9.prototype.getData=function(){return this.data},function(e){e.processBMP=function(t,n,r,i){var a=new L9(t,!1),o=a.width,s=a.height,l={data:a.getData(),width:o,height:s},u=new K2t(100).encode(l,100);return e.processJPEG.call(this,u,n,r,i)}}(c9.API),q2t.prototype.getData=function(){return this.data},function(e){e.processWEBP=function(t,n,r,i){var a=new q2t(t),o=a.width,s=a.height,l={data:a.getData(),width:o,height:s},u=new K2t(100).encode(l,100);return e.processJPEG.call(this,u,n,r,i)}}(c9.API),c9.API.processRGBA=function(e,t,n){for(var r=e.data,i=r.length,a=new Uint8Array(i/4*3),o=new Uint8Array(i/4),s=0,l=0,u=0;u<i;u+=4){var d=r[u],f=r[u+1],p=r[u+2],m=r[u+3];a[s++]=d,a[s++]=f,a[s++]=p,o[l++]=m}var h=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:h,index:t,alias:n,colorSpace:`DeviceRGB`,bitsPerComponent:8,width:e.width,height:e.height}},c9.API.setLanguage=function(e){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:`Afrikaans`,sq:`Albanian`,ar:`Arabic (Standard)`,"ar-DZ":`Arabic (Algeria)`,"ar-BH":`Arabic (Bahrain)`,"ar-EG":`Arabic (Egypt)`,"ar-IQ":`Arabic (Iraq)`,"ar-JO":`Arabic (Jordan)`,"ar-KW":`Arabic (Kuwait)`,"ar-LB":`Arabic (Lebanon)`,"ar-LY":`Arabic (Libya)`,"ar-MA":`Arabic (Morocco)`,"ar-OM":`Arabic (Oman)`,"ar-QA":`Arabic (Qatar)`,"ar-SA":`Arabic (Saudi Arabia)`,"ar-SY":`Arabic (Syria)`,"ar-TN":`Arabic (Tunisia)`,"ar-AE":`Arabic (U.A.E.)`,"ar-YE":`Arabic (Yemen)`,an:`Aragonese`,hy:`Armenian`,as:`Assamese`,ast:`Asturian`,az:`Azerbaijani`,eu:`Basque`,be:`Belarusian`,bn:`Bengali`,bs:`Bosnian`,br:`Breton`,bg:`Bulgarian`,my:`Burmese`,ca:`Catalan`,ch:`Chamorro`,ce:`Chechen`,zh:`Chinese`,"zh-HK":`Chinese (Hong Kong)`,"zh-CN":`Chinese (PRC)`,"zh-SG":`Chinese (Singapore)`,"zh-TW":`Chinese (Taiwan)`,cv:`Chuvash`,co:`Corsican`,cr:`Cree`,hr:`Croatian`,cs:`Czech`,da:`Danish`,nl:`Dutch (Standard)`,"nl-BE":`Dutch (Belgian)`,en:`English`,"en-AU":`English (Australia)`,"en-BZ":`English (Belize)`,"en-CA":`English (Canada)`,"en-IE":`English (Ireland)`,"en-JM":`English (Jamaica)`,"en-NZ":`English (New Zealand)`,"en-PH":`English (Philippines)`,"en-ZA":`English (South Africa)`,"en-TT":`English (Trinidad & Tobago)`,"en-GB":`English (United Kingdom)`,"en-US":`English (United States)`,"en-ZW":`English (Zimbabwe)`,eo:`Esperanto`,et:`Estonian`,fo:`Faeroese`,fj:`Fijian`,fi:`Finnish`,fr:`French (Standard)`,"fr-BE":`French (Belgium)`,"fr-CA":`French (Canada)`,"fr-FR":`French (France)`,"fr-LU":`French (Luxembourg)`,"fr-MC":`French (Monaco)`,"fr-CH":`French (Switzerland)`,fy:`Frisian`,fur:`Friulian`,gd:`Gaelic (Scots)`,"gd-IE":`Gaelic (Irish)`,gl:`Galacian`,ka:`Georgian`,de:`German (Standard)`,"de-AT":`German (Austria)`,"de-DE":`German (Germany)`,"de-LI":`German (Liechtenstein)`,"de-LU":`German (Luxembourg)`,"de-CH":`German (Switzerland)`,el:`Greek`,gu:`Gujurati`,ht:`Haitian`,he:`Hebrew`,hi:`Hindi`,hu:`Hungarian`,is:`Icelandic`,id:`Indonesian`,iu:`Inuktitut`,ga:`Irish`,it:`Italian (Standard)`,"it-CH":`Italian (Switzerland)`,ja:`Japanese`,kn:`Kannada`,ks:`Kashmiri`,kk:`Kazakh`,km:`Khmer`,ky:`Kirghiz`,tlh:`Klingon`,ko:`Korean`,"ko-KP":`Korean (North Korea)`,"ko-KR":`Korean (South Korea)`,la:`Latin`,lv:`Latvian`,lt:`Lithuanian`,lb:`Luxembourgish`,mk:`North Macedonia`,ms:`Malay`,ml:`Malayalam`,mt:`Maltese`,mi:`Maori`,mr:`Marathi`,mo:`Moldavian`,nv:`Navajo`,ng:`Ndonga`,ne:`Nepali`,no:`Norwegian`,nb:`Norwegian (Bokmal)`,nn:`Norwegian (Nynorsk)`,oc:`Occitan`,or:`Oriya`,om:`Oromo`,fa:`Persian`,"fa-IR":`Persian/Iran`,pl:`Polish`,pt:`Portuguese`,"pt-BR":`Portuguese (Brazil)`,pa:`Punjabi`,"pa-IN":`Punjabi (India)`,"pa-PK":`Punjabi (Pakistan)`,qu:`Quechua`,rm:`Rhaeto-Romanic`,ro:`Romanian`,"ro-MO":`Romanian (Moldavia)`,ru:`Russian`,"ru-MO":`Russian (Moldavia)`,sz:`Sami (Lappish)`,sg:`Sango`,sa:`Sanskrit`,sc:`Sardinian`,sd:`Sindhi`,si:`Singhalese`,sr:`Serbian`,sk:`Slovak`,sl:`Slovenian`,so:`Somani`,sb:`Sorbian`,es:`Spanish`,"es-AR":`Spanish (Argentina)`,"es-BO":`Spanish (Bolivia)`,"es-CL":`Spanish (Chile)`,"es-CO":`Spanish (Colombia)`,"es-CR":`Spanish (Costa Rica)`,"es-DO":`Spanish (Dominican Republic)`,"es-EC":`Spanish (Ecuador)`,"es-SV":`Spanish (El Salvador)`,"es-GT":`Spanish (Guatemala)`,"es-HN":`Spanish (Honduras)`,"es-MX":`Spanish (Mexico)`,"es-NI":`Spanish (Nicaragua)`,"es-PA":`Spanish (Panama)`,"es-PY":`Spanish (Paraguay)`,"es-PE":`Spanish (Peru)`,"es-PR":`Spanish (Puerto Rico)`,"es-ES":`Spanish (Spain)`,"es-UY":`Spanish (Uruguay)`,"es-VE":`Spanish (Venezuela)`,sx:`Sutu`,sw:`Swahili`,sv:`Swedish`,"sv-FI":`Swedish (Finland)`,"sv-SV":`Swedish (Sweden)`,ta:`Tamil`,tt:`Tatar`,te:`Teluga`,th:`Thai`,tig:`Tigre`,ts:`Tsonga`,tn:`Tswana`,tr:`Turkish`,tk:`Turkmen`,uk:`Ukrainian`,hsb:`Upper Sorbian`,ur:`Urdu`,ve:`Venda`,vi:`Vietnamese`,vo:`Volapuk`,wa:`Walloon`,cy:`Welsh`,xh:`Xhosa`,ji:`Yiddish`,zu:`Zulu`}[e]!==void 0&&(this.internal.languageSettings.languageCode=e,!1===this.internal.languageSettings.isSubscribed&&(this.internal.events.subscribe(`putCatalog`,function(){this.internal.write(`/Lang (`+this.internal.languageSettings.languageCode+`)`)}),this.internal.languageSettings.isSubscribed=!0)),this},F9=c9.API,I9=F9.getCharWidthsArray=function(e,t){var n,r,i=(t||={}).font||this.internal.getFont(),a=t.fontSize||this.internal.getFontSize(),o=t.charSpace||this.internal.getCharSpace(),s=t.widths?t.widths:i.metadata.Unicode.widths,l=s.fof?s.fof:1,u=t.kerning?t.kerning:i.metadata.Unicode.kerning,d=u.fof?u.fof:1,f=!1!==t.doKerning,p=0,m=e.length,h=0,g=s[0]||l,_=[];for(n=0;n<m;n++)r=e.charCodeAt(n),typeof i.metadata.widthOfString==`function`?_.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(r))+1e3/a*o||0)/1e3):(p=f&&L6(u[r])===`object`&&!isNaN(parseInt(u[r][h],10))?u[r][h]/d:0,_.push((s[r]||g)/l+p)),h=r;return _},k2t=F9.getStringUnitWidth=function(e,t){var n=(t||={}).fontSize||this.internal.getFontSize(),r=t.font||this.internal.getFont(),i=t.charSpace||this.internal.getCharSpace();return F9.processArabic&&(e=F9.processArabic(e)),typeof r.metadata.widthOfString==`function`?r.metadata.widthOfString(e,n,i)/n:I9.apply(this,arguments).reduce(function(e,t){return e+t},0)},A2t=function(e,t,n,r){for(var i=[],a=0,o=e.length,s=0;a!==o&&s+t[a]<n;)s+=t[a],a++;i.push(e.slice(0,a));var l=a;for(s=0;a!==o;)s+t[a]>r&&(i.push(e.slice(l,a)),s=0,l=a),s+=t[a],a++;return l!==a&&i.push(e.slice(l,a)),i},j2t=function(e,t,n){n||={};var r,i,a,o,s,l,u,d=[],f=[d],p=n.textIndent||0,m=0,h=0,g=e.split(` `),_=I9.apply(this,[` `,n])[0];if(l=n.lineIndent===-1?g[0].length+2:n.lineIndent||0){var v=Array(l).join(` `),y=[];g.map(function(e){(e=e.split(/\s*\n/)).length>1?y=y.concat(e.map(function(e,t){return(t&&e.length?`
|
|
4204
4204
|
`:``)+e})):y.push(e[0])}),g=y,l=k2t.apply(this,[v,n])}for(a=0,o=g.length;a<o;a++){var b=0;if(r=g[a],l&&r[0]==`
|
|
4205
|
-
`&&(r=r.substr(1),b=1),p+m+(h=(i=I9.apply(this,[r,n])).reduce(function(e,t){return e+t},0))>t||b){if(h>t){for(s=A2t.apply(this,[r,i,t-(p+m),t]),d.push(s.shift()),d=[s.pop()];s.length;)f.push([s.shift()]);h=i.slice(r.length-(d[0]?d[0].length:0)).reduce(function(e,t){return e+t},0)}else d=[r];f.push(d),p=h+l,m=_}else d.push(r),p+=m+h,m=_}return u=l?function(e,t){return(t?v:``)+e.join(` `)}:function(e){return e.join(` `)},f.map(u)},F9.splitTextToSize=function(e,t,n){var r,i=(n||={}).fontSize||this.internal.getFontSize(),a=function(e){if(e.widths&&e.kerning)return{widths:e.widths,kerning:e.kerning};var t=this.internal.getFont(e.fontName,e.fontStyle),n=`Unicode`;return t.metadata[n]?{widths:t.metadata[n].widths||{0:1},kerning:t.metadata[n].kerning||{}}:{font:t.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,n);r=Array.isArray(e)?e:String(e).split(/\r?\n/);var o=1*this.internal.scaleFactor*t/i;a.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=n.lineIndent;var s,l,u=[];for(s=0,l=r.length;s<l;s++)u=u.concat(j2t.apply(this,[r[s],o,a]));return u},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t=`0123456789abcdef`,n=`klmnopqrstuvwxyz`,r={},i={},a=0;a<16;a++)r[n[a]]=t[a],i[t[a]]=n[a];var o=function(e){return`0x`+parseInt(e,10).toString(16)},s=e.__fontmetrics__.compress=function(e){var t,n,r,a,l=[`{`];for(var u in e){if(t=e[u],isNaN(parseInt(u,10))?n=`'`+u+`'`:(u=parseInt(u,10),n=(n=o(u).slice(2)).slice(0,-1)+i[n.slice(-1)]),typeof t==`number`)t<0?(r=o(t).slice(3),a=`-`):(r=o(t).slice(2),a=``),r=a+r.slice(0,-1)+i[r.slice(-1)];else{if(L6(t)!==`object`)throw Error(`Don't know what to do with value type `+L6(t)+`.`);r=s(t)}l.push(n+r)}return l.push(`}`),l.join(``)},l=e.__fontmetrics__.uncompress=function(e){if(typeof e!=`string`)throw Error(`Invalid argument passed to uncompress.`);for(var t,n,i,a,o={},s=1,l=o,u=[],d=``,f=``,p=e.length-1,m=1;m<p;m+=1)(a=e[m])==`'`?t?(i=t.join(``),t=void 0):t=[]:t?t.push(a):a==`{`?(u.push([l,i]),l={},i=void 0):a==`}`?((n=u.pop())[0][n[1]]=l,i=void 0,l=n[0]):a==`-`?s=-1:i===void 0?r.hasOwnProperty(a)?(d+=r[a],i=parseInt(d,16)*s,s=1,d=``):d+=a:r.hasOwnProperty(a)?(f+=r[a],l[i]=parseInt(f,16)*s,s=1,i=void 0,f=``):f+=a;return o},u={codePages:[`WinAnsiEncoding`],WinAnsiEncoding:l(`{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}`)},d={Unicode:{Courier:u,"Courier-Bold":u,"Courier-BoldOblique":u,"Courier-Oblique":u,Helvetica:u,"Helvetica-Bold":u,"Helvetica-BoldOblique":u,"Helvetica-Oblique":u,"Times-Roman":u,"Times-Bold":u,"Times-BoldItalic":u,"Times-Italic":u}},f={Unicode:{"Courier-Oblique":l(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Times-BoldItalic":l(`{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}`),"Helvetica-Bold":l(`{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}`),Courier:l(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Courier-BoldOblique":l(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Times-Bold":l(`{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}`),Symbol:l(`{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}`),Helvetica:l(`{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}`),"Helvetica-BoldOblique":l(`{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}`),ZapfDingbats:l(`{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}`),"Courier-Bold":l(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Times-Italic":l(`{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}`),"Times-Roman":l(`{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}`),"Helvetica-Oblique":l(`{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}`)}};e.events.push([`addFont`,function(e){var t=e.font,n=f.Unicode[t.postScriptName];n&&(t.metadata.Unicode={},t.metadata.Unicode.widths=n.widths,t.metadata.Unicode.kerning=n.kerning);var r=d.Unicode[t.postScriptName];r&&(t.metadata.Unicode.encoding=r,t.encoding=r.codePages[0])}])}(c9.API),function(e){var t=function(e){for(var t=e.length,n=new Uint8Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);return n};e.API.events.push([`addFont`,function(n){var r=void 0,i=n.font,a=n.instance;if(!i.isStandardFont){if(a===void 0)throw Error(`Font does not exist in vFS, import fonts or remove declaration doc.addFont('`+i.postScriptName+`').`);if(typeof(r=!1===a.existsFileInVFS(i.postScriptName)?a.loadFile(i.postScriptName):a.getFileFromVFS(i.postScriptName))!=`string`)throw Error(`Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('`+i.postScriptName+`').`);(function(n,r){r=/^\x00\x01\x00\x00/.test(r)?t(r):t(X7(r)),n.metadata=e.API.TTFFont.open(r),n.metadata.Unicode=n.metadata.Unicode||{encoding:{},kerning:{},widths:[]},n.metadata.glyIdsUsed=[0]})(i,r)}}])}(c9),c9.API.addSvgAsImage=function(e,t,n,r,i,a,o,s){if(isNaN(t)||isNaN(n))throw q7.error(`jsPDF.addSvgAsImage: Invalid coordinates`,arguments),Error(`Invalid coordinates passed to jsPDF.addSvgAsImage`);if(isNaN(r)||isNaN(i))throw q7.error(`jsPDF.addSvgAsImage: Invalid measurements`,arguments),Error(`Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage`);var l=document.createElement(`canvas`);l.width=r,l.height=i;var u=l.getContext(`2d`);u.fillStyle=`#fff`,u.fillRect(0,0,l.width,l.height);var d={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},f=this;return(K7.canvg?Promise.resolve(K7.canvg):Rp(()=>Promise.resolve().then(()=>(F0t(),r1t)),void 0)).catch(function(e){return Promise.reject(Error(`Could not load canvg: `+e))}).then(function(e){return e.default?e.default:e}).then(function(t){return t.fromString(u,e,d)},function(){return Promise.reject(Error(`Could not load canvg.`))}).then(function(e){return e.render(d)}).then(function(){f.addImage(l.toDataURL(`image/jpeg`,1),t,n,r,i,o,s)})},c9.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,`g`),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),`g`),n=this.pdfEscape16(this.internal.getNumberOfPages()+``,this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var i=0;i<this.internal.pages[r].length;i++)this.internal.pages[r][i]=this.internal.pages[r][i].replace(t,n);return this},c9.API.viewerPreferences=function(e,t){var n;e||={},t||=!1;var r,i,a,o={HideToolbar:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:`UseNone`,value:`UseNone`,type:`name`,explicitSet:!1,valueSet:[`UseNone`,`UseOutlines`,`UseThumbs`,`UseOC`],pdfVersion:1.3},Direction:{defaultValue:`L2R`,value:`L2R`,type:`name`,explicitSet:!1,valueSet:[`L2R`,`R2L`],pdfVersion:1.3},ViewArea:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},ViewClip:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},PrintArea:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},PrintClip:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},PrintScaling:{defaultValue:`AppDefault`,value:`AppDefault`,type:`name`,explicitSet:!1,valueSet:[`AppDefault`,`None`],pdfVersion:1.6},Duplex:{defaultValue:``,value:`none`,type:`name`,explicitSet:!1,valueSet:[`Simplex`,`DuplexFlipShortEdge`,`DuplexFlipLongEdge`,`none`],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:``,value:``,type:`array`,explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:`integer`,explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(o),l=[],u=0,d=0,f=0;function p(e,t){var n,r=!1;for(n=0;n<e.length;n+=1)e[n]===t&&(r=!0);return r}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,e===`reset`||!0===t){var m=s.length;for(f=0;f<m;f+=1)n[s[f]].value=n[s[f]].defaultValue,n[s[f]].explicitSet=!1}if(L6(e)===`object`){for(i in e)if(a=e[i],p(s,i)&&a!==void 0){if(n[i].type===`boolean`&&typeof a==`boolean`)n[i].value=a;else if(n[i].type===`name`&&p(n[i].valueSet,a))n[i].value=a;else if(n[i].type===`integer`&&Number.isInteger(a))n[i].value=a;else if(n[i].type===`array`){for(u=0;u<a.length;u+=1)if(r=!0,a[u].length===1&&typeof a[u][0]==`number`)l.push(String(a[u]-1));else if(a[u].length>1){for(d=0;d<a[u].length;d+=1)typeof a[u][d]!=`number`&&(r=!1);!0===r&&l.push([a[u][0]-1,a[u][1]-1].join(` `))}n[i].value=`[`+l.join(` `)+`]`}else n[i].value=n[i].defaultValue;n[i].explicitSet=!0}}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe(`putCatalog`,function(){var e,t=[];for(e in n)!0===n[e].explicitSet&&(n[e].type===`name`?t.push(`/`+e+` /`+n[e].value):t.push(`/`+e+` `+n[e].value));t.length!==0&&this.internal.write(`/ViewerPreferences
|
|
4205
|
+
`&&(r=r.substr(1),b=1),p+m+(h=(i=I9.apply(this,[r,n])).reduce(function(e,t){return e+t},0))>t||b){if(h>t){for(s=A2t.apply(this,[r,i,t-(p+m),t]),d.push(s.shift()),d=[s.pop()];s.length;)f.push([s.shift()]);h=i.slice(r.length-(d[0]?d[0].length:0)).reduce(function(e,t){return e+t},0)}else d=[r];f.push(d),p=h+l,m=_}else d.push(r),p+=m+h,m=_}return u=l?function(e,t){return(t?v:``)+e.join(` `)}:function(e){return e.join(` `)},f.map(u)},F9.splitTextToSize=function(e,t,n){var r,i=(n||={}).fontSize||this.internal.getFontSize(),a=function(e){if(e.widths&&e.kerning)return{widths:e.widths,kerning:e.kerning};var t=this.internal.getFont(e.fontName,e.fontStyle),n=`Unicode`;return t.metadata[n]?{widths:t.metadata[n].widths||{0:1},kerning:t.metadata[n].kerning||{}}:{font:t.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,n);r=Array.isArray(e)?e:String(e).split(/\r?\n/);var o=1*this.internal.scaleFactor*t/i;a.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=n.lineIndent;var s,l,u=[];for(s=0,l=r.length;s<l;s++)u=u.concat(j2t.apply(this,[r[s],o,a]));return u},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t=`0123456789abcdef`,n=`klmnopqrstuvwxyz`,r={},i={},a=0;a<16;a++)r[n[a]]=t[a],i[t[a]]=n[a];var o=function(e){return`0x`+parseInt(e,10).toString(16)},s=e.__fontmetrics__.compress=function(e){var t,n,r,a,l=[`{`];for(var u in e){if(t=e[u],isNaN(parseInt(u,10))?n=`'`+u+`'`:(u=parseInt(u,10),n=(n=o(u).slice(2)).slice(0,-1)+i[n.slice(-1)]),typeof t==`number`)t<0?(r=o(t).slice(3),a=`-`):(r=o(t).slice(2),a=``),r=a+r.slice(0,-1)+i[r.slice(-1)];else{if(L6(t)!==`object`)throw Error(`Don't know what to do with value type `+L6(t)+`.`);r=s(t)}l.push(n+r)}return l.push(`}`),l.join(``)},l=e.__fontmetrics__.uncompress=function(e){if(typeof e!=`string`)throw Error(`Invalid argument passed to uncompress.`);for(var t,n,i,a,o={},s=1,l=o,u=[],d=``,f=``,p=e.length-1,m=1;m<p;m+=1)(a=e[m])==`'`?t?(i=t.join(``),t=void 0):t=[]:t?t.push(a):a==`{`?(u.push([l,i]),l={},i=void 0):a==`}`?((n=u.pop())[0][n[1]]=l,i=void 0,l=n[0]):a==`-`?s=-1:i===void 0?r.hasOwnProperty(a)?(d+=r[a],i=parseInt(d,16)*s,s=1,d=``):d+=a:r.hasOwnProperty(a)?(f+=r[a],l[i]=parseInt(f,16)*s,s=1,i=void 0,f=``):f+=a;return o},u={codePages:[`WinAnsiEncoding`],WinAnsiEncoding:l(`{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}`)},d={Unicode:{Courier:u,"Courier-Bold":u,"Courier-BoldOblique":u,"Courier-Oblique":u,Helvetica:u,"Helvetica-Bold":u,"Helvetica-BoldOblique":u,"Helvetica-Oblique":u,"Times-Roman":u,"Times-Bold":u,"Times-BoldItalic":u,"Times-Italic":u}},f={Unicode:{"Courier-Oblique":l(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Times-BoldItalic":l(`{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}`),"Helvetica-Bold":l(`{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}`),Courier:l(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Courier-BoldOblique":l(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Times-Bold":l(`{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}`),Symbol:l(`{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}`),Helvetica:l(`{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}`),"Helvetica-BoldOblique":l(`{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}`),ZapfDingbats:l(`{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}`),"Courier-Bold":l(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Times-Italic":l(`{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}`),"Times-Roman":l(`{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}`),"Helvetica-Oblique":l(`{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}`)}};e.events.push([`addFont`,function(e){var t=e.font,n=f.Unicode[t.postScriptName];n&&(t.metadata.Unicode={},t.metadata.Unicode.widths=n.widths,t.metadata.Unicode.kerning=n.kerning);var r=d.Unicode[t.postScriptName];r&&(t.metadata.Unicode.encoding=r,t.encoding=r.codePages[0])}])}(c9.API),function(e){var t=function(e){for(var t=e.length,n=new Uint8Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);return n};e.API.events.push([`addFont`,function(n){var r=void 0,i=n.font,a=n.instance;if(!i.isStandardFont){if(a===void 0)throw Error(`Font does not exist in vFS, import fonts or remove declaration doc.addFont('`+i.postScriptName+`').`);if(typeof(r=!1===a.existsFileInVFS(i.postScriptName)?a.loadFile(i.postScriptName):a.getFileFromVFS(i.postScriptName))!=`string`)throw Error(`Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('`+i.postScriptName+`').`);(function(n,r){r=/^\x00\x01\x00\x00/.test(r)?t(r):t(X7(r)),n.metadata=e.API.TTFFont.open(r),n.metadata.Unicode=n.metadata.Unicode||{encoding:{},kerning:{},widths:[]},n.metadata.glyIdsUsed=[0]})(i,r)}}])}(c9),c9.API.addSvgAsImage=function(e,t,n,r,i,a,o,s){if(isNaN(t)||isNaN(n))throw q7.error(`jsPDF.addSvgAsImage: Invalid coordinates`,arguments),Error(`Invalid coordinates passed to jsPDF.addSvgAsImage`);if(isNaN(r)||isNaN(i))throw q7.error(`jsPDF.addSvgAsImage: Invalid measurements`,arguments),Error(`Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage`);var l=document.createElement(`canvas`);l.width=r,l.height=i;var u=l.getContext(`2d`);u.fillStyle=`#fff`,u.fillRect(0,0,l.width,l.height);var d={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},f=this;return(K7.canvg?Promise.resolve(K7.canvg):Rp(()=>Promise.resolve().then(()=>(F0t(),r1t)),void 0,import.meta.url)).catch(function(e){return Promise.reject(Error(`Could not load canvg: `+e))}).then(function(e){return e.default?e.default:e}).then(function(t){return t.fromString(u,e,d)},function(){return Promise.reject(Error(`Could not load canvg.`))}).then(function(e){return e.render(d)}).then(function(){f.addImage(l.toDataURL(`image/jpeg`,1),t,n,r,i,o,s)})},c9.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,`g`),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),`g`),n=this.pdfEscape16(this.internal.getNumberOfPages()+``,this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var i=0;i<this.internal.pages[r].length;i++)this.internal.pages[r][i]=this.internal.pages[r][i].replace(t,n);return this},c9.API.viewerPreferences=function(e,t){var n;e||={},t||=!1;var r,i,a,o={HideToolbar:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:`UseNone`,value:`UseNone`,type:`name`,explicitSet:!1,valueSet:[`UseNone`,`UseOutlines`,`UseThumbs`,`UseOC`],pdfVersion:1.3},Direction:{defaultValue:`L2R`,value:`L2R`,type:`name`,explicitSet:!1,valueSet:[`L2R`,`R2L`],pdfVersion:1.3},ViewArea:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},ViewClip:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},PrintArea:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},PrintClip:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},PrintScaling:{defaultValue:`AppDefault`,value:`AppDefault`,type:`name`,explicitSet:!1,valueSet:[`AppDefault`,`None`],pdfVersion:1.6},Duplex:{defaultValue:``,value:`none`,type:`name`,explicitSet:!1,valueSet:[`Simplex`,`DuplexFlipShortEdge`,`DuplexFlipLongEdge`,`none`],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:``,value:``,type:`array`,explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:`integer`,explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(o),l=[],u=0,d=0,f=0;function p(e,t){var n,r=!1;for(n=0;n<e.length;n+=1)e[n]===t&&(r=!0);return r}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,e===`reset`||!0===t){var m=s.length;for(f=0;f<m;f+=1)n[s[f]].value=n[s[f]].defaultValue,n[s[f]].explicitSet=!1}if(L6(e)===`object`){for(i in e)if(a=e[i],p(s,i)&&a!==void 0){if(n[i].type===`boolean`&&typeof a==`boolean`)n[i].value=a;else if(n[i].type===`name`&&p(n[i].valueSet,a))n[i].value=a;else if(n[i].type===`integer`&&Number.isInteger(a))n[i].value=a;else if(n[i].type===`array`){for(u=0;u<a.length;u+=1)if(r=!0,a[u].length===1&&typeof a[u][0]==`number`)l.push(String(a[u]-1));else if(a[u].length>1){for(d=0;d<a[u].length;d+=1)typeof a[u][d]!=`number`&&(r=!1);!0===r&&l.push([a[u][0]-1,a[u][1]-1].join(` `))}n[i].value=`[`+l.join(` `)+`]`}else n[i].value=n[i].defaultValue;n[i].explicitSet=!0}}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe(`putCatalog`,function(){var e,t=[];for(e in n)!0===n[e].explicitSet&&(n[e].type===`name`?t.push(`/`+e+` /`+n[e].value):t.push(`/`+e+` `+n[e].value));t.length!==0&&this.internal.write(`/ViewerPreferences
|
|
4206
4206
|
<<
|
|
4207
4207
|
`+t.join(`
|
|
4208
4208
|
`)+`
|
|
@@ -4232,4 +4232,4 @@ CMapName currentdict /CMap defineresource pop
|
|
|
4232
4232
|
end
|
|
4233
4233
|
end`};t.events.push([`putFont`,function(t){(function(t){var n=t.font,i=t.out,a=t.newObject,o=t.putStream;if(n.metadata instanceof e.API.TTFFont&&n.encoding===`Identity-H`){for(var s=n.metadata.Unicode.widths,l=n.metadata.subset.encode(n.metadata.glyIdsUsed,1),u=``,d=0;d<l.length;d++)u+=String.fromCharCode(l[d]);var f=a();o({data:u,addLength1:!0,objectId:f}),i(`endobj`);var p=a();o({data:r(n.metadata.toUnicode),addLength1:!0,objectId:p}),i(`endobj`);var m=a();i(`<<`),i(`/Type /FontDescriptor`),i(`/FontName /`+i9(n.fontName)),i(`/FontFile2 `+f+` 0 R`),i(`/FontBBox `+e.API.PDFObject.convert(n.metadata.bbox)),i(`/Flags `+n.metadata.flags),i(`/StemV `+n.metadata.stemV),i(`/ItalicAngle `+n.metadata.italicAngle),i(`/Ascent `+n.metadata.ascender),i(`/Descent `+n.metadata.decender),i(`/CapHeight `+n.metadata.capHeight),i(`>>`),i(`endobj`);var h=a();i(`<<`),i(`/Type /Font`),i(`/BaseFont /`+i9(n.fontName)),i(`/FontDescriptor `+m+` 0 R`),i(`/W `+e.API.PDFObject.convert(s)),i(`/CIDToGIDMap /Identity`),i(`/DW 1000`),i(`/Subtype /CIDFontType2`),i(`/CIDSystemInfo`),i(`<<`),i(`/Supplement 0`),i(`/Registry (Adobe)`),i(`/Ordering (`+n.encoding+`)`),i(`>>`),i(`>>`),i(`endobj`),n.objectNumber=a(),i(`<<`),i(`/Type /Font`),i(`/Subtype /Type0`),i(`/ToUnicode `+p+` 0 R`),i(`/BaseFont /`+i9(n.fontName)),i(`/Encoding /`+n.encoding),i(`/DescendantFonts [`+h+` 0 R]`),i(`>>`),i(`endobj`),n.isAlreadyPutted=!0}})(t)}]),t.events.push([`putFont`,function(t){(function(t){var n=t.font,i=t.out,a=t.newObject,o=t.putStream;if(n.metadata instanceof e.API.TTFFont&&n.encoding===`WinAnsiEncoding`){for(var s=n.metadata.rawData,l=``,u=0;u<s.length;u++)l+=String.fromCharCode(s[u]);var d=a();o({data:l,addLength1:!0,objectId:d}),i(`endobj`);var f=a();o({data:r(n.metadata.toUnicode),addLength1:!0,objectId:f}),i(`endobj`);var p=a();i(`<<`),i(`/Descent `+n.metadata.decender),i(`/CapHeight `+n.metadata.capHeight),i(`/StemV `+n.metadata.stemV),i(`/Type /FontDescriptor`),i(`/FontFile2 `+d+` 0 R`),i(`/Flags 96`),i(`/FontBBox `+e.API.PDFObject.convert(n.metadata.bbox)),i(`/FontName /`+i9(n.fontName)),i(`/ItalicAngle `+n.metadata.italicAngle),i(`/Ascent `+n.metadata.ascender),i(`>>`),i(`endobj`),n.objectNumber=a();for(var m=0;m<n.metadata.hmtx.widths.length;m++)n.metadata.hmtx.widths[m]=parseInt(n.metadata.hmtx.widths[m]*(1e3/n.metadata.head.unitsPerEm));i(`<</Subtype/TrueType/Type/Font/ToUnicode `+f+` 0 R/BaseFont/`+i9(n.fontName)+`/FontDescriptor `+p+` 0 R/Encoding/`+n.encoding+` /FirstChar 29 /LastChar 255 /Widths `+e.API.PDFObject.convert(n.metadata.hmtx.widths)+`>>`),i(`endobj`),n.isAlreadyPutted=!0}})(t)}]);var i=function(e){var t,r=e.text||``,i=e.x,a=e.y,o=e.options||{},s=e.mutex||{},l=s.pdfEscape,u=s.activeFontKey,d=s.fonts,f=u,p=``,m=0,h=``,g=d[f].encoding;if(d[f].encoding!==`Identity-H`)return{text:r,x:i,y:a,options:o,mutex:s};for(h=r,f=u,Array.isArray(r)&&(h=r[0]),m=0;m<h.length;m+=1)d[f].metadata.hasOwnProperty(`cmap`)&&(t=d[f].metadata.cmap.unicode.codeMap[h[m].charCodeAt(0)]),t||h[m].charCodeAt(0)<256&&d[f].metadata.hasOwnProperty(`Unicode`)?p+=h[m]:p+=``;var _=``;return parseInt(f.slice(1))<14||g===`WinAnsiEncoding`?_=l(p,f).split(``).map(function(e){return e.charCodeAt(0).toString(16)}).join(``):g===`Identity-H`&&(_=n(p,d[f])),s.isHex=!0,{text:_,x:i,y:a,options:o,mutex:s}};t.events.push([`postProcessText`,function(e){var t=e.text||``,n=[],r={text:t,x:e.x,y:e.y,options:e.options,mutex:e.mutex};if(Array.isArray(t)){var a=0;for(a=0;a<t.length;a+=1)Array.isArray(t[a])&&t[a].length===3?n.push([i(Object.assign({},r,{text:t[a][0]})).text,t[a][1],t[a][2]]):n.push(i(Object.assign({},r,{text:t[a]})).text);e.text=n}else e.text=i(Object.assign({},r,{text:t})).text}])}(c9),function(e){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(e){return t.call(this),this.internal.vFS[e]!==void 0},e.addFileToVFS=function(e,n){return t.call(this),this.internal.vFS[e]=n,this},e.getFileFromVFS=function(e){return t.call(this),this.internal.vFS[e]===void 0?null:this.internal.vFS[e]}}(c9.API),function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(e){var n,r,i,a,o,s,l,u=t,d=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],f=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],p={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},m={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},h=`(.).(.<.>.<.[.].[.{.}.{.«.».«.‹.›.‹.⁅.⁆.⁅.⁽.⁾.⁽.₍.₎.₍.≤.≥.≤.〈.〉.〈.﹙.﹚.﹙.﹛.﹜.﹛.﹝.﹞.﹝.﹤.﹥.﹤`.split(`.`),g=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),_=!1,v=0;this.__bidiEngine__={};var y=function(e){var t=e.charCodeAt(),n=t>>8,r=m[n];return r===void 0?n===252||n===253?`AL`:g.test(n)?`L`:n===8?`R`:`N`:u[256*r+(255&t)]},b=function(e){for(var t,n=0;n<e.length;n++){if((t=y(e.charAt(n)))===`L`)return!1;if(t===`R`)return!0}return!1},x=function(e,t,o,s){var l,u,d,f,p=t[s];switch(p){case`L`:case`R`:case`LRE`:case`RLE`:case`LRO`:case`RLO`:case`PDF`:_=!1;break;case`N`:case`AN`:break;case`EN`:_&&(p=`AN`);break;case`AL`:_=!0,p=`R`;break;case`WS`:case`BN`:p=`N`;break;case`CS`:s<1||s+1>=t.length||(l=o[s-1])!==`EN`&&l!==`AN`||(u=t[s+1])!==`EN`&&u!==`AN`?p=`N`:_&&(u=`AN`),p=u===l?u:`N`;break;case`ES`:p=(l=s>0?o[s-1]:`B`)===`EN`&&s+1<t.length&&t[s+1]===`EN`?`EN`:`N`;break;case`ET`:if(s>0&&o[s-1]===`EN`){p=`EN`;break}if(_){p=`N`;break}for(d=s+1,f=t.length;d<f&&t[d]===`ET`;)d++;p=d<f&&t[d]===`EN`?`EN`:`N`;break;case`NSM`:if(i&&!a){for(f=t.length,d=s+1;d<f&&t[d]===`NSM`;)d++;if(d<f){var m=e[s],h=m>=1425&&m<=2303||m===64286;if(l=t[d],h&&(l===`R`||l===`AL`)){p=`R`;break}}}p=s<1||(l=t[s-1])===`B`?`N`:o[s-1];break;case`B`:_=!1,n=!0,p=v;break;case`S`:r=!0,p=`N`}return p},S=function(e,t,n){var r=e.split(``);return n&&C(r,n,{hiLevel:v}),r.reverse(),t&&t.reverse(),r.join(``)},C=function(e,t,i){var a,o,s,l,u,m=-1,h=e.length,g=0,b=[],S=v?f:d,C=[];for(_=!1,n=!1,r=!1,o=0;o<h;o++)C[o]=y(e[o]);for(s=0;s<h;s++){if(u=g,b[s]=x(e,C,b,s),a=240&(g=S[u][p[b[s]]]),g&=15,t[s]=l=S[g][5],a>0){if(a===16){for(o=m;o<s;o++)t[o]=1;m=-1}else m=-1}if(S[g][6])m===-1&&(m=s);else if(m>-1){for(o=m;o<s;o++)t[o]=l;m=-1}C[s]===`B`&&(t[s]=0),i.hiLevel|=l}r&&function(e,t,n){for(var r=0;r<n;r++)if(e[r]===`S`){t[r]=v;for(var i=r-1;i>=0&&e[i]===`WS`;i--)t[i]=v}}(C,t,h)},w=function(e,t,r,i,a){if(!(a.hiLevel<e)){if(e===1&&v===1&&!n)return t.reverse(),void(r&&r.reverse());for(var o,s,l,u,d=t.length,f=0;f<d;){if(i[f]>=e){for(l=f+1;l<d&&i[l]>=e;)l++;for(u=f,s=l-1;u<s;u++,s--)o=t[u],t[u]=t[s],t[s]=o,r&&(o=r[u],r[u]=r[s],r[s]=o);f=l}f++}}},T=function(e,t,n){var r=e.split(``),i={hiLevel:v};return n||=[],C(r,n,i),function(e,t,n){if(n.hiLevel!==0&&l)for(var r,i=0;i<e.length;i++)t[i]===1&&(r=h.indexOf(e[i]))>=0&&(e[i]=h[r+1])}(r,n,i),w(2,r,t,n,i),w(1,r,t,n,i),r.join(``)};return this.__bidiEngine__.doBidiReorder=function(e,t,n){if(function(e,t){if(t)for(var n=0;n<e.length;n++)t[n]=n;a===void 0&&(a=b(e)),s===void 0&&(s=b(e))}(e,t),i||!o||s){if(i&&o&&a^s)v=+!!a,e=S(e,t,n);else if(!i&&o&&s)v=+!!a,e=T(e,t,n),e=S(e,t);else if(!i||a||o||s){if(i&&!o&&a^s)e=S(e,t),a?(v=0,e=T(e,t,n)):(v=1,e=T(e,t,n),e=S(e,t));else if(i&&a&&!o&&s)v=1,e=T(e,t,n),e=S(e,t);else if(!i&&!o&&a^s){var r=l;a?(v=1,e=T(e,t,n),v=0,l=!1,e=T(e,t,n),l=r):(v=0,e=T(e,t,n),e=S(e,t),v=1,l=!1,e=T(e,t,n),l=r,e=S(e,t))}}else v=0,e=T(e,t,n)}else v=+!!a,e=T(e,t,n);return e},this.__bidiEngine__.setOptions=function(e){e&&(i=e.isInputVisual,o=e.isOutputVisual,a=e.isInputRtl,s=e.isOutputRtl,l=e.isSymmetricSwapping)},this.__bidiEngine__.setOptions(e),this.__bidiEngine__};var t=`BN.BN.BN.BN.BN.BN.BN.BN.BN.S.B.S.WS.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.B.B.B.S.WS.N.N.ET.ET.ET.N.N.N.N.N.ES.CS.ES.CS.CS.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.CS.N.N.N.N.N.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.N.N.N.N.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.N.N.N.BN.BN.BN.BN.BN.BN.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.CS.N.ET.ET.ET.ET.N.N.N.N.L.N.N.BN.N.N.ET.ET.EN.EN.N.L.N.N.N.EN.L.N.N.N.N.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.N.L.L.L.L.L.L.L.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.L.N.N.N.N.N.ET.N.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.R.NSM.R.NSM.NSM.R.NSM.NSM.R.NSM.N.N.N.N.N.N.N.N.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.N.N.N.N.N.R.R.R.R.R.N.N.N.N.N.N.N.N.N.N.N.AN.AN.AN.AN.AN.AN.N.N.AL.ET.ET.AL.CS.AL.N.N.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.AL.AL.N.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.AN.AN.AN.AN.AN.AN.AN.AN.AN.AN.ET.AN.AN.AL.AL.AL.NSM.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.NSM.NSM.NSM.NSM.NSM.NSM.NSM.AN.N.NSM.NSM.NSM.NSM.NSM.NSM.AL.AL.NSM.NSM.N.NSM.NSM.NSM.NSM.AL.AL.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.N.AL.AL.NSM.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.N.N.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.AL.N.N.N.N.N.N.N.N.N.N.N.N.N.N.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.R.R.N.N.N.N.R.N.N.N.N.N.WS.WS.WS.WS.WS.WS.WS.WS.WS.WS.WS.BN.BN.BN.L.R.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.WS.B.LRE.RLE.PDF.LRO.RLO.CS.ET.ET.ET.ET.ET.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.CS.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.WS.BN.BN.BN.BN.BN.N.LRI.RLI.FSI.PDI.BN.BN.BN.BN.BN.BN.EN.L.N.N.EN.EN.EN.EN.EN.EN.ES.ES.N.N.N.L.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.ES.ES.N.N.N.N.L.L.L.L.L.L.L.L.L.L.L.L.L.N.N.N.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.L.L.L.L.L.L.L.N.N.N.N.N.N.N.N.N.N.N.N.L.L.L.L.L.N.N.N.N.N.R.NSM.R.R.R.R.R.R.R.R.R.R.ES.R.R.R.R.R.R.R.R.R.R.R.R.R.N.R.R.R.R.R.N.R.N.R.R.N.R.R.N.R.R.R.R.R.R.R.R.R.R.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.CS.N.CS.N.N.CS.N.N.N.N.N.N.N.N.N.ET.N.N.ES.ES.N.N.N.N.N.ET.ET.N.N.N.N.N.AL.AL.AL.AL.AL.N.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.N.N.BN.N.N.N.ET.ET.ET.N.N.N.N.N.ES.CS.ES.CS.CS.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.CS.N.N.N.N.N.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.N.N.N.N.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.N.N.N.N.N.N.N.N.N.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.N.N.L.L.L.L.L.L.N.N.L.L.L.L.L.L.N.N.L.L.L.L.L.L.N.N.L.L.L.N.N.N.ET.ET.N.N.N.ET.ET.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N`.split(`.`),n=new e.__bidiEngine__({isInputVisual:!0});e.API.events.push([`postProcessText`,function(e){var t=e.text;e.x,e.y;var r=e.options||{};e.mutex,r.lang;var i=[];if(r.isInputVisual=typeof r.isInputVisual!=`boolean`||r.isInputVisual,n.setOptions(r),Object.prototype.toString.call(t)===`[object Array]`){var a=0;for(i=[],a=0;a<t.length;a+=1)Object.prototype.toString.call(t[a])===`[object Array]`?i.push([n.doBidiReorder(t[a][0]),t[a][1],t[a][2]]):i.push([n.doBidiReorder(t[a])]);e.text=i}else e.text=n.doBidiReorder(t);n.setOptions({isInputVisual:!0})}])}(c9),c9.API.TTFFont=function(){function e(e){var t;if(this.rawData=e,t=this.contents=new z9(e),this.contents.pos=4,t.readString(4)===`ttcf`)throw Error(`TTCF not supported.`);t.pos=0,this.parse(),this.subset=new p4t(this),this.registerTTF()}return e.open=function(t){return new e(t)},e.prototype.parse=function(){return this.directory=new X2t(this.contents),this.head=new Q2t(this),this.name=new a4t(this),this.cmap=new e4t(this),this.toUnicode={},this.hhea=new t4t(this),this.maxp=new o4t(this),this.hmtx=new s4t(this),this.post=new r4t(this),this.os2=new n4t(this),this.loca=new f4t(this),this.glyf=new l4t(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},e.prototype.registerTTF=function(){var e,t,n,r,i;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var t,n,r,i=[];for(t=0,n=(r=this.bbox).length;t<n;t++)e=r[t],i.push(Math.round(e*this.scaleFactor));return i}.call(this),this.stemV=0,this.post.exists?(n=255&(r=this.post.italic_angle),32768&(t=r>>16)&&(t=-(1+(65535^t))),this.italicAngle=+(t+`.`+n)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(i=this.familyClass)===1||i===2||i===3||i===4||i===5||i===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw Error(`No unicode cmap for font`)},e.prototype.characterToGlyph=function(e){return this.cmap.unicode?.codeMap[e]||0},e.prototype.widthOfGlyph=function(e){var t=1e3/this.head.unitsPerEm;return this.hmtx.forGlyph(e).advance*t},e.prototype.widthOfString=function(e,t,n){var r,i,a=0,o;for(i=0,o=(e=``+e).length;0<=o?i<o:i>o;i=0<=o?++i:--i)r=e.charCodeAt(i),a+=this.widthOfGlyph(this.characterToGlyph(r))+1e3/t*n||0;return t/1e3*a},e.prototype.lineHeight=function(e,t){var n;return t??=!1,n=t?this.lineGap:0,(this.ascender+n-this.decender)/1e3*e},e}();var R9,z9=function(){function e(e){this.data=e??[],this.pos=0,this.length=this.data.length}return e.prototype.readByte=function(){return this.data[this.pos++]},e.prototype.writeByte=function(e){return this.data[this.pos++]=e},e.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},e.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},e.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},e.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},e.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},e.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},e.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},e.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},e.prototype.readString=function(e){var t,n=[];for(t=0;0<=e?t<e:t>e;t=0<=e?++t:--t)n[t]=String.fromCharCode(this.readByte());return n.join(``)},e.prototype.writeString=function(e){var t,n,r=[];for(t=0,n=e.length;0<=n?t<n:t>n;t=0<=n?++t:--t)r.push(this.writeByte(e.charCodeAt(t)));return r},e.prototype.readShort=function(){return this.readInt16()},e.prototype.writeShort=function(e){return this.writeInt16(e)},e.prototype.readLongLong=function(){var e=this.readByte(),t=this.readByte(),n=this.readByte(),r=this.readByte(),i=this.readByte(),a=this.readByte(),o=this.readByte(),s=this.readByte();return 128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^t)+1099511627776*(255^n)+4294967296*(255^r)+16777216*(255^i)+65536*(255^a)+256*(255^o)+(255^s)+1):72057594037927940*e+281474976710656*t+1099511627776*n+4294967296*r+16777216*i+65536*a+256*o+s},e.prototype.writeLongLong=function(e){var t=Math.floor(e/4294967296),n=4294967295&e;return this.writeByte(t>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},e.prototype.readInt=function(){return this.readInt32()},e.prototype.writeInt=function(e){return this.writeInt32(e)},e.prototype.read=function(e){for(var t=[],n=0;0<=e?n<e:n>e;n=0<=e?++n:--n)t.push(this.readByte());return t},e.prototype.write=function(e){var t,n,r,i=[];for(n=0,r=e.length;n<r;n++)t=e[n],i.push(this.writeByte(t));return i},e}(),X2t=function(){var e;function t(e){var t,n,r;for(this.scalarType=e.readInt(),this.tableCount=e.readShort(),this.searchRange=e.readShort(),this.entrySelector=e.readShort(),this.rangeShift=e.readShort(),this.tables={},n=0,r=this.tableCount;0<=r?n<r:n>r;n=0<=r?++n:--n)t={tag:e.readString(4),checksum:e.readInt(),offset:e.readInt(),length:e.readInt()},this.tables[t.tag]=t}return t.prototype.encode=function(t){var n,r,i,a,o,s,l,u,d,f,p=Object.keys(t).length,m,h;for(h in s=Math.log(2),d=16*Math.floor(Math.log(p)/s),a=Math.floor(d/s),u=16*p-d,(r=new z9).writeInt(this.scalarType),r.writeShort(p),r.writeShort(d),r.writeShort(a),r.writeShort(u),i=16*p,l=r.pos+i,o=null,m=[],t)for(f=t[h],r.writeString(h),r.writeInt(e(f)),r.writeInt(l),r.writeInt(f.length),m=m.concat(f),h===`head`&&(o=l),l+=f.length;l%4;)m.push(0),l++;return r.write(m),n=2981146554-e(r.data),r.pos=o+8,r.writeUInt32(n),r.data},e=function(e){var t,n,r,i;for(e=c4t.call(e);e.length%4;)e.push(0);for(r=new z9(e),n=0,t=0,i=e.length;t<i;t=t+=4)n+=r.readUInt32();return 4294967295&n},t}(),Z2t={}.hasOwnProperty,B9=function(e,t){for(var n in t)Z2t.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e};R9=function(){function e(e){var t;this.file=e,t=this.file.directory.tables[this.tag],this.exists=!!t,t&&(this.offset=t.offset,this.length=t.length,this.parse(this.file.contents))}return e.prototype.parse=function(){},e.prototype.encode=function(){},e.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},e}();var Q2t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return B9(e,R9),e.prototype.tag=`head`,e.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.revision=e.readInt(),this.checkSumAdjustment=e.readInt(),this.magicNumber=e.readInt(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.readLongLong(),this.modified=e.readLongLong(),this.xMin=e.readShort(),this.yMin=e.readShort(),this.xMax=e.readShort(),this.yMax=e.readShort(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort(),this.indexToLocFormat=e.readShort(),this.glyphDataFormat=e.readShort()},e.prototype.encode=function(e){var t;return(t=new z9).writeInt(this.version),t.writeInt(this.revision),t.writeInt(this.checkSumAdjustment),t.writeInt(this.magicNumber),t.writeShort(this.flags),t.writeShort(this.unitsPerEm),t.writeLongLong(this.created),t.writeLongLong(this.modified),t.writeShort(this.xMin),t.writeShort(this.yMin),t.writeShort(this.xMax),t.writeShort(this.yMax),t.writeShort(this.macStyle),t.writeShort(this.lowestRecPPEM),t.writeShort(this.fontDirectionHint),t.writeShort(e),t.writeShort(this.glyphDataFormat),t.data},e}(),$2t=function(){function e(e,t){var n,r,i,a,o,s,l,u,d,f,p,m,h,g,_,v,y;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=t+e.readInt(),d=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(s=0;s<256;++s)this.codeMap[s]=e.readByte();break;case 4:for(p=e.readUInt16(),f=p/2,e.pos+=6,i=function(){var t,n=[];for(s=t=0;0<=f?t<f:t>f;s=0<=f?++t:--t)n.push(e.readUInt16());return n}(),e.pos+=2,h=function(){var t,n=[];for(s=t=0;0<=f?t<f:t>f;s=0<=f?++t:--t)n.push(e.readUInt16());return n}(),l=function(){var t,n=[];for(s=t=0;0<=f?t<f:t>f;s=0<=f?++t:--t)n.push(e.readUInt16());return n}(),u=function(){var t,n=[];for(s=t=0;0<=f?t<f:t>f;s=0<=f?++t:--t)n.push(e.readUInt16());return n}(),r=(this.length-e.pos+this.offset)/2,o=function(){var t,n=[];for(s=t=0;0<=r?t<r:t>r;s=0<=r?++t:--t)n.push(e.readUInt16());return n}(),s=_=0,y=i.length;_<y;s=++_)for(g=i[s],n=v=m=h[s];m<=g?v<=g:v>=g;n=m<=g?++v:--v)u[s]===0?a=n+l[s]:(a=o[u[s]/2+(n-m)-(f-s)]||0)!==0&&(a+=l[s]),this.codeMap[n]=65535&a}e.pos=d}return e.encode=function(e,t){var n,r,i,a,o,s,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A=new z9,j,M,N,P,F,I,L,R,ee,z,B,V,te,ne,re,ie,ae,oe;switch(a=Object.keys(e).sort(function(e,t){return e-t}),t){case`macroman`:for(h=0,g=function(){var e=[];for(m=0;m<256;++m)e.push(0);return e}(),v={0:0},i={},j=0,F=a.length;j<F;j++)v[re=e[r=a[j]]]??(v[re]=++h),i[r]={old:e[r],new:v[e[r]]},g[r]=v[e[r]];return A.writeUInt16(1),A.writeUInt16(0),A.writeUInt32(12),A.writeUInt16(0),A.writeUInt16(262),A.writeUInt16(0),A.write(g),{charMap:i,subtable:A.data,maxGlyphID:h+1};case`unicode`:for(O=[],d=[],y=0,v={},n={},_=l=null,M=0,I=a.length;M<I;M++)v[x=e[r=a[M]]]??(v[x]=++y),n[r]={old:x,new:v[x]},o=v[x]-r,_!=null&&o===l||(_&&d.push(_),O.push(r),l=o),_=r;for(_&&d.push(_),d.push(65535),O.push(65535),E=2*(T=O.length),w=2*(Math.log(T)/Math.LN2)**2,f=Math.log(w/2)/Math.LN2,C=2*T-w,s=[],S=[],p=[],m=N=0,L=O.length;N<L;m=++N){if(D=O[m],u=d[m],D===65535){s.push(0),S.push(0);break}if(D-(k=n[D].new)>=32768)for(s.push(0),S.push(2*(p.length+T-m)),r=P=D;D<=u?P<=u:P>=u;r=D<=u?++P:--P)p.push(n[r].new);else s.push(k-D),S.push(0)}for(A.writeUInt16(3),A.writeUInt16(1),A.writeUInt32(12),A.writeUInt16(4),A.writeUInt16(16+8*T+2*p.length),A.writeUInt16(0),A.writeUInt16(E),A.writeUInt16(w),A.writeUInt16(f),A.writeUInt16(C),te=0,R=d.length;te<R;te++)r=d[te],A.writeUInt16(r);for(A.writeUInt16(0),ne=0,ee=O.length;ne<ee;ne++)r=O[ne],A.writeUInt16(r);for(ie=0,z=s.length;ie<z;ie++)o=s[ie],A.writeUInt16(o);for(ae=0,B=S.length;ae<B;ae++)b=S[ae],A.writeUInt16(b);for(oe=0,V=p.length;oe<V;oe++)h=p[oe],A.writeUInt16(h);return{charMap:n,subtable:A.data,maxGlyphID:y+1}}},e}(),e4t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return B9(e,R9),e.prototype.tag=`cmap`,e.prototype.parse=function(e){var t,n,r;for(e.pos=this.offset,this.version=e.readUInt16(),r=e.readUInt16(),this.tables=[],this.unicode=null,n=0;0<=r?n<r:n>r;n=0<=r?++n:--n)t=new $2t(e,this.offset),this.tables.push(t),t.isUnicode&&this.unicode==null&&(this.unicode=t);return!0},e.encode=function(e,t){var n,r;return t??=`macroman`,n=$2t.encode(e,t),(r=new z9).writeUInt16(0),r.writeUInt16(1),n.table=r.data.concat(n.subtable),n},e}(),t4t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return B9(e,R9),e.prototype.tag=`hhea`,e.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.ascender=e.readShort(),this.decender=e.readShort(),this.lineGap=e.readShort(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort(),this.minRightSideBearing=e.readShort(),this.xMaxExtent=e.readShort(),this.caretSlopeRise=e.readShort(),this.caretSlopeRun=e.readShort(),this.caretOffset=e.readShort(),e.pos+=8,this.metricDataFormat=e.readShort(),this.numberOfMetrics=e.readUInt16()},e}(),n4t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return B9(e,R9),e.prototype.tag=`OS/2`,e.prototype.parse=function(e){if(e.pos=this.offset,this.version=e.readUInt16(),this.averageCharWidth=e.readShort(),this.weightClass=e.readUInt16(),this.widthClass=e.readUInt16(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort(),this.ySubscriptYSize=e.readShort(),this.ySubscriptXOffset=e.readShort(),this.ySubscriptYOffset=e.readShort(),this.ySuperscriptXSize=e.readShort(),this.ySuperscriptYSize=e.readShort(),this.ySuperscriptXOffset=e.readShort(),this.ySuperscriptYOffset=e.readShort(),this.yStrikeoutSize=e.readShort(),this.yStrikeoutPosition=e.readShort(),this.familyClass=e.readShort(),this.panose=function(){var t,n=[];for(t=0;t<10;++t)n.push(e.readByte());return n}(),this.charRange=function(){var t,n=[];for(t=0;t<4;++t)n.push(e.readInt());return n}(),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort(),this.descent=e.readShort(),this.lineGap=e.readShort(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=function(){var t,n=[];for(t=0;t<2;t=++t)n.push(e.readInt());return n}(),this.version>1))return this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()},e}(),r4t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return B9(e,R9),e.prototype.tag=`post`,e.prototype.parse=function(e){var t,n,r;switch(e.pos=this.offset,this.format=e.readInt(),this.italicAngle=e.readInt(),this.underlinePosition=e.readShort(),this.underlineThickness=e.readShort(),this.isFixedPitch=e.readInt(),this.minMemType42=e.readInt(),this.maxMemType42=e.readInt(),this.minMemType1=e.readInt(),this.maxMemType1=e.readInt(),this.format){case 65536:case 196608:break;case 131072:var i;for(n=e.readUInt16(),this.glyphNameIndex=[],i=0;0<=n?i<n:i>n;i=0<=n?++i:--i)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],r=[];e.pos<this.offset+this.length;)t=e.readByte(),r.push(this.names.push(e.readString(t)));return r;case 151552:return n=e.readUInt16(),this.offsets=e.read(n);case 262144:return this.map=function(){var t,n,r=[];for(i=t=0,n=this.file.maxp.numGlyphs;0<=n?t<n:t>n;i=0<=n?++t:--t)r.push(e.readUInt32());return r}.call(this)}},e}(),i4t=function(e,t){this.raw=e,this.length=e.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},a4t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return B9(e,R9),e.prototype.tag=`name`,e.prototype.parse=function(e){var t,n,r,i,a,o,s,l,u,d,f;for(e.pos=this.offset,e.readShort(),t=e.readShort(),o=e.readShort(),n=[],i=0;0<=t?i<t:i>t;i=0<=t?++i:--i)n.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+o+e.readShort()});for(s={},i=u=0,d=n.length;u<d;i=++u)r=n[i],e.pos=r.offset,l=e.readString(r.length),a=new i4t(l,r),s[f=r.nameID]??(s[f]=[]),s[r.nameID].push(a);this.strings=s,this.copyright=s[0],this.fontFamily=s[1],this.fontSubfamily=s[2],this.uniqueSubfamily=s[3],this.fontName=s[4],this.version=s[5];try{this.postscriptName=s[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,``)}catch{this.postscriptName=s[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,``)}return this.trademark=s[7],this.manufacturer=s[8],this.designer=s[9],this.description=s[10],this.vendorUrl=s[11],this.designerUrl=s[12],this.license=s[13],this.licenseUrl=s[14],this.preferredFamily=s[15],this.preferredSubfamily=s[17],this.compatibleFull=s[18],this.sampleText=s[19]},e}(),o4t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return B9(e,R9),e.prototype.tag=`maxp`,e.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.numGlyphs=e.readUInt16(),this.maxPoints=e.readUInt16(),this.maxContours=e.readUInt16(),this.maxCompositePoints=e.readUInt16(),this.maxComponentContours=e.readUInt16(),this.maxZones=e.readUInt16(),this.maxTwilightPoints=e.readUInt16(),this.maxStorage=e.readUInt16(),this.maxFunctionDefs=e.readUInt16(),this.maxInstructionDefs=e.readUInt16(),this.maxStackElements=e.readUInt16(),this.maxSizeOfInstructions=e.readUInt16(),this.maxComponentElements=e.readUInt16(),this.maxComponentDepth=e.readUInt16()},e}(),s4t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return B9(e,R9),e.prototype.tag=`hmtx`,e.prototype.parse=function(e){var t,n,r,i,a,o,s;for(e.pos=this.offset,this.metrics=[],t=0,o=this.file.hhea.numberOfMetrics;0<=o?t<o:t>o;t=0<=o?++t:--t)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(r=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var n,i=[];for(t=n=0;0<=r?n<r:n>r;t=0<=r?++n:--n)i.push(e.readInt16());return i}(),this.widths=function(){var e,t,n,r=[];for(e=0,t=(n=this.metrics).length;e<t;e++)i=n[e],r.push(i.advance);return r}.call(this),n=this.widths[this.widths.length-1],s=[],t=a=0;0<=r?a<r:a>r;t=0<=r?++a:--a)s.push(this.widths.push(n));return s},e.prototype.forGlyph=function(e){return e in this.metrics?this.metrics[e]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[e-this.metrics.length]}},e}(),c4t=[].slice,l4t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return B9(e,R9),e.prototype.tag=`glyf`,e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(e){var t,n,r,i,a,o,s,l,u,d;return e in this.cache?this.cache[e]:(i=this.file.loca,t=this.file.contents,n=i.indexOf(e),(r=i.lengthOf(e))===0?this.cache[e]=null:(t.pos=this.offset+n,a=(o=new z9(t.read(r))).readShort(),l=o.readShort(),d=o.readShort(),s=o.readShort(),u=o.readShort(),this.cache[e]=a===-1?new d4t(o,l,d,s,u):new u4t(o,a,l,d,s,u),this.cache[e]))},e.prototype.encode=function(e,t,n){var r,i,a=[],o,s;for(i=[],o=0,s=t.length;o<s;o++)r=e[t[o]],i.push(a.length),r&&(a=a.concat(r.encode(n)));return i.push(a.length),{table:a,offsets:i}},e}(),u4t=function(){function e(e,t,n,r,i,a){this.raw=e,this.numberOfContours=t,this.xMin=n,this.yMin=r,this.xMax=i,this.yMax=a,this.compound=!1}return e.prototype.encode=function(){return this.raw.data},e}(),d4t=function(){function e(e,t,n,r,i){var a,o;for(this.raw=e,this.xMin=t,this.yMin=n,this.xMax=r,this.yMax=i,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],a=this.raw;o=a.readShort(),this.glyphOffsets.push(a.pos),this.glyphIDs.push(a.readUInt16()),32&o;)a.pos+=1&o?4:2,128&o?a.pos+=8:64&o?a.pos+=4:8&o&&(a.pos+=2)}return e.prototype.encode=function(){var e,t=new z9(c4t.call(this.raw.data)),n;for(e=0,n=this.glyphIDs.length;e<n;++e)t.pos=this.glyphOffsets[e];return t.data},e}(),f4t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return B9(e,R9),e.prototype.tag=`loca`,e.prototype.parse=function(e){var t,n;return e.pos=this.offset,t=this.file.head.indexToLocFormat,this.offsets=t===0?function(){var t,r=[];for(n=0,t=this.length;n<t;n+=2)r.push(2*e.readUInt16());return r}.call(this):function(){var t,r=[];for(n=0,t=this.length;n<t;n+=4)r.push(e.readUInt32());return r}.call(this)},e.prototype.indexOf=function(e){return this.offsets[e]},e.prototype.lengthOf=function(e){return this.offsets[e+1]-this.offsets[e]},e.prototype.encode=function(e,t){for(var n=new Uint32Array(this.offsets.length),r=0,i=0,a=0;a<n.length;++a)if(n[a]=r,i<t.length&&t[i]==a){++i,n[a]=r;var o=this.offsets[a],s=this.offsets[a+1]-o;s>0&&(r+=s)}for(var l=Array(4*n.length),u=0;u<n.length;++u)l[4*u+3]=255&n[u],l[4*u+2]=(65280&n[u])>>8,l[4*u+1]=(16711680&n[u])>>16,l[4*u]=(4278190080&n[u])>>24;return l},e}(),p4t=function(){function e(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return e.prototype.generateCmap=function(){var e,t,n,r=this.font.cmap.tables[0].codeMap,i;for(t in e={},i=this.subset)n=i[t],e[t]=r[n];return e},e.prototype.glyphsFor=function(e){for(var t,n,r={},i,a=0,o=e.length,s;a<o;a++)r[i=e[a]]=this.font.glyf.glyphFor(i);for(i in t=[],r)(n=r[i])!=null&&n.compound&&t.push.apply(t,n.glyphIDs);if(t.length>0)for(i in s=this.glyphsFor(t))n=s[i],r[i]=n;return r},e.prototype.encode=function(e,t){var n=e4t.encode(this.generateCmap(),`unicode`),r,i,a=this.glyphsFor(e),o,s,l,u,d,f,p={0:0},m,h,g,_;for(r in _=n.charMap)p[(s=_[r]).old]=s.new;for(m in f=n.maxGlyphID,a)m in p||(p[m]=f++);return u=function(e){var t,n={};for(t in e)n[e[t]]=t;return n}(p),d=Object.keys(u).sort(function(e,t){return e-t}),h=function(){var e,t,n=[];for(e=0,t=d.length;e<t;e++)o=d[e],n.push(u[o]);return n}(),i=this.font.glyf.encode(a,h,p),l=this.font.loca.encode(i.offsets,h),g={cmap:this.font.cmap.raw(),glyf:i.table,loca:l,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(t)},this.font.os2.exists&&(g[`OS/2`]=this.font.os2.raw()),this.font.directory.encode(g)},e}();c9.API.PDFObject=function(){var e;function t(){}return e=function(e,t){return(Array(t+1).join(`0`)+e).slice(-t)},t.convert=function(n){var r,i,a,o;if(Array.isArray(n))return`[`+function(){var e,i,a=[];for(e=0,i=n.length;e<i;e++)r=n[e],a.push(t.convert(r));return a}().join(` `)+`]`;if(typeof n==`string`)return`/`+n;if(n?.isString)return`(`+n+`)`;if(n instanceof Date)return`(D:`+e(n.getUTCFullYear(),4)+e(n.getUTCMonth(),2)+e(n.getUTCDate(),2)+e(n.getUTCHours(),2)+e(n.getUTCMinutes(),2)+e(n.getUTCSeconds(),2)+`Z)`;if({}.toString.call(n)===`[object Object]`){for(i in a=[`<<`],n)o=n[i],a.push(`/`+i+` `+t.convert(o));return a.push(`>>`),a.join(`
|
|
4234
4234
|
`)}return``+n},t}();var m4t=[[`✅`,`[Yes]`],[`⛔`,`[No]`],[`⚠️`,`[Warning]`],[`⚠`,`[Warning]`],[`🔑`,`[Key]`],[`🔒`,`[Locked]`],[`🔍`,`[Audited]`],[`🔎`,`[Advanced Find]`],[`✳️`,`[Custom]`],[`🔀`,`[Sync]`],[`☁️`,`[Cloud]`],[`→`,`->`],[`–`,`-`],[`—`,`-`],[`•`,`-`]];function V9(e){let t=e;for(let[e,n]of m4t)t=t.split(e).join(n);return t.replace(/[^\t\n\r\x20-\x7E\u00A0-\u00FF]/gu,``)}function h4t(e){let t=``,n=-1,r=``;for(let i=0;i<e.length;i+=1){let a=e[i];if(n<0){a===`<`?n=i:t+=a;continue}r?a===r&&(r=``):a===`"`||a===`'`?r=a:a===`>`&&(n=-1)}return n<0?t:t+e.slice(n)}function g4t(e){return!!e&&/^(https?:|mailto:)/i.test(e)}function H9(e,t={}){if(!e)return[];let n=[];for(let r of e)switch(r.type){case`text`:n.push({text:V9(r.value),style:t});break;case`strong`:n.push(...H9(r.children,{...t,bold:!0}));break;case`emphasis`:n.push(...H9(r.children,{...t,italic:!0}));break;case`delete`:n.push(...H9(r.children,t));break;case`inlineCode`:n.push({text:V9(r.value),style:{...t,code:!0}});break;case`link`:n.push(...H9(r.children,{...t,link:r.url}));break;case`image`:n.push({text:V9(`[Image: ${r.alt||`image`}]`),style:{...t,italic:!0}});break;case`break`:n.push({text:``,style:t,break:!0});break;case`html`:n.push({text:V9(h4t(r.value??``)),style:t});break;default:{let e=r;Array.isArray(e.children)?n.push(...H9(e.children,t)):typeof e.value==`string`&&n.push({text:V9(e.value),style:t});break}}return n}function U9(e){let t=[];for(let n of e){if(n.break){t.push({text:``,style:n.style,isSpace:!1,hardBreak:!0});continue}if(!n.text)continue;let e=n.text.split(/(\s+)/).filter(e=>e.length>0);for(let r of e)t.push({text:r,style:n.style,isSpace:/^\s+$/.test(r)})}return t}function W9(e,t){if(t.code){e.setFont(`courier`,t.bold?`bold`:`normal`);return}let n=t.bold&&t.italic?`bolditalic`:t.bold?`bold`:t.italic?`italic`:`normal`;e.setFont(`helvetica`,n)}function G9(e,t,n,r){let i=[],a=[],o=0,s=()=>{for(;a.length&&a[0].isSpace;)a.shift();for(;a.length&&a[a.length-1].isSpace;)a.pop();i.push(a),a=[],o=0};for(let i of t){if(i.hardBreak){s();continue}W9(e,i.style),e.setFontSize(r);let t=e.getTextWidth(i.text);i.isSpace&&a.length===0||o+t>n&&a.length>0&&(s(),i.isSpace)||(a.push(i),o+=t)}return a.length&&s(),i.length===0&&i.push([]),i}function K9(e,t){e.y+t>e.pageHeight-e.marginBottom&&(e.pdf.addPage(),e.y=e.marginTop)}function _4t(){return new Promise(e=>{typeof requestAnimationFrame==`function`?requestAnimationFrame(()=>e()):setTimeout(e,0)})}function v4t(e,t,n,r,i,a){let o=G9(e.pdf,t,r,i);for(let t of o){K9(e,a);let r=n;for(let n of t){W9(e.pdf,n.style),e.pdf.setFontSize(i);let t=e.pdf.getTextWidth(n.text);n.style.code&&(e.pdf.setFillColor(244,244,248),e.pdf.rect(r-1,e.y-i*.78,t+2,i*1.05,`F`),W9(e.pdf,n.style),e.pdf.setFontSize(i)),n.style.link?(e.pdf.setTextColor(37,99,235),g4t(n.style.link)?e.pdf.textWithLink(n.text,r,e.y,{url:n.style.link}):e.pdf.text(n.text,r,e.y),e.pdf.setDrawColor(37,99,235),e.pdf.line(r,e.y+1.5,r+t,e.y+1.5)):(e.pdf.setTextColor(26,26,46),e.pdf.text(n.text,r,e.y)),r+=t}e.y+=a}}function y4t(e,t){let n=[19,15.5,13.5,12,11,10.5],r=Math.min(Math.max(t.depth,1),6),i=n[r-1];e.y+=r===1?16:12,v4t(e,U9(H9(t.children,{bold:!0})),e.x0,e.xw,i,i*1.3),r<=2&&(e.pdf.setDrawColor(200,203,214),e.pdf.line(e.x0,e.y-2,e.x0+e.xw,e.y-2),e.y+=4),e.y+=6}function b4t(e,t,n){let r=n?.x??e.x0,i=n?.width??e.xw,a=n?.fontSize??10.25;v4t(e,U9(H9(t.children,n?.italic?{italic:!0}:{})),r,i,a,a*1.42),e.y+=a*.6}function x4t(e){K9(e,20),e.y+=8,e.pdf.setDrawColor(200,203,214),e.pdf.line(e.x0,e.y,e.x0+e.xw,e.y),e.y+=14}async function S4t(e,t,n=0){let r=t.start??1,i=0;for(let a of t.children){let o=e.x0+16+n*16,s=t.ordered?`${r}.`:`-`;r+=1,a.checked===!0?s=`[x]`:a.checked===!1&&(s=`[ ]`);let l=!0;for(let t of a.children){if(t.type===`list`){await S4t(e,t,n+1);continue}let r=e.xw-(o-e.x0);if(t.type===`paragraph`){let n=U9(H9(t.children));if(l){let t=G9(e.pdf,n,r,10.25);for(let n of t){K9(e,14.555),e.pdf.setFont(`helvetica`,`normal`),e.pdf.setFontSize(10.25),e.pdf.setTextColor(26,26,46),n===t[0]&&e.pdf.text(s,o-14,e.y);let r=o;for(let t of n)W9(e.pdf,t.style),e.pdf.setFontSize(10.25),e.pdf.setTextColor(26,26,46),e.pdf.text(t.text,r,e.y),r+=e.pdf.getTextWidth(t.text);e.y+=14.555}}else v4t(e,n,o,r,10.25,14.555);l=!1}else await O4t(e,t,{x:o,width:r})}e.y+=3,i+=1,i%25==0&&await _4t()}}async function C4t(e,t){let n=e.y,r=e.x0+14,i=e.xw-14;for(let n of t.children)await O4t(e,n,{x:r,width:i,italic:!0});e.pdf.setDrawColor(180,184,196),e.pdf.setLineWidth(2),e.pdf.line(e.x0+4,n-2,e.x0+4,Math.max(e.y-4,n-2)),e.pdf.setLineWidth(.2)}function w4t(e,t){if(t.lang===`mermaid`){T4t(e,t.value??``);return}let n=8.5,r=n*1.35,i=e.xw-12,a=V9(t.value??``);e.pdf.setFont(`courier`,`normal`),e.pdf.setFontSize(n);let o=[];for(let t of a.split(`
|
|
4235
|
-
`)){if(t===``){o.push(``);continue}let n=t;for(;e.pdf.getTextWidth(n)>i;){let t=n.length;for(;t>1&&e.pdf.getTextWidth(n.slice(0,t))>i;)--t;let r=n.lastIndexOf(` `,t),a=r>10?r:t;o.push(n.slice(0,a)),n=n.slice(a).replace(/^ /,``)}o.push(n)}let s=0;for(;s<o.length;){K9(e,23.475);let t=Math.max(1,Math.floor((e.pageHeight-e.marginBottom-e.y-12)/r)),i=o.slice(s,s+t),a=i.length*r+12;e.pdf.setFillColor(244,244,248),e.pdf.setDrawColor(208,211,219),e.pdf.rect(e.x0,e.y,e.xw,a,`FD`),e.pdf.setFont(`courier`,`normal`),e.pdf.setFontSize(n),e.pdf.setTextColor(26,26,46);let l=e.y+6+n*.8;for(let t of i)e.pdf.text(t||` `,e.x0+6,l),l+=r;e.y+=a+2,s+=i.length}e.y+=6}function T4t(e,t){let n=t.match(/%%\s*(.+?)\s*%%/)?.[1]??`Diagram`,r=e.diagramImages[e.diagramIndex]??null;if(e.diagramIndex+=1,K9(e,20),e.pdf.setFont(`helvetica`,`italic`),e.pdf.setFontSize(9.5),e.pdf.setTextColor(90,94,108),e.pdf.text(V9(`Diagram: ${n}`),e.x0,e.y),e.y+=14,!r){w4t(e,{lang:`text`,value:`[Diagram could not be rendered for export]\n\n${t}`});return}try{let t=e.pdf.getImageProperties(r),n=e.xw,i=t.height/t.width*n,a=e.pageHeight-e.marginTop-e.marginBottom;i>a&&(i=a,n=t.width/t.height*i),K9(e,i);let o=e.x0+(e.xw-n)/2;e.pdf.addImage(r,`PNG`,o,e.y,n,i,void 0,`FAST`),e.y+=i+10}catch{w4t(e,{lang:`text`,value:t})}}function q9(e,t,n,r,i,a,o,s,l){l&&(e.pdf.setFillColor(240,242,245),e.pdf.rect(e.x0,e.y,e.xw,i,`F`));let u=e.x0;for(let l=0;l<n;l+=1){e.pdf.setDrawColor(193,196,206),e.pdf.rect(u,e.y,r,i,`S`);let n=e.y+s+a*.72;for(let r of t[l]??[]){let t=u+s;for(let i of r)W9(e.pdf,i.style),e.pdf.setFontSize(a),e.pdf.setTextColor(26,26,46),e.pdf.text(i.text,t,n),t+=e.pdf.getTextWidth(i.text);n+=o}u+=r}e.y+=i}async function E4t(e,t){let n=t.children;if(!n.length)return;let r=n[0].children.length;if(r===0)return;let i=9.5,a=i*1.3,o=e.xw/r,s=(t,n)=>t.map(t=>{let r=U9(H9(t.children,n?{bold:!0}:{}));return G9(e.pdf,r,o-10,i)}),l=s(n[0].children,!0),u=Math.max(...l.map(e=>e.length),1)*a+10;K9(e,u+a+10),q9(e,l,r,o,u,i,a,5,!0);for(let t=1;t<n.length;t+=1){let d=s(n[t].children,!1),f=Math.max(...d.map(e=>e.length),1)*a+10;e.y+f>e.pageHeight-e.marginBottom&&(e.pdf.addPage(),e.y=e.marginTop,q9(e,l,r,o,u,i,a,5,!0)),q9(e,d,r,o,f,i,a,5,!1),t%40==0&&await _4t()}e.y+=8}function D4t(e,t){let n=[...t.matchAll(/<tr>([\s\S]*?)<\/tr>/gi)].map(e=>[...e[1].matchAll(/<td>([\s\S]*?)<\/td>/gi)].map(e=>V9(h4t(e[1]).trim()))).filter(e=>e.some(e=>e.length>0));if(!n.length)return;let r=Math.max(...n.map(e=>e.length)),i=e.xw/r;for(let t of n){let n=Array.from({length:r},(n,r)=>{let a=U9([{text:t[r]??``,style:{bold:r===0}}]);return G9(e.pdf,a,i-10,10)}),a=Math.max(...n.map(e=>e.length),1)*13+10;K9(e,a),q9(e,n,r,i,a,10,13,5,!1)}e.y+=8}async function O4t(e,t,n){switch(t.type){case`heading`:y4t(e,t);break;case`paragraph`:b4t(e,t,n);break;case`list`:await S4t(e,t);break;case`table`:await E4t(e,t);break;case`code`:w4t(e,t);break;case`blockquote`:await C4t(e,t);break;case`thematicBreak`:x4t(e);break;case`html`:{let n=t.value??``;/<table/i.test(n)&&D4t(e,n);break}}}function k4t(e){return Ao().use(Vi).use(Xl).parse(e)}function A4t(e,t){let n=e.x0+e.xw/2;e.pdf.setFont(`helvetica`,`bold`),e.pdf.setFontSize(26),e.pdf.setTextColor(26,26,46);let r=e.pdf.splitTextToSize(V9(t),e.xw),i=e.pageHeight/2-r.length*32/2;for(let t of r)e.pdf.text(t,n,i,{align:`center`}),i+=32;e.pdf.setFont(`helvetica`,`normal`),e.pdf.setFontSize(11),e.pdf.setTextColor(90,94,108),e.pdf.text(`Power Platform solution documentation`,n,i+12,{align:`center`}),e.pdf.text(`Generated ${new Date().toLocaleString()}`,n,i+30,{align:`center`})}function j4t(e,t){let n=e.getNumberOfPages(),r=e.internal.pageSize.getWidth(),i=e.internal.pageSize.getHeight();for(let a=2;a<=n;a+=1)e.setPage(a),e.setFont(`helvetica`,`normal`),e.setFontSize(8.5),e.setTextColor(140,143,156),e.text(V9(t),46,i-24),e.text(`Page ${a-1} of ${n-1}`,r-46,i-24,{align:`right`})}async function M4t(e,t,n=[]){let r=k4t(e),i=new c9({orientation:`portrait`,unit:`pt`,format:`a4`,compress:!0});i.setProperties({title:t,subject:`Power Platform solution documentation`});let a=i.internal.pageSize.getWidth(),o=i.internal.pageSize.getHeight(),s={pdf:i,x0:46,xw:a-92,y:54,pageHeight:o,marginTop:54,marginBottom:50,diagramImages:n,diagramIndex:0};A4t(s,t||`PP-MD Documentation`),i.addPage(),s.y=54;let l=0;for(let e of r.children)await O4t(s,e),l+=1,l%15==0&&await _4t();return j4t(i,t||`PP-MD Documentation`),i.output(`blob`)}async function N4t(e,t){await A(e,t.endsWith(`.md`)?t:`${t}.md`,`text/markdown`)}async function P4t(e,t){await A(e,t.endsWith(`.zip`)?t:`${t}.zip`,`application/zip`)}async function F4t(e,t){await A(e,t.endsWith(`.html`)?t:`${t}.html`,`text/html`)}async function I4t(e,t){let n=t.endsWith(`.xlsx`)?t:`${t}.xlsx`;await A(ZGt(e),n,`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`)}async function L4t(e,t,n,r=[]){let i=n.endsWith(`.pdf`)?n:`${n}.pdf`;await A(await M4t(e,t,r),i,`application/pdf`)}var R4t=`/assets/pp-md-icon-Dgg8-GAC.svg`,z4t=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='currentColor'%20aria-hidden='true'%3e%3cpath%20d='M12%20.5C5.65.5.5%205.65.5%2012c0%205.1%203.3%209.42%207.88%2010.95.58.1.8-.25.8-.56%200-.28-.01-1.2-.02-2.17-3.2.7-3.88-1.36-3.88-1.36-.52-1.33-1.28-1.68-1.28-1.68-1.04-.71.08-.7.08-.7%201.16.08%201.77%201.19%201.77%201.19%201.02%201.76%202.68%201.25%203.33.96.1-.74.4-1.25.72-1.53-2.55-.29-5.22-1.27-5.22-5.66%200-1.25.45-2.28%201.18-3.08-.12-.3-.51-1.5.11-3.13%200%200%20.96-.3%203.15%201.17a10.9%2010.9%200%200%201%205.74%200c2.18-1.48%203.14-1.17%203.14-1.17.62%201.63.24%202.83.12%203.13.74.8%201.18%201.83%201.18%203.08%200%204.4-2.68%205.37-5.24%205.66.41.35.78%201.03.78%202.08%200%201.5-.01%202.72-.01%203.09%200%20.31.21.67.8.56A11.52%2011.52%200%200%200%2023.5%2012C23.5%205.65%2018.35.5%2012%20.5Z'/%3e%3c/svg%3e`,J9={name:`@hart365/pp-md-pptb-edition`,version:`1.1.4`,displayName:`PP-MD Power Platform Markdown Document Generator`,description:`Generate Power Platform documentation from either Solution ZIP files or direct Dataverse connection`,author:`Mike Hartley`,contributors:[{name:`Mike Hartley`,url:`https://HartOfTheMidlands.co.uk`}],type:`module`,main:`index.html`,icon:`icons/pp-md.svg`,configurations:{repository:`https://github.com/Hart365/pp-md-pptb-edition`,readmeUrl:`https://raw.githubusercontent.com/Hart365/pp-md-pptb-edition/refs/heads/main/README.md`,website:`https://github.com/Hart365/pp-md-pptb-edition`},cspExceptions:{"connect-src":[{domain:`api.github.com`,exceptionReason:`Optionally checks GitHub Releases when the user requests an update check.`,optional:!0}]},features:{multiConnection:`none`,connectionRequirement:`optional`,minAPI:`1.2.2`},files:[`dist`,`LICENSE`,`README.md`],scripts:{dev:`vite`,build:`tsc && vite build && node scripts/normalize-dist-assets.mjs`,"build:with-maps":`tsc && vite build --mode debug && node scripts/normalize-dist-assets.mjs`,preview:`vite preview`,validate:`node node_modules/@pptb/validate/dist/cli.js`,"validate:offline":`node scripts/validate-offline.cjs`,"validate:dist":`node scripts/validate-dist.cjs`,"validate:publish":`npm run validate:offline && npm run build && npm run validate:dist && npm pack --dry-run`,"test:contrast":`node scripts/check-contrast.mjs`,lint:`eslint src --report-unused-disable-directives --max-warnings 0`,format:`eslint src --fix`,"type-check":`tsc --noEmit`,"test:unit":`vitest run`,test:`npm run validate:offline && npm run lint && npm run type-check && npm run test:unit && npm run test:contrast && npm run build && npm run validate:dist`,"finalize-package":`npm run validate:publish`},dependencies:{dompurify:`^3.4.15`,"fast-xml-parser":`^5.11.1`,jspdf:`4.2.1`,jszip:`^3.10.1`,mermaid:`^11.17.2`,react:`^19.2.8`,"react-dom":`^19.2.8`,"react-markdown":`^10.1.0`,"rehype-raw":`^7.0.0`,"rehype-sanitize":`^6.0.0`,"remark-gfm":`^4.0.1`,"remark-parse":`^11.0.0`,unified:`^11.0.5`,"xlsx-js-style":`1.2.0`},devDependencies:{"@eslint/js":`^10.0.1`,"@pptb/types":`^1.2.5`,"@pptb/validate":`1.0.2`,"@types/mdast":`^4.0.4`,"@types/react":`^19.2.18`,"@types/react-dom":`^19.2.7`,"@vitejs/plugin-react":`^6.1.1`,eslint:`^10.10.0`,"eslint-plugin-react-hooks":`^7.1.1`,globals:`^17.12.0`,typescript:`^6.0.3`,"typescript-eslint":`^8.69.0`,vite:`^8.2.2`,vitest:`^5.0.0`},overrides:{katex:`0.18.2`},repository:{type:`git`,url:`https://github.com/Hart365/pp-md-pptb-edition.git`},homepage:`https://github.com/Hart365/pp-md-pptb-edition#readme`,bugs:{url:`https://github.com/Hart365/pp-md-pptb-edition/issues`},keywords:[`powerplatform`,`documentation`,`dataverse`,`solution`,`markdown`],license:`MIT`},Y9={appRoot:`_appRoot_ap0ia_17`,skipLink:`_skipLink_ap0ia_43`,header:`_header_ap0ia_87`,headerInner:`_headerInner_ap0ia_107`,headerLeft:`_headerLeft_ap0ia_127`,headerCenter:`_headerCenter_ap0ia_143`,headerRight:`_headerRight_ap0ia_151`,brand:`_brand_ap0ia_161`,brandCopy:`_brandCopy_ap0ia_177`,brandIcon:`_brandIcon_ap0ia_189`,brandName:`_brandName_ap0ia_203`,brandTagline:`_brandTagline_ap0ia_221`,connectionText:`_connectionText_ap0ia_235`,headerActions:`_headerActions_ap0ia_251`,menuToggle:`_menuToggle_ap0ia_267`,headerGroup:`_headerGroup_ap0ia_295`,headerExportGroup:`_headerExportGroup_ap0ia_317`,headerBtn:`_headerBtn_ap0ia_325`,headerBtnActive:`_headerBtnActive_ap0ia_371`,headerExportMenu:`_headerExportMenu_ap0ia_381`,headerExportLabel:`_headerExportLabel_ap0ia_419`,headerDropdownArrow:`_headerDropdownArrow_ap0ia_421`,headerExportPanel:`_headerExportPanel_ap0ia_433`,menuBtn:`_menuBtn_ap0ia_473`,statusRegion:`_statusRegion_ap0ia_511`,body:`_body_ap0ia_535`,main:`_main_ap0ia_555`,mainWithViewer:`_mainWithViewer_ap0ia_577`,welcomeSection:`_welcomeSection_ap0ia_601`,welcomeHeading:`_welcomeHeading_ap0ia_619`,welcomeSubtitle:`_welcomeSubtitle_ap0ia_633`,modeVersion:`_modeVersion_ap0ia_647`,dropZoneWrapper:`_dropZoneWrapper_ap0ia_659`,modeGrid:`_modeGrid_ap0ia_667`,modeCard:`_modeCard_ap0ia_679`,modeCardTitle:`_modeCardTitle_ap0ia_719`,modeCardBody:`_modeCardBody_ap0ia_729`,modeBranding:`_modeBranding_ap0ia_739`,modeBrandIcon:`_modeBrandIcon_ap0ia_759`,modeBrandTitle:`_modeBrandTitle_ap0ia_769`,modeBrandByline:`_modeBrandByline_ap0ia_783`,modeBrandLinks:`_modeBrandLinks_ap0ia_793`,modeCallout:`_modeCallout_ap0ia_827`,modeActions:`_modeActions_ap0ia_847`,contextPanel:`_contextPanel_ap0ia_859`,contextHeading:`_contextHeading_ap0ia_879`,contextRow:`_contextRow_ap0ia_889`,contextSelectRow:`_contextSelectRow_ap0ia_901`,contextLabel:`_contextLabel_ap0ia_913`,contextSelect:`_contextSelect_ap0ia_901`,contextDeleteBtn:`_contextDeleteBtn_ap0ia_945`,contextWarning:`_contextWarning_ap0ia_989`,contextSaveRow:`_contextSaveRow_ap0ia_1005`,contextNameInput:`_contextNameInput_ap0ia_1017`,contextSaveBtn:`_contextSaveBtn_ap0ia_1039`,contextGrid:`_contextGrid_ap0ia_1063`,contextField:`_contextField_ap0ia_1075`,generatePanel:`_generatePanel_ap0ia_1109`,generatePanelHeader:`_generatePanelHeader_ap0ia_1129`,generatePanelHeading:`_generatePanelHeading_ap0ia_1141`,generatePanelSubtitle:`_generatePanelSubtitle_ap0ia_1151`,generatePanelActions:`_generatePanelActions_ap0ia_1163`,generatePrimaryBtn:`_generatePrimaryBtn_ap0ia_1177`,generateToggle:`_generateToggle_ap0ia_1221`,documentScope:`_documentScope_ap0ia_1249`,optionDetails:`_optionDetails_ap0ia_1271`,generateFooter:`_generateFooter_ap0ia_1315`,optionField:`_optionField_ap0ia_1351`,logoGrid:`_logoGrid_ap0ia_1399`,logoCard:`_logoCard_ap0ia_1411`,logoTitle:`_logoTitle_ap0ia_1429`,logoPreview:`_logoPreview_ap0ia_1441`,logoActions:`_logoActions_ap0ia_1459`,logoUploadBtn:`_logoUploadBtn_ap0ia_1469`,logoClearBtn:`_logoClearBtn_ap0ia_1471`,hiddenInput:`_hiddenInput_ap0ia_1509`,featureGrid:`_featureGrid_ap0ia_1519`,featureCard:`_featureCard_ap0ia_1531`,featureIcon:`_featureIcon_ap0ia_1555`,featureLabel:`_featureLabel_ap0ia_1567`,processingSection:`_processingSection_ap0ia_1581`,processingHeading:`_processingHeading_ap0ia_1599`,progressList:`_progressList_ap0ia_1611`,progressItem:`_progressItem_ap0ia_1623`,progressError:`_progressError_ap0ia_1631`,errorSummary:`_errorSummary_ap0ia_1653`,errorLine:`_errorLine_ap0ia_1675`,viewerWrapper:`_viewerWrapper_ap0ia_1691`,viewerLoadingState:`_viewerLoadingState_ap0ia_1711`,viewerLoadingCard:`_viewerLoadingCard_ap0ia_1733`,viewerLoadingSpinner:`_viewerLoadingSpinner_ap0ia_1755`,viewerSpin:`_viewerSpin_ap0ia_1`,viewerLoadingText:`_viewerLoadingText_ap0ia_1773`,addMoreDetails:`_addMoreDetails_ap0ia_1805`,addMoreSummary:`_addMoreSummary_ap0ia_1817`,addMoreBody:`_addMoreBody_ap0ia_1847`,addMoreSubsection:`_addMoreSubsection_ap0ia_1863`,addMoreSubheading:`_addMoreSubheading_ap0ia_1879`,modalBackdrop:`_modalBackdrop_ap0ia_1891`,modalDialog:`_modalDialog_ap0ia_1911`,modalTitle:`_modalTitle_ap0ia_1935`,modalBody:`_modalBody_ap0ia_1947`,modalOkBtn:`_modalOkBtn_ap0ia_1959`,footer:`_footer_ap0ia_2007`,footerLeft:`_footerLeft_ap0ia_2033`,footerRight:`_footerRight_ap0ia_2049`,footerVersion:`_footerVersion_ap0ia_2061`,iconLink:`_iconLink_ap0ia_2069`,linkIcon:`_linkIcon_ap0ia_2093`,headerMenuOpen:`_headerMenuOpen_ap0ia_2195`},X9=`pp-md-pptb-edition-doc-configurations`,Z9=`pp-md-pptb-edition-hidden-doc-configuration-ids`,B4t=`pp-md-pptb-edition-dataverse-collection-policy`,V4t=`solutionOnly`,H4t={client:``,project:``,contract:``,sow:``,sprint:``,releaseDate:``},U4t=J9.version,W4t=J9.configurations?.repository||(typeof J9.repository==`string`?J9.repository:J9.repository?.url?.replace(/^git\+/,``).replace(/\.git$/,``))||`https://github.com`,G4t=`https://HartOfTheMidlands.co.uk`;function Q9(e,t){return(e||t).trim().replace(/[^\w\s.-]/g,``).replace(/\s+/g,`_`)}function K4t(e){return(e.metadata.displayName||e.metadata.uniqueName||``).trim()}function q4t(e){return[...e].sort((e,t)=>K4t(e.solution).localeCompare(K4t(t.solution),void 0,{numeric:!0,sensitivity:`base`}))}function J4t(e){return[...e].sort((e,t)=>e.name.localeCompare(t.name,void 0,{numeric:!0,sensitivity:`base`}))}function Y4t(e){return{peerGapFillApplied:e.peerGapFillApplied,dataverseMetadataEnriched:e.dataverseMetadataEnriched}}function X4t(e){return/invalid|zip|archive|solution\.xml|central directory/i.test(e)}async function Z4t(){if(C()){let e=await E(X9);return Array.isArray(e)?e.filter(e=>!!e?.id&&!!e?.name):[]}try{let e=localStorage.getItem(X9);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t.filter(e=>typeof e==`object`&&!!e).map(e=>e).filter(e=>!!e.id&&!!e.name):[]}catch{return[]}}async function Q4t(e){if(C()){await D(X9,e);return}try{localStorage.setItem(X9,JSON.stringify(e))}catch{}}async function $4t(){if(C()){let e=await E(Z9);return Array.isArray(e)?e.filter(e=>typeof e==`string`&&e.trim().length>0):[]}try{let e=localStorage.getItem(Z9);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t.filter(e=>typeof e==`string`&&e.trim().length>0):[]}catch{return[]}}async function e3t(e){if(C()){await D(Z9,e);return}try{localStorage.setItem(Z9,JSON.stringify(e))}catch{}}function t3t(e,t,n){let r=EWt(e.map(e=>e.solution)),i={peerGapFillApplied:e.some(e=>e.peerGapFillApplied),dataverseMetadataEnriched:e.some(e=>e.dataverseMetadataEnriched)},a=x6(r,{erdMode:t.erdMode,documentContext:n,enrichmentIndicators:i,includeDiagrams:t.includeDiagrams,includeDefaultColumns:t.includeDefaultColumns,scope:t.scope,documentationSettings:t.documentationSettings}),o=t.includeDiagrams?tGt(a,`All Selected Solutions: Diagrams`):void 0;return{solution:r,markdown:t.includeDiagrams?x6(r,{erdMode:t.erdMode,documentContext:n,enrichmentIndicators:i,includeDiagrams:!1,includeDefaultColumns:t.includeDefaultColumns,scope:t.scope,documentationSettings:t.documentationSettings}):a,fileName:`all-selected-solutions.md`,isConsolidated:!0,diagramsMarkdown:o,peerGapFillApplied:i.peerGapFillApplied,dataverseMetadataEnriched:i.dataverseMetadataEnriched}}function n3t(e,t,n,r){let i=x6(e,{erdMode:t.erdMode,documentContext:n,enrichmentIndicators:r,includeDiagrams:t.includeDiagrams,includeDefaultColumns:t.includeDefaultColumns,scope:t.scope,documentationSettings:t.documentationSettings}),a=t.includeDiagrams&&(t.documentationSettings.separateDiagramsDocument||a3t(i)),o=a?tGt(i,`${e.metadata.displayName||e.metadata.uniqueName}: Diagrams`):void 0;return{markdown:a?x6(e,{erdMode:t.erdMode,documentContext:n,enrichmentIndicators:r,includeDiagrams:!1,includeDefaultColumns:t.includeDefaultColumns,scope:t.scope,documentationSettings:t.documentationSettings}):i,diagramsMarkdown:o||void 0}}function r3t(e,t,n){let r=q4t(e.filter(e=>!e.isConsolidated)).map((e,r,i)=>{let a=i.filter((e,t)=>t!==r).map(e=>e.solution),o=OWt(e.solution,a),s=n3t(o,t,n,Y4t({peerGapFillApplied:a.length>0,dataverseMetadataEnriched:e.dataverseMetadataEnriched}));return{...e,solution:o,peerGapFillApplied:a.length>0,markdown:s.markdown,diagramsMarkdown:s.diagramsMarkdown}});return r.length>1?[...r,t3t(r,t,n)]:r}function i3t(e){for(let t=e.length-1;t>=0;--t)if(!e[t].isConsolidated)return t;return 0}function $9(e,t,n){return r3t(e.filter(e=>!e.isConsolidated),t,n)}function a3t(e){let t=(e.match(/^#{2,6}\s+/gm)??[]).length,n=(e.match(/^\|.*\|\s*$/gm)??[]).length,r=(e.match(/```mermaid/g)??[]).length;return e.length>=45e3||t>=80||n>=250||r>=6}function o3t(){let[e,t]=(0,x.useState)([]),[n,r]=(0,x.useState)(0),[i,a]=(0,x.useState)([]),[o,s]=(0,x.useState)(!1),[l,u]=(0,x.useState)(``),[d,f]=(0,x.useState)(`detailed-relationships`),[p,m]=(0,x.useState)(!0),[h,g]=(0,x.useState)(!0),[_,v]=(0,x.useState)(oWt),[y,b]=(0,x.useState)(e6),[S,T]=(0,x.useState)(H4t),[O,A]=(0,x.useState)([]),[j,N]=(0,x.useState)(`custom`),[P,F]=(0,x.useState)(``),[I,R]=(0,x.useState)(``),[ee,z]=(0,x.useState)(!1),[B,te]=(0,x.useState)(!1),[re,ae]=(0,x.useState)(null),[oe,se]=(0,x.useState)([]),[ce,le]=(0,x.useState)(!1),[H,ue]=(0,x.useState)(``),[de,fe]=(0,x.useState)(``),[pe,me]=(0,x.useState)(`name-asc`),[he,ge]=(0,x.useState)(`all`),[_e,ve]=(0,x.useState)([]),[ye,be]=(0,x.useState)([]),[xe,Se]=(0,x.useState)(V4t),[Ce,we]=(0,x.useState)([]),[Te,Ee]=(0,x.useState)([]),[De,Oe]=(0,x.useState)(0),[ke,Ae]=(0,x.useState)(null),[je,Me]=(0,x.useState)(!1),[Ne,Pe]=(0,x.useState)(!1),Fe=(0,x.useRef)(null),Ie=(0,x.useRef)(null),Le=(0,x.useRef)(null),Re=(0,x.useMemo)(()=>({erdMode:d,includeDiagrams:p,includeDefaultColumns:h,scope:_,documentationSettings:y}),[d,p,h,_,y]),ze=(0,x.useCallback)(e=>{e.currentTarget.dataset.ppmdArmed=`true`},[]),Be=(0,x.useCallback)(e=>{let t=e.currentTarget,n=t.dataset.ppmdArmed===`true`,r=t.href;if(delete t.dataset.ppmdArmed,e.detail!==0&&!n){e.preventDefault(),e.stopPropagation();return}C()&&(e.preventDefault(),k(r))},[]),{connection:Ve,isLoading:He,isInPPTB:Ue,initializeConnection:We}=WGt({autoInitConnection:!1}),Ge=window.__PPMD_VERSION__||U4t;(0,x.useEffect)(()=>{if(!Ue)return;let e=window.setTimeout(()=>{We()},0);return()=>{window.clearTimeout(e)}},[Ue,We]),(0,x.useEffect)(()=>{let e=!0;return(async()=>{try{let t=await E(B4t);if(!e)return;(t===`solutionOnly`||t===`solutionAndDirectReferences`||t===`environmentAppendix`)&&Se(t)}catch{}})(),()=>{e=!1}},[]),(0,x.useEffect)(()=>{D(B4t,xe)},[xe]),(0,x.useEffect)(()=>{let e=!0;return(async()=>{let t=await Z4t(),n=new Set(await $4t());try{let r=await fetch(`./doc-configurations.json`,{cache:`no-store`});if(!r.ok)throw Error(`HTTP ${r.status}`);let i=await r.json();if(!Array.isArray(i.configurations))throw Error(`Invalid configuration shape`);if(!e)return;A([...i.configurations,...t].filter(e=>!n.has(e.id))),F(``)}catch(r){if(!e)return;A(t.filter(e=>!n.has(e.id))),F(`Could not load doc-configurations.json: ${r.message}`)}})(),()=>{e=!1}},[]),(0,x.useEffect)(()=>{ke&&Ie.current?.focus()},[ke]);let Ke=(0,x.useCallback)(e=>{let n={client:e.client??``,project:e.project??``,contract:e.contract??``,sow:e.sow??``,sprint:e.sprint??``,releaseDate:e.releaseDate??``};T({client:n.client,project:n.project,contract:n.contract,sow:n.sow,sprint:n.sprint,releaseDate:n.releaseDate}),t(e=>$9(e,Re,n))},[Re]),qe=(0,x.useCallback)(e=>{let t=e.target.value;if(N(t),t===`custom`)return;let n=O.find(e=>e.id===t);n&&(Ke(n),R(n.name))},[O,Ke]),Je=(0,x.useCallback)((e,n)=>{let r={...S,[e]:n};N(`custom`),T(r),t(e=>$9(e,Re,r))},[S,Re]),Ye=(0,x.useCallback)(async()=>{let e=I.trim();if(!e){u(`Please enter a configuration name before saving.`);return}let t=`local-${Date.now()}`,n={id:t,name:e,client:S.client,project:S.project,contract:S.contract,sow:S.sow,sprint:S.sprint,releaseDate:S.releaseDate};await Q4t([...(await Z4t()).filter(t=>t.name.toLowerCase()!==e.toLowerCase()),n]),A(t=>[...t.filter(t=>t.name.toLowerCase()!==e.toLowerCase()),n]),N(t),u(`Configuration "${e}" saved.`)},[I,S]),Xe=(0,x.useCallback)(async e=>{if(e===`custom`)return;let t=O.find(t=>t.id===e);t&&(await e3t(Array.from(new Set([...await $4t(),e]))),e.startsWith(`local-`)&&await Q4t((await Z4t()).filter(t=>t.id!==e)),A(t=>t.filter(t=>t.id!==e)),j===e&&(N(`custom`),R(``)),u(`Configuration "${t.name}" deleted.`))},[O,j]),Ze=(0,x.useCallback)(async()=>{let e=Ve??await We();if(!e){se([]),ue(`No active Dataverse connection is available. Open or activate a connection in Power Platform ToolBox, then refresh this list.`);return}le(!0),ue(``);try{let t=await BGt();se(t),u(`Loaded ${t.length} solution${t.length===1?``:`s`} from ${e.name}.`);let n=Array.from(new Set(t.map(e=>e.publisherName?.trim()).filter(e=>!!e))).sort((e,t)=>e.localeCompare(t,void 0,{sensitivity:`base`}));ve(n),be([])}catch(e){let t=e instanceof Error?e.message:`Unable to read solutions from Dataverse.`;se([]),ve([]),be([]),ue(t),u(`Failed to load Dataverse solutions: ${t}`)}finally{le(!1)}},[Ve,We]),Qe=(0,x.useCallback)(e=>{ae(e),t([]),r(0),a([]),s(!1),ue(``),be([]),Ee([]),Oe(e=>e+1),u(e===`local`?`Local Solutions mode selected. Upload one or more solution ZIP files to continue.`:`Dataverse Connected mode selected. Choose a solution from the active environment to continue.`),e===`dataverse`&&Ze()},[Ze]),$e=(0,x.useCallback)(()=>{ae(null),t([]),r(0),a([]),s(!1),we([]),ve([]),be([]),Ee([]),Oe(e=>e+1),Ae(null),u(`Choose how you want to generate solution documentation.`)},[]),et=(0,x.useCallback)(async n=>{let i=n.target.files?.[0];if(n.target.value=``,i)try{let n=await i.text(),a=i.name.replace(/\.md$/i,``)||`Imported Markdown`,o={metadata:{uniqueName:a,displayName:a,version:``,publisherName:``,isManaged:!1},entities:[],optionSets:[],forms:[],views:[],processes:[],apps:[],webResources:[],securityRoles:[],fieldSecurityProfiles:[],connectionReferences:[],environmentVariables:[],emailTemplates:[],reports:[],dashboards:[],pluginAssemblies:[],warnings:[],agents:[],aiModels:[],desktopFlows:[],dataflows:[],customApis:[],offlineProfiles:[]};t(e=>[...e.filter(e=>!e.isConsolidated),{solution:o,markdown:n,fileName:i.name}]),r(e.filter(e=>!e.isConsolidated).length),u(`Opened ${i.name}.`)}catch{u(`Could not open ${i.name}.`)}},[e]),tt=(0,x.useCallback)((e,t)=>{a(n=>{if(!n[e])return n;let r=[...n];return r[e]=t(r[e]),r})},[]),nt=(0,x.useCallback)(async n=>{let i=J4t(n);s(!0),u(`Processing ${i.length} file${i.length>1?`s`:``}…`);let o=i.map(e=>({fileName:e.name,progress:0}));a(o);let l=[],f=[];for(let e=0;e<i.length;e++){let t=i[e];try{u(`Parsing ${t.name}…`);let n=await aWt(t,t=>{tt(e,e=>({...e,progress:t}))});u(`Generating documentation for ${t.name}…`);let r=x6(n,{erdMode:d,documentContext:S,includeDiagrams:p,includeDefaultColumns:h,scope:_,documentationSettings:y});l.push({solution:n,markdown:r,fileName:t.name}),tt(e,e=>({...e,progress:100}))}catch(n){let r=n.message??`Unknown error`;tt(e,e=>({...e,progress:0,error:r})),X4t(r)&&f.push(t.name)}}if(l.length>0){let n=r3t([...e.filter(e=>!e.isConsolidated),...l],Re,S);t(n),r(i3t(n));let a=l.length,o=i.length-a;u(o>0?`Done: ${a} document${a>1?`s`:``} generated, ${o} file${o>1?`s`:``} failed.`:`Done: ${a} document${a>1?`s`:``} generated successfully.`)}else u(`No documents generated. Check that the files are valid Power Platform solution ZIPs.`);s(!1),f.length>0&&Ae(f.length===1?`${f[0]} is not a valid Power Platform solution ZIP archive and was removed from the selection list.`:`${f.length} invalid ZIP archives were removed from the selection list.`),setTimeout(()=>a([]),1500)},[e,d,S,p,h,_,y,Re,tt]),rt=(0,x.useCallback)(async()=>{if(ye.length===0){ue(`Select at least one solution to generate documentation.`);return}let n=Ve??await We();if(!n){ue(`No active Dataverse connection is available. Open or activate a connection in Power Platform ToolBox and try again.`);return}let i=oe.filter(e=>ye.includes(e.solutionId));if(i.length===0){ue(`The selected solutions are no longer available. Refresh the list and try again.`);return}we(i.map(e=>e.solutionId)),s(!0),a(i.map(e=>({fileName:e.displayName,progress:0}))),u(`Reading ${i.length} solution${i.length===1?``:`s`} from ${n.name}...`);try{let n=[];for(let e=0;e<i.length;e+=1){let t=i[e],r=await HGt(t.solutionId,({message:t,percent:n})=>{u(t),tt(e,e=>({...e,progress:n}))},xe),a=x6(r,{erdMode:d,documentContext:S,includeDiagrams:p,includeDefaultColumns:h,scope:_,documentationSettings:y});n.push({solution:r,markdown:a,fileName:`${t.uniqueName}.dataverse`,dataverseMetadataEnriched:!1}),tt(e,e=>({...e,progress:100}))}let a=r3t(q4t([...e.filter(e=>!e.isConsolidated),...n]),Re,S);t(a),r(i3t(a)),u(`Documentation generated for ${n.length} Dataverse solution${n.length===1?``:`s`}.`),await w(`Documentation Ready`,`${n.length} Dataverse solution${n.length===1?``:`s`} documented.`,`success`,3e3)}catch(e){let t=e instanceof Error?e.message:`Unable to read the selected solution.`;a(e=>e.map(e=>({...e,error:t}))),u(`Failed to generate Dataverse documentation: ${t}`),await w(`Dataverse Read Failed`,t,`error`,4e3)}finally{we([]),s(!1),setTimeout(()=>a([]),1500)}},[Ve,oe,S,d,p,h,_,y,Re,We,e,ye,xe,tt]),it=(0,x.useCallback)(e=>{Se(e),u(`Dataverse collection policy set to ${e}.`)},[]),at=(0,x.useCallback)(e=>{ve(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),ot=(0,x.useCallback)(()=>{let e=Array.from(new Set(oe.map(e=>e.publisherName?.trim()).filter(e=>!!e))).sort((e,t)=>e.localeCompare(t,void 0,{sensitivity:`base`}));ve(e)},[oe]),st=(0,x.useCallback)(()=>{ve([])},[]),ct=(0,x.useCallback)(e=>{be(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),lt=(0,x.useCallback)(()=>{be([])},[]),ut=(0,x.useCallback)(()=>{let e=d===`detailed-relationships`?`compact`:`detailed-relationships`,n={...Re,erdMode:e};t(e=>$9(e,n,S)),f(e),u(`ERD mode switched to ${e===`compact`?`Compact`:`Detailed-Relationships`}.`)},[d,S,Re]),dt=(0,x.useCallback)(()=>{let e=!p,n={...Re,includeDiagrams:e};m(e),t(e=>$9(e,n,S)),u(e?`Generate Diagrams enabled.`:`Generate Diagrams disabled. Diagram sections will be excluded.`)},[p,Re,S]),ft=(0,x.useCallback)(()=>{let e=!h,n={...Re,includeDefaultColumns:e};g(e),t(e=>$9(e,n,S)),u(e?`Include Default Columns enabled.`:`Include Default Columns disabled. Default/system columns will be excluded.`)},[h,Re,S]),pt=(0,x.useCallback)(e=>{v(n=>{let r={...n,[e]:!n[e]};return t(e=>$9(e,{...Re,scope:r},S)),r})},[S,Re]),mt=(0,x.useCallback)(e=>{b(n=>{let r={...n,...e,metadata:{...n.metadata,...e.metadata},securityRoleFilters:{...n.securityRoleFilters,...e.securityRoleFilters}};return t(e=>$9(e,{...Re,documentationSettings:r},S)),r})},[S,Re]),ht=(0,x.useCallback)(()=>{if(o||Te.length===0)return;let e=J4t(Te);Ee([]),Oe(e=>e+1),nt(e)},[o,Te,nt]),gt=(0,x.useCallback)(t=>{let n=e[t];if(n){if(te(!1),!a3t(n.markdown)){r(t),z(!1);return}z(!0),window.setTimeout(()=>{r(t),window.setTimeout(()=>{z(!1)},300)},50)}},[e]),_t=(0,x.useCallback)((t=n)=>{let i=e[t];i?.diagramsMarkdown&&(r(t),te(!0),z(a3t(i.diagramsMarkdown)),window.setTimeout(()=>z(!1),350))},[n,e]),vt=(0,x.useCallback)(async()=>{let t=e[n];if(!t)return;let r=B?t.diagramsMarkdown:t.markdown;if(!r)return;let i=Q9(t.solution.metadata.displayName||t.solution.metadata.uniqueName,`solution`);try{await N4t(r,B?`${i}-diagrams`:`${i}-documentation`),await w(`Export Successful`,`Markdown document exported successfully.`,`success`,3e3)}catch(e){console.error(`Export failed:`,e),await w(`Export Failed`,`Failed to export markdown document.`,`error`,3e3)}},[e,n,B]),yt=(0,x.useCallback)(async t=>{let r=e[n];if(!r)return;let i=Q9(r.solution.metadata.displayName||r.solution.metadata.uniqueName,`solution`);try{await F4t(t,B?`${i}-diagrams`:`${i}-documentation`),await w(`Export Successful`,`HTML document exported successfully.`,`success`,3e3)}catch(e){console.error(`HTML export failed:`,e),await w(`Export Failed`,`Failed to export HTML document.`,`error`,3e3)}},[e,n,B]),bt=(0,x.useCallback)(async()=>{let t=e[n];if(!t)return;let r=Q9(t.solution.metadata.displayName||t.solution.metadata.uniqueName,`solution`);try{await I4t(t.solution,B?`${r}-diagrams`:`${r}-documentation`),await w(`Export Successful`,`Excel workbook exported successfully.`,`success`,3e3)}catch(e){console.error(`Excel export failed:`,e),await w(`Export Failed`,`Failed to export Excel workbook.`,`error`,3e3)}},[e,n,B]),xt=(0,x.useCallback)(async(t,r,i)=>{if(!e[n])return;let a=Q9(r,`solution`);try{await L4t(t,r,`${a}-documentation`,i),await w(`Export Successful`,`PDF document exported successfully.`,`success`,3e3)}catch(e){console.error(`PDF export failed:`,e),await w(`Export Failed`,`Failed to export PDF document.`,`error`,3e3)}},[e,n]),St=(0,x.useCallback)(async()=>{let t=e[n];if(!t)return;let r=nGt(t.solution,{documentContext:S}),i=Q9(t.solution.metadata.displayName||t.solution.metadata.uniqueName,`solution`);try{await N4t(r,`${i}-dependency-report`),await w(`Export Successful`,`Dependency report exported successfully.`,`success`,3e3)}catch(e){console.error(`Dependency export failed:`,e),await w(`Export Failed`,`Failed to export dependency report.`,`error`,3e3)}},[e,n,S]),Ct=(0,x.useCallback)(async()=>{if(e.length!==0)try{let t=new L.default;e.forEach((e,n)=>{let r=e.isConsolidated?`consolidated`:`solution_${n+1}`,i=Q9(e.solution.metadata.displayName||e.solution.metadata.uniqueName,r),a=e.isConsolidated?`-summary.md`:`-documentation.md`;if(t.file(`${i}${a}`,e.markdown),e.diagramsMarkdown&&t.file(`${i}-diagrams.md`,e.diagramsMarkdown),je&&!e.isConsolidated){let n=nGt(e.solution,{documentContext:S});t.file(`${i}-dependency-report.md`,n)}}),await P4t(await t.generateAsync({type:`blob`}),`pp-md-pptb-edition-markdown-documents`),await w(`Export Successful`,je?`All markdown documents and dependency reports exported as ZIP.`:`All markdown documents exported as ZIP.`,`success`,3e3)}catch(e){console.error(`Export all failed:`,e),await w(`Export Failed`,`Failed to export markdown documents as ZIP.`,`error`,3e3)}},[e,je,S]),wt=(0,x.useCallback)(async()=>{if(e.length!==0)try{let t=new L.default;e.forEach((e,n)=>{let r=Q9(e.solution.metadata.displayName||e.solution.metadata.uniqueName,e.isConsolidated?`all-selected-solutions`:`solution_${n+1}`),i=t.folder(r),a=eGt(e.markdown);a.length===0?i?.file(`${r}-documentation.md`,e.markdown):a.forEach(e=>{i?.file(`${r}-${e.key}.md`,e.markdown)}),e.diagramsMarkdown&&i?.file(`${r}-diagrams.md`,e.diagramsMarkdown)}),await P4t(await t.generateAsync({type:`blob`}),`pp-md-pptb-edition-markdown-by-category`),await w(`Export Successful`,`Documentation exported as category-grouped ZIP.`,`success`,3e3)}catch(e){console.error(`Export by category failed:`,e),await w(`Export Failed`,`Failed to export category-grouped documentation.`,`error`,3e3)}},[e]),Tt=(0,x.useCallback)(()=>{t([]),r(0),a([]),Ee([]),Oe(e=>e+1),u(``)},[]),Et=e.length>0,Dt=re===`local`&&Te.length>0&&!o,Ot=re===`dataverse`&&ye.length>0&&Ce.length===0&&!o,kt=e.findIndex(e=>e.isConsolidated),At=e[n],jt=re===`local`&&!Et&&!o,Mt=re===null&&!Et&&!o,Nt=re===`dataverse`&&!Et&&!o,Pt=Array.from(new Set(oe.map(e=>e.publisherName?.trim()).filter(e=>!!e))).sort((e,t)=>e.localeCompare(t,void 0,{sensitivity:`base`})),Ft=oe.filter(e=>{if(he===`managed`&&!e.isManaged||he===`unmanaged`&&e.isManaged)return!1;if(_e.length>0){let t=e.publisherName?.trim()||``;if(!_e.includes(t))return!1}let t=de.trim().toLowerCase();return!t||e.displayName.toLowerCase().includes(t)||e.uniqueName.toLowerCase().includes(t)||e.version.toLowerCase().includes(t)||(e.publisherName?.toLowerCase().includes(t)??!1)}).sort((e,t)=>{switch(pe){case`name-desc`:return t.displayName.localeCompare(e.displayName,void 0,{sensitivity:`base`});case`version-asc`:return e.version.localeCompare(t.version,void 0,{sensitivity:`base`,numeric:!0});case`version-desc`:return t.version.localeCompare(e.version,void 0,{sensitivity:`base`,numeric:!0});default:return e.displayName.localeCompare(t.displayName,void 0,{sensitivity:`base`})}}),It=(0,x.useCallback)(()=>{be(Ft.map(e=>e.solutionId))},[Ft]);return(0,M.jsxs)(`div`,{className:Y9.appRoot,children:[(0,M.jsx)(`a`,{href:`#main-content`,className:Y9.skipLink,children:`Skip to main content`}),(0,M.jsx)(`input`,{ref:Le,type:`file`,accept:`text/markdown,.md`,className:`sr-only`,onChange:et}),(0,M.jsx)(`header`,{className:Y9.header,role:`banner`,children:(0,M.jsxs)(`div`,{className:Y9.headerInner,children:[(0,M.jsxs)(`div`,{className:Y9.headerLeft,children:[(0,M.jsxs)(`div`,{className:Y9.brand,children:[(0,M.jsx)(`img`,{src:R4t,className:Y9.brandIcon,alt:``,"aria-hidden":`true`}),(0,M.jsxs)(`div`,{className:Y9.brandCopy,children:[(0,M.jsx)(`h1`,{className:Y9.brandName,children:`PP-MD - PPTB Edition`}),(0,M.jsx)(`span`,{className:Y9.brandTagline,children:`Power Platform Documentation Generator`})]})]}),(0,M.jsx)(`span`,{className:Y9.connectionText,children:He?`Connecting to ToolBox...`:Ue?`Connected to: ${Ve?.name??`No active connection`}`:`Running outside ToolBox (local dev mode)`})]}),(0,M.jsxs)(`div`,{className:Y9.headerRight,children:[(0,M.jsx)(`button`,{type:`button`,className:Y9.menuToggle,onClick:()=>Pe(e=>!e),"aria-expanded":Ne,"aria-controls":`header-actions`,"aria-label":`Open toolbar menu`,children:(0,M.jsx)(`span`,{"aria-hidden":`true`,children:`☰`})}),(0,M.jsxs)(`div`,{id:`header-actions`,className:`${Y9.headerActions} ${Ne?Y9.headerMenuOpen:``}`,children:[(0,M.jsxs)(`div`,{className:Y9.headerGroup,role:`group`,"aria-label":`Document tools`,children:[!o&&(0,M.jsx)(`button`,{type:`button`,className:Y9.headerBtn,onClick:()=>Le.current?.click(),children:`Open .MD`}),Et&&!o&&(0,M.jsx)(`button`,{type:`button`,className:Y9.headerBtn,onClick:ut,"aria-label":`Toggle ERD detail level`,children:d===`compact`?`ERD: Compact`:`ERD: Detailed`}),Et&&!o&&At?.diagramsMarkdown&&(0,M.jsx)(`button`,{type:`button`,className:`${Y9.headerBtn} ${B?Y9.headerBtnActive:``}`,onClick:()=>{B?te(!1):_t(n)},"aria-label":B?`View main documentation`:`View companion diagrams`,children:B?`Main Document`:`Companion Diagrams`})]}),(0,M.jsx)(`div`,{className:`${Y9.headerGroup} ${Y9.headerExportGroup}`,role:`group`,"aria-label":`Documentation exports`,children:Et&&!o&&(0,M.jsxs)(`details`,{ref:Fe,className:Y9.headerExportMenu,children:[(0,M.jsxs)(`summary`,{className:`${Y9.headerBtn} ${Y9.headerExportTrigger}`,children:[(0,M.jsx)(`span`,{className:Y9.headerExportLabel,children:`Export`}),(0,M.jsx)(`span`,{className:Y9.headerDropdownArrow,"aria-hidden":`true`,children:`▼`})]}),(0,M.jsxs)(`div`,{className:Y9.headerExportPanel,children:[(0,M.jsxs)(`button`,{type:`button`,className:Y9.menuBtn,onClick:()=>{Fe.current?.removeAttribute(`open`),Ct()},children:[`All Markdown`,je?` + Dependencies`:``]}),(0,M.jsx)(`button`,{type:`button`,className:Y9.menuBtn,onClick:()=>{Fe.current?.removeAttribute(`open`),wt()},children:`By Category`}),(0,M.jsx)(`button`,{type:`button`,className:Y9.menuBtn,onClick:()=>{Fe.current?.removeAttribute(`open`),Me(e=>!e)},children:je?`Disable Dependency Reports`:`Include Dependency Reports`}),je&&(0,M.jsx)(`button`,{type:`button`,className:Y9.menuBtn,onClick:()=>{Fe.current?.removeAttribute(`open`),St()},children:`Dependency Report`})]})]})}),(0,M.jsxs)(`div`,{className:Y9.headerGroup,role:`group`,"aria-label":`Session actions`,children:[Et&&!o&&(0,M.jsx)(`button`,{type:`button`,className:Y9.headerBtn,onClick:Tt,"aria-label":`Clear all results and add new files`,children:`+ New`}),re&&(0,M.jsx)(`button`,{type:`button`,className:Y9.headerBtn,onClick:$e,"aria-label":`Return to mode selection`,children:`Change Mode`})]})]})]})]})}),(0,M.jsx)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,className:Y9.statusRegion,role:`status`,children:l}),(0,M.jsxs)(`div`,{className:Y9.body,children:[Et&&(0,M.jsx)(jVt,{solutions:e.map(e=>e.solution),activeIndex:n,combinedIndex:kt,diagramsAvailable:!!e[kt]?.diagramsMarkdown,diagramsActive:B,onSelectDiagrams:()=>_t(kt),onSelect:gt,onReset:Tt}),(0,M.jsxs)(`main`,{id:`main-content`,className:`${Y9.main} ${Et?Y9.mainWithViewer:``}`,tabIndex:-1,children:[(Mt||jt||Nt)&&(0,M.jsx)(`section`,{className:Y9.welcomeSection,"aria-labelledby":`welcome-heading`,children:Mt?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`h2`,{id:`welcome-heading`,className:Y9.welcomeHeading,children:`Choose how you want to document your solution`}),(0,M.jsx)(`p`,{className:Y9.welcomeSubtitle,children:`Start with local ZIP files or connect to Dataverse and read solution metadata directly from the active environment.`}),(0,M.jsxs)(`p`,{className:Y9.modeVersion,children:[`PP-MD - PPTB Edition version `,Ge]}),(0,M.jsxs)(`div`,{className:Y9.modeGrid,children:[(0,M.jsxs)(`button`,{type:`button`,className:Y9.modeCard,onClick:()=>Qe(`local`),children:[(0,M.jsx)(`span`,{className:Y9.modeCardTitle,children:`Local Solutions`}),(0,M.jsx)(`span`,{className:Y9.modeCardBody,children:`Upload one or more exported solution ZIP files for local documentation generation.`})]}),(0,M.jsxs)(`button`,{type:`button`,className:Y9.modeCard,onClick:()=>Qe(`dataverse`),children:[(0,M.jsx)(`span`,{className:Y9.modeCardTitle,children:`Dataverse Connected`}),(0,M.jsx)(`span`,{className:Y9.modeCardBody,children:`Browse solutions from the currently active Power Platform ToolBox environment and generate documentation directly from Dataverse metadata.`})]})]}),(0,M.jsxs)(`section`,{className:Y9.modeBranding,"aria-label":`Product details and links`,children:[(0,M.jsx)(`img`,{src:`/assets/pp-md-icon-Dgg8-GAC.svg`,className:Y9.modeBrandIcon,alt:`PP-MD logo`}),(0,M.jsx)(`p`,{className:Y9.modeBrandTitle,children:`Power Platform Markdown Document Generator`}),(0,M.jsx)(`p`,{className:Y9.modeBrandByline,children:`by Mike Hartley / Hart of the Midlands`}),(0,M.jsxs)(`div`,{className:Y9.modeBrandLinks,children:[(0,M.jsx)(`a`,{href:G4t,target:`_blank`,rel:`noreferrer`,onMouseDown:ze,onClick:Be,children:`HartOfTheMidlands.co.uk`}),(0,M.jsxs)(`a`,{href:W4t,target:`_blank`,rel:`noreferrer`,className:Y9.iconLink,onMouseDown:ze,onClick:Be,children:[(0,M.jsx)(`img`,{src:`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='currentColor'%20aria-hidden='true'%3e%3cpath%20d='M12%20.5C5.65.5.5%205.65.5%2012c0%205.1%203.3%209.42%207.88%2010.95.58.1.8-.25.8-.56%200-.28-.01-1.2-.02-2.17-3.2.7-3.88-1.36-3.88-1.36-.52-1.33-1.28-1.68-1.28-1.68-1.04-.71.08-.7.08-.7%201.16.08%201.77%201.19%201.77%201.19%201.02%201.76%202.68%201.25%203.33.96.1-.74.4-1.25.72-1.53-2.55-.29-5.22-1.27-5.22-5.66%200-1.25.45-2.28%201.18-3.08-.12-.3-.51-1.5.11-3.13%200%200%20.96-.3%203.15%201.17a10.9%2010.9%200%200%201%205.74%200c2.18-1.48%203.14-1.17%203.14-1.17.62%201.63.24%202.83.12%203.13.74.8%201.18%201.83%201.18%203.08%200%204.4-2.68%205.37-5.24%205.66.41.35.78%201.03.78%202.08%200%201.5-.01%202.72-.01%203.09%200%20.31.21.67.8.56A11.52%2011.52%200%200%200%2023.5%2012C23.5%205.65%2018.35.5%2012%20.5Z'/%3e%3c/svg%3e`,className:Y9.linkIcon,alt:``,"aria-hidden":`true`}),(0,M.jsx)(`span`,{children:`GitHub Repo`})]})]})]})]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`h2`,{id:`welcome-heading`,className:Y9.welcomeHeading,children:re===`local`?`Generate documentation from your solution files`:`Generate documentation from the active Dataverse environment`}),(0,M.jsx)(`p`,{className:Y9.welcomeSubtitle,children:re===`local`?`Drop one or more Power Platform solution ZIP archives below. PP-MD - PPTB Edition will parse every component and produce comprehensive Markdown documentation — including architecture and ERD Mermaid diagrams.`:`Choose a solution from the active environment. PP-MD - PPTB Edition reads metadata through Power Platform ToolBox and generates Markdown documentation without exporting or uploading the solution.`}),(0,M.jsxs)(`section`,{className:Y9.contextPanel,"aria-labelledby":`context-heading`,children:[(0,M.jsx)(`h3`,{id:`context-heading`,className:Y9.contextHeading,children:`Document Header Details`}),re===`dataverse`&&(0,M.jsxs)(`div`,{className:Y9.contextRow,children:[(0,M.jsx)(`label`,{htmlFor:`dataverse-policy-select`,className:Y9.contextLabel,children:`Collection Policy`}),(0,M.jsx)(`div`,{className:Y9.contextSelectRow,children:(0,M.jsxs)(`select`,{id:`dataverse-policy-select`,className:Y9.contextSelect,value:xe,onChange:e=>it(e.target.value),"aria-label":`Select the Dataverse collection policy`,children:[(0,M.jsx)(`option`,{value:`solutionOnly`,children:`Solution only`}),(0,M.jsx)(`option`,{value:`solutionAndDirectReferences`,children:`Solution + direct references`}),(0,M.jsx)(`option`,{value:`environmentAppendix`,children:`Environment appendix`})]})})]}),(0,M.jsxs)(`div`,{className:Y9.contextRow,children:[(0,M.jsx)(`label`,{htmlFor:`config-select`,className:Y9.contextLabel,children:`Configuration`}),(0,M.jsxs)(`div`,{className:Y9.contextSelectRow,children:[(0,M.jsxs)(`select`,{id:`config-select`,className:Y9.contextSelect,value:j,onChange:qe,"aria-label":`Select document configuration`,children:[(0,M.jsx)(`option`,{value:`custom`,children:`Custom (manual entry)`}),O.map(e=>(0,M.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,M.jsx)(`button`,{type:`button`,className:Y9.contextDeleteBtn,onClick:()=>Xe(j),disabled:j===`custom`,"aria-label":`Delete selected configuration`,title:`Delete selected configuration`,children:`🗑`})]})]}),(0,M.jsxs)(`div`,{className:Y9.contextSaveRow,children:[(0,M.jsx)(`input`,{type:`text`,className:Y9.contextNameInput,placeholder:`Configuration name`,value:I,onChange:e=>R(e.target.value),"aria-label":`Configuration name`}),(0,M.jsx)(`button`,{type:`button`,className:Y9.contextSaveBtn,onClick:Ye,children:`Save Configuration`})]}),P&&(0,M.jsxs)(`p`,{className:Y9.contextWarning,role:`alert`,children:[`⚠ `,P]}),(0,M.jsxs)(`div`,{className:Y9.contextGrid,children:[(0,M.jsxs)(`label`,{className:Y9.contextField,children:[(0,M.jsx)(`span`,{children:`Client`}),(0,M.jsx)(`input`,{type:`text`,value:S.client,onChange:e=>Je(`client`,e.target.value)})]}),(0,M.jsxs)(`label`,{className:Y9.contextField,children:[(0,M.jsx)(`span`,{children:`Contract`}),(0,M.jsx)(`input`,{type:`text`,value:S.contract,onChange:e=>Je(`contract`,e.target.value)})]}),(0,M.jsxs)(`label`,{className:Y9.contextField,children:[(0,M.jsx)(`span`,{children:`Contract ID/SoW`}),(0,M.jsx)(`input`,{type:`text`,value:S.sow,onChange:e=>Je(`sow`,e.target.value)})]}),(0,M.jsxs)(`label`,{className:Y9.contextField,children:[(0,M.jsx)(`span`,{children:`Project`}),(0,M.jsx)(`input`,{type:`text`,value:S.project,onChange:e=>Je(`project`,e.target.value)})]}),(0,M.jsxs)(`label`,{className:Y9.contextField,children:[(0,M.jsx)(`span`,{children:`Sprint`}),(0,M.jsx)(`input`,{type:`text`,value:S.sprint,onChange:e=>Je(`sprint`,e.target.value)})]}),(0,M.jsxs)(`label`,{className:Y9.contextField,children:[(0,M.jsx)(`span`,{children:`Release Date`}),(0,M.jsx)(`input`,{type:`date`,value:S.releaseDate,onChange:e=>Je(`releaseDate`,e.target.value)})]})]})]}),(0,M.jsxs)(`section`,{className:Y9.generatePanel,"aria-labelledby":`generate-doc-heading`,children:[(0,M.jsxs)(`div`,{className:Y9.generatePanelHeader,children:[(0,M.jsx)(`h3`,{id:`generate-doc-heading`,className:Y9.generatePanelHeading,children:`Generate Documentation`}),(0,M.jsx)(`p`,{className:Y9.generatePanelSubtitle,children:`Use one shared generation action for the selected mode and choose what to include in output.`})]}),(0,M.jsxs)(`div`,{className:Y9.generatePanelActions,children:[re===`local`?(0,M.jsxs)(`button`,{type:`button`,className:Y9.generatePrimaryBtn,onClick:ht,disabled:!Dt,"aria-label":`Generate documentation for ${Te.length} queued file${Te.length===1?``:`s`}`,children:[`Generate Documentation (`,Te.length,`)`]}):(0,M.jsxs)(`button`,{type:`button`,className:Y9.generatePrimaryBtn,onClick:rt,disabled:!Ot,"aria-label":`Generate documentation for ${ye.length} selected Dataverse solution${ye.length===1?``:`s`}`,children:[`Generate Selected (`,ye.length,`)`]}),(0,M.jsxs)(`label`,{className:Y9.generateToggle,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:p,onChange:dt}),(0,M.jsx)(`span`,{children:`Generate Diagrams`})]}),(0,M.jsxs)(`label`,{className:Y9.generateToggle,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:h,onChange:ft}),(0,M.jsx)(`span`,{children:`Include Default Columns`})]})]}),(0,M.jsxs)(`details`,{className:Y9.optionDetails,open:!0,children:[(0,M.jsx)(`summary`,{children:`Documentation Options`}),(0,M.jsxs)(`fieldset`,{className:Y9.documentScope,children:[(0,M.jsx)(`legend`,{className:`sr-only`,children:`Documentation Options`}),[[`flows`,`Flows and automation`],[`apps`,`Power Apps`],[`security`,`Security roles and profiles`],[`integration`,`Integration and SharePoint`],[`plugins`,`Plug-ins and steps`],[`reports`,`Reports and dashboards`],[`webResources`,`Web resources`],[`modernArtifacts`,`Agents, AI, desktop flows, dataflows, APIs and offline profiles`]].map(([e,t])=>(0,M.jsxs)(`label`,{className:Y9.generateToggle,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:_[e],onChange:()=>pt(e)}),(0,M.jsx)(`span`,{children:t})]},e))]})]}),(0,M.jsxs)(`details`,{className:Y9.optionDetails,children:[(0,M.jsx)(`summary`,{children:`Table Options`}),(0,M.jsxs)(`fieldset`,{className:Y9.documentScope,children:[(0,M.jsx)(`legend`,{className:`sr-only`,children:`Table Options`}),(0,M.jsxs)(`label`,{className:Y9.optionField,children:[`Attribute selection`,(0,M.jsxs)(`select`,{value:y.metadata.attributeSelectionMode,onChange:e=>mt({metadata:{attributeSelectionMode:e.target.value}}),children:[(0,M.jsx)(`option`,{value:`all`,children:`All attributes`}),(0,M.jsx)(`option`,{value:`custom-only`,children:`Custom only`}),(0,M.jsx)(`option`,{value:`attributes-on-form`,children:`Attributes on forms`}),(0,M.jsx)(`option`,{value:`attributes-not-on-form`,children:`Attributes not on forms`}),(0,M.jsx)(`option`,{value:`option-set-focused`,children:`Choice columns`}),(0,M.jsx)(`option`,{value:`unmanaged-only`,children:`Unmanaged only`})]})]}),(0,M.jsxs)(`label`,{className:Y9.optionField,children:[`Manual attributes`,(0,M.jsx)(`input`,{value:y.metadata.manualAttributes.join(`, `),onChange:e=>mt({metadata:{manualAttributes:e.target.value.split(`,`).map(e=>e.trim()).filter(Boolean)}}),placeholder:`schema_name, schema_name`})]}),[`includeDefaultColumns`,`excludeVirtualAttributes`,`includeTypeColumn`,`includeRequiredLevelInfo`,`includeCustomColumn`,`includeAuditInfo`,`includeNotesColumn`,`includeDescriptionColumn`,`includeAdvancedFind`,`includeFieldSecurity`,`includeMetadataSource`].map(e=>(0,M.jsxs)(`label`,{className:Y9.generateToggle,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:y.metadata[e],onChange:()=>mt({metadata:{[e]:!y.metadata[e]}})}),(0,M.jsx)(`span`,{children:e.replace(`include`,``).replace(/([A-Z])/g,` $1`).trim()})]},e))]})]}),(0,M.jsxs)(`details`,{className:Y9.optionDetails,children:[(0,M.jsx)(`summary`,{children:`Security Role Options`}),(0,M.jsxs)(`fieldset`,{className:Y9.documentScope,children:[(0,M.jsx)(`legend`,{className:`sr-only`,children:`Security Role Options`}),[`onlyTablesInCurrentSolution`,`onlyCustomTables`].map(e=>(0,M.jsxs)(`label`,{className:Y9.generateToggle,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:y.securityRoleFilters[e],onChange:()=>mt({securityRoleFilters:{[e]:!y.securityRoleFilters[e]}})}),(0,M.jsx)(`span`,{children:e===`onlyTablesInCurrentSolution`?`Only tables in current solution`:`Only custom tables`})]},e))]})]}),(0,M.jsxs)(`details`,{className:Y9.optionDetails,children:[(0,M.jsx)(`summary`,{children:`Diagram Options`}),(0,M.jsxs)(`fieldset`,{className:Y9.documentScope,children:[(0,M.jsx)(`legend`,{className:`sr-only`,children:`Diagram Options`}),(0,M.jsxs)(`label`,{className:Y9.generateToggle,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:y.separateDiagramsDocument,onChange:()=>mt({separateDiagramsDocument:!y.separateDiagramsDocument})}),(0,M.jsx)(`span`,{children:`Generate companion diagrams document`})]}),(0,M.jsxs)(`label`,{className:Y9.optionField,children:[`Mermaid diagram colours`,(0,M.jsxs)(`select`,{value:y.diagramColourTheme,onChange:e=>mt({diagramColourTheme:e.target.value}),children:[(0,M.jsx)(`option`,{value:`neutral`,children:`Neutral`}),(0,M.jsx)(`option`,{value:`default`,children:`Default`}),(0,M.jsx)(`option`,{value:`dark`,children:`Dark`}),(0,M.jsx)(`option`,{value:`forest`,children:`Forest`}),(0,M.jsx)(`option`,{value:`base`,children:`Base`})]})]})]})]}),(0,M.jsx)(`div`,{className:Y9.generateFooter,role:`region`,"aria-label":`Generate documentation`,children:re===`local`?(0,M.jsxs)(`button`,{type:`button`,className:Y9.generatePrimaryBtn,onClick:ht,disabled:!Dt,children:[`Generate Documentation (`,Te.length,`)`]}):(0,M.jsxs)(`button`,{type:`button`,className:Y9.generatePrimaryBtn,onClick:rt,disabled:!Ot,children:[`Generate Selected (`,ye.length,`)`]})})]}),re===`local`?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:Y9.dropZoneWrapper,children:(0,M.jsx)(V,{onFilesSelected:nt,disabled:o,onQueueChange:Ee,showGenerateButton:!1},De)}),(0,M.jsxs)(`section`,{className:Y9.featureGrid,"aria-labelledby":`features-heading`,children:[(0,M.jsx)(`h3`,{id:`features-heading`,className:`sr-only`,children:`Supported components`}),[{icon:`🗃️`,label:`Tables & Columns`},{icon:`📋`,label:`Forms & Views`},{icon:`⚙️`,label:`Power Automate Flows`},{icon:`🔄`,label:`Classic Workflows & BPFs`},{icon:`🎨`,label:`Canvas & Model Apps`},{icon:`🌐`,label:`Web Resources (JS/TS/HTML)`},{icon:`🔒`,label:`Security Roles & CLS`},{icon:`🔌`,label:`Plugins & Plugin Steps`},{icon:`🔗`,label:`Connection References`},{icon:`⚙️`,label:`Environment Variables`},{icon:`📊`,label:`Reports & Dashboards`},{icon:`📈`,label:`Mermaid Diagrams`}].map(({icon:e,label:t})=>(0,M.jsxs)(`div`,{className:Y9.featureCard,children:[(0,M.jsx)(`span`,{className:Y9.featureIcon,"aria-hidden":`true`,children:e}),(0,M.jsx)(`span`,{className:Y9.featureLabel,children:t})]},t))]})]}):(0,M.jsx)(ne,{solutions:Ft,publisherOptions:Pt,selectedPublishers:_e,selectedSolutionIds:ye,search:de,sort:pe,managedFilter:he,isLoading:ce,error:H,busySolutionIds:Ce,onSearchChange:fe,onSortChange:me,onManagedFilterChange:ge,onTogglePublisher:at,onSelectAllPublishers:ot,onClearPublishers:st,onToggleSolution:ct,onSelectAllVisibleSolutions:It,onClearSelectedSolutions:lt,onRefresh:()=>{Ze()}})]})}),o&&(0,M.jsxs)(`section`,{className:Y9.processingSection,"aria-labelledby":`processing-heading`,"aria-busy":`true`,children:[(0,M.jsx)(`h2`,{id:`processing-heading`,className:Y9.processingHeading,children:`Processing solutions…`}),(0,M.jsx)(`div`,{className:Y9.progressList,children:i.map(e=>(0,M.jsx)(`div`,{className:Y9.progressItem,children:e.error?(0,M.jsxs)(`div`,{role:`alert`,className:Y9.progressError,children:[(0,M.jsx)(`span`,{"aria-hidden":`true`,children:`❌`}),` `,e.fileName,`: `,e.error]}):(0,M.jsx)(ie,{value:e.progress,label:e.fileName,showLabel:!0})},e.fileName))})]}),!o&&i.some(e=>e.error)&&(0,M.jsx)(`div`,{role:`alert`,className:Y9.errorSummary,children:i.filter(e=>e.error).map(e=>(0,M.jsxs)(`p`,{className:Y9.errorLine,children:[`❌ `,(0,M.jsx)(`strong`,{children:e.fileName}),`: `,e.error]},e.fileName))}),Et&&At&&!o&&(0,M.jsx)(`div`,{className:Y9.viewerWrapper,children:ee?(0,M.jsx)(`div`,{className:Y9.viewerLoadingState,role:`status`,"aria-live":`polite`,"aria-busy":`true`,children:(0,M.jsxs)(`div`,{className:Y9.viewerLoadingCard,children:[(0,M.jsx)(`span`,{className:Y9.viewerLoadingSpinner,"aria-hidden":`true`}),(0,M.jsx)(`p`,{className:Y9.viewerLoadingText,children:`Please Wait - rendering markdown document...`})]})}):(0,M.jsx)(AVt,{markdown:B&&At.diagramsMarkdown?At.diagramsMarkdown:At.markdown,title:B?`${At.solution.metadata.displayName||At.solution.metadata.uniqueName}: Diagrams`:At.solution.metadata.displayName||At.solution.metadata.uniqueName,onExport:vt,onExportHtml:yt,onExportExcel:bt,onExportPdf:xt,diagramColourTheme:y.diagramColourTheme})}),Et&&!o&&re&&(0,M.jsxs)(`details`,{className:Y9.addMoreDetails,children:[(0,M.jsx)(`summary`,{className:Y9.addMoreSummary,children:`+ Generate More Documentation`}),(0,M.jsxs)(`div`,{className:Y9.addMoreBody,children:[(0,M.jsxs)(`section`,{className:Y9.generatePanel,"aria-labelledby":`generate-more-heading`,children:[(0,M.jsxs)(`div`,{className:Y9.generatePanelHeader,children:[(0,M.jsx)(`h3`,{id:`generate-more-heading`,className:Y9.generatePanelHeading,children:`Generate More Documentation`}),(0,M.jsx)(`p`,{className:Y9.generatePanelSubtitle,children:`Apply generation settings and create additional documents from your current mode.`})]}),(0,M.jsxs)(`div`,{className:Y9.generatePanelActions,children:[re===`local`?(0,M.jsxs)(`button`,{type:`button`,className:Y9.generatePrimaryBtn,onClick:ht,disabled:!Dt,children:[`Generate Documentation (`,Te.length,`)`]}):(0,M.jsxs)(`button`,{type:`button`,className:Y9.generatePrimaryBtn,onClick:rt,disabled:!Ot,children:[`Generate Selected (`,ye.length,`)`]}),(0,M.jsxs)(`label`,{className:Y9.generateToggle,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:p,onChange:dt}),(0,M.jsx)(`span`,{children:`Generate Diagrams`})]}),(0,M.jsxs)(`label`,{className:Y9.generateToggle,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:h,onChange:ft}),(0,M.jsx)(`span`,{children:`Include Default Columns`})]})]})]}),re===`local`&&(0,M.jsxs)(`div`,{className:Y9.addMoreSubsection,children:[(0,M.jsx)(`h4`,{className:Y9.addMoreSubheading,children:`Add More Solution Files`}),(0,M.jsx)(V,{onFilesSelected:nt,disabled:o,onQueueChange:Ee,showGenerateButton:!1},`add-more-${De}`)]}),re===`dataverse`&&(0,M.jsxs)(`div`,{className:Y9.addMoreSubsection,children:[(0,M.jsx)(`h4`,{className:Y9.addMoreSubheading,children:`Add More Solutions from Dataverse`}),(0,M.jsx)(ne,{solutions:Ft,publisherOptions:Pt,selectedPublishers:_e,selectedSolutionIds:ye,search:de,sort:pe,managedFilter:he,isLoading:ce,error:H,busySolutionIds:Ce,onSearchChange:fe,onSortChange:me,onManagedFilterChange:ge,onTogglePublisher:at,onSelectAllPublishers:ot,onClearPublishers:st,onToggleSolution:ct,onSelectAllVisibleSolutions:It,onClearSelectedSolutions:lt,onRefresh:()=>{Ze()}})]})]})]})]})]}),ke&&(0,M.jsx)(`div`,{className:Y9.modalBackdrop,role:`presentation`,children:(0,M.jsxs)(`div`,{className:Y9.modalDialog,role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":`invalid-archive-title`,"aria-describedby":`invalid-archive-body`,children:[(0,M.jsx)(`h2`,{id:`invalid-archive-title`,className:Y9.modalTitle,children:`Invalid ZIP Archive`}),(0,M.jsx)(`p`,{id:`invalid-archive-body`,className:Y9.modalBody,children:ke}),(0,M.jsx)(`button`,{ref:Ie,type:`button`,className:Y9.modalOkBtn,onClick:()=>Ae(null),children:`OK`})]})}),(0,M.jsxs)(`footer`,{className:Y9.footer,role:`contentinfo`,children:[(0,M.jsxs)(`div`,{className:Y9.footerLeft,children:[(0,M.jsx)(`span`,{children:`PP-MD - PPTB Edition: Power Platform Documentation Generator.`}),(0,M.jsxs)(`span`,{className:Y9.footerVersion,children:[`Version `,Ge]}),(0,M.jsxs)(`a`,{href:W4t,target:`_blank`,rel:`noreferrer`,className:Y9.iconLink,onMouseDown:ze,onClick:Be,children:[(0,M.jsx)(`img`,{src:z4t,className:Y9.linkIcon,alt:``,"aria-hidden":`true`}),(0,M.jsx)(`span`,{children:`GitHub Repo`})]})]}),(0,M.jsx)(`div`,{className:Y9.footerRight,children:(0,M.jsx)(`span`,{children:re===`dataverse`?`PP-MD - PPTB Edition reads solution metadata from the active Dataverse environment through Power Platform ToolBox. No information is uploaded to the environment and only solution data is retrieved in read-only mode.`:`All local ZIP processing happens on your PC; your solution data never leaves your machine.`})})]})]})}var s3t=document.getElementById(`root`);if(!s3t)throw Error(`PP-MD - PPTB Edition: Could not find #root element. Ensure index.html contains <div id="root"></div>.`);(0,S.createRoot)(s3t).render((0,M.jsx)(x.StrictMode,{children:(0,M.jsx)(I,{children:(0,M.jsx)(o3t,{})})}));
|
|
4235
|
+
`)){if(t===``){o.push(``);continue}let n=t;for(;e.pdf.getTextWidth(n)>i;){let t=n.length;for(;t>1&&e.pdf.getTextWidth(n.slice(0,t))>i;)--t;let r=n.lastIndexOf(` `,t),a=r>10?r:t;o.push(n.slice(0,a)),n=n.slice(a).replace(/^ /,``)}o.push(n)}let s=0;for(;s<o.length;){K9(e,23.475);let t=Math.max(1,Math.floor((e.pageHeight-e.marginBottom-e.y-12)/r)),i=o.slice(s,s+t),a=i.length*r+12;e.pdf.setFillColor(244,244,248),e.pdf.setDrawColor(208,211,219),e.pdf.rect(e.x0,e.y,e.xw,a,`FD`),e.pdf.setFont(`courier`,`normal`),e.pdf.setFontSize(n),e.pdf.setTextColor(26,26,46);let l=e.y+6+n*.8;for(let t of i)e.pdf.text(t||` `,e.x0+6,l),l+=r;e.y+=a+2,s+=i.length}e.y+=6}function T4t(e,t){let n=t.match(/%%\s*(.+?)\s*%%/)?.[1]??`Diagram`,r=e.diagramImages[e.diagramIndex]??null;if(e.diagramIndex+=1,K9(e,20),e.pdf.setFont(`helvetica`,`italic`),e.pdf.setFontSize(9.5),e.pdf.setTextColor(90,94,108),e.pdf.text(V9(`Diagram: ${n}`),e.x0,e.y),e.y+=14,!r){w4t(e,{lang:`text`,value:`[Diagram could not be rendered for export]\n\n${t}`});return}try{let t=e.pdf.getImageProperties(r),n=e.xw,i=t.height/t.width*n,a=e.pageHeight-e.marginTop-e.marginBottom;i>a&&(i=a,n=t.width/t.height*i),K9(e,i);let o=e.x0+(e.xw-n)/2;e.pdf.addImage(r,`PNG`,o,e.y,n,i,void 0,`FAST`),e.y+=i+10}catch{w4t(e,{lang:`text`,value:t})}}function q9(e,t,n,r,i,a,o,s,l){l&&(e.pdf.setFillColor(240,242,245),e.pdf.rect(e.x0,e.y,e.xw,i,`F`));let u=e.x0;for(let l=0;l<n;l+=1){e.pdf.setDrawColor(193,196,206),e.pdf.rect(u,e.y,r,i,`S`);let n=e.y+s+a*.72;for(let r of t[l]??[]){let t=u+s;for(let i of r)W9(e.pdf,i.style),e.pdf.setFontSize(a),e.pdf.setTextColor(26,26,46),e.pdf.text(i.text,t,n),t+=e.pdf.getTextWidth(i.text);n+=o}u+=r}e.y+=i}async function E4t(e,t){let n=t.children;if(!n.length)return;let r=n[0].children.length;if(r===0)return;let i=9.5,a=i*1.3,o=e.xw/r,s=(t,n)=>t.map(t=>{let r=U9(H9(t.children,n?{bold:!0}:{}));return G9(e.pdf,r,o-10,i)}),l=s(n[0].children,!0),u=Math.max(...l.map(e=>e.length),1)*a+10;K9(e,u+a+10),q9(e,l,r,o,u,i,a,5,!0);for(let t=1;t<n.length;t+=1){let d=s(n[t].children,!1),f=Math.max(...d.map(e=>e.length),1)*a+10;e.y+f>e.pageHeight-e.marginBottom&&(e.pdf.addPage(),e.y=e.marginTop,q9(e,l,r,o,u,i,a,5,!0)),q9(e,d,r,o,f,i,a,5,!1),t%40==0&&await _4t()}e.y+=8}function D4t(e,t){let n=[...t.matchAll(/<tr>([\s\S]*?)<\/tr>/gi)].map(e=>[...e[1].matchAll(/<td>([\s\S]*?)<\/td>/gi)].map(e=>V9(h4t(e[1]).trim()))).filter(e=>e.some(e=>e.length>0));if(!n.length)return;let r=Math.max(...n.map(e=>e.length)),i=e.xw/r;for(let t of n){let n=Array.from({length:r},(n,r)=>{let a=U9([{text:t[r]??``,style:{bold:r===0}}]);return G9(e.pdf,a,i-10,10)}),a=Math.max(...n.map(e=>e.length),1)*13+10;K9(e,a),q9(e,n,r,i,a,10,13,5,!1)}e.y+=8}async function O4t(e,t,n){switch(t.type){case`heading`:y4t(e,t);break;case`paragraph`:b4t(e,t,n);break;case`list`:await S4t(e,t);break;case`table`:await E4t(e,t);break;case`code`:w4t(e,t);break;case`blockquote`:await C4t(e,t);break;case`thematicBreak`:x4t(e);break;case`html`:{let n=t.value??``;/<table/i.test(n)&&D4t(e,n);break}}}function k4t(e){return Ao().use(Vi).use(Xl).parse(e)}function A4t(e,t){let n=e.x0+e.xw/2;e.pdf.setFont(`helvetica`,`bold`),e.pdf.setFontSize(26),e.pdf.setTextColor(26,26,46);let r=e.pdf.splitTextToSize(V9(t),e.xw),i=e.pageHeight/2-r.length*32/2;for(let t of r)e.pdf.text(t,n,i,{align:`center`}),i+=32;e.pdf.setFont(`helvetica`,`normal`),e.pdf.setFontSize(11),e.pdf.setTextColor(90,94,108),e.pdf.text(`Power Platform solution documentation`,n,i+12,{align:`center`}),e.pdf.text(`Generated ${new Date().toLocaleString()}`,n,i+30,{align:`center`})}function j4t(e,t){let n=e.getNumberOfPages(),r=e.internal.pageSize.getWidth(),i=e.internal.pageSize.getHeight();for(let a=2;a<=n;a+=1)e.setPage(a),e.setFont(`helvetica`,`normal`),e.setFontSize(8.5),e.setTextColor(140,143,156),e.text(V9(t),46,i-24),e.text(`Page ${a-1} of ${n-1}`,r-46,i-24,{align:`right`})}async function M4t(e,t,n=[]){let r=k4t(e),i=new c9({orientation:`portrait`,unit:`pt`,format:`a4`,compress:!0});i.setProperties({title:t,subject:`Power Platform solution documentation`});let a=i.internal.pageSize.getWidth(),o=i.internal.pageSize.getHeight(),s={pdf:i,x0:46,xw:a-92,y:54,pageHeight:o,marginTop:54,marginBottom:50,diagramImages:n,diagramIndex:0};A4t(s,t||`PP-MD Documentation`),i.addPage(),s.y=54;let l=0;for(let e of r.children)await O4t(s,e),l+=1,l%15==0&&await _4t();return j4t(i,t||`PP-MD Documentation`),i.output(`blob`)}async function N4t(e,t){await A(e,t.endsWith(`.md`)?t:`${t}.md`,`text/markdown`)}async function P4t(e,t){await A(e,t.endsWith(`.zip`)?t:`${t}.zip`,`application/zip`)}async function F4t(e,t){await A(e,t.endsWith(`.html`)?t:`${t}.html`,`text/html`)}async function I4t(e,t){let n=t.endsWith(`.xlsx`)?t:`${t}.xlsx`;await A(ZGt(e),n,`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`)}async function L4t(e,t,n,r=[]){let i=n.endsWith(`.pdf`)?n:`${n}.pdf`;await A(await M4t(e,t,r),i,`application/pdf`)}var R4t=``+new URL(`pp-md-icon-Dgg8-GAC.svg`,import.meta.url).href,z4t=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='currentColor'%20aria-hidden='true'%3e%3cpath%20d='M12%20.5C5.65.5.5%205.65.5%2012c0%205.1%203.3%209.42%207.88%2010.95.58.1.8-.25.8-.56%200-.28-.01-1.2-.02-2.17-3.2.7-3.88-1.36-3.88-1.36-.52-1.33-1.28-1.68-1.28-1.68-1.04-.71.08-.7.08-.7%201.16.08%201.77%201.19%201.77%201.19%201.02%201.76%202.68%201.25%203.33.96.1-.74.4-1.25.72-1.53-2.55-.29-5.22-1.27-5.22-5.66%200-1.25.45-2.28%201.18-3.08-.12-.3-.51-1.5.11-3.13%200%200%20.96-.3%203.15%201.17a10.9%2010.9%200%200%201%205.74%200c2.18-1.48%203.14-1.17%203.14-1.17.62%201.63.24%202.83.12%203.13.74.8%201.18%201.83%201.18%203.08%200%204.4-2.68%205.37-5.24%205.66.41.35.78%201.03.78%202.08%200%201.5-.01%202.72-.01%203.09%200%20.31.21.67.8.56A11.52%2011.52%200%200%200%2023.5%2012C23.5%205.65%2018.35.5%2012%20.5Z'/%3e%3c/svg%3e`,J9={name:`@hart365/pp-md-pptb-edition`,version:`1.1.5`,displayName:`PP-MD Power Platform Markdown Document Generator`,description:`Generate Power Platform documentation from either Solution ZIP files or direct Dataverse connection`,author:`Mike Hartley`,contributors:[{name:`Mike Hartley`,url:`https://HartOfTheMidlands.co.uk`}],type:`module`,main:`index.html`,icon:`icons/pp-md.svg`,configurations:{repository:`https://github.com/Hart365/pp-md-pptb-edition`,readmeUrl:`https://raw.githubusercontent.com/Hart365/pp-md-pptb-edition/refs/heads/main/README.md`,website:`https://github.com/Hart365/pp-md-pptb-edition`},cspExceptions:{"connect-src":[{domain:`api.github.com`,exceptionReason:`Optionally checks GitHub Releases when the user requests an update check.`,optional:!0}]},features:{multiConnection:`none`,connectionRequirement:`optional`,minAPI:`1.2.2`},files:[`dist`,`LICENSE`,`README.md`],scripts:{dev:`vite`,build:`tsc && vite build && node scripts/normalize-dist-assets.mjs`,"build:with-maps":`tsc && vite build --mode debug && node scripts/normalize-dist-assets.mjs`,preview:`vite preview`,validate:`node node_modules/@pptb/validate/dist/cli.js`,"validate:offline":`node scripts/validate-offline.cjs`,"validate:dist":`node scripts/validate-dist.cjs`,"validate:publish":`npm run validate:offline && npm run build && npm run validate:dist && npm pack --dry-run`,"test:contrast":`node scripts/check-contrast.mjs`,lint:`eslint src --report-unused-disable-directives --max-warnings 0`,format:`eslint src --fix`,"type-check":`tsc --noEmit`,"test:unit":`vitest run`,test:`npm run validate:offline && npm run lint && npm run type-check && npm run test:unit && npm run test:contrast && npm run build && npm run validate:dist`,"finalize-package":`npm run validate:publish`},dependencies:{dompurify:`^3.4.15`,"fast-xml-parser":`^5.11.1`,jspdf:`4.2.1`,jszip:`^3.10.1`,mermaid:`^11.17.2`,react:`^19.2.8`,"react-dom":`^19.2.8`,"react-markdown":`^10.1.0`,"rehype-raw":`^7.0.0`,"rehype-sanitize":`^6.0.0`,"remark-gfm":`^4.0.1`,"remark-parse":`^11.0.0`,unified:`^11.0.5`,"xlsx-js-style":`1.2.0`},devDependencies:{"@eslint/js":`^10.0.1`,"@pptb/types":`^1.2.5`,"@pptb/validate":`1.0.2`,"@types/mdast":`^4.0.4`,"@types/react":`^19.2.18`,"@types/react-dom":`^19.2.7`,"@vitejs/plugin-react":`^6.1.1`,eslint:`^10.10.0`,"eslint-plugin-react-hooks":`^7.1.1`,globals:`^17.12.0`,typescript:`^6.0.3`,"typescript-eslint":`^8.69.0`,vite:`^8.2.2`,vitest:`^5.0.0`},overrides:{katex:`0.18.2`},repository:{type:`git`,url:`https://github.com/Hart365/pp-md-pptb-edition.git`},homepage:`https://github.com/Hart365/pp-md-pptb-edition#readme`,bugs:{url:`https://github.com/Hart365/pp-md-pptb-edition/issues`},keywords:[`powerplatform`,`documentation`,`dataverse`,`solution`,`markdown`],license:`MIT`},Y9={appRoot:`_appRoot_ap0ia_17`,skipLink:`_skipLink_ap0ia_43`,header:`_header_ap0ia_87`,headerInner:`_headerInner_ap0ia_107`,headerLeft:`_headerLeft_ap0ia_127`,headerCenter:`_headerCenter_ap0ia_143`,headerRight:`_headerRight_ap0ia_151`,brand:`_brand_ap0ia_161`,brandCopy:`_brandCopy_ap0ia_177`,brandIcon:`_brandIcon_ap0ia_189`,brandName:`_brandName_ap0ia_203`,brandTagline:`_brandTagline_ap0ia_221`,connectionText:`_connectionText_ap0ia_235`,headerActions:`_headerActions_ap0ia_251`,menuToggle:`_menuToggle_ap0ia_267`,headerGroup:`_headerGroup_ap0ia_295`,headerExportGroup:`_headerExportGroup_ap0ia_317`,headerBtn:`_headerBtn_ap0ia_325`,headerBtnActive:`_headerBtnActive_ap0ia_371`,headerExportMenu:`_headerExportMenu_ap0ia_381`,headerExportLabel:`_headerExportLabel_ap0ia_419`,headerDropdownArrow:`_headerDropdownArrow_ap0ia_421`,headerExportPanel:`_headerExportPanel_ap0ia_433`,menuBtn:`_menuBtn_ap0ia_473`,statusRegion:`_statusRegion_ap0ia_511`,body:`_body_ap0ia_535`,main:`_main_ap0ia_555`,mainWithViewer:`_mainWithViewer_ap0ia_577`,welcomeSection:`_welcomeSection_ap0ia_601`,welcomeHeading:`_welcomeHeading_ap0ia_619`,welcomeSubtitle:`_welcomeSubtitle_ap0ia_633`,modeVersion:`_modeVersion_ap0ia_647`,dropZoneWrapper:`_dropZoneWrapper_ap0ia_659`,modeGrid:`_modeGrid_ap0ia_667`,modeCard:`_modeCard_ap0ia_679`,modeCardTitle:`_modeCardTitle_ap0ia_719`,modeCardBody:`_modeCardBody_ap0ia_729`,modeBranding:`_modeBranding_ap0ia_739`,modeBrandIcon:`_modeBrandIcon_ap0ia_759`,modeBrandTitle:`_modeBrandTitle_ap0ia_769`,modeBrandByline:`_modeBrandByline_ap0ia_783`,modeBrandLinks:`_modeBrandLinks_ap0ia_793`,modeCallout:`_modeCallout_ap0ia_827`,modeActions:`_modeActions_ap0ia_847`,contextPanel:`_contextPanel_ap0ia_859`,contextHeading:`_contextHeading_ap0ia_879`,contextRow:`_contextRow_ap0ia_889`,contextSelectRow:`_contextSelectRow_ap0ia_901`,contextLabel:`_contextLabel_ap0ia_913`,contextSelect:`_contextSelect_ap0ia_901`,contextDeleteBtn:`_contextDeleteBtn_ap0ia_945`,contextWarning:`_contextWarning_ap0ia_989`,contextSaveRow:`_contextSaveRow_ap0ia_1005`,contextNameInput:`_contextNameInput_ap0ia_1017`,contextSaveBtn:`_contextSaveBtn_ap0ia_1039`,contextGrid:`_contextGrid_ap0ia_1063`,contextField:`_contextField_ap0ia_1075`,generatePanel:`_generatePanel_ap0ia_1109`,generatePanelHeader:`_generatePanelHeader_ap0ia_1129`,generatePanelHeading:`_generatePanelHeading_ap0ia_1141`,generatePanelSubtitle:`_generatePanelSubtitle_ap0ia_1151`,generatePanelActions:`_generatePanelActions_ap0ia_1163`,generatePrimaryBtn:`_generatePrimaryBtn_ap0ia_1177`,generateToggle:`_generateToggle_ap0ia_1221`,documentScope:`_documentScope_ap0ia_1249`,optionDetails:`_optionDetails_ap0ia_1271`,generateFooter:`_generateFooter_ap0ia_1315`,optionField:`_optionField_ap0ia_1351`,logoGrid:`_logoGrid_ap0ia_1399`,logoCard:`_logoCard_ap0ia_1411`,logoTitle:`_logoTitle_ap0ia_1429`,logoPreview:`_logoPreview_ap0ia_1441`,logoActions:`_logoActions_ap0ia_1459`,logoUploadBtn:`_logoUploadBtn_ap0ia_1469`,logoClearBtn:`_logoClearBtn_ap0ia_1471`,hiddenInput:`_hiddenInput_ap0ia_1509`,featureGrid:`_featureGrid_ap0ia_1519`,featureCard:`_featureCard_ap0ia_1531`,featureIcon:`_featureIcon_ap0ia_1555`,featureLabel:`_featureLabel_ap0ia_1567`,processingSection:`_processingSection_ap0ia_1581`,processingHeading:`_processingHeading_ap0ia_1599`,progressList:`_progressList_ap0ia_1611`,progressItem:`_progressItem_ap0ia_1623`,progressError:`_progressError_ap0ia_1631`,errorSummary:`_errorSummary_ap0ia_1653`,errorLine:`_errorLine_ap0ia_1675`,viewerWrapper:`_viewerWrapper_ap0ia_1691`,viewerLoadingState:`_viewerLoadingState_ap0ia_1711`,viewerLoadingCard:`_viewerLoadingCard_ap0ia_1733`,viewerLoadingSpinner:`_viewerLoadingSpinner_ap0ia_1755`,viewerSpin:`_viewerSpin_ap0ia_1`,viewerLoadingText:`_viewerLoadingText_ap0ia_1773`,addMoreDetails:`_addMoreDetails_ap0ia_1805`,addMoreSummary:`_addMoreSummary_ap0ia_1817`,addMoreBody:`_addMoreBody_ap0ia_1847`,addMoreSubsection:`_addMoreSubsection_ap0ia_1863`,addMoreSubheading:`_addMoreSubheading_ap0ia_1879`,modalBackdrop:`_modalBackdrop_ap0ia_1891`,modalDialog:`_modalDialog_ap0ia_1911`,modalTitle:`_modalTitle_ap0ia_1935`,modalBody:`_modalBody_ap0ia_1947`,modalOkBtn:`_modalOkBtn_ap0ia_1959`,footer:`_footer_ap0ia_2007`,footerLeft:`_footerLeft_ap0ia_2033`,footerRight:`_footerRight_ap0ia_2049`,footerVersion:`_footerVersion_ap0ia_2061`,iconLink:`_iconLink_ap0ia_2069`,linkIcon:`_linkIcon_ap0ia_2093`,headerMenuOpen:`_headerMenuOpen_ap0ia_2195`},X9=`pp-md-pptb-edition-doc-configurations`,Z9=`pp-md-pptb-edition-hidden-doc-configuration-ids`,B4t=`pp-md-pptb-edition-dataverse-collection-policy`,V4t=`solutionOnly`,H4t={client:``,project:``,contract:``,sow:``,sprint:``,releaseDate:``},U4t=J9.version,W4t=J9.configurations?.repository||(typeof J9.repository==`string`?J9.repository:J9.repository?.url?.replace(/^git\+/,``).replace(/\.git$/,``))||`https://github.com`,G4t=`https://HartOfTheMidlands.co.uk`;function Q9(e,t){return(e||t).trim().replace(/[^\w\s.-]/g,``).replace(/\s+/g,`_`)}function K4t(e){return(e.metadata.displayName||e.metadata.uniqueName||``).trim()}function q4t(e){return[...e].sort((e,t)=>K4t(e.solution).localeCompare(K4t(t.solution),void 0,{numeric:!0,sensitivity:`base`}))}function J4t(e){return[...e].sort((e,t)=>e.name.localeCompare(t.name,void 0,{numeric:!0,sensitivity:`base`}))}function Y4t(e){return{peerGapFillApplied:e.peerGapFillApplied,dataverseMetadataEnriched:e.dataverseMetadataEnriched}}function X4t(e){return/invalid|zip|archive|solution\.xml|central directory/i.test(e)}async function Z4t(){if(C()){let e=await E(X9);return Array.isArray(e)?e.filter(e=>!!e?.id&&!!e?.name):[]}try{let e=localStorage.getItem(X9);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t.filter(e=>typeof e==`object`&&!!e).map(e=>e).filter(e=>!!e.id&&!!e.name):[]}catch{return[]}}async function Q4t(e){if(C()){await D(X9,e);return}try{localStorage.setItem(X9,JSON.stringify(e))}catch{}}async function $4t(){if(C()){let e=await E(Z9);return Array.isArray(e)?e.filter(e=>typeof e==`string`&&e.trim().length>0):[]}try{let e=localStorage.getItem(Z9);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t.filter(e=>typeof e==`string`&&e.trim().length>0):[]}catch{return[]}}async function e3t(e){if(C()){await D(Z9,e);return}try{localStorage.setItem(Z9,JSON.stringify(e))}catch{}}function t3t(e,t,n){let r=EWt(e.map(e=>e.solution)),i={peerGapFillApplied:e.some(e=>e.peerGapFillApplied),dataverseMetadataEnriched:e.some(e=>e.dataverseMetadataEnriched)},a=x6(r,{erdMode:t.erdMode,documentContext:n,enrichmentIndicators:i,includeDiagrams:t.includeDiagrams,includeDefaultColumns:t.includeDefaultColumns,scope:t.scope,documentationSettings:t.documentationSettings}),o=t.includeDiagrams?tGt(a,`All Selected Solutions: Diagrams`):void 0;return{solution:r,markdown:t.includeDiagrams?x6(r,{erdMode:t.erdMode,documentContext:n,enrichmentIndicators:i,includeDiagrams:!1,includeDefaultColumns:t.includeDefaultColumns,scope:t.scope,documentationSettings:t.documentationSettings}):a,fileName:`all-selected-solutions.md`,isConsolidated:!0,diagramsMarkdown:o,peerGapFillApplied:i.peerGapFillApplied,dataverseMetadataEnriched:i.dataverseMetadataEnriched}}function n3t(e,t,n,r){let i=x6(e,{erdMode:t.erdMode,documentContext:n,enrichmentIndicators:r,includeDiagrams:t.includeDiagrams,includeDefaultColumns:t.includeDefaultColumns,scope:t.scope,documentationSettings:t.documentationSettings}),a=t.includeDiagrams&&(t.documentationSettings.separateDiagramsDocument||a3t(i)),o=a?tGt(i,`${e.metadata.displayName||e.metadata.uniqueName}: Diagrams`):void 0;return{markdown:a?x6(e,{erdMode:t.erdMode,documentContext:n,enrichmentIndicators:r,includeDiagrams:!1,includeDefaultColumns:t.includeDefaultColumns,scope:t.scope,documentationSettings:t.documentationSettings}):i,diagramsMarkdown:o||void 0}}function r3t(e,t,n){let r=q4t(e.filter(e=>!e.isConsolidated)).map((e,r,i)=>{let a=i.filter((e,t)=>t!==r).map(e=>e.solution),o=OWt(e.solution,a),s=n3t(o,t,n,Y4t({peerGapFillApplied:a.length>0,dataverseMetadataEnriched:e.dataverseMetadataEnriched}));return{...e,solution:o,peerGapFillApplied:a.length>0,markdown:s.markdown,diagramsMarkdown:s.diagramsMarkdown}});return r.length>1?[...r,t3t(r,t,n)]:r}function i3t(e){for(let t=e.length-1;t>=0;--t)if(!e[t].isConsolidated)return t;return 0}function $9(e,t,n){return r3t(e.filter(e=>!e.isConsolidated),t,n)}function a3t(e){let t=(e.match(/^#{2,6}\s+/gm)??[]).length,n=(e.match(/^\|.*\|\s*$/gm)??[]).length,r=(e.match(/```mermaid/g)??[]).length;return e.length>=45e3||t>=80||n>=250||r>=6}function o3t(){let[e,t]=(0,x.useState)([]),[n,r]=(0,x.useState)(0),[i,a]=(0,x.useState)([]),[o,s]=(0,x.useState)(!1),[l,u]=(0,x.useState)(``),[d,f]=(0,x.useState)(`detailed-relationships`),[p,m]=(0,x.useState)(!0),[h,g]=(0,x.useState)(!0),[_,v]=(0,x.useState)(oWt),[y,b]=(0,x.useState)(e6),[S,T]=(0,x.useState)(H4t),[O,A]=(0,x.useState)([]),[j,N]=(0,x.useState)(`custom`),[P,F]=(0,x.useState)(``),[I,R]=(0,x.useState)(``),[ee,z]=(0,x.useState)(!1),[B,te]=(0,x.useState)(!1),[re,ae]=(0,x.useState)(null),[oe,se]=(0,x.useState)([]),[ce,le]=(0,x.useState)(!1),[H,ue]=(0,x.useState)(``),[de,fe]=(0,x.useState)(``),[pe,me]=(0,x.useState)(`name-asc`),[he,ge]=(0,x.useState)(`all`),[_e,ve]=(0,x.useState)([]),[ye,be]=(0,x.useState)([]),[xe,Se]=(0,x.useState)(V4t),[Ce,we]=(0,x.useState)([]),[Te,Ee]=(0,x.useState)([]),[De,Oe]=(0,x.useState)(0),[ke,Ae]=(0,x.useState)(null),[je,Me]=(0,x.useState)(!1),[Ne,Pe]=(0,x.useState)(!1),Fe=(0,x.useRef)(null),Ie=(0,x.useRef)(null),Le=(0,x.useRef)(null),Re=(0,x.useMemo)(()=>({erdMode:d,includeDiagrams:p,includeDefaultColumns:h,scope:_,documentationSettings:y}),[d,p,h,_,y]),ze=(0,x.useCallback)(e=>{e.currentTarget.dataset.ppmdArmed=`true`},[]),Be=(0,x.useCallback)(e=>{let t=e.currentTarget,n=t.dataset.ppmdArmed===`true`,r=t.href;if(delete t.dataset.ppmdArmed,e.detail!==0&&!n){e.preventDefault(),e.stopPropagation();return}C()&&(e.preventDefault(),k(r))},[]),{connection:Ve,isLoading:He,isInPPTB:Ue,initializeConnection:We}=WGt({autoInitConnection:!1}),Ge=window.__PPMD_VERSION__||U4t;(0,x.useEffect)(()=>{if(!Ue)return;let e=window.setTimeout(()=>{We()},0);return()=>{window.clearTimeout(e)}},[Ue,We]),(0,x.useEffect)(()=>{let e=!0;return(async()=>{try{let t=await E(B4t);if(!e)return;(t===`solutionOnly`||t===`solutionAndDirectReferences`||t===`environmentAppendix`)&&Se(t)}catch{}})(),()=>{e=!1}},[]),(0,x.useEffect)(()=>{D(B4t,xe)},[xe]),(0,x.useEffect)(()=>{let e=!0;return(async()=>{let t=await Z4t(),n=new Set(await $4t());try{let r=await fetch(`./doc-configurations.json`,{cache:`no-store`});if(!r.ok)throw Error(`HTTP ${r.status}`);let i=await r.json();if(!Array.isArray(i.configurations))throw Error(`Invalid configuration shape`);if(!e)return;A([...i.configurations,...t].filter(e=>!n.has(e.id))),F(``)}catch(r){if(!e)return;A(t.filter(e=>!n.has(e.id))),F(`Could not load doc-configurations.json: ${r.message}`)}})(),()=>{e=!1}},[]),(0,x.useEffect)(()=>{ke&&Ie.current?.focus()},[ke]);let Ke=(0,x.useCallback)(e=>{let n={client:e.client??``,project:e.project??``,contract:e.contract??``,sow:e.sow??``,sprint:e.sprint??``,releaseDate:e.releaseDate??``};T({client:n.client,project:n.project,contract:n.contract,sow:n.sow,sprint:n.sprint,releaseDate:n.releaseDate}),t(e=>$9(e,Re,n))},[Re]),qe=(0,x.useCallback)(e=>{let t=e.target.value;if(N(t),t===`custom`)return;let n=O.find(e=>e.id===t);n&&(Ke(n),R(n.name))},[O,Ke]),Je=(0,x.useCallback)((e,n)=>{let r={...S,[e]:n};N(`custom`),T(r),t(e=>$9(e,Re,r))},[S,Re]),Ye=(0,x.useCallback)(async()=>{let e=I.trim();if(!e){u(`Please enter a configuration name before saving.`);return}let t=`local-${Date.now()}`,n={id:t,name:e,client:S.client,project:S.project,contract:S.contract,sow:S.sow,sprint:S.sprint,releaseDate:S.releaseDate};await Q4t([...(await Z4t()).filter(t=>t.name.toLowerCase()!==e.toLowerCase()),n]),A(t=>[...t.filter(t=>t.name.toLowerCase()!==e.toLowerCase()),n]),N(t),u(`Configuration "${e}" saved.`)},[I,S]),Xe=(0,x.useCallback)(async e=>{if(e===`custom`)return;let t=O.find(t=>t.id===e);t&&(await e3t(Array.from(new Set([...await $4t(),e]))),e.startsWith(`local-`)&&await Q4t((await Z4t()).filter(t=>t.id!==e)),A(t=>t.filter(t=>t.id!==e)),j===e&&(N(`custom`),R(``)),u(`Configuration "${t.name}" deleted.`))},[O,j]),Ze=(0,x.useCallback)(async()=>{let e=Ve??await We();if(!e){se([]),ue(`No active Dataverse connection is available. Open or activate a connection in Power Platform ToolBox, then refresh this list.`);return}le(!0),ue(``);try{let t=await BGt();se(t),u(`Loaded ${t.length} solution${t.length===1?``:`s`} from ${e.name}.`);let n=Array.from(new Set(t.map(e=>e.publisherName?.trim()).filter(e=>!!e))).sort((e,t)=>e.localeCompare(t,void 0,{sensitivity:`base`}));ve(n),be([])}catch(e){let t=e instanceof Error?e.message:`Unable to read solutions from Dataverse.`;se([]),ve([]),be([]),ue(t),u(`Failed to load Dataverse solutions: ${t}`)}finally{le(!1)}},[Ve,We]),Qe=(0,x.useCallback)(e=>{ae(e),t([]),r(0),a([]),s(!1),ue(``),be([]),Ee([]),Oe(e=>e+1),u(e===`local`?`Local Solutions mode selected. Upload one or more solution ZIP files to continue.`:`Dataverse Connected mode selected. Choose a solution from the active environment to continue.`),e===`dataverse`&&Ze()},[Ze]),$e=(0,x.useCallback)(()=>{ae(null),t([]),r(0),a([]),s(!1),we([]),ve([]),be([]),Ee([]),Oe(e=>e+1),Ae(null),u(`Choose how you want to generate solution documentation.`)},[]),et=(0,x.useCallback)(async n=>{let i=n.target.files?.[0];if(n.target.value=``,i)try{let n=await i.text(),a=i.name.replace(/\.md$/i,``)||`Imported Markdown`,o={metadata:{uniqueName:a,displayName:a,version:``,publisherName:``,isManaged:!1},entities:[],optionSets:[],forms:[],views:[],processes:[],apps:[],webResources:[],securityRoles:[],fieldSecurityProfiles:[],connectionReferences:[],environmentVariables:[],emailTemplates:[],reports:[],dashboards:[],pluginAssemblies:[],warnings:[],agents:[],aiModels:[],desktopFlows:[],dataflows:[],customApis:[],offlineProfiles:[]};t(e=>[...e.filter(e=>!e.isConsolidated),{solution:o,markdown:n,fileName:i.name}]),r(e.filter(e=>!e.isConsolidated).length),u(`Opened ${i.name}.`)}catch{u(`Could not open ${i.name}.`)}},[e]),tt=(0,x.useCallback)((e,t)=>{a(n=>{if(!n[e])return n;let r=[...n];return r[e]=t(r[e]),r})},[]),nt=(0,x.useCallback)(async n=>{let i=J4t(n);s(!0),u(`Processing ${i.length} file${i.length>1?`s`:``}…`);let o=i.map(e=>({fileName:e.name,progress:0}));a(o);let l=[],f=[];for(let e=0;e<i.length;e++){let t=i[e];try{u(`Parsing ${t.name}…`);let n=await aWt(t,t=>{tt(e,e=>({...e,progress:t}))});u(`Generating documentation for ${t.name}…`);let r=x6(n,{erdMode:d,documentContext:S,includeDiagrams:p,includeDefaultColumns:h,scope:_,documentationSettings:y});l.push({solution:n,markdown:r,fileName:t.name}),tt(e,e=>({...e,progress:100}))}catch(n){let r=n.message??`Unknown error`;tt(e,e=>({...e,progress:0,error:r})),X4t(r)&&f.push(t.name)}}if(l.length>0){let n=r3t([...e.filter(e=>!e.isConsolidated),...l],Re,S);t(n),r(i3t(n));let a=l.length,o=i.length-a;u(o>0?`Done: ${a} document${a>1?`s`:``} generated, ${o} file${o>1?`s`:``} failed.`:`Done: ${a} document${a>1?`s`:``} generated successfully.`)}else u(`No documents generated. Check that the files are valid Power Platform solution ZIPs.`);s(!1),f.length>0&&Ae(f.length===1?`${f[0]} is not a valid Power Platform solution ZIP archive and was removed from the selection list.`:`${f.length} invalid ZIP archives were removed from the selection list.`),setTimeout(()=>a([]),1500)},[e,d,S,p,h,_,y,Re,tt]),rt=(0,x.useCallback)(async()=>{if(ye.length===0){ue(`Select at least one solution to generate documentation.`);return}let n=Ve??await We();if(!n){ue(`No active Dataverse connection is available. Open or activate a connection in Power Platform ToolBox and try again.`);return}let i=oe.filter(e=>ye.includes(e.solutionId));if(i.length===0){ue(`The selected solutions are no longer available. Refresh the list and try again.`);return}we(i.map(e=>e.solutionId)),s(!0),a(i.map(e=>({fileName:e.displayName,progress:0}))),u(`Reading ${i.length} solution${i.length===1?``:`s`} from ${n.name}...`);try{let n=[];for(let e=0;e<i.length;e+=1){let t=i[e],r=await HGt(t.solutionId,({message:t,percent:n})=>{u(t),tt(e,e=>({...e,progress:n}))},xe),a=x6(r,{erdMode:d,documentContext:S,includeDiagrams:p,includeDefaultColumns:h,scope:_,documentationSettings:y});n.push({solution:r,markdown:a,fileName:`${t.uniqueName}.dataverse`,dataverseMetadataEnriched:!1}),tt(e,e=>({...e,progress:100}))}let a=r3t(q4t([...e.filter(e=>!e.isConsolidated),...n]),Re,S);t(a),r(i3t(a)),u(`Documentation generated for ${n.length} Dataverse solution${n.length===1?``:`s`}.`),await w(`Documentation Ready`,`${n.length} Dataverse solution${n.length===1?``:`s`} documented.`,`success`,3e3)}catch(e){let t=e instanceof Error?e.message:`Unable to read the selected solution.`;a(e=>e.map(e=>({...e,error:t}))),u(`Failed to generate Dataverse documentation: ${t}`),await w(`Dataverse Read Failed`,t,`error`,4e3)}finally{we([]),s(!1),setTimeout(()=>a([]),1500)}},[Ve,oe,S,d,p,h,_,y,Re,We,e,ye,xe,tt]),it=(0,x.useCallback)(e=>{Se(e),u(`Dataverse collection policy set to ${e}.`)},[]),at=(0,x.useCallback)(e=>{ve(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),ot=(0,x.useCallback)(()=>{let e=Array.from(new Set(oe.map(e=>e.publisherName?.trim()).filter(e=>!!e))).sort((e,t)=>e.localeCompare(t,void 0,{sensitivity:`base`}));ve(e)},[oe]),st=(0,x.useCallback)(()=>{ve([])},[]),ct=(0,x.useCallback)(e=>{be(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),lt=(0,x.useCallback)(()=>{be([])},[]),ut=(0,x.useCallback)(()=>{let e=d===`detailed-relationships`?`compact`:`detailed-relationships`,n={...Re,erdMode:e};t(e=>$9(e,n,S)),f(e),u(`ERD mode switched to ${e===`compact`?`Compact`:`Detailed-Relationships`}.`)},[d,S,Re]),dt=(0,x.useCallback)(()=>{let e=!p,n={...Re,includeDiagrams:e};m(e),t(e=>$9(e,n,S)),u(e?`Generate Diagrams enabled.`:`Generate Diagrams disabled. Diagram sections will be excluded.`)},[p,Re,S]),ft=(0,x.useCallback)(()=>{let e=!h,n={...Re,includeDefaultColumns:e};g(e),t(e=>$9(e,n,S)),u(e?`Include Default Columns enabled.`:`Include Default Columns disabled. Default/system columns will be excluded.`)},[h,Re,S]),pt=(0,x.useCallback)(e=>{v(n=>{let r={...n,[e]:!n[e]};return t(e=>$9(e,{...Re,scope:r},S)),r})},[S,Re]),mt=(0,x.useCallback)(e=>{b(n=>{let r={...n,...e,metadata:{...n.metadata,...e.metadata},securityRoleFilters:{...n.securityRoleFilters,...e.securityRoleFilters}};return t(e=>$9(e,{...Re,documentationSettings:r},S)),r})},[S,Re]),ht=(0,x.useCallback)(()=>{if(o||Te.length===0)return;let e=J4t(Te);Ee([]),Oe(e=>e+1),nt(e)},[o,Te,nt]),gt=(0,x.useCallback)(t=>{let n=e[t];if(n){if(te(!1),!a3t(n.markdown)){r(t),z(!1);return}z(!0),window.setTimeout(()=>{r(t),window.setTimeout(()=>{z(!1)},300)},50)}},[e]),_t=(0,x.useCallback)((t=n)=>{let i=e[t];i?.diagramsMarkdown&&(r(t),te(!0),z(a3t(i.diagramsMarkdown)),window.setTimeout(()=>z(!1),350))},[n,e]),vt=(0,x.useCallback)(async()=>{let t=e[n];if(!t)return;let r=B?t.diagramsMarkdown:t.markdown;if(!r)return;let i=Q9(t.solution.metadata.displayName||t.solution.metadata.uniqueName,`solution`);try{await N4t(r,B?`${i}-diagrams`:`${i}-documentation`),await w(`Export Successful`,`Markdown document exported successfully.`,`success`,3e3)}catch(e){console.error(`Export failed:`,e),await w(`Export Failed`,`Failed to export markdown document.`,`error`,3e3)}},[e,n,B]),yt=(0,x.useCallback)(async t=>{let r=e[n];if(!r)return;let i=Q9(r.solution.metadata.displayName||r.solution.metadata.uniqueName,`solution`);try{await F4t(t,B?`${i}-diagrams`:`${i}-documentation`),await w(`Export Successful`,`HTML document exported successfully.`,`success`,3e3)}catch(e){console.error(`HTML export failed:`,e),await w(`Export Failed`,`Failed to export HTML document.`,`error`,3e3)}},[e,n,B]),bt=(0,x.useCallback)(async()=>{let t=e[n];if(!t)return;let r=Q9(t.solution.metadata.displayName||t.solution.metadata.uniqueName,`solution`);try{await I4t(t.solution,B?`${r}-diagrams`:`${r}-documentation`),await w(`Export Successful`,`Excel workbook exported successfully.`,`success`,3e3)}catch(e){console.error(`Excel export failed:`,e),await w(`Export Failed`,`Failed to export Excel workbook.`,`error`,3e3)}},[e,n,B]),xt=(0,x.useCallback)(async(t,r,i)=>{if(!e[n])return;let a=Q9(r,`solution`);try{await L4t(t,r,`${a}-documentation`,i),await w(`Export Successful`,`PDF document exported successfully.`,`success`,3e3)}catch(e){console.error(`PDF export failed:`,e),await w(`Export Failed`,`Failed to export PDF document.`,`error`,3e3)}},[e,n]),St=(0,x.useCallback)(async()=>{let t=e[n];if(!t)return;let r=nGt(t.solution,{documentContext:S}),i=Q9(t.solution.metadata.displayName||t.solution.metadata.uniqueName,`solution`);try{await N4t(r,`${i}-dependency-report`),await w(`Export Successful`,`Dependency report exported successfully.`,`success`,3e3)}catch(e){console.error(`Dependency export failed:`,e),await w(`Export Failed`,`Failed to export dependency report.`,`error`,3e3)}},[e,n,S]),Ct=(0,x.useCallback)(async()=>{if(e.length!==0)try{let t=new L.default;e.forEach((e,n)=>{let r=e.isConsolidated?`consolidated`:`solution_${n+1}`,i=Q9(e.solution.metadata.displayName||e.solution.metadata.uniqueName,r),a=e.isConsolidated?`-summary.md`:`-documentation.md`;if(t.file(`${i}${a}`,e.markdown),e.diagramsMarkdown&&t.file(`${i}-diagrams.md`,e.diagramsMarkdown),je&&!e.isConsolidated){let n=nGt(e.solution,{documentContext:S});t.file(`${i}-dependency-report.md`,n)}}),await P4t(await t.generateAsync({type:`blob`}),`pp-md-pptb-edition-markdown-documents`),await w(`Export Successful`,je?`All markdown documents and dependency reports exported as ZIP.`:`All markdown documents exported as ZIP.`,`success`,3e3)}catch(e){console.error(`Export all failed:`,e),await w(`Export Failed`,`Failed to export markdown documents as ZIP.`,`error`,3e3)}},[e,je,S]),wt=(0,x.useCallback)(async()=>{if(e.length!==0)try{let t=new L.default;e.forEach((e,n)=>{let r=Q9(e.solution.metadata.displayName||e.solution.metadata.uniqueName,e.isConsolidated?`all-selected-solutions`:`solution_${n+1}`),i=t.folder(r),a=eGt(e.markdown);a.length===0?i?.file(`${r}-documentation.md`,e.markdown):a.forEach(e=>{i?.file(`${r}-${e.key}.md`,e.markdown)}),e.diagramsMarkdown&&i?.file(`${r}-diagrams.md`,e.diagramsMarkdown)}),await P4t(await t.generateAsync({type:`blob`}),`pp-md-pptb-edition-markdown-by-category`),await w(`Export Successful`,`Documentation exported as category-grouped ZIP.`,`success`,3e3)}catch(e){console.error(`Export by category failed:`,e),await w(`Export Failed`,`Failed to export category-grouped documentation.`,`error`,3e3)}},[e]),Tt=(0,x.useCallback)(()=>{t([]),r(0),a([]),Ee([]),Oe(e=>e+1),u(``)},[]),Et=e.length>0,Dt=re===`local`&&Te.length>0&&!o,Ot=re===`dataverse`&&ye.length>0&&Ce.length===0&&!o,kt=e.findIndex(e=>e.isConsolidated),At=e[n],jt=re===`local`&&!Et&&!o,Mt=re===null&&!Et&&!o,Nt=re===`dataverse`&&!Et&&!o,Pt=Array.from(new Set(oe.map(e=>e.publisherName?.trim()).filter(e=>!!e))).sort((e,t)=>e.localeCompare(t,void 0,{sensitivity:`base`})),Ft=oe.filter(e=>{if(he===`managed`&&!e.isManaged||he===`unmanaged`&&e.isManaged)return!1;if(_e.length>0){let t=e.publisherName?.trim()||``;if(!_e.includes(t))return!1}let t=de.trim().toLowerCase();return!t||e.displayName.toLowerCase().includes(t)||e.uniqueName.toLowerCase().includes(t)||e.version.toLowerCase().includes(t)||(e.publisherName?.toLowerCase().includes(t)??!1)}).sort((e,t)=>{switch(pe){case`name-desc`:return t.displayName.localeCompare(e.displayName,void 0,{sensitivity:`base`});case`version-asc`:return e.version.localeCompare(t.version,void 0,{sensitivity:`base`,numeric:!0});case`version-desc`:return t.version.localeCompare(e.version,void 0,{sensitivity:`base`,numeric:!0});default:return e.displayName.localeCompare(t.displayName,void 0,{sensitivity:`base`})}}),It=(0,x.useCallback)(()=>{be(Ft.map(e=>e.solutionId))},[Ft]);return(0,M.jsxs)(`div`,{className:Y9.appRoot,children:[(0,M.jsx)(`a`,{href:`#main-content`,className:Y9.skipLink,children:`Skip to main content`}),(0,M.jsx)(`input`,{ref:Le,type:`file`,accept:`text/markdown,.md`,className:`sr-only`,onChange:et}),(0,M.jsx)(`header`,{className:Y9.header,role:`banner`,children:(0,M.jsxs)(`div`,{className:Y9.headerInner,children:[(0,M.jsxs)(`div`,{className:Y9.headerLeft,children:[(0,M.jsxs)(`div`,{className:Y9.brand,children:[(0,M.jsx)(`img`,{src:R4t,className:Y9.brandIcon,alt:``,"aria-hidden":`true`}),(0,M.jsxs)(`div`,{className:Y9.brandCopy,children:[(0,M.jsx)(`h1`,{className:Y9.brandName,children:`PP-MD - PPTB Edition`}),(0,M.jsx)(`span`,{className:Y9.brandTagline,children:`Power Platform Documentation Generator`})]})]}),(0,M.jsx)(`span`,{className:Y9.connectionText,children:He?`Connecting to ToolBox...`:Ue?`Connected to: ${Ve?.name??`No active connection`}`:`Running outside ToolBox (local dev mode)`})]}),(0,M.jsxs)(`div`,{className:Y9.headerRight,children:[(0,M.jsx)(`button`,{type:`button`,className:Y9.menuToggle,onClick:()=>Pe(e=>!e),"aria-expanded":Ne,"aria-controls":`header-actions`,"aria-label":`Open toolbar menu`,children:(0,M.jsx)(`span`,{"aria-hidden":`true`,children:`☰`})}),(0,M.jsxs)(`div`,{id:`header-actions`,className:`${Y9.headerActions} ${Ne?Y9.headerMenuOpen:``}`,children:[(0,M.jsxs)(`div`,{className:Y9.headerGroup,role:`group`,"aria-label":`Document tools`,children:[!o&&(0,M.jsx)(`button`,{type:`button`,className:Y9.headerBtn,onClick:()=>Le.current?.click(),children:`Open .MD`}),Et&&!o&&(0,M.jsx)(`button`,{type:`button`,className:Y9.headerBtn,onClick:ut,"aria-label":`Toggle ERD detail level`,children:d===`compact`?`ERD: Compact`:`ERD: Detailed`}),Et&&!o&&At?.diagramsMarkdown&&(0,M.jsx)(`button`,{type:`button`,className:`${Y9.headerBtn} ${B?Y9.headerBtnActive:``}`,onClick:()=>{B?te(!1):_t(n)},"aria-label":B?`View main documentation`:`View companion diagrams`,children:B?`Main Document`:`Companion Diagrams`})]}),(0,M.jsx)(`div`,{className:`${Y9.headerGroup} ${Y9.headerExportGroup}`,role:`group`,"aria-label":`Documentation exports`,children:Et&&!o&&(0,M.jsxs)(`details`,{ref:Fe,className:Y9.headerExportMenu,children:[(0,M.jsxs)(`summary`,{className:`${Y9.headerBtn} ${Y9.headerExportTrigger}`,children:[(0,M.jsx)(`span`,{className:Y9.headerExportLabel,children:`Export`}),(0,M.jsx)(`span`,{className:Y9.headerDropdownArrow,"aria-hidden":`true`,children:`▼`})]}),(0,M.jsxs)(`div`,{className:Y9.headerExportPanel,children:[(0,M.jsxs)(`button`,{type:`button`,className:Y9.menuBtn,onClick:()=>{Fe.current?.removeAttribute(`open`),Ct()},children:[`All Markdown`,je?` + Dependencies`:``]}),(0,M.jsx)(`button`,{type:`button`,className:Y9.menuBtn,onClick:()=>{Fe.current?.removeAttribute(`open`),wt()},children:`By Category`}),(0,M.jsx)(`button`,{type:`button`,className:Y9.menuBtn,onClick:()=>{Fe.current?.removeAttribute(`open`),Me(e=>!e)},children:je?`Disable Dependency Reports`:`Include Dependency Reports`}),je&&(0,M.jsx)(`button`,{type:`button`,className:Y9.menuBtn,onClick:()=>{Fe.current?.removeAttribute(`open`),St()},children:`Dependency Report`})]})]})}),(0,M.jsxs)(`div`,{className:Y9.headerGroup,role:`group`,"aria-label":`Session actions`,children:[Et&&!o&&(0,M.jsx)(`button`,{type:`button`,className:Y9.headerBtn,onClick:Tt,"aria-label":`Clear all results and add new files`,children:`+ New`}),re&&(0,M.jsx)(`button`,{type:`button`,className:Y9.headerBtn,onClick:$e,"aria-label":`Return to mode selection`,children:`Change Mode`})]})]})]})]})}),(0,M.jsx)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,className:Y9.statusRegion,role:`status`,children:l}),(0,M.jsxs)(`div`,{className:Y9.body,children:[Et&&(0,M.jsx)(jVt,{solutions:e.map(e=>e.solution),activeIndex:n,combinedIndex:kt,diagramsAvailable:!!e[kt]?.diagramsMarkdown,diagramsActive:B,onSelectDiagrams:()=>_t(kt),onSelect:gt,onReset:Tt}),(0,M.jsxs)(`main`,{id:`main-content`,className:`${Y9.main} ${Et?Y9.mainWithViewer:``}`,tabIndex:-1,children:[(Mt||jt||Nt)&&(0,M.jsx)(`section`,{className:Y9.welcomeSection,"aria-labelledby":`welcome-heading`,children:Mt?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`h2`,{id:`welcome-heading`,className:Y9.welcomeHeading,children:`Choose how you want to document your solution`}),(0,M.jsx)(`p`,{className:Y9.welcomeSubtitle,children:`Start with local ZIP files or connect to Dataverse and read solution metadata directly from the active environment.`}),(0,M.jsxs)(`p`,{className:Y9.modeVersion,children:[`PP-MD - PPTB Edition version `,Ge]}),(0,M.jsxs)(`div`,{className:Y9.modeGrid,children:[(0,M.jsxs)(`button`,{type:`button`,className:Y9.modeCard,onClick:()=>Qe(`local`),children:[(0,M.jsx)(`span`,{className:Y9.modeCardTitle,children:`Local Solutions`}),(0,M.jsx)(`span`,{className:Y9.modeCardBody,children:`Upload one or more exported solution ZIP files for local documentation generation.`})]}),(0,M.jsxs)(`button`,{type:`button`,className:Y9.modeCard,onClick:()=>Qe(`dataverse`),children:[(0,M.jsx)(`span`,{className:Y9.modeCardTitle,children:`Dataverse Connected`}),(0,M.jsx)(`span`,{className:Y9.modeCardBody,children:`Browse solutions from the currently active Power Platform ToolBox environment and generate documentation directly from Dataverse metadata.`})]})]}),(0,M.jsxs)(`section`,{className:Y9.modeBranding,"aria-label":`Product details and links`,children:[(0,M.jsx)(`img`,{src:``+new URL(`pp-md-icon-Dgg8-GAC.svg`,import.meta.url).href,className:Y9.modeBrandIcon,alt:`PP-MD logo`}),(0,M.jsx)(`p`,{className:Y9.modeBrandTitle,children:`Power Platform Markdown Document Generator`}),(0,M.jsx)(`p`,{className:Y9.modeBrandByline,children:`by Mike Hartley / Hart of the Midlands`}),(0,M.jsxs)(`div`,{className:Y9.modeBrandLinks,children:[(0,M.jsx)(`a`,{href:G4t,target:`_blank`,rel:`noreferrer`,onMouseDown:ze,onClick:Be,children:`HartOfTheMidlands.co.uk`}),(0,M.jsxs)(`a`,{href:W4t,target:`_blank`,rel:`noreferrer`,className:Y9.iconLink,onMouseDown:ze,onClick:Be,children:[(0,M.jsx)(`img`,{src:`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='currentColor'%20aria-hidden='true'%3e%3cpath%20d='M12%20.5C5.65.5.5%205.65.5%2012c0%205.1%203.3%209.42%207.88%2010.95.58.1.8-.25.8-.56%200-.28-.01-1.2-.02-2.17-3.2.7-3.88-1.36-3.88-1.36-.52-1.33-1.28-1.68-1.28-1.68-1.04-.71.08-.7.08-.7%201.16.08%201.77%201.19%201.77%201.19%201.02%201.76%202.68%201.25%203.33.96.1-.74.4-1.25.72-1.53-2.55-.29-5.22-1.27-5.22-5.66%200-1.25.45-2.28%201.18-3.08-.12-.3-.51-1.5.11-3.13%200%200%20.96-.3%203.15%201.17a10.9%2010.9%200%200%201%205.74%200c2.18-1.48%203.14-1.17%203.14-1.17.62%201.63.24%202.83.12%203.13.74.8%201.18%201.83%201.18%203.08%200%204.4-2.68%205.37-5.24%205.66.41.35.78%201.03.78%202.08%200%201.5-.01%202.72-.01%203.09%200%20.31.21.67.8.56A11.52%2011.52%200%200%200%2023.5%2012C23.5%205.65%2018.35.5%2012%20.5Z'/%3e%3c/svg%3e`,className:Y9.linkIcon,alt:``,"aria-hidden":`true`}),(0,M.jsx)(`span`,{children:`GitHub Repo`})]})]})]})]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`h2`,{id:`welcome-heading`,className:Y9.welcomeHeading,children:re===`local`?`Generate documentation from your solution files`:`Generate documentation from the active Dataverse environment`}),(0,M.jsx)(`p`,{className:Y9.welcomeSubtitle,children:re===`local`?`Drop one or more Power Platform solution ZIP archives below. PP-MD - PPTB Edition will parse every component and produce comprehensive Markdown documentation — including architecture and ERD Mermaid diagrams.`:`Choose a solution from the active environment. PP-MD - PPTB Edition reads metadata through Power Platform ToolBox and generates Markdown documentation without exporting or uploading the solution.`}),(0,M.jsxs)(`section`,{className:Y9.contextPanel,"aria-labelledby":`context-heading`,children:[(0,M.jsx)(`h3`,{id:`context-heading`,className:Y9.contextHeading,children:`Document Header Details`}),re===`dataverse`&&(0,M.jsxs)(`div`,{className:Y9.contextRow,children:[(0,M.jsx)(`label`,{htmlFor:`dataverse-policy-select`,className:Y9.contextLabel,children:`Collection Policy`}),(0,M.jsx)(`div`,{className:Y9.contextSelectRow,children:(0,M.jsxs)(`select`,{id:`dataverse-policy-select`,className:Y9.contextSelect,value:xe,onChange:e=>it(e.target.value),"aria-label":`Select the Dataverse collection policy`,children:[(0,M.jsx)(`option`,{value:`solutionOnly`,children:`Solution only`}),(0,M.jsx)(`option`,{value:`solutionAndDirectReferences`,children:`Solution + direct references`}),(0,M.jsx)(`option`,{value:`environmentAppendix`,children:`Environment appendix`})]})})]}),(0,M.jsxs)(`div`,{className:Y9.contextRow,children:[(0,M.jsx)(`label`,{htmlFor:`config-select`,className:Y9.contextLabel,children:`Configuration`}),(0,M.jsxs)(`div`,{className:Y9.contextSelectRow,children:[(0,M.jsxs)(`select`,{id:`config-select`,className:Y9.contextSelect,value:j,onChange:qe,"aria-label":`Select document configuration`,children:[(0,M.jsx)(`option`,{value:`custom`,children:`Custom (manual entry)`}),O.map(e=>(0,M.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,M.jsx)(`button`,{type:`button`,className:Y9.contextDeleteBtn,onClick:()=>Xe(j),disabled:j===`custom`,"aria-label":`Delete selected configuration`,title:`Delete selected configuration`,children:`🗑`})]})]}),(0,M.jsxs)(`div`,{className:Y9.contextSaveRow,children:[(0,M.jsx)(`input`,{type:`text`,className:Y9.contextNameInput,placeholder:`Configuration name`,value:I,onChange:e=>R(e.target.value),"aria-label":`Configuration name`}),(0,M.jsx)(`button`,{type:`button`,className:Y9.contextSaveBtn,onClick:Ye,children:`Save Configuration`})]}),P&&(0,M.jsxs)(`p`,{className:Y9.contextWarning,role:`alert`,children:[`⚠ `,P]}),(0,M.jsxs)(`div`,{className:Y9.contextGrid,children:[(0,M.jsxs)(`label`,{className:Y9.contextField,children:[(0,M.jsx)(`span`,{children:`Client`}),(0,M.jsx)(`input`,{type:`text`,value:S.client,onChange:e=>Je(`client`,e.target.value)})]}),(0,M.jsxs)(`label`,{className:Y9.contextField,children:[(0,M.jsx)(`span`,{children:`Contract`}),(0,M.jsx)(`input`,{type:`text`,value:S.contract,onChange:e=>Je(`contract`,e.target.value)})]}),(0,M.jsxs)(`label`,{className:Y9.contextField,children:[(0,M.jsx)(`span`,{children:`Contract ID/SoW`}),(0,M.jsx)(`input`,{type:`text`,value:S.sow,onChange:e=>Je(`sow`,e.target.value)})]}),(0,M.jsxs)(`label`,{className:Y9.contextField,children:[(0,M.jsx)(`span`,{children:`Project`}),(0,M.jsx)(`input`,{type:`text`,value:S.project,onChange:e=>Je(`project`,e.target.value)})]}),(0,M.jsxs)(`label`,{className:Y9.contextField,children:[(0,M.jsx)(`span`,{children:`Sprint`}),(0,M.jsx)(`input`,{type:`text`,value:S.sprint,onChange:e=>Je(`sprint`,e.target.value)})]}),(0,M.jsxs)(`label`,{className:Y9.contextField,children:[(0,M.jsx)(`span`,{children:`Release Date`}),(0,M.jsx)(`input`,{type:`date`,value:S.releaseDate,onChange:e=>Je(`releaseDate`,e.target.value)})]})]})]}),(0,M.jsxs)(`section`,{className:Y9.generatePanel,"aria-labelledby":`generate-doc-heading`,children:[(0,M.jsxs)(`div`,{className:Y9.generatePanelHeader,children:[(0,M.jsx)(`h3`,{id:`generate-doc-heading`,className:Y9.generatePanelHeading,children:`Generate Documentation`}),(0,M.jsx)(`p`,{className:Y9.generatePanelSubtitle,children:`Use one shared generation action for the selected mode and choose what to include in output.`})]}),(0,M.jsxs)(`div`,{className:Y9.generatePanelActions,children:[re===`local`?(0,M.jsxs)(`button`,{type:`button`,className:Y9.generatePrimaryBtn,onClick:ht,disabled:!Dt,"aria-label":`Generate documentation for ${Te.length} queued file${Te.length===1?``:`s`}`,children:[`Generate Documentation (`,Te.length,`)`]}):(0,M.jsxs)(`button`,{type:`button`,className:Y9.generatePrimaryBtn,onClick:rt,disabled:!Ot,"aria-label":`Generate documentation for ${ye.length} selected Dataverse solution${ye.length===1?``:`s`}`,children:[`Generate Selected (`,ye.length,`)`]}),(0,M.jsxs)(`label`,{className:Y9.generateToggle,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:p,onChange:dt}),(0,M.jsx)(`span`,{children:`Generate Diagrams`})]}),(0,M.jsxs)(`label`,{className:Y9.generateToggle,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:h,onChange:ft}),(0,M.jsx)(`span`,{children:`Include Default Columns`})]})]}),(0,M.jsxs)(`details`,{className:Y9.optionDetails,open:!0,children:[(0,M.jsx)(`summary`,{children:`Documentation Options`}),(0,M.jsxs)(`fieldset`,{className:Y9.documentScope,children:[(0,M.jsx)(`legend`,{className:`sr-only`,children:`Documentation Options`}),[[`flows`,`Flows and automation`],[`apps`,`Power Apps`],[`security`,`Security roles and profiles`],[`integration`,`Integration and SharePoint`],[`plugins`,`Plug-ins and steps`],[`reports`,`Reports and dashboards`],[`webResources`,`Web resources`],[`modernArtifacts`,`Agents, AI, desktop flows, dataflows, APIs and offline profiles`]].map(([e,t])=>(0,M.jsxs)(`label`,{className:Y9.generateToggle,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:_[e],onChange:()=>pt(e)}),(0,M.jsx)(`span`,{children:t})]},e))]})]}),(0,M.jsxs)(`details`,{className:Y9.optionDetails,children:[(0,M.jsx)(`summary`,{children:`Table Options`}),(0,M.jsxs)(`fieldset`,{className:Y9.documentScope,children:[(0,M.jsx)(`legend`,{className:`sr-only`,children:`Table Options`}),(0,M.jsxs)(`label`,{className:Y9.optionField,children:[`Attribute selection`,(0,M.jsxs)(`select`,{value:y.metadata.attributeSelectionMode,onChange:e=>mt({metadata:{attributeSelectionMode:e.target.value}}),children:[(0,M.jsx)(`option`,{value:`all`,children:`All attributes`}),(0,M.jsx)(`option`,{value:`custom-only`,children:`Custom only`}),(0,M.jsx)(`option`,{value:`attributes-on-form`,children:`Attributes on forms`}),(0,M.jsx)(`option`,{value:`attributes-not-on-form`,children:`Attributes not on forms`}),(0,M.jsx)(`option`,{value:`option-set-focused`,children:`Choice columns`}),(0,M.jsx)(`option`,{value:`unmanaged-only`,children:`Unmanaged only`})]})]}),(0,M.jsxs)(`label`,{className:Y9.optionField,children:[`Manual attributes`,(0,M.jsx)(`input`,{value:y.metadata.manualAttributes.join(`, `),onChange:e=>mt({metadata:{manualAttributes:e.target.value.split(`,`).map(e=>e.trim()).filter(Boolean)}}),placeholder:`schema_name, schema_name`})]}),[`includeDefaultColumns`,`excludeVirtualAttributes`,`includeTypeColumn`,`includeRequiredLevelInfo`,`includeCustomColumn`,`includeAuditInfo`,`includeNotesColumn`,`includeDescriptionColumn`,`includeAdvancedFind`,`includeFieldSecurity`,`includeMetadataSource`].map(e=>(0,M.jsxs)(`label`,{className:Y9.generateToggle,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:y.metadata[e],onChange:()=>mt({metadata:{[e]:!y.metadata[e]}})}),(0,M.jsx)(`span`,{children:e.replace(`include`,``).replace(/([A-Z])/g,` $1`).trim()})]},e))]})]}),(0,M.jsxs)(`details`,{className:Y9.optionDetails,children:[(0,M.jsx)(`summary`,{children:`Security Role Options`}),(0,M.jsxs)(`fieldset`,{className:Y9.documentScope,children:[(0,M.jsx)(`legend`,{className:`sr-only`,children:`Security Role Options`}),[`onlyTablesInCurrentSolution`,`onlyCustomTables`].map(e=>(0,M.jsxs)(`label`,{className:Y9.generateToggle,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:y.securityRoleFilters[e],onChange:()=>mt({securityRoleFilters:{[e]:!y.securityRoleFilters[e]}})}),(0,M.jsx)(`span`,{children:e===`onlyTablesInCurrentSolution`?`Only tables in current solution`:`Only custom tables`})]},e))]})]}),(0,M.jsxs)(`details`,{className:Y9.optionDetails,children:[(0,M.jsx)(`summary`,{children:`Diagram Options`}),(0,M.jsxs)(`fieldset`,{className:Y9.documentScope,children:[(0,M.jsx)(`legend`,{className:`sr-only`,children:`Diagram Options`}),(0,M.jsxs)(`label`,{className:Y9.generateToggle,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:y.separateDiagramsDocument,onChange:()=>mt({separateDiagramsDocument:!y.separateDiagramsDocument})}),(0,M.jsx)(`span`,{children:`Generate companion diagrams document`})]}),(0,M.jsxs)(`label`,{className:Y9.optionField,children:[`Mermaid diagram colours`,(0,M.jsxs)(`select`,{value:y.diagramColourTheme,onChange:e=>mt({diagramColourTheme:e.target.value}),children:[(0,M.jsx)(`option`,{value:`neutral`,children:`Neutral`}),(0,M.jsx)(`option`,{value:`default`,children:`Default`}),(0,M.jsx)(`option`,{value:`dark`,children:`Dark`}),(0,M.jsx)(`option`,{value:`forest`,children:`Forest`}),(0,M.jsx)(`option`,{value:`base`,children:`Base`})]})]})]})]}),(0,M.jsx)(`div`,{className:Y9.generateFooter,role:`region`,"aria-label":`Generate documentation`,children:re===`local`?(0,M.jsxs)(`button`,{type:`button`,className:Y9.generatePrimaryBtn,onClick:ht,disabled:!Dt,children:[`Generate Documentation (`,Te.length,`)`]}):(0,M.jsxs)(`button`,{type:`button`,className:Y9.generatePrimaryBtn,onClick:rt,disabled:!Ot,children:[`Generate Selected (`,ye.length,`)`]})})]}),re===`local`?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:Y9.dropZoneWrapper,children:(0,M.jsx)(V,{onFilesSelected:nt,disabled:o,onQueueChange:Ee,showGenerateButton:!1},De)}),(0,M.jsxs)(`section`,{className:Y9.featureGrid,"aria-labelledby":`features-heading`,children:[(0,M.jsx)(`h3`,{id:`features-heading`,className:`sr-only`,children:`Supported components`}),[{icon:`🗃️`,label:`Tables & Columns`},{icon:`📋`,label:`Forms & Views`},{icon:`⚙️`,label:`Power Automate Flows`},{icon:`🔄`,label:`Classic Workflows & BPFs`},{icon:`🎨`,label:`Canvas & Model Apps`},{icon:`🌐`,label:`Web Resources (JS/TS/HTML)`},{icon:`🔒`,label:`Security Roles & CLS`},{icon:`🔌`,label:`Plugins & Plugin Steps`},{icon:`🔗`,label:`Connection References`},{icon:`⚙️`,label:`Environment Variables`},{icon:`📊`,label:`Reports & Dashboards`},{icon:`📈`,label:`Mermaid Diagrams`}].map(({icon:e,label:t})=>(0,M.jsxs)(`div`,{className:Y9.featureCard,children:[(0,M.jsx)(`span`,{className:Y9.featureIcon,"aria-hidden":`true`,children:e}),(0,M.jsx)(`span`,{className:Y9.featureLabel,children:t})]},t))]})]}):(0,M.jsx)(ne,{solutions:Ft,publisherOptions:Pt,selectedPublishers:_e,selectedSolutionIds:ye,search:de,sort:pe,managedFilter:he,isLoading:ce,error:H,busySolutionIds:Ce,onSearchChange:fe,onSortChange:me,onManagedFilterChange:ge,onTogglePublisher:at,onSelectAllPublishers:ot,onClearPublishers:st,onToggleSolution:ct,onSelectAllVisibleSolutions:It,onClearSelectedSolutions:lt,onRefresh:()=>{Ze()}})]})}),o&&(0,M.jsxs)(`section`,{className:Y9.processingSection,"aria-labelledby":`processing-heading`,"aria-busy":`true`,children:[(0,M.jsx)(`h2`,{id:`processing-heading`,className:Y9.processingHeading,children:`Processing solutions…`}),(0,M.jsx)(`div`,{className:Y9.progressList,children:i.map(e=>(0,M.jsx)(`div`,{className:Y9.progressItem,children:e.error?(0,M.jsxs)(`div`,{role:`alert`,className:Y9.progressError,children:[(0,M.jsx)(`span`,{"aria-hidden":`true`,children:`❌`}),` `,e.fileName,`: `,e.error]}):(0,M.jsx)(ie,{value:e.progress,label:e.fileName,showLabel:!0})},e.fileName))})]}),!o&&i.some(e=>e.error)&&(0,M.jsx)(`div`,{role:`alert`,className:Y9.errorSummary,children:i.filter(e=>e.error).map(e=>(0,M.jsxs)(`p`,{className:Y9.errorLine,children:[`❌ `,(0,M.jsx)(`strong`,{children:e.fileName}),`: `,e.error]},e.fileName))}),Et&&At&&!o&&(0,M.jsx)(`div`,{className:Y9.viewerWrapper,children:ee?(0,M.jsx)(`div`,{className:Y9.viewerLoadingState,role:`status`,"aria-live":`polite`,"aria-busy":`true`,children:(0,M.jsxs)(`div`,{className:Y9.viewerLoadingCard,children:[(0,M.jsx)(`span`,{className:Y9.viewerLoadingSpinner,"aria-hidden":`true`}),(0,M.jsx)(`p`,{className:Y9.viewerLoadingText,children:`Please Wait - rendering markdown document...`})]})}):(0,M.jsx)(AVt,{markdown:B&&At.diagramsMarkdown?At.diagramsMarkdown:At.markdown,title:B?`${At.solution.metadata.displayName||At.solution.metadata.uniqueName}: Diagrams`:At.solution.metadata.displayName||At.solution.metadata.uniqueName,onExport:vt,onExportHtml:yt,onExportExcel:bt,onExportPdf:xt,diagramColourTheme:y.diagramColourTheme})}),Et&&!o&&re&&(0,M.jsxs)(`details`,{className:Y9.addMoreDetails,children:[(0,M.jsx)(`summary`,{className:Y9.addMoreSummary,children:`+ Generate More Documentation`}),(0,M.jsxs)(`div`,{className:Y9.addMoreBody,children:[(0,M.jsxs)(`section`,{className:Y9.generatePanel,"aria-labelledby":`generate-more-heading`,children:[(0,M.jsxs)(`div`,{className:Y9.generatePanelHeader,children:[(0,M.jsx)(`h3`,{id:`generate-more-heading`,className:Y9.generatePanelHeading,children:`Generate More Documentation`}),(0,M.jsx)(`p`,{className:Y9.generatePanelSubtitle,children:`Apply generation settings and create additional documents from your current mode.`})]}),(0,M.jsxs)(`div`,{className:Y9.generatePanelActions,children:[re===`local`?(0,M.jsxs)(`button`,{type:`button`,className:Y9.generatePrimaryBtn,onClick:ht,disabled:!Dt,children:[`Generate Documentation (`,Te.length,`)`]}):(0,M.jsxs)(`button`,{type:`button`,className:Y9.generatePrimaryBtn,onClick:rt,disabled:!Ot,children:[`Generate Selected (`,ye.length,`)`]}),(0,M.jsxs)(`label`,{className:Y9.generateToggle,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:p,onChange:dt}),(0,M.jsx)(`span`,{children:`Generate Diagrams`})]}),(0,M.jsxs)(`label`,{className:Y9.generateToggle,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:h,onChange:ft}),(0,M.jsx)(`span`,{children:`Include Default Columns`})]})]})]}),re===`local`&&(0,M.jsxs)(`div`,{className:Y9.addMoreSubsection,children:[(0,M.jsx)(`h4`,{className:Y9.addMoreSubheading,children:`Add More Solution Files`}),(0,M.jsx)(V,{onFilesSelected:nt,disabled:o,onQueueChange:Ee,showGenerateButton:!1},`add-more-${De}`)]}),re===`dataverse`&&(0,M.jsxs)(`div`,{className:Y9.addMoreSubsection,children:[(0,M.jsx)(`h4`,{className:Y9.addMoreSubheading,children:`Add More Solutions from Dataverse`}),(0,M.jsx)(ne,{solutions:Ft,publisherOptions:Pt,selectedPublishers:_e,selectedSolutionIds:ye,search:de,sort:pe,managedFilter:he,isLoading:ce,error:H,busySolutionIds:Ce,onSearchChange:fe,onSortChange:me,onManagedFilterChange:ge,onTogglePublisher:at,onSelectAllPublishers:ot,onClearPublishers:st,onToggleSolution:ct,onSelectAllVisibleSolutions:It,onClearSelectedSolutions:lt,onRefresh:()=>{Ze()}})]})]})]})]})]}),ke&&(0,M.jsx)(`div`,{className:Y9.modalBackdrop,role:`presentation`,children:(0,M.jsxs)(`div`,{className:Y9.modalDialog,role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":`invalid-archive-title`,"aria-describedby":`invalid-archive-body`,children:[(0,M.jsx)(`h2`,{id:`invalid-archive-title`,className:Y9.modalTitle,children:`Invalid ZIP Archive`}),(0,M.jsx)(`p`,{id:`invalid-archive-body`,className:Y9.modalBody,children:ke}),(0,M.jsx)(`button`,{ref:Ie,type:`button`,className:Y9.modalOkBtn,onClick:()=>Ae(null),children:`OK`})]})}),(0,M.jsxs)(`footer`,{className:Y9.footer,role:`contentinfo`,children:[(0,M.jsxs)(`div`,{className:Y9.footerLeft,children:[(0,M.jsx)(`span`,{children:`PP-MD - PPTB Edition: Power Platform Documentation Generator.`}),(0,M.jsxs)(`span`,{className:Y9.footerVersion,children:[`Version `,Ge]}),(0,M.jsxs)(`a`,{href:W4t,target:`_blank`,rel:`noreferrer`,className:Y9.iconLink,onMouseDown:ze,onClick:Be,children:[(0,M.jsx)(`img`,{src:z4t,className:Y9.linkIcon,alt:``,"aria-hidden":`true`}),(0,M.jsx)(`span`,{children:`GitHub Repo`})]})]}),(0,M.jsx)(`div`,{className:Y9.footerRight,children:(0,M.jsx)(`span`,{children:re===`dataverse`?`PP-MD - PPTB Edition reads solution metadata from the active Dataverse environment through Power Platform ToolBox. No information is uploaded to the environment and only solution data is retrieved in read-only mode.`:`All local ZIP processing happens on your PC; your solution data never leaves your machine.`})})]})]})}var s3t=document.getElementById(`root`);if(!s3t)throw Error(`PP-MD - PPTB Edition: Could not find #root element. Ensure index.html contains <div id="root"></div>.`);(0,S.createRoot)(s3t).render((0,M.jsx)(x.StrictMode,{children:(0,M.jsx)(I,{children:(0,M.jsx)(o3t,{})})}));
|