[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 /******/ (() => { // webpackBootstrap 2 /******/ "use strict"; 3 /******/ // The require scope 4 /******/ var __webpack_require__ = {}; 5 /******/ 6 /************************************************************************/ 7 /******/ /* webpack/runtime/define property getters */ 8 /******/ (() => { 9 /******/ // define getter functions for harmony exports 10 /******/ __webpack_require__.d = (exports, definition) => { 11 /******/ for(var key in definition) { 12 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 13 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 14 /******/ } 15 /******/ } 16 /******/ }; 17 /******/ })(); 18 /******/ 19 /******/ /* webpack/runtime/hasOwnProperty shorthand */ 20 /******/ (() => { 21 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) 22 /******/ })(); 23 /******/ 24 /******/ /* webpack/runtime/make namespace object */ 25 /******/ (() => { 26 /******/ // define __esModule on exports 27 /******/ __webpack_require__.r = (exports) => { 28 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 29 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 30 /******/ } 31 /******/ Object.defineProperty(exports, '__esModule', { value: true }); 32 /******/ }; 33 /******/ })(); 34 /******/ 35 /************************************************************************/ 36 var __webpack_exports__ = {}; 37 // ESM COMPAT FLAG 38 __webpack_require__.r(__webpack_exports__); 39 40 // EXPORTS 41 __webpack_require__.d(__webpack_exports__, { 42 compileCSS: () => (/* binding */ compileCSS), 43 getCSSRules: () => (/* binding */ getCSSRules), 44 getCSSValueFromRawStyle: () => (/* reexport */ getCSSValueFromRawStyle) 45 }); 46 47 ;// CONCATENATED MODULE: ./node_modules/tslib/tslib.es6.mjs 48 /****************************************************************************** 49 Copyright (c) Microsoft Corporation. 50 51 Permission to use, copy, modify, and/or distribute this software for any 52 purpose with or without fee is hereby granted. 53 54 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 55 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 56 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 57 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 58 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 59 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 60 PERFORMANCE OF THIS SOFTWARE. 61 ***************************************************************************** */ 62 /* global Reflect, Promise, SuppressedError, Symbol, Iterator */ 63 64 var extendStatics = function(d, b) { 65 extendStatics = Object.setPrototypeOf || 66 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || 67 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; 68 return extendStatics(d, b); 69 }; 70 71 function __extends(d, b) { 72 if (typeof b !== "function" && b !== null) 73 throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); 74 extendStatics(d, b); 75 function __() { this.constructor = d; } 76 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); 77 } 78 79 var __assign = function() { 80 __assign = Object.assign || function __assign(t) { 81 for (var s, i = 1, n = arguments.length; i < n; i++) { 82 s = arguments[i]; 83 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; 84 } 85 return t; 86 } 87 return __assign.apply(this, arguments); 88 } 89 90 function __rest(s, e) { 91 var t = {}; 92 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) 93 t[p] = s[p]; 94 if (s != null && typeof Object.getOwnPropertySymbols === "function") 95 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { 96 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) 97 t[p[i]] = s[p[i]]; 98 } 99 return t; 100 } 101 102 function __decorate(decorators, target, key, desc) { 103 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 104 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 105 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; 106 return c > 3 && r && Object.defineProperty(target, key, r), r; 107 } 108 109 function __param(paramIndex, decorator) { 110 return function (target, key) { decorator(target, key, paramIndex); } 111 } 112 113 function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { 114 function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } 115 var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; 116 var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; 117 var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); 118 var _, done = false; 119 for (var i = decorators.length - 1; i >= 0; i--) { 120 var context = {}; 121 for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; 122 for (var p in contextIn.access) context.access[p] = contextIn.access[p]; 123 context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; 124 var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); 125 if (kind === "accessor") { 126 if (result === void 0) continue; 127 if (result === null || typeof result !== "object") throw new TypeError("Object expected"); 128 if (_ = accept(result.get)) descriptor.get = _; 129 if (_ = accept(result.set)) descriptor.set = _; 130 if (_ = accept(result.init)) initializers.unshift(_); 131 } 132 else if (_ = accept(result)) { 133 if (kind === "field") initializers.unshift(_); 134 else descriptor[key] = _; 135 } 136 } 137 if (target) Object.defineProperty(target, contextIn.name, descriptor); 138 done = true; 139 }; 140 141 function __runInitializers(thisArg, initializers, value) { 142 var useValue = arguments.length > 2; 143 for (var i = 0; i < initializers.length; i++) { 144 value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); 145 } 146 return useValue ? value : void 0; 147 }; 148 149 function __propKey(x) { 150 return typeof x === "symbol" ? x : "".concat(x); 151 }; 152 153 function __setFunctionName(f, name, prefix) { 154 if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; 155 return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); 156 }; 157 158 function __metadata(metadataKey, metadataValue) { 159 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); 160 } 161 162 function __awaiter(thisArg, _arguments, P, generator) { 163 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 164 return new (P || (P = Promise))(function (resolve, reject) { 165 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 166 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 167 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 168 step((generator = generator.apply(thisArg, _arguments || [])).next()); 169 }); 170 } 171 172 function __generator(thisArg, body) { 173 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); 174 return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; 175 function verb(n) { return function (v) { return step([n, v]); }; } 176 function step(op) { 177 if (f) throw new TypeError("Generator is already executing."); 178 while (g && (g = 0, op[0] && (_ = 0)), _) try { 179 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; 180 if (y = 0, t) op = [op[0] & 2, t.value]; 181 switch (op[0]) { 182 case 0: case 1: t = op; break; 183 case 4: _.label++; return { value: op[1], done: false }; 184 case 5: _.label++; y = op[1]; op = [0]; continue; 185 case 7: op = _.ops.pop(); _.trys.pop(); continue; 186 default: 187 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } 188 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } 189 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } 190 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } 191 if (t[2]) _.ops.pop(); 192 _.trys.pop(); continue; 193 } 194 op = body.call(thisArg, _); 195 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } 196 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; 197 } 198 } 199 200 var __createBinding = Object.create ? (function(o, m, k, k2) { 201 if (k2 === undefined) k2 = k; 202 var desc = Object.getOwnPropertyDescriptor(m, k); 203 if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { 204 desc = { enumerable: true, get: function() { return m[k]; } }; 205 } 206 Object.defineProperty(o, k2, desc); 207 }) : (function(o, m, k, k2) { 208 if (k2 === undefined) k2 = k; 209 o[k2] = m[k]; 210 }); 211 212 function __exportStar(m, o) { 213 for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); 214 } 215 216 function __values(o) { 217 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; 218 if (m) return m.call(o); 219 if (o && typeof o.length === "number") return { 220 next: function () { 221 if (o && i >= o.length) o = void 0; 222 return { value: o && o[i++], done: !o }; 223 } 224 }; 225 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); 226 } 227 228 function __read(o, n) { 229 var m = typeof Symbol === "function" && o[Symbol.iterator]; 230 if (!m) return o; 231 var i = m.call(o), r, ar = [], e; 232 try { 233 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); 234 } 235 catch (error) { e = { error: error }; } 236 finally { 237 try { 238 if (r && !r.done && (m = i["return"])) m.call(i); 239 } 240 finally { if (e) throw e.error; } 241 } 242 return ar; 243 } 244 245 /** @deprecated */ 246 function __spread() { 247 for (var ar = [], i = 0; i < arguments.length; i++) 248 ar = ar.concat(__read(arguments[i])); 249 return ar; 250 } 251 252 /** @deprecated */ 253 function __spreadArrays() { 254 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; 255 for (var r = Array(s), k = 0, i = 0; i < il; i++) 256 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) 257 r[k] = a[j]; 258 return r; 259 } 260 261 function __spreadArray(to, from, pack) { 262 if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { 263 if (ar || !(i in from)) { 264 if (!ar) ar = Array.prototype.slice.call(from, 0, i); 265 ar[i] = from[i]; 266 } 267 } 268 return to.concat(ar || Array.prototype.slice.call(from)); 269 } 270 271 function __await(v) { 272 return this instanceof __await ? (this.v = v, this) : new __await(v); 273 } 274 275 function __asyncGenerator(thisArg, _arguments, generator) { 276 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); 277 var g = generator.apply(thisArg, _arguments || []), i, q = []; 278 return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; 279 function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } 280 function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } 281 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } 282 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } 283 function fulfill(value) { resume("next", value); } 284 function reject(value) { resume("throw", value); } 285 function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } 286 } 287 288 function __asyncDelegator(o) { 289 var i, p; 290 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; 291 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; } 292 } 293 294 function __asyncValues(o) { 295 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); 296 var m = o[Symbol.asyncIterator], i; 297 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); 298 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); }); }; } 299 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } 300 } 301 302 function __makeTemplateObject(cooked, raw) { 303 if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } 304 return cooked; 305 }; 306 307 var __setModuleDefault = Object.create ? (function(o, v) { 308 Object.defineProperty(o, "default", { enumerable: true, value: v }); 309 }) : function(o, v) { 310 o["default"] = v; 311 }; 312 313 function __importStar(mod) { 314 if (mod && mod.__esModule) return mod; 315 var result = {}; 316 if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 317 __setModuleDefault(result, mod); 318 return result; 319 } 320 321 function __importDefault(mod) { 322 return (mod && mod.__esModule) ? mod : { default: mod }; 323 } 324 325 function __classPrivateFieldGet(receiver, state, kind, f) { 326 if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); 327 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"); 328 return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); 329 } 330 331 function __classPrivateFieldSet(receiver, state, value, kind, f) { 332 if (kind === "m") throw new TypeError("Private method is not writable"); 333 if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); 334 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"); 335 return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; 336 } 337 338 function __classPrivateFieldIn(state, receiver) { 339 if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); 340 return typeof state === "function" ? receiver === state : state.has(receiver); 341 } 342 343 function __addDisposableResource(env, value, async) { 344 if (value !== null && value !== void 0) { 345 if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); 346 var dispose, inner; 347 if (async) { 348 if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); 349 dispose = value[Symbol.asyncDispose]; 350 } 351 if (dispose === void 0) { 352 if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); 353 dispose = value[Symbol.dispose]; 354 if (async) inner = dispose; 355 } 356 if (typeof dispose !== "function") throw new TypeError("Object not disposable."); 357 if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; 358 env.stack.push({ value: value, dispose: dispose, async: async }); 359 } 360 else if (async) { 361 env.stack.push({ async: true }); 362 } 363 return value; 364 } 365 366 var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { 367 var e = new Error(message); 368 return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; 369 }; 370 371 function __disposeResources(env) { 372 function fail(e) { 373 env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; 374 env.hasError = true; 375 } 376 var r, s = 0; 377 function next() { 378 while (r = env.stack.pop()) { 379 try { 380 if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); 381 if (r.dispose) { 382 var result = r.dispose.call(r.value); 383 if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); 384 } 385 else s |= 1; 386 } 387 catch (e) { 388 fail(e); 389 } 390 } 391 if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); 392 if (env.hasError) throw env.error; 393 } 394 return next(); 395 } 396 397 /* harmony default export */ const tslib_es6 = ({ 398 __extends, 399 __assign, 400 __rest, 401 __decorate, 402 __param, 403 __metadata, 404 __awaiter, 405 __generator, 406 __createBinding, 407 __exportStar, 408 __values, 409 __read, 410 __spread, 411 __spreadArrays, 412 __spreadArray, 413 __await, 414 __asyncGenerator, 415 __asyncDelegator, 416 __asyncValues, 417 __makeTemplateObject, 418 __importStar, 419 __importDefault, 420 __classPrivateFieldGet, 421 __classPrivateFieldSet, 422 __classPrivateFieldIn, 423 __addDisposableResource, 424 __disposeResources, 425 }); 426 427 ;// CONCATENATED MODULE: ./node_modules/lower-case/dist.es2015/index.js 428 /** 429 * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt 430 */ 431 var SUPPORTED_LOCALE = { 432 tr: { 433 regexp: /\u0130|\u0049|\u0049\u0307/g, 434 map: { 435 İ: "\u0069", 436 I: "\u0131", 437 İ: "\u0069", 438 }, 439 }, 440 az: { 441 regexp: /\u0130/g, 442 map: { 443 İ: "\u0069", 444 I: "\u0131", 445 İ: "\u0069", 446 }, 447 }, 448 lt: { 449 regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g, 450 map: { 451 I: "\u0069\u0307", 452 J: "\u006A\u0307", 453 Į: "\u012F\u0307", 454 Ì: "\u0069\u0307\u0300", 455 Í: "\u0069\u0307\u0301", 456 Ĩ: "\u0069\u0307\u0303", 457 }, 458 }, 459 }; 460 /** 461 * Localized lower case. 462 */ 463 function localeLowerCase(str, locale) { 464 var lang = SUPPORTED_LOCALE[locale.toLowerCase()]; 465 if (lang) 466 return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; })); 467 return lowerCase(str); 468 } 469 /** 470 * Lower case as a function. 471 */ 472 function lowerCase(str) { 473 return str.toLowerCase(); 474 } 475 476 ;// CONCATENATED MODULE: ./node_modules/no-case/dist.es2015/index.js 477 478 // Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case"). 479 var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g]; 480 // Remove all non-word characters. 481 var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi; 482 /** 483 * Normalize the string into something other libraries can manipulate easier. 484 */ 485 function noCase(input, options) { 486 if (options === void 0) { options = {}; } 487 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; 488 var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0"); 489 var start = 0; 490 var end = result.length; 491 // Trim the delimiter from around the output string. 492 while (result.charAt(start) === "\0") 493 start++; 494 while (result.charAt(end - 1) === "\0") 495 end--; 496 // Transform each token independently. 497 return result.slice(start, end).split("\0").map(transform).join(delimiter); 498 } 499 /** 500 * Replace `re` in the input string with the replacement value. 501 */ 502 function replace(input, re, value) { 503 if (re instanceof RegExp) 504 return input.replace(re, value); 505 return re.reduce(function (input, re) { return input.replace(re, value); }, input); 506 } 507 508 ;// CONCATENATED MODULE: ./node_modules/dot-case/dist.es2015/index.js 509 510 511 function dotCase(input, options) { 512 if (options === void 0) { options = {}; } 513 return noCase(input, __assign({ delimiter: "." }, options)); 514 } 515 516 ;// CONCATENATED MODULE: ./node_modules/param-case/dist.es2015/index.js 517 518 519 function paramCase(input, options) { 520 if (options === void 0) { options = {}; } 521 return dotCase(input, __assign({ delimiter: "-" }, options)); 522 } 523 524 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/constants.js 525 const VARIABLE_REFERENCE_PREFIX = 'var:'; 526 const VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE = '|'; 527 const VARIABLE_PATH_SEPARATOR_TOKEN_STYLE = '--'; 528 529 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/utils.js 530 /** 531 * External dependencies 532 */ 533 534 535 /** 536 * Internal dependencies 537 */ 538 539 540 541 /** 542 * Helper util to return a value from a certain path of the object. 543 * Path is specified as an array of properties, like `[ 'x', 'y' ]`. 544 * 545 * @param object Input object. 546 * @param path Path to the object property. 547 * @return Value of the object property at the specified path. 548 */ 549 const getStyleValueByPath = (object, path) => { 550 let value = object; 551 path.forEach(fieldName => { 552 value = value?.[fieldName]; 553 }); 554 return value; 555 }; 556 557 /** 558 * Returns a JSON representation of the generated CSS rules. 559 * 560 * @param style Style object. 561 * @param options Options object with settings to adjust how the styles are generated. 562 * @param path An array of strings representing the path to the style value in the style object. 563 * @param ruleKey A CSS property key. 564 * 565 * @return GeneratedCSSRule[] CSS rules. 566 */ 567 function generateRule(style, options, path, ruleKey) { 568 const styleValue = getStyleValueByPath(style, path); 569 return styleValue ? [{ 570 selector: options?.selector, 571 key: ruleKey, 572 value: getCSSValueFromRawStyle(styleValue) 573 }] : []; 574 } 575 576 /** 577 * Returns a JSON representation of the generated CSS rules taking into account box model properties, top, right, bottom, left. 578 * 579 * @param style Style object. 580 * @param options Options object with settings to adjust how the styles are generated. 581 * @param path An array of strings representing the path to the style value in the style object. 582 * @param ruleKeys An array of CSS property keys and patterns. 583 * @param individualProperties The "sides" or individual properties for which to generate rules. 584 * 585 * @return GeneratedCSSRule[] CSS rules. 586 */ 587 function generateBoxRules(style, options, path, ruleKeys, individualProperties = ['top', 'right', 'bottom', 'left']) { 588 const boxStyle = getStyleValueByPath(style, path); 589 if (!boxStyle) { 590 return []; 591 } 592 const rules = []; 593 if (typeof boxStyle === 'string') { 594 rules.push({ 595 selector: options?.selector, 596 key: ruleKeys.default, 597 value: boxStyle 598 }); 599 } else { 600 const sideRules = individualProperties.reduce((acc, side) => { 601 const value = getCSSValueFromRawStyle(getStyleValueByPath(boxStyle, [side])); 602 if (value) { 603 acc.push({ 604 selector: options?.selector, 605 key: ruleKeys?.individual.replace('%s', upperFirst(side)), 606 value 607 }); 608 } 609 return acc; 610 }, []); 611 rules.push(...sideRules); 612 } 613 return rules; 614 } 615 616 /** 617 * Returns a WordPress CSS custom var value from incoming style preset value, 618 * if one is detected. 619 * 620 * The preset value is a string and follows the pattern `var:description|context|slug`. 621 * 622 * Example: 623 * 624 * `getCSSValueFromRawStyle( 'var:preset|color|heavenlyBlue' )` // returns 'var(--wp--preset--color--heavenly-blue)' 625 * 626 * @param styleValue A string representing a raw CSS value. Non-strings won't be processed. 627 * 628 * @return A CSS custom var value if the incoming style value is a preset value. 629 */ 630 631 function getCSSValueFromRawStyle(styleValue) { 632 if (typeof styleValue === 'string' && styleValue.startsWith(VARIABLE_REFERENCE_PREFIX)) { 633 const variable = styleValue.slice(VARIABLE_REFERENCE_PREFIX.length).split(VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE).map(presetVariable => paramCase(presetVariable, { 634 splitRegexp: [/([a-z0-9])([A-Z])/g, 635 // fooBar => foo-bar, 3Bar => 3-bar 636 /([0-9])([a-z])/g, 637 // 3bar => 3-bar 638 /([A-Za-z])([0-9])/g, 639 // Foo3 => foo-3, foo3 => foo-3 640 /([A-Z])([A-Z][a-z])/g // FOOBar => foo-bar 641 ] 642 })).join(VARIABLE_PATH_SEPARATOR_TOKEN_STYLE); 643 return `var(--wp--$variable})`; 644 } 645 return styleValue; 646 } 647 648 /** 649 * Capitalizes the first letter in a string. 650 * 651 * @param string The string whose first letter the function will capitalize. 652 * 653 * @return String with the first letter capitalized. 654 */ 655 function upperFirst(string) { 656 const [firstLetter, ...rest] = string; 657 return firstLetter.toUpperCase() + rest.join(''); 658 } 659 660 /** 661 * Converts an array of strings into a camelCase string. 662 * 663 * @param strings The strings to join into a camelCase string. 664 * 665 * @return camelCase string. 666 */ 667 function camelCaseJoin(strings) { 668 const [firstItem, ...rest] = strings; 669 return firstItem.toLowerCase() + rest.map(upperFirst).join(''); 670 } 671 672 /** 673 * Safely decodes a URI with `decodeURI`. Returns the URI unmodified if 674 * `decodeURI` throws an error. 675 * 676 * @param {string} uri URI to decode. 677 * 678 * @example 679 * ```js 680 * const badUri = safeDecodeURI( '%z' ); // does not throw an Error, simply returns '%z' 681 * ``` 682 * 683 * @return {string} Decoded URI if possible. 684 */ 685 function safeDecodeURI(uri) { 686 try { 687 return decodeURI(uri); 688 } catch (uriError) { 689 return uri; 690 } 691 } 692 693 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/border/index.js 694 /** 695 * Internal dependencies 696 */ 697 698 699 700 /** 701 * Creates a function for generating CSS rules when the style path is the same as the camelCase CSS property used in React. 702 * 703 * @param path An array of strings representing the path to the style value in the style object. 704 * 705 * @return A function that generates CSS rules. 706 */ 707 function createBorderGenerateFunction(path) { 708 return (style, options) => generateRule(style, options, path, camelCaseJoin(path)); 709 } 710 711 /** 712 * Creates a function for generating border-{top,bottom,left,right}-{color,style,width} CSS rules. 713 * 714 * @param edge The edge to create CSS rules for. 715 * 716 * @return A function that generates CSS rules. 717 */ 718 function createBorderEdgeGenerateFunction(edge) { 719 return (style, options) => { 720 return ['color', 'style', 'width'].flatMap(key => { 721 const path = ['border', edge, key]; 722 return createBorderGenerateFunction(path)(style, options); 723 }); 724 }; 725 } 726 const color = { 727 name: 'color', 728 generate: createBorderGenerateFunction(['border', 'color']) 729 }; 730 const radius = { 731 name: 'radius', 732 generate: (style, options) => { 733 return generateBoxRules(style, options, ['border', 'radius'], { 734 default: 'borderRadius', 735 individual: 'border%sRadius' 736 }, ['topLeft', 'topRight', 'bottomLeft', 'bottomRight']); 737 } 738 }; 739 const borderStyle = { 740 name: 'style', 741 generate: createBorderGenerateFunction(['border', 'style']) 742 }; 743 const width = { 744 name: 'width', 745 generate: createBorderGenerateFunction(['border', 'width']) 746 }; 747 const borderTop = { 748 name: 'borderTop', 749 generate: createBorderEdgeGenerateFunction('top') 750 }; 751 const borderRight = { 752 name: 'borderRight', 753 generate: createBorderEdgeGenerateFunction('right') 754 }; 755 const borderBottom = { 756 name: 'borderBottom', 757 generate: createBorderEdgeGenerateFunction('bottom') 758 }; 759 const borderLeft = { 760 name: 'borderLeft', 761 generate: createBorderEdgeGenerateFunction('left') 762 }; 763 /* harmony default export */ const border = ([color, borderStyle, width, radius, borderTop, borderRight, borderBottom, borderLeft]); 764 765 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/color/background.js 766 /** 767 * Internal dependencies 768 */ 769 770 771 const background = { 772 name: 'background', 773 generate: (style, options) => { 774 return generateRule(style, options, ['color', 'background'], 'backgroundColor'); 775 } 776 }; 777 /* harmony default export */ const color_background = (background); 778 779 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/color/gradient.js 780 /** 781 * Internal dependencies 782 */ 783 784 785 const gradient = { 786 name: 'gradient', 787 generate: (style, options) => { 788 return generateRule(style, options, ['color', 'gradient'], 'background'); 789 } 790 }; 791 /* harmony default export */ const color_gradient = (gradient); 792 793 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/color/text.js 794 /** 795 * Internal dependencies 796 */ 797 798 799 const text_text = { 800 name: 'text', 801 generate: (style, options) => { 802 return generateRule(style, options, ['color', 'text'], 'color'); 803 } 804 }; 805 /* harmony default export */ const color_text = (text_text); 806 807 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/color/index.js 808 /** 809 * Internal dependencies 810 */ 811 812 813 814 /* harmony default export */ const styles_color = ([color_text, color_gradient, color_background]); 815 816 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/dimensions/index.js 817 /** 818 * Internal dependencies 819 */ 820 821 822 const minHeight = { 823 name: 'minHeight', 824 generate: (style, options) => { 825 return generateRule(style, options, ['dimensions', 'minHeight'], 'minHeight'); 826 } 827 }; 828 const aspectRatio = { 829 name: 'aspectRatio', 830 generate: (style, options) => { 831 return generateRule(style, options, ['dimensions', 'aspectRatio'], 'aspectRatio'); 832 } 833 }; 834 /* harmony default export */ const dimensions = ([minHeight, aspectRatio]); 835 836 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/background/index.js 837 /** 838 * Internal dependencies 839 */ 840 841 842 const backgroundImage = { 843 name: 'backgroundImage', 844 generate: (style, options) => { 845 const _backgroundImage = style?.background?.backgroundImage; 846 847 /* 848 * The background image can be a string or an object. 849 * If the background image is a string, it could already contain a url() function, 850 * or have a linear-gradient value. 851 */ 852 if (typeof _backgroundImage === 'object' && _backgroundImage?.url) { 853 return [{ 854 selector: options.selector, 855 key: 'backgroundImage', 856 // Passed `url` may already be encoded. To prevent double encoding, decodeURI is executed to revert to the original string. 857 value: `url( '$encodeURI(safeDecodeURI(_backgroundImage.url))}' )` 858 }]; 859 } 860 return generateRule(style, options, ['background', 'backgroundImage'], 'backgroundImage'); 861 } 862 }; 863 const backgroundPosition = { 864 name: 'backgroundPosition', 865 generate: (style, options) => { 866 return generateRule(style, options, ['background', 'backgroundPosition'], 'backgroundPosition'); 867 } 868 }; 869 const backgroundRepeat = { 870 name: 'backgroundRepeat', 871 generate: (style, options) => { 872 return generateRule(style, options, ['background', 'backgroundRepeat'], 'backgroundRepeat'); 873 } 874 }; 875 const backgroundSize = { 876 name: 'backgroundSize', 877 generate: (style, options) => { 878 return generateRule(style, options, ['background', 'backgroundSize'], 'backgroundSize'); 879 } 880 }; 881 const backgroundAttachment = { 882 name: 'backgroundAttachment', 883 generate: (style, options) => { 884 return generateRule(style, options, ['background', 'backgroundAttachment'], 'backgroundAttachment'); 885 } 886 }; 887 /* harmony default export */ const styles_background = ([backgroundImage, backgroundPosition, backgroundRepeat, backgroundSize, backgroundAttachment]); 888 889 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/shadow/index.js 890 /** 891 * Internal dependencies 892 */ 893 894 895 const shadow = { 896 name: 'shadow', 897 generate: (style, options) => { 898 return generateRule(style, options, ['shadow'], 'boxShadow'); 899 } 900 }; 901 /* harmony default export */ const styles_shadow = ([shadow]); 902 903 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/outline/index.js 904 /** 905 * Internal dependencies 906 */ 907 908 909 const outline_color = { 910 name: 'color', 911 generate: (style, options, path = ['outline', 'color'], ruleKey = 'outlineColor') => { 912 return generateRule(style, options, path, ruleKey); 913 } 914 }; 915 const offset = { 916 name: 'offset', 917 generate: (style, options, path = ['outline', 'offset'], ruleKey = 'outlineOffset') => { 918 return generateRule(style, options, path, ruleKey); 919 } 920 }; 921 const outlineStyle = { 922 name: 'style', 923 generate: (style, options, path = ['outline', 'style'], ruleKey = 'outlineStyle') => { 924 return generateRule(style, options, path, ruleKey); 925 } 926 }; 927 const outline_width = { 928 name: 'width', 929 generate: (style, options, path = ['outline', 'width'], ruleKey = 'outlineWidth') => { 930 return generateRule(style, options, path, ruleKey); 931 } 932 }; 933 /* harmony default export */ const outline = ([outline_color, outlineStyle, offset, outline_width]); 934 935 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/spacing/padding.js 936 /** 937 * Internal dependencies 938 */ 939 940 941 const padding = { 942 name: 'padding', 943 generate: (style, options) => { 944 return generateBoxRules(style, options, ['spacing', 'padding'], { 945 default: 'padding', 946 individual: 'padding%s' 947 }); 948 } 949 }; 950 /* harmony default export */ const spacing_padding = (padding); 951 952 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/spacing/margin.js 953 /** 954 * Internal dependencies 955 */ 956 957 958 const margin = { 959 name: 'margin', 960 generate: (style, options) => { 961 return generateBoxRules(style, options, ['spacing', 'margin'], { 962 default: 'margin', 963 individual: 'margin%s' 964 }); 965 } 966 }; 967 /* harmony default export */ const spacing_margin = (margin); 968 969 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/spacing/index.js 970 /** 971 * Internal dependencies 972 */ 973 974 975 /* harmony default export */ const spacing = ([spacing_margin, spacing_padding]); 976 977 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/typography/index.js 978 /** 979 * Internal dependencies 980 */ 981 982 983 const fontSize = { 984 name: 'fontSize', 985 generate: (style, options) => { 986 return generateRule(style, options, ['typography', 'fontSize'], 'fontSize'); 987 } 988 }; 989 const fontStyle = { 990 name: 'fontStyle', 991 generate: (style, options) => { 992 return generateRule(style, options, ['typography', 'fontStyle'], 'fontStyle'); 993 } 994 }; 995 const fontWeight = { 996 name: 'fontWeight', 997 generate: (style, options) => { 998 return generateRule(style, options, ['typography', 'fontWeight'], 'fontWeight'); 999 } 1000 }; 1001 const fontFamily = { 1002 name: 'fontFamily', 1003 generate: (style, options) => { 1004 return generateRule(style, options, ['typography', 'fontFamily'], 'fontFamily'); 1005 } 1006 }; 1007 const letterSpacing = { 1008 name: 'letterSpacing', 1009 generate: (style, options) => { 1010 return generateRule(style, options, ['typography', 'letterSpacing'], 'letterSpacing'); 1011 } 1012 }; 1013 const lineHeight = { 1014 name: 'lineHeight', 1015 generate: (style, options) => { 1016 return generateRule(style, options, ['typography', 'lineHeight'], 'lineHeight'); 1017 } 1018 }; 1019 const textColumns = { 1020 name: 'textColumns', 1021 generate: (style, options) => { 1022 return generateRule(style, options, ['typography', 'textColumns'], 'columnCount'); 1023 } 1024 }; 1025 const textDecoration = { 1026 name: 'textDecoration', 1027 generate: (style, options) => { 1028 return generateRule(style, options, ['typography', 'textDecoration'], 'textDecoration'); 1029 } 1030 }; 1031 const textTransform = { 1032 name: 'textTransform', 1033 generate: (style, options) => { 1034 return generateRule(style, options, ['typography', 'textTransform'], 'textTransform'); 1035 } 1036 }; 1037 const writingMode = { 1038 name: 'writingMode', 1039 generate: (style, options) => { 1040 return generateRule(style, options, ['typography', 'writingMode'], 'writingMode'); 1041 } 1042 }; 1043 /* harmony default export */ const typography = ([fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textColumns, textDecoration, textTransform, writingMode]); 1044 1045 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/index.js 1046 /** 1047 * Internal dependencies 1048 */ 1049 1050 1051 1052 1053 1054 1055 1056 1057 const styleDefinitions = [...border, ...styles_color, ...dimensions, ...outline, ...spacing, ...typography, ...styles_shadow, ...styles_background]; 1058 1059 ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/index.js 1060 /** 1061 * External dependencies 1062 */ 1063 1064 1065 /** 1066 * Internal dependencies 1067 */ 1068 1069 1070 1071 /** 1072 * Generates a stylesheet for a given style object and selector. 1073 * 1074 * @since 6.1.0 Introduced in WordPress core. 1075 * 1076 * @param style Style object, for example, the value of a block's attributes.style object or the top level styles in theme.json 1077 * @param options Options object with settings to adjust how the styles are generated. 1078 * 1079 * @return A generated stylesheet or inline style declarations. 1080 */ 1081 function compileCSS(style, options = {}) { 1082 const rules = getCSSRules(style, options); 1083 1084 // If no selector is provided, treat generated rules as inline styles to be returned as a single string. 1085 if (!options?.selector) { 1086 const inlineRules = []; 1087 rules.forEach(rule => { 1088 inlineRules.push(`$paramCase(rule.key)}: $rule.value};`); 1089 }); 1090 return inlineRules.join(' '); 1091 } 1092 const groupedRules = rules.reduce((acc, rule) => { 1093 const { 1094 selector 1095 } = rule; 1096 if (!selector) { 1097 return acc; 1098 } 1099 if (!acc[selector]) { 1100 acc[selector] = []; 1101 } 1102 acc[selector].push(rule); 1103 return acc; 1104 }, {}); 1105 const selectorRules = Object.keys(groupedRules).reduce((acc, subSelector) => { 1106 acc.push(`$subSelector} { $groupedRules[subSelector].map(rule => `$paramCase(rule.key)}: $rule.value};`).join(' ')} }`); 1107 return acc; 1108 }, []); 1109 return selectorRules.join('\n'); 1110 } 1111 1112 /** 1113 * Returns a JSON representation of the generated CSS rules. 1114 * 1115 * @since 6.1.0 Introduced in WordPress core. 1116 * 1117 * @param style Style object, for example, the value of a block's attributes.style object or the top level styles in theme.json 1118 * @param options Options object with settings to adjust how the styles are generated. 1119 * 1120 * @return A collection of objects containing the selector, if any, the CSS property key (camelcase) and parsed CSS value. 1121 */ 1122 function getCSSRules(style, options = {}) { 1123 const rules = []; 1124 styleDefinitions.forEach(definition => { 1125 if (typeof definition.generate === 'function') { 1126 rules.push(...definition.generate(style, options)); 1127 } 1128 }); 1129 return rules; 1130 } 1131 1132 // Export style utils. 1133 1134 1135 (window.wp = window.wp || {}).styleEngine = __webpack_exports__; 1136 /******/ })() 1137 ;
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated : Thu Nov 21 08:20:01 2024 | Cross-referenced by PHPXref |