Current File : /home/resuelf/www/wp-content/plugins/gutenberg/build/widgets/index.min.js.map |
{"version":3,"file":"./build/widgets/index.min.js","mappings":"sCAAA,OAOC,WACA,aAEA,IAAIA,EAAS,CAAC,EAAEC,eAEhB,SAASC,IAGR,IAFA,IAAIC,EAAU,GAELC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAC1C,IAAIG,EAAMF,UAAUD,GACpB,GAAKG,EAAL,CAEA,IAAIC,SAAiBD,EAErB,GAAgB,WAAZC,GAAoC,WAAZA,EAC3BL,EAAQM,KAAKF,QACP,GAAIG,MAAMC,QAAQJ,IACxB,GAAIA,EAAID,OAAQ,CACf,IAAIM,EAAQV,EAAWW,MAAM,KAAMN,GAC/BK,GACHT,EAAQM,KAAKG,EAEf,OACM,GAAgB,WAAZJ,EACV,GAAID,EAAIO,WAAaC,OAAOC,UAAUF,SACrC,IAAK,IAAIG,KAAOV,EACXP,EAAOkB,KAAKX,EAAKU,IAAQV,EAAIU,IAChCd,EAAQM,KAAKQ,QAIfd,EAAQM,KAAKF,EAAIO,WArBD,CAwBnB,CAEA,OAAOX,EAAQgB,KAAK,IACrB,CAEqCC,EAAOC,SAC3CnB,EAAWoB,QAAUpB,EACrBkB,EAAOC,QAAUnB,QAKhB,KAFwB,EAAF,WACtB,OAAOA,CACP,UAFoB,OAEpB,YAIH,CAlDA,E,GCNIqB,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaL,QAGrB,IAAID,EAASG,EAAyBE,GAAY,CAGjDJ,QAAS,CAAC,GAOX,OAHAO,EAAoBH,GAAUL,EAAQA,EAAOC,QAASG,GAG/CJ,EAAOC,OACf,CCrBAG,EAAoBK,EAAI,SAAST,GAChC,IAAIU,EAASV,GAAUA,EAAOW,WAC7B,WAAa,OAAOX,EAAgB,OAAG,EACvC,WAAa,OAAOA,CAAQ,EAE7B,OADAI,EAAoBQ,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vG,EAAOwG,GAC1C,MAAO,IACHxG,EACH3I,WAAY,IACN2I,EAAM3I,YAAc,CAAC,EAC1BiP,mBAAoBE,GAGvB,CCzBe,SAASC,EAAgC9C,GACvD,MAAM+C,GAAcC,EAAAA,EAAAA,YAAW,KAAM,IAAAC,EACpC,MAAMvU,EAC2C,QADlCuU,EACdjD,GAAUnR,8CAAsC,IAAAoU,EAAAA,EAAI,GAC/C3U,GAAcE,EAAAA,EAAAA,QAAQM,EAAAA,OAC1BC,eAAgB,CAAEC,UAAW,KAC5BC,QAAUC,IAAkBR,EAAUS,SAAUD,EAAWE,MACzDd,IACJyU,KACAG,EAAAA,EAAAA,UAAUC,EAAAA,OAAcC,mBACvB,qBACA9U,EAAYoB,KAAOR,IAAU,CAC5BS,KAAMT,EAAWE,GACjBoG,MAAOtG,EAAWS,KAClBQ,YAAajB,EAAWiB,YACxBuD,WAAYxE,EAAWc,SACpB,CACAO,OAAQrB,EAAWE,GACnBoB,SAAU,CAAC,GAEX,CACApB,GAAIF,EAAWE,SAIrB,GAEF,CCXO,SAASiU,EAA2BzD,EAAW,CAAC,GACtD,MAAM,SAAEL,EAAQ,SAAES,EAAQ,KAAErQ,GAAS2T,GACrCC,EAAAA,EAAAA,mBACC,CAAE5T,UAAS4P,GACX,IACIS,EACHJ,SAAU,IACNI,EAASJ,YACTA,IAIP,CAOO,SAAS4D,GAA0B5D,EAAW,CAAC,GACrD,MAAM,SAAEL,EAAQ,SAAES,EAAQ,KAAErQ,GAAS8T,GACrCF,EAAAA,EAAAA,mBACC,CAAE5T,UAAS4P,GACX,IACIS,EACHJ,SAAU,IACNI,EAASJ,YACTA,IAIP,C","sources":["webpack://wp/./node_modules/classnames/index.js","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 \"React\"","webpack://wp/external window [\"wp\",\"primitives\"]","../../packages/icons/src/library/widget.js","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":["/*!\n Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(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};","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blocks\"];","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"React\"];","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"primitives\"];","/**\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","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blockEditor\"];","var __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","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"i18n\"];","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"element\"];","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"data\"];","var __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","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"notices\"];","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"compose\"];","var __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 classnames from 'classnames';\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={ classnames( {\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 classnames from 'classnames';\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={ classnames(\n\t\t\t\t\t'wp-block-legacy-widget__edit-preview',\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-offscreen': ! isVisible || ! isLoaded,\n\t\t\t\t\t}\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 classnames from 'classnames';\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: classnames( {\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\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":["hasOwn","hasOwnProperty","classNames","classes","i","arguments","length","arg","argType","push","Array","isArray","inner","apply","toString","Object","prototype","key","call","join","module","exports","default","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","obj","prop","r","Symbol","toStringTag","value","window","createElement","SVG","xmlns","viewBox","Path","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","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","content","jQuery","$","on","addEventListener","off","removeEventListener","saveWidget","innerHTML","preview","encodeWidget","hasPreview","isEmptyHTML","hash","formData","serializeForm","document","trigger","error","saveForm","event","preventDefault","tagName","attributes","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","classnames","Popover","focusOnMount","placement","offset","resize","flip","shift","hidden","Preview","isLoaded","setIsLoaded","useState","srcDoc","setSrcDoc","abortController","AbortController","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","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":""}