@mmlogic/components 0.5.6 → 0.5.8
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/dist/cjs/{cell-renderer-Coy-aD3k.js → cell-renderer-pwUGEDql.js} +8 -24
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mosterdcomponents.cjs.js +1 -1
- package/dist/cjs/mrd-boolean-field_25.cjs.entry.js +195 -52
- package/dist/cjs/mrd-merge-view.cjs.entry.js +1 -1
- package/dist/collection/components/table/mrd-table/mrd-table.css +52 -22
- package/dist/collection/components/table/mrd-table/mrd-table.js +180 -45
- package/dist/collection/components/table/mrd-table/table-parts.js +6 -3
- package/dist/collection/components/table/mrd-table/virtual-scroll.js +8 -3
- package/dist/collection/utils/i18n.js +8 -24
- package/dist/components/i18n.js +1 -1
- package/dist/components/mrd-table2.js +1 -1
- package/dist/esm/{cell-renderer-Dd_PKH0_.js → cell-renderer-B8rJpnq8.js} +8 -24
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mosterdcomponents.js +1 -1
- package/dist/esm/mrd-boolean-field_25.entry.js +195 -52
- package/dist/esm/mrd-merge-view.entry.js +1 -1
- package/dist/mosterdcomponents/cell-renderer-B8u5BCK-.js.map +1 -0
- package/dist/mosterdcomponents/client-layout-Bc42CfJB.js.map +1 -0
- package/dist/mosterdcomponents/document-attachments-BufPmMRv.js.map +1 -0
- package/dist/mosterdcomponents/field-helpers-CUJsHr1V.js.map +1 -0
- package/dist/mosterdcomponents/file-upload-common-DdTDuxEU.js.map +1 -0
- package/dist/mosterdcomponents/format-gcecItcD.js.map +1 -0
- package/dist/mosterdcomponents/i18n-Ba7_jO9I.js.map +1 -0
- package/dist/mosterdcomponents/index-1ayBojyN.js.map +1 -0
- package/dist/mosterdcomponents/index-DhffneUF.js.map +1 -0
- package/dist/mosterdcomponents/index.esm.js.map +1 -0
- package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
- package/dist/mosterdcomponents/mosterdcomponents.esm.js.map +1 -0
- package/dist/mosterdcomponents/{p-53b00783.entry.js → p-6f6c8e53.entry.js} +2 -2
- package/dist/mosterdcomponents/{p-1fc897f4.entry.js → p-e540de6a.entry.js} +1 -1
- package/dist/mosterdcomponents/p-rTM1tU_M.js +1 -0
- package/dist/mosterdcomponents/purify.es-_duHfPgC.js.map +1 -0
- package/dist/mosterdcomponents/query-params-BZbQoeYF.js.map +1 -0
- package/dist/mosterdcomponents/quill-C9pgw_k-.js.map +1 -0
- package/dist/mosterdcomponents/validation-CjjTt66G.js.map +1 -0
- package/dist/types/components/table/mrd-table/mrd-table.d.ts +53 -5
- package/dist/types/components/table/mrd-table/table-parts.d.ts +0 -2
- package/dist/types/components/table/mrd-table/virtual-scroll.d.ts +6 -1
- package/package.json +1 -1
- package/dist/mosterdcomponents/p-CGm4ff1O.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-CjjTt66G.js","sources":["src/utils/validation.ts"],"sourcesContent":["import { ClientLayoutItemFieldDataType } from '../types';\n\nexport function validateRequired(value: unknown): boolean {\n if (value === null || value === undefined) return false;\n if (typeof value === 'string') return value.trim().length > 0;\n if (Array.isArray(value)) return value.length > 0;\n if (typeof value === 'object') {\n // HyperlinkValue check\n const hv = value as { href?: unknown };\n if ('href' in hv) return typeof hv.href === 'string' && hv.href.trim().length > 0;\n // CurrencyValue check\n const cv = value as { amount?: unknown };\n if ('amount' in cv) return cv.amount !== null && cv.amount !== undefined && cv.amount !== '';\n }\n return true;\n}\n\nexport function validateEmail(value: string): boolean {\n if (!value) return true;\n return /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(value);\n}\n\nexport function validateUrl(value: string): boolean {\n if (!value) return true;\n try {\n const url = new URL(value);\n return url.protocol === 'http:' || url.protocol === 'https:';\n } catch {\n return false;\n }\n}\n\nexport function validateNumber(value: unknown, dataType: ClientLayoutItemFieldDataType): boolean {\n if (value === null || value === undefined || value === '') return true;\n const num = Number(value);\n if (isNaN(num)) return false;\n if (dataType === ClientLayoutItemFieldDataType.INTEGER) {\n return Number.isInteger(num);\n }\n if (dataType === ClientLayoutItemFieldDataType.PERCENTAGE) {\n return num >= 0 && num <= 100;\n }\n return true;\n}\n"],"names":[],"mappings":";;;AAEM,SAAU,gBAAgB,CAAC,KAAc,EAAA;AAC7C,IAAA,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;AAAE,QAAA,OAAO,KAAK;IACvD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;AAC7D,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;AAAE,QAAA,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC;AACjD,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;;QAE7B,MAAM,EAAE,GAAG,KAA2B;QACtC,IAAI,MAAM,IAAI,EAAE;AAAE,YAAA,OAAO,OAAO,EAAE,CAAC,IAAI,KAAK,QAAQ,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;;QAEjF,MAAM,EAAE,GAAG,KAA6B;QACxC,IAAI,QAAQ,IAAI,EAAE;AAAE,YAAA,OAAO,EAAE,CAAC,MAAM,KAAK,IAAI,IAAI,EAAE,CAAC,MAAM,KAAK,SAAS,IAAI,EAAE,CAAC,MAAM,KAAK,EAAE;;AAE9F,IAAA,OAAO,IAAI;AACb;AAEM,SAAU,aAAa,CAAC,KAAa,EAAA;AACzC,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,OAAO,IAAI;AACvB,IAAA,OAAO,4BAA4B,CAAC,IAAI,CAAC,KAAK,CAAC;AACjD;AAEM,SAAU,WAAW,CAAC,KAAa,EAAA;AACvC,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,OAAO,IAAI;AACvB,IAAA,IAAI;AACF,QAAA,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC;QAC1B,OAAO,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ;;IAC5D,OAAA,EAAA,EAAM;AACN,QAAA,OAAO,KAAK;;AAEhB;AAEM,SAAU,cAAc,CAAC,KAAc,EAAE,QAAuC,EAAA;IACpF,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;AAAE,QAAA,OAAO,IAAI;AACtE,IAAA,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC;IACzB,IAAI,KAAK,CAAC,GAAG,CAAC;AAAE,QAAA,OAAO,KAAK;AAC5B,IAAA,IAAI,QAAQ,KAAK,6BAA6B,CAAC,OAAO,EAAE;AACtD,QAAA,OAAO,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC;;AAE9B,IAAA,IAAI,QAAQ,KAAK,6BAA6B,CAAC,UAAU,EAAE;AACzD,QAAA,OAAO,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,GAAG;;AAE/B,IAAA,OAAO,IAAI;AACb;;;;"}
|
|
@@ -17,6 +17,13 @@ export declare class MrdTable {
|
|
|
17
17
|
private viewPopoverClickHandler;
|
|
18
18
|
/** Guards against scheduling more than one column-width measurement per freeze. */
|
|
19
19
|
private colWidthMeasureScheduled;
|
|
20
|
+
/** Drag origin of the running column resize (null = no drag in progress). */
|
|
21
|
+
private resizeOrigin;
|
|
22
|
+
/** True once the user has dragged (or auto-fitted) a column — see colWidthsUserSet usages. */
|
|
23
|
+
private colWidthsUserSet;
|
|
24
|
+
/** Set once the host drives this table through init()/setPage(). Never cleared: it has to
|
|
25
|
+
* survive resetPages(), which empties loadedPages — see the isPaginated getter. */
|
|
26
|
+
private paginationActivated;
|
|
20
27
|
/** The VIEW or RELATED_VIEW layout item. Contains view config, dataClass, fromClass, actions etc. */
|
|
21
28
|
item: ClientLayoutItem | null;
|
|
22
29
|
/** Parent record id — required for RELATED_VIEW to build /{fromClass}/{parentId}/{dataClass}. */
|
|
@@ -35,7 +42,10 @@ export declare class MrdTable {
|
|
|
35
42
|
/** Time (ms) to wait for setPage() before retrying a page request; after
|
|
36
43
|
* MAX_RETRY_ATTEMPTS retries the page is marked failed (see failedPages). */
|
|
37
44
|
requestTimeoutMs: number;
|
|
38
|
-
/** Clamp renderEnd when totalElements shrinks (e.g. after a filter is applied).
|
|
45
|
+
/** Clamp renderEnd when totalElements shrinks (e.g. after a filter is applied).
|
|
46
|
+
* 0 means "unknown" (hosts that rely on minKnownTotal never set it, and some reset it
|
|
47
|
+
* while a filter is being applied) — clamping to it would collapse the window to a
|
|
48
|
+
* single row, so leave the window alone and let the render pass clamp it. */
|
|
39
49
|
totalElementsChanged(newVal: number): void;
|
|
40
50
|
/** Reset to primary view when the item prop is replaced from outside. */
|
|
41
51
|
itemChanged(newVal: ClientLayoutItem | null): void;
|
|
@@ -48,10 +58,10 @@ export declare class MrdTable {
|
|
|
48
58
|
renderStart: number;
|
|
49
59
|
renderEnd: number;
|
|
50
60
|
colWidths: number[];
|
|
61
|
+
/** Index of the column currently being dragged by its resize handle (null = not resizing). */
|
|
62
|
+
resizingCol: number | null;
|
|
51
63
|
sortField: string;
|
|
52
64
|
sortDir: 'asc' | 'desc';
|
|
53
|
-
/** Whether the filter UI is visible on column headers. */
|
|
54
|
-
filterMode: boolean;
|
|
55
65
|
/** Active filters keyed by field name. */
|
|
56
66
|
activeFilters: Map<string, ColumnFilter>;
|
|
57
67
|
/** Field name of the currently open filter popup (null = closed). */
|
|
@@ -150,6 +160,35 @@ export declare class MrdTable {
|
|
|
150
160
|
setAggregations(data: AggregationResult): Promise<void>;
|
|
151
161
|
disconnectedCallback(): void;
|
|
152
162
|
componentDidRender(): void;
|
|
163
|
+
/** Current rendered header widths, or null when they can't be trusted (header not laid out yet). */
|
|
164
|
+
private measureColWidths;
|
|
165
|
+
/** Re-reads the rendered header widths into colWidths so a drag starts from what is
|
|
166
|
+
* actually on screen — and locks the columns if they weren't locked yet.
|
|
167
|
+
*
|
|
168
|
+
* A table narrower than its container is stretched by `minWidth: 100%`, so the rendered
|
|
169
|
+
* columns are wider than the auto-measured values held in colWidths. Dragging from those
|
|
170
|
+
* stale values moved the grabbed column to the wrong width, and dropping the stretch (which
|
|
171
|
+
* a hand-set width does) then re-laid out every other column at once. */
|
|
172
|
+
private syncColWidths;
|
|
173
|
+
private setColWidth;
|
|
174
|
+
private handleResizeStart;
|
|
175
|
+
private handleResizeMove;
|
|
176
|
+
private handleResizeEnd;
|
|
177
|
+
/** Double-click on the handle: widen the column to fit its widest *rendered* cell.
|
|
178
|
+
* Only rows currently in the virtual-scroll window are measured — off-screen pages
|
|
179
|
+
* aren't in the DOM at all, so this is "fit what you can see", not "fit all data". */
|
|
180
|
+
private handleResizeAutoFit;
|
|
181
|
+
/** Inline table style once the column widths are locked, undefined while still auto-layout.
|
|
182
|
+
* Once locked the table gets an explicit pixel width (the sum of the columns) instead of
|
|
183
|
+
* the stylesheet's `min-width: max-content`. max-content is re-derived from the cell
|
|
184
|
+
* contents, so every page that scrolled in with a longer value widened the table and
|
|
185
|
+
* re-proportioned all columns — the jitter this replaces.
|
|
186
|
+
* `minWidth: 100%` keeps an auto-measured table stretched to its container, but is dropped
|
|
187
|
+
* once the user resizes by hand: with it, the space freed by narrowing a column is
|
|
188
|
+
* redistributed over all columns, so a drag would partly spring back. */
|
|
189
|
+
private lockedTableStyle;
|
|
190
|
+
/** The resize handle rendered in the right edge of every header cell. */
|
|
191
|
+
private renderColResizer;
|
|
153
192
|
private visibleCount;
|
|
154
193
|
private sortParam;
|
|
155
194
|
/** Stable ordered list: primary view first, then alternatives (from the item prop). */
|
|
@@ -165,6 +204,15 @@ export declare class MrdTable {
|
|
|
165
204
|
private buildDataPath;
|
|
166
205
|
/** Build query params for a page request from current sort, view filters, filterClass and active column filters. */
|
|
167
206
|
private buildQueryParams;
|
|
207
|
+
/** True when the table is in paginated / virtual-scroll mode rather than driven by the
|
|
208
|
+
* rows prop. Mirrors the branch taken in render().
|
|
209
|
+
*
|
|
210
|
+
* The filter handlers gate their reload on this. They used to test minKnownTotal, which is
|
|
211
|
+
* 0 after a filter returned no rows at all — so clearing that filter reloaded nothing and
|
|
212
|
+
* the table stayed empty. Hosts that omit totalElements have the same problem, hence the
|
|
213
|
+
* sticky flag rather than loadedPages.size: resetPages() clears the loaded pages, and the
|
|
214
|
+
* mode must not flip back to the rows prop (and its "no results") while page 0 is in flight. */
|
|
215
|
+
private get isPaginated();
|
|
168
216
|
private get columns();
|
|
169
217
|
private get tableActions();
|
|
170
218
|
private toggleCreatePicker;
|
|
@@ -179,7 +227,8 @@ export declare class MrdTable {
|
|
|
179
227
|
private emitLoadAggregations;
|
|
180
228
|
/** Reset pagination state and scroll to top (used after sort or filter change). */
|
|
181
229
|
private resetPages;
|
|
182
|
-
|
|
230
|
+
/** Sorting runs through the column popup's sort section (applySort); there is no
|
|
231
|
+
* separate click-to-sort mode any more. */
|
|
183
232
|
private applySort;
|
|
184
233
|
/** Emits mrdLoadPage for a page and records the request timestamp for stale-request detection. */
|
|
185
234
|
private emitLoadPage;
|
|
@@ -193,7 +242,6 @@ export declare class MrdTable {
|
|
|
193
242
|
/** Manually retry a page the user gave up on (clicked the retry row). */
|
|
194
243
|
private retryPage;
|
|
195
244
|
private handleScroll;
|
|
196
|
-
private handleFilterToggle;
|
|
197
245
|
private handleFilterOpen;
|
|
198
246
|
private closeFilterPopup;
|
|
199
247
|
private openTextblockModal;
|
|
@@ -35,7 +35,6 @@ export declare const JsonModal: FunctionalComponent<{
|
|
|
35
35
|
onClose: () => void;
|
|
36
36
|
}>;
|
|
37
37
|
export interface ToolbarCallbacks {
|
|
38
|
-
onFilterToggle: () => void;
|
|
39
38
|
onClearAllFilters: () => void;
|
|
40
39
|
onViewSwitch: (idx: number) => void;
|
|
41
40
|
onToggleViewPopover: (e: MouseEvent) => void;
|
|
@@ -47,7 +46,6 @@ export interface ToolbarCallbacks {
|
|
|
47
46
|
}
|
|
48
47
|
export declare const Toolbar: FunctionalComponent<{
|
|
49
48
|
locale: string;
|
|
50
|
-
filterMode: boolean;
|
|
51
49
|
filterCount: number;
|
|
52
50
|
actions: TableAction[];
|
|
53
51
|
views: Array<{
|
|
@@ -12,7 +12,12 @@ export declare const REQUEST_TIMEOUT_MS = 15000;
|
|
|
12
12
|
/** Max retries for a stale page request before giving up and showing a retry row. */
|
|
13
13
|
export declare const MAX_RETRY_ATTEMPTS = 3;
|
|
14
14
|
export declare function visibleCount(tableHeight: number, rowHeight: number): number;
|
|
15
|
-
/** Render window (with buffer) for the given scroll offset.
|
|
15
|
+
/** Render window (with buffer) for the given scroll offset.
|
|
16
|
+
* total <= 0 means "not known yet" (no totalElements prop, no aggregation total and no page
|
|
17
|
+
* loaded — e.g. right after a filter reset), *not* "no rows". Clamping to total - 1 would
|
|
18
|
+
* collapse the window to renderEnd = -1, so nothing renders and no page is ever requested;
|
|
19
|
+
* the window is left unclamped instead and the render pass clamps it against
|
|
20
|
+
* effectiveTotal once real data has landed. */
|
|
16
21
|
export declare function computeWindow(scrollTop: number, rowHeight: number, tableHeight: number, total: number): {
|
|
17
22
|
renderStart: number;
|
|
18
23
|
renderEnd: number;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./p-Bc42CfJB.js";function i(e,i,t){return null==e||isNaN(e)?"":new Intl.NumberFormat(i,t).format(e)}function t(e,i,t){return null==e||isNaN(e)?"":new Intl.NumberFormat(t,{style:"currency",currency:i,minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}function r(e,i,t=2){return null==e||isNaN(e)?"":new Intl.NumberFormat(i,{style:"percent",minimumFractionDigits:t,maximumFractionDigits:t}).format(e)}function l(e,i){if(!e)return"";const t="string"==typeof e?new Date(e):e;return isNaN(t.getTime())?"":new Intl.DateTimeFormat(i,{year:"numeric",month:"2-digit",day:"2-digit"}).format(t)}function a(e,i){if(!e)return"";const t="string"==typeof e?new Date(e):e;return isNaN(t.getTime())?"":new Intl.DateTimeFormat(i,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(t)}function n(e,i){var t,r,l,a;if(!e||!e.trim())return null;const n=new Intl.NumberFormat(i).formatToParts(1234567.89),o=null!==(r=null===(t=n.find((e=>"group"===e.type)))||void 0===t?void 0:t.value)&&void 0!==r?r:",",_=null!==(a=null===(l=n.find((e=>"decimal"===e.type)))||void 0===l?void 0:l.value)&&void 0!==a?a:".",c=e.replace(new RegExp(`\\${o}`,"g"),"").replace(new RegExp(`\\${_}`),".").replace("%","").trim(),s=parseFloat(c);return isNaN(s)?null:s}const o={nl:{required:"Dit veld is verplicht",select_placeholder:"Selecteer een optie",search_placeholder:"Zoeken...",upload_file:"Bestand uploaden",choose_file:"Bestand kiezen",clear:"Wissen",today:"Vandaag",invalid_email:"Voer een geldig e-mailadres in",invalid_url:"Voer een geldige URL in",invalid_number:"Voer een geldig getal in",drop_file_here:"Sleep bestand hierheen of",browse:"bladeren",file_too_large:"Bestand is te groot",invalid_image:"Selecteer een afbeeldingsbestand",search_results:"Zoekresultaten",no_results:"Geen resultaten gevonden",load_failed_retry:"Laden mislukt — opnieuw proberen",loading:"Laden...",submit:"Opslaan",cancel:"Annuleren",remove:"Verwijderen",add:"Toevoegen",yes:"Ja",no:"Nee",table_of:"van",download:"Downloaden",value_empty:"—",table_filter:"Filteren",table_filter_hide:"Filter verbergen",table_filter_active:"actief",table_filter_clear_all:"Alle filters wissen",table_new_record:"Nieuw record",table_export_excel:"Exporteer naar Excel",doc_view_switch:"Weergave wisselen",doc_view_tree:"Boomweergave",doc_upload:"Uploaden",doc_upload_to:"Uploaden naar",doc_view_list:"Lijstweergave",filter_sorting:"Sortering",filter_ascending:"Oplopend",filter_descending:"Aflopend",filter_section:"Filter",filter_apply:"Toepassen",filter_clear:"Wissen",filter_contains:"Bevat",filter_starts_with:"Begint met",filter_equals:"Gelijk aan",filter_has_value:"Heeft waarde",filter_is_empty:"Is leeg",filter_is_not_empty:"Is niet leeg",filter_exact:"Exact",filter_range:"Bereik",filter_from:"Van",filter_to:"Tot",filter_all:"Alle",filter_select_all:"Alles",filter_select_none:"Geen",filter_search_value:"Zoekwaarde...",filter_no_support:"Geen filtering beschikbaar voor dit veldtype.",textblock_show_more:"Meer tonen",close:"Sluiten",history_until:"tot",history_badge_tooltip:"Vorige waarden",hyperlink_name:"Linktekst (optioneel)",new_folder:"Nieuwe folder",folder_name_placeholder:"Foldernaam",folder_no_slash:"Een foldernaam mag geen '/' bevatten",folder_duplicate:"Er bestaat al een folder met deze naam",doc_empty_drop:"Nog geen documenten — sleep bestanden hierheen",merge_search_hint:"Zoek het duplicaat waarmee je wilt samenvoegen",merge_select:"Selecteer",merge_compare_heading:"Los conflicten op",merge_column_a:"Huidig (blijft behouden)",merge_column_b:"Kandidaat (wordt verwijderd)",merge_auto_heading:"Deze velden worden automatisch overgenomen van de kandidaat:",merge_no_conflicts:"Geen conflicterende velden gevonden",merge_continue:"Doorgaan",merge_back:"Terug",merge_confirm_heading:"Bevestig samenvoegen",merge_confirm_warning:"Dit kan niet ongedaan worden gemaakt: de kandidaat wordt definitief verwijderd.",merge_confirm_button:"Samenvoegen bevestigen",invoice_title:"Factuur",invoice_date:"Factuurdatum",invoice_due_date:"Vervaldatum",invoice_subtotal:"Subtotaal",invoice_tax:"BTW",invoice_total:"Totaal",invoice_customer:"Klant",invoice_supplier:"Leverancier",email_from:"Van",email_to:"Aan",email_cc:"Cc",email_date:"Datum",email_show_headers:"Toon technische headers"},en:{required:"This field is required",select_placeholder:"Select an option",search_placeholder:"Search...",upload_file:"Upload file",choose_file:"Choose file",clear:"Clear",today:"Today",invalid_email:"Please enter a valid email address",invalid_url:"Please enter a valid URL",invalid_number:"Please enter a valid number",drop_file_here:"Drop file here or",browse:"browse",file_too_large:"File is too large",invalid_image:"Please select an image file",search_results:"Search results",no_results:"No results found",load_failed_retry:"Failed to load — retry",loading:"Loading...",submit:"Save",cancel:"Cancel",remove:"Remove",add:"Add",yes:"Yes",no:"No",table_of:"of",download:"Download",value_empty:"—",table_filter:"Filter",table_filter_hide:"Hide filter",table_filter_active:"active",table_filter_clear_all:"Clear all filters",table_new_record:"New record",table_export_excel:"Export to Excel",doc_view_switch:"Switch view",doc_view_tree:"Tree view",doc_upload:"Upload",doc_upload_to:"Upload to",doc_view_list:"List view",filter_sorting:"Sorting",filter_ascending:"Ascending",filter_descending:"Descending",filter_section:"Filter",filter_apply:"Apply",filter_clear:"Clear",filter_contains:"Contains",filter_starts_with:"Starts with",filter_equals:"Equals",filter_has_value:"Has value",filter_is_empty:"Is empty",filter_is_not_empty:"Is not empty",filter_exact:"Exact",filter_range:"Range",filter_from:"From",filter_to:"To",filter_all:"All",filter_select_all:"All",filter_select_none:"None",filter_search_value:"Search value...",filter_no_support:"Filtering is not available for this field type.",textblock_show_more:"Show more",close:"Close",history_until:"until",history_badge_tooltip:"Previous values",hyperlink_name:"Link text (optional)",new_folder:"New folder",folder_name_placeholder:"Folder name",folder_no_slash:"A folder name cannot contain '/'",folder_duplicate:"A folder with this name already exists",doc_empty_drop:"No documents yet — drop files here",merge_search_hint:"Search for the duplicate to merge with",merge_select:"Select",merge_compare_heading:"Resolve conflicts",merge_column_a:"Current (kept)",merge_column_b:"Candidate (will be deleted)",merge_auto_heading:"These fields will be taken from the candidate automatically:",merge_no_conflicts:"No conflicting fields found",merge_continue:"Continue",merge_back:"Back",merge_confirm_heading:"Confirm merge",merge_confirm_warning:"This cannot be undone: the candidate will be permanently deleted.",merge_confirm_button:"Confirm merge",invoice_title:"Invoice",invoice_date:"Invoice date",invoice_due_date:"Due date",invoice_subtotal:"Subtotal",invoice_tax:"Tax",invoice_total:"Total",invoice_customer:"Customer",invoice_supplier:"Supplier",email_from:"From",email_to:"To",email_cc:"Cc",email_date:"Date",email_show_headers:"Show technical headers"},ar:{required:"هذا الحقل مطلوب",select_placeholder:"اختر خياراً",search_placeholder:"بحث...",upload_file:"رفع ملف",choose_file:"اختر ملفاً",clear:"مسح",today:"اليوم",invalid_email:"يرجى إدخال عنوان بريد إلكتروني صحيح",invalid_url:"يرجى إدخال رابط صحيح",invalid_number:"يرجى إدخال رقم صحيح",drop_file_here:"اسحب الملف هنا أو",browse:"تصفح",file_too_large:"الملف كبير جداً",invalid_image:"يرجى اختيار ملف صورة",search_results:"نتائج البحث",no_results:"لم يتم العثور على نتائج",load_failed_retry:"فشل التحميل — إعادة المحاولة",loading:"جار التحميل...",submit:"حفظ",cancel:"إلغاء",remove:"إزالة",add:"إضافة",yes:"نعم",no:"لا",table_of:"من أصل",download:"تنزيل",value_empty:"—",table_filter:"تصفية",table_filter_hide:"إخفاء التصفية",table_filter_active:"نشط",table_filter_clear_all:"مسح جميع الفلاتر",table_new_record:"سجل جديد",table_export_excel:"تصدير إلى Excel",doc_view_switch:"تبديل العرض",doc_view_tree:"عرض شجري",doc_upload:"رفع",doc_upload_to:"رفع إلى",doc_view_list:"عرض القائمة",filter_sorting:"الترتيب",filter_ascending:"تصاعدي",filter_descending:"تنازلي",filter_section:"تصفية",filter_apply:"تطبيق",filter_clear:"مسح",filter_contains:"يحتوي على",filter_starts_with:"يبدأ بـ",filter_equals:"يساوي",filter_has_value:"له قيمة",filter_is_empty:"فارغ",filter_is_not_empty:"ليس فارغاً",filter_exact:"دقيق",filter_range:"نطاق",filter_from:"من",filter_to:"إلى",filter_all:"الكل",filter_select_all:"الكل",filter_select_none:"لا شيء",filter_search_value:"قيمة البحث...",filter_no_support:"التصفية غير متاحة لهذا النوع من الحقول.",textblock_show_more:"عرض المزيد",close:"إغلاق",history_until:"حتى",history_badge_tooltip:"القيم السابقة",hyperlink_name:"نص الرابط (اختياري)",merge_search_hint:"ابحث عن السجل المكرر للدمج معه",merge_select:"اختر",merge_compare_heading:"حل التعارضات",merge_column_a:"الحالي (سيتم الاحتفاظ به)",merge_column_b:"المرشح (سيتم حذفه)",merge_auto_heading:"سيتم أخذ هذه الحقول من المرشح تلقائياً:",merge_no_conflicts:"لم يتم العثور على حقول متعارضة",merge_continue:"متابعة",merge_back:"رجوع",merge_confirm_heading:"تأكيد الدمج",merge_confirm_warning:"لا يمكن التراجع عن هذا الإجراء: سيتم حذف المرشح نهائياً.",merge_confirm_button:"تأكيد الدمج",invoice_title:"فاتورة",invoice_date:"تاريخ الفاتورة",invoice_due_date:"تاريخ الاستحقاق",invoice_subtotal:"المجموع الفرعي",invoice_tax:"الضريبة",invoice_total:"الإجمالي",invoice_customer:"العميل",invoice_supplier:"المورد",email_from:"من",email_to:"إلى",email_cc:"نسخة",email_date:"التاريخ",email_show_headers:"إظهار الترويسات التقنية"},fr:{required:"Ce champ est obligatoire",select_placeholder:"Sélectionner une option",search_placeholder:"Rechercher...",upload_file:"Télécharger un fichier",choose_file:"Choisir un fichier",clear:"Effacer",today:"Aujourd'hui",invalid_email:"Veuillez saisir une adresse e-mail valide",invalid_url:"Veuillez saisir une URL valide",invalid_number:"Veuillez saisir un nombre valide",drop_file_here:"Déposez le fichier ici ou",browse:"parcourir",file_too_large:"Le fichier est trop volumineux",invalid_image:"Veuillez sélectionner un fichier image",search_results:"Résultats de recherche",no_results:"Aucun résultat trouvé",load_failed_retry:"Échec du chargement — réessayer",loading:"Chargement...",submit:"Enregistrer",cancel:"Annuler",remove:"Supprimer",add:"Ajouter",yes:"Oui",no:"Non",table_of:"sur",download:"Télécharger",value_empty:"—",table_filter:"Filtrer",table_filter_hide:"Masquer le filtre",table_filter_active:"actif",table_filter_clear_all:"Effacer tous les filtres",table_new_record:"Nouvel enregistrement",table_export_excel:"Exporter vers Excel",doc_view_switch:"Changer de vue",doc_view_tree:"Vue arborescente",doc_upload:"Téléverser",doc_upload_to:"Téléverser vers",doc_view_list:"Vue liste",filter_sorting:"Tri",filter_ascending:"Croissant",filter_descending:"Décroissant",filter_section:"Filtre",filter_apply:"Appliquer",filter_clear:"Effacer",filter_contains:"Contient",filter_starts_with:"Commence par",filter_equals:"Égal à",filter_has_value:"A une valeur",filter_is_empty:"Est vide",filter_is_not_empty:"N'est pas vide",filter_exact:"Exact",filter_range:"Plage",filter_from:"De",filter_to:"À",filter_all:"Tous",filter_select_all:"Tous",filter_select_none:"Aucun",filter_search_value:"Valeur de recherche...",filter_no_support:"Le filtrage n'est pas disponible pour ce type de champ.",textblock_show_more:"Voir plus",close:"Fermer",history_until:"jusqu'au",history_badge_tooltip:"Valeurs précédentes",hyperlink_name:"Texte du lien (optionnel)",merge_search_hint:"Rechercher le doublon à fusionner",merge_select:"Sélectionner",merge_compare_heading:"Résoudre les conflits",merge_column_a:"Actuel (conservé)",merge_column_b:"Candidat (sera supprimé)",merge_auto_heading:"Ces champs seront repris automatiquement du candidat :",merge_no_conflicts:"Aucun champ en conflit trouvé",merge_continue:"Continuer",merge_back:"Retour",merge_confirm_heading:"Confirmer la fusion",merge_confirm_warning:"Cette action est irréversible : le candidat sera définitivement supprimé.",merge_confirm_button:"Confirmer la fusion",invoice_title:"Facture",invoice_date:"Date de facture",invoice_due_date:"Date d'échéance",invoice_subtotal:"Sous-total",invoice_tax:"TVA",invoice_total:"Total",invoice_customer:"Client",invoice_supplier:"Fournisseur",email_from:"De",email_to:"À",email_cc:"Cc",email_date:"Date",email_show_headers:"Afficher les en-têtes techniques"},de:{required:"Dieses Feld ist erforderlich",select_placeholder:"Option auswählen",search_placeholder:"Suchen...",upload_file:"Datei hochladen",choose_file:"Datei auswählen",clear:"Löschen",today:"Heute",invalid_email:"Bitte geben Sie eine gültige E-Mail-Adresse ein",invalid_url:"Bitte geben Sie eine gültige URL ein",invalid_number:"Bitte geben Sie eine gültige Zahl ein",drop_file_here:"Datei hier ablegen oder",browse:"durchsuchen",file_too_large:"Datei ist zu groß",invalid_image:"Bitte eine Bilddatei auswählen",search_results:"Suchergebnisse",no_results:"Keine Ergebnisse gefunden",load_failed_retry:"Laden fehlgeschlagen — erneut versuchen",loading:"Laden...",submit:"Speichern",cancel:"Abbrechen",remove:"Entfernen",add:"Hinzufügen",yes:"Ja",no:"Nein",table_of:"von",download:"Herunterladen",value_empty:"—",table_filter:"Filtern",table_filter_hide:"Filter ausblenden",table_filter_active:"aktiv",table_filter_clear_all:"Alle Filter löschen",table_new_record:"Neuer Eintrag",table_export_excel:"Als Excel exportieren",doc_view_switch:"Ansicht wechseln",doc_view_tree:"Baumansicht",doc_upload:"Hochladen",doc_upload_to:"Hochladen nach",doc_view_list:"Listenansicht",filter_sorting:"Sortierung",filter_ascending:"Aufsteigend",filter_descending:"Absteigend",filter_section:"Filter",filter_apply:"Anwenden",filter_clear:"Löschen",filter_contains:"Enthält",filter_starts_with:"Beginnt mit",filter_equals:"Gleich",filter_has_value:"Hat Wert",filter_is_empty:"Ist leer",filter_is_not_empty:"Ist nicht leer",filter_exact:"Genau",filter_range:"Bereich",filter_from:"Von",filter_to:"Bis",filter_all:"Alle",filter_select_all:"Alle",filter_select_none:"Keine",filter_search_value:"Suchwert...",filter_no_support:"Filterung ist für diesen Feldtyp nicht verfügbar.",textblock_show_more:"Mehr anzeigen",close:"Schließen",history_until:"bis",history_badge_tooltip:"Vorherige Werte",hyperlink_name:"Linktext (optional)",merge_search_hint:"Suchen Sie das Duplikat, mit dem zusammengeführt werden soll",merge_select:"Auswählen",merge_compare_heading:"Konflikte lösen",merge_column_a:"Aktuell (bleibt erhalten)",merge_column_b:"Kandidat (wird gelöscht)",merge_auto_heading:"Diese Felder werden automatisch vom Kandidaten übernommen:",merge_no_conflicts:"Keine widersprüchlichen Felder gefunden",merge_continue:"Weiter",merge_back:"Zurück",merge_confirm_heading:"Zusammenführung bestätigen",merge_confirm_warning:"Dies kann nicht rückgängig gemacht werden: der Kandidat wird endgültig gelöscht.",merge_confirm_button:"Zusammenführung bestätigen",invoice_title:"Rechnung",invoice_date:"Rechnungsdatum",invoice_due_date:"Fälligkeitsdatum",invoice_subtotal:"Zwischensumme",invoice_tax:"MwSt.",invoice_total:"Gesamt",invoice_customer:"Kunde",invoice_supplier:"Lieferant",email_from:"Von",email_to:"An",email_cc:"Cc",email_date:"Datum",email_show_headers:"Technische Header anzeigen"},es:{required:"Este campo es obligatorio",select_placeholder:"Seleccionar una opción",search_placeholder:"Buscar...",upload_file:"Subir archivo",choose_file:"Elegir archivo",clear:"Borrar",today:"Hoy",invalid_email:"Por favor, introduzca una dirección de correo electrónico válida",invalid_url:"Por favor, introduzca una URL válida",invalid_number:"Por favor, introduzca un número válido",drop_file_here:"Suelte el archivo aquí o",browse:"explorar",file_too_large:"El archivo es demasiado grande",invalid_image:"Seleccione un archivo de imagen",search_results:"Resultados de búsqueda",no_results:"No se encontraron resultados",load_failed_retry:"Error al cargar — reintentar",loading:"Cargando...",submit:"Guardar",cancel:"Cancelar",remove:"Eliminar",add:"Añadir",yes:"Sí",no:"No",table_of:"de",download:"Descargar",value_empty:"—",table_filter:"Filtrar",table_filter_hide:"Ocultar filtro",table_filter_active:"activo",table_filter_clear_all:"Borrar todos los filtros",table_new_record:"Nuevo registro",table_export_excel:"Exportar a Excel",doc_view_switch:"Cambiar vista",doc_view_tree:"Vista de árbol",doc_upload:"Subir",doc_upload_to:"Subir a",doc_view_list:"Vista de lista",filter_sorting:"Ordenación",filter_ascending:"Ascendente",filter_descending:"Descendente",filter_section:"Filtro",filter_apply:"Aplicar",filter_clear:"Borrar",filter_contains:"Contiene",filter_starts_with:"Empieza por",filter_equals:"Igual a",filter_has_value:"Tiene valor",filter_is_empty:"Está vacío",filter_is_not_empty:"No está vacío",filter_exact:"Exacto",filter_range:"Rango",filter_from:"Desde",filter_to:"Hasta",filter_all:"Todos",filter_select_all:"Todos",filter_select_none:"Ninguno",filter_search_value:"Valor de búsqueda...",filter_no_support:"El filtrado no está disponible para este tipo de campo.",textblock_show_more:"Mostrar más",close:"Cerrar",history_until:"hasta",history_badge_tooltip:"Valores anteriores",hyperlink_name:"Texto del enlace (opcional)",merge_search_hint:"Busque el duplicado con el que fusionar",merge_select:"Seleccionar",merge_compare_heading:"Resolver conflictos",merge_column_a:"Actual (se conserva)",merge_column_b:"Candidato (se eliminará)",merge_auto_heading:"Estos campos se tomarán automáticamente del candidato:",merge_no_conflicts:"No se encontraron campos en conflicto",merge_continue:"Continuar",merge_back:"Atrás",merge_confirm_heading:"Confirmar fusión",merge_confirm_warning:"Esto no se puede deshacer: el candidato se eliminará permanentemente.",merge_confirm_button:"Confirmar fusión",invoice_title:"Factura",invoice_date:"Fecha de factura",invoice_due_date:"Fecha de vencimiento",invoice_subtotal:"Subtotal",invoice_tax:"Impuesto",invoice_total:"Total",invoice_customer:"Cliente",invoice_supplier:"Proveedor",email_from:"De",email_to:"Para",email_cc:"Cc",email_date:"Fecha",email_show_headers:"Mostrar encabezados técnicos"},it:{required:"Questo campo è obbligatorio",select_placeholder:"Seleziona un'opzione",search_placeholder:"Cerca...",upload_file:"Carica file",choose_file:"Scegli file",clear:"Cancella",today:"Oggi",invalid_email:"Inserisci un indirizzo email valido",invalid_url:"Inserisci un URL valido",invalid_number:"Inserisci un numero valido",drop_file_here:"Trascina il file qui o",browse:"sfoglia",file_too_large:"Il file è troppo grande",invalid_image:"Seleziona un file immagine",search_results:"Risultati della ricerca",no_results:"Nessun risultato trovato",load_failed_retry:"Caricamento non riuscito — riprova",loading:"Caricamento...",submit:"Salva",cancel:"Annulla",remove:"Rimuovi",add:"Aggiungi",yes:"Sì",no:"No",table_of:"di",download:"Scarica",value_empty:"—",table_filter:"Filtra",table_filter_hide:"Nascondi filtro",table_filter_active:"attivo",table_filter_clear_all:"Cancella tutti i filtri",table_new_record:"Nuovo record",table_export_excel:"Esporta in Excel",doc_view_switch:"Cambia vista",doc_view_tree:"Vista ad albero",doc_upload:"Carica",doc_upload_to:"Carica in",doc_view_list:"Vista elenco",filter_sorting:"Ordinamento",filter_ascending:"Crescente",filter_descending:"Decrescente",filter_section:"Filtro",filter_apply:"Applica",filter_clear:"Cancella",filter_contains:"Contiene",filter_starts_with:"Inizia con",filter_equals:"Uguale a",filter_has_value:"Ha valore",filter_is_empty:"È vuoto",filter_is_not_empty:"Non è vuoto",filter_exact:"Esatto",filter_range:"Intervallo",filter_from:"Da",filter_to:"A",filter_all:"Tutti",filter_select_all:"Tutti",filter_select_none:"Nessuno",filter_search_value:"Valore di ricerca...",filter_no_support:"Il filtro non è disponibile per questo tipo di campo.",textblock_show_more:"Mostra altro",close:"Chiudi",history_until:"fino a",history_badge_tooltip:"Valori precedenti",hyperlink_name:"Testo del collegamento (opzionale)",merge_search_hint:"Cerca il duplicato con cui unire",merge_select:"Seleziona",merge_compare_heading:"Risolvi i conflitti",merge_column_a:"Attuale (viene mantenuto)",merge_column_b:"Candidato (verrà eliminato)",merge_auto_heading:"Questi campi verranno ripresi automaticamente dal candidato:",merge_no_conflicts:"Nessun campo in conflitto trovato",merge_continue:"Continua",merge_back:"Indietro",merge_confirm_heading:"Conferma unione",merge_confirm_warning:"Questa azione non può essere annullata: il candidato verrà eliminato definitivamente.",merge_confirm_button:"Conferma unione",invoice_title:"Fattura",invoice_date:"Data fattura",invoice_due_date:"Data di scadenza",invoice_subtotal:"Subtotale",invoice_tax:"IVA",invoice_total:"Totale",invoice_customer:"Cliente",invoice_supplier:"Fornitore",email_from:"Da",email_to:"A",email_cc:"Cc",email_date:"Data",email_show_headers:"Mostra intestazioni tecniche"},uk:{required:"Це поле обов'язкове",select_placeholder:"Виберіть варіант",search_placeholder:"Пошук...",upload_file:"Завантажити файл",choose_file:"Вибрати файл",clear:"Очистити",today:"Сьогодні",invalid_email:"Будь ласка, введіть дійсну адресу електронної пошти",invalid_url:"Будь ласка, введіть дійсну URL-адресу",invalid_number:"Будь ласка, введіть дійсне число",drop_file_here:"Перетягніть файл сюди або",browse:"огляд",file_too_large:"Файл занадто великий",invalid_image:"Будь ласка, виберіть файл зображення",search_results:"Результати пошуку",no_results:"Результатів не знайдено",load_failed_retry:"Не вдалося завантажити — повторити",loading:"Завантаження...",submit:"Зберегти",cancel:"Скасувати",remove:"Видалити",add:"Додати",yes:"Так",no:"Ні",table_of:"з",download:"Завантажити",value_empty:"—",table_filter:"Фільтрувати",table_filter_hide:"Сховати фільтр",table_filter_active:"активний",table_filter_clear_all:"Очистити всі фільтри",table_new_record:"Новий запис",table_export_excel:"Експортувати до Excel",doc_view_switch:"Змінити вигляд",doc_view_tree:"Деревоподібний вигляд",doc_upload:"Завантажити",doc_upload_to:"Завантажити до",doc_view_list:"Список",filter_sorting:"Сортування",filter_ascending:"За зростанням",filter_descending:"За спаданням",filter_section:"Фільтр",filter_apply:"Застосувати",filter_clear:"Очистити",filter_contains:"Містить",filter_starts_with:"Починається з",filter_equals:"Дорівнює",filter_has_value:"Має значення",filter_is_empty:"Порожнє",filter_is_not_empty:"Не порожнє",filter_exact:"Точно",filter_range:"Діапазон",filter_from:"Від",filter_to:"До",filter_all:"Всі",filter_select_all:"Всі",filter_select_none:"Жодного",filter_search_value:"Значення для пошуку...",filter_no_support:"Фільтрування недоступне для цього типу поля.",textblock_show_more:"Показати більше",close:"Закрити",history_until:"до",history_badge_tooltip:"Попередні значення",hyperlink_name:"Текст посилання (необов'язково)",merge_search_hint:"Знайдіть дублікат для об'єднання",merge_select:"Вибрати",merge_compare_heading:"Вирішити конфлікти",merge_column_a:"Поточний (залишається)",merge_column_b:"Кандидат (буде видалено)",merge_auto_heading:"Ці поля будуть автоматично взяті з кандидата:",merge_no_conflicts:"Конфліктних полів не знайдено",merge_continue:"Продовжити",merge_back:"Назад",merge_confirm_heading:"Підтвердити об'єднання",merge_confirm_warning:"Цю дію не можна скасувати: кандидат буде остаточно видалено.",merge_confirm_button:"Підтвердити об'єднання",invoice_title:"Рахунок-фактура",invoice_date:"Дата рахунку",invoice_due_date:"Термін оплати",invoice_subtotal:"Проміжний підсумок",invoice_tax:"ПДВ",invoice_total:"Разом",invoice_customer:"Клієнт",invoice_supplier:"Постачальник",email_from:"Від",email_to:"Кому",email_cc:"Копія",email_date:"Дата",email_show_headers:"Показати технічні заголовки"}};function _(e,i){var t,r,l;const a=(null!=i?i:"en").split("-")[0].toLowerCase();return null!==(l=null!==(r=(null!==(t=o[a])&&void 0!==t?t:o.en)[e])&&void 0!==r?r:o.en[e])&&void 0!==l?l:e}class c{static render(i,t,r){var l,a,n,o;if(i.type===e.RELATION){const e=null!==(l=i.name)&&void 0!==l?l:"",r=null===(a=null==t?void 0:t._links)||void 0===a?void 0:a[e];return r?Array.isArray(r)?r.map((e=>{var i;return null!==(i=e.name)&&void 0!==i?i:""})).filter(Boolean).join(", "):null!==(n=r.name)&&void 0!==n?n:"":""}if(i.type!==e.FIELD)return"";const _=null!==(o=i.name)&&void 0!==o?o:"",s=i.dataType,d=i.listItems;let u=null==t?void 0:t[_];return i.historyEnabled&&null!=u&&"object"==typeof u&&!Array.isArray(u)&&"current"in u&&(u=u.current),null==u||""===u?"":(Array.isArray(u)?u:[u]).map((e=>c.renderValue(null!=s?s:"TEXT",e,null!=d?d:[],r))).filter((e=>""!==e)).join(", ")}static renderValue(e,n,o,_){var c,s;switch(e){case"INTEGER":return i(Number(n),_,{maximumFractionDigits:0});case"DECIMAL":return i(Number(n),_);case"PERCENTAGE":return r(Number(n),_);case"CURRENCY":{const{amount:e,currency:r}="object"==typeof n&&null!==n?n:{amount:n,currency:""};return r?t(Number(e),r,_):i(Number(e),_)}case"DATE":return l(n,_);case"DATETIME":return a(n,_);case"TIME":return function(e,i){if(!e)return"";const[t,r]=e.split(":").map(Number),l=new Date;return l.setHours(t,r,0,0),new Intl.DateTimeFormat(i,{hour:"2-digit",minute:"2-digit"}).format(l)}(n,_);case"BOOLEAN":return n?"✓":"";case"FILE":case"IMAGE":return"object"==typeof n&&null!==n&&null!==(c=n.fileName)&&void 0!==c?c:"";case"LIST":{const e=o.find((e=>e.key===String(n)));return null!==(s=null==e?void 0:e.label)&&void 0!==s?s:String(n)}case"TEXTBLOCK":{const e=String(n).replace(/<[^>]*>/g,""),i=document.createElement("textarea");return i.innerHTML=e,i.value.trim()}case"LONGTEXT":return String(n).replace(/[\r\n]+/g," ").trim();case"JSON":return("object"==typeof n?JSON.stringify(n):String(n)).replace(/[\r\n]+/g," ").trim();case"SECRET":return n?"••••••••":"";default:return String(n)}}static formatJson(e,i=!1){try{const t="string"==typeof e?JSON.parse(e):e;return(i?JSON.stringify(t):JSON.stringify(t,null,2)).replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,(e=>{let i="color:#2aa198";return/^"/.test(e)?i=/:$/.test(e)?"color:#881391":"color:#268bd2":/true|false/.test(e)?i="color:#b58900":/null/.test(e)&&(i="color:#dc322f"),`<span style="${i}">${e}</span>`}))}catch(i){return String(e)}}}export{c as C,l as a,a as b,t as c,r as d,i as f,n as p,_ as t}
|