/home/techb158/public_html/wp-includes/js/dist
NameSizeModeActions
development/-0777rm
script-modules/-0755rm
vendor/-0777rm
a11y.js56970666editdlrm
a11y.min.js26160666editdlrm
annotations.js159520666editdlrm
annotations.min.js59780666editdlrm
api-fetch.js200030666editdlrm
api-fetch.min.js75100666editdlrm
autop.js100190666editdlrm
autop.min.js56940666editdlrm
base-styles.js1150666editdlrm
base-styles.min.js1420666editdlrm
blob.js24100666editdlrm
blob.min.js12430666editdlrm
block-directory.js3816380666editdlrm
block-directory.min.js1295730666editdlrm
block-editor.js37792910666editdlrm
block-editor.min.js14111060666editdlrm
block-library.js30226840666editdlrm
block-library.min.js13043780666editdlrm
block-serialization-default-parser.js68000666editdlrm
block-serialization-default-parser.min.js25600666editdlrm
block-serialization-spec-parser.js517960666editdlrm
block-serialization-spec-parser.min.js107280666editdlrm
blocks.js2999050666editdlrm
blocks.min.js1464260666editdlrm
commands.js1317390666editdlrm
commands.min.js572270666editdlrm
components.js38212980666editdlrm
components.min.js8366890666editdlrm
compose.js857520666editdlrm
compose.min.js300980666editdlrm
core-commands.js298050666editdlrm
core-commands.min.js124890666editdlrm
core-data.js6758400666editdlrm
core-data.min.js2319570666editdlrm
customize-widgets.js1142260666editdlrm
customize-widgets.min.js444660666editdlrm
data-controls.js43010666editdlrm
data-controls.min.js18850666editdlrm
data.js856980666editdlrm
data.min.js266640666editdlrm
date.js1809350666editdlrm
date.min.js1447470666editdlrm
deprecated.js31800666editdlrm
deprecated.min.js13820666editdlrm
dom-ready.js15710666editdlrm
dom-ready.min.js8810666editdlrm
dom.js359620666editdlrm
dom.min.js131720666editdlrm
edit-post.js4513590666editdlrm
edit-post.min.js1601570666editdlrm
edit-site.js23047570666editdlrm
edit-site.min.js9052880666editdlrm
edit-widgets.js1846200666editdlrm
edit-widgets.min.js704650666editdlrm
editor.js39683670666editdlrm
editor.min.js15738860666editdlrm
element.js279710666editdlrm
element.min.js124680666editdlrm
escape-html.js24130666editdlrm
escape-html.min.js11580666editdlrm
format-library.js2349570666editdlrm
format-library.min.js984950666editdlrm
hooks.js122990666editdlrm
hooks.min.js51070666editdlrm
html-entities.js17560666editdlrm
html-entities.min.js9500666editdlrm
i18n.js157250666editdlrm
i18n.min.js57910666editdlrm
is-shallow-equal.js28330666editdlrm
is-shallow-equal.min.js11970666editdlrm
keyboard-shortcuts.js105080666editdlrm
keyboard-shortcuts.min.js36820666editdlrm
keycodes.js85640666editdlrm
keycodes.min.js30380666editdlrm
list-reusable-blocks.js136620666editdlrm
list-reusable-blocks.min.js55390666editdlrm
media-utils.js10650270666editdlrm
media-utils.min.js3909950666editdlrm
notices.js97830666editdlrm
notices.min.js39470666editdlrm
nux.js44230666editdlrm
nux.min.js17490666editdlrm
patterns.js901840666editdlrm
patterns.min.js383020666editdlrm
plugins.js212200666editdlrm
plugins.min.js72530666editdlrm
preferences-persistence.js177200666editdlrm
preferences-persistence.min.js57130666editdlrm
preferences.js215310666editdlrm
preferences.min.js80280666editdlrm
primitives.js52700666editdlrm
primitives.min.js20930666editdlrm
priority-queue.js103380666editdlrm
priority-queue.min.js35050666editdlrm
private-apis.js45310666editdlrm
private-apis.min.js30170666editdlrm
react-i18n.js40640666editdlrm
react-i18n.min.js16270666editdlrm
redux-routine.js253460666editdlrm
redux-routine.min.js99520666editdlrm
reusable-blocks.js223910666editdlrm
reusable-blocks.min.js81850666editdlrm
rich-text.js1074050666editdlrm
rich-text.min.js431820666editdlrm
router.js370790666editdlrm
router.min.js145520666editdlrm
server-side-render.js115880666editdlrm
server-side-render.min.js41980666editdlrm
shortcode.js82150666editdlrm
shortcode.min.js34260666editdlrm
style-engine.js188100666editdlrm
style-engine.min.js69460666editdlrm
theme.js1387330666editdlrm
theme.min.js611440666editdlrm
token-list.js63270666editdlrm
token-list.min.js17230666editdlrm
undo-manager.js54910666editdlrm
undo-manager.min.js18080666editdlrm
upload-media.js1180360666editdlrm
upload-media.min.js498740666editdlrm
url.js239570666editdlrm
url.min.js104230666editdlrm
viewport.js73120666editdlrm
viewport.min.js23740666editdlrm
warning.js16160666editdlrm
warning.min.js8160666editdlrm
widgets.js513460666editdlrm
widgets.min.js214750666editdlrm
wordcount.js71660666editdlrm
wordcount.min.js25700666editdlrm
Edit: /home/techb158/public_html/wp-includes/js/dist/shortcode.js (8215B)
(function() { "use strict"; var wp; (wp ||= {}).shortcode = (() => { var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // packages/shortcode/build-module/index.mjs var index_exports = {}; __export(index_exports, { attrs: () => attrs, default: () => index_default, fromMatch: () => fromMatch, next: () => next, regexp: () => regexp, replace: () => replace, string: () => string }); // node_modules/memize/dist/index.js function memize(fn, options) { var size = 0; var head; var tail; options = options || {}; function memoized() { var node = head, len = arguments.length, args, i; searchCache: while (node) { if (node.args.length !== arguments.length) { node = node.next; continue; } for (i = 0; i < len; i++) { if (node.args[i] !== arguments[i]) { node = node.next; continue searchCache; } } if (node !== head) { if (node === tail) { tail = node.prev; } node.prev.next = node.next; if (node.next) { node.next.prev = node.prev; } node.next = head; node.prev = null; head.prev = node; head = node; } return node.val; } args = new Array(len); for (i = 0; i < len; i++) { args[i] = arguments[i]; } node = { args, // Generate the result from original function val: fn.apply(null, args) }; if (head) { head.prev = node; node.next = head; } else { tail = node; } if (size === /** @type {MemizeOptions} */ options.maxSize) { tail = /** @type {MemizeCacheNode} */ tail.prev; tail.next = null; } else { size++; } head = node; return node.val; } memoized.clear = function() { head = null; tail = null; size = 0; }; return memoized; } // packages/shortcode/build-module/index.mjs function next(tag, text, index = 0) { const re = regexp(tag); re.lastIndex = index; const match = re.exec(text); if (!match) { return; } if ("[" === match[1] && "]" === match[7]) { return next(tag, text, re.lastIndex); } const result = { index: match.index, content: match[0], shortcode: fromMatch(match) }; if (match[1]) { result.content = result.content.slice(1); result.index++; } if (match[7]) { result.content = result.content.slice(0, -1); } return result; } function replace(tag, text, callback) { return text.replace( regexp(tag), // Let us use spread syntax to capture the arguments object. (...args) => { const match = args[0]; const left = args[1]; const right = args[7]; if (left === "[" && right === "]") { return match; } const result = callback(fromMatch(args)); return result || result === "" ? left + result + right : match; } ); } function string(options) { return new Shortcode(options).string(); } function regexp(tag) { return new RegExp( "\\[(\\[?)(" + tag + ")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)", "g" ); } var attrs = memize((text) => { const named = {}; const numeric = []; const pattern = /([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g; text = text.replace(/[\u00a0\u200b]/g, " "); let match; while (match = pattern.exec(text)) { if (match[1]) { named[match[1].toLowerCase()] = match[2]; } else if (match[3]) { named[match[3].toLowerCase()] = match[4]; } else if (match[5]) { named[match[5].toLowerCase()] = match[6]; } else if (match[7]) { numeric.push(match[7]); } else if (match[8]) { numeric.push(match[8]); } else if (match[9]) { numeric.push(match[9]); } } return { named, numeric }; }); function fromMatch(match) { let type; if (match[4]) { type = "self-closing"; } else if (match[6]) { type = "closed"; } else { type = "single"; } return new Shortcode({ tag: match[2], attrs: match[3], type, content: match[5] }); } var Shortcode = class { // Instance properties tag; type; content; attrs; // Static methods static next = next; static replace = replace; static string = string; static regexp = regexp; static attrs = attrs; static fromMatch = fromMatch; constructor(options) { const { tag, attrs: attributes, type, content } = options; this.tag = tag; this.type = type; this.content = content; this.attrs = { named: {}, numeric: [] }; if (!attributes) { return; } if (typeof attributes === "string") { this.attrs = attrs(attributes); } else if ("named" in attributes && "numeric" in attributes && attributes.named !== void 0 && attributes.numeric !== void 0) { this.attrs = attributes; } else { Object.entries(attributes).forEach(([key, value]) => { if (value !== void 0) { this.set(key, String(value)); } }); } } /** * Get a shortcode attribute. * * Automatically detects whether `attr` is named or numeric and routes it * accordingly. * * @param attr Attribute key. * * @return Attribute value. */ get(attr) { if (typeof attr === "number") { return this.attrs.numeric[attr]; } return this.attrs.named[attr]; } /** * Set a shortcode attribute. * * Automatically detects whether `attr` is named or numeric and routes it * accordingly. * * @param attr Attribute key. * @param value Attribute value. * * @return Shortcode instance. */ set(attr, value) { if (typeof attr === "number") { this.attrs.numeric[attr] = value; } else { this.attrs.named[attr] = value; } return this; } /** * Transform the shortcode into a string. * * @return String representation of the shortcode. */ string() { let text = "[" + this.tag; this.attrs.numeric.forEach((value) => { if (/\s/.test(value)) { text += ' "' + value + '"'; } else { text += " " + value; } }); Object.entries(this.attrs.named).forEach(([name, value]) => { text += " " + name + '="' + value + '"'; }); if ("single" === this.type) { return text + "]"; } else if ("self-closing" === this.type) { return text + " /]"; } text += "]"; if (this.content) { text += this.content; } return text + "[/" + this.tag + "]"; } }; var index_default = Shortcode; return __toCommonJS(index_exports); })(); if (typeof wp.shortcode === 'object' && wp.shortcode.default) { wp.shortcode = wp.shortcode.default; } (window.wp ||= {}).shortcode = wp.shortcode; })();