1import{u as t,d as n,f as e,i as o}from"./p-BHzyBdPs.js";function r(t){if(null===t||"object"!=typeof t)return!1;const n=Object.getPrototypeOf(t);return n===Object.prototype||null===n}const c=new Set(["get","peek","set","update","asReadonly"]);function s(e,o){const i=()=>e(),f=()=>e.peek();let u=Object.assign(i,{get:i,peek:f});if(void 0!==o){const n=n=>{Object.is(t(f),n)||o(n)};let r;u=Object.assign(u,{set:n,update:e=>{n(e(t(f)))},asReadonly:()=>r??=s(e,void 0)})}const a=new Map;return new Proxy(u,{get(t,i,f){if("string"!=typeof i||c.has(i))return Reflect.get(t,i,f);const u=e.peek();if(!r(u)||!Object.hasOwn(u,i))return Reflect.get(t,i,f);let l=a.get(i);return void 0===l&&(l=s(n((()=>e()[i])),void 0===o?void 0:t=>{o({...e.peek(),[i]:t})}),a.set(i,l)),l},set(t,n){throw new TypeError(`DeepSignal: cannot assign to "${String(n)}". Use .set()/.update() on the nested signal.`)},has(t,n){if("string"!=typeof n||c.has(n))return Reflect.has(t,n);const o=e.peek();return r(o)&&Object.hasOwn(o,n)||Reflect.has(t,n)}})}function i(t){const n=t;return s(t,"function"==typeof n.set?t=>{n.set(t)}:void 0)}function f(t,e){return i(n(t,e))}const u=Symbol("@fabric/stencil-signals/store/state-source"),a=Symbol("@fabric/stencil-signals/store/initial-state");function l(t){const n={};for(const e of Object.keys(t))n[e]=t[e].peek();return n}function b(t,n){const e=Object.create(null),o=Object.create(null);return new Proxy({},{get(c,s){if(s===u)return t.stateSignals;if(s===a)return t.initial;if("string"==typeof s){const c=t.stateSignals[s];if(void 0!==c){const t=n?e[s]??=c.asReadonly():c;return r(c.peek())?o[s]??=i(t):t}if(Object.hasOwn(t.computedSignals,s))return t.computedSignals[s];if(Object.hasOwn(t.methods,s))return t.methods[s];if(Object.hasOwn(t.props,s))return t.props[s]}},set(t,n){throw new TypeError(`signalStore: cannot assign to "${String(n)}". Use signal.set()/update(), patchState(), or a method.`)},has:(n,e)=>e===u||e===a||"string"==typeof e&&(Object.hasOwn(t.stateSignals,e)||Object.hasOwn(t.computedSignals,e)||Object.hasOwn(t.methods,e)||Object.hasOwn(t.props,e))})}function p(...t){return function(t){const n={stateSignals:{},computedSignals:{},methods:{},props:Object.create(null),initial:{},config:{}},e=b(n,!1);for(const o of t)o(n,e);return!1!==n.config.isStateWritable?e:b(n,!0)}(t)}function j(...t){return(n,e)=>{for(const o of t)o(n,e)}}const O=()=>{};function g(){return O}function d(t){return n=>{const o=e();for(const e of Object.keys(t)){const r=e;n.stateSignals[r]=o.createState(t[e]),n.initial[r]=t[e]}}}function y(t){return(n,e)=>{Object.assign(n.computedSignals,t(e))}}function w(t){return(n,e)=>{Object.assign(n.methods,t(e))}}function S(t,n){if(!r(t)||!r(n))return n;const e={...t};for(const o of Object.keys(n))e[o]=S(t[o],n[o]);return e}function h(t,...n){const e=t[u];o((()=>{for(const o of n){const n="function"==typeof o?o(l(t[u])):o;for(const t of Object.keys(n)){const o=e[t];if(void 0===o)throw new TypeError(`patchState: unknown state key "${t}".`);const r=n[t];o.set(S(o.peek(),r))}}}))}function v(t){return{...t[a]}}export{d as a,j as b,w as c,f as d,v as g,h as p,p as s,g as t,y as w}
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.