diff -r 34716fd837a4 -r be944660c56a wp/wp-includes/js/dist/edit-post.js --- a/wp/wp-includes/js/dist/edit-post.js Tue Dec 15 15:52:01 2020 +0100 +++ b/wp/wp-includes/js/dist/edit-post.js Wed Sep 21 18:19:35 2022 +0200 @@ -82,195 +82,81 @@ /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 439); +/******/ return __webpack_require__(__webpack_require__.s = "dSQ2"); /******/ }) /************************************************************************/ /******/ ({ -/***/ 0: -/***/ (function(module, exports) { - -(function() { module.exports = this["wp"]["element"]; }()); - -/***/ }), - -/***/ 1: -/***/ (function(module, exports) { - -(function() { module.exports = this["wp"]["i18n"]; }()); - -/***/ }), - -/***/ 10: -/***/ (function(module, exports) { - -(function() { module.exports = this["wp"]["blocks"]; }()); - -/***/ }), - -/***/ 100: -/***/ (function(module, exports) { - -(function() { module.exports = this["wp"]["notices"]; }()); - -/***/ }), - -/***/ 104: -/***/ (function(module, exports) { - -(function() { module.exports = this["wp"]["warning"]; }()); - -/***/ }), - -/***/ 11: -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - Copyright (c) 2017 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/ -/* global define */ - -(function () { - 'use strict'; - - var hasOwn = {}.hasOwnProperty; - - function classNames () { - var classes = []; - - for (var i = 0; i < arguments.length; i++) { - var arg = arguments[i]; - if (!arg) continue; - - var argType = typeof arg; - - if (argType === 'string' || argType === 'number') { - classes.push(arg); - } else if (Array.isArray(arg) && arg.length) { - var inner = classNames.apply(null, arg); - if (inner) { - classes.push(inner); - } - } else if (argType === 'object') { - for (var key in arg) { - if (hasOwn.call(arg, key) && arg[key]) { - classes.push(key); - } - } - } - } - - return classes.join(' '); - } - - if ( true && module.exports) { - classNames.default = classNames; - module.exports = classNames; - } else if (true) { - // register as 'classnames', consistent with npm package name - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { - return classNames; - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} -}()); +/***/ "0dt7": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return STORE_NAME; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return VIEW_AS_LINK_SELECTOR; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return VIEW_AS_PREVIEW_LINK_SELECTOR; }); +/** + * The identifier for the data store. + * + * @type {string} + */ +const STORE_NAME = 'core/edit-post'; +/** + * CSS selector string for the admin bar view post link anchor tag. + * + * @type {string} + */ + +const VIEW_AS_LINK_SELECTOR = '#wp-admin-bar-view a'; +/** + * CSS selector string for the admin bar preview post link anchor tag. + * + * @type {string} + */ + +const VIEW_AS_PREVIEW_LINK_SELECTOR = '#wp-admin-bar-preview a'; /***/ }), -/***/ 110: -/***/ (function(module, exports, __webpack_require__) { +/***/ "1ZqX": +/***/ (function(module, exports) { + +(function() { module.exports = window["wp"]["data"]; }()); + +/***/ }), + +/***/ "4qRI": +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; - - -function flattenIntoMap( map, effects ) { - var i; - if ( Array.isArray( effects ) ) { - for ( i = 0; i < effects.length; i++ ) { - flattenIntoMap( map, effects[ i ] ); - } - } else { - for ( i in effects ) { - map[ i ] = ( map[ i ] || [] ).concat( effects[ i ] ); - } - } -} - -function refx( effects ) { - var map = {}, - middleware; - - flattenIntoMap( map, effects ); - - middleware = function( store ) { - return function( next ) { - return function( action ) { - var handlers = map[ action.type ], - result = next( action ), - i, handlerAction; - - if ( handlers ) { - for ( i = 0; i < handlers.length; i++ ) { - handlerAction = handlers[ i ]( action, store ); - if ( handlerAction ) { - store.dispatch( handlerAction ); - } - } - } - - return result; - }; - }; - }; - - middleware.effects = map; - - return middleware; -} - -module.exports = refx; +function memoize(fn) { + var cache = {}; + return function (arg) { + if (cache[arg] === undefined) cache[arg] = fn(arg); + return cache[arg]; + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (memoize); /***/ }), -/***/ 114: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); - - -/** - * WordPress dependencies - */ - - -function BaseOption(_ref) { - var label = _ref.label, - isChecked = _ref.isChecked, - onChange = _ref.onChange, - children = _ref.children; - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { - className: "edit-post-options-modal__option" - }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["CheckboxControl"], { - label: label, - checked: isChecked, - onChange: onChange - }), children); -} - -/* harmony default export */ __webpack_exports__["a"] = (BaseOption); - +/***/ "51Zz": +/***/ (function(module, exports) { + +(function() { module.exports = window["wp"]["dataControls"]; }()); /***/ }), -/***/ 117: +/***/ "6aBm": +/***/ (function(module, exports) { + +(function() { module.exports = window["wp"]["mediaUtils"]; }()); + +/***/ }), + +/***/ "8oxB": /***/ (function(module, exports) { // shim for using process in browser @@ -461,118 +347,175 @@ /***/ }), -/***/ 12: +/***/ "9uj6": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; }); -function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return self; -} +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("4qRI"); + + +var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23 + +var index = Object(_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(function (prop) { + return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 + /* o */ + && prop.charCodeAt(1) === 110 + /* n */ + && prop.charCodeAt(2) < 91; +} +/* Z+1 */ +); + +/* harmony default export */ __webpack_exports__["default"] = (index); + /***/ }), -/***/ 14: +/***/ "Cg8A": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; }); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js -var arrayWithHoles = __webpack_require__(38); - -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js -function _iterableToArrayLimit(arr, i) { - if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"] != null) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; -} -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js -var unsupportedIterableToArray = __webpack_require__(29); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js -var nonIterableRest = __webpack_require__(39); - -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js - - - - -function _slicedToArray(arr, i) { - return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])(); -} +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); +/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); + + +/** + * WordPress dependencies + */ + +const cog = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24" +}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { + fillRule: "evenodd", + d: "M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z", + clipRule: "evenodd" +})); +/* harmony default export */ __webpack_exports__["a"] = (cog); + /***/ }), -/***/ 15: +/***/ "Civd": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); +/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); + + +/** + * WordPress dependencies + */ + +const layout = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24" +}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { + d: "M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z" +})); +/* harmony default export */ __webpack_exports__["a"] = (layout); + + +/***/ }), + +/***/ "GRId": +/***/ (function(module, exports) { + +(function() { module.exports = window["wp"]["element"]; }()); + +/***/ }), + +/***/ "HSyU": +/***/ (function(module, exports) { + +(function() { module.exports = window["wp"]["blocks"]; }()); + +/***/ }), + +/***/ "K+tz": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; }); -/* harmony import */ var _objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41); - -function _objectWithoutProperties(source, excluded) { - if (source == null) return {}; - var target = Object(_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded); - var key, i; - - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - - for (i = 0; i < sourceSymbolKeys.length; i++) { - key = sourceSymbolKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; - target[key] = source[key]; - } - } - - return target; -} +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); +/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); + + +/** + * WordPress dependencies + */ + +const external = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24" +}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { + d: "M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z" +})); +/* harmony default export */ __webpack_exports__["a"] = (external); + + +/***/ }), + +/***/ "K9lf": +/***/ (function(module, exports) { + +(function() { module.exports = window["wp"]["compose"]; }()); + +/***/ }), + +/***/ "KEfo": +/***/ (function(module, exports) { + +(function() { module.exports = window["wp"]["viewport"]; }()); /***/ }), -/***/ 152: +/***/ "Mmq9": /***/ (function(module, exports) { -(function() { module.exports = this["wp"]["mediaUtils"]; }()); +(function() { module.exports = window["wp"]["url"]; }()); /***/ }), -/***/ 154: +/***/ "NWDH": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); +/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); + + +/** + * WordPress dependencies + */ + +const chevronDown = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { + viewBox: "0 0 24 24", + xmlns: "http://www.w3.org/2000/svg" +}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { + d: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z" +})); +/* harmony default export */ __webpack_exports__["a"] = (chevronDown); + + +/***/ }), + +/***/ "OzlF": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6); +/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); @@ -580,24 +523,24 @@ * WordPress dependencies */ -var close = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 24 24" +const listView = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { + viewBox: "0 0 24 24", + xmlns: "http://www.w3.org/2000/svg" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { - d: "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z" + d: "M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z" })); -/* harmony default export */ __webpack_exports__["a"] = (close); +/* harmony default export */ __webpack_exports__["a"] = (listView); /***/ }), -/***/ 155: +/***/ "Q4Sy": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6); +/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); @@ -605,385 +548,2467 @@ * WordPress dependencies */ -var check = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { +const plus = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { - d: "M9 18.6L3.5 13l1-1L9 16.4l9.5-9.9 1 1z" + d: "M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z" +})); +/* harmony default export */ __webpack_exports__["a"] = (plus); + + +/***/ }), + +/***/ "QyPg": +/***/ (function(module, exports) { + +(function() { module.exports = window["wp"]["blockLibrary"]; }()); + +/***/ }), + +/***/ "RMJe": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); +/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); + + +/** + * WordPress dependencies + */ + +const check = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24" +}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { + d: "M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z" })); /* harmony default export */ __webpack_exports__["a"] = (check); /***/ }), -/***/ 16: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; }); -function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); -} +/***/ "RxS6": +/***/ (function(module, exports) { + +(function() { module.exports = window["wp"]["keycodes"]; }()); /***/ }), -/***/ 164: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/* unused harmony export Fill */ -/* unused harmony export Slot */ -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9); -/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(76); -/* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _wordpress_warning__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(104); -/* harmony import */ var _wordpress_warning__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_warning__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _options_modal_options__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(470); - - -/** - * Defines as extensibility slot for the Settings sidebar - */ - -/** - * WordPress dependencies - */ - - - - - -/** - * Internal dependencies - */ - - - -var _createSlotFill = Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["createSlotFill"])('PluginDocumentSettingPanel'), - Fill = _createSlotFill.Fill, - Slot = _createSlotFill.Slot; - - - -var PluginDocumentSettingFill = function PluginDocumentSettingFill(_ref) { - var isEnabled = _ref.isEnabled, - panelName = _ref.panelName, - opened = _ref.opened, - onToggle = _ref.onToggle, - className = _ref.className, - title = _ref.title, - icon = _ref.icon, - children = _ref.children; - return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_options_modal_options__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], { - label: title, - panelName: panelName - }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(Fill, null, isEnabled && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["PanelBody"], { - className: className, - title: title, - icon: icon, - opened: opened, - onToggle: onToggle - }, children))); -}; -/** - * Renders items below the Status & Availability panel in the Document Sidebar. - * - * @param {Object} props Component properties. - * @param {string} [props.name] The machine-friendly name for the panel. - * @param {string} [props.className] An optional class name added to the row. - * @param {string} [props.title] The title of the panel - * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar. - * - * @example - * ES5 - * ```js - * // Using ES5 syntax - * var el = wp.element.createElement; - * var __ = wp.i18n.__; - * var registerPlugin = wp.plugins.registerPlugin; - * var PluginDocumentSettingPanel = wp.editPost.PluginDocumentSettingPanel; - * - * function MyDocumentSettingPlugin() { - * return el( - * PluginDocumentSettingPanel, - * { - * className: 'my-document-setting-plugin', - * title: 'My Panel', - * }, - * __( 'My Document Setting Panel' ) - * ); - * } - * - * registerPlugin( 'my-document-setting-plugin', { - * render: MyDocumentSettingPlugin - * } ); - * ``` - * - * @example - * ESNext - * ```jsx - * // Using ESNext syntax - * import { registerPlugin } from '@wordpress/plugins'; - * import { PluginDocumentSettingPanel } from '@wordpress/edit-post'; - * - * const MyDocumentSettingTest = () => ( - * - *

My Document Setting Panel

- *
- * ); - * - * registerPlugin( 'document-setting-test', { render: MyDocumentSettingTest } ); - * ``` - * - * @return {WPComponent} The component to be rendered. - */ - - -var PluginDocumentSettingPanel = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__["compose"])(Object(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_3__["withPluginContext"])(function (context, ownProps) { - if (undefined === ownProps.name) { - typeof process !== "undefined" && process.env && "production" !== "production" ? _wordpress_warning__WEBPACK_IMPORTED_MODULE_5___default()('PluginDocumentSettingPanel requires a name property.') : void 0; - } - - return { - icon: ownProps.icon || context.icon, - panelName: "".concat(context.name, "/").concat(ownProps.name) - }; -}), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withSelect"])(function (select, _ref2) { - var panelName = _ref2.panelName; - return { - opened: select('core/edit-post').isEditorPanelOpened(panelName), - isEnabled: select('core/edit-post').isEditorPanelEnabled(panelName) - }; -}), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withDispatch"])(function (dispatch, _ref3) { - var panelName = _ref3.panelName; - return { - onToggle: function onToggle() { - return dispatch('core/edit-post').toggleEditorPanelOpened(panelName); - } - }; -}))(PluginDocumentSettingFill); -PluginDocumentSettingPanel.Slot = Slot; -/* harmony default export */ __webpack_exports__["a"] = (PluginDocumentSettingPanel); - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(117))) - -/***/ }), - -/***/ 177: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6); -/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); - - -/** - * WordPress dependencies - */ - -var closeSmall = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 24 24" -}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { - d: "M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z" -})); -/* harmony default export */ __webpack_exports__["a"] = (closeSmall); - - -/***/ }), - -/***/ 18: +/***/ "T40v": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS -__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; }); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js -var arrayLikeToArray = __webpack_require__(26); - -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js - -function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr); -} -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js -var iterableToArray = __webpack_require__(35); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js -var unsupportedIterableToArray = __webpack_require__(29); - -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js -function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js - - - - -function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread(); -} +__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ store; }); + +// NAMESPACE OBJECT: ./node_modules/@wordpress/edit-post/build-module/store/actions.js +var actions_namespaceObject = {}; +__webpack_require__.r(actions_namespaceObject); +__webpack_require__.d(actions_namespaceObject, "openGeneralSidebar", function() { return openGeneralSidebar; }); +__webpack_require__.d(actions_namespaceObject, "closeGeneralSidebar", function() { return closeGeneralSidebar; }); +__webpack_require__.d(actions_namespaceObject, "openModal", function() { return openModal; }); +__webpack_require__.d(actions_namespaceObject, "closeModal", function() { return closeModal; }); +__webpack_require__.d(actions_namespaceObject, "openPublishSidebar", function() { return openPublishSidebar; }); +__webpack_require__.d(actions_namespaceObject, "closePublishSidebar", function() { return closePublishSidebar; }); +__webpack_require__.d(actions_namespaceObject, "togglePublishSidebar", function() { return togglePublishSidebar; }); +__webpack_require__.d(actions_namespaceObject, "toggleEditorPanelEnabled", function() { return toggleEditorPanelEnabled; }); +__webpack_require__.d(actions_namespaceObject, "toggleEditorPanelOpened", function() { return toggleEditorPanelOpened; }); +__webpack_require__.d(actions_namespaceObject, "removeEditorPanel", function() { return removeEditorPanel; }); +__webpack_require__.d(actions_namespaceObject, "toggleFeature", function() { return toggleFeature; }); +__webpack_require__.d(actions_namespaceObject, "switchEditorMode", function() { return switchEditorMode; }); +__webpack_require__.d(actions_namespaceObject, "togglePinnedPluginItem", function() { return togglePinnedPluginItem; }); +__webpack_require__.d(actions_namespaceObject, "hideBlockTypes", function() { return hideBlockTypes; }); +__webpack_require__.d(actions_namespaceObject, "updatePreferredStyleVariations", function() { return updatePreferredStyleVariations; }); +__webpack_require__.d(actions_namespaceObject, "__experimentalUpdateLocalAutosaveInterval", function() { return __experimentalUpdateLocalAutosaveInterval; }); +__webpack_require__.d(actions_namespaceObject, "showBlockTypes", function() { return showBlockTypes; }); +__webpack_require__.d(actions_namespaceObject, "setAvailableMetaBoxesPerLocation", function() { return setAvailableMetaBoxesPerLocation; }); +__webpack_require__.d(actions_namespaceObject, "requestMetaBoxUpdates", function() { return requestMetaBoxUpdates; }); +__webpack_require__.d(actions_namespaceObject, "metaBoxUpdatesSuccess", function() { return metaBoxUpdatesSuccess; }); +__webpack_require__.d(actions_namespaceObject, "__experimentalSetPreviewDeviceType", function() { return __experimentalSetPreviewDeviceType; }); +__webpack_require__.d(actions_namespaceObject, "setIsInserterOpened", function() { return setIsInserterOpened; }); +__webpack_require__.d(actions_namespaceObject, "setIsListViewOpened", function() { return setIsListViewOpened; }); +__webpack_require__.d(actions_namespaceObject, "setIsEditingTemplate", function() { return setIsEditingTemplate; }); +__webpack_require__.d(actions_namespaceObject, "__unstableSwitchToTemplateMode", function() { return __unstableSwitchToTemplateMode; }); +__webpack_require__.d(actions_namespaceObject, "initializeMetaBoxes", function() { return initializeMetaBoxes; }); + +// NAMESPACE OBJECT: ./node_modules/@wordpress/edit-post/build-module/store/selectors.js +var selectors_namespaceObject = {}; +__webpack_require__.r(selectors_namespaceObject); +__webpack_require__.d(selectors_namespaceObject, "getEditorMode", function() { return getEditorMode; }); +__webpack_require__.d(selectors_namespaceObject, "isEditorSidebarOpened", function() { return isEditorSidebarOpened; }); +__webpack_require__.d(selectors_namespaceObject, "isPluginSidebarOpened", function() { return isPluginSidebarOpened; }); +__webpack_require__.d(selectors_namespaceObject, "getActiveGeneralSidebarName", function() { return getActiveGeneralSidebarName; }); +__webpack_require__.d(selectors_namespaceObject, "getPreferences", function() { return getPreferences; }); +__webpack_require__.d(selectors_namespaceObject, "getPreference", function() { return getPreference; }); +__webpack_require__.d(selectors_namespaceObject, "isPublishSidebarOpened", function() { return isPublishSidebarOpened; }); +__webpack_require__.d(selectors_namespaceObject, "isEditorPanelRemoved", function() { return isEditorPanelRemoved; }); +__webpack_require__.d(selectors_namespaceObject, "isEditorPanelEnabled", function() { return isEditorPanelEnabled; }); +__webpack_require__.d(selectors_namespaceObject, "isEditorPanelOpened", function() { return isEditorPanelOpened; }); +__webpack_require__.d(selectors_namespaceObject, "isModalActive", function() { return isModalActive; }); +__webpack_require__.d(selectors_namespaceObject, "isFeatureActive", function() { return isFeatureActive; }); +__webpack_require__.d(selectors_namespaceObject, "isPluginItemPinned", function() { return isPluginItemPinned; }); +__webpack_require__.d(selectors_namespaceObject, "getActiveMetaBoxLocations", function() { return getActiveMetaBoxLocations; }); +__webpack_require__.d(selectors_namespaceObject, "isMetaBoxLocationVisible", function() { return isMetaBoxLocationVisible; }); +__webpack_require__.d(selectors_namespaceObject, "isMetaBoxLocationActive", function() { return isMetaBoxLocationActive; }); +__webpack_require__.d(selectors_namespaceObject, "getMetaBoxesPerLocation", function() { return getMetaBoxesPerLocation; }); +__webpack_require__.d(selectors_namespaceObject, "getAllMetaBoxes", function() { return getAllMetaBoxes; }); +__webpack_require__.d(selectors_namespaceObject, "hasMetaBoxes", function() { return selectors_hasMetaBoxes; }); +__webpack_require__.d(selectors_namespaceObject, "isSavingMetaBoxes", function() { return selectors_isSavingMetaBoxes; }); +__webpack_require__.d(selectors_namespaceObject, "__experimentalGetPreviewDeviceType", function() { return __experimentalGetPreviewDeviceType; }); +__webpack_require__.d(selectors_namespaceObject, "isInserterOpened", function() { return isInserterOpened; }); +__webpack_require__.d(selectors_namespaceObject, "__experimentalGetInsertionPoint", function() { return __experimentalGetInsertionPoint; }); +__webpack_require__.d(selectors_namespaceObject, "isListViewOpened", function() { return isListViewOpened; }); +__webpack_require__.d(selectors_namespaceObject, "isEditingTemplate", function() { return selectors_isEditingTemplate; }); +__webpack_require__.d(selectors_namespaceObject, "areMetaBoxesInitialized", function() { return areMetaBoxesInitialized; }); +__webpack_require__.d(selectors_namespaceObject, "getEditedPostTemplate", function() { return getEditedPostTemplate; }); + +// EXTERNAL MODULE: external ["wp","data"] +var external_wp_data_ = __webpack_require__("1ZqX"); + +// EXTERNAL MODULE: external ["wp","dataControls"] +var external_wp_dataControls_ = __webpack_require__("51Zz"); + +// EXTERNAL MODULE: external "lodash" +var external_lodash_ = __webpack_require__("YLtl"); + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/defaults.js +const PREFERENCES_DEFAULTS = { + editorMode: 'visual', + panels: { + 'post-status': { + opened: true + } + }, + features: { + fixedToolbar: false, + welcomeGuide: true, + fullscreenMode: true, + showIconLabels: false, + themeStyles: true, + showBlockBreadcrumbs: true, + welcomeGuideTemplate: true + }, + hiddenBlockTypes: [], + preferredStyleVariations: {}, + localAutosaveInterval: 15 +}; + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/reducer.js +/** + * External dependencies + */ + +/** + * WordPress dependencies + */ + + +/** + * Internal dependencies + */ + + +/** + * Higher-order reducer creator which provides the given initial state for the + * original reducer. + * + * @param {*} initialState Initial state to provide to reducer. + * + * @return {Function} Higher-order reducer. + */ + +const createWithInitialState = initialState => reducer => { + return (state = initialState, action) => reducer(state, action); +}; +/** + * Reducer returning the user preferences. + * + * @param {Object} state Current state. + * @param {string} state.mode Current editor mode, either + * "visual" or "text". + * @param {boolean} state.isGeneralSidebarDismissed Whether general sidebar is + * dismissed. False by default + * or when closing general + * sidebar, true when opening + * sidebar. + * @param {boolean} state.isSidebarOpened Whether the sidebar is + * opened or closed. + * @param {Object} state.panels The state of the different + * sidebar panels. + * @param {Object} action Dispatched action. + * + * @return {Object} Updated state. + */ + + +const preferences = Object(external_lodash_["flow"])([external_wp_data_["combineReducers"], createWithInitialState(PREFERENCES_DEFAULTS)])({ + panels(state, action) { + switch (action.type) { + case 'TOGGLE_PANEL_ENABLED': + { + const { + panelName + } = action; + return { ...state, + [panelName]: { ...state[panelName], + enabled: !Object(external_lodash_["get"])(state, [panelName, 'enabled'], true) + } + }; + } + + case 'TOGGLE_PANEL_OPENED': + { + const { + panelName + } = action; + const isOpen = state[panelName] === true || Object(external_lodash_["get"])(state, [panelName, 'opened'], false); + return { ...state, + [panelName]: { ...state[panelName], + opened: !isOpen + } + }; + } + } + + return state; + }, + + features(state, action) { + if (action.type === 'TOGGLE_FEATURE') { + return { ...state, + [action.feature]: !state[action.feature] + }; + } + + return state; + }, + + editorMode(state, action) { + if (action.type === 'SWITCH_MODE') { + return action.mode; + } + + return state; + }, + + hiddenBlockTypes(state, action) { + switch (action.type) { + case 'SHOW_BLOCK_TYPES': + return Object(external_lodash_["without"])(state, ...action.blockNames); + + case 'HIDE_BLOCK_TYPES': + return Object(external_lodash_["union"])(state, action.blockNames); + } + + return state; + }, + + preferredStyleVariations(state, action) { + switch (action.type) { + case 'UPDATE_PREFERRED_STYLE_VARIATIONS': + { + if (!action.blockName) { + return state; + } + + if (!action.blockStyle) { + return Object(external_lodash_["omit"])(state, [action.blockName]); + } + + return { ...state, + [action.blockName]: action.blockStyle + }; + } + } + + return state; + }, + + localAutosaveInterval(state, action) { + switch (action.type) { + case 'UPDATE_LOCAL_AUTOSAVE_INTERVAL': + return action.interval; + } + + return state; + } + +}); +/** + * Reducer storing the list of all programmatically removed panels. + * + * @param {Array} state Current state. + * @param {Object} action Action object. + * + * @return {Array} Updated state. + */ + +function removedPanels(state = [], action) { + switch (action.type) { + case 'REMOVE_PANEL': + if (!Object(external_lodash_["includes"])(state, action.panelName)) { + return [...state, action.panelName]; + } + + } + + return state; +} +/** + * Reducer for storing the name of the open modal, or null if no modal is open. + * + * @param {Object} state Previous state. + * @param {Object} action Action object containing the `name` of the modal + * + * @return {Object} Updated state + */ + +function activeModal(state = null, action) { + switch (action.type) { + case 'OPEN_MODAL': + return action.name; + + case 'CLOSE_MODAL': + return null; + } + + return state; +} +function publishSidebarActive(state = false, action) { + switch (action.type) { + case 'OPEN_PUBLISH_SIDEBAR': + return true; + + case 'CLOSE_PUBLISH_SIDEBAR': + return false; + + case 'TOGGLE_PUBLISH_SIDEBAR': + return !state; + } + + return state; +} +/** + * Reducer keeping track of the meta boxes isSaving state. + * A "true" value means the meta boxes saving request is in-flight. + * + * + * @param {boolean} state Previous state. + * @param {Object} action Action Object. + * + * @return {Object} Updated state. + */ + +function isSavingMetaBoxes(state = false, action) { + switch (action.type) { + case 'REQUEST_META_BOX_UPDATES': + return true; + + case 'META_BOX_UPDATES_SUCCESS': + return false; + + default: + return state; + } +} +/** + * Reducer keeping track of the meta boxes per location. + * + * @param {boolean} state Previous state. + * @param {Object} action Action Object. + * + * @return {Object} Updated state. + */ + +function metaBoxLocations(state = {}, action) { + switch (action.type) { + case 'SET_META_BOXES_PER_LOCATIONS': + return action.metaBoxesPerLocation; + } + + return state; +} +/** + * Reducer returning the editing canvas device type. + * + * @param {Object} state Current state. + * @param {Object} action Dispatched action. + * + * @return {Object} Updated state. + */ + +function deviceType(state = 'Desktop', action) { + switch (action.type) { + case 'SET_PREVIEW_DEVICE_TYPE': + return action.deviceType; + } + + return state; +} +/** + * Reducer to set the block inserter panel open or closed. + * + * Note: this reducer interacts with the list view panel reducer + * to make sure that only one of the two panels is open at the same time. + * + * @param {Object} state Current state. + * @param {Object} action Dispatched action. + */ + +function blockInserterPanel(state = false, action) { + switch (action.type) { + case 'SET_IS_LIST_VIEW_OPENED': + return action.isOpen ? false : state; + + case 'SET_IS_INSERTER_OPENED': + return action.value; + } + + return state; +} +/** + * Reducer to set the list view panel open or closed. + * + * Note: this reducer interacts with the inserter panel reducer + * to make sure that only one of the two panels is open at the same time. + * + * @param {Object} state Current state. + * @param {Object} action Dispatched action. + */ + +function listViewPanel(state = false, action) { + switch (action.type) { + case 'SET_IS_INSERTER_OPENED': + return action.value ? false : state; + + case 'SET_IS_LIST_VIEW_OPENED': + return action.isOpen; + } + + return state; +} +/** + * Reducer tracking whether the inserter is open. + * + * @param {boolean} state + * @param {Object} action + */ + +function isEditingTemplate(state = false, action) { + switch (action.type) { + case 'SET_IS_EDITING_TEMPLATE': + return action.value; + } + + return state; +} +/** + * Reducer tracking whether meta boxes are initialized. + * + * @param {boolean} state + * @param {Object} action + * + * @return {boolean} Updated state. + */ + + +function metaBoxesInitialized(state = false, action) { + switch (action.type) { + case 'META_BOXES_INITIALIZED': + return true; + } + + return state; +} + +const metaBoxes = Object(external_wp_data_["combineReducers"])({ + isSaving: isSavingMetaBoxes, + locations: metaBoxLocations, + initialized: metaBoxesInitialized +}); +/* harmony default export */ var reducer = (Object(external_wp_data_["combineReducers"])({ + activeModal, + metaBoxes, + preferences, + publishSidebarActive, + removedPanels, + deviceType, + blockInserterPanel, + listViewPanel, + isEditingTemplate +})); + +// EXTERNAL MODULE: external ["wp","i18n"] +var external_wp_i18n_ = __webpack_require__("l3Sj"); + +// EXTERNAL MODULE: ./node_modules/@wordpress/interface/build-module/index.js + 15 modules +var build_module = __webpack_require__("U60i"); + +// EXTERNAL MODULE: external ["wp","a11y"] +var external_wp_a11y_ = __webpack_require__("gdqT"); + +// EXTERNAL MODULE: external ["wp","notices"] +var external_wp_notices_ = __webpack_require__("onLe"); + +// EXTERNAL MODULE: external ["wp","coreData"] +var external_wp_coreData_ = __webpack_require__("jZUy"); + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/utils/meta-boxes.js +/** + * Function returning the current Meta Boxes DOM Node in the editor + * whether the meta box area is opened or not. + * If the MetaBox Area is visible returns it, and returns the original container instead. + * + * @param {string} location Meta Box location. + * @return {string} HTML content. + */ +const getMetaBoxContainer = location => { + const area = document.querySelector(`.edit-post-meta-boxes-area.is-${location} .metabox-location-${location}`); + + if (area) { + return area; + } + + return document.querySelector('#metaboxes .metabox-location-' + location); +}; + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/actions.js +/** + * External dependencies + */ + +/** + * WordPress dependencies + */ + + + + + + + + +/** + * Internal dependencies + */ + + + +/** + * Returns an action object used in signalling that the user opened an editor sidebar. + * + * @param {?string} name Sidebar name to be opened. + * + * @yield {Object} Action object. + */ + +function* openGeneralSidebar(name) { + yield external_wp_data_["controls"].dispatch(build_module["g" /* store */].name, 'enableComplementaryArea', store.name, name); +} +/** + * Returns an action object signalling that the user closed the sidebar. + * + * @yield {Object} Action object. + */ + +function* closeGeneralSidebar() { + yield external_wp_data_["controls"].dispatch(build_module["g" /* store */].name, 'disableComplementaryArea', store.name); +} +/** + * Returns an action object used in signalling that the user opened a modal. + * + * @param {string} name A string that uniquely identifies the modal. + * + * @return {Object} Action object. + */ + +function openModal(name) { + return { + type: 'OPEN_MODAL', + name + }; +} +/** + * Returns an action object signalling that the user closed a modal. + * + * @return {Object} Action object. + */ + +function closeModal() { + return { + type: 'CLOSE_MODAL' + }; +} +/** + * Returns an action object used in signalling that the user opened the publish + * sidebar. + * + * @return {Object} Action object + */ + +function openPublishSidebar() { + return { + type: 'OPEN_PUBLISH_SIDEBAR' + }; +} +/** + * Returns an action object used in signalling that the user closed the + * publish sidebar. + * + * @return {Object} Action object. + */ + +function closePublishSidebar() { + return { + type: 'CLOSE_PUBLISH_SIDEBAR' + }; +} +/** + * Returns an action object used in signalling that the user toggles the publish sidebar. + * + * @return {Object} Action object + */ + +function togglePublishSidebar() { + return { + type: 'TOGGLE_PUBLISH_SIDEBAR' + }; +} +/** + * Returns an action object used to enable or disable a panel in the editor. + * + * @param {string} panelName A string that identifies the panel to enable or disable. + * + * @return {Object} Action object. + */ + +function toggleEditorPanelEnabled(panelName) { + return { + type: 'TOGGLE_PANEL_ENABLED', + panelName + }; +} +/** + * Returns an action object used to open or close a panel in the editor. + * + * @param {string} panelName A string that identifies the panel to open or close. + * + * @return {Object} Action object. + */ + +function toggleEditorPanelOpened(panelName) { + return { + type: 'TOGGLE_PANEL_OPENED', + panelName + }; +} +/** + * Returns an action object used to remove a panel from the editor. + * + * @param {string} panelName A string that identifies the panel to remove. + * + * @return {Object} Action object. + */ + +function removeEditorPanel(panelName) { + return { + type: 'REMOVE_PANEL', + panelName + }; +} +/** + * Returns an action object used to toggle a feature flag. + * + * @param {string} feature Feature name. + * + * @return {Object} Action object. + */ + +function toggleFeature(feature) { + return { + type: 'TOGGLE_FEATURE', + feature + }; +} +function* switchEditorMode(mode) { + yield { + type: 'SWITCH_MODE', + mode + }; // Unselect blocks when we switch to the code editor. + + if (mode !== 'visual') { + yield external_wp_data_["controls"].dispatch('core/block-editor', 'clearSelectedBlock'); + } + + const message = mode === 'visual' ? Object(external_wp_i18n_["__"])('Visual editor selected') : Object(external_wp_i18n_["__"])('Code editor selected'); + Object(external_wp_a11y_["speak"])(message, 'assertive'); +} +/** + * Returns an action object used to toggle a plugin name flag. + * + * @param {string} pluginName Plugin name. + * + * @return {Object} Action object. + */ + +function togglePinnedPluginItem(pluginName) { + return { + type: 'TOGGLE_PINNED_PLUGIN_ITEM', + pluginName + }; +} +/** + * Returns an action object used in signalling that block types by the given + * name(s) should be hidden. + * + * @param {string[]} blockNames Names of block types to hide. + * + * @return {Object} Action object. + */ + +function hideBlockTypes(blockNames) { + return { + type: 'HIDE_BLOCK_TYPES', + blockNames: Object(external_lodash_["castArray"])(blockNames) + }; +} +/** + * Returns an action object used in signaling that a style should be auto-applied when a block is created. + * + * @param {string} blockName Name of the block. + * @param {?string} blockStyle Name of the style that should be auto applied. If undefined, the "auto apply" setting of the block is removed. + * + * @return {Object} Action object. + */ + +function updatePreferredStyleVariations(blockName, blockStyle) { + return { + type: 'UPDATE_PREFERRED_STYLE_VARIATIONS', + blockName, + blockStyle + }; +} +/** + * Returns an action object used in signalling that the editor should attempt + * to locally autosave the current post every `interval` seconds. + * + * @param {number} interval The new interval, in seconds. + * @return {Object} Action object. + */ + +function __experimentalUpdateLocalAutosaveInterval(interval) { + return { + type: 'UPDATE_LOCAL_AUTOSAVE_INTERVAL', + interval + }; +} +/** + * Returns an action object used in signalling that block types by the given + * name(s) should be shown. + * + * @param {string[]} blockNames Names of block types to show. + * + * @return {Object} Action object. + */ + +function showBlockTypes(blockNames) { + return { + type: 'SHOW_BLOCK_TYPES', + blockNames: Object(external_lodash_["castArray"])(blockNames) + }; +} +/** + * Returns an action object used in signaling + * what Meta boxes are available in which location. + * + * @param {Object} metaBoxesPerLocation Meta boxes per location. + * + * @yield {Object} Action object. + */ + +function* setAvailableMetaBoxesPerLocation(metaBoxesPerLocation) { + yield { + type: 'SET_META_BOXES_PER_LOCATIONS', + metaBoxesPerLocation + }; +} +/** + * Returns an action object used to request meta box update. + * + * @yield {Object} Action object. + */ + +function* requestMetaBoxUpdates() { + yield { + type: 'REQUEST_META_BOX_UPDATES' + }; // Saves the wp_editor fields + + if (window.tinyMCE) { + window.tinyMCE.triggerSave(); + } // Additional data needed for backward compatibility. + // If we do not provide this data, the post will be overridden with the default values. + + + const post = yield external_wp_data_["controls"].select('core/editor', 'getCurrentPost'); + const additionalData = [post.comment_status ? ['comment_status', post.comment_status] : false, post.ping_status ? ['ping_status', post.ping_status] : false, post.sticky ? ['sticky', post.sticky] : false, post.author ? ['post_author', post.author] : false].filter(Boolean); // We gather all the metaboxes locations data and the base form data + + const baseFormData = new window.FormData(document.querySelector('.metabox-base-form')); + const activeMetaBoxLocations = yield external_wp_data_["controls"].select(store.name, 'getActiveMetaBoxLocations'); + const formDataToMerge = [baseFormData, ...activeMetaBoxLocations.map(location => new window.FormData(getMetaBoxContainer(location)))]; // Merge all form data objects into a single one. + + const formData = Object(external_lodash_["reduce"])(formDataToMerge, (memo, currentFormData) => { + for (const [key, value] of currentFormData) { + memo.append(key, value); + } + + return memo; + }, new window.FormData()); + additionalData.forEach(([key, value]) => formData.append(key, value)); // Save the metaboxes + + yield Object(external_wp_dataControls_["apiFetch"])({ + url: window._wpMetaBoxUrl, + method: 'POST', + body: formData, + parse: false + }); + yield external_wp_data_["controls"].dispatch(store.name, 'metaBoxUpdatesSuccess'); +} +/** + * Returns an action object used signal a successful meta box update. + * + * @return {Object} Action object. + */ + +function metaBoxUpdatesSuccess() { + return { + type: 'META_BOX_UPDATES_SUCCESS' + }; +} +/** + * Returns an action object used to toggle the width of the editing canvas. + * + * @param {string} deviceType + * + * @return {Object} Action object. + */ + +function __experimentalSetPreviewDeviceType(deviceType) { + return { + type: 'SET_PREVIEW_DEVICE_TYPE', + deviceType + }; +} +/** + * Returns an action object used to open/close the inserter. + * + * @param {boolean|Object} value Whether the inserter should be + * opened (true) or closed (false). + * To specify an insertion point, + * use an object. + * @param {string} value.rootClientId The root client ID to insert at. + * @param {number} value.insertionIndex The index to insert at. + * + * @return {Object} Action object. + */ + +function setIsInserterOpened(value) { + return { + type: 'SET_IS_INSERTER_OPENED', + value + }; +} +/** + * Returns an action object used to open/close the list view. + * + * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed. + * @return {Object} Action object. + */ + +function setIsListViewOpened(isOpen) { + return { + type: 'SET_IS_LIST_VIEW_OPENED', + isOpen + }; +} +/** + * Returns an action object used to switch to template editing. + * + * @param {boolean} value Is editing template. + * @return {Object} Action object. + */ + +function setIsEditingTemplate(value) { + return { + type: 'SET_IS_EDITING_TEMPLATE', + value + }; +} +/** + * Potentially create a block based template and switches to the template mode. + * + * @param {Object?} template template to create and assign before switching. + */ + +function* __unstableSwitchToTemplateMode(template) { + if (!!template) { + const savedTemplate = yield external_wp_data_["controls"].dispatch(external_wp_coreData_["store"], 'saveEntityRecord', 'postType', 'wp_template', template); + const post = yield external_wp_data_["controls"].select('core/editor', 'getCurrentPost'); + yield external_wp_data_["controls"].dispatch(external_wp_coreData_["store"], 'editEntityRecord', 'postType', post.type, post.id, { + template: savedTemplate.slug + }); + } + + yield setIsEditingTemplate(true); + const isWelcomeGuideActive = yield external_wp_data_["controls"].select('core/edit-post', 'isFeatureActive', 'welcomeGuideTemplate'); + + if (!isWelcomeGuideActive) { + const message = !!template ? Object(external_wp_i18n_["__"])("Custom template created. You're in template mode now.") : Object(external_wp_i18n_["__"])('Editing template. Changes made here affect all posts and pages that use the template.'); + yield external_wp_data_["controls"].dispatch(external_wp_notices_["store"], 'createSuccessNotice', message, { + type: 'snackbar' + }); + } +} +let actions_metaBoxesInitialized = false; +/** + * Initializes WordPress `postboxes` script and the logic for saving meta boxes. + */ + +function* initializeMetaBoxes() { + const isEditorReady = yield external_wp_data_["controls"].select('core/editor', '__unstableIsEditorReady'); + + if (!isEditorReady) { + return; + } + + const postType = yield external_wp_data_["controls"].select('core/editor', 'getCurrentPostType'); // Only initialize once. + + if (actions_metaBoxesInitialized) { + return; + } + + if (window.postboxes.page !== postType) { + window.postboxes.add_postbox_toggles(postType); + } + + actions_metaBoxesInitialized = true; + let wasSavingPost = yield external_wp_data_["controls"].select('core/editor', 'isSavingPost'); + let wasAutosavingPost = yield external_wp_data_["controls"].select('core/editor', 'isAutosavingPost'); + const hasMetaBoxes = yield external_wp_data_["controls"].select(store, 'hasMetaBoxes'); // Save metaboxes when performing a full save on the post. + + Object(external_wp_data_["subscribe"])(() => { + const isSavingPost = Object(external_wp_data_["select"])('core/editor').isSavingPost(); + const isAutosavingPost = Object(external_wp_data_["select"])('core/editor').isAutosavingPost(); // Save metaboxes on save completion, except for autosaves that are not a post preview. + // + // Meta boxes are initialized once at page load. It is not necessary to + // account for updates on each state change. + // + // See: https://github.com/WordPress/WordPress/blob/5.1.1/wp-admin/includes/post.php#L2307-L2309 + + const shouldTriggerMetaboxesSave = hasMetaBoxes && wasSavingPost && !isSavingPost && !wasAutosavingPost; // Save current state for next inspection. + + wasSavingPost = isSavingPost; + wasAutosavingPost = isAutosavingPost; + + if (shouldTriggerMetaboxesSave) { + Object(external_wp_data_["dispatch"])(store).requestMetaBoxUpdates(); + } + }); + return { + type: 'META_BOXES_INITIALIZED' + }; +} + +// EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js +var rememo = __webpack_require__("pPDe"); + +// EXTERNAL MODULE: external ["wp","editor"] +var external_wp_editor_ = __webpack_require__("jSdM"); + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/selectors.js +/** + * External dependencies + */ + + +/** + * WordPress dependencies + */ + + + + + +/** + * Returns the current editing mode. + * + * @param {Object} state Global application state. + * + * @return {string} Editing mode. + */ + +function getEditorMode(state) { + return getPreference(state, 'editorMode', 'visual'); +} +/** + * Returns true if the editor sidebar is opened. + * + * @param {Object} state Global application state + * + * @return {boolean} Whether the editor sidebar is opened. + */ + +const isEditorSidebarOpened = Object(external_wp_data_["createRegistrySelector"])(select => () => { + const activeGeneralSidebar = select(build_module["g" /* store */]).getActiveComplementaryArea('core/edit-post'); + return Object(external_lodash_["includes"])(['edit-post/document', 'edit-post/block'], activeGeneralSidebar); +}); +/** + * Returns true if the plugin sidebar is opened. + * + * @param {Object} state Global application state + * @return {boolean} Whether the plugin sidebar is opened. + */ + +const isPluginSidebarOpened = Object(external_wp_data_["createRegistrySelector"])(select => () => { + const activeGeneralSidebar = select(build_module["g" /* store */]).getActiveComplementaryArea('core/edit-post'); + return !!activeGeneralSidebar && !Object(external_lodash_["includes"])(['edit-post/document', 'edit-post/block'], activeGeneralSidebar); +}); +/** + * Returns the current active general sidebar name, or null if there is no + * general sidebar active. The active general sidebar is a unique name to + * identify either an editor or plugin sidebar. + * + * Examples: + * + * - `edit-post/document` + * - `my-plugin/insert-image-sidebar` + * + * @param {Object} state Global application state. + * + * @return {?string} Active general sidebar name. + */ + +const getActiveGeneralSidebarName = Object(external_wp_data_["createRegistrySelector"])(select => () => { + return select(build_module["g" /* store */]).getActiveComplementaryArea('core/edit-post'); +}); +/** + * Returns the preferences (these preferences are persisted locally). + * + * @param {Object} state Global application state. + * + * @return {Object} Preferences Object. + */ + +function getPreferences(state) { + return state.preferences; +} +/** + * + * @param {Object} state Global application state. + * @param {string} preferenceKey Preference Key. + * @param {*} defaultValue Default Value. + * + * @return {*} Preference Value. + */ + +function getPreference(state, preferenceKey, defaultValue) { + const preferences = getPreferences(state); + const value = preferences[preferenceKey]; + return value === undefined ? defaultValue : value; +} +/** + * Returns true if the publish sidebar is opened. + * + * @param {Object} state Global application state + * + * @return {boolean} Whether the publish sidebar is open. + */ + +function isPublishSidebarOpened(state) { + return state.publishSidebarActive; +} +/** + * Returns true if the given panel was programmatically removed, or false otherwise. + * All panels are not removed by default. + * + * @param {Object} state Global application state. + * @param {string} panelName A string that identifies the panel. + * + * @return {boolean} Whether or not the panel is removed. + */ + +function isEditorPanelRemoved(state, panelName) { + return Object(external_lodash_["includes"])(state.removedPanels, panelName); +} +/** + * Returns true if the given panel is enabled, or false otherwise. Panels are + * enabled by default. + * + * @param {Object} state Global application state. + * @param {string} panelName A string that identifies the panel. + * + * @return {boolean} Whether or not the panel is enabled. + */ + +function isEditorPanelEnabled(state, panelName) { + const panels = getPreference(state, 'panels'); + return !isEditorPanelRemoved(state, panelName) && Object(external_lodash_["get"])(panels, [panelName, 'enabled'], true); +} +/** + * Returns true if the given panel is open, or false otherwise. Panels are + * closed by default. + * + * @param {Object} state Global application state. + * @param {string} panelName A string that identifies the panel. + * + * @return {boolean} Whether or not the panel is open. + */ + +function isEditorPanelOpened(state, panelName) { + const panels = getPreference(state, 'panels'); + return Object(external_lodash_["get"])(panels, [panelName]) === true || Object(external_lodash_["get"])(panels, [panelName, 'opened']) === true; +} +/** + * Returns true if a modal is active, or false otherwise. + * + * @param {Object} state Global application state. + * @param {string} modalName A string that uniquely identifies the modal. + * + * @return {boolean} Whether the modal is active. + */ + +function isModalActive(state, modalName) { + return state.activeModal === modalName; +} +/** + * Returns whether the given feature is enabled or not. + * + * @param {Object} state Global application state. + * @param {string} feature Feature slug. + * + * @return {boolean} Is active. + */ + +function isFeatureActive(state, feature) { + return Object(external_lodash_["get"])(state.preferences.features, [feature], false); +} +/** + * Returns true if the plugin item is pinned to the header. + * When the value is not set it defaults to true. + * + * @param {Object} state Global application state. + * @param {string} pluginName Plugin item name. + * + * @return {boolean} Whether the plugin item is pinned. + */ + +const isPluginItemPinned = Object(external_wp_data_["createRegistrySelector"])(select => pluginName => { + return select(build_module["g" /* store */]).isItemPinned('core/edit-post', pluginName); +}); +/** + * Returns an array of active meta box locations. + * + * @param {Object} state Post editor state. + * + * @return {string[]} Active meta box locations. + */ + +const getActiveMetaBoxLocations = Object(rememo["a" /* default */])(state => { + return Object.keys(state.metaBoxes.locations).filter(location => isMetaBoxLocationActive(state, location)); +}, state => [state.metaBoxes.locations]); +/** + * Returns true if a metabox location is active and visible + * + * @param {Object} state Post editor state. + * @param {string} location Meta box location to test. + * + * @return {boolean} Whether the meta box location is active and visible. + */ + +function isMetaBoxLocationVisible(state, location) { + return isMetaBoxLocationActive(state, location) && Object(external_lodash_["some"])(getMetaBoxesPerLocation(state, location), ({ + id + }) => { + return isEditorPanelEnabled(state, `meta-box-${id}`); + }); +} +/** + * Returns true if there is an active meta box in the given location, or false + * otherwise. + * + * @param {Object} state Post editor state. + * @param {string} location Meta box location to test. + * + * @return {boolean} Whether the meta box location is active. + */ + +function isMetaBoxLocationActive(state, location) { + const metaBoxes = getMetaBoxesPerLocation(state, location); + return !!metaBoxes && metaBoxes.length !== 0; +} +/** + * Returns the list of all the available meta boxes for a given location. + * + * @param {Object} state Global application state. + * @param {string} location Meta box location to test. + * + * @return {?Array} List of meta boxes. + */ + +function getMetaBoxesPerLocation(state, location) { + return state.metaBoxes.locations[location]; +} +/** + * Returns the list of all the available meta boxes. + * + * @param {Object} state Global application state. + * + * @return {Array} List of meta boxes. + */ + +const getAllMetaBoxes = Object(rememo["a" /* default */])(state => { + return Object(external_lodash_["flatten"])(Object(external_lodash_["values"])(state.metaBoxes.locations)); +}, state => [state.metaBoxes.locations]); +/** + * Returns true if the post is using Meta Boxes + * + * @param {Object} state Global application state + * + * @return {boolean} Whether there are metaboxes or not. + */ + +function selectors_hasMetaBoxes(state) { + return getActiveMetaBoxLocations(state).length > 0; +} +/** + * Returns true if the Meta Boxes are being saved. + * + * @param {Object} state Global application state. + * + * @return {boolean} Whether the metaboxes are being saved. + */ + +function selectors_isSavingMetaBoxes(state) { + return state.metaBoxes.isSaving; +} +/** + * Returns the current editing canvas device type. + * + * @param {Object} state Global application state. + * + * @return {string} Device type. + */ + +function __experimentalGetPreviewDeviceType(state) { + return state.deviceType; +} +/** + * Returns true if the inserter is opened. + * + * @param {Object} state Global application state. + * + * @return {boolean} Whether the inserter is opened. + */ + +function isInserterOpened(state) { + return !!state.blockInserterPanel; +} +/** + * Get the insertion point for the inserter. + * + * @param {Object} state Global application state. + * + * @return {Object} The root client ID and index to insert at. + */ + +function __experimentalGetInsertionPoint(state) { + const { + rootClientId, + insertionIndex + } = state.blockInserterPanel; + return { + rootClientId, + insertionIndex + }; +} +/** + * Returns true if the list view is opened. + * + * @param {Object} state Global application state. + * + * @return {boolean} Whether the list view is opened. + */ + +function isListViewOpened(state) { + return state.listViewPanel; +} +/** + * Returns true if the template editing mode is enabled. + * + * @param {Object} state Global application state. + * + * @return {boolean} Whether we're editing the template. + */ + +function selectors_isEditingTemplate(state) { + return state.isEditingTemplate; +} +/** + * Returns true if meta boxes are initialized. + * + * @param {Object} state Global application state. + * + * @return {boolean} Whether meta boxes are initialized. + */ + +function areMetaBoxesInitialized(state) { + return state.metaBoxes.initialized; +} +/** + * Retrieves the template of the currently edited post. + * + * @return {Object?} Post Template. + */ + +const getEditedPostTemplate = Object(external_wp_data_["createRegistrySelector"])(select => () => { + const currentTemplate = select(external_wp_editor_["store"]).getEditedPostAttribute('template'); + + if (currentTemplate) { + var _select$getEntityReco; + + const templateWithSameSlug = (_select$getEntityReco = select(external_wp_coreData_["store"]).getEntityRecords('postType', 'wp_template')) === null || _select$getEntityReco === void 0 ? void 0 : _select$getEntityReco.find(template => template.slug === currentTemplate); + + if (!templateWithSameSlug) { + return templateWithSameSlug; + } + + return select(external_wp_coreData_["store"]).getEditedEntityRecord('postType', 'wp_template', templateWithSameSlug.id); + } + + const post = select(external_wp_editor_["store"]).getCurrentPost(); + + if (post.link && post.status !== 'auto-draft') { + return select(external_wp_coreData_["store"]).__experimentalGetTemplateForLink(post.link); + } + + return null; +}); + +// EXTERNAL MODULE: ./node_modules/@wordpress/edit-post/build-module/store/constants.js +var constants = __webpack_require__("0dt7"); + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/index.js +/** + * WordPress dependencies + */ + + +/** + * Internal dependencies + */ + + + + + +const storeConfig = { + reducer: reducer, + actions: actions_namespaceObject, + selectors: selectors_namespaceObject, + controls: external_wp_dataControls_["controls"], + persist: ['preferences'] +}; +/** + * Store definition for the edit post namespace. + * + * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore + * + * @type {Object} + */ + +const store = Object(external_wp_data_["createReduxStore"])(constants["a" /* STORE_NAME */], storeConfig); // Ideally we use register instead of register store. + +Object(external_wp_data_["registerStore"])(constants["a" /* STORE_NAME */], storeConfig); + /***/ }), -/***/ 19: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; }); -function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } -} - -function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; -} +/***/ "TSYQ": +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ +/* global define */ + +(function () { + 'use strict'; + + var hasOwn = {}.hasOwnProperty; + + function classNames() { + var classes = []; + + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i]; + if (!arg) continue; + + var argType = typeof arg; + + if (argType === 'string' || argType === 'number') { + classes.push(arg); + } else if (Array.isArray(arg)) { + if (arg.length) { + var inner = classNames.apply(null, arg); + if (inner) { + classes.push(inner); + } + } + } else if (argType === 'object') { + if (arg.toString === Object.prototype.toString) { + for (var key in arg) { + if (hasOwn.call(arg, key) && arg[key]) { + classes.push(key); + } + } + } else { + classes.push(arg.toString()); + } + } + } + + return classes.join(' '); + } + + if ( true && module.exports) { + classNames.default = classNames; + module.exports = classNames; + } else if (true) { + // register as 'classnames', consistent with npm package name + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { + return classNames; + }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} +}()); + /***/ }), -/***/ 2: +/***/ "Tqx9": /***/ (function(module, exports) { -(function() { module.exports = this["lodash"]; }()); +(function() { module.exports = window["wp"]["primitives"]; }()); /***/ }), -/***/ 20: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; }); -function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } -} +/***/ "TvNi": +/***/ (function(module, exports) { + +(function() { module.exports = window["wp"]["plugins"]; }()); /***/ }), -/***/ 21: -/***/ (function(module, exports) { - -(function() { module.exports = this["wp"]["keycodes"]; }()); - -/***/ }), - -/***/ 22: +/***/ "U60i": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS -__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inherits; }); - -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js -function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - - return _setPrototypeOf(o, p); -} -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js - -function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function"); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } +__webpack_require__.d(__webpack_exports__, "g", function() { return /* reexport */ store; }); +__webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ complementary_area; }); +__webpack_require__.d(__webpack_exports__, "c", function() { return /* reexport */ ComplementaryAreaMoreMenuItem; }); +__webpack_require__.d(__webpack_exports__, "d", function() { return /* reexport */ fullscreen_mode; }); +__webpack_require__.d(__webpack_exports__, "e", function() { return /* reexport */ interface_skeleton; }); +__webpack_require__.d(__webpack_exports__, "f", function() { return /* reexport */ pinned_items; }); +__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ action_item; }); + +// NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/actions.js +var actions_namespaceObject = {}; +__webpack_require__.r(actions_namespaceObject); +__webpack_require__.d(actions_namespaceObject, "enableComplementaryArea", function() { return actions_enableComplementaryArea; }); +__webpack_require__.d(actions_namespaceObject, "disableComplementaryArea", function() { return actions_disableComplementaryArea; }); +__webpack_require__.d(actions_namespaceObject, "pinItem", function() { return actions_pinItem; }); +__webpack_require__.d(actions_namespaceObject, "unpinItem", function() { return actions_unpinItem; }); + +// NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/selectors.js +var selectors_namespaceObject = {}; +__webpack_require__.r(selectors_namespaceObject); +__webpack_require__.d(selectors_namespaceObject, "getActiveComplementaryArea", function() { return selectors_getActiveComplementaryArea; }); +__webpack_require__.d(selectors_namespaceObject, "isItemPinned", function() { return selectors_isItemPinned; }); + +// EXTERNAL MODULE: external ["wp","data"] +var external_wp_data_ = __webpack_require__("1ZqX"); + +// EXTERNAL MODULE: external "lodash" +var external_lodash_ = __webpack_require__("YLtl"); + +// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/reducer.js +/** + * External dependencies + */ + +/** + * WordPress dependencies + */ + + +/** + * Reducer to keep tract of the active area per scope. + * + * @param {boolean} state Previous state. + * @param {Object} action Action object. + * @param {string} action.type Action type. + * @param {string} action.itemType Type of item. + * @param {string} action.scope Item scope. + * @param {string} action.item Item name. + * + * @return {Object} Updated state. + */ + +function singleEnableItems(state = {}, { + type, + itemType, + scope, + item +}) { + if (type !== 'SET_SINGLE_ENABLE_ITEM' || !itemType || !scope) { + return state; + } + + return { ...state, + [itemType]: { ...state[itemType], + [scope]: item || null + } + }; +} +/** + * Reducer keeping track of the "pinned" items per scope. + * + * @param {boolean} state Previous state. + * @param {Object} action Action object. + * @param {string} action.type Action type. + * @param {string} action.itemType Type of item. + * @param {string} action.scope Item scope. + * @param {string} action.item Item name. + * @param {boolean} action.isEnable Whether the item is pinned. + * + * @return {Object} Updated state. + */ + +function multipleEnableItems(state = {}, { + type, + itemType, + scope, + item, + isEnable +}) { + if (type !== 'SET_MULTIPLE_ENABLE_ITEM' || !itemType || !scope || !item || Object(external_lodash_["get"])(state, [itemType, scope, item]) === isEnable) { + return state; + } + + const currentTypeState = state[itemType] || {}; + const currentScopeState = currentTypeState[scope] || {}; + return { ...state, + [itemType]: { ...currentTypeState, + [scope]: { ...currentScopeState, + [item]: isEnable || false + } + } + }; +} +const enableItems = Object(external_wp_data_["combineReducers"])({ + singleEnableItems, + multipleEnableItems +}); +/* harmony default export */ var reducer = (Object(external_wp_data_["combineReducers"])({ + enableItems +})); + +// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/actions.js +/** + * Returns an action object used in signalling that an active area should be changed. + * + * @param {string} itemType Type of item. + * @param {string} scope Item scope. + * @param {string} item Item identifier. + * + * @return {Object} Action object. + */ +function setSingleEnableItem(itemType, scope, item) { + return { + type: 'SET_SINGLE_ENABLE_ITEM', + itemType, + scope, + item + }; +} +/** + * Returns an action object used in signalling that a complementary item should be enabled. + * + * @param {string} scope Complementary area scope. + * @param {string} area Area identifier. + * + * @return {Object} Action object. + */ + + +function actions_enableComplementaryArea(scope, area) { + return setSingleEnableItem('complementaryArea', scope, area); +} +/** + * Returns an action object used in signalling that the complementary area of a given scope should be disabled. + * + * @param {string} scope Complementary area scope. + * + * @return {Object} Action object. + */ + +function actions_disableComplementaryArea(scope) { + return setSingleEnableItem('complementaryArea', scope, undefined); +} +/** + * Returns an action object to make an area enabled/disabled. + * + * @param {string} itemType Type of item. + * @param {string} scope Item scope. + * @param {string} item Item identifier. + * @param {boolean} isEnable Boolean indicating if an area should be pinned or not. + * + * @return {Object} Action object. + */ + +function setMultipleEnableItem(itemType, scope, item, isEnable) { + return { + type: 'SET_MULTIPLE_ENABLE_ITEM', + itemType, + scope, + item, + isEnable + }; +} +/** + * Returns an action object used in signalling that an item should be pinned. + * + * @param {string} scope Item scope. + * @param {string} itemId Item identifier. + * + * @return {Object} Action object. + */ + + +function actions_pinItem(scope, itemId) { + return setMultipleEnableItem('pinnedItems', scope, itemId, true); +} +/** + * Returns an action object used in signalling that an item should be unpinned. + * + * @param {string} scope Item scope. + * @param {string} itemId Item identifier. + * + * @return {Object} Action object. + */ + +function actions_unpinItem(scope, itemId) { + return setMultipleEnableItem('pinnedItems', scope, itemId, false); +} + +// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/selectors.js +/** + * External dependencies + */ + +/** + * Returns the item that is enabled in a given scope. + * + * @param {Object} state Global application state. + * @param {string} itemType Type of item. + * @param {string} scope Item scope. + * + * @return {?string|null} The item that is enabled in the passed scope and type. + */ + +function getSingleEnableItem(state, itemType, scope) { + return Object(external_lodash_["get"])(state.enableItems.singleEnableItems, [itemType, scope]); +} +/** + * Returns the complementary area that is active in a given scope. + * + * @param {Object} state Global application state. + * @param {string} scope Item scope. + * + * @return {string} The complementary area that is active in the given scope. + */ + + +function selectors_getActiveComplementaryArea(state, scope) { + return getSingleEnableItem(state, 'complementaryArea', scope); +} +/** + * Returns a boolean indicating if an item is enabled or not in a given scope. + * + * @param {Object} state Global application state. + * @param {string} itemType Type of item. + * @param {string} scope Scope. + * @param {string} item Item to check. + * + * @return {boolean|undefined} True if the item is enabled, false otherwise if the item is explicitly disabled, and undefined if there is no information for that item. + */ + +function isMultipleEnabledItemEnabled(state, itemType, scope, item) { + return Object(external_lodash_["get"])(state.enableItems.multipleEnableItems, [itemType, scope, item]); +} +/** + * Returns a boolean indicating if an item is pinned or not. + * + * @param {Object} state Global application state. + * @param {string} scope Scope. + * @param {string} item Item to check. + * + * @return {boolean} True if the item is pinned and false otherwise. + */ + + +function selectors_isItemPinned(state, scope, item) { + return isMultipleEnabledItemEnabled(state, 'pinnedItems', scope, item) !== false; +} + +// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/constants.js +/** + * The identifier for the data store. + * + * @type {string} + */ +const STORE_NAME = 'core/interface'; + +// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/index.js +/** + * WordPress dependencies + */ + +/** + * Internal dependencies + */ + + + + + +/** + * Store definition for the interface namespace. + * + * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore + * + * @type {Object} + */ + +const store = Object(external_wp_data_["createReduxStore"])(STORE_NAME, { + reducer: reducer, + actions: actions_namespaceObject, + selectors: selectors_namespaceObject, + persist: ['enableItems'] +}); // Once we build a more generic persistence plugin that works across types of stores +// we'd be able to replace this with a register call. + +Object(external_wp_data_["registerStore"])(STORE_NAME, { + reducer: reducer, + actions: actions_namespaceObject, + selectors: selectors_namespaceObject, + persist: ['enableItems'] +}); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js +var esm_extends = __webpack_require__("wx14"); + +// EXTERNAL MODULE: external ["wp","element"] +var external_wp_element_ = __webpack_require__("GRId"); + +// EXTERNAL MODULE: ./node_modules/classnames/index.js +var classnames = __webpack_require__("TSYQ"); +var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); + +// EXTERNAL MODULE: external ["wp","components"] +var external_wp_components_ = __webpack_require__("tI+e"); + +// EXTERNAL MODULE: external ["wp","i18n"] +var external_wp_i18n_ = __webpack_require__("l3Sj"); + +// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js +var check = __webpack_require__("RMJe"); + +// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/star-filled.js +var star_filled = __webpack_require__("URob"); + +// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/star-empty.js +var star_empty = __webpack_require__("Xxwi"); + +// EXTERNAL MODULE: external ["wp","viewport"] +var external_wp_viewport_ = __webpack_require__("KEfo"); + +// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js +var close_small = __webpack_require__("bWcr"); + +// EXTERNAL MODULE: external ["wp","plugins"] +var external_wp_plugins_ = __webpack_require__("TvNi"); + +// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-context/index.js +/** + * WordPress dependencies + */ + +/* harmony default export */ var complementary_area_context = (Object(external_wp_plugins_["withPluginContext"])((context, ownProps) => { + return { + icon: ownProps.icon || context.icon, + identifier: ownProps.identifier || `${context.name}/${ownProps.name}` + }; +})); + +// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-toggle/index.js + + + +/** + * External dependencies + */ + +/** + * WordPress dependencies + */ + + + +/** + * Internal dependencies + */ + + + + +function ComplementaryAreaToggle({ + as = external_wp_components_["Button"], + scope, + identifier, + icon, + selectedIcon, + ...props +}) { + const ComponentToUse = as; + const isSelected = Object(external_wp_data_["useSelect"])(select => select(store).getActiveComplementaryArea(scope) === identifier, [identifier]); + const { + enableComplementaryArea, + disableComplementaryArea + } = Object(external_wp_data_["useDispatch"])(store); + return Object(external_wp_element_["createElement"])(ComponentToUse, Object(esm_extends["a" /* default */])({ + icon: selectedIcon && isSelected ? selectedIcon : icon, + onClick: () => { + if (isSelected) { + disableComplementaryArea(scope); + } else { + enableComplementaryArea(scope, identifier); + } + } + }, Object(external_lodash_["omit"])(props, ['name']))); +} + +/* harmony default export */ var complementary_area_toggle = (complementary_area_context(ComplementaryAreaToggle)); + +// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-header/index.js + + + +/** + * External dependencies + */ + +/** + * WordPress dependencies + */ + + +/** + * Internal dependencies + */ + + + +const ComplementaryAreaHeader = ({ + smallScreenTitle, + children, + className, + toggleButtonProps +}) => { + const toggleButton = Object(external_wp_element_["createElement"])(complementary_area_toggle, Object(esm_extends["a" /* default */])({ + icon: close_small["a" /* default */] + }, toggleButtonProps)); + return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("div", { + className: "components-panel__header interface-complementary-area-header__small" + }, smallScreenTitle && Object(external_wp_element_["createElement"])("span", { + className: "interface-complementary-area-header__small-title" + }, smallScreenTitle), toggleButton), Object(external_wp_element_["createElement"])("div", { + className: classnames_default()('components-panel__header', 'interface-complementary-area-header', className), + tabIndex: -1 + }, children, toggleButton)); +}; + +/* harmony default export */ var complementary_area_header = (ComplementaryAreaHeader); + +// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/action-item/index.js + + + +/** + * External dependencies + */ + +/** + * WordPress dependencies + */ + + + + +function ActionItemSlot({ + name, + as: Component = external_wp_components_["ButtonGroup"], + fillProps = {}, + bubblesVirtually, + ...props +}) { + return Object(external_wp_element_["createElement"])(external_wp_components_["Slot"], { + name: name, + bubblesVirtually: bubblesVirtually, + fillProps: fillProps + }, fills => { + if (Object(external_lodash_["isEmpty"])(external_wp_element_["Children"].toArray(fills))) { + return null; + } // Special handling exists for backward compatibility. + // It ensures that menu items created by plugin authors aren't + // duplicated with automatically injected menu items coming + // from pinnable plugin sidebars. + // @see https://github.com/WordPress/gutenberg/issues/14457 + + + const initializedByPlugins = []; + external_wp_element_["Children"].forEach(fills, ({ + props: { + __unstableExplicitMenuItem, + __unstableTarget + } + }) => { + if (__unstableTarget && __unstableExplicitMenuItem) { + initializedByPlugins.push(__unstableTarget); + } + }); + const children = external_wp_element_["Children"].map(fills, child => { + if (!child.props.__unstableExplicitMenuItem && initializedByPlugins.includes(child.props.__unstableTarget)) { + return null; + } + + return child; + }); + return Object(external_wp_element_["createElement"])(Component, props, children); }); - if (superClass) _setPrototypeOf(subClass, superClass); -} +} + +function ActionItem({ + name, + as: Component = external_wp_components_["Button"], + onClick, + ...props +}) { + return Object(external_wp_element_["createElement"])(external_wp_components_["Fill"], { + name: name + }, ({ + onClick: fpOnClick + }) => { + return Object(external_wp_element_["createElement"])(Component, Object(esm_extends["a" /* default */])({ + onClick: onClick || fpOnClick ? (...args) => { + (onClick || external_lodash_["noop"])(...args); + (fpOnClick || external_lodash_["noop"])(...args); + } : undefined + }, props)); + }); +} + +ActionItem.Slot = ActionItemSlot; +/* harmony default export */ var action_item = (ActionItem); + +// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-more-menu-item/index.js + + + +/** + * External dependencies + */ + +/** + * WordPress dependencies + */ + + + +/** + * Internal dependencies + */ + + + + +const PluginsMenuItem = props => // Menu item is marked with unstable prop for backward compatibility. +// They are removed so they don't leak to DOM elements. +// @see https://github.com/WordPress/gutenberg/issues/14457 +Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], Object(external_lodash_["omit"])(props, ['__unstableExplicitMenuItem', '__unstableTarget'])); + +function ComplementaryAreaMoreMenuItem({ + scope, + target, + __unstableExplicitMenuItem, + ...props +}) { + return Object(external_wp_element_["createElement"])(complementary_area_toggle, Object(esm_extends["a" /* default */])({ + as: toggleProps => { + return Object(external_wp_element_["createElement"])(action_item, Object(esm_extends["a" /* default */])({ + __unstableExplicitMenuItem: __unstableExplicitMenuItem, + __unstableTarget: `${scope}/${target}`, + as: PluginsMenuItem, + name: `${scope}/plugin-more-menu` + }, toggleProps)); + }, + role: "menuitemcheckbox", + selectedIcon: check["a" /* default */], + name: target, + scope: scope + }, props)); +} + +// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/pinned-items/index.js + + + +/** + * External dependencies + */ + + +/** + * WordPress dependencies + */ + + + +function PinnedItems({ + scope, + ...props +}) { + return Object(external_wp_element_["createElement"])(external_wp_components_["Fill"], Object(esm_extends["a" /* default */])({ + name: `PinnedItems/${scope}` + }, props)); +} + +function PinnedItemsSlot({ + scope, + className, + ...props +}) { + return Object(external_wp_element_["createElement"])(external_wp_components_["Slot"], Object(esm_extends["a" /* default */])({ + name: `PinnedItems/${scope}` + }, props), fills => !Object(external_lodash_["isEmpty"])(fills) && Object(external_wp_element_["createElement"])("div", { + className: classnames_default()(className, 'interface-pinned-items') + }, fills)); +} + +PinnedItems.Slot = PinnedItemsSlot; +/* harmony default export */ var pinned_items = (PinnedItems); + +// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area/index.js + + + +/** + * External dependencies + */ + +/** + * WordPress dependencies + */ + + + + + + + +/** + * Internal dependencies + */ + + + + + + + + +function ComplementaryAreaSlot({ + scope, + ...props +}) { + return Object(external_wp_element_["createElement"])(external_wp_components_["Slot"], Object(esm_extends["a" /* default */])({ + name: `ComplementaryArea/${scope}` + }, props)); +} + +function ComplementaryAreaFill({ + scope, + children, + className +}) { + return Object(external_wp_element_["createElement"])(external_wp_components_["Fill"], { + name: `ComplementaryArea/${scope}` + }, Object(external_wp_element_["createElement"])("div", { + className: className + }, children)); +} + +function useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall) { + const previousIsSmall = Object(external_wp_element_["useRef"])(false); + const shouldOpenWhenNotSmall = Object(external_wp_element_["useRef"])(false); + const { + enableComplementaryArea, + disableComplementaryArea + } = Object(external_wp_data_["useDispatch"])(store); + Object(external_wp_element_["useEffect"])(() => { + // If the complementary area is active and the editor is switching from a big to a small window size. + if (isActive && isSmall && !previousIsSmall.current) { + // Disable the complementary area. + disableComplementaryArea(scope); // Flag the complementary area to be reopened when the window size goes from small to big. + + shouldOpenWhenNotSmall.current = true; + } else if ( // If there is a flag indicating the complementary area should be enabled when we go from small to big window size + // and we are going from a small to big window size. + shouldOpenWhenNotSmall.current && !isSmall && previousIsSmall.current) { + // Remove the flag indicating the complementary area should be enabled. + shouldOpenWhenNotSmall.current = false; // Enable the complementary area. + + enableComplementaryArea(scope, identifier); + } else if ( // If the flag is indicating the current complementary should be reopened but another complementary area becomes active, + // remove the flag. + shouldOpenWhenNotSmall.current && activeArea && activeArea !== identifier) { + shouldOpenWhenNotSmall.current = false; + } + + if (isSmall !== previousIsSmall.current) { + previousIsSmall.current = isSmall; + } + }, [isActive, isSmall, scope, identifier, activeArea]); +} + +function ComplementaryArea({ + children, + className, + closeLabel = Object(external_wp_i18n_["__"])('Close plugin'), + identifier, + header, + headerClassName, + icon, + isPinnable = true, + panelClassName, + scope, + name, + smallScreenTitle, + title, + toggleShortcut, + isActiveByDefault, + showIconLabels = false +}) { + const { + isActive, + isPinned, + activeArea, + isSmall, + isLarge + } = Object(external_wp_data_["useSelect"])(select => { + const { + getActiveComplementaryArea, + isItemPinned + } = select(store); + + const _activeArea = getActiveComplementaryArea(scope); + + return { + isActive: _activeArea === identifier, + isPinned: isItemPinned(scope, identifier), + activeArea: _activeArea, + isSmall: select(external_wp_viewport_["store"]).isViewportMatch('< medium'), + isLarge: select(external_wp_viewport_["store"]).isViewportMatch('large') + }; + }, [identifier, scope]); + useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall); + const { + enableComplementaryArea, + disableComplementaryArea, + pinItem, + unpinItem + } = Object(external_wp_data_["useDispatch"])(store); + Object(external_wp_element_["useEffect"])(() => { + if (isActiveByDefault && activeArea === undefined && !isSmall) { + enableComplementaryArea(scope, identifier); + } + }, [activeArea, isActiveByDefault, scope, identifier, isSmall]); + return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, isPinnable && Object(external_wp_element_["createElement"])(pinned_items, { + scope: scope + }, isPinned && Object(external_wp_element_["createElement"])(complementary_area_toggle, { + scope: scope, + identifier: identifier, + isPressed: isActive && (!showIconLabels || isLarge), + "aria-expanded": isActive, + label: title, + icon: showIconLabels ? check["a" /* default */] : icon, + showTooltip: !showIconLabels, + isTertiary: showIconLabels + })), name && isPinnable && Object(external_wp_element_["createElement"])(ComplementaryAreaMoreMenuItem, { + target: name, + scope: scope, + icon: icon + }, title), isActive && Object(external_wp_element_["createElement"])(ComplementaryAreaFill, { + className: classnames_default()('interface-complementary-area', className), + scope: scope + }, Object(external_wp_element_["createElement"])(complementary_area_header, { + className: headerClassName, + closeLabel: closeLabel, + onClose: () => disableComplementaryArea(scope), + smallScreenTitle: smallScreenTitle, + toggleButtonProps: { + label: closeLabel, + shortcut: toggleShortcut, + scope, + identifier + } + }, header || Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("strong", null, title), isPinnable && Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { + className: "interface-complementary-area__pin-unpin-item", + icon: isPinned ? star_filled["a" /* default */] : star_empty["a" /* default */], + label: isPinned ? Object(external_wp_i18n_["__"])('Unpin from toolbar') : Object(external_wp_i18n_["__"])('Pin to toolbar'), + onClick: () => (isPinned ? unpinItem : pinItem)(scope, identifier), + isPressed: isPinned, + "aria-expanded": isPinned + }))), Object(external_wp_element_["createElement"])(external_wp_components_["Panel"], { + className: panelClassName + }, children))); +} + +const ComplementaryAreaWrapped = complementary_area_context(ComplementaryArea); +ComplementaryAreaWrapped.Slot = ComplementaryAreaSlot; +/* harmony default export */ var complementary_area = (ComplementaryAreaWrapped); + +// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/fullscreen-mode/index.js +/** + * WordPress dependencies + */ + +class fullscreen_mode_FullscreenMode extends external_wp_element_["Component"] { + componentDidMount() { + this.isSticky = false; + this.sync(); // `is-fullscreen-mode` is set in PHP as a body class by Gutenberg, and this causes + // `sticky-menu` to be applied by WordPress and prevents the admin menu being scrolled + // even if `is-fullscreen-mode` is then removed. Let's remove `sticky-menu` here as + // a consequence of the FullscreenMode setup + + if (document.body.classList.contains('sticky-menu')) { + this.isSticky = true; + document.body.classList.remove('sticky-menu'); + } + } + + componentWillUnmount() { + if (this.isSticky) { + document.body.classList.add('sticky-menu'); + } + + if (this.props.isActive) { + document.body.classList.remove('is-fullscreen-mode'); + } + } + + componentDidUpdate(prevProps) { + if (this.props.isActive !== prevProps.isActive) { + this.sync(); + } + } + + sync() { + const { + isActive + } = this.props; + + if (isActive) { + document.body.classList.add('is-fullscreen-mode'); + } else { + document.body.classList.remove('is-fullscreen-mode'); + } + } + + render() { + return null; + } + +} +/* harmony default export */ var fullscreen_mode = (fullscreen_mode_FullscreenMode); + +// EXTERNAL MODULE: external ["wp","compose"] +var external_wp_compose_ = __webpack_require__("K9lf"); + +// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/interface-skeleton/index.js + + +/** + * External dependencies + */ + +/** + * WordPress dependencies + */ + +/** + * WordPress dependencies + */ + + + + + + +function useHTMLClass(className) { + Object(external_wp_element_["useEffect"])(() => { + const element = document && document.querySelector(`html:not(.${className})`); + + if (!element) { + return; + } + + element.classList.toggle(className); + return () => { + element.classList.toggle(className); + }; + }, [className]); +} + +function InterfaceSkeleton({ + footer, + header, + sidebar, + secondarySidebar, + notices, + content, + drawer, + actions, + labels, + className, + shortcuts +}, ref) { + const fallbackRef = Object(external_wp_element_["useRef"])(); + const regionsClassName = Object(external_wp_components_["__unstableUseNavigateRegions"])(fallbackRef, shortcuts); + useHTMLClass('interface-interface-skeleton__html-container'); + const defaultLabels = { + /* translators: accessibility text for the nav bar landmark region. */ + drawer: Object(external_wp_i18n_["__"])('Drawer'), + + /* translators: accessibility text for the top bar landmark region. */ + header: Object(external_wp_i18n_["__"])('Header'), + + /* translators: accessibility text for the content landmark region. */ + body: Object(external_wp_i18n_["__"])('Content'), + + /* translators: accessibility text for the secondary sidebar landmark region. */ + secondarySidebar: Object(external_wp_i18n_["__"])('Block Library'), + + /* translators: accessibility text for the settings landmark region. */ + sidebar: Object(external_wp_i18n_["__"])('Settings'), + + /* translators: accessibility text for the publish landmark region. */ + actions: Object(external_wp_i18n_["__"])('Publish'), + + /* translators: accessibility text for the footer landmark region. */ + footer: Object(external_wp_i18n_["__"])('Footer') + }; + const mergedLabels = { ...defaultLabels, + ...labels + }; + return Object(external_wp_element_["createElement"])("div", { + ref: Object(external_wp_compose_["useMergeRefs"])([ref, fallbackRef]), + className: classnames_default()(className, 'interface-interface-skeleton', regionsClassName, !!footer && 'has-footer') + }, !!drawer && Object(external_wp_element_["createElement"])("div", { + className: "interface-interface-skeleton__drawer", + role: "region", + "aria-label": mergedLabels.drawer + }, drawer), Object(external_wp_element_["createElement"])("div", { + className: "interface-interface-skeleton__editor" + }, !!header && Object(external_wp_element_["createElement"])("div", { + className: "interface-interface-skeleton__header", + role: "region", + "aria-label": mergedLabels.header, + tabIndex: "-1" + }, header), Object(external_wp_element_["createElement"])("div", { + className: "interface-interface-skeleton__body" + }, !!secondarySidebar && Object(external_wp_element_["createElement"])("div", { + className: "interface-interface-skeleton__secondary-sidebar", + role: "region", + "aria-label": mergedLabels.secondarySidebar, + tabIndex: "-1" + }, secondarySidebar), !!notices && Object(external_wp_element_["createElement"])("div", { + className: "interface-interface-skeleton__notices" + }, notices), Object(external_wp_element_["createElement"])("div", { + className: "interface-interface-skeleton__content", + role: "region", + "aria-label": mergedLabels.body, + tabIndex: "-1" + }, content), !!sidebar && Object(external_wp_element_["createElement"])("div", { + className: "interface-interface-skeleton__sidebar", + role: "region", + "aria-label": mergedLabels.sidebar, + tabIndex: "-1" + }, sidebar), !!actions && Object(external_wp_element_["createElement"])("div", { + className: "interface-interface-skeleton__actions", + role: "region", + "aria-label": mergedLabels.actions, + tabIndex: "-1" + }, actions))), !!footer && Object(external_wp_element_["createElement"])("div", { + className: "interface-interface-skeleton__footer", + role: "region", + "aria-label": mergedLabels.footer, + tabIndex: "-1" + }, footer)); +} + +/* harmony default export */ var interface_skeleton = (Object(external_wp_element_["forwardRef"])(InterfaceSkeleton)); + +// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/index.js + + + + + + + +// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/index.js + + + /***/ }), -/***/ 23: +/***/ "URob": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; }); -/* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(40); -/* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12); - - -function _possibleConstructorReturn(self, call) { - if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) { - return call; - } - - return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self); -} - -/***/ }), - -/***/ 24: -/***/ (function(module, exports) { - -(function() { module.exports = this["regeneratorRuntime"]; }()); - -/***/ }), - -/***/ 26: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; }); -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) { - arr2[i] = arr[i]; - } - - return arr2; -} - -/***/ }), - -/***/ 276: -/***/ (function(module, exports) { - -(function() { module.exports = this["wp"]["blockLibrary"]; }()); - -/***/ }), - -/***/ 285: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6); +/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); @@ -991,7 +3016,7 @@ * WordPress dependencies */ -var starFilled = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { +const starFilled = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { @@ -1002,13 +3027,13 @@ /***/ }), -/***/ 286: +/***/ "VKE3": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6); +/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); @@ -1016,7 +3041,32 @@ * WordPress dependencies */ -var starEmpty = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { +const moreVertical = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24" +}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { + d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" +})); +/* harmony default export */ __webpack_exports__["a"] = (moreVertical); + + +/***/ }), + +/***/ "Xxwi": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); +/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); + + +/** + * WordPress dependencies + */ + +const starEmpty = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { @@ -1029,220 +3079,15494 @@ /***/ }), -/***/ 29: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; }); -/* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26); - -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen); -} - -/***/ }), - -/***/ 290: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6); -/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); - - -/** - * WordPress dependencies - */ - -var plus = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 24 24" -}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { - d: "M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z" -})); -/* harmony default export */ __webpack_exports__["a"] = (plus); - - -/***/ }), - -/***/ 296: +/***/ "Y5n4": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6); -/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); - - -/** - * WordPress dependencies - */ - -var moreVertical = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 24 24" -}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { - d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" + +// EXPORTS +__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ enable_custom_fields; }); +__webpack_require__.d(__webpack_exports__, "c", function() { return /* reexport */ enable_panel; }); +__webpack_require__.d(__webpack_exports__, "d", function() { return /* reexport */ enable_plugin_document_setting_panel; }); +__webpack_require__.d(__webpack_exports__, "e", function() { return /* reexport */ enable_publish_sidebar; }); +__webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ enable_feature; }); + +// EXTERNAL MODULE: external ["wp","element"] +var external_wp_element_ = __webpack_require__("GRId"); + +// EXTERNAL MODULE: external ["wp","i18n"] +var external_wp_i18n_ = __webpack_require__("l3Sj"); + +// EXTERNAL MODULE: external ["wp","components"] +var external_wp_components_ = __webpack_require__("tI+e"); + +// EXTERNAL MODULE: external ["wp","data"] +var external_wp_data_ = __webpack_require__("1ZqX"); + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/options/base.js + + +/** + * WordPress dependencies + */ + + +function BaseOption({ + help, + label, + isChecked, + onChange, + children +}) { + return Object(external_wp_element_["createElement"])("div", { + className: "edit-post-preferences-modal__option" + }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { + help: help, + label: label, + checked: isChecked, + onChange: onChange + }), children); +} + +/* harmony default export */ var base = (BaseOption); + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/options/enable-custom-fields.js + + +/** + * WordPress dependencies + */ + + + + +/** + * Internal dependencies + */ + + +function CustomFieldsConfirmation({ + willEnable +}) { + const [isReloading, setIsReloading] = Object(external_wp_element_["useState"])(false); + return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("p", { + className: "edit-post-preferences-modal__custom-fields-confirmation-message" + }, Object(external_wp_i18n_["__"])('A page reload is required for this change. Make sure your content is saved before reloading.')), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { + className: "edit-post-preferences-modal__custom-fields-confirmation-button", + isSecondary: true, + isBusy: isReloading, + disabled: isReloading, + onClick: () => { + setIsReloading(true); + document.getElementById('toggle-custom-fields-form').submit(); + } + }, willEnable ? Object(external_wp_i18n_["__"])('Enable & Reload') : Object(external_wp_i18n_["__"])('Disable & Reload'))); +} +function EnableCustomFieldsOption({ + label, + areCustomFieldsEnabled +}) { + const [isChecked, setIsChecked] = Object(external_wp_element_["useState"])(areCustomFieldsEnabled); + return Object(external_wp_element_["createElement"])(base, { + label: label, + isChecked: isChecked, + onChange: setIsChecked + }, isChecked !== areCustomFieldsEnabled && Object(external_wp_element_["createElement"])(CustomFieldsConfirmation, { + willEnable: isChecked + })); +} +/* harmony default export */ var enable_custom_fields = (Object(external_wp_data_["withSelect"])(select => ({ + areCustomFieldsEnabled: !!select('core/editor').getEditorSettings().enableCustomFields +}))(EnableCustomFieldsOption)); + +// EXTERNAL MODULE: external ["wp","compose"] +var external_wp_compose_ = __webpack_require__("K9lf"); + +// EXTERNAL MODULE: ./node_modules/@wordpress/edit-post/build-module/store/index.js + 5 modules +var store = __webpack_require__("T40v"); + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/options/enable-panel.js +/** + * WordPress dependencies + */ + + +/** + * Internal dependencies + */ + + + +/* harmony default export */ var enable_panel = (Object(external_wp_compose_["compose"])(Object(external_wp_data_["withSelect"])((select, { + panelName +}) => { + const { + isEditorPanelEnabled, + isEditorPanelRemoved + } = select(store["a" /* store */]); + return { + isRemoved: isEditorPanelRemoved(panelName), + isChecked: isEditorPanelEnabled(panelName) + }; +}), Object(external_wp_compose_["ifCondition"])(({ + isRemoved +}) => !isRemoved), Object(external_wp_data_["withDispatch"])((dispatch, { + panelName +}) => ({ + onChange: () => dispatch(store["a" /* store */]).toggleEditorPanelEnabled(panelName) +})))(base)); + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/options/enable-plugin-document-setting-panel.js + + +/** + * WordPress dependencies + */ + +/** + * Internal dependencies + */ + + +const { + Fill, + Slot +} = Object(external_wp_components_["createSlotFill"])('EnablePluginDocumentSettingPanelOption'); + +const EnablePluginDocumentSettingPanelOption = ({ + label, + panelName +}) => Object(external_wp_element_["createElement"])(Fill, null, Object(external_wp_element_["createElement"])(enable_panel, { + label: label, + panelName: panelName })); -/* harmony default export */ __webpack_exports__["a"] = (moreVertical); + +EnablePluginDocumentSettingPanelOption.Slot = Slot; +/* harmony default export */ var enable_plugin_document_setting_panel = (EnablePluginDocumentSettingPanelOption); + +// EXTERNAL MODULE: external ["wp","viewport"] +var external_wp_viewport_ = __webpack_require__("KEfo"); + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/options/enable-publish-sidebar.js +/** + * WordPress dependencies + */ + + + +/** + * Internal dependencies + */ + + +/* harmony default export */ var enable_publish_sidebar = (Object(external_wp_compose_["compose"])(Object(external_wp_data_["withSelect"])(select => ({ + isChecked: select('core/editor').isPublishSidebarEnabled() +})), Object(external_wp_data_["withDispatch"])(dispatch => { + const { + enablePublishSidebar, + disablePublishSidebar + } = dispatch('core/editor'); + return { + onChange: isEnabled => isEnabled ? enablePublishSidebar() : disablePublishSidebar() + }; +}), // In < medium viewports we override this option and always show the publish sidebar. +// See the edit-post's header component for the specific logic. +Object(external_wp_viewport_["ifViewportMatches"])('medium'))(base)); + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/options/enable-feature.js +/** + * WordPress dependencies + */ + + +/** + * Internal dependencies + */ + + + +/* harmony default export */ var enable_feature = (Object(external_wp_compose_["compose"])(Object(external_wp_data_["withSelect"])((select, { + featureName +}) => { + const { + isFeatureActive + } = select(store["a" /* store */]); + return { + isChecked: isFeatureActive(featureName) + }; +}), Object(external_wp_data_["withDispatch"])((dispatch, { + featureName +}) => ({ + onChange: () => dispatch(store["a" /* store */]).toggleFeature(featureName) +})))(base)); + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/options/index.js + + + + + /***/ }), -/***/ 3: +/***/ "YLtl": /***/ (function(module, exports) { -(function() { module.exports = this["wp"]["components"]; }()); +(function() { module.exports = window["lodash"]; }()); /***/ }), -/***/ 31: +/***/ "Z23Y": /***/ (function(module, exports) { -(function() { module.exports = this["wp"]["url"]; }()); +(function() { module.exports = window["wp"]["warning"]; }()); + +/***/ }), + +/***/ "axFQ": +/***/ (function(module, exports) { + +(function() { module.exports = window["wp"]["blockEditor"]; }()); /***/ }), -/***/ 32: -/***/ (function(module, exports) { - -(function() { module.exports = this["wp"]["hooks"]; }()); +/***/ "bWcr": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); +/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); + + +/** + * WordPress dependencies + */ + +const closeSmall = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24" +}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { + d: "M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z" +})); +/* harmony default export */ __webpack_exports__["a"] = (closeSmall); + /***/ }), -/***/ 33: +/***/ "cDcd": /***/ (function(module, exports) { -(function() { module.exports = this["wp"]["editor"]; }()); +(function() { module.exports = window["React"]; }()); /***/ }), -/***/ 35: +/***/ "cjQ8": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); +/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); + + +/** + * WordPress dependencies + */ + +const arrowLeft = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24" +}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { + d: "M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z" +})); +/* harmony default export */ __webpack_exports__["a"] = (arrowLeft); + + +/***/ }), + +/***/ "dSQ2": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; }); -function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); -} - -/***/ }), - -/***/ 36: -/***/ (function(module, exports) { - -(function() { module.exports = this["wp"]["dataControls"]; }()); +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// EXPORTS +__webpack_require__.d(__webpack_exports__, "reinitializeEditor", function() { return /* binding */ reinitializeEditor; }); +__webpack_require__.d(__webpack_exports__, "initializeEditor", function() { return /* binding */ initializeEditor; }); +__webpack_require__.d(__webpack_exports__, "PluginBlockSettingsMenuItem", function() { return /* reexport */ plugin_block_settings_menu_item; }); +__webpack_require__.d(__webpack_exports__, "PluginDocumentSettingPanel", function() { return /* reexport */ plugin_document_setting_panel["a" /* default */]; }); +__webpack_require__.d(__webpack_exports__, "PluginMoreMenuItem", function() { return /* reexport */ plugin_more_menu_item; }); +__webpack_require__.d(__webpack_exports__, "PluginPostPublishPanel", function() { return /* reexport */ plugin_post_publish_panel; }); +__webpack_require__.d(__webpack_exports__, "PluginPostStatusInfo", function() { return /* reexport */ plugin_post_status_info; }); +__webpack_require__.d(__webpack_exports__, "PluginPrePublishPanel", function() { return /* reexport */ plugin_pre_publish_panel; }); +__webpack_require__.d(__webpack_exports__, "PluginSidebar", function() { return /* reexport */ PluginSidebarEditPost; }); +__webpack_require__.d(__webpack_exports__, "PluginSidebarMoreMenuItem", function() { return /* reexport */ PluginSidebarMoreMenuItem; }); +__webpack_require__.d(__webpack_exports__, "__experimentalFullscreenModeClose", function() { return /* reexport */ fullscreen_mode_close; }); +__webpack_require__.d(__webpack_exports__, "__experimentalMainDashboardButton", function() { return /* reexport */ main_dashboard_button; }); +__webpack_require__.d(__webpack_exports__, "store", function() { return /* reexport */ store["a" /* store */]; }); + +// EXTERNAL MODULE: external ["wp","element"] +var external_wp_element_ = __webpack_require__("GRId"); + +// EXTERNAL MODULE: external ["wp","coreData"] +var external_wp_coreData_ = __webpack_require__("jZUy"); + +// EXTERNAL MODULE: external ["wp","blockEditor"] +var external_wp_blockEditor_ = __webpack_require__("axFQ"); + +// EXTERNAL MODULE: external ["wp","editor"] +var external_wp_editor_ = __webpack_require__("jSdM"); + +// EXTERNAL MODULE: external ["wp","blockLibrary"] +var external_wp_blockLibrary_ = __webpack_require__("QyPg"); + +// EXTERNAL MODULE: external ["wp","hooks"] +var external_wp_hooks_ = __webpack_require__("g56x"); + +// EXTERNAL MODULE: external ["wp","mediaUtils"] +var external_wp_mediaUtils_ = __webpack_require__("6aBm"); + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/hooks/components/index.js +/** + * WordPress dependencies + */ + + + +const replaceMediaUpload = () => external_wp_mediaUtils_["MediaUpload"]; + +Object(external_wp_hooks_["addFilter"])('editor.MediaUpload', 'core/edit-post/replace-media-upload', replaceMediaUpload); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js +var esm_extends = __webpack_require__("wx14"); + +// EXTERNAL MODULE: external "lodash" +var external_lodash_ = __webpack_require__("YLtl"); + +// EXTERNAL MODULE: external ["wp","blocks"] +var external_wp_blocks_ = __webpack_require__("HSyU"); + +// EXTERNAL MODULE: external ["wp","components"] +var external_wp_components_ = __webpack_require__("tI+e"); + +// EXTERNAL MODULE: external ["wp","data"] +var external_wp_data_ = __webpack_require__("1ZqX"); + +// EXTERNAL MODULE: external ["wp","i18n"] +var external_wp_i18n_ = __webpack_require__("l3Sj"); + +// EXTERNAL MODULE: external ["wp","compose"] +var external_wp_compose_ = __webpack_require__("K9lf"); + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/hooks/validate-multiple-use/index.js + + + +/** + * External dependencies + */ + +/** + * WordPress dependencies + */ + + + + + + + + +const enhance = Object(external_wp_compose_["compose"])( +/** + * For blocks whose block type doesn't support `multiple`, provides the + * wrapped component with `originalBlockClientId` -- a reference to the + * first block of the same type in the content -- if and only if that + * "original" block is not the current one. Thus, an inexisting + * `originalBlockClientId` prop signals that the block is valid. + * + * @param {WPComponent} WrappedBlockEdit A filtered BlockEdit instance. + * + * @return {WPComponent} Enhanced component with merged state data props. + */ +Object(external_wp_data_["withSelect"])((select, block) => { + const multiple = Object(external_wp_blocks_["hasBlockSupport"])(block.name, 'multiple', true); // For block types with `multiple` support, there is no "original + // block" to be found in the content, as the block itself is valid. + + if (multiple) { + return {}; + } // Otherwise, only pass `originalBlockClientId` if it refers to a different + // block from the current one. + + + const blocks = select(external_wp_blockEditor_["store"]).getBlocks(); + const firstOfSameType = Object(external_lodash_["find"])(blocks, ({ + name + }) => block.name === name); + const isInvalid = firstOfSameType && firstOfSameType.clientId !== block.clientId; + return { + originalBlockClientId: isInvalid && firstOfSameType.clientId + }; +}), Object(external_wp_data_["withDispatch"])((dispatch, { + originalBlockClientId +}) => ({ + selectFirst: () => dispatch(external_wp_blockEditor_["store"]).selectBlock(originalBlockClientId) +}))); +const withMultipleValidation = Object(external_wp_compose_["createHigherOrderComponent"])(BlockEdit => { + return enhance(({ + originalBlockClientId, + selectFirst, + ...props + }) => { + if (!originalBlockClientId) { + return Object(external_wp_element_["createElement"])(BlockEdit, props); + } + + const blockType = Object(external_wp_blocks_["getBlockType"])(props.name); + const outboundType = getOutboundType(props.name); + return [Object(external_wp_element_["createElement"])("div", { + key: "invalid-preview", + style: { + minHeight: '60px' + } + }, Object(external_wp_element_["createElement"])(BlockEdit, Object(esm_extends["a" /* default */])({ + key: "block-edit" + }, props))), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["Warning"], { + key: "multiple-use-warning", + actions: [Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { + key: "find-original", + isSecondary: true, + onClick: selectFirst + }, Object(external_wp_i18n_["__"])('Find original')), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { + key: "remove", + isSecondary: true, + onClick: () => props.onReplace([]) + }, Object(external_wp_i18n_["__"])('Remove')), outboundType && Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { + key: "transform", + isSecondary: true, + onClick: () => props.onReplace(Object(external_wp_blocks_["createBlock"])(outboundType.name, props.attributes)) + }, Object(external_wp_i18n_["__"])('Transform into:'), " ", outboundType.title)] + }, Object(external_wp_element_["createElement"])("strong", null, blockType.title, ": "), Object(external_wp_i18n_["__"])('This block can only be used once.'))]; + }); +}, 'withMultipleValidation'); +/** + * Given a base block name, returns the default block type to which to offer + * transforms. + * + * @param {string} blockName Base block name. + * + * @return {?Object} The chosen default block type. + */ + +function getOutboundType(blockName) { + // Grab the first outbound transform + const transform = Object(external_wp_blocks_["findTransform"])(Object(external_wp_blocks_["getBlockTransforms"])('to', blockName), ({ + type, + blocks + }) => type === 'block' && blocks.length === 1 // What about when .length > 1? + ); + + if (!transform) { + return null; + } + + return Object(external_wp_blocks_["getBlockType"])(transform.blocks[0]); +} + +Object(external_wp_hooks_["addFilter"])('editor.BlockEdit', 'core/edit-post/validate-multiple-use/with-multiple-validation', withMultipleValidation); + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/hooks/index.js +/** + * Internal dependencies + */ + + + +// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/external.js +var external = __webpack_require__("K+tz"); + +// EXTERNAL MODULE: external ["wp","plugins"] +var external_wp_plugins_ = __webpack_require__("TvNi"); + +// EXTERNAL MODULE: external ["wp","url"] +var external_wp_url_ = __webpack_require__("Mmq9"); + +// EXTERNAL MODULE: external ["wp","notices"] +var external_wp_notices_ = __webpack_require__("onLe"); + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/plugins/copy-content-menu-item/index.js + + +/** + * WordPress dependencies + */ + + + + + + +function CopyContentMenuItem() { + const { + createNotice + } = Object(external_wp_data_["useDispatch"])(external_wp_notices_["store"]); + const getText = Object(external_wp_data_["useSelect"])(select => () => select(external_wp_editor_["store"]).getEditedPostAttribute('content'), []); + + function onSuccess() { + createNotice('info', Object(external_wp_i18n_["__"])('All content copied.'), { + isDismissible: true, + type: 'snackbar' + }); + } + + const ref = Object(external_wp_compose_["useCopyToClipboard"])(getText, onSuccess); + return Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], { + ref: ref + }, Object(external_wp_i18n_["__"])('Copy all content')); +} + +// EXTERNAL MODULE: ./node_modules/@wordpress/edit-post/build-module/store/index.js + 5 modules +var store = __webpack_require__("T40v"); + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/plugins/manage-blocks-menu-item/index.js + + +/** + * WordPress dependencies + */ + + + +/** + * Internal dependencies + */ + + +function ManageBlocksMenuItem({ + openModal +}) { + return Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], { + onClick: () => { + openModal('edit-post/manage-blocks'); + } + }, Object(external_wp_i18n_["__"])('Block Manager')); +} +/* harmony default export */ var manage_blocks_menu_item = (Object(external_wp_data_["withDispatch"])(dispatch => { + const { + openModal + } = dispatch(store["a" /* store */]); + return { + openModal + }; +})(ManageBlocksMenuItem)); + +// EXTERNAL MODULE: external ["wp","keycodes"] +var external_wp_keycodes_ = __webpack_require__("RxS6"); + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js + + +/** + * WordPress dependencies + */ + + + + +/** + * Internal dependencies + */ + + +function KeyboardShortcutsHelpMenuItem({ + openModal +}) { + return Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], { + onClick: () => { + openModal('edit-post/keyboard-shortcut-help'); + }, + shortcut: external_wp_keycodes_["displayShortcut"].access('h') + }, Object(external_wp_i18n_["__"])('Keyboard shortcuts')); +} +/* harmony default export */ var keyboard_shortcuts_help_menu_item = (Object(external_wp_data_["withDispatch"])(dispatch => { + const { + openModal + } = dispatch(store["a" /* store */]); + return { + openModal + }; +})(KeyboardShortcutsHelpMenuItem)); + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/tools-more-menu-group/index.js + + +/** + * External dependencies + */ + +/** + * WordPress dependencies + */ + + + +const { + Fill: ToolsMoreMenuGroup, + Slot +} = Object(external_wp_components_["createSlotFill"])('ToolsMoreMenuGroup'); + +ToolsMoreMenuGroup.Slot = ({ + fillProps +}) => Object(external_wp_element_["createElement"])(Slot, { + fillProps: fillProps +}, fills => !Object(external_lodash_["isEmpty"])(fills) && Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], { + label: Object(external_wp_i18n_["__"])('Tools') +}, fills)); + +/* harmony default export */ var tools_more_menu_group = (ToolsMoreMenuGroup); + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/plugins/welcome-guide-menu-item/index.js + + +/** + * WordPress dependencies + */ + + + +/** + * Internal dependencies + */ + + +function WelcomeGuideMenuItem() { + const isTemplateMode = Object(external_wp_data_["useSelect"])(select => select(store["a" /* store */]).isEditingTemplate(), []); + const { + toggleFeature + } = Object(external_wp_data_["useDispatch"])(store["a" /* store */]); + return Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], { + onClick: () => toggleFeature(isTemplateMode ? 'welcomeGuideTemplate' : 'welcomeGuide') + }, Object(external_wp_i18n_["__"])('Welcome Guide')); +} + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/plugins/index.js + + +/** + * WordPress dependencies + */ + + + + + +/** + * Internal dependencies + */ + + + + + + +Object(external_wp_plugins_["registerPlugin"])('edit-post', { + render() { + return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(tools_more_menu_group, null, ({ + onClose + }) => Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(manage_blocks_menu_item, { + onSelect: onClose + }), Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], { + role: "menuitem", + href: Object(external_wp_url_["addQueryArgs"])('edit.php', { + post_type: 'wp_block' + }) + }, Object(external_wp_i18n_["__"])('Manage Reusable blocks')), Object(external_wp_element_["createElement"])(keyboard_shortcuts_help_menu_item, { + onSelect: onClose + }), Object(external_wp_element_["createElement"])(WelcomeGuideMenuItem, null), Object(external_wp_element_["createElement"])(CopyContentMenuItem, null), Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], { + role: "menuitem", + icon: external["a" /* default */], + href: Object(external_wp_i18n_["__"])('https://wordpress.org/support/article/wordpress-editor/'), + target: "_blank", + rel: "noopener noreferrer" + }, Object(external_wp_i18n_["__"])('Help'), Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], { + as: "span" + }, + /* translators: accessibility text */ + Object(external_wp_i18n_["__"])('(opens in a new tab)')))))); + } + +}); + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/prevent-event-discovery.js +/* harmony default export */ var prevent_event_discovery = ({ + 't a l e s o f g u t e n b e r g': event => { + const { + ownerDocument + } = event.target; + + if (!ownerDocument.activeElement.classList.contains('edit-post-visual-editor') && ownerDocument.activeElement !== ownerDocument.body) { + return; + } + + event.preventDefault(); + window.wp.data.dispatch('core/block-editor').insertBlock(window.wp.blocks.createBlock('core/paragraph', { + content: '🐡🐢🦀🐤🦋🐘🐧🐹🦁🦄🦍🐼🐿🎃🐴🐝🐆🦕🦔🌱🍇π🍌🐉💧🥨🌌🍂🍠🥦🥚🥝🎟🥥🥒🛵🥖🍒🍯🎾🎲🐺🐚🐮⌛️' + })); + } +}); + +// EXTERNAL MODULE: ./node_modules/classnames/index.js +var classnames = __webpack_require__("TSYQ"); +var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); + +// EXTERNAL MODULE: ./node_modules/@wordpress/interface/build-module/index.js + 15 modules +var build_module = __webpack_require__("U60i"); + +// EXTERNAL MODULE: external ["wp","keyboardShortcuts"] +var external_wp_keyboardShortcuts_ = __webpack_require__("hF7m"); + +// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/text-editor/index.js + + +/** + * WordPress dependencies + */ + + + + + + +/** + * Internal dependencies + */ + + + +function TextEditor({ + onExit, + isRichEditingEnabled +}) { + return Object(external_wp_element_["createElement"])("div", { + className: "edit-post-text-editor" + }, isRichEditingEnabled && Object(external_wp_element_["createElement"])("div", { + className: "edit-post-text-editor__toolbar" + }, Object(external_wp_element_["createElement"])("h2", null, Object(external_wp_i18n_["__"])('Editing code')), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { + isTertiary: true, + onClick: onExit, + shortcut: external_wp_keycodes_["displayShortcut"].secondary('m') + }, Object(external_wp_i18n_["__"])('Exit code editor')), Object(external_wp_element_["createElement"])(external_wp_editor_["TextEditorGlobalKeyboardShortcuts"], null)), Object(external_wp_element_["createElement"])("div", { + className: "edit-post-text-editor__body" + }, Object(external_wp_element_["createElement"])(external_wp_editor_["PostTitle"], null), Object(external_wp_element_["createElement"])(external_wp_editor_["PostTextEditor"], null))); +} + +/* harmony default export */ var text_editor = (Object(external_wp_compose_["compose"])(Object(external_wp_data_["withSelect"])(select => ({ + isRichEditingEnabled: select('core/editor').getEditorSettings().richEditingEnabled +})), Object(external_wp_data_["withDispatch"])(dispatch => { + return { + onExit() { + dispatch(store["a" /* store */]).switchEditorMode('visual'); + } + + }; +}))(TextEditor)); + +// CONCATENATED MODULE: ./node_modules/framer-motion/node_modules/tslib/tslib.es6.js +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +var __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +}); + +function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} + +function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +/** @deprecated */ +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +/** @deprecated */ +function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +} + +function __spreadArray(to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +} + +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}; + +function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +} + +function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +function __classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +} + +function __classPrivateFieldSet(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +} + +// EXTERNAL MODULE: external "React" +var external_React_ = __webpack_require__("cDcd"); +var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_); + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/features/definitions.js +var createDefinition = function (propNames) { return ({ + isEnabled: function (props) { return propNames.some(function (name) { return !!props[name]; }); }, +}); }; +var featureDefinitions = { + measureLayout: createDefinition([ + "layout", + "layoutId", + "drag", + "_layoutResetTransform", + ]), + animation: createDefinition([ + "animate", + "exit", + "variants", + "whileHover", + "whileTap", + "whileFocus", + "whileDrag", + ]), + exit: createDefinition(["exit"]), + drag: createDefinition(["drag", "dragControls"]), + focus: createDefinition(["whileFocus"]), + hover: createDefinition(["whileHover", "onHoverStart", "onHoverEnd"]), + tap: createDefinition(["whileTap", "onTap", "onTapStart", "onTapCancel"]), + pan: createDefinition([ + "onPan", + "onPanStart", + "onPanSessionStart", + "onPanEnd", + ]), + layoutAnimation: createDefinition(["layout", "layoutId"]), +}; +function loadFeatures(features) { + for (var key in features) { + var Component = features[key]; + if (Component !== null) + featureDefinitions[key].Component = Component; + } +} + + + +// CONCATENATED MODULE: ./node_modules/hey-listen/dist/hey-listen.es.js +var warning = function () { }; +var invariant = function () { }; +if (false) {} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/LazyContext.js + + +var LazyContext = Object(external_React_["createContext"])({ strict: false }); + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/features/use-features.js + + + + + + + +var featureNames = Object.keys(featureDefinitions); +var numFeatures = featureNames.length; +/** + * Load features via renderless components based on the provided MotionProps. + */ +function useFeatures(props, visualElement, preloadedFeatures) { + var features = []; + var lazyContext = Object(external_React_["useContext"])(LazyContext); + if (!visualElement) + return null; + /** + * If we're in development mode, check to make sure we're not rendering a motion component + * as a child of LazyMotion, as this will break the file-size benefits of using it. + */ + if (false) {} + for (var i = 0; i < numFeatures; i++) { + var name_1 = featureNames[i]; + var _a = featureDefinitions[name_1], isEnabled = _a.isEnabled, Component = _a.Component; + /** + * It might be possible in the future to use this moment to + * dynamically request functionality. In initial tests this + * was producing a lot of duplication amongst bundles. + */ + if (isEnabled(props) && Component) { + features.push(external_React_["createElement"](Component, __assign({ key: name_1 }, props, { visualElement: visualElement }))); + } + } + return features; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/MotionConfigContext.js + + +/** + * @public + */ +var MotionConfigContext = Object(external_React_["createContext"])({ + transformPagePoint: function (p) { return p; }, + isStatic: false, +}); + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/MotionContext/index.js + + +var MotionContext = Object(external_React_["createContext"])({}); +function useVisualElementContext() { + return Object(external_React_["useContext"])(MotionContext).visualElement; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/PresenceContext.js + + +/** + * @public + */ +var PresenceContext = Object(external_React_["createContext"])(null); + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/use-constant.js + + +/** + * Creates a constant value over the lifecycle of a component. + * + * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer + * a guarantee that it won't re-run for performance reasons later on. By using `useConstant` + * you can ensure that initialisers don't execute twice or more. + */ +function useConstant(init) { + var ref = Object(external_React_["useRef"])(null); + if (ref.current === null) { + ref.current = init(); + } + return ref.current; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js + + + + +/** + * When a component is the child of `AnimatePresence`, it can use `usePresence` + * to access information about whether it's still present in the React tree. + * + * ```jsx + * import { usePresence } from "framer-motion" + * + * export const Component = () => { + * const [isPresent, safeToRemove] = usePresence() + * + * useEffect(() => { + * !isPresent && setTimeout(safeToRemove, 1000) + * }, [isPresent]) + * + * return
+ * } + * ``` + * + * If `isPresent` is `false`, it means that a component has been removed the tree, but + * `AnimatePresence` won't really remove it until `safeToRemove` has been called. + * + * @public + */ +function usePresence() { + var context = Object(external_React_["useContext"])(PresenceContext); + if (context === null) + return [true, null]; + var isPresent = context.isPresent, onExitComplete = context.onExitComplete, register = context.register; + // It's safe to call the following hooks conditionally (after an early return) because the context will always + // either be null or non-null for the lifespan of the component. + // Replace with useOpaqueId when released in React + var id = useUniqueId(); + Object(external_React_["useEffect"])(function () { return register(id); }, []); + var safeToRemove = function () { return onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete(id); }; + return !isPresent && onExitComplete ? [false, safeToRemove] : [true]; +} +/** + * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present. + * There is no `safeToRemove` function. + * + * ```jsx + * import { useIsPresent } from "framer-motion" + * + * export const Component = () => { + * const isPresent = useIsPresent() + * + * useEffect(() => { + * !isPresent && console.log("I've been removed!") + * }, [isPresent]) + * + * return
+ * } + * ``` + * + * @public + */ +function useIsPresent() { + return use_presence_isPresent(Object(external_React_["useContext"])(PresenceContext)); +} +function use_presence_isPresent(context) { + return context === null ? true : context.isPresent; +} +var counter = 0; +var incrementId = function () { return counter++; }; +var useUniqueId = function () { return useConstant(incrementId); }; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/LayoutGroupContext.js + + +/** + * @internal + */ +var LayoutGroupContext = Object(external_React_["createContext"])(null); + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/is-browser.js +var isBrowser = typeof window !== "undefined"; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js + + + +var useIsomorphicLayoutEffect = isBrowser ? external_React_["useLayoutEffect"] : external_React_["useEffect"]; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js + + + + + + + + + + +function useLayoutId(_a) { + var layoutId = _a.layoutId; + var layoutGroupId = Object(external_React_["useContext"])(LayoutGroupContext); + return layoutGroupId && layoutId !== undefined + ? layoutGroupId + "-" + layoutId + : layoutId; +} +function useVisualElement(Component, visualState, props, createVisualElement) { + var config = Object(external_React_["useContext"])(MotionConfigContext); + var lazyContext = Object(external_React_["useContext"])(LazyContext); + var parent = useVisualElementContext(); + var presenceContext = Object(external_React_["useContext"])(PresenceContext); + var layoutId = useLayoutId(props); + var visualElementRef = Object(external_React_["useRef"])(undefined); + /** + * If we haven't preloaded a renderer, check to see if we have one lazy-loaded + */ + if (!createVisualElement) + createVisualElement = lazyContext.renderer; + if (!visualElementRef.current && createVisualElement) { + visualElementRef.current = createVisualElement(Component, { + visualState: visualState, + parent: parent, + props: __assign(__assign({}, props), { layoutId: layoutId }), + presenceId: presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.id, + blockInitialAnimation: (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false, + }); + } + var visualElement = visualElementRef.current; + useIsomorphicLayoutEffect(function () { + if (!visualElement) + return; + visualElement.setProps(__assign(__assign(__assign({}, config), props), { layoutId: layoutId })); + visualElement.isPresent = use_presence_isPresent(presenceContext); + visualElement.isPresenceRoot = + !parent || parent.presenceId !== (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.id); + /** + * Fire a render to ensure the latest state is reflected on-screen. + */ + visualElement.syncRender(); + }); + Object(external_React_["useEffect"])(function () { + var _a; + if (!visualElement) + return; + /** + * In a future refactor we can replace the features-as-components and + * have this loop through them all firing "effect" listeners + */ + (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.animateChanges(); + }); + useIsomorphicLayoutEffect(function () { return function () { return visualElement === null || visualElement === void 0 ? void 0 : visualElement.notifyUnmount(); }; }, []); + return visualElement; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/is-ref-object.js +function isRefObject(ref) { + return (typeof ref === "object" && + Object.prototype.hasOwnProperty.call(ref, "current")); +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js + + + +/** + * Creates a ref function that, when called, hydrates the provided + * external ref and VisualElement. + */ +function useMotionRef(visualState, visualElement, externalRef) { + return Object(external_React_["useCallback"])(function (instance) { + var _a; + instance && ((_a = visualState.mount) === null || _a === void 0 ? void 0 : _a.call(visualState, instance)); + if (visualElement) { + instance + ? visualElement.mount(instance) + : visualElement.unmount(); + } + if (externalRef) { + if (typeof externalRef === "function") { + externalRef(instance); + } + else if (isRefObject(externalRef)) { + externalRef.current = instance; + } + } + }, + /** + * Only pass a new ref callback to React if we've received a visual element + * factory. Otherwise we'll be mounting/remounting every time externalRef + * or other dependencies change. + */ + [visualElement]); +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/utils/variants.js +/** + * Decides if the supplied variable is an array of variant labels + */ +function isVariantLabels(v) { + return Array.isArray(v); +} +/** + * Decides if the supplied variable is variant label + */ +function isVariantLabel(v) { + return typeof v === "string" || isVariantLabels(v); +} +/** + * Creates an object containing the latest state of every MotionValue on a VisualElement + */ +function getCurrent(visualElement) { + var current = {}; + visualElement.forEachValue(function (value, key) { return (current[key] = value.get()); }); + return current; +} +/** + * Creates an object containing the latest velocity of every MotionValue on a VisualElement + */ +function getVelocity(visualElement) { + var velocity = {}; + visualElement.forEachValue(function (value, key) { return (velocity[key] = value.getVelocity()); }); + return velocity; +} +function resolveVariantFromProps(props, definition, custom, currentValues, currentVelocity) { + var _a; + if (currentValues === void 0) { currentValues = {}; } + if (currentVelocity === void 0) { currentVelocity = {}; } + if (typeof definition === "string") { + definition = (_a = props.variants) === null || _a === void 0 ? void 0 : _a[definition]; + } + return typeof definition === "function" + ? definition(custom !== null && custom !== void 0 ? custom : props.custom, currentValues, currentVelocity) + : definition; +} +function resolveVariant(visualElement, definition, custom) { + var props = visualElement.getProps(); + return resolveVariantFromProps(props, definition, custom !== null && custom !== void 0 ? custom : props.custom, getCurrent(visualElement), getVelocity(visualElement)); +} +function checkIfControllingVariants(props) { + var _a; + return (typeof ((_a = props.animate) === null || _a === void 0 ? void 0 : _a.start) === "function" || + isVariantLabel(props.initial) || + isVariantLabel(props.animate) || + isVariantLabel(props.whileHover) || + isVariantLabel(props.whileDrag) || + isVariantLabel(props.whileTap) || + isVariantLabel(props.whileFocus) || + isVariantLabel(props.exit)); +} +function checkIfVariantNode(props) { + return Boolean(checkIfControllingVariants(props) || props.variants); +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/MotionContext/utils.js + + +function getCurrentTreeVariants(props, context) { + if (checkIfControllingVariants(props)) { + var initial = props.initial, animate = props.animate; + return { + initial: initial === false || isVariantLabel(initial) + ? initial + : undefined, + animate: isVariantLabel(animate) ? animate : undefined, + }; + } + return props.inherit !== false ? context : {}; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/MotionContext/create.js + + + + +function useCreateMotionContext(props, isStatic) { + var _a = getCurrentTreeVariants(props, Object(external_React_["useContext"])(MotionContext)), initial = _a.initial, animate = _a.animate; + return Object(external_React_["useMemo"])(function () { return ({ initial: initial, animate: animate }); }, + /** + * Only break memoisation in static mode + */ + isStatic + ? [ + variantLabelsAsDependency(initial), + variantLabelsAsDependency(animate), + ] + : []); +} +function variantLabelsAsDependency(prop) { + return Array.isArray(prop) ? prop.join(" ") : prop; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/index.js + + + + + + + + + + + +/** + * Create a `motion` component. + * + * This function accepts a Component argument, which can be either a string (ie "div" + * for `motion.div`), or an actual React component. + * + * Alongside this is a config option which provides a way of rendering the provided + * component "offline", or outside the React render cycle. + * + * @internal + */ +function createMotionComponent(_a) { + var preloadedFeatures = _a.preloadedFeatures, createVisualElement = _a.createVisualElement, useRender = _a.useRender, useVisualState = _a.useVisualState, Component = _a.Component; + preloadedFeatures && loadFeatures(preloadedFeatures); + function MotionComponent(props, externalRef) { + /** + * If we're rendering in a static environment, we only visually update the component + * as a result of a React-rerender rather than interactions or animations. This + * means we don't need to load additional memory structures like VisualElement, + * or any gesture/animation features. + */ + var isStatic = Object(external_React_["useContext"])(MotionConfigContext).isStatic; + var features = null; + /** + * Create the tree context. This is memoized and will only trigger renders + * when the current tree variant changes in static mode. + */ + var context = useCreateMotionContext(props, isStatic); + /** + * + */ + var visualState = useVisualState(props, isStatic); + if (!isStatic && isBrowser) { + /** + * Create a VisualElement for this component. A VisualElement provides a common + * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as + * providing a way of rendering to these APIs outside of the React render loop + * for more performant animations and interactions + */ + context.visualElement = useVisualElement(Component, visualState, props, createVisualElement); + /** + * Load Motion gesture and animation features. These are rendered as renderless + * components so each feature can optionally make use of React lifecycle methods. + * + * TODO: The intention is to move these away from a React-centric to a + * VisualElement-centric lifecycle scheme. + */ + features = useFeatures(props, context.visualElement, preloadedFeatures); + } + /** + * The mount order and hierarchy is specific to ensure our element ref + * is hydrated by the time features fire their effects. + */ + return (external_React_["createElement"](external_React_["Fragment"], null, + external_React_["createElement"](MotionContext.Provider, { value: context }, useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic)), + features)); + } + return Object(external_React_["forwardRef"])(MotionComponent); +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/motion-proxy.js + + +/** + * Convert any React component into a `motion` component. The provided component + * **must** use `React.forwardRef` to the underlying DOM component you want to animate. + * + * ```jsx + * const Component = React.forwardRef((props, ref) => { + * return
+ * }) + * + * const MotionComponent = motion(Component) + * ``` + * + * @public + */ +function createMotionProxy(createConfig) { + function custom(Component, customMotionComponentConfig) { + if (customMotionComponentConfig === void 0) { customMotionComponentConfig = {}; } + return createMotionComponent(createConfig(Component, customMotionComponentConfig)); + } + /** + * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc. + * Rather than generating them anew every render. + */ + var componentCache = new Map(); + return new Proxy(custom, { + /** + * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc. + * The prop name is passed through as `key` and we can use that to generate a `motion` + * DOM component with that name. + */ + get: function (_target, key) { + /** + * If this element doesn't exist in the component cache, create it and cache. + */ + if (!componentCache.has(key)) { + componentCache.set(key, custom(key)); + } + return componentCache.get(key); + }, + }); +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +/** + * We keep these listed seperately as we use the lowercase tag names as part + * of the runtime bundle to detect SVG components + */ +var lowercaseSVGElements = [ + "animate", + "circle", + "defs", + "desc", + "ellipse", + "g", + "image", + "line", + "filter", + "marker", + "mask", + "metadata", + "path", + "pattern", + "polygon", + "polyline", + "rect", + "stop", + "svg", + "switch", + "symbol", + "text", + "tspan", + "use", + "view", +]; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js + + +function isSVGComponent(Component) { + if ( + /** + * If it's not a string, it's a custom React component. Currently we only support + * HTML custom React components. + */ + typeof Component !== "string" || + /** + * If it contains a dash, the element is a custom HTML webcomponent. + */ + Component.includes("-")) { + return false; + } + else if ( + /** + * If it's in our list of lowercase SVG tags, it's an SVG component + */ + lowercaseSVGElements.indexOf(Component) > -1 || + /** + * If it contains a capital letter, it's an SVG component + */ + /[A-Z]/.test(Component)) { + return true; + } + return false; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/projection/scale-correction.js +var valueScaleCorrection = {}; +/** + * @internal + */ +function addScaleCorrection(correctors) { + for (var key in correctors) { + valueScaleCorrection[key] = correctors[key]; + } +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/html/utils/transform.js +/** + * A list of all transformable axes. We'll use this list to generated a version + * of each axes for each transform. + */ +var transformAxes = ["", "X", "Y", "Z"]; +/** + * An ordered array of each transformable value. By default, transform values + * will be sorted to this order. + */ +var transform_order = ["translate", "scale", "rotate", "skew"]; +/** + * Generate a list of every possible transform key. + */ +var transformProps = ["transformPerspective", "x", "y", "z"]; +transform_order.forEach(function (operationKey) { + return transformAxes.forEach(function (axesKey) { + return transformProps.push(operationKey + axesKey); + }); +}); +/** + * A function to use with Array.sort to sort transform keys by their default order. + */ +function sortTransformProps(a, b) { + return transformProps.indexOf(a) - transformProps.indexOf(b); +} +/** + * A quick lookup for transform props. + */ +var transformPropSet = new Set(transformProps); +function isTransformProp(key) { + return transformPropSet.has(key); +} +/** + * A quick lookup for transform origin props + */ +var transformOriginProps = new Set(["originX", "originY", "originZ"]); +function isTransformOriginProp(key) { + return transformOriginProps.has(key); +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.js + + + +function isForcedMotionValue(key, _a) { + var layout = _a.layout, layoutId = _a.layoutId; + return (isTransformProp(key) || + isTransformOriginProp(key) || + ((layout || layoutId !== undefined) && + (!!valueScaleCorrection[key] || key === "opacity"))); +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/value/utils/is-motion-value.js +var isMotionValue = function (value) { + return value !== null && typeof value === "object" && value.getVelocity; +}; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/html/utils/build-transform.js + + +var translateAlias = { + x: "translateX", + y: "translateY", + z: "translateZ", + transformPerspective: "perspective", +}; +/** + * Build a CSS transform style from individual x/y/scale etc properties. + * + * This outputs with a default order of transforms/scales/rotations, this can be customised by + * providing a transformTemplate function. + */ +function buildTransform(_a, _b, transformIsDefault, transformTemplate) { + var transform = _a.transform, transformKeys = _a.transformKeys; + var _c = _b.enableHardwareAcceleration, enableHardwareAcceleration = _c === void 0 ? true : _c, _d = _b.allowTransformNone, allowTransformNone = _d === void 0 ? true : _d; + // The transform string we're going to build into. + var transformString = ""; + // Transform keys into their default order - this will determine the output order. + transformKeys.sort(sortTransformProps); + // Track whether the defined transform has a defined z so we don't add a + // second to enable hardware acceleration + var transformHasZ = false; + // Loop over each transform and build them into transformString + var numTransformKeys = transformKeys.length; + for (var i = 0; i < numTransformKeys; i++) { + var key = transformKeys[i]; + transformString += (translateAlias[key] || key) + "(" + transform[key] + ") "; + if (key === "z") + transformHasZ = true; + } + if (!transformHasZ && enableHardwareAcceleration) { + transformString += "translateZ(0)"; + } + else { + transformString = transformString.trim(); + } + // If we have a custom `transform` template, pass our transform values and + // generated transformString to that before returning + if (transformTemplate) { + transformString = transformTemplate(transform, transformIsDefault ? "" : transformString); + } + else if (allowTransformNone && transformIsDefault) { + transformString = "none"; + } + return transformString; +} +/** + * Build a transformOrigin style. Uses the same defaults as the browser for + * undefined origins. + */ +function buildTransformOrigin(_a) { + var _b = _a.originX, originX = _b === void 0 ? "50%" : _b, _c = _a.originY, originY = _c === void 0 ? "50%" : _c, _d = _a.originZ, originZ = _d === void 0 ? 0 : _d; + return originX + " " + originY + " " + originZ; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.js +/** + * Returns true if the provided key is a CSS variable + */ +function isCSSVariable(key) { + return key.startsWith("--"); +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.js +/** + * Provided a value and a ValueType, returns the value as that value type. + */ +var getValueAsType = function (value, type) { + return type && typeof value === "number" + ? type.transform(value) + : value; +}; + + + +// CONCATENATED MODULE: ./node_modules/style-value-types/node_modules/tslib/tslib.es6.js +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise */ + +var tslib_es6_extendStatics = function(d, b) { + tslib_es6_extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return tslib_es6_extendStatics(d, b); +}; + +function tslib_es6_extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + tslib_es6_extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +var tslib_es6_assign = function() { + tslib_es6_assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return tslib_es6_assign.apply(this, arguments); +} + +function tslib_es6_rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +function tslib_es6_decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +function tslib_es6_param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +function tslib_es6_metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +function tslib_es6_awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function tslib_es6_generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +var tslib_es6_createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +}); + +function tslib_es6_exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) tslib_es6_createBinding(o, m, p); +} + +function tslib_es6_values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +function tslib_es6_read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +/** @deprecated */ +function tslib_es6_spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(tslib_es6_read(arguments[i])); + return ar; +} + +/** @deprecated */ +function tslib_es6_spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +} + +function tslib_es6_spreadArray(to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +} + +function tslib_es6_await(v) { + return this instanceof tslib_es6_await ? (this.v = v, this) : new tslib_es6_await(v); +} + +function tslib_es6_asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof tslib_es6_await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +function tslib_es6_asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: tslib_es6_await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +function tslib_es6_asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof tslib_es6_values === "function" ? tslib_es6_values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +function tslib_es6_makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +var tslib_es6_setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}; + +function tslib_es6_importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) tslib_es6_createBinding(result, mod, k); + tslib_es6_setModuleDefault(result, mod); + return result; +} + +function tslib_es6_importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +function tslib_es6_classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +} + +function tslib_es6_classPrivateFieldSet(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +} + +// CONCATENATED MODULE: ./node_modules/style-value-types/dist/es/utils.js +var clamp = function (min, max) { return function (v) { + return Math.max(Math.min(v, max), min); +}; }; +var sanitize = function (v) { return (v % 1 ? Number(v.toFixed(5)) : v); }; +var floatRegex = /(-)?([\d]*\.?[\d])+/g; +var colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi; +var singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i; +function isString(v) { + return typeof v === 'string'; +} + + + +// CONCATENATED MODULE: ./node_modules/style-value-types/dist/es/numbers/units.js + + + +var createUnitType = function (unit) { return ({ + test: function (v) { + return isString(v) && v.endsWith(unit) && v.split(' ').length === 1; + }, + parse: parseFloat, + transform: function (v) { return "" + v + unit; }, +}); }; +var degrees = createUnitType('deg'); +var percent = createUnitType('%'); +var px = createUnitType('px'); +var vh = createUnitType('vh'); +var vw = createUnitType('vw'); +var progressPercentage = tslib_es6_assign(tslib_es6_assign({}, percent), { parse: function (v) { return percent.parse(v) / 100; }, transform: function (v) { return percent.transform(v * 100); } }); + + + +// CONCATENATED MODULE: ./node_modules/style-value-types/dist/es/numbers/index.js + + + +var numbers_number = { + test: function (v) { return typeof v === 'number'; }, + parse: parseFloat, + transform: function (v) { return v; }, +}; +var numbers_alpha = tslib_es6_assign(tslib_es6_assign({}, numbers_number), { transform: clamp(0, 1) }); +var numbers_scale = tslib_es6_assign(tslib_es6_assign({}, numbers_number), { default: 1 }); + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/value-types/type-int.js + + + +var type_int_int = __assign(__assign({}, numbers_number), { transform: Math.round }); + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/value-types/number.js + + + +var numberValueTypes = { + // Border props + borderWidth: px, + borderTopWidth: px, + borderRightWidth: px, + borderBottomWidth: px, + borderLeftWidth: px, + borderRadius: px, + radius: px, + borderTopLeftRadius: px, + borderTopRightRadius: px, + borderBottomRightRadius: px, + borderBottomLeftRadius: px, + // Positioning props + width: px, + maxWidth: px, + height: px, + maxHeight: px, + size: px, + top: px, + right: px, + bottom: px, + left: px, + // Spacing props + padding: px, + paddingTop: px, + paddingRight: px, + paddingBottom: px, + paddingLeft: px, + margin: px, + marginTop: px, + marginRight: px, + marginBottom: px, + marginLeft: px, + // Transform props + rotate: degrees, + rotateX: degrees, + rotateY: degrees, + rotateZ: degrees, + scale: numbers_scale, + scaleX: numbers_scale, + scaleY: numbers_scale, + scaleZ: numbers_scale, + skew: degrees, + skewX: degrees, + skewY: degrees, + distance: px, + translateX: px, + translateY: px, + translateZ: px, + x: px, + y: px, + z: px, + perspective: px, + transformPerspective: px, + opacity: numbers_alpha, + originX: progressPercentage, + originY: progressPercentage, + originZ: px, + // Misc + zIndex: type_int_int, + // SVG + fillOpacity: numbers_alpha, + strokeOpacity: numbers_alpha, + numOctaves: type_int_int, +}; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/html/utils/build-styles.js + + + + + + + +function buildHTMLStyles(state, latestValues, projection, layoutState, options, transformTemplate, buildProjectionTransform, buildProjectionTransformOrigin) { + var _a; + var style = state.style, vars = state.vars, transform = state.transform, transformKeys = state.transformKeys, transformOrigin = state.transformOrigin; + // Empty the transformKeys array. As we're throwing out refs to its items + // this might not be as cheap as suspected. Maybe using the array as a buffer + // with a manual incrementation would be better. + transformKeys.length = 0; + // Track whether we encounter any transform or transformOrigin values. + var hasTransform = false; + var hasTransformOrigin = false; + // Does the calculated transform essentially equal "none"? + var transformIsNone = true; + /** + * Loop over all our latest animated values and decide whether to handle them + * as a style or CSS variable. + * + * Transforms and transform origins are kept seperately for further processing. + */ + for (var key in latestValues) { + var value = latestValues[key]; + /** + * If this is a CSS variable we don't do any further processing. + */ + if (isCSSVariable(key)) { + vars[key] = value; + continue; + } + // Convert the value to its default value type, ie 0 -> "0px" + var valueType = numberValueTypes[key]; + var valueAsType = getValueAsType(value, valueType); + if (isTransformProp(key)) { + // If this is a transform, flag to enable further transform processing + hasTransform = true; + transform[key] = valueAsType; + transformKeys.push(key); + // If we already know we have a non-default transform, early return + if (!transformIsNone) + continue; + // Otherwise check to see if this is a default transform + if (value !== ((_a = valueType.default) !== null && _a !== void 0 ? _a : 0)) + transformIsNone = false; + } + else if (isTransformOriginProp(key)) { + transformOrigin[key] = valueAsType; + // If this is a transform origin, flag and enable further transform-origin processing + hasTransformOrigin = true; + } + else { + /** + * If layout projection is on, and we need to perform scale correction for this + * value type, perform it. + */ + if ((projection === null || projection === void 0 ? void 0 : projection.isHydrated) && + (layoutState === null || layoutState === void 0 ? void 0 : layoutState.isHydrated) && + valueScaleCorrection[key]) { + var correctedValue = valueScaleCorrection[key].process(value, layoutState, projection); + /** + * Scale-correctable values can define a number of other values to break + * down into. For instance borderRadius needs applying to borderBottomLeftRadius etc + */ + var applyTo = valueScaleCorrection[key].applyTo; + if (applyTo) { + var num = applyTo.length; + for (var i = 0; i < num; i++) { + style[applyTo[i]] = correctedValue; + } + } + else { + style[key] = correctedValue; + } + } + else { + style[key] = valueAsType; + } + } + } + if (layoutState && + projection && + buildProjectionTransform && + buildProjectionTransformOrigin) { + style.transform = buildProjectionTransform(layoutState.deltaFinal, layoutState.treeScale, hasTransform ? transform : undefined); + if (transformTemplate) { + style.transform = transformTemplate(transform, style.transform); + } + style.transformOrigin = buildProjectionTransformOrigin(layoutState); + } + else { + if (hasTransform) { + style.transform = buildTransform(state, options, transformIsNone, transformTemplate); + } + if (hasTransformOrigin) { + style.transformOrigin = buildTransformOrigin(transformOrigin); + } + } +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +var createHtmlRenderState = function () { return ({ + style: {}, + transform: {}, + transformKeys: [], + transformOrigin: {}, + vars: {}, +}); }; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/html/use-props.js + + + + + + + +function copyRawValuesOnly(target, source, props) { + for (var key in source) { + if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) { + target[key] = source[key]; + } + } +} +function useInitialMotionValues(_a, visualState, isStatic) { + var transformTemplate = _a.transformTemplate; + return Object(external_React_["useMemo"])(function () { + var state = createHtmlRenderState(); + buildHTMLStyles(state, visualState, undefined, undefined, { enableHardwareAcceleration: !isStatic }, transformTemplate); + var vars = state.vars, style = state.style; + return __assign(__assign({}, vars), style); + }, [visualState]); +} +function useStyle(props, visualState, isStatic) { + var styleProp = props.style || {}; + var style = {}; + /** + * Copy non-Motion Values straight into style + */ + copyRawValuesOnly(style, styleProp, props); + Object.assign(style, useInitialMotionValues(props, visualState, isStatic)); + if (props.transformValues) { + style = props.transformValues(style); + } + return style; +} +function useHTMLProps(props, visualState, isStatic) { + // The `any` isn't ideal but it is the type of createElement props argument + var htmlProps = {}; + var style = useStyle(props, visualState, isStatic); + if (Boolean(props.drag)) { + // Disable the ghost element when a user drags + htmlProps.draggable = false; + // Disable text selection + style.userSelect = style.WebkitUserSelect = style.WebkitTouchCallout = + "none"; + // Disable scrolling on the draggable direction + style.touchAction = + props.drag === true + ? "none" + : "pan-" + (props.drag === "x" ? "y" : "x"); + } + htmlProps.style = style; + return htmlProps; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +/** + * A list of all valid MotionProps. + * + * @internalremarks + * This doesn't throw if a `MotionProp` name is missing - it should. + */ +var validMotionProps = new Set([ + "initial", + "animate", + "exit", + "style", + "variants", + "transition", + "transformTemplate", + "transformValues", + "custom", + "inherit", + "layout", + "layoutId", + "_layoutResetTransform", + "onLayoutAnimationComplete", + "onViewportBoxUpdate", + "onLayoutMeasure", + "onBeforeLayoutMeasure", + "onAnimationStart", + "onAnimationComplete", + "onUpdate", + "onDragStart", + "onDrag", + "onDragEnd", + "onMeasureDragConstraints", + "onDirectionLock", + "onDragTransitionEnd", + "drag", + "dragControls", + "dragListener", + "dragConstraints", + "dragDirectionLock", + "_dragX", + "_dragY", + "dragElastic", + "dragMomentum", + "dragPropagation", + "dragTransition", + "whileDrag", + "onPan", + "onPanStart", + "onPanEnd", + "onPanSessionStart", + "onTap", + "onTapStart", + "onTapCancel", + "onHoverStart", + "onHoverEnd", + "whileFocus", + "whileTap", + "whileHover", +]); +/** + * Check whether a prop name is a valid `MotionProp` key. + * + * @param key - Name of the property to check + * @returns `true` is key is a valid `MotionProp`. + * + * @public + */ +function isValidMotionProp(key) { + return validMotionProps.has(key); +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js + + +var shouldForward = function (key) { return !isValidMotionProp(key); }; +/** + * Emotion and Styled Components both allow users to pass through arbitrary props to their components + * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which + * of these should be passed to the underlying DOM node. + * + * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props + * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props + * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of + * `@emotion/is-prop-valid`, however to fix this problem we need to use it. + * + * By making it an optionalDependency we can offer this functionality only in the situations where it's + * actually required. + */ +try { + var emotionIsPropValid_1 = __webpack_require__("9uj6").default; + shouldForward = function (key) { + // Handle events explicitly as Emotion validates them all as true + if (key.startsWith("on")) { + return !isValidMotionProp(key); + } + else { + return emotionIsPropValid_1(key); + } + }; +} +catch (_a) { + // We don't need to actually do anything here - the fallback is the existing `isPropValid`. +} +function filterProps(props, isDom, forwardMotionProps) { + var filteredProps = {}; + for (var key in props) { + if (shouldForward(key) || + (forwardMotionProps === true && isValidMotionProp(key)) || + (!isDom && !isValidMotionProp(key))) { + filteredProps[key] = props[key]; + } + } + return filteredProps; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.js + + +function calcOrigin(origin, offset, size) { + return typeof origin === "string" + ? origin + : px.transform(offset + size * origin); +} +/** + * The SVG transform origin defaults are different to CSS and is less intuitive, + * so we use the measured dimensions of the SVG to reconcile these. + */ +function calcSVGTransformOrigin(dimensions, originX, originY) { + var pxOriginX = calcOrigin(originX, dimensions.x, dimensions.width); + var pxOriginY = calcOrigin(originY, dimensions.y, dimensions.height); + return pxOriginX + " " + pxOriginY; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/svg/utils/path.js + + +// Convert a progress 0-1 to a pixels value based on the provided length +var progressToPixels = function (progress, length) { + return px.transform(progress * length); +}; +var dashKeys = { + offset: "stroke-dashoffset", + array: "stroke-dasharray", +}; +var camelKeys = { + offset: "strokeDashoffset", + array: "strokeDasharray", +}; +/** + * Build SVG path properties. Uses the path's measured length to convert + * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset + * and stroke-dasharray attributes. + * + * This function is mutative to reduce per-frame GC. + */ +function buildSVGPath(attrs, totalLength, length, spacing, offset, useDashCase) { + if (spacing === void 0) { spacing = 1; } + if (offset === void 0) { offset = 0; } + if (useDashCase === void 0) { useDashCase = true; } + // We use dash case when setting attributes directly to the DOM node and camel case + // when defining props on a React component. + var keys = useDashCase ? dashKeys : camelKeys; + // Build the dash offset + attrs[keys.offset] = progressToPixels(-offset, totalLength); + // Build the dash array + var pathLength = progressToPixels(length, totalLength); + var pathSpacing = progressToPixels(spacing, totalLength); + attrs[keys.array] = pathLength + " " + pathSpacing; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.js + + + + + +/** + * Build SVG visual attrbutes, like cx and style.transform + */ +function buildSVGAttrs(state, _a, projection, layoutState, options, transformTemplate, buildProjectionTransform, buildProjectionTransformOrigin) { + var attrX = _a.attrX, attrY = _a.attrY, originX = _a.originX, originY = _a.originY, pathLength = _a.pathLength, _b = _a.pathSpacing, pathSpacing = _b === void 0 ? 1 : _b, _c = _a.pathOffset, pathOffset = _c === void 0 ? 0 : _c, + // This is object creation, which we try to avoid per-frame. + latest = __rest(_a, ["attrX", "attrY", "originX", "originY", "pathLength", "pathSpacing", "pathOffset"]); + buildHTMLStyles(state, latest, projection, layoutState, options, transformTemplate, buildProjectionTransform, buildProjectionTransformOrigin); + state.attrs = state.style; + state.style = {}; + var attrs = state.attrs, style = state.style, dimensions = state.dimensions, totalPathLength = state.totalPathLength; + /** + * However, we apply transforms as CSS transforms. So if we detect a transform we take it from attrs + * and copy it into style. + */ + if (attrs.transform) { + if (dimensions) + style.transform = attrs.transform; + delete attrs.transform; + } + // Parse transformOrigin + if (dimensions && + (originX !== undefined || originY !== undefined || style.transform)) { + style.transformOrigin = calcSVGTransformOrigin(dimensions, originX !== undefined ? originX : 0.5, originY !== undefined ? originY : 0.5); + } + // Treat x/y not as shortcuts but as actual attributes + if (attrX !== undefined) + attrs.x = attrX; + if (attrY !== undefined) + attrs.y = attrY; + // Build SVG path if one has been measured + if (totalPathLength !== undefined && pathLength !== undefined) { + buildSVGPath(attrs, totalPathLength, pathLength, pathSpacing, pathOffset, false); + } +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js + + + +var createSvgRenderState = function () { return (__assign(__assign({}, createHtmlRenderState()), { attrs: {} })); }; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/svg/use-props.js + + + + + + +function useSVGProps(props, visualState) { + var visualProps = Object(external_React_["useMemo"])(function () { + var state = createSvgRenderState(); + buildSVGAttrs(state, visualState, undefined, undefined, { enableHardwareAcceleration: false }, props.transformTemplate); + return __assign(__assign({}, state.attrs), { style: __assign({}, state.style) }); + }, [visualState]); + if (props.style) { + var rawStyles = {}; + copyRawValuesOnly(rawStyles, props.style, props); + visualProps.style = __assign(__assign({}, rawStyles), visualProps.style); + } + return visualProps; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/use-render.js + + + + + + + +function createUseRender(forwardMotionProps) { + if (forwardMotionProps === void 0) { forwardMotionProps = false; } + var useRender = function (Component, props, ref, _a, isStatic) { + var latestValues = _a.latestValues; + var useVisualProps = isSVGComponent(Component) + ? useSVGProps + : useHTMLProps; + var visualProps = useVisualProps(props, latestValues, isStatic); + var filteredProps = filterProps(props, typeof Component === "string", forwardMotionProps); + var elementProps = __assign(__assign(__assign({}, filteredProps), visualProps), { ref: ref }); + return Object(external_React_["createElement"])(Component, elementProps); + }; + return useRender; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.js +var CAMEL_CASE_PATTERN = /([a-z])([A-Z])/g; +var REPLACE_TEMPLATE = "$1-$2"; +/** + * Convert camelCase to dash-case properties. + */ +var camelToDash = function (str) { + return str.replace(CAMEL_CASE_PATTERN, REPLACE_TEMPLATE).toLowerCase(); +}; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/html/utils/render.js +function renderHTML(element, _a) { + var style = _a.style, vars = _a.vars; + // Directly assign style into the Element's style prop. In tests Object.assign is the + // fastest way to assign styles. + Object.assign(element.style, style); + // Loop over any CSS variables and assign those. + for (var key in vars) { + element.style.setProperty(key, vars[key]); + } +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.js +/** + * A set of attribute names that are always read/written as camel case. + */ +var camelCaseAttributes = new Set([ + "baseFrequency", + "diffuseConstant", + "kernelMatrix", + "kernelUnitLength", + "keySplines", + "keyTimes", + "limitingConeAngle", + "markerHeight", + "markerWidth", + "numOctaves", + "targetX", + "targetY", + "surfaceScale", + "specularConstant", + "specularExponent", + "stdDeviation", + "tableValues", + "viewBox", + "gradientTransform", +]); + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/svg/utils/render.js + + + + +function renderSVG(element, renderState) { + renderHTML(element, renderState); + for (var key in renderState.attrs) { + element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]); + } +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.js + + + +function scrape_motion_values_scrapeMotionValuesFromProps(props) { + var style = props.style; + var newValues = {}; + for (var key in style) { + if (isMotionValue(style[key]) || isForcedMotionValue(key, props)) { + newValues[key] = style[key]; + } + } + return newValues; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.js + + + +function utils_scrape_motion_values_scrapeMotionValuesFromProps(props) { + var newValues = scrape_motion_values_scrapeMotionValuesFromProps(props); + for (var key in props) { + if (isMotionValue(props[key])) { + var targetKey = key === "x" || key === "y" ? "attr" + key.toUpperCase() : key; + newValues[targetKey] = props[key]; + } + } + return newValues; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.js +function isAnimationControls(v) { + return typeof v === "object" && typeof v.start === "function"; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.js +var isKeyframesTarget = function (v) { + return Array.isArray(v); +}; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/resolve-value.js + + +var isCustomValue = function (v) { + return Boolean(v && typeof v === "object" && v.mix && v.toValue); +}; +var resolveFinalValueInKeyframes = function (v) { + // TODO maybe throw if v.length - 1 is placeholder token? + return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v; +}; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.js + + + +/** + * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself + * + * TODO: Remove and move to library + * + * @internal + */ +function resolveMotionValue(value) { + var unwrappedValue = isMotionValue(value) ? value.get() : value; + return isCustomValue(unwrappedValue) + ? unwrappedValue.toValue() + : unwrappedValue; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js + + + + + + + + + +function makeState(_a, props, context, presenceContext) { + var scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps, createRenderState = _a.createRenderState, onMount = _a.onMount; + var state = { + latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps), + renderState: createRenderState(), + }; + if (onMount) { + state.mount = function (instance) { return onMount(props, instance, state); }; + } + return state; +} +var makeUseVisualState = function (config) { return function (props, isStatic) { + var context = Object(external_React_["useContext"])(MotionContext); + var presenceContext = Object(external_React_["useContext"])(PresenceContext); + return isStatic + ? makeState(config, props, context, presenceContext) + : useConstant(function () { return makeState(config, props, context, presenceContext); }); +}; }; +function makeLatestValues(props, context, presenceContext, scrapeMotionValues) { + var values = {}; + var blockInitialAnimation = (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false; + var motionValues = scrapeMotionValues(props); + for (var key in motionValues) { + values[key] = resolveMotionValue(motionValues[key]); + } + var initial = props.initial, animate = props.animate; + var isControllingVariants = checkIfControllingVariants(props); + var isVariantNode = checkIfVariantNode(props); + if (context && + isVariantNode && + !isControllingVariants && + props.inherit !== false) { + initial !== null && initial !== void 0 ? initial : (initial = context.initial); + animate !== null && animate !== void 0 ? animate : (animate = context.animate); + } + var variantToSet = blockInitialAnimation || initial === false ? animate : initial; + if (variantToSet && + typeof variantToSet !== "boolean" && + !isAnimationControls(variantToSet)) { + var list = Array.isArray(variantToSet) ? variantToSet : [variantToSet]; + list.forEach(function (definition) { + var resolved = resolveVariantFromProps(props, definition); + if (!resolved) + return; + var transitionEnd = resolved.transitionEnd; resolved.transition; var target = __rest(resolved, ["transitionEnd", "transition"]); + for (var key in target) + values[key] = target[key]; + for (var key in transitionEnd) + values[key] = transitionEnd[key]; + }); + } + return values; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/svg/config-motion.js + + + + + + +var svgMotionConfig = { + useVisualState: makeUseVisualState({ + scrapeMotionValuesFromProps: utils_scrape_motion_values_scrapeMotionValuesFromProps, + createRenderState: createSvgRenderState, + onMount: function (props, instance, _a) { + var renderState = _a.renderState, latestValues = _a.latestValues; + try { + renderState.dimensions = + typeof instance.getBBox === + "function" + ? instance.getBBox() + : instance.getBoundingClientRect(); + } + catch (e) { + // Most likely trying to measure an unrendered element under Firefox + renderState.dimensions = { + x: 0, + y: 0, + width: 0, + height: 0, + }; + } + if (isPath(instance)) { + renderState.totalPathLength = instance.getTotalLength(); + } + buildSVGAttrs(renderState, latestValues, undefined, undefined, { enableHardwareAcceleration: false }, props.transformTemplate); + // TODO: Replace with direct assignment + renderSVG(instance, renderState); + }, + }), +}; +function isPath(element) { + return element.tagName === "path"; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/html/config-motion.js + + + + +var htmlMotionConfig = { + useVisualState: makeUseVisualState({ + scrapeMotionValuesFromProps: scrape_motion_values_scrapeMotionValuesFromProps, + createRenderState: createHtmlRenderState, + }), +}; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/utils/create-config.js + + + + + + +function createDomMotionConfig(Component, _a, preloadedFeatures, createVisualElement) { + var _b = _a.forwardMotionProps, forwardMotionProps = _b === void 0 ? false : _b; + var baseConfig = isSVGComponent(Component) + ? svgMotionConfig + : htmlMotionConfig; + return __assign(__assign({}, baseConfig), { preloadedFeatures: preloadedFeatures, useRender: createUseRender(forwardMotionProps), createVisualElement: createVisualElement, + Component: Component }); +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/utils/types.js +var AnimationType; +(function (AnimationType) { + AnimationType["Animate"] = "animate"; + AnimationType["Hover"] = "whileHover"; + AnimationType["Tap"] = "whileTap"; + AnimationType["Drag"] = "whileDrag"; + AnimationType["Focus"] = "whileFocus"; + AnimationType["Exit"] = "exit"; +})(AnimationType || (AnimationType = {})); + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/events/use-dom-event.js + + +function addDomEvent(target, eventName, handler, options) { + target.addEventListener(eventName, handler, options); + return function () { return target.removeEventListener(eventName, handler, options); }; +} +/** + * Attaches an event listener directly to the provided DOM element. + * + * Bypassing React's event system can be desirable, for instance when attaching non-passive + * event handlers. + * + * ```jsx + * const ref = useRef(null) + * + * useDomEvent(ref, 'wheel', onWheel, { passive: false }) + * + * return
+ * ``` + * + * @param ref - React.RefObject that's been provided to the element you want to bind the listener to. + * @param eventName - Name of the event you want listen for. + * @param handler - Function to fire when receiving the event. + * @param options - Options to pass to `Event.addEventListener`. + * + * @public + */ +function useDomEvent(ref, eventName, handler, options) { + Object(external_React_["useEffect"])(function () { + var element = ref.current; + if (handler && element) { + return addDomEvent(element, eventName, handler, options); + } + }, [ref, eventName, handler, options]); +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/gestures/use-focus-gesture.js + + + +/** + * + * @param props + * @param ref + * @internal + */ +function useFocusGesture(_a) { + var whileFocus = _a.whileFocus, visualElement = _a.visualElement; + var onFocus = function () { + var _a; + (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Focus, true); + }; + var onBlur = function () { + var _a; + (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Focus, false); + }; + useDomEvent(visualElement, "focus", whileFocus ? onFocus : undefined); + useDomEvent(visualElement, "blur", whileFocus ? onBlur : undefined); +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/gestures/utils/event-type.js +function isMouseEvent(event) { + // PointerEvent inherits from MouseEvent so we can't use a straight instanceof check. + if (typeof PointerEvent !== "undefined" && event instanceof PointerEvent) { + return !!(event.pointerType === "mouse"); + } + return event instanceof MouseEvent; +} +function isTouchEvent(event) { + var hasTouches = !!event.touches; + return hasTouches; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/events/event-info.js + + +/** + * Filters out events not attached to the primary pointer (currently left mouse button) + * @param eventHandler + */ +function filterPrimaryPointer(eventHandler) { + return function (event) { + var isMouseEvent = event instanceof MouseEvent; + var isPrimaryPointer = !isMouseEvent || + (isMouseEvent && event.button === 0); + if (isPrimaryPointer) { + eventHandler(event); + } + }; +} +var defaultPagePoint = { pageX: 0, pageY: 0 }; +function pointFromTouch(e, pointType) { + if (pointType === void 0) { pointType = "page"; } + var primaryTouch = e.touches[0] || e.changedTouches[0]; + var point = primaryTouch || defaultPagePoint; + return { + x: point[pointType + "X"], + y: point[pointType + "Y"], + }; +} +function pointFromMouse(point, pointType) { + if (pointType === void 0) { pointType = "page"; } + return { + x: point[pointType + "X"], + y: point[pointType + "Y"], + }; +} +function extractEventInfo(event, pointType) { + if (pointType === void 0) { pointType = "page"; } + return { + point: isTouchEvent(event) + ? pointFromTouch(event, pointType) + : pointFromMouse(event, pointType), + }; +} +function getViewportPointFromEvent(event) { + return extractEventInfo(event, "client"); +} +var wrapHandler = function (handler, shouldFilterPrimaryPointer) { + if (shouldFilterPrimaryPointer === void 0) { shouldFilterPrimaryPointer = false; } + var listener = function (event) { + return handler(event, extractEventInfo(event)); + }; + return shouldFilterPrimaryPointer + ? filterPrimaryPointer(listener) + : listener; +}; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/events/utils.js + + +// We check for event support via functions in case they've been mocked by a testing suite. +var supportsPointerEvents = function () { + return isBrowser && window.onpointerdown === null; +}; +var supportsTouchEvents = function () { + return isBrowser && window.ontouchstart === null; +}; +var supportsMouseEvents = function () { + return isBrowser && window.onmousedown === null; +}; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/events/use-pointer-event.js + + + + +var mouseEventNames = { + pointerdown: "mousedown", + pointermove: "mousemove", + pointerup: "mouseup", + pointercancel: "mousecancel", + pointerover: "mouseover", + pointerout: "mouseout", + pointerenter: "mouseenter", + pointerleave: "mouseleave", +}; +var touchEventNames = { + pointerdown: "touchstart", + pointermove: "touchmove", + pointerup: "touchend", + pointercancel: "touchcancel", +}; +function getPointerEventName(name) { + if (supportsPointerEvents()) { + return name; + } + else if (supportsTouchEvents()) { + return touchEventNames[name]; + } + else if (supportsMouseEvents()) { + return mouseEventNames[name]; + } + return name; +} +function addPointerEvent(target, eventName, handler, options) { + return addDomEvent(target, getPointerEventName(eventName), wrapHandler(handler, eventName === "pointerdown"), options); +} +function usePointerEvent(ref, eventName, handler, options) { + return useDomEvent(ref, getPointerEventName(eventName), handler && wrapHandler(handler, eventName === "pointerdown"), options); +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/gestures/drag/utils/lock.js +function createLock(name) { + var lock = null; + return function () { + var openLock = function () { + lock = null; + }; + if (lock === null) { + lock = name; + return openLock; + } + return false; + }; +} +var globalHorizontalLock = createLock("dragHorizontal"); +var globalVerticalLock = createLock("dragVertical"); +function getGlobalLock(drag) { + var lock = false; + if (drag === "y") { + lock = globalVerticalLock(); + } + else if (drag === "x") { + lock = globalHorizontalLock(); + } + else { + var openHorizontal_1 = globalHorizontalLock(); + var openVertical_1 = globalVerticalLock(); + if (openHorizontal_1 && openVertical_1) { + lock = function () { + openHorizontal_1(); + openVertical_1(); + }; + } + else { + // Release the locks because we don't use them + if (openHorizontal_1) + openHorizontal_1(); + if (openVertical_1) + openVertical_1(); + } + } + return lock; +} +function isDragActive() { + // Check the gesture lock - if we get it, it means no drag gesture is active + // and we can safely fire the tap gesture. + var openGestureLock = getGlobalLock(true); + if (!openGestureLock) + return true; + openGestureLock(); + return false; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/gestures/use-hover-gesture.js + + + + + +function createHoverEvent(visualElement, isActive, callback) { + return function (event, info) { + var _a; + if (!isMouseEvent(event) || isDragActive()) + return; + callback === null || callback === void 0 ? void 0 : callback(event, info); + (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Hover, isActive); + }; +} +function useHoverGesture(_a) { + var onHoverStart = _a.onHoverStart, onHoverEnd = _a.onHoverEnd, whileHover = _a.whileHover, visualElement = _a.visualElement; + usePointerEvent(visualElement, "pointerenter", onHoverStart || whileHover + ? createHoverEvent(visualElement, true, onHoverStart) + : undefined); + usePointerEvent(visualElement, "pointerleave", onHoverEnd || whileHover + ? createHoverEvent(visualElement, false, onHoverEnd) + : undefined); +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.js +/** + * Recursively traverse up the tree to check whether the provided child node + * is the parent or a descendant of it. + * + * @param parent - Element to find + * @param child - Element to test against parent + */ +var isNodeOrChild = function (parent, child) { + if (!child) { + return false; + } + else if (parent === child) { + return true; + } + else { + return isNodeOrChild(parent, child.parentElement); + } +}; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/use-unmount-effect.js + + +function useUnmountEffect(callback) { + return Object(external_React_["useEffect"])(function () { return function () { return callback(); }; }, []); +} + + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/pipe.js +var combineFunctions = function (a, b) { return function (v) { return b(a(v)); }; }; +var pipe = function () { + var transformers = []; + for (var _i = 0; _i < arguments.length; _i++) { + transformers[_i] = arguments[_i]; + } + return transformers.reduce(combineFunctions); +}; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/gestures/use-tap-gesture.js + + + + + + + + +/** + * @param handlers - + * @internal + */ +function useTapGesture(_a) { + var onTap = _a.onTap, onTapStart = _a.onTapStart, onTapCancel = _a.onTapCancel, whileTap = _a.whileTap, visualElement = _a.visualElement; + var hasPressListeners = onTap || onTapStart || onTapCancel || whileTap; + var isPressing = Object(external_React_["useRef"])(false); + var cancelPointerEndListeners = Object(external_React_["useRef"])(null); + function removePointerEndListener() { + var _a; + (_a = cancelPointerEndListeners.current) === null || _a === void 0 ? void 0 : _a.call(cancelPointerEndListeners); + cancelPointerEndListeners.current = null; + } + function checkPointerEnd() { + var _a; + removePointerEndListener(); + isPressing.current = false; + (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Tap, false); + return !isDragActive(); + } + function onPointerUp(event, info) { + if (!checkPointerEnd()) + return; + /** + * We only count this as a tap gesture if the event.target is the same + * as, or a child of, this component's element + */ + !isNodeOrChild(visualElement.getInstance(), event.target) + ? onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info) + : onTap === null || onTap === void 0 ? void 0 : onTap(event, info); + } + function onPointerCancel(event, info) { + if (!checkPointerEnd()) + return; + onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info); + } + function onPointerDown(event, info) { + var _a; + removePointerEndListener(); + if (isPressing.current) + return; + isPressing.current = true; + cancelPointerEndListeners.current = pipe(addPointerEvent(window, "pointerup", onPointerUp), addPointerEvent(window, "pointercancel", onPointerCancel)); + onTapStart === null || onTapStart === void 0 ? void 0 : onTapStart(event, info); + (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Tap, true); + } + usePointerEvent(visualElement, "pointerdown", hasPressListeners ? onPointerDown : undefined); + useUnmountEffect(removePointerEndListener); +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/utils/make-renderless-component.js +var makeRenderlessComponent = function (hook) { return function (props) { + hook(props); + return null; +}; }; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/features/gestures.js + + + + + +var gestureAnimations = { + tap: makeRenderlessComponent(useTapGesture), + focus: makeRenderlessComponent(useFocusGesture), + hover: makeRenderlessComponent(useHoverGesture), +}; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/shallow-compare.js +function shallowCompare(next, prev) { + if (!Array.isArray(prev)) + return false; + var prevLength = prev.length; + if (prevLength !== next.length) + return false; + for (var i = 0; i < prevLength; i++) { + if (prev[i] !== next[i]) + return false; + } + return true; +} + + + +// CONCATENATED MODULE: ./node_modules/popmotion/node_modules/tslib/tslib.es6.js +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise */ + +var tslib_tslib_es6_extendStatics = function(d, b) { + tslib_tslib_es6_extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return tslib_tslib_es6_extendStatics(d, b); +}; + +function tslib_tslib_es6_extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + tslib_tslib_es6_extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +var tslib_tslib_es6_assign = function() { + tslib_tslib_es6_assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return tslib_tslib_es6_assign.apply(this, arguments); +} + +function tslib_tslib_es6_rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +function tslib_tslib_es6_decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +function tslib_tslib_es6_param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +function tslib_tslib_es6_metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +function tslib_tslib_es6_awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function tslib_tslib_es6_generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +var tslib_tslib_es6_createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +}); + +function tslib_tslib_es6_exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) tslib_tslib_es6_createBinding(o, m, p); +} + +function tslib_tslib_es6_values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +function tslib_tslib_es6_read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +/** @deprecated */ +function tslib_tslib_es6_spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(tslib_tslib_es6_read(arguments[i])); + return ar; +} + +/** @deprecated */ +function tslib_tslib_es6_spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +} + +function tslib_tslib_es6_spreadArray(to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +} + +function tslib_tslib_es6_await(v) { + return this instanceof tslib_tslib_es6_await ? (this.v = v, this) : new tslib_tslib_es6_await(v); +} + +function tslib_tslib_es6_asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof tslib_tslib_es6_await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +function tslib_tslib_es6_asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: tslib_tslib_es6_await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +function tslib_tslib_es6_asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof tslib_tslib_es6_values === "function" ? tslib_tslib_es6_values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +function tslib_tslib_es6_makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +var tslib_tslib_es6_setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}; + +function tslib_tslib_es6_importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) tslib_tslib_es6_createBinding(result, mod, k); + tslib_tslib_es6_setModuleDefault(result, mod); + return result; +} + +function tslib_tslib_es6_importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +function tslib_tslib_es6_classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +} + +function tslib_tslib_es6_classPrivateFieldSet(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +} + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/clamp.js +var clamp_clamp = function (min, max, v) { + return Math.min(Math.max(v, min), max); +}; + + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/animations/utils/find-spring.js + + + +var safeMin = 0.001; +var minDuration = 0.01; +var maxDuration = 10.0; +var minDamping = 0.05; +var maxDamping = 1; +function findSpring(_a) { + var _b = _a.duration, duration = _b === void 0 ? 800 : _b, _c = _a.bounce, bounce = _c === void 0 ? 0.25 : _c, _d = _a.velocity, velocity = _d === void 0 ? 0 : _d, _e = _a.mass, mass = _e === void 0 ? 1 : _e; + var envelope; + var derivative; + warning(duration <= maxDuration * 1000, "Spring duration must be 10 seconds or less"); + var dampingRatio = 1 - bounce; + dampingRatio = clamp_clamp(minDamping, maxDamping, dampingRatio); + duration = clamp_clamp(minDuration, maxDuration, duration / 1000); + if (dampingRatio < 1) { + envelope = function (undampedFreq) { + var exponentialDecay = undampedFreq * dampingRatio; + var delta = exponentialDecay * duration; + var a = exponentialDecay - velocity; + var b = calcAngularFreq(undampedFreq, dampingRatio); + var c = Math.exp(-delta); + return safeMin - (a / b) * c; + }; + derivative = function (undampedFreq) { + var exponentialDecay = undampedFreq * dampingRatio; + var delta = exponentialDecay * duration; + var d = delta * velocity + velocity; + var e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration; + var f = Math.exp(-delta); + var g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio); + var factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1; + return (factor * ((d - e) * f)) / g; + }; + } + else { + envelope = function (undampedFreq) { + var a = Math.exp(-undampedFreq * duration); + var b = (undampedFreq - velocity) * duration + 1; + return -safeMin + a * b; + }; + derivative = function (undampedFreq) { + var a = Math.exp(-undampedFreq * duration); + var b = (velocity - undampedFreq) * (duration * duration); + return a * b; + }; + } + var initialGuess = 5 / duration; + var undampedFreq = approximateRoot(envelope, derivative, initialGuess); + duration = duration * 1000; + if (isNaN(undampedFreq)) { + return { + stiffness: 100, + damping: 10, + duration: duration, + }; + } + else { + var stiffness = Math.pow(undampedFreq, 2) * mass; + return { + stiffness: stiffness, + damping: dampingRatio * 2 * Math.sqrt(mass * stiffness), + duration: duration, + }; + } +} +var rootIterations = 12; +function approximateRoot(envelope, derivative, initialGuess) { + var result = initialGuess; + for (var i = 1; i < rootIterations; i++) { + result = result - envelope(result) / derivative(result); + } + return result; +} +function calcAngularFreq(undampedFreq, dampingRatio) { + return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio); +} + + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/animations/generators/spring.js + + + +var durationKeys = ["duration", "bounce"]; +var physicsKeys = ["stiffness", "damping", "mass"]; +function isSpringType(options, keys) { + return keys.some(function (key) { return options[key] !== undefined; }); +} +function getSpringOptions(options) { + var springOptions = tslib_tslib_es6_assign({ velocity: 0.0, stiffness: 100, damping: 10, mass: 1.0, isResolvedFromDuration: false }, options); + if (!isSpringType(options, physicsKeys) && + isSpringType(options, durationKeys)) { + var derived = findSpring(options); + springOptions = tslib_tslib_es6_assign(tslib_tslib_es6_assign(tslib_tslib_es6_assign({}, springOptions), derived), { velocity: 0.0, mass: 1.0 }); + springOptions.isResolvedFromDuration = true; + } + return springOptions; +} +function spring(_a) { + var _b = _a.from, from = _b === void 0 ? 0.0 : _b, _c = _a.to, to = _c === void 0 ? 1.0 : _c, _d = _a.restSpeed, restSpeed = _d === void 0 ? 2 : _d, restDelta = _a.restDelta, options = tslib_tslib_es6_rest(_a, ["from", "to", "restSpeed", "restDelta"]); + var state = { done: false, value: from }; + var _e = getSpringOptions(options), stiffness = _e.stiffness, damping = _e.damping, mass = _e.mass, velocity = _e.velocity, duration = _e.duration, isResolvedFromDuration = _e.isResolvedFromDuration; + var resolveSpring = zero; + var resolveVelocity = zero; + function createSpring() { + var initialVelocity = velocity ? -(velocity / 1000) : 0.0; + var initialDelta = to - from; + var dampingRatio = damping / (2 * Math.sqrt(stiffness * mass)); + var undampedAngularFreq = Math.sqrt(stiffness / mass) / 1000; + restDelta !== null && restDelta !== void 0 ? restDelta : (restDelta = Math.abs(to - from) <= 1 ? 0.01 : 0.4); + if (dampingRatio < 1) { + var angularFreq_1 = calcAngularFreq(undampedAngularFreq, dampingRatio); + resolveSpring = function (t) { + var envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); + return (to - + envelope * + (((initialVelocity + + dampingRatio * undampedAngularFreq * initialDelta) / + angularFreq_1) * + Math.sin(angularFreq_1 * t) + + initialDelta * Math.cos(angularFreq_1 * t))); + }; + resolveVelocity = function (t) { + var envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); + return (dampingRatio * + undampedAngularFreq * + envelope * + ((Math.sin(angularFreq_1 * t) * + (initialVelocity + + dampingRatio * + undampedAngularFreq * + initialDelta)) / + angularFreq_1 + + initialDelta * Math.cos(angularFreq_1 * t)) - + envelope * + (Math.cos(angularFreq_1 * t) * + (initialVelocity + + dampingRatio * + undampedAngularFreq * + initialDelta) - + angularFreq_1 * + initialDelta * + Math.sin(angularFreq_1 * t))); + }; + } + else if (dampingRatio === 1) { + resolveSpring = function (t) { + return to - + Math.exp(-undampedAngularFreq * t) * + (initialDelta + + (initialVelocity + undampedAngularFreq * initialDelta) * + t); + }; + } + else { + var dampedAngularFreq_1 = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1); + resolveSpring = function (t) { + var envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); + var freqForT = Math.min(dampedAngularFreq_1 * t, 300); + return (to - + (envelope * + ((initialVelocity + + dampingRatio * undampedAngularFreq * initialDelta) * + Math.sinh(freqForT) + + dampedAngularFreq_1 * + initialDelta * + Math.cosh(freqForT))) / + dampedAngularFreq_1); + }; + } + } + createSpring(); + return { + next: function (t) { + var current = resolveSpring(t); + if (!isResolvedFromDuration) { + var currentVelocity = resolveVelocity(t) * 1000; + var isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed; + var isBelowDisplacementThreshold = Math.abs(to - current) <= restDelta; + state.done = + isBelowVelocityThreshold && isBelowDisplacementThreshold; + } + else { + state.done = t >= duration; + } + state.value = state.done ? to : current; + return state; + }, + flipTarget: function () { + var _a; + velocity = -velocity; + _a = [to, from], from = _a[0], to = _a[1]; + createSpring(); + }, + }; +} +spring.needsInterpolation = function (a, b) { + return typeof a === "string" || typeof b === "string"; +}; +var zero = function (_t) { return 0; }; + + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/progress.js +var progress_progress = function (from, to, value) { + var toFromDifference = to - from; + return toFromDifference === 0 ? 1 : (value - from) / toFromDifference; +}; + + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/mix.js +var mix = function (from, to, progress) { + return -progress * from + progress * to + from; +}; + + + +// CONCATENATED MODULE: ./node_modules/style-value-types/dist/es/color/utils.js + + +var isColorString = function (type, testProp) { return function (v) { + return Boolean((isString(v) && singleColorRegex.test(v) && v.startsWith(type)) || + (testProp && Object.prototype.hasOwnProperty.call(v, testProp))); +}; }; +var splitColor = function (aName, bName, cName) { return function (v) { + var _a; + if (!isString(v)) + return v; + var _b = v.match(floatRegex), a = _b[0], b = _b[1], c = _b[2], alpha = _b[3]; + return _a = {}, + _a[aName] = parseFloat(a), + _a[bName] = parseFloat(b), + _a[cName] = parseFloat(c), + _a.alpha = alpha !== undefined ? parseFloat(alpha) : 1, + _a; +}; }; + + + +// CONCATENATED MODULE: ./node_modules/style-value-types/dist/es/color/rgba.js + + + + + +var clampRgbUnit = clamp(0, 255); +var rgbUnit = tslib_es6_assign(tslib_es6_assign({}, numbers_number), { transform: function (v) { return Math.round(clampRgbUnit(v)); } }); +var rgba = { + test: isColorString('rgb', 'red'), + parse: splitColor('red', 'green', 'blue'), + transform: function (_a) { + var red = _a.red, green = _a.green, blue = _a.blue, _b = _a.alpha, alpha$1 = _b === void 0 ? 1 : _b; + return 'rgba(' + + rgbUnit.transform(red) + + ', ' + + rgbUnit.transform(green) + + ', ' + + rgbUnit.transform(blue) + + ', ' + + sanitize(numbers_alpha.transform(alpha$1)) + + ')'; + }, +}; + + + +// CONCATENATED MODULE: ./node_modules/style-value-types/dist/es/color/hex.js + + + +function parseHex(v) { + var r = ''; + var g = ''; + var b = ''; + var a = ''; + if (v.length > 5) { + r = v.substr(1, 2); + g = v.substr(3, 2); + b = v.substr(5, 2); + a = v.substr(7, 2); + } + else { + r = v.substr(1, 1); + g = v.substr(2, 1); + b = v.substr(3, 1); + a = v.substr(4, 1); + r += r; + g += g; + b += b; + a += a; + } + return { + red: parseInt(r, 16), + green: parseInt(g, 16), + blue: parseInt(b, 16), + alpha: a ? parseInt(a, 16) / 255 : 1, + }; +} +var hex = { + test: isColorString('#'), + parse: parseHex, + transform: rgba.transform, +}; + + + +// CONCATENATED MODULE: ./node_modules/style-value-types/dist/es/color/hsla.js + + + + + +var hsla = { + test: isColorString('hsl', 'hue'), + parse: splitColor('hue', 'saturation', 'lightness'), + transform: function (_a) { + var hue = _a.hue, saturation = _a.saturation, lightness = _a.lightness, _b = _a.alpha, alpha$1 = _b === void 0 ? 1 : _b; + return ('hsla(' + + Math.round(hue) + + ', ' + + percent.transform(sanitize(saturation)) + + ', ' + + percent.transform(sanitize(lightness)) + + ', ' + + sanitize(numbers_alpha.transform(alpha$1)) + + ')'); + }, +}; + + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/mix-color.js + + + + + +var mixLinearColor = function (from, to, v) { + var fromExpo = from * from; + var toExpo = to * to; + return Math.sqrt(Math.max(0, v * (toExpo - fromExpo) + fromExpo)); +}; +var colorTypes = [hex, rgba, hsla]; +var getColorType = function (v) { + return colorTypes.find(function (type) { return type.test(v); }); +}; +var notAnimatable = function (color) { + return "'" + color + "' is not an animatable color. Use the equivalent color code instead."; +}; +var mixColor = function (from, to) { + var fromColorType = getColorType(from); + var toColorType = getColorType(to); + invariant(!!fromColorType, notAnimatable(from)); + invariant(!!toColorType, notAnimatable(to)); + invariant(fromColorType.transform === toColorType.transform, "Both colors must be hex/RGBA, OR both must be HSLA."); + var fromColor = fromColorType.parse(from); + var toColor = toColorType.parse(to); + var blended = tslib_tslib_es6_assign({}, fromColor); + var mixFunc = fromColorType === hsla ? mix : mixLinearColor; + return function (v) { + for (var key in blended) { + if (key !== "alpha") { + blended[key] = mixFunc(fromColor[key], toColor[key], v); + } + } + blended.alpha = mix(fromColor.alpha, toColor.alpha, v); + return fromColorType.transform(blended); + }; +}; + + + +// CONCATENATED MODULE: ./node_modules/style-value-types/dist/es/color/index.js + + + + + +var color = { + test: function (v) { return rgba.test(v) || hex.test(v) || hsla.test(v); }, + parse: function (v) { + if (rgba.test(v)) { + return rgba.parse(v); + } + else if (hsla.test(v)) { + return hsla.parse(v); + } + else { + return hex.parse(v); + } + }, + transform: function (v) { + return isString(v) + ? v + : v.hasOwnProperty('red') + ? rgba.transform(v) + : hsla.transform(v); + }, +}; + + + +// CONCATENATED MODULE: ./node_modules/style-value-types/dist/es/complex/index.js + + + + +var colorToken = '${c}'; +var numberToken = '${n}'; +function test(v) { + var _a, _b, _c, _d; + return (isNaN(v) && + isString(v) && + ((_b = (_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) + ((_d = (_c = v.match(colorRegex)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0); +} +function analyse(v) { + var values = []; + var numColors = 0; + var colors = v.match(colorRegex); + if (colors) { + numColors = colors.length; + v = v.replace(colorRegex, colorToken); + values.push.apply(values, colors.map(color.parse)); + } + var numbers = v.match(floatRegex); + if (numbers) { + v = v.replace(floatRegex, numberToken); + values.push.apply(values, numbers.map(numbers_number.parse)); + } + return { values: values, numColors: numColors, tokenised: v }; +} +function parse(v) { + return analyse(v).values; +} +function createTransformer(v) { + var _a = analyse(v), values = _a.values, numColors = _a.numColors, tokenised = _a.tokenised; + var numValues = values.length; + return function (v) { + var output = tokenised; + for (var i = 0; i < numValues; i++) { + output = output.replace(i < numColors ? colorToken : numberToken, i < numColors ? color.transform(v[i]) : sanitize(v[i])); + } + return output; + }; +} +var convertNumbersToZero = function (v) { + return typeof v === 'number' ? 0 : v; +}; +function getAnimatableNone(v) { + var parsed = parse(v); + var transformer = createTransformer(v); + return transformer(parsed.map(convertNumbersToZero)); +} +var complex = { test: test, parse: parse, createTransformer: createTransformer, getAnimatableNone: getAnimatableNone }; + + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/inc.js +var zeroPoint = { + x: 0, + y: 0, + z: 0 +}; +var isNum = function (v) { return typeof v === 'number'; }; + + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/mix-complex.js + + + + + + + + +function getMixer(origin, target) { + if (isNum(origin)) { + return function (v) { return mix(origin, target, v); }; + } + else if (color.test(origin)) { + return mixColor(origin, target); + } + else { + return mixComplex(origin, target); + } +} +var mixArray = function (from, to) { + var output = tslib_tslib_es6_spreadArray([], from); + var numValues = output.length; + var blendValue = from.map(function (fromThis, i) { return getMixer(fromThis, to[i]); }); + return function (v) { + for (var i = 0; i < numValues; i++) { + output[i] = blendValue[i](v); + } + return output; + }; +}; +var mixObject = function (origin, target) { + var output = tslib_tslib_es6_assign(tslib_tslib_es6_assign({}, origin), target); + var blendValue = {}; + for (var key in output) { + if (origin[key] !== undefined && target[key] !== undefined) { + blendValue[key] = getMixer(origin[key], target[key]); + } + } + return function (v) { + for (var key in blendValue) { + output[key] = blendValue[key](v); + } + return output; + }; +}; +function mix_complex_analyse(value) { + var parsed = complex.parse(value); + var numValues = parsed.length; + var numNumbers = 0; + var numRGB = 0; + var numHSL = 0; + for (var i = 0; i < numValues; i++) { + if (numNumbers || typeof parsed[i] === "number") { + numNumbers++; + } + else { + if (parsed[i].hue !== undefined) { + numHSL++; + } + else { + numRGB++; + } + } + } + return { parsed: parsed, numNumbers: numNumbers, numRGB: numRGB, numHSL: numHSL }; +} +var mixComplex = function (origin, target) { + var template = complex.createTransformer(target); + var originStats = mix_complex_analyse(origin); + var targetStats = mix_complex_analyse(target); + invariant(originStats.numHSL === targetStats.numHSL && + originStats.numRGB === targetStats.numRGB && + originStats.numNumbers >= targetStats.numNumbers, "Complex values '" + origin + "' and '" + target + "' too different to mix. Ensure all colors are of the same type."); + return pipe(mixArray(originStats.parsed, targetStats.parsed), template); +}; + + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/interpolate.js + + + + + + + + + +var mixNumber = function (from, to) { return function (p) { return mix(from, to, p); }; }; +function detectMixerFactory(v) { + if (typeof v === 'number') { + return mixNumber; + } + else if (typeof v === 'string') { + if (color.test(v)) { + return mixColor; + } + else { + return mixComplex; + } + } + else if (Array.isArray(v)) { + return mixArray; + } + else if (typeof v === 'object') { + return mixObject; + } +} +function createMixers(output, ease, customMixer) { + var mixers = []; + var mixerFactory = customMixer || detectMixerFactory(output[0]); + var numMixers = output.length - 1; + for (var i = 0; i < numMixers; i++) { + var mixer = mixerFactory(output[i], output[i + 1]); + if (ease) { + var easingFunction = Array.isArray(ease) ? ease[i] : ease; + mixer = pipe(easingFunction, mixer); + } + mixers.push(mixer); + } + return mixers; +} +function fastInterpolate(_a, _b) { + var from = _a[0], to = _a[1]; + var mixer = _b[0]; + return function (v) { return mixer(progress_progress(from, to, v)); }; +} +function slowInterpolate(input, mixers) { + var inputLength = input.length; + var lastInputIndex = inputLength - 1; + return function (v) { + var mixerIndex = 0; + var foundMixerIndex = false; + if (v <= input[0]) { + foundMixerIndex = true; + } + else if (v >= input[lastInputIndex]) { + mixerIndex = lastInputIndex - 1; + foundMixerIndex = true; + } + if (!foundMixerIndex) { + var i = 1; + for (; i < inputLength; i++) { + if (input[i] > v || i === lastInputIndex) { + break; + } + } + mixerIndex = i - 1; + } + var progressInRange = progress_progress(input[mixerIndex], input[mixerIndex + 1], v); + return mixers[mixerIndex](progressInRange); + }; +} +function interpolate(input, output, _a) { + var _b = _a === void 0 ? {} : _a, _c = _b.clamp, isClamp = _c === void 0 ? true : _c, ease = _b.ease, mixer = _b.mixer; + var inputLength = input.length; + invariant(inputLength === output.length, 'Both input and output ranges must be the same length'); + invariant(!ease || !Array.isArray(ease) || ease.length === inputLength - 1, 'Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values.'); + if (input[0] > input[inputLength - 1]) { + input = [].concat(input); + output = [].concat(output); + input.reverse(); + output.reverse(); + } + var mixers = createMixers(output, ease, mixer); + var interpolator = inputLength === 2 + ? fastInterpolate(input, mixers) + : slowInterpolate(input, mixers); + return isClamp + ? function (v) { return interpolator(clamp_clamp(input[0], input[inputLength - 1], v)); } + : interpolator; +} + + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/easing/utils.js +var reverseEasing = function (easing) { return function (p) { return 1 - easing(1 - p); }; }; +var mirrorEasing = function (easing) { return function (p) { + return p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2; +}; }; +var createExpoIn = function (power) { return function (p) { return Math.pow(p, power); }; }; +var createBackIn = function (power) { return function (p) { + return p * p * ((power + 1) * p - power); +}; }; +var createAnticipate = function (power) { + var backEasing = createBackIn(power); + return function (p) { + return (p *= 2) < 1 + ? 0.5 * backEasing(p) + : 0.5 * (2 - Math.pow(2, -10 * (p - 1))); + }; +}; + + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/easing/index.js + + +var DEFAULT_OVERSHOOT_STRENGTH = 1.525; +var BOUNCE_FIRST_THRESHOLD = 4.0 / 11.0; +var BOUNCE_SECOND_THRESHOLD = 8.0 / 11.0; +var BOUNCE_THIRD_THRESHOLD = 9.0 / 10.0; +var linear = function (p) { return p; }; +var easeIn = createExpoIn(2); +var easeOut = reverseEasing(easeIn); +var easeInOut = mirrorEasing(easeIn); +var circIn = function (p) { return 1 - Math.sin(Math.acos(p)); }; +var circOut = reverseEasing(circIn); +var circInOut = mirrorEasing(circOut); +var backIn = createBackIn(DEFAULT_OVERSHOOT_STRENGTH); +var backOut = reverseEasing(backIn); +var backInOut = mirrorEasing(backIn); +var anticipate = createAnticipate(DEFAULT_OVERSHOOT_STRENGTH); +var ca = 4356.0 / 361.0; +var cb = 35442.0 / 1805.0; +var cc = 16061.0 / 1805.0; +var bounceOut = function (p) { + if (p === 1 || p === 0) + return p; + var p2 = p * p; + return p < BOUNCE_FIRST_THRESHOLD + ? 7.5625 * p2 + : p < BOUNCE_SECOND_THRESHOLD + ? 9.075 * p2 - 9.9 * p + 3.4 + : p < BOUNCE_THIRD_THRESHOLD + ? ca * p2 - cb * p + cc + : 10.8 * p * p - 20.52 * p + 10.72; +}; +var bounceIn = reverseEasing(bounceOut); +var bounceInOut = function (p) { + return p < 0.5 + ? 0.5 * (1.0 - bounceOut(1.0 - p * 2.0)) + : 0.5 * bounceOut(p * 2.0 - 1.0) + 0.5; +}; + + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/animations/generators/keyframes.js + + + +function defaultEasing(values, easing) { + return values.map(function () { return easing || easeInOut; }).splice(0, values.length - 1); +} +function defaultOffset(values) { + var numValues = values.length; + return values.map(function (_value, i) { + return i !== 0 ? i / (numValues - 1) : 0; + }); +} +function convertOffsetToTimes(offset, duration) { + return offset.map(function (o) { return o * duration; }); +} +function keyframes(_a) { + var _b = _a.from, from = _b === void 0 ? 0 : _b, _c = _a.to, to = _c === void 0 ? 1 : _c, ease = _a.ease, offset = _a.offset, _d = _a.duration, duration = _d === void 0 ? 300 : _d; + var state = { done: false, value: from }; + var values = Array.isArray(to) ? to : [from, to]; + var times = convertOffsetToTimes(offset && offset.length === values.length + ? offset + : defaultOffset(values), duration); + function createInterpolator() { + return interpolate(times, values, { + ease: Array.isArray(ease) ? ease : defaultEasing(values, ease), + }); + } + var interpolator = createInterpolator(); + return { + next: function (t) { + state.value = interpolator(t); + state.done = t >= duration; + return state; + }, + flipTarget: function () { + values.reverse(); + interpolator = createInterpolator(); + }, + }; +} + + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/animations/generators/decay.js +function decay(_a) { + var _b = _a.velocity, velocity = _b === void 0 ? 0 : _b, _c = _a.from, from = _c === void 0 ? 0 : _c, _d = _a.power, power = _d === void 0 ? 0.8 : _d, _e = _a.timeConstant, timeConstant = _e === void 0 ? 350 : _e, _f = _a.restDelta, restDelta = _f === void 0 ? 0.5 : _f, modifyTarget = _a.modifyTarget; + var state = { done: false, value: from }; + var amplitude = power * velocity; + var ideal = from + amplitude; + var target = modifyTarget === undefined ? ideal : modifyTarget(ideal); + if (target !== ideal) + amplitude = target - from; + return { + next: function (t) { + var delta = -amplitude * Math.exp(-t / timeConstant); + state.done = !(delta > restDelta || delta < -restDelta); + state.value = state.done ? target : target + delta; + return state; + }, + flipTarget: function () { }, + }; +} + + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/animations/utils/detect-animation-from-options.js + + + + +var types = { keyframes: keyframes, spring: spring, decay: decay }; +function detectAnimationFromOptions(config) { + if (Array.isArray(config.to)) { + return keyframes; + } + else if (types[config.type]) { + return types[config.type]; + } + var keys = new Set(Object.keys(config)); + if (keys.has("ease") || + (keys.has("duration") && !keys.has("dampingRatio"))) { + return keyframes; + } + else if (keys.has("dampingRatio") || + keys.has("stiffness") || + keys.has("mass") || + keys.has("damping") || + keys.has("restSpeed") || + keys.has("restDelta")) { + return spring; + } + return keyframes; +} + + + +// CONCATENATED MODULE: ./node_modules/framesync/dist/es/on-next-frame.js +var defaultTimestep = (1 / 60) * 1000; +var getCurrentTime = typeof performance !== "undefined" + ? function () { return performance.now(); } + : function () { return Date.now(); }; +var onNextFrame = typeof window !== "undefined" + ? function (callback) { + return window.requestAnimationFrame(callback); + } + : function (callback) { + return setTimeout(function () { return callback(getCurrentTime()); }, defaultTimestep); + }; + + + +// CONCATENATED MODULE: ./node_modules/framesync/dist/es/create-render-step.js +function createRenderStep(runNextFrame) { + var toRun = []; + var toRunNextFrame = []; + var numToRun = 0; + var isProcessing = false; + var toKeepAlive = new WeakSet(); + var step = { + schedule: function (callback, keepAlive, immediate) { + if (keepAlive === void 0) { keepAlive = false; } + if (immediate === void 0) { immediate = false; } + var addToCurrentFrame = immediate && isProcessing; + var buffer = addToCurrentFrame ? toRun : toRunNextFrame; + if (keepAlive) + toKeepAlive.add(callback); + if (buffer.indexOf(callback) === -1) { + buffer.push(callback); + if (addToCurrentFrame && isProcessing) + numToRun = toRun.length; + } + return callback; + }, + cancel: function (callback) { + var index = toRunNextFrame.indexOf(callback); + if (index !== -1) + toRunNextFrame.splice(index, 1); + toKeepAlive.delete(callback); + }, + process: function (frameData) { + var _a; + isProcessing = true; + _a = [toRunNextFrame, toRun], toRun = _a[0], toRunNextFrame = _a[1]; + toRunNextFrame.length = 0; + numToRun = toRun.length; + if (numToRun) { + for (var i = 0; i < numToRun; i++) { + var callback = toRun[i]; + callback(frameData); + if (toKeepAlive.has(callback)) { + step.schedule(callback); + runNextFrame(); + } + } + } + isProcessing = false; + }, + }; + return step; +} + + + +// CONCATENATED MODULE: ./node_modules/framesync/dist/es/index.js + + + +var maxElapsed = 40; +var useDefaultElapsed = true; +var runNextFrame = false; +var isProcessing = false; +var es_frame = { + delta: 0, + timestamp: 0 +}; +var stepsOrder = ["read", "update", "preRender", "render", "postRender"]; +var steps = /*#__PURE__*/stepsOrder.reduce(function (acc, key) { + acc[key] = createRenderStep(function () { + return runNextFrame = true; + }); + return acc; +}, {}); +var sync = /*#__PURE__*/stepsOrder.reduce(function (acc, key) { + var step = steps[key]; + acc[key] = function (process, keepAlive, immediate) { + if (keepAlive === void 0) { + keepAlive = false; + } + if (immediate === void 0) { + immediate = false; + } + if (!runNextFrame) startLoop(); + return step.schedule(process, keepAlive, immediate); + }; + return acc; +}, {}); +var cancelSync = /*#__PURE__*/stepsOrder.reduce(function (acc, key) { + acc[key] = steps[key].cancel; + return acc; +}, {}); +var flushSync = /*#__PURE__*/stepsOrder.reduce(function (acc, key) { + acc[key] = function () { + return steps[key].process(es_frame); + }; + return acc; +}, {}); +var processStep = function (stepId) { + return steps[stepId].process(es_frame); +}; +var processFrame = function (timestamp) { + runNextFrame = false; + es_frame.delta = useDefaultElapsed ? defaultTimestep : Math.max(Math.min(timestamp - es_frame.timestamp, maxElapsed), 1); + es_frame.timestamp = timestamp; + isProcessing = true; + stepsOrder.forEach(processStep); + isProcessing = false; + if (runNextFrame) { + useDefaultElapsed = false; + onNextFrame(processFrame); + } +}; +var startLoop = function () { + runNextFrame = true; + useDefaultElapsed = true; + if (!isProcessing) onNextFrame(processFrame); +}; +var getFrameData = function () { + return es_frame; +}; + +/* harmony default export */ var es = (sync); + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/animations/utils/elapsed.js +function loopElapsed(elapsed, duration, delay) { + if (delay === void 0) { delay = 0; } + return elapsed - duration - delay; +} +function reverseElapsed(elapsed, duration, delay, isForwardPlayback) { + if (delay === void 0) { delay = 0; } + if (isForwardPlayback === void 0) { isForwardPlayback = true; } + return isForwardPlayback + ? loopElapsed(duration + -elapsed, duration, delay) + : duration - (elapsed - duration) + delay; +} +function hasRepeatDelayElapsed(elapsed, duration, delay, isForwardPlayback) { + return isForwardPlayback ? elapsed >= duration + delay : elapsed <= -delay; +} + + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/animations/index.js + + + + + + +var framesync = function (update) { + var passTimestamp = function (_a) { + var delta = _a.delta; + return update(delta); + }; + return { + start: function () { return es.update(passTimestamp, true); }, + stop: function () { return cancelSync.update(passTimestamp); }, + }; +}; +function animations_animate(_a) { + var _b, _c; + var from = _a.from, _d = _a.autoplay, autoplay = _d === void 0 ? true : _d, _e = _a.driver, driver = _e === void 0 ? framesync : _e, _f = _a.elapsed, elapsed = _f === void 0 ? 0 : _f, _g = _a.repeat, repeatMax = _g === void 0 ? 0 : _g, _h = _a.repeatType, repeatType = _h === void 0 ? "loop" : _h, _j = _a.repeatDelay, repeatDelay = _j === void 0 ? 0 : _j, onPlay = _a.onPlay, onStop = _a.onStop, onComplete = _a.onComplete, onRepeat = _a.onRepeat, onUpdate = _a.onUpdate, options = tslib_tslib_es6_rest(_a, ["from", "autoplay", "driver", "elapsed", "repeat", "repeatType", "repeatDelay", "onPlay", "onStop", "onComplete", "onRepeat", "onUpdate"]); + var to = options.to; + var driverControls; + var repeatCount = 0; + var computedDuration = options.duration; + var latest; + var isComplete = false; + var isForwardPlayback = true; + var interpolateFromNumber; + var animator = detectAnimationFromOptions(options); + if ((_c = (_b = animator).needsInterpolation) === null || _c === void 0 ? void 0 : _c.call(_b, from, to)) { + interpolateFromNumber = interpolate([0, 100], [from, to], { + clamp: false, + }); + from = 0; + to = 100; + } + var animation = animator(tslib_tslib_es6_assign(tslib_tslib_es6_assign({}, options), { from: from, to: to })); + function repeat() { + repeatCount++; + if (repeatType === "reverse") { + isForwardPlayback = repeatCount % 2 === 0; + elapsed = reverseElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback); + } + else { + elapsed = loopElapsed(elapsed, computedDuration, repeatDelay); + if (repeatType === "mirror") + animation.flipTarget(); + } + isComplete = false; + onRepeat && onRepeat(); + } + function complete() { + driverControls.stop(); + onComplete && onComplete(); + } + function update(delta) { + if (!isForwardPlayback) + delta = -delta; + elapsed += delta; + if (!isComplete) { + var state = animation.next(Math.max(0, elapsed)); + latest = state.value; + if (interpolateFromNumber) + latest = interpolateFromNumber(latest); + isComplete = isForwardPlayback ? state.done : elapsed <= 0; + } + onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(latest); + if (isComplete) { + if (repeatCount === 0) + computedDuration !== null && computedDuration !== void 0 ? computedDuration : (computedDuration = elapsed); + if (repeatCount < repeatMax) { + hasRepeatDelayElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback) && repeat(); + } + else { + complete(); + } + } + } + function play() { + onPlay === null || onPlay === void 0 ? void 0 : onPlay(); + driverControls = driver(update); + driverControls.start(); + } + autoplay && play(); + return { + stop: function () { + onStop === null || onStop === void 0 ? void 0 : onStop(); + driverControls.stop(); + }, + }; +} + + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/velocity-per-second.js +function velocityPerSecond(velocity, frameDuration) { + return frameDuration ? velocity * (1000 / frameDuration) : 0; +} + + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/animations/inertia.js + + + + + +function inertia_inertia(_a) { + var _b = _a.from, from = _b === void 0 ? 0 : _b, _c = _a.velocity, velocity = _c === void 0 ? 0 : _c, min = _a.min, max = _a.max, _d = _a.power, power = _d === void 0 ? 0.8 : _d, _e = _a.timeConstant, timeConstant = _e === void 0 ? 750 : _e, _f = _a.bounceStiffness, bounceStiffness = _f === void 0 ? 500 : _f, _g = _a.bounceDamping, bounceDamping = _g === void 0 ? 10 : _g, _h = _a.restDelta, restDelta = _h === void 0 ? 1 : _h, modifyTarget = _a.modifyTarget, driver = _a.driver, onUpdate = _a.onUpdate, onComplete = _a.onComplete; + var currentAnimation; + function isOutOfBounds(v) { + return (min !== undefined && v < min) || (max !== undefined && v > max); + } + function boundaryNearest(v) { + if (min === undefined) + return max; + if (max === undefined) + return min; + return Math.abs(min - v) < Math.abs(max - v) ? min : max; + } + function startAnimation(options) { + currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop(); + currentAnimation = animations_animate(tslib_tslib_es6_assign(tslib_tslib_es6_assign({}, options), { driver: driver, onUpdate: function (v) { + var _a; + onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(v); + (_a = options.onUpdate) === null || _a === void 0 ? void 0 : _a.call(options, v); + }, onComplete: onComplete })); + } + function startSpring(options) { + startAnimation(tslib_tslib_es6_assign({ type: "spring", stiffness: bounceStiffness, damping: bounceDamping, restDelta: restDelta }, options)); + } + if (isOutOfBounds(from)) { + startSpring({ from: from, velocity: velocity, to: boundaryNearest(from) }); + } + else { + var target = power * velocity + from; + if (typeof modifyTarget !== "undefined") + target = modifyTarget(target); + var boundary_1 = boundaryNearest(target); + var heading_1 = boundary_1 === min ? -1 : 1; + var prev_1; + var current_1; + var checkBoundary = function (v) { + prev_1 = current_1; + current_1 = v; + velocity = velocityPerSecond(v - prev_1, getFrameData().delta); + if ((heading_1 === 1 && v > boundary_1) || + (heading_1 === -1 && v < boundary_1)) { + startSpring({ from: v, to: boundary_1, velocity: velocity }); + } + }; + startAnimation({ + type: "decay", + from: from, + velocity: velocity, + timeConstant: timeConstant, + power: power, + restDelta: restDelta, + modifyTarget: modifyTarget, + onUpdate: isOutOfBounds(target) ? checkBoundary : undefined, + }); + } + return { + stop: function () { return currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop(); }, + }; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/time-conversion.js +/** + * Converts seconds to milliseconds + * + * @param seconds - Time in seconds. + * @return milliseconds - Converted time in milliseconds. + */ +var secondsToMilliseconds = function (seconds) { return seconds * 1000; }; + + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/easing/cubic-bezier.js + + +var cubic_bezier_a = function (a1, a2) { return 1.0 - 3.0 * a2 + 3.0 * a1; }; +var cubic_bezier_b = function (a1, a2) { return 3.0 * a2 - 6.0 * a1; }; +var cubic_bezier_c = function (a1) { return 3.0 * a1; }; +var calcBezier = function (t, a1, a2) { + return ((cubic_bezier_a(a1, a2) * t + cubic_bezier_b(a1, a2)) * t + cubic_bezier_c(a1)) * t; +}; +var getSlope = function (t, a1, a2) { + return 3.0 * cubic_bezier_a(a1, a2) * t * t + 2.0 * cubic_bezier_b(a1, a2) * t + cubic_bezier_c(a1); +}; +var subdivisionPrecision = 0.0000001; +var subdivisionMaxIterations = 10; +function binarySubdivide(aX, aA, aB, mX1, mX2) { + var currentX; + var currentT; + var i = 0; + do { + currentT = aA + (aB - aA) / 2.0; + currentX = calcBezier(currentT, mX1, mX2) - aX; + if (currentX > 0.0) { + aB = currentT; + } + else { + aA = currentT; + } + } while (Math.abs(currentX) > subdivisionPrecision && + ++i < subdivisionMaxIterations); + return currentT; +} +var newtonIterations = 8; +var newtonMinSlope = 0.001; +function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) { + for (var i = 0; i < newtonIterations; ++i) { + var currentSlope = getSlope(aGuessT, mX1, mX2); + if (currentSlope === 0.0) { + return aGuessT; + } + var currentX = calcBezier(aGuessT, mX1, mX2) - aX; + aGuessT -= currentX / currentSlope; + } + return aGuessT; +} +var kSplineTableSize = 11; +var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0); +function cubicBezier(mX1, mY1, mX2, mY2) { + if (mX1 === mY1 && mX2 === mY2) + return linear; + var sampleValues = new Float32Array(kSplineTableSize); + for (var i = 0; i < kSplineTableSize; ++i) { + sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2); + } + function getTForX(aX) { + var intervalStart = 0.0; + var currentSample = 1; + var lastSample = kSplineTableSize - 1; + for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) { + intervalStart += kSampleStepSize; + } + --currentSample; + var dist = (aX - sampleValues[currentSample]) / + (sampleValues[currentSample + 1] - sampleValues[currentSample]); + var guessForT = intervalStart + dist * kSampleStepSize; + var initialSlope = getSlope(guessForT, mX1, mX2); + if (initialSlope >= newtonMinSlope) { + return newtonRaphsonIterate(aX, guessForT, mX1, mX2); + } + else if (initialSlope === 0.0) { + return guessForT; + } + else { + return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2); + } + } + return function (t) { + return t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2); + }; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/animation/utils/easing.js + + + + +var easingLookup = { + linear: linear, + easeIn: easeIn, + easeInOut: easeInOut, + easeOut: easeOut, + circIn: circIn, + circInOut: circInOut, + circOut: circOut, + backIn: backIn, + backInOut: backInOut, + backOut: backOut, + anticipate: anticipate, + bounceIn: bounceIn, + bounceInOut: bounceInOut, + bounceOut: bounceOut, +}; +var easingDefinitionToFunction = function (definition) { + if (Array.isArray(definition)) { + // If cubic bezier definition, create bezier curve + invariant(definition.length === 4, "Cubic bezier arrays must contain four numerical values."); + var _a = __read(definition, 4), x1 = _a[0], y1 = _a[1], x2 = _a[2], y2 = _a[3]; + return cubicBezier(x1, y1, x2, y2); + } + else if (typeof definition === "string") { + // Else lookup from table + invariant(easingLookup[definition] !== undefined, "Invalid easing type '" + definition + "'"); + return easingLookup[definition]; + } + return definition; +}; +var isEasingArray = function (ease) { + return Array.isArray(ease) && typeof ease[0] !== "number"; +}; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/animation/utils/is-animatable.js + + +/** + * Check if a value is animatable. Examples: + * + * ✅: 100, "100px", "#fff" + * ❌: "block", "url(2.jpg)" + * @param value + * + * @internal + */ +var isAnimatable = function (key, value) { + // If the list of keys tat might be non-animatable grows, replace with Set + if (key === "zIndex") + return false; + // If it's a number or a keyframes array, we can animate it. We might at some point + // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this, + // but for now lets leave it like this for performance reasons + if (typeof value === "number" || Array.isArray(value)) + return true; + if (typeof value === "string" && // It's animatable if we have a string + complex.test(value) && // And it contains numbers and/or colors + !value.startsWith("url(") // Unless it starts with "url(" + ) { + return true; + } + return false; +}; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/animation/utils/default-transitions.js + + + +var underDampedSpring = function () { return ({ + type: "spring", + stiffness: 500, + damping: 25, + restDelta: 0.5, + restSpeed: 10, +}); }; +var criticallyDampedSpring = function (to) { return ({ + type: "spring", + stiffness: 550, + damping: to === 0 ? 2 * Math.sqrt(550) : 30, + restDelta: 0.01, + restSpeed: 10, +}); }; +var linearTween = function () { return ({ + type: "keyframes", + ease: "linear", + duration: 0.3, +}); }; +var default_transitions_keyframes = function (values) { return ({ + type: "keyframes", + duration: 0.8, + values: values, +}); }; +var defaultTransitions = { + x: underDampedSpring, + y: underDampedSpring, + z: underDampedSpring, + rotate: underDampedSpring, + rotateX: underDampedSpring, + rotateY: underDampedSpring, + rotateZ: underDampedSpring, + scaleX: criticallyDampedSpring, + scaleY: criticallyDampedSpring, + scale: criticallyDampedSpring, + opacity: linearTween, + backgroundColor: linearTween, + color: linearTween, + default: criticallyDampedSpring, +}; +var getDefaultTransition = function (valueKey, to) { + var transitionFactory; + if (isKeyframesTarget(to)) { + transitionFactory = default_transitions_keyframes; + } + else { + transitionFactory = + defaultTransitions[valueKey] || defaultTransitions.default; + } + return __assign({ to: to }, transitionFactory(to)); +}; + + + +// CONCATENATED MODULE: ./node_modules/style-value-types/dist/es/complex/filter.js + + + + +var maxDefaults = new Set(['brightness', 'contrast', 'saturate', 'opacity']); +function applyDefaultFilter(v) { + var _a = v.slice(0, -1).split('('), name = _a[0], value = _a[1]; + if (name === 'drop-shadow') + return v; + var number = (value.match(floatRegex) || [])[0]; + if (!number) + return v; + var unit = value.replace(number, ''); + var defaultValue = maxDefaults.has(name) ? 1 : 0; + if (number !== value) + defaultValue *= 100; + return name + '(' + defaultValue + unit + ')'; +} +var functionRegex = /([a-z-]*)\(.*?\)/g; +var filter = tslib_es6_assign(tslib_es6_assign({}, complex), { getAnimatableNone: function (v) { + var functions = v.match(functionRegex); + return functions ? functions.map(applyDefaultFilter).join(' ') : v; + } }); + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/value-types/defaults.js + + + + +/** + * A map of default value types for common values + */ +var defaultValueTypes = __assign(__assign({}, numberValueTypes), { + // Color props + color: color, backgroundColor: color, outlineColor: color, fill: color, stroke: color, + // Border props + borderColor: color, borderTopColor: color, borderRightColor: color, borderBottomColor: color, borderLeftColor: color, filter: filter, WebkitFilter: filter }); +/** + * Gets the default ValueType for the provided value key + */ +var getDefaultValueType = function (key) { return defaultValueTypes[key]; }; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.js + + + +function animatable_none_getAnimatableNone(key, value) { + var _a; + var defaultValueType = getDefaultValueType(key); + if (defaultValueType !== filter) + defaultValueType = complex; + // If value is not recognised as animatable, ie "none", create an animatable version origin based on the target + return (_a = defaultValueType.getAnimatableNone) === null || _a === void 0 ? void 0 : _a.call(defaultValueType, value); +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/animation/utils/transitions.js + + + + + + + + + +/** + * Decide whether a transition is defined on a given Transition. + * This filters out orchestration options and returns true + * if any options are left. + */ +function isTransitionDefined(_a) { + _a.when; _a.delay; _a.delayChildren; _a.staggerChildren; _a.staggerDirection; _a.repeat; _a.repeatType; _a.repeatDelay; _a.from; var transition = __rest(_a, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection", "repeat", "repeatType", "repeatDelay", "from"]); + return !!Object.keys(transition).length; +} +var legacyRepeatWarning = false; +/** + * Convert Framer Motion's Transition type into Popmotion-compatible options. + */ +function convertTransitionToAnimationOptions(_a) { + var ease = _a.ease, times = _a.times, yoyo = _a.yoyo, flip = _a.flip, loop = _a.loop, transition = __rest(_a, ["ease", "times", "yoyo", "flip", "loop"]); + var options = __assign({}, transition); + if (times) + options["offset"] = times; + /** + * Convert any existing durations from seconds to milliseconds + */ + if (transition.duration) + options["duration"] = secondsToMilliseconds(transition.duration); + if (transition.repeatDelay) + options.repeatDelay = secondsToMilliseconds(transition.repeatDelay); + /** + * Map easing names to Popmotion's easing functions + */ + if (ease) { + options["ease"] = isEasingArray(ease) + ? ease.map(easingDefinitionToFunction) + : easingDefinitionToFunction(ease); + } + /** + * Support legacy transition API + */ + if (transition.type === "tween") + options.type = "keyframes"; + /** + * TODO: These options are officially removed from the API. + */ + if (yoyo || loop || flip) { + warning(!legacyRepeatWarning, "yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."); + legacyRepeatWarning = true; + if (yoyo) { + options.repeatType = "reverse"; + } + else if (loop) { + options.repeatType = "loop"; + } + else if (flip) { + options.repeatType = "mirror"; + } + options.repeat = loop || yoyo || flip || transition.repeat; + } + /** + * TODO: Popmotion 9 has the ability to automatically detect whether to use + * a keyframes or spring animation, but does so by detecting velocity and other spring options. + * It'd be good to introduce a similar thing here. + */ + if (transition.type !== "spring") + options.type = "keyframes"; + return options; +} +/** + * Get the delay for a value by checking Transition with decreasing specificity. + */ +function getDelayFromTransition(transition, key) { + var _a; + var valueTransition = getValueTransition(transition, key) || {}; + return (_a = valueTransition.delay) !== null && _a !== void 0 ? _a : 0; +} +function hydrateKeyframes(options) { + if (Array.isArray(options.to) && options.to[0] === null) { + options.to = __spreadArray([], __read(options.to)); + options.to[0] = options.from; + } + return options; +} +function getPopmotionAnimationOptions(transition, options, key) { + var _a; + if (Array.isArray(options.to)) { + (_a = transition.duration) !== null && _a !== void 0 ? _a : (transition.duration = 0.8); + } + hydrateKeyframes(options); + /** + * Get a default transition if none is determined to be defined. + */ + if (!isTransitionDefined(transition)) { + transition = __assign(__assign({}, transition), getDefaultTransition(key, options.to)); + } + return __assign(__assign({}, options), convertTransitionToAnimationOptions(transition)); +} +/** + * + */ +function transitions_getAnimation(key, value, target, transition, onComplete) { + var _a; + var valueTransition = getValueTransition(transition, key); + var origin = (_a = valueTransition.from) !== null && _a !== void 0 ? _a : value.get(); + var isTargetAnimatable = isAnimatable(key, target); + if (origin === "none" && isTargetAnimatable && typeof target === "string") { + /** + * If we're trying to animate from "none", try and get an animatable version + * of the target. This could be improved to work both ways. + */ + origin = animatable_none_getAnimatableNone(key, target); + } + else if (isZero(origin) && typeof target === "string") { + origin = getZeroUnit(target); + } + else if (!Array.isArray(target) && + isZero(target) && + typeof origin === "string") { + target = getZeroUnit(origin); + } + var isOriginAnimatable = isAnimatable(key, origin); + warning(isOriginAnimatable === isTargetAnimatable, "You are trying to animate " + key + " from \"" + origin + "\" to \"" + target + "\". " + origin + " is not an animatable value - to enable this animation set " + origin + " to a value animatable to " + target + " via the `style` property."); + function start() { + var options = { + from: origin, + to: target, + velocity: value.getVelocity(), + onComplete: onComplete, + onUpdate: function (v) { return value.set(v); }, + }; + return valueTransition.type === "inertia" || + valueTransition.type === "decay" + ? inertia_inertia(__assign(__assign({}, options), valueTransition)) + : animations_animate(__assign(__assign({}, getPopmotionAnimationOptions(valueTransition, options, key)), { onUpdate: function (v) { + var _a; + options.onUpdate(v); + (_a = valueTransition.onUpdate) === null || _a === void 0 ? void 0 : _a.call(valueTransition, v); + }, onComplete: function () { + var _a; + options.onComplete(); + (_a = valueTransition.onComplete) === null || _a === void 0 ? void 0 : _a.call(valueTransition); + } })); + } + function set() { + var _a; + value.set(target); + onComplete(); + (_a = valueTransition === null || valueTransition === void 0 ? void 0 : valueTransition.onComplete) === null || _a === void 0 ? void 0 : _a.call(valueTransition); + return { stop: function () { } }; + } + return !isOriginAnimatable || + !isTargetAnimatable || + valueTransition.type === false + ? set + : start; +} +function isZero(value) { + return (value === 0 || + (typeof value === "string" && + parseFloat(value) === 0 && + value.indexOf(" ") === -1)); +} +function getZeroUnit(potentialUnitType) { + return typeof potentialUnitType === "number" + ? 0 + : animatable_none_getAnimatableNone("", potentialUnitType); +} +function getValueTransition(transition, key) { + return transition[key] || transition["default"] || transition; +} +/** + * Start animation on a MotionValue. This function is an interface between + * Framer Motion and Popmotion + * + * @internal + */ +function transitions_startAnimation(key, value, target, transition) { + if (transition === void 0) { transition = {}; } + return value.start(function (onComplete) { + var delayTimer; + var controls; + var animation = transitions_getAnimation(key, value, target, transition, onComplete); + var delay = getDelayFromTransition(transition, key); + var start = function () { return (controls = animation()); }; + if (delay) { + delayTimer = setTimeout(start, secondsToMilliseconds(delay)); + } + else { + start(); + } + return function () { + clearTimeout(delayTimer); + controls === null || controls === void 0 ? void 0 : controls.stop(); + }; + }); +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/is-numerical-string.js +/** + * Check if value is a numerical string, ie a string that is purely a number eg "100" or "-100.1" + */ +var isNumericalString = function (v) { return /^\-?\d*\.?\d+$/.test(v); }; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/array.js +function addUniqueItem(arr, item) { + arr.indexOf(item) === -1 && arr.push(item); +} +function removeItem(arr, item) { + var index = arr.indexOf(item); + index > -1 && arr.splice(index, 1); +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/subscription-manager.js + + +var subscription_manager_SubscriptionManager = /** @class */ (function () { + function SubscriptionManager() { + this.subscriptions = []; + } + SubscriptionManager.prototype.add = function (handler) { + var _this = this; + addUniqueItem(this.subscriptions, handler); + return function () { return removeItem(_this.subscriptions, handler); }; + }; + SubscriptionManager.prototype.notify = function (a, b, c) { + var numSubscriptions = this.subscriptions.length; + if (!numSubscriptions) + return; + if (numSubscriptions === 1) { + /** + * If there's only a single handler we can just call it without invoking a loop. + */ + this.subscriptions[0](a, b, c); + } + else { + for (var i = 0; i < numSubscriptions; i++) { + /** + * Check whether the handler exists before firing as it's possible + * the subscriptions were modified during this loop running. + */ + var handler = this.subscriptions[i]; + handler && handler(a, b, c); + } + } + }; + SubscriptionManager.prototype.getSize = function () { + return this.subscriptions.length; + }; + SubscriptionManager.prototype.clear = function () { + this.subscriptions.length = 0; + }; + return SubscriptionManager; +}()); + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/value/index.js + + + + +var isFloat = function (value) { + return !isNaN(parseFloat(value)); +}; +/** + * `MotionValue` is used to track the state and velocity of motion values. + * + * @public + */ +var value_MotionValue = /** @class */ (function () { + /** + * @param init - The initiating value + * @param config - Optional configuration options + * + * - `transformer`: A function to transform incoming values with. + * + * @internal + */ + function MotionValue(init) { + var _this = this; + /** + * Duration, in milliseconds, since last updating frame. + * + * @internal + */ + this.timeDelta = 0; + /** + * Timestamp of the last time this `MotionValue` was updated. + * + * @internal + */ + this.lastUpdated = 0; + /** + * Functions to notify when the `MotionValue` updates. + * + * @internal + */ + this.updateSubscribers = new subscription_manager_SubscriptionManager(); + /** + * Functions to notify when the velocity updates. + * + * @internal + */ + this.velocityUpdateSubscribers = new subscription_manager_SubscriptionManager(); + /** + * Functions to notify when the `MotionValue` updates and `render` is set to `true`. + * + * @internal + */ + this.renderSubscribers = new subscription_manager_SubscriptionManager(); + /** + * Tracks whether this value can output a velocity. Currently this is only true + * if the value is numerical, but we might be able to widen the scope here and support + * other value types. + * + * @internal + */ + this.canTrackVelocity = false; + this.updateAndNotify = function (v, render) { + if (render === void 0) { render = true; } + _this.prev = _this.current; + _this.current = v; + // Update timestamp + var _a = getFrameData(), delta = _a.delta, timestamp = _a.timestamp; + if (_this.lastUpdated !== timestamp) { + _this.timeDelta = delta; + _this.lastUpdated = timestamp; + es.postRender(_this.scheduleVelocityCheck); + } + // Update update subscribers + if (_this.prev !== _this.current) { + _this.updateSubscribers.notify(_this.current); + } + // Update velocity subscribers + if (_this.velocityUpdateSubscribers.getSize()) { + _this.velocityUpdateSubscribers.notify(_this.getVelocity()); + } + // Update render subscribers + if (render) { + _this.renderSubscribers.notify(_this.current); + } + }; + /** + * Schedule a velocity check for the next frame. + * + * This is an instanced and bound function to prevent generating a new + * function once per frame. + * + * @internal + */ + this.scheduleVelocityCheck = function () { return es.postRender(_this.velocityCheck); }; + /** + * Updates `prev` with `current` if the value hasn't been updated this frame. + * This ensures velocity calculations return `0`. + * + * This is an instanced and bound function to prevent generating a new + * function once per frame. + * + * @internal + */ + this.velocityCheck = function (_a) { + var timestamp = _a.timestamp; + if (timestamp !== _this.lastUpdated) { + _this.prev = _this.current; + _this.velocityUpdateSubscribers.notify(_this.getVelocity()); + } + }; + this.hasAnimated = false; + this.prev = this.current = init; + this.canTrackVelocity = isFloat(this.current); + } + /** + * Adds a function that will be notified when the `MotionValue` is updated. + * + * It returns a function that, when called, will cancel the subscription. + * + * When calling `onChange` inside a React component, it should be wrapped with the + * `useEffect` hook. As it returns an unsubscribe function, this should be returned + * from the `useEffect` function to ensure you don't add duplicate subscribers.. + * + * @library + * + * ```jsx + * function MyComponent() { + * const x = useMotionValue(0) + * const y = useMotionValue(0) + * const opacity = useMotionValue(1) + * + * useEffect(() => { + * function updateOpacity() { + * const maxXY = Math.max(x.get(), y.get()) + * const newOpacity = transform(maxXY, [0, 100], [1, 0]) + * opacity.set(newOpacity) + * } + * + * const unsubscribeX = x.onChange(updateOpacity) + * const unsubscribeY = y.onChange(updateOpacity) + * + * return () => { + * unsubscribeX() + * unsubscribeY() + * } + * }, []) + * + * return + * } + * ``` + * + * @motion + * + * ```jsx + * export const MyComponent = () => { + * const x = useMotionValue(0) + * const y = useMotionValue(0) + * const opacity = useMotionValue(1) + * + * useEffect(() => { + * function updateOpacity() { + * const maxXY = Math.max(x.get(), y.get()) + * const newOpacity = transform(maxXY, [0, 100], [1, 0]) + * opacity.set(newOpacity) + * } + * + * const unsubscribeX = x.onChange(updateOpacity) + * const unsubscribeY = y.onChange(updateOpacity) + * + * return () => { + * unsubscribeX() + * unsubscribeY() + * } + * }, []) + * + * return + * } + * ``` + * + * @internalremarks + * + * We could look into a `useOnChange` hook if the above lifecycle management proves confusing. + * + * ```jsx + * useOnChange(x, () => {}) + * ``` + * + * @param subscriber - A function that receives the latest value. + * @returns A function that, when called, will cancel this subscription. + * + * @public + */ + MotionValue.prototype.onChange = function (subscription) { + return this.updateSubscribers.add(subscription); + }; + MotionValue.prototype.clearListeners = function () { + this.updateSubscribers.clear(); + }; + /** + * Adds a function that will be notified when the `MotionValue` requests a render. + * + * @param subscriber - A function that's provided the latest value. + * @returns A function that, when called, will cancel this subscription. + * + * @internal + */ + MotionValue.prototype.onRenderRequest = function (subscription) { + // Render immediately + subscription(this.get()); + return this.renderSubscribers.add(subscription); + }; + /** + * Attaches a passive effect to the `MotionValue`. + * + * @internal + */ + MotionValue.prototype.attach = function (passiveEffect) { + this.passiveEffect = passiveEffect; + }; + /** + * Sets the state of the `MotionValue`. + * + * @remarks + * + * ```jsx + * const x = useMotionValue(0) + * x.set(10) + * ``` + * + * @param latest - Latest value to set. + * @param render - Whether to notify render subscribers. Defaults to `true` + * + * @public + */ + MotionValue.prototype.set = function (v, render) { + if (render === void 0) { render = true; } + if (!render || !this.passiveEffect) { + this.updateAndNotify(v, render); + } + else { + this.passiveEffect(v, this.updateAndNotify); + } + }; + /** + * Returns the latest state of `MotionValue` + * + * @returns - The latest state of `MotionValue` + * + * @public + */ + MotionValue.prototype.get = function () { + return this.current; + }; + /** + * @public + */ + MotionValue.prototype.getPrevious = function () { + return this.prev; + }; + /** + * Returns the latest velocity of `MotionValue` + * + * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical. + * + * @public + */ + MotionValue.prototype.getVelocity = function () { + // This could be isFloat(this.prev) && isFloat(this.current), but that would be wasteful + return this.canTrackVelocity + ? // These casts could be avoided if parseFloat would be typed better + velocityPerSecond(parseFloat(this.current) - + parseFloat(this.prev), this.timeDelta) + : 0; + }; + /** + * Registers a new animation to control this `MotionValue`. Only one + * animation can drive a `MotionValue` at one time. + * + * ```jsx + * value.start() + * ``` + * + * @param animation - A function that starts the provided animation + * + * @internal + */ + MotionValue.prototype.start = function (animation) { + var _this = this; + this.stop(); + return new Promise(function (resolve) { + _this.hasAnimated = true; + _this.stopAnimation = animation(resolve); + }).then(function () { return _this.clearAnimation(); }); + }; + /** + * Stop the currently active animation. + * + * @public + */ + MotionValue.prototype.stop = function () { + if (this.stopAnimation) + this.stopAnimation(); + this.clearAnimation(); + }; + /** + * Returns `true` if this value is currently animating. + * + * @public + */ + MotionValue.prototype.isAnimating = function () { + return !!this.stopAnimation; + }; + MotionValue.prototype.clearAnimation = function () { + this.stopAnimation = null; + }; + /** + * Destroy and clean up subscribers to this `MotionValue`. + * + * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically + * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually + * created a `MotionValue` via the `motionValue` function. + * + * @public + */ + MotionValue.prototype.destroy = function () { + this.updateSubscribers.clear(); + this.renderSubscribers.clear(); + this.stop(); + }; + return MotionValue; +}()); +/** + * @internal + */ +function motionValue(init) { + return new value_MotionValue(init); +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/value-types/test.js +/** + * Tests a provided value against a ValueType + */ +var testValueType = function (v) { return function (type) { return type.test(v); }; }; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.js +/** + * ValueType for "auto" + */ +var auto = { + test: function (v) { return v === "auto"; }, + parse: function (v) { return v; }, +}; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.js + + + + +/** + * A list of value types commonly used for dimensions + */ +var dimensionValueTypes = [numbers_number, px, percent, degrees, vw, vh, auto]; +/** + * Tests a dimensional value against the list of dimension ValueTypes + */ +var findDimensionValueType = function (v) { + return dimensionValueTypes.find(testValueType(v)); +}; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/value-types/find.js + + + + + +/** + * A list of all ValueTypes + */ +var valueTypes = __spreadArray(__spreadArray([], __read(dimensionValueTypes)), [color, complex]); +/** + * Tests a value against the list of ValueTypes + */ +var findValueType = function (v) { return valueTypes.find(testValueType(v)); }; + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/utils/setters.js + + + + + + + + + +/** + * Set VisualElement's MotionValue, creating a new MotionValue for it if + * it doesn't exist. + */ +function setMotionValue(visualElement, key, value) { + if (visualElement.hasValue(key)) { + visualElement.getValue(key).set(value); + } + else { + visualElement.addValue(key, motionValue(value)); + } +} +function setTarget(visualElement, definition) { + var resolved = resolveVariant(visualElement, definition); + var _a = resolved + ? visualElement.makeTargetAnimatable(resolved, false) + : {}, _b = _a.transitionEnd, transitionEnd = _b === void 0 ? {} : _b; _a.transition; var target = __rest(_a, ["transitionEnd", "transition"]); + target = __assign(__assign({}, target), transitionEnd); + for (var key in target) { + var value = resolveFinalValueInKeyframes(target[key]); + setMotionValue(visualElement, key, value); + } +} +function setVariants(visualElement, variantLabels) { + var reversedLabels = __spreadArray([], __read(variantLabels)).reverse(); + reversedLabels.forEach(function (key) { + var _a; + var variant = visualElement.getVariant(key); + variant && setTarget(visualElement, variant); + (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function (child) { + setVariants(child, variantLabels); + }); + }); +} +function setValues(visualElement, definition) { + if (Array.isArray(definition)) { + return setVariants(visualElement, definition); + } + else if (typeof definition === "string") { + return setVariants(visualElement, [definition]); + } + else { + setTarget(visualElement, definition); + } +} +function checkTargetForNewValues(visualElement, target, origin) { + var _a, _b, _c; + var _d; + var newValueKeys = Object.keys(target).filter(function (key) { return !visualElement.hasValue(key); }); + var numNewValues = newValueKeys.length; + if (!numNewValues) + return; + for (var i = 0; i < numNewValues; i++) { + var key = newValueKeys[i]; + var targetValue = target[key]; + var value = null; + /** + * If the target is a series of keyframes, we can use the first value + * in the array. If this first value is null, we'll still need to read from the DOM. + */ + if (Array.isArray(targetValue)) { + value = targetValue[0]; + } + /** + * If the target isn't keyframes, or the first keyframe was null, we need to + * first check if an origin value was explicitly defined in the transition as "from", + * if not read the value from the DOM. As an absolute fallback, take the defined target value. + */ + if (value === null) { + value = (_b = (_a = origin[key]) !== null && _a !== void 0 ? _a : visualElement.readValue(key)) !== null && _b !== void 0 ? _b : target[key]; + } + /** + * If value is still undefined or null, ignore it. Preferably this would throw, + * but this was causing issues in Framer. + */ + if (value === undefined || value === null) + continue; + if (typeof value === "string" && isNumericalString(value)) { + // If this is a number read as a string, ie "0" or "200", convert it to a number + value = parseFloat(value); + } + else if (!findValueType(value) && complex.test(targetValue)) { + value = animatable_none_getAnimatableNone(key, targetValue); + } + visualElement.addValue(key, motionValue(value)); + (_c = (_d = origin)[key]) !== null && _c !== void 0 ? _c : (_d[key] = value); + visualElement.setBaseTarget(key, value); + } +} +function getOriginFromTransition(key, transition) { + if (!transition) + return; + var valueTransition = transition[key] || transition["default"] || transition; + return valueTransition.from; +} +function getOrigin(target, transition, visualElement) { + var _a, _b; + var origin = {}; + for (var key in target) { + origin[key] = + (_a = getOriginFromTransition(key, transition)) !== null && _a !== void 0 ? _a : (_b = visualElement.getValue(key)) === null || _b === void 0 ? void 0 : _b.get(); + } + return origin; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/utils/animation.js + + + + + +/** + * @internal + */ +function animateVisualElement(visualElement, definition, options) { + if (options === void 0) { options = {}; } + visualElement.notifyAnimationStart(); + var animation; + if (Array.isArray(definition)) { + var animations = definition.map(function (variant) { + return animateVariant(visualElement, variant, options); + }); + animation = Promise.all(animations); + } + else if (typeof definition === "string") { + animation = animateVariant(visualElement, definition, options); + } + else { + var resolvedDefinition = typeof definition === "function" + ? resolveVariant(visualElement, definition, options.custom) + : definition; + animation = animateTarget(visualElement, resolvedDefinition, options); + } + return animation.then(function () { + return visualElement.notifyAnimationComplete(definition); + }); +} +function animateVariant(visualElement, variant, options) { + var _a; + if (options === void 0) { options = {}; } + var resolved = resolveVariant(visualElement, variant, options.custom); + var _b = (resolved || {}).transition, transition = _b === void 0 ? visualElement.getDefaultTransition() || {} : _b; + if (options.transitionOverride) { + transition = options.transitionOverride; + } + /** + * If we have a variant, create a callback that runs it as an animation. + * Otherwise, we resolve a Promise immediately for a composable no-op. + */ + var getAnimation = resolved + ? function () { return animateTarget(visualElement, resolved, options); } + : function () { return Promise.resolve(); }; + /** + * If we have children, create a callback that runs all their animations. + * Otherwise, we resolve a Promise immediately for a composable no-op. + */ + var getChildAnimations = ((_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.size) + ? function (forwardDelay) { + if (forwardDelay === void 0) { forwardDelay = 0; } + var _a = transition.delayChildren, delayChildren = _a === void 0 ? 0 : _a, staggerChildren = transition.staggerChildren, staggerDirection = transition.staggerDirection; + return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options); + } + : function () { return Promise.resolve(); }; + /** + * If the transition explicitly defines a "when" option, we need to resolve either + * this animation or all children animations before playing the other. + */ + var when = transition.when; + if (when) { + var _c = __read(when === "beforeChildren" + ? [getAnimation, getChildAnimations] + : [getChildAnimations, getAnimation], 2), first = _c[0], last = _c[1]; + return first().then(last); + } + else { + return Promise.all([getAnimation(), getChildAnimations(options.delay)]); + } +} +/** + * @internal + */ +function animateTarget(visualElement, definition, _a) { + var _b; + var _c = _a === void 0 ? {} : _a, _d = _c.delay, delay = _d === void 0 ? 0 : _d, transitionOverride = _c.transitionOverride, type = _c.type; + var _e = visualElement.makeTargetAnimatable(definition), _f = _e.transition, transition = _f === void 0 ? visualElement.getDefaultTransition() : _f, transitionEnd = _e.transitionEnd, target = __rest(_e, ["transition", "transitionEnd"]); + if (transitionOverride) + transition = transitionOverride; + var animations = []; + var animationTypeState = type && ((_b = visualElement.animationState) === null || _b === void 0 ? void 0 : _b.getState()[type]); + for (var key in target) { + var value = visualElement.getValue(key); + var valueTarget = target[key]; + if (!value || + valueTarget === undefined || + (animationTypeState && + shouldBlockAnimation(animationTypeState, key))) { + continue; + } + var animation = transitions_startAnimation(key, value, valueTarget, __assign({ delay: delay }, transition)); + animations.push(animation); + } + return Promise.all(animations).then(function () { + transitionEnd && setTarget(visualElement, transitionEnd); + }); +} +function animateChildren(visualElement, variant, delayChildren, staggerChildren, staggerDirection, options) { + if (delayChildren === void 0) { delayChildren = 0; } + if (staggerChildren === void 0) { staggerChildren = 0; } + if (staggerDirection === void 0) { staggerDirection = 1; } + var animations = []; + var maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren; + var generateStaggerDuration = staggerDirection === 1 + ? function (i) { + if (i === void 0) { i = 0; } + return i * staggerChildren; + } + : function (i) { + if (i === void 0) { i = 0; } + return maxStaggerDuration - i * staggerChildren; + }; + Array.from(visualElement.variantChildren) + .sort(sortByTreeOrder) + .forEach(function (child, i) { + animations.push(animateVariant(child, variant, __assign(__assign({}, options), { delay: delayChildren + generateStaggerDuration(i) })).then(function () { return child.notifyAnimationComplete(variant); })); + }); + return Promise.all(animations); +} +function stopAnimation(visualElement) { + visualElement.forEachValue(function (value) { return value.stop(); }); +} +function sortByTreeOrder(a, b) { + return a.sortNodePosition(b); +} +/** + * Decide whether we should block this animation. Previously, we achieved this + * just by checking whether the key was listed in protectedKeys, but this + * posed problems if an animation was triggered by afterChildren and protectedKeys + * had been set to true in the meantime. + */ +function shouldBlockAnimation(_a, key) { + var protectedKeys = _a.protectedKeys, needsAnimating = _a.needsAnimating; + var shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true; + needsAnimating[key] = false; + return shouldBlock; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/utils/animation-state.js + + + + + + + + +var variantPriorityOrder = [ + AnimationType.Animate, + AnimationType.Hover, + AnimationType.Tap, + AnimationType.Drag, + AnimationType.Focus, + AnimationType.Exit, +]; +var reversePriorityOrder = __spreadArray([], __read(variantPriorityOrder)).reverse(); +var numAnimationTypes = variantPriorityOrder.length; +function animateList(visualElement) { + return function (animations) { + return Promise.all(animations.map(function (_a) { + var animation = _a.animation, options = _a.options; + return animateVisualElement(visualElement, animation, options); + })); + }; +} +function createAnimationState(visualElement) { + var animate = animateList(visualElement); + var state = createState(); + var allAnimatedKeys = {}; + var isInitialRender = true; + /** + * This function will be used to reduce the animation definitions for + * each active animation type into an object of resolved values for it. + */ + var buildResolvedTypeValues = function (acc, definition) { + var resolved = resolveVariant(visualElement, definition); + if (resolved) { + resolved.transition; var transitionEnd = resolved.transitionEnd, target = __rest(resolved, ["transition", "transitionEnd"]); + acc = __assign(__assign(__assign({}, acc), target), transitionEnd); + } + return acc; + }; + function isAnimated(key) { + return allAnimatedKeys[key] !== undefined; + } + /** + * This just allows us to inject mocked animation functions + * @internal + */ + function setAnimateFunction(makeAnimator) { + animate = makeAnimator(visualElement); + } + /** + * When we receive new props, we need to: + * 1. Create a list of protected keys for each type. This is a directory of + * value keys that are currently being "handled" by types of a higher priority + * so that whenever an animation is played of a given type, these values are + * protected from being animated. + * 2. Determine if an animation type needs animating. + * 3. Determine if any values have been removed from a type and figure out + * what to animate those to. + */ + function animateChanges(options, changedActiveType) { + var _a; + var props = visualElement.getProps(); + var context = visualElement.getVariantContext(true) || {}; + /** + * A list of animations that we'll build into as we iterate through the animation + * types. This will get executed at the end of the function. + */ + var animations = []; + /** + * Keep track of which values have been removed. Then, as we hit lower priority + * animation types, we can check if they contain removed values and animate to that. + */ + var removedKeys = new Set(); + /** + * A dictionary of all encountered keys. This is an object to let us build into and + * copy it without iteration. Each time we hit an animation type we set its protected + * keys - the keys its not allowed to animate - to the latest version of this object. + */ + var encounteredKeys = {}; + /** + * If a variant has been removed at a given index, and this component is controlling + * variant animations, we want to ensure lower-priority variants are forced to animate. + */ + var removedVariantIndex = Infinity; + var _loop_1 = function (i) { + var type = reversePriorityOrder[i]; + var typeState = state[type]; + var prop = (_a = props[type]) !== null && _a !== void 0 ? _a : context[type]; + var propIsVariant = isVariantLabel(prop); + /** + * If this type has *just* changed isActive status, set activeDelta + * to that status. Otherwise set to null. + */ + var activeDelta = type === changedActiveType ? typeState.isActive : null; + if (activeDelta === false) + removedVariantIndex = i; + /** + * If this prop is an inherited variant, rather than been set directly on the + * component itself, we want to make sure we allow the parent to trigger animations. + * + * TODO: Can probably change this to a !isControllingVariants check + */ + var isInherited = prop === context[type] && prop !== props[type] && propIsVariant; + /** + * + */ + if (isInherited && + isInitialRender && + visualElement.manuallyAnimateOnMount) { + isInherited = false; + } + /** + * Set all encountered keys so far as the protected keys for this type. This will + * be any key that has been animated or otherwise handled by active, higher-priortiy types. + */ + typeState.protectedKeys = __assign({}, encounteredKeys); + // Check if we can skip analysing this prop early + if ( + // If it isn't active and hasn't *just* been set as inactive + (!typeState.isActive && activeDelta === null) || + // If we didn't and don't have any defined prop for this animation type + (!prop && !typeState.prevProp) || + // Or if the prop doesn't define an animation + isAnimationControls(prop) || + typeof prop === "boolean") { + return "continue"; + } + /** + * As we go look through the values defined on this type, if we detect + * a changed value or a value that was removed in a higher priority, we set + * this to true and add this prop to the animation list. + */ + var shouldAnimateType = variantsHaveChanged(typeState.prevProp, prop) || + // If we're making this variant active, we want to always make it active + (type === changedActiveType && + typeState.isActive && + !isInherited && + propIsVariant) || + // If we removed a higher-priority variant (i is in reverse order) + (i > removedVariantIndex && propIsVariant); + /** + * As animations can be set as variant lists, variants or target objects, we + * coerce everything to an array if it isn't one already + */ + var definitionList = Array.isArray(prop) ? prop : [prop]; + /** + * Build an object of all the resolved values. We'll use this in the subsequent + * animateChanges calls to determine whether a value has changed. + */ + var resolvedValues = definitionList.reduce(buildResolvedTypeValues, {}); + if (activeDelta === false) + resolvedValues = {}; + /** + * Now we need to loop through all the keys in the prev prop and this prop, + * and decide: + * 1. If the value has changed, and needs animating + * 2. If it has been removed, and needs adding to the removedKeys set + * 3. If it has been removed in a higher priority type and needs animating + * 4. If it hasn't been removed in a higher priority but hasn't changed, and + * needs adding to the type's protectedKeys list. + */ + var _b = typeState.prevResolvedValues, prevResolvedValues = _b === void 0 ? {} : _b; + var allKeys = __assign(__assign({}, prevResolvedValues), resolvedValues); + var markToAnimate = function (key) { + shouldAnimateType = true; + removedKeys.delete(key); + typeState.needsAnimating[key] = true; + }; + for (var key in allKeys) { + var next = resolvedValues[key]; + var prev = prevResolvedValues[key]; + // If we've already handled this we can just skip ahead + if (encounteredKeys.hasOwnProperty(key)) + continue; + /** + * If the value has changed, we probably want to animate it. + */ + if (next !== prev) { + /** + * If both values are keyframes, we need to shallow compare them to + * detect whether any value has changed. If it has, we animate it. + */ + if (isKeyframesTarget(next) && isKeyframesTarget(prev)) { + if (!shallowCompare(next, prev)) { + markToAnimate(key); + } + else { + /** + * If it hasn't changed, we want to ensure it doesn't animate by + * adding it to the list of protected keys. + */ + typeState.protectedKeys[key] = true; + } + } + else if (next !== undefined) { + // If next is defined and doesn't equal prev, it needs animating + markToAnimate(key); + } + else { + // If it's undefined, it's been removed. + removedKeys.add(key); + } + } + else if (next !== undefined && removedKeys.has(key)) { + /** + * If next hasn't changed and it isn't undefined, we want to check if it's + * been removed by a higher priority + */ + markToAnimate(key); + } + else { + /** + * If it hasn't changed, we add it to the list of protected values + * to ensure it doesn't get animated. + */ + typeState.protectedKeys[key] = true; + } + } + /** + * Update the typeState so next time animateChanges is called we can compare the + * latest prop and resolvedValues to these. + */ + typeState.prevProp = prop; + typeState.prevResolvedValues = resolvedValues; + /** + * + */ + if (typeState.isActive) { + encounteredKeys = __assign(__assign({}, encounteredKeys), resolvedValues); + } + if (isInitialRender && visualElement.blockInitialAnimation) { + shouldAnimateType = false; + } + /** + * If this is an inherited prop we want to hard-block animations + * TODO: Test as this should probably still handle animations triggered + * by removed values? + */ + if (shouldAnimateType && !isInherited) { + animations.push.apply(animations, __spreadArray([], __read(definitionList.map(function (animation) { return ({ + animation: animation, + options: __assign({ type: type }, options), + }); })))); + } + }; + /** + * Iterate through all animation types in reverse priority order. For each, we want to + * detect which values it's handling and whether or not they've changed (and therefore + * need to be animated). If any values have been removed, we want to detect those in + * lower priority props and flag for animation. + */ + for (var i = 0; i < numAnimationTypes; i++) { + _loop_1(i); + } + allAnimatedKeys = __assign({}, encounteredKeys); + /** + * If there are some removed value that haven't been dealt with, + * we need to create a new animation that falls back either to the value + * defined in the style prop, or the last read value. + */ + if (removedKeys.size) { + var fallbackAnimation_1 = {}; + removedKeys.forEach(function (key) { + var fallbackTarget = visualElement.getBaseTarget(key); + if (fallbackTarget !== undefined) { + fallbackAnimation_1[key] = fallbackTarget; + } + }); + animations.push({ animation: fallbackAnimation_1 }); + } + var shouldAnimate = Boolean(animations.length); + if (isInitialRender && + props.initial === false && + !visualElement.manuallyAnimateOnMount) { + shouldAnimate = false; + } + isInitialRender = false; + return shouldAnimate ? animate(animations) : Promise.resolve(); + } + /** + * Change whether a certain animation type is active. + */ + function setActive(type, isActive, options) { + var _a; + // If the active state hasn't changed, we can safely do nothing here + if (state[type].isActive === isActive) + return Promise.resolve(); + // Propagate active change to children + (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function (child) { var _a; return (_a = child.animationState) === null || _a === void 0 ? void 0 : _a.setActive(type, isActive); }); + state[type].isActive = isActive; + return animateChanges(options, type); + } + return { + isAnimated: isAnimated, + animateChanges: animateChanges, + setActive: setActive, + setAnimateFunction: setAnimateFunction, + getState: function () { return state; }, + }; +} +function variantsHaveChanged(prev, next) { + if (typeof next === "string") { + return next !== prev; + } + else if (isVariantLabels(next)) { + return !shallowCompare(next, prev); + } + return false; +} +function createTypeState(isActive) { + if (isActive === void 0) { isActive = false; } + return { + isActive: isActive, + protectedKeys: {}, + needsAnimating: {}, + prevResolvedValues: {}, + }; +} +function createState() { + var _a; + return _a = {}, + _a[AnimationType.Animate] = createTypeState(true), + _a[AnimationType.Hover] = createTypeState(), + _a[AnimationType.Tap] = createTypeState(), + _a[AnimationType.Drag] = createTypeState(), + _a[AnimationType.Focus] = createTypeState(), + _a[AnimationType.Exit] = createTypeState(), + _a; +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/features/animations.js + + + + + + + + + +var animations_animations = { + animation: makeRenderlessComponent(function (_a) { + var visualElement = _a.visualElement, animate = _a.animate; + /** + * We dynamically generate the AnimationState manager as it contains a reference + * to the underlying animation library. We only want to load that if we load this, + * so people can optionally code split it out using the `m` component. + */ + visualElement.animationState || (visualElement.animationState = createAnimationState(visualElement)); + /** + * Subscribe any provided AnimationControls to the component's VisualElement + */ + if (isAnimationControls(animate)) { + Object(external_React_["useEffect"])(function () { return animate.subscribe(visualElement); }, [animate]); + } + }), + exit: makeRenderlessComponent(function (props) { + var custom = props.custom, visualElement = props.visualElement; + var _a = __read(usePresence(), 2), isPresent = _a[0], onExitComplete = _a[1]; + var presenceContext = Object(external_React_["useContext"])(PresenceContext); + Object(external_React_["useEffect"])(function () { + var _a, _b; + var animation = (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Exit, !isPresent, { custom: (_b = presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.custom) !== null && _b !== void 0 ? _b : custom }); + !isPresent && (animation === null || animation === void 0 ? void 0 : animation.then(onExitComplete)); + }, [isPresent]); + }), +}; + + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/is-point.js +var isPoint = function (point) { + return point.hasOwnProperty('x') && point.hasOwnProperty('y'); +}; + + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/is-point-3d.js + + +var isPoint3D = function (point) { + return isPoint(point) && point.hasOwnProperty('z'); +}; + + + +// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/distance.js + + + + +var distance1D = function (a, b) { return Math.abs(a - b); }; +function distance(a, b) { + if (isNum(a) && isNum(b)) { + return distance1D(a, b); + } + else if (isPoint(a) && isPoint(b)) { + var xDelta = distance1D(a.x, b.x); + var yDelta = distance1D(a.y, b.y); + var zDelta = isPoint3D(a) && isPoint3D(b) ? distance1D(a.z, b.z) : 0; + return Math.sqrt(Math.pow(xDelta, 2) + Math.pow(yDelta, 2) + Math.pow(zDelta, 2)); + } +} + + + +// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/gestures/PanSession.js + + + + + + + + +/** + * @internal + */ +var PanSession_PanSession = /** @class */ (function () { + function PanSession(event, handlers, _a) { + var _this = this; + var _b = _a === void 0 ? {} : _a, transformPagePoint = _b.transformPagePoint; + /** + * @internal + */ + this.startEvent = null; + /** + * @internal + */ + this.lastMoveEvent = null; + /** + * @internal + */ + this.lastMoveEventInfo = null; + /** + * @internal + */ + this.handlers = {}; + this.updatePoint = function () { + if (!(_this.lastMoveEvent && _this.lastMoveEventInfo)) + return; + var info = getPanInfo(_this.lastMoveEventInfo, _this.history); + var isPanStarted = _this.startEvent !== null; + // Only start panning if the offset is larger than 3 pixels. If we make it + // any larger than this we'll want to reset the pointer history + // on the first update to avoid visual snapping to the cursoe. + var isDistancePastThreshold = distance(info.offset, { x: 0, y: 0 }) >= 3; + if (!isPanStarted && !isDistancePastThreshold) + return; + var point = info.point; + var timestamp = getFrameData().timestamp; + _this.history.push(__assign(__assign({}, point), { timestamp: timestamp })); + var _a = _this.handlers, onStart = _a.onStart, onMove = _a.onMove; + if (!isPanStarted) { + onStart && onStart(_this.lastMoveEvent, info); + _this.startEvent = _this.lastMoveEvent; + } + onMove && onMove(_this.lastMoveEvent, info); + }; + this.handlePointerMove = function (event, info) { + _this.lastMoveEvent = event; + _this.lastMoveEventInfo = PanSession_transformPoint(info, _this.transformPagePoint); + // Because Safari doesn't trigger mouseup events when it's above a `