able-baker/bundled/preact/jsx-runtime.js

8 lines
1.7 KiB
JavaScript
Raw Normal View History

2024-05-14 17:17:10 -04:00
/* esm.sh - esbuild bundle(preact@10.20.2/jsx-runtime) es2022 production */
import{options as c,Fragment as _}from"./compat.js";
import{Fragment as C}from"./compat.js";
var v=/["&<]/;function p(t){if(t.length===0||v.test(t)===!1)return t;for(var r=0,e=0,a="",o="";e<t.length;e++){switch(t.charCodeAt(e)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}e!==r&&(a+=t.slice(r,e)),a+=o,r=e+1}return e!==r&&(a+=t.slice(r,e)),a}var y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,d=0,x=Array.isArray;function g(t,r,e,a,o,i){var s,n,f={};for(n in r)n=="ref"?s=r[n]:f[n]=r[n];var u={type:t,props:f,key:e,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--d,__i:-1,__u:0,__source:o,__self:i};if(typeof t=="function"&&(s=t.defaultProps))for(n in s)f[n]===void 0&&(f[n]=s[n]);return c.vnode&&c.vnode(u),u}function h(t){var r=g(_,{tpl:t,exprs:[].slice.call(arguments,1)});return r.key=r.__v,r}var l={},m=/[A-Z]/g;function k(t,r){if(c.attr){var e=c.attr(t,r);if(typeof e=="string")return e}if(t==="ref"||t==="key")return"";if(t==="style"&&typeof r=="object"){var a="";for(var o in r){var i=r[o];if(i!=null&&i!==""){var s=o[0]=="-"?o:l[o]||(l[o]=o.replace(m,"-$&").toLowerCase()),n=";";typeof i!="number"||s.startsWith("--")||y.test(s)||(n="px;"),a=a+s+":"+i+n}}return t+'="'+a+'"'}return r==null||r===!1||typeof r=="function"||typeof r=="object"?"":r===!0?t:t+'="'+p(r)+'"'}function b(t){if(t==null||typeof t=="boolean"||typeof t=="function")return null;if(typeof t=="object"){if(t.constructor===void 0)return t;if(x(t)){for(var r=0;r<t.length;r++)t[r]=b(t[r]);return t}}return p(""+t)}
export{C as Fragment,g as jsx,k as jsxAttr,g as jsxDEV,b as jsxEscape,h as jsxTemplate,g as jsxs};