@cas-smartdesign/splitter 0.1.0 → 0.2.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.
- package/dist/docs/doc.css +1 -1
- package/dist/docs/doc.mjs +46 -43
- package/dist/splitter-with-externals.js +17 -95
- package/dist/splitter-with-externals.js.map +4 -4
- package/dist/splitter.mjs +46 -46
- package/dist/splitter.mjs.map +1 -1
- package/npm-third-party-licenses.json +52 -47
- package/package.json +4 -4
package/dist/docs/doc.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const
|
|
1
|
+
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))r(t);new MutationObserver(t=>{for(const c of t)if(c.type==="childList")for(const l of c.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function i(t){const c={};return t.integrity&&(c.integrity=t.integrity),t.referrerPolicy&&(c.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?c.credentials="include":t.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(t){if(t.ep)return;t.ep=!0;const c=i(t);fetch(t.href,c)}})();const Pn=`<sd-splitter class="basic">
|
|
2
2
|
<div slot="left" class="panel left">
|
|
3
3
|
<span>Left</span>
|
|
4
4
|
</div>
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<span>Right</span>
|
|
7
7
|
</div>
|
|
8
8
|
</sd-splitter>
|
|
9
|
-
`,
|
|
10
|
-
`,
|
|
9
|
+
`,Tn=`<h3 id="basic-usage">Basic usage</h3>
|
|
10
|
+
`,jn=`sd-splitter.basic {
|
|
11
11
|
width: 100%;
|
|
12
12
|
height: 300px;
|
|
13
13
|
}
|
|
@@ -22,7 +22,7 @@ sd-splitter.basic .panel.left {
|
|
|
22
22
|
sd-splitter.basic .panel.right {
|
|
23
23
|
background-color: lightcoral;
|
|
24
24
|
}
|
|
25
|
-
`,
|
|
25
|
+
`,Ln={mainContent:Pn,description:Tn,css:jn},In=Object.freeze(Object.defineProperty({__proto__:null,default:Ln},Symbol.toStringTag,{value:"Module"})),zn=`<sd-splitter class="advanced" ratio="[1,2]">
|
|
26
26
|
<div slot="left" class="panel left">
|
|
27
27
|
<span>Left</span>
|
|
28
28
|
</div>
|
|
@@ -30,7 +30,7 @@ sd-splitter.basic .panel.right {
|
|
|
30
30
|
<span>Right</span>
|
|
31
31
|
</div>
|
|
32
32
|
</sd-splitter>
|
|
33
|
-
`,
|
|
33
|
+
`,Dn=`<h3 id="advanced-usage">Advanced usage</h3>
|
|
34
34
|
<ul>
|
|
35
35
|
<li>Initial ratio: [2,1]</li>
|
|
36
36
|
<li>Minimum width of left panel: 100px</li>
|
|
@@ -38,7 +38,7 @@ sd-splitter.basic .panel.right {
|
|
|
38
38
|
<li>Gap around splitter: 10px</li>
|
|
39
39
|
<li>Splitter handle color: light green</li>
|
|
40
40
|
</ul>
|
|
41
|
-
`,
|
|
41
|
+
`,Un=`sd-splitter.advanced {
|
|
42
42
|
width: 100%;
|
|
43
43
|
height: 300px;
|
|
44
44
|
--sd-splitter-gap: 10px;
|
|
@@ -58,7 +58,7 @@ sd-splitter.advanced .panel.left {
|
|
|
58
58
|
sd-splitter.advanced .panel.right {
|
|
59
59
|
background-color: lightcoral;
|
|
60
60
|
}
|
|
61
|
-
`,
|
|
61
|
+
`,Bn={mainContent:zn,description:Dn,css:Un},Hn=Object.freeze(Object.defineProperty({__proto__:null,default:Bn},Symbol.toStringTag,{value:"Module"})),Fn=`<sd-splitter class="custom" ratio="[3,1]">
|
|
62
62
|
<div slot="left" class="panel left">
|
|
63
63
|
<span>Left</span>
|
|
64
64
|
</div>
|
|
@@ -83,14 +83,14 @@ sd-splitter.advanced .panel.right {
|
|
|
83
83
|
<span>Right</span>
|
|
84
84
|
</div>
|
|
85
85
|
</sd-splitter>
|
|
86
|
-
`,
|
|
86
|
+
`,qn=`<h3 id="custom-splitter">Custom splitter</h3>
|
|
87
87
|
<ul>
|
|
88
88
|
<li>Initial ratio: [3,1]</li>
|
|
89
89
|
<li>Minimum width of right panel: 100px</li>
|
|
90
90
|
<li>Minimum width of left panel: 100px</li>
|
|
91
91
|
<li>Gap around splitter: 5px</li>
|
|
92
92
|
</ul>
|
|
93
|
-
`,
|
|
93
|
+
`,Wn=`sd-splitter.custom {
|
|
94
94
|
width: 100%;
|
|
95
95
|
height: 300px;
|
|
96
96
|
--sd-splitter-gap: 5px;
|
|
@@ -132,24 +132,24 @@ sd-splitter.custom .custom-splitter .sd-splitter-drag-area {
|
|
|
132
132
|
sd-splitter.custom[hovering] .custom-splitter {
|
|
133
133
|
background-color: darkgray;
|
|
134
134
|
}
|
|
135
|
-
`,
|
|
136
|
-
\f\r]`,
|
|
137
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ti=/'/g,Li=/"/g,bn=/^(?:script|style|textarea|title)$/i,es=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),ji=es(1),Y=Symbol.for("lit-noChange"),R=Symbol.for("lit-nothing"),Ii=new WeakMap,se=le.createTreeWalker(le,129,null,!1);function yn(n,e){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ni!==void 0?Ni.createHTML(e):e}const ts=(n,e)=>{const t=n.length-1,i=[];let r,o=e===2?"<svg>":"",s=_e;for(let l=0;l<t;l++){const a=n[l];let c,h,f=-1,p=0;for(;p<a.length&&(s.lastIndex=p,h=s.exec(a),h!==null);)p=s.lastIndex,s===_e?h[1]==="!--"?s=Mi:h[1]!==void 0?s=Pi:h[2]!==void 0?(bn.test(h[2])&&(r=RegExp("</"+h[2],"g")),s=re):h[3]!==void 0&&(s=re):s===re?h[0]===">"?(s=r??_e,f=-1):h[1]===void 0?f=-2:(f=s.lastIndex-h[2].length,c=h[1],s=h[3]===void 0?re:h[3]==='"'?Li:Ti):s===Li||s===Ti?s=re:s===Mi||s===Pi?s=_e:(s=re,r=void 0);const _=s===re&&n[l+1].startsWith("/>")?" ":"";o+=s===_e?a+Qr:f>=0?(i.push(c),a.slice(0,f)+Ht+a.slice(f)+J+_):a+J+(f===-2?(i.push(void 0),l):_)}return[yn(n,o+(n[t]||"<?>")+(e===2?"</svg>":"")),i]};class ke{constructor({strings:e,_$litType$:t},i){let r;this.parts=[];let o=0,s=0;const l=e.length-1,a=this.parts,[c,h]=ts(e,t);if(this.el=ke.createElement(c,i),se.currentNode=this.el.content,t===2){const f=this.el.content,p=f.firstChild;p.remove(),f.append(...p.childNodes)}for(;(r=se.nextNode())!==null&&a.length<l;){if(r.nodeType===1){if(r.hasAttributes()){const f=[];for(const p of r.getAttributeNames())if(p.endsWith(Ht)||p.startsWith(J)){const _=h[s++];if(f.push(p),_!==void 0){const O=r.getAttribute(_.toLowerCase()+Ht).split(J),N=/([.?@])?(.*)/.exec(_);a.push({type:1,index:o,name:N[2],strings:O,ctor:N[1]==="."?ns:N[1]==="?"?ss:N[1]==="@"?os:dt})}else a.push({type:6,index:o})}for(const p of f)r.removeAttribute(p)}if(bn.test(r.tagName)){const f=r.textContent.split(J),p=f.length-1;if(p>0){r.textContent=fe?fe.emptyScript:"";for(let _=0;_<p;_++)r.append(f[_],Ce()),se.nextNode(),a.push({type:2,index:++o});r.append(f[p],Ce())}}}else if(r.nodeType===8)if(r.data===gn)a.push({type:2,index:o});else{let f=-1;for(;(f=r.data.indexOf(J,f+1))!==-1;)a.push({type:7,index:o}),f+=J.length-1}o++}}static createElement(e,t){const i=le.createElement("template");return i.innerHTML=e,i}}function pe(n,e,t=n,i){var r,o,s,l;if(e===Y)return e;let a=i!==void 0?(r=t._$Co)===null||r===void 0?void 0:r[i]:t._$Cl;const c=Oe(e)?void 0:e._$litDirective$;return(a==null?void 0:a.constructor)!==c&&((o=a==null?void 0:a._$AO)===null||o===void 0||o.call(a,!1),c===void 0?a=void 0:(a=new c(n),a._$AT(n,t,i)),i!==void 0?((s=(l=t)._$Co)!==null&&s!==void 0?s:l._$Co=[])[i]=a:t._$Cl=a),a!==void 0&&(e=pe(n,a._$AS(n,e.values),a,i)),e}class is{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:i},parts:r}=this._$AD,o=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:le).importNode(i,!0);se.currentNode=o;let s=se.nextNode(),l=0,a=0,c=r[0];for(;c!==void 0;){if(l===c.index){let h;c.type===2?h=new je(s,s.nextSibling,this,e):c.type===1?h=new c.ctor(s,c.name,c.strings,this,e):c.type===6&&(h=new ls(s,this,e)),this._$AV.push(h),c=r[++a]}l!==(c==null?void 0:c.index)&&(s=se.nextNode(),l++)}return se.currentNode=le,o}v(e){let t=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class je{constructor(e,t,i,r){var o;this.type=2,this._$AH=R,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=r,this._$Cp=(o=r==null?void 0:r.isConnected)===null||o===void 0||o}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=pe(this,e,t),Oe(e)?e===R||e==null||e===""?(this._$AH!==R&&this._$AR(),this._$AH=R):e!==this._$AH&&e!==Y&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Yr(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==R&&Oe(this._$AH)?this._$AA.nextSibling.data=e:this.$(le.createTextNode(e)),this._$AH=e}g(e){var t;const{values:i,_$litType$:r}=e,o=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=ke.createElement(yn(r.h,r.h[0]),this.options)),r);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===o)this._$AH.v(i);else{const s=new is(o,this),l=s.u(this.options);s.v(i),this.$(l),this._$AH=s}}_$AC(e){let t=Ii.get(e.strings);return t===void 0&&Ii.set(e.strings,t=new ke(e)),t}T(e){mn(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,r=0;for(const o of e)r===t.length?t.push(i=new je(this.k(Ce()),this.k(Ce()),this,this.options)):i=t[r],i._$AI(o),r++;r<t.length&&(this._$AR(i&&i._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,t);e&&e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}}class dt{constructor(e,t,i,r,o){this.type=1,this._$AH=R,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=R}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,i,r){const o=this.strings;let s=!1;if(o===void 0)e=pe(this,e,t,0),s=!Oe(e)||e!==this._$AH&&e!==Y,s&&(this._$AH=e);else{const l=e;let a,c;for(e=o[0],a=0;a<o.length-1;a++)c=pe(this,l[i+a],t,a),c===Y&&(c=this._$AH[a]),s||(s=!Oe(c)||c!==this._$AH[a]),c===R?e=R:e!==R&&(e+=(c??"")+o[a+1]),this._$AH[a]=c}s&&!r&&this.j(e)}j(e){e===R?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class ns extends dt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===R?void 0:e}}const rs=fe?fe.emptyScript:"";class ss extends dt{constructor(){super(...arguments),this.type=4}j(e){e&&e!==R?this.element.setAttribute(this.name,rs):this.element.removeAttribute(this.name)}}let os=class extends dt{constructor(e,t,i,r,o){super(e,t,i,r,o),this.type=5}_$AI(e,t=this){var i;if((e=(i=pe(this,e,t,0))!==null&&i!==void 0?i:R)===Y)return;const r=this._$AH,o=e===R&&r!==R||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,s=e!==R&&(r===R||o);o&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,i;typeof this._$AH=="function"?this._$AH.call((i=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&i!==void 0?i:this.element,e):this._$AH.handleEvent(e)}};class ls{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){pe(this,e)}}const zi=st.litHtmlPolyfillSupport;zi==null||zi(ke,je),((kt=st.litHtmlVersions)!==null&&kt!==void 0?kt:st.litHtmlVersions=[]).push("2.8.0");const as=(n,e,t)=>{var i,r;const o=(i=t==null?void 0:t.renderBefore)!==null&&i!==void 0?i:e;let s=o._$litPart$;if(s===void 0){const l=(r=t==null?void 0:t.renderBefore)!==null&&r!==void 0?r:null;o._$litPart$=s=new je(e.insertBefore(Ce(),l),l,void 0,t??{})}return s._$AI(n),s};var Nt,Mt;class Ae extends de{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const i=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=i.firstChild),i}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=as(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return Y}}Ae.finalized=!0,Ae._$litElement$=!0,(Nt=globalThis.litElementHydrateSupport)===null||Nt===void 0||Nt.call(globalThis,{LitElement:Ae});const Ui=globalThis.litElementPolyfillSupport;Ui==null||Ui({LitElement:Ae});((Mt=globalThis.litElementVersions)!==null&&Mt!==void 0?Mt:globalThis.litElementVersions=[]).push("3.3.3");const cs=(n,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,n)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,n)}},hs=(n,e,t)=>{e.constructor.createProperty(t,n)};function wn(n){return(e,t)=>t!==void 0?hs(n,e,t):cs(n,e)}function Ie(n){return wn({...n,state:!0})}const us=({finisher:n,descriptor:e})=>(t,i)=>{var r;if(i===void 0){const o=(r=t.originalKey)!==null&&r!==void 0?r:t.key,s=e!=null?{kind:"method",placement:"prototype",key:o,descriptor:e(t.key)}:{...t,key:o};return n!=null&&(s.finisher=function(l){n(l,o)}),s}{const o=t.constructor;e!==void 0&&Object.defineProperty(t,i,e(i)),n==null||n(o,i)}};function we(n,e){return us({descriptor:t=>{const i={get(){var r,o;return(o=(r=this.renderRoot)===null||r===void 0?void 0:r.querySelector(n))!==null&&o!==void 0?o:null},enumerable:!0,configurable:!0};if(e){const r=typeof t=="symbol"?Symbol():"__"+t;i.get=function(){var o,s;return this[r]===void 0&&(this[r]=(s=(o=this.renderRoot)===null||o===void 0?void 0:o.querySelector(n))!==null&&s!==void 0?s:null),this[r]}}return i}})}var Pt;((Pt=window.HTMLSlotElement)===null||Pt===void 0?void 0:Pt.prototype.assignedElements)!=null;const vn={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},_n=n=>(...e)=>({_$litDirective$:n,values:e});let xn=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};const ds=_n(class extends xn{constructor(n){var e;if(super(n),n.type!==vn.ATTRIBUTE||n.name!=="class"||((e=n.strings)===null||e===void 0?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(n){return" "+Object.keys(n).filter(e=>n[e]).join(" ")+" "}update(n,[e]){var t,i;if(this.it===void 0){this.it=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in e)e[o]&&!(!((t=this.nt)===null||t===void 0)&&t.has(o))&&this.it.add(o);return this.render(e)}const r=n.element.classList;this.it.forEach(o=>{o in e||(r.remove(o),this.it.delete(o))});for(const o in e){const s=!!e[o];s===this.it.has(o)||!((i=this.nt)===null||i===void 0)&&i.has(o)||(s?(r.add(o),this.it.add(o)):(r.remove(o),this.it.delete(o)))}return Y}});const En="important",fs=" !"+En,Tt=_n(class extends xn{constructor(n){var e;if(super(n),n.type!==vn.ATTRIBUTE||n.name!=="style"||((e=n.strings)===null||e===void 0?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(n){return Object.keys(n).reduce((e,t)=>{const i=n[t];return i==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(n,[e]){const{style:t}=n.element;if(this.ht===void 0){this.ht=new Set;for(const i in e)this.ht.add(i);return this.render(e)}this.ht.forEach(i=>{e[i]==null&&(this.ht.delete(i),i.includes("-")?t.removeProperty(i):t[i]="")});for(const i in e){const r=e[i];if(r!=null){this.ht.add(i);const o=typeof r=="string"&&r.endsWith(fs);i.includes("-")||o?t.setProperty(i,o?r.slice(0,-11):r,o?En:""):t[i]=r}}return Y}}),ps=":host{display:block;--sd-splitter-gap: 0px;--sd-splitter-cursor: ew-resize;--sd-splitter-width: 0px;--sd-splitter-color: transparent;--sd-splitter-handle-width: 5px;--sd-splitter-handle-color: #1467ba}#root{display:flex;height:100%;width:100%;justify-content:space-between;gap:var(--sd-splitter-gap)}.pane{overflow:hidden}::slotted([slot=left]),::slotted([slot=right]){width:100%;height:100%}::slotted([slot=splitter]){flex:none;touch-action:none}#default-splitter{flex:none;touch-action:none;width:var(--sd-splitter-width);position:relative;background-color:var(--sd-splitter-color)}#default-splitter-handle{position:absolute;top:0;left:calc((var(--sd-splitter-width) - var(--sd-splitter-handle-width)) / 2);right:0;bottom:0;width:var(--sd-splitter-handle-width);background-color:var(--sd-splitter-handle-color);opacity:0;transition:opacity .2s}#default-splitter-drag-area{position:absolute;top:0;left:-3px;width:calc(var(--sd-splitter-handle-width) + 6px);bottom:0}#default-splitter-handle.hover,#default-splitter-handle.drag{opacity:1}#default-splitter-handle.hover{transition-delay:.5s}#default-splitter-handle.drag{transition:none}";var gs=Object.defineProperty,ms=Object.getOwnPropertyDescriptor,U=(n,e,t,i)=>{for(var r=i>1?void 0:i?ms(e,t):e,o=n.length-1,s;o>=0;o--)(s=n[o])&&(r=(i?s(e,t,r):s(r))||r);return i&&r&&gs(e,t,r),r};const _i=class _i extends Ae{constructor(){super(),this.ratio=[1,1],this._hovering=!1,this._dragging=!1,this._startX=0,this._startLeftWidth=0,this._onLeftSlotChange=()=>{this._assignSlotted("left",this._leftSlot,e=>{this._leftSlotted=e})},this._onRightSlotChange=()=>{this._assignSlotted("right",this._rightSlot,e=>{this._rightSlotted=e})},this._onSplitterSlotChange=()=>{if(this._customSplitterCleanup&&(this._customSplitterCleanup(),this._customSplitterCleanup=void 0),this._assignSlotted("splitter",this._splitterSlot,e=>{this._customSplitter=e}),this._customSplitter){const e=this._customSplitter.querySelector(".sd-splitter-drag-area")||this._customSplitter;e.addEventListener("pointerenter",this._enterDragArea),e.addEventListener("pointerleave",this._leaveDragArea),e.addEventListener("pointerdown",this._startDrag),this._customSplitterCleanup=()=>{e.removeEventListener("pointerenter",this._enterDragArea),e.removeEventListener("pointerleave",this._leaveDragArea),e.removeEventListener("pointerdown",this._startDrag)}}},this._enterDragArea=()=>{this._hovering=!0,this.setAttribute("hovering","")},this._leaveDragArea=()=>{this._hovering=!1,this._dragging||this.removeAttribute("hovering")},this._startDrag=e=>{this._dragging=!0,this.setAttribute("dragging",""),this._startX=e.clientX,this._startLeftWidth=this._leftPane.offsetWidth,window.addEventListener("pointermove",this._doDrag),window.addEventListener("pointerup",this._endDrag),window.addEventListener("contextmenu",this._preventContextMenu),window.document.body.style.cursor=getComputedStyle(this).getPropertyValue("--sd-splitter-cursor"),e.preventDefault()},this._doDrag=e=>{if(!this._dragging)return;const t=e.clientX-this._startX;this._recomputeRatio(this._startLeftWidth+t)},this._endDrag=()=>{this._dragging=!1,this.removeAttribute("dragging"),this._hovering||this.removeAttribute("hovering"),window.removeEventListener("pointermove",this._doDrag),window.removeEventListener("pointerup",this._endDrag),window.removeEventListener("contextmenu",this._preventContextMenu),window.document.body.style.removeProperty("cursor")},this._preventContextMenu=e=>{e.preventDefault()},this._resizeObserver=new ResizeObserver(()=>{this._handleResize()})}connectedCallback(){super.connectedCallback(),this._resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver.unobserve(this)}_assignSlotted(e,t,i){t.assignedElements().length>1&&console.warn(`At most one element can be assigned to slot '${e}' in sd-splitter.`),i(t.assignedElements()[0])}_handleResize(){!this._leftSlotted||!this._rightSlotted||this._recomputeRatio(this._leftPane.offsetWidth)}_recomputeRatio(e){const t=this._getAvailableWidth();if(t<=0)return;const[i,r]=this._getMinMaxWidth(this._leftSlot),[o,s]=this._getMinMaxWidth(this._rightSlot),l=Math.max(i,t-s),a=Math.min(r,t-o),c=Math.max(l,Math.min(e,a)),h=t-c;this._setRatio(c,h)}_getAvailableWidth(){const e=parseFloat(getComputedStyle(this._root).getPropertyValue("gap"))||0;return this.offsetWidth-this._getSplitter().offsetWidth-2*e}_getSplitter(){return this._customSplitter||this._defaultSplitter}_getMinMaxWidth(e){const t=getComputedStyle(e.assignedElements()[0]);return[parseFloat(t.minWidth)||0,parseFloat(t.maxWidth)||1/0]}_setRatio(e,t){const i=e+t;if(i===0)return[.5,.5];this.ratio=[e/i,t/i],this.dispatchEvent(new bs(this.ratio))}render(){if(!this._leftSlotted||!this._rightSlotted)return ji`
|
|
135
|
+
`,Gn={mainContent:Fn,description:qn,css:Wn},Zn=Object.freeze(Object.defineProperty({__proto__:null,default:Gn},Symbol.toStringTag,{value:"Module"}));const ct=globalThis,ar=ct.ShadowRoot&&(ct.ShadyCSS===void 0||ct.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,lr=Symbol(),zr=new WeakMap;let ki=class{constructor(e,i,r){if(this._$cssResult$=!0,r!==lr)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=i}get styleSheet(){let e=this.o;const i=this.t;if(ar&&e===void 0){const r=i!==void 0&&i.length===1;r&&(e=zr.get(i)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&zr.set(i,e))}return e}toString(){return this.cssText}};const Ci=n=>new ki(typeof n=="string"?n:n+"",void 0,lr),Vn=(n,...e)=>{const i=n.length===1?n[0]:e.reduce(((r,t,c)=>r+(l=>{if(l._$cssResult$===!0)return l.cssText;if(typeof l=="number")return l;throw Error("Value passed to 'css' function must be a 'css' function result: "+l+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(t)+n[c+1]),n[0]);return new ki(i,n,lr)},Jn=(n,e)=>{if(ar)n.adoptedStyleSheets=e.map((i=>i instanceof CSSStyleSheet?i:i.styleSheet));else for(const i of e){const r=document.createElement("style"),t=ct.litNonce;t!==void 0&&r.setAttribute("nonce",t),r.textContent=i.cssText,n.appendChild(r)}},Dr=ar?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let i="";for(const r of e.cssRules)i+=r.cssText;return Ci(i)})(n):n;const{is:Kn,defineProperty:Xn,getOwnPropertyDescriptor:Qn,getOwnPropertyNames:Yn,getOwnPropertySymbols:es,getPrototypeOf:ts}=Object,ft=globalThis,Ur=ft.trustedTypes,rs=Ur?Ur.emptyScript:"",is=ft.reactiveElementPolyfillSupport,qe=(n,e)=>n,ut={toAttribute(n,e){switch(e){case Boolean:n=n?rs:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let i=n;switch(e){case Boolean:i=n!==null;break;case Number:i=n===null?null:Number(n);break;case Object:case Array:try{i=JSON.parse(n)}catch{i=null}}return i}},cr=(n,e)=>!Kn(n,e),Br={attribute:!0,type:String,converter:ut,reflect:!1,useDefault:!1,hasChanged:cr};Symbol.metadata??=Symbol("metadata"),ft.litPropertyMetadata??=new WeakMap;let je=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,i=Br){if(i.state&&(i.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((i=Object.create(i)).wrapped=!0),this.elementProperties.set(e,i),!i.noAccessor){const r=Symbol(),t=this.getPropertyDescriptor(e,r,i);t!==void 0&&Xn(this.prototype,e,t)}}static getPropertyDescriptor(e,i,r){const{get:t,set:c}=Qn(this.prototype,e)??{get(){return this[i]},set(l){this[i]=l}};return{get:t,set(l){const p=t?.call(this);c?.call(this,l),this.requestUpdate(e,p,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Br}static _$Ei(){if(this.hasOwnProperty(qe("elementProperties")))return;const e=ts(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(qe("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(qe("properties"))){const i=this.properties,r=[...Yn(i),...es(i)];for(const t of r)this.createProperty(t,i[t])}const e=this[Symbol.metadata];if(e!==null){const i=litPropertyMetadata.get(e);if(i!==void 0)for(const[r,t]of i)this.elementProperties.set(r,t)}this._$Eh=new Map;for(const[i,r]of this.elementProperties){const t=this._$Eu(i,r);t!==void 0&&this._$Eh.set(t,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const i=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const t of r)i.unshift(Dr(t))}else e!==void 0&&i.push(Dr(e));return i}static _$Eu(e,i){const r=i.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,i=this.constructor.elementProperties;for(const r of i.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Jn(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,i,r){this._$AK(e,r)}_$ET(e,i){const r=this.constructor.elementProperties.get(e),t=this.constructor._$Eu(e,r);if(t!==void 0&&r.reflect===!0){const c=(r.converter?.toAttribute!==void 0?r.converter:ut).toAttribute(i,r.type);this._$Em=e,c==null?this.removeAttribute(t):this.setAttribute(t,c),this._$Em=null}}_$AK(e,i){const r=this.constructor,t=r._$Eh.get(e);if(t!==void 0&&this._$Em!==t){const c=r.getPropertyOptions(t),l=typeof c.converter=="function"?{fromAttribute:c.converter}:c.converter?.fromAttribute!==void 0?c.converter:ut;this._$Em=t;const p=l.fromAttribute(i,c.type);this[t]=p??this._$Ej?.get(t)??p,this._$Em=null}}requestUpdate(e,i,r){if(e!==void 0){const t=this.constructor,c=this[e];if(r??=t.getPropertyOptions(e),!((r.hasChanged??cr)(c,i)||r.useDefault&&r.reflect&&c===this._$Ej?.get(e)&&!this.hasAttribute(t._$Eu(e,r))))return;this.C(e,i,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,i,{useDefault:r,reflect:t,wrapped:c},l){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,l??i??this[e]),c!==!0||l!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(i=void 0),this._$AL.set(e,i)),t===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,c]of this._$Ep)this[t]=c;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[t,c]of r){const{wrapped:l}=c,p=this[t];l!==!0||this._$AL.has(t)||p===void 0||this.C(t,void 0,c,p)}}let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),this._$EO?.forEach((r=>r.hostUpdate?.())),this.update(i)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(i)}willUpdate(e){}_$AE(e){this._$EO?.forEach((i=>i.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((i=>this._$ET(i,this[i]))),this._$EM()}updated(e){}firstUpdated(e){}};je.elementStyles=[],je.shadowRootOptions={mode:"open"},je[qe("elementProperties")]=new Map,je[qe("finalized")]=new Map,is?.({ReactiveElement:je}),(ft.reactiveElementVersions??=[]).push("2.1.1");const ur=globalThis,ht=ur.trustedTypes,Hr=ht?ht.createPolicy("lit-html",{createHTML:n=>n}):void 0,Oi="$lit$",ve=`lit$${Math.random().toFixed(9).slice(2)}$`,Ri="?"+ve,ns=`<${Ri}>`,Oe=document,Ze=()=>Oe.createComment(""),Ve=n=>n===null||typeof n!="object"&&typeof n!="function",hr=Array.isArray,ss=n=>hr(n)||typeof n?.[Symbol.iterator]=="function",Mt=`[
|
|
136
|
+
\f\r]`,He=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Fr=/-->/g,qr=/>/g,ke=RegExp(`>|${Mt}(?:([^\\s"'>=/]+)(${Mt}*=${Mt}*(?:[^
|
|
137
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Wr=/'/g,Gr=/"/g,$i=/^(?:script|style|textarea|title)$/i,os=n=>(e,...i)=>({_$litType$:n,strings:e,values:i}),Zr=os(1),xe=Symbol.for("lit-noChange"),re=Symbol.for("lit-nothing"),Vr=new WeakMap,Ce=Oe.createTreeWalker(Oe,129);function Mi(n,e){if(!hr(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Hr!==void 0?Hr.createHTML(e):e}const as=(n,e)=>{const i=n.length-1,r=[];let t,c=e===2?"<svg>":e===3?"<math>":"",l=He;for(let p=0;p<i;p++){const b=n[p];let h,s,u=-1,o=0;for(;o<b.length&&(l.lastIndex=o,s=l.exec(b),s!==null);)o=l.lastIndex,l===He?s[1]==="!--"?l=Fr:s[1]!==void 0?l=qr:s[2]!==void 0?($i.test(s[2])&&(t=RegExp("</"+s[2],"g")),l=ke):s[3]!==void 0&&(l=ke):l===ke?s[0]===">"?(l=t??He,u=-1):s[1]===void 0?u=-2:(u=l.lastIndex-s[2].length,h=s[1],l=s[3]===void 0?ke:s[3]==='"'?Gr:Wr):l===Gr||l===Wr?l=ke:l===Fr||l===qr?l=He:(l=ke,t=void 0);const a=l===ke&&n[p+1].startsWith("/>")?" ":"";c+=l===He?b+ns:u>=0?(r.push(h),b.slice(0,u)+Oi+b.slice(u)+ve+a):b+ve+(u===-2?p:a)}return[Mi(n,c+(n[i]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};class Je{constructor({strings:e,_$litType$:i},r){let t;this.parts=[];let c=0,l=0;const p=e.length-1,b=this.parts,[h,s]=as(e,i);if(this.el=Je.createElement(h,r),Ce.currentNode=this.el.content,i===2||i===3){const u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(t=Ce.nextNode())!==null&&b.length<p;){if(t.nodeType===1){if(t.hasAttributes())for(const u of t.getAttributeNames())if(u.endsWith(Oi)){const o=s[l++],a=t.getAttribute(u).split(ve),f=/([.?@])?(.*)/.exec(o);b.push({type:1,index:c,name:f[2],strings:a,ctor:f[1]==="."?cs:f[1]==="?"?us:f[1]==="@"?hs:pt}),t.removeAttribute(u)}else u.startsWith(ve)&&(b.push({type:6,index:c}),t.removeAttribute(u));if($i.test(t.tagName)){const u=t.textContent.split(ve),o=u.length-1;if(o>0){t.textContent=ht?ht.emptyScript:"";for(let a=0;a<o;a++)t.append(u[a],Ze()),Ce.nextNode(),b.push({type:2,index:++c});t.append(u[o],Ze())}}}else if(t.nodeType===8)if(t.data===Ri)b.push({type:2,index:c});else{let u=-1;for(;(u=t.data.indexOf(ve,u+1))!==-1;)b.push({type:7,index:c}),u+=ve.length-1}c++}}static createElement(e,i){const r=Oe.createElement("template");return r.innerHTML=e,r}}function Le(n,e,i=n,r){if(e===xe)return e;let t=r!==void 0?i._$Co?.[r]:i._$Cl;const c=Ve(e)?void 0:e._$litDirective$;return t?.constructor!==c&&(t?._$AO?.(!1),c===void 0?t=void 0:(t=new c(n),t._$AT(n,i,r)),r!==void 0?(i._$Co??=[])[r]=t:i._$Cl=t),t!==void 0&&(e=Le(n,t._$AS(n,e.values),t,r)),e}class ls{constructor(e,i){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:i},parts:r}=this._$AD,t=(e?.creationScope??Oe).importNode(i,!0);Ce.currentNode=t;let c=Ce.nextNode(),l=0,p=0,b=r[0];for(;b!==void 0;){if(l===b.index){let h;b.type===2?h=new Ke(c,c.nextSibling,this,e):b.type===1?h=new b.ctor(c,b.name,b.strings,this,e):b.type===6&&(h=new ds(c,this,e)),this._$AV.push(h),b=r[++p]}l!==b?.index&&(c=Ce.nextNode(),l++)}return Ce.currentNode=Oe,t}p(e){let i=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,i),i+=r.strings.length-2):r._$AI(e[i])),i++}}class Ke{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,i,r,t){this.type=2,this._$AH=re,this._$AN=void 0,this._$AA=e,this._$AB=i,this._$AM=r,this.options=t,this._$Cv=t?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const i=this._$AM;return i!==void 0&&e?.nodeType===11&&(e=i.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,i=this){e=Le(this,e,i),Ve(e)?e===re||e==null||e===""?(this._$AH!==re&&this._$AR(),this._$AH=re):e!==this._$AH&&e!==xe&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):ss(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==re&&Ve(this._$AH)?this._$AA.nextSibling.data=e:this.T(Oe.createTextNode(e)),this._$AH=e}$(e){const{values:i,_$litType$:r}=e,t=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=Je.createElement(Mi(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===t)this._$AH.p(i);else{const c=new ls(t,this),l=c.u(this.options);c.p(i),this.T(l),this._$AH=c}}_$AC(e){let i=Vr.get(e.strings);return i===void 0&&Vr.set(e.strings,i=new Je(e)),i}k(e){hr(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let r,t=0;for(const c of e)t===i.length?i.push(r=new Ke(this.O(Ze()),this.O(Ze()),this,this.options)):r=i[t],r._$AI(c),t++;t<i.length&&(this._$AR(r&&r._$AB.nextSibling,t),i.length=t)}_$AR(e=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class pt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,i,r,t,c){this.type=1,this._$AH=re,this._$AN=void 0,this.element=e,this.name=i,this._$AM=t,this.options=c,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=re}_$AI(e,i=this,r,t){const c=this.strings;let l=!1;if(c===void 0)e=Le(this,e,i,0),l=!Ve(e)||e!==this._$AH&&e!==xe,l&&(this._$AH=e);else{const p=e;let b,h;for(e=c[0],b=0;b<c.length-1;b++)h=Le(this,p[r+b],i,b),h===xe&&(h=this._$AH[b]),l||=!Ve(h)||h!==this._$AH[b],h===re?e=re:e!==re&&(e+=(h??"")+c[b+1]),this._$AH[b]=h}l&&!t&&this.j(e)}j(e){e===re?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class cs extends pt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===re?void 0:e}}class us extends pt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==re)}}class hs extends pt{constructor(e,i,r,t,c){super(e,i,r,t,c),this.type=5}_$AI(e,i=this){if((e=Le(this,e,i,0)??re)===xe)return;const r=this._$AH,t=e===re&&r!==re||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,c=e!==re&&(r===re||t);t&&this.element.removeEventListener(this.name,this,r),c&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class ds{constructor(e,i,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=i,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Le(this,e)}}const fs=ur.litHtmlPolyfillSupport;fs?.(Je,Ke),(ur.litHtmlVersions??=[]).push("3.3.1");const ps=(n,e,i)=>{const r=i?.renderBefore??e;let t=r._$litPart$;if(t===void 0){const c=i?.renderBefore??null;r._$litPart$=t=new Ke(e.insertBefore(Ze(),c),c,void 0,i??{})}return t._$AI(n),t};const dr=globalThis;let We=class extends je{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ps(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return xe}};We._$litElement$=!0,We.finalized=!0,dr.litElementHydrateSupport?.({LitElement:We});const gs=dr.litElementPolyfillSupport;gs?.({LitElement:We});(dr.litElementVersions??=[]).push("4.2.1");const ms={attribute:!0,type:String,converter:ut,reflect:!1,hasChanged:cr},bs=(n=ms,e,i)=>{const{kind:r,metadata:t}=i;let c=globalThis.litPropertyMetadata.get(t);if(c===void 0&&globalThis.litPropertyMetadata.set(t,c=new Map),r==="setter"&&((n=Object.create(n)).wrapped=!0),c.set(i.name,n),r==="accessor"){const{name:l}=i;return{set(p){const b=e.get.call(this);e.set.call(this,p),this.requestUpdate(l,b,n)},init(p){return p!==void 0&&this.C(l,void 0,n,p),p}}}if(r==="setter"){const{name:l}=i;return function(p){const b=this[l];e.call(this,p),this.requestUpdate(l,b,n)}}throw Error("Unsupported decorator location: "+r)};function Ni(n){return(e,i)=>typeof i=="object"?bs(n,e,i):((r,t,c)=>{const l=t.hasOwnProperty(c);return t.constructor.createProperty(c,r),l?Object.getOwnPropertyDescriptor(t,c):void 0})(n,e,i)}function Xe(n){return Ni({...n,state:!0,attribute:!1})}const Jr=(n,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(n,e,i),i);function Ie(n,e){return(i,r,t)=>{const c=l=>l.renderRoot?.querySelector(n)??null;if(e){const{get:l,set:p}=typeof r=="object"?i:t??(()=>{const b=Symbol();return{get(){return this[b]},set(h){this[b]=h}}})();return Jr(i,r,{get(){let b=l.call(this);return b===void 0&&(b=c(this),(b!==null||this.hasUpdated)&&p.call(this,b)),b}})}return Jr(i,r,{get(){return c(this)}})}}const Pi={ATTRIBUTE:1},Ti=n=>(...e)=>({_$litDirective$:n,values:e});let ji=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,i,r){this._$Ct=e,this._$AM=i,this._$Ci=r}_$AS(e,i){return this.update(e,i)}update(e,i){return this.render(...i)}};const ys=Ti(class extends ji{constructor(n){if(super(n),n.type!==Pi.ATTRIBUTE||n.name!=="class"||n.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(n){return" "+Object.keys(n).filter((e=>n[e])).join(" ")+" "}update(n,[e]){if(this.st===void 0){this.st=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter((r=>r!==""))));for(const r in e)e[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(e)}const i=n.element.classList;for(const r of this.st)r in e||(i.remove(r),this.st.delete(r));for(const r in e){const t=!!e[r];t===this.st.has(r)||this.nt?.has(r)||(t?(i.add(r),this.st.add(r)):(i.remove(r),this.st.delete(r)))}return xe}});const Li="important",ws=" !"+Li,Nt=Ti(class extends ji{constructor(n){if(super(n),n.type!==Pi.ATTRIBUTE||n.name!=="style"||n.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(n){return Object.keys(n).reduce(((e,i)=>{const r=n[i];return r==null?e:e+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(n,[e]){const{style:i}=n.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const r of this.ft)e[r]==null&&(this.ft.delete(r),r.includes("-")?i.removeProperty(r):i[r]=null);for(const r in e){const t=e[r];if(t!=null){this.ft.add(r);const c=typeof t=="string"&&t.endsWith(ws);r.includes("-")||c?i.setProperty(r,c?t.slice(0,-11):t,c?Li:""):i[r]=t}}return xe}}),vs=":host{display:block;--sd-splitter-gap: 0px;--sd-splitter-cursor: ew-resize;--sd-splitter-width: 0px;--sd-splitter-color: transparent;--sd-splitter-handle-width: 5px;--sd-splitter-handle-color: #1467ba}#root{display:flex;height:100%;width:100%;justify-content:space-between;gap:var(--sd-splitter-gap)}.pane{overflow:hidden}::slotted([slot=left]),::slotted([slot=right]){width:100%;height:100%}::slotted([slot=splitter]){flex:none;touch-action:none}#default-splitter{flex:none;touch-action:none;width:var(--sd-splitter-width);position:relative;background-color:var(--sd-splitter-color)}#default-splitter-handle{position:absolute;top:0;left:calc((var(--sd-splitter-width) - var(--sd-splitter-handle-width)) / 2);right:0;bottom:0;width:var(--sd-splitter-handle-width);background-color:var(--sd-splitter-handle-color);opacity:0;transition:opacity .2s}#default-splitter-drag-area{position:absolute;top:0;left:-3px;width:calc(var(--sd-splitter-handle-width) + 6px);bottom:0}#default-splitter-handle.hover,#default-splitter-handle.drag{opacity:1}#default-splitter-handle.hover{transition-delay:.5s}#default-splitter-handle.drag{transition:none}";var xs=Object.defineProperty,ue=(n,e,i,r)=>{for(var t=void 0,c=n.length-1,l;c>=0;c--)(l=n[c])&&(t=l(e,i,t)||t);return t&&xs(e,i,t),t};const xr=class xr extends We{constructor(){super(),this.ratio=[1,1],this._hovering=!1,this._dragging=!1,this._startX=0,this._startLeftWidth=0,this._onLeftSlotChange=()=>{this._assignSlotted("left",this._leftSlot,e=>{this._leftSlotted=e})},this._onRightSlotChange=()=>{this._assignSlotted("right",this._rightSlot,e=>{this._rightSlotted=e})},this._onSplitterSlotChange=()=>{if(this._customSplitterCleanup&&(this._customSplitterCleanup(),this._customSplitterCleanup=void 0),this._assignSlotted("splitter",this._splitterSlot,e=>{this._customSplitter=e}),this._customSplitter){const e=this._customSplitter.querySelector(".sd-splitter-drag-area")||this._customSplitter;e.addEventListener("pointerenter",this._enterDragArea),e.addEventListener("pointerleave",this._leaveDragArea),e.addEventListener("pointerdown",this._startDrag),this._customSplitterCleanup=()=>{e.removeEventListener("pointerenter",this._enterDragArea),e.removeEventListener("pointerleave",this._leaveDragArea),e.removeEventListener("pointerdown",this._startDrag)}}},this._enterDragArea=()=>{this._hovering=!0,this.setAttribute("hovering","")},this._leaveDragArea=()=>{this._hovering=!1,this._dragging||this.removeAttribute("hovering")},this._startDrag=e=>{this._dragging=!0,this.setAttribute("dragging",""),this._startX=e.clientX,this._startLeftWidth=this._leftPane.offsetWidth,window.addEventListener("pointermove",this._doDrag),window.addEventListener("pointerup",this._endDrag),window.addEventListener("contextmenu",this._preventContextMenu),window.document.body.style.cursor=getComputedStyle(this).getPropertyValue("--sd-splitter-cursor"),e.preventDefault()},this._doDrag=e=>{if(!this._dragging)return;const i=e.clientX-this._startX;this._recomputeRatio(this._startLeftWidth+i)},this._endDrag=()=>{this._dragging=!1,this.removeAttribute("dragging"),this._hovering||this.removeAttribute("hovering"),window.removeEventListener("pointermove",this._doDrag),window.removeEventListener("pointerup",this._endDrag),window.removeEventListener("contextmenu",this._preventContextMenu),window.document.body.style.removeProperty("cursor")},this._preventContextMenu=e=>{e.preventDefault()},this._resizeObserver=new ResizeObserver(()=>{this._handleResize()})}connectedCallback(){super.connectedCallback(),this._resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver.unobserve(this)}_assignSlotted(e,i,r){i.assignedElements().length>1&&console.warn(`At most one element can be assigned to slot '${e}' in sd-splitter.`),r(i.assignedElements()[0])}_handleResize(){!this._leftSlotted||!this._rightSlotted||this._recomputeRatio(this._leftPane.offsetWidth)}_recomputeRatio(e){const i=this._getAvailableWidth();if(i<=0)return;const[r,t]=this._getMinMaxWidth(this._leftSlot),[c,l]=this._getMinMaxWidth(this._rightSlot),p=Math.max(r,i-l),b=Math.min(t,i-c),h=Math.max(p,Math.min(e,b)),s=i-h;this._setRatio(h,s)}_getAvailableWidth(){const e=parseFloat(getComputedStyle(this._root).getPropertyValue("gap"))||0;return this.offsetWidth-this._getSplitter().offsetWidth-2*e}_getSplitter(){return this._customSplitter||this._defaultSplitter}_getMinMaxWidth(e){const i=getComputedStyle(e.assignedElements()[0]);return[parseFloat(i.minWidth)||0,parseFloat(i.maxWidth)||1/0]}_setRatio(e,i){const r=e+i;if(r===0)return[.5,.5];this.ratio=[e/r,i/r],this.dispatchEvent(new _s(this.ratio))}render(){if(!this._leftSlotted||!this._rightSlotted)return Zr`
|
|
138
138
|
<div id="root">
|
|
139
139
|
<slot name="left" @slotchange=${this._onLeftSlotChange} ?hidden=${!this._leftSlotted}></slot>
|
|
140
140
|
<slot name="splitter" @slotchange=${this._onSplitterSlotChange} ?hidden=${!0}></slot>
|
|
141
141
|
<slot name="right" @slotchange=${this._onRightSlotChange} ?hidden=${!this._rightSlotted}></slot>
|
|
142
142
|
</div>
|
|
143
|
-
`;const[e,
|
|
144
|
-
<div id="root" style=${
|
|
145
|
-
<div id="left" class="pane" style=${
|
|
143
|
+
`;const[e,i]=this.ratio,r=this._hovering?getComputedStyle(this).getPropertyValue("--sd-splitter-cursor"):"inherit";return Zr`
|
|
144
|
+
<div id="root" style=${Nt({cursor:r})}>
|
|
145
|
+
<div id="left" class="pane" style=${Nt({flex:e+" "+e+" 0"})}>
|
|
146
146
|
<slot name="left" @slotchange=${this._onLeftSlotChange}></slot>
|
|
147
147
|
</div>
|
|
148
148
|
<slot name="splitter" @slotchange=${this._onSplitterSlotChange}>
|
|
149
149
|
<div id="default-splitter">
|
|
150
150
|
<div
|
|
151
151
|
id="default-splitter-handle"
|
|
152
|
-
class=${
|
|
152
|
+
class=${ys({hover:this._hovering,drag:this._dragging})}
|
|
153
153
|
>
|
|
154
154
|
<div
|
|
155
155
|
id="default-splitter-drag-area"
|
|
@@ -160,41 +160,44 @@ sd-splitter.custom[hovering] .custom-splitter {
|
|
|
160
160
|
</div>
|
|
161
161
|
</div>
|
|
162
162
|
</slot>
|
|
163
|
-
<div id="right" class="pane" style=${
|
|
163
|
+
<div id="right" class="pane" style=${Nt({flex:i+" "+i+" 0"})}>
|
|
164
164
|
<slot name="right" @slotchange=${this._onRightSlotChange}></slot>
|
|
165
165
|
</div>
|
|
166
166
|
</div>
|
|
167
|
-
`}static get styles(){return[
|
|
168
|
-
${
|
|
169
|
-
`]}};
|
|
170
|
-
`+
|
|
171
|
-
|
|
167
|
+
`}static get styles(){return[Vn`
|
|
168
|
+
${Ci(vs)}
|
|
169
|
+
`]}};xr.ID="sd-splitter";let ne=xr;ue([Ni({type:Array,reflect:!0})],ne.prototype,"ratio");ue([Ie("#root",!0)],ne.prototype,"_root");ue([Ie("#left")],ne.prototype,"_leftPane");ue([Ie('slot[name="left"]')],ne.prototype,"_leftSlot");ue([Ie('slot[name="right"]')],ne.prototype,"_rightSlot");ue([Ie('slot[name="splitter"]')],ne.prototype,"_splitterSlot");ue([Ie("#default-splitter")],ne.prototype,"_defaultSplitter");ue([Xe()],ne.prototype,"_leftSlotted");ue([Xe()],ne.prototype,"_rightSlotted");ue([Xe()],ne.prototype,"_customSplitter");ue([Xe()],ne.prototype,"_hovering");ue([Xe()],ne.prototype,"_dragging");customElements.get(ne.ID)||customElements.define(ne.ID,ne);class _s extends Event{constructor(e){super("sd-splitter-resized",{bubbles:!0,composed:!0}),this.ratio=e}}function Ii(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Ss(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var e=n.default;if(typeof e=="function"){var i=function r(){var t=!1;try{t=this instanceof r}catch{}return t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var t=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(i,r,t.get?t:{enumerable:!0,get:function(){return n[r]}})}),i}var ot={exports:{}},Kr;function Es(){if(Kr)return ot.exports;Kr=1;var n=String,e=function(){return{isColorSupported:!1,reset:n,bold:n,dim:n,italic:n,underline:n,inverse:n,hidden:n,strikethrough:n,black:n,red:n,green:n,yellow:n,blue:n,magenta:n,cyan:n,white:n,gray:n,bgBlack:n,bgRed:n,bgGreen:n,bgYellow:n,bgBlue:n,bgMagenta:n,bgCyan:n,bgWhite:n,blackBright:n,redBright:n,greenBright:n,yellowBright:n,blueBright:n,magentaBright:n,cyanBright:n,whiteBright:n,bgBlackBright:n,bgRedBright:n,bgGreenBright:n,bgYellowBright:n,bgBlueBright:n,bgMagentaBright:n,bgCyanBright:n,bgWhiteBright:n}};return ot.exports=e(),ot.exports.createColors=e,ot.exports}const As={},ks=Object.freeze(Object.defineProperty({__proto__:null,default:As},Symbol.toStringTag,{value:"Module"})),he=Ss(ks);var Pt,Xr;function fr(){if(Xr)return Pt;Xr=1;let n=Es(),e=he;class i extends Error{constructor(t,c,l,p,b,h){super(t),this.name="CssSyntaxError",this.reason=t,b&&(this.file=b),p&&(this.source=p),h&&(this.plugin=h),typeof c<"u"&&typeof l<"u"&&(typeof c=="number"?(this.line=c,this.column=l):(this.line=c.line,this.column=c.column,this.endLine=l.line,this.endColumn=l.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,i)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let c=this.source;t==null&&(t=n.isColorSupported);let l=a=>a,p=a=>a,b=a=>a;if(t){let{bold:a,gray:f,red:g}=n.createColors(!0);p=m=>a(g(m)),l=m=>f(m),e&&(b=m=>e(m))}let h=c.split(/\r?\n/),s=Math.max(this.line-3,0),u=Math.min(this.line+2,h.length),o=String(u).length;return h.slice(s,u).map((a,f)=>{let g=s+1+f,m=" "+(" "+g).slice(-o)+" | ";if(g===this.line){if(a.length>160){let S=20,v=Math.max(0,this.column-S),w=Math.max(this.column+S,this.endColumn+S),y=a.slice(v,w),E=l(m.replace(/\d/g," "))+a.slice(0,Math.min(this.column-1,S-1)).replace(/[^\t]/g," ");return p(">")+l(m)+b(y)+`
|
|
170
|
+
`+E+p("^")}let _=l(m.replace(/\d/g," "))+a.slice(0,this.column-1).replace(/[^\t]/g," ");return p(">")+l(m)+b(a)+`
|
|
171
|
+
`+_+p("^")}return" "+l(m)+b(a)}).join(`
|
|
172
|
+
`)}toString(){let t=this.showSourceCode();return t&&(t=`
|
|
172
173
|
|
|
173
|
-
`+
|
|
174
|
-
`),this.name+": "+this.message+
|
|
174
|
+
`+t+`
|
|
175
|
+
`),this.name+": "+this.message+t}}return Pt=i,i.default=i,Pt}var Tt,Qr;function zi(){if(Qr)return Tt;Qr=1;const n={after:`
|
|
175
176
|
`,beforeClose:`
|
|
176
177
|
`,beforeComment:`
|
|
177
178
|
`,beforeDecl:`
|
|
178
179
|
`,beforeOpen:" ",beforeRule:`
|
|
179
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
180
|
-
`)){let
|
|
181
|
-
`)&&(
|
|
182
|
-
`)&&(
|
|
183
|
-
`)&&(
|
|
184
|
-
`)&&(
|
|
185
|
-
`);return
|
|
186
|
-
`?(
|
|
187
|
-
`);i=new Array(o.length);let s=0;for(let l=0,a=o.length;l<a;l++)i[l]=s,s+=o[l].length+1;this[It]=i}t=i[i.length-1];let r=0;if(e>=t)r=i.length-1;else{let o=i.length-2,s;for(;r<o;)if(s=r+(o-r>>1),e<i[s])o=s-1;else if(e>=i[s+1])r=s+1;else{r=s;break}}return{col:e-i[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Jt(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,i,r){if(!this.map)return!1;let o=this.map.consumer(),s=o.originalPositionFor({column:t,line:e});if(!s.source)return!1;let l;typeof i=="number"&&(l=o.originalPositionFor({column:r,line:i}));let a;Xt(s.source)?a=Ge(s.source):a=new URL(s.source,this.map.consumer().sourceRoot||Ge(this.map.mapFile));let c={column:s.column,endColumn:l&&l.column,endLine:l&&l.line,line:s.line,url:a.toString()};if(a.protocol==="file:")if(Gi)c.file=Gi(a);else throw new Error("file: protocol is not available in this PostCSS build");let h=o.sourceContentFor(s.source);return h&&(c.source=h),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var mt=ot;ot.default=ot;jt&&jt.registerInput&&jt.registerInput(ot);let{SourceMapConsumer:kn,SourceMapGenerator:it}=D,{dirname:nt,relative:Rn,resolve:Nn,sep:Mn}=D,{pathToFileURL:Ki}=D,Hs=mt,Fs=!!(kn&&it),Ws=!!(nt&&Nn&&Rn&&Mn),Gs=class{constructor(e,t,i,r){this.stringify=e,this.mapOpts=i.map||{},this.root=t,this.opts=i,this.css=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
180
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function e(r){return r[0].toUpperCase()+r.slice(1)}class i{constructor(t){this.builder=t}atrule(t,c){let l="@"+t.name,p=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?l+=t.raws.afterName:p&&(l+=" "),t.nodes)this.block(t,l+p);else{let b=(t.raws.between||"")+(c?";":"");this.builder(l+p+b,t)}}beforeAfter(t,c){let l;t.type==="decl"?l=this.raw(t,null,"beforeDecl"):t.type==="comment"?l=this.raw(t,null,"beforeComment"):c==="before"?l=this.raw(t,null,"beforeRule"):l=this.raw(t,null,"beforeClose");let p=t.parent,b=0;for(;p&&p.type!=="root";)b+=1,p=p.parent;if(l.includes(`
|
|
181
|
+
`)){let h=this.raw(t,null,"indent");if(h.length)for(let s=0;s<b;s++)l+=h}return l}block(t,c){let l=this.raw(t,"between","beforeOpen");this.builder(c+l+"{",t,"start");let p;t.nodes&&t.nodes.length?(this.body(t),p=this.raw(t,"after")):p=this.raw(t,"after","emptyBody"),p&&this.builder(p),this.builder("}",t,"end")}body(t){let c=t.nodes.length-1;for(;c>0&&t.nodes[c].type==="comment";)c-=1;let l=this.raw(t,"semicolon");for(let p=0;p<t.nodes.length;p++){let b=t.nodes[p],h=this.raw(b,"before");h&&this.builder(h),this.stringify(b,c!==p||l)}}comment(t){let c=this.raw(t,"left","commentLeft"),l=this.raw(t,"right","commentRight");this.builder("/*"+c+t.text+l+"*/",t)}decl(t,c){let l=this.raw(t,"between","colon"),p=t.prop+l+this.rawValue(t,"value");t.important&&(p+=t.raws.important||" !important"),c&&(p+=";"),this.builder(p,t)}document(t){this.body(t)}raw(t,c,l){let p;if(l||(l=c),c&&(p=t.raws[c],typeof p<"u"))return p;let b=t.parent;if(l==="before"&&(!b||b.type==="root"&&b.first===t||b&&b.type==="document"))return"";if(!b)return n[l];let h=t.root();if(h.rawCache||(h.rawCache={}),typeof h.rawCache[l]<"u")return h.rawCache[l];if(l==="before"||l==="after")return this.beforeAfter(t,l);{let s="raw"+e(l);this[s]?p=this[s](h,t):h.walk(u=>{if(p=u.raws[c],typeof p<"u")return!1})}return typeof p>"u"&&(p=n[l]),h.rawCache[l]=p,p}rawBeforeClose(t){let c;return t.walk(l=>{if(l.nodes&&l.nodes.length>0&&typeof l.raws.after<"u")return c=l.raws.after,c.includes(`
|
|
182
|
+
`)&&(c=c.replace(/[^\n]+$/,"")),!1}),c&&(c=c.replace(/\S/g,"")),c}rawBeforeComment(t,c){let l;return t.walkComments(p=>{if(typeof p.raws.before<"u")return l=p.raws.before,l.includes(`
|
|
183
|
+
`)&&(l=l.replace(/[^\n]+$/,"")),!1}),typeof l>"u"?l=this.raw(c,null,"beforeDecl"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeDecl(t,c){let l;return t.walkDecls(p=>{if(typeof p.raws.before<"u")return l=p.raws.before,l.includes(`
|
|
184
|
+
`)&&(l=l.replace(/[^\n]+$/,"")),!1}),typeof l>"u"?l=this.raw(c,null,"beforeRule"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeOpen(t){let c;return t.walk(l=>{if(l.type!=="decl"&&(c=l.raws.between,typeof c<"u"))return!1}),c}rawBeforeRule(t){let c;return t.walk(l=>{if(l.nodes&&(l.parent!==t||t.first!==l)&&typeof l.raws.before<"u")return c=l.raws.before,c.includes(`
|
|
185
|
+
`)&&(c=c.replace(/[^\n]+$/,"")),!1}),c&&(c=c.replace(/\S/g,"")),c}rawColon(t){let c;return t.walkDecls(l=>{if(typeof l.raws.between<"u")return c=l.raws.between.replace(/[^\s:]/g,""),!1}),c}rawEmptyBody(t){let c;return t.walk(l=>{if(l.nodes&&l.nodes.length===0&&(c=l.raws.after,typeof c<"u"))return!1}),c}rawIndent(t){if(t.raws.indent)return t.raws.indent;let c;return t.walk(l=>{let p=l.parent;if(p&&p!==t&&p.parent&&p.parent===t&&typeof l.raws.before<"u"){let b=l.raws.before.split(`
|
|
186
|
+
`);return c=b[b.length-1],c=c.replace(/\S/g,""),!1}}),c}rawSemicolon(t){let c;return t.walk(l=>{if(l.nodes&&l.nodes.length&&l.last.type==="decl"&&(c=l.raws.semicolon,typeof c<"u"))return!1}),c}rawValue(t,c){let l=t[c],p=t.raws[c];return p&&p.value===l?p.raw:l}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,c){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,c)}}return Tt=i,i.default=i,Tt}var jt,Yr;function gt(){if(Yr)return jt;Yr=1;let n=zi();function e(i,r){new n(r).stringify(i)}return jt=e,e.default=e,jt}var at={},ei;function pr(){return ei||(ei=1,at.isClean=Symbol("isClean"),at.my=Symbol("my")),at}var Lt,ti;function mt(){if(ti)return Lt;ti=1;let n=fr(),e=zi(),i=gt(),{isClean:r,my:t}=pr();function c(b,h){let s=new b.constructor;for(let u in b){if(!Object.prototype.hasOwnProperty.call(b,u)||u==="proxyCache")continue;let o=b[u],a=typeof o;u==="parent"&&a==="object"?h&&(s[u]=h):u==="source"?s[u]=o:Array.isArray(o)?s[u]=o.map(f=>c(f,s)):(a==="object"&&o!==null&&(o=c(o)),s[u]=o)}return s}function l(b,h){if(h&&typeof h.offset<"u")return h.offset;let s=1,u=1,o=0;for(let a=0;a<b.length;a++){if(u===h.line&&s===h.column){o=a;break}b[a]===`
|
|
187
|
+
`?(s=1,u+=1):s+=1}return o}class p{get proxyOf(){return this}constructor(h={}){this.raws={},this[r]=!1,this[t]=!0;for(let s in h)if(s==="nodes"){this.nodes=[];for(let u of h[s])typeof u.clone=="function"?this.append(u.clone()):this.append(u)}else this[s]=h[s]}addToError(h){if(h.postcssNode=this,h.stack&&this.source&&/\n\s{4}at /.test(h.stack)){let s=this.source;h.stack=h.stack.replace(/\n\s{4}at /,`$&${s.input.from}:${s.start.line}:${s.start.column}$&`)}return h}after(h){return this.parent.insertAfter(this,h),this}assign(h={}){for(let s in h)this[s]=h[s];return this}before(h){return this.parent.insertBefore(this,h),this}cleanRaws(h){delete this.raws.before,delete this.raws.after,h||delete this.raws.between}clone(h={}){let s=c(this);for(let u in h)s[u]=h[u];return s}cloneAfter(h={}){let s=this.clone(h);return this.parent.insertAfter(this,s),s}cloneBefore(h={}){let s=this.clone(h);return this.parent.insertBefore(this,s),s}error(h,s={}){if(this.source){let{end:u,start:o}=this.rangeBy(s);return this.source.input.error(h,{column:o.column,line:o.line},{column:u.column,line:u.line},s)}return new n(h)}getProxyProcessor(){return{get(h,s){return s==="proxyOf"?h:s==="root"?()=>h.root().toProxy():h[s]},set(h,s,u){return h[s]===u||(h[s]=u,(s==="prop"||s==="value"||s==="name"||s==="params"||s==="important"||s==="text")&&h.markDirty()),!0}}}markClean(){this[r]=!0}markDirty(){if(this[r]){this[r]=!1;let h=this;for(;h=h.parent;)h[r]=!1}}next(){if(!this.parent)return;let h=this.parent.index(this);return this.parent.nodes[h+1]}positionBy(h={}){let s=this.source.start;if(h.index)s=this.positionInside(h.index);else if(h.word){let u="document"in this.source.input?this.source.input.document:this.source.input.css,a=u.slice(l(u,this.source.start),l(u,this.source.end)).indexOf(h.word);a!==-1&&(s=this.positionInside(a))}return s}positionInside(h){let s=this.source.start.column,u=this.source.start.line,o="document"in this.source.input?this.source.input.document:this.source.input.css,a=l(o,this.source.start),f=a+h;for(let g=a;g<f;g++)o[g]===`
|
|
188
|
+
`?(s=1,u+=1):s+=1;return{column:s,line:u,offset:f}}prev(){if(!this.parent)return;let h=this.parent.index(this);return this.parent.nodes[h-1]}rangeBy(h={}){let s="document"in this.source.input?this.source.input.document:this.source.input.css,u={column:this.source.start.column,line:this.source.start.line,offset:l(s,this.source.start)},o=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:l(s,this.source.end)+1}:{column:u.column+1,line:u.line,offset:u.offset+1};if(h.word){let f=s.slice(l(s,this.source.start),l(s,this.source.end)).indexOf(h.word);f!==-1&&(u=this.positionInside(f),o=this.positionInside(f+h.word.length))}else h.start?u={column:h.start.column,line:h.start.line,offset:l(s,h.start)}:h.index&&(u=this.positionInside(h.index)),h.end?o={column:h.end.column,line:h.end.line,offset:l(s,h.end)}:typeof h.endIndex=="number"?o=this.positionInside(h.endIndex):h.index&&(o=this.positionInside(h.index+1));return(o.line<u.line||o.line===u.line&&o.column<=u.column)&&(o={column:u.column+1,line:u.line,offset:u.offset+1}),{end:o,start:u}}raw(h,s){return new e().raw(this,h,s)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...h){if(this.parent){let s=this,u=!1;for(let o of h)o===this?u=!0:u?(this.parent.insertAfter(s,o),s=o):this.parent.insertBefore(s,o);u||this.remove()}return this}root(){let h=this;for(;h.parent&&h.parent.type!=="document";)h=h.parent;return h}toJSON(h,s){let u={},o=s==null;s=s||new Map;let a=0;for(let f in this){if(!Object.prototype.hasOwnProperty.call(this,f)||f==="parent"||f==="proxyCache")continue;let g=this[f];if(Array.isArray(g))u[f]=g.map(m=>typeof m=="object"&&m.toJSON?m.toJSON(null,s):m);else if(typeof g=="object"&&g.toJSON)u[f]=g.toJSON(null,s);else if(f==="source"){if(g==null)continue;let m=s.get(g.input);m==null&&(m=a,s.set(g.input,a),a++),u[f]={end:g.end,inputId:m,start:g.start}}else u[f]=g}return o&&(u.inputs=[...s.keys()].map(f=>f.toJSON())),u}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(h=i){h.stringify&&(h=h.stringify);let s="";return h(this,u=>{s+=u}),s}warn(h,s,u={}){let o={node:this};for(let a in u)o[a]=u[a];return h.warn(s,o)}}return Lt=p,p.default=p,Lt}var It,ri;function bt(){if(ri)return It;ri=1;let n=mt();class e extends n{constructor(r){super(r),this.type="comment"}}return It=e,e.default=e,It}var zt,ii;function yt(){if(ii)return zt;ii=1;let n=mt();class e extends n{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(r){r&&typeof r.value<"u"&&typeof r.value!="string"&&(r={...r,value:String(r.value)}),super(r),this.type="decl"}}return zt=e,e.default=e,zt}var Dt,ni;function Re(){if(ni)return Dt;ni=1;let n=bt(),e=yt(),i=mt(),{isClean:r,my:t}=pr(),c,l,p,b;function h(o){return o.map(a=>(a.nodes&&(a.nodes=h(a.nodes)),delete a.source,a))}function s(o){if(o[r]=!1,o.proxyOf.nodes)for(let a of o.proxyOf.nodes)s(a)}class u extends i{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...a){for(let f of a){let g=this.normalize(f,this.last);for(let m of g)this.proxyOf.nodes.push(m)}return this.markDirty(),this}cleanRaws(a){if(super.cleanRaws(a),this.nodes)for(let f of this.nodes)f.cleanRaws(a)}each(a){if(!this.proxyOf.nodes)return;let f=this.getIterator(),g,m;for(;this.indexes[f]<this.proxyOf.nodes.length&&(g=this.indexes[f],m=a(this.proxyOf.nodes[g],g),m!==!1);)this.indexes[f]+=1;return delete this.indexes[f],m}every(a){return this.nodes.every(a)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let a=this.lastEach;return this.indexes[a]=0,a}getProxyProcessor(){return{get(a,f){return f==="proxyOf"?a:a[f]?f==="each"||typeof f=="string"&&f.startsWith("walk")?(...g)=>a[f](...g.map(m=>typeof m=="function"?(_,S)=>m(_.toProxy(),S):m)):f==="every"||f==="some"?g=>a[f]((m,..._)=>g(m.toProxy(),..._)):f==="root"?()=>a.root().toProxy():f==="nodes"?a.nodes.map(g=>g.toProxy()):f==="first"||f==="last"?a[f].toProxy():a[f]:a[f]},set(a,f,g){return a[f]===g||(a[f]=g,(f==="name"||f==="params"||f==="selector")&&a.markDirty()),!0}}}index(a){return typeof a=="number"?a:(a.proxyOf&&(a=a.proxyOf),this.proxyOf.nodes.indexOf(a))}insertAfter(a,f){let g=this.index(a),m=this.normalize(f,this.proxyOf.nodes[g]).reverse();g=this.index(a);for(let S of m)this.proxyOf.nodes.splice(g+1,0,S);let _;for(let S in this.indexes)_=this.indexes[S],g<_&&(this.indexes[S]=_+m.length);return this.markDirty(),this}insertBefore(a,f){let g=this.index(a),m=g===0?"prepend":!1,_=this.normalize(f,this.proxyOf.nodes[g],m).reverse();g=this.index(a);for(let v of _)this.proxyOf.nodes.splice(g,0,v);let S;for(let v in this.indexes)S=this.indexes[v],g<=S&&(this.indexes[v]=S+_.length);return this.markDirty(),this}normalize(a,f){if(typeof a=="string")a=h(l(a).nodes);else if(typeof a>"u")a=[];else if(Array.isArray(a)){a=a.slice(0);for(let m of a)m.parent&&m.parent.removeChild(m,"ignore")}else if(a.type==="root"&&this.type!=="document"){a=a.nodes.slice(0);for(let m of a)m.parent&&m.parent.removeChild(m,"ignore")}else if(a.type)a=[a];else if(a.prop){if(typeof a.value>"u")throw new Error("Value field is missed in node creation");typeof a.value!="string"&&(a.value=String(a.value)),a=[new e(a)]}else if(a.selector||a.selectors)a=[new b(a)];else if(a.name)a=[new c(a)];else if(a.text)a=[new n(a)];else throw new Error("Unknown node type in node creation");return a.map(m=>(m[t]||u.rebuild(m),m=m.proxyOf,m.parent&&m.parent.removeChild(m),m[r]&&s(m),m.raws||(m.raws={}),typeof m.raws.before>"u"&&f&&typeof f.raws.before<"u"&&(m.raws.before=f.raws.before.replace(/\S/g,"")),m.parent=this.proxyOf,m))}prepend(...a){a=a.reverse();for(let f of a){let g=this.normalize(f,this.first,"prepend").reverse();for(let m of g)this.proxyOf.nodes.unshift(m);for(let m in this.indexes)this.indexes[m]=this.indexes[m]+g.length}return this.markDirty(),this}push(a){return a.parent=this,this.proxyOf.nodes.push(a),this}removeAll(){for(let a of this.proxyOf.nodes)a.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(a){a=this.index(a),this.proxyOf.nodes[a].parent=void 0,this.proxyOf.nodes.splice(a,1);let f;for(let g in this.indexes)f=this.indexes[g],f>=a&&(this.indexes[g]=f-1);return this.markDirty(),this}replaceValues(a,f,g){return g||(g=f,f={}),this.walkDecls(m=>{f.props&&!f.props.includes(m.prop)||f.fast&&!m.value.includes(f.fast)||(m.value=m.value.replace(a,g))}),this.markDirty(),this}some(a){return this.nodes.some(a)}walk(a){return this.each((f,g)=>{let m;try{m=a(f,g)}catch(_){throw f.addToError(_)}return m!==!1&&f.walk&&(m=f.walk(a)),m})}walkAtRules(a,f){return f?a instanceof RegExp?this.walk((g,m)=>{if(g.type==="atrule"&&a.test(g.name))return f(g,m)}):this.walk((g,m)=>{if(g.type==="atrule"&&g.name===a)return f(g,m)}):(f=a,this.walk((g,m)=>{if(g.type==="atrule")return f(g,m)}))}walkComments(a){return this.walk((f,g)=>{if(f.type==="comment")return a(f,g)})}walkDecls(a,f){return f?a instanceof RegExp?this.walk((g,m)=>{if(g.type==="decl"&&a.test(g.prop))return f(g,m)}):this.walk((g,m)=>{if(g.type==="decl"&&g.prop===a)return f(g,m)}):(f=a,this.walk((g,m)=>{if(g.type==="decl")return f(g,m)}))}walkRules(a,f){return f?a instanceof RegExp?this.walk((g,m)=>{if(g.type==="rule"&&a.test(g.selector))return f(g,m)}):this.walk((g,m)=>{if(g.type==="rule"&&g.selector===a)return f(g,m)}):(f=a,this.walk((g,m)=>{if(g.type==="rule")return f(g,m)}))}}return u.registerParse=o=>{l=o},u.registerRule=o=>{b=o},u.registerAtRule=o=>{c=o},u.registerRoot=o=>{p=o},Dt=u,u.default=u,u.rebuild=o=>{o.type==="atrule"?Object.setPrototypeOf(o,c.prototype):o.type==="rule"?Object.setPrototypeOf(o,b.prototype):o.type==="decl"?Object.setPrototypeOf(o,e.prototype):o.type==="comment"?Object.setPrototypeOf(o,n.prototype):o.type==="root"&&Object.setPrototypeOf(o,p.prototype),o[t]=!0,o.nodes&&o.nodes.forEach(a=>{u.rebuild(a)})},Dt}var Ut,si;function gr(){if(si)return Ut;si=1;let n=Re();class e extends n{constructor(r){super(r),this.type="atrule"}append(...r){return this.proxyOf.nodes||(this.nodes=[]),super.append(...r)}prepend(...r){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...r)}}return Ut=e,e.default=e,n.registerAtRule(e),Ut}var Bt,oi;function mr(){if(oi)return Bt;oi=1;let n=Re(),e,i;class r extends n{constructor(c){super({type:"document",...c}),this.nodes||(this.nodes=[])}toResult(c={}){return new e(new i,this,c).stringify()}}return r.registerLazyResult=t=>{e=t},r.registerProcessor=t=>{i=t},Bt=r,r.default=r,Bt}var Ht,ai;function Cs(){if(ai)return Ht;ai=1;let n="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Ht={nanoid:(r=21)=>{let t="",c=r|0;for(;c--;)t+=n[Math.random()*64|0];return t},customAlphabet:(r,t=21)=>(c=t)=>{let l="",p=c|0;for(;p--;)l+=r[Math.random()*r.length|0];return l}},Ht}var Ft,li;function Di(){if(li)return Ft;li=1;let{existsSync:n,readFileSync:e}=he,{dirname:i,join:r}=he,{SourceMapConsumer:t,SourceMapGenerator:c}=he;function l(b){return Buffer?Buffer.from(b,"base64").toString():window.atob(b)}class p{constructor(h,s){if(s.map===!1)return;this.loadAnnotation(h),this.inline=this.startWith(this.annotation,"data:");let u=s.map?s.map.prev:void 0,o=this.loadMap(s.from,u);!this.mapFile&&s.from&&(this.mapFile=s.from),this.mapFile&&(this.root=i(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new t(this.text)),this.consumerCache}decodeInline(h){let s=/^data:application\/json;charset=utf-?8;base64,/,u=/^data:application\/json;base64,/,o=/^data:application\/json;charset=utf-?8,/,a=/^data:application\/json,/,f=h.match(o)||h.match(a);if(f)return decodeURIComponent(h.substr(f[0].length));let g=h.match(s)||h.match(u);if(g)return l(h.substr(g[0].length));let m=h.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}getAnnotationURL(h){return h.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(h){return typeof h!="object"?!1:typeof h.mappings=="string"||typeof h._mappings=="string"||Array.isArray(h.sections)}loadAnnotation(h){let s=h.match(/\/\*\s*# sourceMappingURL=/g);if(!s)return;let u=h.lastIndexOf(s.pop()),o=h.indexOf("*/",u);u>-1&&o>-1&&(this.annotation=this.getAnnotationURL(h.substring(u,o)))}loadFile(h){if(this.root=i(h),n(h))return this.mapFile=h,e(h,"utf-8").toString().trim()}loadMap(h,s){if(s===!1)return!1;if(s){if(typeof s=="string")return s;if(typeof s=="function"){let u=s(h);if(u){let o=this.loadFile(u);if(!o)throw new Error("Unable to load previous source map: "+u.toString());return o}}else{if(s instanceof t)return c.fromSourceMap(s).toString();if(s instanceof c)return s.toString();if(this.isMap(s))return JSON.stringify(s);throw new Error("Unsupported previous source map format: "+s.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let u=this.annotation;return h&&(u=r(i(h),u)),this.loadFile(u)}}}startWith(h,s){return h?h.substr(0,s.length)===s:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Ft=p,p.default=p,Ft}var qt,ci;function wt(){if(ci)return qt;ci=1;let{nanoid:n}=Cs(),{isAbsolute:e,resolve:i}=he,{SourceMapConsumer:r,SourceMapGenerator:t}=he,{fileURLToPath:c,pathToFileURL:l}=he,p=fr(),b=Di(),h=he,s=Symbol("lineToIndexCache"),u=!!(r&&t),o=!!(i&&e);function a(g){if(g[s])return g[s];let m=g.css.split(`
|
|
189
|
+
`),_=new Array(m.length),S=0;for(let v=0,w=m.length;v<w;v++)_[v]=S,S+=m[v].length+1;return g[s]=_,_}class f{get from(){return this.file||this.id}constructor(m,_={}){if(m===null||typeof m>"u"||typeof m=="object"&&!m.toString)throw new Error(`PostCSS received ${m} instead of CSS string`);if(this.css=m.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,_.document&&(this.document=_.document.toString()),_.from&&(!o||/^\w+:\/\//.test(_.from)||e(_.from)?this.file=_.from:this.file=i(_.from)),o&&u){let S=new b(this.css,_);if(S.text){this.map=S;let v=S.consumer().file;!this.file&&v&&(this.file=this.mapResolve(v))}}this.file||(this.id="<input css "+n(6)+">"),this.map&&(this.map.file=this.from)}error(m,_,S,v={}){let w,y,E,O,j;if(_&&typeof _=="object"){let P=_,J=S;if(typeof P.offset=="number"){O=P.offset;let F=this.fromOffset(O);_=F.line,S=F.col}else _=P.line,S=P.column,O=this.fromLineAndColumn(_,S);if(typeof J.offset=="number"){E=J.offset;let F=this.fromOffset(E);y=F.line,w=F.col}else y=J.line,w=J.column,E=this.fromLineAndColumn(J.line,J.column)}else if(S)O=this.fromLineAndColumn(_,S);else{O=_;let P=this.fromOffset(O);_=P.line,S=P.col}let U=this.origin(_,S,y,w);return U?j=new p(m,U.endLine===void 0?U.line:{column:U.column,line:U.line},U.endLine===void 0?U.column:{column:U.endColumn,line:U.endLine},U.source,U.file,v.plugin):j=new p(m,y===void 0?_:{column:S,line:_},y===void 0?S:{column:w,line:y},this.css,this.file,v.plugin),j.input={column:S,endColumn:w,endLine:y,endOffset:E,line:_,offset:O,source:this.css},this.file&&(l&&(j.input.url=l(this.file).toString()),j.input.file=this.file),j}fromLineAndColumn(m,_){return a(this)[m-1]+_-1}fromOffset(m){let _=a(this),S=_[_.length-1],v=0;if(m>=S)v=_.length-1;else{let w=_.length-2,y;for(;v<w;)if(y=v+(w-v>>1),m<_[y])w=y-1;else if(m>=_[y+1])v=y+1;else{v=y;break}}return{col:m-_[v]+1,line:v+1}}mapResolve(m){return/^\w+:\/\//.test(m)?m:i(this.map.consumer().sourceRoot||this.map.root||".",m)}origin(m,_,S,v){if(!this.map)return!1;let w=this.map.consumer(),y=w.originalPositionFor({column:_,line:m});if(!y.source)return!1;let E;typeof S=="number"&&(E=w.originalPositionFor({column:v,line:S}));let O;e(y.source)?O=l(y.source):O=new URL(y.source,this.map.consumer().sourceRoot||l(this.map.mapFile));let j={column:y.column,endColumn:E&&E.column,endLine:E&&E.line,line:y.line,url:O.toString()};if(O.protocol==="file:")if(c)j.file=c(O);else throw new Error("file: protocol is not available in this PostCSS build");let U=w.sourceContentFor(y.source);return U&&(j.source=U),j}toJSON(){let m={};for(let _ of["hasBOM","css","file","id"])this[_]!=null&&(m[_]=this[_]);return this.map&&(m.map={...this.map},m.map.consumerCache&&(m.map.consumerCache=void 0)),m}}return qt=f,f.default=f,h&&h.registerInput&&h.registerInput(f),qt}var Wt,ui;function Qe(){if(ui)return Wt;ui=1;let n=Re(),e,i;class r extends n{constructor(c){super(c),this.type="root",this.nodes||(this.nodes=[])}normalize(c,l,p){let b=super.normalize(c);if(l){if(p==="prepend")this.nodes.length>1?l.raws.before=this.nodes[1].raws.before:delete l.raws.before;else if(this.first!==l)for(let h of b)h.raws.before=l.raws.before}return b}removeChild(c,l){let p=this.index(c);return!l&&p===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[p].raws.before),super.removeChild(c)}toResult(c={}){return new e(new i,this,c).stringify()}}return r.registerLazyResult=t=>{e=t},r.registerProcessor=t=>{i=t},Wt=r,r.default=r,n.registerRoot(r),Wt}var Gt,hi;function Ui(){if(hi)return Gt;hi=1;let n={comma(e){return n.split(e,[","],!0)},space(e){let i=[" ",`
|
|
190
|
+
`," "];return n.split(e,i)},split(e,i,r){let t=[],c="",l=!1,p=0,b=!1,h="",s=!1;for(let u of e)s?s=!1:u==="\\"?s=!0:b?u===h&&(b=!1):u==='"'||u==="'"?(b=!0,h=u):u==="("?p+=1:u===")"?p>0&&(p-=1):p===0&&i.includes(u)&&(l=!0),l?(c!==""&&t.push(c.trim()),c="",l=!1):c+=u;return(r||c!=="")&&t.push(c.trim()),t}};return Gt=n,n.default=n,Gt}var Zt,di;function br(){if(di)return Zt;di=1;let n=Re(),e=Ui();class i extends n{get selectors(){return e.comma(this.selector)}set selectors(t){let c=this.selector?this.selector.match(/,\s*/):null,l=c?c[0]:","+this.raw("between","beforeOpen");this.selector=t.join(l)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}}return Zt=i,i.default=i,n.registerRule(i),Zt}var Vt,fi;function Os(){if(fi)return Vt;fi=1;let n=gr(),e=bt(),i=yt(),r=wt(),t=Di(),c=Qe(),l=br();function p(b,h){if(Array.isArray(b))return b.map(o=>p(o));let{inputs:s,...u}=b;if(s){h=[];for(let o of s){let a={...o,__proto__:r.prototype};a.map&&(a.map={...a.map,__proto__:t.prototype}),h.push(a)}}if(u.nodes&&(u.nodes=b.nodes.map(o=>p(o,h))),u.source){let{inputId:o,...a}=u.source;u.source=a,o!=null&&(u.source.input=h[o])}if(u.type==="root")return new c(u);if(u.type==="decl")return new i(u);if(u.type==="rule")return new l(u);if(u.type==="comment")return new e(u);if(u.type==="atrule")return new n(u);throw new Error("Unknown node type: "+b.type)}return Vt=p,p.default=p,Vt}var Jt,pi;function Bi(){if(pi)return Jt;pi=1;let{dirname:n,relative:e,resolve:i,sep:r}=he,{SourceMapConsumer:t,SourceMapGenerator:c}=he,{pathToFileURL:l}=he,p=wt(),b=!!(t&&c),h=!!(n&&i&&e&&r);class s{constructor(o,a,f,g){this.stringify=o,this.mapOpts=f.map||{},this.root=a,this.opts=f,this.css=g,this.originalCSS=g,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let o;this.isInline()?o="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?o=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?o=this.mapOpts.annotation(this.opts.to,this.root):o=this.outputFile()+".map";let a=`
|
|
188
191
|
`;this.css.includes(`\r
|
|
189
|
-
`)&&(
|
|
190
|
-
`),this.css+=
|
|
191
|
-
`),t=l.length-s):t+=l.length,a&&c!=="start"){let h=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==h.last||h.raws.semicolon)&&(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=e,r.generated.column=t-2,this.map.addMapping(r)):(r.source=i,r.original.line=1,r.original.column=0,r.generated.line=e,r.generated.column=t-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let i=this.opts.to?nt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(i=nt(Nn(i,this.mapOpts.annotation)));let r=Rn(i,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Hs(this.css,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let i=t.source.input.from;if(i&&!e[i]){e[i]=!0;let r=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ki){let i=Ki(e).toString();return this.memoizedFileURLs.set(e,i),i}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Mn==="\\"&&(e=e.replace(/\\/g,"/"));let i=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,i),i}};var Pn=Gs;let Zs=pt,Qt=class extends Zs{constructor(e){super(e),this.type="comment"}};var bt=Qt;Qt.default=Qt;let{isClean:Tn,my:Ln}=ze,jn=gt,In=bt,Vs=pt,zn,ai,ci,Un;function Dn(n){return n.map(e=>(e.nodes&&(e.nodes=Dn(e.nodes)),delete e.source,e))}function Bn(n){if(n[Tn]=!1,n.proxyOf.nodes)for(let e of n.proxyOf.nodes)Bn(e)}let q=class Hn extends Vs{append(...e){for(let t of e){let i=this.normalize(t,this.last);for(let r of i)this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),i,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(i=this.indexes[t],r=e(this.proxyOf.nodes[i],i),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...i)=>e[t](...i.map(r=>typeof r=="function"?(o,s)=>r(o.toProxy(),s):r)):t==="every"||t==="some"?i=>e[t]((r,...o)=>i(r.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(i=>i.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,i){return e[t]===i||(e[t]=i,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let i=this.index(e),r=this.normalize(t,this.proxyOf.nodes[i]).reverse();i=this.index(e);for(let s of r)this.proxyOf.nodes.splice(i+1,0,s);let o;for(let s in this.indexes)o=this.indexes[s],i<o&&(this.indexes[s]=o+r.length);return this.markDirty(),this}insertBefore(e,t){let i=this.index(e),r=i===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[i],r).reverse();i=this.index(e);for(let l of o)this.proxyOf.nodes.splice(i,0,l);let s;for(let l in this.indexes)s=this.indexes[l],i<=s&&(this.indexes[l]=s+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Dn(zn(e).nodes);else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new jn(e)]}else if(e.selector)e=[new ai(e)];else if(e.name)e=[new ci(e)];else if(e.text)e=[new In(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[Ln]||Hn.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[Tn]&&Bn(r),typeof r.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(r.raws.before=t.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let t of e){let i=this.normalize(t,this.first,"prepend").reverse();for(let r of i)this.proxyOf.nodes.unshift(r);for(let r in this.indexes)this.indexes[r]=this.indexes[r]+i.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let i in this.indexes)t=this.indexes[i],t>=e&&(this.indexes[i]=t-1);return this.markDirty(),this}replaceValues(e,t,i){return i||(i=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,i))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,i)=>{let r;try{r=e(t,i)}catch(o){throw t.addToError(o)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((i,r)=>{if(i.type==="atrule"&&e.test(i.name))return t(i,r)}):this.walk((i,r)=>{if(i.type==="atrule"&&i.name===e)return t(i,r)}):(t=e,this.walk((i,r)=>{if(i.type==="atrule")return t(i,r)}))}walkComments(e){return this.walk((t,i)=>{if(t.type==="comment")return e(t,i)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((i,r)=>{if(i.type==="decl"&&e.test(i.prop))return t(i,r)}):this.walk((i,r)=>{if(i.type==="decl"&&i.prop===e)return t(i,r)}):(t=e,this.walk((i,r)=>{if(i.type==="decl")return t(i,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((i,r)=>{if(i.type==="rule"&&e.test(i.selector))return t(i,r)}):this.walk((i,r)=>{if(i.type==="rule"&&i.selector===e)return t(i,r)}):(t=e,this.walk((i,r)=>{if(i.type==="rule")return t(i,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};q.registerParse=n=>{zn=n};q.registerRule=n=>{ai=n};q.registerAtRule=n=>{ci=n};q.registerRoot=n=>{Un=n};var ae=q;q.default=q;q.rebuild=n=>{n.type==="atrule"?Object.setPrototypeOf(n,ci.prototype):n.type==="rule"?Object.setPrototypeOf(n,ai.prototype):n.type==="decl"?Object.setPrototypeOf(n,jn.prototype):n.type==="comment"?Object.setPrototypeOf(n,In.prototype):n.type==="root"&&Object.setPrototypeOf(n,Un.prototype),n[Ln]=!0,n.nodes&&n.nodes.forEach(e=>{q.rebuild(e)})};let Ks=ae,Fn,Wn,Re=class extends Ks{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Fn(new Wn,this,e).stringify()}};Re.registerLazyResult=n=>{Fn=n};Re.registerProcessor=n=>{Wn=n};var hi=Re;Re.default=Re;let Yt=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let i=t.node.rangeBy(t);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in t)this[i]=t[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Gn=Yt;Yt.default=Yt;let qs=Gn,ei=class{constructor(e,t,i){this.processor=e,this.messages=[],this.root=t,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let i=new qs(e,t);return this.messages.push(i),i}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var ui=ei;ei.default=ei;const zt=39,qi=34,Ze=92,Xi=47,Ve=10,xe=32,Ke=12,qe=9,Xe=13,Xs=91,Js=93,Qs=40,Ys=41,eo=123,to=125,io=59,no=42,ro=58,so=64,Je=/[\t\n\f\r "#'()/;[\\\]{}]/g,Qe=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,oo=/.[\r\n"'(/\\]/,Ji=/[\da-f]/i;var lo=function(e,t={}){let i=e.css.valueOf(),r=t.ignoreErrors,o,s,l,a,c,h,f,p,_,O,N=i.length,b=0,G=[],Z=[];function ee(){return b}function z(B){throw e.error("Unclosed "+B,b)}function V(){return Z.length===0&&b>=N}function ve(B){if(Z.length)return Z.pop();if(b>=N)return;let L=B?B.ignoreUnclosed:!1;switch(o=i.charCodeAt(b),o){case Ve:case xe:case qe:case Xe:case Ke:{s=b;do s+=1,o=i.charCodeAt(s);while(o===xe||o===Ve||o===qe||o===Xe||o===Ke);O=["space",i.slice(b,s)],b=s-1;break}case Xs:case Js:case eo:case to:case ro:case io:case Ys:{let te=String.fromCharCode(o);O=[te,te,b];break}case Qs:{if(p=G.length?G.pop()[1]:"",_=i.charCodeAt(b+1),p==="url"&&_!==zt&&_!==qi&&_!==xe&&_!==Ve&&_!==qe&&_!==Ke&&_!==Xe){s=b;do{if(h=!1,s=i.indexOf(")",s+1),s===-1)if(r||L){s=b;break}else z("bracket");for(f=s;i.charCodeAt(f-1)===Ze;)f-=1,h=!h}while(h);O=["brackets",i.slice(b,s+1),b,s],b=s}else s=i.indexOf(")",b+1),a=i.slice(b,s+1),s===-1||oo.test(a)?O=["(","(",b]:(O=["brackets",a,b,s],b=s);break}case zt:case qi:{l=o===zt?"'":'"',s=b;do{if(h=!1,s=i.indexOf(l,s+1),s===-1)if(r||L){s=b+1;break}else z("string");for(f=s;i.charCodeAt(f-1)===Ze;)f-=1,h=!h}while(h);O=["string",i.slice(b,s+1),b,s],b=s;break}case so:{Je.lastIndex=b+1,Je.test(i),Je.lastIndex===0?s=i.length-1:s=Je.lastIndex-2,O=["at-word",i.slice(b,s+1),b,s],b=s;break}case Ze:{for(s=b,c=!0;i.charCodeAt(s+1)===Ze;)s+=1,c=!c;if(o=i.charCodeAt(s+1),c&&o!==Xi&&o!==xe&&o!==Ve&&o!==qe&&o!==Xe&&o!==Ke&&(s+=1,Ji.test(i.charAt(s)))){for(;Ji.test(i.charAt(s+1));)s+=1;i.charCodeAt(s+1)===xe&&(s+=1)}O=["word",i.slice(b,s+1),b,s],b=s;break}default:{o===Xi&&i.charCodeAt(b+1)===no?(s=i.indexOf("*/",b+2)+1,s===0&&(r||L?s=i.length:z("comment")),O=["comment",i.slice(b,s+1),b,s],b=s):(Qe.lastIndex=b+1,Qe.test(i),Qe.lastIndex===0?s=i.length-1:s=Qe.lastIndex-2,O=["word",i.slice(b,s+1),b,s],G.push(O),b=s);break}}return b++,O}function he(B){Z.push(B)}return{back:he,endOfFile:V,nextToken:ve,position:ee}};let Zn=ae,lt=class extends Zn{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var di=lt;lt.default=lt;Zn.registerAtRule(lt);let Vn=ae,Kn,qn,ge=class extends Vn{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,i){let r=super.normalize(e);if(t){if(i==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of r)o.raws.before=t.raws.before}return r}removeChild(e,t){let i=this.index(e);return!t&&i===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(e)}toResult(e={}){return new Kn(new qn,this,e).stringify()}};ge.registerLazyResult=n=>{Kn=n};ge.registerProcessor=n=>{qn=n};var Ue=ge;ge.default=ge;Vn.registerRoot(ge);let Ne={comma(n){return Ne.split(n,[","],!0)},space(n){let e=[" ",`
|
|
192
|
-
`," "];return Ne.split(n,e)},split(n,e,t){let i=[],r="",o=!1,s=0,l=!1,a="",c=!1;for(let h of n)c?c=!1:h==="\\"?c=!0:l?h===a&&(l=!1):h==='"'||h==="'"?(l=!0,a=h):h==="("?s+=1:h===")"?s>0&&(s-=1):s===0&&e.includes(h)&&(o=!0),o?(r!==""&&i.push(r.trim()),r="",o=!1):r+=h;return(t||r!=="")&&i.push(r.trim()),i}};var Xn=Ne;Ne.default=Ne;let Jn=ae,ao=Xn,at=class extends Jn{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return ao.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,i=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(i)}};var fi=at;at.default=at;Jn.registerRule(at);let co=gt,ho=lo,uo=bt,fo=di,po=Ue,Qi=fi;const Yi={empty:!0,space:!0};function go(n){for(let e=n.length-1;e>=0;e--){let t=n[e],i=t[3]||t[2];if(i)return i}}let mo=class{constructor(e){this.input=e,this.root=new po,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new fo;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let i,r,o,s=!1,l=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),i=e[0],i==="("||i==="["?c.push(i==="("?")":"]"):i==="{"&&c.length>0?c.push("}"):i===c[c.length-1]&&c.pop(),c.length===0)if(i===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){l=!0;break}else if(i==="}"){if(a.length>0){for(o=a.length-1,r=a[o];r&&r[0]==="space";)r=a[--o];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),s&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let i=0,r;for(let o=t-1;o>=0&&(r=e[o],!(r[0]!=="space"&&(i+=1,i===2)));o--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(e){let t=0,i,r,o;for(let[s,l]of e.entries()){if(i=l,r=i[0],r==="("&&(t+=1),r===")"&&(t-=1),t===0&&r===":")if(!o)this.doubleColon(i);else{if(o[0]==="word"&&o[1]==="progid")continue;return s}o=i}return!1}comment(e){let t=new uo;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let i=e[1].slice(2,-2);if(/^\s*$/.test(i))t.text="",t.raws.left=i,t.raws.right="";else{let r=i.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}}createTokenizer(){this.tokenizer=ho(this.input)}decl(e,t){let i=new co;this.init(i,e[0][2]);let r=e[e.length-1];for(r[0]===";"&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(r[3]||r[2]||go(e)),i.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){i.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),i.raws.between+=o[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let s=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)s.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(o=e[c],o[1].toLowerCase()==="!important"){i.important=!0;let h=this.stringFrom(e,c);h=this.spacesFromEnd(e)+h,h!==" !important"&&(i.raws.important=h);break}else if(o[1].toLowerCase()==="important"){let h=e.slice(0),f="";for(let p=c;p>0;p--){let _=h[p][0];if(f.trim().indexOf("!")===0&&_!=="space")break;f=h.pop()[1]+f}f.trim().indexOf("!")===0&&(i.important=!0,i.raws.important=f,e=h)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(i.raws.between+=s.map(c=>c[1]).join(""),s=[]),this.raw(i,"value",s.concat(e),t),i.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Qi;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,i=null,r=!1,o=null,s=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(i=c[0],a.push(c),i==="("||i==="[")o||(o=c),s.push(i==="("?")":"]");else if(l&&r&&i==="{")o||(o=c),s.push("}");else if(s.length===0)if(i===";")if(r){this.decl(a,l);return}else break;else if(i==="{"){this.rule(a);return}else if(i==="}"){this.tokenizer.back(a.pop()),t=!0;break}else i===":"&&(r=!0);else i===s[s.length-1]&&(s.pop(),s.length===0&&(o=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),s.length>0&&this.unclosedBracket(o),t&&r){if(!l)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,i,r){let o,s,l=i.length,a="",c=!0,h,f;for(let p=0;p<l;p+=1)o=i[p],s=o[0],s==="space"&&p===l-1&&!r?c=!1:s==="comment"?(f=i[p-1]?i[p-1][0]:"empty",h=i[p+1]?i[p+1][0]:"empty",!Yi[f]&&!Yi[h]?a.slice(-1)===","?c=!1:a+=o[1]:c=!1):a+=o[1];if(!c){let p=i.reduce((_,O)=>_+O[1],"");e.raws[t]={raw:p,value:a}}e[t]=a}rule(e){e.pop();let t=new Qi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,i="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)i=e.pop()[1]+i;return i}spacesAndCommentsFromStart(e){let t,i="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)i+=e.shift()[1];return i}spacesFromEnd(e){let t,i="";for(;e.length&&(t=e[e.length-1][0],t==="space");)i=e.pop()[1]+i;return i}stringFrom(e,t){let i="";for(let r=t;r<e.length;r++)i+=e[r][1];return e.splice(t,e.length-t),i}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var bo=mo;let yo=ae,wo=bo,vo=mt;function ct(n,e){let t=new vo(n,e),i=new wo(t);try{i.parse()}catch(r){throw r}return i.root}var pi=ct;ct.default=ct;yo.registerParse(ct);let{isClean:W,my:_o}=ze,xo=Pn,Eo=ft,So=ae,Ao=hi,en=ui,$o=pi,Co=Ue;const Oo={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ko={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Ro={Once:!0,postcssPlugin:!0,prepare:!0},me=0;function Ee(n){return typeof n=="object"&&typeof n.then=="function"}function Qn(n){let e=!1,t=Oo[n.type];return n.type==="decl"?e=n.prop.toLowerCase():n.type==="atrule"&&(e=n.name.toLowerCase()),e&&n.append?[t,t+"-"+e,me,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:n.append?[t,me,t+"Exit"]:[t,t+"Exit"]}function tn(n){let e;return n.type==="document"?e=["Document",me,"DocumentExit"]:n.type==="root"?e=["Root",me,"RootExit"]:e=Qn(n),{eventIndex:0,events:e,iterator:0,node:n,visitorIndex:0,visitors:[]}}function ti(n){return n[W]=!1,n.nodes&&n.nodes.forEach(e=>ti(e)),n}let ii={},be=class Yn{constructor(e,t,i){this.stringified=!1,this.processed=!1;let r;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))r=ti(t);else if(t instanceof Yn||t instanceof en)r=ti(t.root),t.map&&(typeof i.map>"u"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=t.map);else{let o=$o;i.syntax&&(o=i.syntax.parse),i.parser&&(o=i.parser),o.parse&&(o=o.parse);try{r=o(t,i)}catch(s){this.processed=!0,this.error=s}r&&!r[_o]&&So.rebuild(r)}this.result=new en(e,r,i),this.helpers={...ii,postcss:ii,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let i=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=i.postcssPlugin,e.setMessage()):i.postcssVersion}catch(r){console&&console.error&&console.error(r)}return e}prepareVisitors(){this.listeners={};let e=(t,i,r)=>{this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push([t,r])};for(let t of this.plugins)if(typeof t=="object")for(let i in t){if(!ko[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ro[i])if(typeof t[i]=="object")for(let r in t[i])r==="*"?e(t,i,t[i][r]):e(t,i+"-"+r.toLowerCase(),t[i][r]);else typeof t[i]=="function"&&e(t,i,t[i])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],i=this.runOnRoot(t);if(Ee(i))try{await i}catch(r){throw this.handleError(r)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[W];){e[W]=!0;let t=[tn(e)];for(;t.length>0;){let i=this.visitTick(t);if(Ee(i))try{await i}catch(r){let o=t[t.length-1].node;throw this.handleError(r,o)}}}if(this.listeners.OnceExit)for(let[t,i]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let r=e.nodes.map(o=>i(o,this.helpers));await Promise.all(r)}else await i(e,this.helpers)}catch(r){throw this.handleError(r)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(i=>e.Once(i,this.helpers));return Ee(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Eo;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new xo(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Ee(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[W];)e[W]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[i,r]of e){this.result.lastPlugin=i;let o;try{o=r(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Ee(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:i,visitors:r}=t;if(i.type!=="root"&&i.type!=="document"&&!i.parent){e.pop();return}if(r.length>0&&t.visitorIndex<r.length){let[s,l]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=s;try{return l(i.toProxy(),this.helpers)}catch(a){throw this.handleError(a,i)}}if(t.iterator!==0){let s=t.iterator,l;for(;l=i.nodes[i.indexes[s]];)if(i.indexes[s]+=1,!l[W]){l[W]=!0,e.push(tn(l));return}t.iterator=0,delete i.indexes[s]}let o=t.events;for(;t.eventIndex<o.length;){let s=o[t.eventIndex];if(t.eventIndex+=1,s===me){i.nodes&&i.nodes.length&&(i[W]=!0,t.iterator=i.getIterator());return}else if(this.listeners[s]){t.visitors=this.listeners[s];return}}e.pop()}walkSync(e){e[W]=!0;let t=Qn(e);for(let i of t)if(i===me)e.nodes&&e.each(r=>{r[W]||this.walkSync(r)});else{let r=this.listeners[i];if(r&&this.visitSync(r,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};be.registerPostcss=n=>{ii=n};var er=be;be.default=be;Co.registerLazyResult(be);Ao.registerLazyResult(be);let No=Pn,Mo=ft,Po=pi;const To=ui;let ni=class{constructor(e,t,i){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=i,this._map=void 0;let r,o=Mo;this.result=new To(this._processor,r,this._opts),this.result.css=t;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let l=new No(o,r,this._opts,t);if(l.isMap()){let[a,c]=l.generate();a&&(this.result.css=a),c&&(this.result.map=c)}}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Po;try{e=t(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Lo=ni;ni.default=ni;let jo=Lo,Io=er,zo=hi,Uo=Ue,Me=class{constructor(e=[]){this.version="8.4.32",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let i of e)if(i.postcss===!0?i=i():i.postcss&&(i=i.postcss),typeof i=="object"&&Array.isArray(i.plugins))t=t.concat(i.plugins);else if(typeof i=="object"&&i.postcssPlugin)t.push(i);else if(typeof i=="function")t.push(i);else if(!(typeof i=="object"&&(i.parse||i.stringify)))throw new Error(i+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length===0&&typeof t.parser>"u"&&typeof t.stringifier>"u"&&typeof t.syntax>"u"?new jo(this,e,t):new Io(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Do=Me;Me.default=Me;Uo.registerProcessor(Me);zo.registerProcessor(Me);let Bo=gt,Ho=On,Fo=bt,Wo=di,Go=mt,Zo=Ue,Vo=fi;function Pe(n,e){if(Array.isArray(n))return n.map(r=>Pe(r));let{inputs:t,...i}=n;if(t){e=[];for(let r of t){let o={...r,__proto__:Go.prototype};o.map&&(o.map={...o.map,__proto__:Ho.prototype}),e.push(o)}}if(i.nodes&&(i.nodes=n.nodes.map(r=>Pe(r,e))),i.source){let{inputId:r,...o}=i.source;i.source=o,r!=null&&(i.source.input=e[r])}if(i.type==="root")return new Zo(i);if(i.type==="decl")return new Bo(i);if(i.type==="rule")return new Vo(i);if(i.type==="comment")return new Fo(i);if(i.type==="atrule")return new Wo(i);throw new Error("Unknown node type: "+n.type)}var Ko=Pe;Pe.default=Pe;var nn={};let qo=li,tr=gt,Xo=er,Jo=ae,gi=Do,Qo=ft,Yo=Ko,ir=hi,el=Gn,nr=bt,rr=di,tl=ui,il=mt,nl=pi,rl=Xn,sr=fi,or=Ue,sl=pt;function E(...n){return n.length===1&&Array.isArray(n[0])&&(n=n[0]),new gi(n)}E.plugin=function(e,t){let i=!1;function r(...s){console&&console.warn&&!i&&(i=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
193
|
-
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),nn.LANG&&nn.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
194
|
-
https://www.w3ctech.com/topic/2226`));let l=t(...s);return l.postcssPlugin=e,l.postcssVersion=new gi().version,l}let o;return Object.defineProperty(r,"postcss",{get(){return o||(o=r()),o}}),r.process=function(s,l,a){return E([r(a)]).process(s,l)},r};E.stringify=Qo;E.parse=nl;E.fromJSON=Yo;E.list=rl;E.comment=n=>new nr(n);E.atRule=n=>new rr(n);E.decl=n=>new tr(n);E.rule=n=>new sr(n);E.root=n=>new or(n);E.document=n=>new ir(n);E.CssSyntaxError=qo;E.Declaration=tr;E.Container=Jo;E.Processor=gi;E.Document=ir;E.Comment=nr;E.Warning=el;E.AtRule=rr;E.Result=tl;E.Input=il;E.Rule=sr;E.Root=or;E.Node=sl;Xo.registerPostcss(E);var ol=E;E.default=E;const C=Sn(ol);C.stringify;C.fromJSON;C.plugin;C.parse;C.list;C.document;C.comment;C.atRule;C.rule;C.decl;C.root;C.CssSyntaxError;C.Declaration;C.Container;C.Processor;C.Document;C.Comment;C.Warning;C.AtRule;C.Result;C.Input;C.Rule;C.Root;C.Node;var ll=function(e){const t=e.prefix,i=/\s+$/.test(t)?t:`${t} `,r=e.ignoreFiles?[].concat(e.ignoreFiles):[],o=e.includeFiles?[].concat(e.includeFiles):[];return function(s){r.length&&s.source.input.file&&rn(s.source.input.file,r)||o.length&&s.source.input.file&&!rn(s.source.input.file,o)||s.walkRules(l=>{const a=["keyframes","-webkit-keyframes","-moz-keyframes","-o-keyframes"];l.parent&&a.includes(l.parent.name)||(l.selectors=l.selectors.map(c=>e.exclude&&al(c,e.exclude)?c:e.transform?e.transform(t,c,i+c,s.source.input.file,l):i+c))})}};function rn(n,e){return e.some(t=>t instanceof RegExp?t.test(n):n.includes(t))}function al(n,e){return e.some(t=>t instanceof RegExp?t.test(n):n===t)}const cl=Sn(ll),hl="code{white-space:pre}.example{display:flex;flex-wrap:wrap;flex-direction:row;align-items:center;gap:16px}.example>*{flex:1 1 500px}.example .tab-control{overflow:hidden}.example div[role=tab]{cursor:pointer;padding:8px 16px;display:inline-block;font-size:16px;border-bottom:2px solid transparent;background-clip:padding-box;-webkit-user-select:none;user-select:none}.example div[role=tab]:hover{background-color:#1467ba14}.example div[role=tab][selected]{background-color:#1467ba21;border-bottom:2px solid #1467ba}.tab-content{margin:16px 0}.tab-content>pre{padding-top:0}.tab-content.code{max-height:500px;overflow:auto}.tab-content.code pre{margin:0}",ul="pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}";function dl(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function lr(n){return n instanceof Map?n.clear=n.delete=n.set=function(){throw new Error("map is read-only")}:n instanceof Set&&(n.add=n.clear=n.delete=function(){throw new Error("set is read-only")}),Object.freeze(n),Object.getOwnPropertyNames(n).forEach(e=>{const t=n[e],i=typeof t;(i==="object"||i==="function")&&!Object.isFrozen(t)&&lr(t)}),n}class sn{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function ar(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Q(n,...e){const t=Object.create(null);for(const i in n)t[i]=n[i];return e.forEach(function(i){for(const r in i)t[r]=i[r]}),t}const fl="</span>",on=n=>!!n.scope,pl=(n,{prefix:e})=>{if(n.startsWith("language:"))return n.replace("language:","language-");if(n.includes(".")){const t=n.split(".");return[`${e}${t.shift()}`,...t.map((i,r)=>`${i}${"_".repeat(r+1)}`)].join(" ")}return`${e}${n}`};class gl{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=ar(e)}openNode(e){if(!on(e))return;const t=pl(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){on(e)&&(this.buffer+=fl)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const ln=(n={})=>{const e={children:[]};return Object.assign(e,n),e};class mi{constructor(){this.rootNode=ln(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=ln({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t=="string"?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(i=>this._walk(e,i)),e.closeNode(t)),e}static _collapse(e){typeof e!="string"&&e.children&&(e.children.every(t=>typeof t=="string")?e.children=[e.children.join("")]:e.children.forEach(t=>{mi._collapse(t)}))}}class ml extends mi{constructor(e){super(),this.options=e}addText(e){e!==""&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const i=e.root;t&&(i.scope=`language:${t}`),this.add(i)}toHTML(){return new gl(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Te(n){return n?typeof n=="string"?n:n.source:null}function cr(n){return ce("(?=",n,")")}function bl(n){return ce("(?:",n,")*")}function yl(n){return ce("(?:",n,")?")}function ce(...n){return n.map(e=>Te(e)).join("")}function wl(n){const e=n[n.length-1];return typeof e=="object"&&e.constructor===Object?(n.splice(n.length-1,1),e):{}}function bi(...n){return"("+(wl(n).capture?"":"?:")+n.map(e=>Te(e)).join("|")+")"}function hr(n){return new RegExp(n.toString()+"|").exec("").length-1}function vl(n,e){const t=n&&n.exec(e);return t&&t.index===0}const _l=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function yi(n,{joinWith:e}){let t=0;return n.map(i=>{t+=1;const r=t;let o=Te(i),s="";for(;o.length>0;){const l=_l.exec(o);if(!l){s+=o;break}s+=o.substring(0,l.index),o=o.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?s+="\\"+String(Number(l[1])+r):(s+=l[0],l[0]==="("&&t++)}return s}).map(i=>`(${i})`).join(e)}const xl=/\b\B/,ur="[a-zA-Z]\\w*",wi="[a-zA-Z_]\\w*",dr="\\b\\d+(\\.\\d+)?",fr="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",pr="\\b(0b[01]+)",El="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Sl=(n={})=>{const e=/^#![ ]*\//;return n.binary&&(n.begin=ce(e,/.*\b/,n.binary,/\b.*/)),Q({scope:"meta",begin:e,end:/$/,relevance:0,"on:begin":(t,i)=>{t.index!==0&&i.ignoreMatch()}},n)},Le={begin:"\\\\[\\s\\S]",relevance:0},Al={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Le]},$l={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Le]},Cl={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},yt=function(n,e,t={}){const i=Q({scope:"comment",begin:n,end:e,contains:[]},t);i.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const r=bi("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return i.contains.push({begin:ce(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},Ol=yt("//","$"),kl=yt("/\\*","\\*/"),Rl=yt("#","$"),Nl={scope:"number",begin:dr,relevance:0},Ml={scope:"number",begin:fr,relevance:0},Pl={scope:"number",begin:pr,relevance:0},Tl={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Le,{begin:/\[/,end:/\]/,relevance:0,contains:[Le]}]},Ll={scope:"title",begin:ur,relevance:0},jl={scope:"title",begin:wi,relevance:0},Il={begin:"\\.\\s*"+wi,relevance:0},zl=function(n){return Object.assign(n,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})};var Ye=Object.freeze({__proto__:null,APOS_STRING_MODE:Al,BACKSLASH_ESCAPE:Le,BINARY_NUMBER_MODE:Pl,BINARY_NUMBER_RE:pr,COMMENT:yt,C_BLOCK_COMMENT_MODE:kl,C_LINE_COMMENT_MODE:Ol,C_NUMBER_MODE:Ml,C_NUMBER_RE:fr,END_SAME_AS_BEGIN:zl,HASH_COMMENT_MODE:Rl,IDENT_RE:ur,MATCH_NOTHING_RE:xl,METHOD_GUARD:Il,NUMBER_MODE:Nl,NUMBER_RE:dr,PHRASAL_WORDS_MODE:Cl,QUOTE_STRING_MODE:$l,REGEXP_MODE:Tl,RE_STARTERS_RE:El,SHEBANG:Sl,TITLE_MODE:Ll,UNDERSCORE_IDENT_RE:wi,UNDERSCORE_TITLE_MODE:jl});function Ul(n,e){n.input[n.index-1]==="."&&e.ignoreMatch()}function Dl(n,e){n.className!==void 0&&(n.scope=n.className,delete n.className)}function Bl(n,e){e&&n.beginKeywords&&(n.begin="\\b("+n.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",n.__beforeBegin=Ul,n.keywords=n.keywords||n.beginKeywords,delete n.beginKeywords,n.relevance===void 0&&(n.relevance=0))}function Hl(n,e){Array.isArray(n.illegal)&&(n.illegal=bi(...n.illegal))}function Fl(n,e){if(n.match){if(n.begin||n.end)throw new Error("begin & end are not supported with match");n.begin=n.match,delete n.match}}function Wl(n,e){n.relevance===void 0&&(n.relevance=1)}const Gl=(n,e)=>{if(!n.beforeMatch)return;if(n.starts)throw new Error("beforeMatch cannot be used with starts");const t=Object.assign({},n);Object.keys(n).forEach(i=>{delete n[i]}),n.keywords=t.keywords,n.begin=ce(t.beforeMatch,cr(t.begin)),n.starts={relevance:0,contains:[Object.assign(t,{endsParent:!0})]},n.relevance=0,delete t.beforeMatch},Zl=["of","and","for","in","not","or","if","then","parent","list","value"],Vl="keyword";function gr(n,e,t=Vl){const i=Object.create(null);return typeof n=="string"?r(t,n.split(" ")):Array.isArray(n)?r(t,n):Object.keys(n).forEach(function(o){Object.assign(i,gr(n[o],e,o))}),i;function r(o,s){e&&(s=s.map(l=>l.toLowerCase())),s.forEach(function(l){const a=l.split("|");i[a[0]]=[o,Kl(a[0],a[1])]})}}function Kl(n,e){return e?Number(e):ql(n)?0:1}function ql(n){return Zl.includes(n.toLowerCase())}const an={},oe=n=>{console.error(n)},cn=(n,...e)=>{console.log(`WARN: ${n}`,...e)},ue=(n,e)=>{an[`${n}/${e}`]||(console.log(`Deprecated as of ${n}. ${e}`),an[`${n}/${e}`]=!0)},ht=new Error;function mr(n,e,{key:t}){let i=0;const r=n[t],o={},s={};for(let l=1;l<=e.length;l++)s[l+i]=r[l],o[l+i]=!0,i+=hr(e[l-1]);n[t]=s,n[t]._emit=o,n[t]._multi=!0}function Xl(n){if(Array.isArray(n.begin)){if(n.skip||n.excludeBegin||n.returnBegin)throw oe("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ht;if(typeof n.beginScope!="object"||n.beginScope===null)throw oe("beginScope must be object"),ht;mr(n,n.begin,{key:"beginScope"}),n.begin=yi(n.begin,{joinWith:""})}}function Jl(n){if(Array.isArray(n.end)){if(n.skip||n.excludeEnd||n.returnEnd)throw oe("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ht;if(typeof n.endScope!="object"||n.endScope===null)throw oe("endScope must be object"),ht;mr(n,n.end,{key:"endScope"}),n.end=yi(n.end,{joinWith:""})}}function Ql(n){n.scope&&typeof n.scope=="object"&&n.scope!==null&&(n.beginScope=n.scope,delete n.scope)}function Yl(n){Ql(n),typeof n.beginScope=="string"&&(n.beginScope={_wrap:n.beginScope}),typeof n.endScope=="string"&&(n.endScope={_wrap:n.endScope}),Xl(n),Jl(n)}function ea(n){function e(s,l){return new RegExp(Te(s),"m"+(n.case_insensitive?"i":"")+(n.unicodeRegex?"u":"")+(l?"g":""))}class t{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,a){a.position=this.position++,this.matchIndexes[this.matchAt]=a,this.regexes.push([a,l]),this.matchAt+=hr(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(a=>a[1]);this.matcherRe=e(yi(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const a=this.matcherRe.exec(l);if(!a)return null;const c=a.findIndex((f,p)=>p>0&&f!==void 0),h=this.matchIndexes[c];return a.splice(0,c),Object.assign(a,h)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];const a=new t;return this.rules.slice(l).forEach(([c,h])=>a.addRule(c,h)),a.compile(),this.multiRegexes[l]=a,a}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,a){this.rules.push([l,a]),a.type==="begin"&&this.count++}exec(l){const a=this.getMatcher(this.regexIndex);a.lastIndex=this.lastIndex;let c=a.exec(l);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const h=this.getMatcher(0);h.lastIndex=this.lastIndex+1,c=h.exec(l)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function r(s){const l=new i;return s.contains.forEach(a=>l.addRule(a.begin,{rule:a,type:"begin"})),s.terminatorEnd&&l.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&l.addRule(s.illegal,{type:"illegal"}),l}function o(s,l){const a=s;if(s.isCompiled)return a;[Dl,Fl,Yl,Gl].forEach(h=>h(s,l)),n.compilerExtensions.forEach(h=>h(s,l)),s.__beforeBegin=null,[Bl,Hl,Wl].forEach(h=>h(s,l)),s.isCompiled=!0;let c=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),c=s.keywords.$pattern,delete s.keywords.$pattern),c=c||/\w+/,s.keywords&&(s.keywords=gr(s.keywords,n.case_insensitive)),a.keywordPatternRe=e(c,!0),l&&(s.begin||(s.begin=/\B|\b/),a.beginRe=e(a.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(a.endRe=e(a.end)),a.terminatorEnd=Te(a.end)||"",s.endsWithParent&&l.terminatorEnd&&(a.terminatorEnd+=(s.end?"|":"")+l.terminatorEnd)),s.illegal&&(a.illegalRe=e(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(h){return ta(h==="self"?s:h)})),s.contains.forEach(function(h){o(h,a)}),s.starts&&o(s.starts,l),a.matcher=r(a),a}if(n.compilerExtensions||(n.compilerExtensions=[]),n.contains&&n.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return n.classNameAliases=Q(n.classNameAliases||{}),o(n)}function br(n){return n?n.endsWithParent||br(n.starts):!1}function ta(n){return n.variants&&!n.cachedVariants&&(n.cachedVariants=n.variants.map(function(e){return Q(n,{variants:null},e)})),n.cachedVariants?n.cachedVariants:br(n)?Q(n,{starts:n.starts?Q(n.starts):null}):Object.isFrozen(n)?Q(n):n}var ia="11.9.0";class na extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const Ut=ar,hn=Q,un=Symbol("nomatch"),ra=7,yr=function(n){const e=Object.create(null),t=Object.create(null),i=[];let r=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:ml};function a(u){return l.noHighlightRe.test(u)}function c(u){let g=u.className+" ";g+=u.parentNode?u.parentNode.className:"";const w=l.languageDetectRe.exec(g);if(w){const x=L(w[1]);return x||(cn(o.replace("{}",w[1])),cn("Falling back to no-highlight mode for this block.",u)),x?w[1]:"no-highlight"}return g.split(/\s+/).find(x=>a(x)||L(x))}function h(u,g,w){let x="",k="";typeof g=="object"?(x=u,w=g.ignoreIllegals,k=g.language):(ue("10.7.0","highlight(lang, code, ...args) has been deprecated."),ue("10.7.0",`Please use highlight(code, options) instead.
|
|
195
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),k=u,x=g),w===void 0&&(w=!0);const j={code:x,language:k};ie("before:highlight",j);const X=j.result?j.result:f(j.language,j.code,w);return X.code=j.code,ie("after:highlight",X),X}function f(u,g,w,x){const k=Object.create(null);function j(d,m){return d.keywords[m]}function X(){if(!y.keywords){M.addText(A);return}let d=0;y.keywordPatternRe.lastIndex=0;let m=y.keywordPatternRe.exec(A),v="";for(;m;){v+=A.substring(d,m.index);const S=F.case_insensitive?m[0].toLowerCase():m[0],T=j(y,S);if(T){const[K,Mr]=T;if(M.addText(v),v="",k[S]=(k[S]||0)+1,k[S]<=ra&&(Fe+=Mr),K.startsWith("_"))v+=m[0];else{const Pr=F.classNameAliases[K]||K;H(m[0],Pr)}}else v+=m[0];d=y.keywordPatternRe.lastIndex,m=y.keywordPatternRe.exec(A)}v+=A.substring(d),M.addText(v)}function Be(){if(A==="")return;let d=null;if(typeof y.subLanguage=="string"){if(!e[y.subLanguage]){M.addText(A);return}d=f(y.subLanguage,A,!0,$i[y.subLanguage]),$i[y.subLanguage]=d._top}else d=_(A,y.subLanguage.length?y.subLanguage:null);y.relevance>0&&(Fe+=d.relevance),M.__addSublanguage(d._emitter,d.language)}function I(){y.subLanguage!=null?Be():X(),A=""}function H(d,m){d!==""&&(M.startScope(m),M.addText(d),M.endScope())}function xi(d,m){let v=1;const S=m.length-1;for(;v<=S;){if(!d._emit[v]){v++;continue}const T=F.classNameAliases[d[v]]||d[v],K=m[v];T?H(K,T):(A=K,X(),A=""),v++}}function Ei(d,m){return d.scope&&typeof d.scope=="string"&&M.openNode(F.classNameAliases[d.scope]||d.scope),d.beginScope&&(d.beginScope._wrap?(H(A,F.classNameAliases[d.beginScope._wrap]||d.beginScope._wrap),A=""):d.beginScope._multi&&(xi(d.beginScope,m),A="")),y=Object.create(d,{parent:{value:y}}),y}function Si(d,m,v){let S=vl(d.endRe,v);if(S){if(d["on:end"]){const T=new sn(d);d["on:end"](m,T),T.isMatchIgnored&&(S=!1)}if(S){for(;d.endsParent&&d.parent;)d=d.parent;return d}}if(d.endsWithParent)return Si(d.parent,m,v)}function Cr(d){return y.matcher.regexIndex===0?(A+=d[0],1):($t=!0,0)}function Or(d){const m=d[0],v=d.rule,S=new sn(v),T=[v.__beforeBegin,v["on:begin"]];for(const K of T)if(K&&(K(d,S),S.isMatchIgnored))return Cr(m);return v.skip?A+=m:(v.excludeBegin&&(A+=m),I(),!v.returnBegin&&!v.excludeBegin&&(A=m)),Ei(v,d),v.returnBegin?0:m.length}function kr(d){const m=d[0],v=g.substring(d.index),S=Si(y,d,v);if(!S)return un;const T=y;y.endScope&&y.endScope._wrap?(I(),H(m,y.endScope._wrap)):y.endScope&&y.endScope._multi?(I(),xi(y.endScope,d)):T.skip?A+=m:(T.returnEnd||T.excludeEnd||(A+=m),I(),T.excludeEnd&&(A=m));do y.scope&&M.closeNode(),!y.skip&&!y.subLanguage&&(Fe+=y.relevance),y=y.parent;while(y!==S.parent);return S.starts&&Ei(S.starts,d),T.returnEnd?0:m.length}function Rr(){const d=[];for(let m=y;m!==F;m=m.parent)m.scope&&d.unshift(m.scope);d.forEach(m=>M.openNode(m))}let He={};function Ai(d,m){const v=m&&m[0];if(A+=d,v==null)return I(),0;if(He.type==="begin"&&m.type==="end"&&He.index===m.index&&v===""){if(A+=g.slice(m.index,m.index+1),!r){const S=new Error(`0 width match regex (${u})`);throw S.languageName=u,S.badRule=He.rule,S}return 1}if(He=m,m.type==="begin")return Or(m);if(m.type==="illegal"&&!w){const S=new Error('Illegal lexeme "'+v+'" for mode "'+(y.scope||"<unnamed>")+'"');throw S.mode=y,S}else if(m.type==="end"){const S=kr(m);if(S!==un)return S}if(m.type==="illegal"&&v==="")return 1;if(At>1e5&&At>m.index*3)throw new Error("potential infinite loop, way more iterations than matches");return A+=v,v.length}const F=L(u);if(!F)throw oe(o.replace("{}",u)),new Error('Unknown language: "'+u+'"');const Nr=ea(F);let St="",y=x||Nr;const $i={},M=new l.__emitter(l);Rr();let A="",Fe=0,ne=0,At=0,$t=!1;try{if(F.__emitTokens)F.__emitTokens(g,M);else{for(y.matcher.considerAll();;){At++,$t?$t=!1:y.matcher.considerAll(),y.matcher.lastIndex=ne;const d=y.matcher.exec(g);if(!d)break;const m=g.substring(ne,d.index),v=Ai(m,d);ne=d.index+v}Ai(g.substring(ne))}return M.finalize(),St=M.toHTML(),{language:u,value:St,relevance:Fe,illegal:!1,_emitter:M,_top:y}}catch(d){if(d.message&&d.message.includes("Illegal"))return{language:u,value:Ut(g),illegal:!0,relevance:0,_illegalBy:{message:d.message,index:ne,context:g.slice(ne-100,ne+100),mode:d.mode,resultSoFar:St},_emitter:M};if(r)return{language:u,value:Ut(g),illegal:!1,relevance:0,errorRaised:d,_emitter:M,_top:y};throw d}}function p(u){const g={value:Ut(u),illegal:!1,relevance:0,_top:s,_emitter:new l.__emitter(l)};return g._emitter.addText(u),g}function _(u,g){g=g||l.languages||Object.keys(e);const w=p(u),x=g.filter(L).filter(De).map(I=>f(I,u,!1));x.unshift(w);const k=x.sort((I,H)=>{if(I.relevance!==H.relevance)return H.relevance-I.relevance;if(I.language&&H.language){if(L(I.language).supersetOf===H.language)return 1;if(L(H.language).supersetOf===I.language)return-1}return 0}),[j,X]=k,Be=j;return Be.secondBest=X,Be}function O(u,g,w){const x=g&&t[g]||w;u.classList.add("hljs"),u.classList.add(`language-${x}`)}function N(u){let g=null;const w=c(u);if(a(w))return;if(ie("before:highlightElement",{el:u,language:w}),u.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",u);return}if(u.children.length>0&&(l.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(u)),l.throwUnescapedHTML))throw new na("One of your code blocks includes unescaped HTML.",u.innerHTML);g=u;const x=g.textContent,k=w?h(x,{language:w,ignoreIllegals:!0}):_(x);u.innerHTML=k.value,u.dataset.highlighted="yes",O(u,w,k.language),u.result={language:k.language,re:k.relevance,relevance:k.relevance},k.secondBest&&(u.secondBest={language:k.secondBest.language,relevance:k.secondBest.relevance}),ie("after:highlightElement",{el:u,result:k,text:x})}function b(u){l=hn(l,u)}const G=()=>{z(),ue("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Z(){z(),ue("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let ee=!1;function z(){if(document.readyState==="loading"){ee=!0;return}document.querySelectorAll(l.cssSelector).forEach(N)}function V(){ee&&z()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",V,!1);function ve(u,g){let w=null;try{w=g(n)}catch(x){if(oe("Language definition for '{}' could not be registered.".replace("{}",u)),r)oe(x);else throw x;w=s}w.name||(w.name=u),e[u]=w,w.rawDefinition=g.bind(null,n),w.aliases&&te(w.aliases,{languageName:u})}function he(u){delete e[u];for(const g of Object.keys(t))t[g]===u&&delete t[g]}function B(){return Object.keys(e)}function L(u){return u=(u||"").toLowerCase(),e[u]||e[t[u]]}function te(u,{languageName:g}){typeof u=="string"&&(u=[u]),u.forEach(w=>{t[w.toLowerCase()]=g})}function De(u){const g=L(u);return g&&!g.disableAutodetect}function vt(u){u["before:highlightBlock"]&&!u["before:highlightElement"]&&(u["before:highlightElement"]=g=>{u["before:highlightBlock"](Object.assign({block:g.el},g))}),u["after:highlightBlock"]&&!u["after:highlightElement"]&&(u["after:highlightElement"]=g=>{u["after:highlightBlock"](Object.assign({block:g.el},g))})}function _t(u){vt(u),i.push(u)}function xt(u){const g=i.indexOf(u);g!==-1&&i.splice(g,1)}function ie(u,g){const w=u;i.forEach(function(x){x[w]&&x[w](g)})}function Et(u){return ue("10.7.0","highlightBlock will be removed entirely in v12.0"),ue("10.7.0","Please use highlightElement now."),N(u)}Object.assign(n,{highlight:h,highlightAuto:_,highlightAll:z,highlightElement:N,highlightBlock:Et,configure:b,initHighlighting:G,initHighlightingOnLoad:Z,registerLanguage:ve,unregisterLanguage:he,listLanguages:B,getLanguage:L,registerAliases:te,autoDetection:De,inherit:hn,addPlugin:_t,removePlugin:xt}),n.debugMode=function(){r=!1},n.safeMode=function(){r=!0},n.versionString=ia,n.regex={concat:ce,lookahead:cr,either:bi,optional:yl,anyNumberOfTimes:bl};for(const u in Ye)typeof Ye[u]=="object"&&lr(Ye[u]);return Object.assign(n,Ye),n},ye=yr({});ye.newInstance=()=>yr({});var sa=ye;ye.HighlightJS=ye;ye.default=ye;const wt=dl(sa),ut="[A-Za-z$_][0-9A-Za-z$_]*",wr=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],vr=["true","false","null","undefined","NaN","Infinity"],_r=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],xr=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Er=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Sr=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Ar=[].concat(Er,_r,xr);function oa(n){const e=n.regex,t=(u,{after:g})=>{const w="</"+u[0].slice(1);return u.input.indexOf(w,g)!==-1},i=ut,r={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(u,g)=>{const w=u[0].length+u.index,x=u.input[w];if(x==="<"||x===","){g.ignoreMatch();return}x===">"&&(t(u,{after:w})||g.ignoreMatch());let k;const j=u.input.substring(w);if(k=j.match(/^\s*=/)){g.ignoreMatch();return}if((k=j.match(/^\s+extends\s+/))&&k.index===0){g.ignoreMatch();return}}},l={$pattern:ut,keyword:wr,literal:vr,built_in:Ar,"variable.language":Sr},a="[0-9](_?[0-9])*",c=`\\.(${a})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:`(\\b(${h})((${c})|\\.)?|(${c}))[eE][+-]?(${a})\\b`},{begin:`\\b(${h})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},_={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},O={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,p],subLanguage:"css"}},N={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,p],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[n.BACKSLASH_ESCAPE,p]},G={className:"comment",variants:[n.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),n.C_BLOCK_COMMENT_MODE,n.C_LINE_COMMENT_MODE]},Z=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,_,O,N,b,{match:/\$\d+/},f];p.contains=Z.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(Z)});const ee=[].concat(G,p.contains),z=ee.concat([{begin:/\(/,end:/\)/,keywords:l,contains:["self"].concat(ee)}]),V={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:z},ve={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,e.concat(i,"(",e.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},he={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[..._r,...xr]}},B={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},L={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[V],illegal:/%/},te={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function De(u){return e.concat("(?!",u.join("|"),")")}const vt={match:e.concat(/\b/,De([...Er,"super","import"]),i,e.lookahead(/\(/)),className:"title.function",relevance:0},_t={begin:e.concat(/\./,e.lookahead(e.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},xt={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},V]},ie="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+n.UNDERSCORE_IDENT_RE+")\\s*=>",Et={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(ie)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[V]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:z,CLASS_REFERENCE:he},illegal:/#(?![$_A-z])/,contains:[n.SHEBANG({label:"shebang",binary:"node",relevance:5}),B,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,_,O,N,b,G,{match:/\$\d+/},f,he,{className:"attr",begin:i+e.lookahead(":"),relevance:0},Et,{begin:"("+n.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[G,n.REGEXP_MODE,{className:"function",begin:ie,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:n.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:z}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:o},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},L,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+n.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[V,n.inherit(n.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},_t,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[V]},vt,te,ve,xt,{match:/\$[(.]/}]}}function la(n){const e=oa(n),t=ut,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],r={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[e.exports.CLASS_REFERENCE]},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[e.exports.CLASS_REFERENCE]},s={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"],a={$pattern:ut,keyword:wr.concat(l),literal:vr,built_in:Ar.concat(i),"variable.language":Sr},c={className:"meta",begin:"@"+t},h=(p,_,O)=>{const N=p.contains.findIndex(b=>b.label===_);if(N===-1)throw new Error("can not find mode to replace");p.contains.splice(N,1,O)};Object.assign(e.keywords,a),e.exports.PARAMS_CONTAINS.push(c),e.contains=e.contains.concat([c,r,o]),h(e,"shebang",n.SHEBANG()),h(e,"use_strict",s);const f=e.contains.find(p=>p.label==="func.def");return f.relevance=0,Object.assign(e,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),e}function aa(n){const e=n.regex,t=e.concat(/[\p{L}_]/u,e.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i=/[\p{L}0-9._:-]+/u,r={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},s=n.inherit(o,{begin:/\(/,end:/\)/}),l=n.inherit(n.APOS_STRING_MODE,{className:"string"}),a=n.inherit(n.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:i,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[r]},{begin:/'/,end:/'/,contains:[r]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,a,l,s,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,s,a,l]}]}]},n.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[a]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:e.concat(/</,e.lookahead(e.concat(t,e.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:t,relevance:0,starts:c}]},{className:"tag",begin:e.concat(/<\//,e.lookahead(e.concat(t,/>/))),contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}const ca=n=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:n.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:n.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),ha=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],ua=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],da=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],fa=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],pa=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function ga(n){const e=n.regex,t=ca(n),i={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},r="and or not only",o=/@-?\w[\w]*(-\w+)*/,s="[a-zA-Z-][a-zA-Z0-9_-]*",l=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[t.BLOCK_COMMENT,i,t.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+s,relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+da.join("|")+")"},{begin:":(:)?("+fa.join("|")+")"}]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+pa.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[t.BLOCK_COMMENT,t.HEXCOLOR,t.IMPORTANT,t.CSS_NUMBER_MODE,...l,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...l,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},t.FUNCTION_DISPATCH]},{begin:e.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:o},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:r,attribute:ua.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...l,t.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+ha.join("|")+")\\b"}]}}const $r=document.createElement("style");$r.innerText=[hl,ul].join(`
|
|
196
|
-
`);document.head.appendChild(
|
|
197
|
-
`).trim();return n&&n!="raw"&&(
|
|
192
|
+
`)&&(a=`\r
|
|
193
|
+
`),this.css+=a+"/*# sourceMappingURL="+o+" */"}applyPrevMaps(){for(let o of this.previous()){let a=this.toUrl(this.path(o.file)),f=o.root||n(o.file),g;this.mapOpts.sourcesContent===!1?(g=new t(o.text),g.sourcesContent&&(g.sourcesContent=null)):g=o.consumer(),this.map.applySourceMap(g,a,this.toUrl(this.path(f)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let o;for(let a=this.root.nodes.length-1;a>=0;a--)o=this.root.nodes[a],o.type==="comment"&&o.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(a)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),h&&b&&this.isMap())return this.generateMap();{let o="";return this.stringify(this.root,a=>{o+=a}),[o]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let o=this.previous()[0].consumer();o.file=this.outputFile(),this.map=c.fromSourceMap(o,{ignoreInvalidMapping:!0})}else this.map=new c({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new c({file:this.outputFile(),ignoreInvalidMapping:!0});let o=1,a=1,f="<no source>",g={generated:{column:0,line:0},original:{column:0,line:0},source:""},m,_;this.stringify(this.root,(S,v,w)=>{if(this.css+=S,v&&w!=="end"&&(g.generated.line=o,g.generated.column=a-1,v.source&&v.source.start?(g.source=this.sourcePath(v),g.original.line=v.source.start.line,g.original.column=v.source.start.column-1,this.map.addMapping(g)):(g.source=f,g.original.line=1,g.original.column=0,this.map.addMapping(g))),_=S.match(/\n/g),_?(o+=_.length,m=S.lastIndexOf(`
|
|
194
|
+
`),a=S.length-m):a+=S.length,v&&w!=="start"){let y=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==y.last||y.raws.semicolon)&&(v.source&&v.source.end?(g.source=this.sourcePath(v),g.original.line=v.source.end.line,g.original.column=v.source.end.column-1,g.generated.line=o,g.generated.column=a-2,this.map.addMapping(g)):(g.source=f,g.original.line=1,g.original.column=0,g.generated.line=o,g.generated.column=a-1,this.map.addMapping(g)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(o=>o.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let o=this.mapOpts.annotation;return typeof o<"u"&&o!==!0?!1:this.previous().length?this.previous().some(a=>a.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(o=>o.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(o){if(this.mapOpts.absolute||o.charCodeAt(0)===60||/^\w+:\/\//.test(o))return o;let a=this.memoizedPaths.get(o);if(a)return a;let f=this.opts.to?n(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(f=n(i(f,this.mapOpts.annotation)));let g=e(f,o);return this.memoizedPaths.set(o,g),g}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(o=>{if(o.source&&o.source.input.map){let a=o.source.input.map;this.previousMaps.includes(a)||this.previousMaps.push(a)}});else{let o=new p(this.originalCSS,this.opts);o.map&&this.previousMaps.push(o.map)}return this.previousMaps}setSourcesContent(){let o={};if(this.root)this.root.walk(a=>{if(a.source){let f=a.source.input.from;if(f&&!o[f]){o[f]=!0;let g=this.usesFileUrls?this.toFileUrl(f):this.toUrl(this.path(f));this.map.setSourceContent(g,a.source.input.css)}}});else if(this.css){let a=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(a,this.css)}}sourcePath(o){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(o.source.input.from):this.toUrl(this.path(o.source.input.from))}toBase64(o){return Buffer?Buffer.from(o).toString("base64"):window.btoa(unescape(encodeURIComponent(o)))}toFileUrl(o){let a=this.memoizedFileURLs.get(o);if(a)return a;if(l){let f=l(o).toString();return this.memoizedFileURLs.set(o,f),f}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(o){let a=this.memoizedURLs.get(o);if(a)return a;r==="\\"&&(o=o.replace(/\\/g,"/"));let f=encodeURI(o).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(o,f),f}}return Jt=s,Jt}var Kt,gi;function Rs(){if(gi)return Kt;gi=1;const n=39,e=34,i=92,r=47,t=10,c=32,l=12,p=9,b=13,h=91,s=93,u=40,o=41,a=123,f=125,g=59,m=42,_=58,S=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,w=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,E=/[\da-f]/i;return Kt=function(j,U={}){let P=j.css.valueOf(),J=U.ignoreErrors,F,_e,ce,$,$e,W,Q,oe,ae,me,Se=P.length,I=0,ze=[],Me=[];function xt(){return I}function De(be){throw j.error("Unclosed "+be,I)}function _t(){return Me.length===0&&I>=Se}function Ne(be){if(Me.length)return Me.pop();if(I>=Se)return;let Ue=be?be.ignoreUnclosed:!1;switch(F=P.charCodeAt(I),F){case t:case c:case p:case b:case l:{$=I;do $+=1,F=P.charCodeAt($);while(F===c||F===t||F===p||F===b||F===l);W=["space",P.slice(I,$)],I=$-1;break}case h:case s:case a:case f:case _:case g:case o:{let Ye=String.fromCharCode(F);W=[Ye,Ye,I];break}case u:{if(me=ze.length?ze.pop()[1]:"",ae=P.charCodeAt(I+1),me==="url"&&ae!==n&&ae!==e&&ae!==c&&ae!==t&&ae!==p&&ae!==l&&ae!==b){$=I;do{if(Q=!1,$=P.indexOf(")",$+1),$===-1)if(J||Ue){$=I;break}else De("bracket");for(oe=$;P.charCodeAt(oe-1)===i;)oe-=1,Q=!Q}while(Q);W=["brackets",P.slice(I,$+1),I,$],I=$}else $=P.indexOf(")",I+1),_e=P.slice(I,$+1),$===-1||y.test(_e)?W=["(","(",I]:(W=["brackets",_e,I,$],I=$);break}case n:case e:{$e=F===n?"'":'"',$=I;do{if(Q=!1,$=P.indexOf($e,$+1),$===-1)if(J||Ue){$=I+1;break}else De("string");for(oe=$;P.charCodeAt(oe-1)===i;)oe-=1,Q=!Q}while(Q);W=["string",P.slice(I,$+1),I,$],I=$;break}case S:{v.lastIndex=I+1,v.test(P),v.lastIndex===0?$=P.length-1:$=v.lastIndex-2,W=["at-word",P.slice(I,$+1),I,$],I=$;break}case i:{for($=I,ce=!0;P.charCodeAt($+1)===i;)$+=1,ce=!ce;if(F=P.charCodeAt($+1),ce&&F!==r&&F!==c&&F!==t&&F!==p&&F!==b&&F!==l&&($+=1,E.test(P.charAt($)))){for(;E.test(P.charAt($+1));)$+=1;P.charCodeAt($+1)===c&&($+=1)}W=["word",P.slice(I,$+1),I,$],I=$;break}default:{F===r&&P.charCodeAt(I+1)===m?($=P.indexOf("*/",I+2)+1,$===0&&(J||Ue?$=P.length:De("comment")),W=["comment",P.slice(I,$+1),I,$],I=$):(w.lastIndex=I+1,w.test(P),w.lastIndex===0?$=P.length-1:$=w.lastIndex-2,W=["word",P.slice(I,$+1),I,$],ze.push(W),I=$);break}}return I++,W}function St(be){Me.push(be)}return{back:St,endOfFile:_t,nextToken:Ne,position:xt}},Kt}var Xt,mi;function $s(){if(mi)return Xt;mi=1;let n=gr(),e=bt(),i=yt(),r=Qe(),t=br(),c=Rs();const l={empty:!0,space:!0};function p(h){for(let s=h.length-1;s>=0;s--){let u=h[s],o=u[3]||u[2];if(o)return o}}class b{constructor(s){this.input=s,this.root=new r,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:s,start:{column:1,line:1,offset:0}}}atrule(s){let u=new n;u.name=s[1].slice(1),u.name===""&&this.unnamedAtrule(u,s),this.init(u,s[2]);let o,a,f,g=!1,m=!1,_=[],S=[];for(;!this.tokenizer.endOfFile();){if(s=this.tokenizer.nextToken(),o=s[0],o==="("||o==="["?S.push(o==="("?")":"]"):o==="{"&&S.length>0?S.push("}"):o===S[S.length-1]&&S.pop(),S.length===0)if(o===";"){u.source.end=this.getPosition(s[2]),u.source.end.offset++,this.semicolon=!0;break}else if(o==="{"){m=!0;break}else if(o==="}"){if(_.length>0){for(f=_.length-1,a=_[f];a&&a[0]==="space";)a=_[--f];a&&(u.source.end=this.getPosition(a[3]||a[2]),u.source.end.offset++)}this.end(s);break}else _.push(s);else _.push(s);if(this.tokenizer.endOfFile()){g=!0;break}}u.raws.between=this.spacesAndCommentsFromEnd(_),_.length?(u.raws.afterName=this.spacesAndCommentsFromStart(_),this.raw(u,"params",_),g&&(s=_[_.length-1],u.source.end=this.getPosition(s[3]||s[2]),u.source.end.offset++,this.spaces=u.raws.between,u.raws.between="")):(u.raws.afterName="",u.params=""),m&&(u.nodes=[],this.current=u)}checkMissedSemicolon(s){let u=this.colon(s);if(u===!1)return;let o=0,a;for(let f=u-1;f>=0&&(a=s[f],!(a[0]!=="space"&&(o+=1,o===2)));f--);throw this.input.error("Missed semicolon",a[0]==="word"?a[3]+1:a[2])}colon(s){let u=0,o,a,f;for(let[g,m]of s.entries()){if(a=m,f=a[0],f==="("&&(u+=1),f===")"&&(u-=1),u===0&&f===":")if(!o)this.doubleColon(a);else{if(o[0]==="word"&&o[1]==="progid")continue;return g}o=a}return!1}comment(s){let u=new e;this.init(u,s[2]),u.source.end=this.getPosition(s[3]||s[2]),u.source.end.offset++;let o=s[1].slice(2,-2);if(/^\s*$/.test(o))u.text="",u.raws.left=o,u.raws.right="";else{let a=o.match(/^(\s*)([^]*\S)(\s*)$/);u.text=a[2],u.raws.left=a[1],u.raws.right=a[3]}}createTokenizer(){this.tokenizer=c(this.input)}decl(s,u){let o=new i;this.init(o,s[0][2]);let a=s[s.length-1];for(a[0]===";"&&(this.semicolon=!0,s.pop()),o.source.end=this.getPosition(a[3]||a[2]||p(s)),o.source.end.offset++;s[0][0]!=="word";)s.length===1&&this.unknownWord(s),o.raws.before+=s.shift()[1];for(o.source.start=this.getPosition(s[0][2]),o.prop="";s.length;){let S=s[0][0];if(S===":"||S==="space"||S==="comment")break;o.prop+=s.shift()[1]}o.raws.between="";let f;for(;s.length;)if(f=s.shift(),f[0]===":"){o.raws.between+=f[1];break}else f[0]==="word"&&/\w/.test(f[1])&&this.unknownWord([f]),o.raws.between+=f[1];(o.prop[0]==="_"||o.prop[0]==="*")&&(o.raws.before+=o.prop[0],o.prop=o.prop.slice(1));let g=[],m;for(;s.length&&(m=s[0][0],!(m!=="space"&&m!=="comment"));)g.push(s.shift());this.precheckMissedSemicolon(s);for(let S=s.length-1;S>=0;S--){if(f=s[S],f[1].toLowerCase()==="!important"){o.important=!0;let v=this.stringFrom(s,S);v=this.spacesFromEnd(s)+v,v!==" !important"&&(o.raws.important=v);break}else if(f[1].toLowerCase()==="important"){let v=s.slice(0),w="";for(let y=S;y>0;y--){let E=v[y][0];if(w.trim().startsWith("!")&&E!=="space")break;w=v.pop()[1]+w}w.trim().startsWith("!")&&(o.important=!0,o.raws.important=w,s=v)}if(f[0]!=="space"&&f[0]!=="comment")break}s.some(S=>S[0]!=="space"&&S[0]!=="comment")&&(o.raws.between+=g.map(S=>S[1]).join(""),g=[]),this.raw(o,"value",g.concat(s),u),o.value.includes(":")&&!u&&this.checkMissedSemicolon(s)}doubleColon(s){throw this.input.error("Double colon",{offset:s[2]},{offset:s[2]+s[1].length})}emptyRule(s){let u=new t;this.init(u,s[2]),u.selector="",u.raws.between="",this.current=u}end(s){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(s[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(s)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(s){if(this.spaces+=s[1],this.current.nodes){let u=this.current.nodes[this.current.nodes.length-1];u&&u.type==="rule"&&!u.raws.ownSemicolon&&(u.raws.ownSemicolon=this.spaces,this.spaces="",u.source.end=this.getPosition(s[2]),u.source.end.offset+=u.raws.ownSemicolon.length)}}getPosition(s){let u=this.input.fromOffset(s);return{column:u.col,line:u.line,offset:s}}init(s,u){this.current.push(s),s.source={input:this.input,start:this.getPosition(u)},s.raws.before=this.spaces,this.spaces="",s.type!=="comment"&&(this.semicolon=!1)}other(s){let u=!1,o=null,a=!1,f=null,g=[],m=s[1].startsWith("--"),_=[],S=s;for(;S;){if(o=S[0],_.push(S),o==="("||o==="[")f||(f=S),g.push(o==="("?")":"]");else if(m&&a&&o==="{")f||(f=S),g.push("}");else if(g.length===0)if(o===";")if(a){this.decl(_,m);return}else break;else if(o==="{"){this.rule(_);return}else if(o==="}"){this.tokenizer.back(_.pop()),u=!0;break}else o===":"&&(a=!0);else o===g[g.length-1]&&(g.pop(),g.length===0&&(f=null));S=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(u=!0),g.length>0&&this.unclosedBracket(f),u&&a){if(!m)for(;_.length&&(S=_[_.length-1][0],!(S!=="space"&&S!=="comment"));)this.tokenizer.back(_.pop());this.decl(_,m)}else this.unknownWord(_)}parse(){let s;for(;!this.tokenizer.endOfFile();)switch(s=this.tokenizer.nextToken(),s[0]){case"space":this.spaces+=s[1];break;case";":this.freeSemicolon(s);break;case"}":this.end(s);break;case"comment":this.comment(s);break;case"at-word":this.atrule(s);break;case"{":this.emptyRule(s);break;default:this.other(s);break}this.endFile()}precheckMissedSemicolon(){}raw(s,u,o,a){let f,g,m=o.length,_="",S=!0,v,w;for(let y=0;y<m;y+=1)f=o[y],g=f[0],g==="space"&&y===m-1&&!a?S=!1:g==="comment"?(w=o[y-1]?o[y-1][0]:"empty",v=o[y+1]?o[y+1][0]:"empty",!l[w]&&!l[v]?_.slice(-1)===","?S=!1:_+=f[1]:S=!1):_+=f[1];if(!S){let y=o.reduce((E,O)=>E+O[1],"");s.raws[u]={raw:y,value:_}}s[u]=_}rule(s){s.pop();let u=new t;this.init(u,s[0][2]),u.raws.between=this.spacesAndCommentsFromEnd(s),this.raw(u,"selector",s),this.current=u}spacesAndCommentsFromEnd(s){let u,o="";for(;s.length&&(u=s[s.length-1][0],!(u!=="space"&&u!=="comment"));)o=s.pop()[1]+o;return o}spacesAndCommentsFromStart(s){let u,o="";for(;s.length&&(u=s[0][0],!(u!=="space"&&u!=="comment"));)o+=s.shift()[1];return o}spacesFromEnd(s){let u,o="";for(;s.length&&(u=s[s.length-1][0],u==="space");)o=s.pop()[1]+o;return o}stringFrom(s,u){let o="";for(let a=u;a<s.length;a++)o+=s[a][1];return s.splice(u,s.length-u),o}unclosedBlock(){let s=this.current.source.start;throw this.input.error("Unclosed block",s.line,s.column)}unclosedBracket(s){throw this.input.error("Unclosed bracket",{offset:s[2]},{offset:s[2]+1})}unexpectedClose(s){throw this.input.error("Unexpected }",{offset:s[2]},{offset:s[2]+1})}unknownWord(s){throw this.input.error("Unknown word "+s[0][1],{offset:s[0][2]},{offset:s[0][2]+s[0][1].length})}unnamedAtrule(s,u){throw this.input.error("At-rule without name",{offset:u[2]},{offset:u[2]+u[1].length})}}return Xt=b,Xt}var Qt,bi;function yr(){if(bi)return Qt;bi=1;let n=Re(),e=wt(),i=$s();function r(t,c){let l=new e(t,c),p=new i(l);try{p.parse()}catch(b){throw b}return p.root}return Qt=r,r.default=r,n.registerParse(r),Qt}var Yt,yi;function Hi(){if(yi)return Yt;yi=1;class n{constructor(i,r={}){if(this.type="warning",this.text=i,r.node&&r.node.source){let t=r.node.rangeBy(r);this.line=t.start.line,this.column=t.start.column,this.endLine=t.end.line,this.endColumn=t.end.column}for(let t in r)this[t]=r[t]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Yt=n,n.default=n,Yt}var er,wi;function wr(){if(wi)return er;wi=1;let n=Hi();class e{get content(){return this.css}constructor(r,t,c){this.processor=r,this.messages=[],this.root=t,this.opts=c,this.css="",this.map=void 0}toString(){return this.css}warn(r,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let c=new n(r,t);return this.messages.push(c),c}warnings(){return this.messages.filter(r=>r.type==="warning")}}return er=e,e.default=e,er}var tr,vi;function Fi(){if(vi)return tr;vi=1;let n=Re(),e=mr(),i=Bi(),r=yr(),t=wr(),c=Qe(),l=gt(),{isClean:p,my:b}=pr();const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},s={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},u={Once:!0,postcssPlugin:!0,prepare:!0},o=0;function a(v){return typeof v=="object"&&typeof v.then=="function"}function f(v){let w=!1,y=h[v.type];return v.type==="decl"?w=v.prop.toLowerCase():v.type==="atrule"&&(w=v.name.toLowerCase()),w&&v.append?[y,y+"-"+w,o,y+"Exit",y+"Exit-"+w]:w?[y,y+"-"+w,y+"Exit",y+"Exit-"+w]:v.append?[y,o,y+"Exit"]:[y,y+"Exit"]}function g(v){let w;return v.type==="document"?w=["Document",o,"DocumentExit"]:v.type==="root"?w=["Root",o,"RootExit"]:w=f(v),{eventIndex:0,events:w,iterator:0,node:v,visitorIndex:0,visitors:[]}}function m(v){return v[p]=!1,v.nodes&&v.nodes.forEach(w=>m(w)),v}let _={};class S{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(w,y,E){this.stringified=!1,this.processed=!1;let O;if(typeof y=="object"&&y!==null&&(y.type==="root"||y.type==="document"))O=m(y);else if(y instanceof S||y instanceof t)O=m(y.root),y.map&&(typeof E.map>"u"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=y.map);else{let j=r;E.syntax&&(j=E.syntax.parse),E.parser&&(j=E.parser),j.parse&&(j=j.parse);try{O=j(y,E)}catch(U){this.processed=!0,this.error=U}O&&!O[b]&&n.rebuild(O)}this.result=new t(w,O,E),this.helpers={..._,postcss:_,result:this.result},this.plugins=this.processor.plugins.map(j=>typeof j=="object"&&j.prepare?{...j,...j.prepare(this.result)}:j)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(w){return this.async().catch(w)}finally(w){return this.async().then(w,w)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(w,y){let E=this.result.lastPlugin;try{y&&y.addToError(w),this.error=w,w.name==="CssSyntaxError"&&!w.plugin?(w.plugin=E.postcssPlugin,w.setMessage()):E.postcssVersion}catch(O){console&&console.error&&console.error(O)}return w}prepareVisitors(){this.listeners={};let w=(y,E,O)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([y,O])};for(let y of this.plugins)if(typeof y=="object")for(let E in y){if(!s[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${y.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!u[E])if(typeof y[E]=="object")for(let O in y[E])O==="*"?w(y,E,y[E][O]):w(y,E+"-"+O.toLowerCase(),y[E][O]);else typeof y[E]=="function"&&w(y,E,y[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let w=0;w<this.plugins.length;w++){let y=this.plugins[w],E=this.runOnRoot(y);if(a(E))try{await E}catch(O){throw this.handleError(O)}}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[p];){w[p]=!0;let y=[g(w)];for(;y.length>0;){let E=this.visitTick(y);if(a(E))try{await E}catch(O){let j=y[y.length-1].node;throw this.handleError(O,j)}}}if(this.listeners.OnceExit)for(let[y,E]of this.listeners.OnceExit){this.result.lastPlugin=y;try{if(w.type==="document"){let O=w.nodes.map(j=>E(j,this.helpers));await Promise.all(O)}else await E(w,this.helpers)}catch(O){throw this.handleError(O)}}}return this.processed=!0,this.stringify()}runOnRoot(w){this.result.lastPlugin=w;try{if(typeof w=="object"&&w.Once){if(this.result.root.type==="document"){let y=this.result.root.nodes.map(E=>w.Once(E,this.helpers));return a(y[0])?Promise.all(y):y}return w.Once(this.result.root,this.helpers)}else if(typeof w=="function")return w(this.result.root,this.result)}catch(y){throw this.handleError(y)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let w=this.result.opts,y=l;w.syntax&&(y=w.syntax.stringify),w.stringifier&&(y=w.stringifier),y.stringify&&(y=y.stringify);let O=new i(y,this.result.root,this.result.opts).generate();return this.result.css=O[0],this.result.map=O[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let w of this.plugins){let y=this.runOnRoot(w);if(a(y))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[p];)w[p]=!0,this.walkSync(w);if(this.listeners.OnceExit)if(w.type==="document")for(let y of w.nodes)this.visitSync(this.listeners.OnceExit,y);else this.visitSync(this.listeners.OnceExit,w)}return this.result}then(w,y){return this.async().then(w,y)}toString(){return this.css}visitSync(w,y){for(let[E,O]of w){this.result.lastPlugin=E;let j;try{j=O(y,this.helpers)}catch(U){throw this.handleError(U,y.proxyOf)}if(y.type!=="root"&&y.type!=="document"&&!y.parent)return!0;if(a(j))throw this.getAsyncError()}}visitTick(w){let y=w[w.length-1],{node:E,visitors:O}=y;if(E.type!=="root"&&E.type!=="document"&&!E.parent){w.pop();return}if(O.length>0&&y.visitorIndex<O.length){let[U,P]=O[y.visitorIndex];y.visitorIndex+=1,y.visitorIndex===O.length&&(y.visitors=[],y.visitorIndex=0),this.result.lastPlugin=U;try{return P(E.toProxy(),this.helpers)}catch(J){throw this.handleError(J,E)}}if(y.iterator!==0){let U=y.iterator,P;for(;P=E.nodes[E.indexes[U]];)if(E.indexes[U]+=1,!P[p]){P[p]=!0,w.push(g(P));return}y.iterator=0,delete E.indexes[U]}let j=y.events;for(;y.eventIndex<j.length;){let U=j[y.eventIndex];if(y.eventIndex+=1,U===o){E.nodes&&E.nodes.length&&(E[p]=!0,y.iterator=E.getIterator());return}else if(this.listeners[U]){y.visitors=this.listeners[U];return}}w.pop()}walkSync(w){w[p]=!0;let y=f(w);for(let E of y)if(E===o)w.nodes&&w.each(O=>{O[p]||this.walkSync(O)});else{let O=this.listeners[E];if(O&&this.visitSync(O,w.toProxy()))return}}warnings(){return this.sync().warnings()}}return S.registerPostcss=v=>{_=v},tr=S,S.default=S,c.registerLazyResult(S),e.registerLazyResult(S),tr}var rr,xi;function Ms(){if(xi)return rr;xi=1;let n=Bi(),e=yr();const i=wr();let r=gt();class t{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let l,p=e;try{l=p(this._css,this._opts)}catch(b){this.error=b}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(l,p,b){p=p.toString(),this.stringified=!1,this._processor=l,this._css=p,this._opts=b,this._map=void 0;let h,s=r;this.result=new i(this._processor,h,this._opts),this.result.css=p;let u=this;Object.defineProperty(this.result,"root",{get(){return u.root}});let o=new n(s,h,this._opts,p);if(o.isMap()){let[a,f]=o.generate();a&&(this.result.css=a),f&&(this.result.map=f)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,p){return this.async().then(l,p)}toString(){return this._css}warnings(){return[]}}return rr=t,t.default=t,rr}var ir,_i;function Ns(){if(_i)return ir;_i=1;let n=mr(),e=Fi(),i=Ms(),r=Qe();class t{constructor(l=[]){this.version="8.5.6",this.plugins=this.normalize(l)}normalize(l){let p=[];for(let b of l)if(b.postcss===!0?b=b():b.postcss&&(b=b.postcss),typeof b=="object"&&Array.isArray(b.plugins))p=p.concat(b.plugins);else if(typeof b=="object"&&b.postcssPlugin)p.push(b);else if(typeof b=="function")p.push(b);else if(!(typeof b=="object"&&(b.parse||b.stringify)))throw new Error(b+" is not a PostCSS plugin");return p}process(l,p={}){return!this.plugins.length&&!p.parser&&!p.stringifier&&!p.syntax?new i(this,l,p):new e(this,l,p)}use(l){return this.plugins=this.plugins.concat(this.normalize([l])),this}}return ir=t,t.default=t,r.registerProcessor(t),n.registerProcessor(t),ir}var nr,Si;function Ps(){if(Si)return nr;Si=1;var n={};let e=gr(),i=bt(),r=Re(),t=fr(),c=yt(),l=mr(),p=Os(),b=wt(),h=Fi(),s=Ui(),u=mt(),o=yr(),a=Ns(),f=wr(),g=Qe(),m=br(),_=gt(),S=Hi();function v(...w){return w.length===1&&Array.isArray(w[0])&&(w=w[0]),new a(w)}return v.plugin=function(y,E){let O=!1;function j(...P){console&&console.warn&&!O&&(O=!0,console.warn(y+`: postcss.plugin was deprecated. Migration guide:
|
|
195
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),n.LANG&&n.LANG.startsWith("cn")&&console.warn(y+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
196
|
+
https://www.w3ctech.com/topic/2226`));let J=E(...P);return J.postcssPlugin=y,J.postcssVersion=new a().version,J}let U;return Object.defineProperty(j,"postcss",{get(){return U||(U=j()),U}}),j.process=function(P,J,F){return v([j(F)]).process(P,J)},j},v.stringify=_,v.parse=o,v.fromJSON=p,v.list=s,v.comment=w=>new i(w),v.atRule=w=>new e(w),v.decl=w=>new c(w),v.rule=w=>new m(w),v.root=w=>new g(w),v.document=w=>new l(w),v.CssSyntaxError=t,v.Declaration=c,v.Container=r,v.Processor=a,v.Document=l,v.Comment=i,v.Warning=S,v.AtRule=e,v.Result=f,v.Input=b,v.Rule=m,v.Root=g,v.Node=u,h.registerPostcss(v),nr=v,v.default=v,nr}var Ts=Ps();const V=Ii(Ts);V.stringify;V.fromJSON;V.plugin;V.parse;V.list;V.document;V.comment;V.atRule;V.rule;V.decl;V.root;V.CssSyntaxError;V.Declaration;V.Container;V.Processor;V.Document;V.Comment;V.Warning;V.AtRule;V.Result;V.Input;V.Rule;V.Root;V.Node;var sr,Ei;function js(){if(Ei)return sr;Ei=1;const n=(r={})=>{const t=r.prefix,c=/\s+$/.test(t)?t:`${t} `,l=r.ignoreFiles?[].concat(r.ignoreFiles):[],p=r.includeFiles?[].concat(r.includeFiles):[];return{postcssPlugin:"postcss-prefix-selector",prepare(b){const h=b.root,s=h.source.input.file;if(!(l.length&&s&&e(s,l))&&!(p.length&&s&&!e(s,p)))return{Rule(u,{result:o}){const a=["keyframes","-webkit-keyframes","-moz-keyframes","-o-keyframes","-ms-keyframes"];u.parent&&a.includes(u.parent.name)||(u.selectors=u.selectors.map(f=>r.exclude&&i(f,r.exclude)?f:r.transform?r.transform(t,f,c+f,h.source.input.file,u):[":root","body","html"].some(g=>f.startsWith(g))?r.skipGlobalSelectors?f:f.replace(/(html\s+body|:root\s+body|html|:root|body)/gm,t):c+f))}}}}};function e(r,t){return t.some(c=>c instanceof RegExp?c.test(r):r.includes(c))}function i(r,t){return t.some(c=>c instanceof RegExp?c.test(r):r===c)}return n.postcss=!0,sr=n,sr}var Ls=js();const Is=Ii(Ls),zs="code{white-space:pre}.example{display:flex;flex-wrap:wrap;flex-direction:row;align-items:center;gap:16px}.example>*{flex:1 1 500px}.example .tab-control{overflow:hidden}.example div[role=tab]{cursor:pointer;padding:8px 16px;display:inline-block;font-size:16px;border-bottom:2px solid transparent;background-clip:padding-box;-webkit-user-select:none;user-select:none}.example div[role=tab]:hover{background-color:#1467ba14}.example div[role=tab][selected]{background-color:#1467ba21;border-bottom:2px solid #1467ba}.tab-content{margin:16px 0}.tab-content>pre{padding-top:0}.tab-content.code{max-height:500px;overflow:auto}.tab-content.code pre{margin:0}",Ds="pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}";function Us(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var or,Ai;function Bs(){if(Ai)return or;Ai=1;function n(d){return d instanceof Map?d.clear=d.delete=d.set=function(){throw new Error("map is read-only")}:d instanceof Set&&(d.add=d.clear=d.delete=function(){throw new Error("set is read-only")}),Object.freeze(d),Object.getOwnPropertyNames(d).forEach(x=>{const C=d[x],D=typeof C;(D==="object"||D==="function")&&!Object.isFrozen(C)&&n(C)}),d}class e{constructor(x){x.data===void 0&&(x.data={}),this.data=x.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function i(d){return d.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(d,...x){const C=Object.create(null);for(const D in d)C[D]=d[D];return x.forEach(function(D){for(const K in D)C[K]=D[K]}),C}const t="</span>",c=d=>!!d.scope,l=(d,{prefix:x})=>{if(d.startsWith("language:"))return d.replace("language:","language-");if(d.includes(".")){const C=d.split(".");return[`${x}${C.shift()}`,...C.map((D,K)=>`${D}${"_".repeat(K+1)}`)].join(" ")}return`${x}${d}`};class p{constructor(x,C){this.buffer="",this.classPrefix=C.classPrefix,x.walk(this)}addText(x){this.buffer+=i(x)}openNode(x){if(!c(x))return;const C=l(x.scope,{prefix:this.classPrefix});this.span(C)}closeNode(x){c(x)&&(this.buffer+=t)}value(){return this.buffer}span(x){this.buffer+=`<span class="${x}">`}}const b=(d={})=>{const x={children:[]};return Object.assign(x,d),x};class h{constructor(){this.rootNode=b(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(x){this.top.children.push(x)}openNode(x){const C=b({scope:x});this.add(C),this.stack.push(C)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(x){return this.constructor._walk(x,this.rootNode)}static _walk(x,C){return typeof C=="string"?x.addText(C):C.children&&(x.openNode(C),C.children.forEach(D=>this._walk(x,D)),x.closeNode(C)),x}static _collapse(x){typeof x!="string"&&x.children&&(x.children.every(C=>typeof C=="string")?x.children=[x.children.join("")]:x.children.forEach(C=>{h._collapse(C)}))}}class s extends h{constructor(x){super(),this.options=x}addText(x){x!==""&&this.add(x)}startScope(x){this.openNode(x)}endScope(){this.closeNode()}__addSublanguage(x,C){const D=x.root;C&&(D.scope=`language:${C}`),this.add(D)}toHTML(){return new p(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function u(d){return d?typeof d=="string"?d:d.source:null}function o(d){return g("(?=",d,")")}function a(d){return g("(?:",d,")*")}function f(d){return g("(?:",d,")?")}function g(...d){return d.map(x=>u(x)).join("")}function m(d){const x=d[d.length-1];return typeof x=="object"&&x.constructor===Object?(d.splice(d.length-1,1),x):{}}function _(...d){return"("+(m(d).capture?"":"?:")+d.map(x=>u(x)).join("|")+")"}function S(d){return new RegExp(d.toString()+"|").exec("").length-1}function v(d,x){const C=d&&d.exec(x);return C&&C.index===0}const w=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function y(d,{joinWith:x}){let C=0;return d.map(D=>{C+=1;const K=C;let X=u(D),M="";for(;X.length>0;){const R=w.exec(X);if(!R){M+=X;break}M+=X.substring(0,R.index),X=X.substring(R.index+R[0].length),R[0][0]==="\\"&&R[1]?M+="\\"+String(Number(R[1])+K):(M+=R[0],R[0]==="("&&C++)}return M}).map(D=>`(${D})`).join(x)}const E=/\b\B/,O="[a-zA-Z]\\w*",j="[a-zA-Z_]\\w*",U="\\b\\d+(\\.\\d+)?",P="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",J="\\b(0b[01]+)",F="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",_e=(d={})=>{const x=/^#![ ]*\//;return d.binary&&(d.begin=g(x,/.*\b/,d.binary,/\b.*/)),r({scope:"meta",begin:x,end:/$/,relevance:0,"on:begin":(C,D)=>{C.index!==0&&D.ignoreMatch()}},d)},ce={begin:"\\\\[\\s\\S]",relevance:0},$={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ce]},$e={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ce]},W={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Q=function(d,x,C={}){const D=r({scope:"comment",begin:d,end:x,contains:[]},C);D.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const K=_("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return D.contains.push({begin:g(/[ ]+/,"(",K,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),D},oe=Q("//","$"),ae=Q("/\\*","\\*/"),me=Q("#","$"),Se={scope:"number",begin:U,relevance:0},I={scope:"number",begin:P,relevance:0},ze={scope:"number",begin:J,relevance:0},Me={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ce,{begin:/\[/,end:/\]/,relevance:0,contains:[ce]}]},xt={scope:"title",begin:O,relevance:0},De={scope:"title",begin:j,relevance:0},_t={begin:"\\.\\s*"+j,relevance:0};var Ne=Object.freeze({__proto__:null,APOS_STRING_MODE:$,BACKSLASH_ESCAPE:ce,BINARY_NUMBER_MODE:ze,BINARY_NUMBER_RE:J,COMMENT:Q,C_BLOCK_COMMENT_MODE:ae,C_LINE_COMMENT_MODE:oe,C_NUMBER_MODE:I,C_NUMBER_RE:P,END_SAME_AS_BEGIN:function(d){return Object.assign(d,{"on:begin":(x,C)=>{C.data._beginMatch=x[1]},"on:end":(x,C)=>{C.data._beginMatch!==x[1]&&C.ignoreMatch()}})},HASH_COMMENT_MODE:me,IDENT_RE:O,MATCH_NOTHING_RE:E,METHOD_GUARD:_t,NUMBER_MODE:Se,NUMBER_RE:U,PHRASAL_WORDS_MODE:W,QUOTE_STRING_MODE:$e,REGEXP_MODE:Me,RE_STARTERS_RE:F,SHEBANG:_e,TITLE_MODE:xt,UNDERSCORE_IDENT_RE:j,UNDERSCORE_TITLE_MODE:De});function St(d,x){d.input[d.index-1]==="."&&x.ignoreMatch()}function be(d,x){d.className!==void 0&&(d.scope=d.className,delete d.className)}function Ue(d,x){x&&d.beginKeywords&&(d.begin="\\b("+d.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",d.__beforeBegin=St,d.keywords=d.keywords||d.beginKeywords,delete d.beginKeywords,d.relevance===void 0&&(d.relevance=0))}function Ye(d,x){Array.isArray(d.illegal)&&(d.illegal=_(...d.illegal))}function Qi(d,x){if(d.match){if(d.begin||d.end)throw new Error("begin & end are not supported with match");d.begin=d.match,delete d.match}}function Yi(d,x){d.relevance===void 0&&(d.relevance=1)}const en=(d,x)=>{if(!d.beforeMatch)return;if(d.starts)throw new Error("beforeMatch cannot be used with starts");const C=Object.assign({},d);Object.keys(d).forEach(D=>{delete d[D]}),d.keywords=C.keywords,d.begin=g(C.beforeMatch,o(C.begin)),d.starts={relevance:0,contains:[Object.assign(C,{endsParent:!0})]},d.relevance=0,delete C.beforeMatch},tn=["of","and","for","in","not","or","if","then","parent","list","value"],rn="keyword";function _r(d,x,C=rn){const D=Object.create(null);return typeof d=="string"?K(C,d.split(" ")):Array.isArray(d)?K(C,d):Object.keys(d).forEach(function(X){Object.assign(D,_r(d[X],x,X))}),D;function K(X,M){x&&(M=M.map(R=>R.toLowerCase())),M.forEach(function(R){const L=R.split("|");D[L[0]]=[X,nn(L[0],L[1])]})}}function nn(d,x){return x?Number(x):sn(d)?0:1}function sn(d){return tn.includes(d.toLowerCase())}const Sr={},Ee=d=>{console.error(d)},Er=(d,...x)=>{console.log(`WARN: ${d}`,...x)},Pe=(d,x)=>{Sr[`${d}/${x}`]||(console.log(`Deprecated as of ${d}. ${x}`),Sr[`${d}/${x}`]=!0)},et=new Error;function Ar(d,x,{key:C}){let D=0;const K=d[C],X={},M={};for(let R=1;R<=x.length;R++)M[R+D]=K[R],X[R+D]=!0,D+=S(x[R-1]);d[C]=M,d[C]._emit=X,d[C]._multi=!0}function on(d){if(Array.isArray(d.begin)){if(d.skip||d.excludeBegin||d.returnBegin)throw Ee("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),et;if(typeof d.beginScope!="object"||d.beginScope===null)throw Ee("beginScope must be object"),et;Ar(d,d.begin,{key:"beginScope"}),d.begin=y(d.begin,{joinWith:""})}}function an(d){if(Array.isArray(d.end)){if(d.skip||d.excludeEnd||d.returnEnd)throw Ee("skip, excludeEnd, returnEnd not compatible with endScope: {}"),et;if(typeof d.endScope!="object"||d.endScope===null)throw Ee("endScope must be object"),et;Ar(d,d.end,{key:"endScope"}),d.end=y(d.end,{joinWith:""})}}function ln(d){d.scope&&typeof d.scope=="object"&&d.scope!==null&&(d.beginScope=d.scope,delete d.scope)}function cn(d){ln(d),typeof d.beginScope=="string"&&(d.beginScope={_wrap:d.beginScope}),typeof d.endScope=="string"&&(d.endScope={_wrap:d.endScope}),on(d),an(d)}function un(d){function x(M,R){return new RegExp(u(M),"m"+(d.case_insensitive?"i":"")+(d.unicodeRegex?"u":"")+(R?"g":""))}class C{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(R,L){L.position=this.position++,this.matchIndexes[this.matchAt]=L,this.regexes.push([L,R]),this.matchAt+=S(R)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const R=this.regexes.map(L=>L[1]);this.matcherRe=x(y(R,{joinWith:"|"}),!0),this.lastIndex=0}exec(R){this.matcherRe.lastIndex=this.lastIndex;const L=this.matcherRe.exec(R);if(!L)return null;const te=L.findIndex((Be,At)=>At>0&&Be!==void 0),Y=this.matchIndexes[te];return L.splice(0,te),Object.assign(L,Y)}}class D{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(R){if(this.multiRegexes[R])return this.multiRegexes[R];const L=new C;return this.rules.slice(R).forEach(([te,Y])=>L.addRule(te,Y)),L.compile(),this.multiRegexes[R]=L,L}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(R,L){this.rules.push([R,L]),L.type==="begin"&&this.count++}exec(R){const L=this.getMatcher(this.regexIndex);L.lastIndex=this.lastIndex;let te=L.exec(R);if(this.resumingScanAtSamePosition()&&!(te&&te.index===this.lastIndex)){const Y=this.getMatcher(0);Y.lastIndex=this.lastIndex+1,te=Y.exec(R)}return te&&(this.regexIndex+=te.position+1,this.regexIndex===this.count&&this.considerAll()),te}}function K(M){const R=new D;return M.contains.forEach(L=>R.addRule(L.begin,{rule:L,type:"begin"})),M.terminatorEnd&&R.addRule(M.terminatorEnd,{type:"end"}),M.illegal&&R.addRule(M.illegal,{type:"illegal"}),R}function X(M,R){const L=M;if(M.isCompiled)return L;[be,Qi,cn,en].forEach(Y=>Y(M,R)),d.compilerExtensions.forEach(Y=>Y(M,R)),M.__beforeBegin=null,[Ue,Ye,Yi].forEach(Y=>Y(M,R)),M.isCompiled=!0;let te=null;return typeof M.keywords=="object"&&M.keywords.$pattern&&(M.keywords=Object.assign({},M.keywords),te=M.keywords.$pattern,delete M.keywords.$pattern),te=te||/\w+/,M.keywords&&(M.keywords=_r(M.keywords,d.case_insensitive)),L.keywordPatternRe=x(te,!0),R&&(M.begin||(M.begin=/\B|\b/),L.beginRe=x(L.begin),!M.end&&!M.endsWithParent&&(M.end=/\B|\b/),M.end&&(L.endRe=x(L.end)),L.terminatorEnd=u(L.end)||"",M.endsWithParent&&R.terminatorEnd&&(L.terminatorEnd+=(M.end?"|":"")+R.terminatorEnd)),M.illegal&&(L.illegalRe=x(M.illegal)),M.contains||(M.contains=[]),M.contains=[].concat(...M.contains.map(function(Y){return hn(Y==="self"?M:Y)})),M.contains.forEach(function(Y){X(Y,L)}),M.starts&&X(M.starts,R),L.matcher=K(L),L}if(d.compilerExtensions||(d.compilerExtensions=[]),d.contains&&d.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return d.classNameAliases=r(d.classNameAliases||{}),X(d)}function kr(d){return d?d.endsWithParent||kr(d.starts):!1}function hn(d){return d.variants&&!d.cachedVariants&&(d.cachedVariants=d.variants.map(function(x){return r(d,{variants:null},x)})),d.cachedVariants?d.cachedVariants:kr(d)?r(d,{starts:d.starts?r(d.starts):null}):Object.isFrozen(d)?r(d):d}var dn="11.11.1";class fn extends Error{constructor(x,C){super(x),this.name="HTMLInjectionError",this.html=C}}const Et=i,Cr=r,Or=Symbol("nomatch"),pn=7,Rr=function(d){const x=Object.create(null),C=Object.create(null),D=[];let K=!0;const X="Could not find the language '{}', did you forget to load/include a language module?",M={disableAutodetect:!0,name:"Plain text",contains:[]};let R={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:s};function L(A){return R.noHighlightRe.test(A)}function te(A){let T=A.className+" ";T+=A.parentNode?A.parentNode.className:"";const H=R.languageDetectRe.exec(T);if(H){const G=ye(H[1]);return G||(Er(X.replace("{}",H[1])),Er("Falling back to no-highlight mode for this block.",A)),G?H[1]:"no-highlight"}return T.split(/\s+/).find(G=>L(G)||ye(G))}function Y(A,T,H){let G="",ee="";typeof T=="object"?(G=A,H=T.ignoreIllegals,ee=T.language):(Pe("10.7.0","highlight(lang, code, ...args) has been deprecated."),Pe("10.7.0",`Please use highlight(code, options) instead.
|
|
197
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),ee=A,G=T),H===void 0&&(H=!0);const de={code:G,language:ee};rt("before:highlight",de);const we=de.result?de.result:Be(de.language,de.code,H);return we.code=de.code,rt("after:highlight",we),we}function Be(A,T,H,G){const ee=Object.create(null);function de(k,N){return k.keywords[N]}function we(){if(!z.keywords){ie.addText(Z);return}let k=0;z.keywordPatternRe.lastIndex=0;let N=z.keywordPatternRe.exec(Z),B="";for(;N;){B+=Z.substring(k,N.index);const q=pe.case_insensitive?N[0].toLowerCase():N[0],se=de(z,q);if(se){const[ge,Mn]=se;if(ie.addText(B),B="",ee[q]=(ee[q]||0)+1,ee[q]<=pn&&(st+=Mn),ge.startsWith("_"))B+=N[0];else{const Nn=pe.classNameAliases[ge]||ge;fe(N[0],Nn)}}else B+=N[0];k=z.keywordPatternRe.lastIndex,N=z.keywordPatternRe.exec(Z)}B+=Z.substring(k),ie.addText(B)}function it(){if(Z==="")return;let k=null;if(typeof z.subLanguage=="string"){if(!x[z.subLanguage]){ie.addText(Z);return}k=Be(z.subLanguage,Z,!0,Ir[z.subLanguage]),Ir[z.subLanguage]=k._top}else k=kt(Z,z.subLanguage.length?z.subLanguage:null);z.relevance>0&&(st+=k.relevance),ie.__addSublanguage(k._emitter,k.language)}function le(){z.subLanguage!=null?it():we(),Z=""}function fe(k,N){k!==""&&(ie.startScope(N),ie.addText(k),ie.endScope())}function Pr(k,N){let B=1;const q=N.length-1;for(;B<=q;){if(!k._emit[B]){B++;continue}const se=pe.classNameAliases[k[B]]||k[B],ge=N[B];se?fe(ge,se):(Z=ge,we(),Z=""),B++}}function Tr(k,N){return k.scope&&typeof k.scope=="string"&&ie.openNode(pe.classNameAliases[k.scope]||k.scope),k.beginScope&&(k.beginScope._wrap?(fe(Z,pe.classNameAliases[k.beginScope._wrap]||k.beginScope._wrap),Z=""):k.beginScope._multi&&(Pr(k.beginScope,N),Z="")),z=Object.create(k,{parent:{value:z}}),z}function jr(k,N,B){let q=v(k.endRe,B);if(q){if(k["on:end"]){const se=new e(k);k["on:end"](N,se),se.isMatchIgnored&&(q=!1)}if(q){for(;k.endsParent&&k.parent;)k=k.parent;return k}}if(k.endsWithParent)return jr(k.parent,N,B)}function kn(k){return z.matcher.regexIndex===0?(Z+=k[0],1):($t=!0,0)}function Cn(k){const N=k[0],B=k.rule,q=new e(B),se=[B.__beforeBegin,B["on:begin"]];for(const ge of se)if(ge&&(ge(k,q),q.isMatchIgnored))return kn(N);return B.skip?Z+=N:(B.excludeBegin&&(Z+=N),le(),!B.returnBegin&&!B.excludeBegin&&(Z=N)),Tr(B,k),B.returnBegin?0:N.length}function On(k){const N=k[0],B=T.substring(k.index),q=jr(z,k,B);if(!q)return Or;const se=z;z.endScope&&z.endScope._wrap?(le(),fe(N,z.endScope._wrap)):z.endScope&&z.endScope._multi?(le(),Pr(z.endScope,k)):se.skip?Z+=N:(se.returnEnd||se.excludeEnd||(Z+=N),le(),se.excludeEnd&&(Z=N));do z.scope&&ie.closeNode(),!z.skip&&!z.subLanguage&&(st+=z.relevance),z=z.parent;while(z!==q.parent);return q.starts&&Tr(q.starts,k),se.returnEnd?0:N.length}function Rn(){const k=[];for(let N=z;N!==pe;N=N.parent)N.scope&&k.unshift(N.scope);k.forEach(N=>ie.openNode(N))}let nt={};function Lr(k,N){const B=N&&N[0];if(Z+=k,B==null)return le(),0;if(nt.type==="begin"&&N.type==="end"&&nt.index===N.index&&B===""){if(Z+=T.slice(N.index,N.index+1),!K){const q=new Error(`0 width match regex (${A})`);throw q.languageName=A,q.badRule=nt.rule,q}return 1}if(nt=N,N.type==="begin")return Cn(N);if(N.type==="illegal"&&!H){const q=new Error('Illegal lexeme "'+B+'" for mode "'+(z.scope||"<unnamed>")+'"');throw q.mode=z,q}else if(N.type==="end"){const q=On(N);if(q!==Or)return q}if(N.type==="illegal"&&B==="")return Z+=`
|
|
198
|
+
`,1;if(Rt>1e5&&Rt>N.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Z+=B,B.length}const pe=ye(A);if(!pe)throw Ee(X.replace("{}",A)),new Error('Unknown language: "'+A+'"');const $n=un(pe);let Ot="",z=G||$n;const Ir={},ie=new R.__emitter(R);Rn();let Z="",st=0,Ae=0,Rt=0,$t=!1;try{if(pe.__emitTokens)pe.__emitTokens(T,ie);else{for(z.matcher.considerAll();;){Rt++,$t?$t=!1:z.matcher.considerAll(),z.matcher.lastIndex=Ae;const k=z.matcher.exec(T);if(!k)break;const N=T.substring(Ae,k.index),B=Lr(N,k);Ae=k.index+B}Lr(T.substring(Ae))}return ie.finalize(),Ot=ie.toHTML(),{language:A,value:Ot,relevance:st,illegal:!1,_emitter:ie,_top:z}}catch(k){if(k.message&&k.message.includes("Illegal"))return{language:A,value:Et(T),illegal:!0,relevance:0,_illegalBy:{message:k.message,index:Ae,context:T.slice(Ae-100,Ae+100),mode:k.mode,resultSoFar:Ot},_emitter:ie};if(K)return{language:A,value:Et(T),illegal:!1,relevance:0,errorRaised:k,_emitter:ie,_top:z};throw k}}function At(A){const T={value:Et(A),illegal:!1,relevance:0,_top:M,_emitter:new R.__emitter(R)};return T._emitter.addText(A),T}function kt(A,T){T=T||R.languages||Object.keys(x);const H=At(A),G=T.filter(ye).filter(Nr).map(le=>Be(le,A,!1));G.unshift(H);const ee=G.sort((le,fe)=>{if(le.relevance!==fe.relevance)return fe.relevance-le.relevance;if(le.language&&fe.language){if(ye(le.language).supersetOf===fe.language)return 1;if(ye(fe.language).supersetOf===le.language)return-1}return 0}),[de,we]=ee,it=de;return it.secondBest=we,it}function gn(A,T,H){const G=T&&C[T]||H;A.classList.add("hljs"),A.classList.add(`language-${G}`)}function Ct(A){let T=null;const H=te(A);if(L(H))return;if(rt("before:highlightElement",{el:A,language:H}),A.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",A);return}if(A.children.length>0&&(R.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(A)),R.throwUnescapedHTML))throw new fn("One of your code blocks includes unescaped HTML.",A.innerHTML);T=A;const G=T.textContent,ee=H?Y(G,{language:H,ignoreIllegals:!0}):kt(G);A.innerHTML=ee.value,A.dataset.highlighted="yes",gn(A,H,ee.language),A.result={language:ee.language,re:ee.relevance,relevance:ee.relevance},ee.secondBest&&(A.secondBest={language:ee.secondBest.language,relevance:ee.secondBest.relevance}),rt("after:highlightElement",{el:A,result:ee,text:G})}function mn(A){R=Cr(R,A)}const bn=()=>{tt(),Pe("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function yn(){tt(),Pe("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let $r=!1;function tt(){function A(){tt()}if(document.readyState==="loading"){$r||window.addEventListener("DOMContentLoaded",A,!1),$r=!0;return}document.querySelectorAll(R.cssSelector).forEach(Ct)}function wn(A,T){let H=null;try{H=T(d)}catch(G){if(Ee("Language definition for '{}' could not be registered.".replace("{}",A)),K)Ee(G);else throw G;H=M}H.name||(H.name=A),x[A]=H,H.rawDefinition=T.bind(null,d),H.aliases&&Mr(H.aliases,{languageName:A})}function vn(A){delete x[A];for(const T of Object.keys(C))C[T]===A&&delete C[T]}function xn(){return Object.keys(x)}function ye(A){return A=(A||"").toLowerCase(),x[A]||x[C[A]]}function Mr(A,{languageName:T}){typeof A=="string"&&(A=[A]),A.forEach(H=>{C[H.toLowerCase()]=T})}function Nr(A){const T=ye(A);return T&&!T.disableAutodetect}function _n(A){A["before:highlightBlock"]&&!A["before:highlightElement"]&&(A["before:highlightElement"]=T=>{A["before:highlightBlock"](Object.assign({block:T.el},T))}),A["after:highlightBlock"]&&!A["after:highlightElement"]&&(A["after:highlightElement"]=T=>{A["after:highlightBlock"](Object.assign({block:T.el},T))})}function Sn(A){_n(A),D.push(A)}function En(A){const T=D.indexOf(A);T!==-1&&D.splice(T,1)}function rt(A,T){const H=A;D.forEach(function(G){G[H]&&G[H](T)})}function An(A){return Pe("10.7.0","highlightBlock will be removed entirely in v12.0"),Pe("10.7.0","Please use highlightElement now."),Ct(A)}Object.assign(d,{highlight:Y,highlightAuto:kt,highlightAll:tt,highlightElement:Ct,highlightBlock:An,configure:mn,initHighlighting:bn,initHighlightingOnLoad:yn,registerLanguage:wn,unregisterLanguage:vn,listLanguages:xn,getLanguage:ye,registerAliases:Mr,autoDetection:Nr,inherit:Cr,addPlugin:Sn,removePlugin:En}),d.debugMode=function(){K=!1},d.safeMode=function(){K=!0},d.versionString=dn,d.regex={concat:g,lookahead:o,either:_,optional:f,anyNumberOfTimes:a};for(const A in Ne)typeof Ne[A]=="object"&&n(Ne[A]);return Object.assign(d,Ne),d},Te=Rr({});return Te.newInstance=()=>Rr({}),or=Te,Te.HighlightJS=Te,Te.default=Te,or}var Hs=Bs();const vt=Us(Hs),dt="[A-Za-z$_][0-9A-Za-z$_]*",qi=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Wi=["true","false","null","undefined","NaN","Infinity"],Gi=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Zi=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Vi=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Ji=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Ki=[].concat(Vi,Gi,Zi);function Fs(n){const e=n.regex,i=(W,{after:Q})=>{const oe="</"+W[0].slice(1);return W.input.indexOf(oe,Q)!==-1},r=dt,t={begin:"<>",end:"</>"},c=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(W,Q)=>{const oe=W[0].length+W.index,ae=W.input[oe];if(ae==="<"||ae===","){Q.ignoreMatch();return}ae===">"&&(i(W,{after:oe})||Q.ignoreMatch());let me;const Se=W.input.substring(oe);if(me=Se.match(/^\s*=/)){Q.ignoreMatch();return}if((me=Se.match(/^\s+extends\s+/))&&me.index===0){Q.ignoreMatch();return}}},p={$pattern:dt,keyword:qi,literal:Wi,built_in:Ki,"variable.language":Ji},b="[0-9](_?[0-9])*",h=`\\.(${b})`,s="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",u={className:"number",variants:[{begin:`(\\b(${s})((${h})|\\.)?|(${h}))[eE][+-]?(${b})\\b`},{begin:`\\b(${s})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},o={className:"subst",begin:"\\$\\{",end:"\\}",keywords:p,contains:[]},a={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,o],subLanguage:"xml"}},f={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,o],subLanguage:"css"}},g={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,o],subLanguage:"graphql"}},m={className:"string",begin:"`",end:"`",contains:[n.BACKSLASH_ESCAPE,o]},_={className:"comment",variants:[n.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),n.C_BLOCK_COMMENT_MODE,n.C_LINE_COMMENT_MODE]},S=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,a,f,g,m,{match:/\$\d+/},u];o.contains=S.concat({begin:/\{/,end:/\}/,keywords:p,contains:["self"].concat(S)});const v=[].concat(_,o.contains),w=v.concat([{begin:/(\s*)\(/,end:/\)/,keywords:p,contains:["self"].concat(v)}]),y={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:p,contains:w},E={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,e.concat(r,"(",e.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},O={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Gi,...Zi]}},j={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},U={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[y],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function J(W){return e.concat("(?!",W.join("|"),")")}const F={match:e.concat(/\b/,J([...Vi,"super","import"].map(W=>`${W}\\s*\\(`)),r,e.lookahead(/\s*\(/)),className:"title.function",relevance:0},_e={begin:e.concat(/\./,e.lookahead(e.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ce={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},y]},$="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+n.UNDERSCORE_IDENT_RE+")\\s*=>",$e={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead($)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[y]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:p,exports:{PARAMS_CONTAINS:w,CLASS_REFERENCE:O},illegal:/#(?![$_A-z])/,contains:[n.SHEBANG({label:"shebang",binary:"node",relevance:5}),j,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,a,f,g,m,_,{match:/\$\d+/},u,O,{scope:"attr",match:r+e.lookahead(":"),relevance:0},$e,{begin:"("+n.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[_,n.REGEXP_MODE,{className:"function",begin:$,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:n.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:p,contains:w}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:t.begin,end:t.end},{match:c},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}]},U,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+n.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[y,n.inherit(n.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},_e,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[y]},F,P,E,ce,{match:/\$[(.]/}]}}function qs(n){const e=n.regex,i=Fs(n),r=dt,t=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],c={begin:[/namespace/,/\s+/,n.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},l={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:t},contains:[i.exports.CLASS_REFERENCE]},p={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},b=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],h={$pattern:dt,keyword:qi.concat(b),literal:Wi,built_in:Ki.concat(t),"variable.language":Ji},s={className:"meta",begin:"@"+r},u=(g,m,_)=>{const S=g.contains.findIndex(v=>v.label===m);if(S===-1)throw new Error("can not find mode to replace");g.contains.splice(S,1,_)};Object.assign(i.keywords,h),i.exports.PARAMS_CONTAINS.push(s);const o=i.contains.find(g=>g.scope==="attr"),a=Object.assign({},o,{match:e.concat(r,e.lookahead(/\s*\?:/))});i.exports.PARAMS_CONTAINS.push([i.exports.CLASS_REFERENCE,o,a]),i.contains=i.contains.concat([s,c,l,a]),u(i,"shebang",n.SHEBANG()),u(i,"use_strict",p);const f=i.contains.find(g=>g.label==="func.def");return f.relevance=0,Object.assign(i,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),i}function Ws(n){const e=n.regex,i=e.concat(/[\p{L}_]/u,e.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,t={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},c={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},l=n.inherit(c,{begin:/\(/,end:/\)/}),p=n.inherit(n.APOS_STRING_MODE,{className:"string"}),b=n.inherit(n.QUOTE_STRING_MODE,{className:"string"}),h={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[t]},{begin:/'/,end:/'/,contains:[t]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[c,b,p,l,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[c,l,b,p]}]}]},n.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},t,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[b]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[h],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[h],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:e.concat(/</,e.lookahead(e.concat(i,e.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:i,relevance:0,starts:h}]},{className:"tag",begin:e.concat(/<\//,e.lookahead(e.concat(i,/>/))),contains:[{className:"name",begin:i,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}const Gs=n=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:n.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:n.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Zs=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Vs=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Js=[...Zs,...Vs],Ks=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Xs=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Qs=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Ys=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function eo(n){const e=n.regex,i=Gs(n),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},t="and or not only",c=/@-?\w[\w]*(-\w+)*/,l="[a-zA-Z-][a-zA-Z0-9_-]*",p=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[i.BLOCK_COMMENT,r,i.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+l,relevance:0},i.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+Xs.join("|")+")"},{begin:":(:)?("+Qs.join("|")+")"}]},i.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Ys.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[i.BLOCK_COMMENT,i.HEXCOLOR,i.IMPORTANT,i.CSS_NUMBER_MODE,...p,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...p,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},i.FUNCTION_DISPATCH]},{begin:e.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:c},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:t,attribute:Ks.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...p,i.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Js.join("|")+")\\b"}]}}const Xi=document.createElement("style");Xi.innerText=[zs,Ds].join(`
|
|
199
|
+
`);document.head.appendChild(Xi);vt.registerLanguage("typescript",qs);vt.registerLanguage("html",Ws);vt.registerLanguage("css",eo);function to(...n){const e=document.createElement("div"),i=document.createElement("div");i.classList.add("tab-control");const r=document.createElement("div");return n.forEach(t=>{e.appendChild(t),t.addEventListener("click",()=>{n.forEach(c=>c.removeAttribute("selected")),t.setAttribute("selected",""),r.innerHTML="",r.appendChild(t.content),r.className=t.className,r.classList.add("tab-content")})}),i.appendChild(e),i.appendChild(r),r.classList.add("tab-content"),n[0].setAttribute("selected",""),r.appendChild(n[0].content),i}function Fe(n,e){const i=document.createElement("div");return i.role="tab",i.tabIndex=0,i.innerText=n,i.content=e,e.tagName=="PRE"&&i.classList.add("code"),i}function Ge(n,e){const i=document.createElement(n);return typeof e=="string"?i.innerHTML=e:e.forEach(r=>{i.appendChild(r)}),i}async function ro(n,e,i){const r=e.mainContent,t=Ge("div",r);t.id=`example-preview-${i}`;const c=typeof e.css=="string"?void 0:e.css?.label,l=typeof e.css=="string"?e.css:e.css?.content,p=to(Fe("Preview",t),Fe("HTML",lt("html",r)),...l?[Fe(c??"CSS",lt("css",l))]:[],...e.initializer&&e.initializer.content?[Fe(e.initializer.label??"TS",lt("typescript",e.initializer.content))]:[],...(e.additionalSources||[]).map(h=>Fe(h.label,lt(h.language,h.content))));e.description&&n.appendChild(Ge("div",e.description));const b=Ge("div",[p]);b.classList.add("example"),n.appendChild(b),l&&io(`#${t.id}`,l),e.initializer?.initialize&&await e.initializer.initialize(t)}function lt(n,e){let i=e.split(/\r?\n/).map(r=>{const t=r.indexOf("///");if(t>-1){const c=r.substring(t+3).trimStart();return c?r.replace(/^(\s*)([^\s].*)$/,`$1${c}`):void 0}return r}).filter(r=>typeof r<"u").join(`
|
|
200
|
+
`).trim();return n&&n!="raw"&&(i=vt.highlight(i,{language:n}).value),Ge("pre",[Ge("code",i)])}function io(n,e){const i=document.createElement("style");i.innerHTML=V().use(Is({prefix:n})).process(e).css,document.head.appendChild(i)}async function vr(n,e=document.body){const i=so(e);let r=0;Object.keys(n).sort().forEach(async t=>{const c=document.createElement("div");c.className="example-container",i.appendChild(c);const l=n[t].default;ro(c,l,r++)})}function no(n){const e=document.createElement("div");e.id="examples-container";const i=n.querySelector("#examples");return i?i.after(e):n.appendChild(e),e}function so(n){return n.children?no(n):n}const oo=`<h1 id="@cas-smartdesign/splitter">@cas-smartdesign/splitter</h1>
|
|
198
201
|
<p>A draggable splitter layout for displaying 2 panels side by side.</p>
|
|
199
202
|
<p>An initial ratio can be configured but the user is able to move the
|
|
200
203
|
splitter and therefore resize the panels.</p>
|
|
@@ -292,4 +295,4 @@ component implementation.</li>
|
|
|
292
295
|
</ul>
|
|
293
296
|
</li>
|
|
294
297
|
</ul>
|
|
295
|
-
`,
|
|
298
|
+
`,ao=document.querySelector("#markdown-container");ao.innerHTML=oo;vr(Object.assign({"./examples/basic-usage/index.ts":In}),document.querySelector(".markdown-body"));vr(Object.assign({"./examples/advanced-usage/index.ts":Hn}),document.querySelector(".markdown-body"));vr(Object.assign({"./examples/custom-splitter/index.ts":Zn}),document.querySelector(".markdown-body"));
|