@knkcs/importhub-ui 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,86 +1,99 @@
1
- import { toJson as se, fromJson as yt, create as Se } from "@bufbuild/protobuf";
2
- import { file_google_protobuf_timestamp as ue, file_google_protobuf_struct as Ee, timestampDate as Zt } from "@bufbuild/protobuf/wkt";
3
- import { createClient as le, ConnectError as ve, Code as me } from "@connectrpc/connect";
4
- import { createConnectTransport as St } from "@connectrpc/connect-web";
5
- import { messageDesc as x, fileDesc as P, serviceDesc as be } from "@bufbuild/protobuf/codegenv2";
6
- import { R as Xt, C as At, N as he } from "./importhub-client-CrS-3Zuu.js";
7
- import { jsxs as V, jsx as l, Fragment as z } from "react/jsx-runtime";
8
- import { Link as $e, Box as K, Spinner as It, Stack as v, Alert as Je, Text as Q, Grid as Wt, HStack as k, MenuRoot as ht, MenuTrigger as Bt, MenuContent as Et, MenuItem as vt } from "@knkcs/anker/primitives";
9
- import { ExternalLink as Jt, Blocks as ft, Ampersand as Ct, Waypoints as Yt, FileCog as Nt, FileUp as Ut, Trash2 as pe, Plus as j, ArrowUp as wt, ArrowDown as Ft, Settings2 as zt } from "lucide-react";
10
- import { useTranslation as S } from "react-i18next";
11
- import { I as X, u as Y, i as g, L, a as fe, b as O, c as et, d as tt, C as lt, V as nt, D as it, R as at, e as Ve, f as Ce, r as ot, M as Kt, g as Qt } from "./mapping-page-v0GJAPjW.js";
12
- import { h as ln, j as nn, S as an, k as on } from "./mapping-page-v0GJAPjW.js";
13
- import { EmptyState as kt, IconButton as re, Button as C, StatusBadge as Ye } from "@knkcs/anker/atoms";
14
- import { useHostIdentity as B } from "@knkcs/anker/host";
15
- import { IndexPageTemplate as q, DetailPageTemplate as D, usePageRail as ct } from "@knkcs/anker/templates";
16
- import { useQuery as W, useQueryClient as _, useMutation as Ne } from "@tanstack/react-query";
17
- import { ContextRail as J, Card as F, Modal as st, LinkCell as Ue, CountCell as xt, TruncatedTextCell as f, DataTable as ge, CodeCell as ke, SlugCell as Lt } from "@knkcs/anker/components";
18
- import { InputField as N, TextareaField as we, BaseSelectField as Be, SwitchField as xe } from "@knkcs/anker/forms";
19
- import { useState as H, useEffect as $, useMemo as M, useRef as Ht } from "react";
20
- import { useForm as Re, useFieldArray as Mt, FormProvider as Ge, useFormContext as rt, useWatch as ye } from "react-hook-form";
21
- import { Link as Tt } from "react-router";
22
- import { zodResolver as Dt } from "@hookform/resolvers/zod";
23
- import { FieldKitProvider as Pt, SpecForm as Le } from "@knkcs/fieldkit/renderer";
24
- import { specToZodSchema as jt, builtInFieldTypes as He } from "@knkcs/fieldkit/schema";
25
- const ee = /* @__PURE__ */ P("CiBpbXBvcnRodWIvdjEvY29uZmlndXJhdGlvbi5wcm90bxIMaW1wb3J0aHViLnYxIkgKCFZhbGlkaXR5Eg0KBXZhbGlkGAEgASgIEi0KB3JlYXNvbnMYAiADKAsyHC5pbXBvcnRodWIudjEuVmFsaWRpdHlSZWFzb24iPQoOVmFsaWRpdHlSZWFzb24SDAoEcGF0aBgBIAEoCRIMCgRjb2RlGAIgASgJEg8KB21lc3NhZ2UYAyABKAkisAEKFUNvbmZpZ3VyYXRpb25SZXZpc2lvbhIKCgJpZBgBIAEoCRIQCghzYXZlZF9ieRgCIAEoCRIsCghzYXZlZF9hdBgDIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASKAoIdmFsaWRpdHkYBCABKAsyFi5pbXBvcnRodWIudjEuVmFsaWRpdHkSIQoZcmVzdG9yZWRfZnJvbV9yZXZpc2lvbl9pZBgFIAEoCSKNAQoUQ29uZmlndXJhdGlvblJlbGVhc2USCgoCaWQYASABKAkSEwoLcmV2aXNpb25faWQYAiABKAkSDgoGbnVtYmVyGAMgASgFEhMKC3JlbGVhc2VkX2J5GAQgASgJEi8KC3JlbGVhc2VkX2F0GAUgASgLMhouZ29vZ2xlLnByb3RvYnV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e.ADDED = 2] = "ADDED", e[e.REMOVED = 3] = "REMOVED", e[e.CHANGED = 4] = "CHANGED", e))(w || {});
27
- const dt = /* @__PURE__ */ P("Ch1pbXBvcnRodWIvdjEvZW50aXR5X3NldC5wcm90bxIMaW1wb3J0aHViLnYxIugBCglFbnRpdHlTZXQSCgoCaWQYASABKAkSEwoLcmV2aXNpb25faWQYAiABKAkSLwoHY29udGVudBgDIAEoCzIeLmltcG9ydGh1Yi52MS5FbnRpdHlTZXRDb250ZW50EigKCHZhbGlkaXR5GAQgASgLMhYuaW1wb3J0aHViLnYxLlZhbGlkaXR5Ei8KBXN0YXRlGAUgASgLMiAuaW1wb3J0aHViLnYxLkNvbmZpZ3VyYXRpb25TdGF0ZRIuCgpjcmVhdGVkX2F0GAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCKmAQoQRW50aXR5U2V0Q29udGVudBIMCgRuYW1lGAEgASgJEhMKC2Rlc2NyaXB0aW9uGAIgASgJEj4KCGVudGl0aWVzGAMgAygLMiwuaW1wb3J0aHViLnYxLkVudGl0eVNldENvbnRlbnQuRW50aXRpZXNFbnRyeRovCg1FbnRpdGllc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAEiFwoVTGlzdEVudGl0eVNldHNSZXF1ZXN0IkYKFkxpc3RFbnRpdHlTZXRzUmVzcG9uc2USLAoLZW50aXR5X3NldHMYASADKAsyFy5pbXBvcnRodWIudjEuRW50aXR5U2V0IjYKE0dldEVudGl0eVNldFJlcXVlc3QSCgoCaWQYASABKAkSEwoLcmV2aXNpb25faWQYAiABKAkiQwoUR2V0RW50aXR5U2V0UmVzcG9uc2USKwoKZW50aXR5X3NldBgBIAEoCzIXLmltcG9ydGh1Yi52MS5FbnRpdHlTZXQiSQoWQ3JlYXRlRW50aXR5U2V0UmVxdWVzdBIvCgdjb250ZW50GAEgASgLMh4uaW1wb3J0aHViLnYxLkVudGl0eVNldENvbnRlbnQiRgoXQ3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fUklDSF9URVhUX0ZJRUxEEAIybwoQUHJvY2Vzc29yU2VydmljZRJbCg5MaXN0UHJvY2Vzc29ycxIjLmltcG9ydGh1Yi52MS5MaXN0UHJvY2Vzc29yc1JlcXVlc3QaJC5pbXBvcnRodWIudjEuTGlzdFByb2Nlc3NvcnNSZXNwb25zZUI5WjdnaXRodWIuY29tL2tua2NzL2ltcG9ydGh1Yi9nZW4vaW1wb3J0aHViL3YxO2ltcG9ydGh1YnYxYgZwcm90bzM", [Ee]);
28
- var ut = /* @__PURE__ */ ((e) => (e[e.UNSPECIFIED = 0] = "UNSPECIFIED", e[e.PREPROCESSOR = 1] = "PREPROCESSOR", e[e.POST_PROCESSOR = 2] = "POST_PROCESSOR", e))(ut || {}), bt = /* @__PURE__ */ ((e) => (e[e.UNSPECIFIED = 0] = "UNSPECIFIED", e[e.SOURCE_FILE = 1] = "SOURCE_FILE", e[e.RICH_TEXT_FIELD = 2] = "RICH_TEXT_FIELD", e))(bt || {});
29
- const nl = /* @__PURE__ */ be(ll, 0), te = (e) => ({
1
+ import { toJson as Be, fromJson as qt, create as Ke } from "@bufbuild/protobuf";
2
+ import { file_google_protobuf_timestamp as oe, file_google_protobuf_struct as _e, timestampFromDate as _t, timestampDate as $t } from "@bufbuild/protobuf/wkt";
3
+ import { createClient as le, ConnectError as Ce, Code as O } from "@connectrpc/connect";
4
+ import { createConnectTransport as en } from "@connectrpc/connect-web";
5
+ import { serviceDesc as re, fileDesc as $, messageDesc as ce } from "@bufbuild/protobuf/codegenv2";
6
+ import { S as tn, R as nn, C as ln, N as Pe, A as ct } from "./importhub-client-BS6F4DW2.js";
7
+ import { jsxs as g, jsx as t, Fragment as _ } from "react/jsx-runtime";
8
+ import { Link as $e, Box as H, Spinner as an, Stack as X, Alert as f, HStack as D, Text as Q, Grid as Zt, NativeSelect as on, Center as Et, Progress as Xt, List as st, MenuRoot as rn, MenuTrigger as cn, MenuContent as sn, MenuItem as dn } from "@knkcs/anker/primitives";
9
+ import { ExternalLink as mn, Blocks as pn, Ampersand as un, Waypoints as bn, FileCog as gn, FileUp as Vn, Trash2 as be, KeyRound as yn, Plus as se, CircleStop as hn, Play as Bt, ArrowUp as Rn, ArrowDown as In, Settings2 as Sn, Lock as An } from "lucide-react";
10
+ import { useTranslation as R } from "react-i18next";
11
+ import { I, u as K, i as h, L as z, a as ge, b as Ve, c as Wt, d as ft, C as vt, V as Jt, D as Ct, R as Ut, e as de, f as et, r as wt, M as Gn, g as Zn } from "./mapping-page-wJywO-hg.js";
12
+ import { h as bi, j as gi, S as Vi, k as yi } from "./mapping-page-wJywO-hg.js";
13
+ import { EmptyState as tt, StatusBadge as Ue, ClipboardInput as En, Button as B, IconButton as We, SearchInput as Xn } from "@knkcs/anker/atoms";
14
+ import { useHostIdentity as W } from "@knkcs/anker/host";
15
+ import { IndexPageTemplate as ee, DetailPageTemplate as L, usePageRail as nt } from "@knkcs/anker/templates";
16
+ import { useQuery as C, useQueryClient as P, useMutation as te, useInfiniteQuery as Yt } from "@tanstack/react-query";
17
+ import { StatusBadgeCell as Bn, Modal as ye, TruncatedTextCell as w, CodeCell as ve, IdentityCell as Wn, DateCell as je, ActionCell as fn, DataTable as ne, ContextRail as x, Card as N, LinkCell as we, CountCell as vn, SlugCell as Nt, Toolbar as xe, DescriptionList as Y, NumberCell as Qe, UploadDropZone as Jn } from "@knkcs/anker/components";
18
+ import { useCallback as Cn, useEffect as j, useState as F, useMemo as k, useRef as Ft } from "react";
19
+ import { InputField as T, DatePickerField as Oe, TextareaField as lt, BaseSelectField as Je, SwitchField as dt } from "@knkcs/anker/forms";
20
+ import { useForm as me, FormProvider as pe, useFieldArray as Un, useFormContext as Kt, useWatch as he } from "react-hook-form";
21
+ import { Link as xt } from "react-router";
22
+ import { zodResolver as wn } from "@hookform/resolvers/zod";
23
+ import { FieldKitProvider as Yn, SpecForm as mt } from "@knkcs/fieldkit/renderer";
24
+ import { specToZodSchema as Nn, builtInFieldTypes as pt } from "@knkcs/fieldkit/schema";
25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nJvbV9yZWxlYXNlGAQgASgIIlUKD0ZpZWxkQ29tcGFyaXNvbhINCgVmaWVsZBgBIAEoCRIzCgZzdGF0dXMYAiABKA4yIy5pbXBvcnRodWIudjEuRmllbGRDb21wYXJpc29uU3RhdHVzIiwKEEltcG9ydFByb2ZpbGVSZWYSCgoCaWQYASABKAkSDAoEbmFtZRgCIAEoCSJNChJDb25maWd1cmF0aW9uSW5Vc2USNwoPaW1wb3J0X3Byb2ZpbGVzGAEgAygLMh4uaW1wb3J0aHViLnYxLkltcG9ydFByb2ZpbGVSZWYq1AEKFUZpZWxkQ29tcGFyaXNvblN0YXR1cxInCiNGSUVMRF9DT01QQVJJU09OX1NUQVRVU19VTlNQRUNJRklFRBAAEiUKIUZJRUxEX0NPTVBBUklTT05fU1RBVFVTX1VOQ0hBTkdFRBABEiEKHUZJRUxEX0NPTVBBUklTT05fU1RBVFVTX0FEREVEEAISIwofRklFTERfQ09NUEFSSVNPTl9TVEFUVVNfUkVNT1ZFRBADEiMKH0ZJRUxEX0NPTVBBUklTT05fU1RBVFVTX0NIQU5HRUQQBEI5WjdnaXRodWIuY29tL2tua2NzL2ltcG9ydGh1Yi9nZW4vaW1wb3J0aHViL3YxO2ltcG9ydGh1YnYxYgZwcm90bzM", [oe]), xn = /* @__PURE__ */ ce(Re, 0), Qn = /* @__PURE__ */ ce(Re, 7);
26
+ var ie = /* @__PURE__ */ ((e) => (e[e.UNSPECIFIED = 0] = "UNSPECIFIED", e[e.UNCHANGED = 1] = "UNCHANGED", e[e.ADDED = 2] = "ADDED", e[e.REMOVED = 3] = "REMOVED", e[e.CHANGED = 4] = "CHANGED", e))(ie || {});
27
+ const Qt = /* @__PURE__ */ $("Ch1pbXBvcnRodWIvdjEvZW50aXR5X3NldC5wcm90bxIMaW1wb3J0aHViLnYxIugBCglFbnRpdHlTZXQSCgoCaWQYASABKAkSEwoLcmV2aXNpb25faWQYAiABKAkSLwoHY29udGVudBgDIAEoCzIeLmltcG9ydGh1Yi52MS5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HNSZXNwb25zZRJMCglHZXRJbXBvcnQSHi5pbXBvcnRodWIudjEuR2V0SW1wb3J0UmVxdWVzdBofLmltcG9ydGh1Yi52MS5HZXRJbXBvcnRSZXNwb25zZRJVCgxDYW5jZWxJbXBvcnQSIS5pbXBvcnRodWIudjEuQ2FuY2VsSW1wb3J0UmVxdWVzdBoiLmltcG9ydGh1Yi52MS5DYW5jZWxJbXBvcnRSZXNwb25zZRJhChBMaXN0SXRlbVByb2JsZW1zEiUuaW1wb3J0aHViLnYxLkxpc3RJdGVtUHJvYmxlbXNSZXF1ZXN0GiYuaW1wb3J0aHViLnYxLkxpc3RJdGVtUHJvYmxlbXNSZXNwb25zZUI5WjdnaXRodWIuY29tL2tua2NzL2ltcG9ydGh1Yi9nZW4vaW1wb3J0aHViL3YxO2ltcG9ydGh1YnYxYgZwcm90bzM", [oe]);
28
+ var ae = /* @__PURE__ */ ((e) => (e[e.UNSPECIFIED = 0] = "UNSPECIFIED", e[e.QUEUED = 1] = "QUEUED", e[e.READING = 2] = "READING", e[e.WRITING = 3] = "WRITING", e[e.ENDED = 4] = "ENDED", e))(ae || {}), ue = /* @__PURE__ */ ((e) => (e[e.UNSPECIFIED = 0] = "UNSPECIFIED", e[e.SUCCEEDED = 1] = "SUCCEEDED", e[e.SUCCEEDED_WITH_PROBLEMS = 2] = "SUCCEEDED_WITH_PROBLEMS", e[e.FAILED = 3] = "FAILED", e[e.CANCELLED = 4] = "CANCELLED", e))(ue || {});
29
+ const Hn = /* @__PURE__ */ re(Ln, 0), it = /* @__PURE__ */ $("CiFpbXBvcnRodWIvdjEvaW1wb3J0X3Byb2ZpbGUucHJvdG8SDGltcG9ydGh1Yi52MSKiAgoNSW1wb3J0UHJvZmlsZRIKCgJpZBgBIAEoCRITCgtyZXZpc2lvbl9pZBgCIAEoCRIzCgdjb250ZW50GAMgASgLMiIuaW1wb3J0aHViLnYxLkltcG9ydFByb2ZpbGVDb250ZW50EigKCHZhbGlkaXR5GAQgASgLMhYuaW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vcnRQcm9maWxlUmV2aXNpb25SZXNwb25zZUI5WjdnaXRodWIuY29tL2tua2NzL2ltcG9ydGh1Yi9nZW4vaW1wb3J0aHViL3YxO2ltcG9ydGh1YnYxYgZwcm90bzM", [_e, oe, Re]), kt = /* @__PURE__ */ ce(it, 1), ut = /* @__PURE__ */ ce(it, 2), Mn = /* @__PURE__ */ re(it, 0), zt = /* @__PURE__ */ $("ChppbXBvcnRodWIvdjEvbWFwcGluZy5wcm90bxIMaW1wb3J0aHViLnYxIpYCCgdNYXBwaW5nEgoKAmlkGAEgASgJEhMKC3JldmlzaW9uX2lkGAIgASgJEi0KB2NvbnRlbnQYAyABKAsyHC5pbXBvcnRodWIudjEuTWFwcGluZ0NvbnRlbnQSKAoIdmFsaWRpdHkYBCABKAsyFi5pbXBvcnRodWIudjEuVmFsaWRpdHkSLwoFc3RhdGUYBSABKAsyIC5pbXBvcnRodWIudjEuQ29uZmlndXJhdGlvblN0YXRlEi4KCmNyZWF0ZWRfYXQYBiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEjAKEGN1cnJlbnRfdmFsaWRpdHkYByABKAsyFi5pbXBvcnRodWIudjEuVmFsaWRpdHkitwUKDk1hcHBpbmdDb250ZW50EgwKBG5hbWUYASABKAkSEwoLZGVzY3JpcHRpb24YAiABKAkSFAoMYmx1ZXByaW50X2lkGAMgASgJEhwKFGJsdWVwcmludF9yZWxlYXNlX2lkGAQgASgJEhgKEGVsZW1lbnRfc2VsZWN0b3IYBSABKAkSKwoKc291cmNlX2tleRgGIAEoCzIXLmltcG9ydGh1Yi52MS5Tb3VyY2VLZXkSJwoGZmllbGRzGAcgAygLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdBIxCg12ZXJzaW9uX21hdGNoGAggASgLMhouaW1wb3J0aHViLnYxLlZlcnNpb25NYXRjaBI7Cg92YWxpZGl0eV9wZXJpb2QYCSABKAsyIi5pbXBvcnRodWIudjEuVmFsaWRpdHlQZXJpb2RTb3V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UxEEAIybwoQUHJvY2Vzc29yU2VydmljZRJbCg5MaXN0UHJvY2Vzc29ycxIjLmltcG9ydGh1Yi52MS5MaXN0UHJvY2Vzc29yc1JlcXVlc3QaJC5pbXBvcnRodWIudjEuTGlzdFByb2Nlc3NvcnNSZXNwb25zZUI5WjdnaXRodWIuY29tL2tua2NzL2ltcG9ydGh1Yi9nZW4vaW1wb3J0aHViL3YxO2ltcG9ydGh1YnYxYgZwcm90bzM", [_e]);
30
+ var Lt = /* @__PURE__ */ ((e) => (e[e.UNSPECIFIED = 0] = "UNSPECIFIED", e[e.PREPROCESSOR = 1] = "PREPROCESSOR", e[e.POST_PROCESSOR = 2] = "POST_PROCESSOR", e))(Lt || {}), Ht = /* @__PURE__ */ ((e) => (e[e.UNSPECIFIED = 0] = "UNSPECIFIED", e[e.SOURCE_FILE = 1] = "SOURCE_FILE", e[e.RICH_TEXT_FIELD = 2] = "RICH_TEXT_FIELD", e))(Ht || {});
31
+ const Pn = /* @__PURE__ */ re(Dn, 0);
32
+ function jn(e, n, l) {
33
+ return new Promise((i, c) => {
34
+ const s = new XMLHttpRequest();
35
+ s.open("PUT", e), s.setRequestHeader("x-ms-blob-type", "BlockBlob"), s.setRequestHeader("Content-Type", n.type || "application/xml"), s.upload.onprogress = (m) => {
36
+ m.lengthComputable && m.total > 0 && l(m.loaded / m.total);
37
+ }, s.onload = () => {
38
+ s.status >= 200 && s.status < 300 ? (l(1), i()) : c(new Error(`the upload failed: ${s.status} ${s.statusText}`));
39
+ }, s.onerror = () => c(new Error("the upload failed: the network is away")), s.send(n);
40
+ });
41
+ }
42
+ const Ie = (e) => ({
30
43
  valid: e?.valid ?? !1,
31
- reasons: (e?.reasons ?? []).map((t) => ({ path: t.path, code: t.code, message: t.message }))
32
- }), Ke = (e) => ({
44
+ reasons: (e?.reasons ?? []).map((n) => ({ path: n.path, code: n.code, message: n.message }))
45
+ }), ot = (e) => ({
33
46
  draftRevisionId: e?.draftRevisionId ?? "",
34
47
  draftDiffersFromRelease: e?.draftDiffersFromRelease ?? !0,
35
48
  ...e?.latestRelease ? { latestRelease: { id: e.latestRelease.id, number: e.latestRelease.number } } : {}
36
- }), Te = (e) => ({
49
+ }), bt = (e) => ({
37
50
  processor: e.processor,
38
51
  settings: { ...e.settings ?? {} }
39
- }), De = (e) => ({
52
+ }), gt = (e) => ({
40
53
  processor: e.processor,
41
54
  settings: e.settings
42
55
  });
43
- function ne(e) {
44
- const t = e.content;
56
+ function Se(e) {
57
+ const n = e.content;
45
58
  return {
46
59
  id: e.id,
47
60
  content: {
48
- name: t?.name ?? "",
49
- description: t?.description ?? "",
50
- entitySetId: t?.entitySetId ?? "",
51
- preprocessors: (t?.preprocessors ?? []).map(Te),
52
- mappingIds: [...t?.mappingIds ?? []],
53
- postProcessors: (t?.postProcessors ?? []).map(Te),
54
- autoPublish: t?.autoPublish ?? !1,
55
- deleteSourceFileOnSuccess: t?.deleteSourceFileOnSuccess ?? !1
61
+ name: n?.name ?? "",
62
+ description: n?.description ?? "",
63
+ entitySetId: n?.entitySetId ?? "",
64
+ preprocessors: (n?.preprocessors ?? []).map(bt),
65
+ mappingIds: [...n?.mappingIds ?? []],
66
+ postProcessors: (n?.postProcessors ?? []).map(bt),
67
+ autoPublish: n?.autoPublish ?? !1,
68
+ deleteSourceFileOnSuccess: n?.deleteSourceFileOnSuccess ?? !1
56
69
  },
57
70
  // What an Import would meet now, not only what was decided at the save
58
71
  // (manage-import-profiles:AC6).
59
- validity: te(e.currentValidity ?? e.validity),
60
- state: Ke(e.state)
72
+ validity: Ie(e.currentValidity ?? e.validity),
73
+ state: ot(e.state)
61
74
  };
62
75
  }
63
- const Pe = (e) => Se(mt, {
76
+ const Vt = (e) => Ke(kt, {
64
77
  ...e,
65
- preprocessors: e.preprocessors.map((t) => Se(Me, De(t))),
66
- postProcessors: e.postProcessors.map((t) => Se(Me, De(t)))
78
+ preprocessors: e.preprocessors.map((n) => Ke(ut, gt(n))),
79
+ postProcessors: e.postProcessors.map((n) => Ke(ut, gt(n)))
67
80
  });
68
- function ie(e) {
69
- const t = e.content ? se(ze, e.content) : { name: "", blueprintId: "", blueprintReleaseId: "" };
81
+ function Ae(e) {
82
+ const n = e.content ? Be(at, e.content) : { name: "", blueprintId: "", blueprintReleaseId: "" };
70
83
  return {
71
84
  id: e.id,
72
85
  content: {
73
- ...t,
74
- name: t.name ?? "",
75
- blueprintId: t.blueprintId ?? "",
76
- blueprintReleaseId: t.blueprintReleaseId ?? ""
86
+ ...n,
87
+ name: n.name ?? "",
88
+ blueprintId: n.blueprintId ?? "",
89
+ blueprintReleaseId: n.blueprintReleaseId ?? ""
77
90
  },
78
- validity: te(e.currentValidity ?? e.validity),
79
- state: Ke(e.state)
91
+ validity: Ie(e.currentValidity ?? e.validity),
92
+ state: ot(e.state)
80
93
  };
81
94
  }
82
- const je = (e) => yt(ze, e, { ignoreUnknownFields: !1 });
83
- function ae(e) {
95
+ const yt = (e) => qt(at, e, { ignoreUnknownFields: !1 });
96
+ function Ge(e) {
84
97
  return {
85
98
  id: e.id,
86
99
  content: {
@@ -88,476 +101,881 @@ function ae(e) {
88
101
  description: e.content?.description ?? "",
89
102
  entities: { ...e.content?.entities ?? {} }
90
103
  },
91
- validity: te(e.validity),
92
- state: Ke(e.state)
104
+ validity: Ie(e.validity),
105
+ state: ot(e.state)
93
106
  };
94
107
  }
95
- const Vt = (e) => e ? Zt(e).toISOString() : "", de = (e) => ({
108
+ const q = (e) => e ? $t(e).toISOString() : "", fe = (e) => ({
96
109
  id: e?.id ?? "",
97
110
  number: e?.number ?? 0,
98
111
  revisionId: e?.revisionId ?? "",
99
112
  releasedBy: e?.releasedBy ?? "",
100
- releasedAt: Vt(e?.releasedAt)
101
- }), il = (e) => ({
113
+ releasedAt: q(e?.releasedAt)
114
+ }), On = (e) => ({
102
115
  id: e.id,
103
116
  savedBy: e.savedBy,
104
- savedAt: Vt(e.savedAt),
105
- validity: te(e.validity),
117
+ savedAt: q(e.savedAt),
118
+ validity: Ie(e.validity),
106
119
  restoredFromRevisionId: e.restoredFromRevisionId
107
- }), Xe = (e) => ({
108
- revisions: e.revisions.map(il),
109
- releases: e.releases.map(de),
120
+ }), ke = (e) => ({
121
+ revisions: e.revisions.map(On),
122
+ releases: e.releases.map(fe),
110
123
  nextPageToken: e.nextPageToken
111
- }), al = {
112
- [w.UNSPECIFIED]: "changed",
113
- [w.UNCHANGED]: "unchanged",
114
- [w.ADDED]: "added",
115
- [w.REMOVED]: "removed",
116
- [w.CHANGED]: "changed"
117
- }, Oe = (e, t) => ({
124
+ }), qn = {
125
+ [ie.UNSPECIFIED]: "changed",
126
+ [ie.UNCHANGED]: "unchanged",
127
+ [ie.ADDED]: "added",
128
+ [ie.REMOVED]: "removed",
129
+ [ie.CHANGED]: "changed"
130
+ }, ht = (e, n) => ({
118
131
  revisionId: e?.revisionId ?? "",
119
- content: e?.content ? t(e.content) : {}
120
- }), Ae = { useProtoFieldName: !0, alwaysEmitImplicit: !0 }, Ie = (e, t) => ({
121
- from: Oe(e.from, t),
122
- to: Oe(e.to, t),
123
- fields: e.fields.map((i) => ({ field: i.field, status: al[i.status] ?? "changed" }))
132
+ content: e?.content ? n(e.content) : {}
133
+ }), ze = { useProtoFieldName: !0, alwaysEmitImplicit: !0 }, Le = (e, n) => ({
134
+ from: ht(e.from, n),
135
+ to: ht(e.to, n),
136
+ fields: e.fields.map((l) => ({ field: l.field, status: qn[l.status] ?? "changed" }))
137
+ }), _n = {
138
+ [ae.UNSPECIFIED]: "queued",
139
+ [ae.QUEUED]: "queued",
140
+ [ae.READING]: "reading",
141
+ [ae.WRITING]: "writing",
142
+ [ae.ENDED]: "ended"
143
+ }, $n = {
144
+ [ue.SUCCEEDED]: "succeeded",
145
+ [ue.SUCCEEDED_WITH_PROBLEMS]: "succeeded_with_problems",
146
+ [ue.FAILED]: "failed",
147
+ [ue.CANCELLED]: "cancelled"
148
+ }, He = (e) => ({
149
+ configurationId: e.configurationId,
150
+ name: e.name,
151
+ releaseId: e.releaseId,
152
+ number: e.number
153
+ });
154
+ function Ze(e) {
155
+ const n = e.counts, l = $n[e.outcome];
156
+ return {
157
+ id: e.id,
158
+ importProfileId: e.importProfileId,
159
+ importProfileName: e.importProfileName,
160
+ sourceFileId: e.sourceFileId,
161
+ startedBy: e.startedBy,
162
+ phase: _n[e.phase] ?? "queued",
163
+ ...l ? { outcome: l } : {},
164
+ failureReason: e.failureReason,
165
+ progress: { done: e.progress?.done ?? 0, total: e.progress?.total ?? 0 },
166
+ counts: {
167
+ matched: n?.matched ?? 0,
168
+ created: n?.created ?? 0,
169
+ problems: n?.problems ?? 0,
170
+ planned: n?.planned ?? 0,
171
+ corrected: n?.corrected ?? 0,
172
+ kept: n?.kept ?? 0,
173
+ unchanged: n?.unchanged ?? 0
174
+ },
175
+ changeSetId: e.changeSetId,
176
+ releases: {
177
+ ...e.releases?.importProfile ? { importProfile: He(e.releases.importProfile) } : {},
178
+ mappings: (e.releases?.mappings ?? []).map(He),
179
+ ...e.releases?.entitySet ? { entitySet: He(e.releases.entitySet) } : {}
180
+ },
181
+ createTime: q(e.createTime),
182
+ startTime: q(e.startTime),
183
+ endTime: q(e.endTime),
184
+ cancelledBy: e.cancelledBy,
185
+ effectiveDate: e.effectiveDate,
186
+ ...e.source ? { source: { date: e.source.date, reference: e.source.reference } } : {}
187
+ };
188
+ }
189
+ const Rt = (e) => ({
190
+ id: e.id,
191
+ name: e.name,
192
+ keyPrefix: e.keyPrefix,
193
+ owner: e.owner,
194
+ expireTime: q(e.expireTime),
195
+ createTime: q(e.createTime)
124
196
  });
125
- function gt(e) {
126
- const t = ve.from(e);
127
- if (t.code === me.FailedPrecondition) {
128
- const [i] = t.findDetails(qt);
129
- if (i)
130
- throw new At(
131
- i.importProfiles.map((n) => ({ id: n.id, name: n.name })),
132
- t.rawMessage
197
+ async function el(e) {
198
+ try {
199
+ return await e();
200
+ } catch (n) {
201
+ const l = Ce.from(n);
202
+ throw l.code === O.PermissionDenied || l.code === O.FailedPrecondition || l.code === O.NotFound ? new tn(l.rawMessage) : l;
203
+ }
204
+ }
205
+ function Mt(e) {
206
+ const n = Ce.from(e);
207
+ if (n.code === O.FailedPrecondition) {
208
+ const [l] = n.findDetails(Qn);
209
+ if (l)
210
+ throw new ln(
211
+ l.importProfiles.map((i) => ({ id: i.id, name: i.name })),
212
+ n.rawMessage
133
213
  );
134
214
  }
135
- throw t.code === me.AlreadyExists ? new he(t.rawMessage) : t;
215
+ throw n.code === O.AlreadyExists ? new Pe(n.rawMessage) : n;
136
216
  }
137
- async function ol(e) {
217
+ async function tl(e) {
138
218
  try {
139
219
  return await e();
140
- } catch (t) {
141
- const i = ve.from(t);
142
- if (i.code === me.FailedPrecondition) {
143
- const [n] = i.findDetails(Ot);
144
- throw new Xt(i.rawMessage, n ? te(n) : void 0);
220
+ } catch (n) {
221
+ const l = Ce.from(n);
222
+ if (l.code === O.FailedPrecondition) {
223
+ const [i] = l.findDetails(xn);
224
+ throw new nn(l.rawMessage, i ? Ie(i) : void 0);
145
225
  }
146
- gt(t);
226
+ Mt(n);
147
227
  }
148
228
  }
149
- async function y(e) {
229
+ async function A(e) {
150
230
  try {
151
231
  return await e();
152
- } catch (t) {
153
- gt(t);
232
+ } catch (n) {
233
+ Mt(n);
154
234
  }
155
235
  }
156
- function Hl(e) {
157
- const t = e.transport ?? St({ baseUrl: e.baseUrl, fetch: e.fetch }), i = le(el, t), n = le(nl, t), c = le(tl, t), s = le($t, t);
236
+ function $l(e) {
237
+ const n = e.transport ?? en({ baseUrl: e.baseUrl, fetch: e.fetch }), l = le(Mn, n), i = le(Pn, n), c = le(Tn, n), s = le(zn, n), m = le(Hn, n), p = le(Kn, n), u = e.putFile ?? jn;
158
238
  return {
159
- listImportProfiles: () => y(async () => (await i.listImportProfiles({})).importProfiles.map(ne)),
160
- getImportProfile: (a) => y(
161
- async () => ne(E((await i.getImportProfile({ id: a })).importProfile))
239
+ listImportProfiles: () => A(async () => (await l.listImportProfiles({})).importProfiles.map(Se)),
240
+ getImportProfile: (o) => A(
241
+ async () => Se(U((await l.getImportProfile({ id: o })).importProfile))
162
242
  ),
163
- createImportProfile: (a) => y(
164
- async () => ne(
165
- E(
166
- (await i.createImportProfile({ content: Pe(a) })).importProfile
243
+ createImportProfile: (o) => A(
244
+ async () => Se(
245
+ U(
246
+ (await l.createImportProfile({ content: Vt(o) })).importProfile
167
247
  )
168
248
  )
169
249
  ),
170
- updateImportProfile: (a, r, p) => y(
171
- async () => ne(
172
- E(
173
- (await i.updateImportProfile({
174
- id: a,
175
- content: Pe(r),
176
- draftRevisionId: p
250
+ updateImportProfile: (o, r, a) => A(
251
+ async () => Se(
252
+ U(
253
+ (await l.updateImportProfile({
254
+ id: o,
255
+ content: Vt(r),
256
+ draftRevisionId: a
177
257
  })).importProfile
178
258
  )
179
259
  )
180
260
  ),
181
- deleteImportProfile: (a) => y(async () => {
182
- await i.deleteImportProfile({ id: a });
261
+ deleteImportProfile: (o) => A(async () => {
262
+ await l.deleteImportProfile({ id: o });
183
263
  }),
184
- listProcessors: () => y(
185
- async () => (await n.listProcessors({})).processors.map((a) => ({
186
- name: a.name,
187
- kind: a.kind === ut.POST_PROCESSOR ? "post_processor" : "preprocessor",
188
- target: a.target === bt.RICH_TEXT_FIELD ? "rich_text_field" : "source_file",
189
- description: a.description,
190
- settingsSpec: a.settingsSpec
264
+ listProcessors: () => A(
265
+ async () => (await i.listProcessors({})).processors.map((o) => ({
266
+ name: o.name,
267
+ kind: o.kind === Lt.POST_PROCESSOR ? "post_processor" : "preprocessor",
268
+ target: o.target === Ht.RICH_TEXT_FIELD ? "rich_text_field" : "source_file",
269
+ description: o.description,
270
+ settingsSpec: o.settingsSpec
191
271
  }))
192
272
  ),
193
- listMappings: () => y(async () => (await c.listMappings({})).mappings.map(ie)),
194
- getMapping: (a) => y(async () => ie(E((await c.getMapping({ id: a })).mapping))),
195
- createMapping: (a) => y(
196
- async () => ie(
197
- E(
198
- (await c.createMapping({ content: je(a) })).mapping
273
+ listMappings: () => A(async () => (await c.listMappings({})).mappings.map(Ae)),
274
+ getMapping: (o) => A(async () => Ae(U((await c.getMapping({ id: o })).mapping))),
275
+ createMapping: (o) => A(
276
+ async () => Ae(
277
+ U(
278
+ (await c.createMapping({ content: yt(o) })).mapping
199
279
  )
200
280
  )
201
281
  ),
202
- updateMapping: (a, r, p) => y(
203
- async () => ie(
204
- E(
282
+ updateMapping: (o, r, a) => A(
283
+ async () => Ae(
284
+ U(
205
285
  (await c.updateMapping({
206
- id: a,
207
- content: je(r),
208
- draftRevisionId: p
286
+ id: o,
287
+ content: yt(r),
288
+ draftRevisionId: a
209
289
  })).mapping
210
290
  )
211
291
  )
212
292
  ),
213
- deleteMapping: (a) => y(async () => {
214
- await c.deleteMapping({ id: a });
293
+ deleteMapping: (o) => A(async () => {
294
+ await c.deleteMapping({ id: o });
215
295
  }),
216
- listMappingImportProfiles: (a) => y(
217
- async () => (await c.listMappingImportProfiles({ id: a })).importProfiles.map((r) => ({
296
+ listMappingImportProfiles: (o) => A(
297
+ async () => (await c.listMappingImportProfiles({ id: o })).importProfiles.map((r) => ({
218
298
  id: r.id,
219
299
  name: r.name
220
300
  }))
221
301
  ),
222
- checkMappingBlueprintRelease: (a, r) => y(async () => {
223
- const p = await c.checkMappingBlueprintRelease({ id: a, blueprintReleaseId: r });
302
+ checkMappingBlueprintRelease: (o, r) => A(async () => {
303
+ const a = await c.checkMappingBlueprintRelease({ id: o, blueprintReleaseId: r });
224
304
  return {
225
- blueprintId: p.blueprintId,
226
- missingFieldPaths: [...p.missingFieldPaths],
227
- missingReleaseSpecFields: [...p.missingReleaseSpecFields]
305
+ blueprintId: a.blueprintId,
306
+ missingFieldPaths: [...a.missingFieldPaths],
307
+ missingReleaseSpecFields: [...a.missingReleaseSpecFields]
228
308
  };
229
309
  }),
230
- listEntitySets: () => y(async () => (await s.listEntitySets({})).entitySets.map(ae)),
231
- getEntitySet: (a) => y(
232
- async () => ae(E((await s.getEntitySet({ id: a })).entitySet))
310
+ listEntitySets: () => A(async () => (await s.listEntitySets({})).entitySets.map(Ge)),
311
+ getEntitySet: (o) => A(
312
+ async () => Ge(U((await s.getEntitySet({ id: o })).entitySet))
233
313
  ),
234
- createEntitySet: (a) => y(
235
- async () => ae(E((await s.createEntitySet({ content: a })).entitySet))
314
+ createEntitySet: (o) => A(
315
+ async () => Ge(U((await s.createEntitySet({ content: o })).entitySet))
236
316
  ),
237
- updateEntitySet: (a, r, p) => y(
238
- async () => ae(
239
- E(
240
- (await s.updateEntitySet({ id: a, content: r, draftRevisionId: p })).entitySet
317
+ updateEntitySet: (o, r, a) => A(
318
+ async () => Ge(
319
+ U(
320
+ (await s.updateEntitySet({ id: o, content: r, draftRevisionId: a })).entitySet
241
321
  )
242
322
  )
243
323
  ),
244
- deleteEntitySet: (a) => y(async () => {
245
- await s.deleteEntitySet({ id: a });
324
+ deleteEntitySet: (o) => A(async () => {
325
+ await s.deleteEntitySet({ id: o });
246
326
  }),
247
327
  // One RPC per kind of configuration, each on its own service (the
248
328
  // protos have no configuration service: a client always knows which
249
329
  // kind it looks at); the screens ask by kind.
250
- cutRelease: (a, r, p) => ol(async () => {
251
- const m = { id: r, draftRevisionId: p };
252
- switch (a) {
330
+ cutRelease: (o, r, a) => tl(async () => {
331
+ const d = { id: r, draftRevisionId: a };
332
+ switch (o) {
253
333
  case "importProfile":
254
334
  return {
255
- release: de((await i.cutImportProfileRelease(m)).release),
335
+ release: fe((await l.cutImportProfileRelease(d)).release),
256
336
  importProfiles: []
257
337
  };
258
338
  case "mapping": {
259
- const d = await c.cutMappingRelease(m);
339
+ const b = await c.cutMappingRelease(d);
260
340
  return {
261
- release: de(d.release),
262
- importProfiles: d.importProfiles.map((o) => ({ id: o.id, name: o.name }))
341
+ release: fe(b.release),
342
+ importProfiles: b.importProfiles.map((V) => ({ id: V.id, name: V.name }))
263
343
  };
264
344
  }
265
345
  case "entitySet":
266
346
  return {
267
- release: de((await s.cutEntitySetRelease(m)).release),
347
+ release: fe((await s.cutEntitySetRelease(d)).release),
268
348
  importProfiles: []
269
349
  };
270
350
  }
271
351
  }),
272
- listHistory: (a, r, p) => y(async () => {
273
- const m = { id: r, pageToken: p };
274
- switch (a) {
352
+ listHistory: (o, r, a) => A(async () => {
353
+ const d = { id: r, pageToken: a };
354
+ switch (o) {
275
355
  case "importProfile":
276
- return Xe(await i.listImportProfileHistory(m));
356
+ return ke(await l.listImportProfileHistory(d));
277
357
  case "mapping":
278
- return Xe(await c.listMappingHistory(m));
358
+ return ke(await c.listMappingHistory(d));
279
359
  case "entitySet":
280
- return Xe(await s.listEntitySetHistory(m));
360
+ return ke(await s.listEntitySetHistory(d));
281
361
  }
282
362
  }),
283
- compareRevisions: (a, r, p, m) => y(async () => {
284
- const d = { id: r, fromRevisionId: p, toRevisionId: m };
285
- switch (a) {
363
+ compareRevisions: (o, r, a, d) => A(async () => {
364
+ const b = { id: r, fromRevisionId: a, toRevisionId: d };
365
+ switch (o) {
286
366
  case "importProfile":
287
- return Ie(
288
- await i.compareImportProfileRevisions(d),
289
- (o) => se(mt, o, Ae)
367
+ return Le(
368
+ await l.compareImportProfileRevisions(b),
369
+ (V) => Be(kt, V, ze)
290
370
  );
291
371
  case "mapping":
292
- return Ie(
293
- await c.compareMappingRevisions(d),
294
- (o) => se(ze, o, Ae)
372
+ return Le(
373
+ await c.compareMappingRevisions(b),
374
+ (V) => Be(at, V, ze)
295
375
  );
296
376
  case "entitySet":
297
- return Ie(
298
- await s.compareEntitySetRevisions(d),
299
- (o) => se(_t, o, Ae)
377
+ return Le(
378
+ await s.compareEntitySetRevisions(b),
379
+ (V) => Be(kn, V, ze)
300
380
  );
301
381
  }
302
382
  }),
303
- restoreRevision: (a, r, p, m) => y(async () => {
304
- const d = { id: r, revisionId: p, draftRevisionId: m };
305
- switch (a) {
383
+ restoreRevision: (o, r, a, d) => A(async () => {
384
+ const b = { id: r, revisionId: a, draftRevisionId: d };
385
+ switch (o) {
306
386
  case "importProfile":
307
- await i.restoreImportProfileRevision(d);
387
+ await l.restoreImportProfileRevision(b);
308
388
  return;
309
389
  case "mapping":
310
- await c.restoreMappingRevision(d);
390
+ await c.restoreMappingRevision(b);
311
391
  return;
312
392
  case "entitySet":
313
- await s.restoreEntitySetRevision(d);
393
+ await s.restoreEntitySetRevision(b);
314
394
  return;
315
395
  }
396
+ }),
397
+ uploadSourceFile: (o, r) => A(async () => {
398
+ const a = await m.createSourceFileUpload({ fileName: o.name }), d = U(a.sourceFile);
399
+ return await u(a.uploadUrl, o, r), { id: d.id, fileName: d.fileName };
400
+ }),
401
+ startImport: (o) => el(
402
+ async () => Ze(
403
+ U(
404
+ (await m.startImport({
405
+ importProfileId: o.importProfileId,
406
+ sourceFileId: o.sourceFileId,
407
+ effectiveDate: o.effectiveDate ?? "",
408
+ source: o.source
409
+ })).import
410
+ )
411
+ )
412
+ ),
413
+ listImports: (o) => A(async () => {
414
+ const r = await m.listImports({ pageToken: o });
415
+ return { imports: r.imports.map(Ze), nextPageToken: r.nextPageToken };
416
+ }),
417
+ getImport: (o) => A(async () => Ze(U((await m.getImport({ id: o })).import))),
418
+ cancelImport: (o) => A(async () => Ze(U((await m.cancelImport({ id: o })).import))),
419
+ listItemProblems: (o, r) => A(async () => {
420
+ const a = await m.listItemProblems({
421
+ importId: o,
422
+ mappingId: r.mappingId,
423
+ sourceKeyQuery: r.sourceKeyQuery,
424
+ pageToken: r.pageToken
425
+ });
426
+ return {
427
+ itemProblems: a.itemProblems.map((d) => ({
428
+ id: d.id,
429
+ mappingId: d.mappingId,
430
+ mappingName: d.mappingName,
431
+ sourceKey: d.sourceKey,
432
+ field: d.field,
433
+ reason: d.reason
434
+ })),
435
+ totalCount: a.totalCount,
436
+ matchingCount: a.matchingCount,
437
+ mappings: a.mappings.map((d) => ({
438
+ mappingId: d.mappingId,
439
+ mappingName: d.mappingName,
440
+ count: d.count
441
+ })),
442
+ nextPageToken: a.nextPageToken
443
+ };
444
+ }),
445
+ listApiKeys: () => A(async () => (await p.listAPIKeys({})).apiKeys.map(Rt)),
446
+ createApiKey: (o) => A(async () => {
447
+ const r = await p.createAPIKey({
448
+ name: o.name,
449
+ // Unset for never, as CreateAPIKey reads it.
450
+ expireTime: o.expireTime ? _t(new Date(o.expireTime)) : void 0
451
+ });
452
+ return { apiKey: Rt(U(r.apiKey)), secret: r.secret };
453
+ }),
454
+ revokeApiKey: (o) => A(async () => {
455
+ await p.revokeAPIKey({ id: o });
316
456
  })
317
457
  };
318
458
  }
319
- function E(e) {
459
+ function U(e) {
320
460
  if (e === void 0)
321
- throw new ve("importhub answered without a message", me.Internal);
461
+ throw new Ce("importhub answered without a message", O.Internal);
322
462
  return e;
323
463
  }
324
- function Ml({ changeSetId: e }) {
325
- const { t } = S(X), i = Y().changeSetHref(e);
326
- return i ? /* @__PURE__ */ V($e, { href: i, target: "_blank", rel: "noopener noreferrer", children: [
327
- t("changeSet.open"),
328
- /* @__PURE__ */ l(Jt, { size: 14, "aria-hidden": !0 })
464
+ function nl({ changeSetId: e }) {
465
+ const { t: n } = R(I), l = K().changeSetHref(e);
466
+ return l ? /* @__PURE__ */ g($e, { href: l, target: "_blank", rel: "noopener noreferrer", children: [
467
+ n("changeSet.open"),
468
+ /* @__PURE__ */ t(mn, { size: 14, "aria-hidden": !0 })
329
469
  ] }) : null;
330
470
  }
331
- const cl = {
332
- imports: Ut,
333
- profiles: Nt,
334
- mappings: Yt,
335
- entitySets: Ct,
336
- processors: ft
471
+ const ll = {
472
+ imports: Vn,
473
+ profiles: gn,
474
+ mappings: bn,
475
+ entitySets: un,
476
+ processors: pn
337
477
  };
338
- function Tl({ client: e, section: t }) {
339
- const { t: i } = S(X), n = cl[t];
340
- return /* @__PURE__ */ l(q, { title: i(`section.${t}.title`), children: /* @__PURE__ */ l(K, { px: "8", py: "6", children: /* @__PURE__ */ l(
341
- kt,
478
+ function ei({ client: e, section: n }) {
479
+ const { t: l } = R(I), i = ll[n];
480
+ return /* @__PURE__ */ t(ee, { title: l(`section.${n}.title`), children: /* @__PURE__ */ t(H, { px: "8", py: "6", children: /* @__PURE__ */ t(
481
+ tt,
342
482
  {
343
- icon: /* @__PURE__ */ l(n, { size: 32, "aria-hidden": !0 }),
344
- header: i(`section.${t}.title`),
345
- description: /* @__PURE__ */ l(sl, { client: e, section: t })
483
+ icon: /* @__PURE__ */ t(i, { size: 32, "aria-hidden": !0 }),
484
+ header: l(`section.${n}.title`),
485
+ description: /* @__PURE__ */ t(il, { client: e, section: n })
346
486
  }
347
487
  ) }) });
348
488
  }
349
- function sl({ client: e, section: t }) {
350
- switch (t) {
489
+ function il({ client: e, section: n }) {
490
+ switch (n) {
351
491
  case "profiles":
352
- return /* @__PURE__ */ l(
353
- We,
492
+ return /* @__PURE__ */ t(
493
+ Me,
354
494
  {
355
- section: t,
356
- queryKey: g.importProfiles,
495
+ section: n,
496
+ queryKey: h.importProfiles,
357
497
  read: () => e.listImportProfiles()
358
498
  }
359
499
  );
360
500
  case "entitySets":
361
- return /* @__PURE__ */ l(
362
- We,
501
+ return /* @__PURE__ */ t(
502
+ Me,
363
503
  {
364
- section: t,
365
- queryKey: g.entitySets,
504
+ section: n,
505
+ queryKey: h.entitySets,
366
506
  read: () => e.listEntitySets()
367
507
  }
368
508
  );
369
509
  case "processors":
370
- return /* @__PURE__ */ l(
371
- We,
510
+ return /* @__PURE__ */ t(
511
+ Me,
372
512
  {
373
- section: t,
374
- queryKey: g.processors,
513
+ section: n,
514
+ queryKey: h.processors,
375
515
  read: () => e.listProcessors()
376
516
  }
377
517
  );
378
518
  default:
379
- return /* @__PURE__ */ l(rl, { section: t });
519
+ return /* @__PURE__ */ t(al, { section: n });
380
520
  }
381
521
  }
382
- function rl({ section: e }) {
383
- const { t } = S(X);
384
- return /* @__PURE__ */ l(z, { children: t(`section.${e}.empty`) });
522
+ function al({ section: e }) {
523
+ const { t: n } = R(I);
524
+ return /* @__PURE__ */ t(_, { children: n(`section.${e}.empty`) });
385
525
  }
386
- function We({
526
+ function Me({
387
527
  section: e,
388
- queryKey: t,
389
- read: i
528
+ queryKey: n,
529
+ read: l
390
530
  }) {
391
- const { t: n } = S(X), { workspaceId: c } = B(), s = W({ queryKey: t(c), queryFn: i });
392
- return s.isPending ? /* @__PURE__ */ l(It, { size: "sm", "aria-label": n("startPage.loading") }) : s.isError ? /* @__PURE__ */ l(z, { children: n("startPage.error") }) : /* @__PURE__ */ l(z, { children: n(`section.${e}.summary`, { count: s.data.length }) });
531
+ const { t: i } = R(I), { workspaceId: c } = W(), s = C({ queryKey: n(c), queryFn: l });
532
+ return s.isPending ? /* @__PURE__ */ t(an, { size: "sm", "aria-label": i("startPage.loading") }) : s.isError ? /* @__PURE__ */ t(_, { children: i("startPage.error") }) : /* @__PURE__ */ t(_, { children: i(`section.${e}.summary`, { count: s.data.length }) });
533
+ }
534
+ function Tt(e) {
535
+ return e.outcome ? e.outcome : e.cancelledBy ? "cancelling" : e.phase === "ended" ? "succeeded" : e.phase;
536
+ }
537
+ const Dt = {
538
+ queued: "neutral",
539
+ reading: "info",
540
+ writing: "info",
541
+ cancelling: "warning",
542
+ succeeded: "success",
543
+ succeeded_with_problems: "warning",
544
+ failed: "danger",
545
+ cancelled: "neutral"
546
+ };
547
+ function qe(e, n) {
548
+ switch (e) {
549
+ case "queued":
550
+ case "reading":
551
+ case "writing":
552
+ case "cancelling":
553
+ return n(`imports.phase.${e}`);
554
+ default:
555
+ return n(`imports.outcome.${e}`);
556
+ }
557
+ }
558
+ const Pt = 2e3, Ye = (e) => e.phase !== "ended";
559
+ function ol({ im: e }) {
560
+ const { t: n } = R(I), l = Tt(e);
561
+ return /* @__PURE__ */ t(Ue, { tone: Dt[l], label: qe(l, n) });
562
+ }
563
+ function rl({ im: e }) {
564
+ const { t: n } = R(I), l = Tt(e);
565
+ return /* @__PURE__ */ t(Bn, { value: qe(l, n), toneMap: { [qe(l, n)]: Dt[l] } });
566
+ }
567
+ function Ne() {
568
+ const { t: e } = R(I), { members: n } = W();
569
+ return Cn(
570
+ (l) => n.byId(l)?.displayName ?? e("imports.someone"),
571
+ [n, e]
572
+ );
573
+ }
574
+ function Fe() {
575
+ return K().canImport ?? !1;
576
+ }
577
+ const It = { name: "", expiresOn: "" };
578
+ function St() {
579
+ const e = /* @__PURE__ */ new Date(), n = (l) => String(l).padStart(2, "0");
580
+ return `${e.getFullYear()}-${n(e.getMonth() + 1)}-${n(e.getDate())}`;
581
+ }
582
+ function cl(e) {
583
+ return e ? (/* @__PURE__ */ new Date(`${e}T23:59:59`)).toISOString() : "";
584
+ }
585
+ function sl({ client: e, open: n, onClose: l }) {
586
+ const { t: i } = R(I), { workspaceId: c } = W(), s = P(), m = me({ defaultValues: It }), p = te({
587
+ mutationFn: (b) => e.createApiKey({ name: b.name.trim(), expireTime: cl(b.expiresOn) }),
588
+ onSuccess: () => s.invalidateQueries({ queryKey: h.apiKeys(c) })
589
+ }), { reset: u } = m, { reset: o } = p;
590
+ j(() => {
591
+ n && (u(It), o());
592
+ }, [n, u, o]);
593
+ const r = () => {
594
+ o(), l();
595
+ }, a = m.handleSubmit((b) => {
596
+ const V = b.name.trim();
597
+ if (!V) {
598
+ m.setError("name", { message: i("apiKeys.nameRequired") });
599
+ return;
600
+ }
601
+ if (V.length > ct) {
602
+ m.setError("name", { message: i("apiKeys.nameTooLong", { max: ct }) });
603
+ return;
604
+ }
605
+ if (b.expiresOn && b.expiresOn < St()) {
606
+ m.setError("expiresOn", { message: i("apiKeys.expiryPast") });
607
+ return;
608
+ }
609
+ p.mutate(b);
610
+ }), d = p.data?.secret;
611
+ return /* @__PURE__ */ t(
612
+ ye,
613
+ {
614
+ open: n,
615
+ onClose: r,
616
+ header: i("apiKeys.new"),
617
+ lazyMount: !0,
618
+ unmountOnExit: !0,
619
+ closeOnEscape: !d,
620
+ closeOnInteractOutside: !d,
621
+ footer: d ? /* @__PURE__ */ t(B, { variant: "solid", onClick: r, children: i("apiKeys.done") }) : /* @__PURE__ */ g(D, { gap: "2", children: [
622
+ /* @__PURE__ */ t(B, { variant: "outline", onClick: r, children: i("common.cancel") }),
623
+ /* @__PURE__ */ t(B, { variant: "solid", loading: p.isPending, onClick: () => {
624
+ a();
625
+ }, children: i("common.create") })
626
+ ] }),
627
+ children: d ? /* @__PURE__ */ g(X, { gap: "4", children: [
628
+ /* @__PURE__ */ t(f, { status: "warning", colorPalette: "warning", title: i("apiKeys.secretTitle"), children: i("apiKeys.secretOnce") }),
629
+ /* @__PURE__ */ t(
630
+ En,
631
+ {
632
+ value: d,
633
+ label: i("apiKeys.copySecret"),
634
+ inputProps: { "aria-label": i("apiKeys.secret"), fontFamily: "mono" }
635
+ }
636
+ )
637
+ ] }) : /* @__PURE__ */ t(pe, { ...m, children: /* @__PURE__ */ t(
638
+ "form",
639
+ {
640
+ onSubmit: (b) => {
641
+ b.preventDefault(), a();
642
+ },
643
+ children: /* @__PURE__ */ g(X, { gap: "4", children: [
644
+ /* @__PURE__ */ t(
645
+ T,
646
+ {
647
+ name: "name",
648
+ label: i("fields.name"),
649
+ helperText: i("apiKeys.nameHelp"),
650
+ required: !0
651
+ }
652
+ ),
653
+ /* @__PURE__ */ t(
654
+ Oe,
655
+ {
656
+ name: "expiresOn",
657
+ label: i("apiKeys.expiresOn"),
658
+ helperText: i("apiKeys.expiresOnHelp"),
659
+ min: St()
660
+ }
661
+ ),
662
+ /* @__PURE__ */ t(f, { status: "info", colorPalette: "info", title: i("apiKeys.consentTitle"), children: i("apiKeys.consent") }),
663
+ p.isError ? /* @__PURE__ */ t(f, { status: "error", colorPalette: "danger", title: i("apiKeys.createFailed") }) : null
664
+ ] })
665
+ }
666
+ ) })
667
+ }
668
+ );
669
+ }
670
+ function dl({ client: e, apiKey: n, open: l, onClose: i }) {
671
+ const { t: c } = R(I), { workspaceId: s } = W(), m = P(), p = te({
672
+ mutationFn: (r) => e.revokeApiKey(r),
673
+ onSuccess: async () => {
674
+ await m.invalidateQueries({ queryKey: h.apiKeys(s) }), i();
675
+ }
676
+ }), { reset: u } = p;
677
+ j(() => {
678
+ l && u();
679
+ }, [l, u]);
680
+ const o = n?.name ?? "";
681
+ return /* @__PURE__ */ t(
682
+ ye,
683
+ {
684
+ open: l,
685
+ onClose: i,
686
+ header: c("apiKeys.revokeTitle", { name: o }),
687
+ lazyMount: !0,
688
+ unmountOnExit: !0,
689
+ footer: /* @__PURE__ */ g(D, { gap: "2", children: [
690
+ /* @__PURE__ */ t(B, { variant: "outline", onClick: i, children: c("common.cancel") }),
691
+ /* @__PURE__ */ t(
692
+ B,
693
+ {
694
+ variant: "solid",
695
+ colorPalette: "red",
696
+ loading: p.isPending,
697
+ disabled: !n,
698
+ onClick: () => n && p.mutate(n.id),
699
+ children: c("apiKeys.revoke")
700
+ }
701
+ )
702
+ ] }),
703
+ children: /* @__PURE__ */ g(X, { gap: "4", children: [
704
+ /* @__PURE__ */ t(Q, { children: c("apiKeys.revokeMessage", { name: o }) }),
705
+ p.isError ? /* @__PURE__ */ t(f, { status: "error", colorPalette: "danger", title: c("apiKeys.revokeFailed") }) : null
706
+ ] })
707
+ }
708
+ );
393
709
  }
394
- const oe = (e) => ({
710
+ function ti({ client: e }) {
711
+ const { t: n } = R(I), { workspaceId: l } = W(), i = Fe(), c = Ne(), [s, m] = F(!1), [p, u] = F(null), [o, r] = F(!1), a = C({
712
+ queryKey: h.apiKeys(l),
713
+ queryFn: () => e.listApiKeys(),
714
+ enabled: i
715
+ }), d = k(
716
+ () => [
717
+ {
718
+ id: "name",
719
+ header: n("fields.name"),
720
+ cell: (b) => /* @__PURE__ */ t(w, { value: b.row.original.name })
721
+ },
722
+ {
723
+ // The secret's first characters, which tell keys apart where a
724
+ // pipeline's settings show the key; never the secret.
725
+ id: "prefix",
726
+ header: n("apiKeys.prefix"),
727
+ size: 120,
728
+ cell: (b) => /* @__PURE__ */ t(ve, { value: b.row.original.keyPrefix })
729
+ },
730
+ {
731
+ id: "owner",
732
+ header: n("apiKeys.owner"),
733
+ size: 160,
734
+ cell: (b) => /* @__PURE__ */ t(Wn, { name: c(b.row.original.owner) })
735
+ },
736
+ {
737
+ id: "created",
738
+ header: n("apiKeys.created"),
739
+ size: 130,
740
+ cell: (b) => /* @__PURE__ */ t(je, { value: b.row.original.createTime })
741
+ },
742
+ {
743
+ id: "expires",
744
+ header: n("apiKeys.expires"),
745
+ size: 130,
746
+ cell: (b) => b.row.original.expireTime ? /* @__PURE__ */ t(je, { value: b.row.original.expireTime }) : /* @__PURE__ */ t(w, { value: n("apiKeys.never") })
747
+ },
748
+ {
749
+ id: "actions",
750
+ header: "",
751
+ minSize: 60,
752
+ cell: (b) => /* @__PURE__ */ t(
753
+ fn,
754
+ {
755
+ actions: [
756
+ {
757
+ icon: be,
758
+ label: n("apiKeys.revokeKey", { name: b.row.original.name }),
759
+ colorPalette: "red",
760
+ onClick: () => {
761
+ u(b.row.original), r(!0);
762
+ }
763
+ }
764
+ ]
765
+ }
766
+ )
767
+ }
768
+ ],
769
+ [n, c]
770
+ );
771
+ return /* @__PURE__ */ g(
772
+ ee,
773
+ {
774
+ title: n("apiKeys.title"),
775
+ subtitle: n("apiKeys.subtitle"),
776
+ actions: i ? /* @__PURE__ */ g(B, { variant: "solid", onClick: () => m(!0), children: [
777
+ /* @__PURE__ */ t(se, { size: 16, "aria-hidden": !0 }),
778
+ n("apiKeys.new")
779
+ ] }) : void 0,
780
+ children: [
781
+ i ? a.isError ? /* @__PURE__ */ t(z, {}) : /* @__PURE__ */ t(
782
+ ne,
783
+ {
784
+ columns: d,
785
+ data: a.data ?? [],
786
+ loading: a.isPending,
787
+ getRowId: (b) => b.id,
788
+ emptyState: n("apiKeys.empty")
789
+ }
790
+ ) : /* @__PURE__ */ t(H, { px: "8", py: "6", children: /* @__PURE__ */ t(
791
+ tt,
792
+ {
793
+ icon: /* @__PURE__ */ t(yn, { size: 32, "aria-hidden": !0 }),
794
+ header: n("apiKeys.title"),
795
+ description: n("apiKeys.importersOnly")
796
+ }
797
+ ) }),
798
+ /* @__PURE__ */ t(sl, { client: e, open: s, onClose: () => m(!1) }),
799
+ /* @__PURE__ */ t(
800
+ dl,
801
+ {
802
+ client: e,
803
+ apiKey: p,
804
+ open: o,
805
+ onClose: () => r(!1)
806
+ }
807
+ )
808
+ ]
809
+ }
810
+ );
811
+ }
812
+ const Ee = (e) => ({
395
813
  name: e.name,
396
814
  description: e.description,
397
- entities: Object.entries(e.entities).sort(([t], [i]) => t.localeCompare(i)).map(([t, i]) => ({ name: t, text: i }))
398
- }), dl = (e) => ({
815
+ entities: Object.entries(e.entities).sort(([n], [l]) => n.localeCompare(l)).map(([n, l]) => ({ name: n, text: l }))
816
+ }), ml = (e) => ({
399
817
  name: e.name,
400
818
  description: e.description,
401
819
  entities: Object.fromEntries(
402
- e.entities.filter((t) => t.name.trim() !== "").map((t) => [t.name.trim(), t.text])
820
+ e.entities.filter((n) => n.name.trim() !== "").map((n) => [n.name.trim(), n.text])
403
821
  )
404
822
  });
405
- function Dl({ client: e, id: t, onDeleted: i }) {
406
- const { t: n } = S(X), { workspaceId: c } = B(), s = W({
407
- queryKey: g.entitySet(c, t),
408
- queryFn: () => e.getEntitySet(t)
823
+ function ni({ client: e, id: n, onDeleted: l }) {
824
+ const { t: i } = R(I), { workspaceId: c } = W(), s = C({
825
+ queryKey: h.entitySet(c, n),
826
+ queryFn: () => e.getEntitySet(n)
409
827
  });
410
- return s.isError || !s.data ? /* @__PURE__ */ l(D, { title: n("section.entitySets.title"), children: s.isError ? /* @__PURE__ */ l(L, {}) : /* @__PURE__ */ l(fe, {}) }) : /* @__PURE__ */ l(ml, { client: e, entitySet: s.data, onDeleted: i });
828
+ return s.isError || !s.data ? /* @__PURE__ */ t(L, { title: i("section.entitySets.title"), children: s.isError ? /* @__PURE__ */ t(z, {}) : /* @__PURE__ */ t(ge, {}) }) : /* @__PURE__ */ t(pl, { client: e, entitySet: s.data, onDeleted: l });
411
829
  }
412
- function ml({
830
+ function pl({
413
831
  client: e,
414
- entitySet: t,
415
- onDeleted: i
832
+ entitySet: n,
833
+ onDeleted: l
416
834
  }) {
417
- const { t: n } = S(X), { workspaceId: c } = B(), { paths: s } = Y(), a = O(), r = _(), [p, m] = H(!1), d = Re({ defaultValues: oe(t.content) }), { reset: o, formState: u, control: G } = d, b = Mt({ control: G, name: "entities" });
418
- $(() => {
419
- u.isDirty || o(oe(t.content));
420
- }, [t, o, u.isDirty]);
421
- const Z = Ne({
422
- mutationFn: (A) => e.updateEntitySet(t.id, dl(A), t.state.draftRevisionId),
423
- onSuccess: (A) => {
424
- r.setQueryData(g.entitySet(c, A.id), A), o(oe(A.content)), r.invalidateQueries({ queryKey: g.entitySets(c) });
835
+ const { t: i } = R(I), { workspaceId: c } = W(), { paths: s } = K(), m = Ve(), p = P(), [u, o] = F(!1), r = me({ defaultValues: Ee(n.content) }), { reset: a, formState: d, control: b } = r, V = Un({ control: b, name: "entities" });
836
+ j(() => {
837
+ d.isDirty || a(Ee(n.content));
838
+ }, [n, a, d.isDirty]);
839
+ const S = te({
840
+ mutationFn: (Z) => e.updateEntitySet(n.id, ml(Z), n.state.draftRevisionId),
841
+ onSuccess: (Z) => {
842
+ p.setQueryData(h.entitySet(c, Z.id), Z), a(Ee(Z.content)), p.invalidateQueries({ queryKey: h.entitySets(c) });
425
843
  }
426
- }), I = d.handleSubmit((A) => Z.mutate(A)), [U, Ze] = et(), T = tt({
844
+ }), y = r.handleSubmit((Z) => S.mutate(Z)), [M, G] = Wt(), v = ft({
427
845
  client: e,
428
846
  kind: "entitySet",
429
- id: t.id,
430
- validity: t.validity,
431
- state: t.state,
432
- unsaved: u.isDirty
847
+ id: n.id,
848
+ validity: n.validity,
849
+ state: n.state,
850
+ unsaved: d.isDirty
433
851
  });
434
- return ct(
435
- a ? /* @__PURE__ */ V(J, { storageKey: "importhub.entitySet.rail", children: [
436
- /* @__PURE__ */ l(J.Header, { title: n("rail.title") }),
437
- /* @__PURE__ */ V(J.Section, { id: "actions", label: n("rail.actions"), children: [
438
- T.railAction,
439
- /* @__PURE__ */ l(
440
- J.IconButton,
852
+ return nt(
853
+ m ? /* @__PURE__ */ g(x, { storageKey: "importhub.entitySet.rail", children: [
854
+ /* @__PURE__ */ t(x.Header, { title: i("rail.title") }),
855
+ /* @__PURE__ */ g(x.Section, { id: "actions", label: i("rail.actions"), children: [
856
+ v.railAction,
857
+ /* @__PURE__ */ t(
858
+ x.IconButton,
441
859
  {
442
- label: n("entitySets.delete"),
443
- icon: /* @__PURE__ */ l(pe, { size: 16 }),
860
+ label: i("entitySets.delete"),
861
+ icon: /* @__PURE__ */ t(be, { size: 16 }),
444
862
  tone: "outline-red",
445
- onClick: () => m(!0)
863
+ onClick: () => o(!0)
446
864
  }
447
865
  )
448
866
  ] })
449
867
  ] }) : null
450
- ), /* @__PURE__ */ V(
451
- D,
868
+ ), /* @__PURE__ */ g(
869
+ L,
452
870
  {
453
- title: t.content.name,
454
- breadcrumbs: [{ label: n("section.entitySets.title"), to: s.entitySets }],
455
- badges: /* @__PURE__ */ V(k, { gap: "2", children: [
456
- /* @__PURE__ */ l(
457
- Ye,
871
+ title: n.content.name,
872
+ breadcrumbs: [{ label: i("section.entitySets.title"), to: s.entitySets }],
873
+ badges: /* @__PURE__ */ g(D, { gap: "2", children: [
874
+ /* @__PURE__ */ t(
875
+ Ue,
458
876
  {
459
- tone: t.validity.valid ? "success" : "danger",
460
- label: t.validity.valid ? n("validity.valid") : n("validity.invalid")
877
+ tone: n.validity.valid ? "success" : "danger",
878
+ label: n.validity.valid ? i("validity.valid") : i("validity.invalid")
461
879
  }
462
880
  ),
463
- /* @__PURE__ */ l(at, { state: t.state })
881
+ /* @__PURE__ */ t(Ut, { state: n.state })
464
882
  ] }),
465
- tabs: Ze,
466
- actions: a ? /* @__PURE__ */ l(
467
- C,
883
+ tabs: G,
884
+ actions: m ? /* @__PURE__ */ t(
885
+ B,
468
886
  {
469
887
  variant: "solid",
470
- disabled: !u.isDirty,
471
- loading: Z.isPending,
888
+ disabled: !d.isDirty,
889
+ loading: S.isPending,
472
890
  onClick: () => {
473
- I();
891
+ y();
474
892
  },
475
- children: n("common.save")
893
+ children: i("common.save")
476
894
  }
477
895
  ) : void 0,
478
896
  children: [
479
- U === "history" ? /* @__PURE__ */ l(
480
- lt,
897
+ M === "history" ? /* @__PURE__ */ t(
898
+ vt,
481
899
  {
482
900
  client: e,
483
901
  kind: "entitySet",
484
- id: t.id,
485
- draftRevisionId: t.state.draftRevisionId,
902
+ id: n.id,
903
+ draftRevisionId: n.state.draftRevisionId,
486
904
  onRestored: async () => {
487
- const A = await e.getEntitySet(t.id);
488
- r.setQueryData(g.entitySet(c, A.id), A), o(oe(A.content));
905
+ const Z = await e.getEntitySet(n.id);
906
+ p.setQueryData(h.entitySet(c, Z.id), Z), a(Ee(Z.content));
489
907
  }
490
908
  }
491
- ) : /* @__PURE__ */ l(K, { px: "8", py: "6", children: /* @__PURE__ */ l(Ge, { ...d, children: /* @__PURE__ */ l(
909
+ ) : /* @__PURE__ */ t(H, { px: "8", py: "6", children: /* @__PURE__ */ t(pe, { ...r, children: /* @__PURE__ */ t(
492
910
  "form",
493
911
  {
494
- onSubmit: (A) => {
495
- A.preventDefault(), a && I();
912
+ onSubmit: (Z) => {
913
+ Z.preventDefault(), m && y();
496
914
  },
497
- children: /* @__PURE__ */ V(v, { gap: "4", children: [
498
- T.notice,
499
- /* @__PURE__ */ l(nt, { validity: t.validity }),
500
- Z.isError ? /* @__PURE__ */ l(Je, { status: "error", colorPalette: "danger", title: n("save.failed"), children: Z.error.message }) : null,
501
- /* @__PURE__ */ l(F, { title: n("entitySets.general"), children: /* @__PURE__ */ V(v, { gap: "4", children: [
502
- /* @__PURE__ */ l(
503
- N,
915
+ children: /* @__PURE__ */ g(X, { gap: "4", children: [
916
+ v.notice,
917
+ /* @__PURE__ */ t(Jt, { validity: n.validity }),
918
+ S.isError ? /* @__PURE__ */ t(f, { status: "error", colorPalette: "danger", title: i("save.failed"), children: S.error.message }) : null,
919
+ /* @__PURE__ */ t(N, { title: i("entitySets.general"), children: /* @__PURE__ */ g(X, { gap: "4", children: [
920
+ /* @__PURE__ */ t(
921
+ T,
504
922
  {
505
923
  name: "name",
506
- label: n("fields.name"),
924
+ label: i("fields.name"),
507
925
  required: !0,
508
- disabled: !a
926
+ disabled: !m
509
927
  }
510
928
  ),
511
- /* @__PURE__ */ l(
512
- we,
929
+ /* @__PURE__ */ t(
930
+ lt,
513
931
  {
514
932
  name: "description",
515
- label: n("fields.description"),
516
- disabled: !a
933
+ label: i("fields.description"),
934
+ disabled: !m
517
935
  }
518
936
  )
519
937
  ] }) }),
520
- /* @__PURE__ */ l(F, { title: n("entitySets.entities"), children: /* @__PURE__ */ V(v, { gap: "3", children: [
521
- b.fields.length === 0 ? /* @__PURE__ */ l(Q, { color: "fg.muted", children: n("entitySets.noEntities") }) : null,
522
- b.fields.map((A, h) => /* @__PURE__ */ V(Wt, { templateColumns: "1fr 1fr auto", gap: "3", alignItems: "end", children: [
523
- /* @__PURE__ */ l(
524
- N,
938
+ /* @__PURE__ */ t(N, { title: i("entitySets.entities"), children: /* @__PURE__ */ g(X, { gap: "3", children: [
939
+ V.fields.length === 0 ? /* @__PURE__ */ t(Q, { color: "fg.muted", children: i("entitySets.noEntities") }) : null,
940
+ V.fields.map((Z, J) => /* @__PURE__ */ g(Zt, { templateColumns: "1fr 1fr auto", gap: "3", alignItems: "end", children: [
941
+ /* @__PURE__ */ t(
942
+ T,
525
943
  {
526
- name: `entities.${h}.name`,
527
- label: n("entitySets.entityName", { index: h + 1 }),
944
+ name: `entities.${J}.name`,
945
+ label: i("entitySets.entityName", { index: J + 1 }),
528
946
  prepend: "&",
529
947
  append: ";",
530
- disabled: !a
948
+ disabled: !m
531
949
  }
532
950
  ),
533
- /* @__PURE__ */ l(
534
- N,
951
+ /* @__PURE__ */ t(
952
+ T,
535
953
  {
536
- name: `entities.${h}.text`,
537
- label: n("entitySets.entityText", { index: h + 1 }),
538
- disabled: !a
954
+ name: `entities.${J}.text`,
955
+ label: i("entitySets.entityText", { index: J + 1 }),
956
+ disabled: !m
539
957
  }
540
958
  ),
541
- a ? /* @__PURE__ */ l(
542
- re,
959
+ m ? /* @__PURE__ */ t(
960
+ We,
543
961
  {
544
- "aria-label": n("entitySets.removeEntity", { index: h + 1 }),
962
+ "aria-label": i("entitySets.removeEntity", { index: J + 1 }),
545
963
  variant: "ghost",
546
964
  colorPalette: "red",
547
- onClick: () => b.remove(h),
548
- children: /* @__PURE__ */ l(pe, { size: 16 })
965
+ onClick: () => V.remove(J),
966
+ children: /* @__PURE__ */ t(be, { size: 16 })
549
967
  }
550
- ) : /* @__PURE__ */ l("span", {})
551
- ] }, A.id)),
552
- a ? /* @__PURE__ */ l(K, { children: /* @__PURE__ */ V(
553
- C,
968
+ ) : /* @__PURE__ */ t("span", {})
969
+ ] }, Z.id)),
970
+ m ? /* @__PURE__ */ t(H, { children: /* @__PURE__ */ g(
971
+ B,
554
972
  {
555
973
  variant: "outline",
556
974
  size: "sm",
557
- onClick: () => b.append({ name: "", text: "" }),
975
+ onClick: () => V.append({ name: "", text: "" }),
558
976
  children: [
559
- /* @__PURE__ */ l(j, { size: 14, "aria-hidden": !0 }),
560
- n("entitySets.addEntity")
977
+ /* @__PURE__ */ t(se, { size: 14, "aria-hidden": !0 }),
978
+ i("entitySets.addEntity")
561
979
  ]
562
980
  }
563
981
  ) }) : null
@@ -565,19 +983,19 @@ function ml({
565
983
  ] })
566
984
  }
567
985
  ) }) }),
568
- T.dialog,
569
- /* @__PURE__ */ l(
570
- it,
986
+ v.dialog,
987
+ /* @__PURE__ */ t(
988
+ Ct,
571
989
  {
572
- open: p,
573
- onClose: () => m(!1),
574
- title: n("entitySets.deleteTitle", { name: t.content.name }),
575
- message: n("entitySets.deleteMessage"),
576
- onDelete: () => e.deleteEntitySet(t.id),
990
+ open: u,
991
+ onClose: () => o(!1),
992
+ title: i("entitySets.deleteTitle", { name: n.content.name }),
993
+ message: i("entitySets.deleteMessage"),
994
+ onDelete: () => e.deleteEntitySet(n.id),
577
995
  onDeleted: () => {
578
- m(!1), r.removeQueries({
579
- queryKey: g.entitySet(c, t.id)
580
- }), r.invalidateQueries({ queryKey: g.entitySets(c) }), i();
996
+ o(!1), p.removeQueries({
997
+ queryKey: h.entitySet(c, n.id)
998
+ }), p.invalidateQueries({ queryKey: h.entitySets(c) }), l();
581
999
  }
582
1000
  }
583
1001
  )
@@ -585,138 +1003,138 @@ function ml({
585
1003
  }
586
1004
  );
587
1005
  }
588
- function Qe({
1006
+ function rt({
589
1007
  open: e,
590
- onClose: t,
591
- title: i,
592
- children: n,
1008
+ onClose: n,
1009
+ title: l,
1010
+ children: i,
593
1011
  defaultValues: c,
594
1012
  onCreate: s,
595
- onCreated: a
1013
+ onCreated: m
596
1014
  }) {
597
- const { t: r } = S(X), p = Re({
1015
+ const { t: p } = R(I), u = me({
598
1016
  defaultValues: { name: "", description: "", ...c }
599
- }), m = Ne({ mutationFn: s, onSuccess: a }), { reset: d } = p, { reset: o } = m;
600
- $(() => {
601
- e && (d({ name: "", description: "", ...c }), o());
602
- }, [e, d, o, c]);
603
- const u = p.handleSubmit((G) => {
604
- if (!G.name.trim()) {
605
- p.setError("name", { message: r("create.nameRequired") });
1017
+ }), o = te({ mutationFn: s, onSuccess: m }), { reset: r } = u, { reset: a } = o;
1018
+ j(() => {
1019
+ e && (r({ name: "", description: "", ...c }), a());
1020
+ }, [e, r, a, c]);
1021
+ const d = u.handleSubmit((b) => {
1022
+ if (!b.name.trim()) {
1023
+ u.setError("name", { message: p("create.nameRequired") });
606
1024
  return;
607
1025
  }
608
- m.mutate(G, {
609
- onError: (b) => {
610
- b instanceof he && p.setError("name", { message: r("create.nameTaken") });
1026
+ o.mutate(b, {
1027
+ onError: (V) => {
1028
+ V instanceof Pe && u.setError("name", { message: p("create.nameTaken") });
611
1029
  }
612
1030
  });
613
1031
  });
614
- return /* @__PURE__ */ l(
615
- st,
1032
+ return /* @__PURE__ */ t(
1033
+ ye,
616
1034
  {
617
1035
  open: e,
618
- onClose: t,
619
- header: i,
1036
+ onClose: n,
1037
+ header: l,
620
1038
  lazyMount: !0,
621
1039
  unmountOnExit: !0,
622
- saveLabel: r("common.create"),
623
- cancelLabel: r("common.cancel"),
1040
+ saveLabel: p("common.create"),
1041
+ cancelLabel: p("common.cancel"),
624
1042
  onSave: () => {
625
- u();
1043
+ d();
626
1044
  },
627
- loading: m.isPending,
628
- children: /* @__PURE__ */ l(Ge, { ...p, children: /* @__PURE__ */ l(
1045
+ loading: o.isPending,
1046
+ children: /* @__PURE__ */ t(pe, { ...u, children: /* @__PURE__ */ t(
629
1047
  "form",
630
1048
  {
631
- onSubmit: (G) => {
632
- G.preventDefault(), u();
1049
+ onSubmit: (b) => {
1050
+ b.preventDefault(), d();
633
1051
  },
634
- children: /* @__PURE__ */ V(v, { gap: "4", children: [
635
- /* @__PURE__ */ l(N, { name: "name", label: r("fields.name"), required: !0 }),
636
- /* @__PURE__ */ l(we, { name: "description", label: r("fields.description") }),
637
- n,
638
- m.isError && !(m.error instanceof he) ? /* @__PURE__ */ l(Je, { status: "error", colorPalette: "danger", title: r("create.failed") }) : null
1052
+ children: /* @__PURE__ */ g(X, { gap: "4", children: [
1053
+ /* @__PURE__ */ t(T, { name: "name", label: p("fields.name"), required: !0 }),
1054
+ /* @__PURE__ */ t(lt, { name: "description", label: p("fields.description") }),
1055
+ i,
1056
+ o.isError && !(o.error instanceof Pe) ? /* @__PURE__ */ t(f, { status: "error", colorPalette: "danger", title: p("create.failed") }) : null
639
1057
  ] })
640
1058
  }
641
1059
  ) })
642
1060
  }
643
1061
  );
644
1062
  }
645
- function Pl({ client: e, onOpen: t }) {
646
- const { t: i } = S(X), { workspaceId: n } = B(), { paths: c } = Y(), s = O(), a = _(), [r, p] = H(!1), m = W({
647
- queryKey: g.entitySets(n),
1063
+ function li({ client: e, onOpen: n }) {
1064
+ const { t: l } = R(I), { workspaceId: i } = W(), { paths: c } = K(), s = Ve(), m = P(), [p, u] = F(!1), o = C({
1065
+ queryKey: h.entitySets(i),
648
1066
  queryFn: () => e.listEntitySets()
649
- }), d = M(
1067
+ }), r = k(
650
1068
  () => [
651
1069
  {
652
1070
  id: "name",
653
- header: i("fields.name"),
654
- cell: (o) => /* @__PURE__ */ l(
655
- Ue,
1071
+ header: l("fields.name"),
1072
+ cell: (a) => /* @__PURE__ */ t(
1073
+ we,
656
1074
  {
657
- to: Ve(c, "entitySets", o.row.original.id),
658
- label: o.row.original.content.name
1075
+ to: de(c, "entitySets", a.row.original.id),
1076
+ label: a.row.original.content.name
659
1077
  }
660
1078
  )
661
1079
  },
662
1080
  {
663
1081
  id: "entities",
664
- header: i("entitySets.entities"),
1082
+ header: l("entitySets.entities"),
665
1083
  size: 120,
666
- cell: (o) => /* @__PURE__ */ l(
667
- xt,
1084
+ cell: (a) => /* @__PURE__ */ t(
1085
+ vn,
668
1086
  {
669
- value: o.row.original.content.entities,
670
- singular: i("entitySets.entity"),
671
- plural: i("entitySets.entities")
1087
+ value: a.row.original.content.entities,
1088
+ singular: l("entitySets.entity"),
1089
+ plural: l("entitySets.entities")
672
1090
  }
673
1091
  )
674
1092
  },
675
1093
  {
676
1094
  id: "validity",
677
- header: i("validity.column"),
678
- cell: (o) => /* @__PURE__ */ l(Ce, { validity: o.row.original.validity })
1095
+ header: l("validity.column"),
1096
+ cell: (a) => /* @__PURE__ */ t(et, { validity: a.row.original.validity })
679
1097
  },
680
1098
  {
681
1099
  id: "release",
682
- header: i("release.column"),
1100
+ header: l("release.column"),
683
1101
  size: 140,
684
- cell: (o) => /* @__PURE__ */ l(f, { value: ot(o.row.original.state, i) })
1102
+ cell: (a) => /* @__PURE__ */ t(w, { value: wt(a.row.original.state, l) })
685
1103
  }
686
1104
  ],
687
- [i, c]
1105
+ [l, c]
688
1106
  );
689
- return /* @__PURE__ */ V(
690
- q,
1107
+ return /* @__PURE__ */ g(
1108
+ ee,
691
1109
  {
692
- title: i("section.entitySets.title"),
693
- actions: s ? /* @__PURE__ */ V(C, { variant: "solid", onClick: () => p(!0), children: [
694
- /* @__PURE__ */ l(j, { size: 16, "aria-hidden": !0 }),
695
- i("entitySets.new")
1110
+ title: l("section.entitySets.title"),
1111
+ actions: s ? /* @__PURE__ */ g(B, { variant: "solid", onClick: () => u(!0), children: [
1112
+ /* @__PURE__ */ t(se, { size: 16, "aria-hidden": !0 }),
1113
+ l("entitySets.new")
696
1114
  ] }) : void 0,
697
1115
  children: [
698
- m.isError ? /* @__PURE__ */ l(L, {}) : /* @__PURE__ */ l(
699
- ge,
1116
+ o.isError ? /* @__PURE__ */ t(z, {}) : /* @__PURE__ */ t(
1117
+ ne,
700
1118
  {
701
- columns: d,
702
- data: m.data ?? [],
703
- loading: m.isPending,
704
- getRowId: (o) => o.id,
705
- emptyState: i("entitySets.empty")
1119
+ columns: r,
1120
+ data: o.data ?? [],
1121
+ loading: o.isPending,
1122
+ getRowId: (a) => a.id,
1123
+ emptyState: l("entitySets.empty")
706
1124
  }
707
1125
  ),
708
- /* @__PURE__ */ l(
709
- Qe,
1126
+ /* @__PURE__ */ t(
1127
+ rt,
710
1128
  {
711
- open: r,
712
- onClose: () => p(!1),
713
- title: i("entitySets.new"),
714
- onCreate: async ({ name: o, description: u }) => {
715
- const G = await e.createEntitySet({ name: o, description: u, entities: {} });
716
- return await a.invalidateQueries({ queryKey: g.entitySets(n) }), G.id;
1129
+ open: p,
1130
+ onClose: () => u(!1),
1131
+ title: l("entitySets.new"),
1132
+ onCreate: async ({ name: a, description: d }) => {
1133
+ const b = await e.createEntitySet({ name: a, description: d, entities: {} });
1134
+ return await m.invalidateQueries({ queryKey: h.entitySets(i) }), b.id;
717
1135
  },
718
- onCreated: (o) => {
719
- p(!1), t(o);
1136
+ onCreated: (a) => {
1137
+ u(!1), n(a);
720
1138
  }
721
1139
  }
722
1140
  )
@@ -724,15 +1142,359 @@ function Pl({ client: e, onOpen: t }) {
724
1142
  }
725
1143
  );
726
1144
  }
727
- function jl({ client: e, id: t, onDeleted: i }) {
728
- return /* @__PURE__ */ l(Kt, { client: e, id: t, onDeleted: i });
1145
+ function ul({ client: e, im: n }) {
1146
+ const { t: l } = R(I), { workspaceId: i } = W(), [c, s] = F(""), [m, p] = F(""), u = Yt({
1147
+ queryKey: h.itemProblems(i, n.id, c, m),
1148
+ queryFn: ({ pageParam: y }) => e.listItemProblems(n.id, { mappingId: c, sourceKeyQuery: m, pageToken: y }),
1149
+ initialPageParam: "",
1150
+ getNextPageParam: (y) => y.nextPageToken || void 0,
1151
+ // Keeps the rows while a new filter's answer loads, rather than
1152
+ // flashing an empty table at every keystroke.
1153
+ placeholderData: (y) => y
1154
+ }), o = n.counts.problems, r = Ft(o), { refetch: a } = u;
1155
+ j(() => {
1156
+ o !== r.current && (r.current = o, a());
1157
+ }, [o, a]);
1158
+ const d = u.data?.pages[0], b = k(
1159
+ () => u.data?.pages.flatMap((y) => y.itemProblems) ?? [],
1160
+ [u.data]
1161
+ ), V = k(
1162
+ () => [
1163
+ {
1164
+ id: "sourceKey",
1165
+ header: l("imports.sourceKey"),
1166
+ size: 180,
1167
+ cell: (y) => /* @__PURE__ */ t(Nt, { value: y.row.original.sourceKey || l("imports.noSourceKey") })
1168
+ },
1169
+ {
1170
+ id: "mapping",
1171
+ header: l("imports.mapping"),
1172
+ size: 160,
1173
+ cell: (y) => /* @__PURE__ */ t(w, { value: y.row.original.mappingName })
1174
+ },
1175
+ {
1176
+ id: "field",
1177
+ header: l("imports.field"),
1178
+ size: 160,
1179
+ cell: (y) => y.row.original.field ? /* @__PURE__ */ t(ve, { value: y.row.original.field }) : /* @__PURE__ */ t(w, { value: l("imports.wholeVersion") })
1180
+ },
1181
+ {
1182
+ id: "reason",
1183
+ header: l("imports.reason"),
1184
+ minSize: 240,
1185
+ cell: (y) => /* @__PURE__ */ t(w, { value: y.row.original.reason })
1186
+ }
1187
+ ],
1188
+ [l]
1189
+ );
1190
+ if (u.isError) return /* @__PURE__ */ t(z, {});
1191
+ const S = d?.totalCount ?? 0;
1192
+ return /* @__PURE__ */ g(X, { gap: "3", children: [
1193
+ /* @__PURE__ */ g(xe, { children: [
1194
+ /* @__PURE__ */ t(
1195
+ Xn,
1196
+ {
1197
+ "aria-label": l("imports.searchSourceKey"),
1198
+ placeholder: l("imports.searchSourceKey"),
1199
+ onSearch: p,
1200
+ debounceMs: 200,
1201
+ maxWidth: "260px"
1202
+ }
1203
+ ),
1204
+ /* @__PURE__ */ g(
1205
+ on,
1206
+ {
1207
+ "aria-label": l("imports.filterMapping"),
1208
+ size: "sm",
1209
+ width: "auto",
1210
+ value: c,
1211
+ onChange: (y) => s(y.currentTarget.value),
1212
+ children: [
1213
+ /* @__PURE__ */ t("option", { value: "", children: l("imports.allMappings", { count: S }) }),
1214
+ (d?.mappings ?? []).map((y) => /* @__PURE__ */ t("option", { value: y.mappingId, children: l("imports.mappingCount", { name: y.mappingName, count: y.count }) }, y.mappingId))
1215
+ ]
1216
+ }
1217
+ ),
1218
+ /* @__PURE__ */ t(xe.Right, { children: /* @__PURE__ */ t(xe.Count, { children: l("imports.problemCount", { matching: d?.matchingCount ?? 0, total: S }) }) })
1219
+ ] }),
1220
+ /* @__PURE__ */ t(
1221
+ ne,
1222
+ {
1223
+ columns: V,
1224
+ data: b,
1225
+ loading: u.isPending,
1226
+ getRowId: (y) => y.id,
1227
+ emptyState: l(S === 0 ? "imports.noItemProblems" : "imports.noMatchingProblems")
1228
+ }
1229
+ ),
1230
+ u.hasNextPage ? /* @__PURE__ */ t(Et, { children: /* @__PURE__ */ t(
1231
+ B,
1232
+ {
1233
+ variant: "outline",
1234
+ loading: u.isFetchingNextPage,
1235
+ onClick: () => {
1236
+ u.fetchNextPage();
1237
+ },
1238
+ children: l("imports.loadMore")
1239
+ }
1240
+ ) }) : null
1241
+ ] });
1242
+ }
1243
+ function ii({
1244
+ client: e,
1245
+ id: n,
1246
+ pollIntervalMs: l = Pt
1247
+ }) {
1248
+ const { t: i } = R(I), { workspaceId: c } = W(), s = C({
1249
+ queryKey: h.import(c, n),
1250
+ queryFn: () => e.getImport(n),
1251
+ refetchInterval: (m) => m.state.data && Ye(m.state.data) ? l : !1
1252
+ });
1253
+ return s.isError || !s.data ? /* @__PURE__ */ t(L, { title: i("section.imports.title"), children: s.isError ? /* @__PURE__ */ t(z, {}) : /* @__PURE__ */ t(ge, {}) }) : /* @__PURE__ */ t(bl, { client: e, im: s.data });
1254
+ }
1255
+ function bl({ client: e, im: n }) {
1256
+ const { t: l, i18n: i } = R(I), c = i.language, { workspaceId: s } = W(), { paths: m } = K(), p = Fe(), u = Ne(), o = P(), [r, a] = F(!1), d = p && Ye(n) && !n.cancelledBy;
1257
+ nt(
1258
+ d ? /* @__PURE__ */ g(x, { storageKey: "importhub.import.rail", children: [
1259
+ /* @__PURE__ */ t(x.Header, { title: l("rail.title") }),
1260
+ /* @__PURE__ */ t(x.Section, { id: "actions", label: l("rail.actions"), children: /* @__PURE__ */ t(
1261
+ x.IconButton,
1262
+ {
1263
+ label: l("imports.cancel"),
1264
+ icon: /* @__PURE__ */ t(hn, { size: 16 }),
1265
+ tone: "outline-red",
1266
+ onClick: () => a(!0)
1267
+ }
1268
+ ) })
1269
+ ] }) : null
1270
+ );
1271
+ const b = te({
1272
+ mutationFn: () => e.cancelImport(n.id),
1273
+ onSuccess: (S) => {
1274
+ o.setQueryData(h.import(s, S.id), S), o.invalidateQueries({ queryKey: h.imports(s) }), a(!1);
1275
+ }
1276
+ }), { reset: V } = b;
1277
+ return j(() => {
1278
+ r && V();
1279
+ }, [r, V]), /* @__PURE__ */ g(
1280
+ L,
1281
+ {
1282
+ title: n.importProfileName,
1283
+ subtitle: l("imports.subtitle", {
1284
+ person: u(n.startedBy),
1285
+ time: Te(c, n.createTime)
1286
+ }),
1287
+ breadcrumbs: [{ label: l("section.imports.title"), to: m.imports }],
1288
+ badges: /* @__PURE__ */ t(ol, { im: n }),
1289
+ children: [
1290
+ /* @__PURE__ */ t(H, { px: "8", py: "6", children: /* @__PURE__ */ g(X, { gap: "6", children: [
1291
+ /* @__PURE__ */ t(gl, { im: n }),
1292
+ n.phase === "reading" || n.phase === "writing" ? /* @__PURE__ */ t(Vl, { im: n }) : null,
1293
+ /* @__PURE__ */ t(N, { title: l("imports.details"), children: /* @__PURE__ */ g(Y, { children: [
1294
+ /* @__PURE__ */ t(Y.Row, { label: l("imports.startedBy"), children: u(n.startedBy) }),
1295
+ /* @__PURE__ */ t(Y.Row, { label: l("imports.started"), children: Te(c, n.startTime || n.createTime) }),
1296
+ n.endTime ? /* @__PURE__ */ t(Y.Row, { label: l("imports.ended"), children: Te(c, n.endTime) }) : null,
1297
+ /* @__PURE__ */ t(Y.Row, { label: l("imports.effectiveDate"), children: n.effectiveDate || l("imports.none") }),
1298
+ /* @__PURE__ */ t(Y.Row, { label: l("imports.source"), children: n.source ? l("imports.sourceValue", {
1299
+ reference: n.source.reference,
1300
+ date: n.source.date
1301
+ }) : l("imports.none") }),
1302
+ n.changeSetId ? /* @__PURE__ */ t(Y.Row, { label: l("imports.changeSet"), children: /* @__PURE__ */ t(nl, { changeSetId: n.changeSetId }) }) : null
1303
+ ] }) }),
1304
+ /* @__PURE__ */ t(N, { title: l("imports.counts"), children: /* @__PURE__ */ t(Y, { children: [
1305
+ "matched",
1306
+ "created",
1307
+ "planned",
1308
+ "corrected",
1309
+ "kept",
1310
+ "unchanged",
1311
+ "problems"
1312
+ ].map((S) => /* @__PURE__ */ t(Y.Row, { label: l(`imports.${S}`), children: n.counts[S].toLocaleString() }, S)) }) }),
1313
+ /* @__PURE__ */ t(yl, { im: n }),
1314
+ /* @__PURE__ */ t(N, { title: l("imports.itemProblems"), children: /* @__PURE__ */ t(ul, { client: e, im: n }) })
1315
+ ] }) }),
1316
+ /* @__PURE__ */ t(
1317
+ ye,
1318
+ {
1319
+ open: r,
1320
+ onClose: () => a(!1),
1321
+ header: l("imports.cancelTitle"),
1322
+ lazyMount: !0,
1323
+ unmountOnExit: !0,
1324
+ footer: /* @__PURE__ */ g(D, { gap: "2", children: [
1325
+ /* @__PURE__ */ t(B, { variant: "outline", onClick: () => a(!1), children: l("imports.keepRunning") }),
1326
+ /* @__PURE__ */ t(
1327
+ B,
1328
+ {
1329
+ variant: "solid",
1330
+ colorPalette: "red",
1331
+ loading: b.isPending,
1332
+ onClick: () => b.mutate(),
1333
+ children: l("imports.cancelConfirm")
1334
+ }
1335
+ )
1336
+ ] }),
1337
+ children: /* @__PURE__ */ g(X, { gap: "4", children: [
1338
+ /* @__PURE__ */ t(Q, { children: l("imports.cancelMessage") }),
1339
+ b.isError ? /* @__PURE__ */ t(
1340
+ f,
1341
+ {
1342
+ status: "error",
1343
+ colorPalette: "danger",
1344
+ title: l("imports.cancelFailed", { message: b.error.message })
1345
+ }
1346
+ ) : null
1347
+ ] })
1348
+ }
1349
+ )
1350
+ ]
1351
+ }
1352
+ );
1353
+ }
1354
+ const Te = (e, n) => new Date(n).toLocaleString(e);
1355
+ function gl({ im: e }) {
1356
+ const { t: n } = R(I), l = Ne();
1357
+ return e.outcome === "failed" ? /* @__PURE__ */ t(f, { status: "error", colorPalette: "danger", title: n("imports.failedTitle"), children: e.failureReason }) : e.outcome === "cancelled" ? /* @__PURE__ */ t(f, { status: "info", colorPalette: "gray", children: n("imports.cancelledBody", { person: l(e.cancelledBy) }) }) : e.outcome === "succeeded_with_problems" ? /* @__PURE__ */ t(f, { status: "warning", colorPalette: "warning", children: n("imports.problemsBody", { count: e.counts.problems }) }) : Ye(e) && e.cancelledBy ? /* @__PURE__ */ t(f, { status: "warning", colorPalette: "warning", children: n("imports.cancellingBody", { person: l(e.cancelledBy) }) }) : e.phase === "queued" ? /* @__PURE__ */ t(f, { status: "info", colorPalette: "info", children: n("imports.queuedBody") }) : null;
1358
+ }
1359
+ function Vl({ im: e }) {
1360
+ const { t: n } = R(I), { done: l, total: i } = e.progress, c = i > 0;
1361
+ return /* @__PURE__ */ t(N, { title: n("imports.progressTitle"), children: /* @__PURE__ */ g(X, { gap: "2", children: [
1362
+ /* @__PURE__ */ t(
1363
+ Xt,
1364
+ {
1365
+ label: n(`imports.phaseLong.${e.phase}`),
1366
+ value: c ? Math.round(l / i * 100) : null,
1367
+ colorPalette: "info"
1368
+ }
1369
+ ),
1370
+ /* @__PURE__ */ t(Q, { color: "muted", fontSize: "sm", children: c ? n("imports.progressOf", { done: l, total: i }) : n("imports.progressUnknown") })
1371
+ ] }) });
1372
+ }
1373
+ function yl({ im: e }) {
1374
+ const { t: n } = R(I), { importProfile: l, mappings: i, entitySet: c } = e.releases;
1375
+ return /* @__PURE__ */ t(N, { title: n("imports.releases"), children: /* @__PURE__ */ g(Y, { children: [
1376
+ l ? /* @__PURE__ */ t(Y.Row, { label: n("imports.profile"), children: /* @__PURE__ */ t(De, { section: "profiles", release: l }) }) : null,
1377
+ /* @__PURE__ */ t(Y.Row, { label: n("imports.mappings"), children: /* @__PURE__ */ t(st.Root, { ps: "0", listStyleType: "none", children: i.map((s) => /* @__PURE__ */ t(st.Item, { children: /* @__PURE__ */ t(De, { section: "mappings", release: s }) }, s.releaseId)) }) }),
1378
+ /* @__PURE__ */ t(Y.Row, { label: n("imports.entitySet"), children: c ? /* @__PURE__ */ t(De, { section: "entitySets", release: c }) : n("imports.none") })
1379
+ ] }) });
1380
+ }
1381
+ function De({
1382
+ section: e,
1383
+ release: n
1384
+ }) {
1385
+ const { t: l } = R(I), { paths: i } = K();
1386
+ return /* @__PURE__ */ t($e, { asChild: !0, children: /* @__PURE__ */ t(xt, { to: de(i, e, n.configurationId), children: l("imports.releaseOf", { name: n.name, number: n.number }) }) });
1387
+ }
1388
+ function ai({
1389
+ client: e,
1390
+ onStart: n,
1391
+ pollIntervalMs: l = Pt
1392
+ }) {
1393
+ const { t: i } = R(I), { workspaceId: c } = W(), { paths: s } = K(), m = Fe(), p = Ne(), u = Yt({
1394
+ queryKey: h.imports(c),
1395
+ queryFn: ({ pageParam: a }) => e.listImports(a),
1396
+ initialPageParam: "",
1397
+ getNextPageParam: (a) => a.nextPageToken || void 0,
1398
+ refetchInterval: (a) => a.state.data?.pages.some((d) => d.imports.some(Ye)) ? l : !1
1399
+ }), o = k(
1400
+ () => u.data?.pages.flatMap((a) => a.imports) ?? [],
1401
+ [u.data]
1402
+ ), r = k(
1403
+ () => [
1404
+ {
1405
+ id: "profile",
1406
+ header: i("imports.profile"),
1407
+ cell: (a) => /* @__PURE__ */ t(
1408
+ we,
1409
+ {
1410
+ to: de(s, "imports", a.row.original.id),
1411
+ label: a.row.original.importProfileName
1412
+ }
1413
+ )
1414
+ },
1415
+ {
1416
+ id: "startedBy",
1417
+ header: i("imports.startedBy"),
1418
+ size: 160,
1419
+ cell: (a) => /* @__PURE__ */ t(w, { value: p(a.row.original.startedBy) })
1420
+ },
1421
+ {
1422
+ id: "started",
1423
+ header: i("imports.started"),
1424
+ size: 150,
1425
+ cell: (a) => /* @__PURE__ */ t(je, { value: a.row.original.createTime })
1426
+ },
1427
+ {
1428
+ // Its Outcome once it has one, its phase until then.
1429
+ id: "outcome",
1430
+ header: i("imports.outcomeColumn"),
1431
+ size: 190,
1432
+ cell: (a) => /* @__PURE__ */ t(rl, { im: a.row.original })
1433
+ },
1434
+ {
1435
+ id: "matched",
1436
+ header: i("imports.matched"),
1437
+ size: 90,
1438
+ cell: (a) => /* @__PURE__ */ t(Qe, { value: a.row.original.counts.matched })
1439
+ },
1440
+ {
1441
+ id: "created",
1442
+ header: i("imports.created"),
1443
+ size: 90,
1444
+ cell: (a) => /* @__PURE__ */ t(Qe, { value: a.row.original.counts.created })
1445
+ },
1446
+ {
1447
+ id: "problems",
1448
+ header: i("imports.problems"),
1449
+ size: 90,
1450
+ cell: (a) => /* @__PURE__ */ t(Qe, { value: a.row.original.counts.problems })
1451
+ }
1452
+ ],
1453
+ [i, s, p]
1454
+ );
1455
+ return /* @__PURE__ */ t(
1456
+ ee,
1457
+ {
1458
+ title: i("section.imports.title"),
1459
+ actions: m ? /* @__PURE__ */ g(B, { variant: "solid", onClick: n, children: [
1460
+ /* @__PURE__ */ t(Bt, { size: 16, "aria-hidden": !0 }),
1461
+ i("imports.start")
1462
+ ] }) : void 0,
1463
+ children: u.isError ? /* @__PURE__ */ t(z, {}) : /* @__PURE__ */ g(_, { children: [
1464
+ /* @__PURE__ */ t(
1465
+ ne,
1466
+ {
1467
+ columns: r,
1468
+ data: o,
1469
+ loading: u.isPending,
1470
+ getRowId: (a) => a.id,
1471
+ emptyState: i("imports.empty")
1472
+ }
1473
+ ),
1474
+ u.hasNextPage ? /* @__PURE__ */ t(Et, { py: "4", children: /* @__PURE__ */ t(
1475
+ B,
1476
+ {
1477
+ variant: "outline",
1478
+ loading: u.isFetchingNextPage,
1479
+ onClick: () => {
1480
+ u.fetchNextPage();
1481
+ },
1482
+ children: i("imports.loadMore")
1483
+ }
1484
+ ) }) : null
1485
+ ] })
1486
+ }
1487
+ );
1488
+ }
1489
+ function oi({ client: e, id: n, onDeleted: l }) {
1490
+ return /* @__PURE__ */ t(Gn, { client: e, id: n, onDeleted: l });
729
1491
  }
730
- function pl() {
731
- const { t: e } = S(X), { blueprints: t } = Y();
732
- return t ? /* @__PURE__ */ l(ul, {}) : /* @__PURE__ */ V(z, { children: [
733
- /* @__PURE__ */ l(N, { name: "blueprintId", label: e("mappings.blueprintId"), required: !0 }),
734
- /* @__PURE__ */ l(
735
- N,
1492
+ function hl() {
1493
+ const { t: e } = R(I), { blueprints: n } = K();
1494
+ return n ? /* @__PURE__ */ t(Rl, {}) : /* @__PURE__ */ g(_, { children: [
1495
+ /* @__PURE__ */ t(T, { name: "blueprintId", label: e("mappings.blueprintId"), required: !0 }),
1496
+ /* @__PURE__ */ t(
1497
+ T,
736
1498
  {
737
1499
  name: "blueprintReleaseId",
738
1500
  label: e("mappings.releaseId"),
@@ -742,217 +1504,217 @@ function pl() {
742
1504
  )
743
1505
  ] });
744
1506
  }
745
- function ul() {
746
- const { t: e } = S(X), { blueprints: t } = Y(), { workspaceId: i } = B(), { control: n, setValue: c } = rt(), s = ye({ control: n, name: "blueprintId" }), a = Ht(s);
747
- $(() => {
748
- a.current !== s && c("blueprintReleaseId", ""), a.current = s;
1507
+ function Rl() {
1508
+ const { t: e } = R(I), { blueprints: n } = K(), { workspaceId: l } = W(), { control: i, setValue: c } = Kt(), s = he({ control: i, name: "blueprintId" }), m = Ft(s);
1509
+ j(() => {
1510
+ m.current !== s && c("blueprintReleaseId", ""), m.current = s;
749
1511
  }, [s, c]);
750
- const r = W({
751
- queryKey: g.blueprints(i),
752
- queryFn: () => t?.listBlueprints() ?? Promise.resolve([])
753
- }), p = W({
754
- queryKey: g.blueprintReleases(i, s ?? ""),
755
- queryFn: () => t?.listReleases(s) ?? Promise.resolve([]),
1512
+ const p = C({
1513
+ queryKey: h.blueprints(l),
1514
+ queryFn: () => n?.listBlueprints() ?? Promise.resolve([])
1515
+ }), u = C({
1516
+ queryKey: h.blueprintReleases(l, s ?? ""),
1517
+ queryFn: () => n?.listReleases(s) ?? Promise.resolve([]),
756
1518
  enabled: !!s
757
1519
  });
758
- return /* @__PURE__ */ V(z, { children: [
759
- /* @__PURE__ */ l(
760
- Be,
1520
+ return /* @__PURE__ */ g(_, { children: [
1521
+ /* @__PURE__ */ t(
1522
+ Je,
761
1523
  {
762
1524
  name: "blueprintId",
763
1525
  label: e("mappings.blueprint"),
764
1526
  required: !0,
765
- options: (r.data ?? []).map((m) => ({ id: m.id, label: m.name }))
1527
+ options: (p.data ?? []).map((o) => ({ id: o.id, label: o.name }))
766
1528
  }
767
1529
  ),
768
- /* @__PURE__ */ l(
769
- Be,
1530
+ /* @__PURE__ */ t(
1531
+ Je,
770
1532
  {
771
1533
  name: "blueprintReleaseId",
772
1534
  label: e("mappings.release"),
773
1535
  required: !0,
774
1536
  disabled: !s,
775
- options: (p.data ?? []).map((m) => ({ id: m.id, label: m.label }))
1537
+ options: (u.data ?? []).map((o) => ({ id: o.id, label: o.label }))
776
1538
  }
777
1539
  )
778
1540
  ] });
779
1541
  }
780
- const bl = { blueprintId: "", blueprintReleaseId: "" };
781
- function Ol({ client: e, onOpen: t }) {
782
- const { t: i } = S(X), { workspaceId: n } = B(), { paths: c } = Y(), s = O(), a = _(), [r, p] = H(!1), m = W({
783
- queryKey: g.mappings(n),
1542
+ const Il = { blueprintId: "", blueprintReleaseId: "" };
1543
+ function ri({ client: e, onOpen: n }) {
1544
+ const { t: l } = R(I), { workspaceId: i } = W(), { paths: c } = K(), s = Ve(), m = P(), [p, u] = F(!1), o = C({
1545
+ queryKey: h.mappings(i),
784
1546
  queryFn: () => e.listMappings()
785
- }), d = Qt((m.data ?? []).map((u) => u.content.blueprintId)), o = M(
1547
+ }), r = Zn((o.data ?? []).map((d) => d.content.blueprintId)), a = k(
786
1548
  () => [
787
1549
  {
788
1550
  id: "name",
789
- header: i("fields.name"),
790
- cell: (u) => /* @__PURE__ */ l(
791
- Ue,
1551
+ header: l("fields.name"),
1552
+ cell: (d) => /* @__PURE__ */ t(
1553
+ we,
792
1554
  {
793
- to: Ve(c, "mappings", u.row.original.id),
794
- label: u.row.original.content.name
1555
+ to: de(c, "mappings", d.row.original.id),
1556
+ label: d.row.original.content.name
795
1557
  }
796
1558
  )
797
1559
  },
798
- d.available ? {
1560
+ r.available ? {
799
1561
  id: "blueprint",
800
- header: i("mappings.blueprint"),
801
- cell: (u) => /* @__PURE__ */ l(
802
- f,
1562
+ header: l("mappings.blueprint"),
1563
+ cell: (d) => /* @__PURE__ */ t(
1564
+ w,
803
1565
  {
804
- value: d.blueprintName(u.row.original.content.blueprintId) ?? ""
1566
+ value: r.blueprintName(d.row.original.content.blueprintId) ?? ""
805
1567
  }
806
1568
  )
807
1569
  } : {
808
1570
  id: "blueprint",
809
- header: i("mappings.blueprintId"),
810
- cell: (u) => /* @__PURE__ */ l(ke, { value: u.row.original.content.blueprintId })
1571
+ header: l("mappings.blueprintId"),
1572
+ cell: (d) => /* @__PURE__ */ t(ve, { value: d.row.original.content.blueprintId })
811
1573
  },
812
- d.available ? {
1574
+ r.available ? {
813
1575
  id: "release",
814
- header: i("mappings.release"),
815
- cell: (u) => /* @__PURE__ */ l(
816
- f,
1576
+ header: l("mappings.release"),
1577
+ cell: (d) => /* @__PURE__ */ t(
1578
+ w,
817
1579
  {
818
- value: d.releaseLabel(
819
- u.row.original.content.blueprintId,
820
- u.row.original.content.blueprintReleaseId
1580
+ value: r.releaseLabel(
1581
+ d.row.original.content.blueprintId,
1582
+ d.row.original.content.blueprintReleaseId
821
1583
  ) ?? ""
822
1584
  }
823
1585
  )
824
1586
  } : {
825
1587
  id: "release",
826
- header: i("mappings.releaseId"),
827
- cell: (u) => /* @__PURE__ */ l(ke, { value: u.row.original.content.blueprintReleaseId })
1588
+ header: l("mappings.releaseId"),
1589
+ cell: (d) => /* @__PURE__ */ t(ve, { value: d.row.original.content.blueprintReleaseId })
828
1590
  },
829
1591
  {
830
1592
  id: "validity",
831
- header: i("validity.column"),
832
- cell: (u) => /* @__PURE__ */ l(Ce, { validity: u.row.original.validity })
1593
+ header: l("validity.column"),
1594
+ cell: (d) => /* @__PURE__ */ t(et, { validity: d.row.original.validity })
833
1595
  }
834
1596
  ],
835
- [i, c, d]
1597
+ [l, c, r]
836
1598
  );
837
- return /* @__PURE__ */ V(
838
- q,
1599
+ return /* @__PURE__ */ g(
1600
+ ee,
839
1601
  {
840
- title: i("section.mappings.title"),
841
- actions: s ? /* @__PURE__ */ V(C, { variant: "solid", onClick: () => p(!0), children: [
842
- /* @__PURE__ */ l(j, { size: 16, "aria-hidden": !0 }),
843
- i("mappings.new")
1602
+ title: l("section.mappings.title"),
1603
+ actions: s ? /* @__PURE__ */ g(B, { variant: "solid", onClick: () => u(!0), children: [
1604
+ /* @__PURE__ */ t(se, { size: 16, "aria-hidden": !0 }),
1605
+ l("mappings.new")
844
1606
  ] }) : void 0,
845
1607
  children: [
846
- m.isError ? /* @__PURE__ */ l(L, {}) : /* @__PURE__ */ l(
847
- ge,
1608
+ o.isError ? /* @__PURE__ */ t(z, {}) : /* @__PURE__ */ t(
1609
+ ne,
848
1610
  {
849
- columns: o,
850
- data: m.data ?? [],
851
- loading: m.isPending,
852
- getRowId: (u) => u.id,
853
- emptyState: i("mappings.empty")
1611
+ columns: a,
1612
+ data: o.data ?? [],
1613
+ loading: o.isPending,
1614
+ getRowId: (d) => d.id,
1615
+ emptyState: l("mappings.empty")
854
1616
  }
855
1617
  ),
856
- /* @__PURE__ */ l(
857
- Qe,
1618
+ /* @__PURE__ */ t(
1619
+ rt,
858
1620
  {
859
- open: r,
860
- onClose: () => p(!1),
861
- title: i("mappings.new"),
862
- defaultValues: bl,
863
- onCreate: async ({ name: u, description: G, blueprintId: b, blueprintReleaseId: Z }) => {
864
- const I = await e.createMapping({
865
- name: u,
866
- description: G,
867
- blueprintId: b ?? "",
868
- blueprintReleaseId: Z ?? ""
1621
+ open: p,
1622
+ onClose: () => u(!1),
1623
+ title: l("mappings.new"),
1624
+ defaultValues: Il,
1625
+ onCreate: async ({ name: d, description: b, blueprintId: V, blueprintReleaseId: S }) => {
1626
+ const y = await e.createMapping({
1627
+ name: d,
1628
+ description: b,
1629
+ blueprintId: V ?? "",
1630
+ blueprintReleaseId: S ?? ""
869
1631
  });
870
- return await a.invalidateQueries({ queryKey: g.mappings(n) }), I.id;
1632
+ return await m.invalidateQueries({ queryKey: h.mappings(i) }), y.id;
871
1633
  },
872
- onCreated: (u) => {
873
- p(!1), t(u);
1634
+ onCreated: (d) => {
1635
+ u(!1), n(d);
874
1636
  },
875
- children: /* @__PURE__ */ l(pl, {})
1637
+ children: /* @__PURE__ */ t(hl, {})
876
1638
  }
877
1639
  )
878
1640
  ]
879
1641
  }
880
1642
  );
881
1643
  }
882
- function ql({ client: e }) {
883
- const { t } = S(X), { workspaceId: i } = B(), n = W({
884
- queryKey: g.processors(i),
1644
+ function ci({ client: e }) {
1645
+ const { t: n } = R(I), { workspaceId: l } = W(), i = C({
1646
+ queryKey: h.processors(l),
885
1647
  queryFn: () => e.listProcessors()
886
- }), c = M(
1648
+ }), c = k(
887
1649
  () => [
888
1650
  {
889
1651
  id: "name",
890
- header: t("fields.name"),
1652
+ header: n("fields.name"),
891
1653
  size: 180,
892
- cell: (s) => /* @__PURE__ */ l(Lt, { value: s.row.original.name })
1654
+ cell: (s) => /* @__PURE__ */ t(Nt, { value: s.row.original.name })
893
1655
  },
894
1656
  {
895
1657
  id: "kind",
896
- header: t("processors.kindColumn"),
1658
+ header: n("processors.kindColumn"),
897
1659
  size: 140,
898
- cell: (s) => /* @__PURE__ */ l(f, { value: t(`processors.kind.${s.row.original.kind}`) })
1660
+ cell: (s) => /* @__PURE__ */ t(w, { value: n(`processors.kind.${s.row.original.kind}`) })
899
1661
  },
900
1662
  {
901
1663
  id: "target",
902
- header: t("processors.targetColumn"),
1664
+ header: n("processors.targetColumn"),
903
1665
  size: 160,
904
- cell: (s) => /* @__PURE__ */ l(f, { value: t(`processors.target.${s.row.original.target}`) })
1666
+ cell: (s) => /* @__PURE__ */ t(w, { value: n(`processors.target.${s.row.original.target}`) })
905
1667
  },
906
1668
  {
907
1669
  id: "description",
908
- header: t("fields.description"),
909
- cell: (s) => /* @__PURE__ */ l(f, { value: s.row.original.description })
1670
+ header: n("fields.description"),
1671
+ cell: (s) => /* @__PURE__ */ t(w, { value: s.row.original.description })
910
1672
  },
911
1673
  {
912
1674
  id: "settings",
913
- header: t("processors.settingsColumn"),
914
- cell: (s) => /* @__PURE__ */ l(
915
- f,
1675
+ header: n("processors.settingsColumn"),
1676
+ cell: (s) => /* @__PURE__ */ t(
1677
+ w,
916
1678
  {
917
- value: s.row.original.settingsSpec.length === 0 ? t("processors.noSettings") : s.row.original.settingsSpec.map((a) => a.config.name || a.config.api_accessor).join(", ")
1679
+ value: s.row.original.settingsSpec.length === 0 ? n("processors.noSettings") : s.row.original.settingsSpec.map((m) => m.config.name || m.config.api_accessor).join(", ")
918
1680
  }
919
1681
  )
920
1682
  }
921
1683
  ],
922
- [t]
1684
+ [n]
923
1685
  );
924
- return /* @__PURE__ */ l(q, { title: t("section.processors.title"), children: n.isError ? /* @__PURE__ */ l(L, {}) : /* @__PURE__ */ l(
925
- ge,
1686
+ return /* @__PURE__ */ t(ee, { title: n("section.processors.title"), children: i.isError ? /* @__PURE__ */ t(z, {}) : /* @__PURE__ */ t(
1687
+ ne,
926
1688
  {
927
1689
  columns: c,
928
- data: n.data ?? [],
929
- loading: n.isPending,
1690
+ data: i.data ?? [],
1691
+ loading: i.isPending,
930
1692
  getRowId: (s) => s.name,
931
- emptyState: t("processors.empty")
1693
+ emptyState: n("processors.empty")
932
1694
  }
933
1695
  ) });
934
1696
  }
935
- function qe(e, t, i) {
936
- const n = [...e], [c] = n.splice(t, 1);
937
- return n.splice(i, 0, c), n;
1697
+ function At(e, n, l) {
1698
+ const i = [...e], [c] = i.splice(n, 1);
1699
+ return i.splice(l, 0, c), i;
938
1700
  }
939
- function Rt({
1701
+ function jt({
940
1702
  items: e,
941
- renderItem: t,
942
- nameOf: i,
943
- editable: n,
1703
+ renderItem: n,
1704
+ nameOf: l,
1705
+ editable: i,
944
1706
  onChange: c,
945
1707
  emptyLabel: s,
946
- addLabel: a,
947
- addOptions: r,
948
- onAdd: p
1708
+ addLabel: m,
1709
+ addOptions: p,
1710
+ onAdd: u
949
1711
  }) {
950
- const { t: m } = S(X);
951
- return /* @__PURE__ */ V(v, { gap: "2", children: [
952
- e.length === 0 ? /* @__PURE__ */ l(Q, { color: "fg.muted", children: s }) : /* @__PURE__ */ l(v, { as: "ol", gap: "0", listStyleType: "none", ms: "0", children: e.map((d, o) => {
953
- const u = i(d);
954
- return /* @__PURE__ */ V(
955
- k,
1712
+ const { t: o } = R(I);
1713
+ return /* @__PURE__ */ g(X, { gap: "2", children: [
1714
+ e.length === 0 ? /* @__PURE__ */ t(Q, { color: "fg.muted", children: s }) : /* @__PURE__ */ t(X, { as: "ol", gap: "0", listStyleType: "none", ms: "0", children: e.map((r, a) => {
1715
+ const d = l(r);
1716
+ return /* @__PURE__ */ g(
1717
+ D,
956
1718
  {
957
1719
  as: "li",
958
1720
  gap: "3",
@@ -961,310 +1723,310 @@ function Rt({
961
1723
  borderColor: "border",
962
1724
  align: "start",
963
1725
  children: [
964
- /* @__PURE__ */ V(Q, { color: "fg.muted", minW: "6", textAlign: "end", children: [
965
- o + 1,
1726
+ /* @__PURE__ */ g(Q, { color: "fg.muted", minW: "6", textAlign: "end", children: [
1727
+ a + 1,
966
1728
  "."
967
1729
  ] }),
968
- /* @__PURE__ */ l(K, { flex: "1", minW: "0", children: t(d, o) }),
969
- n ? /* @__PURE__ */ V(k, { gap: "1", children: [
970
- /* @__PURE__ */ l(
971
- re,
1730
+ /* @__PURE__ */ t(H, { flex: "1", minW: "0", children: n(r, a) }),
1731
+ i ? /* @__PURE__ */ g(D, { gap: "1", children: [
1732
+ /* @__PURE__ */ t(
1733
+ We,
972
1734
  {
973
- "aria-label": m("order.moveUp", { name: u }),
1735
+ "aria-label": o("order.moveUp", { name: d }),
974
1736
  size: "xs",
975
1737
  variant: "ghost",
976
- disabled: o === 0,
977
- onClick: () => c(qe(e, o, o - 1)),
978
- children: /* @__PURE__ */ l(wt, { size: 14 })
1738
+ disabled: a === 0,
1739
+ onClick: () => c(At(e, a, a - 1)),
1740
+ children: /* @__PURE__ */ t(Rn, { size: 14 })
979
1741
  }
980
1742
  ),
981
- /* @__PURE__ */ l(
982
- re,
1743
+ /* @__PURE__ */ t(
1744
+ We,
983
1745
  {
984
- "aria-label": m("order.moveDown", { name: u }),
1746
+ "aria-label": o("order.moveDown", { name: d }),
985
1747
  size: "xs",
986
1748
  variant: "ghost",
987
- disabled: o === e.length - 1,
988
- onClick: () => c(qe(e, o, o + 1)),
989
- children: /* @__PURE__ */ l(Ft, { size: 14 })
1749
+ disabled: a === e.length - 1,
1750
+ onClick: () => c(At(e, a, a + 1)),
1751
+ children: /* @__PURE__ */ t(In, { size: 14 })
990
1752
  }
991
1753
  ),
992
- /* @__PURE__ */ l(
993
- re,
1754
+ /* @__PURE__ */ t(
1755
+ We,
994
1756
  {
995
- "aria-label": m("order.remove", { name: u }),
1757
+ "aria-label": o("order.remove", { name: d }),
996
1758
  size: "xs",
997
1759
  variant: "ghost",
998
1760
  colorPalette: "red",
999
- onClick: () => c(e.filter((G, b) => b !== o)),
1000
- children: /* @__PURE__ */ l(pe, { size: 14 })
1761
+ onClick: () => c(e.filter((b, V) => V !== a)),
1762
+ children: /* @__PURE__ */ t(be, { size: 14 })
1001
1763
  }
1002
1764
  )
1003
1765
  ] }) : null
1004
1766
  ]
1005
1767
  },
1006
- o
1768
+ a
1007
1769
  );
1008
1770
  }) }),
1009
- n ? /* @__PURE__ */ l(K, { children: /* @__PURE__ */ V(ht, { onSelect: (d) => p(d.value), children: [
1010
- /* @__PURE__ */ l(Bt, { asChild: !0, children: /* @__PURE__ */ V(C, { variant: "outline", size: "sm", disabled: r.length === 0, children: [
1011
- /* @__PURE__ */ l(j, { size: 14, "aria-hidden": !0 }),
1012
- a
1771
+ i ? /* @__PURE__ */ t(H, { children: /* @__PURE__ */ g(rn, { onSelect: (r) => u(r.value), children: [
1772
+ /* @__PURE__ */ t(cn, { asChild: !0, children: /* @__PURE__ */ g(B, { variant: "outline", size: "sm", disabled: p.length === 0, children: [
1773
+ /* @__PURE__ */ t(se, { size: 14, "aria-hidden": !0 }),
1774
+ m
1013
1775
  ] }) }),
1014
- /* @__PURE__ */ l(Et, { children: r.map((d) => /* @__PURE__ */ l(vt, { value: d.value, children: d.label }, d.value)) })
1776
+ /* @__PURE__ */ t(sn, { children: p.map((r) => /* @__PURE__ */ t(dn, { value: r.value, children: r.label }, r.value)) })
1015
1777
  ] }) }) : null
1016
1778
  ] });
1017
1779
  }
1018
- const Vl = {};
1019
- function gl({
1780
+ const Sl = {};
1781
+ function Al({
1020
1782
  open: e,
1021
- onClose: t,
1022
- processor: i,
1023
- settings: n,
1783
+ onClose: n,
1784
+ processor: l,
1785
+ settings: i,
1024
1786
  readOnly: c,
1025
1787
  onApply: s
1026
1788
  }) {
1027
- const { t: a } = S(X), r = i?.settingsSpec ?? [], p = M(() => Dt(jt(r, He)), [r]), m = Re({ defaultValues: n, resolver: p }), { reset: d } = m;
1028
- $(() => {
1029
- e && d(n ?? Vl);
1030
- }, [e, n, d]);
1031
- const o = m.handleSubmit((u) => s(u));
1032
- return /* @__PURE__ */ l(
1033
- st,
1789
+ const { t: m } = R(I), p = l?.settingsSpec ?? [], u = k(() => wn(Nn(p, pt)), [p]), o = me({ defaultValues: i, resolver: u }), { reset: r } = o;
1790
+ j(() => {
1791
+ e && r(i ?? Sl);
1792
+ }, [e, i, r]);
1793
+ const a = o.handleSubmit((d) => s(d));
1794
+ return /* @__PURE__ */ t(
1795
+ ye,
1034
1796
  {
1035
1797
  open: e,
1036
- onClose: t,
1037
- header: a("processors.settingsOf", { name: i?.name ?? "" }),
1798
+ onClose: n,
1799
+ header: m("processors.settingsOf", { name: l?.name ?? "" }),
1038
1800
  lazyMount: !0,
1039
1801
  unmountOnExit: !0,
1040
- cancelLabel: a(c ? "common.close" : "common.cancel"),
1041
- saveLabel: a("common.apply"),
1802
+ cancelLabel: m(c ? "common.close" : "common.cancel"),
1803
+ saveLabel: m("common.apply"),
1042
1804
  onSave: c ? void 0 : () => {
1043
- o();
1805
+ a();
1044
1806
  },
1045
- children: /* @__PURE__ */ l(Ge, { ...m, children: /* @__PURE__ */ l(
1807
+ children: /* @__PURE__ */ t(pe, { ...o, children: /* @__PURE__ */ t(
1046
1808
  "form",
1047
1809
  {
1048
- onSubmit: (u) => {
1049
- u.preventDefault(), o();
1810
+ onSubmit: (d) => {
1811
+ d.preventDefault(), a();
1050
1812
  },
1051
- children: /* @__PURE__ */ l(Pt, { plugins: He, children: c ? /* @__PURE__ */ l(Le, { schema: r, mode: "read", values: n }) : /* @__PURE__ */ l(Le, { schema: r }) })
1813
+ children: /* @__PURE__ */ t(Yn, { plugins: pt, children: c ? /* @__PURE__ */ t(mt, { schema: p, mode: "read", values: i }) : /* @__PURE__ */ t(mt, { schema: p }) })
1052
1814
  }
1053
1815
  ) })
1054
1816
  }
1055
1817
  );
1056
1818
  }
1057
- const ce = (e) => ({
1819
+ const Xe = (e) => ({
1058
1820
  ...e,
1059
1821
  entitySetId: e.entitySetId || null
1060
- }), Rl = (e) => ({
1822
+ }), Gl = (e) => ({
1061
1823
  ...e,
1062
1824
  entitySetId: e.entitySetId ?? ""
1063
1825
  });
1064
- function _l({ client: e, id: t, onDeleted: i }) {
1065
- const { t: n } = S(X), { workspaceId: c } = B(), s = W({
1066
- queryKey: g.importProfile(c, t),
1067
- queryFn: () => e.getImportProfile(t)
1826
+ function si({ client: e, id: n, onDeleted: l }) {
1827
+ const { t: i } = R(I), { workspaceId: c } = W(), s = C({
1828
+ queryKey: h.importProfile(c, n),
1829
+ queryFn: () => e.getImportProfile(n)
1068
1830
  });
1069
- return s.isError ? /* @__PURE__ */ l(D, { title: n("section.profiles.title"), children: /* @__PURE__ */ l(L, {}) }) : s.data ? /* @__PURE__ */ l(Gl, { client: e, profile: s.data, onDeleted: i }) : /* @__PURE__ */ l(D, { title: n("section.profiles.title"), children: /* @__PURE__ */ l(fe, {}) });
1831
+ return s.isError ? /* @__PURE__ */ t(L, { title: i("section.profiles.title"), children: /* @__PURE__ */ t(z, {}) }) : s.data ? /* @__PURE__ */ t(Zl, { client: e, profile: s.data, onDeleted: l }) : /* @__PURE__ */ t(L, { title: i("section.profiles.title"), children: /* @__PURE__ */ t(ge, {}) });
1070
1832
  }
1071
- function Gl({
1833
+ function Zl({
1072
1834
  client: e,
1073
- profile: t,
1074
- onDeleted: i
1835
+ profile: n,
1836
+ onDeleted: l
1075
1837
  }) {
1076
- const { t: n } = S(X), { workspaceId: c } = B(), { paths: s } = Y(), a = O(), r = _(), [p, m] = H(!1), d = W({
1077
- queryKey: g.processors(c),
1838
+ const { t: i } = R(I), { workspaceId: c } = W(), { paths: s } = K(), m = Ve(), p = P(), [u, o] = F(!1), r = C({
1839
+ queryKey: h.processors(c),
1078
1840
  queryFn: () => e.listProcessors()
1079
- }), o = W({
1080
- queryKey: g.mappings(c),
1841
+ }), a = C({
1842
+ queryKey: h.mappings(c),
1081
1843
  queryFn: () => e.listMappings()
1082
- }), u = W({
1083
- queryKey: g.entitySets(c),
1844
+ }), d = C({
1845
+ queryKey: h.entitySets(c),
1084
1846
  queryFn: () => e.listEntitySets()
1085
- }), G = Re({ defaultValues: ce(t.content) }), { reset: b, formState: Z } = G;
1086
- $(() => {
1087
- Z.isDirty || b(ce(t.content));
1088
- }, [t, b, Z.isDirty]);
1089
- const I = Ne({
1090
- mutationFn: (R) => e.updateImportProfile(t.id, Rl(R), t.state.draftRevisionId),
1091
- onSuccess: (R) => {
1092
- r.setQueryData(g.importProfile(c, R.id), R), b(ce(R.content)), r.invalidateQueries({ queryKey: g.importProfiles(c) });
1847
+ }), b = me({ defaultValues: Xe(n.content) }), { reset: V, formState: S } = b;
1848
+ j(() => {
1849
+ S.isDirty || V(Xe(n.content));
1850
+ }, [n, V, S.isDirty]);
1851
+ const y = te({
1852
+ mutationFn: (E) => e.updateImportProfile(n.id, Gl(E), n.state.draftRevisionId),
1853
+ onSuccess: (E) => {
1854
+ p.setQueryData(h.importProfile(c, E.id), E), V(Xe(E.content)), p.invalidateQueries({ queryKey: h.importProfiles(c) });
1093
1855
  }
1094
- }), U = G.handleSubmit((R) => I.mutate(R)), Ze = ye({ control: G.control, name: "name" }), [T, A] = et(), h = tt({
1856
+ }), M = b.handleSubmit((E) => y.mutate(E)), G = he({ control: b.control, name: "name" }), [v, Z] = Wt(), J = ft({
1095
1857
  client: e,
1096
1858
  kind: "importProfile",
1097
- id: t.id,
1098
- validity: t.validity,
1099
- state: t.state,
1100
- unsaved: Z.isDirty
1859
+ id: n.id,
1860
+ validity: n.validity,
1861
+ state: n.state,
1862
+ unsaved: S.isDirty
1101
1863
  });
1102
- return ct(
1103
- a ? /* @__PURE__ */ V(J, { storageKey: "importhub.profile.rail", children: [
1104
- /* @__PURE__ */ l(J.Header, { title: n("rail.title") }),
1105
- /* @__PURE__ */ V(J.Section, { id: "actions", label: n("rail.actions"), children: [
1106
- h.railAction,
1107
- /* @__PURE__ */ l(
1108
- J.IconButton,
1864
+ return nt(
1865
+ m ? /* @__PURE__ */ g(x, { storageKey: "importhub.profile.rail", children: [
1866
+ /* @__PURE__ */ t(x.Header, { title: i("rail.title") }),
1867
+ /* @__PURE__ */ g(x.Section, { id: "actions", label: i("rail.actions"), children: [
1868
+ J.railAction,
1869
+ /* @__PURE__ */ t(
1870
+ x.IconButton,
1109
1871
  {
1110
- label: n("profiles.delete"),
1111
- icon: /* @__PURE__ */ l(pe, { size: 16 }),
1872
+ label: i("profiles.delete"),
1873
+ icon: /* @__PURE__ */ t(be, { size: 16 }),
1112
1874
  tone: "outline-red",
1113
- onClick: () => m(!0)
1875
+ onClick: () => o(!0)
1114
1876
  }
1115
1877
  )
1116
1878
  ] })
1117
1879
  ] }) : null
1118
- ), /* @__PURE__ */ V(
1119
- D,
1880
+ ), /* @__PURE__ */ g(
1881
+ L,
1120
1882
  {
1121
- title: t.content.name,
1122
- breadcrumbs: [{ label: n("section.profiles.title"), to: s.profiles }],
1123
- badges: /* @__PURE__ */ V(k, { gap: "2", children: [
1124
- /* @__PURE__ */ l(
1125
- Ye,
1883
+ title: n.content.name,
1884
+ breadcrumbs: [{ label: i("section.profiles.title"), to: s.profiles }],
1885
+ badges: /* @__PURE__ */ g(D, { gap: "2", children: [
1886
+ /* @__PURE__ */ t(
1887
+ Ue,
1126
1888
  {
1127
- tone: t.validity.valid ? "success" : "danger",
1128
- label: t.validity.valid ? n("validity.valid") : n("validity.invalid")
1889
+ tone: n.validity.valid ? "success" : "danger",
1890
+ label: n.validity.valid ? i("validity.valid") : i("validity.invalid")
1129
1891
  }
1130
1892
  ),
1131
- /* @__PURE__ */ l(at, { state: t.state })
1893
+ /* @__PURE__ */ t(Ut, { state: n.state })
1132
1894
  ] }),
1133
- tabs: A,
1134
- actions: a ? /* @__PURE__ */ l(
1135
- C,
1895
+ tabs: Z,
1896
+ actions: m ? /* @__PURE__ */ t(
1897
+ B,
1136
1898
  {
1137
1899
  variant: "solid",
1138
- disabled: !Z.isDirty,
1139
- loading: I.isPending,
1900
+ disabled: !S.isDirty,
1901
+ loading: y.isPending,
1140
1902
  onClick: () => {
1141
- U();
1903
+ M();
1142
1904
  },
1143
- children: n("common.save")
1905
+ children: i("common.save")
1144
1906
  }
1145
1907
  ) : void 0,
1146
1908
  children: [
1147
- T === "history" ? /* @__PURE__ */ l(
1148
- lt,
1909
+ v === "history" ? /* @__PURE__ */ t(
1910
+ vt,
1149
1911
  {
1150
1912
  client: e,
1151
1913
  kind: "importProfile",
1152
- id: t.id,
1153
- draftRevisionId: t.state.draftRevisionId,
1914
+ id: n.id,
1915
+ draftRevisionId: n.state.draftRevisionId,
1154
1916
  onRestored: async () => {
1155
- const R = await e.getImportProfile(t.id);
1156
- r.setQueryData(g.importProfile(c, R.id), R), b(ce(R.content));
1917
+ const E = await e.getImportProfile(n.id);
1918
+ p.setQueryData(h.importProfile(c, E.id), E), V(Xe(E.content));
1157
1919
  }
1158
1920
  }
1159
- ) : /* @__PURE__ */ l(K, { px: "8", py: "6", children: d.isPending || o.isPending || u.isPending ? /* @__PURE__ */ l(fe, {}) : /* @__PURE__ */ l(Ge, { ...G, children: /* @__PURE__ */ l(
1921
+ ) : /* @__PURE__ */ t(H, { px: "8", py: "6", children: r.isPending || a.isPending || d.isPending ? /* @__PURE__ */ t(ge, {}) : /* @__PURE__ */ t(pe, { ...b, children: /* @__PURE__ */ t(
1160
1922
  "form",
1161
1923
  {
1162
- onSubmit: (R) => {
1163
- R.preventDefault(), a && U();
1924
+ onSubmit: (E) => {
1925
+ E.preventDefault(), m && M();
1164
1926
  },
1165
- children: /* @__PURE__ */ V(v, { gap: "4", children: [
1166
- h.notice,
1167
- /* @__PURE__ */ l(nt, { validity: t.validity }),
1168
- I.isError ? /* @__PURE__ */ l(Je, { status: "error", colorPalette: "danger", title: n("save.failed"), children: I.error.message }) : null,
1169
- /* @__PURE__ */ l(F, { title: n("profiles.general"), children: /* @__PURE__ */ V(v, { gap: "4", children: [
1170
- /* @__PURE__ */ l(
1171
- N,
1927
+ children: /* @__PURE__ */ g(X, { gap: "4", children: [
1928
+ J.notice,
1929
+ /* @__PURE__ */ t(Jt, { validity: n.validity }),
1930
+ y.isError ? /* @__PURE__ */ t(f, { status: "error", colorPalette: "danger", title: i("save.failed"), children: y.error.message }) : null,
1931
+ /* @__PURE__ */ t(N, { title: i("profiles.general"), children: /* @__PURE__ */ g(X, { gap: "4", children: [
1932
+ /* @__PURE__ */ t(
1933
+ T,
1172
1934
  {
1173
1935
  name: "name",
1174
- label: n("fields.name"),
1936
+ label: i("fields.name"),
1175
1937
  required: !0,
1176
- disabled: !a
1938
+ disabled: !m
1177
1939
  }
1178
1940
  ),
1179
- /* @__PURE__ */ l(
1180
- we,
1941
+ /* @__PURE__ */ t(
1942
+ lt,
1181
1943
  {
1182
1944
  name: "description",
1183
- label: n("fields.description"),
1184
- disabled: !a
1945
+ label: i("fields.description"),
1946
+ disabled: !m
1185
1947
  }
1186
1948
  ),
1187
- /* @__PURE__ */ l(
1188
- Be,
1949
+ /* @__PURE__ */ t(
1950
+ Je,
1189
1951
  {
1190
1952
  name: "entitySetId",
1191
- label: n("profiles.entitySet"),
1192
- helperText: n("profiles.entitySetHelp"),
1193
- placeholder: n("profiles.noEntitySet"),
1194
- options: (u.data ?? []).map((R) => ({
1195
- id: R.id,
1196
- label: R.content.name
1953
+ label: i("profiles.entitySet"),
1954
+ helperText: i("profiles.entitySetHelp"),
1955
+ placeholder: i("profiles.noEntitySet"),
1956
+ options: (d.data ?? []).map((E) => ({
1957
+ id: E.id,
1958
+ label: E.content.name
1197
1959
  })),
1198
- disabled: !a
1960
+ disabled: !m
1199
1961
  }
1200
1962
  ),
1201
- /* @__PURE__ */ l(
1202
- xe,
1963
+ /* @__PURE__ */ t(
1964
+ dt,
1203
1965
  {
1204
1966
  name: "autoPublish",
1205
- label: n("profiles.autoPublish"),
1206
- helperText: n("profiles.autoPublishHelp"),
1207
- disabled: !a
1967
+ label: i("profiles.autoPublish"),
1968
+ helperText: i("profiles.autoPublishHelp"),
1969
+ disabled: !m
1208
1970
  }
1209
1971
  ),
1210
- /* @__PURE__ */ l(
1211
- xe,
1972
+ /* @__PURE__ */ t(
1973
+ dt,
1212
1974
  {
1213
1975
  name: "deleteSourceFileOnSuccess",
1214
- label: n("profiles.deleteOnSuccess"),
1215
- helperText: n("profiles.deleteOnSuccessHelp"),
1216
- disabled: !a
1976
+ label: i("profiles.deleteOnSuccess"),
1977
+ helperText: i("profiles.deleteOnSuccessHelp"),
1978
+ disabled: !m
1217
1979
  }
1218
1980
  )
1219
1981
  ] }) }),
1220
- /* @__PURE__ */ l(F, { title: n("profiles.preprocessors"), children: /* @__PURE__ */ l(
1221
- _e,
1982
+ /* @__PURE__ */ t(N, { title: i("profiles.preprocessors"), children: /* @__PURE__ */ t(
1983
+ Gt,
1222
1984
  {
1223
1985
  name: "preprocessors",
1224
1986
  kind: "preprocessor",
1225
- catalogue: d.data ?? [],
1226
- editable: a
1987
+ catalogue: r.data ?? [],
1988
+ editable: m
1227
1989
  }
1228
1990
  ) }),
1229
- /* @__PURE__ */ l(F, { title: n("profiles.mappings"), children: /* @__PURE__ */ l(
1230
- Zl,
1991
+ /* @__PURE__ */ t(N, { title: i("profiles.mappings"), children: /* @__PURE__ */ t(
1992
+ Xl,
1231
1993
  {
1232
- mappings: (o.data ?? []).map((R) => ({
1233
- id: R.id,
1234
- name: R.content.name,
1235
- valid: R.validity.valid
1994
+ mappings: (a.data ?? []).map((E) => ({
1995
+ id: E.id,
1996
+ name: E.content.name,
1997
+ valid: E.validity.valid
1236
1998
  })),
1237
- editable: a,
1238
- hrefOf: (R) => Ve(s, "mappings", R)
1999
+ editable: m,
2000
+ hrefOf: (E) => de(s, "mappings", E)
1239
2001
  }
1240
2002
  ) }),
1241
- /* @__PURE__ */ l(F, { title: n("profiles.postProcessors"), children: /* @__PURE__ */ l(
1242
- _e,
2003
+ /* @__PURE__ */ t(N, { title: i("profiles.postProcessors"), children: /* @__PURE__ */ t(
2004
+ Gt,
1243
2005
  {
1244
2006
  name: "postProcessors",
1245
2007
  kind: "post_processor",
1246
- catalogue: d.data ?? [],
1247
- editable: a
2008
+ catalogue: r.data ?? [],
2009
+ editable: m
1248
2010
  }
1249
2011
  ) })
1250
2012
  ] })
1251
2013
  }
1252
2014
  ) }) }),
1253
- h.dialog,
1254
- /* @__PURE__ */ l(
1255
- it,
2015
+ J.dialog,
2016
+ /* @__PURE__ */ t(
2017
+ Ct,
1256
2018
  {
1257
- open: p,
1258
- onClose: () => m(!1),
1259
- title: n("profiles.deleteTitle", { name: Ze || t.content.name }),
1260
- message: n("profiles.deleteMessage"),
1261
- onDelete: () => e.deleteImportProfile(t.id),
2019
+ open: u,
2020
+ onClose: () => o(!1),
2021
+ title: i("profiles.deleteTitle", { name: G || n.content.name }),
2022
+ message: i("profiles.deleteMessage"),
2023
+ onDelete: () => e.deleteImportProfile(n.id),
1262
2024
  onDeleted: () => {
1263
- m(!1), r.removeQueries({
1264
- queryKey: g.importProfile(c, t.id)
1265
- }), r.invalidateQueries({
1266
- queryKey: g.importProfiles(c)
1267
- }), i();
2025
+ o(!1), p.removeQueries({
2026
+ queryKey: h.importProfile(c, n.id)
2027
+ }), p.invalidateQueries({
2028
+ queryKey: h.importProfiles(c)
2029
+ }), l();
1268
2030
  }
1269
2031
  }
1270
2032
  )
@@ -1272,50 +2034,50 @@ function Gl({
1272
2034
  }
1273
2035
  );
1274
2036
  }
1275
- function _e({
2037
+ function Gt({
1276
2038
  name: e,
1277
- kind: t,
1278
- catalogue: i,
1279
- editable: n
2039
+ kind: n,
2040
+ catalogue: l,
2041
+ editable: i
1280
2042
  }) {
1281
- const { t: c } = S(X), { control: s, setValue: a } = Gt(), r = ye({ control: s, name: e }) ?? [], [p, m] = H(null), d = (b) => a(e, b, { shouldDirty: !0 }), o = (b) => i.find((Z) => Z.name === b.processor), u = p === null ? void 0 : r[p], G = i.filter((b) => b.kind === t && b.target === "source_file");
1282
- return /* @__PURE__ */ V(z, { children: [
1283
- /* @__PURE__ */ l(
1284
- Rt,
2043
+ const { t: c } = R(I), { control: s, setValue: m } = Ot(), p = he({ control: s, name: e }) ?? [], [u, o] = F(null), r = (V) => m(e, V, { shouldDirty: !0 }), a = (V) => l.find((S) => S.name === V.processor), d = u === null ? void 0 : p[u], b = l.filter((V) => V.kind === n && V.target === "source_file");
2044
+ return /* @__PURE__ */ g(_, { children: [
2045
+ /* @__PURE__ */ t(
2046
+ jt,
1285
2047
  {
1286
- items: r,
1287
- nameOf: (b) => b.processor,
1288
- editable: n,
1289
- onChange: d,
2048
+ items: p,
2049
+ nameOf: (V) => V.processor,
2050
+ editable: i,
2051
+ onChange: r,
1290
2052
  emptyLabel: c(
1291
- t === "preprocessor" ? "profiles.noPreprocessors" : "profiles.noPostProcessors"
2053
+ n === "preprocessor" ? "profiles.noPreprocessors" : "profiles.noPostProcessors"
1292
2054
  ),
1293
2055
  addLabel: c(
1294
- t === "preprocessor" ? "profiles.addPreprocessor" : "profiles.addPostProcessor"
2056
+ n === "preprocessor" ? "profiles.addPreprocessor" : "profiles.addPostProcessor"
1295
2057
  ),
1296
- addOptions: G.map((b) => ({ value: b.name, label: b.name })),
1297
- onAdd: (b) => {
1298
- d([...r, { processor: b, settings: {} }]), (G.find((Z) => Z.name === b)?.settingsSpec.length ?? 0) > 0 && m(r.length);
2058
+ addOptions: b.map((V) => ({ value: V.name, label: V.name })),
2059
+ onAdd: (V) => {
2060
+ r([...p, { processor: V, settings: {} }]), (b.find((S) => S.name === V)?.settingsSpec.length ?? 0) > 0 && o(p.length);
1299
2061
  },
1300
- renderItem: (b, Z) => {
1301
- const I = o(b), U = Object.keys(b.settings).length;
1302
- return /* @__PURE__ */ V(k, { justify: "space-between", gap: "3", children: [
1303
- /* @__PURE__ */ V(v, { gap: "0", minW: "0", children: [
1304
- /* @__PURE__ */ l(Q, { fontFamily: "mono", fontSize: "sm", children: b.processor }),
1305
- /* @__PURE__ */ l(Q, { color: "fg.muted", fontSize: "sm", children: I ? I.description : c("processors.unknown") })
2062
+ renderItem: (V, S) => {
2063
+ const y = a(V), M = Object.keys(V.settings).length;
2064
+ return /* @__PURE__ */ g(D, { justify: "space-between", gap: "3", children: [
2065
+ /* @__PURE__ */ g(X, { gap: "0", minW: "0", children: [
2066
+ /* @__PURE__ */ t(Q, { fontFamily: "mono", fontSize: "sm", children: V.processor }),
2067
+ /* @__PURE__ */ t(Q, { color: "fg.muted", fontSize: "sm", children: y ? y.description : c("processors.unknown") })
1306
2068
  ] }),
1307
- I && I.settingsSpec.length > 0 ? /* @__PURE__ */ V(
1308
- C,
2069
+ y && y.settingsSpec.length > 0 ? /* @__PURE__ */ g(
2070
+ B,
1309
2071
  {
1310
2072
  size: "xs",
1311
2073
  variant: "outline",
1312
- onClick: () => m(Z),
1313
- "aria-label": c(n ? "processors.configure" : "processors.viewSettings", {
1314
- name: b.processor
2074
+ onClick: () => o(S),
2075
+ "aria-label": c(i ? "processors.configure" : "processors.viewSettings", {
2076
+ name: V.processor
1315
2077
  }),
1316
2078
  children: [
1317
- /* @__PURE__ */ l(zt, { size: 14, "aria-hidden": !0 }),
1318
- c("processors.settingsCount", { count: U })
2079
+ /* @__PURE__ */ t(Sn, { size: 14, "aria-hidden": !0 }),
2080
+ c("processors.settingsCount", { count: M })
1319
2081
  ]
1320
2082
  }
1321
2083
  ) : null
@@ -1323,110 +2085,110 @@ function _e({
1323
2085
  }
1324
2086
  }
1325
2087
  ),
1326
- /* @__PURE__ */ l(
1327
- gl,
2088
+ /* @__PURE__ */ t(
2089
+ Al,
1328
2090
  {
1329
- open: u !== void 0,
1330
- onClose: () => m(null),
1331
- processor: u ? o(u) ?? null : null,
1332
- settings: u?.settings ?? yl,
1333
- readOnly: !n,
1334
- onApply: (b) => {
1335
- p !== null && (d(r.map((Z, I) => I === p ? { ...Z, settings: b } : Z)), m(null));
2091
+ open: d !== void 0,
2092
+ onClose: () => o(null),
2093
+ processor: d ? a(d) ?? null : null,
2094
+ settings: d?.settings ?? El,
2095
+ readOnly: !i,
2096
+ onApply: (V) => {
2097
+ u !== null && (r(p.map((S, y) => y === u ? { ...S, settings: V } : S)), o(null));
1336
2098
  }
1337
2099
  }
1338
2100
  )
1339
2101
  ] });
1340
2102
  }
1341
- const yl = {};
1342
- function Zl({
2103
+ const El = {};
2104
+ function Xl({
1343
2105
  mappings: e,
1344
- editable: t,
1345
- hrefOf: i
2106
+ editable: n,
2107
+ hrefOf: l
1346
2108
  }) {
1347
- const { t: n } = S(X), { control: c, setValue: s } = Gt(), a = ye({ control: c, name: "mappingIds" }) ?? [], r = M(() => new Map(e.map((d) => [d.id, d])), [e]), p = (d) => s("mappingIds", d, { shouldDirty: !0 });
1348
- return /* @__PURE__ */ l(
1349
- Rt,
2109
+ const { t: i } = R(I), { control: c, setValue: s } = Ot(), m = he({ control: c, name: "mappingIds" }) ?? [], p = k(() => new Map(e.map((r) => [r.id, r])), [e]), u = (r) => s("mappingIds", r, { shouldDirty: !0 });
2110
+ return /* @__PURE__ */ t(
2111
+ jt,
1350
2112
  {
1351
- items: a,
1352
- nameOf: (d) => r.get(d)?.name ?? n("profiles.missingMapping"),
1353
- editable: t,
1354
- onChange: p,
1355
- emptyLabel: n("profiles.noMappings"),
1356
- addLabel: n("profiles.addMapping"),
1357
- addOptions: e.filter((d) => !a.includes(d.id)).map((d) => ({ value: d.id, label: d.name })),
1358
- onAdd: (d) => p([...a, d]),
1359
- renderItem: (d) => {
1360
- const o = r.get(d);
1361
- return o ? /* @__PURE__ */ V(k, { gap: "2", children: [
1362
- /* @__PURE__ */ l($e, { asChild: !0, children: /* @__PURE__ */ l(Tt, { to: i(o.id), children: o.name }) }),
1363
- o.valid ? null : /* @__PURE__ */ l(Ye, { tone: "danger", label: n("validity.invalid") })
1364
- ] }) : /* @__PURE__ */ l(Q, { color: "fg.muted", children: n("profiles.missingMapping") });
2113
+ items: m,
2114
+ nameOf: (r) => p.get(r)?.name ?? i("profiles.missingMapping"),
2115
+ editable: n,
2116
+ onChange: u,
2117
+ emptyLabel: i("profiles.noMappings"),
2118
+ addLabel: i("profiles.addMapping"),
2119
+ addOptions: e.filter((r) => !m.includes(r.id)).map((r) => ({ value: r.id, label: r.name })),
2120
+ onAdd: (r) => u([...m, r]),
2121
+ renderItem: (r) => {
2122
+ const a = p.get(r);
2123
+ return a ? /* @__PURE__ */ g(D, { gap: "2", children: [
2124
+ /* @__PURE__ */ t($e, { asChild: !0, children: /* @__PURE__ */ t(xt, { to: l(a.id), children: a.name }) }),
2125
+ a.valid ? null : /* @__PURE__ */ t(Ue, { tone: "danger", label: i("validity.invalid") })
2126
+ ] }) : /* @__PURE__ */ t(Q, { color: "fg.muted", children: i("profiles.missingMapping") });
1365
2127
  }
1366
2128
  }
1367
2129
  );
1368
2130
  }
1369
- const Gt = () => rt();
1370
- function $l({ client: e, onOpen: t }) {
1371
- const { t: i } = S(X), { workspaceId: n } = B(), { paths: c } = Y(), s = O(), a = _(), [r, p] = H(!1), m = W({
1372
- queryKey: g.importProfiles(n),
2131
+ const Ot = () => Kt();
2132
+ function di({ client: e, onOpen: n }) {
2133
+ const { t: l } = R(I), { workspaceId: i } = W(), { paths: c } = K(), s = Ve(), m = P(), [p, u] = F(!1), o = C({
2134
+ queryKey: h.importProfiles(i),
1373
2135
  queryFn: () => e.listImportProfiles()
1374
- }), d = M(
2136
+ }), r = k(
1375
2137
  () => [
1376
2138
  {
1377
2139
  id: "name",
1378
- header: i("fields.name"),
1379
- cell: (o) => /* @__PURE__ */ l(
1380
- Ue,
2140
+ header: l("fields.name"),
2141
+ cell: (a) => /* @__PURE__ */ t(
2142
+ we,
1381
2143
  {
1382
- to: Ve(c, "profiles", o.row.original.id),
1383
- label: o.row.original.content.name
2144
+ to: de(c, "profiles", a.row.original.id),
2145
+ label: a.row.original.content.name
1384
2146
  }
1385
2147
  )
1386
2148
  },
1387
2149
  {
1388
2150
  id: "validity",
1389
- header: i("validity.column"),
1390
- cell: (o) => /* @__PURE__ */ l(Ce, { validity: o.row.original.validity })
2151
+ header: l("validity.column"),
2152
+ cell: (a) => /* @__PURE__ */ t(et, { validity: a.row.original.validity })
1391
2153
  },
1392
2154
  {
1393
2155
  id: "release",
1394
- header: i("release.column"),
2156
+ header: l("release.column"),
1395
2157
  size: 140,
1396
- cell: (o) => /* @__PURE__ */ l(f, { value: ot(o.row.original.state, i) })
2158
+ cell: (a) => /* @__PURE__ */ t(w, { value: wt(a.row.original.state, l) })
1397
2159
  }
1398
2160
  ],
1399
- [i, c]
2161
+ [l, c]
1400
2162
  );
1401
- return /* @__PURE__ */ V(
1402
- q,
2163
+ return /* @__PURE__ */ g(
2164
+ ee,
1403
2165
  {
1404
- title: i("section.profiles.title"),
1405
- actions: s ? /* @__PURE__ */ V(C, { variant: "solid", onClick: () => p(!0), children: [
1406
- /* @__PURE__ */ l(j, { size: 16, "aria-hidden": !0 }),
1407
- i("profiles.new")
2166
+ title: l("section.profiles.title"),
2167
+ actions: s ? /* @__PURE__ */ g(B, { variant: "solid", onClick: () => u(!0), children: [
2168
+ /* @__PURE__ */ t(se, { size: 16, "aria-hidden": !0 }),
2169
+ l("profiles.new")
1408
2170
  ] }) : void 0,
1409
2171
  children: [
1410
- m.isError ? /* @__PURE__ */ l(L, {}) : /* @__PURE__ */ l(
1411
- ge,
2172
+ o.isError ? /* @__PURE__ */ t(z, {}) : /* @__PURE__ */ t(
2173
+ ne,
1412
2174
  {
1413
- columns: d,
1414
- data: m.data ?? [],
1415
- loading: m.isPending,
1416
- getRowId: (o) => o.id,
1417
- emptyState: i("profiles.empty")
2175
+ columns: r,
2176
+ data: o.data ?? [],
2177
+ loading: o.isPending,
2178
+ getRowId: (a) => a.id,
2179
+ emptyState: l("profiles.empty")
1418
2180
  }
1419
2181
  ),
1420
- /* @__PURE__ */ l(
1421
- Qe,
2182
+ /* @__PURE__ */ t(
2183
+ rt,
1422
2184
  {
1423
- open: r,
1424
- onClose: () => p(!1),
1425
- title: i("profiles.new"),
1426
- onCreate: async ({ name: o, description: u }) => {
1427
- const G = await e.createImportProfile({
1428
- name: o,
1429
- description: u,
2185
+ open: p,
2186
+ onClose: () => u(!1),
2187
+ title: l("profiles.new"),
2188
+ onCreate: async ({ name: a, description: d }) => {
2189
+ const b = await e.createImportProfile({
2190
+ name: a,
2191
+ description: d,
1430
2192
  entitySetId: "",
1431
2193
  preprocessors: [],
1432
2194
  mappingIds: [],
@@ -1434,12 +2196,12 @@ function $l({ client: e, onOpen: t }) {
1434
2196
  autoPublish: !1,
1435
2197
  deleteSourceFileOnSuccess: !1
1436
2198
  });
1437
- return await a.invalidateQueries({
1438
- queryKey: g.importProfiles(n)
1439
- }), G.id;
2199
+ return await m.invalidateQueries({
2200
+ queryKey: h.importProfiles(i)
2201
+ }), b.id;
1440
2202
  },
1441
- onCreated: (o) => {
1442
- p(!1), t(o);
2203
+ onCreated: (a) => {
2204
+ u(!1), n(a);
1443
2205
  }
1444
2206
  }
1445
2207
  )
@@ -1447,29 +2209,221 @@ function $l({ client: e, onOpen: t }) {
1447
2209
  }
1448
2210
  );
1449
2211
  }
2212
+ const Bl = {
2213
+ importProfileId: "",
2214
+ effectiveDate: "",
2215
+ sourceDate: "",
2216
+ sourceReference: ""
2217
+ }, Wl = (e) => /\.xml$/i.test(e.name) || e.type === "text/xml" || e.type === "application/xml";
2218
+ function mi({ client: e, onStarted: n }) {
2219
+ const { t: l } = R(I), { workspaceId: i } = W(), { paths: c } = K(), s = Fe(), m = P(), p = C({
2220
+ queryKey: h.importProfiles(i),
2221
+ queryFn: () => e.listImportProfiles(),
2222
+ enabled: s
2223
+ }), u = me({ defaultValues: Bl }), o = he({ control: u.control, name: "importProfileId" }), [r, a] = F(null), d = (G) => {
2224
+ const [v] = G;
2225
+ if (v) {
2226
+ if (!Wl(v)) {
2227
+ a({
2228
+ state: "failed",
2229
+ name: v.name,
2230
+ message: l("startImport.notXml", { name: v.name })
2231
+ });
2232
+ return;
2233
+ }
2234
+ a({ state: "uploading", name: v.name, fraction: 0 }), e.uploadSourceFile(
2235
+ v,
2236
+ (Z) => a(
2237
+ (J) => J?.state === "uploading" && J.name === v.name ? { ...J, fraction: Z } : J
2238
+ )
2239
+ ).then(
2240
+ (Z) => a({ state: "uploaded", name: v.name, sourceFile: Z }),
2241
+ (Z) => a({
2242
+ state: "failed",
2243
+ name: v.name,
2244
+ message: l("startImport.uploadFailed", {
2245
+ name: v.name,
2246
+ message: Z instanceof Error ? Z.message : String(Z)
2247
+ })
2248
+ })
2249
+ );
2250
+ }
2251
+ }, b = te({
2252
+ mutationFn: (G) => e.startImport({
2253
+ importProfileId: G.importProfileId,
2254
+ sourceFileId: G.sourceFileId,
2255
+ effectiveDate: G.effectiveDate,
2256
+ ...G.sourceDate ? { source: { date: G.sourceDate, reference: G.sourceReference.trim() } } : {}
2257
+ }),
2258
+ onSuccess: (G) => {
2259
+ m.invalidateQueries({ queryKey: h.imports(i) }), n(G.id);
2260
+ }
2261
+ }), V = u.handleSubmit((G) => {
2262
+ if (r?.state === "uploaded") {
2263
+ if (!G.importProfileId) {
2264
+ u.setError("importProfileId", { message: l("startImport.profileRequired") });
2265
+ return;
2266
+ }
2267
+ if (!!G.sourceDate != !!G.sourceReference.trim()) {
2268
+ u.setError(G.sourceDate ? "sourceReference" : "sourceDate", {
2269
+ message: l("startImport.sourceIncomplete")
2270
+ });
2271
+ return;
2272
+ }
2273
+ b.mutate({ ...G, sourceFileId: r.sourceFile.id });
2274
+ }
2275
+ }), S = o !== "" && r?.state === "uploaded", y = {
2276
+ title: l("startImport.title"),
2277
+ breadcrumbs: [{ label: l("section.imports.title"), to: c.imports }]
2278
+ };
2279
+ if (!s)
2280
+ return /* @__PURE__ */ t(L, { ...y, children: /* @__PURE__ */ t(H, { px: "8", py: "6", children: /* @__PURE__ */ t(tt, { icon: /* @__PURE__ */ t(An, { size: 32, "aria-hidden": !0 }), header: l("startImport.notAllowed") }) }) });
2281
+ if (p.isError || !p.data)
2282
+ return /* @__PURE__ */ t(L, { ...y, children: p.isError ? /* @__PURE__ */ t(z, {}) : /* @__PURE__ */ t(ge, {}) });
2283
+ const M = p.data.filter((G) => G.state.latestRelease);
2284
+ return /* @__PURE__ */ t(
2285
+ L,
2286
+ {
2287
+ ...y,
2288
+ actions: /* @__PURE__ */ g(
2289
+ B,
2290
+ {
2291
+ variant: "solid",
2292
+ disabled: !S,
2293
+ loading: b.isPending,
2294
+ onClick: () => {
2295
+ V();
2296
+ },
2297
+ children: [
2298
+ /* @__PURE__ */ t(Bt, { size: 16, "aria-hidden": !0 }),
2299
+ l("imports.start")
2300
+ ]
2301
+ }
2302
+ ),
2303
+ children: /* @__PURE__ */ t(H, { px: "8", py: "6", children: /* @__PURE__ */ t(pe, { ...u, children: /* @__PURE__ */ g(X, { gap: "6", children: [
2304
+ b.isError ? /* @__PURE__ */ t(f, { status: "error", colorPalette: "danger", title: l("startImport.refused"), children: b.error.message }) : null,
2305
+ /* @__PURE__ */ t(N, { title: l("startImport.fileCard"), children: /* @__PURE__ */ g(X, { gap: "4", children: [
2306
+ M.length === 0 ? /* @__PURE__ */ t(f, { status: "info", colorPalette: "info", title: l("startImport.noProfiles") }) : null,
2307
+ /* @__PURE__ */ t(
2308
+ Je,
2309
+ {
2310
+ name: "importProfileId",
2311
+ label: l("startImport.profile"),
2312
+ helperText: l("startImport.profileHelp"),
2313
+ required: !0,
2314
+ options: M.map((G) => ({
2315
+ id: G.id,
2316
+ label: l("startImport.profileOption", {
2317
+ name: G.content.name,
2318
+ number: G.state.latestRelease?.number
2319
+ })
2320
+ }))
2321
+ }
2322
+ ),
2323
+ /* @__PURE__ */ g(X, { gap: "2", children: [
2324
+ /* @__PURE__ */ t(Q, { fontWeight: "medium", children: l("startImport.file") }),
2325
+ /* @__PURE__ */ t(Q, { color: "muted", fontSize: "sm", children: l("startImport.fileHelp") }),
2326
+ /* @__PURE__ */ t(
2327
+ Jn,
2328
+ {
2329
+ onFiles: d,
2330
+ accept: ".xml,text/xml,application/xml",
2331
+ disabled: r?.state === "uploading" || b.isPending,
2332
+ dropHintText: l("startImport.dropHint"),
2333
+ dragActiveText: l("startImport.dragActive"),
2334
+ buttonLabel: l("startImport.chooseFile")
2335
+ }
2336
+ ),
2337
+ /* @__PURE__ */ t(fl, { upload: r })
2338
+ ] })
2339
+ ] }) }),
2340
+ /* @__PURE__ */ t(N, { title: l("startImport.datesCard"), children: /* @__PURE__ */ g(X, { gap: "4", children: [
2341
+ /* @__PURE__ */ t(Q, { color: "muted", fontSize: "sm", children: l("startImport.datesHelp") }),
2342
+ /* @__PURE__ */ t(
2343
+ Oe,
2344
+ {
2345
+ name: "effectiveDate",
2346
+ label: l("startImport.effectiveDate"),
2347
+ helperText: l("startImport.effectiveDateHelp")
2348
+ }
2349
+ ),
2350
+ /* @__PURE__ */ g(Zt, { templateColumns: { base: "1fr", md: "1fr 2fr" }, gap: "4", children: [
2351
+ /* @__PURE__ */ t(
2352
+ Oe,
2353
+ {
2354
+ name: "sourceDate",
2355
+ label: l("startImport.sourceDate")
2356
+ }
2357
+ ),
2358
+ /* @__PURE__ */ t(
2359
+ T,
2360
+ {
2361
+ name: "sourceReference",
2362
+ label: l("startImport.sourceReference"),
2363
+ helperText: l("startImport.sourceReferenceHelp")
2364
+ }
2365
+ )
2366
+ ] })
2367
+ ] }) }),
2368
+ /* @__PURE__ */ t(f, { status: "info", colorPalette: "info", title: l("startImport.consentTitle"), children: l("startImport.consent") })
2369
+ ] }) }) })
2370
+ }
2371
+ );
2372
+ }
2373
+ function fl({ upload: e }) {
2374
+ const { t: n } = R(I);
2375
+ if (!e) return null;
2376
+ switch (e.state) {
2377
+ case "uploading":
2378
+ return /* @__PURE__ */ t(
2379
+ Xt,
2380
+ {
2381
+ label: n("startImport.uploading", { name: e.name }),
2382
+ value: Math.round(e.fraction * 100),
2383
+ showValue: !0
2384
+ }
2385
+ );
2386
+ case "uploaded":
2387
+ return /* @__PURE__ */ t(
2388
+ f,
2389
+ {
2390
+ status: "success",
2391
+ colorPalette: "success",
2392
+ title: n("startImport.uploaded", { name: e.name })
2393
+ }
2394
+ );
2395
+ case "failed":
2396
+ return /* @__PURE__ */ t(f, { status: "error", colorPalette: "danger", title: e.message });
2397
+ }
2398
+ }
1450
2399
  export {
1451
- Ml as ChangeSetLink,
1452
- lt as ConfigurationHistory,
1453
- At as ConfigurationInUseError,
1454
- Dl as EntitySetDetail,
1455
- Pl as EntitySetsIndex,
1456
- ln as IMPORTHUB_SECTIONS,
1457
- cl as IMPORTHUB_SECTION_ICONS,
1458
- X as IMPORTHUB_UI_NS,
1459
- _l as ImportProfileDetail,
1460
- $l as ImportProfilesIndex,
1461
- nn as ImporthubHostProvider,
1462
- Tl as ImporthubStartPage,
1463
- jl as MappingDetail,
1464
- Ol as MappingsIndex,
1465
- he as NameTakenError,
1466
- ql as ProcessorCatalogue,
1467
- Xt as ReleaseRefusedError,
1468
- an as STANDALONE_IMPORTHUB_PATHS,
1469
- Hl as createConnectImporthubClient,
1470
- on as i18nResources,
1471
- g as importhubKeys,
1472
- Ve as itemPath,
1473
- Y as useImporthubHost
2400
+ ti as ApiKeysIndex,
2401
+ nl as ChangeSetLink,
2402
+ vt as ConfigurationHistory,
2403
+ ln as ConfigurationInUseError,
2404
+ ni as EntitySetDetail,
2405
+ li as EntitySetsIndex,
2406
+ bi as IMPORTHUB_SECTIONS,
2407
+ ll as IMPORTHUB_SECTION_ICONS,
2408
+ I as IMPORTHUB_UI_NS,
2409
+ ii as ImportDetail,
2410
+ si as ImportProfileDetail,
2411
+ di as ImportProfilesIndex,
2412
+ gi as ImporthubHostProvider,
2413
+ ei as ImporthubStartPage,
2414
+ ai as ImportsIndex,
2415
+ oi as MappingDetail,
2416
+ ri as MappingsIndex,
2417
+ Pe as NameTakenError,
2418
+ ci as ProcessorCatalogue,
2419
+ nn as ReleaseRefusedError,
2420
+ Vi as STANDALONE_IMPORTHUB_PATHS,
2421
+ mi as StartImport,
2422
+ tn as StartRefusedError,
2423
+ $l as createConnectImporthubClient,
2424
+ yi as i18nResources,
2425
+ h as importhubKeys,
2426
+ de as itemPath,
2427
+ K as useImporthubHost
1474
2428
  };
1475
2429
  //# sourceMappingURL=index.js.map