File "index.min.js-20250110164905.map"

Full Path: /home/pumpbmko/public_html/wp-content/plugins/gutenberg/build/wordcount/index.min.js-20250110164905.map
File size: 71.37 KB
MIME-type: application/json
Charset: utf-8

{"version":3,"file":"./build/widgets/index.min.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,yUCL9D,MAAM,EAA+BC,OAAW,GAAU,OCApD,EAA+BA,OAAW,GAAc,WCAxD,EAA+BA,OAAwB,gBCW7D,GALCC,EAAAA,EAAAA,KAACC,EAAAA,IAAG,CAACC,MAAM,6BAA6BC,QAAQ,YAAWC,UAC1DJ,EAAAA,EAAAA,KAACK,EAAAA,KAAI,CAACxB,EAAE,4WCPV,SAASyB,EAAEC,GAAG,IAAIC,EAAEC,EAAEC,EAAE,GAAG,GAAG,iBAAiBH,GAAG,iBAAiBA,EAAEG,GAAGH,OAAO,GAAG,iBAAiBA,EAAE,GAAGI,MAAMC,QAAQL,GAAG,CAAC,IAAIrB,EAAEqB,EAAEM,OAAO,IAAIL,EAAE,EAAEA,EAAEtB,EAAEsB,IAAID,EAAEC,KAAKC,EAAEH,EAA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ASM,EAAsBtG,GACrC,OAAOA,EAAM7I,WAAWoP,kBACzB,CASO,SAASC,EAAoBxG,EAAOyG,GAC1C,MAAO,IACHzG,EACH7I,WAAY,IACN6I,EAAM7I,YAAc,CAAC,EAC1BoP,mBAAoBE,GAGvB,CCzBe,SAASC,EAAgC/C,GACvD,MAAMgD,GAAcC,EAAAA,EAAAA,YAAW,KAAM,IAAAC,EACpC,MAAM5U,EAC2C,QADlC4U,EACdlD,GAAUvR,8CAAsC,IAAAyU,EAAAA,EAAI,GAC/ChV,GAAcE,EAAAA,EAAAA,QAAQM,EAAAA,OAC1BC,eAAgB,CAAEC,UAAW,KAC5BC,QAAUC,IAAkBR,EAAUS,SAAUD,EAAWE,MACzDd,IACJ8U,KACAG,EAAAA,EAAAA,UAAUC,EAAAA,OAAcC,mBACvB,qBACAnV,EAAYoB,KAAOR,IAAU,CAC5BS,KAAMT,EAAWE,GACjBuG,MAAOzG,EAAWS,KAClBQ,YAAajB,EAAWiB,YACxByD,WAAY1E,EAAWc,SACpB,CACAQ,OAAQtB,EAAWE,GACnBqB,SAAU,CAAC,GAEX,CACArB,GAAIF,EAAWE,SAIrB,GAEF,CCXO,SAASsU,EAA2B1D,EAAW,CAAC,GACtD,MAAM,SAAEL,EAAQ,SAAES,EAAQ,KAAEzQ,GAASgU,GACrCC,EAAAA,EAAAA,mBACC,CAAEjU,UAASgQ,GACX,IACIS,EACHJ,SAAU,IACNI,EAASJ,YACTA,IAIP,CAOO,SAAS6D,GAA0B7D,EAAW,CAAC,GACrD,MAAM,SAAEL,EAAQ,SAAES,EAAQ,KAAEzQ,GAASmU,GACrCF,EAAAA,EAAAA,mBACC,CAAEjU,UAASgQ,GACX,IACIS,EACHJ,SAAU,IACNI,EAASJ,YACTA,IAIP,E","sources":["webpack://wp/webpack/bootstrap","webpack://wp/webpack/runtime/compat get default export","webpack://wp/webpack/runtime/define property getters","webpack://wp/webpack/runtime/hasOwnProperty shorthand","webpack://wp/webpack/runtime/make namespace object","webpack://wp/external window [\"wp\",\"blocks\"]","webpack://wp/external window [\"wp\",\"primitives\"]","webpack://wp/external window \"ReactJSXRuntime\"","../../packages/icons/src/library/widget.js","webpack://wp/./node_modules/clsx/dist/clsx.mjs","webpack://wp/external window [\"wp\",\"blockEditor\"]","webpack://wp/external window [\"wp\",\"components\"]","../../packages/icons/src/library/brush.js","webpack://wp/external window [\"wp\",\"i18n\"]","webpack://wp/external window [\"wp\",\"element\"]","webpack://wp/external window [\"wp\",\"data\"]","webpack://wp/external window [\"wp\",\"coreData\"]","../../packages/widgets/src/blocks/legacy-widget/edit/widget-type-selector.js","../../packages/widgets/src/blocks/legacy-widget/edit/inspector-card.js","webpack://wp/external window [\"wp\",\"notices\"]","webpack://wp/external window [\"wp\",\"compose\"]","webpack://wp/external window [\"wp\",\"apiFetch\"]","../../packages/widgets/src/blocks/legacy-widget/edit/control.js","../../packages/widgets/src/blocks/legacy-widget/edit/form.js","../../packages/widgets/src/blocks/legacy-widget/edit/preview.js","../../packages/widgets/src/blocks/legacy-widget/edit/no-preview.js","../../packages/widgets/src/blocks/legacy-widget/edit/convert-to-blocks-button.js","../../packages/widgets/src/blocks/legacy-widget/edit/index.js","../../packages/widgets/src/blocks/legacy-widget/transforms.js","../../packages/widgets/src/blocks/legacy-widget/index.js","../../packages/icons/src/library/group.js","../../packages/widgets/src/blocks/widget-group/edit.js","../../packages/widgets/src/blocks/widget-group/deprecated.js","../../packages/widgets/src/blocks/widget-group/index.js","../../packages/widgets/src/blocks/widget-group/save.js","../../packages/icons/src/library/move-to.js","../../packages/widgets/src/components/move-to-widget-area/index.js","../../packages/widgets/src/utils.js","../../packages/widgets/src/register-legacy-widget-variations.js","../../packages/widgets/src/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\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};","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blocks\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"primitives\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"ReactJSXRuntime\"];","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst widget = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M6 3H8V5H16V3H18V5C19.1046 5 20 5.89543 20 7V19C20 20.1046 19.1046 21 18 21H6C4.89543 21 4 20.1046 4 19V7C4 5.89543 4.89543 5 6 5V3ZM18 6.5H6C5.72386 6.5 5.5 6.72386 5.5 7V8H18.5V7C18.5 6.72386 18.2761 6.5 18 6.5ZM18.5 9.5H5.5V19C5.5 19.2761 5.72386 19.5 6 19.5H18C18.2761 19.5 18.5 19.2761 18.5 19V9.5ZM11 11H13V13H11V11ZM7 11V13H9V11H7ZM15 13V11H17V13H15Z\" />\n\t</SVG>\n);\n\nexport default widget;\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blockEditor\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"components\"];","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst brush = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z\" />\n\t</SVG>\n);\n\nexport default brush;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"i18n\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"element\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"data\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"coreData\"];","/**\n * WordPress dependencies\n */\nimport { Spinner, SelectControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\nexport default function WidgetTypeSelector( { selectedId, onSelect } ) {\n\tconst widgetTypes = useSelect( ( select ) => {\n\t\tconst hiddenIds =\n\t\t\tselect( blockEditorStore ).getSettings()\n\t\t\t\t?.widgetTypesToHideFromLegacyWidgetBlock ?? [];\n\t\treturn select( coreStore )\n\t\t\t.getWidgetTypes( { per_page: -1 } )\n\t\t\t?.filter( ( widgetType ) => ! hiddenIds.includes( widgetType.id ) );\n\t}, [] );\n\n\tif ( ! widgetTypes ) {\n\t\treturn <Spinner />;\n\t}\n\n\tif ( widgetTypes.length === 0 ) {\n\t\treturn __( 'There are no widgets available.' );\n\t}\n\n\treturn (\n\t\t<SelectControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ __( 'Select a legacy widget to display:' ) }\n\t\t\tvalue={ selectedId ?? '' }\n\t\t\toptions={ [\n\t\t\t\t{ value: '', label: __( 'Select widget' ) },\n\t\t\t\t...widgetTypes.map( ( widgetType ) => ( {\n\t\t\t\t\tvalue: widgetType.id,\n\t\t\t\t\tlabel: widgetType.name,\n\t\t\t\t} ) ),\n\t\t\t] }\n\t\t\tonChange={ ( value ) => {\n\t\t\t\tif ( value ) {\n\t\t\t\t\tconst selected = widgetTypes.find(\n\t\t\t\t\t\t( widgetType ) => widgetType.id === value\n\t\t\t\t\t);\n\t\t\t\t\tonSelect( {\n\t\t\t\t\t\tselectedId: selected.id,\n\t\t\t\t\t\tisMulti: selected.is_multi,\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tonSelect( { selectedId: null } );\n\t\t\t\t}\n\t\t\t} }\n\t\t/>\n\t);\n}\n","export default function InspectorCard( { name, description } ) {\n\treturn (\n\t\t<div className=\"wp-block-legacy-widget-inspector-card\">\n\t\t\t<h3 className=\"wp-block-legacy-widget-inspector-card__name\">\n\t\t\t\t{ name }\n\t\t\t</h3>\n\t\t\t<span>{ description }</span>\n\t\t</div>\n\t);\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"notices\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"compose\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"apiFetch\"];","/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { debounce } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * An API for creating and loading a widget control (a <div class=\"widget\">\n * element) that is compatible with most third party widget scripts. By not\n * using React for this, we ensure that we have complete contorl over the DOM\n * and do not accidentally remove any elements that a third party widget script\n * has attached an event listener to.\n *\n * @property {Element} element The control's DOM element.\n */\nexport default class Control {\n\t/**\n\t * Creates and loads a new control.\n\t *\n\t * @access public\n\t * @param {Object}   params\n\t * @param {string}   params.id\n\t * @param {string}   params.idBase\n\t * @param {Object}   params.instance\n\t * @param {Function} params.onChangeInstance\n\t * @param {Function} params.onChangeHasPreview\n\t * @param {Function} params.onError\n\t */\n\tconstructor( {\n\t\tid,\n\t\tidBase,\n\t\tinstance,\n\t\tonChangeInstance,\n\t\tonChangeHasPreview,\n\t\tonError,\n\t} ) {\n\t\tthis.id = id;\n\t\tthis.idBase = idBase;\n\t\tthis._instance = instance;\n\t\tthis._hasPreview = null;\n\t\tthis.onChangeInstance = onChangeInstance;\n\t\tthis.onChangeHasPreview = onChangeHasPreview;\n\t\tthis.onError = onError;\n\n\t\t// We can't use the real widget number as this is calculated by the\n\t\t// server and we may not ever *actually* save this widget. Instead, use\n\t\t// a fake but unique number.\n\t\tthis.number = ++lastNumber;\n\n\t\tthis.handleFormChange = debounce(\n\t\t\tthis.handleFormChange.bind( this ),\n\t\t\t200\n\t\t);\n\t\tthis.handleFormSubmit = this.handleFormSubmit.bind( this );\n\n\t\tthis.initDOM();\n\t\tthis.bindEvents();\n\t\tthis.loadContent();\n\t}\n\n\t/**\n\t * Clean up the control so that it can be garabge collected.\n\t *\n\t * @access public\n\t */\n\tdestroy() {\n\t\tthis.unbindEvents();\n\t\tthis.element.remove();\n\t\t// TODO: How do we make third party widget scripts remove their event\n\t\t// listeners?\n\t}\n\n\t/**\n\t * Creates the control's DOM structure.\n\t *\n\t * @access private\n\t */\n\tinitDOM() {\n\t\tthis.element = el( 'div', { class: 'widget open' }, [\n\t\t\tel( 'div', { class: 'widget-inside' }, [\n\t\t\t\t( this.form = el( 'form', { class: 'form', method: 'post' }, [\n\t\t\t\t\t// These hidden form inputs are what most widgets' scripts\n\t\t\t\t\t// use to access data about the widget.\n\t\t\t\t\tel( 'input', {\n\t\t\t\t\t\tclass: 'widget-id',\n\t\t\t\t\t\ttype: 'hidden',\n\t\t\t\t\t\tname: 'widget-id',\n\t\t\t\t\t\tvalue: this.id ?? `${ this.idBase }-${ this.number }`,\n\t\t\t\t\t} ),\n\t\t\t\t\tel( 'input', {\n\t\t\t\t\t\tclass: 'id_base',\n\t\t\t\t\t\ttype: 'hidden',\n\t\t\t\t\t\tname: 'id_base',\n\t\t\t\t\t\tvalue: this.idBase ?? this.id,\n\t\t\t\t\t} ),\n\t\t\t\t\tel( 'input', {\n\t\t\t\t\t\tclass: 'widget-width',\n\t\t\t\t\t\ttype: 'hidden',\n\t\t\t\t\t\tname: 'widget-width',\n\t\t\t\t\t\tvalue: '250',\n\t\t\t\t\t} ),\n\t\t\t\t\tel( 'input', {\n\t\t\t\t\t\tclass: 'widget-height',\n\t\t\t\t\t\ttype: 'hidden',\n\t\t\t\t\t\tname: 'widget-height',\n\t\t\t\t\t\tvalue: '200',\n\t\t\t\t\t} ),\n\t\t\t\t\tel( 'input', {\n\t\t\t\t\t\tclass: 'widget_number',\n\t\t\t\t\t\ttype: 'hidden',\n\t\t\t\t\t\tname: 'widget_number',\n\t\t\t\t\t\tvalue: this.idBase ? this.number.toString() : '',\n\t\t\t\t\t} ),\n\t\t\t\t\t( this.content = el( 'div', { class: 'widget-content' } ) ),\n\t\t\t\t\t// Non-multi widgets can be saved via a Save button.\n\t\t\t\t\tthis.id &&\n\t\t\t\t\t\tel(\n\t\t\t\t\t\t\t'button',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tclass: 'button is-primary',\n\t\t\t\t\t\t\t\ttype: 'submit',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t__( 'Save' )\n\t\t\t\t\t\t),\n\t\t\t\t] ) ),\n\t\t\t] ),\n\t\t] );\n\t}\n\n\t/**\n\t * Adds the control's event listeners.\n\t *\n\t * @access private\n\t */\n\tbindEvents() {\n\t\t// Prefer jQuery 'change' event instead of the native 'change' event\n\t\t// because many widgets use jQuery's event bus to trigger an update.\n\t\tif ( window.jQuery ) {\n\t\t\tconst { jQuery: $ } = window;\n\t\t\t$( this.form ).on( 'change', null, this.handleFormChange );\n\t\t\t$( this.form ).on( 'input', null, this.handleFormChange );\n\t\t\t$( this.form ).on( 'submit', this.handleFormSubmit );\n\t\t} else {\n\t\t\tthis.form.addEventListener( 'change', this.handleFormChange );\n\t\t\tthis.form.addEventListener( 'input', this.handleFormChange );\n\t\t\tthis.form.addEventListener( 'submit', this.handleFormSubmit );\n\t\t}\n\t}\n\n\t/**\n\t * Removes the control's event listeners.\n\t *\n\t * @access private\n\t */\n\tunbindEvents() {\n\t\tif ( window.jQuery ) {\n\t\t\tconst { jQuery: $ } = window;\n\t\t\t$( this.form ).off( 'change', null, this.handleFormChange );\n\t\t\t$( this.form ).off( 'input', null, this.handleFormChange );\n\t\t\t$( this.form ).off( 'submit', this.handleFormSubmit );\n\t\t} else {\n\t\t\tthis.form.removeEventListener( 'change', this.handleFormChange );\n\t\t\tthis.form.removeEventListener( 'input', this.handleFormChange );\n\t\t\tthis.form.removeEventListener( 'submit', this.handleFormSubmit );\n\t\t}\n\t}\n\n\t/**\n\t * Fetches the widget's form HTML from the REST API and loads it into the\n\t * control's form.\n\t *\n\t * @access private\n\t */\n\tasync loadContent() {\n\t\ttry {\n\t\t\tif ( this.id ) {\n\t\t\t\tconst { form } = await saveWidget( this.id );\n\t\t\t\tthis.content.innerHTML = form;\n\t\t\t} else if ( this.idBase ) {\n\t\t\t\tconst { form, preview } = await encodeWidget( {\n\t\t\t\t\tidBase: this.idBase,\n\t\t\t\t\tinstance: this.instance,\n\t\t\t\t\tnumber: this.number,\n\t\t\t\t} );\n\t\t\t\tthis.content.innerHTML = form;\n\t\t\t\tthis.hasPreview = ! isEmptyHTML( preview );\n\n\t\t\t\t// If we don't have an instance, perform a save right away. This\n\t\t\t\t// happens when creating a new Legacy Widget block.\n\t\t\t\tif ( ! this.instance.hash ) {\n\t\t\t\t\tconst { instance } = await encodeWidget( {\n\t\t\t\t\t\tidBase: this.idBase,\n\t\t\t\t\t\tinstance: this.instance,\n\t\t\t\t\t\tnumber: this.number,\n\t\t\t\t\t\tformData: serializeForm( this.form ),\n\t\t\t\t\t} );\n\t\t\t\t\tthis.instance = instance;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Trigger 'widget-added' when widget is ready. This event is what\n\t\t\t// widgets' scripts use to initialize, attach events, etc. The event\n\t\t\t// must be fired using jQuery's event bus as this is what widget\n\t\t\t// scripts expect. If jQuery is not loaded, do nothing - some\n\t\t\t// widgets will still work regardless.\n\t\t\tif ( window.jQuery ) {\n\t\t\t\tconst { jQuery: $ } = window;\n\t\t\t\t$( document ).trigger( 'widget-added', [ $( this.element ) ] );\n\t\t\t}\n\t\t} catch ( error ) {\n\t\t\tthis.onError( error );\n\t\t}\n\t}\n\n\t/**\n\t * Perform a save when a multi widget's form is changed. Non-multi widgets\n\t * are saved manually.\n\t *\n\t * @access private\n\t */\n\thandleFormChange() {\n\t\tif ( this.idBase ) {\n\t\t\tthis.saveForm();\n\t\t}\n\t}\n\n\t/**\n\t * Perform a save when the control's form is manually submitted.\n\t *\n\t * @access private\n\t * @param {Event} event\n\t */\n\thandleFormSubmit( event ) {\n\t\tevent.preventDefault();\n\t\tthis.saveForm();\n\t}\n\n\t/**\n\t * Serialize the control's form, send it to the REST API, and update the\n\t * instance with the encoded instance that the REST API returns.\n\t *\n\t * @access private\n\t */\n\tasync saveForm() {\n\t\tconst formData = serializeForm( this.form );\n\n\t\ttry {\n\t\t\tif ( this.id ) {\n\t\t\t\tconst { form } = await saveWidget( this.id, formData );\n\t\t\t\tthis.content.innerHTML = form;\n\n\t\t\t\tif ( window.jQuery ) {\n\t\t\t\t\tconst { jQuery: $ } = window;\n\t\t\t\t\t$( document ).trigger( 'widget-updated', [\n\t\t\t\t\t\t$( this.element ),\n\t\t\t\t\t] );\n\t\t\t\t}\n\t\t\t} else if ( this.idBase ) {\n\t\t\t\tconst { instance, preview } = await encodeWidget( {\n\t\t\t\t\tidBase: this.idBase,\n\t\t\t\t\tinstance: this.instance,\n\t\t\t\t\tnumber: this.number,\n\t\t\t\t\tformData,\n\t\t\t\t} );\n\t\t\t\tthis.instance = instance;\n\t\t\t\tthis.hasPreview = ! isEmptyHTML( preview );\n\t\t\t}\n\t\t} catch ( error ) {\n\t\t\tthis.onError( error );\n\t\t}\n\t}\n\n\t/**\n\t * The widget's instance object.\n\t *\n\t * @access private\n\t */\n\tget instance() {\n\t\treturn this._instance;\n\t}\n\n\t/**\n\t * The widget's instance object.\n\t *\n\t * @access private\n\t */\n\tset instance( instance ) {\n\t\tif ( this._instance !== instance ) {\n\t\t\tthis._instance = instance;\n\t\t\tthis.onChangeInstance( instance );\n\t\t}\n\t}\n\n\t/**\n\t * Whether or not the widget can be previewed.\n\t *\n\t * @access public\n\t */\n\tget hasPreview() {\n\t\treturn this._hasPreview;\n\t}\n\n\t/**\n\t * Whether or not the widget can be previewed.\n\t *\n\t * @access private\n\t */\n\tset hasPreview( hasPreview ) {\n\t\tif ( this._hasPreview !== hasPreview ) {\n\t\t\tthis._hasPreview = hasPreview;\n\t\t\tthis.onChangeHasPreview( hasPreview );\n\t\t}\n\t}\n}\n\nlet lastNumber = 0;\n\nfunction el( tagName, attributes = {}, content = null ) {\n\tconst element = document.createElement( tagName );\n\tfor ( const [ attribute, value ] of Object.entries( attributes ) ) {\n\t\telement.setAttribute( attribute, value );\n\t}\n\tif ( Array.isArray( content ) ) {\n\t\tfor ( const child of content ) {\n\t\t\tif ( child ) {\n\t\t\t\telement.appendChild( child );\n\t\t\t}\n\t\t}\n\t} else if ( typeof content === 'string' ) {\n\t\telement.innerText = content;\n\t}\n\treturn element;\n}\n\nasync function saveWidget( id, formData = null ) {\n\tlet widget;\n\tif ( formData ) {\n\t\twidget = await apiFetch( {\n\t\t\tpath: `/wp/v2/widgets/${ id }?context=edit`,\n\t\t\tmethod: 'PUT',\n\t\t\tdata: {\n\t\t\t\tform_data: formData,\n\t\t\t},\n\t\t} );\n\t} else {\n\t\twidget = await apiFetch( {\n\t\t\tpath: `/wp/v2/widgets/${ id }?context=edit`,\n\t\t\tmethod: 'GET',\n\t\t} );\n\t}\n\treturn { form: widget.rendered_form };\n}\n\nasync function encodeWidget( { idBase, instance, number, formData = null } ) {\n\tconst response = await apiFetch( {\n\t\tpath: `/wp/v2/widget-types/${ idBase }/encode`,\n\t\tmethod: 'POST',\n\t\tdata: {\n\t\t\tinstance,\n\t\t\tnumber,\n\t\t\tform_data: formData,\n\t\t},\n\t} );\n\treturn {\n\t\tinstance: response.instance,\n\t\tform: response.form,\n\t\tpreview: response.preview,\n\t};\n}\n\nfunction isEmptyHTML( html ) {\n\tconst element = document.createElement( 'div' );\n\telement.innerHTML = html;\n\treturn isEmptyNode( element );\n}\n\nfunction isEmptyNode( node ) {\n\tswitch ( node.nodeType ) {\n\t\tcase node.TEXT_NODE:\n\t\t\t// Text nodes are empty if it's entirely whitespace.\n\t\t\treturn node.nodeValue.trim() === '';\n\t\tcase node.ELEMENT_NODE:\n\t\t\t// Elements that are \"embedded content\" are not empty.\n\t\t\t// https://dev.w3.org/html5/spec-LC/content-models.html#embedded-content-0\n\t\t\tif (\n\t\t\t\t[\n\t\t\t\t\t'AUDIO',\n\t\t\t\t\t'CANVAS',\n\t\t\t\t\t'EMBED',\n\t\t\t\t\t'IFRAME',\n\t\t\t\t\t'IMG',\n\t\t\t\t\t'MATH',\n\t\t\t\t\t'OBJECT',\n\t\t\t\t\t'SVG',\n\t\t\t\t\t'VIDEO',\n\t\t\t\t].includes( node.tagName )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Elements with no children are empty.\n\t\t\tif ( ! node.hasChildNodes() ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t// Elements with children are empty if all their children are empty.\n\t\t\treturn Array.from( node.childNodes ).every( isEmptyNode );\n\t\tdefault:\n\t\t\treturn true;\n\t}\n}\n\nfunction serializeForm( form ) {\n\treturn new window.URLSearchParams(\n\t\tArray.from( new window.FormData( form ) )\n\t).toString();\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Popover } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\n/**\n * Internal dependencies\n */\nimport Control from './control';\n\nexport default function Form( {\n\ttitle,\n\tisVisible,\n\tid,\n\tidBase,\n\tinstance,\n\tisWide,\n\tonChangeInstance,\n\tonChangeHasPreview,\n} ) {\n\tconst ref = useRef();\n\n\tconst isMediumLargeViewport = useViewportMatch( 'small' );\n\n\t// We only want to remount the control when the instance changes\n\t// *externally*. For example, if the user performs an undo. To do this, we\n\t// keep track of changes made to instance by the control itself and then\n\t// ignore those.\n\tconst outgoingInstances = useRef( new Set() );\n\tconst incomingInstances = useRef( new Set() );\n\n\tconst { createNotice } = useDispatch( noticesStore );\n\n\tuseEffect( () => {\n\t\tif ( incomingInstances.current.has( instance ) ) {\n\t\t\tincomingInstances.current.delete( instance );\n\t\t\treturn;\n\t\t}\n\n\t\tconst control = new Control( {\n\t\t\tid,\n\t\t\tidBase,\n\t\t\tinstance,\n\t\t\tonChangeInstance( nextInstance ) {\n\t\t\t\toutgoingInstances.current.add( instance );\n\t\t\t\tincomingInstances.current.add( nextInstance );\n\t\t\t\tonChangeInstance( nextInstance );\n\t\t\t},\n\t\t\tonChangeHasPreview,\n\t\t\tonError( error ) {\n\t\t\t\twindow.console.error( error );\n\t\t\t\tcreateNotice(\n\t\t\t\t\t'error',\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t/* translators: %s: the name of the affected block. */\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'The \"%s\" block was affected by errors and may not function properly. Check the developer tools for more details.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tidBase || id\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t},\n\t\t} );\n\n\t\tref.current.appendChild( control.element );\n\n\t\treturn () => {\n\t\t\tif ( outgoingInstances.current.has( instance ) ) {\n\t\t\t\toutgoingInstances.current.delete( instance );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcontrol.destroy();\n\t\t};\n\t}, [\n\t\tid,\n\t\tidBase,\n\t\tinstance,\n\t\tonChangeInstance,\n\t\tonChangeHasPreview,\n\t\tisMediumLargeViewport,\n\t] );\n\n\tif ( isWide && isMediumLargeViewport ) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={ clsx( {\n\t\t\t\t\t'wp-block-legacy-widget__container': isVisible,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t{ isVisible && (\n\t\t\t\t\t<h3 className=\"wp-block-legacy-widget__edit-form-title\">\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</h3>\n\t\t\t\t) }\n\t\t\t\t<Popover\n\t\t\t\t\tfocusOnMount={ false }\n\t\t\t\t\tplacement=\"right\"\n\t\t\t\t\toffset={ 32 }\n\t\t\t\t\tresize={ false }\n\t\t\t\t\tflip={ false }\n\t\t\t\t\tshift\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\tclassName=\"wp-block-legacy-widget__edit-form\"\n\t\t\t\t\t\thidden={ ! isVisible }\n\t\t\t\t\t></div>\n\t\t\t\t</Popover>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tref={ ref }\n\t\t\tclassName=\"wp-block-legacy-widget__edit-form\"\n\t\t\thidden={ ! isVisible }\n\t\t>\n\t\t\t<h3 className=\"wp-block-legacy-widget__edit-form-title\">\n\t\t\t\t{ title }\n\t\t\t</h3>\n\t\t</div>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { useEffect, useState } from '@wordpress/element';\nimport { Disabled, Placeholder, Spinner } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport apiFetch from '@wordpress/api-fetch';\n\nexport default function Preview( { idBase, instance, isVisible } ) {\n\tconst [ isLoaded, setIsLoaded ] = useState( false );\n\tconst [ srcDoc, setSrcDoc ] = useState( '' );\n\n\tuseEffect( () => {\n\t\tconst abortController =\n\t\t\ttypeof window.AbortController === 'undefined'\n\t\t\t\t? undefined\n\t\t\t\t: new window.AbortController();\n\n\t\tasync function fetchPreviewHTML() {\n\t\t\tconst restRoute = `/wp/v2/widget-types/${ idBase }/render`;\n\t\t\treturn await apiFetch( {\n\t\t\t\tpath: restRoute,\n\t\t\t\tmethod: 'POST',\n\t\t\t\tsignal: abortController?.signal,\n\t\t\t\tdata: instance ? { instance } : {},\n\t\t\t} );\n\t\t}\n\n\t\tfetchPreviewHTML()\n\t\t\t.then( ( response ) => {\n\t\t\t\tsetSrcDoc( response.preview );\n\t\t\t} )\n\t\t\t.catch( ( error ) => {\n\t\t\t\tif ( 'AbortError' === error.name ) {\n\t\t\t\t\t// We don't want to log aborted requests.\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthrow error;\n\t\t\t} );\n\n\t\treturn () => abortController?.abort();\n\t}, [ idBase, instance ] );\n\n\t// Resize the iframe on either the load event, or when the iframe becomes visible.\n\tconst ref = useRefEffect(\n\t\t( iframe ) => {\n\t\t\t// Only set height if the iframe is loaded,\n\t\t\t// or it will grow to an unexpected large height in Safari if it's hidden initially.\n\t\t\tif ( ! isLoaded ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// If the preview frame has another origin then this won't work.\n\t\t\t// One possible solution is to add custom script to call `postMessage` in the preview frame.\n\t\t\t// Or, better yet, we migrate away from iframe.\n\t\t\tfunction setHeight() {\n\t\t\t\t// Pick the maximum of these two values to account for margin collapsing.\n\t\t\t\tconst height = Math.max(\n\t\t\t\t\tiframe.contentDocument.documentElement?.offsetHeight ?? 0,\n\t\t\t\t\tiframe.contentDocument.body?.offsetHeight ?? 0\n\t\t\t\t);\n\n\t\t\t\t// Fallback to a height of 100px if the height cannot be determined.\n\t\t\t\t// This ensures the block is still selectable. 100px should hopefully\n\t\t\t\t// be not so big that it's annoying, and not so small that nothing\n\t\t\t\t// can be seen.\n\t\t\t\tiframe.style.height = `${ height !== 0 ? height : 100 }px`;\n\t\t\t}\n\n\t\t\tconst { IntersectionObserver } = iframe.ownerDocument.defaultView;\n\n\t\t\t// Observe for intersections that might cause a change in the height of\n\t\t\t// the iframe, e.g. a Widget Area becoming expanded.\n\t\t\tconst intersectionObserver = new IntersectionObserver(\n\t\t\t\t( [ entry ] ) => {\n\t\t\t\t\tif ( entry.isIntersecting ) {\n\t\t\t\t\t\tsetHeight();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tthreshold: 1,\n\t\t\t\t}\n\t\t\t);\n\t\t\tintersectionObserver.observe( iframe );\n\n\t\t\tiframe.addEventListener( 'load', setHeight );\n\n\t\t\treturn () => {\n\t\t\t\tintersectionObserver.disconnect();\n\t\t\t\tiframe.removeEventListener( 'load', setHeight );\n\t\t\t};\n\t\t},\n\t\t[ isLoaded ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ /*\n\t\t\tWhile the iframe contents are loading, we move the iframe off-screen\n\t\t\tand display a placeholder instead. This ensures that the user\n\t\t\tdoesn't see the iframe resize (which looks really janky). We have to\n\t\t\tmove the iframe off-screen instead of hiding it because web browsers\n\t\t\twill not trigger onLoad if the iframe is hidden.\n\t\t\t*/ }\n\t\t\t{ isVisible && ! isLoaded && (\n\t\t\t\t<Placeholder>\n\t\t\t\t\t<Spinner />\n\t\t\t\t</Placeholder>\n\t\t\t) }\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'wp-block-legacy-widget__edit-preview', {\n\t\t\t\t\t'is-offscreen': ! isVisible || ! isLoaded,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<Disabled>\n\t\t\t\t\t{ /*\n\t\t\t\t\tWe use an iframe so that the widget has an opportunity to\n\t\t\t\t\tload scripts and styles that it needs to run.\n\t\t\t\t\t*/ }\n\t\t\t\t\t<iframe\n\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\tclassName=\"wp-block-legacy-widget__edit-preview-iframe\"\n\t\t\t\t\t\ttabIndex=\"-1\"\n\t\t\t\t\t\ttitle={ __( 'Legacy Widget Preview' ) }\n\t\t\t\t\t\tsrcDoc={ srcDoc }\n\t\t\t\t\t\tonLoad={ ( event ) => {\n\t\t\t\t\t\t\t// To hide the scrollbars of the preview frame for some edge cases,\n\t\t\t\t\t\t\t// such as negative margins in the Gallery Legacy Widget.\n\t\t\t\t\t\t\t// It can't be scrolled anyway.\n\t\t\t\t\t\t\t// TODO: Ideally, this should be fixed in core.\n\t\t\t\t\t\t\tevent.target.contentDocument.body.style.overflow =\n\t\t\t\t\t\t\t\t'hidden';\n\n\t\t\t\t\t\t\tsetIsLoaded( true );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\theight={ 100 }\n\t\t\t\t\t/>\n\t\t\t\t</Disabled>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport default function NoPreview( { name } ) {\n\treturn (\n\t\t<div className=\"wp-block-legacy-widget__edit-no-preview\">\n\t\t\t{ name && <h3>{ name }</h3> }\n\t\t\t<p>{ __( 'No preview available.' ) }</p>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { ToolbarButton } from '@wordpress/components';\nimport { createBlock, rawHandler } from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\n\nexport default function ConvertToBlocksButton( { clientId, rawInstance } ) {\n\tconst { replaceBlocks } = useDispatch( blockEditorStore );\n\n\treturn (\n\t\t<ToolbarButton\n\t\t\tonClick={ () => {\n\t\t\t\tif ( rawInstance.title ) {\n\t\t\t\t\treplaceBlocks( clientId, [\n\t\t\t\t\t\tcreateBlock( 'core/heading', {\n\t\t\t\t\t\t\tcontent: rawInstance.title,\n\t\t\t\t\t\t} ),\n\t\t\t\t\t\t...rawHandler( { HTML: rawInstance.text } ),\n\t\t\t\t\t] );\n\t\t\t\t} else {\n\t\t\t\t\treplaceBlocks(\n\t\t\t\t\t\tclientId,\n\t\t\t\t\t\trawHandler( { HTML: rawInstance.text } )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} }\n\t\t>\n\t\t\t{ __( 'Convert to blocks' ) }\n\t\t</ToolbarButton>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseBlockProps,\n\tBlockControls,\n\tInspectorControls,\n\tBlockIcon,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { Flex, FlexBlock, Spinner, Placeholder } from '@wordpress/components';\nimport { brush as brushIcon } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useCallback } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { useEntityRecord } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport WidgetTypeSelector from './widget-type-selector';\nimport InspectorCard from './inspector-card';\nimport Form from './form';\nimport Preview from './preview';\nimport NoPreview from './no-preview';\nimport ConvertToBlocksButton from './convert-to-blocks-button';\n\nexport default function Edit( props ) {\n\tconst { id, idBase } = props.attributes;\n\tconst { isWide = false } = props;\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t'is-wide-widget': isWide,\n\t\t} ),\n\t} );\n\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t{ ! id && ! idBase ? (\n\t\t\t\t<Empty { ...props } />\n\t\t\t) : (\n\t\t\t\t<NotEmpty { ...props } />\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nfunction Empty( { attributes: { id, idBase }, setAttributes } ) {\n\treturn (\n\t\t<Placeholder\n\t\t\ticon={ <BlockIcon icon={ brushIcon } /> }\n\t\t\tlabel={ __( 'Legacy Widget' ) }\n\t\t>\n\t\t\t<Flex>\n\t\t\t\t<FlexBlock>\n\t\t\t\t\t<WidgetTypeSelector\n\t\t\t\t\t\tselectedId={ id ?? idBase }\n\t\t\t\t\t\tonSelect={ ( { selectedId, isMulti } ) => {\n\t\t\t\t\t\t\tif ( ! selectedId ) {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tid: null,\n\t\t\t\t\t\t\t\t\tidBase: null,\n\t\t\t\t\t\t\t\t\tinstance: null,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} else if ( isMulti ) {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tid: null,\n\t\t\t\t\t\t\t\t\tidBase: selectedId,\n\t\t\t\t\t\t\t\t\tinstance: {},\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tid: selectedId,\n\t\t\t\t\t\t\t\t\tidBase: null,\n\t\t\t\t\t\t\t\t\tinstance: null,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</FlexBlock>\n\t\t\t</Flex>\n\t\t</Placeholder>\n\t);\n}\n\nfunction NotEmpty( {\n\tattributes: { id, idBase, instance },\n\tsetAttributes,\n\tclientId,\n\tisSelected,\n\tisWide = false,\n} ) {\n\tconst [ hasPreview, setHasPreview ] = useState( null );\n\n\tconst widgetTypeId = id ?? idBase;\n\tconst { record: widgetType, hasResolved: hasResolvedWidgetType } =\n\t\tuseEntityRecord( 'root', 'widgetType', widgetTypeId );\n\n\tconst isNavigationMode = useSelect(\n\t\t( select ) => select( blockEditorStore ).isNavigationMode(),\n\t\t[]\n\t);\n\n\tconst setInstance = useCallback( ( nextInstance ) => {\n\t\tsetAttributes( { instance: nextInstance } );\n\t}, [] );\n\n\tif ( ! widgetType && hasResolvedWidgetType ) {\n\t\treturn (\n\t\t\t<Placeholder\n\t\t\t\ticon={ <BlockIcon icon={ brushIcon } /> }\n\t\t\t\tlabel={ __( 'Legacy Widget' ) }\n\t\t\t>\n\t\t\t\t{ __( 'Widget is missing.' ) }\n\t\t\t</Placeholder>\n\t\t);\n\t}\n\n\tif ( ! hasResolvedWidgetType ) {\n\t\treturn (\n\t\t\t<Placeholder>\n\t\t\t\t<Spinner />\n\t\t\t</Placeholder>\n\t\t);\n\t}\n\n\tconst mode =\n\t\tidBase && ( isNavigationMode || ! isSelected ) ? 'preview' : 'edit';\n\n\treturn (\n\t\t<>\n\t\t\t{ idBase === 'text' && (\n\t\t\t\t<BlockControls group=\"other\">\n\t\t\t\t\t<ConvertToBlocksButton\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\trawInstance={ instance.raw }\n\t\t\t\t\t/>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\n\t\t\t<InspectorControls>\n\t\t\t\t<InspectorCard\n\t\t\t\t\tname={ widgetType.name }\n\t\t\t\t\tdescription={ widgetType.description }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\n\t\t\t<Form\n\t\t\t\ttitle={ widgetType.name }\n\t\t\t\tisVisible={ mode === 'edit' }\n\t\t\t\tid={ id }\n\t\t\t\tidBase={ idBase }\n\t\t\t\tinstance={ instance }\n\t\t\t\tisWide={ isWide }\n\t\t\t\tonChangeInstance={ setInstance }\n\t\t\t\tonChangeHasPreview={ setHasPreview }\n\t\t\t/>\n\n\t\t\t{ idBase && (\n\t\t\t\t<>\n\t\t\t\t\t{ hasPreview === null && mode === 'preview' && (\n\t\t\t\t\t\t<Placeholder>\n\t\t\t\t\t\t\t<Spinner />\n\t\t\t\t\t\t</Placeholder>\n\t\t\t\t\t) }\n\t\t\t\t\t{ hasPreview === true && (\n\t\t\t\t\t\t<Preview\n\t\t\t\t\t\t\tidBase={ idBase }\n\t\t\t\t\t\t\tinstance={ instance }\n\t\t\t\t\t\t\tisVisible={ mode === 'preview' }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ hasPreview === false && mode === 'preview' && (\n\t\t\t\t\t\t<NoPreview name={ widgetType.name } />\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { createBlock } from '@wordpress/blocks';\n\nconst legacyWidgetTransforms = [\n\t{\n\t\tblock: 'core/calendar',\n\t\twidget: 'calendar',\n\t},\n\t{\n\t\tblock: 'core/search',\n\t\twidget: 'search',\n\t},\n\t{\n\t\tblock: 'core/html',\n\t\twidget: 'custom_html',\n\t\ttransform: ( { content } ) => ( {\n\t\t\tcontent,\n\t\t} ),\n\t},\n\t{\n\t\tblock: 'core/archives',\n\t\twidget: 'archives',\n\t\ttransform: ( { count, dropdown } ) => {\n\t\t\treturn {\n\t\t\t\tdisplayAsDropdown: !! dropdown,\n\t\t\t\tshowPostCounts: !! count,\n\t\t\t};\n\t\t},\n\t},\n\t{\n\t\tblock: 'core/latest-posts',\n\t\twidget: 'recent-posts',\n\t\ttransform: ( { show_date: displayPostDate, number } ) => {\n\t\t\treturn {\n\t\t\t\tdisplayPostDate: !! displayPostDate,\n\t\t\t\tpostsToShow: number,\n\t\t\t};\n\t\t},\n\t},\n\t{\n\t\tblock: 'core/latest-comments',\n\t\twidget: 'recent-comments',\n\t\ttransform: ( { number } ) => {\n\t\t\treturn {\n\t\t\t\tcommentsToShow: number,\n\t\t\t};\n\t\t},\n\t},\n\t{\n\t\tblock: 'core/tag-cloud',\n\t\twidget: 'tag_cloud',\n\t\ttransform: ( { taxonomy, count } ) => {\n\t\t\treturn {\n\t\t\t\tshowTagCounts: !! count,\n\t\t\t\ttaxonomy,\n\t\t\t};\n\t\t},\n\t},\n\t{\n\t\tblock: 'core/categories',\n\t\twidget: 'categories',\n\t\ttransform: ( { count, dropdown, hierarchical } ) => {\n\t\t\treturn {\n\t\t\t\tdisplayAsDropdown: !! dropdown,\n\t\t\t\tshowPostCounts: !! count,\n\t\t\t\tshowHierarchy: !! hierarchical,\n\t\t\t};\n\t\t},\n\t},\n\t{\n\t\tblock: 'core/audio',\n\t\twidget: 'media_audio',\n\t\ttransform: ( { url, preload, loop, attachment_id: id } ) => {\n\t\t\treturn {\n\t\t\t\tsrc: url,\n\t\t\t\tid,\n\t\t\t\tpreload,\n\t\t\t\tloop,\n\t\t\t};\n\t\t},\n\t},\n\t{\n\t\tblock: 'core/video',\n\t\twidget: 'media_video',\n\t\ttransform: ( { url, preload, loop, attachment_id: id } ) => {\n\t\t\treturn {\n\t\t\t\tsrc: url,\n\t\t\t\tid,\n\t\t\t\tpreload,\n\t\t\t\tloop,\n\t\t\t};\n\t\t},\n\t},\n\t{\n\t\tblock: 'core/image',\n\t\twidget: 'media_image',\n\t\ttransform: ( {\n\t\t\talt,\n\t\t\tattachment_id: id,\n\t\t\tcaption,\n\t\t\theight,\n\t\t\tlink_classes: linkClass,\n\t\t\tlink_rel: rel,\n\t\t\tlink_target_blank: targetBlack,\n\t\t\tlink_type: linkDestination,\n\t\t\tlink_url: link,\n\t\t\tsize: sizeSlug,\n\t\t\turl,\n\t\t\twidth,\n\t\t} ) => {\n\t\t\treturn {\n\t\t\t\talt,\n\t\t\t\tcaption,\n\t\t\t\theight,\n\t\t\t\tid,\n\t\t\t\tlink,\n\t\t\t\tlinkClass,\n\t\t\t\tlinkDestination,\n\t\t\t\tlinkTarget: targetBlack ? '_blank' : undefined,\n\t\t\t\trel,\n\t\t\t\tsizeSlug,\n\t\t\t\turl,\n\t\t\t\twidth,\n\t\t\t};\n\t\t},\n\t},\n\t{\n\t\tblock: 'core/gallery',\n\t\twidget: 'media_gallery',\n\t\ttransform: ( { ids, link_type: linkTo, size, number } ) => {\n\t\t\treturn {\n\t\t\t\tids,\n\t\t\t\tcolumns: number,\n\t\t\t\tlinkTo,\n\t\t\t\tsizeSlug: size,\n\t\t\t\timages: ids.map( ( id ) => ( {\n\t\t\t\t\tid,\n\t\t\t\t} ) ),\n\t\t\t};\n\t\t},\n\t},\n\t{\n\t\tblock: 'core/rss',\n\t\twidget: 'rss',\n\t\ttransform: ( {\n\t\t\turl,\n\t\t\tshow_author: displayAuthor,\n\t\t\tshow_date: displayDate,\n\t\t\tshow_summary: displayExcerpt,\n\t\t\titems,\n\t\t} ) => {\n\t\t\treturn {\n\t\t\t\tfeedURL: url,\n\t\t\t\tdisplayAuthor: !! displayAuthor,\n\t\t\t\tdisplayDate: !! displayDate,\n\t\t\t\tdisplayExcerpt: !! displayExcerpt,\n\t\t\t\titemsToShow: items,\n\t\t\t};\n\t\t},\n\t},\n].map( ( { block, widget, transform } ) => {\n\treturn {\n\t\ttype: 'block',\n\t\tblocks: [ block ],\n\t\tisMatch: ( { idBase, instance } ) => {\n\t\t\treturn idBase === widget && !! instance?.raw;\n\t\t},\n\t\ttransform: ( { instance } ) => {\n\t\t\tconst transformedBlock = createBlock(\n\t\t\t\tblock,\n\t\t\t\ttransform ? transform( instance.raw ) : undefined\n\t\t\t);\n\t\t\tif ( ! instance.raw?.title ) {\n\t\t\t\treturn transformedBlock;\n\t\t\t}\n\t\t\treturn [\n\t\t\t\tcreateBlock( 'core/heading', {\n\t\t\t\t\tcontent: instance.raw.title,\n\t\t\t\t} ),\n\t\t\t\ttransformedBlock,\n\t\t\t];\n\t\t},\n\t};\n} );\n\nconst transforms = {\n\tto: legacyWidgetTransforms,\n};\n\nexport default transforms;\n","/**\n * WordPress dependencies\n */\nimport { widget as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport transforms from './transforms';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\ttransforms,\n};\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst group = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z\" />\n\t</SVG>\n);\n\nexport default group;\n","/**\n * WordPress dependencies\n */\nimport {\n\tuseBlockProps,\n\tBlockIcon,\n\tButtonBlockAppender,\n\tInnerBlocks,\n\tstore as blockEditorStore,\n\tRichText,\n} from '@wordpress/block-editor';\nimport { Placeholder } from '@wordpress/components';\nimport { group as groupIcon } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\n\nexport default function Edit( props ) {\n\tconst { clientId } = props;\n\tconst { innerBlocks } = useSelect(\n\t\t( select ) => select( blockEditorStore ).getBlock( clientId ),\n\t\t[ clientId ]\n\t);\n\n\treturn (\n\t\t<div { ...useBlockProps( { className: 'widget' } ) }>\n\t\t\t{ innerBlocks.length === 0 ? (\n\t\t\t\t<PlaceholderContent { ...props } />\n\t\t\t) : (\n\t\t\t\t<PreviewContent { ...props } />\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nfunction PlaceholderContent( { clientId } ) {\n\treturn (\n\t\t<>\n\t\t\t<Placeholder\n\t\t\t\tclassName=\"wp-block-widget-group__placeholder\"\n\t\t\t\ticon={ <BlockIcon icon={ groupIcon } /> }\n\t\t\t\tlabel={ __( 'Widget Group' ) }\n\t\t\t>\n\t\t\t\t<ButtonBlockAppender rootClientId={ clientId } />\n\t\t\t</Placeholder>\n\t\t\t<InnerBlocks renderAppender={ false } />\n\t\t</>\n\t);\n}\n\nfunction PreviewContent( { attributes, setAttributes } ) {\n\treturn (\n\t\t<>\n\t\t\t<RichText\n\t\t\t\ttagName=\"h2\"\n\t\t\t\tidentifier=\"title\"\n\t\t\t\tclassName=\"widget-title\"\n\t\t\t\tallowedFormats={ [] }\n\t\t\t\tplaceholder={ __( 'Title' ) }\n\t\t\t\tvalue={ attributes.title ?? '' }\n\t\t\t\tonChange={ ( title ) => setAttributes( { title } ) }\n\t\t\t/>\n\t\t\t<InnerBlocks />\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { InnerBlocks, RichText } from '@wordpress/block-editor';\n\nconst v1 = {\n\tattributes: {\n\t\ttitle: {\n\t\t\ttype: 'string',\n\t\t},\n\t},\n\tsupports: {\n\t\thtml: false,\n\t\tinserter: true,\n\t\tcustomClassName: true,\n\t\treusable: false,\n\t},\n\tsave( { attributes } ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<RichText.Content\n\t\t\t\t\ttagName=\"h2\"\n\t\t\t\t\tclassName=\"widget-title\"\n\t\t\t\t\tvalue={ attributes.title }\n\t\t\t\t/>\n\t\t\t\t<InnerBlocks.Content />\n\t\t\t</>\n\t\t);\n\t},\n};\n\nexport default [ v1 ];\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { createBlock } from '@wordpress/blocks';\nimport { group as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ttitle: __( 'Widget Group' ),\n\tdescription: __(\n\t\t'Create a classic widget layout with a title that’s styled by your theme for your widget areas.'\n\t),\n\ticon,\n\t__experimentalLabel: ( { name: label } ) => label,\n\tedit,\n\tsave,\n\ttransforms: {\n\t\tfrom: [\n\t\t\t{\n\t\t\t\ttype: 'block',\n\t\t\t\tisMultiBlock: true,\n\t\t\t\tblocks: [ '*' ],\n\t\t\t\tisMatch( attributes, blocks ) {\n\t\t\t\t\t// Avoid transforming existing `widget-group` blocks.\n\t\t\t\t\treturn ! blocks.some(\n\t\t\t\t\t\t( block ) => block.name === 'core/widget-group'\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\t__experimentalConvert( blocks ) {\n\t\t\t\t\t// Put the selected blocks inside the new Widget Group's innerBlocks.\n\t\t\t\t\tlet innerBlocks = [\n\t\t\t\t\t\t...blocks.map( ( block ) => {\n\t\t\t\t\t\t\treturn createBlock(\n\t\t\t\t\t\t\t\tblock.name,\n\t\t\t\t\t\t\t\tblock.attributes,\n\t\t\t\t\t\t\t\tblock.innerBlocks\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ),\n\t\t\t\t\t];\n\n\t\t\t\t\t// If the first block is a heading then assume this is intended\n\t\t\t\t\t// to be the Widget's \"title\".\n\t\t\t\t\tconst firstHeadingBlock =\n\t\t\t\t\t\tinnerBlocks[ 0 ].name === 'core/heading'\n\t\t\t\t\t\t\t? innerBlocks[ 0 ]\n\t\t\t\t\t\t\t: null;\n\n\t\t\t\t\t// Remove the first heading block as we're copying\n\t\t\t\t\t// it's content into the Widget Group's title attribute.\n\t\t\t\t\tinnerBlocks = innerBlocks.filter(\n\t\t\t\t\t\t( block ) => block !== firstHeadingBlock\n\t\t\t\t\t);\n\n\t\t\t\t\treturn createBlock(\n\t\t\t\t\t\t'core/widget-group',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t...( firstHeadingBlock && {\n\t\t\t\t\t\t\t\ttitle: firstHeadingBlock.attributes.content,\n\t\t\t\t\t\t\t} ),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tinnerBlocks\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\tdeprecated,\n};\n","/**\n * WordPress dependencies\n */\nimport { InnerBlocks, RichText } from '@wordpress/block-editor';\n\nexport default function save( { attributes } ) {\n\treturn (\n\t\t<>\n\t\t\t<RichText.Content\n\t\t\t\ttagName=\"h2\"\n\t\t\t\tclassName=\"widget-title\"\n\t\t\t\tvalue={ attributes.title }\n\t\t\t/>\n\t\t\t<div className=\"wp-widget-group__inner-blocks\">\n\t\t\t\t<InnerBlocks.Content />\n\t\t\t</div>\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst moveTo = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M19.75 9c0-1.257-.565-2.197-1.39-2.858-.797-.64-1.827-1.017-2.815-1.247-1.802-.42-3.703-.403-4.383-.396L11 4.5V6l.177-.001c.696-.006 2.416-.02 4.028.356.887.207 1.67.518 2.216.957.52.416.829.945.829 1.688 0 .592-.167.966-.407 1.23-.255.281-.656.508-1.236.674-1.19.34-2.82.346-4.607.346h-.077c-1.692 0-3.527 0-4.942.404-.732.209-1.424.545-1.935 1.108-.526.579-.796 1.33-.796 2.238 0 1.257.565 2.197 1.39 2.858.797.64 1.827 1.017 2.815 1.247 1.802.42 3.703.403 4.383.396L13 19.5h.714V22L18 18.5 13.714 15v3H13l-.177.001c-.696.006-2.416.02-4.028-.356-.887-.207-1.67-.518-2.216-.957-.52-.416-.829-.945-.829-1.688 0-.592.167-.966.407-1.23.255-.281.656-.508 1.237-.674 1.189-.34 2.819-.346 4.606-.346h.077c1.692 0 3.527 0 4.941-.404.732-.209 1.425-.545 1.936-1.108.526-.579.796-1.33.796-2.238z\" />\n\t</SVG>\n);\n\nexport default moveTo;\n","/**\n * WordPress dependencies\n */\nimport {\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItemsChoice,\n\tToolbarGroup,\n\tToolbarItem,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { moveTo } from '@wordpress/icons';\n\nexport default function MoveToWidgetArea( {\n\tcurrentWidgetAreaId,\n\twidgetAreas,\n\tonSelect,\n} ) {\n\treturn (\n\t\t<ToolbarGroup>\n\t\t\t<ToolbarItem>\n\t\t\t\t{ ( toggleProps ) => (\n\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\ticon={ moveTo }\n\t\t\t\t\t\tlabel={ __( 'Move to widget area' ) }\n\t\t\t\t\t\ttoggleProps={ toggleProps }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t\t\t<MenuGroup label={ __( 'Move to' ) }>\n\t\t\t\t\t\t\t\t<MenuItemsChoice\n\t\t\t\t\t\t\t\t\tchoices={ widgetAreas.map(\n\t\t\t\t\t\t\t\t\t\t( widgetArea ) => ( {\n\t\t\t\t\t\t\t\t\t\t\tvalue: widgetArea.id,\n\t\t\t\t\t\t\t\t\t\t\tlabel: widgetArea.name,\n\t\t\t\t\t\t\t\t\t\t\tinfo: widgetArea.description,\n\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tvalue={ currentWidgetAreaId }\n\t\t\t\t\t\t\t\t\tonSelect={ ( value ) => {\n\t\t\t\t\t\t\t\t\t\tonSelect( value );\n\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</DropdownMenu>\n\t\t\t\t) }\n\t\t\t</ToolbarItem>\n\t\t</ToolbarGroup>\n\t);\n}\n","// @ts-check\n\n/**\n * Get the internal widget id from block.\n *\n * @typedef  {Object} Attributes\n * @property {string}     __internalWidgetId The internal widget id.\n * @typedef  {Object} Block\n * @property {Attributes} attributes         The attributes of the block.\n *\n * @param    {Block}      block              The block.\n * @return {string} The internal widget id.\n */\nexport function getWidgetIdFromBlock( block ) {\n\treturn block.attributes.__internalWidgetId;\n}\n\n/**\n * Add internal widget id to block's attributes.\n *\n * @param {Block}  block    The block.\n * @param {string} widgetId The widget id.\n * @return {Block} The updated block.\n */\nexport function addWidgetIdToBlock( block, widgetId ) {\n\treturn {\n\t\t...block,\n\t\tattributes: {\n\t\t\t...( block.attributes || {} ),\n\t\t\t__internalWidgetId: widgetId,\n\t\t},\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { subscribe, select, dispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blocksStore } from '@wordpress/blocks';\n\nexport default function registerLegacyWidgetVariations( settings ) {\n\tconst unsubscribe = subscribe( () => {\n\t\tconst hiddenIds =\n\t\t\tsettings?.widgetTypesToHideFromLegacyWidgetBlock ?? [];\n\t\tconst widgetTypes = select( coreStore )\n\t\t\t.getWidgetTypes( { per_page: -1 } )\n\t\t\t?.filter( ( widgetType ) => ! hiddenIds.includes( widgetType.id ) );\n\t\tif ( widgetTypes ) {\n\t\t\tunsubscribe();\n\t\t\tdispatch( blocksStore ).addBlockVariations(\n\t\t\t\t'core/legacy-widget',\n\t\t\t\twidgetTypes.map( ( widgetType ) => ( {\n\t\t\t\t\tname: widgetType.id,\n\t\t\t\t\ttitle: widgetType.name,\n\t\t\t\t\tdescription: widgetType.description,\n\t\t\t\t\tattributes: widgetType.is_multi\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tidBase: widgetType.id,\n\t\t\t\t\t\t\t\tinstance: {},\n\t\t\t\t\t\t  }\n\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\tid: widgetType.id,\n\t\t\t\t\t\t  },\n\t\t\t\t} ) )\n\t\t\t);\n\t\t}\n\t} );\n}\n","/**\n * WordPress dependencies\n */\nimport { registerBlockType } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport * as legacyWidget from './blocks/legacy-widget';\nimport * as widgetGroup from './blocks/widget-group';\n\nexport * from './components';\nexport * from './utils';\n\n/**\n * Registers the Legacy Widget block.\n *\n * Note that for the block to be useful, any scripts required by a widget must\n * be loaded into the page.\n *\n * @param {Object} supports Block support settings.\n * @see https://developer.wordpress.org/block-editor/how-to-guides/widgets/legacy-widget-block/\n */\nexport function registerLegacyWidgetBlock( supports = {} ) {\n\tconst { metadata, settings, name } = legacyWidget;\n\tregisterBlockType(\n\t\t{ name, ...metadata },\n\t\t{\n\t\t\t...settings,\n\t\t\tsupports: {\n\t\t\t\t...settings.supports,\n\t\t\t\t...supports,\n\t\t\t},\n\t\t}\n\t);\n}\n\n/**\n * Registers the Widget Group block.\n *\n * @param {Object} supports Block support settings.\n */\nexport function registerWidgetGroupBlock( supports = {} ) {\n\tconst { metadata, settings, name } = widgetGroup;\n\tregisterBlockType(\n\t\t{ name, ...metadata },\n\t\t{\n\t\t\t...settings,\n\t\t\tsupports: {\n\t\t\t\t...settings.supports,\n\t\t\t\t...supports,\n\t\t\t},\n\t\t}\n\t);\n}\n\nexport { default as registerLegacyWidgetVariations } from './register-legacy-widget-variations';\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","window","_jsx","SVG","xmlns","viewBox","children","Path","r","e","t","f","n","Array","isArray","length","arguments","WidgetTypeSelector","selectedId","onSelect","widgetTypes","useSelect","select","_select$getSettings$w","hiddenIds","blockEditorStore","getSettings","widgetTypesToHideFromLegacyWidgetBlock","coreStore","getWidgetTypes","per_page","filter","widgetType","includes","id","__","SelectControl","__nextHasNoMarginBottom","label","options","map","name","onChange","selected","find","isMulti","is_multi","Spinner","InspectorCard","description","_jsxs","className","Control","constructor","idBase","instance","onChangeInstance","onChangeHasPreview","onError","this","_instance","_hasPreview","number","lastNumber","handleFormChange","debounce","bind","handleFormSubmit","initDOM","bindEvents","loadContent","destroy","unbindEvents","element","remove","_this$id","_this$idBase","el","class","form","method","type","toString","content","jQuery","$","on","addEventListener","off","removeEventListener","saveWidget","innerHTML","preview","encodeWidget","hasPreview","isEmptyHTML","hash","formData","serializeForm","document","trigger","error","saveForm","event","preventDefault","tagName","attributes","createElement","attribute","entries","setAttribute","child","appendChild","innerText","async","widget","apiFetch","path","data","form_data","rendered_form","response","html","isEmptyNode","node","nodeType","TEXT_NODE","nodeValue","trim","ELEMENT_NODE","hasChildNodes","from","childNodes","every","URLSearchParams","FormData","Form","title","isVisible","isWide","ref","useRef","isMediumLargeViewport","useViewportMatch","outgoingInstances","Set","incomingInstances","createNotice","useDispatch","noticesStore","useEffect","current","has","delete","control","nextInstance","add","console","sprintf","clsx","Popover","focusOnMount","placement","offset","resize","flip","shift","hidden","Preview","isLoaded","setIsLoaded","useState","srcDoc","setSrcDoc","abortController","AbortController","undefined","restRoute","signal","fetchPreviewHTML","then","catch","abort","useRefEffect","iframe","setHeight","_iframe$contentDocume","_iframe$contentDocume2","height","Math","max","contentDocument","documentElement","offsetHeight","body","style","IntersectionObserver","ownerDocument","defaultView","intersectionObserver","entry","isIntersecting","threshold","observe","disconnect","_Fragment","Placeholder","Disabled","tabIndex","onLoad","target","overflow","NoPreview","ConvertToBlocksButton","clientId","rawInstance","replaceBlocks","ToolbarButton","onClick","createBlock","rawHandler","HTML","text","Empty","setAttributes","icon","BlockIcon","brushIcon","Flex","FlexBlock","NotEmpty","isSelected","setHasPreview","widgetTypeId","record","hasResolved","hasResolvedWidgetType","useEntityRecord","isNavigationMode","setInstance","useCallback","mode","BlockControls","group","raw","InspectorControls","to","block","transform","count","dropdown","displayAsDropdown","showPostCounts","show_date","displayPostDate","postsToShow","commentsToShow","taxonomy","showTagCounts","hierarchical","showHierarchy","url","preload","loop","attachment_id","src","alt","caption","link_classes","linkClass","link_rel","rel","link_target_blank","targetBlack","link_type","linkDestination","link_url","link","size","sizeSlug","width","linkTarget","ids","linkTo","columns","images","show_author","displayAuthor","displayDate","show_summary","displayExcerpt","items","feedURL","itemsToShow","blocks","isMatch","transformedBlock","metadata","$schema","apiVersion","category","textdomain","supports","customClassName","reusable","editorStyle","settings","edit","props","blockProps","useBlockProps","transforms","PlaceholderContent","groupIcon","ButtonBlockAppender","rootClientId","InnerBlocks","renderAppender","PreviewContent","_attributes$title","RichText","identifier","allowedFormats","placeholder","inserter","save","Content","__experimentalLabel","innerBlocks","getBlock","isMultiBlock","some","__experimentalConvert","firstHeadingBlock","deprecated","MoveToWidgetArea","currentWidgetAreaId","widgetAreas","ToolbarGroup","ToolbarItem","toggleProps","DropdownMenu","moveTo","onClose","MenuGroup","MenuItemsChoice","choices","widgetArea","info","getWidgetIdFromBlock","__internalWidgetId","addWidgetIdToBlock","widgetId","registerLegacyWidgetVariations","unsubscribe","subscribe","_settings$widgetTypes","dispatch","blocksStore","addBlockVariations","registerLegacyWidgetBlock","legacyWidget","registerBlockType","registerWidgetGroupBlock","widgetGroup"],"sourceRoot":""}