Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

satori

Package Overview
Dependencies
Maintainers
1
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

satori - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

2

dist/esm/index.js

@@ -1,2 +0,2 @@

var H=Object.defineProperty,Lt=Object.defineProperties,It=Object.getOwnPropertyDescriptor,At=Object.getOwnPropertyDescriptors,Ft=Object.getOwnPropertyNames,lt=Object.getOwnPropertySymbols;var mt=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable;var ct=(t,r,e)=>r in t?H(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e,B=(t,r)=>{for(var e in r||(r={}))mt.call(r,e)&&ct(t,e,r[e]);if(lt)for(var e of lt(r))Ct.call(r,e)&&ct(t,e,r[e]);return t},pt=(t,r)=>Lt(t,At(r)),Nt=t=>H(t,"__esModule",{value:!0});var dt=(t,r)=>()=>(t&&(r=t(t=0)),r);var Ot=(t,r)=>{for(var e in r)H(t,e,{get:r[e],enumerable:!0})},kt=(t,r,e,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of Ft(r))!mt.call(t,a)&&(e||a!=="default")&&H(t,a,{get:()=>r[a],enumerable:!(i=It(r,a))||i.enumerable});return t};var vt=(t=>(r,e)=>t&&t.get(r)||(e=kt(Nt({}),r,1),t&&t.set(r,e),e))(typeof WeakMap!="undefined"?new WeakMap:0);var m=dt(()=>{});var gt={};Ot(gt,{default:()=>Wt});import*as Gt from"yoga-layout-prebuilt";var Wt,ht=dt(()=>{m();Wt=Gt});m();m();m();var V;{let t=(ht(),vt(gt));t.default?V=t.default:V=t}function wt(t){V=t}function C(){return V}m();m();function q(t){let r=typeof t;return!(r==="number"||r==="bigint"||r==="string"||r==="boolean")}function bt(t){return/^class\s/.test(Function.prototype.toString.call(t))}function D(t,r){return[t[0]*r[0]+t[2]*r[1],t[1]*r[0]+t[3]*r[1],t[0]*r[2]+t[2]*r[3],t[1]*r[2]+t[3]*r[3],t[0]*r[4]+t[2]*r[5]+t[4],t[1]*r[4]+t[3]*r[5]+t[5]]}function A(t,r,e){let i=r[t];return typeof i=="undefined"?e:i}m();m();var yt={p:{display:"block",marginTop:"1em",marginBottom:"1em"},div:{display:"block"},blockquote:{display:"block",marginTop:"1em",marginBottom:"1em",marginLeft:40,marginRight:40},center:{display:"block",textAlign:"center"},hr:{display:"block",marginTop:"0.5em",marginBottom:"0.5em",marginLeft:"auto",marginRight:"auto",borderWidth:1,borderStyle:"inset"},h1:{display:"block",fontSize:"2em",marginTop:"0.67em",marginBottom:"0.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h2:{display:"block",fontSize:"1.5em",marginTop:"0.83em",marginBottom:"0.83em",marginLeft:0,marginRight:0,fontWeight:"bold"},h3:{display:"block",fontSize:"1.17em",marginTop:"1em",marginBottom:"1em",marginLeft:0,marginRight:0,fontWeight:"bold"},h4:{display:"block",marginTop:"1.33em",marginBottom:"1.33em",marginLeft:0,marginRight:0,fontWeight:"bold"},h5:{display:"block",fontSize:"0.83em",marginTop:"1.67em",marginBottom:"1.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h6:{display:"block",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:"block",fontFamily:"monospace",whiteSpace:"pre",marginTop:"1em",marginBottom:"1em"},mark:{backgroundColor:"yellow",color:"black"},big:{fontSize:"larger"},small:{fontSize:"smaller"},s:{textDecoration:"line-through"}};m();var Pt=new Set(["color","font","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","textAlign","textTransform","whiteSpace","letterSpacing","transform","wordBreak","opacity"]);function Z(t){let r={};for(let e in t)Pt.has(e)&&(r[e]=t[e]);return r}m();import{getPropertyName as Et,getStylesForProperty as Bt}from"css-to-react-native";import _t from"parse-css-dimension";import{parseElementStyle as Dt}from"css-background-parser";var Mt=new Set(["flex","flexGrow","flexShrink","flexBasis","fontWeight","lineHeight","opacity","scale","scaleX","scaleY"]),xt=[1,0,0,1,0,0];function Yt(t,r){return typeof r=="number"?Mt.has(t)?String(r):r+"px":r}function $t(t,r){if(typeof t=="number")return t;try{let e=new _t(t);if(e.type==="length")switch(e.unit){case"em":return e.value*r;case"rem":return e.value*16;default:return e.value}else if(e.type==="angle")switch(e.unit){case"deg":return e.value;case"rad":return e.value*180/Math.PI;default:return e.value}}catch{}}function J(t,r){let e=[];for(let o in t){let n=Et(o);e.push([n,Yt(n,t[o])])}let i=e.reduce((o,n)=>{let s=Et(n[0]),l=n[1];return Object.assign(o,Bt(s,l,!0))},{});if(i.backgroundImage){let{backgrounds:o}=Dt(i);i.backgroundImage=o}let a=i.fontSize||r.fontSize;if(typeof a=="string")try{let o=new _t(a);switch(o.unit){case"em":a=o.value*r.fontSize;break;case"rem":a=o.value*16;break}}catch{a=16}i.fontSize=a;for(let o in i){let n=i[o];if(typeof n=="string"){let s=$t(n,a);typeof s!="undefined"&&(i[o]=s),n=i[o]}if(o==="opacity"&&(n=i[o]=n*r.opacity),o==="transform"){let s=[...xt],l=n;for(let f of l){let d=Object.keys(f)[0],g=f[d],p=typeof g=="string"?$t(g,a):g,u=[...xt];switch(d){case"translateX":u[4]=p;break;case"translateY":u[5]=p;break;case"scaleX":u[0]=p;break;case"scaleY":u[3]=p;break;case"rotate":let b=p*Math.PI/180,R=Math.cos(b),T=Math.sin(b);u[0]=R,u[1]=T,u[2]=-T,u[3]=R;break;case"skewX":u[2]=Math.tan(p*Math.PI/180);break;case"skewY":u[1]=Math.tan(p*Math.PI/180);break}s=D(u,s)}i.transform=s}}return i}function Q(t,r,e,i,a){let o=C(),n=B(B(B({},e),J(yt[r],e)),J(i,e));if(r==="img"){let s=parseInt(a.width),f=parseInt(a.height)/s;n.width||(n.width=s),n.height||(n.height=f*n.width)}return t.setDisplay(A(n.display,{flex:o.DISPLAY_FLEX,none:o.DISPLAY_NONE},o.DISPLAY_FLEX)),t.setAlignContent(A(n.alignContent,{stretch:o.ALIGN_STRETCH,center:o.ALIGN_CENTER,"flex-start":o.ALIGN_FLEX_START,"flex-end":o.ALIGN_FLEX_END,"space-between":o.ALIGN_SPACE_BETWEEN,"space-around":o.ALIGN_SPACE_AROUND,baseline:o.ALIGN_BASELINE,normal:o.ALIGN_AUTO},o.ALIGN_AUTO)),t.setAlignItems(A(n.alignItems,{stretch:o.ALIGN_STRETCH,center:o.ALIGN_CENTER,"flex-start":o.ALIGN_FLEX_START,"flex-end":o.ALIGN_FLEX_END,baseline:o.ALIGN_BASELINE,normal:o.ALIGN_AUTO},o.ALIGN_FLEX_START)),t.setAlignSelf(A(n.alignSelf,{stretch:o.ALIGN_STRETCH,center:o.ALIGN_CENTER,"flex-start":o.ALIGN_FLEX_START,"flex-end":o.ALIGN_FLEX_END,baseline:o.ALIGN_BASELINE,normal:o.ALIGN_AUTO},o.ALIGN_AUTO)),t.setJustifyContent(A(n.justifyContent,{center:o.JUSTIFY_CENTER,"flex-start":o.JUSTIFY_FLEX_START,"flex-end":o.JUSTIFY_FLEX_END,"space-between":o.JUSTIFY_SPACE_BETWEEN,"space-around":o.JUSTIFY_SPACE_AROUND},o.JUSTIFY_FLEX_START)),t.setFlexDirection(A(n.flexDirection,{row:o.FLEX_DIRECTION_ROW,column:o.FLEX_DIRECTION_COLUMN,"row-reverse":o.FLEX_DIRECTION_ROW_REVERSE,"column-reverse":o.FLEX_DIRECTION_COLUMN_REVERSE},o.FLEX_DIRECTION_ROW)),t.setFlexWrap(A(n.flexWrap,{wrap:o.WRAP_WRAP,nowrap:o.WRAP_NO_WRAP,"wrap-reverse":o.WRAP_WRAP_REVERSE},o.WRAP_WRAP)),typeof n.flexBasis!="undefined"&&t.setFlexBasis(n.flexBasis),t.setFlexGrow(typeof n.flexGrow=="undefined"?0:n.flexGrow),t.setFlexShrink(typeof n.flexShrink=="undefined"?1:n.flexShrink),typeof n.maxHeight!="undefined"&&t.setMaxHeight(n.maxHeight),typeof n.maxWidth!="undefined"&&t.setMaxWidth(n.maxWidth),typeof n.minHeight!="undefined"&&t.setMinHeight(n.minHeight),typeof n.minWidth!="undefined"&&t.setMinWidth(n.minWidth),t.setOverflow(A(n.overflow,{visible:o.OVERFLOW_VISIBLE,hidden:o.OVERFLOW_HIDDEN},o.OVERFLOW_VISIBLE)),t.setMargin(o.EDGE_TOP,n.marginTop||0),t.setMargin(o.EDGE_BOTTOM,n.marginBottom||0),t.setMargin(o.EDGE_LEFT,n.marginLeft||0),t.setMargin(o.EDGE_RIGHT,n.marginRight||0),t.setBorder(o.EDGE_TOP,n.borderWidth||0),t.setBorder(o.EDGE_BOTTOM,n.borderWidth||0),t.setBorder(o.EDGE_LEFT,n.borderWidth||0),t.setBorder(o.EDGE_RIGHT,n.borderWidth||0),t.setPadding(o.EDGE_TOP,n.paddingTop||0),t.setPadding(o.EDGE_BOTTOM,n.paddingBottom||0),t.setPadding(o.EDGE_LEFT,n.paddingLeft||0),t.setPadding(o.EDGE_RIGHT,n.paddingRight||0),t.setPositionType(A(n.position,{absolute:o.POSITION_TYPE_ABSOLUTE,relative:o.POSITION_TYPE_RELATIVE},o.POSITION_TYPE_RELATIVE)),typeof n.top!="undefined"&&t.setPosition(o.EDGE_TOP,n.top),typeof n.bottom!="undefined"&&t.setPosition(o.EDGE_BOTTOM,n.bottom),typeof n.left!="undefined"&&t.setPosition(o.EDGE_LEFT,n.left),typeof n.right!="undefined"&&t.setPosition(o.EDGE_RIGHT,n.right),typeof n.height!="undefined"?t.setHeight(n.height):t.setHeightAuto(),typeof n.width!="undefined"?t.setWidth(n.width):t.setWidthAuto(),[n,Z(n)]}m();import{LineBreaker as Xt}from"css-line-break";m();m();function M({left:t,top:r,width:e,height:i},a,o){let n;if(o)n=a;else{let s=t+e/2,l=r+i/2;n=D([1,0,0,1,s,l],D(a,[1,0,0,1,-s,-l])),a.__parent&&(n=D(a.__parent,n)),a.splice(0,6,...n)}return`matrix(${n.map(s=>s.toFixed(2)).join(",")})`}function tt({content:t,left:r,top:e,width:i,height:a,isInheritingTransform:o,path:n,debug:s},l){let f="",d=1,g="";return l.transform&&(f=M({left:r,top:e,width:i,height:a},l.transform,o)),l.opacity&&(d=+l.opacity),s&&(g=`<rect x="${r}" y="${e}" width="${i}" height="${n===null?.5:a}" fill="transparent" stroke="#575eff" stroke-width="1" ${f?`transform="${f}"`:""}></rect>`),n===null?`<text x="${r}" y="${e}" width="${i}" height="${a}" fill="${l.color}" font-weight="${l.fontWeight}" font-style="${l.fontStyle}" font-size="${l.fontSize}" font-family="${l.fontFamily}" ${l.letterSpacing?`letter-spacing="${l.letterSpacing}"`:""} ${f?`transform="${f}"`:""} ${d!==1?`opacity="${d}"`:""}>${t}</text>${g}`:`<path fill="${l.color}" ${f?`transform="${f}"`:""} ${d!==1?`opacity="${d}"`:""} d="${n}"></path>${g}`}function*et(t,r){let e=C(),{parentStyle:i,parent:a,font:o,id:n,isInheritingTransform:s,debug:l,embedFont:f}=r,d=Xt(t,{lineBreak:"strict",wordBreak:A(i.wordBreak,{normal:"normal","break-all":"break-all","break-word":"break-word","keep-all":"keep-all"},"normal")}),g=[];for(let _;!(_=d.next()).done;)g.push(_.value.slice());let p=[];a.setAlignItems(e.ALIGN_BASELINE),i.textAlign==="left"?a.setJustifyContent(e.JUSTIFY_FLEX_START):i.textAlign==="center"?a.setJustifyContent(e.JUSTIFY_CENTER):i.textAlign==="right"?a.setJustifyContent(e.JUSTIFY_FLEX_END):i.textAlign==="justify"&&a.setJustifyContent(e.JUSTIFY_SPACE_BETWEEN);let u=o.getFont(i);for(let _ of g){let S=e.Node.create();a.insertChild(S,a.getChildCount());let y=o.measure(u,_,i);S.setWidth(y.width),S.setHeight(y.ascent*1.2),S.setMargin(e.EDGE_BOTTOM,y.descent*1.2),p.push(S)}let[b,R]=yield,T="";for(let _=0;_<p.length;_++){let S=p[_],y=g[_];i.position==="absolute"&&S.calculateLayout();let{left:F,top:N,width:O,height:k}=S.getComputedLayout();F+=b,N+=R;let W=null;f?W=o.getSVG(u,y,pt(B({},i),{top:N,left:F,letterSpacing:i.letterSpacing})):N+=o.getAscent(u,i),T+=tt({content:y,id:n,left:F,top:N,width:O,height:k,isInheritingTransform:s,path:W,debug:l},i)}return T}m();m();m();var rt=rt||{};rt.parse=function(){var t={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/,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]+\.?))/},r="";function e(c){var h=new Error(r+": "+c);throw h.source=r,h}function i(){var c=a();return r.length>0&&e("Invalid input not EOF"),c}function a(){return y(o)}function o(){return n("linear-gradient",t.linearGradient,l)||n("repeating-linear-gradient",t.repeatingLinearGradient,l)||n("radial-gradient",t.radialGradient,g)||n("repeating-radial-gradient",t.repeatingRadialGradient,g)}function n(c,h,E){return s(h,function(G){var ut=E();return ut&&(v(t.comma)||e("Missing comma before color stops")),{type:c,orientation:ut,colorStops:y(F)}})}function s(c,h){var E=v(c);if(E){v(t.startCall)||e("Missing (");var G=h(E);return v(t.endCall)||e("Missing )"),G}}function l(){return f()||d()}function f(){return I("directional",t.sideOrCorner,1)}function d(){return I("angular",t.angleValue,1)}function g(){var c,h=p(),E;return h&&(c=[],c.push(h),E=r,v(t.comma)&&(h=p(),h?c.push(h):r=E)),c}function p(){var c=u()||b();if(c)c.at=T();else{var h=R();if(h){c=h;var E=T();E&&(c.at=E)}else{var G=_();G&&(c={type:"default-radial",at:G})}}return c}function u(){var c=I("shape",/^(circle)/i,0);return c&&(c.style=st()||R()),c}function b(){var c=I("shape",/^(ellipse)/i,0);return c&&(c.style=L()||R()),c}function R(){return I("extent-keyword",t.extentKeywords,1)}function T(){if(I("position",/^at/,0)){var c=_();return c||e("Missing positioning value"),c}}function _(){var c=S();if(c.x||c.y)return{type:"position",value:c}}function S(){return{x:L(),y:L()}}function y(c){var h=c(),E=[];if(h)for(E.push(h);v(t.comma);)h=c(),h?E.push(h):e("One extra comma");return E}function F(){var c=N();return c||e("Expected color definition"),c.length=L(),c}function N(){return k()||z()||W()||O()}function O(){return I("literal",t.literalColor,0)}function k(){return I("hex",t.hexColor,1)}function W(){return s(t.rgbColor,function(){return{type:"rgb",value:y(w)}})}function z(){return s(t.rgbaColor,function(){return{type:"rgba",value:y(w)}})}function w(){return v(t.number)[1]}function L(){return I("%",t.percentageValue,1)||P()||st()}function P(){return I("position-keyword",t.positionKeywords,1)}function st(){return I("px",t.pixelValue,1)||I("em",t.emValue,1)}function I(c,h,E){var G=v(h);if(G)return{type:c,value:G[E]}}function v(c){var h,E;return E=/^[\n\r\t\s]+/.exec(r),E&&ft(E[0].length),h=c.exec(r),h&&ft(h[0].length),h}function ft(c){r=r.substr(c)}return function(c){return r=c.toString(),i()}}();var St=rt;function Ut(t){return t.type==="literal"?t.value:t.type==="hex"?`#${t.value}`:t.type==="rgb"?`rgb(${t.value.join(",")})`:t.type==="rgba"?`rgba(${t.value.join(",")})`:"transparent"}function nt({id:t,width:r},{image:e}){if(e.startsWith("linear-gradient(")){let i=St.parse(e)[0],a,o,n,s;if(i.orientation.type==="directional")[a,o,n,s]={top:[0,1,0,0],bottom:[0,0,0,1],left:[1,0,0,0],right:[0,0,1,0]}[i.orientation.value];else if(i.orientation.type==="angular"){let u=+i.orientation.value/180*Math.PI-Math.PI/2,b=Math.cos(u),R=Math.sin(u);a=0,o=0,n=b,s=R,n<0&&(a-=n,n=0),s<0&&(o-=s,s=0)}let l=r,f=[];for(let u of i.colorStops){let b=Ut(u);if(!f.length&&(f.push({offset:0,color:b}),typeof u.length=="undefined"||u.length.value==="0"))continue;let R=typeof u.length=="undefined"?void 0:u.length.type==="%"?u.length.value/100:u.length.value/l;f.push({offset:R,color:b})}f.length||f.push({offset:0,color:"transparent"});let d=f[f.length-1];d.offset!==1&&(typeof d.offset=="undefined"?d.offset=1:f.push({offset:1,color:d.color}));let g=0,p=1;for(let u=0;u<f.length;u++)if(typeof f[u].offset=="undefined"){for(p<u&&(p=u);typeof f[p].offset=="undefined";)p++;f[u].offset=(f[p].offset-f[g].offset)/(p-g)*(u-g)+f[g].offset}else g=u;return[`satori_bi${t}`,`<linearGradient id="satori_bi${t}" x1="${a}" y1="${o}" x2="${n}" y2="${s}">${f.map(u=>`<stop offset="${u.offset*100}%" stop-color="${u.color}"/>`).join("")}</linearGradient>`]}if(e.startsWith("url(")){let i=e.slice(4,-1);return[`satori_bi${t}`,`<pattern id="satori_bi${t}" patternContentUnits="objectBoundingBox" width="1" height="1"><image href="${i}" x="0" y="0" width="1" height="1"/></pattern>`]}}m();function j(t,r,e){return e<t+r&&(e/2<t&&e/2<r?t=r=e/2:e/2<t?t=e-r:e/2<r&&(r=e-t)),[t,r]}function Y({left:t,top:r,width:e,height:i},a){let{borderTopLeftRadius:o,borderTopRightRadius:n,borderBottomLeftRadius:s,borderBottomRightRadius:l}=a;return o=Math.min(o||0,e,i),n=Math.min(n||0,e,i),s=Math.min(s||0,e,i),l=Math.min(l||0,e,i),!o&&!n&&!s&&!l?"":([o,n]=j(o,n,e),[o,s]=j(o,s,i),[n,l]=j(n,l,i),[s,l]=j(s,l,e),`M${t+o},${r} h${e-o-n} a${n},${n} 0 0 1 ${n},${n} v${i-n-l} a${l},${l} 0 0 1 ${-l},${l} h${l+s-e} a${s},${s} 0 0 1 ${-s},${-s} v${s+o-i} a${o},${o} 0 0 1 ${o},${-o}`)}m();function X({id:t,width:r,height:e},i){if(!i.shadowColor||!i.shadowOffset||typeof i.shadowRadius=="undefined")return"";let a=Math.min(i.shadowOffset.width-i.shadowRadius*2,0),o=Math.max(i.shadowOffset.width+i.shadowRadius*2+r,r),n=Math.min(i.shadowOffset.height-i.shadowRadius*2,0),s=Math.max(i.shadowOffset.height+i.shadowRadius*2+e,e);return`<defs><filter id="satori_s-${t}" x="${a/r*100}%" y="${n/e*100}%" width="${(o-a)/r*100}%" height="${(s-n)/e*100}%"><feDropShadow dx="${i.shadowOffset.width}" dy="${i.shadowOffset.height}" stdDeviation="${i.shadowRadius}" flood-color="${i.shadowColor}" flood-opacity="1"/></filter></defs>`}function ot({id:t,left:r,top:e,width:i,height:a,isInheritingTransform:o,debug:n},s){if(s.display==="none")return"";let l="rect",f="transparent",d=0,g="",p="",u=[],b=1,R="";if(s.backgroundColor&&u.push(s.backgroundColor),s.borderWidth&&(d=s.borderWidth,f=s.borderColor),s.opacity&&(b=+s.opacity),s.transform&&(g=M({left:r,top:e,width:i,height:a},s.transform,o)),s.backgroundImage){let S=s.backgroundImage.map((y,F)=>nt({id:t+"_"+F,width:i,height:a},y)).filter(Boolean);for(let y of S)p+=y[1],u.push(`url(#${y[0]})`)}let T=Y({left:r,top:e,width:i,height:a},s);T&&(l="path");let _=X({width:i,height:a,id:t},s);return u.length||u.push("transparent"),n&&(R=`<rect x="${r}" y="${e}" width="${i}" height="${a}" fill="transparent" stroke="#ff5757" stroke-width="1" ${g?`transform="${g}"`:""}></rect>`),`${p?`<defs>${p}</defs>`:""}${_?`${_}<g filter="url(#satori_s-${t})">`:""}${b!==1?`<g opacity="${b}">`:""}${u.map((S,y)=>S==="transparent"&&!(y===u.length-1&&d)?"":`<${l} x="${r}" y="${e}" width="${i}" height="${a}" fill="${S}" ${y===u.length-1&&d?`stroke="${f}" stroke-width="${d}"`:""} ${T?`d="${T}"`:""} ${g?`transform="${g}"`:""}></${l}>`).join("")}${b!==1?"</g>":""}${_?"</g>":""}${R}`}m();function it({id:t,left:r,top:e,width:i,height:a,src:o,debug:n},s){if(s.display==="none")return"";let l="",f=1,d=s.objectFit==="contain"?"xMidYMid":s.objectFit==="cover"?"xMidYMid slice":"none",g=Y({left:r,top:e,width:i,height:a},s);g&&(l=`<clipPath id="satori_c-${t}"><path x="${r}" y="${e}" width="${i}" height="${a}" d="${g}"></path></clipPath>`),s.opacity&&(f=+s.opacity);let p=X({width:i,height:a,id:t},s);return`${p}${p?`<g filter="url(#satori_s-${t})">`:""}${l}<image href="${o}" x="${r}" y="${e}" width="${i}" height="${a}" preserveAspectRatio="${d}" ${l?`clip-path="url(#satori_c-${t})"`:""} ${f!==1?`opacity="${f}"`:""}></image>${p?"</g>":""}`}function*U(t,r){let e=C(),{id:i,inheritedStyle:a,parent:o,font:n,debug:s,embedFont:l=!0}=r;if(t===null||typeof t=="undefined")return yield,"";if(!q(t)||typeof t.type=="function"){let L;if(!q(t))L=et(String(t),r);else{if(bt(t.type))throw new Error("Class component is not supported.");L=U(t.type(t.props),r)}L.next();let P=yield;return L.next(P).value}let{type:f,props:d}=t,{style:g,children:p}=d,u=e.Node.create();o.insertChild(u,o.getChildCount());let[b,R]=Q(u,f,a,g,d),T=b.transform===a.transform;T||(b.transform.__parent=a.transform);let _=typeof p=="undefined"?[]:[].concat(p),S=[],y=0;for(let L of _){let P=U(L,{id:i*_.length+ ++y,parentStyle:b,inheritedStyle:R,isInheritingTransform:!0,parent:u,font:n,embedFont:l,debug:s});P.next(),S.push(P)}let[F,N]=yield;b.position==="absolute"&&u.calculateLayout();let{left:O,top:k,width:W,height:z}=u.getComputedLayout();O+=F,k+=N;let w="";f==="img"?w=it({id:i,left:O,top:k,width:W,height:z,src:d.src,isInheritingTransform:T,debug:s},b):w=ot({id:i,left:O,top:k,width:W,height:z,isInheritingTransform:T,debug:s},b);for(let L of S)w+=L.next([O,k]).value;return w}m();import Rt from"opentype.js";var K=class{constructor(r){this.fonts=new Map;for(let e of r){let i=e.data,a="buffer"in i?Rt.parse(i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength)):Rt.parse(i);this.defaultFont||(this.defaultFont=a),this.fonts.has(e.name)||this.fonts.set(e.name,[]),this.fonts.get(e.name).push([a,e.weight,e.style])}}get({name:r,weight:e,style:i}){if(!this.fonts.has(r))return this.defaultFont;e==="normal"&&(e=400),e==="bold"&&(e=700);let a=[...this.fonts.get(r)];return a.sort(([o,n,s],[l,f,d])=>{if(n!==f)return n?!f||n===e?-1:f===e?1:e===400&&n===500||e===500&&n===400?-1:e===400&&f===500||e===500&&f===400?1:e<400?n<e&&f<e?f-n:n<e?-1:f<e?1:n-f:e<n&&e<f?n-f:e<n?-1:e<f?1:f-n:1;if(s!==d){if(s===i)return-1;if(d===i)return 1}return-1}),a[0][0]}getFont({fontFamily:r,fontWeight:e=400,fontStyle:i="normal"}){return this.get({name:r,weight:e,style:i})}measure(r,e,{fontSize:i,letterSpacing:a=0}){return{width:r.getAdvanceWidth(e,i,{letterSpacing:a/i}),ascent:r.ascender/r.unitsPerEm*i,descent:-(r.descender/r.unitsPerEm)*i}}getSVG(r,e,{fontSize:i,top:a,left:o,letterSpacing:n=0}){return a+=r.ascender/r.unitsPerEm*i,r.getPath(e,o,a,i,{letterSpacing:n/i}).toPathData(2)}getAscent(r,{fontSize:e}){return r.ascender/r.unitsPerEm*e}};m();function at({width:t,height:r,content:e},i){return`<svg width="${t}" height="${r}" viewBox="0 0 ${t} ${r}" xmlns="http://www.w3.org/2000/svg">${e}</svg>`}function Tt(t,r){let e=C();if(!e)throw new Error("Satori is not initialized.");let i=new K(r.fonts),a=e.Node.create();a.setWidth(r.width),a.setHeight(r.height),a.setFlexDirection(e.FLEX_DIRECTION_ROW),a.setFlexWrap(e.WRAP_WRAP),a.setAlignContent(e.ALIGN_AUTO),a.setAlignItems(e.ALIGN_FLEX_START),a.setJustifyContent(e.JUSTIFY_FLEX_START);let o=U(t,{id:1,parentStyle:{},inheritedStyle:{fontSize:16,fontWeight:"normal",fontFamily:"serif",fontStyle:"normal",lineHeight:1.2,color:"black",opacity:1},parent:a,font:i,embedFont:r.embedFont,debug:r.debug});o.next(),a.calculateLayout(r.width,r.height,e.DIRECTION_LTR);let n=o.next([0,0]).value;return at({width:r.width,height:r.height,content:n})}export{Tt as default,wt as init};
var V=Object.defineProperty,It=Object.defineProperties,Lt=Object.getOwnPropertyDescriptor,At=Object.getOwnPropertyDescriptors,Ft=Object.getOwnPropertyNames,lt=Object.getOwnPropertySymbols;var mt=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable;var ct=(t,n,e)=>n in t?V(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,Y=(t,n)=>{for(var e in n||(n={}))mt.call(n,e)&&ct(t,e,n[e]);if(lt)for(var e of lt(n))Ct.call(n,e)&&ct(t,e,n[e]);return t},pt=(t,n)=>It(t,At(n)),Ot=t=>V(t,"__esModule",{value:!0});var dt=(t,n)=>()=>(t&&(n=t(t=0)),n);var Nt=(t,n)=>{for(var e in n)V(t,e,{get:n[e],enumerable:!0})},wt=(t,n,e,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of Ft(n))!mt.call(t,a)&&(e||a!=="default")&&V(t,a,{get:()=>n[a],enumerable:!(i=Lt(n,a))||i.enumerable});return t};var vt=(t=>(n,e)=>t&&t.get(n)||(e=wt(Ot({}),n,1),t&&t.set(n,e),e))(typeof WeakMap!="undefined"?new WeakMap:0);var m=dt(()=>{});var gt={};Nt(gt,{default:()=>Gt});import*as kt from"yoga-layout-prebuilt";var Gt,ht=dt(()=>{m();Gt=kt});m();m();m();var J;{let t=(ht(),vt(gt));t.default?J=t.default:J=t}function Wt(t){J=t}function G(){return J}m();m();function Z(t){let n=typeof t;return!(n==="number"||n==="bigint"||n==="string"||n==="boolean")}function bt(t){return/^class\s/.test(Function.prototype.toString.call(t))}function z(t,n){return[t[0]*n[0]+t[2]*n[1],t[1]*n[0]+t[3]*n[1],t[0]*n[2]+t[2]*n[3],t[1]*n[2]+t[3]*n[3],t[0]*n[4]+t[2]*n[5]+t[4],t[1]*n[4]+t[3]*n[5]+t[5]]}function O(t,n,e){let i=n[t];return typeof i=="undefined"?e:i}m();m();var yt={p:{display:"block",marginTop:"1em",marginBottom:"1em"},div:{display:"block"},blockquote:{display:"block",marginTop:"1em",marginBottom:"1em",marginLeft:40,marginRight:40},center:{display:"block",textAlign:"center"},hr:{display:"block",marginTop:"0.5em",marginBottom:"0.5em",marginLeft:"auto",marginRight:"auto",borderWidth:1,borderStyle:"inset"},h1:{display:"block",fontSize:"2em",marginTop:"0.67em",marginBottom:"0.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h2:{display:"block",fontSize:"1.5em",marginTop:"0.83em",marginBottom:"0.83em",marginLeft:0,marginRight:0,fontWeight:"bold"},h3:{display:"block",fontSize:"1.17em",marginTop:"1em",marginBottom:"1em",marginLeft:0,marginRight:0,fontWeight:"bold"},h4:{display:"block",marginTop:"1.33em",marginBottom:"1.33em",marginLeft:0,marginRight:0,fontWeight:"bold"},h5:{display:"block",fontSize:"0.83em",marginTop:"1.67em",marginBottom:"1.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h6:{display:"block",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:"block",fontFamily:"monospace",whiteSpace:"pre",marginTop:"1em",marginBottom:"1em"},mark:{backgroundColor:"yellow",color:"black"},big:{fontSize:"larger"},small:{fontSize:"smaller"},s:{textDecoration:"line-through"}};m();var Pt=new Set(["color","font","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","textAlign","textTransform","whiteSpace","letterSpacing","transform","wordBreak","textShadowOffset","textShadowColor","textShadowRadius","opacity"]);function Q(t){let n={};for(let e in t)Pt.has(e)&&(n[e]=t[e]);return n}m();import{getPropertyName as $t,getStylesForProperty as Dt}from"css-to-react-native";import St from"parse-css-dimension";import{parseElementStyle as Bt}from"css-background-parser";var Mt=new Set(["flex","flexGrow","flexShrink","flexBasis","fontWeight","lineHeight","opacity","scale","scaleX","scaleY"]),xt=[1,0,0,1,0,0];function Yt(t,n){return typeof n=="number"?Mt.has(t)?String(n):n+"px":n}function Et(t,n){if(typeof t=="number")return t;try{let e=new St(t);if(e.type==="length")switch(e.unit){case"em":return e.value*n;case"rem":return e.value*16;default:return e.value}else if(e.type==="angle")switch(e.unit){case"deg":return e.value;case"rad":return e.value*180/Math.PI;default:return e.value}}catch{}}function j(t,n){let e=[];for(let o in t){let r=$t(o);e.push([r,Yt(r,t[o])])}let i=e.reduce((o,r)=>{let s=$t(r[0]),c=r[1];return Object.assign(o,Dt(s,c,!0))},{});if(i.backgroundImage){let{backgrounds:o}=Bt(i);i.backgroundImage=o}let a=i.fontSize||n.fontSize;if(typeof a=="string")try{let o=new St(a);switch(o.unit){case"em":a=o.value*n.fontSize;break;case"rem":a=o.value*16;break}}catch{a=16}i.fontSize=a;for(let o in i){let r=i[o];if(typeof r=="string"){let s=Et(r,a);typeof s!="undefined"&&(i[o]=s),r=i[o]}if(o==="opacity"&&(r=i[o]=r*n.opacity),o==="transform"){let s=[...xt],c=r;for(let u of c){let h=Object.keys(u)[0],p=u[h],d=typeof p=="string"?Et(p,a):p,f=[...xt];switch(h){case"translateX":f[4]=d;break;case"translateY":f[5]=d;break;case"scaleX":f[0]=d;break;case"scaleY":f[3]=d;break;case"rotate":let b=d*Math.PI/180,y=Math.cos(b),T=Math.sin(b);f[0]=y,f[1]=T,f[2]=-T,f[3]=y;break;case"skewX":f[2]=Math.tan(d*Math.PI/180);break;case"skewY":f[1]=Math.tan(d*Math.PI/180);break}s=z(f,s)}i.transform=s}}return i}function tt(t,n,e,i,a){let o=G(),r=Y(Y(Y({},e),j(yt[n],e)),j(i,e));if(n==="img"){let s=parseInt(a.width),u=parseInt(a.height)/s;r.width||(r.width=s),r.height||(r.height=u*r.width)}return t.setDisplay(O(r.display,{flex:o.DISPLAY_FLEX,none:o.DISPLAY_NONE},o.DISPLAY_FLEX)),t.setAlignContent(O(r.alignContent,{stretch:o.ALIGN_STRETCH,center:o.ALIGN_CENTER,"flex-start":o.ALIGN_FLEX_START,"flex-end":o.ALIGN_FLEX_END,"space-between":o.ALIGN_SPACE_BETWEEN,"space-around":o.ALIGN_SPACE_AROUND,baseline:o.ALIGN_BASELINE,normal:o.ALIGN_AUTO},o.ALIGN_AUTO)),t.setAlignItems(O(r.alignItems,{stretch:o.ALIGN_STRETCH,center:o.ALIGN_CENTER,"flex-start":o.ALIGN_FLEX_START,"flex-end":o.ALIGN_FLEX_END,baseline:o.ALIGN_BASELINE,normal:o.ALIGN_AUTO},o.ALIGN_FLEX_START)),t.setAlignSelf(O(r.alignSelf,{stretch:o.ALIGN_STRETCH,center:o.ALIGN_CENTER,"flex-start":o.ALIGN_FLEX_START,"flex-end":o.ALIGN_FLEX_END,baseline:o.ALIGN_BASELINE,normal:o.ALIGN_AUTO},o.ALIGN_AUTO)),t.setJustifyContent(O(r.justifyContent,{center:o.JUSTIFY_CENTER,"flex-start":o.JUSTIFY_FLEX_START,"flex-end":o.JUSTIFY_FLEX_END,"space-between":o.JUSTIFY_SPACE_BETWEEN,"space-around":o.JUSTIFY_SPACE_AROUND},o.JUSTIFY_FLEX_START)),t.setFlexDirection(O(r.flexDirection,{row:o.FLEX_DIRECTION_ROW,column:o.FLEX_DIRECTION_COLUMN,"row-reverse":o.FLEX_DIRECTION_ROW_REVERSE,"column-reverse":o.FLEX_DIRECTION_COLUMN_REVERSE},o.FLEX_DIRECTION_ROW)),t.setFlexWrap(O(r.flexWrap,{wrap:o.WRAP_WRAP,nowrap:o.WRAP_NO_WRAP,"wrap-reverse":o.WRAP_WRAP_REVERSE},o.WRAP_WRAP)),typeof r.flexBasis!="undefined"&&t.setFlexBasis(r.flexBasis),t.setFlexGrow(typeof r.flexGrow=="undefined"?0:r.flexGrow),t.setFlexShrink(typeof r.flexShrink=="undefined"?1:r.flexShrink),typeof r.maxHeight!="undefined"&&t.setMaxHeight(r.maxHeight),typeof r.maxWidth!="undefined"&&t.setMaxWidth(r.maxWidth),typeof r.minHeight!="undefined"&&t.setMinHeight(r.minHeight),typeof r.minWidth!="undefined"&&t.setMinWidth(r.minWidth),t.setOverflow(O(r.overflow,{visible:o.OVERFLOW_VISIBLE,hidden:o.OVERFLOW_HIDDEN},o.OVERFLOW_VISIBLE)),t.setMargin(o.EDGE_TOP,r.marginTop||0),t.setMargin(o.EDGE_BOTTOM,r.marginBottom||0),t.setMargin(o.EDGE_LEFT,r.marginLeft||0),t.setMargin(o.EDGE_RIGHT,r.marginRight||0),t.setBorder(o.EDGE_TOP,r.borderWidth||0),t.setBorder(o.EDGE_BOTTOM,r.borderWidth||0),t.setBorder(o.EDGE_LEFT,r.borderWidth||0),t.setBorder(o.EDGE_RIGHT,r.borderWidth||0),t.setPadding(o.EDGE_TOP,r.paddingTop||0),t.setPadding(o.EDGE_BOTTOM,r.paddingBottom||0),t.setPadding(o.EDGE_LEFT,r.paddingLeft||0),t.setPadding(o.EDGE_RIGHT,r.paddingRight||0),t.setPositionType(O(r.position,{absolute:o.POSITION_TYPE_ABSOLUTE,relative:o.POSITION_TYPE_RELATIVE},o.POSITION_TYPE_RELATIVE)),typeof r.top!="undefined"&&t.setPosition(o.EDGE_TOP,r.top),typeof r.bottom!="undefined"&&t.setPosition(o.EDGE_BOTTOM,r.bottom),typeof r.left!="undefined"&&t.setPosition(o.EDGE_LEFT,r.left),typeof r.right!="undefined"&&t.setPosition(o.EDGE_RIGHT,r.right),typeof r.height!="undefined"?t.setHeight(r.height):t.setHeightAuto(),typeof r.width!="undefined"?t.setWidth(r.width):t.setWidthAuto(),[r,Q(r)]}m();m();m();function U({left:t,top:n,width:e,height:i},a,o){let r;if(o)r=a;else{let s=t+e/2,c=n+i/2;r=z([1,0,0,1,s,c],z(a,[1,0,0,1,-s,-c])),a.__parent&&(r=z(a.__parent,r)),a.splice(0,6,...r)}return`matrix(${r.map(s=>s.toFixed(2)).join(",")})`}function et({id:t,content:n,filter:e,left:i,top:a,width:o,height:r,isInheritingTransform:s,path:c,image:u,debug:h},p){let d="",f=1,b="";return p.transform&&(d=U({left:i,top:a,width:o,height:r},p.transform,s)),p.opacity&&(f=+p.opacity),h&&(b=`<rect x="${i}" y="${a}" width="${o}" height="${c===null?.5:r}" fill="transparent" stroke="#575eff" stroke-width="1" ${d?`transform="${d}"`:""}></rect>`),u?`${e?`${e}<g filter="url(#satori_s-${t})">`:""}<image href="${u}" x="${i}" y="${a}" width="${o}" height="${r}" ${d?`transform="${d}"`:""} ${f!==1?`opacity="${f}"`:""}></image>${e?"</g>":""}${b}`:c===null?`${e?`${e}<g filter="url(#satori_s-${t})">`:""}<text x="${i}" y="${a}" width="${o}" height="${r}" fill="${p.color}" font-weight="${p.fontWeight}" font-style="${p.fontStyle}" font-size="${p.fontSize}" font-family="${p.fontFamily}" ${p.letterSpacing?`letter-spacing="${p.letterSpacing}"`:""} ${d?`transform="${d}"`:""} ${f!==1?`opacity="${f}"`:""}>${n}</text>${e?"</g>":""}${b}`:`${e?`${e}<g filter="url(#satori_s-${t})">`:""}<path fill="${p.color}" ${d?`transform="${d}"`:""} ${f!==1?`opacity="${f}"`:""} d="${c}"></path>${e?"</g>":""}${b}`}m();function M({id:t,width:n,height:e},i){if(!i.shadowColor||!i.shadowOffset||typeof i.shadowRadius=="undefined")return"";let a=i.shadowRadius*i.shadowRadius/4,o=Math.min(i.shadowOffset.width-a,0),r=Math.max(i.shadowOffset.width+a+n,n),s=Math.min(i.shadowOffset.height-a,0),c=Math.max(i.shadowOffset.height+a+e,e);return`<defs><filter id="satori_s-${t}" x="${o/n*100}%" y="${s/e*100}%" width="${(r-o)/n*100}%" height="${(c-s)/e*100}%"><feDropShadow dx="${i.shadowOffset.width}" dy="${i.shadowOffset.height}" stdDeviation="${i.shadowRadius/2}" flood-color="${i.shadowColor}" flood-opacity="1"/></filter></defs>`}function*rt(t,n){let e=G(),i="en",a=new Intl.Segmenter(i,{granularity:"word"}),o=new Intl.Segmenter(i,{granularity:"grapheme"}),{parentStyle:r,parent:s,font:c,id:u,isInheritingTransform:h,debug:p,embedFont:d,graphemeImages:f}=n;r.textTransform==="uppercase"?t=t.toLocaleUpperCase(i):r.textTransform==="lowercase"?t=t.toLocaleLowerCase(i):r.textTransform==="capitalize"&&(t=[...a.segment(t)].map(I=>[...o.segment(I.segment)].map((L,S)=>S===0?L.segment.toLocaleUpperCase(i):L.segment).join("")).join(""));let y=[...O(r.wordBreak,{normal:a,"break-all":o,"break-word":o,"keep-all":a},a).segment(t)].map(I=>I.segment),T=[];s.setAlignItems(e.ALIGN_BASELINE),r.textAlign==="left"?s.setJustifyContent(e.JUSTIFY_FLEX_START):r.textAlign==="center"?s.setJustifyContent(e.JUSTIFY_CENTER):r.textAlign==="right"?s.setJustifyContent(e.JUSTIFY_FLEX_END):r.textAlign==="justify"&&s.setJustifyContent(e.JUSTIFY_SPACE_BETWEEN);let _=c.getFont(r);for(let I of y){let L=e.Node.create();s.insertChild(L,s.getChildCount());let S;f&&f[I]?S={width:r.fontSize,ascent:_.ascender/_.unitsPerEm*r.fontSize,descent:-(_.descender/_.unitsPerEm)*r.fontSize}:S=c.measure(_,I,r),L.setWidth(S.width),L.setHeight(S.ascent*1.2),L.setMargin(e.EDGE_BOTTOM,S.descent*1.2),T.push(L)}let[N,R]=yield,W="";for(let I=0;I<T.length;I++){let L=T[I],S=y[I];r.position==="absolute"&&L.calculateLayout();let{left:w,top:k,width:P,height:C}=L.getComputedLayout();w+=N,k+=R;let F=null,v=null;f&&f[S]?v=f[S]:d?F=c.getSVG(_,S,pt(Y({},r),{top:k,left:w,letterSpacing:r.letterSpacing})):k+=c.getAscent(_,r);let A="";r.textShadowOffset&&(A=M({width:P,height:C,id:u},{shadowColor:r.textShadowColor,shadowOffset:r.textShadowOffset,shadowRadius:r.textShadowRadius})),W+=et({content:S,filter:A,id:u,left:w,top:k,width:P,height:C,isInheritingTransform:h,path:F,image:v,debug:p},r)}return W}m();m();m();var nt=nt||{};nt.parse=function(){var t={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/,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]+\.?))/},n="";function e(l){var g=new Error(n+": "+l);throw g.source=n,g}function i(){var l=a();return n.length>0&&e("Invalid input not EOF"),l}function a(){return R(o)}function o(){return r("linear-gradient",t.linearGradient,c)||r("repeating-linear-gradient",t.repeatingLinearGradient,c)||r("radial-gradient",t.radialGradient,p)||r("repeating-radial-gradient",t.repeatingRadialGradient,p)}function r(l,g,$){return s(g,function(B){var ut=$();return ut&&(D(t.comma)||e("Missing comma before color stops")),{type:l,orientation:ut,colorStops:R(W)}})}function s(l,g){var $=D(l);if($){D(t.startCall)||e("Missing (");var B=g($);return D(t.endCall)||e("Missing )"),B}}function c(){return u()||h()}function u(){return A("directional",t.sideOrCorner,1)}function h(){return A("angular",t.angleValue,1)}function p(){var l,g=d(),$;return g&&(l=[],l.push(g),$=n,D(t.comma)&&(g=d(),g?l.push(g):n=$)),l}function d(){var l=f()||b();if(l)l.at=T();else{var g=y();if(g){l=g;var $=T();$&&(l.at=$)}else{var B=_();B&&(l={type:"default-radial",at:B})}}return l}function f(){var l=A("shape",/^(circle)/i,0);return l&&(l.style=v()||y()),l}function b(){var l=A("shape",/^(ellipse)/i,0);return l&&(l.style=C()||y()),l}function y(){return A("extent-keyword",t.extentKeywords,1)}function T(){if(A("position",/^at/,0)){var l=_();return l||e("Missing positioning value"),l}}function _(){var l=N();if(l.x||l.y)return{type:"position",value:l}}function N(){return{x:C(),y:C()}}function R(l){var g=l(),$=[];if(g)for($.push(g);D(t.comma);)g=l(),g?$.push(g):e("One extra comma");return $}function W(){var l=I();return l||e("Expected color definition"),l.length=C(),l}function I(){return S()||k()||w()||L()}function L(){return A("literal",t.literalColor,0)}function S(){return A("hex",t.hexColor,1)}function w(){return s(t.rgbColor,function(){return{type:"rgb",value:R(P)}})}function k(){return s(t.rgbaColor,function(){return{type:"rgba",value:R(P)}})}function P(){return D(t.number)[1]}function C(){return A("%",t.percentageValue,1)||F()||v()}function F(){return A("position-keyword",t.positionKeywords,1)}function v(){return A("px",t.pixelValue,1)||A("em",t.emValue,1)}function A(l,g,$){var B=D(g);if(B)return{type:l,value:B[$]}}function D(l){var g,$;return $=/^[\n\r\t\s]+/.exec(n),$&&ft($[0].length),g=l.exec(n),g&&ft(g[0].length),g}function ft(l){n=n.substr(l)}return function(l){return n=l.toString(),i()}}();var _t=nt;function zt(t){return t.type==="literal"?t.value:t.type==="hex"?`#${t.value}`:t.type==="rgb"?`rgb(${t.value.join(",")})`:t.type==="rgba"?`rgba(${t.value.join(",")})`:"transparent"}function ot({id:t,width:n},{image:e}){if(e.startsWith("linear-gradient(")){let i=_t.parse(e)[0],a,o,r,s;if(i.orientation.type==="directional")[a,o,r,s]={top:[0,1,0,0],bottom:[0,0,0,1],left:[1,0,0,0],right:[0,0,1,0]}[i.orientation.value];else if(i.orientation.type==="angular"){let f=+i.orientation.value/180*Math.PI-Math.PI/2,b=Math.cos(f),y=Math.sin(f);a=0,o=0,r=b,s=y,r<0&&(a-=r,r=0),s<0&&(o-=s,s=0)}let c=n,u=[];for(let f of i.colorStops){let b=zt(f);if(!u.length&&(u.push({offset:0,color:b}),typeof f.length=="undefined"||f.length.value==="0"))continue;let y=typeof f.length=="undefined"?void 0:f.length.type==="%"?f.length.value/100:f.length.value/c;u.push({offset:y,color:b})}u.length||u.push({offset:0,color:"transparent"});let h=u[u.length-1];h.offset!==1&&(typeof h.offset=="undefined"?h.offset=1:u.push({offset:1,color:h.color}));let p=0,d=1;for(let f=0;f<u.length;f++)if(typeof u[f].offset=="undefined"){for(d<f&&(d=f);typeof u[d].offset=="undefined";)d++;u[f].offset=(u[d].offset-u[p].offset)/(d-p)*(f-p)+u[p].offset}else p=f;return[`satori_bi${t}`,`<linearGradient id="satori_bi${t}" x1="${a}" y1="${o}" x2="${r}" y2="${s}">${u.map(f=>`<stop offset="${f.offset*100}%" stop-color="${f.color}"/>`).join("")}</linearGradient>`]}if(e.startsWith("url(")){let i=e.slice(4,-1);return[`satori_bi${t}`,`<pattern id="satori_bi${t}" patternContentUnits="objectBoundingBox" width="1" height="1"><image href="${i}" x="0" y="0" width="1" height="1"/></pattern>`]}}m();function K(t,n,e){return e<t+n&&(e/2<t&&e/2<n?t=n=e/2:e/2<t?t=e-n:e/2<n&&(n=e-t)),[t,n]}function X({left:t,top:n,width:e,height:i},a){let{borderTopLeftRadius:o,borderTopRightRadius:r,borderBottomLeftRadius:s,borderBottomRightRadius:c}=a;return o=Math.min(o||0,e,i),r=Math.min(r||0,e,i),s=Math.min(s||0,e,i),c=Math.min(c||0,e,i),!o&&!r&&!s&&!c?"":([o,r]=K(o,r,e),[o,s]=K(o,s,i),[r,c]=K(r,c,i),[s,c]=K(s,c,e),`M${t+o},${n} h${e-o-r} a${r},${r} 0 0 1 ${r},${r} v${i-r-c} a${c},${c} 0 0 1 ${-c},${c} h${c+s-e} a${s},${s} 0 0 1 ${-s},${-s} v${s+o-i} a${o},${o} 0 0 1 ${o},${-o}`)}function it({id:t,left:n,top:e,width:i,height:a,isInheritingTransform:o,debug:r},s){if(s.display==="none")return"";let c="rect",u="transparent",h=0,p="",d="",f=[],b=1,y="";if(s.backgroundColor&&f.push(s.backgroundColor),s.borderWidth&&(h=s.borderWidth,u=s.borderColor),s.opacity&&(b=+s.opacity),s.transform&&(p=U({left:n,top:e,width:i,height:a},s.transform,o)),s.backgroundImage){let N=s.backgroundImage.map((R,W)=>ot({id:t+"_"+W,width:i,height:a},R)).filter(Boolean);for(let R of N)d+=R[1],f.push(`url(#${R[0]})`)}let T=X({left:n,top:e,width:i,height:a},s);T&&(c="path");let _=M({width:i,height:a,id:t},s);return f.length||f.push("transparent"),r&&(y=`<rect x="${n}" y="${e}" width="${i}" height="${a}" fill="transparent" stroke="#ff5757" stroke-width="1" ${p?`transform="${p}"`:""}></rect>`),`${d?`<defs>${d}</defs>`:""}${_?`${_}<g filter="url(#satori_s-${t})">`:""}${b!==1?`<g opacity="${b}">`:""}${f.map((N,R)=>N==="transparent"&&!(R===f.length-1&&h)?"":`<${c} x="${n}" y="${e}" width="${i}" height="${a}" fill="${N}" ${R===f.length-1&&h?`stroke="${u}" stroke-width="${h}"`:""} ${T?`d="${T}"`:""} ${p?`transform="${p}"`:""}></${c}>`).join("")}${b!==1?"</g>":""}${_?"</g>":""}${y}`}m();function at({id:t,left:n,top:e,width:i,height:a,src:o,debug:r},s){if(s.display==="none")return"";let c="",u=1,h=s.objectFit==="contain"?"xMidYMid":s.objectFit==="cover"?"xMidYMid slice":"none",p=X({left:n,top:e,width:i,height:a},s);p&&(c=`<clipPath id="satori_c-${t}"><path x="${n}" y="${e}" width="${i}" height="${a}" d="${p}"></path></clipPath>`),s.opacity&&(u=+s.opacity);let d=M({width:i,height:a,id:t},s);return`${d}${d?`<g filter="url(#satori_s-${t})">`:""}${c}<image href="${o}" x="${n}" y="${e}" width="${i}" height="${a}" preserveAspectRatio="${h}" ${c?`clip-path="url(#satori_c-${t})"`:""} ${u!==1?`opacity="${u}"`:""}></image>${d?"</g>":""}`}function*H(t,n){let e=G(),{id:i,inheritedStyle:a,parent:o,font:r,debug:s,embedFont:c=!0,graphemeImages:u}=n;if(t===null||typeof t=="undefined")return yield,"";if(!Z(t)||typeof t.type=="function"){let F;if(!Z(t))F=rt(String(t),n);else{if(bt(t.type))throw new Error("Class component is not supported.");F=H(t.type(t.props),n)}F.next();let v=yield;return F.next(v).value}let{type:h,props:p}=t,{style:d,children:f}=p,b=e.Node.create();o.insertChild(b,o.getChildCount());let[y,T]=tt(b,h,a,d,p),_=y.transform===a.transform;_||(y.transform.__parent=a.transform);let N=typeof f=="undefined"?[]:[].concat(f),R=[],W=0;for(let F of N){let v=H(F,{id:i*N.length+ ++W,parentStyle:y,inheritedStyle:T,isInheritingTransform:!0,parent:b,font:r,embedFont:c,debug:s,graphemeImages:u});v.next(),R.push(v)}let[I,L]=yield;y.position==="absolute"&&b.calculateLayout();let{left:S,top:w,width:k,height:P}=b.getComputedLayout();S+=I,w+=L;let C="";h==="img"?C=at({id:i,left:S,top:w,width:k,height:P,src:p.src,isInheritingTransform:_,debug:s},y):C=it({id:i,left:S,top:w,width:k,height:P,isInheritingTransform:_,debug:s},y);for(let F of R)C+=F.next([S,w]).value;return C}m();import Rt from"opentype.js";var q=class{constructor(n){this.fonts=new Map;for(let e of n){let i=e.data,a="buffer"in i?Rt.parse(i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength)):Rt.parse(i);this.defaultFont||(this.defaultFont=a),this.fonts.has(e.name)||this.fonts.set(e.name,[]),this.fonts.get(e.name).push([a,e.weight,e.style])}}get({name:n,weight:e,style:i}){if(!this.fonts.has(n))return this.defaultFont;e==="normal"&&(e=400),e==="bold"&&(e=700);let a=[...this.fonts.get(n)];return a.sort(([o,r,s],[c,u,h])=>{if(r!==u)return r?!u||r===e?-1:u===e?1:e===400&&r===500||e===500&&r===400?-1:e===400&&u===500||e===500&&u===400?1:e<400?r<e&&u<e?u-r:r<e?-1:u<e?1:r-u:e<r&&e<u?r-u:e<r?-1:e<u?1:u-r:1;if(s!==h){if(s===i)return-1;if(h===i)return 1}return-1}),a[0][0]}getFont({fontFamily:n,fontWeight:e=400,fontStyle:i="normal"}){return this.get({name:n,weight:e,style:i})}measure(n,e,{fontSize:i,letterSpacing:a=0}){return{width:n.getAdvanceWidth(e,i,{letterSpacing:a/i}),ascent:n.ascender/n.unitsPerEm*i,descent:-(n.descender/n.unitsPerEm)*i}}getSVG(n,e,{fontSize:i,top:a,left:o,letterSpacing:r=0}){return a+=n.ascender/n.unitsPerEm*i,n.getPath(e,o,a,i,{letterSpacing:r/i}).toPathData(2)}getAscent(n,{fontSize:e}){return n.ascender/n.unitsPerEm*e}};m();function st({width:t,height:n,content:e},i){return`<svg width="${t}" height="${n}" viewBox="0 0 ${t} ${n}" xmlns="http://www.w3.org/2000/svg">${e}</svg>`}function Tt(t,n){let e=G();if(!e)throw new Error("Satori is not initialized.");let i=new q(n.fonts),a=e.Node.create();a.setWidth(n.width),a.setHeight(n.height),a.setFlexDirection(e.FLEX_DIRECTION_ROW),a.setFlexWrap(e.WRAP_WRAP),a.setAlignContent(e.ALIGN_AUTO),a.setAlignItems(e.ALIGN_FLEX_START),a.setJustifyContent(e.JUSTIFY_FLEX_START);let o=H(t,{id:1,parentStyle:{},inheritedStyle:{fontSize:16,fontWeight:"normal",fontFamily:"serif",fontStyle:"normal",lineHeight:1.2,color:"black",opacity:1},parent:a,font:i,embedFont:n.embedFont,debug:n.debug,graphemeImages:n.graphemeImages});o.next(),a.calculateLayout(n.width,n.height,e.DIRECTION_LTR);let r=o.next([0,0]).value;return st({width:n.width,height:n.height,content:r})}export{Tt as default,Wt as init};
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

var xt=Object.defineProperty,$t=Object.defineProperties;var _t=Object.getOwnPropertyDescriptors;var st=Object.getOwnPropertySymbols;var St=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable;var ft=(t,n,e)=>n in t?xt(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,P=(t,n)=>{for(var e in n||(n={}))St.call(n,e)&&ft(t,e,n[e]);if(st)for(var e of st(n))Rt.call(n,e)&&ft(t,e,n[e]);return t},ut=(t,n)=>$t(t,_t(n));var lt;function Tt(t){lt=t}function F(){return lt}function J(t){let n=typeof t;return!(n==="number"||n==="bigint"||n==="string"||n==="boolean")}function ct(t){return/^class\s/.test(Function.prototype.toString.call(t))}function B(t,n){return[t[0]*n[0]+t[2]*n[1],t[1]*n[0]+t[3]*n[1],t[0]*n[2]+t[2]*n[3],t[1]*n[2]+t[3]*n[3],t[0]*n[4]+t[2]*n[5]+t[4],t[1]*n[4]+t[3]*n[5]+t[5]]}function I(t,n,e){let i=n[t];return typeof i=="undefined"?e:i}var mt={p:{display:"block",marginTop:"1em",marginBottom:"1em"},div:{display:"block"},blockquote:{display:"block",marginTop:"1em",marginBottom:"1em",marginLeft:40,marginRight:40},center:{display:"block",textAlign:"center"},hr:{display:"block",marginTop:"0.5em",marginBottom:"0.5em",marginLeft:"auto",marginRight:"auto",borderWidth:1,borderStyle:"inset"},h1:{display:"block",fontSize:"2em",marginTop:"0.67em",marginBottom:"0.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h2:{display:"block",fontSize:"1.5em",marginTop:"0.83em",marginBottom:"0.83em",marginLeft:0,marginRight:0,fontWeight:"bold"},h3:{display:"block",fontSize:"1.17em",marginTop:"1em",marginBottom:"1em",marginLeft:0,marginRight:0,fontWeight:"bold"},h4:{display:"block",marginTop:"1.33em",marginBottom:"1.33em",marginLeft:0,marginRight:0,fontWeight:"bold"},h5:{display:"block",fontSize:"0.83em",marginTop:"1.67em",marginBottom:"1.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h6:{display:"block",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:"block",fontFamily:"monospace",whiteSpace:"pre",marginTop:"1em",marginBottom:"1em"},mark:{backgroundColor:"yellow",color:"black"},big:{fontSize:"larger"},small:{fontSize:"smaller"},s:{textDecoration:"line-through"}};var Lt=new Set(["color","font","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","textAlign","textTransform","whiteSpace","letterSpacing","transform","wordBreak","opacity"]);function j(t){let n={};for(let e in t)Lt.has(e)&&(n[e]=t[e]);return n}import{getPropertyName as dt,getStylesForProperty as It}from"css-to-react-native";import ht from"parse-css-dimension";import{parseElementStyle as At}from"css-background-parser";var Ft=new Set(["flex","flexGrow","flexShrink","flexBasis","fontWeight","lineHeight","opacity","scale","scaleX","scaleY"]),pt=[1,0,0,1,0,0];function Ct(t,n){return typeof n=="number"?Ft.has(t)?String(n):n+"px":n}function gt(t,n){if(typeof t=="number")return t;try{let e=new ht(t);if(e.type==="length")switch(e.unit){case"em":return e.value*n;case"rem":return e.value*16;default:return e.value}else if(e.type==="angle")switch(e.unit){case"deg":return e.value;case"rad":return e.value*180/Math.PI;default:return e.value}}catch{}}function U(t,n){let e=[];for(let o in t){let r=dt(o);e.push([r,Ct(r,t[o])])}let i=e.reduce((o,r)=>{let s=dt(r[0]),l=r[1];return Object.assign(o,It(s,l,!0))},{});if(i.backgroundImage){let{backgrounds:o}=At(i);i.backgroundImage=o}let a=i.fontSize||n.fontSize;if(typeof a=="string")try{let o=new ht(a);switch(o.unit){case"em":a=o.value*n.fontSize;break;case"rem":a=o.value*16;break}}catch{a=16}i.fontSize=a;for(let o in i){let r=i[o];if(typeof r=="string"){let s=gt(r,a);typeof s!="undefined"&&(i[o]=s),r=i[o]}if(o==="opacity"&&(r=i[o]=r*n.opacity),o==="transform"){let s=[...pt],l=r;for(let f of l){let d=Object.keys(f)[0],p=f[d],m=typeof p=="string"?gt(p,a):p,u=[...pt];switch(d){case"translateX":u[4]=m;break;case"translateY":u[5]=m;break;case"scaleX":u[0]=m;break;case"scaleY":u[3]=m;break;case"rotate":let h=m*Math.PI/180,S=Math.cos(h),R=Math.sin(h);u[0]=S,u[1]=R,u[2]=-R,u[3]=S;break;case"skewX":u[2]=Math.tan(m*Math.PI/180);break;case"skewY":u[1]=Math.tan(m*Math.PI/180);break}s=B(u,s)}i.transform=s}}return i}function K(t,n,e,i,a){let o=F(),r=P(P(P({},e),U(mt[n],e)),U(i,e));if(n==="img"){let s=parseInt(a.width),f=parseInt(a.height)/s;r.width||(r.width=s),r.height||(r.height=f*r.width)}return t.setDisplay(I(r.display,{flex:o.DISPLAY_FLEX,none:o.DISPLAY_NONE},o.DISPLAY_FLEX)),t.setAlignContent(I(r.alignContent,{stretch:o.ALIGN_STRETCH,center:o.ALIGN_CENTER,"flex-start":o.ALIGN_FLEX_START,"flex-end":o.ALIGN_FLEX_END,"space-between":o.ALIGN_SPACE_BETWEEN,"space-around":o.ALIGN_SPACE_AROUND,baseline:o.ALIGN_BASELINE,normal:o.ALIGN_AUTO},o.ALIGN_AUTO)),t.setAlignItems(I(r.alignItems,{stretch:o.ALIGN_STRETCH,center:o.ALIGN_CENTER,"flex-start":o.ALIGN_FLEX_START,"flex-end":o.ALIGN_FLEX_END,baseline:o.ALIGN_BASELINE,normal:o.ALIGN_AUTO},o.ALIGN_FLEX_START)),t.setAlignSelf(I(r.alignSelf,{stretch:o.ALIGN_STRETCH,center:o.ALIGN_CENTER,"flex-start":o.ALIGN_FLEX_START,"flex-end":o.ALIGN_FLEX_END,baseline:o.ALIGN_BASELINE,normal:o.ALIGN_AUTO},o.ALIGN_AUTO)),t.setJustifyContent(I(r.justifyContent,{center:o.JUSTIFY_CENTER,"flex-start":o.JUSTIFY_FLEX_START,"flex-end":o.JUSTIFY_FLEX_END,"space-between":o.JUSTIFY_SPACE_BETWEEN,"space-around":o.JUSTIFY_SPACE_AROUND},o.JUSTIFY_FLEX_START)),t.setFlexDirection(I(r.flexDirection,{row:o.FLEX_DIRECTION_ROW,column:o.FLEX_DIRECTION_COLUMN,"row-reverse":o.FLEX_DIRECTION_ROW_REVERSE,"column-reverse":o.FLEX_DIRECTION_COLUMN_REVERSE},o.FLEX_DIRECTION_ROW)),t.setFlexWrap(I(r.flexWrap,{wrap:o.WRAP_WRAP,nowrap:o.WRAP_NO_WRAP,"wrap-reverse":o.WRAP_WRAP_REVERSE},o.WRAP_WRAP)),typeof r.flexBasis!="undefined"&&t.setFlexBasis(r.flexBasis),t.setFlexGrow(typeof r.flexGrow=="undefined"?0:r.flexGrow),t.setFlexShrink(typeof r.flexShrink=="undefined"?1:r.flexShrink),typeof r.maxHeight!="undefined"&&t.setMaxHeight(r.maxHeight),typeof r.maxWidth!="undefined"&&t.setMaxWidth(r.maxWidth),typeof r.minHeight!="undefined"&&t.setMinHeight(r.minHeight),typeof r.minWidth!="undefined"&&t.setMinWidth(r.minWidth),t.setOverflow(I(r.overflow,{visible:o.OVERFLOW_VISIBLE,hidden:o.OVERFLOW_HIDDEN},o.OVERFLOW_VISIBLE)),t.setMargin(o.EDGE_TOP,r.marginTop||0),t.setMargin(o.EDGE_BOTTOM,r.marginBottom||0),t.setMargin(o.EDGE_LEFT,r.marginLeft||0),t.setMargin(o.EDGE_RIGHT,r.marginRight||0),t.setBorder(o.EDGE_TOP,r.borderWidth||0),t.setBorder(o.EDGE_BOTTOM,r.borderWidth||0),t.setBorder(o.EDGE_LEFT,r.borderWidth||0),t.setBorder(o.EDGE_RIGHT,r.borderWidth||0),t.setPadding(o.EDGE_TOP,r.paddingTop||0),t.setPadding(o.EDGE_BOTTOM,r.paddingBottom||0),t.setPadding(o.EDGE_LEFT,r.paddingLeft||0),t.setPadding(o.EDGE_RIGHT,r.paddingRight||0),t.setPositionType(I(r.position,{absolute:o.POSITION_TYPE_ABSOLUTE,relative:o.POSITION_TYPE_RELATIVE},o.POSITION_TYPE_RELATIVE)),typeof r.top!="undefined"&&t.setPosition(o.EDGE_TOP,r.top),typeof r.bottom!="undefined"&&t.setPosition(o.EDGE_BOTTOM,r.bottom),typeof r.left!="undefined"&&t.setPosition(o.EDGE_LEFT,r.left),typeof r.right!="undefined"&&t.setPosition(o.EDGE_RIGHT,r.right),typeof r.height!="undefined"?t.setHeight(r.height):t.setHeightAuto(),typeof r.width!="undefined"?t.setWidth(r.width):t.setWidthAuto(),[r,j(r)]}import{LineBreaker as Nt}from"css-line-break";function D({left:t,top:n,width:e,height:i},a,o){let r;if(o)r=a;else{let s=t+e/2,l=n+i/2;r=B([1,0,0,1,s,l],B(a,[1,0,0,1,-s,-l])),a.__parent&&(r=B(a.__parent,r)),a.splice(0,6,...r)}return`matrix(${r.map(s=>s.toFixed(2)).join(",")})`}function q({content:t,left:n,top:e,width:i,height:a,isInheritingTransform:o,path:r,debug:s},l){let f="",d=1,p="";return l.transform&&(f=D({left:n,top:e,width:i,height:a},l.transform,o)),l.opacity&&(d=+l.opacity),s&&(p=`<rect x="${n}" y="${e}" width="${i}" height="${r===null?.5:a}" fill="transparent" stroke="#575eff" stroke-width="1" ${f?`transform="${f}"`:""}></rect>`),r===null?`<text x="${n}" y="${e}" width="${i}" height="${a}" fill="${l.color}" font-weight="${l.fontWeight}" font-style="${l.fontStyle}" font-size="${l.fontSize}" font-family="${l.fontFamily}" ${l.letterSpacing?`letter-spacing="${l.letterSpacing}"`:""} ${f?`transform="${f}"`:""} ${d!==1?`opacity="${d}"`:""}>${t}</text>${p}`:`<path fill="${l.color}" ${f?`transform="${f}"`:""} ${d!==1?`opacity="${d}"`:""} d="${r}"></path>${p}`}function*Z(t,n){let e=F(),{parentStyle:i,parent:a,font:o,id:r,isInheritingTransform:s,debug:l,embedFont:f}=n,d=Nt(t,{lineBreak:"strict",wordBreak:I(i.wordBreak,{normal:"normal","break-all":"break-all","break-word":"break-word","keep-all":"keep-all"},"normal")}),p=[];for(let E;!(E=d.next()).done;)p.push(E.value.slice());let m=[];a.setAlignItems(e.ALIGN_BASELINE),i.textAlign==="left"?a.setJustifyContent(e.JUSTIFY_FLEX_START):i.textAlign==="center"?a.setJustifyContent(e.JUSTIFY_CENTER):i.textAlign==="right"?a.setJustifyContent(e.JUSTIFY_FLEX_END):i.textAlign==="justify"&&a.setJustifyContent(e.JUSTIFY_SPACE_BETWEEN);let u=o.getFont(i);for(let E of p){let _=e.Node.create();a.insertChild(_,a.getChildCount());let b=o.measure(u,E,i);_.setWidth(b.width),_.setHeight(b.ascent*1.2),_.setMargin(e.EDGE_BOTTOM,b.descent*1.2),m.push(_)}let[h,S]=yield,R="";for(let E=0;E<m.length;E++){let _=m[E],b=p[E];i.position==="absolute"&&_.calculateLayout();let{left:A,top:C,width:N,height:O}=_.getComputedLayout();A+=h,C+=S;let G=null;f?G=o.getSVG(u,b,ut(P({},i),{top:C,left:A,letterSpacing:i.letterSpacing})):C+=o.getAscent(u,i),R+=q({content:b,id:r,left:A,top:C,width:N,height:O,isInheritingTransform:s,path:G,debug:l},i)}return R}var Q=Q||{};Q.parse=function(){var t={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/,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]+\.?))/},n="";function e(c){var g=new Error(n+": "+c);throw g.source=n,g}function i(){var c=a();return n.length>0&&e("Invalid input not EOF"),c}function a(){return b(o)}function o(){return r("linear-gradient",t.linearGradient,l)||r("repeating-linear-gradient",t.repeatingLinearGradient,l)||r("radial-gradient",t.radialGradient,p)||r("repeating-radial-gradient",t.repeatingRadialGradient,p)}function r(c,g,y){return s(g,function(v){var at=y();return at&&(k(t.comma)||e("Missing comma before color stops")),{type:c,orientation:at,colorStops:b(A)}})}function s(c,g){var y=k(c);if(y){k(t.startCall)||e("Missing (");var v=g(y);return k(t.endCall)||e("Missing )"),v}}function l(){return f()||d()}function f(){return L("directional",t.sideOrCorner,1)}function d(){return L("angular",t.angleValue,1)}function p(){var c,g=m(),y;return g&&(c=[],c.push(g),y=n,k(t.comma)&&(g=m(),g?c.push(g):n=y)),c}function m(){var c=u()||h();if(c)c.at=R();else{var g=S();if(g){c=g;var y=R();y&&(c.at=y)}else{var v=E();v&&(c={type:"default-radial",at:v})}}return c}function u(){var c=L("shape",/^(circle)/i,0);return c&&(c.style=ot()||S()),c}function h(){var c=L("shape",/^(ellipse)/i,0);return c&&(c.style=T()||S()),c}function S(){return L("extent-keyword",t.extentKeywords,1)}function R(){if(L("position",/^at/,0)){var c=E();return c||e("Missing positioning value"),c}}function E(){var c=_();if(c.x||c.y)return{type:"position",value:c}}function _(){return{x:T(),y:T()}}function b(c){var g=c(),y=[];if(g)for(y.push(g);k(t.comma);)g=c(),g?y.push(g):e("One extra comma");return y}function A(){var c=C();return c||e("Expected color definition"),c.length=T(),c}function C(){return O()||z()||G()||N()}function N(){return L("literal",t.literalColor,0)}function O(){return L("hex",t.hexColor,1)}function G(){return s(t.rgbColor,function(){return{type:"rgb",value:b(W)}})}function z(){return s(t.rgbaColor,function(){return{type:"rgba",value:b(W)}})}function W(){return k(t.number)[1]}function T(){return L("%",t.percentageValue,1)||w()||ot()}function w(){return L("position-keyword",t.positionKeywords,1)}function ot(){return L("px",t.pixelValue,1)||L("em",t.emValue,1)}function L(c,g,y){var v=k(g);if(v)return{type:c,value:v[y]}}function k(c){var g,y;return y=/^[\n\r\t\s]+/.exec(n),y&&it(y[0].length),g=c.exec(n),g&&it(g[0].length),g}function it(c){n=n.substr(c)}return function(c){return n=c.toString(),i()}}();var bt=Q;function Ot(t){return t.type==="literal"?t.value:t.type==="hex"?`#${t.value}`:t.type==="rgb"?`rgb(${t.value.join(",")})`:t.type==="rgba"?`rgba(${t.value.join(",")})`:"transparent"}function tt({id:t,width:n},{image:e}){if(e.startsWith("linear-gradient(")){let i=bt.parse(e)[0],a,o,r,s;if(i.orientation.type==="directional")[a,o,r,s]={top:[0,1,0,0],bottom:[0,0,0,1],left:[1,0,0,0],right:[0,0,1,0]}[i.orientation.value];else if(i.orientation.type==="angular"){let u=+i.orientation.value/180*Math.PI-Math.PI/2,h=Math.cos(u),S=Math.sin(u);a=0,o=0,r=h,s=S,r<0&&(a-=r,r=0),s<0&&(o-=s,s=0)}let l=n,f=[];for(let u of i.colorStops){let h=Ot(u);if(!f.length&&(f.push({offset:0,color:h}),typeof u.length=="undefined"||u.length.value==="0"))continue;let S=typeof u.length=="undefined"?void 0:u.length.type==="%"?u.length.value/100:u.length.value/l;f.push({offset:S,color:h})}f.length||f.push({offset:0,color:"transparent"});let d=f[f.length-1];d.offset!==1&&(typeof d.offset=="undefined"?d.offset=1:f.push({offset:1,color:d.color}));let p=0,m=1;for(let u=0;u<f.length;u++)if(typeof f[u].offset=="undefined"){for(m<u&&(m=u);typeof f[m].offset=="undefined";)m++;f[u].offset=(f[m].offset-f[p].offset)/(m-p)*(u-p)+f[p].offset}else p=u;return[`satori_bi${t}`,`<linearGradient id="satori_bi${t}" x1="${a}" y1="${o}" x2="${r}" y2="${s}">${f.map(u=>`<stop offset="${u.offset*100}%" stop-color="${u.color}"/>`).join("")}</linearGradient>`]}if(e.startsWith("url(")){let i=e.slice(4,-1);return[`satori_bi${t}`,`<pattern id="satori_bi${t}" patternContentUnits="objectBoundingBox" width="1" height="1"><image href="${i}" x="0" y="0" width="1" height="1"/></pattern>`]}}function H(t,n,e){return e<t+n&&(e/2<t&&e/2<n?t=n=e/2:e/2<t?t=e-n:e/2<n&&(n=e-t)),[t,n]}function M({left:t,top:n,width:e,height:i},a){let{borderTopLeftRadius:o,borderTopRightRadius:r,borderBottomLeftRadius:s,borderBottomRightRadius:l}=a;return o=Math.min(o||0,e,i),r=Math.min(r||0,e,i),s=Math.min(s||0,e,i),l=Math.min(l||0,e,i),!o&&!r&&!s&&!l?"":([o,r]=H(o,r,e),[o,s]=H(o,s,i),[r,l]=H(r,l,i),[s,l]=H(s,l,e),`M${t+o},${n} h${e-o-r} a${r},${r} 0 0 1 ${r},${r} v${i-r-l} a${l},${l} 0 0 1 ${-l},${l} h${l+s-e} a${s},${s} 0 0 1 ${-s},${-s} v${s+o-i} a${o},${o} 0 0 1 ${o},${-o}`)}function Y({id:t,width:n,height:e},i){if(!i.shadowColor||!i.shadowOffset||typeof i.shadowRadius=="undefined")return"";let a=Math.min(i.shadowOffset.width-i.shadowRadius*2,0),o=Math.max(i.shadowOffset.width+i.shadowRadius*2+n,n),r=Math.min(i.shadowOffset.height-i.shadowRadius*2,0),s=Math.max(i.shadowOffset.height+i.shadowRadius*2+e,e);return`<defs><filter id="satori_s-${t}" x="${a/n*100}%" y="${r/e*100}%" width="${(o-a)/n*100}%" height="${(s-r)/e*100}%"><feDropShadow dx="${i.shadowOffset.width}" dy="${i.shadowOffset.height}" stdDeviation="${i.shadowRadius}" flood-color="${i.shadowColor}" flood-opacity="1"/></filter></defs>`}function et({id:t,left:n,top:e,width:i,height:a,isInheritingTransform:o,debug:r},s){if(s.display==="none")return"";let l="rect",f="transparent",d=0,p="",m="",u=[],h=1,S="";if(s.backgroundColor&&u.push(s.backgroundColor),s.borderWidth&&(d=s.borderWidth,f=s.borderColor),s.opacity&&(h=+s.opacity),s.transform&&(p=D({left:n,top:e,width:i,height:a},s.transform,o)),s.backgroundImage){let _=s.backgroundImage.map((b,A)=>tt({id:t+"_"+A,width:i,height:a},b)).filter(Boolean);for(let b of _)m+=b[1],u.push(`url(#${b[0]})`)}let R=M({left:n,top:e,width:i,height:a},s);R&&(l="path");let E=Y({width:i,height:a,id:t},s);return u.length||u.push("transparent"),r&&(S=`<rect x="${n}" y="${e}" width="${i}" height="${a}" fill="transparent" stroke="#ff5757" stroke-width="1" ${p?`transform="${p}"`:""}></rect>`),`${m?`<defs>${m}</defs>`:""}${E?`${E}<g filter="url(#satori_s-${t})">`:""}${h!==1?`<g opacity="${h}">`:""}${u.map((_,b)=>_==="transparent"&&!(b===u.length-1&&d)?"":`<${l} x="${n}" y="${e}" width="${i}" height="${a}" fill="${_}" ${b===u.length-1&&d?`stroke="${f}" stroke-width="${d}"`:""} ${R?`d="${R}"`:""} ${p?`transform="${p}"`:""}></${l}>`).join("")}${h!==1?"</g>":""}${E?"</g>":""}${S}`}function rt({id:t,left:n,top:e,width:i,height:a,src:o,debug:r},s){if(s.display==="none")return"";let l="",f=1,d=s.objectFit==="contain"?"xMidYMid":s.objectFit==="cover"?"xMidYMid slice":"none",p=M({left:n,top:e,width:i,height:a},s);p&&(l=`<clipPath id="satori_c-${t}"><path x="${n}" y="${e}" width="${i}" height="${a}" d="${p}"></path></clipPath>`),s.opacity&&(f=+s.opacity);let m=Y({width:i,height:a,id:t},s);return`${m}${m?`<g filter="url(#satori_s-${t})">`:""}${l}<image href="${o}" x="${n}" y="${e}" width="${i}" height="${a}" preserveAspectRatio="${d}" ${l?`clip-path="url(#satori_c-${t})"`:""} ${f!==1?`opacity="${f}"`:""}></image>${m?"</g>":""}`}function*X(t,n){let e=F(),{id:i,inheritedStyle:a,parent:o,font:r,debug:s,embedFont:l=!0}=n;if(t===null||typeof t=="undefined")return yield,"";if(!J(t)||typeof t.type=="function"){let T;if(!J(t))T=Z(String(t),n);else{if(ct(t.type))throw new Error("Class component is not supported.");T=X(t.type(t.props),n)}T.next();let w=yield;return T.next(w).value}let{type:f,props:d}=t,{style:p,children:m}=d,u=e.Node.create();o.insertChild(u,o.getChildCount());let[h,S]=K(u,f,a,p,d),R=h.transform===a.transform;R||(h.transform.__parent=a.transform);let E=typeof m=="undefined"?[]:[].concat(m),_=[],b=0;for(let T of E){let w=X(T,{id:i*E.length+ ++b,parentStyle:h,inheritedStyle:S,isInheritingTransform:!0,parent:u,font:r,embedFont:l,debug:s});w.next(),_.push(w)}let[A,C]=yield;h.position==="absolute"&&u.calculateLayout();let{left:N,top:O,width:G,height:z}=u.getComputedLayout();N+=A,O+=C;let W="";f==="img"?W=rt({id:i,left:N,top:O,width:G,height:z,src:d.src,isInheritingTransform:R,debug:s},h):W=et({id:i,left:N,top:O,width:G,height:z,isInheritingTransform:R,debug:s},h);for(let T of _)W+=T.next([N,O]).value;return W}import yt from"opentype.js";var V=class{constructor(n){this.fonts=new Map;for(let e of n){let i=e.data,a="buffer"in i?yt.parse(i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength)):yt.parse(i);this.defaultFont||(this.defaultFont=a),this.fonts.has(e.name)||this.fonts.set(e.name,[]),this.fonts.get(e.name).push([a,e.weight,e.style])}}get({name:n,weight:e,style:i}){if(!this.fonts.has(n))return this.defaultFont;e==="normal"&&(e=400),e==="bold"&&(e=700);let a=[...this.fonts.get(n)];return a.sort(([o,r,s],[l,f,d])=>{if(r!==f)return r?!f||r===e?-1:f===e?1:e===400&&r===500||e===500&&r===400?-1:e===400&&f===500||e===500&&f===400?1:e<400?r<e&&f<e?f-r:r<e?-1:f<e?1:r-f:e<r&&e<f?r-f:e<r?-1:e<f?1:f-r:1;if(s!==d){if(s===i)return-1;if(d===i)return 1}return-1}),a[0][0]}getFont({fontFamily:n,fontWeight:e=400,fontStyle:i="normal"}){return this.get({name:n,weight:e,style:i})}measure(n,e,{fontSize:i,letterSpacing:a=0}){return{width:n.getAdvanceWidth(e,i,{letterSpacing:a/i}),ascent:n.ascender/n.unitsPerEm*i,descent:-(n.descender/n.unitsPerEm)*i}}getSVG(n,e,{fontSize:i,top:a,left:o,letterSpacing:r=0}){return a+=n.ascender/n.unitsPerEm*i,n.getPath(e,o,a,i,{letterSpacing:r/i}).toPathData(2)}getAscent(n,{fontSize:e}){return n.ascender/n.unitsPerEm*e}};function nt({width:t,height:n,content:e},i){return`<svg width="${t}" height="${n}" viewBox="0 0 ${t} ${n}" xmlns="http://www.w3.org/2000/svg">${e}</svg>`}function Et(t,n){let e=F();if(!e)throw new Error("Satori is not initialized.");let i=new V(n.fonts),a=e.Node.create();a.setWidth(n.width),a.setHeight(n.height),a.setFlexDirection(e.FLEX_DIRECTION_ROW),a.setFlexWrap(e.WRAP_WRAP),a.setAlignContent(e.ALIGN_AUTO),a.setAlignItems(e.ALIGN_FLEX_START),a.setJustifyContent(e.JUSTIFY_FLEX_START);let o=X(t,{id:1,parentStyle:{},inheritedStyle:{fontSize:16,fontWeight:"normal",fontFamily:"serif",fontStyle:"normal",lineHeight:1.2,color:"black",opacity:1},parent:a,font:i,embedFont:n.embedFont,debug:n.debug});o.next(),a.calculateLayout(n.width,n.height,e.DIRECTION_LTR);let r=o.next([0,0]).value;return nt({width:n.width,height:n.height,content:r})}export{Et as default,Tt as init};
var Et=Object.defineProperty,xt=Object.defineProperties;var St=Object.getOwnPropertyDescriptors;var st=Object.getOwnPropertySymbols;var _t=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable;var ft=(t,o,r)=>o in t?Et(t,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[o]=r,M=(t,o)=>{for(var r in o||(o={}))_t.call(o,r)&&ft(t,r,o[r]);if(st)for(var r of st(o))Rt.call(o,r)&&ft(t,r,o[r]);return t},ut=(t,o)=>xt(t,St(o));var lt;function Tt(t){lt=t}function k(){return lt}function j(t){let o=typeof t;return!(o==="number"||o==="bigint"||o==="string"||o==="boolean")}function ct(t){return/^class\s/.test(Function.prototype.toString.call(t))}function Y(t,o){return[t[0]*o[0]+t[2]*o[1],t[1]*o[0]+t[3]*o[1],t[0]*o[2]+t[2]*o[3],t[1]*o[2]+t[3]*o[3],t[0]*o[4]+t[2]*o[5]+t[4],t[1]*o[4]+t[3]*o[5]+t[5]]}function C(t,o,r){let i=o[t];return typeof i=="undefined"?r:i}var mt={p:{display:"block",marginTop:"1em",marginBottom:"1em"},div:{display:"block"},blockquote:{display:"block",marginTop:"1em",marginBottom:"1em",marginLeft:40,marginRight:40},center:{display:"block",textAlign:"center"},hr:{display:"block",marginTop:"0.5em",marginBottom:"0.5em",marginLeft:"auto",marginRight:"auto",borderWidth:1,borderStyle:"inset"},h1:{display:"block",fontSize:"2em",marginTop:"0.67em",marginBottom:"0.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h2:{display:"block",fontSize:"1.5em",marginTop:"0.83em",marginBottom:"0.83em",marginLeft:0,marginRight:0,fontWeight:"bold"},h3:{display:"block",fontSize:"1.17em",marginTop:"1em",marginBottom:"1em",marginLeft:0,marginRight:0,fontWeight:"bold"},h4:{display:"block",marginTop:"1.33em",marginBottom:"1.33em",marginLeft:0,marginRight:0,fontWeight:"bold"},h5:{display:"block",fontSize:"0.83em",marginTop:"1.67em",marginBottom:"1.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h6:{display:"block",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:"block",fontFamily:"monospace",whiteSpace:"pre",marginTop:"1em",marginBottom:"1em"},mark:{backgroundColor:"yellow",color:"black"},big:{fontSize:"larger"},small:{fontSize:"smaller"},s:{textDecoration:"line-through"}};var It=new Set(["color","font","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","textAlign","textTransform","whiteSpace","letterSpacing","transform","wordBreak","textShadowOffset","textShadowColor","textShadowRadius","opacity"]);function K(t){let o={};for(let r in t)It.has(r)&&(o[r]=t[r]);return o}import{getPropertyName as dt,getStylesForProperty as Lt}from"css-to-react-native";import ht from"parse-css-dimension";import{parseElementStyle as At}from"css-background-parser";var Ft=new Set(["flex","flexGrow","flexShrink","flexBasis","fontWeight","lineHeight","opacity","scale","scaleX","scaleY"]),pt=[1,0,0,1,0,0];function Ct(t,o){return typeof o=="number"?Ft.has(t)?String(o):o+"px":o}function gt(t,o){if(typeof t=="number")return t;try{let r=new ht(t);if(r.type==="length")switch(r.unit){case"em":return r.value*o;case"rem":return r.value*16;default:return r.value}else if(r.type==="angle")switch(r.unit){case"deg":return r.value;case"rad":return r.value*180/Math.PI;default:return r.value}}catch{}}function H(t,o){let r=[];for(let n in t){let e=dt(n);r.push([e,Ct(e,t[n])])}let i=r.reduce((n,e)=>{let a=dt(e[0]),c=e[1];return Object.assign(n,Lt(a,c,!0))},{});if(i.backgroundImage){let{backgrounds:n}=At(i);i.backgroundImage=n}let s=i.fontSize||o.fontSize;if(typeof s=="string")try{let n=new ht(s);switch(n.unit){case"em":s=n.value*o.fontSize;break;case"rem":s=n.value*16;break}}catch{s=16}i.fontSize=s;for(let n in i){let e=i[n];if(typeof e=="string"){let a=gt(e,s);typeof a!="undefined"&&(i[n]=a),e=i[n]}if(n==="opacity"&&(e=i[n]=e*o.opacity),n==="transform"){let a=[...pt],c=e;for(let u of c){let g=Object.keys(u)[0],m=u[g],d=typeof m=="string"?gt(m,s):m,f=[...pt];switch(g){case"translateX":f[4]=d;break;case"translateY":f[5]=d;break;case"scaleX":f[0]=d;break;case"scaleY":f[3]=d;break;case"rotate":let h=d*Math.PI/180,b=Math.cos(h),R=Math.sin(h);f[0]=b,f[1]=R,f[2]=-R,f[3]=b;break;case"skewX":f[2]=Math.tan(d*Math.PI/180);break;case"skewY":f[1]=Math.tan(d*Math.PI/180);break}a=Y(f,a)}i.transform=a}}return i}function q(t,o,r,i,s){let n=k(),e=M(M(M({},r),H(mt[o],r)),H(i,r));if(o==="img"){let a=parseInt(s.width),u=parseInt(s.height)/a;e.width||(e.width=a),e.height||(e.height=u*e.width)}return t.setDisplay(C(e.display,{flex:n.DISPLAY_FLEX,none:n.DISPLAY_NONE},n.DISPLAY_FLEX)),t.setAlignContent(C(e.alignContent,{stretch:n.ALIGN_STRETCH,center:n.ALIGN_CENTER,"flex-start":n.ALIGN_FLEX_START,"flex-end":n.ALIGN_FLEX_END,"space-between":n.ALIGN_SPACE_BETWEEN,"space-around":n.ALIGN_SPACE_AROUND,baseline:n.ALIGN_BASELINE,normal:n.ALIGN_AUTO},n.ALIGN_AUTO)),t.setAlignItems(C(e.alignItems,{stretch:n.ALIGN_STRETCH,center:n.ALIGN_CENTER,"flex-start":n.ALIGN_FLEX_START,"flex-end":n.ALIGN_FLEX_END,baseline:n.ALIGN_BASELINE,normal:n.ALIGN_AUTO},n.ALIGN_FLEX_START)),t.setAlignSelf(C(e.alignSelf,{stretch:n.ALIGN_STRETCH,center:n.ALIGN_CENTER,"flex-start":n.ALIGN_FLEX_START,"flex-end":n.ALIGN_FLEX_END,baseline:n.ALIGN_BASELINE,normal:n.ALIGN_AUTO},n.ALIGN_AUTO)),t.setJustifyContent(C(e.justifyContent,{center:n.JUSTIFY_CENTER,"flex-start":n.JUSTIFY_FLEX_START,"flex-end":n.JUSTIFY_FLEX_END,"space-between":n.JUSTIFY_SPACE_BETWEEN,"space-around":n.JUSTIFY_SPACE_AROUND},n.JUSTIFY_FLEX_START)),t.setFlexDirection(C(e.flexDirection,{row:n.FLEX_DIRECTION_ROW,column:n.FLEX_DIRECTION_COLUMN,"row-reverse":n.FLEX_DIRECTION_ROW_REVERSE,"column-reverse":n.FLEX_DIRECTION_COLUMN_REVERSE},n.FLEX_DIRECTION_ROW)),t.setFlexWrap(C(e.flexWrap,{wrap:n.WRAP_WRAP,nowrap:n.WRAP_NO_WRAP,"wrap-reverse":n.WRAP_WRAP_REVERSE},n.WRAP_WRAP)),typeof e.flexBasis!="undefined"&&t.setFlexBasis(e.flexBasis),t.setFlexGrow(typeof e.flexGrow=="undefined"?0:e.flexGrow),t.setFlexShrink(typeof e.flexShrink=="undefined"?1:e.flexShrink),typeof e.maxHeight!="undefined"&&t.setMaxHeight(e.maxHeight),typeof e.maxWidth!="undefined"&&t.setMaxWidth(e.maxWidth),typeof e.minHeight!="undefined"&&t.setMinHeight(e.minHeight),typeof e.minWidth!="undefined"&&t.setMinWidth(e.minWidth),t.setOverflow(C(e.overflow,{visible:n.OVERFLOW_VISIBLE,hidden:n.OVERFLOW_HIDDEN},n.OVERFLOW_VISIBLE)),t.setMargin(n.EDGE_TOP,e.marginTop||0),t.setMargin(n.EDGE_BOTTOM,e.marginBottom||0),t.setMargin(n.EDGE_LEFT,e.marginLeft||0),t.setMargin(n.EDGE_RIGHT,e.marginRight||0),t.setBorder(n.EDGE_TOP,e.borderWidth||0),t.setBorder(n.EDGE_BOTTOM,e.borderWidth||0),t.setBorder(n.EDGE_LEFT,e.borderWidth||0),t.setBorder(n.EDGE_RIGHT,e.borderWidth||0),t.setPadding(n.EDGE_TOP,e.paddingTop||0),t.setPadding(n.EDGE_BOTTOM,e.paddingBottom||0),t.setPadding(n.EDGE_LEFT,e.paddingLeft||0),t.setPadding(n.EDGE_RIGHT,e.paddingRight||0),t.setPositionType(C(e.position,{absolute:n.POSITION_TYPE_ABSOLUTE,relative:n.POSITION_TYPE_RELATIVE},n.POSITION_TYPE_RELATIVE)),typeof e.top!="undefined"&&t.setPosition(n.EDGE_TOP,e.top),typeof e.bottom!="undefined"&&t.setPosition(n.EDGE_BOTTOM,e.bottom),typeof e.left!="undefined"&&t.setPosition(n.EDGE_LEFT,e.left),typeof e.right!="undefined"&&t.setPosition(n.EDGE_RIGHT,e.right),typeof e.height!="undefined"?t.setHeight(e.height):t.setHeightAuto(),typeof e.width!="undefined"?t.setWidth(e.width):t.setWidthAuto(),[e,K(e)]}function z({left:t,top:o,width:r,height:i},s,n){let e;if(n)e=s;else{let a=t+r/2,c=o+i/2;e=Y([1,0,0,1,a,c],Y(s,[1,0,0,1,-a,-c])),s.__parent&&(e=Y(s.__parent,e)),s.splice(0,6,...e)}return`matrix(${e.map(a=>a.toFixed(2)).join(",")})`}function Z({id:t,content:o,filter:r,left:i,top:s,width:n,height:e,isInheritingTransform:a,path:c,image:u,debug:g},m){let d="",f=1,h="";return m.transform&&(d=z({left:i,top:s,width:n,height:e},m.transform,a)),m.opacity&&(f=+m.opacity),g&&(h=`<rect x="${i}" y="${s}" width="${n}" height="${c===null?.5:e}" fill="transparent" stroke="#575eff" stroke-width="1" ${d?`transform="${d}"`:""}></rect>`),u?`${r?`${r}<g filter="url(#satori_s-${t})">`:""}<image href="${u}" x="${i}" y="${s}" width="${n}" height="${e}" ${d?`transform="${d}"`:""} ${f!==1?`opacity="${f}"`:""}></image>${r?"</g>":""}${h}`:c===null?`${r?`${r}<g filter="url(#satori_s-${t})">`:""}<text x="${i}" y="${s}" width="${n}" height="${e}" fill="${m.color}" font-weight="${m.fontWeight}" font-style="${m.fontStyle}" font-size="${m.fontSize}" font-family="${m.fontFamily}" ${m.letterSpacing?`letter-spacing="${m.letterSpacing}"`:""} ${d?`transform="${d}"`:""} ${f!==1?`opacity="${f}"`:""}>${o}</text>${r?"</g>":""}${h}`:`${r?`${r}<g filter="url(#satori_s-${t})">`:""}<path fill="${m.color}" ${d?`transform="${d}"`:""} ${f!==1?`opacity="${f}"`:""} d="${c}"></path>${r?"</g>":""}${h}`}function D({id:t,width:o,height:r},i){if(!i.shadowColor||!i.shadowOffset||typeof i.shadowRadius=="undefined")return"";let s=i.shadowRadius*i.shadowRadius/4,n=Math.min(i.shadowOffset.width-s,0),e=Math.max(i.shadowOffset.width+s+o,o),a=Math.min(i.shadowOffset.height-s,0),c=Math.max(i.shadowOffset.height+s+r,r);return`<defs><filter id="satori_s-${t}" x="${n/o*100}%" y="${a/r*100}%" width="${(e-n)/o*100}%" height="${(c-a)/r*100}%"><feDropShadow dx="${i.shadowOffset.width}" dy="${i.shadowOffset.height}" stdDeviation="${i.shadowRadius/2}" flood-color="${i.shadowColor}" flood-opacity="1"/></filter></defs>`}function*Q(t,o){let r=k(),i="en",s=new Intl.Segmenter(i,{granularity:"word"}),n=new Intl.Segmenter(i,{granularity:"grapheme"}),{parentStyle:e,parent:a,font:c,id:u,isInheritingTransform:g,debug:m,embedFont:d,graphemeImages:f}=o;e.textTransform==="uppercase"?t=t.toLocaleUpperCase(i):e.textTransform==="lowercase"?t=t.toLocaleLowerCase(i):e.textTransform==="capitalize"&&(t=[...s.segment(t)].map(T=>[...n.segment(T.segment)].map((I,$)=>$===0?I.segment.toLocaleUpperCase(i):I.segment).join("")).join(""));let b=[...C(e.wordBreak,{normal:s,"break-all":n,"break-word":n,"keep-all":s},s).segment(t)].map(T=>T.segment),R=[];a.setAlignItems(r.ALIGN_BASELINE),e.textAlign==="left"?a.setJustifyContent(r.JUSTIFY_FLEX_START):e.textAlign==="center"?a.setJustifyContent(r.JUSTIFY_CENTER):e.textAlign==="right"?a.setJustifyContent(r.JUSTIFY_FLEX_END):e.textAlign==="justify"&&a.setJustifyContent(r.JUSTIFY_SPACE_BETWEEN);let S=c.getFont(e);for(let T of b){let I=r.Node.create();a.insertChild(I,a.getChildCount());let $;f&&f[T]?$={width:e.fontSize,ascent:S.ascender/S.unitsPerEm*e.fontSize,descent:-(S.descender/S.unitsPerEm)*e.fontSize}:$=c.measure(S,T,e),I.setWidth($.width),I.setHeight($.ascent*1.2),I.setMargin(r.EDGE_BOTTOM,$.descent*1.2),R.push(I)}let[O,_]=yield,G="";for(let T=0;T<R.length;T++){let I=R[T],$=b[T];e.position==="absolute"&&I.calculateLayout();let{left:N,top:v,width:W,height:F}=I.getComputedLayout();N+=O,v+=_;let A=null,w=null;f&&f[$]?w=f[$]:d?A=c.getSVG(S,$,ut(M({},e),{top:v,left:N,letterSpacing:e.letterSpacing})):v+=c.getAscent(S,e);let L="";e.textShadowOffset&&(L=D({width:W,height:F,id:u},{shadowColor:e.textShadowColor,shadowOffset:e.textShadowOffset,shadowRadius:e.textShadowRadius})),G+=Z({content:$,filter:L,id:u,left:N,top:v,width:W,height:F,isInheritingTransform:g,path:A,image:w,debug:m},e)}return G}var tt=tt||{};tt.parse=function(){var t={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/,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]+\.?))/},o="";function r(l){var p=new Error(o+": "+l);throw p.source=o,p}function i(){var l=s();return o.length>0&&r("Invalid input not EOF"),l}function s(){return _(n)}function n(){return e("linear-gradient",t.linearGradient,c)||e("repeating-linear-gradient",t.repeatingLinearGradient,c)||e("radial-gradient",t.radialGradient,m)||e("repeating-radial-gradient",t.repeatingRadialGradient,m)}function e(l,p,y){return a(p,function(B){var at=y();return at&&(P(t.comma)||r("Missing comma before color stops")),{type:l,orientation:at,colorStops:_(G)}})}function a(l,p){var y=P(l);if(y){P(t.startCall)||r("Missing (");var B=p(y);return P(t.endCall)||r("Missing )"),B}}function c(){return u()||g()}function u(){return L("directional",t.sideOrCorner,1)}function g(){return L("angular",t.angleValue,1)}function m(){var l,p=d(),y;return p&&(l=[],l.push(p),y=o,P(t.comma)&&(p=d(),p?l.push(p):o=y)),l}function d(){var l=f()||h();if(l)l.at=R();else{var p=b();if(p){l=p;var y=R();y&&(l.at=y)}else{var B=S();B&&(l={type:"default-radial",at:B})}}return l}function f(){var l=L("shape",/^(circle)/i,0);return l&&(l.style=w()||b()),l}function h(){var l=L("shape",/^(ellipse)/i,0);return l&&(l.style=F()||b()),l}function b(){return L("extent-keyword",t.extentKeywords,1)}function R(){if(L("position",/^at/,0)){var l=S();return l||r("Missing positioning value"),l}}function S(){var l=O();if(l.x||l.y)return{type:"position",value:l}}function O(){return{x:F(),y:F()}}function _(l){var p=l(),y=[];if(p)for(y.push(p);P(t.comma);)p=l(),p?y.push(p):r("One extra comma");return y}function G(){var l=T();return l||r("Expected color definition"),l.length=F(),l}function T(){return $()||v()||N()||I()}function I(){return L("literal",t.literalColor,0)}function $(){return L("hex",t.hexColor,1)}function N(){return a(t.rgbColor,function(){return{type:"rgb",value:_(W)}})}function v(){return a(t.rgbaColor,function(){return{type:"rgba",value:_(W)}})}function W(){return P(t.number)[1]}function F(){return L("%",t.percentageValue,1)||A()||w()}function A(){return L("position-keyword",t.positionKeywords,1)}function w(){return L("px",t.pixelValue,1)||L("em",t.emValue,1)}function L(l,p,y){var B=P(p);if(B)return{type:l,value:B[y]}}function P(l){var p,y;return y=/^[\n\r\t\s]+/.exec(o),y&&it(y[0].length),p=l.exec(o),p&&it(p[0].length),p}function it(l){o=o.substr(l)}return function(l){return o=l.toString(),i()}}();var bt=tt;function Ot(t){return t.type==="literal"?t.value:t.type==="hex"?`#${t.value}`:t.type==="rgb"?`rgb(${t.value.join(",")})`:t.type==="rgba"?`rgba(${t.value.join(",")})`:"transparent"}function et({id:t,width:o},{image:r}){if(r.startsWith("linear-gradient(")){let i=bt.parse(r)[0],s,n,e,a;if(i.orientation.type==="directional")[s,n,e,a]={top:[0,1,0,0],bottom:[0,0,0,1],left:[1,0,0,0],right:[0,0,1,0]}[i.orientation.value];else if(i.orientation.type==="angular"){let f=+i.orientation.value/180*Math.PI-Math.PI/2,h=Math.cos(f),b=Math.sin(f);s=0,n=0,e=h,a=b,e<0&&(s-=e,e=0),a<0&&(n-=a,a=0)}let c=o,u=[];for(let f of i.colorStops){let h=Ot(f);if(!u.length&&(u.push({offset:0,color:h}),typeof f.length=="undefined"||f.length.value==="0"))continue;let b=typeof f.length=="undefined"?void 0:f.length.type==="%"?f.length.value/100:f.length.value/c;u.push({offset:b,color:h})}u.length||u.push({offset:0,color:"transparent"});let g=u[u.length-1];g.offset!==1&&(typeof g.offset=="undefined"?g.offset=1:u.push({offset:1,color:g.color}));let m=0,d=1;for(let f=0;f<u.length;f++)if(typeof u[f].offset=="undefined"){for(d<f&&(d=f);typeof u[d].offset=="undefined";)d++;u[f].offset=(u[d].offset-u[m].offset)/(d-m)*(f-m)+u[m].offset}else m=f;return[`satori_bi${t}`,`<linearGradient id="satori_bi${t}" x1="${s}" y1="${n}" x2="${e}" y2="${a}">${u.map(f=>`<stop offset="${f.offset*100}%" stop-color="${f.color}"/>`).join("")}</linearGradient>`]}if(r.startsWith("url(")){let i=r.slice(4,-1);return[`satori_bi${t}`,`<pattern id="satori_bi${t}" patternContentUnits="objectBoundingBox" width="1" height="1"><image href="${i}" x="0" y="0" width="1" height="1"/></pattern>`]}}function V(t,o,r){return r<t+o&&(r/2<t&&r/2<o?t=o=r/2:r/2<t?t=r-o:r/2<o&&(o=r-t)),[t,o]}function X({left:t,top:o,width:r,height:i},s){let{borderTopLeftRadius:n,borderTopRightRadius:e,borderBottomLeftRadius:a,borderBottomRightRadius:c}=s;return n=Math.min(n||0,r,i),e=Math.min(e||0,r,i),a=Math.min(a||0,r,i),c=Math.min(c||0,r,i),!n&&!e&&!a&&!c?"":([n,e]=V(n,e,r),[n,a]=V(n,a,i),[e,c]=V(e,c,i),[a,c]=V(a,c,r),`M${t+n},${o} h${r-n-e} a${e},${e} 0 0 1 ${e},${e} v${i-e-c} a${c},${c} 0 0 1 ${-c},${c} h${c+a-r} a${a},${a} 0 0 1 ${-a},${-a} v${a+n-i} a${n},${n} 0 0 1 ${n},${-n}`)}function rt({id:t,left:o,top:r,width:i,height:s,isInheritingTransform:n,debug:e},a){if(a.display==="none")return"";let c="rect",u="transparent",g=0,m="",d="",f=[],h=1,b="";if(a.backgroundColor&&f.push(a.backgroundColor),a.borderWidth&&(g=a.borderWidth,u=a.borderColor),a.opacity&&(h=+a.opacity),a.transform&&(m=z({left:o,top:r,width:i,height:s},a.transform,n)),a.backgroundImage){let O=a.backgroundImage.map((_,G)=>et({id:t+"_"+G,width:i,height:s},_)).filter(Boolean);for(let _ of O)d+=_[1],f.push(`url(#${_[0]})`)}let R=X({left:o,top:r,width:i,height:s},a);R&&(c="path");let S=D({width:i,height:s,id:t},a);return f.length||f.push("transparent"),e&&(b=`<rect x="${o}" y="${r}" width="${i}" height="${s}" fill="transparent" stroke="#ff5757" stroke-width="1" ${m?`transform="${m}"`:""}></rect>`),`${d?`<defs>${d}</defs>`:""}${S?`${S}<g filter="url(#satori_s-${t})">`:""}${h!==1?`<g opacity="${h}">`:""}${f.map((O,_)=>O==="transparent"&&!(_===f.length-1&&g)?"":`<${c} x="${o}" y="${r}" width="${i}" height="${s}" fill="${O}" ${_===f.length-1&&g?`stroke="${u}" stroke-width="${g}"`:""} ${R?`d="${R}"`:""} ${m?`transform="${m}"`:""}></${c}>`).join("")}${h!==1?"</g>":""}${S?"</g>":""}${b}`}function nt({id:t,left:o,top:r,width:i,height:s,src:n,debug:e},a){if(a.display==="none")return"";let c="",u=1,g=a.objectFit==="contain"?"xMidYMid":a.objectFit==="cover"?"xMidYMid slice":"none",m=X({left:o,top:r,width:i,height:s},a);m&&(c=`<clipPath id="satori_c-${t}"><path x="${o}" y="${r}" width="${i}" height="${s}" d="${m}"></path></clipPath>`),a.opacity&&(u=+a.opacity);let d=D({width:i,height:s,id:t},a);return`${d}${d?`<g filter="url(#satori_s-${t})">`:""}${c}<image href="${n}" x="${o}" y="${r}" width="${i}" height="${s}" preserveAspectRatio="${g}" ${c?`clip-path="url(#satori_c-${t})"`:""} ${u!==1?`opacity="${u}"`:""}></image>${d?"</g>":""}`}function*U(t,o){let r=k(),{id:i,inheritedStyle:s,parent:n,font:e,debug:a,embedFont:c=!0,graphemeImages:u}=o;if(t===null||typeof t=="undefined")return yield,"";if(!j(t)||typeof t.type=="function"){let A;if(!j(t))A=Q(String(t),o);else{if(ct(t.type))throw new Error("Class component is not supported.");A=U(t.type(t.props),o)}A.next();let w=yield;return A.next(w).value}let{type:g,props:m}=t,{style:d,children:f}=m,h=r.Node.create();n.insertChild(h,n.getChildCount());let[b,R]=q(h,g,s,d,m),S=b.transform===s.transform;S||(b.transform.__parent=s.transform);let O=typeof f=="undefined"?[]:[].concat(f),_=[],G=0;for(let A of O){let w=U(A,{id:i*O.length+ ++G,parentStyle:b,inheritedStyle:R,isInheritingTransform:!0,parent:h,font:e,embedFont:c,debug:a,graphemeImages:u});w.next(),_.push(w)}let[T,I]=yield;b.position==="absolute"&&h.calculateLayout();let{left:$,top:N,width:v,height:W}=h.getComputedLayout();$+=T,N+=I;let F="";g==="img"?F=nt({id:i,left:$,top:N,width:v,height:W,src:m.src,isInheritingTransform:S,debug:a},b):F=rt({id:i,left:$,top:N,width:v,height:W,isInheritingTransform:S,debug:a},b);for(let A of _)F+=A.next([$,N]).value;return F}import yt from"opentype.js";var J=class{constructor(o){this.fonts=new Map;for(let r of o){let i=r.data,s="buffer"in i?yt.parse(i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength)):yt.parse(i);this.defaultFont||(this.defaultFont=s),this.fonts.has(r.name)||this.fonts.set(r.name,[]),this.fonts.get(r.name).push([s,r.weight,r.style])}}get({name:o,weight:r,style:i}){if(!this.fonts.has(o))return this.defaultFont;r==="normal"&&(r=400),r==="bold"&&(r=700);let s=[...this.fonts.get(o)];return s.sort(([n,e,a],[c,u,g])=>{if(e!==u)return e?!u||e===r?-1:u===r?1:r===400&&e===500||r===500&&e===400?-1:r===400&&u===500||r===500&&u===400?1:r<400?e<r&&u<r?u-e:e<r?-1:u<r?1:e-u:r<e&&r<u?e-u:r<e?-1:r<u?1:u-e:1;if(a!==g){if(a===i)return-1;if(g===i)return 1}return-1}),s[0][0]}getFont({fontFamily:o,fontWeight:r=400,fontStyle:i="normal"}){return this.get({name:o,weight:r,style:i})}measure(o,r,{fontSize:i,letterSpacing:s=0}){return{width:o.getAdvanceWidth(r,i,{letterSpacing:s/i}),ascent:o.ascender/o.unitsPerEm*i,descent:-(o.descender/o.unitsPerEm)*i}}getSVG(o,r,{fontSize:i,top:s,left:n,letterSpacing:e=0}){return s+=o.ascender/o.unitsPerEm*i,o.getPath(r,n,s,i,{letterSpacing:e/i}).toPathData(2)}getAscent(o,{fontSize:r}){return o.ascender/o.unitsPerEm*r}};function ot({width:t,height:o,content:r},i){return`<svg width="${t}" height="${o}" viewBox="0 0 ${t} ${o}" xmlns="http://www.w3.org/2000/svg">${r}</svg>`}function $t(t,o){let r=k();if(!r)throw new Error("Satori is not initialized.");let i=new J(o.fonts),s=r.Node.create();s.setWidth(o.width),s.setHeight(o.height),s.setFlexDirection(r.FLEX_DIRECTION_ROW),s.setFlexWrap(r.WRAP_WRAP),s.setAlignContent(r.ALIGN_AUTO),s.setAlignItems(r.ALIGN_FLEX_START),s.setJustifyContent(r.JUSTIFY_FLEX_START);let n=U(t,{id:1,parentStyle:{},inheritedStyle:{fontSize:16,fontWeight:"normal",fontFamily:"serif",fontStyle:"normal",lineHeight:1.2,color:"black",opacity:1},parent:s,font:i,embedFont:o.embedFont,debug:o.debug,graphemeImages:o.graphemeImages});n.next(),s.calculateLayout(o.width,o.height,r.DIRECTION_LTR);let e=n.next([0,0]).value;return ot({width:o.width,height:o.height,content:e})}export{$t as default,Tt as init};
//# sourceMappingURL=index.wasm.js.map

@@ -26,2 +26,3 @@ import { ReactNode } from 'react';

debug?: boolean;
graphemeImages?: Record<string, string>;
}

@@ -28,0 +29,0 @@

{
"name": "satori",
"version": "0.0.10",
"description": "A lightweight library to convert HTML JSX to SVG string.",
"version": "0.0.11",
"description": "Satori converts HTML JSX to SVG string.",
"module": "./dist/esm/index.js",

@@ -53,5 +53,3 @@ "types": "./dist/index.d.ts",

"css-background-parser": "^0.1.0",
"css-line-break": "^2.1.0",
"css-to-react-native": "^3.0.0",
"gradient-parser": "^1.0.2",
"opentype.js": "^1.3.4",

@@ -58,0 +56,0 @@ "parse-css-dimension": "^1.1.0",

@@ -87,3 +87,3 @@ <h1 align="center">

| `letter-spacing` | Supported |
| `box-shadow` | All supported except spread-radius (works like `drop-shadow`) |
| `box-shadow` | All supported except `spread-radius` and `inset` (works like `drop-shadow`) |
| `border-radius` | Supported |

@@ -98,2 +98,4 @@ | `overflow` | `visible`, `hidden` |

| `word-break` | Supported |
| `text-shadow` | Supported |
| `text-transform` | Support `lowercase`, `uppercase`, `capitalize` |
| `background-clip` | TBD |

@@ -105,4 +107,2 @@ | `background-size` | TBD |

| `text-decoration` | TBD |
| `text-shadow` | TBD |
| `text-transform` | TBD |
| `transform-origin` | TBD |

@@ -109,0 +109,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc