@next-bricks/form 0.1.0 → 0.2.1

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 (119) hide show
  1. package/dist/bricks.json +2 -1
  2. package/dist/chunks/1646.7c0548af.js +2 -0
  3. package/dist/chunks/1646.7c0548af.js.map +1 -0
  4. package/dist/chunks/{1970.62810c92.js → 1970.e1cc8dc6.js} +3 -3
  5. package/dist/chunks/{1970.62810c92.js.map → 1970.e1cc8dc6.js.map} +1 -1
  6. package/dist/chunks/2108.71cfaae3.js +2 -0
  7. package/dist/chunks/2108.71cfaae3.js.map +1 -0
  8. package/dist/chunks/2323.2e361aa7.js +2 -0
  9. package/dist/chunks/2323.2e361aa7.js.map +1 -0
  10. package/dist/chunks/249.2c172b62.js +2 -0
  11. package/dist/chunks/249.2c172b62.js.map +1 -0
  12. package/dist/chunks/2993.aeb9eb61.js +2 -0
  13. package/dist/chunks/2993.aeb9eb61.js.map +1 -0
  14. package/dist/chunks/{3494.fd1b6a17.js → 3494.91af022c.js} +2 -2
  15. package/dist/chunks/{3494.fd1b6a17.js.map → 3494.91af022c.js.map} +1 -1
  16. package/dist/chunks/353.6a0712de.js +2 -0
  17. package/dist/chunks/{353.94523d86.js.map → 353.6a0712de.js.map} +1 -1
  18. package/dist/chunks/4454.7284d6cc.js +2 -0
  19. package/dist/chunks/4454.7284d6cc.js.map +1 -0
  20. package/dist/chunks/4512.fdbeec0d.js +2 -0
  21. package/dist/chunks/{4512.02f5e4dd.js.map → 4512.fdbeec0d.js.map} +1 -1
  22. package/dist/chunks/4728.645efaf1.js +2 -0
  23. package/dist/chunks/4728.645efaf1.js.map +1 -0
  24. package/dist/chunks/5151.5d4047e5.js +2 -0
  25. package/dist/chunks/5151.5d4047e5.js.map +1 -0
  26. package/dist/chunks/6205.51c37133.js +2 -0
  27. package/dist/chunks/{6205.bc110b6d.js.map → 6205.51c37133.js.map} +1 -1
  28. package/dist/chunks/7164.00b43c28.js +2 -0
  29. package/dist/chunks/{7164.3bd246c1.js.map → 7164.00b43c28.js.map} +1 -1
  30. package/dist/chunks/7746.cc1f09af.js +2 -0
  31. package/dist/chunks/7746.cc1f09af.js.map +1 -0
  32. package/dist/chunks/{7822.98ffb1b1.js → 7822.7d673e4e.js} +2 -2
  33. package/dist/chunks/{7822.98ffb1b1.js.map → 7822.7d673e4e.js.map} +1 -1
  34. package/dist/chunks/{7915.e235a57b.js → 7915.9c95e491.js} +2 -2
  35. package/dist/chunks/{7915.e235a57b.js.map → 7915.9c95e491.js.map} +1 -1
  36. package/dist/chunks/{8008.f2563beb.js → 8008.2458024d.js} +3 -3
  37. package/dist/chunks/{8008.f2563beb.js.map → 8008.2458024d.js.map} +1 -1
  38. package/dist/chunks/873.cc3010b0.js +2 -0
  39. package/dist/chunks/873.cc3010b0.js.map +1 -0
  40. package/dist/chunks/8826.2710b16c.js +2 -0
  41. package/dist/chunks/8826.2710b16c.js.map +1 -0
  42. package/dist/chunks/8843.218d316b.js +3 -0
  43. package/dist/chunks/8843.218d316b.js.map +1 -0
  44. package/dist/chunks/code-editor.78e98a5b.js +2 -0
  45. package/dist/chunks/{code-editor.c7854829.js.map → code-editor.78e98a5b.js.map} +1 -1
  46. package/dist/chunks/dynamic-form-item.3b3a0efd.js +2 -0
  47. package/dist/chunks/{dynamic-form-item.48770a46.js.map → dynamic-form-item.3b3a0efd.js.map} +1 -1
  48. package/dist/chunks/general-checkbox.87bc578a.js +3 -0
  49. package/dist/chunks/{general-checkbox.d95faa71.js.map → general-checkbox.87bc578a.js.map} +1 -1
  50. package/dist/chunks/general-form-item.caab5a15.js +3 -0
  51. package/dist/chunks/{general-form-item.b05c0bb9.js.map → general-form-item.caab5a15.js.map} +1 -1
  52. package/dist/chunks/general-form.688ade9a.js +2 -0
  53. package/dist/chunks/{general-form.432c96e8.js.map → general-form.688ade9a.js.map} +1 -1
  54. package/dist/chunks/general-input.f322d151.js +3 -0
  55. package/dist/chunks/{general-input.178d80f2.js.map → general-input.f322d151.js.map} +1 -1
  56. package/dist/chunks/general-radio.31ce1606.js +3 -0
  57. package/dist/chunks/{general-radio.b77395e8.js.map → general-radio.31ce1606.js.map} +1 -1
  58. package/dist/chunks/general-select.6b29c2ab.js +3 -0
  59. package/dist/chunks/general-select.6b29c2ab.js.map +1 -0
  60. package/dist/chunks/general-textarea.e1958cc6.js +2 -0
  61. package/dist/chunks/{general-textarea.4f0d38a1.js.map → general-textarea.e1958cc6.js.map} +1 -1
  62. package/dist/chunks/main.883c1dcf.js +2 -0
  63. package/dist/chunks/main.883c1dcf.js.map +1 -0
  64. package/dist/chunks/submit-buttons.3c832fad.js +2 -0
  65. package/dist/chunks/{submit-buttons.1115d5d5.js.map → submit-buttons.3c832fad.js.map} +1 -1
  66. package/dist/index.c0e6fddd.js +2 -0
  67. package/dist/index.c0e6fddd.js.map +1 -0
  68. package/package.json +14 -13
  69. package/dist/chunks/1646.1d16cabe.js +0 -2
  70. package/dist/chunks/1646.1d16cabe.js.map +0 -1
  71. package/dist/chunks/2108.60158822.js +0 -2
  72. package/dist/chunks/2108.60158822.js.map +0 -1
  73. package/dist/chunks/2241.fd1d3265.js +0 -3
  74. package/dist/chunks/2241.fd1d3265.js.map +0 -1
  75. package/dist/chunks/2323.89167d40.js +0 -2
  76. package/dist/chunks/2323.89167d40.js.map +0 -1
  77. package/dist/chunks/2993.e2812bdf.js +0 -2
  78. package/dist/chunks/2993.e2812bdf.js.map +0 -1
  79. package/dist/chunks/31.2b21ef1e.js +0 -2
  80. package/dist/chunks/31.2b21ef1e.js.map +0 -1
  81. package/dist/chunks/3525.08bc8edc.js +0 -2
  82. package/dist/chunks/3525.08bc8edc.js.map +0 -1
  83. package/dist/chunks/353.94523d86.js +0 -2
  84. package/dist/chunks/4454.238ebb5b.js +0 -2
  85. package/dist/chunks/4454.238ebb5b.js.map +0 -1
  86. package/dist/chunks/4512.02f5e4dd.js +0 -2
  87. package/dist/chunks/4728.caffe075.js +0 -2
  88. package/dist/chunks/4728.caffe075.js.map +0 -1
  89. package/dist/chunks/5151.d72c681c.js +0 -2
  90. package/dist/chunks/5151.d72c681c.js.map +0 -1
  91. package/dist/chunks/6205.bc110b6d.js +0 -2
  92. package/dist/chunks/7164.3bd246c1.js +0 -2
  93. package/dist/chunks/7746.0d8051b2.js +0 -2
  94. package/dist/chunks/7746.0d8051b2.js.map +0 -1
  95. package/dist/chunks/873.d8778899.js +0 -2
  96. package/dist/chunks/873.d8778899.js.map +0 -1
  97. package/dist/chunks/code-editor.c7854829.js +0 -2
  98. package/dist/chunks/dynamic-form-item.48770a46.js +0 -2
  99. package/dist/chunks/general-checkbox.d95faa71.js +0 -3
  100. package/dist/chunks/general-form-item.b05c0bb9.js +0 -3
  101. package/dist/chunks/general-form.432c96e8.js +0 -2
  102. package/dist/chunks/general-input.178d80f2.js +0 -3
  103. package/dist/chunks/general-radio.b77395e8.js +0 -3
  104. package/dist/chunks/general-select.a226b1b7.js +0 -3
  105. package/dist/chunks/general-select.a226b1b7.js.map +0 -1
  106. package/dist/chunks/general-textarea.4f0d38a1.js +0 -2
  107. package/dist/chunks/main.c0e537b3.js +0 -2
  108. package/dist/chunks/main.c0e537b3.js.map +0 -1
  109. package/dist/chunks/submit-buttons.1115d5d5.js +0 -2
  110. package/dist/index.c21224c7.js +0 -2
  111. package/dist/index.c21224c7.js.map +0 -1
  112. /package/dist/chunks/{1970.62810c92.js.LICENSE.txt → 1970.e1cc8dc6.js.LICENSE.txt} +0 -0
  113. /package/dist/chunks/{8008.f2563beb.js.LICENSE.txt → 8008.2458024d.js.LICENSE.txt} +0 -0
  114. /package/dist/chunks/{2241.fd1d3265.js.LICENSE.txt → 8843.218d316b.js.LICENSE.txt} +0 -0
  115. /package/dist/chunks/{general-checkbox.d95faa71.js.LICENSE.txt → general-checkbox.87bc578a.js.LICENSE.txt} +0 -0
  116. /package/dist/chunks/{general-form-item.b05c0bb9.js.LICENSE.txt → general-form-item.caab5a15.js.LICENSE.txt} +0 -0
  117. /package/dist/chunks/{general-input.178d80f2.js.LICENSE.txt → general-input.f322d151.js.LICENSE.txt} +0 -0
  118. /package/dist/chunks/{general-radio.b77395e8.js.LICENSE.txt → general-radio.31ce1606.js.LICENSE.txt} +0 -0
  119. /package/dist/chunks/{general-select.a226b1b7.js.LICENSE.txt → general-select.6b29c2ab.js.LICENSE.txt} +0 -0
@@ -0,0 +1,3 @@
1
+ /*! For license information please see 8843.218d316b.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_next_bricks_form=self.webpackChunk_next_bricks_form||[]).push([[8843],{5863:(e,t,r)=>{function n(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}r.d(t,{Z:()=>n})},175:(e,t,r)=>{function n(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}r.d(t,{Z:()=>n})},687:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(175);function o(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,(0,n.Z)(e,t,"get"))}},3395:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(5863);function o(e,t,r){(0,n.Z)(e,t),t.set(e,r)}},381:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(175);function o(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,(0,n.Z)(e,t,"set"),r),r}},6171:(e,t,r)=>{function n(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r.d(t,{Z:()=>n})},5866:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(5863);function o(e,t){(0,n.Z)(e,t),t.add(e)}},6666:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(5850);function o(e,t,r){return(t=(0,n.Z)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},3028:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(6666);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}},2159:(e,t,r)=>{function n(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}r.d(t,{Z:()=>n})},5850:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(6522);function o(e){var t=function(e,t){if("object"!==(0,n.Z)(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==(0,n.Z)(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===(0,n.Z)(t)?t:String(t)}},6522:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r.d(t,{Z:()=>n})},8843:(e,t,r)=>{r.r(t),r.d(t,{Dialog:()=>Rt,Notification:()=>$t,StoryboardFunctionRegistryFactory:()=>J,__secret_internals:()=>n,applyTheme:()=>N,authenticate:()=>ha,batchSetAppsLocalTheme:()=>U,checkIfByTransform:()=>Je,checkIfOfComputed:()=>Ge,createHistory:()=>ye,createRuntime:()=>fo,customProcessors:()=>w,customTemplates:()=>ct,fetchByProvider:()=>wa,getAuth:()=>ma,getBasePath:()=>V,getCssPropertyValue:()=>W,getCurrentMode:()=>D,getCurrentTheme:()=>B,getHistory:()=>we,getPageInfo:()=>Xr,getRuntime:()=>vo,handleHttpError:()=>Ut,httpErrorToString:()=>Mt,isLoggedIn:()=>ya,isUnauthenticatedError:()=>xt,logout:()=>ga,matchPath:()=>yt,registerWidgetFunctions:()=>Zo,registerWidgetI18n:()=>k,unstable_createRoot:()=>Ea});var n={};r.r(n),r.d(n,{initializePlayground:()=>Oa,legacyDoTransform:()=>Pa,loadBricks:()=>_a,mountUseBrick:()=>Za,renderUseBrick:()=>Sa,unmountUseBrick:()=>Ia,updateSnippetPreviewSettings:()=>xa,updateStoryboard:()=>Aa,updateStoryboardByRoute:()=>Ta,updateStoryboardBySnippet:()=>Ma,updateStoryboardByTemplate:()=>Ca,updateTemplatePreviewSettings:()=>Ra});var o=r(3028),a=r(4795),i=r(5178),s=r(5492),c=r(4167),l=function(){var e=(0,a.Z)((function*(e,t){return(yield c.http.post("api/gateway/micro_app.permission.ValidatePermissions/api/micro_app/v1/permission/validate",e,t)).data}));return function(t,r){return e.apply(this,arguments)}}(),u=r(9530),p=r(6081),d=r(4565),f=r(2159),v=r(1337),h=r(8817),m=r(3395),g=r(687),y=new WeakMap,w=new class{constructor(){(0,m.Z)(this,y,{writable:!0,value:new Map})}define(e,t){var[r,n]=e.split("."),o=(0,g.Z)(this,y).get(r);if(o||(o=new Map,(0,g.Z)(this,y).set(r,o)),o.has(n))throw new Error('Custom processor of "'.concat(e,'" already registered'));o.set(n,t)}get(e){return(0,g.Z)(this,y).get(e)}},b=r(9925);function E(e){var{app:t,meta:r}=e;if(null!=r&&r.i18n){var n=S("app",t.id);Object.entries(r.i18n).forEach((e=>{var[t,r]=e;b.i18n.addResourceBundle(t,n,r)}))}}function S(e,t){return"".concat(e,"/").concat(t)}function k(e,t){var r=S("widget",e);Object.entries(t).forEach((e=>{var[t,n]=e;b.i18n.addResourceBundle(t,r,n)}))}function Z(e){return b.i18n.getFixedT(null,S("widget",e))}function I(e,t){return{get(r){var n;return"".concat(null!==(n=window.PUBLIC_ROOT)&&void 0!==n?n:"","bricks/").concat(e,"/").concat(window.PUBLIC_ROOT_WITH_VERSION&&t?"".concat(t,"/"):"","dist/assets/").concat(r)}}}function O(){return window.__BRICK_NEXT_DEVTOOLS_HOOK__}var P=()=>{throw new Error("Can't modify read-only proxy object")},_={set:P,defineProperty:P,deleteProperty:P,setPrototypeOf:P};function A(e){return new Proxy(e,_)}function T(e){var{get:t,ownKeys:r}=e;return O()?A(Object.fromEntries(r(null).map((e=>[e,t(null,e,null)])))):new Proxy(Object.freeze({}),{get:t})}var C="light",R=new p.JsonStorage(localStorage),M="apps-theme";function x(e){if("dark"!==e&&"light"!==e&&"dark-v2"!==e)throw new Error("Unsupported theme: ".concat(e));C=e}function L(){return C}function B(){return document.documentElement.dataset.theme}function N(e){e?x(e):e=L(),e!==B()&&(document.documentElement.dataset.theme=e,window.dispatchEvent(new CustomEvent("theme.change",{detail:e})))}function U(e){R.setItem(M,(0,o.Z)((0,o.Z)({},j()),e))}function j(){var e,t;try{t=R.getItem(M)}catch(e){console.error("JSON parse error inside `getLocalAppsTheme()`")}return null!==(e=t)&&void 0!==e?e:{}}var $="default";function F(e){if("dashboard"!==e&&"default"!==e)throw new Error("Unsupported mode: ".concat(e));$=e}function D(){return document.documentElement.dataset.mode}function K(e){e?F(e):e=$,e!==D()&&(document.documentElement.dataset.mode=e,window.dispatchEvent(new CustomEvent("mode.change",{detail:e})))}function W(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return r&&(null===(t=window.getComputedStyle(r))||void 0===t?void 0:t.getPropertyValue(e))||""}function V(){var e=document.querySelector("base");return e?e.getAttribute("href"):"/"}function H(e,t){var r={};for(var n of e){var o=q(n,t);void 0!==o&&(r[n]=o)}return r}function q(e,t){var r,n,{collectCoverage:o,widgetId:a,widgetVersion:s,app:c,appendI18nNamespace:l,storyboardFunctions:u,isStoryboardFunction:p}=t;switch(e){case"BASE_URL":return o?"/next":V().replace(/\/$/,"");case"FN":return u;case"IMG":return o?{get:e=>"mock/images/".concat(e)}:a?I(a,s):(r=c.id,n=c.isBuildPush,{get:e=>n?"api/gateway/object_store.object_store.GetObject/api/v1/objectStore/bucket/next-builder/object/".concat(e):"".concat(window.APP_ROOT?"".concat(window.APP_ROOT,"-/"):"","micro-apps/").concat(r,"/images/").concat(e)});case"I18N":return o?i.identity:a?Z(a):b.i18n.getFixedT(null,[l,S("app",c.id)].filter(Boolean));case"I18N_TEXT":return o?G:b.i18nText;case"PERMISSIONS":return A({check:o?z:fa});case"THEME":return A({getTheme:o?()=>"light":L});case"console":return p?A(console):void 0;case"location":return o?{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 G(e){return null==e?void 0:e.en}function z(){return!0}function J(){var e,{widgetId:t,widgetVersion:r,collectCoverage:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=new Map,i=new Proxy(Object.freeze({}),{get:(o,s)=>function(o){var s,c=a.get(o);if(c){if(c.processed)return c.cooked;n&&(s=n.createCollector(o));var l=(0,u.precookFunction)(c.source,{typescript:c.typescript,hooks:s&&{beforeVisit:s.beforeVisit}});return c.cooked=(0,u.cook)(l.function,c.source,{rules:{noVar:!0},globalVariables:(0,h.supply)(l.attemptToVisitGlobals,H(l.attemptToVisitGlobals,{collectCoverage:n,widgetId:t,widgetVersion:r,app:e,storyboardFunctions:i,isStoryboardFunction:!0}),!!n),hooks:s&&{beforeEvaluate:s.beforeEvaluate,beforeCall:s.beforeCall,beforeBranch:s.beforeBranch}}),c.processed=!0,c.cooked}}(s)});return{storyboardFunctions:i,registerStoryboardFunctions:function(t,r){if(r&&(e=r),a.clear(),Array.isArray(t))for(var n of t){var o=(0,s.strictCollectMemberUsageInFunction)(n,"FN"),i=(0,s.strictCollectMemberUsageInFunction)(n,"PERMISSIONS").has("check");a.set(n.name,{source:n.source,typescript:n.typescript,deps:o,hasPermissionsCheck:i})}},updateStoryboardFunction(e,t){var r=(0,o.Z)((0,o.Z)({},t),{},{name:e}),n=(0,s.strictCollectMemberUsageInFunction)(r,"FN"),i=(0,s.strictCollectMemberUsageInFunction)(r,"PERMISSIONS").has("check");a.set(e,{source:t.source,typescript:t.typescript,deps:n,hasPermissionsCheck:i})},checkPermissionsUsage(e){var t=new Set,r=e=>{if(!t.has(e)){t.add(e);var n=a.get(e);return!!n&&(n.hasPermissionsCheck||[...n.deps].some(r))}return!1};return e.some(r)}}}var{storyboardFunctions:Q,registerStoryboardFunctions:Y,checkPermissionsUsage:X}=J(),ee={};try{ee.EventTarget=(new EventTarget).constructor}catch(e){!function(e,t){var r=e.create,n=e.defineProperty,o=a.prototype;function a(){t.set(this,r(null))}function i(e,t,r){n(e,t,{configurable:!0,writable:!0,value:r})}function s(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}i(o,"addEventListener",(function(e,r,n){for(var o=t.get(this),a=o[e]||(o[e]=[]),i=0,s=a.length;i<s;i++)if(a[i].listener===r)return;a.push({target:this,listener:r,options:n})})),i(o,"dispatchEvent",(function(e){var r=t.get(this)[e.type];return r&&(i(e,"target",this),i(e,"currentTarget",this),r.slice(0).some(s,e),delete e.currentTarget,delete e.target),!0})),i(o,"removeEventListener",(function(e,r){for(var n=t.get(this),o=n[e]||(n[e]=[]),a=0,i=o.length;a<i;a++)if(o[a].listener===r)return void o.splice(a,1)})),ee.EventTarget=a}(Object,new WeakMap)}const te=ee.EventTarget;var re=function(e){return e.xLarge="xLarge",e.large="large",e.medium="medium",e.small="small",e.xSmall="xSmall",e}({}),ne=new Map([[re.xLarge,"1920px"],[re.large,"1600px"],[re.medium,"1280px"],[re.small,"1024px"],[re.xSmall,0]]),oe=new te,ae={},ie={};function se(e,t){var r=!1;for(var[n]of(ae[t]=e.matches,ne))if(ae[n]&&ie.breakpoint!==n){ie.breakpoint=n,r=!0;break}r&&oe.dispatchEvent(new CustomEvent("change",{detail:ie}))}ne.forEach(((e,t)=>{var r=window.matchMedia("(min-width: ".concat(e,")"));se(r,t),r.addEventListener?r.addEventListener("change",(e=>{se(e,t)})):r.addListener((e=>{se(e,t)}))}));var ce=()=>ie;function le(e){return function(t){var r,n="local"===e?localStorage:sessionStorage;return JSON.parse(null!==(r=n.getItem(t))&&void 0!==r?r:"null")}}var ue=r(8874),pe=(r(8525),r(9492));function de(e,t){var r=(0,i.orderBy)(e,(e=>{var t,r,n;return null!==(t=null===(r=e.app)||void 0===r||null===(n=r.homepage)||void 0===n?void 0:n.length)&&void 0!==t?t:0}),"desc");for(var n of r){var o=n.app.homepage;if("string"==typeof o&&"/"===o[0]&&("/"===o?t===o:"".concat(t.replace(/\/+$/,""),"/").startsWith("".concat(o.replace(/\/+$/,""),"/"))))return n}}function fe(e){var t;return!e||(null===(t=vo().getCurrentApp())||void 0===t?void 0:t.id)!==e.app.id&&!window.STANDALONE_MICRO_APPS&&e.app.standaloneMode}var ve,he=["extraQuery","clear","keepHash"],me=!1;function ge(e,t){t(!(me=!confirm(e)))}function ye(){if(!ve){var e=(0,pe.createBrowserHistory)({basename:V().replace(/\/$/,""),getUserConfirmation:ge});Object.assign(e,function(e){var t,{push:r,replace:n}=e;function a(e,t,n){me=!1,r(e,t),null==n||n(me)}function i(e,t,r){me=!1,n(e,t),null==r||r(me)}function s(t){return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0,{extraQuery:s,clear:c,keepHash:l}=n,u=(0,f.Z)(n,he),p=new URLSearchParams(c?"":e.location.search),d={};for(var[v,h]of(Object.assign(d,r,s),Object.entries(d)))if(Array.isArray(h))for(var m of(p.delete(v),h))p.append(v,m);else null==h||""===h?p.delete(v):p.set(v,h);("push"===t?a:i)("?".concat(p.toString()).concat(l?e.location.hash:""),u,o)}}return(0,o.Z)({pushQuery:s("push"),replaceQuery:s("replace"),pushAnchor:function(t,r,n){a((0,o.Z)((0,o.Z)({},e.location),{},{key:void 0,hash:t,state:(0,o.Z)({notify:!1},r)}),void 0,n)},reload:function(t){i((0,o.Z)((0,o.Z)({},e.location),{},{state:(0,o.Z)((0,o.Z)({},e.location.state),{},{notify:!0})}),void 0,t)},setBlockMessage:function(e){t=e},getBlockMessage:function(){return t},unblock:function(){t=void 0}},function(e){var{push:t,replace:r}=e;function n(n){return function(o,a,i){var s,c="string"==typeof o;return"string"==typeof(s=c?(0,pe.parsePath)(o).pathname:o.pathname)&&s.startsWith("/")&&fe(function(e){var t,r;return de(null!==(t=null===(r=po)||void 0===r?void 0:r.storyboards)&&void 0!==t?t:[],e)}(s))?location["push"===n?"assign":"replace"](c?V()+o.substring(1):e.createHref(o)):("push"===n?t:r)(o,a,i)}}return{push:n("push"),replace:n("replace")}}((0,o.Z)((0,o.Z)({},e),{},{push:a,replace:i})))}(e)),ve=e}return ve}function we(){return ve}var be=r(5866),Ee=r(6171),Se=r(381),ke=r(2308),Ze=function(){var e=(0,a.Z)((function*(e,t){return(yield c.http.post("api/contract/single_search",e,t)).data}));return function(t,r){return e.apply(this,arguments)}}(),Ie=new Map,Oe=new Map,Pe=(e,t)=>{null==e||e.forEach((e=>{t.set("".concat(e.namespaceId,".").concat(e.name),e)}))},_e=new Map;function Ae(e){return e.includes("@")}function Te(e,t,r){return Ce.apply(this,arguments)}function Ce(){return Ce=(0,a.Z)((function*(e,t,r){if(!Ae(e))return t;if(!e.includes(":"))throw new Error("You're using legacy Custom API \"".concat(e,'" which is dropped in v3, please use Flow API instead'));var n=yield function(e){var t=_e.get(e);return t||(t=function(e){return Re.apply(this,arguments)}(e),_e.set(e,t)),t}(e);if(!n)throw new Error('Flow API not found: "'.concat(e,'"'));var o=function(e,t){var r,n,o="string"==typeof t.contract?ke.safeLoad(t.contract,{schema:ke.JSON_SCHEMA,json:!0}):t.contract,{uri:a,method:i="GET",ext_fields:s}=null!==(r=null==o?void 0:o.endpoint)&&void 0!==r?r:{},c=!(null==o||!o.response)&&!1!==o.response.wrapper;if(!a)throw new Error('Missing endpoint.uri in contract of provider "'.concat(e,'"'));return{uri:a,method:"list"===i.toLowerCase()?"get":i,ext_fields:s,name:t.name,namespace:t.namespace,serviceName:t.serviceName,version:t.version,isFileType:"file"===(null==o||null===(n=o.response)||void 0===n?void 0:n.type),responseWrapper:c,request:null==o?void 0:o.request}}(e,n);return function(e,t,r){var n,{uri:o,method:a,ext_fields:i,name:s,namespace:c,serviceName:l,responseWrapper:u,version:p,isFileType:d,request:f}=e,v=d&&"saveAs"===r;v&&(n=t.shift());var{url:h,args:m}=function(e,t,r,n,o,a){var i=a?o?"api/gateway/".concat(o):"api/gateway/".concat(n,".").concat(r,"@").concat(a):"api/gateway/api_service.".concat(n,".").concat(r),s=t.slice();return{url:i+e.replace(/:([^/]+)/g,(()=>s.shift())),args:s}}(o,t,s,c,l,p);return[...v?[n]:[],{url:h,originalUri:o,method:a,ext_fields:i,responseWrapper:u,request:f,isFileType:d},...m]}(o,t,r)})),Ce.apply(this,arguments)}function Re(){return(Re=(0,a.Z)((function*(e){var[t,r]=e.split("@"),[n,o]=r.split(":"),a=function(e){return Ie.get(e)||Oe.get(e)}("".concat(t,".").concat(n));if(a)return{name:a.name,namespace:a.namespaceId,serviceName:a.serviceName,version:a.version,contract:{endpoint:a.endpoint,response:a.response,request:a.request}};var i,s,{contractData:c}=yield Ze({contractName:"".concat(t,".").concat(n),version:o});return c?{name:c.name,namespace:null===(i=c.namespace)||void 0===i||null===(s=i[0])||void 0===s?void 0:s.name,serviceName:c.serviceName,version:c.version,contract:{endpoint:c.endpoint,response:c.response,request:c.request}}:void 0}))).apply(this,arguments)}var Me="core.provider-flow-api";function xe(e,t){return e.some((e=>e.source===t))}function Le(e){return Be.apply(this,arguments)}function Be(){return Be=(0,a.Z)((function*(e){for(var t,{url:r,originalUri:n,method:a="GET",responseWrapper:s=!0,ext_fields:l=[],request:u,isFileType:p}=e,d=["get","delete","head"].includes(a.toLowerCase()),f=p?{responseType:"blob"}:{},v=arguments.length,h=new Array(v>1?v-1:0),m=1;m<v;m++)h[m-1]=arguments[m];if(d){var g,y,w,b,E,S;n&&"object"===(null==u?void 0:u.type)&&(null!==(g=null===(y=n.match(/:([^/]+)/g))||void 0===y?void 0:y.length)&&void 0!==g?g:0)===(null!==(w=null===(b=u.fields)||void 0===b?void 0:b.length)&&void 0!==w?w:0)?[S]=h:[E,S]=h,t=yield c.http.simpleRequest(a,r,(0,o.Z)((0,o.Z)({params:E},f),S))}else{var k=function(e){if(!e||"object"!==e.type)return!1;var t=e=>!(0,i.isEmpty)(e)&&e.some((e=>["file","file[]"].includes(e.type)||t(e.fields)));return t(e.fields)}(u),Z=function(e){for(var t=xe(e,"query"),r=xe(e,"body"),n=arguments.length,a=new Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];if(t){if(r){var[s,c,l]=a;return{data:s,options:(0,o.Z)({params:c},l)}}var[u,p]=a;return{data:{},options:(0,o.Z)({params:u},p)}}var[d,f]=a;return{data:d,options:f}}(l,...h);t=yield c.http.requestWithBody(a,r,k?function(e){if(e instanceof FormData)return e;var t=new FormData,r=function(e){Array.isArray(o)?o.forEach((r=>{t.append(e,r)})):!(0,i.isObject)(o)||o instanceof Blob||o instanceof Date?t.append(e,o):Object.entries(o).forEach((r=>{var[n,o]=r;t.append("".concat(e,"[").concat(n,"]"),o)}))};for(var[n,o]of Object.entries(e))r(n);return t}(Z.data):Z.data,(0,o.Z)((0,o.Z)({},f),Z.options))}return!p&&s?t.data:t})),Be.apply(this,arguments)}var Ne=new Map;function Ue(e){return je.apply(this,arguments)}function je(){return je=(0,a.Z)((function*(e){Ae(e)&&(e=Me);var t=Ne.get(e);if(t)return t;if(e.includes("-")&&!customElements.get(e))if(e===Me)customElements.define(Me,(0,s.createProviderClass)(Le));else if(yield(0,v.loadBricksImperatively)([e],mo()),!customElements.get(e))throw new Error('Provider not defined: "'.concat(e,'".'));return t=document.createElement(e),Ne.set(e,t),t})),je.apply(this,arguments)}var $e=new Map;function Fe(e,t,r){return De.apply(this,arguments)}function De(){return(De=(0,a.Z)((function*(e,t,r){var{useProvider:n,method:a="resolve",args:i=[],onReject:s}=e,c=e.provider;if(c&&!n)throw new Error("You're using \"provider: ".concat(c,'" which is dropped in v3, please use "useProvider" instead'));var l,[u,p]=yield Promise.all([Ue(n),ea(i,t)]),d=Ke(u,n,a,p,r,i),{transform:f}=e;try{l=yield d}catch(e){if(!function(e){return!(null==e||!e.transform)}(s))throw e;f=s.transform,l=e}return f?"string"==typeof f?{[f]:l}:ea(f,(0,o.Z)((0,o.Z)({},t),{},{data:l})):l}))).apply(this,arguments)}function Ke(e,t,r,n,o,a){return We.apply(this,arguments)}function We(){return We=(0,a.Z)((function*(e,t,r,n,o,i){var s,c;try{s=JSON.stringify({useProvider:t,method:r,args:n})}catch(e){if(!i)throw e;s=JSON.stringify({useProvider:t,method:r,originalArgs:i})}return"reload"!==(null==o?void 0:o.cache)&&(c=$e.get(s)),c||(c=(0,a.Z)((function*(){var o=yield Te(t,n,r);return e.resolve(...o)}))(),$e.set(s,c)),c})),We.apply(this,arguments)}function Ve(e,t){return He.apply(this,arguments)}function He(){return(He=(0,a.Z)((function*(e,t){return!(0,p.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||Go(e.if)?yield ea(e.if,t):e.if)}))).apply(this,arguments)}function qe(e,t){return!(0,p.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||Go(e.if)?ra(e.if,t):e.if)}function Ge(e){return!(0,p.hasOwnProperty)(e,"if")||!!e.if}function ze(){return(ze=(0,a.Z)((function*(e,t){return(0,p.isObject)(e.if)&&!Go(e.if)?Ge(yield Fe(e.if,t)):Ve(e,t)}))).apply(this,arguments)}function Je(e,t){return qe(e,{data:t})}var Qe=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 Ye(e){switch(e){case Qe.USE_BRICK_PROPERTIES:case Qe.USE_BRICK_TRANSFORM:case Qe.USE_BRICK_EVENTS:case Qe.USE_BRICK_IF:case Qe.USE_BRICK_LIFECYCLE:case Qe.USE_BRICK_DATA_SOURCE:return!0}return!1}function Xe(e,t,r){if(Ye(e))return e;if(t)switch(e){case Qe.USE_BRICK:return Qe.USE_BRICK_ITEM;case Qe.USE_BRICK_SLOTS_ITEM_BRICKS:return Qe.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM}else switch(e){case Qe.INITIAL:if("useBrick"===r)return Qe.USE_BRICK;break;case Qe.USE_BRICK:case Qe.USE_BRICK_ITEM:case Qe.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM:switch(r){case"properties":return Qe.USE_BRICK_PROPERTIES;case"transform":return Qe.USE_BRICK_TRANSFORM;case"dataSource":return Qe.USE_BRICK_DATA_SOURCE;case"events":return Qe.USE_BRICK_EVENTS;case"slots":return Qe.USE_BRICK_SLOTS;case"children":return Qe.USE_BRICK_SLOTS_ITEM_BRICKS;case"if":return Qe.USE_BRICK_IF;case"lifeCycle":return Qe.USE_BRICK_LIFECYCLE}break;case Qe.USE_BRICK_SLOTS:return Qe.USE_BRICK_SLOTS_ITEM;case Qe.USE_BRICK_SLOTS_ITEM:if("bricks"===r)return Qe.USE_BRICK_SLOTS_ITEM_BRICKS}return Qe.INITIAL}function et(e){var t=!1,r=!1,n=!1;if("string"==typeof e?(0,u.isEvaluable)(e):Go(e)){var o="string"==typeof e?e:e[Ho];t=(0,s.track)(o,"track context","CTX"),r=(0,s.track)(o,"track state","STATE"),n=(0,s.track)(o,"track formstate","FORM_STATE")}return{contextNames:t,stateNames:r,formStateNames:n}}function tt(){return tt=(0,a.Z)((function*(e,t,r){return(0,p.isObject)(e)?Object.fromEntries((yield Promise.all(Object.entries(e).map(function(){var e=(0,a.Z)((function*(e){var[n,o]=e;if(Array.isArray(r)){var{contextNames:a,stateNames:i,formStateNames:s}=et(o);(a||i||s)&&r.push({contextNames:a,stateNames:i,formStateNames:s,propName:n,propValue:o})}var c=yield ea(o,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?Qe.USE_BRICK:Qe.INITIAL});if(void 0!==c&&("style"!==n&&"dataset"!==n||(0,p.isObject)(c)))return[n,c]}));return function(t){return e.apply(this,arguments)}}()))).filter(Boolean)):{}})),tt.apply(this,arguments)}function rt(e,t){if(t)for(var[r,n]of Object.entries(t))switch(r){case"style":case"dataset":for(var[o,a]of Object.entries(n))e[r][o]=a;break;case"constructor":case"__proto__":case"innerHTML":throw new Error("set `".concat(r,"` is prohibited"));default:e[r]=n}}function nt(e,t,r){var n=function(e,t,r){return(0,p.isObject)(e)?Object.fromEntries(Object.entries(e).map((e=>{var[n,o]=e;if(Array.isArray(r)){var{contextNames:a,stateNames:i,formStateNames:s}=et(o);(a||i||s)&&r.push({contextNames:a,stateNames:i,formStateNames:s,propName:n,propValue:o})}var c=ra(o,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?Qe.USE_BRICK:Qe.INITIAL});if(void 0!==c&&("style"!==n&&"dataset"!==n||(0,p.isObject)(c)))return[n,c]})).filter(Boolean)):{}}(t,r);Array.isArray(e)||(e=[e]),e.forEach((e=>{rt(e,n)}))}function ot(e){var t,r;return!(null===(t=e?e.flags:null===(r=vo())||void 0===r?void 0:r.getFeatureFlags())||void 0===t||!t["brick-next-v3-strict-mode"])}function at(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];var a=0===n.length?"":",";e?console.error("".concat(t," is dropped in v3 strict mode").concat(a),...n):console.warn("".concat(t," is deprecated in v3 and will be dropped in strict mode").concat(a),...n)}var it=new Set(["prefix"]),st=new WeakMap,ct=new class{constructor(){(0,m.Z)(this,st,{writable:!0,value:new Map})}define(e,t){var r,n,a,s,c=(0,g.Z)(this,st).has(e);c?console.warn('Custom template of "'.concat(e,'" already registered.')):(c=!!customElements.get(e))&&console.warn('Custom template of "'.concat(e,'" already defined by customElements.'));var l=ot(),u=null!==(r=null===(n=t.proxy)||void 0===n?void 0:n.properties)&&void 0!==r?r:{},p=[],d=[];for(var[f,v]of Object.entries(u))v.asVariable?(at(l,"Template `asVariable`",e,f),l||d.push(f)):v.mergeProperty||v.refTransform?console.error("Template `mergeProperty` and `refTransform` are dropped in v3:",e,f):v.ref&&p.push([f,v]);var h=(0,o.Z)((0,o.Z)({},t),{},{proxy:(0,o.Z)((0,o.Z)({},t.proxy),{},{properties:Object.fromEntries(p)}),state:(t.state?l?t.state:t.state.map((e=>(0,o.Z)({expose:!0},e))):[]).concat(d.map((e=>({name:e,expose:!0}))))});(0,g.Z)(this,st).set(e,(0,o.Z)((0,o.Z)({},h),{},{name:e}));var m,y,w=(m=h.state,(0,i.uniq)(null!==(y=null==m?void 0:m.filter((e=>e.expose)).map((e=>e.name)))&&void 0!==y?y:[])),b=Object.entries(null!==(a=null===(s=h.proxy)||void 0===s?void 0:s.methods)&&void 0!==a?a:{}),E=w.concat(p.map((e=>e[0]))),S=b.map((e=>e[0])),k=E.concat(S).filter((e=>e in HTMLElement.prototype&&!it.has(e)));if(k.length>0&&(at(l,"Using native HTMLElement properties as template properties or methods",e,...k),l))throw new Error('In custom template "'.concat(e,'", ').concat(k.map((e=>'"'.concat(e,'"'))).join(", ")," are native HTMLElement properties, and should be avoid to be used as brick properties or methods."));if(!c){class t extends HTMLElement{get $$typeof(){return"custom-template"}static get _dev_only_definedProperties(){return E}static get _dev_only_definedMethods(){return S}$$getElementByRef(e){var t,r,n,o;return null===(t=this.$$tplStateStore)||void 0===t||null===(r=t.hostBrick)||void 0===r||null===(n=r.tplHostMetadata)||void 0===n||null===(o=n.internalBricksByRef.get(e))||void 0===o?void 0:o.element}connectedCallback(){var e=this.shadowRoot;e||(e=this.attachShadow({mode:"open"}));var t=document.createDocumentFragment(),r=document.createElement("style");r.textContent=":host{display:block}:host([hidden]){display:none}";var n=document.createElement("slot");t.appendChild(r),t.appendChild(n),e.appendChild(t)}disconnectedCallback(){this.shadowRoot&&(this.shadowRoot.textContent="")}}var Z=function(r){if(p.some((e=>e[0]===r)))return console.error('Cannot define an exposed state that is also a proxy property: "'.concat(r,'" in ').concat(e)),"continue";Object.defineProperty(t.prototype,r,{get(){return this.$$tplStateStore.getValue(r)},set(e){var t;null===(t=this.$$tplStateStore)||void 0===t||t.updateValue(r,e,"replace")},enumerable:!0})};for(var I of w)Z(I);var O=function(e,r){Object.defineProperty(t.prototype,e,{get(){var t;return this.$$getElementByRef(r.ref)[null!==(t=r.refProperty)&&void 0!==t?t:e]},set(t){var n,o,a=null===(n=this.$$getElementByRef)||void 0===n?void 0:n.call(this,r.ref);a&&(a[null!==(o=r.refProperty)&&void 0!==o?o:e]=t)},enumerable:!0})};for(var[P,_]of p)O(P,_);var A=function(e,r){Object.defineProperty(t.prototype,e,{value(){var t;this.$$getElementByRef(r.ref)[null!==(t=r.refMethod)&&void 0!==t?t:e](...arguments)},enumerable:!0})};for(var[T,C]of b)A(T,C);customElements.define(e,t)}}get(e){return(0,g.Z)(this,st).get(e)}};function lt(e,t,r){var{tplStateStoreId:n,tplStateStoreMap:o}=e;if(!n)throw new Error('Using "'.concat(t,'" outside of a custom template').concat(null!=r?r:""));var a=o.get(n);if(!a)throw new Error('Template state store is not found when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return a}function ut(e,t,r){var n=lt(e,t,r).hostBrick.element;if(!n)throw new Error('Template host element is gone when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return n}function pt(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function dt(e){return e&&e.sensitive?"":"i"}function ft(e,t,r){return function(e,t,r){void 0===r&&(r={});for(var n=r.strict,o=void 0!==n&&n,a=r.start,i=void 0===a||a,s=r.end,c=void 0===s||s,l=r.encode,u=void 0===l?function(e){return e}:l,p=r.delimiter,d=void 0===p?"/#?":p,f=r.endsWith,v="[".concat(pt(void 0===f?"":f),"]|$"),h="[".concat(pt(d),"]"),m=i?"^":"",g=0,y=e;g<y.length;g++){var w=y[g];if("string"==typeof w)m+=pt(u(w));else{var b=pt(u(w.prefix)),E=pt(u(w.suffix));if(w.pattern)if(t&&t.push(w),b||E)if("+"===w.modifier||"*"===w.modifier){var S="*"===w.modifier?"?":"";m+="(?:".concat(b,"((?:").concat(w.pattern,")(?:").concat(E).concat(b,"(?:").concat(w.pattern,"))*)").concat(E,")").concat(S)}else m+="(?:".concat(b,"(").concat(w.pattern,")").concat(E,")").concat(w.modifier);else"+"===w.modifier||"*"===w.modifier?m+="((?:".concat(w.pattern,")").concat(w.modifier,")"):m+="(".concat(w.pattern,")").concat(w.modifier);else m+="(?:".concat(b).concat(E,")").concat(w.modifier)}}if(c)o||(m+="".concat(h,"?")),m+=r.endsWith?"(?=".concat(v,")"):"$";else{var k=e[e.length-1],Z="string"==typeof k?h.indexOf(k[k.length-1])>-1:void 0===k;o||(m+="(?:".concat(h,"(?=").concat(v,"))?")),Z||(m+="(?=".concat(h,"|").concat(v,")"))}return new RegExp(m,dt(r))}(function(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:r,value:e[r++]});else{var o=1,a="";if("?"===e[s=r+1])throw new TypeError('Pattern cannot start with "?" at '.concat(s));for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--o){s++;break}}else if("("===e[s]&&(o++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at ".concat(s));a+=e[s++]}else a+=e[s++]+e[s++];if(o)throw new TypeError("Unbalanced pattern at ".concat(r));if(!a)throw new TypeError("Missing pattern at ".concat(r));t.push({type:"PATTERN",index:r,value:a}),r=s}else{for(var i="",s=r+1;s<e.length;){var c=e.charCodeAt(s);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;i+=e[s++]}if(!i)throw new TypeError("Missing parameter name at ".concat(r));t.push({type:"NAME",index:r,value:i}),r=s}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,o=void 0===n?"./":n,a="[^".concat(pt(t.delimiter||"/#?"),"]+?"),i=[],s=0,c=0,l="",u=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},p=function(e){var t=u(e);if(void 0!==t)return t;var n=r[c],o=n.type,a=n.index;throw new TypeError("Unexpected ".concat(o," at ").concat(a,", expected ").concat(e))},d=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t};c<r.length;){var f=u("CHAR"),v=u("NAME"),h=u("PATTERN");if(v||h){var m=f||"";-1===o.indexOf(m)&&(l+=m,m=""),l&&(i.push(l),l=""),i.push({name:v||s++,prefix:m,suffix:"",pattern:h||a,modifier:u("MODIFIER")||""})}else{var g=f||u("ESCAPED_CHAR");if(g)l+=g;else if(l&&(i.push(l),l=""),u("OPEN")){m=d();var y=u("NAME")||"",w=u("PATTERN")||"",b=d();p("CLOSE"),i.push({name:y||(w?s++:""),pattern:y&&!w?a:w,prefix:m,suffix:b,modifier:u("MODIFIER")||""})}else p("END")}}return i}(e,r),t,r)}function vt(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,o=r.exec(e.source);o;)t.push({name:o[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),o=r.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,r){var n=e.map((function(e){return vt(e,t,r).source}));return new RegExp("(?:".concat(n.join("|"),")"),dt(r))}(e,t,r):ft(e,t,r)}var ht=new Map,mt=1e4,gt=0;function yt(e,t){var{path:r,exact:n=!1,strict:o=!1,sensitive:a=!0}=t;return(Array.isArray(r)?r:[r]).reduce(((t,r)=>{if(t)return t;var{regexp:i,keys:s}=function(e,t){var r="".concat(t.end).concat(t.strict).concat(t.sensitive),n=ht.get(r);n||ht.set(r,n=new Map);var o=n.get(e);if(o)return o;var a=[],i={regexp:vt(e,a,t),keys:a};return gt<mt&&(n.set(e,i),gt++),i}(r,{end:n,strict:o,sensitive:a}),c=i.exec(e);if(!c)return null;var[l,...u]=c,p=e===l;return n&&!p?null:{path:r,url:"/"===r&&""===l?"/":l,isExact:p,params:s.reduce(((e,t,r)=>(e[t.name]=u[r],e)),{})}}),null)}function wt(){return(wt=(0,a.Z)((function*(e,t){for(var r of e){if("string"!=typeof r.path)throw console.error("Invalid route with invalid path:",r),new Error("Invalid route with invalid type of path: ".concat(typeof r.path));var n=r.path.replace(/^\$\{APP.homepage\}/,t.app.homepage),o=yt(t.location.pathname,{path:n,exact:r.exact});if(o&&(yield Ve(r,t)))return t.app.noAuthGuard||r.public||ya()?{match:o,route:r}:"unauthenticated"}return"missed"}))).apply(this,arguments)}var bt,Et=Symbol.for("tpl.asyncComputedPropsFromHost"),St=Symbol.for("tpl.stateStoreId"),kt=Symbol.for("tpl.externalForEachItem"),Zt=r(6666),It=new Set,Ot=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}({}),Pt={[Ot.REQUEST_FAILED]:"Request Failed",[Ot.SOMETHING_WENT_WRONG]:"Something went wrong!",[Ot.LOGIN_TIMEOUT_MESSAGE]:"You haven't logged in or your login session has expired. Login right now?",[Ot.NETWORK_ERROR]:"Network error, please check your network."},_t={[Ot.REQUEST_FAILED]:"请求失败",[Ot.SOMETHING_WENT_WRONG]:"出现了一些问题!",[Ot.LOGIN_TIMEOUT_MESSAGE]:"您还未登录或登录信息已过期,现在重新登录?",[Ot.NETWORK_ERROR]:"网络错误,请检查您的网络连接。"},At="core/runtime",Tt={en:Pt,zh:_t};function Ct(e){go([e]).then((()=>{bt=document.createElement(e)}),(e=>{console.error("Load dialog service failed:",e)}))}var Rt=Object.freeze({show:function(e){return bt?bt.resolve(e):"confirm"===e.type?confirm(e.content)?new Promise((e=>setTimeout((()=>{e()}),1))):new Promise(((e,t)=>setTimeout((()=>{t()}),1))):(alert(e.content),new Promise((e=>setTimeout((()=>{e()}),1e3))))}});function Mt(e){if(e instanceof Event&&e.target instanceof HTMLScriptElement)return e.target.src;if(e instanceof c.HttpFetchError)return b.i18n.t("".concat(At,":").concat(Ot.NETWORK_ERROR));if(e instanceof c.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 c.HttpResponseError&&401===e.response.status&&!!e.responseJson&&100003===e.responseJson.code}var Lt,Bt,Nt=!1;function Ut(e){if(!(e instanceof c.HttpAbortError)){if(xt(e)&&!window.NO_AUTH_GUARD){if(Nt)return;return Nt=!0,void Rt.show({type:"confirm",content:b.i18n.t("".concat(At,":").concat(Ot.LOGIN_TIMEOUT_MESSAGE))}).then((()=>{var e,t;e=vo().getFeatureFlags()["sso-enabled"],(t=we()).push(e?"/sso-auth/login":"/auth/login",{from:(0,o.Z)((0,o.Z)({},t.location),{},{state:void 0})}),Nt=!1}),(()=>{Nt=!1}))}console.error(e);var t=Mt(e);t!==Lt&&(Lt=t,Rt.show({type:"error",title:b.i18n.t("".concat(At,":").concat(Ot.REQUEST_FAILED)),content:t,contentStyle:{whiteSpace:"pre-wrap"}}).then((()=>{Lt=void 0})))}}function jt(e){go([e]).then((()=>{Bt=document.createElement(e)}),(e=>{console.error("Load notification service failed:",e)}))}var $t=Object.freeze({show:function(e){Bt?Bt.resolve(e):alert(e.message)}});function Ft(e,t,r){t&&Object.entries(t).forEach((t=>{var[n,o]=t,a=Vt(o,r,{element:e});for(var i of(e.addEventListener(n,a),e.$$listeners||(e.$$listeners=[]),e.$$listeners.push([n,a]),e.$$eventListeners||(e.$$eventListeners=[]),[].concat(o)))e.$$eventListeners.push([n,null,i])}))}function Dt(e){return"string"==typeof e.action}function Kt(e){return"string"==typeof e.useProvider}function Wt(e){return!(!e.target&&!e.targetRef||!e.method&&!e.properties)}function Vt(e,t,r){return function(n){for(var a of[].concat(e))if(qe(a,(0,o.Z)((0,o.Z)({},t),{},{event:n})))if(Dt(a)){var[i,s]=a.action.split(".");switch(a.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":Qt(n,s,a.args,a.callback,t);break;case"window.open":Yt(n,a.args,t);break;case"location.reload":case"location.assign":tr(n,s,a.args,t);break;case"localStorage.setItem":case"localStorage.removeItem":case"sessionStorage.setItem":case"sessionStorage.removeItem":rr(n,i,s,a.args,t);break;case"event.preventDefault":n.preventDefault();break;case"console.log":case"console.error":case"console.warn":case"console.info":nr(n,s,a.args,t);break;case"message.success":case"message.error":case"message.info":case"message.warn":or(n,s,a.args,t);break;case"handleHttpError":Ut(n.detail);break;case"context.assign":case"context.replace":case"context.refresh":case"context.load":Xt(n,s,a.args,a.callback,t);break;case"state.update":case"state.refresh":case"state.load":er(n,s,a.args,a.callback,t);break;case"tpl.dispatchEvent":var[c,l]=ir(a.args,t,n);ut(t,a.action,": ".concat(c)).dispatchEvent(new CustomEvent(c,l));break;case"theme.setDarkTheme":case"theme.setLightTheme":N("theme.setDarkTheme"===a.action?"dark":"light");break;case"theme.setTheme":var[u]=ir(a.args,t,n);N(u);break;case"mode.setDashboardMode":case"mode.setDefaultMode":K("mode.setDashboardMode"===a.action?"dashboard":"default");break;default:console.error("unknown event listener action:",a.action)}}else Kt(a)?Ht(n,a,t,r):Wt(a)?Gt(n,a,t,r):console.error("unknown event handler:",a)}}function Ht(e,t,r,n){return qt.apply(this,arguments)}function qt(){return(qt=(0,a.Z)((function*(e,t,r,n){try{zt(e,yield Ue(t.useProvider),t,"saveAs"!==t.method?"resolve":"saveAs",r,n)}catch(e){console.error(Mt(e))}}))).apply(this,arguments)}function Gt(e,t,r,n){var a=[],i=t.target,s=t.targetRef,c=i;if(("string"==typeof i?(0,u.isEvaluable)(i):Go(i))&&(c=ra(i,(0,o.Z)((0,o.Z)({},r),{},{event:e}))),"string"==typeof c)if("_self"===c)a.push(n.element);else if(t.multiple)a=Array.from(document.querySelectorAll(c));else{var l=document.querySelector(c);null!==l&&a.push(l)}else if(c)c instanceof HTMLElement?a.push(c):console.error("unexpected target:",c);else if(s){var p=s;("string"==typeof s?(0,u.isEvaluable)(s):Go(s))&&(p=ra(s,(0,o.Z)((0,o.Z)({},r),{},{event:e})));var d=[].concat(p),f=ut(r,"targetRef",": ".concat(d.join(", ")));a.push(...d.map((e=>{var t;return null===(t=f.$$getElementByRef)||void 0===t?void 0:t.call(f,e)})).filter(Boolean))}0!==a.length?function(e){return!!e.method}(t)?a.forEach((o=>{zt(e,o,t,t.method,r,n,{useEventAsDefault:!0})})):function(e){return!!e.properties}(t)&&nt(a,t.properties,(0,o.Z)((0,o.Z)({},r),{},{event:e})):console.error("target not found:",i||s)}function zt(e,t,r,n,o,a,i){return Jt.apply(this,arguments)}function Jt(){return Jt=(0,a.Z)((function*(e,t,r,n,i,s,c){var l;if("function"==typeof t[n]){var u=function(){var o=(0,a.Z)((function*(){var o=ir(r.args,i,e,c);return Kt(r)&&(o=yield Te(r.useProvider,o,n)),t[n](...o)}));return function(){return o.apply(this,arguments)}}();if(r.callback){var p,d=ar(r.callback,i,s),f={progress:d("progress"),success:d("success"),error:d("error"),finally:d("finally")};if(Kt(r)&&(p=ra(r.poll,(0,o.Z)((0,o.Z)({},i),{},{event:e}))),null!==(l=p)&&void 0!==l&&l.enabled)!function(e,t,r){var n,{progress:o,success:i,error:s,finally:c}=t,{interval:l,leadingRequestDelay:u,continueOnError:p,delegateLoadingBar:d,expectPollEnd:f,expectPollStopImmediately:v}=r,h=yo();function m(){return g.apply(this,arguments)}function g(){return(g=(0,a.Z)((function*(){var t;It.delete(n);try{if(!(t=null==v?void 0:v())){var r=yield e();(t=(null==v?void 0:v())||h!==yo())||(null==o||o(r),null!=f&&f(r)?(d&&window.dispatchEvent(new Event("request.end")),null==i||i(r),null==c||c()):y(null!=l?l:3e3))}}catch(e){(t=(null==v?void 0:v())||h!==yo())||(null==s||s(e),p?y(null!=l?l:3e3):null==c||c())}finally{d&&t&&window.dispatchEvent(new Event("request.end"))}}))).apply(this,arguments)}function y(e){n=setTimeout(m,e),It.add(n)}y(null!=u?u:0),d&&window.dispatchEvent(new Event("request.start"))}(u,f,p);else try{var v=yield u();f.success(v)}catch(e){f.error(e)}finally{f.finally()}}else u()}else console.error("target has no method:",{target:t,method:n})})),Jt.apply(this,arguments)}function Qt(e,t,r,n,o){var a=0,i=!1,s=t;switch(t){case"push":case"replace":case"pushQuery":case"replaceQuery":case"pushAnchor":a=2,i=!0;break;case"reload":i=!0;break;case"block":a=1,s="setBlockMessage"}var c=[];if(a>0&&((c=ir(r,o,e,{useEventDetailAsDefault:!0})).length=a),i&&n){var l=ar(n,o,void 0);c.push((e=>{l(e?"error":"success")({blocked:e}),l("finally")({blocked:e})}))}we()[s](...c)}function Yt(e,t,r){var[n,o,a]=ir(t,r,e);window.open(n,o||"_self",a)}function Xt(e,t,r,n,o){var[a,i]=ir(r,o,e);o.ctxStore.updateValue(a,i,t,n,o)}function er(e,t,r,n,o){var[a,i]=ir(r,o,e);lt(o,"state.".concat(t),": ".concat(a)).updateValue(a,i,"update"===t?"replace":t,n,o)}function tr(e,t,r,n){if("assign"===t){var[o]=ir(r,n,e);location.assign(o)}else location[t]()}function rr(e,t,r,n,o){var a="localStorage"===t?localStorage:sessionStorage,[i,s]=ir(n,o,e);"setItem"===r?void 0!==s&&a.setItem(i,JSON.stringify(s)):a.removeItem(i)}function nr(e,t,r,n){console[t](...ir(r,n,e,{useEventAsDefault:!0}))}function or(e,t,r,n){var o=ir(r,n,e,{useEventAsDefault:!0});$t.show({type:t,message:o[0]})}function ar(e,t,r){return function(n){return function(o){var a=null==e?void 0:e[n];if(a)try{var i=new CustomEvent("callback.".concat(n),{detail:o});Vt(a,t,r)(i)}catch(e){console.error(e)}else"error"===n&&console.error("Unhandled callback error:",o)}}}function ir(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Array.isArray(e)?ra(e,(0,o.Z)((0,o.Z)({},t),{},{event:r})):n.useEventAsDefault?[r]:n.useEventDetailAsDefault?[r.detail]:[]}class sr{constructor(e,t){(0,Zt.Z)(this,"type",void 0),(0,Zt.Z)(this,"data",new Map),(0,Zt.Z)(this,"changeEventType",void 0),(0,Zt.Z)(this,"pendingStack",[]),(0,Zt.Z)(this,"hostBrick",void 0),this.type=e,this.changeEventType="FORM_STATE"===this.type?"formstate.change":"STATE"===this.type?"state.change":"context.change",this.hostBrick=t}getValue(e){var t;return null===(t=this.data.get(e))||void 0===t?void 0:t.value}updateValue(e,t,r,n,a){var i=this.data.get(e);if(!i)throw new Error("".concat(this.type," '").concat(e,"' is not defined"));if("refresh"!==r&&"load"!==r)"replace"===r?i.value=t:(0,p.isObject)(i.value)?Object.assign(i.value,t):(console.warn('Non-object current value of "'.concat(this.type,".").concat(e,'" for "context.assign", try "context.replace" instead.')),i.value=t),i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}));else{if(!i.load)throw new Error("You can not ".concat(r,' "').concat(this.type,".").concat(e,'" which has no resolve'));var s;if("load"===r&&(i.loaded?s=Promise.resolve(i.value):i.loading&&(s=i.loading)),s||(s=i.loading=i.load((0,o.Z)({cache:"load"===r?"default":"reload"},t))).then((e=>{i.loaded=!0,i.value=e,i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}))}),(e=>{null!=n&&n.error||Ut(e)})),n){var c=ar(n,a);s.then((e=>{c("success")({value:e}),c("finally")()}),(e=>{c("error")(e),c("finally")()}))}}}define(e,t,r){if(Array.isArray(e)&&e.length>0){var n=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"CTX",n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CTX",r=new Map;for(var n of e){var o=(0,s.collectMemberUsage)([n.if,n.value,n.resolve],t);r.set(n,o)}return r}(e,r),o=new Map;for(var i of Array.from(n.keys()).map((e=>e.name))){var c;o.set(i,(null!==(c=o.get(i))&&void 0!==c?c:0)+1)}var l=Array.from(n.values()).some((e=>e.hasNonStaticUsage)),u=new WeakSet,p=new Map,d=new Map([...new Set(e.map((e=>e.name)))].map((e=>[e,new Promise(((t,r)=>{p.set(e,{resolve:t,reject:r})}))]))),f=function(){var e=(0,a.Z)((function*(e){var r;u.add(e);var a=yield t(e);n.delete(e);var i=null!==(r=o.get(e.name))&&void 0!==r?r:0;if(a){if(p.get(e.name).resolve(),o.delete(e.name),0===i)throw new Error("Duplicated context defined: ".concat(e.name))}else 1===i?(p.get(e.name).resolve(),o.delete(e.name)):o.set(e.name,i-1);yield h()}));return function(t){return e.apply(this,arguments)}}(),v=l;function h(){return m.apply(this,arguments)}function m(){return m=(0,a.Z)((function*(){var e=Array.from(n.entries()).filter(function(e,t){return(r,n)=>t?0===n:![...r[1].usedProperties].some((t=>e.has(t)))}(o,v)).map((e=>e[0])).filter((e=>!u.has(e)));yield Promise.all(e.map(f))})),m.apply(this,arguments)}return{pendingResult:h().then((0,a.Z)((function*(){for(var e of(n.size>0&&(function(e,t){var r=new Map(e),n=new Set(Array.from(r.keys()).map((e=>e.name))),o=()=>{var e=!1;for(var[t,a]of r.entries())[...a.usedProperties].some((e=>n.has(e)))||(r.delete(t),n.delete(t.name),e=!0);e&&o()};if(o(),r.size>0)throw new ReferenceError("Circular ".concat(t," detected: ").concat(Array.from(r.keys()).map((e=>e.name)).join(", ")))}(n,r),v=!0,yield h()),p.values()))e.resolve()}))).catch((e=>{for(var t of p.values())t.reject(e);throw e})),pendingContexts:d}}(e,(e=>this.resolve(e,t,r)),this.type);this.pendingStack.push(n)}}onChange(e,t){var r;null===(r=this.data.get(e))||void 0===r||r.eventTarget.addEventListener(this.changeEventType,t)}waitFor(e){var t=this;return(0,a.Z)((function*(){var r=function*(t){yield Promise.all([...e].map((e=>t.get(e))))};for(var{pendingContexts:n}of t.pendingStack)yield*r(n)}))()}waitForAll(){var e=this;return(0,a.Z)((function*(){for(var{pendingResult:t}of e.pendingStack)yield t}))()}resolve(e,t,r){var n=this;return(0,a.Z)((function*(){if(!(yield Ve(e,t)))return!1;var i,c;if("STATE"===n.type&&r&&e.expose){var l=yield r;(0,p.hasOwnProperty)(l,e.name)&&(i=l[e.name])}var u=!1;if(void 0===i){if(e.resolve){var d=(0,o.Z)({transform:"value"},e.resolve);if(yield Ve(e.resolve,t))c=function(){var e=(0,a.Z)((function*(e){return(yield Fe(d,t,e)).value}));return function(t){return e.apply(this,arguments)}}(),(u=e.resolve.lazy)||(i=yield c());else if(!(0,p.hasOwnProperty)(e,"value"))return!1}c&&!u||void 0===e.value||(i=yield ea(e.value,t))}var f={value:i,eventTarget:new EventTarget,load:c,loaded:!u};if(e.onChange&&f.eventTarget.addEventListener(n.changeEventType,Vt(e.onChange,t)),e.track&&"FORM_STATE"!==n.type){var v=(0,s.strictCollectMemberUsage)(c?e.resolve:e.value,n.type);for(var h of v)n.onChange(h,(()=>{c?n.updateValue(e.name,{cache:"default"},"refresh"):n.updateValue(e.name,ra(e.value,t),"replace")}))}if(n.data.has(e.name))throw new Error("".concat(n.type," '").concat(e.name,"' has already been declared"));return n.data.set(e.name,f),!0}))()}}function cr(e,t,r){var n,{reversedProxies:o,asyncHostProperties:a,externalSlots:s,tplStateStoreId:c,hostBrick:l}=e;if(t&&o){var u=o.properties.get(t);u&&(n=a.then((e=>{var t={};for(var{from:r,to:n}of u){var o=e[r];void 0!==o&&n.refProperty&&(t[n.refProperty]=o)}return t})));var d=o.slots.get(t);if(d&&s){var f=new Map;for(var{from:v,to:h}of d){var m,g,y,w,b=null!==(m=null===(g=s[v])||void 0===g?void 0:g.bricks)&&void 0!==m?m:[];if(b.length){var E=null!==(y=h.refSlot)&&void 0!==y?y:v,S=f.get(E);if(!S){S=[];for(var k=(0,p.hasOwnProperty)(r,E)?r[E].bricks.length+1:1,Z=0;Z<k;Z+=1)S.push([]);f.set(E,S)}var I=null!==(w=h.refPosition)&&void 0!==w?w:-1;S[(0,i.clamp)(I<0?S.length+I:I,0,S.length-1)].push(...(0,p.hasOwnProperty)(l.runtimeContext,"forEachItem")?lr(b,l.runtimeContext.forEachItem):b)}}var O=function(){(0,p.hasOwnProperty)(r,P)||(r[P]={type:"bricks",bricks:[]});var e=r[P];e.bricks=_.flatMap(((t,r)=>r<e.bricks.length?t.concat(e.bricks[r]):t)),0===e.bricks.length&&delete r[P]};for(var[P,_]of f.entries())O()}}return{[Et]:n,[St]:c}}function lr(e,t){return e.map((e=>{var r;return(0,o.Z)((0,o.Z)({},e),{},{[kt]:t,slots:Object.fromEntries(Object.entries(null!==(r=e.slots)&&void 0!==r?r:{}).map((e=>{var r,[n,o]=e;return[n,"routes"===o.type?{type:"routes",routes:ur(o.routes,t)}:{type:"bricks",bricks:lr(null!==(r=o.bricks)&&void 0!==r?r:[],t)}]})))})}))}function ur(e,t){return e.map((e=>e.type&&"bricks"!==e.type?e:(0,o.Z)((0,o.Z)({},e),{},{bricks:lr(e.bricks,t)})))}var pr=["properties","slots","children"];function dr(e,t){function r(e){return(0,p.isObject)(e)?Array.isArray(e)?e.map(r):Object.fromEntries(Object.entries(e).map((e=>{var[t,o]=e;return(0,p.isObject)(o)&&"useBrick"===t?Array.isArray(o)?[t,o.map(n)]:[t,n(o)]:[t,r(o)]})).concat(Object.getOwnPropertySymbols(e).map((t=>[t,e[t]])))):e}function n(e){var{properties:a,slots:i,children:s}=e,c=(0,f.Z)(e,pr),l=_r(s,i),u=Object.fromEntries(Object.entries(null!=l?l:{}).map((e=>{var t,[r,o]=e;return[r,{type:"bricks",bricks:(null!==(t=o.bricks)&&void 0!==t?t:[]).map(n)}]})));return(0,o.Z)((0,o.Z)({},c),{},{properties:r(a),slots:u},cr(t,c.ref,u))}return r(e)}var fr=["slots","children"],vr=["properties","slots","children"];function hr(e,t,r,n){var a=(0,i.uniqueId)("tpl-state-"),s=(0,o.Z)((0,o.Z)({},r.runtimeContext),{},{tplStateStoreId:a});delete s.forEachItem;var c=new sr("STATE",r);s.tplStateStoreMap.set(a,c),s.tplStateStoreScope&&s.tplStateStoreScope.push(c);var{bricks:l,proxy:u,state:p,contracts:d}=ct.get(e);!function(e){Pe(e,Oe)}(d),c.define(p,s,n);var{slots:v,children:h}=t,m=(0,f.Z)(t,fr),g=(0,o.Z)((0,o.Z)({},m),{},{brick:e});r.tplHostMetadata={internalBricksByRef:new Map,tplStateStoreId:a,proxy:u};var y={properties:new Map,slots:new Map};if(null!=u&&u.properties)for(var[w,b]of Object.entries(u.properties)){var E=y.properties.get(b.ref);E||(E=[],y.properties.set(b.ref,E)),E.push({from:w,to:b})}if(null!=u&&u.slots)for(var[S,k]of Object.entries(u.slots)){var Z=y.slots.get(k.ref);Z||(Z=[],y.slots.set(k.ref,Z)),Z.push({from:S,to:k})}var I={reversedProxies:y,asyncHostProperties:n,externalSlots:_r(h,v),tplStateStoreId:a,hostBrick:r};return g.slots={"":{type:"bricks",bricks:l.map((e=>mr(e,I)))}},g}function mr(e,t){null===e.if&&delete e.if;var{properties:r,slots:n,children:a}=e,i=(0,f.Z)(e,vr),s=_r(a,n),c=Object.fromEntries(Object.entries(null!=s?s:{}).map((e=>{var r,[n,o]=e;return[n,{type:"bricks",bricks:(null!==(r=o.bricks)&&void 0!==r?r:[]).map((e=>mr(e,t)))}]})));return(0,o.Z)((0,o.Z)({},i),{},{properties:dr(r,t),slots:c},cr(t,i.ref,c))}var gr=function(e){return e[e.ROOT=1]="ROOT",e[e.BRICK=2]="BRICK",e}({}),yr=["blockingList","node","menuRequests","hasTrackingControls"];function wr(e,t,r,n,o){return br.apply(this,arguments)}function br(){return br=(0,a.Z)((function*(e,t,r,n,a){var i=yield function(e,t){return wt.apply(this,arguments)}(t,r),s={blockingList:[],menuRequests:[]};switch(i){case"missed":break;case"unauthenticated":s.unauthenticated=!0;break;default:var c=s.route=i.route,l=(0,o.Z)((0,o.Z)({},r),{},{match:i.match});switch(l.ctxStore.define(c.context,l),l.pendingPermissionsPreCheck.push(ca(c,l)),c.type){case"redirect":var u;if("string"!=typeof(u="string"==typeof c.redirect?yield ea(c.redirect,l):(yield Fe((0,o.Z)({transform:"redirect"},c.redirect),l)).redirect))throw console.error("Unexpected redirect result:",u),new Error("Unexpected type of redirect result: ".concat(typeof u));s.redirect={path:u};break;case"routes":s.menuRequests.push(Or(c.menu,l)),Pr(s,yield wr(e,c.routes,l,n,a));break;default:s.menuRequests.push(Or(c.menu,l)),Pr(s,yield Er(e,c.bricks,l,n,a))}}return s})),br.apply(this,arguments)}function Er(e,t,r,n,o,a,i){return Sr.apply(this,arguments)}function Sr(){return(Sr=(0,a.Z)((function*(e,t,r,n,o,a,i){var s={blockingList:[],menuRequests:[]};return(yield Promise.all(t.map(((t,i)=>kr(e,t,r,n,o,i,a&&new Map(a)))))).forEach(((t,r)=>{!i&&t.hasTrackingControls&&n.memoizeControlNode(o,r,t.node,e),Pr(s,t)})),s}))).apply(this,arguments)}function kr(e,t,r,n,o,a){return Zr.apply(this,arguments)}function Zr(){return Zr=(0,a.Z)((function*(e,t,r,n,s,c){var l,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:new Map,d={blockingList:[],menuRequests:[]};if(!t.brick)return t.template?console.error("Legacy templates are dropped in v3:",t):console.error("Invalid brick:",t),d;var f=t[St],h=(0,o.Z)((0,o.Z)({},r),{},{tplStateStoreId:f});(0,p.hasOwnProperty)(t,kt)&&(h.forEachItem=t[kt]);var{context:m}=t;if(Array.isArray(m)&&m.length>0){var g=ot(h);at(g,"Defining context on bricks","check your brick:",t),g||h.ctxStore.define(m,h)}if(h.pendingPermissionsPreCheck.push(ca(t,h)),!(yield function(e,t){return ze.apply(this,arguments)}(t,h)))return d;var y=t.brick;if(y.startsWith(":")){!function(e){if(":forEach"!==e&&":if"!==e&&":switch"!==e)throw new Error('Unknown storyboard control node: "'.concat(e,'"'))}(y);var{dataSource:w}=t,b=function(){var r=(0,a.Z)((function*(){var r,o=yield ea(w,h),a=":forEach"===y?"":":switch"===y?String(o):o?"":"else",i=_r(t.children,t.slots),c=i&&(0,p.hasOwnProperty)(i,a)&&(null===(r=i[a])||void 0===r?void 0:r.bricks);if(!Array.isArray(c))return d;switch(y){case":forEach":return Array.isArray(o)?function(e,t,r,n,o,a,i){return Ir.apply(this,arguments)}(e,o,c,h,n,s,u):d;case":if":case":switch":return Er(e,c,h,n,s,u,!0)}}));return function(){return r.apply(this,arguments)}}(),E=yield b(),{contextNames:S,stateNames:k}=et(w);if(S||k){E.hasTrackingControls=!0;var Z=0,I=function(){var t=(0,a.Z)((function*(){var t=++Z,r=yield b();r.blockingList.push(...[...h.tplStateStoreMap.values()].map((e=>e.waitForAll())),...h.pendingPermissionsPreCheck),yield Promise.all(r.blockingList),Z===t&&n.rerenderControlNode(s,c,r.node,e)}));return function(){return t.apply(this,arguments)}}(),O=(0,i.debounce)(I);if(S)for(var P of S)h.ctxStore.onChange(P,O);if(k)for(var _ of k)lt(h,"STATE",': "'.concat(w,'"')).onChange(_,O)}return E}/\.tpl-/.test(y)&&!ct.get(y)&&(yield(0,v.loadBricksImperatively)([y],mo()));var A=function(e,t){if(!e.includes(".")&&e.startsWith("tpl-")&&t){var r="".concat(t,".").concat(e);if(ct.get(r))return r}return!!ct.get(e)&&e}(y,null===(l=h.app)||void 0===l?void 0:l.id);if(A){var T,C=null!==(T=u.get(A))&&void 0!==T?T:0;if(C>=10)throw new Error('Maximum custom template stack overflowed: "'.concat(A,'"'));u.set(A,C+1)}else y.includes("-")&&!customElements.get(y)&&d.blockingList.push((0,v.enqueueStableLoadBricks)([y],mo()));var R={tag:gr.BRICK,type:A||y,return:e,slotId:s,events:t.events,runtimeContext:h,portal:t.portal,iid:t.iid,ref:t.ref};d.node=R;var M=[],x=[],L=function(){var e=(0,a.Z)((function*(){R.properties=yield function(e,t,r){return tt.apply(this,arguments)}(t.properties,h,x);var e=t[Et];if(e){var r;null!==(r=R.properties)&&void 0!==r||(R.properties={});var n=yield e;for(var[o,a]of Object.entries(n))R.properties[o]=a}return function(e,t){var r=function(t){var r=()=>{e.element&&nt(e.element,{[t.propName]:t.propValue},e.runtimeContext)};if(t.contextNames)for(var n of t.contextNames)e.runtimeContext.ctxStore.onChange(n,r);if(t.stateNames){var o=lt(e.runtimeContext,"STATE",': "'.concat(t.propValue,'"'));for(var a of t.stateNames)o.onChange(a,r)}};for(var n of t)r(n)}(R,x),R.properties}));return function(){return e.apply(this,arguments)}}(),B=L();M.push(B),n.registerBrickLifeCycle(R,t.lifeCycle);var N,U=t;A&&(U=hr(A,t,R,B)),U.portal&&(R.slotId=void 0),A?delete(N=(0,o.Z)({},h)).forEachItem:N=h;var j=function(){var e=(0,a.Z)((function*(){var e=_r(U.children,U.slots);if(e){var t=yield Promise.all(Object.entries(e).map((e=>{var[t,r]=e;return"routes"!==r.type?Er(R,r.bricks,N,n,t,u):wr(R,r.routes,N,n,t)}))),r=(0,o.Z)((0,o.Z)({},d),{},{node:void 0,blockingList:[]});for(var a of t)Pr(r,a);r.node&&(R.child=r.node),Pr(d,(0,o.Z)((0,o.Z)({},r),{},{node:void 0}))}}));return function(){return e.apply(this,arguments)}}();return M.push(j()),yield Promise.all(M),d})),Zr.apply(this,arguments)}function Ir(){return(Ir=(0,a.Z)((function*(e,t,r,n,a,i,s){var c={blockingList:[],menuRequests:[]},l=yield Promise.all(t.map(((t,c)=>Promise.all(r.map(((r,l)=>kr(e,r,(0,o.Z)((0,o.Z)({},n),{},{forEachItem:t}),a,i,c*l,s&&new Map(s))))))));for(var u of l.flat())Pr(c,u);return c}))).apply(this,arguments)}function Or(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 ea(e,t);console.warn("Set menu with resolve is not supported in v3 yet:",e)}}function Pr(e,t){var{blockingList:r,node:n,menuRequests:o,hasTrackingControls:a}=t,i=(0,f.Z)(t,yr);if(e.blockingList.push(...r),e.menuRequests.push(...o),n)if(e.node){for(var s=e.node;s.sibling;)s=s.sibling;s.sibling=n}else e.node=n;Object.assign(e,i)}function _r(e,t){var r=t;if(Array.isArray(e)&&!r)for(var n of(r={},e)){var o,a=null!==(o=n.slot)&&void 0!==o?o:"";(0,p.hasOwnProperty)(r,a)||(r[a]={type:"bricks",bricks:[]}),r[a].bricks.push(n)}return r}function Ar(e){var t,{ref:r,runtimeContext:n,element:o}=e;if(r&&n.tplStateStoreId){var{hostBrick:a}=lt(n,"bindTemplateProxy"),i=a.tplHostMetadata;i.internalBricksByRef.set(r,e);var s=null===(t=i.proxy)||void 0===t?void 0:t.events;if(s){var c=function(e){if(u.ref===r){var t,n,i,s=t=>{t.bubbles&&t.stopPropagation(),a.element.dispatchEvent(new CustomEvent(e,{detail:t.detail,bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed}))},c=null!==(t=u.refEvent)&&void 0!==t?t:e;o.addEventListener(c,s),null!==(i=(n=o).$$proxyListeners)&&void 0!==i||(n.$$proxyListeners=[]),o.$$proxyListeners.push([c,s])}};for(var[l,u]of Object.entries(s))c(l)}}}function Tr(e){var{ref:t,runtimeContext:r,element:n}=e;if(r.tplStateStoreId&&t){var{hostBrick:o}=lt(r,"unbindTemplateProxy"),a=o.tplHostMetadata;for(var[i,s]of(a.internalBricksByRef.delete(t),null!==(c=n.$$proxyListeners)&&void 0!==c?c:[])){var c;n.removeEventListener(i,s)}delete n.$$proxyListeners}}function Cr(e){e.innerHTML=""}function Rr(e,t){for(var r=e.child,n=[];r;){var o=r.type;o.includes("-")&&!customElements.get(o)&&console.error("Undefined custom element: ".concat(o)),"basic-bricks.script-brick"===o&&console.warn("`basic-bricks.script-brick` is deprecated, please take caution when using it");var a=t&&r===e.child?t:document.createElement(o);if(r.element=a,r.slotId&&a.setAttribute("slot",r.slotId),r.iid&&(a.dataset.iid=r.iid),rt(a,r.properties),Ft(a,r.events,r.runtimeContext),r.tplHostMetadata&&(a.$$tplStateStore=lt({tplStateStoreId:r.tplHostMetadata.tplStateStoreId,tplStateStoreMap:r.runtimeContext.tplStateStoreMap},"mount")),Ar(r),r.portal?n.push(a):r.return&&(r.return.childElements||(r.return.childElements=[]),r.return.childElements.push(a)),r.child)r=r.child;else if(r.sibling)r=r.sibling;else{for(var i,s=r.return;s;){var c;if(s.childElements)s.tag===gr.ROOT?(null===(c=s.container)||void 0===c||c.append(...s.childElements),n.length>0&&("function"==typeof s.createPortal?s.createPortal():s.createPortal).append(...n)):s.element.append(...s.childElements),s.childElements=void 0;if(s.sibling)break;s=s.return}r=null===(i=s)||void 0===i?void 0:i.sibling}}}var Mr,xr=["onMount","onUnmount","onMediaChange","onScrollIntoView"],Lr=["onBeforePageLoad","onPageLoad","onPageLeave","onBeforePageLeave","onAnchorLoad","onAnchorUnload"],Br=new WeakMap,Nr=new WeakMap,Ur=new WeakMap,jr=new WeakMap,$r=new WeakSet,Fr=new WeakSet,Dr=new WeakSet,Kr=new WeakSet;class Wr{constructor(e){(0,be.Z)(this,Kr),(0,be.Z)(this,Dr),(0,be.Z)(this,Fr),(0,be.Z)(this,$r),(0,Zt.Z)(this,"scope",void 0),(0,m.Z)(this,Br,{writable:!0,value:{onBeforePageLoad:[],onPageLoad:[],onPageLeave:[],onBeforePageLeave:[],onAnchorLoad:[],onAnchorUnload:[],onMediaChange:[],onScrollIntoView:[],onMount:[],onUnmount:[]}}),(0,m.Z)(this,Nr,{writable:!0,value:new Map}),(0,m.Z)(this,Ur,{writable:!0,value:void 0}),(0,m.Z)(this,jr,{writable:!0,value:void 0}),this.scope=e}registerBrickLifeCycle(e,t){if(t){var r=[...xr,..."page"===this.scope?Lr:[]];for(var n of r){var o=t[n];o&&(0,g.Z)(this,Br)[n].push({brick:e,handlers:o})}(0,i.isEmpty)(t.useResolves)||console.error("`lifeCycle.useResolves` is dropped in v3:",t)}}memoizeControlNode(e,t,r,n){(0,g.Z)(this,jr)||(0,Se.Z)(this,jr,new WeakMap);var o="".concat(null!=e?e:"",".").concat(t),a=(0,g.Z)(this,jr).get(n);a||(a=new Map,(0,g.Z)(this,jr).set(n,a)),a.set(o,{node:r,last:zr(r),lastNormal:Jr(r),lastPortal:Qr(r)})}rerenderControlNode(e,t,r,n){var o,a,i,s,c,l="".concat(null!=e?e:"",".").concat(t),u=(0,g.Z)(this,jr).get(n).get(l),{node:p,last:d,lastNormal:f,lastPortal:v}=u,h=null!==(o=null==f||null===(a=f.element)||void 0===a?void 0:a.nextSibling)&&void 0!==o?o:null,m=null!==(i=null==v||null===(s=v.element)||void 0===s?void 0:s.nextSibling)&&void 0!==i?i:null,y=zr(r);u.node=r,u.last=y,u.lastNormal=Jr(r),u.lastPortal=Qr(r);for(var w=n.child;w&&w!==d;){if(w.sibling===p){c=w;break}w=w.sibling}var b=document.createDocumentFragment(),E=document.createDocumentFragment(),S={tag:gr.ROOT,container:b,createPortal:E,child:r};for(w=r;w;)w.return=S,w=w.sibling;var k,Z,I=Yr(p,d);for((0,Ee.Z)(this,$r,Vr).call(this,I),Rr(S),c?c.sibling=r:n.child=r,y&&(y.sibling=null==d?void 0:d.sibling),w=r;w;)w.return=n,w=w.sibling;if(n.tag===gr.ROOT?null===(k=n.container)||void 0===k||k.insertBefore(b,h):null===(Z=n.element)||void 0===Z||Z.insertBefore(b,h),E.childNodes.length>0){for(var O,P=r;P&&P.return;)P=P.return;if((null===(O=P)||void 0===O?void 0:O.tag)!==gr.ROOT)throw new Error("Cannot find render root node");("function"==typeof P.createPortal?P.createPortal():P.createPortal).insertBefore(E,m)}var _=Yr(r,y);(0,Ee.Z)(this,Fr,Hr).call(this,_)}dispose(){for(var e of Object.values((0,g.Z)(this,Br)))e.length=0;for(var t of(0,g.Z)(this,Nr).values()){for(var r of t)r.disconnect();t.length=0}(0,g.Z)(this,Nr).clear(),(0,g.Z)(this,Ur)&&(oe.removeEventListener("change",(0,g.Z)(this,Ur)),(0,Se.Z)(this,Ur,void 0)),(0,Se.Z)(this,jr,void 0)}dispatchBeforePageLoad(){(0,Ee.Z)(this,Dr,qr).call(this,"onBeforePageLoad",new CustomEvent("page.beforeLoad"))}dispatchPageLoad(){var e=new CustomEvent("page.load");(0,Ee.Z)(this,Dr,qr).call(this,"onPageLoad",e),window.dispatchEvent(e)}dispatchBeforePageLeave(e){(0,Ee.Z)(this,Dr,qr).call(this,"onBeforePageLeave",new CustomEvent("page.beforeLeave",{detail:e}))}dispatchPageLeave(){(0,Ee.Z)(this,Dr,qr).call(this,"onPageLeave",new CustomEvent("page.leave"))}dispatchAnchorLoad(){var{hash:e}=we().location;e&&"#"!==e?(0,Ee.Z)(this,Dr,qr).call(this,"onAnchorLoad",new CustomEvent("anchor.load",{detail:{hash:e,anchor:e.substring(1)}})):(0,Ee.Z)(this,Dr,qr).call(this,"onAnchorUnload",new CustomEvent("anchor.unload"))}initializeScrollIntoView(){for(var{brick:e,handlers:t}of(0,g.Z)(this,Br).onScrollIntoView)(0,Ee.Z)(this,Kr,Gr).call(this,e,t)}initializeMediaChange(){(0,Se.Z)(this,Ur,(e=>{(0,Ee.Z)(this,Dr,qr).call(this,"onMediaChange",new CustomEvent("media.change",{detail:A(e.detail)}))})),oe.addEventListener("change",(0,g.Z)(this,Ur))}dispatchOnMount(){(0,Ee.Z)(this,Dr,qr).call(this,"onMount",new CustomEvent("mount"))}dispatchOnUnmount(){(0,Ee.Z)(this,Dr,qr).call(this,"onUnmount",new CustomEvent("unmount"))}}function Vr(e){var t=[...xr,..."page"===this.scope?Lr:[]],r=[];for(var n of t){var o=(0,i.remove)((0,g.Z)(this,Br)[n],(t=>e.has(t.brick)));"onUnmount"===n&&r.push(...o)}for(var a of e){var s,c,l=(0,g.Z)(this,Nr).get(a);if(null!=l&&l.length){for(var u of l)u.disconnect();l.length=0,(0,g.Z)(this,Nr).delete(a)}Tr(a),null===(s=a.element)||void 0===s||delete s.$$tplStateStore,null===(c=a.element)||void 0===c||c.remove()}var p=new CustomEvent("unmount");for(var{brick:d,handlers:f}of r)Vt(f,d.runtimeContext,d)(p)}function Hr(e){var t=new CustomEvent("mount");for(var{brick:r,handlers:n}of(0,g.Z)(this,Br).onMount)e.has(r)&&Vt(n,r.runtimeContext,r)(t);for(var{brick:o,handlers:a}of(0,g.Z)(this,Br).onScrollIntoView)e.has(o)&&(0,Ee.Z)(this,Kr,Gr).call(this,o,a)}function qr(e,t){for(var{brick:r,handlers:n}of(0,g.Z)(this,Br)[e])Vt(n,r.runtimeContext,r)(t)}function Gr(e,t){var r,n=null!==(r=t.threshold)&&void 0!==r?r:.1,o=new IntersectionObserver(((r,o)=>{r.forEach((r=>{r.isIntersecting&&r.intersectionRatio>=n&&(Vt(t.handlers,e.runtimeContext,e)(new CustomEvent("scroll.into.view")),o.disconnect())}))}),{threshold:n});o.observe(e.element);var a=(0,g.Z)(this,Nr).get(e);a||(a=[],(0,g.Z)(this,Nr).set(e,a)),a.push(o)}function zr(e){for(var t=e;null!==(r=t)&&void 0!==r&&r.sibling;){var r;t=t.sibling}return t}function Jr(e){for(var t,r=e;r;)r.portal||(t=r),r=r.sibling;return t}function Qr(e){for(var t,r=e;r;)if(r.portal&&(t=r),r.child)r=r.child;else if(r.sibling)r=r.sibling;else{for(var n,o=r.return;o&&!o.sibling;)o=o.return;r=null===(n=o)||void 0===n?void 0:n.sibling}return t}function Yr(e,t){for(var r=new Set,n=e;n;)if(r.add(n),n.child)n=n.child;else{if(n===t)break;if(n.sibling)n=n.sibling;else{for(var o,a=n.return;a&&a!==t&&!a.sibling;)a=a.return;if(a===t)break;n=null===(o=a)||void 0===o?void 0:o.sibling}}return r}function Xr(){if(!Mr){if(Mr={isInIframe:!1,isInIframeOfSameSite:!1,isInIframeOfNext:!1,isInIframeOfVisualBuilder:!1,isInIframeOfLegacyConsole:!1},window!==window.parent){Mr.isInIframe=!0;try{if(window.origin===window.parent.origin){Mr.isInIframeOfSameSite=!0;var e="/next/"===V(),t=window.parent.location.pathname,r=t.startsWith("/next/");Mr.isInIframeOfNext=0==(Number(e)^Number(r)),Mr.isInIframeOfVisualBuilder=t.startsWith("".concat(r?"/next":"","/visual-builder/")),Mr.isInIframeOfLegacyConsole=e&&!r}}catch(e){}}Object.freeze(Mr)}return Mr}var en,tn=new WeakSet;function rn(e){if((0,p.isObject)(e)&&!nn(e))if(tn.add(e),Array.isArray(e))e.forEach(rn);else{var t=Object.getPrototypeOf(e);t&&t.constructor!==Object||Object.values(e).forEach(rn)}}function nn(e){return tn.has(e)}var on=function(){var e=(0,a.Z)((function*(e,t){return(yield c.http.get("api/auth/v2/bootstrap",(0,o.Z)((0,o.Z)({},t),{},{params:e}))).data}));return function(t,r){return e.apply(this,arguments)}}(),an=function(){var e=(0,a.Z)((function*(e){return(yield c.http.get("api/v1/runtime_standalone",e)).data}));return function(t){return e.apply(this,arguments)}}(),sn=function(){var e=(0,a.Z)((function*(e,t,r){return(yield c.http.get("api/auth/v2/bootstrap/".concat(e),(0,o.Z)((0,o.Z)({},r),{},{params:t}))).data}));return function(t,r,n){return e.apply(this,arguments)}}(),cn=function(){var e=(0,a.Z)((function*(e,t){return(yield c.http.get("api/gateway/micro_app_standalone.runtime.RuntimeMicroAppStandalone/api/v1/micro_app_standalone/runtime/".concat(e),t)).data}));return function(t,r){return e.apply(this,arguments)}}(),ln=["feature_flags"],un=["featureFlags","misc"];function pn(){return dn.apply(this,arguments)}function dn(){return dn=(0,a.Z)((function*(){var e=yield window.STANDALONE_MICRO_APPS?function(){return fn.apply(this,arguments)}():on({appFields:"defaultConfig,userConfig,locales,name,homepage,id,currentVersion,installStatus,internal,status,icons,standaloneMode",ignoreTemplateFields:"templates",ignoreBrickFields:"bricks,processors,providers,editors"}),t=function*(){if(r.locales){var e="tmp/".concat(r.id);Object.entries(r.locales).forEach((t=>{var[r,n]=t;b.i18n.addResourceBundle(r,e,n)})),r.localeName=b.i18n.getFixedT(null,e)("name",r.name),Object.keys(r.locales).forEach((t=>{b.i18n.removeResourceBundle(t,e)}))}else r.localeName=r.name};for(var{app:r}of e.storyboards)yield*t();return(0,p.isObject)(e.settings)&&(0,p.deepFreeze)(e.settings),e.brickPackages=(0,p.deepFreeze)(e.brickPackages),e})),dn.apply(this,arguments)}function fn(){return fn=(0,a.Z)((function*(){var e=[c.http.get(window.BOOTSTRAP_FILE),c.http.get("".concat(window.APP_ROOT,"conf.yaml"),{responseType:"text"}),an().catch((e=>{console.warn("request runtime api from api-gateway failed: ",e,", something might went wrong running standalone micro app")}))];if(!window.NO_AUTH_GUARD){var t,r=window.APP_ID||(window.APP_ROOT&&(t=window.APP_ROOT.match(/^(?:(?:\/next)?\/)?sa-static\/([^/]+)\/versions\//))?t[1]:null);r&&hn(r)}var[n,a,i]=yield Promise.all(e);return function(e,t){var r;try{r=t?(0,ke.safeLoad)(t,{schema:ke.JSON_SCHEMA,json:!0}):void 0}catch(e){throw console.error("Parse conf.yaml failed",e),new Error("Invalid conf.yaml")}if(r){var{sys_settings:n,user_config:a,user_config_by_apps:i}=r;if(n){var{feature_flags:s}=n,c=(0,f.Z)(n,ln);e.settings=(0,o.Z)({featureFlags:s},c)}if(a&&1===e.storyboards.length)e.storyboards[0].app.userConfig=a;else if(i)for(var{app:l}of e.storyboards)(0,p.hasOwnProperty)(i,l.id)&&(l.userConfig=i[l.id])}}(n,a),function(e,t){var r;if(t){var{featureFlags:n,misc:a}=t,i=(0,f.Z)(t,un),s=null!==(r=e.settings)&&void 0!==r?r:e.settings={};s.featureFlags=(0,o.Z)((0,o.Z)({},s.featureFlags),n),s.misc=(0,o.Z)((0,o.Z)({},s.misc),a),Object.assign(s,i)}}(n,null==i?void 0:i.settings),n})),fn.apply(this,arguments)}var vn=new Map;function hn(e){return mn.apply(this,arguments)}function mn(){return(mn=(0,a.Z)((function*(e){if(vn.has(e))return vn.get(e);var t=cn(e).catch((e=>{console.warn("request standalone runtime api from micro-app-standalone failed: ",e,", something might went wrong running standalone micro app")}));return vn.set(e,t),t}))).apply(this,arguments)}function gn(){return gn=(0,a.Z)((function*(e){if(!e.$$fulfilled)return e.$$fulfilling||(e.$$fulfilling=function(e){return yn.apply(this,arguments)}(e)),e.$$fulfilling})),gn.apply(this,arguments)}function yn(){return(yn=(0,a.Z)((function*(e){if(window.STANDALONE_MICRO_APPS){if(Object.assign(e,{$$fulfilled:!0,$$fulfilling:null}),!window.NO_AUTH_GUARD){var t;try{t=yield hn(e.app.id)}catch(e){console.warn("request standalone runtime api from micro-app-standalone failed: ",e,", something might went wrong running standalone micro app")}if(t){var{userConfig:r,injectMenus:n}=t;e.app.userConfig=(0,o.Z)((0,o.Z)({},e.app.userConfig),r),function(e){if(Array.isArray(e))for(var t of e)t.overrideApp&&wn(t.overrideApp)}(n),e.meta=(0,o.Z)((0,o.Z)({},e.meta),{},{injectMenus:n})}}}else{var{routes:a,meta:i,app:s}=yield sn(e.app.id,{});Object.assign(e,{routes:a,meta:i,app:(0,o.Z)((0,o.Z)({},e.app),s),$$fulfilled:!0,$$fulfilling:null})}E(e),wn(e.app)}))).apply(this,arguments)}function wn(e){e.config=(0,p.deepFreeze)((0,i.merge)({},e.defaultConfig,e.userConfig))}var bn=function(){var e=(0,a.Z)((function*(e,t){return(yield c.http.post("api/gateway/micro_app_standalone.runtime.SearchMicroAppStandalone/api/v1/micro_app_standalone/search",e,t)).data}));return function(t,r){return e.apply(this,arguments)}}();const En=(e,t,r)=>{Tn(r);const n=((e,t)=>{const r=kn(e),n=kn(t),o=r.pop(),a=n.pop(),i=Pn(r,n);return 0!==i?i:o&&a?Pn(o.split("."),a.split(".")):o||a?o?-1:1:0})(e,t);return _n[r].includes(n)},Sn=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,kn=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match(Sn);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Zn=e=>"*"===e||"x"===e||"X"===e,In=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},On=(e,t)=>{if(Zn(e)||Zn(t))return 0;const[r,n]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(In(e),In(t));return r>n?1:r<n?-1:0},Pn=(e,t)=>{for(let r=0;r<Math.max(e.length,t.length);r++){const n=On(e[r]||"0",t[r]||"0");if(0!==n)return n}return 0},_n={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]},An=Object.keys(_n),Tn=e=>{if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===An.indexOf(e))throw new Error(`Invalid operator, expected one of ${An.join("|")}`)};function Cn(e,t){return function(r,n,o){if(n.name===e){var a=o[o.length-1],i=o[o.length-2];if("CallExpression"===(null==i?void 0:i.node.type)&&"callee"===(null==i?void 0:i.key)&&"MemberExpression"===(null==a?void 0:a.node.type)&&"object"===a.key&&(a.node.computed?"Literal"===a.node.property.type&&a.node.property.value===t:"Identifier"===a.node.property.type&&a.node.property.name===t)){var s=i.node.arguments;if(s.length>0){var c=s[0];"Literal"===c.type&&"string"==typeof c.value?r.usedArgs.add(c.value):r.hasNonStaticUsage=!0}}}}}var Rn=Cn("APP","getMenu"),Mn=Cn("INSTALLED_APPS","has"),xn=new Map,Ln=new Map;function Bn(e,t){var r=Eo(e);if(!r&&window.STANDALONE_MICRO_APPS&&(r=Ln.get(e)),!r||"running"===r.installStatus)return!1;if(!t||!r.currentVersion)return!0;var n=t.match(/^([><]=?|=)(.*)$/);try{if(!n)throw new TypeError("Invalid match version: ".concat(t));return En(r.currentVersion,n[2],n[1])}catch(e){console.error(e)}return!1}var Nn=new WeakMap,Un=new WeakMap,jn=new WeakMap,$n=new WeakMap,Fn=new WeakMap,Dn=new WeakMap,Kn=new WeakMap,Wn=new WeakMap,Vn=new WeakMap,Hn=new WeakMap,qn=new WeakMap,Gn=new WeakMap,zn=new WeakSet,Jn=new WeakSet,Qn=new WeakSet,Yn=new WeakSet;class Xn{constructor(e){(0,be.Z)(this,Yn),(0,be.Z)(this,Qn),(0,be.Z)(this,Jn),(0,be.Z)(this,zn),(0,m.Z)(this,Nn,{writable:!0,value:void 0}),(0,m.Z)(this,Un,{writable:!0,value:!1}),(0,m.Z)(this,jn,{writable:!0,value:void 0}),(0,m.Z)(this,$n,{writable:!0,value:void 0}),(0,m.Z)(this,Fn,{writable:!0,value:void 0}),(0,m.Z)(this,Dn,{writable:!0,value:void 0}),(0,m.Z)(this,Kn,{writable:!0,value:new Set}),(0,m.Z)(this,Wn,{writable:!0,value:0}),(0,m.Z)(this,Vn,{writable:!0,value:void 0}),(0,m.Z)(this,Hn,{writable:!0,value:void 0}),(0,m.Z)(this,qn,{writable:!0,value:void 0}),(0,m.Z)(this,Gn,{writable:!0,value:void 0}),(0,Se.Z)(this,Nn,e);var t=we();window.addEventListener("beforeunload",(e=>{(0,Ee.Z)(this,zn,eo).call(this,{})?(e.preventDefault(),e.returnValue=""):delete e.returnValue})),t.block(((e,t)=>(0,Ee.Z)(this,zn,eo).call(this,{location:e,action:t})))}getRenderId(){return(0,g.Z)(this,Vn)}getRuntimeContext(){return(0,g.Z)(this,Fn)}getRecentApps(){return{currentApp:(0,g.Z)(this,Hn),previousApp:(0,g.Z)(this,qn)}}getNavConfig(){return(0,g.Z)(this,Gn)}bootstrap(){window.AbortController&&(en=new AbortController,c.http.interceptors.request.use((e=>{var t;return(0,o.Z)((0,o.Z)({},e),{},{options:(0,o.Z)((0,o.Z)({},e.options),{},{signal:null!==(t=e.options)&&void 0!==t&&t.noAbortOnRouteChange?null:en.signal})})})));var e=we();return(0,Se.Z)(this,jn,e.location),e.listen(((e,t)=>{var r,n,a,i=!1,s={hash:void 0,state:void 0};if(void 0!==e.key&&("POP"!==t||void 0!==(0,g.Z)(this,jn).key&&!1!==(null===(r=(0,g.Z)(this,jn).state)||void 0===r?void 0:r.notify))||(s.key=void 0),((0,pe.locationsAreEqual)((0,o.Z)((0,o.Z)({},(0,g.Z)(this,jn)),s),(0,o.Z)((0,o.Z)({},e),s))||"POP"!==t&&!1===(null===(n=e.state)||void 0===n?void 0:n.notify))&&(i=!0),i)(0,Se.Z)(this,jn,e);else{if(en&&(en.abort(),en=new AbortController),(0,Se.Z)(this,jn,e),null===(a=(0,g.Z)(this,Dn))||void 0===a||a.dispatchPageLeave(),"POP"===t&&fe(de((0,g.Z)(this,Nn),e.pathname)))return void window.location.reload();(0,g.Z)(this,Un)?(0,Se.Z)(this,$n,e):(0,Ee.Z)(this,Qn,ro).call(this,e).catch(Ut)}})),(0,Ee.Z)(this,Qn,ro).call(this,e.location)}}function eo(e){var t,r=we(),n=r.getBlockMessage();null===(t=(0,g.Z)(this,Dn))||void 0===t||t.dispatchBeforePageLeave(e);var o=r.getBlockMessage();return!n&&o&&r.unblock(),o}function to(e,t,r){var n,o;if((0,Se.Z)(this,Wn,(n=(0,g.Z)(this,Wn),o=n++,n)),o>10){var a='Infinite redirect detected: from "'.concat(r.pathname).concat(r.search).concat(r.hash,'" to "').concat(e,'"');throw new Error(a)}we().replace(e,t)}function ro(e){return no.apply(this,arguments)}function no(){return(no=(0,a.Z)((function*(e){(0,Se.Z)(this,Un,!0);try{yield(0,Ee.Z)(this,Yn,oo).call(this,e)}finally{if((0,Se.Z)(this,Un,!1),(0,g.Z)(this,$n)){var t=(0,g.Z)(this,$n);(0,Se.Z)(this,$n,void 0),yield(0,Ee.Z)(this,Qn,ro).call(this,t)}}}))).apply(this,arguments)}function oo(e){return ao.apply(this,arguments)}function ao(){return ao=(0,a.Z)((function*(e){var t;(0,Se.Z)(this,Vn,(0,i.uniqueId)("render-id-1")),tn=new WeakSet,$e.clear(),Oe.clear(),we().unblock();var r=de((0,g.Z)(this,Nn),e.pathname),n=null===(t=(0,g.Z)(this,Fn))||void 0===t?void 0:t.app;null!=r&&r.app&&(yield function(e){return gn.apply(this,arguments)}(r));var a,l=(0,Se.Z)(this,Hn,null==r?void 0:r.app),u=n&&l?n.id!==l.id:n!==l,p=vo().getFeatureFlags(),d=(0,g.Z)(this,Dn),f=(t,r)=>{(0,g.Z)(this,Kn).add(d),(0,Ee.Z)(this,Jn,to).call(this,t,r,e)},h=()=>{var t=p["sso-enabled"]?"/sso-auth/login":"/auth/login";f(t,{from:e})},m=document.querySelector("#main-mount-point"),y=document.querySelector("#portal-mount-point"),w={tag:gr.ROOT,container:m,createPortal:y},b=()=>{for(var e of(Cr(m),Cr(y),(0,g.Z)(this,Kn).add(d),(0,g.Z)(this,Kn)))e&&(e.dispatchOnUnmount(),e.dispose());(0,g.Z)(this,Kn).clear(),x(l&&(j()[l.id]||l.theme)||"light"),F("default"),u&&((0,Se.Z)(this,qn,n),window.dispatchEvent(new CustomEvent("app.change",{detail:{previousApp:n,currentApp:l}})))};if(l){var E,S;!function(e){if(window.STANDALONE_MICRO_APPS&&!window.NO_AUTH_GUARD){var t=function(e){var t,r={usedArgs:new Set},{customTemplates:n,menus:o}=null!==(t=e.meta)&&void 0!==t?t:{};return(0,s.traverseStoryboardExpressions)([e.routes,n,o],((e,t)=>{Mn(r,e,t)}),"INSTALLED_APPS"),[...r.usedArgs]}(e),r=[];for(var n of t)xn.has(n)||Eo(n)||r.push(n);if(0===r.length)return;var a=bn({query:{appId:{$in:r}},fields:["appId","currentVersion","installStatus"]}).catch((e=>{console.error("Get off site standalone micro-apps failed",e)})),i=function(e){xn.set(e,a.then((t=>{var r,n=null==t||null===(r=t.list)||void 0===r?void 0:r.find((t=>t.appId===e)),a=n?(0,o.Z)((0,o.Z)({},n),{},{id:e}):void 0;return Ln.set(e,a),a})))};for(var c of r)i(c)}}(r);var k=(0,Se.Z)(this,Fn,{app:l,location:e,query:new URLSearchParams(e.search),flags:p,sys:(0,o.Z)((0,o.Z)({},ma()),Xr()),ctxStore:new sr("CTX"),pendingPermissionsPreCheck:[sa(r)],tplStateStoreMap:new Map}),Z=(0,Se.Z)(this,Dn,new Wr("page"));(0,Se.Z)(this,Gn,void 0),function(e){var t;if(!e.$$registerCustomTemplateProcessed){e.$$registerCustomTemplateProcessed=!0;var r=null===(t=e.meta)||void 0===t?void 0:t.customTemplates;if(Array.isArray(r))for(var n of r){var o=n.name.includes(".")?n.name:"".concat(e.app.id,".").concat(n.name);ct.define(o,n)}}}(r),Y(null===(E=r.meta)||void 0===E?void 0:E.functions,l),a=null===(S=r.meta)||void 0===S?void 0:S.contracts,Pe(a,Ie);var I,O=!1;try{if((I=yield wr(w,function(e){if(window.parent===window)return e;var t=e,r=(0,i.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/template-preview/")));t=[...t.slice(0,r+1),{path:"${APP.homepage}/_dev_only_/template-preview/:templateId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(r+1)];var n=(0,i.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/snippet-preview/")));return[...t.slice(0,n+1),{path:"${APP.homepage}/_dev_only_/snippet-preview/:snippetId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(n+1)]}(r.routes),k,Z)).unauthenticated)return void h();if(I.redirect)return void f(I.redirect.path,I.redirect.state);(0,Se.Z)(this,Wn,0),(0,v.flushStableLoadBricks)(),yield Promise.all([...I.blockingList,k.ctxStore.waitForAll(),...[...k.tplStateStoreMap.values()].map((e=>e.waitForAll())),...k.pendingPermissionsPreCheck]);var P=yield Promise.all(I.menuRequests);(0,Se.Z)(this,Gn,function(e){var t={breadcrumb:[]};for(var r of e)if(r){var{breadcrumb:n}=r;n&&(n.overwrite?t.breadcrumb=n.items:t.breadcrumb.push(...n.items))}return t}(P))}catch(e){if(console.error("Router failed:",e),xt(e)&&!window.NO_AUTH_GUARD)return void h();if(e instanceof c.HttpAbortError)return void(0,g.Z)(this,Kn).add(d);O=!0,I={node:{tag:gr.BRICK,type:"div",properties:{textContent:Mt(e)},runtimeContext:null,return:w},blockingList:[],menuRequests:[]}}if(w.child=I.node,b(),I.route&&"routes"!==I.route.type||O)return O||Z.dispatchBeforePageLoad(),N(),K(),Rr(w),window.scrollTo(0,0),void(O||(Z.dispatchPageLoad(),Z.dispatchAnchorLoad(),Z.dispatchOnMount(),Z.initializeScrollIntoView(),Z.initializeMediaChange()))}else{if(!window.NO_AUTH_GUARD&&!ya())return void h();b()}N(),K();var _={tag:gr.BRICK,type:"div",properties:{textContent:"Page not found"},runtimeContext:null,return:w};w.child=_,Rr(w),window.scrollTo(0,0)})),ao.apply(this,arguments)}var io=function(){var e=(0,a.Z)((function*(e){return(yield c.http.get("api/auth/login",e)).data}));return function(t){return e.apply(this,arguments)}}();function so(){return co.apply(this,arguments)}function co(){return co=(0,a.Z)((function*(){if(!window.NO_AUTH_GUARD){var e=yield io();e.loggedIn&&ha(e)}})),co.apply(this,arguments)}var lo,uo,po="undefined"!=typeof BOOTSTRAP_DATA?BOOTSTRAP_DATA:void 0;function fo(){if(lo)throw new Error("Cannot create multiple runtimes");return(0,b.initializeI18n)(At,Tt),ue.locale(b.i18n.language),b.i18n.on("languageChanged",(()=>{ue.locale(b.i18n.language)})),ye(),lo=new ho}function vo(){return lo}class ho{bootstrap(){return(0,a.Z)((function*(){var[,e]=yield Promise.all([so(),pn()]);po=e,jt("shoelace.show-notification"),Ct("shoelace.show-dialog"),uo=new Xn(e.storyboards),yield uo.bootstrap()}))()}getRecentApps(){var e,t;return null!==(e=null===(t=uo)||void 0===t?void 0:t.getRecentApps())&&void 0!==e?e:{}}getCurrentApp(){var e;return null===(e=uo)||void 0===e?void 0:e.getRecentApps().currentApp}getFeatureFlags(){var e,t,r,n,a,i;return(0,o.Z)((0,o.Z)((0,o.Z)({},null===(e=po)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.featureFlags),null===(r=uo)||void 0===r||null===(n=r.getRecentApps().currentApp)||void 0===n||null===(a=n.config)||void 0===a||null===(i=a.settings)||void 0===i?void 0:i.featureFlags),{},{"migrate-to-brick-next-v3":!0})}getMiscSettings(){var e,t,r,n,a,i;return(0,o.Z)((0,o.Z)({},null===(e=po)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.misc),null===(r=uo)||void 0===r||null===(n=r.getRecentApps().currentApp)||void 0===n||null===(a=n.config)||void 0===a||null===(i=a.settings)||void 0===i?void 0:i.misc)}getBrandSettings(){var e,t;return(0,o.Z)({base_title:"DevOps 管理专家"},null===(e=po)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.brand)}getLaunchpadSettings(){var e,t;return(0,o.Z)({columns:7,rows:4},null===(e=po)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.launchpad)}getDesktops(){var e,t;return null!==(e=null===(t=po)||void 0===t?void 0:t.desktops)&&void 0!==e?e:[]}getLaunchpadSiteMap(){var e,t;return null!==(e=null===(t=po)||void 0===t?void 0:t.siteSort)&&void 0!==e?e:[]}toggleLaunchpadEffect(e){document.body.classList.toggle("launchpad-open",e)}applyPageTitle(e){var t=this.getBrandSettings().base_title;document.title=e?"".concat(e," - ").concat(t):t}getNavConfig(){var e;return null===(e=uo)||void 0===e?void 0:e.getNavConfig()}}function mo(){var e,t;return null!==(e=null===(t=po)||void 0===t?void 0:t.brickPackages)&&void 0!==e?e:[]}function go(e){return(0,v.loadBricksImperatively)(e,mo())}function yo(){var e;return null===(e=uo)||void 0===e?void 0:e.getRenderId()}function wo(){var e;return null===(e=uo)||void 0===e?void 0:e.getRuntimeContext()}function bo(e){var t,r;return null===(t=po)||void 0===t||null===(r=t.storyboards)||void 0===r?void 0:r.find((t=>t.app.id===e))}function Eo(e){var t;return null===(t=bo(e))||void 0===t?void 0:t.app}var So=new Map,ko=new Proxy(Object.freeze({}),{get:(e,t)=>So.get(t)});function Zo(e,t,r){if(So.has(e))throw new Error('Widget functions of "'.concat(e,'" already registered'));var{storyboardFunctions:n,registerStoryboardFunctions:o}=J({widgetId:e,widgetVersion:r});So.set(e,n),o(t)}var Io=function(){var e=(0,a.Z)((function*(e,t,r){return(yield c.http.post("api/gateway/cmdb.instance.PostSearch/object/".concat(e,"/instance/_search"),t,r)).data}));return function(t,r,n){return e.apply(this,arguments)}}(),Oo=Symbol("appId"),Po=Symbol("menuI18nNamespace"),_o=Symbol("overrideApp");function Ao(){return(Ao=(0,a.Z)((function*(e,t,r){if(e.dynamicItems&&e.itemsResolve){var n=e.app[0].appId,a=t;if(n!==t.app.id){var i=window.STANDALONE_MICRO_APPS?e.overrideApp:Eo(n);a=(0,o.Z)((0,o.Z)({},t),{},{overrideApp:i,appendI18nNamespace:r.get(e)})}var s=yield Fe((0,o.Z)({transform:"items"},e.itemsResolve),a);e.items=s.items}}))).apply(this,arguments)}function To(){return To=(0,a.Z)((function*(e,t){var r=e.find((e=>"inject"!==e.type));if(r){var n=[],a=new Map,i=new WeakMap,s=function*(){if(c.i18n){var e=S("menu","".concat(c.menuId,"~").concat(c.app[0].appId,"+").concat(c.instanceId));Object.entries(c.i18n).forEach((t=>{var[r,n]=t;b.i18n.addResourceBundle(r,e,n)})),i.set(c,e)}};for(var c of e)yield*s();for(var l of(yield Promise.all(e.map((e=>function(e,t,r){return Ao.apply(this,arguments)}(e,t,i)))),e)){var u;if(null!==(u=l.items)&&void 0!==u&&u.length)if("inject"===l.type&&l.injectMenuGroupId){var p=a.get(l.injectMenuGroupId);p||(p=[],a.set(l.injectMenuGroupId,p)),p.push(l)}else n.push(l)}return(0,o.Z)((0,o.Z)({},r),{},{items:n.flatMap((e=>Co(e.items,e,a,i))),[Po]:i.get(r),[_o]:r.overrideApp})}})),To.apply(this,arguments)}function Co(e,t,r,n){return null==e?void 0:e.map((e=>{var a,i=e.groupId&&r.get(e.groupId);return i&&r.delete(e.groupId),(0,o.Z)((0,o.Z)({},e),{},{children:(null!==(a=Co(e.children,t,r,n))&&void 0!==a?a:[]).concat(i?i.flatMap((e=>Co(e.items,e,r,n))):[]),[Oo]:t.app[0].appId,[Po]:n.get(t),[_o]:t.overrideApp})}))}function Ro(e){return(0,i.sortBy)(e,(e=>{var t;return null!==(t=e.sort)&&void 0!==t?t:-1/0}))}var Mo=["children"];function xo(e,t,r){var n=r;if(t!==r.app.id){var a=window.STANDALONE_MICRO_APPS?e[_o]:Eo(t);n=(0,o.Z)((0,o.Z)({},r),{},{overrideApp:a,appendI18nNamespace:e[Po]})}return ea(e,n,{ignoreSymbols:!0})}function Lo(e,t){return Promise.all(e.map(function(){var e=(0,a.Z)((function*(e){var{children:r}=e,n=(0,f.Z)(e,Mo),[a,i]=yield Promise.all([xo(n,n[Oo],t),r&&(yield Lo(r,t))]);return(0,o.Z)((0,o.Z)({},a),{},{children:i})}));return function(t){return e.apply(this,arguments)}}()))}var Bo=function(){var e=(0,a.Z)((function*(e,t,r,n){return(yield c.http.get("api/gateway/cmdb.instance.GetDetail/object/".concat(e,"/instance/").concat(t),(0,o.Z)((0,o.Z)({},n),{},{params:r}))).data}));return function(t,r,n,o){return e.apply(this,arguments)}}(),No=new Map;function Uo(e){return jo.apply(this,arguments)}function jo(){return(jo=(0,a.Z)((function*(e){if(e.title||(0,i.isEmpty)(e.titleDataSource))return e.title;var t=JSON.stringify(e.titleDataSource);if(No.has(t))return No.get(t);var r,{objectId:n,instanceId:o,attributeId:a}=e.titleDataSource,s=null!=a?a:"name",c=yield Bo(n,o,{fields:s});if("#showKey"===a&&Array.isArray(c[s])){var[l,...u]=c[s];r=u.length>0?"".concat(l,"(").concat(u.join(","),")"):String(l)}else r=String(c[s]);return No.set(t,r),r}))).apply(this,arguments)}var $o=["items","app"],Fo=new Map,Do=new Map;function Ko(e){return Do.get(e)}function Wo(){return Wo=(0,a.Z)((function*(e,t){var r=window.STANDALONE_MICRO_APPS?function(e,t){var r,n,a,i,s=bo(t);return(null!==(r=null!==(n=null===(a=s.meta)||void 0===a?void 0:a.injectMenus)&&void 0!==n?n:null===(i=s.meta)||void 0===i?void 0:i.menus)&&void 0!==r?r:[]).filter((t=>t.menuId===e)).map((e=>{var r,n;return(0,o.Z)((0,o.Z)({},e),null!==(r=e.app)&&void 0!==r&&null!==(n=r[0])&&void 0!==n&&n.appId?{}:{app:[{appId:t}]})}))}(e,t.app.id):(yield Io("EASYOPS_STORYBOARD_MENU",{page:1,page_size:200,fields:{menuId:!0,title:!0,icon:!0,link:!0,titleDataSource:!0,defaultCollapsed:!0,defaultCollapsedBreakpoint:!0,type:!0,injectMenuGroupId:!0,dynamicItems:!0,itemsResolve:!0,items:!0,i18n:!0,"items.children":!0,"app.appId":!0},query:{menuId:{$eq:e},app:{$size:{$gt:0}}}})).list,n=yield function(e,t){return To.apply(this,arguments)}(r,t);if(!n)throw new Error("Menu not found: ".concat(e));!function(e){e.items=Ro(e.items).map((e=>(0,o.Z)((0,o.Z)({},e),{},{children:Ro(e.children)})))}(n);var{items:a,app:s}=n,c=(0,f.Z)(n,$o),l=(0,o.Z)((0,o.Z)({},t),{},{pendingPermissionsPreCheck:[...t.pendingPermissionsPreCheck,ua([a,c])]});delete l.tplStateStoreId,delete l.forEachItem;var u=s[0].appId,[p,d]=yield Promise.all([xo(c,u,l),Lo(a,l)]),v=(0,o.Z)((0,o.Z)({title:yield Uo(p)},(0,i.pick)(p,["icon","link","defaultCollapsed","defaultCollapsedBreakpoint"])),{},{menuItems:d.filter(Ge).map((e=>{var t,r=null===(t=e.children)||void 0===t?void 0:t.filter(Ge);return"group"===e.type?{type:"group",title:e.text,items:r}:null!=r&&r.length?{type:"subMenu",title:e.text,icon:e.icon,items:r,defaultExpanded:e.defaultExpanded}:e}))});Do.set(e,v)})),Wo.apply(this,arguments)}var Vo=["pendingPermissionsPreCheck","tplStateStoreMap","tplStateStoreScope"],Ho=Symbol.for("pre.evaluated.raw"),qo=Symbol.for("pre.evaluated.context");function Go(e){return!(null==e||!e[Ho])}function zo(e){return"string"==typeof e?(0,u.shouldAllowRecursiveEvaluations)(e):(0,u.shouldAllowRecursiveEvaluations)(e[Ho])}var Jo=new WeakSet([SyntaxError,TypeError,ReferenceError]);function Qo(e){return Jo.has(e.constructor)?e.constructor:TypeError}function Yo(){return(Yo=(0,a.Z)((function*(e,t,r){var{blockingList:n,run:o}=Xo(e,t,r,!0);return yield Promise.all(n),o()}))).apply(this,arguments)}function Xo(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,a=[];if("string"!=typeof e){var{pendingPermissionsPreCheck:c,tplStateStoreMap:l,tplStateStoreScope:d}=t,m=(0,f.Z)(t,Vo);t=(0,o.Z)((0,o.Z)({},e[qo]),m),e=e[Ho]}var g,y={usedArgs:new Set},b={usedArgs:new Set};try{g=(0,u.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal(e,t){Rn(y,e,t),Mn(b,e,t)}}})}catch(t){var E="".concat(t.message,', in "').concat(e,'"');throw new(Qo(t))(E)}if(y.hasNonStaticUsage)throw new Error('Non-static usage of "APP.getMenu" is prohibited in v3, check your expression: "'.concat(e,'"'));if(b.hasNonStaticUsage)throw new Error('Non-static usage of "INSTALLED_APPS.has" is prohibited in v3, check your expression: "'.concat(e,'"'));var S,k,P,_,C={},{attemptToVisitGlobals:R}=g;if(r.lazy||R.has("EVENT")&&!(0,p.hasOwnProperty)(t,"event")||R.has("DATA")&&!(0,p.hasOwnProperty)(t,"data"))return{blockingList:a,run:()=>Object.keys(t).length>0?{[Ho]:e,[qo]:t}:e};var M=ot(t);(R.has("STATE")||!M&&R.has("TPL"))&&(_=lt(t,"STATE",': "'.concat(e,'"')));var x,L=O();if(n||L){if(R.has("CTX")&&(S=(0,s.strictCollectMemberUsage)(e,"CTX"),n&&a.push(t.ctxStore.waitFor(S))),_){if(P=(0,s.strictCollectMemberUsage)(e,"STATE"),!M){var B=(0,s.strictCollectMemberUsage)(e,"TPL");for(var N of B)P.add(N)}n&&a.push(_.waitFor(P))}R.has("PROCESSORS")&&(k=(0,s.strictCollectMemberUsage)(e,"PROCESSORS",2),n&&a.push((0,v.loadProcessorsImperatively)(k,mo())))}if(n){var U=R.has("PERMISSIONS");if(!U&&R.has("FN")){var j=[...(0,s.strictCollectMemberUsage)(e,"FN")];U=X(j)}if(U&&a.push(...t.pendingPermissionsPreCheck),y.usedArgs.size>0){var $=[...y.usedArgs];a.push(Promise.all($.map((e=>function(e,t){var r=Fo.get(e);return r||(r=function(e,t){return Wo.apply(this,arguments)}(e,t)),r}(e,t)))))}b.usedArgs.size>0&&a.push((x=[...b.usedArgs],Promise.all(x.map((e=>xn.get(e))))))}return{blockingList:a,run(){var r,n,{app:a,location:s,query:c,match:l,flags:d,sys:f,ctxStore:v,data:m,event:y}=t,b=null!==(r=t.overrideApp)&&void 0!==r?r:a;for(var E of R)switch(E){case"ANCHOR":C[E]=s.hash?s.hash.substring(1):null;break;case"APP":C[E]=(0,o.Z)((0,o.Z)({},(0,i.cloneDeep)(b)),{},{getMenu:Ko});break;case"CTX":C[E]=T({get:(e,t)=>v.getValue(t),ownKeys:()=>Array.from(S)});break;case"DATA":C[E]=m;break;case"EVENT":C[E]=y;break;case"FLAGS":C[E]=A(d);break;case"HASH":C[E]=s.hash;break;case"INSTALLED_APPS":C[E]=A({has:Bn});break;case"ITEM":(0,p.hasOwnProperty)(t,"forEachItem")?C[E]=t.forEachItem:console.error('Using `ITEM` but no `:forEach` is found, check your expression: "'.concat(e,'"'));break;case"LOCAL_STORAGE":C[E]=A({getItem:le("local")});break;case"MEDIA":C[E]=A(ce());break;case"MISC":C[E]=vo().getMiscSettings();break;case"PARAMS":C[E]=new URLSearchParams(c);break;case"PATH":C[E]=A(null!==(n=null==l?void 0:l.params)&&void 0!==n?n:{});break;case"PATH_NAME":C[E]=s.pathname;break;case"PROCESSORS":C[E]=T({get(e,t){var r=w.get(t);if(!r)throw new Error("'PROCESSORS.".concat(t,"' is not registered! Have you installed the relevant brick package?"));return T({get:(e,t)=>r.get(t),ownKeys:()=>Array.from(r.keys())})},ownKeys:()=>Array.from(k)});break;case"QUERY":C[E]=Object.fromEntries(Array.from(c.keys()).map((e=>[e,c.get(e)])));break;case"QUERY_ARRAY":C[E]=Object.fromEntries(Array.from(c.keys()).map((e=>[e,c.getAll(e)])));break;case"SESSION_STORAGE":C[E]=A({getItem:le("session")});break;case"TPL":if(at(M,'Using "TPL" in expression','check your expression: "'.concat(e,'"')),M)break;case"STATE":C[E]=T({get:(e,t)=>_.getValue(t),ownKeys:()=>Array.from(P)});break;case"SYS":C[E]=A(null!=f?f:{});break;case"__WIDGET_FN__":C[E]=ko;break;case"__WIDGET_IMG__":C[E]=I;break;case"__WIDGET_I18N__":C[E]=Z}Object.assign(C,H(g.attemptToVisitGlobals,{storyboardFunctions:Q,app:t.app,appendI18nNamespace:t.appendI18nNamespace}));try{return(0,u.cook)(g.expression,g.source,{globalVariables:(0,h.supply)(g.attemptToVisitGlobals,C)})}catch(t){var O="".concat(t.message,', in "').concat(e,'"');throw new(Qo(t))(O)}}}}function ea(e,t){return ta.apply(this,arguments)}function ta(){return ta=(0,a.Z)((function*(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Go(e);if(n||"string"==typeof e){var o,a=r.$$lazyForUseBrick&&Ye(r.$$stateOfUseBrick),i=a;return n||(0,u.isEvaluable)(e)?(o=yield function(e,t,r){return Yo.apply(this,arguments)}(e,t,{lazy:a}),i=zo(e)):o=a?e:((0,p.hasOwnProperty)(t,"data")?r.noInject?d.transform:d.transformAndInject:r.noInject?oa:d.inject)(e,t),i||rn(o),o}if(!(0,p.isObject)(e)||nn(e))return e;if(Array.isArray(e)){var s=na(r,!0);return Promise.all(e.map((e=>ea(e,t,s))))}return Object.fromEntries((yield Promise.all(Object.entries(e).map((e=>{var[n,o]=e;return Promise.all([ea(n,t),ea(o,t,na(r,!1,n))])})))).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))})),ta.apply(this,arguments)}function ra(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Go(e);if(n||"string"==typeof e){var o,a=r.$$lazyForUseBrick&&Ye(r.$$stateOfUseBrick),i=a;return n||(0,u.isEvaluable)(e)?(o=function(e,t,r){var{run:n}=Xo(e,t,void 0,!1);return n()}(e,t),i=zo(e)):o=a?e:((0,p.hasOwnProperty)(t,"data")?r.noInject?d.transform:d.transformAndInject:r.noInject?oa:d.inject)(e,t),i||rn(o),o}if(!(0,p.isObject)(e)||nn(e))return e;if(Array.isArray(e)){var s=na(r,!0);return e.map((e=>ra(e,t,s)))}return Object.fromEntries(Object.entries(e).map((e=>{var[n,o]=e;return[ra(n,t),ra(o,t,na(r,!1,n))]})).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function na(e,t,r){return e.$$lazyForUseBrick?(0,o.Z)((0,o.Z)({},e),{},{$$stateOfUseBrick:Xe(e.$$stateOfUseBrick,t,r)}):e}function oa(e){return e}var aa=[],ia=new Map;function sa(e){if(ya()&&!ma().isAdmin)return pa((0,s.scanPermissionActionsInStoryboard)(e))}function ca(e,t){return la.apply(this,arguments)}function la(){return(la=(0,a.Z)((function*(e,t){if(ya()&&!ma().isAdmin&&Array.isArray(e.permissionsPreCheck))return pa(yield ea(e.permissionsPreCheck,t))}))).apply(this,arguments)}function ua(e){if(ya()&&!ma().isAdmin)return pa((0,s.scanPermissionActionsInAny)(e))}function pa(e){return da.apply(this,arguments)}function da(){return(da=(0,a.Z)((function*(e){var t=(0,i.difference)(e,[...aa]);if(0!==t.length){aa.push(...t);try{var r=yield l({actions:t});for(var n of r.actions)ia.set(n.action,n.authorizationStatus),"undefined"===n.authorizationStatus&&console.error('Undefined permission action: "'.concat(n.action,'"'))}catch(e){console.error("Pre-check permissions failed",e)}}}))).apply(this,arguments)}function fa(){if(!ya())return!1;if(ma().isAdmin)return!0;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var n of t)switch(ia.get(n)){case"unauthorized":case"undefined":return!1;case void 0:return console.error('Un-checked permission action: "'.concat(n,'", please make sure the permission to check is defined in permissionsPreCheck.')),!1}return!0}var va={};function ha(e){Object.assign(va,{org:e.org,username:e.username,userInstanceId:e.userInstanceId,loginFrom:e.loginFrom,accessRule:e.accessRule,isAdmin:e.isAdmin,csrfToken:e.csrfToken,license:e.license,userShowValue:e.userShowValue})}function ma(){return(0,o.Z)({},va)}function ga(){for(var e of Object.keys(va))va[e]=void 0;aa.length=0,ia.clear()}function ya(){return void 0!==va.username}function wa(e,t,r){return ba.apply(this,arguments)}function ba(){return(ba=(0,a.Z)((function*(e,t,r){return Ke(yield Ue(e),e,"resolve",t,r)}))).apply(this,arguments)}function Ea(e){var t,{portal:r,scope:n="fragment"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r;t=r||(()=>((o=document.createElement("div")).style.position="absolute",o.style.width=o.style.height="0",document.body.append(o),o));var i,s=!1;return{render(r){var c=arguments;return(0,a.Z)((function*(){var{theme:a}=c.length>1&&void 0!==c[1]?c[1]:{};if(s)throw new Error("The root is unmounted and cannot be rendered any more");var l=[].concat(r),u={pendingPermissionsPreCheck:[],tplStateStoreMap:new Map},p=i;i=new Wr(n);var d,f={tag:gr.ROOT,container:e,createPortal:t},h=!1;try{(d=yield Er(f,l,u,i)).blockingList.push(...[...u.tplStateStoreMap.values()].map((e=>e.waitForAll())),...u.pendingPermissionsPreCheck),(0,v.flushStableLoadBricks)(),yield Promise.all(d.blockingList)}catch(e){h=!0,d={node:{tag:gr.BRICK,type:"div",properties:{textContent:Mt(e)},return:f,runtimeContext:null},blockingList:[],menuRequests:[]}}f.child=d.node,null==p||p.dispose(),Cr(e),o&&Cr(o),"page"===n&&(x(null!=a?a:"light"),F("default"),h||i.dispatchBeforePageLoad(),N(),K()),Rr(f),"page"===n&&window.scrollTo(0,0),h||("page"===n&&i.dispatchPageLoad(),i.dispatchOnMount(),i.initializeScrollIntoView(),i.initializeMediaChange())}))()},unmount(){s||(s=!0,Cr(e),o&&(Cr(o),r||o.remove()))}}}function Sa(e,t){return ka.apply(this,arguments)}function ka(){return(ka=(0,a.Z)((function*(e,t){var r,n,a=[],i=(0,o.Z)((0,o.Z)({},wo()),{},{data:t,pendingPermissionsPreCheck:[],tplStateStoreScope:a});null!==(r=i.tplStateStoreMap)&&void 0!==r||(i.tplStateStoreMap=new Map);var s=new Wr("fragment"),c={tag:gr.ROOT,createPortal:null},l=e.transform,u=ot();l&&at(u,"`useBrick.transform`",'please use "properties" instead, check your useBrick:',e);var p=yield kr(c,u?e:(0,o.Z)((0,o.Z)({},e),{},{properties:(0,o.Z)((0,o.Z)({},e.properties),l)}),i,s);if((0,v.flushStableLoadBricks)(),yield Promise.all([...p.blockingList,...a.map((e=>e.waitForAll())),...i.pendingPermissionsPreCheck]),null!==(n=p.node)&&void 0!==n&&n.portal)throw new Error("The root brick of useBrick cannot be a portal brick");return c.child=p.node,{tagName:p.node?p.node.type:null,renderRoot:c,rendererContext:s}}))).apply(this,arguments)}function Za(e,t){var r,{renderRoot:n,rendererContext:o}=e;return n.createPortal=()=>{var e=document.querySelector("#portal-mount-point");return r=document.createElement("div"),e.appendChild(r),r},Rr(n,t),o.dispatchOnMount(),o.initializeScrollIntoView(),o.initializeMediaChange(),{portal:r}}function Ia(e,t){var{rendererContext:r}=e;t.portal&&(Cr(t.portal),t.portal.remove()),r.dispatchOnUnmount(),r.dispose()}function Oa(e){!function(e){po=e}(e),jt("shoelace.show-notification"),Ct("shoelace.show-dialog")}function Pa(e,t,r){if(r)throw new Error("Legacy doTransform does not support options in v3");return ra(t,(0,o.Z)((0,o.Z)({},wo()),{},{data:e}),{noInject:!0})}var _a=go;function Aa(e,t){var r=bo(e);Object.assign(r,(0,o.Z)((0,o.Z)({},t),{},{$$fulfilling:null,$$fulfilled:!0,$$registerCustomTemplateProcessed:!1})),E(r)}function Ta(e,t){var r=bo(e),n=!1,o=e=>"".concat(e.path,".").concat(e.exact),a=(e,r)=>e.map((e=>{var i=o(e);return"routes"===e.type?(e.routes=a(e.routes,r),e):i===r?(n=!0,t):e}));r.routes=a(r.routes,o(t)),n||r.routes.unshift(t)}function Ca(e,t,r){var n="".concat(e,".").concat(t.name);ct.define(n,{bricks:t.bricks,proxy:t.proxy,state:t.state}),Ra(e,t.name,r)}function Ra(e,t,r){La(e,"${APP.homepage}/_dev_only_/template-preview/".concat(t),[(0,o.Z)({brick:t},(0,i.pick)(r,"properties","events","lifeCycle","context"))])}function Ma(e,t){var r;La(e,"${APP.homepage}/_dev_only_/snippet-preview/".concat(t.snippetId),null!==(r=t.bricks)&&void 0!==r&&r.length?t.bricks:[{brick:"span"}])}var xa=Ma;function La(e,t,r){var{routes:n}=bo(e),o=n.findIndex((e=>e.path===t)),a={path:t,bricks:r,menu:!1,exact:!0};-1===o?n.unshift(a):n.splice(o,1,a)}}}]);
3
+ //# sourceMappingURL=8843.218d316b.js.map