@serve.zone/dcrouter 13.20.2 → 13.21.0

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.
@@ -74,10 +74,10 @@ ${s}
74
74
  `,now:{line:1,column:1},lineShift:0});return s&&s.charCodeAt(s.length-1)!==10&&s.charCodeAt(s.length-1)!==13&&(s+=`
75
75
  `),s;function o(n){return r.stack.push(n),l;function l(){r.stack.pop()}i(l,"exit")}i(o,"enter")}function eTa(t){throw new Error("Cannot handle value `"+t+"`, expected node")}function tTa(t){let e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}function aTa(t,e){if(t.type==="definition"&&t.type===e.type)return 0}function rTa(t,e){return D6t(t,this,e)}function iTa(t,e){return I6t(t,this,e)}function sTa(t,e){return F6t(this,t,e)}var H6t=f(()=>{Jce();Mut();v0e();k6t();C6t();_6t();$6t();A6t();P6t();N6t();O6t();q6t();i(y0e,"toMarkdown");i(eTa,"invalid");i(tTa,"unknown");i(aTa,"joinDefinition");i(rTa,"containerPhrasingBound");i(iTa,"containerFlowBound");i(sTa,"safeBound")});var MX=f(()=>{H6t();v0e()});function M0e(){return{enter:{table:oTa,tableData:V6t,tableHeader:V6t,tableRow:lTa},exit:{codeText:cTa,table:nTa,tableData:w0e,tableHeader:w0e,tableRow:w0e}}}function oTa(t){let e=t._align;this.enter({type:"table",align:e.map(function(a){return a==="none"?null:a}),children:[]},t),this.data.inTable=!0}function nTa(t){this.exit(t),this.data.inTable=void 0}function lTa(t){this.enter({type:"tableRow",children:[]},t)}function w0e(t){this.exit(t)}function V6t(t){this.enter({type:"tableCell",children:[]},t)}function cTa(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,dTa));let a=this.stack[this.stack.length-1];a.type,a.value=e,this.exit(t)}function dTa(t,e){return e==="|"?e:t}function k0e(t){let e=t||{},a=e.tableCellPadding,r=e.tablePipeAlign,s=e.stringLength,o=a?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
76
76
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:n,tableCell:c,tableRow:l}};function n(v,x,b,g){return d(u(v,b,g),v.align)}function l(v,x,b,g){let y=p(v,b,g),k=d([y]);return k.slice(0,k.indexOf(`
77
- `))}function c(v,x,b,g){let y=b.enter("tableCell"),k=b.enter("phrasing"),C=b.containerPhrasing(v,{...g,before:o,after:o});return k(),y(),C}function d(v,x){return vut(v,{align:x,alignDelimiters:r,padding:a,stringLength:s})}function u(v,x,b){let g=v.children,y=-1,k=[],C=x.enter("table");for(;++y<g.length;)k[y]=p(g[y],x,b);return C(),k}function p(v,x,b){let g=v.children,y=-1,k=[],C=x.enter("tableRow");for(;++y<g.length;)k[y]=c(g[y],v,x,b);return C(),k}function m(v,x,b){let g=L3.inlineCode(v,x,b);return b.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}var j6t=f(()=>{r0();xut();MX();i(M0e,"gfmTableFromMarkdown");i(oTa,"enterTable");i(nTa,"exitTable");i(lTa,"enterRow");i(w0e,"exit");i(V6t,"enterCell");i(cTa,"exitCodeText");i(dTa,"replace");i(k0e,"gfmTableToMarkdown")});var U6t=f(()=>{j6t()});function S0e(){return{exit:{taskListCheckValueChecked:W6t,taskListCheckValueUnchecked:W6t,paragraph:uTa}}}function C0e(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:pTa}}}function W6t(t){let e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function uTa(t){let e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){let a=this.stack[this.stack.length-1];a.type;let r=a.children[0];if(r&&r.type==="text"){let s=e.children,o=-1,n;for(;++o<s.length;){let l=s[o];if(l.type==="paragraph"){n=l;break}}n===a&&(r.value=r.value.slice(1),r.value.length===0?a.children.shift():a.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,a.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function pTa(t,e,a,r){let s=t.children[0],o=typeof t.checked=="boolean"&&s&&s.type==="paragraph",n="["+(t.checked?"x":" ")+"] ",l=a.createTracker(r);o&&l.move(n);let c=L3.listItem(t,e,a,{...r,...l.current()});return o&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),c;function d(u){return u+n}i(d,"check")}var G6t=f(()=>{r0();MX();i(S0e,"gfmTaskListItemFromMarkdown");i(C0e,"gfmTaskListItemToMarkdown");i(W6t,"exitCheck");i(uTa,"exitParagraphWithTaskListItem");i(pTa,"listItemWithTaskListItem")});var Y6t=f(()=>{G6t()});function z0e(){return[Gce(),Kce(),Xce(),M0e(),S0e()]}function T0e(t){return{extensions:[Yce(),Zce(t),Qce(),k0e(t),C0e()]}}var K6t=f(()=>{cut();fut();gut();U6t();Y6t();i(z0e,"gfmFromMarkdown");i(T0e,"gfmToMarkdown")});var Z6t=f(()=>{K6t()});function Kr(t,e,a,r){let s=t.length,o=0,n;if(e<0?e=-e>s?0:s+e:e=e>s?s:e,a=a>0?a:0,r.length<1e4)n=Array.from(r),n.unshift(e,a),t.splice(...n);else for(a&&t.splice(e,a);o<r.length;)n=r.slice(o,o+1e4),n.unshift(e,0),t.splice(...n),o+=1e4,e+=1e4}function li(t,e){return t.length>0?(Kr(t,t.length,0,e),t):e}var r2=f(()=>{i(Kr,"splice");i(li,"push")});function kX(t){let e={},a=-1;for(;++a<t.length;)fTa(e,t[a]);return e}function fTa(t,e){let a;for(a in e){let s=(_0e.call(t,a)?t[a]:void 0)||(t[a]={}),o=e[a],n;if(o)for(n in o){_0e.call(s,n)||(s[n]=[]);let l=o[n];hTa(s[n],Array.isArray(l)?l:l?[l]:[])}}}function hTa(t,e){let a=-1,r=[];for(;++a<e.length;)(e[a].add==="after"?t:r).push(e[a]);Kr(t,0,0,r)}function SX(t){let e={},a=-1;for(;++a<t.length;)mTa(e,t[a]);return e}function mTa(t,e){let a;for(a in e){let s=(_0e.call(t,a)?t[a]:void 0)||(t[a]={}),o=e[a],n;if(o)for(n in o)s[n]=o[n]}}var _0e,CX=f(()=>{r2();_0e={}.hasOwnProperty;i(kX,"combineExtensions");i(fTa,"syntaxExtension");i(hTa,"constructs");i(SX,"combineHtmlExtensions");i(mTa,"htmlExtension")});function D0e(){return{text:i2}}function vTa(t,e,a){let r=this,s,o;return n;function n(p){return!L0e(p)||!ipt.call(r,r.previous)||$0e(r.events)?a(p):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),l(p))}function l(p){return L0e(p)?(t.consume(p),l):p===64?(t.consume(p),c):a(p)}function c(p){return p===46?t.check(bTa,u,d)(p):p===45||p===95||Fr(p)?(o=!0,t.consume(p),c):u(p)}function d(p){return t.consume(p),s=!0,c}function u(p){return o&&s&&Ti(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(p)):a(p)}}function xTa(t,e,a){let r=this;return s;function s(n){return n!==87&&n!==119||!apt.call(r,r.previous)||$0e(r.events)?a(n):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(gTa,t.attempt(X6t,t.attempt(Q6t,o),a),a)(n))}function o(n){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(n)}}function yTa(t,e,a){let r=this,s="",o=!1;return n;function n(p){return(p===72||p===104)&&rpt.call(r,r.previous)&&!$0e(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),s+=String.fromCodePoint(p),t.consume(p),l):a(p)}function l(p){if(Ti(p)&&s.length<5)return s+=String.fromCodePoint(p),t.consume(p),l;if(p===58){let m=s.toLowerCase();if(m==="http"||m==="https")return t.consume(p),c}return a(p)}function c(p){return p===47?(t.consume(p),o?d:(o=!0,c)):a(p)}function d(p){return p===null||C3(p)||ua(p)||a2(p)||z3(p)?a(p):t.attempt(X6t,t.attempt(Q6t,u),a)(p)}function u(p){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(p)}}function wTa(t,e,a){let r=0;return s;function s(n){return(n===87||n===119)&&r<3?(r++,t.consume(n),s):n===46&&r===3?(t.consume(n),o):a(n)}function o(n){return n===null?a(n):e(n)}}function MTa(t,e,a){let r,s,o;return n;function n(d){return d===46||d===95?t.check(J6t,c,l)(d):d===null||ua(d)||a2(d)||d!==45&&z3(d)?c(d):(o=!0,t.consume(d),n)}function l(d){return d===95?r=!0:(s=r,r=void 0),t.consume(d),n}function c(d){return s||r||!o?a(d):e(d)}}function kTa(t,e){let a=0,r=0;return s;function s(n){return n===40?(a++,t.consume(n),s):n===41&&r<a?o(n):n===33||n===34||n===38||n===39||n===41||n===42||n===44||n===46||n===58||n===59||n===60||n===63||n===93||n===95||n===126?t.check(J6t,e,o)(n):n===null||ua(n)||a2(n)?e(n):(t.consume(n),s)}function o(n){return n===41&&r++,t.consume(n),s}}function STa(t,e,a){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(t.consume(l),r):l===38?(t.consume(l),o):l===93?(t.consume(l),s):l===60||l===null||ua(l)||a2(l)?e(l):a(l)}function s(l){return l===null||l===40||l===91||ua(l)||a2(l)?e(l):r(l)}function o(l){return Ti(l)?n(l):a(l)}function n(l){return l===59?(t.consume(l),r):Ti(l)?(t.consume(l),n):a(l)}}function CTa(t,e,a){return r;function r(o){return t.consume(o),s}function s(o){return Fr(o)?a(o):e(o)}}function apt(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||ua(t)}function rpt(t){return!Ti(t)}function ipt(t){return!(t===47||L0e(t))}function L0e(t){return t===43||t===45||t===46||t===95||Fr(t)}function $0e(t){let e=t.length,a=!1;for(;e--;){let r=t[e][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){a=!0;break}if(r._gfmAutolinkLiteralWalkedInto){a=!1;break}}return t.length>0&&!a&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}var gTa,X6t,Q6t,J6t,bTa,ept,tpt,ul,i2,spt=f(()=>{ga();gTa={tokenize:wTa,partial:!0},X6t={tokenize:MTa,partial:!0},Q6t={tokenize:kTa,partial:!0},J6t={tokenize:STa,partial:!0},bTa={tokenize:CTa,partial:!0},ept={name:"wwwAutolink",tokenize:xTa,previous:apt},tpt={name:"protocolAutolink",tokenize:yTa,previous:rpt},ul={name:"emailAutolink",tokenize:vTa,previous:ipt},i2={};i(D0e,"gfmAutolinkLiteral");for(var D3=48;D3<123;)i2[D3]=ul,D3++,D3===58?D3=65:D3===91&&(D3=97);i2[43]=ul,i2[45]=ul,i2[46]=ul,i2[95]=ul,i2[72]=[ul,tpt],i2[104]=[ul,tpt],i2[87]=[ul,ept],i2[119]=[ul,ept];i(vTa,"tokenizeEmailAutolink");i(xTa,"tokenizeWwwAutolink");i(yTa,"tokenizeProtocolAutolink");i(wTa,"tokenizeWwwPrefix");i(MTa,"tokenizeDomain");i(kTa,"tokenizePath");i(STa,"tokenizeTrail");i(CTa,"tokenizeEmailDomainDotTrail");i(apt,"previousWww");i(rpt,"previousProtocol");i(ipt,"previousEmail");i(L0e,"gfmAtext");i($0e,"previousUnbalanced")});function zX(t){return t.replace(/["&<>]/g,e);function e(a){return"&"+zTa[a]+";"}}var zTa,A0e=f(()=>{zTa={'"':"quot","&":"amp","<":"lt",">":"gt"};i(zX,"encode")});function s2(t,e){let a=zX(qo(t||""));if(!e)return a;let r=a.indexOf(":"),s=a.indexOf("?"),o=a.indexOf("#"),n=a.indexOf("/");return r<0||n>-1&&r>n||s>-1&&r>s||o>-1&&r>o||e.test(a.slice(0,r))?a:""}function qo(t){let e=[],a=-1,r=0,s=0;for(;++a<t.length;){let o=t.charCodeAt(a),n="";if(o===37&&Fr(t.charCodeAt(a+1))&&Fr(t.charCodeAt(a+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(n=String.fromCharCode(o));else if(o>55295&&o<57344){let l=t.charCodeAt(a+1);o<56320&&l>56319&&l<57344?(n=String.fromCharCode(o,l),s=1):n="\uFFFD"}else n=String.fromCharCode(o);n&&(e.push(t.slice(r,a),encodeURIComponent(n)),r=a+s+1,n=""),s&&(a+=s,s=0)}return e.join("")+t.slice(r)}var o2=f(()=>{ga();A0e();i(s2,"sanitizeUri");i(qo,"normalizeUri")});function P0e(){return{exit:{literalAutolinkEmail:_Ta,literalAutolinkHttp:LTa,literalAutolinkWww:TTa}}}function TTa(t){I0e.call(this,t,"http://")}function _Ta(t){I0e.call(this,t,"mailto:")}function LTa(t){I0e.call(this,t)}function I0e(t,e){let a=this.sliceSerialize(t);this.tag('<a href="'+s2((e||"")+a)+'">'),this.raw(this.encode(a)),this.tag("</a>")}var opt=f(()=>{o2();i(P0e,"gfmAutolinkLiteralHtml");i(TTa,"literalAutolinkWww");i(_Ta,"literalAutolinkEmail");i(LTa,"literalAutolinkHttp");i(I0e,"anchorFromToken")});var npt=f(()=>{spt();opt()});function l0(t,e,a){let r=[],s=-1;for(;++s<t.length;){let o=t[s].resolveAll;o&&!r.includes(o)&&(e=o(e,a),r.push(o))}return e}var sg=f(()=>{i(l0,"resolveAll")});function $Ta(t,e){let a=-1,r,s,o,n,l,c,d,u;for(;++a<t.length;)if(t[a][0]==="enter"&&t[a][1].type==="attentionSequence"&&t[a][1]._close){for(r=a;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&e.sliceSerialize(t[r][1]).charCodeAt(0)===e.sliceSerialize(t[a][1]).charCodeAt(0)){if((t[r][1]._close||t[a][1]._open)&&(t[a][1].end.offset-t[a][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[a][1].end.offset-t[a][1].start.offset)%3))continue;c=t[r][1].end.offset-t[r][1].start.offset>1&&t[a][1].end.offset-t[a][1].start.offset>1?2:1;let p={...t[r][1].end},m={...t[a][1].start};lpt(p,-c),lpt(m,c),n={type:c>1?"strongSequence":"emphasisSequence",start:p,end:{...t[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...t[a][1].start},end:m},o={type:c>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[a][1].start}},s={type:c>1?"strong":"emphasis",start:{...n.start},end:{...l.end}},t[r][1].end={...n.start},t[a][1].start={...l.end},d=[],t[r][1].end.offset-t[r][1].start.offset&&(d=li(d,[["enter",t[r][1],e],["exit",t[r][1],e]])),d=li(d,[["enter",s,e],["enter",n,e],["exit",n,e],["enter",o,e]]),d=li(d,l0(e.parser.constructs.insideSpan.null,t.slice(r+1,a),e)),d=li(d,[["exit",o,e],["enter",l,e],["exit",l,e],["exit",s,e]]),t[a][1].end.offset-t[a][1].start.offset?(u=2,d=li(d,[["enter",t[a][1],e],["exit",t[a][1],e]])):u=0,Kr(t,r-1,a-r+3,d),a=r+d.length-u-2;break}}for(a=-1;++a<t.length;)t[a][1].type==="attentionSequence"&&(t[a][1].type="data");return t}function DTa(t,e){let a=this.parser.constructs.attentionMarkers.null,r=this.previous,s=dl(r),o;return n;function n(c){return o=c,t.enter("attentionSequence"),l(c)}function l(c){if(c===o)return t.consume(c),l;let d=t.exit("attentionSequence"),u=dl(c),p=!u||u===2&&s||a.includes(c),m=!s||s===2&&u||a.includes(r);return d._open=!!(o===42?p:p&&(s||!m)),d._close=!!(o===42?m:m&&(u||!p)),e(c)}}function lpt(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}var og,cpt=f(()=>{r2();mX();sg();og={name:"attention",resolveAll:$Ta,tokenize:DTa};i($Ta,"resolveAllAttention");i(DTa,"tokenizeAttention");i(lpt,"movePoint")});function ATa(t,e,a){let r=0;return s;function s(v){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(v){return Ti(v)?(t.consume(v),n):v===64?a(v):d(v)}function n(v){return v===43||v===45||v===46||Fr(v)?(r=1,l(v)):d(v)}function l(v){return v===58?(t.consume(v),r=0,c):(v===43||v===45||v===46||Fr(v))&&r++<32?(t.consume(v),l):(r=0,d(v))}function c(v){return v===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),e):v===null||v===32||v===60||C3(v)?a(v):(t.consume(v),c)}function d(v){return v===64?(t.consume(v),u):Zdt(v)?(t.consume(v),d):a(v)}function u(v){return Fr(v)?p(v):a(v)}function p(v){return v===46?(t.consume(v),r=0,u):v===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),e):m(v)}function m(v){if((v===45||Fr(v))&&r++<63){let x=v===45?m:p;return t.consume(v),x}return a(v)}}var E0e,dpt=f(()=>{ga();E0e={name:"autolink",tokenize:ATa};i(ATa,"tokenizeAutolink")});function Et(t,e,a,r){let s=r?r-1:Number.POSITIVE_INFINITY,o=0;return n;function n(c){return Lt(c)?(t.enter(a),l(c)):e(c)}function l(c){return Lt(c)&&o++<s?(t.consume(c),l):(t.exit(a),e(c))}}var Zr=f(()=>{ga();i(Et,"factorySpace")});function ITa(t,e,a){return r;function r(o){return Lt(o)?Et(t,s,"linePrefix")(o):s(o)}function s(o){return o===null||at(o)?e(o):a(o)}}var n2,TX=f(()=>{Zr();ga();n2={partial:!0,tokenize:ITa};i(ITa,"tokenizeBlankLine")});function PTa(t,e,a){let r=this;return s;function s(n){if(n===62){let l=r.containerState;return l.open||(t.enter("blockQuote",{_container:!0}),l.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(n),t.exit("blockQuoteMarker"),o}return a(n)}function o(n){return Lt(n)?(t.enter("blockQuotePrefixWhitespace"),t.consume(n),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(n))}}function ETa(t,e,a){let r=this;return s;function s(n){return Lt(n)?Et(t,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(n):o(n)}function o(n){return t.attempt(_X,e,a)(n)}}function NTa(t){t.exit("blockQuote")}var _X,upt=f(()=>{Zr();ga();_X={continuation:{tokenize:ETa},exit:NTa,name:"blockQuote",tokenize:PTa};i(PTa,"tokenizeBlockQuoteStart");i(ETa,"tokenizeBlockQuoteContinuation");i(NTa,"exit")});function RTa(t,e,a){return r;function r(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),s}function s(o){return Qdt(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):a(o)}}var LX,ppt=f(()=>{ga();LX={name:"characterEscape",tokenize:RTa};i(RTa,"tokenizeCharacterEscape")});function FTa(t,e,a){let r=this,s=0,o,n;return l;function l(p){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(p),t.exit("characterReferenceMarker"),c}function c(p){return p===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(p),t.exit("characterReferenceMarkerNumeric"),d):(t.enter("characterReferenceValue"),o=31,n=Fr,u(p))}function d(p){return p===88||p===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(p),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,n=Xdt,u):(t.enter("characterReferenceValue"),o=7,n=eg,u(p))}function u(p){if(p===59&&s){let m=t.exit("characterReferenceValue");return n===Fr&&!n0(r.sliceSerialize(m))?a(p):(t.enter("characterReferenceMarker"),t.consume(p),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return n(p)&&s++<o?(t.consume(p),u):a(p)}}var $X,fpt=f(()=>{ig();ga();$X={name:"characterReference",tokenize:FTa};i(FTa,"tokenizeCharacterReference")});function OTa(t,e,a){let r=this,s={partial:!0,tokenize:T},o=0,n=0,l;return c;function c(S){return d(S)}function d(S){let N=r.events[r.events.length-1];return o=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,l=S,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),u(S)}function u(S){return S===l?(n++,t.consume(S),u):n<3?a(S):(t.exit("codeFencedFenceSequence"),Lt(S)?Et(t,p,"whitespace")(S):p(S))}function p(S){return S===null||at(S)?(t.exit("codeFencedFence"),r.interrupt?e(S):t.check(hpt,b,R)(S)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||at(S)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),p(S)):Lt(S)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Et(t,v,"whitespace")(S)):S===96&&S===l?a(S):(t.consume(S),m)}function v(S){return S===null||at(S)?p(S):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),x(S))}function x(S){return S===null||at(S)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),p(S)):S===96&&S===l?a(S):(t.consume(S),x)}function b(S){return t.attempt(s,R,g)(S)}function g(S){return t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),y}function y(S){return o>0&&Lt(S)?Et(t,k,"linePrefix",o+1)(S):k(S)}function k(S){return S===null||at(S)?t.check(hpt,b,R)(S):(t.enter("codeFlowValue"),C(S))}function C(S){return S===null||at(S)?(t.exit("codeFlowValue"),k(S)):(t.consume(S),C)}function R(S){return t.exit("codeFenced"),e(S)}function T(S,N,_){let I=0;return O;function O(F){return S.enter("lineEnding"),S.consume(F),S.exit("lineEnding"),M}function M(F){return S.enter("codeFencedFence"),Lt(F)?Et(S,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):z(F)}function z(F){return F===l?(S.enter("codeFencedFenceSequence"),E(F)):_(F)}function E(F){return F===l?(I++,S.consume(F),E):I>=n?(S.exit("codeFencedFenceSequence"),Lt(F)?Et(S,A,"whitespace")(F):A(F)):_(F)}function A(F){return F===null||at(F)?(S.exit("codeFencedFence"),N(F)):_(F)}}}function BTa(t,e,a){let r=this;return s;function s(n){return n===null?a(n):(t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),o)}function o(n){return r.parser.lazy[r.now().line]?a(n):e(n)}}var hpt,DX,mpt=f(()=>{Zr();ga();hpt={partial:!0,tokenize:BTa},DX={concrete:!0,name:"codeFenced",tokenize:OTa};i(OTa,"tokenizeCodeFenced");i(BTa,"tokenizeNonLazyContinuation")});function HTa(t,e,a){let r=this;return s;function s(d){return t.enter("codeIndented"),Et(t,o,"linePrefix",5)(d)}function o(d){let u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?n(d):a(d)}function n(d){return d===null?c(d):at(d)?t.attempt(qTa,n,c)(d):(t.enter("codeFlowValue"),l(d))}function l(d){return d===null||at(d)?(t.exit("codeFlowValue"),n(d)):(t.consume(d),l)}function c(d){return t.exit("codeIndented"),e(d)}}function VTa(t,e,a){let r=this;return s;function s(n){return r.parser.lazy[r.now().line]?a(n):at(n)?(t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),s):Et(t,o,"linePrefix",5)(n)}function o(n){let l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?e(n):at(n)?s(n):a(n)}}var ng,qTa,gpt=f(()=>{Zr();ga();ng={name:"codeIndented",tokenize:HTa},qTa={partial:!0,tokenize:VTa};i(HTa,"tokenizeCodeIndented");i(VTa,"tokenizeFurtherStart")});function jTa(t){let e=t.length-4,a=3,r,s;if((t[a][1].type==="lineEnding"||t[a][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=a;++r<e;)if(t[r][1].type==="codeTextData"){t[a][1].type="codeTextPadding",t[e][1].type="codeTextPadding",a+=2,e-=2;break}}for(r=a-1,e++;++r<=e;)s===void 0?r!==e&&t[r][1].type!=="lineEnding"&&(s=r):(r===e||t[r][1].type==="lineEnding")&&(t[s][1].type="codeTextData",r!==s+2&&(t[s][1].end=t[r-1][1].end,t.splice(s+2,r-s-2),e-=r-s-2,r=s+2),s=void 0);return t}function UTa(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function WTa(t,e,a){let r=this,s=0,o,n;return l;function l(m){return t.enter("codeText"),t.enter("codeTextSequence"),c(m)}function c(m){return m===96?(t.consume(m),s++,c):(t.exit("codeTextSequence"),d(m))}function d(m){return m===null?a(m):m===32?(t.enter("space"),t.consume(m),t.exit("space"),d):m===96?(n=t.enter("codeTextSequence"),o=0,p(m)):at(m)?(t.enter("lineEnding"),t.consume(m),t.exit("lineEnding"),d):(t.enter("codeTextData"),u(m))}function u(m){return m===null||m===32||m===96||at(m)?(t.exit("codeTextData"),d(m)):(t.consume(m),u)}function p(m){return m===96?(t.consume(m),o++,p):o===s?(t.exit("codeTextSequence"),t.exit("codeText"),e(m)):(n.type="codeTextData",u(m))}}var N0e,bpt=f(()=>{ga();N0e={name:"codeText",previous:UTa,resolve:jTa,tokenize:WTa};i(jTa,"resolveCodeText");i(UTa,"previous");i(WTa,"tokenizeCodeText")});function lg(t,e){let a=0;if(e.length<1e4)t.push(...e);else for(;a<e.length;)t.push(...e.slice(a,a+1e4)),a+=1e4}var cg,R0e=f(()=>{cg=class{static{i(this,"SpliceBuffer")}constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,a){let r=a??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,a,r){let s=a||0;this.setCursor(Math.trunc(e));let o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&lg(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),lg(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),lg(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let a=this.left.splice(e,Number.POSITIVE_INFINITY);lg(this.right,a.reverse())}else{let a=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);lg(this.left,a.reverse())}}};i(lg,"chunkedPush")});function AX(t){let e={},a=-1,r,s,o,n,l,c,d,u=new cg(t);for(;++a<u.length;){for(;a in e;)a=e[a];if(r=u.get(a),a&&r[1].type==="chunkFlow"&&u.get(a-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,o=0,o<c.length&&c[o][1].type==="lineEndingBlank"&&(o+=2),o<c.length&&c[o][1].type==="content"))for(;++o<c.length&&c[o][1].type!=="content";)c[o][1].type==="chunkText"&&(c[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,GTa(u,a)),a=e[a],d=!0);else if(r[1]._container){for(o=a,s=void 0;o--;)if(n=u.get(o),n[1].type==="lineEnding"||n[1].type==="lineEndingBlank")n[0]==="enter"&&(s&&(u.get(s)[1].type="lineEndingBlank"),n[1].type="lineEnding",s=o);else if(!(n[1].type==="linePrefix"||n[1].type==="listItemIndent"))break;s&&(r[1].end={...u.get(s)[1].start},l=u.slice(s,a),l.unshift(r),u.splice(s,a-s+1,l))}}return Kr(t,0,Number.POSITIVE_INFINITY,u.slice(0)),!d}function GTa(t,e){let a=t.get(e)[1],r=t.get(e)[2],s=e-1,o=[],n=a._tokenizer;n||(n=r.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(n._contentTypeTextTrailing=!0));let l=n.events,c=[],d={},u,p,m=-1,v=a,x=0,b=0,g=[b];for(;v;){for(;t.get(++s)[1]!==v;);o.push(s),v._tokenizer||(u=r.sliceStream(v),v.next||u.push(null),p&&n.defineSkip(v.start),v._isInFirstContentOfListItem&&(n._gfmTasklistFirstContentOfListItem=!0),n.write(u),v._isInFirstContentOfListItem&&(n._gfmTasklistFirstContentOfListItem=void 0)),p=v,v=v.next}for(v=a;++m<l.length;)l[m][0]==="exit"&&l[m-1][0]==="enter"&&l[m][1].type===l[m-1][1].type&&l[m][1].start.line!==l[m][1].end.line&&(b=m+1,g.push(b),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(n.events=[],v?(v._tokenizer=void 0,v.previous=void 0):g.pop(),m=g.length;m--;){let y=l.slice(g[m],g[m+1]),k=o.pop();c.push([k,k+y.length-1]),t.splice(k,2,y)}for(c.reverse(),m=-1;++m<c.length;)d[x+c[m][0]]=x+c[m][1],x+=c[m][1]-c[m][0]-1;return d}var F0e=f(()=>{r2();R0e();R0e();i(AX,"subtokenize");i(GTa,"subcontent")});function KTa(t){return AX(t),t}function ZTa(t,e){let a;return r;function r(l){return t.enter("content"),a=t.enter("chunkContent",{contentType:"content"}),s(l)}function s(l){return l===null?o(l):at(l)?t.check(YTa,n,o)(l):(t.consume(l),s)}function o(l){return t.exit("chunkContent"),t.exit("content"),e(l)}function n(l){return t.consume(l),t.exit("chunkContent"),a.next=t.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,s}}function XTa(t,e,a){let r=this;return s;function s(n){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),Et(t,o,"linePrefix")}function o(n){if(n===null||at(n))return a(n);let l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?e(n):t.interrupt(r.parser.constructs.flow,a,e)(n)}}var O0e,YTa,vpt=f(()=>{Zr();ga();F0e();O0e={resolve:KTa,tokenize:ZTa},YTa={partial:!0,tokenize:XTa};i(KTa,"resolveContent");i(ZTa,"tokenizeContent");i(XTa,"tokenizeContinuation")});function IX(t,e,a,r,s,o,n,l,c){let d=c||Number.POSITIVE_INFINITY,u=0;return p;function p(y){return y===60?(t.enter(r),t.enter(s),t.enter(o),t.consume(y),t.exit(o),m):y===null||y===32||y===41||C3(y)?a(y):(t.enter(r),t.enter(n),t.enter(l),t.enter("chunkString",{contentType:"string"}),b(y))}function m(y){return y===62?(t.enter(o),t.consume(y),t.exit(o),t.exit(s),t.exit(r),e):(t.enter(l),t.enter("chunkString",{contentType:"string"}),v(y))}function v(y){return y===62?(t.exit("chunkString"),t.exit(l),m(y)):y===null||y===60||at(y)?a(y):(t.consume(y),y===92?x:v)}function x(y){return y===60||y===62||y===92?(t.consume(y),v):v(y)}function b(y){return!u&&(y===null||y===41||ua(y))?(t.exit("chunkString"),t.exit(l),t.exit(n),t.exit(r),e(y)):u<d&&y===40?(t.consume(y),u++,b):y===41?(t.consume(y),u--,b):y===null||y===32||y===40||C3(y)?a(y):(t.consume(y),y===92?g:b)}function g(y){return y===40||y===41||y===92?(t.consume(y),b):b(y)}}var B0e=f(()=>{ga();i(IX,"factoryDestination")});function PX(t,e,a,r,s,o){let n=this,l=0,c;return d;function d(v){return t.enter(r),t.enter(s),t.consume(v),t.exit(s),t.enter(o),u}function u(v){return l>999||v===null||v===91||v===93&&!c||v===94&&!l&&"_hiddenFootnoteSupport"in n.parser.constructs?a(v):v===93?(t.exit(o),t.enter(s),t.consume(v),t.exit(s),t.exit(r),e):at(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),u):(t.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===null||v===91||v===93||at(v)||l++>999?(t.exit("chunkString"),u(v)):(t.consume(v),c||(c=!Lt(v)),v===92?m:p)}function m(v){return v===91||v===92||v===93?(t.consume(v),l++,p):p(v)}}var q0e=f(()=>{ga();i(PX,"factoryLabel")});function EX(t,e,a,r,s,o){let n;return l;function l(m){return m===34||m===39||m===40?(t.enter(r),t.enter(s),t.consume(m),t.exit(s),n=m===40?41:m,c):a(m)}function c(m){return m===n?(t.enter(s),t.consume(m),t.exit(s),t.exit(r),e):(t.enter(o),d(m))}function d(m){return m===n?(t.exit(o),c(n)):m===null?a(m):at(m)?(t.enter("lineEnding"),t.consume(m),t.exit("lineEnding"),Et(t,d,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(m))}function u(m){return m===n||m===null||at(m)?(t.exit("chunkString"),d(m)):(t.consume(m),m===92?p:u)}function p(m){return m===n||m===92?(t.consume(m),u):u(m)}}var H0e=f(()=>{Zr();ga();i(EX,"factoryTitle")});function A3(t,e){let a;return r;function r(s){return at(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),a=!0,r):Lt(s)?Et(t,r,a?"linePrefix":"lineSuffix")(s):e(s)}}var V0e=f(()=>{Zr();ga();i(A3,"factoryWhitespace")});function JTa(t,e,a){let r=this,s;return o;function o(v){return t.enter("definition"),n(v)}function n(v){return PX.call(r,t,l,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function l(v){return s=Or(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),v===58?(t.enter("definitionMarker"),t.consume(v),t.exit("definitionMarker"),c):a(v)}function c(v){return ua(v)?A3(t,d)(v):d(v)}function d(v){return IX(t,u,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function u(v){return t.attempt(QTa,p,p)(v)}function p(v){return Lt(v)?Et(t,m,"whitespace")(v):m(v)}function m(v){return v===null||at(v)?(t.exit("definition"),r.parser.defined.push(s),e(v)):a(v)}}function e_a(t,e,a){return r;function r(l){return ua(l)?A3(t,s)(l):a(l)}function s(l){return EX(t,o,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return Lt(l)?Et(t,n,"whitespace")(l):n(l)}function n(l){return l===null||at(l)?e(l):a(l)}}var j0e,QTa,xpt=f(()=>{B0e();q0e();Zr();H0e();V0e();ga();o0();j0e={name:"definition",tokenize:JTa},QTa={partial:!0,tokenize:e_a};i(JTa,"tokenizeDefinition");i(e_a,"tokenizeTitleBefore")});function t_a(t,e,a){return r;function r(o){return t.enter("hardBreakEscape"),t.consume(o),s}function s(o){return at(o)?(t.exit("hardBreakEscape"),e(o)):a(o)}}var U0e,ypt=f(()=>{ga();U0e={name:"hardBreakEscape",tokenize:t_a};i(t_a,"tokenizeHardBreakEscape")});function a_a(t,e){let a=t.length-2,r=3,s,o;return t[r][1].type==="whitespace"&&(r+=2),a-2>r&&t[a][1].type==="whitespace"&&(a-=2),t[a][1].type==="atxHeadingSequence"&&(r===a-1||a-4>r&&t[a-2][1].type==="whitespace")&&(a-=r+1===a?2:4),a>r&&(s={type:"atxHeadingText",start:t[r][1].start,end:t[a][1].end},o={type:"chunkText",start:t[r][1].start,end:t[a][1].end,contentType:"text"},Kr(t,r,a-r+1,[["enter",s,e],["enter",o,e],["exit",o,e],["exit",s,e]])),t}function r_a(t,e,a){let r=0;return s;function s(u){return t.enter("atxHeading"),o(u)}function o(u){return t.enter("atxHeadingSequence"),n(u)}function n(u){return u===35&&r++<6?(t.consume(u),n):u===null||ua(u)?(t.exit("atxHeadingSequence"),l(u)):a(u)}function l(u){return u===35?(t.enter("atxHeadingSequence"),c(u)):u===null||at(u)?(t.exit("atxHeading"),e(u)):Lt(u)?Et(t,l,"whitespace")(u):(t.enter("atxHeadingText"),d(u))}function c(u){return u===35?(t.consume(u),c):(t.exit("atxHeadingSequence"),l(u))}function d(u){return u===null||u===35||ua(u)?(t.exit("atxHeadingText"),l(u)):(t.consume(u),d)}}var W0e,wpt=f(()=>{Zr();ga();r2();W0e={name:"headingAtx",resolve:a_a,tokenize:r_a};i(a_a,"resolveHeadingAtx");i(r_a,"tokenizeHeadingAtx")});var Mpt,G0e,kpt=f(()=>{Mpt=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],G0e=["pre","script","style","textarea"]});function o_a(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function n_a(t,e,a){let r=this,s,o,n,l,c;return d;function d(P){return u(P)}function u(P){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(P),p}function p(P){return P===33?(t.consume(P),m):P===47?(t.consume(P),o=!0,b):P===63?(t.consume(P),s=3,r.interrupt?e:B):Ti(P)?(t.consume(P),n=String.fromCharCode(P),g):a(P)}function m(P){return P===45?(t.consume(P),s=2,v):P===91?(t.consume(P),s=5,l=0,x):Ti(P)?(t.consume(P),s=4,r.interrupt?e:B):a(P)}function v(P){return P===45?(t.consume(P),r.interrupt?e:B):a(P)}function x(P){let H="CDATA[";return P===H.charCodeAt(l++)?(t.consume(P),l===H.length?r.interrupt?e:z:x):a(P)}function b(P){return Ti(P)?(t.consume(P),n=String.fromCharCode(P),g):a(P)}function g(P){if(P===null||P===47||P===62||ua(P)){let H=P===47,de=n.toLowerCase();return!H&&!o&&G0e.includes(de)?(s=1,r.interrupt?e(P):z(P)):Mpt.includes(n.toLowerCase())?(s=6,H?(t.consume(P),y):r.interrupt?e(P):z(P)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?a(P):o?k(P):C(P))}return P===45||Fr(P)?(t.consume(P),n+=String.fromCharCode(P),g):a(P)}function y(P){return P===62?(t.consume(P),r.interrupt?e:z):a(P)}function k(P){return Lt(P)?(t.consume(P),k):O(P)}function C(P){return P===47?(t.consume(P),O):P===58||P===95||Ti(P)?(t.consume(P),R):Lt(P)?(t.consume(P),C):O(P)}function R(P){return P===45||P===46||P===58||P===95||Fr(P)?(t.consume(P),R):T(P)}function T(P){return P===61?(t.consume(P),S):Lt(P)?(t.consume(P),T):C(P)}function S(P){return P===null||P===60||P===61||P===62||P===96?a(P):P===34||P===39?(t.consume(P),c=P,N):Lt(P)?(t.consume(P),S):_(P)}function N(P){return P===c?(t.consume(P),c=null,I):P===null||at(P)?a(P):(t.consume(P),N)}function _(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||ua(P)?T(P):(t.consume(P),_)}function I(P){return P===47||P===62||Lt(P)?C(P):a(P)}function O(P){return P===62?(t.consume(P),M):a(P)}function M(P){return P===null||at(P)?z(P):Lt(P)?(t.consume(P),M):a(P)}function z(P){return P===45&&s===2?(t.consume(P),K):P===60&&s===1?(t.consume(P),j):P===62&&s===4?(t.consume(P),J):P===63&&s===3?(t.consume(P),B):P===93&&s===5?(t.consume(P),he):at(P)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(i_a,ve,E)(P)):P===null||at(P)?(t.exit("htmlFlowData"),E(P)):(t.consume(P),z)}function E(P){return t.check(s_a,A,ve)(P)}function A(P){return t.enter("lineEnding"),t.consume(P),t.exit("lineEnding"),F}function F(P){return P===null||at(P)?E(P):(t.enter("htmlFlowData"),z(P))}function K(P){return P===45?(t.consume(P),B):z(P)}function j(P){return P===47?(t.consume(P),n="",U):z(P)}function U(P){if(P===62){let H=n.toLowerCase();return G0e.includes(H)?(t.consume(P),J):z(P)}return Ti(P)&&n.length<8?(t.consume(P),n+=String.fromCharCode(P),U):z(P)}function he(P){return P===93?(t.consume(P),B):z(P)}function B(P){return P===62?(t.consume(P),J):P===45&&s===2?(t.consume(P),B):z(P)}function J(P){return P===null||at(P)?(t.exit("htmlFlowData"),ve(P)):(t.consume(P),J)}function ve(P){return t.exit("htmlFlow"),e(P)}}function l_a(t,e,a){let r=this;return s;function s(n){return at(n)?(t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),o):a(n)}function o(n){return r.parser.lazy[r.now().line]?a(n):e(n)}}function c_a(t,e,a){return r;function r(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),t.attempt(n2,e,a)}}var Y0e,i_a,s_a,Spt=f(()=>{ga();kpt();TX();Y0e={concrete:!0,name:"htmlFlow",resolveTo:o_a,tokenize:n_a},i_a={partial:!0,tokenize:c_a},s_a={partial:!0,tokenize:l_a};i(o_a,"resolveToHtmlFlow");i(n_a,"tokenizeHtmlFlow");i(l_a,"tokenizeNonLazyContinuationStart");i(c_a,"tokenizeBlankLineBefore")});function d_a(t,e,a){let r=this,s,o,n;return l;function l(B){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(B),c}function c(B){return B===33?(t.consume(B),d):B===47?(t.consume(B),T):B===63?(t.consume(B),C):Ti(B)?(t.consume(B),_):a(B)}function d(B){return B===45?(t.consume(B),u):B===91?(t.consume(B),o=0,x):Ti(B)?(t.consume(B),k):a(B)}function u(B){return B===45?(t.consume(B),v):a(B)}function p(B){return B===null?a(B):B===45?(t.consume(B),m):at(B)?(n=p,j(B)):(t.consume(B),p)}function m(B){return B===45?(t.consume(B),v):p(B)}function v(B){return B===62?K(B):B===45?m(B):p(B)}function x(B){let J="CDATA[";return B===J.charCodeAt(o++)?(t.consume(B),o===J.length?b:x):a(B)}function b(B){return B===null?a(B):B===93?(t.consume(B),g):at(B)?(n=b,j(B)):(t.consume(B),b)}function g(B){return B===93?(t.consume(B),y):b(B)}function y(B){return B===62?K(B):B===93?(t.consume(B),y):b(B)}function k(B){return B===null||B===62?K(B):at(B)?(n=k,j(B)):(t.consume(B),k)}function C(B){return B===null?a(B):B===63?(t.consume(B),R):at(B)?(n=C,j(B)):(t.consume(B),C)}function R(B){return B===62?K(B):C(B)}function T(B){return Ti(B)?(t.consume(B),S):a(B)}function S(B){return B===45||Fr(B)?(t.consume(B),S):N(B)}function N(B){return at(B)?(n=N,j(B)):Lt(B)?(t.consume(B),N):K(B)}function _(B){return B===45||Fr(B)?(t.consume(B),_):B===47||B===62||ua(B)?I(B):a(B)}function I(B){return B===47?(t.consume(B),K):B===58||B===95||Ti(B)?(t.consume(B),O):at(B)?(n=I,j(B)):Lt(B)?(t.consume(B),I):K(B)}function O(B){return B===45||B===46||B===58||B===95||Fr(B)?(t.consume(B),O):M(B)}function M(B){return B===61?(t.consume(B),z):at(B)?(n=M,j(B)):Lt(B)?(t.consume(B),M):I(B)}function z(B){return B===null||B===60||B===61||B===62||B===96?a(B):B===34||B===39?(t.consume(B),s=B,E):at(B)?(n=z,j(B)):Lt(B)?(t.consume(B),z):(t.consume(B),A)}function E(B){return B===s?(t.consume(B),s=void 0,F):B===null?a(B):at(B)?(n=E,j(B)):(t.consume(B),E)}function A(B){return B===null||B===34||B===39||B===60||B===61||B===96?a(B):B===47||B===62||ua(B)?I(B):(t.consume(B),A)}function F(B){return B===47||B===62||ua(B)?I(B):a(B)}function K(B){return B===62?(t.consume(B),t.exit("htmlTextData"),t.exit("htmlText"),e):a(B)}function j(B){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(B),t.exit("lineEnding"),U}function U(B){return Lt(B)?Et(t,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):he(B)}function he(B){return t.enter("htmlTextData"),n(B)}}var K0e,Cpt=f(()=>{Zr();ga();K0e={name:"htmlText",tokenize:d_a};i(d_a,"tokenizeHtmlText")});function h_a(t){let e=-1,a=[];for(;++e<t.length;){let r=t[e][1];if(a.push(t[e]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){let s=r.type==="labelImage"?4:2;r.type="data",e+=s}}return t.length!==a.length&&Kr(t,0,t.length,a),t}function m_a(t,e){let a=t.length,r=0,s,o,n,l;for(;a--;)if(s=t[a][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;t[a][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(n){if(t[a][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=a,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(n=a);let c={type:t[o][1].type==="labelLink"?"link":"image",start:{...t[o][1].start},end:{...t[t.length-1][1].end}},d={type:"label",start:{...t[o][1].start},end:{...t[n][1].end}},u={type:"labelText",start:{...t[o+r+2][1].end},end:{...t[n-2][1].start}};return l=[["enter",c,e],["enter",d,e]],l=li(l,t.slice(o+1,o+r+3)),l=li(l,[["enter",u,e]]),l=li(l,l0(e.parser.constructs.insideSpan.null,t.slice(o+r+4,n-3),e)),l=li(l,[["exit",u,e],t[n-2],t[n-1],["exit",d,e]]),l=li(l,t.slice(n+1)),l=li(l,[["exit",c,e]]),Kr(t,o,t.length,l),t}function g_a(t,e,a){let r=this,s=r.events.length,o,n;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){o=r.events[s][1];break}return l;function l(m){return o?o._inactive?p(m):(n=r.parser.defined.includes(Or(r.sliceSerialize({start:o.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(m),t.exit("labelMarker"),t.exit("labelEnd"),c):a(m)}function c(m){return m===40?t.attempt(u_a,u,n?u:p)(m):m===91?t.attempt(p_a,u,n?d:p)(m):n?u(m):p(m)}function d(m){return t.attempt(f_a,u,p)(m)}function u(m){return e(m)}function p(m){return o._balanced=!0,a(m)}}function b_a(t,e,a){return r;function r(p){return t.enter("resource"),t.enter("resourceMarker"),t.consume(p),t.exit("resourceMarker"),s}function s(p){return ua(p)?A3(t,o)(p):o(p)}function o(p){return p===41?u(p):IX(t,n,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function n(p){return ua(p)?A3(t,c)(p):u(p)}function l(p){return a(p)}function c(p){return p===34||p===39||p===40?EX(t,d,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):u(p)}function d(p){return ua(p)?A3(t,u)(p):u(p)}function u(p){return p===41?(t.enter("resourceMarker"),t.consume(p),t.exit("resourceMarker"),t.exit("resource"),e):a(p)}}function v_a(t,e,a){let r=this;return s;function s(l){return PX.call(r,t,o,n,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(Or(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(l):a(l)}function n(l){return a(l)}}function x_a(t,e,a){return r;function r(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),s}function s(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),e):a(o)}}var I3,u_a,p_a,f_a,NX=f(()=>{B0e();q0e();H0e();V0e();ga();r2();o0();sg();I3={name:"labelEnd",resolveAll:h_a,resolveTo:m_a,tokenize:g_a},u_a={tokenize:b_a},p_a={tokenize:v_a},f_a={tokenize:x_a};i(h_a,"resolveAllLabelEnd");i(m_a,"resolveToLabelEnd");i(g_a,"tokenizeLabelEnd");i(b_a,"tokenizeResource");i(v_a,"tokenizeReferenceFull");i(x_a,"tokenizeReferenceCollapsed")});function y_a(t,e,a){let r=this;return s;function s(l){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(l),t.exit("labelImageMarker"),o}function o(l){return l===91?(t.enter("labelMarker"),t.consume(l),t.exit("labelMarker"),t.exit("labelImage"),n):a(l)}function n(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?a(l):e(l)}}var Z0e,zpt=f(()=>{NX();Z0e={name:"labelStartImage",resolveAll:I3.resolveAll,tokenize:y_a};i(y_a,"tokenizeLabelStartImage")});function w_a(t,e,a){let r=this;return s;function s(n){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(n),t.exit("labelMarker"),t.exit("labelLink"),o}function o(n){return n===94&&"_hiddenFootnoteSupport"in r.parser.constructs?a(n):e(n)}}var X0e,Tpt=f(()=>{NX();X0e={name:"labelStartLink",resolveAll:I3.resolveAll,tokenize:w_a};i(w_a,"tokenizeLabelStartLink")});function M_a(t,e){return a;function a(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),Et(t,e,"linePrefix")}}var dg,_pt=f(()=>{Zr();ga();dg={name:"lineEnding",tokenize:M_a};i(M_a,"tokenizeLineEnding")});function k_a(t,e,a){let r=0,s;return o;function o(d){return t.enter("thematicBreak"),n(d)}function n(d){return s=d,l(d)}function l(d){return d===s?(t.enter("thematicBreakSequence"),c(d)):r>=3&&(d===null||at(d))?(t.exit("thematicBreak"),e(d)):a(d)}function c(d){return d===s?(t.consume(d),r++,c):(t.exit("thematicBreakSequence"),Lt(d)?Et(t,l,"whitespace")(d):l(d))}}var P3,Q0e=f(()=>{Zr();ga();P3={name:"thematicBreak",tokenize:k_a};i(k_a,"tokenizeThematicBreak")});function z_a(t,e,a){let r=this,s=r.events[r.events.length-1],o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,n=0;return l;function l(v){let x=r.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||v===r.containerState.marker:eg(v)){if(r.containerState.type||(r.containerState.type=x,t.enter(x,{_container:!0})),x==="listUnordered")return t.enter("listItemPrefix"),v===42||v===45?t.check(P3,a,d)(v):d(v);if(!r.interrupt||v===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),c(v)}return a(v)}function c(v){return eg(v)&&++n<10?(t.consume(v),c):(!r.interrupt||n<2)&&(r.containerState.marker?v===r.containerState.marker:v===41||v===46)?(t.exit("listItemValue"),d(v)):a(v)}function d(v){return t.enter("listItemMarker"),t.consume(v),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||v,t.check(n2,r.interrupt?a:u,t.attempt(S_a,m,p))}function u(v){return r.containerState.initialBlankLine=!0,o++,m(v)}function p(v){return Lt(v)?(t.enter("listItemPrefixWhitespace"),t.consume(v),t.exit("listItemPrefixWhitespace"),m):a(v)}function m(v){return r.containerState.size=o+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(v)}}function T_a(t,e,a){let r=this;return r.containerState._closeFlow=void 0,t.check(n2,s,o);function s(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Et(t,e,"listItemIndent",r.containerState.size+1)(l)}i(s,"onBlank");function o(l){return r.containerState.furtherBlankLines||!Lt(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,n(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(C_a,e,n)(l))}i(o,"notBlank");function n(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Et(t,t.attempt(zs,e,a),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}i(n,"notInCurrentItem")}function __a(t,e,a){let r=this;return Et(t,s,"listItemIndent",r.containerState.size+1);function s(o){let n=r.events[r.events.length-1];return n&&n[1].type==="listItemIndent"&&n[2].sliceSerialize(n[1],!0).length===r.containerState.size?e(o):a(o)}}function L_a(t){t.exit(this.containerState.type)}function $_a(t,e,a){let r=this;return Et(t,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){let n=r.events[r.events.length-1];return!Lt(o)&&n&&n[1].type==="listItemPrefixWhitespace"?e(o):a(o)}}var zs,S_a,C_a,Lpt=f(()=>{Zr();ga();TX();Q0e();zs={continuation:{tokenize:T_a},exit:L_a,name:"list",tokenize:z_a},S_a={partial:!0,tokenize:$_a},C_a={partial:!0,tokenize:__a};i(z_a,"tokenizeListStart");i(T_a,"tokenizeListContinuation");i(__a,"tokenizeIndent");i(L_a,"tokenizeListEnd");i($_a,"tokenizeListItemPrefixWhitespace")});function D_a(t,e){let a=t.length,r,s,o;for(;a--;)if(t[a][0]==="enter"){if(t[a][1].type==="content"){r=a;break}t[a][1].type==="paragraph"&&(s=a)}else t[a][1].type==="content"&&t.splice(a,1),!o&&t[a][1].type==="definition"&&(o=a);let n={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[s][1].type="setextHeadingText",o?(t.splice(s,0,["enter",n,e]),t.splice(o+1,0,["exit",t[r][1],e]),t[r][1].end={...t[o][1].end}):t[r][1]=n,t.push(["exit",n,e]),t}function A_a(t,e,a){let r=this,s;return o;function o(d){let u=r.events.length,p;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){p=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(t.enter("setextHeadingLine"),s=d,n(d)):a(d)}function n(d){return t.enter("setextHeadingLineSequence"),l(d)}function l(d){return d===s?(t.consume(d),l):(t.exit("setextHeadingLineSequence"),Lt(d)?Et(t,c,"lineSuffix")(d):c(d))}function c(d){return d===null||at(d)?(t.exit("setextHeadingLine"),e(d)):a(d)}}var RX,$pt=f(()=>{Zr();ga();RX={name:"setextUnderline",resolveTo:D_a,tokenize:A_a};i(D_a,"resolveToSetextUnderline");i(A_a,"tokenizeSetextUnderline")});var FX=f(()=>{cpt();dpt();TX();upt();ppt();fpt();mpt();gpt();bpt();vpt();xpt();ypt();wpt();Spt();Cpt();NX();zpt();Tpt();_pt();Lpt();$pt();Q0e()});function J0e(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:R_a,continuation:{tokenize:F_a},exit:O_a}},text:{91:{name:"gfmFootnoteCall",tokenize:N_a},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:P_a,resolveTo:E_a}}}}function P_a(t,e,a){let r=this,s=r.events.length,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),n;for(;s--;){let c=r.events[s][1];if(c.type==="labelImage"){n=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!n||!n._balanced)return a(c);let d=Or(r.sliceSerialize({start:n.end,end:r.now()}));return d.codePointAt(0)!==94||!o.includes(d.slice(1))?a(c):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(c),t.exit("gfmFootnoteCallLabelMarker"),e(c))}}function E_a(t,e){let a=t.length,r;for(;a--;)if(t[a][1].type==="labelImage"&&t[a][0]==="enter"){r=t[a][1];break}t[a+1][1].type="data",t[a+3][1].type="gfmFootnoteCallLabelMarker";let s={type:"gfmFootnoteCall",start:Object.assign({},t[a+3][1].start),end:Object.assign({},t[t.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[a+3][1].end),end:Object.assign({},t[a+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let n={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},n.start),end:Object.assign({},n.end)},c=[t[a+1],t[a+2],["enter",s,e],t[a+3],t[a+4],["enter",o,e],["exit",o,e],["enter",n,e],["enter",l,e],["exit",l,e],["exit",n,e],t[t.length-2],t[t.length-1],["exit",s,e]];return t.splice(a,t.length-a+1,...c),t}function N_a(t,e,a){let r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o=0,n;return l;function l(p){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),c}function c(p){return p!==94?a(p):(t.enter("gfmFootnoteCallMarker"),t.consume(p),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",d)}function d(p){if(o>999||p===93&&!n||p===null||p===91||ua(p))return a(p);if(p===93){t.exit("chunkString");let m=t.exit("gfmFootnoteCallString");return s.includes(Or(r.sliceSerialize(m)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):a(p)}return ua(p)||(n=!0),o++,t.consume(p),p===92?u:d}function u(p){return p===91||p===92||p===93?(t.consume(p),o++,d):d(p)}}function R_a(t,e,a){let r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o,n=0,l;return c;function c(x){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(x),t.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(x){return x===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(x),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",u):a(x)}function u(x){if(n>999||x===93&&!l||x===null||x===91||ua(x))return a(x);if(x===93){t.exit("chunkString");let b=t.exit("gfmFootnoteDefinitionLabelString");return o=Or(r.sliceSerialize(b)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(x),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),m}return ua(x)||(l=!0),n++,t.consume(x),x===92?p:u}function p(x){return x===91||x===92||x===93?(t.consume(x),n++,u):u(x)}function m(x){return x===58?(t.enter("definitionMarker"),t.consume(x),t.exit("definitionMarker"),s.includes(o)||s.push(o),Et(t,v,"gfmFootnoteDefinitionWhitespace")):a(x)}function v(x){return e(x)}}function F_a(t,e,a){return t.check(n2,e,t.attempt(I_a,e,a))}function O_a(t){t.exit("gfmFootnoteDefinition")}function B_a(t,e,a){let r=this;return Et(t,s,"gfmFootnoteDefinitionIndent",5);function s(o){let n=r.events[r.events.length-1];return n&&n[1].type==="gfmFootnoteDefinitionIndent"&&n[2].sliceSerialize(n[1],!0).length===4?e(o):a(o)}}var I_a,Dpt=f(()=>{FX();Zr();ga();o0();I_a={tokenize:B_a,partial:!0};i(J0e,"gfmFootnote");i(P_a,"tokenizePotentialGfmFootnoteCall");i(E_a,"resolveToPotentialGfmFootnoteCall");i(N_a,"tokenizeGfmFootnoteCall");i(R_a,"tokenizeDefinitionStart");i(F_a,"tokenizeDefinitionContinuation");i(O_a,"gfmFootnoteDefinitionEnd");i(B_a,"tokenizeIndent")});function Apt(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function e4e(t){let e=t||H_a,a=e.label||"Footnotes",r=e.labelTagName||"h2",s=e.labelAttributes===null||e.labelAttributes===void 0?'class="sr-only"':e.labelAttributes,o=e.backLabel||Apt,n=e.clobberPrefix===null||e.clobberPrefix===void 0?"user-content-":e.clobberPrefix;return{enter:{gfmFootnoteDefinition(){this.getData("tightStack").push(!1)},gfmFootnoteDefinitionLabelString(){this.buffer()},gfmFootnoteCallString(){this.buffer()}},exit:{gfmFootnoteDefinition(){let l=this.getData("gfmFootnoteDefinitions"),c=this.getData("gfmFootnoteDefinitionStack"),d=this.getData("tightStack"),u=c.pop(),p=this.resume();l||this.setData("gfmFootnoteDefinitions",l={}),q_a.call(l,u)||(l[u]=p),d.pop(),this.setData("slurpOneLineEnding",!0),this.setData("lastWasTag")},gfmFootnoteDefinitionLabelString(l){let c=this.getData("gfmFootnoteDefinitionStack");c||this.setData("gfmFootnoteDefinitionStack",c=[]),c.push(Or(this.sliceSerialize(l))),this.resume(),this.buffer()},gfmFootnoteCallString(l){let c=this.getData("gfmFootnoteCallOrder"),d=this.getData("gfmFootnoteCallCounts"),u=Or(this.sliceSerialize(l)),p;this.resume(),c||this.setData("gfmFootnoteCallOrder",c=[]),d||this.setData("gfmFootnoteCallCounts",d={});let m=c.indexOf(u),v=s2(u.toLowerCase());m===-1?(c.push(u),d[u]=1,p=c.length):(d[u]++,p=m+1);let x=d[u];this.tag('<sup><a href="#'+n+"fn-"+v+'" id="'+n+"fnref-"+v+(x>1?"-"+x:"")+'" data-footnote-ref="" aria-describedby="footnote-label">'+String(p)+"</a></sup>")},null(){let l=this.getData("gfmFootnoteCallOrder")||[],c=this.getData("gfmFootnoteCallCounts")||{},d=this.getData("gfmFootnoteDefinitions")||{},u=-1;for(l.length>0&&(this.lineEndingIfNeeded(),this.tag('<section data-footnotes="" class="footnotes"><'+r+' id="footnote-label"'+(s?" "+s:"")+">"),this.raw(this.encode(a)),this.tag("</"+r+">"),this.lineEndingIfNeeded(),this.tag("<ol>"));++u<l.length;){let p=l[u],m=s2(p.toLowerCase()),v=0,x=[];for(;++v<=c[p];)x.push('<a href="#'+n+"fnref-"+m+(v>1?"-"+v:"")+'" data-footnote-backref="" aria-label="'+this.encode(typeof o=="string"?o:o(u,v))+'" class="data-footnote-backref">\u21A9'+(v>1?"<sup>"+v+"</sup>":"")+"</a>");let b=x.join(" "),g=!1;this.lineEndingIfNeeded(),this.tag('<li id="'+n+"fn-"+m+'">'),this.lineEndingIfNeeded(),this.tag(d[p].replace(/<\/p>(?:\r?\n|\r)?$/,function(y){return g=!0," "+b+y})),g||(this.lineEndingIfNeeded(),this.tag(b)),this.lineEndingIfNeeded(),this.tag("</li>")}l.length>0&&(this.lineEndingIfNeeded(),this.tag("</ol>"),this.lineEndingIfNeeded(),this.tag("</section>"))}}}}var q_a,H_a,Ipt=f(()=>{o0();o2();q_a={}.hasOwnProperty,H_a={};i(Apt,"defaultBackLabel");i(e4e,"gfmFootnoteHtml")});var Ppt=f(()=>{Dpt();Ipt()});function t4e(){return{enter:{strikethrough(){this.tag("<del>")}},exit:{strikethrough(){this.tag("</del>")}}}}var Ept=f(()=>{i(t4e,"gfmStrikethroughHtml")});function a4e(t){let a=(t||{}).singleTilde,r={name:"strikethrough",tokenize:o,resolveAll:s};return a==null&&(a=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(n,l){let c=-1;for(;++c<n.length;)if(n[c][0]==="enter"&&n[c][1].type==="strikethroughSequenceTemporary"&&n[c][1]._close){let d=c;for(;d--;)if(n[d][0]==="exit"&&n[d][1].type==="strikethroughSequenceTemporary"&&n[d][1]._open&&n[c][1].end.offset-n[c][1].start.offset===n[d][1].end.offset-n[d][1].start.offset){n[c][1].type="strikethroughSequence",n[d][1].type="strikethroughSequence";let u={type:"strikethrough",start:Object.assign({},n[d][1].start),end:Object.assign({},n[c][1].end)},p={type:"strikethroughText",start:Object.assign({},n[d][1].end),end:Object.assign({},n[c][1].start)},m=[["enter",u,l],["enter",n[d][1],l],["exit",n[d][1],l],["enter",p,l]],v=l.parser.constructs.insideSpan.null;v&&Kr(m,m.length,0,l0(v,n.slice(d+1,c),l)),Kr(m,m.length,0,[["exit",p,l],["enter",n[c][1],l],["exit",n[c][1],l],["exit",u,l]]),Kr(n,d-1,c-d+3,m),c=d+m.length-2;break}}for(c=-1;++c<n.length;)n[c][1].type==="strikethroughSequenceTemporary"&&(n[c][1].type="data");return n}i(s,"resolveAllStrikethrough");function o(n,l,c){let d=this.previous,u=this.events,p=0;return m;function m(x){return d===126&&u[u.length-1][1].type!=="characterEscape"?c(x):(n.enter("strikethroughSequenceTemporary"),v(x))}function v(x){let b=dl(d);if(x===126)return p>1?c(x):(n.consume(x),p++,v);if(p<2&&!a)return c(x);let g=n.exit("strikethroughSequenceTemporary"),y=dl(x);return g._open=!y||y===2&&!!b,g._close=!b||b===2&&!!y,l(x)}}i(o,"tokenizeStrikethrough")}var Npt=f(()=>{r2();mX();sg();i(a4e,"gfmStrikethrough")});var Rpt=f(()=>{Ept();Npt()});function i4e(){return{enter:{table(t){let e=t._align;this.lineEndingIfNeeded(),this.tag("<table>"),this.setData("tableAlign",e)},tableBody(){this.tag("<tbody>")},tableData(){let t=this.getData("tableAlign"),e=this.getData("tableColumn"),a=r4e[t[e]];a===void 0?this.buffer():(this.lineEndingIfNeeded(),this.tag("<td"+a+">"))},tableHead(){this.lineEndingIfNeeded(),this.tag("<thead>")},tableHeader(){let t=this.getData("tableAlign"),e=this.getData("tableColumn"),a=r4e[t[e]];this.lineEndingIfNeeded(),this.tag("<th"+a+">")},tableRow(){this.setData("tableColumn",0),this.lineEndingIfNeeded(),this.tag("<tr>")}},exit:{codeTextData(t){let e=this.sliceSerialize(t);this.getData("tableAlign")&&(e=e.replace(/\\([\\|])/g,V_a)),this.raw(this.encode(e))},table(){this.setData("tableAlign"),this.setData("slurpAllLineEndings"),this.lineEndingIfNeeded(),this.tag("</table>")},tableBody(){this.lineEndingIfNeeded(),this.tag("</tbody>")},tableData(){let t=this.getData("tableAlign"),e=this.getData("tableColumn");e in t?(this.tag("</td>"),this.setData("tableColumn",e+1)):this.resume()},tableHead(){this.lineEndingIfNeeded(),this.tag("</thead>")},tableHeader(){let t=this.getData("tableColumn");this.tag("</th>"),this.setData("tableColumn",t+1)},tableRow(){let t=this.getData("tableAlign"),e=this.getData("tableColumn");for(;e<t.length;)this.lineEndingIfNeeded(),this.tag("<td"+r4e[t[e]]+"></td>"),e++;this.setData("tableColumn",e),this.lineEndingIfNeeded(),this.tag("</tr>")}}}}function V_a(t,e){return e==="|"?e:t}var r4e,Fpt=f(()=>{r4e={none:"",left:' align="left"',right:' align="right"',center:' align="center"'};i(i4e,"gfmTableHtml");i(V_a,"replace")});function j_a(t,e,a,r){let s=0;if(!(a===0&&r.length===0)){for(;s<t.map.length;){if(t.map[s][0]===e){t.map[s][1]+=a,t.map[s][2].push(...r);return}s+=1}t.map.push([e,a,r])}}var OX,Opt=f(()=>{OX=class{static{i(this,"EditMap")}constructor(){this.map=[]}add(e,a,r){j_a(this,e,a,r)}consume(e){if(this.map.sort(function(o,n){return o[0]-n[0]}),this.map.length===0)return;let a=this.map.length,r=[];for(;a>0;)a-=1,r.push(e.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),e.length=this.map[a][0];r.push(e.slice()),e.length=0;let s=r.pop();for(;s;){for(let o of s)e.push(o);s=r.pop()}this.map.length=0}};i(j_a,"addImplementation")});function Bpt(t,e){let a=!1,r=[];for(;e<t.length;){let s=t[e];if(a){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){let o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(a=!0);e+=1}return r}var qpt=f(()=>{i(Bpt,"gfmTableAlign")});function s4e(){return{flow:{null:{name:"table",tokenize:U_a,resolveAll:W_a}}}}function U_a(t,e,a){let r=this,s=0,o=0,n;return l;function l(O){let M=r.events.length-1;for(;M>-1;){let A=r.events[M][1].type;if(A==="lineEnding"||A==="linePrefix")M--;else break}let z=M>-1?r.events[M][1].type:null,E=z==="tableHead"||z==="tableRow"?S:c;return E===S&&r.parser.lazy[r.now().line]?a(O):E(O)}function c(O){return t.enter("tableHead"),t.enter("tableRow"),d(O)}function d(O){return O===124||(n=!0,o+=1),u(O)}function u(O){return O===null?a(O):at(O)?o>1?(o=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),v):a(O):Lt(O)?Et(t,u,"whitespace")(O):(o+=1,n&&(n=!1,s+=1),O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),n=!0,u):(t.enter("data"),p(O)))}function p(O){return O===null||O===124||ua(O)?(t.exit("data"),u(O)):(t.consume(O),O===92?m:p)}function m(O){return O===92||O===124?(t.consume(O),p):p(O)}function v(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?a(O):(t.enter("tableDelimiterRow"),n=!1,Lt(O)?Et(t,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):x(O))}function x(O){return O===45||O===58?g(O):O===124?(n=!0,t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),b):T(O)}function b(O){return Lt(O)?Et(t,g,"whitespace")(O):g(O)}function g(O){return O===58?(o+=1,n=!0,t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),y):O===45?(o+=1,y(O)):O===null||at(O)?R(O):T(O)}function y(O){return O===45?(t.enter("tableDelimiterFiller"),k(O)):T(O)}function k(O){return O===45?(t.consume(O),k):O===58?(n=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),C):(t.exit("tableDelimiterFiller"),C(O))}function C(O){return Lt(O)?Et(t,R,"whitespace")(O):R(O)}function R(O){return O===124?x(O):O===null||at(O)?!n||s!==o?T(O):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(O)):T(O)}function T(O){return a(O)}function S(O){return t.enter("tableRow"),N(O)}function N(O){return O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),N):O===null||at(O)?(t.exit("tableRow"),e(O)):Lt(O)?Et(t,N,"whitespace")(O):(t.enter("data"),_(O))}function _(O){return O===null||O===124||ua(O)?(t.exit("data"),N(O)):(t.consume(O),O===92?I:_)}function I(O){return O===92||O===124?(t.consume(O),_):_(O)}}function W_a(t,e){let a=-1,r=!0,s=0,o=[0,0,0,0],n=[0,0,0,0],l=!1,c=0,d,u,p,m=new OX;for(;++a<t.length;){let v=t[a],x=v[1];v[0]==="enter"?x.type==="tableHead"?(l=!1,c!==0&&(Hpt(m,e,c,d,u),u=void 0,c=0),d={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},m.add(a,0,[["enter",d,e]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,p=void 0,o=[0,0,0,0],n=[0,a+1,0,0],l&&(l=!1,u={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},m.add(a,0,[["enter",u,e]])),s=x.type==="tableDelimiterRow"?2:u?3:1):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,n[2]===0&&(o[1]!==0&&(n[0]=n[1],p=BX(m,e,o,s,void 0,p),o=[0,0,0,0]),n[2]=a)):x.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(n[0]=n[1],p=BX(m,e,o,s,void 0,p)),o=n,n=[o[1],a,0,0])):x.type==="tableHead"?(l=!0,c=a):x.type==="tableRow"||x.type==="tableDelimiterRow"?(c=a,o[1]!==0?(n[0]=n[1],p=BX(m,e,o,s,a,p)):n[1]!==0&&(p=BX(m,e,n,s,a,p)),s=0):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(n[3]=a)}for(c!==0&&Hpt(m,e,c,d,u),m.consume(e.events),a=-1;++a<e.events.length;){let v=e.events[a];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=Bpt(e.events,a))}return t}function BX(t,e,a,r,s,o){let n=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";a[0]!==0&&(o.end=Object.assign({},a8(e.events,a[0])),t.add(a[0],0,[["exit",o,e]]));let c=a8(e.events,a[1]);if(o={type:n,start:Object.assign({},c),end:Object.assign({},c)},t.add(a[1],0,[["enter",o,e]]),a[2]!==0){let d=a8(e.events,a[2]),u=a8(e.events,a[3]),p={type:l,start:Object.assign({},d),end:Object.assign({},u)};if(t.add(a[2],0,[["enter",p,e]]),r!==2){let m=e.events[a[2]],v=e.events[a[3]];if(m[1].end=Object.assign({},v[1].end),m[1].type="chunkText",m[1].contentType="text",a[3]>a[2]+1){let x=a[2]+1,b=a[3]-a[2]-1;t.add(x,b,[])}}t.add(a[3]+1,0,[["exit",p,e]])}return s!==void 0&&(o.end=Object.assign({},a8(e.events,s)),t.add(s,0,[["exit",o,e]]),o=void 0),o}function Hpt(t,e,a,r,s){let o=[],n=a8(e.events,a);s&&(s.end=Object.assign({},n),o.push(["exit",s,e])),r.end=Object.assign({},n),o.push(["exit",r,e]),t.add(a+1,0,o)}function a8(t,e){let a=t[e],r=a[0]==="enter"?"start":"end";return a[1][r]}var Vpt=f(()=>{Zr();ga();Opt();qpt();i(s4e,"gfmTable");i(U_a,"tokenizeTable");i(W_a,"resolveTable");i(BX,"flushCell");i(Hpt,"flushTableEnd");i(a8,"getPoint")});var jpt=f(()=>{Fpt();Vpt()});function o4e(){return{exit:{htmlFlowData(t){Wpt.call(this,t,Upt)},htmlTextData(t){Wpt.call(this,t,G_a)}}}}function Wpt(t,e){let a=this.sliceSerialize(t);this.options.allowDangerousHtml&&(a=a.replace(e,"&lt;$1$2")),this.raw(this.encode(a))}var Upt,G_a,Gpt=f(()=>{Upt=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|title|textarea|xmp)(?=[\t\n\f\r />])/gi,G_a=new RegExp("^"+Upt.source,"i");i(o4e,"gfmTagfilterHtml");i(Wpt,"exitHtmlData")});var Ypt=f(()=>{Gpt()});function n4e(){return{enter:{taskListCheck(){this.tag('<input type="checkbox" disabled="" ')}},exit:{taskListCheck(){this.tag("/>")},taskListCheckValueChecked(){this.tag('checked="" ')}}}}var Kpt=f(()=>{i(n4e,"gfmTaskListItemHtml")});function l4e(){return{text:{91:Y_a}}}function K_a(t,e,a){let r=this;return s;function s(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?a(c):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(c),t.exit("taskListCheckMarker"),o)}function o(c){return ua(c)?(t.enter("taskListCheckValueUnchecked"),t.consume(c),t.exit("taskListCheckValueUnchecked"),n):c===88||c===120?(t.enter("taskListCheckValueChecked"),t.consume(c),t.exit("taskListCheckValueChecked"),n):a(c)}function n(c){return c===93?(t.enter("taskListCheckMarker"),t.consume(c),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),l):a(c)}function l(c){return at(c)?e(c):Lt(c)?t.check({tokenize:Z_a},e,a)(c):a(c)}}function Z_a(t,e,a){return Et(t,r,"whitespace");function r(s){return s===null?a(s):e(s)}}var Y_a,Zpt=f(()=>{Zr();ga();Y_a={name:"tasklistCheck",tokenize:K_a};i(l4e,"gfmTaskListItem");i(K_a,"tokenizeTasklistCheck");i(Z_a,"spaceThenNonSpace")});var Xpt=f(()=>{Kpt();Zpt()});function Qpt(t){return kX([D0e(),J0e(),a4e(t),s4e(),l4e()])}function sYr(t){return SX([P0e(),e4e(t),t4e(),i4e(),o4e(),n4e()])}var Jpt=f(()=>{CX();npt();Ppt();Rpt();jpt();Ypt();Xpt();i(Qpt,"gfm");i(sYr,"gfmHtml")});function r8(t){let e=this,a=t||X_a,r=e.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),n=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(Qpt(a)),o.push(z0e()),n.push(T0e(a))}var X_a,eft=f(()=>{Z6t();Jpt();X_a={};i(r8,"remarkGfm")});var tft=f(()=>{eft()});function c4e(t){let e=t||{},a=!0,r={},s=[[]],o=[],n=[],c=SX([{enter:{blockQuote:F,codeFenced:he,codeFencedFenceInfo:g,codeFencedFenceMeta:g,codeIndented:ve,codeText:fe,content:Ce,definition:ye,definitionDestinationString:q,definitionLabelString:g,definitionTitleString:g,emphasis:we,htmlFlow:nt,htmlText:_e,image:H,label:g,link:de,listItemMarker:M,listItemValue:O,listOrdered:_,listUnordered:I,paragraph:j,reference:g,resource:Q,resourceDestinationString:Z,resourceTitleString:g,setextHeading:Ve,strong:Ne},exit:{atxHeading:$e,atxHeadingSequence:Fe,autolinkEmail:gi,autolinkProtocol:tr,blockQuote:K,characterEscapeValue:pe,characterReferenceMarkerHexadecimal:Ft,characterReferenceMarkerNumeric:Ft,characterReferenceValue:Ja,codeFenced:P,codeFencedFence:J,codeFencedFenceInfo:B,codeFencedFenceMeta:N,codeFlowValue:Ae,codeIndented:P,codeText:ge,codeTextData:pe,data:pe,definition:te,definitionDestinationString:oe,definitionLabelString:V,definitionTitleString:se,emphasis:Pe,hardBreakEscape:Ze,hardBreakTrailing:Ze,htmlFlow:_t,htmlFlowData:pe,htmlText:_t,htmlTextData:pe,image:re,label:Y,labelText:ue,lineEnding:be,link:re,listOrdered:z,listUnordered:E,paragraph:U,reference:N,referenceString:X,resource:N,resourceDestinationString:me,resourceTitleString:ae,setextHeading:Me,setextHeadingLineSequence:ze,setextHeadingText:dt,strong:bt,thematicBreak:vt}},...e.htmlExtensions||[]]),d={definitions:r,tightStack:n},u={buffer:g,encode:S,getData:b,lineEndingIfNeeded:T,options:e,raw:C,resume:y,setData:x,tag:k},p=e.defaultLineEnding;return m;function m(Ue){let mt=-1,er=0,Sr=[],Ar=[],Wr=[];for(;++mt<Ue.length;)!p&&(Ue[mt][1].type==="lineEnding"||Ue[mt][1].type==="lineEndingBlank")&&(p=Ue[mt][2].sliceSerialize(Ue[mt][1])),(Ue[mt][1].type==="listOrdered"||Ue[mt][1].type==="listUnordered")&&(Ue[mt][0]==="enter"?Sr.push(mt):v(Ue.slice(Sr.pop(),mt))),Ue[mt][1].type==="definition"&&(Ue[mt][0]==="enter"?(Wr=li(Wr,Ue.slice(er,mt)),er=mt):(Ar=li(Ar,Ue.slice(er,mt+1)),er=mt+1));Ar=li(Ar,Wr),Ar=li(Ar,Ue.slice(er)),mt=-1;let Ir=Ar;for(c.enter.null&&c.enter.null.call(u);++mt<Ue.length;){let go=c[Ir[mt][0]],bo=Ir[mt][1].type,Le=go[bo];aft.call(go,bo)&&Le&&Le.call({sliceSerialize:Ir[mt][2].sliceSerialize,...u},Ir[mt][1])}return c.exit.null&&c.exit.null.call(u),s[0].join("")}function v(Ue){let mt=Ue.length,er=0,Sr=0,Ar=!1,Wr;for(;++er<mt;){let Ir=Ue[er];if(Ir[1]._container)Wr=void 0,Ir[0]==="enter"?Sr++:Sr--;else switch(Ir[1].type){case"listItemPrefix":{Ir[0]==="exit"&&(Wr=!0);break}case"linePrefix":break;case"lineEndingBlank":{Ir[0]==="enter"&&!Sr&&(Wr?Wr=void 0:Ar=!0);break}default:Wr=void 0}}Ue[0][1]._loose=Ar}function x(Ue,mt){d[Ue]=mt}function b(Ue){return d[Ue]}function g(){s.push([])}function y(){return s.pop().join("")}function k(Ue){a&&(x("lastWasTag",!0),s[s.length-1].push(Ue))}function C(Ue){x("lastWasTag"),s[s.length-1].push(Ue)}function R(){C(p||`
78
- `)}function T(){let Ue=s[s.length-1],mt=Ue[Ue.length-1],er=mt?mt.charCodeAt(mt.length-1):null;er===10||er===13||er===null||R()}function S(Ue){return b("ignoreEncode")?Ue:zX(Ue)}function N(){y()}function _(Ue){n.push(!Ue._loose),T(),k("<ol"),x("expectFirstItem",!0)}function I(Ue){n.push(!Ue._loose),T(),k("<ul"),x("expectFirstItem",!0)}function O(Ue){if(b("expectFirstItem")){let mt=Number.parseInt(this.sliceSerialize(Ue),10);mt!==1&&k(' start="'+S(String(mt))+'"')}}function M(){b("expectFirstItem")?k(">"):A(),T(),k("<li>"),x("expectFirstItem"),x("lastWasTag")}function z(){A(),n.pop(),R(),k("</ol>")}function E(){A(),n.pop(),R(),k("</ul>")}function A(){b("lastWasTag")&&!b("slurpAllLineEndings")&&T(),k("</li>"),x("slurpAllLineEndings")}function F(){n.push(!1),T(),k("<blockquote>")}function K(){n.pop(),T(),k("</blockquote>"),x("slurpAllLineEndings")}function j(){n[n.length-1]||(T(),k("<p>")),x("slurpAllLineEndings")}function U(){n[n.length-1]?x("slurpAllLineEndings",!0):k("</p>")}function he(){T(),k("<pre><code"),x("fencesCount",0)}function B(){let Ue=y();k(' class="language-'+Ue+'"')}function J(){let Ue=b("fencesCount")||0;Ue||(k(">"),x("slurpOneLineEnding",!0)),x("fencesCount",Ue+1)}function ve(){T(),k("<pre><code>")}function P(){let Ue=b("fencesCount");Ue!==void 0&&Ue<2&&d.tightStack.length>0&&!b("lastWasTag")&&R(),b("flowCodeSeenData")&&T(),k("</code></pre>"),Ue!==void 0&&Ue<2&&T(),x("flowCodeSeenData"),x("fencesCount"),x("slurpOneLineEnding")}function H(){o.push({image:!0}),a=void 0}function de(){o.push({})}function ue(Ue){o[o.length-1].labelId=this.sliceSerialize(Ue)}function Y(){o[o.length-1].label=y()}function X(Ue){o[o.length-1].referenceId=this.sliceSerialize(Ue)}function Q(){g(),o[o.length-1].destination=""}function Z(){g(),x("ignoreEncode",!0)}function me(){o[o.length-1].destination=y(),x("ignoreEncode")}function ae(){o[o.length-1].title=y()}function re(){let Ue=o.length-1,mt=o[Ue],er=mt.referenceId||mt.labelId,Sr=mt.destination===void 0?r[Or(er)]:mt;for(a=!0;Ue--;)if(o[Ue].image){a=void 0;break}mt.image?(k('<img src="'+s2(Sr.destination,e.allowDangerousProtocol?void 0:Q_a)+'" alt="'),C(mt.label),k('"')):k('<a href="'+s2(Sr.destination,e.allowDangerousProtocol?void 0:rft)+'"'),k(Sr.title?' title="'+Sr.title+'"':""),mt.image?k(" />"):(k(">"),C(mt.label),k("</a>")),o.pop()}function ye(){g(),o.push({})}function V(Ue){y(),o[o.length-1].labelId=this.sliceSerialize(Ue)}function q(){g(),x("ignoreEncode",!0)}function oe(){o[o.length-1].destination=y(),x("ignoreEncode")}function se(){o[o.length-1].title=y()}function te(){let Ue=o[o.length-1],mt=Or(Ue.labelId);y(),aft.call(r,mt)||(r[mt]=o[o.length-1]),o.pop()}function Ce(){x("slurpAllLineEndings",!0)}function Fe(Ue){b("headingRank")||(x("headingRank",this.sliceSerialize(Ue).length),T(),k("<h"+b("headingRank")+">"))}function Ve(){g(),x("slurpAllLineEndings")}function dt(){x("slurpAllLineEndings",!0)}function $e(){k("</h"+b("headingRank")+">"),x("headingRank")}function ze(Ue){x("headingRank",this.sliceSerialize(Ue).charCodeAt(0)===61?1:2)}function Me(){let Ue=y();T(),k("<h"+b("headingRank")+">"),C(Ue),k("</h"+b("headingRank")+">"),x("slurpAllLineEndings"),x("headingRank")}function pe(Ue){C(S(this.sliceSerialize(Ue)))}function be(Ue){if(!b("slurpAllLineEndings")){if(b("slurpOneLineEnding")){x("slurpOneLineEnding");return}if(b("inCodeText")){C(" ");return}C(S(this.sliceSerialize(Ue)))}}function Ae(Ue){C(S(this.sliceSerialize(Ue))),x("flowCodeSeenData",!0)}function Ze(){k("<br />")}function nt(){T(),_e()}function _t(){x("ignoreEncode")}function _e(){e.allowDangerousHtml&&x("ignoreEncode",!0)}function we(){k("<em>")}function Ne(){k("<strong>")}function fe(){x("inCodeText",!0),k("<code>")}function ge(){x("inCodeText"),k("</code>")}function Pe(){k("</em>")}function bt(){k("</strong>")}function vt(){T(),k("<hr />")}function Ft(Ue){x("characterReferenceType",Ue.type)}function Ja(Ue){let mt=this.sliceSerialize(Ue),er=b("characterReferenceType")?t8(mt,b("characterReferenceType")==="characterReferenceMarkerNumeric"?10:16):n0(mt);C(S(er)),x("characterReferenceType")}function tr(Ue){let mt=this.sliceSerialize(Ue);k('<a href="'+s2(mt,e.allowDangerousProtocol?void 0:rft)+'">'),C(S(mt)),k("</a>")}function gi(Ue){let mt=this.sliceSerialize(Ue);k('<a href="'+s2("mailto:"+mt)+'">'),C(S(mt)),k("</a>")}}var aft,rft,Q_a,d4e=f(()=>{ig();r2();CX();yX();A0e();o0();o2();aft={}.hasOwnProperty,rft=/^(https?|ircs?|mailto|xmpp)$/i,Q_a=/^https?$/i;i(c4e,"compile")});function J_a(t){let e=t.attempt(this.parser.constructs.contentInitial,r,s),a;return e;function r(l){if(l===null){t.consume(l);return}return t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),Et(t,e,"linePrefix")}function s(l){return t.enter("paragraph"),o(l)}function o(l){let c=t.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=c),a=c,n(l)}function n(l){if(l===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(l);return}return at(l)?(t.consume(l),t.exit("chunkText"),o):(t.consume(l),n)}}var ift,sft=f(()=>{Zr();ga();ift={tokenize:J_a};i(J_a,"initializeContent")});function eLa(t){let e=this,a=[],r=0,s,o,n;return l;function l(C){if(r<a.length){let R=a[r];return e.containerState=R[1],t.attempt(R[0].continuation,c,d)(C)}return d(C)}function c(C){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,s&&k();let R=e.events.length,T=R,S;for(;T--;)if(e.events[T][0]==="exit"&&e.events[T][1].type==="chunkFlow"){S=e.events[T][1].end;break}y(r);let N=R;for(;N<e.events.length;)e.events[N][1].end={...S},N++;return Kr(e.events,T+1,0,e.events.slice(R)),e.events.length=N,d(C)}return l(C)}function d(C){if(r===a.length){if(!s)return m(C);if(s.currentConstruct&&s.currentConstruct.concrete)return x(C);e.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(oft,u,p)(C)}function u(C){return s&&k(),y(r),m(C)}function p(C){return e.parser.lazy[e.now().line]=r!==a.length,n=e.now().offset,x(C)}function m(C){return e.containerState={},t.attempt(oft,v,x)(C)}function v(C){return r++,a.push([e.currentConstruct,e.containerState]),m(C)}function x(C){if(C===null){s&&k(),y(0),t.consume(C);return}return s=s||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),b(C)}function b(C){if(C===null){g(t.exit("chunkFlow"),!0),y(0),t.consume(C);return}return at(C)?(t.consume(C),g(t.exit("chunkFlow")),r=0,e.interrupt=void 0,l):(t.consume(C),b)}function g(C,R){let T=e.sliceStream(C);if(R&&T.push(null),C.previous=o,o&&(o.next=C),o=C,s.defineSkip(C.start),s.write(T),e.parser.lazy[C.start.line]){let S=s.events.length;for(;S--;)if(s.events[S][1].start.offset<n&&(!s.events[S][1].end||s.events[S][1].end.offset>n))return;let N=e.events.length,_=N,I,O;for(;_--;)if(e.events[_][0]==="exit"&&e.events[_][1].type==="chunkFlow"){if(I){O=e.events[_][1].end;break}I=!0}for(y(r),S=N;S<e.events.length;)e.events[S][1].end={...O},S++;Kr(e.events,_+1,0,e.events.slice(N)),e.events.length=S}}function y(C){let R=a.length;for(;R-- >C;){let T=a[R];e.containerState=T[1],T[0].exit.call(e,t)}a.length=C}function k(){s.write([null]),o=void 0,s=void 0,e.containerState._closeFlow=void 0}}function tLa(t,e,a){return Et(t,t.attempt(this.parser.constructs.document,e,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var nft,oft,lft=f(()=>{Zr();ga();r2();nft={tokenize:eLa},oft={tokenize:tLa};i(eLa,"initializeDocument");i(tLa,"tokenizeContainer")});function aLa(t){let e=this,a=t.attempt(n2,r,t.attempt(this.parser.constructs.flowInitial,s,Et(t,t.attempt(this.parser.constructs.flow,s,t.attempt(O0e,s)),"linePrefix")));return a;function r(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,a}function s(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,a}}var cft,dft=f(()=>{FX();Zr();ga();cft={tokenize:aLa};i(aLa,"initializeFlow")});function uft(t){return{resolveAll:pft(t==="text"?rLa:void 0),tokenize:e};function e(a){let r=this,s=this.parser.constructs[t],o=a.attempt(s,n,l);return n;function n(u){return d(u)?o(u):l(u)}function l(u){if(u===null){a.consume(u);return}return a.enter("data"),a.consume(u),c}function c(u){return d(u)?(a.exit("data"),o(u)):(a.consume(u),c)}function d(u){if(u===null)return!0;let p=s[u],m=-1;if(p)for(;++m<p.length;){let v=p[m];if(!v.previous||v.previous.call(r,r.previous))return!0}return!1}}}function pft(t){return e;function e(a,r){let s=-1,o;for(;++s<=a.length;)o===void 0?a[s]&&a[s][1].type==="data"&&(o=s,s++):(!a[s]||a[s][1].type!=="data")&&(s!==o+2&&(a[o][1].end=a[s-1][1].end,a.splice(o+2,s-o-2),s=o+2),o=void 0);return t?t(a,r):a}}function rLa(t,e){let a=0;for(;++a<=t.length;)if((a===t.length||t[a][1].type==="lineEnding")&&t[a-1][1].type==="data"){let r=t[a-1][1],s=e.sliceStream(r),o=s.length,n=-1,l=0,c;for(;o--;){let d=s[o];if(typeof d=="string"){for(n=d.length;d.charCodeAt(n-1)===32;)l++,n--;if(n)break;n=-1}else if(d===-2)c=!0,l++;else if(d!==-1){o++;break}}if(e._contentTypeTextTrailing&&a===t.length&&(l=0),l){let d={type:a===t.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?n:r.start._bufferIndex+n,_index:r.start._index+o,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(t.splice(a,0,["enter",d,e],["exit",d,e]),a+=2)}a++}return t}var fft,hft,mft,u4e=f(()=>{fft={resolveAll:pft()},hft=uft("string"),mft=uft("text");i(uft,"initializeFactory");i(pft,"createResolver");i(rLa,"resolveAllLineSuffixes")});var p4e={};pt(p4e,{attentionMarkers:()=>uLa,contentInitial:()=>sLa,disable:()=>pLa,document:()=>iLa,flow:()=>nLa,flowInitial:()=>oLa,insideSpan:()=>dLa,string:()=>lLa,text:()=>cLa});var iLa,sLa,oLa,nLa,lLa,cLa,dLa,uLa,pLa,gft=f(()=>{FX();u4e();iLa={42:zs,43:zs,45:zs,48:zs,49:zs,50:zs,51:zs,52:zs,53:zs,54:zs,55:zs,56:zs,57:zs,62:_X},sLa={91:j0e},oLa={[-2]:ng,[-1]:ng,32:ng},nLa={35:W0e,42:P3,45:[RX,P3],60:Y0e,61:RX,95:P3,96:DX,126:DX},lLa={38:$X,92:LX},cLa={[-5]:dg,[-4]:dg,[-3]:dg,33:Z0e,38:$X,42:og,60:[E0e,K0e],91:X0e,92:[U0e,LX],93:I3,95:og,96:N0e},dLa={null:[og,fft]},uLa={null:[42,95]},pLa={null:[]}});function bft(t,e,a){let r={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0},s={},o=[],n=[],l=[],c=!0,d={attempt:I(N),check:I(_),consume:R,enter:T,exit:S,interrupt:I(_,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:g,parser:t,previous:null,sliceSerialize:x,sliceStream:b,write:v},p=e.tokenize.call(u,d),m;return e.resolveAll&&o.push(e),u;function v(E){return n=li(n,E),k(),n[n.length-1]!==null?[]:(O(e,0),u.events=l0(o,u.events,u),u.events)}i(v,"write");function x(E,A){return hLa(b(E),A)}i(x,"sliceSerialize");function b(E){return fLa(n,E)}i(b,"sliceStream");function g(){let{_bufferIndex:E,_index:A,line:F,column:K,offset:j}=r;return{_bufferIndex:E,_index:A,line:F,column:K,offset:j}}i(g,"now");function y(E){s[E.line]=E.column,z()}i(y,"defineSkip");function k(){let E;for(;r._index<n.length;){let A=n[r._index];if(typeof A=="string")for(E=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===E&&r._bufferIndex<A.length;)C(A.charCodeAt(r._bufferIndex));else C(A)}}i(k,"main");function C(E){c=void 0,m=E,p=p(E)}i(C,"go");function R(E){at(E)?(r.line++,r.column=1,r.offset+=E===-3?2:1,z()):E!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===n[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=E,c=!0}i(R,"consume");function T(E,A){let F=A||{};return F.type=E,F.start=g(),u.events.push(["enter",F,u]),l.push(F),F}i(T,"enter");function S(E){let A=l.pop();return A.end=g(),u.events.push(["exit",A,u]),A}i(S,"exit");function N(E,A){O(E,A.from)}i(N,"onsuccessfulconstruct");function _(E,A){A.restore()}i(_,"onsuccessfulcheck");function I(E,A){return F;function F(K,j,U){let he,B,J,ve;return Array.isArray(K)?H(K):"tokenize"in K?H([K]):P(K);function P(X){return Q;function Q(Z){let me=Z!==null&&X[Z],ae=Z!==null&&X.null,re=[...Array.isArray(me)?me:me?[me]:[],...Array.isArray(ae)?ae:ae?[ae]:[]];return H(re)(Z)}}function H(X){return he=X,B=0,X.length===0?U:de(X[B])}function de(X){return Q;function Q(Z){return ve=M(),J=X,X.partial||(u.currentConstruct=X),X.name&&u.parser.constructs.disable.null.includes(X.name)?Y(Z):X.tokenize.call(A?Object.assign(Object.create(u),A):u,d,ue,Y)(Z)}}function ue(X){return c=!0,E(J,ve),j}function Y(X){return c=!0,ve.restore(),++B<he.length?de(he[B]):U}}}i(I,"constructFactory");function O(E,A){E.resolveAll&&!o.includes(E)&&o.push(E),E.resolve&&Kr(u.events,A,u.events.length-A,E.resolve(u.events.slice(A),u)),E.resolveTo&&(u.events=E.resolveTo(u.events,u))}i(O,"addResult");function M(){let E=g(),A=u.previous,F=u.currentConstruct,K=u.events.length,j=Array.from(l);return{from:K,restore:U};function U(){r=E,u.previous=A,u.currentConstruct=F,u.events.length=K,l=j,z()}}i(M,"store");function z(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}i(z,"accountForPotentialSkip")}function fLa(t,e){let a=e.start._index,r=e.start._bufferIndex,s=e.end._index,o=e.end._bufferIndex,n;if(a===s)n=[t[a].slice(r,o)];else{if(n=t.slice(a,s),r>-1){let l=n[0];typeof l=="string"?n[0]=l.slice(r):n.shift()}o>0&&n.push(t[s].slice(0,o))}return n}function hLa(t,e){let a=-1,r=[],s;for(;++a<t.length;){let o=t[a],n;if(typeof o=="string")n=o;else switch(o){case-5:{n="\r";break}case-4:{n=`
77
+ `))}function c(v,x,b,g){let y=b.enter("tableCell"),k=b.enter("phrasing"),C=b.containerPhrasing(v,{...g,before:o,after:o});return k(),y(),C}function d(v,x){return vut(v,{align:x,alignDelimiters:r,padding:a,stringLength:s})}function u(v,x,b){let g=v.children,y=-1,k=[],C=x.enter("table");for(;++y<g.length;)k[y]=p(g[y],x,b);return C(),k}function p(v,x,b){let g=v.children,y=-1,k=[],C=x.enter("tableRow");for(;++y<g.length;)k[y]=c(g[y],v,x,b);return C(),k}function m(v,x,b){let g=L3.inlineCode(v,x,b);return b.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}var j6t=f(()=>{r0();xut();MX();i(M0e,"gfmTableFromMarkdown");i(oTa,"enterTable");i(nTa,"exitTable");i(lTa,"enterRow");i(w0e,"exit");i(V6t,"enterCell");i(cTa,"exitCodeText");i(dTa,"replace");i(k0e,"gfmTableToMarkdown")});var U6t=f(()=>{j6t()});function S0e(){return{exit:{taskListCheckValueChecked:W6t,taskListCheckValueUnchecked:W6t,paragraph:uTa}}}function C0e(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:pTa}}}function W6t(t){let e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function uTa(t){let e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){let a=this.stack[this.stack.length-1];a.type;let r=a.children[0];if(r&&r.type==="text"){let s=e.children,o=-1,n;for(;++o<s.length;){let l=s[o];if(l.type==="paragraph"){n=l;break}}n===a&&(r.value=r.value.slice(1),r.value.length===0?a.children.shift():a.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,a.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function pTa(t,e,a,r){let s=t.children[0],o=typeof t.checked=="boolean"&&s&&s.type==="paragraph",n="["+(t.checked?"x":" ")+"] ",l=a.createTracker(r);o&&l.move(n);let c=L3.listItem(t,e,a,{...r,...l.current()});return o&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),c;function d(u){return u+n}i(d,"check")}var G6t=f(()=>{r0();MX();i(S0e,"gfmTaskListItemFromMarkdown");i(C0e,"gfmTaskListItemToMarkdown");i(W6t,"exitCheck");i(uTa,"exitParagraphWithTaskListItem");i(pTa,"listItemWithTaskListItem")});var Y6t=f(()=>{G6t()});function z0e(){return[Gce(),Kce(),Xce(),M0e(),S0e()]}function T0e(t){return{extensions:[Yce(),Zce(t),Qce(),k0e(t),C0e()]}}var K6t=f(()=>{cut();fut();gut();U6t();Y6t();i(z0e,"gfmFromMarkdown");i(T0e,"gfmToMarkdown")});var Z6t=f(()=>{K6t()});function Kr(t,e,a,r){let s=t.length,o=0,n;if(e<0?e=-e>s?0:s+e:e=e>s?s:e,a=a>0?a:0,r.length<1e4)n=Array.from(r),n.unshift(e,a),t.splice(...n);else for(a&&t.splice(e,a);o<r.length;)n=r.slice(o,o+1e4),n.unshift(e,0),t.splice(...n),o+=1e4,e+=1e4}function li(t,e){return t.length>0?(Kr(t,t.length,0,e),t):e}var r2=f(()=>{i(Kr,"splice");i(li,"push")});function kX(t){let e={},a=-1;for(;++a<t.length;)fTa(e,t[a]);return e}function fTa(t,e){let a;for(a in e){let s=(_0e.call(t,a)?t[a]:void 0)||(t[a]={}),o=e[a],n;if(o)for(n in o){_0e.call(s,n)||(s[n]=[]);let l=o[n];hTa(s[n],Array.isArray(l)?l:l?[l]:[])}}}function hTa(t,e){let a=-1,r=[];for(;++a<e.length;)(e[a].add==="after"?t:r).push(e[a]);Kr(t,0,0,r)}function SX(t){let e={},a=-1;for(;++a<t.length;)mTa(e,t[a]);return e}function mTa(t,e){let a;for(a in e){let s=(_0e.call(t,a)?t[a]:void 0)||(t[a]={}),o=e[a],n;if(o)for(n in o)s[n]=o[n]}}var _0e,CX=f(()=>{r2();_0e={}.hasOwnProperty;i(kX,"combineExtensions");i(fTa,"syntaxExtension");i(hTa,"constructs");i(SX,"combineHtmlExtensions");i(mTa,"htmlExtension")});function D0e(){return{text:i2}}function vTa(t,e,a){let r=this,s,o;return n;function n(p){return!L0e(p)||!ipt.call(r,r.previous)||$0e(r.events)?a(p):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),l(p))}function l(p){return L0e(p)?(t.consume(p),l):p===64?(t.consume(p),c):a(p)}function c(p){return p===46?t.check(bTa,u,d)(p):p===45||p===95||Fr(p)?(o=!0,t.consume(p),c):u(p)}function d(p){return t.consume(p),s=!0,c}function u(p){return o&&s&&Ti(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(p)):a(p)}}function xTa(t,e,a){let r=this;return s;function s(n){return n!==87&&n!==119||!apt.call(r,r.previous)||$0e(r.events)?a(n):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(gTa,t.attempt(X6t,t.attempt(Q6t,o),a),a)(n))}function o(n){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(n)}}function yTa(t,e,a){let r=this,s="",o=!1;return n;function n(p){return(p===72||p===104)&&rpt.call(r,r.previous)&&!$0e(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),s+=String.fromCodePoint(p),t.consume(p),l):a(p)}function l(p){if(Ti(p)&&s.length<5)return s+=String.fromCodePoint(p),t.consume(p),l;if(p===58){let m=s.toLowerCase();if(m==="http"||m==="https")return t.consume(p),c}return a(p)}function c(p){return p===47?(t.consume(p),o?d:(o=!0,c)):a(p)}function d(p){return p===null||C3(p)||ua(p)||a2(p)||z3(p)?a(p):t.attempt(X6t,t.attempt(Q6t,u),a)(p)}function u(p){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(p)}}function wTa(t,e,a){let r=0;return s;function s(n){return(n===87||n===119)&&r<3?(r++,t.consume(n),s):n===46&&r===3?(t.consume(n),o):a(n)}function o(n){return n===null?a(n):e(n)}}function MTa(t,e,a){let r,s,o;return n;function n(d){return d===46||d===95?t.check(J6t,c,l)(d):d===null||ua(d)||a2(d)||d!==45&&z3(d)?c(d):(o=!0,t.consume(d),n)}function l(d){return d===95?r=!0:(s=r,r=void 0),t.consume(d),n}function c(d){return s||r||!o?a(d):e(d)}}function kTa(t,e){let a=0,r=0;return s;function s(n){return n===40?(a++,t.consume(n),s):n===41&&r<a?o(n):n===33||n===34||n===38||n===39||n===41||n===42||n===44||n===46||n===58||n===59||n===60||n===63||n===93||n===95||n===126?t.check(J6t,e,o)(n):n===null||ua(n)||a2(n)?e(n):(t.consume(n),s)}function o(n){return n===41&&r++,t.consume(n),s}}function STa(t,e,a){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(t.consume(l),r):l===38?(t.consume(l),o):l===93?(t.consume(l),s):l===60||l===null||ua(l)||a2(l)?e(l):a(l)}function s(l){return l===null||l===40||l===91||ua(l)||a2(l)?e(l):r(l)}function o(l){return Ti(l)?n(l):a(l)}function n(l){return l===59?(t.consume(l),r):Ti(l)?(t.consume(l),n):a(l)}}function CTa(t,e,a){return r;function r(o){return t.consume(o),s}function s(o){return Fr(o)?a(o):e(o)}}function apt(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||ua(t)}function rpt(t){return!Ti(t)}function ipt(t){return!(t===47||L0e(t))}function L0e(t){return t===43||t===45||t===46||t===95||Fr(t)}function $0e(t){let e=t.length,a=!1;for(;e--;){let r=t[e][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){a=!0;break}if(r._gfmAutolinkLiteralWalkedInto){a=!1;break}}return t.length>0&&!a&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}var gTa,X6t,Q6t,J6t,bTa,ept,tpt,ul,i2,spt=f(()=>{ga();gTa={tokenize:wTa,partial:!0},X6t={tokenize:MTa,partial:!0},Q6t={tokenize:kTa,partial:!0},J6t={tokenize:STa,partial:!0},bTa={tokenize:CTa,partial:!0},ept={name:"wwwAutolink",tokenize:xTa,previous:apt},tpt={name:"protocolAutolink",tokenize:yTa,previous:rpt},ul={name:"emailAutolink",tokenize:vTa,previous:ipt},i2={};i(D0e,"gfmAutolinkLiteral");for(var D3=48;D3<123;)i2[D3]=ul,D3++,D3===58?D3=65:D3===91&&(D3=97);i2[43]=ul,i2[45]=ul,i2[46]=ul,i2[95]=ul,i2[72]=[ul,tpt],i2[104]=[ul,tpt],i2[87]=[ul,ept],i2[119]=[ul,ept];i(vTa,"tokenizeEmailAutolink");i(xTa,"tokenizeWwwAutolink");i(yTa,"tokenizeProtocolAutolink");i(wTa,"tokenizeWwwPrefix");i(MTa,"tokenizeDomain");i(kTa,"tokenizePath");i(STa,"tokenizeTrail");i(CTa,"tokenizeEmailDomainDotTrail");i(apt,"previousWww");i(rpt,"previousProtocol");i(ipt,"previousEmail");i(L0e,"gfmAtext");i($0e,"previousUnbalanced")});function zX(t){return t.replace(/["&<>]/g,e);function e(a){return"&"+zTa[a]+";"}}var zTa,A0e=f(()=>{zTa={'"':"quot","&":"amp","<":"lt",">":"gt"};i(zX,"encode")});function s2(t,e){let a=zX(qo(t||""));if(!e)return a;let r=a.indexOf(":"),s=a.indexOf("?"),o=a.indexOf("#"),n=a.indexOf("/");return r<0||n>-1&&r>n||s>-1&&r>s||o>-1&&r>o||e.test(a.slice(0,r))?a:""}function qo(t){let e=[],a=-1,r=0,s=0;for(;++a<t.length;){let o=t.charCodeAt(a),n="";if(o===37&&Fr(t.charCodeAt(a+1))&&Fr(t.charCodeAt(a+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(n=String.fromCharCode(o));else if(o>55295&&o<57344){let l=t.charCodeAt(a+1);o<56320&&l>56319&&l<57344?(n=String.fromCharCode(o,l),s=1):n="\uFFFD"}else n=String.fromCharCode(o);n&&(e.push(t.slice(r,a),encodeURIComponent(n)),r=a+s+1,n=""),s&&(a+=s,s=0)}return e.join("")+t.slice(r)}var o2=f(()=>{ga();A0e();i(s2,"sanitizeUri");i(qo,"normalizeUri")});function P0e(){return{exit:{literalAutolinkEmail:_Ta,literalAutolinkHttp:LTa,literalAutolinkWww:TTa}}}function TTa(t){I0e.call(this,t,"http://")}function _Ta(t){I0e.call(this,t,"mailto:")}function LTa(t){I0e.call(this,t)}function I0e(t,e){let a=this.sliceSerialize(t);this.tag('<a href="'+s2((e||"")+a)+'">'),this.raw(this.encode(a)),this.tag("</a>")}var opt=f(()=>{o2();i(P0e,"gfmAutolinkLiteralHtml");i(TTa,"literalAutolinkWww");i(_Ta,"literalAutolinkEmail");i(LTa,"literalAutolinkHttp");i(I0e,"anchorFromToken")});var npt=f(()=>{spt();opt()});function l0(t,e,a){let r=[],s=-1;for(;++s<t.length;){let o=t[s].resolveAll;o&&!r.includes(o)&&(e=o(e,a),r.push(o))}return e}var sg=f(()=>{i(l0,"resolveAll")});function $Ta(t,e){let a=-1,r,s,o,n,l,c,d,u;for(;++a<t.length;)if(t[a][0]==="enter"&&t[a][1].type==="attentionSequence"&&t[a][1]._close){for(r=a;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&e.sliceSerialize(t[r][1]).charCodeAt(0)===e.sliceSerialize(t[a][1]).charCodeAt(0)){if((t[r][1]._close||t[a][1]._open)&&(t[a][1].end.offset-t[a][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[a][1].end.offset-t[a][1].start.offset)%3))continue;c=t[r][1].end.offset-t[r][1].start.offset>1&&t[a][1].end.offset-t[a][1].start.offset>1?2:1;let p={...t[r][1].end},m={...t[a][1].start};lpt(p,-c),lpt(m,c),n={type:c>1?"strongSequence":"emphasisSequence",start:p,end:{...t[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...t[a][1].start},end:m},o={type:c>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[a][1].start}},s={type:c>1?"strong":"emphasis",start:{...n.start},end:{...l.end}},t[r][1].end={...n.start},t[a][1].start={...l.end},d=[],t[r][1].end.offset-t[r][1].start.offset&&(d=li(d,[["enter",t[r][1],e],["exit",t[r][1],e]])),d=li(d,[["enter",s,e],["enter",n,e],["exit",n,e],["enter",o,e]]),d=li(d,l0(e.parser.constructs.insideSpan.null,t.slice(r+1,a),e)),d=li(d,[["exit",o,e],["enter",l,e],["exit",l,e],["exit",s,e]]),t[a][1].end.offset-t[a][1].start.offset?(u=2,d=li(d,[["enter",t[a][1],e],["exit",t[a][1],e]])):u=0,Kr(t,r-1,a-r+3,d),a=r+d.length-u-2;break}}for(a=-1;++a<t.length;)t[a][1].type==="attentionSequence"&&(t[a][1].type="data");return t}function DTa(t,e){let a=this.parser.constructs.attentionMarkers.null,r=this.previous,s=dl(r),o;return n;function n(c){return o=c,t.enter("attentionSequence"),l(c)}function l(c){if(c===o)return t.consume(c),l;let d=t.exit("attentionSequence"),u=dl(c),p=!u||u===2&&s||a.includes(c),m=!s||s===2&&u||a.includes(r);return d._open=!!(o===42?p:p&&(s||!m)),d._close=!!(o===42?m:m&&(u||!p)),e(c)}}function lpt(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}var og,cpt=f(()=>{r2();mX();sg();og={name:"attention",resolveAll:$Ta,tokenize:DTa};i($Ta,"resolveAllAttention");i(DTa,"tokenizeAttention");i(lpt,"movePoint")});function ATa(t,e,a){let r=0;return s;function s(v){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(v){return Ti(v)?(t.consume(v),n):v===64?a(v):d(v)}function n(v){return v===43||v===45||v===46||Fr(v)?(r=1,l(v)):d(v)}function l(v){return v===58?(t.consume(v),r=0,c):(v===43||v===45||v===46||Fr(v))&&r++<32?(t.consume(v),l):(r=0,d(v))}function c(v){return v===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),e):v===null||v===32||v===60||C3(v)?a(v):(t.consume(v),c)}function d(v){return v===64?(t.consume(v),u):Zdt(v)?(t.consume(v),d):a(v)}function u(v){return Fr(v)?p(v):a(v)}function p(v){return v===46?(t.consume(v),r=0,u):v===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),e):m(v)}function m(v){if((v===45||Fr(v))&&r++<63){let x=v===45?m:p;return t.consume(v),x}return a(v)}}var E0e,dpt=f(()=>{ga();E0e={name:"autolink",tokenize:ATa};i(ATa,"tokenizeAutolink")});function Et(t,e,a,r){let s=r?r-1:Number.POSITIVE_INFINITY,o=0;return n;function n(c){return Lt(c)?(t.enter(a),l(c)):e(c)}function l(c){return Lt(c)&&o++<s?(t.consume(c),l):(t.exit(a),e(c))}}var Zr=f(()=>{ga();i(Et,"factorySpace")});function ITa(t,e,a){return r;function r(o){return Lt(o)?Et(t,s,"linePrefix")(o):s(o)}function s(o){return o===null||at(o)?e(o):a(o)}}var n2,TX=f(()=>{Zr();ga();n2={partial:!0,tokenize:ITa};i(ITa,"tokenizeBlankLine")});function PTa(t,e,a){let r=this;return s;function s(n){if(n===62){let l=r.containerState;return l.open||(t.enter("blockQuote",{_container:!0}),l.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(n),t.exit("blockQuoteMarker"),o}return a(n)}function o(n){return Lt(n)?(t.enter("blockQuotePrefixWhitespace"),t.consume(n),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(n))}}function ETa(t,e,a){let r=this;return s;function s(n){return Lt(n)?Et(t,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(n):o(n)}function o(n){return t.attempt(_X,e,a)(n)}}function NTa(t){t.exit("blockQuote")}var _X,upt=f(()=>{Zr();ga();_X={continuation:{tokenize:ETa},exit:NTa,name:"blockQuote",tokenize:PTa};i(PTa,"tokenizeBlockQuoteStart");i(ETa,"tokenizeBlockQuoteContinuation");i(NTa,"exit")});function RTa(t,e,a){return r;function r(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),s}function s(o){return Qdt(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):a(o)}}var LX,ppt=f(()=>{ga();LX={name:"characterEscape",tokenize:RTa};i(RTa,"tokenizeCharacterEscape")});function FTa(t,e,a){let r=this,s=0,o,n;return l;function l(p){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(p),t.exit("characterReferenceMarker"),c}function c(p){return p===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(p),t.exit("characterReferenceMarkerNumeric"),d):(t.enter("characterReferenceValue"),o=31,n=Fr,u(p))}function d(p){return p===88||p===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(p),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,n=Xdt,u):(t.enter("characterReferenceValue"),o=7,n=eg,u(p))}function u(p){if(p===59&&s){let m=t.exit("characterReferenceValue");return n===Fr&&!n0(r.sliceSerialize(m))?a(p):(t.enter("characterReferenceMarker"),t.consume(p),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return n(p)&&s++<o?(t.consume(p),u):a(p)}}var $X,fpt=f(()=>{ig();ga();$X={name:"characterReference",tokenize:FTa};i(FTa,"tokenizeCharacterReference")});function OTa(t,e,a){let r=this,s={partial:!0,tokenize:T},o=0,n=0,l;return c;function c(S){return d(S)}function d(S){let N=r.events[r.events.length-1];return o=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,l=S,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),u(S)}function u(S){return S===l?(n++,t.consume(S),u):n<3?a(S):(t.exit("codeFencedFenceSequence"),Lt(S)?Et(t,p,"whitespace")(S):p(S))}function p(S){return S===null||at(S)?(t.exit("codeFencedFence"),r.interrupt?e(S):t.check(hpt,b,R)(S)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||at(S)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),p(S)):Lt(S)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Et(t,v,"whitespace")(S)):S===96&&S===l?a(S):(t.consume(S),m)}function v(S){return S===null||at(S)?p(S):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),x(S))}function x(S){return S===null||at(S)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),p(S)):S===96&&S===l?a(S):(t.consume(S),x)}function b(S){return t.attempt(s,R,g)(S)}function g(S){return t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),y}function y(S){return o>0&&Lt(S)?Et(t,k,"linePrefix",o+1)(S):k(S)}function k(S){return S===null||at(S)?t.check(hpt,b,R)(S):(t.enter("codeFlowValue"),C(S))}function C(S){return S===null||at(S)?(t.exit("codeFlowValue"),k(S)):(t.consume(S),C)}function R(S){return t.exit("codeFenced"),e(S)}function T(S,N,_){let I=0;return O;function O(F){return S.enter("lineEnding"),S.consume(F),S.exit("lineEnding"),M}function M(F){return S.enter("codeFencedFence"),Lt(F)?Et(S,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):z(F)}function z(F){return F===l?(S.enter("codeFencedFenceSequence"),E(F)):_(F)}function E(F){return F===l?(I++,S.consume(F),E):I>=n?(S.exit("codeFencedFenceSequence"),Lt(F)?Et(S,A,"whitespace")(F):A(F)):_(F)}function A(F){return F===null||at(F)?(S.exit("codeFencedFence"),N(F)):_(F)}}}function BTa(t,e,a){let r=this;return s;function s(n){return n===null?a(n):(t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),o)}function o(n){return r.parser.lazy[r.now().line]?a(n):e(n)}}var hpt,DX,mpt=f(()=>{Zr();ga();hpt={partial:!0,tokenize:BTa},DX={concrete:!0,name:"codeFenced",tokenize:OTa};i(OTa,"tokenizeCodeFenced");i(BTa,"tokenizeNonLazyContinuation")});function HTa(t,e,a){let r=this;return s;function s(d){return t.enter("codeIndented"),Et(t,o,"linePrefix",5)(d)}function o(d){let u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?n(d):a(d)}function n(d){return d===null?c(d):at(d)?t.attempt(qTa,n,c)(d):(t.enter("codeFlowValue"),l(d))}function l(d){return d===null||at(d)?(t.exit("codeFlowValue"),n(d)):(t.consume(d),l)}function c(d){return t.exit("codeIndented"),e(d)}}function VTa(t,e,a){let r=this;return s;function s(n){return r.parser.lazy[r.now().line]?a(n):at(n)?(t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),s):Et(t,o,"linePrefix",5)(n)}function o(n){let l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?e(n):at(n)?s(n):a(n)}}var ng,qTa,gpt=f(()=>{Zr();ga();ng={name:"codeIndented",tokenize:HTa},qTa={partial:!0,tokenize:VTa};i(HTa,"tokenizeCodeIndented");i(VTa,"tokenizeFurtherStart")});function jTa(t){let e=t.length-4,a=3,r,s;if((t[a][1].type==="lineEnding"||t[a][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=a;++r<e;)if(t[r][1].type==="codeTextData"){t[a][1].type="codeTextPadding",t[e][1].type="codeTextPadding",a+=2,e-=2;break}}for(r=a-1,e++;++r<=e;)s===void 0?r!==e&&t[r][1].type!=="lineEnding"&&(s=r):(r===e||t[r][1].type==="lineEnding")&&(t[s][1].type="codeTextData",r!==s+2&&(t[s][1].end=t[r-1][1].end,t.splice(s+2,r-s-2),e-=r-s-2,r=s+2),s=void 0);return t}function UTa(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function WTa(t,e,a){let r=this,s=0,o,n;return l;function l(m){return t.enter("codeText"),t.enter("codeTextSequence"),c(m)}function c(m){return m===96?(t.consume(m),s++,c):(t.exit("codeTextSequence"),d(m))}function d(m){return m===null?a(m):m===32?(t.enter("space"),t.consume(m),t.exit("space"),d):m===96?(n=t.enter("codeTextSequence"),o=0,p(m)):at(m)?(t.enter("lineEnding"),t.consume(m),t.exit("lineEnding"),d):(t.enter("codeTextData"),u(m))}function u(m){return m===null||m===32||m===96||at(m)?(t.exit("codeTextData"),d(m)):(t.consume(m),u)}function p(m){return m===96?(t.consume(m),o++,p):o===s?(t.exit("codeTextSequence"),t.exit("codeText"),e(m)):(n.type="codeTextData",u(m))}}var N0e,bpt=f(()=>{ga();N0e={name:"codeText",previous:UTa,resolve:jTa,tokenize:WTa};i(jTa,"resolveCodeText");i(UTa,"previous");i(WTa,"tokenizeCodeText")});function lg(t,e){let a=0;if(e.length<1e4)t.push(...e);else for(;a<e.length;)t.push(...e.slice(a,a+1e4)),a+=1e4}var cg,R0e=f(()=>{cg=class{static{i(this,"SpliceBuffer")}constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,a){let r=a??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,a,r){let s=a||0;this.setCursor(Math.trunc(e));let o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&lg(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),lg(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),lg(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let a=this.left.splice(e,Number.POSITIVE_INFINITY);lg(this.right,a.reverse())}else{let a=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);lg(this.left,a.reverse())}}};i(lg,"chunkedPush")});function AX(t){let e={},a=-1,r,s,o,n,l,c,d,u=new cg(t);for(;++a<u.length;){for(;a in e;)a=e[a];if(r=u.get(a),a&&r[1].type==="chunkFlow"&&u.get(a-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,o=0,o<c.length&&c[o][1].type==="lineEndingBlank"&&(o+=2),o<c.length&&c[o][1].type==="content"))for(;++o<c.length&&c[o][1].type!=="content";)c[o][1].type==="chunkText"&&(c[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,GTa(u,a)),a=e[a],d=!0);else if(r[1]._container){for(o=a,s=void 0;o--;)if(n=u.get(o),n[1].type==="lineEnding"||n[1].type==="lineEndingBlank")n[0]==="enter"&&(s&&(u.get(s)[1].type="lineEndingBlank"),n[1].type="lineEnding",s=o);else if(!(n[1].type==="linePrefix"||n[1].type==="listItemIndent"))break;s&&(r[1].end={...u.get(s)[1].start},l=u.slice(s,a),l.unshift(r),u.splice(s,a-s+1,l))}}return Kr(t,0,Number.POSITIVE_INFINITY,u.slice(0)),!d}function GTa(t,e){let a=t.get(e)[1],r=t.get(e)[2],s=e-1,o=[],n=a._tokenizer;n||(n=r.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(n._contentTypeTextTrailing=!0));let l=n.events,c=[],d={},u,p,m=-1,v=a,x=0,b=0,g=[b];for(;v;){for(;t.get(++s)[1]!==v;);o.push(s),v._tokenizer||(u=r.sliceStream(v),v.next||u.push(null),p&&n.defineSkip(v.start),v._isInFirstContentOfListItem&&(n._gfmTasklistFirstContentOfListItem=!0),n.write(u),v._isInFirstContentOfListItem&&(n._gfmTasklistFirstContentOfListItem=void 0)),p=v,v=v.next}for(v=a;++m<l.length;)l[m][0]==="exit"&&l[m-1][0]==="enter"&&l[m][1].type===l[m-1][1].type&&l[m][1].start.line!==l[m][1].end.line&&(b=m+1,g.push(b),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(n.events=[],v?(v._tokenizer=void 0,v.previous=void 0):g.pop(),m=g.length;m--;){let y=l.slice(g[m],g[m+1]),k=o.pop();c.push([k,k+y.length-1]),t.splice(k,2,y)}for(c.reverse(),m=-1;++m<c.length;)d[x+c[m][0]]=x+c[m][1],x+=c[m][1]-c[m][0]-1;return d}var F0e=f(()=>{r2();R0e();R0e();i(AX,"subtokenize");i(GTa,"subcontent")});function KTa(t){return AX(t),t}function ZTa(t,e){let a;return r;function r(l){return t.enter("content"),a=t.enter("chunkContent",{contentType:"content"}),s(l)}function s(l){return l===null?o(l):at(l)?t.check(YTa,n,o)(l):(t.consume(l),s)}function o(l){return t.exit("chunkContent"),t.exit("content"),e(l)}function n(l){return t.consume(l),t.exit("chunkContent"),a.next=t.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,s}}function XTa(t,e,a){let r=this;return s;function s(n){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),Et(t,o,"linePrefix")}function o(n){if(n===null||at(n))return a(n);let l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?e(n):t.interrupt(r.parser.constructs.flow,a,e)(n)}}var O0e,YTa,vpt=f(()=>{Zr();ga();F0e();O0e={resolve:KTa,tokenize:ZTa},YTa={partial:!0,tokenize:XTa};i(KTa,"resolveContent");i(ZTa,"tokenizeContent");i(XTa,"tokenizeContinuation")});function IX(t,e,a,r,s,o,n,l,c){let d=c||Number.POSITIVE_INFINITY,u=0;return p;function p(y){return y===60?(t.enter(r),t.enter(s),t.enter(o),t.consume(y),t.exit(o),m):y===null||y===32||y===41||C3(y)?a(y):(t.enter(r),t.enter(n),t.enter(l),t.enter("chunkString",{contentType:"string"}),b(y))}function m(y){return y===62?(t.enter(o),t.consume(y),t.exit(o),t.exit(s),t.exit(r),e):(t.enter(l),t.enter("chunkString",{contentType:"string"}),v(y))}function v(y){return y===62?(t.exit("chunkString"),t.exit(l),m(y)):y===null||y===60||at(y)?a(y):(t.consume(y),y===92?x:v)}function x(y){return y===60||y===62||y===92?(t.consume(y),v):v(y)}function b(y){return!u&&(y===null||y===41||ua(y))?(t.exit("chunkString"),t.exit(l),t.exit(n),t.exit(r),e(y)):u<d&&y===40?(t.consume(y),u++,b):y===41?(t.consume(y),u--,b):y===null||y===32||y===40||C3(y)?a(y):(t.consume(y),y===92?g:b)}function g(y){return y===40||y===41||y===92?(t.consume(y),b):b(y)}}var B0e=f(()=>{ga();i(IX,"factoryDestination")});function PX(t,e,a,r,s,o){let n=this,l=0,c;return d;function d(v){return t.enter(r),t.enter(s),t.consume(v),t.exit(s),t.enter(o),u}function u(v){return l>999||v===null||v===91||v===93&&!c||v===94&&!l&&"_hiddenFootnoteSupport"in n.parser.constructs?a(v):v===93?(t.exit(o),t.enter(s),t.consume(v),t.exit(s),t.exit(r),e):at(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),u):(t.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===null||v===91||v===93||at(v)||l++>999?(t.exit("chunkString"),u(v)):(t.consume(v),c||(c=!Lt(v)),v===92?m:p)}function m(v){return v===91||v===92||v===93?(t.consume(v),l++,p):p(v)}}var q0e=f(()=>{ga();i(PX,"factoryLabel")});function EX(t,e,a,r,s,o){let n;return l;function l(m){return m===34||m===39||m===40?(t.enter(r),t.enter(s),t.consume(m),t.exit(s),n=m===40?41:m,c):a(m)}function c(m){return m===n?(t.enter(s),t.consume(m),t.exit(s),t.exit(r),e):(t.enter(o),d(m))}function d(m){return m===n?(t.exit(o),c(n)):m===null?a(m):at(m)?(t.enter("lineEnding"),t.consume(m),t.exit("lineEnding"),Et(t,d,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(m))}function u(m){return m===n||m===null||at(m)?(t.exit("chunkString"),d(m)):(t.consume(m),m===92?p:u)}function p(m){return m===n||m===92?(t.consume(m),u):u(m)}}var H0e=f(()=>{Zr();ga();i(EX,"factoryTitle")});function A3(t,e){let a;return r;function r(s){return at(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),a=!0,r):Lt(s)?Et(t,r,a?"linePrefix":"lineSuffix")(s):e(s)}}var V0e=f(()=>{Zr();ga();i(A3,"factoryWhitespace")});function JTa(t,e,a){let r=this,s;return o;function o(v){return t.enter("definition"),n(v)}function n(v){return PX.call(r,t,l,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function l(v){return s=Or(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),v===58?(t.enter("definitionMarker"),t.consume(v),t.exit("definitionMarker"),c):a(v)}function c(v){return ua(v)?A3(t,d)(v):d(v)}function d(v){return IX(t,u,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function u(v){return t.attempt(QTa,p,p)(v)}function p(v){return Lt(v)?Et(t,m,"whitespace")(v):m(v)}function m(v){return v===null||at(v)?(t.exit("definition"),r.parser.defined.push(s),e(v)):a(v)}}function e_a(t,e,a){return r;function r(l){return ua(l)?A3(t,s)(l):a(l)}function s(l){return EX(t,o,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return Lt(l)?Et(t,n,"whitespace")(l):n(l)}function n(l){return l===null||at(l)?e(l):a(l)}}var j0e,QTa,xpt=f(()=>{B0e();q0e();Zr();H0e();V0e();ga();o0();j0e={name:"definition",tokenize:JTa},QTa={partial:!0,tokenize:e_a};i(JTa,"tokenizeDefinition");i(e_a,"tokenizeTitleBefore")});function t_a(t,e,a){return r;function r(o){return t.enter("hardBreakEscape"),t.consume(o),s}function s(o){return at(o)?(t.exit("hardBreakEscape"),e(o)):a(o)}}var U0e,ypt=f(()=>{ga();U0e={name:"hardBreakEscape",tokenize:t_a};i(t_a,"tokenizeHardBreakEscape")});function a_a(t,e){let a=t.length-2,r=3,s,o;return t[r][1].type==="whitespace"&&(r+=2),a-2>r&&t[a][1].type==="whitespace"&&(a-=2),t[a][1].type==="atxHeadingSequence"&&(r===a-1||a-4>r&&t[a-2][1].type==="whitespace")&&(a-=r+1===a?2:4),a>r&&(s={type:"atxHeadingText",start:t[r][1].start,end:t[a][1].end},o={type:"chunkText",start:t[r][1].start,end:t[a][1].end,contentType:"text"},Kr(t,r,a-r+1,[["enter",s,e],["enter",o,e],["exit",o,e],["exit",s,e]])),t}function r_a(t,e,a){let r=0;return s;function s(u){return t.enter("atxHeading"),o(u)}function o(u){return t.enter("atxHeadingSequence"),n(u)}function n(u){return u===35&&r++<6?(t.consume(u),n):u===null||ua(u)?(t.exit("atxHeadingSequence"),l(u)):a(u)}function l(u){return u===35?(t.enter("atxHeadingSequence"),c(u)):u===null||at(u)?(t.exit("atxHeading"),e(u)):Lt(u)?Et(t,l,"whitespace")(u):(t.enter("atxHeadingText"),d(u))}function c(u){return u===35?(t.consume(u),c):(t.exit("atxHeadingSequence"),l(u))}function d(u){return u===null||u===35||ua(u)?(t.exit("atxHeadingText"),l(u)):(t.consume(u),d)}}var W0e,wpt=f(()=>{Zr();ga();r2();W0e={name:"headingAtx",resolve:a_a,tokenize:r_a};i(a_a,"resolveHeadingAtx");i(r_a,"tokenizeHeadingAtx")});var Mpt,G0e,kpt=f(()=>{Mpt=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],G0e=["pre","script","style","textarea"]});function o_a(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function n_a(t,e,a){let r=this,s,o,n,l,c;return d;function d(P){return u(P)}function u(P){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(P),p}function p(P){return P===33?(t.consume(P),m):P===47?(t.consume(P),o=!0,b):P===63?(t.consume(P),s=3,r.interrupt?e:B):Ti(P)?(t.consume(P),n=String.fromCharCode(P),g):a(P)}function m(P){return P===45?(t.consume(P),s=2,v):P===91?(t.consume(P),s=5,l=0,x):Ti(P)?(t.consume(P),s=4,r.interrupt?e:B):a(P)}function v(P){return P===45?(t.consume(P),r.interrupt?e:B):a(P)}function x(P){let H="CDATA[";return P===H.charCodeAt(l++)?(t.consume(P),l===H.length?r.interrupt?e:z:x):a(P)}function b(P){return Ti(P)?(t.consume(P),n=String.fromCharCode(P),g):a(P)}function g(P){if(P===null||P===47||P===62||ua(P)){let H=P===47,de=n.toLowerCase();return!H&&!o&&G0e.includes(de)?(s=1,r.interrupt?e(P):z(P)):Mpt.includes(n.toLowerCase())?(s=6,H?(t.consume(P),y):r.interrupt?e(P):z(P)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?a(P):o?k(P):C(P))}return P===45||Fr(P)?(t.consume(P),n+=String.fromCharCode(P),g):a(P)}function y(P){return P===62?(t.consume(P),r.interrupt?e:z):a(P)}function k(P){return Lt(P)?(t.consume(P),k):O(P)}function C(P){return P===47?(t.consume(P),O):P===58||P===95||Ti(P)?(t.consume(P),R):Lt(P)?(t.consume(P),C):O(P)}function R(P){return P===45||P===46||P===58||P===95||Fr(P)?(t.consume(P),R):T(P)}function T(P){return P===61?(t.consume(P),S):Lt(P)?(t.consume(P),T):C(P)}function S(P){return P===null||P===60||P===61||P===62||P===96?a(P):P===34||P===39?(t.consume(P),c=P,N):Lt(P)?(t.consume(P),S):_(P)}function N(P){return P===c?(t.consume(P),c=null,I):P===null||at(P)?a(P):(t.consume(P),N)}function _(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||ua(P)?T(P):(t.consume(P),_)}function I(P){return P===47||P===62||Lt(P)?C(P):a(P)}function O(P){return P===62?(t.consume(P),M):a(P)}function M(P){return P===null||at(P)?z(P):Lt(P)?(t.consume(P),M):a(P)}function z(P){return P===45&&s===2?(t.consume(P),K):P===60&&s===1?(t.consume(P),j):P===62&&s===4?(t.consume(P),J):P===63&&s===3?(t.consume(P),B):P===93&&s===5?(t.consume(P),he):at(P)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(i_a,ve,E)(P)):P===null||at(P)?(t.exit("htmlFlowData"),E(P)):(t.consume(P),z)}function E(P){return t.check(s_a,A,ve)(P)}function A(P){return t.enter("lineEnding"),t.consume(P),t.exit("lineEnding"),F}function F(P){return P===null||at(P)?E(P):(t.enter("htmlFlowData"),z(P))}function K(P){return P===45?(t.consume(P),B):z(P)}function j(P){return P===47?(t.consume(P),n="",U):z(P)}function U(P){if(P===62){let H=n.toLowerCase();return G0e.includes(H)?(t.consume(P),J):z(P)}return Ti(P)&&n.length<8?(t.consume(P),n+=String.fromCharCode(P),U):z(P)}function he(P){return P===93?(t.consume(P),B):z(P)}function B(P){return P===62?(t.consume(P),J):P===45&&s===2?(t.consume(P),B):z(P)}function J(P){return P===null||at(P)?(t.exit("htmlFlowData"),ve(P)):(t.consume(P),J)}function ve(P){return t.exit("htmlFlow"),e(P)}}function l_a(t,e,a){let r=this;return s;function s(n){return at(n)?(t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),o):a(n)}function o(n){return r.parser.lazy[r.now().line]?a(n):e(n)}}function c_a(t,e,a){return r;function r(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),t.attempt(n2,e,a)}}var Y0e,i_a,s_a,Spt=f(()=>{ga();kpt();TX();Y0e={concrete:!0,name:"htmlFlow",resolveTo:o_a,tokenize:n_a},i_a={partial:!0,tokenize:c_a},s_a={partial:!0,tokenize:l_a};i(o_a,"resolveToHtmlFlow");i(n_a,"tokenizeHtmlFlow");i(l_a,"tokenizeNonLazyContinuationStart");i(c_a,"tokenizeBlankLineBefore")});function d_a(t,e,a){let r=this,s,o,n;return l;function l(B){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(B),c}function c(B){return B===33?(t.consume(B),d):B===47?(t.consume(B),T):B===63?(t.consume(B),C):Ti(B)?(t.consume(B),_):a(B)}function d(B){return B===45?(t.consume(B),u):B===91?(t.consume(B),o=0,x):Ti(B)?(t.consume(B),k):a(B)}function u(B){return B===45?(t.consume(B),v):a(B)}function p(B){return B===null?a(B):B===45?(t.consume(B),m):at(B)?(n=p,j(B)):(t.consume(B),p)}function m(B){return B===45?(t.consume(B),v):p(B)}function v(B){return B===62?K(B):B===45?m(B):p(B)}function x(B){let J="CDATA[";return B===J.charCodeAt(o++)?(t.consume(B),o===J.length?b:x):a(B)}function b(B){return B===null?a(B):B===93?(t.consume(B),g):at(B)?(n=b,j(B)):(t.consume(B),b)}function g(B){return B===93?(t.consume(B),y):b(B)}function y(B){return B===62?K(B):B===93?(t.consume(B),y):b(B)}function k(B){return B===null||B===62?K(B):at(B)?(n=k,j(B)):(t.consume(B),k)}function C(B){return B===null?a(B):B===63?(t.consume(B),R):at(B)?(n=C,j(B)):(t.consume(B),C)}function R(B){return B===62?K(B):C(B)}function T(B){return Ti(B)?(t.consume(B),S):a(B)}function S(B){return B===45||Fr(B)?(t.consume(B),S):N(B)}function N(B){return at(B)?(n=N,j(B)):Lt(B)?(t.consume(B),N):K(B)}function _(B){return B===45||Fr(B)?(t.consume(B),_):B===47||B===62||ua(B)?I(B):a(B)}function I(B){return B===47?(t.consume(B),K):B===58||B===95||Ti(B)?(t.consume(B),O):at(B)?(n=I,j(B)):Lt(B)?(t.consume(B),I):K(B)}function O(B){return B===45||B===46||B===58||B===95||Fr(B)?(t.consume(B),O):M(B)}function M(B){return B===61?(t.consume(B),z):at(B)?(n=M,j(B)):Lt(B)?(t.consume(B),M):I(B)}function z(B){return B===null||B===60||B===61||B===62||B===96?a(B):B===34||B===39?(t.consume(B),s=B,E):at(B)?(n=z,j(B)):Lt(B)?(t.consume(B),z):(t.consume(B),A)}function E(B){return B===s?(t.consume(B),s=void 0,F):B===null?a(B):at(B)?(n=E,j(B)):(t.consume(B),E)}function A(B){return B===null||B===34||B===39||B===60||B===61||B===96?a(B):B===47||B===62||ua(B)?I(B):(t.consume(B),A)}function F(B){return B===47||B===62||ua(B)?I(B):a(B)}function K(B){return B===62?(t.consume(B),t.exit("htmlTextData"),t.exit("htmlText"),e):a(B)}function j(B){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(B),t.exit("lineEnding"),U}function U(B){return Lt(B)?Et(t,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):he(B)}function he(B){return t.enter("htmlTextData"),n(B)}}var K0e,Cpt=f(()=>{Zr();ga();K0e={name:"htmlText",tokenize:d_a};i(d_a,"tokenizeHtmlText")});function h_a(t){let e=-1,a=[];for(;++e<t.length;){let r=t[e][1];if(a.push(t[e]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){let s=r.type==="labelImage"?4:2;r.type="data",e+=s}}return t.length!==a.length&&Kr(t,0,t.length,a),t}function m_a(t,e){let a=t.length,r=0,s,o,n,l;for(;a--;)if(s=t[a][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;t[a][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(n){if(t[a][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=a,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(n=a);let c={type:t[o][1].type==="labelLink"?"link":"image",start:{...t[o][1].start},end:{...t[t.length-1][1].end}},d={type:"label",start:{...t[o][1].start},end:{...t[n][1].end}},u={type:"labelText",start:{...t[o+r+2][1].end},end:{...t[n-2][1].start}};return l=[["enter",c,e],["enter",d,e]],l=li(l,t.slice(o+1,o+r+3)),l=li(l,[["enter",u,e]]),l=li(l,l0(e.parser.constructs.insideSpan.null,t.slice(o+r+4,n-3),e)),l=li(l,[["exit",u,e],t[n-2],t[n-1],["exit",d,e]]),l=li(l,t.slice(n+1)),l=li(l,[["exit",c,e]]),Kr(t,o,t.length,l),t}function g_a(t,e,a){let r=this,s=r.events.length,o,n;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){o=r.events[s][1];break}return l;function l(m){return o?o._inactive?p(m):(n=r.parser.defined.includes(Or(r.sliceSerialize({start:o.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(m),t.exit("labelMarker"),t.exit("labelEnd"),c):a(m)}function c(m){return m===40?t.attempt(u_a,u,n?u:p)(m):m===91?t.attempt(p_a,u,n?d:p)(m):n?u(m):p(m)}function d(m){return t.attempt(f_a,u,p)(m)}function u(m){return e(m)}function p(m){return o._balanced=!0,a(m)}}function b_a(t,e,a){return r;function r(p){return t.enter("resource"),t.enter("resourceMarker"),t.consume(p),t.exit("resourceMarker"),s}function s(p){return ua(p)?A3(t,o)(p):o(p)}function o(p){return p===41?u(p):IX(t,n,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function n(p){return ua(p)?A3(t,c)(p):u(p)}function l(p){return a(p)}function c(p){return p===34||p===39||p===40?EX(t,d,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):u(p)}function d(p){return ua(p)?A3(t,u)(p):u(p)}function u(p){return p===41?(t.enter("resourceMarker"),t.consume(p),t.exit("resourceMarker"),t.exit("resource"),e):a(p)}}function v_a(t,e,a){let r=this;return s;function s(l){return PX.call(r,t,o,n,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(Or(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(l):a(l)}function n(l){return a(l)}}function x_a(t,e,a){return r;function r(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),s}function s(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),e):a(o)}}var I3,u_a,p_a,f_a,NX=f(()=>{B0e();q0e();H0e();V0e();ga();r2();o0();sg();I3={name:"labelEnd",resolveAll:h_a,resolveTo:m_a,tokenize:g_a},u_a={tokenize:b_a},p_a={tokenize:v_a},f_a={tokenize:x_a};i(h_a,"resolveAllLabelEnd");i(m_a,"resolveToLabelEnd");i(g_a,"tokenizeLabelEnd");i(b_a,"tokenizeResource");i(v_a,"tokenizeReferenceFull");i(x_a,"tokenizeReferenceCollapsed")});function y_a(t,e,a){let r=this;return s;function s(l){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(l),t.exit("labelImageMarker"),o}function o(l){return l===91?(t.enter("labelMarker"),t.consume(l),t.exit("labelMarker"),t.exit("labelImage"),n):a(l)}function n(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?a(l):e(l)}}var Z0e,zpt=f(()=>{NX();Z0e={name:"labelStartImage",resolveAll:I3.resolveAll,tokenize:y_a};i(y_a,"tokenizeLabelStartImage")});function w_a(t,e,a){let r=this;return s;function s(n){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(n),t.exit("labelMarker"),t.exit("labelLink"),o}function o(n){return n===94&&"_hiddenFootnoteSupport"in r.parser.constructs?a(n):e(n)}}var X0e,Tpt=f(()=>{NX();X0e={name:"labelStartLink",resolveAll:I3.resolveAll,tokenize:w_a};i(w_a,"tokenizeLabelStartLink")});function M_a(t,e){return a;function a(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),Et(t,e,"linePrefix")}}var dg,_pt=f(()=>{Zr();ga();dg={name:"lineEnding",tokenize:M_a};i(M_a,"tokenizeLineEnding")});function k_a(t,e,a){let r=0,s;return o;function o(d){return t.enter("thematicBreak"),n(d)}function n(d){return s=d,l(d)}function l(d){return d===s?(t.enter("thematicBreakSequence"),c(d)):r>=3&&(d===null||at(d))?(t.exit("thematicBreak"),e(d)):a(d)}function c(d){return d===s?(t.consume(d),r++,c):(t.exit("thematicBreakSequence"),Lt(d)?Et(t,l,"whitespace")(d):l(d))}}var P3,Q0e=f(()=>{Zr();ga();P3={name:"thematicBreak",tokenize:k_a};i(k_a,"tokenizeThematicBreak")});function z_a(t,e,a){let r=this,s=r.events[r.events.length-1],o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,n=0;return l;function l(v){let x=r.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||v===r.containerState.marker:eg(v)){if(r.containerState.type||(r.containerState.type=x,t.enter(x,{_container:!0})),x==="listUnordered")return t.enter("listItemPrefix"),v===42||v===45?t.check(P3,a,d)(v):d(v);if(!r.interrupt||v===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),c(v)}return a(v)}function c(v){return eg(v)&&++n<10?(t.consume(v),c):(!r.interrupt||n<2)&&(r.containerState.marker?v===r.containerState.marker:v===41||v===46)?(t.exit("listItemValue"),d(v)):a(v)}function d(v){return t.enter("listItemMarker"),t.consume(v),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||v,t.check(n2,r.interrupt?a:u,t.attempt(S_a,m,p))}function u(v){return r.containerState.initialBlankLine=!0,o++,m(v)}function p(v){return Lt(v)?(t.enter("listItemPrefixWhitespace"),t.consume(v),t.exit("listItemPrefixWhitespace"),m):a(v)}function m(v){return r.containerState.size=o+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(v)}}function T_a(t,e,a){let r=this;return r.containerState._closeFlow=void 0,t.check(n2,s,o);function s(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Et(t,e,"listItemIndent",r.containerState.size+1)(l)}i(s,"onBlank");function o(l){return r.containerState.furtherBlankLines||!Lt(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,n(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(C_a,e,n)(l))}i(o,"notBlank");function n(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Et(t,t.attempt(zs,e,a),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}i(n,"notInCurrentItem")}function __a(t,e,a){let r=this;return Et(t,s,"listItemIndent",r.containerState.size+1);function s(o){let n=r.events[r.events.length-1];return n&&n[1].type==="listItemIndent"&&n[2].sliceSerialize(n[1],!0).length===r.containerState.size?e(o):a(o)}}function L_a(t){t.exit(this.containerState.type)}function $_a(t,e,a){let r=this;return Et(t,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){let n=r.events[r.events.length-1];return!Lt(o)&&n&&n[1].type==="listItemPrefixWhitespace"?e(o):a(o)}}var zs,S_a,C_a,Lpt=f(()=>{Zr();ga();TX();Q0e();zs={continuation:{tokenize:T_a},exit:L_a,name:"list",tokenize:z_a},S_a={partial:!0,tokenize:$_a},C_a={partial:!0,tokenize:__a};i(z_a,"tokenizeListStart");i(T_a,"tokenizeListContinuation");i(__a,"tokenizeIndent");i(L_a,"tokenizeListEnd");i($_a,"tokenizeListItemPrefixWhitespace")});function D_a(t,e){let a=t.length,r,s,o;for(;a--;)if(t[a][0]==="enter"){if(t[a][1].type==="content"){r=a;break}t[a][1].type==="paragraph"&&(s=a)}else t[a][1].type==="content"&&t.splice(a,1),!o&&t[a][1].type==="definition"&&(o=a);let n={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[s][1].type="setextHeadingText",o?(t.splice(s,0,["enter",n,e]),t.splice(o+1,0,["exit",t[r][1],e]),t[r][1].end={...t[o][1].end}):t[r][1]=n,t.push(["exit",n,e]),t}function A_a(t,e,a){let r=this,s;return o;function o(d){let u=r.events.length,p;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){p=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(t.enter("setextHeadingLine"),s=d,n(d)):a(d)}function n(d){return t.enter("setextHeadingLineSequence"),l(d)}function l(d){return d===s?(t.consume(d),l):(t.exit("setextHeadingLineSequence"),Lt(d)?Et(t,c,"lineSuffix")(d):c(d))}function c(d){return d===null||at(d)?(t.exit("setextHeadingLine"),e(d)):a(d)}}var RX,$pt=f(()=>{Zr();ga();RX={name:"setextUnderline",resolveTo:D_a,tokenize:A_a};i(D_a,"resolveToSetextUnderline");i(A_a,"tokenizeSetextUnderline")});var FX=f(()=>{cpt();dpt();TX();upt();ppt();fpt();mpt();gpt();bpt();vpt();xpt();ypt();wpt();Spt();Cpt();NX();zpt();Tpt();_pt();Lpt();$pt();Q0e()});function J0e(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:R_a,continuation:{tokenize:F_a},exit:O_a}},text:{91:{name:"gfmFootnoteCall",tokenize:N_a},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:P_a,resolveTo:E_a}}}}function P_a(t,e,a){let r=this,s=r.events.length,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),n;for(;s--;){let c=r.events[s][1];if(c.type==="labelImage"){n=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!n||!n._balanced)return a(c);let d=Or(r.sliceSerialize({start:n.end,end:r.now()}));return d.codePointAt(0)!==94||!o.includes(d.slice(1))?a(c):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(c),t.exit("gfmFootnoteCallLabelMarker"),e(c))}}function E_a(t,e){let a=t.length,r;for(;a--;)if(t[a][1].type==="labelImage"&&t[a][0]==="enter"){r=t[a][1];break}t[a+1][1].type="data",t[a+3][1].type="gfmFootnoteCallLabelMarker";let s={type:"gfmFootnoteCall",start:Object.assign({},t[a+3][1].start),end:Object.assign({},t[t.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[a+3][1].end),end:Object.assign({},t[a+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let n={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},n.start),end:Object.assign({},n.end)},c=[t[a+1],t[a+2],["enter",s,e],t[a+3],t[a+4],["enter",o,e],["exit",o,e],["enter",n,e],["enter",l,e],["exit",l,e],["exit",n,e],t[t.length-2],t[t.length-1],["exit",s,e]];return t.splice(a,t.length-a+1,...c),t}function N_a(t,e,a){let r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o=0,n;return l;function l(p){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),c}function c(p){return p!==94?a(p):(t.enter("gfmFootnoteCallMarker"),t.consume(p),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",d)}function d(p){if(o>999||p===93&&!n||p===null||p===91||ua(p))return a(p);if(p===93){t.exit("chunkString");let m=t.exit("gfmFootnoteCallString");return s.includes(Or(r.sliceSerialize(m)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):a(p)}return ua(p)||(n=!0),o++,t.consume(p),p===92?u:d}function u(p){return p===91||p===92||p===93?(t.consume(p),o++,d):d(p)}}function R_a(t,e,a){let r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o,n=0,l;return c;function c(x){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(x),t.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(x){return x===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(x),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",u):a(x)}function u(x){if(n>999||x===93&&!l||x===null||x===91||ua(x))return a(x);if(x===93){t.exit("chunkString");let b=t.exit("gfmFootnoteDefinitionLabelString");return o=Or(r.sliceSerialize(b)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(x),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),m}return ua(x)||(l=!0),n++,t.consume(x),x===92?p:u}function p(x){return x===91||x===92||x===93?(t.consume(x),n++,u):u(x)}function m(x){return x===58?(t.enter("definitionMarker"),t.consume(x),t.exit("definitionMarker"),s.includes(o)||s.push(o),Et(t,v,"gfmFootnoteDefinitionWhitespace")):a(x)}function v(x){return e(x)}}function F_a(t,e,a){return t.check(n2,e,t.attempt(I_a,e,a))}function O_a(t){t.exit("gfmFootnoteDefinition")}function B_a(t,e,a){let r=this;return Et(t,s,"gfmFootnoteDefinitionIndent",5);function s(o){let n=r.events[r.events.length-1];return n&&n[1].type==="gfmFootnoteDefinitionIndent"&&n[2].sliceSerialize(n[1],!0).length===4?e(o):a(o)}}var I_a,Dpt=f(()=>{FX();Zr();ga();o0();I_a={tokenize:B_a,partial:!0};i(J0e,"gfmFootnote");i(P_a,"tokenizePotentialGfmFootnoteCall");i(E_a,"resolveToPotentialGfmFootnoteCall");i(N_a,"tokenizeGfmFootnoteCall");i(R_a,"tokenizeDefinitionStart");i(F_a,"tokenizeDefinitionContinuation");i(O_a,"gfmFootnoteDefinitionEnd");i(B_a,"tokenizeIndent")});function Apt(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function e4e(t){let e=t||H_a,a=e.label||"Footnotes",r=e.labelTagName||"h2",s=e.labelAttributes===null||e.labelAttributes===void 0?'class="sr-only"':e.labelAttributes,o=e.backLabel||Apt,n=e.clobberPrefix===null||e.clobberPrefix===void 0?"user-content-":e.clobberPrefix;return{enter:{gfmFootnoteDefinition(){this.getData("tightStack").push(!1)},gfmFootnoteDefinitionLabelString(){this.buffer()},gfmFootnoteCallString(){this.buffer()}},exit:{gfmFootnoteDefinition(){let l=this.getData("gfmFootnoteDefinitions"),c=this.getData("gfmFootnoteDefinitionStack"),d=this.getData("tightStack"),u=c.pop(),p=this.resume();l||this.setData("gfmFootnoteDefinitions",l={}),q_a.call(l,u)||(l[u]=p),d.pop(),this.setData("slurpOneLineEnding",!0),this.setData("lastWasTag")},gfmFootnoteDefinitionLabelString(l){let c=this.getData("gfmFootnoteDefinitionStack");c||this.setData("gfmFootnoteDefinitionStack",c=[]),c.push(Or(this.sliceSerialize(l))),this.resume(),this.buffer()},gfmFootnoteCallString(l){let c=this.getData("gfmFootnoteCallOrder"),d=this.getData("gfmFootnoteCallCounts"),u=Or(this.sliceSerialize(l)),p;this.resume(),c||this.setData("gfmFootnoteCallOrder",c=[]),d||this.setData("gfmFootnoteCallCounts",d={});let m=c.indexOf(u),v=s2(u.toLowerCase());m===-1?(c.push(u),d[u]=1,p=c.length):(d[u]++,p=m+1);let x=d[u];this.tag('<sup><a href="#'+n+"fn-"+v+'" id="'+n+"fnref-"+v+(x>1?"-"+x:"")+'" data-footnote-ref="" aria-describedby="footnote-label">'+String(p)+"</a></sup>")},null(){let l=this.getData("gfmFootnoteCallOrder")||[],c=this.getData("gfmFootnoteCallCounts")||{},d=this.getData("gfmFootnoteDefinitions")||{},u=-1;for(l.length>0&&(this.lineEndingIfNeeded(),this.tag('<section data-footnotes="" class="footnotes"><'+r+' id="footnote-label"'+(s?" "+s:"")+">"),this.raw(this.encode(a)),this.tag("</"+r+">"),this.lineEndingIfNeeded(),this.tag("<ol>"));++u<l.length;){let p=l[u],m=s2(p.toLowerCase()),v=0,x=[];for(;++v<=c[p];)x.push('<a href="#'+n+"fnref-"+m+(v>1?"-"+v:"")+'" data-footnote-backref="" aria-label="'+this.encode(typeof o=="string"?o:o(u,v))+'" class="data-footnote-backref">\u21A9'+(v>1?"<sup>"+v+"</sup>":"")+"</a>");let b=x.join(" "),g=!1;this.lineEndingIfNeeded(),this.tag('<li id="'+n+"fn-"+m+'">'),this.lineEndingIfNeeded(),this.tag(d[p].replace(/<\/p>(?:\r?\n|\r)?$/,function(y){return g=!0," "+b+y})),g||(this.lineEndingIfNeeded(),this.tag(b)),this.lineEndingIfNeeded(),this.tag("</li>")}l.length>0&&(this.lineEndingIfNeeded(),this.tag("</ol>"),this.lineEndingIfNeeded(),this.tag("</section>"))}}}}var q_a,H_a,Ipt=f(()=>{o0();o2();q_a={}.hasOwnProperty,H_a={};i(Apt,"defaultBackLabel");i(e4e,"gfmFootnoteHtml")});var Ppt=f(()=>{Dpt();Ipt()});function t4e(){return{enter:{strikethrough(){this.tag("<del>")}},exit:{strikethrough(){this.tag("</del>")}}}}var Ept=f(()=>{i(t4e,"gfmStrikethroughHtml")});function a4e(t){let a=(t||{}).singleTilde,r={name:"strikethrough",tokenize:o,resolveAll:s};return a==null&&(a=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(n,l){let c=-1;for(;++c<n.length;)if(n[c][0]==="enter"&&n[c][1].type==="strikethroughSequenceTemporary"&&n[c][1]._close){let d=c;for(;d--;)if(n[d][0]==="exit"&&n[d][1].type==="strikethroughSequenceTemporary"&&n[d][1]._open&&n[c][1].end.offset-n[c][1].start.offset===n[d][1].end.offset-n[d][1].start.offset){n[c][1].type="strikethroughSequence",n[d][1].type="strikethroughSequence";let u={type:"strikethrough",start:Object.assign({},n[d][1].start),end:Object.assign({},n[c][1].end)},p={type:"strikethroughText",start:Object.assign({},n[d][1].end),end:Object.assign({},n[c][1].start)},m=[["enter",u,l],["enter",n[d][1],l],["exit",n[d][1],l],["enter",p,l]],v=l.parser.constructs.insideSpan.null;v&&Kr(m,m.length,0,l0(v,n.slice(d+1,c),l)),Kr(m,m.length,0,[["exit",p,l],["enter",n[c][1],l],["exit",n[c][1],l],["exit",u,l]]),Kr(n,d-1,c-d+3,m),c=d+m.length-2;break}}for(c=-1;++c<n.length;)n[c][1].type==="strikethroughSequenceTemporary"&&(n[c][1].type="data");return n}i(s,"resolveAllStrikethrough");function o(n,l,c){let d=this.previous,u=this.events,p=0;return m;function m(x){return d===126&&u[u.length-1][1].type!=="characterEscape"?c(x):(n.enter("strikethroughSequenceTemporary"),v(x))}function v(x){let b=dl(d);if(x===126)return p>1?c(x):(n.consume(x),p++,v);if(p<2&&!a)return c(x);let g=n.exit("strikethroughSequenceTemporary"),y=dl(x);return g._open=!y||y===2&&!!b,g._close=!b||b===2&&!!y,l(x)}}i(o,"tokenizeStrikethrough")}var Npt=f(()=>{r2();mX();sg();i(a4e,"gfmStrikethrough")});var Rpt=f(()=>{Ept();Npt()});function i4e(){return{enter:{table(t){let e=t._align;this.lineEndingIfNeeded(),this.tag("<table>"),this.setData("tableAlign",e)},tableBody(){this.tag("<tbody>")},tableData(){let t=this.getData("tableAlign"),e=this.getData("tableColumn"),a=r4e[t[e]];a===void 0?this.buffer():(this.lineEndingIfNeeded(),this.tag("<td"+a+">"))},tableHead(){this.lineEndingIfNeeded(),this.tag("<thead>")},tableHeader(){let t=this.getData("tableAlign"),e=this.getData("tableColumn"),a=r4e[t[e]];this.lineEndingIfNeeded(),this.tag("<th"+a+">")},tableRow(){this.setData("tableColumn",0),this.lineEndingIfNeeded(),this.tag("<tr>")}},exit:{codeTextData(t){let e=this.sliceSerialize(t);this.getData("tableAlign")&&(e=e.replace(/\\([\\|])/g,V_a)),this.raw(this.encode(e))},table(){this.setData("tableAlign"),this.setData("slurpAllLineEndings"),this.lineEndingIfNeeded(),this.tag("</table>")},tableBody(){this.lineEndingIfNeeded(),this.tag("</tbody>")},tableData(){let t=this.getData("tableAlign"),e=this.getData("tableColumn");e in t?(this.tag("</td>"),this.setData("tableColumn",e+1)):this.resume()},tableHead(){this.lineEndingIfNeeded(),this.tag("</thead>")},tableHeader(){let t=this.getData("tableColumn");this.tag("</th>"),this.setData("tableColumn",t+1)},tableRow(){let t=this.getData("tableAlign"),e=this.getData("tableColumn");for(;e<t.length;)this.lineEndingIfNeeded(),this.tag("<td"+r4e[t[e]]+"></td>"),e++;this.setData("tableColumn",e),this.lineEndingIfNeeded(),this.tag("</tr>")}}}}function V_a(t,e){return e==="|"?e:t}var r4e,Fpt=f(()=>{r4e={none:"",left:' align="left"',right:' align="right"',center:' align="center"'};i(i4e,"gfmTableHtml");i(V_a,"replace")});function j_a(t,e,a,r){let s=0;if(!(a===0&&r.length===0)){for(;s<t.map.length;){if(t.map[s][0]===e){t.map[s][1]+=a,t.map[s][2].push(...r);return}s+=1}t.map.push([e,a,r])}}var OX,Opt=f(()=>{OX=class{static{i(this,"EditMap")}constructor(){this.map=[]}add(e,a,r){j_a(this,e,a,r)}consume(e){if(this.map.sort(function(o,n){return o[0]-n[0]}),this.map.length===0)return;let a=this.map.length,r=[];for(;a>0;)a-=1,r.push(e.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),e.length=this.map[a][0];r.push(e.slice()),e.length=0;let s=r.pop();for(;s;){for(let o of s)e.push(o);s=r.pop()}this.map.length=0}};i(j_a,"addImplementation")});function Bpt(t,e){let a=!1,r=[];for(;e<t.length;){let s=t[e];if(a){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){let o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(a=!0);e+=1}return r}var qpt=f(()=>{i(Bpt,"gfmTableAlign")});function s4e(){return{flow:{null:{name:"table",tokenize:U_a,resolveAll:W_a}}}}function U_a(t,e,a){let r=this,s=0,o=0,n;return l;function l(O){let M=r.events.length-1;for(;M>-1;){let A=r.events[M][1].type;if(A==="lineEnding"||A==="linePrefix")M--;else break}let z=M>-1?r.events[M][1].type:null,E=z==="tableHead"||z==="tableRow"?S:c;return E===S&&r.parser.lazy[r.now().line]?a(O):E(O)}function c(O){return t.enter("tableHead"),t.enter("tableRow"),d(O)}function d(O){return O===124||(n=!0,o+=1),u(O)}function u(O){return O===null?a(O):at(O)?o>1?(o=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),v):a(O):Lt(O)?Et(t,u,"whitespace")(O):(o+=1,n&&(n=!1,s+=1),O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),n=!0,u):(t.enter("data"),p(O)))}function p(O){return O===null||O===124||ua(O)?(t.exit("data"),u(O)):(t.consume(O),O===92?m:p)}function m(O){return O===92||O===124?(t.consume(O),p):p(O)}function v(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?a(O):(t.enter("tableDelimiterRow"),n=!1,Lt(O)?Et(t,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):x(O))}function x(O){return O===45||O===58?g(O):O===124?(n=!0,t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),b):T(O)}function b(O){return Lt(O)?Et(t,g,"whitespace")(O):g(O)}function g(O){return O===58?(o+=1,n=!0,t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),y):O===45?(o+=1,y(O)):O===null||at(O)?R(O):T(O)}function y(O){return O===45?(t.enter("tableDelimiterFiller"),k(O)):T(O)}function k(O){return O===45?(t.consume(O),k):O===58?(n=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),C):(t.exit("tableDelimiterFiller"),C(O))}function C(O){return Lt(O)?Et(t,R,"whitespace")(O):R(O)}function R(O){return O===124?x(O):O===null||at(O)?!n||s!==o?T(O):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(O)):T(O)}function T(O){return a(O)}function S(O){return t.enter("tableRow"),N(O)}function N(O){return O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),N):O===null||at(O)?(t.exit("tableRow"),e(O)):Lt(O)?Et(t,N,"whitespace")(O):(t.enter("data"),_(O))}function _(O){return O===null||O===124||ua(O)?(t.exit("data"),N(O)):(t.consume(O),O===92?I:_)}function I(O){return O===92||O===124?(t.consume(O),_):_(O)}}function W_a(t,e){let a=-1,r=!0,s=0,o=[0,0,0,0],n=[0,0,0,0],l=!1,c=0,d,u,p,m=new OX;for(;++a<t.length;){let v=t[a],x=v[1];v[0]==="enter"?x.type==="tableHead"?(l=!1,c!==0&&(Hpt(m,e,c,d,u),u=void 0,c=0),d={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},m.add(a,0,[["enter",d,e]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,p=void 0,o=[0,0,0,0],n=[0,a+1,0,0],l&&(l=!1,u={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},m.add(a,0,[["enter",u,e]])),s=x.type==="tableDelimiterRow"?2:u?3:1):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,n[2]===0&&(o[1]!==0&&(n[0]=n[1],p=BX(m,e,o,s,void 0,p),o=[0,0,0,0]),n[2]=a)):x.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(n[0]=n[1],p=BX(m,e,o,s,void 0,p)),o=n,n=[o[1],a,0,0])):x.type==="tableHead"?(l=!0,c=a):x.type==="tableRow"||x.type==="tableDelimiterRow"?(c=a,o[1]!==0?(n[0]=n[1],p=BX(m,e,o,s,a,p)):n[1]!==0&&(p=BX(m,e,n,s,a,p)),s=0):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(n[3]=a)}for(c!==0&&Hpt(m,e,c,d,u),m.consume(e.events),a=-1;++a<e.events.length;){let v=e.events[a];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=Bpt(e.events,a))}return t}function BX(t,e,a,r,s,o){let n=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";a[0]!==0&&(o.end=Object.assign({},a8(e.events,a[0])),t.add(a[0],0,[["exit",o,e]]));let c=a8(e.events,a[1]);if(o={type:n,start:Object.assign({},c),end:Object.assign({},c)},t.add(a[1],0,[["enter",o,e]]),a[2]!==0){let d=a8(e.events,a[2]),u=a8(e.events,a[3]),p={type:l,start:Object.assign({},d),end:Object.assign({},u)};if(t.add(a[2],0,[["enter",p,e]]),r!==2){let m=e.events[a[2]],v=e.events[a[3]];if(m[1].end=Object.assign({},v[1].end),m[1].type="chunkText",m[1].contentType="text",a[3]>a[2]+1){let x=a[2]+1,b=a[3]-a[2]-1;t.add(x,b,[])}}t.add(a[3]+1,0,[["exit",p,e]])}return s!==void 0&&(o.end=Object.assign({},a8(e.events,s)),t.add(s,0,[["exit",o,e]]),o=void 0),o}function Hpt(t,e,a,r,s){let o=[],n=a8(e.events,a);s&&(s.end=Object.assign({},n),o.push(["exit",s,e])),r.end=Object.assign({},n),o.push(["exit",r,e]),t.add(a+1,0,o)}function a8(t,e){let a=t[e],r=a[0]==="enter"?"start":"end";return a[1][r]}var Vpt=f(()=>{Zr();ga();Opt();qpt();i(s4e,"gfmTable");i(U_a,"tokenizeTable");i(W_a,"resolveTable");i(BX,"flushCell");i(Hpt,"flushTableEnd");i(a8,"getPoint")});var jpt=f(()=>{Fpt();Vpt()});function o4e(){return{exit:{htmlFlowData(t){Wpt.call(this,t,Upt)},htmlTextData(t){Wpt.call(this,t,G_a)}}}}function Wpt(t,e){let a=this.sliceSerialize(t);this.options.allowDangerousHtml&&(a=a.replace(e,"&lt;$1$2")),this.raw(this.encode(a))}var Upt,G_a,Gpt=f(()=>{Upt=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|title|textarea|xmp)(?=[\t\n\f\r />])/gi,G_a=new RegExp("^"+Upt.source,"i");i(o4e,"gfmTagfilterHtml");i(Wpt,"exitHtmlData")});var Ypt=f(()=>{Gpt()});function n4e(){return{enter:{taskListCheck(){this.tag('<input type="checkbox" disabled="" ')}},exit:{taskListCheck(){this.tag("/>")},taskListCheckValueChecked(){this.tag('checked="" ')}}}}var Kpt=f(()=>{i(n4e,"gfmTaskListItemHtml")});function l4e(){return{text:{91:Y_a}}}function K_a(t,e,a){let r=this;return s;function s(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?a(c):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(c),t.exit("taskListCheckMarker"),o)}function o(c){return ua(c)?(t.enter("taskListCheckValueUnchecked"),t.consume(c),t.exit("taskListCheckValueUnchecked"),n):c===88||c===120?(t.enter("taskListCheckValueChecked"),t.consume(c),t.exit("taskListCheckValueChecked"),n):a(c)}function n(c){return c===93?(t.enter("taskListCheckMarker"),t.consume(c),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),l):a(c)}function l(c){return at(c)?e(c):Lt(c)?t.check({tokenize:Z_a},e,a)(c):a(c)}}function Z_a(t,e,a){return Et(t,r,"whitespace");function r(s){return s===null?a(s):e(s)}}var Y_a,Zpt=f(()=>{Zr();ga();Y_a={name:"tasklistCheck",tokenize:K_a};i(l4e,"gfmTaskListItem");i(K_a,"tokenizeTasklistCheck");i(Z_a,"spaceThenNonSpace")});var Xpt=f(()=>{Kpt();Zpt()});function Qpt(t){return kX([D0e(),J0e(),a4e(t),s4e(),l4e()])}function sYr(t){return SX([P0e(),e4e(t),t4e(),i4e(),o4e(),n4e()])}var Jpt=f(()=>{CX();npt();Ppt();Rpt();jpt();Ypt();Xpt();i(Qpt,"gfm");i(sYr,"gfmHtml")});function r8(t){let e=this,a=t||X_a,r=e.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),n=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(Qpt(a)),o.push(z0e()),n.push(T0e(a))}var X_a,eft=f(()=>{Z6t();Jpt();X_a={};i(r8,"remarkGfm")});var tft=f(()=>{eft()});function c4e(t){let e=t||{},a=!0,r={},s=[[]],o=[],n=[],c=SX([{enter:{blockQuote:F,codeFenced:he,codeFencedFenceInfo:g,codeFencedFenceMeta:g,codeIndented:ve,codeText:fe,content:Ce,definition:ye,definitionDestinationString:q,definitionLabelString:g,definitionTitleString:g,emphasis:we,htmlFlow:nt,htmlText:_e,image:H,label:g,link:de,listItemMarker:M,listItemValue:O,listOrdered:_,listUnordered:I,paragraph:j,reference:g,resource:Q,resourceDestinationString:Z,resourceTitleString:g,setextHeading:Ve,strong:Ne},exit:{atxHeading:$e,atxHeadingSequence:Fe,autolinkEmail:gi,autolinkProtocol:tr,blockQuote:K,characterEscapeValue:pe,characterReferenceMarkerHexadecimal:Ft,characterReferenceMarkerNumeric:Ft,characterReferenceValue:Ja,codeFenced:P,codeFencedFence:J,codeFencedFenceInfo:B,codeFencedFenceMeta:N,codeFlowValue:Ae,codeIndented:P,codeText:ge,codeTextData:pe,data:pe,definition:te,definitionDestinationString:oe,definitionLabelString:V,definitionTitleString:se,emphasis:Pe,hardBreakEscape:Ke,hardBreakTrailing:Ke,htmlFlow:_t,htmlFlowData:pe,htmlText:_t,htmlTextData:pe,image:re,label:Y,labelText:ue,lineEnding:be,link:re,listOrdered:z,listUnordered:E,paragraph:U,reference:N,referenceString:X,resource:N,resourceDestinationString:me,resourceTitleString:ae,setextHeading:Me,setextHeadingLineSequence:ze,setextHeadingText:dt,strong:bt,thematicBreak:vt}},...e.htmlExtensions||[]]),d={definitions:r,tightStack:n},u={buffer:g,encode:S,getData:b,lineEndingIfNeeded:T,options:e,raw:C,resume:y,setData:x,tag:k},p=e.defaultLineEnding;return m;function m(Ue){let mt=-1,er=0,Sr=[],Ar=[],Wr=[];for(;++mt<Ue.length;)!p&&(Ue[mt][1].type==="lineEnding"||Ue[mt][1].type==="lineEndingBlank")&&(p=Ue[mt][2].sliceSerialize(Ue[mt][1])),(Ue[mt][1].type==="listOrdered"||Ue[mt][1].type==="listUnordered")&&(Ue[mt][0]==="enter"?Sr.push(mt):v(Ue.slice(Sr.pop(),mt))),Ue[mt][1].type==="definition"&&(Ue[mt][0]==="enter"?(Wr=li(Wr,Ue.slice(er,mt)),er=mt):(Ar=li(Ar,Ue.slice(er,mt+1)),er=mt+1));Ar=li(Ar,Wr),Ar=li(Ar,Ue.slice(er)),mt=-1;let Ir=Ar;for(c.enter.null&&c.enter.null.call(u);++mt<Ue.length;){let go=c[Ir[mt][0]],bo=Ir[mt][1].type,Le=go[bo];aft.call(go,bo)&&Le&&Le.call({sliceSerialize:Ir[mt][2].sliceSerialize,...u},Ir[mt][1])}return c.exit.null&&c.exit.null.call(u),s[0].join("")}function v(Ue){let mt=Ue.length,er=0,Sr=0,Ar=!1,Wr;for(;++er<mt;){let Ir=Ue[er];if(Ir[1]._container)Wr=void 0,Ir[0]==="enter"?Sr++:Sr--;else switch(Ir[1].type){case"listItemPrefix":{Ir[0]==="exit"&&(Wr=!0);break}case"linePrefix":break;case"lineEndingBlank":{Ir[0]==="enter"&&!Sr&&(Wr?Wr=void 0:Ar=!0);break}default:Wr=void 0}}Ue[0][1]._loose=Ar}function x(Ue,mt){d[Ue]=mt}function b(Ue){return d[Ue]}function g(){s.push([])}function y(){return s.pop().join("")}function k(Ue){a&&(x("lastWasTag",!0),s[s.length-1].push(Ue))}function C(Ue){x("lastWasTag"),s[s.length-1].push(Ue)}function R(){C(p||`
78
+ `)}function T(){let Ue=s[s.length-1],mt=Ue[Ue.length-1],er=mt?mt.charCodeAt(mt.length-1):null;er===10||er===13||er===null||R()}function S(Ue){return b("ignoreEncode")?Ue:zX(Ue)}function N(){y()}function _(Ue){n.push(!Ue._loose),T(),k("<ol"),x("expectFirstItem",!0)}function I(Ue){n.push(!Ue._loose),T(),k("<ul"),x("expectFirstItem",!0)}function O(Ue){if(b("expectFirstItem")){let mt=Number.parseInt(this.sliceSerialize(Ue),10);mt!==1&&k(' start="'+S(String(mt))+'"')}}function M(){b("expectFirstItem")?k(">"):A(),T(),k("<li>"),x("expectFirstItem"),x("lastWasTag")}function z(){A(),n.pop(),R(),k("</ol>")}function E(){A(),n.pop(),R(),k("</ul>")}function A(){b("lastWasTag")&&!b("slurpAllLineEndings")&&T(),k("</li>"),x("slurpAllLineEndings")}function F(){n.push(!1),T(),k("<blockquote>")}function K(){n.pop(),T(),k("</blockquote>"),x("slurpAllLineEndings")}function j(){n[n.length-1]||(T(),k("<p>")),x("slurpAllLineEndings")}function U(){n[n.length-1]?x("slurpAllLineEndings",!0):k("</p>")}function he(){T(),k("<pre><code"),x("fencesCount",0)}function B(){let Ue=y();k(' class="language-'+Ue+'"')}function J(){let Ue=b("fencesCount")||0;Ue||(k(">"),x("slurpOneLineEnding",!0)),x("fencesCount",Ue+1)}function ve(){T(),k("<pre><code>")}function P(){let Ue=b("fencesCount");Ue!==void 0&&Ue<2&&d.tightStack.length>0&&!b("lastWasTag")&&R(),b("flowCodeSeenData")&&T(),k("</code></pre>"),Ue!==void 0&&Ue<2&&T(),x("flowCodeSeenData"),x("fencesCount"),x("slurpOneLineEnding")}function H(){o.push({image:!0}),a=void 0}function de(){o.push({})}function ue(Ue){o[o.length-1].labelId=this.sliceSerialize(Ue)}function Y(){o[o.length-1].label=y()}function X(Ue){o[o.length-1].referenceId=this.sliceSerialize(Ue)}function Q(){g(),o[o.length-1].destination=""}function Z(){g(),x("ignoreEncode",!0)}function me(){o[o.length-1].destination=y(),x("ignoreEncode")}function ae(){o[o.length-1].title=y()}function re(){let Ue=o.length-1,mt=o[Ue],er=mt.referenceId||mt.labelId,Sr=mt.destination===void 0?r[Or(er)]:mt;for(a=!0;Ue--;)if(o[Ue].image){a=void 0;break}mt.image?(k('<img src="'+s2(Sr.destination,e.allowDangerousProtocol?void 0:Q_a)+'" alt="'),C(mt.label),k('"')):k('<a href="'+s2(Sr.destination,e.allowDangerousProtocol?void 0:rft)+'"'),k(Sr.title?' title="'+Sr.title+'"':""),mt.image?k(" />"):(k(">"),C(mt.label),k("</a>")),o.pop()}function ye(){g(),o.push({})}function V(Ue){y(),o[o.length-1].labelId=this.sliceSerialize(Ue)}function q(){g(),x("ignoreEncode",!0)}function oe(){o[o.length-1].destination=y(),x("ignoreEncode")}function se(){o[o.length-1].title=y()}function te(){let Ue=o[o.length-1],mt=Or(Ue.labelId);y(),aft.call(r,mt)||(r[mt]=o[o.length-1]),o.pop()}function Ce(){x("slurpAllLineEndings",!0)}function Fe(Ue){b("headingRank")||(x("headingRank",this.sliceSerialize(Ue).length),T(),k("<h"+b("headingRank")+">"))}function Ve(){g(),x("slurpAllLineEndings")}function dt(){x("slurpAllLineEndings",!0)}function $e(){k("</h"+b("headingRank")+">"),x("headingRank")}function ze(Ue){x("headingRank",this.sliceSerialize(Ue).charCodeAt(0)===61?1:2)}function Me(){let Ue=y();T(),k("<h"+b("headingRank")+">"),C(Ue),k("</h"+b("headingRank")+">"),x("slurpAllLineEndings"),x("headingRank")}function pe(Ue){C(S(this.sliceSerialize(Ue)))}function be(Ue){if(!b("slurpAllLineEndings")){if(b("slurpOneLineEnding")){x("slurpOneLineEnding");return}if(b("inCodeText")){C(" ");return}C(S(this.sliceSerialize(Ue)))}}function Ae(Ue){C(S(this.sliceSerialize(Ue))),x("flowCodeSeenData",!0)}function Ke(){k("<br />")}function nt(){T(),_e()}function _t(){x("ignoreEncode")}function _e(){e.allowDangerousHtml&&x("ignoreEncode",!0)}function we(){k("<em>")}function Ne(){k("<strong>")}function fe(){x("inCodeText",!0),k("<code>")}function ge(){x("inCodeText"),k("</code>")}function Pe(){k("</em>")}function bt(){k("</strong>")}function vt(){T(),k("<hr />")}function Ft(Ue){x("characterReferenceType",Ue.type)}function Ja(Ue){let mt=this.sliceSerialize(Ue),er=b("characterReferenceType")?t8(mt,b("characterReferenceType")==="characterReferenceMarkerNumeric"?10:16):n0(mt);C(S(er)),x("characterReferenceType")}function tr(Ue){let mt=this.sliceSerialize(Ue);k('<a href="'+s2(mt,e.allowDangerousProtocol?void 0:rft)+'">'),C(S(mt)),k("</a>")}function gi(Ue){let mt=this.sliceSerialize(Ue);k('<a href="'+s2("mailto:"+mt)+'">'),C(S(mt)),k("</a>")}}var aft,rft,Q_a,d4e=f(()=>{ig();r2();CX();yX();A0e();o0();o2();aft={}.hasOwnProperty,rft=/^(https?|ircs?|mailto|xmpp)$/i,Q_a=/^https?$/i;i(c4e,"compile")});function J_a(t){let e=t.attempt(this.parser.constructs.contentInitial,r,s),a;return e;function r(l){if(l===null){t.consume(l);return}return t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),Et(t,e,"linePrefix")}function s(l){return t.enter("paragraph"),o(l)}function o(l){let c=t.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=c),a=c,n(l)}function n(l){if(l===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(l);return}return at(l)?(t.consume(l),t.exit("chunkText"),o):(t.consume(l),n)}}var ift,sft=f(()=>{Zr();ga();ift={tokenize:J_a};i(J_a,"initializeContent")});function eLa(t){let e=this,a=[],r=0,s,o,n;return l;function l(C){if(r<a.length){let R=a[r];return e.containerState=R[1],t.attempt(R[0].continuation,c,d)(C)}return d(C)}function c(C){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,s&&k();let R=e.events.length,T=R,S;for(;T--;)if(e.events[T][0]==="exit"&&e.events[T][1].type==="chunkFlow"){S=e.events[T][1].end;break}y(r);let N=R;for(;N<e.events.length;)e.events[N][1].end={...S},N++;return Kr(e.events,T+1,0,e.events.slice(R)),e.events.length=N,d(C)}return l(C)}function d(C){if(r===a.length){if(!s)return m(C);if(s.currentConstruct&&s.currentConstruct.concrete)return x(C);e.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(oft,u,p)(C)}function u(C){return s&&k(),y(r),m(C)}function p(C){return e.parser.lazy[e.now().line]=r!==a.length,n=e.now().offset,x(C)}function m(C){return e.containerState={},t.attempt(oft,v,x)(C)}function v(C){return r++,a.push([e.currentConstruct,e.containerState]),m(C)}function x(C){if(C===null){s&&k(),y(0),t.consume(C);return}return s=s||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),b(C)}function b(C){if(C===null){g(t.exit("chunkFlow"),!0),y(0),t.consume(C);return}return at(C)?(t.consume(C),g(t.exit("chunkFlow")),r=0,e.interrupt=void 0,l):(t.consume(C),b)}function g(C,R){let T=e.sliceStream(C);if(R&&T.push(null),C.previous=o,o&&(o.next=C),o=C,s.defineSkip(C.start),s.write(T),e.parser.lazy[C.start.line]){let S=s.events.length;for(;S--;)if(s.events[S][1].start.offset<n&&(!s.events[S][1].end||s.events[S][1].end.offset>n))return;let N=e.events.length,_=N,I,O;for(;_--;)if(e.events[_][0]==="exit"&&e.events[_][1].type==="chunkFlow"){if(I){O=e.events[_][1].end;break}I=!0}for(y(r),S=N;S<e.events.length;)e.events[S][1].end={...O},S++;Kr(e.events,_+1,0,e.events.slice(N)),e.events.length=S}}function y(C){let R=a.length;for(;R-- >C;){let T=a[R];e.containerState=T[1],T[0].exit.call(e,t)}a.length=C}function k(){s.write([null]),o=void 0,s=void 0,e.containerState._closeFlow=void 0}}function tLa(t,e,a){return Et(t,t.attempt(this.parser.constructs.document,e,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var nft,oft,lft=f(()=>{Zr();ga();r2();nft={tokenize:eLa},oft={tokenize:tLa};i(eLa,"initializeDocument");i(tLa,"tokenizeContainer")});function aLa(t){let e=this,a=t.attempt(n2,r,t.attempt(this.parser.constructs.flowInitial,s,Et(t,t.attempt(this.parser.constructs.flow,s,t.attempt(O0e,s)),"linePrefix")));return a;function r(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,a}function s(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,a}}var cft,dft=f(()=>{FX();Zr();ga();cft={tokenize:aLa};i(aLa,"initializeFlow")});function uft(t){return{resolveAll:pft(t==="text"?rLa:void 0),tokenize:e};function e(a){let r=this,s=this.parser.constructs[t],o=a.attempt(s,n,l);return n;function n(u){return d(u)?o(u):l(u)}function l(u){if(u===null){a.consume(u);return}return a.enter("data"),a.consume(u),c}function c(u){return d(u)?(a.exit("data"),o(u)):(a.consume(u),c)}function d(u){if(u===null)return!0;let p=s[u],m=-1;if(p)for(;++m<p.length;){let v=p[m];if(!v.previous||v.previous.call(r,r.previous))return!0}return!1}}}function pft(t){return e;function e(a,r){let s=-1,o;for(;++s<=a.length;)o===void 0?a[s]&&a[s][1].type==="data"&&(o=s,s++):(!a[s]||a[s][1].type!=="data")&&(s!==o+2&&(a[o][1].end=a[s-1][1].end,a.splice(o+2,s-o-2),s=o+2),o=void 0);return t?t(a,r):a}}function rLa(t,e){let a=0;for(;++a<=t.length;)if((a===t.length||t[a][1].type==="lineEnding")&&t[a-1][1].type==="data"){let r=t[a-1][1],s=e.sliceStream(r),o=s.length,n=-1,l=0,c;for(;o--;){let d=s[o];if(typeof d=="string"){for(n=d.length;d.charCodeAt(n-1)===32;)l++,n--;if(n)break;n=-1}else if(d===-2)c=!0,l++;else if(d!==-1){o++;break}}if(e._contentTypeTextTrailing&&a===t.length&&(l=0),l){let d={type:a===t.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?n:r.start._bufferIndex+n,_index:r.start._index+o,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(t.splice(a,0,["enter",d,e],["exit",d,e]),a+=2)}a++}return t}var fft,hft,mft,u4e=f(()=>{fft={resolveAll:pft()},hft=uft("string"),mft=uft("text");i(uft,"initializeFactory");i(pft,"createResolver");i(rLa,"resolveAllLineSuffixes")});var p4e={};pt(p4e,{attentionMarkers:()=>uLa,contentInitial:()=>sLa,disable:()=>pLa,document:()=>iLa,flow:()=>nLa,flowInitial:()=>oLa,insideSpan:()=>dLa,string:()=>lLa,text:()=>cLa});var iLa,sLa,oLa,nLa,lLa,cLa,dLa,uLa,pLa,gft=f(()=>{FX();u4e();iLa={42:zs,43:zs,45:zs,48:zs,49:zs,50:zs,51:zs,52:zs,53:zs,54:zs,55:zs,56:zs,57:zs,62:_X},sLa={91:j0e},oLa={[-2]:ng,[-1]:ng,32:ng},nLa={35:W0e,42:P3,45:[RX,P3],60:Y0e,61:RX,95:P3,96:DX,126:DX},lLa={38:$X,92:LX},cLa={[-5]:dg,[-4]:dg,[-3]:dg,33:Z0e,38:$X,42:og,60:[E0e,K0e],91:X0e,92:[U0e,LX],93:I3,95:og,96:N0e},dLa={null:[og,fft]},uLa={null:[42,95]},pLa={null:[]}});function bft(t,e,a){let r={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0},s={},o=[],n=[],l=[],c=!0,d={attempt:I(N),check:I(_),consume:R,enter:T,exit:S,interrupt:I(_,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:g,parser:t,previous:null,sliceSerialize:x,sliceStream:b,write:v},p=e.tokenize.call(u,d),m;return e.resolveAll&&o.push(e),u;function v(E){return n=li(n,E),k(),n[n.length-1]!==null?[]:(O(e,0),u.events=l0(o,u.events,u),u.events)}i(v,"write");function x(E,A){return hLa(b(E),A)}i(x,"sliceSerialize");function b(E){return fLa(n,E)}i(b,"sliceStream");function g(){let{_bufferIndex:E,_index:A,line:F,column:K,offset:j}=r;return{_bufferIndex:E,_index:A,line:F,column:K,offset:j}}i(g,"now");function y(E){s[E.line]=E.column,z()}i(y,"defineSkip");function k(){let E;for(;r._index<n.length;){let A=n[r._index];if(typeof A=="string")for(E=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===E&&r._bufferIndex<A.length;)C(A.charCodeAt(r._bufferIndex));else C(A)}}i(k,"main");function C(E){c=void 0,m=E,p=p(E)}i(C,"go");function R(E){at(E)?(r.line++,r.column=1,r.offset+=E===-3?2:1,z()):E!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===n[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=E,c=!0}i(R,"consume");function T(E,A){let F=A||{};return F.type=E,F.start=g(),u.events.push(["enter",F,u]),l.push(F),F}i(T,"enter");function S(E){let A=l.pop();return A.end=g(),u.events.push(["exit",A,u]),A}i(S,"exit");function N(E,A){O(E,A.from)}i(N,"onsuccessfulconstruct");function _(E,A){A.restore()}i(_,"onsuccessfulcheck");function I(E,A){return F;function F(K,j,U){let he,B,J,ve;return Array.isArray(K)?H(K):"tokenize"in K?H([K]):P(K);function P(X){return Q;function Q(Z){let me=Z!==null&&X[Z],ae=Z!==null&&X.null,re=[...Array.isArray(me)?me:me?[me]:[],...Array.isArray(ae)?ae:ae?[ae]:[]];return H(re)(Z)}}function H(X){return he=X,B=0,X.length===0?U:de(X[B])}function de(X){return Q;function Q(Z){return ve=M(),J=X,X.partial||(u.currentConstruct=X),X.name&&u.parser.constructs.disable.null.includes(X.name)?Y(Z):X.tokenize.call(A?Object.assign(Object.create(u),A):u,d,ue,Y)(Z)}}function ue(X){return c=!0,E(J,ve),j}function Y(X){return c=!0,ve.restore(),++B<he.length?de(he[B]):U}}}i(I,"constructFactory");function O(E,A){E.resolveAll&&!o.includes(E)&&o.push(E),E.resolve&&Kr(u.events,A,u.events.length-A,E.resolve(u.events.slice(A),u)),E.resolveTo&&(u.events=E.resolveTo(u.events,u))}i(O,"addResult");function M(){let E=g(),A=u.previous,F=u.currentConstruct,K=u.events.length,j=Array.from(l);return{from:K,restore:U};function U(){r=E,u.previous=A,u.currentConstruct=F,u.events.length=K,l=j,z()}}i(M,"store");function z(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}i(z,"accountForPotentialSkip")}function fLa(t,e){let a=e.start._index,r=e.start._bufferIndex,s=e.end._index,o=e.end._bufferIndex,n;if(a===s)n=[t[a].slice(r,o)];else{if(n=t.slice(a,s),r>-1){let l=n[0];typeof l=="string"?n[0]=l.slice(r):n.shift()}o>0&&n.push(t[s].slice(0,o))}return n}function hLa(t,e){let a=-1,r=[],s;for(;++a<t.length;){let o=t[a],n;if(typeof o=="string")n=o;else switch(o){case-5:{n="\r";break}case-4:{n=`
79
79
  `;break}case-3:{n=`\r
80
- `;break}case-2:{n=e?" ":" ";break}case-1:{if(!e&&s)continue;n=" ";break}default:n=String.fromCharCode(o)}s=o===-2,r.push(n)}return r.join("")}var vft=f(()=>{ga();r2();sg();i(bft,"createTokenizer");i(fLa,"sliceChunks");i(hLa,"serializeChunks")});function ug(t){let r={constructs:kX([p4e,...(t||{}).extensions||[]]),content:s(ift),defined:[],document:s(nft),flow:s(cft),lazy:{},string:s(hft),text:s(mft)};return r;function s(o){return n;function n(l){return bft(r,o,l)}}}var f4e=f(()=>{CX();sft();lft();dft();u4e();gft();vft();i(ug,"parse")});function pg(t){for(;!AX(t););return t}var h4e=f(()=>{F0e();i(pg,"postprocess")});function fg(){let t=1,e="",a=!0,r;return s;function s(o,n,l){let c=[],d,u,p,m,v;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(n||void 0).decode(o)),p=0,e="",a&&(o.charCodeAt(0)===65279&&p++,a=void 0);p<o.length;){if(xft.lastIndex=p,d=xft.exec(o),m=d&&d.index!==void 0?d.index:o.length,v=o.charCodeAt(m),!d){e=o.slice(p);break}if(v===10&&p===m&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),p<m&&(c.push(o.slice(p,m)),t+=m-p),v){case 0:{c.push(65533),t++;break}case 9:{for(u=Math.ceil(t/4)*4,c.push(-2);t++<u;)c.push(-1);break}case 10:{c.push(-4),t=1;break}default:r=!0,t=1}p=m+1}return l&&(r&&c.push(-5),e&&c.push(e),c.push(null)),c}}var xft,m4e=f(()=>{xft=/[\0\t\n\r]/g;i(fg,"preprocess")});function dKr(t,e,a){return typeof e!="string"&&(a=e,e=void 0),c4e(a)(pg(ug(a).document().write(fg()(t,e,!0))))}var yft=f(()=>{d4e();f4e();h4e();m4e();d4e();f4e();h4e();m4e();i(dKr,"micromark")});function g4e(t,e,a){return e&&typeof e=="object"&&(a=e,e=void 0),mLa(a)(pg(ug(a).document().write(fg()(t,e,!0))))}function mLa(t){let e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(te),autolinkProtocol:I,autolinkEmail:I,atxHeading:o(V),blockQuote:o(Z),characterEscape:I,characterReference:I,codeFenced:o(me),codeFencedFenceInfo:n,codeFencedFenceMeta:n,codeIndented:o(me,n),codeText:o(ae,n),codeTextData:I,data:I,codeFlowValue:I,definition:o(re),definitionDestinationString:n,definitionLabelString:n,definitionTitleString:n,emphasis:o(ye),hardBreakEscape:o(q),hardBreakTrailing:o(q),htmlFlow:o(oe,n),htmlFlowData:I,htmlText:o(oe,n),htmlTextData:I,image:o(se),label:n,link:o(te),listItem:o(Fe),listItemValue:m,listOrdered:o(Ce,p),listUnordered:o(Ce),paragraph:o(Ve),reference:P,referenceString:n,resourceDestinationString:n,resourceTitleString:n,setextHeading:o(V),strong:o(dt),thematicBreak:o(ze)},exit:{atxHeading:c(),atxHeadingSequence:T,autolink:c(),autolinkEmail:Q,autolinkProtocol:X,blockQuote:c(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:ue,characterReference:Y,codeFenced:c(g),codeFencedFence:b,codeFencedFenceInfo:v,codeFencedFenceMeta:x,codeFlowValue:O,codeIndented:c(y),codeText:c(F),codeTextData:O,data:O,definition:c(),definitionDestinationString:R,definitionLabelString:k,definitionTitleString:C,emphasis:c(),hardBreakEscape:c(z),hardBreakTrailing:c(z),htmlFlow:c(E),htmlFlowData:O,htmlText:c(A),htmlTextData:O,image:c(j),label:he,labelText:U,lineEnding:M,link:c(K),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:H,resourceDestinationString:B,resourceTitleString:J,resource:ve,setextHeading:c(_),setextHeadingLineSequence:N,setextHeadingText:S,strong:c(),thematicBreak:c()}};Mft(e,(t||{}).mdastExtensions||[]);let a={};return r;function r(Me){let pe={type:"root",children:[]},be={stack:[pe],tokenStack:[],config:e,enter:l,exit:d,buffer:n,resume:u,data:a},Ae=[],Ze=-1;for(;++Ze<Me.length;)if(Me[Ze][1].type==="listOrdered"||Me[Ze][1].type==="listUnordered")if(Me[Ze][0]==="enter")Ae.push(Ze);else{let nt=Ae.pop();Ze=s(Me,nt,Ze)}for(Ze=-1;++Ze<Me.length;){let nt=e[Me[Ze][0]];wft.call(nt,Me[Ze][1].type)&&nt[Me[Ze][1].type].call(Object.assign({sliceSerialize:Me[Ze][2].sliceSerialize},be),Me[Ze][1])}if(be.tokenStack.length>0){let nt=be.tokenStack[be.tokenStack.length-1];(nt[1]||kft).call(be,void 0,nt[0])}for(pe.position={start:c0(Me.length>0?Me[0][1].start:{line:1,column:1,offset:0}),end:c0(Me.length>0?Me[Me.length-2][1].end:{line:1,column:1,offset:0})},Ze=-1;++Ze<e.transforms.length;)pe=e.transforms[Ze](pe)||pe;return pe}function s(Me,pe,be){let Ae=pe-1,Ze=-1,nt=!1,_t,_e,we,Ne;for(;++Ae<=be;){let fe=Me[Ae];switch(fe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{fe[0]==="enter"?Ze++:Ze--,Ne=void 0;break}case"lineEndingBlank":{fe[0]==="enter"&&(_t&&!Ne&&!Ze&&!we&&(we=Ae),Ne=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ne=void 0}if(!Ze&&fe[0]==="enter"&&fe[1].type==="listItemPrefix"||Ze===-1&&fe[0]==="exit"&&(fe[1].type==="listUnordered"||fe[1].type==="listOrdered")){if(_t){let ge=Ae;for(_e=void 0;ge--;){let Pe=Me[ge];if(Pe[1].type==="lineEnding"||Pe[1].type==="lineEndingBlank"){if(Pe[0]==="exit")continue;_e&&(Me[_e][1].type="lineEndingBlank",nt=!0),Pe[1].type="lineEnding",_e=ge}else if(!(Pe[1].type==="linePrefix"||Pe[1].type==="blockQuotePrefix"||Pe[1].type==="blockQuotePrefixWhitespace"||Pe[1].type==="blockQuoteMarker"||Pe[1].type==="listItemIndent"))break}we&&(!_e||we<_e)&&(_t._spread=!0),_t.end=Object.assign({},_e?Me[_e][1].start:fe[1].end),Me.splice(_e||Ae,0,["exit",_t,fe[2]]),Ae++,be++}if(fe[1].type==="listItemPrefix"){let ge={type:"listItem",_spread:!1,start:Object.assign({},fe[1].start),end:void 0};_t=ge,Me.splice(Ae,0,["enter",ge,fe[2]]),Ae++,be++,we=void 0,Ne=!0}}}return Me[pe][1]._spread=nt,be}function o(Me,pe){return be;function be(Ae){l.call(this,Me(Ae),Ae),pe&&pe.call(this,Ae)}}function n(){this.stack.push({type:"fragment",children:[]})}function l(Me,pe,be){this.stack[this.stack.length-1].children.push(Me),this.stack.push(Me),this.tokenStack.push([pe,be||void 0]),Me.position={start:c0(pe.start),end:void 0}}function c(Me){return pe;function pe(be){Me&&Me.call(this,be),d.call(this,be)}}function d(Me,pe){let be=this.stack.pop(),Ae=this.tokenStack.pop();if(Ae)Ae[0].type!==Me.type&&(pe?pe.call(this,Me,Ae[0]):(Ae[1]||kft).call(this,Me,Ae[0]));else throw new Error("Cannot close `"+Me.type+"` ("+i0({start:Me.start,end:Me.end})+"): it\u2019s not open");be.position.end=c0(Me.end)}function u(){return _3(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function m(Me){if(this.data.expectingFirstListItemValue){let pe=this.stack[this.stack.length-2];pe.start=Number.parseInt(this.sliceSerialize(Me),10),this.data.expectingFirstListItemValue=void 0}}function v(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.lang=Me}function x(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.meta=Me}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.value=Me.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.value=Me.replace(/(\r?\n|\r)$/g,"")}function k(Me){let pe=this.resume(),be=this.stack[this.stack.length-1];be.label=pe,be.identifier=Or(this.sliceSerialize(Me)).toLowerCase()}function C(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.title=Me}function R(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.url=Me}function T(Me){let pe=this.stack[this.stack.length-1];if(!pe.depth){let be=this.sliceSerialize(Me).length;pe.depth=be}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function N(Me){let pe=this.stack[this.stack.length-1];pe.depth=this.sliceSerialize(Me).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function I(Me){let be=this.stack[this.stack.length-1].children,Ae=be[be.length-1];(!Ae||Ae.type!=="text")&&(Ae=$e(),Ae.position={start:c0(Me.start),end:void 0},be.push(Ae)),this.stack.push(Ae)}function O(Me){let pe=this.stack.pop();pe.value+=this.sliceSerialize(Me),pe.position.end=c0(Me.end)}function M(Me){let pe=this.stack[this.stack.length-1];if(this.data.atHardBreak){let be=pe.children[pe.children.length-1];be.position.end=c0(Me.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(pe.type)&&(I.call(this,Me),O.call(this,Me))}function z(){this.data.atHardBreak=!0}function E(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.value=Me}function A(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.value=Me}function F(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.value=Me}function K(){let Me=this.stack[this.stack.length-1];if(this.data.inReference){let pe=this.data.referenceType||"shortcut";Me.type+="Reference",Me.referenceType=pe,delete Me.url,delete Me.title}else delete Me.identifier,delete Me.label;this.data.referenceType=void 0}function j(){let Me=this.stack[this.stack.length-1];if(this.data.inReference){let pe=this.data.referenceType||"shortcut";Me.type+="Reference",Me.referenceType=pe,delete Me.url,delete Me.title}else delete Me.identifier,delete Me.label;this.data.referenceType=void 0}function U(Me){let pe=this.sliceSerialize(Me),be=this.stack[this.stack.length-2];be.label=wX(pe),be.identifier=Or(pe).toLowerCase()}function he(){let Me=this.stack[this.stack.length-1],pe=this.resume(),be=this.stack[this.stack.length-1];if(this.data.inReference=!0,be.type==="link"){let Ae=Me.children;be.children=Ae}else be.alt=pe}function B(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.url=Me}function J(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.title=Me}function ve(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function H(Me){let pe=this.resume(),be=this.stack[this.stack.length-1];be.label=pe,be.identifier=Or(this.sliceSerialize(Me)).toLowerCase(),this.data.referenceType="full"}function de(Me){this.data.characterReferenceType=Me.type}function ue(Me){let pe=this.sliceSerialize(Me),be=this.data.characterReferenceType,Ae;be?(Ae=t8(pe,be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ae=n0(pe);let Ze=this.stack[this.stack.length-1];Ze.value+=Ae}function Y(Me){let pe=this.stack.pop();pe.position.end=c0(Me.end)}function X(Me){O.call(this,Me);let pe=this.stack[this.stack.length-1];pe.url=this.sliceSerialize(Me)}function Q(Me){O.call(this,Me);let pe=this.stack[this.stack.length-1];pe.url="mailto:"+this.sliceSerialize(Me)}function Z(){return{type:"blockquote",children:[]}}function me(){return{type:"code",lang:null,meta:null,value:""}}function ae(){return{type:"inlineCode",value:""}}function re(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ye(){return{type:"emphasis",children:[]}}function V(){return{type:"heading",depth:0,children:[]}}function q(){return{type:"break"}}function oe(){return{type:"html",value:""}}function se(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function Ce(Me){return{type:"list",ordered:Me.type==="listOrdered",start:null,spread:Me._spread,children:[]}}function Fe(Me){return{type:"listItem",spread:Me._spread,checked:null,children:[]}}function Ve(){return{type:"paragraph",children:[]}}function dt(){return{type:"strong",children:[]}}function $e(){return{type:"text",value:""}}function ze(){return{type:"thematicBreak"}}}function c0(t){return{line:t.line,column:t.column,offset:t.offset}}function Mft(t,e){let a=-1;for(;++a<e.length;){let r=e[a];Array.isArray(r)?Mft(t,r):gLa(t,r)}}function gLa(t,e){let a;for(a in e)if(wft.call(e,a))switch(a){case"canContainEols":{let r=e[a];r&&t[a].push(...r);break}case"transforms":{let r=e[a];r&&t[a].push(...r);break}case"enter":case"exit":{let r=e[a];r&&Object.assign(t[a],r);break}}}function kft(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+i0({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+i0({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+i0({start:e.start,end:e.end})+") is still open")}var wft,Sft=f(()=>{gX();yft();yX();x0e();o0();ig();Ice();wft={}.hasOwnProperty;i(g4e,"fromMarkdown");i(mLa,"compiler");i(c0,"point");i(Mft,"configure");i(gLa,"extension");i(kft,"defaultOnError")});var Cft=f(()=>{Sft()});function i8(t){let e=this;e.parser=a;function a(r){return g4e(r,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}i(a,"parser")}var zft=f(()=>{Cft();i(i8,"remarkParse")});var Tft=f(()=>{zft()});var _ft=lt((IKr,b4e)=>{(function(){var t;typeof b4e<"u"?t=b4e.exports=r:t=(function(){return this||(0,eval)("this")})(),t.format=r,t.vsprintf=a,typeof console<"u"&&typeof console.log=="function"&&(t.printf=e);function e(){console.log(r.apply(null,arguments))}i(e,"printf");function a(s,o){return r.apply(null,[s].concat(o))}i(a,"vsprintf");function r(s){for(var o=1,n=[].slice.call(arguments),l=0,c=s.length,d="",u,p=!1,m,v,x=!1,b,g=i(function(){return n[o++]},"nextArg"),y=i(function(){for(var k="";/\d/.test(s[l]);)k+=s[l++],u=s[l];return k.length>0?parseInt(k):null},"slurpNumber");l<c;++l)if(u=s[l],p)switch(p=!1,u=="."?(x=!1,u=s[++l]):u=="0"&&s[l+1]=="."?(x=!0,l+=2,u=s[l]):x=!0,b=y(),u){case"b":d+=parseInt(g(),10).toString(2);break;case"c":m=g(),typeof m=="string"||m instanceof String?d+=m:d+=String.fromCharCode(parseInt(m,10));break;case"d":d+=parseInt(g(),10);break;case"f":v=String(parseFloat(g()).toFixed(b||6)),d+=x?v:v.replace(/^0/,"");break;case"j":d+=JSON.stringify(g());break;case"o":d+="0"+parseInt(g(),10).toString(8);break;case"s":d+=g();break;case"x":d+="0x"+parseInt(g(),10).toString(16);break;case"X":d+="0x"+parseInt(g(),10).toString(16).toUpperCase();break;default:d+=u;break}else u==="%"?p=!0:d+=u;return d}i(r,"format")})()});function E3(t){return e.displayName=t.displayName||t.name,e;function e(a,...r){let s=a&&(0,Lft.default)(a,...r);return new t(s)}i(e,"FormattedError")}var Lft,hg,$ft=f(()=>{Lft=Bi(_ft(),1),hg=Object.assign(E3(Error),{eval:E3(EvalError),range:E3(RangeError),reference:E3(ReferenceError),syntax:E3(SyntaxError),type:E3(TypeError),uri:E3(URIError)});i(E3,"create")});function s8(t){let e=[],a=-1,r=Array.isArray(t)?t:t?[t]:["yaml"];for(;++a<r.length;)e[a]=bLa(r[a]);return e}function bLa(t){let e=t;if(typeof e=="string"){if(!qX.call(Dft,e))throw hg("Missing matter definition for `%s`",e);e={type:e,marker:Dft[e]}}else if(typeof e!="object")throw hg("Expected matter to be an object, not `%j`",e);if(!qX.call(e,"type"))throw hg("Missing `type` in matter `%j`",e);if(!qX.call(e,"fence")&&!qX.call(e,"marker"))throw hg("Missing `marker` or `fence` in matter `%j`",e);return e}var qX,Dft,v4e=f(()=>{$ft();qX={}.hasOwnProperty,Dft={yaml:"-",toml:"+"};i(s8,"toMatters");i(bLa,"matter")});function y4e(t){let e=s8(t),a={},r=-1;for(;++r<e.length;){let s=e[r],o=x4e(s,"open").charCodeAt(0),n=vLa(s),l=a[o];Array.isArray(l)?l.push(n):a[o]=[n]}return{flow:a}}function vLa(t){let e=t.anywhere,a=t.type,r=a+"Fence",s=r+"Sequence",o=a+"Value",n={tokenize:u,partial:!0},l,c=0;return{tokenize:d,concrete:!0};function d(p,m,v){let x=this;return b;function b(N){let _=x.now();return _.column===1&&(_.line===1||e)&&(l=x4e(t,"open"),c=0,N===l.charCodeAt(c))?(p.enter(a),p.enter(r),p.enter(s),g(N)):v(N)}function g(N){return c===l.length?(p.exit(s),Lt(N)?(p.enter("whitespace"),y(N)):k(N)):N===l.charCodeAt(c++)?(p.consume(N),g):v(N)}function y(N){return Lt(N)?(p.consume(N),y):(p.exit("whitespace"),k(N))}function k(N){return at(N)?(p.exit(r),p.enter("lineEnding"),p.consume(N),p.exit("lineEnding"),l=x4e(t,"close"),c=0,p.attempt(n,S,C)):v(N)}function C(N){return N===null||at(N)?T(N):(p.enter(o),R(N))}function R(N){return N===null||at(N)?(p.exit(o),T(N)):(p.consume(N),R)}function T(N){return N===null?v(N):(p.enter("lineEnding"),p.consume(N),p.exit("lineEnding"),p.attempt(n,S,C))}function S(N){return p.exit(a),m(N)}}function u(p,m,v){let x=0;return b;function b(C){return C===l.charCodeAt(x)?(p.enter(r),p.enter(s),g(C)):v(C)}function g(C){return x===l.length?(p.exit(s),Lt(C)?(p.enter("whitespace"),y(C)):k(C)):C===l.charCodeAt(x++)?(p.consume(C),g):v(C)}function y(C){return Lt(C)?(p.consume(C),y):(p.exit("whitespace"),k(C))}function k(C){return C===null||at(C)?(p.exit(r),m(C)):v(C)}}}function x4e(t,e){return t.marker?Aft(t.marker,e).repeat(3):Aft(t.fence,e)}function Aft(t,e){return typeof t=="string"?t:t[e]}var Ift=f(()=>{ga();v4e();i(y4e,"frontmatter");i(vLa,"createConstruct");i(x4e,"fence");i(Aft,"pick")});var Pft=f(()=>{});var w4e=f(()=>{Ift();Pft();v4e()});function k4e(t){let e=s8(t),a={},r={},s=-1;for(;++s<e.length;){let o=e[s];a[o.type]=xLa(o),r[o.type]=yLa,r[o.type+"Value"]=wLa}return{enter:a,exit:r}}function xLa(t){return e;function e(a){this.enter({type:t.type,value:""},a),this.buffer()}}function yLa(t){let e=this.resume(),a=this.stack[this.stack.length-1];"value"in a,this.exit(t),a.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function wLa(t){this.config.enter.data.call(this,t),this.config.exit.data.call(this,t)}function S4e(t){let e=[],a={},r=s8(t),s=-1;for(;++s<r.length;){let o=r[s];a[o.type]=MLa(o);let n=M4e(o,"open");e.push({atBreak:!0,character:n.charAt(0),after:W4(n.charAt(1))})}return{unsafe:e,handlers:a}}function MLa(t){let e=M4e(t,"open"),a=M4e(t,"close");return r;function r(s){return e+(s.value?`
80
+ `;break}case-2:{n=e?" ":" ";break}case-1:{if(!e&&s)continue;n=" ";break}default:n=String.fromCharCode(o)}s=o===-2,r.push(n)}return r.join("")}var vft=f(()=>{ga();r2();sg();i(bft,"createTokenizer");i(fLa,"sliceChunks");i(hLa,"serializeChunks")});function ug(t){let r={constructs:kX([p4e,...(t||{}).extensions||[]]),content:s(ift),defined:[],document:s(nft),flow:s(cft),lazy:{},string:s(hft),text:s(mft)};return r;function s(o){return n;function n(l){return bft(r,o,l)}}}var f4e=f(()=>{CX();sft();lft();dft();u4e();gft();vft();i(ug,"parse")});function pg(t){for(;!AX(t););return t}var h4e=f(()=>{F0e();i(pg,"postprocess")});function fg(){let t=1,e="",a=!0,r;return s;function s(o,n,l){let c=[],d,u,p,m,v;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(n||void 0).decode(o)),p=0,e="",a&&(o.charCodeAt(0)===65279&&p++,a=void 0);p<o.length;){if(xft.lastIndex=p,d=xft.exec(o),m=d&&d.index!==void 0?d.index:o.length,v=o.charCodeAt(m),!d){e=o.slice(p);break}if(v===10&&p===m&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),p<m&&(c.push(o.slice(p,m)),t+=m-p),v){case 0:{c.push(65533),t++;break}case 9:{for(u=Math.ceil(t/4)*4,c.push(-2);t++<u;)c.push(-1);break}case 10:{c.push(-4),t=1;break}default:r=!0,t=1}p=m+1}return l&&(r&&c.push(-5),e&&c.push(e),c.push(null)),c}}var xft,m4e=f(()=>{xft=/[\0\t\n\r]/g;i(fg,"preprocess")});function dKr(t,e,a){return typeof e!="string"&&(a=e,e=void 0),c4e(a)(pg(ug(a).document().write(fg()(t,e,!0))))}var yft=f(()=>{d4e();f4e();h4e();m4e();d4e();f4e();h4e();m4e();i(dKr,"micromark")});function g4e(t,e,a){return e&&typeof e=="object"&&(a=e,e=void 0),mLa(a)(pg(ug(a).document().write(fg()(t,e,!0))))}function mLa(t){let e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(te),autolinkProtocol:I,autolinkEmail:I,atxHeading:o(V),blockQuote:o(Z),characterEscape:I,characterReference:I,codeFenced:o(me),codeFencedFenceInfo:n,codeFencedFenceMeta:n,codeIndented:o(me,n),codeText:o(ae,n),codeTextData:I,data:I,codeFlowValue:I,definition:o(re),definitionDestinationString:n,definitionLabelString:n,definitionTitleString:n,emphasis:o(ye),hardBreakEscape:o(q),hardBreakTrailing:o(q),htmlFlow:o(oe,n),htmlFlowData:I,htmlText:o(oe,n),htmlTextData:I,image:o(se),label:n,link:o(te),listItem:o(Fe),listItemValue:m,listOrdered:o(Ce,p),listUnordered:o(Ce),paragraph:o(Ve),reference:P,referenceString:n,resourceDestinationString:n,resourceTitleString:n,setextHeading:o(V),strong:o(dt),thematicBreak:o(ze)},exit:{atxHeading:c(),atxHeadingSequence:T,autolink:c(),autolinkEmail:Q,autolinkProtocol:X,blockQuote:c(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:ue,characterReference:Y,codeFenced:c(g),codeFencedFence:b,codeFencedFenceInfo:v,codeFencedFenceMeta:x,codeFlowValue:O,codeIndented:c(y),codeText:c(F),codeTextData:O,data:O,definition:c(),definitionDestinationString:R,definitionLabelString:k,definitionTitleString:C,emphasis:c(),hardBreakEscape:c(z),hardBreakTrailing:c(z),htmlFlow:c(E),htmlFlowData:O,htmlText:c(A),htmlTextData:O,image:c(j),label:he,labelText:U,lineEnding:M,link:c(K),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:H,resourceDestinationString:B,resourceTitleString:J,resource:ve,setextHeading:c(_),setextHeadingLineSequence:N,setextHeadingText:S,strong:c(),thematicBreak:c()}};Mft(e,(t||{}).mdastExtensions||[]);let a={};return r;function r(Me){let pe={type:"root",children:[]},be={stack:[pe],tokenStack:[],config:e,enter:l,exit:d,buffer:n,resume:u,data:a},Ae=[],Ke=-1;for(;++Ke<Me.length;)if(Me[Ke][1].type==="listOrdered"||Me[Ke][1].type==="listUnordered")if(Me[Ke][0]==="enter")Ae.push(Ke);else{let nt=Ae.pop();Ke=s(Me,nt,Ke)}for(Ke=-1;++Ke<Me.length;){let nt=e[Me[Ke][0]];wft.call(nt,Me[Ke][1].type)&&nt[Me[Ke][1].type].call(Object.assign({sliceSerialize:Me[Ke][2].sliceSerialize},be),Me[Ke][1])}if(be.tokenStack.length>0){let nt=be.tokenStack[be.tokenStack.length-1];(nt[1]||kft).call(be,void 0,nt[0])}for(pe.position={start:c0(Me.length>0?Me[0][1].start:{line:1,column:1,offset:0}),end:c0(Me.length>0?Me[Me.length-2][1].end:{line:1,column:1,offset:0})},Ke=-1;++Ke<e.transforms.length;)pe=e.transforms[Ke](pe)||pe;return pe}function s(Me,pe,be){let Ae=pe-1,Ke=-1,nt=!1,_t,_e,we,Ne;for(;++Ae<=be;){let fe=Me[Ae];switch(fe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{fe[0]==="enter"?Ke++:Ke--,Ne=void 0;break}case"lineEndingBlank":{fe[0]==="enter"&&(_t&&!Ne&&!Ke&&!we&&(we=Ae),Ne=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ne=void 0}if(!Ke&&fe[0]==="enter"&&fe[1].type==="listItemPrefix"||Ke===-1&&fe[0]==="exit"&&(fe[1].type==="listUnordered"||fe[1].type==="listOrdered")){if(_t){let ge=Ae;for(_e=void 0;ge--;){let Pe=Me[ge];if(Pe[1].type==="lineEnding"||Pe[1].type==="lineEndingBlank"){if(Pe[0]==="exit")continue;_e&&(Me[_e][1].type="lineEndingBlank",nt=!0),Pe[1].type="lineEnding",_e=ge}else if(!(Pe[1].type==="linePrefix"||Pe[1].type==="blockQuotePrefix"||Pe[1].type==="blockQuotePrefixWhitespace"||Pe[1].type==="blockQuoteMarker"||Pe[1].type==="listItemIndent"))break}we&&(!_e||we<_e)&&(_t._spread=!0),_t.end=Object.assign({},_e?Me[_e][1].start:fe[1].end),Me.splice(_e||Ae,0,["exit",_t,fe[2]]),Ae++,be++}if(fe[1].type==="listItemPrefix"){let ge={type:"listItem",_spread:!1,start:Object.assign({},fe[1].start),end:void 0};_t=ge,Me.splice(Ae,0,["enter",ge,fe[2]]),Ae++,be++,we=void 0,Ne=!0}}}return Me[pe][1]._spread=nt,be}function o(Me,pe){return be;function be(Ae){l.call(this,Me(Ae),Ae),pe&&pe.call(this,Ae)}}function n(){this.stack.push({type:"fragment",children:[]})}function l(Me,pe,be){this.stack[this.stack.length-1].children.push(Me),this.stack.push(Me),this.tokenStack.push([pe,be||void 0]),Me.position={start:c0(pe.start),end:void 0}}function c(Me){return pe;function pe(be){Me&&Me.call(this,be),d.call(this,be)}}function d(Me,pe){let be=this.stack.pop(),Ae=this.tokenStack.pop();if(Ae)Ae[0].type!==Me.type&&(pe?pe.call(this,Me,Ae[0]):(Ae[1]||kft).call(this,Me,Ae[0]));else throw new Error("Cannot close `"+Me.type+"` ("+i0({start:Me.start,end:Me.end})+"): it\u2019s not open");be.position.end=c0(Me.end)}function u(){return _3(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function m(Me){if(this.data.expectingFirstListItemValue){let pe=this.stack[this.stack.length-2];pe.start=Number.parseInt(this.sliceSerialize(Me),10),this.data.expectingFirstListItemValue=void 0}}function v(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.lang=Me}function x(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.meta=Me}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.value=Me.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.value=Me.replace(/(\r?\n|\r)$/g,"")}function k(Me){let pe=this.resume(),be=this.stack[this.stack.length-1];be.label=pe,be.identifier=Or(this.sliceSerialize(Me)).toLowerCase()}function C(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.title=Me}function R(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.url=Me}function T(Me){let pe=this.stack[this.stack.length-1];if(!pe.depth){let be=this.sliceSerialize(Me).length;pe.depth=be}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function N(Me){let pe=this.stack[this.stack.length-1];pe.depth=this.sliceSerialize(Me).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function I(Me){let be=this.stack[this.stack.length-1].children,Ae=be[be.length-1];(!Ae||Ae.type!=="text")&&(Ae=$e(),Ae.position={start:c0(Me.start),end:void 0},be.push(Ae)),this.stack.push(Ae)}function O(Me){let pe=this.stack.pop();pe.value+=this.sliceSerialize(Me),pe.position.end=c0(Me.end)}function M(Me){let pe=this.stack[this.stack.length-1];if(this.data.atHardBreak){let be=pe.children[pe.children.length-1];be.position.end=c0(Me.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(pe.type)&&(I.call(this,Me),O.call(this,Me))}function z(){this.data.atHardBreak=!0}function E(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.value=Me}function A(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.value=Me}function F(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.value=Me}function K(){let Me=this.stack[this.stack.length-1];if(this.data.inReference){let pe=this.data.referenceType||"shortcut";Me.type+="Reference",Me.referenceType=pe,delete Me.url,delete Me.title}else delete Me.identifier,delete Me.label;this.data.referenceType=void 0}function j(){let Me=this.stack[this.stack.length-1];if(this.data.inReference){let pe=this.data.referenceType||"shortcut";Me.type+="Reference",Me.referenceType=pe,delete Me.url,delete Me.title}else delete Me.identifier,delete Me.label;this.data.referenceType=void 0}function U(Me){let pe=this.sliceSerialize(Me),be=this.stack[this.stack.length-2];be.label=wX(pe),be.identifier=Or(pe).toLowerCase()}function he(){let Me=this.stack[this.stack.length-1],pe=this.resume(),be=this.stack[this.stack.length-1];if(this.data.inReference=!0,be.type==="link"){let Ae=Me.children;be.children=Ae}else be.alt=pe}function B(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.url=Me}function J(){let Me=this.resume(),pe=this.stack[this.stack.length-1];pe.title=Me}function ve(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function H(Me){let pe=this.resume(),be=this.stack[this.stack.length-1];be.label=pe,be.identifier=Or(this.sliceSerialize(Me)).toLowerCase(),this.data.referenceType="full"}function de(Me){this.data.characterReferenceType=Me.type}function ue(Me){let pe=this.sliceSerialize(Me),be=this.data.characterReferenceType,Ae;be?(Ae=t8(pe,be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ae=n0(pe);let Ke=this.stack[this.stack.length-1];Ke.value+=Ae}function Y(Me){let pe=this.stack.pop();pe.position.end=c0(Me.end)}function X(Me){O.call(this,Me);let pe=this.stack[this.stack.length-1];pe.url=this.sliceSerialize(Me)}function Q(Me){O.call(this,Me);let pe=this.stack[this.stack.length-1];pe.url="mailto:"+this.sliceSerialize(Me)}function Z(){return{type:"blockquote",children:[]}}function me(){return{type:"code",lang:null,meta:null,value:""}}function ae(){return{type:"inlineCode",value:""}}function re(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ye(){return{type:"emphasis",children:[]}}function V(){return{type:"heading",depth:0,children:[]}}function q(){return{type:"break"}}function oe(){return{type:"html",value:""}}function se(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function Ce(Me){return{type:"list",ordered:Me.type==="listOrdered",start:null,spread:Me._spread,children:[]}}function Fe(Me){return{type:"listItem",spread:Me._spread,checked:null,children:[]}}function Ve(){return{type:"paragraph",children:[]}}function dt(){return{type:"strong",children:[]}}function $e(){return{type:"text",value:""}}function ze(){return{type:"thematicBreak"}}}function c0(t){return{line:t.line,column:t.column,offset:t.offset}}function Mft(t,e){let a=-1;for(;++a<e.length;){let r=e[a];Array.isArray(r)?Mft(t,r):gLa(t,r)}}function gLa(t,e){let a;for(a in e)if(wft.call(e,a))switch(a){case"canContainEols":{let r=e[a];r&&t[a].push(...r);break}case"transforms":{let r=e[a];r&&t[a].push(...r);break}case"enter":case"exit":{let r=e[a];r&&Object.assign(t[a],r);break}}}function kft(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+i0({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+i0({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+i0({start:e.start,end:e.end})+") is still open")}var wft,Sft=f(()=>{gX();yft();yX();x0e();o0();ig();Ice();wft={}.hasOwnProperty;i(g4e,"fromMarkdown");i(mLa,"compiler");i(c0,"point");i(Mft,"configure");i(gLa,"extension");i(kft,"defaultOnError")});var Cft=f(()=>{Sft()});function i8(t){let e=this;e.parser=a;function a(r){return g4e(r,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}i(a,"parser")}var zft=f(()=>{Cft();i(i8,"remarkParse")});var Tft=f(()=>{zft()});var _ft=lt((IKr,b4e)=>{(function(){var t;typeof b4e<"u"?t=b4e.exports=r:t=(function(){return this||(0,eval)("this")})(),t.format=r,t.vsprintf=a,typeof console<"u"&&typeof console.log=="function"&&(t.printf=e);function e(){console.log(r.apply(null,arguments))}i(e,"printf");function a(s,o){return r.apply(null,[s].concat(o))}i(a,"vsprintf");function r(s){for(var o=1,n=[].slice.call(arguments),l=0,c=s.length,d="",u,p=!1,m,v,x=!1,b,g=i(function(){return n[o++]},"nextArg"),y=i(function(){for(var k="";/\d/.test(s[l]);)k+=s[l++],u=s[l];return k.length>0?parseInt(k):null},"slurpNumber");l<c;++l)if(u=s[l],p)switch(p=!1,u=="."?(x=!1,u=s[++l]):u=="0"&&s[l+1]=="."?(x=!0,l+=2,u=s[l]):x=!0,b=y(),u){case"b":d+=parseInt(g(),10).toString(2);break;case"c":m=g(),typeof m=="string"||m instanceof String?d+=m:d+=String.fromCharCode(parseInt(m,10));break;case"d":d+=parseInt(g(),10);break;case"f":v=String(parseFloat(g()).toFixed(b||6)),d+=x?v:v.replace(/^0/,"");break;case"j":d+=JSON.stringify(g());break;case"o":d+="0"+parseInt(g(),10).toString(8);break;case"s":d+=g();break;case"x":d+="0x"+parseInt(g(),10).toString(16);break;case"X":d+="0x"+parseInt(g(),10).toString(16).toUpperCase();break;default:d+=u;break}else u==="%"?p=!0:d+=u;return d}i(r,"format")})()});function E3(t){return e.displayName=t.displayName||t.name,e;function e(a,...r){let s=a&&(0,Lft.default)(a,...r);return new t(s)}i(e,"FormattedError")}var Lft,hg,$ft=f(()=>{Lft=Bi(_ft(),1),hg=Object.assign(E3(Error),{eval:E3(EvalError),range:E3(RangeError),reference:E3(ReferenceError),syntax:E3(SyntaxError),type:E3(TypeError),uri:E3(URIError)});i(E3,"create")});function s8(t){let e=[],a=-1,r=Array.isArray(t)?t:t?[t]:["yaml"];for(;++a<r.length;)e[a]=bLa(r[a]);return e}function bLa(t){let e=t;if(typeof e=="string"){if(!qX.call(Dft,e))throw hg("Missing matter definition for `%s`",e);e={type:e,marker:Dft[e]}}else if(typeof e!="object")throw hg("Expected matter to be an object, not `%j`",e);if(!qX.call(e,"type"))throw hg("Missing `type` in matter `%j`",e);if(!qX.call(e,"fence")&&!qX.call(e,"marker"))throw hg("Missing `marker` or `fence` in matter `%j`",e);return e}var qX,Dft,v4e=f(()=>{$ft();qX={}.hasOwnProperty,Dft={yaml:"-",toml:"+"};i(s8,"toMatters");i(bLa,"matter")});function y4e(t){let e=s8(t),a={},r=-1;for(;++r<e.length;){let s=e[r],o=x4e(s,"open").charCodeAt(0),n=vLa(s),l=a[o];Array.isArray(l)?l.push(n):a[o]=[n]}return{flow:a}}function vLa(t){let e=t.anywhere,a=t.type,r=a+"Fence",s=r+"Sequence",o=a+"Value",n={tokenize:u,partial:!0},l,c=0;return{tokenize:d,concrete:!0};function d(p,m,v){let x=this;return b;function b(N){let _=x.now();return _.column===1&&(_.line===1||e)&&(l=x4e(t,"open"),c=0,N===l.charCodeAt(c))?(p.enter(a),p.enter(r),p.enter(s),g(N)):v(N)}function g(N){return c===l.length?(p.exit(s),Lt(N)?(p.enter("whitespace"),y(N)):k(N)):N===l.charCodeAt(c++)?(p.consume(N),g):v(N)}function y(N){return Lt(N)?(p.consume(N),y):(p.exit("whitespace"),k(N))}function k(N){return at(N)?(p.exit(r),p.enter("lineEnding"),p.consume(N),p.exit("lineEnding"),l=x4e(t,"close"),c=0,p.attempt(n,S,C)):v(N)}function C(N){return N===null||at(N)?T(N):(p.enter(o),R(N))}function R(N){return N===null||at(N)?(p.exit(o),T(N)):(p.consume(N),R)}function T(N){return N===null?v(N):(p.enter("lineEnding"),p.consume(N),p.exit("lineEnding"),p.attempt(n,S,C))}function S(N){return p.exit(a),m(N)}}function u(p,m,v){let x=0;return b;function b(C){return C===l.charCodeAt(x)?(p.enter(r),p.enter(s),g(C)):v(C)}function g(C){return x===l.length?(p.exit(s),Lt(C)?(p.enter("whitespace"),y(C)):k(C)):C===l.charCodeAt(x++)?(p.consume(C),g):v(C)}function y(C){return Lt(C)?(p.consume(C),y):(p.exit("whitespace"),k(C))}function k(C){return C===null||at(C)?(p.exit(r),m(C)):v(C)}}}function x4e(t,e){return t.marker?Aft(t.marker,e).repeat(3):Aft(t.fence,e)}function Aft(t,e){return typeof t=="string"?t:t[e]}var Ift=f(()=>{ga();v4e();i(y4e,"frontmatter");i(vLa,"createConstruct");i(x4e,"fence");i(Aft,"pick")});var Pft=f(()=>{});var w4e=f(()=>{Ift();Pft();v4e()});function k4e(t){let e=s8(t),a={},r={},s=-1;for(;++s<e.length;){let o=e[s];a[o.type]=xLa(o),r[o.type]=yLa,r[o.type+"Value"]=wLa}return{enter:a,exit:r}}function xLa(t){return e;function e(a){this.enter({type:t.type,value:""},a),this.buffer()}}function yLa(t){let e=this.resume(),a=this.stack[this.stack.length-1];"value"in a,this.exit(t),a.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function wLa(t){this.config.enter.data.call(this,t),this.config.exit.data.call(this,t)}function S4e(t){let e=[],a={},r=s8(t),s=-1;for(;++s<r.length;){let o=r[s];a[o.type]=MLa(o);let n=M4e(o,"open");e.push({atBreak:!0,character:n.charAt(0),after:W4(n.charAt(1))})}return{unsafe:e,handlers:a}}function MLa(t){let e=M4e(t,"open"),a=M4e(t,"close");return r;function r(s){return e+(s.value?`
81
81
  `+s.value:"")+`
82
82
  `+a}}function M4e(t,e){return t.marker?Eft(t.marker,e).repeat(3):Eft(t.fence,e)}function Eft(t,e){return typeof t=="string"?t:t[e]}var Nft=f(()=>{r0();w4e();sY();i(k4e,"frontmatterFromMarkdown");i(xLa,"opener");i(yLa,"close");i(wLa,"value");i(S4e,"frontmatterToMarkdown");i(MLa,"handler");i(M4e,"fence");i(Eft,"pick")});var Rft=f(()=>{Nft()});function o8(t){let e=this,a=t||kLa,r=e.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),n=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(y4e(a)),o.push(k4e(a)),n.push(S4e(a))}var kLa,Fft=f(()=>{Rft();w4e();kLa="yaml";i(o8,"remarkFrontmatter")});var Oft=f(()=>{Fft()});var C4e=f(()=>{});var Bft,SLa,WX,qft=f(()=>{C4e();Bft=typeof self=="object"?self:globalThis,SLa=i((t,e)=>{let a=i((s,o)=>(t.set(o,s),s),"as"),r=i(s=>{if(t.has(s))return t.get(s);let[o,n]=e[s];switch(o){case 0:case-1:return a(n,s);case 1:{let l=a([],s);for(let c of n)l.push(r(c));return l}case 2:{let l=a({},s);for(let[c,d]of n)l[r(c)]=r(d);return l}case 3:return a(new Date(n),s);case 4:{let{source:l,flags:c}=n;return a(new RegExp(l,c),s)}case 5:{let l=a(new Map,s);for(let[c,d]of n)l.set(r(c),r(d));return l}case 6:{let l=a(new Set,s);for(let c of n)l.add(r(c));return l}case 7:{let{name:l,message:c}=n;return a(new Bft[l](c),s)}case 8:return a(BigInt(n),s);case"BigInt":return a(Object(BigInt(n)),s);case"ArrayBuffer":return a(new Uint8Array(n).buffer,n);case"DataView":{let{buffer:l}=new Uint8Array(n);return a(new DataView(l),n)}}return a(new Bft[o](n),s)},"unpair");return r},"deserializer"),WX=i(t=>SLa(new Map,t)(0),"deserialize")});var l8,CLa,zLa,bg,GX,TLa,YX,Hft=f(()=>{C4e();l8="",{toString:CLa}={},{keys:zLa}=Object,bg=i(t=>{let e=typeof t;if(e!=="object"||!t)return[0,e];let a=CLa.call(t).slice(8,-1);switch(a){case"Array":return[1,l8];case"Object":return[2,l8];case"Date":return[3,l8];case"RegExp":return[4,l8];case"Map":return[5,l8];case"Set":return[6,l8];case"DataView":return[1,a]}return a.includes("Array")?[1,a]:a.includes("Error")?[7,a]:[2,a]},"typeOf"),GX=i(([t,e])=>t===0&&(e==="function"||e==="symbol"),"shouldSkip"),TLa=i((t,e,a,r)=>{let s=i((n,l)=>{let c=r.push(n)-1;return a.set(l,c),c},"as"),o=i(n=>{if(a.has(n))return a.get(n);let[l,c]=bg(n);switch(l){case 0:{let u=n;switch(c){case"bigint":l=8,u=n.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+c);u=null;break;case"undefined":return s([-1],n)}return s([l,u],n)}case 1:{if(c){let m=n;return c==="DataView"?m=new Uint8Array(n.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(n)),s([c,[...m]],n)}let u=[],p=s([l,u],n);for(let m of n)u.push(o(m));return p}case 2:{if(c)switch(c){case"BigInt":return s([c,n.toString()],n);case"Boolean":case"Number":case"String":return s([c,n.valueOf()],n)}if(e&&"toJSON"in n)return o(n.toJSON());let u=[],p=s([l,u],n);for(let m of zLa(n))(t||!GX(bg(n[m])))&&u.push([o(m),o(n[m])]);return p}case 3:return s([l,n.toISOString()],n);case 4:{let{source:u,flags:p}=n;return s([l,{source:u,flags:p}],n)}case 5:{let u=[],p=s([l,u],n);for(let[m,v]of n)(t||!(GX(bg(m))||GX(bg(v))))&&u.push([o(m),o(v)]);return p}case 6:{let u=[],p=s([l,u],n);for(let m of n)(t||!GX(bg(m)))&&u.push(o(m));return p}}let{message:d}=n;return s([l,{name:c,message:d}],n)},"pair");return o},"serializer"),YX=i((t,{json:e,lossy:a}={})=>{let r=[];return TLa(!(e||a),!!e,new Map,r)(t),r},"serialize")});var d0,KX=f(()=>{qft();Hft();d0=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?WX(YX(t,e)):structuredClone(t):(t,e)=>WX(YX(t,e))});function Vft(t){return e;function e(a){let r=a&&a.position&&a.position[t]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function vg(t){let e=XX(t),a=ZX(t);if(e&&a)return{start:e,end:a}}var ZX,XX,jft=f(()=>{ZX=Vft("end"),XX=Vft("start");i(Vft,"point");i(vg,"position")});var QX=f(()=>{jft()});var N3,JX,L4e=f(()=>{N3=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],JX={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...N3,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...N3],h2:[["className","sr-only"]],img:[...N3,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...N3,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...N3],table:[...N3],ul:[...N3,["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"]},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"]}});function $4e(t,e){let a={type:"root",children:[]},r={schema:e?{...JX,...e}:JX,stack:[]},s=Uft(r,t);return s&&(Array.isArray(s)?s.length===1?a=s[0]:a.children=s:a=s),a}function Uft(t,e){if(e&&typeof e=="object"){let a=e;switch(typeof a.type=="string"?a.type:""){case"comment":return _La(t,a);case"doctype":return LLa(t,a);case"element":return $La(t,a);case"root":return DLa(t,a);case"text":return ALa(t,a);default:}}}function _La(t,e){if(t.schema.allowComments){let a=typeof e.value=="string"?e.value:"",r=a.indexOf("-->"),o={type:"comment",value:r<0?a:a.slice(0,r)};return xg(o,e),o}}function LLa(t,e){if(t.schema.allowDoctypes){let a={type:"doctype"};return xg(a,e),a}}function $La(t,e){let a=typeof e.tagName=="string"?e.tagName:"";t.stack.push(a);let r=Wft(t,e.children),s=ILa(t,e.properties);t.stack.pop();let o=!1;if(a&&a!=="*"&&(!t.schema.tagNames||t.schema.tagNames.includes(a))&&(o=!0,t.schema.ancestors&&u0.call(t.schema.ancestors,a))){let l=t.schema.ancestors[a],c=-1;for(o=!1;++c<l.length;)t.stack.includes(l[c])&&(o=!0)}if(!o)return t.schema.strip&&!t.schema.strip.includes(a)?r:void 0;let n={type:"element",tagName:a,properties:s,children:r};return xg(n,e),n}function DLa(t,e){let r={type:"root",children:Wft(t,e.children)};return xg(r,e),r}function ALa(t,e){let r={type:"text",value:typeof e.value=="string"?e.value:""};return xg(r,e),r}function Wft(t,e){let a=[];if(Array.isArray(e)){let r=e,s=-1;for(;++s<r.length;){let o=Uft(t,r[s]);o&&(Array.isArray(o)?a.push(...o):a.push(o))}}return a}function ILa(t,e){let a=t.stack[t.stack.length-1],r=t.schema.attributes,s=t.schema.required,o=r&&u0.call(r,a)?r[a]:void 0,n=r&&u0.call(r,"*")?r["*"]:void 0,l=e&&typeof e=="object"?e:{},c={},d;for(d in l)if(u0.call(l,d)){let u=l[d],p=Gft(t,Kft(o,d),d,u);p==null&&(p=Gft(t,Kft(n,d),d,u)),p!=null&&(c[d]=p)}if(s&&u0.call(s,a)){let u=s[a];for(d in u)u0.call(u,d)&&!u0.call(c,d)&&(c[d]=u[d])}return c}function Gft(t,e,a,r){return e?Array.isArray(r)?PLa(t,e,a,r):Yft(t,e,a,r):void 0}function PLa(t,e,a,r){let s=-1,o=[];for(;++s<r.length;){let n=Yft(t,e,a,r[s]);(typeof n=="number"||typeof n=="string")&&o.push(n)}return o}function Yft(t,e,a,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&ELa(t,a,r)){if(typeof e=="object"&&e.length>1){let s=!1,o=0;for(;++o<e.length;){let n=e[o];if(n&&typeof n=="object"&&"flags"in n){if(n.test(String(r))){s=!0;break}}else if(n===r){s=!0;break}}if(!s)return}return t.schema.clobber&&t.schema.clobberPrefix&&t.schema.clobber.includes(a)?t.schema.clobberPrefix+r:r}}function ELa(t,e,a){let r=t.schema.protocols&&u0.call(t.schema.protocols,e)?t.schema.protocols[e]:void 0;if(!r||r.length===0)return!0;let s=String(a),o=s.indexOf(":"),n=s.indexOf("?"),l=s.indexOf("#"),c=s.indexOf("/");if(o<0||c>-1&&o>c||n>-1&&o>n||l>-1&&o>l)return!0;let d=-1;for(;++d<r.length;){let u=r[d];if(o===u.length&&s.slice(0,u.length)===u)return!0}return!1}function xg(t,e){let a=vg(e);e.data&&(t.data=d0(e.data)),a&&(t.position=a)}function Kft(t,e){let a,r=-1;if(t)for(;++r<t.length;){let s=t[r],o=typeof s=="string"?s:s[0];if(o===e)return s;o==="data*"&&(a=s)}if(e.length>4&&e.slice(0,4).toLowerCase()==="data")return a}var u0,Zft=f(()=>{KX();QX();L4e();u0={}.hasOwnProperty;i($4e,"sanitize");i(Uft,"transform");i(_La,"comment");i(LLa,"doctype");i($La,"element");i(DLa,"root");i(ALa,"text");i(Wft,"children");i(ILa,"properties");i(Gft,"propertyValue");i(PLa,"propertyValueMany");i(Yft,"propertyValuePrimitive");i(ELa,"safeProtocol");i(xg,"patch");i(Kft,"findDefinition")});var Xft=f(()=>{Zft();L4e()});function Qft(t,e){let a={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,a),t.applyData(e,a)}var Jft=f(()=>{i(Qft,"blockquote")});function e5t(t,e){let a={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,a),[t.applyData(e,a),{type:"text",value:`
83
83
  `}]}var t5t=f(()=>{i(e5t,"hardBreak")});function a5t(t,e){let a=e.value?e.value+`
@@ -5805,7 +5805,7 @@ console.log(greeting);`}
5805
5805
  background: ${h.bdTheme("hsl(0 72.2% 50.6% / 0.1)","hsl(0 62.8% 30.6% / 0.1)")};
5806
5806
  color: ${h.bdTheme("hsl(0 72.2% 50.6%)","hsl(0 62.8% 30.6%)")};
5807
5807
  }
5808
- `];static MONTH_NAMES=["January","February","March","April","May","June","July","August","September","October","November","December"];static TIMEZONES=[{value:"UTC",label:"UTC (Coordinated Universal Time)"},{value:"America/New_York",label:"Eastern Time (US & Canada)"},{value:"America/Chicago",label:"Central Time (US & Canada)"},{value:"America/Denver",label:"Mountain Time (US & Canada)"},{value:"America/Los_Angeles",label:"Pacific Time (US & Canada)"},{value:"Europe/London",label:"London"},{value:"Europe/Paris",label:"Paris"},{value:"Europe/Berlin",label:"Berlin"},{value:"Europe/Moscow",label:"Moscow"},{value:"Asia/Dubai",label:"Dubai"},{value:"Asia/Kolkata",label:"India Standard Time"},{value:"Asia/Shanghai",label:"China Standard Time"},{value:"Asia/Tokyo",label:"Tokyo"},{value:"Australia/Sydney",label:"Sydney"},{value:"Pacific/Auckland",label:"Auckland"}];render(){if(!this.triggerRect)return w``;let pe=this.computePositionStyle(),be=this.weekStartsOn===1?["Mo","Tu","We","Th","Fr","Sa","Su"]:["Su","Mo","Tu","We","Th","Fr","Sa"],Ae=this.getDaysInMonth(),Ze=this.selectedHour<12;return w`
5808
+ `];static MONTH_NAMES=["January","February","March","April","May","June","July","August","September","October","November","December"];static TIMEZONES=[{value:"UTC",label:"UTC (Coordinated Universal Time)"},{value:"America/New_York",label:"Eastern Time (US & Canada)"},{value:"America/Chicago",label:"Central Time (US & Canada)"},{value:"America/Denver",label:"Mountain Time (US & Canada)"},{value:"America/Los_Angeles",label:"Pacific Time (US & Canada)"},{value:"Europe/London",label:"London"},{value:"Europe/Paris",label:"Paris"},{value:"Europe/Berlin",label:"Berlin"},{value:"Europe/Moscow",label:"Moscow"},{value:"Asia/Dubai",label:"Dubai"},{value:"Asia/Kolkata",label:"India Standard Time"},{value:"Asia/Shanghai",label:"China Standard Time"},{value:"Asia/Tokyo",label:"Tokyo"},{value:"Australia/Sydney",label:"Sydney"},{value:"Pacific/Auckland",label:"Auckland"}];render(){if(!this.triggerRect)return w``;let pe=this.computePositionStyle(),be=this.weekStartsOn===1?["Mo","Tu","We","Th","Fr","Sa","Su"]:["Su","Mo","Tu","We","Th","Fr","Sa"],Ae=this.getDaysInMonth(),Ke=this.selectedHour<12;return w`
5809
5809
  <div
5810
5810
  class="calendar-popup ${this.visible?"show":""} ${this.opensToTop?"top":"bottom"}"
5811
5811
  style="${pe}; z-index: ${this.menuZIndex};"
@@ -5872,8 +5872,8 @@ console.log(greeting);`}
5872
5872
  />
5873
5873
  ${this.timeFormat==="12h"?w`
5874
5874
  <div class="am-pm-selector">
5875
- <button class="am-pm-button ${Ze?"selected":""}" @click=${()=>this.setAMPM("am")}>AM</button>
5876
- <button class="am-pm-button ${Ze?"":"selected"}" @click=${()=>this.setAMPM("pm")}>PM</button>
5875
+ <button class="am-pm-button ${Ke?"selected":""}" @click=${()=>this.setAMPM("am")}>AM</button>
5876
+ <button class="am-pm-button ${Ke?"":"selected"}" @click=${()=>this.setAMPM("pm")}>PM</button>
5877
5877
  </div>
5878
5878
  `:""}
5879
5879
  </div>
@@ -5896,7 +5896,7 @@ console.log(greeting);`}
5896
5896
  <button class="action-button clear-action-button" @click=${this.handleClear}>Clear</button>
5897
5897
  </div>
5898
5898
  </div>
5899
- `}computePositionStyle(){let pe=this.triggerRect,be=pe.left;if(this.opensToTop){let Ae=window.innerHeight-pe.top+4;return`left: ${be}px; bottom: ${Ae}px; top: auto`}else{let Ae=pe.bottom+4;return`left: ${be}px; top: ${Ae}px`}}getDaysInMonth(){let pe=this.viewDate.getFullYear(),be=this.viewDate.getMonth(),Ae=new Date(pe,be,1),Ze=new Date(pe,be+1,0),nt=[],_t=this.weekStartsOn===1?Ae.getDay()===0?6:Ae.getDay()-1:Ae.getDay();for(let we=_t;we>0;we--)nt.push(new Date(pe,be,1-we));for(let we=1;we<=Ze.getDate();we++)nt.push(new Date(pe,be,we));let _e=42-nt.length;for(let we=1;we<=_e;we++)nt.push(new Date(pe,be+1,we));return nt}isToday(pe){let be=new Date;return pe.getDate()===be.getDate()&&pe.getMonth()===be.getMonth()&&pe.getFullYear()===be.getFullYear()}isSelected(pe){return this.selectedDate?pe.getDate()===this.selectedDate.getDate()&&pe.getMonth()===this.selectedDate.getMonth()&&pe.getFullYear()===this.selectedDate.getFullYear():!1}isDayDisabled(pe){if(this.minDate){let be=new Date(this.minDate);if(pe<be)return!0}if(this.maxDate){let be=new Date(this.maxDate);if(pe>be)return!0}return this.disabledDates?.length?this.disabledDates.some(be=>{try{let Ae=new Date(be);return pe.getDate()===Ae.getDate()&&pe.getMonth()===Ae.getMonth()&&pe.getFullYear()===Ae.getFullYear()}catch{return!1}}):!1}getEventsForDate(pe){if(!this.events?.length)return[];let be=`${pe.getFullYear()}-${(pe.getMonth()+1).toString().padStart(2,"0")}-${pe.getDate().toString().padStart(2,"0")}`;return this.events.filter(Ae=>Ae.date===be)}previousMonth(){this.viewDate=new Date(this.viewDate.getFullYear(),this.viewDate.getMonth()-1,1)}nextMonth(){this.viewDate=new Date(this.viewDate.getFullYear(),this.viewDate.getMonth()+1,1)}handleSelectDate(pe){this.selectedDate=new Date(pe.getFullYear(),pe.getMonth(),pe.getDate(),this.selectedHour,this.selectedMinute),this.dispatchEvent(new CustomEvent("date-selected",{detail:this.selectedDate})),this.enableTime||this.dispatchEvent(new CustomEvent("close-request"))}handleSelectToday(){let pe=new Date;this.selectedDate=pe,this.viewDate=new Date(pe),this.selectedHour=pe.getHours(),this.selectedMinute=pe.getMinutes(),this.dispatchEvent(new CustomEvent("date-selected",{detail:this.selectedDate})),this.enableTime||this.dispatchEvent(new CustomEvent("close-request"))}handleClear(){this.dispatchEvent(new CustomEvent("date-cleared")),this.dispatchEvent(new CustomEvent("close-request"))}handleHourInput=i(pe=>{let be=pe.target,Ae=parseInt(be.value)||0;this.timeFormat==="12h"?(Ae=Math.max(1,Math.min(12,Ae)),this.selectedHour>=12&&Ae!==12?this.selectedHour=Ae+12:this.selectedHour<12&&Ae===12?this.selectedHour=0:this.selectedHour=Ae):this.selectedHour=Math.max(0,Math.min(23,Ae)),this.emitTimeUpdate()},"handleHourInput");handleMinuteInput=i(pe=>{let be=pe.target,Ae=parseInt(be.value)||0;Ae=Math.max(0,Math.min(59,Ae)),this.minuteIncrement>1&&(Ae=Math.round(Ae/this.minuteIncrement)*this.minuteIncrement),this.selectedMinute=Ae,this.emitTimeUpdate()},"handleMinuteInput");setAMPM(pe){pe==="am"&&this.selectedHour>=12?this.selectedHour-=12:pe==="pm"&&this.selectedHour<12&&(this.selectedHour+=12),this.emitTimeUpdate()}handleTimezoneChange=i(pe=>{this.timezone=pe.target.value,this.emitTimeUpdate()},"handleTimezoneChange");emitTimeUpdate(){this.selectedDate&&(this.selectedDate=new Date(this.selectedDate.getFullYear(),this.selectedDate.getMonth(),this.selectedDate.getDate(),this.selectedHour,this.selectedMinute),this.dispatchEvent(new CustomEvent("date-selected",{detail:this.selectedDate})))}async show(){this.windowLayer=await Gi.createAndShow(),this.windowLayer.addEventListener("click",()=>{this.dispatchEvent(new CustomEvent("close-request"))}),this.menuZIndex=ta.getNextZIndex(),ta.register(this,this.menuZIndex),this.style.zIndex=this.menuZIndex.toString(),document.body.appendChild(this),await jt.smartdelay.delayFor(0),this.visible=!0,window.addEventListener("scroll",this.handleScrollOrResize,{capture:!0,passive:!0}),window.addEventListener("resize",this.handleScrollOrResize,{passive:!0})}async hide(){this.isDestroying||(this.isDestroying=!0,window.removeEventListener("scroll",this.handleScrollOrResize,{capture:!0}),window.removeEventListener("resize",this.handleScrollOrResize),ta.unregister(this),this.windowLayer&&(this.windowLayer.destroy(),this.windowLayer=null),this.visible=!1,await jt.smartdelay.delayFor(150),this.parentElement&&this.parentElement.removeChild(this),this.isDestroying=!1)}handleScrollOrResize=i(()=>{this.dispatchEvent(new CustomEvent("reposition-request"))},"handleScrollOrResize");async disconnectedCallback(){await super.disconnectedCallback(),window.removeEventListener("scroll",this.handleScrollOrResize,{capture:!0}),window.removeEventListener("resize",this.handleScrollOrResize),ta.unregister(this)}static{sa(r,a)}};return Me=r})()});var Ai,va,dte,YGe=f(()=>{le();zr();noa();coa();uoa();KGe();ba();R8();Ai=function(t,e,a,r,s,o){function n(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}i(n,"accept");for(var l=r.kind,c=l==="getter"?"get":l==="setter"?"set":"value",d=!e&&t?r.static?t:t.prototype:null,u=e||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p,m=!1,v=a.length-1;v>=0;v--){var x={};for(var b in r)x[b]=b==="access"?{}:r[b];for(var b in r.access)x.access[b]=r.access[b];x.addInitializer=function(y){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(n(y||null))};var g=(0,a[v])(l==="accessor"?{get:u.get,set:u.set}:u[c],x);if(l==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(p=n(g.get))&&(u.get=p),(p=n(g.set))&&(u.set=p),(p=n(g.init))&&s.unshift(p)}else(p=n(g))&&(l==="field"?s.unshift(p):u[c]=p)}d&&Object.defineProperty(d,r.name,u),m=!0},va=function(t,e,a){for(var r=arguments.length>2,s=0;s<e.length;s++)a=r?e[s].call(t,a):e[s].call(t);return r?a:void 0},dte=(()=>{let t=[ie("dees-input-datepicker")],e,a=[],r,s=kt,o,n=[],l=[],c,d=[],u=[],p,m=[],v=[],x,b=[],g=[],y,k=[],C=[],R,T=[],S=[],N,_=[],I=[],O,M=[],z=[],E,A=[],F=[],K,j=[],U=[],he,B=[],J=[],ve,P=[],H=[],de,ue=[],Y=[],X,Q=[],Z=[],me,ae=[],re=[],ye,V=[],q=[],oe,se=[],te=[],Ce,Fe=[],Ve=[];var dt=class extends s{static{i(this,"DeesInputDatepicker")}static{r=this}static{let $e=typeof Symbol=="function"&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;o=[$({type:String})],c=[$({type:Boolean})],p=[$({type:String})],x=[$({type:Number})],y=[$({type:String})],R=[$({type:String})],N=[$({type:String})],O=[$({type:Array})],E=[$({type:Number})],K=[$({type:String})],he=[$({type:Boolean})],ve=[$({type:String})],de=[$({type:Array})],X=[G()],me=[G()],ye=[G()],oe=[G()],Ce=[G()],Ai(this,null,o,{kind:"accessor",name:"value",static:!1,private:!1,access:{has:i(ze=>"value"in ze,"has"),get:i(ze=>ze.value,"get"),set:i((ze,Me)=>{ze.value=Me},"set")},metadata:$e},n,l),Ai(this,null,c,{kind:"accessor",name:"enableTime",static:!1,private:!1,access:{has:i(ze=>"enableTime"in ze,"has"),get:i(ze=>ze.enableTime,"get"),set:i((ze,Me)=>{ze.enableTime=Me},"set")},metadata:$e},d,u),Ai(this,null,p,{kind:"accessor",name:"timeFormat",static:!1,private:!1,access:{has:i(ze=>"timeFormat"in ze,"has"),get:i(ze=>ze.timeFormat,"get"),set:i((ze,Me)=>{ze.timeFormat=Me},"set")},metadata:$e},m,v),Ai(this,null,x,{kind:"accessor",name:"minuteIncrement",static:!1,private:!1,access:{has:i(ze=>"minuteIncrement"in ze,"has"),get:i(ze=>ze.minuteIncrement,"get"),set:i((ze,Me)=>{ze.minuteIncrement=Me},"set")},metadata:$e},b,g),Ai(this,null,y,{kind:"accessor",name:"dateFormat",static:!1,private:!1,access:{has:i(ze=>"dateFormat"in ze,"has"),get:i(ze=>ze.dateFormat,"get"),set:i((ze,Me)=>{ze.dateFormat=Me},"set")},metadata:$e},k,C),Ai(this,null,R,{kind:"accessor",name:"minDate",static:!1,private:!1,access:{has:i(ze=>"minDate"in ze,"has"),get:i(ze=>ze.minDate,"get"),set:i((ze,Me)=>{ze.minDate=Me},"set")},metadata:$e},T,S),Ai(this,null,N,{kind:"accessor",name:"maxDate",static:!1,private:!1,access:{has:i(ze=>"maxDate"in ze,"has"),get:i(ze=>ze.maxDate,"get"),set:i((ze,Me)=>{ze.maxDate=Me},"set")},metadata:$e},_,I),Ai(this,null,O,{kind:"accessor",name:"disabledDates",static:!1,private:!1,access:{has:i(ze=>"disabledDates"in ze,"has"),get:i(ze=>ze.disabledDates,"get"),set:i((ze,Me)=>{ze.disabledDates=Me},"set")},metadata:$e},M,z),Ai(this,null,E,{kind:"accessor",name:"weekStartsOn",static:!1,private:!1,access:{has:i(ze=>"weekStartsOn"in ze,"has"),get:i(ze=>ze.weekStartsOn,"get"),set:i((ze,Me)=>{ze.weekStartsOn=Me},"set")},metadata:$e},A,F),Ai(this,null,K,{kind:"accessor",name:"placeholder",static:!1,private:!1,access:{has:i(ze=>"placeholder"in ze,"has"),get:i(ze=>ze.placeholder,"get"),set:i((ze,Me)=>{ze.placeholder=Me},"set")},metadata:$e},j,U),Ai(this,null,he,{kind:"accessor",name:"enableTimezone",static:!1,private:!1,access:{has:i(ze=>"enableTimezone"in ze,"has"),get:i(ze=>ze.enableTimezone,"get"),set:i((ze,Me)=>{ze.enableTimezone=Me},"set")},metadata:$e},B,J),Ai(this,null,ve,{kind:"accessor",name:"timezone",static:!1,private:!1,access:{has:i(ze=>"timezone"in ze,"has"),get:i(ze=>ze.timezone,"get"),set:i((ze,Me)=>{ze.timezone=Me},"set")},metadata:$e},P,H),Ai(this,null,de,{kind:"accessor",name:"events",static:!1,private:!1,access:{has:i(ze=>"events"in ze,"has"),get:i(ze=>ze.events,"get"),set:i((ze,Me)=>{ze.events=Me},"set")},metadata:$e},ue,Y),Ai(this,null,X,{kind:"accessor",name:"isOpened",static:!1,private:!1,access:{has:i(ze=>"isOpened"in ze,"has"),get:i(ze=>ze.isOpened,"get"),set:i((ze,Me)=>{ze.isOpened=Me},"set")},metadata:$e},Q,Z),Ai(this,null,me,{kind:"accessor",name:"selectedDate",static:!1,private:!1,access:{has:i(ze=>"selectedDate"in ze,"has"),get:i(ze=>ze.selectedDate,"get"),set:i((ze,Me)=>{ze.selectedDate=Me},"set")},metadata:$e},ae,re),Ai(this,null,ye,{kind:"accessor",name:"viewDate",static:!1,private:!1,access:{has:i(ze=>"viewDate"in ze,"has"),get:i(ze=>ze.viewDate,"get"),set:i((ze,Me)=>{ze.viewDate=Me},"set")},metadata:$e},V,q),Ai(this,null,oe,{kind:"accessor",name:"selectedHour",static:!1,private:!1,access:{has:i(ze=>"selectedHour"in ze,"has"),get:i(ze=>ze.selectedHour,"get"),set:i((ze,Me)=>{ze.selectedHour=Me},"set")},metadata:$e},se,te),Ai(this,null,Ce,{kind:"accessor",name:"selectedMinute",static:!1,private:!1,access:{has:i(ze=>"selectedMinute"in ze,"has"),get:i(ze=>ze.selectedMinute,"get"),set:i((ze,Me)=>{ze.selectedMinute=Me},"set")},metadata:$e},Fe,Ve),Ai(null,e={value:r},t,{kind:"class",name:r.name,metadata:$e},null,a),dt=r=e.value,$e&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:$e})}static demo=ooa;static demoGroups=["Input"];#e=va(this,n,"");get value(){return this.#e}set value($e){this.#e=$e}#t=(va(this,l),va(this,d,!1));get enableTime(){return this.#t}set enableTime($e){this.#t=$e}#a=(va(this,u),va(this,m,"24h"));get timeFormat(){return this.#a}set timeFormat($e){this.#a=$e}#r=(va(this,v),va(this,b,1));get minuteIncrement(){return this.#r}set minuteIncrement($e){this.#r=$e}#i=(va(this,g),va(this,k,"YYYY-MM-DD"));get dateFormat(){return this.#i}set dateFormat($e){this.#i=$e}#s=(va(this,C),va(this,T,""));get minDate(){return this.#s}set minDate($e){this.#s=$e}#o=(va(this,S),va(this,_,""));get maxDate(){return this.#o}set maxDate($e){this.#o=$e}#n=(va(this,I),va(this,M,[]));get disabledDates(){return this.#n}set disabledDates($e){this.#n=$e}#l=(va(this,z),va(this,A,1));get weekStartsOn(){return this.#l}set weekStartsOn($e){this.#l=$e}#c=(va(this,F),va(this,j,"YYYY-MM-DD"));get placeholder(){return this.#c}set placeholder($e){this.#c=$e}#d=(va(this,U),va(this,B,!1));get enableTimezone(){return this.#d}set enableTimezone($e){this.#d=$e}#u=(va(this,J),va(this,P,Intl.DateTimeFormat().resolvedOptions().timeZone));get timezone(){return this.#u}set timezone($e){this.#u=$e}#p=(va(this,H),va(this,ue,[]));get events(){return this.#p}set events($e){this.#p=$e}#f=(va(this,Y),va(this,Q,!1));get isOpened(){return this.#f}set isOpened($e){this.#f=$e}#h=(va(this,Z),va(this,ae,null));get selectedDate(){return this.#h}set selectedDate($e){this.#h=$e}#m=(va(this,re),va(this,V,new Date));get viewDate(){return this.#m}set viewDate($e){this.#m=$e}#g=(va(this,q),va(this,se,0));get selectedHour(){return this.#g}set selectedHour($e){this.#g=$e}#b=(va(this,te),va(this,Fe,0));get selectedMinute(){return this.#b}set selectedMinute($e){this.#b=$e}popupInstance=(va(this,Ve),null);static styles=loa;render(){return doa(this)}async firstUpdated(){if(this.value||(this.value=""),this.value)try{let $e=new Date(this.value);isNaN($e.getTime())||(this.selectedDate=$e,this.viewDate=new Date($e),this.selectedHour=$e.getHours(),this.selectedMinute=$e.getMinutes())}catch{}else{let $e=new Date;this.viewDate=new Date($e),this.selectedHour=$e.getHours(),this.selectedMinute=0}}formatDate($e){if(!$e)return"";try{let ze=new Date($e);if(isNaN(ze.getTime()))return"";let Me=this.dateFormat,pe=ze.getDate().toString().padStart(2,"0"),be=(ze.getMonth()+1).toString().padStart(2,"0"),Ae=ze.getFullYear().toString();if(Me=Me.replace("YYYY",Ae),Me=Me.replace("YY",Ae.slice(-2)),Me=Me.replace("MM",be),Me=Me.replace("DD",pe),this.enableTime){let Ze=ze.getHours(),nt=Ze===0?12:Ze>12?Ze-12:Ze,_t=ze.getMinutes().toString().padStart(2,"0"),_e=Ze>=12?"PM":"AM";this.timeFormat==="12h"?Me+=` ${nt}:${_t} ${_e}`:Me+=` ${Ze.toString().padStart(2,"0")}:${_t}`}if(this.enableTimezone){let _t=new Intl.DateTimeFormat("en-US",{timeZoneName:"short",timeZone:this.timezone}).formatToParts(ze).find(_e=>_e.type==="timeZoneName");_t&&(Me+=` ${_t.value}`)}return Me}catch{return""}}async toggleCalendar(){if(this.disabled)return;if(this.isOpened){this.closePopup();return}this.isOpened=!0;let ze=this.shadowRoot.querySelector(".input-container").getBoundingClientRect(),Me=window.innerHeight-ze.bottom,pe=ze.top,be=Me<400&&pe>Me;this.popupInstance||(this.popupInstance=new cte),this.popupInstance.triggerRect=ze,this.popupInstance.ownerComponent=this,this.popupInstance.opensToTop=be,this.popupInstance.enableTime=this.enableTime,this.popupInstance.timeFormat=this.timeFormat,this.popupInstance.minuteIncrement=this.minuteIncrement,this.popupInstance.weekStartsOn=this.weekStartsOn,this.popupInstance.minDate=this.minDate,this.popupInstance.maxDate=this.maxDate,this.popupInstance.disabledDates=this.disabledDates,this.popupInstance.enableTimezone=this.enableTimezone,this.popupInstance.timezone=this.timezone,this.popupInstance.events=this.events,this.popupInstance.selectedDate=this.selectedDate,this.popupInstance.viewDate=new Date(this.viewDate),this.popupInstance.selectedHour=this.selectedHour,this.popupInstance.selectedMinute=this.selectedMinute,this.popupInstance.addEventListener("date-selected",this.handleDateSelected),this.popupInstance.addEventListener("date-cleared",this.handleDateCleared),this.popupInstance.addEventListener("close-request",this.handleCloseRequest),this.popupInstance.addEventListener("reposition-request",this.handleRepositionRequest),await this.popupInstance.show()}closePopup(){this.isOpened=!1,this.popupInstance&&(this.popupInstance.removeEventListener("date-selected",this.handleDateSelected),this.popupInstance.removeEventListener("date-cleared",this.handleDateCleared),this.popupInstance.removeEventListener("close-request",this.handleCloseRequest),this.popupInstance.removeEventListener("reposition-request",this.handleRepositionRequest),this.popupInstance.hide())}handleDateSelected=i($e=>{let ze=$e.detail;this.selectedDate=ze,this.selectedHour=ze.getHours(),this.selectedMinute=ze.getMinutes(),this.viewDate=new Date(ze),this.value=this.formatValueWithTimezone(ze),this.changeSubject.next(this)},"handleDateSelected");handleDateCleared=i(()=>{this.value="",this.selectedDate=null,this.changeSubject.next(this)},"handleDateCleared");handleCloseRequest=i(()=>{this.closePopup()},"handleCloseRequest");handleRepositionRequest=i(()=>{if(!this.popupInstance||!this.isOpened)return;let $e=this.shadowRoot.querySelector(".input-container");if(!$e)return;let ze=$e.getBoundingClientRect();if(ze.bottom<0||ze.top>window.innerHeight){this.closePopup();return}let Me=window.innerHeight-ze.bottom,pe=ze.top;this.popupInstance.opensToTop=Me<400&&pe>Me,this.popupInstance.triggerRect=ze},"handleRepositionRequest");handleKeydown($e){$e.key==="Enter"||$e.key===" "?($e.preventDefault(),this.toggleCalendar()):$e.key==="Escape"&&this.isOpened&&($e.preventDefault(),this.closePopup())}clearValue($e){$e.stopPropagation(),this.value="",this.selectedDate=null,this.changeSubject.next(this)}handleManualInput($e){let Me=$e.target.value.trim();if(!Me){this.value="",this.selectedDate=null;return}let pe=this.parseManualDate(Me);pe&&!isNaN(pe.getTime())&&(this.value=pe.toISOString(),this.selectedDate=pe,this.viewDate=new Date(pe),this.selectedHour=pe.getHours(),this.selectedMinute=pe.getMinutes(),this.changeSubject.next(this))}handleInputBlur($e){let ze=$e.target,Me=ze.value.trim();if(!Me){this.value="",this.selectedDate=null,this.changeSubject.next(this);return}let pe=this.parseManualDate(Me);pe&&!isNaN(pe.getTime())?(this.value=pe.toISOString(),this.selectedDate=pe,this.viewDate=new Date(pe),this.selectedHour=pe.getHours(),this.selectedMinute=pe.getMinutes(),this.changeSubject.next(this),ze.value=this.formatDate(this.value)):ze.value=this.formatDate(this.value)}parseManualDate($e){if(!$e)return null;let ze=$e.split(" "),Me=ze[0],pe=ze[1]||"",be=null,Ae=Me.match(/^(\d{4})-(\d{1,2})-(\d{1,2})$/);if(Ae){let[Ze,nt,_t,_e]=Ae;be=new Date(parseInt(nt),parseInt(_t)-1,parseInt(_e))}if(!be){let Ze=Me.match(/^(\d{1,2})\.(\d{1,2})\.(\d{4})$/);if(Ze){let[nt,_t,_e,we]=Ze;be=new Date(parseInt(we),parseInt(_e)-1,parseInt(_t))}}if(!be){let Ze=Me.match(/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/);if(Ze){let[nt,_t,_e,we]=Ze;be=new Date(parseInt(we),parseInt(_t)-1,parseInt(_e))}}if(!be||isNaN(be.getTime()))return null;if(pe){let Ze=pe.match(/^(\d{1,2}):(\d{2})$/);if(Ze){let[nt,_t,_e]=Ze;be.setHours(parseInt(_t)),be.setMinutes(parseInt(_e))}}else if(!this.enableTime){let Ze=new Date;be.setHours(Ze.getHours()),be.setMinutes(Ze.getMinutes()),be.setSeconds(0),be.setMilliseconds(0)}return be}formatValueWithTimezone($e){if(!this.enableTimezone)return $e.toISOString();let Me=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:this.timezone,timeZoneName:"short"}).formatToParts($e),pe={};Me.forEach(Ze=>{pe[Ze.type]=Ze.value});let be=`${pe.year}-${pe.month}-${pe.day}T${pe.hour}:${pe.minute}:${pe.second}`,Ae=this.getTimezoneOffset($e,this.timezone);return`${be}${Ae}`}getTimezoneOffset($e,ze){let Me=new Date($e.toLocaleString("en-US",{timeZone:ze})),pe=new Date($e.toLocaleString("en-US",{timeZone:"UTC"})),be=(Me.getTime()-pe.getTime())/(1e3*60),Ae=Math.floor(Math.abs(be)/60),Ze=Math.abs(be)%60;return`${be>=0?"+":"-"}${Ae.toString().padStart(2,"0")}:${Ze.toString().padStart(2,"0")}`}getValue(){return this.value}setValue($e){if(this.value=$e,$e)try{let ze=new Date($e);isNaN(ze.getTime())||(this.selectedDate=ze,this.viewDate=new Date(ze),this.selectedHour=ze.getHours(),this.selectedMinute=ze.getMinutes())}catch{}}async disconnectedCallback(){await super.disconnectedCallback(),this.popupInstance&&(this.popupInstance.removeEventListener("date-selected",this.handleDateSelected),this.popupInstance.removeEventListener("date-cleared",this.handleDateCleared),this.popupInstance.removeEventListener("close-request",this.handleCloseRequest),this.popupInstance.removeEventListener("reposition-request",this.handleRepositionRequest),this.popupInstance.hide(),this.popupInstance=null)}static{va(r,a)}};return dt=r})()});var ute=f(()=>{YGe();KGe()});var poa,foa=f(()=>{le();Ha();Yi();poa=i(()=>w`
5899
+ `}computePositionStyle(){let pe=this.triggerRect,be=pe.left;if(this.opensToTop){let Ae=window.innerHeight-pe.top+4;return`left: ${be}px; bottom: ${Ae}px; top: auto`}else{let Ae=pe.bottom+4;return`left: ${be}px; top: ${Ae}px`}}getDaysInMonth(){let pe=this.viewDate.getFullYear(),be=this.viewDate.getMonth(),Ae=new Date(pe,be,1),Ke=new Date(pe,be+1,0),nt=[],_t=this.weekStartsOn===1?Ae.getDay()===0?6:Ae.getDay()-1:Ae.getDay();for(let we=_t;we>0;we--)nt.push(new Date(pe,be,1-we));for(let we=1;we<=Ke.getDate();we++)nt.push(new Date(pe,be,we));let _e=42-nt.length;for(let we=1;we<=_e;we++)nt.push(new Date(pe,be+1,we));return nt}isToday(pe){let be=new Date;return pe.getDate()===be.getDate()&&pe.getMonth()===be.getMonth()&&pe.getFullYear()===be.getFullYear()}isSelected(pe){return this.selectedDate?pe.getDate()===this.selectedDate.getDate()&&pe.getMonth()===this.selectedDate.getMonth()&&pe.getFullYear()===this.selectedDate.getFullYear():!1}isDayDisabled(pe){if(this.minDate){let be=new Date(this.minDate);if(pe<be)return!0}if(this.maxDate){let be=new Date(this.maxDate);if(pe>be)return!0}return this.disabledDates?.length?this.disabledDates.some(be=>{try{let Ae=new Date(be);return pe.getDate()===Ae.getDate()&&pe.getMonth()===Ae.getMonth()&&pe.getFullYear()===Ae.getFullYear()}catch{return!1}}):!1}getEventsForDate(pe){if(!this.events?.length)return[];let be=`${pe.getFullYear()}-${(pe.getMonth()+1).toString().padStart(2,"0")}-${pe.getDate().toString().padStart(2,"0")}`;return this.events.filter(Ae=>Ae.date===be)}previousMonth(){this.viewDate=new Date(this.viewDate.getFullYear(),this.viewDate.getMonth()-1,1)}nextMonth(){this.viewDate=new Date(this.viewDate.getFullYear(),this.viewDate.getMonth()+1,1)}handleSelectDate(pe){this.selectedDate=new Date(pe.getFullYear(),pe.getMonth(),pe.getDate(),this.selectedHour,this.selectedMinute),this.dispatchEvent(new CustomEvent("date-selected",{detail:this.selectedDate})),this.enableTime||this.dispatchEvent(new CustomEvent("close-request"))}handleSelectToday(){let pe=new Date;this.selectedDate=pe,this.viewDate=new Date(pe),this.selectedHour=pe.getHours(),this.selectedMinute=pe.getMinutes(),this.dispatchEvent(new CustomEvent("date-selected",{detail:this.selectedDate})),this.enableTime||this.dispatchEvent(new CustomEvent("close-request"))}handleClear(){this.dispatchEvent(new CustomEvent("date-cleared")),this.dispatchEvent(new CustomEvent("close-request"))}handleHourInput=i(pe=>{let be=pe.target,Ae=parseInt(be.value)||0;this.timeFormat==="12h"?(Ae=Math.max(1,Math.min(12,Ae)),this.selectedHour>=12&&Ae!==12?this.selectedHour=Ae+12:this.selectedHour<12&&Ae===12?this.selectedHour=0:this.selectedHour=Ae):this.selectedHour=Math.max(0,Math.min(23,Ae)),this.emitTimeUpdate()},"handleHourInput");handleMinuteInput=i(pe=>{let be=pe.target,Ae=parseInt(be.value)||0;Ae=Math.max(0,Math.min(59,Ae)),this.minuteIncrement>1&&(Ae=Math.round(Ae/this.minuteIncrement)*this.minuteIncrement),this.selectedMinute=Ae,this.emitTimeUpdate()},"handleMinuteInput");setAMPM(pe){pe==="am"&&this.selectedHour>=12?this.selectedHour-=12:pe==="pm"&&this.selectedHour<12&&(this.selectedHour+=12),this.emitTimeUpdate()}handleTimezoneChange=i(pe=>{this.timezone=pe.target.value,this.emitTimeUpdate()},"handleTimezoneChange");emitTimeUpdate(){this.selectedDate&&(this.selectedDate=new Date(this.selectedDate.getFullYear(),this.selectedDate.getMonth(),this.selectedDate.getDate(),this.selectedHour,this.selectedMinute),this.dispatchEvent(new CustomEvent("date-selected",{detail:this.selectedDate})))}async show(){this.windowLayer=await Gi.createAndShow(),this.windowLayer.addEventListener("click",()=>{this.dispatchEvent(new CustomEvent("close-request"))}),this.menuZIndex=ta.getNextZIndex(),ta.register(this,this.menuZIndex),this.style.zIndex=this.menuZIndex.toString(),document.body.appendChild(this),await jt.smartdelay.delayFor(0),this.visible=!0,window.addEventListener("scroll",this.handleScrollOrResize,{capture:!0,passive:!0}),window.addEventListener("resize",this.handleScrollOrResize,{passive:!0})}async hide(){this.isDestroying||(this.isDestroying=!0,window.removeEventListener("scroll",this.handleScrollOrResize,{capture:!0}),window.removeEventListener("resize",this.handleScrollOrResize),ta.unregister(this),this.windowLayer&&(this.windowLayer.destroy(),this.windowLayer=null),this.visible=!1,await jt.smartdelay.delayFor(150),this.parentElement&&this.parentElement.removeChild(this),this.isDestroying=!1)}handleScrollOrResize=i(()=>{this.dispatchEvent(new CustomEvent("reposition-request"))},"handleScrollOrResize");async disconnectedCallback(){await super.disconnectedCallback(),window.removeEventListener("scroll",this.handleScrollOrResize,{capture:!0}),window.removeEventListener("resize",this.handleScrollOrResize),ta.unregister(this)}static{sa(r,a)}};return Me=r})()});var Ai,va,dte,YGe=f(()=>{le();zr();noa();coa();uoa();KGe();ba();R8();Ai=function(t,e,a,r,s,o){function n(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}i(n,"accept");for(var l=r.kind,c=l==="getter"?"get":l==="setter"?"set":"value",d=!e&&t?r.static?t:t.prototype:null,u=e||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p,m=!1,v=a.length-1;v>=0;v--){var x={};for(var b in r)x[b]=b==="access"?{}:r[b];for(var b in r.access)x.access[b]=r.access[b];x.addInitializer=function(y){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(n(y||null))};var g=(0,a[v])(l==="accessor"?{get:u.get,set:u.set}:u[c],x);if(l==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(p=n(g.get))&&(u.get=p),(p=n(g.set))&&(u.set=p),(p=n(g.init))&&s.unshift(p)}else(p=n(g))&&(l==="field"?s.unshift(p):u[c]=p)}d&&Object.defineProperty(d,r.name,u),m=!0},va=function(t,e,a){for(var r=arguments.length>2,s=0;s<e.length;s++)a=r?e[s].call(t,a):e[s].call(t);return r?a:void 0},dte=(()=>{let t=[ie("dees-input-datepicker")],e,a=[],r,s=kt,o,n=[],l=[],c,d=[],u=[],p,m=[],v=[],x,b=[],g=[],y,k=[],C=[],R,T=[],S=[],N,_=[],I=[],O,M=[],z=[],E,A=[],F=[],K,j=[],U=[],he,B=[],J=[],ve,P=[],H=[],de,ue=[],Y=[],X,Q=[],Z=[],me,ae=[],re=[],ye,V=[],q=[],oe,se=[],te=[],Ce,Fe=[],Ve=[];var dt=class extends s{static{i(this,"DeesInputDatepicker")}static{r=this}static{let $e=typeof Symbol=="function"&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;o=[$({type:String})],c=[$({type:Boolean})],p=[$({type:String})],x=[$({type:Number})],y=[$({type:String})],R=[$({type:String})],N=[$({type:String})],O=[$({type:Array})],E=[$({type:Number})],K=[$({type:String})],he=[$({type:Boolean})],ve=[$({type:String})],de=[$({type:Array})],X=[G()],me=[G()],ye=[G()],oe=[G()],Ce=[G()],Ai(this,null,o,{kind:"accessor",name:"value",static:!1,private:!1,access:{has:i(ze=>"value"in ze,"has"),get:i(ze=>ze.value,"get"),set:i((ze,Me)=>{ze.value=Me},"set")},metadata:$e},n,l),Ai(this,null,c,{kind:"accessor",name:"enableTime",static:!1,private:!1,access:{has:i(ze=>"enableTime"in ze,"has"),get:i(ze=>ze.enableTime,"get"),set:i((ze,Me)=>{ze.enableTime=Me},"set")},metadata:$e},d,u),Ai(this,null,p,{kind:"accessor",name:"timeFormat",static:!1,private:!1,access:{has:i(ze=>"timeFormat"in ze,"has"),get:i(ze=>ze.timeFormat,"get"),set:i((ze,Me)=>{ze.timeFormat=Me},"set")},metadata:$e},m,v),Ai(this,null,x,{kind:"accessor",name:"minuteIncrement",static:!1,private:!1,access:{has:i(ze=>"minuteIncrement"in ze,"has"),get:i(ze=>ze.minuteIncrement,"get"),set:i((ze,Me)=>{ze.minuteIncrement=Me},"set")},metadata:$e},b,g),Ai(this,null,y,{kind:"accessor",name:"dateFormat",static:!1,private:!1,access:{has:i(ze=>"dateFormat"in ze,"has"),get:i(ze=>ze.dateFormat,"get"),set:i((ze,Me)=>{ze.dateFormat=Me},"set")},metadata:$e},k,C),Ai(this,null,R,{kind:"accessor",name:"minDate",static:!1,private:!1,access:{has:i(ze=>"minDate"in ze,"has"),get:i(ze=>ze.minDate,"get"),set:i((ze,Me)=>{ze.minDate=Me},"set")},metadata:$e},T,S),Ai(this,null,N,{kind:"accessor",name:"maxDate",static:!1,private:!1,access:{has:i(ze=>"maxDate"in ze,"has"),get:i(ze=>ze.maxDate,"get"),set:i((ze,Me)=>{ze.maxDate=Me},"set")},metadata:$e},_,I),Ai(this,null,O,{kind:"accessor",name:"disabledDates",static:!1,private:!1,access:{has:i(ze=>"disabledDates"in ze,"has"),get:i(ze=>ze.disabledDates,"get"),set:i((ze,Me)=>{ze.disabledDates=Me},"set")},metadata:$e},M,z),Ai(this,null,E,{kind:"accessor",name:"weekStartsOn",static:!1,private:!1,access:{has:i(ze=>"weekStartsOn"in ze,"has"),get:i(ze=>ze.weekStartsOn,"get"),set:i((ze,Me)=>{ze.weekStartsOn=Me},"set")},metadata:$e},A,F),Ai(this,null,K,{kind:"accessor",name:"placeholder",static:!1,private:!1,access:{has:i(ze=>"placeholder"in ze,"has"),get:i(ze=>ze.placeholder,"get"),set:i((ze,Me)=>{ze.placeholder=Me},"set")},metadata:$e},j,U),Ai(this,null,he,{kind:"accessor",name:"enableTimezone",static:!1,private:!1,access:{has:i(ze=>"enableTimezone"in ze,"has"),get:i(ze=>ze.enableTimezone,"get"),set:i((ze,Me)=>{ze.enableTimezone=Me},"set")},metadata:$e},B,J),Ai(this,null,ve,{kind:"accessor",name:"timezone",static:!1,private:!1,access:{has:i(ze=>"timezone"in ze,"has"),get:i(ze=>ze.timezone,"get"),set:i((ze,Me)=>{ze.timezone=Me},"set")},metadata:$e},P,H),Ai(this,null,de,{kind:"accessor",name:"events",static:!1,private:!1,access:{has:i(ze=>"events"in ze,"has"),get:i(ze=>ze.events,"get"),set:i((ze,Me)=>{ze.events=Me},"set")},metadata:$e},ue,Y),Ai(this,null,X,{kind:"accessor",name:"isOpened",static:!1,private:!1,access:{has:i(ze=>"isOpened"in ze,"has"),get:i(ze=>ze.isOpened,"get"),set:i((ze,Me)=>{ze.isOpened=Me},"set")},metadata:$e},Q,Z),Ai(this,null,me,{kind:"accessor",name:"selectedDate",static:!1,private:!1,access:{has:i(ze=>"selectedDate"in ze,"has"),get:i(ze=>ze.selectedDate,"get"),set:i((ze,Me)=>{ze.selectedDate=Me},"set")},metadata:$e},ae,re),Ai(this,null,ye,{kind:"accessor",name:"viewDate",static:!1,private:!1,access:{has:i(ze=>"viewDate"in ze,"has"),get:i(ze=>ze.viewDate,"get"),set:i((ze,Me)=>{ze.viewDate=Me},"set")},metadata:$e},V,q),Ai(this,null,oe,{kind:"accessor",name:"selectedHour",static:!1,private:!1,access:{has:i(ze=>"selectedHour"in ze,"has"),get:i(ze=>ze.selectedHour,"get"),set:i((ze,Me)=>{ze.selectedHour=Me},"set")},metadata:$e},se,te),Ai(this,null,Ce,{kind:"accessor",name:"selectedMinute",static:!1,private:!1,access:{has:i(ze=>"selectedMinute"in ze,"has"),get:i(ze=>ze.selectedMinute,"get"),set:i((ze,Me)=>{ze.selectedMinute=Me},"set")},metadata:$e},Fe,Ve),Ai(null,e={value:r},t,{kind:"class",name:r.name,metadata:$e},null,a),dt=r=e.value,$e&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:$e})}static demo=ooa;static demoGroups=["Input"];#e=va(this,n,"");get value(){return this.#e}set value($e){this.#e=$e}#t=(va(this,l),va(this,d,!1));get enableTime(){return this.#t}set enableTime($e){this.#t=$e}#a=(va(this,u),va(this,m,"24h"));get timeFormat(){return this.#a}set timeFormat($e){this.#a=$e}#r=(va(this,v),va(this,b,1));get minuteIncrement(){return this.#r}set minuteIncrement($e){this.#r=$e}#i=(va(this,g),va(this,k,"YYYY-MM-DD"));get dateFormat(){return this.#i}set dateFormat($e){this.#i=$e}#s=(va(this,C),va(this,T,""));get minDate(){return this.#s}set minDate($e){this.#s=$e}#o=(va(this,S),va(this,_,""));get maxDate(){return this.#o}set maxDate($e){this.#o=$e}#n=(va(this,I),va(this,M,[]));get disabledDates(){return this.#n}set disabledDates($e){this.#n=$e}#l=(va(this,z),va(this,A,1));get weekStartsOn(){return this.#l}set weekStartsOn($e){this.#l=$e}#c=(va(this,F),va(this,j,"YYYY-MM-DD"));get placeholder(){return this.#c}set placeholder($e){this.#c=$e}#d=(va(this,U),va(this,B,!1));get enableTimezone(){return this.#d}set enableTimezone($e){this.#d=$e}#u=(va(this,J),va(this,P,Intl.DateTimeFormat().resolvedOptions().timeZone));get timezone(){return this.#u}set timezone($e){this.#u=$e}#p=(va(this,H),va(this,ue,[]));get events(){return this.#p}set events($e){this.#p=$e}#f=(va(this,Y),va(this,Q,!1));get isOpened(){return this.#f}set isOpened($e){this.#f=$e}#h=(va(this,Z),va(this,ae,null));get selectedDate(){return this.#h}set selectedDate($e){this.#h=$e}#m=(va(this,re),va(this,V,new Date));get viewDate(){return this.#m}set viewDate($e){this.#m=$e}#g=(va(this,q),va(this,se,0));get selectedHour(){return this.#g}set selectedHour($e){this.#g=$e}#b=(va(this,te),va(this,Fe,0));get selectedMinute(){return this.#b}set selectedMinute($e){this.#b=$e}popupInstance=(va(this,Ve),null);static styles=loa;render(){return doa(this)}async firstUpdated(){if(this.value||(this.value=""),this.value)try{let $e=new Date(this.value);isNaN($e.getTime())||(this.selectedDate=$e,this.viewDate=new Date($e),this.selectedHour=$e.getHours(),this.selectedMinute=$e.getMinutes())}catch{}else{let $e=new Date;this.viewDate=new Date($e),this.selectedHour=$e.getHours(),this.selectedMinute=0}}formatDate($e){if(!$e)return"";try{let ze=new Date($e);if(isNaN(ze.getTime()))return"";let Me=this.dateFormat,pe=ze.getDate().toString().padStart(2,"0"),be=(ze.getMonth()+1).toString().padStart(2,"0"),Ae=ze.getFullYear().toString();if(Me=Me.replace("YYYY",Ae),Me=Me.replace("YY",Ae.slice(-2)),Me=Me.replace("MM",be),Me=Me.replace("DD",pe),this.enableTime){let Ke=ze.getHours(),nt=Ke===0?12:Ke>12?Ke-12:Ke,_t=ze.getMinutes().toString().padStart(2,"0"),_e=Ke>=12?"PM":"AM";this.timeFormat==="12h"?Me+=` ${nt}:${_t} ${_e}`:Me+=` ${Ke.toString().padStart(2,"0")}:${_t}`}if(this.enableTimezone){let _t=new Intl.DateTimeFormat("en-US",{timeZoneName:"short",timeZone:this.timezone}).formatToParts(ze).find(_e=>_e.type==="timeZoneName");_t&&(Me+=` ${_t.value}`)}return Me}catch{return""}}async toggleCalendar(){if(this.disabled)return;if(this.isOpened){this.closePopup();return}this.isOpened=!0;let ze=this.shadowRoot.querySelector(".input-container").getBoundingClientRect(),Me=window.innerHeight-ze.bottom,pe=ze.top,be=Me<400&&pe>Me;this.popupInstance||(this.popupInstance=new cte),this.popupInstance.triggerRect=ze,this.popupInstance.ownerComponent=this,this.popupInstance.opensToTop=be,this.popupInstance.enableTime=this.enableTime,this.popupInstance.timeFormat=this.timeFormat,this.popupInstance.minuteIncrement=this.minuteIncrement,this.popupInstance.weekStartsOn=this.weekStartsOn,this.popupInstance.minDate=this.minDate,this.popupInstance.maxDate=this.maxDate,this.popupInstance.disabledDates=this.disabledDates,this.popupInstance.enableTimezone=this.enableTimezone,this.popupInstance.timezone=this.timezone,this.popupInstance.events=this.events,this.popupInstance.selectedDate=this.selectedDate,this.popupInstance.viewDate=new Date(this.viewDate),this.popupInstance.selectedHour=this.selectedHour,this.popupInstance.selectedMinute=this.selectedMinute,this.popupInstance.addEventListener("date-selected",this.handleDateSelected),this.popupInstance.addEventListener("date-cleared",this.handleDateCleared),this.popupInstance.addEventListener("close-request",this.handleCloseRequest),this.popupInstance.addEventListener("reposition-request",this.handleRepositionRequest),await this.popupInstance.show()}closePopup(){this.isOpened=!1,this.popupInstance&&(this.popupInstance.removeEventListener("date-selected",this.handleDateSelected),this.popupInstance.removeEventListener("date-cleared",this.handleDateCleared),this.popupInstance.removeEventListener("close-request",this.handleCloseRequest),this.popupInstance.removeEventListener("reposition-request",this.handleRepositionRequest),this.popupInstance.hide())}handleDateSelected=i($e=>{let ze=$e.detail;this.selectedDate=ze,this.selectedHour=ze.getHours(),this.selectedMinute=ze.getMinutes(),this.viewDate=new Date(ze),this.value=this.formatValueWithTimezone(ze),this.changeSubject.next(this)},"handleDateSelected");handleDateCleared=i(()=>{this.value="",this.selectedDate=null,this.changeSubject.next(this)},"handleDateCleared");handleCloseRequest=i(()=>{this.closePopup()},"handleCloseRequest");handleRepositionRequest=i(()=>{if(!this.popupInstance||!this.isOpened)return;let $e=this.shadowRoot.querySelector(".input-container");if(!$e)return;let ze=$e.getBoundingClientRect();if(ze.bottom<0||ze.top>window.innerHeight){this.closePopup();return}let Me=window.innerHeight-ze.bottom,pe=ze.top;this.popupInstance.opensToTop=Me<400&&pe>Me,this.popupInstance.triggerRect=ze},"handleRepositionRequest");handleKeydown($e){$e.key==="Enter"||$e.key===" "?($e.preventDefault(),this.toggleCalendar()):$e.key==="Escape"&&this.isOpened&&($e.preventDefault(),this.closePopup())}clearValue($e){$e.stopPropagation(),this.value="",this.selectedDate=null,this.changeSubject.next(this)}handleManualInput($e){let Me=$e.target.value.trim();if(!Me){this.value="",this.selectedDate=null;return}let pe=this.parseManualDate(Me);pe&&!isNaN(pe.getTime())&&(this.value=pe.toISOString(),this.selectedDate=pe,this.viewDate=new Date(pe),this.selectedHour=pe.getHours(),this.selectedMinute=pe.getMinutes(),this.changeSubject.next(this))}handleInputBlur($e){let ze=$e.target,Me=ze.value.trim();if(!Me){this.value="",this.selectedDate=null,this.changeSubject.next(this);return}let pe=this.parseManualDate(Me);pe&&!isNaN(pe.getTime())?(this.value=pe.toISOString(),this.selectedDate=pe,this.viewDate=new Date(pe),this.selectedHour=pe.getHours(),this.selectedMinute=pe.getMinutes(),this.changeSubject.next(this),ze.value=this.formatDate(this.value)):ze.value=this.formatDate(this.value)}parseManualDate($e){if(!$e)return null;let ze=$e.split(" "),Me=ze[0],pe=ze[1]||"",be=null,Ae=Me.match(/^(\d{4})-(\d{1,2})-(\d{1,2})$/);if(Ae){let[Ke,nt,_t,_e]=Ae;be=new Date(parseInt(nt),parseInt(_t)-1,parseInt(_e))}if(!be){let Ke=Me.match(/^(\d{1,2})\.(\d{1,2})\.(\d{4})$/);if(Ke){let[nt,_t,_e,we]=Ke;be=new Date(parseInt(we),parseInt(_e)-1,parseInt(_t))}}if(!be){let Ke=Me.match(/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/);if(Ke){let[nt,_t,_e,we]=Ke;be=new Date(parseInt(we),parseInt(_t)-1,parseInt(_e))}}if(!be||isNaN(be.getTime()))return null;if(pe){let Ke=pe.match(/^(\d{1,2}):(\d{2})$/);if(Ke){let[nt,_t,_e]=Ke;be.setHours(parseInt(_t)),be.setMinutes(parseInt(_e))}}else if(!this.enableTime){let Ke=new Date;be.setHours(Ke.getHours()),be.setMinutes(Ke.getMinutes()),be.setSeconds(0),be.setMilliseconds(0)}return be}formatValueWithTimezone($e){if(!this.enableTimezone)return $e.toISOString();let Me=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:this.timezone,timeZoneName:"short"}).formatToParts($e),pe={};Me.forEach(Ke=>{pe[Ke.type]=Ke.value});let be=`${pe.year}-${pe.month}-${pe.day}T${pe.hour}:${pe.minute}:${pe.second}`,Ae=this.getTimezoneOffset($e,this.timezone);return`${be}${Ae}`}getTimezoneOffset($e,ze){let Me=new Date($e.toLocaleString("en-US",{timeZone:ze})),pe=new Date($e.toLocaleString("en-US",{timeZone:"UTC"})),be=(Me.getTime()-pe.getTime())/(1e3*60),Ae=Math.floor(Math.abs(be)/60),Ke=Math.abs(be)%60;return`${be>=0?"+":"-"}${Ae.toString().padStart(2,"0")}:${Ke.toString().padStart(2,"0")}`}getValue(){return this.value}setValue($e){if(this.value=$e,$e)try{let ze=new Date($e);isNaN(ze.getTime())||(this.selectedDate=ze,this.viewDate=new Date(ze),this.selectedHour=ze.getHours(),this.selectedMinute=ze.getMinutes())}catch{}}async disconnectedCallback(){await super.disconnectedCallback(),this.popupInstance&&(this.popupInstance.removeEventListener("date-selected",this.handleDateSelected),this.popupInstance.removeEventListener("date-cleared",this.handleDateCleared),this.popupInstance.removeEventListener("close-request",this.handleCloseRequest),this.popupInstance.removeEventListener("reposition-request",this.handleRepositionRequest),this.popupInstance.hide(),this.popupInstance=null)}static{va(r,a)}};return dt=r})()});var ute=f(()=>{YGe();KGe()});var poa,foa=f(()=>{le();Ha();Yi();poa=i(()=>w`
5900
5900
  <style>
5901
5901
  ${W`
5902
5902
  .demo-container {
@@ -10262,7 +10262,7 @@ console.log(greeting);`}
10262
10262
  </dees-panel>
10263
10263
  </div>
10264
10264
  </dees-demowrapper>
10265
- `,"demoFunc")});var Vr,Xt,Dte,fYe=f(()=>{le();zr();ba();Jr();Qoa();tt();Vr=function(t,e,a,r,s,o){function n(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}i(n,"accept");for(var l=r.kind,c=l==="getter"?"get":l==="setter"?"set":"value",d=!e&&t?r.static?t:t.prototype:null,u=e||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p,m=!1,v=a.length-1;v>=0;v--){var x={};for(var b in r)x[b]=b==="access"?{}:r[b];for(var b in r.access)x.access[b]=r.access[b];x.addInitializer=function(y){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(n(y||null))};var g=(0,a[v])(l==="accessor"?{get:u.get,set:u.set}:u[c],x);if(l==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(p=n(g.get))&&(u.get=p),(p=n(g.set))&&(u.set=p),(p=n(g.init))&&s.unshift(p)}else(p=n(g))&&(l==="field"?s.unshift(p):u[c]=p)}d&&Object.defineProperty(d,r.name,u),m=!0},Xt=function(t,e,a){for(var r=arguments.length>2,s=0;s<e.length;s++)a=r?e[s].call(t,a):e[s].call(t);return r?a:void 0},Dte=(()=>{let t=[ie("dees-input-list")],e,a=[],r,s=kt,o,n=[],l=[],c,d=[],u=[],p,m=[],v=[],x,b=[],g=[],y,k=[],C=[],R,T=[],S=[],N,_=[],I=[],O,M=[],z=[],E,A=[],F=[],K,j=[],U=[],he,B=[],J=[],ve,P=[],H=[],de,ue=[],Y=[],X,Q=[],Z=[],me,ae=[],re=[],ye,V=[],q=[],oe,se=[],te=[],Ce,Fe=[],Ve=[],dt,$e=[],ze=[],Me,pe=[],be=[],Ae,Ze=[],nt=[];var _t=class extends s{static{i(this,"DeesInputList")}static{r=this}static{let _e=typeof Symbol=="function"&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;o=[$({type:Array})],c=[$({type:String})],p=[$({type:Number})],x=[$({type:Number})],y=[$({type:Boolean})],R=[$({type:Boolean})],N=[$({type:Boolean})],O=[$({type:Array})],E=[$({type:Boolean})],K=[$({type:String})],he=[G()],ve=[G()],de=[G()],X=[G()],me=[G()],ye=[G()],oe=[G()],Ce=[G()],dt=[G()],Me=[G()],Ae=[G()],Vr(this,null,o,{kind:"accessor",name:"value",static:!1,private:!1,access:{has:i(we=>"value"in we,"has"),get:i(we=>we.value,"get"),set:i((we,Ne)=>{we.value=Ne},"set")},metadata:_e},n,l),Vr(this,null,c,{kind:"accessor",name:"placeholder",static:!1,private:!1,access:{has:i(we=>"placeholder"in we,"has"),get:i(we=>we.placeholder,"get"),set:i((we,Ne)=>{we.placeholder=Ne},"set")},metadata:_e},d,u),Vr(this,null,p,{kind:"accessor",name:"maxItems",static:!1,private:!1,access:{has:i(we=>"maxItems"in we,"has"),get:i(we=>we.maxItems,"get"),set:i((we,Ne)=>{we.maxItems=Ne},"set")},metadata:_e},m,v),Vr(this,null,x,{kind:"accessor",name:"minItems",static:!1,private:!1,access:{has:i(we=>"minItems"in we,"has"),get:i(we=>we.minItems,"get"),set:i((we,Ne)=>{we.minItems=Ne},"set")},metadata:_e},b,g),Vr(this,null,y,{kind:"accessor",name:"allowDuplicates",static:!1,private:!1,access:{has:i(we=>"allowDuplicates"in we,"has"),get:i(we=>we.allowDuplicates,"get"),set:i((we,Ne)=>{we.allowDuplicates=Ne},"set")},metadata:_e},k,C),Vr(this,null,R,{kind:"accessor",name:"sortable",static:!1,private:!1,access:{has:i(we=>"sortable"in we,"has"),get:i(we=>we.sortable,"get"),set:i((we,Ne)=>{we.sortable=Ne},"set")},metadata:_e},T,S),Vr(this,null,N,{kind:"accessor",name:"confirmDelete",static:!1,private:!1,access:{has:i(we=>"confirmDelete"in we,"has"),get:i(we=>we.confirmDelete,"get"),set:i((we,Ne)=>{we.confirmDelete=Ne},"set")},metadata:_e},_,I),Vr(this,null,O,{kind:"accessor",name:"candidates",static:!1,private:!1,access:{has:i(we=>"candidates"in we,"has"),get:i(we=>we.candidates,"get"),set:i((we,Ne)=>{we.candidates=Ne},"set")},metadata:_e},M,z),Vr(this,null,E,{kind:"accessor",name:"allowFreeform",static:!1,private:!1,access:{has:i(we=>"allowFreeform"in we,"has"),get:i(we=>we.allowFreeform,"get"),set:i((we,Ne)=>{we.allowFreeform=Ne},"set")},metadata:_e},A,F),Vr(this,null,K,{kind:"accessor",name:"validationText",static:!1,private:!1,access:{has:i(we=>"validationText"in we,"has"),get:i(we=>we.validationText,"get"),set:i((we,Ne)=>{we.validationText=Ne},"set")},metadata:_e},j,U),Vr(this,null,he,{kind:"accessor",name:"inputValue",static:!1,private:!1,access:{has:i(we=>"inputValue"in we,"has"),get:i(we=>we.inputValue,"get"),set:i((we,Ne)=>{we.inputValue=Ne},"set")},metadata:_e},B,J),Vr(this,null,ve,{kind:"accessor",name:"ghostText",static:!1,private:!1,access:{has:i(we=>"ghostText"in we,"has"),get:i(we=>we.ghostText,"get"),set:i((we,Ne)=>{we.ghostText=Ne},"set")},metadata:_e},P,H),Vr(this,null,de,{kind:"accessor",name:"currentCandidateIndex",static:!1,private:!1,access:{has:i(we=>"currentCandidateIndex"in we,"has"),get:i(we=>we.currentCandidateIndex,"get"),set:i((we,Ne)=>{we.currentCandidateIndex=Ne},"set")},metadata:_e},ue,Y),Vr(this,null,X,{kind:"accessor",name:"editingIndex",static:!1,private:!1,access:{has:i(we=>"editingIndex"in we,"has"),get:i(we=>we.editingIndex,"get"),set:i((we,Ne)=>{we.editingIndex=Ne},"set")},metadata:_e},Q,Z),Vr(this,null,me,{kind:"accessor",name:"editingValue",static:!1,private:!1,access:{has:i(we=>"editingValue"in we,"has"),get:i(we=>we.editingValue,"get"),set:i((we,Ne)=>{we.editingValue=Ne},"set")},metadata:_e},ae,re),Vr(this,null,ye,{kind:"accessor",name:"draggedIndex",static:!1,private:!1,access:{has:i(we=>"draggedIndex"in we,"has"),get:i(we=>we.draggedIndex,"get"),set:i((we,Ne)=>{we.draggedIndex=Ne},"set")},metadata:_e},V,q),Vr(this,null,oe,{kind:"accessor",name:"dragOverIndex",static:!1,private:!1,access:{has:i(we=>"dragOverIndex"in we,"has"),get:i(we=>we.dragOverIndex,"get"),set:i((we,Ne)=>{we.dragOverIndex=Ne},"set")},metadata:_e},se,te),Vr(this,null,Ce,{kind:"accessor",name:"dragStartY",static:!1,private:!1,access:{has:i(we=>"dragStartY"in we,"has"),get:i(we=>we.dragStartY,"get"),set:i((we,Ne)=>{we.dragStartY=Ne},"set")},metadata:_e},Fe,Ve),Vr(this,null,dt,{kind:"accessor",name:"dragCurrentY",static:!1,private:!1,access:{has:i(we=>"dragCurrentY"in we,"has"),get:i(we=>we.dragCurrentY,"get"),set:i((we,Ne)=>{we.dragCurrentY=Ne},"set")},metadata:_e},$e,ze),Vr(this,null,Me,{kind:"accessor",name:"targetIndex",static:!1,private:!1,access:{has:i(we=>"targetIndex"in we,"has"),get:i(we=>we.targetIndex,"get"),set:i((we,Ne)=>{we.targetIndex=Ne},"set")},metadata:_e},pe,be),Vr(this,null,Ae,{kind:"accessor",name:"itemHeight",static:!1,private:!1,access:{has:i(we=>"itemHeight"in we,"has"),get:i(we=>we.itemHeight,"get"),set:i((we,Ne)=>{we.itemHeight=Ne},"set")},metadata:_e},Ze,nt),Vr(null,e={value:r},t,{kind:"class",name:r.name,metadata:_e},null,a),_t=r=e.value,_e&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:_e})}static demo=Xoa;static demoGroups=["Input"];#e=Xt(this,n,[]);get value(){return this.#e}set value(_e){this.#e=_e}#t=(Xt(this,l),Xt(this,d,"Add new item..."));get placeholder(){return this.#t}set placeholder(_e){this.#t=_e}#a=(Xt(this,u),Xt(this,m,0));get maxItems(){return this.#a}set maxItems(_e){this.#a=_e}#r=(Xt(this,v),Xt(this,b,0));get minItems(){return this.#r}set minItems(_e){this.#r=_e}#i=(Xt(this,g),Xt(this,k,!1));get allowDuplicates(){return this.#i}set allowDuplicates(_e){this.#i=_e}#s=(Xt(this,C),Xt(this,T,!1));get sortable(){return this.#s}set sortable(_e){this.#s=_e}#o=(Xt(this,S),Xt(this,_,!1));get confirmDelete(){return this.#o}set confirmDelete(_e){this.#o=_e}#n=(Xt(this,I),Xt(this,M,[]));get candidates(){return this.#n}set candidates(_e){this.#n=_e}#l=(Xt(this,z),Xt(this,A,!1));get allowFreeform(){return this.#l}set allowFreeform(_e){this.#l=_e}#c=(Xt(this,F),Xt(this,j,""));get validationText(){return this.#c}set validationText(_e){this.#c=_e}addedCandidatesMap=(Xt(this,U),new Map);matchingCandidates=[];#d=Xt(this,B,"");get inputValue(){return this.#d}set inputValue(_e){this.#d=_e}#u=(Xt(this,J),Xt(this,P,""));get ghostText(){return this.#u}set ghostText(_e){this.#u=_e}#p=(Xt(this,H),Xt(this,ue,-1));get currentCandidateIndex(){return this.#p}set currentCandidateIndex(_e){this.#p=_e}#f=(Xt(this,Y),Xt(this,Q,-1));get editingIndex(){return this.#f}set editingIndex(_e){this.#f=_e}#h=(Xt(this,Z),Xt(this,ae,""));get editingValue(){return this.#h}set editingValue(_e){this.#h=_e}#m=(Xt(this,re),Xt(this,V,-1));get draggedIndex(){return this.#m}set draggedIndex(_e){this.#m=_e}#g=(Xt(this,q),Xt(this,se,-1));get dragOverIndex(){return this.#g}set dragOverIndex(_e){this.#g=_e}#b=(Xt(this,te),Xt(this,Fe,0));get dragStartY(){return this.#b}set dragStartY(_e){this.#b=_e}#v=(Xt(this,Ve),Xt(this,$e,0));get dragCurrentY(){return this.#v}set dragCurrentY(_e){this.#v=_e}#x=(Xt(this,ze),Xt(this,pe,-1));get targetIndex(){return this.#x}set targetIndex(_e){this.#x=_e}#y=(Xt(this,be),Xt(this,Ze,0));get itemHeight(){return this.#y}set itemHeight(_e){this.#y=_e}boundHandleGlobalDragOver=(Xt(this,nt),null);boundHandleGlobalDragEnd=null;originalItemRects=[];static styles=[Ie,...kt.baseStyles,h.defaultStyles,W`
10265
+ `,"demoFunc")});var Vr,Xt,Dte,fYe=f(()=>{le();zr();ba();Jr();Qoa();tt();Vr=function(t,e,a,r,s,o){function n(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}i(n,"accept");for(var l=r.kind,c=l==="getter"?"get":l==="setter"?"set":"value",d=!e&&t?r.static?t:t.prototype:null,u=e||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p,m=!1,v=a.length-1;v>=0;v--){var x={};for(var b in r)x[b]=b==="access"?{}:r[b];for(var b in r.access)x.access[b]=r.access[b];x.addInitializer=function(y){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(n(y||null))};var g=(0,a[v])(l==="accessor"?{get:u.get,set:u.set}:u[c],x);if(l==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(p=n(g.get))&&(u.get=p),(p=n(g.set))&&(u.set=p),(p=n(g.init))&&s.unshift(p)}else(p=n(g))&&(l==="field"?s.unshift(p):u[c]=p)}d&&Object.defineProperty(d,r.name,u),m=!0},Xt=function(t,e,a){for(var r=arguments.length>2,s=0;s<e.length;s++)a=r?e[s].call(t,a):e[s].call(t);return r?a:void 0},Dte=(()=>{let t=[ie("dees-input-list")],e,a=[],r,s=kt,o,n=[],l=[],c,d=[],u=[],p,m=[],v=[],x,b=[],g=[],y,k=[],C=[],R,T=[],S=[],N,_=[],I=[],O,M=[],z=[],E,A=[],F=[],K,j=[],U=[],he,B=[],J=[],ve,P=[],H=[],de,ue=[],Y=[],X,Q=[],Z=[],me,ae=[],re=[],ye,V=[],q=[],oe,se=[],te=[],Ce,Fe=[],Ve=[],dt,$e=[],ze=[],Me,pe=[],be=[],Ae,Ke=[],nt=[];var _t=class extends s{static{i(this,"DeesInputList")}static{r=this}static{let _e=typeof Symbol=="function"&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;o=[$({type:Array})],c=[$({type:String})],p=[$({type:Number})],x=[$({type:Number})],y=[$({type:Boolean})],R=[$({type:Boolean})],N=[$({type:Boolean})],O=[$({type:Array})],E=[$({type:Boolean})],K=[$({type:String})],he=[G()],ve=[G()],de=[G()],X=[G()],me=[G()],ye=[G()],oe=[G()],Ce=[G()],dt=[G()],Me=[G()],Ae=[G()],Vr(this,null,o,{kind:"accessor",name:"value",static:!1,private:!1,access:{has:i(we=>"value"in we,"has"),get:i(we=>we.value,"get"),set:i((we,Ne)=>{we.value=Ne},"set")},metadata:_e},n,l),Vr(this,null,c,{kind:"accessor",name:"placeholder",static:!1,private:!1,access:{has:i(we=>"placeholder"in we,"has"),get:i(we=>we.placeholder,"get"),set:i((we,Ne)=>{we.placeholder=Ne},"set")},metadata:_e},d,u),Vr(this,null,p,{kind:"accessor",name:"maxItems",static:!1,private:!1,access:{has:i(we=>"maxItems"in we,"has"),get:i(we=>we.maxItems,"get"),set:i((we,Ne)=>{we.maxItems=Ne},"set")},metadata:_e},m,v),Vr(this,null,x,{kind:"accessor",name:"minItems",static:!1,private:!1,access:{has:i(we=>"minItems"in we,"has"),get:i(we=>we.minItems,"get"),set:i((we,Ne)=>{we.minItems=Ne},"set")},metadata:_e},b,g),Vr(this,null,y,{kind:"accessor",name:"allowDuplicates",static:!1,private:!1,access:{has:i(we=>"allowDuplicates"in we,"has"),get:i(we=>we.allowDuplicates,"get"),set:i((we,Ne)=>{we.allowDuplicates=Ne},"set")},metadata:_e},k,C),Vr(this,null,R,{kind:"accessor",name:"sortable",static:!1,private:!1,access:{has:i(we=>"sortable"in we,"has"),get:i(we=>we.sortable,"get"),set:i((we,Ne)=>{we.sortable=Ne},"set")},metadata:_e},T,S),Vr(this,null,N,{kind:"accessor",name:"confirmDelete",static:!1,private:!1,access:{has:i(we=>"confirmDelete"in we,"has"),get:i(we=>we.confirmDelete,"get"),set:i((we,Ne)=>{we.confirmDelete=Ne},"set")},metadata:_e},_,I),Vr(this,null,O,{kind:"accessor",name:"candidates",static:!1,private:!1,access:{has:i(we=>"candidates"in we,"has"),get:i(we=>we.candidates,"get"),set:i((we,Ne)=>{we.candidates=Ne},"set")},metadata:_e},M,z),Vr(this,null,E,{kind:"accessor",name:"allowFreeform",static:!1,private:!1,access:{has:i(we=>"allowFreeform"in we,"has"),get:i(we=>we.allowFreeform,"get"),set:i((we,Ne)=>{we.allowFreeform=Ne},"set")},metadata:_e},A,F),Vr(this,null,K,{kind:"accessor",name:"validationText",static:!1,private:!1,access:{has:i(we=>"validationText"in we,"has"),get:i(we=>we.validationText,"get"),set:i((we,Ne)=>{we.validationText=Ne},"set")},metadata:_e},j,U),Vr(this,null,he,{kind:"accessor",name:"inputValue",static:!1,private:!1,access:{has:i(we=>"inputValue"in we,"has"),get:i(we=>we.inputValue,"get"),set:i((we,Ne)=>{we.inputValue=Ne},"set")},metadata:_e},B,J),Vr(this,null,ve,{kind:"accessor",name:"ghostText",static:!1,private:!1,access:{has:i(we=>"ghostText"in we,"has"),get:i(we=>we.ghostText,"get"),set:i((we,Ne)=>{we.ghostText=Ne},"set")},metadata:_e},P,H),Vr(this,null,de,{kind:"accessor",name:"currentCandidateIndex",static:!1,private:!1,access:{has:i(we=>"currentCandidateIndex"in we,"has"),get:i(we=>we.currentCandidateIndex,"get"),set:i((we,Ne)=>{we.currentCandidateIndex=Ne},"set")},metadata:_e},ue,Y),Vr(this,null,X,{kind:"accessor",name:"editingIndex",static:!1,private:!1,access:{has:i(we=>"editingIndex"in we,"has"),get:i(we=>we.editingIndex,"get"),set:i((we,Ne)=>{we.editingIndex=Ne},"set")},metadata:_e},Q,Z),Vr(this,null,me,{kind:"accessor",name:"editingValue",static:!1,private:!1,access:{has:i(we=>"editingValue"in we,"has"),get:i(we=>we.editingValue,"get"),set:i((we,Ne)=>{we.editingValue=Ne},"set")},metadata:_e},ae,re),Vr(this,null,ye,{kind:"accessor",name:"draggedIndex",static:!1,private:!1,access:{has:i(we=>"draggedIndex"in we,"has"),get:i(we=>we.draggedIndex,"get"),set:i((we,Ne)=>{we.draggedIndex=Ne},"set")},metadata:_e},V,q),Vr(this,null,oe,{kind:"accessor",name:"dragOverIndex",static:!1,private:!1,access:{has:i(we=>"dragOverIndex"in we,"has"),get:i(we=>we.dragOverIndex,"get"),set:i((we,Ne)=>{we.dragOverIndex=Ne},"set")},metadata:_e},se,te),Vr(this,null,Ce,{kind:"accessor",name:"dragStartY",static:!1,private:!1,access:{has:i(we=>"dragStartY"in we,"has"),get:i(we=>we.dragStartY,"get"),set:i((we,Ne)=>{we.dragStartY=Ne},"set")},metadata:_e},Fe,Ve),Vr(this,null,dt,{kind:"accessor",name:"dragCurrentY",static:!1,private:!1,access:{has:i(we=>"dragCurrentY"in we,"has"),get:i(we=>we.dragCurrentY,"get"),set:i((we,Ne)=>{we.dragCurrentY=Ne},"set")},metadata:_e},$e,ze),Vr(this,null,Me,{kind:"accessor",name:"targetIndex",static:!1,private:!1,access:{has:i(we=>"targetIndex"in we,"has"),get:i(we=>we.targetIndex,"get"),set:i((we,Ne)=>{we.targetIndex=Ne},"set")},metadata:_e},pe,be),Vr(this,null,Ae,{kind:"accessor",name:"itemHeight",static:!1,private:!1,access:{has:i(we=>"itemHeight"in we,"has"),get:i(we=>we.itemHeight,"get"),set:i((we,Ne)=>{we.itemHeight=Ne},"set")},metadata:_e},Ke,nt),Vr(null,e={value:r},t,{kind:"class",name:r.name,metadata:_e},null,a),_t=r=e.value,_e&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:_e})}static demo=Xoa;static demoGroups=["Input"];#e=Xt(this,n,[]);get value(){return this.#e}set value(_e){this.#e=_e}#t=(Xt(this,l),Xt(this,d,"Add new item..."));get placeholder(){return this.#t}set placeholder(_e){this.#t=_e}#a=(Xt(this,u),Xt(this,m,0));get maxItems(){return this.#a}set maxItems(_e){this.#a=_e}#r=(Xt(this,v),Xt(this,b,0));get minItems(){return this.#r}set minItems(_e){this.#r=_e}#i=(Xt(this,g),Xt(this,k,!1));get allowDuplicates(){return this.#i}set allowDuplicates(_e){this.#i=_e}#s=(Xt(this,C),Xt(this,T,!1));get sortable(){return this.#s}set sortable(_e){this.#s=_e}#o=(Xt(this,S),Xt(this,_,!1));get confirmDelete(){return this.#o}set confirmDelete(_e){this.#o=_e}#n=(Xt(this,I),Xt(this,M,[]));get candidates(){return this.#n}set candidates(_e){this.#n=_e}#l=(Xt(this,z),Xt(this,A,!1));get allowFreeform(){return this.#l}set allowFreeform(_e){this.#l=_e}#c=(Xt(this,F),Xt(this,j,""));get validationText(){return this.#c}set validationText(_e){this.#c=_e}addedCandidatesMap=(Xt(this,U),new Map);matchingCandidates=[];#d=Xt(this,B,"");get inputValue(){return this.#d}set inputValue(_e){this.#d=_e}#u=(Xt(this,J),Xt(this,P,""));get ghostText(){return this.#u}set ghostText(_e){this.#u=_e}#p=(Xt(this,H),Xt(this,ue,-1));get currentCandidateIndex(){return this.#p}set currentCandidateIndex(_e){this.#p=_e}#f=(Xt(this,Y),Xt(this,Q,-1));get editingIndex(){return this.#f}set editingIndex(_e){this.#f=_e}#h=(Xt(this,Z),Xt(this,ae,""));get editingValue(){return this.#h}set editingValue(_e){this.#h=_e}#m=(Xt(this,re),Xt(this,V,-1));get draggedIndex(){return this.#m}set draggedIndex(_e){this.#m=_e}#g=(Xt(this,q),Xt(this,se,-1));get dragOverIndex(){return this.#g}set dragOverIndex(_e){this.#g=_e}#b=(Xt(this,te),Xt(this,Fe,0));get dragStartY(){return this.#b}set dragStartY(_e){this.#b=_e}#v=(Xt(this,Ve),Xt(this,$e,0));get dragCurrentY(){return this.#v}set dragCurrentY(_e){this.#v=_e}#x=(Xt(this,ze),Xt(this,pe,-1));get targetIndex(){return this.#x}set targetIndex(_e){this.#x=_e}#y=(Xt(this,be),Xt(this,Ke,0));get itemHeight(){return this.#y}set itemHeight(_e){this.#y=_e}boundHandleGlobalDragOver=(Xt(this,nt),null);boundHandleGlobalDragEnd=null;originalItemRects=[];static styles=[Ie,...kt.baseStyles,h.defaultStyles,W`
10266
10266
  /* TODO: Migrate hardcoded values to --dees-* CSS variables */
10267
10267
  :host {
10268
10268
  display: block;
@@ -15263,7 +15263,7 @@ body > div[style*="top: -50000px"][style*="width: 50000px"] {
15263
15263
  width: 14px;
15264
15264
  height: 14px;
15265
15265
  }
15266
- `]});var gXe=f(()=>{_0()});var bXe=f(()=>{ite()});var vXe=f(()=>{xte();JGe()});var xXe=f(()=>{pYe()});function Sm(t,e){if(!e||e.length===0)return[];let a=t(e[0]);return Object.keys(a).map(s=>({key:s,header:s,value:i(o=>t(o)[s],"value")}))}function eW(t,e,a,r){let s=(t||[]).slice();if(!e)return s;let o=Sm(a,r),n=new Set(s.map(l=>String(l.key)));for(let l of o)n.has(String(l.key))||s.push(l);return s}function G0(t,e,a){return e.value?e.value(t):t[e.key]}function Wqa(t,e){if(t==null&&e==null)return 0;if(t==null)return-1;if(e==null)return 1;if(typeof t=="number"&&typeof e=="number")return t<e?-1:t>e?1:0;let a=String(t).toLowerCase(),r=String(e).toLowerCase();return a<r?-1:a>r?1:0}function a0a(t,e,a,r,s,o="table",n){let l=t.slice(),c=(r||"").trim().toLowerCase(),d=s||{},u=Object.keys(d).filter(m=>(d[m]??"").trim().length>0);if((c||u.length>0)&&(l=l.filter(m=>{for(let v of u)if(o==="data"){let x=m[v],b=String(x??"").toLowerCase(),g=String(d[v]).toLowerCase();if(!b.includes(g))return!1}else{let x=e.find(k=>String(k.key)===v);if(!x||x.hidden||x.filterable===!1)continue;let b=G0(m,x),g=String(b??"").toLowerCase(),y=String(d[v]).toLowerCase();if(!g.includes(y))return!1}if(c){if(n)return!!n(m);let v=!1;if(o==="data"){for(let x of Object.values(m))if(String(x??"").toLowerCase().includes(c)){v=!0;break}}else for(let x of e){if(x.hidden)continue;let b=G0(m,x);if(String(b??"").toLowerCase().includes(c)){v=!0;break}}if(!v)return!1}return!0})),!a||a.length===0)return l;let p=a.map(m=>({desc:m,col:e.find(v=>String(v.key)===m.key)})).filter(m=>!!m.col);return p.length===0||l.sort((m,v)=>{for(let{desc:x,col:b}of p){let g=Wqa(G0(m,b),G0(v,b));if(g!==0)return x.dir==="asc"?g:-g}return 0}),l}var r0a=f(()=>{i(Sm,"computeColumnsFromDisplayFunction");i(eW,"computeEffectiveColumns");i(G0,"getCellValue");i(Wqa,"compareCellValues");i(a0a,"getViewData")});function Kre(t){return t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?t.slice(1,-1):t}function Gqa(t){return t.split(/\s+OR\s+/i).map(e=>e.trim()).filter(Boolean)}function Yqa(t){return t.split(/\s+AND\s+/i).map(e=>e.trim()).filter(Boolean)}function Kqa(t){if(!t)return null;let e=!1,a=t.match(/^\s*(NOT\s+|-)\s*(.*)$/i);a&&(e=!0,t=a[2]);let r=t.match(/^([^:\s]+)\s*:\s*\[(.*?)\s+TO\s+(.*?)\]$/i);if(r)return{field:r[1],negate:e,range:{lower:Kre(r[2]).toLowerCase(),upper:Kre(r[3]).toLowerCase(),inclusive:!0}};let s=t.match(/^([^:\s]+)\s*:\s*("[^"]*"|'[^']*'|[^"'\s]+)$/);return s?{field:s[1],value:Kre(s[2]).toLowerCase(),negate:e}:t.length>0?{value:Kre(t).toLowerCase(),negate:e}:null}function Zqa(t){if(!t)return null;let e=Gqa(t).map(a=>({terms:Yqa(a).map(Kqa).filter(s=>!!s&&!!s.value)})).filter(a=>a.terms.length>0);return e.length===0?null:{clauses:e}}function i0a(t,e,a){let r=Zqa(t);if(!r)return null;let s=new Map(a.map(c=>[String(c.key),c])),o=i((c,d)=>c<d?-1:c>d?1:0,"cmp"),n=i(c=>{let d=String(c??"").toLowerCase(),u=Number(d),p=Date.parse(d);return!Number.isNaN(u)&&d.trim()!==""?{t:"n",v:u}:Number.isNaN(p)?{t:"s",v:d}:{t:"d",v:p}},"coerce"),l=i((c,d,u)=>{let p=n(c),m=n(d),v=n(u);if(p.t==="s"&&m.t==="s"&&v.t==="s"){let b=p.v;return o(b,m.v)>=0&&o(b,v.v)<=0}if(p.t==="n"&&m.t==="n"&&v.t==="n"){let b=p.v;return b>=m.v&&b<=v.v}if(p.t==="d"&&m.t==="d"&&v.t==="d"){let b=p.v;return b>=m.v&&b<=v.v}let x=String(c??"").toLowerCase();return o(x,d)>=0&&o(x,u)<=0},"inRange");return c=>{for(let d of r.clauses){let u=!0;for(let p of d.terms){let m=!1;if(p.range&&p.field)if(e==="data")m=l(c[p.field],p.range.lower,p.range.upper);else{let v=s.get(p.field);if(!v||v.hidden)m=!1;else{let x=v.value?v.value(c):c[v.key];m=l(x,p.range.lower,p.range.upper)}}else if(p.field&&p.value!=null)if(e==="data")m=String(c[p.field]??"").toLowerCase().includes(p.value);else{let v=s.get(p.field);if(!v||v.hidden===!0)m=!1;else{let x=v.value?v.value(c):c[v.key];m=String(x??"").toLowerCase().includes(p.value)}}else p.value!=null&&(e==="data"?m=Object.values(c).some(v=>String(v??"").toLowerCase().includes(p.value)):m=a.some(v=>{if(v.hidden)return!1;let x=v.value?v.value(c):c[v.key];return String(x??"").toLowerCase().includes(p.value)}));if(p.negate&&(m=!m),!m){u=!1;break}}if(u)return!0}return!1}}var s0a=f(()=>{i(Kre,"stripQuotes");i(Gqa,"splitByOr");i(Yqa,"splitByAnd");i(Kqa,"parseTerm");i(Zqa,"parseLucene");i(i0a,"compileLucenePredicate")});function Xqa(t){let e=["th","st","nd","rd"],a=t%100;return t+(e[(a-20)%10]||e[a]||e[0])}var fa,st,Zre,mXe=f(()=>{Li();Jca();le();Qr();Il();ea();ba();t0a();gXe();bXe();vXe();ute();xXe();r0a();s0a();tt();Jr();fa=function(t,e,a,r,s,o){function n(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}i(n,"accept");for(var l=r.kind,c=l==="getter"?"get":l==="setter"?"set":"value",d=!e&&t?r.static?t:t.prototype:null,u=e||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p,m=!1,v=a.length-1;v>=0;v--){var x={};for(var b in r)x[b]=b==="access"?{}:r[b];for(var b in r.access)x.access[b]=r.access[b];x.addInitializer=function(y){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(n(y||null))};var g=(0,a[v])(l==="accessor"?{get:u.get,set:u.set}:u[c],x);if(l==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(p=n(g.get))&&(u.get=p),(p=n(g.set))&&(u.set=p),(p=n(g.init))&&s.unshift(p)}else(p=n(g))&&(l==="field"?s.unshift(p):u[c]=p)}d&&Object.defineProperty(d,r.name,u),m=!0},st=function(t,e,a){for(var r=arguments.length>2,s=0;s<e.length;s++)a=r?e[s].call(t,a):e[s].call(t);return r?a:void 0};i(Xqa,"ordinalLabel");Zre=(()=>{let t=[ie("dees-table")],e,a=[],r,s=ne,o,n=[],l=[],c,d=[],u=[],p,m=[],v=[],x,b=[],g=[],y,k=[],C=[],R,T=[],S=[],N,_=[],I=[],O,M=[],z=[],E,A=[],F=[],K,j=[],U=[],he,B=[],J=[],ve,P=[],H=[],de,ue=[],Y=[],X,Q=[],Z=[],me,ae=[],re=[],ye,V=[],q=[],oe,se=[],te=[],Ce,Fe=[],Ve=[],dt,$e=[],ze=[],Me,pe=[],be=[],Ae,Ze=[],nt=[],_t,_e=[],we=[],Ne,fe=[],ge=[],Pe,bt=[],vt=[],Ft,Ja=[],tr=[],gi,Ue=[],mt=[],er,Sr=[],Ar=[],Wr,Ir=[],go=[],bo,Le=[],Se=[],Be,oa=[],bi=[],O2,xe=[],ce=[],Te,We=[],Ct=[],vi,Gr=[],Bs=[],Nn,I1=[],B2=[],Rn,D4=[],u7=[],p7,f7=[],h7=[],m7,g7=[],b7=[];var v7=class extends s{static{i(this,"DeesTable")}static{r=this}static{let D=typeof Symbol=="function"&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;o=[$({type:String})],c=[$({type:String})],p=[$({type:Array})],x=[$({type:String})],y=[$({type:String})],R=[$({type:Boolean})],N=[$({type:Boolean})],O=[$({type:String,reflect:!0})],E=[$({type:Boolean})],K=[$({type:Array})],he=[$({attribute:!1})],ve=[$({attribute:!1})],de=[$({type:Boolean})],X=[$({attribute:!1})],me=[$({attribute:!1})],ye=[$({type:Object})],oe=[$({type:Boolean,reflect:!0,attribute:"show-vertical-lines"})],Ce=[$({type:Boolean,reflect:!0,attribute:"show-horizontal-lines"})],dt=[$({type:Boolean,reflect:!0,attribute:"show-grid"})],Me=[$({attribute:!1})],Ae=[$({type:String})],_t=[$({attribute:!1})],Ne=[$({type:Boolean,attribute:"show-column-filters"})],Pe=[$({type:Boolean,reflect:!0,attribute:"show-selection-checkbox"})],Ft=[$({type:Boolean,reflect:!0,attribute:"virtualized"})],gi=[$({type:Number,attribute:"virtual-overscan"})],er=[$({type:String,attribute:"highlight-updates"})],Wr=[$({type:Number,attribute:"highlight-duration"})],bo=[$({type:Boolean,reflect:!0,attribute:"fixed-height"})],Be=[$({type:String})],O2=[$({type:String})],Te=[$({attribute:!1})],vi=[G()],Nn=[G()],Rn=[G()],p7=[G()],m7=[G()],fa(this,null,o,{kind:"accessor",name:"heading1",static:!1,private:!1,access:{has:i(L=>"heading1"in L,"has"),get:i(L=>L.heading1,"get"),set:i((L,ee)=>{L.heading1=ee},"set")},metadata:D},n,l),fa(this,null,c,{kind:"accessor",name:"heading2",static:!1,private:!1,access:{has:i(L=>"heading2"in L,"has"),get:i(L=>L.heading2,"get"),set:i((L,ee)=>{L.heading2=ee},"set")},metadata:D},d,u),fa(this,null,p,{kind:"accessor",name:"data",static:!1,private:!1,access:{has:i(L=>"data"in L,"has"),get:i(L=>L.data,"get"),set:i((L,ee)=>{L.data=ee},"set")},metadata:D},m,v),fa(this,null,x,{kind:"accessor",name:"key",static:!1,private:!1,access:{has:i(L=>"key"in L,"has"),get:i(L=>L.key,"get"),set:i((L,ee)=>{L.key=ee},"set")},metadata:D},b,g),fa(this,null,y,{kind:"accessor",name:"label",static:!1,private:!1,access:{has:i(L=>"label"in L,"has"),get:i(L=>L.label,"get"),set:i((L,ee)=>{L.label=ee},"set")},metadata:D},k,C),fa(this,null,R,{kind:"accessor",name:"disabled",static:!1,private:!1,access:{has:i(L=>"disabled"in L,"has"),get:i(L=>L.disabled,"get"),set:i((L,ee)=>{L.disabled=ee},"set")},metadata:D},T,S),fa(this,null,N,{kind:"accessor",name:"required",static:!1,private:!1,access:{has:i(L=>"required"in L,"has"),get:i(L=>L.required,"get"),set:i((L,ee)=>{L.required=ee},"set")},metadata:D},_,I),fa(this,null,O,{kind:"accessor",name:"dataName",static:!1,private:!1,access:{has:i(L=>"dataName"in L,"has"),get:i(L=>L.dataName,"get"),set:i((L,ee)=>{L.dataName=ee},"set")},metadata:D},M,z),fa(this,null,E,{kind:"accessor",name:"searchable",static:!1,private:!1,access:{has:i(L=>"searchable"in L,"has"),get:i(L=>L.searchable,"get"),set:i((L,ee)=>{L.searchable=ee},"set")},metadata:D},A,F),fa(this,null,K,{kind:"accessor",name:"dataActions",static:!1,private:!1,access:{has:i(L=>"dataActions"in L,"has"),get:i(L=>L.dataActions,"get"),set:i((L,ee)=>{L.dataActions=ee},"set")},metadata:D},j,U),fa(this,null,he,{kind:"accessor",name:"columns",static:!1,private:!1,access:{has:i(L=>"columns"in L,"has"),get:i(L=>L.columns,"get"),set:i((L,ee)=>{L.columns=ee},"set")},metadata:D},B,J),fa(this,null,ve,{kind:"accessor",name:"rowKey",static:!1,private:!1,access:{has:i(L=>"rowKey"in L,"has"),get:i(L=>L.rowKey,"get"),set:i((L,ee)=>{L.rowKey=ee},"set")},metadata:D},P,H),fa(this,null,de,{kind:"accessor",name:"augmentFromDisplayFunction",static:!1,private:!1,access:{has:i(L=>"augmentFromDisplayFunction"in L,"has"),get:i(L=>L.augmentFromDisplayFunction,"get"),set:i((L,ee)=>{L.augmentFromDisplayFunction=ee},"set")},metadata:D},ue,Y),fa(this,null,X,{kind:"accessor",name:"displayFunction",static:!1,private:!1,access:{has:i(L=>"displayFunction"in L,"has"),get:i(L=>L.displayFunction,"get"),set:i((L,ee)=>{L.displayFunction=ee},"set")},metadata:D},Q,Z),fa(this,null,me,{kind:"accessor",name:"reverseDisplayFunction",static:!1,private:!1,access:{has:i(L=>"reverseDisplayFunction"in L,"has"),get:i(L=>L.reverseDisplayFunction,"get"),set:i((L,ee)=>{L.reverseDisplayFunction=ee},"set")},metadata:D},ae,re),fa(this,null,ye,{kind:"accessor",name:"selectedDataRow",static:!1,private:!1,access:{has:i(L=>"selectedDataRow"in L,"has"),get:i(L=>L.selectedDataRow,"get"),set:i((L,ee)=>{L.selectedDataRow=ee},"set")},metadata:D},V,q),fa(this,null,oe,{kind:"accessor",name:"showVerticalLines",static:!1,private:!1,access:{has:i(L=>"showVerticalLines"in L,"has"),get:i(L=>L.showVerticalLines,"get"),set:i((L,ee)=>{L.showVerticalLines=ee},"set")},metadata:D},se,te),fa(this,null,Ce,{kind:"accessor",name:"showHorizontalLines",static:!1,private:!1,access:{has:i(L=>"showHorizontalLines"in L,"has"),get:i(L=>L.showHorizontalLines,"get"),set:i((L,ee)=>{L.showHorizontalLines=ee},"set")},metadata:D},Fe,Ve),fa(this,null,dt,{kind:"accessor",name:"showGrid",static:!1,private:!1,access:{has:i(L=>"showGrid"in L,"has"),get:i(L=>L.showGrid,"get"),set:i((L,ee)=>{L.showGrid=ee},"set")},metadata:D},$e,ze),fa(this,null,Me,{kind:"accessor",name:"sortBy",static:!1,private:!1,access:{has:i(L=>"sortBy"in L,"has"),get:i(L=>L.sortBy,"get"),set:i((L,ee)=>{L.sortBy=ee},"set")},metadata:D},pe,be),fa(this,null,Ae,{kind:"accessor",name:"filterText",static:!1,private:!1,access:{has:i(L=>"filterText"in L,"has"),get:i(L=>L.filterText,"get"),set:i((L,ee)=>{L.filterText=ee},"set")},metadata:D},Ze,nt),fa(this,null,_t,{kind:"accessor",name:"columnFilters",static:!1,private:!1,access:{has:i(L=>"columnFilters"in L,"has"),get:i(L=>L.columnFilters,"get"),set:i((L,ee)=>{L.columnFilters=ee},"set")},metadata:D},_e,we),fa(this,null,Ne,{kind:"accessor",name:"showColumnFilters",static:!1,private:!1,access:{has:i(L=>"showColumnFilters"in L,"has"),get:i(L=>L.showColumnFilters,"get"),set:i((L,ee)=>{L.showColumnFilters=ee},"set")},metadata:D},fe,ge),fa(this,null,Pe,{kind:"accessor",name:"showSelectionCheckbox",static:!1,private:!1,access:{has:i(L=>"showSelectionCheckbox"in L,"has"),get:i(L=>L.showSelectionCheckbox,"get"),set:i((L,ee)=>{L.showSelectionCheckbox=ee},"set")},metadata:D},bt,vt),fa(this,null,Ft,{kind:"accessor",name:"virtualized",static:!1,private:!1,access:{has:i(L=>"virtualized"in L,"has"),get:i(L=>L.virtualized,"get"),set:i((L,ee)=>{L.virtualized=ee},"set")},metadata:D},Ja,tr),fa(this,null,gi,{kind:"accessor",name:"virtualOverscan",static:!1,private:!1,access:{has:i(L=>"virtualOverscan"in L,"has"),get:i(L=>L.virtualOverscan,"get"),set:i((L,ee)=>{L.virtualOverscan=ee},"set")},metadata:D},Ue,mt),fa(this,null,er,{kind:"accessor",name:"highlightUpdates",static:!1,private:!1,access:{has:i(L=>"highlightUpdates"in L,"has"),get:i(L=>L.highlightUpdates,"get"),set:i((L,ee)=>{L.highlightUpdates=ee},"set")},metadata:D},Sr,Ar),fa(this,null,Wr,{kind:"accessor",name:"highlightDuration",static:!1,private:!1,access:{has:i(L=>"highlightDuration"in L,"has"),get:i(L=>L.highlightDuration,"get"),set:i((L,ee)=>{L.highlightDuration=ee},"set")},metadata:D},Ir,go),fa(this,null,bo,{kind:"accessor",name:"fixedHeight",static:!1,private:!1,access:{has:i(L=>"fixedHeight"in L,"has"),get:i(L=>L.fixedHeight,"get"),set:i((L,ee)=>{L.fixedHeight=ee},"set")},metadata:D},Le,Se),fa(this,null,Be,{kind:"accessor",name:"searchMode",static:!1,private:!1,access:{has:i(L=>"searchMode"in L,"has"),get:i(L=>L.searchMode,"get"),set:i((L,ee)=>{L.searchMode=ee},"set")},metadata:D},oa,bi),fa(this,null,O2,{kind:"accessor",name:"selectionMode",static:!1,private:!1,access:{has:i(L=>"selectionMode"in L,"has"),get:i(L=>L.selectionMode,"get"),set:i((L,ee)=>{L.selectionMode=ee},"set")},metadata:D},xe,ce),fa(this,null,Te,{kind:"accessor",name:"selectedIds",static:!1,private:!1,access:{has:i(L=>"selectedIds"in L,"has"),get:i(L=>L.selectedIds,"get"),set:i((L,ee)=>{L.selectedIds=ee},"set")},metadata:D},We,Ct),fa(this,null,vi,{kind:"accessor",name:"__focusedCell",static:!1,private:!1,access:{has:i(L=>"__focusedCell"in L,"has"),get:i(L=>L.__focusedCell,"get"),set:i((L,ee)=>{L.__focusedCell=ee},"set")},metadata:D},Gr,Bs),fa(this,null,Nn,{kind:"accessor",name:"__editingCell",static:!1,private:!1,access:{has:i(L=>"__editingCell"in L,"has"),get:i(L=>L.__editingCell,"get"),set:i((L,ee)=>{L.__editingCell=ee},"set")},metadata:D},I1,B2),fa(this,null,Rn,{kind:"accessor",name:"__floatingActive",static:!1,private:!1,access:{has:i(L=>"__floatingActive"in L,"has"),get:i(L=>L.__floatingActive,"get"),set:i((L,ee)=>{L.__floatingActive=ee},"set")},metadata:D},D4,u7),fa(this,null,p7,{kind:"accessor",name:"__flashingCells",static:!1,private:!1,access:{has:i(L=>"__flashingCells"in L,"has"),get:i(L=>L.__flashingCells,"get"),set:i((L,ee)=>{L.__flashingCells=ee},"set")},metadata:D},f7,h7),fa(this,null,m7,{kind:"accessor",name:"__virtualRange",static:!1,private:!1,access:{has:i(L=>"__virtualRange"in L,"has"),get:i(L=>L.__virtualRange,"get"),set:i((L,ee)=>{L.__virtualRange=ee},"set")},metadata:D},g7,b7),fa(null,e={value:r},t,{kind:"class",name:r.name,metadata:D},null,a),v7=r=e.value,D&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:D})}static demo=Qca;static demoGroups=["Data View"];#e=st(this,n,"heading 1");get heading1(){return this.#e}set heading1(D){this.#e=D}#t=(st(this,l),st(this,d,"heading 2"));get heading2(){return this.#t}set heading2(D){this.#t=D}#a=(st(this,u),st(this,m,[]));get data(){return this.#a}set data(D){this.#a=D}#r=(st(this,v),st(this,b,void 0));get key(){return this.#r}set key(D){this.#r=D}#i=(st(this,g),st(this,k,void 0));get label(){return this.#i}set label(D){this.#i=D}#s=(st(this,C),st(this,T,!1));get disabled(){return this.#s}set disabled(D){this.#s=D}#o=(st(this,S),st(this,_,!1));get required(){return this.#o}set required(D){this.#o=D}get value(){return this.data}set value(D){}changeSubject=(st(this,I),new jt.smartrx.rxjs.Subject);#n=st(this,M,void 0);get dataName(){return this.#n}set dataName(D){this.#n=D}#l=(st(this,z),st(this,A,!0));get searchable(){return this.#l}set searchable(D){this.#l=D}#c=(st(this,F),st(this,j,[]));get dataActions(){return this.#c}set dataActions(D){this.#c=D}#d=(st(this,U),st(this,B,[]));get columns(){return this.#d}set columns(D){this.#d=D}#u=(st(this,J),st(this,P,void 0));get rowKey(){return this.#u}set rowKey(D){this.#u=D}#p=(st(this,H),st(this,ue,!1));get augmentFromDisplayFunction(){return this.#p}set augmentFromDisplayFunction(D){this.#p=D}#f=(st(this,Y),st(this,Q,D=>D));get displayFunction(){return this.#f}set displayFunction(D){this.#f=D}#h=(st(this,Z),st(this,ae,D=>D));get reverseDisplayFunction(){return this.#h}set reverseDisplayFunction(D){this.#h=D}#m=(st(this,re),st(this,V,void 0));get selectedDataRow(){return this.#m}set selectedDataRow(D){this.#m=D}#g=(st(this,q),st(this,se,!1));get showVerticalLines(){return this.#g}set showVerticalLines(D){this.#g=D}#b=(st(this,te),st(this,Fe,!1));get showHorizontalLines(){return this.#b}set showHorizontalLines(D){this.#b=D}#v=(st(this,Ve),st(this,$e,!0));get showGrid(){return this.#v}set showGrid(D){this.#v=D}files=(st(this,ze),[]);fileWeakMap=new WeakMap;dataChangeSubject=new jt.smartrx.rxjs.Subject;#x=st(this,pe,[]);get sortBy(){return this.#x}set sortBy(D){this.#x=D}#y=(st(this,be),st(this,Ze,""));get filterText(){return this.#y}set filterText(D){this.#y=D}#w=(st(this,nt),st(this,_e,{}));get columnFilters(){return this.#w}set columnFilters(D){this.#w=D}#M=(st(this,we),st(this,fe,!1));get showColumnFilters(){return this.#M}set showColumnFilters(D){this.#M=D}#k=(st(this,ge),st(this,bt,!1));get showSelectionCheckbox(){return this.#k}set showSelectionCheckbox(D){this.#k=D}#S=(st(this,vt),st(this,Ja,!1));get virtualized(){return this.#S}set virtualized(D){this.#S=D}#C=(st(this,tr),st(this,Ue,8));get virtualOverscan(){return this.#C}set virtualOverscan(D){this.#C=D}#z=(st(this,mt),st(this,Sr,"none"));get highlightUpdates(){return this.#z}set highlightUpdates(D){this.#z=D}#T=(st(this,Ar),st(this,Ir,900));get highlightDuration(){return this.#T}set highlightDuration(D){this.#T=D}#_=(st(this,go),st(this,Le,!1));get fixedHeight(){return this.#_}set fixedHeight(D){this.#_=D}#L=(st(this,Se),st(this,oa,"table"));get searchMode(){return this.#L}set searchMode(D){this.#L=D}__searchTextSub=st(this,bi);__searchModeSub;#$=st(this,xe,"none");get selectionMode(){return this.#$}set selectionMode(D){this.#$=D}#D=(st(this,ce),st(this,We,new Set));get selectedIds(){return this.#D}set selectedIds(D){this.#D=D}_rowIdMap=(st(this,Ct),new WeakMap);_rowIdCounter=0;__selectionAnchorId;#A=st(this,Gr,void 0);get __focusedCell(){return this.#A}set __focusedCell(D){this.#A=D}#I=(st(this,Bs),st(this,I1,void 0));get __editingCell(){return this.#I}set __editingCell(D){this.#I=D}#P=(st(this,B2),st(this,D4,!1));get __floatingActive(){return this.#P}set __floatingActive(D){this.#P=D}#E=(st(this,u7),st(this,f7,new Map));get __flashingCells(){return this.#E}set __flashingCells(D){this.#E=D}__prevSnapshot=st(this,h7);__flashClearTimer;__flashTick=0;__flashWarnedNoRowKey=!1;__memoEffectiveCols;__memoViewData;__columnsSizedFor;__rowHeight=36;__rowHeightMeasured=!1;#N=st(this,g7,{start:0,end:0});get __virtualRange(){return this.#N}set __virtualRange(D){this.#N=D}constructor(){super(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.addEventListener("keydown",this.__handleHostKeydown)}__handleHostKeydown=(st(this,b7),D=>{let L=D.composedPath?.()||[],ee=!1;for(let Re of L){let Xe=Re?.tagName;if(Xe==="INPUT"||Xe==="TEXTAREA"||Re?.isContentEditable){ee=!0;break}}if((D.metaKey||D.ctrlKey)&&(D.key==="c"||D.key==="C")){if(ee)return;let Re=[];if(this.selectedIds.size>0)for(let Xe of this.data)this.selectedIds.has(this.getRowId(Xe))&&Re.push(Xe);else this.selectedDataRow&&Re.push(this.selectedDataRow);if(Re.length===0)return;D.preventDefault(),this.__writeRowsAsJson(Re);return}if(!(ee||this.__editingCell))switch(D.key){case"ArrowLeft":D.preventDefault(),this.moveFocusedCell(-1,0,!1);return;case"ArrowRight":D.preventDefault(),this.moveFocusedCell(1,0,!1);return;case"ArrowUp":D.preventDefault(),this.moveFocusedCell(0,-1,!1);return;case"ArrowDown":D.preventDefault(),this.moveFocusedCell(0,1,!1);return;case"Enter":case"F2":{if(!this.__focusedCell)return;let Xe=(this._lastViewData??[]).find(et=>this.getRowId(et)===this.__focusedCell.rowId);if(!Xe)return;let He=(Array.isArray(this.columns)&&this.columns.length>0?eW(this.columns,this.augmentFromDisplayFunction,this.displayFunction,this.data):Sm(this.displayFunction,this.data)).find(et=>String(et.key)===this.__focusedCell.colKey);if(!He||!this.__isColumnEditable(He))return;D.preventDefault(),this.startEditing(Xe,He);return}case"Escape":this.__focusedCell&&(this.__focusedCell=void 0,this.requestUpdate());return;default:return}});copySelectionAsJson(D){let L=[];if(this.selectedIds.size>0)for(let ee of this.data)this.selectedIds.has(this.getRowId(ee))&&L.push(ee);else D?L.push(D):this.selectedDataRow&&L.push(this.selectedDataRow);L.length!==0&&this.__writeRowsAsJson(L)}__writeRowsAsJson(D){try{let L=JSON.stringify(D,null,2);navigator.clipboard?.writeText(L)}catch{}}static styles=e0a;__getEffectiveColumns(){let D=Array.isArray(this.columns)&&this.columns.length>0,L=this.__memoEffectiveCols;if(L&&L.columns===this.columns&&L.augment===this.augmentFromDisplayFunction&&L.displayFunction===this.displayFunction&&L.data===this.data)return L.out;let ee=D?eW(this.columns,this.augmentFromDisplayFunction,this.displayFunction,this.data):Sm(this.displayFunction,this.data);return this.__memoEffectiveCols={columns:this.columns,augment:this.augmentFromDisplayFunction,displayFunction:this.displayFunction,data:this.data,out:ee},ee}__getViewData(D){let L=this.searchMode==="data"?"data":"table",ee=this.__memoViewData;if(ee&&ee.data===this.data&&ee.sortBy===this.sortBy&&ee.filterText===this.filterText&&ee.columnFilters===this.columnFilters&&ee.searchMode===L&&ee.effectiveColumns===D)return ee.out;let De=i0a(this.filterText,L,D),Re=a0a(this.data,D,this.sortBy,this.filterText,this.columnFilters,L,De||void 0);return this.__memoViewData={data:this.data,sortBy:this.sortBy,filterText:this.filterText,columnFilters:this.columnFilters,searchMode:L,effectiveColumns:D,out:Re},Re}render(){let D=this.__getEffectiveColumns(),L=this.__getViewData(D);this._lastViewData=L;let ee=this.virtualized&&L.length>0,De=L,Re=0,Xe=0,ct=0;if(ee){let He=this.__virtualRange,et=Math.max(0,He.start),xa=Math.min(L.length,He.end||0),Da=xa>0?xa:Math.min(L.length,this.virtualOverscan*2+16);Re=et,De=L.slice(et,Da),Xe=et*this.__rowHeight,ct=Math.max(0,L.length-Da)*this.__rowHeight}return w`
15266
+ `]});var gXe=f(()=>{_0()});var bXe=f(()=>{ite()});var vXe=f(()=>{xte();JGe()});var xXe=f(()=>{pYe()});function Sm(t,e){if(!e||e.length===0)return[];let a=t(e[0]);return Object.keys(a).map(s=>({key:s,header:s,value:i(o=>t(o)[s],"value")}))}function eW(t,e,a,r){let s=(t||[]).slice();if(!e)return s;let o=Sm(a,r),n=new Set(s.map(l=>String(l.key)));for(let l of o)n.has(String(l.key))||s.push(l);return s}function G0(t,e,a){return e.value?e.value(t):t[e.key]}function Wqa(t,e){if(t==null&&e==null)return 0;if(t==null)return-1;if(e==null)return 1;if(typeof t=="number"&&typeof e=="number")return t<e?-1:t>e?1:0;let a=String(t).toLowerCase(),r=String(e).toLowerCase();return a<r?-1:a>r?1:0}function a0a(t,e,a,r,s,o="table",n){let l=t.slice(),c=(r||"").trim().toLowerCase(),d=s||{},u=Object.keys(d).filter(m=>(d[m]??"").trim().length>0);if((c||u.length>0)&&(l=l.filter(m=>{for(let v of u)if(o==="data"){let x=m[v],b=String(x??"").toLowerCase(),g=String(d[v]).toLowerCase();if(!b.includes(g))return!1}else{let x=e.find(k=>String(k.key)===v);if(!x||x.hidden||x.filterable===!1)continue;let b=G0(m,x),g=String(b??"").toLowerCase(),y=String(d[v]).toLowerCase();if(!g.includes(y))return!1}if(c){if(n)return!!n(m);let v=!1;if(o==="data"){for(let x of Object.values(m))if(String(x??"").toLowerCase().includes(c)){v=!0;break}}else for(let x of e){if(x.hidden)continue;let b=G0(m,x);if(String(b??"").toLowerCase().includes(c)){v=!0;break}}if(!v)return!1}return!0})),!a||a.length===0)return l;let p=a.map(m=>({desc:m,col:e.find(v=>String(v.key)===m.key)})).filter(m=>!!m.col);return p.length===0||l.sort((m,v)=>{for(let{desc:x,col:b}of p){let g=Wqa(G0(m,b),G0(v,b));if(g!==0)return x.dir==="asc"?g:-g}return 0}),l}var r0a=f(()=>{i(Sm,"computeColumnsFromDisplayFunction");i(eW,"computeEffectiveColumns");i(G0,"getCellValue");i(Wqa,"compareCellValues");i(a0a,"getViewData")});function Kre(t){return t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?t.slice(1,-1):t}function Gqa(t){return t.split(/\s+OR\s+/i).map(e=>e.trim()).filter(Boolean)}function Yqa(t){return t.split(/\s+AND\s+/i).map(e=>e.trim()).filter(Boolean)}function Kqa(t){if(!t)return null;let e=!1,a=t.match(/^\s*(NOT\s+|-)\s*(.*)$/i);a&&(e=!0,t=a[2]);let r=t.match(/^([^:\s]+)\s*:\s*\[(.*?)\s+TO\s+(.*?)\]$/i);if(r)return{field:r[1],negate:e,range:{lower:Kre(r[2]).toLowerCase(),upper:Kre(r[3]).toLowerCase(),inclusive:!0}};let s=t.match(/^([^:\s]+)\s*:\s*("[^"]*"|'[^']*'|[^"'\s]+)$/);return s?{field:s[1],value:Kre(s[2]).toLowerCase(),negate:e}:t.length>0?{value:Kre(t).toLowerCase(),negate:e}:null}function Zqa(t){if(!t)return null;let e=Gqa(t).map(a=>({terms:Yqa(a).map(Kqa).filter(s=>!!s&&!!s.value)})).filter(a=>a.terms.length>0);return e.length===0?null:{clauses:e}}function i0a(t,e,a){let r=Zqa(t);if(!r)return null;let s=new Map(a.map(c=>[String(c.key),c])),o=i((c,d)=>c<d?-1:c>d?1:0,"cmp"),n=i(c=>{let d=String(c??"").toLowerCase(),u=Number(d),p=Date.parse(d);return!Number.isNaN(u)&&d.trim()!==""?{t:"n",v:u}:Number.isNaN(p)?{t:"s",v:d}:{t:"d",v:p}},"coerce"),l=i((c,d,u)=>{let p=n(c),m=n(d),v=n(u);if(p.t==="s"&&m.t==="s"&&v.t==="s"){let b=p.v;return o(b,m.v)>=0&&o(b,v.v)<=0}if(p.t==="n"&&m.t==="n"&&v.t==="n"){let b=p.v;return b>=m.v&&b<=v.v}if(p.t==="d"&&m.t==="d"&&v.t==="d"){let b=p.v;return b>=m.v&&b<=v.v}let x=String(c??"").toLowerCase();return o(x,d)>=0&&o(x,u)<=0},"inRange");return c=>{for(let d of r.clauses){let u=!0;for(let p of d.terms){let m=!1;if(p.range&&p.field)if(e==="data")m=l(c[p.field],p.range.lower,p.range.upper);else{let v=s.get(p.field);if(!v||v.hidden)m=!1;else{let x=v.value?v.value(c):c[v.key];m=l(x,p.range.lower,p.range.upper)}}else if(p.field&&p.value!=null)if(e==="data")m=String(c[p.field]??"").toLowerCase().includes(p.value);else{let v=s.get(p.field);if(!v||v.hidden===!0)m=!1;else{let x=v.value?v.value(c):c[v.key];m=String(x??"").toLowerCase().includes(p.value)}}else p.value!=null&&(e==="data"?m=Object.values(c).some(v=>String(v??"").toLowerCase().includes(p.value)):m=a.some(v=>{if(v.hidden)return!1;let x=v.value?v.value(c):c[v.key];return String(x??"").toLowerCase().includes(p.value)}));if(p.negate&&(m=!m),!m){u=!1;break}}if(u)return!0}return!1}}var s0a=f(()=>{i(Kre,"stripQuotes");i(Gqa,"splitByOr");i(Yqa,"splitByAnd");i(Kqa,"parseTerm");i(Zqa,"parseLucene");i(i0a,"compileLucenePredicate")});function Xqa(t){let e=["th","st","nd","rd"],a=t%100;return t+(e[(a-20)%10]||e[a]||e[0])}var fa,st,Zre,mXe=f(()=>{Li();Jca();le();Qr();Il();ea();ba();t0a();gXe();bXe();vXe();ute();xXe();r0a();s0a();tt();Jr();fa=function(t,e,a,r,s,o){function n(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}i(n,"accept");for(var l=r.kind,c=l==="getter"?"get":l==="setter"?"set":"value",d=!e&&t?r.static?t:t.prototype:null,u=e||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p,m=!1,v=a.length-1;v>=0;v--){var x={};for(var b in r)x[b]=b==="access"?{}:r[b];for(var b in r.access)x.access[b]=r.access[b];x.addInitializer=function(y){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(n(y||null))};var g=(0,a[v])(l==="accessor"?{get:u.get,set:u.set}:u[c],x);if(l==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(p=n(g.get))&&(u.get=p),(p=n(g.set))&&(u.set=p),(p=n(g.init))&&s.unshift(p)}else(p=n(g))&&(l==="field"?s.unshift(p):u[c]=p)}d&&Object.defineProperty(d,r.name,u),m=!0},st=function(t,e,a){for(var r=arguments.length>2,s=0;s<e.length;s++)a=r?e[s].call(t,a):e[s].call(t);return r?a:void 0};i(Xqa,"ordinalLabel");Zre=(()=>{let t=[ie("dees-table")],e,a=[],r,s=ne,o,n=[],l=[],c,d=[],u=[],p,m=[],v=[],x,b=[],g=[],y,k=[],C=[],R,T=[],S=[],N,_=[],I=[],O,M=[],z=[],E,A=[],F=[],K,j=[],U=[],he,B=[],J=[],ve,P=[],H=[],de,ue=[],Y=[],X,Q=[],Z=[],me,ae=[],re=[],ye,V=[],q=[],oe,se=[],te=[],Ce,Fe=[],Ve=[],dt,$e=[],ze=[],Me,pe=[],be=[],Ae,Ke=[],nt=[],_t,_e=[],we=[],Ne,fe=[],ge=[],Pe,bt=[],vt=[],Ft,Ja=[],tr=[],gi,Ue=[],mt=[],er,Sr=[],Ar=[],Wr,Ir=[],go=[],bo,Le=[],Se=[],Be,oa=[],bi=[],O2,xe=[],ce=[],Te,We=[],Ct=[],vi,Gr=[],Bs=[],Nn,I1=[],B2=[],Rn,D4=[],u7=[],p7,f7=[],h7=[],m7,g7=[],b7=[];var v7=class extends s{static{i(this,"DeesTable")}static{r=this}static{let D=typeof Symbol=="function"&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;o=[$({type:String})],c=[$({type:String})],p=[$({type:Array})],x=[$({type:String})],y=[$({type:String})],R=[$({type:Boolean})],N=[$({type:Boolean})],O=[$({type:String,reflect:!0})],E=[$({type:Boolean})],K=[$({type:Array})],he=[$({attribute:!1})],ve=[$({attribute:!1})],de=[$({type:Boolean})],X=[$({attribute:!1})],me=[$({attribute:!1})],ye=[$({type:Object})],oe=[$({type:Boolean,reflect:!0,attribute:"show-vertical-lines"})],Ce=[$({type:Boolean,reflect:!0,attribute:"show-horizontal-lines"})],dt=[$({type:Boolean,reflect:!0,attribute:"show-grid"})],Me=[$({attribute:!1})],Ae=[$({type:String})],_t=[$({attribute:!1})],Ne=[$({type:Boolean,attribute:"show-column-filters"})],Pe=[$({type:Boolean,reflect:!0,attribute:"show-selection-checkbox"})],Ft=[$({type:Boolean,reflect:!0,attribute:"virtualized"})],gi=[$({type:Number,attribute:"virtual-overscan"})],er=[$({type:String,attribute:"highlight-updates"})],Wr=[$({type:Number,attribute:"highlight-duration"})],bo=[$({type:Boolean,reflect:!0,attribute:"fixed-height"})],Be=[$({type:String})],O2=[$({type:String})],Te=[$({attribute:!1})],vi=[G()],Nn=[G()],Rn=[G()],p7=[G()],m7=[G()],fa(this,null,o,{kind:"accessor",name:"heading1",static:!1,private:!1,access:{has:i(L=>"heading1"in L,"has"),get:i(L=>L.heading1,"get"),set:i((L,ee)=>{L.heading1=ee},"set")},metadata:D},n,l),fa(this,null,c,{kind:"accessor",name:"heading2",static:!1,private:!1,access:{has:i(L=>"heading2"in L,"has"),get:i(L=>L.heading2,"get"),set:i((L,ee)=>{L.heading2=ee},"set")},metadata:D},d,u),fa(this,null,p,{kind:"accessor",name:"data",static:!1,private:!1,access:{has:i(L=>"data"in L,"has"),get:i(L=>L.data,"get"),set:i((L,ee)=>{L.data=ee},"set")},metadata:D},m,v),fa(this,null,x,{kind:"accessor",name:"key",static:!1,private:!1,access:{has:i(L=>"key"in L,"has"),get:i(L=>L.key,"get"),set:i((L,ee)=>{L.key=ee},"set")},metadata:D},b,g),fa(this,null,y,{kind:"accessor",name:"label",static:!1,private:!1,access:{has:i(L=>"label"in L,"has"),get:i(L=>L.label,"get"),set:i((L,ee)=>{L.label=ee},"set")},metadata:D},k,C),fa(this,null,R,{kind:"accessor",name:"disabled",static:!1,private:!1,access:{has:i(L=>"disabled"in L,"has"),get:i(L=>L.disabled,"get"),set:i((L,ee)=>{L.disabled=ee},"set")},metadata:D},T,S),fa(this,null,N,{kind:"accessor",name:"required",static:!1,private:!1,access:{has:i(L=>"required"in L,"has"),get:i(L=>L.required,"get"),set:i((L,ee)=>{L.required=ee},"set")},metadata:D},_,I),fa(this,null,O,{kind:"accessor",name:"dataName",static:!1,private:!1,access:{has:i(L=>"dataName"in L,"has"),get:i(L=>L.dataName,"get"),set:i((L,ee)=>{L.dataName=ee},"set")},metadata:D},M,z),fa(this,null,E,{kind:"accessor",name:"searchable",static:!1,private:!1,access:{has:i(L=>"searchable"in L,"has"),get:i(L=>L.searchable,"get"),set:i((L,ee)=>{L.searchable=ee},"set")},metadata:D},A,F),fa(this,null,K,{kind:"accessor",name:"dataActions",static:!1,private:!1,access:{has:i(L=>"dataActions"in L,"has"),get:i(L=>L.dataActions,"get"),set:i((L,ee)=>{L.dataActions=ee},"set")},metadata:D},j,U),fa(this,null,he,{kind:"accessor",name:"columns",static:!1,private:!1,access:{has:i(L=>"columns"in L,"has"),get:i(L=>L.columns,"get"),set:i((L,ee)=>{L.columns=ee},"set")},metadata:D},B,J),fa(this,null,ve,{kind:"accessor",name:"rowKey",static:!1,private:!1,access:{has:i(L=>"rowKey"in L,"has"),get:i(L=>L.rowKey,"get"),set:i((L,ee)=>{L.rowKey=ee},"set")},metadata:D},P,H),fa(this,null,de,{kind:"accessor",name:"augmentFromDisplayFunction",static:!1,private:!1,access:{has:i(L=>"augmentFromDisplayFunction"in L,"has"),get:i(L=>L.augmentFromDisplayFunction,"get"),set:i((L,ee)=>{L.augmentFromDisplayFunction=ee},"set")},metadata:D},ue,Y),fa(this,null,X,{kind:"accessor",name:"displayFunction",static:!1,private:!1,access:{has:i(L=>"displayFunction"in L,"has"),get:i(L=>L.displayFunction,"get"),set:i((L,ee)=>{L.displayFunction=ee},"set")},metadata:D},Q,Z),fa(this,null,me,{kind:"accessor",name:"reverseDisplayFunction",static:!1,private:!1,access:{has:i(L=>"reverseDisplayFunction"in L,"has"),get:i(L=>L.reverseDisplayFunction,"get"),set:i((L,ee)=>{L.reverseDisplayFunction=ee},"set")},metadata:D},ae,re),fa(this,null,ye,{kind:"accessor",name:"selectedDataRow",static:!1,private:!1,access:{has:i(L=>"selectedDataRow"in L,"has"),get:i(L=>L.selectedDataRow,"get"),set:i((L,ee)=>{L.selectedDataRow=ee},"set")},metadata:D},V,q),fa(this,null,oe,{kind:"accessor",name:"showVerticalLines",static:!1,private:!1,access:{has:i(L=>"showVerticalLines"in L,"has"),get:i(L=>L.showVerticalLines,"get"),set:i((L,ee)=>{L.showVerticalLines=ee},"set")},metadata:D},se,te),fa(this,null,Ce,{kind:"accessor",name:"showHorizontalLines",static:!1,private:!1,access:{has:i(L=>"showHorizontalLines"in L,"has"),get:i(L=>L.showHorizontalLines,"get"),set:i((L,ee)=>{L.showHorizontalLines=ee},"set")},metadata:D},Fe,Ve),fa(this,null,dt,{kind:"accessor",name:"showGrid",static:!1,private:!1,access:{has:i(L=>"showGrid"in L,"has"),get:i(L=>L.showGrid,"get"),set:i((L,ee)=>{L.showGrid=ee},"set")},metadata:D},$e,ze),fa(this,null,Me,{kind:"accessor",name:"sortBy",static:!1,private:!1,access:{has:i(L=>"sortBy"in L,"has"),get:i(L=>L.sortBy,"get"),set:i((L,ee)=>{L.sortBy=ee},"set")},metadata:D},pe,be),fa(this,null,Ae,{kind:"accessor",name:"filterText",static:!1,private:!1,access:{has:i(L=>"filterText"in L,"has"),get:i(L=>L.filterText,"get"),set:i((L,ee)=>{L.filterText=ee},"set")},metadata:D},Ke,nt),fa(this,null,_t,{kind:"accessor",name:"columnFilters",static:!1,private:!1,access:{has:i(L=>"columnFilters"in L,"has"),get:i(L=>L.columnFilters,"get"),set:i((L,ee)=>{L.columnFilters=ee},"set")},metadata:D},_e,we),fa(this,null,Ne,{kind:"accessor",name:"showColumnFilters",static:!1,private:!1,access:{has:i(L=>"showColumnFilters"in L,"has"),get:i(L=>L.showColumnFilters,"get"),set:i((L,ee)=>{L.showColumnFilters=ee},"set")},metadata:D},fe,ge),fa(this,null,Pe,{kind:"accessor",name:"showSelectionCheckbox",static:!1,private:!1,access:{has:i(L=>"showSelectionCheckbox"in L,"has"),get:i(L=>L.showSelectionCheckbox,"get"),set:i((L,ee)=>{L.showSelectionCheckbox=ee},"set")},metadata:D},bt,vt),fa(this,null,Ft,{kind:"accessor",name:"virtualized",static:!1,private:!1,access:{has:i(L=>"virtualized"in L,"has"),get:i(L=>L.virtualized,"get"),set:i((L,ee)=>{L.virtualized=ee},"set")},metadata:D},Ja,tr),fa(this,null,gi,{kind:"accessor",name:"virtualOverscan",static:!1,private:!1,access:{has:i(L=>"virtualOverscan"in L,"has"),get:i(L=>L.virtualOverscan,"get"),set:i((L,ee)=>{L.virtualOverscan=ee},"set")},metadata:D},Ue,mt),fa(this,null,er,{kind:"accessor",name:"highlightUpdates",static:!1,private:!1,access:{has:i(L=>"highlightUpdates"in L,"has"),get:i(L=>L.highlightUpdates,"get"),set:i((L,ee)=>{L.highlightUpdates=ee},"set")},metadata:D},Sr,Ar),fa(this,null,Wr,{kind:"accessor",name:"highlightDuration",static:!1,private:!1,access:{has:i(L=>"highlightDuration"in L,"has"),get:i(L=>L.highlightDuration,"get"),set:i((L,ee)=>{L.highlightDuration=ee},"set")},metadata:D},Ir,go),fa(this,null,bo,{kind:"accessor",name:"fixedHeight",static:!1,private:!1,access:{has:i(L=>"fixedHeight"in L,"has"),get:i(L=>L.fixedHeight,"get"),set:i((L,ee)=>{L.fixedHeight=ee},"set")},metadata:D},Le,Se),fa(this,null,Be,{kind:"accessor",name:"searchMode",static:!1,private:!1,access:{has:i(L=>"searchMode"in L,"has"),get:i(L=>L.searchMode,"get"),set:i((L,ee)=>{L.searchMode=ee},"set")},metadata:D},oa,bi),fa(this,null,O2,{kind:"accessor",name:"selectionMode",static:!1,private:!1,access:{has:i(L=>"selectionMode"in L,"has"),get:i(L=>L.selectionMode,"get"),set:i((L,ee)=>{L.selectionMode=ee},"set")},metadata:D},xe,ce),fa(this,null,Te,{kind:"accessor",name:"selectedIds",static:!1,private:!1,access:{has:i(L=>"selectedIds"in L,"has"),get:i(L=>L.selectedIds,"get"),set:i((L,ee)=>{L.selectedIds=ee},"set")},metadata:D},We,Ct),fa(this,null,vi,{kind:"accessor",name:"__focusedCell",static:!1,private:!1,access:{has:i(L=>"__focusedCell"in L,"has"),get:i(L=>L.__focusedCell,"get"),set:i((L,ee)=>{L.__focusedCell=ee},"set")},metadata:D},Gr,Bs),fa(this,null,Nn,{kind:"accessor",name:"__editingCell",static:!1,private:!1,access:{has:i(L=>"__editingCell"in L,"has"),get:i(L=>L.__editingCell,"get"),set:i((L,ee)=>{L.__editingCell=ee},"set")},metadata:D},I1,B2),fa(this,null,Rn,{kind:"accessor",name:"__floatingActive",static:!1,private:!1,access:{has:i(L=>"__floatingActive"in L,"has"),get:i(L=>L.__floatingActive,"get"),set:i((L,ee)=>{L.__floatingActive=ee},"set")},metadata:D},D4,u7),fa(this,null,p7,{kind:"accessor",name:"__flashingCells",static:!1,private:!1,access:{has:i(L=>"__flashingCells"in L,"has"),get:i(L=>L.__flashingCells,"get"),set:i((L,ee)=>{L.__flashingCells=ee},"set")},metadata:D},f7,h7),fa(this,null,m7,{kind:"accessor",name:"__virtualRange",static:!1,private:!1,access:{has:i(L=>"__virtualRange"in L,"has"),get:i(L=>L.__virtualRange,"get"),set:i((L,ee)=>{L.__virtualRange=ee},"set")},metadata:D},g7,b7),fa(null,e={value:r},t,{kind:"class",name:r.name,metadata:D},null,a),v7=r=e.value,D&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:D})}static demo=Qca;static demoGroups=["Data View"];#e=st(this,n,"heading 1");get heading1(){return this.#e}set heading1(D){this.#e=D}#t=(st(this,l),st(this,d,"heading 2"));get heading2(){return this.#t}set heading2(D){this.#t=D}#a=(st(this,u),st(this,m,[]));get data(){return this.#a}set data(D){this.#a=D}#r=(st(this,v),st(this,b,void 0));get key(){return this.#r}set key(D){this.#r=D}#i=(st(this,g),st(this,k,void 0));get label(){return this.#i}set label(D){this.#i=D}#s=(st(this,C),st(this,T,!1));get disabled(){return this.#s}set disabled(D){this.#s=D}#o=(st(this,S),st(this,_,!1));get required(){return this.#o}set required(D){this.#o=D}get value(){return this.data}set value(D){}changeSubject=(st(this,I),new jt.smartrx.rxjs.Subject);#n=st(this,M,void 0);get dataName(){return this.#n}set dataName(D){this.#n=D}#l=(st(this,z),st(this,A,!0));get searchable(){return this.#l}set searchable(D){this.#l=D}#c=(st(this,F),st(this,j,[]));get dataActions(){return this.#c}set dataActions(D){this.#c=D}#d=(st(this,U),st(this,B,[]));get columns(){return this.#d}set columns(D){this.#d=D}#u=(st(this,J),st(this,P,void 0));get rowKey(){return this.#u}set rowKey(D){this.#u=D}#p=(st(this,H),st(this,ue,!1));get augmentFromDisplayFunction(){return this.#p}set augmentFromDisplayFunction(D){this.#p=D}#f=(st(this,Y),st(this,Q,D=>D));get displayFunction(){return this.#f}set displayFunction(D){this.#f=D}#h=(st(this,Z),st(this,ae,D=>D));get reverseDisplayFunction(){return this.#h}set reverseDisplayFunction(D){this.#h=D}#m=(st(this,re),st(this,V,void 0));get selectedDataRow(){return this.#m}set selectedDataRow(D){this.#m=D}#g=(st(this,q),st(this,se,!1));get showVerticalLines(){return this.#g}set showVerticalLines(D){this.#g=D}#b=(st(this,te),st(this,Fe,!1));get showHorizontalLines(){return this.#b}set showHorizontalLines(D){this.#b=D}#v=(st(this,Ve),st(this,$e,!0));get showGrid(){return this.#v}set showGrid(D){this.#v=D}files=(st(this,ze),[]);fileWeakMap=new WeakMap;dataChangeSubject=new jt.smartrx.rxjs.Subject;#x=st(this,pe,[]);get sortBy(){return this.#x}set sortBy(D){this.#x=D}#y=(st(this,be),st(this,Ke,""));get filterText(){return this.#y}set filterText(D){this.#y=D}#w=(st(this,nt),st(this,_e,{}));get columnFilters(){return this.#w}set columnFilters(D){this.#w=D}#M=(st(this,we),st(this,fe,!1));get showColumnFilters(){return this.#M}set showColumnFilters(D){this.#M=D}#k=(st(this,ge),st(this,bt,!1));get showSelectionCheckbox(){return this.#k}set showSelectionCheckbox(D){this.#k=D}#S=(st(this,vt),st(this,Ja,!1));get virtualized(){return this.#S}set virtualized(D){this.#S=D}#C=(st(this,tr),st(this,Ue,8));get virtualOverscan(){return this.#C}set virtualOverscan(D){this.#C=D}#z=(st(this,mt),st(this,Sr,"none"));get highlightUpdates(){return this.#z}set highlightUpdates(D){this.#z=D}#T=(st(this,Ar),st(this,Ir,900));get highlightDuration(){return this.#T}set highlightDuration(D){this.#T=D}#_=(st(this,go),st(this,Le,!1));get fixedHeight(){return this.#_}set fixedHeight(D){this.#_=D}#L=(st(this,Se),st(this,oa,"table"));get searchMode(){return this.#L}set searchMode(D){this.#L=D}__searchTextSub=st(this,bi);__searchModeSub;#$=st(this,xe,"none");get selectionMode(){return this.#$}set selectionMode(D){this.#$=D}#D=(st(this,ce),st(this,We,new Set));get selectedIds(){return this.#D}set selectedIds(D){this.#D=D}_rowIdMap=(st(this,Ct),new WeakMap);_rowIdCounter=0;__selectionAnchorId;#A=st(this,Gr,void 0);get __focusedCell(){return this.#A}set __focusedCell(D){this.#A=D}#I=(st(this,Bs),st(this,I1,void 0));get __editingCell(){return this.#I}set __editingCell(D){this.#I=D}#P=(st(this,B2),st(this,D4,!1));get __floatingActive(){return this.#P}set __floatingActive(D){this.#P=D}#E=(st(this,u7),st(this,f7,new Map));get __flashingCells(){return this.#E}set __flashingCells(D){this.#E=D}__prevSnapshot=st(this,h7);__flashClearTimer;__flashTick=0;__flashWarnedNoRowKey=!1;__memoEffectiveCols;__memoViewData;__columnsSizedFor;__rowHeight=36;__rowHeightMeasured=!1;#N=st(this,g7,{start:0,end:0});get __virtualRange(){return this.#N}set __virtualRange(D){this.#N=D}constructor(){super(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.addEventListener("keydown",this.__handleHostKeydown)}__handleHostKeydown=(st(this,b7),D=>{let L=D.composedPath?.()||[],ee=!1;for(let Re of L){let Ze=Re?.tagName;if(Ze==="INPUT"||Ze==="TEXTAREA"||Re?.isContentEditable){ee=!0;break}}if((D.metaKey||D.ctrlKey)&&(D.key==="c"||D.key==="C")){if(ee)return;let Re=[];if(this.selectedIds.size>0)for(let Ze of this.data)this.selectedIds.has(this.getRowId(Ze))&&Re.push(Ze);else this.selectedDataRow&&Re.push(this.selectedDataRow);if(Re.length===0)return;D.preventDefault(),this.__writeRowsAsJson(Re);return}if(!(ee||this.__editingCell))switch(D.key){case"ArrowLeft":D.preventDefault(),this.moveFocusedCell(-1,0,!1);return;case"ArrowRight":D.preventDefault(),this.moveFocusedCell(1,0,!1);return;case"ArrowUp":D.preventDefault(),this.moveFocusedCell(0,-1,!1);return;case"ArrowDown":D.preventDefault(),this.moveFocusedCell(0,1,!1);return;case"Enter":case"F2":{if(!this.__focusedCell)return;let Ze=(this._lastViewData??[]).find(et=>this.getRowId(et)===this.__focusedCell.rowId);if(!Ze)return;let He=(Array.isArray(this.columns)&&this.columns.length>0?eW(this.columns,this.augmentFromDisplayFunction,this.displayFunction,this.data):Sm(this.displayFunction,this.data)).find(et=>String(et.key)===this.__focusedCell.colKey);if(!He||!this.__isColumnEditable(He))return;D.preventDefault(),this.startEditing(Ze,He);return}case"Escape":this.__focusedCell&&(this.__focusedCell=void 0,this.requestUpdate());return;default:return}});copySelectionAsJson(D){let L=[];if(this.selectedIds.size>0)for(let ee of this.data)this.selectedIds.has(this.getRowId(ee))&&L.push(ee);else D?L.push(D):this.selectedDataRow&&L.push(this.selectedDataRow);L.length!==0&&this.__writeRowsAsJson(L)}__writeRowsAsJson(D){try{let L=JSON.stringify(D,null,2);navigator.clipboard?.writeText(L)}catch{}}static styles=e0a;__getEffectiveColumns(){let D=Array.isArray(this.columns)&&this.columns.length>0,L=this.__memoEffectiveCols;if(L&&L.columns===this.columns&&L.augment===this.augmentFromDisplayFunction&&L.displayFunction===this.displayFunction&&L.data===this.data)return L.out;let ee=D?eW(this.columns,this.augmentFromDisplayFunction,this.displayFunction,this.data):Sm(this.displayFunction,this.data);return this.__memoEffectiveCols={columns:this.columns,augment:this.augmentFromDisplayFunction,displayFunction:this.displayFunction,data:this.data,out:ee},ee}__getViewData(D){let L=this.searchMode==="data"?"data":"table",ee=this.__memoViewData;if(ee&&ee.data===this.data&&ee.sortBy===this.sortBy&&ee.filterText===this.filterText&&ee.columnFilters===this.columnFilters&&ee.searchMode===L&&ee.effectiveColumns===D)return ee.out;let De=i0a(this.filterText,L,D),Re=a0a(this.data,D,this.sortBy,this.filterText,this.columnFilters,L,De||void 0);return this.__memoViewData={data:this.data,sortBy:this.sortBy,filterText:this.filterText,columnFilters:this.columnFilters,searchMode:L,effectiveColumns:D,out:Re},Re}render(){let D=this.__getEffectiveColumns(),L=this.__getViewData(D);this._lastViewData=L;let ee=this.virtualized&&L.length>0,De=L,Re=0,Ze=0,ct=0;if(ee){let He=this.__virtualRange,et=Math.max(0,He.start),xa=Math.min(L.length,He.end||0),Da=xa>0?xa:Math.min(L.length,this.virtualOverscan*2+16);Re=et,De=L.slice(et,Da),Ze=et*this.__rowHeight,ct=Math.max(0,L.length-Da)*this.__rowHeight}return w`
15267
15267
  <dees-tile>
15268
15268
  <div slot="header" class="header">
15269
15269
  <div class="headingContainer">
@@ -15333,7 +15333,7 @@ body > div[style*="top: -50000px"][style*="width: 50000px"] {
15333
15333
  @dragover=${this.__onTbodyDragover}
15334
15334
  @drop=${this.__onTbodyDrop}
15335
15335
  >
15336
- ${ee&&Xe>0?w`<tr aria-hidden="true" style="height:${Xe}px"><td></td></tr>`:w``}
15336
+ ${ee&&Ze>0?w`<tr aria-hidden="true" style="height:${Ze}px"><td></td></tr>`:w``}
15337
15337
  ${Us.repeat(De,(He,et)=>`${this.getRowId(He)}::${Re+et}`,(He,et)=>{let xa=Re+et,Da=this.getRowId(He),vo=this.__flashingCells.get(Da);return w`
15338
15338
  <tr
15339
15339
  data-row-idx=${xa}
@@ -15435,7 +15435,7 @@ body > div[style*="top: -50000px"][style*="width: 50000px"] {
15435
15435
  </th>`})}
15436
15436
  ${this.dataActions&&this.dataActions.length>0?w`<th></th>`:w``}
15437
15437
  </tr>`:w``}
15438
- `}__floatingResizeObserver;__floatingScrollHandler;__scrollAncestors=[];get __floatingHeaderEl(){return this.shadowRoot?.querySelector(".floatingHeader")??null}get __realTableEl(){return this.shadowRoot?.querySelector(".tableScroll > table")??null}get __floatingTableEl(){return this.shadowRoot?.querySelector(".floatingHeader > table")??null}__collectScrollAncestors(){let D=[],L=this,ee=i(De=>De==="auto"||De==="scroll"||De==="overlay","scrollish");for(;L;){if(L instanceof Element){let Re=getComputedStyle(L),Xe=ee(Re.overflowY),ct=ee(Re.overflowX);(Xe||ct)&&D.push({target:L,scrollsY:Xe,scrollsX:ct})}let De=L.assignedSlot?L.assignedSlot:L.parentNode;De?L=De:L.host?L=L.host:L=null}return D.push({target:window,scrollsY:!0,scrollsX:!0}),D}__getStickContext(){let D=0,L=0,ee=window.innerWidth;for(let De of this.__scrollAncestors){if(De.target===window)continue;let Re=De.target,Xe=Re.getBoundingClientRect(),ct=getComputedStyle(Re);if(De.scrollsY){let He=parseFloat(ct.borderTopWidth)||0;D=Math.max(D,Xe.top+He)}if(De.scrollsX){let He=parseFloat(ct.borderLeftWidth)||0,et=parseFloat(ct.borderRightWidth)||0;L=Math.max(L,Xe.left+He),ee=Math.min(ee,Xe.right-et)}}return{top:D,left:L,right:ee}}setupFloatingHeader(){if(this.teardownFloatingHeader(),this.fixedHeight&&!this.virtualized)return;let D=this.__realTableEl;if(!D)return;this.__scrollAncestors=this.__collectScrollAncestors();let L=this.shadowRoot?.querySelector(".tableScroll");L&&this.__scrollAncestors.unshift({target:L,scrollsY:this.fixedHeight,scrollsX:!0}),this.__floatingResizeObserver=new ResizeObserver(()=>{this.fixedHeight||this.__syncFloatingHeader(),this.virtualized&&this.__computeVirtualRange()}),this.__floatingResizeObserver.observe(D),this.__floatingScrollHandler=()=>{this.fixedHeight||this.__syncFloatingHeader(),this.virtualized&&this.__computeVirtualRange()};for(let ee of this.__scrollAncestors)ee.target.addEventListener("scroll",this.__floatingScrollHandler,{passive:!0});window.addEventListener("resize",this.__floatingScrollHandler,{passive:!0}),this.fixedHeight||this.__syncFloatingHeader(),this.virtualized&&this.__computeVirtualRange()}teardownFloatingHeader(){if(this.__floatingResizeObserver?.disconnect(),this.__floatingResizeObserver=void 0,this.__floatingScrollHandler){for(let L of this.__scrollAncestors)L.target.removeEventListener("scroll",this.__floatingScrollHandler);window.removeEventListener("resize",this.__floatingScrollHandler),this.__floatingScrollHandler=void 0}this.__scrollAncestors=[],this.__floatingActive=!1;let D=this.__floatingHeaderEl;D&&D.classList.remove("active")}__transferFocusToRealHeader(){let D=this.__floatingHeaderEl;if(!D)return;let L=this.shadowRoot?.activeElement;if(!L||!D.contains(L))return;let ee=L.getAttribute("data-col-key");if(!ee)return;let De=L,Re=this.shadowRoot?.querySelector(`.tableScroll > table > thead input[data-col-key="${CSS.escape(ee)}"]`);if(!Re||Re===De)return;let Xe=De.selectionStart,ct=De.selectionEnd,He=De.selectionDirection;Re.focus({preventScroll:!0});try{Xe!=null&&ct!=null&&Re.setSelectionRange(Xe,ct,He||void 0)}catch{}}__transferFocusToFloatingHeader(){let D=this.__floatingHeaderEl;if(!D||!this.__floatingActive)return;let L=this.shadowRoot?.activeElement;if(!L)return;let ee=this.shadowRoot?.querySelector(".tableScroll > table > thead");if(!ee||!ee.contains(L))return;let De=L.getAttribute("data-col-key");if(!De)return;let Re=L,Xe=D.querySelector(`input[data-col-key="${CSS.escape(De)}"]`);if(!Xe||Xe===Re)return;let ct=Re.selectionStart,He=Re.selectionEnd,et=Re.selectionDirection;Xe.focus({preventScroll:!0});try{ct!=null&&He!=null&&Xe.setSelectionRange(ct,He,et||void 0)}catch{}}__computeVirtualRange(){if(!this.virtualized)return;let L=(this._lastViewData??[]).length;if(L===0){(this.__virtualRange.start!==0||this.__virtualRange.end!==0)&&(this.__virtualRange={start:0,end:0});return}let ee=this.__realTableEl;if(!ee)return;let De=ee.getBoundingClientRect(),Re=0,Xe=window.innerHeight;for(let yr of this.__scrollAncestors){if(yr.target===window||!yr.scrollsY)continue;let hs=yr.target.getBoundingClientRect(),q2=getComputedStyle(yr.target),On=parseFloat(q2.borderTopWidth)||0,H2=parseFloat(q2.borderBottomWidth)||0;Re=Math.max(Re,hs.top+On),Xe=Math.min(Xe,hs.bottom-H2)}let ct=Math.max(1,this.__rowHeight),He=ee.tHead?.getBoundingClientRect().height??0,et=De.top+He,xa=Math.max(0,Re-et),Da=Math.max(0,Xe-Math.max(Re,et)),vo=Math.floor(xa/ct),Wa=Math.ceil(Da/ct)+1,P1=Math.max(0,vo-this.virtualOverscan),Fn=Math.min(L,vo+Wa+this.virtualOverscan);(P1!==this.__virtualRange.start||Fn!==this.__virtualRange.end)&&(this.__virtualRange={start:P1,end:Fn})}__measureRowHeight(){if(!this.virtualized||this.__rowHeightMeasured)return;let D=this.shadowRoot?.querySelector("tbody");if(!D)return;let L=Array.from(D.rows).find(De=>De.hasAttribute("data-row-idx"));if(!L)return;let ee=L.getBoundingClientRect().height;ee>0&&(this.__rowHeight=ee,this.__rowHeightMeasured=!0)}__syncFloatingHeader(){let D=this.__floatingHeaderEl,L=this.__realTableEl;if(!D||!L)return;let ee=L.getBoundingClientRect(),De=this.__getStickContext(),Re=L.tHead?.rows,Xe=0;if(Re)for(let yr=0;yr<Re.length;yr++)Xe+=Re[yr].getBoundingClientRect().height;let ct=ee.bottom-De.top,He=ee.top<De.top&&ct>0;if(He!==this.__floatingActive){if(He||this.__transferFocusToRealHeader(),this.__floatingActive=He,D.classList.toggle("active",He),!He){D.style.height="";let yr=this.__floatingTableEl;yr&&(yr.style.transform="")}if(He){this.updateComplete.then(()=>{this.__syncFloatingHeader(),this.__transferFocusToFloatingHeader()});return}}if(!He)return;let et=this.__floatingTableEl;if(!et)return;et.style.tableLayout=L.style.tableLayout||"auto";let xa=et.tHead?.rows;if(Re&&xa)for(let yr=0;yr<Re.length&&yr<xa.length;yr++){let hs=Re[yr].cells,q2=xa[yr].cells;for(let On=0;On<hs.length&&On<q2.length;On++){let H2=hs[On].getBoundingClientRect().width;q2[On].style.width=`${H2}px`,q2[On].style.minWidth=`${H2}px`,q2[On].style.maxWidth=`${H2}px`}}let Da=Math.max(ee.left,De.left),vo=Math.min(ee.right,De.right),Wa=Math.max(0,vo-Da);D.style.top=`${De.top}px`,D.style.left=`${Da}px`,D.style.width=`${Wa}px`;let P1=Math.min(Xe,ct),Fn=Xe-P1;D.style.height=`${P1}px`,et.style.width=`${ee.width}px`,et.style.marginLeft=`${ee.left-Da}px`,et.style.transform=Fn>0?`translateY(-${Fn}px)`:""}async disconnectedCallback(){super.disconnectedCallback(),this.teardownFloatingHeader(),this.__flashClearTimer&&(clearTimeout(this.__flashClearTimer),this.__flashClearTimer=void 0)}async firstUpdated(){}willUpdate(D){if(D.has("data")&&this.selectedDataRow&&this.rowKey){let He=this.getRowId(this.selectedDataRow),et;for(let xa of this.data)if(this.getRowId(xa)===He){et=xa;break}et?et!==this.selectedDataRow&&(this.selectedDataRow=et):this.selectedDataRow=void 0}if(this.highlightUpdates!=="flash"){(this.__prevSnapshot||this.__flashingCells.size>0)&&(this.__prevSnapshot=void 0,this.__flashingCells.size>0&&(this.__flashingCells=new Map),this.__flashClearTimer&&(clearTimeout(this.__flashClearTimer),this.__flashClearTimer=void 0));return}if(!this.rowKey){this.__flashWarnedNoRowKey||(this.__flashWarnedNoRowKey=!0,console.warn('[dees-table] highlightUpdates="flash" requires `rowKey` to be set. Flash is disabled. Set the rowKey property/attribute to a stable identifier on your row data (e.g. `rowKey="id"`).'));return}if(!D.has("data"))return;let ee=this.__getEffectiveColumns().filter(He=>!He.hidden),De=new Map(ee.map(He=>[String(He.key),He])),Re=new Map,Xe=new Map;for(let He of this.data){let et=this.getRowId(He),xa=new Map;for(let vo of ee)xa.set(String(vo.key),G0(He,vo,this.displayFunction));Re.set(et,xa);let Da=this.__prevSnapshot?.get(et);if(Da)for(let[vo,Wa]of xa){let P1=Da.get(vo),Fn=De.get(vo),yr;if(Fn?.flashCompare?yr=Fn.flashCompare(P1,Wa):Wa!=null&&typeof Wa=="object"?yr=!1:yr=P1!==Wa,yr){if(this.__editingCell&&this.__editingCell.rowId===et&&this.__editingCell.colKey===vo)continue;let hs=Xe.get(et);hs||(hs=new Set,Xe.set(et,hs)),hs.add(vo)}}}let ct=!!this.__prevSnapshot;if(this.__prevSnapshot=Re,!!ct&&Xe.size!==0){for(let[He,et]of Xe){let xa=this.__flashingCells.get(He);if(xa)for(let Da of et)xa.add(Da);else this.__flashingCells.set(He,et)}this.__flashTick++,this.__flashingCells=new Map(this.__flashingCells),this.__flashClearTimer&&clearTimeout(this.__flashClearTimer),this.__flashClearTimer=setTimeout(()=>{this.__flashingCells=new Map,this.__flashClearTimer=void 0},Math.max(0,this.highlightDuration))}}async updated(D){super.updated(D),D.has("highlightDuration")&&this.style.setProperty("--dees-table-flash-duration",`${this.highlightDuration}ms`);let L=!this.__columnsSizedFor||this.__columnsSizedFor.data!==this.data||this.__columnsSizedFor.columns!==this.columns;L&&(this.__columnsSizedFor={data:this.data,columns:this.columns},this.determineColumnWidths(),this.__rowHeightMeasured=!1),this.virtualized&&(this.__measureRowHeight(),this.__computeVirtualRange()),(D.has("fixedHeight")||D.has("virtualized")||D.has("data")||D.has("columns")||!this.__floatingScrollHandler)&&((!this.fixedHeight||this.virtualized)&&this.data.length>0?this.setupFloatingHeader():this.teardownFloatingHeader()),!this.fixedHeight&&this.data.length>0&&(this.__floatingActive||L)&&this.__syncFloatingHeader(),this.searchable&&(this.dataActions.find(De=>De.type?.includes("header")&&De.name==="Search")||(this.dataActions.unshift({name:"Search",iconName:"lucide:Search",type:["header"],actionFunc:i(async()=>{console.log("open search"),this.shadowRoot.querySelector(".searchGrid").classList.toggle("hidden")},"actionFunc")}),console.log(this.dataActions),this.requestUpdate()),this.wireSearchInputs())}__debounceTimer;debounceRun(D,L=200){this.__debounceTimer&&clearTimeout(this.__debounceTimer),this.__debounceTimer=setTimeout(D,L)}wireSearchInputs(){let D=this.shadowRoot?.querySelector(".searchGrid dees-input-text"),L=this.shadowRoot?.querySelector(".searchGrid dees-input-multitoggle");D&&!this.__searchTextSub&&(this.__searchTextSub=D.changeSubject.subscribe(ee=>{let De=ee?.value??"";this.debounceRun(()=>{this.searchMode==="server"?this.dispatchEvent(new CustomEvent("searchRequest",{detail:{query:De,mode:"server"},bubbles:!0})):this.setFilterText(De)})})),L&&!this.__searchModeSub&&(this.__searchModeSub=L.changeSubject.subscribe(ee=>{let De=ee?.selectedOption||ee?.value||"table";if(De==="table"||De==="data"||De==="server"){this.searchMode=De;let Re=D?.value??"";this.debounceRun(()=>{this.searchMode==="server"?this.dispatchEvent(new CustomEvent("searchRequest",{detail:{query:Re,mode:"server"},bubbles:!0})):this.setFilterText(Re)})}}))}async determineColumnWidths(){await(await this.domtoolsPromise).convenience.smartdelay.delayFor(0);let L=this.shadowRoot.querySelector("table");if(!L)return;let ee=L.rows[0].cells,De=i(async(Re,Xe=!1)=>{let ct=ft.defer(),He=ee[Re],et=window.getComputedStyle(He).width;if(He.textContent.includes("Actions")){let xa=this.dataActions.filter(Da=>Da.type?.includes("inRow")).length*36;He.style.width=`${Math.max(xa,68)}px`}else He.style.width=et;Xe&&(requestAnimationFrame(()=>{ct.resolve()}),await ct.promise)},"handleColumnByIndex");ee[ee.length-1].textContent.includes("Actions")&&await De(ee.length-1,!0);for(let Re=0;Re<ee.length;Re++)ee[Re].textContent.includes("Actions")||await De(Re);L.style.tableLayout="fixed"}getSortDescriptor(D){return this.sortBy.find(L=>L.key===D)}getSortPriority(D){return this.sortBy.findIndex(L=>L.key===D)}setSort(D,L){this.sortBy=[{key:D,dir:L}],this.emitSortChange(),this.requestUpdate()}addSortAt(D,L,ee){let De=this.sortBy.filter(Xe=>Xe.key!==D),Re=Math.max(0,Math.min(L,De.length));De.splice(Re,0,{key:D,dir:ee}),this.sortBy=De,this.emitSortChange(),this.requestUpdate()}appendSort(D,L){let ee=this.sortBy.filter(De=>De.key!==D);ee.push({key:D,dir:L}),this.sortBy=ee,this.emitSortChange(),this.requestUpdate()}removeSort(D){this.sortBy.some(L=>L.key===D)&&(this.sortBy=this.sortBy.filter(L=>L.key!==D),this.emitSortChange(),this.requestUpdate())}clearSorts(){this.sortBy.length!==0&&(this.sortBy=[],this.emitSortChange(),this.requestUpdate())}emitSortChange(){this.dispatchEvent(new CustomEvent("sortChange",{detail:{sortBy:this.sortBy.map(D=>({...D}))},bubbles:!0}))}async handleHeaderClick(D,L,ee){if(D.shiftKey){this.handleHeaderShiftClick(L);return}await this.confirmReplaceCascade(L)&&this.cycleSingleSort(L)}cycleSingleSort(D){let L=String(D.key),ee=this.sortBy.length===1&&this.sortBy[0].key===L?this.sortBy[0].dir:null;ee==="asc"?this.setSort(L,"desc"):ee==="desc"?this.clearSorts():this.setSort(L,"asc")}handleHeaderShiftClick(D){let L=String(D.key),ee=this.getSortDescriptor(L);ee?ee.dir==="asc"?(this.sortBy=this.sortBy.map(De=>De.key===L?{key:L,dir:"desc"}:De),this.emitSortChange(),this.requestUpdate()):this.removeSort(L):this.appendSort(L,"asc")}confirmReplaceCascade(D){return this.sortBy.length<=1?Promise.resolve(!0):new Promise(L=>{let ee=!1,De=i(Xe=>{ee||(ee=!0,L(Xe))},"settle"),Re=this.sortBy.map((Xe,ct)=>{let et=this._lookupColumnByKey?.(Xe.key)?.header??Xe.key;return w`<li>${ct+1}. ${et} ${Xe.dir==="asc"?"\u25B2":"\u25BC"}</li>`});wa.createAndShow({heading:"Replace multi-column sort?",width:"small",showCloseButton:!0,content:w`
15438
+ `}__floatingResizeObserver;__floatingScrollHandler;__scrollAncestors=[];get __floatingHeaderEl(){return this.shadowRoot?.querySelector(".floatingHeader")??null}get __realTableEl(){return this.shadowRoot?.querySelector(".tableScroll > table")??null}get __floatingTableEl(){return this.shadowRoot?.querySelector(".floatingHeader > table")??null}__collectScrollAncestors(){let D=[],L=this,ee=i(De=>De==="auto"||De==="scroll"||De==="overlay","scrollish");for(;L;){if(L instanceof Element){let Re=getComputedStyle(L),Ze=ee(Re.overflowY),ct=ee(Re.overflowX);(Ze||ct)&&D.push({target:L,scrollsY:Ze,scrollsX:ct})}let De=L.assignedSlot?L.assignedSlot:L.parentNode;De?L=De:L.host?L=L.host:L=null}return D.push({target:window,scrollsY:!0,scrollsX:!0}),D}__getStickContext(){let D=0,L=0,ee=window.innerWidth;for(let De of this.__scrollAncestors){if(De.target===window)continue;let Re=De.target,Ze=Re.getBoundingClientRect(),ct=getComputedStyle(Re);if(De.scrollsY){let He=parseFloat(ct.borderTopWidth)||0;D=Math.max(D,Ze.top+He)}if(De.scrollsX){let He=parseFloat(ct.borderLeftWidth)||0,et=parseFloat(ct.borderRightWidth)||0;L=Math.max(L,Ze.left+He),ee=Math.min(ee,Ze.right-et)}}return{top:D,left:L,right:ee}}setupFloatingHeader(){if(this.teardownFloatingHeader(),this.fixedHeight&&!this.virtualized)return;let D=this.__realTableEl;if(!D)return;this.__scrollAncestors=this.__collectScrollAncestors();let L=this.shadowRoot?.querySelector(".tableScroll");L&&this.__scrollAncestors.unshift({target:L,scrollsY:this.fixedHeight,scrollsX:!0}),this.__floatingResizeObserver=new ResizeObserver(()=>{this.fixedHeight||this.__syncFloatingHeader(),this.virtualized&&this.__computeVirtualRange()}),this.__floatingResizeObserver.observe(D),this.__floatingScrollHandler=()=>{this.fixedHeight||this.__syncFloatingHeader(),this.virtualized&&this.__computeVirtualRange()};for(let ee of this.__scrollAncestors)ee.target.addEventListener("scroll",this.__floatingScrollHandler,{passive:!0});window.addEventListener("resize",this.__floatingScrollHandler,{passive:!0}),this.fixedHeight||this.__syncFloatingHeader(),this.virtualized&&this.__computeVirtualRange()}teardownFloatingHeader(){if(this.__floatingResizeObserver?.disconnect(),this.__floatingResizeObserver=void 0,this.__floatingScrollHandler){for(let L of this.__scrollAncestors)L.target.removeEventListener("scroll",this.__floatingScrollHandler);window.removeEventListener("resize",this.__floatingScrollHandler),this.__floatingScrollHandler=void 0}this.__scrollAncestors=[],this.__floatingActive=!1;let D=this.__floatingHeaderEl;D&&D.classList.remove("active")}__transferFocusToRealHeader(){let D=this.__floatingHeaderEl;if(!D)return;let L=this.shadowRoot?.activeElement;if(!L||!D.contains(L))return;let ee=L.getAttribute("data-col-key");if(!ee)return;let De=L,Re=this.shadowRoot?.querySelector(`.tableScroll > table > thead input[data-col-key="${CSS.escape(ee)}"]`);if(!Re||Re===De)return;let Ze=De.selectionStart,ct=De.selectionEnd,He=De.selectionDirection;Re.focus({preventScroll:!0});try{Ze!=null&&ct!=null&&Re.setSelectionRange(Ze,ct,He||void 0)}catch{}}__transferFocusToFloatingHeader(){let D=this.__floatingHeaderEl;if(!D||!this.__floatingActive)return;let L=this.shadowRoot?.activeElement;if(!L)return;let ee=this.shadowRoot?.querySelector(".tableScroll > table > thead");if(!ee||!ee.contains(L))return;let De=L.getAttribute("data-col-key");if(!De)return;let Re=L,Ze=D.querySelector(`input[data-col-key="${CSS.escape(De)}"]`);if(!Ze||Ze===Re)return;let ct=Re.selectionStart,He=Re.selectionEnd,et=Re.selectionDirection;Ze.focus({preventScroll:!0});try{ct!=null&&He!=null&&Ze.setSelectionRange(ct,He,et||void 0)}catch{}}__computeVirtualRange(){if(!this.virtualized)return;let L=(this._lastViewData??[]).length;if(L===0){(this.__virtualRange.start!==0||this.__virtualRange.end!==0)&&(this.__virtualRange={start:0,end:0});return}let ee=this.__realTableEl;if(!ee)return;let De=ee.getBoundingClientRect(),Re=0,Ze=window.innerHeight;for(let yr of this.__scrollAncestors){if(yr.target===window||!yr.scrollsY)continue;let hs=yr.target.getBoundingClientRect(),q2=getComputedStyle(yr.target),On=parseFloat(q2.borderTopWidth)||0,H2=parseFloat(q2.borderBottomWidth)||0;Re=Math.max(Re,hs.top+On),Ze=Math.min(Ze,hs.bottom-H2)}let ct=Math.max(1,this.__rowHeight),He=ee.tHead?.getBoundingClientRect().height??0,et=De.top+He,xa=Math.max(0,Re-et),Da=Math.max(0,Ze-Math.max(Re,et)),vo=Math.floor(xa/ct),Wa=Math.ceil(Da/ct)+1,P1=Math.max(0,vo-this.virtualOverscan),Fn=Math.min(L,vo+Wa+this.virtualOverscan);(P1!==this.__virtualRange.start||Fn!==this.__virtualRange.end)&&(this.__virtualRange={start:P1,end:Fn})}__measureRowHeight(){if(!this.virtualized||this.__rowHeightMeasured)return;let D=this.shadowRoot?.querySelector("tbody");if(!D)return;let L=Array.from(D.rows).find(De=>De.hasAttribute("data-row-idx"));if(!L)return;let ee=L.getBoundingClientRect().height;ee>0&&(this.__rowHeight=ee,this.__rowHeightMeasured=!0)}__syncFloatingHeader(){let D=this.__floatingHeaderEl,L=this.__realTableEl;if(!D||!L)return;let ee=L.getBoundingClientRect(),De=this.__getStickContext(),Re=L.tHead?.rows,Ze=0;if(Re)for(let yr=0;yr<Re.length;yr++)Ze+=Re[yr].getBoundingClientRect().height;let ct=ee.bottom-De.top,He=ee.top<De.top&&ct>0;if(He!==this.__floatingActive){if(He||this.__transferFocusToRealHeader(),this.__floatingActive=He,D.classList.toggle("active",He),!He){D.style.height="";let yr=this.__floatingTableEl;yr&&(yr.style.transform="")}if(He){this.updateComplete.then(()=>{this.__syncFloatingHeader(),this.__transferFocusToFloatingHeader()});return}}if(!He)return;let et=this.__floatingTableEl;if(!et)return;et.style.tableLayout=L.style.tableLayout||"auto";let xa=et.tHead?.rows;if(Re&&xa)for(let yr=0;yr<Re.length&&yr<xa.length;yr++){let hs=Re[yr].cells,q2=xa[yr].cells;for(let On=0;On<hs.length&&On<q2.length;On++){let H2=hs[On].getBoundingClientRect().width;q2[On].style.width=`${H2}px`,q2[On].style.minWidth=`${H2}px`,q2[On].style.maxWidth=`${H2}px`}}let Da=Math.max(ee.left,De.left),vo=Math.min(ee.right,De.right),Wa=Math.max(0,vo-Da);D.style.top=`${De.top}px`,D.style.left=`${Da}px`,D.style.width=`${Wa}px`;let P1=Math.min(Ze,ct),Fn=Ze-P1;D.style.height=`${P1}px`,et.style.width=`${ee.width}px`,et.style.marginLeft=`${ee.left-Da}px`,et.style.transform=Fn>0?`translateY(-${Fn}px)`:""}async disconnectedCallback(){super.disconnectedCallback(),this.teardownFloatingHeader(),this.__flashClearTimer&&(clearTimeout(this.__flashClearTimer),this.__flashClearTimer=void 0)}async firstUpdated(){}willUpdate(D){if(D.has("data")&&this.selectedDataRow&&this.rowKey){let He=this.getRowId(this.selectedDataRow),et;for(let xa of this.data)if(this.getRowId(xa)===He){et=xa;break}et?et!==this.selectedDataRow&&(this.selectedDataRow=et):this.selectedDataRow=void 0}if(this.highlightUpdates!=="flash"){(this.__prevSnapshot||this.__flashingCells.size>0)&&(this.__prevSnapshot=void 0,this.__flashingCells.size>0&&(this.__flashingCells=new Map),this.__flashClearTimer&&(clearTimeout(this.__flashClearTimer),this.__flashClearTimer=void 0));return}if(!this.rowKey){this.__flashWarnedNoRowKey||(this.__flashWarnedNoRowKey=!0,console.warn('[dees-table] highlightUpdates="flash" requires `rowKey` to be set. Flash is disabled. Set the rowKey property/attribute to a stable identifier on your row data (e.g. `rowKey="id"`).'));return}if(!D.has("data"))return;let ee=this.__getEffectiveColumns().filter(He=>!He.hidden),De=new Map(ee.map(He=>[String(He.key),He])),Re=new Map,Ze=new Map;for(let He of this.data){let et=this.getRowId(He),xa=new Map;for(let vo of ee)xa.set(String(vo.key),G0(He,vo,this.displayFunction));Re.set(et,xa);let Da=this.__prevSnapshot?.get(et);if(Da)for(let[vo,Wa]of xa){let P1=Da.get(vo),Fn=De.get(vo),yr;if(Fn?.flashCompare?yr=Fn.flashCompare(P1,Wa):Wa!=null&&typeof Wa=="object"?yr=!1:yr=P1!==Wa,yr){if(this.__editingCell&&this.__editingCell.rowId===et&&this.__editingCell.colKey===vo)continue;let hs=Ze.get(et);hs||(hs=new Set,Ze.set(et,hs)),hs.add(vo)}}}let ct=!!this.__prevSnapshot;if(this.__prevSnapshot=Re,!!ct&&Ze.size!==0){for(let[He,et]of Ze){let xa=this.__flashingCells.get(He);if(xa)for(let Da of et)xa.add(Da);else this.__flashingCells.set(He,et)}this.__flashTick++,this.__flashingCells=new Map(this.__flashingCells),this.__flashClearTimer&&clearTimeout(this.__flashClearTimer),this.__flashClearTimer=setTimeout(()=>{this.__flashingCells=new Map,this.__flashClearTimer=void 0},Math.max(0,this.highlightDuration))}}async updated(D){super.updated(D),D.has("highlightDuration")&&this.style.setProperty("--dees-table-flash-duration",`${this.highlightDuration}ms`);let L=!this.__columnsSizedFor||this.__columnsSizedFor.data!==this.data||this.__columnsSizedFor.columns!==this.columns;L&&(this.__columnsSizedFor={data:this.data,columns:this.columns},this.determineColumnWidths(),this.__rowHeightMeasured=!1),this.virtualized&&(this.__measureRowHeight(),this.__computeVirtualRange()),(D.has("fixedHeight")||D.has("virtualized")||D.has("data")||D.has("columns")||!this.__floatingScrollHandler)&&((!this.fixedHeight||this.virtualized)&&this.data.length>0?this.setupFloatingHeader():this.teardownFloatingHeader()),!this.fixedHeight&&this.data.length>0&&(this.__floatingActive||L)&&this.__syncFloatingHeader(),this.searchable&&(this.dataActions.find(De=>De.type?.includes("header")&&De.name==="Search")||(this.dataActions.unshift({name:"Search",iconName:"lucide:Search",type:["header"],actionFunc:i(async()=>{console.log("open search"),this.shadowRoot.querySelector(".searchGrid").classList.toggle("hidden")},"actionFunc")}),console.log(this.dataActions),this.requestUpdate()),this.wireSearchInputs())}__debounceTimer;debounceRun(D,L=200){this.__debounceTimer&&clearTimeout(this.__debounceTimer),this.__debounceTimer=setTimeout(D,L)}wireSearchInputs(){let D=this.shadowRoot?.querySelector(".searchGrid dees-input-text"),L=this.shadowRoot?.querySelector(".searchGrid dees-input-multitoggle");D&&!this.__searchTextSub&&(this.__searchTextSub=D.changeSubject.subscribe(ee=>{let De=ee?.value??"";this.debounceRun(()=>{this.searchMode==="server"?this.dispatchEvent(new CustomEvent("searchRequest",{detail:{query:De,mode:"server"},bubbles:!0})):this.setFilterText(De)})})),L&&!this.__searchModeSub&&(this.__searchModeSub=L.changeSubject.subscribe(ee=>{let De=ee?.selectedOption||ee?.value||"table";if(De==="table"||De==="data"||De==="server"){this.searchMode=De;let Re=D?.value??"";this.debounceRun(()=>{this.searchMode==="server"?this.dispatchEvent(new CustomEvent("searchRequest",{detail:{query:Re,mode:"server"},bubbles:!0})):this.setFilterText(Re)})}}))}async determineColumnWidths(){await(await this.domtoolsPromise).convenience.smartdelay.delayFor(0);let L=this.shadowRoot.querySelector("table");if(!L)return;let ee=L.rows[0].cells,De=i(async(Re,Ze=!1)=>{let ct=ft.defer(),He=ee[Re],et=window.getComputedStyle(He).width;if(He.textContent.includes("Actions")){let xa=this.dataActions.filter(Da=>Da.type?.includes("inRow")).length*36;He.style.width=`${Math.max(xa,68)}px`}else He.style.width=et;Ze&&(requestAnimationFrame(()=>{ct.resolve()}),await ct.promise)},"handleColumnByIndex");ee[ee.length-1].textContent.includes("Actions")&&await De(ee.length-1,!0);for(let Re=0;Re<ee.length;Re++)ee[Re].textContent.includes("Actions")||await De(Re);L.style.tableLayout="fixed"}getSortDescriptor(D){return this.sortBy.find(L=>L.key===D)}getSortPriority(D){return this.sortBy.findIndex(L=>L.key===D)}setSort(D,L){this.sortBy=[{key:D,dir:L}],this.emitSortChange(),this.requestUpdate()}addSortAt(D,L,ee){let De=this.sortBy.filter(Ze=>Ze.key!==D),Re=Math.max(0,Math.min(L,De.length));De.splice(Re,0,{key:D,dir:ee}),this.sortBy=De,this.emitSortChange(),this.requestUpdate()}appendSort(D,L){let ee=this.sortBy.filter(De=>De.key!==D);ee.push({key:D,dir:L}),this.sortBy=ee,this.emitSortChange(),this.requestUpdate()}removeSort(D){this.sortBy.some(L=>L.key===D)&&(this.sortBy=this.sortBy.filter(L=>L.key!==D),this.emitSortChange(),this.requestUpdate())}clearSorts(){this.sortBy.length!==0&&(this.sortBy=[],this.emitSortChange(),this.requestUpdate())}emitSortChange(){this.dispatchEvent(new CustomEvent("sortChange",{detail:{sortBy:this.sortBy.map(D=>({...D}))},bubbles:!0}))}async handleHeaderClick(D,L,ee){if(D.shiftKey){this.handleHeaderShiftClick(L);return}await this.confirmReplaceCascade(L)&&this.cycleSingleSort(L)}cycleSingleSort(D){let L=String(D.key),ee=this.sortBy.length===1&&this.sortBy[0].key===L?this.sortBy[0].dir:null;ee==="asc"?this.setSort(L,"desc"):ee==="desc"?this.clearSorts():this.setSort(L,"asc")}handleHeaderShiftClick(D){let L=String(D.key),ee=this.getSortDescriptor(L);ee?ee.dir==="asc"?(this.sortBy=this.sortBy.map(De=>De.key===L?{key:L,dir:"desc"}:De),this.emitSortChange(),this.requestUpdate()):this.removeSort(L):this.appendSort(L,"asc")}confirmReplaceCascade(D){return this.sortBy.length<=1?Promise.resolve(!0):new Promise(L=>{let ee=!1,De=i(Ze=>{ee||(ee=!0,L(Ze))},"settle"),Re=this.sortBy.map((Ze,ct)=>{let et=this._lookupColumnByKey?.(Ze.key)?.header??Ze.key;return w`<li>${ct+1}. ${et} ${Ze.dir==="asc"?"\u25B2":"\u25BC"}</li>`});wa.createAndShow({heading:"Replace multi-column sort?",width:"small",showCloseButton:!0,content:w`
15439
15439
  <div style="font-size:13px; line-height:1.55;">
15440
15440
  <p style="margin:0 0 8px;">
15441
15441
  You currently have a ${this.sortBy.length}-column sort active:
@@ -15446,7 +15446,7 @@ body > div[style*="top: -50000px"][style*="width: 50000px"] {
15446
15446
  <strong>${D.header??String(D.key)}</strong>.
15447
15447
  </p>
15448
15448
  </div>
15449
- `,menuOptions:[{name:"Cancel",iconName:"lucide:x",action:i(async Xe=>(De(!1),await Xe.destroy(),null),"action")},{name:"Replace",iconName:"lucide:check",action:i(async Xe=>(De(!0),await Xe.destroy(),null),"action")}]})})}_lookupColumnByKey(D){return(Array.isArray(this.columns)&&this.columns.length>0?eW(this.columns,this.augmentFromDisplayFunction,this.displayFunction,this.data):Sm(this.displayFunction,this.data)).find(De=>String(De.key)===D)}openHeaderContextMenu(D,L,ee){let De=this.buildHeaderMenuItems(L,ee);ra.openContextMenuWithOptions(D,De)}buildHeaderMenuItems(D,L){let ee=String(D.key),De=this.getSortDescriptor(ee),Re=this.sortBy.length,Xe=L.filter(et=>et.sortable!==!1).length,ct=Math.min(Math.max(Re+(De?0:1),1),Math.max(Xe,1)),He=[];He.push({name:"Sort Ascending",iconName:Re===1&&De?.dir==="asc"?"lucide:check":"lucide:arrowUp",action:i(async()=>(await this.confirmReplaceCascade(D)&&this.setSort(ee,"asc"),null),"action")}),He.push({name:"Sort Descending",iconName:Re===1&&De?.dir==="desc"?"lucide:check":"lucide:arrowDown",action:i(async()=>(await this.confirmReplaceCascade(D)&&this.setSort(ee,"desc"),null),"action")}),He.push({divider:!0});for(let et=1;et<=ct;et++){let xa=Xqa(et),Da=De&&this.getSortPriority(ee)===et-1;He.push({name:`Set as ${xa} sort`,iconName:Da?"lucide:check":"lucide:listOrdered",submenu:[{name:"Ascending",iconName:"lucide:arrowUp",action:i(async()=>(this.addSortAt(ee,et-1,"asc"),null),"action")},{name:"Descending",iconName:"lucide:arrowDown",action:i(async()=>(this.addSortAt(ee,et-1,"desc"),null),"action")}]})}return He.push({divider:!0}),He.push({name:"Append to sort",iconName:"lucide:plus",submenu:[{name:"Ascending",iconName:"lucide:arrowUp",action:i(async()=>(this.appendSort(ee,"asc"),null),"action")},{name:"Descending",iconName:"lucide:arrowDown",action:i(async()=>(this.appendSort(ee,"desc"),null),"action")}]}),De&&(He.push({divider:!0}),He.push({name:"Remove from sort",iconName:"lucide:minus",action:i(async()=>(this.removeSort(ee),null),"action")})),Re>0&&(De||He.push({divider:!0}),He.push({name:"Clear all sorts",iconName:"lucide:trash",action:i(async()=>(this.clearSorts(),null),"action")})),He.push({divider:!0}),He.push({name:this.showColumnFilters?"Hide column filters":"Show column filters",iconName:this.showColumnFilters?"lucide:filterX":"lucide:filter",action:i(async()=>(this.showColumnFilters=!this.showColumnFilters,this.requestUpdate(),null),"action")}),He}getAriaSort(D){let L=this.sortBy[0];return!L||L.key!==String(D.key)?"none":L.dir==="asc"?"ascending":"descending"}renderSortIndicator(D){let L=this.getSortPriority(String(D.key));if(L<0)return w``;let De=this.sortBy[L].dir==="asc"?"\u25B2":"\u25BC";return this.sortBy.length===1?w`<span class="sortArrow">${De}</span>`:w`<span class="sortArrow">${De}</span><span class="sortBadge">${L+1}</span>`}setFilterText(D){let L=this.filterText;this.filterText=D??"",L!==this.filterText&&(this.dispatchEvent(new CustomEvent("filterChange",{detail:{text:this.filterText,columns:{...this.columnFilters}},bubbles:!0})),this.requestUpdate())}setColumnFilter(D,L){this.columnFilters={...this.columnFilters,[D]:L},this.dispatchEvent(new CustomEvent("filterChange",{detail:{text:this.filterText,columns:{...this.columnFilters}},bubbles:!0})),this.requestUpdate()}getRowId(D){if(this.rowKey)return typeof this.rowKey=="function"?this.rowKey(D):String(D[this.rowKey]);let L=D;return this._rowIdMap.has(L)||this._rowIdMap.set(L,String(++this._rowIdCounter)),this._rowIdMap.get(L)}isRowSelected(D){return this.selectedIds.has(this.getRowId(D))}toggleRowSelected(D){let L=this.getRowId(D);this.selectionMode==="single"?(this.selectedIds.clear(),this.selectedIds.add(L)):this.selectionMode==="multi"&&(this.selectedIds.has(L)?this.selectedIds.delete(L):this.selectedIds.add(L)),this.emitSelectionChange(),this.requestUpdate()}__resolveRow(D){let L=D.composedPath?.()||[],ee=null;for(let ct of L){let He=ct;if(He?.tagName==="TR"&&He.hasAttribute("data-row-idx")){ee=He;break}}if(!ee)return null;let De=Number(ee.getAttribute("data-row-idx")),Xe=(this._lastViewData??[])[De];return Xe?{item:Xe,rowIdx:De}:null}__resolveCell(D){let L=this.__resolveRow(D);if(!L)return null;let ee=D.composedPath?.()||[],De=null;for(let He of ee){let et=He;if(et?.tagName==="TD"&&et.hasAttribute("data-col-key")){De=et;break}}if(!De)return null;let Re=De.getAttribute("data-col-key"),ct=this.__getEffectiveColumns().find(He=>String(He.key)===Re);return ct?{item:L.item,rowIdx:L.rowIdx,col:ct}:null}__isInActionsCol(D){let L=D.composedPath?.()||[];for(let ee of L)if(ee?.classList?.contains("actionsCol"))return!0;return!1}__isInEditor(D){let L=D.composedPath?.()||[];for(let ee of L){let De=ee,Re=De?.tagName;if(Re==="INPUT"||Re==="TEXTAREA"||De?.isContentEditable||Re&&Re.startsWith("DEES-INPUT-"))return!0}return!1}__onTbodyClick=i(D=>{if(this.__isInEditor(D)||this.__isInActionsCol(D))return;let L=this.__resolveCell(D);if(!L)return;let ee=this._lastViewData??[];(L.col.editable||L.col.editor)&&(this.__focusedCell={rowId:this.getRowId(L.item),colKey:String(L.col.key)}),this.handleRowClick(D,L.item,L.rowIdx,ee)},"__onTbodyClick");__onTbodyDblclick=i(D=>{if(this.__isInEditor(D)||this.__isInActionsCol(D))return;let L=this.__resolveCell(D);if(!L)return;if(!!(L.col.editable||L.col.editor)){D.stopPropagation(),this.startEditing(L.item,L.col);return}let De=this.dataActions.find(Re=>Re.type?.includes("doubleClick"));De&&De.actionFunc({item:L.item,table:this})},"__onTbodyDblclick");__onTbodyMousedown=i(D=>{D.shiftKey&&this.selectionMode!=="single"&&D.preventDefault()},"__onTbodyMousedown");__onTbodyContextmenu=i(D=>{if(this.__isInActionsCol(D))return;let L=this.__resolveRow(D);if(!L)return;let ee=L.item;this.isRowSelected(ee)||(this.selectedDataRow=ee,this.selectedIds.clear(),this.selectedIds.add(this.getRowId(ee)),this.__selectionAnchorId=this.getRowId(ee),this.emitSelectionChange(),this.requestUpdate());let De=this.getActionsForType("contextmenu").map(Xe=>({name:Xe.name,iconName:Xe.iconName,action:i(async()=>(await Xe.actionFunc({item:ee,table:this}),null),"action")})),Re=[{name:this.selectedIds.size>1?`Copy ${this.selectedIds.size} rows as JSON`:"Copy row as JSON",iconName:"lucide:Copy",action:i(async()=>(this.copySelectionAsJson(ee),null),"action")}];ra.openContextMenuWithOptions(D,[...De,...Re])},"__onTbodyContextmenu");__onTbodyDragenter=i(D=>{if(D.preventDefault(),D.stopPropagation(),!this.__resolveRow(D))return;let ee=(D.composedPath?.()||[]).find(De=>De?.tagName==="TR");ee&&setTimeout(()=>ee.classList.add("hasAttachment"),0)},"__onTbodyDragenter");__onTbodyDragleave=i(D=>{D.preventDefault(),D.stopPropagation();let L=(D.composedPath?.()||[]).find(ee=>ee?.tagName==="TR");L&&L.classList.remove("hasAttachment")},"__onTbodyDragleave");__onTbodyDragover=i(D=>{D.preventDefault()},"__onTbodyDragover");__onTbodyDrop=i(async D=>{D.preventDefault();let L=this.__resolveRow(D);if(!L)return;let ee=L.item,De=[];for(let Xe of Array.from(D.dataTransfer.files))this.files.push(Xe),De.push(Xe),this.requestUpdate();let Re=this.fileWeakMap.get(ee);Re?Re.push(...De):this.fileWeakMap.set(ee,De)},"__onTbodyDrop");handleRowClick(D,L,ee,De){let Re=this.getRowId(L);if(this.selectionMode==="single"){this.selectedDataRow=L,this.selectedIds.clear(),this.selectedIds.add(Re),this.__selectionAnchorId=Re,this.emitSelectionChange(),this.requestUpdate();return}let Xe=D.metaKey||D.ctrlKey;if(D.shiftKey&&this.__selectionAnchorId!==void 0){window.getSelection?.()?.removeAllRanges();let He=De.findIndex(et=>this.getRowId(et)===this.__selectionAnchorId);if(He>=0){let[et,xa]=He<=ee?[He,ee]:[ee,He];this.selectedIds.clear();for(let Da=et;Da<=xa;Da++)this.selectedIds.add(this.getRowId(De[Da]))}else this.selectedIds.clear(),this.selectedIds.add(Re),this.__selectionAnchorId=Re;this.selectedDataRow=L}else if(Xe){if(this.selectedIds.has(Re)){if(this.selectedIds.delete(Re),this.selectedDataRow===L){let et=De.find(xa=>this.selectedIds.has(this.getRowId(xa)));this.selectedDataRow=et}}else this.selectedIds.add(Re),this.selectedDataRow=L;this.__selectionAnchorId=Re}else this.selectedDataRow=L,this.selectedIds.clear(),this.selectedIds.add(Re),this.__selectionAnchorId=Re;this.emitSelectionChange(),this.requestUpdate()}setRowSelected(D,L){let ee=this.getRowId(D);this.selectionMode==="single"?(this.selectedIds.clear(),L&&this.selectedIds.add(ee)):this.selectionMode==="multi"&&(L?this.selectedIds.add(ee):this.selectedIds.delete(ee)),this.emitSelectionChange(),this.requestUpdate()}areAllVisibleSelected(){let D=this._lastViewData||[];if(D.length===0)return!1;for(let L of D)if(!this.selectedIds.has(this.getRowId(L)))return!1;return!0}isVisibleSelectionIndeterminate(){let D=this._lastViewData||[];if(D.length===0)return!1;let L=0;for(let ee of D)this.selectedIds.has(this.getRowId(ee))&&L++;return L>0&&L<D.length}setSelectVisible(D){let L=this._lastViewData||[];if(D)for(let ee of L)this.selectedIds.add(this.getRowId(ee));else for(let ee of L)this.selectedIds.delete(this.getRowId(ee));this.emitSelectionChange(),this.requestUpdate()}emitSelectionChange(){let D=Array.from(this.selectedIds),L=this.data.filter(ee=>this.selectedIds.has(this.getRowId(ee)));this.dispatchEvent(new CustomEvent("selectionChange",{detail:{selectedIds:D,selectedRows:L},bubbles:!0}))}getActionsForType(D){let L=[];for(let ee of this.dataActions)ee.type?.includes(D)&&L.push(ee);return L}__isColumnEditable(D){return!!(D.editable||D.editor)}__editableColumns(D){return D.filter(L=>!L.hidden&&this.__isColumnEditable(L))}startEditing(D,L){if(!this.__isColumnEditable(L))return;let ee=this.getRowId(D),De=String(L.key);this.__focusedCell={rowId:ee,colKey:De},this.__editingCell={rowId:ee,colKey:De},this.requestUpdate(),this.updateComplete.then(()=>{let Re=this.shadowRoot?.querySelector(".editingCell dees-input-text, .editingCell dees-input-checkbox, .editingCell dees-input-dropdown, .editingCell dees-input-datepicker, .editingCell dees-input-tags");Re?.focus?.(),Re?.tagName==="DEES-INPUT-DROPDOWN"&&Re.updateComplete?.then(()=>Re.toggleSelectionBox?.())})}cancelCellEdit(){this.__editingCell=void 0,this.requestUpdate()}commitCellEdit(D,L,ee){let De=String(L.key),Re=D[L.key],Xe=L.parse?L.parse(ee,D):ee;if(L.validate){let ct=L.validate(Xe,D);if(typeof ct=="string"){this.dispatchEvent(new CustomEvent("cellEditError",{detail:{row:D,key:De,value:Xe,message:ct},bubbles:!0,composed:!0}));return}}Xe!==Re&&(D[L.key]=Xe,this.__recordCellInSnapshot(D,L),this.dispatchEvent(new CustomEvent("cellEdit",{detail:{row:D,key:De,oldValue:Re,newValue:Xe},bubbles:!0,composed:!0})),this.changeSubject.next(this)),this.__editingCell=void 0,this.requestUpdate()}__recordCellInSnapshot(D,L){if(this.highlightUpdates!=="flash"||!this.__prevSnapshot||!this.rowKey)return;let ee=this.getRowId(D),De=this.__prevSnapshot.get(ee);De||(De=new Map,this.__prevSnapshot.set(ee,De)),De.set(String(L.key),G0(D,L,this.displayFunction))}renderCellEditor(D,L){let ee=D[L.key],De=L.format?L.format(ee,D):ee,Re=L.editor??"text",Xe=i(ct=>this.commitCellEdit(D,L,ct.value),"onTextCommit");switch(Re){case"checkbox":return w`<dees-input-checkbox
15449
+ `,menuOptions:[{name:"Cancel",iconName:"lucide:x",action:i(async Ze=>(De(!1),await Ze.destroy(),null),"action")},{name:"Replace",iconName:"lucide:check",action:i(async Ze=>(De(!0),await Ze.destroy(),null),"action")}]})})}_lookupColumnByKey(D){return(Array.isArray(this.columns)&&this.columns.length>0?eW(this.columns,this.augmentFromDisplayFunction,this.displayFunction,this.data):Sm(this.displayFunction,this.data)).find(De=>String(De.key)===D)}openHeaderContextMenu(D,L,ee){let De=this.buildHeaderMenuItems(L,ee);ra.openContextMenuWithOptions(D,De)}buildHeaderMenuItems(D,L){let ee=String(D.key),De=this.getSortDescriptor(ee),Re=this.sortBy.length,Ze=L.filter(et=>et.sortable!==!1).length,ct=Math.min(Math.max(Re+(De?0:1),1),Math.max(Ze,1)),He=[];He.push({name:"Sort Ascending",iconName:Re===1&&De?.dir==="asc"?"lucide:check":"lucide:arrowUp",action:i(async()=>(await this.confirmReplaceCascade(D)&&this.setSort(ee,"asc"),null),"action")}),He.push({name:"Sort Descending",iconName:Re===1&&De?.dir==="desc"?"lucide:check":"lucide:arrowDown",action:i(async()=>(await this.confirmReplaceCascade(D)&&this.setSort(ee,"desc"),null),"action")}),He.push({divider:!0});for(let et=1;et<=ct;et++){let xa=Xqa(et),Da=De&&this.getSortPriority(ee)===et-1;He.push({name:`Set as ${xa} sort`,iconName:Da?"lucide:check":"lucide:listOrdered",submenu:[{name:"Ascending",iconName:"lucide:arrowUp",action:i(async()=>(this.addSortAt(ee,et-1,"asc"),null),"action")},{name:"Descending",iconName:"lucide:arrowDown",action:i(async()=>(this.addSortAt(ee,et-1,"desc"),null),"action")}]})}return He.push({divider:!0}),He.push({name:"Append to sort",iconName:"lucide:plus",submenu:[{name:"Ascending",iconName:"lucide:arrowUp",action:i(async()=>(this.appendSort(ee,"asc"),null),"action")},{name:"Descending",iconName:"lucide:arrowDown",action:i(async()=>(this.appendSort(ee,"desc"),null),"action")}]}),De&&(He.push({divider:!0}),He.push({name:"Remove from sort",iconName:"lucide:minus",action:i(async()=>(this.removeSort(ee),null),"action")})),Re>0&&(De||He.push({divider:!0}),He.push({name:"Clear all sorts",iconName:"lucide:trash",action:i(async()=>(this.clearSorts(),null),"action")})),He.push({divider:!0}),He.push({name:this.showColumnFilters?"Hide column filters":"Show column filters",iconName:this.showColumnFilters?"lucide:filterX":"lucide:filter",action:i(async()=>(this.showColumnFilters=!this.showColumnFilters,this.requestUpdate(),null),"action")}),He}getAriaSort(D){let L=this.sortBy[0];return!L||L.key!==String(D.key)?"none":L.dir==="asc"?"ascending":"descending"}renderSortIndicator(D){let L=this.getSortPriority(String(D.key));if(L<0)return w``;let De=this.sortBy[L].dir==="asc"?"\u25B2":"\u25BC";return this.sortBy.length===1?w`<span class="sortArrow">${De}</span>`:w`<span class="sortArrow">${De}</span><span class="sortBadge">${L+1}</span>`}setFilterText(D){let L=this.filterText;this.filterText=D??"",L!==this.filterText&&(this.dispatchEvent(new CustomEvent("filterChange",{detail:{text:this.filterText,columns:{...this.columnFilters}},bubbles:!0})),this.requestUpdate())}setColumnFilter(D,L){this.columnFilters={...this.columnFilters,[D]:L},this.dispatchEvent(new CustomEvent("filterChange",{detail:{text:this.filterText,columns:{...this.columnFilters}},bubbles:!0})),this.requestUpdate()}getRowId(D){if(this.rowKey)return typeof this.rowKey=="function"?this.rowKey(D):String(D[this.rowKey]);let L=D;return this._rowIdMap.has(L)||this._rowIdMap.set(L,String(++this._rowIdCounter)),this._rowIdMap.get(L)}isRowSelected(D){return this.selectedIds.has(this.getRowId(D))}toggleRowSelected(D){let L=this.getRowId(D);this.selectionMode==="single"?(this.selectedIds.clear(),this.selectedIds.add(L)):this.selectionMode==="multi"&&(this.selectedIds.has(L)?this.selectedIds.delete(L):this.selectedIds.add(L)),this.emitSelectionChange(),this.requestUpdate()}__resolveRow(D){let L=D.composedPath?.()||[],ee=null;for(let ct of L){let He=ct;if(He?.tagName==="TR"&&He.hasAttribute("data-row-idx")){ee=He;break}}if(!ee)return null;let De=Number(ee.getAttribute("data-row-idx")),Ze=(this._lastViewData??[])[De];return Ze?{item:Ze,rowIdx:De}:null}__resolveCell(D){let L=this.__resolveRow(D);if(!L)return null;let ee=D.composedPath?.()||[],De=null;for(let He of ee){let et=He;if(et?.tagName==="TD"&&et.hasAttribute("data-col-key")){De=et;break}}if(!De)return null;let Re=De.getAttribute("data-col-key"),ct=this.__getEffectiveColumns().find(He=>String(He.key)===Re);return ct?{item:L.item,rowIdx:L.rowIdx,col:ct}:null}__isInActionsCol(D){let L=D.composedPath?.()||[];for(let ee of L)if(ee?.classList?.contains("actionsCol"))return!0;return!1}__isInEditor(D){let L=D.composedPath?.()||[];for(let ee of L){let De=ee,Re=De?.tagName;if(Re==="INPUT"||Re==="TEXTAREA"||De?.isContentEditable||Re&&Re.startsWith("DEES-INPUT-"))return!0}return!1}__onTbodyClick=i(D=>{if(this.__isInEditor(D)||this.__isInActionsCol(D))return;let L=this.__resolveCell(D);if(!L)return;let ee=this._lastViewData??[];(L.col.editable||L.col.editor)&&(this.__focusedCell={rowId:this.getRowId(L.item),colKey:String(L.col.key)}),this.handleRowClick(D,L.item,L.rowIdx,ee)},"__onTbodyClick");__onTbodyDblclick=i(D=>{if(this.__isInEditor(D)||this.__isInActionsCol(D))return;let L=this.__resolveCell(D);if(!L)return;if(!!(L.col.editable||L.col.editor)){D.stopPropagation(),this.startEditing(L.item,L.col);return}let De=this.dataActions.find(Re=>Re.type?.includes("doubleClick"));De&&De.actionFunc({item:L.item,table:this})},"__onTbodyDblclick");__onTbodyMousedown=i(D=>{D.shiftKey&&this.selectionMode!=="single"&&D.preventDefault()},"__onTbodyMousedown");__onTbodyContextmenu=i(D=>{if(this.__isInActionsCol(D))return;let L=this.__resolveRow(D);if(!L)return;let ee=L.item;this.isRowSelected(ee)||(this.selectedDataRow=ee,this.selectedIds.clear(),this.selectedIds.add(this.getRowId(ee)),this.__selectionAnchorId=this.getRowId(ee),this.emitSelectionChange(),this.requestUpdate());let De=this.getActionsForType("contextmenu").map(Ze=>({name:Ze.name,iconName:Ze.iconName,action:i(async()=>(await Ze.actionFunc({item:ee,table:this}),null),"action")})),Re=[{name:this.selectedIds.size>1?`Copy ${this.selectedIds.size} rows as JSON`:"Copy row as JSON",iconName:"lucide:Copy",action:i(async()=>(this.copySelectionAsJson(ee),null),"action")}];ra.openContextMenuWithOptions(D,[...De,...Re])},"__onTbodyContextmenu");__onTbodyDragenter=i(D=>{if(D.preventDefault(),D.stopPropagation(),!this.__resolveRow(D))return;let ee=(D.composedPath?.()||[]).find(De=>De?.tagName==="TR");ee&&setTimeout(()=>ee.classList.add("hasAttachment"),0)},"__onTbodyDragenter");__onTbodyDragleave=i(D=>{D.preventDefault(),D.stopPropagation();let L=(D.composedPath?.()||[]).find(ee=>ee?.tagName==="TR");L&&L.classList.remove("hasAttachment")},"__onTbodyDragleave");__onTbodyDragover=i(D=>{D.preventDefault()},"__onTbodyDragover");__onTbodyDrop=i(async D=>{D.preventDefault();let L=this.__resolveRow(D);if(!L)return;let ee=L.item,De=[];for(let Ze of Array.from(D.dataTransfer.files))this.files.push(Ze),De.push(Ze),this.requestUpdate();let Re=this.fileWeakMap.get(ee);Re?Re.push(...De):this.fileWeakMap.set(ee,De)},"__onTbodyDrop");handleRowClick(D,L,ee,De){let Re=this.getRowId(L);if(this.selectionMode==="single"){this.selectedDataRow=L,this.selectedIds.clear(),this.selectedIds.add(Re),this.__selectionAnchorId=Re,this.emitSelectionChange(),this.requestUpdate();return}let Ze=D.metaKey||D.ctrlKey;if(D.shiftKey&&this.__selectionAnchorId!==void 0){window.getSelection?.()?.removeAllRanges();let He=De.findIndex(et=>this.getRowId(et)===this.__selectionAnchorId);if(He>=0){let[et,xa]=He<=ee?[He,ee]:[ee,He];this.selectedIds.clear();for(let Da=et;Da<=xa;Da++)this.selectedIds.add(this.getRowId(De[Da]))}else this.selectedIds.clear(),this.selectedIds.add(Re),this.__selectionAnchorId=Re;this.selectedDataRow=L}else if(Ze){if(this.selectedIds.has(Re)){if(this.selectedIds.delete(Re),this.selectedDataRow===L){let et=De.find(xa=>this.selectedIds.has(this.getRowId(xa)));this.selectedDataRow=et}}else this.selectedIds.add(Re),this.selectedDataRow=L;this.__selectionAnchorId=Re}else this.selectedDataRow=L,this.selectedIds.clear(),this.selectedIds.add(Re),this.__selectionAnchorId=Re;this.emitSelectionChange(),this.requestUpdate()}setRowSelected(D,L){let ee=this.getRowId(D);this.selectionMode==="single"?(this.selectedIds.clear(),L&&this.selectedIds.add(ee)):this.selectionMode==="multi"&&(L?this.selectedIds.add(ee):this.selectedIds.delete(ee)),this.emitSelectionChange(),this.requestUpdate()}areAllVisibleSelected(){let D=this._lastViewData||[];if(D.length===0)return!1;for(let L of D)if(!this.selectedIds.has(this.getRowId(L)))return!1;return!0}isVisibleSelectionIndeterminate(){let D=this._lastViewData||[];if(D.length===0)return!1;let L=0;for(let ee of D)this.selectedIds.has(this.getRowId(ee))&&L++;return L>0&&L<D.length}setSelectVisible(D){let L=this._lastViewData||[];if(D)for(let ee of L)this.selectedIds.add(this.getRowId(ee));else for(let ee of L)this.selectedIds.delete(this.getRowId(ee));this.emitSelectionChange(),this.requestUpdate()}emitSelectionChange(){let D=Array.from(this.selectedIds),L=this.data.filter(ee=>this.selectedIds.has(this.getRowId(ee)));this.dispatchEvent(new CustomEvent("selectionChange",{detail:{selectedIds:D,selectedRows:L},bubbles:!0}))}getActionsForType(D){let L=[];for(let ee of this.dataActions)ee.type?.includes(D)&&L.push(ee);return L}__isColumnEditable(D){return!!(D.editable||D.editor)}__editableColumns(D){return D.filter(L=>!L.hidden&&this.__isColumnEditable(L))}startEditing(D,L){if(!this.__isColumnEditable(L))return;let ee=this.getRowId(D),De=String(L.key);this.__focusedCell={rowId:ee,colKey:De},this.__editingCell={rowId:ee,colKey:De},this.requestUpdate(),this.updateComplete.then(()=>{let Re=this.shadowRoot?.querySelector(".editingCell dees-input-text, .editingCell dees-input-checkbox, .editingCell dees-input-dropdown, .editingCell dees-input-datepicker, .editingCell dees-input-tags");Re?.focus?.(),Re?.tagName==="DEES-INPUT-DROPDOWN"&&Re.updateComplete?.then(()=>Re.toggleSelectionBox?.())})}cancelCellEdit(){this.__editingCell=void 0,this.requestUpdate()}commitCellEdit(D,L,ee){let De=String(L.key),Re=D[L.key],Ze=L.parse?L.parse(ee,D):ee;if(L.validate){let ct=L.validate(Ze,D);if(typeof ct=="string"){this.dispatchEvent(new CustomEvent("cellEditError",{detail:{row:D,key:De,value:Ze,message:ct},bubbles:!0,composed:!0}));return}}Ze!==Re&&(D[L.key]=Ze,this.__recordCellInSnapshot(D,L),this.dispatchEvent(new CustomEvent("cellEdit",{detail:{row:D,key:De,oldValue:Re,newValue:Ze},bubbles:!0,composed:!0})),this.changeSubject.next(this)),this.__editingCell=void 0,this.requestUpdate()}__recordCellInSnapshot(D,L){if(this.highlightUpdates!=="flash"||!this.__prevSnapshot||!this.rowKey)return;let ee=this.getRowId(D),De=this.__prevSnapshot.get(ee);De||(De=new Map,this.__prevSnapshot.set(ee,De)),De.set(String(L.key),G0(D,L,this.displayFunction))}renderCellEditor(D,L){let ee=D[L.key],De=L.format?L.format(ee,D):ee,Re=L.editor??"text",Ze=i(ct=>this.commitCellEdit(D,L,ct.value),"onTextCommit");switch(Re){case"checkbox":return w`<dees-input-checkbox
15450
15450
  .value=${!!De}
15451
15451
  @newValue=${ct=>{ct.stopPropagation(),this.commitCellEdit(D,L,ct.detail)}}
15452
15452
  ></dees-input-checkbox>`;case"dropdown":{let ct=L.editorOptions?.options??[],He=ct.find(et=>et==null?!1:typeof et=="string"?et===ee:et.key===ee||et.option===ee)??null;return w`<dees-input-dropdown
@@ -15456,18 +15456,18 @@ body > div[style*="top: -50000px"][style*="width: 50000px"] {
15456
15456
  @selectedOption=${et=>{et.stopPropagation();let xa=et.detail,Da=xa?.option??xa?.key??xa;this.commitCellEdit(D,L,Da)}}
15457
15457
  ></dees-input-dropdown>`}case"date":return w`<dees-input-datepicker
15458
15458
  .value=${De}
15459
- @focusout=${ct=>Xe(ct.target)}
15459
+ @focusout=${ct=>Ze(ct.target)}
15460
15460
  @keydown=${ct=>this.__handleEditorKey(ct,D,L)}
15461
15461
  ></dees-input-datepicker>`;case"tags":return w`<dees-input-tags
15462
15462
  .value=${De??[]}
15463
- @focusout=${ct=>Xe(ct.target)}
15463
+ @focusout=${ct=>Ze(ct.target)}
15464
15464
  @keydown=${ct=>this.__handleEditorKey(ct,D,L)}
15465
15465
  ></dees-input-tags>`;default:return w`<dees-input-text
15466
15466
  .vintegrated=${!0}
15467
15467
  .value=${De==null?"":String(De)}
15468
- @focusout=${ct=>Xe(ct.target)}
15468
+ @focusout=${ct=>Ze(ct.target)}
15469
15469
  @keydown=${ct=>this.__handleEditorKey(ct,D,L)}
15470
- ></dees-input-text>`}}__handleEditorKey(D,L,ee){if(D.key==="Escape")D.preventDefault(),D.stopPropagation(),this.cancelCellEdit(),this.focus();else if(D.key==="Enter"){D.preventDefault(),D.stopPropagation();let De=D.target;this.commitCellEdit(L,ee,De.value),this.moveFocusedCell(0,1,!0)}else if(D.key==="Tab"){D.preventDefault(),D.stopPropagation();let De=D.target;this.commitCellEdit(L,ee,De.value),this.moveFocusedCell(D.shiftKey?-1:1,0,!0)}}moveFocusedCell(D,L,ee){let De=this._lastViewData??[];if(De.length===0)return;let Re=Array.isArray(this.columns)&&this.columns.length>0?eW(this.columns,this.augmentFromDisplayFunction,this.displayFunction,this.data):Sm(this.displayFunction,this.data),Xe=this.__editableColumns(Re);if(Xe.length===0)return;let ct=0,He=0;if(this.__focusedCell&&(ct=De.findIndex(Da=>this.getRowId(Da)===this.__focusedCell.rowId),He=Xe.findIndex(Da=>String(Da.key)===this.__focusedCell.colKey),ct<0&&(ct=0),He<0&&(He=0)),D!==0){for(He+=D;He>=Xe.length;)He-=Xe.length,ct+=1;for(;He<0;)He+=Xe.length,ct-=1}if(L!==0&&(ct+=L),ct<0||ct>=De.length){this.cancelCellEdit();return}let et=De[ct],xa=Xe[He];this.__focusedCell={rowId:this.getRowId(et),colKey:String(xa.key)},ee?this.startEditing(et,xa):this.requestUpdate()}static{st(r,a)}};return v7=r})()});var yXe=f(()=>{mXe()});var o0a,n0a=f(()=>{le();Ha();o0a=i(()=>w`
15470
+ ></dees-input-text>`}}__handleEditorKey(D,L,ee){if(D.key==="Escape")D.preventDefault(),D.stopPropagation(),this.cancelCellEdit(),this.focus();else if(D.key==="Enter"){D.preventDefault(),D.stopPropagation();let De=D.target;this.commitCellEdit(L,ee,De.value),this.moveFocusedCell(0,1,!0)}else if(D.key==="Tab"){D.preventDefault(),D.stopPropagation();let De=D.target;this.commitCellEdit(L,ee,De.value),this.moveFocusedCell(D.shiftKey?-1:1,0,!0)}}moveFocusedCell(D,L,ee){let De=this._lastViewData??[];if(De.length===0)return;let Re=Array.isArray(this.columns)&&this.columns.length>0?eW(this.columns,this.augmentFromDisplayFunction,this.displayFunction,this.data):Sm(this.displayFunction,this.data),Ze=this.__editableColumns(Re);if(Ze.length===0)return;let ct=0,He=0;if(this.__focusedCell&&(ct=De.findIndex(Da=>this.getRowId(Da)===this.__focusedCell.rowId),He=Ze.findIndex(Da=>String(Da.key)===this.__focusedCell.colKey),ct<0&&(ct=0),He<0&&(He=0)),D!==0){for(He+=D;He>=Ze.length;)He-=Ze.length,ct+=1;for(;He<0;)He+=Ze.length,ct-=1}if(L!==0&&(ct+=L),ct<0||ct>=De.length){this.cancelCellEdit();return}let et=De[ct],xa=Ze[He];this.__focusedCell={rowId:this.getRowId(et),colKey:String(xa.key)},ee?this.startEditing(et,xa):this.requestUpdate()}static{st(r,a)}};return v7=r})()});var yXe=f(()=>{mXe()});var o0a,n0a=f(()=>{le();Ha();o0a=i(()=>w`
15471
15471
  <style>
15472
15472
  ${W`
15473
15473
  .demo-container {
@@ -19226,7 +19226,7 @@ ${JSON.stringify(o,null,2)}`,await At.plugins.smartdelay.delayFor(2e3),e.setStat
19226
19226
  <slot name="content"></slot>
19227
19227
  </div>
19228
19228
  </div>
19229
- `}handleTabSelect(M){this.selectedTab=M.detail.tab,this.dispatchEvent(new CustomEvent("tab-select",{detail:M.detail,bubbles:!0,composed:!0}))}handleTabClose(M){this.dispatchEvent(new CustomEvent("tab-close",{detail:M.detail,bubbles:!0,composed:!0}))}updated(M){super.updated(M),M.has("showTabs")&&(this.showTabs?this.removeAttribute("notabs"):this.setAttribute("notabs",""))}async firstUpdated(M){await super.firstUpdated(M),this.showTabs||this.setAttribute("notabs","");let z=this.shadowRoot.querySelector("dees-appui-tabs");z&&await z.updateComplete}constructor(){super(...arguments),ao(this,I)}static{ao(r,a)}};return O=r})()});var ha,ot,T0a,_0a=f(()=>{le();ea();z0();g0a();tt();MXe();BGe();HGe();kXe();SXe();zXe();EGe();ha=function(t,e,a,r,s,o){function n(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}i(n,"accept");for(var l=r.kind,c=l==="getter"?"get":l==="setter"?"set":"value",d=!e&&t?r.static?t:t.prototype:null,u=e||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p,m=!1,v=a.length-1;v>=0;v--){var x={};for(var b in r)x[b]=b==="access"?{}:r[b];for(var b in r.access)x.access[b]=r.access[b];x.addInitializer=function(y){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(n(y||null))};var g=(0,a[v])(l==="accessor"?{get:u.get,set:u.set}:u[c],x);if(l==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(p=n(g.get))&&(u.get=p),(p=n(g.set))&&(u.set=p),(p=n(g.init))&&s.unshift(p)}else(p=n(g))&&(l==="field"?s.unshift(p):u[c]=p)}d&&Object.defineProperty(d,r.name,u),m=!0},ot=function(t,e,a){for(var r=arguments.length>2,s=0;s<e.length;s++)a=r?e[s].call(t,a):e[s].call(t);return r?a:void 0},T0a=(()=>{let t=[ie("dees-appui")],e,a=[],r,s=ne,o,n=[],l=[],c,d=[],u=[],p,m=[],v=[],x,b=[],g=[],y,k=[],C=[],R,T=[],S=[],N,_=[],I=[],O,M=[],z=[],E,A=[],F=[],K,j=[],U=[],he,B=[],J=[],ve,P=[],H=[],de,ue=[],Y=[],X,Q=[],Z=[],me,ae=[],re=[],ye,V=[],q=[],oe,se=[],te=[],Ce,Fe=[],Ve=[],dt,$e=[],ze=[],Me,pe=[],be=[],Ae,Ze=[],nt=[],_t,_e=[],we=[],Ne,fe=[],ge=[],Pe,bt=[],vt=[],Ft,Ja=[],tr=[],gi,Ue=[],mt=[],er,Sr=[],Ar=[],Wr,Ir=[],go=[],bo,Le=[],Se=[],Be,oa=[],bi=[],O2,xe=[],ce=[],Te,We=[],Ct=[],vi,Gr=[],Bs=[],Nn,I1=[],B2=[],Rn,D4=[],u7=[],p7,f7=[],h7=[],m7,g7=[],b7=[];var v7=class extends s{static{i(this,"DeesAppui")}static{r=this}static{let D=typeof Symbol=="function"&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;o=[$({type:Array})],c=[$({type:String})],p=[$({type:String})],x=[$({type:Boolean})],y=[$({type:Object})],R=[$({type:Array})],N=[$({type:Boolean})],O=[$({type:String})],E=[$({type:String})],K=[$({type:Array})],he=[$({type:Array})],ve=[$({type:Array})],de=[$({type:Object})],X=[$({type:String})],me=[$({type:Array})],ye=[$({type:Object})],oe=[$({type:Boolean})],Ce=[$({type:Boolean})],dt=[$({type:Boolean})],Me=[$({type:Boolean})],Ae=[$({type:Boolean})],_t=[$({type:Boolean})],Ne=[$({type:Number})],Pe=[G()],Ft=[G()],gi=[$({type:Array})],er=[$({type:Object})],Wr=[$({type:Array})],bo=[$({type:Array})],Be=[G()],O2=[G()],Te=[G()],vi=[G()],Nn=[G()],Rn=[G()],p7=[G()],m7=[G()],ha(this,null,o,{kind:"accessor",name:"appbarMenuItems",static:!1,private:!1,access:{has:i(L=>"appbarMenuItems"in L,"has"),get:i(L=>L.appbarMenuItems,"get"),set:i((L,ee)=>{L.appbarMenuItems=ee},"set")},metadata:D},n,l),ha(this,null,c,{kind:"accessor",name:"appbarBreadcrumbs",static:!1,private:!1,access:{has:i(L=>"appbarBreadcrumbs"in L,"has"),get:i(L=>L.appbarBreadcrumbs,"get"),set:i((L,ee)=>{L.appbarBreadcrumbs=ee},"set")},metadata:D},d,u),ha(this,null,p,{kind:"accessor",name:"appbarBreadcrumbSeparator",static:!1,private:!1,access:{has:i(L=>"appbarBreadcrumbSeparator"in L,"has"),get:i(L=>L.appbarBreadcrumbSeparator,"get"),set:i((L,ee)=>{L.appbarBreadcrumbSeparator=ee},"set")},metadata:D},m,v),ha(this,null,x,{kind:"accessor",name:"appbarShowWindowControls",static:!1,private:!1,access:{has:i(L=>"appbarShowWindowControls"in L,"has"),get:i(L=>L.appbarShowWindowControls,"get"),set:i((L,ee)=>{L.appbarShowWindowControls=ee},"set")},metadata:D},b,g),ha(this,null,y,{kind:"accessor",name:"appbarUser",static:!1,private:!1,access:{has:i(L=>"appbarUser"in L,"has"),get:i(L=>L.appbarUser,"get"),set:i((L,ee)=>{L.appbarUser=ee},"set")},metadata:D},k,C),ha(this,null,R,{kind:"accessor",name:"appbarProfileMenuItems",static:!1,private:!1,access:{has:i(L=>"appbarProfileMenuItems"in L,"has"),get:i(L=>L.appbarProfileMenuItems,"get"),set:i((L,ee)=>{L.appbarProfileMenuItems=ee},"set")},metadata:D},T,S),ha(this,null,N,{kind:"accessor",name:"appbarShowSearch",static:!1,private:!1,access:{has:i(L=>"appbarShowSearch"in L,"has"),get:i(L=>L.appbarShowSearch,"get"),set:i((L,ee)=>{L.appbarShowSearch=ee},"set")},metadata:D},_,I),ha(this,null,O,{kind:"accessor",name:"mainmenuLogoIcon",static:!1,private:!1,access:{has:i(L=>"mainmenuLogoIcon"in L,"has"),get:i(L=>L.mainmenuLogoIcon,"get"),set:i((L,ee)=>{L.mainmenuLogoIcon=ee},"set")},metadata:D},M,z),ha(this,null,E,{kind:"accessor",name:"mainmenuLogoText",static:!1,private:!1,access:{has:i(L=>"mainmenuLogoText"in L,"has"),get:i(L=>L.mainmenuLogoText,"get"),set:i((L,ee)=>{L.mainmenuLogoText=ee},"set")},metadata:D},A,F),ha(this,null,K,{kind:"accessor",name:"mainmenuGroups",static:!1,private:!1,access:{has:i(L=>"mainmenuGroups"in L,"has"),get:i(L=>L.mainmenuGroups,"get"),set:i((L,ee)=>{L.mainmenuGroups=ee},"set")},metadata:D},j,U),ha(this,null,he,{kind:"accessor",name:"mainmenuBottomTabs",static:!1,private:!1,access:{has:i(L=>"mainmenuBottomTabs"in L,"has"),get:i(L=>L.mainmenuBottomTabs,"get"),set:i((L,ee)=>{L.mainmenuBottomTabs=ee},"set")},metadata:D},B,J),ha(this,null,ve,{kind:"accessor",name:"mainmenuTabs",static:!1,private:!1,access:{has:i(L=>"mainmenuTabs"in L,"has"),get:i(L=>L.mainmenuTabs,"get"),set:i((L,ee)=>{L.mainmenuTabs=ee},"set")},metadata:D},P,H),ha(this,null,de,{kind:"accessor",name:"mainmenuSelectedTab",static:!1,private:!1,access:{has:i(L=>"mainmenuSelectedTab"in L,"has"),get:i(L=>L.mainmenuSelectedTab,"get"),set:i((L,ee)=>{L.mainmenuSelectedTab=ee},"set")},metadata:D},ue,Y),ha(this,null,X,{kind:"accessor",name:"secondarymenuHeading",static:!1,private:!1,access:{has:i(L=>"secondarymenuHeading"in L,"has"),get:i(L=>L.secondarymenuHeading,"get"),set:i((L,ee)=>{L.secondarymenuHeading=ee},"set")},metadata:D},Q,Z),ha(this,null,me,{kind:"accessor",name:"secondarymenuGroups",static:!1,private:!1,access:{has:i(L=>"secondarymenuGroups"in L,"has"),get:i(L=>L.secondarymenuGroups,"get"),set:i((L,ee)=>{L.secondarymenuGroups=ee},"set")},metadata:D},ae,re),ha(this,null,ye,{kind:"accessor",name:"secondarymenuSelectedItem",static:!1,private:!1,access:{has:i(L=>"secondarymenuSelectedItem"in L,"has"),get:i(L=>L.secondarymenuSelectedItem,"get"),set:i((L,ee)=>{L.secondarymenuSelectedItem=ee},"set")},metadata:D},V,q),ha(this,null,oe,{kind:"accessor",name:"mainmenuCollapsed",static:!1,private:!1,access:{has:i(L=>"mainmenuCollapsed"in L,"has"),get:i(L=>L.mainmenuCollapsed,"get"),set:i((L,ee)=>{L.mainmenuCollapsed=ee},"set")},metadata:D},se,te),ha(this,null,Ce,{kind:"accessor",name:"secondarymenuCollapsed",static:!1,private:!1,access:{has:i(L=>"secondarymenuCollapsed"in L,"has"),get:i(L=>L.secondarymenuCollapsed,"get"),set:i((L,ee)=>{L.secondarymenuCollapsed=ee},"set")},metadata:D},Fe,Ve),ha(this,null,dt,{kind:"accessor",name:"mainmenuVisible",static:!1,private:!1,access:{has:i(L=>"mainmenuVisible"in L,"has"),get:i(L=>L.mainmenuVisible,"get"),set:i((L,ee)=>{L.mainmenuVisible=ee},"set")},metadata:D},$e,ze),ha(this,null,Me,{kind:"accessor",name:"secondarymenuVisible",static:!1,private:!1,access:{has:i(L=>"secondarymenuVisible"in L,"has"),get:i(L=>L.secondarymenuVisible,"get"),set:i((L,ee)=>{L.secondarymenuVisible=ee},"set")},metadata:D},pe,be),ha(this,null,Ae,{kind:"accessor",name:"maincontentTabsVisible",static:!1,private:!1,access:{has:i(L=>"maincontentTabsVisible"in L,"has"),get:i(L=>L.maincontentTabsVisible,"get"),set:i((L,ee)=>{L.maincontentTabsVisible=ee},"set")},metadata:D},Ze,nt),ha(this,null,_t,{kind:"accessor",name:"contentTabsAutoHide",static:!1,private:!1,access:{has:i(L=>"contentTabsAutoHide"in L,"has"),get:i(L=>L.contentTabsAutoHide,"get"),set:i((L,ee)=>{L.contentTabsAutoHide=ee},"set")},metadata:D},_e,we),ha(this,null,Ne,{kind:"accessor",name:"contentTabsAutoHideThreshold",static:!1,private:!1,access:{has:i(L=>"contentTabsAutoHideThreshold"in L,"has"),get:i(L=>L.contentTabsAutoHideThreshold,"get"),set:i((L,ee)=>{L.contentTabsAutoHideThreshold=ee},"set")},metadata:D},fe,ge),ha(this,null,Pe,{kind:"accessor",name:"activityLogVisible",static:!1,private:!1,access:{has:i(L=>"activityLogVisible"in L,"has"),get:i(L=>L.activityLogVisible,"get"),set:i((L,ee)=>{L.activityLogVisible=ee},"set")},metadata:D},bt,vt),ha(this,null,Ft,{kind:"accessor",name:"activityLogCount",static:!1,private:!1,access:{has:i(L=>"activityLogCount"in L,"has"),get:i(L=>L.activityLogCount,"get"),set:i((L,ee)=>{L.activityLogCount=ee},"set")},metadata:D},Ja,tr),ha(this,null,gi,{kind:"accessor",name:"maincontentTabs",static:!1,private:!1,access:{has:i(L=>"maincontentTabs"in L,"has"),get:i(L=>L.maincontentTabs,"get"),set:i((L,ee)=>{L.maincontentTabs=ee},"set")},metadata:D},Ue,mt),ha(this,null,er,{kind:"accessor",name:"maincontentSelectedTab",static:!1,private:!1,access:{has:i(L=>"maincontentSelectedTab"in L,"has"),get:i(L=>L.maincontentSelectedTab,"get"),set:i((L,ee)=>{L.maincontentSelectedTab=ee},"set")},metadata:D},Sr,Ar),ha(this,null,Wr,{kind:"accessor",name:"contentTabActionsLeft",static:!1,private:!1,access:{has:i(L=>"contentTabActionsLeft"in L,"has"),get:i(L=>L.contentTabActionsLeft,"get"),set:i((L,ee)=>{L.contentTabActionsLeft=ee},"set")},metadata:D},Ir,go),ha(this,null,bo,{kind:"accessor",name:"contentTabActionsRight",static:!1,private:!1,access:{has:i(L=>"contentTabActionsRight"in L,"has"),get:i(L=>L.contentTabActionsRight,"get"),set:i((L,ee)=>{L.contentTabActionsRight=ee},"set")},metadata:D},Le,Se),ha(this,null,Be,{kind:"accessor",name:"appbar",static:!1,private:!1,access:{has:i(L=>"appbar"in L,"has"),get:i(L=>L.appbar,"get"),set:i((L,ee)=>{L.appbar=ee},"set")},metadata:D},oa,bi),ha(this,null,O2,{kind:"accessor",name:"mainmenu",static:!1,private:!1,access:{has:i(L=>"mainmenu"in L,"has"),get:i(L=>L.mainmenu,"get"),set:i((L,ee)=>{L.mainmenu=ee},"set")},metadata:D},xe,ce),ha(this,null,Te,{kind:"accessor",name:"secondarymenu",static:!1,private:!1,access:{has:i(L=>"secondarymenu"in L,"has"),get:i(L=>L.secondarymenu,"get"),set:i((L,ee)=>{L.secondarymenu=ee},"set")},metadata:D},We,Ct),ha(this,null,vi,{kind:"accessor",name:"maincontent",static:!1,private:!1,access:{has:i(L=>"maincontent"in L,"has"),get:i(L=>L.maincontent,"get"),set:i((L,ee)=>{L.maincontent=ee},"set")},metadata:D},Gr,Bs),ha(this,null,Nn,{kind:"accessor",name:"activitylogElement",static:!1,private:!1,access:{has:i(L=>"activitylogElement"in L,"has"),get:i(L=>L.activitylogElement,"get"),set:i((L,ee)=>{L.activitylogElement=ee},"set")},metadata:D},I1,B2),ha(this,null,Rn,{kind:"accessor",name:"bottombarElement",static:!1,private:!1,access:{has:i(L=>"bottombarElement"in L,"has"),get:i(L=>L.bottombarElement,"get"),set:i((L,ee)=>{L.bottombarElement=ee},"set")},metadata:D},D4,u7),ha(this,null,p7,{kind:"accessor",name:"bottombarVisible",static:!1,private:!1,access:{has:i(L=>"bottombarVisible"in L,"has"),get:i(L=>L.bottombarVisible,"get"),set:i((L,ee)=>{L.bottombarVisible=ee},"set")},metadata:D},f7,h7),ha(this,null,m7,{kind:"accessor",name:"currentView",static:!1,private:!1,access:{has:i(L=>"currentView"in L,"has"),get:i(L=>L.currentView,"get"),set:i((L,ee)=>{L.currentView=ee},"set")},metadata:D},g7,b7),ha(null,e={value:r},t,{kind:"class",name:r.name,metadata:D},null,a),v7=r=e.value,D&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:D})}static demo=m0a;static demoGroups=["App UI"];viewLifecycle$=new jt.smartrx.rxjs.Subject;viewChanged$=new jt.smartrx.rxjs.Subject;#e=ot(this,n,[]);get appbarMenuItems(){return this.#e}set appbarMenuItems(D){this.#e=D}#t=(ot(this,l),ot(this,d,""));get appbarBreadcrumbs(){return this.#t}set appbarBreadcrumbs(D){this.#t=D}#a=(ot(this,u),ot(this,m," > "));get appbarBreadcrumbSeparator(){return this.#a}set appbarBreadcrumbSeparator(D){this.#a=D}#r=(ot(this,v),ot(this,b,!0));get appbarShowWindowControls(){return this.#r}set appbarShowWindowControls(D){this.#r=D}#i=(ot(this,g),ot(this,k,void 0));get appbarUser(){return this.#i}set appbarUser(D){this.#i=D}#s=(ot(this,C),ot(this,T,[]));get appbarProfileMenuItems(){return this.#s}set appbarProfileMenuItems(D){this.#s=D}#o=(ot(this,S),ot(this,_,!1));get appbarShowSearch(){return this.#o}set appbarShowSearch(D){this.#o=D}#n=(ot(this,I),ot(this,M,""));get mainmenuLogoIcon(){return this.#n}set mainmenuLogoIcon(D){this.#n=D}#l=(ot(this,z),ot(this,A,""));get mainmenuLogoText(){return this.#l}set mainmenuLogoText(D){this.#l=D}#c=(ot(this,F),ot(this,j,[]));get mainmenuGroups(){return this.#c}set mainmenuGroups(D){this.#c=D}#d=(ot(this,U),ot(this,B,[]));get mainmenuBottomTabs(){return this.#d}set mainmenuBottomTabs(D){this.#d=D}#u=(ot(this,J),ot(this,P,[]));get mainmenuTabs(){return this.#u}set mainmenuTabs(D){this.#u=D}#p=(ot(this,H),ot(this,ue,void 0));get mainmenuSelectedTab(){return this.#p}set mainmenuSelectedTab(D){this.#p=D}#f=(ot(this,Y),ot(this,Q,""));get secondarymenuHeading(){return this.#f}set secondarymenuHeading(D){this.#f=D}#h=(ot(this,Z),ot(this,ae,[]));get secondarymenuGroups(){return this.#h}set secondarymenuGroups(D){this.#h=D}#m=(ot(this,re),ot(this,V,void 0));get secondarymenuSelectedItem(){return this.#m}set secondarymenuSelectedItem(D){this.#m=D}#g=(ot(this,q),ot(this,se,!1));get mainmenuCollapsed(){return this.#g}set mainmenuCollapsed(D){this.#g=D}#b=(ot(this,te),ot(this,Fe,!1));get secondarymenuCollapsed(){return this.#b}set secondarymenuCollapsed(D){this.#b=D}#v=(ot(this,Ve),ot(this,$e,!0));get mainmenuVisible(){return this.#v}set mainmenuVisible(D){this.#v=D}#x=(ot(this,ze),ot(this,pe,!0));get secondarymenuVisible(){return this.#x}set secondarymenuVisible(D){this.#x=D}#y=(ot(this,be),ot(this,Ze,!0));get maincontentTabsVisible(){return this.#y}set maincontentTabsVisible(D){this.#y=D}#w=(ot(this,nt),ot(this,_e,!1));get contentTabsAutoHide(){return this.#w}set contentTabsAutoHide(D){this.#w=D}#M=(ot(this,we),ot(this,fe,0));get contentTabsAutoHideThreshold(){return this.#M}set contentTabsAutoHideThreshold(D){this.#M=D}#k=(ot(this,ge),ot(this,bt,!1));get activityLogVisible(){return this.#k}set activityLogVisible(D){this.#k=D}#S=(ot(this,vt),ot(this,Ja,0));get activityLogCount(){return this.#S}set activityLogCount(D){this.#S=D}#C=(ot(this,tr),ot(this,Ue,[]));get maincontentTabs(){return this.#C}set maincontentTabs(D){this.#C=D}#z=(ot(this,mt),ot(this,Sr,void 0));get maincontentSelectedTab(){return this.#z}set maincontentSelectedTab(D){this.#z=D}#T=(ot(this,Ar),ot(this,Ir,[]));get contentTabActionsLeft(){return this.#T}set contentTabActionsLeft(D){this.#T=D}#_=(ot(this,go),ot(this,Le,[]));get contentTabActionsRight(){return this.#_}set contentTabActionsRight(D){this.#_=D}#L=(ot(this,Se),ot(this,oa,void 0));get appbar(){return this.#L}set appbar(D){this.#L=D}#$=(ot(this,bi),ot(this,xe,void 0));get mainmenu(){return this.#$}set mainmenu(D){this.#$=D}#D=(ot(this,ce),ot(this,We,void 0));get secondarymenu(){return this.#D}set secondarymenu(D){this.#D=D}#A=(ot(this,Ct),ot(this,Gr,void 0));get maincontent(){return this.#A}set maincontent(D){this.#A=D}#I=(ot(this,Bs),ot(this,I1,void 0));get activitylogElement(){return this.#I}set activitylogElement(D){this.#I=D}#P=(ot(this,B2),ot(this,D4,void 0));get bottombarElement(){return this.#P}set bottombarElement(D){this.#P=D}#E=(ot(this,u7),ot(this,f7,!0));get bottombarVisible(){return this.#E}set bottombarVisible(D){this.#E=D}#N=(ot(this,h7),ot(this,g7,void 0));get currentView(){return this.#N}set currentView(D){this.#N=D}viewRegistry=(ot(this,b7),new tW);routerCleanup=null;searchCallback=null;static styles=[Ie,h.defaultStyles,W`
19229
+ `}handleTabSelect(M){this.selectedTab=M.detail.tab,this.dispatchEvent(new CustomEvent("tab-select",{detail:M.detail,bubbles:!0,composed:!0}))}handleTabClose(M){this.dispatchEvent(new CustomEvent("tab-close",{detail:M.detail,bubbles:!0,composed:!0}))}updated(M){super.updated(M),M.has("showTabs")&&(this.showTabs?this.removeAttribute("notabs"):this.setAttribute("notabs",""))}async firstUpdated(M){await super.firstUpdated(M),this.showTabs||this.setAttribute("notabs","");let z=this.shadowRoot.querySelector("dees-appui-tabs");z&&await z.updateComplete}constructor(){super(...arguments),ao(this,I)}static{ao(r,a)}};return O=r})()});var ha,ot,T0a,_0a=f(()=>{le();ea();z0();g0a();tt();MXe();BGe();HGe();kXe();SXe();zXe();EGe();ha=function(t,e,a,r,s,o){function n(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}i(n,"accept");for(var l=r.kind,c=l==="getter"?"get":l==="setter"?"set":"value",d=!e&&t?r.static?t:t.prototype:null,u=e||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p,m=!1,v=a.length-1;v>=0;v--){var x={};for(var b in r)x[b]=b==="access"?{}:r[b];for(var b in r.access)x.access[b]=r.access[b];x.addInitializer=function(y){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(n(y||null))};var g=(0,a[v])(l==="accessor"?{get:u.get,set:u.set}:u[c],x);if(l==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(p=n(g.get))&&(u.get=p),(p=n(g.set))&&(u.set=p),(p=n(g.init))&&s.unshift(p)}else(p=n(g))&&(l==="field"?s.unshift(p):u[c]=p)}d&&Object.defineProperty(d,r.name,u),m=!0},ot=function(t,e,a){for(var r=arguments.length>2,s=0;s<e.length;s++)a=r?e[s].call(t,a):e[s].call(t);return r?a:void 0},T0a=(()=>{let t=[ie("dees-appui")],e,a=[],r,s=ne,o,n=[],l=[],c,d=[],u=[],p,m=[],v=[],x,b=[],g=[],y,k=[],C=[],R,T=[],S=[],N,_=[],I=[],O,M=[],z=[],E,A=[],F=[],K,j=[],U=[],he,B=[],J=[],ve,P=[],H=[],de,ue=[],Y=[],X,Q=[],Z=[],me,ae=[],re=[],ye,V=[],q=[],oe,se=[],te=[],Ce,Fe=[],Ve=[],dt,$e=[],ze=[],Me,pe=[],be=[],Ae,Ke=[],nt=[],_t,_e=[],we=[],Ne,fe=[],ge=[],Pe,bt=[],vt=[],Ft,Ja=[],tr=[],gi,Ue=[],mt=[],er,Sr=[],Ar=[],Wr,Ir=[],go=[],bo,Le=[],Se=[],Be,oa=[],bi=[],O2,xe=[],ce=[],Te,We=[],Ct=[],vi,Gr=[],Bs=[],Nn,I1=[],B2=[],Rn,D4=[],u7=[],p7,f7=[],h7=[],m7,g7=[],b7=[];var v7=class extends s{static{i(this,"DeesAppui")}static{r=this}static{let D=typeof Symbol=="function"&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;o=[$({type:Array})],c=[$({type:String})],p=[$({type:String})],x=[$({type:Boolean})],y=[$({type:Object})],R=[$({type:Array})],N=[$({type:Boolean})],O=[$({type:String})],E=[$({type:String})],K=[$({type:Array})],he=[$({type:Array})],ve=[$({type:Array})],de=[$({type:Object})],X=[$({type:String})],me=[$({type:Array})],ye=[$({type:Object})],oe=[$({type:Boolean})],Ce=[$({type:Boolean})],dt=[$({type:Boolean})],Me=[$({type:Boolean})],Ae=[$({type:Boolean})],_t=[$({type:Boolean})],Ne=[$({type:Number})],Pe=[G()],Ft=[G()],gi=[$({type:Array})],er=[$({type:Object})],Wr=[$({type:Array})],bo=[$({type:Array})],Be=[G()],O2=[G()],Te=[G()],vi=[G()],Nn=[G()],Rn=[G()],p7=[G()],m7=[G()],ha(this,null,o,{kind:"accessor",name:"appbarMenuItems",static:!1,private:!1,access:{has:i(L=>"appbarMenuItems"in L,"has"),get:i(L=>L.appbarMenuItems,"get"),set:i((L,ee)=>{L.appbarMenuItems=ee},"set")},metadata:D},n,l),ha(this,null,c,{kind:"accessor",name:"appbarBreadcrumbs",static:!1,private:!1,access:{has:i(L=>"appbarBreadcrumbs"in L,"has"),get:i(L=>L.appbarBreadcrumbs,"get"),set:i((L,ee)=>{L.appbarBreadcrumbs=ee},"set")},metadata:D},d,u),ha(this,null,p,{kind:"accessor",name:"appbarBreadcrumbSeparator",static:!1,private:!1,access:{has:i(L=>"appbarBreadcrumbSeparator"in L,"has"),get:i(L=>L.appbarBreadcrumbSeparator,"get"),set:i((L,ee)=>{L.appbarBreadcrumbSeparator=ee},"set")},metadata:D},m,v),ha(this,null,x,{kind:"accessor",name:"appbarShowWindowControls",static:!1,private:!1,access:{has:i(L=>"appbarShowWindowControls"in L,"has"),get:i(L=>L.appbarShowWindowControls,"get"),set:i((L,ee)=>{L.appbarShowWindowControls=ee},"set")},metadata:D},b,g),ha(this,null,y,{kind:"accessor",name:"appbarUser",static:!1,private:!1,access:{has:i(L=>"appbarUser"in L,"has"),get:i(L=>L.appbarUser,"get"),set:i((L,ee)=>{L.appbarUser=ee},"set")},metadata:D},k,C),ha(this,null,R,{kind:"accessor",name:"appbarProfileMenuItems",static:!1,private:!1,access:{has:i(L=>"appbarProfileMenuItems"in L,"has"),get:i(L=>L.appbarProfileMenuItems,"get"),set:i((L,ee)=>{L.appbarProfileMenuItems=ee},"set")},metadata:D},T,S),ha(this,null,N,{kind:"accessor",name:"appbarShowSearch",static:!1,private:!1,access:{has:i(L=>"appbarShowSearch"in L,"has"),get:i(L=>L.appbarShowSearch,"get"),set:i((L,ee)=>{L.appbarShowSearch=ee},"set")},metadata:D},_,I),ha(this,null,O,{kind:"accessor",name:"mainmenuLogoIcon",static:!1,private:!1,access:{has:i(L=>"mainmenuLogoIcon"in L,"has"),get:i(L=>L.mainmenuLogoIcon,"get"),set:i((L,ee)=>{L.mainmenuLogoIcon=ee},"set")},metadata:D},M,z),ha(this,null,E,{kind:"accessor",name:"mainmenuLogoText",static:!1,private:!1,access:{has:i(L=>"mainmenuLogoText"in L,"has"),get:i(L=>L.mainmenuLogoText,"get"),set:i((L,ee)=>{L.mainmenuLogoText=ee},"set")},metadata:D},A,F),ha(this,null,K,{kind:"accessor",name:"mainmenuGroups",static:!1,private:!1,access:{has:i(L=>"mainmenuGroups"in L,"has"),get:i(L=>L.mainmenuGroups,"get"),set:i((L,ee)=>{L.mainmenuGroups=ee},"set")},metadata:D},j,U),ha(this,null,he,{kind:"accessor",name:"mainmenuBottomTabs",static:!1,private:!1,access:{has:i(L=>"mainmenuBottomTabs"in L,"has"),get:i(L=>L.mainmenuBottomTabs,"get"),set:i((L,ee)=>{L.mainmenuBottomTabs=ee},"set")},metadata:D},B,J),ha(this,null,ve,{kind:"accessor",name:"mainmenuTabs",static:!1,private:!1,access:{has:i(L=>"mainmenuTabs"in L,"has"),get:i(L=>L.mainmenuTabs,"get"),set:i((L,ee)=>{L.mainmenuTabs=ee},"set")},metadata:D},P,H),ha(this,null,de,{kind:"accessor",name:"mainmenuSelectedTab",static:!1,private:!1,access:{has:i(L=>"mainmenuSelectedTab"in L,"has"),get:i(L=>L.mainmenuSelectedTab,"get"),set:i((L,ee)=>{L.mainmenuSelectedTab=ee},"set")},metadata:D},ue,Y),ha(this,null,X,{kind:"accessor",name:"secondarymenuHeading",static:!1,private:!1,access:{has:i(L=>"secondarymenuHeading"in L,"has"),get:i(L=>L.secondarymenuHeading,"get"),set:i((L,ee)=>{L.secondarymenuHeading=ee},"set")},metadata:D},Q,Z),ha(this,null,me,{kind:"accessor",name:"secondarymenuGroups",static:!1,private:!1,access:{has:i(L=>"secondarymenuGroups"in L,"has"),get:i(L=>L.secondarymenuGroups,"get"),set:i((L,ee)=>{L.secondarymenuGroups=ee},"set")},metadata:D},ae,re),ha(this,null,ye,{kind:"accessor",name:"secondarymenuSelectedItem",static:!1,private:!1,access:{has:i(L=>"secondarymenuSelectedItem"in L,"has"),get:i(L=>L.secondarymenuSelectedItem,"get"),set:i((L,ee)=>{L.secondarymenuSelectedItem=ee},"set")},metadata:D},V,q),ha(this,null,oe,{kind:"accessor",name:"mainmenuCollapsed",static:!1,private:!1,access:{has:i(L=>"mainmenuCollapsed"in L,"has"),get:i(L=>L.mainmenuCollapsed,"get"),set:i((L,ee)=>{L.mainmenuCollapsed=ee},"set")},metadata:D},se,te),ha(this,null,Ce,{kind:"accessor",name:"secondarymenuCollapsed",static:!1,private:!1,access:{has:i(L=>"secondarymenuCollapsed"in L,"has"),get:i(L=>L.secondarymenuCollapsed,"get"),set:i((L,ee)=>{L.secondarymenuCollapsed=ee},"set")},metadata:D},Fe,Ve),ha(this,null,dt,{kind:"accessor",name:"mainmenuVisible",static:!1,private:!1,access:{has:i(L=>"mainmenuVisible"in L,"has"),get:i(L=>L.mainmenuVisible,"get"),set:i((L,ee)=>{L.mainmenuVisible=ee},"set")},metadata:D},$e,ze),ha(this,null,Me,{kind:"accessor",name:"secondarymenuVisible",static:!1,private:!1,access:{has:i(L=>"secondarymenuVisible"in L,"has"),get:i(L=>L.secondarymenuVisible,"get"),set:i((L,ee)=>{L.secondarymenuVisible=ee},"set")},metadata:D},pe,be),ha(this,null,Ae,{kind:"accessor",name:"maincontentTabsVisible",static:!1,private:!1,access:{has:i(L=>"maincontentTabsVisible"in L,"has"),get:i(L=>L.maincontentTabsVisible,"get"),set:i((L,ee)=>{L.maincontentTabsVisible=ee},"set")},metadata:D},Ke,nt),ha(this,null,_t,{kind:"accessor",name:"contentTabsAutoHide",static:!1,private:!1,access:{has:i(L=>"contentTabsAutoHide"in L,"has"),get:i(L=>L.contentTabsAutoHide,"get"),set:i((L,ee)=>{L.contentTabsAutoHide=ee},"set")},metadata:D},_e,we),ha(this,null,Ne,{kind:"accessor",name:"contentTabsAutoHideThreshold",static:!1,private:!1,access:{has:i(L=>"contentTabsAutoHideThreshold"in L,"has"),get:i(L=>L.contentTabsAutoHideThreshold,"get"),set:i((L,ee)=>{L.contentTabsAutoHideThreshold=ee},"set")},metadata:D},fe,ge),ha(this,null,Pe,{kind:"accessor",name:"activityLogVisible",static:!1,private:!1,access:{has:i(L=>"activityLogVisible"in L,"has"),get:i(L=>L.activityLogVisible,"get"),set:i((L,ee)=>{L.activityLogVisible=ee},"set")},metadata:D},bt,vt),ha(this,null,Ft,{kind:"accessor",name:"activityLogCount",static:!1,private:!1,access:{has:i(L=>"activityLogCount"in L,"has"),get:i(L=>L.activityLogCount,"get"),set:i((L,ee)=>{L.activityLogCount=ee},"set")},metadata:D},Ja,tr),ha(this,null,gi,{kind:"accessor",name:"maincontentTabs",static:!1,private:!1,access:{has:i(L=>"maincontentTabs"in L,"has"),get:i(L=>L.maincontentTabs,"get"),set:i((L,ee)=>{L.maincontentTabs=ee},"set")},metadata:D},Ue,mt),ha(this,null,er,{kind:"accessor",name:"maincontentSelectedTab",static:!1,private:!1,access:{has:i(L=>"maincontentSelectedTab"in L,"has"),get:i(L=>L.maincontentSelectedTab,"get"),set:i((L,ee)=>{L.maincontentSelectedTab=ee},"set")},metadata:D},Sr,Ar),ha(this,null,Wr,{kind:"accessor",name:"contentTabActionsLeft",static:!1,private:!1,access:{has:i(L=>"contentTabActionsLeft"in L,"has"),get:i(L=>L.contentTabActionsLeft,"get"),set:i((L,ee)=>{L.contentTabActionsLeft=ee},"set")},metadata:D},Ir,go),ha(this,null,bo,{kind:"accessor",name:"contentTabActionsRight",static:!1,private:!1,access:{has:i(L=>"contentTabActionsRight"in L,"has"),get:i(L=>L.contentTabActionsRight,"get"),set:i((L,ee)=>{L.contentTabActionsRight=ee},"set")},metadata:D},Le,Se),ha(this,null,Be,{kind:"accessor",name:"appbar",static:!1,private:!1,access:{has:i(L=>"appbar"in L,"has"),get:i(L=>L.appbar,"get"),set:i((L,ee)=>{L.appbar=ee},"set")},metadata:D},oa,bi),ha(this,null,O2,{kind:"accessor",name:"mainmenu",static:!1,private:!1,access:{has:i(L=>"mainmenu"in L,"has"),get:i(L=>L.mainmenu,"get"),set:i((L,ee)=>{L.mainmenu=ee},"set")},metadata:D},xe,ce),ha(this,null,Te,{kind:"accessor",name:"secondarymenu",static:!1,private:!1,access:{has:i(L=>"secondarymenu"in L,"has"),get:i(L=>L.secondarymenu,"get"),set:i((L,ee)=>{L.secondarymenu=ee},"set")},metadata:D},We,Ct),ha(this,null,vi,{kind:"accessor",name:"maincontent",static:!1,private:!1,access:{has:i(L=>"maincontent"in L,"has"),get:i(L=>L.maincontent,"get"),set:i((L,ee)=>{L.maincontent=ee},"set")},metadata:D},Gr,Bs),ha(this,null,Nn,{kind:"accessor",name:"activitylogElement",static:!1,private:!1,access:{has:i(L=>"activitylogElement"in L,"has"),get:i(L=>L.activitylogElement,"get"),set:i((L,ee)=>{L.activitylogElement=ee},"set")},metadata:D},I1,B2),ha(this,null,Rn,{kind:"accessor",name:"bottombarElement",static:!1,private:!1,access:{has:i(L=>"bottombarElement"in L,"has"),get:i(L=>L.bottombarElement,"get"),set:i((L,ee)=>{L.bottombarElement=ee},"set")},metadata:D},D4,u7),ha(this,null,p7,{kind:"accessor",name:"bottombarVisible",static:!1,private:!1,access:{has:i(L=>"bottombarVisible"in L,"has"),get:i(L=>L.bottombarVisible,"get"),set:i((L,ee)=>{L.bottombarVisible=ee},"set")},metadata:D},f7,h7),ha(this,null,m7,{kind:"accessor",name:"currentView",static:!1,private:!1,access:{has:i(L=>"currentView"in L,"has"),get:i(L=>L.currentView,"get"),set:i((L,ee)=>{L.currentView=ee},"set")},metadata:D},g7,b7),ha(null,e={value:r},t,{kind:"class",name:r.name,metadata:D},null,a),v7=r=e.value,D&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:D})}static demo=m0a;static demoGroups=["App UI"];viewLifecycle$=new jt.smartrx.rxjs.Subject;viewChanged$=new jt.smartrx.rxjs.Subject;#e=ot(this,n,[]);get appbarMenuItems(){return this.#e}set appbarMenuItems(D){this.#e=D}#t=(ot(this,l),ot(this,d,""));get appbarBreadcrumbs(){return this.#t}set appbarBreadcrumbs(D){this.#t=D}#a=(ot(this,u),ot(this,m," > "));get appbarBreadcrumbSeparator(){return this.#a}set appbarBreadcrumbSeparator(D){this.#a=D}#r=(ot(this,v),ot(this,b,!0));get appbarShowWindowControls(){return this.#r}set appbarShowWindowControls(D){this.#r=D}#i=(ot(this,g),ot(this,k,void 0));get appbarUser(){return this.#i}set appbarUser(D){this.#i=D}#s=(ot(this,C),ot(this,T,[]));get appbarProfileMenuItems(){return this.#s}set appbarProfileMenuItems(D){this.#s=D}#o=(ot(this,S),ot(this,_,!1));get appbarShowSearch(){return this.#o}set appbarShowSearch(D){this.#o=D}#n=(ot(this,I),ot(this,M,""));get mainmenuLogoIcon(){return this.#n}set mainmenuLogoIcon(D){this.#n=D}#l=(ot(this,z),ot(this,A,""));get mainmenuLogoText(){return this.#l}set mainmenuLogoText(D){this.#l=D}#c=(ot(this,F),ot(this,j,[]));get mainmenuGroups(){return this.#c}set mainmenuGroups(D){this.#c=D}#d=(ot(this,U),ot(this,B,[]));get mainmenuBottomTabs(){return this.#d}set mainmenuBottomTabs(D){this.#d=D}#u=(ot(this,J),ot(this,P,[]));get mainmenuTabs(){return this.#u}set mainmenuTabs(D){this.#u=D}#p=(ot(this,H),ot(this,ue,void 0));get mainmenuSelectedTab(){return this.#p}set mainmenuSelectedTab(D){this.#p=D}#f=(ot(this,Y),ot(this,Q,""));get secondarymenuHeading(){return this.#f}set secondarymenuHeading(D){this.#f=D}#h=(ot(this,Z),ot(this,ae,[]));get secondarymenuGroups(){return this.#h}set secondarymenuGroups(D){this.#h=D}#m=(ot(this,re),ot(this,V,void 0));get secondarymenuSelectedItem(){return this.#m}set secondarymenuSelectedItem(D){this.#m=D}#g=(ot(this,q),ot(this,se,!1));get mainmenuCollapsed(){return this.#g}set mainmenuCollapsed(D){this.#g=D}#b=(ot(this,te),ot(this,Fe,!1));get secondarymenuCollapsed(){return this.#b}set secondarymenuCollapsed(D){this.#b=D}#v=(ot(this,Ve),ot(this,$e,!0));get mainmenuVisible(){return this.#v}set mainmenuVisible(D){this.#v=D}#x=(ot(this,ze),ot(this,pe,!0));get secondarymenuVisible(){return this.#x}set secondarymenuVisible(D){this.#x=D}#y=(ot(this,be),ot(this,Ke,!0));get maincontentTabsVisible(){return this.#y}set maincontentTabsVisible(D){this.#y=D}#w=(ot(this,nt),ot(this,_e,!1));get contentTabsAutoHide(){return this.#w}set contentTabsAutoHide(D){this.#w=D}#M=(ot(this,we),ot(this,fe,0));get contentTabsAutoHideThreshold(){return this.#M}set contentTabsAutoHideThreshold(D){this.#M=D}#k=(ot(this,ge),ot(this,bt,!1));get activityLogVisible(){return this.#k}set activityLogVisible(D){this.#k=D}#S=(ot(this,vt),ot(this,Ja,0));get activityLogCount(){return this.#S}set activityLogCount(D){this.#S=D}#C=(ot(this,tr),ot(this,Ue,[]));get maincontentTabs(){return this.#C}set maincontentTabs(D){this.#C=D}#z=(ot(this,mt),ot(this,Sr,void 0));get maincontentSelectedTab(){return this.#z}set maincontentSelectedTab(D){this.#z=D}#T=(ot(this,Ar),ot(this,Ir,[]));get contentTabActionsLeft(){return this.#T}set contentTabActionsLeft(D){this.#T=D}#_=(ot(this,go),ot(this,Le,[]));get contentTabActionsRight(){return this.#_}set contentTabActionsRight(D){this.#_=D}#L=(ot(this,Se),ot(this,oa,void 0));get appbar(){return this.#L}set appbar(D){this.#L=D}#$=(ot(this,bi),ot(this,xe,void 0));get mainmenu(){return this.#$}set mainmenu(D){this.#$=D}#D=(ot(this,ce),ot(this,We,void 0));get secondarymenu(){return this.#D}set secondarymenu(D){this.#D=D}#A=(ot(this,Ct),ot(this,Gr,void 0));get maincontent(){return this.#A}set maincontent(D){this.#A=D}#I=(ot(this,Bs),ot(this,I1,void 0));get activitylogElement(){return this.#I}set activitylogElement(D){this.#I=D}#P=(ot(this,B2),ot(this,D4,void 0));get bottombarElement(){return this.#P}set bottombarElement(D){this.#P=D}#E=(ot(this,u7),ot(this,f7,!0));get bottombarVisible(){return this.#E}set bottombarVisible(D){this.#E=D}#N=(ot(this,h7),ot(this,g7,void 0));get currentView(){return this.#N}set currentView(D){this.#N=D}viewRegistry=(ot(this,b7),new tW);routerCleanup=null;searchCallback=null;static styles=[Ie,h.defaultStyles,W`
19230
19230
  :host {
19231
19231
  position: absolute;
19232
19232
  height: 100%;
@@ -19367,7 +19367,7 @@ ${JSON.stringify(o,null,2)}`,await At.plugins.smartdelay.delayFor(2e3),e.setStat
19367
19367
  ${this.bottombarVisible?w`
19368
19368
  <dees-appui-bottombar></dees-appui-bottombar>
19369
19369
  `:""}
19370
- `}async firstUpdated(){this.appbar=this.shadowRoot.querySelector("dees-appui-appbar"),this.mainmenu=this.shadowRoot.querySelector("dees-appui-mainmenu"),this.secondarymenu=this.shadowRoot.querySelector("dees-appui-secondarymenu"),this.maincontent=this.shadowRoot.querySelector("dees-appui-maincontent"),this.activitylogElement=this.shadowRoot.querySelector("dees-appui-activitylog"),this.bottombarElement=this.shadowRoot.querySelector("dees-appui-bottombar"),this.activitylogElement&&this.activitylogElement.entries$.subscribe(D=>{this.activityLogCount=D.length}),this.viewRegistry.setAppuiRef(this)}async disconnectedCallback(){await super.disconnectedCallback(),this.routerCleanup&&(this.routerCleanup(),this.routerCleanup=null),this.viewLifecycle$.complete(),this.viewChanged$.complete()}setAppBarMenus(D){this.appbarMenuItems=[...D]}updateAppBarMenu(D,L){this.appbarMenuItems=this.appbarMenuItems.map(ee=>"name"in ee&&ee.name===D?{...ee,...L}:ee)}setBreadcrumbs(D){Array.isArray(D)?this.appbarBreadcrumbs=D.join(this.appbarBreadcrumbSeparator):this.appbarBreadcrumbs=D}setUser(D){this.appbarUser=D}setProfileMenuItems(D){this.appbarProfileMenuItems=[...D]}setSearchVisible(D){this.appbarShowSearch=D}setWindowControlsVisible(D){this.appbarShowWindowControls=D}onSearch(D){this.searchCallback=D}setMainMenu(D){D.logoIcon!==void 0&&(this.mainmenuLogoIcon=D.logoIcon),D.logoText!==void 0&&(this.mainmenuLogoText=D.logoText),D.groups!==void 0&&(this.mainmenuGroups=[...D.groups]),D.bottomTabs!==void 0&&(this.mainmenuBottomTabs=[...D.bottomTabs])}updateMainMenuGroup(D,L){this.mainmenuGroups=this.mainmenuGroups.map(ee=>ee.name===D?{...ee,...L}:ee)}addMainMenuItem(D,L){this.mainmenuGroups=this.mainmenuGroups.map(ee=>ee.name===D?{...ee,items:[...ee.items||[],L]}:ee)}removeMainMenuItem(D,L){this.mainmenuGroups=this.mainmenuGroups.map(ee=>ee.name===D?{...ee,items:(ee.items||[]).filter(De=>De.key!==L)}:ee)}setMainMenuSelection(D){for(let ee of this.mainmenuGroups){let De=ee.items?.find(Re=>Re.key===D);if(De){this.mainmenuSelectedTab=De;return}}let L=this.mainmenuBottomTabs.find(ee=>ee.key===D);L&&(this.mainmenuSelectedTab=L)}setMainMenuCollapsed(D){this.mainmenuCollapsed=D}setMainMenuVisible(D){this.mainmenuVisible=D}setSecondaryMenuCollapsed(D){this.secondarymenuCollapsed=D}setSecondaryMenuVisible(D){this.secondarymenuVisible=D}setContentTabsVisible(D){this.maincontentTabsVisible=D}setContentTabsAutoHide(D,L=0){this.contentTabsAutoHide=D,this.contentTabsAutoHideThreshold=L}setMainMenuBadge(D,L){this.mainmenuGroups=this.mainmenuGroups.map(ee=>({...ee,items:(ee.items||[]).map(De=>De.key===D?{...De,badge:L}:De)})),this.mainmenuBottomTabs=this.mainmenuBottomTabs.map(ee=>ee.key===D?{...ee,badge:L}:ee)}clearMainMenuBadge(D){this.mainmenuGroups=this.mainmenuGroups.map(L=>({...L,items:(L.items||[]).map(ee=>{if(ee.key===D){let{badge:De,...Re}=ee;return Re}return ee})})),this.mainmenuBottomTabs=this.mainmenuBottomTabs.map(L=>{if(L.key===D){let{badge:ee,...De}=L;return De}return L})}setSecondaryMenu(D){D.heading!==void 0&&(this.secondarymenuHeading=D.heading),this.secondarymenuGroups=[...D.groups]}updateSecondaryMenuGroup(D,L){this.secondarymenuGroups=this.secondarymenuGroups.map(ee=>ee.name===D?{...ee,...L}:ee)}addSecondaryMenuItem(D,L){this.secondarymenuGroups=this.secondarymenuGroups.map(ee=>ee.name===D?{...ee,items:[...ee.items,L]}:ee)}setSecondaryMenuSelection(D){for(let L of this.secondarymenuGroups){let ee=L.items.find(De=>"key"in De&&De.key===D);if(ee&&(!("type"in ee)||ee.type==="tab"||ee.type===void 0)){this.secondarymenuSelectedItem=ee;return}}}clearSecondaryMenu(){this.secondarymenuHeading="",this.secondarymenuGroups=[],this.secondarymenuSelectedItem=void 0}setContentTabs(D){this.maincontentTabs=[...D],D.length>0&&!this.maincontentSelectedTab&&(this.maincontentSelectedTab=D[0])}addContentTab(D){this.maincontentTabs=[...this.maincontentTabs,D]}removeContentTab(D){this.maincontentTabs=this.maincontentTabs.filter(L=>L.key!==D),this.maincontentSelectedTab?.key===D&&(this.maincontentSelectedTab=this.maincontentTabs[0])}selectContentTab(D){let L=this.maincontentTabs.find(ee=>ee.key===D);L&&(this.maincontentSelectedTab=L)}getSelectedContentTab(){return this.maincontentSelectedTab}setContentTabActionsLeft(D){this.contentTabActionsLeft=[...D]}setContentTabActionsRight(D){this.contentTabActionsRight=[...D]}get activityLog(){return this.activitylogElement?{add:i(D=>this.activitylogElement.add(D),"add"),addMany:i(D=>this.activitylogElement.addMany(D),"addMany"),clear:i(()=>this.activitylogElement.clear(),"clear"),getEntries:i(()=>this.activitylogElement.getEntries(),"getEntries"),filter:i(D=>this.activitylogElement.filter(D),"filter"),search:i(D=>this.activitylogElement.search(D),"search")}:{add:i(D=>{this.updateComplete.then(()=>this.activitylogElement?.add(D))},"add"),addMany:i(D=>{this.updateComplete.then(()=>this.activitylogElement?.addMany(D))},"addMany"),clear:i(()=>{this.updateComplete.then(()=>this.activitylogElement?.clear())},"clear"),getEntries:i(()=>this.activitylogElement?.getEntries()||[],"getEntries"),filter:i(D=>this.activitylogElement?.filter(D)||[],"filter"),search:i(D=>this.activitylogElement?.search(D)||[],"search")}}setActivityLogVisible(D){this.activityLogVisible=D}toggleActivityLog(){this.activityLogVisible=!this.activityLogVisible}getActivityLogVisible(){return this.activityLogVisible}get bottomBar(){return this.bottombarElement?{addWidget:i(D=>this.bottombarElement.addWidget(D),"addWidget"),updateWidget:i((D,L)=>this.bottombarElement.updateWidget(D,L),"updateWidget"),removeWidget:i(D=>this.bottombarElement.removeWidget(D),"removeWidget"),getWidget:i(D=>this.bottombarElement.getWidget(D),"getWidget"),clearWidgets:i(()=>this.bottombarElement.clearWidgets(),"clearWidgets"),addAction:i(D=>this.bottombarElement.addAction(D),"addAction"),removeAction:i(D=>this.bottombarElement.removeAction(D),"removeAction"),clearActions:i(()=>this.bottombarElement.clearActions(),"clearActions")}:{addWidget:i(D=>{this.updateComplete.then(()=>this.bottombarElement?.addWidget(D))},"addWidget"),updateWidget:i((D,L)=>{this.updateComplete.then(()=>this.bottombarElement?.updateWidget(D,L))},"updateWidget"),removeWidget:i(D=>{this.updateComplete.then(()=>this.bottombarElement?.removeWidget(D))},"removeWidget"),getWidget:i(D=>this.bottombarElement?.getWidget(D),"getWidget"),clearWidgets:i(()=>{this.updateComplete.then(()=>this.bottombarElement?.clearWidgets())},"clearWidgets"),addAction:i(D=>{this.updateComplete.then(()=>this.bottombarElement?.addAction(D))},"addAction"),removeAction:i(D=>{this.updateComplete.then(()=>this.bottombarElement?.removeAction(D))},"removeAction"),clearActions:i(()=>{this.updateComplete.then(()=>this.bottombarElement?.clearActions())},"clearActions")}}setBottomBarVisible(D){this.bottombarVisible=D,D?this.removeAttribute("bottombar-hidden"):this.setAttribute("bottombar-hidden","")}getBottomBarVisible(){return this.bottombarVisible}async navigateToView(D,L){let ee=this.viewRegistry.get(D);if(!ee)return console.warn(`Cannot navigate to unknown view: ${D}`),!1;let De=await this.viewRegistry.canLeaveCurrentView();if(De!==!0)if(typeof De=="string"){if(!window.confirm(De))return!1}else return!1;this.viewLifecycle$.next({type:"loading",viewId:D});try{await this.loadView(ee,L);let Re=ee.route||D;if(L)for(let[ct,He]of Object.entries(L))Re=Re.replace(`:${ct}`,He);let Xe=`#${Re}`;return window.location.hash!==Xe&&window.history.pushState({viewId:D},"",Xe),!0}catch(Re){return this.viewLifecycle$.next({type:"loadError",viewId:D,error:Re}),!1}}getCurrentView(){return this.currentView}getViewRegistry(){return this.viewRegistry}configure(D){D.views&&(this.viewRegistry.clear(),this.viewRegistry.registerAll(D.views)),D.branding&&(this.mainmenuLogoIcon=D.branding.logoIcon||"",this.mainmenuLogoText=D.branding.logoText||""),D.appBar&&(this.appbarMenuItems=D.appBar.menuItems||[],this.appbarBreadcrumbs=D.appBar.breadcrumbs||"",this.appbarBreadcrumbSeparator=D.appBar.breadcrumbSeparator||" > ",this.appbarShowWindowControls=D.appBar.showWindowControls??!0,this.appbarShowSearch=D.appBar.showSearch??!1,this.appbarUser=D.appBar.user,this.appbarProfileMenuItems=D.appBar.profileMenuItems||[]),D.mainMenu&&(D.mainMenu.sections?this.mainmenuGroups=this.buildMainMenuFromSections(D):D.mainMenu.groups&&(this.mainmenuGroups=D.mainMenu.groups),D.mainMenu.logoIcon&&(this.mainmenuLogoIcon=D.mainMenu.logoIcon),D.mainMenu.logoText&&(this.mainmenuLogoText=D.mainMenu.logoText),D.mainMenu.bottomTabs?this.mainmenuBottomTabs=D.mainMenu.bottomTabs:D.mainMenu.bottomItems&&(this.mainmenuBottomTabs=this.buildBottomTabsFromItems(D.mainMenu.bottomItems))),D.bottomBar&&(this.setBottomBarVisible(D.bottomBar.visible??!0),D.bottomBar.widgets&&D.bottomBar.widgets.forEach(L=>{this.bottomBar.addWidget(L)}),D.bottomBar.actions&&D.bottomBar.actions.forEach(L=>{this.bottomBar.addAction(L)})),this.setupRouterIntegration(D),D.onViewChange&&this.viewChanged$.subscribe(L=>{D.onViewChange(L.viewId,L.view)}),D.onSearch&&(this.searchCallback=D.onSearch),D.defaultView&&this.navigateToView(D.defaultView)}setupRouterIntegration(D){let L=i(()=>{let De=window.location.hash.slice(1);if(!De)return;let Re=this.viewRegistry.findByRoute(De);Re&&this.navigateToView(Re.view.id,Re.params)},"handleHashChange");window.addEventListener("hashchange",L),this.routerCleanup=()=>{window.removeEventListener("hashchange",L)};let ee=window.location.hash.slice(1);if(ee){let De=this.viewRegistry.findByRoute(ee);De&&setTimeout(()=>this.navigateToView(De.view.id,De.params),0)}}buildMainMenuFromSections(D){return D.mainMenu?.sections?D.mainMenu.sections.map(L=>({name:L.name||"",items:L.views.map(ee=>{let De=this.viewRegistry.get(ee);return De?{key:De.id,iconName:De.iconName,action:i(()=>this.navigateToView(ee),"action"),badge:De.badge}:(console.warn(`View "${ee}" not found in registry`),null)}).filter(Boolean)})):[]}buildBottomTabsFromItems(D){return D.map(L=>{let ee=this.viewRegistry.get(L);return ee?{key:ee.id,iconName:ee.iconName,action:i(()=>this.navigateToView(L),"action")}:(console.warn(`View "${L}" not found in registry`),null)}).filter(Boolean)}async loadView(D,L){let ee=this.currentView;this.currentView=D;let De=this.maincontent?.querySelector(".view-container")||this.shadowRoot?.querySelector(".view-container");if(De){let Xe=await this.viewRegistry.activateView(D.id,De,L);Xe&&this.viewLifecycle$.next({type:"activated",viewId:D.id,element:Xe,params:L})}D.secondaryMenu&&(this.secondarymenuGroups=D.secondaryMenu,this.secondarymenuHeading=D.name),D.contentTabs&&(this.maincontentTabs=D.contentTabs),this.setMainMenuSelection(D.id);let Re={viewId:D.id,view:D,previousView:ee,params:L};this.viewChanged$.next(Re),this.dispatchEvent(new CustomEvent("view-change",{detail:Re,bubbles:!0,composed:!0}))}handleAppbarMenuSelect(D){this.dispatchEvent(new CustomEvent("appbar-menu-select",{detail:D.detail,bubbles:!0,composed:!0}))}handleAppbarBreadcrumbNavigate(D){this.dispatchEvent(new CustomEvent("appbar-breadcrumb-navigate",{detail:D.detail,bubbles:!0,composed:!0}))}handleAppbarSearchClick(){this.dispatchEvent(new CustomEvent("appbar-search-click",{bubbles:!0,composed:!0}))}handleAppbarSearchQuery(D){this.searchCallback&&this.searchCallback(D.detail.query),this.dispatchEvent(new CustomEvent("search-query",{detail:D.detail,bubbles:!0,composed:!0}))}handleAppbarUserMenuOpen(){this.dispatchEvent(new CustomEvent("appbar-user-menu-open",{bubbles:!0,composed:!0}))}handleAppbarProfileMenuSelect(D){this.dispatchEvent(new CustomEvent("appbar-profile-menu-select",{detail:D.detail,bubbles:!0,composed:!0}))}handleMainmenuTabSelect(D){this.mainmenuSelectedTab=D.detail.tab,this.dispatchEvent(new CustomEvent("mainmenu-tab-select",{detail:D.detail,bubbles:!0,composed:!0}))}handleSecondarymenuItemSelect(D){this.secondarymenuSelectedItem=D.detail.item,this.dispatchEvent(new CustomEvent("secondarymenu-item-select",{detail:D.detail,bubbles:!0,composed:!0}))}handleMainmenuCollapseChange(D){this.mainmenuCollapsed=D.detail.collapsed,this.dispatchEvent(new CustomEvent("mainmenu-collapse-change",{detail:D.detail,bubbles:!0,composed:!0}))}handleSecondarymenuCollapseChange(D){this.secondarymenuCollapsed=D.detail.collapsed,this.dispatchEvent(new CustomEvent("secondarymenu-collapse-change",{detail:D.detail,bubbles:!0,composed:!0}))}handleContentTabSelect(D){this.maincontentSelectedTab=D.detail.tab,this.dispatchEvent(new CustomEvent("content-tab-select",{detail:D.detail,bubbles:!0,composed:!0}))}handleContentTabClose(D){this.dispatchEvent(new CustomEvent("content-tab-close",{detail:D.detail,bubbles:!0,composed:!0}))}static{ot(r,a)}};return v7=r})()});var L0a=f(()=>{_0a();MXe()});var $0a=f(()=>{zXe()});var D0a=f(()=>{kXe()});var A0a=f(()=>{SXe()});var I0a=f(()=>{OGe()});var P0a=f(()=>{CXe()});var Qre,Zf,E0a,N0a=f(()=>{Li();Ws();$i();le();gn();ba();tt();Qre=function(t,e,a,r,s,o){function n(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}i(n,"accept");for(var l=r.kind,c=l==="getter"?"get":l==="setter"?"set":"value",d=!e&&t?r.static?t:t.prototype:null,u=e||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p,m=!1,v=a.length-1;v>=0;v--){var x={};for(var b in r)x[b]=b==="access"?{}:r[b];for(var b in r.access)x.access[b]=r.access[b];x.addInitializer=function(y){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(n(y||null))};var g=(0,a[v])(l==="accessor"?{get:u.get,set:u.set}:u[c],x);if(l==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(p=n(g.get))&&(u.get=p),(p=n(g.set))&&(u.set=p),(p=n(g.init))&&s.unshift(p)}else(p=n(g))&&(l==="field"?s.unshift(p):u[c]=p)}d&&Object.defineProperty(d,r.name,u),m=!0},Zf=function(t,e,a){for(var r=arguments.length>2,s=0;s<e.length;s++)a=r?e[s].call(t,a):e[s].call(t);return r?a:void 0},E0a=(()=>{let t=[ie("dees-mobilenavigation")],e,a=[],r,s=ne,o,n=[],l=[],c,d=[],u=[],p,m=[],v=[];var x=class extends s{static{i(this,"DeesMobilenavigation")}static{r=this}static{let b=typeof Symbol=="function"&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;o=[$({type:String})],c=[$({type:Array})],p=[G()],Qre(this,null,o,{kind:"accessor",name:"heading",static:!1,private:!1,access:{has:i(g=>"heading"in g,"has"),get:i(g=>g.heading,"get"),set:i((g,y)=>{g.heading=y},"set")},metadata:b},n,l),Qre(this,null,c,{kind:"accessor",name:"menuItems",static:!1,private:!1,access:{has:i(g=>"menuItems"in g,"has"),get:i(g=>g.menuItems,"get"),set:i((g,y)=>{g.menuItems=y},"set")},metadata:b},d,u),Qre(this,null,p,{kind:"accessor",name:"mobileNavZIndex",static:!1,private:!1,access:{has:i(g=>"mobileNavZIndex"in g,"has"),get:i(g=>g.mobileNavZIndex,"get"),set:i((g,y)=>{g.mobileNavZIndex=y},"set")},metadata:b},m,v),Qre(null,e={value:r},t,{kind:"class",name:r.name,metadata:b},null,a),x=r=e.value,b&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:b})}static demoGroups=["App UI"];static demo=i(()=>w`
19370
+ `}async firstUpdated(){this.appbar=this.shadowRoot.querySelector("dees-appui-appbar"),this.mainmenu=this.shadowRoot.querySelector("dees-appui-mainmenu"),this.secondarymenu=this.shadowRoot.querySelector("dees-appui-secondarymenu"),this.maincontent=this.shadowRoot.querySelector("dees-appui-maincontent"),this.activitylogElement=this.shadowRoot.querySelector("dees-appui-activitylog"),this.bottombarElement=this.shadowRoot.querySelector("dees-appui-bottombar"),this.activitylogElement&&this.activitylogElement.entries$.subscribe(D=>{this.activityLogCount=D.length}),this.viewRegistry.setAppuiRef(this)}async disconnectedCallback(){await super.disconnectedCallback(),this.routerCleanup&&(this.routerCleanup(),this.routerCleanup=null),this.viewLifecycle$.complete(),this.viewChanged$.complete()}setAppBarMenus(D){this.appbarMenuItems=[...D]}updateAppBarMenu(D,L){this.appbarMenuItems=this.appbarMenuItems.map(ee=>"name"in ee&&ee.name===D?{...ee,...L}:ee)}setBreadcrumbs(D){Array.isArray(D)?this.appbarBreadcrumbs=D.join(this.appbarBreadcrumbSeparator):this.appbarBreadcrumbs=D}setUser(D){this.appbarUser=D}setProfileMenuItems(D){this.appbarProfileMenuItems=[...D]}setSearchVisible(D){this.appbarShowSearch=D}setWindowControlsVisible(D){this.appbarShowWindowControls=D}onSearch(D){this.searchCallback=D}setMainMenu(D){D.logoIcon!==void 0&&(this.mainmenuLogoIcon=D.logoIcon),D.logoText!==void 0&&(this.mainmenuLogoText=D.logoText),D.groups!==void 0&&(this.mainmenuGroups=[...D.groups]),D.bottomTabs!==void 0&&(this.mainmenuBottomTabs=[...D.bottomTabs])}updateMainMenuGroup(D,L){this.mainmenuGroups=this.mainmenuGroups.map(ee=>ee.name===D?{...ee,...L}:ee)}addMainMenuItem(D,L){this.mainmenuGroups=this.mainmenuGroups.map(ee=>ee.name===D?{...ee,items:[...ee.items||[],L]}:ee)}removeMainMenuItem(D,L){this.mainmenuGroups=this.mainmenuGroups.map(ee=>ee.name===D?{...ee,items:(ee.items||[]).filter(De=>De.key!==L)}:ee)}setMainMenuSelection(D){for(let ee of this.mainmenuGroups){let De=ee.items?.find(Re=>Re.key===D);if(De){this.mainmenuSelectedTab=De;return}}let L=this.mainmenuBottomTabs.find(ee=>ee.key===D);L&&(this.mainmenuSelectedTab=L)}setMainMenuCollapsed(D){this.mainmenuCollapsed=D}setMainMenuVisible(D){this.mainmenuVisible=D}setSecondaryMenuCollapsed(D){this.secondarymenuCollapsed=D}setSecondaryMenuVisible(D){this.secondarymenuVisible=D}setContentTabsVisible(D){this.maincontentTabsVisible=D}setContentTabsAutoHide(D,L=0){this.contentTabsAutoHide=D,this.contentTabsAutoHideThreshold=L}setMainMenuBadge(D,L){this.mainmenuGroups=this.mainmenuGroups.map(ee=>({...ee,items:(ee.items||[]).map(De=>De.key===D?{...De,badge:L}:De)})),this.mainmenuBottomTabs=this.mainmenuBottomTabs.map(ee=>ee.key===D?{...ee,badge:L}:ee)}clearMainMenuBadge(D){this.mainmenuGroups=this.mainmenuGroups.map(L=>({...L,items:(L.items||[]).map(ee=>{if(ee.key===D){let{badge:De,...Re}=ee;return Re}return ee})})),this.mainmenuBottomTabs=this.mainmenuBottomTabs.map(L=>{if(L.key===D){let{badge:ee,...De}=L;return De}return L})}setSecondaryMenu(D){D.heading!==void 0&&(this.secondarymenuHeading=D.heading),this.secondarymenuGroups=[...D.groups]}updateSecondaryMenuGroup(D,L){this.secondarymenuGroups=this.secondarymenuGroups.map(ee=>ee.name===D?{...ee,...L}:ee)}addSecondaryMenuItem(D,L){this.secondarymenuGroups=this.secondarymenuGroups.map(ee=>ee.name===D?{...ee,items:[...ee.items,L]}:ee)}setSecondaryMenuSelection(D){for(let L of this.secondarymenuGroups){let ee=L.items.find(De=>"key"in De&&De.key===D);if(ee&&(!("type"in ee)||ee.type==="tab"||ee.type===void 0)){this.secondarymenuSelectedItem=ee;return}}}clearSecondaryMenu(){this.secondarymenuHeading="",this.secondarymenuGroups=[],this.secondarymenuSelectedItem=void 0}setContentTabs(D){this.maincontentTabs=[...D],D.length>0&&!this.maincontentSelectedTab&&(this.maincontentSelectedTab=D[0])}addContentTab(D){this.maincontentTabs=[...this.maincontentTabs,D]}removeContentTab(D){this.maincontentTabs=this.maincontentTabs.filter(L=>L.key!==D),this.maincontentSelectedTab?.key===D&&(this.maincontentSelectedTab=this.maincontentTabs[0])}selectContentTab(D){let L=this.maincontentTabs.find(ee=>ee.key===D);L&&(this.maincontentSelectedTab=L)}getSelectedContentTab(){return this.maincontentSelectedTab}setContentTabActionsLeft(D){this.contentTabActionsLeft=[...D]}setContentTabActionsRight(D){this.contentTabActionsRight=[...D]}get activityLog(){return this.activitylogElement?{add:i(D=>this.activitylogElement.add(D),"add"),addMany:i(D=>this.activitylogElement.addMany(D),"addMany"),clear:i(()=>this.activitylogElement.clear(),"clear"),getEntries:i(()=>this.activitylogElement.getEntries(),"getEntries"),filter:i(D=>this.activitylogElement.filter(D),"filter"),search:i(D=>this.activitylogElement.search(D),"search")}:{add:i(D=>{this.updateComplete.then(()=>this.activitylogElement?.add(D))},"add"),addMany:i(D=>{this.updateComplete.then(()=>this.activitylogElement?.addMany(D))},"addMany"),clear:i(()=>{this.updateComplete.then(()=>this.activitylogElement?.clear())},"clear"),getEntries:i(()=>this.activitylogElement?.getEntries()||[],"getEntries"),filter:i(D=>this.activitylogElement?.filter(D)||[],"filter"),search:i(D=>this.activitylogElement?.search(D)||[],"search")}}setActivityLogVisible(D){this.activityLogVisible=D}toggleActivityLog(){this.activityLogVisible=!this.activityLogVisible}getActivityLogVisible(){return this.activityLogVisible}get bottomBar(){return this.bottombarElement?{addWidget:i(D=>this.bottombarElement.addWidget(D),"addWidget"),updateWidget:i((D,L)=>this.bottombarElement.updateWidget(D,L),"updateWidget"),removeWidget:i(D=>this.bottombarElement.removeWidget(D),"removeWidget"),getWidget:i(D=>this.bottombarElement.getWidget(D),"getWidget"),clearWidgets:i(()=>this.bottombarElement.clearWidgets(),"clearWidgets"),addAction:i(D=>this.bottombarElement.addAction(D),"addAction"),removeAction:i(D=>this.bottombarElement.removeAction(D),"removeAction"),clearActions:i(()=>this.bottombarElement.clearActions(),"clearActions")}:{addWidget:i(D=>{this.updateComplete.then(()=>this.bottombarElement?.addWidget(D))},"addWidget"),updateWidget:i((D,L)=>{this.updateComplete.then(()=>this.bottombarElement?.updateWidget(D,L))},"updateWidget"),removeWidget:i(D=>{this.updateComplete.then(()=>this.bottombarElement?.removeWidget(D))},"removeWidget"),getWidget:i(D=>this.bottombarElement?.getWidget(D),"getWidget"),clearWidgets:i(()=>{this.updateComplete.then(()=>this.bottombarElement?.clearWidgets())},"clearWidgets"),addAction:i(D=>{this.updateComplete.then(()=>this.bottombarElement?.addAction(D))},"addAction"),removeAction:i(D=>{this.updateComplete.then(()=>this.bottombarElement?.removeAction(D))},"removeAction"),clearActions:i(()=>{this.updateComplete.then(()=>this.bottombarElement?.clearActions())},"clearActions")}}setBottomBarVisible(D){this.bottombarVisible=D,D?this.removeAttribute("bottombar-hidden"):this.setAttribute("bottombar-hidden","")}getBottomBarVisible(){return this.bottombarVisible}async navigateToView(D,L){let ee=this.viewRegistry.get(D);if(!ee)return console.warn(`Cannot navigate to unknown view: ${D}`),!1;let De=await this.viewRegistry.canLeaveCurrentView();if(De!==!0)if(typeof De=="string"){if(!window.confirm(De))return!1}else return!1;this.viewLifecycle$.next({type:"loading",viewId:D});try{await this.loadView(ee,L);let Re=ee.route||D;if(L)for(let[ct,He]of Object.entries(L))Re=Re.replace(`:${ct}`,He);let Ze=`#${Re}`;return window.location.hash!==Ze&&window.history.pushState({viewId:D},"",Ze),!0}catch(Re){return this.viewLifecycle$.next({type:"loadError",viewId:D,error:Re}),!1}}getCurrentView(){return this.currentView}getViewRegistry(){return this.viewRegistry}configure(D){D.views&&(this.viewRegistry.clear(),this.viewRegistry.registerAll(D.views)),D.branding&&(this.mainmenuLogoIcon=D.branding.logoIcon||"",this.mainmenuLogoText=D.branding.logoText||""),D.appBar&&(this.appbarMenuItems=D.appBar.menuItems||[],this.appbarBreadcrumbs=D.appBar.breadcrumbs||"",this.appbarBreadcrumbSeparator=D.appBar.breadcrumbSeparator||" > ",this.appbarShowWindowControls=D.appBar.showWindowControls??!0,this.appbarShowSearch=D.appBar.showSearch??!1,this.appbarUser=D.appBar.user,this.appbarProfileMenuItems=D.appBar.profileMenuItems||[]),D.mainMenu&&(D.mainMenu.sections?this.mainmenuGroups=this.buildMainMenuFromSections(D):D.mainMenu.groups&&(this.mainmenuGroups=D.mainMenu.groups),D.mainMenu.logoIcon&&(this.mainmenuLogoIcon=D.mainMenu.logoIcon),D.mainMenu.logoText&&(this.mainmenuLogoText=D.mainMenu.logoText),D.mainMenu.bottomTabs?this.mainmenuBottomTabs=D.mainMenu.bottomTabs:D.mainMenu.bottomItems&&(this.mainmenuBottomTabs=this.buildBottomTabsFromItems(D.mainMenu.bottomItems))),D.bottomBar&&(this.setBottomBarVisible(D.bottomBar.visible??!0),D.bottomBar.widgets&&D.bottomBar.widgets.forEach(L=>{this.bottomBar.addWidget(L)}),D.bottomBar.actions&&D.bottomBar.actions.forEach(L=>{this.bottomBar.addAction(L)})),this.setupRouterIntegration(D),D.onViewChange&&this.viewChanged$.subscribe(L=>{D.onViewChange(L.viewId,L.view)}),D.onSearch&&(this.searchCallback=D.onSearch),D.defaultView&&this.navigateToView(D.defaultView)}setupRouterIntegration(D){let L=i(()=>{let De=window.location.hash.slice(1);if(!De)return;let Re=this.viewRegistry.findByRoute(De);Re&&this.navigateToView(Re.view.id,Re.params)},"handleHashChange");window.addEventListener("hashchange",L),this.routerCleanup=()=>{window.removeEventListener("hashchange",L)};let ee=window.location.hash.slice(1);if(ee){let De=this.viewRegistry.findByRoute(ee);De&&setTimeout(()=>this.navigateToView(De.view.id,De.params),0)}}buildMainMenuFromSections(D){return D.mainMenu?.sections?D.mainMenu.sections.map(L=>({name:L.name||"",items:L.views.map(ee=>{let De=this.viewRegistry.get(ee);return De?{key:De.id,iconName:De.iconName,action:i(()=>this.navigateToView(ee),"action"),badge:De.badge}:(console.warn(`View "${ee}" not found in registry`),null)}).filter(Boolean)})):[]}buildBottomTabsFromItems(D){return D.map(L=>{let ee=this.viewRegistry.get(L);return ee?{key:ee.id,iconName:ee.iconName,action:i(()=>this.navigateToView(L),"action")}:(console.warn(`View "${L}" not found in registry`),null)}).filter(Boolean)}async loadView(D,L){let ee=this.currentView;this.currentView=D;let De=this.maincontent?.querySelector(".view-container")||this.shadowRoot?.querySelector(".view-container");if(De){let Ze=await this.viewRegistry.activateView(D.id,De,L);Ze&&this.viewLifecycle$.next({type:"activated",viewId:D.id,element:Ze,params:L})}D.secondaryMenu&&(this.secondarymenuGroups=D.secondaryMenu,this.secondarymenuHeading=D.name),D.contentTabs&&(this.maincontentTabs=D.contentTabs),this.setMainMenuSelection(D.id);let Re={viewId:D.id,view:D,previousView:ee,params:L};this.viewChanged$.next(Re),this.dispatchEvent(new CustomEvent("view-change",{detail:Re,bubbles:!0,composed:!0}))}handleAppbarMenuSelect(D){this.dispatchEvent(new CustomEvent("appbar-menu-select",{detail:D.detail,bubbles:!0,composed:!0}))}handleAppbarBreadcrumbNavigate(D){this.dispatchEvent(new CustomEvent("appbar-breadcrumb-navigate",{detail:D.detail,bubbles:!0,composed:!0}))}handleAppbarSearchClick(){this.dispatchEvent(new CustomEvent("appbar-search-click",{bubbles:!0,composed:!0}))}handleAppbarSearchQuery(D){this.searchCallback&&this.searchCallback(D.detail.query),this.dispatchEvent(new CustomEvent("search-query",{detail:D.detail,bubbles:!0,composed:!0}))}handleAppbarUserMenuOpen(){this.dispatchEvent(new CustomEvent("appbar-user-menu-open",{bubbles:!0,composed:!0}))}handleAppbarProfileMenuSelect(D){this.dispatchEvent(new CustomEvent("appbar-profile-menu-select",{detail:D.detail,bubbles:!0,composed:!0}))}handleMainmenuTabSelect(D){this.mainmenuSelectedTab=D.detail.tab,this.dispatchEvent(new CustomEvent("mainmenu-tab-select",{detail:D.detail,bubbles:!0,composed:!0}))}handleSecondarymenuItemSelect(D){this.secondarymenuSelectedItem=D.detail.item,this.dispatchEvent(new CustomEvent("secondarymenu-item-select",{detail:D.detail,bubbles:!0,composed:!0}))}handleMainmenuCollapseChange(D){this.mainmenuCollapsed=D.detail.collapsed,this.dispatchEvent(new CustomEvent("mainmenu-collapse-change",{detail:D.detail,bubbles:!0,composed:!0}))}handleSecondarymenuCollapseChange(D){this.secondarymenuCollapsed=D.detail.collapsed,this.dispatchEvent(new CustomEvent("secondarymenu-collapse-change",{detail:D.detail,bubbles:!0,composed:!0}))}handleContentTabSelect(D){this.maincontentSelectedTab=D.detail.tab,this.dispatchEvent(new CustomEvent("content-tab-select",{detail:D.detail,bubbles:!0,composed:!0}))}handleContentTabClose(D){this.dispatchEvent(new CustomEvent("content-tab-close",{detail:D.detail,bubbles:!0,composed:!0}))}static{ot(r,a)}};return v7=r})()});var L0a=f(()=>{_0a();MXe()});var $0a=f(()=>{zXe()});var D0a=f(()=>{kXe()});var A0a=f(()=>{SXe()});var I0a=f(()=>{OGe()});var P0a=f(()=>{CXe()});var Qre,Zf,E0a,N0a=f(()=>{Li();Ws();$i();le();gn();ba();tt();Qre=function(t,e,a,r,s,o){function n(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}i(n,"accept");for(var l=r.kind,c=l==="getter"?"get":l==="setter"?"set":"value",d=!e&&t?r.static?t:t.prototype:null,u=e||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p,m=!1,v=a.length-1;v>=0;v--){var x={};for(var b in r)x[b]=b==="access"?{}:r[b];for(var b in r.access)x.access[b]=r.access[b];x.addInitializer=function(y){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(n(y||null))};var g=(0,a[v])(l==="accessor"?{get:u.get,set:u.set}:u[c],x);if(l==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(p=n(g.get))&&(u.get=p),(p=n(g.set))&&(u.set=p),(p=n(g.init))&&s.unshift(p)}else(p=n(g))&&(l==="field"?s.unshift(p):u[c]=p)}d&&Object.defineProperty(d,r.name,u),m=!0},Zf=function(t,e,a){for(var r=arguments.length>2,s=0;s<e.length;s++)a=r?e[s].call(t,a):e[s].call(t);return r?a:void 0},E0a=(()=>{let t=[ie("dees-mobilenavigation")],e,a=[],r,s=ne,o,n=[],l=[],c,d=[],u=[],p,m=[],v=[];var x=class extends s{static{i(this,"DeesMobilenavigation")}static{r=this}static{let b=typeof Symbol=="function"&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;o=[$({type:String})],c=[$({type:Array})],p=[G()],Qre(this,null,o,{kind:"accessor",name:"heading",static:!1,private:!1,access:{has:i(g=>"heading"in g,"has"),get:i(g=>g.heading,"get"),set:i((g,y)=>{g.heading=y},"set")},metadata:b},n,l),Qre(this,null,c,{kind:"accessor",name:"menuItems",static:!1,private:!1,access:{has:i(g=>"menuItems"in g,"has"),get:i(g=>g.menuItems,"get"),set:i((g,y)=>{g.menuItems=y},"set")},metadata:b},d,u),Qre(this,null,p,{kind:"accessor",name:"mobileNavZIndex",static:!1,private:!1,access:{has:i(g=>"mobileNavZIndex"in g,"has"),get:i(g=>g.mobileNavZIndex,"get"),set:i((g,y)=>{g.mobileNavZIndex=y},"set")},metadata:b},m,v),Qre(null,e={value:r},t,{kind:"class",name:r.name,metadata:b},null,a),x=r=e.value,b&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:b})}static demoGroups=["App UI"];static demo=i(()=>w`
19371
19371
  <dees-button @click=${()=>{x.createAndShow([{name:"Dashboard",iconName:"lucide:layout-dashboard",action:i(async b=>(console.log("Navigate to dashboard"),null),"action")},{name:"Profile",iconName:"lucide:user",action:i(async b=>(console.log("Navigate to profile"),null),"action")},{name:"Settings",iconName:"lucide:settings",action:i(async b=>(console.log("Navigate to settings"),null),"action")},{divider:!0},{name:"Help",iconName:"lucide:help-circle",action:i(async b=>(console.log("Show help"),null),"action")},{name:"Sign Out",iconName:"lucide:log-out",action:i(async b=>(console.log("Sign out"),null),"action")}])}}>Open Mobile Navigation</dees-button>
19372
19372
  `,"demo");static singletonRef;static async createAndShow(b){return this.singletonRef||(this.singletonRef=new x,document.body.append(this.singletonRef),await this.singletonRef.init()),this.singletonRef.menuItems=b,await this.singletonRef.readyDeferred.promise,this.singletonRef.show(),this.singletonRef}#e=Zf(this,n,"Menu");get heading(){return this.#e}set heading(b){this.#e=b}#t=(Zf(this,l),Zf(this,d,[]));get menuItems(){return this.#t}set menuItems(b){this.#t=b}#a=(Zf(this,u),Zf(this,m,1e3));get mobileNavZIndex(){return this.#a}set mobileNavZIndex(b){this.#a=b}readyDeferred=(Zf(this,v),At.plugins.smartpromise.defer());constructor(){super()}async init(){await this.updateComplete,this.readyDeferred.resolve()}static styles=[Ie,h.defaultStyles,W`
19373
19373
  /* TODO: Migrate hardcoded values to --dees-* CSS variables */
@@ -21236,7 +21236,7 @@ echo "Deploying..."
21236
21236
  </body>
21237
21237
  </html>`,md:`# Title
21238
21238
 
21239
- `,txt:""}[t]||""}function Jf(t){if(!t)return[];let e=t.split("/").filter(s=>s),a=[],r="";for(let s of e)r+=s+"/",a.push(r);return a}var nW=f(()=>{i(Tm,"formatSize");i(o3a,"formatCount");i(ma,"getFileName");i(_m,"validateMove");i(k1,"getParentPrefix");i(t4,"getContentType");i(Lm,"getDefaultContent");i(Jf,"getPathSegments")});var Ea,wt,n3a,OXe=f(()=>{le();Qr();tt();nW();Ea=function(t,e,a,r,s,o){function n(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}i(n,"accept");for(var l=r.kind,c=l==="getter"?"get":l==="setter"?"set":"value",d=!e&&t?r.static?t:t.prototype:null,u=e||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p,m=!1,v=a.length-1;v>=0;v--){var x={};for(var b in r)x[b]=b==="access"?{}:r[b];for(var b in r.access)x.access[b]=r.access[b];x.addInitializer=function(y){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(n(y||null))};var g=(0,a[v])(l==="accessor"?{get:u.get,set:u.set}:u[c],x);if(l==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(p=n(g.get))&&(u.get=p),(p=n(g.set))&&(u.set=p),(p=n(g.init))&&s.unshift(p)}else(p=n(g))&&(l==="field"?s.unshift(p):u[c]=p)}d&&Object.defineProperty(d,r.name,u),m=!0},wt=function(t,e,a){for(var r=arguments.length>2,s=0;s<e.length;s++)a=r?e[s].call(t,a):e[s].call(t);return r?a:void 0},n3a=(()=>{let t=[ie("dees-storage-columns")],e,a=[],r,s=ne,o,n=[],l=[],c,d=[],u=[],p,m=[],v=[],x,b=[],g=[],y,k=[],C=[],R,T=[],S=[],N,_=[],I=[],O,M=[],z=[],E,A=[],F=[],K,j=[],U=[],he,B=[],J=[],ve,P=[],H=[],de,ue=[],Y=[],X,Q=[],Z=[],me,ae=[],re=[],ye,V=[],q=[],oe,se=[],te=[],Ce,Fe=[],Ve=[],dt,$e=[],ze=[],Me,pe=[],be=[],Ae,Ze=[],nt=[],_t,_e=[],we=[],Ne,fe=[],ge=[],Pe,bt=[],vt=[],Ft,Ja=[],tr=[],gi,Ue=[],mt=[],er,Sr=[],Ar=[],Wr,Ir=[],go=[],bo,Le=[],Se=[],Be,oa=[],bi=[];var O2=class extends s{static{i(this,"DeesStorageColumns")}static{r=this}static{let xe=typeof Symbol=="function"&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;o=[$({type:Object})],c=[$({type:String})],p=[$({type:String})],x=[$({type:Number})],y=[G()],R=[G()],N=[G()],O=[G()],E=[G()],K=[G()],he=[G()],ve=[G()],de=[G()],X=[G()],me=[G()],ye=[G()],oe=[G()],Ce=[G()],dt=[G()],Me=[G()],Ae=[G()],_t=[G()],Ne=[G()],Pe=[G()],Ft=[G()],gi=[G()],er=[G()],Wr=[G()],bo=[G()],Be=[G()],Ea(this,null,o,{kind:"accessor",name:"dataProvider",static:!1,private:!1,access:{has:i(ce=>"dataProvider"in ce,"has"),get:i(ce=>ce.dataProvider,"get"),set:i((ce,Te)=>{ce.dataProvider=Te},"set")},metadata:xe},n,l),Ea(this,null,c,{kind:"accessor",name:"bucketName",static:!1,private:!1,access:{has:i(ce=>"bucketName"in ce,"has"),get:i(ce=>ce.bucketName,"get"),set:i((ce,Te)=>{ce.bucketName=Te},"set")},metadata:xe},d,u),Ea(this,null,p,{kind:"accessor",name:"currentPrefix",static:!1,private:!1,access:{has:i(ce=>"currentPrefix"in ce,"has"),get:i(ce=>ce.currentPrefix,"get"),set:i((ce,Te)=>{ce.currentPrefix=Te},"set")},metadata:xe},m,v),Ea(this,null,x,{kind:"accessor",name:"refreshKey",static:!1,private:!1,access:{has:i(ce=>"refreshKey"in ce,"has"),get:i(ce=>ce.refreshKey,"get"),set:i((ce,Te)=>{ce.refreshKey=Te},"set")},metadata:xe},b,g),Ea(this,null,y,{kind:"accessor",name:"columns",static:!1,private:!1,access:{has:i(ce=>"columns"in ce,"has"),get:i(ce=>ce.columns,"get"),set:i((ce,Te)=>{ce.columns=Te},"set")},metadata:xe},k,C),Ea(this,null,R,{kind:"accessor",name:"loading",static:!1,private:!1,access:{has:i(ce=>"loading"in ce,"has"),get:i(ce=>ce.loading,"get"),set:i((ce,Te)=>{ce.loading=Te},"set")},metadata:xe},T,S),Ea(this,null,N,{kind:"accessor",name:"showCreateDialog",static:!1,private:!1,access:{has:i(ce=>"showCreateDialog"in ce,"has"),get:i(ce=>ce.showCreateDialog,"get"),set:i((ce,Te)=>{ce.showCreateDialog=Te},"set")},metadata:xe},_,I),Ea(this,null,O,{kind:"accessor",name:"createDialogType",static:!1,private:!1,access:{has:i(ce=>"createDialogType"in ce,"has"),get:i(ce=>ce.createDialogType,"get"),set:i((ce,Te)=>{ce.createDialogType=Te},"set")},metadata:xe},M,z),Ea(this,null,E,{kind:"accessor",name:"createDialogPrefix",static:!1,private:!1,access:{has:i(ce=>"createDialogPrefix"in ce,"has"),get:i(ce=>ce.createDialogPrefix,"get"),set:i((ce,Te)=>{ce.createDialogPrefix=Te},"set")},metadata:xe},A,F),Ea(this,null,K,{kind:"accessor",name:"createDialogName",static:!1,private:!1,access:{has:i(ce=>"createDialogName"in ce,"has"),get:i(ce=>ce.createDialogName,"get"),set:i((ce,Te)=>{ce.createDialogName=Te},"set")},metadata:xe},j,U),Ea(this,null,he,{kind:"accessor",name:"dragOverColumnIndex",static:!1,private:!1,access:{has:i(ce=>"dragOverColumnIndex"in ce,"has"),get:i(ce=>ce.dragOverColumnIndex,"get"),set:i((ce,Te)=>{ce.dragOverColumnIndex=Te},"set")},metadata:xe},B,J),Ea(this,null,ve,{kind:"accessor",name:"dragOverFolderPrefix",static:!1,private:!1,access:{has:i(ce=>"dragOverFolderPrefix"in ce,"has"),get:i(ce=>ce.dragOverFolderPrefix,"get"),set:i((ce,Te)=>{ce.dragOverFolderPrefix=Te},"set")},metadata:xe},P,H),Ea(this,null,de,{kind:"accessor",name:"uploading",static:!1,private:!1,access:{has:i(ce=>"uploading"in ce,"has"),get:i(ce=>ce.uploading,"get"),set:i((ce,Te)=>{ce.uploading=Te},"set")},metadata:xe},ue,Y),Ea(this,null,X,{kind:"accessor",name:"uploadProgress",static:!1,private:!1,access:{has:i(ce=>"uploadProgress"in ce,"has"),get:i(ce=>ce.uploadProgress,"get"),set:i((ce,Te)=>{ce.uploadProgress=Te},"set")},metadata:xe},Q,Z),Ea(this,null,me,{kind:"accessor",name:"showMoveDialog",static:!1,private:!1,access:{has:i(ce=>"showMoveDialog"in ce,"has"),get:i(ce=>ce.showMoveDialog,"get"),set:i((ce,Te)=>{ce.showMoveDialog=Te},"set")},metadata:xe},ae,re),Ea(this,null,ye,{kind:"accessor",name:"moveSource",static:!1,private:!1,access:{has:i(ce=>"moveSource"in ce,"has"),get:i(ce=>ce.moveSource,"get"),set:i((ce,Te)=>{ce.moveSource=Te},"set")},metadata:xe},V,q),Ea(this,null,oe,{kind:"accessor",name:"moveDestination",static:!1,private:!1,access:{has:i(ce=>"moveDestination"in ce,"has"),get:i(ce=>ce.moveDestination,"get"),set:i((ce,Te)=>{ce.moveDestination=Te},"set")},metadata:xe},se,te),Ea(this,null,Ce,{kind:"accessor",name:"moveInProgress",static:!1,private:!1,access:{has:i(ce=>"moveInProgress"in ce,"has"),get:i(ce=>ce.moveInProgress,"get"),set:i((ce,Te)=>{ce.moveInProgress=Te},"set")},metadata:xe},Fe,Ve),Ea(this,null,dt,{kind:"accessor",name:"moveError",static:!1,private:!1,access:{has:i(ce=>"moveError"in ce,"has"),get:i(ce=>ce.moveError,"get"),set:i((ce,Te)=>{ce.moveError=Te},"set")},metadata:xe},$e,ze),Ea(this,null,Me,{kind:"accessor",name:"showMovePickerDialog",static:!1,private:!1,access:{has:i(ce=>"showMovePickerDialog"in ce,"has"),get:i(ce=>ce.showMovePickerDialog,"get"),set:i((ce,Te)=>{ce.showMovePickerDialog=Te},"set")},metadata:xe},pe,be),Ea(this,null,Ae,{kind:"accessor",name:"movePickerSource",static:!1,private:!1,access:{has:i(ce=>"movePickerSource"in ce,"has"),get:i(ce=>ce.movePickerSource,"get"),set:i((ce,Te)=>{ce.movePickerSource=Te},"set")},metadata:xe},Ze,nt),Ea(this,null,_t,{kind:"accessor",name:"movePickerCurrentPrefix",static:!1,private:!1,access:{has:i(ce=>"movePickerCurrentPrefix"in ce,"has"),get:i(ce=>ce.movePickerCurrentPrefix,"get"),set:i((ce,Te)=>{ce.movePickerCurrentPrefix=Te},"set")},metadata:xe},_e,we),Ea(this,null,Ne,{kind:"accessor",name:"movePickerPrefixes",static:!1,private:!1,access:{has:i(ce=>"movePickerPrefixes"in ce,"has"),get:i(ce=>ce.movePickerPrefixes,"get"),set:i((ce,Te)=>{ce.movePickerPrefixes=Te},"set")},metadata:xe},fe,ge),Ea(this,null,Pe,{kind:"accessor",name:"movePickerLoading",static:!1,private:!1,access:{has:i(ce=>"movePickerLoading"in ce,"has"),get:i(ce=>ce.movePickerLoading,"get"),set:i((ce,Te)=>{ce.movePickerLoading=Te},"set")},metadata:xe},bt,vt),Ea(this,null,Ft,{kind:"accessor",name:"showRenameDialog",static:!1,private:!1,access:{has:i(ce=>"showRenameDialog"in ce,"has"),get:i(ce=>ce.showRenameDialog,"get"),set:i((ce,Te)=>{ce.showRenameDialog=Te},"set")},metadata:xe},Ja,tr),Ea(this,null,gi,{kind:"accessor",name:"renameSource",static:!1,private:!1,access:{has:i(ce=>"renameSource"in ce,"has"),get:i(ce=>ce.renameSource,"get"),set:i((ce,Te)=>{ce.renameSource=Te},"set")},metadata:xe},Ue,mt),Ea(this,null,er,{kind:"accessor",name:"renameName",static:!1,private:!1,access:{has:i(ce=>"renameName"in ce,"has"),get:i(ce=>ce.renameName,"get"),set:i((ce,Te)=>{ce.renameName=Te},"set")},metadata:xe},Sr,Ar),Ea(this,null,Wr,{kind:"accessor",name:"renameInProgress",static:!1,private:!1,access:{has:i(ce=>"renameInProgress"in ce,"has"),get:i(ce=>ce.renameInProgress,"get"),set:i((ce,Te)=>{ce.renameInProgress=Te},"set")},metadata:xe},Ir,go),Ea(this,null,bo,{kind:"accessor",name:"renameError",static:!1,private:!1,access:{has:i(ce=>"renameError"in ce,"has"),get:i(ce=>ce.renameError,"get"),set:i((ce,Te)=>{ce.renameError=Te},"set")},metadata:xe},Le,Se),Ea(this,null,Be,{kind:"accessor",name:"draggedItem",static:!1,private:!1,access:{has:i(ce=>"draggedItem"in ce,"has"),get:i(ce=>ce.draggedItem,"get"),set:i((ce,Te)=>{ce.draggedItem=Te},"set")},metadata:xe},oa,bi),Ea(null,e={value:r},t,{kind:"class",name:r.name,metadata:xe},null,a),O2=r=e.value,xe&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:xe})}#e=wt(this,n,null);get dataProvider(){return this.#e}set dataProvider(xe){this.#e=xe}#t=(wt(this,l),wt(this,d,""));get bucketName(){return this.#t}set bucketName(xe){this.#t=xe}#a=(wt(this,u),wt(this,m,""));get currentPrefix(){return this.#a}set currentPrefix(xe){this.#a=xe}#r=(wt(this,v),wt(this,b,0));get refreshKey(){return this.#r}set refreshKey(xe){this.#r=xe}#i=(wt(this,g),wt(this,k,[]));get columns(){return this.#i}set columns(xe){this.#i=xe}#s=(wt(this,C),wt(this,T,!1));get loading(){return this.#s}set loading(xe){this.#s=xe}#o=(wt(this,S),wt(this,_,!1));get showCreateDialog(){return this.#o}set showCreateDialog(xe){this.#o=xe}#n=(wt(this,I),wt(this,M,"folder"));get createDialogType(){return this.#n}set createDialogType(xe){this.#n=xe}#l=(wt(this,z),wt(this,A,""));get createDialogPrefix(){return this.#l}set createDialogPrefix(xe){this.#l=xe}#c=(wt(this,F),wt(this,j,""));get createDialogName(){return this.#c}set createDialogName(xe){this.#c=xe}#d=(wt(this,U),wt(this,B,-1));get dragOverColumnIndex(){return this.#d}set dragOverColumnIndex(xe){this.#d=xe}#u=(wt(this,J),wt(this,P,null));get dragOverFolderPrefix(){return this.#u}set dragOverFolderPrefix(xe){this.#u=xe}#p=(wt(this,H),wt(this,ue,!1));get uploading(){return this.#p}set uploading(xe){this.#p=xe}#f=(wt(this,Y),wt(this,Q,null));get uploadProgress(){return this.#f}set uploadProgress(xe){this.#f=xe}#h=(wt(this,Z),wt(this,ae,!1));get showMoveDialog(){return this.#h}set showMoveDialog(xe){this.#h=xe}#m=(wt(this,re),wt(this,V,null));get moveSource(){return this.#m}set moveSource(xe){this.#m=xe}#g=(wt(this,q),wt(this,se,""));get moveDestination(){return this.#g}set moveDestination(xe){this.#g=xe}#b=(wt(this,te),wt(this,Fe,!1));get moveInProgress(){return this.#b}set moveInProgress(xe){this.#b=xe}#v=(wt(this,Ve),wt(this,$e,null));get moveError(){return this.#v}set moveError(xe){this.#v=xe}#x=(wt(this,ze),wt(this,pe,!1));get showMovePickerDialog(){return this.#x}set showMovePickerDialog(xe){this.#x=xe}#y=(wt(this,be),wt(this,Ze,null));get movePickerSource(){return this.#y}set movePickerSource(xe){this.#y=xe}#w=(wt(this,nt),wt(this,_e,""));get movePickerCurrentPrefix(){return this.#w}set movePickerCurrentPrefix(xe){this.#w=xe}#M=(wt(this,we),wt(this,fe,[]));get movePickerPrefixes(){return this.#M}set movePickerPrefixes(xe){this.#M=xe}#k=(wt(this,ge),wt(this,bt,!1));get movePickerLoading(){return this.#k}set movePickerLoading(xe){this.#k=xe}#S=(wt(this,vt),wt(this,Ja,!1));get showRenameDialog(){return this.#S}set showRenameDialog(xe){this.#S=xe}#C=(wt(this,tr),wt(this,Ue,null));get renameSource(){return this.#C}set renameSource(xe){this.#C=xe}#z=(wt(this,mt),wt(this,Sr,""));get renameName(){return this.#z}set renameName(xe){this.#z=xe}#T=(wt(this,Ar),wt(this,Ir,!1));get renameInProgress(){return this.#T}set renameInProgress(xe){this.#T=xe}#_=(wt(this,go),wt(this,Le,null));get renameError(){return this.#_}set renameError(xe){this.#_=xe}#L=(wt(this,Se),wt(this,oa,null));get draggedItem(){return this.#L}set draggedItem(xe){this.#L=xe}resizing=(wt(this,bi),null);DEFAULT_COLUMN_WIDTH=250;MIN_COLUMN_WIDTH=150;MAX_COLUMN_WIDTH=500;dragCounters=new Map;folderHoverTimer=null;fileInputElement=null;folderInputElement=null;static styles=[h.defaultStyles,Ie,W`
21239
+ `,txt:""}[t]||""}function Jf(t){if(!t)return[];let e=t.split("/").filter(s=>s),a=[],r="";for(let s of e)r+=s+"/",a.push(r);return a}var nW=f(()=>{i(Tm,"formatSize");i(o3a,"formatCount");i(ma,"getFileName");i(_m,"validateMove");i(k1,"getParentPrefix");i(t4,"getContentType");i(Lm,"getDefaultContent");i(Jf,"getPathSegments")});var Ea,wt,n3a,OXe=f(()=>{le();Qr();tt();nW();Ea=function(t,e,a,r,s,o){function n(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}i(n,"accept");for(var l=r.kind,c=l==="getter"?"get":l==="setter"?"set":"value",d=!e&&t?r.static?t:t.prototype:null,u=e||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p,m=!1,v=a.length-1;v>=0;v--){var x={};for(var b in r)x[b]=b==="access"?{}:r[b];for(var b in r.access)x.access[b]=r.access[b];x.addInitializer=function(y){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(n(y||null))};var g=(0,a[v])(l==="accessor"?{get:u.get,set:u.set}:u[c],x);if(l==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(p=n(g.get))&&(u.get=p),(p=n(g.set))&&(u.set=p),(p=n(g.init))&&s.unshift(p)}else(p=n(g))&&(l==="field"?s.unshift(p):u[c]=p)}d&&Object.defineProperty(d,r.name,u),m=!0},wt=function(t,e,a){for(var r=arguments.length>2,s=0;s<e.length;s++)a=r?e[s].call(t,a):e[s].call(t);return r?a:void 0},n3a=(()=>{let t=[ie("dees-storage-columns")],e,a=[],r,s=ne,o,n=[],l=[],c,d=[],u=[],p,m=[],v=[],x,b=[],g=[],y,k=[],C=[],R,T=[],S=[],N,_=[],I=[],O,M=[],z=[],E,A=[],F=[],K,j=[],U=[],he,B=[],J=[],ve,P=[],H=[],de,ue=[],Y=[],X,Q=[],Z=[],me,ae=[],re=[],ye,V=[],q=[],oe,se=[],te=[],Ce,Fe=[],Ve=[],dt,$e=[],ze=[],Me,pe=[],be=[],Ae,Ke=[],nt=[],_t,_e=[],we=[],Ne,fe=[],ge=[],Pe,bt=[],vt=[],Ft,Ja=[],tr=[],gi,Ue=[],mt=[],er,Sr=[],Ar=[],Wr,Ir=[],go=[],bo,Le=[],Se=[],Be,oa=[],bi=[];var O2=class extends s{static{i(this,"DeesStorageColumns")}static{r=this}static{let xe=typeof Symbol=="function"&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;o=[$({type:Object})],c=[$({type:String})],p=[$({type:String})],x=[$({type:Number})],y=[G()],R=[G()],N=[G()],O=[G()],E=[G()],K=[G()],he=[G()],ve=[G()],de=[G()],X=[G()],me=[G()],ye=[G()],oe=[G()],Ce=[G()],dt=[G()],Me=[G()],Ae=[G()],_t=[G()],Ne=[G()],Pe=[G()],Ft=[G()],gi=[G()],er=[G()],Wr=[G()],bo=[G()],Be=[G()],Ea(this,null,o,{kind:"accessor",name:"dataProvider",static:!1,private:!1,access:{has:i(ce=>"dataProvider"in ce,"has"),get:i(ce=>ce.dataProvider,"get"),set:i((ce,Te)=>{ce.dataProvider=Te},"set")},metadata:xe},n,l),Ea(this,null,c,{kind:"accessor",name:"bucketName",static:!1,private:!1,access:{has:i(ce=>"bucketName"in ce,"has"),get:i(ce=>ce.bucketName,"get"),set:i((ce,Te)=>{ce.bucketName=Te},"set")},metadata:xe},d,u),Ea(this,null,p,{kind:"accessor",name:"currentPrefix",static:!1,private:!1,access:{has:i(ce=>"currentPrefix"in ce,"has"),get:i(ce=>ce.currentPrefix,"get"),set:i((ce,Te)=>{ce.currentPrefix=Te},"set")},metadata:xe},m,v),Ea(this,null,x,{kind:"accessor",name:"refreshKey",static:!1,private:!1,access:{has:i(ce=>"refreshKey"in ce,"has"),get:i(ce=>ce.refreshKey,"get"),set:i((ce,Te)=>{ce.refreshKey=Te},"set")},metadata:xe},b,g),Ea(this,null,y,{kind:"accessor",name:"columns",static:!1,private:!1,access:{has:i(ce=>"columns"in ce,"has"),get:i(ce=>ce.columns,"get"),set:i((ce,Te)=>{ce.columns=Te},"set")},metadata:xe},k,C),Ea(this,null,R,{kind:"accessor",name:"loading",static:!1,private:!1,access:{has:i(ce=>"loading"in ce,"has"),get:i(ce=>ce.loading,"get"),set:i((ce,Te)=>{ce.loading=Te},"set")},metadata:xe},T,S),Ea(this,null,N,{kind:"accessor",name:"showCreateDialog",static:!1,private:!1,access:{has:i(ce=>"showCreateDialog"in ce,"has"),get:i(ce=>ce.showCreateDialog,"get"),set:i((ce,Te)=>{ce.showCreateDialog=Te},"set")},metadata:xe},_,I),Ea(this,null,O,{kind:"accessor",name:"createDialogType",static:!1,private:!1,access:{has:i(ce=>"createDialogType"in ce,"has"),get:i(ce=>ce.createDialogType,"get"),set:i((ce,Te)=>{ce.createDialogType=Te},"set")},metadata:xe},M,z),Ea(this,null,E,{kind:"accessor",name:"createDialogPrefix",static:!1,private:!1,access:{has:i(ce=>"createDialogPrefix"in ce,"has"),get:i(ce=>ce.createDialogPrefix,"get"),set:i((ce,Te)=>{ce.createDialogPrefix=Te},"set")},metadata:xe},A,F),Ea(this,null,K,{kind:"accessor",name:"createDialogName",static:!1,private:!1,access:{has:i(ce=>"createDialogName"in ce,"has"),get:i(ce=>ce.createDialogName,"get"),set:i((ce,Te)=>{ce.createDialogName=Te},"set")},metadata:xe},j,U),Ea(this,null,he,{kind:"accessor",name:"dragOverColumnIndex",static:!1,private:!1,access:{has:i(ce=>"dragOverColumnIndex"in ce,"has"),get:i(ce=>ce.dragOverColumnIndex,"get"),set:i((ce,Te)=>{ce.dragOverColumnIndex=Te},"set")},metadata:xe},B,J),Ea(this,null,ve,{kind:"accessor",name:"dragOverFolderPrefix",static:!1,private:!1,access:{has:i(ce=>"dragOverFolderPrefix"in ce,"has"),get:i(ce=>ce.dragOverFolderPrefix,"get"),set:i((ce,Te)=>{ce.dragOverFolderPrefix=Te},"set")},metadata:xe},P,H),Ea(this,null,de,{kind:"accessor",name:"uploading",static:!1,private:!1,access:{has:i(ce=>"uploading"in ce,"has"),get:i(ce=>ce.uploading,"get"),set:i((ce,Te)=>{ce.uploading=Te},"set")},metadata:xe},ue,Y),Ea(this,null,X,{kind:"accessor",name:"uploadProgress",static:!1,private:!1,access:{has:i(ce=>"uploadProgress"in ce,"has"),get:i(ce=>ce.uploadProgress,"get"),set:i((ce,Te)=>{ce.uploadProgress=Te},"set")},metadata:xe},Q,Z),Ea(this,null,me,{kind:"accessor",name:"showMoveDialog",static:!1,private:!1,access:{has:i(ce=>"showMoveDialog"in ce,"has"),get:i(ce=>ce.showMoveDialog,"get"),set:i((ce,Te)=>{ce.showMoveDialog=Te},"set")},metadata:xe},ae,re),Ea(this,null,ye,{kind:"accessor",name:"moveSource",static:!1,private:!1,access:{has:i(ce=>"moveSource"in ce,"has"),get:i(ce=>ce.moveSource,"get"),set:i((ce,Te)=>{ce.moveSource=Te},"set")},metadata:xe},V,q),Ea(this,null,oe,{kind:"accessor",name:"moveDestination",static:!1,private:!1,access:{has:i(ce=>"moveDestination"in ce,"has"),get:i(ce=>ce.moveDestination,"get"),set:i((ce,Te)=>{ce.moveDestination=Te},"set")},metadata:xe},se,te),Ea(this,null,Ce,{kind:"accessor",name:"moveInProgress",static:!1,private:!1,access:{has:i(ce=>"moveInProgress"in ce,"has"),get:i(ce=>ce.moveInProgress,"get"),set:i((ce,Te)=>{ce.moveInProgress=Te},"set")},metadata:xe},Fe,Ve),Ea(this,null,dt,{kind:"accessor",name:"moveError",static:!1,private:!1,access:{has:i(ce=>"moveError"in ce,"has"),get:i(ce=>ce.moveError,"get"),set:i((ce,Te)=>{ce.moveError=Te},"set")},metadata:xe},$e,ze),Ea(this,null,Me,{kind:"accessor",name:"showMovePickerDialog",static:!1,private:!1,access:{has:i(ce=>"showMovePickerDialog"in ce,"has"),get:i(ce=>ce.showMovePickerDialog,"get"),set:i((ce,Te)=>{ce.showMovePickerDialog=Te},"set")},metadata:xe},pe,be),Ea(this,null,Ae,{kind:"accessor",name:"movePickerSource",static:!1,private:!1,access:{has:i(ce=>"movePickerSource"in ce,"has"),get:i(ce=>ce.movePickerSource,"get"),set:i((ce,Te)=>{ce.movePickerSource=Te},"set")},metadata:xe},Ke,nt),Ea(this,null,_t,{kind:"accessor",name:"movePickerCurrentPrefix",static:!1,private:!1,access:{has:i(ce=>"movePickerCurrentPrefix"in ce,"has"),get:i(ce=>ce.movePickerCurrentPrefix,"get"),set:i((ce,Te)=>{ce.movePickerCurrentPrefix=Te},"set")},metadata:xe},_e,we),Ea(this,null,Ne,{kind:"accessor",name:"movePickerPrefixes",static:!1,private:!1,access:{has:i(ce=>"movePickerPrefixes"in ce,"has"),get:i(ce=>ce.movePickerPrefixes,"get"),set:i((ce,Te)=>{ce.movePickerPrefixes=Te},"set")},metadata:xe},fe,ge),Ea(this,null,Pe,{kind:"accessor",name:"movePickerLoading",static:!1,private:!1,access:{has:i(ce=>"movePickerLoading"in ce,"has"),get:i(ce=>ce.movePickerLoading,"get"),set:i((ce,Te)=>{ce.movePickerLoading=Te},"set")},metadata:xe},bt,vt),Ea(this,null,Ft,{kind:"accessor",name:"showRenameDialog",static:!1,private:!1,access:{has:i(ce=>"showRenameDialog"in ce,"has"),get:i(ce=>ce.showRenameDialog,"get"),set:i((ce,Te)=>{ce.showRenameDialog=Te},"set")},metadata:xe},Ja,tr),Ea(this,null,gi,{kind:"accessor",name:"renameSource",static:!1,private:!1,access:{has:i(ce=>"renameSource"in ce,"has"),get:i(ce=>ce.renameSource,"get"),set:i((ce,Te)=>{ce.renameSource=Te},"set")},metadata:xe},Ue,mt),Ea(this,null,er,{kind:"accessor",name:"renameName",static:!1,private:!1,access:{has:i(ce=>"renameName"in ce,"has"),get:i(ce=>ce.renameName,"get"),set:i((ce,Te)=>{ce.renameName=Te},"set")},metadata:xe},Sr,Ar),Ea(this,null,Wr,{kind:"accessor",name:"renameInProgress",static:!1,private:!1,access:{has:i(ce=>"renameInProgress"in ce,"has"),get:i(ce=>ce.renameInProgress,"get"),set:i((ce,Te)=>{ce.renameInProgress=Te},"set")},metadata:xe},Ir,go),Ea(this,null,bo,{kind:"accessor",name:"renameError",static:!1,private:!1,access:{has:i(ce=>"renameError"in ce,"has"),get:i(ce=>ce.renameError,"get"),set:i((ce,Te)=>{ce.renameError=Te},"set")},metadata:xe},Le,Se),Ea(this,null,Be,{kind:"accessor",name:"draggedItem",static:!1,private:!1,access:{has:i(ce=>"draggedItem"in ce,"has"),get:i(ce=>ce.draggedItem,"get"),set:i((ce,Te)=>{ce.draggedItem=Te},"set")},metadata:xe},oa,bi),Ea(null,e={value:r},t,{kind:"class",name:r.name,metadata:xe},null,a),O2=r=e.value,xe&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:xe})}#e=wt(this,n,null);get dataProvider(){return this.#e}set dataProvider(xe){this.#e=xe}#t=(wt(this,l),wt(this,d,""));get bucketName(){return this.#t}set bucketName(xe){this.#t=xe}#a=(wt(this,u),wt(this,m,""));get currentPrefix(){return this.#a}set currentPrefix(xe){this.#a=xe}#r=(wt(this,v),wt(this,b,0));get refreshKey(){return this.#r}set refreshKey(xe){this.#r=xe}#i=(wt(this,g),wt(this,k,[]));get columns(){return this.#i}set columns(xe){this.#i=xe}#s=(wt(this,C),wt(this,T,!1));get loading(){return this.#s}set loading(xe){this.#s=xe}#o=(wt(this,S),wt(this,_,!1));get showCreateDialog(){return this.#o}set showCreateDialog(xe){this.#o=xe}#n=(wt(this,I),wt(this,M,"folder"));get createDialogType(){return this.#n}set createDialogType(xe){this.#n=xe}#l=(wt(this,z),wt(this,A,""));get createDialogPrefix(){return this.#l}set createDialogPrefix(xe){this.#l=xe}#c=(wt(this,F),wt(this,j,""));get createDialogName(){return this.#c}set createDialogName(xe){this.#c=xe}#d=(wt(this,U),wt(this,B,-1));get dragOverColumnIndex(){return this.#d}set dragOverColumnIndex(xe){this.#d=xe}#u=(wt(this,J),wt(this,P,null));get dragOverFolderPrefix(){return this.#u}set dragOverFolderPrefix(xe){this.#u=xe}#p=(wt(this,H),wt(this,ue,!1));get uploading(){return this.#p}set uploading(xe){this.#p=xe}#f=(wt(this,Y),wt(this,Q,null));get uploadProgress(){return this.#f}set uploadProgress(xe){this.#f=xe}#h=(wt(this,Z),wt(this,ae,!1));get showMoveDialog(){return this.#h}set showMoveDialog(xe){this.#h=xe}#m=(wt(this,re),wt(this,V,null));get moveSource(){return this.#m}set moveSource(xe){this.#m=xe}#g=(wt(this,q),wt(this,se,""));get moveDestination(){return this.#g}set moveDestination(xe){this.#g=xe}#b=(wt(this,te),wt(this,Fe,!1));get moveInProgress(){return this.#b}set moveInProgress(xe){this.#b=xe}#v=(wt(this,Ve),wt(this,$e,null));get moveError(){return this.#v}set moveError(xe){this.#v=xe}#x=(wt(this,ze),wt(this,pe,!1));get showMovePickerDialog(){return this.#x}set showMovePickerDialog(xe){this.#x=xe}#y=(wt(this,be),wt(this,Ke,null));get movePickerSource(){return this.#y}set movePickerSource(xe){this.#y=xe}#w=(wt(this,nt),wt(this,_e,""));get movePickerCurrentPrefix(){return this.#w}set movePickerCurrentPrefix(xe){this.#w=xe}#M=(wt(this,we),wt(this,fe,[]));get movePickerPrefixes(){return this.#M}set movePickerPrefixes(xe){this.#M=xe}#k=(wt(this,ge),wt(this,bt,!1));get movePickerLoading(){return this.#k}set movePickerLoading(xe){this.#k=xe}#S=(wt(this,vt),wt(this,Ja,!1));get showRenameDialog(){return this.#S}set showRenameDialog(xe){this.#S=xe}#C=(wt(this,tr),wt(this,Ue,null));get renameSource(){return this.#C}set renameSource(xe){this.#C=xe}#z=(wt(this,mt),wt(this,Sr,""));get renameName(){return this.#z}set renameName(xe){this.#z=xe}#T=(wt(this,Ar),wt(this,Ir,!1));get renameInProgress(){return this.#T}set renameInProgress(xe){this.#T=xe}#_=(wt(this,go),wt(this,Le,null));get renameError(){return this.#_}set renameError(xe){this.#_=xe}#L=(wt(this,Se),wt(this,oa,null));get draggedItem(){return this.#L}set draggedItem(xe){this.#L=xe}resizing=(wt(this,bi),null);DEFAULT_COLUMN_WIDTH=250;MIN_COLUMN_WIDTH=150;MAX_COLUMN_WIDTH=500;dragCounters=new Map;folderHoverTimer=null;fileInputElement=null;folderInputElement=null;static styles=[h.defaultStyles,Ie,W`
21240
21240
  :host {
21241
21241
  display: block;
21242
21242
  height: 100%;
@@ -21869,7 +21869,7 @@ echo "Deploying..."
21869
21869
  </div>
21870
21870
  `:""}
21871
21871
  </div>
21872
- `}static{wt(r,a)}};return O2=r})()});var Za,$t,l3a,BXe=f(()=>{le();Qr();tt();nW();Za=function(t,e,a,r,s,o){function n(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}i(n,"accept");for(var l=r.kind,c=l==="getter"?"get":l==="setter"?"set":"value",d=!e&&t?r.static?t:t.prototype:null,u=e||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p,m=!1,v=a.length-1;v>=0;v--){var x={};for(var b in r)x[b]=b==="access"?{}:r[b];for(var b in r.access)x.access[b]=r.access[b];x.addInitializer=function(y){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(n(y||null))};var g=(0,a[v])(l==="accessor"?{get:u.get,set:u.set}:u[c],x);if(l==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(p=n(g.get))&&(u.get=p),(p=n(g.set))&&(u.set=p),(p=n(g.init))&&s.unshift(p)}else(p=n(g))&&(l==="field"?s.unshift(p):u[c]=p)}d&&Object.defineProperty(d,r.name,u),m=!0},$t=function(t,e,a){for(var r=arguments.length>2,s=0;s<e.length;s++)a=r?e[s].call(t,a):e[s].call(t);return r?a:void 0},l3a=(()=>{let t=[ie("dees-storage-keys")],e,a=[],r,s=ne,o,n=[],l=[],c,d=[],u=[],p,m=[],v=[],x,b=[],g=[],y,k=[],C=[],R,T=[],S=[],N,_=[],I=[],O,M=[],z=[],E,A=[],F=[],K,j=[],U=[],he,B=[],J=[],ve,P=[],H=[],de,ue=[],Y=[],X,Q=[],Z=[],me,ae=[],re=[],ye,V=[],q=[],oe,se=[],te=[],Ce,Fe=[],Ve=[],dt,$e=[],ze=[],Me,pe=[],be=[],Ae,Ze=[],nt=[],_t,_e=[],we=[],Ne,fe=[],ge=[],Pe,bt=[],vt=[],Ft,Ja=[],tr=[],gi,Ue=[],mt=[],er,Sr=[],Ar=[],Wr,Ir=[],go=[];var bo=class extends s{static{i(this,"DeesStorageKeys")}static{r=this}static{let Le=typeof Symbol=="function"&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;o=[$({type:Object})],c=[$({type:String})],p=[$({type:String})],x=[$({type:Number})],y=[G()],R=[G()],N=[G()],O=[G()],E=[G()],K=[G()],he=[G()],ve=[G()],de=[G()],X=[G()],me=[G()],ye=[G()],oe=[G()],Ce=[G()],dt=[G()],Me=[G()],Ae=[G()],_t=[G()],Ne=[G()],Pe=[G()],Ft=[G()],gi=[G()],er=[G()],Wr=[G()],Za(this,null,o,{kind:"accessor",name:"dataProvider",static:!1,private:!1,access:{has:i(Se=>"dataProvider"in Se,"has"),get:i(Se=>Se.dataProvider,"get"),set:i((Se,Be)=>{Se.dataProvider=Be},"set")},metadata:Le},n,l),Za(this,null,c,{kind:"accessor",name:"bucketName",static:!1,private:!1,access:{has:i(Se=>"bucketName"in Se,"has"),get:i(Se=>Se.bucketName,"get"),set:i((Se,Be)=>{Se.bucketName=Be},"set")},metadata:Le},d,u),Za(this,null,p,{kind:"accessor",name:"currentPrefix",static:!1,private:!1,access:{has:i(Se=>"currentPrefix"in Se,"has"),get:i(Se=>Se.currentPrefix,"get"),set:i((Se,Be)=>{Se.currentPrefix=Be},"set")},metadata:Le},m,v),Za(this,null,x,{kind:"accessor",name:"refreshKey",static:!1,private:!1,access:{has:i(Se=>"refreshKey"in Se,"has"),get:i(Se=>Se.refreshKey,"get"),set:i((Se,Be)=>{Se.refreshKey=Be},"set")},metadata:Le},b,g),Za(this,null,y,{kind:"accessor",name:"allKeys",static:!1,private:!1,access:{has:i(Se=>"allKeys"in Se,"has"),get:i(Se=>Se.allKeys,"get"),set:i((Se,Be)=>{Se.allKeys=Be},"set")},metadata:Le},k,C),Za(this,null,R,{kind:"accessor",name:"prefixes",static:!1,private:!1,access:{has:i(Se=>"prefixes"in Se,"has"),get:i(Se=>Se.prefixes,"get"),set:i((Se,Be)=>{Se.prefixes=Be},"set")},metadata:Le},T,S),Za(this,null,N,{kind:"accessor",name:"loading",static:!1,private:!1,access:{has:i(Se=>"loading"in Se,"has"),get:i(Se=>Se.loading,"get"),set:i((Se,Be)=>{Se.loading=Be},"set")},metadata:Le},_,I),Za(this,null,O,{kind:"accessor",name:"selectedKey",static:!1,private:!1,access:{has:i(Se=>"selectedKey"in Se,"has"),get:i(Se=>Se.selectedKey,"get"),set:i((Se,Be)=>{Se.selectedKey=Be},"set")},metadata:Le},M,z),Za(this,null,E,{kind:"accessor",name:"filterText",static:!1,private:!1,access:{has:i(Se=>"filterText"in Se,"has"),get:i(Se=>Se.filterText,"get"),set:i((Se,Be)=>{Se.filterText=Be},"set")},metadata:Le},A,F),Za(this,null,K,{kind:"accessor",name:"showCreateDialog",static:!1,private:!1,access:{has:i(Se=>"showCreateDialog"in Se,"has"),get:i(Se=>Se.showCreateDialog,"get"),set:i((Se,Be)=>{Se.showCreateDialog=Be},"set")},metadata:Le},j,U),Za(this,null,he,{kind:"accessor",name:"createDialogType",static:!1,private:!1,access:{has:i(Se=>"createDialogType"in Se,"has"),get:i(Se=>Se.createDialogType,"get"),set:i((Se,Be)=>{Se.createDialogType=Be},"set")},metadata:Le},B,J),Za(this,null,ve,{kind:"accessor",name:"createDialogPrefix",static:!1,private:!1,access:{has:i(Se=>"createDialogPrefix"in Se,"has"),get:i(Se=>Se.createDialogPrefix,"get"),set:i((Se,Be)=>{Se.createDialogPrefix=Be},"set")},metadata:Le},P,H),Za(this,null,de,{kind:"accessor",name:"createDialogName",static:!1,private:!1,access:{has:i(Se=>"createDialogName"in Se,"has"),get:i(Se=>Se.createDialogName,"get"),set:i((Se,Be)=>{Se.createDialogName=Be},"set")},metadata:Le},ue,Y),Za(this,null,X,{kind:"accessor",name:"showMoveDialog",static:!1,private:!1,access:{has:i(Se=>"showMoveDialog"in Se,"has"),get:i(Se=>Se.showMoveDialog,"get"),set:i((Se,Be)=>{Se.showMoveDialog=Be},"set")},metadata:Le},Q,Z),Za(this,null,me,{kind:"accessor",name:"moveSource",static:!1,private:!1,access:{has:i(Se=>"moveSource"in Se,"has"),get:i(Se=>Se.moveSource,"get"),set:i((Se,Be)=>{Se.moveSource=Be},"set")},metadata:Le},ae,re),Za(this,null,ye,{kind:"accessor",name:"moveDestination",static:!1,private:!1,access:{has:i(Se=>"moveDestination"in Se,"has"),get:i(Se=>Se.moveDestination,"get"),set:i((Se,Be)=>{Se.moveDestination=Be},"set")},metadata:Le},V,q),Za(this,null,oe,{kind:"accessor",name:"moveInProgress",static:!1,private:!1,access:{has:i(Se=>"moveInProgress"in Se,"has"),get:i(Se=>Se.moveInProgress,"get"),set:i((Se,Be)=>{Se.moveInProgress=Be},"set")},metadata:Le},se,te),Za(this,null,Ce,{kind:"accessor",name:"moveError",static:!1,private:!1,access:{has:i(Se=>"moveError"in Se,"has"),get:i(Se=>Se.moveError,"get"),set:i((Se,Be)=>{Se.moveError=Be},"set")},metadata:Le},Fe,Ve),Za(this,null,dt,{kind:"accessor",name:"showMovePickerDialog",static:!1,private:!1,access:{has:i(Se=>"showMovePickerDialog"in Se,"has"),get:i(Se=>Se.showMovePickerDialog,"get"),set:i((Se,Be)=>{Se.showMovePickerDialog=Be},"set")},metadata:Le},$e,ze),Za(this,null,Me,{kind:"accessor",name:"movePickerSource",static:!1,private:!1,access:{has:i(Se=>"movePickerSource"in Se,"has"),get:i(Se=>Se.movePickerSource,"get"),set:i((Se,Be)=>{Se.movePickerSource=Be},"set")},metadata:Le},pe,be),Za(this,null,Ae,{kind:"accessor",name:"movePickerCurrentPrefix",static:!1,private:!1,access:{has:i(Se=>"movePickerCurrentPrefix"in Se,"has"),get:i(Se=>Se.movePickerCurrentPrefix,"get"),set:i((Se,Be)=>{Se.movePickerCurrentPrefix=Be},"set")},metadata:Le},Ze,nt),Za(this,null,_t,{kind:"accessor",name:"movePickerPrefixes",static:!1,private:!1,access:{has:i(Se=>"movePickerPrefixes"in Se,"has"),get:i(Se=>Se.movePickerPrefixes,"get"),set:i((Se,Be)=>{Se.movePickerPrefixes=Be},"set")},metadata:Le},_e,we),Za(this,null,Ne,{kind:"accessor",name:"movePickerLoading",static:!1,private:!1,access:{has:i(Se=>"movePickerLoading"in Se,"has"),get:i(Se=>Se.movePickerLoading,"get"),set:i((Se,Be)=>{Se.movePickerLoading=Be},"set")},metadata:Le},fe,ge),Za(this,null,Pe,{kind:"accessor",name:"showRenameDialog",static:!1,private:!1,access:{has:i(Se=>"showRenameDialog"in Se,"has"),get:i(Se=>Se.showRenameDialog,"get"),set:i((Se,Be)=>{Se.showRenameDialog=Be},"set")},metadata:Le},bt,vt),Za(this,null,Ft,{kind:"accessor",name:"renameSource",static:!1,private:!1,access:{has:i(Se=>"renameSource"in Se,"has"),get:i(Se=>Se.renameSource,"get"),set:i((Se,Be)=>{Se.renameSource=Be},"set")},metadata:Le},Ja,tr),Za(this,null,gi,{kind:"accessor",name:"renameName",static:!1,private:!1,access:{has:i(Se=>"renameName"in Se,"has"),get:i(Se=>Se.renameName,"get"),set:i((Se,Be)=>{Se.renameName=Be},"set")},metadata:Le},Ue,mt),Za(this,null,er,{kind:"accessor",name:"renameInProgress",static:!1,private:!1,access:{has:i(Se=>"renameInProgress"in Se,"has"),get:i(Se=>Se.renameInProgress,"get"),set:i((Se,Be)=>{Se.renameInProgress=Be},"set")},metadata:Le},Sr,Ar),Za(this,null,Wr,{kind:"accessor",name:"renameError",static:!1,private:!1,access:{has:i(Se=>"renameError"in Se,"has"),get:i(Se=>Se.renameError,"get"),set:i((Se,Be)=>{Se.renameError=Be},"set")},metadata:Le},Ir,go),Za(null,e={value:r},t,{kind:"class",name:r.name,metadata:Le},null,a),bo=r=e.value,Le&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:Le})}#e=$t(this,n,null);get dataProvider(){return this.#e}set dataProvider(Le){this.#e=Le}#t=($t(this,l),$t(this,d,""));get bucketName(){return this.#t}set bucketName(Le){this.#t=Le}#a=($t(this,u),$t(this,m,""));get currentPrefix(){return this.#a}set currentPrefix(Le){this.#a=Le}#r=($t(this,v),$t(this,b,0));get refreshKey(){return this.#r}set refreshKey(Le){this.#r=Le}#i=($t(this,g),$t(this,k,[]));get allKeys(){return this.#i}set allKeys(Le){this.#i=Le}#s=($t(this,C),$t(this,T,[]));get prefixes(){return this.#s}set prefixes(Le){this.#s=Le}#o=($t(this,S),$t(this,_,!1));get loading(){return this.#o}set loading(Le){this.#o=Le}#n=($t(this,I),$t(this,M,""));get selectedKey(){return this.#n}set selectedKey(Le){this.#n=Le}#l=($t(this,z),$t(this,A,""));get filterText(){return this.#l}set filterText(Le){this.#l=Le}#c=($t(this,F),$t(this,j,!1));get showCreateDialog(){return this.#c}set showCreateDialog(Le){this.#c=Le}#d=($t(this,U),$t(this,B,"folder"));get createDialogType(){return this.#d}set createDialogType(Le){this.#d=Le}#u=($t(this,J),$t(this,P,""));get createDialogPrefix(){return this.#u}set createDialogPrefix(Le){this.#u=Le}#p=($t(this,H),$t(this,ue,""));get createDialogName(){return this.#p}set createDialogName(Le){this.#p=Le}#f=($t(this,Y),$t(this,Q,!1));get showMoveDialog(){return this.#f}set showMoveDialog(Le){this.#f=Le}#h=($t(this,Z),$t(this,ae,null));get moveSource(){return this.#h}set moveSource(Le){this.#h=Le}#m=($t(this,re),$t(this,V,""));get moveDestination(){return this.#m}set moveDestination(Le){this.#m=Le}#g=($t(this,q),$t(this,se,!1));get moveInProgress(){return this.#g}set moveInProgress(Le){this.#g=Le}#b=($t(this,te),$t(this,Fe,null));get moveError(){return this.#b}set moveError(Le){this.#b=Le}#v=($t(this,Ve),$t(this,$e,!1));get showMovePickerDialog(){return this.#v}set showMovePickerDialog(Le){this.#v=Le}#x=($t(this,ze),$t(this,pe,null));get movePickerSource(){return this.#x}set movePickerSource(Le){this.#x=Le}#y=($t(this,be),$t(this,Ze,""));get movePickerCurrentPrefix(){return this.#y}set movePickerCurrentPrefix(Le){this.#y=Le}#w=($t(this,nt),$t(this,_e,[]));get movePickerPrefixes(){return this.#w}set movePickerPrefixes(Le){this.#w=Le}#M=($t(this,we),$t(this,fe,!1));get movePickerLoading(){return this.#M}set movePickerLoading(Le){this.#M=Le}#k=($t(this,ge),$t(this,bt,!1));get showRenameDialog(){return this.#k}set showRenameDialog(Le){this.#k=Le}#S=($t(this,vt),$t(this,Ja,null));get renameSource(){return this.#S}set renameSource(Le){this.#S=Le}#C=($t(this,tr),$t(this,Ue,""));get renameName(){return this.#C}set renameName(Le){this.#C=Le}#z=($t(this,mt),$t(this,Sr,!1));get renameInProgress(){return this.#z}set renameInProgress(Le){this.#z=Le}#T=($t(this,Ar),$t(this,Ir,null));get renameError(){return this.#T}set renameError(Le){this.#T=Le}static styles=[h.defaultStyles,Ie,W`
21872
+ `}static{wt(r,a)}};return O2=r})()});var Za,$t,l3a,BXe=f(()=>{le();Qr();tt();nW();Za=function(t,e,a,r,s,o){function n(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}i(n,"accept");for(var l=r.kind,c=l==="getter"?"get":l==="setter"?"set":"value",d=!e&&t?r.static?t:t.prototype:null,u=e||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p,m=!1,v=a.length-1;v>=0;v--){var x={};for(var b in r)x[b]=b==="access"?{}:r[b];for(var b in r.access)x.access[b]=r.access[b];x.addInitializer=function(y){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(n(y||null))};var g=(0,a[v])(l==="accessor"?{get:u.get,set:u.set}:u[c],x);if(l==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(p=n(g.get))&&(u.get=p),(p=n(g.set))&&(u.set=p),(p=n(g.init))&&s.unshift(p)}else(p=n(g))&&(l==="field"?s.unshift(p):u[c]=p)}d&&Object.defineProperty(d,r.name,u),m=!0},$t=function(t,e,a){for(var r=arguments.length>2,s=0;s<e.length;s++)a=r?e[s].call(t,a):e[s].call(t);return r?a:void 0},l3a=(()=>{let t=[ie("dees-storage-keys")],e,a=[],r,s=ne,o,n=[],l=[],c,d=[],u=[],p,m=[],v=[],x,b=[],g=[],y,k=[],C=[],R,T=[],S=[],N,_=[],I=[],O,M=[],z=[],E,A=[],F=[],K,j=[],U=[],he,B=[],J=[],ve,P=[],H=[],de,ue=[],Y=[],X,Q=[],Z=[],me,ae=[],re=[],ye,V=[],q=[],oe,se=[],te=[],Ce,Fe=[],Ve=[],dt,$e=[],ze=[],Me,pe=[],be=[],Ae,Ke=[],nt=[],_t,_e=[],we=[],Ne,fe=[],ge=[],Pe,bt=[],vt=[],Ft,Ja=[],tr=[],gi,Ue=[],mt=[],er,Sr=[],Ar=[],Wr,Ir=[],go=[];var bo=class extends s{static{i(this,"DeesStorageKeys")}static{r=this}static{let Le=typeof Symbol=="function"&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;o=[$({type:Object})],c=[$({type:String})],p=[$({type:String})],x=[$({type:Number})],y=[G()],R=[G()],N=[G()],O=[G()],E=[G()],K=[G()],he=[G()],ve=[G()],de=[G()],X=[G()],me=[G()],ye=[G()],oe=[G()],Ce=[G()],dt=[G()],Me=[G()],Ae=[G()],_t=[G()],Ne=[G()],Pe=[G()],Ft=[G()],gi=[G()],er=[G()],Wr=[G()],Za(this,null,o,{kind:"accessor",name:"dataProvider",static:!1,private:!1,access:{has:i(Se=>"dataProvider"in Se,"has"),get:i(Se=>Se.dataProvider,"get"),set:i((Se,Be)=>{Se.dataProvider=Be},"set")},metadata:Le},n,l),Za(this,null,c,{kind:"accessor",name:"bucketName",static:!1,private:!1,access:{has:i(Se=>"bucketName"in Se,"has"),get:i(Se=>Se.bucketName,"get"),set:i((Se,Be)=>{Se.bucketName=Be},"set")},metadata:Le},d,u),Za(this,null,p,{kind:"accessor",name:"currentPrefix",static:!1,private:!1,access:{has:i(Se=>"currentPrefix"in Se,"has"),get:i(Se=>Se.currentPrefix,"get"),set:i((Se,Be)=>{Se.currentPrefix=Be},"set")},metadata:Le},m,v),Za(this,null,x,{kind:"accessor",name:"refreshKey",static:!1,private:!1,access:{has:i(Se=>"refreshKey"in Se,"has"),get:i(Se=>Se.refreshKey,"get"),set:i((Se,Be)=>{Se.refreshKey=Be},"set")},metadata:Le},b,g),Za(this,null,y,{kind:"accessor",name:"allKeys",static:!1,private:!1,access:{has:i(Se=>"allKeys"in Se,"has"),get:i(Se=>Se.allKeys,"get"),set:i((Se,Be)=>{Se.allKeys=Be},"set")},metadata:Le},k,C),Za(this,null,R,{kind:"accessor",name:"prefixes",static:!1,private:!1,access:{has:i(Se=>"prefixes"in Se,"has"),get:i(Se=>Se.prefixes,"get"),set:i((Se,Be)=>{Se.prefixes=Be},"set")},metadata:Le},T,S),Za(this,null,N,{kind:"accessor",name:"loading",static:!1,private:!1,access:{has:i(Se=>"loading"in Se,"has"),get:i(Se=>Se.loading,"get"),set:i((Se,Be)=>{Se.loading=Be},"set")},metadata:Le},_,I),Za(this,null,O,{kind:"accessor",name:"selectedKey",static:!1,private:!1,access:{has:i(Se=>"selectedKey"in Se,"has"),get:i(Se=>Se.selectedKey,"get"),set:i((Se,Be)=>{Se.selectedKey=Be},"set")},metadata:Le},M,z),Za(this,null,E,{kind:"accessor",name:"filterText",static:!1,private:!1,access:{has:i(Se=>"filterText"in Se,"has"),get:i(Se=>Se.filterText,"get"),set:i((Se,Be)=>{Se.filterText=Be},"set")},metadata:Le},A,F),Za(this,null,K,{kind:"accessor",name:"showCreateDialog",static:!1,private:!1,access:{has:i(Se=>"showCreateDialog"in Se,"has"),get:i(Se=>Se.showCreateDialog,"get"),set:i((Se,Be)=>{Se.showCreateDialog=Be},"set")},metadata:Le},j,U),Za(this,null,he,{kind:"accessor",name:"createDialogType",static:!1,private:!1,access:{has:i(Se=>"createDialogType"in Se,"has"),get:i(Se=>Se.createDialogType,"get"),set:i((Se,Be)=>{Se.createDialogType=Be},"set")},metadata:Le},B,J),Za(this,null,ve,{kind:"accessor",name:"createDialogPrefix",static:!1,private:!1,access:{has:i(Se=>"createDialogPrefix"in Se,"has"),get:i(Se=>Se.createDialogPrefix,"get"),set:i((Se,Be)=>{Se.createDialogPrefix=Be},"set")},metadata:Le},P,H),Za(this,null,de,{kind:"accessor",name:"createDialogName",static:!1,private:!1,access:{has:i(Se=>"createDialogName"in Se,"has"),get:i(Se=>Se.createDialogName,"get"),set:i((Se,Be)=>{Se.createDialogName=Be},"set")},metadata:Le},ue,Y),Za(this,null,X,{kind:"accessor",name:"showMoveDialog",static:!1,private:!1,access:{has:i(Se=>"showMoveDialog"in Se,"has"),get:i(Se=>Se.showMoveDialog,"get"),set:i((Se,Be)=>{Se.showMoveDialog=Be},"set")},metadata:Le},Q,Z),Za(this,null,me,{kind:"accessor",name:"moveSource",static:!1,private:!1,access:{has:i(Se=>"moveSource"in Se,"has"),get:i(Se=>Se.moveSource,"get"),set:i((Se,Be)=>{Se.moveSource=Be},"set")},metadata:Le},ae,re),Za(this,null,ye,{kind:"accessor",name:"moveDestination",static:!1,private:!1,access:{has:i(Se=>"moveDestination"in Se,"has"),get:i(Se=>Se.moveDestination,"get"),set:i((Se,Be)=>{Se.moveDestination=Be},"set")},metadata:Le},V,q),Za(this,null,oe,{kind:"accessor",name:"moveInProgress",static:!1,private:!1,access:{has:i(Se=>"moveInProgress"in Se,"has"),get:i(Se=>Se.moveInProgress,"get"),set:i((Se,Be)=>{Se.moveInProgress=Be},"set")},metadata:Le},se,te),Za(this,null,Ce,{kind:"accessor",name:"moveError",static:!1,private:!1,access:{has:i(Se=>"moveError"in Se,"has"),get:i(Se=>Se.moveError,"get"),set:i((Se,Be)=>{Se.moveError=Be},"set")},metadata:Le},Fe,Ve),Za(this,null,dt,{kind:"accessor",name:"showMovePickerDialog",static:!1,private:!1,access:{has:i(Se=>"showMovePickerDialog"in Se,"has"),get:i(Se=>Se.showMovePickerDialog,"get"),set:i((Se,Be)=>{Se.showMovePickerDialog=Be},"set")},metadata:Le},$e,ze),Za(this,null,Me,{kind:"accessor",name:"movePickerSource",static:!1,private:!1,access:{has:i(Se=>"movePickerSource"in Se,"has"),get:i(Se=>Se.movePickerSource,"get"),set:i((Se,Be)=>{Se.movePickerSource=Be},"set")},metadata:Le},pe,be),Za(this,null,Ae,{kind:"accessor",name:"movePickerCurrentPrefix",static:!1,private:!1,access:{has:i(Se=>"movePickerCurrentPrefix"in Se,"has"),get:i(Se=>Se.movePickerCurrentPrefix,"get"),set:i((Se,Be)=>{Se.movePickerCurrentPrefix=Be},"set")},metadata:Le},Ke,nt),Za(this,null,_t,{kind:"accessor",name:"movePickerPrefixes",static:!1,private:!1,access:{has:i(Se=>"movePickerPrefixes"in Se,"has"),get:i(Se=>Se.movePickerPrefixes,"get"),set:i((Se,Be)=>{Se.movePickerPrefixes=Be},"set")},metadata:Le},_e,we),Za(this,null,Ne,{kind:"accessor",name:"movePickerLoading",static:!1,private:!1,access:{has:i(Se=>"movePickerLoading"in Se,"has"),get:i(Se=>Se.movePickerLoading,"get"),set:i((Se,Be)=>{Se.movePickerLoading=Be},"set")},metadata:Le},fe,ge),Za(this,null,Pe,{kind:"accessor",name:"showRenameDialog",static:!1,private:!1,access:{has:i(Se=>"showRenameDialog"in Se,"has"),get:i(Se=>Se.showRenameDialog,"get"),set:i((Se,Be)=>{Se.showRenameDialog=Be},"set")},metadata:Le},bt,vt),Za(this,null,Ft,{kind:"accessor",name:"renameSource",static:!1,private:!1,access:{has:i(Se=>"renameSource"in Se,"has"),get:i(Se=>Se.renameSource,"get"),set:i((Se,Be)=>{Se.renameSource=Be},"set")},metadata:Le},Ja,tr),Za(this,null,gi,{kind:"accessor",name:"renameName",static:!1,private:!1,access:{has:i(Se=>"renameName"in Se,"has"),get:i(Se=>Se.renameName,"get"),set:i((Se,Be)=>{Se.renameName=Be},"set")},metadata:Le},Ue,mt),Za(this,null,er,{kind:"accessor",name:"renameInProgress",static:!1,private:!1,access:{has:i(Se=>"renameInProgress"in Se,"has"),get:i(Se=>Se.renameInProgress,"get"),set:i((Se,Be)=>{Se.renameInProgress=Be},"set")},metadata:Le},Sr,Ar),Za(this,null,Wr,{kind:"accessor",name:"renameError",static:!1,private:!1,access:{has:i(Se=>"renameError"in Se,"has"),get:i(Se=>Se.renameError,"get"),set:i((Se,Be)=>{Se.renameError=Be},"set")},metadata:Le},Ir,go),Za(null,e={value:r},t,{kind:"class",name:r.name,metadata:Le},null,a),bo=r=e.value,Le&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:Le})}#e=$t(this,n,null);get dataProvider(){return this.#e}set dataProvider(Le){this.#e=Le}#t=($t(this,l),$t(this,d,""));get bucketName(){return this.#t}set bucketName(Le){this.#t=Le}#a=($t(this,u),$t(this,m,""));get currentPrefix(){return this.#a}set currentPrefix(Le){this.#a=Le}#r=($t(this,v),$t(this,b,0));get refreshKey(){return this.#r}set refreshKey(Le){this.#r=Le}#i=($t(this,g),$t(this,k,[]));get allKeys(){return this.#i}set allKeys(Le){this.#i=Le}#s=($t(this,C),$t(this,T,[]));get prefixes(){return this.#s}set prefixes(Le){this.#s=Le}#o=($t(this,S),$t(this,_,!1));get loading(){return this.#o}set loading(Le){this.#o=Le}#n=($t(this,I),$t(this,M,""));get selectedKey(){return this.#n}set selectedKey(Le){this.#n=Le}#l=($t(this,z),$t(this,A,""));get filterText(){return this.#l}set filterText(Le){this.#l=Le}#c=($t(this,F),$t(this,j,!1));get showCreateDialog(){return this.#c}set showCreateDialog(Le){this.#c=Le}#d=($t(this,U),$t(this,B,"folder"));get createDialogType(){return this.#d}set createDialogType(Le){this.#d=Le}#u=($t(this,J),$t(this,P,""));get createDialogPrefix(){return this.#u}set createDialogPrefix(Le){this.#u=Le}#p=($t(this,H),$t(this,ue,""));get createDialogName(){return this.#p}set createDialogName(Le){this.#p=Le}#f=($t(this,Y),$t(this,Q,!1));get showMoveDialog(){return this.#f}set showMoveDialog(Le){this.#f=Le}#h=($t(this,Z),$t(this,ae,null));get moveSource(){return this.#h}set moveSource(Le){this.#h=Le}#m=($t(this,re),$t(this,V,""));get moveDestination(){return this.#m}set moveDestination(Le){this.#m=Le}#g=($t(this,q),$t(this,se,!1));get moveInProgress(){return this.#g}set moveInProgress(Le){this.#g=Le}#b=($t(this,te),$t(this,Fe,null));get moveError(){return this.#b}set moveError(Le){this.#b=Le}#v=($t(this,Ve),$t(this,$e,!1));get showMovePickerDialog(){return this.#v}set showMovePickerDialog(Le){this.#v=Le}#x=($t(this,ze),$t(this,pe,null));get movePickerSource(){return this.#x}set movePickerSource(Le){this.#x=Le}#y=($t(this,be),$t(this,Ke,""));get movePickerCurrentPrefix(){return this.#y}set movePickerCurrentPrefix(Le){this.#y=Le}#w=($t(this,nt),$t(this,_e,[]));get movePickerPrefixes(){return this.#w}set movePickerPrefixes(Le){this.#w=Le}#M=($t(this,we),$t(this,fe,!1));get movePickerLoading(){return this.#M}set movePickerLoading(Le){this.#M=Le}#k=($t(this,ge),$t(this,bt,!1));get showRenameDialog(){return this.#k}set showRenameDialog(Le){this.#k=Le}#S=($t(this,vt),$t(this,Ja,null));get renameSource(){return this.#S}set renameSource(Le){this.#S=Le}#C=($t(this,tr),$t(this,Ue,""));get renameName(){return this.#C}set renameName(Le){this.#C=Le}#z=($t(this,mt),$t(this,Sr,!1));get renameInProgress(){return this.#z}set renameInProgress(Le){this.#z=Le}#T=($t(this,Ar),$t(this,Ir,null));get renameError(){return this.#T}set renameError(Le){this.#T=Le}static styles=[h.defaultStyles,Ie,W`
21873
21873
  :host {
21874
21874
  display: block;
21875
21875
  height: 100%;
@@ -24815,7 +24815,7 @@ echo "Deploying..."
24815
24815
  ${oe}
24816
24816
  ${se}
24817
24817
  </div>
24818
- `}renderWidget(V,q,oe,se){let te=this.dragState?.widgetId===V.id,Ce=this.resizeState?.widgetId===V.id,Fe=V.locked||!this.editable,Ve=se?.get(V.id)??null,dt=te?V:Ve??V,$e=this.computeWidgetRect(dt,q,oe),ze=this.rtl?"right":"left",Me=this.pxToPercent($e.left,q.containerWidth),pe=this.pxToPercent($e.width,q.containerWidth),be="";if(te&&this.dragState?.currentPointer){let Ae=this.dragState.currentPointer,Ze=this.containerBounds??this.getBoundingClientRect(),nt=Ae.clientX-Ze.left-this.dragState.offsetX-$e.left,_t=Ae.clientY-Ze.top-this.dragState.offsetY-$e.top;be=`transform: translate(${nt}px, ${_t}px);`}return w`
24818
+ `}renderWidget(V,q,oe,se){let te=this.dragState?.widgetId===V.id,Ce=this.resizeState?.widgetId===V.id,Fe=V.locked||!this.editable,Ve=se?.get(V.id)??null,dt=te?V:Ve??V,$e=this.computeWidgetRect(dt,q,oe),ze=this.rtl?"right":"left",Me=this.pxToPercent($e.left,q.containerWidth),pe=this.pxToPercent($e.width,q.containerWidth),be="";if(te&&this.dragState?.currentPointer){let Ae=this.dragState.currentPointer,Ke=this.containerBounds??this.getBoundingClientRect(),nt=Ae.clientX-Ke.left-this.dragState.offsetX-$e.left,_t=Ae.clientY-Ke.top-this.dragState.offsetY-$e.top;be=`transform: translate(${nt}px, ${_t}px);`}return w`
24819
24819
  <div
24820
24820
  class="grid-widget ${te?"dragging":""} ${Ce?"resizing":""}"
24821
24821
  style="
@@ -26203,7 +26203,7 @@ echo "Deploying..."
26203
26203
  `}
26204
26204
  </div>
26205
26205
  </div>
26206
- `}async connectedCallback(){await super.connectedCallback(),this.src&&this.initAudio()}async disconnectedCallback(){await super.disconnectedCallback(),this.cleanup()}async updated(V){super.updated(V),V.has("src")&&this.src&&(this.cleanup(),this.initAudio()),(V.has("waveformData")||V.has("currentTime"))&&this.drawWaveform()}play(){this.audioElement?.play()}pause(){this.audioElement?.pause()}togglePlay(){this.isPlaying?this.pause():this.play()}seek(V){this.audioElement&&(this.audioElement.currentTime=V)}setVolume(V){this.volume=Math.max(0,Math.min(1,V)),this.audioElement&&(this.audioElement.volume=this.volume),this.volume>0&&(this.isMuted=!1)}toggleMute(){this.isMuted?(this.isMuted=!1,this.volume=this.volumeBeforeMute||.5,this.audioElement&&(this.audioElement.volume=this.volume)):(this.volumeBeforeMute=this.volume,this.isMuted=!0,this.audioElement&&(this.audioElement.volume=0))}toggleLoop(){this.loop=!this.loop,this.audioElement&&(this.audioElement.loop=this.loop)}initAudio(){this.audioElement=new Audio,this.audioElement.crossOrigin="anonymous",this.audioElement.src=this.src,this.audioElement.volume=this.isMuted?0:this.volume,this.audioElement.loop=this.loop,this.audioElement.addEventListener("loadedmetadata",()=>{this.duration=this.audioElement.duration,this.loading=!1}),this.audioElement.addEventListener("play",()=>{this.isPlaying=!0,this.startTimeUpdate()}),this.audioElement.addEventListener("pause",()=>{this.isPlaying=!1,this.stopTimeUpdate()}),this.audioElement.addEventListener("ended",()=>{this.isPlaying=!1,this.stopTimeUpdate()}),this.audioElement.addEventListener("error",()=>{this.error="Failed to load audio",this.loading=!1}),this.audioElement.addEventListener("timeupdate",()=>{this.currentTime=this.audioElement.currentTime}),this.autoplay&&this.audioElement.play().catch(()=>{}),this.showWaveform&&this.loadWaveform()}async loadWaveform(){try{this.loading=!0;let q=await(await fetch(this.src)).arrayBuffer(),oe=new AudioContext,te=(await oe.decodeAudioData(q)).getChannelData(0),Ce=200,Fe=Math.floor(te.length/Ce),Ve=[];for(let $e=0;$e<Ce;$e++){let ze=0;for(let Me=0;Me<Fe;Me++)ze+=Math.abs(te[$e*Fe+Me]);Ve.push(ze/Fe)}let dt=Math.max(...Ve);this.waveformData=Ve.map($e=>dt>0?$e/dt:0),this.waveformReady=!0,this.loading=!1,await oe.close()}catch{this.waveformReady=!1,this.loading=!1}}drawWaveform(){if(!this.showWaveform||!this.waveformReady)return;let V=this.shadowRoot?.querySelector("canvas");if(!V)return;this.canvasElement=V;let q=V.parentElement,oe=window.devicePixelRatio||1,se=q.clientWidth,te=q.clientHeight;V.width=se*oe,V.height=te*oe;let Ce=V.getContext("2d");if(!Ce)return;Ce.scale(oe,oe),Ce.clearRect(0,0,se,te);let Fe=this.waveformData.length;if(Fe===0)return;let Ve=se/Fe,dt=this.duration>0?this.currentTime/this.duration:0,$e=Math.floor(dt*Fe),ze=document.body.classList.contains("theme-dark")||window.matchMedia("(prefers-color-scheme: dark)").matches,Me=ze?"hsl(213 93% 68%)":"hsl(217 91% 60%)",pe=ze?"hsl(217 25% 22%)":"hsl(214 31% 86%)";for(let be=0;be<Fe;be++){let Ae=this.waveformData[be],Ze=Math.max(2,Ae*(te-4)),nt=be*Ve,_t=(te-Ze)/2;Ce.fillStyle=be<$e?Me:pe,Ce.fillRect(nt+.5,_t,Ve-1,Ze)}}handleWaveformClick(V){let q=V.currentTarget.getBoundingClientRect(),oe=(V.clientX-q.left)/q.width;this.seek(oe*this.duration)}handleSeekbarClick(V){let q=V.currentTarget.getBoundingClientRect(),oe=(V.clientX-q.left)/q.width;this.seek(oe*this.duration)}handleVolumeChange(V){let q=parseFloat(V.target.value);this.setVolume(q)}startTimeUpdate(){this.stopTimeUpdate();let V=i(()=>{this.audioElement&&this.isPlaying&&(this.currentTime=this.audioElement.currentTime,this.animFrameId=requestAnimationFrame(V))},"update");this.animFrameId=requestAnimationFrame(V)}stopTimeUpdate(){this.animFrameId&&(cancelAnimationFrame(this.animFrameId),this.animFrameId=0)}formatTime(V){if(!isFinite(V)||V<0)return"0:00";let q=Math.floor(V/60),oe=Math.floor(V%60);return`${q}:${oe.toString().padStart(2,"0")}`}cleanup(){this.stopTimeUpdate(),this.audioElement&&(this.audioElement.pause(),this.audioElement.src="",this.audioElement=null),this.isPlaying=!1,this.currentTime=0,this.duration=0,this.waveformData=[],this.waveformReady=!1}static{Ra(r,a)}};return ye=r})()});var cua=f(()=>{tQe()});var dua,uua=f(()=>{le();dua=i(()=>w`
26206
+ `}async connectedCallback(){await super.connectedCallback(),this.src&&this.initAudio()}async disconnectedCallback(){await super.disconnectedCallback(),this.cleanup()}async updated(V){super.updated(V),V.has("src")&&this.src&&(this.cleanup(),this.initAudio()),(V.has("waveformData")||V.has("currentTime"))&&this.drawWaveform()}play(){this.audioElement?.play()}pause(){this.audioElement?.pause()}togglePlay(){this.isPlaying?this.pause():this.play()}seek(V){this.audioElement&&(this.audioElement.currentTime=V)}setVolume(V){this.volume=Math.max(0,Math.min(1,V)),this.audioElement&&(this.audioElement.volume=this.volume),this.volume>0&&(this.isMuted=!1)}toggleMute(){this.isMuted?(this.isMuted=!1,this.volume=this.volumeBeforeMute||.5,this.audioElement&&(this.audioElement.volume=this.volume)):(this.volumeBeforeMute=this.volume,this.isMuted=!0,this.audioElement&&(this.audioElement.volume=0))}toggleLoop(){this.loop=!this.loop,this.audioElement&&(this.audioElement.loop=this.loop)}initAudio(){this.audioElement=new Audio,this.audioElement.crossOrigin="anonymous",this.audioElement.src=this.src,this.audioElement.volume=this.isMuted?0:this.volume,this.audioElement.loop=this.loop,this.audioElement.addEventListener("loadedmetadata",()=>{this.duration=this.audioElement.duration,this.loading=!1}),this.audioElement.addEventListener("play",()=>{this.isPlaying=!0,this.startTimeUpdate()}),this.audioElement.addEventListener("pause",()=>{this.isPlaying=!1,this.stopTimeUpdate()}),this.audioElement.addEventListener("ended",()=>{this.isPlaying=!1,this.stopTimeUpdate()}),this.audioElement.addEventListener("error",()=>{this.error="Failed to load audio",this.loading=!1}),this.audioElement.addEventListener("timeupdate",()=>{this.currentTime=this.audioElement.currentTime}),this.autoplay&&this.audioElement.play().catch(()=>{}),this.showWaveform&&this.loadWaveform()}async loadWaveform(){try{this.loading=!0;let q=await(await fetch(this.src)).arrayBuffer(),oe=new AudioContext,te=(await oe.decodeAudioData(q)).getChannelData(0),Ce=200,Fe=Math.floor(te.length/Ce),Ve=[];for(let $e=0;$e<Ce;$e++){let ze=0;for(let Me=0;Me<Fe;Me++)ze+=Math.abs(te[$e*Fe+Me]);Ve.push(ze/Fe)}let dt=Math.max(...Ve);this.waveformData=Ve.map($e=>dt>0?$e/dt:0),this.waveformReady=!0,this.loading=!1,await oe.close()}catch{this.waveformReady=!1,this.loading=!1}}drawWaveform(){if(!this.showWaveform||!this.waveformReady)return;let V=this.shadowRoot?.querySelector("canvas");if(!V)return;this.canvasElement=V;let q=V.parentElement,oe=window.devicePixelRatio||1,se=q.clientWidth,te=q.clientHeight;V.width=se*oe,V.height=te*oe;let Ce=V.getContext("2d");if(!Ce)return;Ce.scale(oe,oe),Ce.clearRect(0,0,se,te);let Fe=this.waveformData.length;if(Fe===0)return;let Ve=se/Fe,dt=this.duration>0?this.currentTime/this.duration:0,$e=Math.floor(dt*Fe),ze=document.body.classList.contains("theme-dark")||window.matchMedia("(prefers-color-scheme: dark)").matches,Me=ze?"hsl(213 93% 68%)":"hsl(217 91% 60%)",pe=ze?"hsl(217 25% 22%)":"hsl(214 31% 86%)";for(let be=0;be<Fe;be++){let Ae=this.waveformData[be],Ke=Math.max(2,Ae*(te-4)),nt=be*Ve,_t=(te-Ke)/2;Ce.fillStyle=be<$e?Me:pe,Ce.fillRect(nt+.5,_t,Ve-1,Ke)}}handleWaveformClick(V){let q=V.currentTarget.getBoundingClientRect(),oe=(V.clientX-q.left)/q.width;this.seek(oe*this.duration)}handleSeekbarClick(V){let q=V.currentTarget.getBoundingClientRect(),oe=(V.clientX-q.left)/q.width;this.seek(oe*this.duration)}handleVolumeChange(V){let q=parseFloat(V.target.value);this.setVolume(q)}startTimeUpdate(){this.stopTimeUpdate();let V=i(()=>{this.audioElement&&this.isPlaying&&(this.currentTime=this.audioElement.currentTime,this.animFrameId=requestAnimationFrame(V))},"update");this.animFrameId=requestAnimationFrame(V)}stopTimeUpdate(){this.animFrameId&&(cancelAnimationFrame(this.animFrameId),this.animFrameId=0)}formatTime(V){if(!isFinite(V)||V<0)return"0:00";let q=Math.floor(V/60),oe=Math.floor(V%60);return`${q}:${oe.toString().padStart(2,"0")}`}cleanup(){this.stopTimeUpdate(),this.audioElement&&(this.audioElement.pause(),this.audioElement.src="",this.audioElement=null),this.isPlaying=!1,this.currentTime=0,this.duration=0,this.waveformData=[],this.waveformReady=!1}static{Ra(r,a)}};return ye=r})()});var cua=f(()=>{tQe()});var dua,uua=f(()=>{le();dua=i(()=>w`
26207
26207
  <style>
26208
26208
  .demo-container {
26209
26209
  padding: 48px;
@@ -27194,7 +27194,7 @@ echo "Deploying..."
27194
27194
  </div>
27195
27195
  </div>
27196
27196
  </dees-tile>
27197
- `}async connectedCallback(){await super.connectedCallback(),await this.updateComplete,this.ensureViewerRefs(),this.pdfUrl&&(this.documentId=`${this.pdfUrl}-${Date.now()}-${Math.random()}`,await this.loadPdf())}async disconnectedCallback(){await super.disconnectedCallback(),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.scrollThrottleTimeout&&(clearTimeout(this.scrollThrottleTimeout),this.scrollThrottleTimeout=void 0),this.renderState="disposed",await this.cleanupDocument(),this.canvas=void 0,this.ctx=void 0}async updated(ae){if(super.updated(ae),ae.has("pdfUrl")&&this.pdfUrl){let re=ae.get("pdfUrl");re&&I2.releaseDocument(re),this.documentId=`${this.pdfUrl}-${Date.now()}-${Math.random()}`,await this.loadPdf()}ae.has("showSidebar")&&this.showSidebar&&this.pdfDocument&&(await new Promise(re=>requestAnimationFrame(re)),this.thumbnailData.forEach(re=>re.rendered=!1),await this.renderThumbnails(),this.setupIntersectionObserver(),this.scrollThumbnailIntoView(this.currentPage))}formatFileSize(ae){return ae<1024?`${ae} B`:ae<1024*1024?`${(ae/1024).toFixed(1)} KB`:`${(ae/(1024*1024)).toFixed(1)} MB`}async loadPdf(){this.loading=!0,this.renderState="loading";try{await this.cleanupDocument(),this.renderAbortController=new AbortController;let ae=this.renderAbortController.signal;if(this.pdfDocument=await I2.loadDocument(this.pdfUrl),ae.aborted)return;this.totalPages=this.pdfDocument.numPages,this.currentPage=this.initialPage,this.resolveInitialViewportMode();try{let re=await this.pdfDocument.getData();this.pdfFileSize=re.length}catch{this.pdfFileSize=0}if(this.thumbnailData=Array.from({length:this.totalPages},(re,ye)=>({page:ye+1,rendered:!1})),this.pageData=Array.from({length:this.totalPages},(re,ye)=>({page:ye+1,rendered:!1,rendering:!1,textLayerRendered:!1})),this.loading=!1,await this.updateComplete,this.ensureViewerRefs(),this.setupIntersectionObserver(),await new Promise(re=>requestAnimationFrame(re)),ae.aborted||(this.renderState="rendering-main",await this.renderVisiblePages(),ae.aborted)||(this.initialPage>1&&await this.scrollToPage(this.initialPage,!1),this.showSidebar&&(await this.updateComplete,await new Promise(re=>requestAnimationFrame(re)),ae.aborted||(await this.renderThumbnails(),ae.aborted))))return;this.renderState="rendered"}catch(ae){console.error("Error loading PDF:",ae),this.loading=!1,this.renderState="error"}}setupIntersectionObserver(){this.intersectionObserver&&this.intersectionObserver.disconnect(),this.intersectionObserver=new IntersectionObserver(re=>{for(let ye of re){let V=ye.target,q=parseInt(V.dataset.page||"1");ye.isIntersecting&&this.renderPageIfNeeded(q)}},{root:this.viewerMain,rootMargin:`${this.RENDER_BUFFER*100}px 0px`,threshold:.01});let ae=this.shadowRoot?.querySelectorAll(".page-wrapper");ae&&ae.forEach(re=>{this.intersectionObserver?.observe(re)})}async renderVisiblePages(){if(!this.viewerMain)return;let ae=this.viewerMain.clientHeight;for(let re of this.pageData){let ye=this.shadowRoot?.querySelector(`.page-wrapper[data-page="${re.page}"]`);if(!ye)continue;let V=ye.getBoundingClientRect(),q=this.viewerMain.getBoundingClientRect(),oe=V.top-q.top,se=oe+V.height,te=this.RENDER_BUFFER*ae;se>=-te&&oe<=ae+te&&await this.renderPageIfNeeded(re.page)}}async renderPageIfNeeded(ae){let re=this.pageData.find(ye=>ye.page===ae);if(!(!re||re.rendered||re.rendering)){re.rendering=!0;try{let ye=this.shadowRoot?.querySelector(`.page-canvas[data-page="${ae}"]`);if(!ye){re.rendering=!1;return}let V=await this.pdfDocument.getPage(ae),q=this.computeViewport(V),oe=window.devicePixelRatio||1;ye.width=Math.floor(q.width*oe),ye.height=Math.floor(q.height*oe),ye.style.width=`${q.width}px`,ye.style.height=`${q.height}px`;let se=ye.getContext("2d");if(!se){V.cleanup?.(),re.rendering=!1;return}se.scale(oe,oe);let te={canvasContext:se,viewport:q},Ce=V.render(te);this.pageRenderTasks.set(ae,Ce),await Ce.promise,V.cleanup?.(),re.rendered=!0,re.rendering=!1,this.pageRenderTasks.delete(ae),await this.renderTextLayer(ae),this.requestUpdate("pageData")}catch(ye){ye?.name!=="RenderingCancelledException"&&console.error(`Error rendering page ${ae}:`,ye),re.rendering=!1,this.pageRenderTasks.delete(ae)}}}async renderTextLayer(ae){let re=this.pageData.find(ye=>ye.page===ae);if(!(!re||re.textLayerRendered))try{let ye=this.shadowRoot?.querySelector(`.text-layer[data-page="${ae}"]`);if(!ye)return;ye.innerHTML="";let V=await this.pdfDocument.getPage(ae),q=await V.getTextContent(),oe=this.computeViewport(V),se=await import("https://cdn.jsdelivr.net/npm/pdfjs-dist@4.0.379/+esm");ye.style.width=`${oe.width}px`,ye.style.height=`${oe.height}px`,ye.style.setProperty("--scale-factor",String(oe.scale));let te=se.renderTextLayer({textContentSource:q,container:ye,viewport:oe});this.textLayerRenderTasks.set(ae,te),await te.promise;let Ce=document.createElement("div");Ce.className="endOfContent",ye.appendChild(Ce);let Fe=!1,Ve=null,dt=0,$e=i((pe,be)=>{let Ae=Array.from(ye.querySelectorAll("span"));for(let Ze of Ae){let nt=Ze.getBoundingClientRect();if(pe>=nt.left&&pe<=nt.right&&be>=nt.top&&be<=nt.bottom){let _t=Ze.firstChild;if(_t&&_t.nodeType===Node.TEXT_NODE){let _e=_t.textContent||"",we=nt.width/_e.length,Ne=pe-nt.left,fe=Math.min(Math.round(Ne/we),_e.length);return{node:_t,offset:fe}}}}return null},"getTextPositionFromPoint"),ze=i(()=>{Fe&&(Fe=!1,Ve=null,ye.classList.remove("selecting")),document.removeEventListener("mouseup",ze),document.removeEventListener("mousemove",Me)},"handleMouseUp"),Me=i(pe=>{if(!Fe||!Ve)return;pe.preventDefault();let be=$e(pe.clientX,pe.clientY);if(be){let Ae=window.getSelection();if(Ae)try{Ae.setBaseAndExtent(Ve,dt,be.node,be.offset)}catch{}}},"handleMouseMove");ye.addEventListener("mousedown",pe=>{if(pe.button!==0)return;let be=$e(pe.clientX,pe.clientY);be&&(pe.preventDefault(),Fe=!0,Ve=be.node,dt=be.offset,ye.classList.add("selecting"),window.getSelection()?.removeAllRanges(),document.addEventListener("mousemove",Me),document.addEventListener("mouseup",ze))}),re.textLayerRendered=!0,V.cleanup?.(),this.textLayerRenderTasks.delete(ae)}catch(ye){ye?.name!=="RenderingCancelledException"&&console.error(`Error rendering text layer for page ${ae}:`,ye),this.textLayerRenderTasks.delete(ae)}}handleScroll=i(()=>{this.scrollThrottleTimeout&&clearTimeout(this.scrollThrottleTimeout),this.scrollThrottleTimeout=window.setTimeout(()=>{this.updateCurrentPage(),this.renderVisiblePages()},50)},"handleScroll");updateCurrentPage(){if(!this.viewerMain)return;let ae=this.viewerMain.scrollTop,re=this.viewerMain.clientHeight,ye=ae+re/2;for(let V=0;V<this.pageData.length;V++){let q=this.shadowRoot?.querySelector(`.page-wrapper[data-page="${V+1}"]`);if(!q)continue;let oe=q.getBoundingClientRect(),se=this.viewerMain.getBoundingClientRect(),te=oe.top-se.top+ae,Ce=te+oe.height;if(ye>=te&&ye<=Ce){this.currentPage!==V+1&&(this.currentPage=V+1,this.showSidebar&&this.scrollThumbnailIntoView(V+1));break}}}scrollThumbnailIntoView(ae){let re=this.shadowRoot?.querySelector(`.thumbnail[data-page="${ae}"]`),ye=this.shadowRoot?.querySelector(".sidebar-content");if(re&&ye){let V=re.getBoundingClientRect(),q=ye.getBoundingClientRect(),oe=V.top<q.top,se=V.bottom>q.bottom;if(oe||se){let te=re.offsetTop,Ce=re.offsetHeight,Fe=ye.clientHeight,Ve=te-Fe/2+Ce/2;ye.scrollTo({top:Math.max(0,Ve),behavior:"smooth"})}}}async scrollToPage(ae,re=!0){await this.updateComplete;let ye=this.shadowRoot?.querySelector(`.page-wrapper[data-page="${ae}"]`);if(ye&&this.viewerMain){let V=ye.getBoundingClientRect(),q=this.viewerMain.getBoundingClientRect(),se=this.viewerMain.scrollTop+(V.top-q.top)-this.viewerMain.clientTop-16;re?this.viewerMain.scrollTo({top:se,behavior:"smooth"}):this.viewerMain.scrollTop=se,this.currentPage=ae,this.showSidebar&&this.scrollThumbnailIntoView(ae),await this.renderPageIfNeeded(ae)}}async renderThumbnails(){if(!this.pdfDocument||this.thumbnailData.length>0&&this.thumbnailData.every(re=>re.rendered)||this.renderAbortController?.signal.aborted)return;let ae=this.renderAbortController?.signal;this.renderState="rendering-thumbs";for(let re of this.thumbnailRenderTasks)try{re.cancel()}catch{}this.thumbnailRenderTasks=[];try{await this.updateComplete;let re=this.shadowRoot?.querySelectorAll(".thumbnail"),ye=this.shadowRoot?.querySelectorAll(".thumbnail-canvas"),V=this.shadowRoot?.querySelector(".sidebar-content"),q=window.getComputedStyle(V),se=200-(parseFloat(q.paddingLeft)+parseFloat(q.paddingRight))-4;for(let te of Array.from(ye)){let Ce=te.getContext("2d");Ce&&Ce.clearRect(0,0,te.width,te.height)}for(let te=0;te<ye.length;te++){if(ae?.aborted)return;let Ce=ye[te],Fe=re[te],Ve=parseInt(Ce.dataset.page||"1"),dt=await this.pdfDocument.getPage(Ve),$e=dt.getViewport({scale:1}),ze=se/$e.width,Me=dt.getViewport({scale:ze}),pe=window.devicePixelRatio||1;Ce.width=Math.floor(Me.width*pe),Ce.height=Math.floor(Me.height*pe),Ce.style.width=`${Me.width}px`,Ce.style.height=`${Me.height}px`,Fe.style.height=`${Me.height}px`,Fe.style.minHeight=`${Me.height}px`;let be=Ce.getContext("2d");if(!be){dt.cleanup?.();continue}be.scale(pe,pe);let Ae={canvasContext:be,viewport:Me},Ze=dt.render(Ae);this.thumbnailRenderTasks.push(Ze),await Ze.promise,dt.cleanup?.();let nt=this.thumbnailData.find(_t=>_t.page===Ve);nt&&(nt.rendered=!0)}this.requestUpdate("thumbnailData")}catch(re){re?.name!=="RenderingCancelledException"&&console.error("Error rendering thumbnails:",re)}finally{this.thumbnailRenderTasks=[]}}previousPage(){this.currentPage>1&&this.scrollToPage(this.currentPage-1)}nextPage(){this.currentPage<this.totalPages&&this.scrollToPage(this.currentPage+1)}handleThumbnailClick(ae){let re=ae.currentTarget,ye=parseInt(re.dataset.page||"1");this.scrollToPage(ye)}handlePageInput(ae){let re=ae.target,ye=parseInt(re.value);this.scrollToPage(ye)}zoomIn(){let ae=Math.min(this.MANUAL_MAX_ZOOM,this.currentZoom*1.2);this.viewportMode="custom",ae!==this.currentZoom&&(this.currentZoom=ae,this.reRenderAllPages())}zoomOut(){let ae=Math.max(this.MANUAL_MIN_ZOOM,this.currentZoom/1.2);this.viewportMode="custom",ae!==this.currentZoom&&(this.currentZoom=ae,this.reRenderAllPages())}resetZoom(){this.viewportMode="custom",this.currentZoom=1,this.reRenderAllPages()}fitToPage(){this.viewportMode="page-fit",this.reRenderAllPages()}fitToWidth(){this.viewportMode="page-width",this.reRenderAllPages()}reRenderAllPages(){this.pageData.forEach(ae=>{ae.rendered=!1,ae.rendering=!1,ae.textLayerRendered=!1}),this.pageRenderTasks.forEach(ae=>{try{ae.cancel()}catch{}}),this.pageRenderTasks.clear(),this.textLayerRenderTasks.forEach(ae=>{try{ae.cancel?.()}catch{}}),this.textLayerRenderTasks.clear(),this.requestUpdate(),this.updateComplete.then(()=>{this.renderVisiblePages()})}async downloadPdf(){if(this.pdfDocument)try{let ae=await this.pdfDocument.getData(),re=new Blob([ae.buffer],{type:"application/pdf"}),ye=URL.createObjectURL(re),V=document.createElement("a");V.href=ye,V.download=this.pdfUrl&&this.pdfUrl.split("/").pop()||"document.pdf",V.click(),setTimeout(()=>URL.revokeObjectURL(ye),1e3)}catch(ae){console.error("Error downloading PDF:",ae)}}async printPdf(){if(this.pdfDocument)try{let ae=await this.pdfDocument.getData(),re=new Blob([ae.buffer],{type:"application/pdf"}),ye=URL.createObjectURL(re),V=`
27197
+ `}async connectedCallback(){await super.connectedCallback(),await this.updateComplete,this.ensureViewerRefs(),this.pdfUrl&&(this.documentId=`${this.pdfUrl}-${Date.now()}-${Math.random()}`,await this.loadPdf())}async disconnectedCallback(){await super.disconnectedCallback(),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.scrollThrottleTimeout&&(clearTimeout(this.scrollThrottleTimeout),this.scrollThrottleTimeout=void 0),this.renderState="disposed",await this.cleanupDocument(),this.canvas=void 0,this.ctx=void 0}async updated(ae){if(super.updated(ae),ae.has("pdfUrl")&&this.pdfUrl){let re=ae.get("pdfUrl");re&&I2.releaseDocument(re),this.documentId=`${this.pdfUrl}-${Date.now()}-${Math.random()}`,await this.loadPdf()}ae.has("showSidebar")&&this.showSidebar&&this.pdfDocument&&(await new Promise(re=>requestAnimationFrame(re)),this.thumbnailData.forEach(re=>re.rendered=!1),await this.renderThumbnails(),this.setupIntersectionObserver(),this.scrollThumbnailIntoView(this.currentPage))}formatFileSize(ae){return ae<1024?`${ae} B`:ae<1024*1024?`${(ae/1024).toFixed(1)} KB`:`${(ae/(1024*1024)).toFixed(1)} MB`}async loadPdf(){this.loading=!0,this.renderState="loading";try{await this.cleanupDocument(),this.renderAbortController=new AbortController;let ae=this.renderAbortController.signal;if(this.pdfDocument=await I2.loadDocument(this.pdfUrl),ae.aborted)return;this.totalPages=this.pdfDocument.numPages,this.currentPage=this.initialPage,this.resolveInitialViewportMode();try{let re=await this.pdfDocument.getData();this.pdfFileSize=re.length}catch{this.pdfFileSize=0}if(this.thumbnailData=Array.from({length:this.totalPages},(re,ye)=>({page:ye+1,rendered:!1})),this.pageData=Array.from({length:this.totalPages},(re,ye)=>({page:ye+1,rendered:!1,rendering:!1,textLayerRendered:!1})),this.loading=!1,await this.updateComplete,this.ensureViewerRefs(),this.setupIntersectionObserver(),await new Promise(re=>requestAnimationFrame(re)),ae.aborted||(this.renderState="rendering-main",await this.renderVisiblePages(),ae.aborted)||(this.initialPage>1&&await this.scrollToPage(this.initialPage,!1),this.showSidebar&&(await this.updateComplete,await new Promise(re=>requestAnimationFrame(re)),ae.aborted||(await this.renderThumbnails(),ae.aborted))))return;this.renderState="rendered"}catch(ae){console.error("Error loading PDF:",ae),this.loading=!1,this.renderState="error"}}setupIntersectionObserver(){this.intersectionObserver&&this.intersectionObserver.disconnect(),this.intersectionObserver=new IntersectionObserver(re=>{for(let ye of re){let V=ye.target,q=parseInt(V.dataset.page||"1");ye.isIntersecting&&this.renderPageIfNeeded(q)}},{root:this.viewerMain,rootMargin:`${this.RENDER_BUFFER*100}px 0px`,threshold:.01});let ae=this.shadowRoot?.querySelectorAll(".page-wrapper");ae&&ae.forEach(re=>{this.intersectionObserver?.observe(re)})}async renderVisiblePages(){if(!this.viewerMain)return;let ae=this.viewerMain.clientHeight;for(let re of this.pageData){let ye=this.shadowRoot?.querySelector(`.page-wrapper[data-page="${re.page}"]`);if(!ye)continue;let V=ye.getBoundingClientRect(),q=this.viewerMain.getBoundingClientRect(),oe=V.top-q.top,se=oe+V.height,te=this.RENDER_BUFFER*ae;se>=-te&&oe<=ae+te&&await this.renderPageIfNeeded(re.page)}}async renderPageIfNeeded(ae){let re=this.pageData.find(ye=>ye.page===ae);if(!(!re||re.rendered||re.rendering)){re.rendering=!0;try{let ye=this.shadowRoot?.querySelector(`.page-canvas[data-page="${ae}"]`);if(!ye){re.rendering=!1;return}let V=await this.pdfDocument.getPage(ae),q=this.computeViewport(V),oe=window.devicePixelRatio||1;ye.width=Math.floor(q.width*oe),ye.height=Math.floor(q.height*oe),ye.style.width=`${q.width}px`,ye.style.height=`${q.height}px`;let se=ye.getContext("2d");if(!se){V.cleanup?.(),re.rendering=!1;return}se.scale(oe,oe);let te={canvasContext:se,viewport:q},Ce=V.render(te);this.pageRenderTasks.set(ae,Ce),await Ce.promise,V.cleanup?.(),re.rendered=!0,re.rendering=!1,this.pageRenderTasks.delete(ae),await this.renderTextLayer(ae),this.requestUpdate("pageData")}catch(ye){ye?.name!=="RenderingCancelledException"&&console.error(`Error rendering page ${ae}:`,ye),re.rendering=!1,this.pageRenderTasks.delete(ae)}}}async renderTextLayer(ae){let re=this.pageData.find(ye=>ye.page===ae);if(!(!re||re.textLayerRendered))try{let ye=this.shadowRoot?.querySelector(`.text-layer[data-page="${ae}"]`);if(!ye)return;ye.innerHTML="";let V=await this.pdfDocument.getPage(ae),q=await V.getTextContent(),oe=this.computeViewport(V),se=await import("https://cdn.jsdelivr.net/npm/pdfjs-dist@4.0.379/+esm");ye.style.width=`${oe.width}px`,ye.style.height=`${oe.height}px`,ye.style.setProperty("--scale-factor",String(oe.scale));let te=se.renderTextLayer({textContentSource:q,container:ye,viewport:oe});this.textLayerRenderTasks.set(ae,te),await te.promise;let Ce=document.createElement("div");Ce.className="endOfContent",ye.appendChild(Ce);let Fe=!1,Ve=null,dt=0,$e=i((pe,be)=>{let Ae=Array.from(ye.querySelectorAll("span"));for(let Ke of Ae){let nt=Ke.getBoundingClientRect();if(pe>=nt.left&&pe<=nt.right&&be>=nt.top&&be<=nt.bottom){let _t=Ke.firstChild;if(_t&&_t.nodeType===Node.TEXT_NODE){let _e=_t.textContent||"",we=nt.width/_e.length,Ne=pe-nt.left,fe=Math.min(Math.round(Ne/we),_e.length);return{node:_t,offset:fe}}}}return null},"getTextPositionFromPoint"),ze=i(()=>{Fe&&(Fe=!1,Ve=null,ye.classList.remove("selecting")),document.removeEventListener("mouseup",ze),document.removeEventListener("mousemove",Me)},"handleMouseUp"),Me=i(pe=>{if(!Fe||!Ve)return;pe.preventDefault();let be=$e(pe.clientX,pe.clientY);if(be){let Ae=window.getSelection();if(Ae)try{Ae.setBaseAndExtent(Ve,dt,be.node,be.offset)}catch{}}},"handleMouseMove");ye.addEventListener("mousedown",pe=>{if(pe.button!==0)return;let be=$e(pe.clientX,pe.clientY);be&&(pe.preventDefault(),Fe=!0,Ve=be.node,dt=be.offset,ye.classList.add("selecting"),window.getSelection()?.removeAllRanges(),document.addEventListener("mousemove",Me),document.addEventListener("mouseup",ze))}),re.textLayerRendered=!0,V.cleanup?.(),this.textLayerRenderTasks.delete(ae)}catch(ye){ye?.name!=="RenderingCancelledException"&&console.error(`Error rendering text layer for page ${ae}:`,ye),this.textLayerRenderTasks.delete(ae)}}handleScroll=i(()=>{this.scrollThrottleTimeout&&clearTimeout(this.scrollThrottleTimeout),this.scrollThrottleTimeout=window.setTimeout(()=>{this.updateCurrentPage(),this.renderVisiblePages()},50)},"handleScroll");updateCurrentPage(){if(!this.viewerMain)return;let ae=this.viewerMain.scrollTop,re=this.viewerMain.clientHeight,ye=ae+re/2;for(let V=0;V<this.pageData.length;V++){let q=this.shadowRoot?.querySelector(`.page-wrapper[data-page="${V+1}"]`);if(!q)continue;let oe=q.getBoundingClientRect(),se=this.viewerMain.getBoundingClientRect(),te=oe.top-se.top+ae,Ce=te+oe.height;if(ye>=te&&ye<=Ce){this.currentPage!==V+1&&(this.currentPage=V+1,this.showSidebar&&this.scrollThumbnailIntoView(V+1));break}}}scrollThumbnailIntoView(ae){let re=this.shadowRoot?.querySelector(`.thumbnail[data-page="${ae}"]`),ye=this.shadowRoot?.querySelector(".sidebar-content");if(re&&ye){let V=re.getBoundingClientRect(),q=ye.getBoundingClientRect(),oe=V.top<q.top,se=V.bottom>q.bottom;if(oe||se){let te=re.offsetTop,Ce=re.offsetHeight,Fe=ye.clientHeight,Ve=te-Fe/2+Ce/2;ye.scrollTo({top:Math.max(0,Ve),behavior:"smooth"})}}}async scrollToPage(ae,re=!0){await this.updateComplete;let ye=this.shadowRoot?.querySelector(`.page-wrapper[data-page="${ae}"]`);if(ye&&this.viewerMain){let V=ye.getBoundingClientRect(),q=this.viewerMain.getBoundingClientRect(),se=this.viewerMain.scrollTop+(V.top-q.top)-this.viewerMain.clientTop-16;re?this.viewerMain.scrollTo({top:se,behavior:"smooth"}):this.viewerMain.scrollTop=se,this.currentPage=ae,this.showSidebar&&this.scrollThumbnailIntoView(ae),await this.renderPageIfNeeded(ae)}}async renderThumbnails(){if(!this.pdfDocument||this.thumbnailData.length>0&&this.thumbnailData.every(re=>re.rendered)||this.renderAbortController?.signal.aborted)return;let ae=this.renderAbortController?.signal;this.renderState="rendering-thumbs";for(let re of this.thumbnailRenderTasks)try{re.cancel()}catch{}this.thumbnailRenderTasks=[];try{await this.updateComplete;let re=this.shadowRoot?.querySelectorAll(".thumbnail"),ye=this.shadowRoot?.querySelectorAll(".thumbnail-canvas"),V=this.shadowRoot?.querySelector(".sidebar-content"),q=window.getComputedStyle(V),se=200-(parseFloat(q.paddingLeft)+parseFloat(q.paddingRight))-4;for(let te of Array.from(ye)){let Ce=te.getContext("2d");Ce&&Ce.clearRect(0,0,te.width,te.height)}for(let te=0;te<ye.length;te++){if(ae?.aborted)return;let Ce=ye[te],Fe=re[te],Ve=parseInt(Ce.dataset.page||"1"),dt=await this.pdfDocument.getPage(Ve),$e=dt.getViewport({scale:1}),ze=se/$e.width,Me=dt.getViewport({scale:ze}),pe=window.devicePixelRatio||1;Ce.width=Math.floor(Me.width*pe),Ce.height=Math.floor(Me.height*pe),Ce.style.width=`${Me.width}px`,Ce.style.height=`${Me.height}px`,Fe.style.height=`${Me.height}px`,Fe.style.minHeight=`${Me.height}px`;let be=Ce.getContext("2d");if(!be){dt.cleanup?.();continue}be.scale(pe,pe);let Ae={canvasContext:be,viewport:Me},Ke=dt.render(Ae);this.thumbnailRenderTasks.push(Ke),await Ke.promise,dt.cleanup?.();let nt=this.thumbnailData.find(_t=>_t.page===Ve);nt&&(nt.rendered=!0)}this.requestUpdate("thumbnailData")}catch(re){re?.name!=="RenderingCancelledException"&&console.error("Error rendering thumbnails:",re)}finally{this.thumbnailRenderTasks=[]}}previousPage(){this.currentPage>1&&this.scrollToPage(this.currentPage-1)}nextPage(){this.currentPage<this.totalPages&&this.scrollToPage(this.currentPage+1)}handleThumbnailClick(ae){let re=ae.currentTarget,ye=parseInt(re.dataset.page||"1");this.scrollToPage(ye)}handlePageInput(ae){let re=ae.target,ye=parseInt(re.value);this.scrollToPage(ye)}zoomIn(){let ae=Math.min(this.MANUAL_MAX_ZOOM,this.currentZoom*1.2);this.viewportMode="custom",ae!==this.currentZoom&&(this.currentZoom=ae,this.reRenderAllPages())}zoomOut(){let ae=Math.max(this.MANUAL_MIN_ZOOM,this.currentZoom/1.2);this.viewportMode="custom",ae!==this.currentZoom&&(this.currentZoom=ae,this.reRenderAllPages())}resetZoom(){this.viewportMode="custom",this.currentZoom=1,this.reRenderAllPages()}fitToPage(){this.viewportMode="page-fit",this.reRenderAllPages()}fitToWidth(){this.viewportMode="page-width",this.reRenderAllPages()}reRenderAllPages(){this.pageData.forEach(ae=>{ae.rendered=!1,ae.rendering=!1,ae.textLayerRendered=!1}),this.pageRenderTasks.forEach(ae=>{try{ae.cancel()}catch{}}),this.pageRenderTasks.clear(),this.textLayerRenderTasks.forEach(ae=>{try{ae.cancel?.()}catch{}}),this.textLayerRenderTasks.clear(),this.requestUpdate(),this.updateComplete.then(()=>{this.renderVisiblePages()})}async downloadPdf(){if(this.pdfDocument)try{let ae=await this.pdfDocument.getData(),re=new Blob([ae.buffer],{type:"application/pdf"}),ye=URL.createObjectURL(re),V=document.createElement("a");V.href=ye,V.download=this.pdfUrl&&this.pdfUrl.split("/").pop()||"document.pdf",V.click(),setTimeout(()=>URL.revokeObjectURL(ye),1e3)}catch(ae){console.error("Error downloading PDF:",ae)}}async printPdf(){if(this.pdfDocument)try{let ae=await this.pdfDocument.getData(),re=new Blob([ae.buffer],{type:"application/pdf"}),ye=URL.createObjectURL(re),V=`
27198
27198
  <!DOCTYPE html>
27199
27199
  <html>
27200
27200
  <head>
@@ -31394,7 +31394,7 @@ Password: ${e.password}`):console.error("Invalid login data structure:",t.detail
31394
31394
  </div>
31395
31395
  <div class="diff-container"></div>
31396
31396
  </div>
31397
- `}async firstUpdated(){await super.firstUpdated(new Map),await this.initDiffEditor()}async initDiffEditor(){let _=this.shadowRoot?.querySelector(".diff-container");if(!_)return;let I=`https://cdn.jsdelivr.net/npm/monaco-editor@${nte}`,O=window.monaco;O||(await new Promise(U=>{let he=setInterval(()=>{window.monaco&&(clearInterval(he),U())},100)}),O=window.monaco);let M=await this.domtoolsPromise,E=M.themeManager.goBrightBoolean?"vs":"vs-dark",A=Date.now(),F=O.Uri.parse(`diff://original/${A}${this.filePath}`),K=O.Uri.parse(`diff://modified/${A}${this.filePath}`);this.originalModel=O.editor.createModel(this.originalContent,this.language,F),this.modifiedModel=O.editor.createModel(this.modifiedContent,this.language,K),this.diffEditor=O.editor.createDiffEditor(_,{automaticLayout:!0,readOnly:!1,originalEditable:!1,renderSideBySide:!0,ignoreTrimWhitespace:!1,fontSize:14,minimap:{enabled:!1}}),O.editor.setTheme(E),this.diffEditor.setModel({original:this.originalModel,modified:this.modifiedModel}),this.monacoThemeSubscription=M.themeManager.themeObservable.subscribe(U=>{let he=U?"vs":"vs-dark";O.editor.setTheme(he)});let j="monaco-diff-editor-css";if(!this.shadowRoot?.getElementById(j)){let he=await(await fetch(`${I}/min/vs/editor/editor.main.css`)).text(),B=document.createElement("style");B.id=j,B.textContent=he,this.shadowRoot?.append(B)}setTimeout(()=>{try{this.diffEditor?.revealFirstDiff()}catch{}},100),this.diffEditorDeferred.resolve(this.diffEditor)}goToNextDiff(){try{this.diffEditor?.goToDiff("next")}catch{}}goToPreviousDiff(){try{this.diffEditor?.goToDiff("previous")}catch{}}acceptLocal(){let _=this.diffEditor?.getModifiedEditor().getValue()||this.modifiedContent;this.dispatchEvent(new CustomEvent("diff-resolved",{detail:{action:"use-local",content:_},bubbles:!0,composed:!0}))}acceptDisk(){this.dispatchEvent(new CustomEvent("diff-resolved",{detail:{action:"use-disk",content:this.originalContent},bubbles:!0,composed:!0}))}close(){this.dispatchEvent(new CustomEvent("diff-closed",{bubbles:!0,composed:!0}))}async disconnectedCallback(){await super.disconnectedCallback(),this.monacoThemeSubscription&&(this.monacoThemeSubscription.unsubscribe(),this.monacoThemeSubscription=null),this.originalModel&&(this.originalModel.dispose(),this.originalModel=null),this.modifiedModel&&(this.modifiedModel.dispose(),this.modifiedModel=null),this.diffEditor&&(this.diffEditor.dispose(),this.diffEditor=null)}static{en(r,a)}};return N=r})()});var $r,Ut,Rpa,Fpa=f(()=>{le();ea();tt();vie();ff();yie();yie();xW();xW();qQe();HQe();ba();ff();VQe();Qr();Ha();Jre();jQe();$r=function(t,e,a,r,s,o){function n(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}i(n,"accept");for(var l=r.kind,c=l==="getter"?"get":l==="setter"?"set":"value",d=!e&&t?r.static?t:t.prototype:null,u=e||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p,m=!1,v=a.length-1;v>=0;v--){var x={};for(var b in r)x[b]=b==="access"?{}:r[b];for(var b in r.access)x.access[b]=r.access[b];x.addInitializer=function(y){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(n(y||null))};var g=(0,a[v])(l==="accessor"?{get:u.get,set:u.set}:u[c],x);if(l==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(p=n(g.get))&&(u.get=p),(p=n(g.set))&&(u.set=p),(p=n(g.init))&&s.unshift(p)}else(p=n(g))&&(l==="field"?s.unshift(p):u[c]=p)}d&&Object.defineProperty(d,r.name,u),m=!0},Ut=function(t,e,a){for(var r=arguments.length>2,s=0;s<e.length;s++)a=r?e[s].call(t,a):e[s].call(t);return r?a:void 0},Rpa=(()=>{let t=[ie("dees-workspace")],e,a=[],r,s=ne,o,n=[],l=[],c,d=[],u=[],p,m=[],v=[],x,b=[],g=[],y,k=[],C=[],R,T=[],S=[],N,_=[],I=[],O,M=[],z=[],E,A=[],F=[],K,j=[],U=[],he,B=[],J=[],ve,P=[],H=[],de,ue=[],Y=[],X,Q=[],Z=[],me,ae=[],re=[],ye,V=[],q=[],oe,se=[],te=[],Ce,Fe=[],Ve=[],dt,$e=[],ze=[],Me,pe=[],be=[],Ae,Ze=[],nt=[],_t,_e=[],we=[];var Ne=class extends s{static{i(this,"DeesWorkspace")}static{r=this}static{let fe=typeof Symbol=="function"&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;o=[$({type:Object})],c=[$({attribute:!1})],p=[$({type:Boolean})],x=[$({type:Boolean})],y=[$({type:Number})],R=[$({type:Number})],N=[G()],O=[G()],E=[G()],K=[G()],he=[G()],ve=[G()],de=[G()],X=[G()],me=[G()],ye=[G()],oe=[G()],Ce=[G()],dt=[G()],Me=[G()],Ae=[G()],_t=[G()],$r(this,null,o,{kind:"accessor",name:"executionEnvironment",static:!1,private:!1,access:{has:i(ge=>"executionEnvironment"in ge,"has"),get:i(ge=>ge.executionEnvironment,"get"),set:i((ge,Pe)=>{ge.executionEnvironment=Pe},"set")},metadata:fe},n,l),$r(this,null,c,{kind:"accessor",name:"initializationPromise",static:!1,private:!1,access:{has:i(ge=>"initializationPromise"in ge,"has"),get:i(ge=>ge.initializationPromise,"get"),set:i((ge,Pe)=>{ge.initializationPromise=Pe},"set")},metadata:fe},d,u),$r(this,null,p,{kind:"accessor",name:"showFileTree",static:!1,private:!1,access:{has:i(ge=>"showFileTree"in ge,"has"),get:i(ge=>ge.showFileTree,"get"),set:i((ge,Pe)=>{ge.showFileTree=Pe},"set")},metadata:fe},m,v),$r(this,null,x,{kind:"accessor",name:"showTerminal",static:!1,private:!1,access:{has:i(ge=>"showTerminal"in ge,"has"),get:i(ge=>ge.showTerminal,"get"),set:i((ge,Pe)=>{ge.showTerminal=Pe},"set")},metadata:fe},b,g),$r(this,null,y,{kind:"accessor",name:"fileTreeWidth",static:!1,private:!1,access:{has:i(ge=>"fileTreeWidth"in ge,"has"),get:i(ge=>ge.fileTreeWidth,"get"),set:i((ge,Pe)=>{ge.fileTreeWidth=Pe},"set")},metadata:fe},k,C),$r(this,null,R,{kind:"accessor",name:"terminalHeight",static:!1,private:!1,access:{has:i(ge=>"terminalHeight"in ge,"has"),get:i(ge=>ge.terminalHeight,"get"),set:i((ge,Pe)=>{ge.terminalHeight=Pe},"set")},metadata:fe},T,S),$r(this,null,N,{kind:"accessor",name:"openFiles",static:!1,private:!1,access:{has:i(ge=>"openFiles"in ge,"has"),get:i(ge=>ge.openFiles,"get"),set:i((ge,Pe)=>{ge.openFiles=Pe},"set")},metadata:fe},_,I),$r(this,null,O,{kind:"accessor",name:"activeFilePath",static:!1,private:!1,access:{has:i(ge=>"activeFilePath"in ge,"has"),get:i(ge=>ge.activeFilePath,"get"),set:i((ge,Pe)=>{ge.activeFilePath=Pe},"set")},metadata:fe},M,z),$r(this,null,E,{kind:"accessor",name:"isTerminalCollapsed",static:!1,private:!1,access:{has:i(ge=>"isTerminalCollapsed"in ge,"has"),get:i(ge=>ge.isTerminalCollapsed,"get"),set:i((ge,Pe)=>{ge.isTerminalCollapsed=Pe},"set")},metadata:fe},A,F),$r(this,null,K,{kind:"accessor",name:"isFileTreeCollapsed",static:!1,private:!1,access:{has:i(ge=>"isFileTreeCollapsed"in ge,"has"),get:i(ge=>ge.isFileTreeCollapsed,"get"),set:i((ge,Pe)=>{ge.isFileTreeCollapsed=Pe},"set")},metadata:fe},j,U),$r(this,null,he,{kind:"accessor",name:"isInitializing",static:!1,private:!1,access:{has:i(ge=>"isInitializing"in ge,"has"),get:i(ge=>ge.isInitializing,"get"),set:i((ge,Pe)=>{ge.isInitializing=Pe},"set")},metadata:fe},B,J),$r(this,null,ve,{kind:"accessor",name:"activeBottomPanel",static:!1,private:!1,access:{has:i(ge=>"activeBottomPanel"in ge,"has"),get:i(ge=>ge.activeBottomPanel,"get"),set:i((ge,Pe)=>{ge.activeBottomPanel=Pe},"set")},metadata:fe},P,H),$r(this,null,de,{kind:"accessor",name:"diagnosticMarkers",static:!1,private:!1,access:{has:i(ge=>"diagnosticMarkers"in ge,"has"),get:i(ge=>ge.diagnosticMarkers,"get"),set:i((ge,Pe)=>{ge.diagnosticMarkers=Pe},"set")},metadata:fe},ue,Y),$r(this,null,X,{kind:"accessor",name:"autoSave",static:!1,private:!1,access:{has:i(ge=>"autoSave"in ge,"has"),get:i(ge=>ge.autoSave,"get"),set:i((ge,Pe)=>{ge.autoSave=Pe},"set")},metadata:fe},Q,Z),$r(this,null,me,{kind:"accessor",name:"initCommand",static:!1,private:!1,access:{has:i(ge=>"initCommand"in ge,"has"),get:i(ge=>ge.initCommand,"get"),set:i((ge,Pe)=>{ge.initCommand=Pe},"set")},metadata:fe},ae,re),$r(this,null,ye,{kind:"accessor",name:"initOutput",static:!1,private:!1,access:{has:i(ge=>"initOutput"in ge,"has"),get:i(ge=>ge.initOutput,"get"),set:i((ge,Pe)=>{ge.initOutput=Pe},"set")},metadata:fe},V,q),$r(this,null,oe,{kind:"accessor",name:"currentFileTreeWidth",static:!1,private:!1,access:{has:i(ge=>"currentFileTreeWidth"in ge,"has"),get:i(ge=>ge.currentFileTreeWidth,"get"),set:i((ge,Pe)=>{ge.currentFileTreeWidth=Pe},"set")},metadata:fe},se,te),$r(this,null,Ce,{kind:"accessor",name:"currentTerminalHeight",static:!1,private:!1,access:{has:i(ge=>"currentTerminalHeight"in ge,"has"),get:i(ge=>ge.currentTerminalHeight,"get"),set:i((ge,Pe)=>{ge.currentTerminalHeight=Pe},"set")},metadata:fe},Fe,Ve),$r(this,null,dt,{kind:"accessor",name:"isDraggingFileTree",static:!1,private:!1,access:{has:i(ge=>"isDraggingFileTree"in ge,"has"),get:i(ge=>ge.isDraggingFileTree,"get"),set:i((ge,Pe)=>{ge.isDraggingFileTree=Pe},"set")},metadata:fe},$e,ze),$r(this,null,Me,{kind:"accessor",name:"isDraggingTerminal",static:!1,private:!1,access:{has:i(ge=>"isDraggingTerminal"in ge,"has"),get:i(ge=>ge.isDraggingTerminal,"get"),set:i((ge,Pe)=>{ge.isDraggingTerminal=Pe},"set")},metadata:fe},pe,be),$r(this,null,Ae,{kind:"accessor",name:"showDiffView",static:!1,private:!1,access:{has:i(ge=>"showDiffView"in ge,"has"),get:i(ge=>ge.showDiffView,"get"),set:i((ge,Pe)=>{ge.showDiffView=Pe},"set")},metadata:fe},Ze,nt),$r(this,null,_t,{kind:"accessor",name:"diffViewConfig",static:!1,private:!1,access:{has:i(ge=>"diffViewConfig"in ge,"has"),get:i(ge=>ge.diffViewConfig,"get"),set:i((ge,Pe)=>{ge.diffViewConfig=Pe},"set")},metadata:fe},_e,we),$r(null,e={value:r},t,{kind:"class",name:r.name,metadata:fe},null,a),Ne=r=e.value,fe&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:fe})}static demo=i(()=>{let fe=new o5,ge=(async()=>{await fe.init();let vt={"package.json":{file:{contents:JSON.stringify({name:"demo-project",version:"1.0.0",type:"module",scripts:{build:"tsc",dev:"tsc --watch"},dependencies:{"@push.rocks/smartpromise":"^4.2.3"},devDependencies:{"@types/node":"^22.0.0",typescript:"^5.0.0"}},null,2)}},"npmextra.json":{file:{contents:JSON.stringify({deesEditorWorkspace:{onInit:"pnpm install"}},null,2)}},"tsconfig.json":{file:{contents:JSON.stringify({compilerOptions:{target:"ES2022",module:"NodeNext",moduleResolution:"NodeNext",strict:!0,outDir:"./dist",rootDir:"./src",declaration:!0},include:["src/**/*"]},null,2)}},src:{directory:{"index.ts":{file:{contents:`// Main entry point
31397
+ `}async firstUpdated(){await super.firstUpdated(new Map),await this.initDiffEditor()}async initDiffEditor(){let _=this.shadowRoot?.querySelector(".diff-container");if(!_)return;let I=`https://cdn.jsdelivr.net/npm/monaco-editor@${nte}`,O=window.monaco;O||(await new Promise(U=>{let he=setInterval(()=>{window.monaco&&(clearInterval(he),U())},100)}),O=window.monaco);let M=await this.domtoolsPromise,E=M.themeManager.goBrightBoolean?"vs":"vs-dark",A=Date.now(),F=O.Uri.parse(`diff://original/${A}${this.filePath}`),K=O.Uri.parse(`diff://modified/${A}${this.filePath}`);this.originalModel=O.editor.createModel(this.originalContent,this.language,F),this.modifiedModel=O.editor.createModel(this.modifiedContent,this.language,K),this.diffEditor=O.editor.createDiffEditor(_,{automaticLayout:!0,readOnly:!1,originalEditable:!1,renderSideBySide:!0,ignoreTrimWhitespace:!1,fontSize:14,minimap:{enabled:!1}}),O.editor.setTheme(E),this.diffEditor.setModel({original:this.originalModel,modified:this.modifiedModel}),this.monacoThemeSubscription=M.themeManager.themeObservable.subscribe(U=>{let he=U?"vs":"vs-dark";O.editor.setTheme(he)});let j="monaco-diff-editor-css";if(!this.shadowRoot?.getElementById(j)){let he=await(await fetch(`${I}/min/vs/editor/editor.main.css`)).text(),B=document.createElement("style");B.id=j,B.textContent=he,this.shadowRoot?.append(B)}setTimeout(()=>{try{this.diffEditor?.revealFirstDiff()}catch{}},100),this.diffEditorDeferred.resolve(this.diffEditor)}goToNextDiff(){try{this.diffEditor?.goToDiff("next")}catch{}}goToPreviousDiff(){try{this.diffEditor?.goToDiff("previous")}catch{}}acceptLocal(){let _=this.diffEditor?.getModifiedEditor().getValue()||this.modifiedContent;this.dispatchEvent(new CustomEvent("diff-resolved",{detail:{action:"use-local",content:_},bubbles:!0,composed:!0}))}acceptDisk(){this.dispatchEvent(new CustomEvent("diff-resolved",{detail:{action:"use-disk",content:this.originalContent},bubbles:!0,composed:!0}))}close(){this.dispatchEvent(new CustomEvent("diff-closed",{bubbles:!0,composed:!0}))}async disconnectedCallback(){await super.disconnectedCallback(),this.monacoThemeSubscription&&(this.monacoThemeSubscription.unsubscribe(),this.monacoThemeSubscription=null),this.originalModel&&(this.originalModel.dispose(),this.originalModel=null),this.modifiedModel&&(this.modifiedModel.dispose(),this.modifiedModel=null),this.diffEditor&&(this.diffEditor.dispose(),this.diffEditor=null)}static{en(r,a)}};return N=r})()});var $r,Ut,Rpa,Fpa=f(()=>{le();ea();tt();vie();ff();yie();yie();xW();xW();qQe();HQe();ba();ff();VQe();Qr();Ha();Jre();jQe();$r=function(t,e,a,r,s,o){function n(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}i(n,"accept");for(var l=r.kind,c=l==="getter"?"get":l==="setter"?"set":"value",d=!e&&t?r.static?t:t.prototype:null,u=e||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p,m=!1,v=a.length-1;v>=0;v--){var x={};for(var b in r)x[b]=b==="access"?{}:r[b];for(var b in r.access)x.access[b]=r.access[b];x.addInitializer=function(y){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(n(y||null))};var g=(0,a[v])(l==="accessor"?{get:u.get,set:u.set}:u[c],x);if(l==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(p=n(g.get))&&(u.get=p),(p=n(g.set))&&(u.set=p),(p=n(g.init))&&s.unshift(p)}else(p=n(g))&&(l==="field"?s.unshift(p):u[c]=p)}d&&Object.defineProperty(d,r.name,u),m=!0},Ut=function(t,e,a){for(var r=arguments.length>2,s=0;s<e.length;s++)a=r?e[s].call(t,a):e[s].call(t);return r?a:void 0},Rpa=(()=>{let t=[ie("dees-workspace")],e,a=[],r,s=ne,o,n=[],l=[],c,d=[],u=[],p,m=[],v=[],x,b=[],g=[],y,k=[],C=[],R,T=[],S=[],N,_=[],I=[],O,M=[],z=[],E,A=[],F=[],K,j=[],U=[],he,B=[],J=[],ve,P=[],H=[],de,ue=[],Y=[],X,Q=[],Z=[],me,ae=[],re=[],ye,V=[],q=[],oe,se=[],te=[],Ce,Fe=[],Ve=[],dt,$e=[],ze=[],Me,pe=[],be=[],Ae,Ke=[],nt=[],_t,_e=[],we=[];var Ne=class extends s{static{i(this,"DeesWorkspace")}static{r=this}static{let fe=typeof Symbol=="function"&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;o=[$({type:Object})],c=[$({attribute:!1})],p=[$({type:Boolean})],x=[$({type:Boolean})],y=[$({type:Number})],R=[$({type:Number})],N=[G()],O=[G()],E=[G()],K=[G()],he=[G()],ve=[G()],de=[G()],X=[G()],me=[G()],ye=[G()],oe=[G()],Ce=[G()],dt=[G()],Me=[G()],Ae=[G()],_t=[G()],$r(this,null,o,{kind:"accessor",name:"executionEnvironment",static:!1,private:!1,access:{has:i(ge=>"executionEnvironment"in ge,"has"),get:i(ge=>ge.executionEnvironment,"get"),set:i((ge,Pe)=>{ge.executionEnvironment=Pe},"set")},metadata:fe},n,l),$r(this,null,c,{kind:"accessor",name:"initializationPromise",static:!1,private:!1,access:{has:i(ge=>"initializationPromise"in ge,"has"),get:i(ge=>ge.initializationPromise,"get"),set:i((ge,Pe)=>{ge.initializationPromise=Pe},"set")},metadata:fe},d,u),$r(this,null,p,{kind:"accessor",name:"showFileTree",static:!1,private:!1,access:{has:i(ge=>"showFileTree"in ge,"has"),get:i(ge=>ge.showFileTree,"get"),set:i((ge,Pe)=>{ge.showFileTree=Pe},"set")},metadata:fe},m,v),$r(this,null,x,{kind:"accessor",name:"showTerminal",static:!1,private:!1,access:{has:i(ge=>"showTerminal"in ge,"has"),get:i(ge=>ge.showTerminal,"get"),set:i((ge,Pe)=>{ge.showTerminal=Pe},"set")},metadata:fe},b,g),$r(this,null,y,{kind:"accessor",name:"fileTreeWidth",static:!1,private:!1,access:{has:i(ge=>"fileTreeWidth"in ge,"has"),get:i(ge=>ge.fileTreeWidth,"get"),set:i((ge,Pe)=>{ge.fileTreeWidth=Pe},"set")},metadata:fe},k,C),$r(this,null,R,{kind:"accessor",name:"terminalHeight",static:!1,private:!1,access:{has:i(ge=>"terminalHeight"in ge,"has"),get:i(ge=>ge.terminalHeight,"get"),set:i((ge,Pe)=>{ge.terminalHeight=Pe},"set")},metadata:fe},T,S),$r(this,null,N,{kind:"accessor",name:"openFiles",static:!1,private:!1,access:{has:i(ge=>"openFiles"in ge,"has"),get:i(ge=>ge.openFiles,"get"),set:i((ge,Pe)=>{ge.openFiles=Pe},"set")},metadata:fe},_,I),$r(this,null,O,{kind:"accessor",name:"activeFilePath",static:!1,private:!1,access:{has:i(ge=>"activeFilePath"in ge,"has"),get:i(ge=>ge.activeFilePath,"get"),set:i((ge,Pe)=>{ge.activeFilePath=Pe},"set")},metadata:fe},M,z),$r(this,null,E,{kind:"accessor",name:"isTerminalCollapsed",static:!1,private:!1,access:{has:i(ge=>"isTerminalCollapsed"in ge,"has"),get:i(ge=>ge.isTerminalCollapsed,"get"),set:i((ge,Pe)=>{ge.isTerminalCollapsed=Pe},"set")},metadata:fe},A,F),$r(this,null,K,{kind:"accessor",name:"isFileTreeCollapsed",static:!1,private:!1,access:{has:i(ge=>"isFileTreeCollapsed"in ge,"has"),get:i(ge=>ge.isFileTreeCollapsed,"get"),set:i((ge,Pe)=>{ge.isFileTreeCollapsed=Pe},"set")},metadata:fe},j,U),$r(this,null,he,{kind:"accessor",name:"isInitializing",static:!1,private:!1,access:{has:i(ge=>"isInitializing"in ge,"has"),get:i(ge=>ge.isInitializing,"get"),set:i((ge,Pe)=>{ge.isInitializing=Pe},"set")},metadata:fe},B,J),$r(this,null,ve,{kind:"accessor",name:"activeBottomPanel",static:!1,private:!1,access:{has:i(ge=>"activeBottomPanel"in ge,"has"),get:i(ge=>ge.activeBottomPanel,"get"),set:i((ge,Pe)=>{ge.activeBottomPanel=Pe},"set")},metadata:fe},P,H),$r(this,null,de,{kind:"accessor",name:"diagnosticMarkers",static:!1,private:!1,access:{has:i(ge=>"diagnosticMarkers"in ge,"has"),get:i(ge=>ge.diagnosticMarkers,"get"),set:i((ge,Pe)=>{ge.diagnosticMarkers=Pe},"set")},metadata:fe},ue,Y),$r(this,null,X,{kind:"accessor",name:"autoSave",static:!1,private:!1,access:{has:i(ge=>"autoSave"in ge,"has"),get:i(ge=>ge.autoSave,"get"),set:i((ge,Pe)=>{ge.autoSave=Pe},"set")},metadata:fe},Q,Z),$r(this,null,me,{kind:"accessor",name:"initCommand",static:!1,private:!1,access:{has:i(ge=>"initCommand"in ge,"has"),get:i(ge=>ge.initCommand,"get"),set:i((ge,Pe)=>{ge.initCommand=Pe},"set")},metadata:fe},ae,re),$r(this,null,ye,{kind:"accessor",name:"initOutput",static:!1,private:!1,access:{has:i(ge=>"initOutput"in ge,"has"),get:i(ge=>ge.initOutput,"get"),set:i((ge,Pe)=>{ge.initOutput=Pe},"set")},metadata:fe},V,q),$r(this,null,oe,{kind:"accessor",name:"currentFileTreeWidth",static:!1,private:!1,access:{has:i(ge=>"currentFileTreeWidth"in ge,"has"),get:i(ge=>ge.currentFileTreeWidth,"get"),set:i((ge,Pe)=>{ge.currentFileTreeWidth=Pe},"set")},metadata:fe},se,te),$r(this,null,Ce,{kind:"accessor",name:"currentTerminalHeight",static:!1,private:!1,access:{has:i(ge=>"currentTerminalHeight"in ge,"has"),get:i(ge=>ge.currentTerminalHeight,"get"),set:i((ge,Pe)=>{ge.currentTerminalHeight=Pe},"set")},metadata:fe},Fe,Ve),$r(this,null,dt,{kind:"accessor",name:"isDraggingFileTree",static:!1,private:!1,access:{has:i(ge=>"isDraggingFileTree"in ge,"has"),get:i(ge=>ge.isDraggingFileTree,"get"),set:i((ge,Pe)=>{ge.isDraggingFileTree=Pe},"set")},metadata:fe},$e,ze),$r(this,null,Me,{kind:"accessor",name:"isDraggingTerminal",static:!1,private:!1,access:{has:i(ge=>"isDraggingTerminal"in ge,"has"),get:i(ge=>ge.isDraggingTerminal,"get"),set:i((ge,Pe)=>{ge.isDraggingTerminal=Pe},"set")},metadata:fe},pe,be),$r(this,null,Ae,{kind:"accessor",name:"showDiffView",static:!1,private:!1,access:{has:i(ge=>"showDiffView"in ge,"has"),get:i(ge=>ge.showDiffView,"get"),set:i((ge,Pe)=>{ge.showDiffView=Pe},"set")},metadata:fe},Ke,nt),$r(this,null,_t,{kind:"accessor",name:"diffViewConfig",static:!1,private:!1,access:{has:i(ge=>"diffViewConfig"in ge,"has"),get:i(ge=>ge.diffViewConfig,"get"),set:i((ge,Pe)=>{ge.diffViewConfig=Pe},"set")},metadata:fe},_e,we),$r(null,e={value:r},t,{kind:"class",name:r.name,metadata:fe},null,a),Ne=r=e.value,fe&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:fe})}static demo=i(()=>{let fe=new o5,ge=(async()=>{await fe.init();let vt={"package.json":{file:{contents:JSON.stringify({name:"demo-project",version:"1.0.0",type:"module",scripts:{build:"tsc",dev:"tsc --watch"},dependencies:{"@push.rocks/smartpromise":"^4.2.3"},devDependencies:{"@types/node":"^22.0.0",typescript:"^5.0.0"}},null,2)}},"npmextra.json":{file:{contents:JSON.stringify({deesEditorWorkspace:{onInit:"pnpm install"}},null,2)}},"tsconfig.json":{file:{contents:JSON.stringify({compilerOptions:{target:"ES2022",module:"NodeNext",moduleResolution:"NodeNext",strict:!0,outDir:"./dist",rootDir:"./src",declaration:!0},include:["src/**/*"]},null,2)}},src:{directory:{"index.ts":{file:{contents:`// Main entry point
31398
31398
  import { greet, formatName } from './utils.js';
31399
31399
 
31400
31400
  const name = formatName('World');
@@ -31446,7 +31446,7 @@ testSmartPromise();
31446
31446
  <dees-demowrapper>
31447
31447
  ${Pe}
31448
31448
  </dees-demowrapper>
31449
- `},"demo");static demoGroups=["Workspace"];#e=Ut(this,n,null);get executionEnvironment(){return this.#e}set executionEnvironment(fe){this.#e=fe}#t=(Ut(this,l),Ut(this,d,null));get initializationPromise(){return this.#t}set initializationPromise(fe){this.#t=fe}#a=(Ut(this,u),Ut(this,m,!0));get showFileTree(){return this.#a}set showFileTree(fe){this.#a=fe}#r=(Ut(this,v),Ut(this,b,!0));get showTerminal(){return this.#r}set showTerminal(fe){this.#r=fe}#i=(Ut(this,g),Ut(this,k,250));get fileTreeWidth(){return this.#i}set fileTreeWidth(fe){this.#i=fe}#s=(Ut(this,C),Ut(this,T,200));get terminalHeight(){return this.#s}set terminalHeight(fe){this.#s=fe}#o=(Ut(this,S),Ut(this,_,[]));get openFiles(){return this.#o}set openFiles(fe){this.#o=fe}#n=(Ut(this,I),Ut(this,M,""));get activeFilePath(){return this.#n}set activeFilePath(fe){this.#n=fe}#l=(Ut(this,z),Ut(this,A,!1));get isTerminalCollapsed(){return this.#l}set isTerminalCollapsed(fe){this.#l=fe}#c=(Ut(this,F),Ut(this,j,!1));get isFileTreeCollapsed(){return this.#c}set isFileTreeCollapsed(fe){this.#c=fe}#d=(Ut(this,U),Ut(this,B,!0));get isInitializing(){return this.#d}set isInitializing(fe){this.#d=fe}#u=(Ut(this,J),Ut(this,P,"terminal"));get activeBottomPanel(){return this.#u}set activeBottomPanel(fe){this.#u=fe}#p=(Ut(this,H),Ut(this,ue,[]));get diagnosticMarkers(){return this.#p}set diagnosticMarkers(fe){this.#p=fe}editorElement=(Ut(this,Y),null);initializationStarted=!1;intelliSenseManager=null;intelliSenseInitialized=!1;nodeModulesWatcher=null;nodeModulesDebounceTimeout=null;intelliSenseDebounceTimeout=null;openFileWatchers=new Map;fileChangeDebounce=new Map;actionbarElement=null;#f=Ut(this,Q,!1);get autoSave(){return this.#f}set autoSave(fe){this.#f=fe}autoSaveInterval=(Ut(this,Z),null);#h=Ut(this,ae,"");get initCommand(){return this.#h}set initCommand(fe){this.#h=fe}#m=(Ut(this,re),Ut(this,V,[]));get initOutput(){return this.#m}set initOutput(fe){this.#m=fe}#g=(Ut(this,q),Ut(this,se,250));get currentFileTreeWidth(){return this.#g}set currentFileTreeWidth(fe){this.#g=fe}#b=(Ut(this,te),Ut(this,Fe,200));get currentTerminalHeight(){return this.#b}set currentTerminalHeight(fe){this.#b=fe}#v=(Ut(this,Ve),Ut(this,$e,!1));get isDraggingFileTree(){return this.#v}set isDraggingFileTree(fe){this.#v=fe}#x=(Ut(this,ze),Ut(this,pe,!1));get isDraggingTerminal(){return this.#x}set isDraggingTerminal(fe){this.#x=fe}#y=(Ut(this,be),Ut(this,Ze,!1));get showDiffView(){return this.#y}set showDiffView(fe){this.#y=fe}#w=(Ut(this,nt),Ut(this,_e,null));get diffViewConfig(){return this.#w}set diffViewConfig(fe){this.#w=fe}keydownHandler=(Ut(this,we),fe=>{(fe.metaKey||fe.ctrlKey)&&fe.key==="s"&&!fe.shiftKey&&(fe.preventDefault(),this.saveActiveFile()),(fe.metaKey||fe.ctrlKey)&&fe.shiftKey&&fe.key.toLowerCase()==="s"&&(fe.preventDefault(),this.saveAllFiles())});handleFileTreeMouseDown=i(fe=>{fe.preventDefault(),this.isDraggingFileTree=!0,document.addEventListener("mousemove",this.handleFileTreeMouseMove),document.addEventListener("mouseup",this.handleFileTreeMouseUp)},"handleFileTreeMouseDown");handleFileTreeMouseMove=i(fe=>{if(!this.isDraggingFileTree)return;let ge=this.getBoundingClientRect(),Pe=fe.clientX-ge.left,bt=150,vt=ge.width*.5,Ft=Math.max(bt,Math.min(vt,Pe));this.currentFileTreeWidth=Ft},"handleFileTreeMouseMove");handleFileTreeMouseUp=i(()=>{this.isDraggingFileTree=!1,document.removeEventListener("mousemove",this.handleFileTreeMouseMove),document.removeEventListener("mouseup",this.handleFileTreeMouseUp),window.dispatchEvent(new Event("resize"))},"handleFileTreeMouseUp");handleTerminalMouseDown=i(fe=>{fe.preventDefault(),this.isDraggingTerminal=!0,document.addEventListener("mousemove",this.handleTerminalMouseMove),document.addEventListener("mouseup",this.handleTerminalMouseUp)},"handleTerminalMouseDown");handleTerminalMouseMove=i(fe=>{if(!this.isDraggingTerminal)return;let ge=this.getBoundingClientRect(),Pe=fe.clientY-ge.top,bt=ge.height-Pe,vt=100,Ft=ge.height*.7,Ja=Math.max(vt,Math.min(Ft,bt));this.currentTerminalHeight=Ja},"handleTerminalMouseMove");handleTerminalMouseUp=i(()=>{this.isDraggingTerminal=!1,document.removeEventListener("mousemove",this.handleTerminalMouseMove),document.removeEventListener("mouseup",this.handleTerminalMouseUp),window.dispatchEvent(new Event("resize"))},"handleTerminalMouseUp");static styles=[Ie,h.defaultStyles,W`
31449
+ `},"demo");static demoGroups=["Workspace"];#e=Ut(this,n,null);get executionEnvironment(){return this.#e}set executionEnvironment(fe){this.#e=fe}#t=(Ut(this,l),Ut(this,d,null));get initializationPromise(){return this.#t}set initializationPromise(fe){this.#t=fe}#a=(Ut(this,u),Ut(this,m,!0));get showFileTree(){return this.#a}set showFileTree(fe){this.#a=fe}#r=(Ut(this,v),Ut(this,b,!0));get showTerminal(){return this.#r}set showTerminal(fe){this.#r=fe}#i=(Ut(this,g),Ut(this,k,250));get fileTreeWidth(){return this.#i}set fileTreeWidth(fe){this.#i=fe}#s=(Ut(this,C),Ut(this,T,200));get terminalHeight(){return this.#s}set terminalHeight(fe){this.#s=fe}#o=(Ut(this,S),Ut(this,_,[]));get openFiles(){return this.#o}set openFiles(fe){this.#o=fe}#n=(Ut(this,I),Ut(this,M,""));get activeFilePath(){return this.#n}set activeFilePath(fe){this.#n=fe}#l=(Ut(this,z),Ut(this,A,!1));get isTerminalCollapsed(){return this.#l}set isTerminalCollapsed(fe){this.#l=fe}#c=(Ut(this,F),Ut(this,j,!1));get isFileTreeCollapsed(){return this.#c}set isFileTreeCollapsed(fe){this.#c=fe}#d=(Ut(this,U),Ut(this,B,!0));get isInitializing(){return this.#d}set isInitializing(fe){this.#d=fe}#u=(Ut(this,J),Ut(this,P,"terminal"));get activeBottomPanel(){return this.#u}set activeBottomPanel(fe){this.#u=fe}#p=(Ut(this,H),Ut(this,ue,[]));get diagnosticMarkers(){return this.#p}set diagnosticMarkers(fe){this.#p=fe}editorElement=(Ut(this,Y),null);initializationStarted=!1;intelliSenseManager=null;intelliSenseInitialized=!1;nodeModulesWatcher=null;nodeModulesDebounceTimeout=null;intelliSenseDebounceTimeout=null;openFileWatchers=new Map;fileChangeDebounce=new Map;actionbarElement=null;#f=Ut(this,Q,!1);get autoSave(){return this.#f}set autoSave(fe){this.#f=fe}autoSaveInterval=(Ut(this,Z),null);#h=Ut(this,ae,"");get initCommand(){return this.#h}set initCommand(fe){this.#h=fe}#m=(Ut(this,re),Ut(this,V,[]));get initOutput(){return this.#m}set initOutput(fe){this.#m=fe}#g=(Ut(this,q),Ut(this,se,250));get currentFileTreeWidth(){return this.#g}set currentFileTreeWidth(fe){this.#g=fe}#b=(Ut(this,te),Ut(this,Fe,200));get currentTerminalHeight(){return this.#b}set currentTerminalHeight(fe){this.#b=fe}#v=(Ut(this,Ve),Ut(this,$e,!1));get isDraggingFileTree(){return this.#v}set isDraggingFileTree(fe){this.#v=fe}#x=(Ut(this,ze),Ut(this,pe,!1));get isDraggingTerminal(){return this.#x}set isDraggingTerminal(fe){this.#x=fe}#y=(Ut(this,be),Ut(this,Ke,!1));get showDiffView(){return this.#y}set showDiffView(fe){this.#y=fe}#w=(Ut(this,nt),Ut(this,_e,null));get diffViewConfig(){return this.#w}set diffViewConfig(fe){this.#w=fe}keydownHandler=(Ut(this,we),fe=>{(fe.metaKey||fe.ctrlKey)&&fe.key==="s"&&!fe.shiftKey&&(fe.preventDefault(),this.saveActiveFile()),(fe.metaKey||fe.ctrlKey)&&fe.shiftKey&&fe.key.toLowerCase()==="s"&&(fe.preventDefault(),this.saveAllFiles())});handleFileTreeMouseDown=i(fe=>{fe.preventDefault(),this.isDraggingFileTree=!0,document.addEventListener("mousemove",this.handleFileTreeMouseMove),document.addEventListener("mouseup",this.handleFileTreeMouseUp)},"handleFileTreeMouseDown");handleFileTreeMouseMove=i(fe=>{if(!this.isDraggingFileTree)return;let ge=this.getBoundingClientRect(),Pe=fe.clientX-ge.left,bt=150,vt=ge.width*.5,Ft=Math.max(bt,Math.min(vt,Pe));this.currentFileTreeWidth=Ft},"handleFileTreeMouseMove");handleFileTreeMouseUp=i(()=>{this.isDraggingFileTree=!1,document.removeEventListener("mousemove",this.handleFileTreeMouseMove),document.removeEventListener("mouseup",this.handleFileTreeMouseUp),window.dispatchEvent(new Event("resize"))},"handleFileTreeMouseUp");handleTerminalMouseDown=i(fe=>{fe.preventDefault(),this.isDraggingTerminal=!0,document.addEventListener("mousemove",this.handleTerminalMouseMove),document.addEventListener("mouseup",this.handleTerminalMouseUp)},"handleTerminalMouseDown");handleTerminalMouseMove=i(fe=>{if(!this.isDraggingTerminal)return;let ge=this.getBoundingClientRect(),Pe=fe.clientY-ge.top,bt=ge.height-Pe,vt=100,Ft=ge.height*.7,Ja=Math.max(vt,Math.min(Ft,bt));this.currentTerminalHeight=Ja},"handleTerminalMouseMove");handleTerminalMouseUp=i(()=>{this.isDraggingTerminal=!1,document.removeEventListener("mousemove",this.handleTerminalMouseMove),document.removeEventListener("mouseup",this.handleTerminalMouseUp),window.dispatchEvent(new Event("resize"))},"handleTerminalMouseUp");static styles=[Ie,h.defaultStyles,W`
31450
31450
  :host {
31451
31451
  display: block;
31452
31452
  position: absolute;
@@ -42458,7 +42458,7 @@ Customer Support Team`}};async onActivate(b){this.appui=b.appui,this.appui.setCo
42458
42458
  }
42459
42459
  `];render(){return w`
42460
42460
  <dees-appui></dees-appui>
42461
- `}async firstUpdated(){let n=this.shadowRoot?.querySelector("dees-appui");n&&(n.configure({branding:{logoIcon:"lucide:Box",logoText:"serve.zone"},appBar:{showSearch:!0,breadcrumbs:"serve.zone",menuItems:[{name:"File",action:i(async()=>{},"action"),submenu:[{name:"New Service",shortcut:"Cmd+N",action:i(async()=>{console.log("New Service")},"action")},{name:"Import Configuration",action:i(async()=>{console.log("Import")},"action")},{name:"Export Configuration",action:i(async()=>{console.log("Export")},"action")},{divider:!0},{name:"Preferences",shortcut:"Cmd+,",action:i(async()=>{n.navigateToView("settings")},"action")}]},{name:"View",action:i(async()=>{},"action"),submenu:[{name:"Dashboard",shortcut:"Cmd+1",action:i(async()=>{n.navigateToView("dashboard")},"action")},{name:"Services",shortcut:"Cmd+2",action:i(async()=>{n.navigateToView("services")},"action")},{name:"Network",shortcut:"Cmd+3",action:i(async()=>{n.navigateToView("network")},"action")},{divider:!0},{name:"Activity Log",shortcut:"Cmd+Shift+A",action:i(async()=>{n.toggleActivityLog()},"action")},{name:"Toggle Sidebar",shortcut:"Cmd+B",action:i(async()=>{n.setMainMenuCollapsed(!n.mainmenuCollapsed)},"action")}]},{name:"Services",action:i(async()=>{},"action"),submenu:[{name:"Deploy New Service",action:i(async()=>{console.log("Deploy")},"action")},{name:"Start All",action:i(async()=>{console.log("Start all")},"action")},{name:"Stop All",action:i(async()=>{console.log("Stop all")},"action")},{divider:!0},{name:"Garbage Collect",action:i(async()=>{console.log("GC")},"action")}]},{name:"Help",action:i(async()=>{},"action"),submenu:[{name:"Documentation",action:i(async()=>{window.open("https://docs.serve.zone","_blank")},"action")},{name:"Release Notes",action:i(async()=>{console.log("Release notes")},"action")},{divider:!0},{name:"About serve.zone",action:i(async()=>{console.log("About")},"action")}]}]},views:[{id:"dashboard",name:"Dashboard",iconName:"lucide:LayoutDashboard",content:"sz-demo-view-dashboard"},{id:"services",name:"Services",iconName:"lucide:Server",content:"sz-demo-view-services"},{id:"network",name:"Network",iconName:"lucide:Network",content:"sz-demo-view-network"},{id:"registries",name:"Registries",iconName:"lucide:Archive",content:"sz-demo-view-registries"},{id:"tokens",name:"Tokens",iconName:"lucide:Key",content:"sz-demo-view-tokens"},{id:"mta",name:"Email / MTA",iconName:"lucide:Mail",content:"sz-demo-view-mta"},{id:"routes",name:"Routes",iconName:"lucide:Route",content:"sz-demo-view-routes"},{id:"settings",name:"Settings",iconName:"lucide:Settings",content:"sz-demo-view-settings"}],mainMenu:{sections:[{name:"Overview",views:["dashboard"]},{name:"Infrastructure",views:["services","network","registries","mta","routes"]},{name:"Administration",views:["tokens","settings"]}]},defaultView:"dashboard",onViewChange:i((l,c)=>{console.log("View changed to:",l,c)},"onViewChange")}),n.setUser({name:"Admin User",email:"admin@serve.zone",status:"online"}),n.setProfileMenuItems([{name:"Profile",iconName:"lucide:User",action:i(async()=>{console.log("Profile")},"action")},{name:"Preferences",iconName:"lucide:SlidersHorizontal",action:i(async()=>{console.log("Preferences")},"action")},{divider:!0},{name:"Sign Out",iconName:"lucide:LogOut",action:i(async()=>{console.log("Sign Out")},"action")}]))}static{ZHa(r,a)}};return o=r})();var Hm={};pt(Hm,{TypedSocket:()=>vJe});var gJe={};pt(gJe,{sha256FromString:()=>eVa});var FW={};pt(FW,{Smartenv:()=>mJe});var hJe=Bi(c5a(),1);var mJe=class{static{i(this,"Smartenv")}constructor(){this.loadedScripts=[]}async getEnvAwareModule(e){if(this.isNode)return await this.getSafeNodeModule(e.nodeModuleName);if(this.isBrowser)return await this.getSafeWebModule(e.webUrlArg,e.getFunction);console.error("platform for loading not supported by smartenv")}async getSafeNodeModule(e){if(!this.isNode){console.error(`You tried to load a node module in a wrong context: ${e}`);return}return new Function(`return import('${e}')`)()}async getSafeWebModule(e,a){if(!this.isBrowser){console.error("You tried to load a web module in a wrong context");return}if(this.loadedScripts.includes(e))return a();this.loadedScripts.push(e);let r=hJe.defer();if(globalThis.importScripts)globalThis.importScripts(e),r.resolve();else{let s=document.createElement("script");s.onload=()=>{r.resolve()},s.src=e,document.head.appendChild(s)}return await r.promise,a()}get runtimeEnv(){return typeof process<"u"?"node":"browser"}get isBrowser(){return!this.isNode}get userAgent(){return this.isBrowser?navigator.userAgent:"undefined"}get isNode(){return this.runtimeEnv==="node"}get nodeVersion(){return process.version}get isCI(){return this.isNode?!!process.env.CI:!1}async isMacAsync(){return this.isNode?(await this.getSafeNodeModule("os")).platform()==="darwin":!1}async isWindowsAsync(){return this.isNode?(await this.getSafeNodeModule("os")).platform()==="win32":!1}async isLinuxAsync(){return this.isNode?(await this.getSafeNodeModule("os")).platform()==="linux":!1}async printEnv(){this.isNode?(console.log("running on NODE"),console.log("node version is "+this.nodeVersion)):(console.log("running on BROWSER"),console.log("browser is "+this.userAgent))}};var JHa=i(t=>{let e=[],a=new DataView(t);for(let r=0;r<a.byteLength;r+=4){let o=a.getUint32(r).toString(16),n="00000000",l=(n+o).slice(-n.length);e.push(l)}return e.join("")},"hex"),eVa=i(async t=>{let e=new FW.Smartenv;if(e.isBrowser){let a=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",a);return JHa(r)}else if(e.isNode)return await(await e.getSafeNodeModule("@pushrocks/smarthash")).sha256FromString(t)},"sha256FromString");Oh();U4();Y2();O3e();ms();jn();n3();SQ();var bJe="__typedsocket_tag__";function aVa(t){return{peer:t,async getTagById(e){if(!t.tags.has(e))return;let a=t.data.get(`${bJe}${e}`);return{id:e,payload:a}}}}i(aVa,"wrapSmartServePeer");var vJe=class t{static{i(this,"TypedSocket")}static async createClient(e,a,r={}){let o={...{autoReconnect:!0,maxRetries:100,initialBackoffMs:1e3,maxBackoffMs:6e4},...r},n=new t("client",e);return n.clientOptions=o,n.serverUrl=a,n.currentBackoff=o.initialBackoffMs,await n.connect(),n}static{this.useWindowLocationOriginUrl=()=>pn.Smarturl.createFromUrl(globalThis.location.origin).toString()}static fromSmartServe(e,a){let r=new Map;t.registerTagHandlers(a);let s=new t("server",a);return s.smartServeRef=e,s.smartServeConnectionWrappers=r,s}static registerTagHandlers(e){e.addTypedHandler(new Nr.TypedHandler("__typedsocket_setTag",async(a,r)=>{let s=r?.localData?.peer;return s?(s.tags.add(a.name),s.data.set(`${bJe}${a.name}`,a.payload),{success:!0}):(console.warn("setTag: No peer found in request context"),{success:!1})})),e.addTypedHandler(new Nr.TypedHandler("__typedsocket_removeTag",async(a,r)=>{let s=r?.localData?.peer;return s?(s.tags.delete(a.name),s.data.delete(`${bJe}${a.name}`),{success:!0}):(console.warn("removeTag: No peer found in request context"),{success:!1})}))}constructor(e,a){this.statusSubject=new Ma.rxjs.Subject,this.connectionStatus="new",this.websocket=null,this.clientOptions=null,this.serverUrl="",this.retryCount=0,this.currentBackoff=1e3,this.pendingRequests=new Map,this.smartServeRef=null,this.smartServeConnectionWrappers=new Map,this.side=e,this.typedrouter=a}async connect(){let e=ft.defer();this.updateStatus("connecting");let a=this.toWebSocketUrl(this.serverUrl);console.log(`TypedSocket connecting to ${a}...`),this.websocket=new WebSocket(a);let r=setTimeout(()=>{this.connectionStatus!=="connected"&&(console.warn("TypedSocket connection timeout"),this.websocket?.close(),e.reject(new Error("Connection timeout")))},1e4);this.websocket.onopen=()=>{clearTimeout(r),console.log("TypedSocket connected!"),this.updateStatus("connected"),this.retryCount=0,this.currentBackoff=this.clientOptions?.initialBackoffMs??1e3,e.resolve()},this.websocket.onmessage=async s=>{await this.handleMessage(s.data)},this.websocket.onclose=()=>{clearTimeout(r),this.handleDisconnect()},this.websocket.onerror=s=>{console.error("TypedSocket WebSocket error:",s)};try{await e.promise}catch(s){if(clearTimeout(r),this.clientOptions?.autoReconnect)await this.scheduleReconnect();else throw s}}toWebSocketUrl(e){let a=new URL(e);return`${a.protocol==="https:"?"wss:":"ws:"}//${a.host}${a.pathname}`}async handleMessage(e){try{let a=typeof e=="string"?e:new TextDecoder().decode(e),r=So.parse(a);if(r.correlation?.id&&this.pendingRequests.has(r.correlation.id)){let o=this.pendingRequests.get(r.correlation.id);this.pendingRequests.delete(r.correlation.id),o.resolve(r);return}let s=await this.typedrouter.routeAndAddResponse(r);s&&this.websocket?.readyState===WebSocket.OPEN&&this.websocket.send(So.stringify(s))}catch(a){console.error("TypedSocket failed to process message:",a)}}handleDisconnect(){if(this.connectionStatus!=="disconnected"){this.updateStatus("disconnected");for(let[e,a]of this.pendingRequests)a.reject(new Error("TypedSocket disconnected"));this.pendingRequests.clear(),this.clientOptions?.autoReconnect&&this.retryCount<this.clientOptions.maxRetries&&this.scheduleReconnect()}}async scheduleReconnect(){if(!this.clientOptions)return;this.updateStatus("reconnecting"),this.retryCount++;let e=this.currentBackoff*.2*(Math.random()*2-1),a=Math.min(this.currentBackoff+e,this.clientOptions.maxBackoffMs);console.log(`TypedSocket reconnecting in ${Math.round(a)}ms (attempt ${this.retryCount}/${this.clientOptions.maxRetries})`),await Wt.delayFor(a),this.currentBackoff=Math.min(this.currentBackoff*2,this.clientOptions.maxBackoffMs);try{await this.connect()}catch(r){console.error("TypedSocket reconnection failed:",r)}}updateStatus(e){this.connectionStatus!==e&&(this.connectionStatus=e,this.statusSubject.next(e))}async sendRequest(e){if(!this.websocket||this.websocket.readyState!==WebSocket.OPEN)throw new Error("WebSocket not connected");return new Promise((a,r)=>{let s=setTimeout(()=>{this.pendingRequests.delete(e.correlation.id),r(new Error("Request timeout"))},3e4);this.pendingRequests.set(e.correlation.id,{resolve:i(o=>{clearTimeout(s),a(o)},"resolve"),reject:i(o=>{clearTimeout(s),r(o)},"reject")}),this.websocket.send(So.stringify(e))})}createTypedRequest(e,a){let r=i(async s=>{if(this.side==="client")return this.sendRequest(s);if(!this.smartServeRef)throw new Error("Server not initialized");let o=a;if(!o){let l=this.smartServeRef.getWebSocketConnections();if(l.length===1){let c=l[0];o=this.getOrCreateWrapper(c)}else throw l.length===0?new Error("No WebSocket connections available"):new Error("Multiple connections available - specify targetConnection")}let n=await this.typedrouter.fireEventInterestMap.addInterest(s.correlation.id,s);return o.peer.send(So.stringify(s)),await n.interestFullfilled},"postMethod");return new Nr.TypedRequest(new Nr.TypedTarget({postMethod:r}),e)}getStatus(){return this.connectionStatus}async stop(){this.side==="client"?(this.clientOptions&&(this.clientOptions.autoReconnect=!1),this.websocket&&(this.websocket.close(),this.websocket=null),this.pendingRequests.clear()):this.smartServeConnectionWrappers.clear()}async setTag(e,a){if(this.side!=="client")throw new Error("setTag is only available on clients");if(!(await this.createTypedRequest("__typedsocket_setTag").fire({name:e,payload:a})).success)throw new Error("Failed to set tag on server")}async removeTag(e){if(this.side!=="client")throw new Error("removeTag is only available on clients");if(!(await this.createTypedRequest("__typedsocket_removeTag").fire({name:e})).success)throw new Error("Failed to remove tag on server")}getOrCreateWrapper(e){let a=this.smartServeConnectionWrappers.get(e.id);return a||(a=aVa(e),this.smartServeConnectionWrappers.set(e.id,a)),a}async findAllTargetConnections(e){if(this.side!=="server"||!this.smartServeRef)throw new Error("findAllTargetConnections is only available on servers");let a=[];for(let r of this.smartServeRef.getWebSocketConnections()){let s=this.getOrCreateWrapper(r);await e(s)&&a.push(s)}return a}async findTargetConnection(e){return(await this.findAllTargetConnections(e))[0]}async findAllTargetConnectionsByTag(e,a){if(this.side!=="server"||!this.smartServeRef)throw new Error("findAllTargetConnectionsByTag is only available on servers");let r=this.smartServeRef.getWebSocketConnectionsByTag(e),s=[];for(let o of r){let n=this.getOrCreateWrapper(o);if(a!==void 0){let l=await n.getTagById(e);if(So.stringify(l?.payload)!==So.stringify(a))continue}s.push(n)}return s}async findTargetConnectionByTag(e,a){return(await this.findAllTargetConnectionsByTag(e,a))[0]}};le();Tt();var Bie=Bi(cha(),1),Ke=At;U4();var HJe={};pt(HJe,{DCROUTER_BUILTIN_PROVIDER_ID:()=>ZVa,dnsProviderTypeDescriptors:()=>dha,getDnsProviderTypeDescriptor:()=>XVa});var ZVa="__dcrouter__",dha=[{type:"dcrouter",displayName:"DcRouter (built-in)",description:"Built-in authoritative DNS. Records are served directly by dcrouter \u2014 delegate the domain's NS records to make this effective.",credentialFields:[]},{type:"cloudflare",displayName:"Cloudflare",description:"External DNS provider. The provider stays authoritative; dcrouter pushes record changes via its API.",credentialFields:[{key:"apiToken",label:"API Token",helpText:"A Cloudflare API token with Zone:Read and DNS:Edit permissions for the target zones.",required:!0,secret:!0}]}];function XVa(t){return dha.find(e=>e.type===t)}i(XVa,"getDnsProviderTypeDescriptor");var uha={};var fs=new Ke.plugins.smartstate.Smartstate,Ia=await fs.getStatePart("login",{identity:null,isLoggedIn:!1},"persistent"),nr=await fs.getStatePart("stats",{serverStats:null,emailStats:null,dnsStats:null,securityMetrics:null,radiusStats:null,vpnStats:null,lastUpdated:0,isLoading:!1,error:null},"soft"),g4=await fs.getStatePart("config",{config:null,isLoading:!1,error:null}),QVa=i(()=>{let t=typeof window<"u"?window.location.pathname:"/",e=["overview","network","email","logs","access","security","domains"],r=t.split("/").filter(Boolean)[0];return e.includes(r)?r:"overview"},"getInitialView"),JVa=i(()=>(typeof window<"u"?window.location.pathname:"/").split("/").filter(Boolean)[1]??null,"getInitialSubview"),Os=await fs.getStatePart("ui",{activeView:QVa(),activeSubview:JVa(),sidebarCollapsed:!1,autoRefresh:!0,refreshInterval:1e3,theme:"light"}),pc=await fs.getStatePart("logs",{recentLogs:[],isStreaming:!1,filters:{}},"soft"),m4=await fs.getStatePart("network",{connections:[],connectionsByIP:{},throughputRate:{bytesInPerSecond:0,bytesOutPerSecond:0},totalBytes:{in:0,out:0},topIPs:[],topIPsByBandwidth:[],throughputByIP:[],domainActivity:[],throughputHistory:[],requestsPerSecond:0,requestsTotal:0,backends:[],frontendProtocols:null,backendProtocols:null,lastUpdated:0,isLoading:!1,error:null},"soft"),Hie=await fs.getStatePart("emailOps",{emails:[],isLoading:!1,error:null,lastUpdated:0},"soft"),Ao=await fs.getStatePart("certificates",{certificates:[],summary:{total:0,valid:0,expiring:0,expired:0,failed:0,unknown:0},isLoading:!1,error:null,lastUpdated:0},"soft"),T5=await fs.getStatePart("acmeConfig",{config:null,isLoading:!1,error:null,lastUpdated:0},"soft"),Ri=await fs.getStatePart("remoteIngress",{edges:[],statuses:[],selectedEdgeId:null,newEdgeId:null,isLoading:!1,error:null,lastUpdated:0},"soft"),Fa=await fs.getStatePart("routeManagement",{mergedRoutes:[],warnings:[],apiTokens:[],isLoading:!1,error:null,lastUpdated:0},"soft"),GW=await fs.getStatePart("users",{users:[],isLoading:!1,error:null,lastUpdated:0},"soft"),ut=i(()=>{let t=Ia.getState().identity;return t&&t.expiresAt&&t.expiresAt<Date.now()?{identity:null}:{identity:t}},"getActionContext"),bha=Ia.createAction(async(t,e)=>{let a=new Ke.plugins.typedrequest.TypedRequest("/typedrequest","adminLoginWithUsernameAndPassword");try{let r=await a.fire({username:e.username,password:e.password});return r.identity?{identity:r.identity,isLoggedIn:!0}:t.getState()}catch(r){return console.error("Login failed:",r),t.getState()}}),Ym=Ia.createAction(async t=>{let e=ut();if(e.identity){let a=new Ke.plugins.typedrequest.TypedRequest("/typedrequest","adminLogout");try{await a.fire({identity:e.identity})}catch(r){console.error("Logout error:",r)}}return{identity:null,isLoggedIn:!1}}),Km=nr.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let s=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getCombinedMetrics").fire({identity:e.identity,sections:{server:!0,email:!0,dns:!0,security:!0,network:!1,radius:!0,vpn:!0}});return{serverStats:s.metrics.server||a.serverStats,emailStats:s.metrics.email||a.emailStats,dnsStats:s.metrics.dns||a.dnsStats,securityMetrics:s.metrics.security||a.securityMetrics,radiusStats:s.metrics.radius||a.radiusStats,vpnStats:s.metrics.vpn||a.vpnStats,lastUpdated:Date.now(),isLoading:!1,error:null}}catch(r){return{...a,isLoading:!1,error:r.message||"Failed to fetch statistics"}}}),Vie=g4.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{return{config:(await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getConfiguration").fire({identity:e.identity})).config,isLoading:!1,error:null}}catch(r){return{...a,isLoading:!1,error:r.message||"Failed to fetch configuration"}}}),jie=pc.createAction(async(t,e)=>{let a=ut();if(!a.identity)return t.getState();let s=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getRecentLogs").fire({identity:a.identity,limit:e.limit||100,level:e.level,category:e.category});return{...t.getState(),recentLogs:s.logs}}),Bmo=Os.createAction(async t=>{let e=t.getState();return{...e,autoRefresh:!e.autoRefresh}}),qmo=Os.createAction(async(t,e)=>{let a=t.getState();return e==="network"&&a.activeView!=="network"&&setTimeout(()=>{m4.dispatchAction(GJe,null)},100),e==="domains"&&a.activeView!=="domains"&&setTimeout(()=>{Ao.dispatchAction(h4,null)},100),{...a,activeView:e}}),GJe=m4.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let s=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getActiveConnections").fire({identity:e.identity}),n=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getNetworkStats").fire({identity:e.identity}),l={};return n.connectionsByIP&&Array.isArray(n.connectionsByIP)?n.connectionsByIP.forEach(c=>{l[c.ip]=c.count}):s.connections.forEach(c=>{let d=c.remoteAddress;l[d]=(l[d]||0)+1}),{connections:s.connections,connectionsByIP:l,throughputRate:n.throughputRate||{bytesInPerSecond:0,bytesOutPerSecond:0},totalBytes:n.totalDataTransferred?{in:n.totalDataTransferred.bytesIn,out:n.totalDataTransferred.bytesOut}:{in:0,out:0},topIPs:n.topIPs||[],topIPsByBandwidth:n.topIPsByBandwidth||[],throughputByIP:n.throughputByIP||[],domainActivity:n.domainActivity||[],throughputHistory:n.throughputHistory||[],requestsPerSecond:n.requestsPerSecond||0,requestsTotal:n.requestsTotal||0,backends:n.backends||[],frontendProtocols:n.frontendProtocols||null,backendProtocols:n.backendProtocols||null,lastUpdated:Date.now(),isLoading:!1,error:null}}catch(r){return console.error("Failed to fetch network stats:",r),{...a,isLoading:!1,error:r instanceof Error?r.message:"Failed to fetch network stats"}}}),vha=Hie.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{return{emails:(await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getAllEmails").fire({identity:e.identity})).emails,isLoading:!1,error:null,lastUpdated:Date.now()}}catch(r){return{...a,isLoading:!1,error:r instanceof Error?r.message:"Failed to fetch emails"}}}),h4=Ao.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let s=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getCertificateOverview").fire({identity:e.identity});return{certificates:s.certificates,summary:s.summary,isLoading:!1,error:null,lastUpdated:Date.now()}}catch(r){return{...a,isLoading:!1,error:r instanceof Error?r.message:"Failed to fetch certificate overview"}}}),xha=Ao.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","reprovisionCertificateDomain").fire({identity:r.identity,domain:e.domain,forceRenew:e.forceRenew}),await a.dispatch(h4,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to reprovision certificate"}}}),yha=Ao.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","deleteCertificate").fire({identity:r.identity,domain:e}),await a.dispatch(h4,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to delete certificate"}}}),wha=Ao.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","importCertificate").fire({identity:r.identity,cert:e}),await a.dispatch(h4,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to import certificate"}}});async function Mha(t){let e=ut();return new Ke.plugins.typedrequest.TypedRequest("/typedrequest","exportCertificate").fire({identity:e.identity,domain:t})}i(Mha,"fetchCertificateExport");async function YJe(t){let e=ut();return new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getRemoteIngressConnectionToken").fire({identity:e.identity,edgeId:t})}i(YJe,"fetchConnectionToken");var S5=Ri.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let r=new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getRemoteIngresses"),s=new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getRemoteIngressStatus"),[o,n]=await Promise.all([r.fire({identity:e.identity}),s.fire({identity:e.identity})]);return{...a,edges:o.edges,statuses:n.statuses,isLoading:!1,error:null,lastUpdated:Date.now()}}catch(r){return{...a,isLoading:!1,error:r instanceof Error?r.message:"Failed to fetch remote ingress data"}}}),kha=Ri.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{let n=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","createRemoteIngress").fire({identity:r.identity,name:e.name,listenPorts:e.listenPorts,autoDerivePorts:e.autoDerivePorts,tags:e.tags});return n.success?(await a.dispatch(S5,null),{...t.getState(),newEdgeId:n.edge.id}):s}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to create edge"}}}),Sha=Ri.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","deleteRemoteIngress").fire({identity:r.identity,id:e}),await a.dispatch(S5,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to delete edge"}}}),Cha=Ri.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","updateRemoteIngress").fire({identity:r.identity,id:e.id,name:e.name,listenPorts:e.listenPorts,autoDerivePorts:e.autoDerivePorts,tags:e.tags}),await a.dispatch(S5,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to update edge"}}}),zha=Ri.createAction(async(t,e)=>{let a=ut(),r=t.getState();try{return(await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","regenerateRemoteIngressSecret").fire({identity:a.identity,id:e})).success?{...r,newEdgeId:e}:r}catch(s){return{...r,error:s instanceof Error?s.message:"Failed to regenerate secret"}}}),Tha=Ri.createAction(async t=>({...t.getState(),newEdgeId:null})),KJe=Ri.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","updateRemoteIngress").fire({identity:r.identity,id:e.id,enabled:e.enabled}),await a.dispatch(S5,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to toggle edge"}}}),Fi=await fs.getStatePart("vpn",{clients:[],connectedClients:[],status:null,isLoading:!1,error:null,lastUpdated:0,newClientConfig:null},"soft"),C5=Fi.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let r=new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getVpnClients"),s=new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getVpnStatus"),o=new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getVpnConnectedClients"),[n,l,c]=await Promise.all([r.fire({identity:e.identity}),s.fire({identity:e.identity}),o.fire({identity:e.identity})]);return{...a,clients:n.clients,connectedClients:c.connectedClients,status:l.status,isLoading:!1,error:null,lastUpdated:Date.now()}}catch(r){return{...a,isLoading:!1,error:r instanceof Error?r.message:"Failed to fetch VPN data"}}}),_ha=Fi.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{let n=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","createVpnClient").fire({identity:r.identity,clientId:e.clientId,targetProfileIds:e.targetProfileIds,description:e.description,destinationAllowList:e.destinationAllowList,destinationBlockList:e.destinationBlockList,useHostIp:e.useHostIp,useDhcp:e.useDhcp,staticIp:e.staticIp,forceVlan:e.forceVlan,vlanId:e.vlanId});return n.success?{...await a.dispatch(C5,null),newClientConfig:n.wireguardConfig||null}:{...s,error:n.message||"Failed to create client"}}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to create VPN client"}}}),Lha=Fi.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","deleteVpnClient").fire({identity:r.identity,clientId:e}),await a.dispatch(C5,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to delete VPN client"}}}),ZJe=Fi.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{let o=e.enabled?"enableVpnClient":"disableVpnClient";return await new Ke.plugins.typedrequest.TypedRequest("/typedrequest",o).fire({identity:r.identity,clientId:e.clientId}),await a.dispatch(C5,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to toggle VPN client"}}}),$ha=Fi.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{let n=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","updateVpnClient").fire({identity:r.identity,clientId:e.clientId,description:e.description,targetProfileIds:e.targetProfileIds,destinationAllowList:e.destinationAllowList,destinationBlockList:e.destinationBlockList,useHostIp:e.useHostIp,useDhcp:e.useDhcp,staticIp:e.staticIp,forceVlan:e.forceVlan,vlanId:e.vlanId});return n.success?await a.dispatch(C5,null):{...s,error:n.message||"Failed to update client"}}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to update VPN client"}}}),Dha=Fi.createAction(async t=>({...t.getState(),newClientConfig:null})),Oi=await fs.getStatePart("targetProfiles",{profiles:[],isLoading:!1,error:null,lastUpdated:0},"soft"),fc=Oi.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{return{profiles:(await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getTargetProfiles").fire({identity:e.identity})).profiles,isLoading:!1,error:null,lastUpdated:Date.now()}}catch(r){return{...a,isLoading:!1,error:r instanceof Error?r.message:"Failed to fetch target profiles"}}}),Aha=Oi.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","createTargetProfile").fire({identity:r.identity,name:e.name,description:e.description,domains:e.domains,targets:e.targets,routeRefs:e.routeRefs});return o.success?await a.dispatch(fc,null):{...t.getState(),error:o.message||"Failed to create target profile"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to create target profile"}}}),Iha=Oi.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","updateTargetProfile").fire({identity:r.identity,id:e.id,name:e.name,description:e.description,domains:e.domains,targets:e.targets,routeRefs:e.routeRefs});return o.success?await a.dispatch(fc,null):{...t.getState(),error:o.message||"Failed to update target profile"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to update target profile"}}}),XJe=Oi.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","deleteTargetProfile").fire({identity:r.identity,id:e.id,force:e.force});return o.success?await a.dispatch(fc,null):{...t.getState(),error:o.message||"Failed to delete target profile"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to delete target profile"}}}),Ua=await fs.getStatePart("profilesTargets",{profiles:[],targets:[],isLoading:!1,error:null,lastUpdated:0},"soft"),Io=Ua.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let r=new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getSourceProfiles"),s=new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getNetworkTargets"),[o,n]=await Promise.all([r.fire({identity:e.identity}),s.fire({identity:e.identity})]);return{profiles:o.profiles,targets:n.targets,isLoading:!1,error:null,lastUpdated:Date.now()}}catch(r){return{...a,isLoading:!1,error:r instanceof Error?r.message:"Failed to fetch profiles/targets"}}}),Pha=Ua.createAction(async(t,e,a)=>{let r=ut();try{return await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","createSourceProfile").fire({identity:r.identity,name:e.name,description:e.description,security:e.security,extendsProfiles:e.extendsProfiles}),await a.dispatch(Io,null)}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to create profile"}}}),Eha=Ua.createAction(async(t,e,a)=>{let r=ut();try{return await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","updateSourceProfile").fire({identity:r.identity,id:e.id,name:e.name,description:e.description,security:e.security,extendsProfiles:e.extendsProfiles}),await a.dispatch(Io,null)}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to update profile"}}}),QJe=Ua.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","deleteSourceProfile").fire({identity:r.identity,id:e.id,force:e.force});return o.success?await a.dispatch(Io,null):{...t.getState(),error:o.message||"Failed to delete profile"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to delete profile"}}}),Nha=Ua.createAction(async(t,e,a)=>{let r=ut();try{return await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","createNetworkTarget").fire({identity:r.identity,name:e.name,description:e.description,host:e.host,port:e.port}),await a.dispatch(Io,null)}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to create target"}}}),Rha=Ua.createAction(async(t,e,a)=>{let r=ut();try{return await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","updateNetworkTarget").fire({identity:r.identity,id:e.id,name:e.name,description:e.description,host:e.host,port:e.port}),await a.dispatch(Io,null)}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to update target"}}}),JJe=Ua.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","deleteNetworkTarget").fire({identity:r.identity,id:e.id,force:e.force});return o.success?await a.dispatch(Io,null):{...t.getState(),error:o.message||"Failed to delete target"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to delete target"}}}),Bt=await fs.getStatePart("domains",{providers:[],domains:[],records:[],selectedDomainId:null,isLoading:!1,error:null,lastUpdated:0},"soft"),Ni=Bt.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let r=new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getDnsProviders"),s=new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getDomains"),[o,n]=await Promise.all([r.fire({identity:e.identity}),s.fire({identity:e.identity})]);return{...a,providers:o.providers,domains:n.domains,isLoading:!1,error:null,lastUpdated:Date.now()}}catch(r){return{...a,isLoading:!1,error:r instanceof Error?r.message:"Failed to fetch domains/providers"}}}),hc=Bt.createAction(async(t,e)=>{let a=ut(),r=t.getState();if(!a.identity)return r;try{let o=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getDnsRecords").fire({identity:a.identity,domainId:e.domainId});return{...r,records:o.records,selectedDomainId:e.domainId,error:null}}catch(s){return{...r,error:s instanceof Error?s.message:"Failed to fetch DNS records"}}}),Fha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","createDnsProvider").fire({identity:r.identity,name:e.name,type:e.type,credentials:e.credentials});return o.success?await a.dispatch(Ni,null):{...t.getState(),error:o.message||"Failed to create provider"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to create provider"}}}),Oha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","updateDnsProvider").fire({identity:r.identity,id:e.id,name:e.name,credentials:e.credentials});return o.success?await a.dispatch(Ni,null):{...t.getState(),error:o.message||"Failed to update provider"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to update provider"}}}),Bha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","deleteDnsProvider").fire({identity:r.identity,id:e.id,force:e.force});return o.success?await a.dispatch(Ni,null):{...t.getState(),error:o.message||"Failed to delete provider"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to delete provider"}}}),qha=Bt.createAction(async(t,e,a)=>{let r=ut();try{return await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","testDnsProvider").fire({identity:r.identity,id:e.id}),await a.dispatch(Ni,null)}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to test provider"}}});async function Hha(t){let e=ut();return e.identity?await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","listProviderDomains").fire({identity:e.identity,providerId:t}):{success:!1,message:"Not authenticated"}}i(Hha,"fetchProviderDomains");var Vha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","createDomain").fire({identity:r.identity,name:e.name,description:e.description});return o.success?await a.dispatch(Ni,null):{...t.getState(),error:o.message||"Failed to create domain"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to create domain"}}}),jha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","importDomain").fire({identity:r.identity,providerId:e.providerId,domainNames:e.domainNames});return o.success?await a.dispatch(Ni,null):{...t.getState(),error:o.message||"Failed to import domains"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to import domains"}}}),Uha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","deleteDomain").fire({identity:r.identity,id:e.id});return o.success?await a.dispatch(Ni,null):{...t.getState(),error:o.message||"Failed to delete domain"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to delete domain"}}}),Wha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","syncDomain").fire({identity:r.identity,id:e.id});return o.success?await a.dispatch(Ni,null):{...t.getState(),error:o.message||"Failed to sync domain"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to sync domain"}}}),Gha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","migrateDomain").fire({identity:r.identity,...e});return o.success?await a.dispatch(Ni,null):{...t.getState(),error:o.message||"Migration failed"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Migration failed"}}}),Yha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","createDnsRecord").fire({identity:r.identity,domainId:e.domainId,name:e.name,type:e.type,value:e.value,ttl:e.ttl,proxied:e.proxied});return o.success?await a.dispatch(hc,{domainId:e.domainId}):{...t.getState(),error:o.message||"Failed to create record"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to create record"}}}),Kha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","updateDnsRecord").fire({identity:r.identity,id:e.id,name:e.name,value:e.value,ttl:e.ttl,proxied:e.proxied});return o.success?await a.dispatch(hc,{domainId:e.domainId}):{...t.getState(),error:o.message||"Failed to update record"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to update record"}}}),Zha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","deleteDnsRecord").fire({identity:r.identity,id:e.id});return o.success?await a.dispatch(hc,{domainId:e.domainId}):{...t.getState(),error:o.message||"Failed to delete record"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to delete record"}}}),eet=T5.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{return{config:(await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getAcmeConfig").fire({identity:e.identity})).config,isLoading:!1,error:null,lastUpdated:Date.now()}}catch(r){return{...a,isLoading:!1,error:r instanceof Error?r.message:"Failed to fetch ACME config"}}}),Xha=T5.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","updateAcmeConfig").fire({identity:r.identity,accountEmail:e.accountEmail,enabled:e.enabled,useProduction:e.useProduction,autoRenew:e.autoRenew,renewThresholdDays:e.renewThresholdDays});return o.success?await a.dispatch(eet,null):{...t.getState(),error:o.message||"Failed to update ACME config"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to update ACME config"}}}),E2=Fa.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let s=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getMergedRoutes").fire({identity:e.identity});return{...a,mergedRoutes:s.routes,warnings:s.warnings,isLoading:!1,error:null,lastUpdated:Date.now()}}catch(r){return{...a,isLoading:!1,error:r instanceof Error?r.message:"Failed to fetch routes"}}}),Qha=Fa.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","createRoute").fire({identity:r.identity,route:e.route,enabled:e.enabled,metadata:e.metadata}),await a.dispatch(E2,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to create route"}}}),Jha=Fa.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{let n=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","updateRoute").fire({identity:r.identity,id:e.id,route:e.route,enabled:e.enabled,metadata:e.metadata});if(!n.success)throw new Error(n.message||"Failed to update route");return await a.dispatch(E2,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to update route"}}}),tet=Fa.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{let n=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","deleteRoute").fire({identity:r.identity,id:e});if(!n.success)throw new Error(n.message||"Failed to delete route");return await a.dispatch(E2,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to delete route"}}}),e8a=Fa.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{let n=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","toggleRoute").fire({identity:r.identity,id:e.id,enabled:e.enabled});if(!n.success)throw new Error(n.message||"Failed to toggle route");return await a.dispatch(E2,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to toggle route"}}}),_5=Fa.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let s=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","listApiTokens").fire({identity:e.identity});return{...a,apiTokens:s.tokens}}catch(r){return{...a,error:r instanceof Error?r.message:"Failed to fetch tokens"}}}),aet=GW.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let s=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","listUsers").fire({identity:e.identity});return{...a,users:s.users,error:null,lastUpdated:Date.now()}}catch(r){return{...a,error:r instanceof Error?r.message:"Failed to fetch users"}}});async function t8a(t,e,a){let r=ut();return new Ke.plugins.typedrequest.TypedRequest("/typedrequest","createApiToken").fire({identity:r.identity,name:t,scopes:e,expiresInDays:a})}i(t8a,"createApiToken");async function a8a(t){let e=ut();return new Ke.plugins.typedrequest.TypedRequest("/typedrequest","rollApiToken").fire({identity:e.identity,id:t})}i(a8a,"rollApiToken");var r8a=Fa.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","revokeApiToken").fire({identity:r.identity,id:e}),await a.dispatch(_5,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to revoke token"}}}),ret=Fa.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","toggleApiToken").fire({identity:r.identity,id:e.id,enabled:e.enabled}),await a.dispatch(_5,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to toggle token"}}}),fo=await fs.getStatePart("emailDomains",{domains:[],isLoading:!1,lastUpdated:0},"soft"),z5=fo.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let s=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getEmailDomains").fire({identity:e.identity});return{...a,domains:s.domains,isLoading:!1,lastUpdated:Date.now()}}catch{return{...a,isLoading:!1}}}),i8a=fo.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","createEmailDomain").fire({identity:r.identity,...e}),await a.dispatch(z5,null)}catch{return s}}),s8a=fo.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","deleteEmailDomain").fire({identity:r.identity,id:e}),await a.dispatch(z5,null)}catch{return s}}),o8a=fo.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","validateEmailDomain").fire({identity:r.identity,id:e}),await a.dispatch(z5,null)}catch{return s}}),iet=fo.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","provisionEmailDomainDns").fire({identity:r.identity,id:e}),await a.dispatch(z5,null)}catch{return s}});async function n8a(t){let e=ut();return new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getEmailDomainDnsRecords").fire({identity:e.identity,id:t})}i(n8a,"fetchEmailDomainDnsRecords");var M5=null,pha=new Ke.plugins.typedrequest.TypedRouter,qie=[],VJe=!1;function eja(){if(VJe=!1,qie.length===0)return;let t=pc.getState(),e=[...t.recentLogs,...qie];qie=[],e.length>2e3&&e.splice(0,e.length-2e3),pc.setState({...t,recentLogs:e})}i(eja,"flushLogEntries"),pha.addTypedHandler(new Ke.plugins.typedrequest.TypedHandler("pushLogEntry",async t=>(qie.push(t.entry),VJe||(VJe=!0,requestAnimationFrame(eja)),{})));async function jJe(){if(!M5)try{M5=await Hm.TypedSocket.createClient(pha,Hm.TypedSocket.useWindowLocationOriginUrl()),await M5.setTag("role","ops_dashboard")}catch(t){console.error("TypedSocket connection failed:",t),M5=null}}i(jJe,"connectSocket");async function fha(){if(M5){try{await M5.stop()}catch{}M5=null}}i(fha,"disconnectSocket");var UJe=!1;async function tja(){if(!UJe){UJe=!0;try{await aja()}finally{UJe=!1}}}i(tja,"dispatchCombinedRefreshAction");async function aja(){let t=ut();if(!t.identity)return;let e=Os.getState().activeView,a=Os.getState().activeSubview;try{let s=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getCombinedMetrics").fire({identity:t.identity,sections:{server:!0,email:!0,dns:!0,security:!0,network:e==="network",radius:!0,vpn:!0}}),o=nr.getState();if(nr.setState({...o,serverStats:s.metrics.server||o.serverStats,emailStats:s.metrics.email||o.emailStats,dnsStats:s.metrics.dns||o.dnsStats,securityMetrics:s.metrics.security||o.securityMetrics,radiusStats:s.metrics.radius||o.radiusStats,vpnStats:s.metrics.vpn||o.vpnStats,lastUpdated:Date.now(),isLoading:!1,error:null}),s.metrics.network&&e==="network"){let n=s.metrics.network,l={};n.connectionDetails.forEach(d=>{l[d.remoteAddress]=(l[d.remoteAddress]||0)+1});let c=n.connectionDetails.map((d,u)=>({id:`ip-${d.remoteAddress}`,remoteAddress:d.remoteAddress,localAddress:"server",startTime:d.startTime,protocol:d.protocol,state:d.state,bytesReceived:d.bytesIn,bytesSent:d.bytesOut}));m4.setState({...m4.getState(),connections:c,connectionsByIP:l,throughputRate:{bytesInPerSecond:n.totalBandwidth.in,bytesOutPerSecond:n.totalBandwidth.out},totalBytes:n.totalBytes||{in:0,out:0},topIPs:n.topEndpoints.map(d=>({ip:d.endpoint,count:d.connections})),topIPsByBandwidth:(n.topEndpointsByBandwidth||[]).map(d=>({ip:d.endpoint,count:d.connections,bwIn:d.bandwidth?.in||0,bwOut:d.bandwidth?.out||0})),throughputByIP:n.topEndpoints.map(d=>({ip:d.endpoint,in:d.bandwidth?.in||0,out:d.bandwidth?.out||0})),domainActivity:n.domainActivity||[],throughputHistory:n.throughputHistory||[],requestsPerSecond:n.requestsPerSecond||0,requestsTotal:n.requestsTotal||0,backends:n.backends||[],frontendProtocols:n.frontendProtocols||null,backendProtocols:n.backendProtocols||null,lastUpdated:Date.now(),isLoading:!1,error:null})}if(e==="domains"&&a==="certificates")try{await Ao.dispatchAction(h4,null)}catch(n){console.error("Certificate refresh failed:",n)}if(e==="network"&&a==="remoteingress")try{await Ri.dispatchAction(S5,null)}catch(n){console.error("Remote ingress refresh failed:",n)}if(e==="network"&&a==="vpn")try{await Fi.dispatchAction(C5,null)}catch(n){console.error("VPN refresh failed:",n)}}catch(r){console.error("Combined refresh failed:",r);let s=String(r);(s.includes("invalid")||s.includes("unauthorized")||s.includes("401"))&&(await Ia.dispatchAction(Ym,null),window.location.reload())}}i(aja,"dispatchCombinedRefreshActionInner");var rja=nr.createAction(async t=>(await tja(),t.getState())),k5=null,WJe=i(()=>{let t=Os.getState(),e=Ia.getState();t.autoRefresh&&e.isLoggedIn?(k5&&(k5.dispose(),k5=null),k5=nr.createScheduledAction({action:rja,payload:void 0,intervalMs:t.refreshInterval,autoPause:"visibility"})):k5&&(k5.dispose(),k5=null)},"startAutoRefresh"),hha=Os.getState().autoRefresh,mha=Os.getState().refreshInterval,gha=Ia.getState().isLoggedIn;Os.select(t=>({autoRefresh:t.autoRefresh,refreshInterval:t.refreshInterval})).subscribe(t=>{(t.autoRefresh!==hha||t.refreshInterval!==mha)&&(hha=t.autoRefresh,mha=t.refreshInterval,WJe())}),Ia.select(t=>t.isLoggedIn).subscribe(t=>{t!==gha&&(gha=t,WJe(),t?jJe():fha())}),document.addEventListener("visibilitychange",()=>{document.hidden?fha():Ia.getState().isLoggedIn&&jJe()}),WJe(),Ia.getState().isLoggedIn&&jJe();U4();var N2={};pt(N2,{DCROUTER_BUILTIN_PROVIDER_ID:()=>ija,dnsProviderTypeDescriptors:()=>l8a,getDnsProviderTypeDescriptor:()=>sja});var ija="__dcrouter__",l8a=[{type:"dcrouter",displayName:"DcRouter (built-in)",description:"Built-in authoritative DNS. Records are served directly by dcrouter \u2014 delegate the domain's NS records to make this effective.",credentialFields:[]},{type:"cloudflare",displayName:"Cloudflare",description:"External DNS provider. The provider stays authoritative; dcrouter pushes record changes via its API.",credentialFields:[{key:"apiToken",label:"API Token",helpText:"A Cloudflare API token with Zone:Read and DNS:Edit permissions for the target zones.",required:!0,secret:!0}]}];function sja(t){return l8a.find(e=>e.type===t)}i(sja,"getDnsProviderTypeDescriptor");var c8a={};var oja=Ke.plugins.smartrouter.SmartRouter,u8a=["logs"],Zm={overview:["stats","configuration"],network:["activity","routes","sourceprofiles","networktargets","targetprofiles","remoteingress","vpn"],email:["log","security","domains"],access:["apitokens","users"],security:["overview","blocked","authentication"],domains:["providers","domains","dns","certificates"]},set={overview:"stats",network:"activity",email:"log",access:"apitokens",security:"overview",domains:"domains"},nja=[...u8a,...Object.keys(Zm)];function p8a(t){return nja.includes(t)}i(p8a,"isValidView");function f8a(t,e){return Zm[t]?.includes(e)??!1}i(f8a,"isValidSubview");var oet=class{static{i(this,"AppRouter")}router;initialized=!1;suppressStateUpdate=!1;constructor(){this.router=new oja({debug:!1})}init(){this.initialized||(this.setupRoutes(),this.setupStateSync(),this.handleInitialRoute(),this.initialized=!0)}setupRoutes(){for(let e of u8a)this.router.on(`/${e}`,async()=>{this.updateViewState(e,null)});for(let e of Object.keys(Zm)){this.router.on(`/${e}`,async()=>{this.navigateTo(`/${e}/${set[e]}`)});for(let a of Zm[e])this.router.on(`/${e}/${a}`,async()=>{this.updateViewState(e,a)})}this.router.on("/",async()=>{this.navigateTo("/overview")})}setupStateSync(){Os.select().subscribe(e=>{if(this.suppressStateUpdate)return;let a=window.location.pathname,r=e.activeSubview?`/${e.activeView}/${e.activeSubview}`:`/${e.activeView}`;a!==r&&(this.suppressStateUpdate=!0,this.router.pushUrl(r),this.suppressStateUpdate=!1)})}handleInitialRoute(){let e=window.location.pathname;if(!e||e==="/"){this.router.pushUrl("/overview");return}let a=e.split("/").filter(Boolean),r=a[0],s=a[1];if(!p8a(r)){this.router.pushUrl("/overview");return}Zm[r]?s&&f8a(r,s)?this.updateViewState(r,s):this.router.pushUrl(`/${r}/${set[r]}`):this.updateViewState(r,null)}updateViewState(e,a){this.suppressStateUpdate=!0;let r=Os.getState();(r.activeView!==e||r.activeSubview!==a)&&Os.setState({...r,activeView:e,activeSubview:a}),this.suppressStateUpdate=!1}navigateTo(e){this.router.pushUrl(e)}navigateToView(e,a){if(!p8a(e)){this.navigateTo("/overview");return}a&&f8a(e,a)?this.navigateTo(`/${e}/${a}`):Zm[e]?this.navigateTo(`/${e}/${set[e]}`):this.navigateTo(`/${e}`)}getCurrentView(){return Os.getState().activeView}destroy(){this.router.destroy(),this.initialized=!1}},mc=new oet;le();var Yt=W`
42461
+ `}async firstUpdated(){let n=this.shadowRoot?.querySelector("dees-appui");n&&(n.configure({branding:{logoIcon:"lucide:Box",logoText:"serve.zone"},appBar:{showSearch:!0,breadcrumbs:"serve.zone",menuItems:[{name:"File",action:i(async()=>{},"action"),submenu:[{name:"New Service",shortcut:"Cmd+N",action:i(async()=>{console.log("New Service")},"action")},{name:"Import Configuration",action:i(async()=>{console.log("Import")},"action")},{name:"Export Configuration",action:i(async()=>{console.log("Export")},"action")},{divider:!0},{name:"Preferences",shortcut:"Cmd+,",action:i(async()=>{n.navigateToView("settings")},"action")}]},{name:"View",action:i(async()=>{},"action"),submenu:[{name:"Dashboard",shortcut:"Cmd+1",action:i(async()=>{n.navigateToView("dashboard")},"action")},{name:"Services",shortcut:"Cmd+2",action:i(async()=>{n.navigateToView("services")},"action")},{name:"Network",shortcut:"Cmd+3",action:i(async()=>{n.navigateToView("network")},"action")},{divider:!0},{name:"Activity Log",shortcut:"Cmd+Shift+A",action:i(async()=>{n.toggleActivityLog()},"action")},{name:"Toggle Sidebar",shortcut:"Cmd+B",action:i(async()=>{n.setMainMenuCollapsed(!n.mainmenuCollapsed)},"action")}]},{name:"Services",action:i(async()=>{},"action"),submenu:[{name:"Deploy New Service",action:i(async()=>{console.log("Deploy")},"action")},{name:"Start All",action:i(async()=>{console.log("Start all")},"action")},{name:"Stop All",action:i(async()=>{console.log("Stop all")},"action")},{divider:!0},{name:"Garbage Collect",action:i(async()=>{console.log("GC")},"action")}]},{name:"Help",action:i(async()=>{},"action"),submenu:[{name:"Documentation",action:i(async()=>{window.open("https://docs.serve.zone","_blank")},"action")},{name:"Release Notes",action:i(async()=>{console.log("Release notes")},"action")},{divider:!0},{name:"About serve.zone",action:i(async()=>{console.log("About")},"action")}]}]},views:[{id:"dashboard",name:"Dashboard",iconName:"lucide:LayoutDashboard",content:"sz-demo-view-dashboard"},{id:"services",name:"Services",iconName:"lucide:Server",content:"sz-demo-view-services"},{id:"network",name:"Network",iconName:"lucide:Network",content:"sz-demo-view-network"},{id:"registries",name:"Registries",iconName:"lucide:Archive",content:"sz-demo-view-registries"},{id:"tokens",name:"Tokens",iconName:"lucide:Key",content:"sz-demo-view-tokens"},{id:"mta",name:"Email / MTA",iconName:"lucide:Mail",content:"sz-demo-view-mta"},{id:"routes",name:"Routes",iconName:"lucide:Route",content:"sz-demo-view-routes"},{id:"settings",name:"Settings",iconName:"lucide:Settings",content:"sz-demo-view-settings"}],mainMenu:{sections:[{name:"Overview",views:["dashboard"]},{name:"Infrastructure",views:["services","network","registries","mta","routes"]},{name:"Administration",views:["tokens","settings"]}]},defaultView:"dashboard",onViewChange:i((l,c)=>{console.log("View changed to:",l,c)},"onViewChange")}),n.setUser({name:"Admin User",email:"admin@serve.zone",status:"online"}),n.setProfileMenuItems([{name:"Profile",iconName:"lucide:User",action:i(async()=>{console.log("Profile")},"action")},{name:"Preferences",iconName:"lucide:SlidersHorizontal",action:i(async()=>{console.log("Preferences")},"action")},{divider:!0},{name:"Sign Out",iconName:"lucide:LogOut",action:i(async()=>{console.log("Sign Out")},"action")}]))}static{ZHa(r,a)}};return o=r})();var Hm={};pt(Hm,{TypedSocket:()=>vJe});var gJe={};pt(gJe,{sha256FromString:()=>eVa});var FW={};pt(FW,{Smartenv:()=>mJe});var hJe=Bi(c5a(),1);var mJe=class{static{i(this,"Smartenv")}constructor(){this.loadedScripts=[]}async getEnvAwareModule(e){if(this.isNode)return await this.getSafeNodeModule(e.nodeModuleName);if(this.isBrowser)return await this.getSafeWebModule(e.webUrlArg,e.getFunction);console.error("platform for loading not supported by smartenv")}async getSafeNodeModule(e){if(!this.isNode){console.error(`You tried to load a node module in a wrong context: ${e}`);return}return new Function(`return import('${e}')`)()}async getSafeWebModule(e,a){if(!this.isBrowser){console.error("You tried to load a web module in a wrong context");return}if(this.loadedScripts.includes(e))return a();this.loadedScripts.push(e);let r=hJe.defer();if(globalThis.importScripts)globalThis.importScripts(e),r.resolve();else{let s=document.createElement("script");s.onload=()=>{r.resolve()},s.src=e,document.head.appendChild(s)}return await r.promise,a()}get runtimeEnv(){return typeof process<"u"?"node":"browser"}get isBrowser(){return!this.isNode}get userAgent(){return this.isBrowser?navigator.userAgent:"undefined"}get isNode(){return this.runtimeEnv==="node"}get nodeVersion(){return process.version}get isCI(){return this.isNode?!!process.env.CI:!1}async isMacAsync(){return this.isNode?(await this.getSafeNodeModule("os")).platform()==="darwin":!1}async isWindowsAsync(){return this.isNode?(await this.getSafeNodeModule("os")).platform()==="win32":!1}async isLinuxAsync(){return this.isNode?(await this.getSafeNodeModule("os")).platform()==="linux":!1}async printEnv(){this.isNode?(console.log("running on NODE"),console.log("node version is "+this.nodeVersion)):(console.log("running on BROWSER"),console.log("browser is "+this.userAgent))}};var JHa=i(t=>{let e=[],a=new DataView(t);for(let r=0;r<a.byteLength;r+=4){let o=a.getUint32(r).toString(16),n="00000000",l=(n+o).slice(-n.length);e.push(l)}return e.join("")},"hex"),eVa=i(async t=>{let e=new FW.Smartenv;if(e.isBrowser){let a=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",a);return JHa(r)}else if(e.isNode)return await(await e.getSafeNodeModule("@pushrocks/smarthash")).sha256FromString(t)},"sha256FromString");Oh();U4();Y2();O3e();ms();jn();n3();SQ();var bJe="__typedsocket_tag__";function aVa(t){return{peer:t,async getTagById(e){if(!t.tags.has(e))return;let a=t.data.get(`${bJe}${e}`);return{id:e,payload:a}}}}i(aVa,"wrapSmartServePeer");var vJe=class t{static{i(this,"TypedSocket")}static async createClient(e,a,r={}){let o={...{autoReconnect:!0,maxRetries:100,initialBackoffMs:1e3,maxBackoffMs:6e4},...r},n=new t("client",e);return n.clientOptions=o,n.serverUrl=a,n.currentBackoff=o.initialBackoffMs,await n.connect(),n}static{this.useWindowLocationOriginUrl=()=>pn.Smarturl.createFromUrl(globalThis.location.origin).toString()}static fromSmartServe(e,a){let r=new Map;t.registerTagHandlers(a);let s=new t("server",a);return s.smartServeRef=e,s.smartServeConnectionWrappers=r,s}static registerTagHandlers(e){e.addTypedHandler(new Nr.TypedHandler("__typedsocket_setTag",async(a,r)=>{let s=r?.localData?.peer;return s?(s.tags.add(a.name),s.data.set(`${bJe}${a.name}`,a.payload),{success:!0}):(console.warn("setTag: No peer found in request context"),{success:!1})})),e.addTypedHandler(new Nr.TypedHandler("__typedsocket_removeTag",async(a,r)=>{let s=r?.localData?.peer;return s?(s.tags.delete(a.name),s.data.delete(`${bJe}${a.name}`),{success:!0}):(console.warn("removeTag: No peer found in request context"),{success:!1})}))}constructor(e,a){this.statusSubject=new Ma.rxjs.Subject,this.connectionStatus="new",this.websocket=null,this.clientOptions=null,this.serverUrl="",this.retryCount=0,this.currentBackoff=1e3,this.pendingRequests=new Map,this.smartServeRef=null,this.smartServeConnectionWrappers=new Map,this.side=e,this.typedrouter=a}async connect(){let e=ft.defer();this.updateStatus("connecting");let a=this.toWebSocketUrl(this.serverUrl);console.log(`TypedSocket connecting to ${a}...`),this.websocket=new WebSocket(a);let r=setTimeout(()=>{this.connectionStatus!=="connected"&&(console.warn("TypedSocket connection timeout"),this.websocket?.close(),e.reject(new Error("Connection timeout")))},1e4);this.websocket.onopen=()=>{clearTimeout(r),console.log("TypedSocket connected!"),this.updateStatus("connected"),this.retryCount=0,this.currentBackoff=this.clientOptions?.initialBackoffMs??1e3,e.resolve()},this.websocket.onmessage=async s=>{await this.handleMessage(s.data)},this.websocket.onclose=()=>{clearTimeout(r),this.handleDisconnect()},this.websocket.onerror=s=>{console.error("TypedSocket WebSocket error:",s)};try{await e.promise}catch(s){if(clearTimeout(r),this.clientOptions?.autoReconnect)await this.scheduleReconnect();else throw s}}toWebSocketUrl(e){let a=new URL(e);return`${a.protocol==="https:"?"wss:":"ws:"}//${a.host}${a.pathname}`}async handleMessage(e){try{let a=typeof e=="string"?e:new TextDecoder().decode(e),r=So.parse(a);if(r.correlation?.id&&this.pendingRequests.has(r.correlation.id)){let o=this.pendingRequests.get(r.correlation.id);this.pendingRequests.delete(r.correlation.id),o.resolve(r);return}let s=await this.typedrouter.routeAndAddResponse(r);s&&this.websocket?.readyState===WebSocket.OPEN&&this.websocket.send(So.stringify(s))}catch(a){console.error("TypedSocket failed to process message:",a)}}handleDisconnect(){if(this.connectionStatus!=="disconnected"){this.updateStatus("disconnected");for(let[e,a]of this.pendingRequests)a.reject(new Error("TypedSocket disconnected"));this.pendingRequests.clear(),this.clientOptions?.autoReconnect&&this.retryCount<this.clientOptions.maxRetries&&this.scheduleReconnect()}}async scheduleReconnect(){if(!this.clientOptions)return;this.updateStatus("reconnecting"),this.retryCount++;let e=this.currentBackoff*.2*(Math.random()*2-1),a=Math.min(this.currentBackoff+e,this.clientOptions.maxBackoffMs);console.log(`TypedSocket reconnecting in ${Math.round(a)}ms (attempt ${this.retryCount}/${this.clientOptions.maxRetries})`),await Wt.delayFor(a),this.currentBackoff=Math.min(this.currentBackoff*2,this.clientOptions.maxBackoffMs);try{await this.connect()}catch(r){console.error("TypedSocket reconnection failed:",r)}}updateStatus(e){this.connectionStatus!==e&&(this.connectionStatus=e,this.statusSubject.next(e))}async sendRequest(e){if(!this.websocket||this.websocket.readyState!==WebSocket.OPEN)throw new Error("WebSocket not connected");return new Promise((a,r)=>{let s=setTimeout(()=>{this.pendingRequests.delete(e.correlation.id),r(new Error("Request timeout"))},3e4);this.pendingRequests.set(e.correlation.id,{resolve:i(o=>{clearTimeout(s),a(o)},"resolve"),reject:i(o=>{clearTimeout(s),r(o)},"reject")}),this.websocket.send(So.stringify(e))})}createTypedRequest(e,a){let r=i(async s=>{if(this.side==="client")return this.sendRequest(s);if(!this.smartServeRef)throw new Error("Server not initialized");let o=a;if(!o){let l=this.smartServeRef.getWebSocketConnections();if(l.length===1){let c=l[0];o=this.getOrCreateWrapper(c)}else throw l.length===0?new Error("No WebSocket connections available"):new Error("Multiple connections available - specify targetConnection")}let n=await this.typedrouter.fireEventInterestMap.addInterest(s.correlation.id,s);return o.peer.send(So.stringify(s)),await n.interestFullfilled},"postMethod");return new Nr.TypedRequest(new Nr.TypedTarget({postMethod:r}),e)}getStatus(){return this.connectionStatus}async stop(){this.side==="client"?(this.clientOptions&&(this.clientOptions.autoReconnect=!1),this.websocket&&(this.websocket.close(),this.websocket=null),this.pendingRequests.clear()):this.smartServeConnectionWrappers.clear()}async setTag(e,a){if(this.side!=="client")throw new Error("setTag is only available on clients");if(!(await this.createTypedRequest("__typedsocket_setTag").fire({name:e,payload:a})).success)throw new Error("Failed to set tag on server")}async removeTag(e){if(this.side!=="client")throw new Error("removeTag is only available on clients");if(!(await this.createTypedRequest("__typedsocket_removeTag").fire({name:e})).success)throw new Error("Failed to remove tag on server")}getOrCreateWrapper(e){let a=this.smartServeConnectionWrappers.get(e.id);return a||(a=aVa(e),this.smartServeConnectionWrappers.set(e.id,a)),a}async findAllTargetConnections(e){if(this.side!=="server"||!this.smartServeRef)throw new Error("findAllTargetConnections is only available on servers");let a=[];for(let r of this.smartServeRef.getWebSocketConnections()){let s=this.getOrCreateWrapper(r);await e(s)&&a.push(s)}return a}async findTargetConnection(e){return(await this.findAllTargetConnections(e))[0]}async findAllTargetConnectionsByTag(e,a){if(this.side!=="server"||!this.smartServeRef)throw new Error("findAllTargetConnectionsByTag is only available on servers");let r=this.smartServeRef.getWebSocketConnectionsByTag(e),s=[];for(let o of r){let n=this.getOrCreateWrapper(o);if(a!==void 0){let l=await n.getTagById(e);if(So.stringify(l?.payload)!==So.stringify(a))continue}s.push(n)}return s}async findTargetConnectionByTag(e,a){return(await this.findAllTargetConnectionsByTag(e,a))[0]}};le();Tt();var Bie=Bi(cha(),1),Xe=At;U4();var HJe={};pt(HJe,{DCROUTER_BUILTIN_PROVIDER_ID:()=>ZVa,dnsProviderTypeDescriptors:()=>dha,getDnsProviderTypeDescriptor:()=>XVa});var ZVa="__dcrouter__",dha=[{type:"dcrouter",displayName:"DcRouter (built-in)",description:"Built-in authoritative DNS. Records are served directly by dcrouter \u2014 delegate the domain's NS records to make this effective.",credentialFields:[]},{type:"cloudflare",displayName:"Cloudflare",description:"External DNS provider. The provider stays authoritative; dcrouter pushes record changes via its API.",credentialFields:[{key:"apiToken",label:"API Token",helpText:"A Cloudflare API token with Zone:Read and DNS:Edit permissions for the target zones.",required:!0,secret:!0}]}];function XVa(t){return dha.find(e=>e.type===t)}i(XVa,"getDnsProviderTypeDescriptor");var uha={};var fs=new Xe.plugins.smartstate.Smartstate,Ia=await fs.getStatePart("login",{identity:null,isLoggedIn:!1},"persistent"),nr=await fs.getStatePart("stats",{serverStats:null,emailStats:null,dnsStats:null,securityMetrics:null,radiusStats:null,vpnStats:null,lastUpdated:0,isLoading:!1,error:null},"soft"),g4=await fs.getStatePart("config",{config:null,isLoading:!1,error:null}),QVa=i(()=>{let t=typeof window<"u"?window.location.pathname:"/",e=["overview","network","email","logs","access","security","domains"],r=t.split("/").filter(Boolean)[0];return e.includes(r)?r:"overview"},"getInitialView"),JVa=i(()=>(typeof window<"u"?window.location.pathname:"/").split("/").filter(Boolean)[1]??null,"getInitialSubview"),Os=await fs.getStatePart("ui",{activeView:QVa(),activeSubview:JVa(),sidebarCollapsed:!1,autoRefresh:!0,refreshInterval:1e3,theme:"light"}),pc=await fs.getStatePart("logs",{recentLogs:[],isStreaming:!1,filters:{}},"soft"),m4=await fs.getStatePart("network",{connections:[],connectionsByIP:{},throughputRate:{bytesInPerSecond:0,bytesOutPerSecond:0},totalBytes:{in:0,out:0},topIPs:[],topIPsByBandwidth:[],throughputByIP:[],domainActivity:[],throughputHistory:[],requestsPerSecond:0,requestsTotal:0,backends:[],frontendProtocols:null,backendProtocols:null,lastUpdated:0,isLoading:!1,error:null},"soft"),Hie=await fs.getStatePart("emailOps",{emails:[],isLoading:!1,error:null,lastUpdated:0},"soft"),Ao=await fs.getStatePart("certificates",{certificates:[],summary:{total:0,valid:0,expiring:0,expired:0,failed:0,unknown:0},isLoading:!1,error:null,lastUpdated:0},"soft"),T5=await fs.getStatePart("acmeConfig",{config:null,isLoading:!1,error:null,lastUpdated:0},"soft"),Ri=await fs.getStatePart("remoteIngress",{edges:[],statuses:[],selectedEdgeId:null,newEdgeId:null,isLoading:!1,error:null,lastUpdated:0},"soft"),Fa=await fs.getStatePart("routeManagement",{mergedRoutes:[],warnings:[],apiTokens:[],isLoading:!1,error:null,lastUpdated:0},"soft"),GW=await fs.getStatePart("users",{users:[],isLoading:!1,error:null,lastUpdated:0},"soft"),ut=i(()=>{let t=Ia.getState().identity;return t&&t.expiresAt&&t.expiresAt<Date.now()?{identity:null}:{identity:t}},"getActionContext"),bha=Ia.createAction(async(t,e)=>{let a=new Xe.plugins.typedrequest.TypedRequest("/typedrequest","adminLoginWithUsernameAndPassword");try{let r=await a.fire({username:e.username,password:e.password});return r.identity?{identity:r.identity,isLoggedIn:!0}:t.getState()}catch(r){return console.error("Login failed:",r),t.getState()}}),Ym=Ia.createAction(async t=>{let e=ut();if(e.identity){let a=new Xe.plugins.typedrequest.TypedRequest("/typedrequest","adminLogout");try{await a.fire({identity:e.identity})}catch(r){console.error("Logout error:",r)}}return{identity:null,isLoggedIn:!1}}),Km=nr.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let s=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getCombinedMetrics").fire({identity:e.identity,sections:{server:!0,email:!0,dns:!0,security:!0,network:!1,radius:!0,vpn:!0}});return{serverStats:s.metrics.server||a.serverStats,emailStats:s.metrics.email||a.emailStats,dnsStats:s.metrics.dns||a.dnsStats,securityMetrics:s.metrics.security||a.securityMetrics,radiusStats:s.metrics.radius||a.radiusStats,vpnStats:s.metrics.vpn||a.vpnStats,lastUpdated:Date.now(),isLoading:!1,error:null}}catch(r){return{...a,isLoading:!1,error:r.message||"Failed to fetch statistics"}}}),Vie=g4.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{return{config:(await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getConfiguration").fire({identity:e.identity})).config,isLoading:!1,error:null}}catch(r){return{...a,isLoading:!1,error:r.message||"Failed to fetch configuration"}}}),jie=pc.createAction(async(t,e)=>{let a=ut();if(!a.identity)return t.getState();let s=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getRecentLogs").fire({identity:a.identity,limit:e.limit||100,level:e.level,category:e.category});return{...t.getState(),recentLogs:s.logs}}),Bmo=Os.createAction(async t=>{let e=t.getState();return{...e,autoRefresh:!e.autoRefresh}}),qmo=Os.createAction(async(t,e)=>{let a=t.getState();return e==="network"&&a.activeView!=="network"&&setTimeout(()=>{m4.dispatchAction(GJe,null)},100),e==="domains"&&a.activeView!=="domains"&&setTimeout(()=>{Ao.dispatchAction(h4,null)},100),{...a,activeView:e}}),GJe=m4.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let s=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getNetworkStats").fire({identity:e.identity}),o={},n=new Map;for(let c of s.throughputByIP||[])n.set(c.ip,{in:c.in,out:c.out});return s.connectionsByIP&&Array.isArray(s.connectionsByIP)&&s.connectionsByIP.forEach(c=>{o[c.ip]=c.count}),{connections:Object.entries(o).map(([c,d])=>{let u=n.get(c);return{id:`ip-${c}`,remoteAddress:c,localAddress:"server",startTime:0,protocol:"https",state:"connected",bytesReceived:u?.in||0,bytesSent:u?.out||0,connectionCount:d}}),connectionsByIP:o,throughputRate:s.throughputRate||{bytesInPerSecond:0,bytesOutPerSecond:0},totalBytes:s.totalDataTransferred?{in:s.totalDataTransferred.bytesIn,out:s.totalDataTransferred.bytesOut}:{in:0,out:0},topIPs:s.topIPs||[],topIPsByBandwidth:s.topIPsByBandwidth||[],throughputByIP:s.throughputByIP||[],domainActivity:s.domainActivity||[],throughputHistory:s.throughputHistory||[],requestsPerSecond:s.requestsPerSecond||0,requestsTotal:s.requestsTotal||0,backends:s.backends||[],frontendProtocols:s.frontendProtocols||null,backendProtocols:s.backendProtocols||null,lastUpdated:Date.now(),isLoading:!1,error:null}}catch(r){return console.error("Failed to fetch network stats:",r),{...a,isLoading:!1,error:r instanceof Error?r.message:"Failed to fetch network stats"}}}),vha=Hie.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{return{emails:(await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getAllEmails").fire({identity:e.identity})).emails,isLoading:!1,error:null,lastUpdated:Date.now()}}catch(r){return{...a,isLoading:!1,error:r instanceof Error?r.message:"Failed to fetch emails"}}}),h4=Ao.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let s=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getCertificateOverview").fire({identity:e.identity});return{certificates:s.certificates,summary:s.summary,isLoading:!1,error:null,lastUpdated:Date.now()}}catch(r){return{...a,isLoading:!1,error:r instanceof Error?r.message:"Failed to fetch certificate overview"}}}),xha=Ao.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","reprovisionCertificateDomain").fire({identity:r.identity,domain:e.domain,forceRenew:e.forceRenew}),await a.dispatch(h4,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to reprovision certificate"}}}),yha=Ao.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","deleteCertificate").fire({identity:r.identity,domain:e}),await a.dispatch(h4,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to delete certificate"}}}),wha=Ao.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","importCertificate").fire({identity:r.identity,cert:e}),await a.dispatch(h4,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to import certificate"}}});async function Mha(t){let e=ut();return new Xe.plugins.typedrequest.TypedRequest("/typedrequest","exportCertificate").fire({identity:e.identity,domain:t})}i(Mha,"fetchCertificateExport");async function YJe(t){let e=ut();return new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getRemoteIngressConnectionToken").fire({identity:e.identity,edgeId:t})}i(YJe,"fetchConnectionToken");var S5=Ri.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let r=new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getRemoteIngresses"),s=new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getRemoteIngressStatus"),[o,n]=await Promise.all([r.fire({identity:e.identity}),s.fire({identity:e.identity})]);return{...a,edges:o.edges,statuses:n.statuses,isLoading:!1,error:null,lastUpdated:Date.now()}}catch(r){return{...a,isLoading:!1,error:r instanceof Error?r.message:"Failed to fetch remote ingress data"}}}),kha=Ri.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{let n=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","createRemoteIngress").fire({identity:r.identity,name:e.name,listenPorts:e.listenPorts,autoDerivePorts:e.autoDerivePorts,tags:e.tags});return n.success?(await a.dispatch(S5,null),{...t.getState(),newEdgeId:n.edge.id}):s}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to create edge"}}}),Sha=Ri.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","deleteRemoteIngress").fire({identity:r.identity,id:e}),await a.dispatch(S5,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to delete edge"}}}),Cha=Ri.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","updateRemoteIngress").fire({identity:r.identity,id:e.id,name:e.name,listenPorts:e.listenPorts,autoDerivePorts:e.autoDerivePorts,tags:e.tags}),await a.dispatch(S5,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to update edge"}}}),zha=Ri.createAction(async(t,e)=>{let a=ut(),r=t.getState();try{return(await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","regenerateRemoteIngressSecret").fire({identity:a.identity,id:e})).success?{...r,newEdgeId:e}:r}catch(s){return{...r,error:s instanceof Error?s.message:"Failed to regenerate secret"}}}),Tha=Ri.createAction(async t=>({...t.getState(),newEdgeId:null})),KJe=Ri.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","updateRemoteIngress").fire({identity:r.identity,id:e.id,enabled:e.enabled}),await a.dispatch(S5,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to toggle edge"}}}),Fi=await fs.getStatePart("vpn",{clients:[],connectedClients:[],status:null,isLoading:!1,error:null,lastUpdated:0,newClientConfig:null},"soft"),C5=Fi.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let r=new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getVpnClients"),s=new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getVpnStatus"),o=new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getVpnConnectedClients"),[n,l,c]=await Promise.all([r.fire({identity:e.identity}),s.fire({identity:e.identity}),o.fire({identity:e.identity})]);return{...a,clients:n.clients,connectedClients:c.connectedClients,status:l.status,isLoading:!1,error:null,lastUpdated:Date.now()}}catch(r){return{...a,isLoading:!1,error:r instanceof Error?r.message:"Failed to fetch VPN data"}}}),_ha=Fi.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{let n=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","createVpnClient").fire({identity:r.identity,clientId:e.clientId,targetProfileIds:e.targetProfileIds,description:e.description,destinationAllowList:e.destinationAllowList,destinationBlockList:e.destinationBlockList,useHostIp:e.useHostIp,useDhcp:e.useDhcp,staticIp:e.staticIp,forceVlan:e.forceVlan,vlanId:e.vlanId});return n.success?{...await a.dispatch(C5,null),newClientConfig:n.wireguardConfig||null}:{...s,error:n.message||"Failed to create client"}}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to create VPN client"}}}),Lha=Fi.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","deleteVpnClient").fire({identity:r.identity,clientId:e}),await a.dispatch(C5,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to delete VPN client"}}}),ZJe=Fi.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{let o=e.enabled?"enableVpnClient":"disableVpnClient";return await new Xe.plugins.typedrequest.TypedRequest("/typedrequest",o).fire({identity:r.identity,clientId:e.clientId}),await a.dispatch(C5,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to toggle VPN client"}}}),$ha=Fi.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{let n=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","updateVpnClient").fire({identity:r.identity,clientId:e.clientId,description:e.description,targetProfileIds:e.targetProfileIds,destinationAllowList:e.destinationAllowList,destinationBlockList:e.destinationBlockList,useHostIp:e.useHostIp,useDhcp:e.useDhcp,staticIp:e.staticIp,forceVlan:e.forceVlan,vlanId:e.vlanId});return n.success?await a.dispatch(C5,null):{...s,error:n.message||"Failed to update client"}}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to update VPN client"}}}),Dha=Fi.createAction(async t=>({...t.getState(),newClientConfig:null})),Oi=await fs.getStatePart("targetProfiles",{profiles:[],isLoading:!1,error:null,lastUpdated:0},"soft"),fc=Oi.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{return{profiles:(await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getTargetProfiles").fire({identity:e.identity})).profiles,isLoading:!1,error:null,lastUpdated:Date.now()}}catch(r){return{...a,isLoading:!1,error:r instanceof Error?r.message:"Failed to fetch target profiles"}}}),Aha=Oi.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","createTargetProfile").fire({identity:r.identity,name:e.name,description:e.description,domains:e.domains,targets:e.targets,routeRefs:e.routeRefs});return o.success?await a.dispatch(fc,null):{...t.getState(),error:o.message||"Failed to create target profile"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to create target profile"}}}),Iha=Oi.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","updateTargetProfile").fire({identity:r.identity,id:e.id,name:e.name,description:e.description,domains:e.domains,targets:e.targets,routeRefs:e.routeRefs});return o.success?await a.dispatch(fc,null):{...t.getState(),error:o.message||"Failed to update target profile"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to update target profile"}}}),XJe=Oi.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","deleteTargetProfile").fire({identity:r.identity,id:e.id,force:e.force});return o.success?await a.dispatch(fc,null):{...t.getState(),error:o.message||"Failed to delete target profile"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to delete target profile"}}}),Ua=await fs.getStatePart("profilesTargets",{profiles:[],targets:[],isLoading:!1,error:null,lastUpdated:0},"soft"),Io=Ua.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let r=new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getSourceProfiles"),s=new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getNetworkTargets"),[o,n]=await Promise.all([r.fire({identity:e.identity}),s.fire({identity:e.identity})]);return{profiles:o.profiles,targets:n.targets,isLoading:!1,error:null,lastUpdated:Date.now()}}catch(r){return{...a,isLoading:!1,error:r instanceof Error?r.message:"Failed to fetch profiles/targets"}}}),Pha=Ua.createAction(async(t,e,a)=>{let r=ut();try{return await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","createSourceProfile").fire({identity:r.identity,name:e.name,description:e.description,security:e.security,extendsProfiles:e.extendsProfiles}),await a.dispatch(Io,null)}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to create profile"}}}),Eha=Ua.createAction(async(t,e,a)=>{let r=ut();try{return await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","updateSourceProfile").fire({identity:r.identity,id:e.id,name:e.name,description:e.description,security:e.security,extendsProfiles:e.extendsProfiles}),await a.dispatch(Io,null)}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to update profile"}}}),QJe=Ua.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","deleteSourceProfile").fire({identity:r.identity,id:e.id,force:e.force});return o.success?await a.dispatch(Io,null):{...t.getState(),error:o.message||"Failed to delete profile"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to delete profile"}}}),Nha=Ua.createAction(async(t,e,a)=>{let r=ut();try{return await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","createNetworkTarget").fire({identity:r.identity,name:e.name,description:e.description,host:e.host,port:e.port}),await a.dispatch(Io,null)}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to create target"}}}),Rha=Ua.createAction(async(t,e,a)=>{let r=ut();try{return await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","updateNetworkTarget").fire({identity:r.identity,id:e.id,name:e.name,description:e.description,host:e.host,port:e.port}),await a.dispatch(Io,null)}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to update target"}}}),JJe=Ua.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","deleteNetworkTarget").fire({identity:r.identity,id:e.id,force:e.force});return o.success?await a.dispatch(Io,null):{...t.getState(),error:o.message||"Failed to delete target"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to delete target"}}}),Bt=await fs.getStatePart("domains",{providers:[],domains:[],records:[],selectedDomainId:null,isLoading:!1,error:null,lastUpdated:0},"soft"),Ni=Bt.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let r=new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getDnsProviders"),s=new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getDomains"),[o,n]=await Promise.all([r.fire({identity:e.identity}),s.fire({identity:e.identity})]);return{...a,providers:o.providers,domains:n.domains,isLoading:!1,error:null,lastUpdated:Date.now()}}catch(r){return{...a,isLoading:!1,error:r instanceof Error?r.message:"Failed to fetch domains/providers"}}}),hc=Bt.createAction(async(t,e)=>{let a=ut(),r=t.getState();if(!a.identity)return r;try{let o=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getDnsRecords").fire({identity:a.identity,domainId:e.domainId});return{...r,records:o.records,selectedDomainId:e.domainId,error:null}}catch(s){return{...r,error:s instanceof Error?s.message:"Failed to fetch DNS records"}}}),Fha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","createDnsProvider").fire({identity:r.identity,name:e.name,type:e.type,credentials:e.credentials});return o.success?await a.dispatch(Ni,null):{...t.getState(),error:o.message||"Failed to create provider"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to create provider"}}}),Oha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","updateDnsProvider").fire({identity:r.identity,id:e.id,name:e.name,credentials:e.credentials});return o.success?await a.dispatch(Ni,null):{...t.getState(),error:o.message||"Failed to update provider"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to update provider"}}}),Bha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","deleteDnsProvider").fire({identity:r.identity,id:e.id,force:e.force});return o.success?await a.dispatch(Ni,null):{...t.getState(),error:o.message||"Failed to delete provider"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to delete provider"}}}),qha=Bt.createAction(async(t,e,a)=>{let r=ut();try{return await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","testDnsProvider").fire({identity:r.identity,id:e.id}),await a.dispatch(Ni,null)}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to test provider"}}});async function Hha(t){let e=ut();return e.identity?await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","listProviderDomains").fire({identity:e.identity,providerId:t}):{success:!1,message:"Not authenticated"}}i(Hha,"fetchProviderDomains");var Vha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","createDomain").fire({identity:r.identity,name:e.name,description:e.description});return o.success?await a.dispatch(Ni,null):{...t.getState(),error:o.message||"Failed to create domain"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to create domain"}}}),jha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","importDomain").fire({identity:r.identity,providerId:e.providerId,domainNames:e.domainNames});return o.success?await a.dispatch(Ni,null):{...t.getState(),error:o.message||"Failed to import domains"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to import domains"}}}),Uha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","deleteDomain").fire({identity:r.identity,id:e.id});return o.success?await a.dispatch(Ni,null):{...t.getState(),error:o.message||"Failed to delete domain"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to delete domain"}}}),Wha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","syncDomain").fire({identity:r.identity,id:e.id});return o.success?await a.dispatch(Ni,null):{...t.getState(),error:o.message||"Failed to sync domain"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to sync domain"}}}),Gha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","migrateDomain").fire({identity:r.identity,...e});return o.success?await a.dispatch(Ni,null):{...t.getState(),error:o.message||"Migration failed"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Migration failed"}}}),Yha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","createDnsRecord").fire({identity:r.identity,domainId:e.domainId,name:e.name,type:e.type,value:e.value,ttl:e.ttl,proxied:e.proxied});return o.success?await a.dispatch(hc,{domainId:e.domainId}):{...t.getState(),error:o.message||"Failed to create record"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to create record"}}}),Kha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","updateDnsRecord").fire({identity:r.identity,id:e.id,name:e.name,value:e.value,ttl:e.ttl,proxied:e.proxied});return o.success?await a.dispatch(hc,{domainId:e.domainId}):{...t.getState(),error:o.message||"Failed to update record"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to update record"}}}),Zha=Bt.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","deleteDnsRecord").fire({identity:r.identity,id:e.id});return o.success?await a.dispatch(hc,{domainId:e.domainId}):{...t.getState(),error:o.message||"Failed to delete record"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to delete record"}}}),eet=T5.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{return{config:(await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getAcmeConfig").fire({identity:e.identity})).config,isLoading:!1,error:null,lastUpdated:Date.now()}}catch(r){return{...a,isLoading:!1,error:r instanceof Error?r.message:"Failed to fetch ACME config"}}}),Xha=T5.createAction(async(t,e,a)=>{let r=ut();try{let o=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","updateAcmeConfig").fire({identity:r.identity,accountEmail:e.accountEmail,enabled:e.enabled,useProduction:e.useProduction,autoRenew:e.autoRenew,renewThresholdDays:e.renewThresholdDays});return o.success?await a.dispatch(eet,null):{...t.getState(),error:o.message||"Failed to update ACME config"}}catch(s){return{...t.getState(),error:s instanceof Error?s.message:"Failed to update ACME config"}}}),E2=Fa.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let s=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getMergedRoutes").fire({identity:e.identity});return{...a,mergedRoutes:s.routes,warnings:s.warnings,isLoading:!1,error:null,lastUpdated:Date.now()}}catch(r){return{...a,isLoading:!1,error:r instanceof Error?r.message:"Failed to fetch routes"}}}),Qha=Fa.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","createRoute").fire({identity:r.identity,route:e.route,enabled:e.enabled,metadata:e.metadata}),await a.dispatch(E2,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to create route"}}}),Jha=Fa.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{let n=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","updateRoute").fire({identity:r.identity,id:e.id,route:e.route,enabled:e.enabled,metadata:e.metadata});if(!n.success)throw new Error(n.message||"Failed to update route");return await a.dispatch(E2,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to update route"}}}),tet=Fa.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{let n=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","deleteRoute").fire({identity:r.identity,id:e});if(!n.success)throw new Error(n.message||"Failed to delete route");return await a.dispatch(E2,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to delete route"}}}),e8a=Fa.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{let n=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","toggleRoute").fire({identity:r.identity,id:e.id,enabled:e.enabled});if(!n.success)throw new Error(n.message||"Failed to toggle route");return await a.dispatch(E2,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to toggle route"}}}),_5=Fa.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let s=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","listApiTokens").fire({identity:e.identity});return{...a,apiTokens:s.tokens}}catch(r){return{...a,error:r instanceof Error?r.message:"Failed to fetch tokens"}}}),aet=GW.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let s=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","listUsers").fire({identity:e.identity});return{...a,users:s.users,error:null,lastUpdated:Date.now()}}catch(r){return{...a,error:r instanceof Error?r.message:"Failed to fetch users"}}});async function t8a(t,e,a){let r=ut();return new Xe.plugins.typedrequest.TypedRequest("/typedrequest","createApiToken").fire({identity:r.identity,name:t,scopes:e,expiresInDays:a})}i(t8a,"createApiToken");async function a8a(t){let e=ut();return new Xe.plugins.typedrequest.TypedRequest("/typedrequest","rollApiToken").fire({identity:e.identity,id:t})}i(a8a,"rollApiToken");var r8a=Fa.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","revokeApiToken").fire({identity:r.identity,id:e}),await a.dispatch(_5,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to revoke token"}}}),ret=Fa.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","toggleApiToken").fire({identity:r.identity,id:e.id,enabled:e.enabled}),await a.dispatch(_5,null)}catch(o){return{...s,error:o instanceof Error?o.message:"Failed to toggle token"}}}),fo=await fs.getStatePart("emailDomains",{domains:[],isLoading:!1,lastUpdated:0},"soft"),z5=fo.createAction(async t=>{let e=ut(),a=t.getState();if(!e.identity)return a;try{let s=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getEmailDomains").fire({identity:e.identity});return{...a,domains:s.domains,isLoading:!1,lastUpdated:Date.now()}}catch{return{...a,isLoading:!1}}}),i8a=fo.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","createEmailDomain").fire({identity:r.identity,...e}),await a.dispatch(z5,null)}catch{return s}}),s8a=fo.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","deleteEmailDomain").fire({identity:r.identity,id:e}),await a.dispatch(z5,null)}catch{return s}}),o8a=fo.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","validateEmailDomain").fire({identity:r.identity,id:e}),await a.dispatch(z5,null)}catch{return s}}),iet=fo.createAction(async(t,e,a)=>{let r=ut(),s=t.getState();try{return await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","provisionEmailDomainDns").fire({identity:r.identity,id:e}),await a.dispatch(z5,null)}catch{return s}});async function n8a(t){let e=ut();return new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getEmailDomainDnsRecords").fire({identity:e.identity,id:t})}i(n8a,"fetchEmailDomainDnsRecords");var M5=null,pha=new Xe.plugins.typedrequest.TypedRouter,qie=[],VJe=!1;function eja(){if(VJe=!1,qie.length===0)return;let t=pc.getState(),e=[...t.recentLogs,...qie];qie=[],e.length>2e3&&e.splice(0,e.length-2e3),pc.setState({...t,recentLogs:e})}i(eja,"flushLogEntries"),pha.addTypedHandler(new Xe.plugins.typedrequest.TypedHandler("pushLogEntry",async t=>(qie.push(t.entry),VJe||(VJe=!0,requestAnimationFrame(eja)),{})));async function jJe(){if(!M5)try{M5=await Hm.TypedSocket.createClient(pha,Hm.TypedSocket.useWindowLocationOriginUrl()),await M5.setTag("role","ops_dashboard")}catch(t){console.error("TypedSocket connection failed:",t),M5=null}}i(jJe,"connectSocket");async function fha(){if(M5){try{await M5.stop()}catch{}M5=null}}i(fha,"disconnectSocket");var UJe=!1;async function tja(){if(!UJe){UJe=!0;try{await aja()}finally{UJe=!1}}}i(tja,"dispatchCombinedRefreshAction");async function aja(){let t=ut();if(!t.identity)return;let e=Os.getState().activeView,a=Os.getState().activeSubview;try{let s=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getCombinedMetrics").fire({identity:t.identity,sections:{server:!0,email:!0,dns:!0,security:!0,network:e==="network"&&a==="activity",radius:!0,vpn:!0}}),o=nr.getState();if(nr.setState({...o,serverStats:s.metrics.server||o.serverStats,emailStats:s.metrics.email||o.emailStats,dnsStats:s.metrics.dns||o.dnsStats,securityMetrics:s.metrics.security||o.securityMetrics,radiusStats:s.metrics.radius||o.radiusStats,vpnStats:s.metrics.vpn||o.vpnStats,lastUpdated:Date.now(),isLoading:!1,error:null}),s.metrics.network&&e==="network"){let n=s.metrics.network,l={};n.connectionDetails.forEach(d=>{l[d.remoteAddress]=(l[d.remoteAddress]||0)+(d.connectionCount||1)});let c=n.connectionDetails.map((d,u)=>({id:`ip-${d.remoteAddress}`,remoteAddress:d.remoteAddress,localAddress:"server",startTime:d.startTime,protocol:d.protocol,state:d.state,bytesReceived:d.bytesIn,bytesSent:d.bytesOut,connectionCount:d.connectionCount}));m4.setState({...m4.getState(),connections:c,connectionsByIP:l,throughputRate:{bytesInPerSecond:n.totalBandwidth.in,bytesOutPerSecond:n.totalBandwidth.out},totalBytes:n.totalBytes||{in:0,out:0},topIPs:n.topEndpoints.map(d=>({ip:d.endpoint,count:d.connections})),topIPsByBandwidth:(n.topEndpointsByBandwidth||[]).map(d=>({ip:d.endpoint,count:d.connections,bwIn:d.bandwidth?.in||0,bwOut:d.bandwidth?.out||0})),throughputByIP:n.topEndpoints.map(d=>({ip:d.endpoint,in:d.bandwidth?.in||0,out:d.bandwidth?.out||0})),domainActivity:n.domainActivity||[],throughputHistory:n.throughputHistory||[],requestsPerSecond:n.requestsPerSecond||0,requestsTotal:n.requestsTotal||0,backends:n.backends||[],frontendProtocols:n.frontendProtocols||null,backendProtocols:n.backendProtocols||null,lastUpdated:Date.now(),isLoading:!1,error:null})}if(e==="domains"&&a==="certificates")try{await Ao.dispatchAction(h4,null)}catch(n){console.error("Certificate refresh failed:",n)}if(e==="network"&&a==="remoteingress")try{await Ri.dispatchAction(S5,null)}catch(n){console.error("Remote ingress refresh failed:",n)}if(e==="network"&&a==="vpn")try{await Fi.dispatchAction(C5,null)}catch(n){console.error("VPN refresh failed:",n)}}catch(r){console.error("Combined refresh failed:",r);let s=String(r);(s.includes("invalid")||s.includes("unauthorized")||s.includes("401"))&&(await Ia.dispatchAction(Ym,null),window.location.reload())}}i(aja,"dispatchCombinedRefreshActionInner");var rja=nr.createAction(async t=>(await tja(),t.getState())),k5=null,WJe=i(()=>{let t=Os.getState(),e=Ia.getState();t.autoRefresh&&e.isLoggedIn?(k5&&(k5.dispose(),k5=null),k5=nr.createScheduledAction({action:rja,payload:void 0,intervalMs:t.refreshInterval,autoPause:"visibility"})):k5&&(k5.dispose(),k5=null)},"startAutoRefresh"),hha=Os.getState().autoRefresh,mha=Os.getState().refreshInterval,gha=Ia.getState().isLoggedIn;Os.select(t=>({autoRefresh:t.autoRefresh,refreshInterval:t.refreshInterval})).subscribe(t=>{(t.autoRefresh!==hha||t.refreshInterval!==mha)&&(hha=t.autoRefresh,mha=t.refreshInterval,WJe())}),Ia.select(t=>t.isLoggedIn).subscribe(t=>{t!==gha&&(gha=t,WJe(),t?jJe():fha())}),document.addEventListener("visibilitychange",()=>{document.hidden?fha():Ia.getState().isLoggedIn&&jJe()}),WJe(),Ia.getState().isLoggedIn&&jJe();U4();var N2={};pt(N2,{DCROUTER_BUILTIN_PROVIDER_ID:()=>ija,dnsProviderTypeDescriptors:()=>l8a,getDnsProviderTypeDescriptor:()=>sja});var ija="__dcrouter__",l8a=[{type:"dcrouter",displayName:"DcRouter (built-in)",description:"Built-in authoritative DNS. Records are served directly by dcrouter \u2014 delegate the domain's NS records to make this effective.",credentialFields:[]},{type:"cloudflare",displayName:"Cloudflare",description:"External DNS provider. The provider stays authoritative; dcrouter pushes record changes via its API.",credentialFields:[{key:"apiToken",label:"API Token",helpText:"A Cloudflare API token with Zone:Read and DNS:Edit permissions for the target zones.",required:!0,secret:!0}]}];function sja(t){return l8a.find(e=>e.type===t)}i(sja,"getDnsProviderTypeDescriptor");var c8a={};var oja=Xe.plugins.smartrouter.SmartRouter,u8a=["logs"],Zm={overview:["stats","configuration"],network:["activity","routes","sourceprofiles","networktargets","targetprofiles","remoteingress","vpn"],email:["log","security","domains"],access:["apitokens","users"],security:["overview","blocked","authentication"],domains:["providers","domains","dns","certificates"]},set={overview:"stats",network:"activity",email:"log",access:"apitokens",security:"overview",domains:"domains"},nja=[...u8a,...Object.keys(Zm)];function p8a(t){return nja.includes(t)}i(p8a,"isValidView");function f8a(t,e){return Zm[t]?.includes(e)??!1}i(f8a,"isValidSubview");var oet=class{static{i(this,"AppRouter")}router;initialized=!1;suppressStateUpdate=!1;constructor(){this.router=new oja({debug:!1})}init(){this.initialized||(this.setupRoutes(),this.setupStateSync(),this.handleInitialRoute(),this.initialized=!0)}setupRoutes(){for(let e of u8a)this.router.on(`/${e}`,async()=>{this.updateViewState(e,null)});for(let e of Object.keys(Zm)){this.router.on(`/${e}`,async()=>{this.navigateTo(`/${e}/${set[e]}`)});for(let a of Zm[e])this.router.on(`/${e}/${a}`,async()=>{this.updateViewState(e,a)})}this.router.on("/",async()=>{this.navigateTo("/overview")})}setupStateSync(){Os.select().subscribe(e=>{if(this.suppressStateUpdate)return;let a=window.location.pathname,r=e.activeSubview?`/${e.activeView}/${e.activeSubview}`:`/${e.activeView}`;a!==r&&(this.suppressStateUpdate=!0,this.router.pushUrl(r),this.suppressStateUpdate=!1)})}handleInitialRoute(){let e=window.location.pathname;if(!e||e==="/"){this.router.pushUrl("/overview");return}let a=e.split("/").filter(Boolean),r=a[0],s=a[1];if(!p8a(r)){this.router.pushUrl("/overview");return}Zm[r]?s&&f8a(r,s)?this.updateViewState(r,s):this.router.pushUrl(`/${r}/${set[r]}`):this.updateViewState(r,null)}updateViewState(e,a){this.suppressStateUpdate=!0;let r=Os.getState();(r.activeView!==e||r.activeSubview!==a)&&Os.setState({...r,activeView:e,activeSubview:a}),this.suppressStateUpdate=!1}navigateTo(e){this.router.pushUrl(e)}navigateToView(e,a){if(!p8a(e)){this.navigateTo("/overview");return}a&&f8a(e,a)?this.navigateTo(`/${e}/${a}`):Zm[e]?this.navigateTo(`/${e}/${set[e]}`):this.navigateTo(`/${e}`)}getCurrentView(){return Os.getState().activeView}destroy(){this.router.destroy(),this.initialized=!1}},mc=new oet;le();var Yt=W`
42462
42462
  :host {
42463
42463
  display: block;
42464
42464
  margin: auto;
@@ -42676,7 +42676,7 @@ Customer Support Team`}};async onActivate(b){this.appui=b.appui,this.appui.setCo
42676
42676
  color: ${h.bdTheme("#dc2626","#ef4444")};
42677
42677
  margin: 16px 0;
42678
42678
  }
42679
- `]),Ee(Qm,1,v4);var Yie=v4;le();var S8a,C8a,z8a,T8a,_8a,L8a,ho,pet,fet,het,met;L8a=[ie("ops-view-network-activity")];var Ur=class Ur extends(_8a=ne,T8a=[G()],z8a=[G()],C8a=[G()],S8a=[G()],_8a){constructor(){super();ht(this,pet,Ee(ho,8,this,nr.getState())),Ee(ho,11,this);ht(this,fet,Ee(ho,12,this,m4.getState())),Ee(ho,15,this);ht(this,het,Ee(ho,16,this,[])),Ee(ho,19,this);ht(this,met,Ee(ho,20,this,[])),Ee(ho,23,this);Mt(this,"lastChartUpdate",0);Mt(this,"chartUpdateThreshold",Ur.UPDATE_INTERVAL_MS);Mt(this,"trafficUpdateTimer",null);Mt(this,"requestsPerSecHistory",[]);Mt(this,"historyLoaded",!1);Mt(this,"visibilityHandler",null);this.subscribeToStateParts(),this.initializeTrafficData(),this.updateNetworkData(),this.startTrafficUpdateTimer()}async connectedCallback(){await super.connectedCallback(),this.visibilityHandler=()=>{document.hidden?this.stopTrafficUpdateTimer():this.startTrafficUpdateTimer()},document.addEventListener("visibilitychange",this.visibilityHandler),await m4.dispatchAction(GJe,null)}async disconnectedCallback(){await super.disconnectedCallback(),this.stopTrafficUpdateTimer(),this.visibilityHandler&&(document.removeEventListener("visibilitychange",this.visibilityHandler),this.visibilityHandler=null)}subscribeToStateParts(){let a=nr.select().subscribe(s=>{this.statsState=s,this.updateNetworkData()});this.rxSubscriptions.push(a);let r=m4.select().subscribe(s=>{this.networkState=s,this.updateNetworkData()});this.rxSubscriptions.push(r)}initializeTrafficData(){let a=Date.now(),{MAX_DATA_POINTS:r,UPDATE_INTERVAL_MS:s}=Ur,o=Array.from({length:r},(n,l)=>{let c=a-(r-1-l)*s;return{x:new Date(c).toISOString(),y:0}});this.trafficDataIn=[...o],this.trafficDataOut=o.map(n=>({...n}))}loadThroughputHistory(){let a=this.networkState.throughputHistory;if(!a||a.length===0)return;this.historyLoaded=!0;let r=a.map(c=>({x:new Date(c.timestamp).toISOString(),y:Math.round(c.in*8/1e6*10)/10})),s=a.map(c=>({x:new Date(c.timestamp).toISOString(),y:Math.round(c.out*8/1e6*10)/10})),{MAX_DATA_POINTS:o,UPDATE_INTERVAL_MS:n}=Ur,l=Math.max(0,r.length-o);if(this.trafficDataIn=r.slice(l),this.trafficDataOut=s.slice(l),this.trafficDataIn.length<o){let c=Date.now(),d=o-this.trafficDataIn.length,u=this.trafficDataIn.length>0?new Date(this.trafficDataIn[0].x).getTime():c,p=Array.from({length:d},(v,x)=>({x:new Date(u-(d-x)*n).toISOString(),y:0})),m=p.map(v=>({...v}));this.trafficDataIn=[...p,...this.trafficDataIn],this.trafficDataOut=[...m,...this.trafficDataOut]}}render(){return w`
42679
+ `]),Ee(Qm,1,v4);var Yie=v4;le();var S8a,C8a,z8a,T8a,_8a,L8a,ho,pet,fet,het,met;L8a=[ie("ops-view-network-activity")];var Ur=class Ur extends(_8a=ne,T8a=[G()],z8a=[G()],C8a=[G()],S8a=[G()],_8a){constructor(){super();ht(this,pet,Ee(ho,8,this,nr.getState())),Ee(ho,11,this);ht(this,fet,Ee(ho,12,this,m4.getState())),Ee(ho,15,this);ht(this,het,Ee(ho,16,this,[])),Ee(ho,19,this);ht(this,met,Ee(ho,20,this,[])),Ee(ho,23,this);Mt(this,"lastChartUpdate",0);Mt(this,"chartUpdateThreshold",Ur.UPDATE_INTERVAL_MS);Mt(this,"trafficUpdateTimer",null);Mt(this,"requestsPerSecHistory",[]);Mt(this,"historyLoaded",!1);Mt(this,"visibilityHandler",null);this.subscribeToStateParts(),this.initializeTrafficData(),this.updateNetworkData(),this.startTrafficUpdateTimer()}async connectedCallback(){await super.connectedCallback(),this.visibilityHandler=()=>{document.hidden?this.stopTrafficUpdateTimer():this.startTrafficUpdateTimer()},document.addEventListener("visibilitychange",this.visibilityHandler),await m4.dispatchAction(GJe,null)}async disconnectedCallback(){await super.disconnectedCallback(),this.stopTrafficUpdateTimer(),this.visibilityHandler&&(document.removeEventListener("visibilitychange",this.visibilityHandler),this.visibilityHandler=null)}subscribeToStateParts(){let a=nr.select().subscribe(s=>{this.statsState=s});this.rxSubscriptions.push(a);let r=m4.select().subscribe(s=>{this.networkState=s,this.updateNetworkData()});this.rxSubscriptions.push(r)}initializeTrafficData(){let a=Date.now(),{MAX_DATA_POINTS:r,UPDATE_INTERVAL_MS:s}=Ur,o=Array.from({length:r},(n,l)=>{let c=a-(r-1-l)*s;return{x:new Date(c).toISOString(),y:0}});this.trafficDataIn=[...o],this.trafficDataOut=o.map(n=>({...n}))}loadThroughputHistory(){let a=this.networkState.throughputHistory;if(!a||a.length===0)return;this.historyLoaded=!0;let r=a.map(c=>({x:new Date(c.timestamp).toISOString(),y:Math.round(c.in*8/1e6*10)/10})),s=a.map(c=>({x:new Date(c.timestamp).toISOString(),y:Math.round(c.out*8/1e6*10)/10})),{MAX_DATA_POINTS:o,UPDATE_INTERVAL_MS:n}=Ur,l=Math.max(0,r.length-o);if(this.trafficDataIn=r.slice(l),this.trafficDataOut=s.slice(l),this.trafficDataIn.length<o){let c=Date.now(),d=o-this.trafficDataIn.length,u=this.trafficDataIn.length>0?new Date(this.trafficDataIn[0].x).getTime():c,p=Array.from({length:d},(v,x)=>({x:new Date(u-(d-x)*n).toISOString(),y:0})),m=p.map(v=>({...v}));this.trafficDataIn=[...p,...this.trafficDataIn],this.trafficDataOut=[...m,...this.trafficDataOut]}}render(){return w`
42680
42680
  <dees-heading level="3">Network Activity</dees-heading>
42681
42681
 
42682
42682
  <div class="networkContainer">
@@ -42762,7 +42762,7 @@ Customer Support Team`}};async onActivate(b){this.appui=b.appui,this.appui.setCo
42762
42762
  .data=${this.networkState.domainActivity}
42763
42763
  .rowKey=${"domain"}
42764
42764
  .highlightUpdates=${"flash"}
42765
- .displayFunction=${a=>{let r=(a.bytesInPerSecond+a.bytesOutPerSecond)*60;return{Domain:a.domain,"Throughput In":this.formatBitsPerSecond(a.bytesInPerSecond),"Throughput Out":this.formatBitsPerSecond(a.bytesOutPerSecond),"Transferred / min":this.formatBytes(r),Connections:a.activeConnections,Requests:a.requestCount?.toLocaleString()??"0",Routes:a.routeCount}}}
42765
+ .displayFunction=${a=>{let r=(a.bytesInPerSecond+a.bytesOutPerSecond)*60;return{Domain:a.domain,"Throughput In":this.formatBitsPerSecond(a.bytesInPerSecond),"Throughput Out":this.formatBitsPerSecond(a.bytesOutPerSecond),"Transferred / min":this.formatBytes(r),Connections:a.activeConnections,"Req/s":a.requestsPerSecond!=null?a.requestsPerSecond.toFixed(1):"-","Req/min":a.requestsLastMinute!=null?a.requestsLastMinute.toFixed(0):"-",Requests:a.requestCount?.toLocaleString()??"0",Routes:a.routeCount}}}
42766
42766
  heading1="Domain Activity"
42767
42767
  heading2="Per-domain network activity from request-level metrics"
42768
42768
  searchable
@@ -42773,7 +42773,7 @@ Customer Support Team`}};async onActivate(b){this.appui=b.appui,this.appui.setCo
42773
42773
  `}renderBackendProtocols(){let a=this.networkState.backends;return!a||a.length===0?w``:w`
42774
42774
  <dees-table
42775
42775
  .data=${a}
42776
- .rowKey=${"backend"}
42776
+ .rowKey=${"id"}
42777
42777
  .highlightUpdates=${"flash"}
42778
42778
  .displayFunction=${r=>{let s=r.connectErrors+r.handshakeErrors+r.requestErrors,o=r.protocol.toLowerCase().replace(/[^a-z0-9]/g,"");return{Backend:r.backend,Domain:r.domain||"-",Protocol:w`
42779
42779
  <span class="protocolBadge ${o}">${r.protocol.toUpperCase()}</span>
@@ -42796,7 +42796,7 @@ Customer Support Team`}};async onActivate(b){this.appui=b.appui,this.appui.setCo
42796
42796
  .codeToDisplay=${JSON.stringify({backend:a.backend,domain:a.domain,protocol:a.protocol,activeConnections:a.activeConnections,totalConnections:a.totalConnections,avgConnectTimeMs:a.avgConnectTimeMs,poolHitRate:a.poolHitRate,errors:{connect:a.connectErrors,handshake:a.handshakeErrors,request:a.requestErrors,h2Failures:a.h2Failures},suppression:{h2Suppressed:a.h2Suppressed,h3Suppressed:a.h3Suppressed,h2CooldownRemainingSecs:a.h2CooldownRemainingSecs,h3CooldownRemainingSecs:a.h3CooldownRemainingSecs,h2ConsecutiveFailures:a.h2ConsecutiveFailures,h3ConsecutiveFailures:a.h3ConsecutiveFailures},h3Port:a.h3Port,cacheAgeSecs:a.cacheAgeSecs},null,2)}
42797
42797
  ></dees-dataview-codebox>
42798
42798
  </div>
42799
- `,menuOptions:[{name:"Copy Backend Key",iconName:"lucide:Copy",action:i(async()=>{await navigator.clipboard.writeText(a.backend)},"action")}]})}async updateNetworkData(){let a=this.networkState.requestsPerSecond||0;this.requestsPerSecHistory.push(a),this.requestsPerSecHistory.length>20&&this.requestsPerSecHistory.shift(),!this.historyLoaded&&this.networkState.throughputHistory&&this.networkState.throughputHistory.length>0&&this.loadThroughputHistory()}startTrafficUpdateTimer(){this.stopTrafficUpdateTimer(),this.trafficUpdateTimer=setInterval(()=>{this.addTrafficDataPoint()},Ur.UPDATE_INTERVAL_MS)}addTrafficDataPoint(){let a=Date.now();if(a-this.lastChartUpdate<this.chartUpdateThreshold)return;let r=this.calculateThroughput(),s=r.in*8/1e6,o=r.out*8/1e6,n=new Date(a).toISOString(),l={x:n,y:Math.round(s*10)/10},c={x:n,y:Math.round(o*10)/10};this.trafficDataIn.length>=Ur.MAX_DATA_POINTS&&(this.trafficDataIn.shift(),this.trafficDataOut.shift()),this.trafficDataIn=[...this.trafficDataIn,l],this.trafficDataOut=[...this.trafficDataOut,c],this.lastChartUpdate=a}stopTrafficUpdateTimer(){this.trafficUpdateTimer&&(clearInterval(this.trafficUpdateTimer),this.trafficUpdateTimer=null)}};ho=qt(_8a),pet=new WeakMap,fet=new WeakMap,het=new WeakMap,met=new WeakMap,Qe(ho,4,"statsState",T8a,Ur,pet),Qe(ho,4,"networkState",z8a,Ur,fet),Qe(ho,4,"trafficDataIn",C8a,Ur,het),Qe(ho,4,"trafficDataOut",S8a,Ur,met),Ur=Qe(ho,0,"OpsViewNetworkActivity",L8a,Ur),i(Ur,"OpsViewNetworkActivity"),Mt(Ur,"CHART_WINDOW_MS",300*1e3),Mt(Ur,"UPDATE_INTERVAL_MS",1e3),Mt(Ur,"MAX_DATA_POINTS",Ur.CHART_WINDOW_MS/Ur.UPDATE_INTERVAL_MS),Mt(Ur,"styles",[h.defaultStyles,Yt,W`
42799
+ `,menuOptions:[{name:"Copy Backend Key",iconName:"lucide:Copy",action:i(async()=>{await navigator.clipboard.writeText(a.backend)},"action")}]})}async updateNetworkData(){let a=this.networkState.requestsPerSecond||0;this.requestsPerSecHistory.push(a),this.requestsPerSecHistory.length>20&&this.requestsPerSecHistory.shift(),!this.historyLoaded&&this.networkState.throughputHistory&&this.networkState.throughputHistory.length>0&&this.loadThroughputHistory()}startTrafficUpdateTimer(){this.stopTrafficUpdateTimer(),this.trafficUpdateTimer=setInterval(()=>{this.addTrafficDataPoint()},Ur.UPDATE_INTERVAL_MS)}addTrafficDataPoint(){let a=Date.now();if(a-this.lastChartUpdate<this.chartUpdateThreshold)return;let r=this.calculateThroughput();if(this.networkState.lastUpdated&&a-this.networkState.lastUpdated>3e3)return;let s=r.in*8/1e6,o=r.out*8/1e6,n=new Date(a).toISOString(),l={x:n,y:Math.round(s*10)/10},c={x:n,y:Math.round(o*10)/10};this.trafficDataIn.length>=Ur.MAX_DATA_POINTS&&(this.trafficDataIn.shift(),this.trafficDataOut.shift()),this.trafficDataIn=[...this.trafficDataIn,l],this.trafficDataOut=[...this.trafficDataOut,c],this.lastChartUpdate=a}stopTrafficUpdateTimer(){this.trafficUpdateTimer&&(clearInterval(this.trafficUpdateTimer),this.trafficUpdateTimer=null)}};ho=qt(_8a),pet=new WeakMap,fet=new WeakMap,het=new WeakMap,met=new WeakMap,Qe(ho,4,"statsState",T8a,Ur,pet),Qe(ho,4,"networkState",z8a,Ur,fet),Qe(ho,4,"trafficDataIn",C8a,Ur,het),Qe(ho,4,"trafficDataOut",S8a,Ur,met),Ur=Qe(ho,0,"OpsViewNetworkActivity",L8a,Ur),i(Ur,"OpsViewNetworkActivity"),Mt(Ur,"CHART_WINDOW_MS",300*1e3),Mt(Ur,"UPDATE_INTERVAL_MS",1e3),Mt(Ur,"MAX_DATA_POINTS",Ur.CHART_WINDOW_MS/Ur.UPDATE_INTERVAL_MS),Mt(Ur,"styles",[h.defaultStyles,Yt,W`
42800
42800
  .networkContainer {
42801
42801
  display: flex;
42802
42802
  flex-direction: column;
@@ -43135,7 +43135,7 @@ Customer Support Team`}};async onActivate(b){this.appui=b.appui,this.appui.setCo
43135
43135
  <dees-input-list .key=${"targets"} .label=${"Targets"} .description=${"Format: ip:port, e.g. 10.0.0.1:443"} .placeholder=${"e.g. 10.0.0.1:443"} .allowFreeform=${!0} .value=${s}></dees-input-list>
43136
43136
  <dees-input-list .key=${"routeRefs"} .label=${"Route Refs"} .placeholder=${"Type to search routes..."} .candidates=${l} .allowFreeform=${!0} .value=${o}></dees-input-list>
43137
43137
  </dees-form>
43138
- `,menuOptions:[{name:"Cancel",iconName:"lucide:x",action:i(async c=>c.destroy(),"action")},{name:"Save",iconName:"lucide:check",action:i(async c=>{let d=c.shadowRoot?.querySelector(".content")?.querySelector("dees-form");if(!d)return;let u=await d.collectFormData(),p=Array.isArray(u.domains)?u.domains:[],v=(Array.isArray(u.targets)?u.targets:[]).map(b=>{let g=b.lastIndexOf(":");return g===-1?null:{ip:b.substring(0,g),port:parseInt(b.substring(g+1),10)}}).filter(b=>b!==null&&!isNaN(b.port)),x=this.resolveRouteLabelsToRefs(Array.isArray(u.routeRefs)?u.routeRefs:[]);await Oi.dispatchAction(Iha,{id:a.id,name:String(u.name),description:u.description?String(u.description):void 0,domains:p,targets:v,routeRefs:x}),c.destroy()},"action")}]})}async showDetailDialog(a){let{DeesModal:r}=await Promise.resolve().then(()=>(Tt(),zt)),s=w`<p style="color: #9ca3af;">Loading usage...</p>`;try{let n=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getTargetProfileUsage").fire({identity:Ia.getState().identity,id:a.id});n.clients.length>0?s=w`
43138
+ `,menuOptions:[{name:"Cancel",iconName:"lucide:x",action:i(async c=>c.destroy(),"action")},{name:"Save",iconName:"lucide:check",action:i(async c=>{let d=c.shadowRoot?.querySelector(".content")?.querySelector("dees-form");if(!d)return;let u=await d.collectFormData(),p=Array.isArray(u.domains)?u.domains:[],v=(Array.isArray(u.targets)?u.targets:[]).map(b=>{let g=b.lastIndexOf(":");return g===-1?null:{ip:b.substring(0,g),port:parseInt(b.substring(g+1),10)}}).filter(b=>b!==null&&!isNaN(b.port)),x=this.resolveRouteLabelsToRefs(Array.isArray(u.routeRefs)?u.routeRefs:[]);await Oi.dispatchAction(Iha,{id:a.id,name:String(u.name),description:u.description?String(u.description):void 0,domains:p,targets:v,routeRefs:x}),c.destroy()},"action")}]})}async showDetailDialog(a){let{DeesModal:r}=await Promise.resolve().then(()=>(Tt(),zt)),s=w`<p style="color: #9ca3af;">Loading usage...</p>`;try{let n=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getTargetProfileUsage").fire({identity:Ia.getState().identity,id:a.id});n.clients.length>0?s=w`
43139
43139
  <div style="margin-top: 8px;">
43140
43140
  ${n.clients.map(l=>w`
43141
43141
  <div style="padding: 4px 0; font-size: 13px;">
@@ -43412,7 +43412,7 @@ Customer Support Team`}};async onActivate(b){this.appui=b.appui,this.appui.setCo
43412
43412
  <dees-input-text .key=${"destinationBlockList"} .label=${"Destination Block List"} .description=${"Comma-separated IPs or CIDRs"}></dees-input-text>
43413
43413
  </div>
43414
43414
  </dees-form>
43415
- `,menuOptions:[{name:"Cancel",iconName:"lucide:x",action:i(async v=>await v.destroy(),"action")},{name:"Create",iconName:"lucide:plus",action:i(async v=>{let x=v.shadowRoot?.querySelector(".content")?.querySelector("dees-form");if(!x)return;let b=await x.collectFormData();if(!b.clientId)return;let g=this.resolveProfileLabelsToIds(Array.isArray(b.targetProfileNames)?b.targetProfileNames:[]),y=b.useHostIp??!1,k=y&&(b.useDhcp??!1),C=y&&!k&&b.staticIp?b.staticIp:void 0,R=y&&(b.forceVlan??!1),T=R&&b.vlanId?parseInt(b.vlanId,10):void 0,S=b.allowAdditionalAcls??!1,N=S&&b.destinationAllowList?b.destinationAllowList.split(",").map(I=>I.trim()).filter(Boolean):void 0,_=S&&b.destinationBlockList?b.destinationBlockList.split(",").map(I=>I.trim()).filter(Boolean):void 0;await Fi.dispatchAction(_ha,{clientId:b.clientId,description:b.description||void 0,targetProfileIds:g,useHostIp:y,useDhcp:k,staticIp:C,forceVlan:R,vlanId:T,destinationAllowList:N,destinationBlockList:_}),await v.destroy()},"action")}]}))?.shadowRoot?.querySelector(".content")?.querySelector("dees-form");m&&(await m.updateComplete,K8a(m))},"actionFunc")},{name:"Detail",iconName:"lucide:info",type:["doubleClick"],actionFunc:i(async d=>{let u=d.item,p=this.getConnectedInfo(u),{DeesModal:m}=await Promise.resolve().then(()=>(Tt(),zt)),v=w`<p style="color: #9ca3af;">Loading telemetry...</p>`;try{let g=(await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getVpnClientTelemetry").fire({identity:Ia.getState().identity,clientId:u.clientId})).telemetry;if(g){let y=i(k=>k>1048576?`${(k/1048576).toFixed(1)} MB`:k>1024?`${(k/1024).toFixed(1)} KB`:`${k} B`,"formatBytes");v=w`
43415
+ `,menuOptions:[{name:"Cancel",iconName:"lucide:x",action:i(async v=>await v.destroy(),"action")},{name:"Create",iconName:"lucide:plus",action:i(async v=>{let x=v.shadowRoot?.querySelector(".content")?.querySelector("dees-form");if(!x)return;let b=await x.collectFormData();if(!b.clientId)return;let g=this.resolveProfileLabelsToIds(Array.isArray(b.targetProfileNames)?b.targetProfileNames:[]),y=b.useHostIp??!1,k=y&&(b.useDhcp??!1),C=y&&!k&&b.staticIp?b.staticIp:void 0,R=y&&(b.forceVlan??!1),T=R&&b.vlanId?parseInt(b.vlanId,10):void 0,S=b.allowAdditionalAcls??!1,N=S&&b.destinationAllowList?b.destinationAllowList.split(",").map(I=>I.trim()).filter(Boolean):void 0,_=S&&b.destinationBlockList?b.destinationBlockList.split(",").map(I=>I.trim()).filter(Boolean):void 0;await Fi.dispatchAction(_ha,{clientId:b.clientId,description:b.description||void 0,targetProfileIds:g,useHostIp:y,useDhcp:k,staticIp:C,forceVlan:R,vlanId:T,destinationAllowList:N,destinationBlockList:_}),await v.destroy()},"action")}]}))?.shadowRoot?.querySelector(".content")?.querySelector("dees-form");m&&(await m.updateComplete,K8a(m))},"actionFunc")},{name:"Detail",iconName:"lucide:info",type:["doubleClick"],actionFunc:i(async d=>{let u=d.item,p=this.getConnectedInfo(u),{DeesModal:m}=await Promise.resolve().then(()=>(Tt(),zt)),v=w`<p style="color: #9ca3af;">Loading telemetry...</p>`;try{let g=(await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getVpnClientTelemetry").fire({identity:Ia.getState().identity,clientId:u.clientId})).telemetry;if(g){let y=i(k=>k>1048576?`${(k/1048576).toFixed(1)} MB`:k>1024?`${(k/1024).toFixed(1)} KB`:`${k} B`,"formatBytes");v=w`
43416
43416
  <div class="serverInfo" style="margin-top: 12px;">
43417
43417
  <div class="infoItem"><span class="infoLabel">Bytes Sent</span><span class="infoValue">${y(g.bytesSent)}</span></div>
43418
43418
  <div class="infoItem"><span class="infoLabel">Bytes Received</span><span class="infoValue">${y(g.bytesReceived)}</span></div>
@@ -43443,7 +43443,7 @@ Customer Support Team`}};async onActivate(b){this.appui=b.appui,this.appui.setCo
43443
43443
  </div>
43444
43444
  <h3 style="margin: 16px 0 4px; font-size: 14px;">Telemetry</h3>
43445
43445
  ${v}
43446
- `,menuOptions:[{name:"Close",iconName:"lucide:x",action:i(async x=>await x.destroy(),"action")}]})},"actionFunc")},{name:"Enable",iconName:"lucide:power",type:["contextmenu","inRow"],actionRelevancyCheckFunc:i(d=>!d.item.enabled,"actionRelevancyCheckFunc"),actionFunc:i(async d=>{let u=d.item;await Fi.dispatchAction(ZJe,{clientId:u.clientId,enabled:!0})},"actionFunc")},{name:"Disable",iconName:"lucide:power",type:["contextmenu","inRow"],actionRelevancyCheckFunc:i(d=>d.item.enabled,"actionRelevancyCheckFunc"),actionFunc:i(async d=>{let u=d.item;await Fi.dispatchAction(ZJe,{clientId:u.clientId,enabled:!1})},"actionFunc")},{name:"Export Config",iconName:"lucide:download",type:["contextmenu","inRow"],actionFunc:i(async d=>{let u=d.item,{DeesModal:p,DeesToast:m}=await Promise.resolve().then(()=>(Tt(),zt)),v=i(async b=>{try{let y=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","exportVpnClientConfig").fire({identity:Ia.getState().identity,clientId:u.clientId,format:b});if(y.success&&y.config){let k=b==="wireguard"?"conf":"json",C=new Blob([y.config],{type:"text/plain"}),R=URL.createObjectURL(C),T=document.createElement("a");T.href=R,T.download=`${u.clientId}.${k}`,T.click(),URL.revokeObjectURL(R),m.createAndShow({message:`${b} config downloaded`,type:"success",duration:3e3})}else m.createAndShow({message:y.message||"Export failed",type:"error",duration:5e3})}catch(g){m.createAndShow({message:g.message||"Export failed",type:"error",duration:5e3})}},"exportConfig"),x=i(async()=>{try{let g=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","exportVpnClientConfig").fire({identity:Ia.getState().identity,clientId:u.clientId,format:"wireguard"});if(g.success&&g.config){let y=await Bie.toDataURL(g.config,{width:400,margin:2});p.createAndShow({heading:`QR Code: ${u.clientId}`,content:w`
43446
+ `,menuOptions:[{name:"Close",iconName:"lucide:x",action:i(async x=>await x.destroy(),"action")}]})},"actionFunc")},{name:"Enable",iconName:"lucide:power",type:["contextmenu","inRow"],actionRelevancyCheckFunc:i(d=>!d.item.enabled,"actionRelevancyCheckFunc"),actionFunc:i(async d=>{let u=d.item;await Fi.dispatchAction(ZJe,{clientId:u.clientId,enabled:!0})},"actionFunc")},{name:"Disable",iconName:"lucide:power",type:["contextmenu","inRow"],actionRelevancyCheckFunc:i(d=>d.item.enabled,"actionRelevancyCheckFunc"),actionFunc:i(async d=>{let u=d.item;await Fi.dispatchAction(ZJe,{clientId:u.clientId,enabled:!1})},"actionFunc")},{name:"Export Config",iconName:"lucide:download",type:["contextmenu","inRow"],actionFunc:i(async d=>{let u=d.item,{DeesModal:p,DeesToast:m}=await Promise.resolve().then(()=>(Tt(),zt)),v=i(async b=>{try{let y=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","exportVpnClientConfig").fire({identity:Ia.getState().identity,clientId:u.clientId,format:b});if(y.success&&y.config){let k=b==="wireguard"?"conf":"json",C=new Blob([y.config],{type:"text/plain"}),R=URL.createObjectURL(C),T=document.createElement("a");T.href=R,T.download=`${u.clientId}.${k}`,T.click(),URL.revokeObjectURL(R),m.createAndShow({message:`${b} config downloaded`,type:"success",duration:3e3})}else m.createAndShow({message:y.message||"Export failed",type:"error",duration:5e3})}catch(g){m.createAndShow({message:g.message||"Export failed",type:"error",duration:5e3})}},"exportConfig"),x=i(async()=>{try{let g=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","exportVpnClientConfig").fire({identity:Ia.getState().identity,clientId:u.clientId,format:"wireguard"});if(g.success&&g.config){let y=await Bie.toDataURL(g.config,{width:400,margin:2});p.createAndShow({heading:`QR Code: ${u.clientId}`,content:w`
43447
43447
  <div style="text-align: center; padding: 16px;">
43448
43448
  <img src="${y}" style="max-width: 100%; image-rendering: pixelated;" />
43449
43449
  <p style="margin-top: 12px; font-size: 13px; color: #9ca3af;">
@@ -43473,7 +43473,7 @@ Customer Support Team`}};async onActivate(b){this.appui=b.appui,this.appui.setCo
43473
43473
  <dees-input-text .key=${"destinationBlockList"} .label=${"Destination Block List"} .description=${"Comma-separated IPs or CIDRs"} .value=${T}></dees-input-text>
43474
43474
  </div>
43475
43475
  </dees-form>
43476
- `,menuOptions:[{name:"Cancel",iconName:"lucide:x",action:i(async I=>await I.destroy(),"action")},{name:"Save",iconName:"lucide:check",action:i(async I=>{let O=I.shadowRoot?.querySelector(".content")?.querySelector("dees-form");if(!O)return;let M=await O.collectFormData(),z=this.resolveProfileLabelsToIds(Array.isArray(M.targetProfileNames)?M.targetProfileNames:[]),E=M.useHostIp??!1,A=E&&(M.useDhcp??!1),F=E&&!A&&M.staticIp?M.staticIp:void 0,K=E&&(M.forceVlan??!1),j=K&&M.vlanId?parseInt(M.vlanId,10):void 0,U=M.allowAdditionalAcls??!1,he=U&&M.destinationAllowList?M.destinationAllowList.split(",").map(J=>J.trim()).filter(Boolean):[],B=U&&M.destinationBlockList?M.destinationBlockList.split(",").map(J=>J.trim()).filter(Boolean):[];await Fi.dispatchAction($ha,{clientId:u.clientId,description:M.description||void 0,targetProfileIds:z,useHostIp:E,useDhcp:A,staticIp:F,forceVlan:K,vlanId:j,destinationAllowList:he,destinationBlockList:B}),await I.destroy()},"action")}]}))?.shadowRoot?.querySelector(".content")?.querySelector("dees-form");_&&(await _.updateComplete,K8a(_))},"actionFunc")},{name:"Rotate Keys",iconName:"lucide:rotate-cw",type:["contextmenu"],actionFunc:i(async d=>{let u=d.item,{DeesModal:p,DeesToast:m}=await Promise.resolve().then(()=>(Tt(),zt));p.createAndShow({heading:"Rotate Client Keys",content:w`<p>Generate new keys for "${u.clientId}"? The old keys will be invalidated and the client will need the new config to reconnect.</p>`,menuOptions:[{name:"Cancel",iconName:"lucide:x",action:i(async v=>await v.destroy(),"action")},{name:"Rotate",iconName:"lucide:rotate-cw",action:i(async v=>{try{let b=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","rotateVpnClientKey").fire({identity:Ia.getState().identity,clientId:u.clientId});b.success&&b.wireguardConfig&&Fi.setState({...Fi.getState(),newClientConfig:b.wireguardConfig}),await v.destroy()}catch(x){m.createAndShow({message:x.message||"Rotate failed",type:"error",duration:5e3})}},"action")}]})},"actionFunc")},{name:"Delete",iconName:"lucide:trash2",type:["contextmenu"],actionFunc:i(async d=>{let u=d.item,{DeesModal:p}=await Promise.resolve().then(()=>(Tt(),zt));p.createAndShow({heading:"Delete VPN Client",content:w`<p>Are you sure you want to delete client "${u.clientId}"?</p>`,menuOptions:[{name:"Cancel",iconName:"lucide:x",action:i(async m=>await m.destroy(),"action")},{name:"Delete",iconName:"lucide:trash2",action:i(async m=>{await Fi.dispatchAction(Lha,u.clientId),await m.destroy()},"action")}]})},"actionFunc")}]}
43476
+ `,menuOptions:[{name:"Cancel",iconName:"lucide:x",action:i(async I=>await I.destroy(),"action")},{name:"Save",iconName:"lucide:check",action:i(async I=>{let O=I.shadowRoot?.querySelector(".content")?.querySelector("dees-form");if(!O)return;let M=await O.collectFormData(),z=this.resolveProfileLabelsToIds(Array.isArray(M.targetProfileNames)?M.targetProfileNames:[]),E=M.useHostIp??!1,A=E&&(M.useDhcp??!1),F=E&&!A&&M.staticIp?M.staticIp:void 0,K=E&&(M.forceVlan??!1),j=K&&M.vlanId?parseInt(M.vlanId,10):void 0,U=M.allowAdditionalAcls??!1,he=U&&M.destinationAllowList?M.destinationAllowList.split(",").map(J=>J.trim()).filter(Boolean):[],B=U&&M.destinationBlockList?M.destinationBlockList.split(",").map(J=>J.trim()).filter(Boolean):[];await Fi.dispatchAction($ha,{clientId:u.clientId,description:M.description||void 0,targetProfileIds:z,useHostIp:E,useDhcp:A,staticIp:F,forceVlan:K,vlanId:j,destinationAllowList:he,destinationBlockList:B}),await I.destroy()},"action")}]}))?.shadowRoot?.querySelector(".content")?.querySelector("dees-form");_&&(await _.updateComplete,K8a(_))},"actionFunc")},{name:"Rotate Keys",iconName:"lucide:rotate-cw",type:["contextmenu"],actionFunc:i(async d=>{let u=d.item,{DeesModal:p,DeesToast:m}=await Promise.resolve().then(()=>(Tt(),zt));p.createAndShow({heading:"Rotate Client Keys",content:w`<p>Generate new keys for "${u.clientId}"? The old keys will be invalidated and the client will need the new config to reconnect.</p>`,menuOptions:[{name:"Cancel",iconName:"lucide:x",action:i(async v=>await v.destroy(),"action")},{name:"Rotate",iconName:"lucide:rotate-cw",action:i(async v=>{try{let b=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","rotateVpnClientKey").fire({identity:Ia.getState().identity,clientId:u.clientId});b.success&&b.wireguardConfig&&Fi.setState({...Fi.getState(),newClientConfig:b.wireguardConfig}),await v.destroy()}catch(x){m.createAndShow({message:x.message||"Rotate failed",type:"error",duration:5e3})}},"action")}]})},"actionFunc")},{name:"Delete",iconName:"lucide:trash2",type:["contextmenu"],actionFunc:i(async d=>{let u=d.item,{DeesModal:p}=await Promise.resolve().then(()=>(Tt(),zt));p.createAndShow({heading:"Delete VPN Client",content:w`<p>Are you sure you want to delete client "${u.clientId}"?</p>`,menuOptions:[{name:"Cancel",iconName:"lucide:x",action:i(async m=>await m.destroy(),"action")},{name:"Delete",iconName:"lucide:trash2",action:i(async m=>{await Fi.dispatchAction(Lha,u.clientId),await m.destroy()},"action")}]})},"actionFunc")}]}
43477
43477
  ></dees-table>
43478
43478
  </div>
43479
43479
  `}async ensureTargetProfilesLoaded(){await Oi.dispatchAction(fc,null)}renderTargetProfileBadges(a){let r=this.resolveProfileIdsToLabels(a,{pendingLabel:"Loading profile...",missingLabel:i(s=>`Unknown profile (${s})`,"missingLabel")});return r?.length?w`${r.map(s=>w`<span class="tagBadge">${s}</span>`)}`:"-"}getTargetProfileChoices(){let a=this.targetProfilesState.profiles||[],r=new Map;for(let s of a)r.set(s.name,(r.get(s.name)||0)+1);return a.map(s=>({id:s.id,label:(r.get(s.name)||0)>1?`${s.name} (${s.id})`:s.name}))}getTargetProfileCandidates(){return this.getTargetProfileChoices().map(a=>({viewKey:a.label}))}resolveProfileIdsToLabels(a,r={}){if(!a?.length)return;let s=this.getTargetProfileChoices(),o=new Map(s.map(n=>[n.id,n.label]));return a.map(n=>{let l=o.get(n);return l||(this.targetProfilesState.lastUpdated===0&&!this.targetProfilesState.error?r.pendingLabel||"Loading profile...":r.missingLabel?.(n)||n)})}resolveProfileLabelsToIds(a){if(!a.length)return[];let r=new Map(this.getTargetProfileChoices().map(s=>[s.label,s.id]));return a.map(s=>r.get(s)).filter(s=>!!s)}};vc=qt(Q8a),Cet=new WeakMap,zet=new WeakMap,Qe(vc,4,"vpnState",X8a,xc,Cet),Qe(vc,4,"targetProfilesState",Z8a,xc,zet),xc=Qe(vc,0,"OpsViewVpn",J8a,xc),i(xc,"OpsViewVpn"),Mt(xc,"styles",[h.defaultStyles,Yt,W`
@@ -43589,7 +43589,7 @@ Customer Support Team`}};async onActivate(b){this.appui=b.appui,this.appui.setCo
43589
43589
  ></sz-mta-list-view>
43590
43590
  `}
43591
43591
  </div>
43592
- `}async handleEmailClick(a){let r=a.detail;try{let s=Ia.getState(),n=await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","getEmailDetail").fire({identity:s.identity,emailId:r.id});n.email&&(this.selectedEmail=n.email,this.currentView="detail")}catch(s){console.error("Failed to fetch email detail:",s)}}handleBack(){this.selectedEmail=null,this.currentView="list"}};mo=qt(ima),Tet=new WeakMap,_et=new WeakMap,Let=new WeakMap,$et=new WeakMap,Qe(mo,4,"emails",rma,A1,Tet),Qe(mo,4,"selectedEmail",ama,A1,_et),Qe(mo,4,"currentView",tma,A1,Let),Qe(mo,4,"isLoading",ema,A1,$et),A1=Qe(mo,0,"OpsViewEmails",sma,A1),i(A1,"OpsViewEmails"),Mt(A1,"styles",[h.defaultStyles,Yt,W`
43592
+ `}async handleEmailClick(a){let r=a.detail;try{let s=Ia.getState(),n=await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","getEmailDetail").fire({identity:s.identity,emailId:r.id});n.email&&(this.selectedEmail=n.email,this.currentView="detail")}catch(s){console.error("Failed to fetch email detail:",s)}}handleBack(){this.selectedEmail=null,this.currentView="list"}};mo=qt(ima),Tet=new WeakMap,_et=new WeakMap,Let=new WeakMap,$et=new WeakMap,Qe(mo,4,"emails",rma,A1,Tet),Qe(mo,4,"selectedEmail",ama,A1,_et),Qe(mo,4,"currentView",tma,A1,Let),Qe(mo,4,"isLoading",ema,A1,$et),A1=Qe(mo,0,"OpsViewEmails",sma,A1),i(A1,"OpsViewEmails"),Mt(A1,"styles",[h.defaultStyles,Yt,W`
43593
43593
  :host {
43594
43594
  display: block;
43595
43595
  height: 100%;
@@ -44493,7 +44493,7 @@ Customer Support Team`}};async onActivate(b){this.appui=b.appui,this.appui.setCo
44493
44493
  </dees-simple-appdash>
44494
44494
  </dees-simple-login>
44495
44495
  </div>
44496
- `}async firstUpdated(){let a=this.shadowRoot.querySelector("dees-simple-login");a.addEventListener("login",o=>{let n=o.detail;this.login(n.data.username,n.data.password)});let r=this.shadowRoot.querySelector("dees-simple-appdash");r&&(r.addEventListener("view-select",o=>{let n=o.detail.view,l=this.findParent(n),c=Os.getState();if(l){let d=this.slugFor(l),u=this.slugFor(n);if(c?.activeView===d&&c?.activeSubview===u)return;mc.navigateToView(d,u)}else{let d=this.slugFor(n);if(c?.activeView===d&&!c?.activeSubview)return;mc.navigateToView(d)}}),r.addEventListener("logout",async()=>{await Ia.dispatchAction(Ym,null)}));let s=Ia.getState();if(s.identity?.jwt)if(s.identity.expiresAt>Date.now())try{(await new Ke.plugins.typedrequest.TypedRequest("/typedrequest","verifyIdentity").fire({identity:s.identity})).valid?(this.loginState=s,await a.switchToSlottedContent(),await nr.dispatchAction(Km,null),await g4.dispatchAction(Vie,null)):await Ia.dispatchAction(Ym,null)}catch{await Ia.dispatchAction(Ym,null)}else await Ia.dispatchAction(Ym,null)}async login(a,r){let s=await this.domtoolsPromise;console.log("Attempting to login...");let o=this.shadowRoot.querySelector("dees-simple-login"),n=o.shadowRoot.querySelector("dees-form");n.setStatus("pending","Logging in...");let l=await Ia.dispatchAction(bha,{username:a,password:r});l.identity?(console.log("Login successful"),this.loginState=l,n.setStatus("success","Logged in!"),await o.switchToSlottedContent(),await nr.dispatchAction(Km,null),await g4.dispatchAction(Vie,null)):(n.setStatus("error","Login failed!"),await s.convenience.smartdelay.delayFor(2e3),n.reset())}};En=qt(e7a),Zet=new WeakMap,Xet=new WeakMap,Qet=new WeakMap,Qe(En,4,"loginState",Jma,F2,Zet),Qe(En,4,"uiState",Qma,F2,Xet),Qe(En,4,"configState",Xma,F2,Qet),F2=Qe(En,0,"OpsDashboard",t7a,F2),i(F2,"OpsDashboard"),Mt(F2,"styles",[h.defaultStyles,W`
44496
+ `}async firstUpdated(){let a=this.shadowRoot.querySelector("dees-simple-login");a.addEventListener("login",o=>{let n=o.detail;this.login(n.data.username,n.data.password)});let r=this.shadowRoot.querySelector("dees-simple-appdash");r&&(r.addEventListener("view-select",o=>{let n=o.detail.view,l=this.findParent(n),c=Os.getState();if(l){let d=this.slugFor(l),u=this.slugFor(n);if(c?.activeView===d&&c?.activeSubview===u)return;mc.navigateToView(d,u)}else{let d=this.slugFor(n);if(c?.activeView===d&&!c?.activeSubview)return;mc.navigateToView(d)}}),r.addEventListener("logout",async()=>{await Ia.dispatchAction(Ym,null)}));let s=Ia.getState();if(s.identity?.jwt)if(s.identity.expiresAt>Date.now())try{(await new Xe.plugins.typedrequest.TypedRequest("/typedrequest","verifyIdentity").fire({identity:s.identity})).valid?(this.loginState=s,await a.switchToSlottedContent(),await nr.dispatchAction(Km,null),await g4.dispatchAction(Vie,null)):await Ia.dispatchAction(Ym,null)}catch{await Ia.dispatchAction(Ym,null)}else await Ia.dispatchAction(Ym,null)}async login(a,r){let s=await this.domtoolsPromise;console.log("Attempting to login...");let o=this.shadowRoot.querySelector("dees-simple-login"),n=o.shadowRoot.querySelector("dees-form");n.setStatus("pending","Logging in...");let l=await Ia.dispatchAction(bha,{username:a,password:r});l.identity?(console.log("Login successful"),this.loginState=l,n.setStatus("success","Logged in!"),await o.switchToSlottedContent(),await nr.dispatchAction(Km,null),await g4.dispatchAction(Vie,null)):(n.setStatus("error","Login failed!"),await s.convenience.smartdelay.delayFor(2e3),n.reset())}};En=qt(e7a),Zet=new WeakMap,Xet=new WeakMap,Qet=new WeakMap,Qe(En,4,"loginState",Jma,F2,Zet),Qe(En,4,"uiState",Qma,F2,Xet),Qe(En,4,"configState",Xma,F2,Qet),F2=Qe(En,0,"OpsDashboard",t7a,F2),i(F2,"OpsDashboard"),Mt(F2,"styles",[h.defaultStyles,W`
44497
44497
  :host {
44498
44498
  display: block;
44499
44499
  width: 100%;
@@ -46325,4 +46325,4 @@ ibantools/jsnext/ibantools.js:
46325
46325
  * @preferred
46326
46326
  *)
46327
46327
  */
46328
- //# sourceMappingURL=bundle-1776436145840.js.map
46328
+ //# sourceMappingURL=bundle-1777149494825.js.map