PageSourceSearch

https://mstudio.ai/build/assets/state.L8kQliOB.js

js mstudio.ai collected 2026-10-05 12:16:52 UTC 3,523 bytes, 1 lines download raw bytes

1import{r as k}from"./rolldown-runtime.C1f3BsDW.js";import{Qr as M}from"./icons.ChOq_Y4q.js";var j=t=>{let e;const n=new Set,r=(i,h)=>{const d=typeof i=="function"?i(e):i;if(!Object.is(d,e)){const b=e;e=h??(typeof d!="object"||d===null)?d:Object.assign({},e,d),n.forEach(m=>m(e,b))}},a=()=>e,u={setState:r,getState:a,getInitialState:()=>g,subscribe:i=>(n.add(i),()=>n.delete(i))},g=e=t(r,a,u);return u},P=(t=>t?j(t):j),y=k(M(),1),R=t=>t;function C(t,e=R){const n=y.useSyncExternalStore(t.subscribe,y.useCallback(()=>e(t.getState()),[t,e]),y.useCallback(()=>e(t.getInitialState()),[t,e]));return y.useDebugValue(n),n}var _=t=>{const e=P(t),n=r=>C(e,r);return Object.assign(n,e),n},Q=(t=>t?_(t):_);function F(t,e){let n;try{n=t()}catch{return}return{getItem:r=>{var a;const s=u=>u===null?null:JSON.parse(u,e?.reviver),f=(a=n.getItem(r))!=null?a:null;return f instanceof Promise?f.then(s):s(f)},setItem:(r,a)=>n.setItem(r,JSON.stringify(a,e?.replacer)),removeItem:r=>n.removeItem(r)}}var p=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(r){return p(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return p(r)(n)}}}},J=(t,e)=>(n,r,a)=>{let s={storage:F(()=>localStorage),partialize:o=>o,version:0,merge:(o,S)=>({...S,...o}),...e},f=!1;const u=new Set,g=new Set;let i=s.storage;if(!i)return t((...o)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...o)},r,a);const h=()=>{const o=s.partialize({...r()});return i.setItem(s.name,{state:o,version:s.version})},d=a.setState;a.setState=(o,S)=>(d(o,S),h());const b=t((...o)=>(n(...o),h()),r,a);a.getInitialState=()=>b;let m;const I=()=>{var o,S;if(!i)return;f=!1,u.forEach(c=>{var l;return c((l=r())!=null?l:b)});const O=((S=s.onRehydrateStorage)==null?void 0:S.call(s,(o=r())!=null?o:b))||void 0;return p(i.getItem.bind(i))(s.name).then(c=>{if(c)if(typeof c.version=="number"&&c.version!==s.version){if(s.migrate){const l=s.migrate(c.state,c.version);return l instanceof Promise?l.then(v=>[!0,v]):[!0,l]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,c.state];return[!1,void 0]}).then(c=>{var l;const[v,H]=c;if(m=s.merge(H,(l=r())!=null?l:b),n(m,!0),v)return h()}).then(()=>{O?.(m,void 0),m=r(),f=!0,g.forEach(c=>c(m))}).catch(c=>{O?.(void 0,c)})};return a.persist={setOptions:o=>{s={...s,...o},o.storage&&(i=o.storage)},clearStorage:()=>{i?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>I(),hasHydrated:()=>f,onHydrate:o=>(u.add(o),()=>{u.delete(o)}),onFinishHydration:o=>(g.add(o),()=>{g.delete(o)})},s.skipHydration||I(),m||b},T=J,x=t=>Symbol.iterator in t,w=t=>"entries"in t,E=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),r=e instanceof Map?e:new Map(e.entries());if(n.size!==r.size)return!1;for(const[a,s]of n)if(!r.has(a)||!Object.is(s,r.get(a)))return!1;return!0},N=(t,e)=>{const n=t[Symbol.iterator](),r=e[Symbol.iterator]();let a=n.next(),s=r.next();for(;!a.done&&!s.done;){if(!Object.is(a.value,s.value))return!1;a=n.next(),s=r.next()}return!!a.done&&!!s.done};function L(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:x(t)&&x(e)?w(t)&&w(e)?E(t,e):N(t,e):E({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function U(t){const e=y.useRef(void 0);return n=>{const r=t(n);return L(e.current,r)?e.current:e.current=r}}export{Q as i,F as n,T as r,U as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.