vome-core 0.3.5 → 0.3.7

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 (72) hide show
  1. package/dist/admin/components/ui/avatar/index.js +1 -1
  2. package/dist/admin/components/ui/checkbox/index.js +1 -1
  3. package/dist/admin/components/ui/dialog/index.js +1 -1
  4. package/dist/admin/components/ui/dropdown-menu/index.js +1 -1
  5. package/dist/admin/components/ui/input/index.js +1 -1
  6. package/dist/admin/components/ui/label/index.js +1 -1
  7. package/dist/admin/components/ui/scroll-area/index.js +1 -1
  8. package/dist/admin/components/ui/select/index.js +1 -1
  9. package/dist/admin/components/ui/separator/index.js +1 -1
  10. package/dist/admin/components/ui/sheet/index.js +1 -1
  11. package/dist/admin/components/ui/sonner/index.js +1 -1
  12. package/dist/admin/components/ui/table/index.js +1 -1
  13. package/dist/admin/components/ui/tabs/index.js +1 -1
  14. package/dist/admin/components/ui/tooltip/index.js +1 -1
  15. package/dist/admin/components/vm-dept-tree.vue +110 -172
  16. package/dist/admin/crud/auto-fields.js +1 -1
  17. package/dist/admin/crud/components/vm-richtext-extensions.js +1 -1
  18. package/dist/admin/crud/components/vm-upload.vue +14 -8
  19. package/dist/admin/crud/config.js +1 -1
  20. package/dist/admin/crud/confirm.js +1 -1
  21. package/dist/admin/crud/crud-page-request.js +1 -1
  22. package/dist/admin/crud/data-i18n.js +1 -1
  23. package/dist/admin/crud/dict.js +1 -1
  24. package/dist/admin/crud/export-fetch.js +1 -1
  25. package/dist/admin/crud/key.js +1 -1
  26. package/dist/admin/crud/plugins.js +1 -1
  27. package/dist/admin/crud/span.js +1 -1
  28. package/dist/admin/crud/style.js +1 -1
  29. package/dist/admin/crud/validate.js +1 -1
  30. package/dist/admin/directives/perm.js +1 -1
  31. package/dist/admin/hooks/useUpload.js +1 -1
  32. package/dist/admin/lib/browser.js +1 -1
  33. package/dist/admin/lib/cn.js +1 -1
  34. package/dist/admin/lib/compress-image.js +32 -6
  35. package/dist/admin/lib/dialog-float.js +1 -1
  36. package/dist/admin/lib/export-excel.js +1 -1
  37. package/dist/admin/lib/import-excel.js +1 -1
  38. package/dist/admin/lib/json.js +1 -1
  39. package/dist/admin/lib/menu.js +1 -1
  40. package/dist/admin/lib/micro-locale.js +1 -1
  41. package/dist/admin/lib/micro-theme.js +1 -1
  42. package/dist/admin/lib/shell.js +1 -1
  43. package/dist/admin/lib/theme-color-options.js +1 -1
  44. package/dist/admin/lib/tree.js +1 -1
  45. package/dist/admin/lib/upload.js +1 -1
  46. package/dist/admin/lib/video-frame.js +1 -1
  47. package/dist/admin/router/create.js +1 -1
  48. package/dist/admin/router/guards.js +1 -1
  49. package/dist/ai/index.js +1 -1
  50. package/dist/client/ai-model-registry.js +1 -1
  51. package/dist/client/base.js +1 -1
  52. package/dist/client/configure.js +1 -1
  53. package/dist/client/dict.js +1 -1
  54. package/dist/client/eps-payload.js +1 -1
  55. package/dist/client/eps.js +1 -1
  56. package/dist/client/index.js +1 -1
  57. package/dist/client/locale-store.js +1 -1
  58. package/dist/client/service.js +1 -1
  59. package/dist/client/vite-admin.js +1 -1
  60. package/dist/client/vite-auto-import.js +1 -1
  61. package/dist/client/vite-micro-proxy.js +1 -1
  62. package/dist/client/vite-plugin-eps.js +1 -1
  63. package/dist/client/vite-resolve.js +1 -1
  64. package/dist/config/index.js +1 -1
  65. package/dist/index.js +1 -1
  66. package/dist/server/index.js +1 -1
  67. package/dist/shared/datetime-picker.js +1 -1
  68. package/dist/shared/excel.js +1 -1
  69. package/dist/shared/index.js +1 -1
  70. package/dist/shared/locale-json.js +1 -1
  71. package/dist/shared/tree.js +1 -1
  72. package/package.json +1 -1
@@ -5,7 +5,7 @@
5
5
  :loading="loading"
6
6
  :add="canAdd && !onlyTrashed"
7
7
  add-title="新增顶级部门"
8
- @refresh="load"
8
+ @refresh="emit('refresh')"
9
9
  @add="openAdd(null)"
10
10
  >
11
11
  <button
@@ -56,13 +56,13 @@
56
56
  </button>
57
57
  </div>
58
58
  <div v-else-if="!onlyTrashed && canManage" class="vm-dept-tree__ops" @click.stop>
59
- <button type="button" title="新增子部门" @click="openAdd(row.id)">
59
+ <button v-if="canAdd" type="button" title="新增子部门" @click="openAdd(row.id)">
60
60
  <i class="ri-add-line" />
61
61
  </button>
62
- <button type="button" title="编辑" @click="openEdit(row)">
62
+ <button v-if="canUpdate" type="button" title="编辑" @click="openEdit(row)">
63
63
  <i class="ri-edit-line" />
64
64
  </button>
65
- <button type="button" title="删除" @click="remove(row)">
65
+ <button v-if="canDelete" type="button" title="删除" @click="remove(row)">
66
66
  <i class="ri-delete-bin-line" />
67
67
  </button>
68
68
  </div>
@@ -101,20 +101,20 @@
101
101
  </template>
102
102
 
103
103
  <script setup lang="ts">
104
- import { useVome } from '../hooks/useVome'
105
- import { ref, computed, watch, onMounted } from 'vue'
104
+ import { ref, computed, watch } from 'vue'
106
105
  import { toast } from 'vue-sonner'
107
- import { deepTree } from '../crud'
106
+ import { flattenTree } from '../lib/tree'
108
107
  import { vmConfirm } from '../crud/confirm'
109
108
 
110
109
  defineOptions({ name: 'vm-dept-tree' })
111
110
 
112
- type DeptRow = {
111
+ /** 调用方须先组装好的树节点(含 children),组件不再做扁平→树转换 */
112
+ export type DeptTreeNode = {
113
113
  id: number
114
114
  parentId: number | null
115
115
  orderNum: number
116
116
  name: string
117
- children?: DeptRow[]
117
+ children?: DeptTreeNode[]
118
118
  }
119
119
 
120
120
  type FlatRow = {
@@ -129,64 +129,70 @@ type FlatRow = {
129
129
 
130
130
  const props = withDefaults(
131
131
  defineProps<{
132
+ /** 已是树形结构的部门数据 */
133
+ data?: DeptTreeNode[]
134
+ loading?: boolean
132
135
  modelValue?: number | null
133
136
  rootLabel?: string
134
- /** 回收站:只加载已软删部门 */
137
+ /** 回收站 UI:隐藏新增,显示恢复/彻底删除 */
135
138
  onlyTrashed?: boolean
139
+ canAdd?: boolean
140
+ canUpdate?: boolean
141
+ canDelete?: boolean
142
+ canRestore?: boolean
136
143
  }>(),
137
144
  {
145
+ data: () => [],
146
+ loading: false,
138
147
  modelValue: null,
139
148
  rootLabel: '全部',
140
149
  onlyTrashed: false,
150
+ canAdd: false,
151
+ canUpdate: false,
152
+ canDelete: false,
153
+ canRestore: false,
141
154
  },
142
155
  )
143
156
 
144
157
  const emit = defineEmits<{
145
158
  'update:modelValue': [v: number | null]
146
159
  change: [v: number | null, meta: { name: string; ids: number[] }]
147
- updated: []
160
+ refresh: []
161
+ add: [payload: { name: string; orderNum: number; parentId: number | null }]
162
+ update: [payload: { id: number; name: string; orderNum: number; parentId: number | null }]
163
+ delete: [payload: { id: number }]
164
+ restore: [payload: { id: number }]
165
+ forceDelete: [payload: { id: number }]
148
166
  }>()
149
167
 
150
- const { service } = useVome()
151
-
152
- const loading = ref(false)
153
168
  const submitting = ref(false)
154
- const rows = ref<DeptRow[]>([])
155
169
  const expanded = ref(new Set<number>())
156
170
  const formOpen = ref(false)
157
171
  const formMode = ref<'add' | 'edit'>('add')
158
172
  const form = ref({ id: 0, name: '', orderNum: '0', parentId: null as number | null })
159
173
  const parentName = ref('顶级')
174
+ const trashBusyId = ref<number | null>(null)
160
175
 
161
- const canAdd = computed(() => Boolean(service.base.department?._permission?.add))
162
176
  const canManage = computed(
163
- () =>
164
- Boolean(service.base.department?._permission?.update) ||
165
- Boolean(service.base.department?._permission?.delete) ||
166
- canAdd.value,
167
- )
168
- const canTrashOps = computed(
169
- () =>
170
- Boolean(service.base.department?._permission?.restore) ||
171
- Boolean(service.base.department?._permission?.delete),
177
+ () => props.canAdd || props.canUpdate || props.canDelete,
172
178
  )
173
- const trashBusyId = ref<number | null>(null)
179
+ const canTrashOps = computed(() => props.canRestore || props.canDelete)
174
180
 
175
181
  const idNameMap = computed(() => {
176
182
  const map = new Map<number, string>()
177
- const walk = (list: DeptRow[]) => {
183
+ const walk = (list: DeptTreeNode[]) => {
178
184
  for (const n of list) {
179
185
  map.set(n.id, n.name)
180
186
  if (n.children?.length) walk(n.children)
181
187
  }
182
188
  }
183
- walk(rows.value)
189
+ walk(props.data)
184
190
  return map
185
191
  })
186
192
 
187
193
  const descendantMap = computed(() => {
188
194
  const map = new Map<number, number[]>()
189
- const walk = (node: DeptRow): number[] => {
195
+ const walk = (node: DeptTreeNode): number[] => {
190
196
  let ids: number[] = []
191
197
  for (const c of node.children || []) {
192
198
  ids.push(c.id)
@@ -195,11 +201,11 @@ const descendantMap = computed(() => {
195
201
  map.set(node.id, ids)
196
202
  return ids
197
203
  }
198
- for (const n of rows.value) walk(n)
204
+ for (const n of props.data) walk(n)
199
205
  return map
200
206
  })
201
207
 
202
- function collectExpandable(list: DeptRow[], into: Set<number>) {
208
+ function collectExpandable(list: DeptTreeNode[], into: Set<number>) {
203
209
  for (const n of list) {
204
210
  if (n.children?.length) {
205
211
  into.add(n.id)
@@ -208,39 +214,21 @@ function collectExpandable(list: DeptRow[], into: Set<number>) {
208
214
  }
209
215
  }
210
216
 
211
- function toTree(list: Array<Record<string, unknown>>) {
212
- const flat = list
213
- .filter((d) => d.id != null)
214
- .map((d) => ({
215
- id: Number(d.id),
216
- parentId: d.parentId == null ? null : Number(d.parentId),
217
- orderNum: Number(d.orderNum ?? 0),
218
- name: String(d.name ?? ''),
219
- }))
220
- return deepTree(flat) as DeptRow[]
221
- }
222
-
223
- function flatten(nodes: DeptRow[], depth = 0, out: FlatRow[] = []) {
224
- for (const n of nodes) {
225
- const kids = n.children || []
226
- out.push({
227
- id: n.id,
228
- label: n.name,
229
- depth,
230
- hasChildren: kids.length > 0,
231
- visible: true,
232
- parentId: n.parentId,
233
- orderNum: n.orderNum,
234
- })
235
- if (kids.length && expanded.value.has(n.id)) flatten(kids, depth + 1, out)
236
- }
237
- return out
238
- }
239
-
240
- const visibleRows = computed(() => flatten(rows.value))
217
+ const visibleRows = computed((): FlatRow[] => {
218
+ const flat = flattenTree(props.data, expanded.value)
219
+ return flat.map((n) => ({
220
+ id: n.id as number,
221
+ label: n.name,
222
+ depth: n.depth,
223
+ hasChildren: n.hasChildren,
224
+ visible: true,
225
+ parentId: n.parentId ?? null,
226
+ orderNum: n.orderNum ?? 0,
227
+ }))
228
+ })
241
229
 
242
230
  const emptyText = computed(() => {
243
- if (loading.value || visibleRows.value.length) return ''
231
+ if (props.loading || visibleRows.value.length) return ''
244
232
  return props.onlyTrashed ? '回收站为空' : '暂无部门'
245
233
  })
246
234
 
@@ -262,83 +250,25 @@ function toggleExpand(id: number) {
262
250
  expanded.value = next
263
251
  }
264
252
 
265
- async function load() {
266
- loading.value = true
267
- try {
268
- const list = (await service.base.department.tree({
269
- onlyTrashed: props.onlyTrashed || undefined,
270
- })) as Array<Record<string, unknown>>
271
- rows.value = toTree(Array.isArray(list) ? list : [])
272
- const next = new Set<number>()
273
- collectExpandable(rows.value, next)
274
- expanded.value = next
275
- if (props.modelValue != null && !idNameMap.value.has(props.modelValue)) {
276
- select(null)
277
- }
278
- } catch (e) {
279
- console.error('[dept-tree] load failed', e)
280
- rows.value = []
281
- toast.error('加载部门失败')
282
- } finally {
283
- loading.value = false
284
- }
285
- }
286
-
287
- async function restoreDept(row: FlatRow) {
288
- if (trashBusyId.value === row.id) return
289
- const ok = await vmConfirm({
290
- title: '恢复部门',
291
- message: `确定恢复「${row.label}」?`,
292
- confirmText: '恢复',
293
- cancelText: '取消',
294
- })
295
- if (!ok) return
296
- trashBusyId.value = row.id
297
- try {
298
- await service.base.department.restore({ ids: [row.id] })
299
- toast.success('已恢复')
300
- if (props.modelValue === row.id) select(null)
301
- await load()
302
- emit('updated')
303
- } catch (e) {
304
- console.error(e)
305
- const err = e as Error & { toasted?: boolean }
306
- if (!err.toasted) toast.error(e instanceof Error ? e.message : '恢复失败')
307
- } finally {
308
- trashBusyId.value = null
253
+ function syncExpandedFromData() {
254
+ const next = new Set<number>()
255
+ collectExpandable(props.data, next)
256
+ expanded.value = next
257
+ if (props.modelValue != null && !idNameMap.value.has(props.modelValue)) {
258
+ select(null)
309
259
  }
310
260
  }
311
261
 
312
- async function forceDeleteDept(row: FlatRow) {
313
- if (trashBusyId.value === row.id) return
314
- const ok = await vmConfirm({
315
- title: '彻底删除',
316
- message: `确定彻底删除「${row.label}」?此操作不可恢复。`,
317
- confirmText: '彻底删除',
318
- cancelText: '取消',
319
- })
320
- if (!ok) return
321
- trashBusyId.value = row.id
322
- try {
323
- await service.base.department.delete({ ids: [row.id], force: true })
324
- toast.success('已彻底删除')
325
- if (props.modelValue === row.id) select(null)
326
- await load()
327
- emit('updated')
328
- } catch (e) {
329
- console.error(e)
330
- const err = e as Error & { toasted?: boolean }
331
- if (!err.toasted) toast.error(e instanceof Error ? e.message : '删除失败')
332
- } finally {
333
- trashBusyId.value = null
334
- }
335
- }
262
+ watch(
263
+ () => props.data,
264
+ () => syncExpandedFromData(),
265
+ { deep: true, immediate: true },
266
+ )
336
267
 
337
268
  watch(
338
269
  () => props.onlyTrashed,
339
270
  () => {
340
271
  select(null)
341
- void load()
342
272
  },
343
273
  )
344
274
 
@@ -363,36 +293,25 @@ function openEdit(row: FlatRow) {
363
293
  formOpen.value = true
364
294
  }
365
295
 
366
- async function submitForm() {
296
+ function submitForm() {
367
297
  const name = form.value.name.trim()
368
298
  if (!name) {
369
299
  toast.error('请填写部门名称')
370
300
  return
371
301
  }
372
302
  submitting.value = true
373
- try {
374
- const payload = {
375
- name,
376
- orderNum: Number(form.value.orderNum || 0),
377
- parentId: form.value.parentId,
378
- }
379
- if (formMode.value === 'add') {
380
- await service.base.department.add(payload)
381
- toast.success('已新增部门')
382
- } else {
383
- await service.base.department.update({ ...payload, id: form.value.id })
384
- toast.success('已保存部门')
385
- }
386
- formOpen.value = false
387
- await load()
388
- emit('updated')
389
- } catch (e) {
390
- console.error(e)
391
- const err = e as Error & { toasted?: boolean }
392
- if (!err.toasted) toast.error(e instanceof Error ? e.message : '保存失败')
393
- } finally {
394
- submitting.value = false
303
+ const payload = {
304
+ name,
305
+ orderNum: Number(form.value.orderNum || 0),
306
+ parentId: form.value.parentId,
307
+ }
308
+ if (formMode.value === 'add') {
309
+ emit('add', payload)
310
+ } else {
311
+ emit('update', { ...payload, id: form.value.id })
395
312
  }
313
+ formOpen.value = false
314
+ submitting.value = false
396
315
  }
397
316
 
398
317
  async function remove(row: FlatRow) {
@@ -403,27 +322,41 @@ async function remove(row: FlatRow) {
403
322
  cancelText: '取消',
404
323
  })
405
324
  if (!ok) return
406
- submitting.value = true
407
- try {
408
- await service.base.department.delete({ ids: [row.id] })
409
- toast.success('已删除')
410
- if (props.modelValue === row.id) select(null)
411
- await load()
412
- emit('updated')
413
- } catch (e) {
414
- console.error(e)
415
- const err = e as Error & { toasted?: boolean }
416
- if (!err.toasted) toast.error(e instanceof Error ? e.message : '删除失败')
417
- } finally {
418
- submitting.value = false
419
- }
325
+ if (props.modelValue === row.id) select(null)
326
+ emit('delete', { id: row.id })
420
327
  }
421
328
 
422
- onMounted(() => {
423
- void load()
424
- })
329
+ async function restoreDept(row: FlatRow) {
330
+ if (trashBusyId.value === row.id) return
331
+ const ok = await vmConfirm({
332
+ title: '恢复部门',
333
+ message: `确定恢复「${row.label}」?`,
334
+ confirmText: '恢复',
335
+ cancelText: '取消',
336
+ })
337
+ if (!ok) return
338
+ trashBusyId.value = row.id
339
+ if (props.modelValue === row.id) select(null)
340
+ emit('restore', { id: row.id })
341
+ trashBusyId.value = null
342
+ }
425
343
 
426
- defineExpose({ load, idNameMap })
344
+ async function forceDeleteDept(row: FlatRow) {
345
+ if (trashBusyId.value === row.id) return
346
+ const ok = await vmConfirm({
347
+ title: '彻底删除',
348
+ message: `确定彻底删除「${row.label}」?此操作不可恢复。`,
349
+ confirmText: '彻底删除',
350
+ cancelText: '取消',
351
+ })
352
+ if (!ok) return
353
+ trashBusyId.value = row.id
354
+ if (props.modelValue === row.id) select(null)
355
+ emit('forceDelete', { id: row.id })
356
+ trashBusyId.value = null
357
+ }
358
+
359
+ defineExpose({ idNameMap })
427
360
  </script>
428
361
 
429
362
  <style lang="scss" scoped>
@@ -529,6 +462,11 @@ defineExpose({ load, idNameMap })
529
462
  background: var(--card);
530
463
  color: var(--brand);
531
464
  }
465
+
466
+ &:disabled {
467
+ opacity: 0.5;
468
+ cursor: not-allowed;
469
+ }
532
470
  }
533
471
  }
534
472
 
@@ -1 +1 @@
1
- const _0x20a5f5=_0x37a4;(function(_0x113d9,_0x2bc9a7){const _0x943a08=_0x37a4,_0x577fec=_0x113d9();while(!![]){try{const _0x36f6c7=parseInt(_0x943a08(0x12d))/0x1*(-parseInt(_0x943a08(0x15e))/0x2)+-parseInt(_0x943a08(0x15f))/0x3*(-parseInt(_0x943a08(0x163))/0x4)+-parseInt(_0x943a08(0x154))/0x5*(parseInt(_0x943a08(0x15c))/0x6)+-parseInt(_0x943a08(0x148))/0x7+-parseInt(_0x943a08(0x138))/0x8*(-parseInt(_0x943a08(0x144))/0x9)+parseInt(_0x943a08(0x141))/0xa+parseInt(_0x943a08(0x13c))/0xb*(-parseInt(_0x943a08(0x147))/0xc);if(_0x36f6c7===_0x2bc9a7)break;else _0x577fec['push'](_0x577fec['shift']());}catch(_0x3b8c1c){_0x577fec['push'](_0x577fec['shift']());}}}(_0x4e2b,0xcdab4));import{findEpsEntity}from'../lib/eps';import{getDictOptions}from'../../client';export const UPSERT_BUILTIN_IGNORE=['id',_0x20a5f5(0x128),_0x20a5f5(0x142),_0x20a5f5(0x130),_0x20a5f5(0x13e)];export const TABLE_BUILTIN_IGNORE=[_0x20a5f5(0x13e),_0x20a5f5(0x130)];function dictKeyOf(_0xc9c8c1){const _0xb724aa=_0x20a5f5;if(typeof _0xc9c8c1['dict']===_0xb724aa(0x146)&&_0xc9c8c1[_0xb724aa(0x131)])return _0xc9c8c1[_0xb724aa(0x131)];if(Array[_0xb724aa(0x153)](_0xc9c8c1[_0xb724aa(0x131)])&&_0xc9c8c1[_0xb724aa(0x131)][0x0])return _0xc9c8c1[_0xb724aa(0x131)][0x0];return;}function isSwitchDict(_0x18e60d){const _0x3cadae=_0x20a5f5;return _0x18e60d==='status'||_0x18e60d===_0x3cadae(0x165);}function switchFormItem(_0x3133ed,_0x4b8aab,_0x46c863){const _0x36f0be=_0x20a5f5;return{..._0x3133ed,'type':_0x36f0be(0x134),'value':_0x46c863,'dict':_0x4b8aab,'component':{'props':()=>mapDictOptions(_0x4b8aab)}};}export function mapDictOptions(_0x4e66d9){const _0x227b2f=_0x20a5f5;return getDictOptions(_0x4e66d9)[_0x227b2f(0x145)](_0x421c0a=>{const _0x1c0f02=_0x227b2f;let _0x4aef30=_0x421c0a['value'];return typeof _0x421c0a[_0x1c0f02(0x15b)]===_0x1c0f02(0x146)&&/^-?\d+(\.\d+)?$/[_0x1c0f02(0x158)](_0x421c0a[_0x1c0f02(0x15b)])&&(_0x4aef30=Number(_0x421c0a[_0x1c0f02(0x15b)])),{'label':String(_0x421c0a['label']??''),'value':_0x4aef30,'color':_0x421c0a[_0x1c0f02(0x14f)]};});}function isMainTableCol(_0x3a5119){const _0x2c0b44=_0x20a5f5;return!_0x3a5119['source']||_0x3a5119[_0x2c0b44(0x13f)][_0x2c0b44(0x150)]('a.');}function _0x4e2b(){const _0x57bc6b=['nteYntu3oe51C3nkwG','AwDUB3jLrMLLBgrZ','nZG0C1jdqNng','nZaXmdqZqMjSAKvd','C2vSzwn0','BNvTyMvY','Dgv4DgfYzwe','mtzzsuHXrKm','zgvSzxrL','EwvZx25V','C2nHBgu','DgvUyw50swq','ugDjBNrLz2vY','CMvXDwLYzwq','y29TBwvUDa','ugDeB3vIBgvqCMvJAxnPB24','otqXBeTmAMfw','yM9VBgvHBG','zwrPDa','DxbKyxrLvgLTzq','zgLJDa','y29SDw1UCW','ChvZAa','C3DPDgnO','zMLSDgvY','ugDoDw1LCMLJ','ugDcB29SzwfU','mtzSr2PSr0O','C3fSvhLWzq','CgfNzunVBhvTBNm','C3rHDhvZ','mty1ANDuENjP','ugDcAwDjBNq','zgvSzxrLvgLTzq','C291CMnL','Dgv4Da','nZeYnJq5mfnsB1LJBa','y3jLyxrLvgLTzq','ugDtBwfSBeLUDa','mZK5mJyZngjpufHQua','BwfW','C3rYAw5N','mJa1ndG4vgTpzgnk','mtq4ntq3mgLKvxjfEa','C2vSzwn0Aw9U','ChjVCgvYDhLoyw1L','BMfTzxnWywnL','ugDtBwfSBfnLCMLHBa','ugDcAwDtzxjPywW','DM0TC3DPDgnO','y29SB3i','C3rHCNrZv2L0Aa','Aw5WDxq','zNvUy3rPB24','AxnbCNjHEq','nwXmv21YuW','Dg9mB3DLCKnHC2u','ChjVCa','AgfZ','DgvZDa','ugDtzxjPywW','DhLWzq','DMfSDwu'];_0x4e2b=function(){return _0x57bc6b;};return _0x4e2b();}function epsColumns(_0x17bcc8){const _0xc62772=_0x20a5f5,_0x4d9aa5=_0x17bcc8[_0xc62772(0x14b)]?findEpsEntity('/'+_0x17bcc8[_0xc62772(0x14b)]):undefined;if(!_0x4d9aa5)return[];const _0x1e2d9c=[..._0x4d9aa5[_0xc62772(0x132)]||[],..._0x4d9aa5[_0xc62772(0x13a)]||[]],_0xbb487c=new Set(),_0xc646e7=[];for(const _0x35b8e5 of _0x1e2d9c){if(!_0x35b8e5[_0xc62772(0x14a)]||!isMainTableCol(_0x35b8e5))continue;if(_0xbb487c[_0xc62772(0x157)](_0x35b8e5['propertyName']))continue;_0xbb487c['add'](_0x35b8e5[_0xc62772(0x14a)]),_0xc646e7[_0xc62772(0x133)](_0x35b8e5);}return _0xc646e7;}function columnTypeOf(_0x1bd238){return String(_0x1bd238['columnType']||'');}function _0x37a4(_0x34e773,_0x1f1fe6){_0x34e773=_0x34e773-0x128;const _0x4e2b84=_0x4e2b();let _0x37a437=_0x4e2b84[_0x34e773];if(_0x37a4['zmnfKl']===undefined){var _0x1ba4cd=function(_0x5e8b17){const _0x2baef8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xc9c8c1='',_0x18e60d='';for(let _0x3133ed=0x0,_0x4b8aab,_0x46c863,_0x4e66d9=0x0;_0x46c863=_0x5e8b17['charAt'](_0x4e66d9++);~_0x46c863&&(_0x4b8aab=_0x3133ed%0x4?_0x4b8aab*0x40+_0x46c863:_0x46c863,_0x3133ed++%0x4)?_0xc9c8c1+=String['fromCharCode'](0xff&_0x4b8aab>>(-0x2*_0x3133ed&0x6)):0x0){_0x46c863=_0x2baef8['indexOf'](_0x46c863);}for(let _0x421c0a=0x0,_0x4aef30=_0xc9c8c1['length'];_0x421c0a<_0x4aef30;_0x421c0a++){_0x18e60d+='%'+('00'+_0xc9c8c1['charCodeAt'](_0x421c0a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x18e60d);};_0x37a4['QZEiDV']=_0x1ba4cd,_0x37a4['cBWlvz']={},_0x37a4['zmnfKl']=!![];}const _0x16e36e=_0x4e2b84[0x0],_0xb5554c=_0x34e773+_0x16e36e,_0x312ea8=_0x37a4['cBWlvz'][_0xb5554c];return!_0x312ea8?(_0x37a437=_0x37a4['QZEiDV'](_0x37a437),_0x37a4['cBWlvz'][_0xb5554c]=_0x37a437):_0x37a437=_0x312ea8,_0x37a437;}function sqlTypeOf(_0x2e09ae){const _0x50a439=_0x20a5f5;return String(_0x2e09ae[_0x50a439(0x139)]||'')[_0x50a439(0x155)]();}function isTextCol(_0x57922c){const _0x45dcb5=_0x20a5f5,_0x2bd8e0=columnTypeOf(_0x57922c);if(_0x2bd8e0==='PgText')return!![];return sqlTypeOf(_0x57922c)===_0x45dcb5(0x140);}function isIntegerCol(_0x40586a){const _0x22eb87=_0x20a5f5,_0x42c615=columnTypeOf(_0x40586a);if(_0x42c615===_0x22eb87(0x129)||_0x42c615===_0x22eb87(0x159)||_0x42c615===_0x22eb87(0x143)||_0x42c615===_0x22eb87(0x13d)||_0x42c615===_0x22eb87(0x14c)||_0x42c615===_0x22eb87(0x14d))return!![];if(_0x40586a[_0x22eb87(0x15a)]===_0x22eb87(0x161)&&!isNumericCol(_0x40586a))return!![];return/^(integer|serial|smallint|bigint|smallserial|bigserial)\b/[_0x22eb87(0x158)](sqlTypeOf(_0x40586a));}function isNumericCol(_0x48329d){const _0x428ca7=_0x20a5f5,_0x187ba0=columnTypeOf(_0x48329d);if(_0x187ba0===_0x428ca7(0x136)||_0x187ba0===_0x428ca7(0x12c)||_0x187ba0==='PgReal')return!![];return/^(numeric|decimal|double|real)\b/[_0x428ca7(0x158)](sqlTypeOf(_0x48329d));}function isBooleanCol(_0x25c0f1){const _0x3e20e2=_0x20a5f5;return columnTypeOf(_0x25c0f1)===_0x3e20e2(0x137)||_0x25c0f1[_0x3e20e2(0x15a)]===_0x3e20e2(0x12e)||sqlTypeOf(_0x25c0f1)[_0x3e20e2(0x150)](_0x3e20e2(0x12e));}function numberPrecision(_0x3c35ec){const _0x4dc930=_0x20a5f5;if(isIntegerCol(_0x3c35ec))return 0x0;if(typeof _0x3c35ec[_0x4dc930(0x166)]==='number')return _0x3c35ec[_0x4dc930(0x166)];return 0x2;}export function mergeByProp(_0x1cc1e5,_0xfbab8c){const _0x2e8ab6=_0x20a5f5,_0x2575dc=_0xfbab8c[_0x2e8ab6(0x135)](_0x47e5ee=>Boolean(_0x47e5ee['prop'])),_0x563952=_0xfbab8c['filter'](_0x1e189c=>!_0x1e189c[_0x2e8ab6(0x156)]&&_0x1e189c[_0x2e8ab6(0x15a)]),_0x880558=new Map(_0x2575dc['map'](_0x3b26d4=>[String(_0x3b26d4[_0x2e8ab6(0x156)]),_0x3b26d4])),_0x417e59=new Set(_0x563952[_0x2e8ab6(0x145)](_0x163978=>String(_0x163978['type']))),_0x4056d8=new Set(),_0x5a4dd5=[];for(const _0x2f030f of _0x1cc1e5){if(!_0x2f030f[_0x2e8ab6(0x156)]&&_0x2f030f[_0x2e8ab6(0x15a)]){if(_0x417e59[_0x2e8ab6(0x157)](String(_0x2f030f['type'])))continue;_0x5a4dd5[_0x2e8ab6(0x133)](_0x2f030f);continue;}if(!_0x2f030f[_0x2e8ab6(0x156)])continue;const _0x37f922=String(_0x2f030f['prop']),_0xa5d20b=_0x880558['get'](_0x37f922);_0xa5d20b?(_0x5a4dd5[_0x2e8ab6(0x133)]({..._0x2f030f,..._0xa5d20b}),_0x4056d8['add'](_0x37f922)):_0x5a4dd5['push'](_0x2f030f);}for(const _0x5d0d83 of _0x2575dc){const _0x50af84=String(_0x5d0d83['prop']);if(!_0x4056d8[_0x2e8ab6(0x157)](_0x50af84))_0x5a4dd5['push'](_0x5d0d83);}return _0x5a4dd5[_0x2e8ab6(0x133)](..._0x563952),_0x5a4dd5;}export function sortRequiredFirst(_0xf3a7cb){const _0x53f255=_0x20a5f5,_0x5712ff=[],_0x53380f=[];for(const _0x71ef30 of _0xf3a7cb){_0x71ef30['required']===!![]||typeof _0x71ef30[_0x53f255(0x12a)]===_0x53f255(0x152)?_0x5712ff[_0x53f255(0x133)](_0x71ef30):_0x53380f['push'](_0x71ef30);}return[..._0x5712ff,..._0x53380f];}export function buildAutoUpsertItems(_0x1b2632,_0x5a3e16={}){const _0x4fbc2=_0x20a5f5,_0x656b48=new Set([...UPSERT_BUILTIN_IGNORE,..._0x5a3e16[_0x4fbc2(0x15d)]||[]]),_0xf264d1=[];for(const _0x1497b9 of epsColumns(_0x1b2632)){const _0x5060ea=_0x1497b9['propertyName'];if(_0x656b48[_0x4fbc2(0x157)](_0x5060ea))continue;const _0x374752=_0x1497b9[_0x4fbc2(0x12b)]||_0x5060ea,_0x4ebee1=dictKeyOf(_0x1497b9),_0x2062e4=_0x1497b9['nullable']===![]&&_0x1497b9['hasDefault']!==!![],_0x1e0818={'prop':_0x5060ea,'label':_0x374752,'span':0xc,..._0x2062e4?{'required':!![]}:{}};if(_0x5060ea===_0x4fbc2(0x13b)){const _0x2446c9=_0x4ebee1||'status';isSwitchDict(_0x2446c9)?_0xf264d1['push'](switchFormItem(_0x1e0818,_0x2446c9,0x1)):_0xf264d1[_0x4fbc2(0x133)]({..._0x1e0818,'type':'select','dict':_0x2446c9,'value':0x1});continue;}if(_0x4ebee1){isSwitchDict(_0x4ebee1)?_0xf264d1[_0x4fbc2(0x133)](switchFormItem(_0x1e0818,_0x4ebee1,_0x4ebee1===_0x4fbc2(0x165)?![]:0x1)):_0xf264d1[_0x4fbc2(0x133)]({..._0x1e0818,'type':_0x4fbc2(0x160),'dict':_0x4ebee1,'value':0x0});continue;}if(isTextCol(_0x1497b9)){_0xf264d1['push']({..._0x1e0818,'type':_0x4fbc2(0x162),'span':0xc});continue;}if(isBooleanCol(_0x1497b9)){_0xf264d1[_0x4fbc2(0x133)]({..._0x1e0818,'type':_0x4fbc2(0x134),'value':![],'component':{'props':()=>mapDictOptions(_0x4fbc2(0x165))},'dict':'yes_no'});continue;}if(isIntegerCol(_0x1497b9)||isNumericCol(_0x1497b9)){const _0x422fb4=numberPrecision(_0x1497b9);_0xf264d1['push']({..._0x1e0818,'type':'number','component':{'props':{'type':_0x4fbc2(0x161),'precision':_0x422fb4,'controls':![]}}});continue;}_0xf264d1[_0x4fbc2(0x133)]({..._0x1e0818,'type':_0x4fbc2(0x151)});}return _0xf264d1;}export function buildAutoTableColumns(_0xf48e4f,_0xc07f86={}){const _0x422d34=_0x20a5f5,_0x136e9a=new Set([...TABLE_BUILTIN_IGNORE,..._0xc07f86[_0x422d34(0x15d)]||[]]),_0x37e590=[];!_0x136e9a['has'](_0x422d34(0x149))&&_0x37e590[_0x422d34(0x133)]({'type':_0x422d34(0x149),'width':0x32});for(const _0x1d8325 of epsColumns(_0xf48e4f)){const _0x5ae8e6=_0x1d8325['propertyName'];if(_0x136e9a[_0x422d34(0x157)](_0x5ae8e6))continue;const _0x57d7f9=_0x1d8325[_0x422d34(0x12b)]||_0x5ae8e6,_0x1e55ca=dictKeyOf(_0x1d8325);if(_0x5ae8e6==='status'){const _0x4fc031=_0x1e55ca||'status';isSwitchDict(_0x4fc031)?_0x37e590['push']({'prop':_0x5ae8e6,'label':_0x57d7f9,'width':0x50,'fixed':'right','component':{'name':_0x422d34(0x14e),'props':()=>mapDictOptions(_0x4fc031)}}):_0x37e590[_0x422d34(0x133)]({'prop':_0x5ae8e6,'label':_0x57d7f9,'width':0x64,'fixed':'right','dict':()=>mapDictOptions(_0x4fc031)});continue;}if(_0x1e55ca&&isSwitchDict(_0x1e55ca)){_0x37e590[_0x422d34(0x133)]({'prop':_0x5ae8e6,'label':_0x57d7f9,'width':0x50,'component':{'name':'vm-switch','props':()=>mapDictOptions(_0x1e55ca)}});continue;}if(_0x5ae8e6==='id'){_0x37e590['push']({'prop':_0x5ae8e6,'label':_0x57d7f9,'width':0x50});continue;}if(_0x5ae8e6===_0x422d34(0x142)){_0x37e590[_0x422d34(0x133)]({'prop':_0x5ae8e6,'label':_0x57d7f9,'width':0xa0});continue;}if(_0x1e55ca){_0x37e590[_0x422d34(0x133)]({'prop':_0x5ae8e6,'label':_0x57d7f9,'minWidth':0x78,'dict':()=>mapDictOptions(_0x1e55ca)});continue;}if(isTextCol(_0x1d8325)){_0x37e590['push']({'prop':_0x5ae8e6,'label':_0x57d7f9,'minWidth':0xa0,'showOverflowTooltip':!![]});continue;}_0x37e590[_0x422d34(0x133)]({'prop':_0x5ae8e6,'label':_0x57d7f9,'minWidth':0x78});}return!_0x136e9a[_0x422d34(0x157)]('op')&&_0x37e590[_0x422d34(0x133)]({'type':'op','buttons':[_0x422d34(0x12f),_0x422d34(0x164)]}),_0x37e590;}
1
+ const _0x45a85d=_0x4372;(function(_0x55faf8,_0x5e7d3f){const _0x3b3cec=_0x4372,_0x3ecbaa=_0x55faf8();while(!![]){try{const _0x5bed51=-parseInt(_0x3b3cec(0x230))/0x1+parseInt(_0x3b3cec(0x215))/0x2*(-parseInt(_0x3b3cec(0x202))/0x3)+parseInt(_0x3b3cec(0x22f))/0x4*(parseInt(_0x3b3cec(0x207))/0x5)+-parseInt(_0x3b3cec(0x226))/0x6*(parseInt(_0x3b3cec(0x20c))/0x7)+-parseInt(_0x3b3cec(0x1f7))/0x8*(parseInt(_0x3b3cec(0x206))/0x9)+parseInt(_0x3b3cec(0x1f8))/0xa*(parseInt(_0x3b3cec(0x221))/0xb)+-parseInt(_0x3b3cec(0x1fb))/0xc*(-parseInt(_0x3b3cec(0x1f2))/0xd);if(_0x5bed51===_0x5e7d3f)break;else _0x3ecbaa['push'](_0x3ecbaa['shift']());}catch(_0x1a8d6b){_0x3ecbaa['push'](_0x3ecbaa['shift']());}}}(_0x163e,0xd6b99));import{findEpsEntity}from'../lib/eps';import{getDictOptions}from'../../client';export const UPSERT_BUILTIN_IGNORE=['id',_0x45a85d(0x225),_0x45a85d(0x231),_0x45a85d(0x21d),_0x45a85d(0x209)];export const TABLE_BUILTIN_IGNORE=[_0x45a85d(0x209),_0x45a85d(0x21d)];function dictKeyOf(_0x3117d9){const _0x2ff6e7=_0x45a85d;if(typeof _0x3117d9[_0x2ff6e7(0x22c)]===_0x2ff6e7(0x229)&&_0x3117d9['dict'])return _0x3117d9[_0x2ff6e7(0x22c)];if(Array['isArray'](_0x3117d9[_0x2ff6e7(0x22c)])&&_0x3117d9[_0x2ff6e7(0x22c)][0x0])return _0x3117d9[_0x2ff6e7(0x22c)][0x0];return;}function isSwitchDict(_0x44670c){const _0x2560bf=_0x45a85d;return _0x44670c===_0x2560bf(0x1f0)||_0x44670c===_0x2560bf(0x21e);}function switchFormItem(_0x2f5d28,_0x36cbaf,_0x1c8a00){const _0x247c18=_0x45a85d;return{..._0x2f5d28,'type':_0x247c18(0x201),'value':_0x1c8a00,'dict':_0x36cbaf,'component':{'props':()=>mapDictOptions(_0x36cbaf)}};}export function mapDictOptions(_0xa10124){const _0x411bc8=_0x45a85d;return getDictOptions(_0xa10124)[_0x411bc8(0x21b)](_0x1f5748=>{const _0x2f22a9=_0x411bc8;let _0x1b38b6=_0x1f5748[_0x2f22a9(0x1f4)];return typeof _0x1f5748[_0x2f22a9(0x1f4)]===_0x2f22a9(0x229)&&/^-?\d+(\.\d+)?$/[_0x2f22a9(0x1f3)](_0x1f5748['value'])&&(_0x1b38b6=Number(_0x1f5748['value'])),{'label':String(_0x1f5748[_0x2f22a9(0x214)]??''),'value':_0x1b38b6,'color':_0x1f5748[_0x2f22a9(0x204)]};});}function isMainTableCol(_0xbe0e78){const _0x418137=_0x45a85d;return!_0xbe0e78[_0x418137(0x21a)]||_0xbe0e78[_0x418137(0x21a)][_0x418137(0x227)]('a.');}function epsColumns(_0x97fa14){const _0x20371d=_0x45a85d,_0x538bc2=_0x97fa14[_0x20371d(0x22e)]?findEpsEntity('/'+_0x97fa14[_0x20371d(0x22e)]):undefined;if(!_0x538bc2)return[];const _0x39864d=[..._0x538bc2[_0x20371d(0x21f)]||[],..._0x538bc2[_0x20371d(0x1f1)]||[]],_0x4e37f5=new Set(),_0x1a35b7=[];for(const _0x4d387b of _0x39864d){if(!_0x4d387b[_0x20371d(0x223)]||!isMainTableCol(_0x4d387b))continue;if(_0x4e37f5['has'](_0x4d387b['propertyName']))continue;_0x4e37f5[_0x20371d(0x211)](_0x4d387b[_0x20371d(0x223)]),_0x1a35b7[_0x20371d(0x208)](_0x4d387b);}return _0x1a35b7;}function columnTypeOf(_0x154806){const _0x3c6b51=_0x45a85d;return String(_0x154806[_0x3c6b51(0x1ff)]||'');}function sqlTypeOf(_0x504020){const _0x4f800c=_0x45a85d;return String(_0x504020[_0x4f800c(0x200)]||'')[_0x4f800c(0x1fa)]();}function _0x4372(_0x57b19b,_0xe6c90){_0x57b19b=_0x57b19b-0x1f0;const _0x163e33=_0x163e();let _0x4372e2=_0x163e33[_0x57b19b];if(_0x4372['msEkHe']===undefined){var _0x7ffeea=function(_0x48a8e6){const _0x462c38='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3117d9='',_0x44670c='';for(let _0x2f5d28=0x0,_0x36cbaf,_0x1c8a00,_0xa10124=0x0;_0x1c8a00=_0x48a8e6['charAt'](_0xa10124++);~_0x1c8a00&&(_0x36cbaf=_0x2f5d28%0x4?_0x36cbaf*0x40+_0x1c8a00:_0x1c8a00,_0x2f5d28++%0x4)?_0x3117d9+=String['fromCharCode'](0xff&_0x36cbaf>>(-0x2*_0x2f5d28&0x6)):0x0){_0x1c8a00=_0x462c38['indexOf'](_0x1c8a00);}for(let _0x1f5748=0x0,_0x1b38b6=_0x3117d9['length'];_0x1f5748<_0x1b38b6;_0x1f5748++){_0x44670c+='%'+('00'+_0x3117d9['charCodeAt'](_0x1f5748)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x44670c);};_0x4372['QxcDCU']=_0x7ffeea,_0x4372['klwhNr']={},_0x4372['msEkHe']=!![];}const _0x433be3=_0x163e33[0x0],_0x47afe0=_0x57b19b+_0x433be3,_0x366602=_0x4372['klwhNr'][_0x47afe0];return!_0x366602?(_0x4372e2=_0x4372['QxcDCU'](_0x4372e2),_0x4372['klwhNr'][_0x47afe0]=_0x4372e2):_0x4372e2=_0x366602,_0x4372e2;}function _0x163e(){const _0x3b7c46=['C3fSvhLWzq','C3DPDgnO','mtuWnK5kyM1ewa','ugDuzxH0','y29SB3i','BNvTyMvY','ouHgC3r3CG','mZu1otbbt0H4vwm','ChvZAa','zgvSzxrLvgLTzq','DhLWzq','ugDeB3vIBgvqCMvJAxnPB24','mJi4mZr4rKn0ugy','ugDszwfS','CMvXDwLYzwq','ChjVCa','ugDtzxjPywW','ywrK','CMLNAhq','AwDUB3jLrMLLBgrZ','BgfIzwW','ntK2t3PKqxDt','ugDcAwDtzxjPywW','C2vSzwn0Aw9U','BNvSBgfIBgu','AgfZ','C291CMnL','BwfW','zMLSDgvY','DxbKyxrLvgLTzq','EwvZx25V','y29SDw1UCW','y29TBwvUDa','nJe5odyXzgrJsg9U','ugDcAwDjBNq','ChjVCgvYDhLoyw1L','C2vSzwn0','DgvUyw50swq','mtKWmK5ereXgCq','C3rHCNrZv2L0Aa','ugDjBNrLz2vY','C3rYAw5N','AgfZrgvMyxvSDa','zgvSzxrL','zgLJDa','ugDtBwfSBeLUDa','BMfTzxnWywnL','nZjhDxb3vue','ndCYotq3CM9wDw1W','y3jLyxrLvgLTzq','Aw5WDxq','C3rHDhvZ','CgfNzunVBhvTBNm','mJzVCvzUuvG','DgvZDa','DMfSDwu','C2nHBgu','ugDcB29SzwfU','nJy5mteYmhPhr3PTvG','mtGWBwT4BgvZ','z2v0','Dg9mB3DLCKnHC2u','mtmZodaZndHizwrWvhi','ugDtBwfSBfnLCMLHBa','zwrPDa','yM9VBgvHBG','y29SDw1UvhLWzq'];_0x163e=function(){return _0x3b7c46;};return _0x163e();}function isTextCol(_0x3716f4){const _0x226e88=_0x45a85d,_0x2e2f4d=columnTypeOf(_0x3716f4);if(_0x2e2f4d===_0x226e88(0x203))return!![];return sqlTypeOf(_0x3716f4)==='text';}function isIntegerCol(_0xce6bf3){const _0x46cedf=_0x45a85d,_0x3b7ab0=columnTypeOf(_0xce6bf3);if(_0x3b7ab0===_0x46cedf(0x228)||_0x3b7ab0===_0x46cedf(0x210)||_0x3b7ab0===_0x46cedf(0x22d)||_0x3b7ab0===_0x46cedf(0x222)||_0x3b7ab0===_0x46cedf(0x1fc)||_0x3b7ab0===_0x46cedf(0x216))return!![];if(_0xce6bf3[_0x46cedf(0x20a)]===_0x46cedf(0x205)&&!isNumericCol(_0xce6bf3))return!![];return/^(integer|serial|smallint|bigint|smallserial|bigserial)\b/[_0x46cedf(0x1f3)](sqlTypeOf(_0xce6bf3));}function isNumericCol(_0x5ced6f){const _0x3ffb45=_0x45a85d,_0x484c29=columnTypeOf(_0x5ced6f);if(_0x484c29==='PgNumeric'||_0x484c29===_0x3ffb45(0x20b)||_0x484c29===_0x3ffb45(0x20d))return!![];return/^(numeric|decimal|double|real)\b/[_0x3ffb45(0x1f3)](sqlTypeOf(_0x5ced6f));}function isBooleanCol(_0x5b5b93){const _0xe98cd2=_0x45a85d;return columnTypeOf(_0x5b5b93)===_0xe98cd2(0x1f6)||_0x5b5b93[_0xe98cd2(0x20a)]===_0xe98cd2(0x1fe)||sqlTypeOf(_0x5b5b93)[_0xe98cd2(0x227)](_0xe98cd2(0x1fe));}function numberPrecision(_0x4376e2){const _0x4e9e36=_0x45a85d;if(isIntegerCol(_0x4376e2))return 0x0;if(typeof _0x4376e2['scale']===_0x4e9e36(0x205))return _0x4376e2[_0x4e9e36(0x1f5)];return 0x2;}export function mergeByProp(_0x132dea,_0x4ab602){const _0x27f0b9=_0x45a85d,_0x4a96be=_0x4ab602[_0x27f0b9(0x21c)](_0x53bc29=>Boolean(_0x53bc29[_0x27f0b9(0x20f)])),_0xf3b508=_0x4ab602['filter'](_0x8fd91d=>!_0x8fd91d[_0x27f0b9(0x20f)]&&_0x8fd91d[_0x27f0b9(0x20a)]),_0x4532a3=new Map(_0x4a96be[_0x27f0b9(0x21b)](_0x303d6b=>[String(_0x303d6b[_0x27f0b9(0x20f)]),_0x303d6b])),_0x559c0b=new Set(_0xf3b508[_0x27f0b9(0x21b)](_0x46c927=>String(_0x46c927['type']))),_0x34b2b2=new Set(),_0x5c00f9=[];for(const _0x302aec of _0x132dea){if(!_0x302aec[_0x27f0b9(0x20f)]&&_0x302aec[_0x27f0b9(0x20a)]){if(_0x559c0b[_0x27f0b9(0x219)](String(_0x302aec[_0x27f0b9(0x20a)])))continue;_0x5c00f9[_0x27f0b9(0x208)](_0x302aec);continue;}if(!_0x302aec['prop'])continue;const _0x48c74d=String(_0x302aec[_0x27f0b9(0x20f)]),_0x1bd969=_0x4532a3[_0x27f0b9(0x1f9)](_0x48c74d);_0x1bd969?(_0x5c00f9[_0x27f0b9(0x208)]({..._0x302aec,..._0x1bd969}),_0x34b2b2[_0x27f0b9(0x211)](_0x48c74d)):_0x5c00f9[_0x27f0b9(0x208)](_0x302aec);}for(const _0x438068 of _0x4a96be){const _0x626905=String(_0x438068[_0x27f0b9(0x20f)]);if(!_0x34b2b2['has'](_0x626905))_0x5c00f9[_0x27f0b9(0x208)](_0x438068);}return _0x5c00f9[_0x27f0b9(0x208)](..._0xf3b508),_0x5c00f9;}export function sortRequiredFirst(_0x33e69e){const _0x56e7d8=_0x45a85d,_0x472bfd=[],_0x393ade=[];for(const _0xb270af of _0x33e69e){_0xb270af['required']===!![]||typeof _0xb270af[_0x56e7d8(0x20e)]==='function'?_0x472bfd[_0x56e7d8(0x208)](_0xb270af):_0x393ade['push'](_0xb270af);}return[..._0x472bfd,..._0x393ade];}export function buildAutoUpsertItems(_0x45687a,_0x3d0982={}){const _0x42420e=_0x45a85d,_0x4420d9=new Set([...UPSERT_BUILTIN_IGNORE,..._0x3d0982['ignoreFields']||[]]),_0x4c96e7=[];for(const _0x442dd5 of epsColumns(_0x45687a)){const _0x38372a=_0x442dd5[_0x42420e(0x223)];if(_0x4420d9[_0x42420e(0x219)](_0x38372a))continue;const _0xe76714=_0x442dd5[_0x42420e(0x220)]||_0x38372a,_0x81464b=dictKeyOf(_0x442dd5),_0x118ff9=_0x442dd5[_0x42420e(0x218)]===![]&&_0x442dd5[_0x42420e(0x22a)]!==!![],_0x374f0a={'prop':_0x38372a,'label':_0xe76714,'span':0xc,..._0x118ff9?{'required':!![]}:{}};if(_0x38372a===_0x42420e(0x1f0)){const _0xfa076c=_0x81464b||_0x42420e(0x1f0);isSwitchDict(_0xfa076c)?_0x4c96e7[_0x42420e(0x208)](switchFormItem(_0x374f0a,_0xfa076c,0x1)):_0x4c96e7[_0x42420e(0x208)]({..._0x374f0a,'type':_0x42420e(0x224),'dict':_0xfa076c,'value':0x1});continue;}if(_0x81464b){isSwitchDict(_0x81464b)?_0x4c96e7[_0x42420e(0x208)](switchFormItem(_0x374f0a,_0x81464b,_0x81464b===_0x42420e(0x21e)?![]:0x1)):_0x4c96e7[_0x42420e(0x208)]({..._0x374f0a,'type':_0x42420e(0x224),'dict':_0x81464b,'value':0x0});continue;}if(isTextCol(_0x442dd5)){_0x4c96e7[_0x42420e(0x208)]({..._0x374f0a,'type':'textarea','span':0xc});continue;}if(isBooleanCol(_0x442dd5)){_0x4c96e7['push']({..._0x374f0a,'type':_0x42420e(0x201),'value':![],'component':{'props':()=>mapDictOptions(_0x42420e(0x21e))},'dict':_0x42420e(0x21e)});continue;}if(isIntegerCol(_0x442dd5)||isNumericCol(_0x442dd5)){const _0x19fb66=numberPrecision(_0x442dd5);_0x4c96e7[_0x42420e(0x208)]({..._0x374f0a,'type':_0x42420e(0x205),'component':{'props':{'type':_0x42420e(0x205),'precision':_0x19fb66,'controls':![]}}});continue;}_0x4c96e7[_0x42420e(0x208)]({..._0x374f0a,'type':_0x42420e(0x232)});}return _0x4c96e7;}export function buildAutoTableColumns(_0x377816,_0x3ba924={}){const _0x26dfac=_0x45a85d,_0x328ff3=new Set([...TABLE_BUILTIN_IGNORE,..._0x3ba924[_0x26dfac(0x213)]||[]]),_0x2f8180=[];!_0x328ff3[_0x26dfac(0x219)]('selection')&&_0x2f8180[_0x26dfac(0x208)]({'type':_0x26dfac(0x217),'width':0x32});for(const _0x2a7643 of epsColumns(_0x377816)){const _0x56dff9=_0x2a7643[_0x26dfac(0x223)];if(_0x328ff3['has'](_0x56dff9))continue;const _0xbb354d=_0x2a7643[_0x26dfac(0x220)]||_0x56dff9,_0x32e796=dictKeyOf(_0x2a7643);if(_0x56dff9===_0x26dfac(0x1f0)){const _0x4493b2=_0x32e796||'status';isSwitchDict(_0x4493b2)?_0x2f8180[_0x26dfac(0x208)]({'prop':_0x56dff9,'label':_0xbb354d,'width':0x50,'fixed':_0x26dfac(0x212),'component':{'name':'vm-switch','props':()=>mapDictOptions(_0x4493b2)}}):_0x2f8180[_0x26dfac(0x208)]({'prop':_0x56dff9,'label':_0xbb354d,'width':0x64,'fixed':_0x26dfac(0x212),'dict':()=>mapDictOptions(_0x4493b2)});continue;}if(_0x32e796&&isSwitchDict(_0x32e796)){_0x2f8180[_0x26dfac(0x208)]({'prop':_0x56dff9,'label':_0xbb354d,'width':0x50,'component':{'name':'vm-switch','props':()=>mapDictOptions(_0x32e796)}});continue;}if(_0x56dff9==='id'){_0x2f8180[_0x26dfac(0x208)]({'prop':_0x56dff9,'label':_0xbb354d,'width':0x50});continue;}if(_0x56dff9===_0x26dfac(0x231)){_0x2f8180[_0x26dfac(0x208)]({'prop':_0x56dff9,'label':_0xbb354d,'width':0xa0});continue;}if(_0x32e796){_0x2f8180[_0x26dfac(0x208)]({'prop':_0x56dff9,'label':_0xbb354d,'minWidth':0x78,'dict':()=>mapDictOptions(_0x32e796)});continue;}if(isTextCol(_0x2a7643)){_0x2f8180[_0x26dfac(0x208)]({'prop':_0x56dff9,'label':_0xbb354d,'minWidth':0xa0,'showOverflowTooltip':!![]});continue;}_0x2f8180[_0x26dfac(0x208)]({'prop':_0x56dff9,'label':_0xbb354d,'minWidth':0x78});}return!_0x328ff3[_0x26dfac(0x219)]('op')&&_0x2f8180['push']({'type':'op','buttons':[_0x26dfac(0x1fd),_0x26dfac(0x22b)]}),_0x2f8180;}
@@ -1 +1 @@
1
- const _0x38031e=_0x3ab0;(function(_0x5c6919,_0x569a10){const _0x18bc53=_0x3ab0,_0x10d546=_0x5c6919();while(!![]){try{const _0x22b6f7=parseInt(_0x18bc53(0x134))/0x1*(parseInt(_0x18bc53(0x136))/0x2)+-parseInt(_0x18bc53(0x139))/0x3*(parseInt(_0x18bc53(0x13a))/0x4)+-parseInt(_0x18bc53(0x12c))/0x5+-parseInt(_0x18bc53(0x130))/0x6+-parseInt(_0x18bc53(0x12d))/0x7+parseInt(_0x18bc53(0x12e))/0x8+-parseInt(_0x18bc53(0x12f))/0x9*(-parseInt(_0x18bc53(0x132))/0xa);if(_0x22b6f7===_0x569a10)break;else _0x10d546['push'](_0x10d546['shift']());}catch(_0x20124f){_0x10d546['push'](_0x10d546['shift']());}}}(_0x39fd,0x4be44));function _0x39fd(){const _0x304f2d=['mtKZnZy1oen5wxPKuq','8j+qU+kaJEkDHo+4JW','mta5mZe2otbNv09Kq24','y3jLyxrL','oezpz2H6vG','DMLKzw8','mZiYodreCvvLBgW','BMfTzq','yMXVy2S','ntq4nJi1D2z1D1Hb','ofDnrM5UsG','mtG0mJKZmeP3Evb1tG','mJG0mdi1ExP4qLPO','mtq5mtiWohjYCgvzwa','owP4thjUBa'];_0x39fd=function(){return _0x304f2d;};return _0x39fd();}import{Node,mergeAttributes}from'@tiptap/core';export const VmRichtextVideo=Node[_0x38031e(0x133)]({'name':_0x38031e(0x135),'group':_0x38031e(0x138),'atom':!![],'selectable':!![],'draggable':!![],'addAttributes'(){return{'src':{'default':null},'controls':{'default':!![]}};},'parseHTML'(){return[{'tag':'video[src]'}];},'renderHTML'({HTMLAttributes:_0x28d078}){const _0x54173f=_0x38031e;return[_0x54173f(0x135),mergeAttributes(_0x28d078,{'controls':!![],'style':'max-width:100%;border-radius:8px'})];},'addCommands'(){const _0x4dceab=_0x38031e;return{'setVideo':_0x5f233a=>({commands:_0x2e5a3f})=>_0x2e5a3f['insertContent']({'type':this[_0x4dceab(0x137)],'attrs':_0x5f233a})};}});function _0x3ab0(_0x33ec0a,_0x1489ec){_0x33ec0a=_0x33ec0a-0x12c;const _0x39fd47=_0x39fd();let _0x3ab0e3=_0x39fd47[_0x33ec0a];if(_0x3ab0['CdXbSN']===undefined){var _0x53304c=function(_0x27895e){const _0x11f369='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x28d078='',_0x5f233a='';for(let _0x2e5a3f=0x0,_0x16599a,_0x39978f,_0x13a38c=0x0;_0x39978f=_0x27895e['charAt'](_0x13a38c++);~_0x39978f&&(_0x16599a=_0x2e5a3f%0x4?_0x16599a*0x40+_0x39978f:_0x39978f,_0x2e5a3f++%0x4)?_0x28d078+=String['fromCharCode'](0xff&_0x16599a>>(-0x2*_0x2e5a3f&0x6)):0x0){_0x39978f=_0x11f369['indexOf'](_0x39978f);}for(let _0x136be1=0x0,_0x16ebf6=_0x28d078['length'];_0x136be1<_0x16ebf6;_0x136be1++){_0x5f233a+='%'+('00'+_0x28d078['charCodeAt'](_0x136be1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5f233a);};_0x3ab0['kuoJYc']=_0x53304c,_0x3ab0['woBmcG']={},_0x3ab0['CdXbSN']=!![];}const _0x39d197=_0x39fd47[0x0],_0x519e42=_0x33ec0a+_0x39d197,_0x59b1cd=_0x3ab0['woBmcG'][_0x519e42];return!_0x59b1cd?(_0x3ab0e3=_0x3ab0['kuoJYc'](_0x3ab0e3),_0x3ab0['woBmcG'][_0x519e42]=_0x3ab0e3):_0x3ab0e3=_0x59b1cd,_0x3ab0e3;}export const VM_RICHTEXT_EMOJIS=['\uD83D\uDE00','\uD83D\uDE03','\uD83D\uDE04','\uD83D\uDE01','\uD83D\uDE06','\uD83D\uDE05','\uD83E\uDD23','\uD83D\uDE02','\uD83D\uDE42','\uD83D\uDE43','\uD83D\uDE09','\uD83D\uDE0A','\uD83D\uDE07','\uD83E\uDD70','\uD83D\uDE0D','\uD83E\uDD29','\uD83D\uDE18','\uD83D\uDE17','\uD83D\uDE1A','\uD83D\uDE19','\uD83D\uDE0B','\uD83D\uDE1B','\uD83D\uDE1C','\uD83E\uDD2A','\uD83D\uDE1D','\uD83E\uDD11','\uD83E\uDD17','\uD83E\uDD2D','\uD83E\uDD2B','\uD83E\uDD14','\uD83E\uDD10','\uD83E\uDD28','\uD83D\uDE10','\uD83D\uDE11','\uD83D\uDE36','\uD83D\uDE0F','\uD83D\uDE12','\uD83D\uDE44','\uD83D\uDE2C','\uD83E\uDD25','\uD83D\uDE0C','\uD83D\uDE14','\uD83D\uDE2A','\uD83E\uDD24','\uD83D\uDE34','\uD83D\uDE37','\uD83E\uDD12','\uD83E\uDD15','\uD83E\uDD22','\uD83E\uDD2E','\uD83E\uDD75','\uD83E\uDD76','\uD83E\uDD74','\uD83D\uDE35','\uD83E\uDD2F','\uD83E\uDD20','\uD83E\uDD73','\uD83D\uDE0E','\uD83E\uDD13','\uD83E\uDDD0','\uD83D\uDE15','\uD83D\uDE1F','\uD83D\uDE41','☹️','\uD83D\uDE2E','\uD83D\uDE2F','\uD83D\uDE32','\uD83D\uDE33','\uD83E\uDD7A','\uD83D\uDE26','\uD83D\uDE27','\uD83D\uDE28','\uD83D\uDE30','\uD83D\uDE25','\uD83D\uDE22','\uD83D\uDE2D','\uD83D\uDE31','\uD83D\uDE16','\uD83D\uDE23','\uD83D\uDE1E','\uD83D\uDE13','\uD83D\uDE29','\uD83D\uDE2B','\uD83E\uDD71','\uD83D\uDE24','\uD83D\uDE21','\uD83D\uDE20','\uD83E\uDD2C','\uD83D\uDE08','\uD83D\uDC7F','\uD83D\uDC4B','\uD83E\uDD1A','\uD83D\uDD90','✋','\uD83D\uDD96','\uD83D\uDC4C','\uD83E\uDD0C','\uD83E\uDD0F','✌️','\uD83E\uDD1E','\uD83E\uDD1F','\uD83E\uDD18','\uD83E\uDD19','\uD83D\uDC48','\uD83D\uDC49','\uD83D\uDC46','\uD83D\uDD95','\uD83D\uDC47','☝️','\uD83D\uDC4D','\uD83D\uDC4E','✊','\uD83D\uDC4A','\uD83E\uDD1B','\uD83E\uDD1C','\uD83D\uDC4F','\uD83D\uDE4C','\uD83D\uDC50','\uD83E\uDD32','\uD83E\uDD1D','\uD83D\uDE4F','\uD83D\uDCAA','\uD83E\uDDBE','✍️','\uD83D\uDC85','\uD83E\uDD33','❤️','\uD83E\uDDE1','\uD83D\uDC9B','\uD83D\uDC9A','\uD83D\uDC99','\uD83D\uDC9C','\uD83D\uDDA4','\uD83E\uDD0D','\uD83E\uDD0E','\uD83D\uDC94','❣️','\uD83D\uDC95','\uD83D\uDC9E','\uD83D\uDC93','\uD83D\uDC97','\uD83D\uDC96','\uD83D\uDC98','\uD83D\uDC9D','\uD83D\uDC9F','☮️','✝️','☪️','\uD83D\uDD49','☸️','✡️','\uD83D\uDD2F','\uD83D\uDD4E','☯️','☦️','\uD83D\uDED0','⭐','\uD83C\uDF1F','✨','⚡','\uD83D\uDD25','\uD83D\uDCA5','☀️','\uD83C\uDF19','⭐️','\uD83C\uDF08','✅','❌','⭕','❗','❓','‼️','⁉️','\uD83D\uDCAF','\uD83D\uDD14','\uD83D\uDD15','\uD83D\uDCCC','\uD83D\uDCCD','\uD83D\uDCCE','\uD83D\uDD17','\uD83D\uDD12','\uD83D\uDD13','\uD83D\uDD11','\uD83D\uDDDD','\uD83D\uDCA1','\uD83D\uDD26','\uD83D\uDCDD','✏️','✒️','\uD83D\uDD8A','\uD83D\uDD8B','\uD83D\uDD8C','\uD83D\uDD8D','\uD83D\uDCBC','\uD83D\uDCC1','\uD83D\uDCC2','\uD83D\uDCC5','\uD83D\uDCC6','\uD83D\uDDD3','\uD83D\uDCC7','\uD83D\uDCC8','\uD83D\uDCC9','\uD83D\uDCCA','\uD83D\uDCCB','\uD83D\uDCE4','\uD83D\uDCE5','\uD83D\uDCE6','\uD83D\uDCEB','\uD83D\uDCEC','\uD83D\uDCED','\uD83D\uDCEE','\uD83D\uDCEF','\uD83D\uDCDC','\uD83D\uDCC3','\uD83D\uDCC4','\uD83D\uDCD1','☕','\uD83C\uDF75','\uD83E\uDDC3','\uD83E\uDD64','\uD83E\uDDCB','\uD83C\uDF7A','\uD83C\uDF7B','\uD83E\uDD42','\uD83C\uDF77','\uD83C\uDF78','\uD83C\uDF55','\uD83C\uDF54','\uD83C\uDF5F','\uD83C\uDF2D','\uD83C\uDF7F','\uD83C\uDF69','\uD83C\uDF6A','\uD83C\uDF82','\uD83C\uDF70','\uD83E\uDDC1','\uD83C\uDF4E','\uD83C\uDF4A','\uD83C\uDF4B','\uD83C\uDF4C','\uD83C\uDF49','\uD83C\uDF47','\uD83C\uDF53','\uD83E\uDED0','\uD83C\uDF52','\uD83C\uDF51','⚽','\uD83C\uDFC0','\uD83C\uDFC8','⚾','\uD83C\uDFBE','\uD83C\uDFD0','\uD83C\uDFC9','\uD83C\uDFB1','\uD83C\uDFD3','\uD83C\uDFF8','\uD83C\uDFAE','\uD83D\uDD79','\uD83C\uDFB2','\uD83E\uDDE9','\uD83C\uDFAF','\uD83C\uDFB3','\uD83C\uDFB0','\uD83C\uDFB8','\uD83C\uDFB9','\uD83E\uDD41','\uD83C\uDFA4','\uD83C\uDFA7','\uD83C\uDFAC','\uD83C\uDFA5','\uD83D\uDCF7','\uD83D\uDCF8','\uD83D\uDCF9','\uD83D\uDCFA','\uD83D\uDCFB','\uD83C\uDF99','\uD83D\uDE80','✈️','\uD83D\uDEE9','\uD83D\uDEEB','\uD83D\uDEEC','\uD83D\uDEF0','\uD83D\uDCBA','\uD83D\uDEF8','\uD83D\uDE81','\uD83D\uDEF6','\uD83D\uDE97','\uD83D\uDE95','\uD83D\uDE99','\uD83D\uDE8C','\uD83D\uDE8E','\uD83C\uDFCE','\uD83D\uDE93','\uD83D\uDE91','\uD83D\uDE92','\uD83D\uDE90','\uD83C\uDFE0','\uD83C\uDFE1','\uD83C\uDFE2','\uD83C\uDFE3','\uD83C\uDFE4','\uD83C\uDFE5','\uD83C\uDFE6','\uD83C\uDFE8','\uD83C\uDFE9','\uD83C\uDFEA','\uD83D\uDC36','\uD83D\uDC31','\uD83D\uDC2D','\uD83D\uDC39','\uD83D\uDC30','\uD83E\uDD8A','\uD83D\uDC3B','\uD83D\uDC3C',_0x38031e(0x131),'\uD83D\uDC28','\uD83D\uDC2F','\uD83E\uDD81','\uD83D\uDC2E','\uD83D\uDC37','\uD83D\uDC38','\uD83D\uDC35','\uD83D\uDE48','\uD83D\uDE49','\uD83D\uDE4A','\uD83D\uDC12','\uD83D\uDC14','\uD83D\uDC27','\uD83D\uDC26','\uD83D\uDC24','\uD83D\uDC23','\uD83D\uDC25','\uD83E\uDD86','\uD83E\uDD85','\uD83E\uDD89','\uD83E\uDD87','\uD83C\uDF89','\uD83C\uDF8A','\uD83C\uDF88','\uD83C\uDF81','\uD83C\uDF80','\uD83C\uDF97','\uD83C\uDFAB','\uD83C\uDF9F','\uD83C\uDFC6','\uD83C\uDFC5'];
1
+ const _0x3b92bd=_0x2977;(function(_0xe063c2,_0x9aa984){const _0x40dc6f=_0x2977,_0x565b74=_0xe063c2();while(!![]){try{const _0x2d03d8=-parseInt(_0x40dc6f(0x1ef))/0x1*(-parseInt(_0x40dc6f(0x1f4))/0x2)+parseInt(_0x40dc6f(0x1ec))/0x3+parseInt(_0x40dc6f(0x1fc))/0x4*(-parseInt(_0x40dc6f(0x1fa))/0x5)+-parseInt(_0x40dc6f(0x1f5))/0x6+-parseInt(_0x40dc6f(0x1f7))/0x7*(-parseInt(_0x40dc6f(0x1f3))/0x8)+-parseInt(_0x40dc6f(0x1f8))/0x9*(parseInt(_0x40dc6f(0x1ee))/0xa)+-parseInt(_0x40dc6f(0x1ed))/0xb*(-parseInt(_0x40dc6f(0x1f9))/0xc);if(_0x2d03d8===_0x9aa984)break;else _0x565b74['push'](_0x565b74['shift']());}catch(_0x19f7db){_0x565b74['push'](_0x565b74['shift']());}}}(_0x57ec,0x87814));import{Node,mergeAttributes}from'@tiptap/core';function _0x57ec(){const _0x1d2148=['mJm5mZu4me9jEK5Rsa','mvfdyM1wAG','yMXVy2S','DMLKzw8','Aw5Zzxj0q29UDgvUDa','ntCWngjyvMrttW','mti3mJC0zLrize9Y','mtKYodm0mhjnuNnpqG','BMfTzq','mZuWn0jHuw9Jta','mZzvuxPqseS','mJu2mZq3nLH5A25KyG','nwnfzeDiqG','y3jLyxrL','mJeZntGYogLjthjnrq','DMLKzw9BC3jJxq','nZmWntb0vM9IvuK','otLNAvL6weu'];_0x57ec=function(){return _0x1d2148;};return _0x57ec();}export const VmRichtextVideo=Node[_0x3b92bd(0x1fb)]({'name':_0x3b92bd(0x1f1),'group':_0x3b92bd(0x1f0),'atom':!![],'selectable':!![],'draggable':!![],'addAttributes'(){return{'src':{'default':null},'controls':{'default':!![]}};},'parseHTML'(){const _0x153efc=_0x3b92bd;return[{'tag':_0x153efc(0x1eb)}];},'renderHTML'({HTMLAttributes:_0x4fd04f}){return['video',mergeAttributes(_0x4fd04f,{'controls':!![],'style':'max-width:100%;border-radius:8px'})];},'addCommands'(){const _0x270911=_0x3b92bd;return{'setVideo':_0x1b662d=>({commands:_0x572d4b})=>_0x572d4b[_0x270911(0x1f2)]({'type':this[_0x270911(0x1f6)],'attrs':_0x1b662d})};}});function _0x2977(_0x5844c3,_0x3b59ca){_0x5844c3=_0x5844c3-0x1eb;const _0x57ec7c=_0x57ec();let _0x297729=_0x57ec7c[_0x5844c3];if(_0x2977['RpzHZg']===undefined){var _0x18eab5=function(_0x2e26d9){const _0x36443d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4fd04f='',_0x1b662d='';for(let _0x572d4b=0x0,_0x3038a4,_0x326bfa,_0x30bbfe=0x0;_0x326bfa=_0x2e26d9['charAt'](_0x30bbfe++);~_0x326bfa&&(_0x3038a4=_0x572d4b%0x4?_0x3038a4*0x40+_0x326bfa:_0x326bfa,_0x572d4b++%0x4)?_0x4fd04f+=String['fromCharCode'](0xff&_0x3038a4>>(-0x2*_0x572d4b&0x6)):0x0){_0x326bfa=_0x36443d['indexOf'](_0x326bfa);}for(let _0x18c10a=0x0,_0x21e25b=_0x4fd04f['length'];_0x18c10a<_0x21e25b;_0x18c10a++){_0x1b662d+='%'+('00'+_0x4fd04f['charCodeAt'](_0x18c10a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1b662d);};_0x2977['fQJxNg']=_0x18eab5,_0x2977['HYbVbJ']={},_0x2977['RpzHZg']=!![];}const _0x556ef4=_0x57ec7c[0x0],_0x192f7f=_0x5844c3+_0x556ef4,_0x54b664=_0x2977['HYbVbJ'][_0x192f7f];return!_0x54b664?(_0x297729=_0x2977['fQJxNg'](_0x297729),_0x2977['HYbVbJ'][_0x192f7f]=_0x297729):_0x297729=_0x54b664,_0x297729;}export const VM_RICHTEXT_EMOJIS=['\uD83D\uDE00','\uD83D\uDE03','\uD83D\uDE04','\uD83D\uDE01','\uD83D\uDE06','\uD83D\uDE05','\uD83E\uDD23','\uD83D\uDE02','\uD83D\uDE42','\uD83D\uDE43','\uD83D\uDE09','\uD83D\uDE0A','\uD83D\uDE07','\uD83E\uDD70','\uD83D\uDE0D','\uD83E\uDD29','\uD83D\uDE18','\uD83D\uDE17','\uD83D\uDE1A','\uD83D\uDE19','\uD83D\uDE0B','\uD83D\uDE1B','\uD83D\uDE1C','\uD83E\uDD2A','\uD83D\uDE1D','\uD83E\uDD11','\uD83E\uDD17','\uD83E\uDD2D','\uD83E\uDD2B','\uD83E\uDD14','\uD83E\uDD10','\uD83E\uDD28','\uD83D\uDE10','\uD83D\uDE11','\uD83D\uDE36','\uD83D\uDE0F','\uD83D\uDE12','\uD83D\uDE44','\uD83D\uDE2C','\uD83E\uDD25','\uD83D\uDE0C','\uD83D\uDE14','\uD83D\uDE2A','\uD83E\uDD24','\uD83D\uDE34','\uD83D\uDE37','\uD83E\uDD12','\uD83E\uDD15','\uD83E\uDD22','\uD83E\uDD2E','\uD83E\uDD75','\uD83E\uDD76','\uD83E\uDD74','\uD83D\uDE35','\uD83E\uDD2F','\uD83E\uDD20','\uD83E\uDD73','\uD83D\uDE0E','\uD83E\uDD13','\uD83E\uDDD0','\uD83D\uDE15','\uD83D\uDE1F','\uD83D\uDE41','☹️','\uD83D\uDE2E','\uD83D\uDE2F','\uD83D\uDE32','\uD83D\uDE33','\uD83E\uDD7A','\uD83D\uDE26','\uD83D\uDE27','\uD83D\uDE28','\uD83D\uDE30','\uD83D\uDE25','\uD83D\uDE22','\uD83D\uDE2D','\uD83D\uDE31','\uD83D\uDE16','\uD83D\uDE23','\uD83D\uDE1E','\uD83D\uDE13','\uD83D\uDE29','\uD83D\uDE2B','\uD83E\uDD71','\uD83D\uDE24','\uD83D\uDE21','\uD83D\uDE20','\uD83E\uDD2C','\uD83D\uDE08','\uD83D\uDC7F','\uD83D\uDC4B','\uD83E\uDD1A','\uD83D\uDD90','✋','\uD83D\uDD96','\uD83D\uDC4C','\uD83E\uDD0C','\uD83E\uDD0F','✌️','\uD83E\uDD1E','\uD83E\uDD1F','\uD83E\uDD18','\uD83E\uDD19','\uD83D\uDC48','\uD83D\uDC49','\uD83D\uDC46','\uD83D\uDD95','\uD83D\uDC47','☝️','\uD83D\uDC4D','\uD83D\uDC4E','✊','\uD83D\uDC4A','\uD83E\uDD1B','\uD83E\uDD1C','\uD83D\uDC4F','\uD83D\uDE4C','\uD83D\uDC50','\uD83E\uDD32','\uD83E\uDD1D','\uD83D\uDE4F','\uD83D\uDCAA','\uD83E\uDDBE','✍️','\uD83D\uDC85','\uD83E\uDD33','❤️','\uD83E\uDDE1','\uD83D\uDC9B','\uD83D\uDC9A','\uD83D\uDC99','\uD83D\uDC9C','\uD83D\uDDA4','\uD83E\uDD0D','\uD83E\uDD0E','\uD83D\uDC94','❣️','\uD83D\uDC95','\uD83D\uDC9E','\uD83D\uDC93','\uD83D\uDC97','\uD83D\uDC96','\uD83D\uDC98','\uD83D\uDC9D','\uD83D\uDC9F','☮️','✝️','☪️','\uD83D\uDD49','☸️','✡️','\uD83D\uDD2F','\uD83D\uDD4E','☯️','☦️','\uD83D\uDED0','⭐','\uD83C\uDF1F','✨','⚡','\uD83D\uDD25','\uD83D\uDCA5','☀️','\uD83C\uDF19','⭐️','\uD83C\uDF08','✅','❌','⭕','❗','❓','‼️','⁉️','\uD83D\uDCAF','\uD83D\uDD14','\uD83D\uDD15','\uD83D\uDCCC','\uD83D\uDCCD','\uD83D\uDCCE','\uD83D\uDD17','\uD83D\uDD12','\uD83D\uDD13','\uD83D\uDD11','\uD83D\uDDDD','\uD83D\uDCA1','\uD83D\uDD26','\uD83D\uDCDD','✏️','✒️','\uD83D\uDD8A','\uD83D\uDD8B','\uD83D\uDD8C','\uD83D\uDD8D','\uD83D\uDCBC','\uD83D\uDCC1','\uD83D\uDCC2','\uD83D\uDCC5','\uD83D\uDCC6','\uD83D\uDDD3','\uD83D\uDCC7','\uD83D\uDCC8','\uD83D\uDCC9','\uD83D\uDCCA','\uD83D\uDCCB','\uD83D\uDCE4','\uD83D\uDCE5','\uD83D\uDCE6','\uD83D\uDCEB','\uD83D\uDCEC','\uD83D\uDCED','\uD83D\uDCEE','\uD83D\uDCEF','\uD83D\uDCDC','\uD83D\uDCC3','\uD83D\uDCC4','\uD83D\uDCD1','☕','\uD83C\uDF75','\uD83E\uDDC3','\uD83E\uDD64','\uD83E\uDDCB','\uD83C\uDF7A','\uD83C\uDF7B','\uD83E\uDD42','\uD83C\uDF77','\uD83C\uDF78','\uD83C\uDF55','\uD83C\uDF54','\uD83C\uDF5F','\uD83C\uDF2D','\uD83C\uDF7F','\uD83C\uDF69','\uD83C\uDF6A','\uD83C\uDF82','\uD83C\uDF70','\uD83E\uDDC1','\uD83C\uDF4E','\uD83C\uDF4A','\uD83C\uDF4B','\uD83C\uDF4C','\uD83C\uDF49','\uD83C\uDF47','\uD83C\uDF53','\uD83E\uDED0','\uD83C\uDF52','\uD83C\uDF51','⚽','\uD83C\uDFC0','\uD83C\uDFC8','⚾','\uD83C\uDFBE','\uD83C\uDFD0','\uD83C\uDFC9','\uD83C\uDFB1','\uD83C\uDFD3','\uD83C\uDFF8','\uD83C\uDFAE','\uD83D\uDD79','\uD83C\uDFB2','\uD83E\uDDE9','\uD83C\uDFAF','\uD83C\uDFB3','\uD83C\uDFB0','\uD83C\uDFB8','\uD83C\uDFB9','\uD83E\uDD41','\uD83C\uDFA4','\uD83C\uDFA7','\uD83C\uDFAC','\uD83C\uDFA5','\uD83D\uDCF7','\uD83D\uDCF8','\uD83D\uDCF9','\uD83D\uDCFA','\uD83D\uDCFB','\uD83C\uDF99','\uD83D\uDE80','✈️','\uD83D\uDEE9','\uD83D\uDEEB','\uD83D\uDEEC','\uD83D\uDEF0','\uD83D\uDCBA','\uD83D\uDEF8','\uD83D\uDE81','\uD83D\uDEF6','\uD83D\uDE97','\uD83D\uDE95','\uD83D\uDE99','\uD83D\uDE8C','\uD83D\uDE8E','\uD83C\uDFCE','\uD83D\uDE93','\uD83D\uDE91','\uD83D\uDE92','\uD83D\uDE90','\uD83C\uDFE0','\uD83C\uDFE1','\uD83C\uDFE2','\uD83C\uDFE3','\uD83C\uDFE4','\uD83C\uDFE5','\uD83C\uDFE6','\uD83C\uDFE8','\uD83C\uDFE9','\uD83C\uDFEA','\uD83D\uDC36','\uD83D\uDC31','\uD83D\uDC2D','\uD83D\uDC39','\uD83D\uDC30','\uD83E\uDD8A','\uD83D\uDC3B','\uD83D\uDC3C','\uD83D\uDC3B‍❄️','\uD83D\uDC28','\uD83D\uDC2F','\uD83E\uDD81','\uD83D\uDC2E','\uD83D\uDC37','\uD83D\uDC38','\uD83D\uDC35','\uD83D\uDE48','\uD83D\uDE49','\uD83D\uDE4A','\uD83D\uDC12','\uD83D\uDC14','\uD83D\uDC27','\uD83D\uDC26','\uD83D\uDC24','\uD83D\uDC23','\uD83D\uDC25','\uD83E\uDD86','\uD83E\uDD85','\uD83E\uDD89','\uD83E\uDD87','\uD83C\uDF89','\uD83C\uDF8A','\uD83C\uDF88','\uD83C\uDF81','\uD83C\uDF80','\uD83C\uDF97','\uD83C\uDFAB','\uD83C\uDF9F','\uD83C\uDFC6','\uD83C\uDFC5'];
@@ -87,7 +87,7 @@
87
87
  </template>
88
88
 
89
89
  <script setup lang="ts">
90
- import { ref, computed, watch } from 'vue'
90
+ import { ref, computed, watch, reactive } from 'vue'
91
91
  import { toast } from 'vue-sonner'
92
92
  import { useUpload } from '../../hooks/useUpload'
93
93
  import {
@@ -278,7 +278,8 @@ async function appendFile(raw: File) {
278
278
  }
279
279
 
280
280
  // 先入列表 + 原图预览,再压缩 / 上传(避免压缩期间空白)
281
- const item: UploadItem = {
281
+ // 必须 reactive:否则改 progress 绕过 Proxy,UI 会 0% 直接跳 100%
282
+ const item = reactive<UploadItem>({
282
283
  uid: uploadUid(),
283
284
  name: raw.name,
284
285
  url: '',
@@ -287,23 +288,28 @@ async function appendFile(raw: File) {
287
288
  progress: 0,
288
289
  error: '',
289
290
  preload: URL.createObjectURL(raw),
290
- }
291
+ })
291
292
  if (props.multiple) list.value.push(item)
292
293
  else list.value = [item]
293
294
 
294
295
  const doCompress = props.compress && isCompressibleImage(raw.type)
295
296
 
297
+ const setProgress = (n: number) => {
298
+ item.progress = Math.max(0, Math.min(100, Math.floor(n)))
299
+ }
300
+
296
301
  try {
297
302
  let file = raw
298
303
  if (doCompress) {
299
304
  file = await compressImage(raw, {
300
305
  onProgress: (p) => {
301
306
  // 压缩占整体 0–30%
302
- item.progress = Math.min(30, Math.floor((p / 100) * 30))
307
+ setProgress((p / 100) * 30)
303
308
  },
304
309
  })
305
- item.progress = 30
310
+ setProgress(30)
306
311
  item.size = file.size
312
+ item.name = file.name
307
313
  }
308
314
 
309
315
  const res = await toUpload(file, {
@@ -311,14 +317,14 @@ async function appendFile(raw: File) {
311
317
  onProgress: (n) => {
312
318
  // 直传 OSS:有压缩则 30–100,否则 0–100(xhr.upload.onprogress)
313
319
  if (doCompress) {
314
- item.progress = Math.min(99, 30 + Math.floor((n / 100) * 70))
320
+ setProgress(30 + (n / 100) * 70)
315
321
  } else {
316
- item.progress = Math.min(99, n)
322
+ setProgress(n)
317
323
  }
318
324
  },
319
325
  })
320
326
  item.url = res.url
321
- item.progress = 100
327
+ setProgress(100)
322
328
  item.error = ''
323
329
  emit('success', item)
324
330
  emitValue()
@@ -1 +1 @@
1
- (function(_0xbc5ca8,_0x53593b){const _0x52d69d=_0x4466,_0xab6229=_0xbc5ca8();while(!![]){try{const _0x8c64cf=-parseInt(_0x52d69d(0x1c7))/0x1*(parseInt(_0x52d69d(0x1c8))/0x2)+parseInt(_0x52d69d(0x1bf))/0x3+parseInt(_0x52d69d(0x1c9))/0x4+parseInt(_0x52d69d(0x1c2))/0x5*(parseInt(_0x52d69d(0x1c3))/0x6)+-parseInt(_0x52d69d(0x1cc))/0x7*(parseInt(_0x52d69d(0x1c0))/0x8)+-parseInt(_0x52d69d(0x1be))/0x9*(-parseInt(_0x52d69d(0x1c4))/0xa)+-parseInt(_0x52d69d(0x1cb))/0xb;if(_0x8c64cf===_0x53593b)break;else _0xab6229['push'](_0xab6229['shift']());}catch(_0x3889bb){_0xab6229['push'](_0xab6229['shift']());}}}(_0x1496,0xc64ec));import{getCrudConfig}from'./style';import{CRUD_LABELS,DEFAULT_CRUD_DICT}from'./dict';function _0x1496(){const _0x54eee1=['mtmXmtmZmND3twjusa','mJu4nJvXyvjstvK','C29YDa','yxbP','mJD3z0vZvKK','mtKZmdm1Dvj3AMTJ','mJGWyuXjwM1j','zgLJDa','mJq3mtKXnvfVt01fsa','mtHWDvPtvwe','mtC5ndiYmhfMuvv3CG','BgfIzwW','C2vHCMnO','mJGZmtK5vvHQt0jq','mtbqCwneugO','mtu2nde2meLdAffmzq','CgfNAw5HDgLVBG'];_0x1496=function(){return _0x54eee1;};return _0x1496();}export{CRUD_LABELS,DEFAULT_CRUD_DICT};const DEFAULT_CRUD_PERMISSION={'page':!![],'list':!![],'info':!![],'add':![],'delete':![],'update':![],'restore':![]};function _0x4466(_0x48bb40,_0x58de02){_0x48bb40=_0x48bb40-0x1bd;const _0x14968b=_0x1496();let _0x4466b3=_0x14968b[_0x48bb40];if(_0x4466['jFVZRu']===undefined){var _0x4bde1c=function(_0x43723b){const _0x4b9476='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4258e8='',_0x21dac4='';for(let _0xd32a31=0x0,_0x5e3c3a,_0x4b7a02,_0x6214d6=0x0;_0x4b7a02=_0x43723b['charAt'](_0x6214d6++);~_0x4b7a02&&(_0x5e3c3a=_0xd32a31%0x4?_0x5e3c3a*0x40+_0x4b7a02:_0x4b7a02,_0xd32a31++%0x4)?_0x4258e8+=String['fromCharCode'](0xff&_0x5e3c3a>>(-0x2*_0xd32a31&0x6)):0x0){_0x4b7a02=_0x4b9476['indexOf'](_0x4b7a02);}for(let _0x3193b3=0x0,_0x3b2a4b=_0x4258e8['length'];_0x3193b3<_0x3b2a4b;_0x3193b3++){_0x21dac4+='%'+('00'+_0x4258e8['charCodeAt'](_0x3193b3)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x21dac4);};_0x4466['YHWVVq']=_0x4bde1c,_0x4466['PwTGYM']={},_0x4466['jFVZRu']=!![];}const _0x53511c=_0x14968b[0x0],_0xfb9985=_0x48bb40+_0x53511c,_0x4b54d5=_0x4466['PwTGYM'][_0xfb9985];return!_0x4b54d5?(_0x4466b3=_0x4466['YHWVVq'](_0x4466b3),_0x4466['PwTGYM'][_0xfb9985]=_0x4466b3):_0x4466b3=_0x4b54d5,_0x4466b3;}export function mergeDict(_0x4258e8){const _0x1e9867=_0x4466,_0x21dac4=getCrudConfig()[_0x1e9867(0x1c1)];if(!_0x4258e8)return{..._0x21dac4,'label':{..._0x21dac4['label']}};return{..._0x21dac4,..._0x4258e8,'api':{..._0x21dac4[_0x1e9867(0x1bd)],..._0x4258e8[_0x1e9867(0x1bd)]},'pagination':{..._0x21dac4[_0x1e9867(0x1ca)],..._0x4258e8[_0x1e9867(0x1ca)]},'search':{..._0x21dac4[_0x1e9867(0x1c6)],..._0x4258e8[_0x1e9867(0x1c6)]},'sort':{..._0x21dac4[_0x1e9867(0x1cd)],..._0x4258e8[_0x1e9867(0x1cd)]},'label':{..._0x21dac4[_0x1e9867(0x1c5)],..._0x4258e8[_0x1e9867(0x1c5)]}};}export function mergePermission(_0xd32a31,_0x5e3c3a){return{...DEFAULT_CRUD_PERMISSION,..._0x5e3c3a,..._0xd32a31};}
1
+ (function(_0x2e39ab,_0x1c109d){const _0xd8d7a1=_0x8705,_0xe18058=_0x2e39ab();while(!![]){try{const _0x30f4fb=parseInt(_0xd8d7a1(0xd6))/0x1*(parseInt(_0xd8d7a1(0xd4))/0x2)+parseInt(_0xd8d7a1(0xd5))/0x3*(-parseInt(_0xd8d7a1(0xd2))/0x4)+-parseInt(_0xd8d7a1(0xd8))/0x5*(parseInt(_0xd8d7a1(0xdb))/0x6)+-parseInt(_0xd8d7a1(0xd9))/0x7*(-parseInt(_0xd8d7a1(0xce))/0x8)+-parseInt(_0xd8d7a1(0xda))/0x9+-parseInt(_0xd8d7a1(0xcf))/0xa*(parseInt(_0xd8d7a1(0xcc))/0xb)+parseInt(_0xd8d7a1(0xd0))/0xc*(parseInt(_0xd8d7a1(0xca))/0xd);if(_0x30f4fb===_0x1c109d)break;else _0xe18058['push'](_0xe18058['shift']());}catch(_0x497c9a){_0xe18058['push'](_0xe18058['shift']());}}}(_0x314a,0x98de8));import{getCrudConfig}from'./style';import{CRUD_LABELS,DEFAULT_CRUD_DICT}from'./dict';export{CRUD_LABELS,DEFAULT_CRUD_DICT};const DEFAULT_CRUD_PERMISSION={'page':!![],'list':!![],'info':!![],'add':![],'delete':![],'update':![],'restore':![]};function _0x8705(_0x24a5f5,_0x2ec673){_0x24a5f5=_0x24a5f5-0xca;const _0x314af6=_0x314a();let _0x87058b=_0x314af6[_0x24a5f5];if(_0x8705['xwndRY']===undefined){var _0x232f8d=function(_0x4eb886){const _0x201137='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4a6978='',_0x3668e0='';for(let _0x220bb2=0x0,_0x117772,_0x37c1cd,_0x4318ba=0x0;_0x37c1cd=_0x4eb886['charAt'](_0x4318ba++);~_0x37c1cd&&(_0x117772=_0x220bb2%0x4?_0x117772*0x40+_0x37c1cd:_0x37c1cd,_0x220bb2++%0x4)?_0x4a6978+=String['fromCharCode'](0xff&_0x117772>>(-0x2*_0x220bb2&0x6)):0x0){_0x37c1cd=_0x201137['indexOf'](_0x37c1cd);}for(let _0x1e86fe=0x0,_0x107a73=_0x4a6978['length'];_0x1e86fe<_0x107a73;_0x1e86fe++){_0x3668e0+='%'+('00'+_0x4a6978['charCodeAt'](_0x1e86fe)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3668e0);};_0x8705['ICEIpm']=_0x232f8d,_0x8705['siQZQU']={},_0x8705['xwndRY']=!![];}const _0x1e1654=_0x314af6[0x0],_0x4b18e3=_0x24a5f5+_0x1e1654,_0x33c10a=_0x8705['siQZQU'][_0x4b18e3];return!_0x33c10a?(_0x87058b=_0x8705['ICEIpm'](_0x87058b),_0x8705['siQZQU'][_0x4b18e3]=_0x87058b):_0x87058b=_0x33c10a,_0x87058b;}export function mergeDict(_0x4a6978){const _0x2cd8b7=_0x8705,_0x3668e0=getCrudConfig()['dict'];if(!_0x4a6978)return{..._0x3668e0,'label':{..._0x3668e0[_0x2cd8b7(0xd1)]}};return{..._0x3668e0,..._0x4a6978,'api':{..._0x3668e0['api'],..._0x4a6978[_0x2cd8b7(0xd3)]},'pagination':{..._0x3668e0[_0x2cd8b7(0xd7)],..._0x4a6978[_0x2cd8b7(0xd7)]},'search':{..._0x3668e0['search'],..._0x4a6978[_0x2cd8b7(0xcd)]},'sort':{..._0x3668e0[_0x2cd8b7(0xcb)],..._0x4a6978[_0x2cd8b7(0xcb)]},'label':{..._0x3668e0[_0x2cd8b7(0xd1)],..._0x4a6978['label']}};}function _0x314a(){const _0x501b84=['C2vHCMnO','ndbLB0Dlu0u','ndGWt0nby3v3','mtyWmJi0EvbzCwnN','BgfIzwW','mty4rg5uAhj3','yxbP','mK1myLLRtW','mZiXotzhwwvbB3e','nta5nZyXwLDeDvzd','CgfNAw5HDgLVBG','mJK1z1vWt0Pe','mte5ndu1n1zzzuPwrW','ndGXndeXohLlChLRAW','odmZnJr4z2Ljt3e','mJaYohz6zMnSqG','C29YDa','mJmYndyZs1HIrwn1'];_0x314a=function(){return _0x501b84;};return _0x314a();}export function mergePermission(_0x220bb2,_0x117772){return{...DEFAULT_CRUD_PERMISSION,..._0x117772,..._0x220bb2};}