{"version":3,"sources":["jsdelivr-header.js","/npm/koot@0.15.15/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,qBCLkB,yBACA,eACX,mCACE,UAAa,mCACf,iBAAkB,uCAEd,cACP,UACA,YACA,cACA,WACA,iBACG,+BAQK,yBAA0B,gBAEtC,MAAM,YAAE,eAAgB,qBAAwB,4BACvC,YAAa,4BAMb,sBAAyB,6BAK9B,SACA,MACA,SACA,QACA,eACG,4BACE,YAAa,cAAe,WAAY,qBAI1C,MAAM,SAAY,IACrB,IAAK,eAAgB,MAAO,CAAC,EAC7B,GAAI,WAEA,MAD6B,iBAAlB,OAAO,SAAqB,OAAO,OAAS,CAAC,GACjD,OAAO,OAElB,GAAI,WAAY,CACZ,MAAM,EAAQ,gBAAgB,YAC9B,OAAK,GACY,IAAb,EAA0B,EAAM,IAAI,eACpC,EAAiB,EAAM,IAAI,IAAa,CAAC,EACtC,EAAM,IAAI,MAHE,CAAC,CAIxB,UAKK,qBAIL,UACA,OAAO,iBAAoB,IACvB,OAAO,YAAc,EACrB,OAAO,YAAc,EAAI,WAAW,EAExC,OAAO,0BAA6B,IAChC,OAAO,kBAAoB,EAC3B,cAAc,EAAE,EAEpB,OAAO,uBAA0B,IAC7B,OAAO,eAAiB,EACxB,WAAW,EAAE,EAEjB,OAAO,yBAA4B,IAC/B,OAAO,iBAAmB,EAC1B,aAAa,EAAE,EAEnB,OAAO,qBAAwB,IAC3B,OAAO,YAAc,CAAC","file":"/npm/koot@0.15.15/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/koot@0.15.15/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import {\r\n    ssrContext as SSRContext,\r\n    koaContext as KOAContext,\r\n} from './defaults/defines-server';\r\nimport { CACHE } from './defaults/defines-window';\r\nimport isRenderSafe from './React/is-render-safe';\r\nimport {\r\n    get as getSSRContext,\r\n    getKoaCtx,\r\n    getLocaleId,\r\n    resetLocaleId,\r\n    resetStore,\r\n    resetHistory,\r\n} from './libs/ssr/context';\r\n\r\n// ============================================================================\r\n\r\n/**\r\n * 手动创建 Redux Store 时需要的相关对象\r\n * @type {Object}\r\n */\r\nimport * as _reduxForCreateStore from './React/redux';\r\n\r\nconst { createStore, ...reduxForCreateStore } = _reduxForCreateStore;\r\nexport { createStore, reduxForCreateStore };\r\n\r\n/**\r\n * 通用的高阶组件/方法的装饰器\r\n * @type {Function}\r\n */\r\nexport { default as extend } from '__KOOT_HOC_EXTEND__';\r\n\r\n// ============================================================================\r\n\r\nexport {\r\n    localeId,\r\n    store,\r\n    getStore,\r\n    history,\r\n    getHistory,\r\n} from './libs/ssr/context';\r\nexport { getLocaleId, resetLocaleId, resetStore, resetHistory };\r\n\r\n// ============================================================================\r\n\r\nexport const getCache = (localeId) => {\r\n    if (!isRenderSafe()) return {};\r\n    if (__CLIENT__) {\r\n        if (typeof window[CACHE] !== 'object') window[CACHE] = {};\r\n        return window[CACHE];\r\n    }\r\n    if (__SERVER__) {\r\n        const cache = getSSRContext().globalCache;\r\n        if (!cache) return {};\r\n        if (localeId === true) return cache.get(getLocaleId());\r\n        if (localeId) return cache.get(localeId) || {};\r\n        return cache.get('__');\r\n    }\r\n};\r\n\r\n// ============================================================================\r\n\r\nexport { getKoaCtx as getCtx };\r\n\r\n// ============================================================================\r\n\r\nif (__DEV__) {\r\n    global.__KOOT_SSR_SET__ = (ctx) => {\r\n        global[KOAContext] = ctx;\r\n        global[SSRContext] = ctx[SSRContext];\r\n    };\r\n    global.__KOOT_SSR_SET_LOCALEID__ = (v) => {\r\n        global.__KOOT_LOCALEID__ = v;\r\n        resetLocaleId(v);\r\n    };\r\n    global.__KOOT_SSR_SET_STORE__ = (v) => {\r\n        global.__KOOT_STORE__ = v;\r\n        resetStore(v);\r\n    };\r\n    global.__KOOT_SSR_SET_HISTORY__ = (v) => {\r\n        global.__KOOT_HISTORY__ = v;\r\n        resetHistory(v);\r\n    };\r\n    global.__KOOT_SSR_SET_CTX__ = (v) => {\r\n        global[KOAContext] = v;\r\n    };\r\n}\r\n"]}