@next-bricks/advanced 0.40.0 → 0.40.2

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 (53) hide show
  1. package/dist/bricks.json +6 -6
  2. package/dist/chunks/2197.b40c457a.js +2 -0
  3. package/dist/chunks/{2197.adb5b178.js.map → 2197.b40c457a.js.map} +1 -1
  4. package/dist/chunks/{2252.dcdf9f45.js → 2252.9c576d56.js} +3 -3
  5. package/dist/chunks/{2252.dcdf9f45.js.map → 2252.9c576d56.js.map} +1 -1
  6. package/dist/chunks/{4837.e9d4a903.js → 4837.69c4fc64.js} +2 -2
  7. package/dist/chunks/{4837.e9d4a903.js.map → 4837.69c4fc64.js.map} +1 -1
  8. package/dist/chunks/5399.86227963.js +2 -0
  9. package/dist/chunks/5399.86227963.js.map +1 -0
  10. package/dist/chunks/5479.98b42669.js +2 -0
  11. package/dist/chunks/{5479.2a36b0ca.js.map → 5479.98b42669.js.map} +1 -1
  12. package/dist/chunks/{7218.efbfe953.js → 7218.6880a65c.js} +2 -2
  13. package/dist/chunks/{7218.efbfe953.js.map → 7218.6880a65c.js.map} +1 -1
  14. package/dist/chunks/799.ab8dae58.js +3 -0
  15. package/dist/chunks/799.ab8dae58.js.map +1 -0
  16. package/dist/chunks/{capture-snapshot.4d0c2baa.js → capture-snapshot.4c3f8a99.js} +2 -2
  17. package/dist/chunks/{capture-snapshot.4d0c2baa.js.map → capture-snapshot.4c3f8a99.js.map} +1 -1
  18. package/dist/chunks/eo-cascader.6aadcdf7.js +2 -0
  19. package/dist/chunks/{eo-cascader.5d27f3ec.js.map → eo-cascader.6aadcdf7.js.map} +1 -1
  20. package/dist/chunks/eo-table.26ec4be6.js +2 -0
  21. package/dist/chunks/{eo-table.63d16b38.js.map → eo-table.26ec4be6.js.map} +1 -1
  22. package/dist/chunks/eo-tree-select.44478346.js +2 -0
  23. package/dist/chunks/{eo-tree-select.056315bb.js.map → eo-tree-select.44478346.js.map} +1 -1
  24. package/dist/chunks/{eo-tree.c2462e3a.js → eo-tree.e876e173.js} +3 -3
  25. package/dist/chunks/{eo-tree.c2462e3a.js.map → eo-tree.e876e173.js.map} +1 -1
  26. package/dist/chunks/eo-workbench-layout-v2.f42a99ba.js +2 -0
  27. package/dist/chunks/{eo-workbench-layout-v2.ca8e89c5.js.map → eo-workbench-layout-v2.f42a99ba.js.map} +1 -1
  28. package/dist/chunks/eo-workbench-layout.321ce09d.js +2 -0
  29. package/dist/chunks/{eo-workbench-layout.5102bf99.js.map → eo-workbench-layout.321ce09d.js.map} +1 -1
  30. package/dist/chunks/main.2531924d.js +2 -0
  31. package/dist/chunks/{main.6f725086.js.map → main.2531924d.js.map} +1 -1
  32. package/dist/index.d2d4417d.js +2 -0
  33. package/dist/index.d2d4417d.js.map +1 -0
  34. package/dist/manifest.json +70 -70
  35. package/dist/types.json +685 -685
  36. package/package.json +2 -2
  37. package/dist/chunks/2197.adb5b178.js +0 -2
  38. package/dist/chunks/3657.9e9e2de3.js +0 -3
  39. package/dist/chunks/3657.9e9e2de3.js.map +0 -1
  40. package/dist/chunks/5399.ba5a3077.js +0 -2
  41. package/dist/chunks/5399.ba5a3077.js.map +0 -1
  42. package/dist/chunks/5479.2a36b0ca.js +0 -2
  43. package/dist/chunks/eo-cascader.5d27f3ec.js +0 -2
  44. package/dist/chunks/eo-table.63d16b38.js +0 -2
  45. package/dist/chunks/eo-tree-select.056315bb.js +0 -2
  46. package/dist/chunks/eo-workbench-layout-v2.ca8e89c5.js +0 -2
  47. package/dist/chunks/eo-workbench-layout.5102bf99.js +0 -2
  48. package/dist/chunks/main.6f725086.js +0 -2
  49. package/dist/index.45ddef72.js +0 -2
  50. package/dist/index.45ddef72.js.map +0 -1
  51. /package/dist/chunks/{2252.dcdf9f45.js.LICENSE.txt → 2252.9c576d56.js.LICENSE.txt} +0 -0
  52. /package/dist/chunks/{3657.9e9e2de3.js.LICENSE.txt → 799.ab8dae58.js.LICENSE.txt} +0 -0
  53. /package/dist/chunks/{eo-tree.c2462e3a.js.LICENSE.txt → eo-tree.e876e173.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/advanced",
3
- "version": "0.40.0",
3
+ "version": "0.40.2",
4
4
  "homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/advanced",
5
5
  "repository": {
6
6
  "type": "git",
@@ -45,5 +45,5 @@
45
45
  "@next-bricks/icons": "*",
46
46
  "@next-bricks/markdown": "*"
47
47
  },
48
- "gitHead": "469c5febc7d14ea914a5a8fcdda47c2ec7648bab"
48
+ "gitHead": "335feb47aaac064bae50636ca4e212006965d018"
49
49
  }
@@ -1,2 +0,0 @@
1
- (globalThis.webpackChunk_next_bricks_advanced=globalThis.webpackChunk_next_bricks_advanced||[]).push([[2197],{4823:(e,t,i)=>{"use strict";i.r(t);var a=i(24586),s=i(74635),r=i(70918),n=i(26902),o=i(5536),l=i(86121),h=i(70829),d=i(62740),c=i(18769),p=i.n(c),u=i(24782),g=i(91389),m=i(2198),A=i(41030),w=i(79435),b=i(89575),y=i(42083),f=i(80050);const k={$eq:A.isEqual,$lt:A.lt,$lte:A.lte,$gt:A.gt,$gte:A.gte,$ne:(e,t)=>!(0,A.isEqual)(e,t),$isEqual:A.isEqual,$notEqual:(e,t)=>!(0,A.isEqual)(e,t),$in:A.includes,$nin:(e,t)=>!(0,A.includes)(e,t),$exists:(e,t)=>e?!(0,A.isUndefined)(t):(0,A.isUndefined)(t)};function x(e,t,i){const{dataIndex:a,mapping:s}=e,r=void 0!==a?(0,A.get)(t,a):i,n=s.find((e=>e.value===r));return n?{borderLeft:`4px solid ${n.leftBorderColor}`}:{}}const v=(e,t,i,a)=>{e&&(0,A.forEach)(e,(e=>{const s=(0,A.get)(e,i),r=(0,A.get)(e,t);a.push(r),null!=s&&s.length&&v(s,t,i,a)}))},C=(e,t,i)=>{e&&(0,A.forEach)(e,(e=>{const a=(0,A.get)(e,t);i.push(e),null!=a&&a.length&&C(a,t,i)}))};function E(e){let 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?E(e,t[e]):(delete t[e],t)})),t}var S=i(53373),W=i.n(S),M=i(47522),z=i(80255),R=i(63737),_=i(50692),N=i(53435),B=i.n(N),I=i(47873),D=i(6257);const P="bricks/advanced/eo-table";var K=i(85502),T=i(18799),U=i(84352),L=i(26386);(0,K.initializeReactI18n)(P,{en:{},zh:{}});const F="DraggableBodyRow",O={lib:"antd",icon:"down",theme:"outlined"},H={lib:"antd",icon:"right",theme:"outlined"},q=(0,g.wrapBrick)("eo-icon"),$=e=>{let{index:t,moveRow:i,className:a,style:s,...r}=e;const n=p().useRef(null),[{isOver:o,dropClassName:l},h]=(0,M.H)({accept:F,collect:e=>{const{index:i}=e.getItem()||{};return i===t?{}:{isOver:e.isOver(),dropClassName:i<t?"dropOverDownward":"dropOverUpward"}},drop:e=>{i(e.index,t)}}),[,d]=(0,z.i)({type:F,item:{type:F,index:t},collect:e=>({isDragging:e.isDragging()})});return h(d(n)),p().createElement("tr",(0,b.A)({ref:n,className:W()(a,{[l]:o}),style:{cursor:"move",...s}},r))};function j(e){const{t}=(0,K.useTranslation)(P),i="zh"===T.i18n.language.split("-")[0]?L.A:U.A;if(e.error)throw e.error;const{configProps:a={pagination:!0,sortBy:!1},columns:s,rowKey:r="key",expandIconAsCell:n,expandIconColumnIndex:o,childrenColumnName:l,scroll:h,optimizedColumns:d,onDelete:u,ellipsisInfo:g,showHeader:m}=e,w=(0,c.useMemo)((()=>{var t;return null===(t=e.dataSource)||void 0===t?void 0:t.map(((e,t)=>(0,A.isNil)(e[r])?{...e,[r]:t}:e))}),[e.dataSource,r]),[k,v]=(0,c.useState)(w),C=(0,c.useRef)(new Map),E=(0,c.useRef)(new Map),S=(0,c.useRef)(new Map),M=(0,c.useRef)(new Map);(0,c.useEffect)((()=>{M.current.clear(),v(w)}),[w]);const z=null!=a&&a.rowSelection?-1:0,N=(0,c.useMemo)((()=>{if(s){E.current.clear(),S.current.clear();const e=s.map(((e,t)=>{const{useBrick:i,valueSuffix:a,cellStatus:s,cellStyle:h={},headerBrick:d,colSpanKey:c,rowSpanKey:u,filterDropdownBrick:m,...w}=e;if(null!=d&&d.useBrick){const t=null==d?void 0:d.useBrick;let i=E.current.get(e);i||(i={title:w.title},E.current.set(e,i)),w.title=((e,t)=>function(){return p().createElement(I.ReactUseMultipleBricks,{useBrick:e,data:t})})(t,i)}if(null!=m&&m.useBrick&&(w.filterDropdown=p().createElement(I.ReactUseMultipleBricks,{useBrick:m.useBrick})),i){let e;i&&(e=S.current.get(i),e||(e=new Map,S.current.set(i,e))),w.render=((e,t)=>function(i,a,s){if(e){let r=null==t?void 0:t.get(a);return r||(r={cellData:i,rowData:a,columnIndex:s},null==t||t.set(a,r)),p().createElement(I.ReactUseMultipleBricks,{useBrick:e,data:r})}})(i,e),w.shouldCellUpdate=(e,t)=>!(0,A.isEqual)(e,t)}else a&&(w.render=e=>e+a);if(!n&&t===Number(o)+z){const e=w.render;w.render=function(t,i,a){return p().createElement(p().Fragment,null,!i[l]&&C.current.get(r?i[r]:i),e?e(t,i,a):t)}}if(s||c||u||h){const e=w.render;w.render=(t,i,a)=>({children:e?e(t,i,a):t,props:{colSpan:i[c],rowSpan:i[u],style:{...s?x(s,i,t):{},...h}}})}return"string"==typeof w.dataIndex&&(w.dataIndex=(0,A.toPath)(w.dataIndex)),"top"===w.verticalAlign&&(w.className?w.className+=" alignTop":w.className="alignTop"),"bottom"===w.verticalAlign&&(w.className?w.className+=" alignBottom":w.className="alignBottom"),g&&(w.className?w.className+=" ellipsisInfoCell":w.className="ellipsisInfoCell"),w}));return e}}),[s,l,n,o,z,r,u,g]),F={body:{row:$}},j=(t,i)=>{const a=k[t],s=B()(k,{$splice:[[t,1],[i,0,a]]});v(s),e.onDrag&&e.onDrag(s)},Q=(0,A.pickBy)({expandIconColumnIndex:o,expandIconAsCell:n,expandRowByClick:e.expandRowByClick,expandedRowKeys:e.expandedRowKeys,defaultExpandAllRows:e.defaultExpandAllRows},(e=>!(0,A.isNil)(e)));let Z=p().createElement(y.A,(0,b.A)({className:W()("brickTable",{expandIconCellHidden:!n,customDropTable:e.tableDraggable,tableThTransparent:e.thTransparent,zebraPatternTable:(null==k?void 0:k.length)>=2&&e.zebraPattern,xSmallSizeTable:e.xSmallSizeTable}),dataSource:k},e.tableDraggable?{components:F,onRow:(e,t)=>({index:t,moveRow:j})}:{},{columns:N,onChange:e.onChange},e.expandedRowBrick?{expandedRowRender:(t,i)=>{var a;let s=M.current.get(t);return s||(s={rowData:t,rowIndex:i},M.current.set(t,s)),p().createElement(I.ReactUseMultipleBricks,{useBrick:null===(a=e.expandedRowBrick)||void 0===a?void 0:a.useBrick,data:s})}}:{},Q,{onExpand:(t,i)=>{e.onExpand&&e.onExpand(t,i)},showSorterTooltip:!1,onExpandedRowsChange:t=>{e.onExpandedRowsChange&&e.onExpandedRowsChange(t)},rowKey:r,childrenColumnName:l,rowClassName:(t,i)=>t.invalidRow?"invalidRow":t.disabledRow?"disabledRow":e.zebraPattern&&i%2?"brickTableOddRow":"",expandIcon:t=>{var i;const{record:a,expandable:s,expanded:o,onExpand:l}=t;let h,d=(null===(i=e.expandIcon)||void 0===i?void 0:i.collapsedIcon)||O;var c;s?(o||(d=(null===(c=e.expandIcon)||void 0===c?void 0:c.expandedIcon)||H),h=p().createElement("span",{className:"expandIconSpan","data-testid":"expand-icon",onClick:e=>{l(a,e)}},p().createElement(q,d))):h=p().createElement("span",{className:"expandIconSpan","data-testid":"expand-icon"},p().createElement("span",{style:{visibility:"hidden"}},p().createElement(q,d)));return h?(n||C.current.set(r?a[r]:a,h),h):p().createElement(p().Fragment,null)},scroll:h,showHeader:m},a));e.tableDraggable&&(Z=p().createElement(R.Q,{backend:_.t2},Z));const V=(0,c.useMemo)((()=>(0,D.VC)()),[]);return p().createElement(f.Ay,{locale:i},p().createElement(D.N7,{container:e.shadowRoot,cache:V},Z))}var Q;let Z,V,X,G,Y,J,ee,te,ie,ae,se,re,ne,oe,le,he,de,ce,pe,ue,ge,me,Ae,we,be,ye,fe,ke,xe,ve,Ce,Ee,Se,We,Me,ze,Re,_e,Ne,Be,Ie,De,Pe,Ke,Te,Ue,Le,Fe,Oe,He,qe,$e,je,Qe,Ze,Ve,Xe,Ge,Ye,Je,et,tt,it,at,st,rt,nt,ot,lt,ht,dt,ct,pt,ut,gt,mt,At,wt,bt,yt,ft,kt,xt,vt,Ct,Et,St,Wt,Mt,zt,Rt,_t,Nt,Bt,It,Dt,Pt,Kt,Tt,Ut,Lt,Ft,Ot,Ht,qt,$t,jt,Qt,Zt,Vt,Xt,Gt,Yt,Jt,ei,ti,ii,ai,si,ri,ni,oi,li,hi;i(76477);const{defineElement:di,property:ci,event:pi,method:ui}=(0,u.createDecorators)();let gi;var mi=new WeakMap,Ai=new WeakSet,wi=new WeakMap,bi=new WeakMap,yi=new WeakMap,fi=new WeakMap,ki=new WeakMap,xi=new WeakMap,vi=new WeakMap,Ci=new WeakMap,Ei=new WeakMap,Si=new WeakMap,Wi=new WeakMap,Mi=new WeakMap,zi=new WeakMap,Ri=new WeakMap,_i=new WeakMap,Ni=new WeakMap,Bi=new WeakMap,Ii=new WeakMap,Di=new WeakMap,Pi=new WeakMap,Ki=new WeakMap,Ti=new WeakMap,Ui=new WeakMap,Li=new WeakMap,Fi=new WeakMap,Oi=new WeakMap,Hi=new WeakMap,qi=new WeakMap,$i=new WeakMap,ji=new WeakMap,Qi=new WeakMap,Zi=new WeakMap,Vi=new WeakMap,Xi=new WeakMap,Gi=new WeakMap,Yi=new WeakMap,Ji=new WeakMap,ea=new WeakMap,ta=new WeakMap,ia=new WeakMap,aa=new WeakMap,sa=new WeakMap,ra=new WeakMap,na=new WeakMap,oa=new WeakMap,la=new WeakMap,ha=new WeakMap,da=new WeakMap,ca=new WeakMap,pa=new WeakMap,ua=new WeakMap,ga=new WeakMap,ma=new WeakMap;class Aa extends g.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,Ai),(0,r.A)(this,mi,(Z(this),X(this))),(0,r.A)(this,wi,(J(this),ee(this))),(0,r.A)(this,bi,(ae(this),se(this))),(0,r.A)(this,yi,(oe(this),le(this))),(0,r.A)(this,fi,(ce(this),pe(this))),(0,r.A)(this,ki,(me(this),Ae(this))),(0,r.A)(this,xi,(ye(this),fe(this))),(0,r.A)(this,vi,(ve(this),Ce(this))),(0,r.A)(this,Ci,(We(this),Me(this,!0))),(0,r.A)(this,Ei,(ze(this),Re(this))),(0,r.A)(this,Si,(_e(this),Ne(this))),(0,r.A)(this,Wi,(Be(this),Ie(this))),(0,r.A)(this,Mi,(De(this),Pe(this,!1))),(0,r.A)(this,zi,(Ke(this),Te(this))),(0,r.A)(this,Ri,(Ue(this),Le(this))),(0,r.A)(this,_i,(Fe(this),Oe(this))),(0,r.A)(this,Ni,(He(this),qe(this))),(0,r.A)(this,Bi,($e(this),je(this))),(0,r.A)(this,Ii,(Qe(this),Ze(this))),(0,r.A)(this,Di,(Ve(this),Xe(this))),(0,r.A)(this,Pi,(Ge(this),Ye(this,!0))),(0,r.A)(this,Ki,(Je(this),et(this))),(0,r.A)(this,Ti,(tt(this),it(this))),(0,r.A)(this,Ui,(at(this),st(this))),(0,r.A)(this,Li,(rt(this),nt(this,!1))),(0,r.A)(this,Fi,(ot(this),lt(this))),(0,r.A)(this,Oi,(ht(this),dt(this))),(0,r.A)(this,Hi,(ct(this),pt(this))),(0,r.A)(this,qi,(ut(this),gt(this))),(0,r.A)(this,$i,(mt(this),At(this))),(0,a.A)(this,"_disabledChildrenKeys",(wt(this),[])),(0,r.A)(this,ji,bt(this,"children")),(0,r.A)(this,Qi,(yt(this),ft(this,!0))),(0,r.A)(this,Zi,(kt(this),xt(this))),(0,r.A)(this,Vi,(vt(this),Ct(this,""))),(0,r.A)(this,Xi,(Et(this),St(this))),(0,r.A)(this,Gi,(Wt(this),Mt(this))),(0,r.A)(this,Yi,(zt(this),Rt(this))),(0,r.A)(this,Ji,(_t(this),Nt(this))),(0,r.A)(this,ea,(Bt(this),It(this,{x:!0}))),(0,r.A)(this,ta,(Dt(this),Pt(this,"q"))),(0,r.A)(this,ia,(Kt(this),Tt(this))),(0,r.A)(this,aa,(Ut(this),Lt(this))),(0,r.A)(this,sa,(Ft(this),Ot(this))),(0,r.A)(this,ra,(Ht(this),qt(this,[]))),(0,r.A)(this,na,($t(this),jt(this))),(0,r.A)(this,oa,(Qt(this),Zt(this))),(0,r.A)(this,la,(Vt(this),Xt(this,!0))),(0,r.A)(this,ha,(Gt(this),Yt(this))),(0,r.A)(this,da,(Jt(this),ei(this))),(0,r.A)(this,ca,(ti(this),ii(this))),(0,r.A)(this,pa,(ai(this),si(this,!0))),(0,r.A)(this,ua,(ri(this),ni(this,!0))),(0,a.A)(this,"_originalDataSource",(oi(this),[])),(0,a.A)(this,"_dataSource",[]),(0,a.A)(this,"_pureSource",void 0),(0,a.A)(this,"_columns",void 0),(0,a.A)(this,"_finalConfigProps",{}),(0,a.A)(this,"_error",void 0),(0,r.A)(this,ga,void 0),(0,a.A)(this,"_selectUpdateEventName",""),(0,a.A)(this,"_selectUpdateEventDetailKeys",[]),(0,a.A)(this,"_selectUpdateEventDetailField",""),(0,a.A)(this,"_selectUpdateEventDetailExtra",{}),(0,a.A)(this,"_fields",{page:"page",pageSize:"pageSize",dataSource:"list",total:"total",ascend:"ascend",descend:"descend"}),(0,r.A)(this,ma,li(this,[])),(0,a.A)(this,"_selected",(hi(this),!1)),(0,a.A)(this,"_selectedRow",void 0),(0,a.A)(this,"_selectedRows",[]),(0,a.A)(this,"_allChildren",[]),(0,a.A)(this,"_isInSelect",!1),(0,a.A)(this,"_getRowKey",(()=>{var e;return this.rowKey??this._fields.rowKey??(null===(e=this.configProps)||void 0===e?void 0:e.rowKey)??"key"})),(0,a.A)(this,"_findParentByChildKeyValue",((e,t,i,a)=>{let s;return i.some((i=>{if(i[t]===e)s=a;else{const a=i[this.childrenColumnName];a&&(s=this._findParentByChildKeyValue(e,t,a,i))}return!!s})),s})),(0,a.A)(this,"_handleRowSelectChange",((e,t)=>{const i=this._getRowKey(),a=(0,A.keyBy)(t,i);if(this._selected){const t=[...e];if(this._allChildren.forEach((e=>{const s=e[i];t.push(s),a[s]=e})),this.autoSelectParentWhenAllChildrenSelected&&this._selectedRow){const s=new Set(e),r=this._findParentByChildKeyValue(this._selectedRow[i],i,this._dataSource);if(r&&r[this.childrenColumnName].every((e=>s.has(e[i])))){const e=r[i];t.push(e),a[e]=r}}this.selectedRowKeys=(0,A.uniq)(t)}else{let t;this.autoSelectParentWhenAllChildrenSelected&&this._selectedRow&&(t=this._findParentByChildKeyValue(this._selectedRow[i],i,this._dataSource)),this.selectedRowKeys=(0,A.pullAll)(e,(0,A.map)(this._allChildren.concat(t),i))}this._selectedRow=void 0;const s=(0,A.keyBy)(this.extraRows,i);this._selectedRows=this.selectedRowKeys.map((e=>a[e]||s[e]));let r=null;const n=(0,A.isEmpty)(this._selectUpdateEventDetailField)?this._selectedRows:(0,A.map)(this._selectedRows,(e=>(0,A.get)(e,this._selectUpdateEventDetailField)));r=(0,A.isEmpty)(this._selectUpdateEventDetailKeys)||(0,A.isEmpty)(n)?n:(0,A.set)({},this._selectUpdateEventDetailKeys,n),(0,A.isEmpty)(r)||(r=(0,A.merge)(r,this._selectUpdateEventDetailExtra)),this._selectUpdateEventName?this.dispatchEvent(new CustomEvent(this._selectUpdateEventName,{detail:r})):(0,o.A)(Ai,this,re).emit(r),(0,o.A)(Ai,this,he).emit(e)})),(0,a.A)(this,"_getSelectedRowsWithChildren",(e=>{const t=[];return!(0,A.isEmpty)(e[this.childrenColumnName])&&(0,A.isArray)(e[this.childrenColumnName])&&(0,A.forEach)(e[this.childrenColumnName],(e=>{t.push(e),t.push(...this._getSelectedRowsWithChildren(e))})),t})),(0,a.A)(this,"_handleOnSelect",((e,t)=>{this._selected=t,this._selectedRow=e,this._isInSelect=!0;const i=this._getRowKey(),a=this.selectAllChildren?this._getSelectedRowsWithChildren(e):[];this._allChildren=a,this.autoSelectParentWhenAllChildrenSelected||(this._disabledChildrenKeys=t?(0,A.uniq)([...this._disabledChildrenKeys,...(0,A.map)(a,i)]):(0,A.pullAll)(this._disabledChildrenKeys,[...(0,A.map)(a,i)])),this.storeCheckedByUrl&&i&&this._updateUrlChecked([e[i]],t)})),(0,a.A)(this,"_handleSelectAll",((e,t,i)=>{this._selected=e,this._isInSelect=!0;const a=this._getRowKey();if(this.selectAllChildren){const t=(0,A.map)(this._dataSource,a),s=i.filter((e=>t.includes(e[a]))),r=(0,A.flatten)((0,A.map)(s,(e=>(0,A.map)(this._getSelectedRowsWithChildren(e),(e=>e[a]))))),n=(0,A.flatten)((0,A.map)(s,(e=>(0,A.map)(this._getSelectedRowsWithChildren(e),(e=>e)))));this._allChildren=n,this.autoSelectParentWhenAllChildrenSelected||(this._disabledChildrenKeys=e?(0,A.uniq)(this._disabledChildrenKeys.concat(r)):this._disabledChildrenKeys.filter((e=>!r.includes(e))))}this.storeCheckedByUrl&&a&&this._updateUrlChecked((0,A.map)(i,a),e)})),(0,a.A)(this,"_getCheckedFromUrl",(()=>{const e=(0,w.getHistory)(),t=new URLSearchParams(e.location.search).get("checked");return(0,A.isEmpty)(t)?[]:t.split(",")})),(0,a.A)(this,"_updateUrlChecked",((e,t)=>{const i=(0,w.getHistory)();let a=this._getCheckedFromUrl();t?a=[...a,...e]:(0,A.pull)(a,...e),this.shouldUpdateUrlParams&&i.pushQuery({checked:a.join(",")},{notify:!1})})),(0,a.A)(this,"_handleOnChange",((e,t,i)=>{const a=(0,w.getHistory)(),s=new URLSearchParams(a.location.search);if(!(0,A.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)(Ai,this,te).emit({[this._fields.pageSize]:e.pageSize,[this._fields.page]:1}),this.page=1,this.pageSize=e.pageSize;else if(e.current!==this.page){const t=e.current||1;s.set("page",t.toString()),(0,o.A)(Ai,this,G).emit({[this._fields.page]:t}),this.page=t}this.filters=t,(0,A.isEmpty)(t)||(0,A.forEach)(t,((e,t)=>{(0,A.isNil)(e)||0===e.length?s.delete(t):s.set(t,e)})),i.order&&(0,A.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)(Ai,this,ue).emit({sort:this.sort,order:this.order})),this.frontSearch?(this.shouldUpdateUrlParams&&a.push(`?${s}`,{notify:!1}),this.frontendSearch(e,t,i)):this.shouldUpdateUrlParams&&a.push(`?${s}`,{notify:!!this.shouldRenderWhenUrlParamsUpdate})})),(0,a.A)(this,"renderSelectInfo",(()=>p().createElement("span",{style:{marginLeft:20}},p().createElement("span",null,"已选择",this.selectedRowKeys.length,"项"),p().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)(Ai,this,re).emit([])}},"清空")))),(0,a.A)(this,"_handleOnExpand",((e,t)=>{if(this.expandedRowKeys){const i=this._getRowKey(),a=[(0,A.get)(t,i)],s=(0,A.get)(t,this.childrenColumnName);if(!(0,A.isEmpty)(s)){const e=(0,A.map)((0,A.filter)(s,(e=>(0,A.isEmpty)((0,A.get)(e,this.childrenColumnName)))),i);a.push(...e)}this.expandedRowKeys=e?[...this.expandedRowKeys,...a]:(0,A.pull)(this.expandedRowKeys,...a),this._render()}(0,o.A)(Ai,this,we).emit({expanded:e,record:t})})),(0,a.A)(this,"_handleOnExpandedRowsChange",(e=>{(0,o.A)(Ai,this,ke).emit({expandedRows:e})})),(0,a.A)(this,"_handleOnDrag",(e=>{(0,o.A)(Ai,this,Ee).emit({data:e})})),(0,a.A)(this,"_getAllRows",(()=>{const e=[];return C(this._dataSource,this.childrenColumnName,e),e})),(0,a.A)(this,"_handleDefaultSelectAll",(()=>{this._isInSelect=!0;const e=this._getRowKey();return this._selectedRows=this._getAllRows(),this.selectedRowKeys=(0,A.map)(this._selectedRows,e),this.selectedRowKeys})),(0,a.A)(this,"_initConfigProps",(()=>{var e;const t={current:this.page,pageSize:this.pageSize,total:(0,h.A)(ga,this),showSizeChanger:!0,pageSizeOptions:["10","20","50"],showTotal:e=>{var t;return p().createElement(p().Fragment,null,p().createElement("span",{className:"totalText"},"共 ",p().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())}},i=this._getRowKey();let a;this.rowDisabledConfig&&(a=Array.isArray(this.rowDisabledConfig)?this.rowDisabledConfig:[this.rowDisabledConfig]);const s={...i?{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,A.isEmpty)(this._disabledChildrenKeys)&&this._disabledChildrenKeys.includes((0,A.get)(e,i))?{disabled:!0}:a?{disabled:a.some((t=>{const{field:i,value:a,operator:s}=t,r=k[s];return null==r?void 0:r(a,(0,A.get)(e,i))}))}:{}};this.configProps?(this._finalConfigProps=(0,A.cloneDeep)(this.configProps),!1!==this.configProps.pagination&&(this._finalConfigProps.pagination={...t,...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&&t,this._finalConfigProps.size="x-small"==this.size?"":this.size);const r=(null===(e=this.configProps)||void 0===e?void 0:e.rowSelection)??this.rowSelection;r?this._finalConfigProps.rowSelection=!0===r?{...s,type:this.type??"checkbox"}:{...s,type:this.type??"checkbox",...r,...s.selectedRowKeys?{selectedRowKeys:s.selectedRowKeys}:{}}:this.type?this._finalConfigProps.rowSelection={...s,type:this.type}:this._finalConfigProps.rowSelection=!1,this._columns&&(this._columns=this._columns.map((e=>{if((0,A.isNil)(e.key)&&(e.key=e.dataIndex),e.sorter&&(e.sortOrder=this.sort===e.key&&!(0,A.isNil)(this.order)&&(this._fields.ascend===this.order?"ascend":"descend")),e.filters){var t;const i=(0,w.getHistory)(),a=new URLSearchParams(i.location.search).get(e.key)??(null===(t=(0,A.get)(this.filters,e.key))||void 0===t?void 0:t.join(","));(0,A.isNil)(a)||(0,A.isEmpty)(a)?(e.filtered=!1,e.filteredValue=[]):(e.filtered=!0,e.filteredValue=a.split(",").map((t=>{var i;return(null===(i=(0,A.find)(e.filters,(e=>String(e.value)===t)))||void 0===i?void 0:i.value)??t})))}return e})))}))}set columns(e){this._columns=e,this._render()}get columns(){return this._columns}set dataSource(e){var t;(this._isInSelect=!1,this._originalDataSource=e,this._dataSource=(0,A.cloneDeep)(this._fields.dataSource?(0,A.get)(e,this._fields.dataSource):e),this._pureSource=(0,A.cloneDeep)(this._dataSource),this.stripEmptyExpandableChildren)&&E((null===(t=this.configProps)||void 0===t||null===(t=t.expandable)||void 0===t?void 0:t.childrenColumnName)||"children",this._dataSource);(0,l.A)(ga,this,(0,A.get)(e,this._fields.total)),this.page=(0,A.get)(e,"page")??this.page??1,this.pageSize=(0,A.get)(e,"page_size")??(0,A.get)(e,"pageSize")??this.pageSize??10,this._render()}get showCard(){return(0,h.A)(Ci,this)}set showCard(e){(0,l.A)(Ci,this,e)}get rowSelection(){return(0,h.A)(Ei,this)}set rowSelection(e){(0,l.A)(Ei,this,e)}get rowKey(){return(0,h.A)(Si,this)}set rowKey(e){(0,l.A)(Si,this,e)}get hiddenColumns(){return(0,h.A)(Wi,this)}set hiddenColumns(e){(0,l.A)(Wi,this,e)}get showSelectInfo(){return(0,h.A)(Mi,this)}set showSelectInfo(e){(0,l.A)(Mi,this,e)}get filters(){return(0,h.A)(zi,this)}set filters(e){(0,l.A)(zi,this,e)}get configProps(){return(0,h.A)(Ri,this)}set configProps(e){(0,l.A)(Ri,this,e)}get sort(){return(0,h.A)(_i,this)}set sort(e){(0,l.A)(_i,this,e)}get order(){return(0,h.A)(Ni,this)}set order(e){(0,l.A)(Ni,this,e)}get rowDisabledConfig(){return(0,h.A)(Bi,this)}set rowDisabledConfig(e){(0,l.A)(Bi,this,e)}get expandedRowBrick(){return(0,h.A)(Ii,this)}set expandedRowBrick(e){(0,l.A)(Ii,this,e)}get expandIcon(){return(0,h.A)(Di,this)}set expandIcon(e){(0,l.A)(Di,this,e)}get expandIconAsCell(){return(0,h.A)(Pi,this)}set expandIconAsCell(e){(0,l.A)(Pi,this,e)}get expandIconColumnIndex(){return(0,h.A)(Ki,this)}set expandIconColumnIndex(e){(0,l.A)(Ki,this,e)}get expandRowByClick(){return(0,h.A)(Ti,this)}set expandRowByClick(e){(0,l.A)(Ti,this,e)}get optimizedColumns(){return(0,h.A)(Ui,this)}set optimizedColumns(e){(0,l.A)(Ui,this,e)}get stripEmptyExpandableChildren(){return(0,h.A)(Li,this)}set stripEmptyExpandableChildren(e){(0,l.A)(Li,this,e)}get defaultExpandAllRows(){return(0,h.A)(Fi,this)}set defaultExpandAllRows(e){(0,l.A)(Fi,this,e)}get ellipsisInfo(){return(0,h.A)(Oi,this)}set ellipsisInfo(e){(0,l.A)(Oi,this,e)}get expandedRowKeys(){return(0,h.A)(Hi,this)}set expandedRowKeys(e){(0,l.A)(Hi,this,e)}get selectAllChildren(){return(0,h.A)(qi,this)}set selectAllChildren(e){(0,l.A)(qi,this,e)}get defaultSelectAll(){return(0,h.A)($i,this)}set defaultSelectAll(e){(0,l.A)($i,this,e)}get childrenColumnName(){return(0,h.A)(ji,this)}set childrenColumnName(e){(0,l.A)(ji,this,e)}get sortable(){return(0,h.A)(Qi,this)}set sortable(e){(0,l.A)(Qi,this,e)}set fields(e){this._fields={...this._fields,...e},this._render()}get frontSearch(){return(0,h.A)(Zi,this)}set frontSearch(e){(0,l.A)(Zi,this,e)}get frontSearchQuery(){return(0,h.A)(Vi,this)}set frontSearchQuery(e){(0,l.A)(Vi,this,e)}get exactSearch(){return(0,h.A)(Xi,this)}set exactSearch(e){(0,l.A)(Xi,this,e)}get frontSearchFilterKeys(){return(0,h.A)(Gi,this)}set frontSearchFilterKeys(e){(0,l.A)(Gi,this,e)}get page(){return(0,h.A)(Yi,this)}set page(e){(0,l.A)(Yi,this,e)}get pageSize(){return(0,h.A)(Ji,this)}set pageSize(e){(0,l.A)(Ji,this,e)}get scrollConfigs(){return(0,h.A)(ea,this)}set scrollConfigs(e){(0,l.A)(ea,this,e)}get qField(){return(0,h.A)(ta,this)}set qField(e){(0,l.A)(ta,this,e)}get tableDraggable(){return(0,h.A)(ia,this)}set tableDraggable(e){(0,l.A)(ia,this,e)}get zebraPattern(){return(0,h.A)(aa,this)}set zebraPattern(e){(0,l.A)(aa,this,e)}get storeCheckedByUrl(){return(0,h.A)(sa,this)}set storeCheckedByUrl(e){(0,l.A)(sa,this,e)}get extraRows(){return(0,h.A)(ra,this)}set extraRows(e){(0,l.A)(ra,this,e)}get autoSelectParentWhenAllChildrenSelected(){return(0,h.A)(na,this)}set autoSelectParentWhenAllChildrenSelected(e){(0,l.A)(na,this,e)}get thTransparent(){return(0,h.A)(oa,this)}set thTransparent(e){(0,l.A)(oa,this,e)}get showHeader(){return(0,h.A)(la,this)}set showHeader(e){(0,l.A)(la,this,e)}get pagination(){return(0,h.A)(ha,this)}set pagination(e){(0,l.A)(ha,this,e)}get size(){return(0,h.A)(da,this)}set size(e){(0,l.A)(da,this,e)}get type(){return(0,h.A)(ca,this)}set type(e){(0,l.A)(ca,this,e)}get shouldUpdateUrlParams(){return(0,h.A)(pa,this)}set shouldUpdateUrlParams(e){(0,l.A)(pa,this,e)}get shouldRenderWhenUrlParamsUpdate(){return(0,h.A)(ua,this)}set shouldRenderWhenUrlParamsUpdate(e){(0,l.A)(ua,this,e)}get processedDataSource(){return this._dataSource}get processConfigProps(){return this._finalConfigProps}get processedColumns(){return this.getModifyColumns()}get selectedRowKeys(){return(0,h.A)(ma,this)}set selectedRowKeys(e){(0,l.A)(ma,this,e)}filterSourceData(e){const t=this.exactSearch?e.detail.q.trim():e.detail.q.trim().toLowerCase();if(this.shouldUpdateUrlParams){const e=(0,w.getHistory)(),i=new URLSearchParams(e.location.search);i.set("page","1"),t?(i.set(this.qField,t),e.push(`?${i}`,{notify:!this.frontSearch})):(i.delete(this.qField),e.push(`?${i}`,{notify:!this.frontSearch})),this.page=1}this.frontSearchQuery=t}handleFrontendDataChange(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(this.shouldUpdateUrlParams){const e=(0,w.getHistory)(),t=new URLSearchParams(e.location.search);this.frontSearchQuery=t.get(this.qField)}let i=[];i=this.handleFrontendFilterSource(e,this.frontSearchQuery||"",t);const a=(0,A.isNil)(this.order)?null:this._fields.ascend===this.order?"ascend":"descend";return i=this.handleFrontendSorter(i,{columnKey:this.sort,order:a}),i=this.handleFrontendFilters(i),(0,l.A)(ga,this,i.length),i}handleFrontendFilterSource(e,t,i,a){if(!t)return e;const s=[];return a||(a=this.frontSearchFilterKeys||i.map((e=>e.dataIndex))),e.forEach((e=>{var r;const n=e[this.childrenColumnName];if(n){const r=this.handleFrontendFilterSource(n,t,i,a);if(r.length>0)return void s.push({...e,[this.childrenColumnName]:r})}(null===(r=a)||void 0===r?void 0:r.some((i=>{const a=(0,A.get)(e,i);return!(0,A.isNil)(a)&&(this.exactSearch?a===t:JSON.stringify(a).toLowerCase().includes(t))})))&&s.push(e)})),s}handleFrontendSorter(e,t){const i=e||[],{columnKey:a,order:s}=t;if(!a||!s)return e;let r=1;return"descend"===s?r=-1:"ascend"===s&&(r=1),void 0!==r&&(i.sort(((e,t)=>{const i=(0,A.get)(e,a),s=(0,A.get)(t,a);if((0,A.isNil)(i)){if(!(0,A.isNil)(s))return 1}else if((0,A.isNil)(s))return-1;return i==s?0:i>s?r:-r})),i.forEach((e=>{const i=e[this.childrenColumnName];i&&this.handleFrontendSorter(i,t)}))),i}handleFrontendFilters(e){let t=e||[];const i=(0,A.map)(this.filters,((e,t)=>({key:t,value:e}))).filter((e=>!(0,A.isNil)(e.value)&&0!==e.value.length));return t=t.filter((e=>(0,A.every)(i,(t=>{var i;return(null===(i=t.value)||void 0===i?void 0:i.includes((0,A.get)(e,t.key)))??!0})))),t}frontendSearch(e,t,i){this.sort=(0,A.isNil)(i.order)?null:i.columnKey,this.order=(0,A.isNil)(i.order)?null:this._fields[i.order]}expandAll(){const e=[],t=this._getRowKey();this._dataSource&&v(this._dataSource,t,this.childrenColumnName,e),this.expandedRowKeys=e}getModifyColumns(){let e=this._columns;return this._columns&&this.hiddenColumns&&(e=this._columns.filter((e=>{var t;return!(null!==(t=this.hiddenColumns)&&void 0!==t&&t.includes(e.dataIndex??e.key))}))),!1===this.sortable&&(e=(0,A.map)(e,(e=>(e.sorter=!1,e)))),e}render(){return this.frontSearch&&(this._dataSource=this.handleFrontendDataChange(this._pureSource,this._columns)),this._initConfigProps(),p().createElement(j,{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}}Q=Aa,({e:[X,G,Y,J,ee,te,ie,ae,se,re,ne,oe,le,he,de,ce,pe,ue,ge,me,Ae,we,be,ye,fe,ke,xe,ve,Ce,Ee,Se,We,Me,ze,Re,_e,Ne,Be,Ie,De,Pe,Ke,Te,Ue,Le,Fe,Oe,He,qe,$e,je,Qe,Ze,Ve,Xe,Ge,Ye,Je,et,tt,it,at,st,rt,nt,ot,lt,ht,dt,ct,pt,ut,gt,mt,At,wt,bt,yt,ft,kt,xt,vt,Ct,Et,St,Wt,Mt,zt,Rt,_t,Nt,Bt,It,Dt,Pt,Kt,Tt,Ut,Lt,Ft,Ot,Ht,qt,$t,jt,Qt,Zt,Vt,Xt,Gt,Yt,Jt,ei,ti,ii,ai,si,ri,ni,oi,li,hi,Z],c:[gi,V]}=(0,d.A)(Q,[di("eo-table",{styleTexts:[m.A],alias:["advanced.general-table"]})],[[pi({type:"page.update"}),1,"pageUpdate",e=>(0,h.A)(mi,e),(e,t)=>(0,l.A)(mi,e,t)],[pi({type:"filter.update"}),1,"filterUpdate",e=>(0,h.A)(wi,e),(e,t)=>(0,l.A)(wi,e,t)],[pi({type:"select.update"}),1,"selectUpdate",e=>(0,h.A)(bi,e),(e,t)=>(0,l.A)(bi,e,t)],[pi({type:"select.row.keys.update"}),1,"selectRowKeysUpdate",e=>(0,h.A)(yi,e),(e,t)=>(0,l.A)(yi,e,t)],[pi({type:"sort.update",cancelable:!0}),1,"sortUpdate",e=>(0,h.A)(fi,e),(e,t)=>(0,l.A)(fi,e,t)],[pi({type:"row.expand"}),1,"rowExpand",e=>(0,h.A)(ki,e),(e,t)=>(0,l.A)(ki,e,t)],[pi({type:"expand.rows.change"}),1,"expandRowsChange",e=>(0,h.A)(xi,e),(e,t)=>(0,l.A)(xi,e,t)],[pi({type:"row.drag"}),1,"rowDrag",e=>(0,h.A)(vi,e),(e,t)=>(0,l.A)(vi,e,t)],[ci({type:Boolean}),1,"showCard"],[ci({attribute:!1}),1,"rowSelection"],[ci(),1,"rowKey"],[ci({attribute:!1}),1,"hiddenColumns"],[ci({type:Boolean}),1,"showSelectInfo"],[ci({attribute:!1}),1,"filters"],[ci({attribute:!1}),1,"configProps"],[ci(),1,"sort"],[ci({attribute:!1}),1,"order"],[ci({attribute:!1}),1,"rowDisabledConfig"],[ci({attribute:!1}),1,"expandedRowBrick"],[ci({attribute:!1}),1,"expandIcon"],[ci({attribute:!1}),1,"expandIconAsCell"],[ci({type:Number}),1,"expandIconColumnIndex"],[ci({type:Boolean}),1,"expandRowByClick"],[ci({attribute:!1}),1,"optimizedColumns"],[ci({attribute:!1}),1,"stripEmptyExpandableChildren"],[ci({type:Boolean}),1,"defaultExpandAllRows"],[ci({type:Boolean}),1,"ellipsisInfo"],[ci({attribute:!1}),1,"expandedRowKeys"],[ci({type:Boolean}),1,"selectAllChildren"],[ci({type:Boolean}),1,"defaultSelectAll"],[ci({attribute:!1}),1,"childrenColumnName"],[ci({attribute:!1}),1,"sortable"],[ci({type:Boolean}),1,"frontSearch"],[ci(),1,"frontSearchQuery"],[ci({type:Boolean}),1,"exactSearch"],[ci({attribute:!1}),1,"frontSearchFilterKeys"],[ci({type:Number}),1,"page"],[ci({type:Number}),1,"pageSize"],[ci({attribute:!1}),1,"scrollConfigs"],[ci(),1,"qField"],[ci({type:Boolean}),1,"tableDraggable"],[ci({type:Boolean}),1,"zebraPattern"],[ci({type:Boolean}),1,"storeCheckedByUrl"],[ci({attribute:!1}),1,"extraRows"],[ci({type:Boolean}),1,"autoSelectParentWhenAllChildrenSelected"],[ci({type:Boolean}),1,"thTransparent"],[ci({type:Boolean}),1,"showHeader"],[ci({attribute:!1}),1,"pagination"],[ci(),1,"size"],[ci({attribute:!1}),1,"type"],[ci({type:Boolean}),1,"shouldUpdateUrlParams"],[ci({type:Boolean}),1,"shouldRenderWhenUrlParamsUpdate"],[ci({attribute:!1}),1,"selectedRowKeys"],[ui(),2,"filterSourceData"],[ui(),2,"expandAll"]],0,(e=>ga.has((0,n.A)(e))),g.ReactNextElement)),V();var wa,ba=i(16768),ya=i(97039),fa=i(99492);let ka,xa,va,Ca,Ea,Sa,Wa,Ma,za;const{method:Ra,property:_a}=(0,u.createDecorators)();var Na=new WeakMap,Ba=new WeakSet,Ia=new WeakMap,Da=new WeakMap,Pa=new WeakMap,Ka=new WeakMap,Ta=new WeakMap,Ua=new WeakMap;class La extends g.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,Ba),(0,r.A)(this,Na,(ka(this),!1)),(0,r.A)(this,Ia,"normal"),(0,r.A)(this,Da,!1),(0,r.A)(this,Pa,xa(this)),(0,r.A)(this,Ka,(va(this),Ca(this))),(0,r.A)(this,Ta,(Ea(this),Sa(this))),(0,r.A)(this,Ua,(Wa(this),Ma(this))),za(this)}get isFormItemElement(){return!0}set validateState(e){(0,fa.A)(Ba,qa,this,e),this._render()}get validateState(){return(0,o.A)(Ba,this,Ha)}set notRender(e){this.hidden=e,(0,fa.A)(Ba,Oa,this,e),this._render()}get notRender(){return(0,o.A)(Ba,this,Fa)}get $bindFormItem(){return(0,o.A)(Ba,this,$a)}set $bindFormItem(e){(0,fa.A)(Ba,ja,this,e),this._render()}get helpBrick(){return(0,h.A)(Pa,this)}set helpBrick(e){(0,l.A)(Pa,this,e)}get labelBrick(){return(0,h.A)(Ka,this)}set labelBrick(e){(0,l.A)(Ka,this,e)}get labelCol(){return(0,h.A)(Ta,this)}set labelCol(e){(0,l.A)(Ta,this,e)}get wrapperCol(){return(0,h.A)(Ua,this)}set wrapperCol(e){(0,l.A)(Ua,this,e)}setNotRender(e){this.notRender=e}getFormElement(){let e=this;for(;(e=e.parentNode)&&e&&!e.isFormElement;);return e}}function Fa(e){return(0,h.A)(Na,e)}function Oa(e,t){(0,l.A)(Na,e,t)}function Ha(e){return(0,h.A)(Ia,e)}function qa(e,t){(0,l.A)(Ia,e,t)}function $a(e){return(0,h.A)(Da,e)}function ja(e,t){(0,l.A)(Da,e,t)}wa=La,[xa,va,Ca,Ea,Sa,Wa,Ma,za,ka]=(0,d.A)(wa,[],[[_a({attribute:!1}),1,"helpBrick"],[_a({attribute:!1}),1,"labelBrick"],[_a({attribute:!1}),1,"labelCol"],[_a({attribute:!1}),1,"wrapperCol"],[Ra(),2,"setNotRender"],[Ra(),2,"getFormElement"]],0,void 0,g.ReactNextElement).e;var Qa,Za=i(71058);let Va,Xa,Ga,Ya,Ja,es,ts,is,as,ss,rs,ns,os,ls,hs,ds,cs,ps,us,gs,ms,As,ws,bs,ys,fs,ks,xs,vs,Cs,Es,Ss,Ws,Ms,zs,Rs,_s,Ns,Bs,Is,Ds;const{defineElement:Ps,property:Ks,event:Ts}=(0,u.createDecorators)(),Us=(0,g.wrapBrick)("eo-icon"),Ls=(0,g.wrapBrick)("eo-form-item");let Fs;var Os=new WeakMap,Hs=new WeakMap,qs=new WeakMap,$s=new WeakMap,js=new WeakMap,Qs=new WeakMap,Zs=new WeakMap,Vs=new WeakMap,Xs=new WeakMap,Gs=new WeakMap,Ys=new WeakMap,Js=new WeakMap,er=new WeakMap,tr=new WeakMap,ir=new WeakMap,ar=new WeakMap,sr=new WeakMap,rr=new WeakMap,nr=new WeakMap,or=new WeakSet;function lr(e){const{shadowRoot:t,options:i,fieldNames:a,value:s,placeholder:r,disabled:n,multiple:o,allowClear:l,showSearch:h,expandTrigger:d,size:u,limit:g,popupPlacement:m,cascaderStyle:A,suffixIcon:w,maxTagCount:b,onChange:y}=e,k=(0,I.useCurrentTheme)(),x=(0,c.useMemo)((()=>(0,D.VC)()),[]);return p().createElement(f.Ay,{theme:{algorithm:"dark-v2"===k?ba.A.darkAlgorithm:ba.A.defaultAlgorithm}},p().createElement(D.N7,{container:t,cache:x},p().createElement(ya.A,{getPopupContainer:e=>e.parentElement,allowClear:l,disabled:n,multiple:o,expandTrigger:d,fieldNames:a,placeholder:r,size:u,showSearch:h&&{limit:g,filter:(e,t)=>{const i=(null==a?void 0:a.label)||"label",s=e.split(" ").filter((e=>e)).map((e=>e.toLocaleLowerCase()));for(let e=0;e<s.length;e++)if(!t.some((t=>t[i].toLowerCase().includes(s[e]))))return!1;return!0}},placement:m,style:A,suffixIcon:w&&p().createElement(Us,w),maxTagCount:b,value:s,options:i,onChange:(e,t)=>null==y?void 0:y(e,t)})))}Qa=class extends La{constructor(){super(...arguments),(0,s.A)(this,or),(0,r.A)(this,Os,Xa(this)),(0,r.A)(this,Hs,(Ga(this),Ya(this))),(0,r.A)(this,qs,(Ja(this),es(this))),(0,r.A)(this,$s,(ts(this),is(this))),(0,r.A)(this,js,(as(this),ss(this,{label:"label",value:"value",children:"children"}))),(0,r.A)(this,Qs,(rs(this),ns(this))),(0,r.A)(this,Zs,(os(this),ls(this))),(0,r.A)(this,Vs,(hs(this),ds(this))),(0,r.A)(this,Xs,(cs(this),ps(this))),(0,r.A)(this,Gs,(us(this),gs(this,!0))),(0,r.A)(this,Ys,(ms(this),As(this,!0))),(0,r.A)(this,Js,(ws(this),bs(this))),(0,r.A)(this,er,(ys(this),fs(this,"click"))),(0,r.A)(this,tr,(ks(this),xs(this,"bottomLeft"))),(0,r.A)(this,ir,(vs(this),Cs(this))),(0,r.A)(this,ar,(Es(this),Ss(this,50))),(0,r.A)(this,sr,(Ws(this),Ms(this))),(0,r.A)(this,rr,(zs(this),Rs(this))),(0,r.A)(this,nr,(_s(this),Ns(this))),(0,a.A)(this,"handleOnChange",(Ds(this),(e,t)=>{this.value=e,Promise.resolve().then((()=>{(0,o.A)(or,this,Bs).emit({value:e,selectedOptions:t})}))}))}get name(){return(0,h.A)(Os,this)}set name(e){(0,l.A)(Os,this,e)}get label(){return(0,h.A)(Hs,this)}set label(e){(0,l.A)(Hs,this,e)}get required(){return(0,h.A)(qs,this)}set required(e){(0,l.A)(qs,this,e)}get options(){return(0,h.A)($s,this)}set options(e){(0,l.A)($s,this,e)}get fieldNames(){return(0,h.A)(js,this)}set fieldNames(e){(0,l.A)(js,this,e)}get value(){return(0,h.A)(Qs,this)}set value(e){(0,l.A)(Qs,this,e)}get placeholder(){return(0,h.A)(Zs,this)}set placeholder(e){(0,l.A)(Zs,this,e)}get multiple(){return(0,h.A)(Vs,this)}set multiple(e){(0,l.A)(Vs,this,e)}get disabled(){return(0,h.A)(Xs,this)}set disabled(e){(0,l.A)(Xs,this,e)}get allowClear(){return(0,h.A)(Gs,this)}set allowClear(e){(0,l.A)(Gs,this,e)}get showSearch(){return(0,h.A)(Ys,this)}set showSearch(e){(0,l.A)(Ys,this,e)}get suffixIcon(){return(0,h.A)(Js,this)}set suffixIcon(e){(0,l.A)(Js,this,e)}get expandTrigger(){return(0,h.A)(er,this)}set expandTrigger(e){(0,l.A)(er,this,e)}get popupPlacement(){return(0,h.A)(tr,this)}set popupPlacement(e){(0,l.A)(tr,this,e)}get size(){return(0,h.A)(ir,this)}set size(e){(0,l.A)(ir,this,e)}get limit(){return(0,h.A)(ar,this)}set limit(e){(0,l.A)(ar,this,e)}get maxTagCount(){return(0,h.A)(sr,this)}set maxTagCount(e){(0,l.A)(sr,this,e)}get cascaderStyle(){return(0,h.A)(rr,this)}set cascaderStyle(e){(0,l.A)(rr,this,e)}render(){return p().createElement(Ls,{exportparts:"message",curElement:this,formElement:this.getFormElement(),name:this.name,label:this.label,required:this.required,notRender:this.notRender,trigger:"handleOnChange"},p().createElement(lr,{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,Ga,Ya,Ja,es,ts,is,as,ss,rs,ns,os,ls,hs,ds,cs,ps,us,gs,ms,As,ws,bs,ys,fs,ks,xs,vs,Cs,Es,Ss,Ws,Ms,zs,Rs,_s,Ns,Bs,Is,Ds],c:[Fs,Va]}=(0,d.A)(Qa,[Ps("eo-cascader",{alias:["advanced.general-cascader"],styleTexts:[Za.A]})],[[Ks(),1,"name"],[Ks(),1,"label"],[Ks({type:Boolean}),1,"required"],[Ks({attribute:!1}),1,"options"],[Ks({attribute:!1}),1,"fieldNames"],[Ks({attribute:!1}),1,"value"],[Ks(),1,"placeholder"],[Ks({type:Boolean}),1,"multiple"],[Ks({type:Boolean}),1,"disabled"],[Ks({type:Boolean}),1,"allowClear"],[Ks({type:Boolean}),1,"showSearch"],[Ks({attribute:!1}),1,"suffixIcon"],[Ks(),1,"expandTrigger"],[Ks(),1,"popupPlacement"],[Ks(),1,"size"],[Ks({type:Number}),1,"limit"],[Ks({attribute:!1}),1,"maxTagCount"],[Ks({attribute:!1}),1,"cascaderStyle"],[Ts({type:"cascader.change"}),1,"changeEvent",e=>(0,h.A)(nr,e),(e,t)=>(0,l.A)(nr,e,t)]],0,(e=>or.has((0,n.A)(e))),La)),Va();var hr,dr=i(81634),cr=i(49385);let pr,ur,gr,mr,Ar,wr,br,yr,fr,kr,xr,vr,Cr,Er,Sr,Wr,Mr,zr,Rr,_r,Nr,Br,Ir,Dr,Pr,Kr,Tr,Ur,Lr,Fr,Or,Hr,qr,$r,jr,Qr,Zr,Vr,Xr,Gr,Yr,Jr,en,tn,an,sn,rn,nn,on,ln,hn,dn,cn,pn,un,gn,mn,An,wn,bn,yn,fn,kn,xn,vn,Cn,En,Sn,Wn,Mn;i(34612);const{defineElement:zn,property:Rn,method:_n,event:Nn}=(0,u.createDecorators)();let Bn;var In=new WeakMap,Dn=new WeakMap,Pn=new WeakMap,Kn=new WeakMap,Tn=new WeakMap,Un=new WeakMap,Ln=new WeakMap,Fn=new WeakMap,On=new WeakMap,Hn=new WeakMap,qn=new WeakMap,$n=new WeakMap,jn=new WeakMap,Qn=new WeakMap,Zn=new WeakMap,Vn=new WeakMap,Xn=new WeakMap,Gn=new WeakMap,Yn=new WeakMap,Jn=new WeakMap,eo=new WeakMap,to=new WeakMap,io=new WeakMap,ao=new WeakSet,so=new WeakMap,ro=new WeakMap,no=new WeakMap,oo=new WeakMap,lo=new WeakMap,ho=new WeakMap,co=new WeakMap,po=new WeakMap,uo=new WeakMap,go=new WeakMap,mo=new WeakMap,Ao=new WeakMap,wo=new WeakMap;class bo extends g.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,ao),(0,r.A)(this,In,(pr(this),(0,c.createRef)())),(0,r.A)(this,Dn,gr(this,"key")),(0,r.A)(this,Pn,(mr(this),Ar(this))),(0,r.A)(this,Kn,(wr(this),br(this))),(0,r.A)(this,Tn,(yr(this),fr(this))),(0,r.A)(this,Un,(kr(this),xr(this))),(0,r.A)(this,Ln,(vr(this),Cr(this))),(0,r.A)(this,Fn,(Er(this),Sr(this))),(0,r.A)(this,On,(Wr(this),Mr(this))),(0,r.A)(this,Hn,(zr(this),Rr(this))),(0,r.A)(this,qn,(_r(this),Nr(this))),(0,r.A)(this,$n,(Br(this),Ir(this))),(0,r.A)(this,jn,(Dr(this),Pr(this))),(0,r.A)(this,Qn,(Kr(this),Tr(this))),(0,r.A)(this,Zn,(Ur(this),Lr(this,"children"))),(0,r.A)(this,Vn,(Fr(this),Or(this))),(0,r.A)(this,Xn,(Hr(this),qr(this))),(0,r.A)(this,Gn,($r(this),jr(this,"large"))),(0,r.A)(this,Yn,(Qr(this),Zr(this,!0))),(0,r.A)(this,Jn,void Vr(this)),(0,r.A)(this,eo,Xr(this,{x:!0})),(0,r.A)(this,to,(Gr(this),Yr(this))),(0,r.A)(this,io,(Jr(this),en(this))),(0,r.A)(this,so,(sn(this),e=>{(0,o.A)(ao,this,tn).emit(e)})),(0,r.A)(this,ro,rn(this)),(0,r.A)(this,no,(ln(this),e=>{(0,o.A)(ao,this,nn).emit(e)})),(0,r.A)(this,oo,hn(this)),(0,r.A)(this,lo,(pn(this),e=>{(0,o.A)(ao,this,dn).emit(e)})),(0,r.A)(this,ho,un(this)),(0,r.A)(this,co,(An(this),e=>{(0,o.A)(ao,this,gn).emit(e)})),(0,r.A)(this,po,wn(this)),(0,r.A)(this,uo,(fn(this),e=>{(0,o.A)(ao,this,bn).emit(e)})),(0,r.A)(this,go,kn(this)),(0,r.A)(this,mo,(Cn(this),e=>{(0,o.A)(ao,this,xn).emit(e)})),(0,r.A)(this,Ao,En(this)),(0,r.A)(this,wo,(Mn(this),e=>{(0,o.A)(ao,this,Sn).emit(e)}))}get rowKey(){return(0,h.A)(Dn,this)}set rowKey(e){(0,l.A)(Dn,this,e)}get columns(){return(0,h.A)(Pn,this)}set columns(e){(0,l.A)(Pn,this,e)}get cell(){return(0,h.A)(Kn,this)}set cell(e){(0,l.A)(Kn,this,e)}get dataSource(){return(0,h.A)(Tn,this)}set dataSource(e){(0,l.A)(Tn,this,e)}get frontSearch(){return(0,h.A)(Un,this)}set frontSearch(e){(0,l.A)(Un,this,e)}get pagination(){return(0,h.A)(Ln,this)}set pagination(e){(0,l.A)(Ln,this,e)}get multiSort(){return(0,h.A)(Fn,this)}set multiSort(e){(0,l.A)(Fn,this,e)}get sort(){return(0,h.A)(On,this)}set sort(e){(0,l.A)(On,this,e)}get rowSelection(){return(0,h.A)(Hn,this)}set rowSelection(e){(0,l.A)(Hn,this,e)}get selectedRowKeys(){return(0,h.A)(qn,this)}set selectedRowKeys(e){(0,l.A)(qn,this,e)}get hiddenColumns(){return(0,h.A)($n,this)}set hiddenColumns(e){(0,l.A)($n,this,e)}get expandable(){return(0,h.A)(jn,this)}set expandable(e){(0,l.A)(jn,this,e)}get expandedRowKeys(){return(0,h.A)(Qn,this)}set expandedRowKeys(e){(0,l.A)(Qn,this,e)}get childrenColumnName(){return(0,h.A)(Zn,this)}set childrenColumnName(e){(0,l.A)(Zn,this,e)}get rowDraggable(){return(0,h.A)(Vn,this)}set rowDraggable(e){(0,l.A)(Vn,this,e)}get searchFields(){return(0,h.A)(Xn,this)}set searchFields(e){(0,l.A)(Xn,this,e)}get size(){return(0,h.A)(Gn,this)}set size(e){(0,l.A)(Gn,this,e)}get showHeader(){return(0,h.A)(Yn,this)}set showHeader(e){(0,l.A)(Yn,this,e)}get bordered(){return(0,h.A)(Jn,this)}set bordered(e){(0,l.A)(Jn,this,e)}get scrollConfig(){return(0,h.A)(eo,this)}set scrollConfig(e){(0,l.A)(eo,this,e)}get optimizedColumns(){return(0,h.A)(to,this)}set optimizedColumns(e){(0,l.A)(to,this,e)}search(e){var t;null===(t=(0,h.A)(In,this).current)||void 0===t||t.search(e)}render(){return p().createElement(cr.F,{ref:(0,h.A)(In,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,h.A)(so,this),onPageSizeChange:(0,h.A)(no,this),onSort:(0,h.A)(lo,this),onRowSelect:(0,h.A)(co,this),onRowExpand:(0,h.A)(uo,this),onExpandedRowsChange:(0,h.A)(mo,this),onRowDrag:(0,h.A)(wo,this)})}}hr=bo,({e:[gr,mr,Ar,wr,br,yr,fr,kr,xr,vr,Cr,Er,Sr,Wr,Mr,zr,Rr,_r,Nr,Br,Ir,Dr,Pr,Kr,Tr,Ur,Lr,Fr,Or,Hr,qr,$r,jr,Qr,Zr,Vr,Xr,Gr,Yr,Jr,en,tn,an,sn,rn,nn,on,ln,hn,dn,cn,pn,un,gn,mn,An,wn,bn,yn,fn,kn,xn,vn,Cn,En,Sn,Wn,Mn,pr],c:[Bn,ur]}=(0,d.A)(hr,[zn("eo-next-table",{styleTexts:[dr.A]})],[[Rn(),1,"rowKey"],[Rn({attribute:!1}),1,"columns"],[Rn({attribute:!1}),1,"cell"],[Rn({attribute:!1}),1,"dataSource"],[Rn({type:Boolean}),1,"frontSearch"],[Rn({attribute:!1}),1,"pagination"],[Rn({type:Boolean}),1,"multiSort"],[Rn({attribute:!1}),1,"sort"],[Rn({attribute:!1}),1,"rowSelection"],[Rn({attribute:!1}),1,"selectedRowKeys"],[Rn({attribute:!1}),1,"hiddenColumns"],[Rn({attribute:!1}),1,"expandable"],[Rn({attribute:!1}),1,"expandedRowKeys"],[Rn(),1,"childrenColumnName"],[Rn({type:Boolean}),1,"rowDraggable"],[Rn({attribute:!1}),1,"searchFields"],[Rn(),1,"size"],[Rn({type:Boolean}),1,"showHeader"],[Rn({attribute:!1}),1,"scrollConfig"],[Rn({attribute:!1}),1,"optimizedColumns"],[_n(),2,"search"],[Nn({type:"page.change"}),1,"pageChangeEvent",e=>(0,h.A)(io,e),(e,t)=>(0,l.A)(io,e,t)],[Nn({type:"page.size.change"}),1,"pageSizeChangeEvent",e=>(0,h.A)(ro,e),(e,t)=>(0,l.A)(ro,e,t)],[Nn({type:"sort.change"}),1,"sortChangeEvent",e=>(0,h.A)(oo,e),(e,t)=>(0,l.A)(oo,e,t)],[Nn({type:"row.select"}),1,"rowSelectEvent",e=>(0,h.A)(ho,e),(e,t)=>(0,l.A)(ho,e,t)],[Nn({type:"row.expand"}),1,"rowExpandEvent",e=>(0,h.A)(po,e),(e,t)=>(0,l.A)(po,e,t)],[Nn({type:"expanded.rows.change"}),1,"expandedRowsChangeEvent",e=>(0,h.A)(go,e),(e,t)=>(0,l.A)(go,e,t)],[Nn({type:"row.drag"}),1,"rowDragEvent",e=>(0,h.A)(Ao,e),(e,t)=>(0,l.A)(Ao,e,t)]],0,(e=>wo.has((0,n.A)(e))),g.ReactNextElement)),ur();var yo,fo=i(52681),ko=i(6055),xo=i(45833),vo=i(91116);let Co,Eo,So,Wo,Mo,zo,Ro,_o,No,Bo,Io,Do,Po,Ko,To,Uo,Lo,Fo,Oo,Ho,qo,$o,jo,Qo,Zo,Vo;const{defineElement:Xo,property:Go,event:Yo,method:Jo}=(0,u.createDecorators)(),el=(0,g.wrapBrick)("eo-button"),tl=(0,g.wrapBrick)("eo-dropdown-button",{onActionClick:"action.click"}),il=(0,g.wrapBrick)("eo-icon"),al=(0,g.wrapBrick)("eo-checkbox",{onChange:"change"}),sl=(0,fo.unwrapProvider)("basic.show-dialog"),rl=e=>null!=e&&e.includes(":")?e.split(":")[0]:e,{isAdmin:nl}=ko.auth.getAuth(),ol=(0,c.forwardRef)((function(e,t){let{cardTitle:i="卡片列表",layouts:a,componentList:s=[],isEdit:r,onChange:n,onSave:o,onCancel:l,onActionClick:h}=e;const d=(0,c.useMemo)((()=>(0,xo.WidthProvider)(xo.Responsive)),[]),u=(0,c.useRef)(null),g=(0,c.useRef)(null),m=(0,c.useRef)(a??[]),[A,w]=(0,c.useState)(m.current),[b,y]=(0,c.useState)(3),[f,k]=(0,c.useState)(),x=(0,c.useCallback)((e=>{m.current=e,w(e)}),[]);(0,c.useImperativeHandle)(t,(()=>({setLayouts:x})));const v=(0,c.useCallback)((e=>{x(e),null==n||n(e)}),[n,x]),C=(0,c.useCallback)((e=>{if(!r)return;let t=!0;for(let i=0;i<e.length;i++){const{x:a,w:s,y:r,h:n,i:o,minH:l}=e[i];if(s>1&&a>0){t=!1;break}if(1===s&&a<2){const t=e.find((e=>e.i!==o&&1===e.w&&e.y===r&&a<2));t&&(e[i].minH=e[i].minH??n,e[i].h=Math.max(t.h,n))}else e[i].h=l??n,e[i].minH=void 0}v(t?e:m.current.map((e=>{const{w:t,i}=e,a=`${rl(i)}:${Math.random()}`;let s=e.x;return t>1&&s>0&&(s=0),{...e,x:s,i:a}})))}),[v,r]),E=(0,c.useCallback)((e=>{const t=e.detail.map((e=>e.value)),i=A.map((e=>rl(e.i))),a=e.detail.filter((e=>!i.includes(e.key))).map((e=>({...e.position,x:e.w>1?0:2*A.length%b,y:1/0})));v(A.filter((e=>t.includes(rl(e.i)))).concat(a))}),[A,v,b]),S=()=>{v([])},W=(0,c.useCallback)((()=>{null==o||o(A.map((e=>({...e,i:rl(e.i)}))))}),[A,o]),M=(0,c.useCallback)(((e,t)=>{e.stopPropagation(),v(A.filter((e=>rl(e.i)!==t.key))??[])}),[v,A]),z=e=>{e.preventDefault()},R=(0,c.useMemo)((()=>A.map((e=>{const t=s.find((t=>t.key===rl(e.i)));return t?p().createElement("div",{key:e.i,"data-grid":{...t.position??{},...e},style:t.style,className:"drag-box"},r&&p().createElement("div",{className:"edit-mask",onMouseDown:z}),p().createElement(I.ReactUseBrick,{useBrick:t.useBrick}),r&&p().createElement(il,{icon:"delete",lib:"antd",className:"delete-icon",onClick:e=>M(e,t)})):null})).filter(Boolean)),[s,M,A,r]),_=(0,c.useMemo)((()=>s.map((e=>({...e,label:e.title,value:e.key})))),[s]),N=(0,c.useMemo)((()=>A.map((e=>rl(e.i)))),[A]),B=(0,c.useCallback)((()=>{if(g&&r){var e;const{top:t}=(null===(e=g.current)||void 0===e||null===(e=e.getClientRects())||void 0===e?void 0:e[0])??{};void 0!==t&&k({height:document.body.clientHeight-t,overflow:"scroll"})}}),[r]);return(0,c.useEffect)((()=>{if(r)return B(),x(a||[]),window.addEventListener("resize",B),()=>{window.removeEventListener("resize",B)}}),[r,B,a,x]),p().createElement("div",{className:"grid-layout-wrapper",ref:u},r&&p().createElement("div",{className:"component-wrapper"},p().createElement("div",{className:"component-title"},i),p().createElement("div",{className:"component-list"},p().createElement(al,{options:_,value:N,onChange:E}),p().createElement("slot",{name:"toolbar"}))),p().createElement("div",{className:"layout-wrapper",ref:g,style:f},r&&p().createElement("div",{className:"actions-wrapper"},p().createElement(el,{type:"primary",onClick:W},"保存"),p().createElement(el,{onClick:()=>{null==l||l()}},"取消"),p().createElement(tl,{btnText:"更多",icon:{lib:"antd",icon:"down"},actions:[...nl?[{text:"另存为模板",event:"saveAsTemplate"}]:[],{text:"从模版加载",event:"loadFromTemplate"},{text:"清空所有",danger:!0,event:"clear"}],onActionClick:e=>{(e=>{const{event:t}=e;"clear"===t?sl({type:"confirm",title:"清空确认",content:"将清空所有卡片,从零开始编辑,该操作无法撤回。"}).then(S):null==h||h(e,(A??[]).map((e=>({...e,i:rl(e.i)}))))})(e.detail)},"data-testid":"edit-layout-actions"})),p().createElement(d,{className:"layout",draggableCancel:".delete-icon,.edit-actions,.ignore-item",breakpoints:{lg:1300,md:1024,sm:768},rowHeight:1,cols:{lg:3,md:3,sm:r?3:1},isResizable:!1,isDraggable:r,onDrag:(e,t,i)=>{var a;const s=null===(a=u.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:C,onBreakpointChange:(e,t)=>{y(t)}},R)))}));let ll;var hl=new WeakMap,dl=new WeakMap,cl=new WeakMap,pl=new WeakMap,ul=new WeakMap,gl=new WeakMap,ml=new WeakSet,Al=new WeakMap,wl=new WeakMap,bl=new WeakMap,yl=new WeakMap,fl=new WeakMap,kl=new WeakMap,xl=new WeakMap;class vl extends g.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,ml),(0,r.A)(this,hl,(Co(this),(0,c.createRef)())),(0,r.A)(this,dl,So(this)),(0,r.A)(this,cl,(Wo(this),Mo(this))),(0,r.A)(this,pl,(zo(this),Ro(this))),(0,r.A)(this,ul,(_o(this),No(this))),(0,r.A)(this,gl,(Bo(this),Io(this))),(0,r.A)(this,Al,(Ko(this),e=>{(0,o.A)(ml,this,Do).emit(e)})),(0,r.A)(this,wl,To(this)),(0,r.A)(this,bl,(Fo(this),e=>{(0,o.A)(ml,this,Uo).emit(e)})),(0,r.A)(this,yl,Oo(this)),(0,r.A)(this,fl,($o(this),()=>{(0,o.A)(ml,this,Ho).emit()})),(0,r.A)(this,kl,jo(this)),(0,r.A)(this,xl,(Vo(this),(e,t)=>{(0,o.A)(ml,this,Qo).emit({action:e,layouts:t}),e.event&&this.dispatchEvent(new CustomEvent(e.event,{detail:t}))}))}get cardTitle(){return(0,h.A)(dl,this)}set cardTitle(e){(0,l.A)(dl,this,e)}get isEdit(){return(0,h.A)(cl,this)}set isEdit(e){(0,l.A)(cl,this,e)}get layouts(){return(0,h.A)(pl,this)}set layouts(e){(0,l.A)(pl,this,e)}get componentList(){return(0,h.A)(ul,this)}set componentList(e){(0,l.A)(ul,this,e)}setLayouts(e){var t;null===(t=(0,h.A)(hl,this).current)||void 0===t||t.setLayouts(e)}render(){return p().createElement(ol,{cardTitle:this.cardTitle,layouts:this.layouts,componentList:this.componentList,isEdit:this.isEdit,onChange:(0,h.A)(Al,this),onSave:(0,h.A)(bl,this),onCancel:(0,h.A)(fl,this),onActionClick:(0,h.A)(xl,this),ref:(0,h.A)(hl,this)})}}yo=vl,({e:[So,Wo,Mo,zo,Ro,_o,No,Bo,Io,Do,Po,Ko,To,Uo,Lo,Fo,Oo,Ho,qo,$o,jo,Qo,Zo,Vo,Co],c:[ll,Eo]}=(0,d.A)(yo,[Xo("eo-workbench-layout",{styleTexts:[vo.A]})],[[Go(),1,"cardTitle"],[Go({type:Boolean}),1,"isEdit"],[Go({attribute:!1}),1,"layouts"],[Go({attribute:!1}),1,"componentList"],[Yo({type:"change"}),1,"changeEvent",e=>(0,h.A)(gl,e),(e,t)=>(0,l.A)(gl,e,t)],[Yo({type:"save"}),1,"saveEvent",e=>(0,h.A)(wl,e),(e,t)=>(0,l.A)(wl,e,t)],[Yo({type:"cancel"}),1,"cancelEvent",e=>(0,h.A)(yl,e),(e,t)=>(0,l.A)(yl,e,t)],[Yo({type:"action.click"}),1,"actionClickEvent",e=>(0,h.A)(kl,e),(e,t)=>(0,l.A)(kl,e,t)],[Jo(),2,"setLayouts"]],0,(e=>xl.has((0,n.A)(e))),g.ReactNextElement)),Eo();var Cl=i(72591),El=i.n(Cl),Sl=i(1740),Wl=i.n(Sl),Ml=i(88128),zl=i.n(Ml),Rl=i(30855),_l=i.n(Rl),Nl=i(93051),Bl=i.n(Nl),Il=i(73656),Dl=i.n(Il),Pl=i(89739),Kl={};Kl.styleTagTransform=Dl(),Kl.setAttributes=_l(),Kl.insert=zl().bind(null,"head"),Kl.domAPI=Wl(),Kl.insertStyleElement=Bl(),El()(Pl.A,Kl);const Tl=Pl.A&&Pl.A.locals?Pl.A.locals:void 0;var Ul,Ll=i(85689),Fl={};let Ol,Hl,ql,$l,jl,Ql,Zl,Vl,Xl,Gl,Yl,Jl,eh,th,ih,ah,sh,rh,nh,oh,lh,hh,dh,ch,ph,uh,gh,mh;Fl.styleTagTransform=Dl(),Fl.setAttributes=_l(),Fl.insert=zl().bind(null,"head"),Fl.domAPI=Wl(),Fl.insertStyleElement=Bl(),El()(Ll.A,Fl),Ll.A&&Ll.A.locals&&Ll.A.locals;const{defineElement:Ah,property:wh,event:bh,method:yh}=(0,u.createDecorators)(),fh=(0,g.wrapBrick)("eo-button"),kh=(0,g.wrapBrick)("eo-dropdown-button",{onActionClick:"action.click"}),xh=(0,g.wrapBrick)("eo-icon"),vh=(0,g.wrapBrick)("eo-checkbox",{onChange:"change"}),Ch=(0,fo.unwrapProvider)("basic.show-dialog"),Eh=e=>null!=e&&e.includes(":")?e.split(":")[0]:e,{isAdmin:Sh}=ko.auth.getAuth(),Wh=(0,c.forwardRef)((function(e,t){let{cardTitle:i="卡片列表",layouts:a,toolbarBricks:s,componentList:r=[],isEdit:n,onChange:o,onSave:l,onCancel:h,onActionClick:d}=e;const u=(0,c.useMemo)((()=>(0,xo.WidthProvider)(xo.Responsive)),[]),g=(0,c.useRef)(null),m=(0,c.useRef)(null),A=(0,c.useRef)(a??[]),[w,b]=(0,c.useState)(A.current),[y,f]=(0,c.useState)(3),[k,x]=(0,c.useState)(),v=(0,c.useCallback)((e=>{A.current=e,b(e)}),[]);(0,c.useImperativeHandle)(t,(()=>({setLayouts:v})));const C=(0,c.useCallback)((e=>{v(e),null==o||o(e)}),[o,v]),E=(0,c.useCallback)((e=>{if(!n)return;let t=!0;for(let i=0;i<e.length;i++){const{x:a,w:s,y:r,h:n,i:o,minH:l}=e[i];if(s>1&&a>0){t=!1;break}if(1===s&&a<2){const t=e.find((e=>e.i!==o&&1===e.w&&e.y===r&&a<2));t&&(e[i].minH=e[i].minH??n,e[i].h=Math.max(t.h,n))}else e[i].h=l??n,e[i].minH=void 0}C(t?e:A.current.map((e=>{const{w:t,i}=e,a=`${Eh(i)}:${Math.random()}`;let s=e.x;return t>1&&s>0&&(s=0),{...e,x:s,i:a}})))}),[C,n]),S=(0,c.useCallback)((e=>{const t=e.detail.map((e=>e.value)),i=w.map((e=>Eh(e.i))),a=e.detail.filter((e=>!i.includes(e.key))).map((e=>({...e.position,x:e.w>1?0:2*w.length%y,y:1/0})));C(w.filter((e=>t.includes(Eh(e.i)))).concat(a))}),[w,C,y]),W=()=>{C([])},M=(0,c.useCallback)((()=>{null==l||l(w.map((e=>({...e,i:Eh(e.i)}))))}),[w,l]),z=(0,c.useCallback)(((e,t)=>{e.stopPropagation(),C(w.filter((e=>Eh(e.i)!==t.key))??[])}),[C,w]),R=e=>{e.preventDefault()},_=(0,c.useMemo)((()=>w.map((e=>{const t=r.find((t=>t.key===Eh(e.i)));return t?p().createElement("div",{key:e.i,"data-grid":{...t.position??{},...e},style:t.style,className:"drag-box"},n&&p().createElement("div",{className:Tl.editMask,onMouseDown:R}),p().createElement(I.ReactUseBrick,{useBrick:t.useBrick}),n&&p().createElement(xh,{icon:"delete",lib:"antd",className:Tl.deleteIcon,onClick:e=>z(e,t)})):null})).filter(Boolean)),[r,z,w,n]),N=(0,c.useMemo)((()=>r.map((e=>({...e,label:e.title,value:e.key})))),[r]),B=(0,c.useMemo)((()=>w.map((e=>Eh(e.i)))),[w]),D=(0,c.useCallback)((()=>{if(m&&n){var e;const{top:t}=(null===(e=m.current)||void 0===e||null===(e=e.getClientRects())||void 0===e?void 0:e[0])??{};void 0!==t&&x({height:document.body.clientHeight-t,overflow:"scroll"})}}),[n]);return(0,c.useEffect)((()=>{if(n)return D(),v(a||[]),window.addEventListener("resize",D),()=>{window.removeEventListener("resize",D)}}),[n,D,a,v]),p().createElement("div",{className:Tl.gridLayoutWrapper,ref:g},n&&p().createElement("div",{className:Tl.componentWrapper},p().createElement("div",{className:Tl.componentTitle},i),p().createElement("div",{className:Tl.componentList},p().createElement(vh,{options:N,value:B,onChange:S}),(null==s?void 0:s.useBrick)&&p().createElement(I.ReactUseMultipleBricks,{useBrick:s.useBrick}))),p().createElement("div",{className:Tl.layoutWrapper,ref:m,style:k},n&&p().createElement("div",{className:Tl.actionsWrapper},p().createElement(fh,{type:"primary",onClick:M},"保存"),p().createElement(fh,{onClick:()=>{null==h||h()}},"取消"),p().createElement(kh,{btnText:"更多",icon:{lib:"antd",icon:"down"},actions:[...Sh?[{text:"另存为模板",event:"saveAsTemplate"}]:[],{text:"从模版加载",event:"loadFromTemplate"},{text:"清空所有",danger:!0,event:"clear"}],onActionClick:e=>{(e=>{const{event:t}=e;"clear"===t?Ch({type:"confirm",title:"清空确认",content:"将清空所有卡片,从零开始编辑,该操作无法撤回。"}).then(W):null==d||d(e,(w??[]).map((e=>({...e,i:Eh(e.i)}))))})(e.detail)},"data-testid":"edit-layout-actions"})),p().createElement(u,{className:Tl.layout,draggableCancel:`.${Tl.deleteIcon},.edit-actions,.ignore-item`,breakpoints:{lg:1300,md:1024,sm:768},rowHeight:1,cols:{lg:3,md:3,sm:n?3:1},isResizable:!1,isDraggable:n,onDrag:(e,t,i)=>{var a;const s=null===(a=g.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:E,onBreakpointChange:(e,t)=>{f(t)}},_)))}));let Mh;var zh=new WeakMap,Rh=new WeakMap,_h=new WeakMap,Nh=new WeakMap,Bh=new WeakMap,Ih=new WeakMap,Dh=new WeakMap,Ph=new WeakSet,Kh=new WeakMap,Th=new WeakMap,Uh=new WeakMap,Lh=new WeakMap,Fh=new WeakMap,Oh=new WeakMap,Hh=new WeakMap;class qh extends g.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,Ph),(0,r.A)(this,zh,(Ol(this),(0,c.createRef)())),(0,r.A)(this,Rh,ql(this)),(0,r.A)(this,_h,($l(this),jl(this))),(0,r.A)(this,Nh,(Ql(this),Zl(this))),(0,r.A)(this,Bh,(Vl(this),Xl(this))),(0,r.A)(this,Ih,(Gl(this),Yl(this))),(0,r.A)(this,Dh,(Jl(this),eh(this))),(0,r.A)(this,Kh,(ah(this),e=>{(0,o.A)(Ph,this,th).emit(e)})),(0,r.A)(this,Th,sh(this)),(0,r.A)(this,Uh,(oh(this),e=>{(0,o.A)(Ph,this,rh).emit(e)})),(0,r.A)(this,Lh,lh(this)),(0,r.A)(this,Fh,(ch(this),()=>{(0,o.A)(Ph,this,hh).emit()})),(0,r.A)(this,Oh,ph(this)),(0,r.A)(this,Hh,(mh(this),(e,t)=>{(0,o.A)(Ph,this,uh).emit({action:e,layouts:t}),e.event&&this.dispatchEvent(new CustomEvent(e.event,{detail:t}))}))}get cardTitle(){return(0,h.A)(Rh,this)}set cardTitle(e){(0,l.A)(Rh,this,e)}get isEdit(){return(0,h.A)(_h,this)}set isEdit(e){(0,l.A)(_h,this,e)}get layouts(){return(0,h.A)(Nh,this)}set layouts(e){(0,l.A)(Nh,this,e)}get toolbarBricks(){return(0,h.A)(Bh,this)}set toolbarBricks(e){(0,l.A)(Bh,this,e)}get componentList(){return(0,h.A)(Ih,this)}set componentList(e){(0,l.A)(Ih,this,e)}setLayouts(e){var t;null===(t=(0,h.A)(zh,this).current)||void 0===t||t.setLayouts(e)}connectedCallback(){this.style.display||(this.style.display="block"),super.connectedCallback()}render(){return p().createElement(Wh,{cardTitle:this.cardTitle,layouts:this.layouts,toolbarBricks:this.toolbarBricks,componentList:this.componentList,isEdit:this.isEdit,onChange:(0,h.A)(Kh,this),onSave:(0,h.A)(Uh,this),onCancel:(0,h.A)(Fh,this),onActionClick:(0,h.A)(Hh,this),ref:(0,h.A)(zh,this)})}}Ul=qh,({e:[ql,$l,jl,Ql,Zl,Vl,Xl,Gl,Yl,Jl,eh,th,ih,ah,sh,rh,nh,oh,lh,hh,dh,ch,ph,uh,gh,mh,Ol],c:[Mh,Hl]}=(0,d.A)(Ul,[Ah("eo-workbench-layout-v2",{shadowOptions:!1})],[[wh(),1,"cardTitle"],[wh({type:Boolean}),1,"isEdit"],[wh({attribute:!1}),1,"layouts"],[wh({attribute:!1}),1,"toolbarBricks"],[wh({attribute:!1}),1,"componentList"],[bh({type:"change"}),1,"changeEvent",e=>(0,h.A)(Dh,e),(e,t)=>(0,l.A)(Dh,e,t)],[bh({type:"save"}),1,"saveEvent",e=>(0,h.A)(Th,e),(e,t)=>(0,l.A)(Th,e,t)],[bh({type:"cancel"}),1,"cancelEvent",e=>(0,h.A)(Lh,e),(e,t)=>(0,l.A)(Lh,e,t)],[bh({type:"action.click"}),1,"actionClickEvent",e=>(0,h.A)(Oh,e),(e,t)=>(0,l.A)(Oh,e,t)],[yh(),2,"setLayouts"]],0,(e=>Hh.has((0,n.A)(e))),g.ReactNextElement)),Hl();var $h=i(99422),jh=i(28317),Qh=i.n(jh);function Zh(e,t){const i=e?document.querySelector(`${e}`):document.body;if(!i)throw new Error(`target not found: ${e}`);return new Promise((function(e,a){Qh()(i,{backgroundColor:t||null,useCORS:!0,allowTaint:!0,scale:window.devicePixelRatio<3?window.devicePixelRatio:2}).then((function(t){e(t)})).catch(a)}))}customElements.define("advanced.capture-snapshot",(0,fo.createProviderClass)((async function(e){const{name:t,fileType:a,bucketName:s,selector:r,backgroundColor:n}=e;switch(a){case"image":{const e=await Zh(r,n);if(s){const i=await function(e){return new Promise((function(t,i){e.toBlob((function(e){e?t(e):i()}))}))}(e),a=new File([i],`${t}.png`,{type:i.type}),r=await function(e,t){const i=new FormData;i.append("file",e,e.name);const a=`${(0,w.getBasePath)()}api/gateway/object_store.object_store.PutObject/api/v1/objectStore/bucket/${t}/object`;return $h.http.request(a,{method:"PUT",body:i})}(a,s);return function(e,t){return`${(0,w.getBasePath)()}api/gateway/logic.object_store_service/api/v1/objectStore/bucket/${e}/object/${t}`}(s,r.data.objectName)}await function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"image";return new Promise(((i,a)=>{try{const a=e.toDataURL("image/png"),s=new Image;s.onload=function(){const e=document.createElement("canvas");e.width=s.width,e.height=s.height;const i=e.getContext("2d");null==i||i.drawImage(s,0,0,s.width,s.height);const a=e.toDataURL("image/png"),r=document.createElement("a");r.href=a,r.download=t;const n=new MouseEvent("click");r.dispatchEvent(n)},s.src=a,i("succeed")}catch(e){a("failed")}}))}(e,t)}break;case"pdf":{const{jsPDF:e}=await i.e(1576).then(i.bind(i,31576)),a=await Zh(r,n),s=a.toDataURL("image/jpeg",1),o=new e(a.width>a.height?"landscape":"portrait","pt",[a.width,a.height]);o.addImage(s,"JPEG",0,0,a.width,a.height),await o.save(`${t}.pdf`,{returnPromise:!0});break}}})));var Vh,Xh=i(54299),Gh=i(56664),Yh=i(39138);let Jh,ed,td,id,ad,sd,rd,nd,od,ld,hd,dd,cd,pd,ud,gd,md,Ad,wd,bd,yd,fd,kd,xd,vd,Cd,Ed,Sd,Wd,Md,zd,Rd,_d,Nd,Bd,Id,Dd,Pd,Kd;const{defineElement:Td,property:Ud,event:Ld}=(0,u.createDecorators)();let Fd;var Od=new WeakMap,Hd=new WeakMap,qd=new WeakMap,$d=new WeakMap,jd=new WeakMap,Qd=new WeakMap,Zd=new WeakMap,Vd=new WeakMap,Xd=new WeakMap,Gd=new WeakMap,Yd=new WeakMap,Jd=new WeakMap,ec=new WeakSet,tc=new WeakMap,ic=new WeakMap,ac=new WeakMap,sc=new WeakMap,rc=new WeakMap,nc=new WeakMap;class oc extends g.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,ec),(0,r.A)(this,Od,ed(this)),(0,r.A)(this,Hd,(td(this),id(this))),(0,r.A)(this,qd,(ad(this),sd(this))),(0,r.A)(this,$d,(rd(this),nd(this))),(0,r.A)(this,jd,(od(this),ld(this))),(0,r.A)(this,Qd,(hd(this),dd(this))),(0,r.A)(this,Zd,(cd(this),pd(this))),(0,r.A)(this,Vd,(ud(this),gd(this))),(0,r.A)(this,Xd,(md(this),Ad(this))),(0,r.A)(this,Gd,(wd(this),bd(this))),(0,r.A)(this,Yd,(yd(this),fd(this))),(0,r.A)(this,Jd,(kd(this),xd(this))),(0,r.A)(this,tc,(Ed(this),Sd(this))),(0,r.A)(this,ic,(zd(this),(e,t)=>{(0,o.A)(ec,this,vd).emit(e),(0,o.A)(ec,this,Wd).emit({checkedKeys:e,halfCheckedKeys:t.halfCheckedKeys})})),(0,r.A)(this,ac,Rd(this)),(0,r.A)(this,sc,(Bd(this),e=>{(0,o.A)(ec,this,_d).emit(e)})),(0,r.A)(this,rc,Id(this)),(0,r.A)(this,nc,(Kd(this),e=>{let{dragNode:t,node:i,dropPosition:a}=e;(0,o.A)(ec,this,Dd).emit({dragNode:t,dropNode:i,dropPosition:a})}))}get dataSource(){return(0,h.A)(Od,this)}set dataSource(e){(0,l.A)(Od,this,e)}get checkable(){return(0,h.A)(Hd,this)}set checkable(e){(0,l.A)(Hd,this,e)}get selectable(){return(0,h.A)(qd,this)}set selectable(e){(0,l.A)(qd,this,e)}get defaultExpandAll(){return(0,h.A)($d,this)}set defaultExpandAll(e){(0,l.A)($d,this,e)}get showLine(){return(0,h.A)(jd,this)}set showLine(e){(0,l.A)(jd,this,e)}get expandedKeys(){return(0,h.A)(Qd,this)}set expandedKeys(e){(0,l.A)(Qd,this,e)}get checkedKeys(){return(0,h.A)(Zd,this)}set checkedKeys(e){(0,l.A)(Zd,this,e)}get nodeDraggable(){return(0,h.A)(Vd,this)}set nodeDraggable(e){(0,l.A)(Vd,this,e)}get switcherIcon(){return(0,h.A)(Xd,this)}set switcherIcon(e){(0,l.A)(Xd,this,e)}get allowDrop(){return(0,h.A)(Gd,this)}set allowDrop(e){(0,l.A)(Gd,this,e)}get titleSuffixBrick(){return(0,h.A)(Yd,this)}set titleSuffixBrick(e){(0,l.A)(Yd,this,e)}render(){return p().createElement(lc,{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,h.A)(ic,this),onExpand:(0,h.A)(sc,this),allowDrop:this.allowDrop,onDrop:(0,h.A)(nc,this)})}}function lc(e){let{dataSource:t,shadowRoot:i,checkable:a,selectable:s,defaultExpandAll:r,showLine:n,expandedKeys:o,checkedKeys:l,nodeDraggable:h,switcherIcon:d,titleSuffixBrick:u,onCheck:g,onExpand:m,onDrop:A,allowDrop:w}=e;const y=(0,I.useCurrentTheme)(),k=(0,c.useMemo)((()=>(0,D.VC)()),[]);return p().createElement(f.Ay,{theme:{algorithm:"dark-v2"===y?ba.A.darkAlgorithm:ba.A.defaultAlgorithm}},p().createElement(D.N7,{container:i,autoClear:!0,cache:k,hashPriority:"high"},p().createElement(Xh.A,(0,b.A)({switcherIcon:!1!==d&&("chevron"===d?p().createElement(Gh.A,null):void 0)},null!=u&&u.useBrick?{titleRender:e=>p().createElement(p().Fragment,null,e.title,p().createElement("span",{onClick:e=>e.stopPropagation()},p().createElement(I.ReactUseMultipleBricks,{useBrick:u.useBrick,data:e})))}:null,{treeData:t,checkable:a,selectable:s,defaultExpandAll:r,showLine:n,draggable:h},o?{expandedKeys:o}:null,l?{checkedKeys:l}:null,{onCheck:g,onExpand:m,allowDrop:w,onDrop:A}))))}Vh=oc,({e:[ed,td,id,ad,sd,rd,nd,od,ld,hd,dd,cd,pd,ud,gd,md,Ad,wd,bd,yd,fd,kd,xd,vd,Cd,Ed,Sd,Wd,Md,zd,Rd,_d,Nd,Bd,Id,Dd,Pd,Kd],c:[Fd,Jh]}=(0,d.A)(Vh,[Td("eo-tree",{styleTexts:[Yh.A]})],[[Ud({attribute:!1}),1,"dataSource"],[Ud({type:Boolean}),1,"checkable"],[Ud({type:Boolean}),1,"selectable"],[Ud({type:Boolean}),1,"defaultExpandAll"],[Ud({type:Boolean}),1,"showLine"],[Ud({attribute:!1}),1,"expandedKeys"],[Ud({attribute:!1}),1,"checkedKeys"],[Ud({attribute:!1}),1,"nodeDraggable"],[Ud({attribute:!1}),1,"switcherIcon"],[Ud({attribute:!1}),1,"allowDrop"],[Ud({attribute:!1}),1,"titleSuffixBrick"],[Ld({type:"check"}),1,"checkEvent",e=>(0,h.A)(Jd,e),(e,t)=>(0,l.A)(Jd,e,t)],[Ld({type:"check.detail"}),1,"checkDetailEvent",e=>(0,h.A)(tc,e),(e,t)=>(0,l.A)(tc,e,t)],[Ld({type:"expand"}),1,"expandEvent",e=>(0,h.A)(ac,e),(e,t)=>(0,l.A)(ac,e,t)],[Ld({type:"node.drop"}),1,"dropEvent",e=>(0,h.A)(rc,e),(e,t)=>(0,l.A)(rc,e,t)]],0,(e=>nc.has((0,n.A)(e))),g.ReactNextElement)),Jh();var hc,dc=i(79484),cc=i(34695);let pc,uc,gc,mc,Ac,wc,bc,yc,fc,kc,xc,vc,Cc,Ec,Sc,Wc,Mc,zc,Rc,_c,Nc,Bc,Ic,Dc,Pc,Kc,Tc,Uc,Lc,Fc,Oc,Hc,qc,$c,jc,Qc,Zc,Vc,Xc,Gc,Yc,Jc,ep,tp,ip,ap,sp,rp,np,op,lp,hp,dp,cp,pp,up,gp,mp,Ap;const{defineElement:wp,property:bp,event:yp}=(0,u.createDecorators)(),fp=(0,g.wrapBrick)("eo-icon"),kp=(0,g.wrapBrick)("eo-form-item");let xp;var vp=new WeakMap,Cp=new WeakMap,Ep=new WeakMap,Sp=new WeakMap,Wp=new WeakMap,Mp=new WeakMap,zp=new WeakMap,Rp=new WeakMap,_p=new WeakMap,Np=new WeakMap,Bp=new WeakMap,Ip=new WeakMap,Dp=new WeakMap,Pp=new WeakMap,Kp=new WeakMap,Tp=new WeakMap,Up=new WeakMap,Lp=new WeakMap,Fp=new WeakMap,Op=new WeakMap,Hp=new WeakMap,qp=new WeakMap,$p=new WeakSet,jp=new WeakMap,Qp=new WeakMap,Zp=new WeakMap,Vp=new WeakMap,Xp=new WeakMap,Gp=new WeakMap;function Yp(e){const{shadowRoot:t,checkable:i,loading:a,treeData:s,treeExpandedKeys:r,treeDefaultExpandAll:n,fieldNames:o,value:l,placeholder:h,disabled:d,multiple:u,allowClear:g,popupPlacement:m,dropdownStyle:A,suffixIcon:w,size:b,maxTagCount:y,onChange:k,onSearch:x,onSelect:v,onTreeExpand:C}=e,E=(0,I.useCurrentTheme)(),S=(0,c.useMemo)((()=>(0,D.VC)()),[]);return p().createElement(f.Ay,{theme:{algorithm:"dark-v2"===E?ba.A.darkAlgorithm:ba.A.defaultAlgorithm}},p().createElement(D.N7,{container:t,cache:S},p().createElement(dc.A,{getPopupContainer:e=>e.parentElement,allowClear:g,loading:a,disabled:d,multiple:u,fieldNames:o,placeholder:h,placement:m,dropdownStyle:A,suffixIcon:w&&p().createElement(fp,w),maxTagCount:y,value:l,size:b,treeData:s,treeCheckable:i,treeExpandedKeys:r,treeDefaultExpandAll:n,onChange:k,onSelect:v,onSearch:x,onTreeExpand:C})))}hc=class extends La{constructor(){super(...arguments),(0,s.A)(this,$p),(0,r.A)(this,vp,uc(this)),(0,r.A)(this,Cp,(gc(this),mc(this))),(0,r.A)(this,Ep,(Ac(this),wc(this))),(0,r.A)(this,Sp,(bc(this),yc(this))),(0,r.A)(this,Wp,(fc(this),kc(this))),(0,r.A)(this,Mp,(xc(this),vc(this))),(0,r.A)(this,zp,(Cc(this),Ec(this))),(0,r.A)(this,Rp,(Sc(this),Wc(this))),(0,r.A)(this,_p,(Mc(this),zc(this))),(0,r.A)(this,Np,(Rc(this),_c(this))),(0,r.A)(this,Bp,(Nc(this),Bc(this))),(0,r.A)(this,Ip,(Ic(this),Dc(this))),(0,r.A)(this,Dp,(Pc(this),Kc(this,!0))),(0,r.A)(this,Pp,(Tc(this),Uc(this,!1))),(0,r.A)(this,Kp,(Lc(this),Fc(this))),(0,r.A)(this,Tp,(Oc(this),Hc(this,!0))),(0,r.A)(this,Up,(qc(this),$c(this))),(0,r.A)(this,Lp,(jc(this),Qc(this,"bottomLeft"))),(0,r.A)(this,Fp,(Zc(this),Vc(this))),(0,r.A)(this,Op,(Xc(this),Gc(this))),(0,r.A)(this,Hp,(Yc(this),Jc(this))),(0,r.A)(this,qp,(ep(this),tp(this))),(0,a.A)(this,"handleOnChange",(sp(this),e=>{this.value=e,(0,o.A)($p,this,ip).emit({value:e})})),(0,r.A)(this,jp,rp(this)),(0,r.A)(this,Qp,(lp(this),e=>{(0,o.A)($p,this,np).emit(e)})),(0,r.A)(this,Zp,hp(this)),(0,r.A)(this,Vp,(pp(this),e=>{(0,o.A)($p,this,dp).emit({value:e})})),(0,r.A)(this,Xp,up(this)),(0,r.A)(this,Gp,(Ap(this),e=>{(0,o.A)($p,this,gp).emit({keys:e})}))}get name(){return(0,h.A)(vp,this)}set name(e){(0,l.A)(vp,this,e)}get label(){return(0,h.A)(Cp,this)}set label(e){(0,l.A)(Cp,this,e)}get required(){return(0,h.A)(Ep,this)}set required(e){(0,l.A)(Ep,this,e)}get treeData(){return(0,h.A)(Sp,this)}set treeData(e){(0,l.A)(Sp,this,e)}get treeDefaultExpandAll(){return(0,h.A)(Wp,this)}set treeDefaultExpandAll(e){(0,l.A)(Wp,this,e)}get treeExpandedKeys(){return(0,h.A)(Mp,this)}set treeExpandedKeys(e){(0,l.A)(Mp,this,e)}get fieldNames(){return(0,h.A)(zp,this)}set fieldNames(e){(0,l.A)(zp,this,e)}get value(){return(0,h.A)(Rp,this)}set value(e){(0,l.A)(Rp,this,e)}get placeholder(){return(0,h.A)(_p,this)}set placeholder(e){(0,l.A)(_p,this,e)}get multiple(){return(0,h.A)(Np,this)}set multiple(e){(0,l.A)(Np,this,e)}get disabled(){return(0,h.A)(Bp,this)}set disabled(e){(0,l.A)(Bp,this,e)}get checkable(){return(0,h.A)(Ip,this)}set checkable(e){(0,l.A)(Ip,this,e)}get allowClear(){return(0,h.A)(Dp,this)}set allowClear(e){(0,l.A)(Dp,this,e)}get loading(){return(0,h.A)(Pp,this)}set loading(e){(0,l.A)(Pp,this,e)}get filterTreeNode(){return(0,h.A)(Kp,this)}set filterTreeNode(e){(0,l.A)(Kp,this,e)}get showSearch(){return(0,h.A)(Tp,this)}set showSearch(e){(0,l.A)(Tp,this,e)}get suffixIcon(){return(0,h.A)(Up,this)}set suffixIcon(e){(0,l.A)(Up,this,e)}get popupPlacement(){return(0,h.A)(Lp,this)}set popupPlacement(e){(0,l.A)(Lp,this,e)}get size(){return(0,h.A)(Fp,this)}set size(e){(0,l.A)(Fp,this,e)}get maxTagCount(){return(0,h.A)(Op,this)}set maxTagCount(e){(0,l.A)(Op,this,e)}get dropdownStyle(){return(0,h.A)(Hp,this)}set dropdownStyle(e){(0,l.A)(Hp,this,e)}render(){return p().createElement(kp,{exportparts:"message",curElement:this,formElement:this.getFormElement(),name:this.name,label:this.label,required:this.required,notRender:this.notRender,trigger:"handleOnChange"},p().createElement(Yp,{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,h.A)(Qp,this),onSelect:(0,h.A)(Vp,this),onTreeExpand:(0,h.A)(Gp,this)}))}},({e:[uc,gc,mc,Ac,wc,bc,yc,fc,kc,xc,vc,Cc,Ec,Sc,Wc,Mc,zc,Rc,_c,Nc,Bc,Ic,Dc,Pc,Kc,Tc,Uc,Lc,Fc,Oc,Hc,qc,$c,jc,Qc,Zc,Vc,Xc,Gc,Yc,Jc,ep,tp,ip,ap,sp,rp,np,op,lp,hp,dp,cp,pp,up,gp,mp,Ap],c:[xp,pc]}=(0,d.A)(hc,[wp("eo-tree-select",{styleTexts:[cc.A]})],[[bp(),1,"name"],[bp(),1,"label"],[bp({type:Boolean}),1,"required"],[bp({attribute:!1}),1,"treeData"],[bp({type:Boolean}),1,"treeDefaultExpandAll"],[bp({attribute:!1}),1,"treeExpandedKeys"],[bp({attribute:!1}),1,"fieldNames"],[bp({attribute:!1}),1,"value"],[bp(),1,"placeholder"],[bp({type:Boolean}),1,"multiple"],[bp({type:Boolean}),1,"disabled"],[bp({type:Boolean}),1,"checkable"],[bp({type:Boolean}),1,"allowClear"],[bp({type:Boolean}),1,"loading"],[bp({attribute:!1}),1,"filterTreeNode"],[bp({type:Boolean}),1,"showSearch"],[bp({attribute:!1}),1,"suffixIcon"],[bp(),1,"popupPlacement"],[bp(),1,"size"],[bp({attribute:!1}),1,"maxTagCount"],[bp({attribute:!1}),1,"dropdownStyle"],[yp({type:"change"}),1,"changeEvent",e=>(0,h.A)(qp,e),(e,t)=>(0,l.A)(qp,e,t)],[yp({type:"search"}),1,"searchEvent",e=>(0,h.A)(jp,e),(e,t)=>(0,l.A)(jp,e,t)],[yp({type:"select"}),1,"selectEvent",e=>(0,h.A)(Zp,e),(e,t)=>(0,l.A)(Zp,e,t)],[yp({type:"expand"}),1,"expandEvent",e=>(0,h.A)(Xp,e),(e,t)=>(0,l.A)(Xp,e,t)]],0,(e=>Gp.has((0,n.A)(e))),La)),pc();var Jp,eu=i(25629),tu=i(15092);let iu,au,su,ru,nu;const{defineElement:ou,property:lu}=(0,u.createDecorators)();let hu;var du=new WeakMap,cu=new WeakMap;class pu extends g.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,du,au(this)),(0,r.A)(this,cu,(su(this),ru(this,1))),nu(this)}get label(){return(0,h.A)(du,this)}set label(e){(0,l.A)(du,this,e)}get lineClamp(){return(0,h.A)(cu,this)}set lineClamp(e){(0,l.A)(cu,this,e)}render(){return p().createElement(uu,{label:this.label,lineClamp:this.lineClamp})}}function uu(e){const{lineClamp:t,label:i}=e,a=(0,c.useRef)(null),[s,r]=(0,c.useState)(!1),n=(0,c.useCallback)((()=>{const e=a.current;if(!e)return!1;const{offsetWidth:t,offsetHeight:i,scrollWidth:s,scrollHeight:r}=e;return t<s||i<r}),[t,i]),o=(0,c.useMemo)((()=>(0,D.VC)()),[]);return(0,c.useEffect)((()=>{r(n())}),[n]),p().createElement(f.Ay,{prefixCls:"antdV5"},p().createElement(D.N7,{cache:o,transformers:[D.NZ]},p().createElement(tu.A,{title:s?i:null},p().createElement("div",{ref:a,className:"ellipsisWrap",style:{"--line-clamp":t}},i))))}Jp=pu,({e:[au,su,ru,nu],c:[hu,iu]}=(0,d.A)(Jp,[ou("eo-text-tooltip",{styleTexts:[eu.A]})],[[lu({type:String}),1,"label"],[lu({type:Number}),1,"lineClamp"]],0,void 0,g.ReactNextElement)),iu();var gu,mu=i(27367),Au=i(4098);let wu,bu,yu,fu,ku,xu,vu,Cu,Eu;i(10659),i(15058);const{defineElement:Su,property:Wu}=(0,u.createDecorators)();let Mu;var zu=new WeakMap,Ru=new WeakMap,_u=new WeakMap,Nu=new WeakMap;class Bu extends g.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,zu,bu(this)),(0,r.A)(this,Ru,(yu(this),fu(this))),(0,r.A)(this,_u,(ku(this),xu(this))),(0,r.A)(this,Nu,(vu(this),Cu(this))),Eu(this)}get url(){return(0,h.A)(zu,this)}set url(e){(0,l.A)(zu,this,e)}get page(){return(0,h.A)(Ru,this)}set page(e){(0,l.A)(Ru,this,e)}get search(){return(0,h.A)(_u,this)}set search(e){(0,l.A)(_u,this,e)}get viewerStyle(){return(0,h.A)(Nu,this)}set viewerStyle(e){(0,l.A)(Nu,this,e)}render(){return p().createElement(Iu,{url:this.url,page:this.page?this.page-1:0,search:this.search,viewerStyle:this.viewerStyle})}}function Iu(e){let{url:t,search:a,page:s,viewerStyle:r}=e;const n=(0,Au.defaultLayoutPlugin)({toolbarPlugin:{searchPlugin:{keyword:a}}});return p().createElement(mu.Worker,{workerUrl:`${i.p}pdf.worker.min.js`},p().createElement("div",{style:r},p().createElement(mu.Viewer,{fileUrl:t,initialPage:s,plugins:[n]})))}gu=Bu,({e:[bu,yu,fu,ku,xu,vu,Cu,Eu],c:[Mu,wu]}=(0,d.A)(gu,[Su("advanced.pdf-viewer",{shadowOptions:!1})],[[Wu(),1,"url"],[Wu({type:Number}),1,"page"],[Wu(),1,"search"],[Wu({attribute:!1}),1,"viewerStyle"]],0,void 0,g.ReactNextElement)),wu()},85689:(e,t,i)=>{"use strict";i.d(t,{A:()=>d});var a=i(36758),s=i.n(a),r=i(40935),n=i.n(r),o=i(87796),l=i(37564),h=n()(s());h.i(o.A),h.i(l.A),h.push([e.id,".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},87796:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var a=i(36758),s=i.n(a),r=i(40935),n=i.n(r)()(s());n.push([e.id,'.react-grid-layout{position:relative;transition:height 200ms ease}.react-grid-item{transition:all 200ms ease;transition-property:left,top,width,height}.react-grid-item img{pointer-events:none;-webkit-user-select:none;user-select:none}.react-grid-item.cssTransforms{transition-property:transform,width,height}.react-grid-item.resizing{transition:none;z-index:1;will-change:width,height}.react-grid-item.react-draggable-dragging{transition:none;z-index:3;will-change:transform}.react-grid-item.dropping{visibility:hidden}.react-grid-item.react-grid-placeholder{background:red;opacity:0.2;transition-duration:100ms;z-index:2;-webkit-user-select:none;-o-user-select:none;user-select:none}.react-grid-item.react-grid-placeholder.placeholder-resizing{transition:none}.react-grid-item > .react-resizable-handle{position:absolute;width:20px;height:20px}.react-grid-item > .react-resizable-handle::after{content:"";position:absolute;right:3px;bottom:3px;width:5px;height:5px;border-right:2px solid rgba(0,0,0,0.4);border-bottom:2px solid rgba(0,0,0,0.4)}.react-resizable-hide > .react-resizable-handle{display:none}.react-grid-item > .react-resizable-handle.react-resizable-handle-sw{bottom:0;left:0;cursor:sw-resize;transform:rotate(90deg)}.react-grid-item > .react-resizable-handle.react-resizable-handle-se{bottom:0;right:0;cursor:se-resize}.react-grid-item > .react-resizable-handle.react-resizable-handle-nw{top:0;left:0;cursor:nw-resize;transform:rotate(180deg)}.react-grid-item > .react-resizable-handle.react-resizable-handle-ne{top:0;right:0;cursor:ne-resize;transform:rotate(270deg)}.react-grid-item > .react-resizable-handle.react-resizable-handle-w,\n.react-grid-item > .react-resizable-handle.react-resizable-handle-e{top:50%;margin-top:-10px;cursor:ew-resize}.react-grid-item > .react-resizable-handle.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-grid-item > .react-resizable-handle.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-grid-item > .react-resizable-handle.react-resizable-handle-n,\n.react-grid-item > .react-resizable-handle.react-resizable-handle-s{left:50%;margin-left:-10px;cursor:ns-resize}.react-grid-item > .react-resizable-handle.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-grid-item > .react-resizable-handle.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}',""]);const o=n},37564:(e,t,i)=>{"use strict";i.d(t,{A:()=>p});var a=i(36758),s=i.n(a),r=i(40935),n=i.n(r),o=i(20062),l=i.n(o),h=new URL(i(59224),i.b),d=n()(s()),c=l()(h);d.push([e.id,`.react-resizable{position:relative}.react-resizable-handle{position:absolute;width:20px;height:20px;background-repeat:no-repeat;background-origin:content-box;box-sizing:border-box;background-image:url(${c});background-position:bottom right;padding:0 3px 3px 0}.react-resizable-handle-sw{bottom:0;left:0;cursor:sw-resize;transform:rotate(90deg)}.react-resizable-handle-se{bottom:0;right:0;cursor:se-resize}.react-resizable-handle-nw{top:0;left:0;cursor:nw-resize;transform:rotate(180deg)}.react-resizable-handle-ne{top:0;right:0;cursor:ne-resize;transform:rotate(270deg)}.react-resizable-handle-w,\n.react-resizable-handle-e{top:50%;margin-top:-10px;cursor:ew-resize}.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-resizable-handle-n,\n.react-resizable-handle-s{left:50%;margin-left:-10px;cursor:ns-resize}.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}`,""]);const p=d},71058:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var a=i(36758),s=i.n(a),r=i(40935),n=i.n(r)()(s());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 o=n.toString()},2198:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var a=i(36758),s=i.n(a),r=i(40935),n=i.n(r)()(s());n.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 o=n.toString()},25629:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var a=i(36758),s=i.n(a),r=i(40935),n=i.n(r)()(s());n.push([e.id,":host{display:inline-block;width:-moz-fit-content;width:fit-content;max-width:100%}:host([hidden]){display:none}.ellipsisWrap{word-break:break-all;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--line-clamp);overflow:hidden}",""]);const o=n.toString()},34695:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var a=i(36758),s=i.n(a),r=i(40935),n=i.n(r)()(s());n.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 o=n.toString()},39138:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var a=i(36758),s=i.n(a),r=i(40935),n=i.n(r)()(s());n.push([e.id,":host{display:block}:host([hidden]){display:none}:host .ant-tree{background-color:transparent}",""]);const o=n.toString()},91116:(e,t,i)=>{"use strict";i.d(t,{A:()=>d});var a=i(36758),s=i.n(a),r=i(40935),n=i.n(r),o=i(34566),l=i(16322),h=n()(s());h.i(o.A),h.i(l.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: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:sticky;top:0;z-index:999;margin-left:1px;display:flex;gap:8px;justify-content:flex-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()},34566:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var a=i(36758),s=i.n(a),r=i(40935),n=i.n(r)()(s());n.push([e.id,'.react-grid-layout{position:relative;transition:height 200ms ease}.react-grid-item{transition:all 200ms ease;transition-property:left,top,width,height}.react-grid-item img{pointer-events:none;-webkit-user-select:none;user-select:none}.react-grid-item.cssTransforms{transition-property:transform,width,height}.react-grid-item.resizing{transition:none;z-index:1;will-change:width,height}.react-grid-item.react-draggable-dragging{transition:none;z-index:3;will-change:transform}.react-grid-item.dropping{visibility:hidden}.react-grid-item.react-grid-placeholder{background:red;opacity:0.2;transition-duration:100ms;z-index:2;-webkit-user-select:none;-o-user-select:none;user-select:none}.react-grid-item.react-grid-placeholder.placeholder-resizing{transition:none}.react-grid-item > .react-resizable-handle{position:absolute;width:20px;height:20px}.react-grid-item > .react-resizable-handle::after{content:"";position:absolute;right:3px;bottom:3px;width:5px;height:5px;border-right:2px solid rgba(0,0,0,0.4);border-bottom:2px solid rgba(0,0,0,0.4)}.react-resizable-hide > .react-resizable-handle{display:none}.react-grid-item > .react-resizable-handle.react-resizable-handle-sw{bottom:0;left:0;cursor:sw-resize;transform:rotate(90deg)}.react-grid-item > .react-resizable-handle.react-resizable-handle-se{bottom:0;right:0;cursor:se-resize}.react-grid-item > .react-resizable-handle.react-resizable-handle-nw{top:0;left:0;cursor:nw-resize;transform:rotate(180deg)}.react-grid-item > .react-resizable-handle.react-resizable-handle-ne{top:0;right:0;cursor:ne-resize;transform:rotate(270deg)}.react-grid-item > .react-resizable-handle.react-resizable-handle-w,\n.react-grid-item > .react-resizable-handle.react-resizable-handle-e{top:50%;margin-top:-10px;cursor:ew-resize}.react-grid-item > .react-resizable-handle.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-grid-item > .react-resizable-handle.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-grid-item > .react-resizable-handle.react-resizable-handle-n,\n.react-grid-item > .react-resizable-handle.react-resizable-handle-s{left:50%;margin-left:-10px;cursor:ns-resize}.react-grid-item > .react-resizable-handle.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-grid-item > .react-resizable-handle.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}',""]);const o=n.toString()},16322:(e,t,i)=>{"use strict";i.d(t,{A:()=>p});var a=i(36758),s=i.n(a),r=i(40935),n=i.n(r),o=i(20062),l=i.n(o),h=new URL(i(59224),i.b),d=n()(s()),c=l()(h);d.push([e.id,`.react-resizable{position:relative}.react-resizable-handle{position:absolute;width:20px;height:20px;background-repeat:no-repeat;background-origin:content-box;box-sizing:border-box;background-image:url(${c});background-position:bottom right;padding:0 3px 3px 0}.react-resizable-handle-sw{bottom:0;left:0;cursor:sw-resize;transform:rotate(90deg)}.react-resizable-handle-se{bottom:0;right:0;cursor:se-resize}.react-resizable-handle-nw{top:0;left:0;cursor:nw-resize;transform:rotate(180deg)}.react-resizable-handle-ne{top:0;right:0;cursor:ne-resize;transform:rotate(270deg)}.react-resizable-handle-w,\n.react-resizable-handle-e{top:50%;margin-top:-10px;cursor:ew-resize}.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-resizable-handle-n,\n.react-resizable-handle-s{left:50%;margin-left:-10px;cursor:ns-resize}.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}`,""]);const p=d.toString()},89739:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var a=i(36758),s=i.n(a),r=i(40935),n=i.n(r)()(s());n.push([e.id,".gridLayoutWrapper--DIttynOM{display:flex;height:100%;position:relative}.gridLayoutWrapper--DIttynOM .componentWrapper--P8xsKOQP{width:170px;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:sticky;top:0}.gridLayoutWrapper--DIttynOM .componentWrapper--P8xsKOQP .componentTitle--nKf9GEoj{font-size:16px;padding:6px 0;font-weight:500}.gridLayoutWrapper--DIttynOM .componentWrapper--P8xsKOQP .componentList--s3XnAYsB{margin-top:6px}.gridLayoutWrapper--DIttynOM .componentWrapper--P8xsKOQP .componentList--s3XnAYsB eo-checkbox::part(checkbox-wrapper){display:flex;flex-wrap:wrap;gap:8px}.gridLayoutWrapper--DIttynOM .componentWrapper--P8xsKOQP .componentList--s3XnAYsB eo-checkbox::part(checkbox-option){margin-left:0;width:100%;background:none}.gridLayoutWrapper--DIttynOM .layoutWrapper--pk1t3UAR{flex:1}.gridLayoutWrapper--DIttynOM .layoutWrapper--pk1t3UAR .layout--kz28taJj{max-width:1300px;margin:0 auto}.gridLayoutWrapper--DIttynOM .layoutWrapper--pk1t3UAR .actionsWrapper--vQro2Dyn{position:sticky;top:0;z-index:999;margin-left:1px;display:flex;gap:8px;justify-content:flex-end;background:var(--color-fill-bg-container-1);padding:8px 12px;box-shadow:0 1px 1px 0 var(--palette-gray-5)}.gridLayoutWrapper--DIttynOM .layoutWrapper--pk1t3UAR .editMask--ql2wriZf{position:absolute;left:0;right:0;top:45px;bottom:0;z-index:10}.gridLayoutWrapper--DIttynOM .layoutWrapper--pk1t3UAR .deleteIcon--IjEzXZqc{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)}.gridLayoutWrapper--DIttynOM .layoutWrapper--pk1t3UAR .deleteIcon--IjEzXZqc:hover{color:var(--color-error)}.gridLayoutWrapper--DIttynOM .layoutWrapper--pk1t3UAR .deleteIcon--IjEzXZqc:active{color:var(--color-error-active)}",""]),n.locals={gridLayoutWrapper:"gridLayoutWrapper--DIttynOM",componentWrapper:"componentWrapper--P8xsKOQP",componentTitle:"componentTitle--nKf9GEoj",componentList:"componentList--s3XnAYsB",layoutWrapper:"layoutWrapper--pk1t3UAR",layout:"layout--kz28taJj",actionsWrapper:"actionsWrapper--vQro2Dyn",editMask:"editMask--ql2wriZf",deleteIcon:"deleteIcon--IjEzXZqc"};const o=n},59224:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+"},28383:()=>{},82590:()=>{},85515:()=>{},82474:()=>{},39630:()=>{},71040:()=>{}}]);
2
- //# sourceMappingURL=2197.adb5b178.js.map
@@ -1,3 +0,0 @@
1
- /*! For license information please see 3657.9e9e2de3.js.LICENSE.txt */
2
- "use strict";(globalThis.webpackChunk_next_bricks_advanced=globalThis.webpackChunk_next_bricks_advanced||[]).push([[3657],{94579:(e,t,n)=>{n.d(t,{H:()=>d,K6:()=>a,Me:()=>l,Ob:()=>u,YL:()=>s,_:()=>o,g8:()=>p,n6:()=>f,oS:()=>h,wE:()=>c});var r=n(81071);function o(e,t,n){return{r:255*(0,r.Cg)(e,255),g:255*(0,r.Cg)(t,255),b:255*(0,r.Cg)(n,255)}}function a(e,t,n){e=(0,r.Cg)(e,255),t=(0,r.Cg)(t,255),n=(0,r.Cg)(n,255);var o=Math.max(e,t,n),a=Math.min(e,t,n),i=0,s=0,c=(o+a)/2;if(o===a)s=0,i=0;else{var l=o-a;switch(s=c>.5?l/(2-o-a):l/(o+a),o){case e:i=(t-n)/l+(t<n?6:0);break;case t:i=(n-e)/l+2;break;case n:i=(e-t)/l+4}i/=6}return{h:i,s,l:c}}function i(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function s(e,t,n){var o,a,s;if(e=(0,r.Cg)(e,360),t=(0,r.Cg)(t,100),n=(0,r.Cg)(n,100),0===t)a=n,s=n,o=n;else{var c=n<.5?n*(1+t):n+t-n*t,l=2*n-c;o=i(l,c,e+1/3),a=i(l,c,e),s=i(l,c,e-1/3)}return{r:255*o,g:255*a,b:255*s}}function c(e,t,n){e=(0,r.Cg)(e,255),t=(0,r.Cg)(t,255),n=(0,r.Cg)(n,255);var o=Math.max(e,t,n),a=Math.min(e,t,n),i=0,s=o,c=o-a,l=0===o?0:c/o;if(o===a)i=0;else{switch(o){case e:i=(t-n)/c+(t<n?6:0);break;case t:i=(n-e)/c+2;break;case n:i=(e-t)/c+4}i/=6}return{h:i,s:l,v:s}}function l(e,t,n){e=6*(0,r.Cg)(e,360),t=(0,r.Cg)(t,100),n=(0,r.Cg)(n,100);var o=Math.floor(e),a=e-o,i=n*(1-t),s=n*(1-a*t),c=n*(1-(1-a)*t),l=o%6;return{r:255*[n,s,i,i,c,n][l],g:255*[c,n,n,s,i,i][l],b:255*[i,i,c,n,n,s][l]}}function u(e,t,n,o){var a=[(0,r.wl)(Math.round(e).toString(16)),(0,r.wl)(Math.round(t).toString(16)),(0,r.wl)(Math.round(n).toString(16))];return o&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function d(e,t,n,o,a){var i,s=[(0,r.wl)(Math.round(e).toString(16)),(0,r.wl)(Math.round(t).toString(16)),(0,r.wl)(Math.round(n).toString(16)),(0,r.wl)((i=o,Math.round(255*parseFloat(i)).toString(16)))];return a&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))&&s[3].startsWith(s[3].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function f(e){return p(e)/255}function p(e){return parseInt(e,16)}function h(e){return{r:e>>16,g:(65280&e)>>8,b:255&e}}},42887:(e,t,n)=>{n.d(t,{D:()=>r});var r={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}},84501:(e,t,n)=>{n.d(t,{RO:()=>i});var r=n(94579),o=n(42887),a=n(81071);function i(e){var t={r:0,g:0,b:0},n=1,i=null,s=null,c=null,l=!1,f=!1;return"string"==typeof e&&(e=function(e){if(0===(e=e.trim().toLowerCase()).length)return!1;var t=!1;if(o.D[e])e=o.D[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=u.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=u.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=u.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=u.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=u.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=u.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=u.hex8.exec(e))?{r:(0,r.g8)(n[1]),g:(0,r.g8)(n[2]),b:(0,r.g8)(n[3]),a:(0,r.n6)(n[4]),format:t?"name":"hex8"}:(n=u.hex6.exec(e))?{r:(0,r.g8)(n[1]),g:(0,r.g8)(n[2]),b:(0,r.g8)(n[3]),format:t?"name":"hex"}:(n=u.hex4.exec(e))?{r:(0,r.g8)(n[1]+n[1]),g:(0,r.g8)(n[2]+n[2]),b:(0,r.g8)(n[3]+n[3]),a:(0,r.n6)(n[4]+n[4]),format:t?"name":"hex8"}:!!(n=u.hex3.exec(e))&&{r:(0,r.g8)(n[1]+n[1]),g:(0,r.g8)(n[2]+n[2]),b:(0,r.g8)(n[3]+n[3]),format:t?"name":"hex"}}(e)),"object"==typeof e&&(d(e.r)&&d(e.g)&&d(e.b)?(t=(0,r._)(e.r,e.g,e.b),l=!0,f="%"===String(e.r).substr(-1)?"prgb":"rgb"):d(e.h)&&d(e.s)&&d(e.v)?(i=(0,a.Px)(e.s),s=(0,a.Px)(e.v),t=(0,r.Me)(e.h,i,s),l=!0,f="hsv"):d(e.h)&&d(e.s)&&d(e.l)&&(i=(0,a.Px)(e.s),c=(0,a.Px)(e.l),t=(0,r.YL)(e.h,i,c),l=!0,f="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=(0,a.TV)(n),{ok:l,format:e.format||f,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var s="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),c="[\\s|\\(]+(".concat(s,")[,|\\s]+(").concat(s,")[,|\\s]+(").concat(s,")\\s*\\)?"),l="[\\s|\\(]+(".concat(s,")[,|\\s]+(").concat(s,")[,|\\s]+(").concat(s,")[,|\\s]+(").concat(s,")\\s*\\)?"),u={CSS_UNIT:new RegExp(s),rgb:new RegExp("rgb"+c),rgba:new RegExp("rgba"+l),hsl:new RegExp("hsl"+c),hsla:new RegExp("hsla"+l),hsv:new RegExp("hsv"+c),hsva:new RegExp("hsva"+l),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function d(e){return Boolean(u.CSS_UNIT.exec(String(e)))}},81071:(e,t,n)=>{function r(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function o(e){return Math.min(1,Math.max(0,e))}function a(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function i(e){return e<=1?"".concat(100*Number(e),"%"):e}function s(e){return 1===e.length?"0"+e:String(e)}n.d(t,{Cg:()=>r,J$:()=>o,Px:()=>i,TV:()=>a,wl:()=>s})},12559:(e,t,n)=>{function r(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}n.d(t,{A:()=>r})},72016:(e,t,n)=>{function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}n.d(t,{A:()=>r})},70829:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(12559);function o(e,t){return e.get((0,r.A)(e,t))}},70918:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(72016);function o(e,t,n){(0,r.A)(e,t),t.set(e,n)}},86121:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(12559);function o(e,t,n){return e.set((0,r.A)(e,t),n),n}},74635:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(72016);function o(e,t){(0,r.A)(e,t),t.add(e)}},24586:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(11369);function o(e,t,n){return(t=(0,r.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},11369:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(17545);function o(e){var t=function(e,t){if("object"!=(0,r.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=(0,r.A)(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==(0,r.A)(t)?t:t+""}},17545:(e,t,n)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:()=>r})},3657:(e,t,n)=>{n.r(t),n.d(t,{Dialog:()=>Yt,Notification:()=>rn,StoryboardFunctionRegistryFactory:()=>pe,__secret_internals:()=>r,__test_only:()=>{},applyTheme:()=>te,authenticate:()=>va,batchSetAppsLocalTheme:()=>ne,checkIfByTransform:()=>St,checkIfOfComputed:()=>At,createHistory:()=>I,createRuntime:()=>aa,customEditors:()=>Sa,customProcessors:()=>_,customTemplates:()=>Pe,fetchByProvider:()=>Ea,getAuth:()=>ba,getBasePath:()=>g,getCssPropertyValue:()=>ce,getCurrentMode:()=>ie,getCurrentTheme:()=>ee,getHistory:()=>C,getPageInfo:()=>io,getRealValue:()=>Ia,getRuntime:()=>ia,getV2RuntimeFromDll:()=>k,handleHttpError:()=>nn,httpErrorToString:()=>Qt,isLoggedIn:()=>wa,isUnauthenticatedError:()=>Xt,logout:()=>ya,matchPath:()=>Lt,registerWidgetFunctions:()=>$e,registerWidgetI18n:()=>N,setUIVersion:()=>co,unstable_createRoot:()=>ka});var r={};n.r(r),n.d(r,{addRealTimeDataInspectHook:()=>Or,debugDataValue:()=>kr,getAddedContracts:()=>Er,getAllContextValues:()=>br,getBrickPackagesById:()=>yr,getContextValue:()=>vr,getLegalRuntimeValue:()=>Ir,getRenderId:()=>Sr,legacyDoTransform:()=>cr,loadBricks:()=>wr,loadEditors:()=>Ar,mountUseBrick:()=>ir,renderUseBrick:()=>ar,setRealTimeDataInspectRoot:()=>Tr,symbolForRootRuntimeContext:()=>or,unmountUseBrick:()=>sr,updateSnippetPreviewSettings:()=>gr,updateStoryboard:()=>lr,updateStoryboardByRoute:()=>ur,updateStoryboardBySnippet:()=>hr,updateStoryboardByTemplate:()=>dr,updateTemplatePreviewSettings:()=>fr});var o=n(74635),a=n(24586),i=n(70918),s=n(12559),c=n(86121),l=n(70829),u=n(67318),d=n(26998),f=n(30279),p=n(21302),h=(n(26036),n(32890));function g(){const e=document.querySelector("base");return e?e.getAttribute("href"):"/"}var m=n(41030);function v(e,t){const n=(0,m.orderBy)(e,(e=>{var t;return(null===(t=e.app.homepage)||void 0===t?void 0:t.length)??0}),"desc");for(const e of n){const n=e.app.homepage;if("string"==typeof n&&"/"===n[0]&&b(n,t))return e}}function b(e,t){return"/"===e?t===e:`${t.replace(/\/+$/,"")}/`.startsWith(`${e.replace(/\/+$/,"")}/`)}function y(e){var t;return!e||(null===(t=ia().getCurrentApp())||void 0===t?void 0:t.id)!==e.app.id&&!window.STANDALONE_MICRO_APPS&&e.app.standaloneMode}let w,A=!1;function S(e,t){A=!confirm(e),t(!A)}function E(e){const{push:t,replace:n}=e;function r(r){return function(o,a,i){let s;const c="string"==typeof o;return s=c?(0,h.parsePath)(o).pathname:o.pathname,"string"==typeof s&&s.startsWith("/")&&y(function(e){var t;return v((null===(t=ta)||void 0===t?void 0:t.storyboards)??[],e)}(s))?location["push"===r?"assign":"replace"](c?g()+o.substring(1):e.createHref(o)):("push"===r?t:n)(o,a,i)}}return{push:r("push"),replace:r("replace")}}function k(){var e;const{dll:t}=window;if(t&&null!==(e=window.BRICK_NEXT_VERSIONS)&&void 0!==e&&null!==(e=e["brick-container"])&&void 0!==e&&e.startsWith("2."))return t("tYg3")}function I(){if(!w){const e=(0,h.createBrowserHistory)({basename:g().replace(/\/$/,""),getUserConfirmation:S});Object.assign(e,function(e){const{push:t,replace:n}=e;function r(e,n,r){A=!1,t(e,n),null==r||r(A)}function o(e,t,r){A=!1,n(e,t),null==r||r(A)}function a(t){return function(n){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;const{extraQuery:s,clear:c,keepHash:l,...u}=a,d=new URLSearchParams(c?"":e.location.search),f={};Object.assign(f,n,s);for(const[e,t]of Object.entries(f))if(Array.isArray(t)){d.delete(e);for(const n of t)d.append(e,n)}else null==t||""===t?d.delete(e):d.set(e,t);("push"===t?r:o)(`?${d.toString()}${l?e.location.hash:""}`,u,i)}}let i;return{pushQuery:a("push"),replaceQuery:a("replace"),pushAnchor:function(t,n,o){r({...e.location,key:void 0,hash:t,state:{notify:!1,...n}},void 0,o)},reload:function(t){o({...e.location,state:{...e.location.state,notify:!0,noIncremental:!0}},void 0,t)},setBlockMessage:function(e){i=e},getBlockMessage:function(){return i},unblock:function(){i=void 0},...E({...e,push:r,replace:o})}}(e)),w=e}return w}const C=function(){const e=k();if(e)return e.getHistory}()||function(){return w};var R=n(99422),T=n(38897),O=n(90877),x=n(68965),P=n(71680),M=new WeakMap;const _=function(){const e=k();if(e)return Object.freeze({define:(t,n)=>e.getRuntime().registerCustomProcessor(t,n)})}()||new class{constructor(){(0,i.A)(this,M,new Map)}define(e,t){const[n,r]=e.split(".");let o=(0,l.A)(M,this).get(n);if(o||(o=new Map,(0,l.A)(M,this).set(n,o)),o.has(r))throw new Error(`Custom processor of "${e}" already registered`);o.set(r,t)}get(e){return(0,l.A)(M,this).get(e)}};function B(e){let{app:t,meta:n}=e;if(null!=n&&n.i18n){const e=L("app",t.id),r=[];return Object.entries(n.i18n).forEach((t=>{let[n,o]=t;u.i18n.addResourceBundle(n,e,o),r.push(n)})),()=>{for(const t of r)u.i18n.removeResourceBundle(t,e)}}}function L(e,t){return`${e}/${t}`}function $(e){return u.i18n.getFixedT(null,L("widget",e))}const N=function(){const e=k();if(e)return function(t,n){return e.getRuntime().registerWidgetI18n(t,n)}}()||function(e,t){const n=L("widget",e);Object.entries(t).forEach((e=>{let[t,r]=e;u.i18n.addResourceBundle(t,n,r)}))},U="brick-next-devtools-panel",F="devtools-frame-active-change",j="devtools-panel-change";let D,K=!0;function V(e,t){const n=W();if(!n||"evaluation"===e&&(!K||D&&"Evaluations"!==D))return;const r=()=>{var r;null===(r=n.emit)||void 0===r||r.call(n,{type:e,payload:t})};"function"==typeof window.requestIdleCallback?window.requestIdleCallback(r):setTimeout(r,0)}function W(){return window.__BRICK_NEXT_DEVTOOLS_HOOK__}const z=()=>{throw new Error("Can't modify read-only proxy object")},H={set:z,defineProperty:z,deleteProperty:z,setPrototypeOf:z};function q(e){return new Proxy(e,H)}function G(e){let{get:t,ownKeys:n}=e;return W()?q(Object.fromEntries(n(null).map((e=>[e,t(null,e,null)])))):new Proxy(Object.freeze({}),{get:t})}let Y="light";const J=new f.JsonStorage(localStorage),Q="apps-theme";function X(e){if("dark"!==e&&"light"!==e&&"dark-v2"!==e)throw new Error(`Unsupported theme: ${e}`);Y=e}function Z(){return Y}function ee(){return document.documentElement.dataset.theme}function te(e){e?X(e):e=Z(),e!==ee()&&(document.documentElement.dataset.theme=e,window.dispatchEvent(new CustomEvent("theme.change",{detail:e})))}function ne(e){J.setItem(Q,{...re(),...e})}function re(){let e;try{e=J.getItem(Q)}catch{console.error("JSON parse error inside `getLocalAppsTheme()`")}return e??{}}let oe="default";function ae(e){if("dashboard"!==e&&"default"!==e)throw new Error(`Unsupported mode: ${e}`);oe=e}function ie(){return document.documentElement.dataset.mode}function se(e){e?ae(e):e=oe,e!==ie()&&(document.documentElement.dataset.mode=e,window.dispatchEvent(new CustomEvent("mode.change",{detail:e})))}function ce(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return n&&(null===(t=window.getComputedStyle(n))||void 0===t?void 0:t.getPropertyValue(e))||""}function le(e,t){const n={};for(const r of e){const e=ue(r,t);void 0!==e&&(n[r]=e)}return n}function ue(e,t){var n,r,o;let{collectCoverage:a,widgetId:i,widgetVersion:s,app:c,appendI18nNamespace:l,storyboardFunctions:d,isStoryboardFunction:f}=t;switch(e){case"BASE_URL":return a?"/next":g().replace(/\/$/,"");case"FN":return d;case"IMG":return a?{get:e=>`mock/images/${e}`}:i?null==oa||null===(n=oa.images)||void 0===n?void 0:n.widgetImagesFactory(i,s):null==oa||null===(r=oa.images)||void 0===r?void 0:r.imagesFactory(c.id,c.isBuildPush,c.currentVersion);case"I18N":return a?m.identity:i?$(i):u.i18n.getFixedT(null,[l,L("app",c.id)].filter(Boolean));case"I18N_TEXT":return a?de:u.i18nText;case"PERMISSIONS":return q({check:a?fe:null==oa||null===(o=oa.checkPermissions)||void 0===o?void 0:o.checkPermissions});case"THEME":return q({getTheme:a?()=>"light":Z});case"console":return f?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 de(e){return null==e?void 0:e.en}function fe(){return!0}function pe(){let{widgetId:e,widgetVersion:t,collectCoverage:n,debuggerOverrides:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=new Map,a=null==r?void 0:r({precookFunction:T.precookFunction,cook:T.cook,supply:P.supply}),i=new Proxy(Object.freeze({}),{get:(c,l)=>function(c){const l=o.get(c);if(!l)return;if(l.processed)return l.cooked;let u;n&&(u=n.createCollector(c));const d=(0,T.precookFunction)(l.source,{typescript:l.typescript,hooks:u&&{beforeVisit:u.beforeVisit},cacheKey:l}),f=(0,P.supply)(d.attemptToVisitGlobals,le(d.attemptToVisitGlobals,{collectCoverage:n,widgetId:e,widgetVersion:t,app:s,storyboardFunctions:i,isStoryboardFunction:!0}),!!n);return l.cooked=(0,T.cook)(d.function,l.source,{rules:{noVar:!0},globalVariables:a?{...f,...null!=a&&a.LodashWithStaticFields&&d.attemptToVisitGlobals.has("_")?{_:{...f._,...a.LodashWithStaticFields}}:null,...null!=a&&a.ArrayConstructor&&d.attemptToVisitGlobals.has("Array")?{Array:a.ArrayConstructor}:null,...null!=a&&a.ObjectWithStaticFields&&d.attemptToVisitGlobals.has("Object")?{Object:{...f.Object,...a.ObjectWithStaticFields}}:null}:f,ArrayConstructor:null==a?void 0:a.ArrayConstructor,hooks:u&&{beforeEvaluate:u.beforeEvaluate,beforeCall:u.beforeCall,beforeBranch:u.beforeBranch},debug:!!r}),l.processed=!0,l.cooked}(l)});let s;return{storyboardFunctions:i,registerStoryboardFunctions:function(e,t){if(t&&(s=t),o.clear(),Array.isArray(e))for(const t of e){const e=(0,O.collectMemberUsageInFunction)(t,"FN",!!n),r=(0,O.collectMemberUsageInFunction)(t,"PERMISSIONS",!!n).has("check");o.set(t.name,{source:t.source,typescript:t.typescript,deps:e,hasPermissionsCheck:r})}},updateStoryboardFunction(e,t){const n={...t,name:e},r=(0,O.collectMemberUsageInFunction)(n,"FN",!0),a=(0,O.collectMemberUsageInFunction)(n,"PERMISSIONS",!0).has("check");o.set(e,{source:t.source,typescript:t.typescript,deps:r,hasPermissionsCheck:a})},checkPermissionsUsage(e){const t=new Set,n=e=>{if(!t.has(e)){t.add(e);const r=o.get(e);return!!r&&(r.hasPermissionsCheck||[...r.deps].some(n))}return!1};return e.some(n)},clearGlobalExecutionContextStack(){(0,T.__dev_only_clearGlobalExecutionContextStack)()},getGlobalExecutionContextStack:()=>(0,T.__dev_only_getGlobalExecutionContextStack)()}}const{storyboardFunctions:he,registerStoryboardFunctions:ge,checkPermissionsUsage:me}=pe();var ve={};try{ve.EventTarget=(new EventTarget).constructor}catch(e){!function(e,t){var n=e.create,r=e.defineProperty,o=a.prototype;function a(){t.set(this,n(null))}function i(e,t,n){r(e,t,{configurable:!0,writable:!0,value:n})}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,n,r){for(var o=t.get(this),a=o[e]||(o[e]=[]),i=0,s=a.length;i<s;i++)if(a[i].listener===n)return;a.push({target:this,listener:n,options:r})})),i(o,"dispatchEvent",(function(e){var n=t.get(this)[e.type];return n&&(i(e,"target",this),i(e,"currentTarget",this),n.slice(0).some(s,e),delete e.currentTarget,delete e.target),!0})),i(o,"removeEventListener",(function(e,n){for(var r=t.get(this),o=r[e]||(r[e]=[]),a=0,i=o.length;a<i;a++)if(o[a].listener===n)return void o.splice(a,1)})),ve.EventTarget=a}(Object,new WeakMap)}const be=ve.EventTarget;let ye=function(e){return e.xLarge="xLarge",e.large="large",e.medium="medium",e.small="small",e.xSmall="xSmall",e}({});const we=new Map([[ye.xLarge,"1920px"],[ye.large,"1600px"],[ye.medium,"1280px"],[ye.small,"1024px"],[ye.xSmall,0]]),Ae=new be,Se={},Ee={};function ke(e,t){let n=!1;Se[t]=e.matches;for(const[e]of we)if(Se[e]&&Ee.breakpoint!==e){Ee.breakpoint=e,n=!0;break}n&&Ae.dispatchEvent(new CustomEvent("change",{detail:Ee}))}we.forEach(((e,t)=>{const n=window.matchMedia(`(min-width: ${e})`);ke(n,t),n.addEventListener?n.addEventListener("change",(e=>{ke(e,t)})):n.addListener((e=>{ke(e,t)}))}));const Ie=()=>Ee;function Ce(e){return function(t){const n="local"===e?localStorage:sessionStorage;return JSON.parse(n.getItem(t)??"null")}}function Re(e){var t,n;return!(null===(t=e?e.flags:null===(n=ia())||void 0===n?void 0:n.getFeatureFlags())||void 0===t||!t["brick-next-v3-strict-mode"])}function Te(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];const a=0===r.length?"":",";e?console.error(`${t} is dropped in v3 strict mode${a}`,...r):console.warn(`${t} is deprecated in v3 and will be dropped in strict mode${a}`,...r)}const Oe=new Set(["prefix"]);var xe=new WeakMap;const Pe=function(){const e=k();if(e)return Object.freeze({define:(t,n)=>e.getRuntime().registerCustomTemplate(t,n)})}()||new class{constructor(){(0,i.A)(this,xe,new Map)}define(e,t){var n,r;let o=(0,l.A)(xe,this).has(e);o?console.warn(`Custom template of "${e}" already registered.`):(o=!!customElements.get(e),o&&console.warn(`Custom template of "${e}" already defined by customElements.`));const a=Re(),i=(null===(n=t.proxy)||void 0===n?void 0:n.properties)??{},s=[],c=[];for(const[t,n]of Object.entries(i))n.asVariable?(Te(a,"Template `asVariable`",e,t),a||c.push(t)):n.mergeProperty||n.refTransform?console.error("Template `mergeProperty` and `refTransform` are dropped in v3:",e,t):n.ref&&s.push([t,n]);const u={...t,proxy:{...t.proxy,properties:Object.fromEntries(s)},state:(t.state?a?t.state:t.state.map((e=>({expose:!0,...e}))):[]).concat(c.map((e=>({name:e,expose:!0}))))};(0,l.A)(xe,this).set(e,{...u,name:e});const d=(f=u.state,(0,m.uniq)((null==f?void 0:f.filter((e=>e.expose)).map((e=>e.name)))??[]));var f;const p=Object.entries((null===(r=u.proxy)||void 0===r?void 0:r.methods)??{}),h=d.concat(s.map((e=>e[0]))),g=p.map((e=>e[0])),v=h.concat(g).filter((e=>e in HTMLElement.prototype&&!Oe.has(e)));if(v.length>0&&(Te(a,"Using native HTMLElement properties as template properties or methods",e,...v),a))throw new Error(`In custom template "${e}", ${v.map((e=>`"${e}"`)).join(", ")} are native HTMLElement properties, and should be avoid to be used as brick properties or methods.`);if(!o){class t extends HTMLElement{get $$typeof(){return"custom-template"}static get _dev_only_definedProperties(){return h}static get _dev_only_definedMethods(){return g}$$getElementByRef(e){var t;return null===(t=this.$$tplStateStore)||void 0===t||null===(t=t.hostBrick)||void 0===t||null===(t=t.tplHostMetadata)||void 0===t||null===(t=t.internalBricksByRef.get(e))||void 0===t?void 0:t.element}connectedCallback(){let e=this.shadowRoot;e||(e=this.attachShadow({mode:"open"}));const t=document.createDocumentFragment(),n=document.createElement("style");n.textContent=":host{display:block}:host([hidden]){display:none}";const r=document.createElement("slot");t.appendChild(n),t.appendChild(r),e.appendChild(t)}disconnectedCallback(){this.shadowRoot&&(this.shadowRoot.textContent="")}}for(const n of d)s.some((e=>e[0]===n))?console.error(`Cannot define an exposed state that is also a proxy property: "${n}" in ${e}`):Object.defineProperty(t.prototype,n,{get(){return this.$$tplStateStore.getValue(n)},set(e){var t;null===(t=this.$$tplStateStore)||void 0===t||t.updateValue(n,e,"replace")},enumerable:!0});for(const[e,n]of s)Object.defineProperty(t.prototype,e,{get(){return this.$$getElementByRef(n.ref)[n.refProperty??e]},set(t){var r;const o=null===(r=this.$$getElementByRef)||void 0===r?void 0:r.call(this,n.ref);o&&(o[n.refProperty??e]=t)},enumerable:!0});for(const[e,n]of p)Object.defineProperty(t.prototype,e,{value(){this.$$getElementByRef(n.ref)[n.refMethod??e](...arguments)},enumerable:!0});customElements.define(e,t)}}get(e){return(0,l.A)(xe,this).get(e)}};function Me(e,t,n){let{tplStateStoreId:r,tplStateStoreMap:o}=e;if(!r)throw new Error(`Using "${t}" outside of a custom template${n??""}`);const a=o.get(r);if(!a)throw new Error(`Template state store is not found when using "${t}"${n??""}.\nThis is a bug of Brick Next, please report it.`);return a}function _e(e,t,n){const r=Me(e,t,n).hostBrick.element;if(!r)throw new Error(`Template host element is gone when using "${t}"${n??""}.\nThis is a bug of Brick Next, please report it.`);return r}const Be=new Map,Le=new Proxy(Object.freeze({}),{get:(e,t)=>Be.get(t)}),$e=function(){const e=k();if(e)return function(t,n,r){return e.getRuntime().registerWidgetFunctions(t,n,r)}}()||function(e,t,n){if(Be.has(e))throw new Error(`Widget functions of "${e}" already registered`);const{storyboardFunctions:r,registerStoryboardFunctions:o}=pe({widgetId:e,widgetVersion:n});Be.set(e,r),o(t)},Ne=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Ue=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match(Ne);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Fe=e=>"*"===e||"x"===e||"X"===e,je=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},De=(e,t)=>{if(Fe(e)||Fe(t))return 0;const[n,r]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(je(e),je(t));return n>r?1:n<r?-1:0},Ke=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const r=De(e[n]||"0",t[n]||"0");if(0!==r)return r}return 0},Ve=(e,t,n)=>{He(n);const r=((e,t)=>{const n=Ue(e),r=Ue(t),o=n.pop(),a=r.pop(),i=Ke(n,r);return 0!==i?i:o&&a?Ke(o.split("."),a.split(".")):o||a?o?-1:1:0})(e,t);return We[n].includes(r)},We={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},ze=Object.keys(We),He=e=>{if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===ze.indexOf(e))throw new Error(`Invalid operator, expected one of ${ze.join("|")}`)};function qe(e,t){let n=ma(e);if(!n&&null!=oa&&oa.checkInstalledApps&&(n=oa.checkInstalledApps.getCheckedApp(e)),!n||"running"===n.installStatus)return!1;if(!t||!n.currentVersion)return!0;const r=t.match(/^([><]=?|=)(.*)$/);try{if(!r)throw new TypeError(`Invalid match version: ${t}`);return Ve(n.currentVersion,r[2],r[1])}catch(e){console.error(e)}return!1}function Ge(e,t,n){let{formStateStoreId:r,formStateStoreMap:o}=e;if(!r)throw new Error(`Using "${t}" outside of form renderer${n??""}`);const a=o.get(r);if(!a)throw new Error(`Form state store is not found when using "${t}"${n??""}.\nThis is a bug of Brick Next, please report it.`);return a}const Ye=new Map;async function Je(e){var t;const n=null==oa||null===(t=oa.flowApi)||void 0===t?void 0:t.isFlowApiProvider(e);n&&(e=oa.flowApi.FLOW_API_PROVIDER);let r=Ye.get(e);if(r)return r;if(e.includes("-")&&!customElements.get(e))if(n)oa.flowApi.registerFlowApiProvider();else if(await(0,d.loadBricksImperatively)([e],fa()),!customElements.get(e))throw new Error(`Provider not defined: "${e}".`);return r=document.createElement(e),Ye.set(e,r),r}let Qe=new WeakSet;function Xe(e){if((0,f.isObject)(e)&&!Ze(e))if(Qe.add(e),Array.isArray(e))e.forEach(Xe);else{const t=Object.getPrototypeOf(e);t&&t.constructor!==Object||Object.values(e).forEach(Xe)}}function Ze(e){return Qe.has(e)}const et=new Map;async function tt(e,t,n){const{useProvider:r,method:o="resolve",args:a=[],onReject:i}=e,{provider:s,field:c}=e;if(s&&!r)throw new Error(`You're using "provider: ${s}" which is dropped in v3, please use "useProvider" instead`);const l=null!=c;if(l){const e=Re();if(Te(e,"`resolve.field`"),e)throw new Error("Using deprecated `resolve.field`")}const[u,d]=await Promise.all([Je(r),gt(a,t)]),f=null==n?void 0:n.renderId,p=nt(u,r,o,d,n,a,!!f&&f!==pa());let h,{transform:g}=e;try{const e=await p;h=l?(0,m.get)(e,c):e,Xe(h)}catch(e){if(!function(e){return!(null==e||!e.transform)}(i))throw e;g=i.transform,h=e}return g?"string"==typeof g?{[g]:h}:gt(g,{...t,data:h}):h}async function nt(e,t,n,r,o,a,i){let s,c;try{s=JSON.stringify({useProvider:t,method:n,args:r})}catch(e){if(!a)throw e;s=JSON.stringify({useProvider:t,method:n,originalArgs:a})}return"reload"!==(null==o?void 0:o.cache)&&(c=et.get(s)),c||(c=(async o=>{const a=null!=oa&&null!==(o=oa.flowApi)&&void 0!==o&&o.isFlowApiProvider(t)?await oa.flowApi.getArgsOfFlowApi(t,r,n):r;return e[n](...a)})(),i||et.set(s,c)),c}const rt=Symbol.for("pre.evaluated.raw"),ot=Symbol.for("pre.evaluated.context");function at(e){return!(null==e||!e[rt])}function it(e){return e[rt]}function st(e){return"string"==typeof e?(0,T.shouldAllowRecursiveEvaluations)(e):(0,T.shouldAllowRecursiveEvaluations)(e[rt])}const ct=new WeakSet([SyntaxError,TypeError,ReferenceError]);function lt(e){return ct.has(e.constructor)?e.constructor:TypeError}function ut(e,t,n){const{run:r}=dt(e,t,n,!1);return r()}function dt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;const o=[];if("string"!=typeof e){const n=(0,m.omit)(t,["pendingPermissionsPreCheck","tplStateStoreMap","tplStateStoreScope","formStateStoreMap","formStateStoreScope"]);t={...e[ot],...n},e=e[rt]}const a={usedArgs:new Set},i={usedArgs:new Set};let s;try{s=(0,T.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal(e,t){(0,O.collectAppGetMenuUsage)(a,e,t),(0,O.collectInstalledAppsHasUsage)(i,e,t)}}})}catch(t){const n=`${t.message}, in "${e}"`;throw new(lt(t))(n)}if(a.hasNonStaticUsage)throw new Error(`Non-static usage of "APP.getMenu" is prohibited in v3, check your expression: "${e}"`);if(i.hasNonStaticUsage)throw new Error(`Non-static usage of "INSTALLED_APPS.has" is prohibited in v3, check your expression: "${e}"`);const c={},{attemptToVisitGlobals:l}=s;if(n.lazy||l.has("EVENT")&&!(0,f.hasOwnProperty)(t,"event")||l.has("DATA")&&!(0,f.hasOwnProperty)(t,"data"))return{blockingList:o,run:()=>Object.keys(t).length>0?{[rt]:e,[ot]:t}:e};let u,p,h,g;const v=Re(t);let b,y;(l.has("STATE")||!v&&l.has("TPL"))&&(g=Me(t,"STATE",`: "${e}"`)),l.has("FORM_STATE")&&(y=Ge(t,"FORM_STATE",`: "${e}"`));const w=W();if(r||w){if(l.has("CTX")&&(u=(0,O.strictCollectMemberUsage)(e,"CTX"),r&&o.push(t.ctxStore.waitFor(u))),g){if(h=(0,O.strictCollectMemberUsage)(e,"STATE"),!v){const t=(0,O.strictCollectMemberUsage)(e,"TPL");for(const e of t)h.add(e)}r&&o.push(g.waitFor(h))}y&&(b=(0,O.strictCollectMemberUsage)(e,"FORM_STATE"),r&&o.push(y.waitFor(b))),l.has("PROCESSORS")&&(p=(0,O.strictCollectMemberUsage)(e,"PROCESSORS",2),r&&o.push((0,d.loadProcessorsImperatively)(p,fa())))}if(r){let n=l.has("PERMISSIONS");if(!n&&l.has("FN")){const t=[...(0,O.strictCollectMemberUsage)(e,"FN")];n=me(t)}if(n&&o.push(...t.pendingPermissionsPreCheck),a.usedArgs.size>0&&null!=oa&&oa.menu){const e=[...a.usedArgs];o.push(Promise.all(e.map((e=>oa.menu.fetchMenuById(e,t,{getStoryboardByAppId:ga,resolveData:tt,asyncComputeRealValue:gt})))))}var A;i.usedArgs.size>0&&o.push(null==oa||null===(A=oa.checkInstalledApps)||void 0===A?void 0:A.waitForCheckingApps([...i.usedArgs]))}return{blockingList:o,run(){var n,r;const{app:o,location:a,query:i,match:d,flags:w,sys:A,ctxStore:S,data:E,event:k}=t,I=t.overrideApp??o;for(const o of l)switch(o){case"ANCHOR":c[o]=a.hash?a.hash.substring(1):null;break;case"APP":if(null==I)throw new ReferenceError(`APP is not defined, in "${e}"`);c[o]={...(0,m.cloneDeep)(I),getMenu:null==oa||null===(n=oa.menu)||void 0===n?void 0:n.getMenuById};break;case"CTX":c[o]=G({get:(e,t)=>S.getValue(t),ownKeys:()=>Array.from(u)});break;case"DATA":c[o]=E;break;case"EVENT":c[o]=k;break;case"FLAGS":c[o]=q(w);break;case"FORM_STATE":c[o]=G({get:(e,t)=>y.getValue(t),ownKeys:()=>Array.from(b)});break;case"HASH":c[o]=a.hash;break;case"INSTALLED_APPS":c[o]=q({has:qe});break;case"ITEM":case"INDEX":case"SIZE":{const n="ITEM"===o?"forEachItem":"INDEX"===o?"forEachIndex":"forEachSize";(0,f.hasOwnProperty)(t,n)?c[o]=t[n]:console.error(`Using \`${o}\` but no \`:forEach\` is found, check your expression: "${e}"`);break}case"LOCAL_STORAGE":c[o]=q({getItem:Ce("local")});break;case"MEDIA":c[o]=q(Ie());break;case"MISC":c[o]=ia().getMiscSettings();break;case"PARAMS":if(null==i)throw new ReferenceError(`PARAMS is not defined, in "${e}"`);c[o]=new URLSearchParams(i);break;case"PATH":c[o]=q((null==d?void 0:d.params)??{});break;case"PATH_NAME":c[o]=a.pathname;break;case"PROCESSORS":c[o]=G({get(e,t){const n=_.get(t);if(!n)throw new Error(`'PROCESSORS.${t}' is not registered! Have you installed the relevant brick package?`);return G({get:(e,t)=>n.get(t),ownKeys:()=>Array.from(n.keys())})},ownKeys(){const e=new Set;for(const t of p){const n=t.split(".")[0];e.add(n)}return Array.from(e)}});break;case"QUERY":if(null==i)throw new ReferenceError(`QUERY is not defined, in "${e}"`);c[o]=Object.fromEntries(Array.from(i.keys()).map((e=>[e,i.get(e)])));break;case"QUERY_ARRAY":if(null==i)throw new ReferenceError(`QUERY_ARRAY is not defined, in "${e}"`);c[o]=Object.fromEntries(Array.from(i.keys()).map((e=>[e,i.getAll(e)])));break;case"SESSION_STORAGE":c[o]=q({getItem:Ce("session")});break;case"TPL":if(Te(v,'Using "TPL" in expression',`check your expression: "${e}"`),v)break;case"STATE":c[o]=G({get:(e,t)=>g.getValue(t),ownKeys:()=>Array.from(h)});break;case"SYS":c[o]=q(A??{});break;case"__WIDGET_FN__":c[o]=Le;break;case"__WIDGET_IMG__":c[o]=null==oa||null===(r=oa.images)||void 0===r?void 0:r.widgetImagesFactory;break;case"__WIDGET_I18N__":c[o]=$}Object.assign(c,le(s.attemptToVisitGlobals,{storyboardFunctions:he,app:I,appendI18nNamespace:t.appendI18nNamespace}));try{const t=(0,T.cook)(s.expression,s.source,{globalVariables:(0,P.supply)(s.attemptToVisitGlobals,c)});return V("evaluation",{raw:e,context:c,result:t}),t}catch(t){const n=`${t.message}, in "${e}"`;throw new(lt(t))(n)}}}}let ft=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 pt(e){switch(e){case ft.USE_BRICK_PROPERTIES:case ft.USE_BRICK_TRANSFORM:case ft.USE_BRICK_EVENTS:case ft.USE_BRICK_IF:case ft.USE_BRICK_LIFECYCLE:case ft.USE_BRICK_DATA_SOURCE:return!0}return!1}function ht(e,t,n){if(pt(e))return e;if(t)switch(e){case ft.USE_BRICK:return ft.USE_BRICK_ITEM;case ft.USE_BRICK_SLOTS_ITEM_BRICKS:return ft.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM}else switch(e){case ft.INITIAL:if("useBrick"===n)return ft.USE_BRICK;break;case ft.USE_BRICK:case ft.USE_BRICK_ITEM:case ft.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM:switch(n){case"properties":return ft.USE_BRICK_PROPERTIES;case"transform":return ft.USE_BRICK_TRANSFORM;case"dataSource":return ft.USE_BRICK_DATA_SOURCE;case"events":return ft.USE_BRICK_EVENTS;case"slots":return ft.USE_BRICK_SLOTS;case"children":return ft.USE_BRICK_SLOTS_ITEM_BRICKS;case"if":return ft.USE_BRICK_IF;case"lifeCycle":return ft.USE_BRICK_LIFECYCLE}break;case ft.USE_BRICK_SLOTS:return ft.USE_BRICK_SLOTS_ITEM;case ft.USE_BRICK_SLOTS_ITEM:if("bricks"===n)return ft.USE_BRICK_SLOTS_ITEM_BRICKS}return ft.INITIAL}async function gt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=at(e);if(r||"string"==typeof e){const o=n.$$lazyForUseBrick&&pt(n.$$stateOfUseBrick);let a,i=o;return r||(0,T.isEvaluable)(e)?(a=await async function(e,t,n){const{blockingList:r,run:o}=dt(e,t,n,!0);return await Promise.all(r),o()}(e,t,{lazy:o}),i=st(e)):a=o?e:((0,f.hasOwnProperty)(t,"data")?n.noInject?x.transform:x.transformAndInject:n.noInject?bt:x.inject)(e,t),i||Xe(a),a}if(!(0,f.isObject)(e)||Ze(e)||"function"==typeof e)return e;if(Array.isArray(e)){const r=vt(n,!0);return Promise.all(e.map((e=>gt(e,t,r))))}return Object.fromEntries((await Promise.all(Object.entries(e).map((e=>{let[r,o]=e;return Promise.all([gt(r,t),gt(o,t,vt(n,!1,r))])})))).concat(n.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function mt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=at(e);if(r||"string"==typeof e){const o=n.$$lazyForUseBrick&&pt(n.$$stateOfUseBrick);let a,i=o;return r||(0,T.isEvaluable)(e)?(a=ut(e,t),i=st(e)):a=o?e:((0,f.hasOwnProperty)(t,"data")?n.noInject?x.transform:x.transformAndInject:n.noInject?bt:x.inject)(e,t),i||Xe(a),a}if(!(0,f.isObject)(e)||Ze(e)||"function"==typeof e)return e;if(Array.isArray(e)){const r=vt(n,!0);return e.map((e=>mt(e,t,r)))}return Object.fromEntries(Object.entries(e).map((e=>{let[r,o]=e;return[mt(r,t),mt(o,t,vt(n,!1,r))]})).concat(n.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function vt(e,t,n){return e.$$lazyForUseBrick?{...e,$$stateOfUseBrick:ht(e.$$stateOfUseBrick,t,n)}:e}function bt(e){return e}async function yt(e,t){return!(0,f.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||at(e.if)?await gt(e.if,t):e.if)}function wt(e,t){return!(0,f.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||at(e.if)?mt(e.if,t):e.if)}function At(e){return!(0,f.hasOwnProperty)(e,"if")||!!e.if}const St=function(){const e=k();if(e)return e.looseCheckIfByTransform}()||function(e,t){return wt(e,{data:t})};function Et(e){let t=!1,n=!1,r=!1;if("string"==typeof e?(0,T.isEvaluable)(e):at(e)){const o="string"==typeof e?e:it(e);if((0,T.isTrackAll)(o)){const e=(0,O.trackAll)(o);e&&(t=e.context,n=e.state,r=e.formState)}else t=(0,O.track)(o,"track context","CTX"),n=(0,O.track)(o,"track state","STATE"),r=(0,O.track)(o,"track formstate","FORM_STATE")}return{contextNames:t,stateNames:n,formStateNames:r}}async function kt(e,t){for(const[n,r,o]of e)if(n===t){const e=await r;if(void 0!==e||!o)return e}}async function It(e){const t={};for(const[n,r,o]of e){const e=await r;void 0===e&&o||!("style"!==n&&"dataset"!==n||(0,f.isObject)(e))||(t[n]=e)}return t}function Ct(e,t){if(t)for(const[n,r]of Object.entries(t))switch(n){case"style":case"dataset":for(const[t,o]of Object.entries(r))e[n][t]=o;break;case"constructor":case"__proto__":case"innerHTML":throw new Error(`set \`${n}\` is prohibited`);default:e[n]=r}}function Rt(e,t,n){const r=function(e,t){return(0,f.isObject)(e)?Object.fromEntries(Object.entries(e).map((e=>{let[n,r]=e;const o=mt(r,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?ft.USE_BRICK:ft.INITIAL});if("style"!==n&&"dataset"!==n||(0,f.isObject)(o))return[n,o]})).filter(Boolean)):{}}(t,n);Array.isArray(e)||(e=[e]),e.forEach((e=>{Ct(e,r)}))}function Tt(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Ot(e){return e&&e.sensitive?"":"i"}function xt(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var r=n.strict,o=void 0!==r&&r,a=n.start,i=void 0===a||a,s=n.end,c=void 0===s||s,l=n.encode,u=void 0===l?function(e){return e}:l,d=n.delimiter,f=void 0===d?"/#?":d,p=n.endsWith,h="[".concat(Tt(void 0===p?"":p),"]|$"),g="[".concat(Tt(f),"]"),m=i?"^":"",v=0,b=e;v<b.length;v++){var y=b[v];if("string"==typeof y)m+=Tt(u(y));else{var w=Tt(u(y.prefix)),A=Tt(u(y.suffix));if(y.pattern)if(t&&t.push(y),w||A)if("+"===y.modifier||"*"===y.modifier){var S="*"===y.modifier?"?":"";m+="(?:".concat(w,"((?:").concat(y.pattern,")(?:").concat(A).concat(w,"(?:").concat(y.pattern,"))*)").concat(A,")").concat(S)}else m+="(?:".concat(w,"(").concat(y.pattern,")").concat(A,")").concat(y.modifier);else"+"===y.modifier||"*"===y.modifier?m+="((?:".concat(y.pattern,")").concat(y.modifier,")"):m+="(".concat(y.pattern,")").concat(y.modifier);else m+="(?:".concat(w).concat(A,")").concat(y.modifier)}}if(c)o||(m+="".concat(g,"?")),m+=n.endsWith?"(?=".concat(h,")"):"$";else{var E=e[e.length-1],k="string"==typeof E?g.indexOf(E[E.length-1])>-1:void 0===E;o||(m+="(?:".concat(g,"(?=").concat(h,"))?")),k||(m+="(?=".concat(g,"|").concat(h,")"))}return new RegExp(m,Ot(n))}(function(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,a="";if("?"===e[s=n+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(n));if(!a)throw new TypeError("Missing pattern at ".concat(n));t.push({type:"PATTERN",index:n,value:a}),n=s}else{for(var i="",s=n+1;s<e.length;){var c=e.charCodeAt(s);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;i+=e[s++]}if(!i)throw new TypeError("Missing parameter name at ".concat(n));t.push({type:"NAME",index:n,value:i}),n=s}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,o=void 0===r?"./":r,a="[^".concat(Tt(t.delimiter||"/#?"),"]+?"),i=[],s=0,c=0,l="",u=function(e){if(c<n.length&&n[c].type===e)return n[c++].value},d=function(e){var t=u(e);if(void 0!==t)return t;var r=n[c],o=r.type,a=r.index;throw new TypeError("Unexpected ".concat(o," at ").concat(a,", expected ").concat(e))},f=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t};c<n.length;){var p=u("CHAR"),h=u("NAME"),g=u("PATTERN");if(h||g){var m=p||"";-1===o.indexOf(m)&&(l+=m,m=""),l&&(i.push(l),l=""),i.push({name:h||s++,prefix:m,suffix:"",pattern:g||a,modifier:u("MODIFIER")||""})}else{var v=p||u("ESCAPED_CHAR");if(v)l+=v;else if(l&&(i.push(l),l=""),u("OPEN")){m=f();var b=u("NAME")||"",y=u("PATTERN")||"",w=f();d("CLOSE"),i.push({name:b||(y?s++:""),pattern:b&&!y?a:y,prefix:m,suffix:w,modifier:u("MODIFIER")||""})}else d("END")}}return i}(e,n),t,n)}function Pt(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,o=n.exec(e.source);o;)t.push({name:o[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),o=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map((function(e){return Pt(e,t,n).source}));return new RegExp("(?:".concat(r.join("|"),")"),Ot(n))}(e,t,n):xt(e,t,n)}const Mt=new Map,_t=1e4;let Bt=0;function Lt(e,t){const{path:n,exact:r=!1,strict:o=!1,sensitive:a=!0}=t;return(Array.isArray(n)?n:[n]).reduce(((t,n)=>{if(t)return t;const{regexp:i,keys:s}=function(e,t){const n=`${t.end}${t.strict}${t.sensitive}`;let r=Mt.get(n);r||Mt.set(n,r=new Map);const o=r.get(e);if(o)return o;const a=[],i={regexp:Pt(e,a,t),keys:a};return Bt<_t&&(r.set(e,i),Bt++),i}(n,{end:r,strict:o,sensitive:a}),c=i.exec(e);if(!c)return null;const[l,...u]=c,d=e===l;return r&&!d?null:{path:n,url:"/"===n&&""===l?"/":l,isExact:d,params:s.reduce(((e,t,n)=>(e[t.name]=u[n],e)),{})}}),null)}function $t(e,t,n){return Lt(n,{path:e.path.replace(/^\$\{APP.homepage\}/,t),exact:e.exact})}const Nt=Symbol.for("tpl.asyncComputedPropsFromHost"),Ut=Symbol.for("tpl.stateStoreId"),Ft=Symbol.for("tpl.externalForEachItem"),jt=Symbol.for("tpl.externalForEachIndex"),Dt=Symbol.for("tpl.externalForEachSize"),Kt=new Set;let Vt=function(e){return e.REQUEST_FAILED="REQUEST_FAILED",e.SOMETHING_WENT_WRONG="SOMETHING_WENT_WRONG",e.LOGIN_TIMEOUT_MESSAGE="LOGIN_TIMEOUT_MESSAGE",e.NETWORK_ERROR="NETWORK_ERROR",e}({});const Wt={[Vt.REQUEST_FAILED]:"Request Failed",[Vt.SOMETHING_WENT_WRONG]:"Something went wrong!",[Vt.LOGIN_TIMEOUT_MESSAGE]:"You haven't logged in or your login session has expired. Login right now?",[Vt.NETWORK_ERROR]:"Network error, please check your network."},zt={[Vt.REQUEST_FAILED]:"请求失败",[Vt.SOMETHING_WENT_WRONG]:"出现了一些问题!",[Vt.LOGIN_TIMEOUT_MESSAGE]:"您还未登录或登录信息已过期,现在重新登录?",[Vt.NETWORK_ERROR]:"网络错误,请检查您的网络连接。"},Ht="core/runtime",qt={en:Wt,zh:zt};let Gt;const Yt=Object.freeze({show:function(e){if(Gt)return Gt.resolve(e);if("confirm"===e.type){const t=confirm(e.content);return new Promise(((e,n)=>setTimeout((()=>{(t?e:n)()}),1)))}return alert(e.content),new Promise((e=>setTimeout((()=>{e()}),1)))}});function Jt(e){const{search:t,pathname:n}=e,r=n?window.btoa(encodeURIComponent(n)):"",o=t?window.btoa(encodeURIComponent(t)):"";document.cookie=`SALOGINPATH=${r}; path=/`,document.cookie=`SALOGINQUERY=${o}; path=/`}function Qt(e){if(e instanceof Event&&e.target instanceof HTMLScriptElement)return e.target.src;if(e instanceof R.HttpFetchError)return u.i18n.t(`${Ht}:${Vt.NETWORK_ERROR}`);if(e instanceof R.HttpResponseError&&e.responseJson){if("string"==typeof e.responseJson.error)return e.responseJson.error;if("string"==typeof e.responseJson.msg)return e.responseJson.msg}return null==e?"Unknown error":e.toString()}function Xt(e){return e instanceof R.HttpResponseError&&401===e.response.status&&!!e.responseJson&&100003===e.responseJson.code}let Zt,en,tn=!1;function nn(e){if(e instanceof R.HttpAbortError)return;if(Xt(e)&&!window.NO_AUTH_GUARD){if(tn)return;return tn=!0,void Yt.show({type:"confirm",content:u.i18n.t(`${Ht}:${Vt.LOGIN_TIMEOUT_MESSAGE}`)}).then((()=>{!function(){const e=ia().getFeatureFlags()["sso-enabled"],t=C();Jt(t.location),t.push(e?"/sso-auth/login":"/auth/login",{from:{...t.location,state:void 0}})}(),tn=!1}),(()=>{tn=!1}))}console.error(e);const t=Qt(e);t!==Zt&&(Zt=t,Yt.show({type:"error",title:u.i18n.t(`${Ht}:${Vt.REQUEST_FAILED}`),content:t,contentStyle:{whiteSpace:"pre-wrap",wordBreak:"break-word"}}).then((()=>{Zt=void 0})))}const rn=Object.freeze({show:function(e){en?en.resolve(e):alert(e.message)}});function on(e,t,n){t&&Object.entries(t).forEach((t=>{let[r,o]=t;const a=un(o,n,{element:e});e.addEventListener(r,a),e.$$listeners||(e.$$listeners=[]),e.$$listeners.push([r,a]),e.$$eventListeners||(e.$$eventListeners=[]);for(const t of[].concat(o))e.$$eventListeners.push([r,null,t])}))}function an(e){return"string"==typeof e.action}function sn(e){return"string"==typeof e.useProvider}function cn(e){return!(!e.target&&!e.targetRef||!e.method&&!e.properties)}function ln(e){return!!e.then}function un(e,t,n){return function(r){for(const o of[].concat(e))if(wt(o,{...t,event:r}))if(ln(o))un(o.then,t,n)(r);else if(an(o)){const[e,a]=o.action.split(".");switch(o.action){case"history.push":case"history.replace":case"history.pushQuery":case"history.replaceQuery":case"history.pushAnchor":case"history.block":case"history.goBack":case"history.goForward":case"history.reload":case"history.unblock":hn(r,a,o.args,o.callback,t);break;case"window.open":gn(r,o.args,t);break;case"window.postMessage":mn(r,o.args,t);break;case"location.reload":case"location.assign":An(r,a,o.args,t);break;case"localStorage.setItem":case"localStorage.removeItem":case"sessionStorage.setItem":case"sessionStorage.removeItem":Sn(r,e,a,o.args,t);break;case"event.preventDefault":r.preventDefault();break;case"event.stopPropagation":r.stopPropagation();break;case"console.log":case"console.error":case"console.warn":case"console.info":En(r,a,o.args,t);break;case"message.success":case"message.error":case"message.info":case"message.warn":kn(r,a,o.args,t);break;case"handleHttpError":nn(r.detail);break;case"context.assign":case"context.replace":case"context.refresh":case"context.load":bn(r,a,o.args,o.batch??!0,o.callback,t);break;case"state.update":case"state.refresh":case"state.load":yn(r,a,o.args,o.batch??!0,o.callback,t);break;case"tpl.dispatchEvent":{const[e,n]=Rn(o.args,t,r);_e(t,o.action,`: ${e}`).dispatchEvent(new CustomEvent(e,n));break}case"formstate.update":wn(r,o.args,o.callback,t);break;case"message.subscribe":case"message.unsubscribe":In(r,a,o.args,t,n,o.callback);break;case"theme.setDarkTheme":case"theme.setLightTheme":te("theme.setDarkTheme"===o.action?"dark":"light");break;case"theme.setTheme":{const[e]=Rn(o.args,t,r);te(e);break}case"mode.setDashboardMode":case"mode.setDefaultMode":se("mode.setDashboardMode"===o.action?"dashboard":"default");break;default:console.error("unknown event listener action:",o.action)}}else sn(o)?dn(r,o,t,n):cn(o)?fn(r,o,t,n):console.error("unknown event handler:",o);else o.else&&un(o.else,t,n)(r)}}function dn(e,t,n,r){const o="saveAs"!==t.method?"resolve":"saveAs";pn(e,t.useProvider,t,o,n,r)}function fn(e,t,n,r){let o=[];const a=t.target,i=t.targetRef;let s=a;if(("string"==typeof a?(0,T.isEvaluable)(a):at(a))&&(s=mt(a,{...n,event:e})),"string"==typeof s)if("_self"===s)o.push(r.element);else if(t.multiple)o=Array.from(document.querySelectorAll(s));else{const e=document.querySelector(s);null!==e&&o.push(e)}else if(s)s instanceof HTMLElement?o.push(s):console.error("unexpected target:",s);else if(i){let t=i;("string"==typeof i?(0,T.isEvaluable)(i):at(i))&&(t=mt(i,{...n,event:e}));const r=[].concat(t),a=_e(n,"targetRef",`: ${r.join(", ")}`);o.push(...r.map((e=>{var t;return null===(t=a.$$getElementByRef)||void 0===t?void 0:t.call(a,e)})).filter(Boolean))}0!==o.length?function(e){return!!e.method}(t)?o.forEach((o=>{pn(e,o,t,t.method,n,r,{useEventAsDefault:!0})})):function(e){return!!e.properties}(t)&&Rt(o,t.properties,{...n,event:e}):console.error("target not found:",a||i)}async function pn(e,t,n,r,o,a,i){const s=sn(n),c=async()=>{var a;const c=s?await Je(t):t;if("function"!=typeof c[r])throw new Error(`target <${c.tagName.toLowerCase()}> has no method: ${r}`);let l=Rn(n.args,o,e,i);var u;return sn(n)&&null!=oa&&null!==(a=oa.flowApi)&&void 0!==a&&a.isFlowApiProvider(n.useProvider)&&(l=await oa.flowApi.getArgsOfFlowApi(n.useProvider,l,r,null===(u=n.sse)||void 0===u?void 0:u.stream)),c[r](...l)};if(!n.callback)return void c();const l=Cn(n.callback,o,a),u={progress:l("progress"),success:l("success"),error:l("error"),finally:l("finally")};if(s){var d,f;const t={...o,event:e};if(mt(null===(d=n.sse)||void 0===d?void 0:d.stream,t))return void async function(e,t){let{progress:n,success:r,error:o,finally:a}=t;const i=pa();try{const t=await e();for await(const e of t){if(i!==pa())return;null==n||n(e)}if(i!==pa())return;null==r||r()}catch(e){if(i!==pa())return;null==o||o(e)}finally{null==a||a()}}(c,u);if(mt(null===(f=n.poll)||void 0===f?void 0:f.enabled,t))return void function(e,t,n,r){let{progress:o,success:a,error:i,finally:s}=t;const{expectPollStopImmediately:c,expectPollEnd:l}=n,{interval:u,leadingRequestDelay:d,continueOnError:f,delegateLoadingBar:p}=mt((0,m.pick)(n,["interval","leadingRequestDelay","continueOnError","delegateLoadingBar"]),r),h=pa();let g;async function v(){let t;Kt.delete(g);try{var n;if(t=null===(n=mt(c,r))||void 0===n?void 0:n(),t)null==s||s();else{var d;const n=await e(),i=null===(d=mt(c,r))||void 0===d?void 0:d();var m;t=i||h!==pa(),t?i&&(null==s||s()):(null==o||o(n),null!==(m=mt(l,r))&&void 0!==m&&m(n)?(p&&window.dispatchEvent(new Event("request.end")),null==a||a(n),null==s||s()):b(u??3e3))}}catch(e){var v;const n=null===(v=mt(c,r))||void 0===v?void 0:v();t=n||h!==pa(),t?n&&(null==s||s()):(null==i||i(e),f?b(u??3e3):null==s||s())}finally{p&&t&&window.dispatchEvent(new Event("request.end"))}}function b(e){g=setTimeout(v,e),Kt.add(g)}b(d??0),p&&window.dispatchEvent(new Event("request.start"))}(c,u,n.poll,t)}try{const e=await c();u.success(e)}catch(e){u.error(e)}finally{u.finally()}}function hn(e,t,n,r,o){let 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"}let c=[];if(a>0&&(c=Rn(n,o,e,{useEventDetailAsDefault:!0}),c.length=a),i&&r){const e=Cn(r,o,void 0);c.push((t=>{e(t?"error":"success")({blocked:t}),e("finally")({blocked:t})}))}C()[s](...c)}function gn(e,t,n){const[r,o,a]=Rn(t,n,e);window.open(r,o||"_self",a)}function mn(e,t,n){const r=Rn(t,n,e);1===r.length&&r.push(location.origin),window.postMessage(...r)}function vn(e,t,n,r,o,a){t?r.updateValues(e,n,(e=>Rn(e,o,a)[0])):e.forEach((e=>{const{name:t,value:i}=Rn([e],o,a)[0];r.updateValue(t,i,n)}))}function bn(e,t,n,r,o,a){if(!Array.isArray(n)||!n.every(f.isObject)||"assign"!==t&&"replace"!==t){const[r,i]=Rn(n,a,e);a.ctxStore.updateValue(r,i,t,o,a)}else vn(n,r,t,a.ctxStore,a,e)}function yn(e,t,n,r,o,a){if(Array.isArray(n)&&n.every(f.isObject)&&"update"===t)vn(n,r,"replace",Me(a,`state.${t}`,`: ${JSON.stringify(n)}`),a,e);else{const[r,i]=Rn(n,a,e);Me(a,`state.${t}`,`: ${r}`).updateValue(r,i,"update"===t?"replace":t,o,a)}}function wn(e,t,n,r){const[o,a]=Rn(t,r,e);Ge(r,"formstate.update",`: ${o}`).updateValue(o,a,"replace",n,r)}function An(e,t,n,r){if("assign"===t){const[t]=Rn(n,r,e);location.assign(t)}else location[t]()}function Sn(e,t,n,r,o){const a="localStorage"===t?localStorage:sessionStorage,[i,s]=Rn(r,o,e);"setItem"===n?void 0!==s&&a.setItem(i,JSON.stringify(s)):a.removeItem(i)}function En(e,t,n,r){console[t](...Rn(n,r,e,{useEventAsDefault:!0}))}function kn(e,t,n,r){const o=Rn(n,r,e,{useEventAsDefault:!0});rn.show({type:t,message:o[0]})}async function In(e,t,n,r,o,a){const i=()=>{var o;const a=Rn(n,r,e);return null==oa||null===(o=oa.messageDispatcher)||void 0===o?void 0:o[t](...a)};if(!a)return void i();const s=Cn(a,r,o);try{const e=await i();s("success")(e)}catch(e){s("error")(e)}finally{s("finally")()}}function Cn(e,t,n){return function(r){return function(o){const a=null==e?void 0:e[r];if(a)try{const e=new CustomEvent(`callback.${r}`,{detail:o});un(a,t,n)(e)}catch(e){console.error(e)}else"error"===r&&console.error("Unhandled callback error:",o)}}}function Rn(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Array.isArray(e)?mt(e,{...t,event:n}):r.useEventAsDefault?[n]:r.useEventDetailAsDefault?[n.detail]:[]}function Tn(e){var t;const{ref:n,runtimeContext:r,element:o}=e;if(!n||!r.tplStateStoreId)return;const{hostBrick:a}=Me(r,"bindTemplateProxy"),i=a.tplHostMetadata;i.internalBricksByRef.set(n,e);const s=null===(t=i.proxy)||void 0===t?void 0:t.events;if(s)for(const[e,t]of Object.entries(s))if(t.ref===n){var c;const n=t=>{t.bubbles&&t.stopPropagation(),a.element.dispatchEvent(new CustomEvent(e,{detail:t.detail,bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed}))},r=t.refEvent??e;o.addEventListener(r,n),(c=o).$$proxyListeners??(c.$$proxyListeners=[]),o.$$proxyListeners.push([r,n])}}function On(e){const{ref:t,runtimeContext:n,element:r}=e;if(null==n||!n.tplStateStoreId||!t)return;const{hostBrick:o}=Me(n,"unbindTemplateProxy");o.tplHostMetadata.internalBricksByRef.delete(t);for(const[e,t]of r.$$proxyListeners??[])r.removeEventListener(e,t);delete r.$$proxyListeners}let xn=function(e){return e[e.ROOT=1]="ROOT",e[e.BRICK=2]="BRICK",e[e.PLACEHOLDER=3]="PLACEHOLDER",e}({});function Pn(e){e.replaceChildren()}function Mn(e,t){window.DISABLE_REACT_FLUSH_SYNC=!1;let n=e.child;const r=[];for(;n;){if(n.tag===xn.BRICK){var o;const a=n.type;a.includes("-")&&!customElements.get(a)&&console.error(`Undefined custom element: ${a}`),"basic-bricks.script-brick"===a&&console.warn("`basic-bricks.script-brick` is deprecated, please take caution when using it");const i=t&&n===e.child?t:document.createElement(a);n.element=i,n.slotId&&i.setAttribute("slot",n.slotId),n.iid&&(i.dataset.iid=n.iid),null!==(o=n.tplHostMetadata)&&void 0!==o&&o.tplStateStoreId&&(i.dataset.tplStateStoreId=n.tplHostMetadata.tplStateStoreId),Ct(i,n.properties),on(i,n.events,n.runtimeContext),n.tplHostMetadata&&(i.$$tplStateStore=Me({tplStateStoreId:n.tplHostMetadata.tplStateStoreId,tplStateStoreMap:n.runtimeContext.tplStateStoreMap},"mount")),Tn(n),n.portal?r.push(i):n.return&&(n.return.childElements||(n.return.childElements=[]),n.return.childElements.push(i))}if(n.child)n=n.child;else if(n.sibling)n=n.sibling;else{var a;let e=n.return;for(;e;){var i;if(e.childElements)e.tag===xn.ROOT?null===(i=e.container)||void 0===i||i.append(...e.childElements):e.element.append(...e.childElements),e.childElements=void 0;if(e.tag===xn.ROOT&&r.length>0&&("function"==typeof e.createPortal?e.createPortal():e.createPortal).append(...r),e.sibling)break;e=e.return}n=null===(a=e)||void 0===a?void 0:a.sibling}}setTimeout((()=>{window.DISABLE_REACT_FLUSH_SYNC=!0}))}const _n=["onMount","onUnmount","onMediaChange","onScrollIntoView","onMessage","onMessageClose"],Bn=["onBeforePageLoad","onPageLoad","onPageLeave","onBeforePageLeave","onAnchorLoad","onAnchorUnload"];var Ln=new WeakMap,$n=new WeakMap,Nn=new WeakMap,Un=new WeakMap,Fn=new WeakMap,jn=new WeakMap,Dn=new WeakMap,Kn=new WeakMap,Vn=new WeakMap,Wn=new WeakSet;class zn{constructor(e,t){(0,o.A)(this,Wn),(0,a.A)(this,"scope",void 0),(0,a.A)(this,"unknownBricks",void 0),(0,a.A)(this,"renderId",void 0),(0,i.A)(this,Ln,void 0),(0,i.A)(this,$n,{onBeforePageLoad:[],onPageLoad:[],onPageLeave:[],onBeforePageLeave:[],onAnchorLoad:[],onAnchorUnload:[],onMediaChange:[],onScrollIntoView:[],onMount:[],onUnmount:[],onMessage:[],onMessageClose:[]}),(0,i.A)(this,Nn,new Map),(0,i.A)(this,Un,void 0),(0,i.A)(this,Fn,new Map),(0,i.A)(this,jn,void 0),(0,i.A)(this,Dn,void 0),(0,i.A)(this,Kn,new WeakMap),(0,i.A)(this,Vn,new Map),this.scope=e,this.unknownBricks=(null==t?void 0:t.unknownBricks)??"throw",(0,c.A)(Ln,this,null==t?void 0:t.routeHelper),this.renderId=null==t?void 0:t.renderId}setInitialMenuRequestNode(e){(0,c.A)(Dn,this,e)}memoizeMenuRequestNode(e,t){(0,l.A)(Kn,this).set(e,t)}getMenuRequests(){const e=[];let t=(0,l.A)(Dn,this);for(;t;)if(t.request&&e.push(t.request),t.child)t=t.child;else{for(var n;t&&!t.sibling;)t=t.return;t=null===(n=t)||void 0===n?void 0:n.sibling}return e}async reMergeMenuRequestNodes(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(0,l.A)(Kn,this).get(t);(0,l.A)(Kn,this).set(t,n);let o,a=e.child;for(;a&&a!==r;)o=a,a=a.sibling;o?(o.sibling=n,n.sibling=null==r?void 0:r.sibling):e.child=n,await(0,l.A)(Ln,this).mergeMenus(this.getMenuRequests())}reBailout(e){return(0,l.A)(Ln,this).bailout(e)}reCatch(e,t){return(0,l.A)(Ln,this).catch(e,t)}async didPerformIncrementalRender(e,t){let n=!1;const r=[];for(const{parentRoutes:o,callback:a}of[...(0,l.A)(Vn,this).values()].reverse()){const i=o[o.length-1];if(r.includes(i))continue;const s=await a(e,t);s&&r.push(...o.slice(0,-1)),!1!==s&&(n=!0)}return n}performIncrementalRender(e,t,n){(0,l.A)(Vn,this).set(e,{parentRoutes:t,callback:n})}registerBrickLifeCycle(e,t){if(!t)return;const n=[..._n,..."page"===this.scope?Bn:[]];for(const r of n){const n=t[r];n&&(0,l.A)($n,this)[r].push({brick:e,handlers:n})}(0,m.isEmpty)(t.useResolves)||console.error("`lifeCycle.useResolves` is dropped in v3:",t)}registerArbitraryLifeCycle(e,t){const n=(0,l.A)(Fn,this).get(e);n?n.add(t):(0,l.A)(Fn,this).set(e,new Set([t]))}memoize(e,t,n,r){(0,l.A)(jn,this)||(0,c.A)(jn,this,new WeakMap);const o=[e??"",...t].join(".");let a=(0,l.A)(jn,this).get(r);a||(a=new Map,(0,l.A)(jn,this).set(r,a)),a.set(o,{node:n,last:Jn(n),lastNormal:Qn(n),lastPortal:Zn(n)})}reRender(e,t,n,r){const o=[e??"",...t].join("."),a=(0,l.A)(jn,this).get(r).get(o),{node:i,last:c,lastNormal:u,lastPortal:d}=a;let f;const p=[];if((null==i?void 0:i.tag)===xn.PLACEHOLDER){var h,g;f=(null===(h=function(e){return Xn(e,!0)}(i))||void 0===h?void 0:h.element)??null;const e=null===(g=function(e){return er(e,!0)}(i))||void 0===g?void 0:g.element;e&&p.push(e)}else{var m,v;f=(null==u||null===(m=u.element)||void 0===m?void 0:m.nextSibling)??null;let e=null==d||null===(v=d.element)||void 0===v?void 0:v.nextSibling;for(;e&&(p.push(e),e instanceof HTMLElement&&"DIV"===e.tagName);)e=e.nextSibling}const b=Jn(n);let y;a.node=n,a.last=b,a.lastNormal=Qn(n),a.lastPortal=Zn(n);let w=r.child;for(;w&&w!==c;){if(w.sibling===i){y=w;break}w=w.sibling}const A=document.createDocumentFragment(),S=document.createDocumentFragment(),E={tag:xn.ROOT,container:A,createPortal:S,child:n};for(w=n;w;)w.return=E,w=w.sibling;const k=tr(i,c);for((0,s.A)(Wn,this,Hn).call(this,k),Mn(E),y?y.sibling=n:r.child=n,b&&(b.sibling=null==c?void 0:c.sibling),w=n;w;)w.return=r,w=w.sibling;var I,C;if(r.tag===xn.ROOT?null===(I=r.container)||void 0===I||I.insertBefore(A,f):null===(C=r.element)||void 0===C||C.insertBefore(A,f),S.childNodes.length>0){var R;let e=n;for(;e&&e.return;)e=e.return;if((null===(R=e)||void 0===R?void 0:R.tag)!==xn.ROOT)throw new Error("Cannot find render root node. This is a bug of Brick Next, please report it.");const t="function"==typeof e.createPortal?e.createPortal():e.createPortal;let r=null;for(const e of p)if(t.contains(e)){r=e;break}t.insertBefore(S,r)}const T=tr(n,b);(0,s.A)(Wn,this,qn).call(this,T)}dispose(){for(const e of Object.values((0,l.A)($n,this)))e.length=0;for(const e of(0,l.A)(Nn,this).values()){for(const t of e)t.disconnect();e.length=0}(0,l.A)(Nn,this).clear(),(0,l.A)(Un,this)&&(Ae.removeEventListener("change",(0,l.A)(Un,this)),(0,c.A)(Un,this,void 0)),(0,c.A)(jn,this,void 0),(0,l.A)(Fn,this).clear(),(0,l.A)(Vn,this).clear(),(0,c.A)(Kn,this,void 0)}dispatchBeforePageLoad(){(0,s.A)(Wn,this,Gn).call(this,"onBeforePageLoad",new CustomEvent("page.beforeLoad"))}dispatchPageLoad(){const e=new CustomEvent("page.load");(0,s.A)(Wn,this,Gn).call(this,"onPageLoad",e),window.dispatchEvent(e)}dispatchBeforePageLeave(e){(0,s.A)(Wn,this,Gn).call(this,"onBeforePageLeave",new CustomEvent("page.beforeLeave",{detail:e}))}dispatchPageLeave(){(0,s.A)(Wn,this,Gn).call(this,"onPageLeave",new CustomEvent("page.leave"))}dispatchAnchorLoad(){const{hash:e}=C().location;e&&"#"!==e?(0,s.A)(Wn,this,Gn).call(this,"onAnchorLoad",new CustomEvent("anchor.load",{detail:{hash:e,anchor:e.substring(1)}})):(0,s.A)(Wn,this,Gn).call(this,"onAnchorUnload",new CustomEvent("anchor.unload"))}initializeScrollIntoView(){for(const{brick:e,handlers:t}of(0,l.A)($n,this).onScrollIntoView)(0,s.A)(Wn,this,Yn).call(this,e,t)}initializeMediaChange(){(0,c.A)(Un,this,(e=>{(0,s.A)(Wn,this,Gn).call(this,"onMediaChange",new CustomEvent("media.change",{detail:q(e.detail)}))})),Ae.addEventListener("change",(0,l.A)(Un,this))}initializeMessageDispatcher(){var e;for(const{brick:e,handlers:n}of(0,l.A)($n,this).onMessage)for(const r of[].concat(n)){var t;null==oa||null===(t=oa.messageDispatcher)||void 0===t||t.onMessage(r.channel,(t=>{un(r.handlers,e.runtimeContext,e)(new CustomEvent("message.push",{detail:t}))}))}null==oa||null===(e=oa.messageDispatcher)||void 0===e||e.onClose((()=>{(0,s.A)(Wn,this,Gn).call(this,"onMessageClose",new CustomEvent("message.close"))}))}dispatchOnMount(){(0,s.A)(Wn,this,Gn).call(this,"onMount",new CustomEvent("mount"))}dispatchOnUnmount(){(0,s.A)(Wn,this,Gn).call(this,"onUnmount",new CustomEvent("unmount"))}}function Hn(e){const t=[..._n,..."page"===this.scope?Bn:[]],n=[];for(const r of t){const t=(0,m.remove)((0,l.A)($n,this)[r],(t=>e.has(t.brick)));"onUnmount"===r&&n.push(...t)}for(const t of e){var r,o;const e=(0,l.A)(Nn,this).get(t);if(null!=e&&e.length){for(const t of e)t.disconnect();e.length=0,(0,l.A)(Nn,this).delete(t)}On(t),null===(r=t.element)||void 0===r||delete r.$$tplStateStore,null===(o=t.element)||void 0===o||o.remove()}const a=new CustomEvent("unmount");for(const{brick:e,handlers:t}of n)un(t,e.runtimeContext,e)(a)}function qn(e){const t=new CustomEvent("mount");for(const{brick:n,handlers:r}of(0,l.A)($n,this).onMount)e.has(n)&&un(r,n.runtimeContext,n)(t);for(const{brick:t,handlers:n}of(0,l.A)($n,this).onScrollIntoView)e.has(t)&&(0,s.A)(Wn,this,Yn).call(this,t,n)}function Gn(e,t){for(const{brick:n,handlers:r}of(0,l.A)($n,this)[e])un(r,n.runtimeContext,n)(t);const n=(0,l.A)(Fn,this).get(e);if(n)for(const e of n)e()}function Yn(e,t){const n=t.threshold??.1,r=new IntersectionObserver(((r,o)=>{r.forEach((r=>{r.isIntersecting&&r.intersectionRatio>=n&&(un(t.handlers,e.runtimeContext,e)(new CustomEvent("scroll.into.view")),o.disconnect())}))}),{threshold:n});r.observe(e.element);let o=(0,l.A)(Nn,this).get(e);o||(o=[],(0,l.A)(Nn,this).set(e,o)),o.push(r)}function Jn(e){let t=e;for(;null!==(n=t)&&void 0!==n&&n.sibling;){var n;t=t.sibling}return t}function Qn(e){return Xn(e,!1)}function Xn(e,t){let n,r=e;for(;r;){if(r.tag===xn.BRICK&&!r.portal){if(t)return r;n=r}r=r.sibling}return n}function Zn(e){return er(e,!1)}function er(e,t){let n,r=e;for(;r;){if(r.tag===xn.BRICK&&r.portal){if(t)return r;n=r}if(r.child)r=r.child;else if(r.sibling)r=r.sibling;else{var o;let e=r.return;for(;e&&!e.sibling;)e=e.return;r=null===(o=e)||void 0===o?void 0:o.sibling}}return n}function tr(e,t){const n=new Set;let r=e;for(;r;)if(r.tag===xn.BRICK&&n.add(r),r.child)r=r.child;else{if(r===t)break;if(r.sibling)r=r.sibling;else{var o;let e=r.return;for(;e&&e!==t&&!e.sibling;)e=e.return;if(e===t)break;r=null===(o=e)||void 0===o?void 0:o.sibling}}return n}const nr=new Map;function rr(e){return nr.get(e)}const or=Symbol.for("root.runtimeContext");async function ar(e,t,n){var r,o;const[a,i,s]=Xr({...e[or]??ha(),data:t,pendingPermissionsPreCheck:[]});a.tplStateStoreMap??(a.tplStateStoreMap=new Map),a.formStateStoreMap??(a.formStateStoreMap=new Map);const c=new zn("fragment"),l={tag:xn.ROOT,createPortal:null},u=e.transform,d=Re();u&&Te(d,"`useBrick.transform`",'please use "properties" instead, check your useBrick:',e);const f=await Yr(l,d&&!n?e:{errorBoundary:n,...e,properties:{...e.properties,...u}},a,c,[],{}),p=[...i,...s];if(await Qr(f,a,p),(null===(r=f.node)||void 0===r?void 0:r.tag)===xn.PLACEHOLDER)throw new Error("The root brick of useBrick cannot be an ignored control node");if(null!==(o=f.node)&&void 0!==o&&o.portal)throw new Error("The root brick of useBrick cannot be a portal brick");return l.child=f.node,{tagName:f.node?f.node.type:null,renderRoot:l,rendererContext:c,scopedStores:p}}function ir(e,t){let n,{renderRoot:r,rendererContext:o,scopedStores:a}=e;r.createPortal=()=>{const e=document.querySelector("#portal-mount-point");return n=document.createElement("div"),e.appendChild(n),n},Mn(r,t),o.dispatchOnMount(),o.initializeScrollIntoView(),o.initializeMediaChange(),o.initializeMessageDispatcher();for(const e of a)e.mountAsyncData();return{portal:n}}function sr(e,t){let{rendererContext:n}=e;t.portal&&(Pn(t.portal),t.portal.remove()),n.dispatchOnUnmount(),n.dispose()}function cr(e,t,n){if(n)throw new Error("Legacy doTransform does not support options in v3");return mt(t,{...ha(),data:e},{noInject:!0})}function lr(e,t){const n=ga(e);Object.assign(n,{...t,meta:{...n.meta,...t.meta},$$fulfilling:null,$$fulfilled:!0,$$registerCustomTemplateProcessed:!1}),B(n)}function ur(e,t){const n=ga(e);let r=!1;const o=e=>`${e.path}.${e.exact}`,a=(e,n)=>e.map((e=>{const i=o(e);return"routes"===e.type?(e.routes=a(e.routes,n),e):i===n?(r=!0,t):e}));n.routes=a(n.routes,o(t)),r||n.routes.unshift(t)}function dr(e,t,n){const r=`${e}.${t.name}`;Pe.define(r,{bricks:t.bricks,proxy:t.proxy,state:t.state}),fr(e,t.name,n)}function fr(e,t,n){mr(e,`\${APP.homepage}/_dev_only_/template-preview/${t}`,[{brick:t,...(0,m.pick)(n,"properties","events","lifeCycle","context","slots","children")}])}function pr(e){return`\${APP.homepage}/_dev_only_/snippet-preview/${e}`}function hr(e,t){var n;mr(e,pr(t.snippetId),null!==(n=t.bricks)&&void 0!==n&&n.length?t.bricks:[{brick:"span"}],t.context)}const gr=hr;function mr(e,t,n,r){const{routes:o}=ga(e),a=o.findIndex((e=>e.path===t)),i={path:t,bricks:n,context:r,menu:!1,exact:!0};-1===a?o.unshift(i):o.splice(a,1,i)}function vr(e,t){let{tplStateStoreId:n}=t;const r=ha();return n?Me({...r,tplStateStoreId:n},"STATE").getValue(e):r.ctxStore.getValue(e)}function br(e){let{tplStateStoreId:t}=e;const n=ha();return t?Me({...n,tplStateStoreId:t},"STATE").getAllValues():n.ctxStore.getAllValues()}function yr(e){return fa().find((t=>t.id?t.id===e:t.filePath.startsWith(`${e}/`)))}function wr(e){return(0,d.loadBricksImperatively)(e,fa())}function Ar(e,t){return(0,d.loadEditorsImperatively)(e,t??fa())}function Sr(){return pa()}async function Er(e,t){let{appId:n,updateStoryboardType:r,collectUsedContracts:o}=t;const a=ga(n);let i;if("route"===r)i={routes:[e]};else if("template"===r)i={meta:{customTemplates:[e]}};else if("snippet"===r){var s;const t=pr(e.snippetId);i={routes:[null==a||null===(s=a.routes)||void 0===s?void 0:s.find((e=>e.path===t))]}}const c=[];return i&&o&&(await o(i)).forEach((e=>{var t;const[n,r,o]=e.match(/(.*)@(.*):\d\.\d\.\d/);null!=a&&null!==(t=a.meta)&&void 0!==t&&null!==(t=t.contracts)&&void 0!==t&&t.some((e=>e.namespaceId===r&&e.name===o))||c.push(e)})),c}async function kr(e,t){let{tplStateStoreId:n,routeId:r}=t;const o={...ha(),tplStateStoreId:n,match:rr(r)};return e.resolve?tt(e.resolve,o,{cache:"reload"}):gt(e.value,o)}function Ir(e){const t=ha();return{app:(null==t?void 0:t.overrideApp)??(null==t?void 0:t.app),location:(0,m.pick)(location,["href","origin","hostname","host"]),...(0,m.pick)(t,["query","sys"]),match:rr(null==e?void 0:e.routeId)}}let Cr;const Rr=[];function Tr(e){Cr=e;const t=br({tplStateStoreId:e.tplStateStoreId});xr({changeType:"initialize",tplStateStoreId:e.tplStateStoreId,detail:{data:t}})}function Or(e){Rr.push(e)}function xr(e){setTimeout((()=>{for(const t of Rr)try{t(e)}catch(t){console.error(`RealTimeDataInspectHook failed (${e.changeType}):`,t)}}))}const Pr=["onBeforePageLoad","onPageLoad","onBeforePageLeave","onPageLeave","onAnchorLoad","onAnchorUnload"];class Mr{constructor(e,t,n,r){(0,a.A)(this,"type",void 0),(0,a.A)(this,"data",new Map),(0,a.A)(this,"changeEventType",void 0),(0,a.A)(this,"pendingStack",[]),(0,a.A)(this,"hostBrick",void 0),(0,a.A)(this,"stateStoreId",void 0),(0,a.A)(this,"batchUpdate",!1),(0,a.A)(this,"batchUpdateContextsNames",[]),(0,a.A)(this,"rendererContext",void 0),(0,a.A)(this,"routeMap",new WeakMap),this.type=e,this.changeEventType="FORM_STATE"===this.type?"formstate.change":"STATE"===this.type?"state.change":"context.change",this.hostBrick=t,this.rendererContext=n,this.stateStoreId=r}getAllValues(){return Object.fromEntries([...this.data.entries()].map((e=>{let[t,{value:n}]=e;return[t,n]})))}getValue(e){var t;return null===(t=this.data.get(e))||void 0===t?void 0:t.value}notifyRealTimeDataChange(e,t){if(Cr){const{tplStateStoreId:n}=Cr;(n?"STATE"===this.type&&this.stateStoreId===n:"CTX"===this.type)&&xr({changeType:"update",tplStateStoreId:n,detail:{name:e,value:t}})}}getAffectListByContext(e){const t=[e];return this.data.forEach(((e,n)=>{e.deps&&e.deps.some((e=>t.includes(e)))&&t.push(n)&&t.push(...this.getAffectListByContext(n))})),t.shift(),[...new Set(t)]}updateValues(e,t,n){if(this.batchUpdate=!0,this.batchUpdateContextsNames=e.map((e=>e.name)),[...new Set(this.batchUpdateContextsNames)].length!==this.batchUpdateContextsNames.length)throw new Error("Batch update not allow to update same item");const r={},o={},a=[];e.forEach((e=>{const{name:o,value:i}=n([e]),s=this.data.get(o);a.push(...this.getAffectListByContext(o)),s&&(r[o]=s),this.updateValue(o,i,t)})),a.filter((e=>!r[e])).forEach((e=>{const t=this.data.get(e);t&&(o[e]=t)}));const i=e=>{for(const n in e){var t;const r=e[n];null===(t=r.eventTarget)||void 0===t||t.dispatchEvent(new CustomEvent(this.changeEventType,{detail:r.value}))}};i(r),i(o),this.batchUpdate=!1}updateValue(e,t,n,r,o){const a=this.data.get(e);if(!a)throw new Error(`${this.type} '${e}' is not defined`);if("refresh"!==n&&"load"!==n)"replace"===n?a.value=t:(0,f.isObject)(a.value)?Object.assign(a.value,t):(console.warn(`Non-object current value of "${this.type}.${e}" for "context.assign", try "context.replace" instead.`),a.value=t),this.batchUpdate||a.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:a.value}));else{if(!a.useResolve)throw new Error(`You can not ${n} "${this.type}.${e}" which is not using resolve`);let i;"load"===n&&(a.loaded?i=Promise.resolve(a.value):a.loading&&(i=a.loading));const s=e=>{var t;let n;return"FlowApiNotFoundError"===(null==e?void 0:e.name)&&!!(n=null===(t=this.rendererContext)||void 0===t?void 0:t.renderId)&&n!==pa()};if(i||(i=a.loading=a.load({cache:"load"===n?"default":"reload",...t}),i.then((e=>{this.finishLoad(a,e)}),(e=>{!a.useResolve||s(e)||null!=r&&r.error||nn(e)}))),r){const e=Cn(r,o);i.then((t=>{e("success")({value:t}),e("finally")()}),(t=>{!s(t)&&r.error&&e("error")(t),e("finally")()}))}}}finishLoad(e,t){e.useResolve&&(e.loaded=!0,e.value=t,e.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:t})))}define(e,t,n,r){if(Array.isArray(e)&&e.length>0){const o=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"CTX";const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CTX",n=arguments.length>2?arguments[2]:void 0;const r=new Map;for(const o of e){const e=[o.if,o.value,o.resolve],a=(0,O.collectMemberUsage)(e,t);if(!n&&"STATE"===t){const t=(0,O.collectMemberUsage)(e,"TPL");for(const e of t.usedProperties)a.usedProperties.add(e);t.hasNonStaticUsage&&(a.hasNonStaticUsage=!0)}r.set(o,a)}return r}(e,n,arguments.length>3?arguments[3]:void 0),o=new Map;for(const e of Array.from(r.keys()).map((e=>e.name)))o.set(e,(o.get(e)??0)+1);const a=Array.from(r.values()).some((e=>e.hasNonStaticUsage)),i=new WeakSet,s=new Map,c=new Map([...new Set(e.map((e=>e.name)))].map((e=>[e,new Promise(((t,n)=>{s.set(e,{resolve:t,reject:n})}))]))),l=async e=>{i.add(e);const n=await t(e);r.delete(e);const a=o.get(e.name)??0;if(n){if(s.get(e.name).resolve(),o.delete(e.name),0===a)throw new Error(`Duplicated context defined: ${e.name}`)}else 1===a?(s.get(e.name).resolve(),o.delete(e.name)):o.set(e.name,a-1);await d()};let u=a;async function d(){const e=Array.from(r.entries()).filter(function(e,t){return(n,r)=>t?0===r:![...n[1].usedProperties].some((t=>e.has(t)))}(o,u)).map((e=>e[0])).filter((e=>!i.has(e)));await Promise.all(e.map(l))}return{pendingResult:d().then((async()=>{r.size>0&&(function(e,t){const n=new Map(e),r=new Set(Array.from(n.keys()).map((e=>e.name))),o=()=>{let e=!1;for(const[t,o]of n.entries())[...o.usedProperties].some((e=>r.has(e)))||(n.delete(t),r.delete(t.name),e=!0);e&&o()};if(o(),n.size>0)throw new ReferenceError(`Circular ${t} detected: ${Array.from(n.keys()).map((e=>e.name)).join(", ")}`)}(r,n),u=!0,await d());for(const e of s.values())e.resolve()})).catch((e=>{for(const t of s.values())t.reject(e);throw e})),pendingContexts:c}}(e,(e=>this.resolve(e,t,n,r)),this.type,Re(t));this.pendingStack.push(o)}}onChange(e,t){var n;null===(n=this.data.get(e))||void 0===n||n.eventTarget.addEventListener(this.changeEventType,t)}async waitFor(e){for(const{pendingContexts:t}of this.pendingStack)await Promise.all([...e].map((e=>t.get(e))))}async waitForAll(){for(const{pendingContexts:e}of this.pendingStack)for(const t of e.values())t.catch((()=>{}));for(const{pendingResult:e}of this.pendingStack)await e}mountAsyncData(e){this.data.forEach((t=>{var n;if(t.async&&(!e||null!==(n=this.routeMap.get(e))&&void 0!==n&&n.has(t.name))){if(t.asyncMounted)return void console.error(`Async data "${t.name}" already mounted. This is a bug of Brick Next, please report it.`);t.asyncMounted=!0,t.loading.then((e=>{this.finishLoad(t,e)}))}}))}async resolve(e,t,n,r){if(!await yt(e,t))return!1;let o,a,i,s,c,l;if(n&&("STATE"===this.type?e.expose:"FORM_STATE"===this.type)&&(o=await kt(n,e.name)),void 0===o){if(e.resolve){const n=(0,f.hasOwnProperty)(e,"value");c=e.track&&n&&(0,f.hasOwnProperty)(e.resolve,"if")&&(0,O.strictCollectMemberUsage)(e.resolve.if,this.type).size>0;const r={transform:"value",...e.resolve};if(s=await yt(e.resolve,t),(s||c)&&(a=async e=>{var n;return(await tt(r,t,{...e,renderId:null===(n=this.rendererContext)||void 0===n?void 0:n.renderId})).value}),s)l=e.resolve.async?"async":e.resolve.lazy?"lazy":"eager","eager"===l?o=await a():"async"===l&&(i=a());else if(!n)return!1}s&&"eager"===l||void 0===e.value||(o=await gt(e.value,t))}if(this.data.has(e.name))throw new Error(`${this.type} '${e.name}' has already been declared`);const u={name:e.name,value:o,eventTarget:new be,useResolve:s,load:a,loaded:"eager"===l,loading:i,async:"async"===l,deps:[]};if("lazy"===l){const{trigger:t}=e.resolve;var d;t&&Pr.includes(t)&&(null===(d=this.rendererContext)||void 0===d||d.registerArbitraryLifeCycle(t,(()=>{this.updateValue(e.name,void 0,"load")})))}if(e.onChange&&u.eventTarget.addEventListener(this.changeEventType,un(e.onChange,t)),e.track){const n=(0,O.strictCollectMemberUsage)(c?[e.resolve,e.value]:a?e.resolve:e.value,this.type);!a&&(u.deps=[...n]);for(const r of n)this.onChange(r,this.batchAddListener((()=>{u.useResolve=c?wt(e.resolve,t):!!a,u.useResolve?this.updateValue(e.name,{cache:"default"},"refresh"):this.updateValue(e.name,mt(e.value,t),"replace")}),e))}if(u.eventTarget.addEventListener(this.changeEventType,(t=>{this.notifyRealTimeDataChange(e.name,t.detail)})),this.data.set(e.name,u),Array.isArray(r))for(const t of r){const n=this.routeMap.get(t);n?n.add(e.name):this.routeMap.set(t,new Set([e.name]))}return!0}disposeDataInRoutes(e){for(const t of e){const e=this.routeMap.get(t);if(void 0!==e)for(const t of e)this.data.delete(t)}}batchAddListener(e,t){return n=>{this.batchUpdate&&this.batchUpdateContextsNames.includes(t.name)||e(n)}}}function _r(e,t,n){const{reversedProxies:r,asyncHostPropertyEntries:o,externalSlots:a,tplStateStoreId:i,hostBrick:s}=e;let c;if(t&&r){const e=r.properties.get(t);e&&(u=o,c=e.map((e=>{let{from:t,to:n}=e;const r=u.filter((e=>e[0]===t));if(r.length>0&&n.refProperty)return[n.refProperty,kt(r,t),!0]})).filter(Boolean));const i=r.slots.get(t);if(i&&a){const e=new Map;for(const{from:t,to:r}of i){var l;const o=(null===(l=a[t])||void 0===l?void 0:l.bricks)??[];if(!o.length)continue;const i=r.refSlot??t;let c=e.get(i);if(!c){c=[];const t=(0,f.hasOwnProperty)(n,i)?n[i].bricks.length+1:1;for(let e=0;e<t;e+=1)c.push([]);e.set(i,c)}const u=r.refPosition??-1,d=(0,f.hasOwnProperty)(s.runtimeContext,"forEachItem");c[(0,m.clamp)(u<0?c.length+u:u,0,c.length-1)].push(...d?Br(o,s.runtimeContext.forEachItem,s.runtimeContext.forEachIndex,s.runtimeContext.forEachSize):o)}for(const[t,r]of e.entries()){(0,f.hasOwnProperty)(n,t)||(n[t]={type:"bricks",bricks:[]});const e=n[t];e.bricks=r.flatMap(((t,n)=>n<e.bricks.length?t.concat(e.bricks[n]):t)),0===e.bricks.length&&delete n[t]}}}var u;return{[Nt]:c,[Ut]:i}}function Br(e,t,n,r){return e.map((e=>{let{children:o,slots:a,...i}=e;return{...i,[Ft]:t,[jt]:n,[Dt]:r,slots:":forEach"===i.brick?to(o,a):Object.fromEntries(Object.entries(to(o,a)??{}).map((e=>{let[o,a]=e;return[o,"routes"===a.type?{type:"routes",routes:Lr(a.routes,t,n,r)}:{type:"bricks",bricks:Br(a.bricks,t,n,r)}]})))}}))}function Lr(e,t,n,r){return e.map((e=>"routes"===e.type?{...e,routes:Lr(e.routes,t,n,r)}:"redirect"===e.type?e:{...e,bricks:Br(e.bricks,t,n,r)}))}function $r(e,t){function n(e){return(0,f.isObject)(e)&&"function"!=typeof e?Array.isArray(e)?e.map(n):Object.fromEntries(Object.entries(e).map((e=>{let[t,o]=e;return(0,f.isObject)(o)&&"useBrick"===t?Array.isArray(o)?[t,o.map(r)]:[t,r(o)]:[t,n(o)]})).concat(Object.getOwnPropertySymbols(e).map((t=>[t,e[t]])))):e}function r(e){const{properties:o,slots:a,children:i,...s}=e,c=to(i,a),l=Object.fromEntries(Object.entries(c??{}).map((e=>{let[t,n]=e;return[t,{type:"bricks",bricks:(n.bricks??[]).map(r)}]})));return{...s,properties:n(o),slots:l,..._r(t,s.ref,l)}}return n(e)}function Nr(e,t,n,r,o){var a;const i=(0,m.uniqueId)("tpl-state-"),s={...n.runtimeContext,tplStateStoreId:i};delete s.forEachItem,delete s.forEachIndex,delete s.forEachSize,delete s.formStateStoreId;const c=new Mr("STATE",n,o,i);s.tplStateStoreMap.set(i,c),s.tplStateStoreScope&&s.tplStateStoreScope.push(c);const{bricks:l,proxy:u,state:d,contracts:f}=Pe.get(e);null==oa||null===(a=oa.flowApi)||void 0===a||a.collectWidgetContract(f),c.define(d,s,r);const{slots:p,children:h,...g}=t,v={...g,brick:e};n.tplHostMetadata={internalBricksByRef:new Map,tplStateStoreId:i,proxy:u};const b={properties:new Map,slots:new Map};if(null!=u&&u.properties)for(const[e,t]of Object.entries(u.properties)){let n=b.properties.get(t.ref);n||(n=[],b.properties.set(t.ref,n)),n.push({from:e,to:t})}if(null!=u&&u.slots)for(const[e,t]of Object.entries(u.slots)){let n=b.slots.get(t.ref);n||(n=[],b.slots.set(t.ref,n)),n.push({from:e,to:t})}const y={reversedProxies:b,asyncHostPropertyEntries:r,externalSlots:to(h,p),tplStateStoreId:i,hostBrick:n};return v.slots={"":{type:"bricks",bricks:l.map((e=>Ur(e,y)))}},v}function Ur(e,t){null===e.if&&delete e.if;const{properties:n,slots:r,children:o,...a}=e,i=to(o,r),s=Object.fromEntries(Object.entries(i??{}).map((e=>{let[n,r]=e;return[n,{type:"bricks",bricks:(r.bricks??[]).map((e=>Ur(e,t)))}]})));return{...a,properties:$r(n,t),slots:s,..._r(t,a.ref,s)}}const Fr="form-renderer.form-renderer",jr=Symbol.for("form.stateStoreId"),Dr=["forms.general-form","form.general-form","eo-form"];function Kr(e,t,n){const{id:r,bricks:o,events:a,context:i,mountPoint:s,instanceId:c}=e;let{brick:l,properties:u}=e;const d=t.find((e=>e.fieldId===r));if(d){const e=function(e){let t;const n={id:e.fieldId,name:e.fieldId,label:e.name,dataset:{testid:e.fieldId}},r=()=>{var t,n;return{readOnly:null===(t=e.limit)||void 0===t?void 0:t.includes("READONLY"),required:null===(n=e.limit)||void 0===n?void 0:n.includes("REQUIRED")}};switch(e.fieldType){case"INT":t={brick:"forms.general-input-number",properties:{...n,...r(),placeholder:e.description,precision:0,inputBoxStyle:{width:"100%"}}};break;case"BOOLEAN":t={brick:"forms.general-switch",properties:{...n,...r()}};break;case"FLOAT":t={brick:"forms.general-input-number",properties:{...n,...r(),placeholder:e.description,inputBoxStyle:{width:"100%"}}};break;case"ENUM":t={brick:"forms.general-select",properties:{...n,...r(),options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}}};break;case"ENUMS":t={brick:"forms.general-select",properties:{...n,...r(),mode:"multiple",options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}}};break;case"DATE":case"TIME":t={brick:"forms.general-date-picker",properties:{...n,...r(),placeholder:e.description}};break;case"IP":t={brick:"forms.general-input",properties:{...n,...r(),placeholder:e.description,pattern:"((^s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))s*$)|(^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*$))",message:{pattern:"输入字符不匹配IP格式"}}};break;case"JSON":t={brick:"forms.general-textarea",properties:{...n}};break;case"ARRAY":t={brick:"forms.general-select",properties:{...n}};break;case"STRUCTURE":case"STRUCTURE_ARRAY":t={brick:"forms.cmdb-instance-select-panel",properties:{...n,...r()}};break;default:t={brick:"forms.general-input",properties:{...n,...r(),placeholder:e.description}}}return t}(d);l||(l=e.brick),u={...e.properties,...u}}const p={brick:l,properties:u,iid:c,slot:s,events:a,context:i,children:Vr(o,t,n),[jr]:n};return(0,f.hasOwnProperty)(e,"if")&&(p.if=e.if),p}function Vr(e,t,n){if(Array.isArray(e))return e.map((e=>Kr(e,t,n)))}var Wr=new WeakSet;class zr extends HTMLElement{constructor(){super(...arguments),(0,o.A)(this,Wr),(0,a.A)(this,"renderRoot",void 0)}get $$typeof(){return"formRenderer"}validate(){(0,s.A)(Wr,this,Hr).call(this,"validate")}setInitValue(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];(0,s.A)(Wr,this,Hr).call(this,"setInitValue",t)}resetFields(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];(0,s.A)(Wr,this,Hr).call(this,"resetFields",t)}}function Hr(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const o=!1!==this.renderRoot?null===(t=this.firstElementChild)||void 0===t?void 0:t.firstElementChild:this.firstElementChild,a=null==o||null===(n=o.tagName)||void 0===n?void 0:n.toLowerCase();Dr.includes(a)?o[e](...r):console.error(`no ${e} method in the container element`,{container:a})}async function qr(e,t,n,r,o,a,i,s){const c=await async function(e,t){for(const n of e){if("string"!=typeof n.path)throw console.error("Invalid route with invalid path:",n),new Error("Invalid route with invalid type of path: "+typeof n.path);const e=$t(n,t.app.homepage,t.location.pathname);if(e&&await yt(n,t))return t.app.noAuthGuard||n.public||null==oa||!oa.auth||oa.auth.isLoggedIn()?{match:e,route:n}:"unauthenticated"}return"missed"}(t,n),l={blockingList:[]},u=l.menuRequestNode={return:a};switch(c){case"missed":break;case"unauthenticated":l.unauthenticated=!0;break;default:{var f;const a=l.route=c.route;l.path=c.match.path;const g={...n,match:c.match};a.iid&&(p=a.iid,h=c.match,nr.set(p,h)),s&&g.ctxStore.disposeDataInRoutes(t);const m=o.concat(a);g.ctxStore.define(a.context,g,void 0,m),g.pendingPermissionsPreCheck.push(null==oa||null===(f=oa.checkPermissions)||void 0===f?void 0:f.preCheckPermissionsForBrickOrRoute(a,(e=>gt(e,g))));const{preLoadBricks:v}=a;if(Array.isArray(v)&&l.blockingList.push((0,d.loadBricksImperatively)(v,fa())),"redirect"===a.type){let e;if(e="string"==typeof a.redirect?await gt(a.redirect,g):(await tt({transform:"redirect",...a.redirect},g)).redirect,"string"!=typeof e)throw console.error("Unexpected redirect result:",e),new Error("Unexpected type of redirect result: "+typeof e);l.redirect={path:e}}else{const n=function(e,t){if(e){if("brick"===e.type)throw console.error("Set menu with brick is dropped in v3:",e),new Error("Set menu with brick is dropped in v3");if("resolve"!==e.type)return gt(e,t);console.warn("Set menu with resolve is not supported in v3 yet:",e)}}(a.menu,g);let o;n&&(u.request=n),s||r.memoizeMenuRequestNode(t,u),o="routes"===a.type?await qr(e,a.routes,g,r,m,u,i):await Gr(e,a.bricks,g,r,m,u,i),Zr(l,o),eo(u,o.menuRequestNode)}}}var p,h;return l}async function Gr(e,t,n,r,o,a,i,s,c){!function(e,t,n){function r(e){if((0,f.isObject)(e)&&"function"!=typeof e)if(Array.isArray(e))e.map(r);else for(const[t,n]of Object.entries(e))(0,f.isObject)(n)&&"useBrick"===t?Array.isArray(n)?n.forEach((e=>o(e,!0))):o(n,!0,!0):r(n)}function o(e,a,i){if(a&&(e[or]=t),r(e.properties),n&&!i)return;const s=to(e.children,e.slots);for(const e of Object.values(s??{}))for(const t of e.bricks??[])o(t,a)}for(const t of e)o(t)}(t,n,!0);const l={blockingList:[]},u=c??[];return(await Promise.all(t.map(((t,c)=>Yr(e,t,n,r,o,a,i,u.concat(c),s&&new Map(s)))))).forEach(((t,n)=>{t.hasTrackingControls&&r.memoize(i,u.concat(n),t.node,e),Zr(l,t)})),l}async function Yr(e,t,n,r,o,a,i){let s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:new Map;try{return await async function(e,t,n,r,o,a,i,s,c){var l,u;const p={blockingList:[]};if(!t.brick)return t.template?console.error("Legacy templates are dropped in v3:",t):console.error("Invalid brick:",t),p;const{if:h,permissionsPreCheck:g,...v}=t;if(function(e){return"string"==typeof e?(0,T.isTrackAll)(e):at(e)&&(0,T.isTrackAll)(it(e))}(h))return Yr(e,{brick:":if",dataSource:h,permissionsPreCheck:g,slots:{"":{type:"bricks",bricks:[v]}},...Object.getOwnPropertySymbols(t).reduce(((e,n)=>({...e,[n]:t[n]})),{})},n,r,o,a,i,s,c);const y=t[Ut],w=t[jr],A={...n,tplStateStoreId:y,formStateStoreId:w};(0,f.hasOwnProperty)(t,Ft)&&(A.forEachItem=t[Ft],A.forEachIndex=t[jt],A.forEachSize=t[Dt]);const{context:S}=t;if(Array.isArray(S)&&S.length>0){const e=Re(A);Te(e,"Defining context on bricks","check your brick:",t),e||A.ctxStore.define(S,A)}if(A.pendingPermissionsPreCheck.push(null==oa||null===(l=oa.checkPermissions)||void 0===l?void 0:l.preCheckPermissionsForBrickOrRoute(t,(e=>gt(e,A)))),!await async function(e,t){return(0,f.isObject)(e.if)&&!at(e.if)?At(await tt(e.if,t)):yt(e,t)}(t,A))return p;const E=t.brick;if(E.startsWith(":")){!function(e){if(":forEach"!==e&&":if"!==e&&":switch"!==e)throw new Error(`Unknown storyboard control node: "${e}"`)}(E);const{dataSource:n}=t,l=async l=>{var u;const d=await gt(n,l),p=":forEach"===E?"":":switch"===E?String(d):d?"":"else",h=to(t.children,t.slots),g=h&&(0,f.hasOwnProperty)(h,p)&&(null===(u=h[p])||void 0===u?void 0:u.bricks);if(!Array.isArray(g))return{blockingList:[]};switch(E){case":forEach":return Array.isArray(d)?async function(e,t,n,r,o,a,i,s,c,l){const u={blockingList:[]},d=t.length,f=await Promise.all(t.map(((t,u)=>Promise.all(n.map(((n,f)=>Yr(e,n,{...r,forEachItem:t,forEachIndex:u,forEachSize:d},o,a,i,s,l.concat(u*d+f),c&&new Map(c))))))));return f.flat().forEach(((t,n)=>{t.hasTrackingControls&&o.memoize(s,l.concat(n),t.node,e),Zr(u,t)})),u}(e,d,g,l,r,o,a,i,c,s):{blockingList:[]};case":if":case":switch":return Gr(e,g,l,r,o,a,i,c,s)}},u=async t=>{const n=await l(t);return n.node??(n.node={tag:xn.PLACEHOLDER,return:e}),n},d=await u(A),{onMount:p,onUnmount:h}=t.lifeCycle??{},{contextNames:g,stateNames:v}=Et(n);if(g||v){d.hasTrackingControls=!0;let t=0;const o=async()=>{const n=++t,[o,a,c]=Xr(A),l=await u(o),d=[...a,...c];if(await Qr(l,o,d),t===n){h&&un(h,A)(new CustomEvent("unmount",{detail:{rerender:!0}})),r.reRender(i,s,l.node,e),p&&un(p,o)(new CustomEvent("mount",{detail:{rerender:!0}}));for(const e of d)e.mountAsyncData()}},a=(0,m.debounce)(o);if(g)for(const e of g)A.ctxStore.onChange(e,a);if(v)for(const e of v)Me(A,"STATE",`: "${n}"`).onChange(e,a)}return p&&r.registerArbitraryLifeCycle("onMount",(()=>{un(p,A)(new CustomEvent("mount",{detail:{rerender:!1}}))})),h&&r.registerArbitraryLifeCycle("onUnmount",(()=>{un(h,A)(new CustomEvent("unmount",{detail:{rerender:!1}}))})),d}/\.tpl-/.test(E)&&!Pe.get(E)&&await no((0,d.loadBricksImperatively)([E],fa()),"brick",E,r.unknownBricks);const k=function(e,t){if(!e.includes(".")&&e.startsWith("tpl-")&&t){const n=`${t}.${e}`;if(Pe.get(n))return n}return!!Pe.get(e)&&e}(E,null===(u=A.app)||void 0===u?void 0:u.id);if(k){const e=c.get(k)??0;if(e>=10)throw new Error(`Maximum custom template stack overflowed: "${k}"`);c.set(k,e+1)}else E.includes("-")&&!customElements.get(E)&&(E===Fr?customElements.get(Fr)||customElements.define(Fr,zr):p.blockingList.push(no((0,d.enqueueStableLoadBricks)([E],fa()),"brick",E,r.unknownBricks)));let I,C;var R;E===Fr?(({formData:I,...C}=t.properties??{}),null!==(R=t.properties)&&void 0!==R&&R.compute&&(I=await gt(I,A))):C=t.properties;const x=[],P=function(e,t,n){return(0,f.isObject)(e)?Object.entries(e).map((e=>{let[r,o]=e;const{contextNames:a,stateNames:i,formStateNames:s}=Et(o);return(a||i||s)&&n.push({contextNames:a,stateNames:i,formStateNames:s,propName:r,propValue:o}),[r,gt(o,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===r?ft.USE_BRICK:ft.INITIAL})]})):[]}(C,A,x),M=t[Nt];M&&P.push(...M);const _="script"===E;if(_||"link"===E){const e=await It(P);if(_?e.src:"stylesheet"===e.rel&&e.href){const t=window.PUBLIC_ROOT??"";if(_){const{src:n,...r}=e;await no((0,d.loadScript)(n,t,r),"script",n,"silent")}else{const{href:n,...r}=e;await no((0,d.loadStyle)(n,t,r),"stylesheet",n,"silent")}return p}}const B={tag:xn.BRICK,type:k||E,return:e,slotId:i,events:t.events,runtimeContext:A,portal:t.portal,iid:t.iid,ref:t.ref};p.node=B;const L=(0,O.strictCollectMemberUsage)([t.events,t.lifeCycle],"PROCESSORS",2);L.size>0&&p.blockingList.push(no((0,d.loadProcessorsImperatively)(L,fa()),"processors",[...L].join(", "),r.unknownBricks));const $=[];$.push((async()=>{B.properties=await It(P),function(e,t){for(const n of t){const t=()=>{e.element&&Rt(e.element,{[n.propName]:n.propValue},e.runtimeContext)};if(n.contextNames)for(const r of n.contextNames)e.runtimeContext.ctxStore.onChange(r,t);if(n.stateNames){const r=Me(e.runtimeContext,"STATE",`: "${n.propValue}"`);for(const e of n.stateNames)r.onChange(e,t)}if(n.formStateNames){const r=Ge(e.runtimeContext,"FORM_STATE",`: "${n.propValue}"`);for(const e of n.formStateNames)r.onChange(e,t)}}}(B,x)})()),r.registerBrickLifeCycle(B,t.lifeCycle);let N,U=t;k?U=Nr(k,t,B,P,r):E===Fr&&(U=function(e,t,n,r,o){var a;const i="string"==typeof e?JSON.parse(e):e,s=(0,m.uniqueId)("form-state-"),c={...n.runtimeContext,formStateStoreId:s};delete c.forEachItem,delete c.forEachIndex,delete c.forEachSize,delete c.tplStateStoreId;const l=new Mr("FORM_STATE",void 0,o,s);c.formStateStoreMap.set(s,l),c.formStateStoreScope&&c.formStateStoreScope.push(l);const u=i.context??[];u.some((e=>"params"===e.name))||u.push({name:"params"}),l.define(u,c,r);const d=Kr(i.formSchema,i.fields,s);return Dr.includes(d.brick)&&t.events&&(d.events=function(e,t){const n=e??{};for(const[e,r]of Object.entries(t))n[e]=(0,f.hasOwnProperty)(n,e)?[n[e],r].flat():r;return n}(d.events,t.events)),"boolean"!=typeof(null===(a=t.properties)||void 0===a?void 0:a.renderRoot)||t.properties.renderRoot?{...t,slots:void 0,children:[{brick:"eo-micro-view",properties:{style:{padding:"12px"}},children:[d]}]}:{...t,slots:void 0,children:[d]}}(I,t,B,P,r)),U.portal&&(B.slotId=void 0),k?(N={...A},delete N.forEachItem,delete N.forEachIndex,delete N.forEachSize):N=A;return $.push((async()=>{const e=to(U.children,U.slots);if(!e)return;const t=new Map,n=await Promise.all(Object.entries(e).map(((e,n)=>{let[i,s]=e;if("routes"!==s.type)return Gr(B,s.bricks,N,r,o,a,i,c);const l=o[o.length-1];return null!=l&&l.incrementalSubRoutes&&(t.set(n,i),r.performIncrementalRender(s,o,(async(e,t)=>{const{homepage:n}=N.app,{pathname:c}=e;if(!b(n,c)||!o.every((e=>{let r,o;return(r=$t(e,n,t.pathname))&&(o=$t(e,n,c))&&(e!==l||(0,m.isEqual)(r.params,o.params))})))return!1;const[u,d,f]=Xr({...N,location:e,query:new URLSearchParams(e.search)});let p,h=!1,g=[];try{if(p=await qr(B,s.routes,u,r,o,a,i,!0),p.route){if(r.reBailout(p))return!0;g=[...d,...f],await Qr(p,u,[u.ctxStore,...g])}await r.reMergeMenuRequestNodes(a,s.routes,p.menuRequestNode)}catch(e){console.error("Incremental sub-router failed:",e);const t=r.reCatch(e,B);if(!t)return!0;({failed:h,output:p}=t),await r.reMergeMenuRequestNodes(a,s.routes,p.menuRequestNode)}if(r.reRender(i,[],p.node,B),!h){u.ctxStore.mountAsyncData(p.route);for(const e of g)e.mountAsyncData()}return!!p.route||null}))),qr(B,s.routes,N,r,o,a,i)}))),i={...p,node:void 0,blockingList:[],menuRequestNode:void 0};n.forEach(((e,n)=>{t.has(n)&&r.memoize(t.get(n),[],e.node,B),Zr(i,e),function(e,t){const n=t.menuRequestNode;if(n)if(e.menuRequestNode){let t=e.menuRequestNode;for(;t.sibling;)t=t.sibling;t.sibling=n}else e.menuRequestNode=n}(i,e)})),i.node&&(B.child=i.node),Zr(p,{...i,node:void 0}),eo(a,p.menuRequestNode=i.menuRequestNode)})()),await Promise.all($),p}(e,t,n,r,o,a,i,s,c)}catch(n){if(t.errorBoundary)return console.error("Error caught by error boundary:",n),{node:{tag:xn.BRICK,type:"div",properties:{textContent:Qt(n),dataset:{errorBoundary:""},style:{color:"var(--color-error)"}},runtimeContext:null,return:e},blockingList:[]};throw n}}function Jr(e){return[e.ctxStore,...e.tplStateStoreMap.values(),...e.formStateStoreMap.values()]}function Qr(e,t,n){return(0,d.flushStableLoadBricks)(),Promise.all([...e.blockingList,...n.map((e=>e.waitForAll())),...t.pendingPermissionsPreCheck])}function Xr(e){const t=[],n=[];return[{...e,tplStateStoreScope:t,formStateStoreScope:n},t,n]}function Zr(e,t){const{blockingList:n,node:r,menuRequestNode:o,hasTrackingControls:a,...i}=t;if(e.blockingList.push(...n),r)if(e.node){let t=e.node;for(;t.sibling;)t=t.sibling;t.sibling=r}else e.node=r;Object.assign(e,i)}function eo(e,t){if(t)if(e.child){let n=e.child;for(;n.sibling;)n=n.sibling;n.sibling=t}else e.child=t}function to(e,t){let n=t;if(Array.isArray(e)&&!n){n={};for(const t of e){const e=t.slot??"";(0,f.hasOwnProperty)(n,e)||(n[e]={type:"bricks",bricks:[]}),n[e].bricks.push(t)}}return n}function no(e,t,n,r){return"silent"===r?e.catch((e=>{console.error('Load %s "%s" failed:',t,n,e)})):e}let ro,oo,ao;function io(){if(!ro){if(ro={isInIframe:!1,isInIframeOfSameSite:!1,isInIframeOfNext:!1,isInIframeOfVisualBuilder:!1,isInIframeOfLegacyConsole:!1},window!==window.parent){ro.isInIframe=!0;try{if(window.origin===window.parent.origin){ro.isInIframeOfSameSite=!0;const e="/next/"===g(),t=window.parent.location.pathname,n=t.startsWith("/next/");ro.isInIframeOfNext=0==(Number(e)^Number(n)),ro.isInIframeOfVisualBuilder=t.startsWith((n?"/next":"")+"/visual-builder/"),ro.isInIframeOfLegacyConsole=e&&!n}}catch(e){}}Object.freeze(ro)}return ro}function so(e){var t;if(e.$$registerCustomTemplateProcessed)return;e.$$registerCustomTemplateProcessed=!0;const n=null===(t=e.meta)||void 0===t?void 0:t.customTemplates;if(Array.isArray(n))for(const t of n){const n=t.name.includes(".")?t.name:`${e.app.id}.${t.name}`;Pe.define(n,t)}}function co(e){let t;t="8.2"===e?"v8-2":"v8",document.documentElement.dataset.ui=t}const lo="basic.show-watermark";var uo=new WeakMap,fo=new WeakMap,po=new WeakMap,ho=new WeakMap,go=new WeakMap,mo=new WeakMap,vo=new WeakMap,bo=new WeakMap,yo=new WeakMap,wo=new WeakMap,Ao=new WeakMap,So=new WeakMap,Eo=new WeakSet;class ko{constructor(e){(0,o.A)(this,Eo),(0,i.A)(this,uo,void 0),(0,i.A)(this,fo,!1),(0,i.A)(this,po,void 0),(0,i.A)(this,ho,void 0),(0,i.A)(this,go,void 0),(0,i.A)(this,mo,void 0),(0,i.A)(this,vo,new Set),(0,i.A)(this,bo,0),(0,i.A)(this,yo,void 0),(0,i.A)(this,wo,void 0),(0,i.A)(this,Ao,void 0),(0,i.A)(this,So,void 0),(0,c.A)(uo,this,e);const t=C();window.addEventListener("beforeunload",(e=>{(0,s.A)(Eo,this,Io).call(this,{})?(e.preventDefault(),e.returnValue=""):delete e.returnValue})),t.block(((e,t)=>(0,s.A)(Eo,this,Io).call(this,{location:e,action:t})))}getRenderId(){return(0,l.A)(yo,this)}getRuntimeContext(){return(0,l.A)(go,this)}getRecentApps(){return{currentApp:(0,l.A)(wo,this),previousApp:(0,l.A)(Ao,this)}}getNavConfig(){return(0,l.A)(So,this)}bootstrap(){window.AbortController&&(oo=new AbortController,R.http.interceptors.request.use((e=>{var t;return{...e,options:{...e.options,signal:null!==(t=e.options)&&void 0!==t&&t.noAbortOnRouteChange?null:oo.signal}}})));const e=C();(0,c.A)(po,this,e.location);let t=0;return e.listen((async(e,n)=>{var r,o,a,i;const u=++t;let d;const f={hash:void 0,state:void 0};var p;if(void 0!==e.key&&("POP"!==n||void 0!==(0,l.A)(po,this).key&&!1!==(null===(r=(0,l.A)(po,this).state)||void 0===r?void 0:r.notify))||(f.key=void 0),((0,h.locationsAreEqual)({...(0,l.A)(po,this),...f},{...e,...f})||"POP"!==n&&!1===(null===(o=e.state)||void 0===o?void 0:o.notify))&&(d=!0),d||null!==(a=e.state)&&void 0!==a&&a.noIncremental||(d=await(null===(p=(0,l.A)(mo,this))||void 0===p?void 0:p.didPerformIncrementalRender(e,(0,l.A)(po,this)))),t===u)if(d)(0,c.A)(po,this,e);else{if(oo&&(oo.abort(),oo=new AbortController),(0,c.A)(po,this,e),null===(i=(0,l.A)(mo,this))||void 0===i||i.dispatchPageLeave(),"POP"===n&&y(v((0,l.A)(uo,this),e.pathname)))return void window.location.reload();(0,l.A)(fo,this)?(0,c.A)(ho,this,e):(V("locationChange"),(0,s.A)(Eo,this,Ro).call(this,e).catch(nn))}})),(0,s.A)(Eo,this,Ro).call(this,e.location)}}function Io(e){var t;const n=C(),r=n.getBlockMessage();null===(t=(0,l.A)(mo,this))||void 0===t||t.dispatchBeforePageLeave(e);const o=n.getBlockMessage();return!r&&o&&n.unblock(),o}function Co(e,t,n){var r,o;if((0,c.A)(bo,this,(r=(0,l.A)(bo,this),o=r++,r)),o>10){const t=`Infinite redirect detected: from "${n.pathname}${n.search}${n.hash}" to "${e}"`;throw new Error(t)}C().replace(e,t)}async function Ro(e){(0,c.A)(fo,this,!0);try{await(0,s.A)(Eo,this,To).call(this,e)}finally{if((0,c.A)(fo,this,!1),(0,l.A)(ho,this)){const e=(0,l.A)(ho,this);(0,c.A)(ho,this,void 0),await(0,s.A)(Eo,this,Ro).call(this,e)}}}async function To(e){var t,n,r,o;const a=(0,c.A)(yo,this,(0,m.uniqueId)("render-id-"));Qe=new WeakSet,et.clear(),null==oa||null===(t=oa.flowApi)||void 0===t||t.clearCollectWidgetContract(),C().unblock();const i=null==oa||null===(n=oa.pageView)||void 0===n?void 0:n.create(),u=v((0,l.A)(uo,this),e.pathname),f=null===(r=(0,l.A)(go,this))||void 0===r?void 0:r.app,p=null==u||null===(o=u.app)||void 0===o?void 0:o.id;window.BOOTSTRAP_UNION_FILE&&p&&p!==(null==f?void 0:f.id)&&function(e){const{appId:t,version:n}=e;window.APP_ROOT_TPL&&(window.APP_ID=t,window.APP_ROOT=window.APP_ROOT_TPL.replace("{id}",t).replace("{version}",n))}({appId:p,version:u.app.currentVersion}),null!=u&&u.app&&await async function(e){if(!e.$$fulfilled)return e.$$fulfilling||(e.$$fulfilling=async function(e){var t;await(null==oa||null===(t=oa.fulfilStoryboard)||void 0===t?void 0:t.call(oa,e)),B(e),Object.assign(e,{$$fulfilled:!0,$$fulfilling:null})}(e)),e.$$fulfilling}(u);const h=(0,c.A)(wo,this,null==u?void 0:u.app);!function(){var e,t,n,r,o;const a=ia().getFeatureFlags(),i=ia().getMiscSettings();if(!a["show-watermark"])return;const s="0.0.0"===(null===(e=window.APP_ROOT)||void 0===e||null===(e=e.match(/versions\/([^/]+)\//))||void 0===e?void 0:e[1])||"0.0.0"===(null===(t=window.APP_ROOT)||void 0===t||null===(t=t.match(/micro-apps\/(?:v2|v3)\/[^/]+\/([^/]+)/))||void 0===t?void 0:t[1]),c=(null==oa||null===(n=oa.auth)||void 0===n||null===(n=n.getAuth())||void 0===n?void 0:n.username)??"",l=i.watermarkConfig??{flags:{}},u={content:[..."string"==typeof l.content?[l.content]:l.content??[],null!==(r=l.flags)&&void 0!==r&&r["show-development"]&&s?"Development":"",null!==(o=l.flags)&&void 0!==o&&o["show-user"]?c:""].filter(Boolean),zIndex:1001,width:200,font:{fontSize:28},gap:[190,190],...(0,m.omit)(l,["content","flags"])};ao?ao.resolve(u):(0,d.loadBricksImperatively)([lo],fa()).then((()=>{ao=document.createElement(lo),ao.resolve(u)}),(e=>{console.error("Load watermark service failed:",e)}))}();const g=f&&h?f.id!==h.id:f!==h;(0,T.clearExpressionASTCache)(),g&&(0,T.clearFunctionASTCache)();const b=ia().getFeatureFlags(),y=(0,l.A)(mo,this),w=(t,n)=>{null==i||i({status:"redirected"}),(0,l.A)(vo,this).add(y),(0,s.A)(Eo,this,Co).call(this,t,n,e)},A=()=>{const t=b["sso-enabled"]?"/sso-auth/login":"/auth/login";Jt(e),w(t,{from:e})},S=document.querySelector("#main-mount-point"),E=document.querySelector("#portal-mount-point"),k={tag:xn.ROOT,container:S,createPortal:E},I=()=>{var e;Pn(S),Pn(E),(0,l.A)(vo,this).add(y);for(const e of(0,l.A)(vo,this))e&&(e.dispatchOnUnmount(),e.dispose());(0,l.A)(vo,this).clear(),null==oa||null===(e=oa.messageDispatcher)||void 0===e||e.reset(),g&&((0,c.A)(Ao,this,f),window.dispatchEvent(new CustomEvent("app.change",{detail:{previousApp:f,currentApp:h}})))};if(X(h&&(re()[h.id]||h.theme)||"light"),ae("default"),h){var O,x,P,M,_,L;null==oa||null===(O=oa.checkInstalledApps)||void 0===O||O.preCheckInstalledApps(u,(e=>!!ma(e)));const t={bailout:e=>e.unauthenticated?(A(),!0):e.redirect?(w(e.redirect.path,e.redirect.state),!0):void(0,c.A)(bo,this,0),mergeMenus:async e=>{const t=await Promise.all(e);(0,c.A)(So,this,function(e){const t={breadcrumb:[]};for(const n of e){const{breadcrumb:e}=n;e&&(e.overwrite?t.breadcrumb=e.items:t.breadcrumb.push(...e.items))}return t}(t)),window.dispatchEvent(new CustomEvent("navConfig.change",{detail:(0,l.A)(So,this)}))},catch:(t,n)=>{if(!Xt(t)||window.NO_AUTH_GUARD){if(!(t instanceof R.HttpAbortError)){const r=ia().getMiscSettings().noAuthGuardLoginPath;return Xt(t)&&r?void w(r,{from:e}):{failed:!0,output:{node:{tag:xn.BRICK,type:"div",properties:{textContent:Qt(t),dataset:{errorBoundary:""},style:{color:"var(--color-error)"}},runtimeContext:null,return:n},blockingList:[]}}}(0,l.A)(vo,this).add(y)}else A()}},n=(0,c.A)(mo,this,new zn("page",{routeHelper:t,renderId:a})),r=(0,c.A)(go,this,{app:h,location:e,query:new URLSearchParams(e.search),flags:b,sys:{...null==oa||null===(x=oa.auth)||void 0===x?void 0:x.getAuth(),...io(),settings:{brand:ia().getBrandSettings()}},ctxStore:new Mr("CTX",void 0,n),pendingPermissionsPreCheck:[null==oa||null===(P=oa.checkPermissions)||void 0===P?void 0:P.preCheckPermissions(u)],tplStateStoreMap:new Map,formStateStoreMap:new Map});(0,c.A)(So,this,void 0),so(u),ge(null===(M=u.meta)||void 0===M?void 0:M.functions,h),null==oa||null===(_=oa.flowApi)||void 0===_||_.collectContract(null===(L=u.meta)||void 0===L?void 0:L.contracts);let o,s=!1,d=[];try{nr.clear();const e={};if(o=await qr(k,function(e){if(window.parent===window)return e;let t=e;const n=(0,m.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/template-preview/")));t=[...t.slice(0,n+1),{path:"${APP.homepage}/_dev_only_/template-preview/:templateId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(n+1)];const r=(0,m.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/snippet-preview/")));return t=[...t.slice(0,r+1),{path:"${APP.homepage}/_dev_only_/snippet-preview/:snippetId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(r+1)],t}(u.routes),r,n,[],e),t.bailout(o))return;d=Jr(r),await Qr(o,r,d),e.child=o.menuRequestNode,n.setInitialMenuRequestNode(e),await t.mergeMenus(n.getMenuRequests())}catch(e){console.error("Router failed:",e);const n=t.catch(e,k);if(!n)return;({failed:s,output:o}=n)}if(k.child=o.node,I(),o.route&&"routes"!==o.route.type||s){if(s||n.dispatchBeforePageLoad(),te(),se(),co(null==h?void 0:h.uiVersion),Mn(k),window.scrollTo(0,0),s)null==i||i({status:"failed"});else{n.dispatchPageLoad(),n.dispatchAnchorLoad(),n.dispatchOnMount(),n.initializeScrollIntoView(),n.initializeMediaChange(),n.initializeMessageDispatcher();for(const e of d)e.mountAsyncData();null==i||i({status:"ok",path:o.path,pageTitle:document.title})}return void V("rendered")}}else{if(!window.NO_AUTH_GUARD&&null!=oa&&oa.auth&&!oa.auth.isLoggedIn())return void A();I()}te(),se();const $={tag:xn.BRICK,type:"div",properties:{textContent:"Page not found"},runtimeContext:null,return:k};k.child=$,Mn(k),window.scrollTo(0,0),null==i||i({status:"not-found"}),V("rendered")}const Oo="undefined"!=typeof BRICK_PACKAGES?BRICK_PACKAGES:null;var xo=n(94579),Po=n(84501),Mo=2,_o=.16,Bo=.05,Lo=.05,$o=.15,No=5,Uo=4,Fo=[{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 jo(e){var t=e.r,n=e.g,r=e.b,o=(0,xo.wE)(t,n,r);return{h:360*o.h,s:o.s,v:o.v}}function Do(e){var t=e.r,n=e.g,r=e.b;return"#".concat((0,xo.Ob)(t,n,r,!1))}function Ko(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-Mo*t:Math.round(e.h)+Mo*t:n?Math.round(e.h)+Mo*t:Math.round(e.h)-Mo*t)<0?r+=360:r>=360&&(r-=360),r}function Vo(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-_o*t:t===Uo?e.s+_o:e.s+Bo*t)>1&&(r=1),n&&t===No&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function Wo(e,t,n){var r;return(r=n?e.v+Lo*t:e.v-$o*t)>1&&(r=1),Number(r.toFixed(2))}function zo(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=(0,Po.RO)(e),o=No;o>0;o-=1){var a=jo(r),i=Do((0,Po.RO)({h:Ko(a,o,!0),s:Vo(a,o,!0),v:Wo(a,o,!0)}));n.push(i)}n.push(Do(r));for(var s=1;s<=Uo;s+=1){var c=jo(r),l=Do((0,Po.RO)({h:Ko(c,s),s:Vo(c,s),v:Wo(c,s)}));n.push(l)}return"dark"===t.theme?Fo.map((function(e){var r,o,a,i=e.index,s=e.opacity;return Do((r=(0,Po.RO)(t.backgroundColor||"#141414"),a=100*s/100,{r:((o=(0,Po.RO)(n[i])).r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b}))})):n}var Ho={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"},qo={},Go={};function Yo(e){return':root,\n[data-override-theme="light"] {\n'.concat(e,"}")}function Jo(e){return'html[data-theme="dark-v2"],\n[data-override-theme="dark-v2"] {\n'.concat(e,"}")}function Qo(e){return e.match(/[0-9a-fA-F]{2}/g).map((e=>parseInt(e,16))).join(", ")}function Xo(e,t,n){return"dark"===t?zo(e,{theme:t,backgroundColor:n})[5]:e}function Zo(e){const t=[];if(["light","dark"].forEach((n=>{if(e[n])switch(e.type){case"brandColor":t.push(function(e,t){return("dark"===e?Jo:Yo)("string"==typeof(n=t)?" --color-brand: ".concat(n,";\n"):[" --color-brand: ".concat(n.default,";")," --color-brand-hover: ".concat(n.hover,";")," --color-brand-active: ".concat(n.active,";"),""].join("\n"));var n}(n,e[n]));break;case"baseColors":t.push(function(e,t,n){return("dark"===e?Jo:Yo)("".concat(function(e,t){return Object.entries(e).flatMap((e=>{var[n,r]=e;return function(e){if(!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(e))throw new Error("Invalid base color name: ".concat(JSON.stringify(e)))}(n),r.map(((e,r)=>[" --palette-".concat(n,"-").concat(r+1,"-channel: ").concat(Qo(e),";")].concat("dark"===t?[]:" --palette-".concat(n,"-").concat(r+1,": rgb(var(--palette-").concat(n,"-").concat(r+1,"-channel));")).join("\n"))).concat("")})).join("\n")}(function(e,t,n){return Object.fromEntries(Object.entries(e).map((e=>{var[r,o]=e;return[r,zo(o,"dark"===t?{theme:t,backgroundColor:n}:void 0)]})))}(t,e,n),e),"\n").concat(function(e,t,n){return Object.entries({green:"green",red:"red",blue:"blue",orange:"orange",cyan:"cyan",purple:"purple",geekblue:"indigo"}).flatMap((r=>{var[o,a]=r;return[" --theme-".concat(o,"-color-rgb-channel: ").concat(Qo(Xo(t[a],e,n)),";"),..."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,n)))}(n,e[n],e.backgroundColor));break;case"variables":t.push(function(e,t){return("dark"===e?Jo:Yo)(function(e){return Object.entries(e).map((e=>{var[t,n]=e;return function(e){if(!/^--[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(e))throw new Error("Invalid css variable name: ".concat(JSON.stringify(e)))}(t)," ".concat(t,": ").concat(n,";")})).concat("").join("\n")}(t))}(n,e[n]))}})),t.length>0){const e=document.createElement("style");return e.textContent=t.join("\n\n"),document.head.appendChild(e),()=>{e.remove()}}}let ea,ta,na,ra,oa;function aa(e){if(ea)throw new Error("Cannot create multiple runtimes");return window.addEventListener("message",(e=>{let{data:t}=e;if((null==t?void 0:t.source)!==U)return;const n=t.payload;switch(null==n?void 0:n.type){case F:K=n.active;break;case j:D=n.panel}})),oa=null==e?void 0:e.hooks,(0,u.initializeI18n)(Ht,qt),p.locale(u.i18n.language),u.i18n.on("languageChanged",(()=>{p.locale(u.i18n.language)})),I(),ea=new ua,ea}Object.keys(Ho).forEach((function(e){qo[e]=zo(Ho[e]),qo[e].primary=qo[e][5],Go[e]=zo(Ho[e],{theme:"dark",backgroundColor:"#141414"}),Go[e].primary=Go[e][5]})),qo.red,qo.volcano,qo.gold,qo.orange,qo.yellow,qo.lime,qo.green,qo.cyan,qo.blue,qo.geekblue,qo.purple,qo.magenta,qo.grey;const ia=function(){const e=k();if(e)return function(){return new Proxy(e.getRuntime(),{get(){switch(arguments.length<=1?void 0:arguments[1]){case"getCurrentApp":case"getRecentApps":case"hasInstalledApp":case"getDesktops":case"getLaunchpadSettings":case"getLaunchpadSiteMap":case"toggleLaunchpadEffect":case"applyPageTitle":case"getNavConfig":case"getFeatureFlags":case"getMiscSettings":case"getBrandSettings":return Reflect.get(...arguments)}}})}}()||function(){return ea};var sa=new WeakMap,ca=new WeakMap,la=new WeakSet;class ua{constructor(){(0,o.A)(this,la),(0,i.A)(this,sa,!1),(0,i.A)(this,ca,!1),(0,a.A)(this,"version",3)}initialize(e){var t;if((0,l.A)(sa,this))throw new Error("The runtime cannot be initialized more than once");(0,c.A)(sa,this,!0),function(e){(0,f.isObject)(e.settings)&&(0,f.deepFreeze)(e.settings),e.brickPackages&&(0,f.deepFreeze)(e.brickPackages)}(e),ta=e;const{notification:n,dialog:r}=(0,s.A)(la,this,da).call(this);var o;!1!==n&&(o=n??"basic.show-notification",(0,this.loadBricks)([o]).then((()=>{en=document.createElement(o)}),(e=>{console.error("Load notification service failed:",e)}))),!1!==r&&function(e,t){t([e]).then((()=>{Gt=document.createElement(e)}),(e=>{console.error("Load dialog service failed:",e)}))}(r??"basic.show-dialog",this.loadBricks),function(e){e&&(e.brandColor?Zo({type:"brandColor",...e.brandColor}):e.baseColors?Zo({type:"baseColors",...e.baseColors}):e.variables&&Zo({type:"variables",...e.variables}))}(null===(t=e.settings)||void 0===t||null===(t=t.misc)||void 0===t?void 0:t.theme)}async bootstrap(e){if(e&&this.initialize(e),(0,l.A)(ca,this))throw new Error("The runtime cannot be bootstrapped more than once");(0,c.A)(ca,this,!0),na=new ko(ta.storyboards),await na.bootstrap()}getRecentApps(){var e;return(null===(e=na)||void 0===e?void 0:e.getRecentApps())??{}}getCurrentApp(){var e;return null===(e=na)||void 0===e?void 0:e.getRecentApps().currentApp}hasInstalledApp(e,t){return qe(e,t)}getFeatureFlags(){var e,t;return{...null===(e=ta)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.featureFlags,...null===(t=na)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.featureFlags,"migrate-to-brick-next-v3":!0}}getMiscSettings(){var e,t;return{...null===(e=ta)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.misc,...null===(t=na)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.misc}}getBrandSettings(){var e;return{base_title:"DevOps 管理专家",...null===(e=ta)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.brand}}getLaunchpadSettings(){var e;return{columns:7,rows:4,...null===(e=ta)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.launchpad}}getDesktops(){var e;return(null===(e=ta)||void 0===e?void 0:e.desktops)??[]}getLaunchpadSiteMap(){var e;return(null===(e=ta)||void 0===e?void 0:e.siteSort)??[]}toggleLaunchpadEffect(e){document.body.classList.toggle("launchpad-open",e)}applyPageTitle(e){var t;const n=this.getBrandSettings().base_title;document.title=(null===(t=na)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t?void 0:t.localeTitle)||(e?`${e} - ${n}`:n)}getNavConfig(){var e;return null===(e=na)||void 0===e?void 0:e.getNavConfig()}loadBricks(e){return(0,d.loadBricksImperatively)(e,fa())}}function da(){var e;return(null===(e=ta)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.presetBricks)??{}}function fa(){var e;return ra??(ra=function(e,t){if(null==t||!t.length)return e;const n=new Map;return[...t,...e].forEach((e=>{const t=e.filePath.split("/")[1];n.has(t)||n.set(t,e)})),Array.from(n.values())}((null===(e=ta)||void 0===e?void 0:e.brickPackages)??Oo??window.STANDALONE_BRICK_PACKAGES??[],window.PUBLIC_DEPS))}function pa(){var e;return null===(e=na)||void 0===e?void 0:e.getRenderId()}function ha(){var e;return null===(e=na)||void 0===e?void 0:e.getRuntimeContext()}function ga(e){var t;return null===(t=ta)||void 0===t||null===(t=t.storyboards)||void 0===t?void 0:t.find((t=>t.app.id===e))}function ma(e){var t;return null===(t=ga(e))||void 0===t?void 0:t.app}function va(){for(var e,t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null==oa||null===(e=oa.auth)||void 0===e||null===(t=e.authenticate)||void 0===t||t.call(e,...r)}function ba(){var e;return null==oa||null===(e=oa.auth)||void 0===e?void 0:e.getAuth()}function ya(){var e,t;return null==oa||null===(e=oa.auth)||void 0===e||null===(t=e.logout)||void 0===t?void 0:t.call(e)}function wa(){var e;return null==oa||null===(e=oa.auth)||void 0===e?void 0:e.isLoggedIn()}var Aa=new WeakMap;const Sa=new class{constructor(){(0,i.A)(this,Aa,new Map)}define(e,t){(0,l.A)(Aa,this).has(e)?console.error(`Custom editor of "${e}" already registered`):(0,l.A)(Aa,this).set(e,t)}get(e){return(0,l.A)(Aa,this).get(e)}};async function Ea(e,t,n){return nt(await Je(e),e,"resolve",t,n)}function ka(e){let t,{portal:n,scope:r="fragment",unknownBricks:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n;t=n||(()=>(a=document.createElement("div"),a.style.position="absolute",a.style.width=a.style.height="0",document.body.append(a),a));let i,s,c=!1;return{async render(n){let{theme:l,uiVersion:d,language:f,context:p,functions:h,templates:g,i18n:v,url:b,app:y}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(c)throw new Error("The root is unmounted and cannot be rendered any more");const w=[].concat(n),A=i,S=(0,m.uniqueId)("render-id-");i=new zn(r,{unknownBricks:o,renderId:S});const E={ctxStore:new Mr("CTX",void 0,i),pendingPermissionsPreCheck:[],tplStateStoreMap:new Map,formStateStoreMap:new Map};if(b){const e=new URL(b);E.query=e.searchParams,E.location={pathname:e.pathname,search:e.search,hash:e.hash,state:void 0}}const k={tag:xn.ROOT,container:e,createPortal:t};if("page"===r){var I;X(l??"light"),ae("default"),co(d),f&&await u.i18n.changeLanguage(f),y??(y={id:"demo",homepage:"/demo"}),E.app=y;const e={app:y,meta:{i18n:v,customTemplates:g}};null===(I=s)||void 0===I||I(),s=B(e),so(e),ge(h,y)}E.ctxStore.define(p,E);let C,R=!1,T=[];try{C=await Gr(k,w,E,i,[],{}),T=Jr(E),await Qr(C,E,T)}catch(e){R=!0,C={node:{tag:xn.BRICK,type:"div",properties:{textContent:Qt(e),dataset:{errorBoundary:""},style:{color:"var(--color-error)"}},return:k,runtimeContext:null},blockingList:[]}}if(k.child=C.node,null==A||A.dispatchOnUnmount(),null==A||A.dispose(),Pn(e),a&&Pn(a),"page"===r&&(R||i.dispatchBeforePageLoad(),te(),se()),Mn(k),"page"===r&&window.scrollTo(0,0),!R){for(const e of T)e.mountAsyncData();"page"===r&&i.dispatchPageLoad(),i.dispatchOnMount(),i.initializeScrollIntoView(),i.initializeMediaChange(),i.initializeMessageDispatcher()}},unmount(){c||(c=!0,Pn(e),a&&(Pn(a),n||a.remove()))}}}function Ia(e){let{useRealTimeQuery:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={...ha()};t&&(n.query=new URLSearchParams(C().location.search));const r=t=>{if("string"==typeof t){if((0,T.isEvaluable)(t)){const e=ut(t,n);return Xe(e),e}return(0,x.inject)(t,n)}return!(0,f.isObject)(t)||Ze(e)?t:Array.isArray(t)?t.map((e=>r(e))):Object.fromEntries(Object.entries(t).map((e=>{let[t,n]=e;return[r(t),r(n)]})))};return r(e)}}}]);
3
- //# sourceMappingURL=3657.9e9e2de3.js.map