AK-21/Graphite-Industrial-Intelligence
0
1System.register([], (function (exports) {2 'use strict';3 return {4 execute: (function () {5 6 const createStoreImpl = (createState) => {7 let state;8 const listeners = /* @__PURE__ */ new Set();9 const setState = (partial, replace) => {10 const nextState = typeof partial === "function" ? partial(state) : partial;11 if (!Object.is(nextState, state)) {12 const previousState = state;13 state = (replace != null ? replace : typeof nextState !== "object" || nextState === null) ? nextState : Object.assign({}, state, nextState);14 listeners.forEach((listener) => listener(state, previousState));15 }16 };17 const getState = () => state;18 const getInitialState = () => initialState;19 const subscribe = (listener) => {20 listeners.add(listener);21 return () => listeners.delete(listener);22 };23 const destroy = () => {24 {25 console.warn(26 "[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."27 );28 }29 listeners.clear();30 };31 const api = { setState, getState, getInitialState, subscribe, destroy };32 const initialState = state = createState(setState, getState, api);33 return api;34 };35 const createStore = exports("createStore", (createState) => createState ? createStoreImpl(createState) : createStoreImpl);36 var vanilla = exports("default", (createState) => {37 {38 console.warn(39 "[DEPRECATED] Default export is deprecated. Instead use import { createStore } from 'zustand/vanilla'."40 );41 }42 return createStore(createState);43 });44 45 })46 };47}));48 