satori 0.4.6 → 0.4.7
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 +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.wasm.cjs +1 -1
- package/dist/index.wasm.cjs.map +1 -1
- package/dist/index.wasm.js +1 -1
- package/dist/index.wasm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2,6 +2,6 @@ var al=Object.create;var yr=Object.defineProperty;var ul=Object.getOwnPropertyDe
|
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return n=e[Symbol.iterator](),n.next.bind(n)}function zf(e,t){if(!!e){if(typeof e=="string")return Us(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Us(e,t)}}function Us(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gf(e,t,n){return t&&zs(e.prototype,t),n&&zs(e,n),e}function jf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Vn(e,t)}function Vn(e,t){return Vn=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Vn(e,t)}var Vf=function(e){jf(t,e);function t(r){var i;return i=e.call(this,r)||this,i.nodes||(i.nodes=[]),i}var n=t.prototype;return n.append=function(i){return i.parent=this,this.nodes.push(i),this},n.prepend=function(i){return i.parent=this,this.nodes.unshift(i),this},n.at=function(i){return this.nodes[i]},n.index=function(i){return typeof i=="number"?i:this.nodes.indexOf(i)},n.removeChild=function(i){i=this.index(i),this.at(i).parent=void 0,this.nodes.splice(i,1);var s;for(var o in this.indexes)s=this.indexes[o],s>=i&&(this.indexes[o]=s-1);return this},n.removeAll=function(){for(var i=Uf(this.nodes),s;!(s=i()).done;){var o=s.value;o.parent=void 0}return this.nodes=[],this},n.empty=function(){return this.removeAll()},n.insertAfter=function(i,s){s.parent=this;var o=this.index(i);this.nodes.splice(o+1,0,s),s.parent=this;var a;for(var u in this.indexes)a=this.indexes[u],o<=a&&(this.indexes[u]=a+1);return this},n.insertBefore=function(i,s){s.parent=this;var o=this.index(i);this.nodes.splice(o,0,s),s.parent=this;var a;for(var u in this.indexes)a=this.indexes[u],a<=o&&(this.indexes[u]=a+1);return this},n._findChildAtPosition=function(i,s){var o=void 0;return this.each(function(a){if(a.atPosition){var u=a.atPosition(i,s);if(u)return o=u,!1}else if(a.isAtPosition(i,s))return o=a,!1}),o},n.atPosition=function(i,s){if(this.isAtPosition(i,s))return this._findChildAtPosition(i,s)||this},n._inferEndPosition=function(){this.last&&this.last.source&&this.last.source.end&&(this.source=this.source||{},this.source.end=this.source.end||{},Object.assign(this.source.end,this.last.source.end))},n.each=function(i){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var s=this.lastEach;if(this.indexes[s]=0,!!this.length){for(var o,a;this.indexes[s]<this.length&&(o=this.indexes[s],a=i(this.at(o),o),a!==!1);)this.indexes[s]+=1;if(delete this.indexes[s],a===!1)return!1}},n.walk=function(i){return this.each(function(s,o){var a=i(s,o);if(a!==!1&&s.length&&(a=s.walk(i)),a===!1)return!1})},n.walkAttributes=function(i){var s=this;return this.walk(function(o){if(o.type===Me.ATTRIBUTE)return i.call(s,o)})},n.walkClasses=function(i){var s=this;return this.walk(function(o){if(o.type===Me.CLASS)return i.call(s,o)})},n.walkCombinators=function(i){var s=this;return this.walk(function(o){if(o.type===Me.COMBINATOR)return i.call(s,o)})},n.walkComments=function(i){var s=this;return this.walk(function(o){if(o.type===Me.COMMENT)return i.call(s,o)})},n.walkIds=function(i){var s=this;return this.walk(function(o){if(o.type===Me.ID)return i.call(s,o)})},n.walkNesting=function(i){var s=this;return this.walk(function(o){if(o.type===Me.NESTING)return i.call(s,o)})},n.walkPseudos=function(i){var s=this;return this.walk(function(o){if(o.type===Me.PSEUDO)return i.call(s,o)})},n.walkTags=function(i){var s=this;return this.walk(function(o){if(o.type===Me.TAG)return i.call(s,o)})},n.walkUniversals=function(i){var s=this;return this.walk(function(o){if(o.type===Me.UNIVERSAL)return i.call(s,o)})},n.split=function(i){var s=this,o=[];return this.reduce(function(a,u,l){var f=i.call(s,u);return o.push(u),f?(a.push(o),o=[]):l===s.length-1&&a.push(o),a},[])},n.map=function(i){return this.nodes.map(i)},n.reduce=function(i,s){return this.nodes.reduce(i,s)},n.every=function(i){return this.nodes.every(i)},n.some=function(i){return this.nodes.some(i)},n.filter=function(i){return this.nodes.filter(i)},n.sort=function(i){return this.nodes.sort(i)},n.toString=function(){return this.map(String).join("")},Gf(t,[{key:"first",get:function(){return this.at(0)}},{key:"last",get:function(){return this.at(this.length-1)}},{key:"length",get:function(){return this.nodes.length}}]),t}($f.default);Nt.default=Vf;js.exports=Nt.default});var Yn=I((Mt,Hs)=>{"use strict";c();Mt.__esModule=!0;Mt.default=void 0;var Hf=Xf(Ur()),Yf=se();function Xf(e){return e&&e.__esModule?e:{default:e}}function Vs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qf(e,t,n){return t&&Vs(e.prototype,t),n&&Vs(e,n),e}function Kf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Hn(e,t)}function Hn(e,t){return Hn=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Hn(e,t)}var Jf=function(e){Kf(t,e);function t(r){var i;return i=e.call(this,r)||this,i.type=Yf.ROOT,i}var n=t.prototype;return n.toString=function(){var i=this.reduce(function(s,o){return s.push(String(o)),s},[]).join(",");return this.trailingComma?i+",":i},n.error=function(i,s){return this._error?this._error(i,s):new Error(i)},Qf(t,[{key:"errorGenerator",set:function(i){this._error=i}}]),t}(Hf.default);Mt.default=Jf;Hs.exports=Mt.default});var Qn=I((Wt,Ys)=>{"use strict";c();Wt.__esModule=!0;Wt.default=void 0;var Zf=tc(Ur()),ec=se();function tc(e){return e&&e.__esModule?e:{default:e}}function rc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Xn(e,t)}function Xn(e,t){return Xn=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Xn(e,t)}var nc=function(e){rc(t,e);function t(n){var r;return r=e.call(this,n)||this,r.type=ec.SELECTOR,r}return t}(Zf.default);Wt.default=nc;Ys.exports=Wt.default});var zr=I((Ug,Xs)=>{"use strict";c();var ic={},oc=ic.hasOwnProperty,sc=function(t,n){if(!t)return n;var r={};for(var i in n)r[i]=oc.call(t,i)?t[i]:n[i];return r},ac=/[ -,\.\/:-@\[-\^`\{-~]/,uc=/[ -,\.\/:-@\[\]\^`\{-~]/,lc=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,Kn=function e(t,n){n=sc(n,e.options),n.quotes!="single"&&n.quotes!="double"&&(n.quotes="single");for(var r=n.quotes=="double"?'"':"'",i=n.isIdentifier,s=t.charAt(0),o="",a=0,u=t.length;a<u;){var l=t.charAt(a++),f=l.charCodeAt(),d=void 0;if(f<32||f>126){if(f>=55296&&f<=56319&&a<u){var g=t.charCodeAt(a++);(g&64512)==56320?f=((f&1023)<<10)+(g&1023)+65536:a--}d="\\"+f.toString(16).toUpperCase()+" "}else n.escapeEverything?ac.test(l)?d="\\"+l:d="\\"+f.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(l)?d="\\"+f.toString(16).toUpperCase()+" ":l=="\\"||!i&&(l=='"'&&r==l||l=="'"&&r==l)||i&&uc.test(l)?d="\\"+l:d=l;o+=d}return i&&(/^-[-\d]/.test(o)?o="\\-"+o.slice(1):/\d/.test(s)&&(o="\\3"+s+" "+o.slice(1))),o=o.replace(lc,function(h,p,v){return p&&p.length%2?h:(p||"")+v}),!i&&n.wrap?r+o+r:o};Kn.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};Kn.version="3.0.0";Xs.exports=Kn});var Zn=I(($t,Js)=>{"use strict";c();$t.__esModule=!0;$t.default=void 0;var fc=Ks(zr()),cc=Dt(),dc=Ks(Ne()),pc=se();function Ks(e){return e&&e.__esModule?e:{default:e}}function Qs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hc(e,t,n){return t&&Qs(e.prototype,t),n&&Qs(e,n),e}function mc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Jn(e,t)}function Jn(e,t){return Jn=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Jn(e,t)}var gc=function(e){mc(t,e);function t(r){var i;return i=e.call(this,r)||this,i.type=pc.CLASS,i._constructed=!0,i}var n=t.prototype;return n.valueToString=function(){return"."+e.prototype.valueToString.call(this)},hc(t,[{key:"value",get:function(){return this._value},set:function(i){if(this._constructed){var s=(0,fc.default)(i,{isIdentifier:!0});s!==i?((0,cc.ensureObject)(this,"raws"),this.raws.value=s):this.raws&&delete this.raws.value}this._value=i}}]),t}(dc.default);$t.default=gc;Js.exports=$t.default});var ti=I((qt,Zs)=>{"use strict";c();qt.__esModule=!0;qt.default=void 0;var vc=yc(Ne()),bc=se();function yc(e){return e&&e.__esModule?e:{default:e}}function xc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ei(e,t)}function ei(e,t){return ei=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},ei(e,t)}var wc=function(e){xc(t,e);function t(n){var r;return r=e.call(this,n)||this,r.type=bc.COMMENT,r}return t}(vc.default);qt.default=wc;Zs.exports=qt.default});var ni=I((Bt,ea)=>{"use strict";c();Bt.__esModule=!0;Bt.default=void 0;var _c=kc(Ne()),Sc=se();function kc(e){return e&&e.__esModule?e:{default:e}}function Tc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ri(e,t)}function ri(e,t){return ri=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},ri(e,t)}var Oc=function(e){Tc(t,e);function t(r){var i;return i=e.call(this,r)||this,i.type=Sc.ID,i}var n=t.prototype;return n.valueToString=function(){return"#"+e.prototype.valueToString.call(this)},t}(_c.default);Bt.default=Oc;ea.exports=Bt.default});var Gr=I((Ut,na)=>{"use strict";c();Ut.__esModule=!0;Ut.default=void 0;var Ec=ra(zr()),Pc=Dt(),Ac=ra(Ne());function ra(e){return e&&e.__esModule?e:{default:e}}function ta(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ic(e,t,n){return t&&ta(e.prototype,t),n&&ta(e,n),e}function Rc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ii(e,t)}function ii(e,t){return ii=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},ii(e,t)}var Lc=function(e){Rc(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.qualifiedName=function(i){return this.namespace?this.namespaceString+"|"+i:i},n.valueToString=function(){return this.qualifiedName(e.prototype.valueToString.call(this))},Ic(t,[{key:"namespace",get:function(){return this._namespace},set:function(i){if(i===!0||i==="*"||i==="&"){this._namespace=i,this.raws&&delete this.raws.namespace;return}var s=(0,Ec.default)(i,{isIdentifier:!0});this._namespace=i,s!==i?((0,Pc.ensureObject)(this,"raws"),this.raws.namespace=s):this.raws&&delete this.raws.namespace}},{key:"ns",get:function(){return this._namespace},set:function(i){this.namespace=i}},{key:"namespaceString",get:function(){if(this.namespace){var i=this.stringifyProperty("namespace");return i===!0?"":i}else return""}}]),t}(Ac.default);Ut.default=Lc;na.exports=Ut.default});var si=I((zt,ia)=>{"use strict";c();zt.__esModule=!0;zt.default=void 0;var Cc=Fc(Gr()),Dc=se();function Fc(e){return e&&e.__esModule?e:{default:e}}function Nc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,oi(e,t)}function oi(e,t){return oi=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},oi(e,t)}var Mc=function(e){Nc(t,e);function t(n){var r;return r=e.call(this,n)||this,r.type=Dc.TAG,r}return t}(Cc.default);zt.default=Mc;ia.exports=zt.default});var ui=I((Gt,oa)=>{"use strict";c();Gt.__esModule=!0;Gt.default=void 0;var Wc=qc(Ne()),$c=se();function qc(e){return e&&e.__esModule?e:{default:e}}function Bc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ai(e,t)}function ai(e,t){return ai=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},ai(e,t)}var Uc=function(e){Bc(t,e);function t(n){var r;return r=e.call(this,n)||this,r.type=$c.STRING,r}return t}(Wc.default);Gt.default=Uc;oa.exports=Gt.default});var fi=I((jt,sa)=>{"use strict";c();jt.__esModule=!0;jt.default=void 0;var zc=jc(Ur()),Gc=se();function jc(e){return e&&e.__esModule?e:{default:e}}function Vc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,li(e,t)}function li(e,t){return li=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},li(e,t)}var Hc=function(e){Vc(t,e);function t(r){var i;return i=e.call(this,r)||this,i.type=Gc.PSEUDO,i}var n=t.prototype;return n.toString=function(){var i=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),i,this.rawSpaceAfter].join("")},t}(zc.default);jt.default=Hc;sa.exports=jt.default});var ua=I((zg,aa)=>{c();aa.exports=function(t,n){return function(...r){return console.warn(n),t(...r)}}});var gi=I(Yt=>{"use strict";c();Yt.__esModule=!0;Yt.unescapeValue=mi;Yt.default=void 0;var Vt=hi(zr()),Yc=hi(jn()),Xc=hi(Gr()),Qc=se(),ci;function hi(e){return e&&e.__esModule?e:{default:e}}function la(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kc(e,t,n){return t&&la(e.prototype,t),n&&la(e,n),e}function Jc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,pi(e,t)}function pi(e,t){return pi=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},pi(e,t)}var Ht=ua(),Zc=/^('|")([^]*)\1$/,ed=Ht(function(){},"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."),td=Ht(function(){},"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."),rd=Ht(function(){},"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");function mi(e){var t=!1,n=null,r=e,i=r.match(Zc);return i&&(n=i[1],r=i[2]),r=(0,Yc.default)(r),r!==e&&(t=!0),{deprecatedUsage:t,unescaped:r,quoteMark:n}}function nd(e){if(e.quoteMark!==void 0||e.value===void 0)return e;rd();var t=mi(e.value),n=t.quoteMark,r=t.unescaped;return e.raws||(e.raws={}),e.raws.value===void 0&&(e.raws.value=e.value),e.value=r,e.quoteMark=n,e}var jr=function(e){Jc(t,e);function t(r){var i;return r===void 0&&(r={}),i=e.call(this,nd(r))||this,i.type=Qc.ATTRIBUTE,i.raws=i.raws||{},Object.defineProperty(i.raws,"unquoted",{get:Ht(function(){return i.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:Ht(function(){return i.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")}),i._constructed=!0,i}var n=t.prototype;return n.getQuotedValue=function(i){i===void 0&&(i={});var s=this._determineQuoteMark(i),o=di[s],a=(0,Vt.default)(this._value,o);return a},n._determineQuoteMark=function(i){return i.smart?this.smartQuoteMark(i):this.preferredQuoteMark(i)},n.setValue=function(i,s){s===void 0&&(s={}),this._value=i,this._quoteMark=this._determineQuoteMark(s),this._syncRawValue()},n.smartQuoteMark=function(i){var s=this.value,o=s.replace(/[^']/g,"").length,a=s.replace(/[^"]/g,"").length;if(o+a===0){var u=(0,Vt.default)(s,{isIdentifier:!0});if(u===s)return t.NO_QUOTE;var l=this.preferredQuoteMark(i);if(l===t.NO_QUOTE){var f=this.quoteMark||i.quoteMark||t.DOUBLE_QUOTE,d=di[f],g=(0,Vt.default)(s,d);if(g.length<u.length)return f}return l}else return a===o?this.preferredQuoteMark(i):a<o?t.DOUBLE_QUOTE:t.SINGLE_QUOTE},n.preferredQuoteMark=function(i){var s=i.preferCurrentQuoteMark?this.quoteMark:i.quoteMark;return s===void 0&&(s=i.preferCurrentQuoteMark?i.quoteMark:this.quoteMark),s===void 0&&(s=t.DOUBLE_QUOTE),s},n._syncRawValue=function(){var i=(0,Vt.default)(this._value,di[this.quoteMark]);i===this._value?this.raws&&delete this.raws.value:this.raws.value=i},n._handleEscapes=function(i,s){if(this._constructed){var o=(0,Vt.default)(s,{isIdentifier:!0});o!==s?this.raws[i]=o:delete this.raws[i]}},n._spacesFor=function(i){var s={before:"",after:""},o=this.spaces[i]||{},a=this.raws.spaces&&this.raws.spaces[i]||{};return Object.assign(s,o,a)},n._stringFor=function(i,s,o){s===void 0&&(s=i),o===void 0&&(o=fa);var a=this._spacesFor(s);return o(this.stringifyProperty(i),a)},n.offsetOf=function(i){var s=1,o=this._spacesFor("attribute");if(s+=o.before.length,i==="namespace"||i==="ns")return this.namespace?s:-1;if(i==="attributeNS"||(s+=this.namespaceString.length,this.namespace&&(s+=1),i==="attribute"))return s;s+=this.stringifyProperty("attribute").length,s+=o.after.length;var a=this._spacesFor("operator");s+=a.before.length;var u=this.stringifyProperty("operator");if(i==="operator")return u?s:-1;s+=u.length,s+=a.after.length;var l=this._spacesFor("value");s+=l.before.length;var f=this.stringifyProperty("value");if(i==="value")return f?s:-1;s+=f.length,s+=l.after.length;var d=this._spacesFor("insensitive");return s+=d.before.length,i==="insensitive"&&this.insensitive?s:-1},n.toString=function(){var i=this,s=[this.rawSpaceBefore,"["];return s.push(this._stringFor("qualifiedAttribute","attribute")),this.operator&&(this.value||this.value==="")&&(s.push(this._stringFor("operator")),s.push(this._stringFor("value")),s.push(this._stringFor("insensitiveFlag","insensitive",function(o,a){return o.length>0&&!i.quoted&&a.before.length===0&&!(i.spaces.value&&i.spaces.value.after)&&(a.before=" "),fa(o,a)}))),s.push("]"),s.push(this.rawSpaceAfter),s.join("")},Kc(t,[{key:"quoted",get:function(){var i=this.quoteMark;return i==="'"||i==='"'},set:function(i){td()}},{key:"quoteMark",get:function(){return this._quoteMark},set:function(i){if(!this._constructed){this._quoteMark=i;return}this._quoteMark!==i&&(this._quoteMark=i,this._syncRawValue())}},{key:"qualifiedAttribute",get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function(){return this.insensitive?"i":""}},{key:"value",get:function(){return this._value},set:function(i){if(this._constructed){var s=mi(i),o=s.deprecatedUsage,a=s.unescaped,u=s.quoteMark;if(o&&ed(),a===this._value&&u===this._quoteMark)return;this._value=a,this._quoteMark=u,this._syncRawValue()}else this._value=i}},{key:"attribute",get:function(){return this._attribute},set:function(i){this._handleEscapes("attribute",i),this._attribute=i}}]),t}(Xc.default);Yt.default=jr;jr.NO_QUOTE=null;jr.SINGLE_QUOTE="'";jr.DOUBLE_QUOTE='"';var di=(ci={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}},ci[null]={isIdentifier:!0},ci);function fa(e,t){return""+t.before+e+t.after}});var bi=I((Xt,ca)=>{"use strict";c();Xt.__esModule=!0;Xt.default=void 0;var id=sd(Gr()),od=se();function sd(e){return e&&e.__esModule?e:{default:e}}function ad(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,vi(e,t)}function vi(e,t){return vi=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},vi(e,t)}var ud=function(e){ad(t,e);function t(n){var r;return r=e.call(this,n)||this,r.type=od.UNIVERSAL,r.value="*",r}return t}(id.default);Xt.default=ud;ca.exports=Xt.default});var xi=I((Qt,da)=>{"use strict";c();Qt.__esModule=!0;Qt.default=void 0;var ld=cd(Ne()),fd=se();function cd(e){return e&&e.__esModule?e:{default:e}}function dd(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,yi(e,t)}function yi(e,t){return yi=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},yi(e,t)}var pd=function(e){dd(t,e);function t(n){var r;return r=e.call(this,n)||this,r.type=fd.COMBINATOR,r}return t}(ld.default);Qt.default=pd;da.exports=Qt.default});var _i=I((Kt,pa)=>{"use strict";c();Kt.__esModule=!0;Kt.default=void 0;var hd=gd(Ne()),md=se();function gd(e){return e&&e.__esModule?e:{default:e}}function vd(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,wi(e,t)}function wi(e,t){return wi=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},wi(e,t)}var bd=function(e){vd(t,e);function t(n){var r;return r=e.call(this,n)||this,r.type=md.NESTING,r.value="&",r}return t}(hd.default);Kt.default=bd;pa.exports=Kt.default});var ma=I((Vr,ha)=>{"use strict";c();Vr.__esModule=!0;Vr.default=yd;function yd(e){return e.sort(function(t,n){return t-n})}ha.exports=Vr.default});var Si=I(P=>{"use strict";c();P.__esModule=!0;P.combinator=P.word=P.comment=P.str=P.tab=P.newline=P.feed=P.cr=P.backslash=P.bang=P.slash=P.doubleQuote=P.singleQuote=P.space=P.greaterThan=P.pipe=P.equals=P.plus=P.caret=P.tilde=P.dollar=P.closeSquare=P.openSquare=P.closeParenthesis=P.openParenthesis=P.semicolon=P.colon=P.comma=P.at=P.asterisk=P.ampersand=void 0;var xd=38;P.ampersand=xd;var wd=42;P.asterisk=wd;var _d=64;P.at=_d;var Sd=44;P.comma=Sd;var kd=58;P.colon=kd;var Td=59;P.semicolon=Td;var Od=40;P.openParenthesis=Od;var Ed=41;P.closeParenthesis=Ed;var Pd=91;P.openSquare=Pd;var Ad=93;P.closeSquare=Ad;var Id=36;P.dollar=Id;var Rd=126;P.tilde=Rd;var Ld=94;P.caret=Ld;var Cd=43;P.plus=Cd;var Dd=61;P.equals=Dd;var Fd=124;P.pipe=Fd;var Nd=62;P.greaterThan=Nd;var Md=32;P.space=Md;var ga=39;P.singleQuote=ga;var Wd=34;P.doubleQuote=Wd;var $d=47;P.slash=$d;var qd=33;P.bang=qd;var Bd=92;P.backslash=Bd;var Ud=13;P.cr=Ud;var zd=12;P.feed=zd;var Gd=10;P.newline=Gd;var jd=9;P.tab=jd;var Vd=ga;P.str=Vd;var Hd=-1;P.comment=Hd;var Yd=-2;P.word=Yd;var Xd=-3;P.combinator=Xd});var ya=I(Jt=>{"use strict";c();Jt.__esModule=!0;Jt.default=rp;Jt.FIELDS=void 0;var T=Qd(Si()),ct,Y;function ba(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return ba=function(){return e},e}function Qd(e){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=ba();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}var Kd=(ct={},ct[T.tab]=!0,ct[T.newline]=!0,ct[T.cr]=!0,ct[T.feed]=!0,ct),Jd=(Y={},Y[T.space]=!0,Y[T.tab]=!0,Y[T.newline]=!0,Y[T.cr]=!0,Y[T.feed]=!0,Y[T.ampersand]=!0,Y[T.asterisk]=!0,Y[T.bang]=!0,Y[T.comma]=!0,Y[T.colon]=!0,Y[T.semicolon]=!0,Y[T.openParenthesis]=!0,Y[T.closeParenthesis]=!0,Y[T.openSquare]=!0,Y[T.closeSquare]=!0,Y[T.singleQuote]=!0,Y[T.doubleQuote]=!0,Y[T.plus]=!0,Y[T.pipe]=!0,Y[T.tilde]=!0,Y[T.greaterThan]=!0,Y[T.equals]=!0,Y[T.dollar]=!0,Y[T.caret]=!0,Y[T.slash]=!0,Y),ki={},va="0123456789abcdefABCDEF";for(Hr=0;Hr<va.length;Hr++)ki[va.charCodeAt(Hr)]=!0;var Hr;function Zd(e,t){var n=t,r;do{if(r=e.charCodeAt(n),Jd[r])return n-1;r===T.backslash?n=ep(e,n)+1:n++}while(n<e.length);return n-1}function ep(e,t){var n=t,r=e.charCodeAt(n+1);if(!Kd[r])if(ki[r]){var i=0;do n++,i++,r=e.charCodeAt(n+1);while(ki[r]&&i<6);i<6&&r===T.space&&n++}else n++;return n}var tp={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6};Jt.FIELDS=tp;function rp(e){var t=[],n=e.css.valueOf(),r=n,i=r.length,s=-1,o=1,a=0,u=0,l,f,d,g,h,p,v,w,b,y,_,O,k;function C(D,L){if(e.safe)n+=L,b=n.length-1;else throw e.error("Unclosed "+D,o,a-s,a)}for(;a<i;){switch(l=n.charCodeAt(a),l===T.newline&&(s=a,o+=1),l){case T.space:case T.tab:case T.newline:case T.cr:case T.feed:b=a;do b+=1,l=n.charCodeAt(b),l===T.newline&&(s=b,o+=1);while(l===T.space||l===T.newline||l===T.tab||l===T.cr||l===T.feed);k=T.space,g=o,d=b-s-1,u=b;break;case T.plus:case T.greaterThan:case T.tilde:case T.pipe:b=a;do b+=1,l=n.charCodeAt(b);while(l===T.plus||l===T.greaterThan||l===T.tilde||l===T.pipe);k=T.combinator,g=o,d=a-s,u=b;break;case T.asterisk:case T.ampersand:case T.bang:case T.comma:case T.equals:case T.dollar:case T.caret:case T.openSquare:case T.closeSquare:case T.colon:case T.semicolon:case T.openParenthesis:case T.closeParenthesis:b=a,k=l,g=o,d=a-s,u=b+1;break;case T.singleQuote:case T.doubleQuote:O=l===T.singleQuote?"'":'"',b=a;do for(h=!1,b=n.indexOf(O,b+1),b===-1&&C("quote",O),p=b;n.charCodeAt(p-1)===T.backslash;)p-=1,h=!h;while(h);k=T.str,g=o,d=a-s,u=b+1;break;default:l===T.slash&&n.charCodeAt(a+1)===T.asterisk?(b=n.indexOf("*/",a+2)+1,b===0&&C("comment","*/"),f=n.slice(a,b+1),w=f.split(`
|
|
3
3
|
`),v=w.length-1,v>0?(y=o+v,_=b-w[v].length):(y=o,_=s),k=T.comment,o=y,g=y,d=b-_):l===T.slash?(b=a,k=l,g=o,d=a-s,u=b+1):(b=Zd(n,a),k=T.word,g=o,d=b-s),u=b+1;break}t.push([k,o,a-s,g,d,a,u]),_&&(s=_,_=null),a=u}return t}});var Ea=I((Zt,Oa)=>{"use strict";c();Zt.__esModule=!0;Zt.default=void 0;var np=we(Yn()),Ti=we(Qn()),ip=we(Zn()),xa=we(ti()),op=we(ni()),sp=we(si()),Oi=we(ui()),ap=we(fi()),wa=Yr(gi()),up=we(bi()),Ei=we(xi()),lp=we(_i()),fp=we(ma()),S=Yr(ya()),E=Yr(Si()),cp=Yr(se()),Z=Dt(),Je,Pi;function Ta(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return Ta=function(){return e},e}function Yr(e){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=Ta();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function we(e){return e&&e.__esModule?e:{default:e}}function _a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function dp(e,t,n){return t&&_a(e.prototype,t),n&&_a(e,n),e}var Ri=(Je={},Je[E.space]=!0,Je[E.cr]=!0,Je[E.feed]=!0,Je[E.newline]=!0,Je[E.tab]=!0,Je),pp=Object.assign({},Ri,(Pi={},Pi[E.comment]=!0,Pi));function Sa(e){return{line:e[S.FIELDS.START_LINE],column:e[S.FIELDS.START_COL]}}function ka(e){return{line:e[S.FIELDS.END_LINE],column:e[S.FIELDS.END_COL]}}function Ze(e,t,n,r){return{start:{line:e,column:t},end:{line:n,column:r}}}function dt(e){return Ze(e[S.FIELDS.START_LINE],e[S.FIELDS.START_COL],e[S.FIELDS.END_LINE],e[S.FIELDS.END_COL])}function Ai(e,t){if(!!e)return Ze(e[S.FIELDS.START_LINE],e[S.FIELDS.START_COL],t[S.FIELDS.END_LINE],t[S.FIELDS.END_COL])}function pt(e,t){var n=e[t];if(typeof n=="string")return n.indexOf("\\")!==-1&&((0,Z.ensureObject)(e,"raws"),e[t]=(0,Z.unesc)(n),e.raws[t]===void 0&&(e.raws[t]=n)),e}function Ii(e,t){for(var n=-1,r=[];(n=e.indexOf(t,n+1))!==-1;)r.push(n);return r}function hp(){var e=Array.prototype.concat.apply([],arguments);return e.filter(function(t,n){return n===e.indexOf(t)})}var mp=function(){function e(n,r){r===void 0&&(r={}),this.rule=n,this.options=Object.assign({lossy:!1,safe:!1},r),this.position=0,this.css=typeof this.rule=="string"?this.rule:this.rule.selector,this.tokens=(0,S.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var i=Ai(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new np.default({source:i}),this.root.errorGenerator=this._errorGenerator();var s=new Ti.default({source:{start:{line:1,column:1}}});this.root.append(s),this.current=s,this.loop()}var t=e.prototype;return t._errorGenerator=function(){var r=this;return function(i,s){return typeof r.rule=="string"?new Error(i):r.rule.error(i,s)}},t.attribute=function(){var r=[],i=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[S.FIELDS.TYPE]!==E.closeSquare;)r.push(this.currToken),this.position++;if(this.currToken[S.FIELDS.TYPE]!==E.closeSquare)return this.expected("closing square bracket",this.currToken[S.FIELDS.START_POS]);var s=r.length,o={source:Ze(i[1],i[2],this.currToken[3],this.currToken[4]),sourceIndex:i[S.FIELDS.START_POS]};if(s===1&&!~[E.word].indexOf(r[0][S.FIELDS.TYPE]))return this.expected("attribute",r[0][S.FIELDS.START_POS]);for(var a=0,u="",l="",f=null,d=!1;a<s;){var g=r[a],h=this.content(g),p=r[a+1];switch(g[S.FIELDS.TYPE]){case E.space:if(d=!0,this.options.lossy)break;if(f){(0,Z.ensureObject)(o,"spaces",f);var v=o.spaces[f].after||"";o.spaces[f].after=v+h;var w=(0,Z.getProp)(o,"raws","spaces",f,"after")||null;w&&(o.raws.spaces[f].after=w+h)}else u=u+h,l=l+h;break;case E.asterisk:if(p[S.FIELDS.TYPE]===E.equals)o.operator=h,f="operator";else if((!o.namespace||f==="namespace"&&!d)&&p){u&&((0,Z.ensureObject)(o,"spaces","attribute"),o.spaces.attribute.before=u,u=""),l&&((0,Z.ensureObject)(o,"raws","spaces","attribute"),o.raws.spaces.attribute.before=u,l=""),o.namespace=(o.namespace||"")+h;var b=(0,Z.getProp)(o,"raws","namespace")||null;b&&(o.raws.namespace+=h),f="namespace"}d=!1;break;case E.dollar:if(f==="value"){var y=(0,Z.getProp)(o,"raws","value");o.value+="$",y&&(o.raws.value=y+"$");break}case E.caret:p[S.FIELDS.TYPE]===E.equals&&(o.operator=h,f="operator"),d=!1;break;case E.combinator:if(h==="~"&&p[S.FIELDS.TYPE]===E.equals&&(o.operator=h,f="operator"),h!=="|"){d=!1;break}p[S.FIELDS.TYPE]===E.equals?(o.operator=h,f="operator"):!o.namespace&&!o.attribute&&(o.namespace=!0),d=!1;break;case E.word:if(p&&this.content(p)==="|"&&r[a+2]&&r[a+2][S.FIELDS.TYPE]!==E.equals&&!o.operator&&!o.namespace)o.namespace=h,f="namespace";else if(!o.attribute||f==="attribute"&&!d){u&&((0,Z.ensureObject)(o,"spaces","attribute"),o.spaces.attribute.before=u,u=""),l&&((0,Z.ensureObject)(o,"raws","spaces","attribute"),o.raws.spaces.attribute.before=l,l=""),o.attribute=(o.attribute||"")+h;var _=(0,Z.getProp)(o,"raws","attribute")||null;_&&(o.raws.attribute+=h),f="attribute"}else if(!o.value&&o.value!==""||f==="value"&&!d){var O=(0,Z.unesc)(h),k=(0,Z.getProp)(o,"raws","value")||"",C=o.value||"";o.value=C+O,o.quoteMark=null,(O!==h||k)&&((0,Z.ensureObject)(o,"raws"),o.raws.value=(k||C)+h),f="value"}else{var D=h==="i"||h==="I";(o.value||o.value==="")&&(o.quoteMark||d)?(o.insensitive=D,(!D||h==="I")&&((0,Z.ensureObject)(o,"raws"),o.raws.insensitiveFlag=h),f="insensitive",u&&((0,Z.ensureObject)(o,"spaces","insensitive"),o.spaces.insensitive.before=u,u=""),l&&((0,Z.ensureObject)(o,"raws","spaces","insensitive"),o.raws.spaces.insensitive.before=l,l="")):(o.value||o.value==="")&&(f="value",o.value+=h,o.raws.value&&(o.raws.value+=h))}d=!1;break;case E.str:if(!o.attribute||!o.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:g[S.FIELDS.START_POS]});var L=(0,wa.unescapeValue)(h),z=L.unescaped,G=L.quoteMark;o.value=z,o.quoteMark=G,f="value",(0,Z.ensureObject)(o,"raws"),o.raws.value=h,d=!1;break;case E.equals:if(!o.attribute)return this.expected("attribute",g[S.FIELDS.START_POS],h);if(o.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:g[S.FIELDS.START_POS]});o.operator=o.operator?o.operator+h:h,f="operator",d=!1;break;case E.comment:if(f)if(d||p&&p[S.FIELDS.TYPE]===E.space||f==="insensitive"){var J=(0,Z.getProp)(o,"spaces",f,"after")||"",j=(0,Z.getProp)(o,"raws","spaces",f,"after")||J;(0,Z.ensureObject)(o,"raws","spaces",f),o.raws.spaces[f].after=j+h}else{var V=o[f]||"",re=(0,Z.getProp)(o,"raws",f)||V;(0,Z.ensureObject)(o,"raws"),o.raws[f]=re+h}else l=l+h;break;default:return this.error('Unexpected "'+h+'" found.',{index:g[S.FIELDS.START_POS]})}a++}pt(o,"attribute"),pt(o,"namespace"),this.newNode(new wa.default(o)),this.position++},t.parseWhitespaceEquivalentTokens=function(r){r<0&&(r=this.tokens.length);var i=this.position,s=[],o="",a=void 0;do if(Ri[this.currToken[S.FIELDS.TYPE]])this.options.lossy||(o+=this.content());else if(this.currToken[S.FIELDS.TYPE]===E.comment){var u={};o&&(u.before=o,o=""),a=new xa.default({value:this.content(),source:dt(this.currToken),sourceIndex:this.currToken[S.FIELDS.START_POS],spaces:u}),s.push(a)}while(++this.position<r);if(o){if(a)a.spaces.after=o;else if(!this.options.lossy){var l=this.tokens[i],f=this.tokens[this.position-1];s.push(new Oi.default({value:"",source:Ze(l[S.FIELDS.START_LINE],l[S.FIELDS.START_COL],f[S.FIELDS.END_LINE],f[S.FIELDS.END_COL]),sourceIndex:l[S.FIELDS.START_POS],spaces:{before:o,after:""}}))}}return s},t.convertWhitespaceNodesToSpace=function(r,i){var s=this;i===void 0&&(i=!1);var o="",a="";r.forEach(function(l){var f=s.lossySpace(l.spaces.before,i),d=s.lossySpace(l.rawSpaceBefore,i);o+=f+s.lossySpace(l.spaces.after,i&&f.length===0),a+=f+l.value+s.lossySpace(l.rawSpaceAfter,i&&d.length===0)}),a===o&&(a=void 0);var u={space:o,rawSpace:a};return u},t.isNamedCombinator=function(r){return r===void 0&&(r=this.position),this.tokens[r+0]&&this.tokens[r+0][S.FIELDS.TYPE]===E.slash&&this.tokens[r+1]&&this.tokens[r+1][S.FIELDS.TYPE]===E.word&&this.tokens[r+2]&&this.tokens[r+2][S.FIELDS.TYPE]===E.slash},t.namedCombinator=function(){if(this.isNamedCombinator()){var r=this.content(this.tokens[this.position+1]),i=(0,Z.unesc)(r).toLowerCase(),s={};i!==r&&(s.value="/"+r+"/");var o=new Ei.default({value:"/"+i+"/",source:Ze(this.currToken[S.FIELDS.START_LINE],this.currToken[S.FIELDS.START_COL],this.tokens[this.position+2][S.FIELDS.END_LINE],this.tokens[this.position+2][S.FIELDS.END_COL]),sourceIndex:this.currToken[S.FIELDS.START_POS],raws:s});return this.position=this.position+3,o}else this.unexpected()},t.combinator=function(){var r=this;if(this.content()==="|")return this.namespace();var i=this.locateNextMeaningfulToken(this.position);if(i<0||this.tokens[i][S.FIELDS.TYPE]===E.comma){var s=this.parseWhitespaceEquivalentTokens(i);if(s.length>0){var o=this.current.last;if(o){var a=this.convertWhitespaceNodesToSpace(s),u=a.space,l=a.rawSpace;l!==void 0&&(o.rawSpaceAfter+=l),o.spaces.after+=u}else s.forEach(function(k){return r.newNode(k)})}return}var f=this.currToken,d=void 0;i>this.position&&(d=this.parseWhitespaceEquivalentTokens(i));var g;if(this.isNamedCombinator()?g=this.namedCombinator():this.currToken[S.FIELDS.TYPE]===E.combinator?(g=new Ei.default({value:this.content(),source:dt(this.currToken),sourceIndex:this.currToken[S.FIELDS.START_POS]}),this.position++):Ri[this.currToken[S.FIELDS.TYPE]]||d||this.unexpected(),g){if(d){var h=this.convertWhitespaceNodesToSpace(d),p=h.space,v=h.rawSpace;g.spaces.before=p,g.rawSpaceBefore=v}}else{var w=this.convertWhitespaceNodesToSpace(d,!0),b=w.space,y=w.rawSpace;y||(y=b);var _={},O={spaces:{}};b.endsWith(" ")&&y.endsWith(" ")?(_.before=b.slice(0,b.length-1),O.spaces.before=y.slice(0,y.length-1)):b.startsWith(" ")&&y.startsWith(" ")?(_.after=b.slice(1),O.spaces.after=y.slice(1)):O.value=y,g=new Ei.default({value:" ",source:Ai(f,this.tokens[this.position-1]),sourceIndex:f[S.FIELDS.START_POS],spaces:_,raws:O})}return this.currToken&&this.currToken[S.FIELDS.TYPE]===E.space&&(g.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(g)},t.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}this.current._inferEndPosition();var r=new Ti.default({source:{start:Sa(this.tokens[this.position+1])}});this.current.parent.append(r),this.current=r,this.position++},t.comment=function(){var r=this.currToken;this.newNode(new xa.default({value:this.content(),source:dt(r),sourceIndex:r[S.FIELDS.START_POS]})),this.position++},t.error=function(r,i){throw this.root.error(r,i)},t.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[S.FIELDS.START_POS]})},t.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[S.FIELDS.START_POS])},t.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[S.FIELDS.START_POS])},t.unexpected=function(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[S.FIELDS.START_POS])},t.namespace=function(){var r=this.prevToken&&this.content(this.prevToken)||!0;if(this.nextToken[S.FIELDS.TYPE]===E.word)return this.position++,this.word(r);if(this.nextToken[S.FIELDS.TYPE]===E.asterisk)return this.position++,this.universal(r)},t.nesting=function(){if(this.nextToken){var r=this.content(this.nextToken);if(r==="|"){this.position++;return}}var i=this.currToken;this.newNode(new lp.default({value:this.content(),source:dt(i),sourceIndex:i[S.FIELDS.START_POS]})),this.position++},t.parentheses=function(){var r=this.current.last,i=1;if(this.position++,r&&r.type===cp.PSEUDO){var s=new Ti.default({source:{start:Sa(this.tokens[this.position-1])}}),o=this.current;for(r.append(s),this.current=s;this.position<this.tokens.length&&i;)this.currToken[S.FIELDS.TYPE]===E.openParenthesis&&i++,this.currToken[S.FIELDS.TYPE]===E.closeParenthesis&&i--,i?this.parse():(this.current.source.end=ka(this.currToken),this.current.parent.source.end=ka(this.currToken),this.position++);this.current=o}else{for(var a=this.currToken,u="(",l;this.position<this.tokens.length&&i;)this.currToken[S.FIELDS.TYPE]===E.openParenthesis&&i++,this.currToken[S.FIELDS.TYPE]===E.closeParenthesis&&i--,l=this.currToken,u+=this.parseParenthesisToken(this.currToken),this.position++;r?r.appendToPropertyAndEscape("value",u,u):this.newNode(new Oi.default({value:u,source:Ze(a[S.FIELDS.START_LINE],a[S.FIELDS.START_COL],l[S.FIELDS.END_LINE],l[S.FIELDS.END_COL]),sourceIndex:a[S.FIELDS.START_POS]}))}if(i)return this.expected("closing parenthesis",this.currToken[S.FIELDS.START_POS])},t.pseudo=function(){for(var r=this,i="",s=this.currToken;this.currToken&&this.currToken[S.FIELDS.TYPE]===E.colon;)i+=this.content(),this.position++;if(!this.currToken)return this.expected(["pseudo-class","pseudo-element"],this.position-1);if(this.currToken[S.FIELDS.TYPE]===E.word)this.splitWord(!1,function(o,a){i+=o,r.newNode(new ap.default({value:i,source:Ai(s,r.currToken),sourceIndex:s[S.FIELDS.START_POS]})),a>1&&r.nextToken&&r.nextToken[S.FIELDS.TYPE]===E.openParenthesis&&r.error("Misplaced parenthesis.",{index:r.nextToken[S.FIELDS.START_POS]})});else return this.expected(["pseudo-class","pseudo-element"],this.currToken[S.FIELDS.START_POS])},t.space=function(){var r=this.content();this.position===0||this.prevToken[S.FIELDS.TYPE]===E.comma||this.prevToken[S.FIELDS.TYPE]===E.openParenthesis||this.current.nodes.every(function(i){return i.type==="comment"})?(this.spaces=this.optionalSpace(r),this.position++):this.position===this.tokens.length-1||this.nextToken[S.FIELDS.TYPE]===E.comma||this.nextToken[S.FIELDS.TYPE]===E.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(r),this.position++):this.combinator()},t.string=function(){var r=this.currToken;this.newNode(new Oi.default({value:this.content(),source:dt(r),sourceIndex:r[S.FIELDS.START_POS]})),this.position++},t.universal=function(r){var i=this.nextToken;if(i&&this.content(i)==="|")return this.position++,this.namespace();var s=this.currToken;this.newNode(new up.default({value:this.content(),source:dt(s),sourceIndex:s[S.FIELDS.START_POS]}),r),this.position++},t.splitWord=function(r,i){for(var s=this,o=this.nextToken,a=this.content();o&&~[E.dollar,E.caret,E.equals,E.word].indexOf(o[S.FIELDS.TYPE]);){this.position++;var u=this.content();if(a+=u,u.lastIndexOf("\\")===u.length-1){var l=this.nextToken;l&&l[S.FIELDS.TYPE]===E.space&&(a+=this.requiredSpace(this.content(l)),this.position++)}o=this.nextToken}var f=Ii(a,".").filter(function(p){var v=a[p-1]==="\\",w=/^\d+\.\d+%$/.test(a);return!v&&!w}),d=Ii(a,"#").filter(function(p){return a[p-1]!=="\\"}),g=Ii(a,"#{");g.length&&(d=d.filter(function(p){return!~g.indexOf(p)}));var h=(0,fp.default)(hp([0].concat(f,d)));h.forEach(function(p,v){var w=h[v+1]||a.length,b=a.slice(p,w);if(v===0&&i)return i.call(s,b,h.length);var y,_=s.currToken,O=_[S.FIELDS.START_POS]+h[v],k=Ze(_[1],_[2]+p,_[3],_[2]+(w-1));if(~f.indexOf(p)){var C={value:b.slice(1),source:k,sourceIndex:O};y=new ip.default(pt(C,"value"))}else if(~d.indexOf(p)){var D={value:b.slice(1),source:k,sourceIndex:O};y=new op.default(pt(D,"value"))}else{var L={value:b,source:k,sourceIndex:O};pt(L,"value"),y=new sp.default(L)}s.newNode(y,r),r=null}),this.position++},t.word=function(r){var i=this.nextToken;return i&&this.content(i)==="|"?(this.position++,this.namespace()):this.splitWord(r)},t.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},t.parse=function(r){switch(this.currToken[S.FIELDS.TYPE]){case E.space:this.space();break;case E.comment:this.comment();break;case E.openParenthesis:this.parentheses();break;case E.closeParenthesis:r&&this.missingParenthesis();break;case E.openSquare:this.attribute();break;case E.dollar:case E.caret:case E.equals:case E.word:this.word();break;case E.colon:this.pseudo();break;case E.comma:this.comma();break;case E.asterisk:this.universal();break;case E.ampersand:this.nesting();break;case E.slash:case E.combinator:this.combinator();break;case E.str:this.string();break;case E.closeSquare:this.missingSquareBracket();case E.semicolon:this.missingBackslash();default:this.unexpected()}},t.expected=function(r,i,s){if(Array.isArray(r)){var o=r.pop();r=r.join(", ")+" or "+o}var a=/^[aeiou]/.test(r[0])?"an":"a";return s?this.error("Expected "+a+" "+r+', found "'+s+'" instead.',{index:i}):this.error("Expected "+a+" "+r+".",{index:i})},t.requiredSpace=function(r){return this.options.lossy?" ":r},t.optionalSpace=function(r){return this.options.lossy?"":r},t.lossySpace=function(r,i){return this.options.lossy?i?" ":"":r},t.parseParenthesisToken=function(r){var i=this.content(r);return r[S.FIELDS.TYPE]===E.space?this.requiredSpace(i):i},t.newNode=function(r,i){return i&&(/^ +$/.test(i)&&(this.options.lossy||(this.spaces=(this.spaces||"")+i),i=!0),r.namespace=i,pt(r,"namespace")),this.spaces&&(r.spaces.before=this.spaces,this.spaces=""),this.current.append(r)},t.content=function(r){return r===void 0&&(r=this.currToken),this.css.slice(r[S.FIELDS.START_POS],r[S.FIELDS.END_POS])},t.locateNextMeaningfulToken=function(r){r===void 0&&(r=this.position+1);for(var i=r;i<this.tokens.length;)if(pp[this.tokens[i][S.FIELDS.TYPE]]){i++;continue}else return i;return-1},dp(e,[{key:"currToken",get:function(){return this.tokens[this.position]}},{key:"nextToken",get:function(){return this.tokens[this.position+1]}},{key:"prevToken",get:function(){return this.tokens[this.position-1]}}]),e}();Zt.default=mp;Oa.exports=Zt.default});var Aa=I((er,Pa)=>{"use strict";c();er.__esModule=!0;er.default=void 0;var gp=vp(Ea());function vp(e){return e&&e.__esModule?e:{default:e}}var bp=function(){function e(n,r){this.func=n||function(){},this.funcRes=null,this.options=r}var t=e.prototype;return t._shouldUpdateSelector=function(r,i){i===void 0&&(i={});var s=Object.assign({},this.options,i);return s.updateSelector===!1?!1:typeof r!="string"},t._isLossy=function(r){r===void 0&&(r={});var i=Object.assign({},this.options,r);return i.lossless===!1},t._root=function(r,i){i===void 0&&(i={});var s=new gp.default(r,this._parseOptions(i));return s.root},t._parseOptions=function(r){return{lossy:this._isLossy(r)}},t._run=function(r,i){var s=this;return i===void 0&&(i={}),new Promise(function(o,a){try{var u=s._root(r,i);Promise.resolve(s.func(u)).then(function(l){var f=void 0;return s._shouldUpdateSelector(r,i)&&(f=u.toString(),r.selector=f),{transform:l,root:u,string:f}}).then(o,a)}catch(l){a(l);return}})},t._runSync=function(r,i){i===void 0&&(i={});var s=this._root(r,i),o=this.func(s);if(o&&typeof o.then=="function")throw new Error("Selector processor returned a promise to a synchronous call.");var a=void 0;return i.updateSelector&&typeof r!="string"&&(a=s.toString(),r.selector=a),{transform:o,root:s,string:a}},t.ast=function(r,i){return this._run(r,i).then(function(s){return s.root})},t.astSync=function(r,i){return this._runSync(r,i).root},t.transform=function(r,i){return this._run(r,i).then(function(s){return s.transform})},t.transformSync=function(r,i){return this._runSync(r,i).transform},t.process=function(r,i){return this._run(r,i).then(function(s){return s.string||s.root.toString()})},t.processSync=function(r,i){var s=this._runSync(r,i);return s.string||s.root.toString()},e}();er.default=bp;Pa.exports=er.default});var Ia=I(K=>{"use strict";c();K.__esModule=!0;K.universal=K.tag=K.string=K.selector=K.root=K.pseudo=K.nesting=K.id=K.comment=K.combinator=K.className=K.attribute=void 0;var yp=_e(gi()),xp=_e(Zn()),wp=_e(xi()),_p=_e(ti()),Sp=_e(ni()),kp=_e(_i()),Tp=_e(fi()),Op=_e(Yn()),Ep=_e(Qn()),Pp=_e(ui()),Ap=_e(si()),Ip=_e(bi());function _e(e){return e&&e.__esModule?e:{default:e}}var Rp=function(t){return new yp.default(t)};K.attribute=Rp;var Lp=function(t){return new xp.default(t)};K.className=Lp;var Cp=function(t){return new wp.default(t)};K.combinator=Cp;var Dp=function(t){return new _p.default(t)};K.comment=Dp;var Fp=function(t){return new Sp.default(t)};K.id=Fp;var Np=function(t){return new kp.default(t)};K.nesting=Np;var Mp=function(t){return new Tp.default(t)};K.pseudo=Mp;var Wp=function(t){return new Op.default(t)};K.root=Wp;var $p=function(t){return new Ep.default(t)};K.selector=$p;var qp=function(t){return new Pp.default(t)};K.string=qp;var Bp=function(t){return new Ap.default(t)};K.tag=Bp;var Up=function(t){return new Ip.default(t)};K.universal=Up});var Da=I(B=>{"use strict";c();B.__esModule=!0;B.isNode=Li;B.isPseudoElement=Ca;B.isPseudoClass=Zp;B.isContainer=eh;B.isNamespace=th;B.isUniversal=B.isTag=B.isString=B.isSelector=B.isRoot=B.isPseudo=B.isNesting=B.isIdentifier=B.isComment=B.isCombinator=B.isClassName=B.isAttribute=void 0;var ee=se(),pe,zp=(pe={},pe[ee.ATTRIBUTE]=!0,pe[ee.CLASS]=!0,pe[ee.COMBINATOR]=!0,pe[ee.COMMENT]=!0,pe[ee.ID]=!0,pe[ee.NESTING]=!0,pe[ee.PSEUDO]=!0,pe[ee.ROOT]=!0,pe[ee.SELECTOR]=!0,pe[ee.STRING]=!0,pe[ee.TAG]=!0,pe[ee.UNIVERSAL]=!0,pe);function Li(e){return typeof e=="object"&&zp[e.type]}function Se(e,t){return Li(t)&&t.type===e}var Ra=Se.bind(null,ee.ATTRIBUTE);B.isAttribute=Ra;var Gp=Se.bind(null,ee.CLASS);B.isClassName=Gp;var jp=Se.bind(null,ee.COMBINATOR);B.isCombinator=jp;var Vp=Se.bind(null,ee.COMMENT);B.isComment=Vp;var Hp=Se.bind(null,ee.ID);B.isIdentifier=Hp;var Yp=Se.bind(null,ee.NESTING);B.isNesting=Yp;var Ci=Se.bind(null,ee.PSEUDO);B.isPseudo=Ci;var Xp=Se.bind(null,ee.ROOT);B.isRoot=Xp;var Qp=Se.bind(null,ee.SELECTOR);B.isSelector=Qp;var Kp=Se.bind(null,ee.STRING);B.isString=Kp;var La=Se.bind(null,ee.TAG);B.isTag=La;var Jp=Se.bind(null,ee.UNIVERSAL);B.isUniversal=Jp;function Ca(e){return Ci(e)&&e.value&&(e.value.startsWith("::")||e.value.toLowerCase()===":before"||e.value.toLowerCase()===":after"||e.value.toLowerCase()===":first-letter"||e.value.toLowerCase()===":first-line")}function Zp(e){return Ci(e)&&!Ca(e)}function eh(e){return!!(Li(e)&&e.walk)}function th(e){return Ra(e)||La(e)}});var Fa=I(Ee=>{"use strict";c();Ee.__esModule=!0;var Di=se();Object.keys(Di).forEach(function(e){e==="default"||e==="__esModule"||e in Ee&&Ee[e]===Di[e]||(Ee[e]=Di[e])});var Fi=Ia();Object.keys(Fi).forEach(function(e){e==="default"||e==="__esModule"||e in Ee&&Ee[e]===Fi[e]||(Ee[e]=Fi[e])});var Ni=Da();Object.keys(Ni).forEach(function(e){e==="default"||e==="__esModule"||e in Ee&&Ee[e]===Ni[e]||(Ee[e]=Ni[e])})});var Wa=I((tr,Ma)=>{"use strict";c();tr.__esModule=!0;tr.default=void 0;var rh=oh(Aa()),nh=ih(Fa());function Na(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return Na=function(){return e},e}function ih(e){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=Na();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function oh(e){return e&&e.__esModule?e:{default:e}}var Mi=function(t){return new rh.default(t)};Object.assign(Mi,nh);delete Mi.__esModule;var sh=Mi;tr.default=sh;Ma.exports=tr.default});var $a=I(Wi=>{"use strict";c();Object.defineProperty(Wi,"__esModule",{value:!0});Object.defineProperty(Wi,"default",{enumerable:!0,get:()=>ah});function ah(e){return e.replace(/\\,/g,"\\2c ")}});var Ba=I((Kg,qa)=>{"use strict";c();qa.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var qi=I($i=>{"use strict";c();Object.defineProperty($i,"__esModule",{value:!0});function uh(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}uh($i,{parseColor:()=>hh,formatColor:()=>mh});var Ua=lh(Ba());function lh(e){return e&&e.__esModule?e:{default:e}}var fh=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,ch=/^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,je=/(?:\d+|\d*\.\d+)%?/,Xr=/(?:\s*,\s*|\s+)/,za=/\s*[,/]\s*/,Ve=/var\(--(?:[^ )]*?)\)/,dh=new RegExp(`^(rgb)a?\\(\\s*(${je.source}|${Ve.source})(?:${Xr.source}(${je.source}|${Ve.source}))?(?:${Xr.source}(${je.source}|${Ve.source}))?(?:${za.source}(${je.source}|${Ve.source}))?\\s*\\)$`),ph=new RegExp(`^(hsl)a?\\(\\s*((?:${je.source})(?:deg|rad|grad|turn)?|${Ve.source})(?:${Xr.source}(${je.source}|${Ve.source}))?(?:${Xr.source}(${je.source}|${Ve.source}))?(?:${za.source}(${je.source}|${Ve.source}))?\\s*\\)$`);function hh(e,{loose:t=!1}={}){var n,r;if(typeof e!="string")return null;if(e=e.trim(),e==="transparent")return{mode:"rgb",color:["0","0","0"],alpha:"0"};if(e in Ua.default)return{mode:"rgb",color:Ua.default[e].map(u=>u.toString())};let i=e.replace(ch,(u,l,f,d,g)=>["#",l,l,f,f,d,d,g?g+g:""].join("")).match(fh);if(i!==null)return{mode:"rgb",color:[parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16)].map(u=>u.toString()),alpha:i[4]?(parseInt(i[4],16)/255).toString():void 0};var s;let o=(s=e.match(dh))!==null&&s!==void 0?s:e.match(ph);if(o===null)return null;let a=[o[2],o[3],o[4]].filter(Boolean).map(u=>u.toString());return!t&&a.length!==3||a.length<3&&!a.some(u=>/^var\(.*?\)$/.test(u))?null:{mode:o[1],color:a,alpha:(n=o[5])===null||n===void 0||(r=n.toString)===null||r===void 0?void 0:r.call(n)}}function mh({mode:e,color:t,alpha:n}){let r=n!==void 0;return`${e}(${t.join(" ")}${r?` / ${n}`:""})`}});var Ui=I(Bi=>{"use strict";c();Object.defineProperty(Bi,"__esModule",{value:!0});function gh(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}gh(Bi,{withAlphaValue:()=>vh,default:()=>bh});var Qr=qi();function vh(e,t,n){if(typeof e=="function")return e({opacityValue:t});let r=(0,Qr.parseColor)(e,{loose:!0});return r===null?n:(0,Qr.formatColor)({...r,alpha:t})}function bh({color:e,property:t,variable:n}){let r=[].concat(t);if(typeof e=="function")return{[n]:"1",...Object.fromEntries(r.map(s=>[s,e({opacityVariable:n,opacityValue:`var(${n})`})]))};let i=(0,Qr.parseColor)(e);return i===null?Object.fromEntries(r.map(s=>[s,e])):i.alpha!==void 0?Object.fromEntries(r.map(s=>[s,e])):{[n]:"1",...Object.fromEntries(r.map(s=>[s,(0,Qr.formatColor)({...i,alpha:`var(${n})`})]))}}});var Ya=I(zi=>{"use strict";c();Object.defineProperty(zi,"__esModule",{value:!0});function yh(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}yh(zi,{pattern:()=>wh,withoutCapturing:()=>ja,any:()=>Va,optional:()=>_h,zeroOrMore:()=>Sh,nestedBrackets:()=>Ha,escape:()=>et});var Ga=/[\\^$.*+?()[\]{}|]/g,xh=RegExp(Ga.source);function rr(e){return e=Array.isArray(e)?e:[e],e=e.map(t=>t instanceof RegExp?t.source:t),e.join("")}function wh(e){return new RegExp(rr(e),"g")}function ja(e){return new RegExp(`(?:${rr(e)})`,"g")}function Va(e){return`(?:${e.map(rr).join("|")})`}function _h(e){return`(?:${rr(e)})?`}function Sh(e){return`(?:${rr(e)})*`}function Ha(e,t,n=1){return ja([et(e),/[^\s]*/,n===1?`[^${et(e)}${et(t)}s]*`:Va([`[^${et(e)}${et(t)}s]*`,Ha(e,t,n-1)]),/[^\s]*/,et(t)])}function et(e){return e&&xh.test(e)?e.replace(Ga,"\\$&"):e||""}});var Qa=I(Gi=>{"use strict";c();Object.defineProperty(Gi,"__esModule",{value:!0});Object.defineProperty(Gi,"splitAtTopLevelOnly",{enumerable:!0,get:()=>Oh});var kh=Th(Ya());function Xa(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Xa=function(r){return r?n:t})(e)}function Th(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Xa(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(r,s,o):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}function*Oh(e,t){let n=new RegExp(`[(){}\\[\\]${kh.escape(t)}]`,"g"),r=0,i=0,s=!1,o=0,a=0,u=t.length;for(let l of e.matchAll(n)){let f=l[0]===t[o],d=o===u-1,g=f&&d;l[0]==="("&&r++,l[0]===")"&&r--,l[0]==="["&&r++,l[0]==="]"&&r--,l[0]==="{"&&r++,l[0]==="}"&&r--,f&&r===0&&(a===0&&(a=l.index),o++),g&&r===0&&(s=!0,yield e.substring(i,a),i=a+u),o===u&&(o=0,a=0)}s?yield e.substring(i):yield e}});var Ja=I(ji=>{"use strict";c();Object.defineProperty(ji,"__esModule",{value:!0});function Eh(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}Eh(ji,{parseBoxShadowValue:()=>Rh,formatBoxShadowValue:()=>Lh});var Ph=Qa(),Ah=new Set(["inset","inherit","initial","revert","unset"]),Ih=/\ +(?![^(]*\))/g,Ka=/^-?(\d+|\.\d+)(.*?)$/g;function Rh(e){return Array.from((0,Ph.splitAtTopLevelOnly)(e,",")).map(n=>{let r=n.trim(),i={raw:r},s=r.split(Ih),o=new Set;for(let a of s)Ka.lastIndex=0,!o.has("KEYWORD")&&Ah.has(a)?(i.keyword=a,o.add("KEYWORD")):Ka.test(a)?o.has("X")?o.has("Y")?o.has("BLUR")?o.has("SPREAD")||(i.spread=a,o.add("SPREAD")):(i.blur=a,o.add("BLUR")):(i.y=a,o.add("Y")):(i.x=a,o.add("X")):i.color?(i.unknown||(i.unknown=[]),i.unknown.push(a)):i.color=a;return i.valid=i.x!==void 0&&i.y!==void 0,i})}function Lh(e){return e.map(t=>t.valid?[t.keyword,t.x,t.y,t.blur,t.spread,t.color].filter(Boolean).join(" "):t.raw).join(", ")}});var ou=I(Hi=>{"use strict";c();Object.defineProperty(Hi,"__esModule",{value:!0});function Ch(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}Ch(Hi,{normalize:()=>He,url:()=>tu,number:()=>Nh,percentage:()=>ru,length:()=>nu,lineWidth:()=>$h,shadow:()=>qh,color:()=>Bh,image:()=>Uh,gradient:()=>iu,position:()=>jh,familyName:()=>Vh,genericName:()=>Yh,absoluteSize:()=>Qh,relativeSize:()=>Jh});var Dh=qi(),Fh=Ja(),Vi=["min","max","clamp","calc"],eu=/,(?![^(]*\))/g,Kr=/_(?![^(]*\))/g;function He(e,t=!0){return e.includes("url(")?e.split(/(url\(.*?\))/g).filter(Boolean).map(n=>/^url\(.*?\)$/.test(n)?n:He(n,!1)).join(""):(e=e.replace(/([^\\])_+/g,(n,r)=>r+" ".repeat(n.length-1)).replace(/^_/g," ").replace(/\\_/g,"_"),t&&(e=e.trim()),e=e.replace(/(calc|min|max|clamp)\(.+\)/g,n=>n.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 ")),e)}function tu(e){return e.startsWith("url(")}function Nh(e){return!isNaN(Number(e))||Vi.some(t=>new RegExp(`^${t}\\(.+?`).test(e))}function ru(e){return e.split(Kr).every(t=>/%$/g.test(t)||Vi.some(n=>new RegExp(`^${n}\\(.+?%`).test(t)))}var Mh=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","vw","vh","vmin","vmax"],Za=`(?:${Mh.join("|")})`;function nu(e){return e.split(Kr).every(t=>t==="0"||new RegExp(`${Za}$`).test(t)||Vi.some(n=>new RegExp(`^${n}\\(.+?${Za}`).test(t)))}var Wh=new Set(["thin","medium","thick"]);function $h(e){return Wh.has(e)}function qh(e){let t=(0,Fh.parseBoxShadowValue)(He(e));for(let n of t)if(!n.valid)return!1;return!0}function Bh(e){let t=0;return e.split(Kr).every(r=>(r=He(r),r.startsWith("var(")?!0:(0,Dh.parseColor)(r,{loose:!0})!==null?(t++,!0):!1))?t>0:!1}function Uh(e){let t=0;return e.split(eu).every(r=>(r=He(r),r.startsWith("var(")?!0:tu(r)||iu(r)||["element(","image(","cross-fade(","image-set("].some(i=>r.startsWith(i))?(t++,!0):!1))?t>0:!1}var zh=new Set(["linear-gradient","radial-gradient","repeating-linear-gradient","repeating-radial-gradient","conic-gradient"]);function iu(e){e=He(e);for(let t of zh)if(e.startsWith(`${t}(`))return!0;return!1}var Gh=new Set(["center","top","right","bottom","left"]);function jh(e){let t=0;return e.split(Kr).every(r=>(r=He(r),r.startsWith("var(")?!0:Gh.has(r)||nu(r)||ru(r)?(t++,!0):!1))?t>0:!1}function Vh(e){let t=0;return e.split(eu).every(r=>(r=He(r),r.startsWith("var(")?!0:r.includes(" ")&&!/(['"])([^"']+)\1/g.test(r)||/^\d/g.test(r)?!1:(t++,!0)))?t>0:!1}var Hh=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","math","emoji","fangsong"]);function Yh(e){return Hh.has(e)}var Xh=new Set(["xx-small","x-small","small","medium","large","x-large","x-large","xxx-large"]);function Qh(e){return Xh.has(e)}var Kh=new Set(["larger","smaller"]);function Jh(e){return Kh.has(e)}});var pu=I(Qi=>{"use strict";c();Object.defineProperty(Qi,"__esModule",{value:!0});function Zh(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}Zh(Qi,{updateAllClasses:()=>r0,asValue:()=>ir,parseColorFormat:()=>Yi,asColor:()=>fu,asLookupValue:()=>cu,coerceValue:()=>s0});var e0=Xi(Wa()),t0=Xi($a()),su=Ui(),he=ou(),au=Xi(Dn());function Xi(e){return e&&e.__esModule?e:{default:e}}function r0(e,t){return(0,e0.default)(i=>{i.walkClasses(s=>{let o=t(s.value);s.value=o,s.raws&&s.raws.value&&(s.raws.value=(0,t0.default)(s.raws.value))})}).processSync(e)}function lu(e,t){if(!nr(e))return;let n=e.slice(1,-1);if(!!t(n))return(0,he.normalize)(n)}function n0(e,t={},n){let r=t[e];if(r!==void 0)return(0,au.default)(r);if(nr(e)){let i=lu(e,n);return i===void 0?void 0:(0,au.default)(i)}}function ir(e,t={},{validate:n=()=>!0}={}){var r;let i=(r=t.values)===null||r===void 0?void 0:r[e];return i!==void 0?i:t.supportsNegativeValues&&e.startsWith("-")?n0(e.slice(1),t.values,n):lu(e,n)}function nr(e){return e.startsWith("[")&&e.endsWith("]")}function i0(e){let t=e.lastIndexOf("/");return t===-1||t===e.length-1?[e]:[e.slice(0,t),e.slice(t+1)]}function Yi(e){if(typeof e=="string"&&e.includes("<alpha-value>")){let t=e;return({opacityValue:n=1})=>t.replace("<alpha-value>",n)}return e}function fu(e,t={},{tailwindConfig:n={}}={}){var r;if(((r=t.values)===null||r===void 0?void 0:r[e])!==void 0){var i;return Yi((i=t.values)===null||i===void 0?void 0:i[e])}let[s,o]=i0(e);if(o!==void 0){var a,u,l,f;let d=(f=(a=t.values)===null||a===void 0?void 0:a[s])!==null&&f!==void 0?f:nr(s)?s.slice(1,-1):void 0;return d===void 0?void 0:(d=Yi(d),nr(o)?(0,su.withAlphaValue)(d,o.slice(1,-1)):((u=n.theme)===null||u===void 0||(l=u.opacity)===null||l===void 0?void 0:l[o])===void 0?void 0:(0,su.withAlphaValue)(d,n.theme.opacity[o]))}return ir(e,t,{validate:he.color})}function cu(e,t={}){var n;return(n=t.values)===null||n===void 0?void 0:n[e]}function ke(e){return(t,n)=>ir(t,n,{validate:e})}var du={any:ir,color:fu,url:ke(he.url),image:ke(he.image),length:ke(he.length),percentage:ke(he.percentage),position:ke(he.position),lookup:cu,"generic-name":ke(he.genericName),"family-name":ke(he.familyName),number:ke(he.number),"line-width":ke(he.lineWidth),"absolute-size":ke(he.absoluteSize),"relative-size":ke(he.relativeSize),shadow:ke(he.shadow)},uu=Object.keys(du);function o0(e,t){let n=e.indexOf(t);return n===-1?[void 0,e]:[e.slice(0,n),e.slice(n+1)]}function s0(e,t,n,r){if(nr(t)){let i=t.slice(1,-1),[s,o]=o0(i,":");if(!/^[\w-_]+$/g.test(s))o=i;else if(s!==void 0&&!uu.includes(s))return[];if(o.length>0&&uu.includes(s))return[ir(`[${o}]`,n),s]}for(let i of[].concat(e)){let s=du[i](t,n,{tailwindConfig:r});if(s!==void 0)return[s,i]}return[]}});var hu=I(Ki=>{"use strict";c();Object.defineProperty(Ki,"__esModule",{value:!0});Object.defineProperty(Ki,"default",{enumerable:!0,get:()=>a0});function a0(e){return typeof e=="function"?e({}):e}});var yu=I(Zi=>{"use strict";c();Object.defineProperty(Zi,"__esModule",{value:!0});Object.defineProperty(Zi,"default",{enumerable:!0,get:()=>E0});var u0=tt(Dn()),l0=tt(_s()),f0=tt(Ss()),c0=tt(Mn()),d0=tt(Ts()),vu=Os(),mu=Es(),p0=As(),h0=tt(Is()),m0=Rs(),g0=pu(),v0=Ui(),b0=tt(hu());function tt(e){return e&&e.__esModule?e:{default:e}}function ht(e){return typeof e=="function"}function or(e){return typeof e=="object"&&e!==null}function sr(e,...t){let n=t.pop();for(let r of t)for(let i in r){let s=n(e[i],r[i]);s===void 0?or(e[i])&&or(r[i])?e[i]=sr(e[i],r[i],n):e[i]=r[i]:e[i]=s}return e}var Ji={colors:d0.default,negative(e){return Object.keys(e).filter(t=>e[t]!=="0").reduce((t,n)=>{let r=(0,u0.default)(e[n]);return r!==void 0&&(t[`-${n}`]=r),t},{})},breakpoints(e){return Object.keys(e).filter(t=>typeof e[t]=="string").reduce((t,n)=>({...t,[`screen-${n}`]:e[n]}),{})}};function y0(e,...t){return ht(e)?e(...t):e}function x0(e){return e.reduce((t,{extend:n})=>sr(t,n,(r,i)=>r===void 0?[i]:Array.isArray(r)?[i,...r]:[i,r]),{})}function w0(e){return{...e.reduce((t,n)=>(0,vu.defaults)(t,n),{}),extend:x0(e)}}function gu(e,t){if(Array.isArray(e)&&or(e[0]))return e.concat(t);if(Array.isArray(t)&&or(t[0])&&or(e))return[e,...t];if(Array.isArray(t))return t}function _0({extend:e,...t}){return sr(t,e,(n,r)=>!ht(n)&&!r.some(ht)?sr({},n,...r,gu):(i,s)=>sr({},...[n,...r].map(o=>y0(o,i,s)),gu))}function*S0(e){let t=(0,mu.toPath)(e);if(t.length===0||(yield t,Array.isArray(e)))return;let n=/^(.*?)\s*\/\s*([^/]+)$/,r=e.match(n);if(r!==null){let[,i,s]=r,o=(0,mu.toPath)(i);o.alpha=s,yield o}}function k0(e){let t=(n,r)=>{for(let i of S0(n)){let s=0,o=e;for(;o!=null&&s<i.length;)o=o[i[s++]],o=ht(o)&&(i.alpha===void 0||s<=i.length-1)?o(t,Ji):o;if(o!==void 0){if(i.alpha!==void 0){let a=(0,g0.parseColorFormat)(o);return(0,v0.withAlphaValue)(a,i.alpha,(0,b0.default)(a))}return(0,h0.default)(o)?(0,m0.cloneDeep)(o):o}}return r};return Object.assign(t,{theme:t,...Ji}),Object.keys(e).reduce((n,r)=>(n[r]=ht(e[r])?e[r](t,Ji):e[r],n),{})}function bu(e){let t=[];return e.forEach(n=>{t=[...t,n];var r;let i=(r=n==null?void 0:n.plugins)!==null&&r!==void 0?r:[];i.length!==0&&i.forEach(s=>{s.__isOptionsFunction&&(s=s());var o;t=[...t,...bu([(o=s==null?void 0:s.config)!==null&&o!==void 0?o:{}])]})}),t}function T0(e){return[...e].reduceRight((n,r)=>ht(r)?r({corePlugins:n}):(0,f0.default)(r,n),l0.default)}function O0(e){return[...e].reduceRight((n,r)=>[...n,...r],[])}function E0(e){let t=[...bu(e),{prefix:"",important:!1,separator:":",variantOrder:c0.default.variantOrder}];var n,r;return(0,p0.normalizeConfig)((0,vu.defaults)({theme:k0(_0(w0(t.map(i=>(n=i==null?void 0:i.theme)!==null&&n!==void 0?n:{})))),corePlugins:T0(t.map(i=>i.corePlugins)),plugins:O0(e.map(i=>(r=i==null?void 0:i.plugins)!==null&&r!==void 0?r:[]))},...t))}});var xu={};wr(xu,{default:()=>P0});var P0,wu=xr(()=>{c();P0={yellow:e=>e}});var Tu=I(eo=>{"use strict";c();Object.defineProperty(eo,"__esModule",{value:!0});function A0(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}A0(eo,{flagEnabled:()=>L0,issueFlagNotices:()=>C0,default:()=>D0});var I0=ku((wu(),xt(xu))),R0=ku((Nr(),xt(Fr)));function ku(e){return e&&e.__esModule?e:{default:e}}var _u={optimizeUniversalDefaults:!1},ar={future:["hoverOnlyWhenSupported","respectDefaultRingColorOpacity"],experimental:["optimizeUniversalDefaults","matchVariant"]};function L0(e,t){if(ar.future.includes(t)){var n,r,i;return e.future==="all"||((i=(r=e==null||(n=e.future)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:_u[t])!==null&&i!==void 0?i:!1)}if(ar.experimental.includes(t)){var s,o,a;return e.experimental==="all"||((a=(o=e==null||(s=e.experimental)===null||s===void 0?void 0:s[t])!==null&&o!==void 0?o:_u[t])!==null&&a!==void 0?a:!1)}return!1}function Su(e){if(e.experimental==="all")return ar.experimental;var t;return Object.keys((t=e==null?void 0:e.experimental)!==null&&t!==void 0?t:{}).filter(n=>ar.experimental.includes(n)&&e.experimental[n])}function C0(e){if(process.env.JEST_WORKER_ID===void 0&&Su(e).length>0){let t=Su(e).map(n=>I0.default.yellow(n)).join(", ");R0.default.warn("experimental-flags-enabled",[`You have enabled experimental features: ${t}`,"Experimental features in Tailwind CSS are not covered by semver, may introduce breaking changes, and can change at any time."])}}var D0=ar});var Eu=I(to=>{"use strict";c();Object.defineProperty(to,"__esModule",{value:!0});Object.defineProperty(to,"default",{enumerable:!0,get:()=>Ou});var F0=M0(Mn()),N0=Tu();function M0(e){return e&&e.__esModule?e:{default:e}}function Ou(e){var t;let n=((t=e==null?void 0:e.presets)!==null&&t!==void 0?t:[F0.default]).slice().reverse().flatMap(s=>Ou(typeof s=="function"?s():s)),r={respectDefaultRingColorOpacity:{theme:{ringColor:{DEFAULT:"#3b82f67f"}}}},i=Object.keys(r).filter(s=>(0,N0.flagEnabled)(e,s)).map(s=>r[s]);return[e,...i,...n]}});var Au=I(ro=>{"use strict";c();Object.defineProperty(ro,"__esModule",{value:!0});Object.defineProperty(ro,"default",{enumerable:!0,get:()=>q0});var W0=Pu(yu()),$0=Pu(Eu());function Pu(e){return e&&e.__esModule?e:{default:e}}function q0(...e){let[,...t]=(0,$0.default)(e[0]);return(0,W0.default)([...e,...t])}});var Ru=I((fv,Iu)=>{c();var no=Au();Iu.exports=(no.__esModule?no:{default:no}).default});var sm={};wr(sm,{default:()=>_o,init:()=>Do});module.exports=xt(sm);c();c();c();var lt;function Do(e){lt=e}var wt=null;async function Fe(){return lt||(wt?(await wt,lt):(wt=Promise.resolve().then(()=>(Co(),Lo)).then(e=>e.getYogaModule()).then(e=>lt=e),await wt,wt=null,lt))}c();c();c();var _t=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pl=_t((e,t)=>{t.exports=["em","ex","ch","rem","vh","vw","vmin","vmax","px","mm","cm","in","pt","pc","mozmm"]}),hl=_t((e,t)=>{t.exports=["deg","grad","rad","turn"]}),ml=_t((e,t)=>{t.exports=["dpi","dpcm","dppx"]}),gl=_t((e,t)=>{t.exports=["Hz","kHz"]}),vl=_t((e,t)=>{t.exports=["s","ms"]}),bl=pl(),Fo=hl(),No=ml(),Mo=gl(),Wo=vl();function cn(e){if(/\.\D?$/.test(e))throw new Error("The dot should be followed by a number");if(/^[+-]{2}/.test(e))throw new Error("Only one leading +/- is allowed");if(yl(e)>1)throw new Error("Only one dot is allowed");if(/%$/.test(e)){this.type="percentage",this.value=fn(e),this.unit="%";return}var t=wl(e);if(!t){this.type="number",this.value=fn(e);return}this.type=Sl(t),this.value=fn(e.substr(0,e.length-t.length)),this.unit=t}cn.prototype.valueOf=function(){return this.value};cn.prototype.toString=function(){return this.value+(this.unit||"")};function Ge(e){return new cn(e)}function yl(e){var t=e.match(/\./g);return t?t.length:0}function fn(e){var t=parseFloat(e);if(isNaN(t))throw new Error("Invalid number: "+e);return t}var xl=[].concat(Fo,Mo,bl,No,Wo);function wl(e){var t=e.match(/\D+$/),n=t&&t[0];if(n&&xl.indexOf(n)===-1)throw new Error("Invalid unit: "+n);return n}var _l=Object.assign(_r(Fo,"angle"),_r(Mo,"frequency"),_r(No,"resolution"),_r(Wo,"time"));function _r(e,t){return Object.fromEntries(e.map(n=>[n,t]))}function Sl(e){return _l[e]||"length"}var $o=ut(require("linebreak"),1);function mn(e){let t=typeof e;return!(t==="number"||t==="bigint"||t==="string"||t==="boolean")}function qo(e){return/^class\s/.test(e.toString())}function Bo(e){return"dangerouslySetInnerHTML"in e}function Uo(e){let t=typeof e>"u"?[]:[].concat(e).flat(1/0),n=[];for(let r=0;r<t.length;r++){let i=t[r];typeof i>"u"||typeof i=="boolean"||i===null||(typeof i=="number"&&(i=String(i)),typeof i=="string"&&n.length&&typeof n[n.length-1]=="string"?n[n.length-1]+=i:n.push(i))}return n}function ye(e,t,n,r,i=!1){if(typeof e=="number")return e;try{if(e=e.trim(),/[ /\(,]/.test(e))return;if(e===String(+e))return+e;let s=new Ge(e);if(s.type==="length")switch(s.unit){case"em":return s.value*t;case"rem":return s.value*16;case"vw":return~~(s.value*r._viewportWidth/100);case"vh":return~~(s.value*r._viewportHeight/100);default:return s.value}else if(s.type==="angle")switch(s.unit){case"deg":return s.value;case"rad":return s.value*180/Math.PI;default:return s.value}else if(s.type==="percentage"&&i)return s.value/100*n}catch{}}function St(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}function de(e,t,n,r){let i=t[e];if(typeof i>"u"){if(r&&typeof e<"u")throw new Error(`Invalid value for CSS property "${r}". Allowed values: ${Object.keys(t).map(s=>`"${s}"`).join(" | ")}. Received: "${e}".`);i=n}return i}var dn,pn,zo=[32,160,4961,65792,65793,4153,4241,10].map(e=>String.fromCodePoint(e));function ce(e,t,n){if(!dn||!pn){if(!(typeof Intl<"u"&&"Segmenter"in Intl))throw new Error("Intl.Segmenter does not exist, please use import a polyfill.");dn=new Intl.Segmenter(n,{granularity:"word"}),pn=new Intl.Segmenter(n,{granularity:"grapheme"})}return t==="word"?[...dn.segment(e)].map(r=>r.segment):[...pn.segment(e)].map(r=>r.segment)}function A(e,t,n){let r="";for(let[i,s]of Object.entries(t))typeof s<"u"&&(r+=` ${i}="${s}"`);return n?`<${e}${r}>${n}</${e}>`:`<${e}${r}/>`}function Go(e=20){let t=new Map;function n(i,s){if(t.size>=e){let o=t.keys().next().value;t.delete(o)}t.set(i,s)}function r(i){if(!t.has(i))return;let o=t.get(i);return t.delete(i),t.set(i,o),o}return{set:n,get:r}}var jo={accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlLang:"xml:lang",xmlSpace:"xml:space",xmlnsXlink:"xmlns:xlink"},kl=/[\r\n%#()<>?[\\\]^`{|}"']/g;function hn(e,t){if(!e)return"";if(Array.isArray(e))return e.map(a=>hn(a,t)).join("");if(typeof e!="object")return String(e);let n=e.type;if(n==="text")throw new Error("<text> nodes are not currently supported, please convert them to <path>");let{children:r,style:i,...s}=e.props||{},o=(i==null?void 0:i.color)||t;return`<${n}${Object.entries(s).map(([a,u])=>(typeof u=="string"&&u.toLowerCase()==="currentcolor"&&(u=o),` ${jo[a]||a}="${u}"`)).join("")}>${hn(r,o)}</${n}>`}function kt(e){return e?e.split(/[, ]/).filter(Boolean).map(Number):null}function Vo(e,t){let{viewBox:n,viewbox:r,width:i,height:s,className:o,style:a,children:u,...l}=e.props||{};n||=r,l.xmlns="http://www.w3.org/2000/svg";let f=(a==null?void 0:a.color)||t,d=kt(n),g=d?d[3]/d[2]:null;return i=i||g&&s?s/g:null,s=s||g&&i?i*g:null,l.width=i,l.height=s,n&&(l.viewBox=n),`data:image/svg+xml;utf8,${`<svg ${Object.entries(l).map(([h,p])=>(typeof p=="string"&&p.toLowerCase()==="currentcolor"&&(p=f),` ${jo[h]||h}="${p}"`)).join("")}>${hn(u,f)}</svg>`.replace(kl,encodeURIComponent)}`}function Tl(e){return Object.prototype.toString.call(e)}function Ho(e){return typeof e=="string"}function Yo(e){return Tl(e)==="[object Undefined]"}function Xo(e,t){if(t==="break-all")return{words:ce(e,"grapheme"),requiredBreaks:[]};if(t==="keep-all")return{words:ce(e,"word"),requiredBreaks:[]};let n=new $o.default(e),r=0,i=n.nextBreak(),s=[],o=[!1];for(;i;){let a=e.slice(r,i.position);s.push(a),i.required?o.push(!0):o.push(!1),r=i.position,i=n.nextBreak()}return{words:s,requiredBreaks:o}}c();c();var xe="flex",Qo={p:{display:xe,marginTop:"1em",marginBottom:"1em"},div:{display:xe},blockquote:{display:xe,marginTop:"1em",marginBottom:"1em",marginLeft:40,marginRight:40},center:{display:xe,textAlign:"center"},hr:{display:xe,marginTop:"0.5em",marginBottom:"0.5em",marginLeft:"auto",marginRight:"auto",borderWidth:1,borderStyle:"solid"},h1:{display:xe,fontSize:"2em",marginTop:"0.67em",marginBottom:"0.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h2:{display:xe,fontSize:"1.5em",marginTop:"0.83em",marginBottom:"0.83em",marginLeft:0,marginRight:0,fontWeight:"bold"},h3:{display:xe,fontSize:"1.17em",marginTop:"1em",marginBottom:"1em",marginLeft:0,marginRight:0,fontWeight:"bold"},h4:{display:xe,marginTop:"1.33em",marginBottom:"1.33em",marginLeft:0,marginRight:0,fontWeight:"bold"},h5:{display:xe,fontSize:"0.83em",marginTop:"1.67em",marginBottom:"1.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h6:{display:xe,fontSize:"0.67em",marginTop:"2.33em",marginBottom:"2.33em",marginLeft:0,marginRight:0,fontWeight:"bold"},u:{textDecoration:"underline"},strong:{fontWeight:"bold"},b:{fontWeight:"bold"},i:{fontStyle:"italic"},em:{fontStyle:"italic"},code:{fontFamily:"monospace"},kbd:{fontFamily:"monospace"},pre:{display:xe,fontFamily:"monospace",whiteSpace:"pre",marginTop:"1em",marginBottom:"1em"},mark:{backgroundColor:"yellow",color:"black"},big:{fontSize:"larger"},small:{fontSize:"smaller"},s:{textDecoration:"line-through"}};c();var Ol=new Set(["color","font","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","textAlign","textTransform","textShadowOffset","textShadowColor","textShadowRadius","textDecorationLine","textDecorationStyle","textDecorationColor","whiteSpace","transform","wordBreak","opacity","filter","_viewportWidth","_viewportHeight","_inheritedClipPathId","_inheritedMaskId","_inheritedBackgroundClipTextPath"]);function gn(e){let t={};for(let n in e)Ol.has(n)&&(t[n]=e[n]);return t}c();var Oe=require("css-to-react-native"),es=require("css-background-parser"),ts=require("css-box-shadow");c();var Ko=ut(require("postcss-value-parser"),1);function El(e,t){try{let n=new Ge(e);switch(n.unit){case"px":return{absolute:n.value};case"em":return{absolute:n.value*t};case"rem":return{absolute:n.value*16};case"%":return{relative:n.value};default:return{}}}catch{return{}}}function vn(e,t,n){switch(e){case"top":return{yRelative:0};case"left":return{xRelative:0};case"right":return{xRelative:100};case"bottom":return{yRelative:100};case"center":return{};default:{let r=El(e,t);return r.absolute?{[n?"xAbsolute":"yAbsolute"]:r.absolute}:r.relative?{[n?"xRelative":"yRelative"]:r.relative}:{}}}}function bn(e,t){if(typeof e=="number")return{xAbsolute:e};let n;try{n=(0,Ko.default)(e).nodes.filter(r=>r.type==="word").map(r=>r.value)}catch{return{}}return n.length===1?vn(n[0],t,!0):n.length===2?((n[0]==="top"||n[0]==="bottom"||n[1]==="left"||n[1]==="right")&&n.reverse(),{...vn(n[0],t,!0),...vn(n[1],t,!1)}):{}}var Pl=new Set(["flex","flexGrow","flexShrink","flexBasis","fontWeight","lineHeight","opacity","scale","scaleX","scaleY"]),Al=new Set(["lineHeight"]);function Il(e,t,n,r){return e==="textDecoration"&&!n.includes(t.textDecorationColor)&&(t.textDecorationColor=r),t}function Tt(e,t){return typeof t=="number"?Pl.has(e)?Al.has(e)?t:String(t):t+"px":t}function Rl(e,t,n){if(e==="lineHeight")return{lineHeight:Tt(e,t)};if(e==="fontFamily")return{fontFamily:t.split(",").map(r=>r.trim().replace(/(^['"])|(['"]$)/g,"").toLocaleLowerCase())};if(e==="borderRadius"){if(typeof t!="string"||!t.includes("/"))return;let[r,i]=t.split("/"),s=(0,Oe.getStylesForProperty)(e,r,!0),o=(0,Oe.getStylesForProperty)(e,i,!0);for(let a in s)o[a]=Tt(e,s[a])+" "+Tt(e,o[a]);return o}if(/^border(Top|Right|Bottom|Left)?$/.test(e)){let r=(0,Oe.getStylesForProperty)("border",t,!0);r.borderWidth===1&&!String(t).includes("1px")&&(r.borderWidth=3),r.borderColor==="black"&&!String(t).includes("black")&&(r.borderColor=n);let i={Width:Tt(e+"Width",r.borderWidth),Style:de(r.borderStyle,{solid:"solid",dashed:"dashed"},"solid",e+"Style"),Color:r.borderColor},s={};for(let o of e==="border"?["Top","Right","Bottom","Left"]:[e.slice(6)])for(let a in i)s["border"+o+a]=i[a];return s}if(e==="boxShadow"){if(!t)throw new Error('Invalid `boxShadow` value: "'+t+'".');return{[e]:typeof t=="string"?(0,ts.parse)(t):t}}if(e==="transform"){if(typeof t!="string")throw new Error("Invalid `transform` value.");let r={},i=t.replace(/(-?[\d.]+%)/g,(o,a)=>{let u=~~(Math.random()*1e9);return r[u]=a,u+"px"}),s=(0,Oe.getStylesForProperty)("transform",i,!0);for(let o of s.transform)for(let a in o)r[o[a]]&&(o[a]=r[o[a]]);return s}if(e==="background")return t=t.toString().trim(),/^(linear-gradient|radial-gradient|url)\(/.test(t)?(0,Oe.getStylesForProperty)("backgroundImage",t,!0):(0,Oe.getStylesForProperty)("background",t,!0);if(e==="textShadow"&&(t=t.toString().trim(),t.includes(","))){let r=t.split(","),i={};for(let s of r){let o=(0,Oe.getStylesForProperty)("textShadow",s,!0);for(let a in o)i[a]?i[a].push(o[a]):i[a]=[o[a]]}return i}}function Jo(e){return e==="transform"?" Only absolute lengths such as `10px` are supported.":""}var Zo=/rgb\((\d+)\s+(\d+)\s+(\d+)\s*\/\s*([\.\d]+)\)/;function rs(e){if(typeof e=="string"&&Zo.test(e.trim()))return e.trim().replace(Zo,(t,n,r,i,s)=>`rgba(${n}, ${r}, ${i}, ${s})`);if(typeof e=="object"&&e!==null){for(let t in e)e[t]=rs(e[t]);return e}return e}function Sr(e,t){let n={};if(e){let i=Ll(e.color,t.color);n.color=i;for(let s in e){if(s.startsWith("_")){n[s]=e[s];continue}if(s==="color")continue;let o=(0,Oe.getPropertyName)(s),a=Dl(e[s],i);try{let u=Rl(o,a,i)||Il(o,(0,Oe.getStylesForProperty)(o,Tt(o,a),!0),a,i);Object.assign(n,u)}catch(u){throw new Error(u.message+(u.message.includes(a)?`
|
|
4
4
|
`+Jo(o):`
|
|
5
|
-
in CSS rule \`${o}: ${a}\`.${Jo(o)}`))}}}if(n.backgroundImage){let{backgrounds:i}=(0,es.parseElementStyle)(n);n.backgroundImage=i}let r=typeof n.fontSize=="number"?n.fontSize:t.fontSize;if(typeof r=="string")try{let i=new Ge(r);switch(i.unit){case"em":r=i.value*t.fontSize;break;case"rem":r=i.value*16;break}}catch{r=16}typeof n.fontSize<"u"&&(n.fontSize=r),n.transformOrigin&&(n.transformOrigin=bn(n.transformOrigin,r));for(let i in n){let s=n[i];if(i==="lineHeight")typeof s=="string"&&(s=n[i]=ye(s,r,r,t,!0)/r);else{if(typeof s=="string"){let o=ye(s,r,r,t);typeof o<"u"&&(n[i]=o),s=n[i]}if(typeof s=="string"||typeof s=="object"){let o=rs(s);o&&(n[i]=o),s=n[i]}}if(i==="opacity"&&(s=n[i]=s*t.opacity),i==="transform"){let o=s;for(let a of o){let u=Object.keys(a)[0],l=a[u],f=typeof l=="string"?ye(l,r,r,t)??l:l;a[u]=f}}}return n}function Ll(e,t){return e&&e.toLowerCase()!=="currentcolor"?e:t}function Cl(e,t){return e.replace(/currentcolor/gi,t)}function Dl(e,t){return Ho(e)&&(e=Cl(e,t)),e}c();var Fl="image/avif",Nl="image/webp",kr="image/png",Tr="image/jpeg",Or="image/gif",xn="image/svg+xml";function ss(e){let t=new DataView(e),n=4,r=t.byteLength;for(;n<r;){let i=t.getUint16(n,!1);if(i>r)throw new TypeError("Invalid JPEG");let s=t.getUint8(i+1+n);if(s===192||s===193||s===194)return[t.getUint16(i+7+n,!1),t.getUint16(i+5+n,!1)];n+=i+2}throw new TypeError("Invalid JPEG")}function as(e){let t=new Uint8Array(e.slice(6,10));return[t[0]|t[1]<<8,t[2]|t[3]<<8]}function us(e){let t=new DataView(e);return[t.getUint16(18,!1),t.getUint16(22,!1)]}var ns=Go(100),yn=new Map,Ml=[kr,Tr,Or,xn];function Wl(e){let t="",n=new Uint8Array(e);for(let r=0;r<n.byteLength;r++)t+=String.fromCharCode(n[r]);return btoa(t)}function $l(e){let t=atob(e),n=t.length,r=new Uint8Array(n);for(let i=0;i<n;i++)r[i]=t.charCodeAt(i);return r.buffer}function is(e,t){let n=t.match(/<svg[^>]*>/)[0],r=n.match(/viewBox=['"](.+)['"]/),i=r?kt(r[1]):null,s=n.match(/width=['"](\d*\.\d+|\d+)['"]/),o=n.match(/height=['"](\d*\.\d+|\d+)['"]/);if(!i&&(!s||!o))throw new Error(`Failed to parse SVG from ${e}: missing "viewBox"`);let a=i?[i[2],i[3]]:[+s[1],+o[1]],u=a[0]/a[1];return s&&o?[+s[1],+o[1]]:s?[+s[1],+s[1]/u]:o?[+o[1]*u,+o[1]]:[a[0],a[1]]}function os(e){let t,n=ql(new Uint8Array(e));switch(n){case kr:t=us(e);break;case Or:t=as(e);break;case Tr:t=ss(e);break}if(!Ml.includes(n))throw new Error(`Unsupported image type: ${n||"unknown"}`);return[`data:${n};base64,${Wl(e)}`,t]}async function Er(e){if(!e)throw new Error("Image source is not provided.");if(typeof e=="object"){let[i,s]=os(e);return[i,...s]}if((e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))&&(e=e.slice(1,-1)),e.startsWith("data:")){let i;try{i=/data:(?<imageType>[a-z/+]+)(;(?<encodingType>base64|utf8))?,(?<dataString>.*)/g.exec(e).groups}catch{return console.warn("Image data URI resolved without size:"+e),[e]}let{imageType:s,encodingType:o,dataString:a}=i;if(s===xn){let u=o==="base64"?atob(a):decodeURIComponent(a.replace(/ /g,"%20")),l=o==="base64"?e:`data:image/svg+xml;base64,${btoa(u)}`,f=is(e,u);return[l,...f]}else if(o==="base64"){let u,l=$l(a);switch(s){case kr:u=us(l);break;case Or:u=as(l);break;case Tr:u=ss(l);break}return[e,...u]}else return console.warn("Image data URI resolved without size:"+e),[e]}if(!globalThis.fetch)throw new Error("`fetch` is required to be polyfilled to load images.");if(yn.has(e))return yn.get(e);let t=ns.get(e);if(t)return t;let n=e,r=fetch(n).then(i=>{let s=i.headers.get("content-type");return s==="image/svg+xml"||s==="application/svg+xml"?i.text():i.arrayBuffer()}).then(i=>{if(typeof i=="string")try{let a=`data:image/svg+xml;base64,${btoa(i)}`,u=is(n,i);return[a,...u]}catch(a){throw new Error(`Failed to parse SVG image: ${a.message}`)}let[s,o]=os(i);return[s,...o]}).then(i=>(ns.set(n,i),i)).catch(i=>(console.error(`Can't load image ${n}: `+i.message),[]));return yn.set(n,r),r}function ql(e){return[255,216,255].every((t,n)=>e[n]===t)?Tr:[137,80,78,71,13,10,26,10].every((t,n)=>e[n]===t)?kr:[71,73,70,56].every((t,n)=>e[n]===t)?Or:[82,73,70,70,0,0,0,0,87,69,66,80].every((t,n)=>!t||e[n]===t)?Nl:[60,63,120,109,108].every((t,n)=>e[n]===t)?xn:[0,0,0,0,102,116,121,112,97,118,105,102].every((t,n)=>!t||e[n]===t)?Fl:null}async function wn(e,t,n,r,i){let s=await Fe(),o={...n,...Sr(Qo[t],n),...Sr(r,n)};if(t==="img"){let[a,u,l]=await Er(i.src);if(u===void 0&&l===void 0){if(i.width===void 0||i.height===void 0)throw new Error("Image size cannot be determined. Please provide the width and height of the image.");u=parseInt(i.width),l=parseInt(i.height)}let f=l/u,d=(o.borderLeftWidth||0)+(o.borderRightWidth||0)+(o.paddingLeft||0)+(o.paddingRight||0),g=(o.borderTopWidth||0)+(o.borderBottomWidth||0)+(o.paddingTop||0)+(o.paddingBottom||0),h=o.width||i.width,p=o.height||i.height,v=typeof h!="string"&&typeof p!="string";typeof h=="number"&&v&&(h-=d),typeof p=="number"&&v&&(p-=g),h===void 0&&p===void 0?(h=u,p=l):h===void 0?typeof p=="number"?h=p/f:e.setAspectRatio(1/f):p===void 0&&(typeof h=="number"?p=h*f:e.setAspectRatio(1/f)),o.width=v?h+d:h,o.height=v?p+g:p,o.__src=a}if(t==="svg"){let a=i.viewBox||i.viewbox,u=kt(a),l=u?u[3]/u[2]:null,{width:f,height:d}=i;typeof f>"u"&&d?l==null?f=0:typeof d=="string"&&d.endsWith("%")?f=parseInt(d)/l+"%":(d=ye(d,n.fontSize,1,n),f=d/l):typeof d>"u"&&f?l==null?f=0:typeof f=="string"&&f.endsWith("%")?d=parseInt(f)*l+"%":(f=ye(f,n.fontSize,1,n),d=f*l):(typeof f<"u"&&(f=ye(f,n.fontSize,1,n)||f),typeof d<"u"&&(d=ye(d,n.fontSize,1,n)||d),f||=u==null?void 0:u[2],d||=u==null?void 0:u[3]),!o.width&&f&&(o.width=f),!o.height&&d&&(o.height=d)}return e.setDisplay(de(o.display,{flex:s.DISPLAY_FLEX,none:s.DISPLAY_NONE},s.DISPLAY_FLEX,"display")),e.setAlignContent(de(o.alignContent,{stretch:s.ALIGN_STRETCH,center:s.ALIGN_CENTER,"flex-start":s.ALIGN_FLEX_START,"flex-end":s.ALIGN_FLEX_END,"space-between":s.ALIGN_SPACE_BETWEEN,"space-around":s.ALIGN_SPACE_AROUND,baseline:s.ALIGN_BASELINE,normal:s.ALIGN_AUTO},s.ALIGN_AUTO,"alignContent")),e.setAlignItems(de(o.alignItems,{stretch:s.ALIGN_STRETCH,center:s.ALIGN_CENTER,"flex-start":s.ALIGN_FLEX_START,"flex-end":s.ALIGN_FLEX_END,baseline:s.ALIGN_BASELINE,normal:s.ALIGN_AUTO},s.ALIGN_STRETCH,"alignItems")),e.setAlignSelf(de(o.alignSelf,{stretch:s.ALIGN_STRETCH,center:s.ALIGN_CENTER,"flex-start":s.ALIGN_FLEX_START,"flex-end":s.ALIGN_FLEX_END,baseline:s.ALIGN_BASELINE,normal:s.ALIGN_AUTO},s.ALIGN_AUTO,"alignSelf")),e.setJustifyContent(de(o.justifyContent,{center:s.JUSTIFY_CENTER,"flex-start":s.JUSTIFY_FLEX_START,"flex-end":s.JUSTIFY_FLEX_END,"space-between":s.JUSTIFY_SPACE_BETWEEN,"space-around":s.JUSTIFY_SPACE_AROUND},s.JUSTIFY_FLEX_START,"justifyContent")),e.setFlexDirection(de(o.flexDirection,{row:s.FLEX_DIRECTION_ROW,column:s.FLEX_DIRECTION_COLUMN,"row-reverse":s.FLEX_DIRECTION_ROW_REVERSE,"column-reverse":s.FLEX_DIRECTION_COLUMN_REVERSE},s.FLEX_DIRECTION_ROW,"flexDirection")),e.setFlexWrap(de(o.flexWrap,{wrap:s.WRAP_WRAP,nowrap:s.WRAP_NO_WRAP,"wrap-reverse":s.WRAP_WRAP_REVERSE},s.WRAP_NO_WRAP,"flexWrap")),typeof o.gap<"u"&&e.setGap(s.GUTTER_ALL,o.gap),typeof o.rowGap<"u"&&e.setGap(s.GUTTER_ROW,o.rowGap),typeof o.columnGap<"u"&&e.setGap(s.GUTTER_COLUMN,o.columnGap),typeof o.flexBasis<"u"&&e.setFlexBasis(o.flexBasis),e.setFlexGrow(typeof o.flexGrow>"u"?0:o.flexGrow),e.setFlexShrink(typeof o.flexShrink>"u"?0:o.flexShrink),typeof o.maxHeight<"u"&&e.setMaxHeight(o.maxHeight),typeof o.maxWidth<"u"&&e.setMaxWidth(o.maxWidth),typeof o.minHeight<"u"&&e.setMinHeight(o.minHeight),typeof o.minWidth<"u"&&e.setMinWidth(o.minWidth),e.setOverflow(de(o.overflow,{visible:s.OVERFLOW_VISIBLE,hidden:s.OVERFLOW_HIDDEN},s.OVERFLOW_VISIBLE,"overflow")),e.setMargin(s.EDGE_TOP,o.marginTop||0),e.setMargin(s.EDGE_BOTTOM,o.marginBottom||0),e.setMargin(s.EDGE_LEFT,o.marginLeft||0),e.setMargin(s.EDGE_RIGHT,o.marginRight||0),e.setBorder(s.EDGE_TOP,o.borderTopWidth||0),e.setBorder(s.EDGE_BOTTOM,o.borderBottomWidth||0),e.setBorder(s.EDGE_LEFT,o.borderLeftWidth||0),e.setBorder(s.EDGE_RIGHT,o.borderRightWidth||0),e.setPadding(s.EDGE_TOP,o.paddingTop||0),e.setPadding(s.EDGE_BOTTOM,o.paddingBottom||0),e.setPadding(s.EDGE_LEFT,o.paddingLeft||0),e.setPadding(s.EDGE_RIGHT,o.paddingRight||0),e.setPositionType(de(o.position,{absolute:s.POSITION_TYPE_ABSOLUTE,relative:s.POSITION_TYPE_RELATIVE},s.POSITION_TYPE_RELATIVE,"position")),typeof o.top<"u"&&e.setPosition(s.EDGE_TOP,o.top),typeof o.bottom<"u"&&e.setPosition(s.EDGE_BOTTOM,o.bottom),typeof o.left<"u"&&e.setPosition(s.EDGE_LEFT,o.left),typeof o.right<"u"&&e.setPosition(s.EDGE_RIGHT,o.right),typeof o.height<"u"?e.setHeight(o.height):e.setHeightAuto(),typeof o.width<"u"?e.setWidth(o.width):e.setWidthAuto(),[o,gn(o)]}c();c();c();var ls=[1,0,0,1,0,0];function Bl(e,t,n){let r=[...ls];for(let i of e){let s=Object.keys(i)[0],o=i[s];if(typeof o=="string")if(s==="translateX")o=parseFloat(o)/100*t,i[s]=o;else if(s==="translateY")o=parseFloat(o)/100*n,i[s]=o;else throw new Error(`Invalid transform: "${s}: ${o}".`);let a=o,u=[...ls];switch(s){case"translateX":u[4]=a;break;case"translateY":u[5]=a;break;case"scale":u[0]=a,u[3]=a;break;case"scaleX":u[0]=a;break;case"scaleY":u[3]=a;break;case"rotate":{let l=a*Math.PI/180,f=Math.cos(l),d=Math.sin(l);u[0]=f,u[1]=d,u[2]=-d,u[3]=f;break}case"skewX":u[2]=Math.tan(a*Math.PI/180);break;case"skewY":u[1]=Math.tan(a*Math.PI/180);break}r=St(u,r)}e.splice(0,e.length),e.push(...r),e.__resolved=!0}function Ot({left:e,top:t,width:n,height:r},i,s,o){let a;i.__resolved||Bl(i,n,r);let u=i;if(s)a=u;else{let l=(o==null?void 0:o.xAbsolute)??((o==null?void 0:o.xRelative)??50)*n/100,f=(o==null?void 0:o.yAbsolute)??((o==null?void 0:o.yRelative)??50)*r/100,d=e+l,g=t+f;a=St([1,0,0,1,d,g],St(u,[1,0,0,1,-d,-g])),u.__parent&&(a=St(u.__parent,a)),u.splice(0,6,...a)}return`matrix(${a.map(l=>l.toFixed(2)).join(",")})`}function fs({left:e,top:t,width:n,height:r,isInheritingTransform:i},s){let o="",a=1;return s.transform&&(o=Ot({left:e,top:t,width:n,height:r},s.transform,i,s.transformOrigin)),s.opacity!==void 0&&(a=+s.opacity),{matrix:o,opacity:a}}function _n({id:e,content:t,filter:n,left:r,top:i,width:s,height:o,matrix:a,opacity:u,image:l,clipPathId:f,debug:d,shape:g,decorationShape:h},p){let v="";if(d&&(v=A("rect",{x:r,y:i-o,width:s,height:o,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:a||void 0,"clip-path":f?`url(#${f})`:void 0})),l){let b={href:l,x:r,y:i,width:s,height:o,transform:a||void 0,"clip-path":f?`url(#${f})`:void 0,style:p.filter?`filter:${p.filter}`:void 0};return[(n?`${n}<g filter="url(#satori_s-${e})">`:"")+A("image",{...b,opacity:u!==1?u:void 0})+(h||"")+(n?"</g>":"")+v,""]}let w={x:r,y:i,width:s,height:o,"font-weight":p.fontWeight,"font-style":p.fontStyle,"font-size":p.fontSize,"font-family":p.fontFamily,"letter-spacing":p.letterSpacing||void 0,transform:a||void 0,"clip-path":f?`url(#${f})`:void 0,style:p.filter?`filter:${p.filter}`:void 0};return[(n?`${n}<g filter="url(#satori_s-${e})">`:"")+A("text",{...w,fill:p.color,opacity:u!==1?u:void 0},t)+(h||"")+(n?"</g>":"")+v,g?A("text",w,t):""]}c();function Ul(e,t,n){return e.replace(/([MA])([0-9.-]+),([0-9.-]+)/g,function(r,i,s,o){return i+(parseFloat(s)+t)+","+(parseFloat(o)+n)})}var Pr=1.1;function cs({id:e,width:t,height:n},r){if(!r.shadowColor||!r.shadowOffset||typeof r.shadowRadius>"u")return"";let i=r.shadowColor.length,s="",o="",a=0,u=t,l=0,f=n;for(let d=0;d<i;d++){let g=r.shadowRadius[d]*r.shadowRadius[d]/4;a=Math.min(r.shadowOffset[d].width-g,a),u=Math.max(r.shadowOffset[d].width+g+t,u),l=Math.min(r.shadowOffset[d].height-g,l),f=Math.max(r.shadowOffset[d].height+g+n,f),s+=A("feDropShadow",{dx:r.shadowOffset[d].width,dy:r.shadowOffset[d].height,stdDeviation:r.shadowRadius[d]/2,"flood-color":r.shadowColor[d],"flood-opacity":1,...i>1?{in:"SourceGraphic",result:`satori_s-${e}-result-${d}`}:{}}),i>1&&(o=A("feMergeNode",{in:`satori_s-${e}-result-${d}`})+o)}return A("filter",{id:`satori_s-${e}`,x:(a/t*100*Pr).toFixed(2)+"%",y:(l/n*100*Pr).toFixed(2)+"%",width:((u-a)/t*100*Pr).toFixed(2)+"%",height:((f-l)/n*100*Pr).toFixed(2)+"%"},s+(o?A("feMerge",{},o):""))}function ds({width:e,height:t,shape:n,opacity:r,id:i},s){if(!s.boxShadow)return null;let o="",a="";for(let u=s.boxShadow.length-1;u>=0;u--){let l="",f=s.boxShadow[u];f.spreadRadius&&f.inset&&(f.spreadRadius=-f.spreadRadius);let d=f.blurRadius*f.blurRadius/4+(f.spreadRadius||0),g=Math.min(-d-(f.inset?f.offsetX:0),0),h=Math.max(d+e-(f.inset?f.offsetX:0),e),p=Math.min(-d-(f.inset?f.offsetY:0),0),v=Math.max(d+t-(f.inset?f.offsetY:0),t),w=`satori_s-${i}-${u}`,b=`satori_ms-${i}-${u}`,y=f.spreadRadius?n.replace('stroke-width="0"',`stroke-width="${f.spreadRadius*2}"`):n;l+=A("mask",{id:b,maskUnits:"userSpaceOnUse"},A("rect",{x:0,y:0,width:s._viewportWidth||"100%",height:s._viewportHeight||"100%",fill:f.inset?"#000":"#fff"})+y.replace('fill="#fff"',f.inset?'fill="#fff"':'fill="#000"').replace('stroke="#fff"',""));let _=y.replace(/d="([^"]+)"/,(O,k)=>'d="'+Ul(k,f.offsetX,f.offsetY)+'"').replace(/x="([^"]+)"/,(O,k)=>'x="'+(parseFloat(k)+f.offsetX)+'"').replace(/y="([^"]+)"/,(O,k)=>'y="'+(parseFloat(k)+f.offsetY)+'"');f.spreadRadius&&f.spreadRadius<0&&(l+=A("mask",{id:b+"-neg",maskUnits:"userSpaceOnUse"},_.replace('stroke="#fff"','stroke="#000"').replace(/stroke-width="[^"]+"/,`stroke-width="${-f.spreadRadius*2}"`))),f.spreadRadius&&f.spreadRadius<0&&(_=A("g",{mask:`url(#${b}-neg)`},_)),l+=A("defs",{},A("filter",{id:w,x:`${g/e*100}%`,y:`${p/t*100}%`,width:`${(h-g)/e*100}%`,height:`${(v-p)/t*100}%`},A("feGaussianBlur",{stdDeviation:f.blurRadius/2,result:"b"})+A("feFlood",{"flood-color":f.color,in:"SourceGraphic",result:"f"})+A("feComposite",{in:"f",in2:"b",operator:f.inset?"out":"in"})))+A("g",{mask:`url(#${b})`,filter:`url(#${w})`,opacity:r},_),f.inset?a+=l:o+=l}return[o,a]}c();function Sn({width:e,left:t,top:n,ascender:r,clipPathId:i},s){let{textDecorationColor:o,textDecorationStyle:a,textDecorationLine:u,fontSize:l}=s;if(!u||u==="none")return"";let f=Math.max(1,l*.1),d=u==="line-through"?n+r*.5:u==="underline"?n+r*1.1:n,g=a==="dashed"?`${f*1.2} ${f*2}`:a==="dotted"?`0 ${f*2}`:void 0;return A("line",{x1:t,y1:d,x2:t+e,y2:d,stroke:o,"stroke-width":f,"stroke-dasharray":g,"stroke-linecap":a==="dotted"?"round":"square","clip-path":i?`url(#${i})`:void 0})}async function*kn(e,t){var Ao;let n=await Fe(),{parentStyle:r,inheritedStyle:i,parent:s,font:o,id:a,isInheritingTransform:u,debug:l,embedFont:f,graphemeImages:d,locale:g,canLoadAdditionalAssets:h}=t,{textAlign:p,textOverflow:v,whiteSpace:w,wordBreak:b,lineHeight:y,textTransform:_,textWrap:O,fontSize:k,filter:C,_inheritedBackgroundClipTextPath:D}=r;e=zl(e,_,g);let{content:L,shouldCollapseWhitespace:z,allowSoftWrap:G}=jl(e,w),{words:J,requiredBreaks:j,allowBreakWord:V}=Gl(L,b),re=Vl(n,p);s.insertChild(re,s.getChildCount()),Yo(r.flexShrink)&&s.setFlexShrink(1);let $=o.getEngine(k,y,r,g),ue=h?ce(e,"grapheme").filter(W=>!$.has(W)):[];yield ue.map(W=>({word:W,locale:g})),ue.length&&($=o.getEngine(k,y,r,g));let Le=Hl($,r);function R(W){return!!(d&&d[W])}function M(W){let q=0;for(let N of W)R(N)?q+=k:q+=Le(N);return q}let H=W=>{if(W.length===0)return{originWidth:0,endingSpacesWidth:0};let q=M(ce(W,"grapheme")),N=W.trimEnd()===W?q:M(ce(W.trimEnd(),"grapheme"));return{originWidth:q,endingSpacesWidth:q-N}},F=[],ge=[],Pe=[],vt=[],$e=[];function tn(W){let q=0,N=0,ve=0,le=-1,fe=0,te=0,ie=0;F=[],Pe=[0],vt=[],$e=[];let De=0;for(;De<J.length;){let X=J[De],Xe=j[De],be=0,Ue=0,{originWidth:yt,endingSpacesWidth:Qe}=H(X);be=yt,Ue=Qe,Xe&&te===0&&(te=$.height(X));let oe=",.!?:-@)>]}%#".indexOf(X[0])<0,ae=!N,ze=De&&oe&&N+be>W+Ue&&G;if(V&&be>W&&(!N||ze||Xe)){let Ke=ce(X,"grapheme");J.splice(De,1,...Ke),N>0&&(F.push(N),ge.push(ie),q++,fe+=te,N=0,te=0,ie=0,Pe.push(1),le=-1);continue}if(Xe||ze)z&&X===" "&&(be=0),F.push(N),ge.push(ie),q++,fe+=te,N=be,te=be?$.height(X):0,ie=be?$.baseline(X):0,Pe.push(1),le=-1,Xe||(ve=Math.max(ve,W));else{N+=be;let Ke=$.height(X);Ke>te&&(te=Ke,ie=$.baseline(X)),ae&&Pe[Pe.length-1]++}ae&&le++,ve=Math.max(ve,N);let at=N-be;if(be===0)$e.push({y:fe,x:at,width:0,line:q,lineIndex:le,isImage:!1});else{let Ke=ce(X,"word");for(let un=0;un<Ke.length;un++){let ln=Ke[un],br=0,Io=!1;R(ln)?(br=k,Io=!0):br=Le(ln),vt.push(ln),$e.push({y:fe,x:at,width:br,line:q,lineIndex:le,isImage:Io}),at+=br}}De++}return N&&(q++,F.push(N),ge.push(ie),fe+=te),{width:ve,height:fe}}let pr={width:0,height:0};re.setMeasureFunc(W=>{let{width:q,height:N}=tn(W);if(O==="balance"){let ve=q/2,le=q,fe=q;for(;ve+1<le;){fe=(ve+le)/2;let{height:te}=tn(fe);te>N?ve=fe:le=fe}return tn(le),pr={width:le,height:N},{width:le,height:N}}return pr={width:q,height:N},{width:q,height:N}});let[nl,il]=yield,rn="",hr="",qe=i._inheritedClipPathId,So=i._inheritedMaskId,{left:ko,top:To,width:nn,height:ol}=re.getComputedLayout(),on=s.getComputedWidth()-s.getComputedPadding(n.EDGE_LEFT)-s.getComputedPadding(n.EDGE_RIGHT)-s.getComputedBorder(n.EDGE_LEFT)-s.getComputedBorder(n.EDGE_RIGHT),it=nl+ko,ot=il+To,{matrix:Ce,opacity:mr}=fs({left:ko,top:To,width:nn,height:ol,isInheritingTransform:u},r),st="";if(r.textShadowOffset){let{textShadowColor:W,textShadowOffset:q,textShadowRadius:N}=r;Array.isArray(r.textShadowOffset)||(W=[W],q=[q],N=[N]),st=cs({width:pr.width,height:pr.height,id:a},{shadowColor:W,shadowOffset:q,shadowRadius:N}),st=A("defs",{},st)}let bt="",gr="",Oo="",sn=-1,Eo=v==="ellipsis"?M(["\u2026"]):0,sl=v==="ellipsis"?M([" "]):0,vr={},Be=null,Po=0;for(let W=0;W<vt.length;W++){let q=$e[W];if(!q)continue;let N=vt[W],ve=null,le=!1,fe=d?d[N]:null,te=q.y,ie=q.x,De=q.width,X=q.line;if(X===sn)continue;let Xe=!1;if(F.length>1){let oe=nn-F[X];if(p==="right"||p==="end")ie+=oe;else if(p==="center")ie+=oe/2;else if(p==="justify"&&X<F.length-1){let ae=Pe[X];ie+=(ae>1?oe/(ae-1):0)*q.lineIndex,Xe=!0}}if(vr[X]||(vr[X]=[ie,Xe?nn:F[X]]),v==="ellipsis"&&F[X]>on&&q.x+De+Eo+sl>on){let oe=ce(N,"grapheme",g),ae="",ze=0;for(let an of oe){let at=q.x+M([ae+an]);if(ae&&at+Eo>on)break;ae+=an,ze=at}N=ae+"\u2026",sn=X,vr[X][1]=ze,le=!0}let be=ge[X],Ue=$.baseline(N),yt=$.height(N),Qe=be-Ue;if(fe)te+=0;else if(f){if(!zo.includes(N)&&vt[W+1]&&$e[W+1]&&!$e[W+1].isImage&&te===$e[W+1].y&&!le){Be===null&&(Po=ie),Be=Be===null?N:Be+N;continue}let oe=Be===null?N:Be+N,ae=Be===null?ie:Po,ze=q.width+ie-ae;ve=$.getSVG(oe,{...r,left:it+ae,top:ot+te+Ue+Qe,letterSpacing:r.letterSpacing}),Be=null,l&&(Oo+=A("rect",{x:it+ae,y:ot+te+Qe,width:ze,height:yt,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:Ce||void 0,"clip-path":qe?`url(#${qe})`:void 0})+A("line",{x1:it+ie,x2:it+ie+q.width,y1:ot+te+Qe+Ue,y2:ot+te+Qe+Ue,stroke:"#14c000","stroke-width":1,transform:Ce||void 0,"clip-path":qe?`url(#${qe})`:void 0}))}else te+=Ue+Qe;if(r.textDecorationLine&&(X!==((Ao=$e[W+1])==null?void 0:Ao.line)||sn===X)){let oe=vr[X];oe&&!oe[2]&&(bt+=Sn({left:it+oe[0],top:ot+yt*+X,width:oe[1],ascender:$.baseline(N),clipPathId:qe},r),oe[2]=1)}if(ve!==null)gr+=ve+" ";else{let[oe,ae]=_n({content:N,filter:st,id:a,left:it+ie,top:ot+te,width:De,height:yt,matrix:Ce,opacity:mr,image:fe,clipPathId:qe,debug:l,shape:!!D,decorationShape:bt},r);rn+=oe,hr+=ae,bt=""}}if(gr){let W=r.color!=="transparent"&&mr!==0?A("path",{fill:r.color,d:gr,transform:Ce||void 0,opacity:mr!==1?mr:void 0,"clip-path":qe?`url(#${qe})`:void 0,mask:So?`url(#${So})`:void 0,style:C?`filter:${C}`:void 0}):"";D&&(hr=A("path",{d:gr,transform:Ce||void 0})),rn+=(st?st+A("g",{filter:`url(#satori_s-${a})`},W+bt):W+bt)+Oo}return hr&&(r._inheritedBackgroundClipTextPath.value+=hr),rn}function zl(e,t,n){return t==="uppercase"?e=e.toLocaleUpperCase(n):t==="lowercase"?e=e.toLocaleLowerCase(n):t==="capitalize"&&(e=ce(e,"word",n).map(r=>ce(r,"grapheme",n).map((i,s)=>s===0?i.toLocaleUpperCase(n):i).join("")).join("")),e}function Gl(e,t){let n=["break-all","break-word"].includes(t),{words:r,requiredBreaks:i}=Xo(e,t);return{words:r,requiredBreaks:i,allowBreakWord:n}}function jl(e,t){let n=["pre","pre-wrap","pre-line"].includes(t),r=!["pre","pre-wrap"].includes(t),i=!["pre","nowrap"].includes(t);return n||(e=e.replace(/\n/g," ")),r&&(e=e.replace(/[ ]+/g," "),e=e.trim()),{content:e,shouldCollapseWhitespace:r,allowSoftWrap:i}}function Vl(e,t){let n=e.Node.create();return n.setAlignItems(e.ALIGN_BASELINE),n.setJustifyContent(de(t,{left:e.JUSTIFY_FLEX_START,right:e.JUSTIFY_FLEX_END,center:e.JUSTIFY_CENTER,justify:e.JUSTIFY_SPACE_BETWEEN,start:e.JUSTIFY_FLEX_START,end:e.JUSTIFY_FLEX_END},e.JUSTIFY_FLEX_START,"textAlign")),n}function Hl(e,t){let n=new Map;return function(i){if(n.has(i))return n.get(i);let s=e.measure(i,t);return n.set(i,s),s}}c();c();c();var Tn=Tn||{},ps={type:"directional",value:"bottom"};Tn.parse=function(){var e={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,zeroValue:/[0]/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},t="";function n(R){var M=new Error(t+": "+R);throw M.source=t,M}function r(){var R=i();return t.length>0&&n("Invalid input not EOF"),R}function i(){return O(s)}function s(){return o("linear-gradient",e.linearGradient,u,ps)||o("repeating-linear-gradient",e.repeatingLinearGradient,u,ps)||o("radial-gradient",e.radialGradient,g)||o("repeating-radial-gradient",e.repeatingRadialGradient,g)}function o(R,M,H,F){return a(M,function(ge){var Pe=H();return Pe?ue(e.comma)||n("Missing comma before color stops"):Pe=F,{type:R,orientation:Pe,colorStops:O(k)}})}function a(R,M){var H=ue(R);if(H){ue(e.startCall)||n("Missing (");var F=M(H);return ue(e.endCall)||n("Missing )"),F}}function u(){return l()||f()||d()}function l(){return $("directional",e.sideOrCorner,1)}function f(){return $("angular",e.angleValue,1)}function d(){return $("directional",e.zeroValue,0)}function g(){var R,M=h(),H;return M&&(R=[],R.push(M),H=t,ue(e.comma)&&(M=h(),M?R.push(M):t=H)),R}function h(){var R=p()||v();if(R)R.at=b();else{var M=w();if(M){R=M;var H=b();H&&(R.at=H)}else{var H=b();if(H)R={type:"shape",value:"ellipse",at:H};else{var F=y();F&&(R={type:"default-radial",at:F})}}}return R}function p(){var R=$("shape",/^(circle)/i,0);return R&&(R.style=re()||w()),R}function v(){var R=$("shape",/^(ellipse)/i,0);return R&&(R.style=j()||w()),R}function w(){return $("extent-keyword",e.extentKeywords,1)}function b(){if($("position",/^at/,0)){var R=y();return R||n("Missing positioning value"),R}}function y(){var R=_();if(R.x||R.y)return{type:"position",value:R}}function _(){return{x:j(),y:j()}}function O(R){var M=R(),H=[];if(M)for(H.push(M);ue(e.comma);)M=R(),M?H.push(M):n("One extra comma");return H}function k(){var R=C();return R||n("Expected color definition"),R.length=j(),R}function C(){return L()||G()||z()||D()}function D(){return $("literal",e.literalColor,0)}function L(){return $("hex",e.hexColor,1)}function z(){return a(e.rgbColor,function(){return{type:"rgb",value:O(J)}})}function G(){return a(e.rgbaColor,function(){return{type:"rgba",value:O(J)}})}function J(){return ue(e.number)[1]}function j(){return $("%",e.percentageValue,1)||V()||re()}function V(){return $("position-keyword",e.positionKeywords,1)}function re(){return $("px",e.pixelValue,1)||$("em",e.emValue,1)}function $(R,M,H){var F=ue(M);if(F)return{type:R,value:F[H]}}function ue(R){var M,H;return H=/^[\n\r\t\s]+/.exec(t),H&&Le(H[0].length),M=R.exec(t),M&&Le(M[0].length),M}function Le(R){t=t.substr(R)}return function(R){return t=R.toString(),r()}}();var On=Tn;function Yl(e){return e.type==="literal"?e.value:e.type==="hex"?`#${e.value}`:e.type==="rgb"?`rgb(${e.value.join(",")})`:e.type==="rgba"?`rgba(${e.value.join(",")})`:"transparent"}function Xl(e){let t=0,n=0,r=0,i=0;return e.includes("top")?n=1:e.includes("bottom")&&(i=1),e.includes("left")?t=1:e.includes("right")&&(r=1),!t&&!r&&!n&&!i&&(n=1),[t,n,r,i]}function Ql(e,t){return typeof e=="string"&&e.endsWith("%")?t*parseFloat(e)/100:+e}function En(e,{x:t,y:n,defaultX:r,defaultY:i}){return(e?e.split(" ").map(s=>{try{let o=new Ge(s);return o.type==="length"||o.type==="number"?o.value:o.value+o.unit}catch{return null}}).filter(s=>s!==null):[r,i]).map((s,o)=>Ql(s,[t,n][o]))}function hs(e,t){let n=[];for(let o of t){let a=Yl(o);if(!n.length&&(n.push({offset:0,color:a}),typeof o.length>"u"||o.length.value==="0"))continue;let u=typeof o.length>"u"?void 0:o.length.type==="%"?o.length.value/100:o.length.value/e;n.push({offset:u,color:a})}n.length||n.push({offset:0,color:"transparent"});let r=n[n.length-1];r.offset!==1&&(typeof r.offset>"u"?r.offset=1:n.push({offset:1,color:r.color}));let i=0,s=1;for(let o=0;o<n.length;o++)if(typeof n[o].offset>"u"){for(s<o&&(s=o);typeof n[s].offset>"u";)s++;n[o].offset=(n[s].offset-n[i].offset)/(s-i)*(o-i)+n[i].offset}else i=o;return n}async function Pn({id:e,width:t,height:n,left:r,top:i},{image:s,size:o,position:a,repeat:u}){u=u||"repeat";let l=u==="repeat-x"||u==="repeat",f=u==="repeat-y"||u==="repeat",d=En(o,{x:t,y:n,defaultX:t,defaultY:n}),g=En(a,{x:t,y:n,defaultX:0,defaultY:0});if(s.startsWith("linear-gradient(")){let h=On.parse(s)[0],[p,v]=d,w,b,y,_;if(h.orientation.type==="directional")[w,b,y,_]=Xl(h.orientation.value);else if(h.orientation.type==="angular"){let L=+h.orientation.value/180*Math.PI-Math.PI/2,z=Math.cos(L),G=Math.sin(L);w=0,b=0,y=z,_=G,y<0&&(w-=y,y=0),_<0&&(b-=_,_=0)}let O=hs(t,h.colorStops),k=`satori_bi${e}`,C=`satori_pattern_${e}`,D=A("pattern",{id:C,x:g[0]/t,y:g[1]/n,width:l?p/t:"1",height:f?v/n:"1",patternUnits:"objectBoundingBox"},A("linearGradient",{id:k,x1:w,y1:b,x2:y,y2:_},O.map(L=>A("stop",{offset:L.offset*100+"%","stop-color":L.color})).join(""))+A("rect",{x:0,y:0,width:p,height:v,fill:`url(#${k})`}));return[C,D]}if(s.startsWith("radial-gradient(")){let h=On.parse(s)[0],p=h.orientation[0],[v,w]=d,b="circle",y=v/2,_=w/2;if(p.type==="shape"){if(b=p.value,p.at)if(p.at.type==="position")y=p.at.value.x.value,_=p.at.value.y.value;else throw new Error("orientation.at.type not implemented: "+p.at.type)}else throw new Error("orientation.type not implemented: "+p.type);let O=hs(t,h.colorStops),k=`satori_radial_${e}`,C=`satori_pattern_${e}`,D=`satori_mask_${e}`,L={},z=Math.max(Math.abs(v-y),Math.abs(y)),G=Math.max(Math.abs(w-_),Math.abs(_));if(b==="circle")L.r=Math.sqrt(z*z+G*G);else if(b==="ellipse"){let V=G!==0?z/G:1;L.ry=Math.sqrt(z*z+G*G*V*V)/V,L.rx=L.ry*V}let J=A("pattern",{id:C,x:g[0]/t,y:g[1]/n,width:l?v/t:"1",height:f?w/n:"1",patternUnits:"objectBoundingBox"},A("radialGradient",{id:k},O.map(V=>A("stop",{offset:V.offset,"stop-color":V.color})).join(""))+A("mask",{id:D},A("rect",{x:0,y:0,width:v,height:w,fill:"#fff"}))+A(b,{cx:y,cy:_,width:v,height:w,...L,fill:`url(#${k})`,mask:`url(#${D})`}));return[C,J]}if(s.startsWith("url(")){let h=En(o,{x:t,y:n,defaultX:0,defaultY:0}),[p,v,w]=await Er(s.slice(4,-1)),b=h[0]||v,y=h[1]||w;return[`satori_bi${e}`,A("pattern",{id:`satori_bi${e}`,patternContentUnits:"userSpaceOnUse",patternUnits:"userSpaceOnUse",x:g[0]+r,y:g[1]+i,width:l?b:"100%",height:f?y:"100%"},A("image",{x:0,y:0,width:b,height:y,preserveAspectRatio:"none",href:p}))]}throw new Error(`Invalid background image: "${s}"`)}c();function Kl([e,t]){return Math.round(e*1e3)===0&&Math.round(t*1e3)===0?0:Math.round(e*t/Math.sqrt(e*e+t*t)*1e3)/1e3}function Ar(e,t,n){return n<e+t&&(n/2<e&&n/2<t?e=t=n/2:n/2<e?e=n-t:n/2<t&&(t=n-e)),[e,t]}function Ir(e){e[0]=e[1]=Math.min(e[0],e[1])}function Rr(e,t,n,r,i){if(typeof e=="string"){let s=e.split(" ").map(a=>a.trim()),o=!s[1]&&!s[0].endsWith("%");return s[1]=s[1]||s[0],[o,[Math.min(ye(s[0],r,t,i,!0),t),Math.min(ye(s[1],r,n,i,!0),n)]]}return typeof e=="number"?[!0,[Math.min(e,t),Math.min(e,n)]]:[!0,void 0]}var Lr=e=>e&&e[0]!==0&&e[1]!==0;function ft({left:e,top:t,width:n,height:r},i,s){let{borderTopLeftRadius:o,borderTopRightRadius:a,borderBottomLeftRadius:u,borderBottomRightRadius:l,fontSize:f}=i,d,g,h,p;if([d,o]=Rr(o,n,r,f,i),[g,a]=Rr(a,n,r,f,i),[h,u]=Rr(u,n,r,f,i),[p,l]=Rr(l,n,r,f,i),!s&&!Lr(o)&&!Lr(a)&&!Lr(u)&&!Lr(l))return"";o||=[0,0],a||=[0,0],u||=[0,0],l||=[0,0],[o[0],a[0]]=Ar(o[0],a[0],n),[u[0],l[0]]=Ar(u[0],l[0],n),[o[1],u[1]]=Ar(o[1],u[1],r),[a[1],l[1]]=Ar(a[1],l[1],r),d&&Ir(o),g&&Ir(a),h&&Ir(u),p&&Ir(l);let v=[];v[0]=[a,a],v[1]=[l,[-l[0],l[1]]],v[2]=[u,[-u[0],-u[1]]],v[3]=[o,[o[0],-o[1]]];let w=`h${n-o[0]-a[0]} a${v[0][0]} 0 0 1 ${v[0][1]}`,b=`v${r-a[1]-l[1]} a${v[1][0]} 0 0 1 ${v[1][1]}`,y=`h${l[0]+u[0]-n} a${v[2][0]} 0 0 1 ${v[2][1]}`,_=`v${u[1]+o[1]-r} a${v[3][0]} 0 0 1 ${v[3][1]}`;if(s){let k=function(j){let V=Kl([o,a,l,u][j]);return j===0?[[e+o[0]-V,t+o[1]-V],[e+o[0],t]]:j===1?[[e+n-a[0]+V,t+a[1]-V],[e+n,t+a[1]]]:j===2?[[e+n-l[0]+V,t+r-l[1]+V],[e+n-l[0],t+r]]:[[e+u[0]-V,t+r-u[1]+V],[e,t+r-u[1]]]},O=s.indexOf(!1);if(!s.includes(!0))throw new Error("Invalid `partialSides`.");if(O===-1)O=0;else for(;!s[O];)O=(O+1)%4;let C="",D=k(O),L=`M${D[0]} A${v[(O+3)%4][0]} 0 0 1 ${D[1]}`,z=0;for(;z<4&&s[(O+z)%4];z++)C+=L+" ",L=[w,b,y,_][(O+z)%4];let G=(O+z)%4;C+=L.split(" ")[0];let J=k(G);return C+=` A${v[(G+3)%4][0]} 0 0 1 ${J[0]}`,C}return`M${e+o[0]},${t} ${w} ${b} ${y} ${_}`}c();c();c();function ms(e,t,n){return n[e+"Width"]===n[t+"Width"]&&n[e+"Style"]===n[t+"Style"]&&n[e+"Color"]===n[t+"Color"]}function gs({id:e,currentClipPathId:t,borderPath:n,borderType:r,left:i,top:s,width:o,height:a},u){if(!(u.borderTopWidth||u.borderRightWidth||u.borderBottomWidth||u.borderLeftWidth))return null;let f=`satori_bc-${e}`;return[A("clipPath",{id:f,"clip-path":t?`url(#${t})`:void 0},A(r,{x:i,y:s,width:o,height:a,d:n||void 0})),f]}function Et({left:e,top:t,width:n,height:r,props:i,asContentMask:s,maskBorderOnly:o},a){let u=["borderTop","borderRight","borderBottom","borderLeft"];if(!s&&!u.some(h=>a[h+"Width"]))return"";let l="",f=0;for(;f>0&&ms(u[f],u[(f+3)%4],a);)f=(f+3)%4;let d=[!1,!1,!1,!1],g=[];for(let h=0;h<4;h++){let p=(f+h)%4,v=(f+h+1)%4,w=u[p],b=u[v];if(d[p]=!0,g=[a[w+"Width"],a[w+"Style"],a[w+"Color"],w],!ms(w,b,a)){let y=(g[0]||0)+(s&&!o&&a[w.replace("border","padding")]||0);y&&(l+=A("path",{width:n,height:r,...i,fill:"none",stroke:s?"#000":g[2],"stroke-width":y*2,"stroke-dasharray":!s&&g[1]==="dashed"?y*2+" "+y:void 0,d:ft({left:e,top:t,width:n,height:r},a,d)})),d=[!1,!1,!1,!1]}}if(d.some(Boolean)){let h=(g[0]||0)+(s&&!o&&a[g[3].replace("border","padding")]||0);h&&(l+=A("path",{width:n,height:r,...i,fill:"none",stroke:s?"#000":g[2],"stroke-width":h*2,"stroke-dasharray":!s&&g[1]==="dashed"?h*2+" "+h:void 0,d:ft({left:e,top:t,width:n,height:r},a,d)}))}return l}function An({id:e,left:t,top:n,width:r,height:i,matrix:s,borderOnly:o},a){let u=(a.borderLeftWidth||0)+(o?0:a.paddingLeft||0),l=(a.borderTopWidth||0)+(o?0:a.paddingTop||0),f=(a.borderRightWidth||0)+(o?0:a.paddingRight||0),d=(a.borderBottomWidth||0)+(o?0:a.paddingBottom||0),g={x:t+u,y:n+l,width:r-u-f,height:i-l-d};return A("mask",{id:e},A("rect",{...g,fill:"#fff",mask:a._inheritedMaskId?`url(#${a._inheritedMaskId})`:void 0})+Et({left:t,top:n,width:r,height:i,props:{transform:s||void 0},asContentMask:!0,maskBorderOnly:o},a))}function In({left:e,top:t,width:n,height:r,path:i,matrix:s,id:o,currentClipPath:a,src:u},l){if(l.overflow!=="hidden"&&!u)return"";let f=An({id:`satori_om-${o}`,left:e,top:t,width:n,height:r,matrix:s,borderOnly:!u},l);return A("clipPath",{id:`satori_cp-${o}`,"clip-path":a},A(i?"path":"rect",{x:e,y:t,width:n,height:r,d:i||void 0}))+f}async function Pt({id:e,left:t,top:n,width:r,height:i,isInheritingTransform:s,src:o,debug:a},u){if(u.display==="none")return"";let l=!!o,f="rect",d="",g="",h=[],p=1,v="";u.backgroundColor&&h.push(u.backgroundColor),u.opacity!==void 0&&(p=+u.opacity),u.transform&&(d=Ot({left:t,top:n,width:r,height:i},u.transform,s,u.transformOrigin));let w="";if(u.backgroundImage){let J=[];for(let j=0;j<u.backgroundImage.length;j++){let V=u.backgroundImage[j],re=await Pn({id:e+"_"+j,width:r,height:i,left:t,top:n},V);re&&J.unshift(re)}for(let j of J)h.push(`url(#${j[0]})`),g+=j[1],j[2]&&(w+=j[2])}let b=ft({left:t,top:n,width:r,height:i},u);b&&(f="path");let y=u._inheritedClipPathId,_=u._inheritedMaskId;a&&(v=A("rect",{x:t,y:n,width:r,height:i,fill:"transparent",stroke:"#ff5757","stroke-width":1,transform:d||void 0,"clip-path":y?`url(#${y})`:void 0}));let{backgroundClip:O,filter:k}=u,C=O==="text"?`url(#satori_bct-${e})`:y?`url(#${y})`:void 0,D=In({left:t,top:n,width:r,height:i,path:b,id:e,matrix:d,currentClipPath:C,src:o},u),L=h.map(J=>A(f,{x:t,y:n,width:r,height:i,fill:J,d:b||void 0,transform:d||void 0,"clip-path":C,style:k?`filter:${k}`:void 0,mask:_?`url(#${_})`:void 0})).join(""),z=gs({id:e,left:t,top:n,width:r,height:i,currentClipPathId:y,borderPath:b,borderType:f},u);if(l){let J=(u.borderLeftWidth||0)+(u.paddingLeft||0),j=(u.borderTopWidth||0)+(u.paddingTop||0),V=(u.borderRightWidth||0)+(u.paddingRight||0),re=(u.borderBottomWidth||0)+(u.paddingBottom||0),$=u.objectFit==="contain"?"xMidYMid":u.objectFit==="cover"?"xMidYMid slice":"none";L+=A("image",{x:t+J,y:n+j,width:r-J-V,height:i-j-re,href:o,preserveAspectRatio:$,transform:d||void 0,style:k?`filter:${k}`:void 0,"clip-path":`url(#satori_cp-${e})`,mask:`url(#satori_om-${e})`})}if(z){g+=z[0];let J=z[1];L+=Et({left:t,top:n,width:r,height:i,props:{transform:d||void 0,"clip-path":`url(#${J})`}},u)}let G=ds({width:r,height:i,id:e,opacity:p,shape:A(f,{x:t,y:n,width:r,height:i,fill:"#fff",stroke:"#fff","stroke-width":0,d:b||void 0,transform:d||void 0,"clip-path":C,mask:_?`url(#${_})`:void 0})},u);return(g?A("defs",{},g):"")+(G?G[0]:"")+D+(p!==1?`<g opacity="${p}">`:"")+(w||L)+(p!==1?"</g>":"")+(G?G[1]:"")+v}c();var vs=ut(require("emoji-regex"),1),Jl=new RegExp((0,vs.default)(),""),Rn={emoji:Jl,symbol:/\p{Symbol}/u,math:/\p{Math}/u},At={"ja-JP":/\p{scx=Hira}|\p{scx=Kana}|\p{scx=Han}|[\u3000]|[\uFF00-\uFFEF]/u,"ko-KR":/\p{scx=Hangul}/u,"zh-CN":/\p{scx=Han}/u,"zh-TW":/\p{scx=Han}/u,"zh-HK":/\p{scx=Han}/u,"th-TH":/\p{scx=Thai}/u,"bn-IN":/\p{scx=Bengali}/u,"ar-AR":/\p{scx=Arabic}/u,"ta-IN":/\p{scx=Tamil}/u,"ml-IN":/\p{scx=Malayalam}/u,"he-IL":/\p{scx=Hebrew}/u,"te-IN":/\p{scx=Telugu}/u,devanagari:/\p{scx=Devanagari}/u,kannada:/\p{scx=Kannada}/u},Cr=Object.keys({...At,...Rn});function bs(e){return Cr.includes(e)}function ys(e,t){if(t&&At[t]&&At[t].test(e))return t;for(let n of Object.keys(Rn))if(Rn[n].test(e))return n;for(let n of Object.keys(At))if(At[n].test(e))return n;return"unknown"}function xs(e){if(e)return Cr.find(t=>t.toLowerCase()===e.toLowerCase()||t.toLowerCase().startsWith(e.toLowerCase()))}async function*It(e,t){let n=await Fe(),{id:r,inheritedStyle:i,parent:s,font:o,debug:a,locale:u,embedFont:l=!0,graphemeImages:f,canLoadAdditionalAssets:d,getTwStyles:g}=t;if(e===null||typeof e>"u")return yield,yield,"";if(!mn(e)||typeof e.type=="function"){let F;if(!mn(e))F=kn(String(e),t),yield(await F.next()).value;else{if(qo(e.type))throw new Error("Class component is not supported.");F=It(e.type(e.props),t),yield(await F.next()).value}await F.next();let ge=yield;return(await F.next(ge)).value}let{type:h,props:p}=e;if(p&&Bo(p))throw new Error("dangerouslySetInnerHTML property is not supported. See documentation for more information https://github.com/vercel/satori#jsx.");let{style:v,children:w,tw:b,lang:y=u}=p||{},_=xs(y);if(b){let F=g(b,v);v=Object.assign(F,v)}let O=n.Node.create();s.insertChild(O,s.getChildCount());let[k,C]=await wn(O,h,i,v,p),D=k.transform===i.transform;if(D||(k.transform.__parent=i.transform),k.overflow==="hidden"&&(C._inheritedClipPathId=`satori_cp-${r}`,C._inheritedMaskId=`satori_om-${r}`),k.backgroundClip==="text"){let F={value:""};C._inheritedBackgroundClipTextPath=F,k._inheritedBackgroundClipTextPath=F}let L=Uo(w),z=[],G=0,J=[];for(let F of L){let ge=It(F,{id:r+"-"+G++,parentStyle:k,inheritedStyle:C,isInheritingTransform:!0,parent:O,font:o,embedFont:l,debug:a,graphemeImages:f,canLoadAdditionalAssets:d,locale:_,getTwStyles:g});d?J.push(...(await ge.next()).value||[]):await ge.next(),z.push(ge)}yield J;for(let F of z)await F.next();let[j,V]=yield,{left:re,top:$,width:ue,height:Le}=O.getComputedLayout();re+=j,$+=V;let R="",M="",H="";if(h==="img"){let F=k.__src;M=await Pt({id:r,left:re,top:$,width:ue,height:Le,src:F,isInheritingTransform:D,debug:a},k)}else if(h==="svg"){let F=k.color,ge=Vo(e,F);M=await Pt({id:r,left:re,top:$,width:ue,height:Le,src:ge,isInheritingTransform:D,debug:a},k)}else{let F=v==null?void 0:v.display;if(h==="div"&&w&&typeof w!="string"&&F!=="flex"&&F!=="none")throw new Error('Expected <div> to have explicit "display: flex" or "display: none" if it has more than one child node.');M=await Pt({id:r,left:re,top:$,width:ue,height:Le,isInheritingTransform:D,debug:a},k)}for(let F of z)R+=(await F.next([re,$])).value;return k._inheritedBackgroundClipTextPath&&(H+=A("clipPath",{id:`satori_bct-${r}`,"clip-path":k._inheritedClipPathId?`url(#${k._inheritedClipPathId})`:void 0},k._inheritedBackgroundClipTextPath.value)),H+M+R}c();var Dr=ut(require("@shuding/opentype.js"),1);var ws="unknown";function Zl(e,t,[n,r],[i,s]){if(n!==i)return n?!i||n===e?-1:i===e?1:e===400&&n===500||e===500&&n===400?-1:e===400&&i===500||e===500&&i===400?1:e<400?n<e&&i<e?i-n:n<e?-1:i<e?1:n-i:e<n&&e<i?n-i:e<n?-1:e<i?1:i-n:1;if(r!==s){if(r===t)return-1;if(s===t)return 1}return-1}var Rt=class{constructor(t){this.fonts=new Map;this.addFonts(t)}get({name:t,weight:n,style:r}){if(!this.fonts.has(t))return null;n==="normal"&&(n=400),n==="bold"&&(n=700),typeof n=="string"&&(n=Number.parseInt(n,10));let i=[...this.fonts.get(t)],s=i[0];for(let o=1;o<i.length;o++){let[,a,u]=s,[,l,f]=i[o];Zl(n,r,[a,u],[l,f])>0&&(s=i[o])}return s[0]}addFonts(t){for(let n of t){let{name:r,data:i,lang:s}=n;if(s&&!bs(s))throw new Error(`Invalid value for props \`lang\`: "${s}". The value must be one of the following: ${Cr.join(", ")}.`);let o=s??ws,a=Dr.default.parse("buffer"in i?i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength):i,{lowMemory:!0}),u=a.charToGlyphIndex;a.charToGlyphIndex=f=>{let d=u.call(a,f);return d===0&&a._trackBrokenChars&&a._trackBrokenChars.push(f),d},this.defaultFont||(this.defaultFont=a);let l=`${r.toLowerCase()}_${o}`;this.fonts.has(l)||this.fonts.set(l,[]),this.fonts.get(l).push([a,n.weight,n.style])}}getEngine(t=16,n=1.2,{fontFamily:r,fontWeight:i=400,fontStyle:s="normal"},o){if(!this.fonts.size)throw new Error("No fonts are loaded. At least one font is required to calculate the layout.");r=(Array.isArray(r)?r:[r]).map(y=>y.toLowerCase());let a=[];r.forEach(y=>{let _=this.get({name:y,weight:i,style:s});if(_){a.push(_);return}let O=this.get({name:y+"_unknown",weight:i,style:s});if(O){a.push(O);return}});let u=Array.from(this.fonts.keys()),l=[],f=[],d=[];for(let y of u)if(!r.includes(y))if(o){let _=ef(y);_?_===o?l.push(this.get({name:y,weight:i,style:s})):f.push(this.get({name:y,weight:i,style:s})):d.push(this.get({name:y,weight:i,style:s}))}else d.push(this.get({name:y,weight:i,style:s}));let g=new Map,h=(y,_=!0)=>{let O=y.charCodeAt(0);if(g.has(O))return g.get(O);let k=[...a,...d,...l,..._?f:[]],C=k.find((D,L)=>!!D.charToGlyphIndex(y)||_&&L===k.length-1);return C&&g.set(O,C),C},p=(y,_=!1)=>{var k,C;return((_?(C=(k=y.tables)==null?void 0:k.os2)==null?void 0:C.sTypoAscender:0)||y.ascender)/y.unitsPerEm*t},v=(y,_=!1)=>{var k,C;return((_?(C=(k=y.tables)==null?void 0:k.os2)==null?void 0:C.sTypoDescender:0)||y.descender)/y.unitsPerEm*t},w=y=>h(y,!1),b={has:y=>{if(y===`
|
|
5
|
+
in CSS rule \`${o}: ${a}\`.${Jo(o)}`))}}}if(n.backgroundImage){let{backgrounds:i}=(0,es.parseElementStyle)(n);n.backgroundImage=i}let r=typeof n.fontSize=="number"?n.fontSize:t.fontSize;if(typeof r=="string")try{let i=new Ge(r);switch(i.unit){case"em":r=i.value*t.fontSize;break;case"rem":r=i.value*16;break}}catch{r=16}typeof n.fontSize<"u"&&(n.fontSize=r),n.transformOrigin&&(n.transformOrigin=bn(n.transformOrigin,r));for(let i in n){let s=n[i];if(i==="lineHeight")typeof s=="string"&&(s=n[i]=ye(s,r,r,t,!0)/r);else{if(typeof s=="string"){let o=ye(s,r,r,t);typeof o<"u"&&(n[i]=o),s=n[i]}if(typeof s=="string"||typeof s=="object"){let o=rs(s);o&&(n[i]=o),s=n[i]}}if(i==="opacity"&&(s=n[i]=s*t.opacity),i==="transform"){let o=s;for(let a of o){let u=Object.keys(a)[0],l=a[u],f=typeof l=="string"?ye(l,r,r,t)??l:l;a[u]=f}}}return n}function Ll(e,t){return e&&e.toLowerCase()!=="currentcolor"?e:t}function Cl(e,t){return e.replace(/currentcolor/gi,t)}function Dl(e,t){return Ho(e)&&(e=Cl(e,t)),e}c();var Fl="image/avif",Nl="image/webp",kr="image/png",Tr="image/jpeg",Or="image/gif",xn="image/svg+xml";function ss(e){let t=new DataView(e),n=4,r=t.byteLength;for(;n<r;){let i=t.getUint16(n,!1);if(i>r)throw new TypeError("Invalid JPEG");let s=t.getUint8(i+1+n);if(s===192||s===193||s===194)return[t.getUint16(i+7+n,!1),t.getUint16(i+5+n,!1)];n+=i+2}throw new TypeError("Invalid JPEG")}function as(e){let t=new Uint8Array(e.slice(6,10));return[t[0]|t[1]<<8,t[2]|t[3]<<8]}function us(e){let t=new DataView(e);return[t.getUint16(18,!1),t.getUint16(22,!1)]}var ns=Go(100),yn=new Map,Ml=[kr,Tr,Or,xn];function Wl(e){let t="",n=new Uint8Array(e);for(let r=0;r<n.byteLength;r++)t+=String.fromCharCode(n[r]);return btoa(t)}function $l(e){let t=atob(e),n=t.length,r=new Uint8Array(n);for(let i=0;i<n;i++)r[i]=t.charCodeAt(i);return r.buffer}function is(e,t){let n=t.match(/<svg[^>]*>/)[0],r=n.match(/viewBox=['"](.+)['"]/),i=r?kt(r[1]):null,s=n.match(/width=['"](\d*\.\d+|\d+)['"]/),o=n.match(/height=['"](\d*\.\d+|\d+)['"]/);if(!i&&(!s||!o))throw new Error(`Failed to parse SVG from ${e}: missing "viewBox"`);let a=i?[i[2],i[3]]:[+s[1],+o[1]],u=a[0]/a[1];return s&&o?[+s[1],+o[1]]:s?[+s[1],+s[1]/u]:o?[+o[1]*u,+o[1]]:[a[0],a[1]]}function os(e){let t,n=ql(new Uint8Array(e));switch(n){case kr:t=us(e);break;case Or:t=as(e);break;case Tr:t=ss(e);break}if(!Ml.includes(n))throw new Error(`Unsupported image type: ${n||"unknown"}`);return[`data:${n};base64,${Wl(e)}`,t]}async function Er(e){if(!e)throw new Error("Image source is not provided.");if(typeof e=="object"){let[i,s]=os(e);return[i,...s]}if((e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))&&(e=e.slice(1,-1)),e.startsWith("data:")){let i;try{i=/data:(?<imageType>[a-z/+]+)(;(?<encodingType>base64|utf8))?,(?<dataString>.*)/g.exec(e).groups}catch{return console.warn("Image data URI resolved without size:"+e),[e]}let{imageType:s,encodingType:o,dataString:a}=i;if(s===xn){let u=o==="base64"?atob(a):decodeURIComponent(a.replace(/ /g,"%20")),l=o==="base64"?e:`data:image/svg+xml;base64,${btoa(u)}`,f=is(e,u);return[l,...f]}else if(o==="base64"){let u,l=$l(a);switch(s){case kr:u=us(l);break;case Or:u=as(l);break;case Tr:u=ss(l);break}return[e,...u]}else return console.warn("Image data URI resolved without size:"+e),[e]}if(!globalThis.fetch)throw new Error("`fetch` is required to be polyfilled to load images.");if(yn.has(e))return yn.get(e);let t=ns.get(e);if(t)return t;let n=e,r=fetch(n).then(i=>{let s=i.headers.get("content-type");return s==="image/svg+xml"||s==="application/svg+xml"?i.text():i.arrayBuffer()}).then(i=>{if(typeof i=="string")try{let a=`data:image/svg+xml;base64,${btoa(i)}`,u=is(n,i);return[a,...u]}catch(a){throw new Error(`Failed to parse SVG image: ${a.message}`)}let[s,o]=os(i);return[s,...o]}).then(i=>(ns.set(n,i),i)).catch(i=>(console.error(`Can't load image ${n}: `+i.message),[]));return yn.set(n,r),r}function ql(e){return[255,216,255].every((t,n)=>e[n]===t)?Tr:[137,80,78,71,13,10,26,10].every((t,n)=>e[n]===t)?kr:[71,73,70,56].every((t,n)=>e[n]===t)?Or:[82,73,70,70,0,0,0,0,87,69,66,80].every((t,n)=>!t||e[n]===t)?Nl:[60,63,120,109,108].every((t,n)=>e[n]===t)?xn:[0,0,0,0,102,116,121,112,97,118,105,102].every((t,n)=>!t||e[n]===t)?Fl:null}async function wn(e,t,n,r,i){let s=await Fe(),o={...n,...Sr(Qo[t],n),...Sr(r,n)};if(t==="img"){let[a,u,l]=await Er(i.src);if(u===void 0&&l===void 0){if(i.width===void 0||i.height===void 0)throw new Error("Image size cannot be determined. Please provide the width and height of the image.");u=parseInt(i.width),l=parseInt(i.height)}let f=l/u,d=(o.borderLeftWidth||0)+(o.borderRightWidth||0)+(o.paddingLeft||0)+(o.paddingRight||0),g=(o.borderTopWidth||0)+(o.borderBottomWidth||0)+(o.paddingTop||0)+(o.paddingBottom||0),h=o.width||i.width,p=o.height||i.height,v=typeof h!="string"&&typeof p!="string";typeof h=="number"&&v&&(h-=d),typeof p=="number"&&v&&(p-=g),h===void 0&&p===void 0?(h=u,p=l):h===void 0?typeof p=="number"?h=p/f:e.setAspectRatio(1/f):p===void 0&&(typeof h=="number"?p=h*f:e.setAspectRatio(1/f)),o.width=v?h+d:h,o.height=v?p+g:p,o.__src=a}if(t==="svg"){let a=i.viewBox||i.viewbox,u=kt(a),l=u?u[3]/u[2]:null,{width:f,height:d}=i;typeof f>"u"&&d?l==null?f=0:typeof d=="string"&&d.endsWith("%")?f=parseInt(d)/l+"%":(d=ye(d,n.fontSize,1,n),f=d/l):typeof d>"u"&&f?l==null?f=0:typeof f=="string"&&f.endsWith("%")?d=parseInt(f)*l+"%":(f=ye(f,n.fontSize,1,n),d=f*l):(typeof f<"u"&&(f=ye(f,n.fontSize,1,n)||f),typeof d<"u"&&(d=ye(d,n.fontSize,1,n)||d),f||=u==null?void 0:u[2],d||=u==null?void 0:u[3]),!o.width&&f&&(o.width=f),!o.height&&d&&(o.height=d)}return e.setDisplay(de(o.display,{flex:s.DISPLAY_FLEX,none:s.DISPLAY_NONE},s.DISPLAY_FLEX,"display")),e.setAlignContent(de(o.alignContent,{stretch:s.ALIGN_STRETCH,center:s.ALIGN_CENTER,"flex-start":s.ALIGN_FLEX_START,"flex-end":s.ALIGN_FLEX_END,"space-between":s.ALIGN_SPACE_BETWEEN,"space-around":s.ALIGN_SPACE_AROUND,baseline:s.ALIGN_BASELINE,normal:s.ALIGN_AUTO},s.ALIGN_AUTO,"alignContent")),e.setAlignItems(de(o.alignItems,{stretch:s.ALIGN_STRETCH,center:s.ALIGN_CENTER,"flex-start":s.ALIGN_FLEX_START,"flex-end":s.ALIGN_FLEX_END,baseline:s.ALIGN_BASELINE,normal:s.ALIGN_AUTO},s.ALIGN_STRETCH,"alignItems")),e.setAlignSelf(de(o.alignSelf,{stretch:s.ALIGN_STRETCH,center:s.ALIGN_CENTER,"flex-start":s.ALIGN_FLEX_START,"flex-end":s.ALIGN_FLEX_END,baseline:s.ALIGN_BASELINE,normal:s.ALIGN_AUTO},s.ALIGN_AUTO,"alignSelf")),e.setJustifyContent(de(o.justifyContent,{center:s.JUSTIFY_CENTER,"flex-start":s.JUSTIFY_FLEX_START,"flex-end":s.JUSTIFY_FLEX_END,"space-between":s.JUSTIFY_SPACE_BETWEEN,"space-around":s.JUSTIFY_SPACE_AROUND},s.JUSTIFY_FLEX_START,"justifyContent")),e.setFlexDirection(de(o.flexDirection,{row:s.FLEX_DIRECTION_ROW,column:s.FLEX_DIRECTION_COLUMN,"row-reverse":s.FLEX_DIRECTION_ROW_REVERSE,"column-reverse":s.FLEX_DIRECTION_COLUMN_REVERSE},s.FLEX_DIRECTION_ROW,"flexDirection")),e.setFlexWrap(de(o.flexWrap,{wrap:s.WRAP_WRAP,nowrap:s.WRAP_NO_WRAP,"wrap-reverse":s.WRAP_WRAP_REVERSE},s.WRAP_NO_WRAP,"flexWrap")),typeof o.gap<"u"&&e.setGap(s.GUTTER_ALL,o.gap),typeof o.rowGap<"u"&&e.setGap(s.GUTTER_ROW,o.rowGap),typeof o.columnGap<"u"&&e.setGap(s.GUTTER_COLUMN,o.columnGap),typeof o.flexBasis<"u"&&e.setFlexBasis(o.flexBasis),e.setFlexGrow(typeof o.flexGrow>"u"?0:o.flexGrow),e.setFlexShrink(typeof o.flexShrink>"u"?0:o.flexShrink),typeof o.maxHeight<"u"&&e.setMaxHeight(o.maxHeight),typeof o.maxWidth<"u"&&e.setMaxWidth(o.maxWidth),typeof o.minHeight<"u"&&e.setMinHeight(o.minHeight),typeof o.minWidth<"u"&&e.setMinWidth(o.minWidth),e.setOverflow(de(o.overflow,{visible:s.OVERFLOW_VISIBLE,hidden:s.OVERFLOW_HIDDEN},s.OVERFLOW_VISIBLE,"overflow")),e.setMargin(s.EDGE_TOP,o.marginTop||0),e.setMargin(s.EDGE_BOTTOM,o.marginBottom||0),e.setMargin(s.EDGE_LEFT,o.marginLeft||0),e.setMargin(s.EDGE_RIGHT,o.marginRight||0),e.setBorder(s.EDGE_TOP,o.borderTopWidth||0),e.setBorder(s.EDGE_BOTTOM,o.borderBottomWidth||0),e.setBorder(s.EDGE_LEFT,o.borderLeftWidth||0),e.setBorder(s.EDGE_RIGHT,o.borderRightWidth||0),e.setPadding(s.EDGE_TOP,o.paddingTop||0),e.setPadding(s.EDGE_BOTTOM,o.paddingBottom||0),e.setPadding(s.EDGE_LEFT,o.paddingLeft||0),e.setPadding(s.EDGE_RIGHT,o.paddingRight||0),e.setPositionType(de(o.position,{absolute:s.POSITION_TYPE_ABSOLUTE,relative:s.POSITION_TYPE_RELATIVE},s.POSITION_TYPE_RELATIVE,"position")),typeof o.top<"u"&&e.setPosition(s.EDGE_TOP,o.top),typeof o.bottom<"u"&&e.setPosition(s.EDGE_BOTTOM,o.bottom),typeof o.left<"u"&&e.setPosition(s.EDGE_LEFT,o.left),typeof o.right<"u"&&e.setPosition(s.EDGE_RIGHT,o.right),typeof o.height<"u"?e.setHeight(o.height):e.setHeightAuto(),typeof o.width<"u"?e.setWidth(o.width):e.setWidthAuto(),[o,gn(o)]}c();c();c();var ls=[1,0,0,1,0,0];function Bl(e,t,n){let r=[...ls];for(let i of e){let s=Object.keys(i)[0],o=i[s];if(typeof o=="string")if(s==="translateX")o=parseFloat(o)/100*t,i[s]=o;else if(s==="translateY")o=parseFloat(o)/100*n,i[s]=o;else throw new Error(`Invalid transform: "${s}: ${o}".`);let a=o,u=[...ls];switch(s){case"translateX":u[4]=a;break;case"translateY":u[5]=a;break;case"scale":u[0]=a,u[3]=a;break;case"scaleX":u[0]=a;break;case"scaleY":u[3]=a;break;case"rotate":{let l=a*Math.PI/180,f=Math.cos(l),d=Math.sin(l);u[0]=f,u[1]=d,u[2]=-d,u[3]=f;break}case"skewX":u[2]=Math.tan(a*Math.PI/180);break;case"skewY":u[1]=Math.tan(a*Math.PI/180);break}r=St(u,r)}e.splice(0,e.length),e.push(...r),e.__resolved=!0}function Ot({left:e,top:t,width:n,height:r},i,s,o){let a;i.__resolved||Bl(i,n,r);let u=i;if(s)a=u;else{let l=(o==null?void 0:o.xAbsolute)??((o==null?void 0:o.xRelative)??50)*n/100,f=(o==null?void 0:o.yAbsolute)??((o==null?void 0:o.yRelative)??50)*r/100,d=e+l,g=t+f;a=St([1,0,0,1,d,g],St(u,[1,0,0,1,-d,-g])),u.__parent&&(a=St(u.__parent,a)),u.splice(0,6,...a)}return`matrix(${a.map(l=>l.toFixed(2)).join(",")})`}function fs({left:e,top:t,width:n,height:r,isInheritingTransform:i},s){let o="",a=1;return s.transform&&(o=Ot({left:e,top:t,width:n,height:r},s.transform,i,s.transformOrigin)),s.opacity!==void 0&&(a=+s.opacity),{matrix:o,opacity:a}}function _n({id:e,content:t,filter:n,left:r,top:i,width:s,height:o,matrix:a,opacity:u,image:l,clipPathId:f,debug:d,shape:g,decorationShape:h},p){let v="";if(d&&(v=A("rect",{x:r,y:i-o,width:s,height:o,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:a||void 0,"clip-path":f?`url(#${f})`:void 0})),l){let b={href:l,x:r,y:i,width:s,height:o,transform:a||void 0,"clip-path":f?`url(#${f})`:void 0,style:p.filter?`filter:${p.filter}`:void 0};return[(n?`${n}<g filter="url(#satori_s-${e})">`:"")+A("image",{...b,opacity:u!==1?u:void 0})+(h||"")+(n?"</g>":"")+v,""]}let w={x:r,y:i,width:s,height:o,"font-weight":p.fontWeight,"font-style":p.fontStyle,"font-size":p.fontSize,"font-family":p.fontFamily,"letter-spacing":p.letterSpacing||void 0,transform:a||void 0,"clip-path":f?`url(#${f})`:void 0,style:p.filter?`filter:${p.filter}`:void 0};return[(n?`${n}<g filter="url(#satori_s-${e})">`:"")+A("text",{...w,fill:p.color,opacity:u!==1?u:void 0},t)+(h||"")+(n?"</g>":"")+v,g?A("text",w,t):""]}c();function Ul(e,t,n){return e.replace(/([MA])([0-9.-]+),([0-9.-]+)/g,function(r,i,s,o){return i+(parseFloat(s)+t)+","+(parseFloat(o)+n)})}var Pr=1.1;function cs({id:e,width:t,height:n},r){if(!r.shadowColor||!r.shadowOffset||typeof r.shadowRadius>"u")return"";let i=r.shadowColor.length,s="",o="",a=0,u=t,l=0,f=n;for(let d=0;d<i;d++){let g=r.shadowRadius[d]*r.shadowRadius[d]/4;a=Math.min(r.shadowOffset[d].width-g,a),u=Math.max(r.shadowOffset[d].width+g+t,u),l=Math.min(r.shadowOffset[d].height-g,l),f=Math.max(r.shadowOffset[d].height+g+n,f),s+=A("feDropShadow",{dx:r.shadowOffset[d].width,dy:r.shadowOffset[d].height,stdDeviation:r.shadowRadius[d]/2,"flood-color":r.shadowColor[d],"flood-opacity":1,...i>1?{in:"SourceGraphic",result:`satori_s-${e}-result-${d}`}:{}}),i>1&&(o=A("feMergeNode",{in:`satori_s-${e}-result-${d}`})+o)}return A("filter",{id:`satori_s-${e}`,x:(a/t*100*Pr).toFixed(2)+"%",y:(l/n*100*Pr).toFixed(2)+"%",width:((u-a)/t*100*Pr).toFixed(2)+"%",height:((f-l)/n*100*Pr).toFixed(2)+"%"},s+(o?A("feMerge",{},o):""))}function ds({width:e,height:t,shape:n,opacity:r,id:i},s){if(!s.boxShadow)return null;let o="",a="";for(let u=s.boxShadow.length-1;u>=0;u--){let l="",f=s.boxShadow[u];f.spreadRadius&&f.inset&&(f.spreadRadius=-f.spreadRadius);let d=f.blurRadius*f.blurRadius/4+(f.spreadRadius||0),g=Math.min(-d-(f.inset?f.offsetX:0),0),h=Math.max(d+e-(f.inset?f.offsetX:0),e),p=Math.min(-d-(f.inset?f.offsetY:0),0),v=Math.max(d+t-(f.inset?f.offsetY:0),t),w=`satori_s-${i}-${u}`,b=`satori_ms-${i}-${u}`,y=f.spreadRadius?n.replace('stroke-width="0"',`stroke-width="${f.spreadRadius*2}"`):n;l+=A("mask",{id:b,maskUnits:"userSpaceOnUse"},A("rect",{x:0,y:0,width:s._viewportWidth||"100%",height:s._viewportHeight||"100%",fill:f.inset?"#000":"#fff"})+y.replace('fill="#fff"',f.inset?'fill="#fff"':'fill="#000"').replace('stroke="#fff"',""));let _=y.replace(/d="([^"]+)"/,(O,k)=>'d="'+Ul(k,f.offsetX,f.offsetY)+'"').replace(/x="([^"]+)"/,(O,k)=>'x="'+(parseFloat(k)+f.offsetX)+'"').replace(/y="([^"]+)"/,(O,k)=>'y="'+(parseFloat(k)+f.offsetY)+'"');f.spreadRadius&&f.spreadRadius<0&&(l+=A("mask",{id:b+"-neg",maskUnits:"userSpaceOnUse"},_.replace('stroke="#fff"','stroke="#000"').replace(/stroke-width="[^"]+"/,`stroke-width="${-f.spreadRadius*2}"`))),f.spreadRadius&&f.spreadRadius<0&&(_=A("g",{mask:`url(#${b}-neg)`},_)),l+=A("defs",{},A("filter",{id:w,x:`${g/e*100}%`,y:`${p/t*100}%`,width:`${(h-g)/e*100}%`,height:`${(v-p)/t*100}%`},A("feGaussianBlur",{stdDeviation:f.blurRadius/2,result:"b"})+A("feFlood",{"flood-color":f.color,in:"SourceGraphic",result:"f"})+A("feComposite",{in:"f",in2:"b",operator:f.inset?"out":"in"})))+A("g",{mask:`url(#${b})`,filter:`url(#${w})`,opacity:r},_),f.inset?a+=l:o+=l}return[o,a]}c();function Sn({width:e,left:t,top:n,ascender:r,clipPathId:i},s){let{textDecorationColor:o,textDecorationStyle:a,textDecorationLine:u,fontSize:l}=s;if(!u||u==="none")return"";let f=Math.max(1,l*.1),d=u==="line-through"?n+r*.5:u==="underline"?n+r*1.1:n,g=a==="dashed"?`${f*1.2} ${f*2}`:a==="dotted"?`0 ${f*2}`:void 0;return A("line",{x1:t,y1:d,x2:t+e,y2:d,stroke:o,"stroke-width":f,"stroke-dasharray":g,"stroke-linecap":a==="dotted"?"round":"square","clip-path":i?`url(#${i})`:void 0})}async function*kn(e,t){var Ao;let n=await Fe(),{parentStyle:r,inheritedStyle:i,parent:s,font:o,id:a,isInheritingTransform:u,debug:l,embedFont:f,graphemeImages:d,locale:g,canLoadAdditionalAssets:h}=t,{textAlign:p,textOverflow:v,whiteSpace:w,wordBreak:b,lineHeight:y,textTransform:_,textWrap:O,fontSize:k,filter:C,_inheritedBackgroundClipTextPath:D}=r;e=zl(e,_,g);let{content:L,shouldCollapseWhitespace:z,allowSoftWrap:G}=jl(e,w),{words:J,requiredBreaks:j,allowBreakWord:V}=Gl(L,b),re=Vl(n,p);s.insertChild(re,s.getChildCount()),Yo(r.flexShrink)&&s.setFlexShrink(1);let $=o.getEngine(k,y,r,g),ue=h?ce(e,"grapheme").filter(W=>!$.has(W)):[];yield ue.map(W=>({word:W,locale:g})),ue.length&&($=o.getEngine(k,y,r,g));let Le=Hl($,r);function R(W){return!!(d&&d[W])}function M(W){let q=0;for(let N of W)R(N)?q+=k:q+=Le(N);return q}let H=W=>{if(W.length===0)return{originWidth:0,endingSpacesWidth:0};let q=M(ce(W,"grapheme")),N=W.trimEnd()===W?q:M(ce(W.trimEnd(),"grapheme"));return{originWidth:q,endingSpacesWidth:q-N}},F=[],ge=[],Pe=[],vt=[],$e=[];function tn(W){let q=0,N=0,ve=0,le=-1,fe=0,te=0,ie=0;F=[],Pe=[0],vt=[],$e=[];let De=0;for(;De<J.length;){let X=J[De],Xe=j[De],be=0,Ue=0,{originWidth:yt,endingSpacesWidth:Qe}=H(X);be=yt,Ue=Qe,Xe&&te===0&&(te=$.height(X));let oe=",.!?:-@)>]}%#".indexOf(X[0])<0,ae=!N,ze=De&&oe&&N+be>W+Ue&&G;if(V&&be>W&&(!N||ze||Xe)){let Ke=ce(X,"grapheme");J.splice(De,1,...Ke),N>0&&(F.push(N),ge.push(ie),q++,fe+=te,N=0,te=0,ie=0,Pe.push(1),le=-1);continue}if(Xe||ze)z&&X===" "&&(be=0),F.push(N),ge.push(ie),q++,fe+=te,N=be,te=be?$.height(X):0,ie=be?$.baseline(X):0,Pe.push(1),le=-1,Xe||(ve=Math.max(ve,W));else{N+=be;let Ke=$.height(X);Ke>te&&(te=Ke,ie=$.baseline(X)),ae&&Pe[Pe.length-1]++}ae&&le++,ve=Math.max(ve,N);let at=N-be;if(be===0)$e.push({y:fe,x:at,width:0,line:q,lineIndex:le,isImage:!1});else{let Ke=ce(X,"word");for(let un=0;un<Ke.length;un++){let ln=Ke[un],br=0,Io=!1;R(ln)?(br=k,Io=!0):br=Le(ln),vt.push(ln),$e.push({y:fe,x:at,width:br,line:q,lineIndex:le,isImage:Io}),at+=br}}De++}return N&&(q++,F.push(N),ge.push(ie),fe+=te),{width:ve,height:fe}}let pr={width:0,height:0};re.setMeasureFunc(W=>{let{width:q,height:N}=tn(W);if(O==="balance"){let ve=q/2,le=q,fe=q;for(;ve+1<le;){fe=(ve+le)/2;let{height:te}=tn(fe);te>N?ve=fe:le=fe}return tn(le),pr={width:le,height:N},{width:le,height:N}}return pr={width:q,height:N},{width:q,height:N}});let[nl,il]=yield,rn="",hr="",qe=i._inheritedClipPathId,So=i._inheritedMaskId,{left:ko,top:To,width:nn,height:ol}=re.getComputedLayout(),on=s.getComputedWidth()-s.getComputedPadding(n.EDGE_LEFT)-s.getComputedPadding(n.EDGE_RIGHT)-s.getComputedBorder(n.EDGE_LEFT)-s.getComputedBorder(n.EDGE_RIGHT),it=nl+ko,ot=il+To,{matrix:Ce,opacity:mr}=fs({left:ko,top:To,width:nn,height:ol,isInheritingTransform:u},r),st="";if(r.textShadowOffset){let{textShadowColor:W,textShadowOffset:q,textShadowRadius:N}=r;Array.isArray(r.textShadowOffset)||(W=[W],q=[q],N=[N]),st=cs({width:pr.width,height:pr.height,id:a},{shadowColor:W,shadowOffset:q,shadowRadius:N}),st=A("defs",{},st)}let bt="",gr="",Oo="",sn=-1,Eo=v==="ellipsis"?M(["\u2026"]):0,sl=v==="ellipsis"?M([" "]):0,vr={},Be=null,Po=0;for(let W=0;W<vt.length;W++){let q=$e[W];if(!q)continue;let N=vt[W],ve=null,le=!1,fe=d?d[N]:null,te=q.y,ie=q.x,De=q.width,X=q.line;if(X===sn)continue;let Xe=!1;if(F.length>1){let oe=nn-F[X];if(p==="right"||p==="end")ie+=oe;else if(p==="center")ie+=oe/2;else if(p==="justify"&&X<F.length-1){let ae=Pe[X];ie+=(ae>1?oe/(ae-1):0)*q.lineIndex,Xe=!0}}if(vr[X]||(vr[X]=[ie,Xe?nn:F[X]]),v==="ellipsis"&&F[X]>on&&q.x+De+Eo+sl>on){let oe=ce(N,"grapheme",g),ae="",ze=0;for(let an of oe){let at=q.x+M([ae+an]);if(ae&&at+Eo>on)break;ae+=an,ze=at}N=ae+"\u2026",sn=X,vr[X][1]=ze,le=!0}let be=ge[X],Ue=$.baseline(N),yt=$.height(N),Qe=be-Ue;if(fe)te+=0;else if(f){if(!zo.includes(N)&&vt[W+1]&&$e[W+1]&&!$e[W+1].isImage&&te===$e[W+1].y&&!le){Be===null&&(Po=ie),Be=Be===null?N:Be+N;continue}let oe=Be===null?N:Be+N,ae=Be===null?ie:Po,ze=q.width+ie-ae;ve=$.getSVG(oe,{...r,left:it+ae,top:ot+te+Ue+Qe,letterSpacing:r.letterSpacing}),Be=null,l&&(Oo+=A("rect",{x:it+ae,y:ot+te+Qe,width:ze,height:yt,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:Ce||void 0,"clip-path":qe?`url(#${qe})`:void 0})+A("line",{x1:it+ie,x2:it+ie+q.width,y1:ot+te+Qe+Ue,y2:ot+te+Qe+Ue,stroke:"#14c000","stroke-width":1,transform:Ce||void 0,"clip-path":qe?`url(#${qe})`:void 0}))}else te+=Ue+Qe;if(r.textDecorationLine&&(X!==((Ao=$e[W+1])==null?void 0:Ao.line)||sn===X)){let oe=vr[X];oe&&!oe[2]&&(bt+=Sn({left:it+oe[0],top:ot+yt*+X,width:oe[1],ascender:$.baseline(N),clipPathId:qe},r),oe[2]=1)}if(ve!==null)gr+=ve+" ";else{let[oe,ae]=_n({content:N,filter:st,id:a,left:it+ie,top:ot+te,width:De,height:yt,matrix:Ce,opacity:mr,image:fe,clipPathId:qe,debug:l,shape:!!D,decorationShape:bt},r);rn+=oe,hr+=ae,bt=""}}if(gr){let W=r.color!=="transparent"&&mr!==0?A("path",{fill:r.color,d:gr,transform:Ce||void 0,opacity:mr!==1?mr:void 0,"clip-path":qe?`url(#${qe})`:void 0,mask:So?`url(#${So})`:void 0,style:C?`filter:${C}`:void 0}):"";D&&(hr=A("path",{d:gr,transform:Ce||void 0})),rn+=(st?st+A("g",{filter:`url(#satori_s-${a})`},W+bt):W+bt)+Oo}return hr&&(r._inheritedBackgroundClipTextPath.value+=hr),rn}function zl(e,t,n){return t==="uppercase"?e=e.toLocaleUpperCase(n):t==="lowercase"?e=e.toLocaleLowerCase(n):t==="capitalize"&&(e=ce(e,"word",n).map(r=>ce(r,"grapheme",n).map((i,s)=>s===0?i.toLocaleUpperCase(n):i).join("")).join("")),e}function Gl(e,t){let n=["break-all","break-word"].includes(t),{words:r,requiredBreaks:i}=Xo(e,t);return{words:r,requiredBreaks:i,allowBreakWord:n}}function jl(e,t){let n=["pre","pre-wrap","pre-line"].includes(t),r=!["pre","pre-wrap"].includes(t),i=!["pre","nowrap"].includes(t);return n||(e=e.replace(/\n/g," ")),r&&(e=e.replace(/[ ]+/g," "),e=e.trim()),{content:e,shouldCollapseWhitespace:r,allowSoftWrap:i}}function Vl(e,t){let n=e.Node.create();return n.setAlignItems(e.ALIGN_BASELINE),n.setJustifyContent(de(t,{left:e.JUSTIFY_FLEX_START,right:e.JUSTIFY_FLEX_END,center:e.JUSTIFY_CENTER,justify:e.JUSTIFY_SPACE_BETWEEN,start:e.JUSTIFY_FLEX_START,end:e.JUSTIFY_FLEX_END},e.JUSTIFY_FLEX_START,"textAlign")),n}function Hl(e,t){let n=new Map;return function(i){if(n.has(i))return n.get(i);let s=e.measure(i,t);return n.set(i,s),s}}c();c();c();var Tn=Tn||{},ps={type:"directional",value:"bottom"};Tn.parse=function(){var e={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,zeroValue:/[0]/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},t="";function n(R){var M=new Error(t+": "+R);throw M.source=t,M}function r(){var R=i();return t.length>0&&n("Invalid input not EOF"),R}function i(){return O(s)}function s(){return o("linear-gradient",e.linearGradient,u,ps)||o("repeating-linear-gradient",e.repeatingLinearGradient,u,ps)||o("radial-gradient",e.radialGradient,g)||o("repeating-radial-gradient",e.repeatingRadialGradient,g)}function o(R,M,H,F){return a(M,function(ge){var Pe=H();return Pe?ue(e.comma)||n("Missing comma before color stops"):Pe=F,{type:R,orientation:Pe,colorStops:O(k)}})}function a(R,M){var H=ue(R);if(H){ue(e.startCall)||n("Missing (");var F=M(H);return ue(e.endCall)||n("Missing )"),F}}function u(){return l()||f()||d()}function l(){return $("directional",e.sideOrCorner,1)}function f(){return $("angular",e.angleValue,1)}function d(){return $("directional",e.zeroValue,0)}function g(){var R,M=h(),H;return M&&(R=[],R.push(M),H=t,ue(e.comma)&&(M=h(),M?R.push(M):t=H)),R}function h(){var R=p()||v();if(R)R.at=b();else{var M=w();if(M){R=M;var H=b();H&&(R.at=H)}else{var H=b();if(H)R={type:"shape",value:"ellipse",at:H};else{var F=y();F&&(R={type:"default-radial",at:F})}}}return R}function p(){var R=$("shape",/^(circle)/i,0);return R&&(R.style=re()||w()),R}function v(){var R=$("shape",/^(ellipse)/i,0);return R&&(R.style=j()||w()),R}function w(){return $("extent-keyword",e.extentKeywords,1)}function b(){if($("position",/^at/,0)){var R=y();return R||n("Missing positioning value"),R}}function y(){var R=_();if(R.x||R.y)return{type:"position",value:R}}function _(){return{x:j(),y:j()}}function O(R){var M=R(),H=[];if(M)for(H.push(M);ue(e.comma);)M=R(),M?H.push(M):n("One extra comma");return H}function k(){var R=C();return R||n("Expected color definition"),R.length=j(),R}function C(){return L()||G()||z()||D()}function D(){return $("literal",e.literalColor,0)}function L(){return $("hex",e.hexColor,1)}function z(){return a(e.rgbColor,function(){return{type:"rgb",value:O(J)}})}function G(){return a(e.rgbaColor,function(){return{type:"rgba",value:O(J)}})}function J(){return ue(e.number)[1]}function j(){return $("%",e.percentageValue,1)||V()||re()}function V(){return $("position-keyword",e.positionKeywords,1)}function re(){return $("px",e.pixelValue,1)||$("em",e.emValue,1)}function $(R,M,H){var F=ue(M);if(F)return{type:R,value:F[H]}}function ue(R){var M,H;return H=/^[\n\r\t\s]+/.exec(t),H&&Le(H[0].length),M=R.exec(t),M&&Le(M[0].length),M}function Le(R){t=t.substr(R)}return function(R){return t=R.toString(),r()}}();var On=Tn;function Yl(e){return e.type==="literal"?e.value:e.type==="hex"?`#${e.value}`:e.type==="rgb"?`rgb(${e.value.join(",")})`:e.type==="rgba"?`rgba(${e.value.join(",")})`:"transparent"}function Xl(e){let t=0,n=0,r=0,i=0;return e.includes("top")?n=1:e.includes("bottom")&&(i=1),e.includes("left")?t=1:e.includes("right")&&(r=1),!t&&!r&&!n&&!i&&(n=1),[t,n,r,i]}function Ql(e,t){return typeof e=="string"&&e.endsWith("%")?t*parseFloat(e)/100:+e}function En(e,{x:t,y:n,defaultX:r,defaultY:i}){return(e?e.split(" ").map(s=>{try{let o=new Ge(s);return o.type==="length"||o.type==="number"?o.value:o.value+o.unit}catch{return null}}).filter(s=>s!==null):[r,i]).map((s,o)=>Ql(s,[t,n][o]))}function hs(e,t){let n=[];for(let o of t){let a=Yl(o);if(!n.length&&(n.push({offset:0,color:a}),typeof o.length>"u"||o.length.value==="0"))continue;let u=typeof o.length>"u"?void 0:o.length.type==="%"?o.length.value/100:o.length.value/e;n.push({offset:u,color:a})}n.length||n.push({offset:0,color:"transparent"});let r=n[n.length-1];r.offset!==1&&(typeof r.offset>"u"?r.offset=1:n.push({offset:1,color:r.color}));let i=0,s=1;for(let o=0;o<n.length;o++)if(typeof n[o].offset>"u"){for(s<o&&(s=o);typeof n[s].offset>"u";)s++;n[o].offset=(n[s].offset-n[i].offset)/(s-i)*(o-i)+n[i].offset}else i=o;return n}async function Pn({id:e,width:t,height:n,left:r,top:i},{image:s,size:o,position:a,repeat:u}){u=u||"repeat";let l=u==="repeat-x"||u==="repeat",f=u==="repeat-y"||u==="repeat",d=En(o,{x:t,y:n,defaultX:t,defaultY:n}),g=En(a,{x:t,y:n,defaultX:0,defaultY:0});if(s.startsWith("linear-gradient(")){let h=On.parse(s)[0],[p,v]=d,w,b,y,_;if(h.orientation.type==="directional")[w,b,y,_]=Xl(h.orientation.value);else if(h.orientation.type==="angular"){let L=+h.orientation.value/180*Math.PI-Math.PI/2,z=Math.cos(L),G=Math.sin(L);w=0,b=0,y=z,_=G,y<0&&(w-=y,y=0),_<0&&(b-=_,_=0)}let O=hs(t,h.colorStops),k=`satori_bi${e}`,C=`satori_pattern_${e}`,D=A("pattern",{id:C,x:g[0]/t,y:g[1]/n,width:l?p/t:"1",height:f?v/n:"1",patternUnits:"objectBoundingBox"},A("linearGradient",{id:k,x1:w,y1:b,x2:y,y2:_},O.map(L=>A("stop",{offset:L.offset*100+"%","stop-color":L.color})).join(""))+A("rect",{x:0,y:0,width:p,height:v,fill:`url(#${k})`}));return[C,D]}if(s.startsWith("radial-gradient(")){let h=On.parse(s)[0],p=h.orientation[0],[v,w]=d,b="circle",y=v/2,_=w/2;if(p.type==="shape"){if(b=p.value,p.at)if(p.at.type==="position")y=p.at.value.x.value,_=p.at.value.y.value;else throw new Error("orientation.at.type not implemented: "+p.at.type)}else throw new Error("orientation.type not implemented: "+p.type);let O=hs(t,h.colorStops),k=`satori_radial_${e}`,C=`satori_pattern_${e}`,D=`satori_mask_${e}`,L={},z=Math.max(Math.abs(v-y),Math.abs(y)),G=Math.max(Math.abs(w-_),Math.abs(_));if(b==="circle")L.r=Math.sqrt(z*z+G*G);else if(b==="ellipse"){let V=G!==0?z/G:1;L.ry=Math.sqrt(z*z+G*G*V*V)/V,L.rx=L.ry*V}let J=A("pattern",{id:C,x:g[0]/t,y:g[1]/n,width:l?v/t:"1",height:f?w/n:"1",patternUnits:"objectBoundingBox"},A("radialGradient",{id:k},O.map(V=>A("stop",{offset:V.offset,"stop-color":V.color})).join(""))+A("mask",{id:D},A("rect",{x:0,y:0,width:v,height:w,fill:"#fff"}))+A(b,{cx:y,cy:_,width:v,height:w,...L,fill:`url(#${k})`,mask:`url(#${D})`}));return[C,J]}if(s.startsWith("url(")){let h=En(o,{x:t,y:n,defaultX:0,defaultY:0}),[p,v,w]=await Er(s.slice(4,-1)),b=h[0]||v,y=h[1]||w;return[`satori_bi${e}`,A("pattern",{id:`satori_bi${e}`,patternContentUnits:"userSpaceOnUse",patternUnits:"userSpaceOnUse",x:g[0]+r,y:g[1]+i,width:l?b:"100%",height:f?y:"100%"},A("image",{x:0,y:0,width:b,height:y,preserveAspectRatio:"none",href:p}))]}throw new Error(`Invalid background image: "${s}"`)}c();function Kl([e,t]){return Math.round(e*1e3)===0&&Math.round(t*1e3)===0?0:Math.round(e*t/Math.sqrt(e*e+t*t)*1e3)/1e3}function Ar(e,t,n){return n<e+t&&(n/2<e&&n/2<t?e=t=n/2:n/2<e?e=n-t:n/2<t&&(t=n-e)),[e,t]}function Ir(e){e[0]=e[1]=Math.min(e[0],e[1])}function Rr(e,t,n,r,i){if(typeof e=="string"){let s=e.split(" ").map(a=>a.trim()),o=!s[1]&&!s[0].endsWith("%");return s[1]=s[1]||s[0],[o,[Math.min(ye(s[0],r,t,i,!0),t),Math.min(ye(s[1],r,n,i,!0),n)]]}return typeof e=="number"?[!0,[Math.min(e,t),Math.min(e,n)]]:[!0,void 0]}var Lr=e=>e&&e[0]!==0&&e[1]!==0;function ft({left:e,top:t,width:n,height:r},i,s){let{borderTopLeftRadius:o,borderTopRightRadius:a,borderBottomLeftRadius:u,borderBottomRightRadius:l,fontSize:f}=i,d,g,h,p;if([d,o]=Rr(o,n,r,f,i),[g,a]=Rr(a,n,r,f,i),[h,u]=Rr(u,n,r,f,i),[p,l]=Rr(l,n,r,f,i),!s&&!Lr(o)&&!Lr(a)&&!Lr(u)&&!Lr(l))return"";o||=[0,0],a||=[0,0],u||=[0,0],l||=[0,0],[o[0],a[0]]=Ar(o[0],a[0],n),[u[0],l[0]]=Ar(u[0],l[0],n),[o[1],u[1]]=Ar(o[1],u[1],r),[a[1],l[1]]=Ar(a[1],l[1],r),d&&Ir(o),g&&Ir(a),h&&Ir(u),p&&Ir(l);let v=[];v[0]=[a,a],v[1]=[l,[-l[0],l[1]]],v[2]=[u,[-u[0],-u[1]]],v[3]=[o,[o[0],-o[1]]];let w=`h${n-o[0]-a[0]} a${v[0][0]} 0 0 1 ${v[0][1]}`,b=`v${r-a[1]-l[1]} a${v[1][0]} 0 0 1 ${v[1][1]}`,y=`h${l[0]+u[0]-n} a${v[2][0]} 0 0 1 ${v[2][1]}`,_=`v${u[1]+o[1]-r} a${v[3][0]} 0 0 1 ${v[3][1]}`;if(s){let k=function(j){let V=Kl([o,a,l,u][j]);return j===0?[[e+o[0]-V,t+o[1]-V],[e+o[0],t]]:j===1?[[e+n-a[0]+V,t+a[1]-V],[e+n,t+a[1]]]:j===2?[[e+n-l[0]+V,t+r-l[1]+V],[e+n-l[0],t+r]]:[[e+u[0]-V,t+r-u[1]+V],[e,t+r-u[1]]]},O=s.indexOf(!1);if(!s.includes(!0))throw new Error("Invalid `partialSides`.");if(O===-1)O=0;else for(;!s[O];)O=(O+1)%4;let C="",D=k(O),L=`M${D[0]} A${v[(O+3)%4][0]} 0 0 1 ${D[1]}`,z=0;for(;z<4&&s[(O+z)%4];z++)C+=L+" ",L=[w,b,y,_][(O+z)%4];let G=(O+z)%4;C+=L.split(" ")[0];let J=k(G);return C+=` A${v[(G+3)%4][0]} 0 0 1 ${J[0]}`,C}return`M${e+o[0]},${t} ${w} ${b} ${y} ${_}`}c();c();c();function ms(e,t,n){return n[e+"Width"]===n[t+"Width"]&&n[e+"Style"]===n[t+"Style"]&&n[e+"Color"]===n[t+"Color"]}function gs({id:e,currentClipPathId:t,borderPath:n,borderType:r,left:i,top:s,width:o,height:a},u){if(!(u.borderTopWidth||u.borderRightWidth||u.borderBottomWidth||u.borderLeftWidth))return null;let f=`satori_bc-${e}`;return[A("clipPath",{id:f,"clip-path":t?`url(#${t})`:void 0},A(r,{x:i,y:s,width:o,height:a,d:n||void 0})),f]}function Et({left:e,top:t,width:n,height:r,props:i,asContentMask:s,maskBorderOnly:o},a){let u=["borderTop","borderRight","borderBottom","borderLeft"];if(!s&&!u.some(h=>a[h+"Width"]))return"";let l="",f=0;for(;f>0&&ms(u[f],u[(f+3)%4],a);)f=(f+3)%4;let d=[!1,!1,!1,!1],g=[];for(let h=0;h<4;h++){let p=(f+h)%4,v=(f+h+1)%4,w=u[p],b=u[v];if(d[p]=!0,g=[a[w+"Width"],a[w+"Style"],a[w+"Color"],w],!ms(w,b,a)){let y=(g[0]||0)+(s&&!o&&a[w.replace("border","padding")]||0);y&&(l+=A("path",{width:n,height:r,...i,fill:"none",stroke:s?"#000":g[2],"stroke-width":y*2,"stroke-dasharray":!s&&g[1]==="dashed"?y*2+" "+y:void 0,d:ft({left:e,top:t,width:n,height:r},a,d)})),d=[!1,!1,!1,!1]}}if(d.some(Boolean)){let h=(g[0]||0)+(s&&!o&&a[g[3].replace("border","padding")]||0);h&&(l+=A("path",{width:n,height:r,...i,fill:"none",stroke:s?"#000":g[2],"stroke-width":h*2,"stroke-dasharray":!s&&g[1]==="dashed"?h*2+" "+h:void 0,d:ft({left:e,top:t,width:n,height:r},a,d)}))}return l}function An({id:e,left:t,top:n,width:r,height:i,matrix:s,borderOnly:o},a){let u=(a.borderLeftWidth||0)+(o?0:a.paddingLeft||0),l=(a.borderTopWidth||0)+(o?0:a.paddingTop||0),f=(a.borderRightWidth||0)+(o?0:a.paddingRight||0),d=(a.borderBottomWidth||0)+(o?0:a.paddingBottom||0),g={x:t+u,y:n+l,width:r-u-f,height:i-l-d};return A("mask",{id:e},A("rect",{...g,fill:"#fff",mask:a._inheritedMaskId?`url(#${a._inheritedMaskId})`:void 0})+Et({left:t,top:n,width:r,height:i,props:{transform:s||void 0},asContentMask:!0,maskBorderOnly:o},a))}function In({left:e,top:t,width:n,height:r,path:i,matrix:s,id:o,currentClipPath:a,src:u},l){if(l.overflow!=="hidden"&&!u)return"";let f=An({id:`satori_om-${o}`,left:e,top:t,width:n,height:r,matrix:s,borderOnly:!u},l);return A("clipPath",{id:`satori_cp-${o}`,"clip-path":a},A(i?"path":"rect",{x:e,y:t,width:n,height:r,d:i||void 0}))+f}async function Pt({id:e,left:t,top:n,width:r,height:i,isInheritingTransform:s,src:o,debug:a},u){if(u.display==="none")return"";let l=!!o,f="rect",d="",g="",h=[],p=1,v="";u.backgroundColor&&h.push(u.backgroundColor),u.opacity!==void 0&&(p=+u.opacity),u.transform&&(d=Ot({left:t,top:n,width:r,height:i},u.transform,s,u.transformOrigin));let w="";if(u.backgroundImage){let J=[];for(let j=0;j<u.backgroundImage.length;j++){let V=u.backgroundImage[j],re=await Pn({id:e+"_"+j,width:r,height:i,left:t,top:n},V);re&&J.unshift(re)}for(let j of J)h.push(`url(#${j[0]})`),g+=j[1],j[2]&&(w+=j[2])}let b=ft({left:t,top:n,width:r,height:i},u);b&&(f="path");let y=u._inheritedClipPathId,_=u._inheritedMaskId;a&&(v=A("rect",{x:t,y:n,width:r,height:i,fill:"transparent",stroke:"#ff5757","stroke-width":1,transform:d||void 0,"clip-path":y?`url(#${y})`:void 0}));let{backgroundClip:O,filter:k}=u,C=O==="text"?`url(#satori_bct-${e})`:y?`url(#${y})`:void 0,D=In({left:t,top:n,width:r,height:i,path:b,id:e,matrix:d,currentClipPath:C,src:o},u),L=h.map(J=>A(f,{x:t,y:n,width:r,height:i,fill:J,d:b||void 0,transform:d||void 0,"clip-path":C,style:k?`filter:${k}`:void 0,mask:_?`url(#${_})`:void 0})).join(""),z=gs({id:e,left:t,top:n,width:r,height:i,currentClipPathId:y,borderPath:b,borderType:f},u);if(l){let J=(u.borderLeftWidth||0)+(u.paddingLeft||0),j=(u.borderTopWidth||0)+(u.paddingTop||0),V=(u.borderRightWidth||0)+(u.paddingRight||0),re=(u.borderBottomWidth||0)+(u.paddingBottom||0),$=u.objectFit==="contain"?"xMidYMid":u.objectFit==="cover"?"xMidYMid slice":"none";L+=A("image",{x:t+J,y:n+j,width:r-J-V,height:i-j-re,href:o,preserveAspectRatio:$,transform:d||void 0,style:k?`filter:${k}`:void 0,"clip-path":`url(#satori_cp-${e})`,mask:`url(#satori_om-${e})`})}if(z){g+=z[0];let J=z[1];L+=Et({left:t,top:n,width:r,height:i,props:{transform:d||void 0,"clip-path":`url(#${J})`}},u)}let G=ds({width:r,height:i,id:e,opacity:p,shape:A(f,{x:t,y:n,width:r,height:i,fill:"#fff",stroke:"#fff","stroke-width":0,d:b||void 0,transform:d||void 0,"clip-path":C,mask:_?`url(#${_})`:void 0})},u);return(g?A("defs",{},g):"")+(G?G[0]:"")+D+(p!==1?`<g opacity="${p}">`:"")+(w||L)+(p!==1?"</g>":"")+(G?G[1]:"")+v}c();var vs=ut(require("emoji-regex"),1),Jl=new RegExp((0,vs.default)(),""),Rn={emoji:Jl,symbol:/\p{Symbol}/u,math:/\p{Math}/u},At={"ja-JP":/\p{scx=Hira}|\p{scx=Kana}|\p{scx=Han}|[\u3000]|[\uFF00-\uFFEF]/u,"ko-KR":/\p{scx=Hangul}/u,"zh-CN":/\p{scx=Han}/u,"zh-TW":/\p{scx=Han}/u,"zh-HK":/\p{scx=Han}/u,"th-TH":/\p{scx=Thai}/u,"bn-IN":/\p{scx=Bengali}/u,"ar-AR":/\p{scx=Arabic}/u,"ta-IN":/\p{scx=Tamil}/u,"ml-IN":/\p{scx=Malayalam}/u,"he-IL":/\p{scx=Hebrew}/u,"te-IN":/\p{scx=Telugu}/u,devanagari:/\p{scx=Devanagari}/u,kannada:/\p{scx=Kannada}/u},Cr=Object.keys({...At,...Rn});function bs(e){return Cr.includes(e)}function ys(e,t){if(t&&At[t]&&At[t].test(e))return t;for(let n of Object.keys(Rn))if(Rn[n].test(e))return n;for(let n of Object.keys(At))if(At[n].test(e))return n;return"unknown"}function xs(e){if(e)return Cr.find(t=>t.toLowerCase()===e.toLowerCase()||t.toLowerCase().startsWith(e.toLowerCase()))}async function*It(e,t){let n=await Fe(),{id:r,inheritedStyle:i,parent:s,font:o,debug:a,locale:u,embedFont:l=!0,graphemeImages:f,canLoadAdditionalAssets:d,getTwStyles:g}=t;if(e===null||typeof e>"u")return yield,yield,"";if(!mn(e)||typeof e.type=="function"){let F;if(!mn(e))F=kn(String(e),t),yield(await F.next()).value;else{if(qo(e.type))throw new Error("Class component is not supported.");F=It(e.type(e.props),t),yield(await F.next()).value}await F.next();let ge=yield;return(await F.next(ge)).value}let{type:h,props:p}=e;if(p&&Bo(p))throw new Error("dangerouslySetInnerHTML property is not supported. See documentation for more information https://github.com/vercel/satori#jsx.");let{style:v,children:w,tw:b,lang:y=u}=p||{},_=xs(y);if(b){let F=g(b,v);v=Object.assign(F,v)}let O=n.Node.create();s.insertChild(O,s.getChildCount());let[k,C]=await wn(O,h,i,v,p),D=k.transform===i.transform;if(D||(k.transform.__parent=i.transform),k.overflow==="hidden"&&(C._inheritedClipPathId=`satori_cp-${r}`,C._inheritedMaskId=`satori_om-${r}`),k.backgroundClip==="text"){let F={value:""};C._inheritedBackgroundClipTextPath=F,k._inheritedBackgroundClipTextPath=F}let L=Uo(w),z=[],G=0,J=[];for(let F of L){let ge=It(F,{id:r+"-"+G++,parentStyle:k,inheritedStyle:C,isInheritingTransform:!0,parent:O,font:o,embedFont:l,debug:a,graphemeImages:f,canLoadAdditionalAssets:d,locale:_,getTwStyles:g});d?J.push(...(await ge.next()).value||[]):await ge.next(),z.push(ge)}yield J;for(let F of z)await F.next();let[j,V]=yield,{left:re,top:$,width:ue,height:Le}=O.getComputedLayout();re+=j,$+=V;let R="",M="",H="";if(h==="img"){let F=k.__src;M=await Pt({id:r,left:re,top:$,width:ue,height:Le,src:F,isInheritingTransform:D,debug:a},k)}else if(h==="svg"){let F=k.color,ge=Vo(e,F);M=await Pt({id:r,left:re,top:$,width:ue,height:Le,src:ge,isInheritingTransform:D,debug:a},k)}else{let F=v==null?void 0:v.display;if(h==="div"&&w&&typeof w!="string"&&F!=="flex"&&F!=="none")throw new Error('Expected <div> to have explicit "display: flex" or "display: none" if it has more than one child node.');M=await Pt({id:r,left:re,top:$,width:ue,height:Le,isInheritingTransform:D,debug:a},k)}for(let F of z)R+=(await F.next([re,$])).value;return k._inheritedBackgroundClipTextPath&&(H+=A("clipPath",{id:`satori_bct-${r}`,"clip-path":k._inheritedClipPathId?`url(#${k._inheritedClipPathId})`:void 0},k._inheritedBackgroundClipTextPath.value)),H+M+R}c();var Dr=ut(require("@shuding/opentype.js"),1);var ws="unknown";function Zl(e,t,[n,r],[i,s]){if(n!==i)return n?!i||n===e?-1:i===e?1:e===400&&n===500||e===500&&n===400?-1:e===400&&i===500||e===500&&i===400?1:e<400?n<e&&i<e?i-n:n<e?-1:i<e?1:n-i:e<n&&e<i?n-i:e<n?-1:e<i?1:i-n:1;if(r!==s){if(r===t)return-1;if(s===t)return 1}return-1}var Rt=class{constructor(t){this.fonts=new Map;this.addFonts(t)}get({name:t,weight:n,style:r}){if(!this.fonts.has(t))return null;n==="normal"&&(n=400),n==="bold"&&(n=700),typeof n=="string"&&(n=Number.parseInt(n,10));let i=[...this.fonts.get(t)],s=i[0];for(let o=1;o<i.length;o++){let[,a,u]=s,[,l,f]=i[o];Zl(n,r,[a,u],[l,f])>0&&(s=i[o])}return s[0]}addFonts(t){for(let n of t){let{name:r,data:i,lang:s}=n;if(s&&!bs(s))throw new Error(`Invalid value for props \`lang\`: "${s}". The value must be one of the following: ${Cr.join(", ")}.`);let o=s??ws,a=Dr.default.parse("buffer"in i?i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength):i,{lowMemory:!0}),u=a.charToGlyphIndex;a.charToGlyphIndex=f=>{let d=u.call(a,f);return d===0&&a._trackBrokenChars&&a._trackBrokenChars.push(f),d},this.defaultFont||(this.defaultFont=a);let l=`${r.toLowerCase()}_${o}`;this.fonts.has(l)||this.fonts.set(l,[]),this.fonts.get(l).push([a,n.weight,n.style])}}getEngine(t=16,n=1.2,{fontFamily:r,fontWeight:i=400,fontStyle:s="normal"},o){if(!this.fonts.size)throw new Error("No fonts are loaded. At least one font is required to calculate the layout.");r=(Array.isArray(r)?r:[r]).map(y=>y.toLowerCase());let a=[];r.forEach(y=>{let _=this.get({name:y,weight:i,style:s});if(_){a.push(_);return}let O=this.get({name:y+"_unknown",weight:i,style:s});if(O){a.push(O);return}});let u=Array.from(this.fonts.keys()),l=[],f=[],d=[];for(let y of u)if(!r.includes(y))if(o){let _=ef(y);_?_===o?l.push(this.get({name:y,weight:i,style:s})):f.push(this.get({name:y,weight:i,style:s})):d.push(this.get({name:y,weight:i,style:s}))}else d.push(this.get({name:y,weight:i,style:s}));let g=new Map,h=(y,_=!0)=>{let O=[...a,...d,...l,..._?f:[]];if(typeof y>"u")return _?O[O.length-1]:void 0;let k=y.charCodeAt(0);if(g.has(k))return g.get(k);let C=O.find((D,L)=>!!D.charToGlyphIndex(y)||_&&L===O.length-1);return C&&g.set(k,C),C},p=(y,_=!1)=>{var k,C;return((_?(C=(k=y.tables)==null?void 0:k.os2)==null?void 0:C.sTypoAscender:0)||y.ascender)/y.unitsPerEm*t},v=(y,_=!1)=>{var k,C;return((_?(C=(k=y.tables)==null?void 0:k.os2)==null?void 0:C.sTypoDescender:0)||y.descender)/y.unitsPerEm*t},w=y=>h(y,!1),b={has:y=>{if(y===`
|
|
6
6
|
`)return!0;let _=w(y);return _?(_._trackBrokenChars=[],_.stringToGlyphs(y),_._trackBrokenChars.length?(_._trackBrokenChars=void 0,!1):!0):!1},baseline:(y,_=typeof y>"u"?a[0]:h(y))=>{let O=p(_,!0),k=v(_,!0),C=b.height(y,_),{yMax:D,yMin:L}=_.tables.head,z=O-k,G=(D/(D-L)-1)*z;return C*((1.2/n+1)/2)+G},height:(y,_=typeof y>"u"?a[0]:h(y))=>(p(_)-v(_))*(n/1.2),measure:(y,_)=>this.measure(h,y,_),getSVG:(y,_)=>this.getSVG(h,y,_)};return b}patchFontFallbackResolver(t,n){let r=[];t._trackBrokenChars=r;let i=t.stringToGlyphs;return t.stringToGlyphs=(s,...o)=>{let a=i.call(t,s,...o);for(let u=0;u<a.length;u++)if(a[u].unicode===void 0){let l=r.shift(),f=n(l);if(f!==t){let d=f.charToGlyph(l),g=t.unitsPerEm/f.unitsPerEm,h=new Dr.default.Path;h.unitsPerEm=t.unitsPerEm,h.commands=d.path.commands.map(v=>{let w={...v};for(let b in w)typeof w[b]=="number"&&(w[b]*=g);return w});let p=new Dr.default.Glyph({...d,advanceWidth:d.advanceWidth*g,xMin:d.xMin*g,xMax:d.xMax*g,yMin:d.yMin*g,yMax:d.yMax*g,path:h});a[u]=p}}return a},()=>{t.stringToGlyphs=i,t._trackBrokenChars=void 0}}measure(t,n,{fontSize:r,letterSpacing:i=0}){let s=t(n),o=this.patchFontFallbackResolver(s,t);try{return s.getAdvanceWidth(n,r,{letterSpacing:i/r})}finally{o()}}getSVG(t,n,{fontSize:r,top:i,left:s,letterSpacing:o=0}){let a=t(n),u=this.patchFontFallbackResolver(a,t);try{return r===0?"":a.getPath(n.replace(/\n/g,""),s,i,r,{letterSpacing:o/r}).toPathData(1)}finally{u()}}};function ef(e){let t=e.split("_"),n=t[t.length-1];return n===ws?void 0:n}c();function Ln({width:e,height:t,content:n}){return A("svg",{width:e,height:t,viewBox:`0 0 ${e} ${t}`,xmlns:"http://www.w3.org/2000/svg"},n)}c();c();var el=ut(Ru());c();c();c();c();var B0=["ios","android","windows","macos","web"];function Cu(e){return B0.includes(e)}var U0=["portrait","landscape"];function Du(e){return U0.includes(e)}var Lu;(function(e){e.fontSize="fontSize",e.lineHeight="lineHeight"})(Lu||(Lu={}));var U;(function(e){e.rem="rem",e.em="em",e.px="px",e.percent="%",e.vw="vw",e.vh="vh",e.none="<no-css-unit>"})(U||(U={}));function io(e){return typeof e=="string"}function oo(e){return typeof e=="object"}var so;function m(e){return{kind:"complete",style:e}}function ne(e,t={}){let{fractions:n}=t;if(n&&e.includes("/")){let[s="",o=""]=e.split("/",2),a=ne(s),u=ne(o);return!a||!u?null:[a[0]/u[0],u[1]]}let r=parseFloat(e);if(Number.isNaN(r))return null;let i=e.match(/(([a-z]{2,}|%))$/);if(!i)return[r,U.none];switch(i==null?void 0:i[1]){case"rem":return[r,U.rem];case"px":return[r,U.px];case"em":return[r,U.em];case"%":return[r,U.percent];case"vw":return[r,U.vw];case"vh":return[r,U.vh];default:return null}}function We(e,t,n={}){let r=Ie(t,n);return r===null?null:m({[e]:r})}function Jr(e,t,n){let r=Ie(t);return r!==null&&(n[e]=r),n}function Nu(e,t){let n=Ie(t);return n===null?null:{[e]:n}}function Ie(e,t={}){if(e===void 0)return null;let n=ne(String(e),t);return n?Ye(...n,t):null}function Ye(e,t,n={}){let{isNegative:r,device:i}=n;switch(t){case U.rem:return e*16*(r?-1:1);case U.px:return e*(r?-1:1);case U.percent:return`${r?"-":""}${e}%`;case U.none:return e*(r?-1:1);case U.vw:return i!=null&&i.windowDimensions?i.windowDimensions.width*(e/100):(me("`vw` CSS unit requires configuration with `useDeviceContext()`"),null);case U.vh:return i!=null&&i.windowDimensions?i.windowDimensions.height*(e/100):(me("`vh` CSS unit requires configuration with `useDeviceContext()`"),null);default:return null}}function ao(e){let t=ne(e);if(!t)return null;let[n,r]=t;switch(r){case U.rem:return n*16;case U.px:return n;default:return null}}var z0={t:"Top",tr:"TopRight",tl:"TopLeft",b:"Bottom",br:"BottomRight",bl:"BottomLeft",l:"Left",r:"Right",x:"Horizontal",y:"Vertical"};function uo(e){return z0[e??""]||"All"}function lo(e){let t="All";return[e.replace(/^-(t|b|r|l|tr|tl|br|bl)(-|$)/,(r,i)=>(t=uo(i),"")),t]}function rt(e,t={}){if(e.includes("/")){let n=Fu(e,{...t,fractions:!0});if(n)return n}return e[0]==="["&&(e=e.slice(1,-1)),Fu(e,t)}function Te(e,t,n={}){let r=rt(t,n);return r===null?null:m({[e]:r})}function Fu(e,t={}){if(e==="px")return 1;let n=ne(e,t);if(!n)return null;let[r,i]=n;return t.fractions&&(i=U.percent,r*=100),i===U.none&&(r=r/4,i=U.rem),Ye(r,i,t)}function G0(...e){console.warn(...e)}function j0(...e){}var me=typeof process>"u"||((so=process==null?void 0:process.env)===null||so===void 0?void 0:so.JEST_WORKER_ID)===void 0?G0:j0;var V0=[["aspect-square",m({aspectRatio:1})],["aspect-video",m({aspectRatio:16/9})],["items-center",m({alignItems:"center"})],["items-start",m({alignItems:"flex-start"})],["items-end",m({alignItems:"flex-end"})],["items-baseline",m({alignItems:"baseline"})],["items-stretch",m({alignItems:"stretch"})],["justify-start",m({justifyContent:"flex-start"})],["justify-end",m({justifyContent:"flex-end"})],["justify-center",m({justifyContent:"center"})],["justify-between",m({justifyContent:"space-between"})],["justify-around",m({justifyContent:"space-around"})],["justify-evenly",m({justifyContent:"space-evenly"})],["content-start",m({alignContent:"flex-start"})],["content-end",m({alignContent:"flex-end"})],["content-between",m({alignContent:"space-between"})],["content-around",m({alignContent:"space-around"})],["content-stretch",m({alignContent:"stretch"})],["content-center",m({alignContent:"center"})],["self-auto",m({alignSelf:"auto"})],["self-start",m({alignSelf:"flex-start"})],["self-end",m({alignSelf:"flex-end"})],["self-center",m({alignSelf:"center"})],["self-stretch",m({alignSelf:"stretch"})],["self-baseline",m({alignSelf:"baseline"})],["direction-inherit",m({direction:"inherit"})],["direction-ltr",m({direction:"ltr"})],["direction-rtl",m({direction:"rtl"})],["hidden",m({display:"none"})],["flex",m({display:"flex"})],["flex-row",m({flexDirection:"row"})],["flex-row-reverse",m({flexDirection:"row-reverse"})],["flex-col",m({flexDirection:"column"})],["flex-col-reverse",m({flexDirection:"column-reverse"})],["flex-wrap",m({flexWrap:"wrap"})],["flex-wrap-reverse",m({flexWrap:"wrap-reverse"})],["flex-nowrap",m({flexWrap:"nowrap"})],["flex-auto",m({flexGrow:1,flexShrink:1,flexBasis:"auto"})],["flex-initial",m({flexGrow:0,flexShrink:1,flexBasis:"auto"})],["flex-none",m({flexGrow:0,flexShrink:0,flexBasis:"auto"})],["overflow-hidden",m({overflow:"hidden"})],["overflow-visible",m({overflow:"visible"})],["overflow-scroll",m({overflow:"scroll"})],["absolute",m({position:"absolute"})],["relative",m({position:"relative"})],["italic",m({fontStyle:"italic"})],["not-italic",m({fontStyle:"normal"})],["oldstyle-nums",ur("oldstyle-nums")],["small-caps",ur("small-caps")],["lining-nums",ur("lining-nums")],["tabular-nums",ur("tabular-nums")],["proportional-nums",ur("proportional-nums")],["font-thin",m({fontWeight:"100"})],["font-100",m({fontWeight:"100"})],["font-extralight",m({fontWeight:"200"})],["font-200",m({fontWeight:"200"})],["font-light",m({fontWeight:"300"})],["font-300",m({fontWeight:"300"})],["font-normal",m({fontWeight:"normal"})],["font-400",m({fontWeight:"400"})],["font-medium",m({fontWeight:"500"})],["font-500",m({fontWeight:"500"})],["font-semibold",m({fontWeight:"600"})],["font-600",m({fontWeight:"600"})],["font-bold",m({fontWeight:"bold"})],["font-700",m({fontWeight:"700"})],["font-extrabold",m({fontWeight:"800"})],["font-800",m({fontWeight:"800"})],["font-black",m({fontWeight:"900"})],["font-900",m({fontWeight:"900"})],["include-font-padding",m({includeFontPadding:!0})],["remove-font-padding",m({includeFontPadding:!1})],["max-w-none",m({maxWidth:"99999%"})],["text-left",m({textAlign:"left"})],["text-center",m({textAlign:"center"})],["text-right",m({textAlign:"right"})],["text-justify",m({textAlign:"justify"})],["text-auto",m({textAlign:"auto"})],["underline",m({textDecorationLine:"underline"})],["line-through",m({textDecorationLine:"line-through"})],["no-underline",m({textDecorationLine:"none"})],["uppercase",m({textTransform:"uppercase"})],["lowercase",m({textTransform:"lowercase"})],["capitalize",m({textTransform:"capitalize"})],["normal-case",m({textTransform:"none"})],["w-auto",m({width:"auto"})],["h-auto",m({height:"auto"})],["shadow-sm",m({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowRadius:1,shadowOpacity:.025,elevation:1})],["shadow",m({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowRadius:1,shadowOpacity:.075,elevation:2})],["shadow-md",m({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowRadius:3,shadowOpacity:.125,elevation:3})],["shadow-lg",m({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowOpacity:.15,shadowRadius:8,elevation:8})],["shadow-xl",m({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowOpacity:.19,shadowRadius:20,elevation:12})],["shadow-2xl",m({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowOpacity:.25,shadowRadius:30,elevation:16})],["shadow-none",m({shadowOffset:{width:0,height:0},shadowColor:"#000",shadowRadius:0,shadowOpacity:0,elevation:0})]],fo=V0;function ur(e){return{kind:"dependent",complete(t){(!t.fontVariant||!Array.isArray(t.fontVariant))&&(t.fontVariant=[]),t.fontVariant.push(e)}}}var lr=class{constructor(t){this.ir=new Map(fo),this.styles=new Map,this.prefixes=new Map,this.ir=new Map([...fo,...t??[]])}getStyle(t){return this.styles.get(t)}setStyle(t,n){this.styles.set(t,n)}getIr(t){return this.ir.get(t)}setIr(t,n){this.ir.set(t,n)}getPrefixMatch(t){return this.prefixes.get(t)}setPrefixMatch(t,n){this.prefixes.set(t,n)}};c();c();function co(e,t,n={}){let r=t==null?void 0:t[e];if(!r)return Te("fontSize",e,n);if(typeof r=="string")return We("fontSize",r);let i={},[s,o]=r,a=Nu("fontSize",s);if(a&&(i=a),typeof o=="string")return m(Jr("lineHeight",Mu(o,i),i));let{lineHeight:u,letterSpacing:l}=o;return u&&Jr("lineHeight",Mu(u,i),i),l&&Jr("letterSpacing",l,i),m(i)}function Mu(e,t){let n=ne(e);if(n){let[r,i]=n;if((i===U.none||i===U.em)&&typeof t.fontSize=="number")return t.fontSize*r}return e}c();function po(e,t){var n;let r=(n=t==null?void 0:t[e])!==null&&n!==void 0?n:e.startsWith("[")?e.slice(1,-1):e,i=ne(r);if(!i)return null;let[s,o]=i;if(o===U.none)return{kind:"dependent",complete(u){if(typeof u.fontSize!="number")return"relative line-height utilities require that font-size be set";u.lineHeight=u.fontSize*s}};let a=Ye(s,o);return a!==null?m({lineHeight:a}):null}c();function ho(e,t,n,r,i){let s="";if(r[0]==="[")s=r.slice(1,-1);else{let l=i==null?void 0:i[r];if(l)s=l;else{let f=rt(r);return f&&typeof f=="number"?Wu(f,U.px,t,e):null}}if(s==="auto")return $u(t,e,"auto");let o=ne(s);if(!o)return null;let[a,u]=o;return n&&(a=-a),Wu(a,u,t,e)}function Wu(e,t,n,r){let i=Ye(e,t);return i===null?null:$u(n,r,i)}function $u(e,t,n){switch(e){case"All":return{kind:"complete",style:{[`${t}Top`]:n,[`${t}Right`]:n,[`${t}Bottom`]:n,[`${t}Left`]:n}};case"Bottom":case"Top":case"Left":case"Right":return{kind:"complete",style:{[`${t}${e}`]:n}};case"Vertical":return{kind:"complete",style:{[`${t}Top`]:n,[`${t}Bottom`]:n}};case"Horizontal":return{kind:"complete",style:{[`${t}Left`]:n,[`${t}Right`]:n}};default:return null}}c();function mo(e){if(!e)return{};let t=Object.entries(e).reduce((i,[s,o])=>{let a=[0,1/0,0],u=typeof o=="string"?{min:o}:o,l=u.min?ao(u.min):0;l===null?me(`invalid screen config value: ${s}->min: ${u.min}`):a[0]=l;let f=u.max?ao(u.max):1/0;return f===null?me(`invalid screen config value: ${s}->max: ${u.max}`):a[1]=f,i[s]=a,i},{}),n=Object.values(t);n.sort((i,s)=>{let[o,a]=i,[u,l]=s;return a===1/0||l===1/0?o-u:a-l});let r=0;return n.forEach(i=>i[2]=r++),t}c();function go(e,t){let n=t==null?void 0:t[e];if(!n)return null;if(typeof n=="string")return m({fontFamily:n});let r=n[0];return r?m({fontFamily:r}):null}c();function nt(e,t,n){if(!n)return null;let r;t.includes("/")&&([t="",r]=t.split("/",2));let i="";if(t.startsWith("[#")||t.startsWith("[rgb")?i=t.slice(1,-1):i=Uu(t,n),!i)return null;if(r){let s=Number(r);if(!Number.isNaN(s))return i=qu(i,s/100),m({[Zr[e].color]:i})}return{kind:"dependent",complete(s){let o=Zr[e].opacity,a=s[o];typeof a=="number"&&(i=qu(i,a)),s[Zr[e].color]=i}}}function fr(e,t){let n=parseInt(t,10);if(Number.isNaN(n))return null;let r=n/100,i={[Zr[e].opacity]:r};return{kind:"complete",style:i}}function qu(e,t){return e.startsWith("#")?e=H0(e):e.startsWith("rgb(")&&(e=e.replace(/^rgb\(/,"rgba(").replace(/\)$/,", 1)")),e.replace(/, ?\d*\.?(\d+)\)$/,`, ${t})`)}function Bu(e){for(let t in e)t.startsWith("__opacity_")&&delete e[t]}var Zr={bg:{opacity:"__opacity_bg",color:"backgroundColor"},text:{opacity:"__opacity_text",color:"color"},border:{opacity:"__opacity_border",color:"borderColor"},borderTop:{opacity:"__opacity_border",color:"borderTopColor"},borderBottom:{opacity:"__opacity_border",color:"borderBottomColor"},borderLeft:{opacity:"__opacity_border",color:"borderLeftColor"},borderRight:{opacity:"__opacity_border",color:"borderRightColor"},shadow:{opacity:"__opacity_shadow",color:"shadowColor"},tint:{opacity:"__opacity_tint",color:"tintColor"}};function H0(e){let t=e;e=e.replace(Y0,(o,a,u,l)=>a+a+u+u+l+l);let n=X0.exec(e);if(!n)return me(`invalid config hex color value: ${t}`),"rgba(0, 0, 0, 1)";let r=parseInt(n[1],16),i=parseInt(n[2],16),s=parseInt(n[3],16);return`rgba(${r}, ${i}, ${s}, 1)`}function Uu(e,t){let n=t[e];if(io(n))return n;if(oo(n)&&io(n.DEFAULT))return n.DEFAULT;let[r="",...i]=e.split("-");for(;r!==e;){let s=t[r];if(oo(s))return Uu(i.join("-"),s);if(i.length===0)return"";r=`${r}-${i.shift()}`}return""}var Y0=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,X0=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;c();function Gu(e,t){let[n,r]=lo(e);if(n.match(/^(-?(\d)+)?$/))return Q0(n,r,t==null?void 0:t.borderWidth);if(n=n.replace(/^-/,""),["dashed","solid","dotted"].includes(n))return m({borderStyle:n});let s="border";switch(r){case"Bottom":s="borderBottom";break;case"Top":s="borderTop";break;case"Left":s="borderLeft";break;case"Right":s="borderRight";break}let o=nt(s,n,t==null?void 0:t.borderColor);if(o)return o;let a=`border${r==="All"?"":r}Width`;n=n.replace(/^-/,"");let u=n.slice(1,-1),l=Te(a,u);return typeof(l==null?void 0:l.style[a])!="number"?null:l}function Q0(e,t,n){if(!n)return null;e=e.replace(/^-/,"");let i=n[e===""?"DEFAULT":e];if(i===void 0)return null;let s=`border${t==="All"?"":t}Width`;return We(s,i)}function ju(e,t){if(!t)return null;let[n,r]=lo(e);n=n.replace(/^-/,""),n===""&&(n="DEFAULT");let i=`border${r==="All"?"":r}Radius`,s=t[n];if(s)return zu(We(i,s));let o=Te(i,n);return typeof(o==null?void 0:o.style[i])!="number"?null:zu(o)}function zu(e){if((e==null?void 0:e.kind)!=="complete")return e;let t=e.style.borderTopRadius;t!==void 0&&(e.style.borderTopLeftRadius=t,e.style.borderTopRightRadius=t,delete e.style.borderTopRadius);let n=e.style.borderBottomRadius;n!==void 0&&(e.style.borderBottomLeftRadius=n,e.style.borderBottomRightRadius=n,delete e.style.borderBottomRadius);let r=e.style.borderLeftRadius;r!==void 0&&(e.style.borderBottomLeftRadius=r,e.style.borderTopLeftRadius=r,delete e.style.borderLeftRadius);let i=e.style.borderRightRadius;return i!==void 0&&(e.style.borderBottomRightRadius=i,e.style.borderTopRightRadius=i,delete e.style.borderRightRadius),e}c();function mt(e,t,n,r){let i=null;e==="inset"&&(t=t.replace(/^(x|y)-/,(a,u)=>(i=u==="x"?"x":"y","")));let s=r==null?void 0:r[t];if(s){let a=Ie(s,{isNegative:n});if(a!==null)return Vu(e,i,a)}let o=rt(t,{isNegative:n});return o!==null?Vu(e,i,o):null}function Vu(e,t,n){if(e!=="inset")return m({[e]:n});switch(t){case null:return m({top:n,left:n,right:n,bottom:n});case"y":return m({top:n,bottom:n});case"x":return m({left:n,right:n})}}c();function cr(e,t,n){var r;t=t.replace(/^-/,"");let i=t===""?"DEFAULT":t,s=Number((r=n==null?void 0:n[i])!==null&&r!==void 0?r:t);return Number.isNaN(s)?null:m({[`flex${e}`]:s})}function Hu(e,t){var n,r;if(e=(t==null?void 0:t[e])||e,["min-content","revert","unset"].includes(e))return null;if(e.match(/^\d+(\.\d+)?$/))return m({flexGrow:Number(e),flexBasis:"0%"});let i=e.match(/^(\d+)\s+(\d+)$/);if(i)return m({flexGrow:Number(i[1]),flexShrink:Number(i[2])});if(i=e.match(/^(\d+)\s+([^ ]+)$/),i){let s=Ie((n=i[2])!==null&&n!==void 0?n:"");return s?m({flexGrow:Number(i[1]),flexBasis:s}):null}if(i=e.match(/^(\d+)\s+(\d+)\s+(.+)$/),i){let s=Ie((r=i[3])!==null&&r!==void 0?r:"");return s?m({flexGrow:Number(i[1]),flexShrink:Number(i[2]),flexBasis:s}):null}return null}c();function vo(e,t,n={},r){let i=r==null?void 0:r[t];return i!==void 0?We(e,i,n):Te(e,t,n)}function dr(e,t,n={},r){let i=Ie(r==null?void 0:r[t],n);return i?m({[e]:i}):(t==="screen"&&(t=e.includes("Width")?"100vw":"100vh"),Te(e,t,n))}c();function Yu(e,t,n){let r=n==null?void 0:n[e];if(r){let i=ne(r,{isNegative:t});if(!i)return null;let[s,o]=i;if(o===U.em)return K0(s);if(o===U.percent)return me("percentage-based letter-spacing configuration currently unsupported, switch to `em`s, or open an issue if you'd like to see support added."),null;let a=Ye(s,o,{isNegative:t});return a!==null?m({letterSpacing:a}):null}return Te("letterSpacing",e,{isNegative:t})}function K0(e){return{kind:"dependent",complete(t){let n=t.fontSize;if(typeof n!="number"||Number.isNaN(n))return"tracking-X relative letter spacing classes require font-size to be set";t.letterSpacing=Math.round((e*n+Number.EPSILON)*100)/100}}}c();function Xu(e,t){let n=t==null?void 0:t[e];if(n){let i=ne(String(n));if(i)return m({opacity:i[0]})}let r=ne(e);return r?m({opacity:r[0]/100}):null}c();function Qu(e){let t=parseInt(e,10);return Number.isNaN(t)?null:{kind:"complete",style:{shadowOpacity:t/100}}}function Ku(e){if(e.includes("/")){let[n="",r=""]=e.split("/",2),i=bo(n),s=bo(r);return i===null||s===null?null:{kind:"complete",style:{shadowOffset:{width:i,height:s}}}}let t=bo(e);return t===null?null:{kind:"complete",style:{shadowOffset:{width:t,height:t}}}}function bo(e){let t=rt(e);return typeof t=="number"?t:null}var gt=class{constructor(t,n={},r,i,s){var o,a,u,l,f,d;this.config=n,this.cache=r,this.position=0,this.isNull=!1,this.isNegative=!1,this.context={},this.context.device=i;let g=t.trim().split(":"),h=[];g.length===1?this.string=t:(this.string=(o=g.pop())!==null&&o!==void 0?o:"",h=g),this.char=this.string[0];let p=mo((a=this.config.theme)===null||a===void 0?void 0:a.screens);for(let v of h)if(p[v]){let w=(u=p[v])===null||u===void 0?void 0:u[2];w!==void 0&&(this.order=((l=this.order)!==null&&l!==void 0?l:0)+w);let b=(f=i.windowDimensions)===null||f===void 0?void 0:f.width;if(b){let[y,_]=(d=p[v])!==null&&d!==void 0?d:[0,0];(b<=y||b>_)&&(this.isNull=!0)}else this.isNull=!0}else Cu(v)?this.isNull=v!==s:Du(v)?i.windowDimensions?(i.windowDimensions.width>i.windowDimensions.height?"landscape":"portrait")!==v?this.isNull=!0:this.incrementOrder():this.isNull=!0:v==="retina"?i.pixelDensity===2?this.incrementOrder():this.isNull=!0:v==="dark"?i.colorScheme!=="dark"?this.isNull=!0:this.incrementOrder():this.handlePossibleArbitraryBreakpointPrefix(v)||(this.isNull=!0)}parse(){if(this.isNull)return{kind:"null"};let t=this.cache.getIr(this.rest);if(t)return t;this.parseIsNegative();let n=this.parseUtility();return n?this.order!==void 0?{kind:"ordered",order:this.order,styleIr:n}:n:{kind:"null"}}parseUtility(){var t,n,r,i,s;let o=this.config.theme,a=null;switch(this.char){case"m":case"p":{let u=this.peekSlice(1,3).match(/^(t|b|r|l|x|y)?-/);if(u){let l=this.char==="m"?"margin":"padding";this.advance(((n=(t=u[0])===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+1);let f=uo(u[1]),d=ho(l,f,this.isNegative,this.rest,(r=this.config.theme)===null||r===void 0?void 0:r[l]);if(d)return d}}}if(this.consumePeeked("h-")&&(a=vo("height",this.rest,this.context,o==null?void 0:o.height),a)||this.consumePeeked("w-")&&(a=vo("width",this.rest,this.context,o==null?void 0:o.width),a)||this.consumePeeked("min-w-")&&(a=dr("minWidth",this.rest,this.context,o==null?void 0:o.minWidth),a)||this.consumePeeked("min-h-")&&(a=dr("minHeight",this.rest,this.context,o==null?void 0:o.minHeight),a)||this.consumePeeked("max-w-")&&(a=dr("maxWidth",this.rest,this.context,o==null?void 0:o.maxWidth),a)||this.consumePeeked("max-h-")&&(a=dr("maxHeight",this.rest,this.context,o==null?void 0:o.maxHeight),a)||this.consumePeeked("leading-")&&(a=po(this.rest,o==null?void 0:o.lineHeight),a)||this.consumePeeked("text-")&&(a=co(this.rest,o==null?void 0:o.fontSize,this.context),a||(a=nt("text",this.rest,o==null?void 0:o.textColor),a)||this.consumePeeked("opacity-")&&(a=fr("text",this.rest),a))||this.consumePeeked("font-")&&(a=go(this.rest,o==null?void 0:o.fontFamily),a)||this.consumePeeked("aspect-")&&(this.consumePeeked("ratio-")&&me("`aspect-ratio-{ratio}` is deprecated, use `aspect-{ratio}` instead"),a=We("aspectRatio",this.rest,{fractions:!0}),a)||this.consumePeeked("tint-")&&(a=nt("tint",this.rest,o==null?void 0:o.colors),a)||this.consumePeeked("bg-")&&(a=nt("bg",this.rest,o==null?void 0:o.backgroundColor),a||this.consumePeeked("opacity-")&&(a=fr("bg",this.rest),a))||this.consumePeeked("border")&&(a=Gu(this.rest,o),a||this.consumePeeked("-opacity-")&&(a=fr("border",this.rest),a))||this.consumePeeked("rounded")&&(a=ju(this.rest,o==null?void 0:o.borderRadius),a)||this.consumePeeked("bottom-")&&(a=mt("bottom",this.rest,this.isNegative,o==null?void 0:o.inset),a)||this.consumePeeked("top-")&&(a=mt("top",this.rest,this.isNegative,o==null?void 0:o.inset),a)||this.consumePeeked("left-")&&(a=mt("left",this.rest,this.isNegative,o==null?void 0:o.inset),a)||this.consumePeeked("right-")&&(a=mt("right",this.rest,this.isNegative,o==null?void 0:o.inset),a)||this.consumePeeked("inset-")&&(a=mt("inset",this.rest,this.isNegative,o==null?void 0:o.inset),a)||this.consumePeeked("flex-")&&(this.consumePeeked("grow")?a=cr("Grow",this.rest,o==null?void 0:o.flexGrow):this.consumePeeked("shrink")?a=cr("Shrink",this.rest,o==null?void 0:o.flexShrink):a=Hu(this.rest,o==null?void 0:o.flex),a)||this.consumePeeked("grow")&&(a=cr("Grow",this.rest,o==null?void 0:o.flexGrow),a)||this.consumePeeked("shrink")&&(a=cr("Shrink",this.rest,o==null?void 0:o.flexShrink),a)||this.consumePeeked("shadow-color-opacity-")&&(a=fr("shadow",this.rest),a)||this.consumePeeked("shadow-opacity-")&&(a=Qu(this.rest),a)||this.consumePeeked("shadow-offset-")&&(a=Ku(this.rest),a)||this.consumePeeked("shadow-radius-")&&(a=Te("shadowRadius",this.rest),a)||this.consumePeeked("shadow-")&&(a=nt("shadow",this.rest,o==null?void 0:o.colors),a))return a;if(this.consumePeeked("elevation-")){let u=parseInt(this.rest,10);if(!Number.isNaN(u))return m({elevation:u})}if(this.consumePeeked("opacity-")&&(a=Xu(this.rest,o==null?void 0:o.opacity),a)||this.consumePeeked("tracking-")&&(a=Yu(this.rest,this.isNegative,o==null?void 0:o.letterSpacing),a))return a;if(this.consumePeeked("z-")){let u=Number((s=(i=o==null?void 0:o.zIndex)===null||i===void 0?void 0:i[this.rest])!==null&&s!==void 0?s:this.rest);if(!Number.isNaN(u))return m({zIndex:u})}return me(`\`${this.rest}\` unknown or invalid utility`),null}handlePossibleArbitraryBreakpointPrefix(t){var n;if(t[0]!=="m")return!1;let r=t.match(/^(min|max)-(w|h)-\[([^\]]+)\]$/);if(!r)return!1;if(!(!((n=this.context.device)===null||n===void 0)&&n.windowDimensions))return this.isNull=!0,!0;let i=this.context.device.windowDimensions,[,s="",o="",a=""]=r,u=o==="w"?i.width:i.height,l=ne(a,this.context);if(l===null)return this.isNull=!0,!0;let[f,d]=l;return d!=="px"&&(this.isNull=!0),(s==="min"?u>=f:u<=f)?this.incrementOrder():this.isNull=!0,!0}advance(t=1){this.position+=t,this.char=this.string[this.position]}get rest(){return this.peekSlice(0,this.string.length)}peekSlice(t,n){return this.string.slice(this.position+t,this.position+n)}consumePeeked(t){return this.peekSlice(0,t.length)===t?(this.advance(t.length),!0):!1}parseIsNegative(){this.char==="-"&&(this.advance(),this.isNegative=!0,this.context.isNegative=!0)}incrementOrder(){var t;this.order=((t=this.order)!==null&&t!==void 0?t:0)+1}};c();function Ju(e){let t=[],n=null;return e.forEach(r=>{if(typeof r=="string")t=[...t,...yo(r)];else if(Array.isArray(r))t=[...t,...r.flatMap(yo)];else if(typeof r=="object"&&r!==null)for(let[i,s]of Object.entries(r))typeof s=="boolean"?t=[...t,...s?yo(i):[]]:n?n[i]=s:n={[i]:s}}),[t.filter(Boolean).filter(J0),n]}function yo(e){return e.trim().split(/\s+/)}function J0(e,t,n){return n.indexOf(e)===t}c();function Zu(e){var t;return(t=e==null?void 0:e.reduce((n,r)=>({...n,...Z0(r.handler)}),{}))!==null&&t!==void 0?t:{}}function Z0(e){let t={};return e({addUtilities:n=>{t=n},...em}),t}function Re(e){throw new Error(`tailwindcss plugin function argument object prop "${e}" not implemented`)}var em={addComponents:Re,addBase:Re,addVariant:Re,e:Re,prefix:Re,theme:Re,variants:Re,config:Re,corePlugins:Re,matchUtilities:Re,postcss:null};function tl(e,t){let n=(0,el.default)(tm(e)),r={},i=Zu(n.plugins),s={},o=Object.entries(i).map(([p,v])=>typeof v=="string"?(s[p]=v,[p,{kind:"null"}]):[p,m(v)]).filter(([,p])=>p.kind!=="null");function a(){return[r.windowDimensions?`w${r.windowDimensions.width}`:!1,r.windowDimensions?`h${r.windowDimensions.height}`:!1,r.fontScale?`fs${r.fontScale}`:!1,r.colorScheme==="dark"?"dark":!1,r.pixelDensity===2?"retina":!1].filter(Boolean).join("--")||"default"}let u=a(),l={};function f(){let p=l[u];if(p)return p;let v=new lr(o);return l[u]=v,v}function d(...p){let v=f(),w={},b=[],y=[],[_,O]=Ju(p),k=_.join(" "),C=v.getStyle(k);if(C)return{...C,...O||{}};for(let D of _){let L=v.getIr(D);if(!L&&D in s){let G=d(s[D]);v.setIr(D,m(G)),w={...w,...G};continue}switch(L=new gt(D,n,v,r,t).parse(),L.kind){case"complete":w={...w,...L.style},v.setIr(D,L);break;case"dependent":b.push(L);break;case"ordered":y.push(L);break;case"null":v.setIr(D,L);break}}if(y.length>0){y.sort((D,L)=>D.order-L.order);for(let D of y)switch(D.styleIr.kind){case"complete":w={...w,...D.styleIr.style};break;case"dependent":b.push(D.styleIr);break}}if(b.length>0){for(let D of b){let L=D.complete(w);L&&me(L)}Bu(w)}return k!==""&&v.setStyle(k,w),O&&(w={...w,...O}),w}function g(p){let v=d(p.split(/\s+/g).map(w=>w.replace(/^(bg|text|border)-/,"")).map(w=>`bg-${w}`).join(" "));return typeof v.backgroundColor=="string"?v.backgroundColor:void 0}let h=(p,...v)=>{let w="";return p.forEach((b,y)=>{var _;w+=b+((_=v[y])!==null&&_!==void 0?_:"")}),d(w)};return h.style=d,h.color=g,h.prefixMatch=(...p)=>{let v=p.sort().join(":"),w=f(),b=w.getPrefixMatch(v);if(b!==void 0)return b;let O=new gt(`${v}:flex`,n,w,r,t).parse().kind!=="null";return w.setPrefixMatch(v,O),O},h.setWindowDimensions=p=>{r.windowDimensions=p,u=a()},h.setFontScale=p=>{r.fontScale=p,u=a()},h.setPixelDensity=p=>{r.pixelDensity=p,u=a()},h.setColorScheme=p=>{r.colorScheme=p,u=a()},h}function tm(e){return{...e,content:["_no_warnings_please"]}}var nm={handler:({addUtilities:e})=>{e({"shadow-sm":{boxShadow:"0 1px 2px 0 rgb(0 0 0 / 0.05)"},shadow:{boxShadow:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"},"shadow-md":{boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"},"shadow-lg":{boxShadow:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"},"shadow-xl":{boxShadow:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"},"shadow-2xl":{boxShadow:"0 25px 50px -12px rgb(0 0 0 / 0.25)"},"shadow-inner":{boxShadow:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},"shadow-none":{boxShadow:"0 0 #0000"}})}};function im(e){return tl({...e,plugins:[...(e==null?void 0:e.plugins)??[],nm]},"web")}var en;function xo({width:e,height:t,config:n}){return en||(en=im(n)),en.setWindowDimensions({width:+e,height:+t}),en}var wo=new WeakMap;async function _o(e,t){let n=await Fe();if(!n||!n.Node)throw new Error("Satori is not initialized: expect `yoga` to be loaded, got "+n);t.fonts=t.fonts||[];let r;wo.has(t.fonts)?r=wo.get(t.fonts):wo.set(t.fonts,r=new Rt(t.fonts));let i="width"in t?t.width:void 0,s="height"in t?t.height:void 0,o=n.Node.create();i&&o.setWidth(i),s&&o.setHeight(s),o.setFlexDirection(n.FLEX_DIRECTION_ROW),o.setFlexWrap(n.WRAP_WRAP),o.setAlignContent(n.ALIGN_AUTO),o.setAlignItems(n.ALIGN_FLEX_START),o.setJustifyContent(n.JUSTIFY_FLEX_START),o.setOverflow(n.OVERFLOW_HIDDEN);let a={...t.graphemeImages},u=new Set,l=It(e,{id:"id",parentStyle:{},inheritedStyle:{fontSize:16,fontWeight:"normal",fontFamily:"serif",fontStyle:"normal",lineHeight:1.2,color:"black",opacity:1,whiteSpace:"normal",_viewportWidth:i,_viewportHeight:s},parent:o,font:r,embedFont:t.embedFont,debug:t.debug,graphemeImages:a,canLoadAdditionalAssets:!!t.loadAdditionalAsset,getTwStyles:(p,v)=>{let b={...xo({width:i,height:s,config:t.tailwindConfig})([p])};return typeof b.lineHeight=="number"&&(b.lineHeight=b.lineHeight/(+b.fontSize||v.fontSize||16)),b.shadowColor&&b.boxShadow&&(b.boxShadow=b.boxShadow.replace(/rgba?\([^)]+\)/,b.shadowColor)),b}}),f=(await l.next()).value;if(t.loadAdditionalAsset&&f.length){let p=om(f),v=[],w={};await Promise.all(Object.entries(p).flatMap(([b,y])=>y.map(_=>{let O=`${b}_${_}`;return u.has(O)?null:(u.add(O),t.loadAdditionalAsset(b,_).then(k=>{typeof k=="string"?w[_]=k:k&&v.push(k)}))}))),r.addFonts(v),Object.assign(a,w)}await l.next(),o.calculateLayout(i,s,n.DIRECTION_LTR);let d=(await l.next([0,0])).value,g=o.getComputedWidth(),h=o.getComputedHeight();return o.freeRecursive(),Ln({width:g,height:h,content:d})}function om(e){let t={},n={};for(let{word:r,locale:i}of e){let s=ys(r,i);n[s]=n[s]||"",n[s]+=r}return Object.keys(n).forEach(r=>{t[r]=t[r]||[],r==="emoji"?t[r].push(...rl(ce(n[r],"grapheme"))):(t[r][0]=t[r][0]||"",t[r][0]+=rl(ce(n[r],"grapheme",r==="unknown"?void 0:r)).join(""))}),t}function rl(e){return Array.from(new Set(e))}0&&(module.exports={init});
|
|
7
7
|
//# sourceMappingURL=index.cjs.map
|