@next-bricks/advanced 0.32.9 → 0.32.10

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 (66) hide show
  1. package/dist/bricks.json +1 -1
  2. package/dist/chunks/{114.25c7d441.js → 114.1c9e92f5.js} +2 -2
  3. package/dist/chunks/{114.25c7d441.js.map → 114.1c9e92f5.js.map} +1 -1
  4. package/dist/chunks/{1940.97e1de58.js → 1940.bda91cd4.js} +2 -2
  5. package/dist/chunks/{1940.97e1de58.js.map → 1940.bda91cd4.js.map} +1 -1
  6. package/dist/chunks/{2277.17a39bc2.js → 2277.dc58d299.js} +2 -2
  7. package/dist/chunks/{2277.17a39bc2.js.map → 2277.dc58d299.js.map} +1 -1
  8. package/dist/chunks/{3171.2d6c07b6.js → 3171.a929c3b8.js} +2 -2
  9. package/dist/chunks/{3171.2d6c07b6.js.map → 3171.a929c3b8.js.map} +1 -1
  10. package/dist/chunks/{3933.8c84f586.js → 3933.af4ec709.js} +2 -2
  11. package/dist/chunks/{3933.8c84f586.js.map → 3933.af4ec709.js.map} +1 -1
  12. package/dist/chunks/{4658.9f99fe36.js → 4658.dd19a544.js} +2 -2
  13. package/dist/chunks/{4658.9f99fe36.js.map → 4658.dd19a544.js.map} +1 -1
  14. package/dist/chunks/5479.61975452.js +2 -0
  15. package/dist/chunks/{5479.f5091332.js.map → 5479.61975452.js.map} +1 -1
  16. package/dist/chunks/{5552.ed5107c1.js → 5552.f9b2453f.js} +2 -2
  17. package/dist/chunks/{5552.ed5107c1.js.map → 5552.f9b2453f.js.map} +1 -1
  18. package/dist/chunks/{6314.dbca74cd.js → 6314.acae8869.js} +2 -2
  19. package/dist/chunks/{6314.dbca74cd.js.map → 6314.acae8869.js.map} +1 -1
  20. package/dist/chunks/7115.c61e3b9d.js +2 -0
  21. package/dist/chunks/{7115.de5f3e9b.js.map → 7115.c61e3b9d.js.map} +1 -1
  22. package/dist/chunks/{7733.5ede631b.js → 7733.904cca2f.js} +2 -2
  23. package/dist/chunks/{7733.5ede631b.js.map → 7733.904cca2f.js.map} +1 -1
  24. package/dist/chunks/{790.ee452d34.js → 790.c12969a0.js} +2 -2
  25. package/dist/chunks/{790.ee452d34.js.map → 790.c12969a0.js.map} +1 -1
  26. package/dist/chunks/9248.9939bbc5.js +2 -0
  27. package/dist/chunks/{9248.fefbfba8.js.map → 9248.9939bbc5.js.map} +1 -1
  28. package/dist/chunks/9260.2cf5cff8.js +2 -0
  29. package/dist/chunks/{9260.47568935.js.map → 9260.2cf5cff8.js.map} +1 -1
  30. package/dist/chunks/9496.34d995f8.js +2 -0
  31. package/dist/chunks/{9496.f7a1b472.js.map → 9496.34d995f8.js.map} +1 -1
  32. package/dist/chunks/{9559.e5df57e0.js → 9559.94514321.js} +2 -2
  33. package/dist/chunks/{9559.e5df57e0.js.map → 9559.94514321.js.map} +1 -1
  34. package/dist/chunks/capture-snapshot.34c4a3f4.js +2 -0
  35. package/dist/chunks/{capture-snapshot.db38b517.js.map → capture-snapshot.34c4a3f4.js.map} +1 -1
  36. package/dist/chunks/eo-cascader.08462e84.js +2 -0
  37. package/dist/chunks/{eo-cascader.cfbb9448.js.map → eo-cascader.08462e84.js.map} +1 -1
  38. package/dist/chunks/{eo-next-table.00f61765.js → eo-next-table.e67afb93.js} +2 -2
  39. package/dist/chunks/{eo-next-table.00f61765.js.map → eo-next-table.e67afb93.js.map} +1 -1
  40. package/dist/chunks/eo-table.9e9d1679.js +2 -0
  41. package/dist/chunks/{eo-table.80cadd91.js.map → eo-table.9e9d1679.js.map} +1 -1
  42. package/dist/chunks/eo-tree-select.7284cae7.js +2 -0
  43. package/dist/chunks/{eo-tree-select.f9ffa3e9.js.map → eo-tree-select.7284cae7.js.map} +1 -1
  44. package/dist/chunks/{eo-tree.87f0a046.js → eo-tree.489e9f2f.js} +3 -3
  45. package/dist/chunks/{eo-tree.87f0a046.js.map → eo-tree.489e9f2f.js.map} +1 -1
  46. package/dist/chunks/eo-workbench-layout.c1c9f508.js +2 -0
  47. package/dist/chunks/{eo-workbench-layout.7a7d48a7.js.map → eo-workbench-layout.c1c9f508.js.map} +1 -1
  48. package/dist/chunks/main.de8b28c0.js +2 -0
  49. package/dist/chunks/{main.23677a17.js.map → main.de8b28c0.js.map} +1 -1
  50. package/dist/index.f93c08f7.js +2 -0
  51. package/dist/index.f93c08f7.js.map +1 -0
  52. package/package.json +3 -3
  53. package/dist/chunks/5479.f5091332.js +0 -2
  54. package/dist/chunks/7115.de5f3e9b.js +0 -2
  55. package/dist/chunks/9248.fefbfba8.js +0 -2
  56. package/dist/chunks/9260.47568935.js +0 -2
  57. package/dist/chunks/9496.f7a1b472.js +0 -2
  58. package/dist/chunks/capture-snapshot.db38b517.js +0 -2
  59. package/dist/chunks/eo-cascader.cfbb9448.js +0 -2
  60. package/dist/chunks/eo-table.80cadd91.js +0 -2
  61. package/dist/chunks/eo-tree-select.f9ffa3e9.js +0 -2
  62. package/dist/chunks/eo-workbench-layout.7a7d48a7.js +0 -2
  63. package/dist/chunks/main.23677a17.js +0 -2
  64. package/dist/index.74c07e5f.js +0 -2
  65. package/dist/index.74c07e5f.js.map +0 -1
  66. /package/dist/chunks/{eo-tree.87f0a046.js.LICENSE.txt → eo-tree.489e9f2f.js.LICENSE.txt} +0 -0
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunk_next_bricks_advanced=self.webpackChunk_next_bricks_advanced||[]).push([[9248],{99248:(e,t,r)=>{r.r(t),r.d(t,{Dialog:()=>lr,Notification:()=>mr,StoryboardFunctionRegistryFactory:()=>me,__secret_internals:()=>n,__test_only:()=>{},applyTheme:()=>oe,authenticate:()=>Wa,batchSetAppsLocalTheme:()=>ae,checkIfByTransform:()=>Mt,checkIfOfComputed:()=>Pt,createHistory:()=>T,createRuntime:()=>Ma,customProcessors:()=>N,customTemplates:()=>Be,fetchByProvider:()=>Ga,getAuth:()=>Ha,getBasePath:()=>g,getCssPropertyValue:()=>de,getCurrentMode:()=>ce,getCurrentTheme:()=>ne,getHistory:()=>O,getPageInfo:()=>_o,getRealValue:()=>Ja,getRuntime:()=>xa,getV2RuntimeFromDll:()=>R,handleHttpError:()=>hr,httpErrorToString:()=>ur,isLoggedIn:()=>qa,isUnauthenticatedError:()=>dr,logout:()=>za,matchPath:()=>qt,registerWidgetFunctions:()=>je,registerWidgetI18n:()=>D,setUIVersion:()=>Lo,unstable_createRoot:()=>Qa});var n={};r.r(n),r.d(n,{addRealTimeDataInspectHook:()=>Vn,getAddedContracts:()=>jn,getAllContextValues:()=>Ln,getBrickPackagesById:()=>Nn,getContextValue:()=>Bn,getRenderId:()=>Fn,legacyDoTransform:()=>kn,loadBricks:()=>Un,mountUseBrick:()=>En,renderUseBrick:()=>bn,setRealTimeDataInspectRoot:()=>Kn,symbolForRootRuntimeContext:()=>An,unmountUseBrick:()=>Sn,updateSnippetPreviewSettings:()=>Mn,updateStoryboard:()=>In,updateStoryboardByRoute:()=>Cn,updateStoryboardBySnippet:()=>Pn,updateStoryboardByTemplate:()=>Rn,updateTemplatePreviewSettings:()=>Tn});var o=r(69740),a=r(86330),i=r(74635),s=r(24586),l=r(70918),c=r(12559),u=r(86121),d=r(70829),p=r(56272),f=r(56005),v=r(56223),h=r(21302),m=(r(26036),r(32890));function g(){var e=document.querySelector("base");return e?e.getAttribute("href"):"/"}var y=r(14223),A=r(41030);function b(e,t){var r=(0,A.orderBy)(e,(e=>{var t,r;return null!==(t=null===(r=e.app.homepage)||void 0===r?void 0:r.length)&&void 0!==t?t:0}),"desc");for(var n of r){var o=n.app.homepage;if("string"==typeof o&&"/"===o[0]&&w(o,t))return n}}function w(e,t){return"/"===e?t===e:"".concat(t.replace(/\/+$/,""),"/").startsWith("".concat(e.replace(/\/+$/,""),"/"))}function E(e){var t;return!e||(null===(t=xa().getCurrentApp())||void 0===t?void 0:t.id)!==e.app.id&&!window.STANDALONE_MICRO_APPS&&e.app.standaloneMode}var S,k=["extraQuery","clear","keepHash"],I=!1;function C(e,t){t(!(I=!confirm(e)))}function R(){var e,{dll:t}=window;if(t&&null!==(e=window.BRICK_NEXT_VERSIONS)&&void 0!==e&&null!==(e=e["brick-container"])&&void 0!==e&&e.startsWith("2."))return t("tYg3")}function T(){if(!S){var e=(0,m.createBrowserHistory)({basename:g().replace(/\/$/,""),getUserConfirmation:C});Object.assign(e,function(e){var t,{push:r,replace:n}=e;function a(e,t,n){I=!1,r(e,t),null==n||n(I)}function i(e,t,r){I=!1,n(e,t),null==r||r(I)}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:l,keepHash:c}=n,u=(0,y.A)(n,k),d=new URLSearchParams(l?"":e.location.search),p={};for(var[f,v]of(Object.assign(p,r,s),Object.entries(p)))if(Array.isArray(v))for(var h of(d.delete(f),v))d.append(f,h);else null==v||""===v?d.delete(f):d.set(f,v);("push"===t?a:i)("?".concat(d.toString()).concat(c?e.location.hash:""),u,o)}}return(0,o.A)({pushQuery:s("push"),replaceQuery:s("replace"),pushAnchor:function(t,r,n){a((0,o.A)((0,o.A)({},e.location),{},{key:void 0,hash:t,state:(0,o.A)({notify:!1},r)}),void 0,n)},reload:function(t){i((0,o.A)((0,o.A)({},e.location),{},{state:(0,o.A)((0,o.A)({},e.location.state),{},{notify:!0,noIncremental:!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,l="string"==typeof o;return"string"==typeof(s=l?(0,m.parsePath)(o).pathname:o.pathname)&&s.startsWith("/")&&E(function(e){var t,r;return b(null!==(t=null===(r=wa)||void 0===r?void 0:r.storyboards)&&void 0!==t?t:[],e)}(s))?location["push"===n?"assign":"replace"](l?g()+o.substring(1):e.createHref(o)):("push"===n?t:r)(o,a,i)}}return{push:n("push"),replace:n("replace")}}((0,o.A)((0,o.A)({},e),{},{push:a,replace:i})))}(e)),S=e}return S}var O=function(){var e=R();if(e)return e.getHistory}()||function(){return S},P=r(29124),_=r(25058),M=r(41195),x=r(67123),B=r(32042),L=new WeakMap,N=function(){var e=R();if(e)return Object.freeze({define:(t,r)=>e.getRuntime().registerCustomProcessor(t,r)})}()||new class{constructor(){(0,l.A)(this,L,new Map)}define(e,t){var[r,n]=e.split("."),o=(0,d.A)(L,this).get(r);if(o||(o=new Map,(0,d.A)(L,this).set(r,o)),o.has(n))throw new Error('Custom processor of "'.concat(e,'" already registered'));o.set(n,t)}get(e){return(0,d.A)(L,this).get(e)}};function U(e){var{app:t,meta:r}=e;if(null!=r&&r.i18n){var n=F("app",t.id),o=[];return Object.entries(r.i18n).forEach((e=>{var[t,r]=e;p.i18n.addResourceBundle(t,n,r),o.push(t)})),()=>{for(var e of o)p.i18n.removeResourceBundle(e,n)}}}function F(e,t){return"".concat(e,"/").concat(t)}function j(e){return p.i18n.getFixedT(null,F("widget",e))}var $,D=function(){var e=R();if(e)return function(t,r){return e.getRuntime().registerWidgetI18n(t,r)}}()||function(e,t){var r=F("widget",e);Object.entries(t).forEach((e=>{var[t,n]=e;p.i18n.addResourceBundle(t,r,n)}))},K="brick-next-devtools-panel",V="devtools-frame-active-change",W="devtools-panel-change",H=!0;function z(e,t){var r=q();if(r&&("evaluation"!==e||H&&(!$||"Evaluations"===$))){var n=()=>{var n;null===(n=r.emit)||void 0===n||n.call(r,{type:e,payload:t})};"function"==typeof window.requestIdleCallback?window.requestIdleCallback(n):setTimeout(n,0)}}function q(){return window.__BRICK_NEXT_DEVTOOLS_HOOK__}var G=()=>{throw new Error("Can't modify read-only proxy object")},Y={set:G,defineProperty:G,deleteProperty:G,setPrototypeOf:G};function Q(e){return new Proxy(e,Y)}function J(e){var{get:t,ownKeys:r}=e;return q()?Q(Object.fromEntries(r(null).map((e=>[e,t(null,e,null)])))):new Proxy(Object.freeze({}),{get:t})}var X="light",Z=new v.JsonStorage(localStorage),ee="apps-theme";function te(e){if("dark"!==e&&"light"!==e&&"dark-v2"!==e)throw new Error("Unsupported theme: ".concat(e));X=e}function re(){return X}function ne(){return document.documentElement.dataset.theme}function oe(e){e?te(e):e=re(),e!==ne()&&(document.documentElement.dataset.theme=e,window.dispatchEvent(new CustomEvent("theme.change",{detail:e})))}function ae(e){Z.setItem(ee,(0,o.A)((0,o.A)({},ie()),e))}function ie(){var e,t;try{t=Z.getItem(ee)}catch(e){console.error("JSON parse error inside `getLocalAppsTheme()`")}return null!==(e=t)&&void 0!==e?e:{}}var se="default";function le(e){if("dashboard"!==e&&"default"!==e)throw new Error("Unsupported mode: ".concat(e));se=e}function ce(){return document.documentElement.dataset.mode}function ue(e){e?le(e):e=se,e!==ce()&&(document.documentElement.dataset.mode=e,window.dispatchEvent(new CustomEvent("mode.change",{detail:e})))}function de(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 pe(e,t){var r={};for(var n of e){var o=fe(n,t);void 0!==o&&(r[n]=o)}return r}function fe(e,t){var r,n,o,{collectCoverage:a,widgetId:i,widgetVersion:s,app:l,appendI18nNamespace:c,storyboardFunctions:u,isStoryboardFunction:d}=t;switch(e){case"BASE_URL":return a?"/next":g().replace(/\/$/,"");case"FN":return u;case"IMG":return a?{get:e=>"mock/images/".concat(e)}:i?null==Sa||null===(r=Sa.images)||void 0===r?void 0:r.widgetImagesFactory(i,s):null==Sa||null===(n=Sa.images)||void 0===n?void 0:n.imagesFactory(l.id,l.isBuildPush,l.currentVersion);case"I18N":return a?A.identity:i?j(i):p.i18n.getFixedT(null,[c,F("app",l.id)].filter(Boolean));case"I18N_TEXT":return a?ve:p.i18nText;case"PERMISSIONS":return Q({check:a?he:null==Sa||null===(o=Sa.checkPermissions)||void 0===o?void 0:o.checkPermissions});case"THEME":return Q({getTheme:a?()=>"light":re});case"console":return d?Q(console):void 0;case"location":return a?{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 ve(e){return null==e?void 0:e.en}function he(){return!0}function me(){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,l=a.get(o);if(l){if(l.processed)return l.cooked;n&&(s=n.createCollector(o));var c=(0,_.precookFunction)(l.source,{typescript:l.typescript,hooks:s&&{beforeVisit:s.beforeVisit}});return l.cooked=(0,_.cook)(c.function,l.source,{rules:{noVar:!0},globalVariables:(0,B.supply)(c.attemptToVisitGlobals,pe(c.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}}),l.processed=!0,l.cooked}}(s)});return{storyboardFunctions:i,registerStoryboardFunctions:function(t,r){if(r&&(e=r),a.clear(),Array.isArray(t))for(var o of t){var i=(0,M.collectMemberUsageInFunction)(o,"FN",!!n),s=(0,M.collectMemberUsageInFunction)(o,"PERMISSIONS",!!n).has("check");a.set(o.name,{source:o.source,typescript:o.typescript,deps:i,hasPermissionsCheck:s})}},updateStoryboardFunction(e,t){var r=(0,o.A)((0,o.A)({},t),{},{name:e}),n=(0,M.collectMemberUsageInFunction)(r,"FN",!0),i=(0,M.collectMemberUsageInFunction)(r,"PERMISSIONS",!0).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:ge,registerStoryboardFunctions:ye,checkPermissionsUsage:Ae}=me(),be={};try{be.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)})),be.EventTarget=a}(Object,new WeakMap)}const we=be.EventTarget;var Ee=function(e){return e.xLarge="xLarge",e.large="large",e.medium="medium",e.small="small",e.xSmall="xSmall",e}({}),Se=new Map([[Ee.xLarge,"1920px"],[Ee.large,"1600px"],[Ee.medium,"1280px"],[Ee.small,"1024px"],[Ee.xSmall,0]]),ke=new we,Ie={},Ce={};function Re(e,t){var r=!1;for(var[n]of(Ie[t]=e.matches,Se))if(Ie[n]&&Ce.breakpoint!==n){Ce.breakpoint=n,r=!0;break}r&&ke.dispatchEvent(new CustomEvent("change",{detail:Ce}))}Se.forEach(((e,t)=>{var r=window.matchMedia("(min-width: ".concat(e,")"));Re(r,t),r.addEventListener?r.addEventListener("change",(e=>{Re(e,t)})):r.addListener((e=>{Re(e,t)}))}));var Te=()=>Ce;function Oe(e){return function(t){var r,n="local"===e?localStorage:sessionStorage;return JSON.parse(null!==(r=n.getItem(t))&&void 0!==r?r:"null")}}function Pe(e){var t,r;return!(null===(t=e?e.flags:null===(r=xa())||void 0===r?void 0:r.getFeatureFlags())||void 0===t||!t["brick-next-v3-strict-mode"])}function _e(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 Me=new Set(["prefix"]),xe=new WeakMap,Be=function(){var e=R();if(e)return Object.freeze({define:(t,r)=>e.getRuntime().registerCustomTemplate(t,r)})}()||new class{constructor(){(0,l.A)(this,xe,new Map)}define(e,t){var r,n,a,i,s=(0,d.A)(xe,this).has(e);s?console.warn('Custom template of "'.concat(e,'" already registered.')):(s=!!customElements.get(e))&&console.warn('Custom template of "'.concat(e,'" already defined by customElements.'));var l=Pe(),c=null!==(r=null===(n=t.proxy)||void 0===n?void 0:n.properties)&&void 0!==r?r:{},u=[],p=[];for(var[f,v]of Object.entries(c))v.asVariable?(_e(l,"Template `asVariable`",e,f),l||p.push(f)):v.mergeProperty||v.refTransform?console.error("Template `mergeProperty` and `refTransform` are dropped in v3:",e,f):v.ref&&u.push([f,v]);var h=(0,o.A)((0,o.A)({},t),{},{proxy:(0,o.A)((0,o.A)({},t.proxy),{},{properties:Object.fromEntries(u)}),state:(t.state?l?t.state:t.state.map((e=>(0,o.A)({expose:!0},e))):[]).concat(p.map((e=>({name:e,expose:!0}))))});(0,d.A)(xe,this).set(e,(0,o.A)((0,o.A)({},h),{},{name:e}));var m,g,y=(m=h.state,(0,A.uniq)(null!==(g=null==m?void 0:m.filter((e=>e.expose)).map((e=>e.name)))&&void 0!==g?g:[])),b=Object.entries(null!==(a=null===(i=h.proxy)||void 0===i?void 0:i.methods)&&void 0!==a?a:{}),w=y.concat(u.map((e=>e[0]))),E=b.map((e=>e[0])),S=w.concat(E).filter((e=>e in HTMLElement.prototype&&!Me.has(e)));if(S.length>0&&(_e(l,"Using native HTMLElement properties as template properties or methods",e,...S),l))throw new Error('In custom template "'.concat(e,'", ').concat(S.map((e=>'"'.concat(e,'"'))).join(", ")," are native HTMLElement properties, and should be avoid to be used as brick properties or methods."));if(!s){class t extends HTMLElement{get $$typeof(){return"custom-template"}static get _dev_only_definedProperties(){return w}static get _dev_only_definedMethods(){return E}$$getElementByRef(e){var t;return null===(t=this.$$tplStateStore)||void 0===t||null===(t=t.hostBrick)||void 0===t||null===(t=t.tplHostMetadata)||void 0===t||null===(t=t.internalBricksByRef.get(e))||void 0===t?void 0:t.element}connectedCallback(){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 k=function(r){if(u.some((e=>e[0]===r)))return console.error('Cannot define an exposed state that is also a proxy property: "'.concat(r,'" in ').concat(e)),1;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 y)k(I);var C=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[R,T]of u)C(R,T);var O=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[P,_]of b)O(P,_);customElements.define(e,t)}}get(e){return(0,d.A)(xe,this).get(e)}};function Le(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 Ne(e,t,r){var n=Le(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}var Ue=new Map,Fe=new Proxy(Object.freeze({}),{get:(e,t)=>Ue.get(t)}),je=function(){var e=R();if(e)return function(t,r,n){return e.getRuntime().registerWidgetFunctions(t,r,n)}}()||function(e,t,r){if(Ue.has(e))throw new Error('Widget functions of "'.concat(e,'" already registered'));var{storyboardFunctions:n,registerStoryboardFunctions:o}=me({widgetId:e,widgetVersion:r});Ue.set(e,n),o(t)};const $e=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,De=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match($e);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Ke=e=>"*"===e||"x"===e||"X"===e,Ve=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},We=(e,t)=>{if(Ke(e)||Ke(t))return 0;const[r,n]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(Ve(e),Ve(t));return r>n?1:r<n?-1:0},He=(e,t)=>{for(let r=0;r<Math.max(e.length,t.length);r++){const n=We(e[r]||"0",t[r]||"0");if(0!==n)return n}return 0},ze=(e,t,r)=>{Ye(r);const n=((e,t)=>{const r=De(e),n=De(t),o=r.pop(),a=n.pop(),i=He(r,n);return 0!==i?i:o&&a?He(o.split("."),a.split(".")):o||a?o?-1:1:0})(e,t);return qe[r].includes(n)},qe={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Ge=Object.keys(qe),Ye=e=>{if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===Ge.indexOf(e))throw new Error(`Invalid operator, expected one of ${Ge.join("|")}`)};function Qe(e,t){var r=Va(e);if(!r&&null!=Sa&&Sa.checkInstalledApps&&(r=Sa.checkInstalledApps.getCheckedApp(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 ze(r.currentVersion,n[2],n[1])}catch(e){console.error(e)}return!1}function Je(e,t,r){var{formStateStoreId:n,formStateStoreMap:o}=e;if(!n)throw new Error('Using "'.concat(t,'" outside of form renderer').concat(null!=r?r:""));var a=o.get(n);if(!a)throw new Error('Form 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}var Xe=new Map;function Ze(e){return et.apply(this,arguments)}function et(){return et=(0,a.A)((function*(e){var t,r=null==Sa||null===(t=Sa.flowApi)||void 0===t?void 0:t.isFlowApiProvider(e);r&&(e=Sa.flowApi.FLOW_API_PROVIDER);var n=Xe.get(e);if(n)return n;if(e.includes("-")&&!customElements.get(e))if(r)Sa.flowApi.registerFlowApiProvider();else if(yield(0,f.loadBricksImperatively)([e],ja()),!customElements.get(e))throw new Error('Provider not defined: "'.concat(e,'".'));return n=document.createElement(e),Xe.set(e,n),n})),et.apply(this,arguments)}var tt=new WeakSet;function rt(e){if((0,v.isObject)(e)&&!nt(e))if(tt.add(e),Array.isArray(e))e.forEach(rt);else{var t=Object.getPrototypeOf(e);t&&t.constructor!==Object||Object.values(e).forEach(rt)}}function nt(e){return tt.has(e)}var ot=new Map;function at(e,t,r){return it.apply(this,arguments)}function it(){return(it=(0,a.A)((function*(e,t,r){var{useProvider:n,method:a="resolve",args:i=[],onReject:s}=e,{provider:l,field:c}=e;if(l&&!n)throw new Error("You're using \"provider: ".concat(l,'" which is dropped in v3, please use "useProvider" instead'));var u=null!=c;if(u){var d=Pe();if(_e(d,"`resolve.field`"),d)throw new Error("Using deprecated `resolve.field`")}var p,[f,v]=yield Promise.all([Ze(n),Et(i,t)]),h=null==r?void 0:r.renderId,m=st(f,n,a,v,r,i,!!h&&h!==$a()),{transform:g}=e;try{var y=yield m;rt(p=u?(0,A.get)(y,c):y)}catch(e){if(!function(e){return!(null==e||!e.transform)}(s))throw e;g=s.transform,p=e}return g?"string"==typeof g?{[g]:p}:Et(g,(0,o.A)((0,o.A)({},t),{},{data:p})):p}))).apply(this,arguments)}function st(e,t,r,n,o,a,i){return lt.apply(this,arguments)}function lt(){return lt=(0,a.A)((function*(e,t,r,n,o,i,s){var l,c;try{l=JSON.stringify({useProvider:t,method:r,args:n})}catch(e){if(!i)throw e;l=JSON.stringify({useProvider:t,method:r,originalArgs:i})}return"reload"!==(null==o?void 0:o.cache)&&(c=ot.get(l)),c||(c=(0,a.A)((function*(){var o,a=null!=Sa&&null!==(o=Sa.flowApi)&&void 0!==o&&o.isFlowApiProvider(t)?yield Sa.flowApi.getArgsOfFlowApi(t,n,r):n;return e[r](...a)}))(),s||ot.set(l,c)),c})),lt.apply(this,arguments)}var ct=Symbol.for("pre.evaluated.raw"),ut=Symbol.for("pre.evaluated.context");function dt(e){return!(null==e||!e[ct])}function pt(e){return e[ct]}function ft(e){return"string"==typeof e?(0,_.shouldAllowRecursiveEvaluations)(e):(0,_.shouldAllowRecursiveEvaluations)(e[ct])}var vt=new WeakSet([SyntaxError,TypeError,ReferenceError]);function ht(e){return vt.has(e.constructor)?e.constructor:TypeError}function mt(){return(mt=(0,a.A)((function*(e,t,r){var{blockingList:n,run:o}=yt(e,t,r,!0);return yield Promise.all(n),o()}))).apply(this,arguments)}function gt(e,t,r){var{run:n}=yt(e,t,r,!1);return n()}function yt(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 i=(0,A.omit)(t,["pendingPermissionsPreCheck","tplStateStoreMap","tplStateStoreScope","formStateStoreMap","formStateStoreScope"]);t=(0,o.A)((0,o.A)({},e[ut]),i),e=e[ct]}var s,l={usedArgs:new Set},c={usedArgs:new Set};try{s=(0,_.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal(e,t){(0,M.collectAppGetMenuUsage)(l,e,t),(0,M.collectInstalledAppsHasUsage)(c,e,t)}}})}catch(t){var u="".concat(t.message,', in "').concat(e,'"');throw new(ht(t))(u)}if(l.hasNonStaticUsage)throw new Error('Non-static usage of "APP.getMenu" is prohibited in v3, check your expression: "'.concat(e,'"'));if(c.hasNonStaticUsage)throw new Error('Non-static usage of "INSTALLED_APPS.has" is prohibited in v3, check your expression: "'.concat(e,'"'));var d,p,h,m,g={},{attemptToVisitGlobals:y}=s;if(r.lazy||y.has("EVENT")&&!(0,v.hasOwnProperty)(t,"event")||y.has("DATA")&&!(0,v.hasOwnProperty)(t,"data"))return{blockingList:a,run:()=>Object.keys(t).length>0?{[ct]:e,[ut]:t}:e};var b,w,E=Pe(t);(y.has("STATE")||!E&&y.has("TPL"))&&(m=Le(t,"STATE",': "'.concat(e,'"'))),y.has("FORM_STATE")&&(w=Je(t,"FORM_STATE",': "'.concat(e,'"')));var S=q();if(n||S){if(y.has("CTX")&&(d=(0,M.strictCollectMemberUsage)(e,"CTX"),n&&a.push(t.ctxStore.waitFor(d))),m){if(h=(0,M.strictCollectMemberUsage)(e,"STATE"),!E){var k=(0,M.strictCollectMemberUsage)(e,"TPL");for(var I of k)h.add(I)}n&&a.push(m.waitFor(h))}w&&(b=(0,M.strictCollectMemberUsage)(e,"FORM_STATE"),n&&a.push(w.waitFor(b))),y.has("PROCESSORS")&&(p=(0,M.strictCollectMemberUsage)(e,"PROCESSORS",2),n&&a.push((0,f.loadProcessorsImperatively)(p,ja())))}if(n){var C,R=y.has("PERMISSIONS");if(!R&&y.has("FN")){var T=[...(0,M.strictCollectMemberUsage)(e,"FN")];R=Ae(T)}if(R&&a.push(...t.pendingPermissionsPreCheck),l.usedArgs.size>0&&null!=Sa&&Sa.menu){var O=[...l.usedArgs];a.push(Promise.all(O.map((e=>Sa.menu.fetchMenuById(e,t,{getStoryboardByAppId:Ka,resolveData:at,asyncComputeRealValue:Et})))))}c.usedArgs.size>0&&a.push(null==Sa||null===(C=Sa.checkInstalledApps)||void 0===C?void 0:C.waitForCheckingApps([...c.usedArgs]))}return{blockingList:a,run(){var r,n,a,i,{app:l,location:c,query:u,match:f,flags:S,sys:k,ctxStore:I,data:C,event:R}=t,T=null!==(r=t.overrideApp)&&void 0!==r?r:l;for(var O of y)switch(O){case"ANCHOR":g[O]=c.hash?c.hash.substring(1):null;break;case"APP":if(null==T)throw new ReferenceError('APP is not defined, in "'.concat(e,'"'));g[O]=(0,o.A)((0,o.A)({},(0,A.cloneDeep)(T)),{},{getMenu:null==Sa||null===(n=Sa.menu)||void 0===n?void 0:n.getMenuById});break;case"CTX":g[O]=J({get:(e,t)=>I.getValue(t),ownKeys:()=>Array.from(d)});break;case"DATA":g[O]=C;break;case"EVENT":g[O]=R;break;case"FLAGS":g[O]=Q(S);break;case"FORM_STATE":g[O]=J({get:(e,t)=>w.getValue(t),ownKeys:()=>Array.from(b)});break;case"HASH":g[O]=c.hash;break;case"INSTALLED_APPS":g[O]=Q({has:Qe});break;case"ITEM":case"INDEX":var P="ITEM"===O?"forEachItem":"forEachIndex";(0,v.hasOwnProperty)(t,P)?g[O]=t[P]:console.error("Using `".concat(O,'` but no `:forEach` is found, check your expression: "').concat(e,'"'));break;case"LOCAL_STORAGE":g[O]=Q({getItem:Oe("local")});break;case"MEDIA":g[O]=Q(Te());break;case"MISC":g[O]=xa().getMiscSettings();break;case"PARAMS":if(null==u)throw new ReferenceError('PARAMS is not defined, in "'.concat(e,'"'));g[O]=new URLSearchParams(u);break;case"PATH":g[O]=Q(null!==(a=null==f?void 0:f.params)&&void 0!==a?a:{});break;case"PATH_NAME":g[O]=c.pathname;break;case"PROCESSORS":g[O]=J({get(e,t){var r=N.get(t);if(!r)throw new Error("'PROCESSORS.".concat(t,"' is not registered! Have you installed the relevant brick package?"));return J({get:(e,t)=>r.get(t),ownKeys:()=>Array.from(r.keys())})},ownKeys(){var e=new Set;for(var t of p){var r=t.split(".")[0];e.add(r)}return Array.from(e)}});break;case"QUERY":if(null==u)throw new ReferenceError('QUERY is not defined, in "'.concat(e,'"'));g[O]=Object.fromEntries(Array.from(u.keys()).map((e=>[e,u.get(e)])));break;case"QUERY_ARRAY":if(null==u)throw new ReferenceError('QUERY_ARRAY is not defined, in "'.concat(e,'"'));g[O]=Object.fromEntries(Array.from(u.keys()).map((e=>[e,u.getAll(e)])));break;case"SESSION_STORAGE":g[O]=Q({getItem:Oe("session")});break;case"TPL":if(_e(E,'Using "TPL" in expression','check your expression: "'.concat(e,'"')),E)break;case"STATE":g[O]=J({get:(e,t)=>m.getValue(t),ownKeys:()=>Array.from(h)});break;case"SYS":g[O]=Q(null!=k?k:{});break;case"__WIDGET_FN__":g[O]=Fe;break;case"__WIDGET_IMG__":g[O]=null==Sa||null===(i=Sa.images)||void 0===i?void 0:i.widgetImagesFactory;break;case"__WIDGET_I18N__":g[O]=j}Object.assign(g,pe(s.attemptToVisitGlobals,{storyboardFunctions:ge,app:T,appendI18nNamespace:t.appendI18nNamespace}));try{var M=(0,_.cook)(s.expression,s.source,{globalVariables:(0,B.supply)(s.attemptToVisitGlobals,g)});return z("evaluation",{raw:e,context:g,result:M}),M}catch(t){var x="".concat(t.message,', in "').concat(e,'"');throw new(ht(t))(x)}}}}var At=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 bt(e){switch(e){case At.USE_BRICK_PROPERTIES:case At.USE_BRICK_TRANSFORM:case At.USE_BRICK_EVENTS:case At.USE_BRICK_IF:case At.USE_BRICK_LIFECYCLE:case At.USE_BRICK_DATA_SOURCE:return!0}return!1}function wt(e,t,r){if(bt(e))return e;if(t)switch(e){case At.USE_BRICK:return At.USE_BRICK_ITEM;case At.USE_BRICK_SLOTS_ITEM_BRICKS:return At.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM}else switch(e){case At.INITIAL:if("useBrick"===r)return At.USE_BRICK;break;case At.USE_BRICK:case At.USE_BRICK_ITEM:case At.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM:switch(r){case"properties":return At.USE_BRICK_PROPERTIES;case"transform":return At.USE_BRICK_TRANSFORM;case"dataSource":return At.USE_BRICK_DATA_SOURCE;case"events":return At.USE_BRICK_EVENTS;case"slots":return At.USE_BRICK_SLOTS;case"children":return At.USE_BRICK_SLOTS_ITEM_BRICKS;case"if":return At.USE_BRICK_IF;case"lifeCycle":return At.USE_BRICK_LIFECYCLE}break;case At.USE_BRICK_SLOTS:return At.USE_BRICK_SLOTS_ITEM;case At.USE_BRICK_SLOTS_ITEM:if("bricks"===r)return At.USE_BRICK_SLOTS_ITEM_BRICKS}return At.INITIAL}function Et(e,t){return St.apply(this,arguments)}function St(){return St=(0,a.A)((function*(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=dt(e);if(n||"string"==typeof e){var o,a=r.$$lazyForUseBrick&&bt(r.$$stateOfUseBrick),i=a;return n||(0,_.isEvaluable)(e)?(o=yield function(e,t,r){return mt.apply(this,arguments)}(e,t,{lazy:a}),i=ft(e)):o=a?e:((0,v.hasOwnProperty)(t,"data")?r.noInject?x.transform:x.transformAndInject:r.noInject?Ct:x.inject)(e,t),i||rt(o),o}if(!(0,v.isObject)(e)||nt(e)||"function"==typeof e)return e;if(Array.isArray(e)){var s=It(r,!0);return Promise.all(e.map((e=>Et(e,t,s))))}return Object.fromEntries((yield Promise.all(Object.entries(e).map((e=>{var[n,o]=e;return Promise.all([Et(n,t),Et(o,t,It(r,!1,n))])})))).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))})),St.apply(this,arguments)}function kt(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=dt(e);if(n||"string"==typeof e){var o,a=r.$$lazyForUseBrick&&bt(r.$$stateOfUseBrick),i=a;return n||(0,_.isEvaluable)(e)?(o=gt(e,t),i=ft(e)):o=a?e:((0,v.hasOwnProperty)(t,"data")?r.noInject?x.transform:x.transformAndInject:r.noInject?Ct:x.inject)(e,t),i||rt(o),o}if(!(0,v.isObject)(e)||nt(e)||"function"==typeof e)return e;if(Array.isArray(e)){var s=It(r,!0);return e.map((e=>kt(e,t,s)))}return Object.fromEntries(Object.entries(e).map((e=>{var[n,o]=e;return[kt(n,t),kt(o,t,It(r,!1,n))]})).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function It(e,t,r){return e.$$lazyForUseBrick?(0,o.A)((0,o.A)({},e),{},{$$stateOfUseBrick:wt(e.$$stateOfUseBrick,t,r)}):e}function Ct(e){return e}function Rt(e,t){return Tt.apply(this,arguments)}function Tt(){return(Tt=(0,a.A)((function*(e,t){return!(0,v.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||dt(e.if)?yield Et(e.if,t):e.if)}))).apply(this,arguments)}function Ot(e,t){return!(0,v.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||dt(e.if)?kt(e.if,t):e.if)}function Pt(e){return!(0,v.hasOwnProperty)(e,"if")||!!e.if}function _t(){return(_t=(0,a.A)((function*(e,t){return(0,v.isObject)(e.if)&&!dt(e.if)?Pt(yield at(e.if,t)):Rt(e,t)}))).apply(this,arguments)}var Mt=function(){var e=R();if(e)return e.looseCheckIfByTransform}()||function(e,t){return Ot(e,{data:t})};function xt(e){var t=!1,r=!1,n=!1;if("string"==typeof e?(0,_.isEvaluable)(e):dt(e)){var o="string"==typeof e?e:pt(e);if((0,_.isTrackAll)(o)){var a=(0,M.trackAll)(o);a&&(t=a.context,r=a.state,n=a.formState)}else t=(0,M.track)(o,"track context","CTX"),r=(0,M.track)(o,"track state","STATE"),n=(0,M.track)(o,"track formstate","FORM_STATE")}return{contextNames:t,stateNames:r,formStateNames:n}}function Bt(e,t){return Lt.apply(this,arguments)}function Lt(){return(Lt=(0,a.A)((function*(e,t){for(var[r,n,o]of e)if(r===t){var a=yield n;if(void 0!==a||!o)return a}}))).apply(this,arguments)}function Nt(e){return Ut.apply(this,arguments)}function Ut(){return(Ut=(0,a.A)((function*(e){var t={};for(var[r,n,o]of e){var a=yield n;void 0===a&&o||!("style"!==r&&"dataset"!==r||(0,v.isObject)(a))||(t[r]=a)}return t}))).apply(this,arguments)}function Ft(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 jt(e,t,r){var n=function(e,t){return(0,v.isObject)(e)?Object.fromEntries(Object.entries(e).map((e=>{var[r,n]=e,o=kt(n,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===r?At.USE_BRICK:At.INITIAL});if("style"!==r&&"dataset"!==r||(0,v.isObject)(o))return[r,o]})).filter(Boolean)):{}}(t,r);Array.isArray(e)||(e=[e]),e.forEach((e=>{Ft(e,n)}))}function $t(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Dt(e){return e&&e.sensitive?"":"i"}function Kt(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,l=void 0===s||s,c=r.encode,u=void 0===c?function(e){return e}:c,d=r.delimiter,p=void 0===d?"/#?":d,f=r.endsWith,v="[".concat($t(void 0===f?"":f),"]|$"),h="[".concat($t(p),"]"),m=i?"^":"",g=0,y=e;g<y.length;g++){var A=y[g];if("string"==typeof A)m+=$t(u(A));else{var b=$t(u(A.prefix)),w=$t(u(A.suffix));if(A.pattern)if(t&&t.push(A),b||w)if("+"===A.modifier||"*"===A.modifier){var E="*"===A.modifier?"?":"";m+="(?:".concat(b,"((?:").concat(A.pattern,")(?:").concat(w).concat(b,"(?:").concat(A.pattern,"))*)").concat(w,")").concat(E)}else m+="(?:".concat(b,"(").concat(A.pattern,")").concat(w,")").concat(A.modifier);else"+"===A.modifier||"*"===A.modifier?m+="((?:".concat(A.pattern,")").concat(A.modifier,")"):m+="(".concat(A.pattern,")").concat(A.modifier);else m+="(?:".concat(b).concat(w,")").concat(A.modifier)}}if(l)o||(m+="".concat(h,"?")),m+=r.endsWith?"(?=".concat(v,")"):"$";else{var S=e[e.length-1],k="string"==typeof S?h.indexOf(S[S.length-1])>-1:void 0===S;o||(m+="(?:".concat(h,"(?=").concat(v,"))?")),k||(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 l=e.charCodeAt(s);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))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($t(t.delimiter||"/#?"),"]+?"),i=[],s=0,l=0,c="",u=function(e){if(l<r.length&&r[l].type===e)return r[l++].value},d=function(e){var t=u(e);if(void 0!==t)return t;var n=r[l],o=n.type,a=n.index;throw new TypeError("Unexpected ".concat(o," at ").concat(a,", expected ").concat(e))},p=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t};l<r.length;){var f=u("CHAR"),v=u("NAME"),h=u("PATTERN");if(v||h){var m=f||"";-1===o.indexOf(m)&&(c+=m,m=""),c&&(i.push(c),c=""),i.push({name:v||s++,prefix:m,suffix:"",pattern:h||a,modifier:u("MODIFIER")||""})}else{var g=f||u("ESCAPED_CHAR");if(g)c+=g;else if(c&&(i.push(c),c=""),u("OPEN")){m=p();var y=u("NAME")||"",A=u("PATTERN")||"",b=p();d("CLOSE"),i.push({name:y||(A?s++:""),pattern:y&&!A?a:A,prefix:m,suffix:b,modifier:u("MODIFIER")||""})}else d("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):Kt(e,t,r)}var Wt=new Map,Ht=1e4,zt=0;function qt(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=Wt.get(r);n||Wt.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 zt<Ht&&(n.set(e,i),zt++),i}(r,{end:n,strict:o,sensitive:a}),l=i.exec(e);if(!l)return null;var[c,...u]=l,d=e===c;return n&&!d?null:{path:r,url:"/"===r&&""===c?"/":c,isExact:d,params:s.reduce(((e,t,r)=>(e[t.name]=u[r],e)),{})}}),null)}function Gt(){return(Gt=(0,a.A)((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=Yt(r,t.app.homepage,t.location.pathname);if(n&&(yield Rt(r,t)))return t.app.noAuthGuard||r.public||null==Sa||!Sa.auth||Sa.auth.isLoggedIn()?{match:n,route:r}:"unauthenticated"}return"missed"}))).apply(this,arguments)}function Yt(e,t,r){return qt(r,{path:e.path.replace(/^\$\{APP.homepage\}/,t),exact:e.exact})}var Qt,Jt=Symbol.for("tpl.asyncComputedPropsFromHost"),Xt=Symbol.for("tpl.stateStoreId"),Zt=Symbol.for("tpl.externalForEachItem"),er=Symbol.for("tpl.externalForEachIndex"),tr=Symbol.for("tpl.externalNoForEach"),rr=new Set,nr=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}({}),or={[nr.REQUEST_FAILED]:"Request Failed",[nr.SOMETHING_WENT_WRONG]:"Something went wrong!",[nr.LOGIN_TIMEOUT_MESSAGE]:"You haven't logged in or your login session has expired. Login right now?",[nr.NETWORK_ERROR]:"Network error, please check your network."},ar={[nr.REQUEST_FAILED]:"请求失败",[nr.SOMETHING_WENT_WRONG]:"出现了一些问题!",[nr.LOGIN_TIMEOUT_MESSAGE]:"您还未登录或登录信息已过期,现在重新登录?",[nr.NETWORK_ERROR]:"网络错误,请检查您的网络连接。"},ir="core/runtime",sr={en:or,zh:ar},lr=Object.freeze({show:function(e){if(Qt)return Qt.resolve(e);if("confirm"===e.type){var t=confirm(e.content);return new Promise(((e,r)=>setTimeout((()=>{(t?e:r)()}),1)))}return alert(e.content),new Promise((e=>setTimeout((()=>{e()}),1)))}});function cr(e){var{search:t,pathname:r}=e,n=r?window.btoa(encodeURIComponent(r)):"",o=t?window.btoa(encodeURIComponent(t)):"";document.cookie="SALOGINPATH=".concat(n,"; path=/"),document.cookie="SALOGINQUERY=".concat(o,"; path=/")}function ur(e){if(e instanceof Event&&e.target instanceof HTMLScriptElement)return e.target.src;if(e instanceof P.HttpFetchError)return p.i18n.t("".concat(ir,":").concat(nr.NETWORK_ERROR));if(e instanceof P.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 dr(e){return e instanceof P.HttpResponseError&&401===e.response.status&&!!e.responseJson&&100003===e.responseJson.code}var pr,fr,vr=!1;function hr(e){if(!(e instanceof P.HttpAbortError)){if(dr(e)&&!window.NO_AUTH_GUARD){if(vr)return;return vr=!0,void lr.show({type:"confirm",content:p.i18n.t("".concat(ir,":").concat(nr.LOGIN_TIMEOUT_MESSAGE))}).then((()=>{var e,t;e=xa().getFeatureFlags()["sso-enabled"],cr((t=O()).location),t.push(e?"/sso-auth/login":"/auth/login",{from:(0,o.A)((0,o.A)({},t.location),{},{state:void 0})}),vr=!1}),(()=>{vr=!1}))}console.error(e);var t=ur(e);t!==pr&&(pr=t,lr.show({type:"error",title:p.i18n.t("".concat(ir,":").concat(nr.REQUEST_FAILED)),content:t,contentStyle:{whiteSpace:"pre-wrap",wordBreak:"break-word"}}).then((()=>{pr=void 0})))}}var mr=Object.freeze({show:function(e){fr?fr.resolve(e):alert(e.message)}});function gr(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return gr=function(e){this.s=e,this.n=e.next},gr.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new gr(e)}function yr(){return(yr=(0,a.A)((function*(e,t){var{progress:r,success:n,error:o,finally:a}=t,i=$a();try{var s,l=yield e(),c=!1,u=!1;try{for(var d,p=function(e){var t,r,n,o=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);o--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new gr(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}(l);c=!(d=yield p.next()).done;c=!1){var f=d.value;if(i!==$a())return;null==r||r(f)}}catch(e){u=!0,s=e}finally{try{c&&null!=p.return&&(yield p.return())}finally{if(u)throw s}}if(i!==$a())return;null==n||n()}catch(e){if(i!==$a())return;null==o||o(e)}finally{null==a||a()}}))).apply(this,arguments)}function Ar(e,t,r){t&&Object.entries(t).forEach((t=>{var[n,o]=t,a=kr(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 br(e){return"string"==typeof e.action}function wr(e){return"string"==typeof e.useProvider}function Er(e){return!(!e.target&&!e.targetRef||!e.method&&!e.properties)}function Sr(e){return!!e.then}function kr(e,t,r){return function(n){var a,i;for(var s of[].concat(e))if(Ot(s,(0,o.A)((0,o.A)({},t),{},{event:n})))if(Sr(s))kr(s.then,t,r)(n);else if(br(s)){var[l,c]=s.action.split(".");switch(s.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":Pr(n,c,s.args,s.callback,t);break;case"window.open":_r(n,s.args,t);break;case"location.reload":case"location.assign":Nr(n,c,s.args,t);break;case"localStorage.setItem":case"localStorage.removeItem":case"sessionStorage.setItem":case"sessionStorage.removeItem":Ur(n,l,c,s.args,t);break;case"event.preventDefault":n.preventDefault();break;case"event.stopPropagation":n.stopPropagation();break;case"console.log":case"console.error":case"console.warn":case"console.info":Fr(n,c,s.args,t);break;case"message.success":case"message.error":case"message.info":case"message.warn":jr(n,c,s.args,t);break;case"handleHttpError":hr(n.detail);break;case"context.assign":case"context.replace":case"context.refresh":case"context.load":xr(n,c,s.args,null===(a=s.batch)||void 0===a||a,s.callback,t);break;case"state.update":case"state.refresh":case"state.load":Br(n,c,s.args,null===(i=s.batch)||void 0===i||i,s.callback,t);break;case"tpl.dispatchEvent":var[u,d]=Vr(s.args,t,n);Ne(t,s.action,": ".concat(u)).dispatchEvent(new CustomEvent(u,d));break;case"formstate.update":Lr(n,s.args,s.callback,t);break;case"message.subscribe":case"message.unsubscribe":$r(n,c,s.args,t,r,s.callback);break;case"theme.setDarkTheme":case"theme.setLightTheme":oe("theme.setDarkTheme"===s.action?"dark":"light");break;case"theme.setTheme":var[p]=Vr(s.args,t,n);oe(p);break;case"mode.setDashboardMode":case"mode.setDefaultMode":ue("mode.setDashboardMode"===s.action?"dashboard":"default");break;default:console.error("unknown event listener action:",s.action)}}else wr(s)?Ir(n,s,t,r):Er(s)?Rr(n,s,t,r):console.error("unknown event handler:",s);else s.else&&kr(s.else,t,r)(n)}}function Ir(e,t,r,n){return Cr.apply(this,arguments)}function Cr(){return(Cr=(0,a.A)((function*(e,t,r,n){try{Tr(e,yield Ze(t.useProvider),t,"saveAs"!==t.method?"resolve":"saveAs",r,n)}catch(e){console.error(ur(e))}}))).apply(this,arguments)}function Rr(e,t,r,n){var a=[],i=t.target,s=t.targetRef,l=i;if(("string"==typeof i?(0,_.isEvaluable)(i):dt(i))&&(l=kt(i,(0,o.A)((0,o.A)({},r),{},{event:e}))),"string"==typeof l)if("_self"===l)a.push(n.element);else if(t.multiple)a=Array.from(document.querySelectorAll(l));else{var c=document.querySelector(l);null!==c&&a.push(c)}else if(l)l instanceof HTMLElement?a.push(l):console.error("unexpected target:",l);else if(s){var u=s;("string"==typeof s?(0,_.isEvaluable)(s):dt(s))&&(u=kt(s,(0,o.A)((0,o.A)({},r),{},{event:e})));var d=[].concat(u),p=Ne(r,"targetRef",": ".concat(d.join(", ")));a.push(...d.map((e=>{var t;return null===(t=p.$$getElementByRef)||void 0===t?void 0:t.call(p,e)})).filter(Boolean))}0!==a.length?function(e){return!!e.method}(t)?a.forEach((o=>{Tr(e,o,t,t.method,r,n,{useEventAsDefault:!0})})):function(e){return!!e.properties}(t)&&jt(a,t.properties,(0,o.A)((0,o.A)({},r),{},{event:e})):console.error("target not found:",i||s)}function Tr(e,t,r,n,o,a,i){return Or.apply(this,arguments)}function Or(){return Or=(0,a.A)((function*(e,t,r,n,i,s,l){if("function"==typeof t[n]){var c=function(){var o=(0,a.A)((function*(){var o,a,s=Vr(r.args,i,e,l);return wr(r)&&null!=Sa&&null!==(o=Sa.flowApi)&&void 0!==o&&o.isFlowApiProvider(r.useProvider)&&(s=yield Sa.flowApi.getArgsOfFlowApi(r.useProvider,s,n,null===(a=r.sse)||void 0===a?void 0:a.stream)),t[n](...s)}));return function(){return o.apply(this,arguments)}}();if(r.callback){var u=Kr(r.callback,i,s),d={progress:u("progress"),success:u("success"),error:u("error"),finally:u("finally")};if(wr(r)){var p,f,v=(0,o.A)((0,o.A)({},i),{},{event:e});if(kt(null===(p=r.sse)||void 0===p?void 0:p.stream,v))return void function(e,t){yr.apply(this,arguments)}(c,d);if(kt(null===(f=r.poll)||void 0===f?void 0:f.enabled,v))return void function(e,t,r,n){var o,{progress:i,success:s,error:l,finally:c}=t,{expectPollStopImmediately:u,expectPollEnd:d}=r,{interval:p,leadingRequestDelay:f,continueOnError:v,delegateLoadingBar:h}=kt((0,A.pick)(r,["interval","leadingRequestDelay","continueOnError","delegateLoadingBar"]),n),m=$a();function g(){return y.apply(this,arguments)}function y(){return(y=(0,a.A)((function*(){var t;rr.delete(o);try{var r;if(t=null===(r=kt(u,n))||void 0===r?void 0:r())null==c||c();else{var a,f,g=yield e(),y=null===(a=kt(u,n))||void 0===a?void 0:a();(t=y||m!==$a())?y&&(null==c||c()):(null==i||i(g),null!==(f=kt(d,n))&&void 0!==f&&f(g)?(h&&window.dispatchEvent(new Event("request.end")),null==s||s(g),null==c||c()):b(null!=p?p:3e3))}}catch(e){var A,w=null===(A=kt(u,n))||void 0===A?void 0:A();(t=w||m!==$a())?w&&(null==c||c()):(null==l||l(e),v?b(null!=p?p:3e3):null==c||c())}finally{h&&t&&window.dispatchEvent(new Event("request.end"))}}))).apply(this,arguments)}function b(e){o=setTimeout(g,e),rr.add(o)}b(null!=f?f:0),h&&window.dispatchEvent(new Event("request.start"))}(c,d,r.poll,v)}try{var h=yield c();d.success(h)}catch(e){d.error(e)}finally{d.finally()}}else c()}else console.error("target has no method:",{target:t,method:n})})),Or.apply(this,arguments)}function Pr(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 l=[];if(a>0&&((l=Vr(r,o,e,{useEventDetailAsDefault:!0})).length=a),i&&n){var c=Kr(n,o,void 0);l.push((e=>{c(e?"error":"success")({blocked:e}),c("finally")({blocked:e})}))}O()[s](...l)}function _r(e,t,r){var[n,o,a]=Vr(t,r,e);window.open(n,o||"_self",a)}function Mr(e,t,r,n,o,a){t?n.updateValues(e,r,(e=>Vr(e,o,a)[0])):e.forEach((e=>{var{name:t,value:i}=Vr([e],o,a)[0];n.updateValue(t,i,r)}))}function xr(e,t,r,n,o,a){if(!Array.isArray(r)||!r.every(v.isObject)||"assign"!==t&&"replace"!==t){var[i,s]=Vr(r,a,e);a.ctxStore.updateValue(i,s,t,o,a)}else Mr(r,n,t,a.ctxStore,a,e)}function Br(e,t,r,n,o,a){if(Array.isArray(r)&&r.every(v.isObject)&&"update"===t)Mr(r,n,"replace",Le(a,"state.".concat(t),": ".concat(JSON.stringify(r))),a,e);else{var[i,s]=Vr(r,a,e);Le(a,"state.".concat(t),": ".concat(i)).updateValue(i,s,"update"===t?"replace":t,o,a)}}function Lr(e,t,r,n){var[o,a]=Vr(t,n,e);Je(n,"formstate.update",": ".concat(o)).updateValue(o,a,"replace",r,n)}function Nr(e,t,r,n){if("assign"===t){var[o]=Vr(r,n,e);location.assign(o)}else location[t]()}function Ur(e,t,r,n,o){var a="localStorage"===t?localStorage:sessionStorage,[i,s]=Vr(n,o,e);"setItem"===r?void 0!==s&&a.setItem(i,JSON.stringify(s)):a.removeItem(i)}function Fr(e,t,r,n){console[t](...Vr(r,n,e,{useEventAsDefault:!0}))}function jr(e,t,r,n){var o=Vr(r,n,e,{useEventAsDefault:!0});mr.show({type:t,message:o[0]})}function $r(e,t,r,n,o,a){return Dr.apply(this,arguments)}function Dr(){return(Dr=(0,a.A)((function*(e,t,r,n,o,a){var i=()=>{var o,a=Vr(r,n,e);return null==Sa||null===(o=Sa.messageDispatcher)||void 0===o?void 0:o[t](...a)};if(a){var s=Kr(a,n,o);try{var l=yield i();s("success")(l)}catch(e){s("error")(e)}finally{s("finally")()}}else i()}))).apply(this,arguments)}function Kr(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});kr(a,t,r)(i)}catch(e){console.error(e)}else"error"===n&&console.error("Unhandled callback error:",o)}}}function Vr(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Array.isArray(e)?kt(e,(0,o.A)((0,o.A)({},t),{},{event:r})):n.useEventAsDefault?[r]:n.useEventDetailAsDefault?[r.detail]:[]}function Wr(e){var t,{ref:r,runtimeContext:n,element:o}=e;if(r&&n.tplStateStoreId){var{hostBrick:a}=Le(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 l=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}))},l=null!==(t=u.refEvent)&&void 0!==t?t:e;o.addEventListener(l,s),null!==(i=(n=o).$$proxyListeners)&&void 0!==i||(n.$$proxyListeners=[]),o.$$proxyListeners.push([l,s])}};for(var[c,u]of Object.entries(s))l(c)}}}function Hr(e){var{ref:t,runtimeContext:r,element:n}=e;if(null!=r&&r.tplStateStoreId&&t){var{hostBrick:o}=Le(r,"unbindTemplateProxy"),a=o.tplHostMetadata;for(var[i,s]of(a.internalBricksByRef.delete(t),null!==(l=n.$$proxyListeners)&&void 0!==l?l:[])){var l;n.removeEventListener(i,s)}delete n.$$proxyListeners}}var zr=function(e){return e[e.ROOT=1]="ROOT",e[e.BRICK=2]="BRICK",e[e.PLACEHOLDER=3]="PLACEHOLDER",e}({});function qr(e){e.replaceChildren()}function Gr(e,t){window.DISABLE_REACT_FLUSH_SYNC=!1;for(var r=e.child,n=[];r;){if(r.tag===zr.BRICK){var o,a=r.type;a.includes("-")&&!customElements.get(a)&&console.error("Undefined custom element: ".concat(a)),"basic-bricks.script-brick"===a&&console.warn("`basic-bricks.script-brick` is deprecated, please take caution when using it");var i=t&&r===e.child?t:document.createElement(a);r.element=i,r.slotId&&i.setAttribute("slot",r.slotId),r.iid&&(i.dataset.iid=r.iid),null!==(o=r.tplHostMetadata)&&void 0!==o&&o.tplStateStoreId&&(i.dataset.tplStateStoreId=r.tplHostMetadata.tplStateStoreId),Ft(i,r.properties),Ar(i,r.events,r.runtimeContext),r.tplHostMetadata&&(i.$$tplStateStore=Le({tplStateStoreId:r.tplHostMetadata.tplStateStoreId,tplStateStoreMap:r.runtimeContext.tplStateStoreMap},"mount")),Wr(r),r.portal?n.push(i):r.return&&(r.return.childElements||(r.return.childElements=[]),r.return.childElements.push(i))}if(r.child)r=r.child;else if(r.sibling)r=r.sibling;else{for(var s,l=r.return;l;){var c;if(l.childElements)l.tag===zr.ROOT?null===(c=l.container)||void 0===c||c.append(...l.childElements):l.element.append(...l.childElements),l.childElements=void 0;if(l.tag===zr.ROOT&&n.length>0&&("function"==typeof l.createPortal?l.createPortal():l.createPortal).append(...n),l.sibling)break;l=l.return}r=null===(s=l)||void 0===s?void 0:s.sibling}}setTimeout((()=>{window.DISABLE_REACT_FLUSH_SYNC=!0}))}var Yr=["onMount","onUnmount","onMediaChange","onScrollIntoView","onMessage","onMessageClose"],Qr=["onBeforePageLoad","onPageLoad","onPageLeave","onBeforePageLeave","onAnchorLoad","onAnchorUnload"],Jr=new WeakMap,Xr=new WeakMap,Zr=new WeakMap,en=new WeakMap,tn=new WeakMap,rn=new WeakMap,nn=new WeakMap,on=new WeakMap,an=new WeakMap,sn=new WeakSet;class ln{constructor(e,t){var r;(0,i.A)(this,sn),(0,s.A)(this,"scope",void 0),(0,s.A)(this,"unknownBricks",void 0),(0,s.A)(this,"renderId",void 0),(0,l.A)(this,Jr,void 0),(0,l.A)(this,Xr,{onBeforePageLoad:[],onPageLoad:[],onPageLeave:[],onBeforePageLeave:[],onAnchorLoad:[],onAnchorUnload:[],onMediaChange:[],onScrollIntoView:[],onMount:[],onUnmount:[],onMessage:[],onMessageClose:[]}),(0,l.A)(this,Zr,new Map),(0,l.A)(this,en,void 0),(0,l.A)(this,tn,new Map),(0,l.A)(this,rn,void 0),(0,l.A)(this,nn,void 0),(0,l.A)(this,on,new WeakMap),(0,l.A)(this,an,new Map),this.scope=e,this.unknownBricks=null!==(r=null==t?void 0:t.unknownBricks)&&void 0!==r?r:"throw",(0,u.A)(Jr,this,null==t?void 0:t.routeHelper),this.renderId=null==t?void 0:t.renderId}setInitialMenuRequestNode(e){(0,u.A)(nn,this,e)}memoizeMenuRequestNode(e,t){(0,d.A)(on,this).set(e,t)}getMenuRequests(){for(var e=[],t=(0,d.A)(nn,this);t;)if(t.request&&e.push(t.request),t.child)t=t.child;else{for(var r;t&&!t.sibling;)t=t.return;t=null===(r=t)||void 0===r?void 0:r.sibling}return e}reMergeMenuRequestNodes(e,t){var r=arguments,n=this;return(0,a.A)((function*(){var o=r.length>2&&void 0!==r[2]?r[2]:{},a=(0,d.A)(on,n).get(t);(0,d.A)(on,n).set(t,o);for(var i,s=e.child;s&&s!==a;)i=s,s=s.sibling;i?(i.sibling=o,o.sibling=null==a?void 0:a.sibling):e.child=o,yield(0,d.A)(Jr,n).mergeMenus(n.getMenuRequests())}))()}reBailout(e){return(0,d.A)(Jr,this).bailout(e)}reCatch(e,t){return(0,d.A)(Jr,this).catch(e,t)}didPerformIncrementalRender(e,t){var r=this;return(0,a.A)((function*(){var n=!1,o=[];for(var{parentRoutes:a,callback:i}of[...(0,d.A)(an,r).values()].reverse()){var s=a[a.length-1];if(!o.includes(s)){var l=yield i(e,t);l&&o.push(...a.slice(0,-1)),!1!==l&&(n=!0)}}return n}))()}performIncrementalRender(e,t,r){(0,d.A)(an,this).set(e,{parentRoutes:t,callback:r})}registerBrickLifeCycle(e,t){if(t){var r=[...Yr,..."page"===this.scope?Qr:[]];for(var n of r){var o=t[n];o&&(0,d.A)(Xr,this)[n].push({brick:e,handlers:o})}(0,A.isEmpty)(t.useResolves)||console.error("`lifeCycle.useResolves` is dropped in v3:",t)}}registerArbitraryLifeCycle(e,t){var r=(0,d.A)(tn,this).get(e);r?r.add(t):(0,d.A)(tn,this).set(e,new Set([t]))}memoize(e,t,r,n){(0,d.A)(rn,this)||(0,u.A)(rn,this,new WeakMap);var o=[null!=e?e:"",...t].join("."),a=(0,d.A)(rn,this).get(n);a||(a=new Map,(0,d.A)(rn,this).set(n,a)),a.set(o,{node:r,last:fn(r),lastNormal:vn(r),lastPortal:mn(r)})}reRender(e,t,r,n){var o,a=[null!=e?e:"",...t].join("."),i=(0,d.A)(rn,this).get(n).get(a),{node:s,last:l,lastNormal:u,lastPortal:p}=i,f=[];if((null==s?void 0:s.tag)===zr.PLACEHOLDER){var v,h,m;o=null!==(v=null===(h=function(e){return hn(e,!0)}(s))||void 0===h?void 0:h.element)&&void 0!==v?v:null;var g=null===(m=function(e){return gn(e,!0)}(s))||void 0===m?void 0:m.element;g&&f.push(g)}else{var y,A,b;o=null!==(y=null==u||null===(A=u.element)||void 0===A?void 0:A.nextSibling)&&void 0!==y?y:null;for(var w=null==p||null===(b=p.element)||void 0===b?void 0:b.nextSibling;w&&(f.push(w),w instanceof HTMLElement&&"DIV"===w.tagName);)w=w.nextSibling}var E,S=fn(r);i.node=r,i.last=S,i.lastNormal=vn(r),i.lastPortal=mn(r);for(var k=n.child;k&&k!==l;){if(k.sibling===s){E=k;break}k=k.sibling}var I=document.createDocumentFragment(),C=document.createDocumentFragment(),R={tag:zr.ROOT,container:I,createPortal:C,child:r};for(k=r;k;)k.return=R,k=k.sibling;var T,O,P=yn(s,l);for((0,c.A)(sn,this,cn).call(this,P),Gr(R),E?E.sibling=r:n.child=r,S&&(S.sibling=null==l?void 0:l.sibling),k=r;k;)k.return=n,k=k.sibling;if(n.tag===zr.ROOT?null===(T=n.container)||void 0===T||T.insertBefore(I,o):null===(O=n.element)||void 0===O||O.insertBefore(I,o),C.childNodes.length>0){for(var _,M=r;M&&M.return;)M=M.return;if((null===(_=M)||void 0===_?void 0:_.tag)!==zr.ROOT)throw new Error("Cannot find render root node. This is a bug of Brick Next, please report it.");var x="function"==typeof M.createPortal?M.createPortal():M.createPortal,B=null;for(var L of f)if(x.contains(L)){B=L;break}x.insertBefore(C,B)}var N=yn(r,S);(0,c.A)(sn,this,un).call(this,N)}dispose(){for(var e of Object.values((0,d.A)(Xr,this)))e.length=0;for(var t of(0,d.A)(Zr,this).values()){for(var r of t)r.disconnect();t.length=0}(0,d.A)(Zr,this).clear(),(0,d.A)(en,this)&&(ke.removeEventListener("change",(0,d.A)(en,this)),(0,u.A)(en,this,void 0)),(0,u.A)(rn,this,void 0),(0,d.A)(tn,this).clear(),(0,d.A)(an,this).clear(),(0,u.A)(on,this,void 0)}dispatchBeforePageLoad(){(0,c.A)(sn,this,dn).call(this,"onBeforePageLoad",new CustomEvent("page.beforeLoad"))}dispatchPageLoad(){var e=new CustomEvent("page.load");(0,c.A)(sn,this,dn).call(this,"onPageLoad",e),window.dispatchEvent(e)}dispatchBeforePageLeave(e){(0,c.A)(sn,this,dn).call(this,"onBeforePageLeave",new CustomEvent("page.beforeLeave",{detail:e}))}dispatchPageLeave(){(0,c.A)(sn,this,dn).call(this,"onPageLeave",new CustomEvent("page.leave"))}dispatchAnchorLoad(){var{hash:e}=O().location;e&&"#"!==e?(0,c.A)(sn,this,dn).call(this,"onAnchorLoad",new CustomEvent("anchor.load",{detail:{hash:e,anchor:e.substring(1)}})):(0,c.A)(sn,this,dn).call(this,"onAnchorUnload",new CustomEvent("anchor.unload"))}initializeScrollIntoView(){for(var{brick:e,handlers:t}of(0,d.A)(Xr,this).onScrollIntoView)(0,c.A)(sn,this,pn).call(this,e,t)}initializeMediaChange(){(0,u.A)(en,this,(e=>{(0,c.A)(sn,this,dn).call(this,"onMediaChange",new CustomEvent("media.change",{detail:Q(e.detail)}))})),ke.addEventListener("change",(0,d.A)(en,this))}initializeMessageDispatcher(){var e,t=function(e){var t=function(t){var r;null==Sa||null===(r=Sa.messageDispatcher)||void 0===r||r.onMessage(t.channel,(r=>{kr(t.handlers,e.runtimeContext,e)(new CustomEvent("message.push",{detail:r}))}))};for(var r of[].concat(n))t(r)};for(var{brick:r,handlers:n}of(0,d.A)(Xr,this).onMessage)t(r);null==Sa||null===(e=Sa.messageDispatcher)||void 0===e||e.onClose((()=>{(0,c.A)(sn,this,dn).call(this,"onMessageClose",new CustomEvent("message.close"))}))}dispatchOnMount(){(0,c.A)(sn,this,dn).call(this,"onMount",new CustomEvent("mount"))}dispatchOnUnmount(){(0,c.A)(sn,this,dn).call(this,"onUnmount",new CustomEvent("unmount"))}}function cn(e){var t=[...Yr,..."page"===this.scope?Qr:[]],r=[];for(var n of t){var o=(0,A.remove)((0,d.A)(Xr,this)[n],(t=>e.has(t.brick)));"onUnmount"===n&&r.push(...o)}for(var a of e){var i,s,l=(0,d.A)(Zr,this).get(a);if(null!=l&&l.length){for(var c of l)c.disconnect();l.length=0,(0,d.A)(Zr,this).delete(a)}Hr(a),null===(i=a.element)||void 0===i||delete i.$$tplStateStore,null===(s=a.element)||void 0===s||s.remove()}var u=new CustomEvent("unmount");for(var{brick:p,handlers:f}of r)kr(f,p.runtimeContext,p)(u)}function un(e){var t=new CustomEvent("mount");for(var{brick:r,handlers:n}of(0,d.A)(Xr,this).onMount)e.has(r)&&kr(n,r.runtimeContext,r)(t);for(var{brick:o,handlers:a}of(0,d.A)(Xr,this).onScrollIntoView)e.has(o)&&(0,c.A)(sn,this,pn).call(this,o,a)}function dn(e,t){for(var{brick:r,handlers:n}of(0,d.A)(Xr,this)[e])kr(n,r.runtimeContext,r)(t);var o=(0,d.A)(tn,this).get(e);if(o)for(var a of o)a()}function pn(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&&(kr(t.handlers,e.runtimeContext,e)(new CustomEvent("scroll.into.view")),o.disconnect())}))}),{threshold:n});o.observe(e.element);var a=(0,d.A)(Zr,this).get(e);a||(a=[],(0,d.A)(Zr,this).set(e,a)),a.push(o)}function fn(e){for(var t=e;null!==(r=t)&&void 0!==r&&r.sibling;){var r;t=t.sibling}return t}function vn(e){return hn(e,!1)}function hn(e,t){for(var r,n=e;n;){if(n.tag===zr.BRICK&&!n.portal){if(t)return n;r=n}n=n.sibling}return r}function mn(e){return gn(e,!1)}function gn(e,t){for(var r,n=e;n;){if(n.tag===zr.BRICK&&n.portal){if(t)return n;r=n}if(n.child)n=n.child;else if(n.sibling)n=n.sibling;else{for(var o,a=n.return;a&&!a.sibling;)a=a.return;n=null===(o=a)||void 0===o?void 0:o.sibling}}return r}function yn(e,t){for(var r=new Set,n=e;n;)if(n.tag===zr.BRICK&&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}var An=Symbol.for("root.runtimeContext");function bn(e,t){return wn.apply(this,arguments)}function wn(){return(wn=(0,a.A)((function*(e,t){var r,n,a,i,s,[l,c,u]=Co((0,o.A)((0,o.A)({},null!==(r=e[An])&&void 0!==r?r:Da()),{},{data:t,pendingPermissionsPreCheck:[]}));null!==(n=l.tplStateStoreMap)&&void 0!==n||(l.tplStateStoreMap=new Map),null!==(a=l.formStateStoreMap)&&void 0!==a||(l.formStateStoreMap=new Map);var d=new ln("fragment"),p={tag:zr.ROOT,createPortal:null},f=e.transform,v=Pe();f&&_e(v,"`useBrick.transform`",'please use "properties" instead, check your useBrick:',e);var h=yield wo(p,v?e:(0,o.A)((0,o.A)({},e),{},{properties:(0,o.A)((0,o.A)({},e.properties),f)}),l,d,[],{}),m=[...c,...u];if(yield Io(h,l,m),(null===(i=h.node)||void 0===i?void 0:i.tag)===zr.PLACEHOLDER)throw new Error("The root brick of useBrick cannot be an ignored control node");if(null!==(s=h.node)&&void 0!==s&&s.portal)throw new Error("The root brick of useBrick cannot be a portal brick");return p.child=h.node,{tagName:h.node?h.node.type:null,renderRoot:p,rendererContext:d,scopedStores:m}}))).apply(this,arguments)}function En(e,t){var r,{renderRoot:n,rendererContext:o,scopedStores:a}=e;for(var i of(n.createPortal=()=>{var e=document.querySelector("#portal-mount-point");return r=document.createElement("div"),e.appendChild(r),r},Gr(n,t),o.dispatchOnMount(),o.initializeScrollIntoView(),o.initializeMediaChange(),o.initializeMessageDispatcher(),a))i.mountAsyncData();return{portal:r}}function Sn(e,t){var{rendererContext:r}=e;t.portal&&(qr(t.portal),t.portal.remove()),r.dispatchOnUnmount(),r.dispose()}function kn(e,t,r){if(r)throw new Error("Legacy doTransform does not support options in v3");return kt(t,(0,o.A)((0,o.A)({},Da()),{},{data:e}),{noInject:!0})}function In(e,t){var r=Ka(e);Object.assign(r,(0,o.A)((0,o.A)({},t),{},{meta:(0,o.A)((0,o.A)({},r.meta),t.meta),$$fulfilling:null,$$fulfilled:!0,$$registerCustomTemplateProcessed:!1})),U(r)}function Cn(e,t){var r=Ka(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 Rn(e,t,r){var n="".concat(e,".").concat(t.name);Be.define(n,{bricks:t.bricks,proxy:t.proxy,state:t.state}),Tn(e,t.name,r)}function Tn(e,t,r){xn(e,"${APP.homepage}/_dev_only_/template-preview/".concat(t),[(0,o.A)({brick:t},(0,A.pick)(r,"properties","events","lifeCycle","context","slots","children"))])}function On(e){return"${APP.homepage}/_dev_only_/snippet-preview/".concat(e)}function Pn(e,t){var r;xn(e,On(t.snippetId),null!==(r=t.bricks)&&void 0!==r&&r.length?t.bricks:[{brick:"span"}],t.context)}var _n,Mn=Pn;function xn(e,t,r,n){var{routes:o}=Ka(e),a=o.findIndex((e=>e.path===t)),i={path:t,bricks:r,context:n,menu:!1,exact:!0};-1===a?o.unshift(i):o.splice(a,1,i)}function Bn(e,t){var{tplStateStoreId:r}=t,n=Da();return r?Le((0,o.A)((0,o.A)({},n),{},{tplStateStoreId:r}),"STATE").getValue(e):n.ctxStore.getValue(e)}function Ln(e){var{tplStateStoreId:t}=e,r=Da();return t?Le((0,o.A)((0,o.A)({},r),{},{tplStateStoreId:t}),"STATE").getAllValues():r.ctxStore.getAllValues()}function Nn(e){return ja().find((t=>t.id?t.id===e:t.filePath.startsWith(e)))}function Un(e){return(0,f.loadBricksImperatively)(e,ja())}function Fn(){return $a()}function jn(e,t){return $n.apply(this,arguments)}function $n(){return($n=(0,a.A)((function*(e,t){var r,{appId:n,updateStoryboardType:o,collectUsedContracts:a}=t,i=Ka(n);if("route"===o)r={routes:[e]};else if("template"===o)r={meta:{customTemplates:[e]}};else if("snippet"===o){var s,l=On(e.snippetId);r={routes:[null==i||null===(s=i.routes)||void 0===s?void 0:s.find((e=>e.path===l))]}}var c=[];return r&&a&&(yield a(r)).forEach((e=>{var t,[r,n,o]=e.match(/(.*)@(.*):\d\.\d\.\d/);null!=i&&null!==(t=i.meta)&&void 0!==t&&null!==(t=t.contracts)&&void 0!==t&&t.some((e=>e.namespaceId===n&&e.name===o))||c.push(e)})),c}))).apply(this,arguments)}var Dn=[];function Kn(e){_n=e;var t=Ln({tplStateStoreId:e.tplStateStoreId});Wn({changeType:"initialize",tplStateStoreId:e.tplStateStoreId,detail:{data:t}})}function Vn(e){Dn.push(e)}function Wn(e){setTimeout((()=>{for(var t of Dn)try{t(e)}catch(t){console.error("RealTimeDataInspectHook failed (".concat(e.changeType,"):"),t)}}))}var Hn=["onBeforePageLoad","onPageLoad","onBeforePageLeave","onPageLeave","onAnchorLoad","onAnchorUnload"];class zn{constructor(e,t,r,n){(0,s.A)(this,"type",void 0),(0,s.A)(this,"data",new Map),(0,s.A)(this,"changeEventType",void 0),(0,s.A)(this,"pendingStack",[]),(0,s.A)(this,"hostBrick",void 0),(0,s.A)(this,"stateStoreId",void 0),(0,s.A)(this,"batchUpdate",!1),(0,s.A)(this,"batchUpdateContextsNames",[]),(0,s.A)(this,"rendererContext",void 0),(0,s.A)(this,"routeMap",new WeakMap),this.type=e,this.changeEventType="FORM_STATE"===this.type?"formstate.change":"STATE"===this.type?"state.change":"context.change",this.hostBrick=t,this.rendererContext=r,this.stateStoreId=n}getAllValues(){return Object.fromEntries([...this.data.entries()].map((e=>{var[t,{value:r}]=e;return[t,r]})))}getValue(e){var t;return null===(t=this.data.get(e))||void 0===t?void 0:t.value}notifyRealTimeDataChange(e,t){if(_n){var{tplStateStoreId:r}=_n;(r?"STATE"===this.type&&this.stateStoreId===r:"CTX"===this.type)&&Wn({changeType:"update",tplStateStoreId:r,detail:{name:e,value:t}})}}getAffectListByContext(e){var t=[e];return this.data.forEach(((e,r)=>{e.deps&&e.deps.some((e=>t.includes(e)))&&t.push(r)&&t.push(...this.getAffectListByContext(r))})),t.shift(),[...new Set(t)]}updateValues(e,t,r){if(this.batchUpdate=!0,this.batchUpdateContextsNames=e.map((e=>e.name)),[...new Set(this.batchUpdateContextsNames)].length!==this.batchUpdateContextsNames.length)throw new Error("Batch update not allow to update same item");var n={},o={},a=[];e.forEach((e=>{var{name:o,value:i}=r([e]),s=this.data.get(o);a.push(...this.getAffectListByContext(o)),s&&(n[o]=s),this.updateValue(o,i,t)})),a.filter((e=>!n[e])).forEach((e=>{var t=this.data.get(e);t&&(o[e]=t)}));var i=e=>{for(var t in e){var r,n=e[t];null===(r=n.eventTarget)||void 0===r||r.dispatchEvent(new CustomEvent(this.changeEventType,{detail:n.value}))}};i(n),i(o),this.batchUpdate=!1}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,v.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),this.batchUpdate||i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}));else{if(!i.useResolve)throw new Error("You can not ".concat(r,' "').concat(this.type,".").concat(e,'" which is not using resolve'));var s;"load"===r&&(i.loaded?s=Promise.resolve(i.value):i.loading&&(s=i.loading));var l=e=>{var t,r;return"FlowApiNotFoundError"===(null==e?void 0:e.name)&&!!(r=null===(t=this.rendererContext)||void 0===t?void 0:t.renderId)&&r!==$a()};if(s||(s=i.loading=i.load((0,o.A)({cache:"load"===r?"default":"reload"},t))).then((e=>{this.finishLoad(i,e)}),(e=>{!i.useResolve||l(e)||null!=n&&n.error||hr(e)})),n){var c=Kr(n,a);s.then((e=>{c("success")({value:e}),c("finally")()}),(e=>{!l(e)&&n.error&&c("error")(e),c("finally")()}))}}}finishLoad(e,t){e.useResolve&&(e.loaded=!0,e.value=t,e.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:t})))}define(e,t,r,n){if(Array.isArray(e)&&e.length>0){var o=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=arguments.length>2?arguments[2]:void 0,n=new Map;for(var o of e){var a=[o.if,o.value,o.resolve],i=(0,M.collectMemberUsage)(a,t);if(!r&&"STATE"===t){var s=(0,M.collectMemberUsage)(a,"TPL");for(var l of s.usedProperties)i.usedProperties.add(l);s.hasNonStaticUsage&&(i.hasNonStaticUsage=!0)}n.set(o,i)}return n}(e,r,arguments.length>3?arguments[3]:void 0),o=new Map;for(var i of Array.from(n.keys()).map((e=>e.name))){var s;o.set(i,(null!==(s=o.get(i))&&void 0!==s?s:0)+1)}var l=Array.from(n.values()).some((e=>e.hasNonStaticUsage)),c=new WeakSet,u=new Map,d=new Map([...new Set(e.map((e=>e.name)))].map((e=>[e,new Promise(((t,r)=>{u.set(e,{resolve:t,reject:r})}))]))),p=function(){var e=(0,a.A)((function*(e){var r;c.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(u.get(e.name).resolve(),o.delete(e.name),0===i)throw new Error("Duplicated context defined: ".concat(e.name))}else 1===i?(u.get(e.name).resolve(),o.delete(e.name)):o.set(e.name,i-1);yield v()}));return function(t){return e.apply(this,arguments)}}(),f=l;function v(){return h.apply(this,arguments)}function h(){return h=(0,a.A)((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,f)).map((e=>e[0])).filter((e=>!c.has(e)));yield Promise.all(e.map(p))})),h.apply(this,arguments)}return{pendingResult:v().then((0,a.A)((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),f=!0,yield v()),u.values()))e.resolve()}))).catch((e=>{for(var t of u.values())t.reject(e);throw e})),pendingContexts:d}}(e,(e=>this.resolve(e,t,r,n)),this.type,Pe(t));this.pendingStack.push(o)}}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.A)((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.A)((function*(){for(var{pendingContexts:t}of e.pendingStack)for(var r of t.values())r.catch((()=>{}));for(var{pendingResult:n}of e.pendingStack)yield n}))()}mountAsyncData(e){this.data.forEach((t=>{var r;if(t.async&&(!e||null!==(r=this.routeMap.get(e))&&void 0!==r&&r.has(t.name))){if(t.asyncMounted)return void console.error('Async data "'.concat(t.name,'" already mounted. This is a bug of Brick Next, please report it.'));t.asyncMounted=!0,t.loading.then((e=>{this.finishLoad(t,e)}))}}))}resolve(e,t,r,n){var i=this;return(0,a.A)((function*(){if(!(yield Rt(e,t)))return!1;var s,l,c,u,d,p;if(r&&("STATE"===i.type?e.expose:"FORM_STATE"===i.type)&&(s=yield Bt(r,e.name)),void 0===s){if(e.resolve){var f=(0,v.hasOwnProperty)(e,"value");d=e.track&&f&&(0,v.hasOwnProperty)(e.resolve,"if")&&(0,M.strictCollectMemberUsage)(e.resolve.if,i.type).size>0;var h=(0,o.A)({transform:"value"},e.resolve);if(((u=yield Rt(e.resolve,t))||d)&&(l=function(){var e=(0,a.A)((function*(e){var r;return(yield at(h,t,(0,o.A)((0,o.A)({},e),{},{renderId:null===(r=i.rendererContext)||void 0===r?void 0:r.renderId}))).value}));return function(t){return e.apply(this,arguments)}}()),u)"eager"==(p=e.resolve.async?"async":e.resolve.lazy?"lazy":"eager")?s=yield l():"async"===p&&(c=l());else if(!f)return!1}u&&"eager"===p||void 0===e.value||(s=yield Et(e.value,t))}if(i.data.has(e.name))throw new Error("".concat(i.type," '").concat(e.name,"' has already been declared"));var m={name:e.name,value:s,eventTarget:new we,useResolve:u,load:l,loaded:"eager"===p,loading:c,async:"async"===p,deps:[]};if("lazy"===p){var g,{trigger:y}=e.resolve;y&&Hn.includes(y)&&(null===(g=i.rendererContext)||void 0===g||g.registerArbitraryLifeCycle(y,(()=>{i.updateValue(e.name,void 0,"load")})))}if(e.onChange&&m.eventTarget.addEventListener(i.changeEventType,kr(e.onChange,t)),e.track){var A=(0,M.strictCollectMemberUsage)(d?[e.resolve,e.value]:l?e.resolve:e.value,i.type);for(var b of(!l&&(m.deps=[...A]),A))i.onChange(b,i.batchAddListener((()=>{m.useResolve=d?Ot(e.resolve,t):!!l,m.useResolve?i.updateValue(e.name,{cache:"default"},"refresh"):i.updateValue(e.name,kt(e.value,t),"replace")}),e))}if(m.eventTarget.addEventListener(i.changeEventType,(t=>{i.notifyRealTimeDataChange(e.name,t.detail)})),i.data.set(e.name,m),Array.isArray(n))for(var w of n){var E=i.routeMap.get(w);E?E.add(e.name):i.routeMap.set(w,new Set([e.name]))}return!0}))()}disposeDataInRoutes(e){for(var t of e){var r=this.routeMap.get(t);if(void 0!==r)for(var n of r)this.data.delete(n)}}batchAddListener(e,t){return r=>{this.batchUpdate&&this.batchUpdateContextsNames.includes(t.name)||e(r)}}}var qn=r(11369);function Gn(e,t,r){var n,o,{reversedProxies:a,asyncHostPropertyEntries:i,externalSlots:s,tplStateStoreId:l,hostBrick:c}=e;if(t&&a){var u=a.properties.get(t);u&&(o=i,n=u.map((e=>{var{from:t,to:r}=e,n=o.filter((e=>e[0]===t));if(n.length>0&&r.refProperty)return[r.refProperty,Bt(n,t),!0]})).filter(Boolean));var d=a.slots.get(t);if(d&&s){var p=new Map;for(var{from:f,to:h}of d){var m,g,y,b,w=null!==(m=null===(g=s[f])||void 0===g?void 0:g.bricks)&&void 0!==m?m:[];if(w.length){var E=null!==(y=h.refSlot)&&void 0!==y?y:f,S=p.get(E);if(!S){S=[];for(var k=(0,v.hasOwnProperty)(r,E)?r[E].bricks.length+1:1,I=0;I<k;I+=1)S.push([]);p.set(E,S)}var C=null!==(b=h.refPosition)&&void 0!==b?b:-1,R=(0,v.hasOwnProperty)(c.runtimeContext,"forEachItem");S[(0,A.clamp)(C<0?S.length+C:C,0,S.length-1)].push(..."base-layout-v3.tpl-scroll-load-list"!==e.__temporary_tpl_tag_name&&"shrcb-homepage.tpl-custom-scroll-load-list"!==e.__temporary_tpl_tag_name||R?Yn(w,R,c.runtimeContext.forEachItem,c.runtimeContext.forEachIndex):w)}}var T=function(){(0,v.hasOwnProperty)(r,O)||(r[O]={type:"bricks",bricks:[]});var e=r[O];e.bricks=P.flatMap(((t,r)=>r<e.bricks.length?t.concat(e.bricks[r]):t)),0===e.bricks.length&&delete r[O]};for(var[O,P]of p.entries())T()}}return{[Jt]:n,[Xt]:l}}function Yn(e,t,r,n){return e.map((e=>{var a,{children:i,slots:s,[Zt]:l,[er]:c,[tr]:u}=e,d=(0,y.A)(e,["children","slots",Zt,er,tr].map(qn.A));return(0,o.A)((0,o.A)((0,o.A)({},d),t?{[Zt]:r,[er]:n}:{[tr]:!0}),{},{slots:":forEach"===d.brick?Oo(i,s):Object.fromEntries(Object.entries(null!==(a=Oo(i,s))&&void 0!==a?a:{}).map((e=>{var[o,a]=e;return[o,"routes"===a.type?{type:"routes",routes:Qn(a.routes,t,r,n)}:{type:"bricks",bricks:Yn(a.bricks,t,r,n)}]})))})}))}function Qn(e,t,r,n){return e.map((e=>"routes"===e.type?(0,o.A)((0,o.A)({},e),{},{routes:Qn(e.routes,t,r,n)}):"redirect"===e.type?e:(0,o.A)((0,o.A)({},e),{},{bricks:Yn(e.bricks,t,r,n)})))}var Jn=["properties","slots","children"];function Xn(e,t){function r(e){return(0,v.isObject)(e)&&"function"!=typeof e?Array.isArray(e)?e.map(r):Object.fromEntries(Object.entries(e).map((e=>{var[t,o]=e;return(0,v.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,l=(0,y.A)(e,Jn),c=Oo(s,i),u=Object.fromEntries(Object.entries(null!=c?c:{}).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.A)((0,o.A)({},l),{},{properties:r(a),slots:u},Gn(t,l.ref,u))}return r(e)}var Zn=["slots","children"],eo=["properties","slots","children"];function to(e,t,r,n,a){var i,s=(0,A.uniqueId)("tpl-state-"),l=(0,o.A)((0,o.A)({},r.runtimeContext),{},{tplStateStoreId:s});delete l.forEachItem,delete l.forEachIndex,delete l.formStateStoreId;var c=new zn("STATE",r,a,s);l.tplStateStoreMap.set(s,c),l.tplStateStoreScope&&l.tplStateStoreScope.push(c);var{bricks:u,proxy:d,state:p,contracts:f}=Be.get(e);null==Sa||null===(i=Sa.flowApi)||void 0===i||i.collectWidgetContract(f),c.define(p,l,n);var{slots:v,children:h}=t,m=(0,y.A)(t,Zn),g=(0,o.A)((0,o.A)({},m),{},{brick:e});r.tplHostMetadata={internalBricksByRef:new Map,tplStateStoreId:s,proxy:d};var b={properties:new Map,slots:new Map};if(null!=d&&d.properties)for(var[w,E]of Object.entries(d.properties)){var S=b.properties.get(E.ref);S||(S=[],b.properties.set(E.ref,S)),S.push({from:w,to:E})}if(null!=d&&d.slots)for(var[k,I]of Object.entries(d.slots)){var C=b.slots.get(I.ref);C||(C=[],b.slots.set(I.ref,C)),C.push({from:k,to:I})}var R={reversedProxies:b,asyncHostPropertyEntries:n,externalSlots:Oo(h,v),tplStateStoreId:s,hostBrick:r,__temporary_tpl_tag_name:e};return g.slots={"":{type:"bricks",bricks:u.map((e=>ro(e,R)))}},g}function ro(e,t){null===e.if&&delete e.if;var{properties:r,slots:n,children:a}=e,i=(0,y.A)(e,eo),s=Oo(a,n),l=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=>ro(e,t)))}]})));return(0,o.A)((0,o.A)({},i),{},{properties:Xn(r,t),slots:l},Gn(t,i.ref,l))}var no="form-renderer.form-renderer",oo=Symbol.for("form.stateStoreId"),ao=["forms.general-form","form.general-form","eo-form"];function io(e,t,r){var{id:n,bricks:a,events:i,context:s,mountPoint:l,instanceId:c}=e,{brick:u,properties:d}=e,p=t.find((e=>e.fieldId===n));if(p){var f=function(e){var t,r={id:e.fieldId,name:e.fieldId,label:e.name,dataset:{testid:e.fieldId}},n=()=>{var t,r;return{readOnly:null===(t=e.limit)||void 0===t?void 0:t.includes("READONLY"),required:null===(r=e.limit)||void 0===r?void 0:r.includes("REQUIRED")}};switch(e.fieldType){case"INT":t={brick:"forms.general-input-number",properties:(0,o.A)((0,o.A)((0,o.A)({},r),n()),{},{placeholder:e.description,precision:0,inputBoxStyle:{width:"100%"}})};break;case"BOOLEAN":t={brick:"forms.general-switch",properties:(0,o.A)((0,o.A)({},r),n())};break;case"FLOAT":t={brick:"forms.general-input-number",properties:(0,o.A)((0,o.A)((0,o.A)({},r),n()),{},{placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"ENUM":t={brick:"forms.general-select",properties:(0,o.A)((0,o.A)((0,o.A)({},r),n()),{},{options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"ENUMS":t={brick:"forms.general-select",properties:(0,o.A)((0,o.A)((0,o.A)({},r),n()),{},{mode:"multiple",options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"DATE":case"TIME":t={brick:"forms.general-date-picker",properties:(0,o.A)((0,o.A)((0,o.A)({},r),n()),{},{placeholder:e.description})};break;case"IP":t={brick:"forms.general-input",properties:(0,o.A)((0,o.A)((0,o.A)({},r),n()),{},{placeholder:e.description,pattern:"((^s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))s*$)|(^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*$))",message:{pattern:"输入字符不匹配IP格式"}})};break;case"JSON":t={brick:"forms.general-textarea",properties:(0,o.A)({},r)};break;case"ARRAY":t={brick:"forms.general-select",properties:(0,o.A)({},r)};break;case"STRUCTURE":case"STRUCTURE_ARRAY":t={brick:"forms.cmdb-instance-select-panel",properties:(0,o.A)((0,o.A)({},r),n())};break;default:t={brick:"forms.general-input",properties:(0,o.A)((0,o.A)((0,o.A)({},r),n()),{},{placeholder:e.description})}}return t}(p);u||(u=f.brick),d=(0,o.A)((0,o.A)({},f.properties),d)}var h={brick:u,properties:d,iid:c,slot:l,events:i,context:s,children:so(a,t,r),[oo]:r};return(0,v.hasOwnProperty)(e,"if")&&(h.if=e.if),h}function so(e,t,r){if(Array.isArray(e))return e.map((e=>io(e,t,r)))}var lo,co,uo,po=["blockingList","node","menuRequestNode","hasTrackingControls"],fo=["if","permissionsPreCheck"],vo=["formData"],ho=["src"],mo=["href"];function go(e,t,r,n,o,a,i,s){return yo.apply(this,arguments)}function yo(){return yo=(0,a.A)((function*(e,t,r,n,a,i,s,l){var c=yield function(e,t){return Gt.apply(this,arguments)}(t,r),u={blockingList:[]},d=u.menuRequestNode={return:i};switch(c){case"missed":break;case"unauthenticated":u.unauthenticated=!0;break;default:var p,v=u.route=c.route;u.path=c.match.path;var h=(0,o.A)((0,o.A)({},r),{},{match:c.match});l&&h.ctxStore.disposeDataInRoutes(t);var m=a.concat(v);h.ctxStore.define(v.context,h,void 0,m),h.pendingPermissionsPreCheck.push(null==Sa||null===(p=Sa.checkPermissions)||void 0===p?void 0:p.preCheckPermissionsForBrickOrRoute(v,(e=>Et(e,h))));var{preLoadBricks:g}=v;if(Array.isArray(g)&&u.blockingList.push((0,f.loadBricksImperatively)(g,ja())),"redirect"===v.type){var y;if("string"!=typeof(y="string"==typeof v.redirect?yield Et(v.redirect,h):(yield at((0,o.A)({transform:"redirect"},v.redirect),h)).redirect))throw console.error("Unexpected redirect result:",y),new Error("Unexpected type of redirect result: ".concat(typeof y));u.redirect={path:y}}else{var A,b=function(e,t){if(e){if("brick"===e.type)throw console.error("Set menu with brick is dropped in v3:",e),new Error("Set menu with brick is dropped in v3");if("resolve"!==e.type)return Et(e,t);console.warn("Set menu with resolve is not supported in v3 yet:",e)}}(v.menu,h);b&&(d.request=b),l||n.memoizeMenuRequestNode(t,d),Ro(u,A="routes"===v.type?yield go(e,v.routes,h,n,m,d,s):yield Ao(e,v.bricks,h,n,m,d,s)),To(d,A.menuRequestNode)}}return u})),yo.apply(this,arguments)}function Ao(e,t,r,n,o,a,i,s,l){return bo.apply(this,arguments)}function bo(){return bo=(0,a.A)((function*(e,t,r,n,o,a,i,s,l){!function(e,t,r){function n(e){if((0,v.isObject)(e)&&"function"!=typeof e)if(Array.isArray(e))e.map(n);else for(var[t,r]of Object.entries(e))(0,v.isObject)(r)&&"useBrick"===t?Array.isArray(r)?r.forEach((e=>o(e,!0))):o(r,!0,!0):n(r)}function o(e,a,i){if(a&&(e[An]=t),n(e.properties),!r||i){var s=Oo(e.children,e.slots);for(var l of Object.values(null!=s?s:{}))for(var c of null!==(u=l.bricks)&&void 0!==u?u:[]){var u;o(c,a)}}}for(var a of e)o(a)}(t,r,!0);var c={blockingList:[]},u=null!=l?l:[];return(yield Promise.all(t.map(((t,l)=>wo(e,t,r,n,o,a,i,u.concat(l),s&&new Map(s)))))).forEach(((t,r)=>{t.hasTrackingControls&&n.memoize(i,u.concat(r),t.node,e),Ro(c,t)})),c})),bo.apply(this,arguments)}function wo(e,t,r,n,o,a,i){return Eo.apply(this,arguments)}function Eo(){return Eo=(0,a.A)((function*(e,t,r,n,i,s,l){var c,u,d=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],p=arguments.length>8&&void 0!==arguments[8]?arguments[8]:new Map,h={blockingList:[]};if(!t.brick)return t.template?console.error("Legacy templates are dropped in v3:",t):console.error("Invalid brick:",t),h;var{if:m,permissionsPreCheck:g}=t,b=(0,y.A)(t,fo);if(function(e){return"string"==typeof e?(0,_.isTrackAll)(e):dt(e)&&(0,_.isTrackAll)(pt(e))}(m))return wo(e,(0,o.A)({brick:":if",dataSource:m,permissionsPreCheck:g,slots:{"":{type:"bricks",bricks:[b]}}},Object.getOwnPropertySymbols(t).reduce(((e,r)=>(0,o.A)((0,o.A)({},e),{},{[r]:t[r]})),{})),r,n,i,s,l,d,p);var E=t[Xt],S=t[oo],k=(0,o.A)((0,o.A)({},r),{},{tplStateStoreId:E,formStateStoreId:S});(0,v.hasOwnProperty)(t,Zt)?(k.forEachItem=t[Zt],k.forEachIndex=t[er]):t[tr]&&(delete k.forEachItem,delete k.forEachIndex);var{context:I}=t;if(Array.isArray(I)&&I.length>0){var C=Pe(k);_e(C,"Defining context on bricks","check your brick:",t),C||k.ctxStore.define(I,k)}if(k.pendingPermissionsPreCheck.push(null==Sa||null===(c=Sa.checkPermissions)||void 0===c?void 0:c.preCheckPermissionsForBrickOrRoute(t,(e=>Et(e,k)))),!(yield function(e,t){return _t.apply(this,arguments)}(t,k)))return h;var R=t.brick;if(R.startsWith(":")){var T;!function(e){if(":forEach"!==e&&":if"!==e&&":switch"!==e)throw new Error('Unknown storyboard control node: "'.concat(e,'"'))}(R);var{dataSource:O}=t,P=function(){var r=(0,a.A)((function*(r){var o,a=yield Et(O,r),c=":forEach"===R?"":":switch"===R?String(a):a?"":"else",u=Oo(t.children,t.slots),f=u&&(0,v.hasOwnProperty)(u,c)&&(null===(o=u[c])||void 0===o?void 0:o.bricks);if(!Array.isArray(f))return{blockingList:[]};switch(R){case":forEach":return Array.isArray(a)?function(e,t,r,n,o,a,i,s,l,c){return So.apply(this,arguments)}(e,a,f,r,n,i,s,l,p,d):{blockingList:[]};case":if":case":switch":return Ao(e,f,r,n,i,s,l,p,d)}}));return function(e){return r.apply(this,arguments)}}(),x=function(){var t=(0,a.A)((function*(t){var r,n=yield P(t);return null!==(r=n.node)&&void 0!==r||(n.node={tag:zr.PLACEHOLDER,return:e}),n}));return function(e){return t.apply(this,arguments)}}(),B=yield x(k),{onMount:L,onUnmount:N}=null!==(T=t.lifeCycle)&&void 0!==T?T:{},{contextNames:U,stateNames:F}=xt(O);if(U||F){B.hasTrackingControls=!0;var j=0,$=function(){var t=(0,a.A)((function*(){var t=++j,[r,o,a]=Co(k),i=yield x(r),s=[...o,...a];if(yield Io(i,r,s),j===t)for(var c of(N&&kr(N,k)(new CustomEvent("unmount",{detail:{rerender:!0}})),n.reRender(l,d,i.node,e),L&&kr(L,r)(new CustomEvent("mount",{detail:{rerender:!0}})),s))c.mountAsyncData()}));return function(){return t.apply(this,arguments)}}(),D=(0,A.debounce)($);if(U)for(var K of U)k.ctxStore.onChange(K,D);if(F)for(var V of F)Le(k,"STATE",': "'.concat(O,'"')).onChange(V,D)}return L&&n.registerArbitraryLifeCycle("onMount",(()=>{kr(L,k)(new CustomEvent("mount",{detail:{rerender:!1}}))})),N&&n.registerArbitraryLifeCycle("onUnmount",(()=>{kr(N,k)(new CustomEvent("unmount",{detail:{rerender:!1}}))})),B}/\.tpl-/.test(R)&&!Be.get(R)&&(yield Po((0,f.loadBricksImperatively)([R],ja()),"brick",R,n.unknownBricks));var W,H,z=function(e,t){if(!e.includes(".")&&e.startsWith("tpl-")&&t){var r="".concat(t,".").concat(e);if(Be.get(r))return r}return!!Be.get(e)&&e}(R,null===(u=k.app)||void 0===u?void 0:u.id);if(z){var q,G=null!==(q=p.get(z))&&void 0!==q?q:0;if(G>=10)throw new Error('Maximum custom template stack overflowed: "'.concat(z,'"'));p.set(z,G+1)}else R.includes("-")&&!customElements.get(R)&&(R===no?customElements.define(no,class extends HTMLElement{get $$typeof(){return"form-renderer"}}):h.blockingList.push(Po((0,f.enqueueStableLoadBricks)([R],ja()),"brick",R,n.unknownBricks)));if(R===no){var Y,Q=null!==(Y=t.properties)&&void 0!==Y?Y:{};({formData:W}=Q),H=(0,y.A)(Q,vo)}else H=t.properties;var J=[],X=function(e,t,r){return(0,v.isObject)(e)?Object.entries(e).map((e=>{var[n,o]=e,{contextNames:a,stateNames:i,formStateNames:s}=xt(o);return(a||i||s)&&r.push({contextNames:a,stateNames:i,formStateNames:s,propName:n,propValue:o}),[n,Et(o,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?At.USE_BRICK:At.INITIAL})]})):[]}(H,k,J),Z=t[Jt];Z&&X.push(...Z);var ee="script"===R;if(ee||"link"===R){var te=yield Nt(X);if(ee?te.src:"stylesheet"===te.rel&&te.href){var re,ne=null!==(re=window.PUBLIC_ROOT)&&void 0!==re?re:"";if(ee){var{src:oe}=te,ae=(0,y.A)(te,ho);yield Po((0,f.loadScript)(oe,ne,ae),"script",oe,"silent")}else{var{href:ie}=te;ae=(0,y.A)(te,mo),yield Po((0,f.loadStyle)(ie,ne,ae),"stylesheet",ie,"silent")}return h}}var se={tag:zr.BRICK,type:z||R,return:e,slotId:l,events:t.events,runtimeContext:k,portal:t.portal,iid:t.iid,ref:t.ref};h.node=se;var le=(0,M.strictCollectMemberUsage)([t.events,t.lifeCycle],"PROCESSORS",2);le.size>0&&h.blockingList.push(Po((0,f.loadProcessorsImperatively)(le,ja()),"processors",[...le].join(", "),n.unknownBricks));var ce=[],ue=function(){var e=(0,a.A)((function*(){se.properties=yield Nt(X),function(e,t){var r=function(t){var r=()=>{e.element&&jt(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=Le(e.runtimeContext,"STATE",': "'.concat(t.propValue,'"'));for(var a of t.stateNames)o.onChange(a,r)}if(t.formStateNames){var i=Je(e.runtimeContext,"FORM_STATE",': "'.concat(t.propValue,'"'));for(var s of t.formStateNames)i.onChange(s,r)}};for(var n of t)r(n)}(se,J)}));return function(){return e.apply(this,arguments)}}();ce.push(ue()),n.registerBrickLifeCycle(se,t.lifeCycle);var de,pe=t;z?pe=to(z,t,se,X,n):R===no&&(pe=function(e,t,r,n,a){var i,s,l="string"==typeof e?JSON.parse(e):e,c=(0,A.uniqueId)("form-state-"),u=(0,o.A)((0,o.A)({},r.runtimeContext),{},{formStateStoreId:c});delete u.forEachItem,delete u.forEachIndex,delete u.tplStateStoreId;var d=new zn("FORM_STATE",void 0,a,c);u.formStateStoreMap.set(c,d),u.formStateStoreScope&&u.formStateStoreScope.push(d);var p=null!==(i=l.context)&&void 0!==i?i:[];p.some((e=>"params"===e.name))||p.push({name:"params"}),d.define(p,u,n);var f=io(l.formSchema,l.fields,c);return ao.includes(f.brick)&&t.events&&(f.events=function(e,t){var r=null!=e?e:{};for(var[n,o]of Object.entries(t))r[n]=(0,v.hasOwnProperty)(r,n)?[r[n],o].flat():o;return r}(f.events,t.events)),"boolean"!=typeof(null===(s=t.properties)||void 0===s?void 0:s.renderRoot)||t.properties.renderRoot?(0,o.A)((0,o.A)({},t),{},{slots:void 0,children:[{brick:"eo-micro-view",properties:{style:{padding:"12px"}},children:[f]}]}):(0,o.A)((0,o.A)({},t),{},{slots:void 0,children:[f]})}(W,t,se,X,n)),pe.portal&&(se.slotId=void 0),z?(delete(de=(0,o.A)({},k)).forEachItem,delete de.forEachIndex):de=k;var fe=function(){var e=(0,a.A)((function*(){var e=Oo(pe.children,pe.slots);if(e){var t=new Map,r=yield Promise.all(Object.entries(e).map(((e,r)=>{var[l,c]=e;if("routes"!==c.type)return Ao(se,c.bricks,de,n,i,s,l,p);var u=i[i.length-1];return null!=u&&u.incrementalSubRoutes&&(t.set(r,l),n.performIncrementalRender(c,i,function(){var e=(0,a.A)((function*(e,t){var{homepage:r}=de.app,{pathname:a}=e;if(!w(r,a)||!i.every((e=>{var n,o;return(n=Yt(e,r,t.pathname))&&(o=Yt(e,r,a))&&(e!==u||(0,A.isEqual)(n.params,o.params))})))return!1;var d,[p,f,v]=Co((0,o.A)((0,o.A)({},de),{},{location:e,query:new URLSearchParams(e.search)})),h=!1,m=[];try{if((d=yield go(se,c.routes,p,n,i,s,l,!0)).route){if(n.reBailout(d))return!0;m=[...f,...v],yield Io(d,p,[p.ctxStore,...m])}yield n.reMergeMenuRequestNodes(s,c.routes,d.menuRequestNode)}catch(e){console.error("Incremental sub-router failed:",e);var g=n.reCatch(e,se);if(!g)return!0;({failed:h,output:d}=g),yield n.reMergeMenuRequestNodes(s,c.routes,d.menuRequestNode)}if(n.reRender(l,[],d.node,se),!h)for(var y of(p.ctxStore.mountAsyncData(d.route),m))y.mountAsyncData();return!!d.route||null}));return function(t,r){return e.apply(this,arguments)}}())),go(se,c.routes,de,n,i,s,l)}))),l=(0,o.A)((0,o.A)({},h),{},{node:void 0,blockingList:[],menuRequestNode:void 0});r.forEach(((e,r)=>{t.has(r)&&n.memoize(t.get(r),[],e.node,se),Ro(l,e),function(e,t){var r=t.menuRequestNode;if(r)if(e.menuRequestNode){for(var n=e.menuRequestNode;n.sibling;)n=n.sibling;n.sibling=r}else e.menuRequestNode=r}(l,e)})),l.node&&(se.child=l.node),Ro(h,(0,o.A)((0,o.A)({},l),{},{node:void 0})),To(s,h.menuRequestNode=l.menuRequestNode)}}));return function(){return e.apply(this,arguments)}}();return ce.push(fe()),yield Promise.all(ce),h})),Eo.apply(this,arguments)}function So(){return(So=(0,a.A)((function*(e,t,r,n,a,i,s,l,c,u){var d={blockingList:[]},p=t.length;return(yield Promise.all(t.map(((t,d)=>Promise.all(r.map(((r,f)=>wo(e,r,(0,o.A)((0,o.A)({},n),{},{forEachItem:t,forEachIndex:d}),a,i,s,l,u.concat(d*p+f),c&&new Map(c))))))))).flat().forEach(((t,r)=>{t.hasTrackingControls&&a.memoize(l,u.concat(r),t.node,e),Ro(d,t)})),d}))).apply(this,arguments)}function ko(e){return[e.ctxStore,...e.tplStateStoreMap.values(),...e.formStateStoreMap.values()]}function Io(e,t,r){return(0,f.flushStableLoadBricks)(),Promise.all([...e.blockingList,...r.map((e=>e.waitForAll())),...t.pendingPermissionsPreCheck])}function Co(e){var t=[],r=[];return[(0,o.A)((0,o.A)({},e),{},{tplStateStoreScope:t,formStateStoreScope:r}),t,r]}function Ro(e,t){var{blockingList:r,node:n,menuRequestNode:o,hasTrackingControls:a}=t,i=(0,y.A)(t,po);if(e.blockingList.push(...r),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 To(e,t){if(t)if(e.child){for(var r=e.child;r.sibling;)r=r.sibling;r.sibling=t}else e.child=t}function Oo(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,v.hasOwnProperty)(r,a)||(r[a]={type:"bricks",bricks:[]}),r[a].bricks.push(n)}return r}function Po(e,t,r,n){return"silent"===n?e.catch((e=>{console.error('Load %s "%s" failed:',t,r,e)})):e}function _o(){if(!lo){if(lo={isInIframe:!1,isInIframeOfSameSite:!1,isInIframeOfNext:!1,isInIframeOfVisualBuilder:!1,isInIframeOfLegacyConsole:!1},window!==window.parent){lo.isInIframe=!0;try{if(window.origin===window.parent.origin){lo.isInIframeOfSameSite=!0;var e="/next/"===g(),t=window.parent.location.pathname,r=t.startsWith("/next/");lo.isInIframeOfNext=0==(Number(e)^Number(r)),lo.isInIframeOfVisualBuilder=t.startsWith("".concat(r?"/next":"","/visual-builder/")),lo.isInIframeOfLegacyConsole=e&&!r}}catch(e){}}Object.freeze(lo)}return lo}function Mo(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);Be.define(o,n)}}}function xo(){return xo=(0,a.A)((function*(e){if(!e.$$fulfilled)return e.$$fulfilling||(e.$$fulfilling=function(e){return Bo.apply(this,arguments)}(e)),e.$$fulfilling})),xo.apply(this,arguments)}function Bo(){return(Bo=(0,a.A)((function*(e){var t;yield null==Sa||null===(t=Sa.fulfilStoryboard)||void 0===t?void 0:t.call(Sa,e),U(e),Object.assign(e,{$$fulfilled:!0,$$fulfilling:null})}))).apply(this,arguments)}function Lo(e){var t;t="8.2"===e?"v8-2":"v8",document.documentElement.dataset.ui=t}var No="basic.show-watermark",Uo=new WeakMap,Fo=new WeakMap,jo=new WeakMap,$o=new WeakMap,Do=new WeakMap,Ko=new WeakMap,Vo=new WeakMap,Wo=new WeakMap,Ho=new WeakMap,zo=new WeakMap,qo=new WeakMap,Go=new WeakMap,Yo=new WeakSet;class Qo{constructor(e){(0,i.A)(this,Yo),(0,l.A)(this,Uo,void 0),(0,l.A)(this,Fo,!1),(0,l.A)(this,jo,void 0),(0,l.A)(this,$o,void 0),(0,l.A)(this,Do,void 0),(0,l.A)(this,Ko,void 0),(0,l.A)(this,Vo,new Set),(0,l.A)(this,Wo,0),(0,l.A)(this,Ho,void 0),(0,l.A)(this,zo,void 0),(0,l.A)(this,qo,void 0),(0,l.A)(this,Go,void 0),(0,u.A)(Uo,this,e);var t=O();window.addEventListener("beforeunload",(e=>{(0,c.A)(Yo,this,Jo).call(this,{})?(e.preventDefault(),e.returnValue=""):delete e.returnValue})),t.block(((e,t)=>(0,c.A)(Yo,this,Jo).call(this,{location:e,action:t})))}getRenderId(){return(0,d.A)(Ho,this)}getRuntimeContext(){return(0,d.A)(Do,this)}getRecentApps(){return{currentApp:(0,d.A)(zo,this),previousApp:(0,d.A)(qo,this)}}getNavConfig(){return(0,d.A)(Go,this)}bootstrap(){var e=this;window.AbortController&&(co=new AbortController,P.http.interceptors.request.use((e=>{var t;return(0,o.A)((0,o.A)({},e),{},{options:(0,o.A)((0,o.A)({},e.options),{},{signal:null!==(t=e.options)&&void 0!==t&&t.noAbortOnRouteChange?null:co.signal})})})));var t=O();(0,u.A)(jo,this,t.location);var r=0;return t.listen(function(){var t=(0,a.A)((function*(t,n){var a,i,s,l,p,f,v=++r,h={hash:void 0,state:void 0};if(void 0!==t.key&&("POP"!==n||void 0!==(0,d.A)(jo,e).key&&!1!==(null===(a=(0,d.A)(jo,e).state)||void 0===a?void 0:a.notify))||(h.key=void 0),((0,m.locationsAreEqual)((0,o.A)((0,o.A)({},(0,d.A)(jo,e)),h),(0,o.A)((0,o.A)({},t),h))||"POP"!==n&&!1===(null===(i=t.state)||void 0===i?void 0:i.notify))&&(p=!0),p||null!==(s=t.state)&&void 0!==s&&s.noIncremental||(p=yield null===(f=(0,d.A)(Ko,e))||void 0===f?void 0:f.didPerformIncrementalRender(t,(0,d.A)(jo,e))),r===v)if(p)(0,u.A)(jo,e,t);else{if(co&&(co.abort(),co=new AbortController),(0,u.A)(jo,e,t),null===(l=(0,d.A)(Ko,e))||void 0===l||l.dispatchPageLeave(),"POP"===n&&E(b((0,d.A)(Uo,e),t.pathname)))return void window.location.reload();(0,d.A)(Fo,e)?(0,u.A)($o,e,t):(z("locationChange"),(0,c.A)(Yo,e,Zo).call(e,t).catch(hr))}}));return function(e,r){return t.apply(this,arguments)}}()),(0,c.A)(Yo,this,Zo).call(this,t.location)}}function Jo(e){var t,r=O(),n=r.getBlockMessage();null===(t=(0,d.A)(Ko,this))||void 0===t||t.dispatchBeforePageLeave(e);var o=r.getBlockMessage();return!n&&o&&r.unblock(),o}function Xo(e,t,r){var n,o;if((0,u.A)(Wo,this,(n=(0,d.A)(Wo,this),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)}O().replace(e,t)}function Zo(e){return ea.apply(this,arguments)}function ea(){return(ea=(0,a.A)((function*(e){(0,u.A)(Fo,this,!0);try{yield(0,c.A)(Yo,this,ta).call(this,e)}finally{if((0,u.A)(Fo,this,!1),(0,d.A)($o,this)){var t=(0,d.A)($o,this);(0,u.A)($o,this,void 0),yield(0,c.A)(Yo,this,Zo).call(this,t)}}}))).apply(this,arguments)}function ta(e){return ra.apply(this,arguments)}function ra(){return ra=(0,a.A)((function*(e){var t,r,n,i,s=this,l=(0,u.A)(Ho,this,(0,A.uniqueId)("render-id-"));tt=new WeakSet,ot.clear(),null==Sa||null===(t=Sa.flowApi)||void 0===t||t.clearCollectWidgetContract(),O().unblock();var p=null==Sa||null===(r=Sa.pageView)||void 0===r?void 0:r.create(),v=b((0,d.A)(Uo,this),e.pathname),h=null===(n=(0,d.A)(Do,this))||void 0===n?void 0:n.app,m=null==v||null===(i=v.app)||void 0===i?void 0:i.id;window.BOOTSTRAP_UNION_FILE&&m&&m!==(null==h?void 0:h.id)&&function(e){var{appId:t,version:r}=e;window.APP_ROOT_TPL&&(window.APP_ID=t,window.APP_ROOT=window.APP_ROOT_TPL.replace("{id}",t).replace("{version}",r))}({appId:m,version:v.app.currentVersion}),null!=v&&v.app&&(yield function(e){return xo.apply(this,arguments)}(v));var g=(0,u.A)(zo,this,null==v?void 0:v.app);!function(){var e,t,r,n,a,i,s,l,c=xa().getFeatureFlags(),u=xa().getMiscSettings();if(c["show-watermark"]){var d="0.0.0"===(null===(e=window.APP_ROOT)||void 0===e||null===(e=e.match(/versions\/([^/]+)\//))||void 0===e?void 0:e[1])||"0.0.0"===(null===(t=window.APP_ROOT)||void 0===t||null===(t=t.match(/micro-apps\/(?:v2|v3)\/[^/]+\/([^/]+)/))||void 0===t?void 0:t[1]),p=null!==(r=null==Sa||null===(n=Sa.auth)||void 0===n||null===(n=n.getAuth())||void 0===n?void 0:n.username)&&void 0!==r?r:"",v=null!==(a=u.watermarkConfig)&&void 0!==a?a:{flags:{}},h=(0,o.A)({content:[..."string"==typeof v.content?[v.content]:null!==(i=v.content)&&void 0!==i?i:[],null!==(s=v.flags)&&void 0!==s&&s["show-development"]&&d?"Development":"",null!==(l=v.flags)&&void 0!==l&&l["show-user"]?p:""].filter(Boolean),zIndex:1001,width:200,font:{fontSize:28},gap:[190,190]},(0,A.omit)(v,["content","flags"]));uo?uo.resolve(h):(0,f.loadBricksImperatively)([No],ja()).then((()=>{(uo=document.createElement(No)).resolve(h)}),(e=>{console.error("Load watermark service failed:",e)}))}}();var y,w=h&&g?h.id!==g.id:h!==g,E=xa().getFeatureFlags(),S=(0,d.A)(Ko,this),k=(t,r)=>{null==p||p({status:"redirected"}),(0,d.A)(Vo,this).add(S),(0,c.A)(Yo,this,Xo).call(this,t,r,e)},I=()=>{var t=E["sso-enabled"]?"/sso-auth/login":"/auth/login";cr(e),k(t,{from:e})},C=document.querySelector("#main-mount-point"),R=document.querySelector("#portal-mount-point"),T={tag:zr.ROOT,container:C,createPortal:R},_=()=>{var e;for(var t of(qr(C),qr(R),(0,d.A)(Vo,this).add(S),(0,d.A)(Vo,this)))t&&(t.dispatchOnUnmount(),t.dispose());(0,d.A)(Vo,this).clear(),null==Sa||null===(e=Sa.messageDispatcher)||void 0===e||e.reset(),w&&((0,u.A)(qo,this,h),window.dispatchEvent(new CustomEvent("app.change",{detail:{previousApp:h,currentApp:g}})))};if(te(g&&(ie()[g.id]||g.theme)||"light"),le("default"),g){var M,x,B,L,N,U;null==Sa||null===(M=Sa.checkInstalledApps)||void 0===M||M.preCheckInstalledApps(v,(e=>!!Va(e)));var F={bailout:e=>e.unauthenticated?(I(),!0):e.redirect?(k(e.redirect.path,e.redirect.state),!0):void(0,u.A)(Wo,this,0),mergeMenus:(y=(0,a.A)((function*(e){var t=yield Promise.all(e);(0,u.A)(Go,s,function(e){var t={breadcrumb:[]};for(var r of e){var{breadcrumb:n}=r;n&&(n.overwrite?t.breadcrumb=n.items:t.breadcrumb.push(...n.items))}return t}(t)),window.dispatchEvent(new CustomEvent("navConfig.change",{detail:(0,d.A)(Go,s)}))})),function(e){return y.apply(this,arguments)}),catch:(t,r)=>{if(!dr(t)||window.NO_AUTH_GUARD){if(!(t instanceof P.HttpAbortError)){var n=xa().getMiscSettings().noAuthGuardLoginPath;return dr(t)&&n?void k(n,{from:e}):{failed:!0,output:{node:{tag:zr.BRICK,type:"div",properties:{textContent:ur(t)},runtimeContext:null,return:r},blockingList:[],menuRequests:[]}}}(0,d.A)(Vo,this).add(S)}else I()}},j=(0,u.A)(Ko,this,new ln("page",{routeHelper:F,renderId:l})),$=(0,u.A)(Do,this,{app:g,location:e,query:new URLSearchParams(e.search),flags:E,sys:(0,o.A)((0,o.A)((0,o.A)({},null==Sa||null===(x=Sa.auth)||void 0===x?void 0:x.getAuth()),_o()),{},{settings:{brand:xa().getBrandSettings()}}),ctxStore:new zn("CTX",void 0,j),pendingPermissionsPreCheck:[null==Sa||null===(B=Sa.checkPermissions)||void 0===B?void 0:B.preCheckPermissions(v)],tplStateStoreMap:new Map,formStateStoreMap:new Map});(0,u.A)(Go,this,void 0),Mo(v),ye(null===(L=v.meta)||void 0===L?void 0:L.functions,g),null==Sa||null===(N=Sa.flowApi)||void 0===N||N.collectContract(null===(U=v.meta)||void 0===U?void 0:U.contracts);var D,K=!1,V=[];try{var W={};if(D=yield go(T,function(e){if(window.parent===window)return e;var t=e,r=(0,A.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,A.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)]}(v.routes),$,j,[],W),F.bailout(D))return;V=ko($),yield Io(D,$,V),W.child=D.menuRequestNode,j.setInitialMenuRequestNode(W),yield F.mergeMenus(j.getMenuRequests())}catch(e){console.error("Router failed:",e);var H=F.catch(e,T);if(!H)return;({failed:K,output:D}=H)}if(T.child=D.node,_(),D.route&&"routes"!==D.route.type||K){if(K||j.dispatchBeforePageLoad(),oe(),ue(),Lo(null==g?void 0:g.uiVersion),Gr(T),window.scrollTo(0,0),K)null==p||p({status:"failed"});else{for(var q of(j.dispatchPageLoad(),j.dispatchAnchorLoad(),j.dispatchOnMount(),j.initializeScrollIntoView(),j.initializeMediaChange(),j.initializeMessageDispatcher(),V))q.mountAsyncData();null==p||p({status:"ok",path:D.path,pageTitle:document.title})}return void z("rendered")}}else{if(!window.NO_AUTH_GUARD&&null!=Sa&&Sa.auth&&!Sa.auth.isLoggedIn())return void I();_()}oe(),ue();var G={tag:zr.BRICK,type:"div",properties:{textContent:"Page not found"},runtimeContext:null,return:T};T.child=G,Gr(T),window.scrollTo(0,0),null==p||p({status:"not-found"}),z("rendered")})),ra.apply(this,arguments)}var na="undefined"!=typeof BRICK_PACKAGES?BRICK_PACKAGES:null,oa=r(94579),aa=r(84501),ia=2,sa=.16,la=.05,ca=.05,ua=.15,da=5,pa=4,fa=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function va(e){var t=e.r,r=e.g,n=e.b,o=(0,oa.wE)(t,r,n);return{h:360*o.h,s:o.s,v:o.v}}function ha(e){var t=e.r,r=e.g,n=e.b;return"#".concat((0,oa.Ob)(t,r,n,!1))}function ma(e,t,r){var n;return(n=Math.round(e.h)>=60&&Math.round(e.h)<=240?r?Math.round(e.h)-ia*t:Math.round(e.h)+ia*t:r?Math.round(e.h)+ia*t:Math.round(e.h)-ia*t)<0?n+=360:n>=360&&(n-=360),n}function ga(e,t,r){return 0===e.h&&0===e.s?e.s:((n=r?e.s-sa*t:t===pa?e.s+sa:e.s+la*t)>1&&(n=1),r&&t===da&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2)));var n}function ya(e,t,r){var n;return(n=r?e.v+ca*t:e.v-ua*t)>1&&(n=1),Number(n.toFixed(2))}function Aa(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[],n=(0,aa.RO)(e),o=da;o>0;o-=1){var a=va(n),i=ha((0,aa.RO)({h:ma(a,o,!0),s:ga(a,o,!0),v:ya(a,o,!0)}));r.push(i)}r.push(ha(n));for(var s=1;s<=pa;s+=1){var l=va(n),c=ha((0,aa.RO)({h:ma(l,s),s:ga(l,s),v:ya(l,s)}));r.push(c)}return"dark"===t.theme?fa.map((function(e){var n,o,a,i=e.index,s=e.opacity;return ha((n=(0,aa.RO)(t.backgroundColor||"#141414"),a=100*s/100,{r:((o=(0,aa.RO)(r[i])).r-n.r)*a+n.r,g:(o.g-n.g)*a+n.g,b:(o.b-n.b)*a+n.b}))})):r}var ba,wa,Ea,Sa,ka={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Ia={},Ca={};function Ra(e){return':root,\n[data-override-theme="light"] {\n'.concat(e,"}")}function Ta(e){return'html[data-theme="dark-v2"],\n[data-override-theme="dark-v2"] {\n'.concat(e,"}")}function Oa(e){return e.match(/[0-9a-fA-F]{2}/g).map((e=>parseInt(e,16))).join(", ")}function Pa(e,t,r){return"dark"===t?Aa(e,{theme:t,backgroundColor:r})[5]:e}function _a(e){var t=[];if(["light","dark"].forEach((r=>{if(e[r])switch(e.type){case"brandColor":t.push(function(e,t){return("dark"===e?Ta:Ra)("string"==typeof(r=t)?" --color-brand: ".concat(r,";\n"):[" --color-brand: ".concat(r.default,";")," --color-brand-hover: ".concat(r.hover,";")," --color-brand-active: ".concat(r.active,";"),""].join("\n"));var r}(r,e[r]));break;case"baseColors":t.push(function(e,t,r){return("dark"===e?Ta:Ra)("".concat(function(e,t){return Object.entries(e).flatMap((e=>{var[r,n]=e;return function(e){if(!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(e))throw new Error("Invalid base color name: ".concat(JSON.stringify(e)))}(r),n.map(((e,n)=>[" --palette-".concat(r,"-").concat(n+1,"-channel: ").concat(Oa(e),";")].concat("dark"===t?[]:" --palette-".concat(r,"-").concat(n+1,": rgb(var(--palette-").concat(r,"-").concat(n+1,"-channel));")).join("\n"))).concat("")})).join("\n")}(function(e,t,r){return Object.fromEntries(Object.entries(e).map((e=>{var[n,o]=e;return[n,Aa(o,"dark"===t?{theme:t,backgroundColor:r}:void 0)]})))}(t,e,r),e),"\n").concat(function(e,t,r){return Object.entries({green:"green",red:"red",blue:"blue",orange:"orange",cyan:"cyan",purple:"purple",geekblue:"indigo"}).flatMap((n=>{var[o,a]=n;return[" --theme-".concat(o,"-color-rgb-channel: ").concat(Oa(Pa(t[a],e,r)),";"),..."dark"===e?[]:[" --theme-".concat(o,"-color: var(--palette-").concat(a,"-6);")," --theme-".concat(o,"-border-color: var(--palette-").concat(a,"-3);")]," --theme-".concat(o,"-background: var(--palette-").concat(a,"-").concat("dark"===e?2:1,");"),""]})).join("\n")}(e,t,r)))}(r,e[r],e.backgroundColor));break;case"variables":t.push(function(e,t){return("dark"===e?Ta:Ra)(function(e){return Object.entries(e).map((e=>{var[t,r]=e;return function(e){if(!/^--[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(e))throw new Error("Invalid css variable name: ".concat(JSON.stringify(e)))}(t)," ".concat(t,": ").concat(r,";")})).concat("").join("\n")}(t))}(r,e[r]))}})),t.length>0){var r=document.createElement("style");return r.textContent=t.join("\n\n"),document.head.appendChild(r),()=>{r.remove()}}}function Ma(e){if(ba)throw new Error("Cannot create multiple runtimes");return window.addEventListener("message",(e=>{var{data:t}=e;if((null==t?void 0:t.source)===K){var r=t.payload;switch(null==r?void 0:r.type){case V:H=r.active;break;case W:$=r.panel}}})),Sa=null==e?void 0:e.hooks,(0,p.initializeI18n)(ir,sr),h.locale(p.i18n.language),p.i18n.on("languageChanged",(()=>{h.locale(p.i18n.language)})),T(),ba=new Ua}Object.keys(ka).forEach((function(e){Ia[e]=Aa(ka[e]),Ia[e].primary=Ia[e][5],Ca[e]=Aa(ka[e],{theme:"dark",backgroundColor:"#141414"}),Ca[e].primary=Ca[e][5]})),Ia.red,Ia.volcano,Ia.gold,Ia.orange,Ia.yellow,Ia.lime,Ia.green,Ia.cyan,Ia.blue,Ia.geekblue,Ia.purple,Ia.magenta,Ia.grey;var xa=function(){var e=R();if(e)return function(){return new Proxy(e.getRuntime(),{get(){switch(arguments.length<=1?void 0:arguments[1]){case"getCurrentApp":case"getRecentApps":case"hasInstalledApp":case"getDesktops":case"getLaunchpadSettings":case"getLaunchpadSiteMap":case"toggleLaunchpadEffect":case"applyPageTitle":case"getNavConfig":case"getFeatureFlags":case"getMiscSettings":case"getBrandSettings":return Reflect.get(...arguments)}}})}}()||function(){return ba},Ba=new WeakMap,La=new WeakMap,Na=new WeakSet;class Ua{constructor(){(0,i.A)(this,Na),(0,l.A)(this,Ba,!1),(0,l.A)(this,La,!1),(0,s.A)(this,"version",3)}initialize(e){var t;if((0,d.A)(Ba,this))throw new Error("The runtime cannot be initialized more than once");(0,u.A)(Ba,this,!0),function(e){(0,v.isObject)(e.settings)&&(0,v.deepFreeze)(e.settings),e.brickPackages&&(0,v.deepFreeze)(e.brickPackages)}(e),wa=e;var r,{notification:n,dialog:a}=(0,c.A)(Na,this,Fa).call(this);!1!==n&&(r=null!=n?n:"basic.show-notification",(0,this.loadBricks)([r]).then((()=>{fr=document.createElement(r)}),(e=>{console.error("Load notification service failed:",e)}))),!1!==a&&function(e,t){t([e]).then((()=>{Qt=document.createElement(e)}),(e=>{console.error("Load dialog service failed:",e)}))}(null!=a?a:"basic.show-dialog",this.loadBricks),function(e){e&&(e.brandColor?_a((0,o.A)({type:"brandColor"},e.brandColor)):e.baseColors?_a((0,o.A)({type:"baseColors"},e.baseColors)):e.variables&&_a((0,o.A)({type:"variables"},e.variables)))}(null===(t=e.settings)||void 0===t||null===(t=t.misc)||void 0===t?void 0:t.theme)}bootstrap(e){var t=this;return(0,a.A)((function*(){if(e&&t.initialize(e),(0,d.A)(La,t))throw new Error("The runtime cannot be bootstrapped more than once");(0,u.A)(La,t,!0),Ea=new Qo(wa.storyboards),yield Ea.bootstrap()}))()}getRecentApps(){var e,t;return null!==(e=null===(t=Ea)||void 0===t?void 0:t.getRecentApps())&&void 0!==e?e:{}}getCurrentApp(){var e;return null===(e=Ea)||void 0===e?void 0:e.getRecentApps().currentApp}hasInstalledApp(e,t){return Qe(e,t)}getFeatureFlags(){var e,t;return(0,o.A)((0,o.A)((0,o.A)({},null===(e=wa)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.featureFlags),null===(t=Ea)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.featureFlags),{},{"migrate-to-brick-next-v3":!0})}getMiscSettings(){var e,t;return(0,o.A)((0,o.A)({},null===(e=wa)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.misc),null===(t=Ea)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.misc)}getBrandSettings(){var e;return(0,o.A)({base_title:"DevOps 管理专家"},null===(e=wa)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.brand)}getLaunchpadSettings(){var e;return(0,o.A)({columns:7,rows:4},null===(e=wa)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.launchpad)}getDesktops(){var e,t;return null!==(e=null===(t=wa)||void 0===t?void 0:t.desktops)&&void 0!==e?e:[]}getLaunchpadSiteMap(){var e,t;return null!==(e=null===(t=wa)||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=Ea)||void 0===e?void 0:e.getNavConfig()}loadBricks(e){return(0,f.loadBricksImperatively)(e,ja())}}function Fa(){var e,t;return null!==(e=null===(t=wa)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.presetBricks)&&void 0!==e?e:{}}function ja(){var e,t,r,n;return null!==(e=null!==(t=null!==(r=function(e,t){if(null==t||!t.length)return e;var r=new Map;return[...e,...t].forEach((e=>{var t=e.filePath.split("/")[1];r.set(t,e)})),Array.from(r.values())}(null===(n=wa)||void 0===n?void 0:n.brickPackages,window.PUBLIC_DEPS))&&void 0!==r?r:na)&&void 0!==t?t:window.STANDALONE_BRICK_PACKAGES)&&void 0!==e?e:[]}function $a(){var e;return null===(e=Ea)||void 0===e?void 0:e.getRenderId()}function Da(){var e;return null===(e=Ea)||void 0===e?void 0:e.getRuntimeContext()}function Ka(e){var t;return null===(t=wa)||void 0===t||null===(t=t.storyboards)||void 0===t?void 0:t.find((t=>t.app.id===e))}function Va(e){var t;return null===(t=Ka(e))||void 0===t?void 0:t.app}function Wa(){for(var e,t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];null==Sa||null===(e=Sa.auth)||void 0===e||null===(t=e.authenticate)||void 0===t||t.call(e,...n)}function Ha(){var e;return null==Sa||null===(e=Sa.auth)||void 0===e?void 0:e.getAuth()}function za(){var e,t;return null==Sa||null===(e=Sa.auth)||void 0===e||null===(t=e.logout)||void 0===t?void 0:t.call(e)}function qa(){var e;return null==Sa||null===(e=Sa.auth)||void 0===e?void 0:e.isLoggedIn()}function Ga(e,t,r){return Ya.apply(this,arguments)}function Ya(){return(Ya=(0,a.A)((function*(e,t,r){return st(yield Ze(e),e,"resolve",t,r)}))).apply(this,arguments)}function Qa(e){var t,{portal:r,scope:n="fragment",unknownBricks:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r;t=r||(()=>((i=document.createElement("div")).style.position="absolute",i.style.width=i.style.height="0",document.body.append(i),i));var s,l,c=!1;return{render(r){var u=arguments;return(0,a.A)((function*(){var{theme:a,uiVersion:d,context:p,functions:f,templates:v,i18n:h,url:m,app:g}=u.length>1&&void 0!==u[1]?u[1]:{};if(c)throw new Error("The root is unmounted and cannot be rendered any more");var y=[].concat(r),b=s,w=(0,A.uniqueId)("render-id-");s=new ln(n,{unknownBricks:o,renderId:w});var E={ctxStore:new zn("CTX",void 0,s),pendingPermissionsPreCheck:[],tplStateStoreMap:new Map,formStateStoreMap:new Map};if(m){var S=new URL(m);E.query=S.searchParams,E.location={pathname:S.pathname,search:S.search,hash:S.hash,state:void 0}}var k={tag:zr.ROOT,container:e,createPortal:t};if("page"===n){var I,C;te(null!=a?a:"light"),le("default"),Lo(d),null!==(I=g)&&void 0!==I||(g={id:"demo",homepage:"/demo"}),E.app=g;var R={app:g,meta:{i18n:h,customTemplates:v}};null===(C=l)||void 0===C||C(),l=U(R),Mo(R),ye(f,g)}E.ctxStore.define(p,E);var T,O=!1,P=[];try{T=yield Ao(k,y,E,s,[],{}),P=ko(E),yield Io(T,E,P)}catch(e){O=!0,T={node:{tag:zr.BRICK,type:"div",properties:{textContent:ur(e)},return:k,runtimeContext:null},blockingList:[]}}if(k.child=T.node,null==b||b.dispatchOnUnmount(),null==b||b.dispose(),qr(e),i&&qr(i),"page"===n&&(O||s.dispatchBeforePageLoad(),oe(),ue()),Gr(k),"page"===n&&window.scrollTo(0,0),!O){for(var _ of P)_.mountAsyncData();"page"===n&&s.dispatchPageLoad(),s.dispatchOnMount(),s.initializeScrollIntoView(),s.initializeMediaChange(),s.initializeMessageDispatcher()}}))()},unmount(){c||(c=!0,qr(e),i&&(qr(i),r||i.remove()))}}}function Ja(e){var{useRealTimeQuery:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,o.A)({},Da());t&&(r.query=new URLSearchParams(O().location.search));var n=t=>{if("string"==typeof t){if((0,_.isEvaluable)(t)){var o=gt(t,r);return rt(o),o}return(0,x.inject)(t,r)}return!(0,v.isObject)(t)||nt(e)?t:Array.isArray(t)?t.map((e=>n(e))):Object.fromEntries(Object.entries(t).map((e=>{var[t,r]=e;return[n(t),n(r)]})))};return n(e)}}}]);
2
- //# sourceMappingURL=9248.fefbfba8.js.map
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunk_next_bricks_advanced=self.webpackChunk_next_bricks_advanced||[]).push([[9260],{43509:(e,t,i)=>{i.r(t);var a=i(69740),s=i(24586),n=i(74635),r=i(70918),l=i(26902),o=i(5536),h=i(86121),d=i(70829),c=i(62740),p=i(18769),u=i.n(p),A=i(76544),g=i(12621),w=i(2198),m=i(41030),y=i(6471),f=i(89575),v=i(14223),b=i(98841),k=i(80050),x={$eq:m.isEqual,$lt:m.lt,$lte:m.lte,$gt:m.gt,$gte:m.gte,$ne:(e,t)=>!(0,m.isEqual)(e,t),$isEqual:m.isEqual,$notEqual:(e,t)=>!(0,m.isEqual)(e,t),$in:m.includes,$nin:(e,t)=>!(0,m.includes)(e,t),$exists:(e,t)=>e?!(0,m.isUndefined)(t):(0,m.isUndefined)(t)};function C(e,t,i){var{dataIndex:a,mapping:s}=e,n=void 0!==a?(0,m.get)(t,a):i,r=s.find((e=>e.value===n));return r?{borderLeft:"4px solid ".concat(r.leftBorderColor)}:{}}var S=(e,t,i,a)=>{e&&(0,m.forEach)(e,(e=>{var s=(0,m.get)(e,i),n=(0,m.get)(e,t);a.push(n),null!=s&&s.length&&S(s,t,i,a)}))},E=(e,t,i)=>{e&&(0,m.forEach)(e,(e=>{var a=(0,m.get)(e,t);i.push(e),null!=a&&a.length&&E(a,t,i)}))};function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null!=t&&t.length&&t.forEach((t=>{var i;return null!==(i=t[e])&&void 0!==i&&i.length?M(e,t[e]):(delete t[e],t)})),t}var R=i(53373),W=i.n(R),_=i(47522),N=i(80255),B=i(63737),D=i(50692),I=i(53435),K=i.n(I),P=i(120),z=i(68621),T="bricks/advanced/eo-table",U=i(85502),F=i(18799),L=i(84352),H=i(26386),q=["index","moveRow","className","style"],O=["useBrick","valueSuffix","cellStatus","cellStyle","headerBrick","colSpanKey","rowSpanKey","filterDropdownBrick"];(0,U.initializeReactI18n)(T,{en:{},zh:{}});var j="DraggableBodyRow",$={lib:"antd",icon:"down",theme:"outlined"},Q={lib:"antd",icon:"right",theme:"outlined"},Z=(0,g.wrapBrick)("eo-icon"),V=e=>{var{index:t,moveRow:i,className:s,style:n}=e,r=(0,v.A)(e,q),l=u().useRef(null),[{isOver:o,dropClassName:h},d]=(0,_.H)({accept:j,collect:e=>{var{index:i}=e.getItem()||{};return i===t?{}:{isOver:e.isOver(),dropClassName:i<t?"dropOverDownward":"dropOverUpward"}},drop:e=>{i(e.index,t)}}),[,c]=(0,N.i)({type:j,item:{type:j,index:t},collect:e=>({isDragging:e.isDragging()})});return d(c(l)),u().createElement("tr",(0,f.A)({ref:l,className:W()(s,{[h]:o}),style:(0,a.A)({cursor:"move"},n)},r))};function G(e){var{t}=(0,U.useTranslation)(T),i="zh"===F.i18n.language.split("-")[0]?H.A:L.A;if(e.error)throw e.error;var{configProps:s={pagination:!0,sortBy:!1},columns:n,rowKey:r="key",expandIconAsCell:l,expandIconColumnIndex:o,childrenColumnName:h,scroll:d,optimizedColumns:c,onDelete:A,ellipsisInfo:g,showHeader:w}=e,y=(0,p.useMemo)((()=>{var t;return null===(t=e.dataSource)||void 0===t?void 0:t.map(((e,t)=>(0,m.isNil)(e[r])?(0,a.A)((0,a.A)({},e),{},{[r]:t}):e))}),[e.dataSource,r]),[x,S]=(0,p.useState)(y),E=(0,p.useRef)(new Map),M=(0,p.useRef)(new Map),R=(0,p.useRef)(new Map),_=(0,p.useRef)(new Map);(0,p.useEffect)((()=>{_.current.clear(),S(y)}),[y]);var N=null!=s&&s.rowSelection?-1:0,I=(0,p.useMemo)((()=>{if(n){M.current.clear(),R.current.clear();var e=n.map(((e,t)=>{var i,{useBrick:s,valueSuffix:n,cellStatus:d,cellStyle:c={},headerBrick:p,colSpanKey:A,rowSpanKey:w,filterDropdownBrick:y}=e,f=(0,v.A)(e,O);if(null!=p&&p.useBrick){var b=null==p?void 0:p.useBrick,k=M.current.get(e);k||(k={title:f.title},M.current.set(e,k)),f.title=((e,t)=>function(){return u().createElement(P.ReactUseMultipleBricks,{useBrick:e,data:t})})(b,k)}if(null!=y&&y.useBrick&&(f.filterDropdown=u().createElement(P.ReactUseMultipleBricks,{useBrick:y.useBrick})),s?(s&&((i=R.current.get(s))||(i=new Map,R.current.set(s,i))),f.render=((e,t)=>function(i,a,s){if(e){var n=null==t?void 0:t.get(a);return n||(n={cellData:i,rowData:a,columnIndex:s},null==t||t.set(a,n)),u().createElement(P.ReactUseMultipleBricks,{useBrick:e,data:n})}})(s,i),f.shouldCellUpdate=(e,t)=>!(0,m.isEqual)(e,t)):n&&(f.render=e=>e+n),!l&&t===Number(o)+N){var x=f.render;f.render=function(e,t,i){return u().createElement(u().Fragment,null,!t[h]&&E.current.get(r?t[r]:t),x?x(e,t,i):e)}}if(d||A||w||c){var S=f.render;f.render=(e,t,i)=>({children:S?S(e,t,i):e,props:{colSpan:t[A],rowSpan:t[w],style:(0,a.A)((0,a.A)({},d?C(d,t,e):{}),c)}})}return"string"==typeof f.dataIndex&&(f.dataIndex=(0,m.toPath)(f.dataIndex)),"top"===f.verticalAlign&&(f.className?f.className+=" alignTop":f.className="alignTop"),"bottom"===f.verticalAlign&&(f.className?f.className+=" alignBottom":f.className="alignBottom"),g&&(f.className?f.className+=" ellipsisInfoCell":f.className="ellipsisInfoCell"),f}));return e}}),[n,h,l,o,N,r,A,g]),q={body:{row:V}},j=(t,i)=>{var a=x[t],s=K()(x,{$splice:[[t,1],[i,0,a]]});S(s),e.onDrag&&e.onDrag(s)},G=(0,m.pickBy)({expandIconColumnIndex:o,expandIconAsCell:l,expandRowByClick:e.expandRowByClick,expandedRowKeys:e.expandedRowKeys,defaultExpandAllRows:e.defaultExpandAllRows},(e=>!(0,m.isNil)(e))),Y=u().createElement(b.A,(0,f.A)({className:W()("brickTable",{expandIconCellHidden:!l,customDropTable:e.tableDraggable,tableThTransparent:e.thTransparent,zebraPatternTable:(null==x?void 0:x.length)>=2&&e.zebraPattern,xSmallSizeTable:e.xSmallSizeTable}),dataSource:x},e.tableDraggable?{components:q,onRow:(e,t)=>({index:t,moveRow:j})}:{},{columns:I,onChange:e.onChange},e.expandedRowBrick?{expandedRowRender:(t,i)=>{var a,s=_.current.get(t);return s||(s={rowData:t,rowIndex:i},_.current.set(t,s)),u().createElement(P.ReactUseMultipleBricks,{useBrick:null===(a=e.expandedRowBrick)||void 0===a?void 0:a.useBrick,data:s})}}:{},G,{onExpand:(t,i)=>{e.onExpand&&e.onExpand(t,i)},showSorterTooltip:!1,onExpandedRowsChange:t=>{e.onExpandedRowsChange&&e.onExpandedRowsChange(t)},rowKey:r,childrenColumnName:h,rowClassName:(t,i)=>t.invalidRow?"invalidRow":t.disabledRow?"disabledRow":e.zebraPattern&&i%2?"brickTableOddRow":"",expandIcon:t=>{var i,a,s,{record:n,expandable:o,expanded:h,onExpand:d}=t,c=(null===(i=e.expandIcon)||void 0===i?void 0:i.collapsedIcon)||$;o?(h||(c=(null===(s=e.expandIcon)||void 0===s?void 0:s.expandedIcon)||Q),a=u().createElement("span",{className:"expandIconSpan","data-testid":"expand-icon",onClick:e=>{d(n,e)}},u().createElement(Z,c))):a=u().createElement("span",{className:"expandIconSpan","data-testid":"expand-icon"},u().createElement("span",{style:{visibility:"hidden"}},u().createElement(Z,c)));return a?(l||E.current.set(r?n[r]:n,a),a):u().createElement(u().Fragment,null)},scroll:d,showHeader:w},s));e.tableDraggable&&(Y=u().createElement(B.Q,{backend:D.t2},Y));var J=(0,p.useMemo)((()=>(0,z.VC)()),[]);return u().createElement(k.Ay,{locale:i},u().createElement(z.N7,{container:e.shadowRoot,cache:J},Y))}i(46329);var Y,J,X,ee,te,ie,ae,se,ne,re,le,oe,he,de,ce,pe,ue,Ae,ge,we,me,ye,fe,ve,be,ke,xe,Ce,Se,Ee,Me,Re,We,_e,Ne,Be,De,Ie,Ke,Pe,ze,Te,Ue,Fe,Le,He,qe,Oe,je,$e,Qe,Ze,Ve,Ge,Ye,Je,Xe,et,tt,it,at,st,nt,rt,lt,ot,ht,dt,ct,pt,ut,At,gt,wt,mt,yt,ft,vt,bt,kt,xt,Ct,St,Et,Mt,Rt,Wt,_t,Nt,Bt,Dt,It,Kt,Pt,zt,Tt,Ut,Ft,Lt,Ht,qt,Ot,jt,$t,Qt,Zt,Vt,Gt,Yt,Jt,Xt,ei,ti,ii,ai,si,ni,ri,li,oi,hi,di,ci,pi,ui,Ai,{defineElement:gi,property:wi,event:mi,method:yi}=(0,A.createDecorators)(),fi=new WeakMap,vi=new WeakSet,bi=new WeakMap,ki=new WeakMap,xi=new WeakMap,Ci=new WeakMap,Si=new WeakMap,Ei=new WeakMap,Mi=new WeakMap,Ri=new WeakMap,Wi=new WeakMap,_i=new WeakMap,Ni=new WeakMap,Bi=new WeakMap,Di=new WeakMap,Ii=new WeakMap,Ki=new WeakMap,Pi=new WeakMap,zi=new WeakMap,Ti=new WeakMap,Ui=new WeakMap,Fi=new WeakMap,Li=new WeakMap,Hi=new WeakMap,qi=new WeakMap,Oi=new WeakMap,ji=new WeakMap,$i=new WeakMap,Qi=new WeakMap,Zi=new WeakMap,Vi=new WeakMap,Gi=new WeakMap,Yi=new WeakMap,Ji=new WeakMap,Xi=new WeakMap,ea=new WeakMap,ta=new WeakMap,ia=new WeakMap,aa=new WeakMap,sa=new WeakMap,na=new WeakMap,ra=new WeakMap,la=new WeakMap,oa=new WeakMap,ha=new WeakMap,da=new WeakMap,ca=new WeakMap,pa=new WeakMap,ua=new WeakMap,Aa=new WeakMap,ga=new WeakMap,wa=new WeakMap,ma=new WeakMap,ya=new WeakMap,fa=new WeakMap;class va extends g.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,vi),(0,r.A)(this,fi,(J(this),ee(this))),(0,r.A)(this,bi,(ae(this),se(this))),(0,r.A)(this,ki,(le(this),oe(this))),(0,r.A)(this,xi,(ce(this),pe(this))),(0,r.A)(this,Ci,(ge(this),we(this))),(0,r.A)(this,Si,(fe(this),ve(this))),(0,r.A)(this,Ei,(xe(this),Ce(this))),(0,r.A)(this,Mi,(Me(this),Re(this))),(0,r.A)(this,Ri,(Ne(this),Be(this,!0))),(0,r.A)(this,Wi,(De(this),Ie(this))),(0,r.A)(this,_i,(Ke(this),Pe(this))),(0,r.A)(this,Ni,(ze(this),Te(this))),(0,r.A)(this,Bi,(Ue(this),Fe(this,!1))),(0,r.A)(this,Di,(Le(this),He(this))),(0,r.A)(this,Ii,(qe(this),Oe(this))),(0,r.A)(this,Ki,(je(this),$e(this))),(0,r.A)(this,Pi,(Qe(this),Ze(this))),(0,r.A)(this,zi,(Ve(this),Ge(this))),(0,r.A)(this,Ti,(Ye(this),Je(this))),(0,r.A)(this,Ui,(Xe(this),et(this))),(0,r.A)(this,Fi,(tt(this),it(this,!0))),(0,r.A)(this,Li,(at(this),st(this))),(0,r.A)(this,Hi,(nt(this),rt(this))),(0,r.A)(this,qi,(lt(this),ot(this))),(0,r.A)(this,Oi,(ht(this),dt(this,!1))),(0,r.A)(this,ji,(ct(this),pt(this))),(0,r.A)(this,$i,(ut(this),At(this))),(0,r.A)(this,Qi,(gt(this),wt(this))),(0,r.A)(this,Zi,(mt(this),yt(this))),(0,r.A)(this,Vi,(ft(this),vt(this))),(0,s.A)(this,"_disabledChildrenKeys",(bt(this),[])),(0,r.A)(this,Gi,kt(this,"children")),(0,r.A)(this,Yi,(xt(this),Ct(this,!0))),(0,r.A)(this,Ji,(St(this),Et(this))),(0,r.A)(this,Xi,(Mt(this),Rt(this,""))),(0,r.A)(this,ea,(Wt(this),_t(this))),(0,r.A)(this,ta,(Nt(this),Bt(this))),(0,r.A)(this,ia,(Dt(this),It(this))),(0,r.A)(this,aa,(Kt(this),Pt(this))),(0,r.A)(this,sa,(zt(this),Tt(this,{x:!0}))),(0,r.A)(this,na,(Ut(this),Ft(this,"q"))),(0,r.A)(this,ra,(Lt(this),Ht(this))),(0,r.A)(this,la,(qt(this),Ot(this))),(0,r.A)(this,oa,(jt(this),$t(this))),(0,r.A)(this,ha,(Qt(this),Zt(this,[]))),(0,r.A)(this,da,(Vt(this),Gt(this))),(0,r.A)(this,ca,(Yt(this),Jt(this))),(0,r.A)(this,pa,(Xt(this),ei(this,!0))),(0,r.A)(this,ua,(ti(this),ii(this))),(0,r.A)(this,Aa,(ai(this),si(this))),(0,r.A)(this,ga,(ni(this),ri(this))),(0,r.A)(this,wa,(li(this),oi(this,!0))),(0,r.A)(this,ma,(hi(this),di(this,!0))),(0,s.A)(this,"_originalDataSource",(ci(this),[])),(0,s.A)(this,"_dataSource",[]),(0,s.A)(this,"_pureSource",void 0),(0,s.A)(this,"_columns",void 0),(0,s.A)(this,"_finalConfigProps",{}),(0,s.A)(this,"_error",void 0),(0,r.A)(this,ya,void 0),(0,s.A)(this,"_selectUpdateEventName",""),(0,s.A)(this,"_selectUpdateEventDetailKeys",[]),(0,s.A)(this,"_selectUpdateEventDetailField",""),(0,s.A)(this,"_selectUpdateEventDetailExtra",{}),(0,s.A)(this,"_fields",{page:"page",pageSize:"pageSize",dataSource:"list",total:"total",ascend:"ascend",descend:"descend"}),(0,r.A)(this,fa,pi(this,[])),(0,s.A)(this,"_selected",(ui(this),!1)),(0,s.A)(this,"_selectedRow",void 0),(0,s.A)(this,"_selectedRows",[]),(0,s.A)(this,"_allChildren",[]),(0,s.A)(this,"_isInSelect",!1),(0,s.A)(this,"_getRowKey",(()=>{var e,t,i,a;return null!==(e=null!==(t=null!==(i=this.rowKey)&&void 0!==i?i:this._fields.rowKey)&&void 0!==t?t:null===(a=this.configProps)||void 0===a?void 0:a.rowKey)&&void 0!==e?e:"key"})),(0,s.A)(this,"_findParentByChildKeyValue",((e,t,i,a)=>{var s;return i.some((i=>{if(i[t]===e)s=a;else{var n=i[this.childrenColumnName];n&&(s=this._findParentByChildKeyValue(e,t,n,i))}return!!s})),s})),(0,s.A)(this,"_handleRowSelectChange",((e,t)=>{var i=this._getRowKey(),a=(0,m.keyBy)(t,i);if(this._selected){var s=[...e];if(this._allChildren.forEach((e=>{var t=e[i];s.push(t),a[t]=e})),this.autoSelectParentWhenAllChildrenSelected&&this._selectedRow){var n=new Set(e),r=this._findParentByChildKeyValue(this._selectedRow[i],i,this._dataSource);if(r&&r[this.childrenColumnName].every((e=>n.has(e[i])))){var l=r[i];s.push(l),a[l]=r}}this.selectedRowKeys=(0,m.uniq)(s)}else{var h;this.autoSelectParentWhenAllChildrenSelected&&this._selectedRow&&(h=this._findParentByChildKeyValue(this._selectedRow[i],i,this._dataSource)),this.selectedRowKeys=(0,m.pullAll)(e,(0,m.map)(this._allChildren.concat(h),i))}this._selectedRow=void 0;var d=(0,m.keyBy)(this.extraRows,i);this._selectedRows=this.selectedRowKeys.map((e=>a[e]||d[e]));var c=null,p=(0,m.isEmpty)(this._selectUpdateEventDetailField)?this._selectedRows:(0,m.map)(this._selectedRows,(e=>(0,m.get)(e,this._selectUpdateEventDetailField)));c=(0,m.isEmpty)(this._selectUpdateEventDetailKeys)||(0,m.isEmpty)(p)?p:(0,m.set)({},this._selectUpdateEventDetailKeys,p),(0,m.isEmpty)(c)||(c=(0,m.merge)(c,this._selectUpdateEventDetailExtra)),this._selectUpdateEventName?this.dispatchEvent(new CustomEvent(this._selectUpdateEventName,{detail:c})):(0,o.A)(vi,this,he).emit(c),(0,o.A)(vi,this,ue).emit(e)})),(0,s.A)(this,"_getSelectedRowsWithChildren",(e=>{var t=[];return!(0,m.isEmpty)(e[this.childrenColumnName])&&(0,m.isArray)(e[this.childrenColumnName])&&(0,m.forEach)(e[this.childrenColumnName],(e=>{t.push(e),t.push(...this._getSelectedRowsWithChildren(e))})),t})),(0,s.A)(this,"_handleOnSelect",((e,t)=>{this._selected=t,this._selectedRow=e,this._isInSelect=!0;var i=this._getRowKey(),a=this.selectAllChildren?this._getSelectedRowsWithChildren(e):[];this._allChildren=a,this.autoSelectParentWhenAllChildrenSelected||(this._disabledChildrenKeys=t?(0,m.uniq)([...this._disabledChildrenKeys,...(0,m.map)(a,i)]):(0,m.pullAll)(this._disabledChildrenKeys,[...(0,m.map)(a,i)])),this.storeCheckedByUrl&&i&&this._updateUrlChecked([e[i]],t)})),(0,s.A)(this,"_handleSelectAll",((e,t,i)=>{this._selected=e,this._isInSelect=!0;var a=this._getRowKey();if(this.selectAllChildren){var s=(0,m.map)(this._dataSource,a),n=i.filter((e=>s.includes(e[a]))),r=(0,m.flatten)((0,m.map)(n,(e=>(0,m.map)(this._getSelectedRowsWithChildren(e),(e=>e[a]))))),l=(0,m.flatten)((0,m.map)(n,(e=>(0,m.map)(this._getSelectedRowsWithChildren(e),(e=>e)))));this._allChildren=l,this.autoSelectParentWhenAllChildrenSelected||(this._disabledChildrenKeys=e?(0,m.uniq)(this._disabledChildrenKeys.concat(r)):this._disabledChildrenKeys.filter((e=>!r.includes(e))))}this.storeCheckedByUrl&&a&&this._updateUrlChecked((0,m.map)(i,a),e)})),(0,s.A)(this,"_getCheckedFromUrl",(()=>{var e=(0,y.getHistory)(),t=new URLSearchParams(e.location.search).get("checked");return(0,m.isEmpty)(t)?[]:t.split(",")})),(0,s.A)(this,"_updateUrlChecked",((e,t)=>{var i=(0,y.getHistory)(),a=this._getCheckedFromUrl();t?a=[...a,...e]:(0,m.pull)(a,...e),this.shouldUpdateUrlParams&&i.pushQuery({checked:a.join(",")},{notify:!1})})),(0,s.A)(this,"_handleOnChange",((e,t,i)=>{var a=(0,y.getHistory)(),s=new URLSearchParams(a.location.search);if(!(0,m.isEmpty)(e))if(e.pageSize!==this.pageSize)e.current=1,s.set("page","1"),s.set("pageSize",(null==e?void 0:e.pageSize).toString()),(0,o.A)(vi,this,ne).emit({[this._fields.pageSize]:e.pageSize,[this._fields.page]:1}),this.page=1,this.pageSize=e.pageSize;else if(e.current!==this.page){var n=e.current||1;s.set("page",n.toString()),(0,o.A)(vi,this,te).emit({[this._fields.page]:n}),this.page=n}this.filters=t,(0,m.isEmpty)(t)||(0,m.forEach)(t,((e,t)=>{(0,m.isNil)(e)||0===e.length?s.delete(t):s.set(t,e)})),i.order&&(0,m.isNil)(i.order)&&(i.columnKey!==this.sort||this._fields[i.order]!==this.order)&&(i.columnKey&&i.order?(s.set("sort",i.columnKey),s.set("order",this._fields[i.order].toString()),this.sort=i.columnKey,this.order=this._fields[i.order]):(s.delete("sort"),s.delete("order"),this.sort=null,this.order=null),(0,o.A)(vi,this,me).emit({sort:this.sort,order:this.order})),this.frontSearch?(this.shouldUpdateUrlParams&&a.push("?".concat(s),{notify:!1}),this.frontendSearch(e,t,i)):this.shouldUpdateUrlParams&&a.push("?".concat(s),{notify:!!this.shouldRenderWhenUrlParamsUpdate})})),(0,s.A)(this,"renderSelectInfo",(()=>u().createElement("span",{style:{marginLeft:20}},u().createElement("span",null,"已选择",this.selectedRowKeys.length,"项"),u().createElement("a",{role:"button",style:{marginLeft:"10px"},onClick:()=>{this.selectedRowKeys=[],this._selectedRows=[],this._disabledChildrenKeys=[],this._allChildren=[],this._selectUpdateEventName?this.dispatchEvent(new CustomEvent(this._selectUpdateEventName,{detail:[]})):(0,o.A)(vi,this,he).emit([])}},"清空")))),(0,s.A)(this,"_handleOnExpand",((e,t)=>{if(this.expandedRowKeys){var i=this._getRowKey(),a=[(0,m.get)(t,i)],s=(0,m.get)(t,this.childrenColumnName);if(!(0,m.isEmpty)(s)){var n=(0,m.map)((0,m.filter)(s,(e=>(0,m.isEmpty)((0,m.get)(e,this.childrenColumnName)))),i);a.push(...n)}this.expandedRowKeys=e?[...this.expandedRowKeys,...a]:(0,m.pull)(this.expandedRowKeys,...a),this._render()}(0,o.A)(vi,this,be).emit({expanded:e,record:t})})),(0,s.A)(this,"_handleOnExpandedRowsChange",(e=>{(0,o.A)(vi,this,Se).emit({expandedRows:e})})),(0,s.A)(this,"_handleOnDrag",(e=>{(0,o.A)(vi,this,We).emit({data:e})})),(0,s.A)(this,"_getAllRows",(()=>{var e=[];return E(this._dataSource,this.childrenColumnName,e),e})),(0,s.A)(this,"_handleDefaultSelectAll",(()=>{this._isInSelect=!0;var e=this._getRowKey();return this._selectedRows=this._getAllRows(),this.selectedRowKeys=(0,m.map)(this._selectedRows,e),this.selectedRowKeys})),(0,s.A)(this,"_initConfigProps",(()=>{var e,t,i,s={current:this.page,pageSize:this.pageSize,total:(0,d.A)(ya,this),showSizeChanger:!0,pageSizeOptions:["10","20","50"],showTotal:e=>{var t;return u().createElement(u().Fragment,null,u().createElement("span",{className:"totalText"},"共 ",u().createElement("strong",{className:"total"},e)," 条"),((null===(t=this.configProps)||void 0===t?void 0:t.rowSelection)||this.rowSelection)&&this.showSelectInfo&&0!==this.selectedRowKeys.length&&this.renderSelectInfo())}},n=this._getRowKey();this.rowDisabledConfig&&(i=Array.isArray(this.rowDisabledConfig)?this.rowDisabledConfig:[this.rowDisabledConfig]);var r=(0,a.A)((0,a.A)({},n?{selectedRowKeys:this._isInSelect?this.selectedRowKeys:this.storeCheckedByUrl?this._getCheckedFromUrl():this.defaultSelectAll?this._handleDefaultSelectAll():this.selectedRowKeys,onSelect:this._handleOnSelect,onSelectAll:this._handleSelectAll,onChange:this._handleRowSelectChange,preserveSelectedRowKeys:!0}:{onChange:this._handleRowSelectChange,preserveSelectedRowKeys:!0}),{},{getCheckboxProps:e=>!(0,m.isEmpty)(this._disabledChildrenKeys)&&this._disabledChildrenKeys.includes((0,m.get)(e,n))?{disabled:!0}:i?{disabled:i.some((t=>{var{field:i,value:a,operator:s}=t,n=x[s];return null==n?void 0:n(a,(0,m.get)(e,i))}))}:{}});this.configProps?(this._finalConfigProps=(0,m.cloneDeep)(this.configProps),!1!==this.configProps.pagination&&(this._finalConfigProps.pagination=(0,a.A)((0,a.A)((0,a.A)({},s),this.pagination),this.configProps.pagination),void 0!==this.configProps.pagination&&null!==this.configProps.pagination||!1!==this.pagination||(this._finalConfigProps.pagination=!1)),this.configProps.size||(this._finalConfigProps.size="x-small"==this.size?"":this.size)):(this._finalConfigProps={},this._finalConfigProps.pagination=!1!==this.pagination&&s,this._finalConfigProps.size="x-small"==this.size?"":this.size);var l,o,h=null!==(e=null===(t=this.configProps)||void 0===t?void 0:t.rowSelection)&&void 0!==e?e:this.rowSelection;h?this._finalConfigProps.rowSelection=!0===h?(0,a.A)((0,a.A)({},r),{},{type:null!==(l=this.type)&&void 0!==l?l:"checkbox"}):(0,a.A)((0,a.A)((0,a.A)({},r),{},{type:null!==(o=this.type)&&void 0!==o?o:"checkbox"},h),r.selectedRowKeys?{selectedRowKeys:r.selectedRowKeys}:{}):this.type?this._finalConfigProps.rowSelection=(0,a.A)((0,a.A)({},r),{},{type:this.type}):this._finalConfigProps.rowSelection=!1,this._columns&&(this._columns=this._columns.map((e=>{if((0,m.isNil)(e.key)&&(e.key=e.dataIndex),e.sorter&&(e.sortOrder=this.sort===e.key&&!(0,m.isNil)(this.order)&&(this._fields.ascend===this.order?"ascend":"descend")),e.filters){var t,i,a=(0,y.getHistory)(),s=null!==(t=new URLSearchParams(a.location.search).get(e.key))&&void 0!==t?t:null===(i=(0,m.get)(this.filters,e.key))||void 0===i?void 0:i.join(",");(0,m.isNil)(s)||(0,m.isEmpty)(s)?(e.filtered=!1,e.filteredValue=[]):(e.filtered=!0,e.filteredValue=s.split(",").map((t=>{var i,a;return null!==(i=null===(a=(0,m.find)(e.filters,(e=>String(e.value)===t)))||void 0===a?void 0:a.value)&&void 0!==i?i:t})))}return e})))}))}set columns(e){this._columns=e,this._render()}get columns(){return this._columns}set dataSource(e){var t,i,a,s,n,r;this._isInSelect=!1,this._originalDataSource=e,this._dataSource=(0,m.cloneDeep)(this._fields.dataSource?(0,m.get)(e,this._fields.dataSource):e),this._pureSource=(0,m.cloneDeep)(this._dataSource),this.stripEmptyExpandableChildren&&M((null===(r=this.configProps)||void 0===r||null===(r=r.expandable)||void 0===r?void 0:r.childrenColumnName)||"children",this._dataSource),(0,h.A)(ya,this,(0,m.get)(e,this._fields.total)),this.page=null!==(t=null!==(i=(0,m.get)(e,"page"))&&void 0!==i?i:this.page)&&void 0!==t?t:1,this.pageSize=null!==(a=null!==(s=null!==(n=(0,m.get)(e,"page_size"))&&void 0!==n?n:(0,m.get)(e,"pageSize"))&&void 0!==s?s:this.pageSize)&&void 0!==a?a:10,this._render()}get showCard(){return(0,d.A)(Ri,this)}set showCard(e){(0,h.A)(Ri,this,e)}get rowSelection(){return(0,d.A)(Wi,this)}set rowSelection(e){(0,h.A)(Wi,this,e)}get rowKey(){return(0,d.A)(_i,this)}set rowKey(e){(0,h.A)(_i,this,e)}get hiddenColumns(){return(0,d.A)(Ni,this)}set hiddenColumns(e){(0,h.A)(Ni,this,e)}get showSelectInfo(){return(0,d.A)(Bi,this)}set showSelectInfo(e){(0,h.A)(Bi,this,e)}get filters(){return(0,d.A)(Di,this)}set filters(e){(0,h.A)(Di,this,e)}get configProps(){return(0,d.A)(Ii,this)}set configProps(e){(0,h.A)(Ii,this,e)}get sort(){return(0,d.A)(Ki,this)}set sort(e){(0,h.A)(Ki,this,e)}get order(){return(0,d.A)(Pi,this)}set order(e){(0,h.A)(Pi,this,e)}get rowDisabledConfig(){return(0,d.A)(zi,this)}set rowDisabledConfig(e){(0,h.A)(zi,this,e)}get expandedRowBrick(){return(0,d.A)(Ti,this)}set expandedRowBrick(e){(0,h.A)(Ti,this,e)}get expandIcon(){return(0,d.A)(Ui,this)}set expandIcon(e){(0,h.A)(Ui,this,e)}get expandIconAsCell(){return(0,d.A)(Fi,this)}set expandIconAsCell(e){(0,h.A)(Fi,this,e)}get expandIconColumnIndex(){return(0,d.A)(Li,this)}set expandIconColumnIndex(e){(0,h.A)(Li,this,e)}get expandRowByClick(){return(0,d.A)(Hi,this)}set expandRowByClick(e){(0,h.A)(Hi,this,e)}get optimizedColumns(){return(0,d.A)(qi,this)}set optimizedColumns(e){(0,h.A)(qi,this,e)}get stripEmptyExpandableChildren(){return(0,d.A)(Oi,this)}set stripEmptyExpandableChildren(e){(0,h.A)(Oi,this,e)}get defaultExpandAllRows(){return(0,d.A)(ji,this)}set defaultExpandAllRows(e){(0,h.A)(ji,this,e)}get ellipsisInfo(){return(0,d.A)($i,this)}set ellipsisInfo(e){(0,h.A)($i,this,e)}get expandedRowKeys(){return(0,d.A)(Qi,this)}set expandedRowKeys(e){(0,h.A)(Qi,this,e)}get selectAllChildren(){return(0,d.A)(Zi,this)}set selectAllChildren(e){(0,h.A)(Zi,this,e)}get defaultSelectAll(){return(0,d.A)(Vi,this)}set defaultSelectAll(e){(0,h.A)(Vi,this,e)}get childrenColumnName(){return(0,d.A)(Gi,this)}set childrenColumnName(e){(0,h.A)(Gi,this,e)}get sortable(){return(0,d.A)(Yi,this)}set sortable(e){(0,h.A)(Yi,this,e)}set fields(e){this._fields=(0,a.A)((0,a.A)({},this._fields),e),this._render()}get frontSearch(){return(0,d.A)(Ji,this)}set frontSearch(e){(0,h.A)(Ji,this,e)}get frontSearchQuery(){return(0,d.A)(Xi,this)}set frontSearchQuery(e){(0,h.A)(Xi,this,e)}get exactSearch(){return(0,d.A)(ea,this)}set exactSearch(e){(0,h.A)(ea,this,e)}get frontSearchFilterKeys(){return(0,d.A)(ta,this)}set frontSearchFilterKeys(e){(0,h.A)(ta,this,e)}get page(){return(0,d.A)(ia,this)}set page(e){(0,h.A)(ia,this,e)}get pageSize(){return(0,d.A)(aa,this)}set pageSize(e){(0,h.A)(aa,this,e)}get scrollConfigs(){return(0,d.A)(sa,this)}set scrollConfigs(e){(0,h.A)(sa,this,e)}get qField(){return(0,d.A)(na,this)}set qField(e){(0,h.A)(na,this,e)}get tableDraggable(){return(0,d.A)(ra,this)}set tableDraggable(e){(0,h.A)(ra,this,e)}get zebraPattern(){return(0,d.A)(la,this)}set zebraPattern(e){(0,h.A)(la,this,e)}get storeCheckedByUrl(){return(0,d.A)(oa,this)}set storeCheckedByUrl(e){(0,h.A)(oa,this,e)}get extraRows(){return(0,d.A)(ha,this)}set extraRows(e){(0,h.A)(ha,this,e)}get autoSelectParentWhenAllChildrenSelected(){return(0,d.A)(da,this)}set autoSelectParentWhenAllChildrenSelected(e){(0,h.A)(da,this,e)}get thTransparent(){return(0,d.A)(ca,this)}set thTransparent(e){(0,h.A)(ca,this,e)}get showHeader(){return(0,d.A)(pa,this)}set showHeader(e){(0,h.A)(pa,this,e)}get pagination(){return(0,d.A)(ua,this)}set pagination(e){(0,h.A)(ua,this,e)}get size(){return(0,d.A)(Aa,this)}set size(e){(0,h.A)(Aa,this,e)}get type(){return(0,d.A)(ga,this)}set type(e){(0,h.A)(ga,this,e)}get shouldUpdateUrlParams(){return(0,d.A)(wa,this)}set shouldUpdateUrlParams(e){(0,h.A)(wa,this,e)}get shouldRenderWhenUrlParamsUpdate(){return(0,d.A)(ma,this)}set shouldRenderWhenUrlParamsUpdate(e){(0,h.A)(ma,this,e)}get processedDataSource(){return this._dataSource}get processConfigProps(){return this._finalConfigProps}get processedColumns(){return this.getModifyColumns()}get selectedRowKeys(){return(0,d.A)(fa,this)}set selectedRowKeys(e){(0,h.A)(fa,this,e)}filterSourceData(e){var t=this.exactSearch?e.detail.q.trim():e.detail.q.trim().toLowerCase();if(this.shouldUpdateUrlParams){var i=(0,y.getHistory)(),a=new URLSearchParams(i.location.search);a.set("page","1"),t?(a.set(this.qField,t),i.push("?".concat(a),{notify:!this.frontSearch})):(a.delete(this.qField),i.push("?".concat(a),{notify:!this.frontSearch})),this.page=1}this.frontSearchQuery=t}handleFrontendDataChange(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(this.shouldUpdateUrlParams){var i=(0,y.getHistory)(),a=new URLSearchParams(i.location.search);this.frontSearchQuery=a.get(this.qField)}var s=[];s=this.handleFrontendFilterSource(e,this.frontSearchQuery||"",t);var n=(0,m.isNil)(this.order)?null:this._fields.ascend===this.order?"ascend":"descend";return s=this.handleFrontendSorter(s,{columnKey:this.sort,order:n}),s=this.handleFrontendFilters(s),(0,h.A)(ya,this,s.length),s}handleFrontendFilterSource(e,t,i,s){if(!t)return e;var n=[];return s||(s=this.frontSearchFilterKeys||i.map((e=>e.dataIndex))),e.forEach((e=>{var r,l=e[this.childrenColumnName];if(l){var o=this.handleFrontendFilterSource(l,t,i,s);if(o.length>0)return void n.push((0,a.A)((0,a.A)({},e),{},{[this.childrenColumnName]:o}))}(null===(r=s)||void 0===r?void 0:r.some((i=>{var a=(0,m.get)(e,i);return!(0,m.isNil)(a)&&(this.exactSearch?a===t:JSON.stringify(a).toLowerCase().includes(t))})))&&n.push(e)})),n}handleFrontendSorter(e,t){var i=e||[],{columnKey:a,order:s}=t;if(!a||!s)return e;var n=1;return"descend"===s?n=-1:"ascend"===s&&(n=1),void 0!==n&&(i.sort(((e,t)=>{var i=(0,m.get)(e,a),s=(0,m.get)(t,a);if((0,m.isNil)(i)){if(!(0,m.isNil)(s))return 1}else if((0,m.isNil)(s))return-1;return i==s?0:i>s?n:-n})),i.forEach((e=>{var i=e[this.childrenColumnName];i&&this.handleFrontendSorter(i,t)}))),i}handleFrontendFilters(e){var t=e||[],i=(0,m.map)(this.filters,((e,t)=>({key:t,value:e}))).filter((e=>!(0,m.isNil)(e.value)&&0!==e.value.length));return t.filter((e=>(0,m.every)(i,(t=>{var i,a;return null===(i=null===(a=t.value)||void 0===a?void 0:a.includes((0,m.get)(e,t.key)))||void 0===i||i}))))}frontendSearch(e,t,i){this.sort=(0,m.isNil)(i.order)?null:i.columnKey,this.order=(0,m.isNil)(i.order)?null:this._fields[i.order]}expandAll(){var e=[],t=this._getRowKey();this._dataSource&&S(this._dataSource,t,this.childrenColumnName,e),this.expandedRowKeys=e}getModifyColumns(){var e=this._columns;return this._columns&&this.hiddenColumns&&(e=this._columns.filter((e=>{var t,i;return!(null!==(t=this.hiddenColumns)&&void 0!==t&&t.includes(null!==(i=e.dataIndex)&&void 0!==i?i:e.key))}))),!1===this.sortable&&(e=(0,m.map)(e,(e=>(e.sorter=!1,e)))),e}render(){return this.frontSearch&&(this._dataSource=this.handleFrontendDataChange(this._pureSource,this._columns)),this._initConfigProps(),u().createElement(G,{shadowRoot:this.shadowRoot,dataSource:this._dataSource||[],columns:this.getModifyColumns(),configProps:this._finalConfigProps,error:this._error,onChange:this._handleOnChange,showCard:this.showCard,showHeader:this.showHeader,expandedRowBrick:this.expandedRowBrick,expandIconAsCell:this.expandIconAsCell,expandIconColumnIndex:this.expandIconColumnIndex,expandRowByClick:this.expandRowByClick,defaultExpandAllRows:this.defaultExpandAllRows,onExpand:this._handleOnExpand,onExpandedRowsChange:this._handleOnExpandedRowsChange,expandedRowKeys:this.expandedRowKeys,rowKey:this._getRowKey(),childrenColumnName:this.childrenColumnName,tableDraggable:this.tableDraggable||this.draggable,onDrag:this._handleOnDrag,zebraPattern:this.zebraPattern,expandIcon:this.expandIcon,scroll:this.scrollConfigs,optimizedColumns:this.optimizedColumns,ellipsisInfo:this.ellipsisInfo,thTransparent:this.thTransparent,xSmallSizeTable:"x-small"==this.size})}_test_only_getOriginalDataSource(){return this._originalDataSource}updateData(e){this._dataSource=e.detail,this._error=null,this._render()}updateError(e){this._error=e.detail,this._render()}set selectUpdateEventName(e){this._selectUpdateEventName=e}set selectUpdateEventDetailKeys(e){this._selectUpdateEventDetailKeys=e}set selectUpdateEventDetailField(e){this._selectUpdateEventDetailField=e}set selectUpdateEventDetailExtra(e){this._selectUpdateEventDetailExtra=e}}Y=va,({e:[ee,te,ie,ae,se,ne,re,le,oe,he,de,ce,pe,ue,Ae,ge,we,me,ye,fe,ve,be,ke,xe,Ce,Se,Ee,Me,Re,We,_e,Ne,Be,De,Ie,Ke,Pe,ze,Te,Ue,Fe,Le,He,qe,Oe,je,$e,Qe,Ze,Ve,Ge,Ye,Je,Xe,et,tt,it,at,st,nt,rt,lt,ot,ht,dt,ct,pt,ut,At,gt,wt,mt,yt,ft,vt,bt,kt,xt,Ct,St,Et,Mt,Rt,Wt,_t,Nt,Bt,Dt,It,Kt,Pt,zt,Tt,Ut,Ft,Lt,Ht,qt,Ot,jt,$t,Qt,Zt,Vt,Gt,Yt,Jt,Xt,ei,ti,ii,ai,si,ni,ri,li,oi,hi,di,ci,pi,ui,J],c:[Ai,X]}=(0,c.A)(Y,[gi("eo-table",{styleTexts:[w.A],alias:["advanced.general-table"]})],[[mi({type:"page.update"}),1,"pageUpdate",e=>(0,d.A)(fi,e),(e,t)=>(0,h.A)(fi,e,t)],[mi({type:"filter.update"}),1,"filterUpdate",e=>(0,d.A)(bi,e),(e,t)=>(0,h.A)(bi,e,t)],[mi({type:"select.update"}),1,"selectUpdate",e=>(0,d.A)(ki,e),(e,t)=>(0,h.A)(ki,e,t)],[mi({type:"select.row.keys.update"}),1,"selectRowKeysUpdate",e=>(0,d.A)(xi,e),(e,t)=>(0,h.A)(xi,e,t)],[mi({type:"sort.update",cancelable:!0}),1,"sortUpdate",e=>(0,d.A)(Ci,e),(e,t)=>(0,h.A)(Ci,e,t)],[mi({type:"row.expand"}),1,"rowExpand",e=>(0,d.A)(Si,e),(e,t)=>(0,h.A)(Si,e,t)],[mi({type:"expand.rows.change"}),1,"expandRowsChange",e=>(0,d.A)(Ei,e),(e,t)=>(0,h.A)(Ei,e,t)],[mi({type:"row.drag"}),1,"rowDrag",e=>(0,d.A)(Mi,e),(e,t)=>(0,h.A)(Mi,e,t)],[wi({type:Boolean}),1,"showCard"],[wi({attribute:!1}),1,"rowSelection"],[wi(),1,"rowKey"],[wi({attribute:!1}),1,"hiddenColumns"],[wi({type:Boolean}),1,"showSelectInfo"],[wi({attribute:!1}),1,"filters"],[wi({attribute:!1}),1,"configProps"],[wi(),1,"sort"],[wi({attribute:!1}),1,"order"],[wi({attribute:!1}),1,"rowDisabledConfig"],[wi({attribute:!1}),1,"expandedRowBrick"],[wi({attribute:!1}),1,"expandIcon"],[wi({attribute:!1}),1,"expandIconAsCell"],[wi({type:Number}),1,"expandIconColumnIndex"],[wi({type:Boolean}),1,"expandRowByClick"],[wi({attribute:!1}),1,"optimizedColumns"],[wi({attribute:!1}),1,"stripEmptyExpandableChildren"],[wi({type:Boolean}),1,"defaultExpandAllRows"],[wi({type:Boolean}),1,"ellipsisInfo"],[wi({attribute:!1}),1,"expandedRowKeys"],[wi({type:Boolean}),1,"selectAllChildren"],[wi({type:Boolean}),1,"defaultSelectAll"],[wi({attribute:!1}),1,"childrenColumnName"],[wi({attribute:!1}),1,"sortable"],[wi({type:Boolean}),1,"frontSearch"],[wi(),1,"frontSearchQuery"],[wi({type:Boolean}),1,"exactSearch"],[wi({attribute:!1}),1,"frontSearchFilterKeys"],[wi({type:Number}),1,"page"],[wi({type:Number}),1,"pageSize"],[wi({attribute:!1}),1,"scrollConfigs"],[wi(),1,"qField"],[wi({type:Boolean}),1,"tableDraggable"],[wi({type:Boolean}),1,"zebraPattern"],[wi({type:Boolean}),1,"storeCheckedByUrl"],[wi({attribute:!1}),1,"extraRows"],[wi({type:Boolean}),1,"autoSelectParentWhenAllChildrenSelected"],[wi({type:Boolean}),1,"thTransparent"],[wi({type:Boolean}),1,"showHeader"],[wi({attribute:!1}),1,"pagination"],[wi(),1,"size"],[wi({attribute:!1}),1,"type"],[wi({type:Boolean}),1,"shouldUpdateUrlParams"],[wi({type:Boolean}),1,"shouldRenderWhenUrlParamsUpdate"],[wi({attribute:!1}),1,"selectedRowKeys"],[yi(),2,"filterSourceData"],[yi(),2,"expandAll"]],0,(e=>ya.has((0,l.A)(e))),g.ReactNextElement)),X();var ba,ka,xa,Ca,Sa,Ea,Ma,Ra,Wa,_a,Na=i(16768),Ba=i(97039),Da=i(99492),{method:Ia,property:Ka}=(0,A.createDecorators)(),Pa=new WeakMap,za=new WeakSet,Ta=new WeakMap,Ua=new WeakMap,Fa=new WeakMap,La=new WeakMap,Ha=new WeakMap,qa=new WeakMap;class Oa extends g.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,za),(0,r.A)(this,Pa,(ka(this),!1)),(0,r.A)(this,Ta,"normal"),(0,r.A)(this,Ua,!1),(0,r.A)(this,Fa,xa(this)),(0,r.A)(this,La,(Ca(this),Sa(this))),(0,r.A)(this,Ha,(Ea(this),Ma(this))),(0,r.A)(this,qa,(Ra(this),Wa(this))),_a(this)}get isFormItemElement(){return!0}set validateState(e){(0,Da.A)(za,Za,this,e),this._render()}get validateState(){return(0,o.A)(za,this,Qa)}set notRender(e){this.hidden=e,(0,Da.A)(za,$a,this,e),this._render()}get notRender(){return(0,o.A)(za,this,ja)}get $bindFormItem(){return(0,o.A)(za,this,Va)}set $bindFormItem(e){(0,Da.A)(za,Ga,this,e),this._render()}get helpBrick(){return(0,d.A)(Fa,this)}set helpBrick(e){(0,h.A)(Fa,this,e)}get labelBrick(){return(0,d.A)(La,this)}set labelBrick(e){(0,h.A)(La,this,e)}get labelCol(){return(0,d.A)(Ha,this)}set labelCol(e){(0,h.A)(Ha,this,e)}get wrapperCol(){return(0,d.A)(qa,this)}set wrapperCol(e){(0,h.A)(qa,this,e)}setNotRender(e){this.notRender=e}getFormElement(){for(var e=this;(e=e.parentNode)&&e&&!e.isFormElement;);return e}}function ja(e){return(0,d.A)(Pa,e)}function $a(e,t){(0,h.A)(Pa,e,t)}function Qa(e){return(0,d.A)(Ta,e)}function Za(e,t){(0,h.A)(Ta,e,t)}function Va(e){return(0,d.A)(Ua,e)}function Ga(e,t){(0,h.A)(Ua,e,t)}ba=Oa,[xa,Ca,Sa,Ea,Ma,Ra,Wa,_a,ka]=(0,c.A)(ba,[],[[Ka({attribute:!1}),1,"helpBrick"],[Ka({attribute:!1}),1,"labelBrick"],[Ka({attribute:!1}),1,"labelCol"],[Ka({attribute:!1}),1,"wrapperCol"],[Ia(),2,"setNotRender"],[Ia(),2,"getFormElement"]],0,void 0,g.ReactNextElement).e;var Ya,Ja,Xa,es,ts,is,as,ss,ns,rs,ls,os,hs,ds,cs,ps,us,As,gs,ws,ms,ys,fs,vs,bs,ks,xs,Cs,Ss,Es,Ms,Rs,Ws,_s,Ns,Bs,Ds,Is,Ks,Ps,zs,Ts,Us,Fs=i(71058),{defineElement:Ls,property:Hs,event:qs}=(0,A.createDecorators)(),Os=(0,g.wrapBrick)("eo-icon"),js=(0,g.wrapBrick)("eo-form-item"),$s=new WeakMap,Qs=new WeakMap,Zs=new WeakMap,Vs=new WeakMap,Gs=new WeakMap,Ys=new WeakMap,Js=new WeakMap,Xs=new WeakMap,en=new WeakMap,tn=new WeakMap,an=new WeakMap,sn=new WeakMap,nn=new WeakMap,rn=new WeakMap,ln=new WeakMap,on=new WeakMap,hn=new WeakMap,dn=new WeakMap,cn=new WeakMap,pn=new WeakSet;function un(e){var{shadowRoot:t,options:i,fieldNames:a,value:s,placeholder:n,disabled:r,multiple:l,allowClear:o,showSearch:h,expandTrigger:d,size:c,limit:A,popupPlacement:g,cascaderStyle:w,suffixIcon:m,maxTagCount:y,onChange:f}=e,v=(0,P.useCurrentTheme)(),b=(0,p.useMemo)((()=>(0,z.VC)()),[]);return u().createElement(k.Ay,{theme:{algorithm:"dark-v2"===v?Na.A.darkAlgorithm:Na.A.defaultAlgorithm}},u().createElement(z.N7,{container:t,cache:b},u().createElement(Ba.A,{getPopupContainer:e=>e.parentElement,allowClear:o,disabled:r,multiple:l,expandTrigger:d,fieldNames:a,placeholder:n,size:c,showSearch:h&&{limit:A,filter:(e,t)=>{for(var i,s=(null==a?void 0:a.label)||"label",n=e.split(" ").filter((e=>e)).map((e=>e.toLocaleLowerCase())),r=function(e){if(!t.some((t=>t[s].toLowerCase().includes(n[e]))))return{v:!1}},l=0;l<n.length;l++)if(i=r(l))return i.v;return!0}},placement:g,style:w,suffixIcon:m&&u().createElement(Os,m),maxTagCount:y,value:s,options:i,onChange:(e,t)=>null==f?void 0:f(e,t)})))}Ya=class extends Oa{constructor(){super(...arguments),(0,n.A)(this,pn),(0,r.A)(this,$s,Xa(this)),(0,r.A)(this,Qs,(es(this),ts(this))),(0,r.A)(this,Zs,(is(this),as(this))),(0,r.A)(this,Vs,(ss(this),ns(this))),(0,r.A)(this,Gs,(rs(this),ls(this,{label:"label",value:"value",children:"children"}))),(0,r.A)(this,Ys,(os(this),hs(this))),(0,r.A)(this,Js,(ds(this),cs(this))),(0,r.A)(this,Xs,(ps(this),us(this))),(0,r.A)(this,en,(As(this),gs(this))),(0,r.A)(this,tn,(ws(this),ms(this,!0))),(0,r.A)(this,an,(ys(this),fs(this,!0))),(0,r.A)(this,sn,(vs(this),bs(this))),(0,r.A)(this,nn,(ks(this),xs(this,"click"))),(0,r.A)(this,rn,(Cs(this),Ss(this,"bottomLeft"))),(0,r.A)(this,ln,(Es(this),Ms(this))),(0,r.A)(this,on,(Rs(this),Ws(this,50))),(0,r.A)(this,hn,(_s(this),Ns(this))),(0,r.A)(this,dn,(Bs(this),Ds(this))),(0,r.A)(this,cn,(Is(this),Ks(this))),(0,s.A)(this,"handleOnChange",(Ts(this),(e,t)=>{this.value=e,Promise.resolve().then((()=>{(0,o.A)(pn,this,Ps).emit({value:e,selectedOptions:t})}))}))}get name(){return(0,d.A)($s,this)}set name(e){(0,h.A)($s,this,e)}get label(){return(0,d.A)(Qs,this)}set label(e){(0,h.A)(Qs,this,e)}get required(){return(0,d.A)(Zs,this)}set required(e){(0,h.A)(Zs,this,e)}get options(){return(0,d.A)(Vs,this)}set options(e){(0,h.A)(Vs,this,e)}get fieldNames(){return(0,d.A)(Gs,this)}set fieldNames(e){(0,h.A)(Gs,this,e)}get value(){return(0,d.A)(Ys,this)}set value(e){(0,h.A)(Ys,this,e)}get placeholder(){return(0,d.A)(Js,this)}set placeholder(e){(0,h.A)(Js,this,e)}get multiple(){return(0,d.A)(Xs,this)}set multiple(e){(0,h.A)(Xs,this,e)}get disabled(){return(0,d.A)(en,this)}set disabled(e){(0,h.A)(en,this,e)}get allowClear(){return(0,d.A)(tn,this)}set allowClear(e){(0,h.A)(tn,this,e)}get showSearch(){return(0,d.A)(an,this)}set showSearch(e){(0,h.A)(an,this,e)}get suffixIcon(){return(0,d.A)(sn,this)}set suffixIcon(e){(0,h.A)(sn,this,e)}get expandTrigger(){return(0,d.A)(nn,this)}set expandTrigger(e){(0,h.A)(nn,this,e)}get popupPlacement(){return(0,d.A)(rn,this)}set popupPlacement(e){(0,h.A)(rn,this,e)}get size(){return(0,d.A)(ln,this)}set size(e){(0,h.A)(ln,this,e)}get limit(){return(0,d.A)(on,this)}set limit(e){(0,h.A)(on,this,e)}get maxTagCount(){return(0,d.A)(hn,this)}set maxTagCount(e){(0,h.A)(hn,this,e)}get cascaderStyle(){return(0,d.A)(dn,this)}set cascaderStyle(e){(0,h.A)(dn,this,e)}render(){return u().createElement(js,{curElement:this,formElement:this.getFormElement(),name:this.name,label:this.label,required:this.required,notRender:this.notRender,trigger:"handleOnChange"},u().createElement(un,{shadowRoot:this.shadowRoot,options:this.options,fieldNames:this.fieldNames,value:this.value,multiple:this.multiple,placeholder:this.placeholder,disabled:this.disabled,allowClear:this.allowClear,showSearch:this.showSearch,expandTrigger:this.expandTrigger,suffixIcon:this.suffixIcon,size:this.size,limit:this.limit,popupPlacement:this.popupPlacement,maxTagCount:this.maxTagCount,cascaderStyle:this.cascaderStyle,onChange:this.handleOnChange}))}},({e:[Xa,es,ts,is,as,ss,ns,rs,ls,os,hs,ds,cs,ps,us,As,gs,ws,ms,ys,fs,vs,bs,ks,xs,Cs,Ss,Es,Ms,Rs,Ws,_s,Ns,Bs,Ds,Is,Ks,Ps,zs,Ts],c:[Us,Ja]}=(0,c.A)(Ya,[Ls("eo-cascader",{alias:["advanced.general-cascader"],styleTexts:[Fs.A]})],[[Hs(),1,"name"],[Hs(),1,"label"],[Hs({type:Boolean}),1,"required"],[Hs({attribute:!1}),1,"options"],[Hs({attribute:!1}),1,"fieldNames"],[Hs({attribute:!1}),1,"value"],[Hs(),1,"placeholder"],[Hs({type:Boolean}),1,"multiple"],[Hs({type:Boolean}),1,"disabled"],[Hs({type:Boolean}),1,"allowClear"],[Hs({type:Boolean}),1,"showSearch"],[Hs({attribute:!1}),1,"suffixIcon"],[Hs(),1,"expandTrigger"],[Hs(),1,"popupPlacement"],[Hs(),1,"size"],[Hs({type:Number}),1,"limit"],[Hs({attribute:!1}),1,"maxTagCount"],[Hs({attribute:!1}),1,"cascaderStyle"],[qs({type:"cascader.change"}),1,"changeEvent",e=>(0,d.A)(cn,e),(e,t)=>(0,h.A)(cn,e,t)]],0,(e=>pn.has((0,l.A)(e))),Oa)),Ja();var An,gn,wn,mn,yn,fn,vn,bn,kn,xn,Cn,Sn,En,Mn,Rn,Wn,_n,Nn,Bn,Dn,In,Kn,Pn,zn,Tn,Un,Fn,Ln,Hn,qn,On,jn,$n,Qn,Zn,Vn,Gn,Yn,Jn,Xn,er,tr,ir,ar,sr,nr,rr,lr,or,hr,dr,cr,pr,ur,Ar,gr,wr,mr,yr,fr,vr,br,kr,xr,Cr,Sr,Er,Mr,Rr,Wr,_r,Nr,Br=i(81634),Dr=i(49385),{defineElement:Ir,property:Kr,method:Pr,event:zr}=(i(34612),(0,A.createDecorators)()),Tr=new WeakMap,Ur=new WeakMap,Fr=new WeakMap,Lr=new WeakMap,Hr=new WeakMap,qr=new WeakMap,Or=new WeakMap,jr=new WeakMap,$r=new WeakMap,Qr=new WeakMap,Zr=new WeakMap,Vr=new WeakMap,Gr=new WeakMap,Yr=new WeakMap,Jr=new WeakMap,Xr=new WeakMap,el=new WeakMap,tl=new WeakMap,il=new WeakMap,al=new WeakMap,sl=new WeakMap,nl=new WeakMap,rl=new WeakMap,ll=new WeakSet,ol=new WeakMap,hl=new WeakMap,dl=new WeakMap,cl=new WeakMap,pl=new WeakMap,ul=new WeakMap,Al=new WeakMap,gl=new WeakMap,wl=new WeakMap,ml=new WeakMap,yl=new WeakMap,fl=new WeakMap,vl=new WeakMap;class bl extends g.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,ll),(0,r.A)(this,Tr,(gn(this),(0,p.createRef)())),(0,r.A)(this,Ur,mn(this,"key")),(0,r.A)(this,Fr,(yn(this),fn(this))),(0,r.A)(this,Lr,(vn(this),bn(this))),(0,r.A)(this,Hr,(kn(this),xn(this))),(0,r.A)(this,qr,(Cn(this),Sn(this))),(0,r.A)(this,Or,(En(this),Mn(this))),(0,r.A)(this,jr,(Rn(this),Wn(this))),(0,r.A)(this,$r,(_n(this),Nn(this))),(0,r.A)(this,Qr,(Bn(this),Dn(this))),(0,r.A)(this,Zr,(In(this),Kn(this))),(0,r.A)(this,Vr,(Pn(this),zn(this))),(0,r.A)(this,Gr,(Tn(this),Un(this))),(0,r.A)(this,Yr,(Fn(this),Ln(this))),(0,r.A)(this,Jr,(Hn(this),qn(this,"children"))),(0,r.A)(this,Xr,(On(this),jn(this))),(0,r.A)(this,el,($n(this),Qn(this))),(0,r.A)(this,tl,(Zn(this),Vn(this,"large"))),(0,r.A)(this,il,(Gn(this),Yn(this,!0))),(0,r.A)(this,al,void Jn(this)),(0,r.A)(this,sl,Xn(this,{x:!0})),(0,r.A)(this,nl,(er(this),tr(this))),(0,r.A)(this,rl,(ir(this),ar(this))),(0,r.A)(this,ol,(rr(this),e=>{(0,o.A)(ll,this,sr).emit(e)})),(0,r.A)(this,hl,lr(this)),(0,r.A)(this,dl,(dr(this),e=>{(0,o.A)(ll,this,or).emit(e)})),(0,r.A)(this,cl,cr(this)),(0,r.A)(this,pl,(Ar(this),e=>{(0,o.A)(ll,this,pr).emit(e)})),(0,r.A)(this,ul,gr(this)),(0,r.A)(this,Al,(yr(this),e=>{(0,o.A)(ll,this,wr).emit(e)})),(0,r.A)(this,gl,fr(this)),(0,r.A)(this,wl,(kr(this),e=>{(0,o.A)(ll,this,vr).emit(e)})),(0,r.A)(this,ml,xr(this)),(0,r.A)(this,yl,(Er(this),e=>{(0,o.A)(ll,this,Cr).emit(e)})),(0,r.A)(this,fl,Mr(this)),(0,r.A)(this,vl,(_r(this),e=>{(0,o.A)(ll,this,Rr).emit(e)}))}get rowKey(){return(0,d.A)(Ur,this)}set rowKey(e){(0,h.A)(Ur,this,e)}get columns(){return(0,d.A)(Fr,this)}set columns(e){(0,h.A)(Fr,this,e)}get cell(){return(0,d.A)(Lr,this)}set cell(e){(0,h.A)(Lr,this,e)}get dataSource(){return(0,d.A)(Hr,this)}set dataSource(e){(0,h.A)(Hr,this,e)}get frontSearch(){return(0,d.A)(qr,this)}set frontSearch(e){(0,h.A)(qr,this,e)}get pagination(){return(0,d.A)(Or,this)}set pagination(e){(0,h.A)(Or,this,e)}get multiSort(){return(0,d.A)(jr,this)}set multiSort(e){(0,h.A)(jr,this,e)}get sort(){return(0,d.A)($r,this)}set sort(e){(0,h.A)($r,this,e)}get rowSelection(){return(0,d.A)(Qr,this)}set rowSelection(e){(0,h.A)(Qr,this,e)}get selectedRowKeys(){return(0,d.A)(Zr,this)}set selectedRowKeys(e){(0,h.A)(Zr,this,e)}get hiddenColumns(){return(0,d.A)(Vr,this)}set hiddenColumns(e){(0,h.A)(Vr,this,e)}get expandable(){return(0,d.A)(Gr,this)}set expandable(e){(0,h.A)(Gr,this,e)}get expandedRowKeys(){return(0,d.A)(Yr,this)}set expandedRowKeys(e){(0,h.A)(Yr,this,e)}get childrenColumnName(){return(0,d.A)(Jr,this)}set childrenColumnName(e){(0,h.A)(Jr,this,e)}get rowDraggable(){return(0,d.A)(Xr,this)}set rowDraggable(e){(0,h.A)(Xr,this,e)}get searchFields(){return(0,d.A)(el,this)}set searchFields(e){(0,h.A)(el,this,e)}get size(){return(0,d.A)(tl,this)}set size(e){(0,h.A)(tl,this,e)}get showHeader(){return(0,d.A)(il,this)}set showHeader(e){(0,h.A)(il,this,e)}get bordered(){return(0,d.A)(al,this)}set bordered(e){(0,h.A)(al,this,e)}get scrollConfig(){return(0,d.A)(sl,this)}set scrollConfig(e){(0,h.A)(sl,this,e)}get optimizedColumns(){return(0,d.A)(nl,this)}set optimizedColumns(e){(0,h.A)(nl,this,e)}search(e){var t;null===(t=(0,d.A)(Tr,this).current)||void 0===t||t.search(e)}render(){return u().createElement(Dr.F,{ref:(0,d.A)(Tr,this),shadowRoot:this.shadowRoot,rowKey:this.rowKey,columns:this.columns,cell:this.cell,dataSource:this.dataSource,frontSearch:this.frontSearch,pagination:this.pagination,multiSort:this.multiSort,sort:this.sort,rowSelection:this.rowSelection,selectedRowKeys:this.selectedRowKeys,hiddenColumns:this.hiddenColumns,expandable:this.expandable,expandedRowKeys:this.expandedRowKeys,childrenColumnName:this.childrenColumnName,rowDraggable:this.rowDraggable,searchFields:this.searchFields,size:this.size,showHeader:this.showHeader,bordered:this.bordered,scrollConfig:this.scrollConfig,optimizedColumns:this.optimizedColumns,onPageChange:(0,d.A)(ol,this),onPageSizeChange:(0,d.A)(dl,this),onSort:(0,d.A)(pl,this),onRowSelect:(0,d.A)(Al,this),onRowExpand:(0,d.A)(wl,this),onExpandedRowsChange:(0,d.A)(yl,this),onRowDrag:(0,d.A)(vl,this)})}}An=bl,({e:[mn,yn,fn,vn,bn,kn,xn,Cn,Sn,En,Mn,Rn,Wn,_n,Nn,Bn,Dn,In,Kn,Pn,zn,Tn,Un,Fn,Ln,Hn,qn,On,jn,$n,Qn,Zn,Vn,Gn,Yn,Jn,Xn,er,tr,ir,ar,sr,nr,rr,lr,or,hr,dr,cr,pr,ur,Ar,gr,wr,mr,yr,fr,vr,br,kr,xr,Cr,Sr,Er,Mr,Rr,Wr,_r,gn],c:[Nr,wn]}=(0,c.A)(An,[Ir("eo-next-table",{styleTexts:[Br.A]})],[[Kr(),1,"rowKey"],[Kr({attribute:!1}),1,"columns"],[Kr({attribute:!1}),1,"cell"],[Kr({attribute:!1}),1,"dataSource"],[Kr({type:Boolean}),1,"frontSearch"],[Kr({attribute:!1}),1,"pagination"],[Kr({type:Boolean}),1,"multiSort"],[Kr({attribute:!1}),1,"sort"],[Kr({attribute:!1}),1,"rowSelection"],[Kr({attribute:!1}),1,"selectedRowKeys"],[Kr({attribute:!1}),1,"hiddenColumns"],[Kr({attribute:!1}),1,"expandable"],[Kr({attribute:!1}),1,"expandedRowKeys"],[Kr(),1,"childrenColumnName"],[Kr({type:Boolean}),1,"rowDraggable"],[Kr({attribute:!1}),1,"searchFields"],[Kr(),1,"size"],[Kr({type:Boolean}),1,"showHeader"],[Kr({attribute:!1}),1,"scrollConfig"],[Kr({attribute:!1}),1,"optimizedColumns"],[Pr(),2,"search"],[zr({type:"page.change"}),1,"pageChangeEvent",e=>(0,d.A)(rl,e),(e,t)=>(0,h.A)(rl,e,t)],[zr({type:"page.size.change"}),1,"pageSizeChangeEvent",e=>(0,d.A)(hl,e),(e,t)=>(0,h.A)(hl,e,t)],[zr({type:"sort.change"}),1,"sortChangeEvent",e=>(0,d.A)(cl,e),(e,t)=>(0,h.A)(cl,e,t)],[zr({type:"row.select"}),1,"rowSelectEvent",e=>(0,d.A)(ul,e),(e,t)=>(0,h.A)(ul,e,t)],[zr({type:"row.expand"}),1,"rowExpandEvent",e=>(0,d.A)(gl,e),(e,t)=>(0,h.A)(gl,e,t)],[zr({type:"expanded.rows.change"}),1,"expandedRowsChangeEvent",e=>(0,d.A)(ml,e),(e,t)=>(0,h.A)(ml,e,t)],[zr({type:"row.drag"}),1,"rowDragEvent",e=>(0,d.A)(fl,e),(e,t)=>(0,h.A)(fl,e,t)]],0,(e=>vl.has((0,l.A)(e))),g.ReactNextElement)),wn();var kl,xl,Cl,Sl,El,Ml,Rl,Wl,_l,Nl,Bl,Dl,Il,Kl,Pl,zl,Tl,Ul,Fl,Ll=i(45833),Hl=i(91116),{defineElement:ql,property:Ol,event:jl}=(0,A.createDecorators)(),$l=(0,g.wrapBrick)("eo-button"),Ql=(0,g.wrapBrick)("eo-icon"),Zl=(0,g.wrapBrick)("eo-checkbox",{onChange:"change"}),Vl=new WeakMap,Gl=new WeakMap,Yl=new WeakMap,Jl=new WeakMap,Xl=new WeakMap,eo=new WeakSet,to=new WeakMap,io=new WeakMap,ao=new WeakMap;class so extends g.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,eo),(0,r.A)(this,Vl,Cl(this)),(0,r.A)(this,Gl,(Sl(this),El(this))),(0,r.A)(this,Yl,(Ml(this),Rl(this))),(0,r.A)(this,Jl,(Wl(this),_l(this))),(0,r.A)(this,Xl,(Nl(this),Bl(this))),(0,r.A)(this,to,(Kl(this),e=>{(0,o.A)(eo,this,Dl).emit(e)})),(0,r.A)(this,io,Pl(this)),(0,r.A)(this,ao,(Ul(this),()=>{(0,o.A)(eo,this,zl).emit()}))}get cardTitle(){return(0,d.A)(Vl,this)}set cardTitle(e){(0,h.A)(Vl,this,e)}get isEdit(){return(0,d.A)(Gl,this)}set isEdit(e){(0,h.A)(Gl,this,e)}get layouts(){return(0,d.A)(Yl,this)}set layouts(e){(0,h.A)(Yl,this,e)}get componentList(){return(0,d.A)(Jl,this)}set componentList(e){(0,h.A)(Jl,this,e)}render(){return u().createElement(ro,{cardTitle:this.cardTitle,layouts:this.layouts,componentList:this.componentList,isEdit:this.isEdit,onSave:(0,d.A)(to,this),onCancel:(0,d.A)(ao,this)})}}kl=so,({e:[Cl,Sl,El,Ml,Rl,Wl,_l,Nl,Bl,Dl,Il,Kl,Pl,zl,Tl,Ul],c:[Fl,xl]}=(0,c.A)(kl,[ql("eo-workbench-layout",{styleTexts:[Hl.A]})],[[Ol(),1,"cardTitle"],[Ol({type:Boolean}),1,"isEdit"],[Ol({attribute:!1}),1,"layouts"],[Ol({attribute:!1}),1,"componentList"],[jl({type:"save"}),1,"saveLayoutEvent",e=>(0,d.A)(Xl,e),(e,t)=>(0,h.A)(Xl,e,t)],[jl({type:"cancel"}),1,"cancelEvent",e=>(0,d.A)(io,e),(e,t)=>(0,h.A)(io,e,t)]],0,(e=>ao.has((0,l.A)(e))),g.ReactNextElement)),xl();var no=e=>null!=e&&e.includes(":")?e.split(":")[0]:e;function ro(e){var{cardTitle:t="卡片列表",layouts:i,componentList:s=[],isEdit:n,onSave:r,onCancel:l}=e,o=(0,p.useMemo)((()=>(0,Ll.WidthProvider)(Ll.Responsive)),[]),h=(0,p.useRef)(null),d=(0,p.useRef)(),c=(0,p.useRef)(null),[A,g]=(0,p.useState)(null!=i?i:[]),[w,m]=(0,p.useState)(3),[y,f]=(0,p.useState)(),v=(0,p.useCallback)((e=>{d.current||(d.current=e);for(var t=!0,i=function(){var{x:i,w:a,y:n,h:r,i:l,minH:o}=e[s];if(a>1&&i>0)return t=!1,1;if(1===a&&i<2){var h,d=e.find((e=>e.i!==l&&1===e.w&&e.y===n&&i<2));d&&(e[s].minH=null!==(h=e[s].minH)&&void 0!==h?h:r,e[s].h=Math.max(d.h,r))}else e[s].h=null!=o?o:r,e[s].minH=void 0},s=0;s<e.length&&!i();s++);t?d.current=e:g((e=>null==e?void 0:e.map((e=>{var t,i=null===(t=d.current)||void 0===t?void 0:t.find((t=>no(t.i)===no(e.i))),s="".concat(no(e.i),":").concat(Math.random());return(0,a.A)((0,a.A)({},i),{},{i:s})}))))}),[]),b=(0,p.useCallback)((e=>{var t=e.detail.map((e=>e.value)),i=A.map((e=>no(e.i))),s=e.detail.filter((e=>!i.includes(e.key))).map((e=>(0,a.A)((0,a.A)({},e.position),{},{x:e.w>1?0:2*A.length%w,y:1/0})));g((e=>e.filter((e=>t.includes(no(e.i)))).concat(s)))}),[A,w]),k=(0,p.useCallback)((()=>{var e;null==r||r((null!==(e=d.current)&&void 0!==e?e:[]).map((e=>(0,a.A)((0,a.A)({},e),{},{i:no(e.i)}))))}),[r]),x=(0,p.useCallback)(((e,t)=>{var i,a;e.stopPropagation(),g(null!==(i=null===(a=d.current)||void 0===a?void 0:a.filter((e=>no(e.i)!==t.key)))&&void 0!==i?i:[])}),[]),C=e=>{e.preventDefault()},S=(0,p.useMemo)((()=>A.map((e=>{var t,i=s.find((t=>t.key===no(e.i)));return i?u().createElement("div",{key:e.i,"data-grid":(0,a.A)((0,a.A)({},null!==(t=i.position)&&void 0!==t?t:{}),e),style:i.style,className:"drag-box"},n&&u().createElement("div",{className:"edit-mask",onMouseDown:C}),u().createElement(P.ReactUseBrick,{useBrick:i.useBrick}),n&&u().createElement(Ql,{icon:"delete",lib:"antd",className:"delete-icon",onClick:e=>x(e,i)})):null})).filter(Boolean)),[s,x,A,n]),E=(0,p.useMemo)((()=>s.map((e=>(0,a.A)((0,a.A)({},e),{},{label:e.title,value:e.key})))),[s]),M=(0,p.useMemo)((()=>A.map((e=>no(e.i)))),[A]),R=(0,p.useCallback)((()=>{if(c&&n){var e,t,{top:i}=null!==(e=null===(t=c.current)||void 0===t||null===(t=t.getClientRects())||void 0===t?void 0:t[0])&&void 0!==e?e:{};void 0!==i&&f({height:document.body.clientHeight-i,overflow:"scroll"})}}),[n]);return(0,p.useEffect)((()=>{if(n)return R(),window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)}}),[n,R]),u().createElement("div",{className:"grid-layout-wrapper",ref:h},n&&u().createElement("div",{className:"component-wrapper"},u().createElement("div",{className:"component-title"},t),u().createElement("div",{className:"component-list"},u().createElement(Zl,{options:E,value:M,onChange:b}),u().createElement("slot",{name:"toolbar"}))),u().createElement("div",{className:"layout-wrapper",ref:c,style:y},n&&u().createElement("div",{className:"actions-wrapper"},u().createElement($l,{type:"primary",onClick:k},"保存"),u().createElement($l,{danger:!0,onClick:()=>{g([])}},"清除"),u().createElement($l,{onClick:()=>{null==l||l()}},"取消")),u().createElement(o,{className:"layout",draggableCancel:".delete-icon,.edit-actions,.ingore-item",breakpoints:{lg:1300,md:1024,sm:768},rowHeight:1,cols:{lg:3,md:3,sm:1},isResizable:!1,isDraggable:n,onDrag:(e,t,i)=>{var a,s=null===(a=h.current)||void 0===a?void 0:a.querySelector(".react-grid-placeholder");s&&(i.w>1&&i.x>0?!s.classList.contains("forbidden")&&s.classList.add("forbidden"):s.classList.contains("forbidden")&&s.classList.remove("forbidden"))},onLayoutChange:v,onBreakpointChange:(e,t)=>{m(t)}},S)))}var lo=i(86330),oo=i(52681),ho=i(29124),co=i(28317),po=i.n(co);function uo(e,t){var i=e?document.querySelector("".concat(e)):document.body;if(!i)throw new Error("target not found: ".concat(e));return new Promise((function(e,a){po()(i,{backgroundColor:t||null,useCORS:!0,allowTaint:!0,scale:window.devicePixelRatio<3?window.devicePixelRatio:2}).then((function(t){e(t)})).catch(a)}))}function Ao(){return Ao=(0,lo.A)((function*(e){var{name:t,fileType:a,bucketName:s,selector:n,backgroundColor:r}=e;switch(a){case"image":var l=yield uo(n,r);if(s){var o=yield function(e){return new Promise((function(t,i){e.toBlob((function(e){e?t(e):i()}))}))}(l),h=new File([o],"".concat(t,".png"),{type:o.type}),d=yield function(e,t){var i=new FormData;i.append("file",e,e.name);var a="".concat((0,y.getBasePath)(),"api/gateway/object_store.object_store.PutObject/api/v1/objectStore/bucket/").concat(t,"/object");return ho.http.request(a,{method:"PUT",body:i})}(h,s);return function(e,t){return"".concat((0,y.getBasePath)(),"api/gateway/logic.object_store_service/api/v1/objectStore/bucket/").concat(e,"/object/").concat(t)}(s,d.data.objectName)}yield function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"image";return new Promise(((i,a)=>{try{var s=e.toDataURL("image/png"),n=new Image;n.onload=function(){var e=document.createElement("canvas");e.width=n.width,e.height=n.height;var i=e.getContext("2d");null==i||i.drawImage(n,0,0,n.width,n.height);var a=e.toDataURL("image/png"),s=document.createElement("a");s.href=a,s.download=t;var r=new MouseEvent("click");s.dispatchEvent(r)},n.src=s,i("succeed")}catch(e){a("failed")}}))}(l,t);break;case"pdf":var{jsPDF:c}=yield i.e(1576).then(i.bind(i,31576)),p=yield uo(n,r),u=p.toDataURL("image/jpeg",1),A=new c(p.width>p.height?"landscape":"portrait","pt",[p.width,p.height]);A.addImage(u,"JPEG",0,0,p.width,p.height),yield A.save("".concat(t,".pdf"),{returnPromise:!0})}})),Ao.apply(this,arguments)}customElements.define("advanced.capture-snapshot",(0,oo.createProviderClass)((function(e){return Ao.apply(this,arguments)})));var go,wo,mo,yo,fo,vo,bo,ko,xo,Co,So,Eo,Mo,Ro,Wo,_o,No,Bo,Do,Io,Ko,Po,zo,To,Uo,Fo,Lo,Ho,qo,Oo,jo,$o,Qo,Zo,Vo,Go,Yo,Jo,Xo,eh,th,ih=i(54299),ah=i(56664),sh=i(39138),{defineElement:nh,property:rh,event:lh}=(0,A.createDecorators)(),oh=new WeakMap,hh=new WeakMap,dh=new WeakMap,ch=new WeakMap,ph=new WeakMap,uh=new WeakMap,Ah=new WeakMap,gh=new WeakMap,wh=new WeakMap,mh=new WeakMap,yh=new WeakMap,fh=new WeakMap,vh=new WeakSet,bh=new WeakMap,kh=new WeakMap,xh=new WeakMap,Ch=new WeakMap,Sh=new WeakMap,Eh=new WeakMap;class Mh extends g.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,vh),(0,r.A)(this,oh,mo(this)),(0,r.A)(this,hh,(yo(this),fo(this))),(0,r.A)(this,dh,(vo(this),bo(this))),(0,r.A)(this,ch,(ko(this),xo(this))),(0,r.A)(this,ph,(Co(this),So(this))),(0,r.A)(this,uh,(Eo(this),Mo(this))),(0,r.A)(this,Ah,(Ro(this),Wo(this))),(0,r.A)(this,gh,(_o(this),No(this))),(0,r.A)(this,wh,(Bo(this),Do(this))),(0,r.A)(this,mh,(Io(this),Ko(this))),(0,r.A)(this,yh,(Po(this),zo(this))),(0,r.A)(this,fh,(To(this),Uo(this))),(0,r.A)(this,bh,(Ho(this),qo(this))),(0,r.A)(this,kh,($o(this),(e,t)=>{(0,o.A)(vh,this,Fo).emit(e),(0,o.A)(vh,this,Oo).emit({checkedKeys:e,halfCheckedKeys:t.halfCheckedKeys})})),(0,r.A)(this,xh,Qo(this)),(0,r.A)(this,Ch,(Go(this),e=>{(0,o.A)(vh,this,Zo).emit(e)})),(0,r.A)(this,Sh,Yo(this)),(0,r.A)(this,Eh,(eh(this),e=>{var{dragNode:t,node:i,dropPosition:a}=e;(0,o.A)(vh,this,Jo).emit({dragNode:t,dropNode:i,dropPosition:a})}))}get dataSource(){return(0,d.A)(oh,this)}set dataSource(e){(0,h.A)(oh,this,e)}get checkable(){return(0,d.A)(hh,this)}set checkable(e){(0,h.A)(hh,this,e)}get selectable(){return(0,d.A)(dh,this)}set selectable(e){(0,h.A)(dh,this,e)}get defaultExpandAll(){return(0,d.A)(ch,this)}set defaultExpandAll(e){(0,h.A)(ch,this,e)}get showLine(){return(0,d.A)(ph,this)}set showLine(e){(0,h.A)(ph,this,e)}get expandedKeys(){return(0,d.A)(uh,this)}set expandedKeys(e){(0,h.A)(uh,this,e)}get checkedKeys(){return(0,d.A)(Ah,this)}set checkedKeys(e){(0,h.A)(Ah,this,e)}get nodeDraggable(){return(0,d.A)(gh,this)}set nodeDraggable(e){(0,h.A)(gh,this,e)}get switcherIcon(){return(0,d.A)(wh,this)}set switcherIcon(e){(0,h.A)(wh,this,e)}get allowDrop(){return(0,d.A)(mh,this)}set allowDrop(e){(0,h.A)(mh,this,e)}get titleSuffixBrick(){return(0,d.A)(yh,this)}set titleSuffixBrick(e){(0,h.A)(yh,this,e)}render(){return u().createElement(Rh,{dataSource:this.dataSource,shadowRoot:this.shadowRoot,checkable:this.checkable,selectable:this.selectable,defaultExpandAll:this.defaultExpandAll,showLine:this.showLine,nodeDraggable:this.nodeDraggable,switcherIcon:this.switcherIcon,expandedKeys:this.expandedKeys,checkedKeys:this.checkedKeys,titleSuffixBrick:this.titleSuffixBrick,onCheck:(0,d.A)(kh,this),onExpand:(0,d.A)(Ch,this),allowDrop:this.allowDrop,onDrop:(0,d.A)(Eh,this)})}}function Rh(e){var{dataSource:t,shadowRoot:i,checkable:a,selectable:s,defaultExpandAll:n,showLine:r,expandedKeys:l,checkedKeys:o,nodeDraggable:h,switcherIcon:d,titleSuffixBrick:c,onCheck:A,onExpand:g,onDrop:w,allowDrop:m}=e,y=(0,P.useCurrentTheme)(),v=(0,p.useMemo)((()=>(0,z.VC)()),[]);return u().createElement(k.Ay,{theme:{algorithm:"dark-v2"===y?Na.A.darkAlgorithm:Na.A.defaultAlgorithm}},u().createElement(z.N7,{container:i,autoClear:!0,cache:v,hashPriority:"high"},u().createElement(ih.A,(0,f.A)({switcherIcon:!1!==d&&("chevron"===d?u().createElement(ah.A,null):void 0)},null!=c&&c.useBrick?{titleRender:e=>u().createElement(u().Fragment,null,e.title,u().createElement("span",{onClick:e=>e.stopPropagation()},u().createElement(P.ReactUseMultipleBricks,{useBrick:c.useBrick,data:e})))}:null,{treeData:t,checkable:a,selectable:s,defaultExpandAll:n,showLine:r,draggable:h},l?{expandedKeys:l}:null,o?{checkedKeys:o}:null,{onCheck:A,onExpand:g,allowDrop:m,onDrop:w}))))}go=Mh,({e:[mo,yo,fo,vo,bo,ko,xo,Co,So,Eo,Mo,Ro,Wo,_o,No,Bo,Do,Io,Ko,Po,zo,To,Uo,Fo,Lo,Ho,qo,Oo,jo,$o,Qo,Zo,Vo,Go,Yo,Jo,Xo,eh],c:[th,wo]}=(0,c.A)(go,[nh("eo-tree",{styleTexts:[sh.A]})],[[rh({attribute:!1}),1,"dataSource"],[rh({type:Boolean}),1,"checkable"],[rh({type:Boolean}),1,"selectable"],[rh({type:Boolean}),1,"defaultExpandAll"],[rh({type:Boolean}),1,"showLine"],[rh({attribute:!1}),1,"expandedKeys"],[rh({attribute:!1}),1,"checkedKeys"],[rh({attribute:!1}),1,"nodeDraggable"],[rh({attribute:!1}),1,"switcherIcon"],[rh({attribute:!1}),1,"allowDrop"],[rh({attribute:!1}),1,"titleSuffixBrick"],[lh({type:"check"}),1,"checkEvent",e=>(0,d.A)(fh,e),(e,t)=>(0,h.A)(fh,e,t)],[lh({type:"check.detail"}),1,"checkDetailEvent",e=>(0,d.A)(bh,e),(e,t)=>(0,h.A)(bh,e,t)],[lh({type:"expand"}),1,"expandEvent",e=>(0,d.A)(xh,e),(e,t)=>(0,h.A)(xh,e,t)],[lh({type:"node.drop"}),1,"dropEvent",e=>(0,d.A)(Sh,e),(e,t)=>(0,h.A)(Sh,e,t)]],0,(e=>Eh.has((0,l.A)(e))),g.ReactNextElement)),wo();var Wh,_h,Nh,Bh,Dh,Ih,Kh,Ph,zh,Th,Uh,Fh,Lh,Hh,qh,Oh,jh,$h,Qh,Zh,Vh,Gh,Yh,Jh,Xh,ed,td,id,ad,sd,nd,rd,ld,od,hd,dd,cd,pd,ud,Ad,gd,wd,md,yd,fd,vd,bd,kd,xd,Cd,Sd,Ed,Md,Rd,Wd,_d,Nd,Bd,Dd,Id,Kd,Pd=i(79484),zd=i(34695),{defineElement:Td,property:Ud,event:Fd}=(0,A.createDecorators)(),Ld=(0,g.wrapBrick)("eo-icon"),Hd=(0,g.wrapBrick)("eo-form-item"),qd=new WeakMap,Od=new WeakMap,jd=new WeakMap,$d=new WeakMap,Qd=new WeakMap,Zd=new WeakMap,Vd=new WeakMap,Gd=new WeakMap,Yd=new WeakMap,Jd=new WeakMap,Xd=new WeakMap,ec=new WeakMap,tc=new WeakMap,ic=new WeakMap,ac=new WeakMap,sc=new WeakMap,nc=new WeakMap,rc=new WeakMap,lc=new WeakMap,oc=new WeakMap,hc=new WeakMap,dc=new WeakMap,cc=new WeakSet,pc=new WeakMap,uc=new WeakMap,Ac=new WeakMap,gc=new WeakMap,wc=new WeakMap,mc=new WeakMap;function yc(e){var{shadowRoot:t,checkable:i,loading:a,treeData:s,treeExpandedKeys:n,treeDefaultExpandAll:r,fieldNames:l,value:o,placeholder:h,disabled:d,multiple:c,allowClear:A,popupPlacement:g,dropdownStyle:w,suffixIcon:m,size:y,maxTagCount:f,onChange:v,onSearch:b,onSelect:x,onTreeExpand:C}=e,S=(0,P.useCurrentTheme)(),E=(0,p.useMemo)((()=>(0,z.VC)()),[]);return u().createElement(k.Ay,{theme:{algorithm:"dark-v2"===S?Na.A.darkAlgorithm:Na.A.defaultAlgorithm}},u().createElement(z.N7,{container:t,cache:E},u().createElement(Pd.A,{getPopupContainer:e=>e.parentElement,allowClear:A,loading:a,disabled:d,multiple:c,fieldNames:l,placeholder:h,placement:g,dropdownStyle:w,suffixIcon:m&&u().createElement(Ld,m),maxTagCount:f,value:o,size:y,treeData:s,treeCheckable:i,treeExpandedKeys:n,treeDefaultExpandAll:r,onChange:v,onSelect:x,onSearch:b,onTreeExpand:C})))}Wh=class extends Oa{constructor(){super(...arguments),(0,n.A)(this,cc),(0,r.A)(this,qd,Nh(this)),(0,r.A)(this,Od,(Bh(this),Dh(this))),(0,r.A)(this,jd,(Ih(this),Kh(this))),(0,r.A)(this,$d,(Ph(this),zh(this))),(0,r.A)(this,Qd,(Th(this),Uh(this))),(0,r.A)(this,Zd,(Fh(this),Lh(this))),(0,r.A)(this,Vd,(Hh(this),qh(this))),(0,r.A)(this,Gd,(Oh(this),jh(this))),(0,r.A)(this,Yd,($h(this),Qh(this))),(0,r.A)(this,Jd,(Zh(this),Vh(this))),(0,r.A)(this,Xd,(Gh(this),Yh(this))),(0,r.A)(this,ec,(Jh(this),Xh(this))),(0,r.A)(this,tc,(ed(this),td(this,!0))),(0,r.A)(this,ic,(id(this),ad(this,!1))),(0,r.A)(this,ac,(sd(this),nd(this))),(0,r.A)(this,sc,(rd(this),ld(this,!0))),(0,r.A)(this,nc,(od(this),hd(this))),(0,r.A)(this,rc,(dd(this),cd(this,"bottomLeft"))),(0,r.A)(this,lc,(pd(this),ud(this))),(0,r.A)(this,oc,(Ad(this),gd(this))),(0,r.A)(this,hc,(wd(this),md(this))),(0,r.A)(this,dc,(yd(this),fd(this))),(0,s.A)(this,"handleOnChange",(kd(this),e=>{this.value=e,(0,o.A)(cc,this,vd).emit({value:e})})),(0,r.A)(this,pc,xd(this)),(0,r.A)(this,uc,(Ed(this),e=>{(0,o.A)(cc,this,Cd).emit(e)})),(0,r.A)(this,Ac,Md(this)),(0,r.A)(this,gc,(_d(this),e=>{(0,o.A)(cc,this,Rd).emit({value:e})})),(0,r.A)(this,wc,Nd(this)),(0,r.A)(this,mc,(Id(this),e=>{(0,o.A)(cc,this,Bd).emit({keys:e})}))}get name(){return(0,d.A)(qd,this)}set name(e){(0,h.A)(qd,this,e)}get label(){return(0,d.A)(Od,this)}set label(e){(0,h.A)(Od,this,e)}get required(){return(0,d.A)(jd,this)}set required(e){(0,h.A)(jd,this,e)}get treeData(){return(0,d.A)($d,this)}set treeData(e){(0,h.A)($d,this,e)}get treeDefaultExpandAll(){return(0,d.A)(Qd,this)}set treeDefaultExpandAll(e){(0,h.A)(Qd,this,e)}get treeExpandedKeys(){return(0,d.A)(Zd,this)}set treeExpandedKeys(e){(0,h.A)(Zd,this,e)}get fieldNames(){return(0,d.A)(Vd,this)}set fieldNames(e){(0,h.A)(Vd,this,e)}get value(){return(0,d.A)(Gd,this)}set value(e){(0,h.A)(Gd,this,e)}get placeholder(){return(0,d.A)(Yd,this)}set placeholder(e){(0,h.A)(Yd,this,e)}get multiple(){return(0,d.A)(Jd,this)}set multiple(e){(0,h.A)(Jd,this,e)}get disabled(){return(0,d.A)(Xd,this)}set disabled(e){(0,h.A)(Xd,this,e)}get checkable(){return(0,d.A)(ec,this)}set checkable(e){(0,h.A)(ec,this,e)}get allowClear(){return(0,d.A)(tc,this)}set allowClear(e){(0,h.A)(tc,this,e)}get loading(){return(0,d.A)(ic,this)}set loading(e){(0,h.A)(ic,this,e)}get filterTreeNode(){return(0,d.A)(ac,this)}set filterTreeNode(e){(0,h.A)(ac,this,e)}get showSearch(){return(0,d.A)(sc,this)}set showSearch(e){(0,h.A)(sc,this,e)}get suffixIcon(){return(0,d.A)(nc,this)}set suffixIcon(e){(0,h.A)(nc,this,e)}get popupPlacement(){return(0,d.A)(rc,this)}set popupPlacement(e){(0,h.A)(rc,this,e)}get size(){return(0,d.A)(lc,this)}set size(e){(0,h.A)(lc,this,e)}get maxTagCount(){return(0,d.A)(oc,this)}set maxTagCount(e){(0,h.A)(oc,this,e)}get dropdownStyle(){return(0,d.A)(hc,this)}set dropdownStyle(e){(0,h.A)(hc,this,e)}render(){return u().createElement(Hd,{curElement:this,formElement:this.getFormElement(),name:this.name,label:this.label,required:this.required,notRender:this.notRender,trigger:"handleOnChange"},u().createElement(yc,{shadowRoot:this.shadowRoot,checkable:this.checkable,treeData:this.treeData,treeDefaultExpandAll:this.treeDefaultExpandAll,fieldNames:this.fieldNames,filterTreeNode:this.filterTreeNode,value:this.value,multiple:this.multiple,placeholder:this.placeholder,loading:this.loading,disabled:this.disabled,allowClear:this.allowClear,showSearch:this.showSearch,suffixIcon:this.suffixIcon,size:this.size,popupPlacement:this.popupPlacement,treeExpandedKeys:this.treeExpandedKeys,maxTagCount:this.maxTagCount,dropdownStyle:this.dropdownStyle,onChange:this.handleOnChange,onSearch:(0,d.A)(uc,this),onSelect:(0,d.A)(gc,this),onTreeExpand:(0,d.A)(mc,this)}))}},({e:[Nh,Bh,Dh,Ih,Kh,Ph,zh,Th,Uh,Fh,Lh,Hh,qh,Oh,jh,$h,Qh,Zh,Vh,Gh,Yh,Jh,Xh,ed,td,id,ad,sd,nd,rd,ld,od,hd,dd,cd,pd,ud,Ad,gd,wd,md,yd,fd,vd,bd,kd,xd,Cd,Sd,Ed,Md,Rd,Wd,_d,Nd,Bd,Dd,Id],c:[Kd,_h]}=(0,c.A)(Wh,[Td("eo-tree-select",{styleTexts:[zd.A]})],[[Ud(),1,"name"],[Ud(),1,"label"],[Ud({type:Boolean}),1,"required"],[Ud({attribute:!1}),1,"treeData"],[Ud({type:Boolean}),1,"treeDefaultExpandAll"],[Ud({attribute:!1}),1,"treeExpandedKeys"],[Ud({attribute:!1}),1,"fieldNames"],[Ud({attribute:!1}),1,"value"],[Ud(),1,"placeholder"],[Ud({type:Boolean}),1,"multiple"],[Ud({type:Boolean}),1,"disabled"],[Ud({type:Boolean}),1,"checkable"],[Ud({type:Boolean}),1,"allowClear"],[Ud({type:Boolean}),1,"loading"],[Ud({attribute:!1}),1,"filterTreeNode"],[Ud({type:Boolean}),1,"showSearch"],[Ud({attribute:!1}),1,"suffixIcon"],[Ud(),1,"popupPlacement"],[Ud(),1,"size"],[Ud({attribute:!1}),1,"maxTagCount"],[Ud({attribute:!1}),1,"dropdownStyle"],[Fd({type:"change"}),1,"changeEvent",e=>(0,d.A)(dc,e),(e,t)=>(0,h.A)(dc,e,t)],[Fd({type:"search"}),1,"searchEvent",e=>(0,d.A)(pc,e),(e,t)=>(0,h.A)(pc,e,t)],[Fd({type:"select"}),1,"selectEvent",e=>(0,d.A)(Ac,e),(e,t)=>(0,h.A)(Ac,e,t)],[Fd({type:"expand"}),1,"expandEvent",e=>(0,d.A)(wc,e),(e,t)=>(0,h.A)(wc,e,t)]],0,(e=>mc.has((0,l.A)(e))),Oa)),_h()},71058:(e,t,i)=>{i.d(t,{A:()=>l});var a=i(36758),s=i.n(a),n=i(40935),r=i.n(n)()(s());r.push([e.id,".ant-select-single .ant-select-selector{border-radius:var(--medius-border-radius)}.ant-select-dropdown{border-radius:var(--medius-border-radius)}.ant-cascader-dropdown .ant-cascader-menu-item{border-radius:var(--small-border-radius)}",""]);const l=r.toString()},2198:(e,t,i)=>{i.d(t,{A:()=>l});var a=i(36758),s=i.n(a),n=i(40935),r=i.n(n)()(s());r.push([e.id,".brickTableOddRow{background-color:var(--color-fill-bg-base-4)}.ant-table-small .ant-table-body{margin:0}.ant-table-small .ant-table-thead{background:var(--antd-table-header-bg)}.ant-table-small .ant-table-row{line-height:26px}.ant-table-tbody > tr.invalidRow > td{background-color:var(--color-error-bg)}.ant-table-tbody > tr.invalidRow:hover > td{background-color:var(--color-error-bg)}.ant-table-tbody > tr.disabledRow > td{background-color:var(--theme-gray-border-color)}.ant-table-tbody > .ant-table-row-selected td{background:var(--antd-table-cell-fixed-body-bg)!important}td.alignTop{vertical-align:top}td.alignBottom{vertical-align:bottom}.expandIconCellHidden .ant-table-row-expand-icon-cell,\n.expandIconCellHidden .ant-table-expand-icon-col{width:1px;min-width:auto}.expandIconCellHidden .ant-table-row-expand-icon-cell > *,\n.expandIconCellHidden .ant-table-expand-icon-col > *{display:none}.expandIconSpan{cursor:pointer;margin-right:9px;color:var(--antd-table-row-expand-icon-color);font-size:11px}.expandIconSpan .anticon{background:var(--antd-table-row-expand-icon-action-bg);border-radius:2px;padding:3px}.tableThTransparent thead.ant-table-thead > tr > th{background:var(--antd-table-header-bg)}.zebraPatternTable .ant-table-tbody tr td{border-bottom:0}.ellipsis{max-width:240px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.totalText{color:var(--antd-pagination-total-text)}.total{font-weight:normal;color:var(--antd-pagination-total-strong-text)}.ant-table-wrapper .ant-table-thead > tr > th{padding:11px 16px;font-size:12px;line-height:20px;border-bottom:0;font-weight:500;color:var(--antd-table-header-color)}.ant-table-wrapper .ant-table-pagination.ant-pagination{margin:24px 0}.xSmallSizeTable .ant-table{line-height:1}.xSmallSizeTable .ant-table .ant-table-selection-col{width:32px}.xSmallSizeTable .ant-table-thead tr th,\n.xSmallSizeTable .ant-table-tbody tr td{padding:0px 2px}.xSmallSizeTable .ant-table-thead tr th:first-child,\n.xSmallSizeTable .ant-table-tbody tr td:first-child{padding:0}",""]);const l=r.toString()},34695:(e,t,i)=>{i.d(t,{A:()=>l});var a=i(36758),s=i.n(a),n=i(40935),r=i.n(n)()(s());r.push([e.id,":host{display:block}:host([hidden]){display:none}.ant-tree-select{width:100%;height:30px}.ant-select-lg{height:38px}.ant-select-sm{height:20px}",""]);const l=r.toString()},39138:(e,t,i)=>{i.d(t,{A:()=>l});var a=i(36758),s=i.n(a),n=i(40935),r=i.n(n)()(s());r.push([e.id,":host{display:block}:host([hidden]){display:none}:host .ant-tree{background-color:transparent}",""]);const l=r.toString()},91116:(e,t,i)=>{i.d(t,{A:()=>d});var a=i(36758),s=i.n(a),n=i(40935),r=i.n(n),l=i(34566),o=i(16322),h=r()(s());h.i(l.A),h.i(o.A),h.push([e.id,":host{display:block}:host([hidden]){display:none}.grid-layout-wrapper{display:flex;height:100%;position:relative}.grid-layout-wrapper .component-wrapper{width:150px;padding:6px 12px;overflow-y:scroll;box-shadow:1px 0 0 0 var(--palette-gray-5);background:var(--color-fill-bg-container-1);z-index:999;position:-webkit-sticky;position:sticky;top:0}.grid-layout-wrapper .component-wrapper .component-title{font-size:16px;padding:6px 0;font-weight:500}.grid-layout-wrapper .component-wrapper .component-list{margin-top:6px}.grid-layout-wrapper .component-wrapper .component-list eo-checkbox::part(checkbox-wrapper){display:flex;flex-wrap:wrap;gap:8px}.grid-layout-wrapper .component-wrapper .component-list eo-checkbox::part(checkbox-option){margin-left:0;width:100%;background:none}.grid-layout-wrapper .layout-wrapper{flex:1}.grid-layout-wrapper .layout-wrapper .layout{max-width:1300px;margin:0 auto}.grid-layout-wrapper .layout-wrapper .actions-wrapper{position:-webkit-sticky;position:sticky;top:0;z-index:999;margin-left:1px;display:flex;gap:8px;justify-content:end;background:var(--color-fill-bg-container-1);padding:8px 12px;box-shadow:0 1px 1px 0 var(--palette-gray-5)}.grid-layout-wrapper .layout-wrapper .edit-mask{position:absolute;left:0;right:0;top:45px;bottom:0;z-index:10}.grid-layout-wrapper .layout-wrapper .delete-icon{position:absolute;right:15px;top:15px;cursor:pointer;font-size:16px;width:30px;height:30px;display:flex;justify-content:center;align-items:center;background:var(--color-fill-bg-container-1);color:var(--color-normal-text)}.grid-layout-wrapper .layout-wrapper .delete-icon:hover{color:var(--color-error)}.grid-layout-wrapper .layout-wrapper .delete-icon:active{color:var(--color-error-active)}.react-grid-item.react-grid-placeholder{background-color:#ddd}.react-grid-item.react-draggable-dragging{pointer-events:none}.react-grid-item.react-grid-placeholder.forbidden{background-color:red}",""]);const d=h.toString()},59224:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+"}}]);
2
- //# sourceMappingURL=9260.47568935.js.map
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunk_next_bricks_advanced=self.webpackChunk_next_bricks_advanced||[]).push([[9496,6330],{86330:(e,r,t)=>{function n(e,r,t,n,u,a,c){try{var i=e[a](c),s=i.value}catch(e){return void t(e)}i.done?r(s):Promise.resolve(s).then(n,u)}function u(e){return function(){var r=this,t=arguments;return new Promise((function(u,a){var c=e.apply(r,t);function i(e){n(c,u,a,i,s,"next",e)}function s(e){n(c,u,a,i,s,"throw",e)}i(void 0)}))}}t.d(r,{A:()=>u})},14223:(e,r,t)=>{function n(e,r){if(null==e)return{};var t,n,u=function(e,r){if(null==e)return{};var t,n,u={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(u[t]=e[t]);return u}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(u[t]=e[t])}return u}t.d(r,{A:()=>n})},97115:(e,r,t)=>{t.r(r),t.d(r,{ReactUseBrick:()=>c,ReactUseMultipleBricks:()=>i,asyncWrapBrick:()=>R,useCurrentApp:()=>v,useCurrentTheme:()=>d,useNavConfig:()=>B,useProvider:()=>O,useRecentApps:()=>f,useRouteRender:()=>p});var n=t(86330),u=t(18769),a=t(6471),c=function(e){var{useBrick:r,data:t,refCallback:c,ignoredCallback:i}=e,[s,o]=(0,u.useState)(null),l=(0,u.useRef)(),[d,f]=(0,u.useState)(),v=(0,u.useRef)(0),p=(0,u.useMemo)((()=>{var e;return null===(e=a.__secret_internals.getRenderId)||void 0===e?void 0:e.call(a.__secret_internals)}),[]);(0,u.useEffect)((()=>{var e=!1;function u(){return u=(0,n.A)((function*(){try{var n=yield a.__secret_internals.renderUseBrick(r,t);if(e)return;o(n),f(++v.current)}catch(e){(function(e){var r,t=null===(r=a.__secret_internals.getRenderId)||void 0===r?void 0:r.call(a.__secret_internals);return!e||!t||e===t})(p)&&(console.error("Render useBrick failed:",r,"with data:",t),(0,a.handleHttpError)(e))}})),u.apply(this,arguments)}return function(){u.apply(this,arguments)}(),()=>{e=!0}}),[t,r,p]);var y=(0,u.useCallback)((e=>{e?l.current=a.__secret_internals.mountUseBrick(s,e):(a.__secret_internals.unmountUseBrick(s,l.current),l.current=void 0),null==c||c(e)}),[c,s]);if(!s)return null;var{tagName:g}=s;if(null===g)return null==i||i(),null;var m=g;return u.createElement(m,{key:d,ref:y})},i=function(e){var{useBrick:r,data:t}=e;return Array.isArray(r)?u.createElement(u.Fragment,null,r.map(((e,r)=>u.createElement(c,{key:r,useBrick:e,data:t})))):u.createElement(c,{useBrick:r,data:t})},s=(0,a.getV2RuntimeFromDll)();if(s){var{SingleBrickAsComponentFactory:o,BrickAsComponentFactory:l}=s;o&&l&&(c=o(u),i=l(u))}function d(){var[e,r]=(0,u.useState)(a.getCurrentTheme);return(0,u.useEffect)((()=>{var e=e=>{r(e.detail)};return window.addEventListener("theme.change",e),()=>{window.removeEventListener("theme.change",e)}}),[]),e}function f(){var[e,r]=u.useState((()=>(0,a.getRuntime)().getRecentApps()));return u.useEffect((()=>{var e=e=>{r(e.detail)};return window.addEventListener("app.change",e),()=>window.removeEventListener("app.change",e)}),[]),e}function v(){return f().currentApp}function p(){var[e,r]=u.useState(null);return u.useEffect((()=>{var e=e=>{r(e.detail)};return window.addEventListener("route.render",e),()=>window.removeEventListener("route.render",e)}),[]),e}var y=t(69740),g=t(14223),m={provider:"",customOptions:{onError:()=>{},transform:(e,r)=>r,data:void 0,loading:!1,suspense:!1,cache:!0},dependencies:void 0};const h=Object.entries(m).reduce(((e,r)=>{var[t,n]=r;return"[object Object]"===Object.prototype.toString.call(n)?(0,y.A)((0,y.A)({},e),n):(0,y.A)((0,y.A)({},e),{},{[t]:n})}),{});var A=t(41030),k=["args"],b=new Map;function _(){return(_=(0,n.A)((function*(e,r,t){var n,u=function(e){for(var r,t=e=>Object.keys(e).sort().map((r=>({[r]:e[r]}))),n=arguments.length,u=new Array(n>1?n-1:0),a=1;a<n;a++)u[a-1]=arguments[a];try{var c="object"!=typeof(r=u)||null===r||Array.isArray(r)?u.map((e=>function(e){return"string"==typeof e}(e)?e:t(e))):t(u);return JSON.stringify({provider:e,args:c})}catch(r){return JSON.stringify({provider:e,args:u})}}(e,...t);return!r&&b.has(u)&&b.delete(u),b.has(u)?n=b.get(u):(n=(0,a.fetchByProvider)(e,t),r&&b.set(u,n)),n}))).apply(this,arguments)}var w=["onError","transform","suspense","cache"];function O(){var{provider:e,customOptions:r,dependencies:t,requestInit:a}=function(e,r,t){var n=(0,u.useMemo)((()=>"string"==typeof e?e:m.provider),[e,r]),a=(0,u.useMemo)((()=>{var t={};return(0,A.isObject)(e)?t=e:(0,A.isObject)(r)&&(t=r),(0,y.A)((0,y.A)({},h),t)}),[e,r]),c=(0,u.useMemo)((()=>{var e=[...Object.keys(m),...Object.keys(m.customOptions)],r=Object.keys(a).reduce(((r,t)=>(e.includes(t)||(r[t]=a[t]),r)),{}),{args:t=null}=r,n=(0,g.A)(r,k);return{options:(0,y.A)({},n),args:t}}),[a]),i=(0,u.useMemo)((()=>Array.isArray(r)?r:Array.isArray(t)?t:h.dependencies),[r,t]),s=a.loading||Array.isArray(i);return{provider:n,customOptions:(0,u.useMemo)((()=>{var e=Object.keys(m.customOptions).reduce(((e,r)=>(e[r]=a[r],e)),{});return(0,y.A)((0,y.A)({},e),{},{loading:s})}),[a]),requestInit:c,dependencies:i}}(...arguments),{onError:c,transform:i,suspense:s,cache:o}=r,l=(0,g.A)(r,w),[d,f]=(0,u.useState)(l.loading),v=(0,u.useRef)("pending"),p=(0,u.useRef)(),b=(0,u.useRef)(!1),O=(0,u.useRef)(),E=(0,u.useRef)(),R=(0,u.useRef)(l.data),j=(0,u.useReducer)((()=>({})),[])[1],B=(0,u.useCallback)(function(){var e=(0,n.A)((function*(e,r){try{O.current=void 0,s||f(!0);var t=yield function(e,r,t){return _.apply(this,arguments)}(e,o,r);E.current=t,R.current=i(R.current,t)}catch(e){O.current=e,R.current=void 0}return s||f(!1),O.current&&c(O.current),R.current}));return function(r,t){return e.apply(this,arguments)}}(),[e,r,t,a,s,i,l.data,c,o]),C=(0,u.useCallback)(function(){var r=(0,n.A)((function*(r,t){var u=e,a=[];return(0,A.isString)(r)&&(u=r),(0,A.isObject)(r)?a=r:(0,A.isObject)(t)&&(a=t),s?(0,n.A)((function*(){return p.current=B(u,a).then((e=>(v.current="success",e)),(e=>(v.current="error",e.current=e,e))),j(),yield p.current}))():B(u,a)}));return function(e,t){return r.apply(this,arguments)}}(),[B]),S=(0,u.useMemo)((()=>Object.defineProperties({query:C},{loading:{get:()=>d},data:{get:()=>R.current},error:{get:()=>O.current}})),[C]);if((0,u.useEffect)((()=>(b.current=!0,Array.isArray(t)&&e&&S.query(e,a.args),()=>b.current=!1)),t),s&&p.current)switch(v.current){case"pending":throw p.current;case"error":throw O.current}return Object.assign([S,E.current,d,O.current],(0,y.A)((0,y.A)({request:S},S),{},{response:E.current,data:R.current,loading:d,error:O.current}))}var E=t(12621);function R(e,r){return j.apply(this,arguments)}function j(){return(j=(0,n.A)((function*(e,r){return yield a.__secret_internals.loadBricks([e]),(0,E.wrapBrick)(e,r)}))).apply(this,arguments)}function B(){var[e,r]=(0,u.useState)((()=>(0,a.getRuntime)().getNavConfig()));return(0,u.useEffect)((()=>{var e=e=>{r(e.detail)};return window.addEventListener("navConfig.change",e),()=>window.removeEventListener("navConfig.change",e)}),[]),e}}}]);
2
- //# sourceMappingURL=9496.f7a1b472.js.map
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunk_next_bricks_advanced=self.webpackChunk_next_bricks_advanced||[]).push([[944,6330],{31007:(e,t,n)=>{n.r(t),n.d(t,{captureSnapshot:()=>r});var a=n(86330),o=n(52681),c=n(96002);function r(e){return i.apply(this,arguments)}function i(){return(i=(0,a.A)((function*(e){var{name:t,fileType:a,bucketName:o,selector:r,backgroundColor:i}=e;switch(a){case"image":var d=yield(0,c.Fg)(r,i);if(o){var u=yield(0,c.m0)(d),s=new File([u],"".concat(t,".png"),{type:u.type}),h=yield(0,c.QM)(s,o);return(0,c.Lb)(o,h.data.objectName)}yield(0,c.GV)(d,t);break;case"pdf":var{jsPDF:l}=yield n.e(1576).then(n.bind(n,31576)),v=yield(0,c.Fg)(r,i),p=v.toDataURL("image/jpeg",1),f=new l(v.width>v.height?"landscape":"portrait","pt",[v.width,v.height]);f.addImage(p,"JPEG",0,0,v.width,v.height),yield f.save("".concat(t,".pdf"),{returnPromise:!0})}}))).apply(this,arguments)}customElements.define("advanced.capture-snapshot",(0,o.createProviderClass)(r))},96002:(e,t,n)=>{n.d(t,{Fg:()=>i,GV:()=>d,Lb:()=>h,QM:()=>s,m0:()=>u});var a=n(29124),o=n(28317),c=n.n(o),r=n(6471);function i(e,t){var n=e?document.querySelector("".concat(e)):document.body;if(!n)throw new Error("target not found: ".concat(e));return new Promise((function(e,a){c()(n,{backgroundColor:t||null,useCORS:!0,allowTaint:!0,scale:window.devicePixelRatio<3?window.devicePixelRatio:2}).then((function(t){e(t)})).catch(a)}))}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"image";return new Promise(((n,a)=>{try{var o=e.toDataURL("image/png"),c=new Image;c.onload=function(){var e=document.createElement("canvas");e.width=c.width,e.height=c.height;var n=e.getContext("2d");null==n||n.drawImage(c,0,0,c.width,c.height);var a=e.toDataURL("image/png"),o=document.createElement("a");o.href=a,o.download=t;var r=new MouseEvent("click");o.dispatchEvent(r)},c.src=o,n("succeed")}catch(e){a("failed")}}))}function u(e){return new Promise((function(t,n){e.toBlob((function(e){e?t(e):n()}))}))}function s(e,t){var n=new FormData;n.append("file",e,e.name);var o="".concat((0,r.getBasePath)(),"api/gateway/object_store.object_store.PutObject/api/v1/objectStore/bucket/").concat(t,"/object");return a.http.request(o,{method:"PUT",body:n})}function h(e,t){return"".concat((0,r.getBasePath)(),"api/gateway/logic.object_store_service/api/v1/objectStore/bucket/").concat(e,"/object/").concat(t)}},86330:(e,t,n)=>{function a(e,t,n,a,o,c,r){try{var i=e[c](r),d=i.value}catch(e){return void n(e)}i.done?t(d):Promise.resolve(d).then(a,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,c){var r=e.apply(t,n);function i(e){a(r,o,c,i,d,"next",e)}function d(e){a(r,o,c,i,d,"throw",e)}i(void 0)}))}}n.d(t,{A:()=>o})}}]);
2
- //# sourceMappingURL=capture-snapshot.db38b517.js.map
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunk_next_bricks_advanced=self.webpackChunk_next_bricks_advanced||[]).push([[5008],{23246:(e,t,i)=>{i.d(t,{A:()=>o});var s=i(89575),r=i(18769);const a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};var n=i(84021),l=function(e,t){return r.createElement(n.A,(0,s.A)({},e,{ref:t,icon:a}))};const o=r.forwardRef(l)},72245:(e,t,i)=>{i.d(t,{A:()=>o});var s=i(89575),r=i(18769);const a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};var n=i(84021),l=function(e,t){return r.createElement(n.A,(0,s.A)({},e,{ref:t,icon:a}))};const o=r.forwardRef(l)},16768:(e,t,i)=>{i.d(t,{A:()=>f});var s=i(68621),r=i(58133),a=i(79154),n=i(73459);var l=i(19509),o=i(53443),h=i(94597),c=i(64425);var u=i(27856),d=i(45907),A=i(55983);const p=(e,t)=>new A.q(e).setAlpha(t).toRgbString(),g=(e,t)=>new A.q(e).lighten(t).toHexString(),m=e=>{const t=(0,u.cM)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},b=(e,t)=>{const i=e||"#000",s=t||"#fff";return{colorBgBase:i,colorTextBase:s,colorText:p(s,.85),colorTextSecondary:p(s,.65),colorTextTertiary:p(s,.45),colorTextQuaternary:p(s,.25),colorFill:p(s,.18),colorFillSecondary:p(s,.12),colorFillTertiary:p(s,.08),colorFillQuaternary:p(s,.04),colorBgElevated:g(i,12),colorBgContainer:g(i,8),colorBgLayout:g(i,0),colorBgSpotlight:g(i,26),colorBgBlur:p(s,.04),colorBorder:g(i,26),colorBorderSecondary:g(i,19)}},f={defaultConfig:o.sb,defaultSeed:o.sb.token,useToken:function(){const[e,t,i]=(0,l.Ay)();return{theme:e,token:t,hashId:i}},defaultAlgorithm:r.A,darkAlgorithm:(e,t)=>{const i=Object.keys(a.r).map((t=>{const i=(0,u.cM)(e[t],{theme:"dark"});return new Array(10).fill(1).reduce(((e,s,r)=>(e[`${t}-${r+1}`]=i[r],e[`${t}${r+1}`]=i[r],e)),{})})).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{}),s=null!=t?t:(0,r.A)(e);return Object.assign(Object.assign(Object.assign({},s),i),(0,d.A)(e,{generateColorPalettes:m,generateNeutralColorPalettes:b}))},compactAlgorithm:(e,t)=>{const i=null!=t?t:(0,r.A)(e),s=i.fontSizeSM,a=i.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},i),function(e){const{sizeUnit:t,sizeStep:i}=e,s=i-2;return{sizeXXL:t*(s+10),sizeXL:t*(s+6),sizeLG:t*(s+2),sizeMD:t*(s+2),sizeMS:t*(s+1),size:t*s,sizeSM:t*s,sizeXS:t*(s-1),sizeXXS:t*(s-1)}}(null!=t?t:e)),(0,c.A)(s)),{controlHeight:a}),(0,h.A)(Object.assign(Object.assign({},i),{controlHeight:a})))},getDesignToken:e=>{const t=(null==e?void 0:e.algorithm)?(0,s.an)(e.algorithm):(0,s.an)(r.A),i=Object.assign(Object.assign({},a.A),null==e?void 0:e.token);return(0,s.lO)(i,{override:null==e?void 0:e.token},t,n.A)}}},58381:(e,t,i)=>{i.r(t),i.d(t,{CascaderBrick:()=>H});var s,r,a,n,l,o,h,c,u,d,A,p,g,m,b,f,w,k,v,C,x,M,S,y,W,B,T,z,E,O,N,j,R,F,I,L,P,_,q,X,$,D,H,V=i(24586),Q=i(74635),G=i(70918),U=i(26902),J=i(5536),K=i(86121),Y=i(70829),Z=i(62740),ee=i(18769),te=i.n(ee),ie=i(76544),se=i(12621),re=(i(46329),i(80050)),ae=i(16768),ne=i(97039),le=i(68621),oe=i(30426),he=i(120),ce=i(71058),{defineElement:ue,property:de,event:Ae}=(0,ie.createDecorators)(),pe=(0,se.wrapBrick)("eo-icon"),ge=(0,se.wrapBrick)("eo-form-item"),me=new WeakMap,be=new WeakMap,fe=new WeakMap,we=new WeakMap,ke=new WeakMap,ve=new WeakMap,Ce=new WeakMap,xe=new WeakMap,Me=new WeakMap,Se=new WeakMap,ye=new WeakMap,We=new WeakMap,Be=new WeakMap,Te=new WeakMap,ze=new WeakMap,Ee=new WeakMap,Oe=new WeakMap,Ne=new WeakMap,je=new WeakMap,Re=new WeakSet;class Fe extends oe.N{constructor(){super(...arguments),(0,Q.A)(this,Re),(0,G.A)(this,me,a(this)),(0,G.A)(this,be,(n(this),l(this))),(0,G.A)(this,fe,(o(this),h(this))),(0,G.A)(this,we,(c(this),u(this))),(0,G.A)(this,ke,(d(this),A(this,{label:"label",value:"value",children:"children"}))),(0,G.A)(this,ve,(p(this),g(this))),(0,G.A)(this,Ce,(m(this),b(this))),(0,G.A)(this,xe,(f(this),w(this))),(0,G.A)(this,Me,(k(this),v(this))),(0,G.A)(this,Se,(C(this),x(this,!0))),(0,G.A)(this,ye,(M(this),S(this,!0))),(0,G.A)(this,We,(y(this),W(this))),(0,G.A)(this,Be,(B(this),T(this,"click"))),(0,G.A)(this,Te,(z(this),E(this,"bottomLeft"))),(0,G.A)(this,ze,(O(this),N(this))),(0,G.A)(this,Ee,(j(this),R(this,50))),(0,G.A)(this,Oe,(F(this),I(this))),(0,G.A)(this,Ne,(L(this),P(this))),(0,G.A)(this,je,(_(this),q(this))),(0,V.A)(this,"handleOnChange",(D(this),(e,t)=>{this.value=e,Promise.resolve().then((()=>{(0,J.A)(Re,this,X).emit({value:e,selectedOptions:t})}))}))}get name(){return(0,Y.A)(me,this)}set name(e){(0,K.A)(me,this,e)}get label(){return(0,Y.A)(be,this)}set label(e){(0,K.A)(be,this,e)}get required(){return(0,Y.A)(fe,this)}set required(e){(0,K.A)(fe,this,e)}get options(){return(0,Y.A)(we,this)}set options(e){(0,K.A)(we,this,e)}get fieldNames(){return(0,Y.A)(ke,this)}set fieldNames(e){(0,K.A)(ke,this,e)}get value(){return(0,Y.A)(ve,this)}set value(e){(0,K.A)(ve,this,e)}get placeholder(){return(0,Y.A)(Ce,this)}set placeholder(e){(0,K.A)(Ce,this,e)}get multiple(){return(0,Y.A)(xe,this)}set multiple(e){(0,K.A)(xe,this,e)}get disabled(){return(0,Y.A)(Me,this)}set disabled(e){(0,K.A)(Me,this,e)}get allowClear(){return(0,Y.A)(Se,this)}set allowClear(e){(0,K.A)(Se,this,e)}get showSearch(){return(0,Y.A)(ye,this)}set showSearch(e){(0,K.A)(ye,this,e)}get suffixIcon(){return(0,Y.A)(We,this)}set suffixIcon(e){(0,K.A)(We,this,e)}get expandTrigger(){return(0,Y.A)(Be,this)}set expandTrigger(e){(0,K.A)(Be,this,e)}get popupPlacement(){return(0,Y.A)(Te,this)}set popupPlacement(e){(0,K.A)(Te,this,e)}get size(){return(0,Y.A)(ze,this)}set size(e){(0,K.A)(ze,this,e)}get limit(){return(0,Y.A)(Ee,this)}set limit(e){(0,K.A)(Ee,this,e)}get maxTagCount(){return(0,Y.A)(Oe,this)}set maxTagCount(e){(0,K.A)(Oe,this,e)}get cascaderStyle(){return(0,Y.A)(Ne,this)}set cascaderStyle(e){(0,K.A)(Ne,this,e)}render(){return te().createElement(ge,{curElement:this,formElement:this.getFormElement(),name:this.name,label:this.label,required:this.required,notRender:this.notRender,trigger:"handleOnChange"},te().createElement(Ie,{shadowRoot:this.shadowRoot,options:this.options,fieldNames:this.fieldNames,value:this.value,multiple:this.multiple,placeholder:this.placeholder,disabled:this.disabled,allowClear:this.allowClear,showSearch:this.showSearch,expandTrigger:this.expandTrigger,suffixIcon:this.suffixIcon,size:this.size,limit:this.limit,popupPlacement:this.popupPlacement,maxTagCount:this.maxTagCount,cascaderStyle:this.cascaderStyle,onChange:this.handleOnChange}))}}function Ie(e){var{shadowRoot:t,options:i,fieldNames:s,value:r,placeholder:a,disabled:n,multiple:l,allowClear:o,showSearch:h,expandTrigger:c,size:u,limit:d,popupPlacement:A,cascaderStyle:p,suffixIcon:g,maxTagCount:m,onChange:b}=e,f=(0,he.useCurrentTheme)(),w=(0,ee.useMemo)((()=>(0,le.VC)()),[]);return te().createElement(re.Ay,{theme:{algorithm:"dark-v2"===f?ae.A.darkAlgorithm:ae.A.defaultAlgorithm}},te().createElement(le.N7,{container:t,cache:w},te().createElement(ne.A,{getPopupContainer:e=>e.parentElement,allowClear:o,disabled:n,multiple:l,expandTrigger:c,fieldNames:s,placeholder:a,size:u,showSearch:h&&{limit:d,filter:(e,t)=>{for(var i,r=(null==s?void 0:s.label)||"label",a=e.split(" ").filter((e=>e)).map((e=>e.toLocaleLowerCase())),n=function(e){if(!t.some((t=>t[r].toLowerCase().includes(a[e]))))return{v:!1}},l=0;l<a.length;l++)if(i=n(l))return i.v;return!0}},placement:A,style:p,suffixIcon:g&&te().createElement(pe,g),maxTagCount:m,value:r,options:i,onChange:(e,t)=>null==b?void 0:b(e,t)})))}s=Fe,({e:[a,n,l,o,h,c,u,d,A,p,g,m,b,f,w,k,v,C,x,M,S,y,W,B,T,z,E,O,N,j,R,F,I,L,P,_,q,X,$,D],c:[H,r]}=(0,Z.A)(s,[ue("eo-cascader",{alias:["advanced.general-cascader"],styleTexts:[ce.A]})],[[de(),1,"name"],[de(),1,"label"],[de({type:Boolean}),1,"required"],[de({attribute:!1}),1,"options"],[de({attribute:!1}),1,"fieldNames"],[de({attribute:!1}),1,"value"],[de(),1,"placeholder"],[de({type:Boolean}),1,"multiple"],[de({type:Boolean}),1,"disabled"],[de({type:Boolean}),1,"allowClear"],[de({type:Boolean}),1,"showSearch"],[de({attribute:!1}),1,"suffixIcon"],[de(),1,"expandTrigger"],[de(),1,"popupPlacement"],[de(),1,"size"],[de({type:Number}),1,"limit"],[de({attribute:!1}),1,"maxTagCount"],[de({attribute:!1}),1,"cascaderStyle"],[Ae({type:"cascader.change"}),1,"changeEvent",e=>(0,Y.A)(je,e),(e,t)=>(0,K.A)(je,e,t)]],0,(e=>Re.has((0,U.A)(e))),oe.N)),r()},71058:(e,t,i)=>{i.d(t,{A:()=>l});var s=i(36758),r=i.n(s),a=i(40935),n=i.n(a)()(r());n.push([e.id,".ant-select-single .ant-select-selector{border-radius:var(--medius-border-radius)}.ant-select-dropdown{border-radius:var(--medius-border-radius)}.ant-cascader-dropdown .ant-cascader-menu-item{border-radius:var(--small-border-radius)}",""]);const l=n.toString()},30426:(e,t,i)=>{i.d(t,{N:()=>O});var s,r,a,n,l,o,h,c,u,d,A=i(74635),p=i(70918),g=i(5536),m=i(99492),b=i(86121),f=i(70829),w=i(62740),k=i(76544),v=i(12621),{method:C,property:x}=(0,k.createDecorators)(),M=new WeakMap,S=new WeakSet,y=new WeakMap,W=new WeakMap,B=new WeakMap,T=new WeakMap,z=new WeakMap,E=new WeakMap;class O extends v.ReactNextElement{constructor(){super(...arguments),(0,A.A)(this,S),(0,p.A)(this,M,(r(this),!1)),(0,p.A)(this,y,"normal"),(0,p.A)(this,W,!1),(0,p.A)(this,B,a(this)),(0,p.A)(this,T,(n(this),l(this))),(0,p.A)(this,z,(o(this),h(this))),(0,p.A)(this,E,(c(this),u(this))),d(this)}get isFormItemElement(){return!0}set validateState(e){(0,m.A)(S,F,this,e),this._render()}get validateState(){return(0,g.A)(S,this,R)}set notRender(e){this.hidden=e,(0,m.A)(S,j,this,e),this._render()}get notRender(){return(0,g.A)(S,this,N)}get $bindFormItem(){return(0,g.A)(S,this,I)}set $bindFormItem(e){(0,m.A)(S,L,this,e),this._render()}get helpBrick(){return(0,f.A)(B,this)}set helpBrick(e){(0,b.A)(B,this,e)}get labelBrick(){return(0,f.A)(T,this)}set labelBrick(e){(0,b.A)(T,this,e)}get labelCol(){return(0,f.A)(z,this)}set labelCol(e){(0,b.A)(z,this,e)}get wrapperCol(){return(0,f.A)(E,this)}set wrapperCol(e){(0,b.A)(E,this,e)}setNotRender(e){this.notRender=e}getFormElement(){for(var e=this;(e=e.parentNode)&&e&&!e.isFormElement;);return e}}function N(e){return(0,f.A)(M,e)}function j(e,t){(0,b.A)(M,e,t)}function R(e){return(0,f.A)(y,e)}function F(e,t){(0,b.A)(y,e,t)}function I(e){return(0,f.A)(W,e)}function L(e,t){(0,b.A)(W,e,t)}s=O,[a,n,l,o,h,c,u,d,r]=(0,w.A)(s,[],[[x({attribute:!1}),1,"helpBrick"],[x({attribute:!1}),1,"labelBrick"],[x({attribute:!1}),1,"labelCol"],[x({attribute:!1}),1,"wrapperCol"],[C(),2,"setNotRender"],[C(),2,"getFormElement"]],0,void 0,v.ReactNextElement).e}}]);
2
- //# sourceMappingURL=eo-cascader.cfbb9448.js.map