Notes2/static/js/lib/node_modules/preact/dist/preact.min.js
2026-05-15 08:22:43 +02:00

2 lines
11 KiB
JavaScript

!function(){var n,l,t,u,i,e,r,o,f,c,s,a,h,p,y="http://www.w3.org/2000/svg",v="http://www.w3.org/1999/xhtml",d=void 0,_={},m=[],w=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function b(n,l){for(var t in l)n[t]=l[t];return n}function k(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function C(l,t,u){var i,e,r,o={};for(r in t)"key"==r?i=t[r]:"ref"==r?e=t[r]:o[r]=t[r];if(arguments.length>2&&(o.children=arguments.length>3?n.call(arguments,2):u),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)o[r]===d&&(o[r]=l.defaultProps[r]);return x(l,o,i,e,null)}function x(n,u,i,e,r){var o={type:n,props:u,key:i,ref:e,__k:null,__:null,__b:0,__e:null,__c:null,constructor:d,__v:null==r?++t:r,__i:-1,__u:0};return null==r&&null!=l.vnode&&l.vnode(o),o}function S(n){return n.children}function M(n,l){this.props=n,this.context=l}function P(n,l){if(null==l)return n.__?P(n.__,n.__i+1):null;for(var t;l<n.__k.length;l++)if(null!=(t=n.__k[l])&&null!=t.__e)return t.__e;return"function"==typeof n.type?P(n):null}function $(n){var l,t;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(t=n.__k[l])&&null!=t.__e){n.__e=n.__c.base=t.__e;break}return $(n)}}function I(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!A.__r++||e!==l.debounceRendering)&&((e=l.debounceRendering)||r)(A)}function A(){var n,t,u,e,r,f,c,s;for(i.sort(o);n=i.shift();)n.__d&&(t=i.length,e=void 0,f=(r=(u=n).__v).__e,c=[],s=[],u.__P&&((e=b({},r)).__v=r.__v+1,l.vnode&&l.vnode(e),j(u.__P,e,r,u.__n,u.__P.namespaceURI,32&r.__u?[f]:null,c,null==f?P(r):f,!!(32&r.__u),s),e.__v=r.__v,e.__.__k[e.__i]=e,z(c,e,s),e.__e!=f&&$(e)),i.length>t&&i.sort(o));A.__r=0}function E(n,l,t,u,i,e,r,o,f,c,s){var a,h,p,y,v,w,g=u&&u.__k||m,b=l.length;for(f=F(t,l,g,f),a=0;a<b;a++)null!=(p=t.__k[a])&&(h=-1===p.__i?_:g[p.__i]||_,p.__i=a,w=j(n,p,h,i,e,r,o,f,c,s),y=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&R(h.ref,null,p),s.push(p.ref,p.__c||y,p)),null==v&&null!=y&&(v=y),4&p.__u||h.__k===p.__k?f=H(p,f,n):"function"==typeof p.type&&w!==d?f=w:y&&(f=y.nextSibling),p.__u&=-7);return t.__e=v,f}function F(n,l,t,u){var i,e,r,o,f,c=l.length,s=t.length,a=s,h=0;for(n.__k=[],i=0;i<c;i++)null!=(e=l[i])&&"boolean"!=typeof e&&"function"!=typeof e?(o=i+h,(e=n.__k[i]="string"==typeof e||"number"==typeof e||"bigint"==typeof e||e.constructor==String?x(null,e,null,null,null):g(e)?x(S,{children:e},null,null,null):e.constructor===d&&e.__b>0?x(e.type,e.props,e.key,e.ref?e.ref:null,e.__v):e).__=n,e.__b=n.__b+1,r=null,-1!==(f=e.__i=L(e,t,o,a))&&(a--,(r=t[f])&&(r.__u|=2)),null==r||null===r.__v?(-1==f&&h--,"function"!=typeof e.type&&(e.__u|=4)):f!==o&&(f==o-1?h--:f==o+1?h++:(f>o?h--:h++,e.__u|=4))):e=n.__k[i]=null;if(a)for(i=0;i<s;i++)null!=(r=t[i])&&0==(2&r.__u)&&(r.__e==u&&(u=P(r)),q(r,r));return u}function H(n,l,t){var u,i;if("function"==typeof n.type){for(u=n.__k,i=0;u&&i<u.length;i++)u[i]&&(u[i].__=n,l=H(u[i],l,t));return l}n.__e!=l&&(l&&n.type&&!t.contains(l)&&(l=P(n)),t.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8===l.nodeType);return l}function L(n,l,t,u){var i=n.key,e=n.type,r=t-1,o=t+1,f=l[t];if(null===f||f&&i==f.key&&e===f.type&&0==(2&f.__u))return t;if(("function"!=typeof e||e===S||i)&&u>(null!=f&&0==(2&f.__u)?1:0))for(;r>=0||o<l.length;){if(r>=0){if((f=l[r])&&0==(2&f.__u)&&i==f.key&&e===f.type)return r;r--}if(o<l.length){if((f=l[o])&&0==(2&f.__u)&&i==f.key&&e===f.type)return o;o++}}return-1}function T(n,l,t){"-"===l[0]?n.setProperty(l,null==t?"":t):n[l]=null==t?"":"number"!=typeof t||w.test(l)?t:t+"px"}function O(n,l,t,u,i){var e;n:if("style"===l)if("string"==typeof t)n.style.cssText=t;else{if("string"==typeof u&&(n.style.cssText=u=""),u)for(l in u)t&&l in t||T(n.style,l,"");if(t)for(l in t)u&&t[l]===u[l]||T(n.style,l,t[l])}else if("o"===l[0]&&"n"===l[1])e=l!==(l=l.replace(f,"$1")),l=l.toLowerCase()in n||"onFocusOut"===l||"onFocusIn"===l?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+e]=t,t?u?t.t=u.t:(t.t=c,n.addEventListener(l,e?a:s,e)):n.removeEventListener(l,e?a:s,e);else{if(i==y)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=l&&"height"!=l&&"href"!=l&&"list"!=l&&"form"!=l&&"tabIndex"!=l&&"download"!=l&&"rowSpan"!=l&&"colSpan"!=l&&"role"!=l&&"popover"!=l&&l in n)try{n[l]=null==t?"":t;break n}catch(n){}"function"==typeof t||(null==t||!1===t&&"-"!==l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==t?"":t))}}function V(n){return function(t){if(this.l){var u=this.l[t.type+n];if(null==t.u)t.u=c++;else if(t.u<u.t)return;return u(l.event?l.event(t):t)}}}function j(n,t,u,i,e,r,o,f,c,s){var a,h,p,y,v,_,m,w,C,x,P,$,I,A,F,H,L,T=t.type;if(t.constructor!==d)return null;128&u.__u&&(c=!!(32&u.__u),r=[f=t.__e=u.__e]),(a=l.__b)&&a(t);n:if("function"==typeof T)try{if(w=t.props,C="prototype"in T&&T.prototype.render,x=(a=T.contextType)&&i[a.__c],P=a?x?x.props.value:a.__:i,u.__c?m=(h=t.__c=u.__c).__=h.__E:(C?t.__c=h=new T(w,P):(t.__c=h=new M(w,P),h.constructor=T,h.render=B),x&&x.sub(h),h.props=w,h.state||(h.state={}),h.context=P,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),C&&null==h.__s&&(h.__s=h.state),C&&null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=b({},h.__s)),b(h.__s,T.getDerivedStateFromProps(w,h.__s))),y=h.props,v=h.state,h.__v=t,p)C&&null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),C&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(C&&null==T.getDerivedStateFromProps&&w!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(w,P),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(w,h.__s,P)||t.__v===u.__v)){for(t.__v!==u.__v&&(h.props=w,h.state=h.__s,h.__d=!1),t.__e=u.__e,t.__k=u.__k,t.__k.some(function(n){n&&(n.__=t)}),$=0;$<h._sb.length;$++)h.__h.push(h._sb[$]);h._sb=[],h.__h.length&&o.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(w,h.__s,P),C&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,v,_)})}if(h.context=P,h.props=w,h.__P=n,h.__e=!1,I=l.__r,A=0,C){for(h.state=h.__s,h.__d=!1,I&&I(t),a=h.render(h.props,h.state,h.context),F=0;F<h._sb.length;F++)h.__h.push(h._sb[F]);h._sb=[]}else do{h.__d=!1,I&&I(t),a=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++A<25);h.state=h.__s,null!=h.getChildContext&&(i=b(b({},i),h.getChildContext())),C&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(y,v)),f=E(n,g(H=null!=a&&a.type===S&&null==a.key?a.props.children:a)?H:[H],t,u,i,e,r,o,f,c,s),h.base=t.__e,t.__u&=-161,h.__h.length&&o.push(h),m&&(h.__E=h.__=null)}catch(n){if(t.__v=null,c||null!=r)if(n.then){for(t.__u|=c?160:128;f&&8===f.nodeType&&f.nextSibling;)f=f.nextSibling;r[r.indexOf(f)]=null,t.__e=f}else for(L=r.length;L--;)k(r[L]);else t.__e=u.__e,t.__k=u.__k;l.__e(n,t,u)}else null==r&&t.__v===u.__v?(t.__k=u.__k,t.__e=u.__e):f=t.__e=N(u.__e,t,u,i,e,r,o,c,s);return(a=l.diffed)&&a(t),128&t.__u?void 0:f}function z(n,t,u){for(var i=0;i<u.length;i++)R(u[i],u[++i],u[++i]);l.__c&&l.__c(t,n),n.some(function(t){try{n=t.__h,t.__h=[],n.some(function(n){n.call(t)})}catch(n){l.__e(n,t.__v)}})}function N(t,u,i,e,r,o,f,c,s){var a,h,p,m,w,b,C,x=i.props,S=u.props,M=u.type;if("svg"===M?r=y:"math"===M?r="http://www.w3.org/1998/Math/MathML":r||(r=v),null!=o)for(a=0;a<o.length;a++)if((w=o[a])&&"setAttribute"in w==!!M&&(M?w.localName===M:3===w.nodeType)){t=w,o[a]=null;break}if(null==t){if(null===M)return document.createTextNode(S);t=document.createElementNS(r,M,S.is&&S),c&&(l.__m&&l.__m(u,o),c=!1),o=null}if(null===M)x===S||c&&t.data===S||(t.data=S);else{if(o=o&&n.call(t.childNodes),x=i.props||_,!c&&null!=o)for(x={},a=0;a<t.attributes.length;a++)x[(w=t.attributes[a]).name]=w.value;for(a in x)if(w=x[a],"children"==a);else if("dangerouslySetInnerHTML"==a)p=w;else if(!(a in S)){if("value"==a&&"defaultValue"in S||"checked"==a&&"defaultChecked"in S)continue;O(t,a,null,w,r)}for(a in S)w=S[a],"children"==a?m=w:"dangerouslySetInnerHTML"==a?h=w:"value"==a?b=w:"checked"==a?C=w:c&&"function"!=typeof w||x[a]===w||O(t,a,w,x[a],r);if(h)c||p&&(h.__html===p.__html||h.__html===t.innerHTML)||(t.innerHTML=h.__html),u.__k=[];else if(p&&(t.innerHTML=""),E(t,g(m)?m:[m],u,i,e,"foreignObject"===M?v:r,o,f,o?o[0]:i.__k&&P(i,0),c,s),null!=o)for(a=o.length;a--;)k(o[a]);c||(a="value","progress"===M&&null==b?t.removeAttribute("value"):b!==d&&(b!==t[a]||"progress"===M&&!b||"option"===M&&b!==x[a])&&O(t,a,b,x[a],r),a="checked",C!==d&&C!==t[a]&&O(t,a,C,x[a],r))}return t}function R(n,t,u){try{if("function"==typeof n){var i="function"==typeof n.__u;i&&n.__u(),i&&null==t||(n.__u=n(t))}else n.current=t}catch(n){l.__e(n,u)}}function q(n,t,u){var i,e;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||R(i,null,t)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,t)}i.base=i.__P=null}if(i=n.__k)for(e=0;e<i.length;e++)i[e]&&q(i[e],t,u||"function"!=typeof n.type);u||k(n.__e),n.__c=n.__=n.__e=d}function B(n,l,t){return this.constructor(n,t)}function D(t,u,i){var e,r,o,f;u===document&&(u=document.documentElement),l.__&&l.__(t,u),r=(e="function"==typeof i)?null:i&&i.__k||u.__k,o=[],f=[],j(u,t=(!e&&i||u).__k=C(S,null,[t]),r||_,_,u.namespaceURI,!e&&i?[i]:r?null:u.firstChild?n.call(u.childNodes):null,o,!e&&i?i:r?r.__e:u.firstChild,e,f),z(o,t,f)}n=m.slice,l={__e:function(n,l,t,u){for(var i,e,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((e=i.constructor)&&null!=e.getDerivedStateFromError&&(i.setState(e.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,u||{}),r=i.__d),r)return i.__E=i}catch(l){n=l}throw n}},t=0,u=function(n){return null!=n&&n.constructor==d},M.prototype.setState=function(n,l){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=b({},this.state),"function"==typeof n&&(n=n(b({},t),this.props)),n&&b(t,n),null!=n&&this.__v&&(l&&this._sb.push(l),I(this))},M.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),I(this))},M.prototype.render=S,i=[],r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,o=function(n,l){return n.__v.__b-l.__v.__b},A.__r=0,f=/(PointerCapture)$|Capture$/i,c=0,s=V(!1),a=V(!0),h=0,p={__proto__:null,render:D,hydrate:function n(l,t){D(l,t,n)},createElement:C,h:C,Fragment:S,createRef:function(){return{current:null}},isValidElement:u,Component:M,cloneElement:function(l,t,u){var i,e,r,o,f=b({},l.props);for(r in l.type&&l.type.defaultProps&&(o=l.type.defaultProps),t)"key"==r?i=t[r]:"ref"==r?e=t[r]:f[r]=t[r]===d&&o!==d?o[r]:t[r];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):u),x(l.type,f,i||l.key,e||l.ref,null)},createContext:function(n,l){var t={__c:l="__cC"+h++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var t,u;return this.getChildContext||(t=new Set,(u={})[l]=this,this.getChildContext=function(){return u},this.componentWillUnmount=function(){t=null},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&t.forEach(function(n){n.__e=!0,I(n)})},this.sub=function(n){t.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){t&&t.delete(n),l&&l.call(n)}}),n.children}};return t.Provider.__=t.Consumer.contextType=t},toChildArray:function n(l,t){return t=t||[],null==l||"boolean"==typeof l||(g(l)?l.some(function(l){n(l,t)}):t.push(l)),t},options:l},typeof module<"u"?module.exports=p:self.preact=p}();
//# sourceMappingURL=preact.min.js.map