@hy-bricks/core 0.3.0 → 0.4.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/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("./parseSourceEntry-UTE53-N3.cjs"),s=function(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const s in e)if("default"!==s){const r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:()=>e[s]})}return t.default=e,Object.freeze(t)}(e);function r(e){return{all:e=e||new Map,on:function(t,s){var r=e.get(t);r?r.push(s):e.set(t,[s])},off:function(t,s){var r=e.get(t);r&&(s?r.splice(r.indexOf(s)>>>0,1):e.set(t,[]))},emit:function(t,s){var r=e.get(t);r&&r.slice().map(function(e){e(s)}),(r=e.get("*"))&&r.slice().map(function(e){e(t,s)})}}}const n="__default__",o="__hcCanvasId",i=e.ref(0),l=r();function a(e,t){l.emit(e,t)}const c=new Set,u=new Map;function h(e,t,s,n){var o;const l=function(e,t){return`${e}\0${t}`}(e,t);if(c.has(l)){const s=`[hc-registry] re-entrant registerInCanvas("${e}", "${t}") detected — a lifecycle listener tried to register the same id while the outer register is in flight. Nested register blocked to prevent state divergence; defer your register via microtask / setTimeout if you need to re-mount on lifecycle events.`;throw console.warn(s),new Error(s)}c.add(l);try{const l=function(e){let t=u.get(e);return t||(t=new Map,u.set(e,t)),t}(e);l.has(t)&&(console.warn(`[hc-registry] instance ${t} already registered in canvas "${e}", overwriting`),null==(o=l.get(t))||o.__dispose(),l.delete(t),a("instance:unmounted",{canvasId:e,instanceId:t}));const c=function(e,t,s){const n=r();return{instanceId:e,componentId:t,vm:s,call(t,...r){const n=s[t];if("function"!=typeof n)throw new Error(`[hc-registry] method "${t}" not found on instance ${e}`);return n.apply(s,r)},on:(e,t)=>(n.on(e,t),()=>n.off(e,t)),emit(e,t){n.emit(e,t)},setProp(e,t){s[e]=t},setDataInput(t,r){const n=s.custom;if(!n||!(t in n))return void console.warn(`[hc-registry] setDataInput("${t}"): vm.custom["${t}"] not declared on instance ${e}; binding 改了一个未声明的 dataInput key,组件不会响应`);const o=n[t];o&&"object"==typeof o?!0===o.dataInput?o.value=r:console.warn(`[hc-registry] setDataInput("${t}"): vm.custom["${t}"] is not declared with dataInput:true on instance ${e}; 请在组件源码 custom.${t} 上加 \`dataInput: true\` 才能被 binding 灌入`):console.warn(`[hc-registry] setDataInput("${t}"): vm.custom["${t}"] not a {value:...} slot`)},__dispose(){n.all.clear()}}}(t,s,n);return l.set(t,c),i.value++,a("instance:ready",{canvasId:e,instanceId:t}),c}finally{c.delete(l)}}function p(e){const t=u.get(e);if(!t)return;const s=[];for(const[e,r]of t)r.__dispose(),s.push(e);t.clear(),u.delete(e),i.value++;for(const t of s)a("instance:unmounted",{canvasId:e,instanceId:t})}function f(){return[...u.keys()]}function d(e,t=n){const s=u.get(t);if(!s)return;const r=s.get(e);r&&(r.__dispose(),s.delete(e),i.value++,a("instance:unmounted",{canvasId:t,instanceId:e}))}function m(e,t){var s;if(void 0!==t)return(null==(s=u.get(t))?void 0:s.get(e))??null;let r=null;const n=[];for(const[t,s]of u){const o=s.get(e);o&&(r||(r=o),n.push(t))}return n.length>1&&console.warn(`[hc-registry] getInstance("${e}") matched ${n.length} canvases [${n.join(", ")}]; returning first. Prefer __HYPERCARD__.canvases.callComponent(canvasId, instanceId, ...) for explicit scope.`),r}function g(e){const t=null==e?void 0:e.componentId,s=t?e=>e.componentId===t:()=>!0;if(void 0!==(null==e?void 0:e.canvasId)){const t=u.get(e.canvasId);return t?[...t.values()].filter(s):[]}const r=[];for(const e of u.values())for(const t of e.values())s(t)&&r.push(t);return r}const y={getInstance:m,listInstances:g,call(e,t,...s){const r=m(e);if(r)return r.call(t,...s);console.debug(`[hc-runtime] call: instance "${e}" not found`)},on(e,t,s){const r=m(e);if(r)return r.on(t,s);console.debug(`[hc-runtime] on: instance "${e}" not found`)},emit(e,t,s){const r=m(e);r?r.emit(t,s):console.debug(`[hc-runtime] emit: instance "${e}" not found`)}},w={pickerUrl:e=>`/a/${e}`};function v(e){return{canvasId:e,listInstances:t=>g({canvasId:e,componentId:null==t?void 0:t.componentId}),getInstance:t=>m(t,e),call(t,s,...r){const n=m(t,e);if(n)try{return n.call(s,...r)}catch(r){return void console.warn(`[hc-canvases] call error: canvas="${e}" instance="${t}" method="${s}":`,r)}else console.warn(`[hc-canvases] call: instance "${t}" not found in canvas "${e}"`)},emit(t,s,r){const n=m(t,e);if(n)try{n.emit(s,r)}catch(r){console.warn(`[hc-canvases] emit error: canvas="${e}" instance="${t}" event="${s}":`,r)}else console.warn(`[hc-canvases] emit: instance "${t}" not found in canvas "${e}"`)},broadcastInCanvas(t,s){const r=g({canvasId:e});for(const n of r)try{n.emit(t,s)}catch(s){console.warn(`[hc-canvases] broadcastInCanvas: canvas="${e}" instance="${n.instanceId}" event="${t}" emit failed:`,s)}},dispose(){p(e)}}}function b(){return{list:()=>f().map(e=>v(e)),get:e=>f().includes(e)?v(e):null,getAll(){const e={};for(const t of f())e[t]=v(t);return e},callComponent(e,t,s,...r){const n=m(t,e);if(n)try{return n.call(s,...r)}catch(r){return void console.warn(`[hc-canvases] callComponent error: canvas="${e}" instance="${t}" method="${s}":`,r)}else console.warn(`[hc-canvases] callComponent: canvas="${e}" instance="${t}" not found`)},emitToCanvas(e,t,s,r){const n=m(t,e);if(n)try{n.emit(s,r)}catch(r){console.warn(`[hc-canvases] emitToCanvas error: canvas="${e}" instance="${t}" event="${s}":`,r)}else console.warn(`[hc-canvases] emitToCanvas: canvas="${e}" instance="${t}" not found`)},broadcast(e,t){for(const s of f())try{const r=g({canvasId:s});for(const n of r)try{n.emit(e,t)}catch(t){console.warn(`[hc-canvases] broadcast: canvas="${s}" instance="${n.instanceId}" event="${e}" emit failed:`,t)}}catch(t){console.warn(`[hc-canvases] broadcast: canvas="${s}" event="${e}" failed:`,t)}}}}const x=new Set(["vue","Vue","window","global","globalThis","console","document","process","$","libs","runtime","assets","version"]);function C(e){return Array.isArray(e)&&e.length>=1?C(e[0]):"object"==typeof e&&null!==e&&"function"==typeof e.install}function S(e){return Array.isArray(e)&&e.length>=1?[e[0],e.slice(1)]:[e,[]]}function k(e){return C(e)?Array.isArray(e)?"✓ Vue plugin (with options) → 已 app.use":"✓ Vue plugin → 已 app.use":"function"==typeof e?"· function":Array.isArray(e)?"· array":"object"==typeof e&&null!==e?"· object":"· "+typeof e}const O="__HYPERCARD__",E=new Set(["init","onClick","onMouseover","onMouseout","onResize","onDestroy"]),I=new Map;function A(e,t){for(I.has(e)&&I.delete(e),I.set(e,t);I.size>100;){const e=I.keys().next().value;if(void 0===e)break;I.delete(e)}}function P(e){let t=5381;for(let s=0;s<e.length;s++)t=(t<<5)+t+e.charCodeAt(s)|0;return(t>>>0).toString(36)}function R(e){if(!Array.isArray(e))return[];const t=[];for(const s of e){if(!s||"object"!=typeof s)continue;const e=s;if("string"!=typeof e.name)continue;const r={name:e.name};"boolean"==typeof e.multiple&&(r.multiple=e.multiple),Array.isArray(e.accepts)&&(r.accepts=e.accepts.filter(e=>"string"==typeof e)),"number"==typeof e.maxChildren&&(r.maxChildren=e.maxChildren),"string"==typeof e.label&&(r.label=e.label),t.push(r)}return t}async function $(e){const r=P(e.html)+"_"+P(e.js),n=I.get(r);if(n)return A(r,n),n;const o=(async()=>function(e,t){if(!e||"object"!=typeof e)throw new Error("[hc-compile] component.js must `export default` an object");const r=e,n=r.name,o=r.method??{},i=r.attribute??{},l=r.custom??{},a=r.style??{},c=r.slots,u=r.data,h=r.methods??{},p=r.computed,f=r.watch,d=r.mounted,m=r.beforeUnmount,g=r.props,y=new Set(["name","method","attribute","custom","style","option","data","methods","computed","watch","mounted","beforeUnmount","props","slots"]),w={};for(const e of Object.keys(r))y.has(e)||(w[e]=r[e]);const v={};for(const[e,t]of Object.entries(o))E.has(e)||"function"!=typeof t||(v[e]=t);const b=Object.keys(v),x={...v,...h},C=(t??"").trim()||"<div></div>";return{options:{render:s.compile(C),props:{...g?Array.isArray(g)?Object.fromEntries(g.map(e=>[e,null])):"object"==typeof g?g:{}:{},hcCustomValues:{type:Object,default:()=>({})}},data(){const e="function"==typeof u?u.call(this):u??{},t=this.hcCustomValues??{},s={};for(const[e,r]of Object.entries(l)){let n;try{n=JSON.parse(JSON.stringify(r??{}))}catch{n={...r??{}}}e in t&&n&&"object"==typeof n&&(n.value=t[e]),s[e]=n}return{custom:s,...e}},methods:x,computed:p,watch:(()=>{const e=f&&"object"==typeof f?{...f}:{};return e.hcCustomValues={handler(e){if(e&&this.custom)for(const[t,s]of Object.entries(e)){const e=this.custom[t];e&&"object"==typeof e&&(e.value=s)}},deep:!0},e})(),mounted(){const e=[],t=this.$el;if(t&&t instanceof HTMLElement){Object.assign(t.style,a);for(const[e,s]of Object.entries(i))"string"==typeof s&&s&&t.setAttribute(e,s);for(const s of E){if("init"===s)continue;const r=o[s];if("function"==typeof r){const n=s.replace(/^on/,"").toLowerCase(),o=e=>{r.call(this,{event:e,data:e})};t.addEventListener(n,o),e.push(()=>t.removeEventListener(n,o))}}}this.__hcCleanup=e;const s=o.init;"function"==typeof s&&s.call(this),"function"==typeof d&&d.call(this)},beforeUnmount(){var e;null==(e=this.__hcCleanup)||e.forEach(e=>{try{e()}catch{}}),this.__hcCleanup=void 0,"function"==typeof m&&m.call(this)},...w},meta:{name:n,attribute:i,style:a,customDecl:l,methodNames:b,slotsDecl:R(c)}}}(function(e){let s;try{const r=t.parse(e,{ecmaVersion:"latest",sourceType:"module",allowAwaitOutsideFunction:!0}).body.find(e=>"ExportDefaultDeclaration"===e.type);if(!r)throw new Error("[hc-compile] component.js must `export default` an object");s=e.slice(0,r.start)+"module.exports = "+e.slice(r.declaration.start)}catch(e){throw e instanceof Error?e:new Error(String(e))}const r=new Function("module","exports",`"use strict";\n${s}\n;return module.exports;`),n={exports:{}};try{return r(n,n.exports)}catch(e){throw e instanceof Error?e:new Error(String(e))}}(e.js),e.html))();return A(r,o),o.catch(()=>I.delete(r)),o}var _,j={exports:{}};const B=function(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var M,D,U,z,L,N;function F(){if(D)return M;D=1;let e=function(){if(_)return j.exports;_=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return j.exports=t(),j.exports.createColors=t,j.exports}(),t=B;class s extends Error{constructor(e,t,r,n,o,i){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==t&&void 0!==r&&("number"==typeof t?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(s){if(!this.source)return"";let r=this.source;null==s&&(s=e.isColorSupported);let n=e=>e,o=e=>e,i=e=>e;if(s){let{bold:s,gray:r,red:l}=e.createColors(!0);o=e=>s(l(e)),n=e=>r(e),t&&(i=e=>t(e))}let l=r.split(/\r?\n/),a=Math.max(this.line-3,0),c=Math.min(this.line+2,l.length),u=String(c).length;return l.slice(a,c).map((e,t)=>{let s=a+1+t,r=" "+(" "+s).slice(-u)+" | ";if(s===this.line){if(e.length>160){let t=20,s=Math.max(0,this.column-t),l=Math.max(this.column+t,this.endColumn+t),a=e.slice(s,l),c=n(r.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,t-1)).replace(/[^\t]/g," ");return o(">")+n(r)+i(a)+"\n "+c+o("^")}let t=n(r.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return o(">")+n(r)+i(e)+"\n "+t+o("^")}return" "+n(r)+i(e)}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}return M=s,s.default=s,M}function V(){if(z)return U;z=1;const e=/(<)(\/?style\b)/gi,t=/(<)(!--)/g;function s(s){return"string"!=typeof s?s:s.includes("<")?s.replace(e,"\\3c $2").replace(t,"\\3c $2"):s}const r={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class n{constructor(e){this.builder=e}atrule(e,t){let r=e.raws,n="@"+e.name,o=e.params?this.rawValue(e,"params"):"";if(void 0!==r.afterName?n+=r.afterName:o&&(n+=" "),e.nodes)this.block(e,n+o);else{let i=(r.between||"")+(t?";":"");this.builder(s(n+o+i),e)}}beforeAfter(e,t){let s;s="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(s(t+n)+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(s(r)),this.builder("}",e,"end")}body(e){let t=e.nodes,r=t.length-1;for(;r>0&&"comment"===t[r].type;)r-=1;let n=this.raw(e,"semicolon"),o="document"===e.type;for(let e=0;e<t.length;e++){let i=t[e],l=this.raw(i,"before");l&&this.builder(o?l:s(l)),this.stringify(i,r!==e||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(s("/*"+t+e.text+r+"*/"),e)}decl(e,t){let r=e.raws,n=this.raw(e,"between","colon"),o=e.prop+n+this.rawValue(e,"value");e.important&&(o+=r.important||" !important"),t&&(o+=";"),this.builder(s(o),e)}document(e){this.body(e)}raw(e,t,s){let n;if(s||(s=t),t&&(n=e.raws[t],void 0!==n))return n;let o=e.parent;if("before"===s){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}if(!o)return r[s];let i=e.root(),l=i.rawCache||(i.rawCache={});if(void 0!==l[s])return l[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let r="raw"+((a=s)[0].toUpperCase()+a.slice(1));this[r]?n=this[r](i,e):i.walk(e=>{if(n=e.raws[t],void 0!==n)return!1})}var a;return void 0===n&&(n=r[s]),l[s]=n,n}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){if(this.body(e),e.raws.after){let t=e.raws.after,r=e.parent&&"document"===e.parent.type;this.builder(r?t:s(t))}}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(s(e.raws.ownSemicolon),e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}return U=n,n.default=n,U}function T(){if(N)return L;N=1;let e=V();function t(t,s){new e(s).stringify(t)}return L=t,t.default=t,L}var W,H,J,Y,G,q,K,Z,Q,X,ee,te,se,re,ne,oe,ie,le,ae,ce,ue,he,pe,fe,de,me,ge,ye,we,ve,be,xe,Ce,Se,ke,Oe,Ee,Ie,Ae,Pe,Re,$e,_e,je,Be,Me,De,Ue,ze,Le={};function Ne(){return W||(W=1,Le.isClean=Symbol("isClean"),Le.my=Symbol("my")),Le}function Fe(){if(J)return H;J=1;let e=F(),t=V(),s=T(),{isClean:r,my:n}=Ne();function o(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>o(e,s)):("object"===i&&null!==n&&(n=o(n)),s[r]=n)}return s}function i(e,t){if(t&&void 0!==t.offset)return t.offset;let s=1,r=1,n=0;for(let o=0;o<e.length;o++){if(r===t.line&&s===t.column){n=o;break}"\n"===e[o]?(s=1,r+=1):s+=1}return n}class l{get proxyOf(){return this}constructor(e={}){this.raws={},this[r]=!1,this[n]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=o(this);for(let s in e)t[s]=e[s];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(t,s={}){if(this.source){let{end:e,start:r}=this.rangeBy(s);return this.source.input.error(t,{column:r.column,line:r.line},{column:e.column,line:e.line},s)}return new e(t)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markClean(){this[r]=!0}markDirty(){if(this[r]){this[r]=!1;let e=this;for(;e=e.parent;)e[r]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let s="document"in this.source.input?this.source.input.document:this.source.input.css,r=s.slice(i(s,this.source.start),i(s,this.source.end)).indexOf(e.word);-1!==r&&(t=this.positionInside(r))}return t}positionInside(e){let t=this.source.start.column,s=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,n=i(r,this.source.start),o=n+e;for(let e=n;e<o;e++)"\n"===r[e]?(t=1,s+=1):t+=1;return{column:t,line:s,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,s={column:this.source.start.column,line:this.source.start.line,offset:i(t,this.source.start)},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:i(t,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let n=t.slice(i(t,this.source.start),i(t,this.source.end)).indexOf(e.word);-1!==n&&(s=this.positionInside(n),r=this.positionInside(n+e.word.length))}else e.start?s={column:e.start.column,line:e.start.line,offset:i(t,e.start)}:e.index&&(s=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line,offset:i(t,e.end)}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<s.line||r.line===s.line&&r.column<=s.column)&&(r={column:s.column+1,line:s.line,offset:s.offset+1}),{end:r,start:s}}raw(e,s){return(new t).raw(this,e,s)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let r=this[e];if(Array.isArray(r))s[e]=r.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof r&&r.toJSON)s[e]=r.toJSON(null,t);else if("source"===e){if(null==r)continue;let o=t.get(r.input);null==o&&(o=n,t.set(r.input,n),n++),s[e]={end:r.end,inputId:o,start:r.start}}else s[e]=r}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=s){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s={}){let r={node:this};for(let e in s)r[e]=s[e];return e.warn(t,r)}}return H=l,l.default=l,H}function Ve(){if(G)return Y;G=1;let e=Fe();class t extends e{constructor(e){super(e),this.type="comment"}}return Y=t,t.default=t,Y}function Te(){if(K)return q;K=1;let e=Fe();class t extends e{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}}return q=t,t.default=t,q}function We(){if(Q)return Z;Q=1;let e,t,s,r,n=Ve(),o=Te(),i=Fe(),{isClean:l,my:a}=Ne();function c(e){return e.map(e=>(e.nodes&&(e.nodes=c(e.nodes)),delete e.source,e))}function u(e){if(e[l]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)u(t)}class h 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(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}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,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}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)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let e of n)this.proxyOf.nodes.splice(r+1,0,e);for(let e in this.indexes)s=this.indexes[e],r<s&&(this.indexes[e]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",o=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let e of o)this.proxyOf.nodes.splice(r,0,e);for(let e in this.indexes)s=this.indexes[e],r<=s&&(this.indexes[e]=s+o.length);return this.markDirty(),this}normalize(s,i){if("string"==typeof s)s=c(t(s).nodes);else if(void 0===s)s=[];else if(Array.isArray(s)){s=s.slice(0);for(let e of s)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===s.type&&"document"!==this.type){s=s.nodes.slice(0);for(let e of s)e.parent&&e.parent.removeChild(e,"ignore")}else if(s.type)s=[s];else if(s.prop){if(void 0===s.value)throw new Error("Value field is missed in node creation");"string"!=typeof s.value&&(s.value=String(s.value)),s=[new o(s)]}else if(s.selector||s.selectors)s=[new r(s)];else if(s.name)s=[new e(s)];else{if(!s.text)throw new Error("Unknown node type in node creation");s=[new n(s)]}return s.map(e=>(e[a]||h.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[l]&&u(e),e.raws||(e.raws={}),void 0===e.raws.before&&i&&void 0!==i.raws.before&&(e.raws.before=i.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.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){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=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,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}}return h.registerParse=e=>{t=e},h.registerRule=e=>{r=e},h.registerAtRule=t=>{e=t},h.registerRoot=e=>{s=e},Z=h,h.default=h,h.rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,e.prototype):"rule"===t.type?Object.setPrototypeOf(t,r.prototype):"decl"===t.type?Object.setPrototypeOf(t,o.prototype):"comment"===t.type?Object.setPrototypeOf(t,n.prototype):"root"===t.type&&Object.setPrototypeOf(t,s.prototype),t[a]=!0,t.nodes&&t.nodes.forEach(e=>{h.rebuild(e)})},Z}function He(){if(ee)return X;ee=1;let e=We();class t extends e{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)}}return X=t,t.default=t,e.registerAtRule(t),X}function Je(){if(se)return te;se=1;let e,t,s=We();class r extends s{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(s={}){return new e(new t,this,s).stringify()}}return r.registerLazyResult=t=>{e=t},r.registerProcessor=e=>{t=e},te=r,r.default=r,te}function Ye(){if(ie)return oe;ie=1;let{existsSync:e,readFileSync:t}=B,{dirname:s,join:r}=B,{SourceMapConsumer:n,SourceMapGenerator:o}=B;class i{constructor(e,t){if(!1===t.map)return;t.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=s(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new n(this.json||this.text)),this.consumerCache}decodeInline(e){let t=e.match(/^data:application\/json;charset=utf-?8,/)||e.match(/^data:application\/json,/);if(t)return decodeURIComponent(e.substr(t[0].length));let s=e.match(/^data:application\/json;charset=utf-?8;base64,/)||e.match(/^data:application\/json;base64,/);if(s)return r=e.substr(s[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var r;let n=e.slice(22);throw n=n.slice(0,n.indexOf(",")),new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(r,n,o){if(o||this.unsafeMap||/\.map$/i.test(r))return this.root=s(r),e(r)?(this.mapFile=r,t(r,"utf-8").toString().trim()):void 0}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof n)return o.fromSourceMap(t).toString();if(t instanceof o)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let t=this.loadFile(s,e,!0);if(!t)throw new Error("Unable to load previous source map: "+s.toString());return t}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;e&&(t=r(s(e),t));let n=this.loadFile(t,e,!1);if(n)try{this.json=JSON.parse(n.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return n}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return oe=i,i.default=i,oe}function Ge(){if(ae)return le;ae=1;let{nanoid:e}=ne?re:(ne=1,re={nanoid:(e=21)=>{let t="",s=0|e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(s=t)=>{let r="",n=0|s;for(;n--;)r+=e[Math.random()*e.length|0];return r}}),{isAbsolute:t,resolve:s}=B,{SourceMapConsumer:r,SourceMapGenerator:n}=B,{fileURLToPath:o,pathToFileURL:i}=B,l=F(),a=Ye(),c=B,u=Symbol("lineToIndexCache"),h=Boolean(r&&n),p=Boolean(s&&t);function f(e){if(e[u])return e[u];let t=e.css.split("\n"),s=new Array(t.length),r=0;for(let e=0,n=t.length;e<n;e++)s[e]=r,r+=t[e].length+1;return e[u]=s,s}class d{get from(){return this.file||this.id}constructor(r,n={}){if(null==r||"object"==typeof r&&!r.toString)throw new Error(`PostCSS received ${r} instead of CSS string`);if(this.css=r.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,n.document&&(this.document=n.document.toString()),n.from&&(!p||/^\w+:\/\//.test(n.from)||t(n.from)?this.file=n.from:this.file=s(n.from)),p&&h){let e=new a(this.css,n);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,o,a,c,u;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){c=e.offset;let r=this.fromOffset(c);t=r.line,s=r.col}else t=e.line,s=e.column,c=this.fromLineAndColumn(t,s);if("number"==typeof r.offset){a=r.offset;let e=this.fromOffset(a);o=e.line,n=e.col}else o=r.line,n=r.column,a=this.fromLineAndColumn(r.line,r.column)}else if(s)c=this.fromLineAndColumn(t,s);else{c=t;let e=this.fromOffset(c);t=e.line,s=e.col}let h=this.origin(t,s,o,n);return u=h?new l(e,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,r.plugin):new l(e,void 0===o?t:{column:s,line:t},void 0===o?s:{column:n,line:o},this.css,this.file,r.plugin),u.input={column:s,endColumn:n,endLine:o,endOffset:a,line:t,offset:c,source:this.css},this.file&&(i&&(u.input.url=i(this.file).toString()),u.input.file=this.file),u}fromLineAndColumn(e,t){return f(this)[e-1]+t-1}fromOffset(e){let t=f(this),s=0;if(e>=t[t.length-1])s=t.length-1;else{let r,n=t.length-2;for(;s<n;)if(r=s+(n-s>>1),e<t[r])n=r-1;else{if(!(e>=t[r+1])){s=r;break}s=r+1}}return{col:e-t[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:s(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,s,r,n){if(!this.map)return!1;let l,a,c=this.map.consumer(),u=c.originalPositionFor({column:s,line:e});if(!u.source)return!1;"number"==typeof r&&(l=c.originalPositionFor({column:n,line:r})),a=t(u.source)?i(u.source):new URL(u.source,this.map.consumer().sourceRoot||i(this.map.mapFile));let h={column:u.column,endColumn:l&&l.column,endLine:l&&l.line,line:u.line,url:a.toString()};if("file:"===a.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");h.file=o(a)}let p=c.sourceContentFor(u.source);return p&&(h.source=p),h}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}}return le=d,d.default=d,c&&c.registerInput&&c.registerInput(d),le}function qe(){if(ue)return ce;ue=1;let e,t,s=We();class r extends s{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(s={}){return new e(new t,this,s).stringify()}}return r.registerLazyResult=t=>{e=t},r.registerProcessor=e=>{t=e},ce=r,r.default=r,s.registerRoot(r),ce}function Ke(){if(pe)return he;pe=1;let e={comma:t=>e.split(t,[","],!0),space:t=>e.split(t,[" ","\n","\t"]),split(e,t,s){let r=[],n="",o=!1,i=0,l=!1,a="",c=!1;for(let s of e)c?c=!1:"\\"===s?c=!0:l?s===a&&(l=!1):'"'===s||"'"===s?(l=!0,a=s):"("===s?i+=1:")"===s?i>0&&(i-=1):0===i&&t.includes(s)&&(o=!0),o?(""!==n&&r.push(n.trim()),n="",o=!1):n+=s;return(s||""!==n)&&r.push(n.trim()),r}};return he=e,e.default=e,he}function Ze(){if(de)return fe;de=1;let e=We(),t=Ke();class s extends e{get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}}return fe=s,s.default=s,e.registerRule(s),fe}function Qe(){if(we)return ye;we=1;let{dirname:e,relative:t,resolve:s,sep:r}=B,{SourceMapConsumer:n,SourceMapGenerator:o}=B,{pathToFileURL:i}=B,l=Ge(),a=Boolean(n&&o),c=Boolean(e&&s&&t&&r);return ye=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let t of this.previous()){let s,r=this.toUrl(this.path(t.file)),o=t.root||e(t.file);!1===this.mapOpts.sourcesContent?(s=new n(t.text),s.sourcesContent&&(s.sourcesContent=null)):s=t.consumer(),this.map.applySourceMap(s,r,this.toUrl(this.path(o)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else if(this.css){let e;for(;-1!==(e=this.css.lastIndexOf("/*#"));){let t=this.css.indexOf("*/",e+3);if(-1===t)break;for(;e>0&&"\n"===this.css[e-1];)e--;this.css=this.css.slice(0,e)+this.css.slice(t+2)}}}generate(){if(this.clearAnnotation(),c&&a&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=o.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new o({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 o({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,l,a)=>{if(this.css+=o,l&&"end"!==a&&(i.generated.line=s,i.generated.column=r-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),t=o.match(/\n/g),t?(s+=t.length,e=o.lastIndexOf("\n"),r=o.length-e):r+=o.length,l&&"start"!==a){let e=l.parent||{raws:{}};("decl"===l.type||"atrule"===l.type&&!l.nodes)&&l===e.last&&!e.raws.semicolon||(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(r){if(this.mapOpts.absolute)return r;if(60===r.charCodeAt(0))return r;if(/^\w+:\/\//.test(r))return r;let n=this.memoizedPaths.get(r);if(n)return n;let o=this.opts.to?e(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=e(s(o,this.mapOpts.annotation)));let i=t(o,r);return this.memoizedPaths.set(r,i),i}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 l(this.originalCSS,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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,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(i){let t=i(e).toString();return this.memoizedFileURLs.set(e,t),t}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;"\\"===r&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}}}function Xe(){if(ke)return Se;ke=1;let e=We(),t=Ge(),s=function(){if(Ce)return xe;Ce=1;let e=He(),t=Ve(),s=Te(),r=qe(),n=Ze(),o=function(){if(be)return ve;be=1;const e="'".charCodeAt(0),t='"'.charCodeAt(0),s="\\".charCodeAt(0),r="/".charCodeAt(0),n="\n".charCodeAt(0),o=" ".charCodeAt(0),i="\f".charCodeAt(0),l="\t".charCodeAt(0),a="\r".charCodeAt(0),c="[".charCodeAt(0),u="]".charCodeAt(0),h="(".charCodeAt(0),p=")".charCodeAt(0),f="{".charCodeAt(0),d="}".charCodeAt(0),m=";".charCodeAt(0),g="*".charCodeAt(0),y=":".charCodeAt(0),w="@".charCodeAt(0),v=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,x=/.[\r\n"'(/\\]/,C=/[\da-f]/i;return ve=function(S,k={}){let O,E,I,A,P,R,$,_,j,B,M=S.css.valueOf(),D=k.ignoreErrors,U=M.length,z=0,L=[],N=[],F=-1;function V(e){throw S.error("Unclosed "+e,z)}return{back:function(e){N.push(e)},endOfFile:function(){return 0===N.length&&z>=U},nextToken:function(S){if(N.length)return N.pop();if(z>=U)return;let k=!!S&&S.ignoreUnclosed;switch(O=M.charCodeAt(z),O){case n:case o:case l:case a:case i:A=z;do{A+=1,O=M.charCodeAt(A)}while(O===o||O===n||O===l||O===a||O===i);R=["space",M.slice(z,A)],z=A-1;break;case c:case u:case f:case d:case y:case m:case p:{let e=String.fromCharCode(O);R=[e,e,z];break}case h:if(B=L.length?L.pop()[1]:"",j=M.charCodeAt(z+1),"url"===B&&j!==e&&j!==t&&j!==o&&j!==n&&j!==l&&j!==i&&j!==a){A=z;do{if($=!1,A=M.indexOf(")",A+1),-1===A){if(D||k){A=z;break}V("bracket")}for(_=A;M.charCodeAt(_-1)===s;)_-=1,$=!$}while($);R=["brackets",M.slice(z,A+1),z,A],z=A}else z<=F?R=["(","(",z]:(A=M.indexOf(")",z+1),E=M.slice(z,A+1),-1===A||x.test(E)?(F=-1===A?U:A,R=["(","(",z]):(R=["brackets",E,z,A],z=A));break;case e:case t:P=O===e?"'":'"',A=z;do{if($=!1,A=M.indexOf(P,A+1),-1===A){if(D||k){A=z+1;break}V("string")}for(_=A;M.charCodeAt(_-1)===s;)_-=1,$=!$}while($);R=["string",M.slice(z,A+1),z,A],z=A;break;case w:v.lastIndex=z+1,v.test(M),A=0===v.lastIndex?M.length-1:v.lastIndex-2,R=["at-word",M.slice(z,A+1),z,A],z=A;break;case s:for(A=z,I=!0;M.charCodeAt(A+1)===s;)A+=1,I=!I;if(O=M.charCodeAt(A+1),I&&O!==r&&O!==o&&O!==n&&O!==l&&O!==a&&O!==i&&(A+=1,C.test(M.charAt(A)))){for(;C.test(M.charAt(A+1));)A+=1;M.charCodeAt(A+1)===o&&(A+=1)}R=["word",M.slice(z,A+1),z,A],z=A;break;default:O===r&&M.charCodeAt(z+1)===g?(A=M.indexOf("*/",z+2)+1,0===A&&(D||k?A=M.length:V("comment")),R=["comment",M.slice(z,A+1),z,A],z=A):(b.lastIndex=z+1,b.test(M),A=0===b.lastIndex?M.length-1:b.lastIndex-2,R=["word",M.slice(z,A+1),z,A],L.push(R),z=A)}return z++,R},position:function(){return z}}}}();const i={empty:!0,space:!0};return xe=class{constructor(e){this.input=e,this.root=new r,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(t){let s,r,n,o=new e;o.name=t[1].slice(1),""===o.name&&this.unnamedAtrule(o,t),this.init(o,t[2]);let i=!1,l=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(s=(t=this.tokenizer.nextToken())[0],"("===s||"["===s?c.push("("===s?")":"]"):"{"===s&&c.length>0?c.push("}"):s===c[c.length-1]&&c.pop(),0===c.length){if(";"===s){o.source.end=this.getPosition(t[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===s){l=!0;break}if("}"===s){if(a.length>0){for(n=a.length-1,r=a[n];r&&"space"===r[0];)r=a[--n];r&&(o.source.end=this.getPosition(r[3]||r[2]),o.source.end.offset++)}this.end(t);break}a.push(t)}else a.push(t);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(o.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(o,"params",a),i&&(t=a[a.length-1],o.source.end=this.getPosition(t[3]||t[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),l&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[o,i]of e.entries()){if(s=i,r=s[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(t){if("word"===t[0]&&"progid"===t[1])continue;return o}this.doubleColon(s)}t=s}return!1}comment(e){let s=new t;this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++;let r=e[1].slice(2,-2);if(r.trim()){let e=r.match(/^(\s*)([^]*\S)(\s*)$/);s.text=e[2],s.raws.left=e[1],s.raws.right=e[3]}else s.text="",s.raws.left=r,s.raws.right=""}createTokenizer(){this.tokenizer=o(this.input)}decl(e,t){let r=new s;this.init(r,e[0][2]);let n,o=e[e.length-1];for(";"===o[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(o[3]||o[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(n=e.shift(),":"===n[0]){r.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let i,l=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)l.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(n=e[t],"!important"===n[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===n[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(n.trim().startsWith("!")&&"space"!==t)break;n=s.pop()[1]+n}n.trim().startsWith("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==n[0]&&"comment"!==n[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(r.raws.between+=l.map(e=>e[1]).join(""),l=[]),this.raw(r,"value",l.concat(e),t),r.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 n;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&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}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="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,n=null,o=[],i=e[1].startsWith("--"),l=[],a=e;for(;a;){if(s=a[0],l.push(a),"("===s||"["===s)n||(n=a),o.push("("===s?")":"]");else if(i&&r&&"{"===s)n||(n=a),o.push("}");else if(0===o.length){if(";"===s){if(r)return void this.decl(l,i);break}if("{"===s)return void this.rule(l);if("}"===s){this.tokenizer.back(l.pop()),t=!0;break}":"===s&&(r=!0)}else s===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&r){if(!i)for(;l.length&&(a=l[l.length-1][0],"space"===a||"comment"===a);)this.tokenizer.back(l.pop());this.decl(l,i)}else this.unknownWord(l)}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)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let n,o,l,a,c=s.length,u="",h=!0;for(let e=0;e<c;e+=1)n=s[e],o=n[0],"space"!==o||e!==c-1||r?"comment"===o?(a=s[e-1]?s[e-1][0]:"empty",l=s[e+1]?s[e+1][0]:"empty",i[a]||i[l]||","===u.slice(-1)?h=!1:u+=n[1]):u+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:u}}e[t]=u}rule(e){e.pop();let t=new n;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}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 "+e[0][1],{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})}}}();function r(e,r){let n=new t(e,r),o=new s(n);try{o.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&r&&r.from&&(/\.scss$/i.test(r.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(r.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(r.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return o.root}return Se=r,r.default=r,e.registerParse(r),Se}function et(){if(Ee)return Oe;Ee=1;class e{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}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 Oe=e,e.default=e,Oe}function tt(){if(Ae)return Ie;Ae=1;let e=et();class t{get content(){return this.css}constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(t,s={}){s.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(s.plugin=this.lastPlugin.postcssPlugin);let r=new e(t,s);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}}return Ie=t,t.default=t,Ie}function st(){if(Re)return Pe;Re=1;let e={};return Pe=function(t){e[t]||(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}function rt(){if(_e)return $e;_e=1;let e=We(),t=Je(),s=Qe(),r=Xe(),n=tt(),o=qe(),i=T(),{isClean:l,my:a}=Ne(),c=st();const u={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},p={Once:!0,postcssPlugin:!0,prepare:!0};function f(e){return"object"==typeof e&&"function"==typeof e.then}function d(e){let t=!1,s=u[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function m(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:d(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function g(e){return e[l]=!1,e.nodes&&e.nodes.forEach(e=>g(e)),e}let y={};class w{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(t,s,o){let i;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof w||s instanceof n)i=g(s.root),s.map&&(void 0===o.map&&(o.map={}),o.map.inline||(o.map.inline=!1),o.map.prev=s.map);else{let t=r;o.syntax&&(t=o.syntax.parse),o.parser&&(t=o.parser),t.parse&&(t=t.parse);try{i=t(s,o)}catch(e){this.processed=!0,this.error=e}i&&!i[a]&&e.rebuild(i)}else i=g(s);this.result=new n(t,i,o),this.helpers={...y,postcss:y,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}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 s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),o=r.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!h[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!p[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}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],s=this.runOnRoot(t);if(f(s))try{await s}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[l];){e[l]=!0;let t=[m(e)];for(;t.length>0;){let e=this.visitTick(t);if(f(e))try{await e}catch(e){let s=t[t.length-1].node;throw this.handleError(e,s)}}}if(this.listeners.OnceExit)for(let[t,s]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>s(e,this.helpers));await Promise.all(t)}else await s(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=i;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=this.result.root.source;if(void 0===e.map&&!(r&&r.input&&r.input.map)){let e="";return t(this.result.root,t=>{e+=t}),this.result.css=e,this.result}let n=new s(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[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)if(f(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[l];)e[l]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)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"production"!==process.env.NODE_ENV&&("from"in this.opts||c("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[s,r]of e){let e;this.result.lastPlugin=s;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(f(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(e){throw this.handleError(e,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[l])return r[l]=!0,void e.push(m(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[l]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[l]=!0;let t=d(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[l]||this.walkSync(e)});else{let t=this.listeners[s];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}}return w.registerPostcss=e=>{y=e},$e=w,w.default=w,o.registerLazyResult(w),t.registerLazyResult(w),$e}const nt=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(function(){if(ze)return Ue;ze=1;let e=He(),t=Ve(),s=We(),r=F(),n=Te(),o=Je(),i=function(){if(ge)return me;ge=1;let e=He(),t=Ve(),s=Te(),r=Ge(),n=Ye(),o=qe(),i=Ze();function l(a,c){if(Array.isArray(a))return a.map(e=>l(e));let{inputs:u,...h}=a;if(u){c=[];for(let e of u){let t={...e,__proto__:r.prototype};t.map&&(t.map={...t.map,__proto__:n.prototype}),c.push(t)}}if(h.nodes&&(h.nodes=a.nodes.map(e=>l(e,c))),h.source){let{inputId:e,...t}=h.source;h.source=t,null!=e&&(h.source.input=c[e])}if("root"===h.type)return new o(h);if("decl"===h.type)return new s(h);if("rule"===h.type)return new i(h);if("comment"===h.type)return new t(h);if("atrule"===h.type)return new e(h);throw new Error("Unknown node type: "+a.type)}return me=l,l.default=l,me}(),l=Ge(),a=rt(),c=Ke(),u=Fe(),h=Xe(),p=function(){if(De)return Me;De=1;let e=Je(),t=rt(),s=function(){if(Be)return je;Be=1;let e=Qe(),t=Xe(),s=tt(),r=T(),n=st();class o{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,s=t;try{e=s(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,n,o){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=o,this._map=void 0;let i=r;this.result=new s(this._processor,void 0,this._opts),this.result.css=n;let l=this;Object.defineProperty(this.result,"root",{get:()=>l.root});let a=new e(i,void 0,this._opts,n);if(a.isMap()){let[e,t]=a.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else a.clearAnnotation(),this.result.css=a.css}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"production"!==process.env.NODE_ENV&&("from"in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}}return je=o,o.default=o,je}(),r=qe();class n{constructor(e=[]){this.version="8.5.14",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,r={}){return this.plugins.length||r.parser||r.stringifier||r.syntax?new t(this,e,r):new s(this,e,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return Me=n,n.default=n,r.registerProcessor(n),e.registerProcessor(n),Me}(),f=tt(),d=qe(),m=Ze(),g=T(),y=et();function w(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new p(e)}return w.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...s);return n.postcssPlugin=e,n.postcssVersion=(new p).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return w([n(s)]).process(e,t)},n},w.stringify=g,w.parse=h,w.fromJSON=i,w.list=c,w.comment=e=>new t(e),w.atRule=t=>new e(t),w.decl=e=>new n(e),w.rule=e=>new m(e),w.root=e=>new d(e),w.document=e=>new o(e),w.CssSyntaxError=r,w.Declaration=n,w.Container=s,w.Processor=p,w.Document=o,w.Comment=t,w.Warning=y,w.AtRule=e,w.Result=f,w.Input=l,w.Rule=m,w.Root=d,w.Node=u,a.registerPostcss(w),Ue=w,w.default=w,Ue}());nt.stringify,nt.fromJSON,nt.plugin,nt.parse,nt.list,nt.document,nt.comment,nt.atRule,nt.rule,nt.decl,nt.root,nt.CssSyntaxError,nt.Declaration,nt.Container,nt.Processor,nt.Document,nt.Comment,nt.Warning,nt.AtRule,nt.Result,nt.Input,nt.Rule,nt.Root,nt.Node;const ot=new Set(["body","html",":root","*"]);function it(e,t){return e&&e.trim()?nt([(s=`[data-vbi-type="${t}"]`,{postcssPlugin:"hc-scope",AtRule(e){if("import"===e.name)return console.warn("[hc-css-scope] @import 已被拒绝(防外部资源加载):",e.params),void e.remove();"font-face"===e.name&&console.warn("[hc-css-scope] @font-face 全局生效,font-family 命名注意冲突")},Rule(e){(function(e){let t=e.parent;for(;t&&"object"==typeof t;){const e=t;if("atrule"===e.type&&/keyframes$/i.test(e.name??""))return!0;t=e.parent}return!1})(e)||(e.selectors=e.selectors.map(e=>function(e,t){const s=e.trim();if(!s)return s;if(ot.has(s))return t;for(const e of ot){const r=s.charAt(e.length);if(s.startsWith(e)&&(" "===r||">"===r||"+"===r||"~"===r||","===r))return t+s.slice(e.length)}return`${t} ${s}`}(e,s)))}})]).process(e,{from:void 0}).css:"";var s}const lt=new Map;function at(e){let t=5381;for(let s=0;s<e.length;s++)t=(t<<5)+t+e.charCodeAt(s)|0;return(t>>>0).toString(36)}function ct(e){const t=e.replace(/[^a-zA-Z0-9_-]/g,"_");return t===e?`hc-style-${t}`:`hc-style-${t}-${at(e).slice(0,6)}`}function ut(e,t){var s;const r=t??"",n=ct(e),o=lt.get(e);if(!r.trim())return null==(s=document.getElementById(n))||s.remove(),void(o&&lt.set(e,{...o,cssHash:""}));const i=at(r);if(o&&o.cssHash===i)return;let l;try{l=it(r,e)}catch(t){return void console.warn("[hc-css-scope]",e,"PostCSS process failed:",t)}!function(e,t){const s=ct(e);let r=document.getElementById(s);r||(r=document.createElement("style"),r.id=s,r.setAttribute("data-hc-scope",e),document.head.appendChild(r)),r.textContent=t}(e,l),o?lt.set(e,{...o,cssHash:i}):lt.set(e,{cssHash:i,refCount:0})}function ht(e,t){ut(e,t);const s=lt.get(e);s?lt.set(e,{...s,refCount:s.refCount+1}):lt.set(e,{cssHash:"",refCount:1})}function pt(e){var t;const s=lt.get(e);if(!s)return;const r=s.refCount-1;r<=0?(null==(t=document.getElementById(ct(e)))||t.remove(),lt.delete(e)):lt.set(e,{...s,refCount:r})}const ft={key:1,class:"rounded-md border-2 border-rose-300 bg-rose-50 p-4 text-sm text-rose-900 space-y-2 min-h-[140px] overflow-auto"},dt={class:"font-semibold flex items-center gap-1.5"},mt={class:"font-mono text-xs text-rose-800 break-all"},gt={key:0,class:"text-[10px] font-mono bg-rose-100/60 p-2 rounded overflow-auto max-h-60 text-rose-800"},yt=e.defineComponent({__name:"ErrorBoundary",props:{label:{}},setup(t){const s=t,r=e.ref(null),n=e.ref(0),o=e.ref(!1);function i(){r.value=null,o.value=!1,n.value++}return e.onErrorCaptured(e=>(console.error(`[hc-eb${s.label?" "+s.label:""}]`,e),r.value=e,!1)),(s,l)=>(e.openBlock(),e.createElementBlock("div",{key:n.value,class:"hc-eb-root",style:{width:"100%",height:"100%"}},[r.value?(e.openBlock(),e.createElementBlock("div",ft,[e.createElementVNode("div",dt,[l[1]||(l[1]=e.createElementVNode("span",null,"⚠️",-1)),e.createElementVNode("span",null,"组件渲染失败"+e.toDisplayString(t.label?` — ${t.label}`:""),1)]),e.createElementVNode("div",mt,e.toDisplayString(r.value.message),1),e.createElementVNode("button",{class:"text-xs text-rose-700 hover:text-rose-900 underline",onClick:l[0]||(l[0]=e=>o.value=!o.value)},e.toDisplayString(o.value?"隐藏":"展开")+"堆栈 ",1),o.value?(e.openBlock(),e.createElementBlock("pre",gt,e.toDisplayString(r.value.stack),1)):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"text-xs px-3 py-1 rounded bg-rose-600 hover:bg-rose-700 text-white transition-colors",onClick:i}," 重试 ")])):e.renderSlot(s.$slots,"default",{key:0})]))}}),wt=["data-vbi-id","data-vbi-type","data-vbi-canvas"],vt={key:0,class:"rounded-md border-2 border-amber-300 bg-amber-50 p-4 text-sm text-amber-900 space-y-2 min-h-[140px] overflow-auto"},bt={class:"text-[11px] font-mono break-all whitespace-pre-wrap"},xt={key:1,class:"grid place-items-center min-h-[140px] text-xs text-zinc-400"},Ct=e.defineComponent({__name:"RuntimeBox",props:{instanceId:{},componentId:{},scopeId:{},canvasId:{},htmlSource:{},jsSource:{},cssSource:{default:""},customValues:{default:()=>({})},position:{},size:{},zIndex:{}},setup(t){const s=t,r=e.computed(()=>s.scopeId??s.componentId),i=e.inject(o,null),l=e.computed(()=>s.canvasId??i??n),a=e.shallowRef(null),c=e.ref(null),u=e.ref(!1),p=e.ref(0);e.watch(()=>[s.htmlSource,s.jsSource],()=>{!async function(){u.value=!0,c.value=null;try{const e=await $({html:s.htmlSource,js:s.jsSource});a.value=e,p.value++}catch(e){c.value=e instanceof Error?e:new Error(String(e)),a.value=null}finally{u.value=!1}}()},{immediate:!0});let f=!1;e.watch(()=>[s.cssSource,r.value],([e,t],s)=>{const r=(null==s?void 0:s[1])??null;r&&r!==t?(pt(r),ht(t,e),f=!0):f?ut(t,e):(ht(t,e),f=!0)},{immediate:!0});const m=e.computed(()=>{const e={width:"100%",height:"100%"};return s.position&&(e.position="absolute",e.left=`${s.position.x}px`,e.top=`${s.position.y}px`),void 0!==s.zIndex&&(e.zIndex=String(s.zIndex)),e});let g=null,y=null;function w(e){if(e!==g)if(g=e,e&&"object"==typeof e){const t=l.value;h(t,s.instanceId,s.componentId,e),y=t}else null!==y&&(d(s.instanceId,y),y=null)}return e.onBeforeUnmount(()=>{null!==y&&(d(s.instanceId,y),y=null),g=null,f&&(pt(r.value),f=!1)}),(s,n)=>(e.openBlock(),e.createElementBlock("div",{class:"_vbi_box","data-vbi-id":t.instanceId,"data-vbi-type":r.value,"data-vbi-canvas":l.value,style:e.normalizeStyle(m.value)},[c.value?(e.openBlock(),e.createElementBlock("div",vt,[n[0]||(n[0]=e.createElementVNode("div",{class:"font-semibold"},"⚠️ 编译失败",-1)),e.createElementVNode("pre",bt,e.toDisplayString(c.value.message),1)])):u.value&&!a.value?(e.openBlock(),e.createElementBlock("div",xt," 编译中… ")):a.value?(e.openBlock(),e.createBlock(yt,{key:p.value,label:t.instanceId},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value.options),{"hc-custom-values":t.customValues,ref:w},null,8,["hc-custom-values"]))]),_:1},8,["label"])):e.createCommentVNode("",!0)],12,wt))}});exports.parseComponentSource=t.parseComponentSource,exports.DEFAULT_CANVAS_ID=n,exports.ErrorBoundary=yt,exports.HC_CANVAS_ID_KEY=o,exports.HC_INJECT_KEY=O,exports.RuntimeBox=Ct,exports.VERSION="0.0.0-stage2b",exports.__resetLifecycleEmitter=function(){l.all.clear()},exports.__resetRegistry=function(){const e=[];for(const[t,s]of u)for(const[r,n]of s)n.__dispose(),e.push({canvasId:t,instanceId:r});u.clear(),i.value++;for(const t of e)a("instance:unmounted",t)},exports.assets=w,exports.attachScope=ht,exports.clearCompileCache=function(){I.clear()},exports.compileComponent=$,exports.createCanvasesRegistry=b,exports.createHyperCard=function(e={}){const t=e.strict??!1,s=e.libs??{},r=e.version??"v1";return{install(e){const n=Object.entries(s),o=n.filter(([,e])=>C(e)),i=n.filter(([e])=>x.has(e)),l=[`[hypercard] 已注册 ${n.length} 个 libs:`];for(const[e,t]of n)l.push(` ${e.padEnd(16)} ${k(t)}`);console.info(l.join("\n"));const a=[];o.length>1&&a.push(`检测到 ${o.length} 个 Vue plugin(${o.map(([e])=>e).join(", ")}),请确认全局组件命名不冲突`);for(const[e]of i)a.push(`lib 名 "${e}" 是保留词,建议改名`);if(a.length>0){const e=a.map(e=>` - ${e}`).join("\n");if(t)throw new Error(`[hypercard] strict mode 阻止启动:\n${e}`);console.warn(`[hypercard] 警告:\n${e}`)}for(const[s,r]of o){const[n,o]=S(r);try{e.use(n,...o)}catch(e){if(console.error(`[hypercard] app.use("${s}") 失败:`,e),t)throw e}}const c={};for(const[e,t]of n){const[s]=S(t);c[e]=s}const u={libs:c,runtime:y,assets:w,version:r,canvases:b()};e.provide(O,u),e.config.globalProperties.$hc=u,"undefined"!=typeof window&&(window.__HYPERCARD__=u)}}},exports.debugScopedCssRefs=function(){return[...lt.entries()].map(([e,t])=>({scopeId:e,componentId:e,refCount:t.refCount,cssHash:t.cssHash}))},exports.detachScope=pt,exports.disposeCanvas=p,exports.getCompileCacheSize=function(){return I.size},exports.getInstance=m,exports.getScopedCssCount=function(){return lt.size},exports.injectScopedCss=ut,exports.isVuePlugin=C,exports.listCanvasIds=f,exports.listInstances=g,exports.onInstanceLifecycle=function(e,t){const s=e=>{try{t(e)}catch(e){console.error("[hc-registry] instance lifecycle listener threw",e)}};return l.on(e,s),()=>l.off(e,s)},exports.register=function(e,t,s){return h(n,e,t,s)},exports.registerInCanvas=h,exports.registryVersion=i,exports.removeScopedCss=function(e){var t;null==(t=document.getElementById(ct(e)))||t.remove(),lt.delete(e)},exports.runtime=y,exports.scopeCss=it,exports.unregister=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("./parseSourceEntry-UTE53-N3.cjs"),s=function(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const s in e)if("default"!==s){const r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:()=>e[s]})}return t.default=e,Object.freeze(t)}(e);function r(e){return{all:e=e||new Map,on:function(t,s){var r=e.get(t);r?r.push(s):e.set(t,[s])},off:function(t,s){var r=e.get(t);r&&(s?r.splice(r.indexOf(s)>>>0,1):e.set(t,[]))},emit:function(t,s){var r=e.get(t);r&&r.slice().map(function(e){e(s)}),(r=e.get("*"))&&r.slice().map(function(e){e(t,s)})}}}const n="__default__",o="__hcCanvasId",i=e.ref(0),a=r();function l(e,t){a.emit(e,t)}const c=new Set,u=new Map;function h(e,t,s,n){var o;const a=function(e,t){return`${e}\0${t}`}(e,t);if(c.has(a)){const s=`[hc-registry] re-entrant registerInCanvas("${e}", "${t}") detected — a lifecycle listener tried to register the same id while the outer register is in flight. Nested register blocked to prevent state divergence; defer your register via microtask / setTimeout if you need to re-mount on lifecycle events.`;throw console.warn(s),new Error(s)}c.add(a);try{const a=function(e){let t=u.get(e);return t||(t=new Map,u.set(e,t)),t}(e);a.has(t)&&(console.warn(`[hc-registry] instance ${t} already registered in canvas "${e}", overwriting`),null==(o=a.get(t))||o.__dispose(),a.delete(t),l("instance:unmounted",{canvasId:e,instanceId:t}));const c=function(e,t,s){const n=r();return{instanceId:e,componentId:t,vm:s,call(t,...r){const n=s[t];if("function"!=typeof n)throw new Error(`[hc-registry] method "${t}" not found on instance ${e}`);return n.apply(s,r)},on:(e,t)=>(n.on(e,t),()=>n.off(e,t)),emit(e,t){n.emit(e,t)},setProp(e,t){s[e]=t},setDataInput(t,r){const n=s.custom;if(!n||!(t in n))return void console.warn(`[hc-registry] setDataInput("${t}"): vm.custom["${t}"] not declared on instance ${e}; binding 改了一个未声明的 dataInput key,组件不会响应`);const o=n[t];o&&"object"==typeof o?!0===o.dataInput?o.value=r:console.warn(`[hc-registry] setDataInput("${t}"): vm.custom["${t}"] is not declared with dataInput:true on instance ${e}; 请在组件源码 custom.${t} 上加 \`dataInput: true\` 才能被 binding 灌入`):console.warn(`[hc-registry] setDataInput("${t}"): vm.custom["${t}"] not a {value:...} slot`)},__dispose(){n.all.clear()}}}(t,s,n);return a.set(t,c),i.value++,l("instance:ready",{canvasId:e,instanceId:t}),c}finally{c.delete(a)}}function p(e){const t=u.get(e);if(!t)return;const s=[];for(const[e,r]of t)r.__dispose(),s.push(e);t.clear(),u.delete(e),i.value++;for(const t of s)l("instance:unmounted",{canvasId:e,instanceId:t})}function f(){return[...u.keys()]}function d(e,t=n){const s=u.get(t);if(!s)return;const r=s.get(e);r&&(r.__dispose(),s.delete(e),i.value++,l("instance:unmounted",{canvasId:t,instanceId:e}))}function m(e,t){var s;if(void 0!==t)return(null==(s=u.get(t))?void 0:s.get(e))??null;let r=null;const n=[];for(const[t,s]of u){const o=s.get(e);o&&(r||(r=o),n.push(t))}return n.length>1&&console.warn(`[hc-registry] getInstance("${e}") matched ${n.length} canvases [${n.join(", ")}]; returning first. Prefer __HYPERCARD__.canvases.callComponent(canvasId, instanceId, ...) for explicit scope.`),r}function g(e){const t=null==e?void 0:e.componentId,s=t?e=>e.componentId===t:()=>!0;if(void 0!==(null==e?void 0:e.canvasId)){const t=u.get(e.canvasId);return t?[...t.values()].filter(s):[]}const r=[];for(const e of u.values())for(const t of e.values())s(t)&&r.push(t);return r}const y={getInstance:m,listInstances:g,call(e,t,...s){const r=m(e);if(r)return r.call(t,...s);console.debug(`[hc-runtime] call: instance "${e}" not found`)},on(e,t,s){const r=m(e);if(r)return r.on(t,s);console.debug(`[hc-runtime] on: instance "${e}" not found`)},emit(e,t,s){const r=m(e);r?r.emit(t,s):console.debug(`[hc-runtime] emit: instance "${e}" not found`)}},w={pickerUrl:e=>`/a/${e}`};function v(e){return{canvasId:e,listInstances:t=>g({canvasId:e,componentId:null==t?void 0:t.componentId}),getInstance:t=>m(t,e),call(t,s,...r){const n=m(t,e);if(n)try{return n.call(s,...r)}catch(r){return void console.warn(`[hc-canvases] call error: canvas="${e}" instance="${t}" method="${s}":`,r)}else console.warn(`[hc-canvases] call: instance "${t}" not found in canvas "${e}"`)},emit(t,s,r){const n=m(t,e);if(n)try{n.emit(s,r)}catch(r){console.warn(`[hc-canvases] emit error: canvas="${e}" instance="${t}" event="${s}":`,r)}else console.warn(`[hc-canvases] emit: instance "${t}" not found in canvas "${e}"`)},broadcastInCanvas(t,s){const r=g({canvasId:e});for(const n of r)try{n.emit(t,s)}catch(s){console.warn(`[hc-canvases] broadcastInCanvas: canvas="${e}" instance="${n.instanceId}" event="${t}" emit failed:`,s)}},dispose(){p(e)}}}function b(){return{list:()=>f().map(e=>v(e)),get:e=>f().includes(e)?v(e):null,getAll(){const e={};for(const t of f())e[t]=v(t);return e},callComponent(e,t,s,...r){const n=m(t,e);if(n)try{return n.call(s,...r)}catch(r){return void console.warn(`[hc-canvases] callComponent error: canvas="${e}" instance="${t}" method="${s}":`,r)}else console.warn(`[hc-canvases] callComponent: canvas="${e}" instance="${t}" not found`)},emitToCanvas(e,t,s,r){const n=m(t,e);if(n)try{n.emit(s,r)}catch(r){console.warn(`[hc-canvases] emitToCanvas error: canvas="${e}" instance="${t}" event="${s}":`,r)}else console.warn(`[hc-canvases] emitToCanvas: canvas="${e}" instance="${t}" not found`)},broadcast(e,t){for(const s of f())try{const r=g({canvasId:s});for(const n of r)try{n.emit(e,t)}catch(t){console.warn(`[hc-canvases] broadcast: canvas="${s}" instance="${n.instanceId}" event="${e}" emit failed:`,t)}}catch(t){console.warn(`[hc-canvases] broadcast: canvas="${s}" event="${e}" failed:`,t)}}}}const x=new Set(["vue","Vue","window","global","globalThis","console","document","process","$","libs","runtime","assets","version"]);function C(e){return Array.isArray(e)&&e.length>=1?C(e[0]):"object"==typeof e&&null!==e&&"function"==typeof e.install}function S(e){return Array.isArray(e)&&e.length>=1?[e[0],e.slice(1)]:[e,[]]}function k(e){return C(e)?Array.isArray(e)?"✓ Vue plugin (with options) → 已 app.use":"✓ Vue plugin → 已 app.use":"function"==typeof e?"· function":Array.isArray(e)?"· array":"object"==typeof e&&null!==e?"· object":"· "+typeof e}const O="__HYPERCARD__",I=new Set(["init","onClick","onMouseover","onMouseout","onResize","onDestroy"]),E=new Map;function A(e,t){for(E.has(e)&&E.delete(e),E.set(e,t);E.size>100;){const e=E.keys().next().value;if(void 0===e)break;E.delete(e)}}function P(e){let t=5381;for(let s=0;s<e.length;s++)t=(t<<5)+t+e.charCodeAt(s)|0;return(t>>>0).toString(36)}function R(e){if(!Array.isArray(e))return[];const t=[];for(const s of e){if(!s||"object"!=typeof s)continue;const e=s;if("string"!=typeof e.name)continue;const r={name:e.name};"boolean"==typeof e.multiple&&(r.multiple=e.multiple),Array.isArray(e.accepts)&&(r.accepts=e.accepts.filter(e=>"string"==typeof e)),"number"==typeof e.maxChildren&&(r.maxChildren=e.maxChildren),"string"==typeof e.label&&(r.label=e.label),t.push(r)}return t}async function $(e){const r=P(e.html)+"_"+P(e.js),n=E.get(r);if(n)return A(r,n),n;const o=(async()=>function(e,t){if(!e||"object"!=typeof e)throw new Error("[hc-compile] component.js must `export default` an object");const r=e,n=r.name,o=r.method??{},i=r.attribute??{},a=r.custom??{},l=r.style??{},c=r.slots,u=r.data,p=r.methods??{},f=r.computed,m=r.watch,g=r.created,y=r.mounted,w=r.beforeUnmount,v=r.props,b=new Set(["name","method","attribute","custom","style","option","data","methods","computed","watch","created","mounted","beforeUnmount","props","slots"]),x={};for(const e of Object.keys(r))b.has(e)||(x[e]=r[e]);const C={};for(const[e,t]of Object.entries(o))I.has(e)||"function"!=typeof t||(C[e]=t);const S=Object.keys(C),k={...C,...p},O=(t??"").trim()||"<div></div>";return{options:{render:s.compile(O),props:{...v?Array.isArray(v)?Object.fromEntries(v.map(e=>[e,null])):"object"==typeof v?v:{}:{},hcCustomValues:{type:Object,default:()=>({})},hcInstanceId:{type:String,default:""},hcCanvasId:{type:String,default:""},hcComponentId:{type:String,default:""}},data(){const e="function"==typeof u?u.call(this):u??{},t=this.hcCustomValues??{},s={};for(const[e,r]of Object.entries(a)){let n;try{n=JSON.parse(JSON.stringify(r??{}))}catch{n={...r??{}}}e in t&&n&&"object"==typeof n&&(n.value=t[e]),s[e]=n}return{custom:s,...e}},methods:k,computed:f,watch:(()=>{const e=m&&"object"==typeof m?{...m}:{};return e.hcCustomValues={handler(e){if(e&&this.custom)for(const[t,s]of Object.entries(e)){const e=this.custom[t];e&&"object"==typeof e&&(e.value=s)}},deep:!0},e})(),created(){this.hcInstanceId&&this.hcCanvasId&&h(this.hcCanvasId,this.hcInstanceId,this.hcComponentId,this),"function"==typeof g&&g.call(this)},mounted(){const e=[],t=this.$el;if(t&&t instanceof HTMLElement){Object.assign(t.style,l);for(const[e,s]of Object.entries(i))"string"==typeof s&&s&&t.setAttribute(e,s);for(const s of I){if("init"===s)continue;const r=o[s];if("function"==typeof r){const n=s.replace(/^on/,"").toLowerCase(),o=e=>{r.call(this,{event:e,data:e})};t.addEventListener(n,o),e.push(()=>t.removeEventListener(n,o))}}}this.__hcCleanup=e;const s=o.init;"function"==typeof s&&s.call(this),"function"==typeof y&&y.call(this)},beforeUnmount(){var e;this.hcInstanceId&&this.hcCanvasId&&d(this.hcInstanceId,this.hcCanvasId),null==(e=this.__hcCleanup)||e.forEach(e=>{try{e()}catch{}}),this.__hcCleanup=void 0,"function"==typeof w&&w.call(this)},...x},meta:{name:n,attribute:i,style:l,customDecl:a,methodNames:S,slotsDecl:R(c)}}}(function(e){let s;try{const r=t.parse(e,{ecmaVersion:"latest",sourceType:"module",allowAwaitOutsideFunction:!0}).body.find(e=>"ExportDefaultDeclaration"===e.type);if(!r)throw new Error("[hc-compile] component.js must `export default` an object");s=e.slice(0,r.start)+"module.exports = "+e.slice(r.declaration.start)}catch(e){throw e instanceof Error?e:new Error(String(e))}const r=new Function("module","exports",`"use strict";\n${s}\n;return module.exports;`),n={exports:{}};try{return r(n,n.exports)}catch(e){throw e instanceof Error?e:new Error(String(e))}}(e.js),e.html))();return A(r,o),o.catch(()=>E.delete(r)),o}var _,j={exports:{}};const B=function(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var M,D,U,z,L,N;function F(){if(D)return M;D=1;let e=function(){if(_)return j.exports;_=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return j.exports=t(),j.exports.createColors=t,j.exports}(),t=B;class s extends Error{constructor(e,t,r,n,o,i){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==t&&void 0!==r&&("number"==typeof t?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(s){if(!this.source)return"";let r=this.source;null==s&&(s=e.isColorSupported);let n=e=>e,o=e=>e,i=e=>e;if(s){let{bold:s,gray:r,red:a}=e.createColors(!0);o=e=>s(a(e)),n=e=>r(e),t&&(i=e=>t(e))}let a=r.split(/\r?\n/),l=Math.max(this.line-3,0),c=Math.min(this.line+2,a.length),u=String(c).length;return a.slice(l,c).map((e,t)=>{let s=l+1+t,r=" "+(" "+s).slice(-u)+" | ";if(s===this.line){if(e.length>160){let t=20,s=Math.max(0,this.column-t),a=Math.max(this.column+t,this.endColumn+t),l=e.slice(s,a),c=n(r.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,t-1)).replace(/[^\t]/g," ");return o(">")+n(r)+i(l)+"\n "+c+o("^")}let t=n(r.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return o(">")+n(r)+i(e)+"\n "+t+o("^")}return" "+n(r)+i(e)}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}return M=s,s.default=s,M}function V(){if(z)return U;z=1;const e=/(<)(\/?style\b)/gi,t=/(<)(!--)/g;function s(s){return"string"!=typeof s?s:s.includes("<")?s.replace(e,"\\3c $2").replace(t,"\\3c $2"):s}const r={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class n{constructor(e){this.builder=e}atrule(e,t){let r=e.raws,n="@"+e.name,o=e.params?this.rawValue(e,"params"):"";if(void 0!==r.afterName?n+=r.afterName:o&&(n+=" "),e.nodes)this.block(e,n+o);else{let i=(r.between||"")+(t?";":"");this.builder(s(n+o+i),e)}}beforeAfter(e,t){let s;s="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(s(t+n)+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(s(r)),this.builder("}",e,"end")}body(e){let t=e.nodes,r=t.length-1;for(;r>0&&"comment"===t[r].type;)r-=1;let n=this.raw(e,"semicolon"),o="document"===e.type;for(let e=0;e<t.length;e++){let i=t[e],a=this.raw(i,"before");a&&this.builder(o?a:s(a)),this.stringify(i,r!==e||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(s("/*"+t+e.text+r+"*/"),e)}decl(e,t){let r=e.raws,n=this.raw(e,"between","colon"),o=e.prop+n+this.rawValue(e,"value");e.important&&(o+=r.important||" !important"),t&&(o+=";"),this.builder(s(o),e)}document(e){this.body(e)}raw(e,t,s){let n;if(s||(s=t),t&&(n=e.raws[t],void 0!==n))return n;let o=e.parent;if("before"===s){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}if(!o)return r[s];let i=e.root(),a=i.rawCache||(i.rawCache={});if(void 0!==a[s])return a[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let r="raw"+((l=s)[0].toUpperCase()+l.slice(1));this[r]?n=this[r](i,e):i.walk(e=>{if(n=e.raws[t],void 0!==n)return!1})}var l;return void 0===n&&(n=r[s]),a[s]=n,n}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){if(this.body(e),e.raws.after){let t=e.raws.after,r=e.parent&&"document"===e.parent.type;this.builder(r?t:s(t))}}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(s(e.raws.ownSemicolon),e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}return U=n,n.default=n,U}function T(){if(N)return L;N=1;let e=V();function t(t,s){new e(s).stringify(t)}return L=t,t.default=t,L}var W,H,J,Y,G,q,K,Z,Q,X,ee,te,se,re,ne,oe,ie,ae,le,ce,ue,he,pe,fe,de,me,ge,ye,we,ve,be,xe,Ce,Se,ke,Oe,Ie,Ee,Ae,Pe,Re,$e,_e,je,Be,Me,De,Ue,ze,Le={};function Ne(){return W||(W=1,Le.isClean=Symbol("isClean"),Le.my=Symbol("my")),Le}function Fe(){if(J)return H;J=1;let e=F(),t=V(),s=T(),{isClean:r,my:n}=Ne();function o(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>o(e,s)):("object"===i&&null!==n&&(n=o(n)),s[r]=n)}return s}function i(e,t){if(t&&void 0!==t.offset)return t.offset;let s=1,r=1,n=0;for(let o=0;o<e.length;o++){if(r===t.line&&s===t.column){n=o;break}"\n"===e[o]?(s=1,r+=1):s+=1}return n}class a{get proxyOf(){return this}constructor(e={}){this.raws={},this[r]=!1,this[n]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=o(this);for(let s in e)t[s]=e[s];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(t,s={}){if(this.source){let{end:e,start:r}=this.rangeBy(s);return this.source.input.error(t,{column:r.column,line:r.line},{column:e.column,line:e.line},s)}return new e(t)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markClean(){this[r]=!0}markDirty(){if(this[r]){this[r]=!1;let e=this;for(;e=e.parent;)e[r]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let s="document"in this.source.input?this.source.input.document:this.source.input.css,r=s.slice(i(s,this.source.start),i(s,this.source.end)).indexOf(e.word);-1!==r&&(t=this.positionInside(r))}return t}positionInside(e){let t=this.source.start.column,s=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,n=i(r,this.source.start),o=n+e;for(let e=n;e<o;e++)"\n"===r[e]?(t=1,s+=1):t+=1;return{column:t,line:s,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,s={column:this.source.start.column,line:this.source.start.line,offset:i(t,this.source.start)},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:i(t,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let n=t.slice(i(t,this.source.start),i(t,this.source.end)).indexOf(e.word);-1!==n&&(s=this.positionInside(n),r=this.positionInside(n+e.word.length))}else e.start?s={column:e.start.column,line:e.start.line,offset:i(t,e.start)}:e.index&&(s=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line,offset:i(t,e.end)}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<s.line||r.line===s.line&&r.column<=s.column)&&(r={column:s.column+1,line:s.line,offset:s.offset+1}),{end:r,start:s}}raw(e,s){return(new t).raw(this,e,s)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let r=this[e];if(Array.isArray(r))s[e]=r.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof r&&r.toJSON)s[e]=r.toJSON(null,t);else if("source"===e){if(null==r)continue;let o=t.get(r.input);null==o&&(o=n,t.set(r.input,n),n++),s[e]={end:r.end,inputId:o,start:r.start}}else s[e]=r}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=s){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s={}){let r={node:this};for(let e in s)r[e]=s[e];return e.warn(t,r)}}return H=a,a.default=a,H}function Ve(){if(G)return Y;G=1;let e=Fe();class t extends e{constructor(e){super(e),this.type="comment"}}return Y=t,t.default=t,Y}function Te(){if(K)return q;K=1;let e=Fe();class t extends e{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}}return q=t,t.default=t,q}function We(){if(Q)return Z;Q=1;let e,t,s,r,n=Ve(),o=Te(),i=Fe(),{isClean:a,my:l}=Ne();function c(e){return e.map(e=>(e.nodes&&(e.nodes=c(e.nodes)),delete e.source,e))}function u(e){if(e[a]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)u(t)}class h 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(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}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,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}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)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let e of n)this.proxyOf.nodes.splice(r+1,0,e);for(let e in this.indexes)s=this.indexes[e],r<s&&(this.indexes[e]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",o=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let e of o)this.proxyOf.nodes.splice(r,0,e);for(let e in this.indexes)s=this.indexes[e],r<=s&&(this.indexes[e]=s+o.length);return this.markDirty(),this}normalize(s,i){if("string"==typeof s)s=c(t(s).nodes);else if(void 0===s)s=[];else if(Array.isArray(s)){s=s.slice(0);for(let e of s)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===s.type&&"document"!==this.type){s=s.nodes.slice(0);for(let e of s)e.parent&&e.parent.removeChild(e,"ignore")}else if(s.type)s=[s];else if(s.prop){if(void 0===s.value)throw new Error("Value field is missed in node creation");"string"!=typeof s.value&&(s.value=String(s.value)),s=[new o(s)]}else if(s.selector||s.selectors)s=[new r(s)];else if(s.name)s=[new e(s)];else{if(!s.text)throw new Error("Unknown node type in node creation");s=[new n(s)]}return s.map(e=>(e[l]||h.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[a]&&u(e),e.raws||(e.raws={}),void 0===e.raws.before&&i&&void 0!==i.raws.before&&(e.raws.before=i.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.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){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=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,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}}return h.registerParse=e=>{t=e},h.registerRule=e=>{r=e},h.registerAtRule=t=>{e=t},h.registerRoot=e=>{s=e},Z=h,h.default=h,h.rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,e.prototype):"rule"===t.type?Object.setPrototypeOf(t,r.prototype):"decl"===t.type?Object.setPrototypeOf(t,o.prototype):"comment"===t.type?Object.setPrototypeOf(t,n.prototype):"root"===t.type&&Object.setPrototypeOf(t,s.prototype),t[l]=!0,t.nodes&&t.nodes.forEach(e=>{h.rebuild(e)})},Z}function He(){if(ee)return X;ee=1;let e=We();class t extends e{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)}}return X=t,t.default=t,e.registerAtRule(t),X}function Je(){if(se)return te;se=1;let e,t,s=We();class r extends s{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(s={}){return new e(new t,this,s).stringify()}}return r.registerLazyResult=t=>{e=t},r.registerProcessor=e=>{t=e},te=r,r.default=r,te}function Ye(){if(ie)return oe;ie=1;let{existsSync:e,readFileSync:t}=B,{dirname:s,join:r}=B,{SourceMapConsumer:n,SourceMapGenerator:o}=B;class i{constructor(e,t){if(!1===t.map)return;t.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=s(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new n(this.json||this.text)),this.consumerCache}decodeInline(e){let t=e.match(/^data:application\/json;charset=utf-?8,/)||e.match(/^data:application\/json,/);if(t)return decodeURIComponent(e.substr(t[0].length));let s=e.match(/^data:application\/json;charset=utf-?8;base64,/)||e.match(/^data:application\/json;base64,/);if(s)return r=e.substr(s[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var r;let n=e.slice(22);throw n=n.slice(0,n.indexOf(",")),new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(r,n,o){if(o||this.unsafeMap||/\.map$/i.test(r))return this.root=s(r),e(r)?(this.mapFile=r,t(r,"utf-8").toString().trim()):void 0}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof n)return o.fromSourceMap(t).toString();if(t instanceof o)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let t=this.loadFile(s,e,!0);if(!t)throw new Error("Unable to load previous source map: "+s.toString());return t}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;e&&(t=r(s(e),t));let n=this.loadFile(t,e,!1);if(n)try{this.json=JSON.parse(n.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return n}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return oe=i,i.default=i,oe}function Ge(){if(le)return ae;le=1;let{nanoid:e}=ne?re:(ne=1,re={nanoid:(e=21)=>{let t="",s=0|e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(s=t)=>{let r="",n=0|s;for(;n--;)r+=e[Math.random()*e.length|0];return r}}),{isAbsolute:t,resolve:s}=B,{SourceMapConsumer:r,SourceMapGenerator:n}=B,{fileURLToPath:o,pathToFileURL:i}=B,a=F(),l=Ye(),c=B,u=Symbol("lineToIndexCache"),h=Boolean(r&&n),p=Boolean(s&&t);function f(e){if(e[u])return e[u];let t=e.css.split("\n"),s=new Array(t.length),r=0;for(let e=0,n=t.length;e<n;e++)s[e]=r,r+=t[e].length+1;return e[u]=s,s}class d{get from(){return this.file||this.id}constructor(r,n={}){if(null==r||"object"==typeof r&&!r.toString)throw new Error(`PostCSS received ${r} instead of CSS string`);if(this.css=r.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,n.document&&(this.document=n.document.toString()),n.from&&(!p||/^\w+:\/\//.test(n.from)||t(n.from)?this.file=n.from:this.file=s(n.from)),p&&h){let e=new l(this.css,n);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,o,l,c,u;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){c=e.offset;let r=this.fromOffset(c);t=r.line,s=r.col}else t=e.line,s=e.column,c=this.fromLineAndColumn(t,s);if("number"==typeof r.offset){l=r.offset;let e=this.fromOffset(l);o=e.line,n=e.col}else o=r.line,n=r.column,l=this.fromLineAndColumn(r.line,r.column)}else if(s)c=this.fromLineAndColumn(t,s);else{c=t;let e=this.fromOffset(c);t=e.line,s=e.col}let h=this.origin(t,s,o,n);return u=h?new a(e,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,r.plugin):new a(e,void 0===o?t:{column:s,line:t},void 0===o?s:{column:n,line:o},this.css,this.file,r.plugin),u.input={column:s,endColumn:n,endLine:o,endOffset:l,line:t,offset:c,source:this.css},this.file&&(i&&(u.input.url=i(this.file).toString()),u.input.file=this.file),u}fromLineAndColumn(e,t){return f(this)[e-1]+t-1}fromOffset(e){let t=f(this),s=0;if(e>=t[t.length-1])s=t.length-1;else{let r,n=t.length-2;for(;s<n;)if(r=s+(n-s>>1),e<t[r])n=r-1;else{if(!(e>=t[r+1])){s=r;break}s=r+1}}return{col:e-t[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:s(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,s,r,n){if(!this.map)return!1;let a,l,c=this.map.consumer(),u=c.originalPositionFor({column:s,line:e});if(!u.source)return!1;"number"==typeof r&&(a=c.originalPositionFor({column:n,line:r})),l=t(u.source)?i(u.source):new URL(u.source,this.map.consumer().sourceRoot||i(this.map.mapFile));let h={column:u.column,endColumn:a&&a.column,endLine:a&&a.line,line:u.line,url:l.toString()};if("file:"===l.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");h.file=o(l)}let p=c.sourceContentFor(u.source);return p&&(h.source=p),h}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}}return ae=d,d.default=d,c&&c.registerInput&&c.registerInput(d),ae}function qe(){if(ue)return ce;ue=1;let e,t,s=We();class r extends s{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(s={}){return new e(new t,this,s).stringify()}}return r.registerLazyResult=t=>{e=t},r.registerProcessor=e=>{t=e},ce=r,r.default=r,s.registerRoot(r),ce}function Ke(){if(pe)return he;pe=1;let e={comma:t=>e.split(t,[","],!0),space:t=>e.split(t,[" ","\n","\t"]),split(e,t,s){let r=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let s of e)c?c=!1:"\\"===s?c=!0:a?s===l&&(a=!1):'"'===s||"'"===s?(a=!0,l=s):"("===s?i+=1:")"===s?i>0&&(i-=1):0===i&&t.includes(s)&&(o=!0),o?(""!==n&&r.push(n.trim()),n="",o=!1):n+=s;return(s||""!==n)&&r.push(n.trim()),r}};return he=e,e.default=e,he}function Ze(){if(de)return fe;de=1;let e=We(),t=Ke();class s extends e{get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}}return fe=s,s.default=s,e.registerRule(s),fe}function Qe(){if(we)return ye;we=1;let{dirname:e,relative:t,resolve:s,sep:r}=B,{SourceMapConsumer:n,SourceMapGenerator:o}=B,{pathToFileURL:i}=B,a=Ge(),l=Boolean(n&&o),c=Boolean(e&&s&&t&&r);return ye=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let t of this.previous()){let s,r=this.toUrl(this.path(t.file)),o=t.root||e(t.file);!1===this.mapOpts.sourcesContent?(s=new n(t.text),s.sourcesContent&&(s.sourcesContent=null)):s=t.consumer(),this.map.applySourceMap(s,r,this.toUrl(this.path(o)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else if(this.css){let e;for(;-1!==(e=this.css.lastIndexOf("/*#"));){let t=this.css.indexOf("*/",e+3);if(-1===t)break;for(;e>0&&"\n"===this.css[e-1];)e--;this.css=this.css.slice(0,e)+this.css.slice(t+2)}}}generate(){if(this.clearAnnotation(),c&&l&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=o.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new o({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 o({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(i.generated.line=s,i.generated.column=r-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),t=o.match(/\n/g),t?(s+=t.length,e=o.lastIndexOf("\n"),r=o.length-e):r+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(r){if(this.mapOpts.absolute)return r;if(60===r.charCodeAt(0))return r;if(/^\w+:\/\//.test(r))return r;let n=this.memoizedPaths.get(r);if(n)return n;let o=this.opts.to?e(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=e(s(o,this.mapOpts.annotation)));let i=t(o,r);return this.memoizedPaths.set(r,i),i}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 a(this.originalCSS,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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,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(i){let t=i(e).toString();return this.memoizedFileURLs.set(e,t),t}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;"\\"===r&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}}}function Xe(){if(ke)return Se;ke=1;let e=We(),t=Ge(),s=function(){if(Ce)return xe;Ce=1;let e=He(),t=Ve(),s=Te(),r=qe(),n=Ze(),o=function(){if(be)return ve;be=1;const e="'".charCodeAt(0),t='"'.charCodeAt(0),s="\\".charCodeAt(0),r="/".charCodeAt(0),n="\n".charCodeAt(0),o=" ".charCodeAt(0),i="\f".charCodeAt(0),a="\t".charCodeAt(0),l="\r".charCodeAt(0),c="[".charCodeAt(0),u="]".charCodeAt(0),h="(".charCodeAt(0),p=")".charCodeAt(0),f="{".charCodeAt(0),d="}".charCodeAt(0),m=";".charCodeAt(0),g="*".charCodeAt(0),y=":".charCodeAt(0),w="@".charCodeAt(0),v=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,x=/.[\r\n"'(/\\]/,C=/[\da-f]/i;return ve=function(S,k={}){let O,I,E,A,P,R,$,_,j,B,M=S.css.valueOf(),D=k.ignoreErrors,U=M.length,z=0,L=[],N=[],F=-1;function V(e){throw S.error("Unclosed "+e,z)}return{back:function(e){N.push(e)},endOfFile:function(){return 0===N.length&&z>=U},nextToken:function(S){if(N.length)return N.pop();if(z>=U)return;let k=!!S&&S.ignoreUnclosed;switch(O=M.charCodeAt(z),O){case n:case o:case a:case l:case i:A=z;do{A+=1,O=M.charCodeAt(A)}while(O===o||O===n||O===a||O===l||O===i);R=["space",M.slice(z,A)],z=A-1;break;case c:case u:case f:case d:case y:case m:case p:{let e=String.fromCharCode(O);R=[e,e,z];break}case h:if(B=L.length?L.pop()[1]:"",j=M.charCodeAt(z+1),"url"===B&&j!==e&&j!==t&&j!==o&&j!==n&&j!==a&&j!==i&&j!==l){A=z;do{if($=!1,A=M.indexOf(")",A+1),-1===A){if(D||k){A=z;break}V("bracket")}for(_=A;M.charCodeAt(_-1)===s;)_-=1,$=!$}while($);R=["brackets",M.slice(z,A+1),z,A],z=A}else z<=F?R=["(","(",z]:(A=M.indexOf(")",z+1),I=M.slice(z,A+1),-1===A||x.test(I)?(F=-1===A?U:A,R=["(","(",z]):(R=["brackets",I,z,A],z=A));break;case e:case t:P=O===e?"'":'"',A=z;do{if($=!1,A=M.indexOf(P,A+1),-1===A){if(D||k){A=z+1;break}V("string")}for(_=A;M.charCodeAt(_-1)===s;)_-=1,$=!$}while($);R=["string",M.slice(z,A+1),z,A],z=A;break;case w:v.lastIndex=z+1,v.test(M),A=0===v.lastIndex?M.length-1:v.lastIndex-2,R=["at-word",M.slice(z,A+1),z,A],z=A;break;case s:for(A=z,E=!0;M.charCodeAt(A+1)===s;)A+=1,E=!E;if(O=M.charCodeAt(A+1),E&&O!==r&&O!==o&&O!==n&&O!==a&&O!==l&&O!==i&&(A+=1,C.test(M.charAt(A)))){for(;C.test(M.charAt(A+1));)A+=1;M.charCodeAt(A+1)===o&&(A+=1)}R=["word",M.slice(z,A+1),z,A],z=A;break;default:O===r&&M.charCodeAt(z+1)===g?(A=M.indexOf("*/",z+2)+1,0===A&&(D||k?A=M.length:V("comment")),R=["comment",M.slice(z,A+1),z,A],z=A):(b.lastIndex=z+1,b.test(M),A=0===b.lastIndex?M.length-1:b.lastIndex-2,R=["word",M.slice(z,A+1),z,A],L.push(R),z=A)}return z++,R},position:function(){return z}}}}();const i={empty:!0,space:!0};return xe=class{constructor(e){this.input=e,this.root=new r,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(t){let s,r,n,o=new e;o.name=t[1].slice(1),""===o.name&&this.unnamedAtrule(o,t),this.init(o,t[2]);let i=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(s=(t=this.tokenizer.nextToken())[0],"("===s||"["===s?c.push("("===s?")":"]"):"{"===s&&c.length>0?c.push("}"):s===c[c.length-1]&&c.pop(),0===c.length){if(";"===s){o.source.end=this.getPosition(t[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===s){a=!0;break}if("}"===s){if(l.length>0){for(n=l.length-1,r=l[n];r&&"space"===r[0];)r=l[--n];r&&(o.source.end=this.getPosition(r[3]||r[2]),o.source.end.offset++)}this.end(t);break}l.push(t)}else l.push(t);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(o.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(o,"params",l),i&&(t=l[l.length-1],o.source.end=this.getPosition(t[3]||t[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[o,i]of e.entries()){if(s=i,r=s[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(t){if("word"===t[0]&&"progid"===t[1])continue;return o}this.doubleColon(s)}t=s}return!1}comment(e){let s=new t;this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++;let r=e[1].slice(2,-2);if(r.trim()){let e=r.match(/^(\s*)([^]*\S)(\s*)$/);s.text=e[2],s.raws.left=e[1],s.raws.right=e[3]}else s.text="",s.raws.left=r,s.raws.right=""}createTokenizer(){this.tokenizer=o(this.input)}decl(e,t){let r=new s;this.init(r,e[0][2]);let n,o=e[e.length-1];for(";"===o[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(o[3]||o[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(n=e.shift(),":"===n[0]){r.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let i,a=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(n=e[t],"!important"===n[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===n[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(n.trim().startsWith("!")&&"space"!==t)break;n=s.pop()[1]+n}n.trim().startsWith("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==n[0]&&"comment"!==n[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(r.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.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 n;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&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}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="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),o.push("("===s?")":"]");else if(i&&r&&"{"===s)n||(n=l),o.push("}");else if(0===o.length){if(";"===s){if(r)return void this.decl(a,i);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&r){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}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)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let n,o,a,l,c=s.length,u="",h=!0;for(let e=0;e<c;e+=1)n=s[e],o=n[0],"space"!==o||e!==c-1||r?"comment"===o?(l=s[e-1]?s[e-1][0]:"empty",a=s[e+1]?s[e+1][0]:"empty",i[l]||i[a]||","===u.slice(-1)?h=!1:u+=n[1]):u+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:u}}e[t]=u}rule(e){e.pop();let t=new n;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}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 "+e[0][1],{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})}}}();function r(e,r){let n=new t(e,r),o=new s(n);try{o.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&r&&r.from&&(/\.scss$/i.test(r.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(r.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(r.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return o.root}return Se=r,r.default=r,e.registerParse(r),Se}function et(){if(Ie)return Oe;Ie=1;class e{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}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 Oe=e,e.default=e,Oe}function tt(){if(Ae)return Ee;Ae=1;let e=et();class t{get content(){return this.css}constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(t,s={}){s.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(s.plugin=this.lastPlugin.postcssPlugin);let r=new e(t,s);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}}return Ee=t,t.default=t,Ee}function st(){if(Re)return Pe;Re=1;let e={};return Pe=function(t){e[t]||(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}function rt(){if(_e)return $e;_e=1;let e=We(),t=Je(),s=Qe(),r=Xe(),n=tt(),o=qe(),i=T(),{isClean:a,my:l}=Ne(),c=st();const u={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},p={Once:!0,postcssPlugin:!0,prepare:!0};function f(e){return"object"==typeof e&&"function"==typeof e.then}function d(e){let t=!1,s=u[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function m(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:d(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function g(e){return e[a]=!1,e.nodes&&e.nodes.forEach(e=>g(e)),e}let y={};class w{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(t,s,o){let i;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof w||s instanceof n)i=g(s.root),s.map&&(void 0===o.map&&(o.map={}),o.map.inline||(o.map.inline=!1),o.map.prev=s.map);else{let t=r;o.syntax&&(t=o.syntax.parse),o.parser&&(t=o.parser),t.parse&&(t=t.parse);try{i=t(s,o)}catch(e){this.processed=!0,this.error=e}i&&!i[l]&&e.rebuild(i)}else i=g(s);this.result=new n(t,i,o),this.helpers={...y,postcss:y,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}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 s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),o=r.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!h[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!p[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}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],s=this.runOnRoot(t);if(f(s))try{await s}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[a];){e[a]=!0;let t=[m(e)];for(;t.length>0;){let e=this.visitTick(t);if(f(e))try{await e}catch(e){let s=t[t.length-1].node;throw this.handleError(e,s)}}}if(this.listeners.OnceExit)for(let[t,s]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>s(e,this.helpers));await Promise.all(t)}else await s(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=i;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=this.result.root.source;if(void 0===e.map&&!(r&&r.input&&r.input.map)){let e="";return t(this.result.root,t=>{e+=t}),this.result.css=e,this.result}let n=new s(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[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)if(f(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[a];)e[a]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)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"production"!==process.env.NODE_ENV&&("from"in this.opts||c("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[s,r]of e){let e;this.result.lastPlugin=s;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(f(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(e){throw this.handleError(e,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[a])return r[a]=!0,void e.push(m(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[a]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[a]=!0;let t=d(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[a]||this.walkSync(e)});else{let t=this.listeners[s];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}}return w.registerPostcss=e=>{y=e},$e=w,w.default=w,o.registerLazyResult(w),t.registerLazyResult(w),$e}const nt=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(function(){if(ze)return Ue;ze=1;let e=He(),t=Ve(),s=We(),r=F(),n=Te(),o=Je(),i=function(){if(ge)return me;ge=1;let e=He(),t=Ve(),s=Te(),r=Ge(),n=Ye(),o=qe(),i=Ze();function a(l,c){if(Array.isArray(l))return l.map(e=>a(e));let{inputs:u,...h}=l;if(u){c=[];for(let e of u){let t={...e,__proto__:r.prototype};t.map&&(t.map={...t.map,__proto__:n.prototype}),c.push(t)}}if(h.nodes&&(h.nodes=l.nodes.map(e=>a(e,c))),h.source){let{inputId:e,...t}=h.source;h.source=t,null!=e&&(h.source.input=c[e])}if("root"===h.type)return new o(h);if("decl"===h.type)return new s(h);if("rule"===h.type)return new i(h);if("comment"===h.type)return new t(h);if("atrule"===h.type)return new e(h);throw new Error("Unknown node type: "+l.type)}return me=a,a.default=a,me}(),a=Ge(),l=rt(),c=Ke(),u=Fe(),h=Xe(),p=function(){if(De)return Me;De=1;let e=Je(),t=rt(),s=function(){if(Be)return je;Be=1;let e=Qe(),t=Xe(),s=tt(),r=T(),n=st();class o{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,s=t;try{e=s(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,n,o){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=o,this._map=void 0;let i=r;this.result=new s(this._processor,void 0,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get:()=>a.root});let l=new e(i,void 0,this._opts,n);if(l.isMap()){let[e,t]=l.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else l.clearAnnotation(),this.result.css=l.css}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"production"!==process.env.NODE_ENV&&("from"in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}}return je=o,o.default=o,je}(),r=qe();class n{constructor(e=[]){this.version="8.5.14",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,r={}){return this.plugins.length||r.parser||r.stringifier||r.syntax?new t(this,e,r):new s(this,e,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return Me=n,n.default=n,r.registerProcessor(n),e.registerProcessor(n),Me}(),f=tt(),d=qe(),m=Ze(),g=T(),y=et();function w(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new p(e)}return w.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...s);return n.postcssPlugin=e,n.postcssVersion=(new p).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return w([n(s)]).process(e,t)},n},w.stringify=g,w.parse=h,w.fromJSON=i,w.list=c,w.comment=e=>new t(e),w.atRule=t=>new e(t),w.decl=e=>new n(e),w.rule=e=>new m(e),w.root=e=>new d(e),w.document=e=>new o(e),w.CssSyntaxError=r,w.Declaration=n,w.Container=s,w.Processor=p,w.Document=o,w.Comment=t,w.Warning=y,w.AtRule=e,w.Result=f,w.Input=a,w.Rule=m,w.Root=d,w.Node=u,l.registerPostcss(w),Ue=w,w.default=w,Ue}());nt.stringify,nt.fromJSON,nt.plugin,nt.parse,nt.list,nt.document,nt.comment,nt.atRule,nt.rule,nt.decl,nt.root,nt.CssSyntaxError,nt.Declaration,nt.Container,nt.Processor,nt.Document,nt.Comment,nt.Warning,nt.AtRule,nt.Result,nt.Input,nt.Rule,nt.Root,nt.Node;const ot=new Set(["body","html",":root","*"]);function it(e,t){return e&&e.trim()?nt([(s=`[data-vbi-type="${t}"]`,{postcssPlugin:"hc-scope",AtRule(e){if("import"===e.name)return console.warn("[hc-css-scope] @import 已被拒绝(防外部资源加载):",e.params),void e.remove();"font-face"===e.name&&console.warn("[hc-css-scope] @font-face 全局生效,font-family 命名注意冲突")},Rule(e){(function(e){let t=e.parent;for(;t&&"object"==typeof t;){const e=t;if("atrule"===e.type&&/keyframes$/i.test(e.name??""))return!0;t=e.parent}return!1})(e)||(e.selectors=e.selectors.map(e=>function(e,t){const s=e.trim();if(!s)return s;if(ot.has(s))return t;for(const e of ot){const r=s.charAt(e.length);if(s.startsWith(e)&&(" "===r||">"===r||"+"===r||"~"===r||","===r))return t+s.slice(e.length)}return`${t} ${s}`}(e,s)))}})]).process(e,{from:void 0}).css:"";var s}const at=new Map;function lt(e){let t=5381;for(let s=0;s<e.length;s++)t=(t<<5)+t+e.charCodeAt(s)|0;return(t>>>0).toString(36)}function ct(e){const t=e.replace(/[^a-zA-Z0-9_-]/g,"_");return t===e?`hc-style-${t}`:`hc-style-${t}-${lt(e).slice(0,6)}`}function ut(e,t){var s;const r=t??"",n=ct(e),o=at.get(e);if(!r.trim())return null==(s=document.getElementById(n))||s.remove(),void(o&&at.set(e,{...o,cssHash:""}));const i=lt(r);if(o&&o.cssHash===i)return;let a;try{a=it(r,e)}catch(t){return void console.warn("[hc-css-scope]",e,"PostCSS process failed:",t)}!function(e,t){const s=ct(e);let r=document.getElementById(s);r||(r=document.createElement("style"),r.id=s,r.setAttribute("data-hc-scope",e),document.head.appendChild(r)),r.textContent=t}(e,a),o?at.set(e,{...o,cssHash:i}):at.set(e,{cssHash:i,refCount:0})}function ht(e,t){ut(e,t);const s=at.get(e);s?at.set(e,{...s,refCount:s.refCount+1}):at.set(e,{cssHash:"",refCount:1})}function pt(e){var t;const s=at.get(e);if(!s)return;const r=s.refCount-1;r<=0?(null==(t=document.getElementById(ct(e)))||t.remove(),at.delete(e)):at.set(e,{...s,refCount:r})}const ft={key:1,class:"rounded-md border-2 border-rose-300 bg-rose-50 p-4 text-sm text-rose-900 space-y-2 min-h-[140px] overflow-auto"},dt={class:"font-semibold flex items-center gap-1.5"},mt={class:"font-mono text-xs text-rose-800 break-all"},gt={key:0,class:"text-[10px] font-mono bg-rose-100/60 p-2 rounded overflow-auto max-h-60 text-rose-800"},yt=e.defineComponent({__name:"ErrorBoundary",props:{label:{}},setup(t){const s=t,r=e.ref(null),n=e.ref(0),o=e.ref(!1);function i(){r.value=null,o.value=!1,n.value++}return e.onErrorCaptured(e=>(console.error(`[hc-eb${s.label?" "+s.label:""}]`,e),r.value=e,!1)),(s,a)=>(e.openBlock(),e.createElementBlock("div",{key:n.value,class:"hc-eb-root",style:{width:"100%",height:"100%"}},[r.value?(e.openBlock(),e.createElementBlock("div",ft,[e.createElementVNode("div",dt,[a[1]||(a[1]=e.createElementVNode("span",null,"⚠️",-1)),e.createElementVNode("span",null,"组件渲染失败"+e.toDisplayString(t.label?` — ${t.label}`:""),1)]),e.createElementVNode("div",mt,e.toDisplayString(r.value.message),1),e.createElementVNode("button",{class:"text-xs text-rose-700 hover:text-rose-900 underline",onClick:a[0]||(a[0]=e=>o.value=!o.value)},e.toDisplayString(o.value?"隐藏":"展开")+"堆栈 ",1),o.value?(e.openBlock(),e.createElementBlock("pre",gt,e.toDisplayString(r.value.stack),1)):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"text-xs px-3 py-1 rounded bg-rose-600 hover:bg-rose-700 text-white transition-colors",onClick:i}," 重试 ")])):e.renderSlot(s.$slots,"default",{key:0})]))}}),wt=["data-vbi-id","data-vbi-type","data-vbi-canvas"],vt={key:0,class:"rounded-md border-2 border-amber-300 bg-amber-50 p-4 text-sm text-amber-900 space-y-2 min-h-[140px] overflow-auto"},bt={class:"text-[11px] font-mono break-all whitespace-pre-wrap"},xt={key:1,class:"grid place-items-center min-h-[140px] text-xs text-zinc-400"},Ct=e.defineComponent({__name:"RuntimeBox",props:{instanceId:{},componentId:{},scopeId:{},canvasId:{},htmlSource:{},jsSource:{},cssSource:{default:""},customValues:{default:()=>({})},position:{},size:{},zIndex:{}},setup(t){const s=t,r=e.computed(()=>s.scopeId??s.componentId),i=e.inject(o,null),a=e.computed(()=>s.canvasId??i??n),l=e.shallowRef(null),c=e.ref(null),u=e.ref(!1),h=e.ref(0);e.watch(()=>[s.htmlSource,s.jsSource],()=>{!async function(){u.value=!0,c.value=null;try{const e=await $({html:s.htmlSource,js:s.jsSource});l.value=e,h.value++}catch(e){c.value=e instanceof Error?e:new Error(String(e)),l.value=null}finally{u.value=!1}}()},{immediate:!0});let p=!1;e.watch(()=>[s.cssSource,r.value],([e,t],s)=>{const r=(null==s?void 0:s[1])??null;r&&r!==t?(pt(r),ht(t,e),p=!0):p?ut(t,e):(ht(t,e),p=!0)},{immediate:!0});const f=e.computed(()=>{const e={width:"100%",height:"100%"};return s.position&&(e.position="absolute",e.left=`${s.position.x}px`,e.top=`${s.position.y}px`),void 0!==s.zIndex&&(e.zIndex=String(s.zIndex)),e});return e.onBeforeUnmount(()=>{p&&(pt(r.value),p=!1)}),(s,n)=>(e.openBlock(),e.createElementBlock("div",{class:"_vbi_box","data-vbi-id":t.instanceId,"data-vbi-type":r.value,"data-vbi-canvas":a.value,style:e.normalizeStyle(f.value)},[c.value?(e.openBlock(),e.createElementBlock("div",vt,[n[0]||(n[0]=e.createElementVNode("div",{class:"font-semibold"},"⚠️ 编译失败",-1)),e.createElementVNode("pre",bt,e.toDisplayString(c.value.message),1)])):u.value&&!l.value?(e.openBlock(),e.createElementBlock("div",xt," 编译中… ")):l.value?(e.openBlock(),e.createBlock(yt,{key:h.value,label:t.instanceId},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value.options),{"hc-custom-values":t.customValues,"hc-instance-id":t.instanceId,"hc-canvas-id":a.value,"hc-component-id":t.componentId},null,8,["hc-custom-values","hc-instance-id","hc-canvas-id","hc-component-id"]))]),_:1},8,["label"])):e.createCommentVNode("",!0)],12,wt))}});exports.parseComponentSource=t.parseComponentSource,exports.DEFAULT_CANVAS_ID=n,exports.ErrorBoundary=yt,exports.HC_CANVAS_ID_KEY=o,exports.HC_INJECT_KEY=O,exports.RuntimeBox=Ct,exports.VERSION="0.0.0-stage2b",exports.__resetLifecycleEmitter=function(){a.all.clear()},exports.__resetRegistry=function(){const e=[];for(const[t,s]of u)for(const[r,n]of s)n.__dispose(),e.push({canvasId:t,instanceId:r});u.clear(),i.value++;for(const t of e)l("instance:unmounted",t)},exports.assets=w,exports.attachScope=ht,exports.clearCompileCache=function(){E.clear()},exports.compileComponent=$,exports.createCanvasesRegistry=b,exports.createHyperCard=function(e={}){const t=e.strict??!1,s=e.libs??{},r=e.version??"v1";return{install(e){const n=Object.entries(s),o=n.filter(([,e])=>C(e)),i=n.filter(([e])=>x.has(e)),a=[`[hypercard] 已注册 ${n.length} 个 libs:`];for(const[e,t]of n)a.push(` ${e.padEnd(16)} ${k(t)}`);console.info(a.join("\n"));const l=[];o.length>1&&l.push(`检测到 ${o.length} 个 Vue plugin(${o.map(([e])=>e).join(", ")}),请确认全局组件命名不冲突`);for(const[e]of i)l.push(`lib 名 "${e}" 是保留词,建议改名`);if(l.length>0){const e=l.map(e=>` - ${e}`).join("\n");if(t)throw new Error(`[hypercard] strict mode 阻止启动:\n${e}`);console.warn(`[hypercard] 警告:\n${e}`)}for(const[s,r]of o){const[n,o]=S(r);try{e.use(n,...o)}catch(e){if(console.error(`[hypercard] app.use("${s}") 失败:`,e),t)throw e}}const c={};for(const[e,t]of n){const[s]=S(t);c[e]=s}const u={libs:c,runtime:y,assets:w,version:r,canvases:b()};e.provide(O,u),e.config.globalProperties.$hc=u,"undefined"!=typeof window&&(window.__HYPERCARD__=u)}}},exports.debugScopedCssRefs=function(){return[...at.entries()].map(([e,t])=>({scopeId:e,componentId:e,refCount:t.refCount,cssHash:t.cssHash}))},exports.detachScope=pt,exports.disposeCanvas=p,exports.getCompileCacheSize=function(){return E.size},exports.getInstance=m,exports.getScopedCssCount=function(){return at.size},exports.injectScopedCss=ut,exports.isVuePlugin=C,exports.listCanvasIds=f,exports.listInstances=g,exports.onInstanceLifecycle=function(e,t){const s=e=>{try{t(e)}catch(e){console.error("[hc-registry] instance lifecycle listener threw",e)}};return a.on(e,s),()=>a.off(e,s)},exports.register=function(e,t,s){return h(n,e,t,s)},exports.registerInCanvas=h,exports.registryVersion=i,exports.removeScopedCss=function(e){var t;null==(t=document.getElementById(ct(e)))||t.remove(),at.delete(e)},exports.runtime=y,exports.scopeCss=it,exports.unregister=d;
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import*as e from"vue";import{ref as t,defineComponent as s,onErrorCaptured as r,openBlock as n,createElementBlock as o,renderSlot as i,createElementVNode as l,toDisplayString as a,createCommentVNode as c,computed as u,inject as h,shallowRef as p,watch as f,onBeforeUnmount as d,normalizeStyle as m,createBlock as g,withCtx as y,resolveDynamicComponent as w}from"vue";import{p as v}from"./parseSourceEntry-BNu0kje7.js";import{a as b}from"./parseSourceEntry-BNu0kje7.js";function x(e){return{all:e=e||new Map,on:function(t,s){var r=e.get(t);r?r.push(s):e.set(t,[s])},off:function(t,s){var r=e.get(t);r&&(s?r.splice(r.indexOf(s)>>>0,1):e.set(t,[]))},emit:function(t,s){var r=e.get(t);r&&r.slice().map(function(e){e(s)}),(r=e.get("*"))&&r.slice().map(function(e){e(t,s)})}}}const C="__default__",S="__hcCanvasId",k=t(0),O=x();function A(e,t){const s=e=>{try{t(e)}catch(e){console.error("[hc-registry] instance lifecycle listener threw",e)}};return O.on(e,s),()=>O.off(e,s)}function I(e,t){O.emit(e,t)}const E=new Set,P=new Map;function $(e,t,s,r){var n;const o=function(e,t){return`${e}\0${t}`}(e,t);if(E.has(o)){const s=`[hc-registry] re-entrant registerInCanvas("${e}", "${t}") detected — a lifecycle listener tried to register the same id while the outer register is in flight. Nested register blocked to prevent state divergence; defer your register via microtask / setTimeout if you need to re-mount on lifecycle events.`;throw console.warn(s),new Error(s)}E.add(o);try{const o=function(e){let t=P.get(e);return t||(t=new Map,P.set(e,t)),t}(e);o.has(t)&&(console.warn(`[hc-registry] instance ${t} already registered in canvas "${e}", overwriting`),null==(n=o.get(t))||n.__dispose(),o.delete(t),I("instance:unmounted",{canvasId:e,instanceId:t}));const i=function(e,t,s){const r=x();return{instanceId:e,componentId:t,vm:s,call(t,...r){const n=s[t];if("function"!=typeof n)throw new Error(`[hc-registry] method "${t}" not found on instance ${e}`);return n.apply(s,r)},on:(e,t)=>(r.on(e,t),()=>r.off(e,t)),emit(e,t){r.emit(e,t)},setProp(e,t){s[e]=t},setDataInput(t,r){const n=s.custom;if(!n||!(t in n))return void console.warn(`[hc-registry] setDataInput("${t}"): vm.custom["${t}"] not declared on instance ${e}; binding 改了一个未声明的 dataInput key,组件不会响应`);const o=n[t];o&&"object"==typeof o?!0===o.dataInput?o.value=r:console.warn(`[hc-registry] setDataInput("${t}"): vm.custom["${t}"] is not declared with dataInput:true on instance ${e}; 请在组件源码 custom.${t} 上加 \`dataInput: true\` 才能被 binding 灌入`):console.warn(`[hc-registry] setDataInput("${t}"): vm.custom["${t}"] not a {value:...} slot`)},__dispose(){r.all.clear()}}}(t,s,r);return o.set(t,i),k.value++,I("instance:ready",{canvasId:e,instanceId:t}),i}finally{E.delete(o)}}function R(e){const t=P.get(e);if(!t)return;const s=[];for(const[e,r]of t)r.__dispose(),s.push(e);t.clear(),P.delete(e),k.value++;for(const t of s)I("instance:unmounted",{canvasId:e,instanceId:t})}function j(){return[...P.keys()]}function _(e,t,s){return $(C,e,t,s)}function M(e,t=C){const s=P.get(t);if(!s)return;const r=s.get(e);r&&(r.__dispose(),s.delete(e),k.value++,I("instance:unmounted",{canvasId:t,instanceId:e}))}function B(e,t){var s;if(void 0!==t)return(null==(s=P.get(t))?void 0:s.get(e))??null;let r=null;const n=[];for(const[t,s]of P){const o=s.get(e);o&&(r||(r=o),n.push(t))}return n.length>1&&console.warn(`[hc-registry] getInstance("${e}") matched ${n.length} canvases [${n.join(", ")}]; returning first. Prefer __HYPERCARD__.canvases.callComponent(canvasId, instanceId, ...) for explicit scope.`),r}function U(e){const t=null==e?void 0:e.componentId,s=t?e=>e.componentId===t:()=>!0;if(void 0!==(null==e?void 0:e.canvasId)){const t=P.get(e.canvasId);return t?[...t.values()].filter(s):[]}const r=[];for(const e of P.values())for(const t of e.values())s(t)&&r.push(t);return r}function z(){const e=[];for(const[t,s]of P)for(const[r,n]of s)n.__dispose(),e.push({canvasId:t,instanceId:r});P.clear(),k.value++;for(const t of e)I("instance:unmounted",t)}function D(){O.all.clear()}const L={getInstance:B,listInstances:U,call(e,t,...s){const r=B(e);if(r)return r.call(t,...s);console.debug(`[hc-runtime] call: instance "${e}" not found`)},on(e,t,s){const r=B(e);if(r)return r.on(t,s);console.debug(`[hc-runtime] on: instance "${e}" not found`)},emit(e,t,s){const r=B(e);r?r.emit(t,s):console.debug(`[hc-runtime] emit: instance "${e}" not found`)}},F={pickerUrl:e=>`/a/${e}`};function N(e){return{canvasId:e,listInstances:t=>U({canvasId:e,componentId:null==t?void 0:t.componentId}),getInstance:t=>B(t,e),call(t,s,...r){const n=B(t,e);if(n)try{return n.call(s,...r)}catch(r){return void console.warn(`[hc-canvases] call error: canvas="${e}" instance="${t}" method="${s}":`,r)}else console.warn(`[hc-canvases] call: instance "${t}" not found in canvas "${e}"`)},emit(t,s,r){const n=B(t,e);if(n)try{n.emit(s,r)}catch(r){console.warn(`[hc-canvases] emit error: canvas="${e}" instance="${t}" event="${s}":`,r)}else console.warn(`[hc-canvases] emit: instance "${t}" not found in canvas "${e}"`)},broadcastInCanvas(t,s){const r=U({canvasId:e});for(const n of r)try{n.emit(t,s)}catch(s){console.warn(`[hc-canvases] broadcastInCanvas: canvas="${e}" instance="${n.instanceId}" event="${t}" emit failed:`,s)}},dispose(){R(e)}}}function T(){return{list:()=>j().map(e=>N(e)),get:e=>j().includes(e)?N(e):null,getAll(){const e={};for(const t of j())e[t]=N(t);return e},callComponent(e,t,s,...r){const n=B(t,e);if(n)try{return n.call(s,...r)}catch(r){return void console.warn(`[hc-canvases] callComponent error: canvas="${e}" instance="${t}" method="${s}":`,r)}else console.warn(`[hc-canvases] callComponent: canvas="${e}" instance="${t}" not found`)},emitToCanvas(e,t,s,r){const n=B(t,e);if(n)try{n.emit(s,r)}catch(r){console.warn(`[hc-canvases] emitToCanvas error: canvas="${e}" instance="${t}" event="${s}":`,r)}else console.warn(`[hc-canvases] emitToCanvas: canvas="${e}" instance="${t}" not found`)},broadcast(e,t){for(const s of j())try{const r=U({canvasId:s});for(const n of r)try{n.emit(e,t)}catch(t){console.warn(`[hc-canvases] broadcast: canvas="${s}" instance="${n.instanceId}" event="${e}" emit failed:`,t)}}catch(t){console.warn(`[hc-canvases] broadcast: canvas="${s}" event="${e}" failed:`,t)}}}}const V=new Set(["vue","Vue","window","global","globalThis","console","document","process","$","libs","runtime","assets","version"]);function W(e={}){const t=e.strict??!1,s=e.libs??{},r=e.version??"v1";return{install(e){const n=Object.entries(s),o=n.filter(([,e])=>J(e)),i=n.filter(([e])=>V.has(e)),l=[`[hypercard] 已注册 ${n.length} 个 libs:`];for(const[e,t]of n)l.push(` ${e.padEnd(16)} ${Y(t)}`);console.info(l.join("\n"));const a=[];o.length>1&&a.push(`检测到 ${o.length} 个 Vue plugin(${o.map(([e])=>e).join(", ")}),请确认全局组件命名不冲突`);for(const[e]of i)a.push(`lib 名 "${e}" 是保留词,建议改名`);if(a.length>0){const e=a.map(e=>` - ${e}`).join("\n");if(t)throw new Error(`[hypercard] strict mode 阻止启动:\n${e}`);console.warn(`[hypercard] 警告:\n${e}`)}for(const[s,r]of o){const[n,o]=H(r);try{e.use(n,...o)}catch(e){if(console.error(`[hypercard] app.use("${s}") 失败:`,e),t)throw e}}const c={};for(const[e,t]of n){const[s]=H(t);c[e]=s}const u={libs:c,runtime:L,assets:F,version:r,canvases:T()};e.provide(G,u),e.config.globalProperties.$hc=u,"undefined"!=typeof window&&(window.__HYPERCARD__=u)}}}function J(e){return Array.isArray(e)&&e.length>=1?J(e[0]):"object"==typeof e&&null!==e&&"function"==typeof e.install}function H(e){return Array.isArray(e)&&e.length>=1?[e[0],e.slice(1)]:[e,[]]}function Y(e){return J(e)?Array.isArray(e)?"✓ Vue plugin (with options) → 已 app.use":"✓ Vue plugin → 已 app.use":"function"==typeof e?"· function":Array.isArray(e)?"· array":"object"==typeof e&&null!==e?"· object":"· "+typeof e}const G="__HYPERCARD__",Z=new Set(["init","onClick","onMouseover","onMouseout","onResize","onDestroy"]),q=new Map;function K(e,t){for(q.has(e)&&q.delete(e),q.set(e,t);q.size>100;){const e=q.keys().next().value;if(void 0===e)break;q.delete(e)}}function Q(e){let t=5381;for(let s=0;s<e.length;s++)t=(t<<5)+t+e.charCodeAt(s)|0;return(t>>>0).toString(36)}function X(e){if(!Array.isArray(e))return[];const t=[];for(const s of e){if(!s||"object"!=typeof s)continue;const e=s;if("string"!=typeof e.name)continue;const r={name:e.name};"boolean"==typeof e.multiple&&(r.multiple=e.multiple),Array.isArray(e.accepts)&&(r.accepts=e.accepts.filter(e=>"string"==typeof e)),"number"==typeof e.maxChildren&&(r.maxChildren=e.maxChildren),"string"==typeof e.label&&(r.label=e.label),t.push(r)}return t}async function ee(t){const s=Q(t.html)+"_"+Q(t.js),r=q.get(s);if(r)return K(s,r),r;const n=(async()=>function(t,s){if(!t||"object"!=typeof t)throw new Error("[hc-compile] component.js must `export default` an object");const r=t,n=r.name,o=r.method??{},i=r.attribute??{},l=r.custom??{},a=r.style??{},c=r.slots,u=r.data,h=r.methods??{},p=r.computed,f=r.watch,d=r.mounted,m=r.beforeUnmount,g=r.props,y=new Set(["name","method","attribute","custom","style","option","data","methods","computed","watch","mounted","beforeUnmount","props","slots"]),w={};for(const e of Object.keys(r))y.has(e)||(w[e]=r[e]);const v={};for(const[e,t]of Object.entries(o))Z.has(e)||"function"!=typeof t||(v[e]=t);const b=Object.keys(v),x={...v,...h},C=(s??"").trim()||"<div></div>";return{options:{render:e.compile(C),props:{...g?Array.isArray(g)?Object.fromEntries(g.map(e=>[e,null])):"object"==typeof g?g:{}:{},hcCustomValues:{type:Object,default:()=>({})}},data(){const e="function"==typeof u?u.call(this):u??{},t=this.hcCustomValues??{},s={};for(const[e,r]of Object.entries(l)){let n;try{n=JSON.parse(JSON.stringify(r??{}))}catch{n={...r??{}}}e in t&&n&&"object"==typeof n&&(n.value=t[e]),s[e]=n}return{custom:s,...e}},methods:x,computed:p,watch:(()=>{const e=f&&"object"==typeof f?{...f}:{};return e.hcCustomValues={handler(e){if(e&&this.custom)for(const[t,s]of Object.entries(e)){const e=this.custom[t];e&&"object"==typeof e&&(e.value=s)}},deep:!0},e})(),mounted(){const e=[],t=this.$el;if(t&&t instanceof HTMLElement){Object.assign(t.style,a);for(const[e,s]of Object.entries(i))"string"==typeof s&&s&&t.setAttribute(e,s);for(const s of Z){if("init"===s)continue;const r=o[s];if("function"==typeof r){const n=s.replace(/^on/,"").toLowerCase(),o=e=>{r.call(this,{event:e,data:e})};t.addEventListener(n,o),e.push(()=>t.removeEventListener(n,o))}}}this.__hcCleanup=e;const s=o.init;"function"==typeof s&&s.call(this),"function"==typeof d&&d.call(this)},beforeUnmount(){var e;null==(e=this.__hcCleanup)||e.forEach(e=>{try{e()}catch{}}),this.__hcCleanup=void 0,"function"==typeof m&&m.call(this)},...w},meta:{name:n,attribute:i,style:a,customDecl:l,methodNames:b,slotsDecl:X(c)}}}(function(e){let t;try{const s=v(e,{ecmaVersion:"latest",sourceType:"module",allowAwaitOutsideFunction:!0}).body.find(e=>"ExportDefaultDeclaration"===e.type);if(!s)throw new Error("[hc-compile] component.js must `export default` an object");t=e.slice(0,s.start)+"module.exports = "+e.slice(s.declaration.start)}catch(e){throw e instanceof Error?e:new Error(String(e))}const s=new Function("module","exports",`"use strict";\n${t}\n;return module.exports;`),r={exports:{}};try{return s(r,r.exports)}catch(e){throw e instanceof Error?e:new Error(String(e))}}(t.js),t.html))();return K(s,n),n.catch(()=>q.delete(s)),n}function te(){q.clear()}function se(){return q.size}function re(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ne(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var oe,ie={exports:{}};function le(){if(oe)return ie.exports;oe=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return ie.exports=t(),ie.exports.createColors=t,ie.exports}const ae=ne(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ce,ue,he,pe,fe,de;function me(){if(ue)return ce;ue=1;let e=le(),t=ae;class s extends Error{constructor(e,t,r,n,o,i){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==t&&void 0!==r&&("number"==typeof t?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(s){if(!this.source)return"";let r=this.source;null==s&&(s=e.isColorSupported);let n=e=>e,o=e=>e,i=e=>e;if(s){let{bold:s,gray:r,red:l}=e.createColors(!0);o=e=>s(l(e)),n=e=>r(e),t&&(i=e=>t(e))}let l=r.split(/\r?\n/),a=Math.max(this.line-3,0),c=Math.min(this.line+2,l.length),u=String(c).length;return l.slice(a,c).map((e,t)=>{let s=a+1+t,r=" "+(" "+s).slice(-u)+" | ";if(s===this.line){if(e.length>160){let t=20,s=Math.max(0,this.column-t),l=Math.max(this.column+t,this.endColumn+t),a=e.slice(s,l),c=n(r.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,t-1)).replace(/[^\t]/g," ");return o(">")+n(r)+i(a)+"\n "+c+o("^")}let t=n(r.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return o(">")+n(r)+i(e)+"\n "+t+o("^")}return" "+n(r)+i(e)}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}return ce=s,s.default=s,ce}function ge(){if(pe)return he;pe=1;const e=/(<)(\/?style\b)/gi,t=/(<)(!--)/g;function s(s){return"string"!=typeof s?s:s.includes("<")?s.replace(e,"\\3c $2").replace(t,"\\3c $2"):s}const r={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class n{constructor(e){this.builder=e}atrule(e,t){let r=e.raws,n="@"+e.name,o=e.params?this.rawValue(e,"params"):"";if(void 0!==r.afterName?n+=r.afterName:o&&(n+=" "),e.nodes)this.block(e,n+o);else{let i=(r.between||"")+(t?";":"");this.builder(s(n+o+i),e)}}beforeAfter(e,t){let s;s="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(s(t+n)+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(s(r)),this.builder("}",e,"end")}body(e){let t=e.nodes,r=t.length-1;for(;r>0&&"comment"===t[r].type;)r-=1;let n=this.raw(e,"semicolon"),o="document"===e.type;for(let e=0;e<t.length;e++){let i=t[e],l=this.raw(i,"before");l&&this.builder(o?l:s(l)),this.stringify(i,r!==e||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(s("/*"+t+e.text+r+"*/"),e)}decl(e,t){let r=e.raws,n=this.raw(e,"between","colon"),o=e.prop+n+this.rawValue(e,"value");e.important&&(o+=r.important||" !important"),t&&(o+=";"),this.builder(s(o),e)}document(e){this.body(e)}raw(e,t,s){let n;if(s||(s=t),t&&(n=e.raws[t],void 0!==n))return n;let o=e.parent;if("before"===s){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}if(!o)return r[s];let i=e.root(),l=i.rawCache||(i.rawCache={});if(void 0!==l[s])return l[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let r="raw"+((a=s)[0].toUpperCase()+a.slice(1));this[r]?n=this[r](i,e):i.walk(e=>{if(n=e.raws[t],void 0!==n)return!1})}var a;return void 0===n&&(n=r[s]),l[s]=n,n}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){if(this.body(e),e.raws.after){let t=e.raws.after,r=e.parent&&"document"===e.parent.type;this.builder(r?t:s(t))}}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(s(e.raws.ownSemicolon),e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}return he=n,n.default=n,he}function ye(){if(de)return fe;de=1;let e=ge();function t(t,s){new e(s).stringify(t)}return fe=t,t.default=t,fe}var we,ve,be,xe,Ce,Se,ke,Oe,Ae,Ie,Ee,Pe,$e,Re,je,_e,Me,Be,Ue,ze,De,Le,Fe,Ne,Te,Ve,We,Je,He,Ye,Ge,Ze,qe,Ke,Qe,Xe,et,tt,st,rt,nt,ot,it,lt,at,ct,ut,ht,pt,ft={};function dt(){return we||(we=1,ft.isClean=Symbol("isClean"),ft.my=Symbol("my")),ft}function mt(){if(be)return ve;be=1;let e=me(),t=ge(),s=ye(),{isClean:r,my:n}=dt();function o(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>o(e,s)):("object"===i&&null!==n&&(n=o(n)),s[r]=n)}return s}function i(e,t){if(t&&void 0!==t.offset)return t.offset;let s=1,r=1,n=0;for(let o=0;o<e.length;o++){if(r===t.line&&s===t.column){n=o;break}"\n"===e[o]?(s=1,r+=1):s+=1}return n}class l{get proxyOf(){return this}constructor(e={}){this.raws={},this[r]=!1,this[n]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=o(this);for(let s in e)t[s]=e[s];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(t,s={}){if(this.source){let{end:e,start:r}=this.rangeBy(s);return this.source.input.error(t,{column:r.column,line:r.line},{column:e.column,line:e.line},s)}return new e(t)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markClean(){this[r]=!0}markDirty(){if(this[r]){this[r]=!1;let e=this;for(;e=e.parent;)e[r]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let s="document"in this.source.input?this.source.input.document:this.source.input.css,r=s.slice(i(s,this.source.start),i(s,this.source.end)).indexOf(e.word);-1!==r&&(t=this.positionInside(r))}return t}positionInside(e){let t=this.source.start.column,s=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,n=i(r,this.source.start),o=n+e;for(let e=n;e<o;e++)"\n"===r[e]?(t=1,s+=1):t+=1;return{column:t,line:s,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,s={column:this.source.start.column,line:this.source.start.line,offset:i(t,this.source.start)},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:i(t,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let n=t.slice(i(t,this.source.start),i(t,this.source.end)).indexOf(e.word);-1!==n&&(s=this.positionInside(n),r=this.positionInside(n+e.word.length))}else e.start?s={column:e.start.column,line:e.start.line,offset:i(t,e.start)}:e.index&&(s=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line,offset:i(t,e.end)}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<s.line||r.line===s.line&&r.column<=s.column)&&(r={column:s.column+1,line:s.line,offset:s.offset+1}),{end:r,start:s}}raw(e,s){return(new t).raw(this,e,s)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let r=this[e];if(Array.isArray(r))s[e]=r.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof r&&r.toJSON)s[e]=r.toJSON(null,t);else if("source"===e){if(null==r)continue;let o=t.get(r.input);null==o&&(o=n,t.set(r.input,n),n++),s[e]={end:r.end,inputId:o,start:r.start}}else s[e]=r}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=s){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s={}){let r={node:this};for(let e in s)r[e]=s[e];return e.warn(t,r)}}return ve=l,l.default=l,ve}function gt(){if(Ce)return xe;Ce=1;let e=mt();class t extends e{constructor(e){super(e),this.type="comment"}}return xe=t,t.default=t,xe}function yt(){if(ke)return Se;ke=1;let e=mt();class t extends e{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}}return Se=t,t.default=t,Se}function wt(){if(Ae)return Oe;Ae=1;let e,t,s,r,n=gt(),o=yt(),i=mt(),{isClean:l,my:a}=dt();function c(e){return e.map(e=>(e.nodes&&(e.nodes=c(e.nodes)),delete e.source,e))}function u(e){if(e[l]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)u(t)}class h 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(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}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,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}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)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let e of n)this.proxyOf.nodes.splice(r+1,0,e);for(let e in this.indexes)s=this.indexes[e],r<s&&(this.indexes[e]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",o=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let e of o)this.proxyOf.nodes.splice(r,0,e);for(let e in this.indexes)s=this.indexes[e],r<=s&&(this.indexes[e]=s+o.length);return this.markDirty(),this}normalize(s,i){if("string"==typeof s)s=c(t(s).nodes);else if(void 0===s)s=[];else if(Array.isArray(s)){s=s.slice(0);for(let e of s)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===s.type&&"document"!==this.type){s=s.nodes.slice(0);for(let e of s)e.parent&&e.parent.removeChild(e,"ignore")}else if(s.type)s=[s];else if(s.prop){if(void 0===s.value)throw new Error("Value field is missed in node creation");"string"!=typeof s.value&&(s.value=String(s.value)),s=[new o(s)]}else if(s.selector||s.selectors)s=[new r(s)];else if(s.name)s=[new e(s)];else{if(!s.text)throw new Error("Unknown node type in node creation");s=[new n(s)]}return s.map(e=>(e[a]||h.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[l]&&u(e),e.raws||(e.raws={}),void 0===e.raws.before&&i&&void 0!==i.raws.before&&(e.raws.before=i.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.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){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=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,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}}return h.registerParse=e=>{t=e},h.registerRule=e=>{r=e},h.registerAtRule=t=>{e=t},h.registerRoot=e=>{s=e},Oe=h,h.default=h,h.rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,e.prototype):"rule"===t.type?Object.setPrototypeOf(t,r.prototype):"decl"===t.type?Object.setPrototypeOf(t,o.prototype):"comment"===t.type?Object.setPrototypeOf(t,n.prototype):"root"===t.type&&Object.setPrototypeOf(t,s.prototype),t[a]=!0,t.nodes&&t.nodes.forEach(e=>{h.rebuild(e)})},Oe}function vt(){if(Ee)return Ie;Ee=1;let e=wt();class t extends e{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)}}return Ie=t,t.default=t,e.registerAtRule(t),Ie}function bt(){if($e)return Pe;$e=1;let e,t,s=wt();class r extends s{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(s={}){return new e(new t,this,s).stringify()}}return r.registerLazyResult=t=>{e=t},r.registerProcessor=e=>{t=e},Pe=r,r.default=r,Pe}function xt(){return je?Re:(je=1,Re={nanoid:(e=21)=>{let t="",s=0|e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(s=t)=>{let r="",n=0|s;for(;n--;)r+=e[Math.random()*e.length|0];return r}})}function Ct(){if(Me)return _e;Me=1;let{existsSync:e,readFileSync:t}=ae,{dirname:s,join:r}=ae,{SourceMapConsumer:n,SourceMapGenerator:o}=ae;class i{constructor(e,t){if(!1===t.map)return;t.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=s(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new n(this.json||this.text)),this.consumerCache}decodeInline(e){let t=e.match(/^data:application\/json;charset=utf-?8,/)||e.match(/^data:application\/json,/);if(t)return decodeURIComponent(e.substr(t[0].length));let s=e.match(/^data:application\/json;charset=utf-?8;base64,/)||e.match(/^data:application\/json;base64,/);if(s)return r=e.substr(s[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var r;let n=e.slice(22);throw n=n.slice(0,n.indexOf(",")),new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(r,n,o){if(o||this.unsafeMap||/\.map$/i.test(r))return this.root=s(r),e(r)?(this.mapFile=r,t(r,"utf-8").toString().trim()):void 0}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof n)return o.fromSourceMap(t).toString();if(t instanceof o)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let t=this.loadFile(s,e,!0);if(!t)throw new Error("Unable to load previous source map: "+s.toString());return t}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;e&&(t=r(s(e),t));let n=this.loadFile(t,e,!1);if(n)try{this.json=JSON.parse(n.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return n}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return _e=i,i.default=i,_e}function St(){if(Ue)return Be;Ue=1;let{nanoid:e}=xt(),{isAbsolute:t,resolve:s}=ae,{SourceMapConsumer:r,SourceMapGenerator:n}=ae,{fileURLToPath:o,pathToFileURL:i}=ae,l=me(),a=Ct(),c=ae,u=Symbol("lineToIndexCache"),h=Boolean(r&&n),p=Boolean(s&&t);function f(e){if(e[u])return e[u];let t=e.css.split("\n"),s=new Array(t.length),r=0;for(let e=0,n=t.length;e<n;e++)s[e]=r,r+=t[e].length+1;return e[u]=s,s}class d{get from(){return this.file||this.id}constructor(r,n={}){if(null==r||"object"==typeof r&&!r.toString)throw new Error(`PostCSS received ${r} instead of CSS string`);if(this.css=r.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,n.document&&(this.document=n.document.toString()),n.from&&(!p||/^\w+:\/\//.test(n.from)||t(n.from)?this.file=n.from:this.file=s(n.from)),p&&h){let e=new a(this.css,n);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,o,a,c,u;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){c=e.offset;let r=this.fromOffset(c);t=r.line,s=r.col}else t=e.line,s=e.column,c=this.fromLineAndColumn(t,s);if("number"==typeof r.offset){a=r.offset;let e=this.fromOffset(a);o=e.line,n=e.col}else o=r.line,n=r.column,a=this.fromLineAndColumn(r.line,r.column)}else if(s)c=this.fromLineAndColumn(t,s);else{c=t;let e=this.fromOffset(c);t=e.line,s=e.col}let h=this.origin(t,s,o,n);return u=h?new l(e,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,r.plugin):new l(e,void 0===o?t:{column:s,line:t},void 0===o?s:{column:n,line:o},this.css,this.file,r.plugin),u.input={column:s,endColumn:n,endLine:o,endOffset:a,line:t,offset:c,source:this.css},this.file&&(i&&(u.input.url=i(this.file).toString()),u.input.file=this.file),u}fromLineAndColumn(e,t){return f(this)[e-1]+t-1}fromOffset(e){let t=f(this),s=0;if(e>=t[t.length-1])s=t.length-1;else{let r,n=t.length-2;for(;s<n;)if(r=s+(n-s>>1),e<t[r])n=r-1;else{if(!(e>=t[r+1])){s=r;break}s=r+1}}return{col:e-t[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:s(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,s,r,n){if(!this.map)return!1;let l,a,c=this.map.consumer(),u=c.originalPositionFor({column:s,line:e});if(!u.source)return!1;"number"==typeof r&&(l=c.originalPositionFor({column:n,line:r})),a=t(u.source)?i(u.source):new URL(u.source,this.map.consumer().sourceRoot||i(this.map.mapFile));let h={column:u.column,endColumn:l&&l.column,endLine:l&&l.line,line:u.line,url:a.toString()};if("file:"===a.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");h.file=o(a)}let p=c.sourceContentFor(u.source);return p&&(h.source=p),h}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}}return Be=d,d.default=d,c&&c.registerInput&&c.registerInput(d),Be}function kt(){if(De)return ze;De=1;let e,t,s=wt();class r extends s{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(s={}){return new e(new t,this,s).stringify()}}return r.registerLazyResult=t=>{e=t},r.registerProcessor=e=>{t=e},ze=r,r.default=r,s.registerRoot(r),ze}function Ot(){if(Fe)return Le;Fe=1;let e={comma:t=>e.split(t,[","],!0),space:t=>e.split(t,[" ","\n","\t"]),split(e,t,s){let r=[],n="",o=!1,i=0,l=!1,a="",c=!1;for(let s of e)c?c=!1:"\\"===s?c=!0:l?s===a&&(l=!1):'"'===s||"'"===s?(l=!0,a=s):"("===s?i+=1:")"===s?i>0&&(i-=1):0===i&&t.includes(s)&&(o=!0),o?(""!==n&&r.push(n.trim()),n="",o=!1):n+=s;return(s||""!==n)&&r.push(n.trim()),r}};return Le=e,e.default=e,Le}function At(){if(Te)return Ne;Te=1;let e=wt(),t=Ot();class s extends e{get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}}return Ne=s,s.default=s,e.registerRule(s),Ne}function It(){if(He)return Je;He=1;let{dirname:e,relative:t,resolve:s,sep:r}=ae,{SourceMapConsumer:n,SourceMapGenerator:o}=ae,{pathToFileURL:i}=ae,l=St(),a=Boolean(n&&o),c=Boolean(e&&s&&t&&r);return Je=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let t of this.previous()){let s,r=this.toUrl(this.path(t.file)),o=t.root||e(t.file);!1===this.mapOpts.sourcesContent?(s=new n(t.text),s.sourcesContent&&(s.sourcesContent=null)):s=t.consumer(),this.map.applySourceMap(s,r,this.toUrl(this.path(o)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else if(this.css){let e;for(;-1!==(e=this.css.lastIndexOf("/*#"));){let t=this.css.indexOf("*/",e+3);if(-1===t)break;for(;e>0&&"\n"===this.css[e-1];)e--;this.css=this.css.slice(0,e)+this.css.slice(t+2)}}}generate(){if(this.clearAnnotation(),c&&a&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=o.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new o({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 o({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,l,a)=>{if(this.css+=o,l&&"end"!==a&&(i.generated.line=s,i.generated.column=r-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),t=o.match(/\n/g),t?(s+=t.length,e=o.lastIndexOf("\n"),r=o.length-e):r+=o.length,l&&"start"!==a){let e=l.parent||{raws:{}};("decl"===l.type||"atrule"===l.type&&!l.nodes)&&l===e.last&&!e.raws.semicolon||(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(r){if(this.mapOpts.absolute)return r;if(60===r.charCodeAt(0))return r;if(/^\w+:\/\//.test(r))return r;let n=this.memoizedPaths.get(r);if(n)return n;let o=this.opts.to?e(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=e(s(o,this.mapOpts.annotation)));let i=t(o,r);return this.memoizedPaths.set(r,i),i}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 l(this.originalCSS,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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,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(i){let t=i(e).toString();return this.memoizedFileURLs.set(e,t),t}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;"\\"===r&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}}}function Et(){if(Qe)return Ke;Qe=1;let e=wt(),t=St(),s=function(){if(qe)return Ze;qe=1;let e=vt(),t=gt(),s=yt(),r=kt(),n=At(),o=function(){if(Ge)return Ye;Ge=1;const e="'".charCodeAt(0),t='"'.charCodeAt(0),s="\\".charCodeAt(0),r="/".charCodeAt(0),n="\n".charCodeAt(0),o=" ".charCodeAt(0),i="\f".charCodeAt(0),l="\t".charCodeAt(0),a="\r".charCodeAt(0),c="[".charCodeAt(0),u="]".charCodeAt(0),h="(".charCodeAt(0),p=")".charCodeAt(0),f="{".charCodeAt(0),d="}".charCodeAt(0),m=";".charCodeAt(0),g="*".charCodeAt(0),y=":".charCodeAt(0),w="@".charCodeAt(0),v=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,x=/.[\r\n"'(/\\]/,C=/[\da-f]/i;return Ye=function(S,k={}){let O,A,I,E,P,$,R,j,_,M,B=S.css.valueOf(),U=k.ignoreErrors,z=B.length,D=0,L=[],F=[],N=-1;function T(e){throw S.error("Unclosed "+e,D)}return{back:function(e){F.push(e)},endOfFile:function(){return 0===F.length&&D>=z},nextToken:function(S){if(F.length)return F.pop();if(D>=z)return;let k=!!S&&S.ignoreUnclosed;switch(O=B.charCodeAt(D),O){case n:case o:case l:case a:case i:E=D;do{E+=1,O=B.charCodeAt(E)}while(O===o||O===n||O===l||O===a||O===i);$=["space",B.slice(D,E)],D=E-1;break;case c:case u:case f:case d:case y:case m:case p:{let e=String.fromCharCode(O);$=[e,e,D];break}case h:if(M=L.length?L.pop()[1]:"",_=B.charCodeAt(D+1),"url"===M&&_!==e&&_!==t&&_!==o&&_!==n&&_!==l&&_!==i&&_!==a){E=D;do{if(R=!1,E=B.indexOf(")",E+1),-1===E){if(U||k){E=D;break}T("bracket")}for(j=E;B.charCodeAt(j-1)===s;)j-=1,R=!R}while(R);$=["brackets",B.slice(D,E+1),D,E],D=E}else D<=N?$=["(","(",D]:(E=B.indexOf(")",D+1),A=B.slice(D,E+1),-1===E||x.test(A)?(N=-1===E?z:E,$=["(","(",D]):($=["brackets",A,D,E],D=E));break;case e:case t:P=O===e?"'":'"',E=D;do{if(R=!1,E=B.indexOf(P,E+1),-1===E){if(U||k){E=D+1;break}T("string")}for(j=E;B.charCodeAt(j-1)===s;)j-=1,R=!R}while(R);$=["string",B.slice(D,E+1),D,E],D=E;break;case w:v.lastIndex=D+1,v.test(B),E=0===v.lastIndex?B.length-1:v.lastIndex-2,$=["at-word",B.slice(D,E+1),D,E],D=E;break;case s:for(E=D,I=!0;B.charCodeAt(E+1)===s;)E+=1,I=!I;if(O=B.charCodeAt(E+1),I&&O!==r&&O!==o&&O!==n&&O!==l&&O!==a&&O!==i&&(E+=1,C.test(B.charAt(E)))){for(;C.test(B.charAt(E+1));)E+=1;B.charCodeAt(E+1)===o&&(E+=1)}$=["word",B.slice(D,E+1),D,E],D=E;break;default:O===r&&B.charCodeAt(D+1)===g?(E=B.indexOf("*/",D+2)+1,0===E&&(U||k?E=B.length:T("comment")),$=["comment",B.slice(D,E+1),D,E],D=E):(b.lastIndex=D+1,b.test(B),E=0===b.lastIndex?B.length-1:b.lastIndex-2,$=["word",B.slice(D,E+1),D,E],L.push($),D=E)}return D++,$},position:function(){return D}}}}();const i={empty:!0,space:!0};return Ze=class{constructor(e){this.input=e,this.root=new r,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(t){let s,r,n,o=new e;o.name=t[1].slice(1),""===o.name&&this.unnamedAtrule(o,t),this.init(o,t[2]);let i=!1,l=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(s=(t=this.tokenizer.nextToken())[0],"("===s||"["===s?c.push("("===s?")":"]"):"{"===s&&c.length>0?c.push("}"):s===c[c.length-1]&&c.pop(),0===c.length){if(";"===s){o.source.end=this.getPosition(t[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===s){l=!0;break}if("}"===s){if(a.length>0){for(n=a.length-1,r=a[n];r&&"space"===r[0];)r=a[--n];r&&(o.source.end=this.getPosition(r[3]||r[2]),o.source.end.offset++)}this.end(t);break}a.push(t)}else a.push(t);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(o.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(o,"params",a),i&&(t=a[a.length-1],o.source.end=this.getPosition(t[3]||t[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),l&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[o,i]of e.entries()){if(s=i,r=s[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(t){if("word"===t[0]&&"progid"===t[1])continue;return o}this.doubleColon(s)}t=s}return!1}comment(e){let s=new t;this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++;let r=e[1].slice(2,-2);if(r.trim()){let e=r.match(/^(\s*)([^]*\S)(\s*)$/);s.text=e[2],s.raws.left=e[1],s.raws.right=e[3]}else s.text="",s.raws.left=r,s.raws.right=""}createTokenizer(){this.tokenizer=o(this.input)}decl(e,t){let r=new s;this.init(r,e[0][2]);let n,o=e[e.length-1];for(";"===o[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(o[3]||o[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(n=e.shift(),":"===n[0]){r.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let i,l=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)l.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(n=e[t],"!important"===n[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===n[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(n.trim().startsWith("!")&&"space"!==t)break;n=s.pop()[1]+n}n.trim().startsWith("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==n[0]&&"comment"!==n[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(r.raws.between+=l.map(e=>e[1]).join(""),l=[]),this.raw(r,"value",l.concat(e),t),r.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 n;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&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}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="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,n=null,o=[],i=e[1].startsWith("--"),l=[],a=e;for(;a;){if(s=a[0],l.push(a),"("===s||"["===s)n||(n=a),o.push("("===s?")":"]");else if(i&&r&&"{"===s)n||(n=a),o.push("}");else if(0===o.length){if(";"===s){if(r)return void this.decl(l,i);break}if("{"===s)return void this.rule(l);if("}"===s){this.tokenizer.back(l.pop()),t=!0;break}":"===s&&(r=!0)}else s===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&r){if(!i)for(;l.length&&(a=l[l.length-1][0],"space"===a||"comment"===a);)this.tokenizer.back(l.pop());this.decl(l,i)}else this.unknownWord(l)}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)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let n,o,l,a,c=s.length,u="",h=!0;for(let e=0;e<c;e+=1)n=s[e],o=n[0],"space"!==o||e!==c-1||r?"comment"===o?(a=s[e-1]?s[e-1][0]:"empty",l=s[e+1]?s[e+1][0]:"empty",i[a]||i[l]||","===u.slice(-1)?h=!1:u+=n[1]):u+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:u}}e[t]=u}rule(e){e.pop();let t=new n;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}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 "+e[0][1],{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})}}}();function r(e,r){let n=new t(e,r),o=new s(n);try{o.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&r&&r.from&&(/\.scss$/i.test(r.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(r.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(r.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return o.root}return Ke=r,r.default=r,e.registerParse(r),Ke}function Pt(){if(et)return Xe;et=1;class e{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}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 Xe=e,e.default=e,Xe}function $t(){if(st)return tt;st=1;let e=Pt();class t{get content(){return this.css}constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(t,s={}){s.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(s.plugin=this.lastPlugin.postcssPlugin);let r=new e(t,s);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}}return tt=t,t.default=t,tt}function Rt(){if(nt)return rt;nt=1;let e={};return rt=function(t){e[t]||(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}function jt(){if(it)return ot;it=1;let e=wt(),t=bt(),s=It(),r=Et(),n=$t(),o=kt(),i=ye(),{isClean:l,my:a}=dt(),c=Rt();const u={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},p={Once:!0,postcssPlugin:!0,prepare:!0};function f(e){return"object"==typeof e&&"function"==typeof e.then}function d(e){let t=!1,s=u[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function m(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:d(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function g(e){return e[l]=!1,e.nodes&&e.nodes.forEach(e=>g(e)),e}let y={};class w{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(t,s,o){let i;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof w||s instanceof n)i=g(s.root),s.map&&(void 0===o.map&&(o.map={}),o.map.inline||(o.map.inline=!1),o.map.prev=s.map);else{let t=r;o.syntax&&(t=o.syntax.parse),o.parser&&(t=o.parser),t.parse&&(t=t.parse);try{i=t(s,o)}catch(e){this.processed=!0,this.error=e}i&&!i[a]&&e.rebuild(i)}else i=g(s);this.result=new n(t,i,o),this.helpers={...y,postcss:y,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}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 s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),o=r.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!h[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!p[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}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],s=this.runOnRoot(t);if(f(s))try{await s}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[l];){e[l]=!0;let t=[m(e)];for(;t.length>0;){let e=this.visitTick(t);if(f(e))try{await e}catch(e){let s=t[t.length-1].node;throw this.handleError(e,s)}}}if(this.listeners.OnceExit)for(let[t,s]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>s(e,this.helpers));await Promise.all(t)}else await s(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=i;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=this.result.root.source;if(void 0===e.map&&!(r&&r.input&&r.input.map)){let e="";return t(this.result.root,t=>{e+=t}),this.result.css=e,this.result}let n=new s(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[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)if(f(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[l];)e[l]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)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"production"!==process.env.NODE_ENV&&("from"in this.opts||c("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[s,r]of e){let e;this.result.lastPlugin=s;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(f(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(e){throw this.handleError(e,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[l])return r[l]=!0,void e.push(m(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[l]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[l]=!0;let t=d(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[l]||this.walkSync(e)});else{let t=this.listeners[s];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}}return w.registerPostcss=e=>{y=e},ot=w,w.default=w,o.registerLazyResult(w),t.registerLazyResult(w),ot}const _t=re(function(){if(pt)return ht;pt=1;let e=vt(),t=gt(),s=wt(),r=me(),n=yt(),o=bt(),i=function(){if(We)return Ve;We=1;let e=vt(),t=gt(),s=yt(),r=St(),n=Ct(),o=kt(),i=At();function l(a,c){if(Array.isArray(a))return a.map(e=>l(e));let{inputs:u,...h}=a;if(u){c=[];for(let e of u){let t={...e,__proto__:r.prototype};t.map&&(t.map={...t.map,__proto__:n.prototype}),c.push(t)}}if(h.nodes&&(h.nodes=a.nodes.map(e=>l(e,c))),h.source){let{inputId:e,...t}=h.source;h.source=t,null!=e&&(h.source.input=c[e])}if("root"===h.type)return new o(h);if("decl"===h.type)return new s(h);if("rule"===h.type)return new i(h);if("comment"===h.type)return new t(h);if("atrule"===h.type)return new e(h);throw new Error("Unknown node type: "+a.type)}return Ve=l,l.default=l,Ve}(),l=St(),a=jt(),c=Ot(),u=mt(),h=Et(),p=function(){if(ut)return ct;ut=1;let e=bt(),t=jt(),s=function(){if(at)return lt;at=1;let e=It(),t=Et(),s=$t(),r=ye(),n=Rt();class o{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,s=t;try{e=s(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,n,o){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=o,this._map=void 0;let i=r;this.result=new s(this._processor,void 0,this._opts),this.result.css=n;let l=this;Object.defineProperty(this.result,"root",{get:()=>l.root});let a=new e(i,void 0,this._opts,n);if(a.isMap()){let[e,t]=a.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else a.clearAnnotation(),this.result.css=a.css}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"production"!==process.env.NODE_ENV&&("from"in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}}return lt=o,o.default=o,lt}(),r=kt();class n{constructor(e=[]){this.version="8.5.14",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,r={}){return this.plugins.length||r.parser||r.stringifier||r.syntax?new t(this,e,r):new s(this,e,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return ct=n,n.default=n,r.registerProcessor(n),e.registerProcessor(n),ct}(),f=$t(),d=kt(),m=At(),g=ye(),y=Pt();function w(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new p(e)}return w.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...s);return n.postcssPlugin=e,n.postcssVersion=(new p).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return w([n(s)]).process(e,t)},n},w.stringify=g,w.parse=h,w.fromJSON=i,w.list=c,w.comment=e=>new t(e),w.atRule=t=>new e(t),w.decl=e=>new n(e),w.rule=e=>new m(e),w.root=e=>new d(e),w.document=e=>new o(e),w.CssSyntaxError=r,w.Declaration=n,w.Container=s,w.Processor=p,w.Document=o,w.Comment=t,w.Warning=y,w.AtRule=e,w.Result=f,w.Input=l,w.Rule=m,w.Root=d,w.Node=u,a.registerPostcss(w),ht=w,w.default=w,ht}());_t.stringify,_t.fromJSON,_t.plugin,_t.parse,_t.list,_t.document,_t.comment,_t.atRule,_t.rule,_t.decl,_t.root,_t.CssSyntaxError,_t.Declaration,_t.Container,_t.Processor,_t.Document,_t.Comment,_t.Warning,_t.AtRule,_t.Result,_t.Input,_t.Rule,_t.Root,_t.Node;const Mt=new Set(["body","html",":root","*"]);function Bt(e,t){return e&&e.trim()?_t([(s=`[data-vbi-type="${t}"]`,{postcssPlugin:"hc-scope",AtRule(e){if("import"===e.name)return console.warn("[hc-css-scope] @import 已被拒绝(防外部资源加载):",e.params),void e.remove();"font-face"===e.name&&console.warn("[hc-css-scope] @font-face 全局生效,font-family 命名注意冲突")},Rule(e){(function(e){let t=e.parent;for(;t&&"object"==typeof t;){const e=t;if("atrule"===e.type&&/keyframes$/i.test(e.name??""))return!0;t=e.parent}return!1})(e)||(e.selectors=e.selectors.map(e=>function(e,t){const s=e.trim();if(!s)return s;if(Mt.has(s))return t;for(const e of Mt){const r=s.charAt(e.length);if(s.startsWith(e)&&(" "===r||">"===r||"+"===r||"~"===r||","===r))return t+s.slice(e.length)}return`${t} ${s}`}(e,s)))}})]).process(e,{from:void 0}).css:"";var s}const Ut=new Map;function zt(e){let t=5381;for(let s=0;s<e.length;s++)t=(t<<5)+t+e.charCodeAt(s)|0;return(t>>>0).toString(36)}function Dt(e){const t=e.replace(/[^a-zA-Z0-9_-]/g,"_");return t===e?`hc-style-${t}`:`hc-style-${t}-${zt(e).slice(0,6)}`}function Lt(e,t){var s;const r=t??"",n=Dt(e),o=Ut.get(e);if(!r.trim())return null==(s=document.getElementById(n))||s.remove(),void(o&&Ut.set(e,{...o,cssHash:""}));const i=zt(r);if(o&&o.cssHash===i)return;let l;try{l=Bt(r,e)}catch(t){return void console.warn("[hc-css-scope]",e,"PostCSS process failed:",t)}!function(e,t){const s=Dt(e);let r=document.getElementById(s);r||(r=document.createElement("style"),r.id=s,r.setAttribute("data-hc-scope",e),document.head.appendChild(r)),r.textContent=t}(e,l),o?Ut.set(e,{...o,cssHash:i}):Ut.set(e,{cssHash:i,refCount:0})}function Ft(e,t){Lt(e,t);const s=Ut.get(e);s?Ut.set(e,{...s,refCount:s.refCount+1}):Ut.set(e,{cssHash:"",refCount:1})}function Nt(e){var t;const s=Ut.get(e);if(!s)return;const r=s.refCount-1;r<=0?(null==(t=document.getElementById(Dt(e)))||t.remove(),Ut.delete(e)):Ut.set(e,{...s,refCount:r})}function Tt(e){var t;null==(t=document.getElementById(Dt(e)))||t.remove(),Ut.delete(e)}function Vt(){return Ut.size}function Wt(){return[...Ut.entries()].map(([e,t])=>({scopeId:e,componentId:e,refCount:t.refCount,cssHash:t.cssHash}))}const Jt={key:1,class:"rounded-md border-2 border-rose-300 bg-rose-50 p-4 text-sm text-rose-900 space-y-2 min-h-[140px] overflow-auto"},Ht={class:"font-semibold flex items-center gap-1.5"},Yt={class:"font-mono text-xs text-rose-800 break-all"},Gt={key:0,class:"text-[10px] font-mono bg-rose-100/60 p-2 rounded overflow-auto max-h-60 text-rose-800"},Zt=s({__name:"ErrorBoundary",props:{label:{}},setup(e){const s=e,u=t(null),h=t(0),p=t(!1);function f(){u.value=null,p.value=!1,h.value++}return r(e=>(console.error(`[hc-eb${s.label?" "+s.label:""}]`,e),u.value=e,!1)),(t,s)=>(n(),o("div",{key:h.value,class:"hc-eb-root",style:{width:"100%",height:"100%"}},[u.value?(n(),o("div",Jt,[l("div",Ht,[s[1]||(s[1]=l("span",null,"⚠️",-1)),l("span",null,"组件渲染失败"+a(e.label?` — ${e.label}`:""),1)]),l("div",Yt,a(u.value.message),1),l("button",{class:"text-xs text-rose-700 hover:text-rose-900 underline",onClick:s[0]||(s[0]=e=>p.value=!p.value)},a(p.value?"隐藏":"展开")+"堆栈 ",1),p.value?(n(),o("pre",Gt,a(u.value.stack),1)):c("",!0),l("button",{class:"text-xs px-3 py-1 rounded bg-rose-600 hover:bg-rose-700 text-white transition-colors",onClick:f}," 重试 ")])):i(t.$slots,"default",{key:0})]))}}),qt=["data-vbi-id","data-vbi-type","data-vbi-canvas"],Kt={key:0,class:"rounded-md border-2 border-amber-300 bg-amber-50 p-4 text-sm text-amber-900 space-y-2 min-h-[140px] overflow-auto"},Qt={class:"text-[11px] font-mono break-all whitespace-pre-wrap"},Xt={key:1,class:"grid place-items-center min-h-[140px] text-xs text-zinc-400"},es=s({__name:"RuntimeBox",props:{instanceId:{},componentId:{},scopeId:{},canvasId:{},htmlSource:{},jsSource:{},cssSource:{default:""},customValues:{default:()=>({})},position:{},size:{},zIndex:{}},setup(e){const s=e,r=u(()=>s.scopeId??s.componentId),i=h(S,null),v=u(()=>s.canvasId??i??C),b=p(null),x=t(null),k=t(!1),O=t(0);f(()=>[s.htmlSource,s.jsSource],()=>{!async function(){k.value=!0,x.value=null;try{const e=await ee({html:s.htmlSource,js:s.jsSource});b.value=e,O.value++}catch(e){x.value=e instanceof Error?e:new Error(String(e)),b.value=null}finally{k.value=!1}}()},{immediate:!0});let A=!1;f(()=>[s.cssSource,r.value],([e,t],s)=>{const r=(null==s?void 0:s[1])??null;r&&r!==t?(Nt(r),Ft(t,e),A=!0):A?Lt(t,e):(Ft(t,e),A=!0)},{immediate:!0});const I=u(()=>{const e={width:"100%",height:"100%"};return s.position&&(e.position="absolute",e.left=`${s.position.x}px`,e.top=`${s.position.y}px`),void 0!==s.zIndex&&(e.zIndex=String(s.zIndex)),e});let E=null,P=null;function R(e){if(e!==E)if(E=e,e&&"object"==typeof e){const t=v.value;$(t,s.instanceId,s.componentId,e),P=t}else null!==P&&(M(s.instanceId,P),P=null)}return d(()=>{null!==P&&(M(s.instanceId,P),P=null),E=null,A&&(Nt(r.value),A=!1)}),(t,s)=>(n(),o("div",{class:"_vbi_box","data-vbi-id":e.instanceId,"data-vbi-type":r.value,"data-vbi-canvas":v.value,style:m(I.value)},[x.value?(n(),o("div",Kt,[s[0]||(s[0]=l("div",{class:"font-semibold"},"⚠️ 编译失败",-1)),l("pre",Qt,a(x.value.message),1)])):k.value&&!b.value?(n(),o("div",Xt," 编译中… ")):b.value?(n(),g(Zt,{key:O.value,label:e.instanceId},{default:y(()=>[(n(),g(w(b.value.options),{"hc-custom-values":e.customValues,ref:R},null,8,["hc-custom-values"]))]),_:1},8,["label"])):c("",!0)],12,qt))}}),ts="0.0.0-stage2b";export{C as DEFAULT_CANVAS_ID,Zt as ErrorBoundary,S as HC_CANVAS_ID_KEY,G as HC_INJECT_KEY,es as RuntimeBox,ts as VERSION,D as __resetLifecycleEmitter,z as __resetRegistry,F as assets,Ft as attachScope,te as clearCompileCache,ee as compileComponent,T as createCanvasesRegistry,W as createHyperCard,Wt as debugScopedCssRefs,Nt as detachScope,R as disposeCanvas,se as getCompileCacheSize,B as getInstance,Vt as getScopedCssCount,Lt as injectScopedCss,J as isVuePlugin,j as listCanvasIds,U as listInstances,A as onInstanceLifecycle,b as parseComponentSource,_ as register,$ as registerInCanvas,k as registryVersion,Tt as removeScopedCss,L as runtime,Bt as scopeCss,M as unregister};
1
+ import*as e from"vue";import{ref as t,defineComponent as s,onErrorCaptured as r,openBlock as n,createElementBlock as o,renderSlot as i,createElementVNode as a,toDisplayString as l,createCommentVNode as c,computed as u,inject as h,shallowRef as p,watch as f,onBeforeUnmount as d,normalizeStyle as m,createBlock as g,withCtx as y,resolveDynamicComponent as w}from"vue";import{p as v}from"./parseSourceEntry-BNu0kje7.js";import{a as b}from"./parseSourceEntry-BNu0kje7.js";function x(e){return{all:e=e||new Map,on:function(t,s){var r=e.get(t);r?r.push(s):e.set(t,[s])},off:function(t,s){var r=e.get(t);r&&(s?r.splice(r.indexOf(s)>>>0,1):e.set(t,[]))},emit:function(t,s){var r=e.get(t);r&&r.slice().map(function(e){e(s)}),(r=e.get("*"))&&r.slice().map(function(e){e(t,s)})}}}const C="__default__",S="__hcCanvasId",k=t(0),O=x();function I(e,t){const s=e=>{try{t(e)}catch(e){console.error("[hc-registry] instance lifecycle listener threw",e)}};return O.on(e,s),()=>O.off(e,s)}function A(e,t){O.emit(e,t)}const E=new Set,P=new Map;function $(e,t,s,r){var n;const o=function(e,t){return`${e}\0${t}`}(e,t);if(E.has(o)){const s=`[hc-registry] re-entrant registerInCanvas("${e}", "${t}") detected — a lifecycle listener tried to register the same id while the outer register is in flight. Nested register blocked to prevent state divergence; defer your register via microtask / setTimeout if you need to re-mount on lifecycle events.`;throw console.warn(s),new Error(s)}E.add(o);try{const o=function(e){let t=P.get(e);return t||(t=new Map,P.set(e,t)),t}(e);o.has(t)&&(console.warn(`[hc-registry] instance ${t} already registered in canvas "${e}", overwriting`),null==(n=o.get(t))||n.__dispose(),o.delete(t),A("instance:unmounted",{canvasId:e,instanceId:t}));const i=function(e,t,s){const r=x();return{instanceId:e,componentId:t,vm:s,call(t,...r){const n=s[t];if("function"!=typeof n)throw new Error(`[hc-registry] method "${t}" not found on instance ${e}`);return n.apply(s,r)},on:(e,t)=>(r.on(e,t),()=>r.off(e,t)),emit(e,t){r.emit(e,t)},setProp(e,t){s[e]=t},setDataInput(t,r){const n=s.custom;if(!n||!(t in n))return void console.warn(`[hc-registry] setDataInput("${t}"): vm.custom["${t}"] not declared on instance ${e}; binding 改了一个未声明的 dataInput key,组件不会响应`);const o=n[t];o&&"object"==typeof o?!0===o.dataInput?o.value=r:console.warn(`[hc-registry] setDataInput("${t}"): vm.custom["${t}"] is not declared with dataInput:true on instance ${e}; 请在组件源码 custom.${t} 上加 \`dataInput: true\` 才能被 binding 灌入`):console.warn(`[hc-registry] setDataInput("${t}"): vm.custom["${t}"] not a {value:...} slot`)},__dispose(){r.all.clear()}}}(t,s,r);return o.set(t,i),k.value++,A("instance:ready",{canvasId:e,instanceId:t}),i}finally{E.delete(o)}}function R(e){const t=P.get(e);if(!t)return;const s=[];for(const[e,r]of t)r.__dispose(),s.push(e);t.clear(),P.delete(e),k.value++;for(const t of s)A("instance:unmounted",{canvasId:e,instanceId:t})}function j(){return[...P.keys()]}function _(e,t,s){return $(C,e,t,s)}function M(e,t=C){const s=P.get(t);if(!s)return;const r=s.get(e);r&&(r.__dispose(),s.delete(e),k.value++,A("instance:unmounted",{canvasId:t,instanceId:e}))}function B(e,t){var s;if(void 0!==t)return(null==(s=P.get(t))?void 0:s.get(e))??null;let r=null;const n=[];for(const[t,s]of P){const o=s.get(e);o&&(r||(r=o),n.push(t))}return n.length>1&&console.warn(`[hc-registry] getInstance("${e}") matched ${n.length} canvases [${n.join(", ")}]; returning first. Prefer __HYPERCARD__.canvases.callComponent(canvasId, instanceId, ...) for explicit scope.`),r}function U(e){const t=null==e?void 0:e.componentId,s=t?e=>e.componentId===t:()=>!0;if(void 0!==(null==e?void 0:e.canvasId)){const t=P.get(e.canvasId);return t?[...t.values()].filter(s):[]}const r=[];for(const e of P.values())for(const t of e.values())s(t)&&r.push(t);return r}function z(){const e=[];for(const[t,s]of P)for(const[r,n]of s)n.__dispose(),e.push({canvasId:t,instanceId:r});P.clear(),k.value++;for(const t of e)A("instance:unmounted",t)}function D(){O.all.clear()}const L={getInstance:B,listInstances:U,call(e,t,...s){const r=B(e);if(r)return r.call(t,...s);console.debug(`[hc-runtime] call: instance "${e}" not found`)},on(e,t,s){const r=B(e);if(r)return r.on(t,s);console.debug(`[hc-runtime] on: instance "${e}" not found`)},emit(e,t,s){const r=B(e);r?r.emit(t,s):console.debug(`[hc-runtime] emit: instance "${e}" not found`)}},F={pickerUrl:e=>`/a/${e}`};function N(e){return{canvasId:e,listInstances:t=>U({canvasId:e,componentId:null==t?void 0:t.componentId}),getInstance:t=>B(t,e),call(t,s,...r){const n=B(t,e);if(n)try{return n.call(s,...r)}catch(r){return void console.warn(`[hc-canvases] call error: canvas="${e}" instance="${t}" method="${s}":`,r)}else console.warn(`[hc-canvases] call: instance "${t}" not found in canvas "${e}"`)},emit(t,s,r){const n=B(t,e);if(n)try{n.emit(s,r)}catch(r){console.warn(`[hc-canvases] emit error: canvas="${e}" instance="${t}" event="${s}":`,r)}else console.warn(`[hc-canvases] emit: instance "${t}" not found in canvas "${e}"`)},broadcastInCanvas(t,s){const r=U({canvasId:e});for(const n of r)try{n.emit(t,s)}catch(s){console.warn(`[hc-canvases] broadcastInCanvas: canvas="${e}" instance="${n.instanceId}" event="${t}" emit failed:`,s)}},dispose(){R(e)}}}function T(){return{list:()=>j().map(e=>N(e)),get:e=>j().includes(e)?N(e):null,getAll(){const e={};for(const t of j())e[t]=N(t);return e},callComponent(e,t,s,...r){const n=B(t,e);if(n)try{return n.call(s,...r)}catch(r){return void console.warn(`[hc-canvases] callComponent error: canvas="${e}" instance="${t}" method="${s}":`,r)}else console.warn(`[hc-canvases] callComponent: canvas="${e}" instance="${t}" not found`)},emitToCanvas(e,t,s,r){const n=B(t,e);if(n)try{n.emit(s,r)}catch(r){console.warn(`[hc-canvases] emitToCanvas error: canvas="${e}" instance="${t}" event="${s}":`,r)}else console.warn(`[hc-canvases] emitToCanvas: canvas="${e}" instance="${t}" not found`)},broadcast(e,t){for(const s of j())try{const r=U({canvasId:s});for(const n of r)try{n.emit(e,t)}catch(t){console.warn(`[hc-canvases] broadcast: canvas="${s}" instance="${n.instanceId}" event="${e}" emit failed:`,t)}}catch(t){console.warn(`[hc-canvases] broadcast: canvas="${s}" event="${e}" failed:`,t)}}}}const V=new Set(["vue","Vue","window","global","globalThis","console","document","process","$","libs","runtime","assets","version"]);function W(e={}){const t=e.strict??!1,s=e.libs??{},r=e.version??"v1";return{install(e){const n=Object.entries(s),o=n.filter(([,e])=>J(e)),i=n.filter(([e])=>V.has(e)),a=[`[hypercard] 已注册 ${n.length} 个 libs:`];for(const[e,t]of n)a.push(` ${e.padEnd(16)} ${Y(t)}`);console.info(a.join("\n"));const l=[];o.length>1&&l.push(`检测到 ${o.length} 个 Vue plugin(${o.map(([e])=>e).join(", ")}),请确认全局组件命名不冲突`);for(const[e]of i)l.push(`lib 名 "${e}" 是保留词,建议改名`);if(l.length>0){const e=l.map(e=>` - ${e}`).join("\n");if(t)throw new Error(`[hypercard] strict mode 阻止启动:\n${e}`);console.warn(`[hypercard] 警告:\n${e}`)}for(const[s,r]of o){const[n,o]=H(r);try{e.use(n,...o)}catch(e){if(console.error(`[hypercard] app.use("${s}") 失败:`,e),t)throw e}}const c={};for(const[e,t]of n){const[s]=H(t);c[e]=s}const u={libs:c,runtime:L,assets:F,version:r,canvases:T()};e.provide(G,u),e.config.globalProperties.$hc=u,"undefined"!=typeof window&&(window.__HYPERCARD__=u)}}}function J(e){return Array.isArray(e)&&e.length>=1?J(e[0]):"object"==typeof e&&null!==e&&"function"==typeof e.install}function H(e){return Array.isArray(e)&&e.length>=1?[e[0],e.slice(1)]:[e,[]]}function Y(e){return J(e)?Array.isArray(e)?"✓ Vue plugin (with options) → 已 app.use":"✓ Vue plugin → 已 app.use":"function"==typeof e?"· function":Array.isArray(e)?"· array":"object"==typeof e&&null!==e?"· object":"· "+typeof e}const G="__HYPERCARD__",Z=new Set(["init","onClick","onMouseover","onMouseout","onResize","onDestroy"]),q=new Map;function K(e,t){for(q.has(e)&&q.delete(e),q.set(e,t);q.size>100;){const e=q.keys().next().value;if(void 0===e)break;q.delete(e)}}function Q(e){let t=5381;for(let s=0;s<e.length;s++)t=(t<<5)+t+e.charCodeAt(s)|0;return(t>>>0).toString(36)}function X(e){if(!Array.isArray(e))return[];const t=[];for(const s of e){if(!s||"object"!=typeof s)continue;const e=s;if("string"!=typeof e.name)continue;const r={name:e.name};"boolean"==typeof e.multiple&&(r.multiple=e.multiple),Array.isArray(e.accepts)&&(r.accepts=e.accepts.filter(e=>"string"==typeof e)),"number"==typeof e.maxChildren&&(r.maxChildren=e.maxChildren),"string"==typeof e.label&&(r.label=e.label),t.push(r)}return t}async function ee(t){const s=Q(t.html)+"_"+Q(t.js),r=q.get(s);if(r)return K(s,r),r;const n=(async()=>function(t,s){if(!t||"object"!=typeof t)throw new Error("[hc-compile] component.js must `export default` an object");const r=t,n=r.name,o=r.method??{},i=r.attribute??{},a=r.custom??{},l=r.style??{},c=r.slots,u=r.data,h=r.methods??{},p=r.computed,f=r.watch,d=r.created,m=r.mounted,g=r.beforeUnmount,y=r.props,w=new Set(["name","method","attribute","custom","style","option","data","methods","computed","watch","created","mounted","beforeUnmount","props","slots"]),v={};for(const e of Object.keys(r))w.has(e)||(v[e]=r[e]);const b={};for(const[e,t]of Object.entries(o))Z.has(e)||"function"!=typeof t||(b[e]=t);const x=Object.keys(b),C={...b,...h},S=(s??"").trim()||"<div></div>";return{options:{render:e.compile(S),props:{...y?Array.isArray(y)?Object.fromEntries(y.map(e=>[e,null])):"object"==typeof y?y:{}:{},hcCustomValues:{type:Object,default:()=>({})},hcInstanceId:{type:String,default:""},hcCanvasId:{type:String,default:""},hcComponentId:{type:String,default:""}},data(){const e="function"==typeof u?u.call(this):u??{},t=this.hcCustomValues??{},s={};for(const[e,r]of Object.entries(a)){let n;try{n=JSON.parse(JSON.stringify(r??{}))}catch{n={...r??{}}}e in t&&n&&"object"==typeof n&&(n.value=t[e]),s[e]=n}return{custom:s,...e}},methods:C,computed:p,watch:(()=>{const e=f&&"object"==typeof f?{...f}:{};return e.hcCustomValues={handler(e){if(e&&this.custom)for(const[t,s]of Object.entries(e)){const e=this.custom[t];e&&"object"==typeof e&&(e.value=s)}},deep:!0},e})(),created(){this.hcInstanceId&&this.hcCanvasId&&$(this.hcCanvasId,this.hcInstanceId,this.hcComponentId,this),"function"==typeof d&&d.call(this)},mounted(){const e=[],t=this.$el;if(t&&t instanceof HTMLElement){Object.assign(t.style,l);for(const[e,s]of Object.entries(i))"string"==typeof s&&s&&t.setAttribute(e,s);for(const s of Z){if("init"===s)continue;const r=o[s];if("function"==typeof r){const n=s.replace(/^on/,"").toLowerCase(),o=e=>{r.call(this,{event:e,data:e})};t.addEventListener(n,o),e.push(()=>t.removeEventListener(n,o))}}}this.__hcCleanup=e;const s=o.init;"function"==typeof s&&s.call(this),"function"==typeof m&&m.call(this)},beforeUnmount(){var e;this.hcInstanceId&&this.hcCanvasId&&M(this.hcInstanceId,this.hcCanvasId),null==(e=this.__hcCleanup)||e.forEach(e=>{try{e()}catch{}}),this.__hcCleanup=void 0,"function"==typeof g&&g.call(this)},...v},meta:{name:n,attribute:i,style:l,customDecl:a,methodNames:x,slotsDecl:X(c)}}}(function(e){let t;try{const s=v(e,{ecmaVersion:"latest",sourceType:"module",allowAwaitOutsideFunction:!0}).body.find(e=>"ExportDefaultDeclaration"===e.type);if(!s)throw new Error("[hc-compile] component.js must `export default` an object");t=e.slice(0,s.start)+"module.exports = "+e.slice(s.declaration.start)}catch(e){throw e instanceof Error?e:new Error(String(e))}const s=new Function("module","exports",`"use strict";\n${t}\n;return module.exports;`),r={exports:{}};try{return s(r,r.exports)}catch(e){throw e instanceof Error?e:new Error(String(e))}}(t.js),t.html))();return K(s,n),n.catch(()=>q.delete(s)),n}function te(){q.clear()}function se(){return q.size}function re(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ne(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var oe,ie={exports:{}};function ae(){if(oe)return ie.exports;oe=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return ie.exports=t(),ie.exports.createColors=t,ie.exports}const le=ne(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ce,ue,he,pe,fe,de;function me(){if(ue)return ce;ue=1;let e=ae(),t=le;class s extends Error{constructor(e,t,r,n,o,i){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==t&&void 0!==r&&("number"==typeof t?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(s){if(!this.source)return"";let r=this.source;null==s&&(s=e.isColorSupported);let n=e=>e,o=e=>e,i=e=>e;if(s){let{bold:s,gray:r,red:a}=e.createColors(!0);o=e=>s(a(e)),n=e=>r(e),t&&(i=e=>t(e))}let a=r.split(/\r?\n/),l=Math.max(this.line-3,0),c=Math.min(this.line+2,a.length),u=String(c).length;return a.slice(l,c).map((e,t)=>{let s=l+1+t,r=" "+(" "+s).slice(-u)+" | ";if(s===this.line){if(e.length>160){let t=20,s=Math.max(0,this.column-t),a=Math.max(this.column+t,this.endColumn+t),l=e.slice(s,a),c=n(r.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,t-1)).replace(/[^\t]/g," ");return o(">")+n(r)+i(l)+"\n "+c+o("^")}let t=n(r.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return o(">")+n(r)+i(e)+"\n "+t+o("^")}return" "+n(r)+i(e)}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}return ce=s,s.default=s,ce}function ge(){if(pe)return he;pe=1;const e=/(<)(\/?style\b)/gi,t=/(<)(!--)/g;function s(s){return"string"!=typeof s?s:s.includes("<")?s.replace(e,"\\3c $2").replace(t,"\\3c $2"):s}const r={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class n{constructor(e){this.builder=e}atrule(e,t){let r=e.raws,n="@"+e.name,o=e.params?this.rawValue(e,"params"):"";if(void 0!==r.afterName?n+=r.afterName:o&&(n+=" "),e.nodes)this.block(e,n+o);else{let i=(r.between||"")+(t?";":"");this.builder(s(n+o+i),e)}}beforeAfter(e,t){let s;s="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(s(t+n)+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(s(r)),this.builder("}",e,"end")}body(e){let t=e.nodes,r=t.length-1;for(;r>0&&"comment"===t[r].type;)r-=1;let n=this.raw(e,"semicolon"),o="document"===e.type;for(let e=0;e<t.length;e++){let i=t[e],a=this.raw(i,"before");a&&this.builder(o?a:s(a)),this.stringify(i,r!==e||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(s("/*"+t+e.text+r+"*/"),e)}decl(e,t){let r=e.raws,n=this.raw(e,"between","colon"),o=e.prop+n+this.rawValue(e,"value");e.important&&(o+=r.important||" !important"),t&&(o+=";"),this.builder(s(o),e)}document(e){this.body(e)}raw(e,t,s){let n;if(s||(s=t),t&&(n=e.raws[t],void 0!==n))return n;let o=e.parent;if("before"===s){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}if(!o)return r[s];let i=e.root(),a=i.rawCache||(i.rawCache={});if(void 0!==a[s])return a[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let r="raw"+((l=s)[0].toUpperCase()+l.slice(1));this[r]?n=this[r](i,e):i.walk(e=>{if(n=e.raws[t],void 0!==n)return!1})}var l;return void 0===n&&(n=r[s]),a[s]=n,n}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){if(this.body(e),e.raws.after){let t=e.raws.after,r=e.parent&&"document"===e.parent.type;this.builder(r?t:s(t))}}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(s(e.raws.ownSemicolon),e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}return he=n,n.default=n,he}function ye(){if(de)return fe;de=1;let e=ge();function t(t,s){new e(s).stringify(t)}return fe=t,t.default=t,fe}var we,ve,be,xe,Ce,Se,ke,Oe,Ie,Ae,Ee,Pe,$e,Re,je,_e,Me,Be,Ue,ze,De,Le,Fe,Ne,Te,Ve,We,Je,He,Ye,Ge,Ze,qe,Ke,Qe,Xe,et,tt,st,rt,nt,ot,it,at,lt,ct,ut,ht,pt,ft={};function dt(){return we||(we=1,ft.isClean=Symbol("isClean"),ft.my=Symbol("my")),ft}function mt(){if(be)return ve;be=1;let e=me(),t=ge(),s=ye(),{isClean:r,my:n}=dt();function o(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>o(e,s)):("object"===i&&null!==n&&(n=o(n)),s[r]=n)}return s}function i(e,t){if(t&&void 0!==t.offset)return t.offset;let s=1,r=1,n=0;for(let o=0;o<e.length;o++){if(r===t.line&&s===t.column){n=o;break}"\n"===e[o]?(s=1,r+=1):s+=1}return n}class a{get proxyOf(){return this}constructor(e={}){this.raws={},this[r]=!1,this[n]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=o(this);for(let s in e)t[s]=e[s];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(t,s={}){if(this.source){let{end:e,start:r}=this.rangeBy(s);return this.source.input.error(t,{column:r.column,line:r.line},{column:e.column,line:e.line},s)}return new e(t)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markClean(){this[r]=!0}markDirty(){if(this[r]){this[r]=!1;let e=this;for(;e=e.parent;)e[r]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let s="document"in this.source.input?this.source.input.document:this.source.input.css,r=s.slice(i(s,this.source.start),i(s,this.source.end)).indexOf(e.word);-1!==r&&(t=this.positionInside(r))}return t}positionInside(e){let t=this.source.start.column,s=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,n=i(r,this.source.start),o=n+e;for(let e=n;e<o;e++)"\n"===r[e]?(t=1,s+=1):t+=1;return{column:t,line:s,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,s={column:this.source.start.column,line:this.source.start.line,offset:i(t,this.source.start)},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:i(t,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let n=t.slice(i(t,this.source.start),i(t,this.source.end)).indexOf(e.word);-1!==n&&(s=this.positionInside(n),r=this.positionInside(n+e.word.length))}else e.start?s={column:e.start.column,line:e.start.line,offset:i(t,e.start)}:e.index&&(s=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line,offset:i(t,e.end)}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<s.line||r.line===s.line&&r.column<=s.column)&&(r={column:s.column+1,line:s.line,offset:s.offset+1}),{end:r,start:s}}raw(e,s){return(new t).raw(this,e,s)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let r=this[e];if(Array.isArray(r))s[e]=r.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof r&&r.toJSON)s[e]=r.toJSON(null,t);else if("source"===e){if(null==r)continue;let o=t.get(r.input);null==o&&(o=n,t.set(r.input,n),n++),s[e]={end:r.end,inputId:o,start:r.start}}else s[e]=r}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=s){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s={}){let r={node:this};for(let e in s)r[e]=s[e];return e.warn(t,r)}}return ve=a,a.default=a,ve}function gt(){if(Ce)return xe;Ce=1;let e=mt();class t extends e{constructor(e){super(e),this.type="comment"}}return xe=t,t.default=t,xe}function yt(){if(ke)return Se;ke=1;let e=mt();class t extends e{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}}return Se=t,t.default=t,Se}function wt(){if(Ie)return Oe;Ie=1;let e,t,s,r,n=gt(),o=yt(),i=mt(),{isClean:a,my:l}=dt();function c(e){return e.map(e=>(e.nodes&&(e.nodes=c(e.nodes)),delete e.source,e))}function u(e){if(e[a]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)u(t)}class h 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(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}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,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}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)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let e of n)this.proxyOf.nodes.splice(r+1,0,e);for(let e in this.indexes)s=this.indexes[e],r<s&&(this.indexes[e]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",o=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let e of o)this.proxyOf.nodes.splice(r,0,e);for(let e in this.indexes)s=this.indexes[e],r<=s&&(this.indexes[e]=s+o.length);return this.markDirty(),this}normalize(s,i){if("string"==typeof s)s=c(t(s).nodes);else if(void 0===s)s=[];else if(Array.isArray(s)){s=s.slice(0);for(let e of s)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===s.type&&"document"!==this.type){s=s.nodes.slice(0);for(let e of s)e.parent&&e.parent.removeChild(e,"ignore")}else if(s.type)s=[s];else if(s.prop){if(void 0===s.value)throw new Error("Value field is missed in node creation");"string"!=typeof s.value&&(s.value=String(s.value)),s=[new o(s)]}else if(s.selector||s.selectors)s=[new r(s)];else if(s.name)s=[new e(s)];else{if(!s.text)throw new Error("Unknown node type in node creation");s=[new n(s)]}return s.map(e=>(e[l]||h.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[a]&&u(e),e.raws||(e.raws={}),void 0===e.raws.before&&i&&void 0!==i.raws.before&&(e.raws.before=i.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.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){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=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,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}}return h.registerParse=e=>{t=e},h.registerRule=e=>{r=e},h.registerAtRule=t=>{e=t},h.registerRoot=e=>{s=e},Oe=h,h.default=h,h.rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,e.prototype):"rule"===t.type?Object.setPrototypeOf(t,r.prototype):"decl"===t.type?Object.setPrototypeOf(t,o.prototype):"comment"===t.type?Object.setPrototypeOf(t,n.prototype):"root"===t.type&&Object.setPrototypeOf(t,s.prototype),t[l]=!0,t.nodes&&t.nodes.forEach(e=>{h.rebuild(e)})},Oe}function vt(){if(Ee)return Ae;Ee=1;let e=wt();class t extends e{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)}}return Ae=t,t.default=t,e.registerAtRule(t),Ae}function bt(){if($e)return Pe;$e=1;let e,t,s=wt();class r extends s{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(s={}){return new e(new t,this,s).stringify()}}return r.registerLazyResult=t=>{e=t},r.registerProcessor=e=>{t=e},Pe=r,r.default=r,Pe}function xt(){return je?Re:(je=1,Re={nanoid:(e=21)=>{let t="",s=0|e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(s=t)=>{let r="",n=0|s;for(;n--;)r+=e[Math.random()*e.length|0];return r}})}function Ct(){if(Me)return _e;Me=1;let{existsSync:e,readFileSync:t}=le,{dirname:s,join:r}=le,{SourceMapConsumer:n,SourceMapGenerator:o}=le;class i{constructor(e,t){if(!1===t.map)return;t.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=s(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new n(this.json||this.text)),this.consumerCache}decodeInline(e){let t=e.match(/^data:application\/json;charset=utf-?8,/)||e.match(/^data:application\/json,/);if(t)return decodeURIComponent(e.substr(t[0].length));let s=e.match(/^data:application\/json;charset=utf-?8;base64,/)||e.match(/^data:application\/json;base64,/);if(s)return r=e.substr(s[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var r;let n=e.slice(22);throw n=n.slice(0,n.indexOf(",")),new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(r,n,o){if(o||this.unsafeMap||/\.map$/i.test(r))return this.root=s(r),e(r)?(this.mapFile=r,t(r,"utf-8").toString().trim()):void 0}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof n)return o.fromSourceMap(t).toString();if(t instanceof o)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let t=this.loadFile(s,e,!0);if(!t)throw new Error("Unable to load previous source map: "+s.toString());return t}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;e&&(t=r(s(e),t));let n=this.loadFile(t,e,!1);if(n)try{this.json=JSON.parse(n.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return n}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return _e=i,i.default=i,_e}function St(){if(Ue)return Be;Ue=1;let{nanoid:e}=xt(),{isAbsolute:t,resolve:s}=le,{SourceMapConsumer:r,SourceMapGenerator:n}=le,{fileURLToPath:o,pathToFileURL:i}=le,a=me(),l=Ct(),c=le,u=Symbol("lineToIndexCache"),h=Boolean(r&&n),p=Boolean(s&&t);function f(e){if(e[u])return e[u];let t=e.css.split("\n"),s=new Array(t.length),r=0;for(let e=0,n=t.length;e<n;e++)s[e]=r,r+=t[e].length+1;return e[u]=s,s}class d{get from(){return this.file||this.id}constructor(r,n={}){if(null==r||"object"==typeof r&&!r.toString)throw new Error(`PostCSS received ${r} instead of CSS string`);if(this.css=r.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,n.document&&(this.document=n.document.toString()),n.from&&(!p||/^\w+:\/\//.test(n.from)||t(n.from)?this.file=n.from:this.file=s(n.from)),p&&h){let e=new l(this.css,n);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,o,l,c,u;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){c=e.offset;let r=this.fromOffset(c);t=r.line,s=r.col}else t=e.line,s=e.column,c=this.fromLineAndColumn(t,s);if("number"==typeof r.offset){l=r.offset;let e=this.fromOffset(l);o=e.line,n=e.col}else o=r.line,n=r.column,l=this.fromLineAndColumn(r.line,r.column)}else if(s)c=this.fromLineAndColumn(t,s);else{c=t;let e=this.fromOffset(c);t=e.line,s=e.col}let h=this.origin(t,s,o,n);return u=h?new a(e,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,r.plugin):new a(e,void 0===o?t:{column:s,line:t},void 0===o?s:{column:n,line:o},this.css,this.file,r.plugin),u.input={column:s,endColumn:n,endLine:o,endOffset:l,line:t,offset:c,source:this.css},this.file&&(i&&(u.input.url=i(this.file).toString()),u.input.file=this.file),u}fromLineAndColumn(e,t){return f(this)[e-1]+t-1}fromOffset(e){let t=f(this),s=0;if(e>=t[t.length-1])s=t.length-1;else{let r,n=t.length-2;for(;s<n;)if(r=s+(n-s>>1),e<t[r])n=r-1;else{if(!(e>=t[r+1])){s=r;break}s=r+1}}return{col:e-t[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:s(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,s,r,n){if(!this.map)return!1;let a,l,c=this.map.consumer(),u=c.originalPositionFor({column:s,line:e});if(!u.source)return!1;"number"==typeof r&&(a=c.originalPositionFor({column:n,line:r})),l=t(u.source)?i(u.source):new URL(u.source,this.map.consumer().sourceRoot||i(this.map.mapFile));let h={column:u.column,endColumn:a&&a.column,endLine:a&&a.line,line:u.line,url:l.toString()};if("file:"===l.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");h.file=o(l)}let p=c.sourceContentFor(u.source);return p&&(h.source=p),h}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}}return Be=d,d.default=d,c&&c.registerInput&&c.registerInput(d),Be}function kt(){if(De)return ze;De=1;let e,t,s=wt();class r extends s{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(s={}){return new e(new t,this,s).stringify()}}return r.registerLazyResult=t=>{e=t},r.registerProcessor=e=>{t=e},ze=r,r.default=r,s.registerRoot(r),ze}function Ot(){if(Fe)return Le;Fe=1;let e={comma:t=>e.split(t,[","],!0),space:t=>e.split(t,[" ","\n","\t"]),split(e,t,s){let r=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let s of e)c?c=!1:"\\"===s?c=!0:a?s===l&&(a=!1):'"'===s||"'"===s?(a=!0,l=s):"("===s?i+=1:")"===s?i>0&&(i-=1):0===i&&t.includes(s)&&(o=!0),o?(""!==n&&r.push(n.trim()),n="",o=!1):n+=s;return(s||""!==n)&&r.push(n.trim()),r}};return Le=e,e.default=e,Le}function It(){if(Te)return Ne;Te=1;let e=wt(),t=Ot();class s extends e{get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}}return Ne=s,s.default=s,e.registerRule(s),Ne}function At(){if(He)return Je;He=1;let{dirname:e,relative:t,resolve:s,sep:r}=le,{SourceMapConsumer:n,SourceMapGenerator:o}=le,{pathToFileURL:i}=le,a=St(),l=Boolean(n&&o),c=Boolean(e&&s&&t&&r);return Je=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let t of this.previous()){let s,r=this.toUrl(this.path(t.file)),o=t.root||e(t.file);!1===this.mapOpts.sourcesContent?(s=new n(t.text),s.sourcesContent&&(s.sourcesContent=null)):s=t.consumer(),this.map.applySourceMap(s,r,this.toUrl(this.path(o)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else if(this.css){let e;for(;-1!==(e=this.css.lastIndexOf("/*#"));){let t=this.css.indexOf("*/",e+3);if(-1===t)break;for(;e>0&&"\n"===this.css[e-1];)e--;this.css=this.css.slice(0,e)+this.css.slice(t+2)}}}generate(){if(this.clearAnnotation(),c&&l&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=o.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new o({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 o({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(i.generated.line=s,i.generated.column=r-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),t=o.match(/\n/g),t?(s+=t.length,e=o.lastIndexOf("\n"),r=o.length-e):r+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(r){if(this.mapOpts.absolute)return r;if(60===r.charCodeAt(0))return r;if(/^\w+:\/\//.test(r))return r;let n=this.memoizedPaths.get(r);if(n)return n;let o=this.opts.to?e(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=e(s(o,this.mapOpts.annotation)));let i=t(o,r);return this.memoizedPaths.set(r,i),i}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 a(this.originalCSS,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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,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(i){let t=i(e).toString();return this.memoizedFileURLs.set(e,t),t}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;"\\"===r&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}}}function Et(){if(Qe)return Ke;Qe=1;let e=wt(),t=St(),s=function(){if(qe)return Ze;qe=1;let e=vt(),t=gt(),s=yt(),r=kt(),n=It(),o=function(){if(Ge)return Ye;Ge=1;const e="'".charCodeAt(0),t='"'.charCodeAt(0),s="\\".charCodeAt(0),r="/".charCodeAt(0),n="\n".charCodeAt(0),o=" ".charCodeAt(0),i="\f".charCodeAt(0),a="\t".charCodeAt(0),l="\r".charCodeAt(0),c="[".charCodeAt(0),u="]".charCodeAt(0),h="(".charCodeAt(0),p=")".charCodeAt(0),f="{".charCodeAt(0),d="}".charCodeAt(0),m=";".charCodeAt(0),g="*".charCodeAt(0),y=":".charCodeAt(0),w="@".charCodeAt(0),v=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,x=/.[\r\n"'(/\\]/,C=/[\da-f]/i;return Ye=function(S,k={}){let O,I,A,E,P,$,R,j,_,M,B=S.css.valueOf(),U=k.ignoreErrors,z=B.length,D=0,L=[],F=[],N=-1;function T(e){throw S.error("Unclosed "+e,D)}return{back:function(e){F.push(e)},endOfFile:function(){return 0===F.length&&D>=z},nextToken:function(S){if(F.length)return F.pop();if(D>=z)return;let k=!!S&&S.ignoreUnclosed;switch(O=B.charCodeAt(D),O){case n:case o:case a:case l:case i:E=D;do{E+=1,O=B.charCodeAt(E)}while(O===o||O===n||O===a||O===l||O===i);$=["space",B.slice(D,E)],D=E-1;break;case c:case u:case f:case d:case y:case m:case p:{let e=String.fromCharCode(O);$=[e,e,D];break}case h:if(M=L.length?L.pop()[1]:"",_=B.charCodeAt(D+1),"url"===M&&_!==e&&_!==t&&_!==o&&_!==n&&_!==a&&_!==i&&_!==l){E=D;do{if(R=!1,E=B.indexOf(")",E+1),-1===E){if(U||k){E=D;break}T("bracket")}for(j=E;B.charCodeAt(j-1)===s;)j-=1,R=!R}while(R);$=["brackets",B.slice(D,E+1),D,E],D=E}else D<=N?$=["(","(",D]:(E=B.indexOf(")",D+1),I=B.slice(D,E+1),-1===E||x.test(I)?(N=-1===E?z:E,$=["(","(",D]):($=["brackets",I,D,E],D=E));break;case e:case t:P=O===e?"'":'"',E=D;do{if(R=!1,E=B.indexOf(P,E+1),-1===E){if(U||k){E=D+1;break}T("string")}for(j=E;B.charCodeAt(j-1)===s;)j-=1,R=!R}while(R);$=["string",B.slice(D,E+1),D,E],D=E;break;case w:v.lastIndex=D+1,v.test(B),E=0===v.lastIndex?B.length-1:v.lastIndex-2,$=["at-word",B.slice(D,E+1),D,E],D=E;break;case s:for(E=D,A=!0;B.charCodeAt(E+1)===s;)E+=1,A=!A;if(O=B.charCodeAt(E+1),A&&O!==r&&O!==o&&O!==n&&O!==a&&O!==l&&O!==i&&(E+=1,C.test(B.charAt(E)))){for(;C.test(B.charAt(E+1));)E+=1;B.charCodeAt(E+1)===o&&(E+=1)}$=["word",B.slice(D,E+1),D,E],D=E;break;default:O===r&&B.charCodeAt(D+1)===g?(E=B.indexOf("*/",D+2)+1,0===E&&(U||k?E=B.length:T("comment")),$=["comment",B.slice(D,E+1),D,E],D=E):(b.lastIndex=D+1,b.test(B),E=0===b.lastIndex?B.length-1:b.lastIndex-2,$=["word",B.slice(D,E+1),D,E],L.push($),D=E)}return D++,$},position:function(){return D}}}}();const i={empty:!0,space:!0};return Ze=class{constructor(e){this.input=e,this.root=new r,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(t){let s,r,n,o=new e;o.name=t[1].slice(1),""===o.name&&this.unnamedAtrule(o,t),this.init(o,t[2]);let i=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(s=(t=this.tokenizer.nextToken())[0],"("===s||"["===s?c.push("("===s?")":"]"):"{"===s&&c.length>0?c.push("}"):s===c[c.length-1]&&c.pop(),0===c.length){if(";"===s){o.source.end=this.getPosition(t[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===s){a=!0;break}if("}"===s){if(l.length>0){for(n=l.length-1,r=l[n];r&&"space"===r[0];)r=l[--n];r&&(o.source.end=this.getPosition(r[3]||r[2]),o.source.end.offset++)}this.end(t);break}l.push(t)}else l.push(t);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(o.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(o,"params",l),i&&(t=l[l.length-1],o.source.end=this.getPosition(t[3]||t[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[o,i]of e.entries()){if(s=i,r=s[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(t){if("word"===t[0]&&"progid"===t[1])continue;return o}this.doubleColon(s)}t=s}return!1}comment(e){let s=new t;this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++;let r=e[1].slice(2,-2);if(r.trim()){let e=r.match(/^(\s*)([^]*\S)(\s*)$/);s.text=e[2],s.raws.left=e[1],s.raws.right=e[3]}else s.text="",s.raws.left=r,s.raws.right=""}createTokenizer(){this.tokenizer=o(this.input)}decl(e,t){let r=new s;this.init(r,e[0][2]);let n,o=e[e.length-1];for(";"===o[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(o[3]||o[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(n=e.shift(),":"===n[0]){r.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let i,a=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(n=e[t],"!important"===n[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===n[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(n.trim().startsWith("!")&&"space"!==t)break;n=s.pop()[1]+n}n.trim().startsWith("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==n[0]&&"comment"!==n[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(r.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.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 n;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&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}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="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),o.push("("===s?")":"]");else if(i&&r&&"{"===s)n||(n=l),o.push("}");else if(0===o.length){if(";"===s){if(r)return void this.decl(a,i);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&r){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}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)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let n,o,a,l,c=s.length,u="",h=!0;for(let e=0;e<c;e+=1)n=s[e],o=n[0],"space"!==o||e!==c-1||r?"comment"===o?(l=s[e-1]?s[e-1][0]:"empty",a=s[e+1]?s[e+1][0]:"empty",i[l]||i[a]||","===u.slice(-1)?h=!1:u+=n[1]):u+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:u}}e[t]=u}rule(e){e.pop();let t=new n;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}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 "+e[0][1],{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})}}}();function r(e,r){let n=new t(e,r),o=new s(n);try{o.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&r&&r.from&&(/\.scss$/i.test(r.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(r.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(r.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return o.root}return Ke=r,r.default=r,e.registerParse(r),Ke}function Pt(){if(et)return Xe;et=1;class e{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}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 Xe=e,e.default=e,Xe}function $t(){if(st)return tt;st=1;let e=Pt();class t{get content(){return this.css}constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(t,s={}){s.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(s.plugin=this.lastPlugin.postcssPlugin);let r=new e(t,s);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}}return tt=t,t.default=t,tt}function Rt(){if(nt)return rt;nt=1;let e={};return rt=function(t){e[t]||(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}function jt(){if(it)return ot;it=1;let e=wt(),t=bt(),s=At(),r=Et(),n=$t(),o=kt(),i=ye(),{isClean:a,my:l}=dt(),c=Rt();const u={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},p={Once:!0,postcssPlugin:!0,prepare:!0};function f(e){return"object"==typeof e&&"function"==typeof e.then}function d(e){let t=!1,s=u[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function m(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:d(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function g(e){return e[a]=!1,e.nodes&&e.nodes.forEach(e=>g(e)),e}let y={};class w{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(t,s,o){let i;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof w||s instanceof n)i=g(s.root),s.map&&(void 0===o.map&&(o.map={}),o.map.inline||(o.map.inline=!1),o.map.prev=s.map);else{let t=r;o.syntax&&(t=o.syntax.parse),o.parser&&(t=o.parser),t.parse&&(t=t.parse);try{i=t(s,o)}catch(e){this.processed=!0,this.error=e}i&&!i[l]&&e.rebuild(i)}else i=g(s);this.result=new n(t,i,o),this.helpers={...y,postcss:y,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}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 s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),o=r.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!h[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!p[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}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],s=this.runOnRoot(t);if(f(s))try{await s}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[a];){e[a]=!0;let t=[m(e)];for(;t.length>0;){let e=this.visitTick(t);if(f(e))try{await e}catch(e){let s=t[t.length-1].node;throw this.handleError(e,s)}}}if(this.listeners.OnceExit)for(let[t,s]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>s(e,this.helpers));await Promise.all(t)}else await s(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=i;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=this.result.root.source;if(void 0===e.map&&!(r&&r.input&&r.input.map)){let e="";return t(this.result.root,t=>{e+=t}),this.result.css=e,this.result}let n=new s(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[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)if(f(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[a];)e[a]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)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"production"!==process.env.NODE_ENV&&("from"in this.opts||c("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[s,r]of e){let e;this.result.lastPlugin=s;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(f(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(e){throw this.handleError(e,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[a])return r[a]=!0,void e.push(m(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[a]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[a]=!0;let t=d(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[a]||this.walkSync(e)});else{let t=this.listeners[s];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}}return w.registerPostcss=e=>{y=e},ot=w,w.default=w,o.registerLazyResult(w),t.registerLazyResult(w),ot}const _t=re(function(){if(pt)return ht;pt=1;let e=vt(),t=gt(),s=wt(),r=me(),n=yt(),o=bt(),i=function(){if(We)return Ve;We=1;let e=vt(),t=gt(),s=yt(),r=St(),n=Ct(),o=kt(),i=It();function a(l,c){if(Array.isArray(l))return l.map(e=>a(e));let{inputs:u,...h}=l;if(u){c=[];for(let e of u){let t={...e,__proto__:r.prototype};t.map&&(t.map={...t.map,__proto__:n.prototype}),c.push(t)}}if(h.nodes&&(h.nodes=l.nodes.map(e=>a(e,c))),h.source){let{inputId:e,...t}=h.source;h.source=t,null!=e&&(h.source.input=c[e])}if("root"===h.type)return new o(h);if("decl"===h.type)return new s(h);if("rule"===h.type)return new i(h);if("comment"===h.type)return new t(h);if("atrule"===h.type)return new e(h);throw new Error("Unknown node type: "+l.type)}return Ve=a,a.default=a,Ve}(),a=St(),l=jt(),c=Ot(),u=mt(),h=Et(),p=function(){if(ut)return ct;ut=1;let e=bt(),t=jt(),s=function(){if(lt)return at;lt=1;let e=At(),t=Et(),s=$t(),r=ye(),n=Rt();class o{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,s=t;try{e=s(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,n,o){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=o,this._map=void 0;let i=r;this.result=new s(this._processor,void 0,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get:()=>a.root});let l=new e(i,void 0,this._opts,n);if(l.isMap()){let[e,t]=l.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else l.clearAnnotation(),this.result.css=l.css}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"production"!==process.env.NODE_ENV&&("from"in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}}return at=o,o.default=o,at}(),r=kt();class n{constructor(e=[]){this.version="8.5.14",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,r={}){return this.plugins.length||r.parser||r.stringifier||r.syntax?new t(this,e,r):new s(this,e,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return ct=n,n.default=n,r.registerProcessor(n),e.registerProcessor(n),ct}(),f=$t(),d=kt(),m=It(),g=ye(),y=Pt();function w(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new p(e)}return w.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...s);return n.postcssPlugin=e,n.postcssVersion=(new p).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return w([n(s)]).process(e,t)},n},w.stringify=g,w.parse=h,w.fromJSON=i,w.list=c,w.comment=e=>new t(e),w.atRule=t=>new e(t),w.decl=e=>new n(e),w.rule=e=>new m(e),w.root=e=>new d(e),w.document=e=>new o(e),w.CssSyntaxError=r,w.Declaration=n,w.Container=s,w.Processor=p,w.Document=o,w.Comment=t,w.Warning=y,w.AtRule=e,w.Result=f,w.Input=a,w.Rule=m,w.Root=d,w.Node=u,l.registerPostcss(w),ht=w,w.default=w,ht}());_t.stringify,_t.fromJSON,_t.plugin,_t.parse,_t.list,_t.document,_t.comment,_t.atRule,_t.rule,_t.decl,_t.root,_t.CssSyntaxError,_t.Declaration,_t.Container,_t.Processor,_t.Document,_t.Comment,_t.Warning,_t.AtRule,_t.Result,_t.Input,_t.Rule,_t.Root,_t.Node;const Mt=new Set(["body","html",":root","*"]);function Bt(e,t){return e&&e.trim()?_t([(s=`[data-vbi-type="${t}"]`,{postcssPlugin:"hc-scope",AtRule(e){if("import"===e.name)return console.warn("[hc-css-scope] @import 已被拒绝(防外部资源加载):",e.params),void e.remove();"font-face"===e.name&&console.warn("[hc-css-scope] @font-face 全局生效,font-family 命名注意冲突")},Rule(e){(function(e){let t=e.parent;for(;t&&"object"==typeof t;){const e=t;if("atrule"===e.type&&/keyframes$/i.test(e.name??""))return!0;t=e.parent}return!1})(e)||(e.selectors=e.selectors.map(e=>function(e,t){const s=e.trim();if(!s)return s;if(Mt.has(s))return t;for(const e of Mt){const r=s.charAt(e.length);if(s.startsWith(e)&&(" "===r||">"===r||"+"===r||"~"===r||","===r))return t+s.slice(e.length)}return`${t} ${s}`}(e,s)))}})]).process(e,{from:void 0}).css:"";var s}const Ut=new Map;function zt(e){let t=5381;for(let s=0;s<e.length;s++)t=(t<<5)+t+e.charCodeAt(s)|0;return(t>>>0).toString(36)}function Dt(e){const t=e.replace(/[^a-zA-Z0-9_-]/g,"_");return t===e?`hc-style-${t}`:`hc-style-${t}-${zt(e).slice(0,6)}`}function Lt(e,t){var s;const r=t??"",n=Dt(e),o=Ut.get(e);if(!r.trim())return null==(s=document.getElementById(n))||s.remove(),void(o&&Ut.set(e,{...o,cssHash:""}));const i=zt(r);if(o&&o.cssHash===i)return;let a;try{a=Bt(r,e)}catch(t){return void console.warn("[hc-css-scope]",e,"PostCSS process failed:",t)}!function(e,t){const s=Dt(e);let r=document.getElementById(s);r||(r=document.createElement("style"),r.id=s,r.setAttribute("data-hc-scope",e),document.head.appendChild(r)),r.textContent=t}(e,a),o?Ut.set(e,{...o,cssHash:i}):Ut.set(e,{cssHash:i,refCount:0})}function Ft(e,t){Lt(e,t);const s=Ut.get(e);s?Ut.set(e,{...s,refCount:s.refCount+1}):Ut.set(e,{cssHash:"",refCount:1})}function Nt(e){var t;const s=Ut.get(e);if(!s)return;const r=s.refCount-1;r<=0?(null==(t=document.getElementById(Dt(e)))||t.remove(),Ut.delete(e)):Ut.set(e,{...s,refCount:r})}function Tt(e){var t;null==(t=document.getElementById(Dt(e)))||t.remove(),Ut.delete(e)}function Vt(){return Ut.size}function Wt(){return[...Ut.entries()].map(([e,t])=>({scopeId:e,componentId:e,refCount:t.refCount,cssHash:t.cssHash}))}const Jt={key:1,class:"rounded-md border-2 border-rose-300 bg-rose-50 p-4 text-sm text-rose-900 space-y-2 min-h-[140px] overflow-auto"},Ht={class:"font-semibold flex items-center gap-1.5"},Yt={class:"font-mono text-xs text-rose-800 break-all"},Gt={key:0,class:"text-[10px] font-mono bg-rose-100/60 p-2 rounded overflow-auto max-h-60 text-rose-800"},Zt=s({__name:"ErrorBoundary",props:{label:{}},setup(e){const s=e,u=t(null),h=t(0),p=t(!1);function f(){u.value=null,p.value=!1,h.value++}return r(e=>(console.error(`[hc-eb${s.label?" "+s.label:""}]`,e),u.value=e,!1)),(t,s)=>(n(),o("div",{key:h.value,class:"hc-eb-root",style:{width:"100%",height:"100%"}},[u.value?(n(),o("div",Jt,[a("div",Ht,[s[1]||(s[1]=a("span",null,"⚠️",-1)),a("span",null,"组件渲染失败"+l(e.label?` — ${e.label}`:""),1)]),a("div",Yt,l(u.value.message),1),a("button",{class:"text-xs text-rose-700 hover:text-rose-900 underline",onClick:s[0]||(s[0]=e=>p.value=!p.value)},l(p.value?"隐藏":"展开")+"堆栈 ",1),p.value?(n(),o("pre",Gt,l(u.value.stack),1)):c("",!0),a("button",{class:"text-xs px-3 py-1 rounded bg-rose-600 hover:bg-rose-700 text-white transition-colors",onClick:f}," 重试 ")])):i(t.$slots,"default",{key:0})]))}}),qt=["data-vbi-id","data-vbi-type","data-vbi-canvas"],Kt={key:0,class:"rounded-md border-2 border-amber-300 bg-amber-50 p-4 text-sm text-amber-900 space-y-2 min-h-[140px] overflow-auto"},Qt={class:"text-[11px] font-mono break-all whitespace-pre-wrap"},Xt={key:1,class:"grid place-items-center min-h-[140px] text-xs text-zinc-400"},es=s({__name:"RuntimeBox",props:{instanceId:{},componentId:{},scopeId:{},canvasId:{},htmlSource:{},jsSource:{},cssSource:{default:""},customValues:{default:()=>({})},position:{},size:{},zIndex:{}},setup(e){const s=e,r=u(()=>s.scopeId??s.componentId),i=h(S,null),v=u(()=>s.canvasId??i??C),b=p(null),x=t(null),k=t(!1),O=t(0);f(()=>[s.htmlSource,s.jsSource],()=>{!async function(){k.value=!0,x.value=null;try{const e=await ee({html:s.htmlSource,js:s.jsSource});b.value=e,O.value++}catch(e){x.value=e instanceof Error?e:new Error(String(e)),b.value=null}finally{k.value=!1}}()},{immediate:!0});let I=!1;f(()=>[s.cssSource,r.value],([e,t],s)=>{const r=(null==s?void 0:s[1])??null;r&&r!==t?(Nt(r),Ft(t,e),I=!0):I?Lt(t,e):(Ft(t,e),I=!0)},{immediate:!0});const A=u(()=>{const e={width:"100%",height:"100%"};return s.position&&(e.position="absolute",e.left=`${s.position.x}px`,e.top=`${s.position.y}px`),void 0!==s.zIndex&&(e.zIndex=String(s.zIndex)),e});return d(()=>{I&&(Nt(r.value),I=!1)}),(t,s)=>(n(),o("div",{class:"_vbi_box","data-vbi-id":e.instanceId,"data-vbi-type":r.value,"data-vbi-canvas":v.value,style:m(A.value)},[x.value?(n(),o("div",Kt,[s[0]||(s[0]=a("div",{class:"font-semibold"},"⚠️ 编译失败",-1)),a("pre",Qt,l(x.value.message),1)])):k.value&&!b.value?(n(),o("div",Xt," 编译中… ")):b.value?(n(),g(Zt,{key:O.value,label:e.instanceId},{default:y(()=>[(n(),g(w(b.value.options),{"hc-custom-values":e.customValues,"hc-instance-id":e.instanceId,"hc-canvas-id":v.value,"hc-component-id":e.componentId},null,8,["hc-custom-values","hc-instance-id","hc-canvas-id","hc-component-id"]))]),_:1},8,["label"])):c("",!0)],12,qt))}}),ts="0.0.0-stage2b";export{C as DEFAULT_CANVAS_ID,Zt as ErrorBoundary,S as HC_CANVAS_ID_KEY,G as HC_INJECT_KEY,es as RuntimeBox,ts as VERSION,D as __resetLifecycleEmitter,z as __resetRegistry,F as assets,Ft as attachScope,te as clearCompileCache,ee as compileComponent,T as createCanvasesRegistry,W as createHyperCard,Wt as debugScopedCssRefs,Nt as detachScope,R as disposeCanvas,se as getCompileCacheSize,B as getInstance,Vt as getScopedCssCount,Lt as injectScopedCss,J as isVuePlugin,j as listCanvasIds,U as listInstances,I as onInstanceLifecycle,b as parseComponentSource,_ as register,$ as registerInCanvas,k as registryVersion,Tt as removeScopedCss,L as runtime,Bt as scopeCss,M as unregister};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hy-bricks/core",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "HyperCard 运行时核心 — 编译用户源码 / CSS scope / 实例注册表 / 跨实例 SDK / JS 静态解析",
5
5
  "keywords": [
6
6
  "hypercard",