@next-bricks/form 0.5.0 → 0.6.0

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 (122) hide show
  1. package/dist/bricks.json +14 -3
  2. package/dist/chunks/{1970.0122d8c6.js → 1970.1bf0f5c1.js} +3 -3
  3. package/dist/chunks/{1970.0122d8c6.js.map → 1970.1bf0f5c1.js.map} +1 -1
  4. package/dist/chunks/2179.5d5ada16.js +2 -0
  5. package/dist/chunks/{6205.af7a9022.js.map → 2179.5d5ada16.js.map} +1 -1
  6. package/dist/chunks/2618.4d1b4f8f.js +2 -0
  7. package/dist/chunks/2618.4d1b4f8f.js.map +1 -0
  8. package/dist/chunks/{3494.4a17db19.js → 3494.81238413.js} +2 -2
  9. package/dist/chunks/{3494.4a17db19.js.map → 3494.81238413.js.map} +1 -1
  10. package/dist/chunks/4131.cd33579d.js +2 -0
  11. package/dist/chunks/4131.cd33579d.js.map +1 -0
  12. package/dist/chunks/4791.288c8084.js +2 -0
  13. package/dist/chunks/4791.288c8084.js.map +1 -0
  14. package/dist/chunks/5636.676bad66.js +2 -0
  15. package/dist/chunks/5636.676bad66.js.map +1 -0
  16. package/dist/chunks/6205.e5f8de3e.js +2 -0
  17. package/dist/chunks/{7164.dcaf6d0e.js.map → 6205.e5f8de3e.js.map} +1 -1
  18. package/dist/chunks/7164.c5911296.js +2 -0
  19. package/dist/chunks/7164.c5911296.js.map +1 -0
  20. package/dist/chunks/{7822.53604e29.js → 7822.8c36398f.js} +2 -2
  21. package/dist/chunks/{7822.53604e29.js.map → 7822.8c36398f.js.map} +1 -1
  22. package/dist/chunks/8971.3c456032.js +2 -0
  23. package/dist/chunks/8971.3c456032.js.map +1 -0
  24. package/dist/chunks/{9431.4eea30bd.js → 9431.cabf049c.js} +2 -2
  25. package/dist/chunks/{9431.4eea30bd.js.map → 9431.cabf049c.js.map} +1 -1
  26. package/dist/chunks/dynamic-form-item.3422b9a9.js +2 -0
  27. package/dist/chunks/dynamic-form-item.3422b9a9.js.map +1 -0
  28. package/dist/chunks/general-checkbox.6e66bf0c.js +3 -0
  29. package/dist/chunks/general-checkbox.6e66bf0c.js.map +1 -0
  30. package/dist/chunks/general-form-item.c64f3d47.js +3 -0
  31. package/dist/chunks/general-form-item.c64f3d47.js.map +1 -0
  32. package/dist/chunks/general-form.c99d1966.js +2 -0
  33. package/dist/chunks/general-form.c99d1966.js.map +1 -0
  34. package/dist/chunks/general-input.75439cfd.js +3 -0
  35. package/dist/chunks/general-input.75439cfd.js.map +1 -0
  36. package/dist/chunks/general-radio.d3d10247.js +3 -0
  37. package/dist/chunks/general-radio.d3d10247.js.map +1 -0
  38. package/dist/chunks/general-search.a76cac8b.js +3 -0
  39. package/dist/chunks/general-search.a76cac8b.js.map +1 -0
  40. package/dist/chunks/general-select.9b116d99.js +3 -0
  41. package/dist/chunks/general-select.9b116d99.js.map +1 -0
  42. package/dist/chunks/general-textarea.cd20b779.js +3 -0
  43. package/dist/chunks/general-textarea.cd20b779.js.map +1 -0
  44. package/dist/chunks/icon-select.17e7993f.js +3 -0
  45. package/dist/chunks/icon-select.17e7993f.js.LICENSE.txt +5 -0
  46. package/dist/chunks/icon-select.17e7993f.js.map +1 -0
  47. package/dist/chunks/main.3078c5a8.js +2 -0
  48. package/dist/chunks/main.3078c5a8.js.map +1 -0
  49. package/dist/chunks/submit-buttons.c0d01f4c.js +2 -0
  50. package/dist/chunks/submit-buttons.c0d01f4c.js.map +1 -0
  51. package/dist/index.2550b502.js +2 -0
  52. package/dist/index.2550b502.js.map +1 -0
  53. package/dist/manifest.json +224 -142
  54. package/dist-types/bootstrap.d.ts +1 -0
  55. package/dist-types/checkbox/index.d.ts +35 -38
  56. package/dist-types/code-editor/index.d.ts +1 -1
  57. package/dist-types/dynamic-form-item/index.d.ts +12 -7
  58. package/dist-types/form/formStore.d.ts +2 -2
  59. package/dist-types/form/index.d.ts +16 -13
  60. package/dist-types/form-item/index.d.ts +1 -1
  61. package/dist-types/icon-select/i18n.d.ts +15 -0
  62. package/dist-types/icon-select/index.d.ts +53 -0
  63. package/dist-types/icon-select/index.spec.d.ts +1 -0
  64. package/dist-types/icon-select/utils.d.ts +25 -0
  65. package/dist-types/input/index.d.ts +82 -11
  66. package/dist-types/input/index.spec.d.ts +1 -0
  67. package/dist-types/radio/index.d.ts +42 -80
  68. package/dist-types/search/index.d.ts +5 -5
  69. package/dist-types/select/index.d.ts +17 -77
  70. package/dist-types/submit-buttons/index.d.ts +9 -47
  71. package/dist-types/textarea/calculateAutoSizeStyle.d.ts +1 -1
  72. package/dist-types/textarea/index.d.ts +23 -56
  73. package/docs/dynamic-form-item.md +89 -0
  74. package/docs/general-checkbox.md +221 -0
  75. package/docs/general-form.md +245 -0
  76. package/docs/general-input.md +163 -0
  77. package/docs/general-radio.md +286 -0
  78. package/docs/general-select.md +205 -0
  79. package/docs/general-textarea.md +109 -0
  80. package/docs/icon-select.md +14 -0
  81. package/docs/submit-buttons.md +67 -0
  82. package/package.json +2 -2
  83. package/dist/chunks/2255.91dc8128.js +0 -2
  84. package/dist/chunks/2255.91dc8128.js.map +0 -1
  85. package/dist/chunks/2993.5d245055.js +0 -2
  86. package/dist/chunks/2993.5d245055.js.map +0 -1
  87. package/dist/chunks/6205.af7a9022.js +0 -2
  88. package/dist/chunks/7164.dcaf6d0e.js +0 -2
  89. package/dist/chunks/9396.f9127ea6.js +0 -2
  90. package/dist/chunks/9396.f9127ea6.js.map +0 -1
  91. package/dist/chunks/dynamic-form-item.97b25da2.js +0 -2
  92. package/dist/chunks/dynamic-form-item.97b25da2.js.map +0 -1
  93. package/dist/chunks/general-checkbox.0ec43d11.js +0 -3
  94. package/dist/chunks/general-checkbox.0ec43d11.js.map +0 -1
  95. package/dist/chunks/general-form-item.865dc60f.js +0 -3
  96. package/dist/chunks/general-form-item.865dc60f.js.map +0 -1
  97. package/dist/chunks/general-form.c9523ae0.js +0 -2
  98. package/dist/chunks/general-form.c9523ae0.js.map +0 -1
  99. package/dist/chunks/general-input.243352ff.js +0 -3
  100. package/dist/chunks/general-input.243352ff.js.map +0 -1
  101. package/dist/chunks/general-radio.21553834.js +0 -3
  102. package/dist/chunks/general-radio.21553834.js.map +0 -1
  103. package/dist/chunks/general-search.0ba9a7cb.js +0 -3
  104. package/dist/chunks/general-search.0ba9a7cb.js.map +0 -1
  105. package/dist/chunks/general-select.d6404264.js +0 -3
  106. package/dist/chunks/general-select.d6404264.js.map +0 -1
  107. package/dist/chunks/general-textarea.11a84e7c.js +0 -3
  108. package/dist/chunks/general-textarea.11a84e7c.js.map +0 -1
  109. package/dist/chunks/main.c796802d.js +0 -2
  110. package/dist/chunks/main.c796802d.js.map +0 -1
  111. package/dist/chunks/submit-buttons.6fe24040.js +0 -2
  112. package/dist/chunks/submit-buttons.6fe24040.js.map +0 -1
  113. package/dist/index.7af0aa96.js +0 -2
  114. package/dist/index.7af0aa96.js.map +0 -1
  115. /package/dist/chunks/{1970.0122d8c6.js.LICENSE.txt → 1970.1bf0f5c1.js.LICENSE.txt} +0 -0
  116. /package/dist/chunks/{general-checkbox.0ec43d11.js.LICENSE.txt → general-checkbox.6e66bf0c.js.LICENSE.txt} +0 -0
  117. /package/dist/chunks/{general-form-item.865dc60f.js.LICENSE.txt → general-form-item.c64f3d47.js.LICENSE.txt} +0 -0
  118. /package/dist/chunks/{general-input.243352ff.js.LICENSE.txt → general-input.75439cfd.js.LICENSE.txt} +0 -0
  119. /package/dist/chunks/{general-radio.21553834.js.LICENSE.txt → general-radio.d3d10247.js.LICENSE.txt} +0 -0
  120. /package/dist/chunks/{general-search.0ba9a7cb.js.LICENSE.txt → general-search.a76cac8b.js.LICENSE.txt} +0 -0
  121. /package/dist/chunks/{general-select.d6404264.js.LICENSE.txt → general-select.9b116d99.js.LICENSE.txt} +0 -0
  122. /package/dist/chunks/{general-textarea.11a84e7c.js.LICENSE.txt → general-textarea.cd20b779.js.LICENSE.txt} +0 -0
@@ -0,0 +1,205 @@
1
+ 表单下拉选择构件。
2
+
3
+ ```yaml preview
4
+ - brick: form.general-select
5
+ properties:
6
+ options:
7
+ - Beijing
8
+ - Shanghai
9
+ - Guangzhou
10
+ - Shenzhen
11
+ ```
12
+
13
+ ## Examples
14
+
15
+ ### Label
16
+
17
+ ```yaml preview
18
+ - brick: form.general-select
19
+ properties:
20
+ label: city
21
+ options:
22
+ - Beijing
23
+ - Shanghai
24
+ - Guangzhou
25
+ - Shenzhen
26
+ ```
27
+
28
+ ### Value
29
+
30
+ ```yaml preview
31
+ - brick: form.general-select
32
+ properties:
33
+ label: city
34
+ value: Shanghai
35
+ options:
36
+ - Beijing
37
+ - Shanghai
38
+ - Guangzhou
39
+ - Shenzhen
40
+ ```
41
+
42
+ ### Options
43
+
44
+ ```yaml preview
45
+ - brick: form.general-select
46
+ properties:
47
+ label: string
48
+ options:
49
+ - Beijing
50
+ - Shanghai
51
+ - Guangzhou
52
+ - Shenzhen
53
+ value: Guangzhou
54
+ - brick: div
55
+ properties:
56
+ style:
57
+ height: 20px
58
+ - brick: form.general-select
59
+ properties:
60
+ label: Array<object>
61
+ options:
62
+ - label: Beijing
63
+ value: 0
64
+ - label: Shanghai
65
+ value: 1
66
+ - label: Guangzhou
67
+ value: 2
68
+ - label: Shenzhen
69
+ value: 3
70
+ value: 2
71
+ - brick: div
72
+ properties:
73
+ style:
74
+ height: 20px
75
+ - brick: form.general-select
76
+ properties:
77
+ label: boolean
78
+ options:
79
+ - true
80
+ - false
81
+ ```
82
+
83
+ ### Disabled
84
+
85
+ ```yaml preview
86
+ - brick: form.general-select
87
+ properties:
88
+ options:
89
+ - label: Beijing
90
+ value: 0
91
+ disabled: true
92
+ - label: Shanghai
93
+ value: 1
94
+ - label: Guangzhou
95
+ value: 2
96
+ - label: Shenzhen
97
+ value: 3
98
+ - brick: form.general-select
99
+ properties:
100
+ disabled: true
101
+ options:
102
+ - label: Beijing
103
+ value: 0
104
+ - label: Shanghai
105
+ value: 1
106
+ - label: Guangzhou
107
+ value: 2
108
+ - label: Shenzhen
109
+ value: 3
110
+ ```
111
+
112
+ ### Multiple
113
+
114
+ ```yaml preview
115
+ - brick: form.general-select
116
+ properties:
117
+ label: multiple
118
+ multiple: true
119
+ options:
120
+ - Beijing
121
+ - Shanghai
122
+ - Guangzhou
123
+ - Shenzhen
124
+ ```
125
+
126
+ ### Placeholder
127
+
128
+ ```yaml preview
129
+ - brick: form.general-select
130
+ properties:
131
+ placeholder: This is placeholder...
132
+ options:
133
+ - Beijing
134
+ - Shanghai
135
+ - Guangzhou
136
+ - Shenzhen
137
+ ```
138
+
139
+ ### Input Style
140
+
141
+ ```yaml preview
142
+ - brick: form.general-select
143
+ properties:
144
+ inputStyle:
145
+ width: 180px
146
+ options:
147
+ - Beijing
148
+ - Shanghai
149
+ - Guangzhou
150
+ - Shenzhen
151
+ ```
152
+
153
+ ### Event
154
+
155
+ ```yaml preview
156
+ - brick: form.general-select
157
+ properties:
158
+ id: options-change-select
159
+ label: Single
160
+ options:
161
+ - Beijing
162
+ - Shanghai
163
+ - Guangzhou
164
+ - Shenzhen
165
+ events:
166
+ change:
167
+ - action: message.success
168
+ args:
169
+ - <% JSON.stringify(EVENT.detail) %>
170
+ options.change:
171
+ - action: message.success
172
+ args:
173
+ - <% JSON.stringify(EVENT.detail) %>
174
+ - brick: form.general-select
175
+ properties:
176
+ label: Multiple
177
+ multiple: true
178
+ options:
179
+ - Beijing
180
+ - Shanghai
181
+ - Guangzhou
182
+ - Shenzhen
183
+ events:
184
+ change:
185
+ - action: message.success
186
+ args:
187
+ - <% JSON.stringify(EVENT.detail) %>
188
+ - brick: basic.general-button
189
+ properties:
190
+ textContent: Click to change options
191
+ events:
192
+ click:
193
+ - target: "#options-change-select"
194
+ properties:
195
+ options:
196
+ - Beijing
197
+ - Shanghai
198
+ - Guangzhou
199
+ - Shenzhen
200
+ - Hangzhou
201
+ - brick: div
202
+ properties:
203
+ style:
204
+ height: 20px
205
+ ```
@@ -0,0 +1,109 @@
1
+ 表单多行文本输入框构件。
2
+
3
+ ```yaml preview
4
+ - brick: form.general-textarea
5
+ ```
6
+
7
+ ## Examples
8
+
9
+ ### Label
10
+
11
+ ```yaml preview
12
+ - brick: form.general-textarea
13
+ properties:
14
+ label: 多行输入框
15
+ ```
16
+
17
+ ### Value
18
+
19
+ ```yaml preview
20
+ - brick: form.general-textarea
21
+ properties:
22
+ value: Default Value
23
+ ```
24
+
25
+ ### Disabled
26
+
27
+ ```yaml preview
28
+ - brick: form.general-textarea
29
+ properties:
30
+ value: Default Value
31
+ disabled: true
32
+ ```
33
+
34
+ ### Placeholder
35
+
36
+ ```yaml preview
37
+ - brick: form.general-textarea
38
+ properties:
39
+ placeholder: This is placeholder...
40
+ ```
41
+
42
+ ### max length
43
+
44
+ ```yaml preview
45
+ - brick: form.general-textarea
46
+ properties:
47
+ placeholder: max length = 10
48
+ maxLength: 10
49
+ ```
50
+
51
+ ### AutoSize
52
+
53
+ ```yaml preview
54
+ - brick: form.general-textarea
55
+ properties:
56
+ placeholder: "autoSize: true"
57
+ autoSize: true
58
+ - brick: form.general-textarea
59
+ properties:
60
+ placeholder: "autoSize: { minRows: 3}"
61
+ autoSize:
62
+ minRows: 3
63
+ - brick: form.general-textarea
64
+ properties:
65
+ placeholder: "autoSize: { minRows: 3, maxRows: 5}"
66
+ autoSize:
67
+ minRows: 3
68
+ maxRows: 5
69
+ ```
70
+
71
+ ### Textarea Style
72
+
73
+ ```yaml preview
74
+ - brick: form.general-textarea
75
+ properties:
76
+ placeholder: "width: 180px"
77
+ textareaStyle:
78
+ width: 180px
79
+ - brick: form.general-textarea
80
+ properties:
81
+ placeholder: "width: 250px"
82
+ textareaStyle:
83
+ width: 250px
84
+ - brick: form.general-textarea
85
+ properties:
86
+ placeholder: "border style"
87
+ textareaStyle:
88
+ border: "1px solid #8b2121"
89
+ ```
90
+
91
+ ### Event
92
+
93
+ ```yaml preview
94
+ - brick: form.general-textarea
95
+ events:
96
+ label: Event
97
+ change:
98
+ action: message.success
99
+ args:
100
+ - <% EVENT.detail %>
101
+ focus:
102
+ action: message.success
103
+ args:
104
+ - focus
105
+ blur:
106
+ action: message.success
107
+ args:
108
+ - blur
109
+ ```
@@ -0,0 +1,14 @@
1
+ 构件 icon-select
2
+
3
+ ## Examples
4
+
5
+ ### Basic
6
+
7
+ ```yaml preview
8
+ - brick: form.icon-select
9
+ events:
10
+ change:
11
+ action: console.log
12
+ args:
13
+ - "<% EVENT.detail %>"
14
+ ```
@@ -0,0 +1,67 @@
1
+ 表单提交按钮。
2
+ (tips: 通常在于 form.general-form 构件搭配使用)
3
+
4
+ ```yaml preview
5
+ - brick: form.submit-buttons
6
+ ```
7
+
8
+ ## Examples
9
+
10
+ ### Submit Button Text & Cancel Button Text
11
+
12
+ ```yaml preview
13
+ - brick: form.submit-buttons
14
+ properties:
15
+ submitText: submit
16
+ cancelText: cancel
17
+ ```
18
+
19
+ ### Disabled After Click & Submit Button Disabled
20
+
21
+ ```yaml preview
22
+ - brick: form.submit-buttons
23
+ properties:
24
+ submitText: submit
25
+ cancelText: cancel
26
+ submitDisabled: true
27
+ - brick: form.submit-buttons
28
+ properties:
29
+ submitText: click to disabled
30
+ cancelText: cancel
31
+ disableAfterClick: true
32
+ ```
33
+
34
+ ### Type
35
+
36
+ ```yaml preview
37
+ - brick: form.submit-buttons
38
+ properties:
39
+ submitText: submit
40
+ cancelText: cancel
41
+ submitType: primary
42
+ cancelType: text
43
+ - brick: form.submit-buttons
44
+ properties:
45
+ submitText: click to disabled
46
+ cancelText: cancel
47
+ submitType: text
48
+ cancelType: text
49
+ ```
50
+
51
+ ### Event
52
+
53
+ ```yaml preview
54
+ - brick: form.submit-buttons
55
+ properties:
56
+ submitText: submit
57
+ cancelText: cancel
58
+ events:
59
+ submit:
60
+ - action: message.success
61
+ args:
62
+ - Submit
63
+ cancel:
64
+ - action: message.warn
65
+ args:
66
+ - Cancel
67
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/form",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/form",
5
5
  "repository": {
6
6
  "type": "git",
@@ -37,5 +37,5 @@
37
37
  "@next-core/build-next-bricks": "^1.7.2",
38
38
  "@next-core/test-next": "^1.0.6"
39
39
  },
40
- "gitHead": "39c905308f0f4db5e5d84b8ffdde38aa94dbe394"
40
+ "gitHead": "8d1311247a4b4cfe6a06e269c1acc358e06b4cd0"
41
41
  }
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunk_next_bricks_form=self.webpackChunk_next_bricks_form||[]).push([[2255],{5863:(e,t,r)=>{function n(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}r.d(t,{Z:()=>n})},175:(e,t,r)=>{function n(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}r.d(t,{Z:()=>n})},687:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(175);function o(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,(0,n.Z)(e,t,"get"))}},3395:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(5863);function o(e,t,r){(0,n.Z)(e,t),t.set(e,r)}},381:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(175);function o(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,(0,n.Z)(e,t,"set"),r),r}},6171:(e,t,r)=>{function n(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r.d(t,{Z:()=>n})},5866:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(5863);function o(e,t){(0,n.Z)(e,t),t.add(e)}},6666:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(5850);function o(e,t,r){return(t=(0,n.Z)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},3028:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(6666);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}},2159:(e,t,r)=>{function n(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}r.d(t,{Z:()=>n})},5850:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(6522);function o(e){var t=function(e,t){if("object"!==(0,n.Z)(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==(0,n.Z)(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===(0,n.Z)(t)?t:String(t)}},6522:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r.d(t,{Z:()=>n})},2255:(e,t,r)=>{r.r(t),r.d(t,{Dialog:()=>Gt,Notification:()=>tr,StoryboardFunctionRegistryFactory:()=>ce,__secret_internals:()=>n,__test_only:()=>{},applyTheme:()=>Q,authenticate:()=>ho,batchSetAppsLocalTheme:()=>J,checkIfByTransform:()=>kt,checkIfOfComputed:()=>St,createHistory:()=>k,createRuntime:()=>oo,customProcessors:()=>x,customTemplates:()=>Ae,fetchByProvider:()=>bo,getAuth:()=>mo,getBasePath:()=>v,getCssPropertyValue:()=>ne,getCurrentMode:()=>te,getCurrentTheme:()=>q,getHistory:()=>Z,getPageInfo:()=>An,getRuntime:()=>ao,handleHttpError:()=>er,httpErrorToString:()=>qt,isLoggedIn:()=>yo,isUnauthenticatedError:()=>Qt,logout:()=>go,matchPath:()=>Bt,registerWidgetFunctions:()=>Re,registerWidgetI18n:()=>L,unstable_createRoot:()=>So});var n={};r.r(n),r.d(n,{legacyDoTransform:()=>Ao,mountUseBrick:()=>Zo,renderUseBrick:()=>Eo,unmountUseBrick:()=>Io,updateSnippetPreviewSettings:()=>_o,updateStoryboard:()=>Oo,updateStoryboardByRoute:()=>To,updateStoryboardBySnippet:()=>Ro,updateStoryboardByTemplate:()=>Co,updateTemplatePreviewSettings:()=>Po});var o=r(3028),a=r(4795),i=r(3395),s=r(381),c=r(687),l=r(7541),u=r(3761),d=r(9621),p=r(8874),f=(r(8525),r(9492));function v(){var e=document.querySelector("base");return e?e.getAttribute("href"):"/"}var h=r(2159),m=r(5178);function g(e,t){var r=(0,m.orderBy)(e,(e=>{var t,r,n;return null!==(t=null===(r=e.app)||void 0===r||null===(n=r.homepage)||void 0===n?void 0:n.length)&&void 0!==t?t:0}),"desc");for(var n of r){var o=n.app.homepage;if("string"==typeof o&&"/"===o[0]&&("/"===o?t===o:"".concat(t.replace(/\/+$/,""),"/").startsWith("".concat(o.replace(/\/+$/,""),"/"))))return n}}function y(e){var t;return!e||(null===(t=ao().getCurrentApp())||void 0===t?void 0:t.id)!==e.app.id&&!window.STANDALONE_MICRO_APPS&&e.app.standaloneMode}var b,w=["extraQuery","clear","keepHash"],S=!1;function E(e,t){t(!(S=!confirm(e)))}function k(){if(!b){var e=(0,f.createBrowserHistory)({basename:v().replace(/\/$/,""),getUserConfirmation:E});Object.assign(e,function(e){var t,{push:r,replace:n}=e;function a(e,t,n){S=!1,r(e,t),null==n||n(S)}function i(e,t,r){S=!1,n(e,t),null==r||r(S)}function s(t){return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0,{extraQuery:s,clear:c,keepHash:l}=n,u=(0,h.Z)(n,w),d=new URLSearchParams(c?"":e.location.search),p={};for(var[f,v]of(Object.assign(p,r,s),Object.entries(p)))if(Array.isArray(v))for(var m of(d.delete(f),v))d.append(f,m);else null==v||""===v?d.delete(f):d.set(f,v);("push"===t?a:i)("?".concat(d.toString()).concat(l?e.location.hash:""),u,o)}}return(0,o.Z)({pushQuery:s("push"),replaceQuery:s("replace"),pushAnchor:function(t,r,n){a((0,o.Z)((0,o.Z)({},e.location),{},{key:void 0,hash:t,state:(0,o.Z)({notify:!1},r)}),void 0,n)},reload:function(t){i((0,o.Z)((0,o.Z)({},e.location),{},{state:(0,o.Z)((0,o.Z)({},e.location.state),{},{notify:!0})}),void 0,t)},setBlockMessage:function(e){t=e},getBlockMessage:function(){return t},unblock:function(){t=void 0}},function(e){var{push:t,replace:r}=e;function n(n){return function(o,a,i){var s,c="string"==typeof o;return"string"==typeof(s=c?(0,f.parsePath)(o).pathname:o.pathname)&&s.startsWith("/")&&y(function(e){var t,r;return g(null!==(t=null===(r=eo)||void 0===r?void 0:r.storyboards)&&void 0!==t?t:[],e)}(s))?location["push"===n?"assign":"replace"](c?v()+o.substring(1):e.createHref(o)):("push"===n?t:r)(o,a,i)}}return{push:n("push"),replace:n("replace")}}((0,o.Z)((0,o.Z)({},e),{},{push:a,replace:i})))}(e)),b=e}return b}function Z(){return b}var I=r(5866),A=r(6171),O=r(9751),T=r(3405),C=r(4735),P=r(5663),R=r(5038),_=new WeakMap,x=new class{constructor(){(0,i.Z)(this,_,{writable:!0,value:new Map})}define(e,t){var[r,n]=e.split("."),o=(0,c.Z)(this,_).get(r);if(o||(o=new Map,(0,c.Z)(this,_).set(r,o)),o.has(n))throw new Error('Custom processor of "'.concat(e,'" already registered'));o.set(n,t)}get(e){return(0,c.Z)(this,_).get(e)}};function M(e){var{app:t,meta:r}=e;if(null!=r&&r.i18n){var n=B("app",t.id),o=[];return Object.entries(r.i18n).forEach((e=>{var[t,r]=e;l.i18n.addResourceBundle(t,n,r),o.push(t)})),()=>{for(var e of o)l.i18n.removeResourceBundle(e,n)}}}function B(e,t){return"".concat(e,"/").concat(t)}function L(e,t){var r=B("widget",e);Object.entries(t).forEach((e=>{var[t,n]=e;l.i18n.addResourceBundle(t,r,n)}))}function U(e){return l.i18n.getFixedT(null,B("widget",e))}function N(e,t){return{get(r){var n;return"".concat(null!==(n=window.PUBLIC_ROOT)&&void 0!==n?n:"","bricks/").concat(e,"/").concat(window.PUBLIC_ROOT_WITH_VERSION&&t?"".concat(t,"/"):"","dist/assets/").concat(r)}}}function F(){return window.__BRICK_NEXT_DEVTOOLS_HOOK__}var j=()=>{throw new Error("Can't modify read-only proxy object")},$={set:j,defineProperty:j,deleteProperty:j,setPrototypeOf:j};function K(e){return new Proxy(e,$)}function D(e){var{get:t,ownKeys:r}=e;return F()?K(Object.fromEntries(r(null).map((e=>[e,t(null,e,null)])))):new Proxy(Object.freeze({}),{get:t})}var W="light",V=new d.JsonStorage(localStorage),H="apps-theme";function z(e){if("dark"!==e&&"light"!==e&&"dark-v2"!==e)throw new Error("Unsupported theme: ".concat(e));W=e}function G(){return W}function q(){return document.documentElement.dataset.theme}function Q(e){e?z(e):e=G(),e!==q()&&(document.documentElement.dataset.theme=e,window.dispatchEvent(new CustomEvent("theme.change",{detail:e})))}function J(e){V.setItem(H,(0,o.Z)((0,o.Z)({},Y()),e))}function Y(){var e,t;try{t=V.getItem(H)}catch(e){console.error("JSON parse error inside `getLocalAppsTheme()`")}return null!==(e=t)&&void 0!==e?e:{}}var X="default";function ee(e){if("dashboard"!==e&&"default"!==e)throw new Error("Unsupported mode: ".concat(e));X=e}function te(){return document.documentElement.dataset.mode}function re(e){e?ee(e):e=X,e!==te()&&(document.documentElement.dataset.mode=e,window.dispatchEvent(new CustomEvent("mode.change",{detail:e})))}function ne(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return r&&(null===(t=window.getComputedStyle(r))||void 0===t?void 0:t.getPropertyValue(e))||""}function oe(e,t){var r={};for(var n of e){var o=ae(n,t);void 0!==o&&(r[n]=o)}return r}function ae(e,t){var r,n,o,a,{collectCoverage:i,widgetId:s,widgetVersion:c,app:u,appendI18nNamespace:d,storyboardFunctions:p,isStoryboardFunction:f}=t;switch(e){case"BASE_URL":return i?"/next":v().replace(/\/$/,"");case"FN":return p;case"IMG":return i?{get:e=>"mock/images/".concat(e)}:s?N(s,c):(n=u.id,o=u.isBuildPush,a=u.currentVersion,{get(e){if(o)return"".concat(v(),"api/gateway/object_store.object_store.GetObject/api/v1/objectStore/bucket/next-builder/object/").concat(e);var t=window.APP_ROOT?"".concat(window.APP_ROOT,"-/"):"";return window.APP_ID&&window.APP_ID!==n&&(t=t.replace(new RegExp("(^|/)".concat((0,m.escapeRegExp)(window.APP_ID),"/")),"$1".concat(n,"/")).replace(/\/\d+\.\d+\.\d+\//,"/".concat(a,"/"))),t.startsWith("/")||(t=v()+t),"".concat(t,"micro-apps/").concat(n,"/images/").concat(e)}});case"I18N":return i?m.identity:s?U(s):l.i18n.getFixedT(null,[d,B("app",u.id)].filter(Boolean));case"I18N_TEXT":return i?ie:l.i18nText;case"PERMISSIONS":return K({check:i?se:null==ro||null===(r=ro.checkPermissions)||void 0===r?void 0:r.checkPermissions});case"THEME":return K({getTheme:i?()=>"light":G});case"console":return f?K(console):void 0;case"location":return i?{href:"http://localhost:3000/functions/test",origin:"http://localhost:3000",host:"localhost:3000",hostname:"localhost"}:{href:location.href,origin:location.origin,host:location.host,hostname:location.hostname}}}function ie(e){return null==e?void 0:e.en}function se(){return!0}function ce(){var e,{widgetId:t,widgetVersion:r,collectCoverage:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=new Map,i=new Proxy(Object.freeze({}),{get:(o,s)=>function(o){var s,c=a.get(o);if(c){if(c.processed)return c.cooked;n&&(s=n.createCollector(o));var l=(0,T.precookFunction)(c.source,{typescript:c.typescript,hooks:s&&{beforeVisit:s.beforeVisit}});return c.cooked=(0,T.cook)(l.function,c.source,{rules:{noVar:!0},globalVariables:(0,P.supply)(l.attemptToVisitGlobals,oe(l.attemptToVisitGlobals,{collectCoverage:n,widgetId:t,widgetVersion:r,app:e,storyboardFunctions:i,isStoryboardFunction:!0}),!!n),hooks:s&&{beforeEvaluate:s.beforeEvaluate,beforeCall:s.beforeCall,beforeBranch:s.beforeBranch}}),c.processed=!0,c.cooked}}(s)});return{storyboardFunctions:i,registerStoryboardFunctions:function(t,r){if(r&&(e=r),a.clear(),Array.isArray(t))for(var n of t){var o=(0,R.strictCollectMemberUsageInFunction)(n,"FN"),i=(0,R.strictCollectMemberUsageInFunction)(n,"PERMISSIONS").has("check");a.set(n.name,{source:n.source,typescript:n.typescript,deps:o,hasPermissionsCheck:i})}},updateStoryboardFunction(e,t){var r=(0,o.Z)((0,o.Z)({},t),{},{name:e}),n=(0,R.strictCollectMemberUsageInFunction)(r,"FN"),i=(0,R.strictCollectMemberUsageInFunction)(r,"PERMISSIONS").has("check");a.set(e,{source:t.source,typescript:t.typescript,deps:n,hasPermissionsCheck:i})},checkPermissionsUsage(e){var t=new Set,r=e=>{if(!t.has(e)){t.add(e);var n=a.get(e);return!!n&&(n.hasPermissionsCheck||[...n.deps].some(r))}return!1};return e.some(r)}}}var{storyboardFunctions:le,registerStoryboardFunctions:ue,checkPermissionsUsage:de}=ce(),pe={};try{pe.EventTarget=(new EventTarget).constructor}catch(e){!function(e,t){var r=e.create,n=e.defineProperty,o=a.prototype;function a(){t.set(this,r(null))}function i(e,t,r){n(e,t,{configurable:!0,writable:!0,value:r})}function s(e){var t=e.options;return t&&t.once&&e.target.removeEventListener(this.type,e.listener),"function"==typeof e.listener?e.listener.call(e.target,this):e.listener.handleEvent(this),this._stopImmediatePropagationFlag}i(o,"addEventListener",(function(e,r,n){for(var o=t.get(this),a=o[e]||(o[e]=[]),i=0,s=a.length;i<s;i++)if(a[i].listener===r)return;a.push({target:this,listener:r,options:n})})),i(o,"dispatchEvent",(function(e){var r=t.get(this)[e.type];return r&&(i(e,"target",this),i(e,"currentTarget",this),r.slice(0).some(s,e),delete e.currentTarget,delete e.target),!0})),i(o,"removeEventListener",(function(e,r){for(var n=t.get(this),o=n[e]||(n[e]=[]),a=0,i=o.length;a<i;a++)if(o[a].listener===r)return void o.splice(a,1)})),pe.EventTarget=a}(Object,new WeakMap)}const fe=pe.EventTarget;var ve=function(e){return e.xLarge="xLarge",e.large="large",e.medium="medium",e.small="small",e.xSmall="xSmall",e}({}),he=new Map([[ve.xLarge,"1920px"],[ve.large,"1600px"],[ve.medium,"1280px"],[ve.small,"1024px"],[ve.xSmall,0]]),me=new fe,ge={},ye={};function be(e,t){var r=!1;for(var[n]of(ge[t]=e.matches,he))if(ge[n]&&ye.breakpoint!==n){ye.breakpoint=n,r=!0;break}r&&me.dispatchEvent(new CustomEvent("change",{detail:ye}))}he.forEach(((e,t)=>{var r=window.matchMedia("(min-width: ".concat(e,")"));be(r,t),r.addEventListener?r.addEventListener("change",(e=>{be(e,t)})):r.addListener((e=>{be(e,t)}))}));var we=()=>ye;function Se(e){return function(t){var r,n="local"===e?localStorage:sessionStorage;return JSON.parse(null!==(r=n.getItem(t))&&void 0!==r?r:"null")}}function Ee(e){var t,r;return!(null===(t=e?e.flags:null===(r=ao())||void 0===r?void 0:r.getFeatureFlags())||void 0===t||!t["brick-next-v3-strict-mode"])}function ke(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];var a=0===n.length?"":",";e?console.error("".concat(t," is dropped in v3 strict mode").concat(a),...n):console.warn("".concat(t," is deprecated in v3 and will be dropped in strict mode").concat(a),...n)}var Ze=new Set(["prefix"]),Ie=new WeakMap,Ae=new class{constructor(){(0,i.Z)(this,Ie,{writable:!0,value:new Map})}define(e,t){var r,n,a,i,s=(0,c.Z)(this,Ie).has(e);s?console.warn('Custom template of "'.concat(e,'" already registered.')):(s=!!customElements.get(e))&&console.warn('Custom template of "'.concat(e,'" already defined by customElements.'));var l=Ee(),u=null!==(r=null===(n=t.proxy)||void 0===n?void 0:n.properties)&&void 0!==r?r:{},d=[],p=[];for(var[f,v]of Object.entries(u))v.asVariable?(ke(l,"Template `asVariable`",e,f),l||p.push(f)):v.mergeProperty||v.refTransform?console.error("Template `mergeProperty` and `refTransform` are dropped in v3:",e,f):v.ref&&d.push([f,v]);var h=(0,o.Z)((0,o.Z)({},t),{},{proxy:(0,o.Z)((0,o.Z)({},t.proxy),{},{properties:Object.fromEntries(d)}),state:(t.state?l?t.state:t.state.map((e=>(0,o.Z)({expose:!0},e))):[]).concat(p.map((e=>({name:e,expose:!0}))))});(0,c.Z)(this,Ie).set(e,(0,o.Z)((0,o.Z)({},h),{},{name:e}));var g,y,b=(g=h.state,(0,m.uniq)(null!==(y=null==g?void 0:g.filter((e=>e.expose)).map((e=>e.name)))&&void 0!==y?y:[])),w=Object.entries(null!==(a=null===(i=h.proxy)||void 0===i?void 0:i.methods)&&void 0!==a?a:{}),S=b.concat(d.map((e=>e[0]))),E=w.map((e=>e[0])),k=S.concat(E).filter((e=>e in HTMLElement.prototype&&!Ze.has(e)));if(k.length>0&&(ke(l,"Using native HTMLElement properties as template properties or methods",e,...k),l))throw new Error('In custom template "'.concat(e,'", ').concat(k.map((e=>'"'.concat(e,'"'))).join(", ")," are native HTMLElement properties, and should be avoid to be used as brick properties or methods."));if(!s){class t extends HTMLElement{get $$typeof(){return"custom-template"}static get _dev_only_definedProperties(){return S}static get _dev_only_definedMethods(){return E}$$getElementByRef(e){var t,r,n,o;return null===(t=this.$$tplStateStore)||void 0===t||null===(r=t.hostBrick)||void 0===r||null===(n=r.tplHostMetadata)||void 0===n||null===(o=n.internalBricksByRef.get(e))||void 0===o?void 0:o.element}connectedCallback(){var e=this.shadowRoot;e||(e=this.attachShadow({mode:"open"}));var t=document.createDocumentFragment(),r=document.createElement("style");r.textContent=":host{display:block}:host([hidden]){display:none}";var n=document.createElement("slot");t.appendChild(r),t.appendChild(n),e.appendChild(t)}disconnectedCallback(){this.shadowRoot&&(this.shadowRoot.textContent="")}}var Z=function(r){if(d.some((e=>e[0]===r)))return console.error('Cannot define an exposed state that is also a proxy property: "'.concat(r,'" in ').concat(e)),"continue";Object.defineProperty(t.prototype,r,{get(){return this.$$tplStateStore.getValue(r)},set(e){var t;null===(t=this.$$tplStateStore)||void 0===t||t.updateValue(r,e,"replace")},enumerable:!0})};for(var I of b)Z(I);var A=function(e,r){Object.defineProperty(t.prototype,e,{get(){var t;return this.$$getElementByRef(r.ref)[null!==(t=r.refProperty)&&void 0!==t?t:e]},set(t){var n,o,a=null===(n=this.$$getElementByRef)||void 0===n?void 0:n.call(this,r.ref);a&&(a[null!==(o=r.refProperty)&&void 0!==o?o:e]=t)},enumerable:!0})};for(var[O,T]of d)A(O,T);var C=function(e,r){Object.defineProperty(t.prototype,e,{value(){var t;this.$$getElementByRef(r.ref)[null!==(t=r.refMethod)&&void 0!==t?t:e](...arguments)},enumerable:!0})};for(var[P,R]of w)C(P,R);customElements.define(e,t)}}get(e){return(0,c.Z)(this,Ie).get(e)}};function Oe(e,t,r){var{tplStateStoreId:n,tplStateStoreMap:o}=e;if(!n)throw new Error('Using "'.concat(t,'" outside of a custom template').concat(null!=r?r:""));var a=o.get(n);if(!a)throw new Error('Template state store is not found when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return a}function Te(e,t,r){var n=Oe(e,t,r).hostBrick.element;if(!n)throw new Error('Template host element is gone when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return n}var Ce=new Map,Pe=new Proxy(Object.freeze({}),{get:(e,t)=>Ce.get(t)});function Re(e,t,r){if(Ce.has(e))throw new Error('Widget functions of "'.concat(e,'" already registered'));var{storyboardFunctions:n,registerStoryboardFunctions:o}=ce({widgetId:e,widgetVersion:r});Ce.set(e,n),o(t)}const _e=(e,t,r)=>{$e(r);const n=((e,t)=>{const r=Me(e),n=Me(t),o=r.pop(),a=n.pop(),i=Ne(r,n);return 0!==i?i:o&&a?Ne(o.split("."),a.split(".")):o||a?o?-1:1:0})(e,t);return Fe[r].includes(n)},xe=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Me=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match(xe);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Be=e=>"*"===e||"x"===e||"X"===e,Le=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},Ue=(e,t)=>{if(Be(e)||Be(t))return 0;const[r,n]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(Le(e),Le(t));return r>n?1:r<n?-1:0},Ne=(e,t)=>{for(let r=0;r<Math.max(e.length,t.length);r++){const n=Ue(e[r]||"0",t[r]||"0");if(0!==n)return n}return 0},Fe={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]},je=Object.keys(Fe),$e=e=>{if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===je.indexOf(e))throw new Error(`Invalid operator, expected one of ${je.join("|")}`)};function Ke(e,t){var r=vo(e);if(!r&&null!=ro&&ro.checkInstalledApps&&(r=ro.checkInstalledApps.getCheckedApp(e)),!r||"running"===r.installStatus)return!1;if(!t||!r.currentVersion)return!0;var n=t.match(/^([><]=?|=)(.*)$/);try{if(!n)throw new TypeError("Invalid match version: ".concat(t));return _e(r.currentVersion,n[2],n[1])}catch(e){console.error(e)}return!1}function De(e,t,r){var{formStateStoreId:n,formStateStoreMap:o}=e;if(!n)throw new Error('Using "'.concat(t,'" outside of form renderer').concat(null!=r?r:""));var a=o.get(n);if(!a)throw new Error('Form state store is not found when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return a}var We=new Map;function Ve(e){return He.apply(this,arguments)}function He(){return He=(0,a.Z)((function*(e){var t,r=null==ro||null===(t=ro.flowApi)||void 0===t?void 0:t.isFlowApiProvider(e);r&&(e=ro.flowApi.FLOW_API_PROVIDER);var n=We.get(e);if(n)return n;if(e.includes("-")&&!customElements.get(e))if(r)ro.flowApi.registerFlowApiProvider();else if(yield(0,u.loadBricksImperatively)([e],lo()),!customElements.get(e))throw new Error('Provider not defined: "'.concat(e,'".'));return n=document.createElement(e),We.set(e,n),n})),He.apply(this,arguments)}var ze=new Map;function Ge(e,t,r){return qe.apply(this,arguments)}function qe(){return(qe=(0,a.Z)((function*(e,t,r){var{useProvider:n,method:a="resolve",args:i=[],onReject:s}=e,c=e.provider;if(c&&!n)throw new Error("You're using \"provider: ".concat(c,'" which is dropped in v3, please use "useProvider" instead'));var l,[u,d]=yield Promise.all([Ve(n),ft(i,t)]),p=Qe(u,n,a,d,r,i),{transform:f}=e;try{l=yield p}catch(e){if(!function(e){return!(null==e||!e.transform)}(s))throw e;f=s.transform,l=e}return f?"string"==typeof f?{[f]:l}:ft(f,(0,o.Z)((0,o.Z)({},t),{},{data:l})):l}))).apply(this,arguments)}function Qe(e,t,r,n,o,a){return Je.apply(this,arguments)}function Je(){return Je=(0,a.Z)((function*(e,t,r,n,o,i){var s,c;try{s=JSON.stringify({useProvider:t,method:r,args:n})}catch(e){if(!i)throw e;s=JSON.stringify({useProvider:t,method:r,originalArgs:i})}return"reload"!==(null==o?void 0:o.cache)&&(c=ze.get(s)),c||(c=(0,a.Z)((function*(){var o,a=null!=ro&&null!==(o=ro.flowApi)&&void 0!==o&&o.isFlowApiProvider(t)?yield ro.flowApi.getArgsOfFlowApi(t,n,r):n;return e.resolve(...a)}))(),ze.set(s,c)),c})),Je.apply(this,arguments)}var Ye=Symbol.for("pre.evaluated.raw"),Xe=Symbol.for("pre.evaluated.context");function et(e){return!(null==e||!e[Ye])}function tt(e){return e[Ye]}function rt(e){return"string"==typeof e?(0,T.shouldAllowRecursiveEvaluations)(e):(0,T.shouldAllowRecursiveEvaluations)(e[Ye])}var nt=new WeakSet([SyntaxError,TypeError,ReferenceError]);function ot(e){return nt.has(e.constructor)?e.constructor:TypeError}function at(){return(at=(0,a.Z)((function*(e,t,r){var{blockingList:n,run:o}=it(e,t,r,!0);return yield Promise.all(n),o()}))).apply(this,arguments)}function it(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,a=[];if("string"!=typeof e){var i=(0,m.omit)(t,["pendingPermissionsPreCheck","tplStateStoreMap","tplStateStoreScope","formStateStoreMap","formStateStoreScope"]);t=(0,o.Z)((0,o.Z)({},e[Xe]),i),e=e[Ye]}var s,c={usedArgs:new Set},l={usedArgs:new Set};try{s=(0,T.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal(e,t){(0,R.collectAppGetMenuUsage)(c,e,t),(0,R.collectInstalledAppsHasUsage)(l,e,t)}}})}catch(t){var p="".concat(t.message,', in "').concat(e,'"');throw new(ot(t))(p)}if(c.hasNonStaticUsage)throw new Error('Non-static usage of "APP.getMenu" is prohibited in v3, check your expression: "'.concat(e,'"'));if(l.hasNonStaticUsage)throw new Error('Non-static usage of "INSTALLED_APPS.has" is prohibited in v3, check your expression: "'.concat(e,'"'));var f,v,h,g,y={},{attemptToVisitGlobals:b}=s;if(r.lazy||b.has("EVENT")&&!(0,d.hasOwnProperty)(t,"event")||b.has("DATA")&&!(0,d.hasOwnProperty)(t,"data"))return{blockingList:a,run:()=>Object.keys(t).length>0?{[Ye]:e,[Xe]:t}:e};var w,S,E=Ee(t);(b.has("STATE")||!E&&b.has("TPL"))&&(g=Oe(t,"STATE",': "'.concat(e,'"'))),b.has("FORM_STATE")&&(S=De(t,"FORM_STATE",': "'.concat(e,'"')));var k=F();if(n||k){if(b.has("CTX")&&(f=(0,R.strictCollectMemberUsage)(e,"CTX"),n&&a.push(t.ctxStore.waitFor(f))),g){if(h=(0,R.strictCollectMemberUsage)(e,"STATE"),!E){var Z=(0,R.strictCollectMemberUsage)(e,"TPL");for(var I of Z)h.add(I)}n&&a.push(g.waitFor(h))}S&&(w=(0,R.strictCollectMemberUsage)(e,"FORM_STATE"),n&&a.push(S.waitFor(w))),b.has("PROCESSORS")&&(v=(0,R.strictCollectMemberUsage)(e,"PROCESSORS",2),n&&a.push((0,u.loadProcessorsImperatively)(v,lo())))}if(n){var A,O=b.has("PERMISSIONS");if(!O&&b.has("FN")){var C=[...(0,R.strictCollectMemberUsage)(e,"FN")];O=de(C)}if(O&&a.push(...t.pendingPermissionsPreCheck),c.usedArgs.size>0&&null!=ro&&ro.menu){var _=[...c.usedArgs];a.push(Promise.all(_.map((e=>ro.menu.fetchMenuById(e,t,{getStoryboardByAppId:fo,resolveData:Ge,asyncComputeRealValue:ft})))))}l.usedArgs.size>0&&a.push(null==ro||null===(A=ro.checkInstalledApps)||void 0===A?void 0:A.waitForCheckingApps([...l.usedArgs]))}return{blockingList:a,run(){var r,n,a,{app:i,location:c,query:l,match:u,flags:p,sys:k,ctxStore:Z,data:I,event:A}=t,O=null!==(r=t.overrideApp)&&void 0!==r?r:i;for(var C of b)switch(C){case"ANCHOR":y[C]=c.hash?c.hash.substring(1):null;break;case"APP":y[C]=(0,o.Z)((0,o.Z)({},(0,m.cloneDeep)(O)),{},{getMenu:null==ro||null===(n=ro.menu)||void 0===n?void 0:n.getMenuById});break;case"CTX":y[C]=D({get:(e,t)=>Z.getValue(t),ownKeys:()=>Array.from(f)});break;case"DATA":y[C]=I;break;case"EVENT":y[C]=A;break;case"FLAGS":y[C]=K(p);break;case"FORM_STATE":y[C]=D({get:(e,t)=>S.getValue(t),ownKeys:()=>Array.from(w)});break;case"HASH":y[C]=c.hash;break;case"INSTALLED_APPS":y[C]=K({has:Ke});break;case"ITEM":(0,d.hasOwnProperty)(t,"forEachItem")?y[C]=t.forEachItem:console.error('Using `ITEM` but no `:forEach` is found, check your expression: "'.concat(e,'"'));break;case"LOCAL_STORAGE":y[C]=K({getItem:Se("local")});break;case"MEDIA":y[C]=K(we());break;case"MISC":y[C]=ao().getMiscSettings();break;case"PARAMS":y[C]=new URLSearchParams(l);break;case"PATH":y[C]=K(null!==(a=null==u?void 0:u.params)&&void 0!==a?a:{});break;case"PATH_NAME":y[C]=c.pathname;break;case"PROCESSORS":y[C]=D({get(e,t){var r=x.get(t);if(!r)throw new Error("'PROCESSORS.".concat(t,"' is not registered! Have you installed the relevant brick package?"));return D({get:(e,t)=>r.get(t),ownKeys:()=>Array.from(r.keys())})},ownKeys:()=>Array.from(v)});break;case"QUERY":y[C]=Object.fromEntries(Array.from(l.keys()).map((e=>[e,l.get(e)])));break;case"QUERY_ARRAY":y[C]=Object.fromEntries(Array.from(l.keys()).map((e=>[e,l.getAll(e)])));break;case"SESSION_STORAGE":y[C]=K({getItem:Se("session")});break;case"TPL":if(ke(E,'Using "TPL" in expression','check your expression: "'.concat(e,'"')),E)break;case"STATE":y[C]=D({get:(e,t)=>g.getValue(t),ownKeys:()=>Array.from(h)});break;case"SYS":y[C]=K(null!=k?k:{});break;case"__WIDGET_FN__":y[C]=Pe;break;case"__WIDGET_IMG__":y[C]=N;break;case"__WIDGET_I18N__":y[C]=U}Object.assign(y,oe(s.attemptToVisitGlobals,{storyboardFunctions:le,app:t.app,appendI18nNamespace:t.appendI18nNamespace}));try{return(0,T.cook)(s.expression,s.source,{globalVariables:(0,P.supply)(s.attemptToVisitGlobals,y)})}catch(t){var R="".concat(t.message,', in "').concat(e,'"');throw new(ot(t))(R)}}}}var st=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 ct(e){switch(e){case st.USE_BRICK_PROPERTIES:case st.USE_BRICK_TRANSFORM:case st.USE_BRICK_EVENTS:case st.USE_BRICK_IF:case st.USE_BRICK_LIFECYCLE:case st.USE_BRICK_DATA_SOURCE:return!0}return!1}function lt(e,t,r){if(ct(e))return e;if(t)switch(e){case st.USE_BRICK:return st.USE_BRICK_ITEM;case st.USE_BRICK_SLOTS_ITEM_BRICKS:return st.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM}else switch(e){case st.INITIAL:if("useBrick"===r)return st.USE_BRICK;break;case st.USE_BRICK:case st.USE_BRICK_ITEM:case st.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM:switch(r){case"properties":return st.USE_BRICK_PROPERTIES;case"transform":return st.USE_BRICK_TRANSFORM;case"dataSource":return st.USE_BRICK_DATA_SOURCE;case"events":return st.USE_BRICK_EVENTS;case"slots":return st.USE_BRICK_SLOTS;case"children":return st.USE_BRICK_SLOTS_ITEM_BRICKS;case"if":return st.USE_BRICK_IF;case"lifeCycle":return st.USE_BRICK_LIFECYCLE}break;case st.USE_BRICK_SLOTS:return st.USE_BRICK_SLOTS_ITEM;case st.USE_BRICK_SLOTS_ITEM:if("bricks"===r)return st.USE_BRICK_SLOTS_ITEM_BRICKS}return st.INITIAL}var ut=new WeakSet;function dt(e){if((0,d.isObject)(e)&&!pt(e))if(ut.add(e),Array.isArray(e))e.forEach(dt);else{var t=Object.getPrototypeOf(e);t&&t.constructor!==Object||Object.values(e).forEach(dt)}}function pt(e){return ut.has(e)}function ft(e,t){return vt.apply(this,arguments)}function vt(){return vt=(0,a.Z)((function*(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=et(e);if(n||"string"==typeof e){var o,a=r.$$lazyForUseBrick&&ct(r.$$stateOfUseBrick),i=a;return n||(0,T.isEvaluable)(e)?(o=yield function(e,t,r){return at.apply(this,arguments)}(e,t,{lazy:a}),i=rt(e)):o=a?e:((0,d.hasOwnProperty)(t,"data")?r.noInject?C.transform:C.transformAndInject:r.noInject?gt:C.inject)(e,t),i||dt(o),o}if(!(0,d.isObject)(e)||pt(e))return e;if(Array.isArray(e)){var s=mt(r,!0);return Promise.all(e.map((e=>ft(e,t,s))))}return Object.fromEntries((yield Promise.all(Object.entries(e).map((e=>{var[n,o]=e;return Promise.all([ft(n,t),ft(o,t,mt(r,!1,n))])})))).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))})),vt.apply(this,arguments)}function ht(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=et(e);if(n||"string"==typeof e){var o,a=r.$$lazyForUseBrick&&ct(r.$$stateOfUseBrick),i=a;return n||(0,T.isEvaluable)(e)?(o=function(e,t,r){var{run:n}=it(e,t,void 0,!1);return n()}(e,t),i=rt(e)):o=a?e:((0,d.hasOwnProperty)(t,"data")?r.noInject?C.transform:C.transformAndInject:r.noInject?gt:C.inject)(e,t),i||dt(o),o}if(!(0,d.isObject)(e)||pt(e))return e;if(Array.isArray(e)){var s=mt(r,!0);return e.map((e=>ht(e,t,s)))}return Object.fromEntries(Object.entries(e).map((e=>{var[n,o]=e;return[ht(n,t),ht(o,t,mt(r,!1,n))]})).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function mt(e,t,r){return e.$$lazyForUseBrick?(0,o.Z)((0,o.Z)({},e),{},{$$stateOfUseBrick:lt(e.$$stateOfUseBrick,t,r)}):e}function gt(e){return e}function yt(e,t){return bt.apply(this,arguments)}function bt(){return(bt=(0,a.Z)((function*(e,t){return!(0,d.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||et(e.if)?yield ft(e.if,t):e.if)}))).apply(this,arguments)}function wt(e,t){return!(0,d.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||et(e.if)?ht(e.if,t):e.if)}function St(e){return!(0,d.hasOwnProperty)(e,"if")||!!e.if}function Et(){return(Et=(0,a.Z)((function*(e,t){return(0,d.isObject)(e.if)&&!et(e.if)?St(yield Ge(e.if,t)):yt(e,t)}))).apply(this,arguments)}function kt(e,t){return wt(e,{data:t})}function Zt(e){var t=!1,r=!1,n=!1;if("string"==typeof e?(0,T.isEvaluable)(e):et(e)){var o="string"==typeof e?e:tt(e);if((0,T.isTrackAll)(o)){var a=(0,R.trackAll)(o);a&&(t=a.context,r=a.state,n=a.formState)}else t=(0,R.track)(o,"track context","CTX"),r=(0,R.track)(o,"track state","STATE"),n=(0,R.track)(o,"track formstate","FORM_STATE")}return{contextNames:t,stateNames:r,formStateNames:n}}function It(){return It=(0,a.Z)((function*(e,t,r){return(0,d.isObject)(e)?Object.fromEntries((yield Promise.all(Object.entries(e).map(function(){var e=(0,a.Z)((function*(e){var[n,o]=e;if(Array.isArray(r)){var{contextNames:a,stateNames:i,formStateNames:s}=Zt(o);(a||i||s)&&r.push({contextNames:a,stateNames:i,formStateNames:s,propName:n,propValue:o})}var c=yield ft(o,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?st.USE_BRICK:st.INITIAL});if("style"!==n&&"dataset"!==n||(0,d.isObject)(c))return[n,c]}));return function(t){return e.apply(this,arguments)}}()))).filter(Boolean)):{}})),It.apply(this,arguments)}function At(e,t){if(t)for(var[r,n]of Object.entries(t))switch(r){case"style":case"dataset":for(var[o,a]of Object.entries(n))e[r][o]=a;break;case"constructor":case"__proto__":case"innerHTML":throw new Error("set `".concat(r,"` is prohibited"));default:e[r]=n}}function Ot(e,t,r){var n=function(e,t,r){return(0,d.isObject)(e)?Object.fromEntries(Object.entries(e).map((e=>{var[n,o]=e;if(Array.isArray(r)){var{contextNames:a,stateNames:i,formStateNames:s}=Zt(o);(a||i||s)&&r.push({contextNames:a,stateNames:i,formStateNames:s,propName:n,propValue:o})}var c=ht(o,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?st.USE_BRICK:st.INITIAL});if("style"!==n&&"dataset"!==n||(0,d.isObject)(c))return[n,c]})).filter(Boolean)):{}}(t,r);Array.isArray(e)||(e=[e]),e.forEach((e=>{At(e,n)}))}function Tt(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Ct(e){return e&&e.sensitive?"":"i"}function Pt(e,t,r){return function(e,t,r){void 0===r&&(r={});for(var n=r.strict,o=void 0!==n&&n,a=r.start,i=void 0===a||a,s=r.end,c=void 0===s||s,l=r.encode,u=void 0===l?function(e){return e}:l,d=r.delimiter,p=void 0===d?"/#?":d,f=r.endsWith,v="[".concat(Tt(void 0===f?"":f),"]|$"),h="[".concat(Tt(p),"]"),m=i?"^":"",g=0,y=e;g<y.length;g++){var b=y[g];if("string"==typeof b)m+=Tt(u(b));else{var w=Tt(u(b.prefix)),S=Tt(u(b.suffix));if(b.pattern)if(t&&t.push(b),w||S)if("+"===b.modifier||"*"===b.modifier){var E="*"===b.modifier?"?":"";m+="(?:".concat(w,"((?:").concat(b.pattern,")(?:").concat(S).concat(w,"(?:").concat(b.pattern,"))*)").concat(S,")").concat(E)}else m+="(?:".concat(w,"(").concat(b.pattern,")").concat(S,")").concat(b.modifier);else"+"===b.modifier||"*"===b.modifier?m+="((?:".concat(b.pattern,")").concat(b.modifier,")"):m+="(".concat(b.pattern,")").concat(b.modifier);else m+="(?:".concat(w).concat(S,")").concat(b.modifier)}}if(c)o||(m+="".concat(h,"?")),m+=r.endsWith?"(?=".concat(v,")"):"$";else{var k=e[e.length-1],Z="string"==typeof k?h.indexOf(k[k.length-1])>-1:void 0===k;o||(m+="(?:".concat(h,"(?=").concat(v,"))?")),Z||(m+="(?=".concat(h,"|").concat(v,")"))}return new RegExp(m,Ct(r))}(function(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:r,value:e[r++]});else{var o=1,a="";if("?"===e[s=r+1])throw new TypeError('Pattern cannot start with "?" at '.concat(s));for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--o){s++;break}}else if("("===e[s]&&(o++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at ".concat(s));a+=e[s++]}else a+=e[s++]+e[s++];if(o)throw new TypeError("Unbalanced pattern at ".concat(r));if(!a)throw new TypeError("Missing pattern at ".concat(r));t.push({type:"PATTERN",index:r,value:a}),r=s}else{for(var i="",s=r+1;s<e.length;){var c=e.charCodeAt(s);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;i+=e[s++]}if(!i)throw new TypeError("Missing parameter name at ".concat(r));t.push({type:"NAME",index:r,value:i}),r=s}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,o=void 0===n?"./":n,a="[^".concat(Tt(t.delimiter||"/#?"),"]+?"),i=[],s=0,c=0,l="",u=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},d=function(e){var t=u(e);if(void 0!==t)return t;var n=r[c],o=n.type,a=n.index;throw new TypeError("Unexpected ".concat(o," at ").concat(a,", expected ").concat(e))},p=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t};c<r.length;){var f=u("CHAR"),v=u("NAME"),h=u("PATTERN");if(v||h){var m=f||"";-1===o.indexOf(m)&&(l+=m,m=""),l&&(i.push(l),l=""),i.push({name:v||s++,prefix:m,suffix:"",pattern:h||a,modifier:u("MODIFIER")||""})}else{var g=f||u("ESCAPED_CHAR");if(g)l+=g;else if(l&&(i.push(l),l=""),u("OPEN")){m=p();var y=u("NAME")||"",b=u("PATTERN")||"",w=p();d("CLOSE"),i.push({name:y||(b?s++:""),pattern:y&&!b?a:b,prefix:m,suffix:w,modifier:u("MODIFIER")||""})}else d("END")}}return i}(e,r),t,r)}function Rt(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,o=r.exec(e.source);o;)t.push({name:o[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),o=r.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,r){var n=e.map((function(e){return Rt(e,t,r).source}));return new RegExp("(?:".concat(n.join("|"),")"),Ct(r))}(e,t,r):Pt(e,t,r)}var _t=new Map,xt=1e4,Mt=0;function Bt(e,t){var{path:r,exact:n=!1,strict:o=!1,sensitive:a=!0}=t;return(Array.isArray(r)?r:[r]).reduce(((t,r)=>{if(t)return t;var{regexp:i,keys:s}=function(e,t){var r="".concat(t.end).concat(t.strict).concat(t.sensitive),n=_t.get(r);n||_t.set(r,n=new Map);var o=n.get(e);if(o)return o;var a=[],i={regexp:Rt(e,a,t),keys:a};return Mt<xt&&(n.set(e,i),Mt++),i}(r,{end:n,strict:o,sensitive:a}),c=i.exec(e);if(!c)return null;var[l,...u]=c,d=e===l;return n&&!d?null:{path:r,url:"/"===r&&""===l?"/":l,isExact:d,params:s.reduce(((e,t,r)=>(e[t.name]=u[r],e)),{})}}),null)}function Lt(){return(Lt=(0,a.Z)((function*(e,t){for(var r of e){if("string"!=typeof r.path)throw console.error("Invalid route with invalid path:",r),new Error("Invalid route with invalid type of path: ".concat(typeof r.path));var n=r.path.replace(/^\$\{APP.homepage\}/,t.app.homepage),o=Bt(t.location.pathname,{path:n,exact:r.exact});if(o&&(yield yt(r,t)))return t.app.noAuthGuard||r.public||null==ro||!ro.auth||ro.auth.isLoggedIn()?{match:o,route:r}:"unauthenticated"}return"missed"}))).apply(this,arguments)}var Ut,Nt=Symbol.for("tpl.asyncComputedPropsFromHost"),Ft=Symbol.for("tpl.stateStoreId"),jt=Symbol.for("tpl.externalForEachItem"),$t=r(6666),Kt=new Set,Dt=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}({}),Wt={[Dt.REQUEST_FAILED]:"Request Failed",[Dt.SOMETHING_WENT_WRONG]:"Something went wrong!",[Dt.LOGIN_TIMEOUT_MESSAGE]:"You haven't logged in or your login session has expired. Login right now?",[Dt.NETWORK_ERROR]:"Network error, please check your network."},Vt={[Dt.REQUEST_FAILED]:"请求失败",[Dt.SOMETHING_WENT_WRONG]:"出现了一些问题!",[Dt.LOGIN_TIMEOUT_MESSAGE]:"您还未登录或登录信息已过期,现在重新登录?",[Dt.NETWORK_ERROR]:"网络错误,请检查您的网络连接。"},Ht="core/runtime",zt={en:Wt,zh:Vt},Gt=Object.freeze({show:function(e){return Ut?Ut.resolve(e):"confirm"===e.type?confirm(e.content)?new Promise((e=>setTimeout((()=>{e()}),1))):new Promise(((e,t)=>setTimeout((()=>{t()}),1))):(alert(e.content),new Promise((e=>setTimeout((()=>{e()}),1e3))))}});function qt(e){if(e instanceof Event&&e.target instanceof HTMLScriptElement)return e.target.src;if(e instanceof O.HttpFetchError)return l.i18n.t("".concat(Ht,":").concat(Dt.NETWORK_ERROR));if(e instanceof O.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 Qt(e){return e instanceof O.HttpResponseError&&401===e.response.status&&!!e.responseJson&&100003===e.responseJson.code}var Jt,Yt,Xt=!1;function er(e){if(!(e instanceof O.HttpAbortError)){if(Qt(e)&&!window.NO_AUTH_GUARD){if(Xt)return;return Xt=!0,void Gt.show({type:"confirm",content:l.i18n.t("".concat(Ht,":").concat(Dt.LOGIN_TIMEOUT_MESSAGE))}).then((()=>{var e,t;e=ao().getFeatureFlags()["sso-enabled"],(t=Z()).push(e?"/sso-auth/login":"/auth/login",{from:(0,o.Z)((0,o.Z)({},t.location),{},{state:void 0})}),Xt=!1}),(()=>{Xt=!1}))}console.error(e);var t=qt(e);t!==Jt&&(Jt=t,Gt.show({type:"error",title:l.i18n.t("".concat(Ht,":").concat(Dt.REQUEST_FAILED)),content:t,contentStyle:{whiteSpace:"pre-wrap"}}).then((()=>{Jt=void 0})))}}var tr=Object.freeze({show:function(e){Yt?Yt.resolve(e):alert(e.message)}});function rr(e,t,r){t&&Object.entries(t).forEach((t=>{var[n,o]=t,a=sr(o,r,{element:e});for(var i of(e.addEventListener(n,a),e.$$listeners||(e.$$listeners=[]),e.$$listeners.push([n,a]),e.$$eventListeners||(e.$$eventListeners=[]),[].concat(o)))e.$$eventListeners.push([n,null,i])}))}function nr(e){return"string"==typeof e.action}function or(e){return"string"==typeof e.useProvider}function ar(e){return!(!e.target&&!e.targetRef||!e.method&&!e.properties)}function ir(e){return!!e.then}function sr(e,t,r){return function(n){var a,i;for(var s of[].concat(e))if(wt(s,(0,o.Z)((0,o.Z)({},t),{},{event:n})))if(ir(s))sr(s.then,t,r)(n);else if(nr(s)){var[c,l]=s.action.split(".");switch(s.action){case"history.push":case"history.replace":case"history.pushQuery":case"history.replaceQuery":case"history.pushAnchor":case"history.block":case"history.goBack":case"history.goForward":case"history.reload":case"history.unblock":fr(n,l,s.args,s.callback,t);break;case"window.open":vr(n,s.args,t);break;case"location.reload":case"location.assign":br(n,l,s.args,t);break;case"localStorage.setItem":case"localStorage.removeItem":case"sessionStorage.setItem":case"sessionStorage.removeItem":wr(n,c,l,s.args,t);break;case"event.preventDefault":n.preventDefault();break;case"console.log":case"console.error":case"console.warn":case"console.info":Sr(n,l,s.args,t);break;case"message.success":case"message.error":case"message.info":case"message.warn":Er(n,l,s.args,t);break;case"handleHttpError":er(n.detail);break;case"context.assign":case"context.replace":case"context.refresh":case"context.load":mr(n,l,s.args,null===(a=s.batch)||void 0===a||a,s.callback,t);break;case"state.update":case"state.refresh":case"state.load":gr(n,l,s.args,null===(i=s.batch)||void 0===i||i,s.callback,t);break;case"tpl.dispatchEvent":var[u,d]=Zr(s.args,t,n);Te(t,s.action,": ".concat(u)).dispatchEvent(new CustomEvent(u,d));break;case"formstate.update":yr(n,s.args,s.callback,t);break;case"theme.setDarkTheme":case"theme.setLightTheme":Q("theme.setDarkTheme"===s.action?"dark":"light");break;case"theme.setTheme":var[p]=Zr(s.args,t,n);Q(p);break;case"mode.setDashboardMode":case"mode.setDefaultMode":re("mode.setDashboardMode"===s.action?"dashboard":"default");break;default:console.error("unknown event listener action:",s.action)}}else or(s)?cr(n,s,t,r):ar(s)?ur(n,s,t,r):console.error("unknown event handler:",s);else s.else&&sr(s.else,t,r)(n)}}function cr(e,t,r,n){return lr.apply(this,arguments)}function lr(){return(lr=(0,a.Z)((function*(e,t,r,n){try{dr(e,yield Ve(t.useProvider),t,"saveAs"!==t.method?"resolve":"saveAs",r,n)}catch(e){console.error(qt(e))}}))).apply(this,arguments)}function ur(e,t,r,n){var a=[],i=t.target,s=t.targetRef,c=i;if(("string"==typeof i?(0,T.isEvaluable)(i):et(i))&&(c=ht(i,(0,o.Z)((0,o.Z)({},r),{},{event:e}))),"string"==typeof c)if("_self"===c)a.push(n.element);else if(t.multiple)a=Array.from(document.querySelectorAll(c));else{var l=document.querySelector(c);null!==l&&a.push(l)}else if(c)c instanceof HTMLElement?a.push(c):console.error("unexpected target:",c);else if(s){var u=s;("string"==typeof s?(0,T.isEvaluable)(s):et(s))&&(u=ht(s,(0,o.Z)((0,o.Z)({},r),{},{event:e})));var d=[].concat(u),p=Te(r,"targetRef",": ".concat(d.join(", ")));a.push(...d.map((e=>{var t;return null===(t=p.$$getElementByRef)||void 0===t?void 0:t.call(p,e)})).filter(Boolean))}0!==a.length?function(e){return!!e.method}(t)?a.forEach((o=>{dr(e,o,t,t.method,r,n,{useEventAsDefault:!0})})):function(e){return!!e.properties}(t)&&Ot(a,t.properties,(0,o.Z)((0,o.Z)({},r),{},{event:e})):console.error("target not found:",i||s)}function dr(e,t,r,n,o,a,i){return pr.apply(this,arguments)}function pr(){return pr=(0,a.Z)((function*(e,t,r,n,i,s,c){var l;if("function"==typeof t[n]){var u=function(){var o=(0,a.Z)((function*(){var o,a=Zr(r.args,i,e,c);return or(r)&&null!=ro&&null!==(o=ro.flowApi)&&void 0!==o&&o.isFlowApiProvider(r.useProvider)&&(a=yield ro.flowApi.getArgsOfFlowApi(r.useProvider,a,n)),t[n](...a)}));return function(){return o.apply(this,arguments)}}();if(r.callback){var d,p=kr(r.callback,i,s),f={progress:p("progress"),success:p("success"),error:p("error"),finally:p("finally")};if(or(r)&&(d=ht(r.poll,(0,o.Z)((0,o.Z)({},i),{},{event:e}))),null!==(l=d)&&void 0!==l&&l.enabled)!function(e,t,r){var n,{progress:o,success:i,error:s,finally:c}=t,{interval:l,leadingRequestDelay:u,continueOnError:d,delegateLoadingBar:p,expectPollEnd:f,expectPollStopImmediately:v}=r,h=uo();function m(){return g.apply(this,arguments)}function g(){return(g=(0,a.Z)((function*(){var t;Kt.delete(n);try{if(!(t=null==v?void 0:v())){var r=yield e();(t=(null==v?void 0:v())||h!==uo())||(null==o||o(r),null!=f&&f(r)?(p&&window.dispatchEvent(new Event("request.end")),null==i||i(r),null==c||c()):y(null!=l?l:3e3))}}catch(e){(t=(null==v?void 0:v())||h!==uo())||(null==s||s(e),d?y(null!=l?l:3e3):null==c||c())}finally{p&&t&&window.dispatchEvent(new Event("request.end"))}}))).apply(this,arguments)}function y(e){n=setTimeout(m,e),Kt.add(n)}y(null!=u?u:0),p&&window.dispatchEvent(new Event("request.start"))}(u,f,d);else try{var v=yield u();f.success(v)}catch(e){f.error(e)}finally{f.finally()}}else u()}else console.error("target has no method:",{target:t,method:n})})),pr.apply(this,arguments)}function fr(e,t,r,n,o){var a=0,i=!1,s=t;switch(t){case"push":case"replace":case"pushQuery":case"replaceQuery":case"pushAnchor":a=2,i=!0;break;case"reload":i=!0;break;case"block":a=1,s="setBlockMessage"}var c=[];if(a>0&&((c=Zr(r,o,e,{useEventDetailAsDefault:!0})).length=a),i&&n){var l=kr(n,o,void 0);c.push((e=>{l(e?"error":"success")({blocked:e}),l("finally")({blocked:e})}))}Z()[s](...c)}function vr(e,t,r){var[n,o,a]=Zr(t,r,e);window.open(n,o||"_self",a)}function hr(e,t,r,n,o,a){t?n.updateValues(e,r,(e=>Zr(e,o,a)[0])):e.forEach((e=>{var{name:t,value:i}=Zr([e],o,a)[0];n.updateValue(t,i,r)}))}function mr(e,t,r,n,o,a){if(!Array.isArray(r)||!r.every(d.isObject)||"assign"!==t&&"replace"!==t){var[i,s]=Zr(r,a,e);a.ctxStore.updateValue(i,s,t,o,a)}else hr(r,n,t,a.ctxStore,a,e)}function gr(e,t,r,n,o,a){if(Array.isArray(r)&&r.every(d.isObject)&&"update"===t)hr(r,n,"replace",a.ctxStore,a,e);else{var[i,s]=Zr(r,a,e);Oe(a,"state.".concat(t),": ".concat(i)).updateValue(i,s,"update"===t?"replace":t,o,a)}}function yr(e,t,r,n){var[o,a]=Zr(t,n,e);De(n,"formstate.update",": ".concat(o)).updateValue(o,a,"replace",r,n)}function br(e,t,r,n){if("assign"===t){var[o]=Zr(r,n,e);location.assign(o)}else location[t]()}function wr(e,t,r,n,o){var a="localStorage"===t?localStorage:sessionStorage,[i,s]=Zr(n,o,e);"setItem"===r?void 0!==s&&a.setItem(i,JSON.stringify(s)):a.removeItem(i)}function Sr(e,t,r,n){console[t](...Zr(r,n,e,{useEventAsDefault:!0}))}function Er(e,t,r,n){var o=Zr(r,n,e,{useEventAsDefault:!0});tr.show({type:t,message:o[0]})}function kr(e,t,r){return function(n){return function(o){var a=null==e?void 0:e[n];if(a)try{var i=new CustomEvent("callback.".concat(n),{detail:o});sr(a,t,r)(i)}catch(e){console.error(e)}else"error"===n&&console.error("Unhandled callback error:",o)}}}function Zr(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Array.isArray(e)?ht(e,(0,o.Z)((0,o.Z)({},t),{},{event:r})):n.useEventAsDefault?[r]:n.useEventDetailAsDefault?[r.detail]:[]}class Ir{constructor(e,t){(0,$t.Z)(this,"type",void 0),(0,$t.Z)(this,"data",new Map),(0,$t.Z)(this,"changeEventType",void 0),(0,$t.Z)(this,"pendingStack",[]),(0,$t.Z)(this,"hostBrick",void 0),(0,$t.Z)(this,"batchUpdate",!1),(0,$t.Z)(this,"batchUpdateContextsNames",[]),this.type=e,this.changeEventType="FORM_STATE"===this.type?"formstate.change":"STATE"===this.type?"state.change":"context.change",this.hostBrick=t}getValue(e){var t;return null===(t=this.data.get(e))||void 0===t?void 0:t.value}getAffectListByContext(e){var t=[e];return this.data.forEach(((e,r)=>{e.deps&&e.deps.some((e=>t.includes(e)))&&t.push(r)&&t.push(...this.getAffectListByContext(r))})),t.shift(),[...new Set(t)]}updateValues(e,t,r){if(this.batchUpdate=!0,this.batchUpdateContextsNames=e.map((e=>e.name)),[...new Set(this.batchUpdateContextsNames)].length!==this.batchUpdateContextsNames.length)throw new Error("Batch update not allow to update same item");var n={},o={},a=[];e.forEach((e=>{var{name:o,value:i}=r([e]),s=this.data.get(o);a.push(...this.getAffectListByContext(o)),s&&(n[o]=s),this.updateValue(o,i,t)})),a.filter((e=>!n[e])).forEach((e=>{var t=this.data.get(e);t&&(o[e]=t)}));var i=e=>{for(var t in e){var r,n=e[t];null===(r=n.eventTarget)||void 0===r||r.dispatchEvent(new CustomEvent(this.changeEventType,{detail:n.value}))}};i(n),i(o),this.batchUpdate=!1}updateValue(e,t,r,n,a){var i=this.data.get(e);if(!i)throw new Error("".concat(this.type," '").concat(e,"' is not defined"));if("refresh"!==r&&"load"!==r)"replace"===r?i.value=t:(0,d.isObject)(i.value)?Object.assign(i.value,t):(console.warn('Non-object current value of "'.concat(this.type,".").concat(e,'" for "context.assign", try "context.replace" instead.')),i.value=t),this.batchUpdate||i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}));else{if(!i.load)throw new Error("You can not ".concat(r,' "').concat(this.type,".").concat(e,'" which has no resolve'));var s;if("load"===r&&(i.loaded?s=Promise.resolve(i.value):i.loading&&(s=i.loading)),s||(s=i.loading=i.load((0,o.Z)({cache:"load"===r?"default":"reload"},t))).then((e=>{i.loaded=!0,i.value=e,i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}))}),(e=>{null!=n&&n.error||er(e)})),n){var c=kr(n,a);s.then((e=>{c("success")({value:e}),c("finally")()}),(e=>{c("error")(e),c("finally")()}))}}}define(e,t,r){if(Array.isArray(e)&&e.length>0){var n=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"CTX",n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CTX",r=new Map;for(var n of e){var o=(0,R.collectMemberUsage)([n.if,n.value,n.resolve],t);r.set(n,o)}return r}(e,r),o=new Map;for(var i of Array.from(n.keys()).map((e=>e.name))){var s;o.set(i,(null!==(s=o.get(i))&&void 0!==s?s:0)+1)}var c=Array.from(n.values()).some((e=>e.hasNonStaticUsage)),l=new WeakSet,u=new Map,d=new Map([...new Set(e.map((e=>e.name)))].map((e=>[e,new Promise(((t,r)=>{u.set(e,{resolve:t,reject:r})}))]))),p=function(){var e=(0,a.Z)((function*(e){var r;l.add(e);var a=yield t(e);n.delete(e);var i=null!==(r=o.get(e.name))&&void 0!==r?r:0;if(a){if(u.get(e.name).resolve(),o.delete(e.name),0===i)throw new Error("Duplicated context defined: ".concat(e.name))}else 1===i?(u.get(e.name).resolve(),o.delete(e.name)):o.set(e.name,i-1);yield v()}));return function(t){return e.apply(this,arguments)}}(),f=c;function v(){return h.apply(this,arguments)}function h(){return h=(0,a.Z)((function*(){var e=Array.from(n.entries()).filter(function(e,t){return(r,n)=>t?0===n:![...r[1].usedProperties].some((t=>e.has(t)))}(o,f)).map((e=>e[0])).filter((e=>!l.has(e)));yield Promise.all(e.map(p))})),h.apply(this,arguments)}return{pendingResult:v().then((0,a.Z)((function*(){for(var e of(n.size>0&&(function(e,t){var r=new Map(e),n=new Set(Array.from(r.keys()).map((e=>e.name))),o=()=>{var e=!1;for(var[t,a]of r.entries())[...a.usedProperties].some((e=>n.has(e)))||(r.delete(t),n.delete(t.name),e=!0);e&&o()};if(o(),r.size>0)throw new ReferenceError("Circular ".concat(t," detected: ").concat(Array.from(r.keys()).map((e=>e.name)).join(", ")))}(n,r),f=!0,yield v()),u.values()))e.resolve()}))).catch((e=>{for(var t of u.values())t.reject(e);throw e})),pendingContexts:d}}(e,(e=>this.resolve(e,t,r)),this.type);this.pendingStack.push(n)}}onChange(e,t){var r;null===(r=this.data.get(e))||void 0===r||r.eventTarget.addEventListener(this.changeEventType,t)}waitFor(e){var t=this;return(0,a.Z)((function*(){var r=function*(t){yield Promise.all([...e].map((e=>t.get(e))))};for(var{pendingContexts:n}of t.pendingStack)yield*r(n)}))()}waitForAll(){var e=this;return(0,a.Z)((function*(){for(var{pendingResult:t}of e.pendingStack)yield t}))()}resolve(e,t,r){var n=this;return(0,a.Z)((function*(){if(!(yield yt(e,t)))return!1;var i,s;if(r&&("STATE"===n.type?e.expose:"FORM_STATE"===n.type)){var c=yield r;(0,d.hasOwnProperty)(c,e.name)&&(i=c[e.name])}var l=!1;if(void 0===i){if(e.resolve){var u=(0,o.Z)({transform:"value"},e.resolve);if(yield yt(e.resolve,t))s=function(){var e=(0,a.Z)((function*(e){return(yield Ge(u,t,e)).value}));return function(t){return e.apply(this,arguments)}}(),(l=e.resolve.lazy)||(i=yield s());else if(!(0,d.hasOwnProperty)(e,"value"))return!1}s&&!l||void 0===e.value||(i=yield ft(e.value,t))}var p={value:i,eventTarget:new EventTarget,load:s,loaded:!l,deps:[]};if(e.onChange&&p.eventTarget.addEventListener(n.changeEventType,sr(e.onChange,t)),e.track){var f=(0,R.strictCollectMemberUsage)(s?e.resolve:e.value,n.type);for(var v of(!s&&(p.deps=[...f]),f))n.onChange(v,n.batchAddListener((()=>{s?n.updateValue(e.name,{cache:"default"},"refresh"):n.updateValue(e.name,ht(e.value,t),"replace")}),e))}if(n.data.has(e.name))throw new Error("".concat(n.type," '").concat(e.name,"' has already been declared"));return n.data.set(e.name,p),!0}))()}batchAddListener(e,t){return r=>{this.batchUpdate&&this.batchUpdateContextsNames.includes(t.name)||e(r)}}}function Ar(e,t,r){var n,{reversedProxies:o,asyncHostProperties:a,externalSlots:i,tplStateStoreId:s,hostBrick:c}=e;if(t&&o){var l=o.properties.get(t);l&&(n=a.then((e=>{var t={};for(var{from:r,to:n}of l){var o=e[r];void 0!==o&&n.refProperty&&(t[n.refProperty]=o)}return t})));var u=o.slots.get(t);if(u&&i){var p=new Map;for(var{from:f,to:v}of u){var h,g,y,b,w=null!==(h=null===(g=i[f])||void 0===g?void 0:g.bricks)&&void 0!==h?h:[];if(w.length){var S=null!==(y=v.refSlot)&&void 0!==y?y:f,E=p.get(S);if(!E){E=[];for(var k=(0,d.hasOwnProperty)(r,S)?r[S].bricks.length+1:1,Z=0;Z<k;Z+=1)E.push([]);p.set(S,E)}var I=null!==(b=v.refPosition)&&void 0!==b?b:-1;E[(0,m.clamp)(I<0?E.length+I:I,0,E.length-1)].push(...(0,d.hasOwnProperty)(c.runtimeContext,"forEachItem")?Or(w,c.runtimeContext.forEachItem):w)}}var A=function(){(0,d.hasOwnProperty)(r,O)||(r[O]={type:"bricks",bricks:[]});var e=r[O];e.bricks=T.flatMap(((t,r)=>r<e.bricks.length?t.concat(e.bricks[r]):t)),0===e.bricks.length&&delete r[O]};for(var[O,T]of p.entries())A()}}return{[Nt]:n,[Ft]:s}}function Or(e,t){return e.map((e=>{var r;return(0,o.Z)((0,o.Z)({},e),{},{[jt]:t,slots:Object.fromEntries(Object.entries(null!==(r=e.slots)&&void 0!==r?r:{}).map((e=>{var r,[n,o]=e;return[n,"routes"===o.type?{type:"routes",routes:Tr(o.routes,t)}:{type:"bricks",bricks:Or(null!==(r=o.bricks)&&void 0!==r?r:[],t)}]})))})}))}function Tr(e,t){return e.map((e=>e.type&&"bricks"!==e.type?e:(0,o.Z)((0,o.Z)({},e),{},{bricks:Or(e.bricks,t)})))}var Cr=["properties","slots","children"];function Pr(e,t){function r(e){return(0,d.isObject)(e)?Array.isArray(e)?e.map(r):Object.fromEntries(Object.entries(e).map((e=>{var[t,o]=e;return(0,d.isObject)(o)&&"useBrick"===t?Array.isArray(o)?[t,o.map(n)]:[t,n(o)]:[t,r(o)]})).concat(Object.getOwnPropertySymbols(e).map((t=>[t,e[t]])))):e}function n(e){var{properties:a,slots:i,children:s}=e,c=(0,h.Z)(e,Cr),l=Yr(s,i),u=Object.fromEntries(Object.entries(null!=l?l:{}).map((e=>{var t,[r,o]=e;return[r,{type:"bricks",bricks:(null!==(t=o.bricks)&&void 0!==t?t:[]).map(n)}]})));return(0,o.Z)((0,o.Z)({},c),{},{properties:r(a),slots:u},Ar(t,c.ref,u))}return r(e)}var Rr=["slots","children"],_r=["properties","slots","children"];function xr(e,t,r,n){var a,i=(0,m.uniqueId)("tpl-state-"),s=(0,o.Z)((0,o.Z)({},r.runtimeContext),{},{tplStateStoreId:i});delete s.forEachItem,delete s.formStateStoreId;var c=new Ir("STATE",r);s.tplStateStoreMap.set(i,c),s.tplStateStoreScope&&s.tplStateStoreScope.push(c);var{bricks:l,proxy:u,state:d,contracts:p}=Ae.get(e);null==ro||null===(a=ro.flowApi)||void 0===a||a.collectWidgetContract(p),c.define(d,s,n);var{slots:f,children:v}=t,g=(0,h.Z)(t,Rr),y=(0,o.Z)((0,o.Z)({},g),{},{brick:e});r.tplHostMetadata={internalBricksByRef:new Map,tplStateStoreId:i,proxy:u};var b={properties:new Map,slots:new Map};if(null!=u&&u.properties)for(var[w,S]of Object.entries(u.properties)){var E=b.properties.get(S.ref);E||(E=[],b.properties.set(S.ref,E)),E.push({from:w,to:S})}if(null!=u&&u.slots)for(var[k,Z]of Object.entries(u.slots)){var I=b.slots.get(Z.ref);I||(I=[],b.slots.set(Z.ref,I)),I.push({from:k,to:Z})}var A={reversedProxies:b,asyncHostProperties:n,externalSlots:Yr(v,f),tplStateStoreId:i,hostBrick:r};return y.slots={"":{type:"bricks",bricks:l.map((e=>Mr(e,A)))}},y}function Mr(e,t){null===e.if&&delete e.if;var{properties:r,slots:n,children:a}=e,i=(0,h.Z)(e,_r),s=Yr(a,n),c=Object.fromEntries(Object.entries(null!=s?s:{}).map((e=>{var r,[n,o]=e;return[n,{type:"bricks",bricks:(null!==(r=o.bricks)&&void 0!==r?r:[]).map((e=>Mr(e,t)))}]})));return(0,o.Z)((0,o.Z)({},i),{},{properties:Pr(r,t),slots:c},Ar(t,i.ref,c))}var Br=function(e){return e[e.ROOT=1]="ROOT",e[e.BRICK=2]="BRICK",e}({}),Lr="form-renderer.form-renderer",Ur=Symbol.for("form.stateStoreId");function Nr(e,t,r){var{id:n,bricks:a,events:i,context:s,mountPoint:c,instanceId:l}=e,{brick:u,properties:p}=e,f=t.find((e=>e.fieldId===n));if(f){var v=function(e){var t,r={id:e.fieldId,name:e.fieldId,label:e.name,dataset:{testid:e.fieldId}},n=()=>{var t,r;return{readOnly:null===(t=e.limit)||void 0===t?void 0:t.includes("READONLY"),required:null===(r=e.limit)||void 0===r?void 0:r.includes("REQUIRED")}};switch(e.fieldType){case"INT":t={brick:"forms.general-input-number",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{placeholder:e.description,precision:0,inputBoxStyle:{width:"100%"}})};break;case"BOOLEAN":t={brick:"forms.general-switch",properties:(0,o.Z)((0,o.Z)({},r),n())};break;case"FLOAT":t={brick:"forms.general-input-number",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"ENUM":t={brick:"forms.general-select",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"ENUMS":t={brick:"forms.general-select",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{mode:"multiple",options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"DATE":case"TIME":t={brick:"forms.general-date-picker",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{placeholder:e.description})};break;case"IP":t={brick:"forms.general-input",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{placeholder:e.description,pattern:"((^s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))s*$)|(^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*$))",message:{pattern:"输入字符不匹配IP格式"}})};break;case"JSON":t={brick:"forms.general-textarea",properties:(0,o.Z)({},r)};break;case"ARRAY":t={brick:"forms.general-select",properties:(0,o.Z)({},r)};break;case"STRUCTURE":case"STRUCTURE_ARRAY":t={brick:"forms.cmdb-instance-select-panel",properties:(0,o.Z)((0,o.Z)({},r),n())};break;default:t={brick:"forms.general-input",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{placeholder:e.description})}}return t}(f);u||(u=v.brick),p=(0,o.Z)((0,o.Z)({},v.properties),p)}var h={brick:u,properties:p,iid:l,slot:c,events:i,context:s,children:Fr(a,t,r),[Ur]:r};return(0,d.hasOwnProperty)(e,"if")&&(h.if=e.if),h}function Fr(e,t,r){if(Array.isArray(e))return e.map((e=>Nr(e,t,r)))}var jr=["blockingList","node","menuRequests","hasTrackingControls"],$r=["if","permissionsPreCheck"],Kr=["formData"];function Dr(e,t,r,n,o){return Wr.apply(this,arguments)}function Wr(){return Wr=(0,a.Z)((function*(e,t,r,n,a){var i=yield function(e,t){return Lt.apply(this,arguments)}(t,r),s={blockingList:[],menuRequests:[]};switch(i){case"missed":break;case"unauthenticated":s.unauthenticated=!0;break;default:var c,l=s.route=i.route,d=(0,o.Z)((0,o.Z)({},r),{},{match:i.match});d.ctxStore.define(l.context,d),d.pendingPermissionsPreCheck.push(null==ro||null===(c=ro.checkPermissions)||void 0===c?void 0:c.preCheckPermissionsForBrickOrRoute(l,(e=>ft(e,d))));var{preLoadBricks:p}=l;switch(Array.isArray(p)&&s.blockingList.push((0,u.loadBricksImperatively)(p,lo())),l.type){case"redirect":var f;if("string"!=typeof(f="string"==typeof l.redirect?yield ft(l.redirect,d):(yield Ge((0,o.Z)({transform:"redirect"},l.redirect),d)).redirect))throw console.error("Unexpected redirect result:",f),new Error("Unexpected type of redirect result: ".concat(typeof f));s.redirect={path:f};break;case"routes":s.menuRequests.push(Qr(l.menu,d)),Jr(s,yield Dr(e,l.routes,d,n,a));break;default:s.menuRequests.push(Qr(l.menu,d)),Jr(s,yield Vr(e,l.bricks,d,n,a))}}return s})),Wr.apply(this,arguments)}function Vr(e,t,r,n,o,a,i){return Hr.apply(this,arguments)}function Hr(){return(Hr=(0,a.Z)((function*(e,t,r,n,o,a,i){var s={blockingList:[],menuRequests:[]};return(yield Promise.all(t.map(((t,i)=>zr(e,t,r,n,o,i,a&&new Map(a)))))).forEach(((t,r)=>{!i&&t.hasTrackingControls&&n.memoizeControlNode(o,r,t.node,e),Jr(s,t)})),s}))).apply(this,arguments)}function zr(e,t,r,n,o,a){return Gr.apply(this,arguments)}function Gr(){return Gr=(0,a.Z)((function*(e,t,r,n,i,s){var c,l,p=arguments.length>6&&void 0!==arguments[6]?arguments[6]:new Map,f={blockingList:[],menuRequests:[]};if(!t.brick)return t.template?console.error("Legacy templates are dropped in v3:",t):console.error("Invalid brick:",t),f;var{if:v,permissionsPreCheck:g}=t,y=(0,h.Z)(t,$r);if(function(e){return"string"==typeof e?(0,T.isTrackAll)(e):et(e)&&(0,T.isTrackAll)(tt(e))}(v))return zr(e,(0,o.Z)({brick:":if",dataSource:v,permissionsPreCheck:g,slots:{"":{type:"bricks",bricks:[y]}}},Object.getOwnPropertySymbols(t).reduce(((e,r)=>(0,o.Z)((0,o.Z)({},e),{},{[r]:t[r]})),{})),r,n,i,s,p);var b=t[Ft],w=t[Ur],S=(0,o.Z)((0,o.Z)({},r),{},{tplStateStoreId:b,formStateStoreId:w});(0,d.hasOwnProperty)(t,jt)&&(S.forEachItem=t[jt]);var{context:E}=t;if(Array.isArray(E)&&E.length>0){var k=Ee(S);ke(k,"Defining context on bricks","check your brick:",t),k||S.ctxStore.define(E,S)}if(S.pendingPermissionsPreCheck.push(null==ro||null===(c=ro.checkPermissions)||void 0===c?void 0:c.preCheckPermissionsForBrickOrRoute(t,(e=>ft(e,S)))),!(yield function(e,t){return Et.apply(this,arguments)}(t,S)))return f;var Z=t.brick;if(Z.startsWith(":")){!function(e){if(":forEach"!==e&&":if"!==e&&":switch"!==e)throw new Error('Unknown storyboard control node: "'.concat(e,'"'))}(Z);var{dataSource:I}=t,A=function(){var r=(0,a.Z)((function*(){var r,o=yield ft(I,S),a=":forEach"===Z?"":":switch"===Z?String(o):o?"":"else",s=Yr(t.children,t.slots),c=s&&(0,d.hasOwnProperty)(s,a)&&(null===(r=s[a])||void 0===r?void 0:r.bricks);if(!Array.isArray(c))return f;switch(Z){case":forEach":return Array.isArray(o)?function(e,t,r,n,o,a,i){return qr.apply(this,arguments)}(e,o,c,S,n,i,p):f;case":if":case":switch":return Vr(e,c,S,n,i,p,!0)}}));return function(){return r.apply(this,arguments)}}(),O=yield A(),{contextNames:C,stateNames:P}=Zt(I);if(C||P){O.hasTrackingControls=!0;var R=0,_=function(){var t=(0,a.Z)((function*(){var t=++R,r=yield A();r.blockingList.push(...[...S.tplStateStoreMap.values(),...S.formStateStoreMap.values()].map((e=>e.waitForAll())),...S.pendingPermissionsPreCheck),yield Promise.all(r.blockingList),R===t&&n.rerenderControlNode(i,s,r.node,e)}));return function(){return t.apply(this,arguments)}}(),x=(0,m.debounce)(_);if(C)for(var M of C)S.ctxStore.onChange(M,x);if(P)for(var B of P)Oe(S,"STATE",': "'.concat(I,'"')).onChange(B,x)}return O}/\.tpl-/.test(Z)&&!Ae.get(Z)&&(yield Xr((0,u.loadBricksImperatively)([Z],lo()),Z,n.unknownBricks));var L=function(e,t){if(!e.includes(".")&&e.startsWith("tpl-")&&t){var r="".concat(t,".").concat(e);if(Ae.get(r))return r}return!!Ae.get(e)&&e}(Z,null===(l=S.app)||void 0===l?void 0:l.id);if(L){var U,N=null!==(U=p.get(L))&&void 0!==U?U:0;if(N>=10)throw new Error('Maximum custom template stack overflowed: "'.concat(L,'"'));p.set(L,N+1)}else Z.includes("-")&&!customElements.get(Z)&&(Z===Lr?customElements.define(Lr,class extends HTMLElement{get $$typeof(){return"form-renderer"}}):f.blockingList.push(Xr((0,u.enqueueStableLoadBricks)([Z],lo()),Z,n.unknownBricks)));var F,j,$={tag:Br.BRICK,type:L||Z,return:e,slotId:i,events:t.events,runtimeContext:S,portal:t.portal,iid:t.iid,ref:t.ref};if(f.node=$,Z===Lr){var K,D=null!==(K=t.properties)&&void 0!==K?K:{};({formData:F}=D),j=(0,h.Z)(D,Kr)}else j=t.properties;var W=[],V=[],H=function(){var e=(0,a.Z)((function*(){$.properties=yield function(e,t,r){return It.apply(this,arguments)}(j,S,V);var e=t[Nt];if(e){var r;null!==(r=$.properties)&&void 0!==r||($.properties={});var n=yield e;for(var[o,a]of Object.entries(n))$.properties[o]=a}return function(e,t){var r=function(t){var r=()=>{e.element&&Ot(e.element,{[t.propName]:t.propValue},e.runtimeContext)};if(t.contextNames)for(var n of t.contextNames)e.runtimeContext.ctxStore.onChange(n,r);if(t.stateNames){var o=Oe(e.runtimeContext,"STATE",': "'.concat(t.propValue,'"'));for(var a of t.stateNames)o.onChange(a,r)}if(t.formStateNames){var i=De(e.runtimeContext,"FORM_STATE",': "'.concat(t.propValue,'"'));for(var s of t.formStateNames)i.onChange(s,r)}};for(var n of t)r(n)}($,V),$.properties}));return function(){return e.apply(this,arguments)}}(),z=H();W.push(z),n.registerBrickLifeCycle($,t.lifeCycle);var G,q=t;L?q=xr(L,t,$,z):Z===Lr&&(q=function(e,t,r,n){var a,i,s="string"==typeof e?JSON.parse(e):e,c=(0,m.uniqueId)("form-state-"),l=(0,o.Z)((0,o.Z)({},r.runtimeContext),{},{formStateStoreId:c});delete l.forEachItem,delete l.tplStateStoreId;var u=new Ir("FORM_STATE");l.formStateStoreMap.set(c,u),l.formStateStoreScope&&l.formStateStoreScope.push(u);var p=null!==(a=s.context)&&void 0!==a?a:[];p.some((e=>"params"===e.name))||p.push({name:"params"}),u.define(p,l,n);var f=Nr(s.formSchema,s.fields,c);return"forms.general-form"===f.brick&&t.events&&(f.events=function(e,t){var r=null!=e?e:{};for(var[n,o]of Object.entries(t))r[n]=(0,d.hasOwnProperty)(r,n)?[r[n],o].flat():o;return r}(f.events,t.events)),"boolean"!=typeof(null===(i=t.properties)||void 0===i?void 0:i.renderRoot)||t.properties.renderRoot?(0,o.Z)((0,o.Z)({},t),{},{slots:void 0,children:[{brick:"basic-bricks.micro-view",properties:{style:{padding:"12px"}},slots:{content:{bricks:[f],type:"bricks"}}}]}):(0,o.Z)((0,o.Z)({},t),{},{slots:void 0,children:[f]})}(F,t,$,z)),q.portal&&($.slotId=void 0),L?delete(G=(0,o.Z)({},S)).forEachItem:G=S;var Q=function(){var e=(0,a.Z)((function*(){var e=Yr(q.children,q.slots);if(e){var t=yield Promise.all(Object.entries(e).map((e=>{var[t,r]=e;return"routes"!==r.type?Vr($,r.bricks,G,n,t,p):Dr($,r.routes,G,n,t)}))),r=(0,o.Z)((0,o.Z)({},f),{},{node:void 0,blockingList:[]});for(var a of t)Jr(r,a);r.node&&($.child=r.node),Jr(f,(0,o.Z)((0,o.Z)({},r),{},{node:void 0}))}}));return function(){return e.apply(this,arguments)}}();return W.push(Q()),yield Promise.all(W),f})),Gr.apply(this,arguments)}function qr(){return(qr=(0,a.Z)((function*(e,t,r,n,a,i,s){var c={blockingList:[],menuRequests:[]},l=yield Promise.all(t.map(((t,c)=>Promise.all(r.map(((r,l)=>zr(e,r,(0,o.Z)((0,o.Z)({},n),{},{forEachItem:t}),a,i,c*l,s&&new Map(s))))))));for(var u of l.flat())Jr(c,u);return c}))).apply(this,arguments)}function Qr(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 ft(e,t);console.warn("Set menu with resolve is not supported in v3 yet:",e)}}function Jr(e,t){var{blockingList:r,node:n,menuRequests:o,hasTrackingControls:a}=t,i=(0,h.Z)(t,jr);if(e.blockingList.push(...r),e.menuRequests.push(...o),n)if(e.node){for(var s=e.node;s.sibling;)s=s.sibling;s.sibling=n}else e.node=n;Object.assign(e,i)}function Yr(e,t){var r=t;if(Array.isArray(e)&&!r)for(var n of(r={},e)){var o,a=null!==(o=n.slot)&&void 0!==o?o:"";(0,d.hasOwnProperty)(r,a)||(r[a]={type:"bricks",bricks:[]}),r[a].bricks.push(n)}return r}function Xr(e,t,r){return"silent"===r?e.catch((e=>{console.error('Load brick "'.concat(t,'" failed:'),e)})):e}function en(e){var t,{ref:r,runtimeContext:n,element:o}=e;if(r&&n.tplStateStoreId){var{hostBrick:a}=Oe(n,"bindTemplateProxy"),i=a.tplHostMetadata;i.internalBricksByRef.set(r,e);var s=null===(t=i.proxy)||void 0===t?void 0:t.events;if(s){var c=function(e){if(u.ref===r){var t,n,i,s=t=>{t.bubbles&&t.stopPropagation(),a.element.dispatchEvent(new CustomEvent(e,{detail:t.detail,bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed}))},c=null!==(t=u.refEvent)&&void 0!==t?t:e;o.addEventListener(c,s),null!==(i=(n=o).$$proxyListeners)&&void 0!==i||(n.$$proxyListeners=[]),o.$$proxyListeners.push([c,s])}};for(var[l,u]of Object.entries(s))c(l)}}}function tn(e){var{ref:t,runtimeContext:r,element:n}=e;if(r.tplStateStoreId&&t){var{hostBrick:o}=Oe(r,"unbindTemplateProxy"),a=o.tplHostMetadata;for(var[i,s]of(a.internalBricksByRef.delete(t),null!==(c=n.$$proxyListeners)&&void 0!==c?c:[])){var c;n.removeEventListener(i,s)}delete n.$$proxyListeners}}function rn(e){e.innerHTML=""}function nn(e,t){for(var r=e.child,n=[];r;){var o=r.type;o.includes("-")&&!customElements.get(o)&&console.error("Undefined custom element: ".concat(o)),"basic-bricks.script-brick"===o&&console.warn("`basic-bricks.script-brick` is deprecated, please take caution when using it");var a=t&&r===e.child?t:document.createElement(o);if(r.element=a,r.slotId&&a.setAttribute("slot",r.slotId),r.iid&&(a.dataset.iid=r.iid),At(a,r.properties),rr(a,r.events,r.runtimeContext),r.tplHostMetadata&&(a.$$tplStateStore=Oe({tplStateStoreId:r.tplHostMetadata.tplStateStoreId,tplStateStoreMap:r.runtimeContext.tplStateStoreMap},"mount")),en(r),r.portal?n.push(a):r.return&&(r.return.childElements||(r.return.childElements=[]),r.return.childElements.push(a)),r.child)r=r.child;else if(r.sibling)r=r.sibling;else{for(var i,s=r.return;s;){var c;if(s.childElements)s.tag===Br.ROOT?null===(c=s.container)||void 0===c||c.append(...s.childElements):s.element.append(...s.childElements),s.childElements=void 0;if(s.tag===Br.ROOT&&n.length>0&&("function"==typeof s.createPortal?s.createPortal():s.createPortal).append(...n),s.sibling)break;s=s.return}r=null===(i=s)||void 0===i?void 0:i.sibling}}}var on,an,sn=["onMount","onUnmount","onMediaChange","onScrollIntoView"],cn=["onBeforePageLoad","onPageLoad","onPageLeave","onBeforePageLeave","onAnchorLoad","onAnchorUnload"],ln=new WeakMap,un=new WeakMap,dn=new WeakMap,pn=new WeakMap,fn=new WeakSet,vn=new WeakSet,hn=new WeakSet,mn=new WeakSet;class gn{constructor(e,t){var r;(0,I.Z)(this,mn),(0,I.Z)(this,hn),(0,I.Z)(this,vn),(0,I.Z)(this,fn),(0,$t.Z)(this,"scope",void 0),(0,$t.Z)(this,"unknownBricks",void 0),(0,i.Z)(this,ln,{writable:!0,value:{onBeforePageLoad:[],onPageLoad:[],onPageLeave:[],onBeforePageLeave:[],onAnchorLoad:[],onAnchorUnload:[],onMediaChange:[],onScrollIntoView:[],onMount:[],onUnmount:[]}}),(0,i.Z)(this,un,{writable:!0,value:new Map}),(0,i.Z)(this,dn,{writable:!0,value:void 0}),(0,i.Z)(this,pn,{writable:!0,value:void 0}),this.scope=e,this.unknownBricks=null!==(r=null==t?void 0:t.unknownBricks)&&void 0!==r?r:"throw"}registerBrickLifeCycle(e,t){if(t){var r=[...sn,..."page"===this.scope?cn:[]];for(var n of r){var o=t[n];o&&(0,c.Z)(this,ln)[n].push({brick:e,handlers:o})}(0,m.isEmpty)(t.useResolves)||console.error("`lifeCycle.useResolves` is dropped in v3:",t)}}memoizeControlNode(e,t,r,n){(0,c.Z)(this,pn)||(0,s.Z)(this,pn,new WeakMap);var o="".concat(null!=e?e:"",".").concat(t),a=(0,c.Z)(this,pn).get(n);a||(a=new Map,(0,c.Z)(this,pn).set(n,a)),a.set(o,{node:r,last:En(r),lastNormal:kn(r),lastPortal:Zn(r)})}rerenderControlNode(e,t,r,n){var o,a,i,s,l,u="".concat(null!=e?e:"",".").concat(t),d=(0,c.Z)(this,pn).get(n).get(u),{node:p,last:f,lastNormal:v,lastPortal:h}=d,m=null!==(o=null==v||null===(a=v.element)||void 0===a?void 0:a.nextSibling)&&void 0!==o?o:null,g=null!==(i=null==h||null===(s=h.element)||void 0===s?void 0:s.nextSibling)&&void 0!==i?i:null,y=En(r);d.node=r,d.last=y,d.lastNormal=kn(r),d.lastPortal=Zn(r);for(var b=n.child;b&&b!==f;){if(b.sibling===p){l=b;break}b=b.sibling}var w=document.createDocumentFragment(),S=document.createDocumentFragment(),E={tag:Br.ROOT,container:w,createPortal:S,child:r};for(b=r;b;)b.return=E,b=b.sibling;var k,Z,I=In(p,f);for((0,A.Z)(this,fn,yn).call(this,I),nn(E),l?l.sibling=r:n.child=r,y&&(y.sibling=null==f?void 0:f.sibling),b=r;b;)b.return=n,b=b.sibling;if(n.tag===Br.ROOT?null===(k=n.container)||void 0===k||k.insertBefore(w,m):null===(Z=n.element)||void 0===Z||Z.insertBefore(w,m),S.childNodes.length>0){for(var O,T=r;T&&T.return;)T=T.return;if((null===(O=T)||void 0===O?void 0:O.tag)!==Br.ROOT)throw new Error("Cannot find render root node");("function"==typeof T.createPortal?T.createPortal():T.createPortal).insertBefore(S,g)}var C=In(r,y);(0,A.Z)(this,vn,bn).call(this,C)}dispose(){for(var e of Object.values((0,c.Z)(this,ln)))e.length=0;for(var t of(0,c.Z)(this,un).values()){for(var r of t)r.disconnect();t.length=0}(0,c.Z)(this,un).clear(),(0,c.Z)(this,dn)&&(me.removeEventListener("change",(0,c.Z)(this,dn)),(0,s.Z)(this,dn,void 0)),(0,s.Z)(this,pn,void 0)}dispatchBeforePageLoad(){(0,A.Z)(this,hn,wn).call(this,"onBeforePageLoad",new CustomEvent("page.beforeLoad"))}dispatchPageLoad(){var e=new CustomEvent("page.load");(0,A.Z)(this,hn,wn).call(this,"onPageLoad",e),window.dispatchEvent(e)}dispatchBeforePageLeave(e){(0,A.Z)(this,hn,wn).call(this,"onBeforePageLeave",new CustomEvent("page.beforeLeave",{detail:e}))}dispatchPageLeave(){(0,A.Z)(this,hn,wn).call(this,"onPageLeave",new CustomEvent("page.leave"))}dispatchAnchorLoad(){var{hash:e}=Z().location;e&&"#"!==e?(0,A.Z)(this,hn,wn).call(this,"onAnchorLoad",new CustomEvent("anchor.load",{detail:{hash:e,anchor:e.substring(1)}})):(0,A.Z)(this,hn,wn).call(this,"onAnchorUnload",new CustomEvent("anchor.unload"))}initializeScrollIntoView(){for(var{brick:e,handlers:t}of(0,c.Z)(this,ln).onScrollIntoView)(0,A.Z)(this,mn,Sn).call(this,e,t)}initializeMediaChange(){(0,s.Z)(this,dn,(e=>{(0,A.Z)(this,hn,wn).call(this,"onMediaChange",new CustomEvent("media.change",{detail:K(e.detail)}))})),me.addEventListener("change",(0,c.Z)(this,dn))}dispatchOnMount(){(0,A.Z)(this,hn,wn).call(this,"onMount",new CustomEvent("mount"))}dispatchOnUnmount(){(0,A.Z)(this,hn,wn).call(this,"onUnmount",new CustomEvent("unmount"))}}function yn(e){var t=[...sn,..."page"===this.scope?cn:[]],r=[];for(var n of t){var o=(0,m.remove)((0,c.Z)(this,ln)[n],(t=>e.has(t.brick)));"onUnmount"===n&&r.push(...o)}for(var a of e){var i,s,l=(0,c.Z)(this,un).get(a);if(null!=l&&l.length){for(var u of l)u.disconnect();l.length=0,(0,c.Z)(this,un).delete(a)}tn(a),null===(i=a.element)||void 0===i||delete i.$$tplStateStore,null===(s=a.element)||void 0===s||s.remove()}var d=new CustomEvent("unmount");for(var{brick:p,handlers:f}of r)sr(f,p.runtimeContext,p)(d)}function bn(e){var t=new CustomEvent("mount");for(var{brick:r,handlers:n}of(0,c.Z)(this,ln).onMount)e.has(r)&&sr(n,r.runtimeContext,r)(t);for(var{brick:o,handlers:a}of(0,c.Z)(this,ln).onScrollIntoView)e.has(o)&&(0,A.Z)(this,mn,Sn).call(this,o,a)}function wn(e,t){for(var{brick:r,handlers:n}of(0,c.Z)(this,ln)[e])sr(n,r.runtimeContext,r)(t)}function Sn(e,t){var r,n=null!==(r=t.threshold)&&void 0!==r?r:.1,o=new IntersectionObserver(((r,o)=>{r.forEach((r=>{r.isIntersecting&&r.intersectionRatio>=n&&(sr(t.handlers,e.runtimeContext,e)(new CustomEvent("scroll.into.view")),o.disconnect())}))}),{threshold:n});o.observe(e.element);var a=(0,c.Z)(this,un).get(e);a||(a=[],(0,c.Z)(this,un).set(e,a)),a.push(o)}function En(e){for(var t=e;null!==(r=t)&&void 0!==r&&r.sibling;){var r;t=t.sibling}return t}function kn(e){for(var t,r=e;r;)r.portal||(t=r),r=r.sibling;return t}function Zn(e){for(var t,r=e;r;)if(r.portal&&(t=r),r.child)r=r.child;else if(r.sibling)r=r.sibling;else{for(var n,o=r.return;o&&!o.sibling;)o=o.return;r=null===(n=o)||void 0===n?void 0:n.sibling}return t}function In(e,t){for(var r=new Set,n=e;n;)if(r.add(n),n.child)n=n.child;else{if(n===t)break;if(n.sibling)n=n.sibling;else{for(var o,a=n.return;a&&a!==t&&!a.sibling;)a=a.return;if(a===t)break;n=null===(o=a)||void 0===o?void 0:o.sibling}}return r}function An(){if(!on){if(on={isInIframe:!1,isInIframeOfSameSite:!1,isInIframeOfNext:!1,isInIframeOfVisualBuilder:!1,isInIframeOfLegacyConsole:!1},window!==window.parent){on.isInIframe=!0;try{if(window.origin===window.parent.origin){on.isInIframeOfSameSite=!0;var e="/next/"===v(),t=window.parent.location.pathname,r=t.startsWith("/next/");on.isInIframeOfNext=0==(Number(e)^Number(r)),on.isInIframeOfVisualBuilder=t.startsWith("".concat(r?"/next":"","/visual-builder/")),on.isInIframeOfLegacyConsole=e&&!r}}catch(e){}}Object.freeze(on)}return on}function On(e){var t;if(!e.$$registerCustomTemplateProcessed){e.$$registerCustomTemplateProcessed=!0;var r=null===(t=e.meta)||void 0===t?void 0:t.customTemplates;if(Array.isArray(r))for(var n of r){var o=n.name.includes(".")?n.name:"".concat(e.app.id,".").concat(n.name);Ae.define(o,n)}}}function Tn(){return Tn=(0,a.Z)((function*(e){if(!e.$$fulfilled)return e.$$fulfilling||(e.$$fulfilling=function(e){return Cn.apply(this,arguments)}(e)),e.$$fulfilling})),Tn.apply(this,arguments)}function Cn(){return(Cn=(0,a.Z)((function*(e){var t;yield null==ro||null===(t=ro.fulfilStoryboard)||void 0===t?void 0:t.call(ro,e),M(e),Object.assign(e,{$$fulfilled:!0,$$fulfilling:null})}))).apply(this,arguments)}var Pn=new WeakMap,Rn=new WeakMap,_n=new WeakMap,xn=new WeakMap,Mn=new WeakMap,Bn=new WeakMap,Ln=new WeakMap,Un=new WeakMap,Nn=new WeakMap,Fn=new WeakMap,jn=new WeakMap,$n=new WeakMap,Kn=new WeakSet,Dn=new WeakSet,Wn=new WeakSet,Vn=new WeakSet;class Hn{constructor(e){(0,I.Z)(this,Vn),(0,I.Z)(this,Wn),(0,I.Z)(this,Dn),(0,I.Z)(this,Kn),(0,i.Z)(this,Pn,{writable:!0,value:void 0}),(0,i.Z)(this,Rn,{writable:!0,value:!1}),(0,i.Z)(this,_n,{writable:!0,value:void 0}),(0,i.Z)(this,xn,{writable:!0,value:void 0}),(0,i.Z)(this,Mn,{writable:!0,value:void 0}),(0,i.Z)(this,Bn,{writable:!0,value:void 0}),(0,i.Z)(this,Ln,{writable:!0,value:new Set}),(0,i.Z)(this,Un,{writable:!0,value:0}),(0,i.Z)(this,Nn,{writable:!0,value:void 0}),(0,i.Z)(this,Fn,{writable:!0,value:void 0}),(0,i.Z)(this,jn,{writable:!0,value:void 0}),(0,i.Z)(this,$n,{writable:!0,value:void 0}),(0,s.Z)(this,Pn,e);var t=Z();window.addEventListener("beforeunload",(e=>{(0,A.Z)(this,Kn,zn).call(this,{})?(e.preventDefault(),e.returnValue=""):delete e.returnValue})),t.block(((e,t)=>(0,A.Z)(this,Kn,zn).call(this,{location:e,action:t})))}getRenderId(){return(0,c.Z)(this,Nn)}getRuntimeContext(){return(0,c.Z)(this,Mn)}getRecentApps(){return{currentApp:(0,c.Z)(this,Fn),previousApp:(0,c.Z)(this,jn)}}getNavConfig(){return(0,c.Z)(this,$n)}bootstrap(){window.AbortController&&(an=new AbortController,O.http.interceptors.request.use((e=>{var t;return(0,o.Z)((0,o.Z)({},e),{},{options:(0,o.Z)((0,o.Z)({},e.options),{},{signal:null!==(t=e.options)&&void 0!==t&&t.noAbortOnRouteChange?null:an.signal})})})));var e=Z();return(0,s.Z)(this,_n,e.location),e.listen(((e,t)=>{var r,n,a,i=!1,l={hash:void 0,state:void 0};if(void 0!==e.key&&("POP"!==t||void 0!==(0,c.Z)(this,_n).key&&!1!==(null===(r=(0,c.Z)(this,_n).state)||void 0===r?void 0:r.notify))||(l.key=void 0),((0,f.locationsAreEqual)((0,o.Z)((0,o.Z)({},(0,c.Z)(this,_n)),l),(0,o.Z)((0,o.Z)({},e),l))||"POP"!==t&&!1===(null===(n=e.state)||void 0===n?void 0:n.notify))&&(i=!0),i)(0,s.Z)(this,_n,e);else{if(an&&(an.abort(),an=new AbortController),(0,s.Z)(this,_n,e),null===(a=(0,c.Z)(this,Bn))||void 0===a||a.dispatchPageLeave(),"POP"===t&&y(g((0,c.Z)(this,Pn),e.pathname)))return void window.location.reload();(0,c.Z)(this,Rn)?(0,s.Z)(this,xn,e):(0,A.Z)(this,Wn,qn).call(this,e).catch(er)}})),(0,A.Z)(this,Wn,qn).call(this,e.location)}}function zn(e){var t,r=Z(),n=r.getBlockMessage();null===(t=(0,c.Z)(this,Bn))||void 0===t||t.dispatchBeforePageLeave(e);var o=r.getBlockMessage();return!n&&o&&r.unblock(),o}function Gn(e,t,r){var n,o;if((0,s.Z)(this,Un,(n=(0,c.Z)(this,Un),o=n++,n)),o>10){var a='Infinite redirect detected: from "'.concat(r.pathname).concat(r.search).concat(r.hash,'" to "').concat(e,'"');throw new Error(a)}Z().replace(e,t)}function qn(e){return Qn.apply(this,arguments)}function Qn(){return(Qn=(0,a.Z)((function*(e){(0,s.Z)(this,Rn,!0);try{yield(0,A.Z)(this,Vn,Jn).call(this,e)}finally{if((0,s.Z)(this,Rn,!1),(0,c.Z)(this,xn)){var t=(0,c.Z)(this,xn);(0,s.Z)(this,xn,void 0),yield(0,A.Z)(this,Wn,qn).call(this,t)}}}))).apply(this,arguments)}function Jn(e){return Yn.apply(this,arguments)}function Yn(){return Yn=(0,a.Z)((function*(e){var t,r;(0,s.Z)(this,Nn,(0,m.uniqueId)("render-id-1")),ut=new WeakSet,ze.clear(),null==ro||null===(t=ro.flowApi)||void 0===t||t.clearCollectWidgetContract(),Z().unblock();var n=g((0,c.Z)(this,Pn),e.pathname),a=null===(r=(0,c.Z)(this,Mn))||void 0===r?void 0:r.app;null!=n&&n.app&&(yield function(e){return Tn.apply(this,arguments)}(n));var i=(0,s.Z)(this,Fn,null==n?void 0:n.app),l=a&&i?a.id!==i.id:a!==i,d=ao().getFeatureFlags(),p=(0,c.Z)(this,Bn),f=(t,r)=>{(0,c.Z)(this,Ln).add(p),(0,A.Z)(this,Dn,Gn).call(this,t,r,e)},v=()=>{var t=d["sso-enabled"]?"/sso-auth/login":"/auth/login";f(t,{from:e})},h=document.querySelector("#main-mount-point"),y=document.querySelector("#portal-mount-point"),b={tag:Br.ROOT,container:h,createPortal:y},w=()=>{for(var e of(rn(h),rn(y),(0,c.Z)(this,Ln).add(p),(0,c.Z)(this,Ln)))e&&(e.dispatchOnUnmount(),e.dispose());(0,c.Z)(this,Ln).clear(),z(i&&(Y()[i.id]||i.theme)||"light"),ee("default"),l&&((0,s.Z)(this,jn,a),window.dispatchEvent(new CustomEvent("app.change",{detail:{previousApp:a,currentApp:i}})))};if(i){var S,E,k,I,T,C;null==ro||null===(S=ro.checkInstalledApps)||void 0===S||S.preCheckInstalledApps(n,(e=>!!vo(e)));var P=(0,s.Z)(this,Mn,{app:i,location:e,query:new URLSearchParams(e.search),flags:d,sys:(0,o.Z)((0,o.Z)((0,o.Z)({},null==ro||null===(E=ro.auth)||void 0===E?void 0:E.getAuth()),An()),{},{settings:{brand:ao().getBrandSettings()}}),ctxStore:new Ir("CTX"),pendingPermissionsPreCheck:[null==ro||null===(k=ro.checkPermissions)||void 0===k?void 0:k.preCheckPermissions(n)],tplStateStoreMap:new Map,formStateStoreMap:new Map}),R=(0,s.Z)(this,Bn,new gn("page"));(0,s.Z)(this,$n,void 0),On(n),ue(null===(I=n.meta)||void 0===I?void 0:I.functions,i),null==ro||null===(T=ro.flowApi)||void 0===T||T.collectContract(null===(C=n.meta)||void 0===C?void 0:C.contracts);var _,x=!1;try{if((_=yield Dr(b,function(e){if(window.parent===window)return e;var t=e,r=(0,m.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/template-preview/")));t=[...t.slice(0,r+1),{path:"${APP.homepage}/_dev_only_/template-preview/:templateId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(r+1)];var n=(0,m.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/snippet-preview/")));return[...t.slice(0,n+1),{path:"${APP.homepage}/_dev_only_/snippet-preview/:snippetId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(n+1)]}(n.routes),P,R)).unauthenticated)return void v();if(_.redirect)return void f(_.redirect.path,_.redirect.state);(0,s.Z)(this,Un,0),(0,u.flushStableLoadBricks)(),yield Promise.all([..._.blockingList,...[P.ctxStore,...P.tplStateStoreMap.values(),...P.formStateStoreMap.values()].map((e=>e.waitForAll())),...P.pendingPermissionsPreCheck]);var M=yield Promise.all(_.menuRequests);(0,s.Z)(this,$n,function(e){var t={breadcrumb:[]};for(var r of e)if(r){var{breadcrumb:n}=r;n&&(n.overwrite?t.breadcrumb=n.items:t.breadcrumb.push(...n.items))}return t}(M))}catch(e){if(console.error("Router failed:",e),Qt(e)&&!window.NO_AUTH_GUARD)return void v();if(e instanceof O.HttpAbortError)return void(0,c.Z)(this,Ln).add(p);x=!0,_={node:{tag:Br.BRICK,type:"div",properties:{textContent:qt(e)},runtimeContext:null,return:b},blockingList:[],menuRequests:[]}}if(b.child=_.node,w(),_.route&&"routes"!==_.route.type||x)return x||R.dispatchBeforePageLoad(),Q(),re(),nn(b),window.scrollTo(0,0),void(x||(R.dispatchPageLoad(),R.dispatchAnchorLoad(),R.dispatchOnMount(),R.initializeScrollIntoView(),R.initializeMediaChange()))}else{if(!window.NO_AUTH_GUARD&&null!=ro&&ro.auth&&!ro.auth.isLoggedIn())return void v();w()}Q(),re();var B={tag:Br.BRICK,type:"div",properties:{textContent:"Page not found"},runtimeContext:null,return:b};b.child=B,nn(b),window.scrollTo(0,0)})),Yn.apply(this,arguments)}var Xn,eo,to,ro,no="undefined"!=typeof BRICK_PACKAGES?BRICK_PACKAGES:[];function oo(e){if(Xn)throw new Error("Cannot create multiple runtimes");return ro=null==e?void 0:e.hooks,(0,l.initializeI18n)(Ht,zt),p.locale(l.i18n.language),l.i18n.on("languageChanged",(()=>{p.locale(l.i18n.language)})),k(),Xn=new co}function ao(){return Xn}var io=new WeakMap,so=new WeakMap;class co{constructor(){(0,i.Z)(this,io,{writable:!0,value:!1}),(0,i.Z)(this,so,{writable:!0,value:!1})}initialize(e){var t,r;if((0,c.Z)(this,io))throw new Error("The runtime cannot be initialized more than once");(0,s.Z)(this,io,!0),function(e){if(Array.isArray(e.storyboards)){var t=function(){if(r.locales){var e="tmp/".concat(r.id);Object.entries(r.locales).forEach((t=>{var[r,n]=t;l.i18n.addResourceBundle(r,e,n)})),r.localeName=l.i18n.getFixedT(null,e)("name",r.name),Object.keys(r.locales).forEach((t=>{l.i18n.removeResourceBundle(t,e)}))}else r.localeName=r.name};for(var{app:r}of e.storyboards)t()}(0,d.isObject)(e.settings)&&(0,d.deepFreeze)(e.settings),e.brickPackages&&(0,d.deepFreeze)(e.brickPackages)}(e),eo=e;var n,{notification:o,dialog:a}=null!==(t=null===(r=e.settings)||void 0===r?void 0:r.presetBricks)&&void 0!==t?t:{};!1!==o&&(n=null!=o?o:"shoelace.show-notification",(0,this.loadBricks)([n]).then((()=>{Yt=document.createElement(n)}),(e=>{console.error("Load notification service failed:",e)}))),!1!==a&&function(e,t){t([e]).then((()=>{Ut=document.createElement(e)}),(e=>{console.error("Load dialog service failed:",e)}))}(null!=a?a:"shoelace.show-dialog",this.loadBricks)}bootstrap(e){var t=this;return(0,a.Z)((function*(){if(e&&t.initialize(e),(0,c.Z)(t,so))throw new Error("The runtime cannot be bootstrapped more than once");(0,s.Z)(t,so,!0),to=new Hn(eo.storyboards),yield to.bootstrap()}))()}getRecentApps(){var e,t;return null!==(e=null===(t=to)||void 0===t?void 0:t.getRecentApps())&&void 0!==e?e:{}}getCurrentApp(){var e;return null===(e=to)||void 0===e?void 0:e.getRecentApps().currentApp}getFeatureFlags(){var e,t,r,n,a,i;return(0,o.Z)((0,o.Z)((0,o.Z)({},null===(e=eo)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.featureFlags),null===(r=to)||void 0===r||null===(n=r.getRecentApps().currentApp)||void 0===n||null===(a=n.config)||void 0===a||null===(i=a.settings)||void 0===i?void 0:i.featureFlags),{},{"migrate-to-brick-next-v3":!0})}getMiscSettings(){var e,t,r,n,a,i;return(0,o.Z)((0,o.Z)({},null===(e=eo)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.misc),null===(r=to)||void 0===r||null===(n=r.getRecentApps().currentApp)||void 0===n||null===(a=n.config)||void 0===a||null===(i=a.settings)||void 0===i?void 0:i.misc)}getBrandSettings(){var e,t;return(0,o.Z)({base_title:"DevOps 管理专家"},null===(e=eo)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.brand)}getLaunchpadSettings(){var e,t;return(0,o.Z)({columns:7,rows:4},null===(e=eo)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.launchpad)}getDesktops(){var e,t;return null!==(e=null===(t=eo)||void 0===t?void 0:t.desktops)&&void 0!==e?e:[]}getLaunchpadSiteMap(){var e,t;return null!==(e=null===(t=eo)||void 0===t?void 0:t.siteSort)&&void 0!==e?e:[]}toggleLaunchpadEffect(e){document.body.classList.toggle("launchpad-open",e)}applyPageTitle(e){var t=this.getBrandSettings().base_title;document.title=e?"".concat(e," - ").concat(t):t}getNavConfig(){var e;return null===(e=to)||void 0===e?void 0:e.getNavConfig()}loadBricks(e){return(0,u.loadBricksImperatively)(e,lo())}}function lo(){var e,t;return null!==(e=null===(t=eo)||void 0===t?void 0:t.brickPackages)&&void 0!==e?e:no}function uo(){var e;return null===(e=to)||void 0===e?void 0:e.getRenderId()}function po(){var e;return null===(e=to)||void 0===e?void 0:e.getRuntimeContext()}function fo(e){var t,r;return null===(t=eo)||void 0===t||null===(r=t.storyboards)||void 0===r?void 0:r.find((t=>t.app.id===e))}function vo(e){var t;return null===(t=fo(e))||void 0===t?void 0:t.app}function ho(){for(var e,t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];null==ro||null===(e=ro.auth)||void 0===e||null===(t=e.authenticate)||void 0===t||t.call(e,...n)}function mo(){var e;return null==ro||null===(e=ro.auth)||void 0===e?void 0:e.getAuth()}function go(){var e,t;return null==ro||null===(e=ro.auth)||void 0===e||null===(t=e.logout)||void 0===t?void 0:t.call(e)}function yo(){var e;return null==ro||null===(e=ro.auth)||void 0===e?void 0:e.isLoggedIn()}function bo(e,t,r){return wo.apply(this,arguments)}function wo(){return(wo=(0,a.Z)((function*(e,t,r){return Qe(yield Ve(e),e,"resolve",t,r)}))).apply(this,arguments)}function So(e){var t,{portal:r,scope:n="fragment",unknownBricks:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r;t=r||(()=>((i=document.createElement("div")).style.position="absolute",i.style.width=i.style.height="0",document.body.append(i),i));var s,c,l=!1;return{render(r){var d=arguments;return(0,a.Z)((function*(){var{theme:a,context:p,functions:f,templates:v,i18n:h}=d.length>1&&void 0!==d[1]?d[1]:{};if(l)throw new Error("The root is unmounted and cannot be rendered any more");var m=[].concat(r),g={ctxStore:new Ir("CTX"),pendingPermissionsPreCheck:[],tplStateStoreMap:new Map,formStateStoreMap:new Map},y=s;s=new gn(n,{unknownBricks:o});var b={tag:Br.ROOT,container:e,createPortal:t};if("page"===n){var w,S={id:"demo",homepage:"/demo"};g.app=S;var E={app:S,meta:{i18n:h,customTemplates:v}};null===(w=c)||void 0===w||w(),c=M(E),On(E),ue(f,S)}g.ctxStore.define(p,g);var k,Z=!1;try{k=yield Vr(b,m,g,s),(0,u.flushStableLoadBricks)(),yield Promise.all([...k.blockingList,g.ctxStore.waitForAll(),...[...g.tplStateStoreMap.values(),...g.formStateStoreMap.values()].map((e=>e.waitForAll())),...g.pendingPermissionsPreCheck])}catch(e){Z=!0,k={node:{tag:Br.BRICK,type:"div",properties:{textContent:qt(e)},return:b,runtimeContext:null},blockingList:[],menuRequests:[]}}b.child=k.node,null==y||y.dispatchOnUnmount(),null==y||y.dispose(),rn(e),i&&rn(i),"page"===n&&(z(null!=a?a:"light"),ee("default"),Z||s.dispatchBeforePageLoad(),Q(),re()),nn(b),"page"===n&&window.scrollTo(0,0),Z||("page"===n&&s.dispatchPageLoad(),s.dispatchOnMount(),s.initializeScrollIntoView(),s.initializeMediaChange())}))()},unmount(){l||(l=!0,rn(e),i&&(rn(i),r||i.remove()))}}}function Eo(e,t){return ko.apply(this,arguments)}function ko(){return(ko=(0,a.Z)((function*(e,t){var r,n,a,i=[],s=[],c=(0,o.Z)((0,o.Z)({},po()),{},{data:t,pendingPermissionsPreCheck:[],tplStateStoreScope:i,formStateStoreScope:s});null!==(r=c.tplStateStoreMap)&&void 0!==r||(c.tplStateStoreMap=new Map),null!==(n=c.formStateStoreMap)&&void 0!==n||(c.formStateStoreMap=new Map);var l=new gn("fragment"),d={tag:Br.ROOT,createPortal:null},p=e.transform,f=Ee();p&&ke(f,"`useBrick.transform`",'please use "properties" instead, check your useBrick:',e);var v=yield zr(d,f?e:(0,o.Z)((0,o.Z)({},e),{},{properties:(0,o.Z)((0,o.Z)({},e.properties),p)}),c,l);if((0,u.flushStableLoadBricks)(),yield Promise.all([...v.blockingList,...[...i,...s].map((e=>e.waitForAll())),...c.pendingPermissionsPreCheck]),null!==(a=v.node)&&void 0!==a&&a.portal)throw new Error("The root brick of useBrick cannot be a portal brick");return d.child=v.node,{tagName:v.node?v.node.type:null,renderRoot:d,rendererContext:l}}))).apply(this,arguments)}function Zo(e,t){var r,{renderRoot:n,rendererContext:o}=e;return n.createPortal=()=>{var e=document.querySelector("#portal-mount-point");return r=document.createElement("div"),e.appendChild(r),r},nn(n,t),o.dispatchOnMount(),o.initializeScrollIntoView(),o.initializeMediaChange(),{portal:r}}function Io(e,t){var{rendererContext:r}=e;t.portal&&(rn(t.portal),t.portal.remove()),r.dispatchOnUnmount(),r.dispose()}function Ao(e,t,r){if(r)throw new Error("Legacy doTransform does not support options in v3");return ht(t,(0,o.Z)((0,o.Z)({},po()),{},{data:e}),{noInject:!0})}function Oo(e,t){var r=fo(e);Object.assign(r,(0,o.Z)((0,o.Z)({},t),{},{$$fulfilling:null,$$fulfilled:!0,$$registerCustomTemplateProcessed:!1})),M(r)}function To(e,t){var r=fo(e),n=!1,o=e=>"".concat(e.path,".").concat(e.exact),a=(e,r)=>e.map((e=>{var i=o(e);return"routes"===e.type?(e.routes=a(e.routes,r),e):i===r?(n=!0,t):e}));r.routes=a(r.routes,o(t)),n||r.routes.unshift(t)}function Co(e,t,r){var n="".concat(e,".").concat(t.name);Ae.define(n,{bricks:t.bricks,proxy:t.proxy,state:t.state}),Po(e,t.name,r)}function Po(e,t,r){xo(e,"${APP.homepage}/_dev_only_/template-preview/".concat(t),[(0,o.Z)({brick:t},(0,m.pick)(r,"properties","events","lifeCycle","context"))])}function Ro(e,t){var r;xo(e,"${APP.homepage}/_dev_only_/snippet-preview/".concat(t.snippetId),null!==(r=t.bricks)&&void 0!==r&&r.length?t.bricks:[{brick:"span"}])}var _o=Ro;function xo(e,t,r){var{routes:n}=fo(e),o=n.findIndex((e=>e.path===t)),a={path:t,bricks:r,menu:!1,exact:!0};-1===o?n.unshift(a):n.splice(o,1,a)}}}]);
2
- //# sourceMappingURL=2255.91dc8128.js.map