1 /******/ (function() { // webpackBootstrap |
1 /******/ (() => { // webpackBootstrap |
2 /******/ "use strict"; |
2 /******/ "use strict"; |
3 /******/ // The require scope |
3 /******/ // The require scope |
4 /******/ var __webpack_require__ = {}; |
4 /******/ var __webpack_require__ = {}; |
5 /******/ |
5 /******/ |
6 /************************************************************************/ |
6 /************************************************************************/ |
7 /******/ /* webpack/runtime/compat get default export */ |
7 /******/ /* webpack/runtime/compat get default export */ |
8 /******/ !function() { |
8 /******/ (() => { |
9 /******/ // getDefaultExport function for compatibility with non-harmony modules |
9 /******/ // getDefaultExport function for compatibility with non-harmony modules |
10 /******/ __webpack_require__.n = function(module) { |
10 /******/ __webpack_require__.n = (module) => { |
11 /******/ var getter = module && module.__esModule ? |
11 /******/ var getter = module && module.__esModule ? |
12 /******/ function() { return module['default']; } : |
12 /******/ () => (module['default']) : |
13 /******/ function() { return module; }; |
13 /******/ () => (module); |
14 /******/ __webpack_require__.d(getter, { a: getter }); |
14 /******/ __webpack_require__.d(getter, { a: getter }); |
15 /******/ return getter; |
15 /******/ return getter; |
16 /******/ }; |
16 /******/ }; |
17 /******/ }(); |
17 /******/ })(); |
18 /******/ |
18 /******/ |
19 /******/ /* webpack/runtime/define property getters */ |
19 /******/ /* webpack/runtime/define property getters */ |
20 /******/ !function() { |
20 /******/ (() => { |
21 /******/ // define getter functions for harmony exports |
21 /******/ // define getter functions for harmony exports |
22 /******/ __webpack_require__.d = function(exports, definition) { |
22 /******/ __webpack_require__.d = (exports, definition) => { |
23 /******/ for(var key in definition) { |
23 /******/ for(var key in definition) { |
24 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { |
24 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { |
25 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); |
25 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); |
26 /******/ } |
26 /******/ } |
27 /******/ } |
27 /******/ } |
28 /******/ }; |
28 /******/ }; |
29 /******/ }(); |
29 /******/ })(); |
30 /******/ |
30 /******/ |
31 /******/ /* webpack/runtime/hasOwnProperty shorthand */ |
31 /******/ /* webpack/runtime/hasOwnProperty shorthand */ |
32 /******/ !function() { |
32 /******/ (() => { |
33 /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } |
33 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) |
34 /******/ }(); |
34 /******/ })(); |
35 /******/ |
35 /******/ |
36 /******/ /* webpack/runtime/make namespace object */ |
36 /******/ /* webpack/runtime/make namespace object */ |
37 /******/ !function() { |
37 /******/ (() => { |
38 /******/ // define __esModule on exports |
38 /******/ // define __esModule on exports |
39 /******/ __webpack_require__.r = function(exports) { |
39 /******/ __webpack_require__.r = (exports) => { |
40 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
40 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
41 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
41 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
42 /******/ } |
42 /******/ } |
43 /******/ Object.defineProperty(exports, '__esModule', { value: true }); |
43 /******/ Object.defineProperty(exports, '__esModule', { value: true }); |
44 /******/ }; |
44 /******/ }; |
45 /******/ }(); |
45 /******/ })(); |
46 /******/ |
46 /******/ |
47 /************************************************************************/ |
47 /************************************************************************/ |
48 var __webpack_exports__ = {}; |
48 var __webpack_exports__ = {}; |
49 // ESM COMPAT FLAG |
49 // ESM COMPAT FLAG |
50 __webpack_require__.r(__webpack_exports__); |
50 __webpack_require__.r(__webpack_exports__); |
51 |
51 |
52 ;// CONCATENATED MODULE: external ["wp","element"] |
52 ;// CONCATENATED MODULE: external ["wp","element"] |
53 var external_wp_element_namespaceObject = window["wp"]["element"]; |
53 const external_wp_element_namespaceObject = window["wp"]["element"]; |
54 ;// CONCATENATED MODULE: external ["wp","i18n"] |
54 ;// CONCATENATED MODULE: external ["wp","i18n"] |
55 var external_wp_i18n_namespaceObject = window["wp"]["i18n"]; |
55 const external_wp_i18n_namespaceObject = window["wp"]["i18n"]; |
56 ;// CONCATENATED MODULE: external "lodash" |
56 ;// CONCATENATED MODULE: ./node_modules/tslib/tslib.es6.mjs |
57 var external_lodash_namespaceObject = window["lodash"]; |
57 /****************************************************************************** |
|
58 Copyright (c) Microsoft Corporation. |
|
59 |
|
60 Permission to use, copy, modify, and/or distribute this software for any |
|
61 purpose with or without fee is hereby granted. |
|
62 |
|
63 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH |
|
64 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY |
|
65 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, |
|
66 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM |
|
67 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR |
|
68 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
|
69 PERFORMANCE OF THIS SOFTWARE. |
|
70 ***************************************************************************** */ |
|
71 /* global Reflect, Promise, SuppressedError, Symbol */ |
|
72 |
|
73 var extendStatics = function(d, b) { |
|
74 extendStatics = Object.setPrototypeOf || |
|
75 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || |
|
76 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; |
|
77 return extendStatics(d, b); |
|
78 }; |
|
79 |
|
80 function __extends(d, b) { |
|
81 if (typeof b !== "function" && b !== null) |
|
82 throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); |
|
83 extendStatics(d, b); |
|
84 function __() { this.constructor = d; } |
|
85 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); |
|
86 } |
|
87 |
|
88 var __assign = function() { |
|
89 __assign = Object.assign || function __assign(t) { |
|
90 for (var s, i = 1, n = arguments.length; i < n; i++) { |
|
91 s = arguments[i]; |
|
92 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; |
|
93 } |
|
94 return t; |
|
95 } |
|
96 return __assign.apply(this, arguments); |
|
97 } |
|
98 |
|
99 function __rest(s, e) { |
|
100 var t = {}; |
|
101 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) |
|
102 t[p] = s[p]; |
|
103 if (s != null && typeof Object.getOwnPropertySymbols === "function") |
|
104 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { |
|
105 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) |
|
106 t[p[i]] = s[p[i]]; |
|
107 } |
|
108 return t; |
|
109 } |
|
110 |
|
111 function __decorate(decorators, target, key, desc) { |
|
112 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; |
|
113 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); |
|
114 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; |
|
115 return c > 3 && r && Object.defineProperty(target, key, r), r; |
|
116 } |
|
117 |
|
118 function __param(paramIndex, decorator) { |
|
119 return function (target, key) { decorator(target, key, paramIndex); } |
|
120 } |
|
121 |
|
122 function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { |
|
123 function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } |
|
124 var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; |
|
125 var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; |
|
126 var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); |
|
127 var _, done = false; |
|
128 for (var i = decorators.length - 1; i >= 0; i--) { |
|
129 var context = {}; |
|
130 for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; |
|
131 for (var p in contextIn.access) context.access[p] = contextIn.access[p]; |
|
132 context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; |
|
133 var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); |
|
134 if (kind === "accessor") { |
|
135 if (result === void 0) continue; |
|
136 if (result === null || typeof result !== "object") throw new TypeError("Object expected"); |
|
137 if (_ = accept(result.get)) descriptor.get = _; |
|
138 if (_ = accept(result.set)) descriptor.set = _; |
|
139 if (_ = accept(result.init)) initializers.unshift(_); |
|
140 } |
|
141 else if (_ = accept(result)) { |
|
142 if (kind === "field") initializers.unshift(_); |
|
143 else descriptor[key] = _; |
|
144 } |
|
145 } |
|
146 if (target) Object.defineProperty(target, contextIn.name, descriptor); |
|
147 done = true; |
|
148 }; |
|
149 |
|
150 function __runInitializers(thisArg, initializers, value) { |
|
151 var useValue = arguments.length > 2; |
|
152 for (var i = 0; i < initializers.length; i++) { |
|
153 value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); |
|
154 } |
|
155 return useValue ? value : void 0; |
|
156 }; |
|
157 |
|
158 function __propKey(x) { |
|
159 return typeof x === "symbol" ? x : "".concat(x); |
|
160 }; |
|
161 |
|
162 function __setFunctionName(f, name, prefix) { |
|
163 if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; |
|
164 return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); |
|
165 }; |
|
166 |
|
167 function __metadata(metadataKey, metadataValue) { |
|
168 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); |
|
169 } |
|
170 |
|
171 function __awaiter(thisArg, _arguments, P, generator) { |
|
172 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |
|
173 return new (P || (P = Promise))(function (resolve, reject) { |
|
174 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |
|
175 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } |
|
176 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } |
|
177 step((generator = generator.apply(thisArg, _arguments || [])).next()); |
|
178 }); |
|
179 } |
|
180 |
|
181 function __generator(thisArg, body) { |
|
182 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; |
|
183 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; |
|
184 function verb(n) { return function (v) { return step([n, v]); }; } |
|
185 function step(op) { |
|
186 if (f) throw new TypeError("Generator is already executing."); |
|
187 while (g && (g = 0, op[0] && (_ = 0)), _) try { |
|
188 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; |
|
189 if (y = 0, t) op = [op[0] & 2, t.value]; |
|
190 switch (op[0]) { |
|
191 case 0: case 1: t = op; break; |
|
192 case 4: _.label++; return { value: op[1], done: false }; |
|
193 case 5: _.label++; y = op[1]; op = [0]; continue; |
|
194 case 7: op = _.ops.pop(); _.trys.pop(); continue; |
|
195 default: |
|
196 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } |
|
197 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } |
|
198 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } |
|
199 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } |
|
200 if (t[2]) _.ops.pop(); |
|
201 _.trys.pop(); continue; |
|
202 } |
|
203 op = body.call(thisArg, _); |
|
204 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } |
|
205 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; |
|
206 } |
|
207 } |
|
208 |
|
209 var __createBinding = Object.create ? (function(o, m, k, k2) { |
|
210 if (k2 === undefined) k2 = k; |
|
211 var desc = Object.getOwnPropertyDescriptor(m, k); |
|
212 if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { |
|
213 desc = { enumerable: true, get: function() { return m[k]; } }; |
|
214 } |
|
215 Object.defineProperty(o, k2, desc); |
|
216 }) : (function(o, m, k, k2) { |
|
217 if (k2 === undefined) k2 = k; |
|
218 o[k2] = m[k]; |
|
219 }); |
|
220 |
|
221 function __exportStar(m, o) { |
|
222 for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); |
|
223 } |
|
224 |
|
225 function __values(o) { |
|
226 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; |
|
227 if (m) return m.call(o); |
|
228 if (o && typeof o.length === "number") return { |
|
229 next: function () { |
|
230 if (o && i >= o.length) o = void 0; |
|
231 return { value: o && o[i++], done: !o }; |
|
232 } |
|
233 }; |
|
234 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); |
|
235 } |
|
236 |
|
237 function __read(o, n) { |
|
238 var m = typeof Symbol === "function" && o[Symbol.iterator]; |
|
239 if (!m) return o; |
|
240 var i = m.call(o), r, ar = [], e; |
|
241 try { |
|
242 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); |
|
243 } |
|
244 catch (error) { e = { error: error }; } |
|
245 finally { |
|
246 try { |
|
247 if (r && !r.done && (m = i["return"])) m.call(i); |
|
248 } |
|
249 finally { if (e) throw e.error; } |
|
250 } |
|
251 return ar; |
|
252 } |
|
253 |
|
254 /** @deprecated */ |
|
255 function __spread() { |
|
256 for (var ar = [], i = 0; i < arguments.length; i++) |
|
257 ar = ar.concat(__read(arguments[i])); |
|
258 return ar; |
|
259 } |
|
260 |
|
261 /** @deprecated */ |
|
262 function __spreadArrays() { |
|
263 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; |
|
264 for (var r = Array(s), k = 0, i = 0; i < il; i++) |
|
265 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) |
|
266 r[k] = a[j]; |
|
267 return r; |
|
268 } |
|
269 |
|
270 function __spreadArray(to, from, pack) { |
|
271 if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { |
|
272 if (ar || !(i in from)) { |
|
273 if (!ar) ar = Array.prototype.slice.call(from, 0, i); |
|
274 ar[i] = from[i]; |
|
275 } |
|
276 } |
|
277 return to.concat(ar || Array.prototype.slice.call(from)); |
|
278 } |
|
279 |
|
280 function __await(v) { |
|
281 return this instanceof __await ? (this.v = v, this) : new __await(v); |
|
282 } |
|
283 |
|
284 function __asyncGenerator(thisArg, _arguments, generator) { |
|
285 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |
|
286 var g = generator.apply(thisArg, _arguments || []), i, q = []; |
|
287 return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; |
|
288 function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } |
|
289 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } |
|
290 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } |
|
291 function fulfill(value) { resume("next", value); } |
|
292 function reject(value) { resume("throw", value); } |
|
293 function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } |
|
294 } |
|
295 |
|
296 function __asyncDelegator(o) { |
|
297 var i, p; |
|
298 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; |
|
299 function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } |
|
300 } |
|
301 |
|
302 function __asyncValues(o) { |
|
303 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |
|
304 var m = o[Symbol.asyncIterator], i; |
|
305 return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); |
|
306 function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } |
|
307 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } |
|
308 } |
|
309 |
|
310 function __makeTemplateObject(cooked, raw) { |
|
311 if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } |
|
312 return cooked; |
|
313 }; |
|
314 |
|
315 var __setModuleDefault = Object.create ? (function(o, v) { |
|
316 Object.defineProperty(o, "default", { enumerable: true, value: v }); |
|
317 }) : function(o, v) { |
|
318 o["default"] = v; |
|
319 }; |
|
320 |
|
321 function __importStar(mod) { |
|
322 if (mod && mod.__esModule) return mod; |
|
323 var result = {}; |
|
324 if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); |
|
325 __setModuleDefault(result, mod); |
|
326 return result; |
|
327 } |
|
328 |
|
329 function __importDefault(mod) { |
|
330 return (mod && mod.__esModule) ? mod : { default: mod }; |
|
331 } |
|
332 |
|
333 function __classPrivateFieldGet(receiver, state, kind, f) { |
|
334 if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); |
|
335 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); |
|
336 return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); |
|
337 } |
|
338 |
|
339 function __classPrivateFieldSet(receiver, state, value, kind, f) { |
|
340 if (kind === "m") throw new TypeError("Private method is not writable"); |
|
341 if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); |
|
342 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); |
|
343 return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; |
|
344 } |
|
345 |
|
346 function __classPrivateFieldIn(state, receiver) { |
|
347 if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); |
|
348 return typeof state === "function" ? receiver === state : state.has(receiver); |
|
349 } |
|
350 |
|
351 function __addDisposableResource(env, value, async) { |
|
352 if (value !== null && value !== void 0) { |
|
353 if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); |
|
354 var dispose; |
|
355 if (async) { |
|
356 if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); |
|
357 dispose = value[Symbol.asyncDispose]; |
|
358 } |
|
359 if (dispose === void 0) { |
|
360 if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); |
|
361 dispose = value[Symbol.dispose]; |
|
362 } |
|
363 if (typeof dispose !== "function") throw new TypeError("Object not disposable."); |
|
364 env.stack.push({ value: value, dispose: dispose, async: async }); |
|
365 } |
|
366 else if (async) { |
|
367 env.stack.push({ async: true }); |
|
368 } |
|
369 return value; |
|
370 } |
|
371 |
|
372 var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { |
|
373 var e = new Error(message); |
|
374 return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; |
|
375 }; |
|
376 |
|
377 function __disposeResources(env) { |
|
378 function fail(e) { |
|
379 env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; |
|
380 env.hasError = true; |
|
381 } |
|
382 function next() { |
|
383 while (env.stack.length) { |
|
384 var rec = env.stack.pop(); |
|
385 try { |
|
386 var result = rec.dispose && rec.dispose.call(rec.value); |
|
387 if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); |
|
388 } |
|
389 catch (e) { |
|
390 fail(e); |
|
391 } |
|
392 } |
|
393 if (env.hasError) throw env.error; |
|
394 } |
|
395 return next(); |
|
396 } |
|
397 |
|
398 /* harmony default export */ const tslib_es6 = ({ |
|
399 __extends, |
|
400 __assign, |
|
401 __rest, |
|
402 __decorate, |
|
403 __param, |
|
404 __metadata, |
|
405 __awaiter, |
|
406 __generator, |
|
407 __createBinding, |
|
408 __exportStar, |
|
409 __values, |
|
410 __read, |
|
411 __spread, |
|
412 __spreadArrays, |
|
413 __spreadArray, |
|
414 __await, |
|
415 __asyncGenerator, |
|
416 __asyncDelegator, |
|
417 __asyncValues, |
|
418 __makeTemplateObject, |
|
419 __importStar, |
|
420 __importDefault, |
|
421 __classPrivateFieldGet, |
|
422 __classPrivateFieldSet, |
|
423 __classPrivateFieldIn, |
|
424 __addDisposableResource, |
|
425 __disposeResources, |
|
426 }); |
|
427 |
|
428 ;// CONCATENATED MODULE: ./node_modules/lower-case/dist.es2015/index.js |
|
429 /** |
|
430 * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt |
|
431 */ |
|
432 var SUPPORTED_LOCALE = { |
|
433 tr: { |
|
434 regexp: /\u0130|\u0049|\u0049\u0307/g, |
|
435 map: { |
|
436 İ: "\u0069", |
|
437 I: "\u0131", |
|
438 İ: "\u0069", |
|
439 }, |
|
440 }, |
|
441 az: { |
|
442 regexp: /\u0130/g, |
|
443 map: { |
|
444 İ: "\u0069", |
|
445 I: "\u0131", |
|
446 İ: "\u0069", |
|
447 }, |
|
448 }, |
|
449 lt: { |
|
450 regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g, |
|
451 map: { |
|
452 I: "\u0069\u0307", |
|
453 J: "\u006A\u0307", |
|
454 Į: "\u012F\u0307", |
|
455 Ì: "\u0069\u0307\u0300", |
|
456 Í: "\u0069\u0307\u0301", |
|
457 Ĩ: "\u0069\u0307\u0303", |
|
458 }, |
|
459 }, |
|
460 }; |
|
461 /** |
|
462 * Localized lower case. |
|
463 */ |
|
464 function localeLowerCase(str, locale) { |
|
465 var lang = SUPPORTED_LOCALE[locale.toLowerCase()]; |
|
466 if (lang) |
|
467 return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; })); |
|
468 return lowerCase(str); |
|
469 } |
|
470 /** |
|
471 * Lower case as a function. |
|
472 */ |
|
473 function lowerCase(str) { |
|
474 return str.toLowerCase(); |
|
475 } |
|
476 |
|
477 ;// CONCATENATED MODULE: ./node_modules/no-case/dist.es2015/index.js |
|
478 |
|
479 // Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case"). |
|
480 var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g]; |
|
481 // Remove all non-word characters. |
|
482 var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi; |
|
483 /** |
|
484 * Normalize the string into something other libraries can manipulate easier. |
|
485 */ |
|
486 function noCase(input, options) { |
|
487 if (options === void 0) { options = {}; } |
|
488 var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d; |
|
489 var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0"); |
|
490 var start = 0; |
|
491 var end = result.length; |
|
492 // Trim the delimiter from around the output string. |
|
493 while (result.charAt(start) === "\0") |
|
494 start++; |
|
495 while (result.charAt(end - 1) === "\0") |
|
496 end--; |
|
497 // Transform each token independently. |
|
498 return result.slice(start, end).split("\0").map(transform).join(delimiter); |
|
499 } |
|
500 /** |
|
501 * Replace `re` in the input string with the replacement value. |
|
502 */ |
|
503 function replace(input, re, value) { |
|
504 if (re instanceof RegExp) |
|
505 return input.replace(re, value); |
|
506 return re.reduce(function (input, re) { return input.replace(re, value); }, input); |
|
507 } |
|
508 |
|
509 ;// CONCATENATED MODULE: ./node_modules/dot-case/dist.es2015/index.js |
|
510 |
|
511 |
|
512 function dotCase(input, options) { |
|
513 if (options === void 0) { options = {}; } |
|
514 return noCase(input, __assign({ delimiter: "." }, options)); |
|
515 } |
|
516 |
|
517 ;// CONCATENATED MODULE: ./node_modules/param-case/dist.es2015/index.js |
|
518 |
|
519 |
|
520 function paramCase(input, options) { |
|
521 if (options === void 0) { options = {}; } |
|
522 return dotCase(input, __assign({ delimiter: "-" }, options)); |
|
523 } |
|
524 |
58 ;// CONCATENATED MODULE: external ["wp","apiFetch"] |
525 ;// CONCATENATED MODULE: external ["wp","apiFetch"] |
59 var external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"]; |
526 const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"]; |
60 var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject); |
527 var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject); |
61 ;// CONCATENATED MODULE: ./node_modules/@wordpress/list-reusable-blocks/build-module/utils/file.js |
528 ;// CONCATENATED MODULE: external ["wp","blob"] |
62 /** |
529 const external_wp_blob_namespaceObject = window["wp"]["blob"]; |
63 * Downloads a file. |
|
64 * |
|
65 * @param {string} fileName File Name. |
|
66 * @param {string} content File Content. |
|
67 * @param {string} contentType File mime type. |
|
68 */ |
|
69 function download(fileName, content, contentType) { |
|
70 const file = new window.Blob([content], { |
|
71 type: contentType |
|
72 }); // IE11 can't use the click to download technique |
|
73 // we use a specific IE11 technique instead. |
|
74 |
|
75 if (window.navigator.msSaveOrOpenBlob) { |
|
76 window.navigator.msSaveOrOpenBlob(file, fileName); |
|
77 } else { |
|
78 const a = document.createElement('a'); |
|
79 a.href = URL.createObjectURL(file); |
|
80 a.download = fileName; |
|
81 a.style.display = 'none'; |
|
82 document.body.appendChild(a); |
|
83 a.click(); |
|
84 document.body.removeChild(a); |
|
85 } |
|
86 } |
|
87 /** |
|
88 * Reads the textual content of the given file. |
|
89 * |
|
90 * @param {File} file File. |
|
91 * @return {Promise<string>} Content of the file. |
|
92 */ |
|
93 |
|
94 function readTextFile(file) { |
|
95 const reader = new window.FileReader(); |
|
96 return new Promise(resolve => { |
|
97 reader.onload = () => { |
|
98 resolve(reader.result); |
|
99 }; |
|
100 |
|
101 reader.readAsText(file); |
|
102 }); |
|
103 } |
|
104 |
|
105 ;// CONCATENATED MODULE: ./node_modules/@wordpress/list-reusable-blocks/build-module/utils/export.js |
530 ;// CONCATENATED MODULE: ./node_modules/@wordpress/list-reusable-blocks/build-module/utils/export.js |
106 /** |
531 /** |
107 * External dependencies |
532 * External dependencies |
108 */ |
533 */ |
|
534 |
109 |
535 |
110 /** |
536 /** |
111 * WordPress dependencies |
537 * WordPress dependencies |
112 */ |
538 */ |
113 |
539 |
166 * Import a reusable block from a JSON file. |
605 * Import a reusable block from a JSON file. |
167 * |
606 * |
168 * @param {File} file File. |
607 * @param {File} file File. |
169 * @return {Promise} Promise returning the imported reusable block. |
608 * @return {Promise} Promise returning the imported reusable block. |
170 */ |
609 */ |
171 |
|
172 async function importReusableBlock(file) { |
610 async function importReusableBlock(file) { |
173 const fileContent = await readTextFile(file); |
611 const fileContent = await readTextFile(file); |
174 let parsedContent; |
612 let parsedContent; |
175 |
|
176 try { |
613 try { |
177 parsedContent = JSON.parse(fileContent); |
614 parsedContent = JSON.parse(fileContent); |
178 } catch (e) { |
615 } catch (e) { |
179 throw new Error('Invalid JSON file'); |
616 throw new Error('Invalid JSON file'); |
180 } |
617 } |
181 |
618 if (parsedContent.__file !== 'wp_block' || !parsedContent.title || !parsedContent.content || typeof parsedContent.title !== 'string' || typeof parsedContent.content !== 'string' || parsedContent.syncStatus && typeof parsedContent.syncStatus !== 'string') { |
182 if (parsedContent.__file !== 'wp_block' || !parsedContent.title || !parsedContent.content || !(0,external_lodash_namespaceObject.isString)(parsedContent.title) || !(0,external_lodash_namespaceObject.isString)(parsedContent.content)) { |
619 throw new Error('Invalid pattern JSON file'); |
183 throw new Error('Invalid Reusable block JSON file'); |
620 } |
184 } |
|
185 |
|
186 const postType = await external_wp_apiFetch_default()({ |
621 const postType = await external_wp_apiFetch_default()({ |
187 path: `/wp/v2/types/wp_block` |
622 path: `/wp/v2/types/wp_block` |
188 }); |
623 }); |
189 const reusableBlock = await external_wp_apiFetch_default()({ |
624 const reusableBlock = await external_wp_apiFetch_default()({ |
190 path: `/wp/v2/${postType.rest_base}`, |
625 path: `/wp/v2/${postType.rest_base}`, |
191 data: { |
626 data: { |
192 title: parsedContent.title, |
627 title: parsedContent.title, |
193 content: parsedContent.content, |
628 content: parsedContent.content, |
194 status: 'publish' |
629 status: 'publish', |
|
630 meta: parsedContent.syncStatus === 'unsynced' ? { |
|
631 wp_pattern_sync_status: parsedContent.syncStatus |
|
632 } : undefined |
195 }, |
633 }, |
196 method: 'POST' |
634 method: 'POST' |
197 }); |
635 }); |
198 return reusableBlock; |
636 return reusableBlock; |
199 } |
637 } |
200 |
638 /* harmony default export */ const utils_import = (importReusableBlock); |
201 /* harmony default export */ var utils_import = (importReusableBlock); |
639 |
202 |
640 ;// CONCATENATED MODULE: external "ReactJSXRuntime" |
|
641 const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"]; |
203 ;// CONCATENATED MODULE: ./node_modules/@wordpress/list-reusable-blocks/build-module/components/import-form/index.js |
642 ;// CONCATENATED MODULE: ./node_modules/@wordpress/list-reusable-blocks/build-module/components/import-form/index.js |
204 |
|
205 |
|
206 /** |
643 /** |
207 * WordPress dependencies |
644 * WordPress dependencies |
208 */ |
645 */ |
209 |
646 |
210 |
647 |
211 |
648 |
212 |
649 |
|
650 |
213 /** |
651 /** |
214 * Internal dependencies |
652 * Internal dependencies |
215 */ |
653 */ |
216 |
654 |
217 |
655 |
218 |
656 |
219 function ImportForm(_ref) { |
657 function ImportForm({ |
220 let { |
658 instanceId, |
221 instanceId, |
659 onUpload |
222 onUpload |
660 }) { |
223 } = _ref; |
|
224 const inputId = 'list-reusable-blocks-import-form-' + instanceId; |
661 const inputId = 'list-reusable-blocks-import-form-' + instanceId; |
225 const formRef = (0,external_wp_element_namespaceObject.useRef)(); |
662 const formRef = (0,external_wp_element_namespaceObject.useRef)(); |
226 const [isLoading, setIsLoading] = (0,external_wp_element_namespaceObject.useState)(false); |
663 const [isLoading, setIsLoading] = (0,external_wp_element_namespaceObject.useState)(false); |
227 const [error, setError] = (0,external_wp_element_namespaceObject.useState)(null); |
664 const [error, setError] = (0,external_wp_element_namespaceObject.useState)(null); |
228 const [file, setFile] = (0,external_wp_element_namespaceObject.useState)(null); |
665 const [file, setFile] = (0,external_wp_element_namespaceObject.useState)(null); |
229 |
|
230 const onChangeFile = event => { |
666 const onChangeFile = event => { |
231 setFile(event.target.files[0]); |
667 setFile(event.target.files[0]); |
232 setError(null); |
668 setError(null); |
233 }; |
669 }; |
234 |
|
235 const onSubmit = event => { |
670 const onSubmit = event => { |
236 event.preventDefault(); |
671 event.preventDefault(); |
237 |
|
238 if (!file) { |
672 if (!file) { |
239 return; |
673 return; |
240 } |
674 } |
241 |
|
242 setIsLoading({ |
675 setIsLoading({ |
243 isLoading: true |
676 isLoading: true |
244 }); |
677 }); |
245 utils_import(file).then(reusableBlock => { |
678 utils_import(file).then(reusableBlock => { |
246 if (!formRef) { |
679 if (!formRef) { |
247 return; |
680 return; |
248 } |
681 } |
249 |
|
250 setIsLoading(false); |
682 setIsLoading(false); |
251 onUpload(reusableBlock); |
683 onUpload(reusableBlock); |
252 }).catch(errors => { |
684 }).catch(errors => { |
253 if (!formRef) { |
685 if (!formRef) { |
254 return; |
686 return; |
255 } |
687 } |
256 |
|
257 let uiMessage; |
688 let uiMessage; |
258 |
|
259 switch (errors.message) { |
689 switch (errors.message) { |
260 case 'Invalid JSON file': |
690 case 'Invalid JSON file': |
261 uiMessage = (0,external_wp_i18n_namespaceObject.__)('Invalid JSON file'); |
691 uiMessage = (0,external_wp_i18n_namespaceObject.__)('Invalid JSON file'); |
262 break; |
692 break; |
263 |
693 case 'Invalid pattern JSON file': |
264 case 'Invalid Reusable block JSON file': |
694 uiMessage = (0,external_wp_i18n_namespaceObject.__)('Invalid pattern JSON file'); |
265 uiMessage = (0,external_wp_i18n_namespaceObject.__)('Invalid Reusable block JSON file'); |
|
266 break; |
695 break; |
267 |
|
268 default: |
696 default: |
269 uiMessage = (0,external_wp_i18n_namespaceObject.__)('Unknown error'); |
697 uiMessage = (0,external_wp_i18n_namespaceObject.__)('Unknown error'); |
270 } |
698 } |
271 |
|
272 setIsLoading(false); |
699 setIsLoading(false); |
273 setError(uiMessage); |
700 setError(uiMessage); |
274 }); |
701 }); |
275 }; |
702 }; |
276 |
|
277 const onDismissError = () => { |
703 const onDismissError = () => { |
278 setError(null); |
704 setError(null); |
279 }; |
705 }; |
280 |
706 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("form", { |
281 return (0,external_wp_element_namespaceObject.createElement)("form", { |
|
282 className: "list-reusable-blocks-import-form", |
707 className: "list-reusable-blocks-import-form", |
283 onSubmit: onSubmit, |
708 onSubmit: onSubmit, |
284 ref: formRef |
709 ref: formRef, |
285 }, error && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Notice, { |
710 children: [error && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, { |
286 status: "error", |
711 status: "error", |
287 onRemove: () => onDismissError() |
712 onRemove: () => onDismissError(), |
288 }, error), (0,external_wp_element_namespaceObject.createElement)("label", { |
713 children: error |
289 htmlFor: inputId, |
714 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("label", { |
290 className: "list-reusable-blocks-import-form__label" |
715 htmlFor: inputId, |
291 }, (0,external_wp_i18n_namespaceObject.__)('File')), (0,external_wp_element_namespaceObject.createElement)("input", { |
716 className: "list-reusable-blocks-import-form__label", |
292 id: inputId, |
717 children: (0,external_wp_i18n_namespaceObject.__)('File') |
293 type: "file", |
718 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("input", { |
294 onChange: onChangeFile |
719 id: inputId, |
295 }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { |
720 type: "file", |
296 type: "submit", |
721 onChange: onChangeFile |
297 isBusy: isLoading, |
722 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, { |
298 disabled: !file || isLoading, |
723 type: "submit", |
299 variant: "secondary", |
724 isBusy: isLoading, |
300 className: "list-reusable-blocks-import-form__button" |
725 __experimentalIsFocusable: true, |
301 }, (0,external_wp_i18n_namespaceObject._x)('Import', 'button label'))); |
726 disabled: !file || isLoading, |
302 } |
727 variant: "secondary", |
303 |
728 className: "list-reusable-blocks-import-form__button", |
304 /* harmony default export */ var import_form = ((0,external_wp_compose_namespaceObject.withInstanceId)(ImportForm)); |
729 children: (0,external_wp_i18n_namespaceObject._x)('Import', 'button label') |
|
730 })] |
|
731 }); |
|
732 } |
|
733 /* harmony default export */ const import_form = ((0,external_wp_compose_namespaceObject.withInstanceId)(ImportForm)); |
305 |
734 |
306 ;// CONCATENATED MODULE: ./node_modules/@wordpress/list-reusable-blocks/build-module/components/import-dropdown/index.js |
735 ;// CONCATENATED MODULE: ./node_modules/@wordpress/list-reusable-blocks/build-module/components/import-dropdown/index.js |
307 |
|
308 |
|
309 /** |
|
310 * External dependencies |
|
311 */ |
|
312 |
|
313 /** |
736 /** |
314 * WordPress dependencies |
737 * WordPress dependencies |
315 */ |
738 */ |
316 |
739 |
317 |
740 |
318 |
741 |
|
742 |
319 /** |
743 /** |
320 * Internal dependencies |
744 * Internal dependencies |
321 */ |
745 */ |
322 |
746 |
323 |
747 |
324 |
748 function ImportDropdown({ |
325 function ImportDropdown(_ref) { |
749 onUpload |
326 let { |
750 }) { |
327 onUpload |
751 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Dropdown, { |
328 } = _ref; |
752 popoverProps: { |
329 return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Dropdown, { |
753 placement: 'bottom-start' |
330 position: "bottom right", |
754 }, |
331 contentClassName: "list-reusable-blocks-import-dropdown__content", |
755 contentClassName: "list-reusable-blocks-import-dropdown__content", |
332 renderToggle: _ref2 => { |
756 renderToggle: ({ |
333 let { |
757 isOpen, |
334 isOpen, |
758 onToggle |
335 onToggle |
759 }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, { |
336 } = _ref2; |
760 "aria-expanded": isOpen, |
337 return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, { |
761 onClick: onToggle, |
338 "aria-expanded": isOpen, |
762 variant: "primary", |
339 onClick: onToggle, |
763 children: (0,external_wp_i18n_namespaceObject.__)('Import from JSON') |
340 variant: "primary" |
764 }), |
341 }, (0,external_wp_i18n_namespaceObject.__)('Import from JSON')); |
765 renderContent: ({ |
342 }, |
766 onClose |
343 renderContent: _ref3 => { |
767 }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(import_form, { |
344 let { |
768 onUpload: (0,external_wp_compose_namespaceObject.pipe)(onClose, onUpload) |
345 onClose |
769 }) |
346 } = _ref3; |
|
347 return (0,external_wp_element_namespaceObject.createElement)(import_form, { |
|
348 onUpload: (0,external_lodash_namespaceObject.flow)(onClose, onUpload) |
|
349 }); |
|
350 } |
|
351 }); |
770 }); |
352 } |
771 } |
353 |
772 /* harmony default export */ const import_dropdown = (ImportDropdown); |
354 /* harmony default export */ var import_dropdown = (ImportDropdown); |
|
355 |
773 |
356 ;// CONCATENATED MODULE: ./node_modules/@wordpress/list-reusable-blocks/build-module/index.js |
774 ;// CONCATENATED MODULE: ./node_modules/@wordpress/list-reusable-blocks/build-module/index.js |
357 |
|
358 |
|
359 /** |
775 /** |
360 * WordPress dependencies |
776 * WordPress dependencies |
361 */ |
777 */ |
362 |
778 |
363 |
779 |
|
780 |
364 /** |
781 /** |
365 * Internal dependencies |
782 * Internal dependencies |
366 */ |
783 */ |
367 |
784 |
368 |
785 |
369 // Setup Export Links. |
786 |
|
787 // Setup Export Links. |
370 |
788 |
371 document.body.addEventListener('click', event => { |
789 document.body.addEventListener('click', event => { |
372 if (!event.target.classList.contains('wp-list-reusable-blocks__export')) { |
790 if (!event.target.classList.contains('wp-list-reusable-blocks__export')) { |
373 return; |
791 return; |
374 } |
792 } |
375 |
|
376 event.preventDefault(); |
793 event.preventDefault(); |
377 utils_export(event.target.dataset.id); |
794 utils_export(event.target.dataset.id); |
378 }); // Setup Import Form. |
795 }); |
379 |
796 |
|
797 // Setup Import Form. |
380 document.addEventListener('DOMContentLoaded', () => { |
798 document.addEventListener('DOMContentLoaded', () => { |
381 const button = document.querySelector('.page-title-action'); |
799 const button = document.querySelector('.page-title-action'); |
382 |
|
383 if (!button) { |
800 if (!button) { |
384 return; |
801 return; |
385 } |
802 } |
386 |
|
387 const showNotice = () => { |
803 const showNotice = () => { |
388 const notice = document.createElement('div'); |
804 const notice = document.createElement('div'); |
389 notice.className = 'notice notice-success is-dismissible'; |
805 notice.className = 'notice notice-success is-dismissible'; |
390 notice.innerHTML = `<p>${(0,external_wp_i18n_namespaceObject.__)('Reusable block imported successfully!')}</p>`; |
806 notice.innerHTML = `<p>${(0,external_wp_i18n_namespaceObject.__)('Pattern imported successfully!')}</p>`; |
391 const headerEnd = document.querySelector('.wp-header-end'); |
807 const headerEnd = document.querySelector('.wp-header-end'); |
392 |
|
393 if (!headerEnd) { |
808 if (!headerEnd) { |
394 return; |
809 return; |
395 } |
810 } |
396 |
|
397 headerEnd.parentNode.insertBefore(notice, headerEnd); |
811 headerEnd.parentNode.insertBefore(notice, headerEnd); |
398 }; |
812 }; |
399 |
|
400 const container = document.createElement('div'); |
813 const container = document.createElement('div'); |
401 container.className = 'list-reusable-blocks__container'; |
814 container.className = 'list-reusable-blocks__container'; |
402 button.parentNode.insertBefore(container, button); |
815 button.parentNode.insertBefore(container, button); |
403 (0,external_wp_element_namespaceObject.render)((0,external_wp_element_namespaceObject.createElement)(import_dropdown, { |
816 (0,external_wp_element_namespaceObject.createRoot)(container).render( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(import_dropdown, { |
404 onUpload: showNotice |
817 onUpload: showNotice |
405 }), container); |
818 })); |
406 }); |
819 }); |
407 |
820 |
408 (window.wp = window.wp || {}).listReusableBlocks = __webpack_exports__; |
821 (window.wp = window.wp || {}).listReusableBlocks = __webpack_exports__; |
409 /******/ })() |
822 /******/ })() |
410 ; |
823 ; |