mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-06 10:50:56 +01:00
abde9678b4
Further improves webpack configuration for editor files to use hashed module IDs in the compressed (`*.min.js`) production files. Follow up to [50940]. Props gziolo, peterwilsoncc. Fixes #53192. Built from https://develop.svn.wordpress.org/trunk@51035 git-svn-id: http://core.svn.wordpress.org/trunk@50644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2 lines
2.9 KiB
JavaScript
2 lines
2.9 KiB
JavaScript
/*! This file is auto-generated */
|
|
this.wp=this.wp||{},this.wp.blockSerializationDefaultParser=function(n){var t={};function e(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=n,e.c=t,e.d=function(n,t,r){e.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:r})},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,t){if(1&t&&(n=e(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var o in n)e.d(r,o,function(t){return n[t]}.bind(null,o));return r},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.p="",e(e.s="SiJt")}({SiJt:function(n,t,e){"use strict";let r,o,u,s;e.r(t),e.d(t,"parse",(function(){return f}));const l=/<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?=([^}]+|}+(?=})|(?!}\s+\/?-->)[^])*)\5|[^]*?)}\s+)?(\/)?-->/g;function c(n,t,e,r,o){return{blockName:n,attrs:t,innerBlocks:e,innerHTML:r,innerContent:o}}function i(n){return c(null,{},[],n,[n])}const f=n=>{r=n,o=0,u=[],s=[],l.lastIndex=0;do{}while(p());return u};function p(){const n=function(){const n=l.exec(r);if(null===n)return["no-more-tokens"];const t=n.index,[e,o,u,s,c,,i]=n,f=e.length,p=!!o,a=!!i,b=(u||"core/")+s,k=!!c,d=k?function(n){try{return JSON.parse(n)}catch(n){return null}}(c):{};if(a)return["void-block",b,d,t,f];if(p)return["block-closer",b,null,t,f];return["block-opener",b,d,t,f]}(),[t,e,f,p,d]=n,h=s.length,v=p>o?o:null;switch(t){case"no-more-tokens":if(0===h)return a(),!1;if(1===h)return k(),!1;for(;0<s.length;)k();return!1;case"void-block":return 0===h?(null!==v&&u.push(i(r.substr(v,p-v))),u.push(c(e,f,[],"",[])),o=p+d,!0):(b(c(e,f,[],"",[]),p,d),o=p+d,!0);case"block-opener":return s.push(function(n,t,e,r,o){return{block:n,tokenStart:t,tokenLength:e,prevOffset:r||t+e,leadingHtmlStart:o}}(c(e,f,[],"",[]),p,d,p+d,v)),o=p+d,!0;case"block-closer":if(0===h)return a(),!1;if(1===h)return k(p),o=p+d,!0;const n=s.pop(),t=r.substr(n.prevOffset,p-n.prevOffset);return n.block.innerHTML+=t,n.block.innerContent.push(t),n.prevOffset=p+d,b(n.block,n.tokenStart,n.tokenLength,p+d),o=p+d,!0;default:return a(),!1}}function a(n){const t=n||r.length-o;0!==t&&u.push(i(r.substr(o,t)))}function b(n,t,e,o){const u=s[s.length-1];u.block.innerBlocks.push(n);const l=r.substr(u.prevOffset,t-u.prevOffset);l&&(u.block.innerHTML+=l,u.block.innerContent.push(l)),u.block.innerContent.push(null),u.prevOffset=o||t+e}function k(n){const{block:t,leadingHtmlStart:e,prevOffset:o,tokenStart:l}=s.pop(),c=n?r.substr(o,n-o):r.substr(o);c&&(t.innerHTML+=c,t.innerContent.push(c)),null!==e&&u.push(i(r.substr(e,l-e))),u.push(t)}}}); |