@lytjs/renderer 5.0.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/native.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var V=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var $=Object.prototype.hasOwnProperty;var q=(i,e)=>{for(var t in e)V(i,t,{get:e[t],enumerable:!0})},J=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of G(e))!$.call(i,o)&&o!==t&&V(i,o,{get:()=>e[o],enumerable:!(n=X(e,o))||n.enumerable});return i};var Q=i=>J(V({},"__esModule",{value:!0}),i);var fe={};q(fe,{Comment:()=>L,Fragment:()=>E,NativeRenderer:()=>N,PatchFlags:()=>y,ShapeFlags:()=>u,Text:()=>R,createRenderer:()=>W,nativeRenderer:()=>K});module.exports=Q(fe);var M=require("@lytjs/vdom");var u=(s=>(s[s.ELEMENT=1]="ELEMENT",s[s.FUNCTIONAL_COMPONENT=2]="FUNCTIONAL_COMPONENT",s[s.STATEFUL_COMPONENT=4]="STATEFUL_COMPONENT",s[s.TEXT_CHILDREN=8]="TEXT_CHILDREN",s[s.ARRAY_CHILDREN=16]="ARRAY_CHILDREN",s[s.SLOTS_CHILDREN=32]="SLOTS_CHILDREN",s))(u||{}),y=(l=>(l[l.TEXT=1]="TEXT",l[l.CLASS=2]="CLASS",l[l.STYLE=4]="STYLE",l[l.PROPS=8]="PROPS",l[l.FULL_PROPS=16]="FULL_PROPS",l[l.STABLE_FRAGMENT=32]="STABLE_FRAGMENT",l[l.KEYED_FRAGMENT=64]="KEYED_FRAGMENT",l[l.UNKEYED_FRAGMENT=128]="UNKEYED_FRAGMENT",l[l.NEED_PATCH=256]="NEED_PATCH",l[l.DYNAMIC_SLOTS=512]="DYNAMIC_SLOTS",l[l.HOISTED=-1]="HOISTED",l[l.BAIL=-2]="BAIL",l))(y||{}),E=Symbol("Fragment"),R=Symbol("Text"),L=Symbol("Comment");function m(i){return i.type===E}function h(i){return i.type===R}function g(i){return i.type===L}function k(i,e){return i.type===e.type&&i.key===e.key}function w(i){return Array.isArray(i.dynamicChildren)}function P(i,e,t,n){if(t==="class")i.setClass(e,n);else if(t==="style")i.setStyle(e,n);else if(t.startsWith("on")||t.startsWith("@")){let o=t.startsWith("@")?t.slice(1).toLowerCase():t.slice(2).toLowerCase();i.addEventListener(e,o,n)}else t==="key"||t==="ref"||i.setAttribute(e,t,n)}function b(i,e,t,n,o){if(t==="class")i.setClass(e,n);else if(t==="style")i.setStyle(e,n||{});else if(t.startsWith("on")||t.startsWith("@")){let r=t.startsWith("@")?t.slice(1).toLowerCase():t.slice(2).toLowerCase();o&&i.removeEventListener(e,r,o),n&&i.addEventListener(e,r,n)}else i.setAttribute(e,t,n)}function A(i,e,t,n){for(let o in n){if(o==="key"||o==="ref")continue;let r=t[o],s=n[o];s!==r&&b(i,e,o,s,r)}for(let o in t)if(!(o==="key"||o==="ref")&&!(o in n))if(o==="class")i.setClass(e,"");else if(o==="style")i.setStyle(e,{});else if(o.startsWith("on")||o.startsWith("@")){let r=o.startsWith("@")?o.slice(1).toLowerCase():o.slice(2).toLowerCase();i.removeEventListener(e,r,t[o])}else i.removeAttribute(e,o)}function S(i,e,t,n,o,r){let{shapeFlag:s}=t;if(m(t)){ee(i,e,t,n,o,r);return}if(h(t)){let a=i.createText(t.children);t.el=a,i.insert(n,a,o);return}if(g(t)){let a=i.createComment(t.children);t.el=a,i.insert(n,a,o);return}if(s&1){Z(i,e,t,n,o,r);return}if(s&6){te(e,t,n,o,r);return}}function Z(i,e,t,n,o,r){let s=t.type,a=i.createElement(s);if(t.el=a,t.props)for(let c in t.props){let f=t.props[c];P(i,a,c,f)}let{shapeFlag:d,children:p}=t;d&8?a.textContent=p:d&16&&T(e,p,a,null,r),i.insert(n,a,o)}function T(i,e,t,n,o){for(let r=0;r<e.length;r++)i(null,e[r],t,n,o)}function ee(i,e,t,n,o,r){let{children:s}=t,a=i.createComment("");i.insert(n,a,o),Array.isArray(s)&&s.length>0&&T(e,s,n,a,r),t.el=a,t.anchor=a}function te(i,e,t,n,o){let r=e.component;r&&r.update&&r.update(),r&&r.subTree&&(i(null,r.subTree,t,n,r),e.el=r.subTree.el)}function D(i,e,t,n){let{shapeFlag:o,children:r}=t;if(m(t)){if(Array.isArray(r))for(let s=0;s<r.length;s++)e(r[s],n);t.anchor&&t.anchor.parentNode&&i.remove(t.anchor);return}if(o&6){t.component&&t.component.subTree&&e(t.component.subTree,n);return}t.el&&i.remove(t.el)}function v(i,e){for(let t=0;t<e.length;t++)i(e[t])}var x=require("@lytjs/vdom");function C(i,e,t,n,o,r=null,s=null){if(n==null){t&&e(t,o);return}if(t===null){S(i,_(i,e),n,o,r,s);return}if(w(n)&&w(t)){re(i,e,t,n,o,s);return}if(!k(t,n)){e(t,o),S(i,_(i,e),n,o,r,s);return}n.el=t.el,n.anchor=t.anchor;let{shapeFlag:a}=n;if(m(n)){ie(i,e,t,n,o,r,s);return}if(h(n)){n.children!==t.children&&(n.el.nodeValue=n.children);return}if(g(n)){n.children!==t.children&&(n.el.nodeValue=n.children);return}if(a&1){ne(i,e,t,n,s);return}if(a&6){se(t,n,s);return}}function _(i,e){return(t,n,o,r,s)=>{C(i,e,t,n,o,r,s)}}function ne(i,e,t,n,o=null){let r=n.el=t.el,s=t.props||{},a=n.props||{},{patchFlag:d,dynamicProps:p}=n;if(d&&d>0){if(d&1&&t.children!==n.children&&(r.textContent=n.children),d&2&&s.class!==a.class&&i.setClass(r,a.class),d&4&&s.style!==a.style&&i.setStyle(r,a.style||{}),d&8&&p)for(let c=0;c<p.length;c++){let f=p[c],l=s[f],I=a[f];I!==l&&b(i,r,f,I,l)}d&16&&A(i,r,s,a)}else A(i,r,s,a);(!d||!(d&1))&&H(i,e,t,n,r,null,o)}function H(i,e,t,n,o,r,s){let a=t.shapeFlag,d=n.shapeFlag,p=t.children,c=n.children;if(d&8){a&16&&v(e,p),p!==c&&(o.textContent=c);return}if(d&16){a&16?oe(i,e,p,c,o,r,s):(a&8&&(o.textContent=""),T(_(i,e),c,o,r,s));return}c==null&&(a&8?o.textContent="":a&16&&v(e,p))}function oe(i,e,t,n,o,r,s){n.every(d=>d.key!==null&&d.key!==void 0)&&t.every(d=>d.key!==null&&d.key!==void 0)?(0,x.patchKeyedChildren)(t,n,o,r,s,null,!1):(0,x.patchUnkeyedChildren)(t,n,o,r,s,null,!1)}function ie(i,e,t,n,o,r,s){let a=t.children,d=n.children;Array.isArray(d)&&d.length>0?(H(i,e,t,n,o,r,s),n.el=d[0].el,n.anchor=d[d.length-1].el?i.nextSibling(d[d.length-1].el):r):Array.isArray(a)&&a.length>0&&d===null?(v(e,a),n.el=t.el,n.anchor=t.anchor):(n.el=t.el,n.anchor=t.anchor)}function re(i,e,t,n,o,r){let s=t.dynamicChildren,a=n.dynamicChildren;for(let d=0;d<a.length;d++)C(i,e,s[d],a[d],o,null,r)}function se(i,e,t){e.component=i.component,e.el=i.el,e.component&&e.component.update&&e.component.update()}function W(i){function e(o,r){D(i,e,o,r)}(0,M.registerDOMOperations)({insert(o,r,s){i.insert(r,o,s)},createElement(o){return i.createElement(o)},createText(o){return i.createText(o)},setText(o,r){o.nodeValue=r},setElementText(o,r){o.textContent=r},remove(o){i.remove(o)},createComment(o){return i.createComment(o)},mount(o,r,s,a,d,p,c){n(null,o,r,s,a)},patch(o,r,s,a,d,p,c,f){n(o,r,s,a,d)},unmount(o,r,s,a){e(o)},move(o,r,s){i.insert(r,o.el,s)}});function n(o,r,s,a,d){C(i,e,o,r,s,a,d)}return{mount(o,r){r.nodeType===1&&(r.textContent=""),n(null,o,r,null,null)},patch(o,r,s){var a;n(o,r,s||((a=o.el)==null?void 0:a.parentNode),null,null)},unmount(o,r){e(o,r)}}}function U(i,e,t){if(!(!i||!e)){if(e._parent){let n=e._parent,o=n.children.indexOf(e);o!==-1&&n.children.splice(o,1)}if(e._parent=i,t){let n=i.children.indexOf(t);n!==-1?i.children.splice(n,0,e):i.children.push(e)}else i.children.push(e)}}function j(i){if(!i||!i._parent)return;let e=i._parent,t=e.children.indexOf(i);t!==-1&&e.children.splice(t,1),i._parent=void 0}function B(i,e,t){if(!i||!e||!t)return;let n=i.children.indexOf(e);n!==-1&&(e._parent=void 0,t._parent=i,i.children[n]=t)}function Y(i){var e;return(e=i==null?void 0:i._parent)!=null?e:null}function z(i){if(!i||!i._parent)return null;let e=i._parent.children,t=e.indexOf(i);return t!==-1&&t+1<e.length?e[t+1]:null}function F(i){Promise.resolve().then(()=>i())}var ae={div:"View",span:"Text",p:"Text",h1:"Text",h2:"Text",h3:"Text",h4:"Text",h5:"Text",h6:"Text",img:"Image",input:"TextInput",textarea:"TextInput",button:"TouchableOpacity",scroll:"ScrollView",list:"FlatList",a:"TouchableOpacity",ul:"View",ol:"View",li:"View",form:"View",header:"View",footer:"View",nav:"View",main:"View",section:"View",article:"View",aside:"View"},de={flexDirection:"flexDirection",justifyContent:"justifyContent",alignItems:"alignItems",alignSelf:"alignSelf",flexWrap:"flexWrap",flex:"flex",flexGrow:"flexGrow",flexShrink:"flexShrink",flexBasis:"flexBasis",backgroundColor:"backgroundColor",color:"color",fontSize:"fontSize",fontWeight:"fontWeight",fontStyle:"fontStyle",textAlign:"textAlign",lineHeight:"lineHeight",letterSpacing:"letterSpacing",padding:"padding",paddingTop:"paddingTop",paddingBottom:"paddingBottom",paddingLeft:"paddingLeft",paddingRight:"paddingRight",paddingHorizontal:"paddingHorizontal",paddingVertical:"paddingVertical",margin:"margin",marginTop:"marginTop",marginBottom:"marginBottom",marginLeft:"marginLeft",marginRight:"marginRight",marginHorizontal:"marginHorizontal",marginVertical:"marginVertical",width:"width",height:"height",minWidth:"minWidth",maxWidth:"maxWidth",minHeight:"minHeight",maxHeight:"maxHeight",borderRadius:"borderRadius",borderWidth:"borderWidth",borderColor:"borderColor",overflow:"overflow",opacity:"opacity",position:"position",top:"top",left:"left",right:"right",bottom:"bottom",zIndex:"zIndex",shadowColor:"shadowColor",shadowOffset:"shadowOffset",shadowOpacity:"shadowOpacity",shadowRadius:"shadowRadius"},le={click:"onPress",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",change:"onChange",input:"onChangeText",focus:"onFocus",blur:"onBlur",submit:"onSubmitEditing",scroll:"onScroll",longpress:"onLongPress"},ce=0;function O(){return`native_${++ce}`}var N=class{createElement(e){return{type:this.getComponentType(e),props:{},children:[],nativeId:O()}}createText(e){return{type:"RawText",props:{text:e},children:[],nativeId:O()}}createComment(e){return{type:"__Comment",props:{text:e},children:[],nativeId:O()}}setAttribute(e,t,n){if(e){if(t==="style"&&typeof n=="object"&&n!==null){e.props.style={...e.props.style,...this.mapStyle(n)};return}if(t==="className"||t==="class"){e.props.className=n;return}if(t.startsWith("on")&&typeof n=="function"){let o=t.slice(2).toLowerCase(),r=this.mapEvent(o);e.props[r]=n;return}if(t==="src"&&e.type==="Image"){e.props.source={uri:n};return}if(t==="href"){e.props.href=n;return}if(t==="placeholder"){e.props.placeholder=n;return}e.props[t]=n}}removeAttribute(e,t){if(e)if(t==="style")delete e.props.style;else if(t.startsWith("on")){let n=t.slice(2).toLowerCase(),o=this.mapEvent(n);delete e.props[o]}else delete e.props[t]}setStyle(e,t){if(!e)return;let n=this.mapStyle(t);e.props.style={...e.props.style,...n}}setClass(e,t){if(e){if(typeof t=="string")e.props.className=t;else if(typeof t=="object"&&t!==null){let n=[];for(let[o,r]of Object.entries(t))r&&n.push(o);e.props.className=n.join(" ")}}}insert(e,t,n){U(e,t,n)}remove(e){j(e)}replace(e,t,n){B(e,t,n)}addEventListener(e,t,n,o){if(!e)return;let r=this.mapEvent(t);e.props[r]=n}removeEventListener(e,t,n){if(!e)return;let o=this.mapEvent(t);e.props[o]===n&&delete e.props[o]}nextTick(e){F(e)}parentNode(e){return Y(e)}nextSibling(e){return z(e)}setText(e,t){e&&e.type==="RawText"&&(e.props.text=t)}patchProp(e,t,n,o){if(e){if(o==null){this.removeAttribute(e,t);return}if(t==="style")this.setStyle(e,o);else if(t==="class"||t==="className")this.setClass(e,o);else if(t.startsWith("on")&&typeof o=="function"){let r=t.slice(2).toLowerCase(),s=this.mapEvent(r);e.props[s]=o}else this.setAttribute(e,t,o)}}querySelector(e){return null}renderToNativeTree(e){if(!e)return this.createComment("empty vnode");if(typeof e=="string")return this.createText(e);if(e.type===Symbol.for("lyt.comment")||e.type==="comment")return this.createComment(e.children||"");if(e.type===Symbol.for("lyt.text")||e.type==="text")return this.createText(e.children||"");if(e.type===Symbol.for("lyt.fragment")||e.type==="fragment"){let t=this.createElement("__Fragment");if(Array.isArray(e.children))for(let n of e.children){let o=this.renderToNativeTree(n);this.insert(t,o)}return t}if(typeof e.type=="string"){let t=this.createElement(e.type);if(e.props)for(let[n,o]of Object.entries(e.props))n==="key"||n==="ref"||this.setAttribute(t,n,o);if(e.children){if(typeof e.children=="string")this.insert(t,this.createText(e.children));else if(Array.isArray(e.children))for(let n of e.children)this.insert(t,this.renderToNativeTree(n))}return t}if(typeof e.type=="object"||typeof e.type=="function"){let t=this.createElement("div");if(Array.isArray(e.children))for(let n of e.children)this.insert(t,this.renderToNativeTree(n));return t}return this.createComment("unknown vnode type")}serializeToJSON(e){let t=n=>{let o={type:n.type,props:{...n.props},children:n.children.map(t)};return n.nativeId&&(o.nativeId=n.nativeId),o};return JSON.stringify(t(e),null,2)}getComponentType(e){return ae[e]||pe(e)}mapStyle(e){let t={};for(let[n,o]of Object.entries(e)){let r=de[n]||n;typeof o=="string"&&/^\d+px$/.test(o)?t[r]=parseInt(o,10):t[r]=o}return t}mapEvent(e){return le[e]||`on${e.charAt(0).toUpperCase()}${e.slice(1)}`}};function pe(i){return i.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join("")}var K=new N;
1
+ "use strict";var V=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var $=Object.prototype.hasOwnProperty;var q=(i,e)=>{for(var t in e)V(i,t,{get:e[t],enumerable:!0})},J=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of G(e))!$.call(i,o)&&o!==t&&V(i,o,{get:()=>e[o],enumerable:!(n=X(e,o))||n.enumerable});return i};var Q=i=>J(V({},"__esModule",{value:!0}),i);var fe={};q(fe,{Comment:()=>L,Fragment:()=>E,NativeRenderer:()=>y,PatchFlags:()=>N,ShapeFlags:()=>u,Text:()=>R,createRenderer:()=>W,nativeRenderer:()=>K});module.exports=Q(fe);var M=require("@lytjs/vdom");var u=(s=>(s[s.ELEMENT=1]="ELEMENT",s[s.FUNCTIONAL_COMPONENT=2]="FUNCTIONAL_COMPONENT",s[s.STATEFUL_COMPONENT=4]="STATEFUL_COMPONENT",s[s.TEXT_CHILDREN=8]="TEXT_CHILDREN",s[s.ARRAY_CHILDREN=16]="ARRAY_CHILDREN",s[s.SLOTS_CHILDREN=32]="SLOTS_CHILDREN",s))(u||{}),N=(l=>(l[l.TEXT=1]="TEXT",l[l.CLASS=2]="CLASS",l[l.STYLE=4]="STYLE",l[l.PROPS=8]="PROPS",l[l.FULL_PROPS=16]="FULL_PROPS",l[l.STABLE_FRAGMENT=32]="STABLE_FRAGMENT",l[l.KEYED_FRAGMENT=64]="KEYED_FRAGMENT",l[l.UNKEYED_FRAGMENT=128]="UNKEYED_FRAGMENT",l[l.NEED_PATCH=256]="NEED_PATCH",l[l.DYNAMIC_SLOTS=512]="DYNAMIC_SLOTS",l[l.HOISTED=-1]="HOISTED",l[l.BAIL=-2]="BAIL",l))(N||{}),E=Symbol("Fragment"),R=Symbol("Text"),L=Symbol("Comment");function m(i){return i.type===E}function h(i){return i.type===R}function g(i){return i.type===L}function k(i,e){return i.type===e.type&&i.key===e.key}function w(i){return Array.isArray(i.dynamicChildren)}function P(i,e,t,n){if(t==="class")i.setClass(e,n);else if(t==="style")i.setStyle(e,n);else if(t.startsWith("on")||t.startsWith("@")){let o=t.startsWith("@")?t.slice(1).toLowerCase():t.slice(2).toLowerCase();i.addEventListener(e,o,n)}else t==="key"||t==="ref"||i.setAttribute(e,t,n)}function b(i,e,t,n,o){if(t==="class")i.setClass(e,n);else if(t==="style")i.setStyle(e,n||{});else if(t.startsWith("on")||t.startsWith("@")){let r=t.startsWith("@")?t.slice(1).toLowerCase():t.slice(2).toLowerCase();o&&i.removeEventListener(e,r,o),n&&i.addEventListener(e,r,n)}else i.setAttribute(e,t,n)}function A(i,e,t,n){for(let o in n){if(o==="key"||o==="ref")continue;let r=t[o],s=n[o];s!==r&&b(i,e,o,s,r)}for(let o in t)if(!(o==="key"||o==="ref")&&!(o in n))if(o==="class")i.setClass(e,"");else if(o==="style")i.setStyle(e,{});else if(o.startsWith("on")||o.startsWith("@")){let r=o.startsWith("@")?o.slice(1).toLowerCase():o.slice(2).toLowerCase();i.removeEventListener(e,r,t[o])}else i.removeAttribute(e,o)}function S(i,e,t,n,o,r){let{shapeFlag:s}=t;if(m(t)){ee(i,e,t,n,o,r);return}if(h(t)){let a=i.createText(t.children);t.el=a,i.insert(n,a,o);return}if(g(t)){let a=i.createComment(t.children);t.el=a,i.insert(n,a,o);return}if(s&1){Z(i,e,t,n,o,r);return}if(s&6){te(e,t,n,o,r);return}}function Z(i,e,t,n,o,r){let s=t.type,a=i.createElement(s);if(t.el=a,t.props)for(let c in t.props){let f=t.props[c];P(i,a,c,f)}let{shapeFlag:d,children:p}=t;d&8?a.textContent=p:d&16&&T(e,p,a,null,r),i.insert(n,a,o)}function T(i,e,t,n,o){for(let r=0;r<e.length;r++)i(null,e[r],t,n,o)}function ee(i,e,t,n,o,r){let{children:s}=t,a=i.createComment("");i.insert(n,a,o),Array.isArray(s)&&s.length>0&&T(e,s,n,a,r),t.el=a,t.anchor=a}function te(i,e,t,n,o){let r=e.component;r&&r.update&&r.update(),r&&r.subTree&&(i(null,r.subTree,t,n,r),e.el=r.subTree.el)}function D(i,e,t,n){let{shapeFlag:o,children:r}=t;if(m(t)){if(Array.isArray(r))for(let s=0;s<r.length;s++)e(r[s],n);t.anchor&&t.anchor.parentNode&&i.remove(t.anchor);return}if(o&6){t.component&&t.component.subTree&&e(t.component.subTree,n);return}t.el&&i.remove(t.el)}function x(i,e){for(let t=0;t<e.length;t++)i(e[t])}var v=require("@lytjs/vdom");function C(i,e,t,n,o,r=null,s=null){if(n==null){t&&e(t,o);return}if(t===null){S(i,_(i,e),n,o,r,s);return}if(w(n)&&w(t)){re(i,e,t,n,o,s);return}if(!k(t,n)){e(t,o),S(i,_(i,e),n,o,r,s);return}n.el=t.el,n.anchor=t.anchor;let{shapeFlag:a}=n;if(m(n)){ie(i,e,t,n,o,r,s);return}if(h(n)){n.children!==t.children&&(n.el.nodeValue=n.children);return}if(g(n)){n.children!==t.children&&(n.el.nodeValue=n.children);return}if(a&1){ne(i,e,t,n,s);return}if(a&6){se(t,n,s);return}}function _(i,e){return(t,n,o,r,s)=>{C(i,e,t,n,o,r,s)}}function ne(i,e,t,n,o=null){let r=n.el=t.el,s=t.props||{},a=n.props||{},{patchFlag:d,dynamicProps:p}=n;if(d&&d>0){if(d&1&&t.children!==n.children&&(r.textContent=n.children),d&2&&s.class!==a.class&&i.setClass(r,a.class),d&4&&s.style!==a.style&&i.setStyle(r,a.style||{}),d&8&&p)for(let c=0;c<p.length;c++){let f=p[c],l=s[f],I=a[f];I!==l&&b(i,r,f,I,l)}d&16&&A(i,r,s,a)}else A(i,r,s,a);(!d||!(d&1))&&H(i,e,t,n,r,null,o)}function H(i,e,t,n,o,r,s){let a=t.shapeFlag,d=n.shapeFlag,p=t.children,c=n.children;if(d&8){a&16&&x(e,p),p!==c&&(o.textContent=c);return}if(d&16){a&16?oe(i,e,p,c,o,r,s):(a&8&&(o.textContent=""),T(_(i,e),c,o,r,s));return}c==null&&(a&8?o.textContent="":a&16&&x(e,p))}function oe(i,e,t,n,o,r,s){n.every(d=>d.key!==null&&d.key!==void 0)&&t.every(d=>d.key!==null&&d.key!==void 0)?(0,v.patchKeyedChildren)(t,n,o,r,s,null,!1):(0,v.patchUnkeyedChildren)(t,n,o,r,s,null,!1)}function ie(i,e,t,n,o,r,s){let a=t.children,d=n.children;Array.isArray(d)&&d.length>0?(H(i,e,t,n,o,r,s),n.el=d[0].el,n.anchor=d[d.length-1].el?i.nextSibling(d[d.length-1].el):r):Array.isArray(a)&&a.length>0&&d===null?(x(e,a),n.el=t.el,n.anchor=t.anchor):(n.el=t.el,n.anchor=t.anchor)}function re(i,e,t,n,o,r){let s=t.dynamicChildren,a=n.dynamicChildren;for(let d=0;d<a.length;d++)C(i,e,s[d],a[d],o,null,r)}function se(i,e,t){e.component=i.component,e.el=i.el,e.component&&e.component.update&&e.component.update()}function W(i){function e(o,r){D(i,e,o,r)}(0,M.registerDOMOperations)({insert(o,r,s){i.insert(r,o,s)},createElement(o){return i.createElement(o)},createText(o){return i.createText(o)},setText(o,r){o.nodeValue=r},setElementText(o,r){o.textContent=r},remove(o){i.remove(o)},createComment(o){return i.createComment(o)},mount(o,r,s,a,d,p,c){n(null,o,r,s,a)},patch(o,r,s,a,d,p,c,f){n(o,r,s,a,d)},unmount(o,r,s,a){e(o)},move(o,r,s){i.insert(r,o.el,s)}});function n(o,r,s,a,d){C(i,e,o,r,s,a,d)}return{mount(o,r){r.nodeType===1&&(r.textContent=""),n(null,o,r,null,null)},patch(o,r,s){var a;n(o,r,s||((a=o.el)==null?void 0:a.parentNode),null,null)},unmount(o,r){e(o,r)}}}function j(i,e,t){if(!(!i||!e)){if(e._parent){let n=e._parent,o=n.children.indexOf(e);o!==-1&&n.children.splice(o,1)}if(e._parent=i,t){let n=i.children.indexOf(t);n!==-1?i.children.splice(n,0,e):i.children.push(e)}else i.children.push(e)}}function U(i){if(!i||!i._parent)return;let e=i._parent,t=e.children.indexOf(i);t!==-1&&e.children.splice(t,1),i._parent=void 0}function B(i,e,t){if(!i||!e||!t)return;let n=i.children.indexOf(e);n!==-1&&(e._parent=void 0,t._parent=i,i.children[n]=t)}function Y(i){var e;return(e=i==null?void 0:i._parent)!=null?e:null}function z(i){if(!i||!i._parent)return null;let e=i._parent.children,t=e.indexOf(i);return t!==-1&&t+1<e.length?e[t+1]:null}function F(i){Promise.resolve().then(()=>i())}var ae={div:"View",span:"Text",p:"Text",h1:"Text",h2:"Text",h3:"Text",h4:"Text",h5:"Text",h6:"Text",img:"Image",input:"TextInput",textarea:"TextInput",button:"TouchableOpacity",scroll:"ScrollView",list:"FlatList",a:"TouchableOpacity",ul:"View",ol:"View",li:"View",form:"View",header:"View",footer:"View",nav:"View",main:"View",section:"View",article:"View",aside:"View"},de={flexDirection:"flexDirection",justifyContent:"justifyContent",alignItems:"alignItems",alignSelf:"alignSelf",flexWrap:"flexWrap",flex:"flex",flexGrow:"flexGrow",flexShrink:"flexShrink",flexBasis:"flexBasis",backgroundColor:"backgroundColor",color:"color",fontSize:"fontSize",fontWeight:"fontWeight",fontStyle:"fontStyle",textAlign:"textAlign",lineHeight:"lineHeight",letterSpacing:"letterSpacing",padding:"padding",paddingTop:"paddingTop",paddingBottom:"paddingBottom",paddingLeft:"paddingLeft",paddingRight:"paddingRight",paddingHorizontal:"paddingHorizontal",paddingVertical:"paddingVertical",margin:"margin",marginTop:"marginTop",marginBottom:"marginBottom",marginLeft:"marginLeft",marginRight:"marginRight",marginHorizontal:"marginHorizontal",marginVertical:"marginVertical",width:"width",height:"height",minWidth:"minWidth",maxWidth:"maxWidth",minHeight:"minHeight",maxHeight:"maxHeight",borderRadius:"borderRadius",borderWidth:"borderWidth",borderColor:"borderColor",overflow:"overflow",opacity:"opacity",position:"position",top:"top",left:"left",right:"right",bottom:"bottom",zIndex:"zIndex",shadowColor:"shadowColor",shadowOffset:"shadowOffset",shadowOpacity:"shadowOpacity",shadowRadius:"shadowRadius"},le={click:"onPress",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",change:"onChange",input:"onChangeText",focus:"onFocus",blur:"onBlur",submit:"onSubmitEditing",scroll:"onScroll",longpress:"onLongPress"},ce=0;function O(){return`native_${++ce}`}var y=class{createElement(e){return{type:this.getComponentType(e),props:{},children:[],nativeId:O()}}createText(e){return{type:"RawText",props:{text:e},children:[],nativeId:O()}}createComment(e){return{type:"__Comment",props:{text:e},children:[],nativeId:O()}}setAttribute(e,t,n){if(e){if(t==="style"&&typeof n=="object"&&n!==null){e.props.style={...e.props.style,...this.mapStyle(n)};return}if(t==="className"||t==="class"){e.props.className=n;return}if(t.startsWith("on")&&typeof n=="function"){let o=t.slice(2).toLowerCase(),r=this.mapEvent(o);e.props[r]=n;return}if(t==="src"&&e.type==="Image"){e.props.source={uri:n};return}if(t==="href"){e.props.href=n;return}if(t==="placeholder"){e.props.placeholder=n;return}e.props[t]=n}}removeAttribute(e,t){if(e)if(t==="style")delete e.props.style;else if(t.startsWith("on")){let n=t.slice(2).toLowerCase(),o=this.mapEvent(n);delete e.props[o]}else delete e.props[t]}setStyle(e,t){if(!e)return;let n=this.mapStyle(t);e.props.style={...e.props.style,...n}}setClass(e,t){if(e){if(typeof t=="string")e.props.className=t;else if(typeof t=="object"&&t!==null){let n=[];for(let[o,r]of Object.entries(t))r&&n.push(o);e.props.className=n.join(" ")}}}insert(e,t,n){j(e,t,n)}remove(e){U(e)}replace(e,t,n){B(e,t,n)}addEventListener(e,t,n,o){if(!e)return;let r=this.mapEvent(t);e.props[r]=n}removeEventListener(e,t,n){if(!e)return;let o=this.mapEvent(t);e.props[o]===n&&delete e.props[o]}nextTick(e){F(e)}parentNode(e){return Y(e)}nextSibling(e){return z(e)}setText(e,t){e&&e.type==="RawText"&&(e.props.text=t)}patchProp(e,t,n,o){if(e){if(o==null){this.removeAttribute(e,t);return}if(t==="style")this.setStyle(e,o);else if(t==="class"||t==="className")this.setClass(e,o);else if(t.startsWith("on")&&typeof o=="function"){let r=t.slice(2).toLowerCase(),s=this.mapEvent(r);e.props[s]=o}else this.setAttribute(e,t,o)}}querySelector(e){return null}renderToNativeTree(e){if(!e)return this.createComment("empty vnode");if(typeof e=="string")return this.createText(e);if(e.type===Symbol.for("lyt.comment")||e.type==="comment")return this.createComment(e.children||"");if(e.type===Symbol.for("lyt.text")||e.type==="text")return this.createText(e.children||"");if(e.type===Symbol.for("lyt.fragment")||e.type==="fragment"){let t=this.createElement("__Fragment");if(Array.isArray(e.children))for(let n of e.children){let o=this.renderToNativeTree(n);this.insert(t,o)}return t}if(typeof e.type=="string"){let t=this.createElement(e.type);if(e.props)for(let[n,o]of Object.entries(e.props))n==="key"||n==="ref"||this.setAttribute(t,n,o);if(e.children){if(typeof e.children=="string")this.insert(t,this.createText(e.children));else if(Array.isArray(e.children))for(let n of e.children)this.insert(t,this.renderToNativeTree(n))}return t}if(typeof e.type=="object"||typeof e.type=="function"){let t=this.createElement("div");if(Array.isArray(e.children))for(let n of e.children)this.insert(t,this.renderToNativeTree(n));return t}return this.createComment("unknown vnode type")}serializeToJSON(e){let t=n=>{let o={type:n.type,props:{...n.props},children:n.children.map(t)};return n.nativeId&&(o.nativeId=n.nativeId),o};return JSON.stringify(t(e),null,2)}getComponentType(e){return ae[e]||pe(e)}mapStyle(e){let t={};for(let[n,o]of Object.entries(e)){let r=de[n]||n;typeof o=="string"&&/^\d+px$/.test(o)?t[r]=parseInt(o,10):t[r]=o}return t}mapEvent(e){return le[e]||`on${e.charAt(0).toUpperCase()}${e.slice(1)}`}};function pe(i){return i.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join("")}var K=new y;
package/dist/native.mjs CHANGED
@@ -1 +1 @@
1
- import{registerDOMOperations as Q}from"@lytjs/vdom";var m=(s=>(s[s.ELEMENT=1]="ELEMENT",s[s.FUNCTIONAL_COMPONENT=2]="FUNCTIONAL_COMPONENT",s[s.STATEFUL_COMPONENT=4]="STATEFUL_COMPONENT",s[s.TEXT_CHILDREN=8]="TEXT_CHILDREN",s[s.ARRAY_CHILDREN=16]="ARRAY_CHILDREN",s[s.SLOTS_CHILDREN=32]="SLOTS_CHILDREN",s))(m||{}),x=(l=>(l[l.TEXT=1]="TEXT",l[l.CLASS=2]="CLASS",l[l.STYLE=4]="STYLE",l[l.PROPS=8]="PROPS",l[l.FULL_PROPS=16]="FULL_PROPS",l[l.STABLE_FRAGMENT=32]="STABLE_FRAGMENT",l[l.KEYED_FRAGMENT=64]="KEYED_FRAGMENT",l[l.UNKEYED_FRAGMENT=128]="UNKEYED_FRAGMENT",l[l.NEED_PATCH=256]="NEED_PATCH",l[l.DYNAMIC_SLOTS=512]="DYNAMIC_SLOTS",l[l.HOISTED=-1]="HOISTED",l[l.BAIL=-2]="BAIL",l))(x||{}),A=Symbol("Fragment"),S=Symbol("Text"),_=Symbol("Comment");function u(i){return i.type===A}function N(i){return i.type===S}function y(i){return i.type===_}function O(i,e){return i.type===e.type&&i.key===e.key}function C(i){return Array.isArray(i.dynamicChildren)}function I(i,e,t,n){if(t==="class")i.setClass(e,n);else if(t==="style")i.setStyle(e,n);else if(t.startsWith("on")||t.startsWith("@")){let o=t.startsWith("@")?t.slice(1).toLowerCase():t.slice(2).toLowerCase();i.addEventListener(e,o,n)}else t==="key"||t==="ref"||i.setAttribute(e,t,n)}function V(i,e,t,n,o){if(t==="class")i.setClass(e,n);else if(t==="style")i.setStyle(e,n||{});else if(t.startsWith("on")||t.startsWith("@")){let r=t.startsWith("@")?t.slice(1).toLowerCase():t.slice(2).toLowerCase();o&&i.removeEventListener(e,r,o),n&&i.addEventListener(e,r,n)}else i.setAttribute(e,t,n)}function E(i,e,t,n){for(let o in n){if(o==="key"||o==="ref")continue;let r=t[o],s=n[o];s!==r&&V(i,e,o,s,r)}for(let o in t)if(!(o==="key"||o==="ref")&&!(o in n))if(o==="class")i.setClass(e,"");else if(o==="style")i.setStyle(e,{});else if(o.startsWith("on")||o.startsWith("@")){let r=o.startsWith("@")?o.slice(1).toLowerCase():o.slice(2).toLowerCase();i.removeEventListener(e,r,t[o])}else i.removeAttribute(e,o)}function R(i,e,t,n,o,r){let{shapeFlag:s}=t;if(u(t)){Y(i,e,t,n,o,r);return}if(N(t)){let a=i.createText(t.children);t.el=a,i.insert(n,a,o);return}if(y(t)){let a=i.createComment(t.children);t.el=a,i.insert(n,a,o);return}if(s&1){B(i,e,t,n,o,r);return}if(s&6){z(e,t,n,o,r);return}}function B(i,e,t,n,o,r){let s=t.type,a=i.createElement(s);if(t.el=a,t.props)for(let c in t.props){let f=t.props[c];I(i,a,c,f)}let{shapeFlag:d,children:p}=t;d&8?a.textContent=p:d&16&&h(e,p,a,null,r),i.insert(n,a,o)}function h(i,e,t,n,o){for(let r=0;r<e.length;r++)i(null,e[r],t,n,o)}function Y(i,e,t,n,o,r){let{children:s}=t,a=i.createComment("");i.insert(n,a,o),Array.isArray(s)&&s.length>0&&h(e,s,n,a,r),t.el=a,t.anchor=a}function z(i,e,t,n,o){let r=e.component;r&&r.update&&r.update(),r&&r.subTree&&(i(null,r.subTree,t,n,r),e.el=r.subTree.el)}function k(i,e,t,n){let{shapeFlag:o,children:r}=t;if(u(t)){if(Array.isArray(r))for(let s=0;s<r.length;s++)e(r[s],n);t.anchor&&t.anchor.parentNode&&i.remove(t.anchor);return}if(o&6){t.component&&t.component.subTree&&e(t.component.subTree,n);return}t.el&&i.remove(t.el)}function g(i,e){for(let t=0;t<e.length;t++)i(e[t])}import{patchKeyedChildren as F,patchUnkeyedChildren as K}from"@lytjs/vdom";function T(i,e,t,n,o,r=null,s=null){if(n==null){t&&e(t,o);return}if(t===null){R(i,L(i,e),n,o,r,s);return}if(C(n)&&C(t)){q(i,e,t,n,o,s);return}if(!O(t,n)){e(t,o),R(i,L(i,e),n,o,r,s);return}n.el=t.el,n.anchor=t.anchor;let{shapeFlag:a}=n;if(u(n)){$(i,e,t,n,o,r,s);return}if(N(n)){n.children!==t.children&&(n.el.nodeValue=n.children);return}if(y(n)){n.children!==t.children&&(n.el.nodeValue=n.children);return}if(a&1){X(i,e,t,n,s);return}if(a&6){J(t,n,s);return}}function L(i,e){return(t,n,o,r,s)=>{T(i,e,t,n,o,r,s)}}function X(i,e,t,n,o=null){let r=n.el=t.el,s=t.props||{},a=n.props||{},{patchFlag:d,dynamicProps:p}=n;if(d&&d>0){if(d&1&&t.children!==n.children&&(r.textContent=n.children),d&2&&s.class!==a.class&&i.setClass(r,a.class),d&4&&s.style!==a.style&&i.setStyle(r,a.style||{}),d&8&&p)for(let c=0;c<p.length;c++){let f=p[c],l=s[f],b=a[f];b!==l&&V(i,r,f,b,l)}d&16&&E(i,r,s,a)}else E(i,r,s,a);(!d||!(d&1))&&P(i,e,t,n,r,null,o)}function P(i,e,t,n,o,r,s){let a=t.shapeFlag,d=n.shapeFlag,p=t.children,c=n.children;if(d&8){a&16&&g(e,p),p!==c&&(o.textContent=c);return}if(d&16){a&16?G(i,e,p,c,o,r,s):(a&8&&(o.textContent=""),h(L(i,e),c,o,r,s));return}c==null&&(a&8?o.textContent="":a&16&&g(e,p))}function G(i,e,t,n,o,r,s){n.every(d=>d.key!==null&&d.key!==void 0)&&t.every(d=>d.key!==null&&d.key!==void 0)?F(t,n,o,r,s,null,!1):K(t,n,o,r,s,null,!1)}function $(i,e,t,n,o,r,s){let a=t.children,d=n.children;Array.isArray(d)&&d.length>0?(P(i,e,t,n,o,r,s),n.el=d[0].el,n.anchor=d[d.length-1].el?i.nextSibling(d[d.length-1].el):r):Array.isArray(a)&&a.length>0&&d===null?(g(e,a),n.el=t.el,n.anchor=t.anchor):(n.el=t.el,n.anchor=t.anchor)}function q(i,e,t,n,o,r){let s=t.dynamicChildren,a=n.dynamicChildren;for(let d=0;d<a.length;d++)T(i,e,s[d],a[d],o,null,r)}function J(i,e,t){e.component=i.component,e.el=i.el,e.component&&e.component.update&&e.component.update()}function Z(i){function e(o,r){k(i,e,o,r)}Q({insert(o,r,s){i.insert(r,o,s)},createElement(o){return i.createElement(o)},createText(o){return i.createText(o)},setText(o,r){o.nodeValue=r},setElementText(o,r){o.textContent=r},remove(o){i.remove(o)},createComment(o){return i.createComment(o)},mount(o,r,s,a,d,p,c){n(null,o,r,s,a)},patch(o,r,s,a,d,p,c,f){n(o,r,s,a,d)},unmount(o,r,s,a){e(o)},move(o,r,s){i.insert(r,o.el,s)}});function n(o,r,s,a,d){T(i,e,o,r,s,a,d)}return{mount(o,r){r.nodeType===1&&(r.textContent=""),n(null,o,r,null,null)},patch(o,r,s){var a;n(o,r,s||((a=o.el)==null?void 0:a.parentNode),null,null)},unmount(o,r){e(o,r)}}}function D(i,e,t){if(!(!i||!e)){if(e._parent){let n=e._parent,o=n.children.indexOf(e);o!==-1&&n.children.splice(o,1)}if(e._parent=i,t){let n=i.children.indexOf(t);n!==-1?i.children.splice(n,0,e):i.children.push(e)}else i.children.push(e)}}function H(i){if(!i||!i._parent)return;let e=i._parent,t=e.children.indexOf(i);t!==-1&&e.children.splice(t,1),i._parent=void 0}function M(i,e,t){if(!i||!e||!t)return;let n=i.children.indexOf(e);n!==-1&&(e._parent=void 0,t._parent=i,i.children[n]=t)}function W(i){var e;return(e=i==null?void 0:i._parent)!=null?e:null}function U(i){if(!i||!i._parent)return null;let e=i._parent.children,t=e.indexOf(i);return t!==-1&&t+1<e.length?e[t+1]:null}function j(i){Promise.resolve().then(()=>i())}var ee={div:"View",span:"Text",p:"Text",h1:"Text",h2:"Text",h3:"Text",h4:"Text",h5:"Text",h6:"Text",img:"Image",input:"TextInput",textarea:"TextInput",button:"TouchableOpacity",scroll:"ScrollView",list:"FlatList",a:"TouchableOpacity",ul:"View",ol:"View",li:"View",form:"View",header:"View",footer:"View",nav:"View",main:"View",section:"View",article:"View",aside:"View"},te={flexDirection:"flexDirection",justifyContent:"justifyContent",alignItems:"alignItems",alignSelf:"alignSelf",flexWrap:"flexWrap",flex:"flex",flexGrow:"flexGrow",flexShrink:"flexShrink",flexBasis:"flexBasis",backgroundColor:"backgroundColor",color:"color",fontSize:"fontSize",fontWeight:"fontWeight",fontStyle:"fontStyle",textAlign:"textAlign",lineHeight:"lineHeight",letterSpacing:"letterSpacing",padding:"padding",paddingTop:"paddingTop",paddingBottom:"paddingBottom",paddingLeft:"paddingLeft",paddingRight:"paddingRight",paddingHorizontal:"paddingHorizontal",paddingVertical:"paddingVertical",margin:"margin",marginTop:"marginTop",marginBottom:"marginBottom",marginLeft:"marginLeft",marginRight:"marginRight",marginHorizontal:"marginHorizontal",marginVertical:"marginVertical",width:"width",height:"height",minWidth:"minWidth",maxWidth:"maxWidth",minHeight:"minHeight",maxHeight:"maxHeight",borderRadius:"borderRadius",borderWidth:"borderWidth",borderColor:"borderColor",overflow:"overflow",opacity:"opacity",position:"position",top:"top",left:"left",right:"right",bottom:"bottom",zIndex:"zIndex",shadowColor:"shadowColor",shadowOffset:"shadowOffset",shadowOpacity:"shadowOpacity",shadowRadius:"shadowRadius"},ne={click:"onPress",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",change:"onChange",input:"onChangeText",focus:"onFocus",blur:"onBlur",submit:"onSubmitEditing",scroll:"onScroll",longpress:"onLongPress"},oe=0;function w(){return`native_${++oe}`}var v=class{createElement(e){return{type:this.getComponentType(e),props:{},children:[],nativeId:w()}}createText(e){return{type:"RawText",props:{text:e},children:[],nativeId:w()}}createComment(e){return{type:"__Comment",props:{text:e},children:[],nativeId:w()}}setAttribute(e,t,n){if(e){if(t==="style"&&typeof n=="object"&&n!==null){e.props.style={...e.props.style,...this.mapStyle(n)};return}if(t==="className"||t==="class"){e.props.className=n;return}if(t.startsWith("on")&&typeof n=="function"){let o=t.slice(2).toLowerCase(),r=this.mapEvent(o);e.props[r]=n;return}if(t==="src"&&e.type==="Image"){e.props.source={uri:n};return}if(t==="href"){e.props.href=n;return}if(t==="placeholder"){e.props.placeholder=n;return}e.props[t]=n}}removeAttribute(e,t){if(e)if(t==="style")delete e.props.style;else if(t.startsWith("on")){let n=t.slice(2).toLowerCase(),o=this.mapEvent(n);delete e.props[o]}else delete e.props[t]}setStyle(e,t){if(!e)return;let n=this.mapStyle(t);e.props.style={...e.props.style,...n}}setClass(e,t){if(e){if(typeof t=="string")e.props.className=t;else if(typeof t=="object"&&t!==null){let n=[];for(let[o,r]of Object.entries(t))r&&n.push(o);e.props.className=n.join(" ")}}}insert(e,t,n){D(e,t,n)}remove(e){H(e)}replace(e,t,n){M(e,t,n)}addEventListener(e,t,n,o){if(!e)return;let r=this.mapEvent(t);e.props[r]=n}removeEventListener(e,t,n){if(!e)return;let o=this.mapEvent(t);e.props[o]===n&&delete e.props[o]}nextTick(e){j(e)}parentNode(e){return W(e)}nextSibling(e){return U(e)}setText(e,t){e&&e.type==="RawText"&&(e.props.text=t)}patchProp(e,t,n,o){if(e){if(o==null){this.removeAttribute(e,t);return}if(t==="style")this.setStyle(e,o);else if(t==="class"||t==="className")this.setClass(e,o);else if(t.startsWith("on")&&typeof o=="function"){let r=t.slice(2).toLowerCase(),s=this.mapEvent(r);e.props[s]=o}else this.setAttribute(e,t,o)}}querySelector(e){return null}renderToNativeTree(e){if(!e)return this.createComment("empty vnode");if(typeof e=="string")return this.createText(e);if(e.type===Symbol.for("lyt.comment")||e.type==="comment")return this.createComment(e.children||"");if(e.type===Symbol.for("lyt.text")||e.type==="text")return this.createText(e.children||"");if(e.type===Symbol.for("lyt.fragment")||e.type==="fragment"){let t=this.createElement("__Fragment");if(Array.isArray(e.children))for(let n of e.children){let o=this.renderToNativeTree(n);this.insert(t,o)}return t}if(typeof e.type=="string"){let t=this.createElement(e.type);if(e.props)for(let[n,o]of Object.entries(e.props))n==="key"||n==="ref"||this.setAttribute(t,n,o);if(e.children){if(typeof e.children=="string")this.insert(t,this.createText(e.children));else if(Array.isArray(e.children))for(let n of e.children)this.insert(t,this.renderToNativeTree(n))}return t}if(typeof e.type=="object"||typeof e.type=="function"){let t=this.createElement("div");if(Array.isArray(e.children))for(let n of e.children)this.insert(t,this.renderToNativeTree(n));return t}return this.createComment("unknown vnode type")}serializeToJSON(e){let t=n=>{let o={type:n.type,props:{...n.props},children:n.children.map(t)};return n.nativeId&&(o.nativeId=n.nativeId),o};return JSON.stringify(t(e),null,2)}getComponentType(e){return ee[e]||ie(e)}mapStyle(e){let t={};for(let[n,o]of Object.entries(e)){let r=te[n]||n;typeof o=="string"&&/^\d+px$/.test(o)?t[r]=parseInt(o,10):t[r]=o}return t}mapEvent(e){return ne[e]||`on${e.charAt(0).toUpperCase()}${e.slice(1)}`}};function ie(i){return i.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join("")}var re=new v;export{_ as Comment,A as Fragment,v as NativeRenderer,x as PatchFlags,m as ShapeFlags,S as Text,Z as createRenderer,re as nativeRenderer};
1
+ import{registerDOMOperations as Q}from"@lytjs/vdom";var m=(s=>(s[s.ELEMENT=1]="ELEMENT",s[s.FUNCTIONAL_COMPONENT=2]="FUNCTIONAL_COMPONENT",s[s.STATEFUL_COMPONENT=4]="STATEFUL_COMPONENT",s[s.TEXT_CHILDREN=8]="TEXT_CHILDREN",s[s.ARRAY_CHILDREN=16]="ARRAY_CHILDREN",s[s.SLOTS_CHILDREN=32]="SLOTS_CHILDREN",s))(m||{}),v=(l=>(l[l.TEXT=1]="TEXT",l[l.CLASS=2]="CLASS",l[l.STYLE=4]="STYLE",l[l.PROPS=8]="PROPS",l[l.FULL_PROPS=16]="FULL_PROPS",l[l.STABLE_FRAGMENT=32]="STABLE_FRAGMENT",l[l.KEYED_FRAGMENT=64]="KEYED_FRAGMENT",l[l.UNKEYED_FRAGMENT=128]="UNKEYED_FRAGMENT",l[l.NEED_PATCH=256]="NEED_PATCH",l[l.DYNAMIC_SLOTS=512]="DYNAMIC_SLOTS",l[l.HOISTED=-1]="HOISTED",l[l.BAIL=-2]="BAIL",l))(v||{}),A=Symbol("Fragment"),S=Symbol("Text"),_=Symbol("Comment");function u(i){return i.type===A}function y(i){return i.type===S}function N(i){return i.type===_}function O(i,e){return i.type===e.type&&i.key===e.key}function C(i){return Array.isArray(i.dynamicChildren)}function I(i,e,t,n){if(t==="class")i.setClass(e,n);else if(t==="style")i.setStyle(e,n);else if(t.startsWith("on")||t.startsWith("@")){let o=t.startsWith("@")?t.slice(1).toLowerCase():t.slice(2).toLowerCase();i.addEventListener(e,o,n)}else t==="key"||t==="ref"||i.setAttribute(e,t,n)}function V(i,e,t,n,o){if(t==="class")i.setClass(e,n);else if(t==="style")i.setStyle(e,n||{});else if(t.startsWith("on")||t.startsWith("@")){let r=t.startsWith("@")?t.slice(1).toLowerCase():t.slice(2).toLowerCase();o&&i.removeEventListener(e,r,o),n&&i.addEventListener(e,r,n)}else i.setAttribute(e,t,n)}function E(i,e,t,n){for(let o in n){if(o==="key"||o==="ref")continue;let r=t[o],s=n[o];s!==r&&V(i,e,o,s,r)}for(let o in t)if(!(o==="key"||o==="ref")&&!(o in n))if(o==="class")i.setClass(e,"");else if(o==="style")i.setStyle(e,{});else if(o.startsWith("on")||o.startsWith("@")){let r=o.startsWith("@")?o.slice(1).toLowerCase():o.slice(2).toLowerCase();i.removeEventListener(e,r,t[o])}else i.removeAttribute(e,o)}function R(i,e,t,n,o,r){let{shapeFlag:s}=t;if(u(t)){Y(i,e,t,n,o,r);return}if(y(t)){let a=i.createText(t.children);t.el=a,i.insert(n,a,o);return}if(N(t)){let a=i.createComment(t.children);t.el=a,i.insert(n,a,o);return}if(s&1){B(i,e,t,n,o,r);return}if(s&6){z(e,t,n,o,r);return}}function B(i,e,t,n,o,r){let s=t.type,a=i.createElement(s);if(t.el=a,t.props)for(let c in t.props){let f=t.props[c];I(i,a,c,f)}let{shapeFlag:d,children:p}=t;d&8?a.textContent=p:d&16&&h(e,p,a,null,r),i.insert(n,a,o)}function h(i,e,t,n,o){for(let r=0;r<e.length;r++)i(null,e[r],t,n,o)}function Y(i,e,t,n,o,r){let{children:s}=t,a=i.createComment("");i.insert(n,a,o),Array.isArray(s)&&s.length>0&&h(e,s,n,a,r),t.el=a,t.anchor=a}function z(i,e,t,n,o){let r=e.component;r&&r.update&&r.update(),r&&r.subTree&&(i(null,r.subTree,t,n,r),e.el=r.subTree.el)}function k(i,e,t,n){let{shapeFlag:o,children:r}=t;if(u(t)){if(Array.isArray(r))for(let s=0;s<r.length;s++)e(r[s],n);t.anchor&&t.anchor.parentNode&&i.remove(t.anchor);return}if(o&6){t.component&&t.component.subTree&&e(t.component.subTree,n);return}t.el&&i.remove(t.el)}function g(i,e){for(let t=0;t<e.length;t++)i(e[t])}import{patchKeyedChildren as F,patchUnkeyedChildren as K}from"@lytjs/vdom";function T(i,e,t,n,o,r=null,s=null){if(n==null){t&&e(t,o);return}if(t===null){R(i,L(i,e),n,o,r,s);return}if(C(n)&&C(t)){q(i,e,t,n,o,s);return}if(!O(t,n)){e(t,o),R(i,L(i,e),n,o,r,s);return}n.el=t.el,n.anchor=t.anchor;let{shapeFlag:a}=n;if(u(n)){$(i,e,t,n,o,r,s);return}if(y(n)){n.children!==t.children&&(n.el.nodeValue=n.children);return}if(N(n)){n.children!==t.children&&(n.el.nodeValue=n.children);return}if(a&1){X(i,e,t,n,s);return}if(a&6){J(t,n,s);return}}function L(i,e){return(t,n,o,r,s)=>{T(i,e,t,n,o,r,s)}}function X(i,e,t,n,o=null){let r=n.el=t.el,s=t.props||{},a=n.props||{},{patchFlag:d,dynamicProps:p}=n;if(d&&d>0){if(d&1&&t.children!==n.children&&(r.textContent=n.children),d&2&&s.class!==a.class&&i.setClass(r,a.class),d&4&&s.style!==a.style&&i.setStyle(r,a.style||{}),d&8&&p)for(let c=0;c<p.length;c++){let f=p[c],l=s[f],b=a[f];b!==l&&V(i,r,f,b,l)}d&16&&E(i,r,s,a)}else E(i,r,s,a);(!d||!(d&1))&&P(i,e,t,n,r,null,o)}function P(i,e,t,n,o,r,s){let a=t.shapeFlag,d=n.shapeFlag,p=t.children,c=n.children;if(d&8){a&16&&g(e,p),p!==c&&(o.textContent=c);return}if(d&16){a&16?G(i,e,p,c,o,r,s):(a&8&&(o.textContent=""),h(L(i,e),c,o,r,s));return}c==null&&(a&8?o.textContent="":a&16&&g(e,p))}function G(i,e,t,n,o,r,s){n.every(d=>d.key!==null&&d.key!==void 0)&&t.every(d=>d.key!==null&&d.key!==void 0)?F(t,n,o,r,s,null,!1):K(t,n,o,r,s,null,!1)}function $(i,e,t,n,o,r,s){let a=t.children,d=n.children;Array.isArray(d)&&d.length>0?(P(i,e,t,n,o,r,s),n.el=d[0].el,n.anchor=d[d.length-1].el?i.nextSibling(d[d.length-1].el):r):Array.isArray(a)&&a.length>0&&d===null?(g(e,a),n.el=t.el,n.anchor=t.anchor):(n.el=t.el,n.anchor=t.anchor)}function q(i,e,t,n,o,r){let s=t.dynamicChildren,a=n.dynamicChildren;for(let d=0;d<a.length;d++)T(i,e,s[d],a[d],o,null,r)}function J(i,e,t){e.component=i.component,e.el=i.el,e.component&&e.component.update&&e.component.update()}function Z(i){function e(o,r){k(i,e,o,r)}Q({insert(o,r,s){i.insert(r,o,s)},createElement(o){return i.createElement(o)},createText(o){return i.createText(o)},setText(o,r){o.nodeValue=r},setElementText(o,r){o.textContent=r},remove(o){i.remove(o)},createComment(o){return i.createComment(o)},mount(o,r,s,a,d,p,c){n(null,o,r,s,a)},patch(o,r,s,a,d,p,c,f){n(o,r,s,a,d)},unmount(o,r,s,a){e(o)},move(o,r,s){i.insert(r,o.el,s)}});function n(o,r,s,a,d){T(i,e,o,r,s,a,d)}return{mount(o,r){r.nodeType===1&&(r.textContent=""),n(null,o,r,null,null)},patch(o,r,s){var a;n(o,r,s||((a=o.el)==null?void 0:a.parentNode),null,null)},unmount(o,r){e(o,r)}}}function D(i,e,t){if(!(!i||!e)){if(e._parent){let n=e._parent,o=n.children.indexOf(e);o!==-1&&n.children.splice(o,1)}if(e._parent=i,t){let n=i.children.indexOf(t);n!==-1?i.children.splice(n,0,e):i.children.push(e)}else i.children.push(e)}}function H(i){if(!i||!i._parent)return;let e=i._parent,t=e.children.indexOf(i);t!==-1&&e.children.splice(t,1),i._parent=void 0}function M(i,e,t){if(!i||!e||!t)return;let n=i.children.indexOf(e);n!==-1&&(e._parent=void 0,t._parent=i,i.children[n]=t)}function W(i){var e;return(e=i==null?void 0:i._parent)!=null?e:null}function j(i){if(!i||!i._parent)return null;let e=i._parent.children,t=e.indexOf(i);return t!==-1&&t+1<e.length?e[t+1]:null}function U(i){Promise.resolve().then(()=>i())}var ee={div:"View",span:"Text",p:"Text",h1:"Text",h2:"Text",h3:"Text",h4:"Text",h5:"Text",h6:"Text",img:"Image",input:"TextInput",textarea:"TextInput",button:"TouchableOpacity",scroll:"ScrollView",list:"FlatList",a:"TouchableOpacity",ul:"View",ol:"View",li:"View",form:"View",header:"View",footer:"View",nav:"View",main:"View",section:"View",article:"View",aside:"View"},te={flexDirection:"flexDirection",justifyContent:"justifyContent",alignItems:"alignItems",alignSelf:"alignSelf",flexWrap:"flexWrap",flex:"flex",flexGrow:"flexGrow",flexShrink:"flexShrink",flexBasis:"flexBasis",backgroundColor:"backgroundColor",color:"color",fontSize:"fontSize",fontWeight:"fontWeight",fontStyle:"fontStyle",textAlign:"textAlign",lineHeight:"lineHeight",letterSpacing:"letterSpacing",padding:"padding",paddingTop:"paddingTop",paddingBottom:"paddingBottom",paddingLeft:"paddingLeft",paddingRight:"paddingRight",paddingHorizontal:"paddingHorizontal",paddingVertical:"paddingVertical",margin:"margin",marginTop:"marginTop",marginBottom:"marginBottom",marginLeft:"marginLeft",marginRight:"marginRight",marginHorizontal:"marginHorizontal",marginVertical:"marginVertical",width:"width",height:"height",minWidth:"minWidth",maxWidth:"maxWidth",minHeight:"minHeight",maxHeight:"maxHeight",borderRadius:"borderRadius",borderWidth:"borderWidth",borderColor:"borderColor",overflow:"overflow",opacity:"opacity",position:"position",top:"top",left:"left",right:"right",bottom:"bottom",zIndex:"zIndex",shadowColor:"shadowColor",shadowOffset:"shadowOffset",shadowOpacity:"shadowOpacity",shadowRadius:"shadowRadius"},ne={click:"onPress",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",change:"onChange",input:"onChangeText",focus:"onFocus",blur:"onBlur",submit:"onSubmitEditing",scroll:"onScroll",longpress:"onLongPress"},oe=0;function w(){return`native_${++oe}`}var x=class{createElement(e){return{type:this.getComponentType(e),props:{},children:[],nativeId:w()}}createText(e){return{type:"RawText",props:{text:e},children:[],nativeId:w()}}createComment(e){return{type:"__Comment",props:{text:e},children:[],nativeId:w()}}setAttribute(e,t,n){if(e){if(t==="style"&&typeof n=="object"&&n!==null){e.props.style={...e.props.style,...this.mapStyle(n)};return}if(t==="className"||t==="class"){e.props.className=n;return}if(t.startsWith("on")&&typeof n=="function"){let o=t.slice(2).toLowerCase(),r=this.mapEvent(o);e.props[r]=n;return}if(t==="src"&&e.type==="Image"){e.props.source={uri:n};return}if(t==="href"){e.props.href=n;return}if(t==="placeholder"){e.props.placeholder=n;return}e.props[t]=n}}removeAttribute(e,t){if(e)if(t==="style")delete e.props.style;else if(t.startsWith("on")){let n=t.slice(2).toLowerCase(),o=this.mapEvent(n);delete e.props[o]}else delete e.props[t]}setStyle(e,t){if(!e)return;let n=this.mapStyle(t);e.props.style={...e.props.style,...n}}setClass(e,t){if(e){if(typeof t=="string")e.props.className=t;else if(typeof t=="object"&&t!==null){let n=[];for(let[o,r]of Object.entries(t))r&&n.push(o);e.props.className=n.join(" ")}}}insert(e,t,n){D(e,t,n)}remove(e){H(e)}replace(e,t,n){M(e,t,n)}addEventListener(e,t,n,o){if(!e)return;let r=this.mapEvent(t);e.props[r]=n}removeEventListener(e,t,n){if(!e)return;let o=this.mapEvent(t);e.props[o]===n&&delete e.props[o]}nextTick(e){U(e)}parentNode(e){return W(e)}nextSibling(e){return j(e)}setText(e,t){e&&e.type==="RawText"&&(e.props.text=t)}patchProp(e,t,n,o){if(e){if(o==null){this.removeAttribute(e,t);return}if(t==="style")this.setStyle(e,o);else if(t==="class"||t==="className")this.setClass(e,o);else if(t.startsWith("on")&&typeof o=="function"){let r=t.slice(2).toLowerCase(),s=this.mapEvent(r);e.props[s]=o}else this.setAttribute(e,t,o)}}querySelector(e){return null}renderToNativeTree(e){if(!e)return this.createComment("empty vnode");if(typeof e=="string")return this.createText(e);if(e.type===Symbol.for("lyt.comment")||e.type==="comment")return this.createComment(e.children||"");if(e.type===Symbol.for("lyt.text")||e.type==="text")return this.createText(e.children||"");if(e.type===Symbol.for("lyt.fragment")||e.type==="fragment"){let t=this.createElement("__Fragment");if(Array.isArray(e.children))for(let n of e.children){let o=this.renderToNativeTree(n);this.insert(t,o)}return t}if(typeof e.type=="string"){let t=this.createElement(e.type);if(e.props)for(let[n,o]of Object.entries(e.props))n==="key"||n==="ref"||this.setAttribute(t,n,o);if(e.children){if(typeof e.children=="string")this.insert(t,this.createText(e.children));else if(Array.isArray(e.children))for(let n of e.children)this.insert(t,this.renderToNativeTree(n))}return t}if(typeof e.type=="object"||typeof e.type=="function"){let t=this.createElement("div");if(Array.isArray(e.children))for(let n of e.children)this.insert(t,this.renderToNativeTree(n));return t}return this.createComment("unknown vnode type")}serializeToJSON(e){let t=n=>{let o={type:n.type,props:{...n.props},children:n.children.map(t)};return n.nativeId&&(o.nativeId=n.nativeId),o};return JSON.stringify(t(e),null,2)}getComponentType(e){return ee[e]||ie(e)}mapStyle(e){let t={};for(let[n,o]of Object.entries(e)){let r=te[n]||n;typeof o=="string"&&/^\d+px$/.test(o)?t[r]=parseInt(o,10):t[r]=o}return t}mapEvent(e){return ne[e]||`on${e.charAt(0).toUpperCase()}${e.slice(1)}`}};function ie(i){return i.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join("")}var re=new x;export{_ as Comment,A as Fragment,x as NativeRenderer,v as PatchFlags,m as ShapeFlags,S as Text,Z as createRenderer,re as nativeRenderer};
package/dist/ssr.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var U=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var ke=Object.getOwnPropertyNames;var De=Object.prototype.hasOwnProperty;var Pe=(t,e)=>{for(var n in e)U(t,n,{get:e[n],enumerable:!0})},Fe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ke(e))!De.call(t,o)&&o!==n&&U(t,o,{get:()=>e[o],enumerable:!(r=ve(e,o))||r.enumerable});return t};var je=t=>Fe(U({},"__esModule",{value:!0}),t);var bt={};Pe(bt,{Comment:()=>X,Fragment:()=>Y,PatchFlags:()=>M,ShapeFlags:()=>C,StringRenderer:()=>_,Text:()=>z,clearIslandRegistry:()=>Ie,clearMismatchWarnings:()=>we,createHydrationIsland:()=>Oe,createRenderer:()=>pe,getHydrateStats:()=>Ee,getIslandRegistry:()=>Me,getMismatchWarnings:()=>$e,hydrate:()=>Ce,hydrateAllIslands:()=>Ae,hydrateIsland:()=>le,isHydrating:()=>Le,onHydrated:()=>be,registerIslandComponent:()=>xe,renderToStream:()=>he,renderToStreamGenerator:()=>Ne,renderToString:()=>ge,resetHydrateStats:()=>ie,setHydrating:()=>Ve,ssrRenderer:()=>Te,unmountIsland:()=>_e});module.exports=je(bt);var me=require("@lytjs/vdom");var C=(i=>(i[i.ELEMENT=1]="ELEMENT",i[i.FUNCTIONAL_COMPONENT=2]="FUNCTIONAL_COMPONENT",i[i.STATEFUL_COMPONENT=4]="STATEFUL_COMPONENT",i[i.TEXT_CHILDREN=8]="TEXT_CHILDREN",i[i.ARRAY_CHILDREN=16]="ARRAY_CHILDREN",i[i.SLOTS_CHILDREN=32]="SLOTS_CHILDREN",i))(C||{}),M=(u=>(u[u.TEXT=1]="TEXT",u[u.CLASS=2]="CLASS",u[u.STYLE=4]="STYLE",u[u.PROPS=8]="PROPS",u[u.FULL_PROPS=16]="FULL_PROPS",u[u.STABLE_FRAGMENT=32]="STABLE_FRAGMENT",u[u.KEYED_FRAGMENT=64]="KEYED_FRAGMENT",u[u.UNKEYED_FRAGMENT=128]="UNKEYED_FRAGMENT",u[u.NEED_PATCH=256]="NEED_PATCH",u[u.DYNAMIC_SLOTS=512]="DYNAMIC_SLOTS",u[u.HOISTED=-1]="HOISTED",u[u.BAIL=-2]="BAIL",u))(M||{}),Y=Symbol("Fragment"),z=Symbol("Text"),X=Symbol("Comment");function R(t){return t.type===Y}function I(t){return t.type===z}function O(t){return t.type===X}function de(t,e){return t.type===e.type&&t.key===e.key}function q(t){return Array.isArray(t.dynamicChildren)}function ue(t,e,n,r){if(n==="class")t.setClass(e,r);else if(n==="style")t.setStyle(e,r);else if(n.startsWith("on")||n.startsWith("@")){let o=n.startsWith("@")?n.slice(1).toLowerCase():n.slice(2).toLowerCase();t.addEventListener(e,o,r)}else n==="key"||n==="ref"||t.setAttribute(e,n,r)}function B(t,e,n,r,o){if(n==="class")t.setClass(e,r);else if(n==="style")t.setStyle(e,r||{});else if(n.startsWith("on")||n.startsWith("@")){let s=n.startsWith("@")?n.slice(1).toLowerCase():n.slice(2).toLowerCase();o&&t.removeEventListener(e,s,o),r&&t.addEventListener(e,s,r)}else t.setAttribute(e,n,r)}function J(t,e,n,r){for(let o in r){if(o==="key"||o==="ref")continue;let s=n[o],i=r[o];i!==s&&B(t,e,o,i,s)}for(let o in n)if(!(o==="key"||o==="ref")&&!(o in r))if(o==="class")t.setClass(e,"");else if(o==="style")t.setStyle(e,{});else if(o.startsWith("on")||o.startsWith("@")){let s=o.startsWith("@")?o.slice(1).toLowerCase():o.slice(2).toLowerCase();t.removeEventListener(e,s,n[o])}else t.removeAttribute(e,o)}function K(t,e,n,r,o,s){let{shapeFlag:i}=n;if(R(n)){Ge(t,e,n,r,o,s);return}if(I(n)){let a=t.createText(n.children);n.el=a,t.insert(r,a,o);return}if(O(n)){let a=t.createComment(n.children);n.el=a,t.insert(r,a,o);return}if(i&1){We(t,e,n,r,o,s);return}if(i&6){Ue(e,n,r,o,s);return}}function We(t,e,n,r,o,s){let i=n.type,a=t.createElement(i);if(n.el=a,n.props)for(let d in n.props){let f=n.props[d];ue(t,a,d,f)}let{shapeFlag:l,children:c}=n;l&8?a.textContent=c:l&16&&$(e,c,a,null,s),t.insert(r,a,o)}function $(t,e,n,r,o){for(let s=0;s<e.length;s++)t(null,e[s],n,r,o)}function Ge(t,e,n,r,o,s){let{children:i}=n,a=t.createComment("");t.insert(r,a,o),Array.isArray(i)&&i.length>0&&$(e,i,r,a,s),n.el=a,n.anchor=a}function Ue(t,e,n,r,o){let s=e.component;s&&s.update&&s.update(),s&&s.subTree&&(t(null,s.subTree,n,r,s),e.el=s.subTree.el)}function ye(t,e,n,r){let{shapeFlag:o,children:s}=n;if(R(n)){if(Array.isArray(s))for(let i=0;i<s.length;i++)e(s[i],r);n.anchor&&n.anchor.parentNode&&t.remove(n.anchor);return}if(o&6){n.component&&n.component.subTree&&e(n.component.subTree,r);return}n.el&&t.remove(n.el)}function w(t,e){for(let n=0;n<e.length;n++)t(e[n])}var v=require("@lytjs/vdom");function k(t,e,n,r,o,s=null,i=null){if(r==null){n&&e(n,o);return}if(n===null){K(t,Q(t,e),r,o,s,i);return}if(q(r)&&q(n)){qe(t,e,n,r,o,i);return}if(!de(n,r)){e(n,o),K(t,Q(t,e),r,o,s,i);return}r.el=n.el,r.anchor=n.anchor;let{shapeFlag:a}=r;if(R(r)){Xe(t,e,n,r,o,s,i);return}if(I(r)){r.children!==n.children&&(r.el.nodeValue=r.children);return}if(O(r)){r.children!==n.children&&(r.el.nodeValue=r.children);return}if(a&1){Ye(t,e,n,r,i);return}if(a&6){Be(n,r,i);return}}function Q(t,e){return(n,r,o,s,i)=>{k(t,e,n,r,o,s,i)}}function Ye(t,e,n,r,o=null){let s=r.el=n.el,i=n.props||{},a=r.props||{},{patchFlag:l,dynamicProps:c}=r;if(l&&l>0){if(l&1&&n.children!==r.children&&(s.textContent=r.children),l&2&&i.class!==a.class&&t.setClass(s,a.class),l&4&&i.style!==a.style&&t.setStyle(s,a.style||{}),l&8&&c)for(let d=0;d<c.length;d++){let f=c[d],u=i[f],N=a[f];N!==u&&B(t,s,f,N,u)}l&16&&J(t,s,i,a)}else J(t,s,i,a);(!l||!(l&1))&&fe(t,e,n,r,s,null,o)}function fe(t,e,n,r,o,s,i){let a=n.shapeFlag,l=r.shapeFlag,c=n.children,d=r.children;if(l&8){a&16&&w(e,c),c!==d&&(o.textContent=d);return}if(l&16){a&16?ze(t,e,c,d,o,s,i):(a&8&&(o.textContent=""),$(Q(t,e),d,o,s,i));return}d==null&&(a&8?o.textContent="":a&16&&w(e,c))}function ze(t,e,n,r,o,s,i){r.every(l=>l.key!==null&&l.key!==void 0)&&n.every(l=>l.key!==null&&l.key!==void 0)?(0,v.patchKeyedChildren)(n,r,o,s,i,null,!1):(0,v.patchUnkeyedChildren)(n,r,o,s,i,null,!1)}function Xe(t,e,n,r,o,s,i){let a=n.children,l=r.children;Array.isArray(l)&&l.length>0?(fe(t,e,n,r,o,s,i),r.el=l[0].el,r.anchor=l[l.length-1].el?t.nextSibling(l[l.length-1].el):s):Array.isArray(a)&&a.length>0&&l===null?(w(e,a),r.el=n.el,r.anchor=n.anchor):(r.el=n.el,r.anchor=n.anchor)}function qe(t,e,n,r,o,s){let i=n.dynamicChildren,a=r.dynamicChildren;for(let l=0;l<a.length;l++)k(t,e,i[l],a[l],o,null,s)}function Be(t,e,n){e.component=t.component,e.el=t.el,e.component&&e.component.update&&e.component.update()}function pe(t){function e(o,s){ye(t,e,o,s)}(0,me.registerDOMOperations)({insert(o,s,i){t.insert(s,o,i)},createElement(o){return t.createElement(o)},createText(o){return t.createText(o)},setText(o,s){o.nodeValue=s},setElementText(o,s){o.textContent=s},remove(o){t.remove(o)},createComment(o){return t.createComment(o)},mount(o,s,i,a,l,c,d){r(null,o,s,i,a)},patch(o,s,i,a,l,c,d,f){r(o,s,i,a,l)},unmount(o,s,i,a){e(o)},move(o,s,i){t.insert(s,o.el,i)}});function r(o,s,i,a,l){k(t,e,o,s,i,a,l)}return{mount(o,s){s.nodeType===1&&(s.textContent=""),r(null,o,s,null,null)},patch(o,s,i){var a;r(o,s,i||((a=o.el)==null?void 0:a.parentNode),null,null)},unmount(o,s){e(o,s)}}}var h=require("@lytjs/vdom"),P=require("@lytjs/common"),Z=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Je={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ke=/[&<>"']/g;var Qe=0;function y(t){return t.replace(Ke,e=>Je[e])}function Ze(t,e){return t.startsWith("on")||t.startsWith("@")||t==="key"||t==="ref"||t==="__vccOpts"||t.startsWith("__")?"":e===!0?t:e===!1||e===null||e===void 0?"":t==="class"?`class="${y((0,P.normalizeClass)(e))}"`:t==="style"?`style="${y((0,P.normalizeStyle)(e))}"`:t==="dangerouslySetInnerHTML"||t==="innerHTML"?"":`${t}="${y(String(e))}"`}function ee(t){if(!t)return"";let e=[];for(let n in t){let r=t[n],o=Ze(n,r);o&&e.push(o)}return e.length>0?" "+e.join(" "):""}var _=class{createElement(e){return{tag:e,props:{},children:[]}}createText(e){return{type:"text",value:e}}createComment(e){return{type:"comment",value:e}}insert(e,n,r){e.children.push(n)}renderToString(e){return m(e)}async*renderToStream(e){yield*D(e)}};function m(t){if(t==null)return"";let{type:e,props:n,children:r}=t;return typeof e=="symbol"&&String(e)==="Symbol(Fragment)"?Array.isArray(r)?r.map(o=>m(o)).join(""):"":typeof e=="symbol"&&String(e).includes("Text")?y(String(r||"")):typeof e=="symbol"&&String(e).includes("Comment")?`<!--${String(r||"")}-->`:typeof e=="string"?et(e,n,r,t):typeof e=="object"&&e!==null||typeof e=="function"?H(t):""}function et(t,e,n,r){let o=ee(e);if(Z.has(t))return`<${t}${o} />`;if(e&&(e.dangerouslySetInnerHTML||e.innerHTML)){let a=e.dangerouslySetInnerHTML?e.dangerouslySetInnerHTML.__html||e.dangerouslySetInnerHTML:e.innerHTML;return`<${t}${o}>${y(String(a))}</${t}>`}let s="",i=r.shapeFlag||0;return i&h.ShapeFlags.TEXT_CHILDREN?s=y(String(n||"")):i&h.ShapeFlags.ARRAY_CHILDREN&&Array.isArray(n)?s=n.map(a=>m(a)).join(""):i&h.ShapeFlags.SLOTS_CHILDREN&&typeof n=="object"&&n!==null?s=te(n):typeof n=="string"?s=y(n):Array.isArray(n)?s=n.map(a=>m(a)).join(""):typeof n=="number"&&(s=y(String(n))),`<${t}${o}>${s}</${t}>`}function te(t){let e=[];for(let n in t){let r=t[n];if(typeof r=="function"){let o=r();Array.isArray(o)?e.push(o.map(s=>m(s)).join("")):o!=null&&e.push(m(o))}else Array.isArray(r)?e.push(r.map(o=>m(o)).join("")):r!=null&&e.push(m(r))}return e.join("")}function H(t){let e=t.type;if(e&&e.__island)return tt(t,e);if(typeof e=="function"){let n=e(t.props||{},{slots:t.children||{}});return m(n)}if(typeof e=="object"&&e!==null){if(typeof e.render=="function"){let n=e.render(t.props||{},{slots:t.children||{},emit:()=>{}});return m(n)}if(typeof e.setup=="function"){let n=e.setup(t.props||{},{emit:()=>{},slots:t.children||{}});if(typeof n=="function"){let r=n();return m(r)}if(typeof e.render=="function"){let r=e.render(n||{},{slots:t.children||{},emit:()=>{}});return m(r)}}}return t.component&&t.component.subTree?m(t.component.subTree):"<!---->"}function tt(t,e){var N;let n=e.name||((N=t.props)==null?void 0:N["data-island-id"])||"anonymous",r=t.props||{},o=r["data-hydrate-when"]||e.__hydrateWhen||"",s=e.__islandTag||"div",i={};for(let T in r)T==="data-hydrate-when"||T==="data-island-id"||(i[T]=r[T]);let a=JSON.stringify(i),l=y(a),c="";if(typeof e.render=="function"){let T=e.render(r,{slots:t.children||{},emit:()=>{}});c=m(T)}else if(typeof e=="function"){let T=e(r,{slots:t.children||{}});c=m(T)}let d=o?` data-hydrate-when="${y(o)}"`:"",f=`<${s} data-hydrate="${y(n)}" data-props="${l}"${d}>${c}</${s}>`,u=`<script type="application/json" data-hydrate-props="${y(n)}">${a}<\/script>`;return f+u}async function*D(t){if(t==null)return;let{type:e,props:n,children:r}=t;if(typeof e=="symbol"&&String(e)==="Symbol(Fragment)"){if(Array.isArray(r))for(let o of r)yield*D(o);return}if(typeof e=="symbol"&&String(e).includes("Text")){yield y(String(r||""));return}if(typeof e=="symbol"&&String(e).includes("Comment")){yield`<!--${String(r||"")}-->`;return}if(typeof e=="string"){yield*nt(e,n,r,t);return}if(typeof e=="object"||typeof e=="function"){yield H(t);return}}async function*nt(t,e,n,r){let o=ee(e);if(Z.has(t)){yield`<${t}${o} />`;return}if(e&&(e.dangerouslySetInnerHTML||e.innerHTML)){let i=e.dangerouslySetInnerHTML?e.dangerouslySetInnerHTML.__html||e.dangerouslySetInnerHTML:e.innerHTML;yield`<${t}${o}>${y(String(i))}</${t}>`;return}yield`<${t}${o}>`;let s=r.shapeFlag||0;if(s&h.ShapeFlags.TEXT_CHILDREN)yield y(String(n||""));else if(s&h.ShapeFlags.ARRAY_CHILDREN&&Array.isArray(n))for(let i of n)yield*D(i);else if(s&h.ShapeFlags.SLOTS_CHILDREN&&typeof n=="object"&&n!==null)yield te(n);else if(typeof n=="string")yield y(n);else if(Array.isArray(n))for(let i of n)yield*D(i);else typeof n=="number"&&(yield y(String(n)));yield`</${t}>`}function ge(t){return m(t)}function he(t,e){let n=(e==null?void 0:e.suspenseIdPrefix)||"suspense",r=S(t,n);return new ReadableStream({async pull(o){let{value:s,done:i}=await r.next();i?o.close():o.enqueue(s)},async cancel(){await r.return(void 0)}})}async function*Ne(t,e){let n=(e==null?void 0:e.suspenseIdPrefix)||"suspense";yield*S(t,n)}async function*S(t,e){if(t==null)return;let{type:n,props:r,children:o}=t;if(typeof n=="symbol"&&String(n)==="Symbol(Fragment)"){if(Array.isArray(o))for(let s of o)yield*S(s,e);return}if(typeof n=="symbol"&&String(n).includes("Text")){yield y(String(o||""));return}if(typeof n=="symbol"&&String(n).includes("Comment")){yield`<!--${String(o||"")}-->`;return}if(typeof n=="string"){yield*rt(n,r,o,t,e);return}if(typeof n=="object"&&n!==null){let s=n;if(s.name==="Suspense"||s._isSuspense){yield*ot(t,e);return}if(s._isAsyncComponent||s.__asyncSetup){yield*st(t,e);return}yield H(t);return}if(typeof n=="function"){yield H(t);return}}async function*rt(t,e,n,r,o){let s=ee(e);if(Z.has(t)){yield`<${t}${s} />`;return}if(e&&(e.dangerouslySetInnerHTML||e.innerHTML)){let a=e.dangerouslySetInnerHTML?e.dangerouslySetInnerHTML.__html||e.dangerouslySetInnerHTML:e.innerHTML;yield`<${t}${s}>${y(String(a))}</${t}>`;return}yield`<${t}${s}>`;let i=r.shapeFlag||0;if(i&h.ShapeFlags.TEXT_CHILDREN)yield y(String(n||""));else if(i&h.ShapeFlags.ARRAY_CHILDREN&&Array.isArray(n))for(let a of n)yield*S(a,o);else if(i&h.ShapeFlags.SLOTS_CHILDREN&&typeof n=="object"&&n!==null)yield te(n);else if(typeof n=="string")yield y(n);else if(Array.isArray(n))for(let a of n)yield*S(a,o);else typeof n=="number"&&(yield y(String(n)));yield`</${t}>`}async function*ot(t,e){let n=`${e}-${Qe++}`,o=(t.props||{}).fallback,s="";o&&(typeof o=="object"&&o!==null?s=m(o):typeof o=="string"&&(s=o));let i=t.children,a=[];if(typeof i=="object"&&i!==null){if(Array.isArray(i))a=i;else if(typeof i.default=="function"){let d=i.default();Array.isArray(d)?a=d:d!=null&&(a=[d])}}let l=[];function c(d){for(let f of d){if(f==null)continue;let u=f.type;if(u&&(u._isAsyncComponent||u.__asyncSetup||f.__asyncSetup)){let N=f.__asyncPromise||u.__asyncPromise;N&&l.push(N.then(()=>{}))}}}if(c(a),l.length===0){for(let d of a)yield*S(d,e);return}yield`<!--${n}-fallback-->`,yield s,await Promise.all(l),yield`<!--${n}-resolved-->`;for(let d of a)yield*S(d,e);yield`<!--/${n}-->`}async function*st(t,e){let n=t.type,r=t.__asyncPromise||n.__asyncPromise;if(r)try{await r}catch(o){yield"<!--async-component-error-->";return}yield H(t)}var Te=new _;var W=require("@lytjs/common"),j={ELEMENT:1,FUNCTIONAL_COMPONENT:2,STATEFUL_COMPONENT:4,TEXT_CHILDREN:8,ARRAY_CHILDREN:16,SLOTS_CHILDREN:32},g=!1,se=[],ne=!1,p={success:!0,mismatches:0,hydratedNodes:0};function Le(){return g}function Ve(t){g=t}function Ee(){return{...p}}function ie(){p={success:!0,mismatches:0,hydratedNodes:0}}function be(t){g?se.push(t):t()}function Ce(t,e,n={}){ie(),n.onHydrated&&se.push(n.onHydrated),g=!0;try{let r=e.firstElementChild;return r?(t._vnode||t.mount(e),t._vnode&&V(r,t._vnode,n),g=!1,re(),p):(g=!1,t.mount(e),p.success=!1,re(),p)}catch(r){return g=!1,p.success=!1,e.innerHTML="",t.mount(e),re(),p}}function re(){if(ne)return;ne=!0;let t=se.splice(0);for(let e of t)try{e()}catch(n){}ne=!1}function V(t,e,n){if(ft(e)){ct(t,e,n);return}if(mt(e)){at(t,e,n);return}if(pt(e)){lt(t,e,n);return}if(gt(e)){dt(t,e,n);return}if(typeof e.type=="string"){it(t,e,n);return}}function it(t,e,n){let r=t.tagName.toLowerCase(),o=e.type.toLowerCase();if(r!==o){G(t,e,`\u6807\u7B7E\u4E0D\u5339\u914D: DOM "${r}" vs VNode "${o}"`,n);return}e.el=t,e.props&&ae(t,e.props),e.ref&&yt(t,e.ref),ut(t,e,n),p.hydratedNodes++}function at(t,e,n){if(t.nodeType!==3){G(t,e,"\u671F\u671B\u6587\u672C\u8282\u70B9",n);return}e.el=t;let r=t.nodeValue||"",o=String(e.children||"");r!==o&&(t.nodeValue=o,n.strict),p.hydratedNodes++}function lt(t,e,n){if(t.nodeType!==8){G(t,e,"\u671F\u671B\u6CE8\u91CA\u8282\u70B9",n);return}e.el=t;let r=t.nodeValue||"",o=String(e.children||"");r!==o&&(t.nodeValue=o),p.hydratedNodes++}function ct(t,e,n){if(!Array.isArray(e.children))return;let r=Array.from(t.childNodes);for(let o=0;o<e.children.length;o++){let s=e.children[o],i=r[o];if(!i){p.mismatches++;break}V(i,s,n)}}function dt(t,e,n){if(e.component&&e.component.subTree){V(t,e.component.subTree,n),e.el=e.component.subTree.el;return}let r=e.type;if(typeof r=="function")try{let o=r(e.props||{},{slots:e.children||{}});if(o){V(t,o,n),e.el=o.el;return}}catch(o){}if(typeof r=="object"&&r!==null&&typeof r.render=="function")try{let o=r.render(e.props||{},{slots:e.children||{},emit:()=>{}});if(o){V(t,o,n),e.el=o.el;return}}catch(o){}G(t,e,"\u7EC4\u4EF6\u65E0\u6CD5\u83B7\u53D6 subTree",n)}function ut(t,e,n){if(!e.children)return;let r=e.shapeFlag||0;if(typeof e.children=="string"||r&j.TEXT_CHILDREN){let o=t.textContent||"",s=String(e.children||"");o!==s&&(t.textContent=s,n.strict);return}if(Array.isArray(e.children)){let o=Array.from(t.childNodes),s=0;for(let i=0;i<o.length&&s<e.children.length;i++){let a=e.children[s];if(a==null){s++;continue}V(o[i],a,n),s++}s<e.children.length&&p.mismatches++}r&j.SLOTS_CHILDREN&&typeof e.children=="object"&&e.children}function ae(t,e){for(let n in e){let r=e[n];if(n.startsWith("on")&&typeof r=="function"){let o=n.slice(2).toLowerCase();t.addEventListener(o,r)}}}function yt(t,e){typeof e=="function"?e(t):e&&typeof e=="object"&&(e.current=t)}function ft(t){return typeof t.type=="symbol"&&String(t.type)==="Symbol(Fragment)"}function mt(t){return typeof t.type=="symbol"&&String(t.type).includes("Text")}function pt(t){return typeof t.type=="symbol"&&String(t.type).includes("Comment")}function gt(t){return!!((t.shapeFlag||0)&(j.STATEFUL_COMPONENT|j.FUNCTIONAL_COMPONENT)||typeof t.type=="object"&&t.type!==null||typeof t.type=="function")}function G(t,e,n,r){let o=`[lyt] \u6CE8\u6C34\u4E0D\u5339\u914D: ${n}`;if(p.mismatches++,r.strict)throw new W.LytError(W.LytErrorCodes.LYT_SSR_HYDRATION_ERROR,o)}var b=new Map,x=new Map,Re={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ht=/[&<>"']/g;function E(t){return t.replace(ht,e=>Re[e])}function oe(t){return t.replace(/[&<>"']/g,e=>Re[e])}function le(t,e,n={}){let r=typeof document!="undefined"?document:null;if(!r)return{success:!1,mismatches:0,hydratedNodes:0};let o=r.querySelector(t);if(!o)return{success:!1,mismatches:0,hydratedNodes:0};let s=o.getAttribute("data-hydrate");if(!s)return{success:!1,mismatches:0,hydratedNodes:0};if(o.hasAttribute("data-hydrated"))return{success:!0,mismatches:0,hydratedNodes:0};let i=Nt(s,r);if(i===null)return{success:!1,mismatches:0,hydratedNodes:0};let a=o.getAttribute("data-hydrate-when");return a||n.lazy?Tt(o,s,e,i,a||"visible",n):L(o,s,e,i,n)}function Nt(t,e){let n=e.querySelector(`script[type="application/json"][data-hydrate-props="${t}"]`);if(!n){let r=e.querySelector(`[data-hydrate="${t}"]`);if(r){let o=r.getAttribute("data-props");if(o)try{return JSON.parse(o)}catch(s){return null}}return{}}try{return JSON.parse(n.textContent||"{}")}catch(r){return null}}function L(t,e,n,r,o){let s={success:!0,mismatches:0,hydratedNodes:0};try{g=!0;let i=null;if(typeof n.render=="function")i=n.render(r,{slots:n.slots||{},emit:()=>{}});else if(typeof n.setup=="function"){let l=n.setup(r,{emit:()=>{},slots:n.slots||{}});typeof l=="function"&&(i=l())}if(!i)return g=!1,s.success=!1,s;if(o.dev!==!1){let l=Lt(t,i,e);s.mismatches=l}V(t,i,o),s.hydratedNodes=p.hydratedNodes,i.props&&ae(t,i.props),F(t,i),t.setAttribute("data-hydrated","");let a={id:e,hydrated:!0,instance:n,eventListeners:[],timeoutId:null,observer:null,interactionHandler:null};return b.set(e,a),x.set(e,n),g=!1,o.onHydrated&&o.onHydrated(),s}catch(i){return g=!1,s.success=!1,s}}function F(t,e){if(!(!e.children||typeof e.children=="string")&&Array.isArray(e.children)){let n=Array.from(t.children),r=0;for(let o=0;o<n.length&&r<e.children.length;o++){let s=e.children[r];if(s==null){r++;continue}if(typeof s.type=="string"&&s.props)ae(n[o],s.props),F(n[o],s);else if(typeof s.type=="object"||typeof s.type=="function"){let i=s.type;if(typeof i=="function")try{let a=i(s.props||{},{slots:s.children||{}});a&&n[o]&&F(n[o],a)}catch(a){}else if(i&&typeof i.render=="function")try{let a=i.render(s.props||{},{slots:s.children||{},emit:()=>{}});a&&n[o]&&F(n[o],a)}catch(a){}}r++}}}function Tt(t,e,n,r,o,s){let i={success:!0,mismatches:0,hydratedNodes:0},a=null;s.timeout&&s.timeout>0&&(a=setTimeout(()=>{He(t,e),L(t,e,n,r,s)},s.timeout));let l={id:e,hydrated:!1,instance:n,eventListeners:[],timeoutId:a,observer:null,interactionHandler:null};switch(b.set(e,l),x.set(e,n),o){case"visible":{if(typeof IntersectionObserver!="undefined"){let c=new IntersectionObserver(d=>{for(let f of d)f.isIntersecting&&(c.unobserve(f.target),l.observer=null,a&&clearTimeout(a),l.timeoutId=null,L(t,e,n,r,s))},{rootMargin:"200px"});c.observe(t),l.observer=c}else a&&clearTimeout(a),L(t,e,n,r,s);break}case"idle":{(d=>{typeof requestIdleCallback!="undefined"?requestIdleCallback(d,{timeout:s.timeout||2e3}):setTimeout(d,1)})(()=>{a&&clearTimeout(a),l.timeoutId=null,t.hasAttribute("data-hydrated")||L(t,e,n,r,s)});break}case"interaction":{let c=()=>{a&&clearTimeout(a),l.timeoutId=null,l.interactionHandler=null,document.removeEventListener("click",c),document.removeEventListener("keydown",c),document.removeEventListener("scroll",c),document.removeEventListener("touchstart",c),t.hasAttribute("data-hydrated")||L(t,e,n,r,s)};document.addEventListener("click",c,{once:!1,passive:!0}),document.addEventListener("keydown",c,{once:!1,passive:!0}),document.addEventListener("scroll",c,{once:!1,passive:!0}),document.addEventListener("touchstart",c,{once:!1,passive:!0}),l.interactionHandler=c;break}default:a&&clearTimeout(a),L(t,e,n,r,s)}return i}function He(t,e){let n=b.get(e);n&&(n.observer&&(n.observer.disconnect(),n.observer=null),n.timeoutId!==null&&(clearTimeout(n.timeoutId),n.timeoutId=null),n.interactionHandler&&(document.removeEventListener("click",n.interactionHandler),document.removeEventListener("keydown",n.interactionHandler),document.removeEventListener("scroll",n.interactionHandler),document.removeEventListener("touchstart",n.interactionHandler),n.interactionHandler=null))}function Ae(t={}){let e=typeof document!="undefined"?document:null;if(!e)return{success:!1,mismatches:0,hydratedNodes:0};let n=e.querySelectorAll("[data-hydrate]:not([data-hydrated])"),r={success:!0,mismatches:0,hydratedNodes:0};return n.forEach(o=>{let s=o.getAttribute("data-hydrate");if(!s){r.success=!1;return}let i=x.get(s);if(!i){r.success=!1;return}let a=le(`[data-hydrate="${s}"]`,i,t);r.mismatches+=a.mismatches,r.hydratedNodes+=a.hydratedNodes,a.success||(r.success=!1)}),r}function xe(t,e){x.set(t,e)}function _e(t){if(!b.get(t))return;let n=typeof document!="undefined"?document.querySelector(`[data-hydrate="${t}"]`):null;n&&(He(n,t),n.removeAttribute("data-hydrated")),b.delete(t),x.delete(t)}function Me(){return b}function Ie(){b.clear(),x.clear()}function Oe(t,e={},n="div",r){let o=t.name||"anonymous",s=JSON.stringify(e),i=E(s),a="";if(typeof t.render=="function"){let u=t.render(e,{slots:t.slots||{},emit:()=>{}});a=A(u)}let l=r?` data-hydrate-when="${oe(r)}"`:"",c=oe(o),d=`<${n} data-hydrate="${c}" data-props="${i}"${l}>${a}</${n}>`,f=`<script type="application/json" data-hydrate-props="${c}">${s}<\/script>`;return d+f}function A(t){if(t==null)return"";let{type:e,props:n,children:r}=t;if(typeof e=="symbol"&&String(e)==="Symbol(Fragment)")return Array.isArray(r)?r.map(o=>A(o)).join(""):"";if(typeof e=="symbol"&&String(e).includes("Text"))return E(String(r||""));if(typeof e=="symbol"&&String(e).includes("Comment"))return`<!--${oe(String(r||""))}-->`;if(typeof e=="string"){let o=St(n);if(new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]).has(e))return`<${e}${o} />`;let i="";return typeof r=="string"?i=E(r):Array.isArray(r)?i=r.map(a=>A(a)).join(""):typeof r=="number"&&(i=E(String(r))),`<${e}${o}>${i}</${e}>`}if(typeof e=="function"){let o=e(n||{},{slots:r||{}});return A(o)}if(typeof e=="object"&&e!==null){let o=e;if(typeof o.render=="function"){let s=o.render(n||{},{slots:r||{},emit:()=>{}});return A(s)}}return""}function St(t){if(!t)return"";let e=[];for(let n in t){let r=t[n];if(!(n.startsWith("on")||n.startsWith("@")||n==="key"||n==="ref")&&!(n==="__vccOpts"||n.startsWith("__"))&&!(n==="dangerouslySetInnerHTML"||n==="innerHTML"))if(r===!0)e.push(n);else{if(r===!1||r===null||r===void 0)continue;n==="class"&&typeof r=="string"?e.push(`class="${E(r)}"`):n==="style"&&typeof r=="string"?e.push(`style="${E(r)}"`):e.push(`${n}="${E(String(r))}"`)}}return e.length>0?" "+e.join(" "):""}var ce=[];function Lt(t,e,n){let r=0,o=Vt(t),s=A(e);if(o!==s){r++;let i={islandId:n,expected:s,actual:o,suggestion:Et(o,s,n)};ce.push(i)}return r}function Vt(t){let e=t.cloneNode(!0);return e.removeAttribute("data-hydrate"),e.removeAttribute("data-props"),e.removeAttribute("data-hydrate-when"),e.removeAttribute("data-hydrated"),e.innerHTML}function Et(t,e,n){if(t.trim()==="")return`\u670D\u52A1\u7AEF\u6E32\u67D3\u4E3A\u7A7A\uFF0C\u8BF7\u68C0\u67E5\u7EC4\u4EF6 "${n}" \u7684\u670D\u52A1\u7AEF\u6E32\u67D3\u903B\u8F91`;if(e.trim()==="")return`\u5BA2\u6237\u7AEF\u6E32\u67D3\u4E3A\u7A7A\uFF0C\u8BF7\u68C0\u67E5\u7EC4\u4EF6 "${n}" \u7684 render \u51FD\u6570`;let r=/\d{10,13}/;return r.test(t)||r.test(e)?"\u68C0\u6D4B\u5230\u65F6\u95F4\u6233\u5DEE\u5F02\uFF0C\u8003\u8651\u4F7F\u7528\u7EDF\u4E00\u7684\u65F6\u95F4\u6E90\u6216\u5EF6\u8FDF\u6CE8\u6C34":Se(t)===Se(e)?"HTML \u5185\u5BB9\u76F8\u540C\u4F46\u5C5E\u6027\u987A\u5E8F\u4E0D\u540C\uFF0C\u8FD9\u4E0D\u5F71\u54CD\u529F\u80FD\u4F46\u53EF\u80FD\u5BFC\u81F4 mismatch \u8B66\u544A":`\u8BF7\u786E\u4FDD\u7EC4\u4EF6 "${n}" \u5728\u670D\u52A1\u7AEF\u548C\u5BA2\u6237\u7AEF\u6E32\u67D3\u76F8\u540C\u7684\u8F93\u51FA`}function Se(t){return t.replace(/\s+/g," ").replace(/>\s+</g,"><").trim()}function $e(){return[...ce]}function we(){ce.length=0}
1
+ "use strict";var U=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var ke=Object.getOwnPropertyNames;var De=Object.prototype.hasOwnProperty;var Pe=(t,e)=>{for(var n in e)U(t,n,{get:e[n],enumerable:!0})},je=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ke(e))!De.call(t,o)&&o!==n&&U(t,o,{get:()=>e[o],enumerable:!(r=ve(e,o))||r.enumerable});return t};var Fe=t=>je(U({},"__esModule",{value:!0}),t);var bt={};Pe(bt,{Comment:()=>X,Fragment:()=>Y,PatchFlags:()=>M,ShapeFlags:()=>C,StringRenderer:()=>_,Text:()=>z,clearIslandRegistry:()=>Ie,clearMismatchWarnings:()=>we,createHydrationIsland:()=>Oe,createRenderer:()=>pe,getHydrateStats:()=>Ee,getIslandRegistry:()=>Me,getMismatchWarnings:()=>$e,hydrate:()=>Ce,hydrateAllIslands:()=>Ae,hydrateIsland:()=>le,isHydrating:()=>Le,onHydrated:()=>be,registerIslandComponent:()=>xe,renderToStream:()=>he,renderToStreamGenerator:()=>Ne,renderToString:()=>ge,resetHydrateStats:()=>ie,setHydrating:()=>Ve,ssrRenderer:()=>Te,unmountIsland:()=>_e});module.exports=Fe(bt);var me=require("@lytjs/vdom");var C=(i=>(i[i.ELEMENT=1]="ELEMENT",i[i.FUNCTIONAL_COMPONENT=2]="FUNCTIONAL_COMPONENT",i[i.STATEFUL_COMPONENT=4]="STATEFUL_COMPONENT",i[i.TEXT_CHILDREN=8]="TEXT_CHILDREN",i[i.ARRAY_CHILDREN=16]="ARRAY_CHILDREN",i[i.SLOTS_CHILDREN=32]="SLOTS_CHILDREN",i))(C||{}),M=(u=>(u[u.TEXT=1]="TEXT",u[u.CLASS=2]="CLASS",u[u.STYLE=4]="STYLE",u[u.PROPS=8]="PROPS",u[u.FULL_PROPS=16]="FULL_PROPS",u[u.STABLE_FRAGMENT=32]="STABLE_FRAGMENT",u[u.KEYED_FRAGMENT=64]="KEYED_FRAGMENT",u[u.UNKEYED_FRAGMENT=128]="UNKEYED_FRAGMENT",u[u.NEED_PATCH=256]="NEED_PATCH",u[u.DYNAMIC_SLOTS=512]="DYNAMIC_SLOTS",u[u.HOISTED=-1]="HOISTED",u[u.BAIL=-2]="BAIL",u))(M||{}),Y=Symbol("Fragment"),z=Symbol("Text"),X=Symbol("Comment");function R(t){return t.type===Y}function I(t){return t.type===z}function O(t){return t.type===X}function de(t,e){return t.type===e.type&&t.key===e.key}function q(t){return Array.isArray(t.dynamicChildren)}function ue(t,e,n,r){if(n==="class")t.setClass(e,r);else if(n==="style")t.setStyle(e,r);else if(n.startsWith("on")||n.startsWith("@")){let o=n.startsWith("@")?n.slice(1).toLowerCase():n.slice(2).toLowerCase();t.addEventListener(e,o,r)}else n==="key"||n==="ref"||t.setAttribute(e,n,r)}function B(t,e,n,r,o){if(n==="class")t.setClass(e,r);else if(n==="style")t.setStyle(e,r||{});else if(n.startsWith("on")||n.startsWith("@")){let s=n.startsWith("@")?n.slice(1).toLowerCase():n.slice(2).toLowerCase();o&&t.removeEventListener(e,s,o),r&&t.addEventListener(e,s,r)}else t.setAttribute(e,n,r)}function J(t,e,n,r){for(let o in r){if(o==="key"||o==="ref")continue;let s=n[o],i=r[o];i!==s&&B(t,e,o,i,s)}for(let o in n)if(!(o==="key"||o==="ref")&&!(o in r))if(o==="class")t.setClass(e,"");else if(o==="style")t.setStyle(e,{});else if(o.startsWith("on")||o.startsWith("@")){let s=o.startsWith("@")?o.slice(1).toLowerCase():o.slice(2).toLowerCase();t.removeEventListener(e,s,n[o])}else t.removeAttribute(e,o)}function K(t,e,n,r,o,s){let{shapeFlag:i}=n;if(R(n)){Ge(t,e,n,r,o,s);return}if(I(n)){let a=t.createText(n.children);n.el=a,t.insert(r,a,o);return}if(O(n)){let a=t.createComment(n.children);n.el=a,t.insert(r,a,o);return}if(i&1){We(t,e,n,r,o,s);return}if(i&6){Ue(e,n,r,o,s);return}}function We(t,e,n,r,o,s){let i=n.type,a=t.createElement(i);if(n.el=a,n.props)for(let d in n.props){let f=n.props[d];ue(t,a,d,f)}let{shapeFlag:l,children:c}=n;l&8?a.textContent=c:l&16&&$(e,c,a,null,s),t.insert(r,a,o)}function $(t,e,n,r,o){for(let s=0;s<e.length;s++)t(null,e[s],n,r,o)}function Ge(t,e,n,r,o,s){let{children:i}=n,a=t.createComment("");t.insert(r,a,o),Array.isArray(i)&&i.length>0&&$(e,i,r,a,s),n.el=a,n.anchor=a}function Ue(t,e,n,r,o){let s=e.component;s&&s.update&&s.update(),s&&s.subTree&&(t(null,s.subTree,n,r,s),e.el=s.subTree.el)}function ye(t,e,n,r){let{shapeFlag:o,children:s}=n;if(R(n)){if(Array.isArray(s))for(let i=0;i<s.length;i++)e(s[i],r);n.anchor&&n.anchor.parentNode&&t.remove(n.anchor);return}if(o&6){n.component&&n.component.subTree&&e(n.component.subTree,r);return}n.el&&t.remove(n.el)}function w(t,e){for(let n=0;n<e.length;n++)t(e[n])}var v=require("@lytjs/vdom");function k(t,e,n,r,o,s=null,i=null){if(r==null){n&&e(n,o);return}if(n===null){K(t,Q(t,e),r,o,s,i);return}if(q(r)&&q(n)){qe(t,e,n,r,o,i);return}if(!de(n,r)){e(n,o),K(t,Q(t,e),r,o,s,i);return}r.el=n.el,r.anchor=n.anchor;let{shapeFlag:a}=r;if(R(r)){Xe(t,e,n,r,o,s,i);return}if(I(r)){r.children!==n.children&&(r.el.nodeValue=r.children);return}if(O(r)){r.children!==n.children&&(r.el.nodeValue=r.children);return}if(a&1){Ye(t,e,n,r,i);return}if(a&6){Be(n,r,i);return}}function Q(t,e){return(n,r,o,s,i)=>{k(t,e,n,r,o,s,i)}}function Ye(t,e,n,r,o=null){let s=r.el=n.el,i=n.props||{},a=r.props||{},{patchFlag:l,dynamicProps:c}=r;if(l&&l>0){if(l&1&&n.children!==r.children&&(s.textContent=r.children),l&2&&i.class!==a.class&&t.setClass(s,a.class),l&4&&i.style!==a.style&&t.setStyle(s,a.style||{}),l&8&&c)for(let d=0;d<c.length;d++){let f=c[d],u=i[f],N=a[f];N!==u&&B(t,s,f,N,u)}l&16&&J(t,s,i,a)}else J(t,s,i,a);(!l||!(l&1))&&fe(t,e,n,r,s,null,o)}function fe(t,e,n,r,o,s,i){let a=n.shapeFlag,l=r.shapeFlag,c=n.children,d=r.children;if(l&8){a&16&&w(e,c),c!==d&&(o.textContent=d);return}if(l&16){a&16?ze(t,e,c,d,o,s,i):(a&8&&(o.textContent=""),$(Q(t,e),d,o,s,i));return}d==null&&(a&8?o.textContent="":a&16&&w(e,c))}function ze(t,e,n,r,o,s,i){r.every(l=>l.key!==null&&l.key!==void 0)&&n.every(l=>l.key!==null&&l.key!==void 0)?(0,v.patchKeyedChildren)(n,r,o,s,i,null,!1):(0,v.patchUnkeyedChildren)(n,r,o,s,i,null,!1)}function Xe(t,e,n,r,o,s,i){let a=n.children,l=r.children;Array.isArray(l)&&l.length>0?(fe(t,e,n,r,o,s,i),r.el=l[0].el,r.anchor=l[l.length-1].el?t.nextSibling(l[l.length-1].el):s):Array.isArray(a)&&a.length>0&&l===null?(w(e,a),r.el=n.el,r.anchor=n.anchor):(r.el=n.el,r.anchor=n.anchor)}function qe(t,e,n,r,o,s){let i=n.dynamicChildren,a=r.dynamicChildren;for(let l=0;l<a.length;l++)k(t,e,i[l],a[l],o,null,s)}function Be(t,e,n){e.component=t.component,e.el=t.el,e.component&&e.component.update&&e.component.update()}function pe(t){function e(o,s){ye(t,e,o,s)}(0,me.registerDOMOperations)({insert(o,s,i){t.insert(s,o,i)},createElement(o){return t.createElement(o)},createText(o){return t.createText(o)},setText(o,s){o.nodeValue=s},setElementText(o,s){o.textContent=s},remove(o){t.remove(o)},createComment(o){return t.createComment(o)},mount(o,s,i,a,l,c,d){r(null,o,s,i,a)},patch(o,s,i,a,l,c,d,f){r(o,s,i,a,l)},unmount(o,s,i,a){e(o)},move(o,s,i){t.insert(s,o.el,i)}});function r(o,s,i,a,l){k(t,e,o,s,i,a,l)}return{mount(o,s){s.nodeType===1&&(s.textContent=""),r(null,o,s,null,null)},patch(o,s,i){var a;r(o,s,i||((a=o.el)==null?void 0:a.parentNode),null,null)},unmount(o,s){e(o,s)}}}var h=require("@lytjs/vdom"),P=require("@lytjs/common"),Z=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Je={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ke=/[&<>"']/g;var Qe=0;function y(t){return t.replace(Ke,e=>Je[e])}function Ze(t,e){return t.startsWith("on")||t.startsWith("@")||t==="key"||t==="ref"||t==="__vccOpts"||t.startsWith("__")?"":e===!0?t:e===!1||e===null||e===void 0?"":t==="class"?`class="${y((0,P.normalizeClass)(e))}"`:t==="style"?`style="${y((0,P.normalizeStyle)(e))}"`:t==="dangerouslySetInnerHTML"||t==="innerHTML"?"":`${t}="${y(String(e))}"`}function ee(t){if(!t)return"";let e=[];for(let n in t){let r=t[n],o=Ze(n,r);o&&e.push(o)}return e.length>0?" "+e.join(" "):""}var _=class{createElement(e){return{tag:e,props:{},children:[]}}createText(e){return{type:"text",value:e}}createComment(e){return{type:"comment",value:e}}insert(e,n,r){e.children.push(n)}renderToString(e){return m(e)}async*renderToStream(e){yield*D(e)}};function m(t){if(t==null)return"";let{type:e,props:n,children:r}=t;return typeof e=="symbol"&&String(e)==="Symbol(Fragment)"?Array.isArray(r)?r.map(o=>m(o)).join(""):"":typeof e=="symbol"&&String(e).includes("Text")?y(String(r||"")):typeof e=="symbol"&&String(e).includes("Comment")?`<!--${String(r||"")}-->`:typeof e=="string"?et(e,n,r,t):typeof e=="object"&&e!==null||typeof e=="function"?H(t):""}function et(t,e,n,r){let o=ee(e);if(Z.has(t))return`<${t}${o} />`;if(e&&(e.dangerouslySetInnerHTML||e.innerHTML)){let a=e.dangerouslySetInnerHTML?e.dangerouslySetInnerHTML.__html||e.dangerouslySetInnerHTML:e.innerHTML;return`<${t}${o}>${y(String(a))}</${t}>`}let s="",i=r.shapeFlag||0;return i&h.ShapeFlags.TEXT_CHILDREN?s=y(String(n||"")):i&h.ShapeFlags.ARRAY_CHILDREN&&Array.isArray(n)?s=n.map(a=>m(a)).join(""):i&h.ShapeFlags.SLOTS_CHILDREN&&typeof n=="object"&&n!==null?s=te(n):typeof n=="string"?s=y(n):Array.isArray(n)?s=n.map(a=>m(a)).join(""):typeof n=="number"&&(s=y(String(n))),`<${t}${o}>${s}</${t}>`}function te(t){let e=[];for(let n in t){let r=t[n];if(typeof r=="function"){let o=r();Array.isArray(o)?e.push(o.map(s=>m(s)).join("")):o!=null&&e.push(m(o))}else Array.isArray(r)?e.push(r.map(o=>m(o)).join("")):r!=null&&e.push(m(r))}return e.join("")}function H(t){let e=t.type;if(e&&e.__island)return tt(t,e);if(typeof e=="function"){let n=e(t.props||{},{slots:t.children||{}});return m(n)}if(typeof e=="object"&&e!==null){if(typeof e.render=="function"){let n=e.render(t.props||{},{slots:t.children||{},emit:()=>{}});return m(n)}if(typeof e.setup=="function"){let n=e.setup(t.props||{},{emit:()=>{},slots:t.children||{}});if(typeof n=="function"){let r=n();return m(r)}if(typeof e.render=="function"){let r=e.render(n||{},{slots:t.children||{},emit:()=>{}});return m(r)}}}return t.component&&t.component.subTree?m(t.component.subTree):"<!---->"}function tt(t,e){var N;let n=e.name||((N=t.props)==null?void 0:N["data-island-id"])||"anonymous",r=t.props||{},o=r["data-hydrate-when"]||e.__hydrateWhen||"",s=e.__islandTag||"div",i={};for(let T in r)T==="data-hydrate-when"||T==="data-island-id"||(i[T]=r[T]);let a=JSON.stringify(i),l=y(a),c="";if(typeof e.render=="function"){let T=e.render(r,{slots:t.children||{},emit:()=>{}});c=m(T)}else if(typeof e=="function"){let T=e(r,{slots:t.children||{}});c=m(T)}let d=o?` data-hydrate-when="${y(o)}"`:"",f=`<${s} data-hydrate="${y(n)}" data-props="${l}"${d}>${c}</${s}>`,u=`<script type="application/json" data-hydrate-props="${y(n)}">${a}<\/script>`;return f+u}async function*D(t){if(t==null)return;let{type:e,props:n,children:r}=t;if(typeof e=="symbol"&&String(e)==="Symbol(Fragment)"){if(Array.isArray(r))for(let o of r)yield*D(o);return}if(typeof e=="symbol"&&String(e).includes("Text")){yield y(String(r||""));return}if(typeof e=="symbol"&&String(e).includes("Comment")){yield`<!--${String(r||"")}-->`;return}if(typeof e=="string"){yield*nt(e,n,r,t);return}if(typeof e=="object"||typeof e=="function"){yield H(t);return}}async function*nt(t,e,n,r){let o=ee(e);if(Z.has(t)){yield`<${t}${o} />`;return}if(e&&(e.dangerouslySetInnerHTML||e.innerHTML)){let i=e.dangerouslySetInnerHTML?e.dangerouslySetInnerHTML.__html||e.dangerouslySetInnerHTML:e.innerHTML;yield`<${t}${o}>${y(String(i))}</${t}>`;return}yield`<${t}${o}>`;let s=r.shapeFlag||0;if(s&h.ShapeFlags.TEXT_CHILDREN)yield y(String(n||""));else if(s&h.ShapeFlags.ARRAY_CHILDREN&&Array.isArray(n))for(let i of n)yield*D(i);else if(s&h.ShapeFlags.SLOTS_CHILDREN&&typeof n=="object"&&n!==null)yield te(n);else if(typeof n=="string")yield y(n);else if(Array.isArray(n))for(let i of n)yield*D(i);else typeof n=="number"&&(yield y(String(n)));yield`</${t}>`}function ge(t){return m(t)}function he(t,e){let n=(e==null?void 0:e.suspenseIdPrefix)||"suspense",r=S(t,n);return new ReadableStream({async pull(o){let{value:s,done:i}=await r.next();i?o.close():o.enqueue(s)},async cancel(){await r.return(void 0)}})}async function*Ne(t,e){let n=(e==null?void 0:e.suspenseIdPrefix)||"suspense";yield*S(t,n)}async function*S(t,e){if(t==null)return;let{type:n,props:r,children:o}=t;if(typeof n=="symbol"&&String(n)==="Symbol(Fragment)"){if(Array.isArray(o))for(let s of o)yield*S(s,e);return}if(typeof n=="symbol"&&String(n).includes("Text")){yield y(String(o||""));return}if(typeof n=="symbol"&&String(n).includes("Comment")){yield`<!--${String(o||"")}-->`;return}if(typeof n=="string"){yield*rt(n,r,o,t,e);return}if(typeof n=="object"&&n!==null){let s=n;if(s.name==="Suspense"||s._isSuspense){yield*ot(t,e);return}if(s._isAsyncComponent||s.__asyncSetup){yield*st(t,e);return}yield H(t);return}if(typeof n=="function"){yield H(t);return}}async function*rt(t,e,n,r,o){let s=ee(e);if(Z.has(t)){yield`<${t}${s} />`;return}if(e&&(e.dangerouslySetInnerHTML||e.innerHTML)){let a=e.dangerouslySetInnerHTML?e.dangerouslySetInnerHTML.__html||e.dangerouslySetInnerHTML:e.innerHTML;yield`<${t}${s}>${y(String(a))}</${t}>`;return}yield`<${t}${s}>`;let i=r.shapeFlag||0;if(i&h.ShapeFlags.TEXT_CHILDREN)yield y(String(n||""));else if(i&h.ShapeFlags.ARRAY_CHILDREN&&Array.isArray(n))for(let a of n)yield*S(a,o);else if(i&h.ShapeFlags.SLOTS_CHILDREN&&typeof n=="object"&&n!==null)yield te(n);else if(typeof n=="string")yield y(n);else if(Array.isArray(n))for(let a of n)yield*S(a,o);else typeof n=="number"&&(yield y(String(n)));yield`</${t}>`}async function*ot(t,e){let n=`${e}-${Qe++}`,o=(t.props||{}).fallback,s="";o&&(typeof o=="object"&&o!==null?s=m(o):typeof o=="string"&&(s=o));let i=t.children,a=[];if(typeof i=="object"&&i!==null){if(Array.isArray(i))a=i;else if(typeof i.default=="function"){let d=i.default();Array.isArray(d)?a=d:d!=null&&(a=[d])}}let l=[];function c(d){for(let f of d){if(f==null)continue;let u=f.type;if(u&&(u._isAsyncComponent||u.__asyncSetup||f.__asyncSetup)){let N=f.__asyncPromise||u.__asyncPromise;N&&l.push(N.then(()=>{}))}}}if(c(a),l.length===0){for(let d of a)yield*S(d,e);return}yield`<!--${n}-fallback-->`,yield s,await Promise.all(l),yield`<!--${n}-resolved-->`;for(let d of a)yield*S(d,e);yield`<!--/${n}-->`}async function*st(t,e){let n=t.type,r=t.__asyncPromise||n.__asyncPromise;if(r)try{await r}catch(o){yield"<!--async-component-error-->";return}yield H(t)}var Te=new _;var W=require("@lytjs/common"),F={ELEMENT:1,FUNCTIONAL_COMPONENT:2,STATEFUL_COMPONENT:4,TEXT_CHILDREN:8,ARRAY_CHILDREN:16,SLOTS_CHILDREN:32},g=!1,se=[],ne=!1,p={success:!0,mismatches:0,hydratedNodes:0};function Le(){return g}function Ve(t){g=t}function Ee(){return{...p}}function ie(){p={success:!0,mismatches:0,hydratedNodes:0}}function be(t){g?se.push(t):t()}function Ce(t,e,n={}){ie(),n.onHydrated&&se.push(n.onHydrated),g=!0;try{let r=e.firstElementChild;return r?(t._vnode||t.mount(e),t._vnode&&V(r,t._vnode,n),g=!1,re(),p):(g=!1,t.mount(e),p.success=!1,re(),p)}catch(r){return g=!1,p.success=!1,e.innerHTML="",t.mount(e),re(),p}}function re(){if(ne)return;ne=!0;let t=se.splice(0);for(let e of t)try{e()}catch(n){}ne=!1}function V(t,e,n){if(ft(e)){ct(t,e,n);return}if(mt(e)){at(t,e,n);return}if(pt(e)){lt(t,e,n);return}if(gt(e)){dt(t,e,n);return}if(typeof e.type=="string"){it(t,e,n);return}}function it(t,e,n){let r=t.tagName.toLowerCase(),o=e.type.toLowerCase();if(r!==o){G(t,e,`\u6807\u7B7E\u4E0D\u5339\u914D: DOM "${r}" vs VNode "${o}"`,n);return}e.el=t,e.props&&ae(t,e.props),e.ref&&yt(t,e.ref),ut(t,e,n),p.hydratedNodes++}function at(t,e,n){if(t.nodeType!==3){G(t,e,"\u671F\u671B\u6587\u672C\u8282\u70B9",n);return}e.el=t;let r=t.nodeValue||"",o=String(e.children||"");r!==o&&(t.nodeValue=o,n.strict),p.hydratedNodes++}function lt(t,e,n){if(t.nodeType!==8){G(t,e,"\u671F\u671B\u6CE8\u91CA\u8282\u70B9",n);return}e.el=t;let r=t.nodeValue||"",o=String(e.children||"");r!==o&&(t.nodeValue=o),p.hydratedNodes++}function ct(t,e,n){if(!Array.isArray(e.children))return;let r=Array.from(t.childNodes);for(let o=0;o<e.children.length;o++){let s=e.children[o],i=r[o];if(!i){p.mismatches++;break}V(i,s,n)}}function dt(t,e,n){if(e.component&&e.component.subTree){V(t,e.component.subTree,n),e.el=e.component.subTree.el;return}let r=e.type;if(typeof r=="function")try{let o=r(e.props||{},{slots:e.children||{}});if(o){V(t,o,n),e.el=o.el;return}}catch(o){}if(typeof r=="object"&&r!==null&&typeof r.render=="function")try{let o=r.render(e.props||{},{slots:e.children||{},emit:()=>{}});if(o){V(t,o,n),e.el=o.el;return}}catch(o){}G(t,e,"\u7EC4\u4EF6\u65E0\u6CD5\u83B7\u53D6 subTree",n)}function ut(t,e,n){if(!e.children)return;let r=e.shapeFlag||0;if(typeof e.children=="string"||r&F.TEXT_CHILDREN){let o=t.textContent||"",s=String(e.children||"");o!==s&&(t.textContent=s,n.strict);return}if(Array.isArray(e.children)){let o=Array.from(t.childNodes),s=0;for(let i=0;i<o.length&&s<e.children.length;i++){let a=e.children[s];if(a==null){s++;continue}V(o[i],a,n),s++}s<e.children.length&&p.mismatches++}r&F.SLOTS_CHILDREN&&typeof e.children=="object"&&e.children}function ae(t,e){for(let n in e){let r=e[n];if(n.startsWith("on")&&typeof r=="function"){let o=n.slice(2).toLowerCase();t.addEventListener(o,r)}}}function yt(t,e){typeof e=="function"?e(t):e&&typeof e=="object"&&(e.current=t)}function ft(t){return typeof t.type=="symbol"&&String(t.type)==="Symbol(Fragment)"}function mt(t){return typeof t.type=="symbol"&&String(t.type).includes("Text")}function pt(t){return typeof t.type=="symbol"&&String(t.type).includes("Comment")}function gt(t){return!!((t.shapeFlag||0)&(F.STATEFUL_COMPONENT|F.FUNCTIONAL_COMPONENT)||typeof t.type=="object"&&t.type!==null||typeof t.type=="function")}function G(t,e,n,r){let o=`[lyt] \u6CE8\u6C34\u4E0D\u5339\u914D: ${n}`;if(p.mismatches++,r.strict)throw new W.LytError(W.LytErrorCodes.LYT_SSR_HYDRATION_ERROR,o)}var b=new Map,x=new Map,Re={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ht=/[&<>"']/g;function E(t){return t.replace(ht,e=>Re[e])}function oe(t){return t.replace(/[&<>"']/g,e=>Re[e])}function le(t,e,n={}){let r=typeof document!="undefined"?document:null;if(!r)return{success:!1,mismatches:0,hydratedNodes:0};let o=r.querySelector(t);if(!o)return{success:!1,mismatches:0,hydratedNodes:0};let s=o.getAttribute("data-hydrate");if(!s)return{success:!1,mismatches:0,hydratedNodes:0};if(o.hasAttribute("data-hydrated"))return{success:!0,mismatches:0,hydratedNodes:0};let i=Nt(s,r);if(i===null)return{success:!1,mismatches:0,hydratedNodes:0};let a=o.getAttribute("data-hydrate-when");return a||n.lazy?Tt(o,s,e,i,a||"visible",n):L(o,s,e,i,n)}function Nt(t,e){let n=e.querySelector(`script[type="application/json"][data-hydrate-props="${t}"]`);if(!n){let r=e.querySelector(`[data-hydrate="${t}"]`);if(r){let o=r.getAttribute("data-props");if(o)try{return JSON.parse(o)}catch(s){return null}}return{}}try{return JSON.parse(n.textContent||"{}")}catch(r){return null}}function L(t,e,n,r,o){let s={success:!0,mismatches:0,hydratedNodes:0};try{g=!0;let i=null;if(typeof n.render=="function")i=n.render(r,{slots:n.slots||{},emit:()=>{}});else if(typeof n.setup=="function"){let l=n.setup(r,{emit:()=>{},slots:n.slots||{}});typeof l=="function"&&(i=l())}if(!i)return g=!1,s.success=!1,s;if(o.dev!==!1){let l=Lt(t,i,e);s.mismatches=l}V(t,i,o),s.hydratedNodes=p.hydratedNodes,i.props&&ae(t,i.props),j(t,i),t.setAttribute("data-hydrated","");let a={id:e,hydrated:!0,instance:n,eventListeners:[],timeoutId:null,observer:null,interactionHandler:null};return b.set(e,a),x.set(e,n),g=!1,o.onHydrated&&o.onHydrated(),s}catch(i){return g=!1,s.success=!1,s}}function j(t,e){if(!(!e.children||typeof e.children=="string")&&Array.isArray(e.children)){let n=Array.from(t.children),r=0;for(let o=0;o<n.length&&r<e.children.length;o++){let s=e.children[r];if(s==null){r++;continue}if(typeof s.type=="string"&&s.props)ae(n[o],s.props),j(n[o],s);else if(typeof s.type=="object"||typeof s.type=="function"){let i=s.type;if(typeof i=="function")try{let a=i(s.props||{},{slots:s.children||{}});a&&n[o]&&j(n[o],a)}catch(a){}else if(i&&typeof i.render=="function")try{let a=i.render(s.props||{},{slots:s.children||{},emit:()=>{}});a&&n[o]&&j(n[o],a)}catch(a){}}r++}}}function Tt(t,e,n,r,o,s){let i={success:!0,mismatches:0,hydratedNodes:0},a=null;s.timeout&&s.timeout>0&&(a=setTimeout(()=>{He(t,e),L(t,e,n,r,s)},s.timeout));let l={id:e,hydrated:!1,instance:n,eventListeners:[],timeoutId:a,observer:null,interactionHandler:null};switch(b.set(e,l),x.set(e,n),o){case"visible":{if(typeof IntersectionObserver!="undefined"){let c=new IntersectionObserver(d=>{for(let f of d)f.isIntersecting&&(c.unobserve(f.target),l.observer=null,a&&clearTimeout(a),l.timeoutId=null,L(t,e,n,r,s))},{rootMargin:"200px"});c.observe(t),l.observer=c}else a&&clearTimeout(a),L(t,e,n,r,s);break}case"idle":{(d=>{typeof requestIdleCallback!="undefined"?requestIdleCallback(d,{timeout:s.timeout||2e3}):setTimeout(d,1)})(()=>{a&&clearTimeout(a),l.timeoutId=null,t.hasAttribute("data-hydrated")||L(t,e,n,r,s)});break}case"interaction":{let c=()=>{a&&clearTimeout(a),l.timeoutId=null,l.interactionHandler=null,document.removeEventListener("click",c),document.removeEventListener("keydown",c),document.removeEventListener("scroll",c),document.removeEventListener("touchstart",c),t.hasAttribute("data-hydrated")||L(t,e,n,r,s)};document.addEventListener("click",c,{once:!1,passive:!0}),document.addEventListener("keydown",c,{once:!1,passive:!0}),document.addEventListener("scroll",c,{once:!1,passive:!0}),document.addEventListener("touchstart",c,{once:!1,passive:!0}),l.interactionHandler=c;break}default:a&&clearTimeout(a),L(t,e,n,r,s)}return i}function He(t,e){let n=b.get(e);n&&(n.observer&&(n.observer.disconnect(),n.observer=null),n.timeoutId!==null&&(clearTimeout(n.timeoutId),n.timeoutId=null),n.interactionHandler&&(document.removeEventListener("click",n.interactionHandler),document.removeEventListener("keydown",n.interactionHandler),document.removeEventListener("scroll",n.interactionHandler),document.removeEventListener("touchstart",n.interactionHandler),n.interactionHandler=null))}function Ae(t={}){let e=typeof document!="undefined"?document:null;if(!e)return{success:!1,mismatches:0,hydratedNodes:0};let n=e.querySelectorAll("[data-hydrate]:not([data-hydrated])"),r={success:!0,mismatches:0,hydratedNodes:0};return n.forEach(o=>{let s=o.getAttribute("data-hydrate");if(!s){r.success=!1;return}let i=x.get(s);if(!i){r.success=!1;return}let a=le(`[data-hydrate="${s}"]`,i,t);r.mismatches+=a.mismatches,r.hydratedNodes+=a.hydratedNodes,a.success||(r.success=!1)}),r}function xe(t,e){x.set(t,e)}function _e(t){if(!b.get(t))return;let n=typeof document!="undefined"?document.querySelector(`[data-hydrate="${t}"]`):null;n&&(He(n,t),n.removeAttribute("data-hydrated")),b.delete(t),x.delete(t)}function Me(){return b}function Ie(){b.clear(),x.clear()}function Oe(t,e={},n="div",r){let o=t.name||"anonymous",s=JSON.stringify(e),i=E(s),a="";if(typeof t.render=="function"){let u=t.render(e,{slots:t.slots||{},emit:()=>{}});a=A(u)}let l=r?` data-hydrate-when="${oe(r)}"`:"",c=oe(o),d=`<${n} data-hydrate="${c}" data-props="${i}"${l}>${a}</${n}>`,f=`<script type="application/json" data-hydrate-props="${c}">${s}<\/script>`;return d+f}function A(t){if(t==null)return"";let{type:e,props:n,children:r}=t;if(typeof e=="symbol"&&String(e)==="Symbol(Fragment)")return Array.isArray(r)?r.map(o=>A(o)).join(""):"";if(typeof e=="symbol"&&String(e).includes("Text"))return E(String(r||""));if(typeof e=="symbol"&&String(e).includes("Comment"))return`<!--${oe(String(r||""))}-->`;if(typeof e=="string"){let o=St(n);if(new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]).has(e))return`<${e}${o} />`;let i="";return typeof r=="string"?i=E(r):Array.isArray(r)?i=r.map(a=>A(a)).join(""):typeof r=="number"&&(i=E(String(r))),`<${e}${o}>${i}</${e}>`}if(typeof e=="function"){let o=e(n||{},{slots:r||{}});return A(o)}if(typeof e=="object"&&e!==null){let o=e;if(typeof o.render=="function"){let s=o.render(n||{},{slots:r||{},emit:()=>{}});return A(s)}}return""}function St(t){if(!t)return"";let e=[];for(let n in t){let r=t[n];if(!(n.startsWith("on")||n.startsWith("@")||n==="key"||n==="ref")&&!(n==="__vccOpts"||n.startsWith("__"))&&!(n==="dangerouslySetInnerHTML"||n==="innerHTML"))if(r===!0)e.push(n);else{if(r===!1||r===null||r===void 0)continue;n==="class"&&typeof r=="string"?e.push(`class="${E(r)}"`):n==="style"&&typeof r=="string"?e.push(`style="${E(r)}"`):e.push(`${n}="${E(String(r))}"`)}}return e.length>0?" "+e.join(" "):""}var ce=[];function Lt(t,e,n){let r=0,o=Vt(t),s=A(e);if(o!==s){r++;let i={islandId:n,expected:s,actual:o,suggestion:Et(o,s,n)};ce.push(i)}return r}function Vt(t){let e=t.cloneNode(!0);return e.removeAttribute("data-hydrate"),e.removeAttribute("data-props"),e.removeAttribute("data-hydrate-when"),e.removeAttribute("data-hydrated"),e.innerHTML}function Et(t,e,n){if(t.trim()==="")return`\u670D\u52A1\u7AEF\u6E32\u67D3\u4E3A\u7A7A\uFF0C\u8BF7\u68C0\u67E5\u7EC4\u4EF6 "${n}" \u7684\u670D\u52A1\u7AEF\u6E32\u67D3\u903B\u8F91`;if(e.trim()==="")return`\u5BA2\u6237\u7AEF\u6E32\u67D3\u4E3A\u7A7A\uFF0C\u8BF7\u68C0\u67E5\u7EC4\u4EF6 "${n}" \u7684 render \u51FD\u6570`;let r=/\d{10,13}/;return r.test(t)||r.test(e)?"\u68C0\u6D4B\u5230\u65F6\u95F4\u6233\u5DEE\u5F02\uFF0C\u8003\u8651\u4F7F\u7528\u7EDF\u4E00\u7684\u65F6\u95F4\u6E90\u6216\u5EF6\u8FDF\u6CE8\u6C34":Se(t)===Se(e)?"HTML \u5185\u5BB9\u76F8\u540C\u4F46\u5C5E\u6027\u987A\u5E8F\u4E0D\u540C\uFF0C\u8FD9\u4E0D\u5F71\u54CD\u529F\u80FD\u4F46\u53EF\u80FD\u5BFC\u81F4 mismatch \u8B66\u544A":`\u8BF7\u786E\u4FDD\u7EC4\u4EF6 "${n}" \u5728\u670D\u52A1\u7AEF\u548C\u5BA2\u6237\u7AEF\u6E32\u67D3\u76F8\u540C\u7684\u8F93\u51FA`}function Se(t){return t.replace(/\s+/g," ").replace(/>\s+</g,"><").trim()}function $e(){return[...ce]}function we(){ce.length=0}
package/dist/ssr.mjs CHANGED
@@ -1 +1 @@
1
- import{registerDOMOperations as Ee}from"@lytjs/vdom";var x=(i=>(i[i.ELEMENT=1]="ELEMENT",i[i.FUNCTIONAL_COMPONENT=2]="FUNCTIONAL_COMPONENT",i[i.STATEFUL_COMPONENT=4]="STATEFUL_COMPONENT",i[i.TEXT_CHILDREN=8]="TEXT_CHILDREN",i[i.ARRAY_CHILDREN=16]="ARRAY_CHILDREN",i[i.SLOTS_CHILDREN=32]="SLOTS_CHILDREN",i))(x||{}),F=(u=>(u[u.TEXT=1]="TEXT",u[u.CLASS=2]="CLASS",u[u.STYLE=4]="STYLE",u[u.PROPS=8]="PROPS",u[u.FULL_PROPS=16]="FULL_PROPS",u[u.STABLE_FRAGMENT=32]="STABLE_FRAGMENT",u[u.KEYED_FRAGMENT=64]="KEYED_FRAGMENT",u[u.UNKEYED_FRAGMENT=128]="UNKEYED_FRAGMENT",u[u.NEED_PATCH=256]="NEED_PATCH",u[u.DYNAMIC_SLOTS=512]="DYNAMIC_SLOTS",u[u.HOISTED=-1]="HOISTED",u[u.BAIL=-2]="BAIL",u))(F||{}),te=Symbol("Fragment"),ne=Symbol("Text"),re=Symbol("Comment");function C(t){return t.type===te}function _(t){return t.type===ne}function M(t){return t.type===re}function oe(t,e){return t.type===e.type&&t.key===e.key}function j(t){return Array.isArray(t.dynamicChildren)}function se(t,e,n,r){if(n==="class")t.setClass(e,r);else if(n==="style")t.setStyle(e,r);else if(n.startsWith("on")||n.startsWith("@")){let o=n.startsWith("@")?n.slice(1).toLowerCase():n.slice(2).toLowerCase();t.addEventListener(e,o,r)}else n==="key"||n==="ref"||t.setAttribute(e,n,r)}function W(t,e,n,r,o){if(n==="class")t.setClass(e,r);else if(n==="style")t.setStyle(e,r||{});else if(n.startsWith("on")||n.startsWith("@")){let s=n.startsWith("@")?n.slice(1).toLowerCase():n.slice(2).toLowerCase();o&&t.removeEventListener(e,s,o),r&&t.addEventListener(e,s,r)}else t.setAttribute(e,n,r)}function G(t,e,n,r){for(let o in r){if(o==="key"||o==="ref")continue;let s=n[o],i=r[o];i!==s&&W(t,e,o,i,s)}for(let o in n)if(!(o==="key"||o==="ref")&&!(o in r))if(o==="class")t.setClass(e,"");else if(o==="style")t.setStyle(e,{});else if(o.startsWith("on")||o.startsWith("@")){let s=o.startsWith("@")?o.slice(1).toLowerCase():o.slice(2).toLowerCase();t.removeEventListener(e,s,n[o])}else t.removeAttribute(e,o)}function U(t,e,n,r,o,s){let{shapeFlag:i}=n;if(C(n)){me(t,e,n,r,o,s);return}if(_(n)){let a=t.createText(n.children);n.el=a,t.insert(r,a,o);return}if(M(n)){let a=t.createComment(n.children);n.el=a,t.insert(r,a,o);return}if(i&1){fe(t,e,n,r,o,s);return}if(i&6){pe(e,n,r,o,s);return}}function fe(t,e,n,r,o,s){let i=n.type,a=t.createElement(i);if(n.el=a,n.props)for(let d in n.props){let f=n.props[d];se(t,a,d,f)}let{shapeFlag:l,children:c}=n;l&8?a.textContent=c:l&16&&I(e,c,a,null,s),t.insert(r,a,o)}function I(t,e,n,r,o){for(let s=0;s<e.length;s++)t(null,e[s],n,r,o)}function me(t,e,n,r,o,s){let{children:i}=n,a=t.createComment("");t.insert(r,a,o),Array.isArray(i)&&i.length>0&&I(e,i,r,a,s),n.el=a,n.anchor=a}function pe(t,e,n,r,o){let s=e.component;s&&s.update&&s.update(),s&&s.subTree&&(t(null,s.subTree,n,r,s),e.el=s.subTree.el)}function ie(t,e,n,r){let{shapeFlag:o,children:s}=n;if(C(n)){if(Array.isArray(s))for(let i=0;i<s.length;i++)e(s[i],r);n.anchor&&n.anchor.parentNode&&t.remove(n.anchor);return}if(o&6){n.component&&n.component.subTree&&e(n.component.subTree,r);return}n.el&&t.remove(n.el)}function O(t,e){for(let n=0;n<e.length;n++)t(e[n])}import{patchKeyedChildren as ge,patchUnkeyedChildren as he}from"@lytjs/vdom";function $(t,e,n,r,o,s=null,i=null){if(r==null){n&&e(n,o);return}if(n===null){U(t,Y(t,e),r,o,s,i);return}if(j(r)&&j(n)){Le(t,e,n,r,o,i);return}if(!oe(n,r)){e(n,o),U(t,Y(t,e),r,o,s,i);return}r.el=n.el,r.anchor=n.anchor;let{shapeFlag:a}=r;if(C(r)){Se(t,e,n,r,o,s,i);return}if(_(r)){r.children!==n.children&&(r.el.nodeValue=r.children);return}if(M(r)){r.children!==n.children&&(r.el.nodeValue=r.children);return}if(a&1){Ne(t,e,n,r,i);return}if(a&6){Ve(n,r,i);return}}function Y(t,e){return(n,r,o,s,i)=>{$(t,e,n,r,o,s,i)}}function Ne(t,e,n,r,o=null){let s=r.el=n.el,i=n.props||{},a=r.props||{},{patchFlag:l,dynamicProps:c}=r;if(l&&l>0){if(l&1&&n.children!==r.children&&(s.textContent=r.children),l&2&&i.class!==a.class&&t.setClass(s,a.class),l&4&&i.style!==a.style&&t.setStyle(s,a.style||{}),l&8&&c)for(let d=0;d<c.length;d++){let f=c[d],u=i[f],N=a[f];N!==u&&W(t,s,f,N,u)}l&16&&G(t,s,i,a)}else G(t,s,i,a);(!l||!(l&1))&&ae(t,e,n,r,s,null,o)}function ae(t,e,n,r,o,s,i){let a=n.shapeFlag,l=r.shapeFlag,c=n.children,d=r.children;if(l&8){a&16&&O(e,c),c!==d&&(o.textContent=d);return}if(l&16){a&16?Te(t,e,c,d,o,s,i):(a&8&&(o.textContent=""),I(Y(t,e),d,o,s,i));return}d==null&&(a&8?o.textContent="":a&16&&O(e,c))}function Te(t,e,n,r,o,s,i){r.every(l=>l.key!==null&&l.key!==void 0)&&n.every(l=>l.key!==null&&l.key!==void 0)?ge(n,r,o,s,i,null,!1):he(n,r,o,s,i,null,!1)}function Se(t,e,n,r,o,s,i){let a=n.children,l=r.children;Array.isArray(l)&&l.length>0?(ae(t,e,n,r,o,s,i),r.el=l[0].el,r.anchor=l[l.length-1].el?t.nextSibling(l[l.length-1].el):s):Array.isArray(a)&&a.length>0&&l===null?(O(e,a),r.el=n.el,r.anchor=n.anchor):(r.el=n.el,r.anchor=n.anchor)}function Le(t,e,n,r,o,s){let i=n.dynamicChildren,a=r.dynamicChildren;for(let l=0;l<a.length;l++)$(t,e,i[l],a[l],o,null,s)}function Ve(t,e,n){e.component=t.component,e.el=t.el,e.component&&e.component.update&&e.component.update()}function be(t){function e(o,s){ie(t,e,o,s)}Ee({insert(o,s,i){t.insert(s,o,i)},createElement(o){return t.createElement(o)},createText(o){return t.createText(o)},setText(o,s){o.nodeValue=s},setElementText(o,s){o.textContent=s},remove(o){t.remove(o)},createComment(o){return t.createComment(o)},mount(o,s,i,a,l,c,d){r(null,o,s,i,a)},patch(o,s,i,a,l,c,d,f){r(o,s,i,a,l)},unmount(o,s,i,a){e(o)},move(o,s,i){t.insert(s,o.el,i)}});function r(o,s,i,a,l){$(t,e,o,s,i,a,l)}return{mount(o,s){s.nodeType===1&&(s.textContent=""),r(null,o,s,null,null)},patch(o,s,i){var a;r(o,s,i||((a=o.el)==null?void 0:a.parentNode),null,null)},unmount(o,s){e(o,s)}}}import{ShapeFlags as h}from"@lytjs/vdom";import{normalizeClass as He,normalizeStyle as Ae}from"@lytjs/common";var z=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ce={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Re=/[&<>"']/g;var xe=0;function y(t){return t.replace(Re,e=>Ce[e])}function _e(t,e){return t.startsWith("on")||t.startsWith("@")||t==="key"||t==="ref"||t==="__vccOpts"||t.startsWith("__")?"":e===!0?t:e===!1||e===null||e===void 0?"":t==="class"?`class="${y(He(e))}"`:t==="style"?`style="${y(Ae(e))}"`:t==="dangerouslySetInnerHTML"||t==="innerHTML"?"":`${t}="${y(String(e))}"`}function X(t){if(!t)return"";let e=[];for(let n in t){let r=t[n],o=_e(n,r);o&&e.push(o)}return e.length>0?" "+e.join(" "):""}var w=class{createElement(e){return{tag:e,props:{},children:[]}}createText(e){return{type:"text",value:e}}createComment(e){return{type:"comment",value:e}}insert(e,n,r){e.children.push(n)}renderToString(e){return m(e)}async*renderToStream(e){yield*v(e)}};function m(t){if(t==null)return"";let{type:e,props:n,children:r}=t;return typeof e=="symbol"&&String(e)==="Symbol(Fragment)"?Array.isArray(r)?r.map(o=>m(o)).join(""):"":typeof e=="symbol"&&String(e).includes("Text")?y(String(r||"")):typeof e=="symbol"&&String(e).includes("Comment")?`<!--${String(r||"")}-->`:typeof e=="string"?Me(e,n,r,t):typeof e=="object"&&e!==null||typeof e=="function"?R(t):""}function Me(t,e,n,r){let o=X(e);if(z.has(t))return`<${t}${o} />`;if(e&&(e.dangerouslySetInnerHTML||e.innerHTML)){let a=e.dangerouslySetInnerHTML?e.dangerouslySetInnerHTML.__html||e.dangerouslySetInnerHTML:e.innerHTML;return`<${t}${o}>${y(String(a))}</${t}>`}let s="",i=r.shapeFlag||0;return i&h.TEXT_CHILDREN?s=y(String(n||"")):i&h.ARRAY_CHILDREN&&Array.isArray(n)?s=n.map(a=>m(a)).join(""):i&h.SLOTS_CHILDREN&&typeof n=="object"&&n!==null?s=q(n):typeof n=="string"?s=y(n):Array.isArray(n)?s=n.map(a=>m(a)).join(""):typeof n=="number"&&(s=y(String(n))),`<${t}${o}>${s}</${t}>`}function q(t){let e=[];for(let n in t){let r=t[n];if(typeof r=="function"){let o=r();Array.isArray(o)?e.push(o.map(s=>m(s)).join("")):o!=null&&e.push(m(o))}else Array.isArray(r)?e.push(r.map(o=>m(o)).join("")):r!=null&&e.push(m(r))}return e.join("")}function R(t){let e=t.type;if(e&&e.__island)return Ie(t,e);if(typeof e=="function"){let n=e(t.props||{},{slots:t.children||{}});return m(n)}if(typeof e=="object"&&e!==null){if(typeof e.render=="function"){let n=e.render(t.props||{},{slots:t.children||{},emit:()=>{}});return m(n)}if(typeof e.setup=="function"){let n=e.setup(t.props||{},{emit:()=>{},slots:t.children||{}});if(typeof n=="function"){let r=n();return m(r)}if(typeof e.render=="function"){let r=e.render(n||{},{slots:t.children||{},emit:()=>{}});return m(r)}}}return t.component&&t.component.subTree?m(t.component.subTree):"<!---->"}function Ie(t,e){var N;let n=e.name||((N=t.props)==null?void 0:N["data-island-id"])||"anonymous",r=t.props||{},o=r["data-hydrate-when"]||e.__hydrateWhen||"",s=e.__islandTag||"div",i={};for(let T in r)T==="data-hydrate-when"||T==="data-island-id"||(i[T]=r[T]);let a=JSON.stringify(i),l=y(a),c="";if(typeof e.render=="function"){let T=e.render(r,{slots:t.children||{},emit:()=>{}});c=m(T)}else if(typeof e=="function"){let T=e(r,{slots:t.children||{}});c=m(T)}let d=o?` data-hydrate-when="${y(o)}"`:"",f=`<${s} data-hydrate="${y(n)}" data-props="${l}"${d}>${c}</${s}>`,u=`<script type="application/json" data-hydrate-props="${y(n)}">${a}<\/script>`;return f+u}async function*v(t){if(t==null)return;let{type:e,props:n,children:r}=t;if(typeof e=="symbol"&&String(e)==="Symbol(Fragment)"){if(Array.isArray(r))for(let o of r)yield*v(o);return}if(typeof e=="symbol"&&String(e).includes("Text")){yield y(String(r||""));return}if(typeof e=="symbol"&&String(e).includes("Comment")){yield`<!--${String(r||"")}-->`;return}if(typeof e=="string"){yield*Oe(e,n,r,t);return}if(typeof e=="object"||typeof e=="function"){yield R(t);return}}async function*Oe(t,e,n,r){let o=X(e);if(z.has(t)){yield`<${t}${o} />`;return}if(e&&(e.dangerouslySetInnerHTML||e.innerHTML)){let i=e.dangerouslySetInnerHTML?e.dangerouslySetInnerHTML.__html||e.dangerouslySetInnerHTML:e.innerHTML;yield`<${t}${o}>${y(String(i))}</${t}>`;return}yield`<${t}${o}>`;let s=r.shapeFlag||0;if(s&h.TEXT_CHILDREN)yield y(String(n||""));else if(s&h.ARRAY_CHILDREN&&Array.isArray(n))for(let i of n)yield*v(i);else if(s&h.SLOTS_CHILDREN&&typeof n=="object"&&n!==null)yield q(n);else if(typeof n=="string")yield y(n);else if(Array.isArray(n))for(let i of n)yield*v(i);else typeof n=="number"&&(yield y(String(n)));yield`</${t}>`}function $e(t){return m(t)}function we(t,e){let n=(e==null?void 0:e.suspenseIdPrefix)||"suspense",r=S(t,n);return new ReadableStream({async pull(o){let{value:s,done:i}=await r.next();i?o.close():o.enqueue(s)},async cancel(){await r.return(void 0)}})}async function*ve(t,e){let n=(e==null?void 0:e.suspenseIdPrefix)||"suspense";yield*S(t,n)}async function*S(t,e){if(t==null)return;let{type:n,props:r,children:o}=t;if(typeof n=="symbol"&&String(n)==="Symbol(Fragment)"){if(Array.isArray(o))for(let s of o)yield*S(s,e);return}if(typeof n=="symbol"&&String(n).includes("Text")){yield y(String(o||""));return}if(typeof n=="symbol"&&String(n).includes("Comment")){yield`<!--${String(o||"")}-->`;return}if(typeof n=="string"){yield*ke(n,r,o,t,e);return}if(typeof n=="object"&&n!==null){let s=n;if(s.name==="Suspense"||s._isSuspense){yield*De(t,e);return}if(s._isAsyncComponent||s.__asyncSetup){yield*Pe(t,e);return}yield R(t);return}if(typeof n=="function"){yield R(t);return}}async function*ke(t,e,n,r,o){let s=X(e);if(z.has(t)){yield`<${t}${s} />`;return}if(e&&(e.dangerouslySetInnerHTML||e.innerHTML)){let a=e.dangerouslySetInnerHTML?e.dangerouslySetInnerHTML.__html||e.dangerouslySetInnerHTML:e.innerHTML;yield`<${t}${s}>${y(String(a))}</${t}>`;return}yield`<${t}${s}>`;let i=r.shapeFlag||0;if(i&h.TEXT_CHILDREN)yield y(String(n||""));else if(i&h.ARRAY_CHILDREN&&Array.isArray(n))for(let a of n)yield*S(a,o);else if(i&h.SLOTS_CHILDREN&&typeof n=="object"&&n!==null)yield q(n);else if(typeof n=="string")yield y(n);else if(Array.isArray(n))for(let a of n)yield*S(a,o);else typeof n=="number"&&(yield y(String(n)));yield`</${t}>`}async function*De(t,e){let n=`${e}-${xe++}`,o=(t.props||{}).fallback,s="";o&&(typeof o=="object"&&o!==null?s=m(o):typeof o=="string"&&(s=o));let i=t.children,a=[];if(typeof i=="object"&&i!==null){if(Array.isArray(i))a=i;else if(typeof i.default=="function"){let d=i.default();Array.isArray(d)?a=d:d!=null&&(a=[d])}}let l=[];function c(d){for(let f of d){if(f==null)continue;let u=f.type;if(u&&(u._isAsyncComponent||u.__asyncSetup||f.__asyncSetup)){let N=f.__asyncPromise||u.__asyncPromise;N&&l.push(N.then(()=>{}))}}}if(c(a),l.length===0){for(let d of a)yield*S(d,e);return}yield`<!--${n}-fallback-->`,yield s,await Promise.all(l),yield`<!--${n}-resolved-->`;for(let d of a)yield*S(d,e);yield`<!--/${n}-->`}async function*Pe(t,e){let n=t.type,r=t.__asyncPromise||n.__asyncPromise;if(r)try{await r}catch(o){yield"<!--async-component-error-->";return}yield R(t)}var Fe=new w;import{LytError as je,LytErrorCodes as We}from"@lytjs/common";var D={ELEMENT:1,FUNCTIONAL_COMPONENT:2,STATEFUL_COMPONENT:4,TEXT_CHILDREN:8,ARRAY_CHILDREN:16,SLOTS_CHILDREN:32},g=!1,Q=[],B=!1,p={success:!0,mismatches:0,hydratedNodes:0};function Ge(){return g}function Ue(t){g=t}function Ye(){return{...p}}function ce(){p={success:!0,mismatches:0,hydratedNodes:0}}function ze(t){g?Q.push(t):t()}function Xe(t,e,n={}){ce(),n.onHydrated&&Q.push(n.onHydrated),g=!0;try{let r=e.firstElementChild;return r?(t._vnode||t.mount(e),t._vnode&&V(r,t._vnode,n),g=!1,J(),p):(g=!1,t.mount(e),p.success=!1,J(),p)}catch(r){return g=!1,p.success=!1,e.innerHTML="",t.mount(e),J(),p}}function J(){if(B)return;B=!0;let t=Q.splice(0);for(let e of t)try{e()}catch(n){}B=!1}function V(t,e,n){if(tt(e)){Ke(t,e,n);return}if(nt(e)){Be(t,e,n);return}if(rt(e)){Je(t,e,n);return}if(ot(e)){Qe(t,e,n);return}if(typeof e.type=="string"){qe(t,e,n);return}}function qe(t,e,n){let r=t.tagName.toLowerCase(),o=e.type.toLowerCase();if(r!==o){P(t,e,`\u6807\u7B7E\u4E0D\u5339\u914D: DOM "${r}" vs VNode "${o}"`,n);return}e.el=t,e.props&&Z(t,e.props),e.ref&&et(t,e.ref),Ze(t,e,n),p.hydratedNodes++}function Be(t,e,n){if(t.nodeType!==3){P(t,e,"\u671F\u671B\u6587\u672C\u8282\u70B9",n);return}e.el=t;let r=t.nodeValue||"",o=String(e.children||"");r!==o&&(t.nodeValue=o,n.strict),p.hydratedNodes++}function Je(t,e,n){if(t.nodeType!==8){P(t,e,"\u671F\u671B\u6CE8\u91CA\u8282\u70B9",n);return}e.el=t;let r=t.nodeValue||"",o=String(e.children||"");r!==o&&(t.nodeValue=o),p.hydratedNodes++}function Ke(t,e,n){if(!Array.isArray(e.children))return;let r=Array.from(t.childNodes);for(let o=0;o<e.children.length;o++){let s=e.children[o],i=r[o];if(!i){p.mismatches++;break}V(i,s,n)}}function Qe(t,e,n){if(e.component&&e.component.subTree){V(t,e.component.subTree,n),e.el=e.component.subTree.el;return}let r=e.type;if(typeof r=="function")try{let o=r(e.props||{},{slots:e.children||{}});if(o){V(t,o,n),e.el=o.el;return}}catch(o){}if(typeof r=="object"&&r!==null&&typeof r.render=="function")try{let o=r.render(e.props||{},{slots:e.children||{},emit:()=>{}});if(o){V(t,o,n),e.el=o.el;return}}catch(o){}P(t,e,"\u7EC4\u4EF6\u65E0\u6CD5\u83B7\u53D6 subTree",n)}function Ze(t,e,n){if(!e.children)return;let r=e.shapeFlag||0;if(typeof e.children=="string"||r&D.TEXT_CHILDREN){let o=t.textContent||"",s=String(e.children||"");o!==s&&(t.textContent=s,n.strict);return}if(Array.isArray(e.children)){let o=Array.from(t.childNodes),s=0;for(let i=0;i<o.length&&s<e.children.length;i++){let a=e.children[s];if(a==null){s++;continue}V(o[i],a,n),s++}s<e.children.length&&p.mismatches++}r&D.SLOTS_CHILDREN&&typeof e.children=="object"&&e.children}function Z(t,e){for(let n in e){let r=e[n];if(n.startsWith("on")&&typeof r=="function"){let o=n.slice(2).toLowerCase();t.addEventListener(o,r)}}}function et(t,e){typeof e=="function"?e(t):e&&typeof e=="object"&&(e.current=t)}function tt(t){return typeof t.type=="symbol"&&String(t.type)==="Symbol(Fragment)"}function nt(t){return typeof t.type=="symbol"&&String(t.type).includes("Text")}function rt(t){return typeof t.type=="symbol"&&String(t.type).includes("Comment")}function ot(t){return!!((t.shapeFlag||0)&(D.STATEFUL_COMPONENT|D.FUNCTIONAL_COMPONENT)||typeof t.type=="object"&&t.type!==null||typeof t.type=="function")}function P(t,e,n,r){let o=`[lyt] \u6CE8\u6C34\u4E0D\u5339\u914D: ${n}`;if(p.mismatches++,r.strict)throw new je(We.LYT_SSR_HYDRATION_ERROR,o)}var b=new Map,A=new Map,de={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},st=/[&<>"']/g;function E(t){return t.replace(st,e=>de[e])}function K(t){return t.replace(/[&<>"']/g,e=>de[e])}function ue(t,e,n={}){let r=typeof document!="undefined"?document:null;if(!r)return{success:!1,mismatches:0,hydratedNodes:0};let o=r.querySelector(t);if(!o)return{success:!1,mismatches:0,hydratedNodes:0};let s=o.getAttribute("data-hydrate");if(!s)return{success:!1,mismatches:0,hydratedNodes:0};if(o.hasAttribute("data-hydrated"))return{success:!0,mismatches:0,hydratedNodes:0};let i=it(s,r);if(i===null)return{success:!1,mismatches:0,hydratedNodes:0};let a=o.getAttribute("data-hydrate-when");return a||n.lazy?at(o,s,e,i,a||"visible",n):L(o,s,e,i,n)}function it(t,e){let n=e.querySelector(`script[type="application/json"][data-hydrate-props="${t}"]`);if(!n){let r=e.querySelector(`[data-hydrate="${t}"]`);if(r){let o=r.getAttribute("data-props");if(o)try{return JSON.parse(o)}catch(s){return null}}return{}}try{return JSON.parse(n.textContent||"{}")}catch(r){return null}}function L(t,e,n,r,o){let s={success:!0,mismatches:0,hydratedNodes:0};try{g=!0;let i=null;if(typeof n.render=="function")i=n.render(r,{slots:n.slots||{},emit:()=>{}});else if(typeof n.setup=="function"){let l=n.setup(r,{emit:()=>{},slots:n.slots||{}});typeof l=="function"&&(i=l())}if(!i)return g=!1,s.success=!1,s;if(o.dev!==!1){let l=pt(t,i,e);s.mismatches=l}V(t,i,o),s.hydratedNodes=p.hydratedNodes,i.props&&Z(t,i.props),k(t,i),t.setAttribute("data-hydrated","");let a={id:e,hydrated:!0,instance:n,eventListeners:[],timeoutId:null,observer:null,interactionHandler:null};return b.set(e,a),A.set(e,n),g=!1,o.onHydrated&&o.onHydrated(),s}catch(i){return g=!1,s.success=!1,s}}function k(t,e){if(!(!e.children||typeof e.children=="string")&&Array.isArray(e.children)){let n=Array.from(t.children),r=0;for(let o=0;o<n.length&&r<e.children.length;o++){let s=e.children[r];if(s==null){r++;continue}if(typeof s.type=="string"&&s.props)Z(n[o],s.props),k(n[o],s);else if(typeof s.type=="object"||typeof s.type=="function"){let i=s.type;if(typeof i=="function")try{let a=i(s.props||{},{slots:s.children||{}});a&&n[o]&&k(n[o],a)}catch(a){}else if(i&&typeof i.render=="function")try{let a=i.render(s.props||{},{slots:s.children||{},emit:()=>{}});a&&n[o]&&k(n[o],a)}catch(a){}}r++}}}function at(t,e,n,r,o,s){let i={success:!0,mismatches:0,hydratedNodes:0},a=null;s.timeout&&s.timeout>0&&(a=setTimeout(()=>{ye(t,e),L(t,e,n,r,s)},s.timeout));let l={id:e,hydrated:!1,instance:n,eventListeners:[],timeoutId:a,observer:null,interactionHandler:null};switch(b.set(e,l),A.set(e,n),o){case"visible":{if(typeof IntersectionObserver!="undefined"){let c=new IntersectionObserver(d=>{for(let f of d)f.isIntersecting&&(c.unobserve(f.target),l.observer=null,a&&clearTimeout(a),l.timeoutId=null,L(t,e,n,r,s))},{rootMargin:"200px"});c.observe(t),l.observer=c}else a&&clearTimeout(a),L(t,e,n,r,s);break}case"idle":{(d=>{typeof requestIdleCallback!="undefined"?requestIdleCallback(d,{timeout:s.timeout||2e3}):setTimeout(d,1)})(()=>{a&&clearTimeout(a),l.timeoutId=null,t.hasAttribute("data-hydrated")||L(t,e,n,r,s)});break}case"interaction":{let c=()=>{a&&clearTimeout(a),l.timeoutId=null,l.interactionHandler=null,document.removeEventListener("click",c),document.removeEventListener("keydown",c),document.removeEventListener("scroll",c),document.removeEventListener("touchstart",c),t.hasAttribute("data-hydrated")||L(t,e,n,r,s)};document.addEventListener("click",c,{once:!1,passive:!0}),document.addEventListener("keydown",c,{once:!1,passive:!0}),document.addEventListener("scroll",c,{once:!1,passive:!0}),document.addEventListener("touchstart",c,{once:!1,passive:!0}),l.interactionHandler=c;break}default:a&&clearTimeout(a),L(t,e,n,r,s)}return i}function ye(t,e){let n=b.get(e);n&&(n.observer&&(n.observer.disconnect(),n.observer=null),n.timeoutId!==null&&(clearTimeout(n.timeoutId),n.timeoutId=null),n.interactionHandler&&(document.removeEventListener("click",n.interactionHandler),document.removeEventListener("keydown",n.interactionHandler),document.removeEventListener("scroll",n.interactionHandler),document.removeEventListener("touchstart",n.interactionHandler),n.interactionHandler=null))}function lt(t={}){let e=typeof document!="undefined"?document:null;if(!e)return{success:!1,mismatches:0,hydratedNodes:0};let n=e.querySelectorAll("[data-hydrate]:not([data-hydrated])"),r={success:!0,mismatches:0,hydratedNodes:0};return n.forEach(o=>{let s=o.getAttribute("data-hydrate");if(!s){r.success=!1;return}let i=A.get(s);if(!i){r.success=!1;return}let a=ue(`[data-hydrate="${s}"]`,i,t);r.mismatches+=a.mismatches,r.hydratedNodes+=a.hydratedNodes,a.success||(r.success=!1)}),r}function ct(t,e){A.set(t,e)}function dt(t){if(!b.get(t))return;let n=typeof document!="undefined"?document.querySelector(`[data-hydrate="${t}"]`):null;n&&(ye(n,t),n.removeAttribute("data-hydrated")),b.delete(t),A.delete(t)}function ut(){return b}function yt(){b.clear(),A.clear()}function ft(t,e={},n="div",r){let o=t.name||"anonymous",s=JSON.stringify(e),i=E(s),a="";if(typeof t.render=="function"){let u=t.render(e,{slots:t.slots||{},emit:()=>{}});a=H(u)}let l=r?` data-hydrate-when="${K(r)}"`:"",c=K(o),d=`<${n} data-hydrate="${c}" data-props="${i}"${l}>${a}</${n}>`,f=`<script type="application/json" data-hydrate-props="${c}">${s}<\/script>`;return d+f}function H(t){if(t==null)return"";let{type:e,props:n,children:r}=t;if(typeof e=="symbol"&&String(e)==="Symbol(Fragment)")return Array.isArray(r)?r.map(o=>H(o)).join(""):"";if(typeof e=="symbol"&&String(e).includes("Text"))return E(String(r||""));if(typeof e=="symbol"&&String(e).includes("Comment"))return`<!--${K(String(r||""))}-->`;if(typeof e=="string"){let o=mt(n);if(new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]).has(e))return`<${e}${o} />`;let i="";return typeof r=="string"?i=E(r):Array.isArray(r)?i=r.map(a=>H(a)).join(""):typeof r=="number"&&(i=E(String(r))),`<${e}${o}>${i}</${e}>`}if(typeof e=="function"){let o=e(n||{},{slots:r||{}});return H(o)}if(typeof e=="object"&&e!==null){let o=e;if(typeof o.render=="function"){let s=o.render(n||{},{slots:r||{},emit:()=>{}});return H(s)}}return""}function mt(t){if(!t)return"";let e=[];for(let n in t){let r=t[n];if(!(n.startsWith("on")||n.startsWith("@")||n==="key"||n==="ref")&&!(n==="__vccOpts"||n.startsWith("__"))&&!(n==="dangerouslySetInnerHTML"||n==="innerHTML"))if(r===!0)e.push(n);else{if(r===!1||r===null||r===void 0)continue;n==="class"&&typeof r=="string"?e.push(`class="${E(r)}"`):n==="style"&&typeof r=="string"?e.push(`style="${E(r)}"`):e.push(`${n}="${E(String(r))}"`)}}return e.length>0?" "+e.join(" "):""}var ee=[];function pt(t,e,n){let r=0,o=gt(t),s=H(e);if(o!==s){r++;let i={islandId:n,expected:s,actual:o,suggestion:ht(o,s,n)};ee.push(i)}return r}function gt(t){let e=t.cloneNode(!0);return e.removeAttribute("data-hydrate"),e.removeAttribute("data-props"),e.removeAttribute("data-hydrate-when"),e.removeAttribute("data-hydrated"),e.innerHTML}function ht(t,e,n){if(t.trim()==="")return`\u670D\u52A1\u7AEF\u6E32\u67D3\u4E3A\u7A7A\uFF0C\u8BF7\u68C0\u67E5\u7EC4\u4EF6 "${n}" \u7684\u670D\u52A1\u7AEF\u6E32\u67D3\u903B\u8F91`;if(e.trim()==="")return`\u5BA2\u6237\u7AEF\u6E32\u67D3\u4E3A\u7A7A\uFF0C\u8BF7\u68C0\u67E5\u7EC4\u4EF6 "${n}" \u7684 render \u51FD\u6570`;let r=/\d{10,13}/;return r.test(t)||r.test(e)?"\u68C0\u6D4B\u5230\u65F6\u95F4\u6233\u5DEE\u5F02\uFF0C\u8003\u8651\u4F7F\u7528\u7EDF\u4E00\u7684\u65F6\u95F4\u6E90\u6216\u5EF6\u8FDF\u6CE8\u6C34":le(t)===le(e)?"HTML \u5185\u5BB9\u76F8\u540C\u4F46\u5C5E\u6027\u987A\u5E8F\u4E0D\u540C\uFF0C\u8FD9\u4E0D\u5F71\u54CD\u529F\u80FD\u4F46\u53EF\u80FD\u5BFC\u81F4 mismatch \u8B66\u544A":`\u8BF7\u786E\u4FDD\u7EC4\u4EF6 "${n}" \u5728\u670D\u52A1\u7AEF\u548C\u5BA2\u6237\u7AEF\u6E32\u67D3\u76F8\u540C\u7684\u8F93\u51FA`}function le(t){return t.replace(/\s+/g," ").replace(/>\s+</g,"><").trim()}function Nt(){return[...ee]}function Tt(){ee.length=0}export{re as Comment,te as Fragment,F as PatchFlags,x as ShapeFlags,w as StringRenderer,ne as Text,yt as clearIslandRegistry,Tt as clearMismatchWarnings,ft as createHydrationIsland,be as createRenderer,Ye as getHydrateStats,ut as getIslandRegistry,Nt as getMismatchWarnings,Xe as hydrate,lt as hydrateAllIslands,ue as hydrateIsland,Ge as isHydrating,ze as onHydrated,ct as registerIslandComponent,we as renderToStream,ve as renderToStreamGenerator,$e as renderToString,ce as resetHydrateStats,Ue as setHydrating,Fe as ssrRenderer,dt as unmountIsland};
1
+ import{registerDOMOperations as Ee}from"@lytjs/vdom";var x=(i=>(i[i.ELEMENT=1]="ELEMENT",i[i.FUNCTIONAL_COMPONENT=2]="FUNCTIONAL_COMPONENT",i[i.STATEFUL_COMPONENT=4]="STATEFUL_COMPONENT",i[i.TEXT_CHILDREN=8]="TEXT_CHILDREN",i[i.ARRAY_CHILDREN=16]="ARRAY_CHILDREN",i[i.SLOTS_CHILDREN=32]="SLOTS_CHILDREN",i))(x||{}),j=(u=>(u[u.TEXT=1]="TEXT",u[u.CLASS=2]="CLASS",u[u.STYLE=4]="STYLE",u[u.PROPS=8]="PROPS",u[u.FULL_PROPS=16]="FULL_PROPS",u[u.STABLE_FRAGMENT=32]="STABLE_FRAGMENT",u[u.KEYED_FRAGMENT=64]="KEYED_FRAGMENT",u[u.UNKEYED_FRAGMENT=128]="UNKEYED_FRAGMENT",u[u.NEED_PATCH=256]="NEED_PATCH",u[u.DYNAMIC_SLOTS=512]="DYNAMIC_SLOTS",u[u.HOISTED=-1]="HOISTED",u[u.BAIL=-2]="BAIL",u))(j||{}),te=Symbol("Fragment"),ne=Symbol("Text"),re=Symbol("Comment");function C(t){return t.type===te}function _(t){return t.type===ne}function M(t){return t.type===re}function oe(t,e){return t.type===e.type&&t.key===e.key}function F(t){return Array.isArray(t.dynamicChildren)}function se(t,e,n,r){if(n==="class")t.setClass(e,r);else if(n==="style")t.setStyle(e,r);else if(n.startsWith("on")||n.startsWith("@")){let o=n.startsWith("@")?n.slice(1).toLowerCase():n.slice(2).toLowerCase();t.addEventListener(e,o,r)}else n==="key"||n==="ref"||t.setAttribute(e,n,r)}function W(t,e,n,r,o){if(n==="class")t.setClass(e,r);else if(n==="style")t.setStyle(e,r||{});else if(n.startsWith("on")||n.startsWith("@")){let s=n.startsWith("@")?n.slice(1).toLowerCase():n.slice(2).toLowerCase();o&&t.removeEventListener(e,s,o),r&&t.addEventListener(e,s,r)}else t.setAttribute(e,n,r)}function G(t,e,n,r){for(let o in r){if(o==="key"||o==="ref")continue;let s=n[o],i=r[o];i!==s&&W(t,e,o,i,s)}for(let o in n)if(!(o==="key"||o==="ref")&&!(o in r))if(o==="class")t.setClass(e,"");else if(o==="style")t.setStyle(e,{});else if(o.startsWith("on")||o.startsWith("@")){let s=o.startsWith("@")?o.slice(1).toLowerCase():o.slice(2).toLowerCase();t.removeEventListener(e,s,n[o])}else t.removeAttribute(e,o)}function U(t,e,n,r,o,s){let{shapeFlag:i}=n;if(C(n)){me(t,e,n,r,o,s);return}if(_(n)){let a=t.createText(n.children);n.el=a,t.insert(r,a,o);return}if(M(n)){let a=t.createComment(n.children);n.el=a,t.insert(r,a,o);return}if(i&1){fe(t,e,n,r,o,s);return}if(i&6){pe(e,n,r,o,s);return}}function fe(t,e,n,r,o,s){let i=n.type,a=t.createElement(i);if(n.el=a,n.props)for(let d in n.props){let f=n.props[d];se(t,a,d,f)}let{shapeFlag:l,children:c}=n;l&8?a.textContent=c:l&16&&I(e,c,a,null,s),t.insert(r,a,o)}function I(t,e,n,r,o){for(let s=0;s<e.length;s++)t(null,e[s],n,r,o)}function me(t,e,n,r,o,s){let{children:i}=n,a=t.createComment("");t.insert(r,a,o),Array.isArray(i)&&i.length>0&&I(e,i,r,a,s),n.el=a,n.anchor=a}function pe(t,e,n,r,o){let s=e.component;s&&s.update&&s.update(),s&&s.subTree&&(t(null,s.subTree,n,r,s),e.el=s.subTree.el)}function ie(t,e,n,r){let{shapeFlag:o,children:s}=n;if(C(n)){if(Array.isArray(s))for(let i=0;i<s.length;i++)e(s[i],r);n.anchor&&n.anchor.parentNode&&t.remove(n.anchor);return}if(o&6){n.component&&n.component.subTree&&e(n.component.subTree,r);return}n.el&&t.remove(n.el)}function O(t,e){for(let n=0;n<e.length;n++)t(e[n])}import{patchKeyedChildren as ge,patchUnkeyedChildren as he}from"@lytjs/vdom";function $(t,e,n,r,o,s=null,i=null){if(r==null){n&&e(n,o);return}if(n===null){U(t,Y(t,e),r,o,s,i);return}if(F(r)&&F(n)){Le(t,e,n,r,o,i);return}if(!oe(n,r)){e(n,o),U(t,Y(t,e),r,o,s,i);return}r.el=n.el,r.anchor=n.anchor;let{shapeFlag:a}=r;if(C(r)){Se(t,e,n,r,o,s,i);return}if(_(r)){r.children!==n.children&&(r.el.nodeValue=r.children);return}if(M(r)){r.children!==n.children&&(r.el.nodeValue=r.children);return}if(a&1){Ne(t,e,n,r,i);return}if(a&6){Ve(n,r,i);return}}function Y(t,e){return(n,r,o,s,i)=>{$(t,e,n,r,o,s,i)}}function Ne(t,e,n,r,o=null){let s=r.el=n.el,i=n.props||{},a=r.props||{},{patchFlag:l,dynamicProps:c}=r;if(l&&l>0){if(l&1&&n.children!==r.children&&(s.textContent=r.children),l&2&&i.class!==a.class&&t.setClass(s,a.class),l&4&&i.style!==a.style&&t.setStyle(s,a.style||{}),l&8&&c)for(let d=0;d<c.length;d++){let f=c[d],u=i[f],N=a[f];N!==u&&W(t,s,f,N,u)}l&16&&G(t,s,i,a)}else G(t,s,i,a);(!l||!(l&1))&&ae(t,e,n,r,s,null,o)}function ae(t,e,n,r,o,s,i){let a=n.shapeFlag,l=r.shapeFlag,c=n.children,d=r.children;if(l&8){a&16&&O(e,c),c!==d&&(o.textContent=d);return}if(l&16){a&16?Te(t,e,c,d,o,s,i):(a&8&&(o.textContent=""),I(Y(t,e),d,o,s,i));return}d==null&&(a&8?o.textContent="":a&16&&O(e,c))}function Te(t,e,n,r,o,s,i){r.every(l=>l.key!==null&&l.key!==void 0)&&n.every(l=>l.key!==null&&l.key!==void 0)?ge(n,r,o,s,i,null,!1):he(n,r,o,s,i,null,!1)}function Se(t,e,n,r,o,s,i){let a=n.children,l=r.children;Array.isArray(l)&&l.length>0?(ae(t,e,n,r,o,s,i),r.el=l[0].el,r.anchor=l[l.length-1].el?t.nextSibling(l[l.length-1].el):s):Array.isArray(a)&&a.length>0&&l===null?(O(e,a),r.el=n.el,r.anchor=n.anchor):(r.el=n.el,r.anchor=n.anchor)}function Le(t,e,n,r,o,s){let i=n.dynamicChildren,a=r.dynamicChildren;for(let l=0;l<a.length;l++)$(t,e,i[l],a[l],o,null,s)}function Ve(t,e,n){e.component=t.component,e.el=t.el,e.component&&e.component.update&&e.component.update()}function be(t){function e(o,s){ie(t,e,o,s)}Ee({insert(o,s,i){t.insert(s,o,i)},createElement(o){return t.createElement(o)},createText(o){return t.createText(o)},setText(o,s){o.nodeValue=s},setElementText(o,s){o.textContent=s},remove(o){t.remove(o)},createComment(o){return t.createComment(o)},mount(o,s,i,a,l,c,d){r(null,o,s,i,a)},patch(o,s,i,a,l,c,d,f){r(o,s,i,a,l)},unmount(o,s,i,a){e(o)},move(o,s,i){t.insert(s,o.el,i)}});function r(o,s,i,a,l){$(t,e,o,s,i,a,l)}return{mount(o,s){s.nodeType===1&&(s.textContent=""),r(null,o,s,null,null)},patch(o,s,i){var a;r(o,s,i||((a=o.el)==null?void 0:a.parentNode),null,null)},unmount(o,s){e(o,s)}}}import{ShapeFlags as h}from"@lytjs/vdom";import{normalizeClass as He,normalizeStyle as Ae}from"@lytjs/common";var z=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ce={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Re=/[&<>"']/g;var xe=0;function y(t){return t.replace(Re,e=>Ce[e])}function _e(t,e){return t.startsWith("on")||t.startsWith("@")||t==="key"||t==="ref"||t==="__vccOpts"||t.startsWith("__")?"":e===!0?t:e===!1||e===null||e===void 0?"":t==="class"?`class="${y(He(e))}"`:t==="style"?`style="${y(Ae(e))}"`:t==="dangerouslySetInnerHTML"||t==="innerHTML"?"":`${t}="${y(String(e))}"`}function X(t){if(!t)return"";let e=[];for(let n in t){let r=t[n],o=_e(n,r);o&&e.push(o)}return e.length>0?" "+e.join(" "):""}var w=class{createElement(e){return{tag:e,props:{},children:[]}}createText(e){return{type:"text",value:e}}createComment(e){return{type:"comment",value:e}}insert(e,n,r){e.children.push(n)}renderToString(e){return m(e)}async*renderToStream(e){yield*v(e)}};function m(t){if(t==null)return"";let{type:e,props:n,children:r}=t;return typeof e=="symbol"&&String(e)==="Symbol(Fragment)"?Array.isArray(r)?r.map(o=>m(o)).join(""):"":typeof e=="symbol"&&String(e).includes("Text")?y(String(r||"")):typeof e=="symbol"&&String(e).includes("Comment")?`<!--${String(r||"")}-->`:typeof e=="string"?Me(e,n,r,t):typeof e=="object"&&e!==null||typeof e=="function"?R(t):""}function Me(t,e,n,r){let o=X(e);if(z.has(t))return`<${t}${o} />`;if(e&&(e.dangerouslySetInnerHTML||e.innerHTML)){let a=e.dangerouslySetInnerHTML?e.dangerouslySetInnerHTML.__html||e.dangerouslySetInnerHTML:e.innerHTML;return`<${t}${o}>${y(String(a))}</${t}>`}let s="",i=r.shapeFlag||0;return i&h.TEXT_CHILDREN?s=y(String(n||"")):i&h.ARRAY_CHILDREN&&Array.isArray(n)?s=n.map(a=>m(a)).join(""):i&h.SLOTS_CHILDREN&&typeof n=="object"&&n!==null?s=q(n):typeof n=="string"?s=y(n):Array.isArray(n)?s=n.map(a=>m(a)).join(""):typeof n=="number"&&(s=y(String(n))),`<${t}${o}>${s}</${t}>`}function q(t){let e=[];for(let n in t){let r=t[n];if(typeof r=="function"){let o=r();Array.isArray(o)?e.push(o.map(s=>m(s)).join("")):o!=null&&e.push(m(o))}else Array.isArray(r)?e.push(r.map(o=>m(o)).join("")):r!=null&&e.push(m(r))}return e.join("")}function R(t){let e=t.type;if(e&&e.__island)return Ie(t,e);if(typeof e=="function"){let n=e(t.props||{},{slots:t.children||{}});return m(n)}if(typeof e=="object"&&e!==null){if(typeof e.render=="function"){let n=e.render(t.props||{},{slots:t.children||{},emit:()=>{}});return m(n)}if(typeof e.setup=="function"){let n=e.setup(t.props||{},{emit:()=>{},slots:t.children||{}});if(typeof n=="function"){let r=n();return m(r)}if(typeof e.render=="function"){let r=e.render(n||{},{slots:t.children||{},emit:()=>{}});return m(r)}}}return t.component&&t.component.subTree?m(t.component.subTree):"<!---->"}function Ie(t,e){var N;let n=e.name||((N=t.props)==null?void 0:N["data-island-id"])||"anonymous",r=t.props||{},o=r["data-hydrate-when"]||e.__hydrateWhen||"",s=e.__islandTag||"div",i={};for(let T in r)T==="data-hydrate-when"||T==="data-island-id"||(i[T]=r[T]);let a=JSON.stringify(i),l=y(a),c="";if(typeof e.render=="function"){let T=e.render(r,{slots:t.children||{},emit:()=>{}});c=m(T)}else if(typeof e=="function"){let T=e(r,{slots:t.children||{}});c=m(T)}let d=o?` data-hydrate-when="${y(o)}"`:"",f=`<${s} data-hydrate="${y(n)}" data-props="${l}"${d}>${c}</${s}>`,u=`<script type="application/json" data-hydrate-props="${y(n)}">${a}<\/script>`;return f+u}async function*v(t){if(t==null)return;let{type:e,props:n,children:r}=t;if(typeof e=="symbol"&&String(e)==="Symbol(Fragment)"){if(Array.isArray(r))for(let o of r)yield*v(o);return}if(typeof e=="symbol"&&String(e).includes("Text")){yield y(String(r||""));return}if(typeof e=="symbol"&&String(e).includes("Comment")){yield`<!--${String(r||"")}-->`;return}if(typeof e=="string"){yield*Oe(e,n,r,t);return}if(typeof e=="object"||typeof e=="function"){yield R(t);return}}async function*Oe(t,e,n,r){let o=X(e);if(z.has(t)){yield`<${t}${o} />`;return}if(e&&(e.dangerouslySetInnerHTML||e.innerHTML)){let i=e.dangerouslySetInnerHTML?e.dangerouslySetInnerHTML.__html||e.dangerouslySetInnerHTML:e.innerHTML;yield`<${t}${o}>${y(String(i))}</${t}>`;return}yield`<${t}${o}>`;let s=r.shapeFlag||0;if(s&h.TEXT_CHILDREN)yield y(String(n||""));else if(s&h.ARRAY_CHILDREN&&Array.isArray(n))for(let i of n)yield*v(i);else if(s&h.SLOTS_CHILDREN&&typeof n=="object"&&n!==null)yield q(n);else if(typeof n=="string")yield y(n);else if(Array.isArray(n))for(let i of n)yield*v(i);else typeof n=="number"&&(yield y(String(n)));yield`</${t}>`}function $e(t){return m(t)}function we(t,e){let n=(e==null?void 0:e.suspenseIdPrefix)||"suspense",r=S(t,n);return new ReadableStream({async pull(o){let{value:s,done:i}=await r.next();i?o.close():o.enqueue(s)},async cancel(){await r.return(void 0)}})}async function*ve(t,e){let n=(e==null?void 0:e.suspenseIdPrefix)||"suspense";yield*S(t,n)}async function*S(t,e){if(t==null)return;let{type:n,props:r,children:o}=t;if(typeof n=="symbol"&&String(n)==="Symbol(Fragment)"){if(Array.isArray(o))for(let s of o)yield*S(s,e);return}if(typeof n=="symbol"&&String(n).includes("Text")){yield y(String(o||""));return}if(typeof n=="symbol"&&String(n).includes("Comment")){yield`<!--${String(o||"")}-->`;return}if(typeof n=="string"){yield*ke(n,r,o,t,e);return}if(typeof n=="object"&&n!==null){let s=n;if(s.name==="Suspense"||s._isSuspense){yield*De(t,e);return}if(s._isAsyncComponent||s.__asyncSetup){yield*Pe(t,e);return}yield R(t);return}if(typeof n=="function"){yield R(t);return}}async function*ke(t,e,n,r,o){let s=X(e);if(z.has(t)){yield`<${t}${s} />`;return}if(e&&(e.dangerouslySetInnerHTML||e.innerHTML)){let a=e.dangerouslySetInnerHTML?e.dangerouslySetInnerHTML.__html||e.dangerouslySetInnerHTML:e.innerHTML;yield`<${t}${s}>${y(String(a))}</${t}>`;return}yield`<${t}${s}>`;let i=r.shapeFlag||0;if(i&h.TEXT_CHILDREN)yield y(String(n||""));else if(i&h.ARRAY_CHILDREN&&Array.isArray(n))for(let a of n)yield*S(a,o);else if(i&h.SLOTS_CHILDREN&&typeof n=="object"&&n!==null)yield q(n);else if(typeof n=="string")yield y(n);else if(Array.isArray(n))for(let a of n)yield*S(a,o);else typeof n=="number"&&(yield y(String(n)));yield`</${t}>`}async function*De(t,e){let n=`${e}-${xe++}`,o=(t.props||{}).fallback,s="";o&&(typeof o=="object"&&o!==null?s=m(o):typeof o=="string"&&(s=o));let i=t.children,a=[];if(typeof i=="object"&&i!==null){if(Array.isArray(i))a=i;else if(typeof i.default=="function"){let d=i.default();Array.isArray(d)?a=d:d!=null&&(a=[d])}}let l=[];function c(d){for(let f of d){if(f==null)continue;let u=f.type;if(u&&(u._isAsyncComponent||u.__asyncSetup||f.__asyncSetup)){let N=f.__asyncPromise||u.__asyncPromise;N&&l.push(N.then(()=>{}))}}}if(c(a),l.length===0){for(let d of a)yield*S(d,e);return}yield`<!--${n}-fallback-->`,yield s,await Promise.all(l),yield`<!--${n}-resolved-->`;for(let d of a)yield*S(d,e);yield`<!--/${n}-->`}async function*Pe(t,e){let n=t.type,r=t.__asyncPromise||n.__asyncPromise;if(r)try{await r}catch(o){yield"<!--async-component-error-->";return}yield R(t)}var je=new w;import{LytError as Fe,LytErrorCodes as We}from"@lytjs/common";var D={ELEMENT:1,FUNCTIONAL_COMPONENT:2,STATEFUL_COMPONENT:4,TEXT_CHILDREN:8,ARRAY_CHILDREN:16,SLOTS_CHILDREN:32},g=!1,Q=[],B=!1,p={success:!0,mismatches:0,hydratedNodes:0};function Ge(){return g}function Ue(t){g=t}function Ye(){return{...p}}function ce(){p={success:!0,mismatches:0,hydratedNodes:0}}function ze(t){g?Q.push(t):t()}function Xe(t,e,n={}){ce(),n.onHydrated&&Q.push(n.onHydrated),g=!0;try{let r=e.firstElementChild;return r?(t._vnode||t.mount(e),t._vnode&&V(r,t._vnode,n),g=!1,J(),p):(g=!1,t.mount(e),p.success=!1,J(),p)}catch(r){return g=!1,p.success=!1,e.innerHTML="",t.mount(e),J(),p}}function J(){if(B)return;B=!0;let t=Q.splice(0);for(let e of t)try{e()}catch(n){}B=!1}function V(t,e,n){if(tt(e)){Ke(t,e,n);return}if(nt(e)){Be(t,e,n);return}if(rt(e)){Je(t,e,n);return}if(ot(e)){Qe(t,e,n);return}if(typeof e.type=="string"){qe(t,e,n);return}}function qe(t,e,n){let r=t.tagName.toLowerCase(),o=e.type.toLowerCase();if(r!==o){P(t,e,`\u6807\u7B7E\u4E0D\u5339\u914D: DOM "${r}" vs VNode "${o}"`,n);return}e.el=t,e.props&&Z(t,e.props),e.ref&&et(t,e.ref),Ze(t,e,n),p.hydratedNodes++}function Be(t,e,n){if(t.nodeType!==3){P(t,e,"\u671F\u671B\u6587\u672C\u8282\u70B9",n);return}e.el=t;let r=t.nodeValue||"",o=String(e.children||"");r!==o&&(t.nodeValue=o,n.strict),p.hydratedNodes++}function Je(t,e,n){if(t.nodeType!==8){P(t,e,"\u671F\u671B\u6CE8\u91CA\u8282\u70B9",n);return}e.el=t;let r=t.nodeValue||"",o=String(e.children||"");r!==o&&(t.nodeValue=o),p.hydratedNodes++}function Ke(t,e,n){if(!Array.isArray(e.children))return;let r=Array.from(t.childNodes);for(let o=0;o<e.children.length;o++){let s=e.children[o],i=r[o];if(!i){p.mismatches++;break}V(i,s,n)}}function Qe(t,e,n){if(e.component&&e.component.subTree){V(t,e.component.subTree,n),e.el=e.component.subTree.el;return}let r=e.type;if(typeof r=="function")try{let o=r(e.props||{},{slots:e.children||{}});if(o){V(t,o,n),e.el=o.el;return}}catch(o){}if(typeof r=="object"&&r!==null&&typeof r.render=="function")try{let o=r.render(e.props||{},{slots:e.children||{},emit:()=>{}});if(o){V(t,o,n),e.el=o.el;return}}catch(o){}P(t,e,"\u7EC4\u4EF6\u65E0\u6CD5\u83B7\u53D6 subTree",n)}function Ze(t,e,n){if(!e.children)return;let r=e.shapeFlag||0;if(typeof e.children=="string"||r&D.TEXT_CHILDREN){let o=t.textContent||"",s=String(e.children||"");o!==s&&(t.textContent=s,n.strict);return}if(Array.isArray(e.children)){let o=Array.from(t.childNodes),s=0;for(let i=0;i<o.length&&s<e.children.length;i++){let a=e.children[s];if(a==null){s++;continue}V(o[i],a,n),s++}s<e.children.length&&p.mismatches++}r&D.SLOTS_CHILDREN&&typeof e.children=="object"&&e.children}function Z(t,e){for(let n in e){let r=e[n];if(n.startsWith("on")&&typeof r=="function"){let o=n.slice(2).toLowerCase();t.addEventListener(o,r)}}}function et(t,e){typeof e=="function"?e(t):e&&typeof e=="object"&&(e.current=t)}function tt(t){return typeof t.type=="symbol"&&String(t.type)==="Symbol(Fragment)"}function nt(t){return typeof t.type=="symbol"&&String(t.type).includes("Text")}function rt(t){return typeof t.type=="symbol"&&String(t.type).includes("Comment")}function ot(t){return!!((t.shapeFlag||0)&(D.STATEFUL_COMPONENT|D.FUNCTIONAL_COMPONENT)||typeof t.type=="object"&&t.type!==null||typeof t.type=="function")}function P(t,e,n,r){let o=`[lyt] \u6CE8\u6C34\u4E0D\u5339\u914D: ${n}`;if(p.mismatches++,r.strict)throw new Fe(We.LYT_SSR_HYDRATION_ERROR,o)}var b=new Map,A=new Map,de={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},st=/[&<>"']/g;function E(t){return t.replace(st,e=>de[e])}function K(t){return t.replace(/[&<>"']/g,e=>de[e])}function ue(t,e,n={}){let r=typeof document!="undefined"?document:null;if(!r)return{success:!1,mismatches:0,hydratedNodes:0};let o=r.querySelector(t);if(!o)return{success:!1,mismatches:0,hydratedNodes:0};let s=o.getAttribute("data-hydrate");if(!s)return{success:!1,mismatches:0,hydratedNodes:0};if(o.hasAttribute("data-hydrated"))return{success:!0,mismatches:0,hydratedNodes:0};let i=it(s,r);if(i===null)return{success:!1,mismatches:0,hydratedNodes:0};let a=o.getAttribute("data-hydrate-when");return a||n.lazy?at(o,s,e,i,a||"visible",n):L(o,s,e,i,n)}function it(t,e){let n=e.querySelector(`script[type="application/json"][data-hydrate-props="${t}"]`);if(!n){let r=e.querySelector(`[data-hydrate="${t}"]`);if(r){let o=r.getAttribute("data-props");if(o)try{return JSON.parse(o)}catch(s){return null}}return{}}try{return JSON.parse(n.textContent||"{}")}catch(r){return null}}function L(t,e,n,r,o){let s={success:!0,mismatches:0,hydratedNodes:0};try{g=!0;let i=null;if(typeof n.render=="function")i=n.render(r,{slots:n.slots||{},emit:()=>{}});else if(typeof n.setup=="function"){let l=n.setup(r,{emit:()=>{},slots:n.slots||{}});typeof l=="function"&&(i=l())}if(!i)return g=!1,s.success=!1,s;if(o.dev!==!1){let l=pt(t,i,e);s.mismatches=l}V(t,i,o),s.hydratedNodes=p.hydratedNodes,i.props&&Z(t,i.props),k(t,i),t.setAttribute("data-hydrated","");let a={id:e,hydrated:!0,instance:n,eventListeners:[],timeoutId:null,observer:null,interactionHandler:null};return b.set(e,a),A.set(e,n),g=!1,o.onHydrated&&o.onHydrated(),s}catch(i){return g=!1,s.success=!1,s}}function k(t,e){if(!(!e.children||typeof e.children=="string")&&Array.isArray(e.children)){let n=Array.from(t.children),r=0;for(let o=0;o<n.length&&r<e.children.length;o++){let s=e.children[r];if(s==null){r++;continue}if(typeof s.type=="string"&&s.props)Z(n[o],s.props),k(n[o],s);else if(typeof s.type=="object"||typeof s.type=="function"){let i=s.type;if(typeof i=="function")try{let a=i(s.props||{},{slots:s.children||{}});a&&n[o]&&k(n[o],a)}catch(a){}else if(i&&typeof i.render=="function")try{let a=i.render(s.props||{},{slots:s.children||{},emit:()=>{}});a&&n[o]&&k(n[o],a)}catch(a){}}r++}}}function at(t,e,n,r,o,s){let i={success:!0,mismatches:0,hydratedNodes:0},a=null;s.timeout&&s.timeout>0&&(a=setTimeout(()=>{ye(t,e),L(t,e,n,r,s)},s.timeout));let l={id:e,hydrated:!1,instance:n,eventListeners:[],timeoutId:a,observer:null,interactionHandler:null};switch(b.set(e,l),A.set(e,n),o){case"visible":{if(typeof IntersectionObserver!="undefined"){let c=new IntersectionObserver(d=>{for(let f of d)f.isIntersecting&&(c.unobserve(f.target),l.observer=null,a&&clearTimeout(a),l.timeoutId=null,L(t,e,n,r,s))},{rootMargin:"200px"});c.observe(t),l.observer=c}else a&&clearTimeout(a),L(t,e,n,r,s);break}case"idle":{(d=>{typeof requestIdleCallback!="undefined"?requestIdleCallback(d,{timeout:s.timeout||2e3}):setTimeout(d,1)})(()=>{a&&clearTimeout(a),l.timeoutId=null,t.hasAttribute("data-hydrated")||L(t,e,n,r,s)});break}case"interaction":{let c=()=>{a&&clearTimeout(a),l.timeoutId=null,l.interactionHandler=null,document.removeEventListener("click",c),document.removeEventListener("keydown",c),document.removeEventListener("scroll",c),document.removeEventListener("touchstart",c),t.hasAttribute("data-hydrated")||L(t,e,n,r,s)};document.addEventListener("click",c,{once:!1,passive:!0}),document.addEventListener("keydown",c,{once:!1,passive:!0}),document.addEventListener("scroll",c,{once:!1,passive:!0}),document.addEventListener("touchstart",c,{once:!1,passive:!0}),l.interactionHandler=c;break}default:a&&clearTimeout(a),L(t,e,n,r,s)}return i}function ye(t,e){let n=b.get(e);n&&(n.observer&&(n.observer.disconnect(),n.observer=null),n.timeoutId!==null&&(clearTimeout(n.timeoutId),n.timeoutId=null),n.interactionHandler&&(document.removeEventListener("click",n.interactionHandler),document.removeEventListener("keydown",n.interactionHandler),document.removeEventListener("scroll",n.interactionHandler),document.removeEventListener("touchstart",n.interactionHandler),n.interactionHandler=null))}function lt(t={}){let e=typeof document!="undefined"?document:null;if(!e)return{success:!1,mismatches:0,hydratedNodes:0};let n=e.querySelectorAll("[data-hydrate]:not([data-hydrated])"),r={success:!0,mismatches:0,hydratedNodes:0};return n.forEach(o=>{let s=o.getAttribute("data-hydrate");if(!s){r.success=!1;return}let i=A.get(s);if(!i){r.success=!1;return}let a=ue(`[data-hydrate="${s}"]`,i,t);r.mismatches+=a.mismatches,r.hydratedNodes+=a.hydratedNodes,a.success||(r.success=!1)}),r}function ct(t,e){A.set(t,e)}function dt(t){if(!b.get(t))return;let n=typeof document!="undefined"?document.querySelector(`[data-hydrate="${t}"]`):null;n&&(ye(n,t),n.removeAttribute("data-hydrated")),b.delete(t),A.delete(t)}function ut(){return b}function yt(){b.clear(),A.clear()}function ft(t,e={},n="div",r){let o=t.name||"anonymous",s=JSON.stringify(e),i=E(s),a="";if(typeof t.render=="function"){let u=t.render(e,{slots:t.slots||{},emit:()=>{}});a=H(u)}let l=r?` data-hydrate-when="${K(r)}"`:"",c=K(o),d=`<${n} data-hydrate="${c}" data-props="${i}"${l}>${a}</${n}>`,f=`<script type="application/json" data-hydrate-props="${c}">${s}<\/script>`;return d+f}function H(t){if(t==null)return"";let{type:e,props:n,children:r}=t;if(typeof e=="symbol"&&String(e)==="Symbol(Fragment)")return Array.isArray(r)?r.map(o=>H(o)).join(""):"";if(typeof e=="symbol"&&String(e).includes("Text"))return E(String(r||""));if(typeof e=="symbol"&&String(e).includes("Comment"))return`<!--${K(String(r||""))}-->`;if(typeof e=="string"){let o=mt(n);if(new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]).has(e))return`<${e}${o} />`;let i="";return typeof r=="string"?i=E(r):Array.isArray(r)?i=r.map(a=>H(a)).join(""):typeof r=="number"&&(i=E(String(r))),`<${e}${o}>${i}</${e}>`}if(typeof e=="function"){let o=e(n||{},{slots:r||{}});return H(o)}if(typeof e=="object"&&e!==null){let o=e;if(typeof o.render=="function"){let s=o.render(n||{},{slots:r||{},emit:()=>{}});return H(s)}}return""}function mt(t){if(!t)return"";let e=[];for(let n in t){let r=t[n];if(!(n.startsWith("on")||n.startsWith("@")||n==="key"||n==="ref")&&!(n==="__vccOpts"||n.startsWith("__"))&&!(n==="dangerouslySetInnerHTML"||n==="innerHTML"))if(r===!0)e.push(n);else{if(r===!1||r===null||r===void 0)continue;n==="class"&&typeof r=="string"?e.push(`class="${E(r)}"`):n==="style"&&typeof r=="string"?e.push(`style="${E(r)}"`):e.push(`${n}="${E(String(r))}"`)}}return e.length>0?" "+e.join(" "):""}var ee=[];function pt(t,e,n){let r=0,o=gt(t),s=H(e);if(o!==s){r++;let i={islandId:n,expected:s,actual:o,suggestion:ht(o,s,n)};ee.push(i)}return r}function gt(t){let e=t.cloneNode(!0);return e.removeAttribute("data-hydrate"),e.removeAttribute("data-props"),e.removeAttribute("data-hydrate-when"),e.removeAttribute("data-hydrated"),e.innerHTML}function ht(t,e,n){if(t.trim()==="")return`\u670D\u52A1\u7AEF\u6E32\u67D3\u4E3A\u7A7A\uFF0C\u8BF7\u68C0\u67E5\u7EC4\u4EF6 "${n}" \u7684\u670D\u52A1\u7AEF\u6E32\u67D3\u903B\u8F91`;if(e.trim()==="")return`\u5BA2\u6237\u7AEF\u6E32\u67D3\u4E3A\u7A7A\uFF0C\u8BF7\u68C0\u67E5\u7EC4\u4EF6 "${n}" \u7684 render \u51FD\u6570`;let r=/\d{10,13}/;return r.test(t)||r.test(e)?"\u68C0\u6D4B\u5230\u65F6\u95F4\u6233\u5DEE\u5F02\uFF0C\u8003\u8651\u4F7F\u7528\u7EDF\u4E00\u7684\u65F6\u95F4\u6E90\u6216\u5EF6\u8FDF\u6CE8\u6C34":le(t)===le(e)?"HTML \u5185\u5BB9\u76F8\u540C\u4F46\u5C5E\u6027\u987A\u5E8F\u4E0D\u540C\uFF0C\u8FD9\u4E0D\u5F71\u54CD\u529F\u80FD\u4F46\u53EF\u80FD\u5BFC\u81F4 mismatch \u8B66\u544A":`\u8BF7\u786E\u4FDD\u7EC4\u4EF6 "${n}" \u5728\u670D\u52A1\u7AEF\u548C\u5BA2\u6237\u7AEF\u6E32\u67D3\u76F8\u540C\u7684\u8F93\u51FA`}function le(t){return t.replace(/\s+/g," ").replace(/>\s+</g,"><").trim()}function Nt(){return[...ee]}function Tt(){ee.length=0}export{re as Comment,te as Fragment,j as PatchFlags,x as ShapeFlags,w as StringRenderer,ne as Text,yt as clearIslandRegistry,Tt as clearMismatchWarnings,ft as createHydrationIsland,be as createRenderer,Ye as getHydrateStats,ut as getIslandRegistry,Nt as getMismatchWarnings,Xe as hydrate,lt as hydrateAllIslands,ue as hydrateIsland,Ge as isHydrating,ze as onHydrated,ct as registerIslandComponent,we as renderToStream,ve as renderToStreamGenerator,$e as renderToString,ce as resetHydrateStats,Ue as setHydrating,je as ssrRenderer,dt as unmountIsland};
@@ -1 +1 @@
1
- {"version":3,"file":"dom-ops.d.ts","sourceRoot":"","sources":["../../../src/dom/dom-ops.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAkHH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAwEjE;AAED;;;;;;;;;;;;;GAaG;AACH,w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