able-baker/bundled/preact/compat.js

4 lines
24 KiB
JavaScript
Raw Normal View History

2024-05-14 17:17:10 -04:00
///<reference types="https://esm.sh/v128/preact@10.20.2/compat/src/index.d.ts"/>
/* esm.sh - esbuild bundle(preact@10.20.2/compat) es2022 production */
var V,f,Se,st,R,Ce,xe,ee,oe,te,_e,Ne,L={},Pe=[],ct=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,q=Array.isArray;function P(e,t){for(var _ in t)e[_]=t[_];return e}function we(e){var t=e.parentNode;t&&t.removeChild(e)}function S(e,t,_){var n,r,o,i={};for(o in t)o=="key"?n=t[o]:o=="ref"?r=t[o]:i[o]=t[o];if(arguments.length>2&&(i.children=arguments.length>3?V.call(arguments,2):_),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)i[o]===void 0&&(i[o]=e.defaultProps[o]);return A(e,i,n,r,null)}function A(e,t,_,n,r){var o={type:e,props:t,key:_,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:r??++Se,__i:-1,__u:0};return r==null&&f.vnode!=null&&f.vnode(o),o}function ue(){return{current:null}}function x(e){return e.children}function k(e,t){this.props=e,this.context=t}function U(e,t){if(t==null)return e.__?U(e.__,e.__i+1):null;for(var _;t<e.__k.length;t++)if((_=e.__k[t])!=null&&_.__e!=null)return _.__e;return typeof e.type=="function"?U(e):null}function He(e){var t,_;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((_=e.__k[t])!=null&&_.__e!=null){e.__e=e.__c.base=_.__e;break}return He(e)}}function ne(e){(!e.__d&&(e.__d=!0)&&R.push(e)&&!j.__r++||Ce!==f.debounceRendering)&&((Ce=f.debounceRendering)||xe)(j)}function j(){var e,t,_,n,r,o,i,a;for(R.sort(ee);e=R.shift();)e.__d&&(t=R.length,n=void 0,o=(r=(_=e).__v).__e,i=[],a=[],_.__P&&((n=P({},r)).__v=r.__v+1,f.vnode&&f.vnode(n),ie(_.__P,n,r,_.__n,_.__P.ownerSVGElement!==void 0,32&r.__u?[o]:null,i,o??U(r),!!(32&r.__u),a),n.__v=r.__v,n.__.__k[n.__i]=n,De(i,n,a),n.__e!=o&&He(n)),R.length>t&&R.sort(ee));j.__r=0}function Re(e,t,_,n,r,o,i,a,s,l,p){var u,d,c,y,E,g=n&&n.__k||Pe,v=t.length;for(_.__d=s,ft(_,t,g),s=_.__d,u=0;u<v;u++)(c=_.__k[u])!=null&&typeof c!="boolean"&&typeof c!="function"&&(d=c.__i===-1?L:g[c.__i]||L,c.__i=u,ie(e,c,d,r,o,i,a,s,l,p),y=c.__e,c.ref&&d.ref!=c.ref&&(d.ref&&ae(d.ref,null,c),p.push(c.ref,c.__c||y,c)),E==null&&y!=null&&(E=y),65536&c.__u||d.__k===c.__k?(s&&!s.isConnected&&(s=U(d)),s=Ue(c,s,e)):typeof c.type=="function"&&c.__d!==void 0?s=c.__d:y&&(s=y.nextSibling),c.__d=void 0,c.__u&=-196609);_.__d=s,_.__e=E}function ft(e,t,_){var n,r,o,i,a,s=t.length,l=_.length,p=l,u=0;for(e.__k=[],n=0;n<s;n++)i=n+u,(r=e.__k[n]=(r=t[n])==null||typeof r=="boolean"||typeof r=="function"?null:typeof r=="string"||typeof r=="number"||typeof r=="bigint"||r.constructor==String?A(null,r,null,null,null):q(r)?A(x,{children:r},null,null,null):r.constructor===void 0&&r.__b>0?A(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)!=null?(r.__=e,r.__b=e.__b+1,a=pt(r,_,i,p),r.__i=a,o=null,a!==-1&&(p--,(o=_[a])&&(o.__u|=131072)),o==null||o.__v===null?(a==-1&&u--,typeof r.type!="function"&&(r.__u|=65536)):a!==i&&(a===i+1?u++:a>i?p>s-i?u+=a-i:u--:a<i?a==i-1&&(u=a-i):u=0,a!==n+u&&(r.__u|=65536))):(o=_[i])&&o.key==null&&o.__e&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=U(o)),re(o,o,!1),_[i]=null,p--);if(p)for(n=0;n<l;n++)(o=_[n])!=null&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=U(o)),re(o,o))}function Ue(e,t,_){var n,r;if(typeof e.type=="function"){for(n=e.__k,r=0;n&&r<n.length;r++)n[r]&&(n[r].__=e,t=Ue(n[r],t,_));return t}e.__e!=t&&(_.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function N(e,t){return t=t||[],e==null||typeof e=="boolean"||(q(e)?e.some(function(_){N(_,t)}):t.push(e)),t}function pt(e,t,_,n){var r=e.key,o=e.type,i=_-1,a=_+1,s=t[_];if(s===null||s&&r==s.key&&o===s.type&&!(131072&s.__u))return _;if(n>(s!=null&&!(131072&s.__u)?1:0))for(;i>=0||a<t.length;){if(i>=0){if((s=t[i])&&!(131072&s.__u)&&r==s.key&&o===s.type)return i;i--}if(a<t.length){if((s=t[a])&&!(131072&s.__u)&&r==s.key&&o===s.type)return a;a++}}return-1}function ke(e,t,_){t[0]==="-"?e.setProperty(t,_??""):e[t]=_==null?"":typeof _!="number"||ct.test(t)?_:_+"px"}function z(e,t,_,n,r){var o;e:if(t==="style")if(typeof _=="string")e.style.cssText=_;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)_&&t in _||ke(e.style,t,"");if(_)for(t in _)n&&_[t]===n[t]||ke(e.style,t,_[t])}el
//# sourceMappingURL=compat.bundle.js.map