@webhandle/tree-file-browser 1.0.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.
- package/README.md +144 -0
- package/client-lib/base-image-name.mjs +41 -0
- package/client-lib/data-to-image.mjs +45 -0
- package/client-lib/dynamic-load.mjs +21 -0
- package/client-lib/file-select-dialog.mjs +70 -0
- package/client-lib/form-answer-dialog.mjs +65 -0
- package/client-lib/format-bytes.mjs +10 -0
- package/client-lib/get-extension-from-mime.mjs +17 -0
- package/client-lib/get-file-image-stats.mjs +17 -0
- package/client-lib/get-image-stats.mjs +11 -0
- package/client-lib/image-browser-view-methods/create-directory.mjs +23 -0
- package/client-lib/image-browser-view-methods/delete.mjs +100 -0
- package/client-lib/image-browser-view-methods/drag-and-drop.mjs +57 -0
- package/client-lib/image-browser-view-methods/file-obj-manipulation.mjs +190 -0
- package/client-lib/image-browser-view-methods/sink.mjs +20 -0
- package/client-lib/image-browser-view-methods/upload.mjs +159 -0
- package/client-lib/image-browser-view-methods/utils.mjs +108 -0
- package/client-lib/image-browser-view-methods/view-interactions.mjs +96 -0
- package/client-lib/image-browser-view.mjs +227 -0
- package/client-lib/image-resize.mjs +32 -0
- package/client-lib/info-dialog.mjs +36 -0
- package/client-lib/load-styles.mjs +14 -0
- package/client-lib/make-image-set.mjs +75 -0
- package/client-lib/name-parts.mjs +24 -0
- package/client-lib/styles-loaded.mjs +18 -0
- package/less/components.less +357 -0
- package/package.json +80 -0
- package/public/tree-file-browser/resources/css/tree-browser.css +394 -0
- package/public/tree-file-browser/resources/css/tree-browser.css.map +1 -0
- package/public/tree-file-browser/resources/js/tree-file-browser.js +2 -0
- package/public/tree-file-browser/resources/js/tree-file-browser.js.map +1 -0
- package/server-lib/initialize-tree-browser-resources.cjs +17 -0
- package/server-lib/initialize-tree-browser-resources.mjs +15 -0
- package/views/load-browser-views.js +13 -0
- package/views/webhandle-tree-image-browser/extension-pill.tri +1 -0
- package/views/webhandle-tree-image-browser/guilded-file-upload-form.tri +11 -0
- package/views/webhandle-tree-image-browser/guilded-image-upload-form.tri +33 -0
- package/views/webhandle-tree-image-browser/image-browser-frame.tri +122 -0
- package/views/webhandle-tree-image-browser/variant-choice-box.tri +25 -0
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
.webhandle-file-tree-image-browser-test {
|
|
2
|
+
background-color: #656963;
|
|
3
|
+
}
|
|
4
|
+
.webhandle-file-tree-image-browser {
|
|
5
|
+
--webhandle-file-tree-image-box-background: #eeeeee;
|
|
6
|
+
--webhandle-file-tree-image-selected-box-hightlight: blue;
|
|
7
|
+
}
|
|
8
|
+
.webhandle-file-tree-image-browser .file-lines {
|
|
9
|
+
grid-auto-flow: row dense;
|
|
10
|
+
grid-template-columns: 100px 1fr auto auto auto;
|
|
11
|
+
overflow-x: hidden;
|
|
12
|
+
}
|
|
13
|
+
.webhandle-file-tree-image-browser .file-lines .variant-choice-box {
|
|
14
|
+
display: contents;
|
|
15
|
+
}
|
|
16
|
+
.webhandle-file-tree-image-browser .file-lines .variant-choice-box .bottom {
|
|
17
|
+
display: contents;
|
|
18
|
+
}
|
|
19
|
+
.webhandle-file-tree-image-browser .file-lines .variant-choice-box .bottom .content {
|
|
20
|
+
display: contents;
|
|
21
|
+
}
|
|
22
|
+
.webhandle-file-tree-image-browser .file-lines .variant-choice-box.selected .extensions,
|
|
23
|
+
.webhandle-file-tree-image-browser .file-lines .variant-choice-box.selected .basename,
|
|
24
|
+
.webhandle-file-tree-image-browser .file-lines .variant-choice-box.selected .size-line,
|
|
25
|
+
.webhandle-file-tree-image-browser .file-lines .variant-choice-box.selected .actions,
|
|
26
|
+
.webhandle-file-tree-image-browser .file-lines .variant-choice-box.selected .img {
|
|
27
|
+
z-index: 2;
|
|
28
|
+
}
|
|
29
|
+
.webhandle-file-tree-image-browser .file-lines .variant-choice-box.selected .img:before {
|
|
30
|
+
content: '\00a0';
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: -3px;
|
|
33
|
+
bottom: 0px;
|
|
34
|
+
left: -3px;
|
|
35
|
+
width: 100vw;
|
|
36
|
+
background-color: #f0f0f0;
|
|
37
|
+
}
|
|
38
|
+
.webhandle-file-tree-image-browser .file-lines .extensions {
|
|
39
|
+
display: block !important;
|
|
40
|
+
grid-column: 3;
|
|
41
|
+
padding-top: 3px;
|
|
42
|
+
}
|
|
43
|
+
.webhandle-file-tree-image-browser .file-lines .extensions .extension-pill {
|
|
44
|
+
display: inline-block;
|
|
45
|
+
margin-right: 2px;
|
|
46
|
+
}
|
|
47
|
+
.webhandle-file-tree-image-browser .file-lines .basename {
|
|
48
|
+
grid-column: 2;
|
|
49
|
+
}
|
|
50
|
+
.webhandle-file-tree-image-browser .file-lines .size-line {
|
|
51
|
+
grid-column: 4;
|
|
52
|
+
}
|
|
53
|
+
.webhandle-file-tree-image-browser .file-lines .img {
|
|
54
|
+
max-width: 100px;
|
|
55
|
+
}
|
|
56
|
+
.webhandle-file-tree-image-browser .file-lines .img .thumbnail-icon {
|
|
57
|
+
font-size: 30px;
|
|
58
|
+
position: relative;
|
|
59
|
+
z-index: 2;
|
|
60
|
+
}
|
|
61
|
+
.webhandle-file-tree-image-browser .file-lines .actions {
|
|
62
|
+
grid-column: 5;
|
|
63
|
+
}
|
|
64
|
+
.webhandle-file-tree-image-browser .image-browser .image-browser-frame {
|
|
65
|
+
position: relative;
|
|
66
|
+
display: grid;
|
|
67
|
+
grid-template-columns: minmax(300px, 30%) 1fr;
|
|
68
|
+
column-gap: 20px;
|
|
69
|
+
background-color: white;
|
|
70
|
+
}
|
|
71
|
+
.webhandle-file-tree-image-browser .image-browser .image-browser-frame > .directory-side {
|
|
72
|
+
height: 800px;
|
|
73
|
+
max-height: 90vh;
|
|
74
|
+
position: relative;
|
|
75
|
+
display: grid;
|
|
76
|
+
grid-template-rows: 1fr auto;
|
|
77
|
+
}
|
|
78
|
+
.the-dialog .webhandle-file-tree-image-browser .image-browser .image-browser-frame > .directory-side {
|
|
79
|
+
max-height: 67vh;
|
|
80
|
+
}
|
|
81
|
+
.webhandle-file-tree-image-browser .image-browser .image-browser-frame > .directory-side button {
|
|
82
|
+
border: none;
|
|
83
|
+
background-color: transparent;
|
|
84
|
+
color: white;
|
|
85
|
+
}
|
|
86
|
+
.webhandle-file-tree-image-browser .image-browser .image-browser-frame > .directory-side .directory-controls {
|
|
87
|
+
background-color: #393C40;
|
|
88
|
+
}
|
|
89
|
+
.webhandle-file-tree-image-browser .image-browser .node-content {
|
|
90
|
+
position: relative;
|
|
91
|
+
}
|
|
92
|
+
.webhandle-file-tree-image-browser .image-browser .box-holder {
|
|
93
|
+
position: absolute;
|
|
94
|
+
box-sizing: border-box;
|
|
95
|
+
height: 100%;
|
|
96
|
+
width: 100%;
|
|
97
|
+
top: 0;
|
|
98
|
+
left: 0;
|
|
99
|
+
overflow: auto;
|
|
100
|
+
padding-right: 20px;
|
|
101
|
+
padding-bottom: 20px;
|
|
102
|
+
padding-top: 3px;
|
|
103
|
+
padding-left: 3px;
|
|
104
|
+
}
|
|
105
|
+
.webhandle-file-tree-image-browser .image-browser .node-view {
|
|
106
|
+
display: grid;
|
|
107
|
+
grid-template-rows: auto 1fr auto;
|
|
108
|
+
row-gap: 12px;
|
|
109
|
+
}
|
|
110
|
+
.webhandle-file-tree-image-browser .image-browser .node-view .view-controls {
|
|
111
|
+
display: grid;
|
|
112
|
+
grid-template-columns: auto auto;
|
|
113
|
+
padding-right: 20px;
|
|
114
|
+
padding-top: 4px;
|
|
115
|
+
}
|
|
116
|
+
.webhandle-file-tree-image-browser .image-browser .node-view .view-controls .right {
|
|
117
|
+
text-align: right;
|
|
118
|
+
-webkit-user-select: none;
|
|
119
|
+
/* Safari */
|
|
120
|
+
user-select: none;
|
|
121
|
+
/* Standard syntax */
|
|
122
|
+
}
|
|
123
|
+
.webhandle-file-tree-image-browser .image-browser .node-view .view-controls button {
|
|
124
|
+
border: none;
|
|
125
|
+
background: none;
|
|
126
|
+
}
|
|
127
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes {
|
|
128
|
+
display: grid;
|
|
129
|
+
grid-template-columns: repeat(3, 1fr);
|
|
130
|
+
column-gap: 20px;
|
|
131
|
+
row-gap: 20px;
|
|
132
|
+
}
|
|
133
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.grid-small {
|
|
134
|
+
grid-template-columns: repeat(5, 1fr);
|
|
135
|
+
}
|
|
136
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.rows {
|
|
137
|
+
grid-auto-flow: row dense;
|
|
138
|
+
grid-template-columns: 100px 1fr auto auto auto;
|
|
139
|
+
overflow-x: hidden;
|
|
140
|
+
}
|
|
141
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.rows .variant-choice-box {
|
|
142
|
+
display: contents;
|
|
143
|
+
}
|
|
144
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.rows .variant-choice-box .bottom {
|
|
145
|
+
display: contents;
|
|
146
|
+
}
|
|
147
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.rows .variant-choice-box .bottom .content {
|
|
148
|
+
display: contents;
|
|
149
|
+
}
|
|
150
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.rows .variant-choice-box.selected .extensions,
|
|
151
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.rows .variant-choice-box.selected .basename,
|
|
152
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.rows .variant-choice-box.selected .size-line,
|
|
153
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.rows .variant-choice-box.selected .actions,
|
|
154
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.rows .variant-choice-box.selected .img {
|
|
155
|
+
z-index: 2;
|
|
156
|
+
}
|
|
157
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.rows .variant-choice-box.selected .img:before {
|
|
158
|
+
content: '\00a0';
|
|
159
|
+
position: absolute;
|
|
160
|
+
top: -3px;
|
|
161
|
+
bottom: 0px;
|
|
162
|
+
left: -3px;
|
|
163
|
+
width: 100vw;
|
|
164
|
+
background-color: #f0f0f0;
|
|
165
|
+
}
|
|
166
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.rows .extensions {
|
|
167
|
+
display: block !important;
|
|
168
|
+
grid-column: 3;
|
|
169
|
+
padding-top: 3px;
|
|
170
|
+
}
|
|
171
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.rows .extensions .extension-pill {
|
|
172
|
+
display: inline-block;
|
|
173
|
+
margin-right: 2px;
|
|
174
|
+
}
|
|
175
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.rows .basename {
|
|
176
|
+
grid-column: 2;
|
|
177
|
+
}
|
|
178
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.rows .size-line {
|
|
179
|
+
grid-column: 4;
|
|
180
|
+
}
|
|
181
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.rows .img {
|
|
182
|
+
max-width: 100px;
|
|
183
|
+
}
|
|
184
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.rows .img .thumbnail-icon {
|
|
185
|
+
font-size: 30px;
|
|
186
|
+
position: relative;
|
|
187
|
+
z-index: 2;
|
|
188
|
+
}
|
|
189
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.rows .actions {
|
|
190
|
+
grid-column: 5;
|
|
191
|
+
}
|
|
192
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.list-text {
|
|
193
|
+
grid-auto-flow: row dense;
|
|
194
|
+
grid-template-columns: 100px 1fr auto auto auto;
|
|
195
|
+
overflow-x: hidden;
|
|
196
|
+
grid-template-columns: auto 1fr auto auto auto;
|
|
197
|
+
row-gap: 5px;
|
|
198
|
+
}
|
|
199
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.list-text .variant-choice-box {
|
|
200
|
+
display: contents;
|
|
201
|
+
}
|
|
202
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.list-text .variant-choice-box .bottom {
|
|
203
|
+
display: contents;
|
|
204
|
+
}
|
|
205
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.list-text .variant-choice-box .bottom .content {
|
|
206
|
+
display: contents;
|
|
207
|
+
}
|
|
208
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.list-text .variant-choice-box.selected .extensions,
|
|
209
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.list-text .variant-choice-box.selected .basename,
|
|
210
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.list-text .variant-choice-box.selected .size-line,
|
|
211
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.list-text .variant-choice-box.selected .actions,
|
|
212
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.list-text .variant-choice-box.selected .img {
|
|
213
|
+
z-index: 2;
|
|
214
|
+
}
|
|
215
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.list-text .variant-choice-box.selected .img:before {
|
|
216
|
+
content: '\00a0';
|
|
217
|
+
position: absolute;
|
|
218
|
+
top: -3px;
|
|
219
|
+
bottom: 0px;
|
|
220
|
+
left: -3px;
|
|
221
|
+
width: 100vw;
|
|
222
|
+
background-color: #f0f0f0;
|
|
223
|
+
}
|
|
224
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.list-text .extensions {
|
|
225
|
+
display: block !important;
|
|
226
|
+
grid-column: 3;
|
|
227
|
+
padding-top: 3px;
|
|
228
|
+
}
|
|
229
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.list-text .extensions .extension-pill {
|
|
230
|
+
display: inline-block;
|
|
231
|
+
margin-right: 2px;
|
|
232
|
+
}
|
|
233
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.list-text .basename {
|
|
234
|
+
grid-column: 2;
|
|
235
|
+
}
|
|
236
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.list-text .size-line {
|
|
237
|
+
grid-column: 4;
|
|
238
|
+
}
|
|
239
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.list-text .img {
|
|
240
|
+
max-width: 100px;
|
|
241
|
+
}
|
|
242
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.list-text .img .thumbnail-icon {
|
|
243
|
+
font-size: 30px;
|
|
244
|
+
position: relative;
|
|
245
|
+
z-index: 2;
|
|
246
|
+
}
|
|
247
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.list-text .actions {
|
|
248
|
+
grid-column: 5;
|
|
249
|
+
}
|
|
250
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.list-text .img {
|
|
251
|
+
aspect-ratio: auto;
|
|
252
|
+
}
|
|
253
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.list-text .img img {
|
|
254
|
+
display: none;
|
|
255
|
+
}
|
|
256
|
+
.webhandle-file-tree-image-browser .image-browser .choice-boxes.list-text .img .thumbnail-icon {
|
|
257
|
+
font-size: 0;
|
|
258
|
+
}
|
|
259
|
+
.webhandle-file-tree-image-browser .image-browser .variant-choice-box {
|
|
260
|
+
padding: 10px;
|
|
261
|
+
border-radius: 5px;
|
|
262
|
+
box-shadow: 1px 1px 5px #cccccc;
|
|
263
|
+
-webkit-user-select: none;
|
|
264
|
+
/* Safari */
|
|
265
|
+
user-select: none;
|
|
266
|
+
/* Standard syntax */
|
|
267
|
+
}
|
|
268
|
+
.webhandle-file-tree-image-browser .image-browser .variant-choice-box .img {
|
|
269
|
+
display: grid;
|
|
270
|
+
aspect-ratio: 1.6;
|
|
271
|
+
position: relative;
|
|
272
|
+
}
|
|
273
|
+
.webhandle-file-tree-image-browser .image-browser .variant-choice-box .img .thumbnail-icon {
|
|
274
|
+
font-size: 70px;
|
|
275
|
+
}
|
|
276
|
+
.webhandle-file-tree-image-browser .image-browser .variant-choice-box .img > span {
|
|
277
|
+
grid-column: 1;
|
|
278
|
+
grid-row: 1;
|
|
279
|
+
justify-self: center;
|
|
280
|
+
align-self: center;
|
|
281
|
+
}
|
|
282
|
+
.webhandle-file-tree-image-browser .image-browser .variant-choice-box .img img {
|
|
283
|
+
position: absolute;
|
|
284
|
+
top: 50%;
|
|
285
|
+
left: 50%;
|
|
286
|
+
transform: translate(-50%, -50%);
|
|
287
|
+
max-width: 100%;
|
|
288
|
+
max-height: 100%;
|
|
289
|
+
}
|
|
290
|
+
.webhandle-file-tree-image-browser .image-browser .variant-choice-box .bottom {
|
|
291
|
+
display: grid;
|
|
292
|
+
grid-template-columns: 1fr auto;
|
|
293
|
+
}
|
|
294
|
+
.webhandle-file-tree-image-browser .image-browser .variant-choice-box .bottom .basename {
|
|
295
|
+
display: inline;
|
|
296
|
+
}
|
|
297
|
+
.webhandle-file-tree-image-browser .image-browser .variant-choice-box .bottom .extensions {
|
|
298
|
+
display: inline-flex;
|
|
299
|
+
column-gap: 5px;
|
|
300
|
+
}
|
|
301
|
+
.webhandle-file-tree-image-browser .image-browser .variant-choice-box .bottom .actions button {
|
|
302
|
+
border: 0;
|
|
303
|
+
background: none;
|
|
304
|
+
cursor: pointer;
|
|
305
|
+
}
|
|
306
|
+
.webhandle-file-tree-image-browser .image-browser .variant-choice-box.selected {
|
|
307
|
+
box-shadow: 1px 1px 10px var(--webhandle-file-tree-image-selected-box-hightlight);
|
|
308
|
+
}
|
|
309
|
+
.webhandle-file-tree-image-browser .image-browser .variant-choice-box.hidden {
|
|
310
|
+
display: none;
|
|
311
|
+
}
|
|
312
|
+
.webhandle-file-tree-image-browser .image-browser .variant-choice-box.hidden > * {
|
|
313
|
+
display: none !important;
|
|
314
|
+
}
|
|
315
|
+
.webhandle-file-tree-image-browser .image-browser .bottom-controls {
|
|
316
|
+
display: grid;
|
|
317
|
+
grid-template-columns: 1fr auto;
|
|
318
|
+
padding-right: 34px;
|
|
319
|
+
padding-top: 10px;
|
|
320
|
+
}
|
|
321
|
+
.webhandle-file-tree-image-browser .image-browser .bottom-controls button {
|
|
322
|
+
border: none;
|
|
323
|
+
background-color: transparent;
|
|
324
|
+
}
|
|
325
|
+
.webhandle-file-tree-image-browser .image-browser .drop-cover {
|
|
326
|
+
position: absolute;
|
|
327
|
+
inset: 0;
|
|
328
|
+
background-color: rgba(255, 255, 255, 0.8);
|
|
329
|
+
z-index: -1;
|
|
330
|
+
display: grid;
|
|
331
|
+
column-gap: 30px;
|
|
332
|
+
row-gap: 30px;
|
|
333
|
+
transition: opacity 0.3s;
|
|
334
|
+
opacity: 0.2;
|
|
335
|
+
}
|
|
336
|
+
.webhandle-file-tree-image-browser .image-browser .drop-cover .drop-type {
|
|
337
|
+
display: flex;
|
|
338
|
+
align-items: center;
|
|
339
|
+
text-align: center;
|
|
340
|
+
padding: 12px;
|
|
341
|
+
border: solid 1px black;
|
|
342
|
+
border-radius: 5px;
|
|
343
|
+
box-shadow: 1px 1px 5px #cccccc;
|
|
344
|
+
background-color: rgba(238, 238, 238, 0.7);
|
|
345
|
+
}
|
|
346
|
+
.webhandle-file-tree-image-browser .image-browser .drop-cover .drop-type .msg {
|
|
347
|
+
width: 100%;
|
|
348
|
+
}
|
|
349
|
+
.webhandle-file-tree-image-browser .image-browser .drop-cover .drop-type:hover {
|
|
350
|
+
background-color: #eeeeee;
|
|
351
|
+
}
|
|
352
|
+
.webhandle-file-tree-image-browser .image-browser .drop-cover.file-dropping {
|
|
353
|
+
z-index: 2;
|
|
354
|
+
opacity: 1;
|
|
355
|
+
}
|
|
356
|
+
.webhandle-file-tree-image-browser .image-browser .img-drop-cover {
|
|
357
|
+
grid-template-columns: repeat(3, 1fr);
|
|
358
|
+
grid-template-rows: repeat(4, 1fr);
|
|
359
|
+
}
|
|
360
|
+
.webhandle-file-tree-image-browser .image-browser .img-drop-cover .guided-upload {
|
|
361
|
+
grid-row: 1 / span 4;
|
|
362
|
+
grid-column: 1 / span 2;
|
|
363
|
+
}
|
|
364
|
+
.webhandle-file-tree-image-browser .image-browser .img-drop-cover .automatic {
|
|
365
|
+
grid-row: 1 / span 3;
|
|
366
|
+
grid-column: 3;
|
|
367
|
+
}
|
|
368
|
+
.webhandle-file-tree-image-browser .image-browser .img-drop-cover .literal {
|
|
369
|
+
grid-row: 4;
|
|
370
|
+
grid-column: 3;
|
|
371
|
+
}
|
|
372
|
+
.webhandle-file-tree-image-browser .extension-pill {
|
|
373
|
+
padding: 3px 5px;
|
|
374
|
+
border-radius: 5px;
|
|
375
|
+
background-color: var(--webhandle-file-tree-image-box-background);
|
|
376
|
+
}
|
|
377
|
+
.webhandle-file-tree-image-browser .radio-options label {
|
|
378
|
+
display: inline-block;
|
|
379
|
+
position: relative;
|
|
380
|
+
}
|
|
381
|
+
.webhandle-file-tree-image-browser .radio-options label input[type=radio] {
|
|
382
|
+
position: absolute;
|
|
383
|
+
display: inline-block;
|
|
384
|
+
left: -10000px;
|
|
385
|
+
}
|
|
386
|
+
.webhandle-file-tree-image-browser .radio-options label input[type=radio]:not(:checked) + .extension-pill {
|
|
387
|
+
background-color: transparent;
|
|
388
|
+
}
|
|
389
|
+
.webhandle-file-tree-image-browser .hidden-elements {
|
|
390
|
+
position: absolute;
|
|
391
|
+
left: -10000px;
|
|
392
|
+
top: 0;
|
|
393
|
+
}
|
|
394
|
+
/*# sourceMappingURL=tree-browser.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../less/components.less"],"names":[],"mappings":"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","file":"tree-browser.css","sourcesContent":["\n.webhandle-file-tree-image-browser-colors() {\n\t@webhandle-file-tree-image-box-background: #eeeeee;\n\t@webhandle-file-tree-image-selected-box-hightlight: blue;\n}\n\n.webhandle-file-tree-image-browser-colors();\n\n.webhandle-file-tree-image-browser-test {\n\tbackground-color: #656963;\n}\n\n.webhandle-file-tree-image-browser {\n\t--webhandle-file-tree-image-box-background: @webhandle-file-tree-image-box-background;\n\t--webhandle-file-tree-image-selected-box-hightlight: @webhandle-file-tree-image-selected-box-hightlight;\n\t\n\t@box-padding-right: 20px;\n\t\n\n\t.file-lines {\n\t\tgrid-auto-flow: row dense;\n\t\tgrid-template-columns: 100px 1fr auto auto auto;\n\t\toverflow-x: hidden;\n\n\t\t.variant-choice-box {\n\t\t\tdisplay: contents;\n\t\t\t.bottom {\n\t\t\t\tdisplay: contents;\n\t\t\t\t\n\t\t\t\t.content {\n\t\t\t\t\tdisplay: contents;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t&.selected {\n\t\t\t\t.extensions, .basename, .size-line, .actions, .img {\n\t\t\t\t\tz-index: 2;\n\t\t\t\t}\n\n\t\t\t\t.img:before {\n\t\t\t\t\tcontent: '\\00a0';\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\ttop: -3px;\n\t\t\t\t\tbottom: 0px;\n\t\t\t\t\tleft: -3px;\n\t\t\t\t\twidth: 100vw;\n\t\t\t\t\tbackground-color: #f0f0f0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t.extensions {\n\t\t\t// align-self: start;\n\t\t\tdisplay: block !important;\n\t\t\tgrid-column: 3;\n\t\t\tpadding-top: 3px;\n\t\t\t.extension-pill {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmargin-right: 2px;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t.basename {\n\t\t\tgrid-column: 2;\n\t\t}\n\t\t.size-line {\n\t\t\tgrid-column: 4;\n\t\t}\n\t\t.img {\n\t\t\tmax-width: 100px;\n\t\t\t\n\t\t\t.thumbnail-icon {\n\t\t\t\tfont-size: 30px;\n\t\t\t\tposition: relative;\n\t\t\t\tz-index: 2;\n\t\t\t}\n\t\t}\n\t\t.actions {\n\t\t\tgrid-column: 5;\n\t\t}\n\t}\n\n\t.image-browser {\n\t\t.image-browser-frame {\n\t\t\tposition: relative;\n\t\t\tdisplay: grid;\n\t\t\tgrid-template-columns: minmax(300px, 30%) 1fr;\n\t\t\tcolumn-gap: 20px;\n\t\t\tbackground-color: white;\n\n\t\t\t& > .directory-side {\n\t\t\t\theight: 800px;\n\t\t\t\t.the-dialog & {\n\t\t\t\t\tmax-height: 67vh;\n\t\t\t\t}\n\t\t\t\tmax-height: 90vh;\n\t\t\t\tposition: relative;\n\t\t\t\t\n\t\t\t\tdisplay: grid;\n\t\t\t\tgrid-template-rows: 1fr auto;\n\t\t\t\t\n\t\t\t\tbutton {\n\t\t\t\t\tborder: none;\n\t\t\t\t\tbackground-color: transparent;\n\t\t\t\t\tcolor: white;\n\t\t\t\t}\n\t\t\t\t.directory-controls {\n\t\t\t\t\tbackground-color: #393C40;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t\n\t\t.node-content {\n\t\t\tposition: relative;\n\t\t}\n\t\t.box-holder {\n\t\t\tposition: absolute;\n\t\t\tbox-sizing: border-box;\n\t\t\theight: 100%;\n\t\t\twidth: 100%;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\toverflow: auto;\n\t\t\tpadding-right: @box-padding-right;\n\t\t\tpadding-bottom: 20px;\n\t\t\tpadding-top: 3px;\n\t\t\tpadding-left: 3px;\n\t\t}\n\t\t\n\t\t.node-view {\n\t\t\tdisplay: grid;\n\t\t\tgrid-template-rows: auto 1fr auto;\n\t\t\trow-gap: 12px;\n\t\t\t\n\t\t\t.view-controls {\n\t\t\t\tdisplay: grid;\n\t\t\t\tgrid-template-columns: auto auto;\n\t\t\t\tpadding-right: @box-padding-right;\n\t\t\t\tpadding-top: 4px;\n\t\t\t\t\n\t\t\t\t.right {\n\t\t\t\t\ttext-align: right;\n\t\t\t\t\t-webkit-user-select: none; /* Safari */\n\t\t\t\t\tuser-select: none; /* Standard syntax */\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tbutton {\n\t\t\t\t\tborder: none;\n\t\t\t\t\tbackground: none;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\t\n\t\t.choice-boxes {\n\t\t\tdisplay: grid;\n\t\t\tgrid-template-columns: repeat(3, 1fr);\n\t\t\tcolumn-gap: 20px;\n\t\t\trow-gap: 20px;\n\t\t\t\n\t\t\t&.grid-small {\n\t\t\t\tgrid-template-columns: repeat(5, 1fr);\n\t\t\t}\n\t\t\t&.rows {\n\t\t\t\t.webhandle-file-tree-image-browser.file-lines();\n\t\t\t}\n\t\t\t\n\t\t\t&.list-text {\n\t\t\t\t.webhandle-file-tree-image-browser.file-lines();\n\t\t\t\tgrid-template-columns: auto 1fr auto auto auto;\n\t\t\t\trow-gap: 5px;\n\t\t\t\t.img {\n\t\t\t\t\taspect-ratio: auto;\n\t\t\t\t\timg {\n\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t}\n\t\t\t\t\t.thumbnail-icon {\n\t\t\t\t\t\tfont-size: 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t.variant-choice-box {\n\t\t\tpadding: 10px;\n\t\t\tborder-radius: 5px;\n\t\t\tbox-shadow: 1px 1px 5px #cccccc;\n\t\t\t-webkit-user-select: none; /* Safari */\n\t\t\tuser-select: none; /* Standard syntax */\n\n\t\t\t.img {\n\t\t\t\tdisplay: grid;\n\t\t\t\taspect-ratio: 1.6;\n\t\t\t\tposition: relative;\n\t\t\t\t\n\t\t\t\t.thumbnail-icon {\n\t\t\t\t\tfont-size: 70px;\n\t\t\t\t}\n\n\t\t\t\t& > span {\n\t\t\t\t\tgrid-column: 1;\n\t\t\t\t\tgrid-row: 1;\n\t\t\t\t\tjustify-self: center;\n\t\t\t\t\talign-self: center;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\timg {\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\ttop: 50%;\n\t\t\t\t\tleft: 50%;\n\t\t\t\t\ttransform: translate(-50%, -50%);\n\t\t\t\t\tmax-width: 100%;\n\t\t\t\t\tmax-height: 100%;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t.bottom {\n\t\t\t\tdisplay: grid;\n\t\t\t\tgrid-template-columns: 1fr auto;\n\t\t\t\t.basename {\n\t\t\t\t\tdisplay: inline;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t.extensions {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t\tcolumn-gap: 5px;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t.actions {\n\t\t\t\t\tbutton {\n\t\t\t\t\t\tborder: 0;\n\t\t\t\t\t\tbackground: none;\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t&.selected {\n\t\t\t\tbox-shadow: 1px 1px 10px var(--webhandle-file-tree-image-selected-box-hightlight);\n\t\t\t}\n\t\t\t&.hidden {\n\t\t\t\tdisplay: none;\n\t\t\t\t& > * {\n\t\t\t\t\tdisplay: none !important;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t.bottom-controls {\n\t\t\tdisplay: grid;\n\t\t\tgrid-template-columns: 1fr auto;\n\t\t\tpadding-right: 34px;\n\t\t\tpadding-top: 10px;\n\t\t\t\n\t\t\tbutton {\n\t\t\t\tborder: none;\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t}\n\n\t\t.drop-cover {\n\t\t\tposition: absolute;\n\t\t\tinset: 0;\n\t\t\tbackground-color: rgba(255, 255, 255, .8);\n\t\t\tz-index: -1;\n\n\t\t\tdisplay: grid;\n\t\t\tcolumn-gap: 30px;\n\t\t\trow-gap: 30px;\n\t\t\ttransition: opacity .3s;\n\t\t\topacity: .2;\n\n\t\t\t.drop-type {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\ttext-align: center;\n\t\t\t\t\n\t\t\t\tpadding: 12px;\n\t\t\t\tborder: solid 1px black;\n\t\t\t\tborder-radius: 5px;\n\t\t\t\tbox-shadow: 1px 1px 5px #cccccc;\n\t\t\t\tbackground-color: fade(@webhandle-file-tree-image-box-background, 70%);\n\t\t\t\t\n\t\t\t\t.msg {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t&:hover {\n\t\t\t\t\tbackground-color: @webhandle-file-tree-image-box-background;\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t&.file-dropping {\n\t\t\t\tz-index: 2;\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\n\t\t.img-drop-cover {\n\t\t\t\n\t\t\tgrid-template-columns: repeat(3, 1fr);\n\t\t\tgrid-template-rows: repeat(4, 1fr);\n\t\t\t\n\t\t\t\n\t\t\t.guided-upload {\n\t\t\t\tgrid-row: 1 / span 4;\n\t\t\t\tgrid-column: 1 / span 2;\n\t\t\t}\n\t\t\t.automatic {\n\t\t\t\tgrid-row: 1 / span 3;\n\t\t\t\tgrid-column: 3;\n\t\t\t}\n\t\t\t.literal {\n\t\t\t\tgrid-row: 4;\n\t\t\t\tgrid-column: 3;\n\t\t\t}\n\n\t\t}\n\t\t\n\n\t}\n\n\n\t.extension-pill {\n\t\tpadding: 3px 5px;\n\t\tborder-radius: 5px;\n\t\tbackground-color: var(--webhandle-file-tree-image-box-background);\n\t}\n\t\n\t.radio-options {\n\t\tlabel {\n\t\t\tdisplay: inline-block;\n\t\t\tposition: relative;\n\t\t\tinput[type=radio] {\n\t\t\t\tposition: absolute;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tleft: -10000px;\n\t\t\t}\n\t\t\tinput[type=radio]:not(:checked) + .extension-pill {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\t\n\t.hidden-elements {\n\t\tposition: absolute;\n\t\tleft: -10000px;\n\t\ttop: 0;\n\t}\n\t\n}\n\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var t={161:t=>{t.exports=function(){function t(){let t=document.createElement("div");t.classList.add("material-icons-styles-marker"),document.body.appendChild(t),window.getComputedStyle(t).content.indexOf("loaded")<0&&document.head.insertAdjacentHTML("beforeend",'<link rel="stylesheet" href="/@dankolz/webhandle-admin-icons/resources/css/admin-icons.css">'),t.remove()}document.body?t():document.addEventListener("DOMContentLoaded",t)}},799:(t,e,i)=>{let{imageExtensions:n,smallerSizeExt:a,imageSizeExt:s}=i(211);const l=i(42),r=i(198),o=i(29),c=i(73),d=i(148);function u(t){let e=l(t.variants);t.preview=e;let i=d(t.variants);t.primary=i}t.exports=function(t){let e=t.filter((t=>!t.directory)),i=e.filter((t=>t.name.toLowerCase().endsWith(".json"))),n=e.filter(r),a={};function s(t){if(t in a)return a[t];let e={baseName:t,variants:[]};return a[t]=e,e}for(let t of i)s(c(t.name)).definitionFile=t;for(let t of n.map(o))s(t.baseName).variants.push(t);for(let t of Array.from(Object.keys(a)))0==a[t].variants.length&&delete a[t];return Object.values(a).forEach(u),a}},211:t=>{let e={imageExtensions:["jpg","jpeg","png","gif","tiff","webp"],smallerSizeExt:["quarter","half"]};e.imageSizeExt=[...e.smallerSizeExt,"std","2x"],t.exports=e},73:t=>{t.exports=function(t){return t.substring(0,t.lastIndexOf("."))}},42:(t,e,i)=>{let{imageExtensions:n,smallerSizeExt:a,imageSizeExt:s}=i(211);t.exports=function(t){for(let e of s)for(let i of n)for(let n of t)if(n.size==e&&n.ext==i)return n}},148:(t,e,i)=>{let{imageExtensions:n,smallerSizeExt:a,imageSizeExt:s}=i(211),l=["std","2x",...a],r=n.filter((t=>"webp"!=t));t.exports=function(t){for(let e of l)for(let i of r)for(let n of t)if(n.size==e&&n.ext==i)return n}},600:(t,e,i)=>{let{imageExtensions:n,smallerSizeExt:a,imageSizeExt:s}=i(211);t.exports=function(t){let e=t.toLowerCase();for(let t of n)if(e.endsWith("."+t))return!0;return!1}},198:(t,e,i)=>{const n=i(600);t.exports=function(t){return n(t.name)}},29:(t,e,i)=>{let{imageExtensions:n,smallerSizeExt:a,imageSizeExt:s}=i(211);t.exports=function(t){let e={size:"std",file:t},i=t.name;e.ext=i.substring(i.lastIndexOf(".")+1);let n=i.substring(0,i.lastIndexOf("."));e.baseName=n;for(let t of s){let i="-"+t;if(n.endsWith(i)){e.size=t,e.baseName=n.substring(0,n.length-i.length);break}}return e}},772:(t,e,i)=>{let n=i(263),a=0;"string"!=typeof n&&n.default&&(n=n.default);var s=function(t){this.id="dialog"+(new Date).getTime()+a++,Object.assign(this,t),this.on||(this.on={}),this.on[".btn-cancel"]||(this.on[".btn-cancel"]=function(){}),this.on[".btn-close"]||(this.on[".btn-close"]=function(){}),t.buttons||(this.buttons=[{classes:"btn btn-primary btn-ok",label:"OK"},{classes:"btn btn-cancel",label:"Cancel"}]),this.body=t.body};s.prototype.getBodySelector=function(){return"#"+this.id+" .body"},s.prototype.getFrameSelector=function(){return"#"+this.id},s.prototype.addStylesIfNeeded=function(){document.querySelector("#dialog-frame-styles")||document.querySelector("head").insertAdjacentHTML("beforeend",'<style type="text/css" id="dialog-frame-styles">'+n+"</style>")},s.prototype.renderButton=function(t){return`<button class="${t.classes}" type="button">${t.label}</button>`},s.prototype.generateFrame=function(){let t=this.buttons.map(this.renderButton).join("");return`\n<div class="dialog-frame ${this.dialogFrameClass||""}" id="${this.id}" >\n\t<div class="mask">\n\t</div>\n\t<div class="the-dialog">\n\t\t<div class="close btn-close">×</div>\n\t\t<div class="head">\n\t\t\t${this.title}\n\t\t</div>\n\t\t<div class="body">\n\t\t</div>\n\t\t<div class="foot">\n\t\t\t${t}\n\t\t</div>\n\t</div>\n</div>\n\t`},s.prototype.open=function(){let t=this;this.addStylesIfNeeded(),document.querySelector("body").insertAdjacentHTML("beforeend",this.generateFrame());let e,i=this.getBodySelector(),n=this.getFrameSelector(),a=document.querySelector(i),s=document.querySelector(n);function l(){setTimeout((function(){let e=document.querySelector(n+" .head").clientHeight+document.querySelector(n+" .foot").clientHeight;a.style.maxHeight="calc(90vh - "+e+"px)",s.classList.add("open"),t.afterOpen&&t.afterOpen(a,t)}))}return s.addEventListener("click",(function(e){for(let i in t.on){let n=s.querySelector(i);if(e.target==n){let e=t.on[i]();"boolean"==typeof e?e&&t.close():"function"==typeof Promise&&e instanceof Promise?e.then((function(e){!1!==e&&t.close()})):t.close();break}}})),"function"==typeof this.body?e=this.body(a,this):"string"==typeof this.body&&(e=this.body),"string"==typeof e?(a.insertAdjacentHTML("beforeend",e),l()):"function"==typeof Promise&&e instanceof Promise&&e.then((function(t){a.insertAdjacentHTML("beforeend",t),l()})),this},s.prototype.close=function(){return document.querySelector(this.getFrameSelector()).remove(),this},t.exports=s},89:(t,e,i)=>{const n=i(939),a=i(674),s=i(493);t.exports=function(t,e){let i=n(t,e);return i=a(i,e),i=s(i,e),i}},939:t=>{function e(t){return t instanceof Date?t:new Date(t)}function i(t,e,i){for(t=""+t;t.length<e;)t=i+t;return t}function n(t){return`${(t=e(t)).getFullYear()}-${i(t.getMonth()+1,2,"0")}-${i(t.getDate(),2,"0")}`}function a(t){let n=i((t=e(t)).getHours(),2,"0"),a=i(t.getMinutes(),2,"0");return i(t.getSeconds(),2,"0"),i(t.getMilliseconds(),4,"0"),`${n}:${a}`}let s=/\sname=["'](.*?)["']/i,l=/\svalue=["'](.*?)["']/i,r=/\stype=["'](.*?)["']/i,o=/(<input.*?>)/i,c=/\schecked(=["'](.*?)["'])?/i,d={"&":"&",'"':""","<":"<"},u=new Function("data","with (data.context) {\n\t\ttry {\n\t\t\treturn eval(data.expression);\n\t\t} catch (e) {\n\t\t\treturn null;\n\t\t}\n\t}");function h(t,e){return u.call(this,{context:t,expression:e})}function p(t,e){return Array.isArray(e)?e.includes(t):t==e}t.exports=function(t,e){let i="";return t.split(o).forEach((t=>{if(0==t.toLowerCase().indexOf("<input")){let u=t.match(s),f=u?u[1]:null;u=t.match(r);let m=(u?u[1]:"text").toLowerCase();if("text"===m||"hidden"===m||"date"===m||"time"===m||"datetime-local"===m||"search"===m||"email"===m||"number"===m||"tel"===m||"url"===m||"month"===m||"week"===m||"color"===m||"week"===m){u=t.match(l);let s,r=u?u[1]:null,c=h(e,f);if("date"===m){if(c){let t=c;try{c=n(c)}catch(e){c=t}"Invalid date"==c&&(c=t)}}else if("time"===m){if(c){let t=c;try{c=a(c)}catch(e){c=t}"Invalid date"==c&&(c=t)}}else if("datetime-local"===m&&c){let t=c;try{c=n(o=newValue)+"T"+a(o)}catch(t){}"Invalid date"==c&&(c=t)}null==c?s="":(c=function(t){null==t&&(t=""),"string"!=typeof t&&(t=""+t);for(let[e,i]of Object.entries(d))t=t.split(e).join(i);return t}(c),s=' value="'+c+'"'),null!=r?null!=c&&(t=t.replace(l,s)):t=(t=t.endsWith("/>")?t.slice(0,-2):t.slice(0,-1))+s+" />",i+=t}else if("radio"===m){u=t.match(l);let n=u?u[1]:null,a=h(e,f);n?a&&a==n?t.match(c)||(t=t.endsWith("/>")?t.slice(0,-2):t.slice(0,-1),t+=' checked="checked" />'):t=t.replace(c,""):a&&"false"!=a&&"off"!=a?t.match(c)||(t=t.endsWith("/>")?t.slice(0,-2):t.slice(0,-1),t+=' checked="checked" />'):t=t.replace(c,""),i+=t}else if("checkbox"===m){u=t.match(l);let n=u?u[1]:null,a=h(e,f);n?a&&p(n,a)?t.match(c)||(t=t.endsWith("/>")?t.slice(0,-2):t.slice(0,-1),t+=' checked="checked" />'):t=t.replace(c,""):!a||p("false",a)||p("off",a)?t=t.replace(c,""):t.match(c)||(t=t.endsWith("/>")?t.slice(0,-2):t.slice(0,-1),t+=' checked="checked" />'),i+=t}else i+=t}else i+=t;var o})),i}},11:t=>{t.exports='<div id="kalpa-tree-icons" style="position: absolute; left: -10000px; width: 0; height: 0;">\n\t<svg xmlns="http://www.w3.org/2000/svg">\n\t\t<symbol id="icon-generic" viewBox="0 0 12 12">\n\t\t\t<path\n\t\t\t\td="M9.7 12H2.3C1 12 0 11 0 9.7V2.3C0 1 1 0 2.3 0h7.5C11 0 12 1 12 2.3v7.5C12 11 11 12 9.7 12zM8 5.3C8 4.6 7.4 4 6.6 4H5.3C4.6 4 4 4.6 4 5.3v1.3C4 7.4 4.6 8 5.3 8h1.3C7.4 8 8 7.4 8 6.6V5.3z" />\n\t\t</symbol>\n\t\t<symbol id="icon-root" viewBox="0 0 16 16">\n\t\t\t<path d="M9 16V9h7v7H9zM9 0h7v7H9V0zM0 9h7v7H0V9zm0-9h7v7H0V0z" />\n\t\t</symbol>\n\t\t<symbol id="icon-metric" viewBox="0 0 100 100">\n\t\t\t<path\n\t\t\t\td="M50 100C22.4 100 0 77.6 0 50S22.4 0 50 0s50 22.4 50 50-22.4 50-50 50zm0-76.9c-14.8 0-26.9 12.1-26.9 26.9S35.2 76.9 50 76.9 76.9 64.8 76.9 50 64.8 23.1 50 23.1zm0 38.4c-6.4 0-11.5-5.2-11.5-11.5S43.6 38.4 50 38.4s11.5 5.2 11.5 11.5S56.4 61.5 50 61.5z" />\n\t\t</symbol>\n\t\t<symbol id="icon-perspective" viewBox="0 0 12 11">\n\t\t\t<path d="M12 11H0L5.9 0 12 11z" />\n\t\t</symbol>\n\t\t<symbol id="icon-objective" viewBox="0 0 12 10">\n\t\t\t<ellipse cx="6" cy="5" rx="6" ry="5" />\n\t\t</symbol>\n\t\t<symbol id="icon-find">\n\t\t\t<path\n\t\t\t\td="m 13.497323,12.433608 c 0.08422,0.978628 -1.417295,1.469942 -1.954282,0.657234 C 10.369384,11.968141 9.2411696,10.799391 8.087323,9.6566079 5.7875518,11.20515 2.2596241,10.270797 1.051352,7.7662065 -0.1027543,5.5922068 0.61269436,2.5743169 2.7539681,1.2885899 4.6322082,0.06461011 7.3623548,0.26924656 8.9286688,1.9183502 c 1.5121032,1.4872335 1.9726552,4.001359 0.8885116,5.8618536 -0.2008407,0.7179057 0.6439246,1.0286413 1.0395966,1.4627471 0.79551,0.9178591 1.752248,1.6943191 2.51171,2.6495761 0.08347,0.167322 0.129284,0.353872 0.128836,0.541081 z m -8.047,-9.7420001 C 3.5991559,2.6059751 2.107634,4.7815577 2.8684439,6.4772182 3.4629388,8.0470383 5.6500695,8.7859958 7.0177529,7.7488936 8.3664062,6.8424394 8.6521549,4.6587499 7.425963,3.52989 6.9118115,3.0069548 6.1883031,2.6803036 5.450323,2.6916079 z" />\n\t\t</symbol>\n\t\t<symbol id="icon-collapsed" viewBox="0 0 9 6">\n\t\t\t<path\n\t\t\t\td="M4.4 6c-.2 0-.5-.1-.9-.5L.3 1.8C-.1 1.4-.1.7.3.3s1.1-.4 1.5 0l2.7 3.2L7.1.4C7.5 0 8.2 0 8.6.4c.4.4.4 1.1 0 1.5L5.4 5.5c-.3.4-.8.5-1 .5z" />\n\t\t</symbol>\n\t</svg>\n</div>'},724:(t,e,i)=>{const n=i(852),a=i(224),s=i(622),l=i(11);let r=[];t.exports=async function(t={}){let e=Object.assign({treeContainerSelector:"#kalpa-tree",stream:new n,loadStyles:!0,styleLocation:"/kalpa-tree-on-page/css/white-page-tree.css",scriptLocation:"/kalpa-tree-on-page/js/kalpa-tree.js",data:null},t);return new Promise(((t,i)=>{document.querySelector("#kalpa-tree-icons")||document.body.insertAdjacentHTML("beforeend",l),async function(t){return new Promise(((e,i)=>{if(window.KalpaTree)e(window.KalpaTree);else{let i=document.createElement("script");i.setAttribute("src",t),i.onload=async function(){e(window.KalpaTree)},document.head.appendChild(i)}}))}(e.scriptLocation).then((i=>{let n=new(0,i.default)({stream:e.stream,accessors:{icon:"nodeType"},initialSelection:0});if(n.on("error",(function(t){console.log("tree error",t)})),n.on("move",(function(t,e,i,n,a){t.parentId=e.id})),n.serializeTree=function(){let t=[];return t.push(n.root),a(this,n.root.id,t),t},n.serialize=function(){var t=[];return t.push(n.get(0)),s(n,0,t),JSON.stringify(t)},e.treeContainerSelector&&document.querySelector(e.treeContainerSelector).appendChild(n.render().el.node()),e.data&&Array.isArray(e.data))for(let t of e.data)n.options.stream.emit("data",t);t(n)})),e.loadStyles&&e.styleLocation&&(r.includes(e.styleLocation)||(r.push(e.styleLocation),document.head.insertAdjacentHTML("beforeend",`<link href="${e.styleLocation}" rel="stylesheet">`)))}))}},622:t=>{t.exports=function t(e,i,n){e.children(i).forEach((function(a){a.parentId=i,n.push(a),t(e,a.id,n)}))}},224:t=>{t.exports=function t(e,i,n){e.children(i).forEach((function(a){a.parentId=i,n.push(a),t(e,a.id,n)}))}},852:t=>{t.exports=class{constructor(){this.handles={}}on(t,e){let i=this.handles[t];return i||(i=this.handles[t]=[]),i.push(e),this}emit(t,...e){if(t in this.handles)for(let i of this.handles[t])i.apply(this,e)}}},263:(t,e,i)=>{i.r(e),i.d(e,{default:()=>n});const n=".dialog-frame {\n\tposition: fixed;\n\ttop: 0;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\tz-index: 10000;\n\topacity: 0;\n\ttransition: opacity .3s;\n\toverflow: hidden;\n\t\n\t\n\tdisplay: grid;\n\tjustify-content: center;\n\talign-content: center;\n\tpadding: 5vh 5%;\n}\n\n.dialog-frame.open {\n\topacity: 1;\n}\n\n.dialog-frame .mask {\n\tposition: absolute;\n\tbox-sizing: border-box;\n\ttop: 0;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\tbackground-color: #333333;\n\topacity: .7;\n\theight: 100%;\n\tz-index: 0;\n\t\n}\n\n\n.dialog-frame .the-dialog {\n\tposition: relative;\n\tdisplay: inline-block;\n\tz-index: 1;\n\tborder-radius: 5px;\n\tbackground-color: white;\n\toverflow: hidden;\n\ttransform: scale(.84);\n\ttransition: transform 0.262s cubic-bezier(.77,-1.72,.08,1);\n}\n\n.dialog-frame.open .the-dialog {\n\ttransform: scale(1);\n}\n\n.dialog-frame .the-dialog .close {\n\tposition: absolute;\n\ttop: 0px;\n\tright: 0px;\n\tpadding: 8px 10px 10px 10px;\n\tcursor: pointer;\n}\n\n.dialog-frame .the-dialog .head {\n\tborder-bottom: solid #aaaaaa 1px;\n\tline-height: 2em;\n\tpadding: 0 10px;\n}\n\n.dialog-frame .the-dialog .body {\n\tbox-sizing: border-box;\n\tpadding: 20px;\n\toverflow: auto;\n\tmax-height: calc(90vh - 75px);\n}\n\n.dialog-frame .the-dialog .foot {\n\tborder-top: solid #aaaaaa 1px;\n\tpadding: 10px;\n}\n\n.dialog-frame .the-dialog .foot button {\n\tmargin-right: 15px;\n}"},493:t=>{let e=/\sname=["'](.*?)["']/i,i=/(<select[\w\W]*?select\w*>)/im,n=/\sselected(=["'](.*?)["'])?/i,a=new Function("data","with (data.context) {\n\t\ttry {\n\t\t\treturn eval(data.expression);\n\t\t} catch (e) {\n\t\t\treturn null;\n\t\t}\n\t}");t.exports=function(t,s){let l="";return t.split(i).forEach((t=>{if(0==t.toLowerCase().indexOf("<select")){let r=t.match(e),o=r?r[1]:null,c=function(t,e){return a.call(this,{context:t,expression:e})}(s,o);if(null!=c){let e=(t=t.replace(n,"")).match(new RegExp("value=[\"']"+((i=c)&&i.replace?i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):i)+"[\"']","i"));if(e){let i=t.indexOf(e[0])+e[0].length;t=t.slice(0,i)+' selected="selected" '+t.substring(i)}}l+=t}else l+=t;var i})),l}},674:t=>{let e=/\sname=["'](.*?)["']/i,i=/(<textarea[\w\W]*?textarea\w*>)/im,n=new Function("data","with (data.context) {\n\t\ttry {\n\t\t\treturn eval(data.expression);\n\t\t} catch (e) {\n\t\t\treturn null;\n\t\t}\n\t}");t.exports=function(t,a){let s="";return t.split(i).forEach((t=>{if(0==t.toLowerCase().indexOf("<textarea")){let i=t.match(e),l=i?i[1]:null;if(l){let e=function(t,e){return n.call(this,{context:t,expression:e})}(a,l);if(null!=e){let i=t.indexOf(">"),n=t.lastIndexOf("<");t=t.substring(0,i+1)+e+t.substring(n)}}s+=t}else s+=t})),s}},134:t=>{t.exports=class{constructor(t,e,i,n){this.conditionalExpression=t,this.dataExpression=e,this.handlingExpression=i||"defaultTemplate",this.tripartite=n}}},824:t=>{t.exports=function(t,e){if(!t)return e;if(!e)return e;if(0!=e.indexOf("../")&&0!=e.indexOf("./"))return e;for(var i=t.split("/"),n=e.split("/");i.length&&!i[0];)i.shift();for(;n.length&&!n[0];)n.shift();if(0==e.indexOf("../")){for(;n.length&&".."==n[0];)i.pop(),n.shift();for(i.pop();n.length;)i.push(n.shift());return i.join("/")}if(0==e.indexOf("./")){for(n.shift(),i.pop();n.length;)i.push(n.shift());return i.join("/")}return e}},668:(t,e,i)=>{const n=i(502);let a=new Function("additionalContexts","with ({\n\t\t'$globals': additionalContexts.globalData\n\t}) {\n\t\twith (additionalContexts.dataFunctions) {\n\t\t\twith (additionalContexts.context) {\n\t\t\t\ttry {\n\t\t\t\t\treturn eval(additionalContexts.expression);\n\t\t\t\t} catch (e) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}");function s(t,e,i,n){return i=i||{},n=n||{},a.call(this,{globalData:n,dataFunctions:i,context:t,expression:e})}t.exports=function(t,e,i,a){if(!e)return null;if("string"==typeof e&&(e=e.trim()),"$this"===e||"this"===e)return t;if("object"==typeof t&&e in t)return t[e];if('""'===e||"''"===e)return"";let l=n(t,e);return null==l&&(l=n({$globals:a},e)),null==l&&(l=s.call(t,t,e,i,a)),l}},268:(t,e,i)=>{let n=i(134);var a=i(824);let s=i(668);t.exports=class{constructor(t,e,i={},n="",a={}){this.tripartite=t,this.template=e,this.destination=n,this.initialData=i,this.currentData=[],this.dataFunctions=a,this.continueOnTripartiteError=!0,this.callCount=0,this.callDepthLimit=1e3}run(t){let e;return t&&(e=()=>{t(null,this.destination)}),this._run(this.template,this.initialData,e),this.destination}_resolveHandlingExpression(t,e,i){return e||(e=defaultTemplateName),"$"==e.charAt(0)&&(e=s(i,e.substring(1),this.dataFunctions,this.initialData)),0!=e.indexOf("./")&&0!=e.indexOf("../")||(e=a(t.templateMeta.name,e)),e}_run(t,e,i){let a=[...t.parts].reverse();const l=()=>{if(this.callCount++,this.callCount++>this.callDepthLimit)setTimeout((()=>{this.callCount=0,l()}));else if(a.length>0){let r=a.pop();if("string"==typeof r)this.output(r),l();else if(r instanceof n){let n,a=r.conditionalExpression||r.dataExpression,o=!1;if(null==a||null==a||""===a?o=!0:r.conditionalExpression?s(e,r.conditionalExpression,this.dataFunctions,this.initialData)&&(o=!0):(n=s(e,r.dataExpression,this.dataFunctions,this.initialData),null==n?o=!1:("number"==typeof n||Array.isArray(n)&&n.length>0||n)&&(o=!0)),o){r.dataExpression&&void 0===n&&(n=s(e,r.dataExpression,this.dataFunctions,this.initialData)),null==n&&(n=e);let a,o=this._resolveHandlingExpression(t,r.handlingExpression,e),c=(Array.isArray(n)?[...n]:[n]).reverse();const d=()=>{if(c.length>0){let t=c.pop();this._run(a,t,(()=>{d()}))}else l()};o in this.tripartite.templates?(a=this.tripartite.getTemplate(o),a?d():this.continueOnTripartiteError&&l()):this.tripartite.loadTemplate(o,(t=>{if(t)a=t,d();else{let t="Could not load template: "+o;if(console.error(t),this.continueOnTripartiteError)l();else{let e=new Error(t);if(!i)throw e;i(e)}}}))}else l()}else"function"==typeof r&&(r.write?r.write(e,this.destination,(()=>{l()})):(this.output(r(e)),l()))}else i&&i()};l()}output(t){null!=t&&("string"==typeof this.destination?this.destination+=t:this.destination.write&&this.destination.write(t))}}},502:t=>{t.exports=function(t,e){if(null==t)return t;let i;for("string"==typeof e?i=e.trim().split("."):Array.isArray(e)&&(i=e);i.length>0;){let e,n=i.shift();if(n.indexOf(" ")>-1)return null;if("this"===n||"$this"===n?e=t:"object"==typeof t&&n in t&&(e=t[n]),0==i.length)return e;t=e}}},158:(t,e,i)=>{function n(t){return null!==t&&"object"==typeof t&&"function"==typeof t.pipe}"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});let a=i(268),s=i(134);class l{constructor(t={}){this.templates={defaultTemplate:this._makeTemplate((function(t){return""+t}))};let{constants:e={templateBoundary:"__",templateNameBoundary:"##"}}=t;this.constants=e,this.secondaryTemplateFunctionObject=t.secondaryTemplateFunctionObject,this.loaders=t.loaders||[],this.dataFunctions=t.dataFunction||{}}_makeTemplate(t){if((e=t)&&"function"==typeof e&&e.write&&e.parts&&e.templateMeta)return t;var e;let i=this,s=function(t){let e=null,i=null,a=null;for(let t=1;t<arguments.length;t++){let s=arguments[t];n(s)?e=s:"function"==typeof s?a=s:"object"==typeof s&&(i=s)}return s.write(t,e,a,i)};return s.write=function(e,n,l,r={}){if(t&&t.write)return t.write.apply(t,arguments);{let t=new a(i,s,e,n||"",i.dataFunctions);return r&&"continueOnTripartiteError"in r&&(t.continueOnTripartiteError=r.continueOnTripartiteError),t.run(l)}},s.parts=[],t&&"function"==typeof t&&s.parts.push(t),s.templateMeta={},s}addTemplate(t,e){return"string"==typeof e?e=this.parseTemplate(e):"function"==typeof e&&(e=this._makeTemplate(e)),this.templates[t]=e,e.templateMeta=e.templateMeta||{},e.templateMeta.name=t,e}createBlank(){return new l}getTemplate(t){return this.templates[t]}loadTemplate(t,e){if(t in this.templates)e(this.templates[t]);else{let i=this,n=this.loaders.length,a=!1;0==n?(i.templates[t]=null,e(i.getTemplate(t))):this.loaders.forEach((s=>{a||s(t,(s=>{a||(n--,s?(a=!0,i.addTemplate(t,s)):0==n&&(a=!0,i.templates[t]=null),a&&e(i.getTemplate(t)))}))}))}}parseTemplateScript(t){for(var e=this.tokenizeTemplateScript(t),i=null,n=0;n<e.length;n++){var a=e[n];if(a.active)i=a.content;else if(i){var s=this.addTemplate(i,this.stripTemplateWhitespace(a.content));this.secondaryTemplateFunctionObject&&(this.secondaryTemplateFunctionObject[i]=s),i=null}}}stripTemplateWhitespace(t){var e=t.indexOf("\n");return e>-1&&""==t.substring(0,e).trim()&&(t=t.substring(e+1)),(e=t.lastIndexOf("\n"))>-1&&""==t.substring(e).trim()&&(t=t.substring(0,e)),t}_createActiveElement(t,e,i,n,a){let l=new s(t,e,i,n);return l.templateMeta=a,l}pt(t){return this.parseTemplate(t)}parseTemplate(t){var e=this.tokenizeTemplate(t);let i=this._makeTemplate();var n=i.templateMeta;for(let t of e)t.active?i.parts.push(this.tokenizeActivePart(t.content,n)):t.content&&i.parts.push(t.content);return i}tokenizeActivePart(t,e){var i=null,n=null,a=null,s=t.indexOf("??");s>-1?(i=t.substring(0,s),s+=2):s=0;var l=t.indexOf("::");return l>-1?(n=t.substring(s,l),a=t.substring(l+2)):n=t.substring(s),this._createActiveElement(i,n,a,this,e)}tokenizeTemplate(t){return this.tokenizeActiveAndInactiveBlocks(t,this.constants.templateBoundary)}tokenizeTemplateScript(t){return this.tokenizeActiveAndInactiveBlocks(t,this.constants.templateNameBoundary)}tokenizeActiveAndInactiveBlocks(t,e){let i=t.length,n=0,a=!1,s=[];for(;n<i;){let r=t.indexOf(e,n);-1==r&&(r=i);var l={active:a,content:t.substring(n,r)};s.push(l),n=r+e.length,a=!a}return s}}var r=new l;"undefined"!=typeof window&&(r.secondaryTemplateFunctionObject=window),t.exports=r,void 0!==i.g&&(i.g.Tripartite||(i.g.Tripartite=l),i.g.tripartite||(i.g.tripartite=r))},559:(t,e,i)=>{var n=i(158);t.exports=n.addTemplate("webhandle-tree-image-browser/extension-pill",'<span class="extension-pill">__this__</span>')},574:(t,e,i)=>{var n=i(158);t.exports=n.addTemplate("webhandle-tree-image-browser/guilded-file-upload-form",'<div class="guided-image-upload-form ei-form">\n\t<label>\n\t\tSource file name:<br>\n\t\t__nativeName__\n\t</label>\n\t<label>\n\t\tAfter uploaded name (with extension):\n\t\t<input name="name" type="text" />\n\t</label>\n\t\n</div>')},115:(t,e,i)=>{var n=i(158);t.exports=n.addTemplate("webhandle-tree-image-browser/guilded-image-upload-form",'<div class="guided-image-upload-form ei-form">\n\t<label>\n\t\tSource file name:<br>\n\t\t__nativeName__\n\t</label>\n\t<label>\n\t\tNative resolution:<br>\n\t\t__stats.width__ x __stats.height__\n\t</label>\n\t<label>\n\t\tAfter uploaded name (no extension):\n\t\t<input name="name" type="text" />\n\t</label>\n\t<div class="radio-options">\n\t\tOutput format:\n\t\t<label>\n\t\t\t<input type="radio" name="outputFormat" value="image/png" /> <span class="extension-pill">PNG</span>\n\t\t</label>\n\t\t<label>\n\t\t\t<input type="radio" name="outputFormat" value="image/jpeg" /> <span class="extension-pill">JPG</span>\n\t\t</label>\n\t</div>\n\t<label>\n\t\tOn screen width (px):\n\t\t<input name="width" type="number" />\n\t</label>\n\t\n\t<label>\n\t\tAlt text:\n\t\t<textarea name="altText"></textarea>\n\t</label>\n\t\n</div>')},24:(t,e,i)=>{var n=i(158);t.exports=n.addTemplate("webhandle-tree-image-browser/image-browser-frame",'<div class="image-browser-frame">\n\t<div class="directory-side">\n\t\t<div class="treebox">\n\n\t\t</div>\n\t\t<div class="directory-controls">\n\t\t\t<button type="button" class="btn create-directory" title="create new directory">\n\t\t\t\t<span class="material-icons thumbnail-icon">\n\t\t\t\t\tcreate_new_folder\n\t\t\t\t</span>\n\t\t\t</button>\n\t\t\t<button type="button" class="btn delete-directory" title="delete selected directory">\n\t\t\t\t<span class="material-icons thumbnail-icon">\n\t\t\t\t\tfolder_delete\n\t\t\t\t</span>\n\t\t\t</button>\n\t\t</div>\n\t</div>\n\t<div class="node-view">\n\t\t<div class="view-controls">\n\t\t\t<div class="left">\n\t\t\t\t<input name="filter" type="text" placeholder="filter" />\n\t\t\t\t<button class="clear-filter">×</button>\n\t\t\t</div>\n\t\t\t<div class="right">\n\t\t\t\t<span class="view-icons">\n\t\t\t\t\t<button type="button" class="show-large-tiles" title="show big tiles" data-show-class="grid-large">\n\t\t\t\t\t\t<span class="material-icons thumbnail-icon">\n\t\t\t\t\t\t\tgrid_view\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button type="button" class="show-small-tiles" title="show small tiles"\n\t\t\t\t\t\tdata-show-class="grid-small">\n\t\t\t\t\t\t<span class="material-icons thumbnail-icon">\n\t\t\t\t\t\t\tgrid_on\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button type="button" class="show-list-rows" title="show as rows" data-show-class="rows">\n\t\t\t\t\t\t<span class="material-icons thumbnail-icon">\n\t\t\t\t\t\t\tlist\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button type="button" class="show-list-text" title="show as list" data-show-class="list-text">\n\t\t\t\t\t\t<span class="material-icons thumbnail-icon">\n\t\t\t\t\t\t\ttable_rows\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</button>\n\t\t\t\t</span>\n\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="node-content">\n\t\t\t<div class="box-holder">\n\t\t\t\t<div class="choice-boxes">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="bottom-controls">\n\t\t\t<div class="file-controls">\n\t\t\t\t<button type="button" class="btn delete-file" title="delete selected file(s)">\n\t\t\t\t\t<span class="material-icons thumbnail-icon">\n\t\t\t\t\t\tdelete\n\t\t\t\t\t</span>\n\t\t\t\t</button>\n\t\t\t\t<button type="button" class="btn upload-file" title="upload file(s)">\n\t\t\t\t\t<span class="material-icons thumbnail-icon">\n\t\t\t\t\t\tupload\n\t\t\t\t\t</span>\n\t\t\t\t</button>\n\t\t\t</div>\n\n\t\t</div>\n\t</div>\n\t<div class="drop-cover file-drop-cover">\n\t\t<div class="drop-type literal">\n\t\t\t<div class="msg">\n\t\t\t\t<h2>\n\t\t\t\t\tJust Do It\n\t\t\t\t</h2>\n\t\t\t\t<p>\n\t\t\t\t\tWe won\'t mess the files at all, just upload them.\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="drop-cover img-drop-cover">\n\t\t<div class="drop-type guided-upload">\n\t\t\t<div class="msg">\n\t\t\t\t<h2>Guided Upload</h2>\n\t\t\t\t<p>\n\t\t\t\t\tLet us help you rename, and resize (if needed), the files by asking you questions\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="drop-type automatic">\n\t\t\t<div class="msg">\n\t\t\t\t<h2>\n\t\t\t\t\tWeb Safe\n\t\t\t\t</h2>\n\t\t\t\t<p>\n\t\t\t\t\tWe\'ll rename the files so they fit better with the web and create multiple formats images.\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="drop-type literal">\n\t\t\t<div class="msg">\n\t\t\t\t<h2>\n\t\t\t\t\tJust Do It\n\t\t\t\t</h2>\n\t\t\t\t<p>\n\t\t\t\t\tWe won\'t mess the files at all, just upload them.\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</div>\n\n\t</div>\n\t<div class="hidden-elements">\n\t\t<input name="fileUpload" type="file" placeholder="Upload a file" />\n\t\t\n\t</div>\n\n</div>')},466:(t,e,i)=>{var n=i(158);t.exports=n.addTemplate("webhandle-tree-image-browser/variant-choice-box",'<div class="variant-choice-box">\n\t<div class="img">\n\t\t__!this.thumbnail??\'<span class="material-icons thumbnail-icon">\' + thumbnailIcon + \'</span>\'__\n\t\t__this.thumbnail??\'<img class="thumbnail-image" src="\' + thumbnail + \'" />\'__\n\t</div>\n\t<div class="size-line">\n\t\t__size__\n\t</div>\n\t<div class="bottom">\n\t\t<div class="content">\n\t\t\t<div class="basename">\n\t\t\t\t__baseName__\n\t\t\t</div>\n\t\t\t<div class="extensions">\n\t\t\t\t__extensions::./extension-pill__\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="actions">\n\t\t\t<button class="details">\n\t\t\t\t<span class="material-icons">more_vert</span>\n\t\t\t</button>\n\t\t</div>\n\t</div>\n\n</div>')}},e={};function i(n){var a=e[n];if(void 0!==a)return a.exports;var s=e[n]={exports:{}};return t[n](s,s.exports,i),s.exports}i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{function t([t,e]){let i=(t=t.trim()).split(" "),n=i.shift().trim(),a=i.join(" ").trim();return"string"==typeof e&&(e=e.trim()),{event:n,selector:a,handler:e}}i.d(n,{DY:()=>wt,Tq:()=>yt,ZP:()=>_t,RM:()=>xt});let e={tagName:"div",events:{}};class a{constructor(t){this.id=function(){let t=new Uint8Array(32);window.crypto.getRandomValues(t);let e=btoa(t);return e=e.replace(/\//g,"_").replace(/\+/g,"-").replace(/=+$/,""),e}(),Object.assign(this,e),this.preinitialize.apply(this,arguments),Object.assign(this,t),this._ensureElement(),this.initialize.apply(this,arguments)}preinitialize(){}initialize(){}render(){return this}remove(){this.el.parentElement.removeChild(this.el)}appendTo(t){t.appendChild(this.el)}replaceContentsOf(t){t.innerHTML="",this.appendTo(t)}setElement(t){return this.el!==t&&(this.el=t,this._addListeners()),this}_createElement(t){let e=document.createElement(t);return e.setAttribute("id",this.id),e.view=this,e}_ensureElement(){this.el||this.setElement(this._createElement(this.tagName)),this._setAttributes(),this.className&&this.el.classList.add(this.className)}_setAttributes(t){if(this.attributes)for(let[t,e]of Object.entries(this.attributes))this.el.setAttribute(t,e)}_addListeners(){this.eventTriggers=Object.entries(this.events).map(t);let e=(i=this.eventTriggers,Array.from(i.reduce(((t,e)=>(t.add(e.event),t)),new Set)));var i;for(let t of e)this.el.addEventListener(t,this._eventHandler.bind(this))}_getCandidates(t){return"."===t?[this.el]:Array.from(this.el.querySelectorAll(t))}_eventHandler(t){for(let e of this.eventTriggers)if(t.type==e.event){let i=this._getCandidates(e.selector),n=null;for(let e of i)if(e===t.target||e.contains(t.target)){n=e;break}if(n){"string"==typeof e.handler?this[e.handler].call(this,t,n):"function"==typeof e.handler&&e.handler.call(this,t,n);break}}}}var s=i(24),l=i(466),r=(i(559),i(115)),o=i(574);let c=s,d=l,u=r,h=o;var p=i(724);function f(t,e){if(0==t)return"0 Bytes";var i=e||2,n=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,n)).toFixed(i))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][n]}let m,g="undefined"==typeof EventTarget?{}:EventTarget;m="undefined"!=typeof EventTarget?class extends g{constructor(t){super(t),this.innerEventTarget=t||this}on(t,e){let i=t=>{e.apply(this,t.detail)};return e.nativeListener=i,this.innerEventTarget.addEventListener(t,i),this}emit(t,...e){return this.innerEventTarget.dispatchEvent(new CustomEvent(t,{detail:e})),this}removeListener(t,e){return e=e.nativeListener||e,this.innerEventTarget.removeEventListener(t,e),this}}:class{constructor(){this.handles={}}on(t,e){let i=this.handles[t];return i||(i=this.handles[t]=[]),i.push(e),this}emit(t,...e){if(t in this.handles)for(let i of this.handles[t])i.apply(this,e)}removeListener(t,e){t in this.handles&&(this.handles[t]=this.handles[t].filter((t=>t!==e)))}};const b=m;var v=i(772),y=i(89);class w extends v{constructor(t){super(Object.assign({},t,{on:{".btn-ok":()=>(this.resolve(this.gatherData()),!0),".mask":()=>(this.resolve(),!0),".btn-cancel":()=>(this.resolve(),!0)}})),this.afterOpen&&(this.afterOpenOriginal=this.afterOpen),this.afterOpen=function(t,e){this.data&&(t.innerHTML=y(t.innerHTML,this.data));let i=t.querySelector("input, textarea");i&&i.focus(),this.afterOpenOriginal&&this.afterOpenOriginal(t,e)}}gatherData(){return function(t){let e={},i=t.querySelectorAll("input, textarea, select");for(let t of i){if("checkbox"===t.type){if(!t.checked)continue}else if("radio"===t.type&&!t.checked)continue;e[t.getAttribute("name")]=t.value}return e}(document.querySelector(this.getBodySelector()))}async open(){return this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e})),super.open(),this.promise}}async function x(t,e){let i=this.getSelectedFiles();if(i.files.length>0){let t=i.files,e=i.names;if(!this.deleteWithoutConfirm){let i=new w({title:"Delete File"+(t.length>1?"s":""),body:"<p>"+e.join(", ")+"</p>"}).open();if(!await i)return}for(let e of t){let t,i=e.relPath;this.eventNotificationPanel&&(t=this.eventNotificationPanel.addNotification({model:{status:"pending",headline:`deleting ${e.name}`}})),await this.sink.rm(i),this.eventNotificationPanel&&(t.remove(),t=this.eventNotificationPanel.addNotification({model:{status:"success",headline:`removed ${e.name}`},ttl:2e3}))}for(let t of i.boxes)t.remove()}this.emitter.emit("delete",{type:"delete",selected:i})}async function _(t,e){let i=this.currentNode.file.relPath,n=this.currentNode.file.name;if(!i)return;let a,s=new w({title:"Delete Directory",body:"<p>"+n+"</p>"}).open();if(!await s)return;this.eventNotificationPanel&&(a=this.eventNotificationPanel.addNotification({model:{status:"pending",headline:`deleting ${n}`}})),await this.sink.rm(i,{recursive:!0});let l=this.tree.selected(),r=this.tree.parent(l);this.tree.removeNode(l),this.tree.select(r.id),this.eventNotificationPanel&&(a.remove(),a=this.eventNotificationPanel.addNotification({model:{status:"success",headline:`removed ${n}`},ttl:2e3}))}function T(...t){return(t=t.filter((t=>!!t))).join("/")}function F(t){let e=t.split("/");return e.pop(),e.join("/")}function S(t){let e={id:this.idInd++,label:t.name,directory:t.directory,file:t,loaded:!1},i=this.nodes[this._determineParentPath(t.relPath)];return this.nodes[t.relPath]=e,i&&(e.parentId=i.id,e.path=t.relPath),t.path=e.path,e}function k(t){let e=new Set;if(t.variants)for(let i of t.variants)e.add(i.ext);else e.add(t.ext);let i=Array.from(e).filter((t=>!!t));return i.sort(((t,e)=>t.toLowerCase().localeCompare(e.toLowerCase()))),i}function E(t){let e=2e9,i=0;if(t.variants)for(let n of t.variants){let t=n.file.stat.size;t>i&&(i=t),t<e&&(e=t)}else{let n=t.file.stat.size;n>i&&(i=n),n<e&&(e=n)}return[e,i]}function O(t){return t.sort(((t,e)=>t.relPath.toLowerCase().localeCompare(e.relPath.toLowerCase()))),t}function D(t,e){return t.baseName.toLowerCase().localeCompare(e.baseName.toLowerCase())}function j(t){return t.split("/").join("-").split("..").join("-")}function C(t){return!!t.type.startsWith("image")&&!!(t.type.includes("jpeg")||t.type.includes("png")||t.type.includes("webp"))}class z extends v{constructor(t){super(Object.assign({},t,{on:{".btn-ok":()=>(this.resolve(),!0),".mask":()=>(this.resolve(),!0),".btn-cancel":()=>(this.resolve(),!0)}}))}async open(){return this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e})),super.open(),this.promise}}function L(t,e){let i=this.el.querySelector(".choice-boxes");[...e.closest(".view-icons").querySelectorAll("button")].map((t=>t.getAttribute("data-show-class"))).forEach((t=>{i.classList.remove(t)})),i.classList.add(e.getAttribute("data-show-class"))}function A(t,e){setTimeout((()=>{let t=this.el.querySelector('[name="filter"]').value,e=this.el.querySelectorAll(".choice-boxes .variant-choice-box");for(let i of e)i.classList.remove("hidden"),t&&(i.variant.baseName+i.variant.extensions.join()).indexOf(t)<0&&i.classList.add("hidden")}))}function N(t,e){this.el.querySelector('[name="filter"]').value="",this.applyFilter()}function P(t,e){let i=this.el.querySelectorAll(".choice-boxes .variant-choice-box.selected");if(!t.ctrlKey&&!t.shiftKey)for(let t of i)t.classList.remove("selected");if(t.shiftKey){let t=e;do{if(t.classList.contains("selected"))break;t.classList.add("selected"),t=t.previousElementSibling}while(t)}else e.classList.toggle("selected");let n=this.getSelectedFiles();this.emitter.emit("select",{type:"select",selected:n})}function I(t,e){let i=e.closest(".variant-choice-box").variant,n=this._getAssociatedRealFiles(i),a="<ul>";for(let t of n)a+='<li><a target="_blank" href="'+t.accessUrl+'">',a+=t.name+"</a> - "+this._formatBytes(t.stat.size),a+="</li>";a+="</ul>",new z({title:"File Details: "+i.baseName,body:a,buttons:[{classes:"btn btn-primary btn-ok",label:"OK"}]}).open().then((async t=>{}))}function M(){return".img-drop-cover"}async function B(t,e){let i="literal",n=t.target.closest(".drop-type");n&&(n.classList.contains("guided-upload")?i="guided":n.classList.contains("automatic")&&(i="automatic")),this._cleanupDropDone(),t.preventDefault();let a=await this._getFilesFromEvent(t);this.uploadFiles(a,{uploadType:i})}function q(t){let e=!0;return t.dataTransfer&&"string"===t.dataTransfer.items[0].kind&&(e=!1),e}function $(t,e){this.isFileTypeDrag(t)&&(this.overCount++,this.el.querySelector(this.getDropCoverSelector()).classList.add("file-dropping"))}function H(t,e){this.isFileTypeDrag(t)&&(this.overCount--,0==this.overCount&&this._cleanupDropDone())}function U(t,e){t.preventDefault()}function W(){this.overCount=0,[...this.el.querySelectorAll(".file-dropping")].forEach((t=>t.classList.remove("file-dropping")))}function V(t,e){new w({title:"Create Directory",body:'<label>Directory name <input type="text" name="name" /></label>'}).open().then((async t=>{if(t){let e=this.currentNode.file.relPath+"/"+t.name;await this.sink.mkdir(e);let i=await this.sink.getFullFileInfo(e),n=this._fileToKalpaNode(i);this.tree.options.stream.emit("data",n);let a=this.tree.selected();a&&this.tree.expand(a.id)}}))}var R=i(799);function K(t){let e=R(t.children),i=Object.values(e),n=[];for(let t of i)n.push(...this._getAssociatedRealFiles(t).map((t=>t.name)));let a=t.children.filter((t=>!n.includes(t.name))).filter((t=>!t.directory));for(let t of i)t.thumbnailIcon="image",t.preview&&(t.thumbnail=this._createAccessUrl(t.preview.file));if(!this.imagesOnly)for(let t of a){let e={file:t,thumbnailIcon:"description"},n=t.name;e.ext=n.substring(n.lastIndexOf(".")+1),e.baseName=n.substring(0,n.lastIndexOf(".")),i.push(e)}for(let t of i)t.extensions=this._determineExtensions(t),t.sizes=this._determineSizes(t),t.sizes[0]==t.sizes[1]?t.size=this._formatBytes(t.sizes[0]):t.size=this._formatBytes(t.sizes[0])+" - "+this._formatBytes(t.sizes[1]);return i.sort(this._compareVariants),i}async function G(t){let e=[];if(t.dataTransfer.items){let i=[];[...t.dataTransfer.items].forEach(((t,e)=>{i.push(t)}));for(let t of i)if("file"===t.kind)if(t.webkitGetAsEntry){let i=t.webkitGetAsEntry();if(i){if(i.isDirectory)continue;e.push(t.getAsFile())}}else e.push(t.getAsFile());else t instanceof File&&e.push(t)}else[...t.dataTransfer.files].forEach(((t,i)=>{e.push(t)}));return e}function J(t){let e=[];return t.variants?e.push(...t.variants.map((t=>t.file))):e.push(t.file),t.definitionFile&&e.push(t.definitionFile),e}function Y(t){return t.accessUrl}function Z(){let t={boxes:[],variants:[],files:[],names:[]},e=this.el.querySelectorAll(".choice-boxes .variant-choice-box.selected");if(e.length>0){for(let i of e)t.boxes.push(i),t.variants.push(i.variant),t.files.push(...this._getAssociatedRealFiles(i.variant));let i=t.files.map((t=>t.name));t.names.push(...i)}return t}function Q(t){return 0==t.startsWith("/")&&(t="/"+t),t}async function X(t){if(t||(t=this.getSelectedFiles()),0==t.variants.length)return;let e,i=t.variants[0];e=i.primary?i.primary.file:i.file;let n=this._transformRelativeUrlToPublic(e.relPath);if(i.definitionFile){let t=await this.sink.read(i.definitionFile.relPath);try{let e=JSON.parse(t),i=e.displaySize.split("x");n+=`#format=webp2x&width=${i[0]}&height=${i[1]}`,e.altText&&(n+="&alt="+encodeURIComponent(e.altText))}catch(t){}}return n}function tt(t){let e;"string"==typeof t?e=t:t instanceof File&&(e=t.name);let i=e.split(".");i.length>1&&i.pop(),e=i.join("."),e=e.replace(/-@2x$/,""),e=e.replace(/@2x$/,""),e=e.replace(/-2x$/,""),e=e.replace(/2x$/,"");let n=[e.substring(0,1)];for(let t of e.substring(1))t.match(/[A-Z]/)&&n.push("-"),n.push(t);return e=n.join(""),e=e.toLowerCase(),e=e.replace(/[^1234567890a-z-]/g,"-"),e=e.replace(/--+/g,"-"),e}async function et(t){return new Promise(((e,i)=>{let n,a;if(t instanceof Image)n=t;else if("string"==typeof t)n=new Image,n.src=t;else{let e=new Blob([t]);a=URL.createObjectURL(e),n=new Image,n.src=a}function s(){a&&URL.revokeObjectURL(a),e(n)}n.complete?s():n.addEventListener("load",(()=>{s()}))}))}async function it(t,{maxWidth:e=1920,quality:i=.7,outputFormat:n="image/png"}={}){return new Promise((async(a,s)=>{try{let s=await et(t),o=s.naturalWidth/e,c=s.naturalHeight/o;var l=document.createElement("canvas");l.width=e,l.height=c;var r=l.getContext("2d");r.clearRect(0,0,l.width,l.height),r.drawImage(s,0,0,l.width,l.height),l.toBlob((t=>{a(t)}),n,i)}catch(t){console&&console.log&&console.log("error resizing image: "+t),s(t)}}))}async function nt(t){let e=await et(t);return{width:e.naturalWidth,height:e.naturalHeight}}let at={"image/png":"png","image/jpeg":"jpg","image/jpg":"jpg","image/webp":"webp"};function st(t){return t in at?at[t]:t.split("/").pop()}let lt="image/webp";async function rt(t,{singleDensityWidth:e=null,quality:i=.7,outputFormat:n="image/png",doubleDensityInput:a=!0,baseFileName:s,altText:l}={}){let r=await et(t),o=await nt(r),c=o.width/o.height;s||(s=""+(new Date).getTime()),e||(e=a?o.width/2:o.width);let d=2*e,u={"-2x":d,"":e,"-half":Math.floor(e/2),"-quarter":Math.floor(e/4)},h={};for(let t of Object.keys(u)){let e=u[t],a=await it(r,{maxWidth:e,quality:i,outputFormat:n});h[s+t+"."+st(n)]=a,a=await it(r,{maxWidth:e,quality:i,outputFormat:lt}),h[s+t+"."+st(lt)]=a}let p={name:s,size:d+"x"+d/c,displaySize:e+"x"+e/c,fallback:st(n),altText:l||s};return h[s+".json"]=JSON.stringify(p,null,"\t"),h}function ot(t){let e;"string"==typeof t?e=t:t instanceof File&&(e=t.name);let i=[tt(e)],n=e.split(".");return n.length>1&&i.push(n.pop()),i}async function ct(t){let e=tt(t),i=await async function(t){let e=await et(t),i=await nt(e);return i.ratio=i.width/i.height,i.ext=st(t.type),i}(t),n={nativeName:t.name,name:e,outputFormat:t.type,stats:i,width:Math.floor(i.width/2)},a=new w({title:"Upload File",body:u(n),data:n,dialogFrameClass:"webhandle-file-tree-image-browser"}).open(),s=await a;if(s){let e={baseFileName:s.name,outputFormat:s.outputFormat,singleDensityWidth:parseInt(s.width),altText:s.altText},i=this._addPending(t),n=await rt(t,e);for(let t of Object.keys(n))await this._uploadData(t,n[t]);return i&&i.remove(),!0}}async function dt(t){let e=ot(t),i={nativeName:t.name,name:e.join(".")},n=new w({title:"Upload File",body:h(i),data:i,dialogFrameClass:"webhandle-file-tree-image-browser"}).open(),a=await n;if(a){let e=this._addPending(t);return await this._uploadData(a.name,t),e&&e.remove(),!0}}async function ut(t){let e=this._addPending(t),i=ot(t)[0],n=await rt(t,{baseFileName:i,outputFormat:t.type});for(let t of Object.keys(n))await this._uploadData(t,n[t]);return e&&e.remove(),!0}async function ht(t,{uploadType:e}={}){for(let i of t){let t=!1;if("guided"===e&&this._isImageFile(i))t=await this._uploadGuidedImageFile(i);else if("guided"===e)t=await this._uploadGuidedFile(i);else if("automatic"===e&&this._isImageFile(i))t=await this._uploadAutomaticImageFile(i);else{let n=this._addPending(i);if("automatic"===e){let t=ot(i);await this._uploadData(t.join("."),i)}else await this._uploadData(i.name,i);n&&n.remove(),t=!0}this.eventNotificationPanel&&t&&this.eventNotificationPanel.addNotification({model:{status:"success",headline:`uploaded ${i.name}`},ttl:2e3})}this.setCurrentNode(this.currentNode)}function pt(t,e){this.el.querySelector(this.fileUploadSelector).click()}async function ft(t,e){t.preventDefault();let i=this.el.querySelector(this.fileUploadSelector);t.dataTransfer={files:i.files};let n=await this._getFilesFromEvent(t);n.length>0&&(this.uploadFiles(n,{uploadType:"guided"}),i.value="")}async function mt(t,e){let i=this.currentNode.file.relPath+"/"+this.sanitizeFileName(t);await this.sink.write(i,e)}async function gt(){return new Promise(((t,e)=>{let i=[],n=this.sink.find({file:!1});n.on("data",(t=>{i.push(t)})),n.on("done",(()=>{t(i)}))}))}class bt extends a{constructor(t){super(t)}preinitialize(){this.className="image-browser",this.idInd=1,this.nodes={},this.events={"click .create-directory":"createDirectory","click .upload-file":"_uploadFileButton",'change [name="fileUpload"]':"_uploadFile","click .delete-file":"deleteFile","click .delete-directory":"deleteDirectory","click .variant-choice-box .details":"showVariantDetails","dblclick .variant-choice-box":"showVariantDetails","click .variant-choice-box":"selectVariant","click .view-icons button":"changeFilesView",'keyup [name="filter"]':"applyFilter",'change [name="filter"]':"applyFilter","click .clear-filter":"clearFilter","dragenter .":"dragEnter","dragleave .":"dragLeave","dragover .":"dragOver","drop .":"handleDrop"},this.overCount=0,this.emitter||(this.emitter=new b),this.fileUploadSelector='input[name="fileUpload"]',document.addEventListener("paste",this.handlePaste.bind(this))}async handlePaste(t){this.ignoreGlobalEvents||(t.preventDefault(),t.clipboardData&&t.clipboardData.files&&t.clipboardData.files.length>0&&this.uploadFiles(t.clipboardData.files,{uploadType:"guided"}))}_addPending(t){let e;return this.eventNotificationPanel&&(e=this.eventNotificationPanel.addNotification({model:{status:"pending",headline:`uploading ${t.name}`}})),e}async render(){this.el.innerHTML=c(this.model),this.data=[],this.rootDirectory=await this.sink.getFullFileInfo(""),this.rootDirectory.name="Files";let t=this.rootNode=this._fileToKalpaNode(this.rootDirectory);this.data.push(t);let e=await this.findDirectories();this._sortFiles(e),this.data.push(...e.map(this._fileToKalpaNode.bind(this))),p({treeContainerSelector:`#${this.id} .treebox`,data:this.data}).then((t=>{if(this.tree=t,t.on("select",(t=>{this.setCurrentNode(t)})),t.on("selected",(t=>{let e=this.el.querySelector(".tree");e.style.height="99.99999%",setTimeout((()=>{e.style.height="100%"}),100)})),this.startingDirectory){for(let e of Object.values(this.tree.nodes))if(e.file&&e.file.relPath&&e.file.relPath==this.startingDirectory){t.select(e.id);break}}else t.select(1)}))}async setCurrentNode(t){this.currentNode=t;let e=await this.sink.getFullFileInfo(t.file.relPath),i=this.createVariantValues(e),n="";for(let t of i)n+=d(t);let a=this.el.querySelector(".choice-boxes");a.innerHTML="",a.insertAdjacentHTML("beforeend",n);for(let t=0;t<a.children.length;t++)a.children[t].variant=i[t];this.el.querySelector(".box-holder").scrollTop=0,this.applyFilter()}_uploadGuidedImageFile=ct;_uploadGuidedFile=dt;_uploadAutomaticImageFile=ut;uploadFiles=ht;_uploadFileButton=pt;_uploadFile=ft;createVariantValues=K;_getFilesFromEvent=G;_getAssociatedRealFiles=J;_createAccessUrl=Y;getSelectedFiles=Z;_transformRelativeUrlToPublic=Q;getSelectedUrl=X;createDirectory=V;getDropCoverSelector=M;handleDrop=B;isFileTypeDrag=q;dragEnter=$;dragLeave=H;dragOver=U;_cleanupDropDone=W;changeFilesView=L;applyFilter=A;clearFilter=N;selectVariant=P;showVariantDetails=I;sanitizeFileName=j;_sortFiles=O;_compareVariants=D;_determineExtensions=k;_determineSizes=E;_join=T;_determineParentPath=F;_fileToKalpaNode=S;_formatBytes=f;_isImageFile=C;deleteFile=x;deleteDirectory=_;_uploadData=mt;findDirectories=gt}var vt=i(161);let yt=bt,wt=class extends v{constructor(t){super(Object.assign({title:"Select A File",body:'<div class="webhandle-file-tree-image-browser" style="width: 87vw;"> </div>',afterOpen:function(t,e){let i=t.querySelector(".webhandle-file-tree-image-browser");if(i){let t={sink:e.sink,imagesOnly:e.imagesOnly,eventNotificationPanel:e.eventNotificationPanel,startingDirectory:e.startingDirectory,deleteWithoutConfirm:e.deleteWithoutConfirm},n=this.imageBrowserView=new bt(t);e._createAccessUrl&&(n._createAccessUrl=e._createAccessUrl),e._transformRelativeUrlToPublic&&(n._transformRelativeUrlToPublic=e._transformRelativeUrlToPublic),n.appendTo(i),n.render(),n.emitter.on("select",(async function(t){}))}}},t,{on:{".btn-ok":async()=>{let t={selection:this.imageBrowserView.getSelectedFiles()};return t.url=await this.imageBrowserView.getSelectedUrl(t.selection),this.resolve(t),!0},".mask":()=>(this.resolve(),!0),".btn-cancel":()=>(this.resolve(),!0)}}))}async open(){return this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e})),super.open(),this.promise}},xt=function(){if(!function(){let t=document.createElement("div");t.classList.add("webhandle-file-tree-image-browser-test"),t.style.position="absolute",t.style.left="-10000px",document.body.appendChild(t);let e=window.getComputedStyle(t)["background-color"];return t.remove(),"rgb(101, 105, 99)"===e}()){let t=document.createElement("link");t.href="@webhandle/tree-file-browser/resources/css/tree-browser.css",t.rel="stylesheet",document.head.appendChild(t)}vt()};"undefined"!=typeof window&&(window["@webhandle/tree-file-browser"]={ImageBrowserView:yt,FileSelectDialog:wt,loadStyles:xt});const _t=yt})();var a=n.DY,s=n.Tq,l=n.ZP,r=n.RM;export{a as FileSelectDialog,s as ImageBrowserView,l as default,r as loadStyles};
|
|
2
|
+
//# sourceMappingURL=tree-file-browser.js.map
|