2026-02-19 17:13:13 -05:00
|
|
|
(()=>{var __webpack_modules__={288(t){t.exports.p="/"},164(t,e,s){"use strict";var i={};s.r(i),s.d(i,{LiteElement:()=>f});var r={};s.r(r),s.d(r,{LiteDocument:()=>R});var n={};s.r(n),s.d(n,{LiteComment:()=>L,LiteText:()=>x});var o={};s.r(o),s.d(o,{LiteList:()=>b});var a={};s.r(a),s.d(a,{LiteParser:()=>w,PATTERNS:()=>T});var l={};s.r(l),s.d(l,{LiteWindow:()=>A});var c={};s.r(c),s.d(c,{LiteAdaptor:()=>_,LiteBase:()=>S,liteAdaptor:()=>j});var h=s(977),d=s(516),u=s(502),p=s(6),m=s(780),E=function(t,e,s,i){return new(s||(s=Promise))(function(r,n){function o(t){try{l(i.next(t))}catch(t){n(t)}}function a(t){try{l(i.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s(function(t){t(e)})).then(o,a)}l((i=i.apply(t,e||[])).next())})};const g={badCSS:!0,badSizes:!0};class f{constructor(t,e={},s=[]){this.kind=t,this.attributes=Object.assign({},e),this.children=[...s];for(const t of this.children)t.parent=this;this.styles=null}}class R{get kind(){return"#document"}constructor(t=null){this.defaultView=null,this.root=new f("html",{},[this.head=new f("head"),this.body=new f("body")]),this.type="",this.defaultView=t}}class x{get kind(){return"#text"}constructor(t=""){this.value=t}}class L extends x{get kind(){return"#comment"}}class b{constructor(t){this.nodes=[],this.nodes=[...t]}append(t){this.nodes.push(t)}[Symbol.iterator](){let t=0;return{next(){return t===this.nodes.length?{value:null,done:!0}:{value:this.nodes[t++],done:!1}}}}}var y=s(989);const N="[ \\n]+",I="[ \\n]*",O="[A-Za-z][^\0-\x1f \"'>/=\x7f-\x9f]*",v="[^\0-\x1f \"'>/=\x7f-\x9f]+",C=`${v}(?:${I}=${I}${`(?:'[^']*'|"[^"]*"|${N})`})?`,D=`(${v})(?:${I}=${I}${`(?:'([^']*)'|"([^"]*)"|(${N}))`})?`,T={tag:new RegExp(`(<(?:${O}(?:${N}${C})*${I}/?|/${O}|!--[^]*?--|![^]*?)(?:>|$))`,"u"),attr:new RegExp(C,"u"),attrsplit:new RegExp(D,"u")};class w{parseFromString(t,e="text/html",s=null){const i=s.createDocument();let r=s.body(i);const n=t.replace(/<\?.*?\?>/g,"").split(T.tag);for(;n.length;){const t=n.shift(),e=n.shift();t&&this.addText(s,r,t),e&&">"===e.charAt(e.length-1)&&("!"===e.charAt(1)?this.addComment(s,r,e):r="/"===e.charAt(1)?this.closeTag(s,r,e):this.openTag(s,r,e,n))}return this.checkDocument(s,i),i}addText(t,e,s){return s=y.translate(s),t.append(e,t.text(s))}addComment(t,e,s){return t.append(e,new L(s))}closeTag(t,e,s){const i=s.slice(2,s.length-1).toLowerCase();for(;t.parent(e)&&t.kind(e)!==i;)e=t.parent(e);return t.parent(e)}openTag(t,e,s,i){const r=this.constructor.PCDATA,n=this.constructor.SELF_CLOSING,o=s.match(/<(.*?)[\s\n>/]/)[1].toLowerCase(),a=t.node(o),l=s.replace(/^<.*?[\s\n>]/,"").split(T.attrsplit);return(l.pop().match(/>$/)||l.length<5)&&(this.addAttributes(t,a,l),t.append(e,a),n[o]||s.match(/\/>$/)||(r[o]?this.handlePCDATA(t,a,o,i):e=a)),e}addAttributes(t,e,s){for(;s.length;){const[,i,r,n,o]=s.splice(0,5),a=y.translate(r||n||o||"");t.setAttribute(e,i,a)}}handlePCDATA(t,e,s,i){const r=[],n="</"+s+">";let o="";for(;i.length&&o!==n;)r.push(o),r.push(i.shift()),o=i.shift();t.append(e,t.text(r.join("")))}checkDocument(t,e){const s=this.getOnlyChild(t,t.body(e));if(s){for(const i of t.childNodes(t.body(e))){if(i===s)break;i instanceof L&&i.value.match(/^<!DOCTYPE/)&&(e.type=i.value)}switch(t.kind(s)){case"html":for(const i of s.children)switch(t.kind(i)){case"head":e.head=i;break;case"body":e.body=i}e.root=s,t.remove(s),t.parent(e.body)!==s&&t.append(s,e.body),t.parent(e.head)!==s&&t.insert(e.head,e.body);break;case"head":e.head=t.replace(s,e.head);break;case"body":e.body=t.replace(s,e.body)}}}getOnlyChild(t,e){let s=null;for(const i of t.childNodes(e))if(i instanceof f){if(s)return null;s=i}return s}serialize(t,e,s=!1){const i=this.constructor.SELF_CLOSING,r=t.kind(e),n=this.allAttributes(t,e,s).map(t=>t.name+'="'+this.protectAttribute(t.value,s)+'"').join(" "),o=this.serializeInner(t,e,s);return`<${r}`+(n?" "+n:"")+(s&&!o||i[r]?s?"/>":">":`>${o}</${r}>`)}serializeInner(t,e,s=!1){const i=this.constructor.PCDATA;return Object.hasOwn(i,e.kind)?t.childNodes(e).map(e=>t.value(e)).join(""):t.childNodes(e).map(e=>{const i=t.ki
|