@oktis-works/admin 0.4.20 → 0.4.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/dist/client/_astro/{ActivityWidget.BbEtaaM-.js → ActivityWidget.DaftIB1V.js} +2 -2
  2. package/dist/client/_astro/AdminBar.B-diRxPt.js +253 -0
  3. package/dist/client/_astro/{AtGlanceWidget.C1hpeDlx.js → AtGlanceWidget.q_xwhOJa.js} +3 -3
  4. package/dist/client/_astro/BaseLayout.sayhdG_g.css +1 -0
  5. package/dist/client/_astro/ContentEditor.B1b1Ixz0.js +3 -0
  6. package/dist/client/_astro/ContentEditor.DGTZ51kU.js +1 -0
  7. package/dist/client/_astro/ContentTypeWorkspace.CFzwh3Rc.js +1 -0
  8. package/dist/client/_astro/CustomFieldsManager.DqCE6rSX.js +5 -0
  9. package/dist/client/_astro/DashboardHome.HrqKA0mK.js +1 -0
  10. package/dist/client/_astro/DashboardLayout.astro_astro_type_script_index_0_lang.sBNUxHjt.js +1 -0
  11. package/dist/client/_astro/{DashboardLayout.CGou4voc.css → DashboardLayout.cOPI1C7I.css} +1 -1
  12. package/dist/client/_astro/{Footer.rUGgtlfI.js → Footer.nQEKIcjo.js} +2 -2
  13. package/dist/client/_astro/GeneralSettings.C5lXnnvB.js +1 -0
  14. package/dist/client/_astro/LogsManager.BSXD0gFG.js +1 -0
  15. package/dist/client/_astro/MediaLibrary.9tlXDGsx.js +1 -0
  16. package/dist/client/_astro/MenuManager.CfLmtMhF.js +1 -0
  17. package/dist/client/_astro/PluginManager.Ba2R7ZVx.js +98 -0
  18. package/dist/client/_astro/PostTypesManager.DqbyhhLF.js +1 -0
  19. package/dist/client/_astro/QuickDraftWidget.J5LOLOY3.js +17 -0
  20. package/dist/client/_astro/ResourceHubs.sI10AY3z.js +1 -0
  21. package/dist/client/_astro/TaxonomiesManager.BFd3zjNe.js +1 -0
  22. package/dist/client/_astro/TaxonomyTermsManager.C7ClYXtt.js +1 -0
  23. package/dist/client/_astro/ThemeManager.C4t-yZay.js +129 -0
  24. package/dist/client/_astro/UserCreateForm.B-7pKOO6.js +1 -0
  25. package/dist/client/_astro/UsersManager.aI6-3vtM.js +1 -0
  26. package/dist/client/_astro/WebhooksManager.C3E91U9V.js +1 -0
  27. package/dist/client/_astro/api.DSIz0zxF.js +1 -0
  28. package/dist/client/_astro/ar.9BcNkJMI.js +1 -0
  29. package/dist/client/_astro/client.BDaUmf7m.js +1 -0
  30. package/dist/client/_astro/custom-fields.pl-GPt9A.css +1 -0
  31. package/dist/client/_astro/dist.BqeNZlzo.js +1 -0
  32. package/dist/client/_astro/es-ES.DgqDFCmG.js +1 -0
  33. package/dist/client/_astro/extensions.BD4YTWQq.js +1 -0
  34. package/dist/client/_astro/he.11dIJHQw.js +1 -0
  35. package/dist/client/_astro/i18n.Tk18hqHh.js +1 -0
  36. package/dist/client/_astro/it.yCdgk3Xj.js +1 -0
  37. package/dist/client/_astro/ja.BIm7Hwe_.js +1 -0
  38. package/dist/client/_astro/{login.astro_astro_type_script_index_0_lang.O-AlzgHd.js → login.astro_astro_type_script_index_0_lang.CJiWhdn-.js} +1 -1
  39. package/dist/client/_astro/lucide.DlU56wZ1.js +4 -0
  40. package/dist/client/_astro/pl.dUwrcITB.js +1 -0
  41. package/dist/client/_astro/pt-BR.BvjbjXKW.js +1 -0
  42. package/dist/client/_astro/rolldown-runtime.BpQH8Ho1.js +1 -0
  43. package/dist/client/_astro/ru.lmDiQaSu.js +1 -0
  44. package/dist/client/_astro/solid.TEtyrbLc.js +1 -0
  45. package/dist/client/_astro/sw._qHdoFbp.js +1 -0
  46. package/dist/client/_astro/tr.Do-lr98T.js +1 -0
  47. package/dist/client/_astro/uk.DTUX-N1c.js +1 -0
  48. package/dist/client/_astro/{version.BQq07lEn.js → version.Cvcb-3YL.js} +1 -1
  49. package/dist/client/_astro/web.C8wWxyYF.js +1 -0
  50. package/dist/client/_astro/yo.BIYG0J7I.js +1 -0
  51. package/dist/client/_astro/zh-CN.C7Iod1E1.js +1 -0
  52. package/dist/server/chunks/{ContentEditor_DS7flRjR.mjs → ContentEditor_Bz6HNlOl.mjs} +11 -31
  53. package/dist/server/chunks/{DashboardLayout_09DepSVn.mjs → DashboardLayout_DnvPikNH.mjs} +42 -17
  54. package/dist/server/chunks/MediaLibrary_CfwJY7WG.mjs +466 -0
  55. package/dist/server/chunks/{_slug__l8CTaLpP.mjs → _slug__Bf1zTrrT.mjs} +1 -1
  56. package/dist/server/chunks/access_Iqz1YRc2.mjs +138 -0
  57. package/dist/server/chunks/{ar_B0LfQbpu.mjs → ar_DlCzOUGe.mjs} +22 -2
  58. package/dist/server/chunks/custom-fields_HXTX5-i-.mjs +1297 -0
  59. package/dist/server/chunks/{edit_hSCrM2Gq.mjs → edit_ibDxQgfc.mjs} +2 -2
  60. package/dist/server/chunks/{es-ES_dBEm2FNw.mjs → es-ES_DD40B9Zr.mjs} +22 -2
  61. package/dist/server/chunks/{general_Ct9MU7b-.mjs → general_VinYjg7Y.mjs} +2 -2
  62. package/dist/server/chunks/{he_DRWoI1A5.mjs → he_8WSAyM_S.mjs} +22 -2
  63. package/dist/server/chunks/{i18n_BqFK0MIW.mjs → i18n_BgHPm3Sm.mjs} +337 -57
  64. package/dist/server/chunks/{index_CBfRX_VO.mjs → index_BIz2E9Ay.mjs} +3 -3
  65. package/dist/server/chunks/{index_uv0IHg8r.mjs → index_DmY8Cm8s.mjs} +2 -2
  66. package/dist/server/chunks/{index_DQ5pFuPN.mjs → index_DvyRjH_d.mjs} +2 -2
  67. package/dist/server/chunks/{index_Cv2j9xC_.mjs → index_WfuyDGIh.mjs} +2 -2
  68. package/dist/server/chunks/{index_B77wdzK2.mjs → index_kl5K78eg.mjs} +1 -1
  69. package/dist/server/chunks/{it_BDY3lerP.mjs → it_DEDC6yxf.mjs} +22 -2
  70. package/dist/server/chunks/{ja_C-EybQiV.mjs → ja_BRQi6rW3.mjs} +22 -2
  71. package/dist/server/chunks/{login_D-Z6bo6E.mjs → login_s3hMBW1K.mjs} +1 -1
  72. package/dist/server/chunks/logs_DUQUxzzy.mjs +160 -0
  73. package/dist/server/chunks/menus_CgKz8KBb.mjs +532 -0
  74. package/dist/server/chunks/{new_DpJfTahF.mjs → new_CU0A50ce.mjs} +2 -2
  75. package/dist/server/chunks/{new_XOnqlHm3.mjs → new_CZuza7Tx.mjs} +2 -2
  76. package/dist/server/chunks/{pl_DH5LKmVG.mjs → pl_CKanAk0F.mjs} +22 -2
  77. package/dist/server/chunks/plugins_fppkr9jv.mjs +133 -0
  78. package/dist/server/chunks/{post-types_DziideHh.mjs → post-types_BAWPD3pX.mjs} +2 -2
  79. package/dist/server/chunks/{pt-BR_CBnqy3xP.mjs → pt-BR_CoM1872j.mjs} +263 -13
  80. package/dist/server/chunks/{ru_CFa1xYFr.mjs → ru_CuNXt2MB.mjs} +22 -2
  81. package/dist/server/chunks/{sw_QZf7NSsI.mjs → sw_RLMWPkos.mjs} +22 -2
  82. package/dist/server/chunks/{taxonomies_Bc6xPaKp.mjs → taxonomies_BACV08DC.mjs} +2 -2
  83. package/dist/server/chunks/{taxonomy_Cv4_KTTL.mjs → taxonomy_CZLTclnV.mjs} +30 -15
  84. package/dist/server/chunks/themes_DHNmoF_s.mjs +132 -0
  85. package/dist/server/chunks/{tr_Fjry5R-K.mjs → tr_Dz8pqyTZ.mjs} +22 -2
  86. package/dist/server/chunks/{uk_Bxc3qY45.mjs → uk_BjwqlweA.mjs} +22 -2
  87. package/dist/server/chunks/{upload_CB_L9tkU.mjs → upload_BZgCqIbH.mjs} +2 -2
  88. package/dist/server/chunks/webhooks_D0qA5-De.mjs +300 -0
  89. package/dist/server/chunks/{yo_BARL-Qrh.mjs → yo_Dv14KWVR.mjs} +22 -2
  90. package/dist/server/chunks/{zh-CN_CkjPJL88.mjs → zh-CN_DjIZCWzG.mjs} +22 -2
  91. package/dist/server/entry.mjs +77 -50
  92. package/dist/server/virtual_astro_middleware.mjs +1 -1
  93. package/package.json +1 -1
  94. package/dist/client/_astro/AdminBar.CU2eba2D.js +0 -253
  95. package/dist/client/_astro/BaseLayout.Y8xW22CP.css +0 -1
  96. package/dist/client/_astro/ContentEditor.Bc5Jq8Dv.js +0 -1
  97. package/dist/client/_astro/ContentEditor.DvpaqJBD.js +0 -3
  98. package/dist/client/_astro/ContentTypeWorkspace.DakVi21h.js +0 -1
  99. package/dist/client/_astro/CustomFieldsManager.B7WOTvb7.js +0 -3
  100. package/dist/client/_astro/DashboardHome.CUfuLLDH.js +0 -1
  101. package/dist/client/_astro/DashboardLayout.astro_astro_type_script_index_0_lang.Dpnx6U2l.js +0 -4
  102. package/dist/client/_astro/FieldTypePicker.Cyfzqug-.js +0 -1
  103. package/dist/client/_astro/GeneralSettings.C4mnJ7P2.js +0 -1
  104. package/dist/client/_astro/MediaLibrary.2geQYfXB.js +0 -1
  105. package/dist/client/_astro/PluginManager.D3pm88iu.js +0 -93
  106. package/dist/client/_astro/PostTypesManager.Cyhr3VEJ.js +0 -1
  107. package/dist/client/_astro/QuickDraftWidget.CPljoS31.js +0 -17
  108. package/dist/client/_astro/ResourceHubs.DpCJERsJ.js +0 -1
  109. package/dist/client/_astro/TaxonomiesManager.P3bc-fnu.js +0 -1
  110. package/dist/client/_astro/TaxonomyTermsManager.BxP9gwm7.js +0 -1
  111. package/dist/client/_astro/ThemeManager.3MUOwqex.js +0 -129
  112. package/dist/client/_astro/UserCreateForm.C3RiEJEa.js +0 -1
  113. package/dist/client/_astro/UsersManager.DR9XR3FX.js +0 -1
  114. package/dist/client/_astro/api.25OAsWO0.js +0 -1
  115. package/dist/client/_astro/ar.CwC9hXB9.js +0 -1
  116. package/dist/client/_astro/client.W0NY0lEa.js +0 -1
  117. package/dist/client/_astro/custom-fields.IjuRIdAC.css +0 -1
  118. package/dist/client/_astro/es-ES.qNcd-cVX.js +0 -1
  119. package/dist/client/_astro/extensions.Bj86CHnv.js +0 -1
  120. package/dist/client/_astro/he.DfZ0ZzM-.js +0 -1
  121. package/dist/client/_astro/i18n.C24_pkIi.js +0 -1
  122. package/dist/client/_astro/it.PFmLQj2s.js +0 -1
  123. package/dist/client/_astro/ja.CMi5cD8g.js +0 -1
  124. package/dist/client/_astro/pl.CRExzLlj.js +0 -1
  125. package/dist/client/_astro/pt-BR.BPvwNpKR.js +0 -1
  126. package/dist/client/_astro/ru.CWV-tkZ3.js +0 -1
  127. package/dist/client/_astro/solid.DN8T1HsY.js +0 -1
  128. package/dist/client/_astro/src.Cq47pnsg.js +0 -1
  129. package/dist/client/_astro/sw.B5x6GU4s.js +0 -1
  130. package/dist/client/_astro/tr.BzxCGQu8.js +0 -1
  131. package/dist/client/_astro/uk.DJHMwNRU.js +0 -1
  132. package/dist/client/_astro/web.Bze9SKEA.js +0 -1
  133. package/dist/client/_astro/yo.DNw_hOnW.js +0 -1
  134. package/dist/client/_astro/zh-CN.Bs7H6Unx.js +0 -1
  135. package/dist/server/chunks/FieldTypePicker_CXwpmcQ3.mjs +0 -79
  136. package/dist/server/chunks/MediaLibrary_Xs09kLza.mjs +0 -335
  137. package/dist/server/chunks/ResourceHubs_Dwb0xyPZ.mjs +0 -453
  138. package/dist/server/chunks/access_D93W5BWD.mjs +0 -34
  139. package/dist/server/chunks/custom-fields_Dp7DHJ0M.mjs +0 -488
  140. package/dist/server/chunks/operations_0sYvzzNC.mjs +0 -34
  141. package/dist/server/chunks/plugins_Clk92l6Q.mjs +0 -156
  142. package/dist/server/chunks/resources_dPTDnpAf.mjs +0 -34
  143. package/dist/server/chunks/themes_BRtDtEK7.mjs +0 -155
  144. /package/dist/server/chunks/{BaseLayout_m8b8Eemd.mjs → BaseLayout_CXafpVV9.mjs} +0 -0
@@ -0,0 +1,1297 @@
1
+ import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
+ import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
+ import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
+ import { n as useTranslation, r as apiClient } from "./i18n_BgHPm3Sm.mjs";
5
+ import { t as $$DashboardLayout } from "./DashboardLayout_DnvPikNH.mjs";
6
+ import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
7
+ import { For, Show, createMemo, createSignal, onMount } from "solid-js";
8
+ import { createIcons, icons } from "lucide";
9
+ //#region src/components/content/FieldTypePicker.tsx
10
+ var _tmpl$$1 = [
11
+ "<div",
12
+ " class=\"field-type-picker__panel\" role=\"listbox\"><input type=\"search\" class=\"field-type-picker__search\" placeholder=\"Buscar tipo de campo...\"",
13
+ "><!--$-->",
14
+ "<!--/--></div>"
15
+ ];
16
+ var _tmpl$2$1 = [
17
+ "<div",
18
+ " class=\"field-type-picker\"><button type=\"button\" class=\"field-type-picker__trigger\"",
19
+ "><span class=\"field-type-picker__selected\"><i",
20
+ " aria-hidden=\"true\"></i><!--$-->",
21
+ "<!--/--></span><span aria-hidden=\"true\">",
22
+ "</span></button><!--$-->",
23
+ "<!--/--></div>"
24
+ ];
25
+ var _tmpl$3$1 = [
26
+ "<div",
27
+ " class=\"field-type-picker__group\"><div class=\"field-type-picker__group-label\"><i",
28
+ " aria-hidden=\"true\"></i><!--$-->",
29
+ "<!--/--></div><!--$-->",
30
+ "<!--/--></div>"
31
+ ];
32
+ var _tmpl$4$1 = ["<span", " class=\"field-type-picker__hint\">sem lógica condicional</span>"];
33
+ var _tmpl$5$1 = [
34
+ "<button",
35
+ " type=\"button\" role=\"option\"",
36
+ " class=\"",
37
+ "\"><i",
38
+ " aria-hidden=\"true\"></i><span>",
39
+ "</span><!--$-->",
40
+ "<!--/--></button>"
41
+ ];
42
+ function FieldTypePicker(props) {
43
+ const [open, setOpen] = createSignal(false);
44
+ const [query, setQuery] = createSignal("");
45
+ const selected = () => props.types.find((type) => type.type === props.value);
46
+ const filteredTypes = () => {
47
+ const q = query().toLowerCase();
48
+ return q ? props.types.filter((type) => type.label.toLowerCase().includes(q) || type.type.includes(q)) : props.types;
49
+ };
50
+ const refreshIcons = () => {
51
+ queueMicrotask(() => createIcons({ icons }));
52
+ };
53
+ onMount(refreshIcons);
54
+ return ssr(_tmpl$2$1, ssrHydrationKey(), ssrAttribute("aria-expanded", escape(open(), true), false), ssrAttribute("data-lucide", escape(selected()?.icon ?? "box", true), false), escape(selected()?.label ?? "Selecione o tipo"), open() ? "▴" : "▾", escape(createComponent(Show, {
55
+ get when() {
56
+ return open();
57
+ },
58
+ get children() {
59
+ return ssr(_tmpl$$1, ssrHydrationKey(), ssrAttribute("value", escape(query(), true), false), escape(createComponent(For, {
60
+ get each() {
61
+ return props.categories;
62
+ },
63
+ children: (category) => {
64
+ const categoryTypes = filteredTypes().filter((type) => type.category === category.id);
65
+ return createComponent(Show, {
66
+ get when() {
67
+ return categoryTypes.length > 0;
68
+ },
69
+ get children() {
70
+ return ssr(_tmpl$3$1, ssrHydrationKey(), ssrAttribute("data-lucide", escape(category.icon, true), false), escape(category.label), escape(createComponent(For, {
71
+ each: categoryTypes,
72
+ children: (type) => ssr(_tmpl$5$1, ssrHydrationKey(), ssrAttribute("aria-selected", escape(props.value, true) === escape(type.type, true), false), `field-type-picker__option ${props.value === type.type ? "is-selected" : ""}`, ssrAttribute("data-lucide", escape(type.icon, true), false), escape(type.label), escape(createComponent(Show, {
73
+ get when() {
74
+ return !type.supportsConditions;
75
+ },
76
+ get children() {
77
+ return ssr(_tmpl$4$1, ssrHydrationKey());
78
+ }
79
+ })))
80
+ })));
81
+ }
82
+ });
83
+ }
84
+ })));
85
+ }
86
+ })));
87
+ }
88
+ //#endregion
89
+ //#region src/components/apps/settings/CustomFieldsManager.tsx
90
+ var _tmpl$ = [
91
+ "<span",
92
+ " class=\"muted\">",
93
+ "</span>"
94
+ ];
95
+ var _tmpl$2 = [
96
+ "<div",
97
+ " class=\"acf-conditional\"><div class=\"acf-settings-heading\"><strong>",
98
+ "</strong><span class=\"muted\">",
99
+ "</span></div><!--$-->",
100
+ "<!--/--><button type=\"button\" class=\"btn btn-secondary btn-sm\">+ <!--$-->",
101
+ "<!--/--></button><!--$-->",
102
+ "<!--/--></div>"
103
+ ];
104
+ var _tmpl$3 = [
105
+ "<div",
106
+ " class=\"acf-condition-group\"><!--$-->",
107
+ "<!--/--><button type=\"button\" class=\"btn btn-secondary btn-sm\">+ <!--$-->",
108
+ "<!--/--></button></div>"
109
+ ];
110
+ var _tmpl$4 = [
111
+ "<input",
112
+ " class=\"input\"",
113
+ ">"
114
+ ];
115
+ var _tmpl$5 = [
116
+ "<div",
117
+ " class=\"acf-condition-row\"><select class=\"input\"",
118
+ "><option value>",
119
+ "</option><!--$-->",
120
+ "<!--/--></select><select class=\"input\"",
121
+ "><option value=\"eq\">",
122
+ "</option><option value=\"neq\">",
123
+ "</option><option value=\"gt\">",
124
+ "</option><option value=\"lt\">",
125
+ "</option><option value=\"contains\">",
126
+ "</option><option value=\"has_any_value\">",
127
+ "</option><option value=\"has_no_value\">",
128
+ "</option></select><!--$-->",
129
+ "<!--/--><button type=\"button\" class=\"btn btn-danger btn-sm\">×</button></div>"
130
+ ];
131
+ var _tmpl$6 = [
132
+ "<option",
133
+ ">",
134
+ "</option>"
135
+ ];
136
+ var _tmpl$7 = [
137
+ "<label",
138
+ "><!--$-->",
139
+ "<!--/--><input class=\"input\" type=\"number\" min=\"1\"",
140
+ "></label>"
141
+ ];
142
+ var _tmpl$8 = [
143
+ "<label",
144
+ "><!--$-->",
145
+ "<!--/--><select class=\"input\"",
146
+ "><option value=\"br\">&lt;br&gt;</option><option value=\"wpautop\">",
147
+ "</option><option value=\"none\">",
148
+ "</option></select></label>"
149
+ ];
150
+ var _tmpl$9 = [
151
+ "<div",
152
+ " class=\"acf-settings-section\"><h5>",
153
+ "</h5><div class=\"acf-settings-grid\"><label><!--$-->",
154
+ "<!--/--><input class=\"input\"",
155
+ "></label><label><!--$-->",
156
+ "<!--/--><input class=\"input\"",
157
+ "></label><label><!--$-->",
158
+ "<!--/--><input class=\"input\" type=\"number\" min=\"0\"",
159
+ "></label><label><!--$-->",
160
+ "<!--/--><input class=\"input\" type=\"number\" min=\"0\"",
161
+ "></label><!--$-->",
162
+ "<!--/--></div></div>"
163
+ ];
164
+ var _tmpl$0 = [
165
+ "<div",
166
+ " class=\"acf-settings-section\"><h5>",
167
+ "</h5><div class=\"acf-settings-grid\"><label><!--$-->",
168
+ "<!--/--><input class=\"input\" type=\"number\"",
169
+ "></label><label><!--$-->",
170
+ "<!--/--><input class=\"input\" type=\"number\"",
171
+ "></label><label><!--$-->",
172
+ "<!--/--><input class=\"input\" type=\"number\" step=\"any\"",
173
+ "></label></div></div>"
174
+ ];
175
+ var _tmpl$1 = [
176
+ "<div",
177
+ " class=\"acf-settings-section\"><h5>",
178
+ "</h5><div class=\"acf-settings-grid\"><label class=\"acf-settings-wide\"><!--$-->",
179
+ "<!--/--><textarea class=\"input\" rows=\"5\"",
180
+ " placeholder=\"valor|Rótulo\"></textarea></label><label><!--$-->",
181
+ "<!--/--><select class=\"input\"",
182
+ "><option value=\"vertical\">",
183
+ "</option><option value=\"horizontal\">",
184
+ "</option></select></label><label class=\"checkbox-label\"><input type=\"checkbox\"",
185
+ "> <!--$-->",
186
+ "<!--/--></label><label class=\"checkbox-label\"><input type=\"checkbox\"",
187
+ "> <!--$-->",
188
+ "<!--/--></label></div></div>"
189
+ ];
190
+ var _tmpl$10 = [
191
+ "<div",
192
+ " class=\"acf-settings-section\"><h5>",
193
+ "</h5><div class=\"acf-settings-grid\"><label><!--$-->",
194
+ "<!--/--><select class=\"input\"",
195
+ "><option value=\"array\">",
196
+ "</option><option value=\"id\">",
197
+ "</option><option value=\"url\">URL</option></select></label><label><!--$-->",
198
+ "<!--/--><input class=\"input\"",
199
+ "></label><label><!--$-->",
200
+ "<!--/--><select class=\"input\"",
201
+ "><option value=\"all\">",
202
+ "</option><option value=\"uploadedToPost\">",
203
+ "</option></select></label><label><!--$-->",
204
+ "<!--/--><input class=\"input\"",
205
+ " placeholder=\"jpg, png, pdf\"></label><label><!--$-->",
206
+ "<!--/--><input class=\"input\" type=\"number\"",
207
+ "></label><label><!--$-->",
208
+ "<!--/--><input class=\"input\" type=\"number\"",
209
+ "></label><label><!--$-->",
210
+ "<!--/--><input class=\"input\" type=\"number\"",
211
+ "></label><label><!--$-->",
212
+ "<!--/--><input class=\"input\" type=\"number\"",
213
+ "></label></div></div>"
214
+ ];
215
+ var _tmpl$11 = [
216
+ "<div",
217
+ " class=\"acf-settings-section\"><h5>",
218
+ "</h5><div class=\"acf-settings-grid\"><label><!--$-->",
219
+ "<!--/--><select class=\"input\"",
220
+ "><option value=\"all\">",
221
+ "</option><option value=\"visual\">Visual</option><option value=\"text\">Text</option></select></label><label><!--$-->",
222
+ "<!--/--><select class=\"input\"",
223
+ "><option value=\"full\">Full</option><option value=\"basic\">Basic</option></select></label><label class=\"checkbox-label\"><input type=\"checkbox\"",
224
+ "> <!--$-->",
225
+ "<!--/--></label></div></div>"
226
+ ];
227
+ var _tmpl$12 = [
228
+ "<div",
229
+ " class=\"acf-settings-section\"><h5>",
230
+ "</h5><div class=\"acf-settings-grid\"><label><!--$-->",
231
+ "<!--/--><input class=\"input\"",
232
+ "></label><label><!--$-->",
233
+ "<!--/--><input class=\"input\"",
234
+ "></label><label><!--$-->",
235
+ "<!--/--><input class=\"input\" type=\"number\" min=\"0\" max=\"6\"",
236
+ "></label></div></div>"
237
+ ];
238
+ var _tmpl$13 = [
239
+ "<div",
240
+ " class=\"acf-settings-section\"><h5>",
241
+ "</h5><label class=\"checkbox-label\"><input type=\"checkbox\"",
242
+ "> <!--$-->",
243
+ "<!--/--></label></div>"
244
+ ];
245
+ var _tmpl$14 = [
246
+ "<div",
247
+ " class=\"acf-settings-section\"><h5>",
248
+ "</h5><div class=\"acf-settings-grid\"><label><!--$-->",
249
+ "<!--/--><input class=\"input\"",
250
+ "></label><label><!--$-->",
251
+ "<!--/--><input class=\"input\" type=\"number\"",
252
+ "></label><label><!--$-->",
253
+ "<!--/--><input class=\"input\"",
254
+ "></label></div></div>"
255
+ ];
256
+ var _tmpl$15 = [
257
+ "<div",
258
+ " class=\"acf-settings-section\"><h5>",
259
+ "</h5><div class=\"acf-settings-grid\"><label><!--$-->",
260
+ "<!--/--><input class=\"input\"",
261
+ "></label><label><!--$-->",
262
+ "<!--/--><input class=\"input\"",
263
+ "></label><label><!--$-->",
264
+ "<!--/--><select class=\"input\"",
265
+ "><option value=\"id\">ID</option><option value=\"object\">Object</option><option value=\"array\">Array</option></select></label><label class=\"checkbox-label\"><input type=\"checkbox\"",
266
+ "> <!--$-->",
267
+ "<!--/--></label><label class=\"checkbox-label\"><input type=\"checkbox\"",
268
+ "> <!--$-->",
269
+ "<!--/--></label></div></div>"
270
+ ];
271
+ var _tmpl$16 = [
272
+ "<div",
273
+ " class=\"acf-settings-section\"><h5>",
274
+ "</h5><div class=\"acf-settings-grid\"><label><!--$-->",
275
+ "<!--/--><input class=\"input\"",
276
+ "></label><label class=\"checkbox-label\"><input type=\"checkbox\"",
277
+ "> <!--$-->",
278
+ "<!--/--></label></div></div>"
279
+ ];
280
+ var _tmpl$17 = [
281
+ "<div",
282
+ " class=\"acf-settings-section\"><h5>",
283
+ "</h5><label><!--$-->",
284
+ "<!--/--><select class=\"input\"",
285
+ "><option value=\"array\">Array</option><option value=\"url\">URL</option><option value=\"id\">ID</option></select></label></div>"
286
+ ];
287
+ var _tmpl$18 = [
288
+ "<div",
289
+ " class=\"acf-settings-section\"><h5>",
290
+ "</h5><label class=\"acf-settings-wide\"><!--$-->",
291
+ "<!--/--><textarea class=\"input\" rows=\"3\"",
292
+ "></textarea></label></div>"
293
+ ];
294
+ var _tmpl$19 = [
295
+ "<div",
296
+ " class=\"acf-settings-section\"><h5>",
297
+ "</h5><div class=\"acf-settings-grid\"><label><!--$-->",
298
+ "<!--/--><select class=\"input\"",
299
+ "><option value=\"block\">Block</option><option value=\"table\">Table</option><option value=\"row\">Row</option></select></label><label><!--$-->",
300
+ "<!--/--><input class=\"input\" type=\"number\" min=\"0\"",
301
+ "></label><label><!--$-->",
302
+ "<!--/--><input class=\"input\" type=\"number\" min=\"0\"",
303
+ "></label><label><!--$-->",
304
+ "<!--/--><input class=\"input\"",
305
+ "></label><label><!--$-->",
306
+ "<!--/--><input class=\"input\"",
307
+ " placeholder=\"field_name\"></label></div></div>"
308
+ ];
309
+ var _tmpl$20 = [
310
+ "<div",
311
+ " class=\"acf-field-settings\"><div class=\"acf-settings-section\"><h5>",
312
+ "</h5><div class=\"acf-settings-grid\"><label><!--$-->",
313
+ "<!--/--><input class=\"input\"",
314
+ "></label><label><!--$-->",
315
+ "<!--/--><input class=\"input\" pattern=\"[a-zA-Z0-9_-]+\"",
316
+ "></label><label class=\"acf-settings-wide\"><!--$-->",
317
+ "<!--/--><textarea class=\"input\" rows=\"2\"",
318
+ "></textarea></label><label class=\"checkbox-label\"><input type=\"checkbox\"",
319
+ "> <!--$-->",
320
+ "<!--/--></label><label><!--$-->",
321
+ "<!--/--><input class=\"input\"",
322
+ "></label><label><!--$-->",
323
+ "<!--/--><input class=\"input\"",
324
+ "></label></div></div><div class=\"acf-settings-section\"><h5>",
325
+ "</h5><div class=\"acf-settings-grid\"><label><!--$-->",
326
+ "<!--/--><input class=\"input\" type=\"number\" min=\"0\" max=\"100\"",
327
+ "></label><label><!--$-->",
328
+ "<!--/--><select class=\"input\"",
329
+ "><option value=\"top\">",
330
+ "</option><option value=\"left\">",
331
+ "</option></select></label><label><!--$-->",
332
+ "<!--/--><select class=\"input\"",
333
+ "><option value=\"above\">",
334
+ "</option><option value=\"below\">",
335
+ "</option></select></label></div></div><!--$-->",
336
+ "<!--/--><!--$-->",
337
+ "<!--/--><!--$-->",
338
+ "<!--/--><!--$-->",
339
+ "<!--/--><!--$-->",
340
+ "<!--/--><!--$-->",
341
+ "<!--/--><!--$-->",
342
+ "<!--/--><!--$-->",
343
+ "<!--/--><!--$-->",
344
+ "<!--/--><!--$-->",
345
+ "<!--/--><!--$-->",
346
+ "<!--/--><!--$-->",
347
+ "<!--/--><!--$-->",
348
+ "<!--/--><!--$-->",
349
+ "<!--/--></div>"
350
+ ];
351
+ var _tmpl$21 = [
352
+ "<div",
353
+ " class=\"acf-fields-list\"",
354
+ ">",
355
+ "</div>"
356
+ ];
357
+ var _tmpl$22 = [
358
+ "<div",
359
+ " class=\"acf-nested-fields\"><div class=\"acf-nested-heading\"><h5>",
360
+ "</h5><button type=\"button\" class=\"btn btn-secondary btn-sm\">+ <!--$-->",
361
+ "<!--/--></button></div><!--$-->",
362
+ "<!--/--></div>"
363
+ ];
364
+ var _tmpl$23 = [
365
+ "<div",
366
+ " class=\"acf-field-body\"><div class=\"acf-field-type-row\"><label>",
367
+ "</label><!--$-->",
368
+ "<!--/--></div><!--$-->",
369
+ "<!--/--><!--$-->",
370
+ "<!--/--><!--$-->",
371
+ "<!--/--></div>"
372
+ ];
373
+ var _tmpl$24 = [
374
+ "<article",
375
+ " class=\"",
376
+ "\"><div class=\"acf-field-header\"><span class=\"acf-drag-handle\" data-drag-handle=\"true\" draggable=\"true\"",
377
+ ">⠿⠿⠿</span><button type=\"button\" class=\"acf-field-toggle\"><span class=\"acf-field-number\">",
378
+ "</span><span class=\"acf-field-title\"><strong>",
379
+ "</strong><small><!--$-->",
380
+ "<!--/--> · <!--$-->",
381
+ "<!--/--></small></span><span class=\"acf-field-chevron\">",
382
+ "</span></button><button type=\"button\" class=\"btn btn-danger btn-sm\">",
383
+ "</button></div><!--$-->",
384
+ "<!--/--></article>"
385
+ ];
386
+ var _tmpl$25 = [
387
+ "<div",
388
+ " class=\"acf-layouts\"><div class=\"acf-nested-heading\"><h5>",
389
+ "</h5><button type=\"button\" class=\"btn btn-secondary btn-sm\">+ <!--$-->",
390
+ "<!--/--></button></div><!--$-->",
391
+ "<!--/--></div>"
392
+ ];
393
+ var _tmpl$26 = [
394
+ "<div",
395
+ " class=\"acf-layout-card\"><div class=\"acf-settings-grid\"><label><!--$-->",
396
+ "<!--/--><input class=\"input\"",
397
+ "></label><label><!--$-->",
398
+ "<!--/--><input class=\"input\"",
399
+ "></label><label><!--$-->",
400
+ "<!--/--><select class=\"input\"",
401
+ "><option value=\"block\">Block</option><option value=\"table\">Table</option><option value=\"row\">Row</option></select></label><button type=\"button\" class=\"btn btn-danger btn-sm\">",
402
+ "</button></div><div class=\"acf-nested-fields\"><div class=\"acf-nested-heading\"><h5><!--$-->",
403
+ "<!--/--> · <!--$-->",
404
+ "<!--/--></h5><button type=\"button\" class=\"btn btn-secondary btn-sm\">+ <!--$-->",
405
+ "<!--/--></button></div><!--$-->",
406
+ "<!--/--></div></div>"
407
+ ];
408
+ var _tmpl$27 = [
409
+ "<div",
410
+ " class=\"notice notice--error\">",
411
+ "</div>"
412
+ ];
413
+ var _tmpl$28 = [
414
+ "<div",
415
+ " class=\"notice\">",
416
+ "</div>"
417
+ ];
418
+ var _tmpl$29 = [
419
+ "<div",
420
+ " class=\"acf-list-header\"><div><span class=\"acf-eyebrow\">",
421
+ "</span><h3>",
422
+ "</h3><p class=\"muted\">",
423
+ "</p></div><button type=\"button\" class=\"btn btn-primary\">+ <!--$-->",
424
+ "<!--/--></button></div>"
425
+ ];
426
+ var _tmpl$30 = [
427
+ "<div",
428
+ " class=\"acf-list-toolbar\"><label><!--$-->",
429
+ "<!--/--><select class=\"input\"",
430
+ "><option value>",
431
+ "</option><!--$-->",
432
+ "<!--/--></select></label><input class=\"input\"",
433
+ "></div>"
434
+ ];
435
+ var _tmpl$31 = [
436
+ "<div",
437
+ " class=\"acf-groups-table\"><div class=\"acf-groups-table__head\"><span>",
438
+ "</span><span>",
439
+ "</span><span>",
440
+ "</span><span>",
441
+ "</span><span></span></div><!--$-->",
442
+ "<!--/--></div>"
443
+ ];
444
+ var _tmpl$32 = [
445
+ "<section",
446
+ " class=\"card acf-groups-card\">",
447
+ "</section>"
448
+ ];
449
+ var _tmpl$33 = [
450
+ "<section",
451
+ " class=\"card standard-fields-card\"><div class=\"section-heading\"><div><h4>",
452
+ "</h4><p class=\"muted\">",
453
+ "</p></div></div><div class=\"standard-fields-list\">",
454
+ "</div></section>"
455
+ ];
456
+ var _tmpl$34 = [
457
+ "<div",
458
+ " class=\"custom-fields-manager\"><!--$-->",
459
+ "<!--/--><!--$-->",
460
+ "<!--/--><!--$-->",
461
+ "<!--/--></div>"
462
+ ];
463
+ var _tmpl$35 = [
464
+ "<p",
465
+ " class=\"muted\">",
466
+ "</p>"
467
+ ];
468
+ var _tmpl$36 = [
469
+ "<form",
470
+ " class=\"acf-builder\"><div class=\"acf-builder-header\"><div><button type=\"button\" class=\"btn btn-secondary\">← <!--$-->",
471
+ "<!--/--></button><span class=\"acf-eyebrow\">",
472
+ "</span><h3>",
473
+ "</h3></div><div class=\"editor-actions\"><button type=\"button\" class=\"btn btn-secondary\">",
474
+ "</button><button type=\"submit\" class=\"btn btn-primary\"",
475
+ ">",
476
+ "</button></div></div><section class=\"card acf-group-identity\"><label><!--$-->",
477
+ "<!--/--><input class=\"input acf-group-title\" required",
478
+ "></label><p class=\"muted\">",
479
+ "</p></section><section class=\"card acf-builder-section\"><div class=\"acf-section-header\"><div><h4>",
480
+ "</h4><p class=\"muted\">",
481
+ "</p></div><button type=\"button\" class=\"btn btn-primary\">",
482
+ "</button></div><!--$-->",
483
+ "<!--/--></section><section class=\"card acf-builder-section\"><div class=\"acf-section-header\"><div><h4>",
484
+ "</h4><p class=\"muted\">",
485
+ "</p></div><button type=\"button\" class=\"btn btn-secondary\">+ <!--$-->",
486
+ "<!--/--></button></div><div class=\"acf-assignment\"><label><!--$-->",
487
+ "<!--/--><select class=\"input\"",
488
+ ">",
489
+ "</select></label></div><!--$-->",
490
+ "<!--/--></section><section class=\"card acf-builder-section\"><div class=\"acf-section-header\"><div><h4>",
491
+ "</h4><p class=\"muted\">",
492
+ "</p></div></div><div class=\"acf-settings-grid\"><label class=\"acf-settings-wide\"><!--$-->",
493
+ "<!--/--><textarea class=\"input\" rows=\"3\"",
494
+ "></textarea></label><label><!--$-->",
495
+ "<!--/--><select class=\"input\"",
496
+ "><option value=\"normal\">",
497
+ "</option><option value=\"side\">",
498
+ "</option><option value=\"acf_after_title\">",
499
+ "</option></select></label><label><!--$-->",
500
+ "<!--/--><select class=\"input\"",
501
+ "><option value=\"standard\">",
502
+ "</option><option value=\"seamless\">",
503
+ "</option><option value=\"grouped\">",
504
+ "</option></select></label><label><!--$-->",
505
+ "<!--/--><select class=\"input\"",
506
+ "><option value=\"top\">",
507
+ "</option><option value=\"left\">",
508
+ "</option></select></label><label><!--$-->",
509
+ "<!--/--><select class=\"input\"",
510
+ "><option value=\"above\">",
511
+ "</option><option value=\"below\">",
512
+ "</option></select></label><label><!--$-->",
513
+ "<!--/--><input class=\"input\" type=\"number\"",
514
+ "></label><label class=\"checkbox-label\"><input type=\"checkbox\"",
515
+ "> <!--$-->",
516
+ "<!--/--></label></div><div class=\"acf-hide-on-screen\"><strong>",
517
+ "</strong><!--$-->",
518
+ "<!--/--></div></section></form>"
519
+ ];
520
+ var _tmpl$37 = [
521
+ "<div",
522
+ " class=\"acf-empty-fields\">",
523
+ "</div>"
524
+ ];
525
+ var _tmpl$38 = [
526
+ "<option",
527
+ "><!--$-->",
528
+ "<!--/--> (<!--$-->",
529
+ "<!--/-->)</option>"
530
+ ];
531
+ var _tmpl$39 = [
532
+ "<div",
533
+ " class=\"rule-connector\">",
534
+ "</div>"
535
+ ];
536
+ var _tmpl$40 = [
537
+ "<div",
538
+ " class=\"location-rule-group\"><!--$-->",
539
+ "<!--/--><!--$-->",
540
+ "<!--/--><button type=\"button\" class=\"btn btn-secondary btn-sm\">+ <!--$-->",
541
+ "<!--/--></button></div>"
542
+ ];
543
+ var _tmpl$41 = [
544
+ "<select",
545
+ " class=\"input\" required",
546
+ "><option value>",
547
+ "</option><!--$-->",
548
+ "<!--/--></select>"
549
+ ];
550
+ var _tmpl$42 = [
551
+ "<div",
552
+ " class=\"location-rule-row\"><select class=\"input\"",
553
+ ">",
554
+ "</select><select class=\"input\"",
555
+ "><option value=\"eq\">",
556
+ "</option><option value=\"neq\">",
557
+ "</option></select><!--$-->",
558
+ "<!--/--><button type=\"button\" class=\"btn btn-danger btn-sm\">",
559
+ "</button></div>"
560
+ ];
561
+ var _tmpl$43 = [
562
+ "<input",
563
+ " class=\"input\" required",
564
+ ">"
565
+ ];
566
+ var _tmpl$44 = [
567
+ "<label",
568
+ " class=\"checkbox-label\"><input type=\"checkbox\"",
569
+ "> <!--$-->",
570
+ "<!--/--></label>"
571
+ ];
572
+ var _tmpl$45 = [
573
+ "<div",
574
+ " class=\"acf-empty-groups\"><div class=\"acf-empty-icon\">✣</div><h4>",
575
+ "</h4><p class=\"muted\">",
576
+ "</p><button type=\"button\" class=\"btn btn-primary\">",
577
+ "</button></div>"
578
+ ];
579
+ var _tmpl$46 = [
580
+ "<small",
581
+ ">",
582
+ "</small>"
583
+ ];
584
+ var _tmpl$47 = [
585
+ "<div",
586
+ " class=\"acf-group-list-row\"><div><strong>",
587
+ "</strong><small>",
588
+ "</small><!--$-->",
589
+ "<!--/--></div><span>",
590
+ "</span><span>",
591
+ "</span><span class=\"",
592
+ "\">",
593
+ "</span><div class=\"acf-group-actions\"><button type=\"button\" class=\"btn btn-secondary btn-sm\">",
594
+ "</button><button type=\"button\" class=\"btn btn-danger btn-sm\">",
595
+ "</button></div></div>"
596
+ ];
597
+ var _tmpl$48 = [
598
+ "<span",
599
+ " class=\"badge badge-secondary\">",
600
+ "</span>"
601
+ ];
602
+ var _tmpl$49 = [
603
+ "<label",
604
+ " class=\"standard-field-row\"><span><strong>",
605
+ "</strong><small><!--$-->",
606
+ "<!--/--> · <!--$-->",
607
+ "<!--/--></small></span><span class=\"standard-field-control\">",
608
+ "</span></label>"
609
+ ];
610
+ var _tmpl$50 = [
611
+ "<input",
612
+ " type=\"checkbox\"",
613
+ ">"
614
+ ];
615
+ var STANDARD_FIELD_KEYS = [
616
+ "title",
617
+ "slug",
618
+ "content",
619
+ "excerpt",
620
+ "featured_image",
621
+ "seo_title",
622
+ "seo_description",
623
+ "status",
624
+ "author"
625
+ ];
626
+ var LOCATION_PARAMS = [
627
+ "content_type",
628
+ "content_slug",
629
+ "taxonomy",
630
+ "term",
631
+ "user_role",
632
+ "page_template",
633
+ "post_status"
634
+ ];
635
+ var CONTAINER_TYPES = /* @__PURE__ */ new Set(["group", "repeater"]);
636
+ var CHOICE_TYPES = /* @__PURE__ */ new Set([
637
+ "select",
638
+ "checkbox",
639
+ "radio"
640
+ ]);
641
+ var MEDIA_TYPES = /* @__PURE__ */ new Set([
642
+ "image",
643
+ "file",
644
+ "gallery"
645
+ ]);
646
+ var RELATION_TYPES = /* @__PURE__ */ new Set([
647
+ "post_object",
648
+ "relationship",
649
+ "page_link",
650
+ "taxonomy",
651
+ "user"
652
+ ]);
653
+ function updateFieldInList(fields, id, patch) {
654
+ return fields.map((field) => {
655
+ if (field.clientId === id) return {
656
+ ...field,
657
+ ...patch
658
+ };
659
+ return {
660
+ ...field,
661
+ subFields: updateFieldInList(field.subFields, id, patch),
662
+ layouts: field.layouts.map((layout) => ({
663
+ ...layout,
664
+ subFields: updateFieldInList(layout.subFields, id, patch)
665
+ }))
666
+ };
667
+ });
668
+ }
669
+ function readConditional(value) {
670
+ if (!value || typeof value !== "object") return {
671
+ match: "ANY",
672
+ groups: [{
673
+ match: "ALL",
674
+ rules: []
675
+ }]
676
+ };
677
+ const raw = value;
678
+ const groups = Array.isArray(raw["groups"]) ? raw["groups"].filter(Boolean).map((group) => {
679
+ const item = group;
680
+ const rules = Array.isArray(item["rules"]) ? item["rules"].filter(Boolean).map((rule) => {
681
+ const entry = rule;
682
+ return {
683
+ field: String(entry["field"] ?? ""),
684
+ operator: String(entry["operator"] ?? "eq"),
685
+ value: entry["value"] === void 0 ? void 0 : String(entry["value"])
686
+ };
687
+ }) : [];
688
+ return {
689
+ match: item["match"] === "ANY" ? "ANY" : "ALL",
690
+ rules
691
+ };
692
+ }) : [];
693
+ return {
694
+ match: raw["match"] === "ALL" ? "ALL" : "ANY",
695
+ groups: groups.length > 0 ? groups : [{
696
+ match: "ALL",
697
+ rules: []
698
+ }]
699
+ };
700
+ }
701
+ function fieldTypeLabel(field, types) {
702
+ return types.find((type) => type.type === field.type)?.label ?? field.type;
703
+ }
704
+ function textChoices(value) {
705
+ if (!Array.isArray(value)) return "";
706
+ return value.map((choice) => {
707
+ if (!choice || typeof choice !== "object") return String(choice);
708
+ const row = choice;
709
+ return `${String(row["value"] ?? "")}|${String(row["label"] ?? row["value"] ?? "")}`;
710
+ }).join("\n");
711
+ }
712
+ function ConditionalLogicEditor(props) {
713
+ const logic = () => readConditional(props.value);
714
+ return ssr(_tmpl$2, ssrHydrationKey(), escape(props.t("settings.customFields.fieldSettings.conditionalLogic")), escape(props.t("settings.customFields.fieldSettings.conditionalHint")), escape(createComponent(For, {
715
+ get each() {
716
+ return logic().groups;
717
+ },
718
+ children: (group, groupIndex) => ssr(_tmpl$3, ssrHydrationKey(), escape(createComponent(For, {
719
+ get each() {
720
+ return group.rules;
721
+ },
722
+ children: (rule, ruleIndex) => ssr(_tmpl$5, ssrHydrationKey(), ssrAttribute("value", escape(rule.field, true), false), escape(props.t("settings.customFields.fieldSettings.chooseField")), escape(createComponent(For, {
723
+ get each() {
724
+ return props.fields;
725
+ },
726
+ children: (field) => ssr(_tmpl$6, ssrHydrationKey() + ssrAttribute("value", escape(field.value, true), false), escape(field.label))
727
+ })), ssrAttribute("value", escape(rule.operator, true), false), escape(props.t("settings.customFields.fieldSettings.operators.eq")), escape(props.t("settings.customFields.fieldSettings.operators.neq")), escape(props.t("settings.customFields.fieldSettings.operators.gt")), escape(props.t("settings.customFields.fieldSettings.operators.lt")), escape(props.t("settings.customFields.fieldSettings.operators.contains")), escape(props.t("settings.customFields.fieldSettings.operators.hasAny")), escape(props.t("settings.customFields.fieldSettings.operators.hasNone")), escape(createComponent(Show, {
728
+ get when() {
729
+ return !["has_any_value", "has_no_value"].includes(rule.operator);
730
+ },
731
+ get children() {
732
+ return ssr(_tmpl$4, ssrHydrationKey(), ssrAttribute("value", escape(rule.value ?? "", true), false) + ssrAttribute("placeholder", escape(props.t("settings.customFields.fieldSettings.conditionValue"), true), false));
733
+ }
734
+ })))
735
+ })), escape(props.t("settings.customFields.fieldSettings.addCondition")))
736
+ })), escape(props.t("settings.customFields.fieldSettings.addConditionGroup")), escape(createComponent(Show, {
737
+ get when() {
738
+ return logic().groups.some((group) => group.rules.length > 1);
739
+ },
740
+ get children() {
741
+ return ssr(_tmpl$, ssrHydrationKey(), escape(props.t("settings.customFields.fieldSettings.conditionsAnd")));
742
+ }
743
+ })));
744
+ }
745
+ function FieldSettings(props) {
746
+ const config = (key, fallback = "") => String(props.field.config[key] ?? fallback);
747
+ const bool = (key, fallback = false) => props.field.config[key] === void 0 ? fallback : props.field.config[key] === true;
748
+ const label = (key) => props.t(`settings.customFields.fieldSettings.${key}`);
749
+ const type = () => props.field.type;
750
+ return ssr(_tmpl$20, ssrHydrationKey(), escape(label("general")), escape(label("fieldLabel")), ssrAttribute("value", escape(props.field.label, true), false), escape(label("fieldName")), ssrAttribute("value", escape(props.field.name, true), false), escape(label("instructions")), ssrAttribute("value", escape(props.field.instructions ?? "", true), false), ssrAttribute("checked", props.field.required, true), escape(label("required")), escape(label("defaultValue")), ssrAttribute("value", escape(config("defaultValue"), true), false), escape(label("placeholder")), ssrAttribute("value", escape(config("placeholder"), true), false), escape(label("presentation")), escape(label("wrapperWidth")), ssrAttribute("value", escape(config("wrapperWidth"), true), false), escape(label("labelPlacement")), ssrAttribute("value", escape(config("labelPlacement", "top"), true), false), escape(label("top")), escape(label("left")), escape(label("instructionPlacement")), ssrAttribute("value", escape(config("instructionPlacement", "below"), true), false), escape(label("above")), escape(label("below")), escape(createComponent(Show, {
751
+ get when() {
752
+ return [
753
+ "text",
754
+ "textarea",
755
+ "email",
756
+ "url",
757
+ "password"
758
+ ].includes(type());
759
+ },
760
+ get children() {
761
+ return ssr(_tmpl$9, ssrHydrationKey(), escape(label("textSettings")), escape(label("prepend")), ssrAttribute("value", escape(config("prepend"), true), false), escape(label("append")), ssrAttribute("value", escape(config("append"), true), false), escape(label("minLength")), ssrAttribute("value", escape(config("minLength"), true), false), escape(label("maxLength")), ssrAttribute("value", escape(config("maxLength"), true), false), escape(createComponent(Show, {
762
+ get when() {
763
+ return type() === "textarea";
764
+ },
765
+ get children() {
766
+ return [ssr(_tmpl$7, ssrHydrationKey(), escape(label("rows")), ssrAttribute("value", escape(config("rows", "4"), true), false)), ssr(_tmpl$8, ssrHydrationKey(), escape(label("newLines")), ssrAttribute("value", escape(config("newLines", "br"), true), false), escape(label("wpautop")), escape(label("none")))];
767
+ }
768
+ })));
769
+ }
770
+ })), escape(createComponent(Show, {
771
+ get when() {
772
+ return ["number", "range"].includes(type());
773
+ },
774
+ get children() {
775
+ return ssr(_tmpl$0, ssrHydrationKey(), escape(label("numberSettings")), escape(label("min")), ssrAttribute("value", escape(config("min"), true), false), escape(label("max")), ssrAttribute("value", escape(config("max"), true), false), escape(label("step")), ssrAttribute("value", escape(config("step", "1"), true), false));
776
+ }
777
+ })), escape(createComponent(Show, {
778
+ get when() {
779
+ return CHOICE_TYPES.has(type());
780
+ },
781
+ get children() {
782
+ return ssr(_tmpl$1, ssrHydrationKey(), escape(label("choiceSettings")), escape(label("choices")), ssrAttribute("value", escape(textChoices(props.field.config["choices"] ?? props.field.config["options"]), true), false), escape(label("layout")), ssrAttribute("value", escape(config("layout", "vertical"), true), false), escape(label("vertical")), escape(label("horizontal")), ssrAttribute("checked", bool("multiple"), true), escape(label("multiple")), ssrAttribute("checked", bool("allowNull"), true), escape(label("allowNull")));
783
+ }
784
+ })), escape(createComponent(Show, {
785
+ get when() {
786
+ return MEDIA_TYPES.has(type());
787
+ },
788
+ get children() {
789
+ return ssr(_tmpl$10, ssrHydrationKey(), escape(label("mediaSettings")), escape(label("returnFormat")), ssrAttribute("value", escape(config("returnFormat", type() === "gallery" ? "array" : "array"), true), false), escape(label("array")), escape(label("id")), escape(label("previewSize")), ssrAttribute("value", escape(config("previewSize", "medium"), true), false), escape(label("library")), ssrAttribute("value", escape(config("library", "all"), true), false), escape(label("all")), escape(label("uploadedToPost")), escape(label("allowedTypes")), ssrAttribute("value", escape(config("mimeTypes"), true), false), escape(label("minWidth")), ssrAttribute("value", escape(config("minWidth"), true), false), escape(label("maxWidth")), ssrAttribute("value", escape(config("maxWidth"), true), false), escape(label("minHeight")), ssrAttribute("value", escape(config("minHeight"), true), false), escape(label("maxHeight")), ssrAttribute("value", escape(config("maxHeight"), true), false));
790
+ }
791
+ })), escape(createComponent(Show, {
792
+ get when() {
793
+ return type() === "wysiwyg";
794
+ },
795
+ get children() {
796
+ return ssr(_tmpl$11, ssrHydrationKey(), escape(label("wysiwygSettings")), escape(label("tabs")), ssrAttribute("value", escape(config("tabs", "all"), true), false), escape(label("all")), escape(label("toolbar")), ssrAttribute("value", escape(config("toolbar", "full"), true), false), ssrAttribute("checked", bool("mediaUpload", true), true), escape(label("mediaUpload")));
797
+ }
798
+ })), escape(createComponent(Show, {
799
+ get when() {
800
+ return [
801
+ "date_picker",
802
+ "date_time_picker",
803
+ "time_picker"
804
+ ].includes(type());
805
+ },
806
+ get children() {
807
+ return ssr(_tmpl$12, ssrHydrationKey(), escape(label("dateSettings")), escape(label("displayFormat")), ssrAttribute("value", escape(config("displayFormat", type() === "time_picker" ? "H:i" : "d/m/Y"), true), false), escape(label("returnFormat")), ssrAttribute("value", escape(config("returnFormat", "Y-m-d"), true), false), escape(label("firstDay")), ssrAttribute("value", escape(config("firstDay", "1"), true), false));
808
+ }
809
+ })), escape(createComponent(Show, {
810
+ get when() {
811
+ return type() === "color_picker";
812
+ },
813
+ get children() {
814
+ return ssr(_tmpl$13, ssrHydrationKey(), escape(label("colorSettings")), ssrAttribute("checked", bool("enableOpacity"), true), escape(label("enableOpacity")));
815
+ }
816
+ })), escape(createComponent(Show, {
817
+ get when() {
818
+ return type() === "google_map";
819
+ },
820
+ get children() {
821
+ return ssr(_tmpl$14, ssrHydrationKey(), escape(label("mapSettings")), escape(label("center")), ssrAttribute("value", escape(config("center"), true), false), escape(label("zoom")), ssrAttribute("value", escape(config("zoom", "14"), true), false), escape(label("height")), ssrAttribute("value", escape(config("height", "400"), true), false));
822
+ }
823
+ })), escape(createComponent(Show, {
824
+ get when() {
825
+ return RELATION_TYPES.has(type());
826
+ },
827
+ get children() {
828
+ return ssr(_tmpl$15, ssrHydrationKey(), escape(label("relationSettings")), escape(label("postType")), ssrAttribute("value", escape(config("postType"), true), false), escape(label("taxonomy")), ssrAttribute("value", escape(config("taxonomy"), true), false), escape(label("returnFormat")), ssrAttribute("value", escape(config("returnFormat", "id"), true), false), ssrAttribute("checked", bool("multiple", type() !== "page_link"), true), escape(label("multiple")), ssrAttribute("checked", bool("allowNull", true), true), escape(label("allowNull")));
829
+ }
830
+ })), escape(createComponent(Show, {
831
+ get when() {
832
+ return type() === "true_false";
833
+ },
834
+ get children() {
835
+ return ssr(_tmpl$16, ssrHydrationKey(), escape(label("booleanSettings")), escape(label("message")), ssrAttribute("value", escape(config("message"), true), false), ssrAttribute("checked", bool("defaultValue"), true), escape(label("defaultChecked")));
836
+ }
837
+ })), escape(createComponent(Show, {
838
+ get when() {
839
+ return type() === "link";
840
+ },
841
+ get children() {
842
+ return ssr(_tmpl$17, ssrHydrationKey(), escape(label("linkSettings")), escape(label("returnFormat")), ssrAttribute("value", escape(config("returnFormat", "array"), true), false));
843
+ }
844
+ })), escape(createComponent(Show, {
845
+ get when() {
846
+ return type() === "clone";
847
+ },
848
+ get children() {
849
+ return ssr(_tmpl$18, ssrHydrationKey(), escape(label("cloneSettings")), escape(label("cloneFields")), ssrAttribute("value", Array.isArray(props.field.config["clone"]) ? escape(props.field.config["clone"].join("\n"), true) : "", false) + ssrAttribute("placeholder", escape(label("cloneHint"), true), false));
850
+ }
851
+ })), escape(createComponent(Show, {
852
+ get when() {
853
+ return CONTAINER_TYPES.has(type());
854
+ },
855
+ get children() {
856
+ return ssr(_tmpl$19, ssrHydrationKey(), escape(label("containerSettings")), escape(label("layout")), ssrAttribute("value", escape(config("layout", "block"), true), false), escape(label("min")), ssrAttribute("value", escape(config("min"), true), false), escape(label("max")), ssrAttribute("value", escape(config("max"), true), false), escape(label("buttonLabel")), ssrAttribute("value", escape(config("buttonLabel", "Add Row"), true), false), escape(label("collapsed")), ssrAttribute("value", escape(config("collapsed"), true), false));
857
+ }
858
+ })), escape(createComponent(ConditionalLogicEditor, {
859
+ get value() {
860
+ return props.field.conditionalLogic;
861
+ },
862
+ get fields() {
863
+ return props.fields.filter((field) => field.value !== props.field.name);
864
+ },
865
+ onChange: (value) => props.onChange({ conditionalLogic: value }),
866
+ get t() {
867
+ return props.t;
868
+ }
869
+ })));
870
+ }
871
+ function FieldListEditor(props) {
872
+ const [draggingId, setDraggingId] = createSignal(null);
873
+ const patchField = (id, patch) => props.onChange(updateFieldInList(props.fields, id, patch));
874
+ return ssr(_tmpl$21, ssrHydrationKey(), ssrAttribute("data-depth", escape(props.depth, true), false), escape(createComponent(For, {
875
+ get each() {
876
+ return props.fields;
877
+ },
878
+ children: (field, index) => ssr(_tmpl$24, ssrHydrationKey(), `acf-field-row ${props.expandedId() === field.clientId ? "is-expanded" : ""} ${draggingId() === field.clientId ? "is-dragging" : ""}`, ssrAttribute("title", escape(props.t("settings.customFields.form.dragHint"), true), false), escape(index()) + 1, escape(field.label || props.t("settings.customFields.form.newFieldDefault")), escape(field.name), escape(fieldTypeLabel(field, props.types)), props.expandedId() === field.clientId ? "▴" : "▾", escape(props.t("settings.customFields.form.removeField")), escape(createComponent(Show, {
879
+ get when() {
880
+ return props.expandedId() === field.clientId;
881
+ },
882
+ get children() {
883
+ return ssr(_tmpl$23, ssrHydrationKey(), escape(props.t("settings.customFields.form.fieldType")), escape(createComponent(FieldTypePicker, {
884
+ get categories() {
885
+ return props.categories;
886
+ },
887
+ get types() {
888
+ return props.types;
889
+ },
890
+ get value() {
891
+ return field.type;
892
+ },
893
+ onChange: (type) => patchField(field.clientId, { type })
894
+ })), escape(createComponent(FieldSettings, {
895
+ field,
896
+ get fields() {
897
+ return props.options;
898
+ },
899
+ get fieldTypes() {
900
+ return props.types;
901
+ },
902
+ get categories() {
903
+ return props.categories;
904
+ },
905
+ onChange: (patch) => patchField(field.clientId, patch),
906
+ get t() {
907
+ return props.t;
908
+ }
909
+ })), escape(createComponent(Show, {
910
+ get when() {
911
+ return CONTAINER_TYPES.has(field.type);
912
+ },
913
+ get children() {
914
+ return ssr(_tmpl$22, ssrHydrationKey(), escape(props.t("settings.customFields.fieldSettings.subFields")), escape(props.t("settings.customFields.form.addField")), escape(createComponent(FieldListEditor, {
915
+ get fields() {
916
+ return field.subFields;
917
+ },
918
+ get types() {
919
+ return props.types;
920
+ },
921
+ get categories() {
922
+ return props.categories;
923
+ },
924
+ get options() {
925
+ return props.options;
926
+ },
927
+ get depth() {
928
+ return props.depth + 1;
929
+ },
930
+ get t() {
931
+ return props.t;
932
+ },
933
+ onChange: (subFields) => patchField(field.clientId, { subFields }),
934
+ get expandedId() {
935
+ return props.expandedId;
936
+ },
937
+ get setExpandedId() {
938
+ return props.setExpandedId;
939
+ }
940
+ })));
941
+ }
942
+ })), escape(createComponent(Show, {
943
+ get when() {
944
+ return field.type === "flexible_content";
945
+ },
946
+ get children() {
947
+ return createComponent(FlexibleLayoutsEditor, {
948
+ field,
949
+ get types() {
950
+ return props.types;
951
+ },
952
+ get categories() {
953
+ return props.categories;
954
+ },
955
+ get options() {
956
+ return props.options;
957
+ },
958
+ get t() {
959
+ return props.t;
960
+ },
961
+ onChange: (patch) => patchField(field.clientId, patch),
962
+ get expandedId() {
963
+ return props.expandedId;
964
+ },
965
+ get setExpandedId() {
966
+ return props.setExpandedId;
967
+ }
968
+ });
969
+ }
970
+ })));
971
+ }
972
+ })))
973
+ })));
974
+ }
975
+ function FlexibleLayoutsEditor(props) {
976
+ const layouts = () => props.field.layouts;
977
+ const updateLayout = (id, patch) => props.onChange({ layouts: layouts().map((layout) => layout.clientId === id ? {
978
+ ...layout,
979
+ ...patch
980
+ } : layout) });
981
+ return ssr(_tmpl$25, ssrHydrationKey(), escape(props.t("settings.customFields.fieldSettings.layouts")), escape(props.t("settings.customFields.fieldSettings.addLayout")), escape(createComponent(For, {
982
+ get each() {
983
+ return layouts();
984
+ },
985
+ children: (layout, index) => ssr(_tmpl$26, ssrHydrationKey(), escape(props.t("settings.customFields.fieldSettings.layoutName")), ssrAttribute("value", escape(layout.name, true), false), escape(props.t("settings.customFields.fieldSettings.layoutLabel")), ssrAttribute("value", escape(layout.label, true), false), escape(props.t("settings.customFields.fieldSettings.layoutDisplay")), ssrAttribute("value", escape(layout.display ?? "block", true), false), escape(props.t("settings.customFields.form.removeField")), escape(props.t("settings.customFields.fieldSettings.subFields")), escape(index()) + 1, escape(props.t("settings.customFields.form.addField")), escape(createComponent(FieldListEditor, {
986
+ get fields() {
987
+ return layout.subFields;
988
+ },
989
+ get types() {
990
+ return props.types;
991
+ },
992
+ get categories() {
993
+ return props.categories;
994
+ },
995
+ get options() {
996
+ return props.options;
997
+ },
998
+ depth: 2,
999
+ get t() {
1000
+ return props.t;
1001
+ },
1002
+ onChange: (subFields) => updateLayout(layout.clientId, { subFields }),
1003
+ get expandedId() {
1004
+ return props.expandedId;
1005
+ },
1006
+ get setExpandedId() {
1007
+ return props.setExpandedId;
1008
+ }
1009
+ })))
1010
+ })));
1011
+ }
1012
+ function CustomFieldsManager() {
1013
+ const { t } = useTranslation();
1014
+ const [contentTypes, setContentTypes] = createSignal([]);
1015
+ const [taxonomies, setTaxonomies] = createSignal([]);
1016
+ const [groups, setGroups] = createSignal([]);
1017
+ const [fieldTypes, setFieldTypes] = createSignal([]);
1018
+ const [categories, setCategories] = createSignal([]);
1019
+ const [selectedType, setSelectedType] = createSignal("");
1020
+ const [search, setSearch] = createSignal("");
1021
+ const [draft, setDraft] = createSignal(null);
1022
+ const [expandedFieldId, setExpandedFieldId] = createSignal(null);
1023
+ const [loading, setLoading] = createSignal(true);
1024
+ const [saving, setSaving] = createSignal(false);
1025
+ const [error, setError] = createSignal("");
1026
+ const [notice, setNotice] = createSignal("");
1027
+ const selectedContentType = createMemo(() => contentTypes().find((type) => type.slug === selectedType()));
1028
+ const coreGroup = createMemo(() => groups().find((group) => group.key === `core-fields-${selectedType()}`));
1029
+ const groupContentTypes = (group) => [...new Set((group.locationRules ?? []).flat().filter((rule) => rule.param === "content_type" && rule.operator === "eq" && rule.value).map((rule) => rule.value))];
1030
+ const customGroups = createMemo(() => groups().filter((group) => {
1031
+ if (group.key.startsWith("core-fields-")) return false;
1032
+ const targets = groupContentTypes(group);
1033
+ return (!selectedType() || targets.length === 0 || targets.includes(selectedType())) && (!search().trim() || group.title.toLowerCase().includes(search().trim().toLowerCase()) || group.key.toLowerCase().includes(search().trim().toLowerCase()));
1034
+ }));
1035
+ const standardFields = createMemo(() => STANDARD_FIELD_KEYS.map((key) => ({
1036
+ key,
1037
+ label: t(`settings.customFields.standard.fields.${key}`),
1038
+ type: coreGroup()?.fields.find((field) => field.coreFieldKey === key || field.name === key)?.type ?? "text",
1039
+ locked: key === "title" || key === "slug" || Boolean(coreGroup()?.fields.find((field) => field.coreFieldKey === key)?.isLocked)
1040
+ })));
1041
+ const enabledStandardFields = createMemo(() => new Set(selectedContentType()?.defaultFields?.length ? selectedContentType().defaultFields : STANDARD_FIELD_KEYS));
1042
+ const fieldOptions = createMemo(() => {
1043
+ const result = [];
1044
+ const walk = (fields) => fields.forEach((field) => {
1045
+ result.push({
1046
+ value: field.name,
1047
+ label: `${field.label || field.name} (${field.name})`
1048
+ });
1049
+ walk(field.subFields);
1050
+ field.layouts.forEach((layout) => walk(layout.subFields));
1051
+ });
1052
+ if (draft()) walk(draft().fields);
1053
+ return result;
1054
+ });
1055
+ const load = async () => {
1056
+ setLoading(true);
1057
+ setError("");
1058
+ try {
1059
+ const [types, taxonomyList, catalog, summaries] = await Promise.all([
1060
+ apiClient.getContentTypes(),
1061
+ apiClient.getTaxonomies(),
1062
+ apiClient.getFieldTypes(),
1063
+ apiClient.getFieldGroups()
1064
+ ]);
1065
+ const details = await Promise.all(summaries.map((summary) => apiClient.getFieldGroup(summary.id)));
1066
+ setContentTypes(types);
1067
+ setTaxonomies(taxonomyList);
1068
+ setFieldTypes(catalog.types);
1069
+ setCategories(catalog.categories);
1070
+ setGroups(details);
1071
+ if (!selectedType() && types[0]) setSelectedType(types[0].slug);
1072
+ } catch (err) {
1073
+ setError(err instanceof Error ? err.message : t("settings.customFields.loadError"));
1074
+ } finally {
1075
+ setLoading(false);
1076
+ }
1077
+ };
1078
+ onMount(load);
1079
+ const locationValueOptions = (param) => {
1080
+ if (param === "content_type") return contentTypes().map((type) => ({
1081
+ value: type.slug,
1082
+ label: `${type.pluralLabel} (${type.slug})`
1083
+ }));
1084
+ if (param === "taxonomy") return taxonomies().map((taxonomy) => ({
1085
+ value: taxonomy.slug,
1086
+ label: `${taxonomy.name} (${taxonomy.slug})`
1087
+ }));
1088
+ if (param === "post_status") return [
1089
+ "DRAFT",
1090
+ "PUBLISHED",
1091
+ "ARCHIVED",
1092
+ "TRASHED"
1093
+ ].map((status) => ({
1094
+ value: status,
1095
+ label: status
1096
+ }));
1097
+ return [];
1098
+ };
1099
+ const updateDraft = (patch) => {
1100
+ const current = draft();
1101
+ if (current) setDraft({
1102
+ ...current,
1103
+ ...patch
1104
+ });
1105
+ };
1106
+ const draftContentType = (rules) => rules.flat().find((rule) => rule.param === "content_type" && rule.operator === "eq")?.value ?? selectedType();
1107
+ const locationSummary = (group) => {
1108
+ const targets = groupContentTypes(group);
1109
+ return targets.length === 0 ? t("settings.customFields.groups.allContentTypes") : targets.map((slug) => contentTypes().find((type) => type.slug === slug)?.pluralLabel ?? slug).join(", ");
1110
+ };
1111
+ return ssr(_tmpl$34, ssrHydrationKey(), escape(createComponent(Show, {
1112
+ get when() {
1113
+ return error();
1114
+ },
1115
+ get children() {
1116
+ return ssr(_tmpl$27, ssrHydrationKey(), escape(error()));
1117
+ }
1118
+ })), escape(createComponent(Show, {
1119
+ get when() {
1120
+ return notice();
1121
+ },
1122
+ get children() {
1123
+ return ssr(_tmpl$28, ssrHydrationKey(), escape(notice()));
1124
+ }
1125
+ })), escape(createComponent(Show, {
1126
+ get when() {
1127
+ return !loading();
1128
+ },
1129
+ get fallback() {
1130
+ return ssr(_tmpl$35, ssrHydrationKey(), escape(t("settings.customFields.loading")));
1131
+ },
1132
+ get children() {
1133
+ return createComponent(Show, {
1134
+ get when() {
1135
+ return !draft();
1136
+ },
1137
+ get fallback() {
1138
+ return ssr(_tmpl$36, ssrHydrationKey(), escape(t("settings.customFields.form.backToGroups")), escape(t("settings.customFields.form.editorEyebrow")), draft().id ? escape(t("settings.customFields.form.editTitle")) : escape(t("settings.customFields.form.createTitle")), escape(t("settings.customFields.form.cancel")), ssrAttribute("disabled", saving(), true), saving() ? escape(t("common.loading")) : escape(t("settings.customFields.form.save")), escape(t("settings.customFields.form.title")), ssrAttribute("value", escape(draft().title, true), false) + ssrAttribute("placeholder", escape(t("settings.customFields.form.titlePlaceholder"), true), false), escape(t("settings.customFields.form.groupTitleHint")), escape(t("settings.customFields.form.fieldsTitle")), escape(t("settings.customFields.form.fieldsDescription")), escape(t("settings.customFields.form.addField")), escape(createComponent(Show, {
1139
+ get when() {
1140
+ return draft().fields.length > 0;
1141
+ },
1142
+ get fallback() {
1143
+ return ssr(_tmpl$37, ssrHydrationKey(), escape(t("settings.customFields.form.noFields")));
1144
+ },
1145
+ get children() {
1146
+ return createComponent(FieldListEditor, {
1147
+ get fields() {
1148
+ return draft().fields;
1149
+ },
1150
+ get types() {
1151
+ return fieldTypes();
1152
+ },
1153
+ get categories() {
1154
+ return categories();
1155
+ },
1156
+ get options() {
1157
+ return fieldOptions();
1158
+ },
1159
+ depth: 0,
1160
+ t,
1161
+ onChange: (fields) => updateDraft({ fields }),
1162
+ expandedId: expandedFieldId,
1163
+ setExpandedId: setExpandedFieldId
1164
+ });
1165
+ }
1166
+ })), escape(t("settings.customFields.location.title")), escape(t("settings.customFields.location.description")), escape(t("settings.customFields.location.addGroup")), escape(t("settings.customFields.form.contentType")), ssrAttribute("value", escape(draftContentType(draft().locationRules), true), false), escape(createComponent(For, {
1167
+ get each() {
1168
+ return contentTypes();
1169
+ },
1170
+ children: (type) => ssr(_tmpl$38, ssrHydrationKey() + ssrAttribute("value", escape(type.slug, true), false), escape(type.pluralLabel), escape(type.slug))
1171
+ })), escape(createComponent(For, {
1172
+ get each() {
1173
+ return draft().locationRules;
1174
+ },
1175
+ children: (ruleGroup, groupIndex) => ssr(_tmpl$40, ssrHydrationKey(), escape(createComponent(Show, {
1176
+ get when() {
1177
+ return groupIndex() > 0;
1178
+ },
1179
+ get children() {
1180
+ return ssr(_tmpl$39, ssrHydrationKey(), escape(t("settings.customFields.location.or")));
1181
+ }
1182
+ })), escape(createComponent(For, {
1183
+ each: ruleGroup,
1184
+ children: (rule, ruleIndex) => ssr(_tmpl$42, ssrHydrationKey(), ssrAttribute("value", escape(rule.param, true), false), escape(LOCATION_PARAMS.map((param) => ssr(_tmpl$6, ssrHydrationKey() + ssrAttribute("value", escape(param, true), false), escape(t(`settings.customFields.location.params.${param}`))))), ssrAttribute("value", escape(rule.operator, true), false), escape(t("settings.customFields.location.operators.eq")), escape(t("settings.customFields.location.operators.neq")), escape(createComponent(Show, {
1185
+ get when() {
1186
+ return locationValueOptions(rule.param).length > 0;
1187
+ },
1188
+ get fallback() {
1189
+ return ssr(_tmpl$43, ssrHydrationKey(), ssrAttribute("value", escape(rule.value, true), false));
1190
+ },
1191
+ get children() {
1192
+ return ssr(_tmpl$41, ssrHydrationKey(), ssrAttribute("value", escape(rule.value, true), false), escape(t("settings.customFields.location.chooseValue")), escape(createComponent(For, {
1193
+ get each() {
1194
+ return locationValueOptions(rule.param);
1195
+ },
1196
+ children: (option) => ssr(_tmpl$6, ssrHydrationKey() + ssrAttribute("value", escape(option.value, true), false), escape(option.label))
1197
+ })));
1198
+ }
1199
+ })), escape(t("settings.customFields.location.remove")))
1200
+ })), escape(t("settings.customFields.location.addRule")))
1201
+ })), escape(t("settings.customFields.form.settingsTitle")), escape(t("settings.customFields.form.settingsDescription")), escape(t("settings.customFields.form.description")), ssrAttribute("value", escape(draft().metadata.description ?? "", true), false), escape(t("settings.customFields.form.position")), ssrAttribute("value", escape(draft().position, true), false), escape(t("settings.customFields.form.positions.normal")), escape(t("settings.customFields.form.positions.side")), escape(t("settings.customFields.form.positions.acf_after_title")), escape(t("settings.customFields.form.displayStyle")), ssrAttribute("value", escape(draft().displayStyle, true), false), escape(t("settings.customFields.form.displayStyles.standard")), escape(t("settings.customFields.form.displayStyles.seamless")), escape(t("settings.customFields.form.displayStyles.grouped")), escape(t("settings.customFields.form.labelPlacement")), ssrAttribute("value", escape(draft().metadata.labelPlacement ?? "top", true), false), escape(t("settings.customFields.fieldSettings.top")), escape(t("settings.customFields.fieldSettings.left")), escape(t("settings.customFields.form.instructionPlacement")), ssrAttribute("value", escape(draft().metadata.instructionPlacement ?? "below", true), false), escape(t("settings.customFields.fieldSettings.above")), escape(t("settings.customFields.fieldSettings.below")), escape(t("settings.customFields.form.menuOrder")), ssrAttribute("value", escape(draft().metadata.menuOrder ?? "", true), false), ssrAttribute("checked", draft().active, true), escape(t("settings.customFields.groups.active")), escape(t("settings.customFields.form.hideOnScreen")), escape(createComponent(For, {
1202
+ each: [
1203
+ "permalink",
1204
+ "content",
1205
+ "excerpt",
1206
+ "featured_image",
1207
+ "author",
1208
+ "revisions",
1209
+ "comments"
1210
+ ],
1211
+ children: (item) => ssr(_tmpl$44, ssrHydrationKey(), ssrAttribute("checked", (draft().metadata.hideOnScreen ?? []).includes(item), true), escape(t(`settings.customFields.form.hide.${item}`)))
1212
+ })));
1213
+ },
1214
+ get children() {
1215
+ return [
1216
+ ssr(_tmpl$29, ssrHydrationKey(), escape(t("settings.customFields.listEyebrow")), escape(t("settings.customFields.groups.title")), escape(t("settings.customFields.description")), escape(t("settings.customFields.groups.new"))),
1217
+ ssr(_tmpl$30, ssrHydrationKey(), escape(t("settings.customFields.contentType")), ssrAttribute("value", escape(selectedType(), true), false), escape(t("settings.customFields.groups.allContentTypes")), escape(createComponent(For, {
1218
+ get each() {
1219
+ return contentTypes();
1220
+ },
1221
+ children: (type) => ssr(_tmpl$38, ssrHydrationKey() + ssrAttribute("value", escape(type.slug, true), false), escape(type.pluralLabel), escape(type.slug))
1222
+ })), ssrAttribute("value", escape(search(), true), false) + ssrAttribute("placeholder", escape(t("settings.customFields.groups.search"), true), false)),
1223
+ ssr(_tmpl$32, ssrHydrationKey(), escape(createComponent(Show, {
1224
+ get when() {
1225
+ return customGroups().length > 0;
1226
+ },
1227
+ get fallback() {
1228
+ return ssr(_tmpl$45, ssrHydrationKey(), escape(t("settings.customFields.groups.empty")), escape(t("settings.customFields.groups.emptyHint")), escape(t("settings.customFields.groups.new")));
1229
+ },
1230
+ get children() {
1231
+ return ssr(_tmpl$31, ssrHydrationKey(), escape(t("settings.customFields.groups.groupName")), escape(t("settings.customFields.groups.appliesTo")), escape(t("settings.customFields.groups.fields")), escape(t("settings.customFields.groups.status")), escape(createComponent(For, {
1232
+ get each() {
1233
+ return customGroups();
1234
+ },
1235
+ children: (group) => ssr(_tmpl$47, ssrHydrationKey(), escape(group.title), escape(group.key), escape(createComponent(Show, {
1236
+ get when() {
1237
+ return group.metadata?.["description"];
1238
+ },
1239
+ get children() {
1240
+ return ssr(_tmpl$46, ssrHydrationKey(), escape(String(group.metadata?.["description"])));
1241
+ }
1242
+ })), escape(locationSummary(group)), escape(group.fields.length), `badge ${group.active !== false ? "badge-success" : ""} ${group.active === false ? "badge-secondary" : ""}`, group.active !== false ? escape(t("settings.customFields.groups.active")) : escape(t("settings.customFields.groups.inactive")), escape(t("settings.customFields.groups.edit")), escape(t("settings.customFields.actions.delete")))
1243
+ })));
1244
+ }
1245
+ }))),
1246
+ ssr(_tmpl$33, ssrHydrationKey(), escape(t("settings.customFields.standard.title")), escape(t("settings.customFields.standard.description")), escape(createComponent(For, {
1247
+ get each() {
1248
+ return standardFields();
1249
+ },
1250
+ children: (field) => ssr(_tmpl$49, ssrHydrationKey(), escape(field.label), escape(field.key), escape(field.type), escape(createComponent(Show, {
1251
+ get when() {
1252
+ return field.locked;
1253
+ },
1254
+ get fallback() {
1255
+ return ssr(_tmpl$50, ssrHydrationKey(), ssrAttribute("checked", enabledStandardFields().has(field.key), true));
1256
+ },
1257
+ get children() {
1258
+ return ssr(_tmpl$48, ssrHydrationKey(), escape(t("settings.customFields.standard.locked")));
1259
+ }
1260
+ })))
1261
+ })))
1262
+ ];
1263
+ }
1264
+ });
1265
+ }
1266
+ })));
1267
+ }
1268
+ //#endregion
1269
+ //#region src/pages/settings/custom-fields.astro
1270
+ var custom_fields_exports = /* @__PURE__ */ __exportAll({
1271
+ default: () => $$CustomFields,
1272
+ file: () => $$file,
1273
+ url: () => $$url
1274
+ });
1275
+ createAstro("https://astro.build");
1276
+ var $$CustomFields = createComponent$1(($$result, $$props, $$slots) => {
1277
+ const Astro = $$result.createAstro($$props, $$slots);
1278
+ Astro.self = $$CustomFields;
1279
+ const { t } = Astro.locals;
1280
+ return renderTemplate`${renderComponent($$result, "DashboardLayout", $$DashboardLayout, {
1281
+ "title": t("settings.customFields.title"),
1282
+ "data-astro-cid-2wrpkwch": true
1283
+ }, { "default": ($$result) => renderTemplate`${maybeRenderHead($$result)}<div class="settings-page" data-astro-cid-2wrpkwch><div class="page-header" data-astro-cid-2wrpkwch><h2 data-astro-cid-2wrpkwch>${t("settings.customFields.title")}</h2><p data-astro-cid-2wrpkwch>${t("settings.customFields.description")}</p></div>${renderComponent($$result, "CustomFieldsManager", CustomFieldsManager, {
1284
+ "client:load": true,
1285
+ "data-astro-cid-2wrpkwch": true,
1286
+ "client:component-hydration": "load",
1287
+ "client:component-path": "/home/runner/work/cms/cms/apps/admin/src/components/apps/settings/CustomFieldsManager.tsx",
1288
+ "client:component-export": "CustomFieldsManager"
1289
+ })}</div>` })}`;
1290
+ }, "/home/runner/work/cms/cms/apps/admin/src/pages/settings/custom-fields.astro", void 0);
1291
+ var $$file = "/home/runner/work/cms/cms/apps/admin/src/pages/settings/custom-fields.astro";
1292
+ var $$url = "/settings/custom-fields";
1293
+ //#endregion
1294
+ //#region \0virtual:astro:page:src/pages/settings/custom-fields@_@astro
1295
+ var page = () => custom_fields_exports;
1296
+ //#endregion
1297
+ export { page };