%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/dordingu/public_html/hardkjarni/wp-content/plugins/gutenberg/build/autop/
Upload File :
Create Path :
Current File : /home/dordingu/public_html/hardkjarni/wp-content/plugins/gutenberg/build/autop/index.min.js.map

{"version":3,"file":"./build/autop/index.min.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDH,EAAwB,CAACS,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFV,EAAyBC,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,+CCA9D,MAAMC,EAyCE,IAAIC,OATV,4HAoDF,SAASC,EAAmBC,EAAUC,GAErC,MAAMC,EAlCP,SAAoBC,GACnB,MAAMC,EAAQ,GACd,IAEIC,EAFAC,EAAeH,EAGnB,KAAUE,EAAQC,EAAaD,MAAOR,IAAqB,CAK1D,MAAMU,EAAgCF,EAAME,MAE5CH,EAAMI,KAAMF,EAAaG,MAAO,EAAGF,IACnCH,EAAMI,KAAMH,EAAO,IACnBC,EAAeA,EAAaG,MAAOF,EAAQF,EAAO,GAAIK,OACtD,CAMD,OAJKJ,EAAaI,QACjBN,EAAMI,KAAMF,GAGNF,CACP,CAYgBO,CAAWX,GAC3B,IAAIY,GAAU,EAGd,MAAMC,EAAU5B,OAAO6B,KAAMb,GAG7B,IAAM,IAAIc,EAAI,EAAGA,EAAIb,EAAQQ,OAAQK,GAAK,EACzC,IAAM,IAAIC,EAAI,EAAGA,EAAIH,EAAQH,OAAQM,IAAM,CAC1C,MAAM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AC/C,YAIW7B,QAAS,uBAAwB,YAGnCD,QAAS,aAElB2B,GADAA,EAAOA,EAAK1B,QAAS,cAAe,cACxBA,QAAS,iBAAkB,iBAIR,IAA3B0B,EAAK3B,QAAS,SAClB2B,EAAOA,EAAK1B,QAAS,uBAAwB,oBAIV,IAA/B0B,EAAK3B,QAAS,aAClB2B,EAAOA,EAAK1B,QAAS,8BAAgCqB,GAC7CA,EAAErB,QAAS,WAAY,OAYhC0B,GADAA,GAHAA,GAHAA,EAAOA,EAAK1B,QAAS,UAAW,WAGpBA,QAAS,+BAAgC,SAGzCA,QAAS,OAAQ,KACjBA,QAAS,eAAgB,IAEhC+B,IACJL,EAAOA,EAAK1B,QAAS,mBAAoB,OAGrCgC,IACJN,EAAOA,EAAK1B,QAAS,uBAAwB,WAIzC8B,EAASvC,SACbmC,EAAOA,EAAK1B,QAAS,kBAAkB,IACP8B,EAASK,WAInCT,GArIC,EAsIR,E","sources":["webpack://wp/webpack/bootstrap","webpack://wp/webpack/runtime/define property getters","webpack://wp/webpack/runtime/hasOwnProperty shorthand","webpack://wp/webpack/runtime/make namespace object","webpack://wp/./packages/autop/build-module/@wordpress/autop/src/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * The regular expression for an HTML element.\n *\n * @type {RegExp}\n */\nconst htmlSplitRegex = ( () => {\n\t/* eslint-disable no-multi-spaces */\n\tconst comments =\n\t\t'!' + // Start of comment, after the <.\n\t\t'(?:' + // Unroll the loop: Consume everything until --> is found.\n\t\t'-(?!->)' + // Dash not followed by end of comment.\n\t\t'[^\\\\-]*' + // Consume non-dashes.\n\t\t')*' + // Loop possessively.\n\t\t'(?:-->)?'; // End of comment. If not found, match all input.\n\n\tconst cdata =\n\t\t'!\\\\[CDATA\\\\[' + // Start of comment, after the <.\n\t\t'[^\\\\]]*' + // Consume non-].\n\t\t'(?:' + // Unroll the loop: Consume everything until ]]> is found.\n\t\t'](?!]>)' + // One ] not followed by end of comment.\n\t\t'[^\\\\]]*' + // Consume non-].\n\t\t')*?' + // Loop possessively.\n\t\t'(?:]]>)?'; // End of comment. If not found, match all input.\n\n\tconst escaped =\n\t\t'(?=' + // Is the element escaped?\n\t\t'!--' +\n\t\t'|' +\n\t\t'!\\\\[CDATA\\\\[' +\n\t\t')' +\n\t\t'((?=!-)' + // If yes, which type?\n\t\tcomments +\n\t\t'|' +\n\t\tcdata +\n\t\t')';\n\n\tconst regex =\n\t\t'(' + // Capture the entire match.\n\t\t'<' + // Find start of element.\n\t\t'(' + // Conditional expression follows.\n\t\tescaped + // Find end of escaped element.\n\t\t'|' + // ... else ...\n\t\t'[^>]*>?' + // Find end of normal element.\n\t\t')' +\n\t\t')';\n\n\treturn new RegExp( regex );\n\t/* eslint-enable no-multi-spaces */\n} )();\n\n/**\n * Separate HTML elements and comments from the text.\n *\n * @param {string} input The text which has to be formatted.\n *\n * @return {string[]} The formatted text.\n */\nfunction htmlSplit( input ) {\n\tconst parts = [];\n\tlet workingInput = input;\n\n\tlet match;\n\twhile ( ( match = workingInput.match( htmlSplitRegex ) ) ) {\n\t\t// The `match` result, when invoked on a RegExp with the `g` flag (`/foo/g`) will not include `index`.\n\t\t// If the `g` flag is omitted, `index` is included.\n\t\t// `htmlSplitRegex` does not have the `g` flag so we can assert it will have an index number.\n\t\t// Assert `match.index` is a number.\n\t\tconst index = /** @type {number} */ ( match.index );\n\n\t\tparts.push( workingInput.slice( 0, index ) );\n\t\tparts.push( match[ 0 ] );\n\t\tworkingInput = workingInput.slice( index + match[ 0 ].length );\n\t}\n\n\tif ( workingInput.length ) {\n\t\tparts.push( workingInput );\n\t}\n\n\treturn parts;\n}\n\n/**\n * Replace characters or phrases within HTML elements only.\n *\n * @param {string}                haystack     The text which has to be formatted.\n * @param {Record<string,string>} replacePairs In the form {from: 'to', …}.\n *\n * @return {string} The formatted text.\n */\nfunction replaceInHtmlTags( haystack, replacePairs ) {\n\t// Find all elements.\n\tconst textArr = htmlSplit( haystack );\n\tlet changed = false;\n\n\t// Extract all needles.\n\tconst needles = Object.keys( replacePairs );\n\n\t// Loop through delimiters (elements) only.\n\tfor ( let i = 1; i < textArr.length; i += 2 ) {\n\t\tfor ( let j = 0; j < needles.length; j++ ) {\n\t\t\tconst needle = needles[ j ];\n\t\t\tif ( -1 !== textArr[ i ].indexOf( needle ) ) {\n\t\t\t\ttextArr[ i ] = textArr[ i ].replace(\n\t\t\t\t\tnew RegExp( needle, 'g' ),\n\t\t\t\t\treplacePairs[ needle ]\n\t\t\t\t);\n\t\t\t\tchanged = true;\n\t\t\t\t// After one strtr() break out of the foreach loop and look at next element.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( changed ) {\n\t\thaystack = textArr.join( '' );\n\t}\n\n\treturn haystack;\n}\n\n/**\n * Replaces double line-breaks with paragraph elements.\n *\n * A group of regex replaces used to identify text formatted with newlines and\n * replace double line-breaks with HTML paragraph tags. The remaining line-\n * breaks after conversion become `<br />` tags, unless br is set to 'false'.\n *\n * @param {string}  text The text which has to be formatted.\n * @param {boolean} br   Optional. If set, will convert all remaining line-\n *                       breaks after paragraphing. Default true.\n *\n * @example\n *```js\n * import { autop } from '@wordpress/autop';\n * autop( 'my text' ); // \"<p>my text</p>\"\n * ```\n *\n * @return {string} Text which has been converted into paragraph tags.\n */\nexport function autop( text, br = true ) {\n\tconst preTags = [];\n\n\tif ( text.trim() === '' ) {\n\t\treturn '';\n\t}\n\n\t// Just to make things a little easier, pad the end.\n\ttext = text + '\\n';\n\n\t/*\n\t * Pre tags shouldn't be touched by autop.\n\t * Replace pre tags with placeholders and bring them back after autop.\n\t */\n\tif ( text.indexOf( '<pre' ) !== -1 ) {\n\t\tconst textParts = text.split( '</pre>' );\n\t\tconst lastText = textParts.pop();\n\t\ttext = '';\n\n\t\tfor ( let i = 0; i < textParts.length; i++ ) {\n\t\t\tconst textPart = textParts[ i ];\n\t\t\tconst start = textPart.indexOf( '<pre' );\n\n\t\t\t// Malformed html?\n\t\t\tif ( start === -1 ) {\n\t\t\t\ttext += textPart;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst name = '<pre wp-pre-tag-' + i + '></pre>';\n\t\t\tpreTags.push( [ name, textPart.substr( start ) + '</pre>' ] );\n\n\t\t\ttext += textPart.substr( 0, start ) + name;\n\t\t}\n\n\t\ttext += lastText;\n\t}\n\t// Change multiple <br>s into two line breaks, which will turn into paragraphs.\n\ttext = text.replace( /<br\\s*\\/?>\\s*<br\\s*\\/?>/g, '\\n\\n' );\n\n\tconst allBlocks =\n\t\t'(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)';\n\n\t// Add a double line break above block-level opening tags.\n\ttext = text.replace(\n\t\tnew RegExp( '(<' + allBlocks + '[\\\\s/>])', 'g' ),\n\t\t'\\n\\n$1'\n\t);\n\n\t// Add a double line break below block-level closing tags.\n\ttext = text.replace(\n\t\tnew RegExp( '(</' + allBlocks + '>)', 'g' ),\n\t\t'$1\\n\\n'\n\t);\n\n\t// Standardize newline characters to \"\\n\".\n\ttext = text.replace( /\\r\\n|\\r/g, '\\n' );\n\n\t// Find newlines in all elements and add placeholders.\n\ttext = replaceInHtmlTags( text, { '\\n': ' <!-- wpnl --> ' } );\n\n\t// Collapse line breaks before and after <option> elements so they don't get autop'd.\n\tif ( text.indexOf( '<option' ) !== -1 ) {\n\t\ttext = text.replace( /\\s*<option/g, '<option' );\n\t\ttext = text.replace( /<\\/option>\\s*/g, '</option>' );\n\t}\n\n\t/*\n\t * Collapse line breaks inside <object> elements, before <param> and <embed> elements\n\t * so they don't get autop'd.\n\t */\n\tif ( text.indexOf( '</object>' ) !== -1 ) {\n\t\ttext = text.replace( /(<object[^>]*>)\\s*/g, '$1' );\n\t\ttext = text.replace( /\\s*<\\/object>/g, '</object>' );\n\t\ttext = text.replace( /\\s*(<\\/?(?:param|embed)[^>]*>)\\s*/g, '$1' );\n\t}\n\n\t/*\n\t * Collapse line breaks inside <audio> and <video> elements,\n\t * before and after <source> and <track> elements.\n\t */\n\tif ( text.indexOf( '<source' ) !== -1 || text.indexOf( '<track' ) !== -1 ) {\n\t\ttext = text.replace( /([<\\[](?:audio|video)[^>\\]]*[>\\]])\\s*/g, '$1' );\n\t\ttext = text.replace( /\\s*([<\\[]\\/(?:audio|video)[>\\]])/g, '$1' );\n\t\ttext = text.replace( /\\s*(<(?:source|track)[^>]*>)\\s*/g, '$1' );\n\t}\n\n\t// Collapse line breaks before and after <figcaption> elements.\n\tif ( text.indexOf( '<figcaption' ) !== -1 ) {\n\t\ttext = text.replace( /\\s*(<figcaption[^>]*>)/, '$1' );\n\t\ttext = text.replace( /<\\/figcaption>\\s*/, '</figcaption>' );\n\t}\n\n\t// Remove more than two contiguous line breaks.\n\ttext = text.replace( /\\n\\n+/g, '\\n\\n' );\n\n\t// Split up the contents into an array of strings, separated by double line breaks.\n\tconst texts = text.split( /\\n\\s*\\n/ ).filter( Boolean );\n\n\t// Reset text prior to rebuilding.\n\ttext = '';\n\n\t// Rebuild the content as a string, wrapping every bit with a <p>.\n\ttexts.forEach( ( textPiece ) => {\n\t\ttext += '<p>' + textPiece.replace( /^\\n*|\\n*$/g, '' ) + '</p>\\n';\n\t} );\n\n\t// Under certain strange conditions it could create a P of entirely whitespace.\n\ttext = text.replace( /<p>\\s*<\\/p>/g, '' );\n\n\t// Add a closing <p> inside <div>, <address>, or <form> tag if missing.\n\ttext = text.replace(\n\t\t/<p>([^<]+)<\\/(div|address|form)>/g,\n\t\t'<p>$1</p></$2>'\n\t);\n\n\t// If an opening or closing block element tag is wrapped in a <p>, unwrap it.\n\ttext = text.replace(\n\t\tnew RegExp( '<p>\\\\s*(</?' + allBlocks + '[^>]*>)\\\\s*</p>', 'g' ),\n\t\t'$1'\n\t);\n\n\t// In some cases <li> may get wrapped in <p>, fix them.\n\ttext = text.replace( /<p>(<li.+?)<\\/p>/g, '$1' );\n\n\t// If a <blockquote> is wrapped with a <p>, move it inside the <blockquote>.\n\ttext = text.replace( /<p><blockquote([^>]*)>/gi, '<blockquote$1><p>' );\n\ttext = text.replace( /<\\/blockquote><\\/p>/g, '</p></blockquote>' );\n\n\t// If an opening or closing block element tag is preceded by an opening <p> tag, remove it.\n\ttext = text.replace(\n\t\tnew RegExp( '<p>\\\\s*(</?' + allBlocks + '[^>]*>)', 'g' ),\n\t\t'$1'\n\t);\n\n\t// If an opening or closing block element tag is followed by a closing <p> tag, remove it.\n\ttext = text.replace(\n\t\tnew RegExp( '(</?' + allBlocks + '[^>]*>)\\\\s*</p>', 'g' ),\n\t\t'$1'\n\t);\n\n\t// Optionally insert line breaks.\n\tif ( br ) {\n\t\t// Replace newlines that shouldn't be touched with a placeholder.\n\t\ttext = text.replace( /<(script|style).*?<\\/\\\\1>/g, ( match ) =>\n\t\t\tmatch[ 0 ].replace( /\\n/g, '<WPPreserveNewline />' )\n\t\t);\n\n\t\t// Normalize <br>\n\t\ttext = text.replace( /<br>|<br\\/>/g, '<br />' );\n\n\t\t// Replace any new line characters that aren't preceded by a <br /> with a <br />.\n\t\ttext = text.replace( /(<br \\/>)?\\s*\\n/g, ( a, b ) =>\n\t\t\tb ? a : '<br />\\n'\n\t\t);\n\n\t\t// Replace newline placeholders with newlines.\n\t\ttext = text.replace( /<WPPreserveNewline \\/>/g, '\\n' );\n\t}\n\n\t// If a <br /> tag is after an opening or closing block tag, remove it.\n\ttext = text.replace(\n\t\tnew RegExp( '(</?' + allBlocks + '[^>]*>)\\\\s*<br />', 'g' ),\n\t\t'$1'\n\t);\n\n\t// If a <br /> tag is before a subset of opening or closing block tags, remove it.\n\ttext = text.replace(\n\t\t/<br \\/>(\\s*<\\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g,\n\t\t'$1'\n\t);\n\ttext = text.replace( /\\n<\\/p>$/g, '</p>' );\n\n\t// Replace placeholder <pre> tags with their original content.\n\tpreTags.forEach( ( preTag ) => {\n\t\tconst [ name, original ] = preTag;\n\t\ttext = text.replace( name, original );\n\t} );\n\n\t// Restore newlines in all elements.\n\tif ( -1 !== text.indexOf( '<!-- wpnl -->' ) ) {\n\t\ttext = text.replace( /\\s?<!-- wpnl -->\\s?/g, '\\n' );\n\t}\n\n\treturn text;\n}\n\n/**\n * Replaces `<p>` tags with two line breaks. \"Opposite\" of autop().\n *\n * Replaces `<p>` tags with two line breaks except where the `<p>` has attributes.\n * Unifies whitespace. Indents `<li>`, `<dt>` and `<dd>` for better readability.\n *\n * @param {string} html The content from the editor.\n *\n * @example\n * ```js\n * import { removep } from '@wordpress/autop';\n * removep( '<p>my text</p>' ); // \"my text\"\n * ```\n *\n * @return {string} The content with stripped paragraph tags.\n */\nexport function removep( html ) {\n\tconst blocklist =\n\t\t'blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure';\n\tconst blocklist1 = blocklist + '|div|p';\n\tconst blocklist2 = blocklist + '|pre';\n\t/** @type {string[]} */\n\tconst preserve = [];\n\tlet preserveLinebreaks = false;\n\tlet preserveBr = false;\n\n\tif ( ! html ) {\n\t\treturn '';\n\t}\n\n\t// Protect script and style tags.\n\tif ( html.indexOf( '<script' ) !== -1 || html.indexOf( '<style' ) !== -1 ) {\n\t\thtml = html.replace(\n\t\t\t/<(script|style)[^>]*>[\\s\\S]*?<\\/\\1>/g,\n\t\t\t( match ) => {\n\t\t\t\tpreserve.push( match );\n\t\t\t\treturn '<wp-preserve>';\n\t\t\t}\n\t\t);\n\t}\n\n\t// Protect pre tags.\n\tif ( html.indexOf( '<pre' ) !== -1 ) {\n\t\tpreserveLinebreaks = true;\n\t\thtml = html.replace( /<pre[^>]*>[\\s\\S]+?<\\/pre>/g, ( a ) => {\n\t\t\ta = a.replace( /<br ?\\/?>(\\r\\n|\\n)?/g, '<wp-line-break>' );\n\t\t\ta = a.replace( /<\\/?p( [^>]*)?>(\\r\\n|\\n)?/g, '<wp-line-break>' );\n\t\t\treturn a.replace( /\\r?\\n/g, '<wp-line-break>' );\n\t\t} );\n\t}\n\n\t// Remove line breaks but keep <br> tags inside image captions.\n\tif ( html.indexOf( '[caption' ) !== -1 ) {\n\t\tpreserveBr = true;\n\t\thtml = html.replace( /\\[caption[\\s\\S]+?\\[\\/caption\\]/g, ( a ) => {\n\t\t\treturn a\n\t\t\t\t.replace( /<br([^>]*)>/g, '<wp-temp-br$1>' )\n\t\t\t\t.replace( /[\\r\\n\\t]+/, '' );\n\t\t} );\n\t}\n\n\t// Normalize white space characters before and after block tags.\n\thtml = html.replace(\n\t\tnew RegExp( '\\\\s*</(' + blocklist1 + ')>\\\\s*', 'g' ),\n\t\t'</$1>\\n'\n\t);\n\thtml = html.replace(\n\t\tnew RegExp( '\\\\s*<((?:' + blocklist1 + ')(?: [^>]*)?)>', 'g' ),\n\t\t'\\n<$1>'\n\t);\n\n\t// Mark </p> if it has any attributes.\n\thtml = html.replace( /(<p [^>]+>[\\s\\S]*?)<\\/p>/g, '$1</p#>' );\n\n\t// Preserve the first <p> inside a <div>.\n\thtml = html.replace( /<div( [^>]*)?>\\s*<p>/gi, '<div$1>\\n\\n' );\n\n\t// Remove paragraph tags.\n\thtml = html.replace( /\\s*<p>/gi, '' );\n\thtml = html.replace( /\\s*<\\/p>\\s*/gi, '\\n\\n' );\n\n\t// Normalize white space chars and remove multiple line breaks.\n\thtml = html.replace( /\\n[\\s\\u00a0]+\\n/g, '\\n\\n' );\n\n\t// Replace <br> tags with line breaks.\n\thtml = html.replace( /(\\s*)<br ?\\/?>\\s*/gi, ( _, space ) => {\n\t\tif ( space && space.indexOf( '\\n' ) !== -1 ) {\n\t\t\treturn '\\n\\n';\n\t\t}\n\n\t\treturn '\\n';\n\t} );\n\n\t// Fix line breaks around <div>.\n\thtml = html.replace( /\\s*<div/g, '\\n<div' );\n\thtml = html.replace( /<\\/div>\\s*/g, '</div>\\n' );\n\n\t// Fix line breaks around caption shortcodes.\n\thtml = html.replace(\n\t\t/\\s*\\[caption([^\\[]+)\\[\\/caption\\]\\s*/gi,\n\t\t'\\n\\n[caption$1[/caption]\\n\\n'\n\t);\n\thtml = html.replace( /caption\\]\\n\\n+\\[caption/g, 'caption]\\n\\n[caption' );\n\n\t// Pad block elements tags with a line break.\n\thtml = html.replace(\n\t\tnew RegExp( '\\\\s*<((?:' + blocklist2 + ')(?: [^>]*)?)\\\\s*>', 'g' ),\n\t\t'\\n<$1>'\n\t);\n\thtml = html.replace(\n\t\tnew RegExp( '\\\\s*</(' + blocklist2 + ')>\\\\s*', 'g' ),\n\t\t'</$1>\\n'\n\t);\n\n\t// Indent <li>, <dt> and <dd> tags.\n\thtml = html.replace( /<((li|dt|dd)[^>]*)>/g, ' \\t<$1>' );\n\n\t// Fix line breaks around <select> and <option>.\n\tif ( html.indexOf( '<option' ) !== -1 ) {\n\t\thtml = html.replace( /\\s*<option/g, '\\n<option' );\n\t\thtml = html.replace( /\\s*<\\/select>/g, '\\n</select>' );\n\t}\n\n\t// Pad <hr> with two line breaks.\n\tif ( html.indexOf( '<hr' ) !== -1 ) {\n\t\thtml = html.replace( /\\s*<hr( [^>]*)?>\\s*/g, '\\n\\n<hr$1>\\n\\n' );\n\t}\n\n\t// Remove line breaks in <object> tags.\n\tif ( html.indexOf( '<object' ) !== -1 ) {\n\t\thtml = html.replace( /<object[\\s\\S]+?<\\/object>/g, ( a ) => {\n\t\t\treturn a.replace( /[\\r\\n]+/g, '' );\n\t\t} );\n\t}\n\n\t// Unmark special paragraph closing tags.\n\thtml = html.replace( /<\\/p#>/g, '</p>\\n' );\n\n\t// Pad remaining <p> tags whit a line break.\n\thtml = html.replace( /\\s*(<p [^>]+>[\\s\\S]*?<\\/p>)/g, '\\n$1' );\n\n\t// Trim.\n\thtml = html.replace( /^\\s+/, '' );\n\thtml = html.replace( /[\\s\\u00a0]+$/, '' );\n\n\tif ( preserveLinebreaks ) {\n\t\thtml = html.replace( /<wp-line-break>/g, '\\n' );\n\t}\n\n\tif ( preserveBr ) {\n\t\thtml = html.replace( /<wp-temp-br([^>]*)>/g, '<br$1>' );\n\t}\n\n\t// Restore preserved tags.\n\tif ( preserve.length ) {\n\t\thtml = html.replace( /<wp-preserve>/g, () => {\n\t\t\treturn /** @type {string} */ ( preserve.shift() );\n\t\t} );\n\t}\n\n\treturn html;\n}\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","htmlSplitRegex","RegExp","replaceInHtmlTags","haystack","replacePairs","textArr","input","parts","match","workingInput","index","push","slice","length","htmlSplit","changed","needles","keys","i","j","needle","indexOf","replace","join","autop","text","br","preTags","trim","textParts","split","lastText","pop","textPart","start","name","substr","allBlocks","texts","filter","Boolean","forEach","textPiece","a","b","preTag","original","removep","html","blocklist","blocklist1","blocklist2","preserve","preserveLinebreaks","preserveBr","_","space","shift"],"sourceRoot":""}

Zerion Mini Shell 1.0