@next-bricks/ai 1.23.22 → 1.23.24

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.
Files changed (40) hide show
  1. package/dist/bricks.json +1 -1
  2. package/dist/chunks/{3171.77a8fcdc.js → 3171.e810c4f4.js} +2 -2
  3. package/dist/chunks/{3171.77a8fcdc.js.map → 3171.e810c4f4.js.map} +1 -1
  4. package/dist/chunks/3657.645b7bae.js +3 -0
  5. package/dist/chunks/3657.645b7bae.js.map +1 -0
  6. package/dist/chunks/3933.a24798e8.js +2 -0
  7. package/dist/chunks/{3933.5bea8368.js.map → 3933.a24798e8.js.map} +1 -1
  8. package/dist/chunks/{4145.2bc7164e.js → 4145.16c0e4ac.js} +2 -2
  9. package/dist/chunks/{4145.2bc7164e.js.map → 4145.16c0e4ac.js.map} +1 -1
  10. package/dist/chunks/{4437.2f868ad4.js → 4437.01dccbc6.js} +3 -3
  11. package/dist/chunks/{4437.2f868ad4.js.map → 4437.01dccbc6.js.map} +1 -1
  12. package/dist/chunks/{4837.9e174f10.js → 4837.6cf58e05.js} +2 -2
  13. package/dist/chunks/{7218.89d6bebe.js.map → 4837.6cf58e05.js.map} +1 -1
  14. package/dist/chunks/{5552.57582a0e.js → 5552.5a5096ac.js} +2 -2
  15. package/dist/chunks/{5552.57582a0e.js.map → 5552.5a5096ac.js.map} +1 -1
  16. package/dist/chunks/6314.542d733d.js +2 -0
  17. package/dist/chunks/{6314.90f43672.js.map → 6314.542d733d.js.map} +1 -1
  18. package/dist/chunks/{7218.89d6bebe.js → 7218.dbb9c96b.js} +2 -2
  19. package/dist/chunks/{4837.9e174f10.js.map → 7218.dbb9c96b.js.map} +1 -1
  20. package/dist/chunks/8319.793206d4.js +2 -0
  21. package/dist/chunks/{8319.e6277259.js.map → 8319.793206d4.js.map} +1 -1
  22. package/dist/chunks/chat-agent.981ea628.js +2 -0
  23. package/dist/chunks/{chat-agent.b0f2e8d7.js.map → chat-agent.981ea628.js.map} +1 -1
  24. package/dist/chunks/main.76fb0d4d.js +2 -0
  25. package/dist/chunks/main.76fb0d4d.js.map +1 -0
  26. package/dist/index.d77c8cbc.js +2 -0
  27. package/dist/index.d77c8cbc.js.map +1 -0
  28. package/package.json +3 -3
  29. package/dist/chunks/3657.2018bf64.js +0 -3
  30. package/dist/chunks/3657.2018bf64.js.map +0 -1
  31. package/dist/chunks/3933.5bea8368.js +0 -2
  32. package/dist/chunks/6314.90f43672.js +0 -2
  33. package/dist/chunks/8319.e6277259.js +0 -2
  34. package/dist/chunks/chat-agent.b0f2e8d7.js +0 -2
  35. package/dist/chunks/main.f77b5e36.js +0 -2
  36. package/dist/chunks/main.f77b5e36.js.map +0 -1
  37. package/dist/index.57ff34cd.js +0 -2
  38. package/dist/index.57ff34cd.js.map +0 -1
  39. /package/dist/chunks/{3657.2018bf64.js.LICENSE.txt → 3657.645b7bae.js.LICENSE.txt} +0 -0
  40. /package/dist/chunks/{4437.2f868ad4.js.LICENSE.txt → 4437.01dccbc6.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d77c8cbc.js","mappings":"uBAAIA,EACAC,ECDAC,EAIAC,EAIAC,EAIAC,EAgBAC,EAMAC,EAGAC,EAIAC,EAUAC,EAoBAC,EAMAC,EAIAC,EAqCAC,EAIAC,EAIAC,EAQAC,EACAC,EAiCAC,EAkEAC,E,kBC1OJ,IAAIC,EAAY,CACf,cAAe,IACPC,QAAQC,IAAmB,CAACC,EAAoBC,EAAE,MAAOD,EAAoBC,EAAE,MAAOD,EAAoBC,EAAE,MAAOD,EAAoBC,EAAE,KAAMD,EAAoBC,EAAE,MAAOD,EAAoBC,EAAE,MAAOD,EAAoBC,EAAE,MAAOD,EAAoBC,EAAE,MAAOD,EAAoBC,EAAE,MAAOD,EAAoBC,EAAE,QAAQC,MAAK,IAAM,IAASF,EAAoB,QAE9W,eAAgB,IACRF,QAAQC,IAAoB,CAACC,EAAoBC,EAAE,MAAOD,EA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EAAMlD,KAAO0D,EACbR,EAAMW,QAAUF,EAChBH,EAAmB,GAAGN,EACvB,CACD,GAEwC,SAAWhG,EAASA,EAC9D,CAEF,EAcF,IAAI4G,EAAuB,CAACC,EAA4BC,KACvD,IAGIhI,EAAUkB,GAHT+G,EAAUC,EAAaC,GAAWH,EAGhBvF,EAAI,EAC3B,GAAGwF,EAASG,MAAMlI,GAAgC,IAAxBoH,EAAgBpH,KAAa,CACtD,IAAIF,KAAYkI,EACZrJ,EAAoBM,EAAE+I,EAAalI,KACrCnB,EAAoByB,EAAEN,GAAYkI,EAAYlI,IAG7CmI,GAAsBA,EAAQtJ,EAClC,CAEA,IADGkJ,GAA4BA,EAA2BC,GACrDvF,EAAIwF,EAASvF,OAAQD,IACzBvB,EAAU+G,EAASxF,GAChB5D,EAAoBM,EAAEmI,EAAiBpG,IAAYoG,EAAgBpG,IACrEoG,EAAgBpG,GAAS,KAE1BoG,EAAgBpG,GAAW,CAC5B,EAIGmH,EAAqB7G,WAAwC,4BAAIA,WAAwC,6BAAK,GAClH6G,EAAmBzE,QAAQkE,EAAqB/D,KAAK,KAAM,IAC3DsE,EAAmBlG,KAAO2F,EAAqB/D,KAAK,KAAMsE,EAAmBlG,KAAK4B,KAAKsE,G,KCrFvFxJ,EAAoBmE,QAAK1D,ECGzB,IAAIgJ,EAAsBzJ,EAAoB,M","sources":["webpack:///webpack/runtime/load script","webpack:///webpack/runtime/consumes","webpack:///webpack/container-entry","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/ensure chunk","webpack:///webpack/runtime/get javascript chunk filename","webpack:///webpack/runtime/global","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///webpack/runtime/node module decorator","webpack:///webpack/runtime/sharing","webpack:///webpack/runtime/publicPath","webpack:///webpack/runtime/jsonp chunk loading","webpack:///webpack/runtime/nonce","webpack:///webpack/startup"],"sourcesContent":["var inProgress = {};\nvar dataWebpackPrefix = \"@next-bricks/ai:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","var parseVersion = (str) => {\n\t// see webpack/lib/util/semver.js for original code\n\tvar p=p=>{return p.split(\".\").map((p=>{return+p==p?+p:p}))},n=/^([^-+]+)?(?:-([^+]+))?(?:\\+(.+))?$/.exec(str),r=n[1]?p(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,p(n[2]))),n[3]&&(r.push([]),r.push.apply(r,p(n[3]))),r;\n}\nvar versionLt = (a, b) => {\n\t// see webpack/lib/util/semver.js for original code\n\ta=parseVersion(a),b=parseVersion(b);for(var r=0;;){if(r>=a.length)return r<b.length&&\"u\"!=(typeof b[r])[0];var e=a[r],n=(typeof e)[0];if(r>=b.length)return\"u\"==n;var t=b[r],f=(typeof t)[0];if(n!=f)return\"o\"==n&&\"n\"==f||(\"s\"==f||\"u\"==n);if(\"o\"!=n&&\"u\"!=n&&e!=t)return e<t;r++}\n}\nvar rangeToString = (range) => {\n\t// see webpack/lib/util/semver.js for original code\n\tvar r=range[0],n=\"\";if(1===range.length)return\"*\";if(r+.5){n+=0==r?\">=\":-1==r?\"<\":1==r?\"^\":2==r?\"~\":r>0?\"=\":\"!=\";for(var e=1,a=1;a<range.length;a++){e--,n+=\"u\"==(typeof(t=range[a]))[0]?\"-\":(e>0?\".\":\"\")+(e=2,t)}return n}var g=[];for(a=1;a<range.length;a++){var t=range[a];g.push(0===t?\"not(\"+o()+\")\":1===t?\"(\"+o()+\" || \"+o()+\")\":2===t?g.pop()+\" \"+g.pop():rangeToString(t))}return o();function o(){return g.pop().replace(/^\\((.+)\\)$/,\"$1\")}\n}\nvar satisfy = (range, version) => {\n\t// see webpack/lib/util/semver.js for original code\n\tif(0 in range){version=parseVersion(version);var e=range[0],r=e<0;r&&(e=-e-1);for(var n=0,i=1,a=!0;;i++,n++){var f,s,g=i<range.length?(typeof range[i])[0]:\"\";if(n>=version.length||\"o\"==(s=(typeof(f=version[n]))[0]))return!a||(\"u\"==g?i>e&&!r:\"\"==g!=r);if(\"u\"==s){if(!a||\"u\"!=g)return!1}else if(a)if(g==s)if(i<=e){if(f!=range[i])return!1}else{if(r?f>range[i]:f<range[i])return!1;f!=range[i]&&(a=!1)}else if(\"s\"!=g&&\"n\"!=g){if(r||i<=e)return!1;a=!1,i--}else{if(i<=e||s<g!=r)return!1;a=!1}else\"s\"!=g&&\"n\"!=g&&(a=!1,i--)}}var t=[],o=t.pop.bind(t);for(n=1;n<range.length;n++){var u=range[n];t.push(1==u?o()|o():2==u?o()&o():u?satisfy(u,version):!o())}return!!o();\n}\nvar ensureExistence = (scopeName, key) => {\n\tvar scope = __webpack_require__.S[scopeName];\n\tif(!scope || !__webpack_require__.o(scope, key)) throw new Error(\"Shared module \" + key + \" doesn't exist in shared scope \" + scopeName);\n\treturn scope;\n};\nvar findVersion = (scope, key) => {\n\tvar versions = scope[key];\n\tvar key = Object.keys(versions).reduce((a, b) => {\n\t\treturn !a || versionLt(a, b) ? b : a;\n\t}, 0);\n\treturn key && versions[key]\n};\nvar findSingletonVersionKey = (scope, key) => {\n\tvar versions = scope[key];\n\treturn Object.keys(versions).reduce((a, b) => {\n\t\treturn !a || (!versions[a].loaded && versionLt(a, b)) ? b : a;\n\t}, 0);\n};\nvar getInvalidSingletonVersionMessage = (scope, key, version, requiredVersion) => {\n\treturn \"Unsatisfied version \" + version + \" from \" + (version && scope[key][version].from) + \" of shared singleton module \" + key + \" (required \" + rangeToString(requiredVersion) + \")\"\n};\nvar getSingleton = (scope, scopeName, key, requiredVersion) => {\n\tvar version = findSingletonVersionKey(scope, key);\n\treturn get(scope[key][version]);\n};\nvar getSingletonVersion = (scope, scopeName, key, requiredVersion) => {\n\tvar version = findSingletonVersionKey(scope, key);\n\tif (!satisfy(requiredVersion, version)) warn(getInvalidSingletonVersionMessage(scope, key, version, requiredVersion));\n\treturn get(scope[key][version]);\n};\nvar getStrictSingletonVersion = (scope, scopeName, key, requiredVersion) => {\n\tvar version = findSingletonVersionKey(scope, key);\n\tif (!satisfy(requiredVersion, version)) throw new Error(getInvalidSingletonVersionMessage(scope, key, version, requiredVersion));\n\treturn get(scope[key][version]);\n};\nvar findValidVersion = (scope, key, requiredVersion) => {\n\tvar versions = scope[key];\n\tvar key = Object.keys(versions).reduce((a, b) => {\n\t\tif (!satisfy(requiredVersion, b)) return a;\n\t\treturn !a || versionLt(a, b) ? b : a;\n\t}, 0);\n\treturn key && versions[key]\n};\nvar getInvalidVersionMessage = (scope, scopeName, key, requiredVersion) => {\n\tvar versions = scope[key];\n\treturn \"No satisfying version (\" + rangeToString(requiredVersion) + \") of shared module \" + key + \" found in shared scope \" + scopeName + \".\\n\" +\n\t\t\"Available versions: \" + Object.keys(versions).map((key) => {\n\t\treturn key + \" from \" + versions[key].from;\n\t}).join(\", \");\n};\nvar getValidVersion = (scope, scopeName, key, requiredVersion) => {\n\tvar entry = findValidVersion(scope, key, requiredVersion);\n\tif(entry) return get(entry);\n\tthrow new Error(getInvalidVersionMessage(scope, scopeName, key, requiredVersion));\n};\nvar warn = (msg) => {\n\tif (typeof console !== \"undefined\" && console.warn) console.warn(msg);\n};\nvar warnInvalidVersion = (scope, scopeName, key, requiredVersion) => {\n\twarn(getInvalidVersionMessage(scope, scopeName, key, requiredVersion));\n};\nvar get = (entry) => {\n\tentry.loaded = 1;\n\treturn entry.get()\n};\nvar init = (fn) => (function(scopeName, a, b, c) {\n\tvar promise = __webpack_require__.I(scopeName);\n\tif (promise && promise.then) return promise.then(fn.bind(fn, scopeName, __webpack_require__.S[scopeName], a, b, c));\n\treturn fn(scopeName, __webpack_require__.S[scopeName], a, b, c);\n});\n\nvar load = /*#__PURE__*/ init((scopeName, scope, key) => {\n\tensureExistence(scopeName, key);\n\treturn get(findVersion(scope, key));\n});\nvar loadFallback = /*#__PURE__*/ init((scopeName, scope, key, fallback) => {\n\treturn scope && __webpack_require__.o(scope, key) ? get(findVersion(scope, key)) : fallback();\n});\nvar loadVersionCheck = /*#__PURE__*/ init((scopeName, scope, key, version) => {\n\tensureExistence(scopeName, key);\n\treturn get(findValidVersion(scope, key, version) || warnInvalidVersion(scope, scopeName, key, version) || findVersion(scope, key));\n});\nvar loadSingleton = /*#__PURE__*/ init((scopeName, scope, key) => {\n\tensureExistence(scopeName, key);\n\treturn getSingleton(scope, scopeName, key);\n});\nvar loadSingletonVersionCheck = /*#__PURE__*/ init((scopeName, scope, key, version) => {\n\tensureExistence(scopeName, key);\n\treturn getSingletonVersion(scope, scopeName, key, version);\n});\nvar loadStrictVersionCheck = /*#__PURE__*/ init((scopeName, scope, key, version) => {\n\tensureExistence(scopeName, key);\n\treturn getValidVersion(scope, scopeName, key, version);\n});\nvar loadStrictSingletonVersionCheck = /*#__PURE__*/ init((scopeName, scope, key, version) => {\n\tensureExistence(scopeName, key);\n\treturn getStrictSingletonVersion(scope, scopeName, key, version);\n});\nvar loadVersionCheckFallback = /*#__PURE__*/ init((scopeName, scope, key, version, fallback) => {\n\tif(!scope || !__webpack_require__.o(scope, key)) return fallback();\n\treturn get(findValidVersion(scope, key, version) || warnInvalidVersion(scope, scopeName, key, version) || findVersion(scope, key));\n});\nvar loadSingletonFallback = /*#__PURE__*/ init((scopeName, scope, key, fallback) => {\n\tif(!scope || !__webpack_require__.o(scope, key)) return fallback();\n\treturn getSingleton(scope, scopeName, key);\n});\nvar loadSingletonVersionCheckFallback = /*#__PURE__*/ init((scopeName, scope, key, version, fallback) => {\n\tif(!scope || !__webpack_require__.o(scope, key)) return fallback();\n\treturn getSingletonVersion(scope, scopeName, key, version);\n});\nvar loadStrictVersionCheckFallback = /*#__PURE__*/ init((scopeName, scope, key, version, fallback) => {\n\tvar entry = scope && __webpack_require__.o(scope, key) && findValidVersion(scope, key, version);\n\treturn entry ? get(entry) : fallback();\n});\nvar loadStrictSingletonVersionCheckFallback = /*#__PURE__*/ init((scopeName, scope, key, version, fallback) => {\n\tif(!scope || !__webpack_require__.o(scope, key)) return fallback();\n\treturn getStrictSingletonVersion(scope, scopeName, key, version);\n});\nvar installedModules = {};\nvar moduleToHandlerMapping = {\n\t1204: () => (loadSingletonVersionCheckFallback(\"default\", \"js-yaml\", [1,3,14,0], () => (__webpack_require__.e(9515).then(() => (() => (__webpack_require__(9515))))))),\n\t5521: () => (loadSingletonVersionCheckFallback(\"default\", \"lodash\", [1,4,17,19], () => (__webpack_require__.e(5250).then(() => (() => (__webpack_require__(5250))))))),\n\t8297: () => (loadSingletonVersionCheckFallback(\"default\", \"moment\", [1,2,27,0], () => (Promise.all([__webpack_require__.e(7721), __webpack_require__.e(9844)]).then(() => (() => (__webpack_require__(9420))))))),\n\t1760: () => (loadSingletonVersionCheckFallback(\"default\", \"@babel/parser\", [1,7,24,7], () => (__webpack_require__.e(6773).then(() => (() => (__webpack_require__(6773))))))),\n\t279: () => (loadSingletonVersionCheckFallback(\"default\", \"@next-core/utils/general\", [1,1,7,20], () => (__webpack_require__.e(1438).then(() => (() => (__webpack_require__(1438))))))),\n\t2350: () => (loadSingletonVersionCheckFallback(\"default\", \"i18next\", [1,22,5,1], () => (__webpack_require__.e(7304).then(() => (() => (__webpack_require__(7304))))))),\n\t7072: () => (loadSingletonVersionCheckFallback(\"default\", \"i18next-browser-languagedetector\", [1,7,2,1], () => (__webpack_require__.e(726).then(() => (() => (__webpack_require__(726))))))),\n\t7318: () => (loadSingletonVersionCheckFallback(\"default\", \"@next-core/i18n\", [1,1,0,62], () => (Promise.all([__webpack_require__.e(9755), __webpack_require__.e(3171)]).then(() => (() => (__webpack_require__(5552))))))),\n\t4285: () => (loadSingletonVersionCheckFallback(\"default\", \"@next-core/pipes\", [1,2,0,24], () => (__webpack_require__.e(6519).then(() => (() => (__webpack_require__(6519))))))),\n\t1030: () => (loadSingletonVersionCheckFallback(\"default\", \"lodash\", [1,4,17,21], () => (__webpack_require__.e(5250).then(() => (() => (__webpack_require__(5250))))))),\n\t161: () => (loadSingletonVersionCheckFallback(\"default\", \"@easyops-cn/brick-next-pipes\", [2,0,6,0], () => (Promise.all([__webpack_require__.e(4741), __webpack_require__.e(886)]).then(() => (() => (__webpack_require__(4741))))))),\n\t8769: () => (loadStrictVersionCheckFallback(\"default\", \"react\", [6,0,0,0,,\"experimental-ee8509801-20230117\"], () => (__webpack_require__.e(4041).then(() => (() => (__webpack_require__(4041))))))),\n\t4782: () => (loadStrictVersionCheckFallback(\"default\", \"@next-core/element\", [1,1,2,11], () => (__webpack_require__.e(3426).then(() => (() => (__webpack_require__(1045))))))),\n\t9435: () => (loadStrictVersionCheckFallback(\"default\", \"react-dom\", [6,0,0,0,,\"experimental-ee8509801-20230117\"], () => (__webpack_require__.e(3144).then(() => (() => (__webpack_require__(3144))))))),\n\t1389: () => (loadStrictVersionCheckFallback(\"default\", \"@next-core/react-element\", [1,1,0,30], () => (Promise.all([__webpack_require__.e(4782), __webpack_require__.e(9435), __webpack_require__.e(7733)]).then(() => (() => (__webpack_require__(114))))))),\n\t1816: () => (loadSingletonVersionCheckFallback(\"default\", \"@next-core/runtime\", [1,1,54,6], () => (Promise.all([__webpack_require__.e(7507), __webpack_require__.e(3657), __webpack_require__.e(279), __webpack_require__.e(1030), __webpack_require__.e(1302), __webpack_require__.e(7318), __webpack_require__.e(8897), __webpack_require__.e(1966)]).then(() => (() => (__webpack_require__(3657))))))),\n\t2445: () => (loadSingletonFallback(\"default\", \"lodash\", () => (__webpack_require__.e(5250).then(() => (() => (__webpack_require__(5250))))))),\n\t1302: () => (loadSingletonVersionCheckFallback(\"default\", \"moment\", [1,2,30,1], () => (Promise.all([__webpack_require__.e(7721), __webpack_require__.e(9844)]).then(() => (() => (__webpack_require__(9420))))))),\n\t8897: () => (loadSingletonVersionCheckFallback(\"default\", \"@next-core/cook\", [1,2,4,8], () => (Promise.all([__webpack_require__.e(1122), __webpack_require__.e(1760)]).then(() => (() => (__webpack_require__(1122))))))),\n\t877: () => (loadSingletonVersionCheckFallback(\"default\", \"@next-core/utils/storyboard\", [1,1,7,20], () => (__webpack_require__.e(6314).then(() => (() => (__webpack_require__(3933))))))),\n\t1680: () => (loadSingletonVersionCheckFallback(\"default\", \"@next-core/supply\", [1,2,1,20], () => (Promise.all([__webpack_require__.e(4285), __webpack_require__.e(1940)]).then(() => (() => (__webpack_require__(9559))))))),\n\t2890: () => (loadSingletonVersionCheckFallback(\"default\", \"history\", [1,4,10,1], () => (__webpack_require__.e(5384).then(() => (() => (__webpack_require__(5384))))))),\n\t6036: () => (loadSingletonVersionCheckFallback(\"default\", \"moment/locale/zh-cn.js\", [1,2,30,1], () => (Promise.all([__webpack_require__.e(7721), __webpack_require__.e(9844)]).then(() => (() => (__webpack_require__(3710))))))),\n\t6998: () => (loadSingletonVersionCheckFallback(\"default\", \"@next-core/loader\", [1,1,6,6], () => (__webpack_require__.e(5399).then(() => (() => (__webpack_require__(5399))))))),\n\t8965: () => (loadSingletonVersionCheckFallback(\"default\", \"@next-core/inject\", [1,1,0,41], () => (Promise.all([__webpack_require__.e(4285), __webpack_require__.e(4658)]).then(() => (() => (__webpack_require__(2277))))))),\n\t9422: () => (loadSingletonVersionCheckFallback(\"default\", \"@next-core/http\", [1,1,2,6], () => (__webpack_require__.e(1370).then(() => (() => (__webpack_require__(8989))))))),\n\t6238: () => (loadSingletonFallback(\"default\", \"moment\", () => (Promise.all([__webpack_require__.e(7721), __webpack_require__.e(9844)]).then(() => (() => (__webpack_require__(9420))))))),\n\t6477: () => (loadSingletonVersionCheckFallback(\"default\", \"@next-core/theme\", [1,1,5,4], () => (__webpack_require__.e(1889).then(() => (() => (__webpack_require__(1889))))))),\n\t7873: () => (loadStrictVersionCheckFallback(\"default\", \"@next-core/react-runtime\", [1,1,6,29], () => (__webpack_require__.e(7218).then(() => (() => (__webpack_require__(4837))))))),\n\t9455: () => (loadSingletonFallback(\"default\", \"@next-core/http\", () => (__webpack_require__.e(1370).then(() => (() => (__webpack_require__(8989)))))))\n};\n// no consumes in initial chunks\nvar chunkMapping = {\n\t\"279\": [\n\t\t279\n\t],\n\t\"886\": [\n\t\t1204,\n\t\t5521,\n\t\t8297\n\t],\n\t\"1030\": [\n\t\t1030\n\t],\n\t\"1302\": [\n\t\t1302\n\t],\n\t\"1760\": [\n\t\t1760\n\t],\n\t\"1966\": [\n\t\t877,\n\t\t1680,\n\t\t2890,\n\t\t6036,\n\t\t6998,\n\t\t8965,\n\t\t9422\n\t],\n\t\"2445\": [\n\t\t2445\n\t],\n\t\"4285\": [\n\t\t4285\n\t],\n\t\"4782\": [\n\t\t4782\n\t],\n\t\"6519\": [\n\t\t161\n\t],\n\t\"7167\": [\n\t\t1389,\n\t\t1816\n\t],\n\t\"7318\": [\n\t\t7318\n\t],\n\t\"8319\": [\n\t\t6238,\n\t\t6477,\n\t\t7873,\n\t\t9455\n\t],\n\t\"8769\": [\n\t\t8769\n\t],\n\t\"8897\": [\n\t\t8897\n\t],\n\t\"9435\": [\n\t\t9435\n\t],\n\t\"9755\": [\n\t\t2350,\n\t\t7072\n\t]\n};\nvar startedInstallModules = {};\n__webpack_require__.f.consumes = (chunkId, promises) => {\n\tif(__webpack_require__.o(chunkMapping, chunkId)) {\n\t\tchunkMapping[chunkId].forEach((id) => {\n\t\t\tif(__webpack_require__.o(installedModules, id)) return promises.push(installedModules[id]);\n\t\t\tif(!startedInstallModules[id]) {\n\t\t\tvar onFactory = (factory) => {\n\t\t\t\tinstalledModules[id] = 0;\n\t\t\t\t__webpack_require__.m[id] = (module) => {\n\t\t\t\t\tdelete __webpack_require__.c[id];\n\t\t\t\t\tmodule.exports = factory();\n\t\t\t\t}\n\t\t\t};\n\t\t\tstartedInstallModules[id] = true;\n\t\t\tvar onError = (error) => {\n\t\t\t\tdelete installedModules[id];\n\t\t\t\t__webpack_require__.m[id] = (module) => {\n\t\t\t\t\tdelete __webpack_require__.c[id];\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t};\n\t\t\ttry {\n\t\t\t\tvar promise = moduleToHandlerMapping[id]();\n\t\t\t\tif(promise.then) {\n\t\t\t\t\tpromises.push(installedModules[id] = promise.then(onFactory)['catch'](onError));\n\t\t\t\t} else onFactory(promise);\n\t\t\t} catch(e) { onError(e); }\n\t\t\t}\n\t\t});\n\t}\n}","var moduleMap = {\n\t\"./chat-view\": () => {\n\t\treturn Promise.all(/* chat-view */[__webpack_require__.e(7507), __webpack_require__.e(4437), __webpack_require__.e(8769), __webpack_require__.e(279), __webpack_require__.e(4782), __webpack_require__.e(7167), __webpack_require__.e(9435), __webpack_require__.e(2445), __webpack_require__.e(8319), __webpack_require__.e(6129)]).then(() => (() => ((__webpack_require__(1943)))));\n\t},\n\t\"./chat-agent\": () => {\n\t\treturn Promise.all(/* chat-agent */[__webpack_require__.e(8769), __webpack_require__.e(279), __webpack_require__.e(4782), __webpack_require__.e(7167), __webpack_require__.e(5125)]).then(() => (() => ((__webpack_require__(9099)))));\n\t}\n};\nvar get = (module, getScope) => {\n\t__webpack_require__.R = getScope;\n\tgetScope = (\n\t\t__webpack_require__.o(moduleMap, module)\n\t\t\t? moduleMap[module]()\n\t\t\t: Promise.resolve().then(() => {\n\t\t\t\tthrow new Error('Module \"' + module + '\" does not exist in container.');\n\t\t\t})\n\t);\n\t__webpack_require__.R = undefined;\n\treturn getScope;\n};\nvar init = (shareScope, initScope) => {\n\tif (!__webpack_require__.S) return;\n\tvar name = \"default\"\n\tvar oldScope = __webpack_require__.S[name];\n\tif(oldScope && oldScope !== shareScope) throw new Error(\"Container initialization failed as it has already been initialized with a different share scope\");\n\t__webpack_require__.S[name] = shareScope;\n\treturn __webpack_require__.I(name, initScope);\n};\n\n// This exports getters to disallow modifications\n__webpack_require__.d(exports, {\n\tget: () => (get),\n\tinit: () => (init)\n});","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// expose the module cache\n__webpack_require__.c = __webpack_module_cache__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"chunks/\" + ({\"5125\":\"chat-agent\",\"6129\":\"chat-view\"}[chunkId] || chunkId) + \".\" + {\"114\":\"31177ce6\",\"279\":\"0912d943\",\"726\":\"d1946ae9\",\"886\":\"fd849aa2\",\"1030\":\"a32a9774\",\"1045\":\"659660a3\",\"1055\":\"784eb310\",\"1122\":\"1488c873\",\"1302\":\"ff81ac8c\",\"1370\":\"e8101b88\",\"1438\":\"1f2e5715\",\"1760\":\"73bbd6c3\",\"1889\":\"36116d87\",\"1940\":\"de532591\",\"1966\":\"c6dd6d09\",\"2277\":\"33c71f3d\",\"2445\":\"7ad41fb8\",\"3144\":\"8a65bb7f\",\"3171\":\"e810c4f4\",\"3426\":\"a2d719ee\",\"3657\":\"645b7bae\",\"3933\":\"a24798e8\",\"4041\":\"58453437\",\"4285\":\"696a68ba\",\"4437\":\"01dccbc6\",\"4658\":\"1f3df89d\",\"4741\":\"bce1f55d\",\"4782\":\"ed0284aa\",\"4837\":\"6cf58e05\",\"5125\":\"981ea628\",\"5250\":\"a6b648ae\",\"5384\":\"1f7eb0b2\",\"5399\":\"703e8b77\",\"5552\":\"5a5096ac\",\"6129\":\"8dfdb44b\",\"6314\":\"542d733d\",\"6519\":\"e94fcfa9\",\"6773\":\"e604d2f7\",\"7167\":\"1a105afb\",\"7218\":\"dbb9c96b\",\"7304\":\"5921f13b\",\"7318\":\"caa994bf\",\"7507\":\"c3d9f638\",\"7721\":\"cf2c09a3\",\"7733\":\"06a15fa1\",\"8319\":\"793206d4\",\"8769\":\"f01efe22\",\"8897\":\"10e06523\",\"8989\":\"2075e8fe\",\"9435\":\"4b4f311c\",\"9515\":\"22cd8b3a\",\"9559\":\"8870b76d\",\"9755\":\"9a6fc38b\",\"9844\":\"1a35968b\"}[chunkId] + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.S = {};\nvar initPromises = {};\nvar initTokens = {};\n__webpack_require__.I = (name, initScope) => {\n\tif(!initScope) initScope = [];\n\t// handling circular init calls\n\tvar initToken = initTokens[name];\n\tif(!initToken) initToken = initTokens[name] = {};\n\tif(initScope.indexOf(initToken) >= 0) return;\n\tinitScope.push(initToken);\n\t// only runs once\n\tif(initPromises[name]) return initPromises[name];\n\t// creates a new share scope if needed\n\tif(!__webpack_require__.o(__webpack_require__.S, name)) __webpack_require__.S[name] = {};\n\t// runs all init snippets from all modules reachable\n\tvar scope = __webpack_require__.S[name];\n\tvar warn = (msg) => {\n\t\tif (typeof console !== \"undefined\" && console.warn) console.warn(msg);\n\t};\n\tvar uniqueName = \"@next-bricks/ai\";\n\tvar register = (name, version, factory, eager) => {\n\t\tvar versions = scope[name] = scope[name] || {};\n\t\tvar activeVersion = versions[version];\n\t\tif(!activeVersion || (!activeVersion.loaded && (!eager != !activeVersion.eager ? eager : uniqueName > activeVersion.from))) versions[version] = { get: factory, from: uniqueName, eager: !!eager };\n\t};\n\tvar initExternal = (id) => {\n\t\tvar handleError = (err) => (warn(\"Initialization of sharing external failed: \" + err));\n\t\ttry {\n\t\t\tvar module = __webpack_require__(id);\n\t\t\tif(!module) return;\n\t\t\tvar initFn = (module) => (module && module.init && module.init(__webpack_require__.S[name], initScope))\n\t\t\tif(module.then) return promises.push(module.then(initFn, handleError));\n\t\t\tvar initResult = initFn(module);\n\t\t\tif(initResult && initResult.then) return promises.push(initResult['catch'](handleError));\n\t\t} catch(err) { handleError(err); }\n\t}\n\tvar promises = [];\n\tswitch(name) {\n\t\tcase \"default\": {\n\t\t\tregister(\"@babel/parser\", \"7.24.4\", () => (__webpack_require__.e(6773).then(() => (() => (__webpack_require__(6773))))));\n\t\t\tregister(\"@easyops-cn/brick-next-pipes\", \"0.6.0\", () => (Promise.all([__webpack_require__.e(4741), __webpack_require__.e(886)]).then(() => (() => (__webpack_require__(4741))))));\n\t\t\tregister(\"@next-core/cook\", \"2.4.8\", () => (Promise.all([__webpack_require__.e(1122), __webpack_require__.e(1760)]).then(() => (() => (__webpack_require__(1122))))));\n\t\t\tregister(\"@next-core/element\", \"1.2.11\", () => (__webpack_require__.e(1045).then(() => (() => (__webpack_require__(1045))))));\n\t\t\tregister(\"@next-core/http\", \"1.2.6\", () => (__webpack_require__.e(8989).then(() => (() => (__webpack_require__(8989))))));\n\t\t\tregister(\"@next-core/i18n\", \"1.0.62\", () => (Promise.all([__webpack_require__.e(279), __webpack_require__.e(9755), __webpack_require__.e(7318), __webpack_require__.e(5552)]).then(() => (() => (__webpack_require__(5552))))));\n\t\t\tregister(\"@next-core/inject\", \"1.0.41\", () => (Promise.all([__webpack_require__.e(4285), __webpack_require__.e(1030), __webpack_require__.e(2277)]).then(() => (() => (__webpack_require__(2277))))));\n\t\t\tregister(\"@next-core/loader\", \"1.6.6\", () => (__webpack_require__.e(5399).then(() => (() => (__webpack_require__(5399))))));\n\t\t\tregister(\"@next-core/pipes\", \"2.0.24\", () => (__webpack_require__.e(6519).then(() => (() => (__webpack_require__(6519))))));\n\t\t\tregister(\"@next-core/react-element\", \"1.0.30\", () => (Promise.all([__webpack_require__.e(8769), __webpack_require__.e(4782), __webpack_require__.e(9435), __webpack_require__.e(114)]).then(() => (() => (__webpack_require__(114))))));\n\t\t\tregister(\"@next-core/react-runtime\", \"1.6.29\", () => (Promise.all([__webpack_require__.e(8769), __webpack_require__.e(7167), __webpack_require__.e(2445), __webpack_require__.e(4837)]).then(() => (() => (__webpack_require__(4837))))));\n\t\t\tregister(\"@next-core/runtime\", \"1.54.6\", () => (Promise.all([__webpack_require__.e(7507), __webpack_require__.e(3657), __webpack_require__.e(279), __webpack_require__.e(1030), __webpack_require__.e(1302), __webpack_require__.e(7318), __webpack_require__.e(8897), __webpack_require__.e(1966)]).then(() => (() => (__webpack_require__(3657))))));\n\t\t\tregister(\"@next-core/supply\", \"2.1.20\", () => (Promise.all([__webpack_require__.e(4285), __webpack_require__.e(1030), __webpack_require__.e(1302), __webpack_require__.e(9559)]).then(() => (() => (__webpack_require__(9559))))));\n\t\t\tregister(\"@next-core/theme\", \"1.5.4\", () => (Promise.all([__webpack_require__.e(1889), __webpack_require__.e(1055)]).then(() => (() => (__webpack_require__(1889))))));\n\t\t\tregister(\"@next-core/utils/general\", \"1.7.20\", () => (__webpack_require__.e(1438).then(() => (() => (__webpack_require__(1438))))));\n\t\t\tregister(\"@next-core/utils/storyboard\", \"1.7.20\", () => (Promise.all([__webpack_require__.e(279), __webpack_require__.e(8897), __webpack_require__.e(3933)]).then(() => (() => (__webpack_require__(3933))))));\n\t\t\tregister(\"history\", \"4.10.1\", () => (__webpack_require__.e(5384).then(() => (() => (__webpack_require__(5384))))));\n\t\t\tregister(\"i18next-browser-languagedetector\", \"7.2.1\", () => (__webpack_require__.e(726).then(() => (() => (__webpack_require__(726))))));\n\t\t\tregister(\"i18next\", \"22.5.1\", () => (__webpack_require__.e(7304).then(() => (() => (__webpack_require__(7304))))));\n\t\t\tregister(\"js-yaml\", \"3.14.1\", () => (__webpack_require__.e(9515).then(() => (() => (__webpack_require__(9515))))));\n\t\t\tregister(\"lodash\", \"4.17.21\", () => (__webpack_require__.e(5250).then(() => (() => (__webpack_require__(5250))))));\n\t\t\tregister(\"moment/locale/zh-cn.js\", \"2.30.1\", () => (Promise.all([__webpack_require__.e(7721), __webpack_require__.e(9844)]).then(() => (() => (__webpack_require__(3710))))));\n\t\t\tregister(\"moment\", \"2.30.1\", () => (Promise.all([__webpack_require__.e(7721), __webpack_require__.e(9844)]).then(() => (() => (__webpack_require__(9420))))));\n\t\t\tregister(\"react-dom\", \"0.0.0-experimental-ee8509801-20230117\", () => (Promise.all([__webpack_require__.e(3144), __webpack_require__.e(8769)]).then(() => (() => (__webpack_require__(3144))))));\n\t\t\tregister(\"react\", \"0.0.0-experimental-ee8509801-20230117\", () => (__webpack_require__.e(4041).then(() => (() => (__webpack_require__(4041))))));\n\t\t}\n\t\tbreak;\n\t}\n\tif(!promises.length) return initPromises[name] = 1;\n\treturn initPromises[name] = Promise.all(promises).then(() => (initPromises[name] = 1));\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t414: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(!/^(1(030|302|760|966)|8(769|86|897)|(244|428|943|975)5|279|4782|7167|7318)$/.test(chunkId)) {\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = globalThis[\"webpackChunk_next_bricks_ai\"] = globalThis[\"webpackChunk_next_bricks_ai\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// module cache are used so entry inlining is disabled\n// startup\n// Load entry module and return exports\nvar __webpack_exports__ = __webpack_require__(2280);\n"],"names":["inProgress","dataWebpackPrefix","parseVersion","versionLt","rangeToString","satisfy","findSingletonVersionKey","getInvalidSingletonVersionMessage","getSingleton","getSingletonVersion","findValidVersion","warn","get","init","loadSingletonFallback","loadSingletonVersionCheckFallback","loadStrictVersionCheckFallback","installedModules","moduleToHandlerMapping","chunkMapping","startedInstallModules","moduleMap","Promise","all","__webpack_require__","e","then","module","getScope","R","o","resolve","Error","undefined","shareScope","initScope","S","name","oldScope","I","d","exports","__webpack_module_cache__","moduleId","cachedModule","id","loaded","__webpack_modules__","call","m","c","n","getter","__esModule","a","definition","key","Object","defineProperty","enumerable","f","chunkId","keys","reduce","promises","u","g","globalThis","this","Function","window","obj","prop","prototype","hasOwnProperty","l","url","done","push","script","needAttach","scripts","document","getElementsByTagName","i","length","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","forEach","fn","setTimeout","bind","type","target","head","appendChild","r","Symbol","toStringTag","value","nmd","paths","children","initPromises","initTokens","initToken","indexOf","scope","uniqueName","register","version","factory","eager","versions","activeVersion","from","scriptUrl","importScripts","location","currentScript","test","replace","p","str","split","map","exec","apply","b","t","range","pop","requiredVersion","scopeName","msg","console","entry","promise","fallback","consumes","onFactory","onError","error","baseURI","self","href","installedChunks","j","installedChunkData","reject","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","data","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/ai",
3
- "version": "1.23.22",
3
+ "version": "1.23.24",
4
4
  "homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/ai",
5
5
  "repository": {
6
6
  "type": "git",
@@ -41,7 +41,7 @@
41
41
  "@milkdown/preset-gfm": "^7.3.5",
42
42
  "@milkdown/react": "^7.3.5",
43
43
  "@milkdown/theme-nord": "^7.3.5",
44
- "@next-core/build-next-bricks": "^1.22.4",
44
+ "@next-core/build-next-bricks": "^1.23.0",
45
45
  "@next-core/test-next": "^1.1.5"
46
46
  },
47
47
  "peerDependencies": {
@@ -50,5 +50,5 @@
50
50
  "@next-bricks/form": "*",
51
51
  "@next-bricks/icons": "*"
52
52
  },
53
- "gitHead": "0f122f6bdeb94c9646b86e90b25e188eec24f037"
53
+ "gitHead": "0dc80f976bbe10992b895eae022c6f86fab7507c"
54
54
  }
@@ -1,3 +0,0 @@
1
- /*! For license information please see 3657.2018bf64.js.LICENSE.txt */
2
- "use strict";(globalThis.webpackChunk_next_bricks_ai=globalThis.webpackChunk_next_bricks_ai||[]).push([[3657],{3657:(e,t,n)=>{n.r(t),n.d(t,{Dialog:()=>Yt,Notification:()=>rn,StoryboardFunctionRegistryFactory:()=>fe,__secret_internals:()=>r,__test_only:()=>{},applyTheme:()=>te,authenticate:()=>gi,batchSetAppsLocalTheme:()=>ne,checkIfByTransform:()=>St,checkIfOfComputed:()=>Et,createHistory:()=>I,createRuntime:()=>oi,customEditors:()=>Ei,customProcessors:()=>x,customTemplates:()=>_e,fetchByProvider:()=>Si,getAuth:()=>vi,getBasePath:()=>m,getCssPropertyValue:()=>ce,getCurrentMode:()=>se,getCurrentTheme:()=>ee,getHistory:()=>C,getPageInfo:()=>io,getRealValue:()=>ki,getRuntime:()=>ii,getV2RuntimeFromDll:()=>k,handleHttpError:()=>nn,httpErrorToString:()=>Jt,isLoggedIn:()=>wi,isUnauthenticatedError:()=>Xt,logout:()=>yi,matchPath:()=>Lt,registerWidgetFunctions:()=>$e,registerWidgetI18n:()=>N,setUIVersion:()=>ao,unstable_createRoot:()=>Ai});var r={};n.r(r),n.d(r,{addRealTimeDataInspectHook:()=>Tr,debugDataValue:()=>Ar,getAddedContracts:()=>Sr,getAllContextValues:()=>vr,getBrickPackagesById:()=>yr,getContextValue:()=>gr,getLegalRuntimeValue:()=>kr,getRenderId:()=>Er,legacyDoTransform:()=>ar,loadBricks:()=>wr,loadEditors:()=>br,mountUseBrick:()=>ir,renderUseBrick:()=>or,setRealTimeDataInspectRoot:()=>Rr,symbolForRootRuntimeContext:()=>rr,unmountUseBrick:()=>sr,updateSnippetPreviewSettings:()=>hr,updateStoryboard:()=>cr,updateStoryboardByRoute:()=>lr,updateStoryboardBySnippet:()=>fr,updateStoryboardByTemplate:()=>ur,updateTemplatePreviewSettings:()=>dr});var o=n(4635),i=n(4586),s=n(918),a=n(2559),c=n(6121),l=n(829),u=n(6765),d=n(6998),p=n(1351),f=n(1302),h=(n(6036),n(2890));function m(){const e=document.querySelector("base");return e?e.getAttribute("href"):"/"}var g=n(1030);function v(e,t){const n=(0,g.orderBy)(e,(e=>{var t;return(null===(t=e.app.homepage)||void 0===t?void 0:t.length)??0}),"desc");for(const e of n){const n=e.app.homepage;if("string"==typeof n&&"/"===n[0]&&y(n,t))return e}}function y(e,t){return"/"===e?t===e:`${t.replace(/\/+$/,"")}/`.startsWith(`${e.replace(/\/+$/,"")}/`)}function w(e){var t;return!e||(null===(t=ii().getCurrentApp())||void 0===t?void 0:t.id)!==e.app.id&&!window.STANDALONE_MICRO_APPS&&e.app.standaloneMode}let b,E=!1;function S(e,t){E=!confirm(e),t(!E)}function A(e){const{push:t,replace:n}=e;function r(r){return function(o,i,s){let a;const c="string"==typeof o;return a=c?(0,h.parsePath)(o).pathname:o.pathname,"string"==typeof a&&a.startsWith("/")&&w(function(e){var t;return v((null===(t=ei)||void 0===t?void 0:t.storyboards)??[],e)}(a))?location["push"===r?"assign":"replace"](c?m()+o.substring(1):e.createHref(o)):("push"===r?t:n)(o,i,s)}}return{push:r("push"),replace:r("replace")}}function k(){var e;const{dll:t}=window;if(t&&null!==(e=window.BRICK_NEXT_VERSIONS)&&void 0!==e&&null!==(e=e["brick-container"])&&void 0!==e&&e.startsWith("2."))return t("tYg3")}function I(){if(!b){const e=(0,h.createBrowserHistory)({basename:m().replace(/\/$/,""),getUserConfirmation:S});Object.assign(e,function(e){const{push:t,replace:n}=e;function r(e,n,r){E=!1,t(e,n),null==r||r(E)}function o(e,t,r){E=!1,n(e,t),null==r||r(E)}function i(t){return function(n){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2?arguments[2]:void 0;const{extraQuery:a,clear:c,keepHash:l,...u}=i,d=new URLSearchParams(c?"":e.location.search),p={};Object.assign(p,n,a);for(const[e,t]of Object.entries(p))if(Array.isArray(t)){d.delete(e);for(const n of t)d.append(e,n)}else null==t||""===t?d.delete(e):d.set(e,t);("push"===t?r:o)(`?${d.toString()}${l?e.location.hash:""}`,u,s)}}let s;return{pushQuery:i("push"),replaceQuery:i("replace"),pushAnchor:function(t,n,o){r({...e.location,key:void 0,hash:t,state:{notify:!1,...n}},void 0,o)},reload:function(t){o({...e.location,state:{...e.location.state,notify:!0,noIncremental:!0}},void 0,t)},setBlockMessage:function(e){s=e},getBlockMessage:function(){return s},unblock:function(){s=void 0},...A({...e,push:r,replace:o})}}(e)),b=e}return b}const C=function(){const e=k();if(e)return e.getHistory}()||function(){return b};var R=n(9422),T=n(8897),O=n(6633),P=n(540),_=n(1680),M=new WeakMap;const x=function(){const e=k();if(e)return Object.freeze({define:(t,n)=>e.getRuntime().registerCustomProcessor(t,n)})}()||new class{constructor(){(0,s.A)(this,M,new Map)}define(e,t){const[n,r]=e.split(".");let o=(0,l.A)(M,this).get(n);if(o||(o=new Map,(0,l.A)(M,this).set(n,o)),o.has(r))throw new Error(`Custom processor of "${e}" already registered`);o.set(r,t)}get(e){return(0,l.A)(M,this).get(e)}};function B(e){let{app:t,meta:n}=e;if(null!=n&&n.i18n){const e=L("app",t.id),r=[];return Object.entries(n.i18n).forEach((t=>{let[n,o]=t;u.i18n.addResourceBundle(n,e,o),r.push(n)})),()=>{for(const t of r)u.i18n.removeResourceBundle(t,e)}}}function L(e,t){return`${e}/${t}`}function $(e){return u.i18n.getFixedT(null,L("widget",e))}const N=function(){const e=k();if(e)return function(t,n){return e.getRuntime().registerWidgetI18n(t,n)}}()||function(e,t){const n=L("widget",e);Object.entries(t).forEach((e=>{let[t,r]=e;u.i18n.addResourceBundle(t,n,r)}))},U="brick-next-devtools-panel",F="devtools-frame-active-change",j="devtools-panel-change";let D,K=!0;function V(e,t){const n=W();if(!n||"evaluation"===e&&(!K||D&&"Evaluations"!==D))return;const r=()=>{var r;null===(r=n.emit)||void 0===r||r.call(n,{type:e,payload:t})};"function"==typeof window.requestIdleCallback?window.requestIdleCallback(r):setTimeout(r,0)}function W(){return window.__BRICK_NEXT_DEVTOOLS_HOOK__}const z=()=>{throw new Error("Can't modify read-only proxy object")},H={set:z,defineProperty:z,deleteProperty:z,setPrototypeOf:z};function q(e){return new Proxy(e,H)}function G(e){let{get:t,ownKeys:n}=e;return W()?q(Object.fromEntries(n(null).map((e=>[e,t(null,e,null)])))):new Proxy(Object.freeze({}),{get:t})}let Y="light";const Q=new p.JsonStorage(localStorage),J="apps-theme";function X(e){if("dark"!==e&&"light"!==e&&"dark-v2"!==e)throw new Error(`Unsupported theme: ${e}`);Y=e}function Z(){return Y}function ee(){return document.documentElement.dataset.theme}function te(e){e?X(e):e=Z(),e!==ee()&&(document.documentElement.dataset.theme=e,window.dispatchEvent(new CustomEvent("theme.change",{detail:e})))}function ne(e){Q.setItem(J,{...re(),...e})}function re(){let e;try{e=Q.getItem(J)}catch{console.error("JSON parse error inside `getLocalAppsTheme()`")}return e??{}}let oe="default";function ie(e){if("dashboard"!==e&&"default"!==e)throw new Error(`Unsupported mode: ${e}`);oe=e}function se(){return document.documentElement.dataset.mode}function ae(e){e?ie(e):e=oe,e!==se()&&(document.documentElement.dataset.mode=e,window.dispatchEvent(new CustomEvent("mode.change",{detail:e})))}function ce(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return n&&(null===(t=window.getComputedStyle(n))||void 0===t?void 0:t.getPropertyValue(e))||""}function le(e,t){const n={};for(const r of e){const e=ue(r,t);void 0!==e&&(n[r]=e)}return n}function ue(e,t){var n,r,o;let{collectCoverage:i,widgetId:s,widgetVersion:a,app:c,appendI18nNamespace:l,storyboardFunctions:d,isStoryboardFunction:p}=t;switch(e){case"BASE_URL":return i?"/next":m().replace(/\/$/,"");case"FN":return d;case"IMG":return i?{get:e=>`mock/images/${e}`}:s?null==ri||null===(n=ri.images)||void 0===n?void 0:n.widgetImagesFactory(s,a):null==ri||null===(r=ri.images)||void 0===r?void 0:r.imagesFactory(c.id,c.isBuildPush,c.currentVersion);case"I18N":return i?g.identity:s?$(s):u.i18n.getFixedT(null,[l,L("app",c.id)].filter(Boolean));case"I18N_TEXT":return i?de:u.i18nText;case"PERMISSIONS":return q({check:i?pe:null==ri||null===(o=ri.checkPermissions)||void 0===o?void 0:o.checkPermissions});case"THEME":return q({getTheme:i?()=>"light":Z});case"console":return p?q(console):void 0;case"location":return i?{href:"http://localhost:3000/functions/test",origin:"http://localhost:3000",host:"localhost:3000",hostname:"localhost"}:{href:location.href,origin:location.origin,host:location.host,hostname:location.hostname}}}function de(e){return null==e?void 0:e.en}function pe(){return!0}function fe(){let{widgetId:e,widgetVersion:t,collectCoverage:n,debuggerOverrides:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=new Map,i=null==r?void 0:r({precookFunction:T.precookFunction,cook:T.cook,supply:_.supply}),s=new Proxy(Object.freeze({}),{get:(c,l)=>function(c){const l=o.get(c);if(!l)return;if(l.processed)return l.cooked;let u;n&&(u=n.createCollector(c));const d=(0,T.precookFunction)(l.source,{typescript:l.typescript,hooks:u&&{beforeVisit:u.beforeVisit},cacheKey:l}),p=(0,_.supply)(d.attemptToVisitGlobals,le(d.attemptToVisitGlobals,{collectCoverage:n,widgetId:e,widgetVersion:t,app:a,storyboardFunctions:s,isStoryboardFunction:!0}),!!n);return l.cooked=(0,T.cook)(d.function,l.source,{rules:{noVar:!0},globalVariables:i?{...p,...null!=i&&i.LodashWithStaticFields&&d.attemptToVisitGlobals.has("_")?{_:{...p._,...i.LodashWithStaticFields}}:null,...null!=i&&i.ArrayConstructor&&d.attemptToVisitGlobals.has("Array")?{Array:i.ArrayConstructor}:null,...null!=i&&i.ObjectWithStaticFields&&d.attemptToVisitGlobals.has("Object")?{Object:{...p.Object,...i.ObjectWithStaticFields}}:null}:p,ArrayConstructor:null==i?void 0:i.ArrayConstructor,hooks:u&&{beforeEvaluate:u.beforeEvaluate,beforeCall:u.beforeCall,beforeBranch:u.beforeBranch},debug:!!r}),l.processed=!0,l.cooked}(l)});let a;return{storyboardFunctions:s,registerStoryboardFunctions:function(e,t){if(t&&(a=t),o.clear(),Array.isArray(e))for(const t of e){const e=(0,O.collectMemberUsageInFunction)(t,"FN",!!n),r=(0,O.collectMemberUsageInFunction)(t,"PERMISSIONS",!!n).has("check");o.set(t.name,{source:t.source,typescript:t.typescript,deps:e,hasPermissionsCheck:r})}},updateStoryboardFunction(e,t){const n={...t,name:e},r=(0,O.collectMemberUsageInFunction)(n,"FN",!0),i=(0,O.collectMemberUsageInFunction)(n,"PERMISSIONS",!0).has("check");o.set(e,{source:t.source,typescript:t.typescript,deps:r,hasPermissionsCheck:i})},checkPermissionsUsage(e){const t=new Set,n=e=>{if(!t.has(e)){t.add(e);const r=o.get(e);return!!r&&(r.hasPermissionsCheck||[...r.deps].some(n))}return!1};return e.some(n)},clearGlobalExecutionContextStack(){(0,T.__dev_only_clearGlobalExecutionContextStack)()},getGlobalExecutionContextStack:()=>(0,T.__dev_only_getGlobalExecutionContextStack)()}}const{storyboardFunctions:he,registerStoryboardFunctions:me,checkPermissionsUsage:ge}=fe();var ve={};try{ve.EventTarget=(new EventTarget).constructor}catch(e){!function(e,t){var n=e.create,r=e.defineProperty,o=i.prototype;function i(){t.set(this,n(null))}function s(e,t,n){r(e,t,{configurable:!0,writable:!0,value:n})}function a(e){var t=e.options;return t&&t.once&&e.target.removeEventListener(this.type,e.listener),"function"==typeof e.listener?e.listener.call(e.target,this):e.listener.handleEvent(this),this._stopImmediatePropagationFlag}s(o,"addEventListener",(function(e,n,r){for(var o=t.get(this),i=o[e]||(o[e]=[]),s=0,a=i.length;s<a;s++)if(i[s].listener===n)return;i.push({target:this,listener:n,options:r})})),s(o,"dispatchEvent",(function(e){var n=t.get(this)[e.type];return n&&(s(e,"target",this),s(e,"currentTarget",this),n.slice(0).some(a,e),delete e.currentTarget,delete e.target),!0})),s(o,"removeEventListener",(function(e,n){for(var r=t.get(this),o=r[e]||(r[e]=[]),i=0,s=o.length;i<s;i++)if(o[i].listener===n)return void o.splice(i,1)})),ve.EventTarget=i}(Object,new WeakMap)}const ye=ve.EventTarget;let we=function(e){return e.xLarge="xLarge",e.large="large",e.medium="medium",e.small="small",e.xSmall="xSmall",e}({});const be=new Map([[we.xLarge,"1920px"],[we.large,"1600px"],[we.medium,"1280px"],[we.small,"1024px"],[we.xSmall,0]]),Ee=new ye,Se={},Ae={};function ke(e,t){let n=!1;Se[t]=e.matches;for(const[e]of be)if(Se[e]&&Ae.breakpoint!==e){Ae.breakpoint=e,n=!0;break}n&&Ee.dispatchEvent(new CustomEvent("change",{detail:Ae}))}be.forEach(((e,t)=>{const n=window.matchMedia(`(min-width: ${e})`);ke(n,t),n.addEventListener?n.addEventListener("change",(e=>{ke(e,t)})):n.addListener((e=>{ke(e,t)}))}));const Ie=()=>Ae;function Ce(e){return function(t){const n="local"===e?localStorage:sessionStorage;return JSON.parse(n.getItem(t)??"null")}}function Re(e){var t,n;return!(null===(t=e?e.flags:null===(n=ii())||void 0===n?void 0:n.getFeatureFlags())||void 0===t||!t["brick-next-v3-strict-mode"])}function Te(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];const i=0===r.length?"":",";e?console.error(`${t} is dropped in v3 strict mode${i}`,...r):console.warn(`${t} is deprecated in v3 and will be dropped in strict mode${i}`,...r)}const Oe=new Set(["prefix"]);var Pe=new WeakMap;const _e=function(){const e=k();if(e)return Object.freeze({define:(t,n)=>e.getRuntime().registerCustomTemplate(t,n)})}()||new class{constructor(){(0,s.A)(this,Pe,new Map)}define(e,t){var n,r;let o=(0,l.A)(Pe,this).has(e);o?console.warn(`Custom template of "${e}" already registered.`):(o=!!customElements.get(e),o&&console.warn(`Custom template of "${e}" already defined by customElements.`));const i=Re(),s=(null===(n=t.proxy)||void 0===n?void 0:n.properties)??{},a=[],c=[];for(const[t,n]of Object.entries(s))n.asVariable?(Te(i,"Template `asVariable`",e,t),i||c.push(t)):n.mergeProperty||n.refTransform?console.error("Template `mergeProperty` and `refTransform` are dropped in v3:",e,t):n.ref&&a.push([t,n]);const u={...t,proxy:{...t.proxy,properties:Object.fromEntries(a)},state:(t.state?i?t.state:t.state.map((e=>({expose:!0,...e}))):[]).concat(c.map((e=>({name:e,expose:!0}))))};(0,l.A)(Pe,this).set(e,{...u,name:e});const d=(p=u.state,(0,g.uniq)((null==p?void 0:p.filter((e=>e.expose)).map((e=>e.name)))??[]));var p;const f=Object.entries((null===(r=u.proxy)||void 0===r?void 0:r.methods)??{}),h=d.concat(a.map((e=>e[0]))),m=f.map((e=>e[0])),v=h.concat(m).filter((e=>e in HTMLElement.prototype&&!Oe.has(e)));if(v.length>0&&(Te(i,"Using native HTMLElement properties as template properties or methods",e,...v),i))throw new Error(`In custom template "${e}", ${v.map((e=>`"${e}"`)).join(", ")} are native HTMLElement properties, and should be avoid to be used as brick properties or methods.`);if(!o){class t extends HTMLElement{get $$typeof(){return"custom-template"}static get _dev_only_definedProperties(){return h}static get _dev_only_definedMethods(){return m}$$getElementByRef(e){var t;return null===(t=this.$$tplStateStore)||void 0===t||null===(t=t.hostBrick)||void 0===t||null===(t=t.tplHostMetadata)||void 0===t||null===(t=t.internalBricksByRef.get(e))||void 0===t?void 0:t.element}connectedCallback(){let e=this.shadowRoot;e||(e=this.attachShadow({mode:"open"}));const t=document.createDocumentFragment(),n=document.createElement("style");n.textContent=":host{display:block}:host([hidden]){display:none}";const r=document.createElement("slot");t.appendChild(n),t.appendChild(r),e.appendChild(t)}disconnectedCallback(){this.shadowRoot&&(this.shadowRoot.textContent="")}}for(const n of d)a.some((e=>e[0]===n))?console.error(`Cannot define an exposed state that is also a proxy property: "${n}" in ${e}`):Object.defineProperty(t.prototype,n,{get(){return this.$$tplStateStore.getValue(n)},set(e){var t;null===(t=this.$$tplStateStore)||void 0===t||t.updateValue(n,e,"replace")},enumerable:!0});for(const[e,n]of a)Object.defineProperty(t.prototype,e,{get(){return this.$$getElementByRef(n.ref)[n.refProperty??e]},set(t){var r;const o=null===(r=this.$$getElementByRef)||void 0===r?void 0:r.call(this,n.ref);o&&(o[n.refProperty??e]=t)},enumerable:!0});for(const[e,n]of f)Object.defineProperty(t.prototype,e,{value(){this.$$getElementByRef(n.ref)[n.refMethod??e](...arguments)},enumerable:!0});customElements.define(e,t)}}get(e){return(0,l.A)(Pe,this).get(e)}};function Me(e,t,n){let{tplStateStoreId:r,tplStateStoreMap:o}=e;if(!r)throw new Error(`Using "${t}" outside of a custom template${n??""}`);const i=o.get(r);if(!i)throw new Error(`Template state store is not found when using "${t}"${n??""}.\nThis is a bug of Brick Next, please report it.`);return i}function xe(e,t,n){const r=Me(e,t,n).hostBrick.element;if(!r)throw new Error(`Template host element is gone when using "${t}"${n??""}.\nThis is a bug of Brick Next, please report it.`);return r}const Be=new Map,Le=new Proxy(Object.freeze({}),{get:(e,t)=>Be.get(t)}),$e=function(){const e=k();if(e)return function(t,n,r){return e.getRuntime().registerWidgetFunctions(t,n,r)}}()||function(e,t,n){if(Be.has(e))throw new Error(`Widget functions of "${e}" already registered`);const{storyboardFunctions:r,registerStoryboardFunctions:o}=fe({widgetId:e,widgetVersion:n});Be.set(e,r),o(t)},Ne=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Ue=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match(Ne);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Fe=e=>"*"===e||"x"===e||"X"===e,je=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},De=(e,t)=>{if(Fe(e)||Fe(t))return 0;const[n,r]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(je(e),je(t));return n>r?1:n<r?-1:0},Ke=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const r=De(e[n]||"0",t[n]||"0");if(0!==r)return r}return 0},Ve=(e,t,n)=>{He(n);const r=((e,t)=>{const n=Ue(e),r=Ue(t),o=n.pop(),i=r.pop(),s=Ke(n,r);return 0!==s?s:o&&i?Ke(o.split("."),i.split(".")):o||i?o?-1:1:0})(e,t);return We[n].includes(r)},We={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},ze=Object.keys(We),He=e=>{if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===ze.indexOf(e))throw new Error(`Invalid operator, expected one of ${ze.join("|")}`)};function qe(e,t){let n=mi(e);if(!n&&null!=ri&&ri.checkInstalledApps&&(n=ri.checkInstalledApps.getCheckedApp(e)),!n||"running"===n.installStatus)return!1;if(!t||!n.currentVersion)return!0;const r=t.match(/^([><]=?|=)(.*)$/);try{if(!r)throw new TypeError(`Invalid match version: ${t}`);return Ve(n.currentVersion,r[2],r[1])}catch(e){console.error(e)}return!1}function Ge(e,t,n){let{formStateStoreId:r,formStateStoreMap:o}=e;if(!r)throw new Error(`Using "${t}" outside of form renderer${n??""}`);const i=o.get(r);if(!i)throw new Error(`Form state store is not found when using "${t}"${n??""}.\nThis is a bug of Brick Next, please report it.`);return i}const Ye=new Map;async function Qe(e){var t;const n=null==ri||null===(t=ri.flowApi)||void 0===t?void 0:t.isFlowApiProvider(e);n&&(e=ri.flowApi.FLOW_API_PROVIDER);let r=Ye.get(e);if(r)return r;if(e.includes("-")&&!customElements.get(e))if(n)ri.flowApi.registerFlowApiProvider();else if(await(0,d.loadBricksImperatively)([e],di()),!customElements.get(e))throw new Error(`Provider not defined: "${e}".`);return r=document.createElement(e),Ye.set(e,r),r}let Je=new WeakSet;function Xe(e){if((0,p.isObject)(e)&&!Ze(e))if(Je.add(e),Array.isArray(e))e.forEach(Xe);else{const t=Object.getPrototypeOf(e);t&&t.constructor!==Object||Object.values(e).forEach(Xe)}}function Ze(e){return Je.has(e)}const et=new Map;async function tt(e,t,n){const{useProvider:r,method:o="resolve",args:i=[],onReject:s}=e,{provider:a,field:c}=e;if(a&&!r)throw new Error(`You're using "provider: ${a}" which is dropped in v3, please use "useProvider" instead`);const l=null!=c;if(l){const e=Re();if(Te(e,"`resolve.field`"),e)throw new Error("Using deprecated `resolve.field`")}const[u,d]=await Promise.all([Qe(r),mt(i,t)]),p=null==n?void 0:n.renderId,f=nt(u,r,o,d,n,i,!!p&&p!==pi());let h,{transform:m}=e;try{const e=await f;h=l?(0,g.get)(e,c):e,Xe(h)}catch(e){if(!function(e){return!(null==e||!e.transform)}(s))throw e;m=s.transform,h=e}return m?"string"==typeof m?{[m]:h}:mt(m,{...t,data:h}):h}async function nt(e,t,n,r,o,i,s){let a,c;try{a=JSON.stringify({useProvider:t,method:n,args:r})}catch(e){if(!i)throw e;a=JSON.stringify({useProvider:t,method:n,originalArgs:i})}return"reload"!==(null==o?void 0:o.cache)&&(c=et.get(a)),c||(c=(async o=>{const i=null!=ri&&null!==(o=ri.flowApi)&&void 0!==o&&o.isFlowApiProvider(t)?await ri.flowApi.getArgsOfFlowApi(t,r,n):r;return e[n](...i)})(),s||et.set(a,c)),c}const rt=Symbol.for("pre.evaluated.raw"),ot=Symbol.for("pre.evaluated.context");function it(e){return!(null==e||!e[rt])}function st(e){return e[rt]}function at(e){return"string"==typeof e?(0,T.shouldAllowRecursiveEvaluations)(e):(0,T.shouldAllowRecursiveEvaluations)(e[rt])}const ct=new WeakSet([SyntaxError,TypeError,ReferenceError]);function lt(e){return ct.has(e.constructor)?e.constructor:TypeError}function ut(e,t,n){const{run:r}=dt(e,t,n,!1);return r()}function dt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;const o=[];if("string"!=typeof e){const n=(0,g.omit)(t,["pendingPermissionsPreCheck","tplStateStoreMap","tplStateStoreScope","formStateStoreMap","formStateStoreScope"]);t={...e[ot],...n},e=e[rt]}const i={usedArgs:new Set},s={usedArgs:new Set};let a;try{a=(0,T.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal(e,t){(0,O.collectAppGetMenuUsage)(i,e,t),(0,O.collectInstalledAppsHasUsage)(s,e,t)}}})}catch(t){const n=`${t.message}, in "${e}"`;throw new(lt(t))(n)}if(i.hasNonStaticUsage)throw new Error(`Non-static usage of "APP.getMenu" is prohibited in v3, check your expression: "${e}"`);if(s.hasNonStaticUsage)throw new Error(`Non-static usage of "INSTALLED_APPS.has" is prohibited in v3, check your expression: "${e}"`);const c={},{attemptToVisitGlobals:l}=a;if(n.lazy||l.has("EVENT")&&!(0,p.hasOwnProperty)(t,"event")||l.has("DATA")&&!(0,p.hasOwnProperty)(t,"data"))return{blockingList:o,run:()=>Object.keys(t).length>0?{[rt]:e,[ot]:t}:e};let u,f,h,m;const v=Re(t);let y,w;(l.has("STATE")||!v&&l.has("TPL"))&&(m=Me(t,"STATE",`: "${e}"`)),l.has("FORM_STATE")&&(w=Ge(t,"FORM_STATE",`: "${e}"`));const b=W();if(r||b){if(l.has("CTX")&&(u=(0,O.strictCollectMemberUsage)(e,"CTX"),r&&o.push(t.ctxStore.waitFor(u))),m){if(h=(0,O.strictCollectMemberUsage)(e,"STATE"),!v){const t=(0,O.strictCollectMemberUsage)(e,"TPL");for(const e of t)h.add(e)}r&&o.push(m.waitFor(h))}w&&(y=(0,O.strictCollectMemberUsage)(e,"FORM_STATE"),r&&o.push(w.waitFor(y))),l.has("PROCESSORS")&&(f=(0,O.strictCollectMemberUsage)(e,"PROCESSORS",2),r&&o.push((0,d.loadProcessorsImperatively)(f,di())))}if(r){let n=l.has("PERMISSIONS");if(!n&&l.has("FN")){const t=[...(0,O.strictCollectMemberUsage)(e,"FN")];n=ge(t)}if(n&&o.push(...t.pendingPermissionsPreCheck),i.usedArgs.size>0&&null!=ri&&ri.menu){const e=[...i.usedArgs];o.push(Promise.all(e.map((e=>ri.menu.fetchMenuById(e,t,{getStoryboardByAppId:hi,resolveData:tt,asyncComputeRealValue:mt})))))}var E;s.usedArgs.size>0&&o.push(null==ri||null===(E=ri.checkInstalledApps)||void 0===E?void 0:E.waitForCheckingApps([...s.usedArgs]))}return{blockingList:o,run(){var n,r;const{app:o,location:i,query:s,match:d,flags:b,sys:E,ctxStore:S,data:A,event:k}=t,I=t.overrideApp??o;for(const o of l)switch(o){case"ANCHOR":c[o]=i.hash?i.hash.substring(1):null;break;case"APP":if(null==I)throw new ReferenceError(`APP is not defined, in "${e}"`);c[o]={...(0,g.cloneDeep)(I),getMenu:null==ri||null===(n=ri.menu)||void 0===n?void 0:n.getMenuById};break;case"CTX":c[o]=G({get:(e,t)=>S.getValue(t),ownKeys:()=>Array.from(u)});break;case"DATA":c[o]=A;break;case"EVENT":c[o]=k;break;case"FLAGS":c[o]=q(b);break;case"FORM_STATE":c[o]=G({get:(e,t)=>w.getValue(t),ownKeys:()=>Array.from(y)});break;case"HASH":c[o]=i.hash;break;case"INSTALLED_APPS":c[o]=q({has:qe});break;case"ITEM":case"INDEX":case"SIZE":{const n="ITEM"===o?"forEachItem":"INDEX"===o?"forEachIndex":"forEachSize";(0,p.hasOwnProperty)(t,n)?c[o]=t[n]:console.error(`Using \`${o}\` but no \`:forEach\` is found, check your expression: "${e}"`);break}case"LOCAL_STORAGE":c[o]=q({getItem:Ce("local")});break;case"MEDIA":c[o]=q(Ie());break;case"MISC":c[o]=ii().getMiscSettings();break;case"PARAMS":if(null==s)throw new ReferenceError(`PARAMS is not defined, in "${e}"`);c[o]=new URLSearchParams(s);break;case"PATH":c[o]=q((null==d?void 0:d.params)??{});break;case"PATH_NAME":c[o]=i.pathname;break;case"PROCESSORS":c[o]=G({get(e,t){const n=x.get(t);if(!n)throw new Error(`'PROCESSORS.${t}' is not registered! Have you installed the relevant brick package?`);return G({get:(e,t)=>n.get(t),ownKeys:()=>Array.from(n.keys())})},ownKeys(){const e=new Set;for(const t of f){const n=t.split(".")[0];e.add(n)}return Array.from(e)}});break;case"QUERY":if(null==s)throw new ReferenceError(`QUERY is not defined, in "${e}"`);c[o]=Object.fromEntries(Array.from(s.keys()).map((e=>[e,s.get(e)])));break;case"QUERY_ARRAY":if(null==s)throw new ReferenceError(`QUERY_ARRAY is not defined, in "${e}"`);c[o]=Object.fromEntries(Array.from(s.keys()).map((e=>[e,s.getAll(e)])));break;case"SESSION_STORAGE":c[o]=q({getItem:Ce("session")});break;case"TPL":if(Te(v,'Using "TPL" in expression',`check your expression: "${e}"`),v)break;case"STATE":c[o]=G({get:(e,t)=>m.getValue(t),ownKeys:()=>Array.from(h)});break;case"SYS":c[o]=q(E??{});break;case"__WIDGET_FN__":c[o]=Le;break;case"__WIDGET_IMG__":c[o]=null==ri||null===(r=ri.images)||void 0===r?void 0:r.widgetImagesFactory;break;case"__WIDGET_I18N__":c[o]=$}Object.assign(c,le(a.attemptToVisitGlobals,{storyboardFunctions:he,app:I,appendI18nNamespace:t.appendI18nNamespace}));try{const t=(0,T.cook)(a.expression,a.source,{globalVariables:(0,_.supply)(a.attemptToVisitGlobals,c)});return V("evaluation",{raw:e,context:c,result:t}),t}catch(t){const n=`${t.message}, in "${e}"`;throw new(lt(t))(n)}}}}let pt=function(e){return e[e.INITIAL=0]="INITIAL",e[e.USE_BRICK=1]="USE_BRICK",e[e.USE_BRICK_ITEM=2]="USE_BRICK_ITEM",e[e.USE_BRICK_PROPERTIES=3]="USE_BRICK_PROPERTIES",e[e.USE_BRICK_TRANSFORM=4]="USE_BRICK_TRANSFORM",e[e.USE_BRICK_EVENTS=5]="USE_BRICK_EVENTS",e[e.USE_BRICK_IF=6]="USE_BRICK_IF",e[e.USE_BRICK_SLOTS=7]="USE_BRICK_SLOTS",e[e.USE_BRICK_SLOTS_ITEM=8]="USE_BRICK_SLOTS_ITEM",e[e.USE_BRICK_SLOTS_ITEM_BRICKS=9]="USE_BRICK_SLOTS_ITEM_BRICKS",e[e.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM=10]="USE_BRICK_SLOTS_ITEM_BRICKS_ITEM",e[e.USE_BRICK_LIFECYCLE=11]="USE_BRICK_LIFECYCLE",e[e.USE_BRICK_DATA_SOURCE=12]="USE_BRICK_DATA_SOURCE",e}({});function ft(e){switch(e){case pt.USE_BRICK_PROPERTIES:case pt.USE_BRICK_TRANSFORM:case pt.USE_BRICK_EVENTS:case pt.USE_BRICK_IF:case pt.USE_BRICK_LIFECYCLE:case pt.USE_BRICK_DATA_SOURCE:return!0}return!1}function ht(e,t,n){if(ft(e))return e;if(t)switch(e){case pt.USE_BRICK:return pt.USE_BRICK_ITEM;case pt.USE_BRICK_SLOTS_ITEM_BRICKS:return pt.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM}else switch(e){case pt.INITIAL:if("useBrick"===n)return pt.USE_BRICK;break;case pt.USE_BRICK:case pt.USE_BRICK_ITEM:case pt.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM:switch(n){case"properties":return pt.USE_BRICK_PROPERTIES;case"transform":return pt.USE_BRICK_TRANSFORM;case"dataSource":return pt.USE_BRICK_DATA_SOURCE;case"events":return pt.USE_BRICK_EVENTS;case"slots":return pt.USE_BRICK_SLOTS;case"children":return pt.USE_BRICK_SLOTS_ITEM_BRICKS;case"if":return pt.USE_BRICK_IF;case"lifeCycle":return pt.USE_BRICK_LIFECYCLE}break;case pt.USE_BRICK_SLOTS:return pt.USE_BRICK_SLOTS_ITEM;case pt.USE_BRICK_SLOTS_ITEM:if("bricks"===n)return pt.USE_BRICK_SLOTS_ITEM_BRICKS}return pt.INITIAL}async function mt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=it(e);if(r||"string"==typeof e){const o=n.$$lazyForUseBrick&&ft(n.$$stateOfUseBrick);let i,s=o;return r||(0,T.isEvaluable)(e)?(i=await async function(e,t,n){const{blockingList:r,run:o}=dt(e,t,n,!0);return await Promise.all(r),o()}(e,t,{lazy:o}),s=at(e)):i=o?e:((0,p.hasOwnProperty)(t,"data")?n.noInject?P.transform:P.transformAndInject:n.noInject?yt:P.inject)(e,t),s||Xe(i),i}if(!(0,p.isObject)(e)||Ze(e)||"function"==typeof e)return e;if(Array.isArray(e)){const r=vt(n,!0);return Promise.all(e.map((e=>mt(e,t,r))))}return Object.fromEntries((await Promise.all(Object.entries(e).map((e=>{let[r,o]=e;return Promise.all([mt(r,t),mt(o,t,vt(n,!1,r))])})))).concat(n.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function gt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=it(e);if(r||"string"==typeof e){const o=n.$$lazyForUseBrick&&ft(n.$$stateOfUseBrick);let i,s=o;return r||(0,T.isEvaluable)(e)?(i=ut(e,t),s=at(e)):i=o?e:((0,p.hasOwnProperty)(t,"data")?n.noInject?P.transform:P.transformAndInject:n.noInject?yt:P.inject)(e,t),s||Xe(i),i}if(!(0,p.isObject)(e)||Ze(e)||"function"==typeof e)return e;if(Array.isArray(e)){const r=vt(n,!0);return e.map((e=>gt(e,t,r)))}return Object.fromEntries(Object.entries(e).map((e=>{let[r,o]=e;return[gt(r,t),gt(o,t,vt(n,!1,r))]})).concat(n.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function vt(e,t,n){return e.$$lazyForUseBrick?{...e,$$stateOfUseBrick:ht(e.$$stateOfUseBrick,t,n)}:e}function yt(e){return e}async function wt(e,t){return!(0,p.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||it(e.if)?await mt(e.if,t):e.if)}function bt(e,t){return!(0,p.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||it(e.if)?gt(e.if,t):e.if)}function Et(e){return!(0,p.hasOwnProperty)(e,"if")||!!e.if}const St=function(){const e=k();if(e)return e.looseCheckIfByTransform}()||function(e,t){return bt(e,{data:t})};function At(e){let t=!1,n=!1,r=!1;if("string"==typeof e?(0,T.isEvaluable)(e):it(e)){const o="string"==typeof e?e:st(e);if((0,T.isTrackAll)(o)){const e=(0,O.trackAll)(o);e&&(t=e.context,n=e.state,r=e.formState)}else t=(0,O.track)(o,"track context","CTX"),n=(0,O.track)(o,"track state","STATE"),r=(0,O.track)(o,"track formstate","FORM_STATE")}return{contextNames:t,stateNames:n,formStateNames:r}}async function kt(e,t){for(const[n,r,o]of e)if(n===t){const e=await r;if(void 0!==e||!o)return e}}async function It(e){const t={};for(const[n,r,o]of e){const e=await r;void 0===e&&o||!("style"!==n&&"dataset"!==n||(0,p.isObject)(e))||(t[n]=e)}return t}function Ct(e,t){if(t)for(const[n,r]of Object.entries(t))switch(n){case"style":case"dataset":for(const[t,o]of Object.entries(r))e[n][t]=o;break;case"constructor":case"__proto__":case"innerHTML":throw new Error(`set \`${n}\` is prohibited`);default:e[n]=r}}function Rt(e,t,n){const r=function(e,t){return(0,p.isObject)(e)?Object.fromEntries(Object.entries(e).map((e=>{let[n,r]=e;const o=gt(r,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?pt.USE_BRICK:pt.INITIAL});if("style"!==n&&"dataset"!==n||(0,p.isObject)(o))return[n,o]})).filter(Boolean)):{}}(t,n);Array.isArray(e)||(e=[e]),e.forEach((e=>{Ct(e,r)}))}function Tt(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Ot(e){return e&&e.sensitive?"":"i"}function Pt(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var r=n.strict,o=void 0!==r&&r,i=n.start,s=void 0===i||i,a=n.end,c=void 0===a||a,l=n.encode,u=void 0===l?function(e){return e}:l,d=n.delimiter,p=void 0===d?"/#?":d,f=n.endsWith,h="[".concat(Tt(void 0===f?"":f),"]|$"),m="[".concat(Tt(p),"]"),g=s?"^":"",v=0,y=e;v<y.length;v++){var w=y[v];if("string"==typeof w)g+=Tt(u(w));else{var b=Tt(u(w.prefix)),E=Tt(u(w.suffix));if(w.pattern)if(t&&t.push(w),b||E)if("+"===w.modifier||"*"===w.modifier){var S="*"===w.modifier?"?":"";g+="(?:".concat(b,"((?:").concat(w.pattern,")(?:").concat(E).concat(b,"(?:").concat(w.pattern,"))*)").concat(E,")").concat(S)}else g+="(?:".concat(b,"(").concat(w.pattern,")").concat(E,")").concat(w.modifier);else"+"===w.modifier||"*"===w.modifier?g+="((?:".concat(w.pattern,")").concat(w.modifier,")"):g+="(".concat(w.pattern,")").concat(w.modifier);else g+="(?:".concat(b).concat(E,")").concat(w.modifier)}}if(c)o||(g+="".concat(m,"?")),g+=n.endsWith?"(?=".concat(h,")"):"$";else{var A=e[e.length-1],k="string"==typeof A?m.indexOf(A[A.length-1])>-1:void 0===A;o||(g+="(?:".concat(m,"(?=").concat(h,"))?")),k||(g+="(?=".concat(m,"|").concat(h,")"))}return new RegExp(g,Ot(n))}(function(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[a=n+1])throw new TypeError('Pattern cannot start with "?" at '.concat(a));for(;a<e.length;)if("\\"!==e[a]){if(")"===e[a]){if(0==--o){a++;break}}else if("("===e[a]&&(o++,"?"!==e[a+1]))throw new TypeError("Capturing groups are not allowed at ".concat(a));i+=e[a++]}else i+=e[a++]+e[a++];if(o)throw new TypeError("Unbalanced pattern at ".concat(n));if(!i)throw new TypeError("Missing pattern at ".concat(n));t.push({type:"PATTERN",index:n,value:i}),n=a}else{for(var s="",a=n+1;a<e.length;){var c=e.charCodeAt(a);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;s+=e[a++]}if(!s)throw new TypeError("Missing parameter name at ".concat(n));t.push({type:"NAME",index:n,value:s}),n=a}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,o=void 0===r?"./":r,i="[^".concat(Tt(t.delimiter||"/#?"),"]+?"),s=[],a=0,c=0,l="",u=function(e){if(c<n.length&&n[c].type===e)return n[c++].value},d=function(e){var t=u(e);if(void 0!==t)return t;var r=n[c],o=r.type,i=r.index;throw new TypeError("Unexpected ".concat(o," at ").concat(i,", expected ").concat(e))},p=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t};c<n.length;){var f=u("CHAR"),h=u("NAME"),m=u("PATTERN");if(h||m){var g=f||"";-1===o.indexOf(g)&&(l+=g,g=""),l&&(s.push(l),l=""),s.push({name:h||a++,prefix:g,suffix:"",pattern:m||i,modifier:u("MODIFIER")||""})}else{var v=f||u("ESCAPED_CHAR");if(v)l+=v;else if(l&&(s.push(l),l=""),u("OPEN")){g=p();var y=u("NAME")||"",w=u("PATTERN")||"",b=p();d("CLOSE"),s.push({name:y||(w?a++:""),pattern:y&&!w?i:w,prefix:g,suffix:b,modifier:u("MODIFIER")||""})}else d("END")}}return s}(e,n),t,n)}function _t(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,o=n.exec(e.source);o;)t.push({name:o[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),o=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map((function(e){return _t(e,t,n).source}));return new RegExp("(?:".concat(r.join("|"),")"),Ot(n))}(e,t,n):Pt(e,t,n)}const Mt=new Map,xt=1e4;let Bt=0;function Lt(e,t){const{path:n,exact:r=!1,strict:o=!1,sensitive:i=!0}=t;return(Array.isArray(n)?n:[n]).reduce(((t,n)=>{if(t)return t;const{regexp:s,keys:a}=function(e,t){const n=`${t.end}${t.strict}${t.sensitive}`;let r=Mt.get(n);r||Mt.set(n,r=new Map);const o=r.get(e);if(o)return o;const i=[],s={regexp:_t(e,i,t),keys:i};return Bt<xt&&(r.set(e,s),Bt++),s}(n,{end:r,strict:o,sensitive:i}),c=s.exec(e);if(!c)return null;const[l,...u]=c,d=e===l;return r&&!d?null:{path:n,url:"/"===n&&""===l?"/":l,isExact:d,params:a.reduce(((e,t,n)=>(e[t.name]=u[n],e)),{})}}),null)}function $t(e,t,n){return Lt(n,{path:e.path.replace(/^\$\{APP.homepage\}/,t),exact:e.exact})}const Nt=Symbol.for("tpl.asyncComputedPropsFromHost"),Ut=Symbol.for("tpl.stateStoreId"),Ft=Symbol.for("tpl.externalForEachItem"),jt=Symbol.for("tpl.externalForEachIndex"),Dt=Symbol.for("tpl.externalForEachSize"),Kt=new Set;let Vt=function(e){return e.REQUEST_FAILED="REQUEST_FAILED",e.SOMETHING_WENT_WRONG="SOMETHING_WENT_WRONG",e.LOGIN_TIMEOUT_MESSAGE="LOGIN_TIMEOUT_MESSAGE",e.NETWORK_ERROR="NETWORK_ERROR",e}({});const Wt={[Vt.REQUEST_FAILED]:"Request Failed",[Vt.SOMETHING_WENT_WRONG]:"Something went wrong!",[Vt.LOGIN_TIMEOUT_MESSAGE]:"You haven't logged in or your login session has expired. Login right now?",[Vt.NETWORK_ERROR]:"Network error, please check your network."},zt={[Vt.REQUEST_FAILED]:"请求失败",[Vt.SOMETHING_WENT_WRONG]:"出现了一些问题!",[Vt.LOGIN_TIMEOUT_MESSAGE]:"您还未登录或登录信息已过期,现在重新登录?",[Vt.NETWORK_ERROR]:"网络错误,请检查您的网络连接。"},Ht="core/runtime",qt={en:Wt,zh:zt};let Gt;const Yt=Object.freeze({show:function(e){if(Gt)return Gt.resolve(e);if("confirm"===e.type){const t=confirm(e.content);return new Promise(((e,n)=>setTimeout((()=>{(t?e:n)()}),1)))}return alert(e.content),new Promise((e=>setTimeout((()=>{e()}),1)))}});function Qt(e){const{search:t,pathname:n}=e,r=n?window.btoa(encodeURIComponent(n)):"",o=t?window.btoa(encodeURIComponent(t)):"";document.cookie=`SALOGINPATH=${r}; path=/`,document.cookie=`SALOGINQUERY=${o}; path=/`}function Jt(e){if(e instanceof Event&&e.target instanceof HTMLScriptElement)return e.target.src;if(e instanceof R.HttpFetchError)return u.i18n.t(`${Ht}:${Vt.NETWORK_ERROR}`);if(e instanceof R.HttpResponseError&&e.responseJson){if("string"==typeof e.responseJson.error)return e.responseJson.error;if("string"==typeof e.responseJson.msg)return e.responseJson.msg}return null==e?"Unknown error":e.toString()}function Xt(e){return e instanceof R.HttpResponseError&&401===e.response.status&&!!e.responseJson&&100003===e.responseJson.code}let Zt,en,tn=!1;function nn(e){if(e instanceof R.HttpAbortError)return;if(Xt(e)&&!window.NO_AUTH_GUARD){if(tn)return;return tn=!0,void Yt.show({type:"confirm",content:u.i18n.t(`${Ht}:${Vt.LOGIN_TIMEOUT_MESSAGE}`)}).then((()=>{!function(){const e=ii().getFeatureFlags()["sso-enabled"],t=C();Qt(t.location),t.push(e?"/sso-auth/login":"/auth/login",{from:{...t.location,state:void 0}})}(),tn=!1}),(()=>{tn=!1}))}console.error(e);const t=Jt(e);t!==Zt&&(Zt=t,Yt.show({type:"error",title:u.i18n.t(`${Ht}:${Vt.REQUEST_FAILED}`),content:t,contentStyle:{whiteSpace:"pre-wrap",wordBreak:"break-word"}}).then((()=>{Zt=void 0})))}const rn=Object.freeze({show:function(e){en?en.resolve(e):alert(e.message)}});function on(e,t,n){t&&Object.entries(t).forEach((t=>{let[r,o]=t;const i=un(o,n,{element:e});e.addEventListener(r,i),e.$$listeners||(e.$$listeners=[]),e.$$listeners.push([r,i]),e.$$eventListeners||(e.$$eventListeners=[]);for(const t of[].concat(o))e.$$eventListeners.push([r,null,t])}))}function sn(e){return"string"==typeof e.action}function an(e){return"string"==typeof e.useProvider}function cn(e){return!(!e.target&&!e.targetRef||!e.method&&!e.properties)}function ln(e){return!!e.then}function un(e,t,n){return function(r){for(const o of[].concat(e))if(bt(o,{...t,event:r}))if(ln(o))un(o.then,t,n)(r);else if(sn(o)){const[e,i]=o.action.split(".");switch(o.action){case"history.push":case"history.replace":case"history.pushQuery":case"history.replaceQuery":case"history.pushAnchor":case"history.block":case"history.goBack":case"history.goForward":case"history.reload":case"history.unblock":hn(r,i,o.args,o.callback,t);break;case"window.open":mn(r,o.args,t);break;case"location.reload":case"location.assign":bn(r,i,o.args,t);break;case"localStorage.setItem":case"localStorage.removeItem":case"sessionStorage.setItem":case"sessionStorage.removeItem":En(r,e,i,o.args,t);break;case"event.preventDefault":r.preventDefault();break;case"event.stopPropagation":r.stopPropagation();break;case"console.log":case"console.error":case"console.warn":case"console.info":Sn(r,i,o.args,t);break;case"message.success":case"message.error":case"message.info":case"message.warn":An(r,i,o.args,t);break;case"handleHttpError":nn(r.detail);break;case"context.assign":case"context.replace":case"context.refresh":case"context.load":vn(r,i,o.args,o.batch??!0,o.callback,t);break;case"state.update":case"state.refresh":case"state.load":yn(r,i,o.args,o.batch??!0,o.callback,t);break;case"tpl.dispatchEvent":{const[e,n]=Cn(o.args,t,r);xe(t,o.action,`: ${e}`).dispatchEvent(new CustomEvent(e,n));break}case"formstate.update":wn(r,o.args,o.callback,t);break;case"message.subscribe":case"message.unsubscribe":kn(r,i,o.args,t,n,o.callback);break;case"theme.setDarkTheme":case"theme.setLightTheme":te("theme.setDarkTheme"===o.action?"dark":"light");break;case"theme.setTheme":{const[e]=Cn(o.args,t,r);te(e);break}case"mode.setDashboardMode":case"mode.setDefaultMode":ae("mode.setDashboardMode"===o.action?"dashboard":"default");break;default:console.error("unknown event listener action:",o.action)}}else an(o)?dn(r,o,t,n):cn(o)?pn(r,o,t,n):console.error("unknown event handler:",o);else o.else&&un(o.else,t,n)(r)}}async function dn(e,t,n,r){try{fn(e,await Qe(t.useProvider),t,"saveAs"!==t.method?"resolve":"saveAs",n,r)}catch(e){console.error(Jt(e))}}function pn(e,t,n,r){let o=[];const i=t.target,s=t.targetRef;let a=i;if(("string"==typeof i?(0,T.isEvaluable)(i):it(i))&&(a=gt(i,{...n,event:e})),"string"==typeof a)if("_self"===a)o.push(r.element);else if(t.multiple)o=Array.from(document.querySelectorAll(a));else{const e=document.querySelector(a);null!==e&&o.push(e)}else if(a)a instanceof HTMLElement?o.push(a):console.error("unexpected target:",a);else if(s){let t=s;("string"==typeof s?(0,T.isEvaluable)(s):it(s))&&(t=gt(s,{...n,event:e}));const r=[].concat(t),i=xe(n,"targetRef",`: ${r.join(", ")}`);o.push(...r.map((e=>{var t;return null===(t=i.$$getElementByRef)||void 0===t?void 0:t.call(i,e)})).filter(Boolean))}0!==o.length?function(e){return!!e.method}(t)?o.forEach((o=>{fn(e,o,t,t.method,n,r,{useEventAsDefault:!0})})):function(e){return!!e.properties}(t)&&Rt(o,t.properties,{...n,event:e}):console.error("target not found:",i||s)}async function fn(e,t,n,r,o,i,s){if("function"!=typeof t[r])return void console.error("target has no method:",{target:t,method:r});const a=async()=>{var i;let a=Cn(n.args,o,e,s);var c;return an(n)&&null!=ri&&null!==(i=ri.flowApi)&&void 0!==i&&i.isFlowApiProvider(n.useProvider)&&(a=await ri.flowApi.getArgsOfFlowApi(n.useProvider,a,r,null===(c=n.sse)||void 0===c?void 0:c.stream)),t[r](...a)};if(!n.callback)return void a();const c=In(n.callback,o,i),l={progress:c("progress"),success:c("success"),error:c("error"),finally:c("finally")};if(an(n)){var u,d;const t={...o,event:e};if(gt(null===(u=n.sse)||void 0===u?void 0:u.stream,t))return void async function(e,t){let{progress:n,success:r,error:o,finally:i}=t;const s=pi();try{const t=await e();for await(const e of t){if(s!==pi())return;null==n||n(e)}if(s!==pi())return;null==r||r()}catch(e){if(s!==pi())return;null==o||o(e)}finally{null==i||i()}}(a,l);if(gt(null===(d=n.poll)||void 0===d?void 0:d.enabled,t))return void function(e,t,n,r){let{progress:o,success:i,error:s,finally:a}=t;const{expectPollStopImmediately:c,expectPollEnd:l}=n,{interval:u,leadingRequestDelay:d,continueOnError:p,delegateLoadingBar:f}=gt((0,g.pick)(n,["interval","leadingRequestDelay","continueOnError","delegateLoadingBar"]),r),h=pi();let m;async function v(){let t;Kt.delete(m);try{var n;if(t=null===(n=gt(c,r))||void 0===n?void 0:n(),t)null==a||a();else{var d;const n=await e(),s=null===(d=gt(c,r))||void 0===d?void 0:d();var g;t=s||h!==pi(),t?s&&(null==a||a()):(null==o||o(n),null!==(g=gt(l,r))&&void 0!==g&&g(n)?(f&&window.dispatchEvent(new Event("request.end")),null==i||i(n),null==a||a()):y(u??3e3))}}catch(e){var v;const n=null===(v=gt(c,r))||void 0===v?void 0:v();t=n||h!==pi(),t?n&&(null==a||a()):(null==s||s(e),p?y(u??3e3):null==a||a())}finally{f&&t&&window.dispatchEvent(new Event("request.end"))}}function y(e){m=setTimeout(v,e),Kt.add(m)}y(d??0),f&&window.dispatchEvent(new Event("request.start"))}(a,l,n.poll,t)}try{const e=await a();l.success(e)}catch(e){l.error(e)}finally{l.finally()}}function hn(e,t,n,r,o){let i=0,s=!1,a=t;switch(t){case"push":case"replace":case"pushQuery":case"replaceQuery":case"pushAnchor":i=2,s=!0;break;case"reload":s=!0;break;case"block":i=1,a="setBlockMessage"}let c=[];if(i>0&&(c=Cn(n,o,e,{useEventDetailAsDefault:!0}),c.length=i),s&&r){const e=In(r,o,void 0);c.push((t=>{e(t?"error":"success")({blocked:t}),e("finally")({blocked:t})}))}C()[a](...c)}function mn(e,t,n){const[r,o,i]=Cn(t,n,e);window.open(r,o||"_self",i)}function gn(e,t,n,r,o,i){t?r.updateValues(e,n,(e=>Cn(e,o,i)[0])):e.forEach((e=>{const{name:t,value:s}=Cn([e],o,i)[0];r.updateValue(t,s,n)}))}function vn(e,t,n,r,o,i){if(!Array.isArray(n)||!n.every(p.isObject)||"assign"!==t&&"replace"!==t){const[r,s]=Cn(n,i,e);i.ctxStore.updateValue(r,s,t,o,i)}else gn(n,r,t,i.ctxStore,i,e)}function yn(e,t,n,r,o,i){if(Array.isArray(n)&&n.every(p.isObject)&&"update"===t)gn(n,r,"replace",Me(i,`state.${t}`,`: ${JSON.stringify(n)}`),i,e);else{const[r,s]=Cn(n,i,e);Me(i,`state.${t}`,`: ${r}`).updateValue(r,s,"update"===t?"replace":t,o,i)}}function wn(e,t,n,r){const[o,i]=Cn(t,r,e);Ge(r,"formstate.update",`: ${o}`).updateValue(o,i,"replace",n,r)}function bn(e,t,n,r){if("assign"===t){const[t]=Cn(n,r,e);location.assign(t)}else location[t]()}function En(e,t,n,r,o){const i="localStorage"===t?localStorage:sessionStorage,[s,a]=Cn(r,o,e);"setItem"===n?void 0!==a&&i.setItem(s,JSON.stringify(a)):i.removeItem(s)}function Sn(e,t,n,r){console[t](...Cn(n,r,e,{useEventAsDefault:!0}))}function An(e,t,n,r){const o=Cn(n,r,e,{useEventAsDefault:!0});rn.show({type:t,message:o[0]})}async function kn(e,t,n,r,o,i){const s=()=>{var o;const i=Cn(n,r,e);return null==ri||null===(o=ri.messageDispatcher)||void 0===o?void 0:o[t](...i)};if(!i)return void s();const a=In(i,r,o);try{const e=await s();a("success")(e)}catch(e){a("error")(e)}finally{a("finally")()}}function In(e,t,n){return function(r){return function(o){const i=null==e?void 0:e[r];if(i)try{const e=new CustomEvent(`callback.${r}`,{detail:o});un(i,t,n)(e)}catch(e){console.error(e)}else"error"===r&&console.error("Unhandled callback error:",o)}}}function Cn(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Array.isArray(e)?gt(e,{...t,event:n}):r.useEventAsDefault?[n]:r.useEventDetailAsDefault?[n.detail]:[]}function Rn(e){var t;const{ref:n,runtimeContext:r,element:o}=e;if(!n||!r.tplStateStoreId)return;const{hostBrick:i}=Me(r,"bindTemplateProxy"),s=i.tplHostMetadata;s.internalBricksByRef.set(n,e);const a=null===(t=s.proxy)||void 0===t?void 0:t.events;if(a)for(const[e,t]of Object.entries(a))if(t.ref===n){var c;const n=t=>{t.bubbles&&t.stopPropagation(),i.element.dispatchEvent(new CustomEvent(e,{detail:t.detail,bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed}))},r=t.refEvent??e;o.addEventListener(r,n),(c=o).$$proxyListeners??(c.$$proxyListeners=[]),o.$$proxyListeners.push([r,n])}}function Tn(e){const{ref:t,runtimeContext:n,element:r}=e;if(null==n||!n.tplStateStoreId||!t)return;const{hostBrick:o}=Me(n,"unbindTemplateProxy");o.tplHostMetadata.internalBricksByRef.delete(t);for(const[e,t]of r.$$proxyListeners??[])r.removeEventListener(e,t);delete r.$$proxyListeners}let On=function(e){return e[e.ROOT=1]="ROOT",e[e.BRICK=2]="BRICK",e[e.PLACEHOLDER=3]="PLACEHOLDER",e}({});function Pn(e){e.replaceChildren()}function _n(e,t){window.DISABLE_REACT_FLUSH_SYNC=!1;let n=e.child;const r=[];for(;n;){if(n.tag===On.BRICK){var o;const i=n.type;i.includes("-")&&!customElements.get(i)&&console.error(`Undefined custom element: ${i}`),"basic-bricks.script-brick"===i&&console.warn("`basic-bricks.script-brick` is deprecated, please take caution when using it");const s=t&&n===e.child?t:document.createElement(i);n.element=s,n.slotId&&s.setAttribute("slot",n.slotId),n.iid&&(s.dataset.iid=n.iid),null!==(o=n.tplHostMetadata)&&void 0!==o&&o.tplStateStoreId&&(s.dataset.tplStateStoreId=n.tplHostMetadata.tplStateStoreId),Ct(s,n.properties),on(s,n.events,n.runtimeContext),n.tplHostMetadata&&(s.$$tplStateStore=Me({tplStateStoreId:n.tplHostMetadata.tplStateStoreId,tplStateStoreMap:n.runtimeContext.tplStateStoreMap},"mount")),Rn(n),n.portal?r.push(s):n.return&&(n.return.childElements||(n.return.childElements=[]),n.return.childElements.push(s))}if(n.child)n=n.child;else if(n.sibling)n=n.sibling;else{var i;let e=n.return;for(;e;){var s;if(e.childElements)e.tag===On.ROOT?null===(s=e.container)||void 0===s||s.append(...e.childElements):e.element.append(...e.childElements),e.childElements=void 0;if(e.tag===On.ROOT&&r.length>0&&("function"==typeof e.createPortal?e.createPortal():e.createPortal).append(...r),e.sibling)break;e=e.return}n=null===(i=e)||void 0===i?void 0:i.sibling}}setTimeout((()=>{window.DISABLE_REACT_FLUSH_SYNC=!0}))}const Mn=["onMount","onUnmount","onMediaChange","onScrollIntoView","onMessage","onMessageClose"],xn=["onBeforePageLoad","onPageLoad","onPageLeave","onBeforePageLeave","onAnchorLoad","onAnchorUnload"];var Bn=new WeakMap,Ln=new WeakMap,$n=new WeakMap,Nn=new WeakMap,Un=new WeakMap,Fn=new WeakMap,jn=new WeakMap,Dn=new WeakMap,Kn=new WeakMap,Vn=new WeakSet;class Wn{constructor(e,t){(0,o.A)(this,Vn),(0,i.A)(this,"scope",void 0),(0,i.A)(this,"unknownBricks",void 0),(0,i.A)(this,"renderId",void 0),(0,s.A)(this,Bn,void 0),(0,s.A)(this,Ln,{onBeforePageLoad:[],onPageLoad:[],onPageLeave:[],onBeforePageLeave:[],onAnchorLoad:[],onAnchorUnload:[],onMediaChange:[],onScrollIntoView:[],onMount:[],onUnmount:[],onMessage:[],onMessageClose:[]}),(0,s.A)(this,$n,new Map),(0,s.A)(this,Nn,void 0),(0,s.A)(this,Un,new Map),(0,s.A)(this,Fn,void 0),(0,s.A)(this,jn,void 0),(0,s.A)(this,Dn,new WeakMap),(0,s.A)(this,Kn,new Map),this.scope=e,this.unknownBricks=(null==t?void 0:t.unknownBricks)??"throw",(0,c.A)(Bn,this,null==t?void 0:t.routeHelper),this.renderId=null==t?void 0:t.renderId}setInitialMenuRequestNode(e){(0,c.A)(jn,this,e)}memoizeMenuRequestNode(e,t){(0,l.A)(Dn,this).set(e,t)}getMenuRequests(){const e=[];let t=(0,l.A)(jn,this);for(;t;)if(t.request&&e.push(t.request),t.child)t=t.child;else{for(var n;t&&!t.sibling;)t=t.return;t=null===(n=t)||void 0===n?void 0:n.sibling}return e}async reMergeMenuRequestNodes(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(0,l.A)(Dn,this).get(t);(0,l.A)(Dn,this).set(t,n);let o,i=e.child;for(;i&&i!==r;)o=i,i=i.sibling;o?(o.sibling=n,n.sibling=null==r?void 0:r.sibling):e.child=n,await(0,l.A)(Bn,this).mergeMenus(this.getMenuRequests())}reBailout(e){return(0,l.A)(Bn,this).bailout(e)}reCatch(e,t){return(0,l.A)(Bn,this).catch(e,t)}async didPerformIncrementalRender(e,t){let n=!1;const r=[];for(const{parentRoutes:o,callback:i}of[...(0,l.A)(Kn,this).values()].reverse()){const s=o[o.length-1];if(r.includes(s))continue;const a=await i(e,t);a&&r.push(...o.slice(0,-1)),!1!==a&&(n=!0)}return n}performIncrementalRender(e,t,n){(0,l.A)(Kn,this).set(e,{parentRoutes:t,callback:n})}registerBrickLifeCycle(e,t){if(!t)return;const n=[...Mn,..."page"===this.scope?xn:[]];for(const r of n){const n=t[r];n&&(0,l.A)(Ln,this)[r].push({brick:e,handlers:n})}(0,g.isEmpty)(t.useResolves)||console.error("`lifeCycle.useResolves` is dropped in v3:",t)}registerArbitraryLifeCycle(e,t){const n=(0,l.A)(Un,this).get(e);n?n.add(t):(0,l.A)(Un,this).set(e,new Set([t]))}memoize(e,t,n,r){(0,l.A)(Fn,this)||(0,c.A)(Fn,this,new WeakMap);const o=[e??"",...t].join(".");let i=(0,l.A)(Fn,this).get(r);i||(i=new Map,(0,l.A)(Fn,this).set(r,i)),i.set(o,{node:n,last:Yn(n),lastNormal:Qn(n),lastPortal:Xn(n)})}reRender(e,t,n,r){const o=[e??"",...t].join("."),i=(0,l.A)(Fn,this).get(r).get(o),{node:s,last:c,lastNormal:u,lastPortal:d}=i;let p;const f=[];if((null==s?void 0:s.tag)===On.PLACEHOLDER){var h,m;p=(null===(h=function(e){return Jn(e,!0)}(s))||void 0===h?void 0:h.element)??null;const e=null===(m=function(e){return Zn(e,!0)}(s))||void 0===m?void 0:m.element;e&&f.push(e)}else{var g,v;p=(null==u||null===(g=u.element)||void 0===g?void 0:g.nextSibling)??null;let e=null==d||null===(v=d.element)||void 0===v?void 0:v.nextSibling;for(;e&&(f.push(e),e instanceof HTMLElement&&"DIV"===e.tagName);)e=e.nextSibling}const y=Yn(n);let w;i.node=n,i.last=y,i.lastNormal=Qn(n),i.lastPortal=Xn(n);let b=r.child;for(;b&&b!==c;){if(b.sibling===s){w=b;break}b=b.sibling}const E=document.createDocumentFragment(),S=document.createDocumentFragment(),A={tag:On.ROOT,container:E,createPortal:S,child:n};for(b=n;b;)b.return=A,b=b.sibling;const k=er(s,c);for((0,a.A)(Vn,this,zn).call(this,k),_n(A),w?w.sibling=n:r.child=n,y&&(y.sibling=null==c?void 0:c.sibling),b=n;b;)b.return=r,b=b.sibling;var I,C;if(r.tag===On.ROOT?null===(I=r.container)||void 0===I||I.insertBefore(E,p):null===(C=r.element)||void 0===C||C.insertBefore(E,p),S.childNodes.length>0){var R;let e=n;for(;e&&e.return;)e=e.return;if((null===(R=e)||void 0===R?void 0:R.tag)!==On.ROOT)throw new Error("Cannot find render root node. This is a bug of Brick Next, please report it.");const t="function"==typeof e.createPortal?e.createPortal():e.createPortal;let r=null;for(const e of f)if(t.contains(e)){r=e;break}t.insertBefore(S,r)}const T=er(n,y);(0,a.A)(Vn,this,Hn).call(this,T)}dispose(){for(const e of Object.values((0,l.A)(Ln,this)))e.length=0;for(const e of(0,l.A)($n,this).values()){for(const t of e)t.disconnect();e.length=0}(0,l.A)($n,this).clear(),(0,l.A)(Nn,this)&&(Ee.removeEventListener("change",(0,l.A)(Nn,this)),(0,c.A)(Nn,this,void 0)),(0,c.A)(Fn,this,void 0),(0,l.A)(Un,this).clear(),(0,l.A)(Kn,this).clear(),(0,c.A)(Dn,this,void 0)}dispatchBeforePageLoad(){(0,a.A)(Vn,this,qn).call(this,"onBeforePageLoad",new CustomEvent("page.beforeLoad"))}dispatchPageLoad(){const e=new CustomEvent("page.load");(0,a.A)(Vn,this,qn).call(this,"onPageLoad",e),window.dispatchEvent(e)}dispatchBeforePageLeave(e){(0,a.A)(Vn,this,qn).call(this,"onBeforePageLeave",new CustomEvent("page.beforeLeave",{detail:e}))}dispatchPageLeave(){(0,a.A)(Vn,this,qn).call(this,"onPageLeave",new CustomEvent("page.leave"))}dispatchAnchorLoad(){const{hash:e}=C().location;e&&"#"!==e?(0,a.A)(Vn,this,qn).call(this,"onAnchorLoad",new CustomEvent("anchor.load",{detail:{hash:e,anchor:e.substring(1)}})):(0,a.A)(Vn,this,qn).call(this,"onAnchorUnload",new CustomEvent("anchor.unload"))}initializeScrollIntoView(){for(const{brick:e,handlers:t}of(0,l.A)(Ln,this).onScrollIntoView)(0,a.A)(Vn,this,Gn).call(this,e,t)}initializeMediaChange(){(0,c.A)(Nn,this,(e=>{(0,a.A)(Vn,this,qn).call(this,"onMediaChange",new CustomEvent("media.change",{detail:q(e.detail)}))})),Ee.addEventListener("change",(0,l.A)(Nn,this))}initializeMessageDispatcher(){var e;for(const{brick:e,handlers:n}of(0,l.A)(Ln,this).onMessage)for(const r of[].concat(n)){var t;null==ri||null===(t=ri.messageDispatcher)||void 0===t||t.onMessage(r.channel,(t=>{un(r.handlers,e.runtimeContext,e)(new CustomEvent("message.push",{detail:t}))}))}null==ri||null===(e=ri.messageDispatcher)||void 0===e||e.onClose((()=>{(0,a.A)(Vn,this,qn).call(this,"onMessageClose",new CustomEvent("message.close"))}))}dispatchOnMount(){(0,a.A)(Vn,this,qn).call(this,"onMount",new CustomEvent("mount"))}dispatchOnUnmount(){(0,a.A)(Vn,this,qn).call(this,"onUnmount",new CustomEvent("unmount"))}}function zn(e){const t=[...Mn,..."page"===this.scope?xn:[]],n=[];for(const r of t){const t=(0,g.remove)((0,l.A)(Ln,this)[r],(t=>e.has(t.brick)));"onUnmount"===r&&n.push(...t)}for(const t of e){var r,o;const e=(0,l.A)($n,this).get(t);if(null!=e&&e.length){for(const t of e)t.disconnect();e.length=0,(0,l.A)($n,this).delete(t)}Tn(t),null===(r=t.element)||void 0===r||delete r.$$tplStateStore,null===(o=t.element)||void 0===o||o.remove()}const i=new CustomEvent("unmount");for(const{brick:e,handlers:t}of n)un(t,e.runtimeContext,e)(i)}function Hn(e){const t=new CustomEvent("mount");for(const{brick:n,handlers:r}of(0,l.A)(Ln,this).onMount)e.has(n)&&un(r,n.runtimeContext,n)(t);for(const{brick:t,handlers:n}of(0,l.A)(Ln,this).onScrollIntoView)e.has(t)&&(0,a.A)(Vn,this,Gn).call(this,t,n)}function qn(e,t){for(const{brick:n,handlers:r}of(0,l.A)(Ln,this)[e])un(r,n.runtimeContext,n)(t);const n=(0,l.A)(Un,this).get(e);if(n)for(const e of n)e()}function Gn(e,t){const n=t.threshold??.1,r=new IntersectionObserver(((r,o)=>{r.forEach((r=>{r.isIntersecting&&r.intersectionRatio>=n&&(un(t.handlers,e.runtimeContext,e)(new CustomEvent("scroll.into.view")),o.disconnect())}))}),{threshold:n});r.observe(e.element);let o=(0,l.A)($n,this).get(e);o||(o=[],(0,l.A)($n,this).set(e,o)),o.push(r)}function Yn(e){let t=e;for(;null!==(n=t)&&void 0!==n&&n.sibling;){var n;t=t.sibling}return t}function Qn(e){return Jn(e,!1)}function Jn(e,t){let n,r=e;for(;r;){if(r.tag===On.BRICK&&!r.portal){if(t)return r;n=r}r=r.sibling}return n}function Xn(e){return Zn(e,!1)}function Zn(e,t){let n,r=e;for(;r;){if(r.tag===On.BRICK&&r.portal){if(t)return r;n=r}if(r.child)r=r.child;else if(r.sibling)r=r.sibling;else{var o;let e=r.return;for(;e&&!e.sibling;)e=e.return;r=null===(o=e)||void 0===o?void 0:o.sibling}}return n}function er(e,t){const n=new Set;let r=e;for(;r;)if(r.tag===On.BRICK&&n.add(r),r.child)r=r.child;else{if(r===t)break;if(r.sibling)r=r.sibling;else{var o;let e=r.return;for(;e&&e!==t&&!e.sibling;)e=e.return;if(e===t)break;r=null===(o=e)||void 0===o?void 0:o.sibling}}return n}const tr=new Map;function nr(e){return tr.get(e)}const rr=Symbol.for("root.runtimeContext");async function or(e,t,n){var r,o;const[i,s,a]=Jr({...e[rr]??fi(),data:t,pendingPermissionsPreCheck:[]});i.tplStateStoreMap??(i.tplStateStoreMap=new Map),i.formStateStoreMap??(i.formStateStoreMap=new Map);const c=new Wn("fragment"),l={tag:On.ROOT,createPortal:null},u=e.transform,d=Re();u&&Te(d,"`useBrick.transform`",'please use "properties" instead, check your useBrick:',e);const p=await Gr(l,d&&!n?e:{errorBoundary:n,...e,properties:{...e.properties,...u}},i,c,[],{}),f=[...s,...a];if(await Qr(p,i,f),(null===(r=p.node)||void 0===r?void 0:r.tag)===On.PLACEHOLDER)throw new Error("The root brick of useBrick cannot be an ignored control node");if(null!==(o=p.node)&&void 0!==o&&o.portal)throw new Error("The root brick of useBrick cannot be a portal brick");return l.child=p.node,{tagName:p.node?p.node.type:null,renderRoot:l,rendererContext:c,scopedStores:f}}function ir(e,t){let n,{renderRoot:r,rendererContext:o,scopedStores:i}=e;r.createPortal=()=>{const e=document.querySelector("#portal-mount-point");return n=document.createElement("div"),e.appendChild(n),n},_n(r,t),o.dispatchOnMount(),o.initializeScrollIntoView(),o.initializeMediaChange(),o.initializeMessageDispatcher();for(const e of i)e.mountAsyncData();return{portal:n}}function sr(e,t){let{rendererContext:n}=e;t.portal&&(Pn(t.portal),t.portal.remove()),n.dispatchOnUnmount(),n.dispose()}function ar(e,t,n){if(n)throw new Error("Legacy doTransform does not support options in v3");return gt(t,{...fi(),data:e},{noInject:!0})}function cr(e,t){const n=hi(e);Object.assign(n,{...t,meta:{...n.meta,...t.meta},$$fulfilling:null,$$fulfilled:!0,$$registerCustomTemplateProcessed:!1}),B(n)}function lr(e,t){const n=hi(e);let r=!1;const o=e=>`${e.path}.${e.exact}`,i=(e,n)=>e.map((e=>{const s=o(e);return"routes"===e.type?(e.routes=i(e.routes,n),e):s===n?(r=!0,t):e}));n.routes=i(n.routes,o(t)),r||n.routes.unshift(t)}function ur(e,t,n){const r=`${e}.${t.name}`;_e.define(r,{bricks:t.bricks,proxy:t.proxy,state:t.state}),dr(e,t.name,n)}function dr(e,t,n){mr(e,`\${APP.homepage}/_dev_only_/template-preview/${t}`,[{brick:t,...(0,g.pick)(n,"properties","events","lifeCycle","context","slots","children")}])}function pr(e){return`\${APP.homepage}/_dev_only_/snippet-preview/${e}`}function fr(e,t){var n;mr(e,pr(t.snippetId),null!==(n=t.bricks)&&void 0!==n&&n.length?t.bricks:[{brick:"span"}],t.context)}const hr=fr;function mr(e,t,n,r){const{routes:o}=hi(e),i=o.findIndex((e=>e.path===t)),s={path:t,bricks:n,context:r,menu:!1,exact:!0};-1===i?o.unshift(s):o.splice(i,1,s)}function gr(e,t){let{tplStateStoreId:n}=t;const r=fi();return n?Me({...r,tplStateStoreId:n},"STATE").getValue(e):r.ctxStore.getValue(e)}function vr(e){let{tplStateStoreId:t}=e;const n=fi();return t?Me({...n,tplStateStoreId:t},"STATE").getAllValues():n.ctxStore.getAllValues()}function yr(e){return di().find((t=>t.id?t.id===e:t.filePath.startsWith(`${e}/`)))}function wr(e){return(0,d.loadBricksImperatively)(e,di())}function br(e,t){return(0,d.loadEditorsImperatively)(e,t??di())}function Er(){return pi()}async function Sr(e,t){let{appId:n,updateStoryboardType:r,collectUsedContracts:o}=t;const i=hi(n);let s;if("route"===r)s={routes:[e]};else if("template"===r)s={meta:{customTemplates:[e]}};else if("snippet"===r){var a;const t=pr(e.snippetId);s={routes:[null==i||null===(a=i.routes)||void 0===a?void 0:a.find((e=>e.path===t))]}}const c=[];return s&&o&&(await o(s)).forEach((e=>{var t;const[n,r,o]=e.match(/(.*)@(.*):\d\.\d\.\d/);null!=i&&null!==(t=i.meta)&&void 0!==t&&null!==(t=t.contracts)&&void 0!==t&&t.some((e=>e.namespaceId===r&&e.name===o))||c.push(e)})),c}async function Ar(e,t){let{tplStateStoreId:n,routeId:r}=t;const o={...fi(),tplStateStoreId:n,match:nr(r)};return e.resolve?tt(e.resolve,o,{cache:"reload"}):mt(e.value,o)}function kr(e){const t=fi();return{app:(null==t?void 0:t.overrideApp)??(null==t?void 0:t.app),location:(0,g.pick)(location,["href","origin","hostname","host"]),...(0,g.pick)(t,["query","sys"]),match:nr(null==e?void 0:e.routeId)}}let Ir;const Cr=[];function Rr(e){Ir=e;const t=vr({tplStateStoreId:e.tplStateStoreId});Or({changeType:"initialize",tplStateStoreId:e.tplStateStoreId,detail:{data:t}})}function Tr(e){Cr.push(e)}function Or(e){setTimeout((()=>{for(const t of Cr)try{t(e)}catch(t){console.error(`RealTimeDataInspectHook failed (${e.changeType}):`,t)}}))}const Pr=["onBeforePageLoad","onPageLoad","onBeforePageLeave","onPageLeave","onAnchorLoad","onAnchorUnload"];class _r{constructor(e,t,n,r){(0,i.A)(this,"type",void 0),(0,i.A)(this,"data",new Map),(0,i.A)(this,"changeEventType",void 0),(0,i.A)(this,"pendingStack",[]),(0,i.A)(this,"hostBrick",void 0),(0,i.A)(this,"stateStoreId",void 0),(0,i.A)(this,"batchUpdate",!1),(0,i.A)(this,"batchUpdateContextsNames",[]),(0,i.A)(this,"rendererContext",void 0),(0,i.A)(this,"routeMap",new WeakMap),this.type=e,this.changeEventType="FORM_STATE"===this.type?"formstate.change":"STATE"===this.type?"state.change":"context.change",this.hostBrick=t,this.rendererContext=n,this.stateStoreId=r}getAllValues(){return Object.fromEntries([...this.data.entries()].map((e=>{let[t,{value:n}]=e;return[t,n]})))}getValue(e){var t;return null===(t=this.data.get(e))||void 0===t?void 0:t.value}notifyRealTimeDataChange(e,t){if(Ir){const{tplStateStoreId:n}=Ir;(n?"STATE"===this.type&&this.stateStoreId===n:"CTX"===this.type)&&Or({changeType:"update",tplStateStoreId:n,detail:{name:e,value:t}})}}getAffectListByContext(e){const t=[e];return this.data.forEach(((e,n)=>{e.deps&&e.deps.some((e=>t.includes(e)))&&t.push(n)&&t.push(...this.getAffectListByContext(n))})),t.shift(),[...new Set(t)]}updateValues(e,t,n){if(this.batchUpdate=!0,this.batchUpdateContextsNames=e.map((e=>e.name)),[...new Set(this.batchUpdateContextsNames)].length!==this.batchUpdateContextsNames.length)throw new Error("Batch update not allow to update same item");const r={},o={},i=[];e.forEach((e=>{const{name:o,value:s}=n([e]),a=this.data.get(o);i.push(...this.getAffectListByContext(o)),a&&(r[o]=a),this.updateValue(o,s,t)})),i.filter((e=>!r[e])).forEach((e=>{const t=this.data.get(e);t&&(o[e]=t)}));const s=e=>{for(const n in e){var t;const r=e[n];null===(t=r.eventTarget)||void 0===t||t.dispatchEvent(new CustomEvent(this.changeEventType,{detail:r.value}))}};s(r),s(o),this.batchUpdate=!1}updateValue(e,t,n,r,o){const i=this.data.get(e);if(!i)throw new Error(`${this.type} '${e}' is not defined`);if("refresh"!==n&&"load"!==n)"replace"===n?i.value=t:(0,p.isObject)(i.value)?Object.assign(i.value,t):(console.warn(`Non-object current value of "${this.type}.${e}" for "context.assign", try "context.replace" instead.`),i.value=t),this.batchUpdate||i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}));else{if(!i.useResolve)throw new Error(`You can not ${n} "${this.type}.${e}" which is not using resolve`);let s;"load"===n&&(i.loaded?s=Promise.resolve(i.value):i.loading&&(s=i.loading));const a=e=>{var t;let n;return"FlowApiNotFoundError"===(null==e?void 0:e.name)&&!!(n=null===(t=this.rendererContext)||void 0===t?void 0:t.renderId)&&n!==pi()};if(s||(s=i.loading=i.load({cache:"load"===n?"default":"reload",...t}),s.then((e=>{this.finishLoad(i,e)}),(e=>{!i.useResolve||a(e)||null!=r&&r.error||nn(e)}))),r){const e=In(r,o);s.then((t=>{e("success")({value:t}),e("finally")()}),(t=>{!a(t)&&r.error&&e("error")(t),e("finally")()}))}}}finishLoad(e,t){e.useResolve&&(e.loaded=!0,e.value=t,e.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:t})))}define(e,t,n,r){if(Array.isArray(e)&&e.length>0){const o=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"CTX";const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CTX",n=arguments.length>2?arguments[2]:void 0;const r=new Map;for(const o of e){const e=[o.if,o.value,o.resolve],i=(0,O.collectMemberUsage)(e,t);if(!n&&"STATE"===t){const t=(0,O.collectMemberUsage)(e,"TPL");for(const e of t.usedProperties)i.usedProperties.add(e);t.hasNonStaticUsage&&(i.hasNonStaticUsage=!0)}r.set(o,i)}return r}(e,n,arguments.length>3?arguments[3]:void 0),o=new Map;for(const e of Array.from(r.keys()).map((e=>e.name)))o.set(e,(o.get(e)??0)+1);const i=Array.from(r.values()).some((e=>e.hasNonStaticUsage)),s=new WeakSet,a=new Map,c=new Map([...new Set(e.map((e=>e.name)))].map((e=>[e,new Promise(((t,n)=>{a.set(e,{resolve:t,reject:n})}))]))),l=async e=>{s.add(e);const n=await t(e);r.delete(e);const i=o.get(e.name)??0;if(n){if(a.get(e.name).resolve(),o.delete(e.name),0===i)throw new Error(`Duplicated context defined: ${e.name}`)}else 1===i?(a.get(e.name).resolve(),o.delete(e.name)):o.set(e.name,i-1);await d()};let u=i;async function d(){const e=Array.from(r.entries()).filter(function(e,t){return(n,r)=>t?0===r:![...n[1].usedProperties].some((t=>e.has(t)))}(o,u)).map((e=>e[0])).filter((e=>!s.has(e)));await Promise.all(e.map(l))}return{pendingResult:d().then((async()=>{r.size>0&&(function(e,t){const n=new Map(e),r=new Set(Array.from(n.keys()).map((e=>e.name))),o=()=>{let e=!1;for(const[t,o]of n.entries())[...o.usedProperties].some((e=>r.has(e)))||(n.delete(t),r.delete(t.name),e=!0);e&&o()};if(o(),n.size>0)throw new ReferenceError(`Circular ${t} detected: ${Array.from(n.keys()).map((e=>e.name)).join(", ")}`)}(r,n),u=!0,await d());for(const e of a.values())e.resolve()})).catch((e=>{for(const t of a.values())t.reject(e);throw e})),pendingContexts:c}}(e,(e=>this.resolve(e,t,n,r)),this.type,Re(t));this.pendingStack.push(o)}}onChange(e,t){var n;null===(n=this.data.get(e))||void 0===n||n.eventTarget.addEventListener(this.changeEventType,t)}async waitFor(e){for(const{pendingContexts:t}of this.pendingStack)await Promise.all([...e].map((e=>t.get(e))))}async waitForAll(){for(const{pendingContexts:e}of this.pendingStack)for(const t of e.values())t.catch((()=>{}));for(const{pendingResult:e}of this.pendingStack)await e}mountAsyncData(e){this.data.forEach((t=>{var n;if(t.async&&(!e||null!==(n=this.routeMap.get(e))&&void 0!==n&&n.has(t.name))){if(t.asyncMounted)return void console.error(`Async data "${t.name}" already mounted. This is a bug of Brick Next, please report it.`);t.asyncMounted=!0,t.loading.then((e=>{this.finishLoad(t,e)}))}}))}async resolve(e,t,n,r){if(!await wt(e,t))return!1;let o,i,s,a,c,l;if(n&&("STATE"===this.type?e.expose:"FORM_STATE"===this.type)&&(o=await kt(n,e.name)),void 0===o){if(e.resolve){const n=(0,p.hasOwnProperty)(e,"value");c=e.track&&n&&(0,p.hasOwnProperty)(e.resolve,"if")&&(0,O.strictCollectMemberUsage)(e.resolve.if,this.type).size>0;const r={transform:"value",...e.resolve};if(a=await wt(e.resolve,t),(a||c)&&(i=async e=>{var n;return(await tt(r,t,{...e,renderId:null===(n=this.rendererContext)||void 0===n?void 0:n.renderId})).value}),a)l=e.resolve.async?"async":e.resolve.lazy?"lazy":"eager","eager"===l?o=await i():"async"===l&&(s=i());else if(!n)return!1}a&&"eager"===l||void 0===e.value||(o=await mt(e.value,t))}if(this.data.has(e.name))throw new Error(`${this.type} '${e.name}' has already been declared`);const u={name:e.name,value:o,eventTarget:new ye,useResolve:a,load:i,loaded:"eager"===l,loading:s,async:"async"===l,deps:[]};if("lazy"===l){const{trigger:t}=e.resolve;var d;t&&Pr.includes(t)&&(null===(d=this.rendererContext)||void 0===d||d.registerArbitraryLifeCycle(t,(()=>{this.updateValue(e.name,void 0,"load")})))}if(e.onChange&&u.eventTarget.addEventListener(this.changeEventType,un(e.onChange,t)),e.track){const n=(0,O.strictCollectMemberUsage)(c?[e.resolve,e.value]:i?e.resolve:e.value,this.type);!i&&(u.deps=[...n]);for(const r of n)this.onChange(r,this.batchAddListener((()=>{u.useResolve=c?bt(e.resolve,t):!!i,u.useResolve?this.updateValue(e.name,{cache:"default"},"refresh"):this.updateValue(e.name,gt(e.value,t),"replace")}),e))}if(u.eventTarget.addEventListener(this.changeEventType,(t=>{this.notifyRealTimeDataChange(e.name,t.detail)})),this.data.set(e.name,u),Array.isArray(r))for(const t of r){const n=this.routeMap.get(t);n?n.add(e.name):this.routeMap.set(t,new Set([e.name]))}return!0}disposeDataInRoutes(e){for(const t of e){const e=this.routeMap.get(t);if(void 0!==e)for(const t of e)this.data.delete(t)}}batchAddListener(e,t){return n=>{this.batchUpdate&&this.batchUpdateContextsNames.includes(t.name)||e(n)}}}function Mr(e,t,n){const{reversedProxies:r,asyncHostPropertyEntries:o,externalSlots:i,tplStateStoreId:s,hostBrick:a}=e;let c;if(t&&r){const e=r.properties.get(t);e&&(u=o,c=e.map((e=>{let{from:t,to:n}=e;const r=u.filter((e=>e[0]===t));if(r.length>0&&n.refProperty)return[n.refProperty,kt(r,t),!0]})).filter(Boolean));const s=r.slots.get(t);if(s&&i){const e=new Map;for(const{from:t,to:r}of s){var l;const o=(null===(l=i[t])||void 0===l?void 0:l.bricks)??[];if(!o.length)continue;const s=r.refSlot??t;let c=e.get(s);if(!c){c=[];const t=(0,p.hasOwnProperty)(n,s)?n[s].bricks.length+1:1;for(let e=0;e<t;e+=1)c.push([]);e.set(s,c)}const u=r.refPosition??-1,d=(0,p.hasOwnProperty)(a.runtimeContext,"forEachItem");c[(0,g.clamp)(u<0?c.length+u:u,0,c.length-1)].push(...d?xr(o,a.runtimeContext.forEachItem,a.runtimeContext.forEachIndex,a.runtimeContext.forEachSize):o)}for(const[t,r]of e.entries()){(0,p.hasOwnProperty)(n,t)||(n[t]={type:"bricks",bricks:[]});const e=n[t];e.bricks=r.flatMap(((t,n)=>n<e.bricks.length?t.concat(e.bricks[n]):t)),0===e.bricks.length&&delete n[t]}}}var u;return{[Nt]:c,[Ut]:s}}function xr(e,t,n,r){return e.map((e=>{let{children:o,slots:i,...s}=e;return{...s,[Ft]:t,[jt]:n,[Dt]:r,slots:":forEach"===s.brick?eo(o,i):Object.fromEntries(Object.entries(eo(o,i)??{}).map((e=>{let[o,i]=e;return[o,"routes"===i.type?{type:"routes",routes:Br(i.routes,t,n,r)}:{type:"bricks",bricks:xr(i.bricks,t,n,r)}]})))}}))}function Br(e,t,n,r){return e.map((e=>"routes"===e.type?{...e,routes:Br(e.routes,t,n,r)}:"redirect"===e.type?e:{...e,bricks:xr(e.bricks,t,n,r)}))}function Lr(e,t){function n(e){return(0,p.isObject)(e)&&"function"!=typeof e?Array.isArray(e)?e.map(n):Object.fromEntries(Object.entries(e).map((e=>{let[t,o]=e;return(0,p.isObject)(o)&&"useBrick"===t?Array.isArray(o)?[t,o.map(r)]:[t,r(o)]:[t,n(o)]})).concat(Object.getOwnPropertySymbols(e).map((t=>[t,e[t]])))):e}function r(e){const{properties:o,slots:i,children:s,...a}=e,c=eo(s,i),l=Object.fromEntries(Object.entries(c??{}).map((e=>{let[t,n]=e;return[t,{type:"bricks",bricks:(n.bricks??[]).map(r)}]})));return{...a,properties:n(o),slots:l,...Mr(t,a.ref,l)}}return n(e)}function $r(e,t,n,r,o){var i;const s=(0,g.uniqueId)("tpl-state-"),a={...n.runtimeContext,tplStateStoreId:s};delete a.forEachItem,delete a.forEachIndex,delete a.forEachSize,delete a.formStateStoreId;const c=new _r("STATE",n,o,s);a.tplStateStoreMap.set(s,c),a.tplStateStoreScope&&a.tplStateStoreScope.push(c);const{bricks:l,proxy:u,state:d,contracts:p}=_e.get(e);null==ri||null===(i=ri.flowApi)||void 0===i||i.collectWidgetContract(p),c.define(d,a,r);const{slots:f,children:h,...m}=t,v={...m,brick:e};n.tplHostMetadata={internalBricksByRef:new Map,tplStateStoreId:s,proxy:u};const y={properties:new Map,slots:new Map};if(null!=u&&u.properties)for(const[e,t]of Object.entries(u.properties)){let n=y.properties.get(t.ref);n||(n=[],y.properties.set(t.ref,n)),n.push({from:e,to:t})}if(null!=u&&u.slots)for(const[e,t]of Object.entries(u.slots)){let n=y.slots.get(t.ref);n||(n=[],y.slots.set(t.ref,n)),n.push({from:e,to:t})}const w={reversedProxies:y,asyncHostPropertyEntries:r,externalSlots:eo(h,f),tplStateStoreId:s,hostBrick:n};return v.slots={"":{type:"bricks",bricks:l.map((e=>Nr(e,w)))}},v}function Nr(e,t){null===e.if&&delete e.if;const{properties:n,slots:r,children:o,...i}=e,s=eo(o,r),a=Object.fromEntries(Object.entries(s??{}).map((e=>{let[n,r]=e;return[n,{type:"bricks",bricks:(r.bricks??[]).map((e=>Nr(e,t)))}]})));return{...i,properties:Lr(n,t),slots:a,...Mr(t,i.ref,a)}}const Ur="form-renderer.form-renderer",Fr=Symbol.for("form.stateStoreId"),jr=["forms.general-form","form.general-form","eo-form"];function Dr(e,t,n){const{id:r,bricks:o,events:i,context:s,mountPoint:a,instanceId:c}=e;let{brick:l,properties:u}=e;const d=t.find((e=>e.fieldId===r));if(d){const e=function(e){let t;const n={id:e.fieldId,name:e.fieldId,label:e.name,dataset:{testid:e.fieldId}},r=()=>{var t,n;return{readOnly:null===(t=e.limit)||void 0===t?void 0:t.includes("READONLY"),required:null===(n=e.limit)||void 0===n?void 0:n.includes("REQUIRED")}};switch(e.fieldType){case"INT":t={brick:"forms.general-input-number",properties:{...n,...r(),placeholder:e.description,precision:0,inputBoxStyle:{width:"100%"}}};break;case"BOOLEAN":t={brick:"forms.general-switch",properties:{...n,...r()}};break;case"FLOAT":t={brick:"forms.general-input-number",properties:{...n,...r(),placeholder:e.description,inputBoxStyle:{width:"100%"}}};break;case"ENUM":t={brick:"forms.general-select",properties:{...n,...r(),options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}}};break;case"ENUMS":t={brick:"forms.general-select",properties:{...n,...r(),mode:"multiple",options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}}};break;case"DATE":case"TIME":t={brick:"forms.general-date-picker",properties:{...n,...r(),placeholder:e.description}};break;case"IP":t={brick:"forms.general-input",properties:{...n,...r(),placeholder:e.description,pattern:"((^s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))s*$)|(^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*$))",message:{pattern:"输入字符不匹配IP格式"}}};break;case"JSON":t={brick:"forms.general-textarea",properties:{...n}};break;case"ARRAY":t={brick:"forms.general-select",properties:{...n}};break;case"STRUCTURE":case"STRUCTURE_ARRAY":t={brick:"forms.cmdb-instance-select-panel",properties:{...n,...r()}};break;default:t={brick:"forms.general-input",properties:{...n,...r(),placeholder:e.description}}}return t}(d);l||(l=e.brick),u={...e.properties,...u}}const f={brick:l,properties:u,iid:c,slot:a,events:i,context:s,children:Kr(o,t,n),[Fr]:n};return(0,p.hasOwnProperty)(e,"if")&&(f.if=e.if),f}function Kr(e,t,n){if(Array.isArray(e))return e.map((e=>Dr(e,t,n)))}var Vr=new WeakSet;class Wr extends HTMLElement{constructor(){super(...arguments),(0,o.A)(this,Vr),(0,i.A)(this,"renderRoot",void 0)}get $$typeof(){return"formRenderer"}validate(){(0,a.A)(Vr,this,zr).call(this,"validate")}setInitValue(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];(0,a.A)(Vr,this,zr).call(this,"setInitValue",t)}resetFields(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];(0,a.A)(Vr,this,zr).call(this,"resetFields",t)}}function zr(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const o=!1!==this.renderRoot?null===(t=this.firstElementChild)||void 0===t?void 0:t.firstElementChild:this.firstElementChild,i=null==o||null===(n=o.tagName)||void 0===n?void 0:n.toLowerCase();jr.includes(i)?o[e](...r):console.error(`no ${e} method in the container element`,{container:i})}async function Hr(e,t,n,r,o,i,s,a){const c=await async function(e,t){for(const n of e){if("string"!=typeof n.path)throw console.error("Invalid route with invalid path:",n),new Error("Invalid route with invalid type of path: "+typeof n.path);const e=$t(n,t.app.homepage,t.location.pathname);if(e&&await wt(n,t))return t.app.noAuthGuard||n.public||null==ri||!ri.auth||ri.auth.isLoggedIn()?{match:e,route:n}:"unauthenticated"}return"missed"}(t,n),l={blockingList:[]},u=l.menuRequestNode={return:i};switch(c){case"missed":break;case"unauthenticated":l.unauthenticated=!0;break;default:{var p;const i=l.route=c.route;l.path=c.match.path;const m={...n,match:c.match};i.iid&&(f=i.iid,h=c.match,tr.set(f,h)),a&&m.ctxStore.disposeDataInRoutes(t);const g=o.concat(i);m.ctxStore.define(i.context,m,void 0,g),m.pendingPermissionsPreCheck.push(null==ri||null===(p=ri.checkPermissions)||void 0===p?void 0:p.preCheckPermissionsForBrickOrRoute(i,(e=>mt(e,m))));const{preLoadBricks:v}=i;if(Array.isArray(v)&&l.blockingList.push((0,d.loadBricksImperatively)(v,di())),"redirect"===i.type){let e;if(e="string"==typeof i.redirect?await mt(i.redirect,m):(await tt({transform:"redirect",...i.redirect},m)).redirect,"string"!=typeof e)throw console.error("Unexpected redirect result:",e),new Error("Unexpected type of redirect result: "+typeof e);l.redirect={path:e}}else{const n=function(e,t){if(e){if("brick"===e.type)throw console.error("Set menu with brick is dropped in v3:",e),new Error("Set menu with brick is dropped in v3");if("resolve"!==e.type)return mt(e,t);console.warn("Set menu with resolve is not supported in v3 yet:",e)}}(i.menu,m);let o;n&&(u.request=n),a||r.memoizeMenuRequestNode(t,u),o="routes"===i.type?await Hr(e,i.routes,m,r,g,u,s):await qr(e,i.bricks,m,r,g,u,s),Xr(l,o),Zr(u,o.menuRequestNode)}}}var f,h;return l}async function qr(e,t,n,r,o,i,s,a,c){!function(e,t,n){function r(e){if((0,p.isObject)(e)&&"function"!=typeof e)if(Array.isArray(e))e.map(r);else for(const[t,n]of Object.entries(e))(0,p.isObject)(n)&&"useBrick"===t?Array.isArray(n)?n.forEach((e=>o(e,!0))):o(n,!0,!0):r(n)}function o(e,i,s){if(i&&(e[rr]=t),r(e.properties),n&&!s)return;const a=eo(e.children,e.slots);for(const e of Object.values(a??{}))for(const t of e.bricks??[])o(t,i)}for(const t of e)o(t)}(t,n,!0);const l={blockingList:[]},u=c??[];return(await Promise.all(t.map(((t,c)=>Gr(e,t,n,r,o,i,s,u.concat(c),a&&new Map(a)))))).forEach(((t,n)=>{t.hasTrackingControls&&r.memoize(s,u.concat(n),t.node,e),Xr(l,t)})),l}async function Gr(e,t,n,r,o,i,s){let a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:new Map;try{return await async function(e,t,n,r,o,i,s,a,c){var l,u;const f={blockingList:[]};if(!t.brick)return t.template?console.error("Legacy templates are dropped in v3:",t):console.error("Invalid brick:",t),f;const{if:h,permissionsPreCheck:m,...v}=t;if(function(e){return"string"==typeof e?(0,T.isTrackAll)(e):it(e)&&(0,T.isTrackAll)(st(e))}(h))return Gr(e,{brick:":if",dataSource:h,permissionsPreCheck:m,slots:{"":{type:"bricks",bricks:[v]}},...Object.getOwnPropertySymbols(t).reduce(((e,n)=>({...e,[n]:t[n]})),{})},n,r,o,i,s,a,c);const w=t[Ut],b=t[Fr],E={...n,tplStateStoreId:w,formStateStoreId:b};(0,p.hasOwnProperty)(t,Ft)&&(E.forEachItem=t[Ft],E.forEachIndex=t[jt],E.forEachSize=t[Dt]);const{context:S}=t;if(Array.isArray(S)&&S.length>0){const e=Re(E);Te(e,"Defining context on bricks","check your brick:",t),e||E.ctxStore.define(S,E)}if(E.pendingPermissionsPreCheck.push(null==ri||null===(l=ri.checkPermissions)||void 0===l?void 0:l.preCheckPermissionsForBrickOrRoute(t,(e=>mt(e,E)))),!await async function(e,t){return(0,p.isObject)(e.if)&&!it(e.if)?Et(await tt(e.if,t)):wt(e,t)}(t,E))return f;const A=t.brick;if(A.startsWith(":")){!function(e){if(":forEach"!==e&&":if"!==e&&":switch"!==e)throw new Error(`Unknown storyboard control node: "${e}"`)}(A);const{dataSource:n}=t,l=async l=>{var u;const d=await mt(n,l),f=":forEach"===A?"":":switch"===A?String(d):d?"":"else",h=eo(t.children,t.slots),m=h&&(0,p.hasOwnProperty)(h,f)&&(null===(u=h[f])||void 0===u?void 0:u.bricks);if(!Array.isArray(m))return{blockingList:[]};switch(A){case":forEach":return Array.isArray(d)?async function(e,t,n,r,o,i,s,a,c,l){const u={blockingList:[]},d=t.length,p=await Promise.all(t.map(((t,u)=>Promise.all(n.map(((n,p)=>Gr(e,n,{...r,forEachItem:t,forEachIndex:u,forEachSize:d},o,i,s,a,l.concat(u*d+p),c&&new Map(c))))))));return p.flat().forEach(((t,n)=>{t.hasTrackingControls&&o.memoize(a,l.concat(n),t.node,e),Xr(u,t)})),u}(e,d,m,l,r,o,i,s,c,a):{blockingList:[]};case":if":case":switch":return qr(e,m,l,r,o,i,s,c,a)}},u=async t=>{const n=await l(t);return n.node??(n.node={tag:On.PLACEHOLDER,return:e}),n},d=await u(E),{onMount:f,onUnmount:h}=t.lifeCycle??{},{contextNames:m,stateNames:v}=At(n);if(m||v){d.hasTrackingControls=!0;let t=0;const o=async()=>{const n=++t,[o,i,c]=Jr(E),l=await u(o),d=[...i,...c];if(await Qr(l,o,d),t===n){h&&un(h,E)(new CustomEvent("unmount",{detail:{rerender:!0}})),r.reRender(s,a,l.node,e),f&&un(f,o)(new CustomEvent("mount",{detail:{rerender:!0}}));for(const e of d)e.mountAsyncData()}},i=(0,g.debounce)(o);if(m)for(const e of m)E.ctxStore.onChange(e,i);if(v)for(const e of v)Me(E,"STATE",`: "${n}"`).onChange(e,i)}return f&&r.registerArbitraryLifeCycle("onMount",(()=>{un(f,E)(new CustomEvent("mount",{detail:{rerender:!1}}))})),h&&r.registerArbitraryLifeCycle("onUnmount",(()=>{un(h,E)(new CustomEvent("unmount",{detail:{rerender:!1}}))})),d}/\.tpl-/.test(A)&&!_e.get(A)&&await to((0,d.loadBricksImperatively)([A],di()),"brick",A,r.unknownBricks);const k=function(e,t){if(!e.includes(".")&&e.startsWith("tpl-")&&t){const n=`${t}.${e}`;if(_e.get(n))return n}return!!_e.get(e)&&e}(A,null===(u=E.app)||void 0===u?void 0:u.id);if(k){const e=c.get(k)??0;if(e>=10)throw new Error(`Maximum custom template stack overflowed: "${k}"`);c.set(k,e+1)}else A.includes("-")&&!customElements.get(A)&&(A===Ur?customElements.get(Ur)||customElements.define(Ur,Wr):f.blockingList.push(to((0,d.enqueueStableLoadBricks)([A],di()),"brick",A,r.unknownBricks)));let I,C;var R;A===Ur?(({formData:I,...C}=t.properties??{}),null!==(R=t.properties)&&void 0!==R&&R.compute&&(I=await mt(I,E))):C=t.properties;const P=[],_=function(e,t,n){return(0,p.isObject)(e)?Object.entries(e).map((e=>{let[r,o]=e;const{contextNames:i,stateNames:s,formStateNames:a}=At(o);return(i||s||a)&&n.push({contextNames:i,stateNames:s,formStateNames:a,propName:r,propValue:o}),[r,mt(o,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===r?pt.USE_BRICK:pt.INITIAL})]})):[]}(C,E,P),M=t[Nt];M&&_.push(...M);const x="script"===A;if(x||"link"===A){const e=await It(_);if(x?e.src:"stylesheet"===e.rel&&e.href){const t=window.PUBLIC_ROOT??"";if(x){const{src:n,...r}=e;await to((0,d.loadScript)(n,t,r),"script",n,"silent")}else{const{href:n,...r}=e;await to((0,d.loadStyle)(n,t,r),"stylesheet",n,"silent")}return f}}const B={tag:On.BRICK,type:k||A,return:e,slotId:s,events:t.events,runtimeContext:E,portal:t.portal,iid:t.iid,ref:t.ref};f.node=B;const L=(0,O.strictCollectMemberUsage)([t.events,t.lifeCycle],"PROCESSORS",2);L.size>0&&f.blockingList.push(to((0,d.loadProcessorsImperatively)(L,di()),"processors",[...L].join(", "),r.unknownBricks));const $=[];$.push((async()=>{B.properties=await It(_),function(e,t){for(const n of t){const t=()=>{e.element&&Rt(e.element,{[n.propName]:n.propValue},e.runtimeContext)};if(n.contextNames)for(const r of n.contextNames)e.runtimeContext.ctxStore.onChange(r,t);if(n.stateNames){const r=Me(e.runtimeContext,"STATE",`: "${n.propValue}"`);for(const e of n.stateNames)r.onChange(e,t)}if(n.formStateNames){const r=Ge(e.runtimeContext,"FORM_STATE",`: "${n.propValue}"`);for(const e of n.formStateNames)r.onChange(e,t)}}}(B,P)})()),r.registerBrickLifeCycle(B,t.lifeCycle);let N,U=t;k?U=$r(k,t,B,_,r):A===Ur&&(U=function(e,t,n,r,o){var i;const s="string"==typeof e?JSON.parse(e):e,a=(0,g.uniqueId)("form-state-"),c={...n.runtimeContext,formStateStoreId:a};delete c.forEachItem,delete c.forEachIndex,delete c.forEachSize,delete c.tplStateStoreId;const l=new _r("FORM_STATE",void 0,o,a);c.formStateStoreMap.set(a,l),c.formStateStoreScope&&c.formStateStoreScope.push(l);const u=s.context??[];u.some((e=>"params"===e.name))||u.push({name:"params"}),l.define(u,c,r);const d=Dr(s.formSchema,s.fields,a);return jr.includes(d.brick)&&t.events&&(d.events=function(e,t){const n=e??{};for(const[e,r]of Object.entries(t))n[e]=(0,p.hasOwnProperty)(n,e)?[n[e],r].flat():r;return n}(d.events,t.events)),"boolean"!=typeof(null===(i=t.properties)||void 0===i?void 0:i.renderRoot)||t.properties.renderRoot?{...t,slots:void 0,children:[{brick:"eo-micro-view",properties:{style:{padding:"12px"}},children:[d]}]}:{...t,slots:void 0,children:[d]}}(I,t,B,_,r)),U.portal&&(B.slotId=void 0),k?(N={...E},delete N.forEachItem,delete N.forEachIndex,delete N.forEachSize):N=E;return $.push((async()=>{const e=eo(U.children,U.slots);if(!e)return;const t=new Map,n=await Promise.all(Object.entries(e).map(((e,n)=>{let[s,a]=e;if("routes"!==a.type)return qr(B,a.bricks,N,r,o,i,s,c);const l=o[o.length-1];return null!=l&&l.incrementalSubRoutes&&(t.set(n,s),r.performIncrementalRender(a,o,(async(e,t)=>{const{homepage:n}=N.app,{pathname:c}=e;if(!y(n,c)||!o.every((e=>{let r,o;return(r=$t(e,n,t.pathname))&&(o=$t(e,n,c))&&(e!==l||(0,g.isEqual)(r.params,o.params))})))return!1;const[u,d,p]=Jr({...N,location:e,query:new URLSearchParams(e.search)});let f,h=!1,m=[];try{if(f=await Hr(B,a.routes,u,r,o,i,s,!0),f.route){if(r.reBailout(f))return!0;m=[...d,...p],await Qr(f,u,[u.ctxStore,...m])}await r.reMergeMenuRequestNodes(i,a.routes,f.menuRequestNode)}catch(e){console.error("Incremental sub-router failed:",e);const t=r.reCatch(e,B);if(!t)return!0;({failed:h,output:f}=t),await r.reMergeMenuRequestNodes(i,a.routes,f.menuRequestNode)}if(r.reRender(s,[],f.node,B),!h){u.ctxStore.mountAsyncData(f.route);for(const e of m)e.mountAsyncData()}return!!f.route||null}))),Hr(B,a.routes,N,r,o,i,s)}))),s={...f,node:void 0,blockingList:[],menuRequestNode:void 0};n.forEach(((e,n)=>{t.has(n)&&r.memoize(t.get(n),[],e.node,B),Xr(s,e),function(e,t){const n=t.menuRequestNode;if(n)if(e.menuRequestNode){let t=e.menuRequestNode;for(;t.sibling;)t=t.sibling;t.sibling=n}else e.menuRequestNode=n}(s,e)})),s.node&&(B.child=s.node),Xr(f,{...s,node:void 0}),Zr(i,f.menuRequestNode=s.menuRequestNode)})()),await Promise.all($),f}(e,t,n,r,o,i,s,a,c)}catch(n){if(t.errorBoundary)return console.error("Error caught by error boundary:",n),{node:{tag:On.BRICK,type:"div",properties:{textContent:Jt(n),dataset:{errorBoundary:""},style:{color:"var(--color-error)"}},runtimeContext:null,return:e},blockingList:[]};throw n}}function Yr(e){return[e.ctxStore,...e.tplStateStoreMap.values(),...e.formStateStoreMap.values()]}function Qr(e,t,n){return(0,d.flushStableLoadBricks)(),Promise.all([...e.blockingList,...n.map((e=>e.waitForAll())),...t.pendingPermissionsPreCheck])}function Jr(e){const t=[],n=[];return[{...e,tplStateStoreScope:t,formStateStoreScope:n},t,n]}function Xr(e,t){const{blockingList:n,node:r,menuRequestNode:o,hasTrackingControls:i,...s}=t;if(e.blockingList.push(...n),r)if(e.node){let t=e.node;for(;t.sibling;)t=t.sibling;t.sibling=r}else e.node=r;Object.assign(e,s)}function Zr(e,t){if(t)if(e.child){let n=e.child;for(;n.sibling;)n=n.sibling;n.sibling=t}else e.child=t}function eo(e,t){let n=t;if(Array.isArray(e)&&!n){n={};for(const t of e){const e=t.slot??"";(0,p.hasOwnProperty)(n,e)||(n[e]={type:"bricks",bricks:[]}),n[e].bricks.push(t)}}return n}function to(e,t,n,r){return"silent"===r?e.catch((e=>{console.error('Load %s "%s" failed:',t,n,e)})):e}let no,ro,oo;function io(){if(!no){if(no={isInIframe:!1,isInIframeOfSameSite:!1,isInIframeOfNext:!1,isInIframeOfVisualBuilder:!1,isInIframeOfLegacyConsole:!1},window!==window.parent){no.isInIframe=!0;try{if(window.origin===window.parent.origin){no.isInIframeOfSameSite=!0;const e="/next/"===m(),t=window.parent.location.pathname,n=t.startsWith("/next/");no.isInIframeOfNext=0==(Number(e)^Number(n)),no.isInIframeOfVisualBuilder=t.startsWith((n?"/next":"")+"/visual-builder/"),no.isInIframeOfLegacyConsole=e&&!n}}catch(e){}}Object.freeze(no)}return no}function so(e){var t;if(e.$$registerCustomTemplateProcessed)return;e.$$registerCustomTemplateProcessed=!0;const n=null===(t=e.meta)||void 0===t?void 0:t.customTemplates;if(Array.isArray(n))for(const t of n){const n=t.name.includes(".")?t.name:`${e.app.id}.${t.name}`;_e.define(n,t)}}function ao(e){let t;t="8.2"===e?"v8-2":"v8",document.documentElement.dataset.ui=t}const co="basic.show-watermark";var lo=new WeakMap,uo=new WeakMap,po=new WeakMap,fo=new WeakMap,ho=new WeakMap,mo=new WeakMap,go=new WeakMap,vo=new WeakMap,yo=new WeakMap,wo=new WeakMap,bo=new WeakMap,Eo=new WeakMap,So=new WeakSet;class Ao{constructor(e){(0,o.A)(this,So),(0,s.A)(this,lo,void 0),(0,s.A)(this,uo,!1),(0,s.A)(this,po,void 0),(0,s.A)(this,fo,void 0),(0,s.A)(this,ho,void 0),(0,s.A)(this,mo,void 0),(0,s.A)(this,go,new Set),(0,s.A)(this,vo,0),(0,s.A)(this,yo,void 0),(0,s.A)(this,wo,void 0),(0,s.A)(this,bo,void 0),(0,s.A)(this,Eo,void 0),(0,c.A)(lo,this,e);const t=C();window.addEventListener("beforeunload",(e=>{(0,a.A)(So,this,ko).call(this,{})?(e.preventDefault(),e.returnValue=""):delete e.returnValue})),t.block(((e,t)=>(0,a.A)(So,this,ko).call(this,{location:e,action:t})))}getRenderId(){return(0,l.A)(yo,this)}getRuntimeContext(){return(0,l.A)(ho,this)}getRecentApps(){return{currentApp:(0,l.A)(wo,this),previousApp:(0,l.A)(bo,this)}}getNavConfig(){return(0,l.A)(Eo,this)}bootstrap(){window.AbortController&&(ro=new AbortController,R.http.interceptors.request.use((e=>{var t;return{...e,options:{...e.options,signal:null!==(t=e.options)&&void 0!==t&&t.noAbortOnRouteChange?null:ro.signal}}})));const e=C();(0,c.A)(po,this,e.location);let t=0;return e.listen((async(e,n)=>{var r,o,i,s;const u=++t;let d;const p={hash:void 0,state:void 0};var f;if(void 0!==e.key&&("POP"!==n||void 0!==(0,l.A)(po,this).key&&!1!==(null===(r=(0,l.A)(po,this).state)||void 0===r?void 0:r.notify))||(p.key=void 0),((0,h.locationsAreEqual)({...(0,l.A)(po,this),...p},{...e,...p})||"POP"!==n&&!1===(null===(o=e.state)||void 0===o?void 0:o.notify))&&(d=!0),d||null!==(i=e.state)&&void 0!==i&&i.noIncremental||(d=await(null===(f=(0,l.A)(mo,this))||void 0===f?void 0:f.didPerformIncrementalRender(e,(0,l.A)(po,this)))),t===u)if(d)(0,c.A)(po,this,e);else{if(ro&&(ro.abort(),ro=new AbortController),(0,c.A)(po,this,e),null===(s=(0,l.A)(mo,this))||void 0===s||s.dispatchPageLeave(),"POP"===n&&w(v((0,l.A)(lo,this),e.pathname)))return void window.location.reload();(0,l.A)(uo,this)?(0,c.A)(fo,this,e):(V("locationChange"),(0,a.A)(So,this,Co).call(this,e).catch(nn))}})),(0,a.A)(So,this,Co).call(this,e.location)}}function ko(e){var t;const n=C(),r=n.getBlockMessage();null===(t=(0,l.A)(mo,this))||void 0===t||t.dispatchBeforePageLeave(e);const o=n.getBlockMessage();return!r&&o&&n.unblock(),o}function Io(e,t,n){var r,o;if((0,c.A)(vo,this,(r=(0,l.A)(vo,this),o=r++,r)),o>10){const t=`Infinite redirect detected: from "${n.pathname}${n.search}${n.hash}" to "${e}"`;throw new Error(t)}C().replace(e,t)}async function Co(e){(0,c.A)(uo,this,!0);try{await(0,a.A)(So,this,Ro).call(this,e)}finally{if((0,c.A)(uo,this,!1),(0,l.A)(fo,this)){const e=(0,l.A)(fo,this);(0,c.A)(fo,this,void 0),await(0,a.A)(So,this,Co).call(this,e)}}}async function Ro(e){var t,n,r,o;const i=(0,c.A)(yo,this,(0,g.uniqueId)("render-id-"));Je=new WeakSet,et.clear(),null==ri||null===(t=ri.flowApi)||void 0===t||t.clearCollectWidgetContract(),C().unblock();const s=null==ri||null===(n=ri.pageView)||void 0===n?void 0:n.create(),u=v((0,l.A)(lo,this),e.pathname),p=null===(r=(0,l.A)(ho,this))||void 0===r?void 0:r.app,f=null==u||null===(o=u.app)||void 0===o?void 0:o.id;window.BOOTSTRAP_UNION_FILE&&f&&f!==(null==p?void 0:p.id)&&function(e){const{appId:t,version:n}=e;window.APP_ROOT_TPL&&(window.APP_ID=t,window.APP_ROOT=window.APP_ROOT_TPL.replace("{id}",t).replace("{version}",n))}({appId:f,version:u.app.currentVersion}),null!=u&&u.app&&await async function(e){if(!e.$$fulfilled)return e.$$fulfilling||(e.$$fulfilling=async function(e){var t;await(null==ri||null===(t=ri.fulfilStoryboard)||void 0===t?void 0:t.call(ri,e)),B(e),Object.assign(e,{$$fulfilled:!0,$$fulfilling:null})}(e)),e.$$fulfilling}(u);const h=(0,c.A)(wo,this,null==u?void 0:u.app);!function(){var e,t,n,r,o;const i=ii().getFeatureFlags(),s=ii().getMiscSettings();if(!i["show-watermark"])return;const a="0.0.0"===(null===(e=window.APP_ROOT)||void 0===e||null===(e=e.match(/versions\/([^/]+)\//))||void 0===e?void 0:e[1])||"0.0.0"===(null===(t=window.APP_ROOT)||void 0===t||null===(t=t.match(/micro-apps\/(?:v2|v3)\/[^/]+\/([^/]+)/))||void 0===t?void 0:t[1]),c=(null==ri||null===(n=ri.auth)||void 0===n||null===(n=n.getAuth())||void 0===n?void 0:n.username)??"",l=s.watermarkConfig??{flags:{}},u={content:[..."string"==typeof l.content?[l.content]:l.content??[],null!==(r=l.flags)&&void 0!==r&&r["show-development"]&&a?"Development":"",null!==(o=l.flags)&&void 0!==o&&o["show-user"]?c:""].filter(Boolean),zIndex:1001,width:200,font:{fontSize:28},gap:[190,190],...(0,g.omit)(l,["content","flags"])};oo?oo.resolve(u):(0,d.loadBricksImperatively)([co],di()).then((()=>{oo=document.createElement(co),oo.resolve(u)}),(e=>{console.error("Load watermark service failed:",e)}))}();const m=p&&h?p.id!==h.id:p!==h;(0,T.clearExpressionASTCache)(),m&&(0,T.clearFunctionASTCache)();const y=ii().getFeatureFlags(),w=(0,l.A)(mo,this),b=(t,n)=>{null==s||s({status:"redirected"}),(0,l.A)(go,this).add(w),(0,a.A)(So,this,Io).call(this,t,n,e)},E=()=>{const t=y["sso-enabled"]?"/sso-auth/login":"/auth/login";Qt(e),b(t,{from:e})},S=document.querySelector("#main-mount-point"),A=document.querySelector("#portal-mount-point"),k={tag:On.ROOT,container:S,createPortal:A},I=()=>{var e;Pn(S),Pn(A),(0,l.A)(go,this).add(w);for(const e of(0,l.A)(go,this))e&&(e.dispatchOnUnmount(),e.dispose());(0,l.A)(go,this).clear(),null==ri||null===(e=ri.messageDispatcher)||void 0===e||e.reset(),m&&((0,c.A)(bo,this,p),window.dispatchEvent(new CustomEvent("app.change",{detail:{previousApp:p,currentApp:h}})))};if(X(h&&(re()[h.id]||h.theme)||"light"),ie("default"),h){var O,P,_,M,x,L;null==ri||null===(O=ri.checkInstalledApps)||void 0===O||O.preCheckInstalledApps(u,(e=>!!mi(e)));const t={bailout:e=>e.unauthenticated?(E(),!0):e.redirect?(b(e.redirect.path,e.redirect.state),!0):void(0,c.A)(vo,this,0),mergeMenus:async e=>{const t=await Promise.all(e);(0,c.A)(Eo,this,function(e){const t={breadcrumb:[]};for(const n of e){const{breadcrumb:e}=n;e&&(e.overwrite?t.breadcrumb=e.items:t.breadcrumb.push(...e.items))}return t}(t)),window.dispatchEvent(new CustomEvent("navConfig.change",{detail:(0,l.A)(Eo,this)}))},catch:(t,n)=>{if(!Xt(t)||window.NO_AUTH_GUARD){if(!(t instanceof R.HttpAbortError)){const r=ii().getMiscSettings().noAuthGuardLoginPath;return Xt(t)&&r?void b(r,{from:e}):{failed:!0,output:{node:{tag:On.BRICK,type:"div",properties:{textContent:Jt(t),dataset:{errorBoundary:""},style:{color:"var(--color-error)"}},runtimeContext:null,return:n},blockingList:[]}}}(0,l.A)(go,this).add(w)}else E()}},n=(0,c.A)(mo,this,new Wn("page",{routeHelper:t,renderId:i})),r=(0,c.A)(ho,this,{app:h,location:e,query:new URLSearchParams(e.search),flags:y,sys:{...null==ri||null===(P=ri.auth)||void 0===P?void 0:P.getAuth(),...io(),settings:{brand:ii().getBrandSettings()}},ctxStore:new _r("CTX",void 0,n),pendingPermissionsPreCheck:[null==ri||null===(_=ri.checkPermissions)||void 0===_?void 0:_.preCheckPermissions(u)],tplStateStoreMap:new Map,formStateStoreMap:new Map});(0,c.A)(Eo,this,void 0),so(u),me(null===(M=u.meta)||void 0===M?void 0:M.functions,h),null==ri||null===(x=ri.flowApi)||void 0===x||x.collectContract(null===(L=u.meta)||void 0===L?void 0:L.contracts);let o,a=!1,d=[];try{tr.clear();const e={};if(o=await Hr(k,function(e){if(window.parent===window)return e;let t=e;const n=(0,g.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/template-preview/")));t=[...t.slice(0,n+1),{path:"${APP.homepage}/_dev_only_/template-preview/:templateId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(n+1)];const r=(0,g.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/snippet-preview/")));return t=[...t.slice(0,r+1),{path:"${APP.homepage}/_dev_only_/snippet-preview/:snippetId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(r+1)],t}(u.routes),r,n,[],e),t.bailout(o))return;d=Yr(r),await Qr(o,r,d),e.child=o.menuRequestNode,n.setInitialMenuRequestNode(e),await t.mergeMenus(n.getMenuRequests())}catch(e){console.error("Router failed:",e);const n=t.catch(e,k);if(!n)return;({failed:a,output:o}=n)}if(k.child=o.node,I(),o.route&&"routes"!==o.route.type||a){if(a||n.dispatchBeforePageLoad(),te(),ae(),ao(null==h?void 0:h.uiVersion),_n(k),window.scrollTo(0,0),a)null==s||s({status:"failed"});else{n.dispatchPageLoad(),n.dispatchAnchorLoad(),n.dispatchOnMount(),n.initializeScrollIntoView(),n.initializeMediaChange(),n.initializeMessageDispatcher();for(const e of d)e.mountAsyncData();null==s||s({status:"ok",path:o.path,pageTitle:document.title})}return void V("rendered")}}else{if(!window.NO_AUTH_GUARD&&null!=ri&&ri.auth&&!ri.auth.isLoggedIn())return void E();I()}te(),ae();const $={tag:On.BRICK,type:"div",properties:{textContent:"Page not found"},runtimeContext:null,return:k};k.child=$,_n(k),window.scrollTo(0,0),null==s||s({status:"not-found"}),V("rendered")}const To="undefined"!=typeof BRICK_PACKAGES?BRICK_PACKAGES:null;var Oo=n(4579),Po=n(4501),_o=2,Mo=.16,xo=.05,Bo=.05,Lo=.15,$o=5,No=4,Uo=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Fo(e){var t=e.r,n=e.g,r=e.b,o=(0,Oo.wE)(t,n,r);return{h:360*o.h,s:o.s,v:o.v}}function jo(e){var t=e.r,n=e.g,r=e.b;return"#".concat((0,Oo.Ob)(t,n,r,!1))}function Do(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-_o*t:Math.round(e.h)+_o*t:n?Math.round(e.h)+_o*t:Math.round(e.h)-_o*t)<0?r+=360:r>=360&&(r-=360),r}function Ko(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-Mo*t:t===No?e.s+Mo:e.s+xo*t)>1&&(r=1),n&&t===$o&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function Vo(e,t,n){var r;return(r=n?e.v+Bo*t:e.v-Lo*t)>1&&(r=1),Number(r.toFixed(2))}function Wo(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=(0,Po.RO)(e),o=$o;o>0;o-=1){var i=Fo(r),s=jo((0,Po.RO)({h:Do(i,o,!0),s:Ko(i,o,!0),v:Vo(i,o,!0)}));n.push(s)}n.push(jo(r));for(var a=1;a<=No;a+=1){var c=Fo(r),l=jo((0,Po.RO)({h:Do(c,a),s:Ko(c,a),v:Vo(c,a)}));n.push(l)}return"dark"===t.theme?Uo.map((function(e){var r,o,i,s=e.index,a=e.opacity;return jo((r=(0,Po.RO)(t.backgroundColor||"#141414"),i=100*a/100,{r:((o=(0,Po.RO)(n[s])).r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b}))})):n}var zo={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Ho={},qo={};function Go(e){return':root,\n[data-override-theme="light"] {\n'.concat(e,"}")}function Yo(e){return'html[data-theme="dark-v2"],\n[data-override-theme="dark-v2"] {\n'.concat(e,"}")}function Qo(e){return e.match(/[0-9a-fA-F]{2}/g).map((e=>parseInt(e,16))).join(", ")}function Jo(e,t,n){return"dark"===t?Wo(e,{theme:t,backgroundColor:n})[5]:e}function Xo(e){const t=[];if(["light","dark"].forEach((n=>{if(e[n])switch(e.type){case"brandColor":t.push(function(e,t){return("dark"===e?Yo:Go)("string"==typeof(n=t)?" --color-brand: ".concat(n,";\n"):[" --color-brand: ".concat(n.default,";")," --color-brand-hover: ".concat(n.hover,";")," --color-brand-active: ".concat(n.active,";"),""].join("\n"));var n}(n,e[n]));break;case"baseColors":t.push(function(e,t,n){return("dark"===e?Yo:Go)("".concat(function(e,t){return Object.entries(e).flatMap((e=>{var[n,r]=e;return function(e){if(!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(e))throw new Error("Invalid base color name: ".concat(JSON.stringify(e)))}(n),r.map(((e,r)=>[" --palette-".concat(n,"-").concat(r+1,"-channel: ").concat(Qo(e),";")].concat("dark"===t?[]:" --palette-".concat(n,"-").concat(r+1,": rgb(var(--palette-").concat(n,"-").concat(r+1,"-channel));")).join("\n"))).concat("")})).join("\n")}(function(e,t,n){return Object.fromEntries(Object.entries(e).map((e=>{var[r,o]=e;return[r,Wo(o,"dark"===t?{theme:t,backgroundColor:n}:void 0)]})))}(t,e,n),e),"\n").concat(function(e,t,n){return Object.entries({green:"green",red:"red",blue:"blue",orange:"orange",cyan:"cyan",purple:"purple",geekblue:"indigo"}).flatMap((r=>{var[o,i]=r;return[" --theme-".concat(o,"-color-rgb-channel: ").concat(Qo(Jo(t[i],e,n)),";"),..."dark"===e?[]:[" --theme-".concat(o,"-color: var(--palette-").concat(i,"-6);")," --theme-".concat(o,"-border-color: var(--palette-").concat(i,"-3);")]," --theme-".concat(o,"-background: var(--palette-").concat(i,"-").concat("dark"===e?2:1,");"),""]})).join("\n")}(e,t,n)))}(n,e[n],e.backgroundColor));break;case"variables":t.push(function(e,t){return("dark"===e?Yo:Go)(function(e){return Object.entries(e).map((e=>{var[t,n]=e;return function(e){if(!/^--[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(e))throw new Error("Invalid css variable name: ".concat(JSON.stringify(e)))}(t)," ".concat(t,": ").concat(n,";")})).concat("").join("\n")}(t))}(n,e[n]))}})),t.length>0){const e=document.createElement("style");return e.textContent=t.join("\n\n"),document.head.appendChild(e),()=>{e.remove()}}}let Zo,ei,ti,ni,ri;function oi(e){if(Zo)throw new Error("Cannot create multiple runtimes");return window.addEventListener("message",(e=>{let{data:t}=e;if((null==t?void 0:t.source)!==U)return;const n=t.payload;switch(null==n?void 0:n.type){case F:K=n.active;break;case j:D=n.panel}})),ri=null==e?void 0:e.hooks,(0,u.initializeI18n)(Ht,qt),f.locale(u.i18n.language),u.i18n.on("languageChanged",(()=>{f.locale(u.i18n.language)})),I(),Zo=new li,Zo}Object.keys(zo).forEach((function(e){Ho[e]=Wo(zo[e]),Ho[e].primary=Ho[e][5],qo[e]=Wo(zo[e],{theme:"dark",backgroundColor:"#141414"}),qo[e].primary=qo[e][5]})),Ho.red,Ho.volcano,Ho.gold,Ho.orange,Ho.yellow,Ho.lime,Ho.green,Ho.cyan,Ho.blue,Ho.geekblue,Ho.purple,Ho.magenta,Ho.grey;const ii=function(){const e=k();if(e)return function(){return new Proxy(e.getRuntime(),{get(){switch(arguments.length<=1?void 0:arguments[1]){case"getCurrentApp":case"getRecentApps":case"hasInstalledApp":case"getDesktops":case"getLaunchpadSettings":case"getLaunchpadSiteMap":case"toggleLaunchpadEffect":case"applyPageTitle":case"getNavConfig":case"getFeatureFlags":case"getMiscSettings":case"getBrandSettings":return Reflect.get(...arguments)}}})}}()||function(){return Zo};var si=new WeakMap,ai=new WeakMap,ci=new WeakSet;class li{constructor(){(0,o.A)(this,ci),(0,s.A)(this,si,!1),(0,s.A)(this,ai,!1),(0,i.A)(this,"version",3)}initialize(e){var t;if((0,l.A)(si,this))throw new Error("The runtime cannot be initialized more than once");(0,c.A)(si,this,!0),function(e){(0,p.isObject)(e.settings)&&(0,p.deepFreeze)(e.settings),e.brickPackages&&(0,p.deepFreeze)(e.brickPackages)}(e),ei=e;const{notification:n,dialog:r}=(0,a.A)(ci,this,ui).call(this);var o;!1!==n&&(o=n??"basic.show-notification",(0,this.loadBricks)([o]).then((()=>{en=document.createElement(o)}),(e=>{console.error("Load notification service failed:",e)}))),!1!==r&&function(e,t){t([e]).then((()=>{Gt=document.createElement(e)}),(e=>{console.error("Load dialog service failed:",e)}))}(r??"basic.show-dialog",this.loadBricks),function(e){e&&(e.brandColor?Xo({type:"brandColor",...e.brandColor}):e.baseColors?Xo({type:"baseColors",...e.baseColors}):e.variables&&Xo({type:"variables",...e.variables}))}(null===(t=e.settings)||void 0===t||null===(t=t.misc)||void 0===t?void 0:t.theme)}async bootstrap(e){if(e&&this.initialize(e),(0,l.A)(ai,this))throw new Error("The runtime cannot be bootstrapped more than once");(0,c.A)(ai,this,!0),ti=new Ao(ei.storyboards),await ti.bootstrap()}getRecentApps(){var e;return(null===(e=ti)||void 0===e?void 0:e.getRecentApps())??{}}getCurrentApp(){var e;return null===(e=ti)||void 0===e?void 0:e.getRecentApps().currentApp}hasInstalledApp(e,t){return qe(e,t)}getFeatureFlags(){var e,t;return{...null===(e=ei)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.featureFlags,...null===(t=ti)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.featureFlags,"migrate-to-brick-next-v3":!0}}getMiscSettings(){var e,t;return{...null===(e=ei)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.misc,...null===(t=ti)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.misc}}getBrandSettings(){var e;return{base_title:"DevOps 管理专家",...null===(e=ei)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.brand}}getLaunchpadSettings(){var e;return{columns:7,rows:4,...null===(e=ei)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.launchpad}}getDesktops(){var e;return(null===(e=ei)||void 0===e?void 0:e.desktops)??[]}getLaunchpadSiteMap(){var e;return(null===(e=ei)||void 0===e?void 0:e.siteSort)??[]}toggleLaunchpadEffect(e){document.body.classList.toggle("launchpad-open",e)}applyPageTitle(e){var t;const n=this.getBrandSettings().base_title;document.title=(null===(t=ti)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t?void 0:t.localeTitle)||(e?`${e} - ${n}`:n)}getNavConfig(){var e;return null===(e=ti)||void 0===e?void 0:e.getNavConfig()}loadBricks(e){return(0,d.loadBricksImperatively)(e,di())}}function ui(){var e;return(null===(e=ei)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.presetBricks)??{}}function di(){var e;return ni??(ni=function(e,t){if(null==t||!t.length)return e;const n=new Map;return[...t,...e].forEach((e=>{const t=e.filePath.split("/")[1];n.has(t)||n.set(t,e)})),Array.from(n.values())}((null===(e=ei)||void 0===e?void 0:e.brickPackages)??To??window.STANDALONE_BRICK_PACKAGES??[],window.PUBLIC_DEPS))}function pi(){var e;return null===(e=ti)||void 0===e?void 0:e.getRenderId()}function fi(){var e;return null===(e=ti)||void 0===e?void 0:e.getRuntimeContext()}function hi(e){var t;return null===(t=ei)||void 0===t||null===(t=t.storyboards)||void 0===t?void 0:t.find((t=>t.app.id===e))}function mi(e){var t;return null===(t=hi(e))||void 0===t?void 0:t.app}function gi(){for(var e,t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null==ri||null===(e=ri.auth)||void 0===e||null===(t=e.authenticate)||void 0===t||t.call(e,...r)}function vi(){var e;return null==ri||null===(e=ri.auth)||void 0===e?void 0:e.getAuth()}function yi(){var e,t;return null==ri||null===(e=ri.auth)||void 0===e||null===(t=e.logout)||void 0===t?void 0:t.call(e)}function wi(){var e;return null==ri||null===(e=ri.auth)||void 0===e?void 0:e.isLoggedIn()}var bi=new WeakMap;const Ei=new class{constructor(){(0,s.A)(this,bi,new Map)}define(e,t){(0,l.A)(bi,this).has(e)?console.error(`Custom editor of "${e}" already registered`):(0,l.A)(bi,this).set(e,t)}get(e){return(0,l.A)(bi,this).get(e)}};async function Si(e,t,n){return nt(await Qe(e),e,"resolve",t,n)}function Ai(e){let t,{portal:n,scope:r="fragment",unknownBricks:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n;t=n||(()=>(i=document.createElement("div"),i.style.position="absolute",i.style.width=i.style.height="0",document.body.append(i),i));let s,a,c=!1;return{async render(n){let{theme:l,uiVersion:d,language:p,context:f,functions:h,templates:m,i18n:v,url:y,app:w}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(c)throw new Error("The root is unmounted and cannot be rendered any more");const b=[].concat(n),E=s,S=(0,g.uniqueId)("render-id-");s=new Wn(r,{unknownBricks:o,renderId:S});const A={ctxStore:new _r("CTX",void 0,s),pendingPermissionsPreCheck:[],tplStateStoreMap:new Map,formStateStoreMap:new Map};if(y){const e=new URL(y);A.query=e.searchParams,A.location={pathname:e.pathname,search:e.search,hash:e.hash,state:void 0}}const k={tag:On.ROOT,container:e,createPortal:t};if("page"===r){var I;X(l??"light"),ie("default"),ao(d),p&&await u.i18n.changeLanguage(p),w??(w={id:"demo",homepage:"/demo"}),A.app=w;const e={app:w,meta:{i18n:v,customTemplates:m}};null===(I=a)||void 0===I||I(),a=B(e),so(e),me(h,w)}A.ctxStore.define(f,A);let C,R=!1,T=[];try{C=await qr(k,b,A,s,[],{}),T=Yr(A),await Qr(C,A,T)}catch(e){R=!0,C={node:{tag:On.BRICK,type:"div",properties:{textContent:Jt(e),dataset:{errorBoundary:""},style:{color:"var(--color-error)"}},return:k,runtimeContext:null},blockingList:[]}}if(k.child=C.node,null==E||E.dispatchOnUnmount(),null==E||E.dispose(),Pn(e),i&&Pn(i),"page"===r&&(R||s.dispatchBeforePageLoad(),te(),ae()),_n(k),"page"===r&&window.scrollTo(0,0),!R){for(const e of T)e.mountAsyncData();"page"===r&&s.dispatchPageLoad(),s.dispatchOnMount(),s.initializeScrollIntoView(),s.initializeMediaChange(),s.initializeMessageDispatcher()}},unmount(){c||(c=!0,Pn(e),i&&(Pn(i),n||i.remove()))}}}function ki(e){let{useRealTimeQuery:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={...fi()};t&&(n.query=new URLSearchParams(C().location.search));const r=t=>{if("string"==typeof t){if((0,T.isEvaluable)(t)){const e=ut(t,n);return Xe(e),e}return(0,P.inject)(t,n)}return!(0,p.isObject)(t)||Ze(e)?t:Array.isArray(t)?t.map((e=>r(e))):Object.fromEntries(Object.entries(t).map((e=>{let[t,n]=e;return[r(t),r(n)]})))};return r(e)}}}]);
3
- //# sourceMappingURL=3657.2018bf64.js.map