PluginProbe
Gutenberg / 23.2.1
Gutenberg v23.2.1
23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 7.4.0 All 402 releases
gutenberg / build / scripts / editor / index.min.js

index.min.js in Gutenberg 23.2.1, at build/scripts/editor/index.min.js

515 lines 1.2 MB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 "use strict";var wp;(wp||={}).editor=(()=>{var l_e=Object.create;var UC=Object.defineProperty;var c_e=Object.getOwnPropertyDescriptor;var u_e=Object.getOwnPropertyNames;var d_e=Object.getPrototypeOf,f_e=Object.prototype.hasOwnProperty;var is=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ve=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Jn=(e,t)=>{for(var r in t)UC(e,r,{get:t[r],enumerable:!0})},sz=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of u_e(t))!f_e.call(e,n)&&n!==r&&UC(e,n,{get:()=>t[n],enumerable:!(o=c_e(t,n))||o.enumerable});return e};var s=(e,t,r)=>(r=e!=null?l_e(d_e(e)):{},sz(t||!e||!e.__esModule?UC(r,"default",{value:e,enumerable:!0}):r,e)),m_e=e=>sz(UC({},"__esModule",{value:!0}),e);var U=Ve((GWe,az)=>{az.exports=window.wp.data});var Q=Ve((WWe,lz)=>{lz.exports=window.wp.coreData});var V=Ve((YWe,cz)=>{cz.exports=window.wp.element});var we=Ve((qWe,uz)=>{uz.exports=window.wp.compose});var tn=Ve((KWe,dz)=>{dz.exports=window.wp.hooks});var ce=Ve((ZWe,fz)=>{fz.exports=window.wp.blockEditor});var lt=Ve((tYe,bz)=>{bz.exports=window.wp.blocks});var go=Ve((rYe,wz)=>{wz.exports=window.wp.date});var vo=Ve((oYe,Sz)=>{Sz.exports=window.wp.url});var ya=Ve((nYe,_z)=>{_z.exports=window.wp.deprecated});var vt=Ve((iYe,xz)=>{xz.exports=window.wp.preferences});var he=Ve((lYe,kz)=>{kz.exports=window.wp.primitives});var x=Ve((cYe,Rz)=>{Rz.exports=window.ReactJSXRuntime});var th=Ve((OZe,Az)=>{Az.exports=window.wp.privateApis});var Wv=Ve((HZe,Gz)=>{Gz.exports=window.wp.a11y});var If=Ve((UZe,Wz)=>{Wz.exports=window.wp.apiFetch});var wt=Ve((GZe,Yz)=>{Yz.exports=window.wp.notices});var N=Ve((WZe,qz)=>{qz.exports=window.wp.i18n});var St=Ve((JZe,tH)=>{tH.exports=window.wp.htmlEntities});var oH=Ve((tXe,rH)=>{"use strict";rH.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}});var rh=Ve((uXe,cH)=>{cH.exports=window.wp.mediaUtils});var jF=Ve((dXe,uH)=>{uH.exports=window.wp.uploadMedia});var H=Ve((CXe,_H)=>{_H.exports=window.wp.components});var Sl=Ve((eQe,HH)=>{HH.exports=window.wp.patterns});var DS=Ve((lQe,qH)=>{qH.exports=window.wp.blob});var Ye=Ve((cQe,KH)=>{KH.exports=window.React});var YP=Ve((qQe,yU)=>{yU.exports=window.ReactDOM});var LU=Ve(DU=>{"use strict";var $v=Ye();function LPe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var BPe=typeof Object.is=="function"?Object.is:LPe,VPe=$v.useState,jPe=$v.useEffect,zPe=$v.useLayoutEffect,HPe=$v.useDebugValue;function UPe(e,t){var r=t(),o=VPe({inst:{value:r,getSnapshot:t}}),n=o[0].inst,i=o[1];return zPe(function(){n.value=r,n.getSnapshot=t,d4(n)&&i({inst:n})},[e,r,t]),jPe(function(){return d4(n)&&i({inst:n}),e(function(){d4(n)&&i({inst:n})})},[e]),HPe(r),r}function d4(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!BPe(e,r)}catch{return!0}}function GPe(e,t){return t()}var WPe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?GPe:UPe;DU.useSyncExternalStore=$v.useSyncExternalStore!==void 0?$v.useSyncExternalStore:WPe});var VU=Ve((r$e,BU)=>{"use strict";BU.exports=LU()});var c_=Ve((qtt,FE)=>{var ZW={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u1EA4:"A",\u1EAE:"A",\u1EB2:"A",\u1EB4:"A",\u1EB6:"A",\u00C6:"AE",\u1EA6:"A",\u1EB0:"A",\u0202:"A",\u1EA2:"A",\u1EA0:"A",\u1EA8:"A",\u1EAA:"A",\u1EAC:"A",\u00C7:"C",\u1E08:"C",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u1EBE:"E",\u1E16:"E",\u1EC0:"E",\u1E14:"E",\u1E1C:"E",\u0206:"E",\u1EBA:"E",\u1EBC:"E",\u1EB8:"E",\u1EC2:"E",\u1EC4:"E",\u1EC6:"E",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u1E2E:"I",\u020A:"I",\u1EC8:"I",\u1ECA:"I",\u00D0:"D",\u00D1:"N",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u1ED0:"O",\u1E4C:"O",\u1E52:"O",\u020E:"O",\u1ECE:"O",\u1ECC:"O",\u1ED4:"O",\u1ED6:"O",\u1ED8:"O",\u1EDC:"O",\u1EDE:"O",\u1EE0:"O",\u1EDA:"O",\u1EE2:"O",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u1EE6:"U",\u1EE4:"U",\u1EEC:"U",\u1EEE:"U",\u1EF0:"U",\u00DD:"Y",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u1EA5:"a",\u1EAF:"a",\u1EB3:"a",\u1EB5:"a",\u1EB7:"a",\u00E6:"ae",\u1EA7:"a",\u1EB1:"a",\u0203:"a",\u1EA3:"a",\u1EA1:"a",\u1EA9:"a",\u1EAB:"a",\u1EAD:"a",\u00E7:"c",\u1E09:"c",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u1EBF:"e",\u1E17:"e",\u1EC1:"e",\u1E15:"e",\u1E1D:"e",\u0207:"e",\u1EBB:"e",\u1EBD:"e",\u1EB9:"e",\u1EC3:"e",\u1EC5:"e",\u1EC7:"e",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u1E2F:"i",\u020B:"i",\u1EC9:"i",\u1ECB:"i",\u00F0:"d",\u00F1:"n",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u1ED1:"o",\u1E4D:"o",\u1E53:"o",\u020F:"o",\u1ECF:"o",\u1ECD:"o",\u1ED5:"o",\u1ED7:"o",\u1ED9:"o",\u1EDD:"o",\u1EDF:"o",\u1EE1:"o",\u1EDB:"o",\u1EE3:"o",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u1EE7:"u",\u1EE5:"u",\u1EED:"u",\u1EEF:"u",\u1EF1:"u",\u00FD:"y",\u00FF:"y",\u0100:"A",\u0101:"a",\u0102:"A",\u0103:"a",\u0104:"A",\u0105:"a",\u0106:"C",\u0107:"c",\u0108:"C",\u0109:"c",\u010A:"C",\u010B:"c",\u010C:"C",\u010D:"c",C\u0306:"C",c\u0306:"c",\u010E:"D",\u010F:"d",\u0110:"D",\u0111:"d",\u0112:"E",\u0113:"e",\u0114:"E",\u0115:"e",\u0116:"E",\u0117:"e",\u0118:"E",\u0119:"e",\u011A:"E",\u011B:"e",\u011C:"G",\u01F4:"G",\u011D:"g",\u01F5:"g",\u011E:"G",\u011F:"g",\u0120:"G",\u0121:"g",\u0122:"G",\u0123:"g",\u0124:"H",\u0125:"h",\u0126:"H",\u0127:"h",\u1E2A:"H",\u1E2B:"h",\u0128:"I",\u0129:"i",\u012A:"I",\u012B:"i",\u012C:"I",\u012D:"i",\u012E:"I",\u012F:"i",\u0130:"I",\u0131:"i",\u0132:"IJ",\u0133:"ij",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u1E30:"K",\u1E31:"k",K\u0306:"K",k\u0306:"k",\u0139:"L",\u013A:"l",\u013B:"L",\u013C:"l",\u013D:"L",\u013E:"l",\u013F:"L",\u0140:"l",\u0141:"l",\u0142:"l",\u1E3E:"M",\u1E3F:"m",M\u0306:"M",m\u0306:"m",\u0143:"N",\u0144:"n",\u0145:"N",\u0146:"n",\u0147:"N",\u0148:"n",\u0149:"n",N\u0306:"N",n\u0306:"n",\u014C:"O",\u014D:"o",\u014E:"O",\u014F:"o",\u0150:"O",\u0151:"o",\u0152:"OE",\u0153:"oe",P\u0306:"P",p\u0306:"p",\u0154:"R",\u0155:"r",\u0156:"R",\u0157:"r",\u0158:"R",\u0159:"r",R\u0306:"R",r\u0306:"r",\u0212:"R",\u0213:"r",\u015A:"S",\u015B:"s",\u015C:"S",\u015D:"s",\u015E:"S",\u0218:"S",\u0219:"s",\u015F:"s",\u0160:"S",\u0161:"s",\u0162:"T",\u0163:"t",\u021B:"t",\u021A:"T",\u0164:"T",\u0165:"t",\u0166:"T",\u0167:"t",T\u0306:"T",t\u0306:"t",\u0168:"U",\u0169:"u",\u016A:"U",\u016B:"u",\u016C:"U",\u016D:"u",\u016E:"U",\u016F:"u",\u0170:"U",\u0171:"u",\u0172:"U",\u0173:"u",\u0216:"U",\u0217:"u",V\u0306:"V",v\u0306:"v",\u0174:"W",\u0175:"w",\u1E82:"W",\u1E83:"w",X\u0306:"X",x\u0306:"x",\u0176:"Y",\u0177:"y",\u0178:"Y",Y\u0306:"Y",y\u0306:"y",\u0179:"Z",\u017A:"z",\u017B:"Z",\u017C:"z",\u017D:"Z",\u017E:"z",\u017F:"s",\u0192:"f",\u01A0:"O",\u01A1:"o",\u01AF:"U",\u01B0:"u",\u01CD:"A",\u01CE:"a",\u01CF:"I",\u01D0:"i",\u01D1:"O",\u01D2:"o",\u01D3:"U",\u01D4:"u",\u01D5:"U",\u01D6:"u",\u01D7:"U",\u01D8:"u",\u01D9:"U",\u01DA:"u",\u01DB:"U",\u01DC:"u",\u1EE8:"U",\u1EE9:"u",\u1E78:"U",\u1E79:"u",\u01FA:"A",\u01FB:"a",\u01FC:"AE",\u01FD:"ae",\u01FE:"O",\u01FF:"o",\u00DE:"TH",\u00FE:"th",\u1E54:"P",\u1E55:"p",\u1E64:"S",\u1E65:"s",X\u0301:"X",x\u0301:"x",\u0403:"\u0413",\u0453:"\u0433",\u040C:"\u041A",\u045C:"\u043A",A\u030B:"A",a\u030B:"a",E\u030B:"E",e\u030B:"e",I\u030B:"I",i\u030B:"i",\u01F8:"N",\u01F9:"n",\u1ED2:"O",\u1ED3:"o",\u1E50:"O",\u1E51:"o",\u1EEA:"U",\u1EEB:"u",\u1E80:"W",\u1E81:"w",\u1EF2:"Y",\u1EF3:"y",\u0200:"A",\u0201:"a",\u0204:"E",\u0205:"e",\u0208:"I",\u0209:"i",\u020C:"O",\u020D:"o",\u0210:"R",\u0211:"r",\u0214:"U",\u0215:"u",B\u030C:"B",b\u030C:"b",\u010C\u0323:"C",\u010D\u0323:"c",\u00CA\u030C:"E",\u00EA\u030C:"e",F\u030C:"F",f\u030C:"f",\u01E6:"G",\u01E7:"g",\u021E:"H",\u021F:"h",J\u030C:"J",\u01F0:"j",\u01E8:"K",\u01E9:"k",M\u030C:"M",m\u030C:"m",P\u030C:"P",p\u030C:"p",Q\u030C:"Q",q\u030C:"q",\u0158\u0329:"R",\u0159\u0329:"r",\u1E66:"S",\u1E67:"s",V\u030C:"V",v\u030C:"v",W\u030C:"W",w\u030C:"w",X\u030C:"X",x\u030C:"x",Y\u030C:"Y",y\u030C:"y",A\u0327:"A",a\u0327:"a",B\u0327:"B",b\u0327:"b",\u1E10:"D",\u1E11:"d",\u0228:"E",\u0229:"e",\u0190\u0327:"E",\u025B\u0327:"e",\u1E28:"H",\u1E29:"h",I\u0327:"I",i\u0327:"i",\u0197\u0327:"I",\u0268\u0327:"i",M\u0327:"M",m\u0327:"m",O\u0327:"O",o\u0327:"o",Q\u0327:"Q",q\u0327:"q",U\u0327:"U",u\u0327:"u",X\u0327:"X",x\u0327:"x",Z\u0327:"Z",z\u0327:"z",\u0439:"\u0438",\u0419:"\u0418",\u0451:"\u0435",\u0401:"\u0415"},XW=Object.keys(ZW).join("|"),Z2e=new RegExp(XW,"g"),X2e=new RegExp(XW,"");function Q2e(e){return ZW[e]}var QW=function(e){return e.replace(Z2e,Q2e)},J2e=function(e){return!!e.match(X2e)};FE.exports=QW;FE.exports.has=J2e;FE.exports.remove=QW});var wy=Ve((Ert,RY)=>{RY.exports=window.wp.wordcount});var Wr=Ve((mit,FK)=>{FK.exports=window.wp.keycodes});var K2=Ve(($ft,SQ)=>{"use strict";SQ.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;for(n of t.entries())if(!e(n[1],r.get(n[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(t[n]!==r[n])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}});var oV=Ve((wgt,EJ)=>{EJ.exports=window.wp.warning});var Yk=Ve((Wwt,Pee)=>{"use strict";var cNe=function(t){return uNe(t)&&!dNe(t)};function uNe(e){return!!e&&typeof e=="object"}function dNe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||pNe(e)}var fNe=typeof Symbol=="function"&&Symbol.for,mNe=fNe?Symbol.for("react.element"):60103;function pNe(e){return e.$$typeof===mNe}function hNe(e){return Array.isArray(e)?[]:{}}function s1(e,t){return t.clone!==!1&&t.isMergeableObject(e)?ub(hNe(e),e,t):e}function gNe(e,t,r){return e.concat(t).map(function(o){return s1(o,r)})}function vNe(e,t){if(!t.customMerge)return ub;var r=t.customMerge(e);return typeof r=="function"?r:ub}function yNe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Cee(e){return Object.keys(e).concat(yNe(e))}function Tee(e,t){try{return t in e}catch{return!1}}function bNe(e,t){return Tee(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function wNe(e,t,r){var o={};return r.isMergeableObject(e)&&Cee(e).forEach(function(n){o[n]=s1(e[n],r)}),Cee(t).forEach(function(n){bNe(e,n)||(Tee(e,n)&&r.isMergeableObject(t[n])?o[n]=vNe(n,r)(e[n],t[n],r):o[n]=s1(t[n],r))}),o}function ub(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||gNe,r.isMergeableObject=r.isMergeableObject||cNe,r.cloneUnlessOtherwiseSpecified=s1;var o=Array.isArray(t),n=Array.isArray(e),i=o===n;return i?o?r.arrayMerge(e,t,r):wNe(e,t,r):s1(t,r)}ub.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(o,n){return ub(o,n,r)},{})};var SNe=ub;Pee.exports=SNe});var ate=Ve((R_t,ste)=>{ste.exports=window.wp.viewport});var Am=Ve((A_t,lte)=>{lte.exports=window.wp.plugins});var ZV=Ve((YCt,Jre)=>{Jre.exports=window.wp.styleEngine});var a8=Ve(s8=>{"use strict";Object.defineProperty(s8,"__esModule",{value:!0});s8.default=Doe;function Doe(){}Doe.prototype={diff:function(t,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=o.callback;typeof o=="function"&&(n=o,o={}),this.options=o;var i=this;function a(v){return n?(setTimeout(function(){n(void 0,v)},0),!0):v}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var l=r.length,c=t.length,u=1,d=l+c,f=[{newPos:-1,components:[]}],m=this.extractCommon(f[0],r,t,0);if(f[0].newPos+1>=l&&m+1>=c)return a([{value:this.join(r),count:r.length}]);function h(){for(var v=-1*u;v<=u;v+=2){var y=void 0,b=f[v-1],S=f[v+1],w=(S?S.newPos:0)-v;b&&(f[v-1]=void 0);var _=b&&b.newPos+1<l,C=S&&0<=w&&w<c;if(!_&&!C){f[v]=void 0;continue}if(!_||C&&b.newPos<S.newPos?(y=RFe(S),i.pushComponent(y.components,void 0,!0)):(y=b,y.newPos++,i.pushComponent(y.components,!0,void 0)),w=i.extractCommon(y,r,t,v),y.newPos+1>=l&&w+1>=c)return a(kFe(i,y.components,r,t,i.useLongestToken));f[v]=y}u++}if(n)(function v(){setTimeout(function(){if(u>d)return n();h()||v()},0)})();else for(;u<=d;){var g=h();if(g)return g}},pushComponent:function(t,r,o){var n=t[t.length-1];n&&n.added===r&&n.removed===o?t[t.length-1]={count:n.count+1,added:r,removed:o}:t.push({count:1,added:r,removed:o})},extractCommon:function(t,r,o,n){for(var i=r.length,a=o.length,l=t.newPos,c=l-n,u=0;l+1<i&&c+1<a&&this.equals(r[l+1],o[c+1]);)l++,c++,u++;return u&&t.components.push({count:u}),t.newPos=l,c},equals:function(t,r){return this.options.comparator?this.options.comparator(t,r):t===r||this.options.ignoreCase&&t.toLowerCase()===r.toLowerCase()},removeEmpty:function(t){for(var r=[],o=0;o<t.length;o++)t[o]&&r.push(t[o]);return r},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function kFe(e,t,r,o,n){for(var i=0,a=t.length,l=0,c=0;i<a;i++){var u=t[i];if(u.removed){if(u.value=e.join(o.slice(c,c+u.count)),c+=u.count,i&&t[i-1].added){var f=t[i-1];t[i-1]=t[i],t[i]=f}}else{if(!u.added&&n){var d=r.slice(l,l+u.count);d=d.map(function(h,g){var v=o[c+g];return v.length>h.length?v:h}),u.value=e.join(d)}else u.value=e.join(r.slice(l,l+u.count));l+=u.count,u.added||(c+=u.count)}}var m=t[a-1];return a>1&&typeof m.value=="string"&&(m.added||m.removed)&&e.equals("",m.value)&&(t[a-2].value+=m.value,t.pop()),t}function RFe(e){return{newPos:e.newPos,components:e.components.slice(0)}}});var l8=Ve(k1=>{"use strict";Object.defineProperty(k1,"__esModule",{value:!0});k1.diffArrays=OFe;k1.arrayDiff=void 0;var AFe=IFe(a8());function IFe(e){return e&&e.__esModule?e:{default:e}}var E1=new AFe.default;k1.arrayDiff=E1;E1.tokenize=function(e){return e.slice()};E1.join=E1.removeEmpty=function(e){return e};function OFe(e,t,r){return E1.diff(e,t,r)}});var Loe=Ve(c8=>{"use strict";Object.defineProperty(c8,"__esModule",{value:!0});c8.generateOptions=NFe;function NFe(e,t){if(typeof e=="function")t.callback=e;else if(e)for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}});var u8=Ve(Ob=>{"use strict";Object.defineProperty(Ob,"__esModule",{value:!0});Ob.diffWords=LFe;Ob.diffWordsWithSpace=BFe;Ob.wordDiff=void 0;var MFe=DFe(a8()),FFe=Loe();function DFe(e){return e&&e.__esModule?e:{default:e}}var Boe=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Voe=/\S/,R1=new MFe.default;Ob.wordDiff=R1;R1.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Voe.test(e)&&!Voe.test(t)};R1.tokenize=function(e){for(var t=e.split(/(\s+|[()[\]{}'"]|\b)/),r=0;r<t.length-1;r++)!t[r+1]&&t[r+2]&&Boe.test(t[r])&&Boe.test(t[r+2])&&(t[r]+=t[r+2],t.splice(r+1,2),r--);return t};function LFe(e,t,r){return r=(0,FFe.generateOptions)(r,{ignoreWhitespace:!0}),R1.diff(e,t,r)}function BFe(e,t,r){return R1.diff(e,t,r)}});var zoe=Ve((hPt,joe)=>{joe.exports=window.wp.blockSerializationDefaultParser});var A1=Ve((gPt,Hoe)=>{Hoe.exports=window.wp.richText});var p8=Ve((TPt,Joe)=>{Joe.exports=window.wp.commands});var oa=Ve((eEt,_ne)=>{_ne.exports=window.wp.keyboardShortcuts});var qg=Ve((zMt,Sce)=>{Sce.exports=window.wp.dom});var the=Ve((O8t,ehe)=>{"use strict";var Mze="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";ehe.exports=Mze});var ihe=Ve((N8t,nhe)=>{"use strict";var Fze=the();function rhe(){}function ohe(){}ohe.resetWarningCache=rhe;nhe.exports=function(){function e(o,n,i,a,l,c){if(c!==Fze){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ohe,resetWarningCache:rhe};return r.PropTypes=r,r}});var ahe=Ve((D8t,she)=>{she.exports=ihe()();var M8t,F8t});var che=Ve((AO,lhe)=>{(function(e,t){if(typeof define=="function"&&define.amd)define(["module","exports"],t);else if(typeof AO<"u")t(lhe,AO);else{var r={exports:{}};t(r,r.exports),e.autosize=r.exports}})(AO,function(e,t){"use strict";var r=typeof Map=="function"?new Map:(function(){var c=[],u=[];return{has:function(f){return c.indexOf(f)>-1},get:function(f){return u[c.indexOf(f)]},set:function(f,m){c.indexOf(f)===-1&&(c.push(f),u.push(m))},delete:function(f){var m=c.indexOf(f);m>-1&&(c.splice(m,1),u.splice(m,1))}}})(),o=function(u){return new Event(u,{bubbles:!0})};try{new Event("test")}catch{o=function(d){var f=document.createEvent("Event");return f.initEvent(d,!0,!1),f}}function n(c){if(!c||!c.nodeName||c.nodeName!=="TEXTAREA"||r.has(c))return;var u=null,d=null,f=null;function m(){var w=window.getComputedStyle(c,null);w.resize==="vertical"?c.style.resize="none":w.resize==="both"&&(c.style.resize="horizontal"),w.boxSizing==="content-box"?u=-(parseFloat(w.paddingTop)+parseFloat(w.paddingBottom)):u=parseFloat(w.borderTopWidth)+parseFloat(w.borderBottomWidth),isNaN(u)&&(u=0),y()}function h(w){{var _=c.style.width;c.style.width="0px",c.offsetWidth,c.style.width=_}c.style.overflowY=w}function g(w){for(var _=[];w&&w.parentNode&&w.parentNode instanceof Element;)w.parentNode.scrollTop&&_.push({node:w.parentNode,scrollTop:w.parentNode.scrollTop}),w=w.parentNode;return _}function v(){if(c.scrollHeight!==0){var w=g(c),_=document.documentElement&&document.documentElement.scrollTop;c.style.height="",c.style.height=c.scrollHeight+u+"px",d=c.clientWidth,w.forEach(function(C){C.node.scrollTop=C.scrollTop}),_&&(document.documentElement.scrollTop=_)}}function y(){v();var w=Math.round(parseFloat(c.style.height)),_=window.getComputedStyle(c,null),C=_.boxSizing==="content-box"?Math.round(parseFloat(_.height)):c.offsetHeight;if(C<w?_.overflowY==="hidden"&&(h("scroll"),v(),C=_.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight):_.overflowY!=="hidden"&&(h("hidden"),v(),C=_.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight),f!==C){f=C;var k=o("autosize:resized");try{c.dispatchEvent(k)}catch{}}}var b=function(){c.clientWidth!==d&&y()},S=function(w){window.removeEventListener("resize",b,!1),c.removeEventListener("input",y,!1),c.removeEventListener("keyup",y,!1),c.removeEventListener("autosize:destroy",S,!1),c.removeEventListener("autosize:update",y,!1),Object.keys(w).forEach(function(_){c.style[_]=w[_]}),r.delete(c)}.bind(c,{height:c.style.height,resize:c.style.resize,overflowY:c.style.overflowY,overflowX:c.style.overflowX,wordWrap:c.style.wordWrap});c.addEventListener("autosize:destroy",S,!1),"onpropertychange"in c&&"oninput"in c&&c.addEventListener("keyup",y,!1),window.addEventListener("resize",b,!1),c.addEventListener("input",y,!1),c.addEventListener("autosize:update",y,!1),c.style.overflowX="hidden",c.style.wordWrap="break-word",r.set(c,{destroy:S,update:y}),m()}function i(c){var u=r.get(c);u&&u.destroy()}function a(c){var u=r.get(c);u&&u.update()}var l=null;typeof window>"u"||typeof window.getComputedStyle!="function"?(l=function(u){return u},l.destroy=function(c){return c},l.update=function(c){return c}):(l=function(u,d){return u&&Array.prototype.forEach.call(u.length?u:[u],function(f){return n(f,d)}),u},l.destroy=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],i),c},l.update=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],a),c}),t.default=l,e.exports=t.default})});var dhe=Ve((L8t,uhe)=>{var Dze=function(e,t,r){return r=window.getComputedStyle,(r?r(e):e.currentStyle)[t.replace(/-(\w)/gi,function(o,n){return n.toUpperCase()})]};uhe.exports=Dze});var mhe=Ve((B8t,fhe)=>{var P9=dhe();function Lze(e){var t=P9(e,"line-height"),r=parseFloat(t,10);if(t===r+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=P9(e,"line-height"),r=parseFloat(t,10),o?e.style.lineHeight=o:delete e.style.lineHeight}if(t.indexOf("pt")!==-1?(r*=4,r/=3):t.indexOf("mm")!==-1?(r*=96,r/=25.4):t.indexOf("cm")!==-1?(r*=96,r/=2.54):t.indexOf("in")!==-1?r*=96:t.indexOf("pc")!==-1&&(r*=16),r=Math.round(r),t==="normal"){var n=e.nodeName,i=document.createElement(n);i.innerHTML="&nbsp;",n.toUpperCase()==="TEXTAREA"&&i.setAttribute("rows","1");var a=P9(e,"font-size");i.style.fontSize=a,i.style.padding="0px",i.style.border="0px";var l=document.body;l.appendChild(i);var c=i.offsetHeight;r=c,l.removeChild(i)}return r}fhe.exports=Lze});var hhe=Ve(sf=>{"use strict";var Bze=sf&&sf.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o])};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),E9=sf&&sf.__assign||Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++){t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Vze=sf&&sf.__rest||function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&(r[o[n]]=e[o[n]]);return r};sf.__esModule=!0;var OO=Ye(),Wx=ahe(),IO=che(),jze=mhe(),zze=jze,phe="autosize:resized",Hze=(function(e){Bze(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={lineHeight:null},r.textarea=null,r.onResize=function(o){r.props.onResize&&r.props.onResize(o)},r.updateLineHeight=function(){r.textarea&&r.setState({lineHeight:zze(r.textarea)})},r.onChange=function(o){var n=r.props.onChange;r.currentValue=o.currentTarget.value,n&&n(o)},r}return t.prototype.componentDidMount=function(){var r=this,o=this.props,n=o.maxRows,i=o.async;typeof n=="number"&&this.updateLineHeight(),typeof n=="number"||i?setTimeout(function(){return r.textarea&&IO(r.textarea)}):this.textarea&&IO(this.textarea),this.textarea&&this.textarea.addEventListener(phe,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(phe,this.onResize),IO.destroy(this.textarea))},t.prototype.render=function(){var r=this,o=this,n=o.props,i=n.onResize,a=n.maxRows,l=n.onChange,c=n.style,u=n.innerRef,d=n.children,f=Vze(n,["onResize","maxRows","onChange","style","innerRef","children"]),m=o.state.lineHeight,h=a&&m?m*a:null;return OO.createElement("textarea",E9({},f,{onChange:this.onChange,style:h?E9({},c,{maxHeight:h}):c,ref:function(g){r.textarea=g,typeof r.props.innerRef=="function"?r.props.innerRef(g):r.props.innerRef&&(r.props.innerRef.current=g)}}),d)},t.prototype.componentDidUpdate=function(){this.textarea&&IO.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:Wx.number,maxRows:Wx.number,onResize:Wx.func,innerRef:Wx.any,async:Wx.bool},t})(OO.Component);sf.TextareaAutosize=OO.forwardRef(function(e,t){return OO.createElement(Hze,E9({},e,{innerRef:t}))})});var k9=Ve((j8t,ghe)=>{"use strict";var Uze=hhe();ghe.exports=Uze.TextareaAutosize});var pge=Ve((H7t,mge)=>{mge.exports=window.wp.serverSideRender});var HWe={};Jn(HWe,{AlignmentToolbar:()=>$ze,Autocomplete:()=>Jze,AutosaveMonitor:()=>sI,BlockAlignmentToolbar:()=>eHe,BlockControls:()=>tHe,BlockEdit:()=>rHe,BlockEditorKeyboardShortcuts:()=>oHe,BlockFormatControls:()=>nHe,BlockIcon:()=>iHe,BlockInspector:()=>sHe,BlockList:()=>aHe,BlockMover:()=>lHe,BlockNavigationDropdown:()=>cHe,BlockSelectionClearer:()=>uHe,BlockSettingsMenu:()=>dHe,BlockTitle:()=>fHe,BlockToolbar:()=>mHe,CharacterCount:()=>lw,ColorPalette:()=>pHe,ContrastChecker:()=>hHe,CopyHandler:()=>gHe,DefaultBlockAppender:()=>vHe,DocumentBar:()=>xI,DocumentOutline:()=>p0,DocumentOutlineCheck:()=>due,EditorHistoryRedo:()=>RI,EditorHistoryUndo:()=>OI,EditorKeyboardShortcuts:()=>_g,EditorKeyboardShortcutsRegister:()=>yue,EditorNotices:()=>Rue,EditorProvider:()=>tie,EditorSnackbars:()=>Nue,EntitiesSavedStates:()=>jI,ErrorBoundary:()=>Yue,FontSizePicker:()=>yHe,InnerBlocks:()=>wHe,Inserter:()=>bHe,InspectorAdvancedControls:()=>SHe,InspectorControls:()=>_He,LocalAutosaveMonitor:()=>Xue,MediaPlaceholder:()=>kHe,MediaUpload:()=>RHe,MediaUploadCheck:()=>AHe,MultiSelectScrollIntoView:()=>IHe,NavigableToolbar:()=>OHe,ObserveTyping:()=>NHe,PageAttributesCheck:()=>v0,PageAttributesOrder:()=>rde,PageAttributesPanel:()=>YI,PageAttributesParent:()=>mde,PageTemplate:()=>ZI,PanelColorSettings:()=>xHe,PlainText:()=>CHe,PluginBlockSettingsMenuItem:()=>Ade,PluginDocumentSettingPanel:()=>e5,PluginMoreMenuItem:()=>Mde,PluginPostPublishPanel:()=>r5,PluginPostStatusInfo:()=>n5,PluginPrePublishPanel:()=>s5,PluginPreviewMenuItem:()=>Ude,PluginSidebar:()=>iv,PluginSidebarMoreMenuItem:()=>Yde,PostAuthor:()=>d5,PostAuthorCheck:()=>f5,PostAuthorPanel:()=>h5,PostComments:()=>b5,PostDiscussionPanel:()=>T5,PostExcerpt:()=>Px,PostExcerptCheck:()=>cv,PostExcerptPanel:()=>Xfe,PostFeaturedImage:()=>Rx,PostFeaturedImageCheck:()=>ef,PostFeaturedImagePanel:()=>F5,PostFormat:()=>Ix,PostFormatCheck:()=>N0,PostLastRevision:()=>B5,PostLastRevisionCheck:()=>tf,PostLastRevisionPanel:()=>gme,PostLockedModal:()=>xme,PostPendingStatus:()=>Eme,PostPendingStatusCheck:()=>j5,PostPingbacks:()=>x5,PostPreviewButton:()=>_p,PostPublishButton:()=>B0,PostPublishButtonLabel:()=>U5,PostPublishPanel:()=>lO,PostSavedState:()=>bO,PostSchedule:()=>z0,PostScheduleCheck:()=>wO,PostScheduleLabel:()=>H0,PostSchedulePanel:()=>xO,PostSticky:()=>dO,PostStickyCheck:()=>cO,PostSwitchToDraftButton:()=>Ype,PostSyncStatus:()=>PO,PostTaxonomies:()=>Q0,PostTaxonomiesCheck:()=>EO,PostTaxonomiesFlatTermSelector:()=>p9,PostTaxonomiesHierarchicalTermSelector:()=>v9,PostTaxonomiesPanel:()=>RO,PostTemplatePanel:()=>l5,PostTextEditor:()=>Yx,PostTitle:()=>zO,PostTitleRaw:()=>UO,PostTrash:()=>ow,PostTrashCheck:()=>GO,PostTypeSupportCheck:()=>Mr,PostURL:()=>Xx,PostURLCheck:()=>KO,PostURLLabel:()=>zhe,PostURLPanel:()=>JO,PostVisibility:()=>Fx,PostVisibilityCheck:()=>Whe,PostVisibilityLabel:()=>q5,RichText:()=>yge,RichTextShortcut:()=>THe,RichTextToolbarButton:()=>PHe,ServerSideRender:()=>gge.default,SkipToSelectedBlock:()=>MHe,TableOfContents:()=>age,TextEditorGlobalKeyboardShortcuts:()=>XHe,ThemeSupportCheck:()=>O5,TimeToRead:()=>aw,URLInput:()=>FHe,URLInputButton:()=>DHe,URLPopover:()=>LHe,UnsavedChangesWarning:()=>fge,VisualEditorGlobalKeyboardShortcuts:()=>ZHe,Warning:()=>BHe,WordCount:()=>sw,WritingFlow:()=>VHe,__unstableRichTextInputEvent:()=>EHe,cleanForSlug:()=>gH,createCustomColorsHOC:()=>jHe,getColorClassName:()=>zHe,getColorObjectByAttributeValues:()=>HHe,getColorObjectByColorValue:()=>UHe,getFontSize:()=>GHe,getFontSizeClass:()=>WHe,getTemplatePartIcon:()=>Rf,linkAutocompleter:()=>oI,mediaUpload:()=>MP,privateApis:()=>n_e,registerEntityAction:()=>BWe,registerEntityField:()=>jWe,store:()=>T,storeConfig:()=>v_,transformStyles:()=>i_e.transformStyles,unregisterEntityAction:()=>VWe,unregisterEntityField:()=>zWe,useEntitiesSavedStatesIsDirty:()=>VI,usePostScheduleLabel:()=>U0,usePostURLLabel:()=>O9,usePostVisibilityLabel:()=>c9,userAutocompleter:()=>nI,withColorContext:()=>YHe,withColors:()=>qHe,withFontSizes:()=>KHe});var sce=s(U(),1),ace=s(Q(),1),lce=s(V(),1),cce=s(we(),1),uce=s(tn(),1);var rI=s(U(),1);var vz=s(U(),1);var mz=s(ce(),1),pz={...mz.SETTINGS_DEFAULTS,richEditingEnabled:!0,codeEditingEnabled:!0,fontLibraryEnabled:!0,enableCustomFields:void 0,defaultRenderingMode:"post-only"};var hz=s(U(),1);function p_e(e={},t){return t.type==="SET_IS_READY"?{...e,[t.kind]:{...e[t.kind],[t.name]:!0}}:e}function h_e(e={},t){switch(t.type){case"REGISTER_ENTITY_ACTION":return{...e,[t.kind]:{...e[t.kind],[t.name]:[...(e[t.kind]?.[t.name]??[]).filter(r=>r.id!==t.config.id),t.config]}};case"UNREGISTER_ENTITY_ACTION":return{...e,[t.kind]:{...e[t.kind],[t.name]:(e[t.kind]?.[t.name]??[]).filter(r=>r.id!==t.actionId)}}}return e}function g_e(e={},t){switch(t.type){case"REGISTER_ENTITY_FIELD":return{...e,[t.kind]:{...e[t.kind],[t.name]:[...(e[t.kind]?.[t.name]??[]).filter(r=>r.id!==t.config.id),t.config]}};case"UNREGISTER_ENTITY_FIELD":return{...e,[t.kind]:{...e[t.kind],[t.name]:(e[t.kind]?.[t.name]??[]).filter(r=>r.id!==t.fieldId)}}}return e}var gz=(0,hz.combineReducers)({actions:h_e,fields:g_e,isReady:p_e});function GC(e){return e&&typeof e=="object"&&"raw"in e?e.raw:e}function v_e(e=null,t){return t.type==="SET_EDITED_POST"?t.postId:e}function y_e(e=null,t){return t.type==="SET_CURRENT_TEMPLATE_ID"?t.id:e}function b_e(e=null,t){return t.type==="SET_EDITED_POST"?t.postType:e}function w_e(e={isValid:!0},t){return t.type==="SET_TEMPLATE_VALIDITY"?{...e,isValid:t.isValid}:e}function S_e(e={},t){switch(t.type){case"REQUEST_POST_UPDATE_START":case"REQUEST_POST_UPDATE_FINISH":return{pending:t.type==="REQUEST_POST_UPDATE_START",options:t.options||{}}}return e}function __e(e={},t){switch(t.type){case"REQUEST_POST_DELETE_START":case"REQUEST_POST_DELETE_FINISH":return{pending:t.type==="REQUEST_POST_DELETE_START"}}return e}function x_e(e={isLocked:!1},t){return t.type==="UPDATE_POST_LOCK"?t.lock:e}function C_e(e={},t){switch(t.type){case"LOCK_POST_SAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_SAVING":{let{[t.lockName]:r,...o}=e;return o}}return e}function T_e(e={},t){switch(t.type){case"LOCK_POST_AUTOSAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_AUTOSAVING":{let{[t.lockName]:r,...o}=e;return o}}return e}function P_e(e=pz,t){return t.type==="UPDATE_EDITOR_SETTINGS"?{...e,...t.settings}:e}function E_e(e="post-only",t){return t.type==="SET_RENDERING_MODE"?t.mode:e}function k_e(e="Desktop",t){return t.type==="SET_DEVICE_TYPE"?t.deviceType:e}function R_e(e=[],t){switch(t.type){case"REMOVE_PANEL":if(!e.includes(t.panelName))return[...e,t.panelName]}return e}function A_e(e=!1,t){switch(t.type){case"SET_IS_LIST_VIEW_OPENED":return t.isOpen?!1:e;case"SET_IS_INSERTER_OPENED":return t.value}return e}function I_e(e=!1,t){switch(t.type){case"SET_IS_INSERTER_OPENED":return t.value?!1:e;case"SET_IS_LIST_VIEW_OPENED":return t.isOpen}return e}function O_e(e={current:null}){return e}function N_e(e={current:null}){return e}function M_e(e=!1,t){switch(t.type){case"OPEN_PUBLISH_SIDEBAR":return!0;case"CLOSE_PUBLISH_SIDEBAR":return!1;case"TOGGLE_PUBLISH_SIDEBAR":return!e}return e}function F_e(e="/",t){switch(t.type){case"SET_STYLES_PATH":return t.path;case"RESET_STYLES_NAVIGATION":return"/"}return e}function D_e(e=!1,t){switch(t.type){case"SET_SHOW_STYLEBOOK":return t.show;case"RESET_STYLES_NAVIGATION":return!1}return e}function L_e(e=null,t){return t.type==="SET_CURRENT_REVISION_ID"?t.revisionId:e}function B_e(e=1,t){switch(t.type){case"SET_REVISION_PAGE":return t.page;case"SET_CURRENT_REVISION_ID":return t.revisionId?e:1}return e}function V_e(e=!0,t){switch(t.type){case"SET_SHOW_REVISION_DIFF":return t.showDiff;case"SET_CURRENT_REVISION_ID":return t.revisionId?e:!0}return e}function j_e(e={},t){return t.type==="SELECT_NOTE"?{noteId:t.noteId,options:t.options}:e}var yz=(0,vz.combineReducers)({postId:v_e,postType:b_e,templateId:y_e,saving:S_e,deleting:__e,postLock:x_e,template:w_e,postSavingLock:C_e,editorSettings:P_e,postAutosavingLock:T_e,renderingMode:E_e,deviceType:k_e,removedPanels:R_e,blockInserterPanel:A_e,inserterSidebarToggleRef:N_e,listViewPanel:I_e,listViewToggleRef:O_e,publishSidebarActive:M_e,stylesPath:F_e,showStylebook:D_e,revisionId:L_e,revisionPage:B_e,showRevisionDiff:V_e,selectedNote:j_e,dataviews:gz});var FF={};Jn(FF,{__experimentalGetDefaultTemplatePartAreas:()=>Axe,__experimentalGetDefaultTemplateType:()=>Ixe,__experimentalGetDefaultTemplateTypes:()=>Rxe,__experimentalGetTemplateInfo:()=>Oxe,__unstableIsEditorReady:()=>T1e,canInsertBlockType:()=>Txe,canUserUseUnfilteredHTML:()=>v1e,didPostSaveRequestFail:()=>n1e,didPostSaveRequestSucceed:()=>o1e,getActivePostLock:()=>g1e,getAdjacentBlockClientId:()=>X1e,getAutosaveAttribute:()=>Lz,getBlock:()=>F1e,getBlockAttributes:()=>M1e,getBlockCount:()=>z1e,getBlockHierarchyRootClientId:()=>Z1e,getBlockIndex:()=>uxe,getBlockInsertionPoint:()=>wxe,getBlockListSettings:()=>kxe,getBlockMode:()=>vxe,getBlockName:()=>O1e,getBlockOrder:()=>cxe,getBlockRootClientId:()=>K1e,getBlockSelectionEnd:()=>U1e,getBlockSelectionStart:()=>H1e,getBlocks:()=>D1e,getBlocksByClientId:()=>j1e,getClientIdsOfDescendants:()=>L1e,getClientIdsWithDescendants:()=>B1e,getCurrentPost:()=>Go,getCurrentPostAttribute:()=>CS,getCurrentPostId:()=>xa,getCurrentPostLastRevisionId:()=>Y_e,getCurrentPostRevisionsCount:()=>OF,getCurrentPostType:()=>Vs,getCurrentTemplateId:()=>W_e,getDeviceType:()=>P1e,getEditedPostAttribute:()=>kr,getEditedPostContent:()=>kS,getEditedPostPreviewLink:()=>a1e,getEditedPostSlug:()=>d1e,getEditedPostVisibility:()=>K_e,getEditorBlocks:()=>b1e,getEditorMode:()=>R1e,getEditorSelection:()=>C1e,getEditorSelectionEnd:()=>x1e,getEditorSelectionStart:()=>_1e,getEditorSettings:()=>MF,getFirstMultiSelectedBlockClientId:()=>rxe,getGlobalBlockCount:()=>V1e,getInserterItems:()=>Pxe,getLastMultiSelectedBlockClientId:()=>oxe,getMultiSelectedBlockClientIds:()=>exe,getMultiSelectedBlocks:()=>txe,getMultiSelectedBlocksEndClientId:()=>lxe,getMultiSelectedBlocksStartClientId:()=>axe,getNextBlockClientId:()=>J1e,getPermalink:()=>u1e,getPermalinkParts:()=>zz,getPostEdits:()=>ES,getPostLockUser:()=>h1e,getPostTypeLabel:()=>Nxe,getPreviousBlockClientId:()=>Q1e,getRenderingMode:()=>IP,getSelectedBlock:()=>q1e,getSelectedBlockClientId:()=>Y1e,getSelectedBlockCount:()=>G1e,getSelectedBlocksInitialCaretPosition:()=>$1e,getStateBeforeOptimisticTransaction:()=>A1e,getSuggestedPostFormat:()=>l1e,getTemplate:()=>xxe,getTemplateLock:()=>Cxe,hasChangedContent:()=>Dz,hasEditorRedo:()=>H_e,hasEditorUndo:()=>z_e,hasInserterItems:()=>Exe,hasMultiSelection:()=>pxe,hasNonPostEntityChanges:()=>U_e,hasSelectedBlock:()=>W1e,hasSelectedInnerBlock:()=>fxe,inSomeHistory:()=>I1e,isAncestorMultiSelected:()=>sxe,isAutosavingPost:()=>i1e,isBlockInsertionPointVisible:()=>Sxe,isBlockMultiSelected:()=>ixe,isBlockSelected:()=>dxe,isBlockValid:()=>N1e,isBlockWithinSelection:()=>mxe,isCaretWithinFormattedText:()=>bxe,isCleanNewPost:()=>G_e,isCollaborationEnabledForCurrentPost:()=>Fxe,isCurrentPostPending:()=>Z_e,isCurrentPostPublished:()=>NF,isCurrentPostScheduled:()=>X_e,isDeletingPost:()=>t1e,isEditedPostAutosaveable:()=>J_e,isEditedPostBeingScheduled:()=>$_e,isEditedPostDateFloating:()=>e1e,isEditedPostDirty:()=>RP,isEditedPostEmpty:()=>Vz,isEditedPostNew:()=>Fz,isEditedPostPublishable:()=>Q_e,isEditedPostSaveable:()=>Bz,isEditorPanelEnabled:()=>w1e,isEditorPanelOpened:()=>S1e,isEditorPanelRemoved:()=>Uz,isFirstMultiSelectedBlock:()=>nxe,isInserterOpened:()=>k1e,isListViewOpened:()=>E1e,isMultiSelecting:()=>hxe,isPermalinkEditable:()=>jz,isPostAutosavingLocked:()=>Hz,isPostLockTakeover:()=>p1e,isPostLocked:()=>f1e,isPostSavingLocked:()=>m1e,isPreviewingPost:()=>s1e,isPublishSidebarEnabled:()=>y1e,isPublishSidebarOpened:()=>Mxe,isPublishingPost:()=>c1e,isSavingNonPostEntityChanges:()=>r1e,isSavingPost:()=>Gv,isSelectionEnabled:()=>gxe,isTyping:()=>yxe,isValidTemplate:()=>_xe});var Af=s(lt(),1),Uv=s(go(),1),TS=s(vo(),1),Et=s(U(),1),mc=s(ya(),1),Mz=s(V(),1),AP=s(ce(),1),br=s(Q(),1),RS=s(vt(),1);var Cz=new Set(["meta"]),Tz="core/editor",u6=/%(?:postname|pagename)%/,d6=60*1e3,Pz=["title","excerpt","content"];var Vt="wp_template",Oo="wp_template_part",ba="wp_block",Ef="wp_navigation",jr="attachment",WC={custom:"custom",theme:"theme",plugin:"plugin"},f6=["wp_template","wp_template_part"],Ez=[...f6,"wp_block","wp_navigation"],yl=[Vt,Oo,ba,Ef];var YC=s(V(),1),Uo=(0,YC.forwardRef)(({icon:e,size:t=24,...r},o)=>(0,YC.cloneElement)(e,{width:t,height:t,...r,ref:o}));var qC=s(he(),1),m6=s(x(),1),p6=(0,m6.jsx)(qC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m6.jsx)(qC.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.5 5.5V8H20V5.5H22.5V4H20V1.5H18.5V4H16V5.5H18.5ZM13.9624 4H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V10.0391H18.5V18C18.5 18.2761 18.2761 18.5 18 18.5H10L10 10.4917L16.4589 10.5139L16.4641 9.01389L5.5 8.97618V6C5.5 5.72386 5.72386 5.5 6 5.5H13.9624V4ZM5.5 10.4762V18C5.5 18.2761 5.72386 18.5 6 18.5H8.5L8.5 10.4865L5.5 10.4762Z"})});var KC=s(he(),1),h6=s(x(),1),g6=(0,h6.jsx)(KC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,h6.jsx)(KC.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z"})});var ZC=s(he(),1),v6=s(x(),1),y6=(0,v6.jsx)(ZC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,v6.jsx)(ZC.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})});var XC=s(he(),1),b6=s(x(),1),w6=(0,b6.jsx)(XC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,b6.jsx)(XC.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var QC=s(he(),1),S6=s(x(),1),_6=(0,S6.jsx)(QC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,S6.jsx)(QC.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})});var JC=s(he(),1),x6=s(x(),1),C6=(0,x6.jsx)(JC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,x6.jsx)(JC.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})});var $C=s(he(),1),T6=s(x(),1),P6=(0,T6.jsx)($C.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,T6.jsx)($C.Path,{d:"M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z"})});var eT=s(he(),1),E6=s(x(),1),k6=(0,E6.jsx)(eT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,E6.jsx)(eT.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.53 4.47a.75.75 0 1 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm5 1a.75.75 0 1 0-1.06 1.06l2 2a.75.75 0 1 0 1.06-1.06l-2-2Zm-11.06 10a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06Zm.06-5a.75.75 0 0 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm-.06-3a.75.75 0 0 1 1.06 0l10 10a.75.75 0 1 1-1.06 1.06l-10-10a.75.75 0 0 1 0-1.06Zm3.06-2a.75.75 0 0 0-1.06 1.06l10 10a.75.75 0 1 0 1.06-1.06l-10-10Z"})});var tT=s(he(),1),R6=s(x(),1),Ou=(0,R6.jsx)(tT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,R6.jsx)(tT.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"})});var rT=s(he(),1),A6=s(x(),1),I6=(0,A6.jsx)(rT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,A6.jsx)(rT.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})});var oT=s(he(),1),O6=s(x(),1),nT=(0,O6.jsx)(oT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,O6.jsx)(oT.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"})});var iT=s(he(),1),N6=s(x(),1),sT=(0,N6.jsx)(iT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,N6.jsx)(iT.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z"})});var aT=s(he(),1),M6=s(x(),1),Rn=(0,M6.jsx)(aT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,M6.jsx)(aT.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var lT=s(he(),1),F6=s(x(),1),Jw=(0,F6.jsx)(lT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,F6.jsx)(lT.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var cT=s(he(),1),D6=s(x(),1),L6=(0,D6.jsx)(cT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,D6.jsx)(cT.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var uT=s(he(),1),B6=s(x(),1),tr=(0,B6.jsx)(uT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,B6.jsx)(uT.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var dT=s(he(),1),V6=s(x(),1),j6=(0,V6.jsx)(dT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,V6.jsx)(dT.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})});var fT=s(he(),1),z6=s(x(),1),rr=(0,z6.jsx)(fT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,z6.jsx)(fT.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var mT=s(he(),1),H6=s(x(),1),U6=(0,H6.jsx)(mT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,H6.jsx)(mT.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var pT=s(he(),1),G6=s(x(),1),rn=(0,G6.jsx)(pT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,G6.jsx)(pT.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"})});var hT=s(he(),1),W6=s(x(),1),$w=(0,W6.jsx)(hT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,W6.jsx)(hT.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})});var gT=s(he(),1),Y6=s(x(),1),q6=(0,Y6.jsx)(gT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Y6.jsx)(gT.Path,{d:"M17.3 10.1C17.3 7.60001 15.2 5.70001 12.5 5.70001C10.3 5.70001 8.4 7.10001 7.9 9.00001H7.7C5.7 9.00001 4 10.7 4 12.8C4 14.9 5.7 16.6 7.7 16.6H9.5V15.2H7.7C6.5 15.2 5.5 14.1 5.5 12.9C5.5 11.7 6.5 10.5 7.7 10.5H9L9.3 9.40001C9.7 8.10001 11 7.20001 12.5 7.20001C14.3 7.20001 15.8 8.50001 15.8 10.1V11.4L17.1 11.6C17.9 11.7 18.5 12.5 18.5 13.4C18.5 14.4 17.7 15.2 16.8 15.2H14.5V16.6H16.7C18.5 16.6 19.9 15.1 19.9 13.3C20 11.7 18.8 10.4 17.3 10.1Z M14.1245 14.2426L15.1852 13.182L12.0032 10L8.82007 13.1831L9.88072 14.2438L11.25 12.8745V18H12.75V12.8681L14.1245 14.2426Z"})});var vT=s(he(),1),K6=s(x(),1),Z6=(0,K6.jsx)(vT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,K6.jsx)(vT.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-9c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4h1.3l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8-.1 1-.9 1.8-1.8 1.8z"})});var yT=s(he(),1),X6=s(x(),1),Q6=(0,X6.jsx)(yT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,X6.jsx)(yT.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"})});var bT=s(he(),1),J6=s(x(),1),$6=(0,J6.jsx)(bT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,J6.jsx)(bT.Path,{fillRule:"evenodd",clipRule:"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"})});var wT=s(he(),1),eM=s(x(),1),tM=(0,eM.jsx)(wT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eM.jsx)(wT.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"})});var ST=s(he(),1),rM=s(x(),1),eS=(0,rM.jsx)(ST.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rM.jsx)(ST.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"})});var _T=s(he(),1),oM=s(x(),1),nM=(0,oM.jsx)(_T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oM.jsx)(_T.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"})});var xT=s(he(),1),iM=s(x(),1),tS=(0,iM.jsx)(xT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,iM.jsx)(xT.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})});var CT=s(he(),1),sM=s(x(),1),TT=(0,sM.jsx)(CT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sM.jsx)(CT.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"})});var PT=s(he(),1),aM=s(x(),1),lM=(0,aM.jsx)(PT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aM.jsx)(PT.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"})});var ET=s(he(),1),cM=s(x(),1),zv=(0,cM.jsx)(ET.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cM.jsx)(ET.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 0 4-4H8a4 4 0 0 0 4 4Z"})});var kT=s(he(),1),uM=s(x(),1),Kp=(0,uM.jsx)(kT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uM.jsx)(kT.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z"})});var RT=s(he(),1),dM=s(x(),1),Nu=(0,dM.jsx)(RT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,dM.jsx)(RT.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"})});var AT=s(he(),1),fM=s(x(),1),mM=(0,fM.jsx)(AT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fM.jsx)(AT.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M3 7c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Zm2-.5h14c.3 0 .5.2.5.5v1L12 13.5 4.5 7.9V7c0-.3.2-.5.5-.5Zm-.5 3.3V17c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V9.8L12 15.4 4.5 9.8Z"})});var IT=s(he(),1),pM=s(x(),1),Mu=(0,pM.jsx)(IT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pM.jsx)(IT.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z"})});var OT=s(he(),1),hM=s(x(),1),ss=(0,hM.jsx)(OT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hM.jsx)(OT.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})});var NT=s(he(),1),gM=s(x(),1),vM=(0,gM.jsx)(NT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gM.jsx)(NT.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})});var MT=s(he(),1),yM=s(x(),1),bM=(0,yM.jsx)(MT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yM.jsx)(MT.Path,{d:"M4 6v12c0 1.1.9 2 2 2h3v-1.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h3V4H6c-1.1 0-2 .9-2 2zm7.2 16h1.5V2h-1.5v20zM15 5.5h1.5V4H15v1.5zm3.5.5H20c0-1.1-.9-2-2-2v1.5c.3 0 .5.2.5.5zm0 10.5H20v-2h-1.5v2zm0-3.5H20v-2h-1.5v2zm-.5 5.5V20c1.1 0 2-.9 2-2h-1.5c0 .3-.2.5-.5.5zM15 20h1.5v-1.5H15V20zm3.5-10.5H20v-2h-1.5v2z"})});var FT=s(he(),1),wM=s(x(),1),SM=(0,wM.jsx)(FT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wM.jsx)(FT.Path,{d:"M2 11.2v1.5h20v-1.5H2zM5.5 6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v3H20V6c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v3h1.5V6zm2 14h2v-1.5h-2V20zm3.5 0h2v-1.5h-2V20zm7-1.5V20c1.1 0 2-.9 2-2h-1.5c0 .3-.2.5-.5.5zm.5-2H20V15h-1.5v1.5zM5.5 18H4c0 1.1.9 2 2 2v-1.5c-.3 0-.5-.2-.5-.5zm0-3H4v1.5h1.5V15zm9 5h2v-1.5h-2V20z"})});var DT=s(he(),1),_M=s(x(),1),rS=(0,_M.jsx)(DT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_M.jsx)(DT.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})});var LT=s(he(),1),xM=s(x(),1),CM=(0,xM.jsx)(LT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xM.jsx)(LT.Path,{d:"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})});var BT=s(he(),1),TM=s(x(),1),oS=(0,TM.jsx)(BT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TM.jsx)(BT.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})});var VT=s(he(),1),PM=s(x(),1),nS=(0,PM.jsx)(VT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PM.jsx)(VT.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"})});var jT=s(he(),1),EM=s(x(),1),iS=(0,EM.jsx)(jT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,EM.jsx)(jT.Path,{d:"M18.5 10.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"})});var zT=s(he(),1),kM=s(x(),1),RM=(0,kM.jsx)(zT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kM.jsx)(zT.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})});var sS=s(he(),1),aS=s(x(),1),lS=(0,aS.jsxs)(sS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,aS.jsx)(sS.Path,{d:"m16 15.5h-8v-1.5h8zm-7.5-2.5h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm-9-3h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2z"}),(0,aS.jsx)(sS.Path,{d:"m18.5 6.5h-13a.5.5 0 0 0 -.5.5v9.5a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-9.5a.5.5 0 0 0 -.5-.5zm-13-1.5h13a2 2 0 0 1 2 2v9.5a2 2 0 0 1 -2 2h-13a2 2 0 0 1 -2-2v-9.5a2 2 0 0 1 2-2z"})]});var HT=s(he(),1),AM=s(x(),1),bl=(0,AM.jsx)(HT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AM.jsx)(HT.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"})});var UT=s(he(),1),IM=s(x(),1),OM=(0,IM.jsx)(UT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,IM.jsx)(UT.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});var GT=s(he(),1),NM=s(x(),1),cS=(0,NM.jsx)(GT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,NM.jsx)(GT.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var WT=s(he(),1),MM=s(x(),1),FM=(0,MM.jsx)(WT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MM.jsx)(WT.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"})});var YT=s(he(),1),DM=s(x(),1),Hv=(0,DM.jsx)(YT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DM.jsx)(YT.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})});var qT=s(he(),1),LM=s(x(),1),zr=(0,LM.jsx)(qT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LM.jsx)(qT.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var KT=s(he(),1),BM=s(x(),1),uS=(0,BM.jsx)(KT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BM.jsx)(KT.Path,{d:"M18.5 10a1.5 1.5 0 0 1 1.5 1.5v7a1.5 1.5 0 0 1-1.5 1.5h-7a1.5 1.5 0 0 1-1.5-1.5v-7a1.5 1.5 0 0 1 1.5-1.5zM16 4a2 2 0 0 1 2 2v2h-1.5V6a.5.5 0 0 0-.5-.5H6a.5.5 0 0 0-.5.5v3H8v1.5H5.5V16a.5.5 0 0 0 .5.5h2V18H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z"})});var ZT=s(he(),1),VM=s(x(),1),jM=(0,VM.jsx)(ZT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VM.jsx)(ZT.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})});var XT=s(he(),1),zM=s(x(),1),wa=(0,zM.jsx)(XT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zM.jsx)(XT.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})});var QT=s(he(),1),HM=s(x(),1),dS=(0,HM.jsx)(QT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HM.jsx)(QT.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5A6.5 6.5 0 0 1 6.93 7.931l9.139 9.138A6.473 6.473 0 0 1 12 18.5Zm5.123-2.498a6.5 6.5 0 0 0-9.124-9.124l9.124 9.124ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z"})});var fS=s(he(),1),mS=s(x(),1),kf=(0,mS.jsxs)(fS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,mS.jsx)(fS.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,mS.jsx)(fS.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]});var JT=s(he(),1),UM=s(x(),1),pS=(0,UM.jsx)(JT.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UM.jsx)(JT.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var $T=s(he(),1),GM=s(x(),1),hS=(0,GM.jsx)($T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GM.jsx)($T.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 1-4-4h4V8a4 4 0 0 1 0 8Z"})});var eP=s(he(),1),WM=s(x(),1),Fu=(0,WM.jsx)(eP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,WM.jsx)(eP.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var tP=s(he(),1),YM=s(x(),1),qM=(0,YM.jsx)(tP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YM.jsx)(tP.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})});var rP=s(he(),1),KM=s(x(),1),Sa=(0,KM.jsx)(rP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KM.jsx)(rP.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})});var oP=s(he(),1),ZM=s(x(),1),Zp=(0,ZM.jsx)(oP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZM.jsx)(oP.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z"})});var nP=s(he(),1),XM=s(x(),1),Xp=(0,XM.jsx)(nP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,XM.jsx)(nP.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"})});var iP=s(he(),1),QM=s(x(),1),JM=(0,QM.jsx)(iP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QM.jsx)(iP.Path,{d:"M7 11.5h10V13H7z"})});var sP=s(he(),1),$M=s(x(),1),gS=(0,$M.jsx)(sP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$M.jsx)(sP.Path,{d:"M12 4V2.2L9 4.8l3 2.5V5.5c3.6 0 6.5 2.9 6.5 6.5 0 2.9-1.9 5.3-4.5 6.2v.2l-.1-.2c-.4.1-.7.2-1.1.2l.2 1.5c.3 0 .6-.1 1-.2 3.5-.9 6-4 6-7.7 0-4.4-3.6-8-8-8zm-7.9 7l1.5.2c.1-1.2.5-2.3 1.2-3.2l-1.1-.9C4.8 8.2 4.3 9.6 4.1 11zm1.5 1.8l-1.5.2c.1.7.3 1.4.5 2 .3.7.6 1.3 1 1.8l1.2-.8c-.3-.5-.6-1-.8-1.5s-.4-1.1-.4-1.7zm1.5 5.5c1.1.9 2.4 1.4 3.8 1.6l.2-1.5c-1.1-.1-2.2-.5-3.1-1.2l-.9 1.1z"})});var aP=s(he(),1),eF=s(x(),1),vS=(0,eF.jsx)(aP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eF.jsx)(aP.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"})});var lP=s(he(),1),tF=s(x(),1),Qp=(0,tF.jsx)(lP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tF.jsx)(lP.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm9 1V8h-1.5v3.5h-2V13H13Z"})});var cP=s(he(),1),rF=s(x(),1),oF=(0,rF.jsx)(cP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rF.jsx)(cP.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})});var uP=s(he(),1),nF=s(x(),1),Jp=(0,nF.jsx)(uP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nF.jsx)(uP.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})});var yS=s(he(),1),bS=s(x(),1),iF=(0,bS.jsxs)(yS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,bS.jsx)(yS.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,bS.jsx)(yS.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]});var dP=s(he(),1),sF=s(x(),1),wS=(0,sF.jsx)(dP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sF.jsx)(dP.Path,{d:"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6.5c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12.8 3h-1.5v3h1.5V3zm-1.6 18h1.5v-3h-1.5v3zm6.8-9.8v1.5h3v-1.5h-3zm-12 0H3v1.5h3v-1.5zm9.7 5.6 2.1 2.1 1.1-1.1-2.1-2.1-1.1 1.1zM8.3 7.2 6.2 5.1 5.1 6.2l2.1 2.1 1.1-1.1zM5.1 17.8l1.1 1.1 2.1-2.1-1.1-1.1-2.1 2.1zM18.9 6.2l-1.1-1.1-2.1 2.1 1.1 1.1 2.1-2.1z"})});var fP=s(he(),1),aF=s(x(),1),lF=(0,aF.jsx)(fP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aF.jsx)(fP.Path,{d:"M17.192 6.75L15.47 5.03l1.06-1.06 3.537 3.53-3.537 3.53-1.06-1.06 1.723-1.72h-3.19c-.602 0-.993.202-1.28.498-.309.319-.538.792-.695 1.383-.13.488-.222 1.023-.296 1.508-.034.664-.116 1.413-.303 2.117-.193.721-.513 1.467-1.068 2.04-.575.594-1.359.954-2.357.954H4v-1.5h4.003c.601 0 .993-.202 1.28-.498.308-.319.538-.792.695-1.383.149-.557.216-1.093.288-1.662l.039-.31a9.653 9.653 0 0 1 .272-1.653c.193-.722.513-1.467 1.067-2.04.576-.594 1.36-.954 2.358-.954h3.19zM8.004 6.75c.8 0 1.46.23 1.988.628a6.24 6.24 0 0 0-.684 1.396 1.725 1.725 0 0 0-.024-.026c-.287-.296-.679-.498-1.28-.498H4v-1.5h4.003zM12.699 14.726c-.161.459-.38.94-.684 1.396.527.397 1.188.628 1.988.628h3.19l-1.722 1.72 1.06 1.06L20.067 16l-3.537-3.53-1.06 1.06 1.723 1.72h-3.19c-.602 0-.993-.202-1.28-.498a1.96 1.96 0 0 1-.024-.026z"})});var mP=s(he(),1),cF=s(x(),1),SS=(0,cF.jsx)(mP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cF.jsx)(mP.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.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})});var pP=s(he(),1),uF=s(x(),1),dF=(0,uF.jsx)(pP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uF.jsx)(pP.Path,{fill:"none",d:"M5.75 12.75V18.25H11.25M12.75 5.75H18.25V11.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})});var hP=s(he(),1),fF=s(x(),1),mF=(0,fF.jsx)(hP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fF.jsx)(hP.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z"})});var gP=s(he(),1),pF=s(x(),1),hF=(0,pF.jsx)(gP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pF.jsx)(gP.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"})});var vP=s(he(),1),gF=s(x(),1),vF=(0,gF.jsx)(vP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gF.jsx)(vP.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})});var yP=s(he(),1),yF=s(x(),1),$p=(0,yF.jsx)(yP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yF.jsx)(yP.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})});var bP=s(he(),1),bF=s(x(),1),_S=(0,bF.jsx)(bP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bF.jsx)(bP.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})});var wP=s(he(),1),wF=s(x(),1),SP=(0,wF.jsx)(wP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wF.jsx)(wP.Path,{d:"M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z"})});var _P=s(he(),1),SF=s(x(),1),Du=(0,SF.jsx)(_P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SF.jsx)(_P.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})});var xP=s(he(),1),_F=s(x(),1),xF=(0,_F.jsx)(xP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_F.jsx)(xP.Path,{d:"m8.6 7 3.9 10.8h-1.7l-1-2.8H5.7l-1 2.8H3L6.9 7h1.7Zm-2.4 6.6h3L7.7 9.3l-1.5 4.3ZM17.691 8.879c.473 0 .88.055 1.221.165.352.1.643.264.875.495.274.253.456.572.544.957.088.374.132.83.132 1.37v4.554c0 .274.033.472.099.593.077.11.198.166.363.166.11 0 .215-.028.313-.083.11-.055.237-.137.38-.247l.165.28a3.304 3.304 0 0 1-.71.446c-.23.11-.527.165-.89.165-.352 0-.639-.055-.858-.165-.22-.11-.386-.27-.495-.479-.1-.209-.149-.468-.149-.775-.286.462-.627.814-1.023 1.056-.396.242-.858.363-1.386.363-.462 0-.858-.088-1.188-.264a1.752 1.752 0 0 1-.742-.726 2.201 2.201 0 0 1-.248-1.056c0-.484.11-.875.33-1.172.22-.308.5-.556.841-.742.352-.187.721-.341 1.106-.462.396-.132.765-.253 1.106-.363.351-.121.637-.259.857-.413.232-.154.347-.357.347-.61V10.81c0-.396-.066-.71-.198-.941a1.05 1.05 0 0 0-.511-.511 1.763 1.763 0 0 0-.76-.149c-.253 0-.522.039-.808.116a1.165 1.165 0 0 0-.677.412 1.1 1.1 0 0 1 .595.396c.165.187.247.424.247.71 0 .307-.104.55-.313.726-.198.176-.451.263-.76.263-.34 0-.594-.104-.758-.313a1.231 1.231 0 0 1-.248-.759c0-.297.072-.539.214-.726.154-.187.352-.363.595-.528.264-.176.6-.324 1.006-.445.418-.121.88-.182 1.386-.182Zm.99 3.729a1.57 1.57 0 0 1-.528.462c-.231.121-.479.248-.742.38a5.377 5.377 0 0 0-.76.462c-.23.165-.423.38-.577.643-.154.264-.231.6-.231 1.007 0 .429.11.77.33 1.023.22.242.517.363.891.363.308 0 .594-.088.858-.264.275-.176.528-.44.759-.792v-3.284Z"})});var CP=s(he(),1),CF=s(x(),1),eh=(0,CF.jsx)(CP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,CF.jsx)(CP.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})});var TP=s(he(),1),TF=s(x(),1),xS=(0,TF.jsx)(TP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TF.jsx)(TP.Path,{d:"M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"})});var PP=s(he(),1),PF=s(x(),1),EF=(0,PF.jsx)(PP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PF.jsx)(PP.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})});var EP=s(he(),1),kF=s(x(),1),RF=(0,kF.jsx)(EP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kF.jsx)(EP.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"})});var kP=s(he(),1),AF=s(x(),1),IF=(0,AF.jsx)(kP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,AF.jsx)(kP.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})});function Rf(e){return e==="header"?iS:e==="footer"?rS:e==="sidebar"?SS:e==="navigation-overlay"?uS:$p}var Iz=s(th(),1),{lock:Oz,unlock:Y}=(0,Iz.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/editor");var Nz={},_a=e=>{if(!e)return Nz;let{templateTypes:t,templateAreas:r,template:o}=e,{description:n,slug:i,title:a,area:l}=o,{title:c,description:u}=Object.values(t).find(g=>g.slug===i)??Nz,d=typeof a=="string"?a:a?.rendered,f=typeof n=="string"?n:n?.raw,h=r?.map(g=>({...g,icon:Rf(g.icon)}))?.find(g=>l===g.area)?.icon||bl;return{title:d&&d!==i?d:c||i,description:f||u,icon:h}};var PS={},z_e=(0,Et.createRegistrySelector)(e=>()=>e(br.store).hasUndo()),H_e=(0,Et.createRegistrySelector)(e=>()=>e(br.store).hasRedo());function Fz(e){return Go(e).status==="auto-draft"}function Dz(e){return"content"in ES(e)}var RP=(0,Et.createRegistrySelector)(e=>t=>{let r=Vs(t),o=xa(t);return e(br.store).hasEditsForEntityRecord("postType",r,o)}),U_e=(0,Et.createRegistrySelector)(e=>t=>{let r=e(br.store).__experimentalGetDirtyEntityRecords(),{type:o,id:n}=Go(t);return r.some(i=>i.kind!=="postType"||i.name!==o||i.key!==n)});function G_e(e){return!RP(e)&&Fz(e)}var Go=(0,Et.createRegistrySelector)(e=>t=>{let r=xa(t),o=Vs(t),n=e(br.store).getRawEntityRecord("postType",o,r);return n||PS});function Vs(e){return e.postType}function xa(e){return e.postId}function W_e(e){return e.templateId}function OF(e){return Go(e)._links?.["version-history"]?.[0]?.count??0}function Y_e(e){return Go(e)._links?.["predecessor-version"]?.[0]?.id??null}var ES=(0,Et.createRegistrySelector)(e=>t=>{let r=Vs(t),o=xa(t);return e(br.store).getEntityRecordEdits("postType",r,o)||PS});function CS(e,t){switch(t){case"type":return Vs(e);case"id":return xa(e);default:let r=Go(e);if(!r.hasOwnProperty(t))break;return GC(r[t])}}var q_e=(0,Et.createSelector)((e,t)=>{let r=ES(e);return r.hasOwnProperty(t)?{...CS(e,t),...r[t]}:CS(e,t)},(e,t)=>[CS(e,t),ES(e)[t]]);function kr(e,t){if(t==="content")return kS(e);let r=ES(e);return r.hasOwnProperty(t)?Cz.has(t)?q_e(e,t):r[t]:CS(e,t)}var Lz=(0,Et.createRegistrySelector)(e=>(t,r)=>{if(!Pz.includes(r)&&r!=="preview_link")return;let o=Vs(t),n=xa(t),i=e(br.store).getCurrentUser()?.id,a=e(br.store).getAutosave(o,n,i);if(a)return GC(a[r])});function K_e(e){return kr(e,"status")==="private"?"private":kr(e,"password")?"password":"public"}function Z_e(e){return Go(e).status==="pending"}function NF(e,t){let r=t||Go(e);return["publish","private"].indexOf(r.status)!==-1||r.status==="future"&&!(0,Uv.isInTheFuture)(new Date(Number((0,Uv.getDate)(r.date))-d6))}function X_e(e){return Go(e).status==="future"&&!NF(e)}function Q_e(e){let t=Go(e);return t.type===jr?RP(e):RP(e)||["publish","private","future"].indexOf(t.status)===-1}function Bz(e){return Gv(e)?!1:!!kr(e,"title")||!!kr(e,"excerpt")||!Vz(e)||Mz.Platform.OS==="native"}var Vz=(0,Et.createRegistrySelector)(e=>t=>{let r=xa(t),o=Vs(t),n=e(br.store).getEditedEntityRecord("postType",o,r);if(typeof n.content!="function")return!n.content;let i=kr(t,"blocks");if(i.length===0)return!0;if(i.length>1)return!1;let a=i[0].name;return a!==(0,Af.getDefaultBlockName)()&&a!==(0,Af.getFreeformContentHandlerName)()?!1:!kS(t)}),J_e=(0,Et.createRegistrySelector)(e=>t=>{if(!Bz(t)||Hz(t))return!1;let r=Vs(t);if(!e(br.store).getPostType(r)?.supports?.autosave)return!1;let n=xa(t),i=e(br.store).hasFetchedAutosaves(r,n),a=e(br.store).getCurrentUser()?.id,l=e(br.store).getAutosave(r,n,a);return i?!l||Dz(t)?!0:["title","excerpt","meta"].some(c=>GC(l[c])!==kr(t,c)):!1});function $_e(e){let t=kr(e,"date"),r=new Date(Number((0,Uv.getDate)(t))-d6);return(0,Uv.isInTheFuture)(r)}function e1e(e){let t=kr(e,"date"),r=kr(e,"modified"),o=Go(e).status;return o==="draft"||o==="auto-draft"||o==="pending"?t===r||t===null:!1}function t1e(e){return!!e.deleting.pending}function Gv(e){return!!e.saving.pending}var r1e=(0,Et.createRegistrySelector)(e=>t=>{let r=e(br.store).__experimentalGetEntitiesBeingSaved(),{type:o,id:n}=Go(t);return r.some(i=>i.kind!=="postType"||i.name!==o||i.key!==n)}),o1e=(0,Et.createRegistrySelector)(e=>t=>{let r=Vs(t),o=xa(t);return!e(br.store).getLastEntitySaveError("postType",r,o)}),n1e=(0,Et.createRegistrySelector)(e=>t=>{let r=Vs(t),o=xa(t);return!!e(br.store).getLastEntitySaveError("postType",r,o)});function i1e(e){return Gv(e)&&!!e.saving.options?.isAutosave}function s1e(e){return Gv(e)&&!!e.saving.options?.isPreview}function a1e(e){if(e.saving.pending||Gv(e))return;let t=Lz(e,"preview_link");(!t||Go(e).status==="draft")&&(t=kr(e,"link"),t&&(t=(0,TS.addQueryArgs)(t,{preview:!0})));let r=kr(e,"featured_media");return t&&r?(0,TS.addQueryArgs)(t,{_thumbnail_id:r}):t}var l1e=(0,Et.createRegistrySelector)(e=>()=>{let t=e(AP.store).getBlocks();if(t.length>2)return null;let r;if(t.length===1&&(r=t[0].name,r==="core/embed")){let o=t[0].attributes?.providerNameSlug;["youtube","vimeo"].includes(o)?r="core/video":["spotify","soundcloud"].includes(o)&&(r="core/audio")}switch(t.length===2&&t[1].name==="core/paragraph"&&(r=t[0].name),r){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":return"video";case"core/audio":return"audio";default:return null}}),kS=(0,Et.createRegistrySelector)(e=>t=>{let r=xa(t),o=Vs(t),n=e(br.store).getEditedEntityRecord("postType",o,r);if(n){if(typeof n.content=="function")return n.content(n);if(n.blocks)return(0,Af.__unstableSerializeAndClean)(n.blocks);if(n.content)return n.content}return""});function c1e(e){return Gv(e)&&!NF(e)&&kr(e,"status")==="publish"}function jz(e){let t=kr(e,"permalink_template");return u6.test(t)}function u1e(e){let t=zz(e);if(!t)return null;let{prefix:r,postName:o,suffix:n}=t;return jz(e)?r+o+n:r}function d1e(e){return kr(e,"slug")||(0,TS.cleanForSlug)(kr(e,"title"))||xa(e)}function zz(e){let t=kr(e,"permalink_template");if(!t)return null;let r=kr(e,"slug")||kr(e,"generated_slug"),[o,n]=t.split(u6);return{prefix:o,postName:r,suffix:n}}function f1e(e){return e.postLock.isLocked}function m1e(e){return Object.keys(e.postSavingLock).length>0}function Hz(e){return Object.keys(e.postAutosavingLock).length>0}function p1e(e){return e.postLock.isTakeover}function h1e(e){return e.postLock.user}function g1e(e){return e.postLock.activePostLock}function v1e(e){return!!Go(e)._links?.hasOwnProperty("wp:action-unfiltered-html")}var y1e=(0,Et.createRegistrySelector)(e=>()=>!!e(RS.store).get("core","isPublishSidebarEnabled")),b1e=(0,Et.createSelector)(e=>kr(e,"blocks")||(0,Af.parse)(kS(e)),e=>[kr(e,"blocks"),kS(e)]);function Uz(e,t){return e.removedPanels.includes(t)}var w1e=(0,Et.createRegistrySelector)(e=>(t,r)=>{let o=e(RS.store).get("core","inactivePanels");return!Uz(t,r)&&!o?.includes(r)}),S1e=(0,Et.createRegistrySelector)(e=>(t,r)=>!!e(RS.store).get("core","openPanels")?.includes(r));function _1e(e){return(0,mc.default)("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),kr(e,"selection")?.selectionStart}function x1e(e){return(0,mc.default)("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),kr(e,"selection")?.selectionEnd}function C1e(e){return kr(e,"selection")}function T1e(e){return!!e.postId}function MF(e){return e.editorSettings}function IP(e){return e.renderingMode}var P1e=(0,Et.createRegistrySelector)(e=>t=>Y(e(AP.store)).isZoomOut()?"Desktop":t.deviceType);function E1e(e){return e.listViewPanel}function k1e(e){return!!e.blockInserterPanel}var R1e=(0,Et.createRegistrySelector)(e=>()=>e(RS.store).get("core","editorMode")??"visual");function A1e(){return(0,mc.default)("select('core/editor').getStateBeforeOptimisticTransaction",{since:"5.7",hint:"No state history is kept on this store anymore"}),null}function I1e(){return(0,mc.default)("select('core/editor').inSomeHistory",{since:"5.7",hint:"No state history is kept on this store anymore"}),!1}function Ke(e){return(0,Et.createRegistrySelector)(t=>(r,...o)=>((0,mc.default)("`wp.data.select( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.select( 'core/block-editor' )."+e+"`",version:"6.2"}),t(AP.store)[e](...o)))}var O1e=Ke("getBlockName"),N1e=Ke("isBlockValid"),M1e=Ke("getBlockAttributes"),F1e=Ke("getBlock"),D1e=Ke("getBlocks"),L1e=Ke("getClientIdsOfDescendants"),B1e=Ke("getClientIdsWithDescendants"),V1e=Ke("getGlobalBlockCount"),j1e=Ke("getBlocksByClientId"),z1e=Ke("getBlockCount"),H1e=Ke("getBlockSelectionStart"),U1e=Ke("getBlockSelectionEnd"),G1e=Ke("getSelectedBlockCount"),W1e=Ke("hasSelectedBlock"),Y1e=Ke("getSelectedBlockClientId"),q1e=Ke("getSelectedBlock"),K1e=Ke("getBlockRootClientId"),Z1e=Ke("getBlockHierarchyRootClientId"),X1e=Ke("getAdjacentBlockClientId"),Q1e=Ke("getPreviousBlockClientId"),J1e=Ke("getNextBlockClientId"),$1e=Ke("getSelectedBlocksInitialCaretPosition"),exe=Ke("getMultiSelectedBlockClientIds"),txe=Ke("getMultiSelectedBlocks"),rxe=Ke("getFirstMultiSelectedBlockClientId"),oxe=Ke("getLastMultiSelectedBlockClientId"),nxe=Ke("isFirstMultiSelectedBlock"),ixe=Ke("isBlockMultiSelected"),sxe=Ke("isAncestorMultiSelected"),axe=Ke("getMultiSelectedBlocksStartClientId"),lxe=Ke("getMultiSelectedBlocksEndClientId"),cxe=Ke("getBlockOrder"),uxe=Ke("getBlockIndex"),dxe=Ke("isBlockSelected"),fxe=Ke("hasSelectedInnerBlock"),mxe=Ke("isBlockWithinSelection"),pxe=Ke("hasMultiSelection"),hxe=Ke("isMultiSelecting"),gxe=Ke("isSelectionEnabled"),vxe=Ke("getBlockMode"),yxe=Ke("isTyping"),bxe=Ke("isCaretWithinFormattedText"),wxe=Ke("getBlockInsertionPoint"),Sxe=Ke("isBlockInsertionPointVisible"),_xe=Ke("isValidTemplate"),xxe=Ke("getTemplate"),Cxe=Ke("getTemplateLock"),Txe=Ke("canInsertBlockType"),Pxe=Ke("getInserterItems"),Exe=Ke("hasInserterItems"),kxe=Ke("getBlockListSettings"),Rxe=(0,Et.createRegistrySelector)(e=>()=>((0,mc.default)("select('core/editor').__experimentalGetDefaultTemplateTypes",{since:"6.8",alternative:"select('core/core-data').getCurrentTheme()?.default_template_types"}),e(br.store).getCurrentTheme()?.default_template_types)),Axe=(0,Et.createRegistrySelector)(e=>(0,Et.createSelector)(()=>((0,mc.default)("select('core/editor').__experimentalGetDefaultTemplatePartAreas",{since:"6.8",alternative:"select('core/core-data').getCurrentTheme()?.default_template_part_areas"}),(e(br.store).getCurrentTheme()?.default_template_part_areas||[]).map(r=>({...r,icon:Rf(r.icon)}))))),Ixe=(0,Et.createRegistrySelector)(e=>(0,Et.createSelector)((t,r)=>{(0,mc.default)("select('core/editor').__experimentalGetDefaultTemplateType",{since:"6.8"});let o=e(br.store).getCurrentTheme()?.default_template_types;return o?Object.values(o).find(n=>n.slug===r)??PS:PS})),Oxe=(0,Et.createRegistrySelector)(e=>(0,Et.createSelector)((t,r)=>{if((0,mc.default)("select('core/editor').__experimentalGetTemplateInfo",{since:"6.8"}),!r)return PS;let o=e(br.store).getCurrentTheme(),n=o?.default_template_types||[],i=o?.default_template_part_areas||[];return _a({template:r,templateAreas:i,templateTypes:n})})),Nxe=(0,Et.createRegistrySelector)(e=>t=>{let r=Vs(t);return e(br.store).getPostType(r)?.labels?.singular_name});function Mxe(e){return e.publishSidebarActive}var Fxe=(0,Et.createRegistrySelector)(e=>t=>{if(!Y(e(br.store)).isCollaborationSupported())return!1;let r=Vs(t);return!!(e(br.store).getEntityConfig("postType",r)?.syncConfig&&window._wpCollaborationEnabled)});var BF={};Jn(BF,{__experimentalTearDownEditor:()=>Lxe,__unstableSaveForPreview:()=>qxe,autosave:()=>Yxe,clearSelectedBlock:()=>kCe,closePublishSidebar:()=>yCe,createUndoLevel:()=>Xxe,disablePublishSidebar:()=>$xe,editPost:()=>zxe,enablePublishSidebar:()=>Jxe,enterFormattedText:()=>qCe,exitFormattedText:()=>KCe,hideInsertionPoint:()=>BCe,insertBlock:()=>FCe,insertBlocks:()=>DCe,insertDefaultBlock:()=>ZCe,lockPostAutosaving:()=>rCe,lockPostSaving:()=>eCe,mergeBlocks:()=>zCe,moveBlockToPosition:()=>MCe,moveBlocksDown:()=>OCe,moveBlocksUp:()=>NCe,multiSelect:()=>ECe,openPublishSidebar:()=>vCe,receiveBlocks:()=>SCe,redo:()=>Kxe,refreshPost:()=>Gxe,removeBlock:()=>UCe,removeBlocks:()=>HCe,removeEditorPanel:()=>uCe,replaceBlock:()=>ICe,replaceBlocks:()=>ACe,resetBlocks:()=>wCe,resetEditorBlocks:()=>nCe,resetPost:()=>Bxe,savePost:()=>Hxe,selectBlock:()=>CCe,setDeviceType:()=>aCe,setEditedPost:()=>eH,setIsInserterOpened:()=>dCe,setIsListViewOpened:()=>fCe,setRenderingMode:()=>sCe,setTemplateValidity:()=>VCe,setupEditor:()=>Dxe,setupEditorState:()=>jxe,showInsertionPoint:()=>LCe,startMultiSelect:()=>TCe,startTyping:()=>WCe,stopMultiSelect:()=>PCe,stopTyping:()=>YCe,switchEditorMode:()=>gCe,synchronizeTemplate:()=>jCe,toggleBlockMode:()=>GCe,toggleDistractionFree:()=>mCe,toggleEditorPanelEnabled:()=>lCe,toggleEditorPanelOpened:()=>cCe,togglePublishSidebar:()=>bCe,toggleSelection:()=>RCe,toggleSpotlightMode:()=>pCe,toggleTopToolbar:()=>hCe,trashPost:()=>Wxe,undo:()=>Zxe,unlockPostAutosaving:()=>oCe,unlockPostSaving:()=>tCe,updateBlock:()=>_Ce,updateBlockAttributes:()=>xCe,updateBlockListSettings:()=>XCe,updateEditorSettings:()=>iCe,updatePost:()=>Vxe,updatePostLock:()=>Qxe});var LF=s(Wv(),1),$z=s(If(),1),Nf=s(ya(),1),Yv=s(lt(),1),wl=s(wt(),1),Ri=s(Q(),1),Of=s(ce(),1),qv=s(tn(),1),yo=s(vt(),1),No=s(N(),1);function DF(e,t){return`wp-autosave-block-editor-post-${t?"auto-draft":e}`}function Kz(e,t){return window.sessionStorage.getItem(DF(e,t))}function Zz(e,t,r,o,n){window.sessionStorage.setItem(DF(e,t),JSON.stringify({post_title:r,content:o,excerpt:n}))}function OP(e,t){window.sessionStorage.removeItem(DF(e,t))}var js=s(N(),1);function Xz(e){let{previousPost:t,post:r,postType:o}=e;if(e.options?.isAutosave)return[];let n=["publish","private","future"],i=n.includes(t.status),a=n.includes(r.status),l=r.status==="trash"&&t.status!=="trash",c,u=o?.viewable??!1,d;l?(c=o.labels.item_trashed,u=!1):r.type===jr?(c=(0,js.__)("Media updated."),u=!1):!i&&!a?(c=(0,js.__)("Draft saved."),d=!0):i&&!a?(c=o.labels.item_reverted_to_draft,u=!1):!i&&a?c={publish:o.labels.item_published,private:o.labels.item_published_privately,future:o.labels.item_scheduled}[r.status]:c=o.labels.item_updated;let f=[];return u&&f.push({label:d?(0,js.__)("View Preview"):o.labels.view_item,url:r.link,openInNewTab:!0}),[c,{id:"editor-save",type:"snackbar",actions:f}]}function Qz(e){let{post:t,edits:r,error:o}=e;if(o&&o.code==="rest_autosave_no_changes")return[];let i=["publish","private","future"].indexOf(t.status)!==-1;if(o.code==="offline_error"){let c={publish:(0,js.__)("Publishing failed because you were offline. Please verify your connection and try again."),private:(0,js.__)("Publishing failed because you were offline. Please verify your connection and try again."),future:(0,js.__)("Scheduling failed because you were offline. Please verify your connection and try again."),default:(0,js.__)("Updating failed because you were offline. Please verify your connection and try again.")};return[!i&&r.status in c?c[r.status]:c.default,{id:"editor-save"}]}let a={publish:(0,js.__)("Publishing failed."),private:(0,js.__)("Publishing failed."),future:(0,js.__)("Scheduling failed."),default:(0,js.__)("Updating failed.")},l=!i&&r.status in a?a[r.status]:a.default;return o.message&&!/<\/?[^>]*>/.test(o.message)&&(l=[l,o.message].join(" ")),[l,{id:"editor-save"}]}function Jz(e){return[e.error.message&&e.error.code!=="unknown_error"?e.error.message:(0,js.__)("Trashing failed"),{id:"editor-trash-fail"}]}var Dxe=(e,t,r)=>({dispatch:o})=>{if(o.setEditedPost(e.type,e.id),e.status==="auto-draft"&&r){let i;"content"in t?i=t.content:i=e.content.raw;let a=(0,Yv.parse)(i);a=(0,Yv.synchronizeBlocksWithTemplate)(a,r),o.resetEditorBlocks(a,{__unstableShouldCreateUndoLevel:!1})}t&&Object.entries(t).some(([i,a])=>a!==(e[i]?.raw??e[i]))&&o.editPost(t)};function Lxe(){return(0,Nf.default)("wp.data.dispatch( 'core/editor' ).__experimentalTearDownEditor",{since:"6.5"}),{type:"DO_NOTHING"}}function Bxe(){return(0,Nf.default)("wp.data.dispatch( 'core/editor' ).resetPost",{since:"6.0",version:"6.3",alternative:"Initialize the editor with the setupEditorState action"}),{type:"DO_NOTHING"}}function Vxe(){return(0,Nf.default)("wp.data.dispatch( 'core/editor' ).updatePost",{since:"5.7",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function jxe(e){return(0,Nf.default)("wp.data.dispatch( 'core/editor' ).setupEditorState",{since:"6.5",alternative:"wp.data.dispatch( 'core/editor' ).setEditedPost"}),eH(e.type,e.id)}function eH(e,t){return{type:"SET_EDITED_POST",postType:e,postId:t}}var zxe=(e,t)=>({select:r,registry:o})=>{let{id:n,type:i}=r.getCurrentPost();o.dispatch(Ri.store).editEntityRecord("postType",i,n,e,t)},Hxe=(e={})=>async({select:t,dispatch:r,registry:o})=>{if(!t.isEditedPostSaveable())return;let n=t.getEditedPostContent();r.editPost({content:n},{undoIgnore:!0});let i=t.getCurrentPost(),a={id:i.id,...o.select(Ri.store).getEntityRecordNonTransientEdits("postType",i.type,i.id),content:n};r({type:"REQUEST_POST_UPDATE_START",options:e});let l=!1;try{a=await(0,qv.applyFiltersAsync)("editor.preSavePost",a,e)}catch(c){l=c}if(!l)try{await o.dispatch(Ri.store).saveEntityRecord("postType",i.type,a,e)}catch(c){l=c.message&&c.code!=="unknown_error"?c.message:(0,No.__)("An error occurred while updating.")}if(l||(l=o.select(Ri.store).getLastEntitySaveError("postType",i.type,i.id)),!l)try{await(0,qv.applyFilters)("editor.__unstableSavePost",Promise.resolve(),e)}catch(c){l=c}if(!l)try{await(0,qv.doActionAsync)("editor.savePost",{id:i.id,type:i.type},e)}catch(c){l=c}if(r({type:"REQUEST_POST_UPDATE_FINISH",options:e}),typeof window<"u"&&window.__experimentalTemplateActivate&&!e.isAutosave&&i.type==="wp_template"&&(typeof i.id=="number"||/^\d+$/.test(i.id))&&Uxe({select:t,dispatch:r,registry:o}),l){let c=Qz({post:i,edits:a,error:l});c.length&&o.dispatch(wl.store).createErrorNotice(...c)}else{let c=t.getCurrentPost(),u=Xz({previousPost:i,post:c,postType:await o.resolveSelect(Ri.store).getPostType(c.type),options:e});u.length&&o.dispatch(wl.store).createSuccessNotice(...u),e.isAutosave||o.dispatch(Of.store).__unstableMarkLastChangeAsPersistent()}};async function Uxe({select:e,registry:t}){if(e.getEditorSettings().onNavigateToPreviousEntityRecord)return;let{id:o,slug:n}=e.getCurrentPost();if((await t.select(Ri.store).getEntityRecord("root","site")).active_templates[n]===o)return;let l=(await t.resolveSelect(Ri.store).getCurrentTheme())?.default_template_types.find(c=>c.slug===n);await t.dispatch(wl.store).createNotice("info",(0,No.sprintf)((0,No.__)('Do you want to activate this "%s" template?'),l?.title??n),{id:"template-activate-notice",actions:[{label:(0,No.__)("Activate"),onClick:async()=>{await t.dispatch(wl.store).createNotice("info",(0,No.__)("Activating template\u2026"),{id:"template-activate-notice"});try{let c=await t.select(Ri.store).getEntityRecord("root","site");await t.dispatch(Ri.store).saveEntityRecord("root","site",{active_templates:{...c.active_templates,[n]:o}},{throwOnError:!0}),await t.dispatch(wl.store).createSuccessNotice((0,No.__)("Template activated."),{id:"template-activate-notice"})}catch(c){throw await t.dispatch(wl.store).createErrorNotice((0,No.__)("Template activation failed."),{id:"template-activate-notice"}),c}}}]})}function Gxe(){return(0,Nf.default)("wp.data.dispatch( 'core/editor' ).refreshPost",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}var Wxe=()=>async({select:e,dispatch:t,registry:r})=>{let o=e.getCurrentPostType(),n=await r.resolveSelect(Ri.store).getPostType(o),{rest_base:i,rest_namespace:a="wp/v2"}=n;t({type:"REQUEST_POST_DELETE_START"});try{let l=e.getCurrentPost();await(0,$z.default)({path:`/${a}/${i}/${l.id}`,method:"DELETE"}),await t.savePost()}catch(l){r.dispatch(wl.store).createErrorNotice(...Jz({error:l}))}t({type:"REQUEST_POST_DELETE_FINISH"})},Yxe=({local:e=!1,...t}={})=>async({select:r,dispatch:o})=>{let n=r.getCurrentPost();if(e){let i=r.isEditedPostNew(),a=r.getEditedPostAttribute("title"),l=r.getEditedPostAttribute("content"),c=r.getEditedPostAttribute("excerpt");Zz(n.id,i,a,l,c)}else await o.savePost({isAutosave:!0,...t})},qxe=({forceIsAutosaveable:e}={})=>async({select:t,dispatch:r})=>((e||t.isEditedPostAutosaveable())&&!t.isPostLocked()&&(["draft","auto-draft"].includes(t.getEditedPostAttribute("status"))?await r.savePost({isPreview:!0}):await r.autosave({isPreview:!0})),t.getEditedPostPreviewLink()),Kxe=()=>({registry:e})=>{e.dispatch(Ri.store).redo()},Zxe=()=>({registry:e})=>{e.dispatch(Ri.store).undo()};function Xxe(){return(0,Nf.default)("wp.data.dispatch( 'core/editor' ).createUndoLevel",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function Qxe(e){return{type:"UPDATE_POST_LOCK",lock:e}}var Jxe=()=>({registry:e})=>{e.dispatch(yo.store).set("core","isPublishSidebarEnabled",!0)},$xe=()=>({registry:e})=>{e.dispatch(yo.store).set("core","isPublishSidebarEnabled",!1)};function eCe(e){return{type:"LOCK_POST_SAVING",lockName:e}}function tCe(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function rCe(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function oCe(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}var nCe=(e,t={})=>({select:r,dispatch:o,registry:n})=>{let{__unstableShouldCreateUndoLevel:i,selection:a}=t,l={blocks:e,selection:a};if(i!==!1){let{id:c,type:u}=r.getCurrentPost();if(n.select(Ri.store).getEditedEntityRecord("postType",u,c).blocks===l.blocks){n.dispatch(Ri.store).__unstableCreateUndoLevel("postType",u,c);return}l.content=({blocks:f=[]})=>(0,Yv.__unstableSerializeAndClean)(f)}o.editPost(l)};function iCe(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}var sCe=e=>({dispatch:t,registry:r,select:o})=>{o.__unstableIsEditorReady()&&!o.getEditorSettings().isPreviewMode&&r.dispatch(Of.store).clearSelectedBlock(),t({type:"SET_RENDERING_MODE",mode:e})};function aCe(e){return{type:"SET_DEVICE_TYPE",deviceType:e}}var lCe=e=>({registry:t})=>{let r=t.select(yo.store).get("core","inactivePanels")??[],o=!!r?.includes(e),n;o?n=r.filter(i=>i!==e):n=[...r,e],t.dispatch(yo.store).set("core","inactivePanels",n)},cCe=e=>({registry:t})=>{let r=t.select(yo.store).get("core","openPanels")??[],o=!!r?.includes(e),n;o?n=r.filter(i=>i!==e):n=[...r,e],t.dispatch(yo.store).set("core","openPanels",n)};function uCe(e){return{type:"REMOVE_PANEL",panelName:e}}var dCe=e=>({dispatch:t,registry:r})=>{typeof e=="object"&&e.hasOwnProperty("rootClientId")&&e.hasOwnProperty("insertionIndex")&&Y(r.dispatch(Of.store)).setInsertionPoint({rootClientId:e.rootClientId,index:e.insertionIndex}),t({type:"SET_IS_INSERTER_OPENED",value:e})};function fCe(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}var mCe=({createNotice:e=!0}={})=>({dispatch:t,registry:r})=>{let o=r.select(yo.store).get("core","distractionFree");o&&r.dispatch(yo.store).set("core","fixedToolbar",!1),o||r.batch(()=>{r.dispatch(yo.store).set("core","fixedToolbar",!0),t.setIsInserterOpened(!1),t.setIsListViewOpened(!1),Y(r.dispatch(Of.store)).resetZoomLevel()}),r.batch(()=>{r.dispatch(yo.store).set("core","distractionFree",!o),e&&r.dispatch(wl.store).createInfoNotice(o?(0,No.__)("Distraction free mode deactivated."):(0,No.__)("Distraction free mode activated."),{id:"core/editor/distraction-free-mode/notice",type:"snackbar",actions:[{label:(0,No.__)("Undo"),onClick:()=>{r.batch(()=>{r.dispatch(yo.store).set("core","fixedToolbar",o),r.dispatch(yo.store).toggle("core","distractionFree")})}}]})})},pCe=()=>({registry:e})=>{e.dispatch(yo.store).toggle("core","focusMode");let t=e.select(yo.store).get("core","focusMode");e.dispatch(wl.store).createInfoNotice(t?(0,No.__)("Spotlight mode activated."):(0,No.__)("Spotlight mode deactivated."),{id:"core/editor/toggle-spotlight-mode/notice",type:"snackbar",actions:[{label:(0,No.__)("Undo"),onClick:()=>{e.dispatch(yo.store).toggle("core","focusMode")}}]})},hCe=()=>({registry:e})=>{e.dispatch(yo.store).toggle("core","fixedToolbar");let t=e.select(yo.store).get("core","fixedToolbar");e.dispatch(wl.store).createInfoNotice(t?(0,No.__)("Top toolbar activated."):(0,No.__)("Top toolbar deactivated."),{id:"core/editor/toggle-top-toolbar/notice",type:"snackbar",actions:[{label:(0,No.__)("Undo"),onClick:()=>{e.dispatch(yo.store).toggle("core","fixedToolbar")}}]})},gCe=e=>({dispatch:t,registry:r})=>{r.dispatch(yo.store).set("core","editorMode",e),e!=="visual"&&(r.dispatch(Of.store).clearSelectedBlock(),Y(r.dispatch(Of.store)).resetZoomLevel()),e==="visual"?(0,LF.speak)((0,No.__)("Visual editor selected"),"assertive"):e==="text"&&(r.select(yo.store).get("core","distractionFree")&&t.toggleDistractionFree(),(0,LF.speak)((0,No.__)("Code editor selected"),"assertive"))};function vCe(){return{type:"OPEN_PUBLISH_SIDEBAR"}}function yCe(){return{type:"CLOSE_PUBLISH_SIDEBAR"}}function bCe(){return{type:"TOGGLE_PUBLISH_SIDEBAR"}}var Ft=e=>(...t)=>({registry:r})=>{(0,Nf.default)("`wp.data.dispatch( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`",version:"6.2"}),r.dispatch(Of.store)[e](...t)},wCe=Ft("resetBlocks"),SCe=Ft("receiveBlocks"),_Ce=Ft("updateBlock"),xCe=Ft("updateBlockAttributes"),CCe=Ft("selectBlock"),TCe=Ft("startMultiSelect"),PCe=Ft("stopMultiSelect"),ECe=Ft("multiSelect"),kCe=Ft("clearSelectedBlock"),RCe=Ft("toggleSelection"),ACe=Ft("replaceBlocks"),ICe=Ft("replaceBlock"),OCe=Ft("moveBlocksDown"),NCe=Ft("moveBlocksUp"),MCe=Ft("moveBlockToPosition"),FCe=Ft("insertBlock"),DCe=Ft("insertBlocks"),LCe=Ft("showInsertionPoint"),BCe=Ft("hideInsertionPoint"),VCe=Ft("setTemplateValidity"),jCe=Ft("synchronizeTemplate"),zCe=Ft("mergeBlocks"),HCe=Ft("removeBlocks"),UCe=Ft("removeBlock"),GCe=Ft("toggleBlockMode"),WCe=Ft("startTyping"),YCe=Ft("stopTyping"),qCe=Ft("enterFormattedText"),KCe=Ft("exitFormattedText"),ZCe=Ft("insertDefaultBlock"),XCe=Ft("updateBlockListSettings");var d7={};Jn(d7,{createTemplate:()=>K7e,hideBlockTypes:()=>X7e,registerEntityAction:()=>j7e,registerEntityField:()=>H7e,registerPostTypeSchema:()=>Y7e,removeTemplates:()=>$7e,resetStylesNavigation:()=>o9e,restoreRevision:()=>a9e,revertTemplate:()=>J7e,saveDirtyEntities:()=>Q7e,selectNote:()=>l9e,setCurrentRevisionId:()=>n9e,setCurrentTemplateId:()=>q7e,setDefaultRenderingMode:()=>e9e,setIsReady:()=>G7e,setRevisionPage:()=>i9e,setShowRevisionDiff:()=>s9e,setShowStylebook:()=>r9e,setStylesPath:()=>t9e,showBlockTypes:()=>Z7e,unregisterEntityAction:()=>z7e,unregisterEntityField:()=>U7e});var yn=s(Q(),1),Tt=s(N(),1),Qi=s(wt(),1),oce=s(ce(),1),Wg=s(vt(),1),nce=s(vo(),1),ice=s(If(),1),eI=s(lt(),1),u7=s(St(),1),tI=s(go(),1);function NP(e){return e?e.source===WC.custom&&(!!e?.plugin||e?.has_theme_file):!1}var GF={};Jn(GF,{buildRevisionsPageQuery:()=>oh,getCurrentRevision:()=>vTe,getCurrentRevisionId:()=>UF,getDefaultRenderingMode:()=>uTe,getEntityActions:()=>sTe,getEntityFields:()=>lTe,getInserter:()=>tTe,getInserterSidebarToggleRef:()=>oTe,getListViewToggleRef:()=>rTe,getPageRevisions:()=>pTe,getPostBlocksByName:()=>cTe,getPostIcon:()=>nTe,getPreviousRevision:()=>wTe,getRevisionPage:()=>HF,getRevisionsPerPage:()=>mTe,getSelectedNote:()=>yTe,getShowStylebook:()=>fTe,getStylesPath:()=>dTe,hasPostMetaChanges:()=>iTe,isEntityReady:()=>aTe,isNoteFocused:()=>bTe,isRevisionsMode:()=>hTe,isShowingRevisionDiff:()=>gTe});var bH=s(oH(),1),IS=s(ce(),1),Ca=s(U(),1);var zs=s(Q(),1),wH=s(vt(),1);var nH=[];function iH(e,t,r){return e.actions[t]?.[r]??nH}function sH(e,t,r){return e.fields[t]?.[r]??nH}function aH(e,t,r){return e.isReady[t]?.[r]}var An=[];for(let e=0;e<256;++e)An.push((e+256).toString(16).slice(1));function lH(e,t=0){return(An[e[t+0]]+An[e[t+1]]+An[e[t+2]]+An[e[t+3]]+"-"+An[e[t+4]]+An[e[t+5]]+"-"+An[e[t+6]]+An[e[t+7]]+"-"+An[e[t+8]]+An[e[t+9]]+"-"+An[e[t+10]]+An[e[t+11]]+An[e[t+12]]+An[e[t+13]]+An[e[t+14]]+An[e[t+15]]).toLowerCase()}var QCe=new Uint8Array(16);function VF(){return crypto.getRandomValues(QCe)}function JCe(e,t,r){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():$Ce(e,t,r)}function $Ce(e,t,r){e=e||{};let o=e.random??e.rng?.()??VF();if(o.length<16)throw new Error("Random bytes length must be >= 16");if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let n=0;n<16;++n)t[r+n]=o[n];return t}return lH(o)}var Kv=JCe;var AS=s(U(),1),dH=s(Q(),1),fH=s(rh(),1),mH=s(jF(),1);var eTe=()=>{};function MP({additionalData:e={},allowedTypes:t,filesList:r,maxUploadFileSize:o,onError:n=eTe,onFileChange:i,onSuccess:a,multiple:l=!0}){let{receiveEntityRecords:c}=(0,AS.dispatch)(dH.store),{getCurrentPost:u,getEditorSettings:d}=(0,AS.select)(T),{lockPostAutosaving:f,unlockPostAutosaving:m,lockPostSaving:h,unlockPostSaving:g}=(0,AS.dispatch)(T),v=d().allowedMimeTypes,y=window.__clientSideMediaProcessing&&(0,mH.isClientSideMediaSupported)(),b=`image-upload-${Kv()}`;o=o||d().maxUploadFileSize;let S=u(),w=typeof S?.id=="number"?S.id:S?.wp_id,_=()=>{g(b),m(b)};y||(h(b),f(b)),(0,fH.uploadMedia)({allowedTypes:t,filesList:r,onFileChange:k=>{i?.(k);let A=k.filter(R=>R?.id);A?.length&&c("postType","attachment",A,void 0,!0),!y&&A.length===k.length&&_()},onSuccess:a,additionalData:{...w?{post:w}:{},...e},maxUploadFileSize:o,onError:({message:k})=>{y||_(),n(k)},wpAllowedMimeTypes:v,multiple:l})}var pH=s(vo(),1),hH=s(ya(),1);function gH(e){return(0,hH.default)("wp.editor.cleanForSlug",{since:"12.7",plugin:"Gutenberg",alternative:"wp.url.cleanForSlug"}),(0,pH.cleanForSlug)(e)}var vH={rootClientId:void 0,insertionIndex:void 0,filterValue:void 0},zF=["post-only","template-locked"],tTe=(0,Ca.createRegistrySelector)(e=>(0,Ca.createSelector)(t=>{if(typeof t.blockInserterPanel=="object")return t.blockInserterPanel;if(IP(t)==="template-locked"){let{getBlocksByName:r,getSelectedBlockClientId:o,getBlockParents:n,getBlockOrder:i}=e(IS.store),[a]=r("core/post-content");if(a){let l=o();return l&&l!==a&&n(l).includes(a)?vH:{rootClientId:a,insertionIndex:i(a).length,filterValue:void 0}}}return vH},t=>{let{getBlocksByName:r,getSelectedBlockClientId:o,getBlockParents:n,getBlockOrder:i}=e(IS.store),[a]=r("core/post-content"),l=o();return[t.blockInserterPanel,IP(t),a,l,l?n(l):void 0,a?i(a).length:void 0]}));function rTe(e){return e.listViewToggleRef}function oTe(e){return e.inserterSidebarToggleRef}var yH={wp_block:_S,wp_navigation:jM,page:kf,post:EF},nTe=(0,Ca.createRegistrySelector)(e=>(t,r,o)=>{{if(r==="wp_template_part"||r==="wp_template"){let a=(e(zs.store).getCurrentTheme()?.default_template_part_areas||[]).find(l=>o.area===l.area);return a?.icon?Rf(a.icon):bl}if(yH[r])return yH[r];let n=e(zs.store).getPostType(r);return typeof n?.icon=="string"&&n.icon.startsWith("dashicons-")?n.icon.slice(10):kf}}),iTe=(0,Ca.createRegistrySelector)(e=>(t,r,o)=>{let{type:n,id:i}=Go(t),a=e(zs.store).getEntityRecordNonTransientEdits("postType",r||n,o||i);if(!a?.meta)return!1;let l=e(zs.store).getEntityRecord("postType",r||n,o||i)?.meta;return!(0,bH.default)({...l,footnotes:void 0},{...a.meta,footnotes:void 0})});function sTe(e,...t){return iH(e.dataviews,...t)}function aTe(e,...t){return aH(e.dataviews,...t)}function lTe(e,...t){return sH(e.dataviews,...t)}var cTe=(0,Ca.createRegistrySelector)(e=>(0,Ca.createSelector)((t,r)=>{r=Array.isArray(r)?r:[r];let{getBlocksByName:o,getBlockParents:n,getBlockName:i}=e(IS.store);return o(r).filter(a=>n(a).every(l=>{let c=i(l);return c!=="core/query"&&!r.includes(c)}))},(t,r)=>{r=Array.isArray(r)?r:[r];let{getBlocksByName:o,getBlockParents:n}=e(IS.store),i=o(r),a=i.map(l=>n(l));return[i,...a]})),uTe=(0,Ca.createRegistrySelector)(e=>(t,r)=>{let{getPostType:o,getCurrentTheme:n,hasFinishedResolution:i}=e(zs.store),a=n(),l=o(r);if(!i("getPostType",[r])||!i("getCurrentTheme"))return;let c=a?.stylesheet,u=e(wH.store).get("core","renderingModes")?.[c]?.[r];if(zF.includes(u))return u;let d=Array.isArray(l?.supports?.editor)?l.supports.editor.find(m=>"default-mode"in m)?.["default-mode"]:void 0;if(zF.includes(d))return d;let f=MF(t).defaultRenderingMode;return zF.includes(f)?f:"post-only"});function dTe(e){return e.stylesPath??"/"}function fTe(e){return e.showStylebook??!1}function HF(e){return e.revisionPage}function oh(e,t){return{per_page:SH,page:t,context:"edit",orderby:"date",order:"desc",_fields:[...new Set(["id","date","modified","author","meta","title.raw","excerpt.raw","content.raw",e])].join()}}var SH=100;function mTe(){return SH}var pTe=(0,Ca.createRegistrySelector)(e=>(t,r)=>{if(!r)return null;let{type:o,id:n}=Go(t);if(!o||!n)return null;let a=e(zs.store).getEntityConfig("postType",o)?.revisionKey||"id";return e(zs.store).getRevisions("postType",o,n,oh(a,r))});function hTe(e){return e.revisionId!==null}function gTe(e){return e.showRevisionDiff}function UF(e){return e.revisionId}var vTe=(0,Ca.createRegistrySelector)(e=>t=>{let r=UF(t);if(!r)return;let o=HF(t);if(!o)return null;let{type:n,id:i}=Go(t),l=e(zs.store).getEntityConfig("postType",n)?.revisionKey||"id",c=e(zs.store).getRevisions("postType",n,i,oh(l,o));return c?c.find(u=>u[l]===r)??null:null});function yTe(e){return e.selectedNote?.noteId}function bTe(e){return!!e.selectedNote?.options?.focus}var wTe=(0,Ca.createRegistrySelector)(e=>t=>{let r=UF(t);if(!r)return;let o=HF(t);if(!o)return null;let{type:n,id:i}=Go(t),l=e(zs.store).getEntityConfig("postType",n)?.revisionKey||"id",c=oh(l,o),u=e(zs.store).getRevisions("postType",n,i,c);if(!u)return null;let d=u.findIndex(h=>h[l]===r);if(d>=0&&d<u.length-1)return u[d+1];let f=OF(t),m=Math.ceil(f/c.per_page)||1;return d===u.length-1&&o<m?e(zs.store).getRevisions("postType",n,i,oh(l,o+1))?.[0]??null:null});var $A=s(Q(),1),rce=s(tn(),1);var NH=s(N(),1);var Ai=s(H(),1);var BP=s(we(),1),EH=s(U(),1),Zv=s(V(),1),kH=s(wt(),1),RH=s(vo(),1),nh=s(N(),1);var PH=s(vo(),1);var FP=s(St(),1),xH=s(N(),1);function CH(e){return e.type==="wp_template"}function TH(e){return e.type==="wp_template_part"}function Lu(e){return e.type==="wp_template"||e.type==="wp_template_part"}function Qe(e,t=(0,xH.__)("(no title)")){let r="";return typeof e.title=="string"?r=(0,FP.decodeEntities)(e.title):e.title&&"rendered"in e.title?r=(0,FP.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title&&(r=(0,FP.decodeEntities)(e.title.raw)),r||t}function DP(e){return e?[e.source,e.source].includes("custom")&&!(e.type==="wp_template"&&e?.plugin)&&!e.has_theme_file:!1}var LP=e=>typeof e!="object"?"":e.slug||(0,PH.cleanForSlug)(Qe(e))||e.id.toString();var on=s(x(),1),AH=({field:e,onChange:t,data:r})=>{let{id:o}=e,n=e.getValue({item:r})||LP(r),i=r.permalink_template||"",a=/%(?:postname|pagename)%/,[l,c]=i.split(a),u=l,d=c,f=a.test(i),m=(0,Zv.useRef)(n),h=n||m.current,g=f?`${u}${h}${d}`:(0,RH.safeDecodeURIComponent)(r.link||"");(0,Zv.useEffect)(()=>{n&&m.current===void 0&&(m.current=n)},[n]);let v=(0,Zv.useCallback)(w=>t({[o]:w}),[o,t]),{createNotice:y}=(0,EH.useDispatch)(kH.store),b=(0,BP.useCopyToClipboard)(g,()=>{y("info",(0,nh.__)("Copied Permalink to clipboard."),{isDismissible:!0,type:"snackbar"})}),S="editor-post-url__slug-description-"+(0,BP.useInstanceId)(AH);return(0,on.jsxs)("fieldset",{className:"fields-controls__slug",children:[f&&(0,on.jsxs)(Ai.__experimentalVStack,{children:[(0,on.jsxs)(Ai.__experimentalVStack,{spacing:"0px",children:[(0,on.jsx)("span",{children:(0,nh.__)("Customize the last part of the Permalink.")}),(0,on.jsx)(Ai.ExternalLink,{href:"https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink",children:(0,nh.__)("Learn more")})]}),(0,on.jsx)(Ai.__experimentalInputControl,{__next40pxDefaultSize:!0,prefix:(0,on.jsx)(Ai.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,on.jsx)(Ai.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,on.jsx)(Ai.Button,{size:"small",icon:tS,ref:b,label:(0,nh.__)("Copy")})}),label:(0,nh.__)("Link"),hideLabelFromVision:!0,value:n,autoComplete:"off",spellCheck:"false",type:"text",className:"fields-controls__slug-input",onChange:w=>{v(w)},onBlur:()=>{n===""&&v(m.current)},"aria-describedby":S}),(0,on.jsxs)("div",{className:"fields-controls__slug-help",children:[(0,on.jsx)("span",{className:"fields-controls__slug-help-visual-label",children:(0,nh.__)("Permalink:")}),(0,on.jsxs)(Ai.ExternalLink,{className:"fields-controls__slug-help-link",href:g,children:[(0,on.jsx)("span",{className:"fields-controls__slug-help-prefix",children:u}),(0,on.jsx)("span",{className:"fields-controls__slug-help-slug",children:h}),(0,on.jsx)("span",{className:"fields-controls__slug-help-suffix",children:d})]})]})]}),!f&&(0,on.jsx)(Ai.ExternalLink,{className:"fields-controls__slug-help",href:g,children:g})]})},IH=AH;var VP=s(V(),1);var STe=({item:e})=>{let t=LP(e),r=(0,VP.useRef)(t);return(0,VP.useEffect)(()=>{t&&r.current===void 0&&(r.current=t)},[t]),`${t||r.current}`},OH=STe;var _Te={id:"slug",type:"text",label:(0,NH.__)("Slug"),Edit:IH,render:OH,filterBy:!1},WF=_Te;var YF=s(N(),1);function MH(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=MH(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function xTe(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=MH(e))&&(o&&(o+=" "),o+=t);return o}var K=xTe;var FH=s(H(),1),DH=s(N(),1);var OS=s(x(),1);function NS({item:e,className:t,children:r}){let o=Qe(e);return(0,OS.jsxs)(FH.__experimentalHStack,{className:K("fields-field__title",t),alignment:"center",justify:"flex-start",children:[(0,OS.jsx)("span",{children:o||(0,DH.__)("(no title)")}),r]})}function jP({item:e}){return(0,OS.jsx)(NS,{item:e})}var CTe={type:"text",id:"title",label:(0,YF.__)("Title"),placeholder:(0,YF.__)("No title"),getValue:({item:e})=>Qe(e),render:jP,enableHiding:!0,enableGlobalSearch:!0,filterBy:!1},zP=CTe;var ZF=s(N(),1);var qF=s(N(),1),BH=s(U(),1),VH=s(Q(),1),jH=s(H(),1);var LH=s(th(),1),{lock:UXe,unlock:nn}=(0,LH.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/fields");var KF=s(x(),1),{Badge:TTe}=nn(jH.privateApis);function zH({item:e}){let{frontPageId:t,postsPageId:r}=(0,BH.useSelect)(o=>{let{getEntityRecord:n}=o(VH.store),i=n("root","site");return{frontPageId:i?.page_on_front,postsPageId:i?.page_for_posts}},[]);return(0,KF.jsx)(NS,{item:e,className:"fields-field__page-title",children:[t,r].includes(e.id)&&(0,KF.jsx)(TTe,{children:e.id===t?(0,qF.__)("Homepage"):(0,qF.__)("Posts Page")})})}var PTe={type:"text",id:"title",label:(0,ZF.__)("Title"),placeholder:(0,ZF.__)("No title"),getValue:({item:e})=>Qe(e),render:zH,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},XF=PTe;var QF=s(N(),1);var ETe={type:"text",label:(0,QF.__)("Template"),placeholder:(0,QF.__)("No title"),id:"title",getValue:({item:e})=>Qe(e),render:jP,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},MS=ETe;var JF=s(N(),1);var UH=s(N(),1);var GH=s(H(),1),WH=s(Sl(),1);var HP=s(x(),1),{PATTERN_TYPES:kTe}=nn(WH.privateApis);function YH({item:e}){return(0,HP.jsx)(NS,{item:e,className:"fields-field__pattern-title",children:e.type===kTe.theme&&(0,HP.jsx)(GH.Tooltip,{placement:"top",text:(0,UH.__)("This pattern cannot be edited."),children:(0,HP.jsx)(Uo,{icon:FM,size:24})})})}var RTe={type:"text",id:"title",label:(0,JF.__)("Title"),placeholder:(0,JF.__)("No title"),getValue:({item:e})=>Qe(e),render:YH,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},FS=RTe;var AD=s(N(),1);var jt=s(H(),1),yh=s(DS(),1),ED=s(Q(),1),s_=s(U(),1),Rr=s(V(),1),Ni=s(N(),1);var XU=s(V(),1);var ih=s(Ye(),1);function ZH({controlled:e,default:t,name:r,state:o="value"}){let{current:n}=ih.useRef(e!==void 0),[i,a]=ih.useState(t),l=n?e:i,c=ih.useCallback(u=>{n||a(u)},[]);return[l,c]}var e4=s(Ye(),1);var QH=s(Ye(),1),XH={};function sh(e,t){let r=QH.useRef(XH);return r.current===XH&&(r.current=e(t)),r}var $F=e4[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],ATe=$F&&$F!==e4.useLayoutEffect?$F:e=>e();function Ta(e){let t=sh(ITe).current;return t.next=e,ATe(t.effect),t.trampoline}function ITe(){let e={next:void 0,callback:OTe,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function OTe(){}var JH=s(Ye(),1),NTe=()=>{},In=typeof document<"u"?JH.useLayoutEffect:NTe;function MTe(e,t){return function(o,...n){let i=new URL(e);return i.searchParams.set("code",o.toString()),n.forEach(a=>i.searchParams.append("args[]",a)),`${t} error #${o}; visit ${i} for the full message.`}}var FTe=MTe("https://base-ui.com/production-error","Base UI"),Xv=FTe;var ah=s(Ye(),1);function LS(e,t,r,o){let n=sh(eU).current;return DTe(n,e,t,r,o)&&tU(n,[e,t,r,o]),n.callback}function $H(e){let t=sh(eU).current;return LTe(t,e)&&tU(t,e),t.callback}function eU(){return{callback:null,cleanup:null,refs:[]}}function DTe(e,t,r,o,n){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==o||e.refs[3]!==n}function LTe(e,t){return e.refs.length!==t.length||e.refs.some((r,o)=>r!==t[o])}function tU(e,t){if(e.refs=t,t.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){let o=Array(t.length).fill(null);for(let n=0;n<t.length;n+=1){let i=t[n];if(i!=null)switch(typeof i){case"function":{let a=i(r);typeof a=="function"&&(o[n]=a);break}case"object":{i.current=r;break}default:}}e.cleanup=()=>{for(let n=0;n<t.length;n+=1){let i=t[n];if(i!=null)switch(typeof i){case"function":{let a=o[n];typeof a=="function"?a():i(null);break}case"object":{i.current=null;break}default:}}}}}}var nU=s(Ye(),1);var rU=s(Ye(),1),BTe=parseInt(rU.version,10);function oU(e){return BTe>=e}function t4(e){if(!nU.isValidElement(e))return null;let t=e,r=t.props;return(oU(19)?r?.ref:t.ref)??null}function BS(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var _Qe=Object.freeze([]),Mf=Object.freeze({});function iU(e,t){let r={};for(let o in e){let n=e[o];if(t?.hasOwnProperty(o)){let i=t[o](n);i!=null&&Object.assign(r,i);continue}n===!0?r[`data-${o.toLowerCase()}`]="":n&&(r[`data-${o.toLowerCase()}`]=n.toString())}return r}function sU(e,t){return typeof e=="function"?e(t):e}function aU(e,t){return typeof e=="function"?e(t):e}var r4={};function bo(e,t,r,o,n){if(!r&&!o&&!n&&!e)return UP(t);let i=UP(e);return t&&(i=VS(i,t)),r&&(i=VS(i,r)),o&&(i=VS(i,o)),n&&(i=VS(i,n)),i}function lU(e){if(e.length===0)return r4;if(e.length===1)return UP(e[0]);let t=UP(e[0]);for(let r=1;r<e.length;r+=1)t=VS(t,e[r]);return t}function UP(e){return o4(e)?{...uU(e,r4)}:VTe(e)}function VS(e,t){return o4(t)?uU(t,e):jTe(e,t)}function VTe(e){let t={...e};for(let r in t){let o=t[r];cU(r,o)&&(t[r]=dU(o))}return t}function jTe(e,t){if(!t)return e;for(let r in t){let o=t[r];switch(r){case"style":{e[r]=BS(e.style,o);break}case"className":{e[r]=n4(e.className,o);break}default:cU(r,o)?e[r]=zTe(e[r],o):e[r]=o}}return e}function cU(e,t){let r=e.charCodeAt(0),o=e.charCodeAt(1),n=e.charCodeAt(2);return r===111&&o===110&&n>=65&&n<=90&&(typeof t=="function"||typeof t>"u")}function o4(e){return typeof e=="function"}function uU(e,t){return o4(e)?e(t):e??r4}function zTe(e,t){return t?e?(...r)=>{let o=r[0];if(fU(o)){let i=o;jS(i);let a=t(...r);return i.baseUIHandlerPrevented||e?.(...r),a}let n=t(...r);return e?.(...r),n}:dU(t):e}function dU(e){return e&&((...t)=>{let r=t[0];return fU(r)&&jS(r),e(...t)})}function jS(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function n4(e,t){return t?e?t+" "+e:t:e}function fU(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var i4=s(Ye(),1);function Ff(e,t,r={}){let o=t.render,n=HTe(t,r);if(r.enabled===!1)return null;let i=r.state??Mf;return WTe(e,o,n,i)}function HTe(e,t={}){let{className:r,style:o,render:n}=e,{state:i=Mf,ref:a,props:l,stateAttributesMapping:c,enabled:u=!0}=t,d=u?sU(r,i):void 0,f=u?aU(o,i):void 0,m=u?iU(i,c):Mf,h=u&&l?UTe(l):void 0,g=u?BS(m,h)??{}:Mf;return typeof document<"u"&&(u?Array.isArray(a)?g.ref=$H([g.ref,t4(n),...a]):g.ref=LS(g.ref,t4(n),a):LS(null,null)),u?(d!==void 0&&(g.className=n4(g.className,d)),f!==void 0&&(g.style=BS(g.style,f)),g):Mf}function UTe(e){return Array.isArray(e)?lU(e):bo(void 0,e)}var GTe=Symbol.for("react.lazy");function WTe(e,t,r,o){if(t){if(typeof t=="function")return t(r,o);let n=bo(r,t.props);n.ref=r.ref;let i=t;return i?.$$typeof===GTe&&(i=ah.Children.toArray(t)[0]),ah.cloneElement(i,n)}if(e&&typeof e=="string")return YTe(e,r);throw new Error(Xv(8))}function YTe(e,t){return e==="button"?(0,i4.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,i4.createElement)("img",{alt:"",...t,key:t.key}):ah.createElement(e,t)}var Qv={};Jn(Qv,{cancelOpen:()=>wPe,chipRemovePress:()=>rPe,clearPress:()=>tPe,closePress:()=>$Te,closeWatcher:()=>mPe,decrementPress:()=>iPe,disabled:()=>_Pe,drag:()=>vPe,escapeKey:()=>fPe,focusOut:()=>dPe,imperativeAction:()=>xPe,incrementPress:()=>nPe,inputBlur:()=>lPe,inputChange:()=>sPe,inputClear:()=>aPe,inputPaste:()=>cPe,inputPress:()=>uPe,itemPress:()=>JTe,keyboard:()=>hPe,linkPress:()=>ePe,listNavigation:()=>pPe,none:()=>qTe,outsidePress:()=>QTe,pointer:()=>gPe,scrub:()=>bPe,siblingOpen:()=>SPe,swipe:()=>CPe,trackPress:()=>oPe,triggerFocus:()=>XTe,triggerHover:()=>ZTe,triggerPress:()=>KTe,wheel:()=>yPe,windowResize:()=>TPe});var qTe="none",KTe="trigger-press",ZTe="trigger-hover",XTe="trigger-focus",QTe="outside-press",JTe="item-press",$Te="close-press",ePe="link-press",tPe="clear-press",rPe="chip-remove-press",oPe="track-press",nPe="increment-press",iPe="decrement-press",sPe="input-change",aPe="input-clear",lPe="input-blur",cPe="input-paste",uPe="input-press",dPe="focus-out",fPe="escape-key",mPe="close-watcher",pPe="list-navigation",hPe="keyboard",gPe="pointer",vPe="drag",yPe="wheel",bPe="scrub",wPe="cancel-open",SPe="sibling-open",_Pe="disabled",xPe="imperative-action",CPe="swipe",TPe="window-resize";function GP(e,t,r,o){let n=!1,i=!1,a=o??Mf;return{reason:e,event:t??new Event("base-ui"),cancel(){n=!0},allowPropagation(){i=!0},get isCanceled(){return n},get isPropagationAllowed(){return i},trigger:r,...a}}var WP=s(Ye(),1);var PPe=s(Ye(),1),mU={...PPe};var pU=0;function EPe(e,t="mui"){let[r,o]=WP.useState(e),n=e||r;return WP.useEffect(()=>{r==null&&(pU+=1,o(`${t}-${pU}`))},[r,t]),n}var hU=mU.useId;function gU(e,t){if(hU!==void 0){let r=hU();return e??(t?`${t}-${r}`:r)}return EPe(e,t)}function vU(e){return gU(e,"base-ui")}var Hs=s(Ye(),1);var SU=s(YP(),1);var bU=s(Ye(),1),kPe=[];function qP(e){bU.useEffect(e,kPe)}var KP=null,QQe=globalThis.requestAnimationFrame,s4=class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;let r=this.callbacks,o=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,o>0)for(let n=0;n<r.length;n+=1)r[n]?.(t)};request(t){let r=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),r}cancel(t){let r=t-this.startId;r<0||r>=this.callbacks.length||(this.callbacks[r]=null,this.callbacksCount-=1)}},ZP=new s4,Hr=class e{static create(){return new e}static request(t){return ZP.request(t)}static cancel(t){return ZP.cancel(t)}currentId=KP;request(t){this.cancel(),this.currentId=ZP.request(()=>{this.currentId=KP,t()})}cancel=()=>{this.currentId!==KP&&(ZP.cancel(this.currentId),this.currentId=KP)};disposeEffect=()=>this.cancel};function XP(){let e=sh(Hr.create).current;return qP(e.disposeEffect),e}function wU(e){return e==null?e:"current"in e?e.current:e}var lh=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({}),RPe={[lh.startingStyle]:""},APe={[lh.endingStyle]:""},QP={transitionStatus(e){return e==="starting"?RPe:e==="ending"?APe:null}};function JP(e,t=!1,r=!0){let o=XP();return Ta((n,i=null)=>{o.cancel();let a=wU(e);if(a==null)return;let l=a,c=()=>{SU.flushSync(n)};if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){n();return}function u(){Promise.all(l.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||c()}).catch(()=>{if(r){i?.aborted||c();return}let d=l.getAnimations();!i?.aborted&&d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&u()})}if(t){let d=lh.startingStyle;if(!l.hasAttribute(d)){o.request(u);return}let f=new MutationObserver(()=>{l.hasAttribute(d)||(f.disconnect(),u())});f.observe(l,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0});return}o.request(u)})}var a4=s(Ye(),1);function _U(e,t=!1,r=!1){let[o,n]=a4.useState(e&&t?"idle":void 0),[i,a]=a4.useState(e);return e&&!i&&(a(!0),n("starting")),!e&&i&&o!=="ending"&&!r&&n("ending"),!e&&!i&&o==="ending"&&n(void 0),In(()=>{if(!e&&i&&o!=="ending"&&r){let l=Hr.request(()=>{n("ending")});return()=>{Hr.cancel(l)}}},[e,i,o,r]),In(()=>{if(!e||t)return;let l=Hr.request(()=>{n(void 0)});return()=>{Hr.cancel(l)}},[t,e]),In(()=>{if(!e||!t)return;e&&i&&o!=="idle"&&n("starting");let l=Hr.request(()=>{n("idle")});return()=>{Hr.cancel(l)}},[t,e,i,o]),{mounted:i,setMounted:a,transitionStatus:o}}function xU(e){let{open:t,defaultOpen:r,onOpenChange:o,disabled:n}=e,i=t!==void 0,[a,l]=ZH({controlled:t,default:r,name:"Collapsible",state:"open"}),{mounted:c,setMounted:u,transitionStatus:d}=_U(a,!0,!0),[f,m]=Hs.useState(a),[{height:h,width:g},v]=Hs.useState({height:void 0,width:void 0}),y=vU(),[b,S]=Hs.useState(),w=b??y,[_,C]=Hs.useState(!1),[k,A]=Hs.useState(!1),R=Hs.useRef(null),I=Hs.useRef(null),B=Hs.useRef(null),E=Hs.useRef(null),P=JP(E,!1),L=Ta(j=>{let z=!a,W=GP(Qv.triggerPress,j.nativeEvent);if(o(z,W),W.isCanceled)return;let O=E.current;I.current==="css-animation"&&O!=null&&O.style.removeProperty("animation-name"),!_&&!k&&(I.current!=null&&I.current!=="css-animation"&&!c&&z&&u(!0),I.current==="css-animation"&&(!f&&z&&m(!0),!c&&z&&u(!0))),l(z),I.current==="none"&&c&&!z&&u(!1)});return In(()=>{i&&I.current==="none"&&!a&&u(!1)},[i,a,t,u]),Hs.useMemo(()=>({abortControllerRef:R,animationTypeRef:I,disabled:n,handleTrigger:L,height:h,mounted:c,open:a,panelId:w,panelRef:E,runOnceAnimationsFinish:P,setDimensions:v,setHiddenUntilFound:C,setKeepMounted:A,setMounted:u,setOpen:l,setPanelIdState:S,setVisible:m,transitionDimensionRef:B,transitionStatus:d,visible:f,width:g}),[R,I,n,L,h,c,a,w,E,P,v,C,A,u,l,m,B,d,f,g])}var $P=s(Ye(),1),l4=$P.createContext(void 0);function eE(){let e=$P.useContext(l4);if(e===void 0)throw new Error(Xv(15));return e}var ch=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=lh.startingStyle]="startingStyle",e[e.endingStyle=lh.endingStyle]="endingStyle",e})({});var CU=(function(e){return e.panelOpen="data-panel-open",e})({});var IPe={[ch.open]:""},OPe={[ch.closed]:""},TU={open(e){return e?{[CU.panelOpen]:""}:null}},PU={open(e){return e?IPe:OPe}};var Jv=s(Ye(),1);function NPe(){return typeof window<"u"}function MPe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function EU(e){return NPe()?e instanceof HTMLElement||e instanceof MPe(e).HTMLElement:!1}var tE=s(Ye(),1),FPe=tE.createContext(void 0);function kU(e=!1){let t=tE.useContext(FPe);if(t===void 0&&!e)throw new Error(Xv(16));return t}var RU=s(Ye(),1);function AU(e){let{focusableWhenDisabled:t,disabled:r,composite:o=!1,tabIndex:n=0,isNativeButton:i}=e,a=o&&t!==!1,l=o&&t===!1;return{props:RU.useMemo(()=>{let u={onKeyDown(d){r&&t&&d.key!=="Tab"&&d.preventDefault()}};return o||(u.tabIndex=n,!i&&r&&(u.tabIndex=t?n:-1)),(i&&(t||a)||!i&&r)&&(u["aria-disabled"]=r),i&&(!t||l)&&(u.disabled=r),u},[o,r,t,a,l,i,n])}}function u4(e={}){let{disabled:t=!1,focusableWhenDisabled:r,tabIndex:o=0,native:n=!0,composite:i}=e,a=Jv.useRef(null),l=kU(!0),c=i??l!==void 0,{props:u}=AU({focusableWhenDisabled:r,disabled:t,composite:c,tabIndex:o,isNativeButton:n}),d=Jv.useCallback(()=>{let h=a.current;c4(h)&&c&&t&&u.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,u.disabled,c]);In(d,[d]);let f=Jv.useCallback((h={})=>{let{onClick:g,onMouseDown:v,onKeyUp:y,onKeyDown:b,onPointerDown:S,...w}=h;return bo({type:n?"button":void 0,onClick(C){if(t){C.preventDefault();return}g?.(C)},onMouseDown(C){t||v?.(C)},onKeyDown(C){if(t||(jS(C),b?.(C),C.baseUIHandlerPrevented))return;let k=C.target===C.currentTarget,A=C.currentTarget,R=c4(A),I=!n&&DPe(A),B=k&&(n?R:!I),E=C.key==="Enter",P=C.key===" ",L=A.getAttribute("role"),j=L?.startsWith("menuitem")||L==="option"||L==="gridcell";if(k&&c&&P){if(C.defaultPrevented&&j)return;C.preventDefault(),I||n&&R?(A.click(),C.preventBaseUIHandler()):B&&(g?.(C),C.preventBaseUIHandler());return}B&&(!n&&(P||E)&&C.preventDefault(),!n&&E&&g?.(C))},onKeyUp(C){if(!t){if(jS(C),y?.(C),C.target===C.currentTarget&&n&&c&&c4(C.currentTarget)&&C.key===" "){C.preventDefault();return}C.baseUIHandlerPrevented||C.target===C.currentTarget&&!n&&!c&&C.key===" "&&g?.(C)}},onPointerDown(C){if(t){C.preventDefault();return}S?.(C)}},n?void 0:{role:"button"},u,w)},[t,u,c,n]),m=Ta(h=>{a.current=h,d()});return{getButtonProps:f,buttonRef:m}}function c4(e){return EU(e)&&e.tagName==="BUTTON"}function DPe(e){return!!(e?.tagName==="A"&&e?.href)}var pc=s(Ye(),1);function IU(e,t,r,o){return e.addEventListener(t,r,o),()=>{e.removeEventListener(t,r,o)}}var OU=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e})({});function NU(e){let{abortControllerRef:t,animationTypeRef:r,externalRef:o,height:n,hiddenUntilFound:i,keepMounted:a,id:l,mounted:c,onOpenChange:u,open:d,panelRef:f,runOnceAnimationsFinish:m,setDimensions:h,setMounted:g,setOpen:v,setVisible:y,transitionDimensionRef:b,visible:S,width:w}=e,_=pc.useRef(!1),C=pc.useRef(null),k=pc.useRef(d),A=pc.useRef(d),R=XP(),I=pc.useMemo(()=>r.current==="css-animation"?!S:!d&&!c,[d,c,S,r]),B=Ta(P=>{if(!P)return;if(r.current==null||b.current==null){let z=getComputedStyle(P),W=z.animationName!=="none"&&z.animationName!=="",O=z.transitionDuration!=="0s"&&z.transitionDuration!=="";W&&O||(z.animationName==="none"&&z.transitionDuration!=="0s"?r.current="css-transition":z.animationName!=="none"&&z.transitionDuration==="0s"?r.current="css-animation":r.current="none"),P.getAttribute(OU.orientation)==="horizontal"||z.transitionProperty.indexOf("width")>-1?b.current="width":b.current="height"}if(r.current!=="css-transition")return;(n===void 0||w===void 0)&&(h({height:P.scrollHeight,width:P.scrollWidth}),A.current&&P.style.setProperty("transition-duration","0s"));let L=-1,j=-1;return L=Hr.request(()=>{A.current=!1,j=Hr.request(()=>{setTimeout(()=>{P.style.removeProperty("transition-duration")})})}),()=>{Hr.cancel(L),Hr.cancel(j)}}),E=LS(o,f,B);return In(()=>{if(r.current!=="css-transition")return;let P=f.current;if(!P)return;let L=-1;if(t.current!=null&&(t.current.abort(),t.current=null),d){let j={"justify-content":P.style.justifyContent,"align-items":P.style.alignItems,"align-content":P.style.alignContent,"justify-items":P.style.justifyItems};Object.keys(j).forEach(z=>{P.style.setProperty(z,"initial","important")}),!A.current&&!a&&P.setAttribute(ch.startingStyle,""),h({height:P.scrollHeight,width:P.scrollWidth}),L=Hr.request(()=>{Object.entries(j).forEach(([z,W])=>{W===""?P.style.removeProperty(z):P.style.setProperty(z,W)})})}else{if(P.scrollHeight===0&&P.scrollWidth===0)return;h({height:P.scrollHeight,width:P.scrollWidth});let j=new AbortController;t.current=j;let z=j.signal,W=null,O=ch.endingStyle;return W=new MutationObserver(M=>{M.some(G=>G.type==="attributes"&&G.attributeName===O)&&(W?.disconnect(),W=null,m(()=>{h({height:0,width:0}),P.style.removeProperty("content-visibility"),g(!1),t.current===j&&(t.current=null)},z))}),W.observe(P,{attributes:!0,attributeFilter:[O]}),()=>{W?.disconnect(),R.cancel(),t.current===j&&(j.abort(),t.current=null)}}return()=>{Hr.cancel(L)}},[t,r,R,i,a,c,d,f,m,h,g]),In(()=>{if(r.current!=="css-animation")return;let P=f.current;P&&(C.current=P.style.animationName||C.current,P.style.setProperty("animation-name","none"),h({height:P.scrollHeight,width:P.scrollWidth}),!k.current&&!_.current&&P.style.removeProperty("animation-name"),d?(t.current!=null&&(t.current.abort(),t.current=null),g(!0),y(!0)):(t.current=new AbortController,m(()=>{g(!1),y(!1),t.current=null},t.current.signal)))},[t,r,d,f,m,h,g,y,S]),qP(()=>{let P=Hr.request(()=>{k.current=!1});return()=>Hr.cancel(P)}),In(()=>{if(!i)return;let P=f.current;if(!P)return;let L=-1,j=-1;return d&&_.current&&(P.style.transitionDuration="0s",h({height:P.scrollHeight,width:P.scrollWidth}),L=Hr.request(()=>{_.current=!1,j=Hr.request(()=>{setTimeout(()=>{P.style.removeProperty("transition-duration")})})})),()=>{Hr.cancel(L),Hr.cancel(j)}},[i,d,f,h]),In(()=>{let P=f.current;P&&i&&I&&(P.setAttribute("hidden","until-found"),r.current==="css-transition"&&P.setAttribute(ch.startingStyle,""))},[i,I,r,f]),pc.useEffect(function(){let L=f.current;if(!L)return;function j(z){_.current=!0,v(!0),u(!0,GP(Qv.none,z))}return IU(L,"beforematch",j)},[u,f,v]),pc.useMemo(()=>({props:{hidden:I,id:l,ref:E}}),[I,l,E])}var MU=s(Ye(),1);function FU(e){let{enabled:t=!0,open:r,ref:o,onComplete:n}=e,i=Ta(n),a=JP(o,r,!1);MU.useEffect(()=>{if(!t)return;let l=new AbortController;return a(i,l.signal),()=>{l.abort()}},[t,r,i,a])}var Df={};Jn(Df,{Panel:()=>UU,Root:()=>zU,Trigger:()=>HU});var zS=s(Ye(),1);var rE={...PU,...QP};var jU=s(x(),1),zU=zS.forwardRef(function(t,r){let{render:o,className:n,defaultOpen:i=!1,disabled:a=!1,onOpenChange:l,open:c,style:u,...d}=t,f=Ta(l),m=xU({open:c,defaultOpen:i,onOpenChange:f,disabled:a}),h=zS.useMemo(()=>({open:m.open,disabled:m.disabled,transitionStatus:m.transitionStatus}),[m.open,m.disabled,m.transitionStatus]),g=zS.useMemo(()=>({...m,onOpenChange:f,state:h}),[m,f,h]),v=Ff("div",t,{state:h,ref:r,props:d,stateAttributesMapping:rE});return(0,jU.jsx)(l4.Provider,{value:g,children:v})});var oE=s(Ye(),1);var YPe={...TU,...QP},HU=oE.forwardRef(function(t,r){let{panelId:o,open:n,handleTrigger:i,state:a,disabled:l}=eE(),{className:c,disabled:u=l,id:d,render:f,nativeButton:m=!0,style:h,...g}=t,{getButtonProps:v,buttonRef:y}=u4({disabled:u,focusableWhenDisabled:!0,native:m}),b=oE.useMemo(()=>({"aria-controls":n?o:void 0,"aria-expanded":n,onClick:i}),[o,n,i]);return Ff("button",t,{state:a,ref:[r,y],props:[b,g,v],stateAttributesMapping:YPe})});var nE=s(Ye(),1);var f4=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});var UU=nE.forwardRef(function(t,r){let{className:o,hiddenUntilFound:n,keepMounted:i,render:a,id:l,style:c,...u}=t,{abortControllerRef:d,animationTypeRef:f,height:m,mounted:h,onOpenChange:g,open:v,panelId:y,panelRef:b,runOnceAnimationsFinish:S,setDimensions:w,setHiddenUntilFound:_,setKeepMounted:C,setMounted:k,setPanelIdState:A,setOpen:R,setVisible:I,state:B,transitionDimensionRef:E,visible:P,width:L,transitionStatus:j}=eE(),z=n??!1,W=i??!1;In(()=>{if(l)return A(l),()=>{A(void 0)}},[l,A]),In(()=>{_(z)},[_,z]),In(()=>{C(W)},[C,W]);let{props:O}=NU({abortControllerRef:d,animationTypeRef:f,externalRef:r,height:m,hiddenUntilFound:z,id:y,keepMounted:W,mounted:h,onOpenChange:g,open:v,panelRef:b,runOnceAnimationsFinish:S,setDimensions:w,setMounted:k,setOpen:R,setVisible:I,transitionDimensionRef:E,visible:P,width:L});FU({open:v&&j==="idle",ref:b,onComplete(){v&&w({height:void 0,width:void 0})}});let M=nE.useMemo(()=>({...B,transitionStatus:j}),[B,j]),D=Ff("div",t,{state:M,ref:[r,b],props:[O,{style:{[f4.collapsiblePanelHeight]:m===void 0?"auto":`${m}px`,[f4.collapsiblePanelWidth]:L===void 0?"auto":`${L}px`}},u],stateAttributesMapping:rE});return W||z||h?D:null});function $n(e){return Ff(e.defaultTagName??"div",e,e)}var YU=s(V(),1),m4="data-wp-hash";function p4(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&KPe(document)),e.__wpStyleRuntime}function qPe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${m4}]`))if(r.getAttribute(m4)===t)return!0;return!1}function qU(e,t,r){if(!e.head)return;let o=p4(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(qPe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(m4,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function KPe(e){let t=p4();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)qU(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function KU(e,t){let r=p4();r.styles.set(e,t);for(let o of r.documents.keys())qU(o,e,t)}typeof process>"u",KU("0c8601dd83",'@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}');var GU={text:"_83ed8a8da5dd50ea__text","heading-2xl":"_14437cfb77831647__heading-2xl","heading-xl":"_3c78b7fa9b4072dd__heading-xl","heading-lg":"aa58f227716bcde2__heading-lg","heading-md":"fc4da56d8dfe52c4__heading-md","heading-sm":"a9b78c7c82e8dff7__heading-sm","body-xl":"_305ff559e52180d5__body-xl","body-lg":"ca1aa3fc2029e958__body-lg","body-md":"_131101940be12424__body-md","body-sm":"_0e8d87a42c1f75fa__body-sm"};typeof process>"u",KU("1fb29d3a3c","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,#0000);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 #0000);color:var(--_gcd-input-color,var(--wpds-color-fg-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,#0000);border-color:var(--_gcd-input-border-color-disabled,#0000);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid #0000)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-fg-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid #0000);transition:var(--_gcd-a-transition,none)}");var WU={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},HS=(0,YU.forwardRef)(function({variant:t="body-md",render:r,className:o,...n},i){return $n({render:r,defaultTagName:"span",ref:i,props:bo(n,{className:K(GU.text,WU.heading,WU.p,GU[t],o)})})});var JU=s(x(),1),h4="data-wp-hash";function g4(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&XPe(document)),e.__wpStyleRuntime}function ZPe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${h4}]`))if(r.getAttribute(h4)===t)return!0;return!1}function QU(e,t,r){if(!e.head)return;let o=g4(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(ZPe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(h4,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function XPe(e){let t=g4();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)QU(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function QPe(e,t){let r=g4();r.styles.set(e,t);for(let o of r.documents.keys())QU(o,e,t)}typeof process>"u",QPe("d6a685e1aa","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6be);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee995);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c6f7cd);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);color:var(--wpds-color-fg-content-neutral,#1e1e1e);padding-block:calc(var(--wpds-dimension-padding-xs, 4px) - var(--wpds-border-width-xs, 1px));padding-inline:calc(var(--wpds-dimension-padding-sm, 8px) - var(--wpds-border-width-xs, 1px))}}");var ZU={badge:"_96e6251aad1a6136__badge","is-high-intent":"_99f7158cb520f750__is-high-intent","is-medium-intent":"c20ebef2365bc8b7__is-medium-intent","is-low-intent":"_365e1626c6202e52__is-low-intent","is-stable-intent":"_33f8198127ddf4ef__is-stable-intent","is-informational-intent":"_04c1aca8fc449412__is-informational-intent","is-draft-intent":"_90726e69d495ec19__is-draft-intent","is-none-intent":"_898f4a544993bd39__is-none-intent"},v4=(0,XU.forwardRef)(function({intent:t="none",className:r,...o},n){return(0,JU.jsx)(HS,{ref:n,className:K(ZU.badge,ZU[`is-${t}-intent`],r),...o,variant:"body-sm"})});var $U=s(V(),1),eG=s(he(),1),tG=s(x(),1),y4=(0,$U.forwardRef)(function({icon:t,size:r=24,...o},n){return(0,tG.jsx)(eG.SVG,{ref:n,fill:"currentColor",...t.props,...o,width:r,height:r})});var hc={};Jn(hc,{Content:()=>aE,FullBleed:()=>dG,Header:()=>sE,Root:()=>iE,Title:()=>mG});var rG=s(V(),1),b4="data-wp-hash";function w4(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&$Pe(document)),e.__wpStyleRuntime}function JPe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${b4}]`))if(r.getAttribute(b4)===t)return!0;return!1}function oG(e,t,r){if(!e.head)return;let o=w4(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(JPe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(b4,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function $Pe(e){let t=w4();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)oG(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function nG(e,t){let r=w4();r.styles.set(e,t);for(let o of r.documents.keys())oG(o,e,t)}typeof process>"u",nG("e3ae230cea","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}");var eEe={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",nG("14f5e9ddeb","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}}");var tEe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},iE=(0,rG.forwardRef)(function({render:t,...r},o){let n=K(tEe.root,eEe["box-sizing"]);return $n({defaultTagName:"div",render:t,ref:o,props:bo({className:n},r)})});var iG=s(V(),1),S4="data-wp-hash";function _4(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&oEe(document)),e.__wpStyleRuntime}function rEe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${S4}]`))if(r.getAttribute(S4)===t)return!0;return!1}function sG(e,t,r){if(!e.head)return;let o=_4(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(rEe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(S4,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function oEe(e){let t=_4();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)sG(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function nEe(e,t){let r=_4();r.styles.set(e,t);for(let o of r.documents.keys())sG(o,e,t)}typeof process>"u",nEe("14f5e9ddeb","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}}");var iEe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},sE=(0,iG.forwardRef)(function({render:t,...r},o){return $n({defaultTagName:"div",render:t,ref:o,props:bo({className:iEe.header},r)})});var aG=s(V(),1),x4="data-wp-hash";function C4(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&aEe(document)),e.__wpStyleRuntime}function sEe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${x4}]`))if(r.getAttribute(x4)===t)return!0;return!1}function lG(e,t,r){if(!e.head)return;let o=C4(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(sEe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(x4,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function aEe(e){let t=C4();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)lG(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function lEe(e,t){let r=C4();r.styles.set(e,t);for(let o of r.documents.keys())lG(o,e,t)}typeof process>"u",lEe("14f5e9ddeb","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}}");var cEe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},aE=(0,aG.forwardRef)(function({render:t,...r},o){return $n({defaultTagName:"div",render:t,ref:o,props:bo({className:cEe.content},r)})});var cG=s(V(),1),T4="data-wp-hash";function P4(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&dEe(document)),e.__wpStyleRuntime}function uEe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${T4}]`))if(r.getAttribute(T4)===t)return!0;return!1}function uG(e,t,r){if(!e.head)return;let o=P4(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(uEe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(T4,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function dEe(e){let t=P4();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)uG(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function fEe(e,t){let r=P4();r.styles.set(e,t);for(let o of r.documents.keys())uG(o,e,t)}typeof process>"u",fEe("14f5e9ddeb","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}}");var mEe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},dG=(0,cG.forwardRef)(function({render:t,...r},o){return $n({defaultTagName:"div",render:t,ref:o,props:bo({className:mEe.fullbleed},r)})});var fG=s(V(),1);var E4=s(x(),1),pEe=(0,E4.jsx)("div",{}),mG=(0,fG.forwardRef)(function({render:t=pEe,children:r,...o},n){return(0,E4.jsx)(HS,{ref:n,variant:"heading-lg",render:t,...o,children:r})});var pG=s(V(),1),hG=s(x(),1),k4=(0,pG.forwardRef)(function(t,r){return(0,hG.jsx)(Df.Panel,{ref:r,...t})});var gG=s(V(),1),vG=s(x(),1),R4=(0,gG.forwardRef)(function(t,r){return(0,vG.jsx)(Df.Root,{ref:r,...t})});var yG=s(V(),1),bG=s(x(),1),A4=(0,yG.forwardRef)(function(t,r){return(0,bG.jsx)(Df.Trigger,{ref:r,...t})});var uh={};Jn(uh,{Content:()=>AG,Header:()=>TG,HeaderDescription:()=>EG,Root:()=>SG});var wG=s(V(),1);var O4=s(x(),1),SG=(0,wG.forwardRef)(function({render:t,...r},o){return(0,O4.jsx)(R4,{ref:o,render:(0,O4.jsx)(iE,{render:t}),...r})});var ty=s(V(),1);var _G=s(V(),1),lE=(0,_G.createContext)({setDescriptionId:()=>{}});var Bu=s(x(),1),N4="data-wp-hash";function M4(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&gEe(document)),e.__wpStyleRuntime}function hEe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${N4}]`))if(r.getAttribute(N4)===t)return!0;return!1}function CG(e,t,r){if(!e.head)return;let o=M4(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(hEe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(N4,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function gEe(e){let t=M4();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)CG(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function F4(e,t){let r=M4();r.styles.set(e,t);for(let o of r.documents.keys())CG(o,e,t)}typeof process>"u",F4("f1b9bb6252","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._626190151275d6d3__heading-wrapper{--_gcd-heading-color:inherit;--_gcd-heading-font-size:inherit;--_gcd-heading-font-weight:inherit;--_gcd-heading-margin:0;font-family:inherit;line-height:inherit}.cab17c7a373cb60d__header-content{flex:1;min-width:0}.dd89d27c4f15912d__header-trigger-positioner{align-self:center;flex-shrink:0;max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&._165c4572592944b2__overflowVisible{overflow:visible}&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer wp-ui-compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}");var ey={"heading-wrapper":"_626190151275d6d3__heading-wrapper","header-content":"cab17c7a373cb60d__header-content","header-trigger-positioner":"dd89d27c4f15912d__header-trigger-positioner","header-trigger-wrapper":"bcfab5f2448bafef__header-trigger-wrapper","header-trigger":"_3106f8d2b0330faa__header-trigger",header:"_5d2dfcb4085c6d0f__header",content:"e34cf37ccd0d81e0__content",overflowVisible:"_165c4572592944b2__overflowVisible","content-inner":"_41bfdbf7b6c087c2__content-inner"};typeof process>"u",F4("1fb29d3a3c","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,#0000);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 #0000);color:var(--_gcd-input-color,var(--wpds-color-fg-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,#0000);border-color:var(--_gcd-input-border-color-disabled,#0000);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid #0000)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-fg-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid #0000);transition:var(--_gcd-a-transition,none)}");var xG={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"};typeof process>"u",F4("2a5ab8f3a7","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._08e8a2e44959f892__outset-ring--focus,._970d04df7376df67__outset-ring--focus-within-except-active,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible,.cd83dfc2126a0846__outset-ring--focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active,.ecadb9e080e2dfa5__outset-ring--focus-parent-visible{@media not (prefers-reduced-motion){--_gcd-a-transition:outline 0.1s ease-out;transition:outline .1s ease-out}outline:0 solid #0000;outline-offset:1px}._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9))}}");var vEe={"outset-ring--focus":"_08e8a2e44959f892__outset-ring--focus","outset-ring--focus-except-active":"e25b2bdd7aa21721__outset-ring--focus-except-active","outset-ring--focus-visible":"d0541bc9dd9dc7b6__outset-ring--focus-visible","outset-ring--focus-within":"cd83dfc2126a0846__outset-ring--focus-within","outset-ring--focus-within-except-active":"_970d04df7376df67__outset-ring--focus-within-except-active","outset-ring--focus-within-visible":"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible","outset-ring--focus-parent-visible":"ecadb9e080e2dfa5__outset-ring--focus-parent-visible"},TG=(0,ty.forwardRef)(function({children:t,className:r,render:o,...n},i){let[a,l]=(0,ty.useState)(),c=(0,ty.useMemo)(()=>({setDescriptionId:l}),[l]);return $n({defaultTagName:"div",render:o,ref:i,props:bo(n,{className:K(xG.heading,ey["heading-wrapper"],r),children:(0,Bu.jsx)(lE.Provider,{value:c,children:(0,Bu.jsxs)(A4,{className:ey.header,render:(0,Bu.jsx)(sE,{}),nativeButton:!1,"aria-describedby":a,children:[(0,Bu.jsx)("div",{className:ey["header-content"],children:t}),(0,Bu.jsx)("div",{className:K(ey["header-trigger-positioner"]),children:(0,Bu.jsx)("div",{className:K(ey["header-trigger-wrapper"],xG.div,vEe["outset-ring--focus-parent-visible"]),children:(0,Bu.jsx)(y4,{icon:Jw,className:ey["header-trigger"]})})})]})})})})});var Lf=s(V(),1);var PG=s(x(),1),EG=(0,Lf.forwardRef)(function({children:t,className:r,...o},n){let i=(0,Lf.useId)(),{setDescriptionId:a}=(0,Lf.useContext)(lE);return(0,Lf.useEffect)(()=>(a(i),()=>a(void 0)),[i,a]),(0,PG.jsx)("div",{ref:n,id:i,"aria-hidden":"true",className:r,...o,children:t})});var kG=s(V(),1);var B4=s(x(),1),L4="data-wp-hash";function V4(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&bEe(document)),e.__wpStyleRuntime}function yEe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${L4}]`))if(r.getAttribute(L4)===t)return!0;return!1}function RG(e,t,r){if(!e.head)return;let o=V4(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(yEe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(L4,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function bEe(e){let t=V4();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)RG(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function wEe(e,t){let r=V4();r.styles.set(e,t);for(let o of r.documents.keys())RG(o,e,t)}typeof process>"u",wEe("f1b9bb6252","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._626190151275d6d3__heading-wrapper{--_gcd-heading-color:inherit;--_gcd-heading-font-size:inherit;--_gcd-heading-font-weight:inherit;--_gcd-heading-margin:0;font-family:inherit;line-height:inherit}.cab17c7a373cb60d__header-content{flex:1;min-width:0}.dd89d27c4f15912d__header-trigger-positioner{align-self:center;flex-shrink:0;max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&._165c4572592944b2__overflowVisible{overflow:visible}&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer wp-ui-compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}");var D4={"heading-wrapper":"_626190151275d6d3__heading-wrapper","header-content":"cab17c7a373cb60d__header-content","header-trigger-positioner":"dd89d27c4f15912d__header-trigger-positioner","header-trigger-wrapper":"bcfab5f2448bafef__header-trigger-wrapper","header-trigger":"_3106f8d2b0330faa__header-trigger",header:"_5d2dfcb4085c6d0f__header",content:"e34cf37ccd0d81e0__content",overflowVisible:"_165c4572592944b2__overflowVisible","content-inner":"_41bfdbf7b6c087c2__content-inner"},AG=(0,kG.forwardRef)(function({className:t,render:r,children:o,hiddenUntilFound:n=!0,...i},a){return(0,B4.jsx)(k4,{ref:a,className:l=>K(D4.content,l.open&&l.transitionStatus==="idle"&&D4.overflowVisible,t),hiddenUntilFound:n,...i,children:(0,B4.jsx)(aE,{className:D4["content-inner"],render:r,children:o})})});var IG=s(V(),1),j4="data-wp-hash";function z4(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&_Ee(document)),e.__wpStyleRuntime}function SEe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${j4}]`))if(r.getAttribute(j4)===t)return!0;return!1}function OG(e,t,r){if(!e.head)return;let o=z4(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(SEe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(j4,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function _Ee(e){let t=z4();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)OG(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function xEe(e,t){let r=z4();r.styles.set(e,t);for(let o of r.documents.keys())OG(o,e,t)}typeof process>"u",xEe("b51ff41489","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}");var CEe={stack:"_19ce0419607e1896__stack"},TEe={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},re=(0,IG.forwardRef)(function({direction:t,gap:r,align:o,justify:n,wrap:i,render:a,...l},c){let u={gap:r&&TEe[r],alignItems:o,justifyContent:n,flexDirection:t,flexWrap:i};return $n({render:a,ref:c,props:bo(l,{style:u,className:CEe.stack})})});var NG=s(V(),1),H4="data-wp-hash";function U4(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&EEe(document)),e.__wpStyleRuntime}function PEe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${H4}]`))if(r.getAttribute(H4)===t)return!0;return!1}function MG(e,t,r){if(!e.head)return;let o=U4(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(PEe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(H4,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function EEe(e){let t=U4();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)MG(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function kEe(e,t){let r=U4();r.styles.set(e,t);for(let o of r.documents.keys())MG(o,e,t)}typeof process>"u",kEe("c46e8cb841","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.f37b9e2e191ebd66__visually-hidden{word-wrap:normal;border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-break:normal}}");var REe={"visually-hidden":"f37b9e2e191ebd66__visually-hidden"},Kt=(0,NG.forwardRef)(function({render:t,...r},o){return $n({render:t,ref:o,props:bo({className:REe["visually-hidden"]},r,{"data-visually-hidden":""})})});var fy=s(rh(),1),FW=s(wt(),1);var W4=GS(),Je=e=>US(e,W4),Y4=GS();Je.write=e=>US(e,Y4);var cE=GS();Je.onStart=e=>US(e,cE);var q4=GS();Je.onFrame=e=>US(e,q4);var K4=GS();Je.onFinish=e=>US(e,K4);var ry=[];Je.setTimeout=(e,t)=>{let r=Je.now()+t,o=()=>{let i=ry.findIndex(a=>a.cancel==o);~i&&ry.splice(i,1),Vf-=~i?1:0},n={time:r,handler:e,cancel:o};return ry.splice(FG(r),0,n),Vf+=1,DG(),n};var FG=e=>~(~ry.findIndex(t=>t.time>e)||~ry.length);Je.cancel=e=>{cE.delete(e),q4.delete(e),K4.delete(e),W4.delete(e),Y4.delete(e)};Je.sync=e=>{G4=!0,Je.batchedUpdates(e),G4=!1};Je.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function o(...n){t=n,Je.onStart(r)}return o.handler=e,o.cancel=()=>{cE.delete(r),t=null},o};var Z4=typeof window<"u"?window.requestAnimationFrame:()=>{};Je.use=e=>Z4=e;Je.now=typeof performance<"u"?()=>performance.now():Date.now;Je.batchedUpdates=e=>e();Je.catch=console.error;Je.frameLoop="always";Je.advance=()=>{Je.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):BG()};var Bf=-1,Vf=0,G4=!1;function US(e,t){G4?(t.delete(e),e(0)):(t.add(e),DG())}function DG(){Bf<0&&(Bf=0,Je.frameLoop!=="demand"&&Z4(LG))}function AEe(){Bf=-1}function LG(){~Bf&&(Z4(LG),Je.batchedUpdates(BG))}function BG(){let e=Bf;Bf=Je.now();let t=FG(Bf);if(t&&(VG(ry.splice(0,t),r=>r.handler()),Vf-=t),!Vf){AEe();return}cE.flush(),W4.flush(e?Math.min(64,Bf-e):16.667),q4.flush(),Y4.flush(),K4.flush()}function GS(){let e=new Set,t=e;return{add(r){Vf+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return Vf-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,Vf-=t.size,VG(t,o=>o(r)&&e.add(o)),Vf+=e.size,t=e)}}}function VG(e,t){e.forEach(r=>{try{t(r)}catch(o){Je.catch(o)}})}var Ea=s(Ye());function pE(){}var WG=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),_e={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function gc(e,t){if(_e.arr(e)){if(!_e.arr(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return e===t}var dr=(e,t)=>e.forEach(t);function ka(e,t,r){if(_e.arr(e)){for(let o=0;o<e.length;o++)t.call(r,e[o],`${o}`);return}for(let o in e)e.hasOwnProperty(o)&&t.call(r,e[o],o)}var as=e=>_e.und(e)?[]:_e.arr(e)?e:[e];function sy(e,t){if(e.size){let r=Array.from(e);e.clear(),dr(r,t)}}var ay=(e,...t)=>sy(e,r=>r(...t)),tD=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),rD,YG,jf=null,qG=!1,oD=pE,IEe=e=>{e.to&&(YG=e.to),e.now&&(Je.now=e.now),e.colors!==void 0&&(jf=e.colors),e.skipAnimation!=null&&(qG=e.skipAnimation),e.createStringInterpolator&&(rD=e.createStringInterpolator),e.requestAnimationFrame&&Je.use(e.requestAnimationFrame),e.batchedUpdates&&(Je.batchedUpdates=e.batchedUpdates),e.willAdvance&&(oD=e.willAdvance),e.frameLoop&&(Je.frameLoop=e.frameLoop)},Us=Object.freeze({__proto__:null,get createStringInterpolator(){return rD},get to(){return YG},get colors(){return jf},get skipAnimation(){return qG},get willAdvance(){return oD},assign:IEe}),WS=new Set,Pa=[],X4=[],fE=0,ly={get idle(){return!WS.size&&!Pa.length},start(e){fE>e.priority?(WS.add(e),Je.onStart(OEe)):(KG(e),Je($4))},advance:$4,sort(e){if(fE)Je.onFrame(()=>ly.sort(e));else{let t=Pa.indexOf(e);~t&&(Pa.splice(t,1),ZG(e))}},clear(){Pa=[],WS.clear()}};function OEe(){WS.forEach(KG),WS.clear(),Je($4)}function KG(e){Pa.includes(e)||ZG(e)}function ZG(e){Pa.splice(NEe(Pa,t=>t.priority>e.priority),0,e)}function $4(e){let t=X4;for(let r=0;r<Pa.length;r++){let o=Pa[r];fE=o.priority,o.idle||(oD(o),o.advance(e),o.idle||t.push(o))}return fE=0,X4=Pa,X4.length=0,Pa=t,Pa.length>0}function NEe(e,t){let r=e.findIndex(t);return r<0?e.length:r}var XG={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},_l="[-+]?\\d*\\.?\\d+",mE=_l+"%";function hE(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var MEe=new RegExp("rgb"+hE(_l,_l,_l)),FEe=new RegExp("rgba"+hE(_l,_l,_l,_l)),DEe=new RegExp("hsl"+hE(_l,mE,mE)),LEe=new RegExp("hsla"+hE(_l,mE,mE,_l)),BEe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,VEe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,jEe=/^#([0-9a-fA-F]{6})$/,zEe=/^#([0-9a-fA-F]{8})$/;function HEe(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=jEe.exec(e))?parseInt(t[1]+"ff",16)>>>0:jf&&jf[e]!==void 0?jf[e]:(t=MEe.exec(e))?(oy(t[1])<<24|oy(t[2])<<16|oy(t[3])<<8|255)>>>0:(t=FEe.exec(e))?(oy(t[1])<<24|oy(t[2])<<16|oy(t[3])<<8|HG(t[4]))>>>0:(t=BEe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=zEe.exec(e))?parseInt(t[1],16)>>>0:(t=VEe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=DEe.exec(e))?(jG(zG(t[1]),uE(t[2]),uE(t[3]))|255)>>>0:(t=LEe.exec(e))?(jG(zG(t[1]),uE(t[2]),uE(t[3]))|HG(t[4]))>>>0:null}function Q4(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function jG(e,t,r){let o=r<.5?r*(1+t):r+t-r*t,n=2*r-o,i=Q4(n,o,e+1/3),a=Q4(n,o,e),l=Q4(n,o,e-1/3);return Math.round(i*255)<<24|Math.round(a*255)<<16|Math.round(l*255)<<8}function oy(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function zG(e){return(parseFloat(e)%360+360)%360/360}function HG(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function uE(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function UG(e){let t=HEe(e);if(t===null)return e;t=t||0;let r=(t&4278190080)>>>24,o=(t&16711680)>>>16,n=(t&65280)>>>8,i=(t&255)/255;return`rgba(${r}, ${o}, ${n}, ${i})`}var zf=(e,t,r)=>{if(_e.fun(e))return e;if(_e.arr(e))return zf({range:e,output:t,extrapolate:r});if(_e.str(e.output[0]))return rD(e);let o=e,n=o.output,i=o.range||[0,1],a=o.extrapolateLeft||o.extrapolate||"extend",l=o.extrapolateRight||o.extrapolate||"extend",c=o.easing||(u=>u);return u=>{let d=GEe(u,i);return UEe(u,i[d],i[d+1],n[d],n[d+1],c,a,l,o.map)}};function UEe(e,t,r,o,n,i,a,l,c){let u=c?c(e):e;if(u<t){if(a==="identity")return u;a==="clamp"&&(u=t)}if(u>r){if(l==="identity")return u;l==="clamp"&&(u=r)}return o===n?o:t===r?e<=t?o:n:(t===-1/0?u=-u:r===1/0?u=u-t:u=(u-t)/(r-t),u=i(u),o===-1/0?u=-u:n===1/0?u=u+o:u=u*(n-o)+o,u)}function GEe(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}function eD(){return eD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},eD.apply(this,arguments)}var ny=Symbol.for("FluidValue.get"),dh=Symbol.for("FluidValue.observers"),Ii=e=>!!(e&&e[ny]),On=e=>e&&e[ny]?e[ny]():e,nD=e=>e[dh]||null;function WEe(e,t){e.eventObserved?e.eventObserved(t):e(t)}function fh(e,t){let r=e[dh];r&&r.forEach(o=>{WEe(o,t)})}var iy=class{constructor(t){if(this[ny]=void 0,this[dh]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");YEe(this,t)}},YEe=(e,t)=>QG(e,ny,t);function Hf(e,t){if(e[ny]){let r=e[dh];r||QG(e,dh,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function Uf(e,t){let r=e[dh];if(r&&r.has(t)){let o=r.size-1;o?r.delete(t):e[dh]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var QG=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),dE=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,qEe=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,GG=new RegExp(`(${dE.source})(%|[a-z]+)`,"i"),KEe=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,gE=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,JG=e=>{let[t,r]=ZEe(e);if(!t||tD())return e;let o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(r&&r.startsWith("--")){let n=window.getComputedStyle(document.documentElement).getPropertyValue(r);return n||e}else{if(r&&gE.test(r))return JG(r);if(r)return r}return e},ZEe=e=>{let t=gE.exec(e);if(!t)return[,];let[,r,o]=t;return[r,o]},J4,XEe=(e,t,r,o,n)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(o)}, ${n})`,vE=e=>{J4||(J4=jf?new RegExp(`(${Object.keys(jf).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>On(i).replace(gE,JG).replace(qEe,UG).replace(J4,UG)),r=t.map(i=>i.match(dE).map(Number)),n=r[0].map((i,a)=>r.map(l=>{if(!(a in l))throw Error('The arity of each "output" value must be equal');return l[a]})).map(i=>zf(eD({},e,{output:i})));return i=>{var a;let l=!GG.test(t[0])&&((a=t.find(u=>GG.test(u)))==null?void 0:a.replace(dE,"")),c=0;return t[0].replace(dE,()=>`${n[c++](i)}${l||""}`).replace(KEe,XEe)}},$G="react-spring: ",eW=e=>{let t=e,r=!1;if(typeof t!="function")throw new TypeError(`${$G}once requires a function parameter`);return(...o)=>{r||(t(...o),r=!0)}},QEe=eW(console.warn);function tW(){QEe(`${$G}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var ttt=eW(console.warn);function cy(e){return _e.str(e)&&(e[0]=="#"||/\d/.test(e)||!tD()&&gE.test(e)||e in(jf||{}))}var YS=tD()?Ea.useEffect:Ea.useLayoutEffect,JEe=()=>{let e=(0,Ea.useRef)(!1);return YS(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function iD(){let e=(0,Ea.useState)()[1],t=JEe();return()=>{t.current&&e(Math.random())}}function rW(e,t){let[r]=(0,Ea.useState)(()=>({inputs:t,result:e()})),o=(0,Ea.useRef)(),n=o.current,i=n;return i?t&&i.inputs&&$Ee(t,i.inputs)||(i={inputs:t,result:e()}):i=r,(0,Ea.useEffect)(()=>{o.current=i,n==r&&(r.inputs=r.result=void 0)},[i]),i.result}function $Ee(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var sD=e=>(0,Ea.useEffect)(e,e2e),e2e=[];var r_=s(Ye()),o_=s(Ye());var sW=s(Ye()),Vu=s(Ye()),qS=Symbol.for("Animated:node"),t2e=e=>!!e&&e[qS]===e,xl=e=>e&&e[qS],SE=(e,t)=>WG(e,qS,t),KS=e=>e&&e[qS]&&e[qS].getPayload(),yE=class{constructor(){this.payload=void 0,SE(this,this)}getPayload(){return this.payload||[]}},mh=class e extends yE{constructor(t){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=t,_e.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,r){return _e.num(t)&&(this.lastPosition=t,r&&(t=Math.round(t/r)*r,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){let{done:t}=this;this.done=!1,_e.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},ph=class e extends mh{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=zf({output:[t,t]})}static create(t){return new e(t)}getValue(){let t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(_e.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=zf({output:[this.getValue(),t]})),this._value=0,super.reset()}},bE={dependencies:null},hh=class extends yE{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let r={};return ka(this.source,(o,n)=>{t2e(o)?r[n]=o.getValue(t):Ii(o)?r[n]=On(o):t||(r[n]=o)}),r}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&dr(this.payload,t=>t.reset())}_makePayload(t){if(t){let r=new Set;return ka(t,this._addToPayload,r),Array.from(r)}}_addToPayload(t){bE.dependencies&&Ii(t)&&bE.dependencies.add(t);let r=KS(t);r&&dr(r,o=>this.add(o))}},aD=class e extends hh{constructor(t){super(t)}static create(t){return new e(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){let r=this.getPayload();return t.length==r.length?r.map((o,n)=>o.setValue(t[n])).some(Boolean):(super.setValue(t.map(r2e)),!0)}};function r2e(e){return(cy(e)?ph:mh).create(e)}function _E(e){let t=xl(e);return t?t.constructor:_e.arr(e)?aD:cy(e)?ph:mh}function wE(){return wE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},wE.apply(this,arguments)}var oW=(e,t)=>{let r=!_e.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Vu.forwardRef)((o,n)=>{let i=(0,Vu.useRef)(null),a=r&&(0,Vu.useCallback)(g=>{i.current=n2e(n,g)},[n]),[l,c]=o2e(o,t),u=iD(),d=()=>{let g=i.current;if(r&&!g)return;(g?t.applyAnimatedValues(g,l.getValue(!0)):!1)===!1&&u()},f=new lD(d,c),m=(0,Vu.useRef)();YS(()=>(m.current=f,dr(c,g=>Hf(g,f)),()=>{m.current&&(dr(m.current.deps,g=>Uf(g,m.current)),Je.cancel(m.current.update))})),(0,Vu.useEffect)(d,[]),sD(()=>()=>{let g=m.current;dr(g.deps,v=>Uf(v,g))});let h=t.getComponentProps(l.getValue());return sW.createElement(e,wE({},h,{ref:a}))})},lD=class{constructor(t,r){this.update=t,this.deps=r}eventObserved(t){t.type=="change"&&Je.write(this.update)}};function o2e(e,t){let r=new Set;return bE.dependencies=r,e.style&&(e=wE({},e,{style:t.createAnimatedStyle(e.style)})),e=new hh(e),bE.dependencies=null,[e,r]}function n2e(e,t){return e&&(_e.fun(e)?e(t):e.current=t),t}var nW=Symbol.for("AnimatedComponent"),aW=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=n=>new hh(n),getComponentProps:o=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:o},i=a=>{let l=iW(a)||"Anonymous";return _e.str(a)?a=i[a]||(i[a]=oW(a,n)):a=a[nW]||(a[nW]=oW(a,n)),a.displayName=`Animated(${l})`,a};return ka(e,(a,l)=>{_e.arr(e)&&(l=iW(a)),i[l]=i(a)}),{animated:i}},iW=e=>_e.str(e)?e:e&&_e.str(e.displayName)?e.displayName:_e.fun(e)&&e.name||null;function Oi(){return Oi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Oi.apply(this,arguments)}function gh(e,...t){return _e.fun(e)?e(...t):e}var JS=(e,t)=>e===!0||!!(t&&e&&(_e.fun(e)?e(t):as(e).includes(t))),bW=(e,t)=>_e.obj(e)?t&&e[t]:e,wW=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,i2e=e=>e,SW=(e,t=i2e)=>{let r=s2e;e.default&&e.default!==!0&&(e=e.default,r=Object.keys(e));let o={};for(let n of r){let i=t(e[n],n);_e.und(i)||(o[n]=i)}return o},s2e=["config","onProps","onStart","onChange","onPause","onResume","onRest"],a2e={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function l2e(e){let t={},r=0;if(ka(e,(o,n)=>{a2e[n]||(t[n]=o,r++)}),r)return t}function _W(e){let t=l2e(e);if(t){let r={to:t};return ka(e,(o,n)=>n in t||(r[n]=o)),r}return Oi({},e)}function $S(e){return e=On(e),_e.arr(e)?e.map($S):cy(e)?Us.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function dD(e){return _e.fun(e)||_e.arr(e)&&_e.obj(e[0])}var c2e={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},TE=1.70158,xE=TE*1.525,lW=TE+1,cW=2*Math.PI/3,uW=2*Math.PI/4.5,CE=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,u2e={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>lW*e*e*e-TE*e*e,easeOutBack:e=>1+lW*Math.pow(e-1,3)+TE*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((xE+1)*2*e-xE)/2:(Math.pow(2*e-2,2)*((xE+1)*(e*2-2)+xE)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*cW),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*cW)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*uW))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*uW)/2+1,easeInBounce:e=>1-CE(1-e),easeOutBounce:CE,easeInOutBounce:e=>e<.5?(1-CE(1-2*e))/2:(1+CE(2*e-1))/2},fD=Oi({},c2e.default,{mass:1,damping:1,easing:u2e.linear,clamp:!1}),mD=class{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,fD)}};function d2e(e,t,r){r&&(r=Oi({},r),dW(r,t),t=Oi({},r,t)),dW(e,t),Object.assign(e,t);for(let a in fD)e[a]==null&&(e[a]=fD[a]);let{mass:o,frequency:n,damping:i}=e;return _e.und(n)||(n<.01&&(n=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/n,2)*o,e.friction=4*Math.PI*i*o/n),e}function dW(e,t){if(!_e.und(t.decay))e.duration=void 0;else{let r=!_e.und(t.tension)||!_e.und(t.friction);(r||!_e.und(t.frequency)||!_e.und(t.damping)||!_e.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}var fW=[],pD=class{constructor(){this.changed=!1,this.values=fW,this.toValues=null,this.fromValues=fW,this.to=void 0,this.from=void 0,this.config=new mD,this.immediate=!1}};function xW(e,{key:t,props:r,defaultProps:o,state:n,actions:i}){return new Promise((a,l)=>{var c;let u,d,f=JS((c=r.cancel)!=null?c:o?.cancel,t);if(f)g();else{_e.und(r.pause)||(n.paused=JS(r.pause,t));let v=o?.pause;v!==!0&&(v=n.paused||JS(v,t)),u=gh(r.delay||0,t),v?(n.resumeQueue.add(h),i.pause()):(i.resume(),h())}function m(){n.resumeQueue.add(h),n.timeouts.delete(d),d.cancel(),u=d.time-Je.now()}function h(){u>0&&!Us.skipAnimation?(n.delayed=!0,d=Je.setTimeout(g,u),n.pauseQueue.add(m),n.timeouts.add(d)):g()}function g(){n.delayed&&(n.delayed=!1),n.pauseQueue.delete(m),n.timeouts.delete(d),e<=(n.cancelId||0)&&(f=!0);try{i.start(Oi({},r,{callId:e,cancel:f}),a)}catch(v){l(v)}}})}var SD=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?uy(e.get()):t.every(r=>r.noop)?CW(e.get()):Cl(e.get(),t.every(r=>r.finished)),CW=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Cl=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),uy=e=>({value:e,cancelled:!0,finished:!1});function TW(e,t,r,o){let{callId:n,parentId:i,onRest:a}=t,{asyncTo:l,promise:c}=r;return!i&&e===l&&!t.reset?c:r.promise=(async()=>{r.asyncId=n,r.asyncTo=e;let u=SW(t,(y,b)=>b==="onRest"?void 0:y),d,f,m=new Promise((y,b)=>(d=y,f=b)),h=y=>{let b=n<=(r.cancelId||0)&&uy(o)||n!==r.asyncId&&Cl(o,!1);if(b)throw y.result=b,f(y),y},g=(y,b)=>{let S=new PE,w=new EE;return(async()=>{if(Us.skipAnimation)throw e_(r),w.result=Cl(o,!1),f(w),w;h(S);let _=_e.obj(y)?Oi({},y):Oi({},b,{to:y});_.parentId=n,ka(u,(k,A)=>{_e.und(_[A])&&(_[A]=k)});let C=await o.start(_);return h(S),r.paused&&await new Promise(k=>{r.resumeQueue.add(k)}),C})()},v;if(Us.skipAnimation)return e_(r),Cl(o,!1);try{let y;_e.arr(e)?y=(async b=>{for(let S of b)await g(S)})(e):y=Promise.resolve(e(g,o.stop.bind(o))),await Promise.all([y.then(d),m]),v=Cl(o.get(),!0,!1)}catch(y){if(y instanceof PE)v=y.result;else if(y instanceof EE)v=y.result;else throw y}finally{n==r.asyncId&&(r.asyncId=i,r.asyncTo=i?l:void 0,r.promise=i?c:void 0)}return _e.fun(a)&&Je.batchedUpdates(()=>{a(v,o,o.item)}),v})()}function e_(e,t){sy(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var PE=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}},EE=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},hD=e=>e instanceof t_,f2e=1,t_=class extends iy{constructor(...t){super(...t),this.id=f2e++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(t){this._priority!=t&&(this._priority=t,this._onPriorityChange(t))}get(){let t=xl(this);return t&&t.getValue()}to(...t){return Us.to(this,t)}interpolate(...t){return tW(),Us.to(this,t)}toJSON(){return this.get()}observerAdded(t){t==1&&this._attach()}observerRemoved(t){t==0&&this._detach()}_attach(){}_detach(){}_onChange(t,r=!1){fh(this,{type:"change",parent:this,value:t,idle:r})}_onPriorityChange(t){this.idle||ly.sort(this),fh(this,{type:"priority",parent:this,priority:t})}},vh=Symbol.for("SpringPhase"),PW=1,gD=2,vD=4,cD=e=>(e[vh]&PW)>0,Gf=e=>(e[vh]&gD)>0,ZS=e=>(e[vh]&vD)>0,mW=(e,t)=>t?e[vh]|=gD|PW:e[vh]&=~gD,pW=(e,t)=>t?e[vh]|=vD:e[vh]&=~vD,yD=class extends t_{constructor(t,r){if(super(),this.key=void 0,this.animation=new pD,this.queue=void 0,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!_e.und(t)||!_e.und(r)){let o=_e.obj(t)?Oi({},t):Oi({},r,{from:t});_e.und(o.default)&&(o.default=!0),this.start(o)}}get idle(){return!(Gf(this)||this._state.asyncTo)||ZS(this)}get goal(){return On(this.animation.to)}get velocity(){let t=xl(this);return t instanceof mh?t.lastVelocity||0:t.getPayload().map(r=>r.lastVelocity||0)}get hasAnimated(){return cD(this)}get isAnimating(){return Gf(this)}get isPaused(){return ZS(this)}get isDelayed(){return this._state.delayed}advance(t){let r=!0,o=!1,n=this.animation,{config:i,toValues:a}=n,l=KS(n.to);!l&&Ii(n.to)&&(a=as(On(n.to))),n.values.forEach((d,f)=>{if(d.done)return;let m=d.constructor==ph?1:l?l[f].lastPosition:a[f],h=n.immediate,g=m;if(!h){if(g=d.lastPosition,i.tension<=0){d.done=!0;return}let v=d.elapsedTime+=t,y=n.fromValues[f],b=d.v0!=null?d.v0:d.v0=_e.arr(i.velocity)?i.velocity[f]:i.velocity,S,w=i.precision||(y==m?.005:Math.min(1,Math.abs(m-y)*.001));if(_e.und(i.duration))if(i.decay){let _=i.decay===!0?.998:i.decay,C=Math.exp(-(1-_)*v);g=y+b/(1-_)*(1-C),h=Math.abs(d.lastPosition-g)<=w,S=b*C}else{S=d.lastVelocity==null?b:d.lastVelocity;let _=i.restVelocity||w/10,C=i.clamp?0:i.bounce,k=!_e.und(C),A=y==m?d.v0>0:y<m,R,I=!1,B=1,E=Math.ceil(t/B);for(let P=0;P<E&&(R=Math.abs(S)>_,!(!R&&(h=Math.abs(m-g)<=w,h)));++P){k&&(I=g==m||g>m==A,I&&(S=-S*C,g=m));let L=-i.tension*1e-6*(g-m),j=-i.friction*.001*S,z=(L+j)/i.mass;S=S+z*B,g=g+S*B}}else{let _=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,d.durationProgress>0&&(d.elapsedTime=i.duration*d.durationProgress,v=d.elapsedTime+=t)),_=(i.progress||0)+v/this._memoizedDuration,_=_>1?1:_<0?0:_,d.durationProgress=_),g=y+i.easing(_)*(m-y),S=(g-d.lastPosition)/t,h=_==1}d.lastVelocity=S,Number.isNaN(g)&&(console.warn("Got NaN while animating:",this),h=!0)}l&&!l[f].done&&(h=!1),h?d.done=!0:r=!1,d.setValue(g,i.round)&&(o=!0)});let c=xl(this),u=c.getValue();if(r){let d=On(n.to);(u!==d||o)&&!i.decay?(c.setValue(d),this._onChange(d)):o&&i.decay&&this._onChange(u),this._stop()}else o&&this._onChange(u)}set(t){return Je.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Gf(this)){let{to:t,config:r}=this.animation;Je.batchedUpdates(()=>{this._onStart(),r.decay||this._set(t,!1),this._stop()})}return this}update(t){return(this.queue||(this.queue=[])).push(t),this}start(t,r){let o;return _e.und(t)?(o=this.queue||[],this.queue=[]):o=[_e.obj(t)?t:Oi({},r,{to:t})],Promise.all(o.map(n=>this._update(n))).then(n=>SD(this,n))}stop(t){let{to:r}=this.animation;return this._focus(this.get()),e_(this._state,t&&this._lastCallId),Je.batchedUpdates(()=>this._stop(r,t)),this}reset(){this._update({reset:!0})}eventObserved(t){t.type=="change"?this._start():t.type=="priority"&&(this.priority=t.priority+1)}_prepareNode(t){let r=this.key||"",{to:o,from:n}=t;o=_e.obj(o)?o[r]:o,(o==null||dD(o))&&(o=void 0),n=_e.obj(n)?n[r]:n,n==null&&(n=void 0);let i={to:o,from:n};return cD(this)||(t.reverse&&([o,n]=[n,o]),n=On(n),_e.und(n)?xl(this)||this._set(o):this._set(n)),i}_update(t,r){let o=Oi({},t),{key:n,defaultProps:i}=this;o.default&&Object.assign(i,SW(o,(c,u)=>/^on/.test(u)?bW(c,n):c)),gW(this,o,"onProps"),QS(this,"onProps",o,this);let a=this._prepareNode(o);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let l=this._state;return xW(++this._lastCallId,{key:n,props:o,defaultProps:i,state:l,actions:{pause:()=>{ZS(this)||(pW(this,!0),ay(l.pauseQueue),QS(this,"onPause",Cl(this,XS(this,this.animation.to)),this))},resume:()=>{ZS(this)&&(pW(this,!1),Gf(this)&&this._resume(),ay(l.resumeQueue),QS(this,"onResume",Cl(this,XS(this,this.animation.to)),this))},start:this._merge.bind(this,a)}}).then(c=>{if(o.loop&&c.finished&&!(r&&c.noop)){let u=EW(o);if(u)return this._update(u,!0)}return c})}_merge(t,r,o){if(r.cancel)return this.stop(!0),o(uy(this));let n=!_e.und(t.to),i=!_e.und(t.from);if(n||i)if(r.callId>this._lastToId)this._lastToId=r.callId;else return o(uy(this));let{key:a,defaultProps:l,animation:c}=this,{to:u,from:d}=c,{to:f=u,from:m=d}=t;i&&!n&&(!r.default||_e.und(f))&&(f=m),r.reverse&&([f,m]=[m,f]);let h=!gc(m,d);h&&(c.from=m),m=On(m);let g=!gc(f,u);g&&this._focus(f);let v=dD(r.to),{config:y}=c,{decay:b,velocity:S}=y;(n||i)&&(y.velocity=0),r.config&&!v&&d2e(y,gh(r.config,a),r.config!==l.config?gh(l.config,a):void 0);let w=xl(this);if(!w||_e.und(f))return o(Cl(this,!0));let _=_e.und(r.reset)?i&&!r.default:!_e.und(m)&&JS(r.reset,a),C=_?m:this.get(),k=$S(f),A=_e.num(k)||_e.arr(k)||cy(k),R=!v&&(!A||JS(l.immediate||r.immediate,a));if(g){let P=_E(f);if(P!==w.constructor)if(R)w=this._set(k);else throw Error(`Cannot animate between ${w.constructor.name} and ${P.name}, as the "to" prop suggests`)}let I=w.constructor,B=Ii(f),E=!1;if(!B){let P=_||!cD(this)&&h;(g||P)&&(E=gc($S(C),k),B=!E),(!gc(c.immediate,R)&&!R||!gc(y.decay,b)||!gc(y.velocity,S))&&(B=!0)}if(E&&Gf(this)&&(c.changed&&!_?B=!0:B||this._stop(u)),!v&&((B||Ii(u))&&(c.values=w.getPayload(),c.toValues=Ii(f)?null:I==ph?[1]:as(k)),c.immediate!=R&&(c.immediate=R,!R&&!_&&this._set(u)),B)){let{onRest:P}=c;dr(m2e,j=>gW(this,r,j));let L=Cl(this,XS(this,u));ay(this._pendingCalls,L),this._pendingCalls.add(o),c.changed&&Je.batchedUpdates(()=>{c.changed=!_,P?.(L,this),_?gh(l.onRest,L):c.onStart==null||c.onStart(L,this)})}_&&this._set(C),v?o(TW(r.to,r,this._state,this)):B?this._start():Gf(this)&&!g?this._pendingCalls.add(o):o(CW(C))}_focus(t){let r=this.animation;t!==r.to&&(nD(this)&&this._detach(),r.to=t,nD(this)&&this._attach())}_attach(){let t=0,{to:r}=this.animation;Ii(r)&&(Hf(r,this),hD(r)&&(t=r.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;Ii(t)&&Uf(t,this)}_set(t,r=!0){let o=On(t);if(!_e.und(o)){let n=xl(this);if(!n||!gc(o,n.getValue())){let i=_E(o);!n||n.constructor!=i?SE(this,i.create(o)):n.setValue(o),n&&Je.batchedUpdates(()=>{this._onChange(o,r)})}}return xl(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,QS(this,"onStart",Cl(this,XS(this,t.to)),this))}_onChange(t,r){r||(this._onStart(),gh(this.animation.onChange,t,this)),gh(this.defaultProps.onChange,t,this),super._onChange(t,r)}_start(){let t=this.animation;xl(this).reset(On(t.to)),t.immediate||(t.fromValues=t.values.map(r=>r.lastPosition)),Gf(this)||(mW(this,!0),ZS(this)||this._resume())}_resume(){Us.skipAnimation?this.finish():ly.start(this)}_stop(t,r){if(Gf(this)){mW(this,!1);let o=this.animation;dr(o.values,i=>{i.done=!0}),o.toValues&&(o.onChange=o.onPause=o.onResume=void 0),fh(this,{type:"idle",parent:this});let n=r?uy(this.get()):Cl(this.get(),XS(this,t??o.to));ay(this._pendingCalls,n),o.changed&&(o.changed=!1,QS(this,"onRest",n,this))}}};function XS(e,t){let r=$S(t),o=$S(e.get());return gc(o,r)}function EW(e,t=e.loop,r=e.to){let o=gh(t);if(o){let n=o!==!0&&_W(o),i=(n||e).reverse,a=!n||n.reset;return bD(Oi({},e,{loop:t,default:!1,pause:void 0,to:!i||dD(r)?r:void 0,from:a?e.from:void 0,reset:a},n))}}function bD(e){let{to:t,from:r}=e=_W(e),o=new Set;return _e.obj(t)&&hW(t,o),_e.obj(r)&&hW(r,o),e.keys=o.size?Array.from(o):null,e}function hW(e,t){ka(e,(r,o)=>r!=null&&t.add(o))}var m2e=["onStart","onRest","onChange","onPause","onResume"];function gW(e,t,r){e.animation[r]=t[r]!==wW(t,r)?bW(t[r],e.key):void 0}function QS(e,t,...r){var o,n,i,a;(o=(n=e.animation)[t])==null||o.call(n,...r),(i=(a=e.defaultProps)[t])==null||i.call(a,...r)}var p2e=["onStart","onChange","onRest"],h2e=1,kE=class{constructor(t,r){this.id=h2e++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),r&&(this._flush=r),t&&this.start(Oi({default:!0},t))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){let t={};return this.each((r,o)=>t[o]=r.get()),t}set(t){for(let r in t){let o=t[r];_e.und(o)||this.springs[r].set(o)}}update(t){return t&&this.queue.push(bD(t)),this}start(t){let{queue:r}=this;return t?r=as(t).map(bD):this.queue=[],this._flush?this._flush(this,r):(RW(this,r),g2e(this,r))}stop(t,r){if(t!==!!t&&(r=t),r){let o=this.springs;dr(as(r),n=>o[n].stop(!!t))}else e_(this._state,this._lastAsyncId),this.each(o=>o.stop(!!t));return this}pause(t){if(_e.und(t))this.start({pause:!0});else{let r=this.springs;dr(as(t),o=>r[o].pause())}return this}resume(t){if(_e.und(t))this.start({pause:!1});else{let r=this.springs;dr(as(t),o=>r[o].resume())}return this}each(t){ka(this.springs,t)}_onFrame(){let{onStart:t,onChange:r,onRest:o}=this._events,n=this._active.size>0,i=this._changed.size>0;(n&&!this._started||i&&!this._started)&&(this._started=!0,sy(t,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));let a=!n&&this._started,l=i||a&&o.size?this.get():null;i&&r.size&&sy(r,([c,u])=>{u.value=l,c(u,this,this._item)}),a&&(this._started=!1,sy(o,([c,u])=>{u.value=l,c(u,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;Je.onFrame(this._onFrame)}};function g2e(e,t){return Promise.all(t.map(r=>kW(e,r))).then(r=>SD(e,r))}async function kW(e,t,r){let{keys:o,to:n,from:i,loop:a,onRest:l,onResolve:c}=t,u=_e.obj(t.default)&&t.default;a&&(t.loop=!1),n===!1&&(t.to=null),i===!1&&(t.from=null);let d=_e.arr(n)||_e.fun(n)?n:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):dr(p2e,v=>{let y=t[v];if(_e.fun(y)){let b=e._events[v];t[v]=({finished:S,cancelled:w})=>{let _=b.get(y);_?(S||(_.finished=!1),w&&(_.cancelled=!0)):b.set(y,{value:null,finished:S||!1,cancelled:w||!1})},u&&(u[v]=t[v])}});let f=e._state;t.pause===!f.paused?(f.paused=t.pause,ay(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);let m=(o||Object.keys(e.springs)).map(v=>e.springs[v].start(t)),h=t.cancel===!0||wW(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(xW(++e._lastAsyncId,{props:t,state:f,actions:{pause:pE,resume:pE,start(v,y){h?(e_(f,e._lastAsyncId),y(uy(e))):(v.onRest=l,y(TW(d,v,f,e)))}}})),f.paused&&await new Promise(v=>{f.resumeQueue.add(v)});let g=SD(e,await Promise.all(m));if(a&&g.finished&&!(r&&g.noop)){let v=EW(t,a,n);if(v)return RW(e,[v]),kW(e,v,!0)}return c&&Je.batchedUpdates(()=>c(g,e,e.item)),g}function v2e(e,t){let r=new yD;return r.key=e,t&&Hf(r,t),r}function y2e(e,t,r){t.keys&&dr(t.keys,o=>{(e[o]||(e[o]=r(o)))._prepareNode(t)})}function RW(e,t){dr(t,r=>{y2e(e.springs,r,o=>v2e(o,e))})}function b2e(e,t){if(e==null)return{};var r={},o=Object.keys(e),n,i;for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}var w2e=["children"],_D=e=>{let{children:t}=e,r=b2e(e,w2e),o=(0,o_.useContext)(RE),n=r.pause||!!o.pause,i=r.immediate||!!o.immediate;r=rW(()=>({pause:n,immediate:i}),[n,i]);let{Provider:a}=RE;return r_.createElement(a,{value:r},t)},RE=S2e(_D,{});_D.Provider=RE.Provider;_D.Consumer=RE.Consumer;function S2e(e,t){return Object.assign(e,r_.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var vW;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(vW||(vW={}));var wD=class extends t_{constructor(t,r){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=zf(...r);let o=this._get(),n=_E(o);SE(this,n.create(o))}advance(t){let r=this._get(),o=this.get();gc(r,o)||(xl(this).setValue(r),this._onChange(r,this.idle)),!this.idle&&yW(this._active)&&uD(this)}_get(){let t=_e.arr(this.source)?this.source.map(On):as(On(this.source));return this.calc(...t)}_start(){this.idle&&!yW(this._active)&&(this.idle=!1,dr(KS(this),t=>{t.done=!1}),Us.skipAnimation?(Je.batchedUpdates(()=>this.advance()),uD(this)):ly.start(this))}_attach(){let t=1;dr(as(this.source),r=>{Ii(r)&&Hf(r,this),hD(r)&&(r.idle||this._active.add(r),t=Math.max(t,r.priority+1))}),this.priority=t,this._start()}_detach(){dr(as(this.source),t=>{Ii(t)&&Uf(t,this)}),this._active.clear(),uD(this)}eventObserved(t){t.type=="change"?t.idle?this.advance():(this._active.add(t.parent),this._start()):t.type=="idle"?this._active.delete(t.parent):t.type=="priority"&&(this.priority=as(this.source).reduce((r,o)=>Math.max(r,(hD(o)?o.priority:0)+1),0))}};function _2e(e){return e.idle!==!1}function yW(e){return!e.size||Array.from(e).every(_2e)}function uD(e){e.idle||(e.idle=!0,dr(KS(e),t=>{t.done=!0}),fh(e,{type:"idle",parent:e}))}Us.assign({createStringInterpolator:vE,to:(e,t)=>new wD(e,t)});var dtt=ly.advance;var IW=s(YP());function PD(e,t){if(e==null)return{};var r={},o=Object.keys(e),n,i;for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}var x2e=["style","children","scrollTop","scrollLeft"],OW=/^--/;function C2e(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!OW.test(e)&&!(n_.hasOwnProperty(e)&&n_[e])?t+"px":(""+t).trim()}var AW={};function T2e(e,t){if(!e.nodeType||!e.setAttribute)return!1;let r=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",o=t,{style:n,children:i,scrollTop:a,scrollLeft:l}=o,c=PD(o,x2e),u=Object.values(c),d=Object.keys(c).map(f=>r||e.hasAttribute(f)?f:AW[f]||(AW[f]=f.replace(/([A-Z])/g,m=>"-"+m.toLowerCase())));i!==void 0&&(e.textContent=i);for(let f in n)if(n.hasOwnProperty(f)){let m=C2e(f,n[f]);OW.test(f)?e.style.setProperty(f,m):e.style[f]=m}d.forEach((f,m)=>{e.setAttribute(f,u[m])}),a!==void 0&&(e.scrollTop=a),l!==void 0&&(e.scrollLeft=l)}var n_={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},P2e=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),E2e=["Webkit","Ms","Moz","O"];n_=Object.keys(n_).reduce((e,t)=>(E2e.forEach(r=>e[P2e(r,t)]=e[t]),e),n_);var k2e=["x","y","z"],R2e=/^(matrix|translate|scale|rotate|skew)/,A2e=/^(translate)/,I2e=/^(rotate|skew)/,xD=(e,t)=>_e.num(e)&&e!==0?e+t:e,AE=(e,t)=>_e.arr(e)?e.every(r=>AE(r,t)):_e.num(e)?e===t:parseFloat(e)===t,CD=class extends hh{constructor(t){let{x:r,y:o,z:n}=t,i=PD(t,k2e),a=[],l=[];(r||o||n)&&(a.push([r||0,o||0,n||0]),l.push(c=>[`translate3d(${c.map(u=>xD(u,"px")).join(",")})`,AE(c,0)])),ka(i,(c,u)=>{if(u==="transform")a.push([c||""]),l.push(d=>[d,d===""]);else if(R2e.test(u)){if(delete i[u],_e.und(c))return;let d=A2e.test(u)?"px":I2e.test(u)?"deg":"";a.push(as(c)),l.push(u==="rotate3d"?([f,m,h,g])=>[`rotate3d(${f},${m},${h},${xD(g,d)})`,AE(g,0)]:f=>[`${u}(${f.map(m=>xD(m,d)).join(",")})`,AE(f,u.startsWith("scale")?1:0)])}}),a.length&&(i.transform=new TD(a,l)),super(i)}},TD=class extends iy{constructor(t,r){super(),this._value=null,this.inputs=t,this.transforms=r}get(){return this._value||(this._value=this._get())}_get(){let t="",r=!0;return dr(this.inputs,(o,n)=>{let i=On(o[0]),[a,l]=this.transforms[n](_e.arr(i)?i:o.map(On));t+=" "+a,r=r&&l}),r?"none":t}observerAdded(t){t==1&&dr(this.inputs,r=>dr(r,o=>Ii(o)&&Hf(o,this)))}observerRemoved(t){t==0&&dr(this.inputs,r=>dr(r,o=>Ii(o)&&Uf(o,this)))}eventObserved(t){t.type=="change"&&(this._value=null),fh(this,t)}},O2e=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],N2e=["scrollTop","scrollLeft"];Us.assign({batchedUpdates:IW.unstable_batchedUpdates,createStringInterpolator:vE,colors:XG});var M2e=aW(O2e,{applyAnimatedValues:T2e,createAnimatedStyle:e=>new CD(e),getComponentProps:e=>PD(e,N2e)}),btt=M2e.animated;var i_=s(V(),1);function NW(e){return{top:e.offsetTop,left:e.offsetLeft}}function MW(e){let t=(0,i_.useRef)(null),r=(0,i_.useRef)(void 0);return t.current&&(r.current=NW(t.current)),(0,i_.useLayoutEffect)(()=>{let o=r.current;if(!o||!t.current||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let n=new kE({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:c}){if(!t.current)return;let{x:u,y:d}=c;u=Math.round(u),d=Math.round(d);let f=u===0&&d===0;t.current.style.transform=f?"":`translate3d(${u}px,${d}px,0)`}});t.current.style.transform="";let i=NW(t.current),a=Math.round(o.left-i.left),l=Math.round(o.top-i.top);return n.start({x:0,y:0,from:{x:a,y:l}}),()=>{n.stop(),n.set({x:0,y:0})}},[e]),t}var Re=s(x(),1),{MediaUploadModal:F2e}=nn(fy.privateApis);function DW({children:e,index:t,className:r}){let o=MW(t);return(0,Re.jsx)("div",{ref:o,className:r,children:e})}function dy(e){return Array.isArray(e)?e:e?[e]:[]}function D2e({render:e,multiple:t,...r}){let[o,n]=(0,Rr.useState)(!1);return window.__experimentalDataViewsMediaModal?(0,Re.jsxs)(Re.Fragment,{children:[e&&e({open:()=>n(!0)}),o&&(0,Re.jsx)(F2e,{...r,multiple:t,isOpen:o,onClose:()=>{n(!1),r.onClose?.()},onSelect:i=>{n(!1),r.onSelect?.(i)}})]}):(0,Re.jsx)(fy.MediaUpload,{...r,render:e,multiple:t?"add":void 0})}function kD({open:e,children:t,label:r,showTooltip:o=!1,onFilesDrop:n,attachment:i,isUploading:a=!1}){let l=i&&(0,yh.isBlobURL)(i.source_url),c=(0,Re.jsxs)("div",{className:K("fields__media-edit-picker-button",{"has-attachment":i}),role:"button",tabIndex:0,onClick:()=>{a||e()},onKeyDown:u=>{a||(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),e())},"aria-label":r,"aria-disabled":a,children:[t,l&&(0,Re.jsx)("span",{className:"fields__media-edit-picker-button-spinner",children:(0,Re.jsx)(jt.Spinner,{})}),!a&&(0,Re.jsx)(jt.DropZone,{onFilesDrop:u=>n(u,i?.id)})]});return o?(0,Re.jsx)(jt.Tooltip,{text:r,placement:"top",children:c}):c}var L2e=["application/zip","application/x-zip-compressed","application/x-rar-compressed","application/x-7z-compressed","application/x-tar","application/x-gzip"];function B2e({attachment:e}){return(0,Re.jsx)(jt.__experimentalTruncate,{className:"fields__media-edit-filename",children:e.title.rendered})}function LW(e){return(0,Re.jsx)(kD,{...e,children:(0,Re.jsx)("span",{className:"fields__media-edit-placeholder",children:e.label})})}function BW({itemId:e,index:t,totalItems:r,isUploading:o,moveItem:n,orientation:i="vertical"}){let a=i==="horizontal";return(0,Re.jsxs)(Re.Fragment,{children:[(0,Re.jsx)(jt.Button,{__next40pxDefaultSize:!0,icon:a?tr:U6,label:a?(0,Ni.__)("Move left"):(0,Ni.__)("Move up"),size:"small",disabled:o||t===0,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:l=>{l.stopPropagation(),n(e,"up")}}),(0,Re.jsx)(jt.Button,{__next40pxDefaultSize:!0,icon:a?rr:Jw,label:a?(0,Ni.__)("Move right"):(0,Ni.__)("Move down"),size:"small",disabled:o||t===r-1,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:l=>{l.stopPropagation(),n(e,"down")}})]})}function VW({attachment:e}){let t=e.source_url,r=e.mime_type||"";return r.startsWith("image")?(0,Re.jsx)("img",{className:"fields__media-edit-thumbnail",alt:e.alt_text||"",src:t}):r.startsWith("audio")?(0,Re.jsx)(jt.Icon,{icon:P6}):r.startsWith("video")?(0,Re.jsx)(jt.Icon,{icon:RF}):L2e.includes(r)?(0,Re.jsx)(jt.Icon,{icon:g6}):(0,Re.jsx)(jt.Icon,{icon:vM})}function V2e({allItems:e,addButtonLabel:t,multiple:r,removeItem:o,moveItem:n,open:i,onFilesDrop:a,isUploading:l,setTargetItemId:c}){return(0,Re.jsxs)("div",{className:K("fields__media-edit-expanded",{"is-multiple":r,"is-single":!r,"is-empty":!e?.length}),children:[e?.map((u,d)=>{let f=u.mime_type?.startsWith("image"),m=(0,yh.isBlobURL)(u.source_url),h=u.id;return(0,Re.jsxs)(DW,{index:d,className:K("fields__media-edit-expanded-item",{"has-preview-image":f}),children:[(0,Re.jsx)(kD,{open:()=>{c(h),i()},label:m?(0,Ni.__)("Replace"):(0,Ni.sprintf)((0,Ni.__)("Replace %s"),u.title.rendered),showTooltip:!0,onFilesDrop:a,attachment:u,isUploading:l,children:(0,Re.jsx)("div",{className:"fields__media-edit-expanded-preview",children:(0,Re.jsx)(jt.__experimentalVStack,{spacing:0,alignment:"center",justify:"center",className:"fields__media-edit-expanded-preview-stack",children:(!m||f)&&(0,Re.jsx)(VW,{attachment:u})})})}),!m&&(0,Re.jsx)("div",{className:"fields__media-edit-expanded-overlay",children:(0,Re.jsxs)(jt.__experimentalHStack,{className:"fields__media-edit-expanded-actions",spacing:0,alignment:"flex-end",expanded:!1,children:[r&&e.length>1&&(0,Re.jsx)(BW,{itemId:h,index:d,totalItems:e.length,isUploading:l,moveItem:n,orientation:"horizontal"}),(0,Re.jsx)(jt.Button,{__next40pxDefaultSize:!0,icon:rn,label:(0,Ni.__)("Remove"),size:"small",disabled:l,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:g=>{g.stopPropagation(),o(h)}})]})})]},u.id)}),(r||!e?.length)&&(0,Re.jsx)(LW,{open:()=>{c(void 0),i()},label:t,onFilesDrop:a,isUploading:l})]})}function j2e({allItems:e,addButtonLabel:t,multiple:r,removeItem:o,moveItem:n,open:i,onFilesDrop:a,isUploading:l,setTargetItemId:c}){return(0,Re.jsxs)(Re.Fragment,{children:[!!e?.length&&(0,Re.jsx)("div",{className:K("fields__media-edit-compact-group",{"is-single":e.length===1}),children:(0,Re.jsx)(jt.__experimentalVStack,{spacing:0,children:e.map((u,d)=>{let f=(0,yh.isBlobURL)(u.source_url),m=r&&e.length>1,h=u.id;return(0,Re.jsxs)(DW,{index:d,className:"fields__media-edit-compact",children:[(0,Re.jsx)(kD,{open:()=>{c(h),i()},label:(0,Ni.__)("Replace"),showTooltip:!0,onFilesDrop:a,attachment:u,isUploading:l,children:(0,Re.jsxs)(Re.Fragment,{children:[(0,Re.jsx)(VW,{attachment:u}),!f&&(0,Re.jsx)(B2e,{attachment:u})]})}),!f&&(0,Re.jsxs)(jt.__experimentalHStack,{className:"fields__media-edit-compact-movers",spacing:0,alignment:"flex-end",expanded:!1,children:[m&&(0,Re.jsx)(BW,{itemId:h,index:d,totalItems:e.length,isUploading:l,moveItem:n,orientation:"vertical"}),(0,Re.jsx)(jt.Button,{__next40pxDefaultSize:!0,icon:rn,label:(0,Ni.__)("Remove"),size:"small",disabled:l,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:g=>{g.stopPropagation(),o(h)}})]})]},u.id)})})}),(r||!e?.length)&&(0,Re.jsx)(LW,{open:()=>{c(void 0),i()},label:t,onFilesDrop:a,isUploading:l})]})}function jW({data:e,field:t,onChange:r,hideLabelFromVision:o,allowedTypes:n=["image"],multiple:i,isExpanded:a,validity:l}){let c=t.getValue({item:e}),[u,d]=(0,Rr.useState)(!1),f=(0,Rr.useRef)(null),[m,h]=(0,Rr.useState)(void 0);(0,Rr.useEffect)(()=>{let M=f.current,D=()=>{d(!0)};return M?.addEventListener("invalid",D),()=>M?.removeEventListener("invalid",D)},[]);let g=(0,s_.useSelect)(M=>{if(!c)return null;let G=dy(c).toSorted((Z,te)=>Z-te),{getEntityRecords:q}=M(ED.store);return q("postType","attachment",{include:G})},[c]),v=(0,Rr.useRef)(null);g!==null&&(v.current=g);let y=g;if(g===null&&v.current&&c){let M=new Set(v.current.map(D=>D.id));dy(c).every(D=>M.has(D))&&(y=v.current)}let b=(0,Rr.useMemo)(()=>{if(!y)return null;let M=dy(c),D=new Map(y.map(G=>[G.id,G]));return M.map(G=>D.get(G)).filter(G=>G!==void 0)},[y,c]),{createErrorNotice:S}=(0,s_.useDispatch)(FW.store),{receiveEntityRecords:w}=(0,s_.useDispatch)(ED.store),[_,C]=(0,Rr.useState)(),k=(0,Rr.useRef)(void 0),[A,R]=(0,Rr.useState)(!1),[I,B]=(0,Rr.useState)([]);(0,Rr.useEffect)(()=>{A&&(R(!1),k.current?.())},[A]);let E=(0,Rr.useCallback)(M=>r(t.setValue({item:e,value:M})),[e,t,r]),P=(0,Rr.useCallback)(M=>{let G=dy(c).filter(q=>q!==M);d(!0),E(G.length?G:void 0)},[c,E]),L=(0,Rr.useCallback)((M,D)=>{if(!b)return;let G=b.map(te=>te.id),q=G.indexOf(M),Z=D==="up"?q-1:q+1;[G[q],G[Z]]=[G[Z],G[q]],E(G)},[b,E]),j=(0,Rr.useCallback)((M,D)=>{C(D),(0,fy.uploadMedia)({allowedTypes:n?.length?n:void 0,filesList:M,onFileChange(G){let q=G.filter(ie=>(0,yh.isBlobURL)(ie.url)).map(ie=>ie.url);if(B(q),q.length)return;w("postType","attachment",[],void 0,!0);let Z=G.map(ie=>ie.id);if(!i){E(Z[0]),C(void 0);return}let te=dy(c);if(D===void 0)E([...te,...Z]);else{let ie=[...te];ie.splice(te.indexOf(D),1,...Z),E(ie)}C(void 0)},onError(G){C(void 0),B([]),S(G.message,{type:"snackbar"})},multiple:!!i})},[n,c,i,S,E,w]),z=t.placeholder||(i?(0,Ni.__)("Choose files"):(0,Ni.__)("Choose file")),W=(0,Rr.useMemo)(()=>{if(!I.length)return b;let M=[...b||[]],D=I.map(G=>({id:G,source_url:G,mime_type:(0,yh.getBlobTypeByURL)(G)}));if(_!==void 0){let G=M.findIndex(q=>q.id===_);M.splice(G,1,...D)}else M.push(...D);return M},[b,_,I]);(0,Rr.useEffect)(()=>{if(!u)return;let M=f.current;if(M)if(l){let D=l?.custom;h(D),D?.type==="invalid"?M.setCustomValidity(D.message||(0,Ni.__)("Invalid")):M.setCustomValidity("")}else M.setCustomValidity(""),h(void 0)},[u,t.isValid,l]);let O=(0,Rr.useCallback)(M=>{u||(!M.relatedTarget||!M.currentTarget.contains(M.relatedTarget))&&d(!0)},[u]);return(0,Re.jsxs)("div",{onBlur:O,children:[(0,Re.jsx)("fieldset",{className:"fields__media-edit","data-field-id":t.id,children:(0,Re.jsx)(D2e,{onSelect:M=>{if(!i){E(M.id),C(void 0);return}let D=Array.isArray(M)?M.map(q=>q.id):[M.id],G=dy(c);if(!G.length)E(D);else if(_===void 0){let q=G.filter(te=>D.includes(te)),Z=D.filter(te=>!G.includes(te));E([...q,...Z])}else if(M.id!==_){let q=G.filter(Z=>Z!==M.id);E(q.map(Z=>Z===_?M.id:Z))}C(void 0)},onClose:()=>C(void 0),allowedTypes:n,value:_!==void 0?_:c,multiple:i&&_===void 0,title:t.label,render:({open:M})=>{k.current=M;let D=a?V2e:j2e;return(0,Re.jsxs)(jt.__experimentalVStack,{spacing:2,children:[t.label&&(o?(0,Re.jsx)(Kt,{render:(0,Re.jsx)("legend",{}),children:t.label}):(0,Re.jsx)(jt.BaseControl.VisualLabel,{as:"legend",style:{marginBottom:0},children:t.label})),(0,Re.jsx)(D,{allItems:W,addButtonLabel:z,multiple:i,removeItem:P,moveItem:L,open:()=>R(!0),onFilesDrop:j,isUploading:!!I.length,setTargetItemId:C}),t.description&&(0,Re.jsx)(jt.__experimentalText,{variant:"muted",className:"fields__media-edit-description",children:t.description})]})}})}),(0,Re.jsx)(Kt,{children:(0,Re.jsx)("input",{type:"text",ref:f,value:c??"",tabIndex:-1,"aria-hidden":"true",onChange:()=>{}})}),m&&(0,Re.jsx)("div",{"aria-live":"polite",children:(0,Re.jsxs)("p",{className:K("components-validated-control__indicator",{"is-invalid":m.type==="invalid","is-valid":m.type==="valid"}),children:[(0,Re.jsx)(jt.Icon,{className:"components-validated-control__indicator-icon",icon:Mu,size:16,fill:"currentColor"}),m.message]})})]})}var RD=s(x(),1),zW=({item:e,config:t})=>{let r=e?._embedded?.["wp:featuredmedia"]?.[0],o=r?.source_url;return o?(0,RD.jsx)("img",{className:"fields-controls__featured-image-image",src:o,alt:"",srcSet:r?.media_details?.sizes?Object.values(r.media_details.sizes).map(n=>`${n.source_url} ${n.width}w`).join(", "):void 0,sizes:t?.sizes||"100vw"}):(0,RD.jsx)("span",{className:"fields-controls__featured-image-placeholder"})};var HW=s(x(),1),z2e={id:"featured_media",type:"media",label:(0,AD.__)("Featured Image"),placeholder:(0,AD.__)("Set featured image"),Edit:e=>(0,HW.jsx)(jW,{...e,isExpanded:!0}),render:zW,setValue:({value:e})=>({featured_media:e??0}),enableSorting:!1,filterBy:!1},ID=z2e;var KW=s(N(),1);var l_=s(V(),1),NE=s(Q(),1),ND=s(H(),1),MD=s(U(),1),FD=s(N(),1);var OD=s(U(),1),Ra=s(Q(),1);function IE(e){let t=e.type,r=e?.available_templates??{},o=Object.keys(r).length>0;return(0,OD.useSelect)(n=>{let i=!!n(Ra.store).getCurrentTheme()?.is_block_theme;if(!n(Ra.store).getPostType(t)?.viewable)return null;let l=i&&(n(Ra.store).canUser("create",{kind:"postType",name:"wp_template"})??!1),c=o||l,u=c?!!n(Ra.store).canUser("read",{kind:"postType",name:"wp_template"}):!1;return(!i||!u)&&c?"classic":i&&u?"block-theme":null},[t,o])}function H2e(e,t){return t?e==="page"?`${e}-${t}`:`single-${e}-${t}`:e==="page"?"page":`single-${e}`}var a_="";function OE(e,t,r){return(0,OD.useSelect)(o=>{if(!e||!t)return a_;let n=String(t),i=nn(o(Ra.store)).getHomePage();if(e==="page"&&i?.postType==="page"&&i?.postId===n){let f=o(Ra.store).getEntityRecords("postType","wp_template",{per_page:-1})?.find(m=>m.slug==="front-page");if(f)return Qe(f)}let a=nn(o(Ra.store)).getPostsPageId();if(e==="page"&&a===n){let d=o(Ra.store).getDefaultTemplateId({slug:"home"});if(!d)return a_;let f=o(Ra.store).getEntityRecord("postType","wp_template",d);return f?Qe(f):a_}let l=H2e(e,r),c=o(Ra.store).getDefaultTemplateId({slug:l});if(!c)return a_;let u=o(Ra.store).getEntityRecord("postType","wp_template",c);return u?Qe(u):a_},[e,t,r])}var ME=s(x(),1),U2e=[];function G2e({data:e,field:t,onChange:r}){let o=typeof e.id=="number"?e.id:parseInt(e.id,10),n=t.getValue({item:e}),i=(0,l_.useMemo)(()=>Object.entries(e?.available_templates??{}).map(([l,c])=>({label:c,value:l})),[e]),a=(0,MD.useSelect)(l=>{let{getHomePage:c,getPostsPageId:u}=nn(l(NE.store)),d=String(o),f=u()===d,m=e.type==="page"&&c()?.postId===d;return!f&&!m},[o,e.type]);return(0,ME.jsx)(ND.SelectControl,{__next40pxDefaultSize:!0,label:(0,FD.__)("Template"),hideLabelFromVision:!0,value:n,options:i,onChange:r,disabled:!a})}function W2e({data:e,field:t,onChange:r}){let o=e.type,n=typeof e.id=="number"?e.id:parseInt(e.id,10),i=e.slug,{templates:a,canSwitchTemplate:l}=(0,MD.useSelect)(f=>{let m=f(NE.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:o})??U2e,{getHomePage:h,getPostsPageId:g}=nn(f(NE.store)),v=String(n),y=g()===v,b=o==="page"&&h()?.postId===v;return{templates:m,canSwitchTemplate:!y&&!b}},[n,o]),c=OE(o,n,i),u=t.getValue({item:e}),d=(0,l_.useMemo)(()=>{let f=a.map(m=>({label:Qe(m),value:m.slug}));return[{label:c,value:""},...f]},[a,c]);return(0,ME.jsx)(ND.SelectControl,{__next40pxDefaultSize:!0,label:(0,FD.__)("Template"),hideLabelFromVision:!0,value:u,options:d,onChange:r,disabled:!l})}var UW=({data:e,field:t,onChange:r})=>{let o=(0,l_.useCallback)(a=>r({[t.id]:a}),[t.id,r]),n=IE(e);return!n||!["block-theme","classic"].includes(n)?null:(0,ME.jsx)(n==="classic"?G2e:W2e,{data:e,field:t,onChange:o})};var GW=s(U(),1),WW=s(Q(),1),YW=s(N(),1);var bh=s(x(),1);function Y2e({item:e,field:t}){let r=t.getValue({item:e}),o=e?.available_templates??{},n=r&&o[r]?o[r]:(0,YW.__)("Default template");return(0,bh.jsx)(bh.Fragment,{children:n})}function q2e({item:e,field:t}){let r=e.type,o=e.slug,n=e.id,i=t.getValue({item:e}),a=OE(r,n,o),l=(0,GW.useSelect)(c=>{if(!i)return;let d=c(WW.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:r})?.find(f=>f.slug===i);return d?Qe(d):void 0},[r,i]);return(0,bh.jsx)(bh.Fragment,{children:l??a})}var qW=({item:e,field:t})=>{let r=IE(e);return!r||!["block-theme","classic"].includes(r)?null:(0,bh.jsx)(r==="classic"?Y2e:q2e,{item:e,field:t})};var K2e={id:"template",type:"text",label:(0,KW.__)("Template"),Edit:UW,render:qW,enableSorting:!1,filterBy:!1},DD=K2e;var cY=s(N(),1);var LD=s(c_(),1),DE=s(H(),1),BD=s(U(),1),zu=s(V(),1),VD=s(Q(),1),tY=s(we(),1),rY=s(St(),1),Wf=s(N(),1),oY=s(vo(),1);var JW=s(St(),1),$W=s(N(),1);function u_(e){return typeof e.title=="object"&&"rendered"in e.title&&e.title.rendered?(0,JW.decodeEntities)(e.title.rendered):`#${e?.id} (${(0,$W.__)("no title")})`}var ju=s(x(),1);function $2e(e){let t=e.map(n=>({children:[],...n}));if(t.some(({parent:n})=>n==null))return t;let r=t.reduce((n,i)=>{let{parent:a}=i;return n[a]||(n[a]=[]),n[a].push(i),n},{}),o=n=>n.map(i=>{let a=r[i.id];return{...i,children:a&&a.length?o(a):[]}});return o(r[0]||[])}var eY=(e,t)=>{let r=(0,LD.default)(e||"").toLowerCase(),o=(0,LD.default)(t||"").toLowerCase();return r===o?0:r.startsWith(o)?r.length:1/0};function eke({data:e,onChangeControl:t}){let[r,o]=(0,zu.useState)(""),n=e.parent,i=e.id,a=e.type,{parentPostTitle:l,pageItems:c,isHierarchical:u}=(0,BD.useSelect)(h=>{let{getEntityRecord:g,getEntityRecords:v,getPostType:y}=h(VD.store),b=y(a),S=b?.hierarchical&&b.viewable,w=n?g("postType",a,n):null,_={per_page:100,exclude:i,parent_exclude:i,orderby:"menu_order",order:"asc",_fields:"id,title,parent",...!!r&&{search:r,orderby:"relevance"}};return{isHierarchical:S,parentPostTitle:w?u_(w):"",pageItems:S?v("postType",a,_):null}},[r,n,i,a]),d=(0,zu.useMemo)(()=>{let h=(b,S=0)=>b.map(C=>[{value:C.id,label:"\u2014 ".repeat(S)+(0,rY.decodeEntities)(C.name),rawName:C.name},...h(C.children||[],S+1)]).sort(([C],[k])=>{let A=eY(C.rawName,r),R=eY(k.rawName,r);return A>=R?1:-1}).flat();if(!c)return[];let g=c.map(b=>({id:b.id,parent:b.parent??null,name:u_(b)}));r||(g=$2e(g));let v=h(g),y=v.find(b=>b.value===n);return n&&l&&!y&&v.unshift({value:n,label:l,rawName:""}),v.map(b=>({...b,value:b.value.toString()}))},[c,r,l,n]);if(!u)return null;let f=h=>{o(h)},m=h=>{if(h)return t(parseInt(h,10)??0);t(0)};return(0,ju.jsx)(DE.ComboboxControl,{__next40pxDefaultSize:!0,label:(0,Wf.__)("Parent"),help:(0,Wf.__)("Choose a parent page."),value:n?.toString(),options:d,onFilterValueChange:(0,tY.debounce)(h=>f(h),300),onChange:m,hideLabelFromVision:!0})}var nY=({data:e,field:t,onChange:r})=>{let{id:o}=t,n=(0,BD.useSelect)(a=>a(VD.store).getEntityRecord("root","__unstableBase")?.home,[]),i=(0,zu.useCallback)(a=>r({[o]:a}),[o,r]);return(0,ju.jsx)("fieldset",{className:"fields-controls__parent",children:(0,ju.jsxs)("div",{children:[(0,zu.createInterpolateElement)((0,Wf.sprintf)((0,Wf.__)('Child pages inherit characteristics from their parent, such as URL structure. For instance, if "Pricing" is a child of "Services", its URL would be %1$s<wbr />/services<wbr />/pricing.'),(0,oY.filterURLForDisplay)(n).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,ju.jsx)("wbr",{})}),(0,ju.jsx)("p",{children:(0,zu.createInterpolateElement)((0,Wf.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,ju.jsx)(DE.ExternalLink,{href:(0,Wf.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes"),children:void 0})})}),(0,ju.jsx)(eke,{data:e,onChangeControl:i})]})})};var iY=s(U(),1),sY=s(Q(),1),aY=s(N(),1);var my=s(x(),1),lY=({item:e})=>{let t=(0,iY.useSelect)(r=>{let{getEntityRecord:o}=r(sY.store);return e?.parent?o("postType",e.type,e.parent):null},[e.parent,e.type]);return t?(0,my.jsx)(my.Fragment,{children:u_(t)}):(0,my.jsx)(my.Fragment,{children:(0,aY.__)("None")})};var tke={id:"parent",type:"text",label:(0,cY.__)("Parent"),Edit:nY,render:lY,enableSorting:!0,filterBy:!1},jD=tke;var fY=s(N(),1);var hy=s(H(),1),uY=s(V(),1),d_=s(N(),1),py=s(x(),1);function rke({data:e,onChange:t,field:r}){let[o,n]=(0,uY.useState)(!!r.getValue({item:e})),i=a=>{n(a),a||t({password:""})};return(0,py.jsxs)(hy.__experimentalVStack,{as:"fieldset",spacing:4,className:"fields-controls__password",children:[(0,py.jsx)(hy.CheckboxControl,{label:(0,d_.__)("Password protected"),help:(0,d_.__)("Only visible to those who know the password"),checked:o,onChange:i}),o&&(0,py.jsx)("div",{className:"fields-controls__password-input",children:(0,py.jsx)(hy.TextControl,{label:(0,d_.__)("Password"),onChange:a=>t({password:a}),value:r.getValue({item:e})||"",placeholder:(0,d_.__)("Use a secure password"),type:"text",__next40pxDefaultSize:!0,maxLength:255})})]})}var dY=rke;var oke={id:"password",type:"text",label:(0,fY.__)("Password"),Edit:dY,enableSorting:!1,enableHiding:!1,isVisible:e=>e.status!=="private",filterBy:!1},zD=oke;var pY=s(N(),1);var BE=s(H(),1);var Aa=s(N(),1),nke=[{value:"draft",label:(0,Aa.__)("Draft"),icon:zv,description:(0,Aa.__)("Not ready to publish.")},{value:"future",label:(0,Aa.__)("Scheduled"),icon:Qp,description:(0,Aa.__)("Publish automatically on a chosen date.")},{value:"pending",label:(0,Aa.__)("Pending Review"),icon:hS,description:(0,Aa.__)("Waiting for review before publishing.")},{value:"private",label:(0,Aa.__)("Private"),icon:dS,description:(0,Aa.__)("Only visible to site admins and editors.")},{value:"publish",label:(0,Aa.__)("Published"),icon:Zp,description:(0,Aa.__)("Visible to everyone.")},{value:"trash",label:(0,Aa.__)("Trash"),icon:Du}],LE=nke;var gy=s(x(),1);function ike({item:e}){let t=LE.find(({value:n})=>n===e.status),r=t?.label||e.status,o=t?.icon;return(0,gy.jsxs)(BE.__experimentalHStack,{alignment:"left",spacing:0,children:[o&&(0,gy.jsx)("div",{className:"fields-controls__status-icon",children:(0,gy.jsx)(BE.Icon,{icon:o})}),(0,gy.jsx)("span",{children:r})]})}var mY=ike;var ske="isAny",ake={label:(0,pY.__)("Status"),id:"status",type:"text",elements:LE,render:mY,Edit:"radio",enableSorting:!1,filterBy:{operators:[ske]}},HD=ake;var vy=s(N(),1),lke={id:"comment_status",label:(0,vy.__)("Comments"),type:"text",Edit:"radio",enableSorting:!1,enableHiding:!1,filterBy:!1,elements:[{value:"open",label:(0,vy.__)("Open"),description:(0,vy.__)("Visitors can add new comments and replies.")},{value:"closed",label:(0,vy.__)("Closed"),description:(0,vy.__)("Visitors cannot add new comments or replies. Existing comments remain visible.")}]},UD=lke;var Hu=s(N(),1),VE=s(H(),1),GD=s(x(),1);function cke({data:e,onChange:t}){let r=e?.ping_status??"open",o=n=>{t({...e,ping_status:n?"open":"closed"})};return(0,GD.jsx)(VE.CheckboxControl,{label:(0,Hu.__)("Enable pingbacks & trackbacks"),checked:r==="open",onChange:o,help:(0,GD.jsx)(VE.ExternalLink,{href:(0,Hu.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,Hu.__)("Learn more about pingbacks & trackbacks")})})}var uke={id:"ping_status",label:(0,Hu.__)("Trackbacks & Pingbacks"),type:"text",Edit:cke,enableSorting:!1,enableHiding:!1,filterBy:!1,elements:[{value:"open",label:(0,Hu.__)("Allow"),description:(0,Hu.__)("Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.")},{value:"closed",label:(0,Hu.__)("Don't allow"),description:(0,Hu.__)("Don't allow link notifications from other blogs (pingbacks and trackbacks) on new articles.")}]},WD=uke;var yy=s(N(),1),dke={id:"discussion",label:(0,yy.__)("Discussion"),type:"text",render:({item:e})=>{let t=e.comment_status==="open",r=e.ping_status==="open";return t&&r?(0,yy.__)("Open"):t&&!r?(0,yy.__)("Comments only"):!t&&r?(0,yy.__)("Pings only"):(0,yy.__)("Closed")},filterBy:!1},YD=dke;var gY=s(N(),1);var yc=s(N(),1),m_=s(V(),1),Yf=s(go(),1),vc=s(x(),1),f_=e=>(0,Yf.dateI18n)((0,Yf.getSettings)().formats.datetimeAbbreviated,(0,Yf.getDate)(e)),fke=({item:e})=>{if(["draft","private"].includes(e.status??""))return(0,m_.createInterpolateElement)((0,yc.sprintf)((0,yc.__)("<span>Modified: <time>%s</time></span>"),f_(e.date??null)),{span:(0,vc.jsx)("span",{}),time:(0,vc.jsx)("time",{})});if(e.status==="future")return(0,m_.createInterpolateElement)((0,yc.sprintf)((0,yc.__)("<span>Scheduled: <time>%s</time></span>"),f_(e.date??null)),{span:(0,vc.jsx)("span",{}),time:(0,vc.jsx)("time",{})});if(e.status==="publish")return(0,m_.createInterpolateElement)((0,yc.sprintf)((0,yc.__)("<span>Published: <time>%s</time></span>"),f_(e.date??null)),{span:(0,vc.jsx)("span",{}),time:(0,vc.jsx)("time",{})});let n=(0,Yf.getDate)(e.modified??null)>(0,Yf.getDate)(e.date??null)?e.modified:e.date;return e.status==="pending"?(0,m_.createInterpolateElement)((0,yc.sprintf)((0,yc.__)("<span>Modified: <time>%s</time></span>"),f_(n??null)),{span:(0,vc.jsx)("span",{}),time:(0,vc.jsx)("time",{})}):(0,vc.jsx)("time",{children:f_(e.date??null)})},hY=fke;var mke={id:"date",type:"datetime",label:(0,gY.__)("Date"),render:hY,filterBy:{operators:["before","after"]}},qD=mke;var vY=s(N(),1),pke={id:"scheduled_date",type:"datetime",label:(0,vY.__)("Scheduled Date"),getValue:({item:e})=>e.date,setValue:({value:e})=>({date:e}),isVisible:e=>e.status==="future",Edit:{control:"datetime",compact:!0},enableHiding:!1,enableSorting:!1,filterBy:!1},KD=pke;var xY=s(N(),1),CY=s(U(),1),TY=s(Q(),1);var yY=s(N(),1),bY=s(V(),1);var jE=s(H(),1),wY=s(U(),1),SY=s(Q(),1),qf=s(x(),1);function hke({item:e}){let t=e?.author,r=e?._embedded?.author?.[0]?.id,o=!!(t&&(!r||t!==r)),n=(0,wY.useSelect)(u=>{if(!o)return null;let{getEntityRecord:d}=u(SY.store);return t?d("root","user",t):null},[t,o]),i=n?.name||e?._embedded?.author?.[0]?.name,a=n?.avatar_urls?.[48]||e?._embedded?.author?.[0]?.avatar_urls?.[48],[l,c]=(0,bY.useState)(!1);return(0,qf.jsxs)(jE.__experimentalHStack,{alignment:"left",spacing:0,children:[!!a&&(0,qf.jsx)("div",{className:K("fields-controls__author-avatar",{"is-loaded":l}),children:(0,qf.jsx)("img",{onLoad:()=>c(!0),alt:(0,yY.__)("Author avatar"),src:a})}),!a&&(0,qf.jsx)("div",{className:"fields-controls__author-icon",children:(0,qf.jsx)(jE.Icon,{icon:eS})}),(0,qf.jsx)("span",{className:"fields-controls__author-name",children:i})]})}var _Y=hke;var gke={label:(0,xY.__)("Author"),id:"author",type:"integer",getElements:async()=>(await(0,CY.resolveSelect)(TY.store).getEntityRecords("root","user",{per_page:-1,who:"authors",_fields:"id,name",context:"view"})??[]).map(({id:t,name:r})=>({value:t,label:r})),setValue:({value:e})=>({author:Number(e)}),render:_Y,sort:(e,t,r)=>{let o=e._embedded?.author?.[0]?.name||"",n=t._embedded?.author?.[0]?.name||"";return r==="asc"?o.localeCompare(n):n.localeCompare(o)},filterBy:{operators:["isAny","isNone"]}},p_=gke;var PY=s(N(),1),vke={id:"notesCount",label:(0,PY.__)("Notes"),type:"integer",enableSorting:!1,filterBy:!1},ZD=vke;var XD=s(St(),1),by=s(N(),1),zE=s(H(),1),QD=s(x(),1),yke={id:"excerpt",type:"text",label:(0,by.__)("Excerpt"),placeholder:(0,by.__)("Add an excerpt"),description:(0,QD.jsx)(zE.ExternalLink,{href:(0,by.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),children:(0,by.__)("Learn more about manual excerpts")}),render:({item:e})=>{let t;return typeof e.excerpt=="string"?t=e.excerpt?(0,XD.decodeEntities)(e.excerpt):(0,by.__)("Add an excerpt"):t=(0,XD.decodeEntities)(e.excerpt?.raw||""),(0,QD.jsx)(zE.__experimentalText,{align:"left",numberOfLines:3,truncate:!0,children:t})},Edit:{control:"textarea",rows:4},enableSorting:!1,filterBy:!1},JD=yke;var Ia=s(N(),1),EY=s(U(),1),kY=s(Q(),1),bke=[{id:"aside",caption:(0,Ia.__)("Aside")},{id:"audio",caption:(0,Ia.__)("Audio")},{id:"chat",caption:(0,Ia.__)("Chat")},{id:"gallery",caption:(0,Ia.__)("Gallery")},{id:"image",caption:(0,Ia.__)("Image")},{id:"link",caption:(0,Ia.__)("Link")},{id:"quote",caption:(0,Ia.__)("Quote")},{id:"standard",caption:(0,Ia.__)("Standard")},{id:"status",caption:(0,Ia.__)("Status")},{id:"video",caption:(0,Ia.__)("Video")}].sort((e,t)=>{let r=e.caption.toUpperCase(),o=t.caption.toUpperCase();return r<o?-1:r>o?1:0}),wke={id:"format",label:(0,Ia.__)("Format"),type:"text",Edit:"radio",enableSorting:!1,enableHiding:!1,filterBy:!1,getElements:async()=>{let e=await(0,EY.resolveSelect)(kY.store).getThemeSupports();return bke.filter(t=>e?.formats?.includes(t.id)).map(t=>({value:t.id,label:t.caption}))}},$D=wke;var MY=s(N(),1);var h_=s(H(),1),ls=s(N(),1),AY=s(wy(),1),IY=s(go(),1),OY=s(V(),1),g_=s(x(),1),Ske=189;function NY({item:e}){let t="";typeof e.content=="string"?t=e.content:typeof e.content=="function"&&(t=e.content(e));let r=(0,ls._x)("words","Word count type. Do not translate!"),o=(0,OY.useMemo)(()=>t?(0,AY.count)(t,r):0,[t,r]),n=e.modified;if(!o&&!n)return null;let i;if(o){let a=Math.round(o/Ske),l=(0,ls.sprintf)((0,ls._n)("%s word","%s words",o),o.toLocaleString()),c=a<=1?(0,ls.__)("1 minute"):(0,ls.sprintf)((0,ls._n)("%s minute","%s minutes",a),a.toLocaleString());i=(0,ls.sprintf)((0,ls.__)("%1$s, %2$s read time."),l,c)}return(0,g_.jsxs)(h_.__experimentalVStack,{spacing:1,children:[i&&(0,g_.jsx)(h_.__experimentalText,{variant:"muted",children:i}),n&&(0,g_.jsx)(h_.__experimentalText,{variant:"muted",children:(0,ls.sprintf)((0,ls.__)("Last edited %s."),(0,IY.humanTimeDiff)(n))})]})}var _ke={label:(0,MY.__)("Post content information"),id:"post-content-info",type:"text",readOnly:!0,render:NY,enableSorting:!1,enableHiding:!1,filterBy:!1},eL=_ke;var tL=s(N(),1),xke={id:"sticky",type:"boolean",label:(0,tL.__)("Sticky"),description:(0,tL.__)("Pin this post to the top of the blog."),enableSorting:!1,enableHiding:!1,isVisible:e=>!!e._links?.["wp:action-sticky"],filterBy:!1},rL=xke;var FY=s(N(),1),Cke={id:"view-post",label:(0,FY._x)("View","verb"),isPrimary:!0,icon:ss,isEligible(e){return e.status!=="trash"},callback(e,{onActionPerformed:t}){let r=e[0];window.open(r?.link,"_blank"),t&&t(e)}},oL=Cke;var nL=s(U(),1),DY=s(Q(),1),Kf=s(N(),1),LY=s(wt(),1),BY=s(V(),1),Gu=s(H(),1),Uu=s(x(),1);function Tke(e){return typeof e.menu_order=="number"&&Number.isInteger(e.menu_order)}function Pke({items:e,closeModal:t,onActionPerformed:r}){let[o,n]=(0,BY.useState)(e[0]),{editEntityRecord:i,saveEditedEntityRecord:a}=(0,nL.useDispatch)(DY.store),{createSuccessNotice:l,createErrorNotice:c}=(0,nL.useDispatch)(LY.store),u=Tke(o);async function d(f){if(f.preventDefault(),!!u)try{await i("postType",o.type,o.id,{menu_order:o.menu_order}),t?.(),await a("postType",o.type,o.id,{throwOnError:!0}),l((0,Kf.__)("Order updated."),{type:"snackbar"}),r?.(e)}catch(m){let h=m,g=h.message&&h.code!=="unknown_error"?h.message:(0,Kf.__)("An error occurred while updating the order");c(g,{type:"snackbar"})}}return(0,Uu.jsx)("form",{onSubmit:d,children:(0,Uu.jsxs)(Gu.__experimentalVStack,{spacing:"5",children:[(0,Uu.jsx)("div",{children:(0,Kf.__)("Determines the order of pages. Pages with the same order value are sorted alphabetically. Negative order values are supported.")}),(0,Uu.jsx)(Gu.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,Kf.__)("Order"),type:"number",value:typeof o.menu_order=="number"&&Number.isInteger(o.menu_order)?String(o.menu_order):"",onChange:f=>{let m=parseInt(f,10);n({...o,menu_order:isNaN(m)?void 0:m})}}),(0,Uu.jsxs)(Gu.__experimentalHStack,{justify:"right",children:[(0,Uu.jsx)(Gu.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,Kf.__)("Cancel")}),(0,Uu.jsx)(Gu.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",accessibleWhenDisabled:!0,disabled:!u,children:(0,Kf.__)("Save")})]})]})})}var Eke={id:"order-pages",label:(0,Kf.__)("Order"),isEligible({status:e}){return e!=="trash"},modalFocusOnMount:"firstContentElement",RenderModal:Pke},iL=Eke;var sL=s(U(),1),VY=s(Q(),1),ei=s(N(),1),jY=s(wt(),1),aL=s(V(),1),Yu=s(H(),1);var Wu=s(x(),1),kke={id:"duplicate-post",label:(0,ei._x)("Duplicate","action label"),isEligible({status:e}){return e!=="trash"},modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,aL.useState)({...e[0],title:(0,ei.sprintf)((0,ei._x)("%s (Copy)","post"),Qe(e[0]))}),[i,a]=(0,aL.useState)(!1),{saveEntityRecord:l}=(0,sL.useDispatch)(VY.store),{createSuccessNotice:c,createErrorNotice:u}=(0,sL.useDispatch)(jY.store);async function d(f){if(f.preventDefault(),i)return;let m=o.type==="wp_template",h={status:m?"publish":"draft",title:o.title,slug:m?o.slug:o.title||(0,ei.__)("No title"),comment_status:o.comment_status,content:typeof o.content=="string"?o.content:o.content.raw,excerpt:typeof o.excerpt=="string"?o.excerpt:o.excerpt?.raw,meta:o.meta,parent:o.parent,password:o.password,template:o.template,format:o.format,featured_media:o.featured_media,menu_order:o.menu_order,ping_status:o.ping_status},g="wp:action-assign-";Object.keys(o?._links||{}).filter(y=>y.startsWith(g)).map(y=>y.slice(g.length)).forEach(y=>{o.hasOwnProperty(y)&&(h[y]=o[y])}),a(!0);try{let y=await l("postType",o.type,h,{throwOnError:!0});c((0,ei.sprintf)((0,ei.__)('"%s" successfully created.'),Qe(y)),{id:"duplicate-post-action",type:"snackbar"}),r&&r([y])}catch(y){let b=y,S=b.message&&b.code!=="unknown_error"?b.message:(0,ei.__)("An error occurred while duplicating the page.");u(S,{type:"snackbar"})}finally{a(!1),t?.()}}return(0,Wu.jsx)("form",{onSubmit:d,children:(0,Wu.jsxs)(Yu.__experimentalVStack,{spacing:3,children:[typeof o.id=="string"&&(0,Wu.jsx)("div",{children:(0,ei.__)("You are about to duplicate a bundled template. Changes will not be live until you activate the new template.")}),(0,Wu.jsx)(Yu.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,ei.__)("Title"),placeholder:(0,ei.__)("No title"),value:Qe(o),onChange:f=>n(m=>({...m,title:f||(0,ei.__)("No title")}))}),(0,Wu.jsxs)(Yu.__experimentalHStack,{spacing:2,justify:"end",children:[(0,Wu.jsx)(Yu.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,ei.__)("Cancel")}),(0,Wu.jsx)(Yu.Button,{variant:"primary",type:"submit",isBusy:i,"aria-disabled":i,__next40pxDefaultSize:!0,children:(0,ei._x)("Duplicate","action label")})]})]})})}},lL=kke;var cL=s(U(),1),zY=s(Q(),1),wh=s(N(),1),HY=s(V(),1),UY=s(Sl(),1),qu=s(H(),1),GY=s(wt(),1);var Zf=s(x(),1),{PATTERN_TYPES:Rke}=nn(UY.privateApis),Ake={id:"rename-post",label:(0,wh.__)("Rename"),modalFocusOnMount:"firstContentElement",isEligible(e){if(e.status==="trash"||e.type==="wp_template"&&typeof e.id=="string"&&window?.__experimentalTemplateActivate)return!1;let t=["wp_template","wp_template_part"];return window?.__experimentalTemplateActivate||t.push("wp_template"),t.includes(e.type)?CH(e)&&!window?.__experimentalTemplateActivate?DP(e)&&e.is_custom&&e.permissions?.update:TH(e)?e.source==="custom"&&!e?.has_theme_file&&e.permissions?.update:e.type===Rke.user&&e.permissions?.update:e.permissions?.update},RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o]=e,[n,i]=(0,HY.useState)(()=>Qe(o,"")),{editEntityRecord:a,saveEditedEntityRecord:l}=(0,cL.useDispatch)(zY.store),{createSuccessNotice:c,createErrorNotice:u}=(0,cL.useDispatch)(GY.store);async function d(f){f.preventDefault();try{await a("postType",o.type,o.id,{title:n}),i(""),t?.(),await l("postType",o.type,o.id,{throwOnError:!0}),c((0,wh.__)("Name updated"),{type:"snackbar"}),r?.(e)}catch(m){let h=m,g=h.message&&h.code!=="unknown_error"?h.message:(0,wh.__)("An error occurred while updating the name");u(g,{type:"snackbar"})}}return(0,Zf.jsx)("form",{onSubmit:d,children:(0,Zf.jsxs)(qu.__experimentalVStack,{spacing:"5",children:[(0,Zf.jsx)(qu.TextControl,{__next40pxDefaultSize:!0,label:(0,wh.__)("Name"),value:n,onChange:i,required:!0}),(0,Zf.jsxs)(qu.__experimentalHStack,{justify:"right",children:[(0,Zf.jsx)(qu.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,wh.__)("Cancel")}),(0,Zf.jsx)(qu.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,wh.__)("Save")})]})]})})}},uL=Ake;var ti=s(U(),1),Sh=s(Q(),1),Mo=s(N(),1),Xf=s(wt(),1),WY=s(V(),1),HE=s(lt(),1),Ku=s(H(),1),YY=s(vo(),1),qY=s(If(),1);var _h=s(x(),1),Ike=e=>e?e.source==="custom"&&(!!e?.plugin||e?.has_theme_file):!1,Oke=async(e,{allowUndo:t=!0}={})=>{let r="edit-site-template-reverted";if((0,ti.dispatch)(Xf.store).removeNotice(r),!Ike(e)){(0,ti.dispatch)(Xf.store).createErrorNotice((0,Mo.__)("This template is not revertable."),{type:"snackbar"});return}try{let o=(0,ti.select)(Sh.store).getEntityConfig("postType",e.type);if(!o){(0,ti.dispatch)(Xf.store).createErrorNotice((0,Mo.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let n=(0,YY.addQueryArgs)(`${o.baseURL}/${e.id}`,{context:"edit",source:e.origin}),i=await(0,qY.default)({path:n});if(!i){(0,ti.dispatch)(Xf.store).createErrorNotice((0,Mo.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let a=({blocks:u=[]})=>(0,HE.__unstableSerializeAndClean)(u),l=(0,ti.select)(Sh.store).getEditedEntityRecord("postType",e.type,e.id);(0,ti.dispatch)(Sh.store).editEntityRecord("postType",e.type,e.id,{content:a,blocks:l.blocks,source:"custom"},{undoIgnore:!0});let c=(0,HE.parse)(i?.content?.raw);if((0,ti.dispatch)(Sh.store).editEntityRecord("postType",e.type,i.id,{content:a,blocks:c,source:"theme"}),t){let u=()=>{(0,ti.dispatch)(Sh.store).editEntityRecord("postType",e.type,l.id,{content:a,blocks:l.blocks,source:"custom"})};(0,ti.dispatch)(Xf.store).createSuccessNotice((0,Mo.__)("Template reset."),{type:"snackbar",id:r,actions:[{label:(0,Mo.__)("Undo"),onClick:u}]})}}catch(o){let n=o.message&&o.code!=="unknown_error"?o.message:(0,Mo.__)("Template revert failed. Please reload.");(0,ti.dispatch)(Xf.store).createErrorNotice(n,{type:"snackbar"})}},Nke={id:"reset-post",label:(0,Mo.__)("Reset"),isEligible:e=>window?.__experimentalTemplateActivate?e.type==="wp_template_part"&&e?.source==="custom"&&e?.has_theme_file:Lu(e)&&e?.source==="custom"&&(!!(e.type==="wp_template"&&e?.plugin)||e?.has_theme_file),icon:Ou,supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,WY.useState)(!1),{saveEditedEntityRecord:i}=(0,ti.useDispatch)(Sh.store),{createSuccessNotice:a,createErrorNotice:l}=(0,ti.useDispatch)(Xf.store),c=async()=>{try{for(let u of e)await Oke(u,{allowUndo:!1}),await i("postType",u.type,u.id);a(e.length>1?(0,Mo.sprintf)((0,Mo.__)("%d items reset."),e.length):(0,Mo.sprintf)((0,Mo.__)('"%s" reset.'),Qe(e[0])),{type:"snackbar",id:"revert-template-action"})}catch(u){let d;e[0].type==="wp_template"?d=e.length===1?(0,Mo.__)("An error occurred while reverting the template."):(0,Mo.__)("An error occurred while reverting the templates."):d=e.length===1?(0,Mo.__)("An error occurred while reverting the template part."):(0,Mo.__)("An error occurred while reverting the template parts.");let f=u,m=f.message&&f.code!=="unknown_error"?f.message:d;l(m,{type:"snackbar"})}};return(0,_h.jsxs)(Ku.__experimentalVStack,{spacing:"5",children:[(0,_h.jsx)(Ku.__experimentalText,{children:(0,Mo.__)("Reset to default and clear all customizations?")}),(0,_h.jsxs)(Ku.__experimentalHStack,{justify:"right",children:[(0,_h.jsx)(Ku.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,Mo.__)("Cancel")}),(0,_h.jsx)(Ku.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{n(!0),await c(),r?.(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,children:(0,Mo.__)("Reset")})]})]})}},dL=Nke;var UE=s(N(),1),KY=s(Sl(),1);var ZY=s(x(),1),{CreatePatternModalContents:Mke,useDuplicatePatternProps:Fke}=nn(KY.privateApis),Dke={id:"duplicate-pattern",label:(0,UE._x)("Duplicate","action label"),isEligible:e=>e.type!=="wp_template_part",modalHeader:(0,UE._x)("Duplicate pattern","action label"),modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t})=>{let[r]=e,o=Fke({pattern:r,onSuccess:()=>t?.()});return(0,ZY.jsx)(Mke,{onClose:t,confirmLabel:(0,UE._x)("Duplicate","action label"),...o})}},fL=Dke;var Sy=function(){return Sy=Object.assign||function(t){for(var r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Sy.apply(this,arguments)};function XY(e){return e.toLowerCase()}var Lke=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Bke=/[^A-Z0-9]+/gi;function JY(e,t){t===void 0&&(t={});for(var r=t.splitRegexp,o=r===void 0?Lke:r,n=t.stripRegexp,i=n===void 0?Bke:n,a=t.transform,l=a===void 0?XY:a,c=t.delimiter,u=c===void 0?" ":c,d=QY(QY(e,o,"$1\0$2"),i,"\0"),f=0,m=d.length;d.charAt(f)==="\0";)f++;for(;d.charAt(m-1)==="\0";)m--;return d.slice(f,m).split("\0").map(l).join(u)}function QY(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce(function(o,n){return o.replace(n,r)},e)}function $Y(e,t){return t===void 0&&(t={}),JY(e,Sy({delimiter:"."},t))}function xh(e,t){return t===void 0&&(t={}),$Y(e,Sy({delimiter:"-"},t))}"stream"in Blob.prototype||Object.defineProperty(Blob.prototype,"stream",{value(){return new Response(this).body}}),"setBigUint64"in DataView.prototype||Object.defineProperty(DataView.prototype,"setBigUint64",{value(e,t,r){let o=Number(0xffffffffn&t),n=Number(t>>32n);this.setUint32(e+(r?0:4),o,r),this.setUint32(e+(r?4:0),n,r)}});var xy=e=>new DataView(new ArrayBuffer(e)),Zu=e=>new Uint8Array(e.buffer||e),_y=e=>new TextEncoder().encode(String(e)),Ch=e=>Math.min(4294967295,Number(e)),eq=e=>Math.min(65535,Number(e));function Vke(e,t){if(t===void 0||t instanceof Date||(t=new Date(t)),e instanceof File)return{isFile:1,t:t||new Date(e.lastModified),i:e.stream()};if(e instanceof Response)return{isFile:1,t:t||new Date(e.headers.get("Last-Modified")||Date.now()),i:e.body};if(t===void 0)t=new Date;else if(isNaN(t))throw new Error("Invalid modification date.");if(e===void 0)return{isFile:0,t};if(typeof e=="string")return{isFile:1,t,i:_y(e)};if(e instanceof Blob)return{isFile:1,t,i:e.stream()};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:1,t,i:e};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:1,t,i:Zu(e)};if(Symbol.asyncIterator in e)return{isFile:1,t,i:rq(e[Symbol.asyncIterator]())};throw new TypeError("Unsupported input format.")}function rq(e,t=e){return new ReadableStream({async pull(r){let o=0;for(;r.desiredSize>o;){let n=await e.next();if(!n.value){r.close();break}{let i=jke(n.value);r.enqueue(i),o+=i.byteLength}}},cancel(r){t.throw?.(r)}})}function jke(e){return typeof e=="string"?_y(e):e instanceof Uint8Array?e:Zu(e)}function oq(e,t,r){let[o,n]=(function(i){return i?i instanceof Uint8Array?[i,1]:ArrayBuffer.isView(i)||i instanceof ArrayBuffer?[Zu(i),1]:[_y(i),0]:[void 0,0]})(t);if(e instanceof File)return{o:mL(o||_y(e.name)),u:BigInt(e.size),l:n};if(e instanceof Response){let i=e.headers.get("content-disposition"),a=i&&i.match(/;\s*filename\*?=["']?(.*?)["']?$/i),l=a&&a[1]||e.url&&new URL(e.url).pathname.split("/").findLast(Boolean),c=l&&decodeURIComponent(l),u=r||+e.headers.get("content-length");return{o:mL(o||_y(c)),u:BigInt(u),l:n}}return o=mL(o,e!==void 0||r!==void 0),typeof e=="string"?{o,u:BigInt(_y(e).length),l:n}:e instanceof Blob?{o,u:BigInt(e.size),l:n}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{o,u:BigInt(e.byteLength),l:n}:{o,u:zke(e,r),l:n}}function zke(e,t){return t>-1?BigInt(t):e?void 0:0n}function mL(e,t=1){if(!e||e.every((r=>r===47)))throw new Error("The file must have a name.");if(t)for(;e[e.length-1]===47;)e=e.subarray(0,-1);else e[e.length-1]!==47&&(e=new Uint8Array([...e,47]));return e}var nq=new Uint32Array(256);for(let e=0;e<256;++e){let t=e;for(let r=0;r<8;++r)t=t>>>1^(1&t&&3988292384);nq[e]=t}function tq(e,t=0){t^=-1;for(var r=0,o=e.length;r<o;r++)t=t>>>8^nq[255&t^e[r]];return(-1^t)>>>0}function iq(e,t,r=0){let o=e.getSeconds()>>1|e.getMinutes()<<5|e.getHours()<<11,n=e.getDate()|e.getMonth()+1<<5|e.getFullYear()-1980<<9;t.setUint16(r,o,1),t.setUint16(r+2,n,1)}function Hke({o:e,l:t},r){return 8*(!t||(r??(function(o){try{Uke.decode(o)}catch{return 0}return 1})(e)))}var Uke=new TextDecoder("utf8",{fatal:1});function Gke(e,t=0){let r=xy(30);return r.setUint32(0,1347093252),r.setUint32(4,754976768|t),iq(e.t,r,10),r.setUint16(26,e.o.length,1),Zu(r)}async function*Wke(e){let{i:t}=e;if("then"in t&&(t=await t),t instanceof Uint8Array)yield t,e.m=tq(t,0),e.u=BigInt(t.length);else{e.u=0n;let r=t.getReader();for(;;){let{value:o,done:n}=await r.read();if(n)break;e.m=tq(o,e.m),e.u+=BigInt(o.length),yield o}}}function Yke(e,t){let r=xy(16+(t?8:0));return r.setUint32(0,1347094280),r.setUint32(4,e.isFile?e.m:0,1),t?(r.setBigUint64(8,e.u,1),r.setBigUint64(16,e.u,1)):(r.setUint32(8,Ch(e.u),1),r.setUint32(12,Ch(e.u),1)),Zu(r)}function qke(e,t,r=0,o=0){let n=xy(46);return n.setUint32(0,1347092738),n.setUint32(4,755182848),n.setUint16(8,2048|r),iq(e.t,n,12),n.setUint32(16,e.isFile?e.m:0,1),n.setUint32(20,Ch(e.u),1),n.setUint32(24,Ch(e.u),1),n.setUint16(28,e.o.length,1),n.setUint16(30,o,1),n.setUint16(40,e.isFile?33204:16893,1),n.setUint32(42,Ch(t),1),Zu(n)}function Kke(e,t,r){let o=xy(r);return o.setUint16(0,1,1),o.setUint16(2,r-4,1),16&r&&(o.setBigUint64(4,e.u,1),o.setBigUint64(12,e.u,1)),o.setBigUint64(r-8,t,1),Zu(o)}function sq(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}var Zke=e=>(function(t){let r=BigInt(22),o=0n,n=0;for(let i of t){if(!i.o)throw new Error("Every file must have a non-empty name.");if(i.u===void 0)throw new Error(`Missing size for file "${new TextDecoder().decode(i.o)}".`);let a=i.u>=0xffffffffn,l=o>=0xffffffffn;o+=BigInt(46+i.o.length+(a&&8))+i.u,r+=BigInt(i.o.length+46+(12*l|28*a)),n||(n=a)}return(n||o>=0xffffffffn)&&(r+=BigInt(76)),r+o})((function*(t){for(let r of t)yield oq(...sq(r)[0])})(e));function aq(e,t={}){let r={"Content-Type":"application/zip","Content-Disposition":"attachment"};return(typeof t.length=="bigint"||Number.isInteger(t.length))&&t.length>0&&(r["Content-Length"]=String(t.length)),t.metadata&&(r["Content-Length"]=String(Zke(t.metadata))),new Response(Xke(e,t),{headers:r})}function Xke(e,t={}){let r=(function(o){let n=o[Symbol.iterator in o?Symbol.iterator:Symbol.asyncIterator]();return{async next(){let i=await n.next();if(i.done)return i;let[a,l]=sq(i.value);return{done:0,value:Object.assign(Vke(...l),oq(...a))}},throw:n.throw?.bind(n),[Symbol.asyncIterator](){return this}}})(e);return rq((async function*(o,n){let i=[],a=0n,l=0n,c=0;for await(let f of o){let m=Hke(f,n.buffersAreUTF8);yield Gke(f,m),yield new Uint8Array(f.o),f.isFile&&(yield*Wke(f));let h=f.u>=0xffffffffn,g=12*(a>=0xffffffffn)|28*h;yield Yke(f,h),i.push(qke(f,a,m,g)),i.push(f.o),g&&i.push(Kke(f,a,g)),h&&(a+=8n),l++,a+=BigInt(46+f.o.length)+f.u,c||(c=h)}let u=0n;for(let f of i)yield f,u+=BigInt(f.length);if(c||a>=0xffffffffn){let f=xy(76);f.setUint32(0,1347094022),f.setBigUint64(4,BigInt(44),1),f.setUint32(12,755182848),f.setBigUint64(24,l,1),f.setBigUint64(32,l,1),f.setBigUint64(40,u,1),f.setBigUint64(48,a,1),f.setUint32(56,1347094023),f.setBigUint64(64,a+u,1),f.setUint32(72,1,1),yield Zu(f)}let d=xy(22);d.setUint32(0,1347093766),d.setUint16(8,eq(l),1),d.setUint16(10,eq(l),1),d.setUint32(12,Ch(u),1),d.setUint32(16,Ch(a),1),yield Zu(d)})(r,t),r)}var pL=s(DS(),1),hL=s(N(),1);function lq(e){return JSON.stringify({__file:e.type,title:Qe(e),content:typeof e.content=="string"?e.content:e.content?.raw,syncStatus:e.wp_pattern_sync_status},null,2)}var Qke={id:"export-pattern",label:(0,hL.__)("Export as JSON"),icon:lM,supportsBulk:!0,isEligible:e=>e.type==="wp_block",callback:async e=>{if(e.length===1)return(0,pL.downloadBlob)(`${xh(Qe(e[0])||e[0].slug)}.json`,lq(e[0]),"application/json");let t={},r=e.map(o=>{let n=xh(Qe(o)||o.slug);return t[n]=(t[n]||0)+1,{name:`${n+(t[n]>1?"-"+(t[n]-1):"")}.json`,lastModified:new Date,input:lq(o)}});return(0,pL.downloadBlob)((0,hL.__)("patterns-export")+".zip",await aq(r).blob(),"application/zip")}},gL=Qke;var cq=s(vo(),1),GE=s(N(),1),Jke={id:"view-post-revisions",context:"list",label(e){let t=e[0]._links?.["version-history"]?.[0]?.count??0;return(0,GE.sprintf)((0,GE.__)("View revisions (%d)"),t)},isEligible(e){if(e.status==="trash")return!1;let t=e?._links?.["predecessor-version"]?.[0]?.id??null,r=e?._links?.["version-history"]?.[0]?.count??0;return!!t&&r>1},callback(e,{onActionPerformed:t}){let r=e[0],o=(0,cq.addQueryArgs)("revision.php",{revision:r?._links?.["predecessor-version"]?.[0]?.id});document.location.href=o,t&&t(e)}},vL=Jke;var uq=s(Q(),1),Wo=s(N(),1),dq=s(wt(),1);var fq=s(V(),1),yL=s(U(),1),Xu=s(H(),1),mq=s(St(),1);var Th=s(x(),1),$ke={id:"permanently-delete",label:(0,Wo.__)("Permanently delete"),supportsBulk:!0,icon:Du,isEligible(e){if(Lu(e)||e.type==="wp_block")return!1;let{status:t,permissions:r}=e;return t==="trash"&&r?.delete},hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,fq.useState)(!1),{createSuccessNotice:i,createErrorNotice:a}=(0,yL.useDispatch)(dq.store),{deleteEntityRecord:l}=(0,yL.useDispatch)(uq.store);return(0,Th.jsxs)(Xu.__experimentalVStack,{spacing:"5",children:[(0,Th.jsx)(Xu.__experimentalText,{children:e.length>1?(0,Wo.sprintf)((0,Wo._n)("Are you sure you want to permanently delete %d item?","Are you sure you want to permanently delete %d items?",e.length),e.length):(0,Wo.sprintf)((0,Wo.__)('Are you sure you want to permanently delete "%s"?'),(0,mq.decodeEntities)(Qe(e[0])))}),(0,Th.jsxs)(Xu.__experimentalHStack,{justify:"right",children:[(0,Th.jsx)(Xu.Button,{variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,Wo.__)("Cancel")}),(0,Th.jsx)(Xu.Button,{variant:"primary",onClick:async()=>{n(!0);let c=await Promise.allSettled(e.map(u=>l("postType",u.type,u.id,{force:!0},{throwOnError:!0})));if(c.every(({status:u})=>u==="fulfilled")){let u;c.length===1?u=(0,Wo.sprintf)((0,Wo.__)('"%s" permanently deleted.'),Qe(e[0])):u=(0,Wo.__)("The items were permanently deleted."),i(u,{type:"snackbar",id:"permanently-delete-post-action"}),r?.(e)}else{let u;if(c.length===1){let d=c[0];d.reason?.message?u=d.reason.message:u=(0,Wo.__)("An error occurred while permanently deleting the item.")}else{let d=new Set,f=c.filter(({status:m})=>m==="rejected");for(let m of f){let h=m;h.reason?.message&&d.add(h.reason.message)}d.size===0?u=(0,Wo.__)("An error occurred while permanently deleting the items."):d.size===1?u=(0,Wo.sprintf)((0,Wo.__)("An error occurred while permanently deleting the items: %s"),[...d][0]):u=(0,Wo.sprintf)((0,Wo.__)("Some errors occurred while permanently deleting the items: %s"),[...d].join(","))}a(u,{type:"snackbar"})}n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,Wo.__)("Delete permanently")})]})]})}},bL=$ke;var pq=s(Q(),1),Mi=s(N(),1),hq=s(wt(),1);var eRe={id:"restore",label:(0,Mi.__)("Restore"),isPrimary:!0,icon:Ou,supportsBulk:!0,isEligible(e){return!Lu(e)&&e.type!=="wp_block"&&e.status==="trash"&&e.permissions?.update},async callback(e,{registry:t,onActionPerformed:r}){let{createSuccessNotice:o,createErrorNotice:n}=t.dispatch(hq.store),{editEntityRecord:i,saveEditedEntityRecord:a}=t.dispatch(pq.store);await Promise.allSettled(e.map(c=>i("postType",c.type,c.id,{status:"draft"})));let l=await Promise.allSettled(e.map(c=>a("postType",c.type,c.id,{throwOnError:!0})));if(l.every(({status:c})=>c==="fulfilled")){let c;e.length===1?c=(0,Mi.sprintf)((0,Mi.__)('"%s" has been restored.'),Qe(e[0])):e[0].type==="page"?c=(0,Mi.sprintf)((0,Mi.__)("%d pages have been restored."),e.length):c=(0,Mi.sprintf)((0,Mi.__)("%d posts have been restored."),e.length),o(c,{type:"snackbar",id:"restore-post-action"}),r&&r(e)}else{let c;if(l.length===1){let u=l[0];u.reason?.message?c=u.reason.message:c=(0,Mi.__)("An error occurred while restoring the post.")}else{let u=new Set,d=l.filter(({status:f})=>f==="rejected");for(let f of d){let m=f;m.reason?.message&&u.add(m.reason.message)}u.size===0?c=(0,Mi.__)("An error occurred while restoring the posts."):u.size===1?c=(0,Mi.sprintf)((0,Mi.__)("An error occurred while restoring the posts: %s"),[...u][0]):c=(0,Mi.sprintf)((0,Mi.__)("Some errors occurred while restoring the posts: %s"),[...u].join(","))}n(c,{type:"snackbar"})}}},wL=eRe;var SL=s(U(),1),gq=s(Q(),1),wo=s(N(),1),vq=s(wt(),1),yq=s(V(),1),Qu=s(H(),1);var Ph=s(x(),1),tRe={id:"move-to-trash",label:(0,wo._x)("Trash","verb"),isPrimary:!0,icon:Du,isEligible(e){return e.type==="wp_template_part"||e.type==="wp_block"||e.type==="wp_template"&&typeof e.id=="string"?!1:!!e.status&&!["auto-draft","trash"].includes(e.status)&&e.permissions?.delete},supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,yq.useState)(!1),{createSuccessNotice:i,createErrorNotice:a}=(0,SL.useDispatch)(vq.store),{deleteEntityRecord:l}=(0,SL.useDispatch)(gq.store);return(0,Ph.jsxs)(Qu.__experimentalVStack,{spacing:"5",children:[(0,Ph.jsx)(Qu.__experimentalText,{children:e.length===1?(0,wo.sprintf)((0,wo.__)('Are you sure you want to move "%s" to the trash?'),Qe(e[0])):(0,wo.sprintf)((0,wo._n)("Are you sure you want to move %d item to the trash ?","Are you sure you want to move %d items to the trash ?",e.length),e.length)}),(0,Ph.jsxs)(Qu.__experimentalHStack,{justify:"right",children:[(0,Ph.jsx)(Qu.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,wo.__)("Cancel")}),(0,Ph.jsx)(Qu.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{n(!0);let c=await Promise.allSettled(e.map(u=>l("postType",u.type,u.id.toString(),{},{throwOnError:!0})));if(c.every(({status:u})=>u==="fulfilled")){let u;c.length===1?u=(0,wo.sprintf)((0,wo.__)('"%s" moved to the trash.'),Qe(e[0])):u=(0,wo.sprintf)((0,wo._n)("%d item moved to the trash.","%d items moved to the trash.",e.length),e.length),i(u,{type:"snackbar",id:"move-to-trash-action"})}else{let u;if(c.length===1){let d=c[0];d.reason?.message?u=d.reason.message:u=(0,wo.__)("An error occurred while moving the item to the trash.")}else{let d=new Set,f=c.filter(({status:m})=>m==="rejected");for(let m of f){let h=m;h.reason?.message&&d.add(h.reason.message)}d.size===0?u=(0,wo.__)("An error occurred while moving the items to the trash."):d.size===1?u=(0,wo.sprintf)((0,wo.__)("An error occurred while moving the item to the trash: %s"),[...d][0]):u=(0,wo.sprintf)((0,wo.__)("Some errors occurred while moving the items to the trash: %s"),[...d].join(","))}a(u,{type:"snackbar"})}r&&r(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,children:(0,wo._x)("Trash","verb")})]})]})}},_L=tRe;var Ht=s(N(),1),_q=s(V(),1),Ju=s(H(),1),xq=s(Sl(),1),CL=s(St(),1);var bq=s(wt(),1),wq=s(Q(),1),xL=s(U(),1);function rRe(e){let t=new Set;if(e.length===1){let r=e[0];r.reason?.message&&t.add(r.reason.message)}else{let r=e.filter(({status:o})=>o==="rejected");for(let o of r){let n=o;n.reason?.message&&t.add(n.reason.message)}}return t}var Sq=async(e,t,r)=>{let{createSuccessNotice:o,createErrorNotice:n}=(0,xL.dispatch)(bq.store),{deleteEntityRecord:i}=(0,xL.dispatch)(wq.store),a=await Promise.allSettled(e.map(l=>i("postType",l.type,l.id,{force:!0},{throwOnError:!0})));if(a.every(({status:l})=>l==="fulfilled")){let l;a.length===1?l=t.success.messages.getMessage(e[0]):l=t.success.messages.getBatchMessage(e),o(l,{type:t.success.type??"snackbar",id:t.success.id}),r.onActionPerformed?.(e)}else{let l=rRe(a),c="";a.length===1?c=t.error.messages.getMessage(l):c=t.error.messages.getBatchMessage(l),n(c,{type:t.error.type??"snackbar",id:t.error.id}),r.onActionError?.()}};var Eh=s(x(),1),{PATTERN_TYPES:oRe}=nn(xq.privateApis),nRe={id:"delete-post",label:(0,Ht.__)("Delete"),isPrimary:!0,icon:Du,isEligible(e){return Lu(e)?DP(e):e.type===oRe.user},supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,_q.useState)(!1),i=e.every(a=>Lu(a)&&a?.has_theme_file);return(0,Eh.jsxs)(Ju.__experimentalVStack,{spacing:"5",children:[(0,Eh.jsx)(Ju.__experimentalText,{children:e.length>1?(0,Ht.sprintf)((0,Ht._n)("Delete %d item?","Delete %d items?",e.length),e.length):(0,Ht.sprintf)((0,Ht._x)('Delete "%s"?',"template part"),Qe(e[0]))}),(0,Eh.jsxs)(Ju.__experimentalHStack,{justify:"right",children:[(0,Eh.jsx)(Ju.Button,{variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,Ht.__)("Cancel")}),(0,Eh.jsx)(Ju.Button,{variant:"primary",onClick:async()=>{n(!0),await Sq(e,{success:{messages:{getMessage:l=>i?(0,Ht.sprintf)((0,Ht.__)('"%s" reset.'),(0,CL.decodeEntities)(Qe(l))):(0,Ht.sprintf)((0,Ht._x)('"%s" deleted.',"template part"),(0,CL.decodeEntities)(Qe(l))),getBatchMessage:()=>i?(0,Ht.__)("Items reset."):(0,Ht.__)("Items deleted.")}},error:{messages:{getMessage:l=>l.size===1?[...l][0]:i?(0,Ht.__)("An error occurred while reverting the item."):(0,Ht.__)("An error occurred while deleting the item."),getBatchMessage:l=>l.size===0?i?(0,Ht.__)("An error occurred while reverting the items."):(0,Ht.__)("An error occurred while deleting the items."):l.size===1?i?(0,Ht.sprintf)((0,Ht.__)("An error occurred while reverting the items: %s"),[...l][0]):(0,Ht.sprintf)((0,Ht.__)("An error occurred while deleting the items: %s"),[...l][0]):i?(0,Ht.sprintf)((0,Ht.__)("Some errors occurred while reverting the items: %s"),[...l].join(",")):(0,Ht.sprintf)((0,Ht.__)("Some errors occurred while deleting the items: %s"),[...l].join(","))}}},{onActionPerformed:r}),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,Ht.__)("Delete")})]})]})}},TL=nRe;var Mq=s(U(),1),$u=s(N(),1),Fq=s(wt(),1),Dq=s(V(),1),Lq=s(lt(),1);var ri=s(H(),1),Iq=s(we(),1),YE=s(Q(),1),Ty=s(U(),1),WE=s(V(),1),Cy=s(N(),1);var Oq=s(wt(),1),Nq=s(lt(),1);var Cq=s(U(),1),Tq=s(Q(),1),Pq=()=>(0,Cq.useSelect)(e=>e(Tq.store).getEntityRecords("postType","wp_template_part",{per_page:-1}),[])??[],Eq=(e,t)=>{let r=e.toLowerCase(),o=t.map(i=>i.title.rendered.toLowerCase());if(!o.includes(r))return e;let n=2;for(;o.includes(`${r} ${n}`);)n++;return`${e} ${n}`},kq=e=>xh(e).replace(/[^\w-]+/g,"")||"wp-custom-part";var Yo=s(x(),1);function Rq(e,t){return`fields-create-template-part-modal__area-option-${e}-${t}`}function Aq(e,t){return`fields-create-template-part-modal__area-option-description-${e}-${t}`}function Py({modalTitle:e,...t}){let r=(0,Ty.useSelect)(o=>o(YE.store).getPostType("wp_template_part")?.labels?.add_new_item,[]);return(0,Yo.jsx)(ri.Modal,{title:e||r,onRequestClose:t.closeModal,overlayClassName:"fields-create-template-part-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,Yo.jsx)(PL,{...t})})}var iRe=e=>e==="header"?iS:e==="footer"?rS:e==="sidebar"?SS:e==="navigation-overlay"?uS:$p;function PL({defaultArea:e="uncategorized",blocks:t=[],confirmLabel:r=(0,Cy.__)("Add"),closeModal:o,onCreate:n,onError:i,defaultTitle:a=""}){let{createErrorNotice:l}=(0,Ty.useDispatch)(Oq.store),{saveEntityRecord:c}=(0,Ty.useDispatch)(YE.store),u=Pq(),[d,f]=(0,WE.useState)(a),[m,h]=(0,WE.useState)(e),[g,v]=(0,WE.useState)(!1),y=(0,Iq.useInstanceId)(Py),b=(0,Ty.useSelect)(w=>w(YE.store).getCurrentTheme()?.default_template_part_areas,[]);async function S(){if(!(!d||g))try{v(!0);let w=Eq(d,u),_=kq(w),C=await c("postType","wp_template_part",{slug:_,title:w,content:(0,Nq.serialize)(t),area:m},{throwOnError:!0});await n(C)}catch(w){let _=w instanceof Error&&"code"in w&&w.message&&w.code!=="unknown_error"?w.message:(0,Cy.__)("An error occurred while creating the template part.");l(_,{type:"snackbar"}),i?.()}finally{v(!1)}}return(0,Yo.jsx)("form",{onSubmit:async w=>{w.preventDefault(),await S()},children:(0,Yo.jsxs)(ri.__experimentalVStack,{spacing:"4",children:[(0,Yo.jsx)(ri.TextControl,{__next40pxDefaultSize:!0,label:(0,Cy.__)("Name"),value:d,onChange:f,required:!0}),(0,Yo.jsxs)("fieldset",{className:"fields-create-template-part-modal__area-fieldset",children:[(0,Yo.jsx)(ri.BaseControl.VisualLabel,{as:"legend",children:(0,Cy.__)("Area")}),(0,Yo.jsx)("div",{className:"fields-create-template-part-modal__area-radio-group",children:(b??[]).map(w=>{let _=iRe(w.icon);return(0,Yo.jsxs)("div",{className:"fields-create-template-part-modal__area-radio-wrapper",children:[(0,Yo.jsx)("input",{type:"radio",id:Rq(w.area,y),name:`fields-create-template-part-modal__area-${y}`,value:w.area,checked:m===w.area,onChange:()=>{h(w.area)},"aria-describedby":Aq(w.area,y)}),(0,Yo.jsx)(ri.Icon,{icon:_,className:"fields-create-template-part-modal__area-radio-icon"}),(0,Yo.jsx)("label",{htmlFor:Rq(w.area,y),className:"fields-create-template-part-modal__area-radio-label",children:w.label}),(0,Yo.jsx)(ri.Icon,{icon:Rn,className:"fields-create-template-part-modal__area-radio-checkmark"}),(0,Yo.jsx)("p",{className:"fields-create-template-part-modal__area-radio-description",id:Aq(w.area,y),children:w.description})]},w.area)})})]}),(0,Yo.jsxs)(ri.__experimentalHStack,{justify:"right",children:[(0,Yo.jsx)(ri.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{o()},children:(0,Cy.__)("Cancel")}),(0,Yo.jsx)(ri.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!d||g,isBusy:g,children:r})]})]})})}var Bq=s(x(),1),sRe={id:"duplicate-template-part",label:(0,$u._x)("Duplicate","action label"),isEligible:e=>e.type==="wp_template_part",modalHeader:(0,$u._x)("Duplicate template part","action label"),modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t})=>{let[r]=e,o=(0,Dq.useMemo)(()=>r.blocks??(0,Lq.parse)(typeof r.content=="string"?r.content:r.content.raw,{__unstableSkipMigrationLogs:!0}),[r.content,r.blocks]),{createSuccessNotice:n}=(0,Mq.useDispatch)(Fq.store);function i(a){n((0,$u.sprintf)((0,$u._x)('"%s" duplicated.',"template part"),Qe(a)),{type:"snackbar",id:"edit-site-patterns-success"}),t?.()}return(0,Bq.jsx)(PL,{blocks:o,defaultArea:r.area,defaultTitle:(0,$u.sprintf)((0,$u._x)("%s (Copy)","template part"),Qe(r)),onCreate:i,onError:t,confirmLabel:(0,$u._x)("Duplicate","action label"),closeModal:t??(()=>{})})}},EL=sRe;var Vq=s(N(),1),jq=s(H(),1),zq=s(x(),1),aRe={id:"alt_text",type:"text",label:(0,Vq.__)("Alt text"),isVisible:e=>e?.media_type==="image",render:({item:e})=>e?.alt_text||"-",Edit:({field:e,onChange:t,data:r})=>(0,zq.jsx)(jq.TextareaControl,{label:e.label,value:r.alt_text||"",onChange:o=>t({alt_text:o}),rows:2}),enableSorting:!1,filterBy:!1},kL=aRe;var Yq=s(N(),1);var KE=s(V(),1),RL=s(N(),1);function qE(e){return e?typeof e=="string"?e:typeof e=="object"&&(e.rendered||e.raw)||"":""}var ZE=s(x(),1);function Hq({item:e}){let[t,r]=(0,KE.useState)(null),o=e.post,n=e._embedded?.["wp:attached-to"]?.[0]?.id,i=e._embedded?.["wp:attached-to"]?.[0]?.title;return(0,KE.useEffect)(()=>{o&&o===n&&r(qE(i)||(0,RL.__)("(no title)")),o||r((0,RL.__)("(Unattached)"))},[o,n,i]),(0,ZE.jsx)(ZE.Fragment,{children:t})}var QE=s(Q(),1),JE=s(H(),1),XE=s(N(),1),kh=s(V(),1),Uq=s(we(),1),Gq=s(U(),1);var AL=s(x(),1);function Wq({data:e,onChange:t}){let r=e.post&&e?._embedded?.["wp:attached-to"]?.[0]?[{label:qE(e._embedded?.["wp:attached-to"]?.[0]?.title),value:e.post.toString()}]:[],[o,n]=(0,kh.useState)(r),[i,a]=(0,kh.useState)([]),[l,c]=(0,kh.useState)(!1),[u,d]=(0,kh.useState)(e?.post?.toString()??null),f=(0,Gq.useSelect)(y=>y(QE.store).getPostTypes(),[]),m=()=>{t({post:0,_embedded:{...e?._embedded,"wp:attached-to":void 0}}),n([])},h=async y=>{c(!0);let b=await(0,QE.__experimentalFetchLinkSuggestions)(y,{type:"post",isInitialSuggestions:!0},{});a(b);let S=b.map(w=>({label:w.title,value:w.id.toString()}));n(S),c(!1)},g=y=>{if(!y){m();return}if(d(y),y){let b=i.find(S=>S.id===Number(y));if(b&&f){let S=f.find(_=>_.slug===b?.type),w={...S&&{type:S.slug},id:Number(y),title:{raw:b.title,rendered:b.title}};t({post:Number(y),_embedded:{...e?._embedded,"wp:attached-to":[w]}})}}},v=e.post?(0,kh.createInterpolateElement)((0,XE.__)("Search for a post or page to attach this media to or <button>detach current</button>."),{button:(0,AL.jsx)(JE.Button,{__next40pxDefaultSize:!0,onClick:m,variant:"link",accessibleWhenDisabled:!0})}):(0,XE.__)("Search for a post or page to attach this media to.");return(0,AL.jsx)(JE.ComboboxControl,{className:"dataviews-media-field__attached-to",__next40pxDefaultSize:!0,isLoading:l,label:(0,XE.__)("Attached to"),help:v,value:u,options:o,onFilterValueChange:(0,Uq.debounce)(y=>h(y),300),onChange:g,hideLabelFromVision:!0})}var lRe={id:"attached_to",type:"text",label:(0,Yq.__)("Attached to"),Edit:Wq,render:Hq,enableSorting:!1,filterBy:!1},IL=lRe;var Zq=s(N(),1),Xq=s(U(),1),Qq=s(Q(),1);var qq=s(N(),1),Ey=s(V(),1);var $E=s(H(),1),Qf=s(x(),1);function Kq({item:e}){let t=e?._embedded?.author?.[0],r=t?.name,o=t?.avatar_urls?.[48],[n,i]=(0,Ey.useState)("loading");(0,Ey.useEffect)(()=>{i("loading")},[o]);let a=(0,Ey.useCallback)(c=>{c?.complete&&i("instant")},[]),l=()=>{n==="loading"&&i("loaded")};return(0,Qf.jsxs)($E.__experimentalHStack,{alignment:"left",spacing:0,children:[!!o&&(0,Qf.jsx)("div",{className:K("media-author-field__avatar",{"is-loading":n==="loading","is-loaded":n==="loaded"}),children:(0,Qf.jsx)("img",{ref:a,onLoad:l,alt:(0,qq.__)("Author avatar"),src:o})}),!o&&(0,Qf.jsx)("div",{className:"media-author-field__icon",children:(0,Qf.jsx)($E.Icon,{icon:eS})}),(0,Qf.jsx)("span",{className:"media-author-field__name",children:r})]})}var cRe={label:(0,Zq.__)("Author"),id:"author",type:"integer",getElements:async()=>(await(0,Xq.resolveSelect)(Qq.store).getEntityRecords("root","user",{per_page:-1,who:"authors",_fields:"id,name",context:"view"})??[]).map(({id:t,name:r})=>({value:t,label:r})),render:Kq,sort:(e,t,r)=>{let o=e._embedded?.author?.[0]?.name||"",n=t._embedded?.author?.[0]?.name||"";return r==="asc"?o.localeCompare(n):n.localeCompare(o)},filterBy:{operators:["isAny","isNone"]},readOnly:!0},OL=cRe;var Jq=s(N(),1),$q=s(H(),1);function Jf(e){return e?typeof e=="string"?e:typeof e=="object"&&"raw"in e&&e.raw||"":""}var eK=s(x(),1),uRe={id:"caption",type:"text",label:(0,Jq.__)("Caption"),getValue:({item:e})=>Jf(e?.caption),render:({item:e})=>Jf(e?.caption)||"-",Edit:({field:e,onChange:t,data:r})=>(0,eK.jsx)($q.TextareaControl,{label:e.label,value:Jf(r.caption)||"",onChange:o=>t({caption:o}),rows:2}),enableSorting:!1,filterBy:!1},NL=uRe;var tK=s(N(),1),rK=s(go(),1),dRe={id:"date",type:"datetime",label:(0,tK.__)("Date added"),filterBy:{operators:["before","after"]},format:{datetime:(0,rK.getSettings)().formats.datetimeAbbreviated},readOnly:!0},ML=dRe;var oK=s(N(),1),nK=s(H(),1);var FL=s(x(),1),fRe={id:"description",type:"text",label:(0,oK.__)("Description"),getValue:({item:e})=>Jf(e?.description),render:({item:e})=>(0,FL.jsx)("div",{children:Jf(e?.description)||"-"}),Edit:({field:e,onChange:t,data:r})=>(0,FL.jsx)(nK.TextareaControl,{label:e.label,value:Jf(r.description)||"",onChange:o=>t({description:o}),rows:5}),enableSorting:!1,filterBy:!1},DL=fRe;var cK=s(N(),1),uK=s(vo(),1);var e2=s(H(),1),sK=s(V(),1),aK=s(vo(),1),ky=s(x(),1),iK=15;function lK({item:e}){let t=(0,sK.useMemo)(()=>e?.source_url?(0,aK.getFilename)(e.source_url):null,[e?.source_url]);return t?t.length>iK?(0,ky.jsx)(e2.Tooltip,{text:t,children:(0,ky.jsx)(e2.__experimentalTruncate,{limit:iK,ellipsizeMode:"tail",children:t})}):(0,ky.jsx)(ky.Fragment,{children:t}):""}var mRe={id:"filename",type:"text",label:(0,cK.__)("File name"),getValue:({item:e})=>(0,uK.getFilename)(e?.source_url||""),render:lK,enableSorting:!1,filterBy:!1,readOnly:!0},LL=mRe;var oi=s(N(),1),fK=1024,mK=1024*fK,pK=1024*mK,hK=1024*pK,gK=1024*hK,vK=1024*gK,yK=1024*vK,pRe=1024*yK;function dK(e,t,r=2){return(0,oi.sprintf)((0,oi._x)("%1$s %2$s","file size"),e.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:r}),t)}function hRe(e,t=2){if(e===0)return dK(0,(0,oi._x)("B","unit symbol"),t);let r={[(0,oi._x)("YB","unit symbol")]:pRe,[(0,oi._x)("ZB","unit symbol")]:yK,[(0,oi._x)("EB","unit symbol")]:vK,[(0,oi._x)("PB","unit symbol")]:gK,[(0,oi._x)("TB","unit symbol")]:hK,[(0,oi._x)("GB","unit symbol")]:pK,[(0,oi._x)("MB","unit symbol")]:mK,[(0,oi._x)("KB","unit symbol")]:fK,[(0,oi._x)("B","unit symbol")]:1};for(let[o,n]of Object.entries(r))if(e>=n)return dK(e/n,o,t);return""}var gRe={id:"filesize",type:"text",label:(0,oi.__)("File size"),getValue:({item:e})=>e?.media_details?.filesize?hRe(e?.media_details?.filesize):"",isVisible:e=>!!e?.media_details?.filesize,enableSorting:!1,filterBy:!1,readOnly:!0},BL=gRe;var Ry=s(N(),1),vRe={id:"media_dimensions",type:"text",label:(0,Ry.__)("Dimensions"),getValue:({item:e})=>e?.media_details?.width&&e?.media_details?.height?(0,Ry.sprintf)((0,Ry._x)("%1$s \xD7 %2$s","image dimensions"),e?.media_details?.width?.toString(),e?.media_details?.height?.toString()):"",isVisible:e=>!!(e?.media_details?.width&&e?.media_details?.height),enableSorting:!1,filterBy:!1,readOnly:!0},VL=vRe;var bK=s(N(),1),yRe={id:"mime_type",type:"text",label:(0,bK.__)("File type"),getValue:({item:e})=>e?.mime_type||"",render:({item:e})=>e?.mime_type||"-",enableSorting:!1,filterBy:!1,readOnly:!0},jL=yRe;var ece=s(N(),1);var Qle=s(N(),1),c7=s(ce(),1),Jle=s(U(),1),mx=s(Q(),1);var na=s(V(),1),Db=s(U(),1),T8=s(N(),1),Ml=s(Q(),1),Lb=s(ce(),1),Jne=s(wt(),1),$ne=s(Sl(),1),eie=s(lt(),1);var wK=s(V(),1),Ay=s(U(),1),SK=s(we(),1),_K=s(ce(),1);var t2=s(x(),1);function bRe(e,t,r){if(!r)return t;let o=e.get(t);return o||(o=(0,Ay.createRegistry)({"core/block-editor":_K.storeConfig},t),o.registerStore("core/editor",v_),e.set(t,o)),o}var wRe=(0,SK.createHigherOrderComponent)(e=>({useSubRegistry:t=!0,...r})=>{let o=(0,Ay.useRegistry)(),[n]=(0,wK.useState)(()=>new WeakMap),i=bRe(n,o,t);return i===o?(0,t2.jsx)(e,{registry:o,...r}):(0,t2.jsx)(Ay.RegistryProvider,{value:i,children:(0,t2.jsx)(e,{registry:i,...r})})},"withRegistryProvider"),xK=wRe;var vg=s(V(),1),yg=s(U(),1),ra=s(Q(),1),xoe=s(N(),1),Coe=s(vt(),1),Toe=s(we(),1),Poe=s(lt(),1),zR=s(ce(),1);var r2=s(V(),1),CK=s(x(),1),TK=(0,r2.createContext)(void 0);function Rh({value:e,onChange:t,settings:r={},children:o}){let n={media:e,onChange:t,fields:r.fields||[]};return(0,CK.jsx)(TK.Provider,{value:n,children:o})}function Iy(){let e=(0,r2.useContext)(TK);if(!e)throw new Error("useMediaEditorContext must be used within MediaEditorProvider");return e}var PK=s(H(),1),EK=s(V(),1),o2=s(N(),1);function Ah(e){return e?e.startsWith("image/")?{type:"image"}:e.startsWith("video/")?{type:"video"}:e.startsWith("audio/")?{type:"audio"}:{type:"application"}:{type:"application"}}var sn=s(x(),1);function SRe({mediaType:e,mediaUrl:t,altText:r,displayTitle:o,mimeType:n,onLoad:i,onError:a,loadingState:l}){switch(e.type){case"image":return(0,sn.jsx)("img",{className:l==="loaded"?"loaded":"",src:t,alt:r||"",onLoad:i,onError:a});case"video":return(0,sn.jsx)("video",{src:t,controls:!0,onError:a,children:o});case"audio":return(0,sn.jsx)("audio",{src:t,controls:!0,onError:a,children:o});default:return(0,sn.jsxs)("div",{className:"media-editor-preview__file-info",children:[(0,sn.jsx)("p",{className:"media-editor-preview__file-name",children:o}),(0,sn.jsx)("p",{className:"media-editor-preview__mime-type",children:n}),(0,sn.jsx)("a",{href:t,target:"_blank",rel:"noopener",className:"media-editor-preview__download-link",children:(0,o2.__)("View file")})]})}}function y_(e){let[t,r]=(0,EK.useState)("loading"),{media:o}=Iy(),{source_url:n,mime_type:i,alt_text:a,title:l}=o||{},c=Ah(i);if(!n)return(0,sn.jsx)("div",{className:"media-editor-preview media-editor-preview--empty",children:(0,sn.jsx)("p",{children:(0,o2.__)("No media file available.")})});if(t==="error")return(0,sn.jsxs)("div",{className:"media-editor-preview media-editor-preview--error",children:[(0,sn.jsx)("p",{children:(0,o2.__)("Failed to load media file.")}),(0,sn.jsx)("p",{className:"media-editor-preview__url",children:n})]});let u=typeof l=="string"?l:l?.rendered||l?.raw;return(0,sn.jsxs)("div",{...e,className:`media-editor-preview media-editor-preview--${c.type}`,children:[c.type==="image"&&t==="loading"&&(0,sn.jsx)("div",{className:"media-editor-preview__spinner",children:(0,sn.jsx)(PK.Spinner,{})}),(0,sn.jsx)(SRe,{mediaType:c,mediaUrl:n,altText:a,displayTitle:u,mimeType:i,onLoad:()=>r("loaded"),onError:()=>r("error"),loadingState:t})]})}var fi=s(V(),1),vee=s(we(),1);var l2=s(V(),1);var zL=s(N(),1);var Ar="isAny",Ir="isNone",ni="isAll",ii="isNotAll",Fi="between",Di="inThePast",cs="over",Ur="is",Gr="isNot",$f="lessThan",em="greaterThan",tm="lessThanOrEqual",rm="greaterThanOrEqual",om="before",nm="after",im="beforeInc",sm="afterInc",bc="contains",wc="notContains",Sc="startsWith",am="on",lm="notOn",n2=["asc","desc"],kK={asc:"\u2191",desc:"\u2193"},i2={asc:"ascending",desc:"descending"},s2={asc:(0,zL.__)("Sort ascending"),desc:(0,zL.__)("Sort descending")},RK={asc:C6,desc:y6},Oy="table",a2="grid",AK="list",IK="activity",OK="pickerGrid",NK="pickerTable";var MK=(0,l2.createContext)({view:{type:Oy},onChangeView:()=>{},fields:[],data:[],paginationInfo:{totalItems:0,totalPages:0},selection:[],onChangeSelection:()=>{},setOpenedFilter:()=>{},openedFilter:null,getItemId:e=>e.id,isItemClickable:()=>!0,renderItemLink:void 0,containerWidth:0,containerRef:(0,l2.createRef)(),resizeObserverRef:()=>{},defaultLayouts:{list:{},grid:{},table:{}},filters:[],isShowingFilter:!1,setIsShowingFilter:()=>{},hasInitiallyLoaded:!1,config:{perPageSizes:[]},intersectionObserver:null});MK.displayName="DataViewsContext";var Ze=MK;var od=s(N(),1);var Fh=s(N(),1),h2=s(H(),1),us=s(V(),1),qL=s(Wr(),1);var DK=s(H(),1),LK=s(N(),1),BK=s(x(),1);function cm({selection:e,onChangeSelection:t,item:r,getItemId:o,titleField:n,disabled:i,...a}){let l=o(r),c=e.includes(l),u=!i&&c,d=n?.getValue?.({item:r})||(0,LK.__)("(no title)");return(0,BK.jsx)(DK.CheckboxControl,{className:"dataviews-selection-checkbox","aria-label":d,"aria-disabled":i,checked:u,onChange:()=>{i||t(c?e.filter(f=>l!==f):[...e,l])},...a})}var Ih=s(H(),1),zK=s(N(),1),My=s(V(),1);var HK=s(U(),1),HL=s(we(),1);var VK=s(th(),1),{lock:hit,unlock:st}=(0,VK.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/dataviews");var fr=s(x(),1),{Menu:Ny,kebabCase:_Re}=st(Ih.privateApis);function xRe({action:e,onClick:t,items:r,variant:o}){let n=typeof e.label=="string"?e.label:e.label(r);return(0,fr.jsx)(Ih.Button,{disabled:!!e.disabled,accessibleWhenDisabled:!0,size:"compact",variant:o,onClick:t,children:n})}function CRe({action:e,onClick:t,items:r}){let o=typeof e.label=="string"?e.label:e.label(r);return(0,fr.jsx)(Ny.Item,{disabled:e.disabled,onClick:t,children:(0,fr.jsx)(Ny.ItemLabel,{children:o})})}function Oh({action:e,items:t,closeModal:r}){let o=typeof e.label=="string"?e.label:e.label(t),n=typeof e.modalHeader=="function"?e.modalHeader(t):e.modalHeader;return(0,fr.jsx)(Ih.Modal,{title:n||o,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:r,focusOnMount:e.modalFocusOnMount??!0,size:e.modalSize||"medium",overlayClassName:`dataviews-action-modal dataviews-action-modal__${_Re(e.id)}`,children:(0,fr.jsx)(e.RenderModal,{items:t,closeModal:r})})}function UL({actions:e,item:t,registry:r,setActiveModalAction:o}){let{primaryActions:n,regularActions:i}=(0,My.useMemo)(()=>e.reduce((l,c)=>((c.isPrimary?l.primaryActions:l.regularActions).push(c),l),{primaryActions:[],regularActions:[]}),[e]),a=l=>l.map(c=>(0,fr.jsx)(CRe,{action:c,onClick:()=>{if("RenderModal"in c){o(c);return}c.callback([t],{registry:r})},items:[t]},c.id));return(0,fr.jsxs)(Ny.Group,{children:[a(n),a(i)]})}function Fy({item:e,actions:t,isCompact:r}){let o=(0,HK.useRegistry)(),{primaryActions:n,eligibleActions:i}=(0,My.useMemo)(()=>{let l=t.filter(u=>!u.isEligible||u.isEligible(e));return{primaryActions:l.filter(u=>u.isPrimary),eligibleActions:l}},[t,e]),a=(0,HL.useViewportMatch)("medium","<");return r?(0,fr.jsx)(jK,{item:e,actions:i,isSmall:!0,registry:o}):(0,fr.jsxs)(re,{direction:"row",justify:"flex-end",className:"dataviews-item-actions",style:{flexShrink:0,width:"auto"},children:[(0,fr.jsx)(GL,{item:e,actions:n,registry:o}),(n.length<i.length||a)&&(0,fr.jsx)(jK,{item:e,actions:i,registry:o})]})}function jK({item:e,actions:t,isSmall:r,registry:o}){let[n,i]=(0,My.useState)(null);return(0,fr.jsxs)(fr.Fragment,{children:[(0,fr.jsxs)(Ny,{placement:"bottom-end",children:[(0,fr.jsx)(Ny.TriggerButton,{render:(0,fr.jsx)(Ih.Button,{size:r?"small":"compact",icon:zr,label:(0,zK.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,className:"dataviews-all-actions-button"})}),(0,fr.jsx)(Ny.Popover,{children:(0,fr.jsx)(UL,{actions:t,item:e,registry:o,setActiveModalAction:i})})]}),!!n&&(0,fr.jsx)(Oh,{action:n,items:[e],closeModal:()=>i(null)})]})}function GL({item:e,actions:t,registry:r,buttonVariant:o}){let[n,i]=(0,My.useState)(null);return(0,HL.useViewportMatch)("medium","<")||!Array.isArray(t)||t.length===0?null:(0,fr.jsxs)(fr.Fragment,{children:[t.map(l=>(0,fr.jsx)(xRe,{action:l,onClick:()=>{if("RenderModal"in l){i(l);return}l.callback([e],{registry:r})},items:[e],variant:o},l.id)),!!n&&(0,fr.jsx)(Oh,{action:n,items:[e],closeModal:()=>i(null)})]})}var Nh=s(H(),1),b_=s(N(),1),si=s(V(),1),YK=s(U(),1);var WL=s(we(),1);var um=s(N(),1);function UK(e,t,r,o=!1){return e>0?(0,um.sprintf)((0,um._n)("%d Item selected","%d Items selected",e),e):o||r<=t?(0,um.sprintf)((0,um._n)("%d Item","%d Items",r),r):(0,um.sprintf)((0,um._n)("%1$d of %2$d Item","%1$d of %2$d Items",r),t,r)}var Fo=s(x(),1);function TRe({action:e,items:t,ActionTriggerComponent:r}){let[o,n]=(0,si.useState)(!1);return(0,Fo.jsxs)(Fo.Fragment,{children:[(0,Fo.jsx)(r,{...{action:e,onClick:()=>{n(!0)},items:t}}),o&&(0,Fo.jsx)(Oh,{action:e,items:t,closeModal:()=>n(!1)})]})}function c2(e,t){return(0,si.useMemo)(()=>e.some(r=>r.supportsBulk&&(!r.isEligible||r.isEligible(t))),[e,t])}function Dy(e,t){return(0,si.useMemo)(()=>t.some(r=>e.some(o=>o.supportsBulk&&(!o.isEligible||o.isEligible(r)))),[e,t])}function w_({selection:e,onChangeSelection:t,data:r,actions:o,getItemId:n,disableSelectAll:i=!1}){let a=(0,si.useMemo)(()=>r.filter(d=>o.some(f=>f.supportsBulk&&(!f.isEligible||f.isEligible(d)))),[r,o]),l=r.filter(d=>e.includes(n(d))&&a.includes(d)),c=e.length>0,u=l.length===a.length;return i?(0,Fo.jsx)(Nh.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",checked:c,disabled:!c,onChange:()=>{t([])},"aria-label":(0,b_.__)("Deselect all")}):(0,Fo.jsx)(Nh.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",checked:u,indeterminate:!u&&!!l.length,onChange:()=>{t(u?[]:a.map(d=>n(d)))},"aria-label":u?(0,b_.__)("Deselect all"):(0,b_.__)("Select all")})}function GK({action:e,onClick:t,isBusy:r,items:o}){let n=typeof e.label=="string"?e.label:e.label(o);return(0,WL.useViewportMatch)("medium","<")?(0,Fo.jsx)(Nh.Button,{disabled:r,accessibleWhenDisabled:!0,label:n,icon:e.icon,size:"compact",onClick:t,isBusy:r}):(0,Fo.jsx)(Nh.Button,{disabled:r,accessibleWhenDisabled:!0,size:"compact",onClick:t,isBusy:r,children:n})}var qK=[];function PRe({action:e,selectedItems:t,actionInProgress:r,setActionInProgress:o}){let n=(0,YK.useRegistry)(),i=(0,si.useMemo)(()=>t.filter(a=>!e.isEligible||e.isEligible(a)),[e,t]);return"RenderModal"in e?(0,Fo.jsx)(TRe,{action:e,items:i,ActionTriggerComponent:GK},e.id):(0,Fo.jsx)(GK,{action:e,onClick:async()=>{o(e.id),await e.callback(t,{registry:n}),o(null)},items:i,isBusy:r===e.id},e.id)}function WK(e,t,r,o,n,i,a,l,c,u,d){let f=UK(n.length,e.length,d.totalItems,o);return(0,Fo.jsxs)(re,{direction:"row",className:"dataviews-bulk-actions-footer__container",gap:"md",align:"center",children:[(0,Fo.jsx)(w_,{selection:n,onChangeSelection:u,data:e,actions:t,getItemId:r,disableSelectAll:o}),(0,Fo.jsx)("span",{className:"dataviews-bulk-actions-footer__item-count",children:f}),(0,Fo.jsxs)(re,{direction:"row",className:"dataviews-bulk-actions-footer__action-buttons",gap:"xs",children:[i.map(m=>(0,Fo.jsx)(PRe,{action:m,selectedItems:a,actionInProgress:l,setActionInProgress:c},m.id)),a.length>0&&(0,Fo.jsx)(Nh.Button,{icon:rn,showTooltip:!0,tooltipPosition:"top",size:"compact",label:(0,b_.__)("Cancel"),disabled:!!l,accessibleWhenDisabled:!1,onClick:()=>{u(qK)}})]})]})}function ERe({selection:e,actions:t,onChangeSelection:r,data:o,getItemId:n,isInfiniteScroll:i,paginationInfo:a}){let[l,c]=(0,si.useState)(null),u=(0,si.useRef)(void 0),d=(0,WL.useViewportMatch)("medium","<"),f=(0,si.useMemo)(()=>t.filter(v=>v.supportsBulk),[t]),m=(0,si.useMemo)(()=>o.filter(v=>f.some(y=>!y.isEligible||y.isEligible(v))),[o,f]),h=(0,si.useMemo)(()=>o.filter(v=>e.includes(n(v))&&m.includes(v)),[e,o,n,m]),g=(0,si.useMemo)(()=>t.filter(v=>v.supportsBulk&&(!d||v.icon)&&h.some(y=>!v.isEligible||v.isEligible(y))),[t,h,d]);if(l)u.current||(u.current=WK(o,t,n,i,e,g,h,l,c,r,a));else return u.current&&(u.current=void 0),WK(o,t,n,i,e,g,h,l,c,r,a);return u.current}function u2(){let{data:e,selection:t,actions:r=qK,onChangeSelection:o,getItemId:n,paginationInfo:i,view:a}=(0,si.useContext)(Ze);return(0,Fo.jsx)(ERe,{selection:t,onChangeSelection:o,data:e,actions:r,getItemId:n,isInfiniteScroll:!!a.infiniteScrollEnabled,paginationInfo:i})}var ed=s(N(),1);var td=s(H(),1),dm=s(V(),1);function d2(e,t){let r=[e?.titleField,e?.mediaField,e?.descriptionField].filter(Boolean);return t.filter(o=>!r.includes(o.id)&&o.type!=="media"&&o.enableHiding!==!1)}var ct=s(x(),1),{Menu:Ut}=st(td.privateApis);function kRe({children:e}){return dm.Children.toArray(e).filter(Boolean).map((t,r)=>(0,ct.jsxs)(dm.Fragment,{children:[r>0&&(0,ct.jsx)(Ut.Separator,{}),t]},r))}var RRe=(0,dm.forwardRef)(function({fieldId:t,view:r,fields:o,onChangeView:n,onHide:i,setOpenedFilter:a,canMove:l=!0,canInsertLeft:c=!0,canInsertRight:u=!0},d){let f=r.fields??[],m=f?.indexOf(t),h=r.sort?.field===t,g=!1,v=!1,y=!1,b=[],S=o.find(R=>R.id===t),{setIsShowingFilter:w}=(0,dm.useContext)(Ze);if(!S)return null;g=S.enableHiding!==!1,v=S.enableSorting!==!1;let _=S.header;if(b=!!S.filterBy&&S.filterBy?.operators||[],y=!r.filters?.some(R=>t===R.field)&&!!(S.hasElements||S.Edit)&&S.filterBy!==!1&&!S.filterBy?.isPrimary,!v&&!l&&!g&&!y)return _;let C=d2(r,o).filter(R=>!f.includes(R.id)),k=(c||u)&&!!C.length,A=(0,ed.isRTL)();return(0,ct.jsxs)(Ut,{children:[(0,ct.jsxs)(Ut.TriggerButton,{render:(0,ct.jsx)(td.Button,{size:"compact",className:"dataviews-view-table-header-button",ref:d,variant:"tertiary"}),children:[_,r.sort&&h&&(0,ct.jsx)("span",{"aria-hidden":"true",children:kK[r.sort.direction]})]}),(0,ct.jsx)(Ut.Popover,{style:{minWidth:"240px"},children:(0,ct.jsxs)(kRe,{children:[v&&(0,ct.jsx)(Ut.Group,{children:n2.map(R=>{let I=r.sort&&h&&r.sort.direction===R,B=`${t}-${R}`;return(0,ct.jsx)(Ut.RadioItem,{name:"view-table-sorting",value:B,checked:I,onChange:()=>{n({...r,sort:{field:t,direction:R},showLevels:!1})},children:(0,ct.jsx)(Ut.ItemLabel,{children:s2[R]})},B)})}),y&&(0,ct.jsx)(Ut.Group,{children:(0,ct.jsx)(Ut.Item,{prefix:(0,ct.jsx)(td.Icon,{icon:nS}),onClick:()=>{a(t),w(!0),n({...r,page:1,filters:[...r.filters||[],{field:t,value:void 0,operator:b[0]}]})},children:(0,ct.jsx)(Ut.ItemLabel,{children:(0,ed.__)("Add filter")})})}),(l||g||k)&&S&&(0,ct.jsxs)(Ut.Group,{children:[l&&(0,ct.jsx)(Ut.Item,{prefix:(0,ct.jsx)(td.Icon,{icon:w6}),disabled:A?m>=f.length-1:m<1,onClick:()=>{let R=A?m+1:m-1,I=[...f];I.splice(m,1),I.splice(R,0,t),n({...r,fields:I})},children:(0,ct.jsx)(Ut.ItemLabel,{children:(0,ed.__)("Move left")})}),l&&(0,ct.jsx)(Ut.Item,{prefix:(0,ct.jsx)(td.Icon,{icon:_6}),disabled:A?m<1:m>=f.length-1,onClick:()=>{let R=A?m-1:m+1,I=[...f];I.splice(m,1),I.splice(R,0,t),n({...r,fields:I})},children:(0,ct.jsx)(Ut.ItemLabel,{children:(0,ed.__)("Move right")})}),c&&!!C.length&&(0,ct.jsxs)(Ut,{children:[(0,ct.jsx)(Ut.SubmenuTriggerItem,{children:(0,ct.jsx)(Ut.ItemLabel,{children:(0,ed.__)("Insert left")})}),(0,ct.jsx)(Ut.Popover,{children:C.map(R=>{let I=A?m+1:m;return(0,ct.jsx)(Ut.Item,{onClick:()=>{n({...r,fields:[...f.slice(0,I),R.id,...f.slice(I)]})},children:(0,ct.jsx)(Ut.ItemLabel,{children:R.label})},R.id)})})]}),u&&!!C.length&&(0,ct.jsxs)(Ut,{children:[(0,ct.jsx)(Ut.SubmenuTriggerItem,{children:(0,ct.jsx)(Ut.ItemLabel,{children:(0,ed.__)("Insert right")})}),(0,ct.jsx)(Ut.Popover,{children:C.map(R=>{let I=A?m:m+1;return(0,ct.jsx)(Ut.Item,{onClick:()=>{n({...r,fields:[...f.slice(0,I),R.id,...f.slice(I)]})},children:(0,ct.jsx)(Ut.ItemLabel,{children:R.label})},R.id)})})]}),g&&S&&(0,ct.jsx)(Ut.Item,{prefix:(0,ct.jsx)(td.Icon,{icon:xS}),onClick:()=>{i(S),n({...r,fields:f.filter(R=>R!==t)})},children:(0,ct.jsx)(Ut.ItemLabel,{children:(0,ed.__)("Hide column")})})]})]})})]})}),ARe=RRe,Ly=ARe;var KK=s(V(),1),YL=s(x(),1);function IRe({item:e,isItemClickable:t,onClickItem:r,className:o}){return!t(e)||!r?{className:o}:{className:o?`${o} ${o}--clickable`:void 0,role:"button",tabIndex:0,onClick:n=>{n.stopPropagation(),r(e)},onKeyDown:n=>{(n.key==="Enter"||n.key===""||n.key===" ")&&(n.stopPropagation(),r(e))}}}function fm({item:e,isItemClickable:t,onClickItem:r,renderItemLink:o,className:n,children:i,...a}){if(!t(e))return(0,YL.jsx)("div",{className:n,...a,children:i});if(o){let c=o({item:e,className:`${n} ${n}--clickable`,...a,children:i});return(0,KK.cloneElement)(c,{onClick:u=>{u.stopPropagation(),c.props.onClick&&c.props.onClick(u)},onKeyDown:u=>{(u.key==="Enter"||u.key===""||u.key===" ")&&(u.stopPropagation(),c.props.onKeyDown&&c.props.onKeyDown(u))}})}let l=IRe({item:e,isItemClickable:t,onClickItem:r,className:n});return(0,YL.jsx)("div",{...l,...a,children:i})}var _c=s(x(),1);function ORe({item:e,level:t,titleField:r,mediaField:o,descriptionField:n,onClickItem:i,renderItemLink:a,isItemClickable:l}){return(0,_c.jsxs)(re,{direction:"row",gap:"md",align:"flex-start",justify:"flex-start",children:[o&&(0,_c.jsx)(fm,{item:e,isItemClickable:l,onClickItem:i,renderItemLink:a,className:"dataviews-view-table__cell-content-wrapper dataviews-column-primary__media","aria-label":l(e)&&(i||a)&&r?r.getValue?.({item:e}):void 0,children:(0,_c.jsx)(o.render,{item:e,field:o,config:{sizes:"32px"}})}),(0,_c.jsxs)(re,{direction:"column",align:"flex-start",className:"dataviews-view-table__primary-column-content",children:[r&&(0,_c.jsxs)(fm,{item:e,isItemClickable:l,onClickItem:i,renderItemLink:a,className:"dataviews-view-table__cell-content-wrapper dataviews-title-field",children:[t!==void 0&&t>0&&(0,_c.jsxs)("span",{className:"dataviews-view-table__level",children:[Array(t).fill("\u2014").join(" "),"\xA0"]}),(0,_c.jsx)(r.render,{item:e,field:r})]}),n&&(0,_c.jsx)(n.render,{item:e,field:n})]})]})}var f2=ORe;var Mh=s(V(),1),ZK=s(N(),1),NRe=e=>(0,ZK.isRTL)()?Math.abs(e.scrollLeft)<=1:e.scrollLeft+e.clientWidth>=e.scrollWidth-1;function XK({scrollContainerRef:e,enabledHorizontal:t=!1}){let[r,o]=(0,Mh.useState)(!1),[n,i]=(0,Mh.useState)(!1),a=(0,Mh.useCallback)(()=>{let l=e.current;l&&(t&&o(NRe(l)),i(l.scrollTop>0))},[e,t]);return(0,Mh.useEffect)(()=>{if(typeof window>"u"||!e.current)return()=>{};let l=e.current;return a(),l.addEventListener("scroll",a),window.addEventListener("resize",a),()=>{l.removeEventListener("scroll",a),window.removeEventListener("resize",a)}},[e,t,a]),{isHorizontalScrollEnd:r,isVerticallyScrolled:n}}function Oa(e,t){return e.reduce((r,o)=>{let n=t.getValue({item:o});return r.has(n)||r.set(n,[]),r.get(n)?.push(o),r},new Map)}var mm=s(H(),1),JK=s(N(),1),$K=s(V(),1);var Gs=s(x(),1);function QK({field:e,isVisible:t,onToggleVisibility:r}){return(0,Gs.jsx)(mm.__experimentalItem,{onClick:e.enableHiding?r:void 0,children:(0,Gs.jsxs)(re,{direction:"row",gap:"sm",justify:"flex-start",align:"center",children:[(0,Gs.jsx)("div",{style:{height:24,width:24},children:t&&(0,Gs.jsx)(mm.Icon,{icon:Rn})}),(0,Gs.jsx)("span",{className:"dataviews-view-config__label",children:e.label})]})})}function MRe(e){return!!e}function m2({showLabel:e=!0}){let{view:t,fields:r,onChangeView:o}=(0,$K.useContext)(Ze),n=d2(t,r);if(!n?.length)return null;let i=r.find(g=>g.id===t.titleField),a=r.find(g=>g.id===t.mediaField),l=r.find(g=>g.id===t.descriptionField),c=[{field:i,isVisibleFlag:"showTitle"},{field:a,isVisibleFlag:"showMedia"},{field:l,isVisibleFlag:"showDescription"}].filter(({field:g})=>MRe(g)),u=t.fields??[],d=n.filter(g=>u.includes(g.id)).length,f=c.filter(({isVisibleFlag:g})=>t[g]??!0),m=f.length+d,h=m===1&&f.length===1;return(0,Gs.jsxs)(re,{direction:"column",className:"dataviews-field-control",children:[e&&(0,Gs.jsx)(mm.BaseControl.VisualLabel,{children:(0,JK.__)("Properties")}),(0,Gs.jsx)(re,{direction:"column",className:"dataviews-view-config__properties",children:(0,Gs.jsxs)(mm.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,size:"medium",children:[c.map(({field:g,isVisibleFlag:v})=>{let y=t[v]??!0,b=h&&y?{...g,enableHiding:!1}:g;return(0,Gs.jsx)(QK,{field:b,isVisible:y,onToggleVisibility:()=>{o({...t,[v]:!y})}},g.id)}),n.map(g=>{let v=u.includes(g.id),y=m===1&&v?{...g,enableHiding:!1}:g;return(0,Gs.jsx)(QK,{field:y,isVisible:v,onToggleVisibility:()=>{o({...t,fields:v?u.filter(b=>b!==g.id):[...u,g.id]})}},g.id)})]})})]})}var p2=s(V(),1);function Na(e,t={delay:400}){let[r,o]=(0,p2.useState)(!1);return(0,p2.useEffect)(()=>{if(!e)return;let n=setTimeout(()=>{o(!0)},t.delay);return()=>{clearTimeout(n),o(!1)}},[e,t.delay]),r}var tt=s(x(),1);function tZ(e,t){if(e)return e;if(t==="integer"||t==="number")return"end"}function FRe({item:e,fields:t,column:r,align:o}){let n=t.find(a=>a.id===r);if(!n)return null;let i=K("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__cell-align-end":o==="end","dataviews-view-table__cell-align-center":o==="center"});return(0,tt.jsx)("div",{className:i,children:(0,tt.jsx)(n.render,{item:e,field:n})})}function eZ({hasBulkActions:e,item:t,level:r,actions:o,fields:n,id:i,view:a,titleField:l,mediaField:c,descriptionField:u,selection:d,getItemId:f,isItemClickable:m,onClickItem:h,renderItemLink:g,onChangeSelection:v,isActionsColumnSticky:y,posinset:b}){let{paginationInfo:S}=(0,us.useContext)(Ze),w=c2(o,t),_=w&&d.includes(i),{showTitle:C=!0,showMedia:k=!0,showDescription:A=!0,infiniteScrollEnabled:R}=a,I=(0,us.useRef)(!1),B=a.fields??[],E=l&&C||c&&k||u&&A;return(0,tt.jsxs)("tr",{className:K("dataviews-view-table__row",{"is-selected":w&&_,"has-bulk-actions":w}),onTouchStart:()=>{I.current=!0},"aria-setsize":R?S.totalItems:void 0,"aria-posinset":b,role:R?"article":void 0,onMouseDown:P=>{let L=(0,qL.isAppleOS)()?P.metaKey:P.ctrlKey;P.button===0&&L&&window.navigator.userAgent.toLowerCase().includes("firefox")&&P?.preventDefault()},onClick:P=>{if(!w)return;((0,qL.isAppleOS)()?P.metaKey:P.ctrlKey)&&!I.current&&document.getSelection()?.type!=="Range"&&v(d.includes(i)?d.filter(j=>i!==j):[...d,i])},children:[e&&(0,tt.jsx)("td",{className:"dataviews-view-table__checkbox-column",children:(0,tt.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,tt.jsx)(cm,{item:t,selection:d,onChangeSelection:v,getItemId:f,titleField:l,disabled:!w})})}),E&&(0,tt.jsx)("td",{children:(0,tt.jsx)(f2,{item:t,level:r,titleField:C?l:void 0,mediaField:k?c:void 0,descriptionField:A?u:void 0,isItemClickable:m,onClickItem:h,renderItemLink:g})}),B.map(P=>{let{width:L,maxWidth:j,minWidth:z,align:W}=a.layout?.styles?.[P]??{},O=n.find(D=>D.id===P),M=tZ(W,O?.type);return(0,tt.jsx)("td",{style:{width:L,maxWidth:j,minWidth:z},children:(0,tt.jsx)(FRe,{fields:n,item:t,column:P,align:M})},P)}),!!o?.length&&(0,tt.jsx)("td",{className:K("dataviews-view-table__actions-column",{"dataviews-view-table__actions-column--sticky":!0,"dataviews-view-table__actions-column--stuck":y}),onClick:P=>P.stopPropagation(),children:(0,tt.jsx)(Fy,{item:t,actions:o})})]})}function DRe({actions:e,data:t,fields:r,getItemId:o,getItemLevel:n,isLoading:i=!1,onChangeView:a,onChangeSelection:l,selection:c,setOpenedFilter:u,onClickItem:d,isItemClickable:f,renderItemLink:m,view:h,className:g,empty:v}){let{containerRef:y}=(0,us.useContext)(Ze),b=Na(i),S=(0,us.useRef)(new Map),w=(0,us.useRef)(void 0),[_,C]=(0,us.useState)(),[k,A]=(0,us.useState)(null);(0,us.useEffect)(()=>{w.current&&(w.current.focus(),w.current=void 0)});let R=(0,us.useId)(),{isHorizontalScrollEnd:I,isVerticallyScrolled:B}=XK({scrollContainerRef:y,enabledHorizontal:!!e?.length}),E=Dy(e,t);if(_){w.current=_,C(void 0);return}let P=ee=>{let pe=S.current.get(ee.id),ve=pe?S.current.get(pe.fallback):void 0;C(ve?.node)},L=ee=>{ee.preventDefault(),ee.stopPropagation();let pe={getBoundingClientRect:()=>({x:ee.clientX,y:ee.clientY,top:ee.clientY,left:ee.clientX,right:ee.clientX,bottom:ee.clientY,width:0,height:0,toJSON:()=>({})})};window.requestAnimationFrame(()=>{A(pe)})},j=!!t?.length,z=r.find(ee=>ee.id===h.titleField),W=r.find(ee=>ee.id===h.mediaField),O=r.find(ee=>ee.id===h.descriptionField),M=h.groupBy?.field?r.find(ee=>ee.id===h.groupBy?.field):null,D=M?Oa(t,M):null,{showTitle:G=!0,showMedia:q=!0,showDescription:Z=!0}=h,te=z&&G||W&&q||O&&Z,ie=h.fields??[],Se=(ee,pe)=>ve=>{ve?S.current.set(ee,{node:ve,fallback:ie[pe>0?pe-1:1]}):S.current.delete(ee)},fe=h.infiniteScrollEnabled&&!D,X=(0,Fh.isRTL)();return j?(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsxs)("table",{className:K("dataviews-view-table",g,{[`has-${h.layout?.density}-density`]:h.layout?.density&&["compact","comfortable"].includes(h.layout.density),"has-bulk-actions":E,"is-refreshing":!fe&&b}),"aria-busy":i,"aria-describedby":R,role:fe?"feed":void 0,inert:!fe&&i?"true":void 0,children:[(0,tt.jsxs)("colgroup",{children:[E&&(0,tt.jsx)("col",{className:"dataviews-view-table__col-checkbox"}),te&&(0,tt.jsx)("col",{className:"dataviews-view-table__col-first-data"}),ie.map((ee,pe)=>(0,tt.jsx)("col",{className:K(`dataviews-view-table__col-${ee}`,{"dataviews-view-table__col-expand":!te&&pe===ie.length-1})},`col-${ee}`)),!!e?.length&&(0,tt.jsx)("col",{className:"dataviews-view-table__col-actions"})]}),k&&(0,tt.jsx)(h2.Popover,{anchor:k,onClose:()=>A(null),placement:"bottom-start",children:(0,tt.jsx)(m2,{showLabel:!1})}),(0,tt.jsx)("thead",{className:K({"dataviews-view-table__thead--stuck":B}),onContextMenu:L,children:(0,tt.jsxs)("tr",{className:"dataviews-view-table__row",children:[E&&(0,tt.jsx)("th",{className:"dataviews-view-table__checkbox-column",scope:"col",onContextMenu:L,children:(0,tt.jsx)(w_,{selection:c,onChangeSelection:l,data:t,actions:e,getItemId:o})}),te&&(0,tt.jsx)("th",{scope:"col",children:z&&(0,tt.jsx)(Ly,{ref:Se(z.id,0),fieldId:z.id,view:h,fields:r,onChangeView:a,onHide:P,setOpenedFilter:u,canMove:!1,canInsertLeft:X?h.layout?.enableMoving??!0:!1,canInsertRight:X?!1:h.layout?.enableMoving??!0})}),ie.map((ee,pe)=>{let{width:ve,maxWidth:Ie,minWidth:et,align:it}=h.layout?.styles?.[ee]??{},ne=r.find(oe=>oe.id===ee),$=tZ(it,ne?.type),ue=h.layout?.enableMoving??!0;return(0,tt.jsx)("th",{style:{width:ve,maxWidth:Ie,minWidth:et,textAlign:$},"aria-sort":h.sort?.direction&&h.sort?.field===ee?i2[h.sort.direction]:void 0,scope:"col",children:(0,tt.jsx)(Ly,{ref:Se(ee,pe),fieldId:ee,view:h,fields:r,onChangeView:a,onHide:P,setOpenedFilter:u,canMove:ue,canInsertLeft:ue,canInsertRight:ue})},ee)}),!!e?.length&&(0,tt.jsx)("th",{className:K("dataviews-view-table__actions-column",{"dataviews-view-table__actions-column--sticky":!0,"dataviews-view-table__actions-column--stuck":!I}),children:(0,tt.jsx)("span",{className:"dataviews-view-table-header",children:(0,Fh.__)("Actions")})})]})}),j&&M&&D?Array.from(D.entries()).map(([ee,pe])=>(0,tt.jsxs)("tbody",{children:[(0,tt.jsx)("tr",{className:"dataviews-view-table__group-header-row",children:(0,tt.jsx)("td",{colSpan:ie.length+(te?1:0)+(E?1:0)+(e?.length?1:0),className:"dataviews-view-table__group-header-cell",children:h.groupBy?.showLabel===!1?ee:(0,Fh.sprintf)((0,Fh.__)("%1$s: %2$s"),M.label,ee)})}),pe.map((ve,Ie)=>(0,tt.jsx)(eZ,{item:ve,level:h.showLevels&&typeof n=="function"?n(ve):void 0,hasBulkActions:E,actions:e,fields:r,id:o(ve)||Ie.toString(),view:h,titleField:z,mediaField:W,descriptionField:O,selection:c,getItemId:o,onChangeSelection:l,onClickItem:d,renderItemLink:m,isItemClickable:f,isActionsColumnSticky:!I},o(ve)))]},`group-${ee}`)):(0,tt.jsx)("tbody",{children:j&&t.map((ee,pe)=>(0,tt.jsx)(eZ,{item:ee,level:h.showLevels&&typeof n=="function"?n(ee):void 0,hasBulkActions:E,actions:e,fields:r,id:o(ee)||pe.toString(),view:h,titleField:z,mediaField:W,descriptionField:O,selection:c,getItemId:o,onChangeSelection:l,onClickItem:d,renderItemLink:m,isItemClickable:f,isActionsColumnSticky:!I,posinset:fe?pe+1:void 0},o(ee)))})]}),fe&&i&&(0,tt.jsx)("div",{className:"dataviews-loading",id:R,children:(0,tt.jsx)("p",{className:"dataviews-loading-more",children:(0,tt.jsx)(h2.Spinner,{})})})]}):(0,tt.jsx)("div",{className:K("dataviews-no-results",{"is-refreshing":b}),id:R,children:v})}var rZ=DRe;var lZ=s(H(),1),w2=s(N(),1);var ai=s(H(),1);var __=s(N(),1),sZ=s(we(),1),aZ=s(Wr(),1),pm=s(V(),1);var LRe=s(H(),1),BRe=s(N(),1),g2=s(V(),1);var VRe=s(x(),1),jRe=[{value:120,breakpoint:1},{value:170,breakpoint:1},{value:230,breakpoint:1},{value:290,breakpoint:1112},{value:350,breakpoint:1636},{value:430,breakpoint:588}],zRe=jRe[2].value;function v2(){let e=(0,g2.useContext)(Ze),t=e.view;return(0,g2.useMemo)(()=>{let r=e.containerWidth,o=32,n=t.layout?.previewSize??zRe,i=Math.floor((r+o)/(n+o));return Math.max(1,i)},[e.containerWidth,t.layout?.previewSize])}var oZ=s(V(),1);var nZ=s(x(),1),S_=(0,oZ.forwardRef)(({className:e,previewSize:t,...r},o)=>(0,nZ.jsx)("div",{ref:o,className:K("dataviews-view-grid-items",e),style:{gridTemplateColumns:t&&`repeat(auto-fill, minmax(${t}px, 1fr))`},...r}));var y2=s(V(),1);function By(e,t){let{intersectionObserver:r}=(0,y2.useContext)(Ze);(0,y2.useEffect)(()=>{let o=e.current;if(!(!o||t===void 0||!r))return r.observe(o),()=>{r.unobserve(o)}},[e,r,t])}function b2(e,t,r){let n=!!e?.length&&t?e[0].position:void 0;return n&&r?(n-1)%r:0}var ut=s(x(),1),{Badge:HRe}=st(ai.privateApis);function URe(e,t){let r=[];for(let o=0,n=e.length;o<n;o+=t)r.push(e.slice(o,o+t));return r}var iZ=(0,pm.forwardRef)(function e({view:t,selection:r,onChangeSelection:o,onClickItem:n,isItemClickable:i,renderItemLink:a,getItemId:l,item:c,actions:u,mediaField:d,titleField:f,descriptionField:m,regularFields:h,badgeFields:g,hasBulkActions:v,config:y,posinset:b,setsize:S,...w},_){let{showTitle:C=!0,showMedia:k=!0,showDescription:A=!0}=t,R=c2(u,c),I=l(c),B=(0,pm.useRef)(null),E=(0,pm.useCallback)(G=>{B.current=G,typeof _=="function"?_(G):_&&(_.current=G)},[_]);By(B,b);let P=(0,sZ.useInstanceId)(e),L=r.includes(I),j=(0,ut.jsx)("span",{className:"dataviews-view-grid__media-placeholder"}),z=k&&d?.render,W=z?(0,ut.jsx)(d.render,{item:c,field:d,config:y}):j,O=C&&f?.render?(0,ut.jsx)(f.render,{item:c,field:f}):null,M,D;return i(c)&&n&&(O?(M={"aria-labelledby":`dataviews-view-grid__title-field-${P}`},D={id:`dataviews-view-grid__title-field-${P}`}):M={"aria-label":(0,__.__)("Navigate to item")}),(0,ut.jsxs)(re,{direction:"column",...w,ref:E,"aria-setsize":S,"aria-posinset":b,className:K(w.className,"dataviews-view-grid__row__gridcell","dataviews-view-grid__card",{"is-selected":R&&L}),onClickCapture:G=>{if(w.onClickCapture?.(G),(0,aZ.isAppleOS)()?G.metaKey:G.ctrlKey){if(G.stopPropagation(),G.preventDefault(),!R)return;o(L?r.filter(q=>I!==q):[...r,I])}},children:[(0,ut.jsx)(fm,{item:c,isItemClickable:i,onClickItem:n,renderItemLink:a,className:K("dataviews-view-grid__media",{"dataviews-view-grid__media--placeholder":!z}),...M,children:W}),v&&(0,ut.jsx)(cm,{item:c,selection:r,onChangeSelection:o,getItemId:l,titleField:f,disabled:!R}),!!u?.length&&(0,ut.jsx)("div",{className:"dataviews-view-grid__media-actions",children:(0,ut.jsx)(Fy,{item:c,actions:u,isCompact:!0})}),C&&(0,ut.jsx)("div",{className:"dataviews-view-grid__title",children:(0,ut.jsx)(fm,{item:c,isItemClickable:i,onClickItem:n,renderItemLink:a,className:"dataviews-view-grid__title-field dataviews-title-field",...D,title:f?.getValueFormatted({item:c,field:f})||void 0,children:O})}),(0,ut.jsxs)(re,{direction:"column",gap:"xs",children:[A&&m?.render&&(0,ut.jsx)(m.render,{item:c,field:m}),!!g?.length&&(0,ut.jsx)(re,{direction:"row",className:"dataviews-view-grid__badge-fields",gap:"sm",wrap:"wrap",align:"top",justify:"flex-start",children:g.map(G=>(0,ut.jsx)(HRe,{className:"dataviews-view-grid__field-value",children:(0,ut.jsx)(G.render,{item:c,field:G})},G.id))}),!!h?.length&&(0,ut.jsx)(re,{direction:"column",className:"dataviews-view-grid__fields",gap:"xs",children:h.map(G=>(0,ut.jsx)(ai.Flex,{className:"dataviews-view-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,ut.jsxs)(ut.Fragment,{children:[(0,ut.jsx)(ai.Tooltip,{text:G.label,children:(0,ut.jsx)(ai.FlexItem,{className:"dataviews-view-grid__field-name",children:G.header})}),(0,ut.jsx)(ai.FlexItem,{className:"dataviews-view-grid__field-value",style:{maxHeight:"none"},children:(0,ut.jsx)(G.render,{item:c,field:G})})]})},G.id))})]})]})});function KL({data:e,isInfiniteScroll:t,className:r,inert:o,isLoading:n,view:i,fields:a,selection:l,onChangeSelection:c,onClickItem:u,isItemClickable:d,renderItemLink:f,getItemId:m,actions:h}){let{paginationInfo:g,resizeObserverRef:v}=(0,pm.useContext)(Ze),y=v2(),b=Dy(h,e),S=a.find(E=>E.id===i?.titleField),w=a.find(E=>E.id===i?.mediaField),_=a.find(E=>E.id===i?.descriptionField),C=i.fields??[],{regularFields:k,badgeFields:A}=C.reduce((E,P)=>{let L=a.find(z=>z.id===P);if(!L)return E;let j=i.layout?.badgeFields?.includes(P)?"badgeFields":"regularFields";return E[j].push(L),E},{regularFields:[],badgeFields:[]}),R="900px",I=Math.ceil(e.length/y),B=b2(e,t,y);return(0,ut.jsxs)(ut.Fragment,{children:[t&&(0,ut.jsxs)(ai.Composite,{render:(0,ut.jsx)(S_,{className:K("dataviews-view-grid-infinite-scroll",r,{[`has-${i.layout?.density}-density`]:i.layout?.density&&["compact","comfortable"].includes(i.layout.density)}),previewSize:i.layout?.previewSize,"aria-busy":n,ref:v}),role:"feed",focusWrap:!0,inert:o,children:[Array.from({length:B}).map((E,P)=>(0,ut.jsx)(ai.Composite.Item,{render:L=>(0,ut.jsx)(re,{...L,direction:"column",role:"article",className:"dataviews-view-grid__row__gridcell dataviews-view-grid__card dataviews-view-grid__placeholder"}),"aria-hidden":!0,tabIndex:-1},`placeholder-${P}`)),e.map(E=>{let P=m(E),L=E.position;return(0,ut.jsx)(ai.Composite.Item,{render:j=>(0,ut.jsx)(iZ,{...j,id:P,role:"article",view:i,selection:l,onChangeSelection:c,onClickItem:u,isItemClickable:d,renderItemLink:f,getItemId:m,item:E,actions:h,mediaField:w,titleField:S,descriptionField:_,regularFields:k,badgeFields:A,hasBulkActions:b,posinset:L,setsize:g.totalItems,config:{sizes:R}})},P)})]}),!t&&(0,ut.jsx)(ai.Composite,{role:"grid",className:K("dataviews-view-grid",r,{[`has-${i.layout?.density}-density`]:i.layout?.density&&["compact","comfortable"].includes(i.layout.density)}),focusWrap:!0,"aria-busy":n,"aria-rowcount":I,ref:v,inert:o,children:URe(e,y).map((E,P)=>(0,ut.jsx)(ai.Composite.Row,{render:(0,ut.jsx)("div",{role:"row","aria-rowindex":P+1,"aria-label":(0,__.sprintf)((0,__.__)("Row %d"),P+1),className:"dataviews-view-grid__row",style:{gridTemplateColumns:`repeat( ${y}, minmax(0, 1fr) )`}}),children:E.map(L=>{let j=m(L);return(0,ut.jsx)(ai.Composite.Item,{render:z=>(0,ut.jsx)(iZ,{...z,id:j,role:"gridcell",view:i,selection:l,onChangeSelection:c,onClickItem:u,isItemClickable:d,renderItemLink:f,getItemId:m,item:L,actions:h,mediaField:w,titleField:S,descriptionField:_,regularFields:k,badgeFields:A,hasBulkActions:b,config:{sizes:R}})},j)})},P))})]})}var Ws=s(x(),1);function GRe({actions:e,data:t,fields:r,getItemId:o,isLoading:n,onChangeSelection:i,onClickItem:a,isItemClickable:l,renderItemLink:c,selection:u,view:d,className:f,empty:m}){let h=Na(!!n),g=!!t?.length,v=d.groupBy?.field?r.find(w=>w.id===d.groupBy?.field):null,y=v?Oa(t,v):null,b=d.infiniteScrollEnabled&&!y;if(!g)return(0,Ws.jsx)("div",{className:K("dataviews-no-results",{"is-refreshing":h}),children:m});let S={className:K(f,{"is-refreshing":!b&&h}),inert:!b&&n?"true":void 0,isLoading:n,view:d,fields:r,selection:u,onChangeSelection:i,onClickItem:a,isItemClickable:l,renderItemLink:c,getItemId:o,actions:e};return(0,Ws.jsxs)(Ws.Fragment,{children:[g&&v&&y&&(0,Ws.jsx)(re,{direction:"column",gap:"lg",children:Array.from(y.entries()).map(([w,_])=>(0,Ws.jsxs)(re,{direction:"column",gap:"sm",children:[(0,Ws.jsx)("h3",{className:"dataviews-view-grid__group-header",children:d.groupBy?.showLabel===!1?w:(0,w2.sprintf)((0,w2.__)("%1$s: %2$s"),v.label,w)}),(0,Ws.jsx)(KL,{...S,data:_,isInfiniteScroll:!1})]},w))}),!y&&(0,Ws.jsx)(KL,{...S,data:t,isInfiniteScroll:!!b}),b&&n&&(0,Ws.jsx)("p",{className:"dataviews-loading-more",children:(0,Ws.jsx)(lZ.Spinner,{})})]})}var cZ=GRe;var S2=s(we(),1),li=s(H(),1),So=s(V(),1),x_=s(N(),1);var JL=s(U(),1);var He=s(x(),1),{Menu:ZL}=st(li.privateApis);function XL(e){return`${e}-item-wrapper`}function WRe(e,t){return`${e}-primary-action-${t}`}function QL(e){return`${e}-dropdown`}function YRe({idPrefix:e,primaryAction:t,item:r}){let o=(0,JL.useRegistry)(),[n,i]=(0,So.useState)(!1),a=WRe(e,t.id),l=typeof t.label=="string"?t.label:t.label([r]);return"RenderModal"in t?(0,He.jsx)("div",{role:"gridcell",children:(0,He.jsx)(li.Composite.Item,{id:a,render:(0,He.jsx)(li.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,text:l,size:"small",onClick:()=>i(!0)}),children:n&&(0,He.jsx)(Oh,{action:t,items:[r],closeModal:()=>i(!1)})})},t.id):(0,He.jsx)("div",{role:"gridcell",children:(0,He.jsx)(li.Composite.Item,{id:a,render:(0,He.jsx)(li.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,size:"small",onClick:()=>{t.callback([r],{registry:o})},children:l})})},t.id)}function uZ({view:e,actions:t,idPrefix:r,isSelected:o,item:n,titleField:i,mediaField:a,descriptionField:l,onSelect:c,otherFields:u,onDropdownTriggerKeyDown:d,posinset:f}){let{showTitle:m=!0,showMedia:h=!0,showDescription:g=!0,infiniteScrollEnabled:v}=e,y=(0,So.useRef)(null),b=`${r}-label`,S=`${r}-description`,w=(0,JL.useRegistry)(),[_,C]=(0,So.useState)(!1),[k,A]=(0,So.useState)(null),R=({type:M})=>{C(M==="mouseenter")},{paginationInfo:I}=(0,So.useContext)(Ze);(0,So.useEffect)(()=>{o&&y.current?.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})},[o]);let{primaryAction:B,eligibleActions:E}=(0,So.useMemo)(()=>{let M=t.filter(G=>!G.isEligible||G.isEligible(n));return{primaryAction:M.filter(G=>G.isPrimary)[0],eligibleActions:M}},[t,n]),P=B&&t.length===1,L=h&&a?.render?(0,He.jsx)("div",{className:"dataviews-view-list__media-wrapper",children:(0,He.jsx)(a.render,{item:n,field:a,config:{sizes:"52px"}})}):null,j=m&&i?.render?(0,He.jsx)(i.render,{item:n,field:i}):null,z=g&&l?.render,W=!!L&&!z&&!u.length,O=E?.length>0&&(0,He.jsxs)(re,{direction:"row",gap:"md",className:"dataviews-view-list__item-actions",children:[B&&(0,He.jsx)(YRe,{idPrefix:r,primaryAction:B,item:n}),!P&&(0,He.jsxs)("div",{role:"gridcell",children:[(0,He.jsxs)(ZL,{placement:"bottom-end",children:[(0,He.jsx)(ZL.TriggerButton,{render:(0,He.jsx)(li.Composite.Item,{id:QL(r),render:(0,He.jsx)(li.Button,{size:"small",icon:zr,label:(0,x_.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,onKeyDown:d})})}),(0,He.jsx)(ZL.Popover,{children:(0,He.jsx)(UL,{actions:E,item:n,registry:w,setActiveModalAction:A})})]}),!!k&&(0,He.jsx)(Oh,{action:k,items:[n],closeModal:()=>A(null)})]})]});return(0,He.jsx)(li.Composite.Row,{ref:y,render:(0,He.jsx)("div",{"aria-posinset":f,"aria-setsize":v?I.totalItems:void 0}),role:v?"article":"row",className:K({"is-selected":o,"is-hovered":_}),onMouseEnter:R,onMouseLeave:R,children:(0,He.jsxs)(re,{direction:"row",className:"dataviews-view-list__item-wrapper",children:[(0,He.jsx)("div",{role:"gridcell",children:(0,He.jsx)(li.Composite.Item,{id:XL(r),"aria-pressed":o,"aria-labelledby":b,"aria-describedby":S,className:"dataviews-view-list__item",onClick:()=>c(n)})}),(0,He.jsxs)(re,{direction:"row",gap:"md",justify:"start",align:W?"center":"flex-start",style:{flex:1,minWidth:0},children:[L,(0,He.jsxs)(re,{direction:"column",gap:"xs",className:"dataviews-view-list__field-wrapper",children:[(0,He.jsxs)(re,{direction:"row",align:"center",children:[(0,He.jsx)("div",{className:"dataviews-title-field dataviews-view-list__title-field",id:b,children:j}),O]}),z&&(0,He.jsx)("div",{className:"dataviews-view-list__field",children:(0,He.jsx)(l.render,{item:n,field:l})}),(0,He.jsx)("div",{className:"dataviews-view-list__fields",id:S,children:u.map(M=>(0,He.jsxs)("div",{className:"dataviews-view-list__field",children:[(0,He.jsx)(Kt,{className:"dataviews-view-list__field-label",render:(0,He.jsx)("span",{}),children:M.label}),(0,He.jsx)("span",{className:"dataviews-view-list__field-value",children:(0,He.jsx)(M.render,{item:n,field:M})})]},M.id))})]})]})]})})}function qRe(e){return!!e}function $L(e){let{actions:t,data:r,fields:o,getItemId:n,isLoading:i,onChangeSelection:a,selection:l,view:c,className:u,empty:d}=e,f=(0,S2.useInstanceId)($L,"view-list"),m=Na(!!i),h=r?.findLast(O=>l.includes(n(O))),g=o.find(O=>O.id===c.titleField),v=o.find(O=>O.id===c.mediaField),y=o.find(O=>O.id===c.descriptionField),b=(c?.fields??[]).map(O=>o.find(M=>O===M.id)).filter(qRe),S=O=>a([n(O)]),w=(0,So.useCallback)(O=>`${f}-${n(O)}`,[f,n]),_=(0,So.useCallback)((O,M)=>M.startsWith(w(O)),[w]),[C,k]=(0,So.useState)(void 0),A=(0,So.useRef)(null);(0,So.useEffect)(()=>{h&&k(XL(w(h)))},[h,w]);let R=r.findIndex(O=>_(O,C??"")),I=(0,S2.usePrevious)(R),B=R!==-1,E=(0,So.useCallback)((O,M)=>{let D=Math.min(r.length-1,Math.max(0,O));if(!r[D])return;let G=w(r[D]),q=M(G);k(q),A.current?.contains(A.current.ownerDocument.activeElement)&&document.getElementById(q)?.focus()},[r,w]);(0,So.useEffect)(()=>{!B&&(I!==void 0&&I!==-1)&&E(I,XL)},[B,E,I]);let P=(0,So.useCallback)(O=>{O.key==="ArrowDown"&&(O.preventDefault(),E(R+1,QL)),O.key==="ArrowUp"&&(O.preventDefault(),E(R-1,QL))},[E,R]),L=!!r?.length,j=c.groupBy?.field?o.find(O=>O.id===c.groupBy?.field):null,z=L&&j?Oa(r,j):null,W=c.infiniteScrollEnabled&&!z;return L?L&&j&&z?(0,He.jsx)(li.Composite,{ref:A,id:`${f}`,render:(0,He.jsx)("div",{}),className:"dataviews-view-list__group",role:"grid",activeId:C,setActiveId:k,children:(0,He.jsx)(re,{direction:"column",gap:"lg",className:K("dataviews-view-list",u),children:Array.from(z.entries()).map(([O,M])=>(0,He.jsxs)(re,{direction:"column",gap:"sm",children:[(0,He.jsx)("h3",{className:"dataviews-view-list__group-header",children:c.groupBy?.showLabel===!1?O:(0,x_.sprintf)((0,x_.__)("%1$s: %2$s"),j.label,O)}),M.map(D=>{let G=w(D);return(0,He.jsx)(uZ,{view:c,idPrefix:G,actions:t,item:D,isSelected:D===h,onSelect:S,mediaField:v,titleField:g,descriptionField:y,otherFields:b,onDropdownTriggerKeyDown:P},G)})]},O))})}):(0,He.jsxs)(He.Fragment,{children:[(0,He.jsx)(li.Composite,{ref:A,id:f,render:(0,He.jsx)("div",{}),className:K("dataviews-view-list",u,{[`has-${c.layout?.density}-density`]:c.layout?.density&&["compact","comfortable"].includes(c.layout.density),"is-refreshing":!W&&m}),role:c.infiniteScrollEnabled?"feed":"grid",activeId:C,setActiveId:k,inert:!W&&i?"true":void 0,children:r.map((O,M)=>{let D=w(O);return(0,He.jsx)(uZ,{view:c,idPrefix:D,actions:t,item:O,isSelected:O===h,onSelect:S,mediaField:v,titleField:g,descriptionField:y,otherFields:b,onDropdownTriggerKeyDown:P,posinset:c.infiniteScrollEnabled?M+1:void 0},D)})}),W&&i&&(0,He.jsx)("p",{className:"dataviews-loading-more",children:(0,He.jsx)(li.Spinner,{})})]}):(0,He.jsx)("div",{className:K("dataviews-no-results",{"is-refreshing":m}),children:d})}var vZ=s(H(),1);var _2=s(N(),1),dZ=s(V(),1);var Vy=s(x(),1);function fZ({groupName:e,groupData:t,groupField:r,showLabel:o=!0,children:n}){let i=o?(0,dZ.createInterpolateElement)((0,_2.sprintf)((0,_2.__)("%s: <groupName />"),r.label).trim(),{groupName:(0,Vy.jsx)(r.render,{item:t[0],field:r})}):(0,Vy.jsx)(r.render,{item:t[0],field:r});return(0,Vy.jsxs)(re,{direction:"column",className:"dataviews-view-activity__group",children:[(0,Vy.jsx)("h3",{className:"dataviews-view-activity__group-header",children:i}),n]},e)}var Dh=s(V(),1),mZ=s(U(),1),pZ=s(we(),1);var eo=s(x(),1);function KRe(e){let{view:t,actions:r,item:o,titleField:n,mediaField:i,descriptionField:a,otherFields:l,posinset:c,onClickItem:u,renderItemLink:d,isItemClickable:f}=e,{showTitle:m=!0,showMedia:h=!0,showDescription:g=!0,infiniteScrollEnabled:v}=t,y=(0,Dh.useRef)(null),b=(0,mZ.useRegistry)(),{paginationInfo:S}=(0,Dh.useContext)(Ze),{primaryActions:w,eligibleActions:_}=(0,Dh.useMemo)(()=>{let E=r.filter(L=>!L.isEligible||L.isEligible(o));return{primaryActions:E.filter(L=>L.isPrimary),eligibleActions:E}},[r,o]),C=(0,pZ.useViewportMatch)("medium","<"),k=t.layout?.density??"balanced",A=h&&k!=="compact"&&i?.render?(0,eo.jsx)(i.render,{item:o,field:i,config:{sizes:k==="comfortable"?"32px":"24px"}}):null,R=(0,eo.jsx)("div",{className:"dataviews-view-activity__item-type-icon",children:A||(0,eo.jsx)("span",{className:"dataviews-view-activity__item-bullet","aria-hidden":"true"})}),I=m&&n?.render?(0,eo.jsx)(n.render,{item:o,field:n}):null,B=(0,Dh.useMemo)(()=>k==="comfortable"?"md":"sm",[k]);return(0,eo.jsx)("div",{ref:y,role:v?"article":void 0,"aria-posinset":c,"aria-setsize":v?S.totalItems:void 0,className:K("dataviews-view-activity__item",k==="compact"&&"is-compact",k==="balanced"&&"is-balanced",k==="comfortable"&&"is-comfortable"),children:(0,eo.jsxs)(re,{direction:"row",gap:"lg",justify:"start",align:"flex-start",children:[(0,eo.jsx)(re,{direction:"column",gap:"xs",align:"center",className:"dataviews-view-activity__item-type",children:R}),(0,eo.jsxs)(re,{direction:"column",gap:B,align:"flex-start",className:"dataviews-view-activity__item-content",children:[I&&(0,eo.jsx)(fm,{item:o,isItemClickable:f,onClickItem:u,renderItemLink:d,className:"dataviews-view-activity__item-title",children:I}),g&&a&&(0,eo.jsx)("div",{className:"dataviews-view-activity__item-description",children:(0,eo.jsx)(a.render,{item:o,field:a})}),(0,eo.jsx)("div",{className:"dataviews-view-activity__item-fields",children:l.map(E=>(0,eo.jsxs)("div",{className:"dataviews-view-activity__item-field",children:[(0,eo.jsx)(Kt,{className:"dataviews-view-activity__item-field-label",render:(0,eo.jsx)("span",{}),children:E.label}),(0,eo.jsx)("span",{className:"dataviews-view-activity__item-field-value",children:(0,eo.jsx)(E.render,{item:o,field:E})})]},E.id))}),!!w?.length&&(0,eo.jsx)(GL,{item:o,actions:w,registry:b,buttonVariant:"secondary"})]}),(w.length<_.length||C&&_.length>0)&&(0,eo.jsx)("div",{className:"dataviews-view-activity__item-actions",children:(0,eo.jsx)(Fy,{item:o,actions:_,isCompact:!0})})]})})}var hZ=KRe;var gZ=s(Ye(),1);function ZRe(e){return!!e}function eB(e){let{data:t,fields:r,getItemId:o,view:n}=e,i=r.find(u=>u.id===n.titleField),a=r.find(u=>u.id===n.mediaField),l=r.find(u=>u.id===n.descriptionField),c=(n?.fields??[]).map(u=>r.find(d=>u===d.id)).filter(ZRe);return t.map((u,d)=>(0,gZ.createElement)(hZ,{...e,key:o(u),item:u,mediaField:a,titleField:i,descriptionField:l,otherFields:c,posinset:n.infiniteScrollEnabled?d+1:void 0}))}var Ys=s(x(),1);function yZ(e){let{empty:t,data:r,fields:o,isLoading:n,view:i,className:a}=e,l=Na(!!n),c=!!r?.length,u=i.groupBy?.field?o.find(v=>v.id===i.groupBy?.field):null,d=c&&u?Oa(r,u):null,f=i.infiniteScrollEnabled&&!d;if(!c)return(0,Ys.jsx)("div",{className:K("dataviews-no-results",{"is-refreshing":l}),children:t});let m=!f&&!!n,h=K("dataviews-view-activity",a,{"is-refreshing":!f&&l}),g=d?Array.from(d.entries()):[];return c&&u&&d?(0,Ys.jsx)(re,{direction:"column",gap:"sm",className:h,inert:m?"true":void 0,children:g.map(([v,y])=>(0,Ys.jsx)(fZ,{groupName:v,groupData:y,groupField:u,showLabel:i.groupBy?.showLabel!==!1,children:(0,Ys.jsx)(eB,{...e,data:y})},v))}):(0,Ys.jsxs)(Ys.Fragment,{children:[(0,Ys.jsx)("div",{className:h,role:i.infiniteScrollEnabled?"feed":void 0,inert:m?"true":void 0,children:(0,Ys.jsx)(eB,{...e})}),f&&n&&(0,Ys.jsx)("p",{className:"dataviews-loading-more",children:(0,Ys.jsx)(vZ.Spinner,{})})]})}var Li=s(H(),1),T_=s(N(),1),xZ=s(we(),1),T2=s(V(),1);var wZ=s(H(),1),XRe=s(U(),1),x2=s(V(),1);var QRe=s(N(),1);var C_=s(H(),1),jy=s(V(),1),qs=s(N(),1);var rd=s(x(),1);function tB(){let{view:e,onChangeView:t,paginationInfo:{totalItems:r=0,totalPages:o}}=(0,jy.useContext)(Ze);if(!r||!o||e.infiniteScrollEnabled)return null;let n=e.page??1,i=Array.from(Array(o)).map((a,l)=>{let c=l+1;return{value:c.toString(),label:c.toString(),"aria-label":n===c?(0,qs.sprintf)((0,qs.__)("Page %1$d of %2$d"),n,o):c.toString()}});return!!r&&o!==1&&(0,rd.jsxs)(re,{direction:"row",className:"dataviews-pagination",justify:"end",align:"center",gap:"xl",children:[(0,rd.jsx)(re,{direction:"row",justify:"flex-start",align:"center",gap:"xs",className:"dataviews-pagination__page-select",children:(0,jy.createInterpolateElement)((0,qs.sprintf)((0,qs._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging"),"<CurrentPage />",o),{div:(0,rd.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,rd.jsx)(C_.SelectControl,{"aria-label":(0,qs.__)("Current page"),value:n.toString(),options:i,onChange:a=>{t({...e,page:+a})},size:"small",variant:"minimal"})})}),(0,rd.jsxs)(re,{direction:"row",gap:"xs",align:"center",children:[(0,rd.jsx)(C_.Button,{onClick:()=>t({...e,page:n-1}),disabled:n===1,accessibleWhenDisabled:!0,label:(0,qs.__)("Previous page"),icon:(0,qs.isRTL)()?wa:Sa,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,rd.jsx)(C_.Button,{onClick:()=>t({...e,page:n+1}),disabled:n>=o,accessibleWhenDisabled:!0,label:(0,qs.__)("Next page"),icon:(0,qs.isRTL)()?Sa:wa,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})}var bZ=(0,jy.memo)(tB);var SZ=s(x(),1);function C2(e){return(0,x2.useMemo)(()=>e?.every(t=>t.supportsBulk),[e])}var nt=s(x(),1),{Badge:JRe}=st(Li.privateApis);function _Z({view:e,multiselect:t,selection:r,onChangeSelection:o,getItemId:n,item:i,mediaField:a,titleField:l,descriptionField:c,regularFields:u,badgeFields:d,config:f,posinset:m,setsize:h}){let{showTitle:g=!0,showMedia:v=!0,showDescription:y=!0}=e,b=n(i),S=(0,T2.useRef)(null),w=r.includes(b);By(S,m);let _=a?.render?(0,nt.jsx)(a.render,{item:i,field:a,config:f}):null,C=g&&l?.render?(0,nt.jsx)(l.render,{item:i,field:l}):null;return(0,nt.jsxs)(Li.Composite.Item,{ref:S,"aria-label":l?l.getValue({item:i})||(0,T_.__)("(no title)"):void 0,render:({children:k,...A})=>(0,nt.jsx)(re,{direction:"column",children:k,...A}),role:"option","aria-posinset":m,"aria-setsize":h,className:K("dataviews-view-picker-grid__card",{"is-selected":w}),"aria-selected":w,onClick:()=>{if(w)o(r.filter(k=>b!==k));else{let k=t?[...r,b]:[b];o(k)}},children:[v&&_&&(0,nt.jsx)("div",{className:"dataviews-view-picker-grid__media",children:_}),v&&_&&(0,nt.jsx)(cm,{item:i,selection:r,onChangeSelection:o,getItemId:n,titleField:l,disabled:!1,"aria-hidden":!0,tabIndex:-1}),g&&(0,nt.jsx)(re,{direction:"row",justify:"space-between",className:"dataviews-view-picker-grid__title-actions",children:(0,nt.jsx)("div",{className:"dataviews-view-picker-grid__title-field dataviews-title-field",children:C})}),(0,nt.jsxs)(re,{direction:"column",gap:"xs",children:[y&&c?.render&&(0,nt.jsx)(c.render,{item:i,field:c}),!!d?.length&&(0,nt.jsx)(re,{direction:"row",className:"dataviews-view-picker-grid__badge-fields",gap:"sm",wrap:"wrap",align:"top",justify:"flex-start",children:d.map(k=>(0,nt.jsx)(JRe,{className:"dataviews-view-picker-grid__field-value",children:(0,nt.jsx)(k.render,{item:i,field:k})},k.id))}),!!u?.length&&(0,nt.jsx)(re,{direction:"column",className:"dataviews-view-picker-grid__fields",gap:"xs",children:u.map(k=>(0,nt.jsx)(Li.Flex,{className:"dataviews-view-picker-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsx)(Li.FlexItem,{className:"dataviews-view-picker-grid__field-name",children:k.header}),(0,nt.jsx)(Li.FlexItem,{className:"dataviews-view-picker-grid__field-value",style:{maxHeight:"none"},children:(0,nt.jsx)(k.render,{item:i,field:k})})]})},k.id))})]})]},b)}function CZ({groupName:e,groupField:t,showLabel:r=!0,children:o}){let n=(0,xZ.useInstanceId)(CZ,"dataviews-view-picker-grid-group__header");return(0,nt.jsxs)(re,{direction:"column",gap:"sm",role:"group","aria-labelledby":n,children:[(0,nt.jsx)("h3",{className:"dataviews-view-picker-grid-group__header",id:n,children:r?(0,T_.sprintf)((0,T_.__)("%1$s: %2$s"),t.label,e):e}),o]},e)}function $Re({actions:e,data:t,fields:r,getItemId:o,isLoading:n,onChangeSelection:i,selection:a,view:l,className:c,empty:u}){let{resizeObserverRef:d,paginationInfo:f,itemListLabel:m}=(0,T2.useContext)(Ze),h=r.find(z=>z.id===l?.titleField),g=r.find(z=>z.id===l?.mediaField),v=r.find(z=>z.id===l?.descriptionField),y=l.fields??[],{regularFields:b,badgeFields:S}=y.reduce((z,W)=>{let O=r.find(D=>D.id===W);if(!O)return z;let M=l.layout?.badgeFields?.includes(W)?"badgeFields":"regularFields";return z[M].push(O),z},{regularFields:[],badgeFields:[]}),w=!!t?.length,_=l.layout?.previewSize,C=C2(e),k="900px",A=l.groupBy?.field?r.find(z=>z.id===l.groupBy?.field):null,R=A?Oa(t,A):null,I=(l.infiniteScrollEnabled&&!R)??!1,B=l?.page??1,E=l?.perPage??0,P=I?f?.totalItems:void 0,L=v2(),j=b2(t,I,L);return(0,nt.jsxs)(nt.Fragment,{children:[w&&A&&R&&(0,nt.jsx)(Li.Composite,{virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":C,className:K("dataviews-view-picker-grid",c,{[`has-${l.layout?.density}-density`]:l.layout?.density&&["compact","comfortable"].includes(l.layout.density)}),"aria-label":m,render:({children:z,...W})=>(0,nt.jsx)(re,{direction:"column",gap:"lg",children:z,...W}),children:Array.from(R.entries()).map(([z,W])=>(0,nt.jsx)(CZ,{groupName:z,groupField:A,showLabel:l.groupBy?.showLabel!==!1,children:(0,nt.jsx)(S_,{previewSize:_,style:{gridTemplateColumns:_&&`repeat(auto-fill, minmax(${_}px, 1fr))`},"aria-busy":n,ref:d,children:W.map(O=>{let M=O.position??(B-1)*E+t.indexOf(O)+1;return(0,nt.jsx)(_Z,{view:l,multiselect:C,selection:a,onChangeSelection:i,getItemId:o,item:O,mediaField:g,titleField:h,descriptionField:v,regularFields:b,badgeFields:S,config:{sizes:k},posinset:M,setsize:P},o(O))})})},z))}),w&&!R&&(0,nt.jsxs)(Li.Composite,{render:(0,nt.jsx)(S_,{className:K("dataviews-view-picker-grid",c,{[`has-${l.layout?.density}-density`]:l.layout?.density&&["compact","comfortable"].includes(l.layout.density)}),previewSize:_,"aria-busy":n,ref:d}),virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":C,"aria-label":m,children:[Array.from({length:j}).map((z,W)=>(0,nt.jsx)(Li.Composite.Item,{render:({children:O,...M})=>(0,nt.jsx)(re,{direction:"column",children:O,...M}),role:"option","aria-hidden":!0,tabIndex:-1,className:"dataviews-view-picker-grid__card dataviews-view-picker-grid__placeholder"},`placeholder-${W}`)),t.map(z=>{let W=z.position;return(0,nt.jsx)(_Z,{view:l,multiselect:C,selection:a,onChangeSelection:i,getItemId:o,item:z,mediaField:g,titleField:h,descriptionField:v,regularFields:b,badgeFields:S,config:{sizes:k},posinset:W,setsize:P},o(z))})]}),!w&&(0,nt.jsx)("div",{className:K({"dataviews-loading":n,"dataviews-no-results":!n}),children:n?(0,nt.jsx)("p",{children:(0,nt.jsx)(Li.Spinner,{})}):u}),w&&n&&(0,nt.jsx)("p",{className:"dataviews-loading-more",children:(0,nt.jsx)(Li.Spinner,{})})]})}var TZ=$Re;var P2=s(N(),1),Lh=s(H(),1),Ks=s(V(),1);var mt=s(x(),1);function eAe({item:e,fields:t,column:r,align:o}){let n=t.find(a=>a.id===r);if(!n)return null;let i=K("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__cell-align-end":o==="end","dataviews-view-table__cell-align-center":o==="center"});return(0,mt.jsx)("div",{className:i,children:(0,mt.jsx)(n.render,{item:e,field:n})})}function PZ({item:e,fields:t,id:r,view:o,titleField:n,mediaField:i,descriptionField:a,selection:l,getItemId:c,onChangeSelection:u,multiselect:d,posinset:f}){let{paginationInfo:m}=(0,Ks.useContext)(Ze),h=l.includes(r),[g,v]=(0,Ks.useState)(!1),y=(0,Ks.useRef)(null);By(y,f);let{showTitle:b=!0,showMedia:S=!0,showDescription:w=!0,infiniteScrollEnabled:_}=o,C=()=>{v(!0)},k=()=>{v(!1)},A=o.fields??[],R=n&&b||i&&S||a&&w;return(0,mt.jsxs)(Lh.Composite.Item,{ref:y,render:({children:I,...B})=>(0,mt.jsx)("tr",{className:K("dataviews-view-table__row",{"is-selected":h,"is-hovered":g}),onMouseEnter:C,onMouseLeave:k,children:I,...B}),"aria-selected":h,"aria-setsize":m.totalItems||void 0,"aria-posinset":f,role:_?"article":"option",onClick:()=>{if(h)u(l.filter(I=>r!==I));else{let I=d?[...l,r]:[r];u(I)}},children:[(0,mt.jsx)("td",{className:"dataviews-view-table__checkbox-column",role:"presentation",children:(0,mt.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,mt.jsx)(cm,{item:e,selection:l,onChangeSelection:u,getItemId:c,titleField:n,disabled:!1,"aria-hidden":!0,tabIndex:-1})})}),R&&(0,mt.jsx)("td",{role:"presentation",children:(0,mt.jsx)(f2,{item:e,titleField:b?n:void 0,mediaField:S?i:void 0,descriptionField:w?a:void 0,isItemClickable:()=>!1})}),A.map(I=>{let{width:B,maxWidth:E,minWidth:P,align:L}=o.layout?.styles?.[I]??{};return(0,mt.jsx)("td",{style:{width:B,maxWidth:E,minWidth:P},role:"presentation",children:(0,mt.jsx)(eAe,{fields:t,item:e,column:I,align:L})},I)})]},r)}function tAe({actions:e,data:t,fields:r,getItemId:o,isLoading:n=!1,onChangeView:i,onChangeSelection:a,selection:l,setOpenedFilter:c,view:u,className:d,empty:f}){let m=(0,Ks.useRef)(new Map),h=(0,Ks.useRef)(void 0),[g,v]=(0,Ks.useState)(),y=C2(e)??!1;(0,Ks.useEffect)(()=>{h.current&&(h.current.focus(),h.current=void 0)});let b=u.groupBy?.field?r.find(W=>W.id===u.groupBy?.field):null,S=b?Oa(t,b):null,w=u.infiniteScrollEnabled&&!S,_=(0,Ks.useId)();if(g){h.current=g,v(void 0);return}let C=W=>{let O=m.current.get(W.id),M=O?m.current.get(O.fallback):void 0;v(M?.node)},k=!!t?.length,A=r.find(W=>W.id===u.titleField),R=r.find(W=>W.id===u.mediaField),I=r.find(W=>W.id===u.descriptionField),{showTitle:B=!0,showMedia:E=!0,showDescription:P=!0}=u,L=A&&B||R&&E||I&&P,j=u.fields??[],z=(W,O)=>M=>{M?m.current.set(W,{node:M,fallback:j[O>0?O-1:1]}):m.current.delete(W)};return(0,mt.jsxs)(mt.Fragment,{children:[(0,mt.jsxs)("table",{className:K("dataviews-view-table","dataviews-view-picker-table",d,{[`has-${u.layout?.density}-density`]:u.layout?.density&&["compact","comfortable"].includes(u.layout.density)}),"aria-busy":n,"aria-describedby":_,role:w?"feed":"listbox",children:[(0,mt.jsx)("thead",{role:"presentation",children:(0,mt.jsxs)("tr",{className:"dataviews-view-table__row",role:"presentation",children:[(0,mt.jsx)("th",{className:"dataviews-view-table__checkbox-column",children:y&&(0,mt.jsx)(w_,{selection:l,onChangeSelection:a,data:t,actions:e,getItemId:o,disableSelectAll:w})}),L&&(0,mt.jsx)("th",{children:A&&(0,mt.jsx)(Ly,{ref:z(A.id,0),fieldId:A.id,view:u,fields:r,onChangeView:i,onHide:C,setOpenedFilter:c,canMove:!1})}),j.map((W,O)=>{let{width:M,maxWidth:D,minWidth:G,align:q}=u.layout?.styles?.[W]??{};return(0,mt.jsx)("th",{style:{width:M,maxWidth:D,minWidth:G,textAlign:q},"aria-sort":u.sort?.direction&&u.sort?.field===W?i2[u.sort.direction]:void 0,scope:"col",children:(0,mt.jsx)(Ly,{ref:z(W,O),fieldId:W,view:u,fields:r,onChangeView:i,onHide:C,setOpenedFilter:c,canMove:u.layout?.enableMoving??!0})},W)})]})}),k&&b&&S?Array.from(S.entries()).map(([W,O])=>(0,mt.jsxs)(Lh.Composite,{virtualFocus:!0,orientation:"vertical",render:(0,mt.jsx)("tbody",{role:"group"}),children:[(0,mt.jsx)("tr",{className:"dataviews-view-table__group-header-row",role:"presentation",children:(0,mt.jsx)("td",{colSpan:j.length+(L?1:0)+1,className:"dataviews-view-table__group-header-cell",role:"presentation",children:u.groupBy?.showLabel===!1?W:(0,P2.sprintf)((0,P2.__)("%1$s: %2$s"),b.label,W)})}),O.map((M,D)=>(0,mt.jsx)(PZ,{item:M,fields:r,id:o(M)||D.toString(),view:u,titleField:A,mediaField:R,descriptionField:I,selection:l,getItemId:o,onChangeSelection:a,multiselect:y},o(M)))]},`group-${W}`)):(0,mt.jsx)(Lh.Composite,{render:(0,mt.jsx)("tbody",{role:"presentation"}),virtualFocus:!0,orientation:"vertical",children:k&&t.map((W,O)=>{let M=o(W),D=W.position;return(0,mt.jsx)(PZ,{item:W,fields:r,id:M||O.toString(),view:u,titleField:A,mediaField:R,descriptionField:I,selection:l,getItemId:o,onChangeSelection:a,multiselect:y,posinset:D},M)})})]}),(0,mt.jsxs)("div",{className:K({"dataviews-loading":n,"dataviews-no-results":!k&&!n}),id:_,children:[!k&&(n?(0,mt.jsx)("p",{children:(0,mt.jsx)(Lh.Spinner,{})}):f),k&&n&&(0,mt.jsx)("p",{className:"dataviews-loading-more",children:(0,mt.jsx)(Lh.Spinner,{})})]})]})}var EZ=tAe;var zy=s(H(),1),Hy=s(N(),1),kZ=s(V(),1);var Uy=s(x(),1);function Bh(){let e=(0,kZ.useContext)(Ze),t=e.view;return(0,Uy.jsxs)(zy.__experimentalToggleGroupControl,{size:"__unstable-large",label:(0,Hy.__)("Density"),value:t.layout?.density||"balanced",onChange:r=>{e.onChangeView({...t,layout:{...t.layout,density:r}})},isBlock:!0,children:[(0,Uy.jsx)(zy.__experimentalToggleGroupControlOption,{value:"comfortable",label:(0,Hy._x)("Comfortable","Density option for DataView layout")},"comfortable"),(0,Uy.jsx)(zy.__experimentalToggleGroupControlOption,{value:"balanced",label:(0,Hy._x)("Balanced","Density option for DataView layout")},"balanced"),(0,Uy.jsx)(zy.__experimentalToggleGroupControlOption,{value:"compact",label:(0,Hy._x)("Compact","Density option for DataView layout")},"compact")]})}var RZ=s(H(),1),AZ=s(N(),1),IZ=s(V(),1);var OZ=s(x(),1),rAe=[{value:120,breakpoint:1},{value:170,breakpoint:1},{value:230,breakpoint:1},{value:290,breakpoint:1112},{value:350,breakpoint:1636},{value:430,breakpoint:588}];function NZ(){let e=(0,IZ.useContext)(Ze),t=e.view,r=rAe.filter(a=>e.containerWidth>=a.breakpoint),o=t.layout?.previewSize??230,n=r.map((a,l)=>({...a,index:l})).filter(a=>a.value<=o).sort((a,l)=>l.value-a.value)[0]?.index??0,i=r.map((a,l)=>({value:l}));return(0,OZ.jsx)(RZ.RangeControl,{__next40pxDefaultSize:!0,showTooltip:!1,label:(0,AZ.__)("Preview size"),value:n,min:0,max:r.length-1,withInputField:!1,onChange:(a=0)=>{e.onChangeView({...t,layout:{...t.layout,previewSize:r[a].value}})},step:1,marks:i})}var Vh=s(x(),1);function rB(){return(0,Vh.jsxs)(Vh.Fragment,{children:[(0,Vh.jsx)(Bh,{}),(0,Vh.jsx)(NZ,{})]})}var hm=[{type:Oy,label:(0,od.__)("Table"),component:rZ,icon:nT,viewConfigOptions:Bh},{type:a2,label:(0,od.__)("Grid"),component:cZ,icon:sT,viewConfigOptions:rB},{type:AK,label:(0,od.__)("List"),component:$L,icon:(0,od.isRTL)()?CM:oS,viewConfigOptions:Bh},{type:IK,label:(0,od.__)("Activity"),component:yZ,icon:Qp,viewConfigOptions:Bh},{type:OK,label:(0,od.__)("Grid"),component:TZ,icon:sT,viewConfigOptions:rB,isPicker:!0},{type:NK,label:(0,od.__)("Table"),component:EZ,icon:nT,viewConfigOptions:Bh,isPicker:!0}];var ob=s(V(),1);var Tl=s(H(),1),dd=s(N(),1),sk=s(V(),1);function P_(...e){}function oB(e,t){if(oAe(e)){let r=nAe(t)?t():t;return e(r)}return e}function oAe(e){return typeof e=="function"}function nAe(e){return typeof e=="function"}function ds(e,t){return typeof Object.hasOwn=="function"?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function gm(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}function E_(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function nB(e,t){let r={...e};for(let o of t)ds(r,o)&&delete r[o];return r}function iB(e,t){let r={};for(let o of t)ds(e,o)&&(r[o]=e[o]);return r}function k_(e){return e}function Nn(e,t){if(!e)throw typeof t!="string"?new Error("Invariant failed"):new Error(t)}function sB(e){return Object.keys(e)}function aB(e,...t){let r=typeof e=="function"?e(...t):e;return r==null?!1:!r}function jh(e){return e.disabled||e["aria-disabled"]===!0||e["aria-disabled"]==="true"}function Mn(e){let t={};for(let r in e)e[r]!==void 0&&(t[r]=e[r]);return t}function pt(...e){for(let t of e)if(t!==void 0)return t}var MZ=s(Ye(),1);function FZ(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function iAe(e){return!e||!(0,MZ.isValidElement)(e)?!1:"ref"in e.props||"ref"in e}function DZ(e){return iAe(e)?{...e.props}.ref||e.ref:null}function LZ(e,t){let r={...e};for(let o in t){if(!ds(t,o))continue;if(o==="className"){let i="className";r[i]=e[i]?`${e[i]} ${t[i]}`:t[i];continue}if(o==="style"){let i="style";r[i]=e[i]?{...e[i],...t[i]}:t[i];continue}let n=t[o];if(typeof n=="function"&&o.startsWith("on")){let i=e[o];if(typeof i=="function"){r[o]=(...a)=>{n(...a),i(...a)};continue}}r[o]=n}return r}var vm=sAe();function sAe(){var e;return typeof window<"u"&&!!((e=window.document)!=null&&e.createElement)}function nd(e){return e?"self"in e?e.document:e.ownerDocument||document:document}function zh(e,t=!1){var r;let{activeElement:o}=nd(e);if(!o?.nodeName)return null;if(lB(o)&&((r=o.contentDocument)!=null&&r.body))return zh(o.contentDocument.body,t);if(t){let n=o.getAttribute("aria-activedescendant");if(n){let i=nd(o).getElementById(n);if(i)return i}}return o}function xc(e,t){return e===t||e.contains(t)}function lB(e){return e.tagName==="IFRAME"}function id(e){let t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?aAe.indexOf(e.type)!==-1:!1}var aAe=["button","color","file","image","reset","submit"];function cB(e){if(typeof e.checkVisibility=="function")return e.checkVisibility();let t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}function Bi(e){try{let t=e instanceof HTMLInputElement&&e.selectionStart!==null,r=e.tagName==="TEXTAREA";return t||r||!1}catch{return!1}}function R_(e){return e.isContentEditable||Bi(e)}function uB(e){if(Bi(e))return e.value;if(e.isContentEditable){let t=nd(e).createRange();return t.selectNodeContents(e),t.toString()}return""}function Gy(e){let t=0,r=0;if(Bi(e))t=e.selectionStart||0,r=e.selectionEnd||0;else if(e.isContentEditable){let o=nd(e).getSelection();if(o?.rangeCount&&o.anchorNode&&xc(e,o.anchorNode)&&o.focusNode&&xc(e,o.focusNode)){let n=o.getRangeAt(0),i=n.cloneRange();i.selectNodeContents(e),i.setEnd(n.startContainer,n.startOffset),t=i.toString().length,i.setEnd(n.endContainer,n.endOffset),r=i.toString().length}}return{start:t,end:r}}function dB(e,t){let r=["dialog","menu","listbox","tree","grid"],o=e?.getAttribute("role");return o&&r.indexOf(o)!==-1?o:t}function Wy(e){if(!e)return null;let t=r=>r==="auto"||r==="scroll";if(e.clientHeight&&e.scrollHeight>e.clientHeight){let{overflowY:r}=getComputedStyle(e);if(t(r))return e}else if(e.clientWidth&&e.scrollWidth>e.clientWidth){let{overflowX:r}=getComputedStyle(e);if(t(r))return e}return Wy(e.parentElement)||document.scrollingElement||document.body}function A_(e,...t){/text|search|password|tel|url/i.test(e.type)&&e.setSelectionRange(...t)}function fB(e,t){let r=e.map((n,i)=>[i,n]),o=!1;return r.sort(([n,i],[a,l])=>{let c=t(i),u=t(l);return c===u||!c||!u?0:lAe(c,u)?(n>a&&(o=!0),-1):(n<a&&(o=!0),1)}),o?r.map(([n,i])=>i):e}function lAe(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function mB(){return vm&&!!navigator.maxTouchPoints}function E2(){return vm?/mac|iphone|ipad|ipod/i.test(navigator.platform):!1}function Hh(){return vm&&E2()&&/apple/i.test(navigator.vendor)}function pB(){return vm&&/firefox\//i.test(navigator.userAgent)}function k2(e){return!!(e.currentTarget&&!xc(e.currentTarget,e.target))}function ci(e){return e.target===e.currentTarget}function BZ(e){let t=e.currentTarget;if(!t)return!1;let r=E2();if(r&&!e.metaKey||!r&&!e.ctrlKey)return!1;let o=t.tagName.toLowerCase();return o==="a"||o==="button"&&t.type==="submit"||o==="input"&&t.type==="submit"}function VZ(e){let t=e.currentTarget;if(!t)return!1;let r=t.tagName.toLowerCase();return e.altKey?r==="a"||r==="button"&&t.type==="submit"||r==="input"&&t.type==="submit":!1}function Uh(e,t){let r=new FocusEvent("blur",t),o=e.dispatchEvent(r),n={...t,bubbles:!0};return e.dispatchEvent(new FocusEvent("focusout",n)),o}function jZ(e,t,r){let o=new KeyboardEvent(t,r);return e.dispatchEvent(o)}function hB(e,t){let r=new MouseEvent("click",t);return e.dispatchEvent(r)}function R2(e,t){let r=t||e.currentTarget,o=e.relatedTarget;return!o||!xc(r,o)}function ym(e,t,r,o){let i=(l=>{if(o){let u=setTimeout(l,o);return()=>clearTimeout(u)}let c=requestAnimationFrame(l);return()=>cancelAnimationFrame(c)})(()=>{e.removeEventListener(t,a,!0),r()}),a=()=>{i(),r()};return e.addEventListener(t,a,{once:!0,capture:!0}),i}function Cc(e,t,r,o=window){let n=[];try{o.document.addEventListener(e,t,r);for(let a of Array.from(o.frames))n.push(Cc(e,t,r,a))}catch{}return()=>{try{o.document.removeEventListener(e,t,r)}catch{}for(let a of n)a()}}var cAe=s(Ye(),1),or=s(Ye(),1),gB={...cAe},zZ=gB.useId,wlt=gB.useDeferredValue,HZ=gB.useInsertionEffect,Yr=vm?or.useLayoutEffect:or.useEffect;function uAe(e){let[t]=(0,or.useState)(e);return t}function YZ(e){let t=(0,or.useRef)(e);return Yr(()=>{t.current=e}),t}function yt(e){let t=(0,or.useRef)(()=>{throw new Error("Cannot call an event handler while rendering.")});return HZ?HZ(()=>{t.current=e}):t.current=e,(0,or.useCallback)((...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[])}function qZ(e){let[t,r]=(0,or.useState)(null);return Yr(()=>{if(t==null||!e)return;let o=null;return e(n=>(o=n,t)),()=>{e(o)}},[t,e]),[t,r]}function to(...e){return(0,or.useMemo)(()=>{if(e.some(Boolean))return t=>{for(let r of e)FZ(r,t)}},e)}function Ma(e){if(zZ){let o=zZ();return e||o}let[t,r]=(0,or.useState)(e);return Yr(()=>{if(e||t)return;let o=Math.random().toString(36).slice(2,8);r(`id-${o}`)},[e,t]),e||t}function KZ(e,t){let r=i=>{if(typeof i=="string")return i},[o,n]=(0,or.useState)(()=>r(t));return Yr(()=>{let i=e&&"current"in e?e.current:e;n(i?.tagName.toLowerCase()||r(t))},[e,t]),o}function ZZ(e,t,r){let o=uAe(r),[n,i]=(0,or.useState)(o);return(0,or.useEffect)(()=>{let a=e&&"current"in e?e.current:e;if(!a)return;let l=()=>{let u=a.getAttribute(t);i(u??o)},c=new MutationObserver(l);return c.observe(a,{attributeFilter:[t]}),l(),()=>c.disconnect()},[e,t,o]),n}function Tc(e,t){let r=(0,or.useRef)(!1);(0,or.useEffect)(()=>{if(r.current)return e();r.current=!0},t),(0,or.useEffect)(()=>()=>{r.current=!1},[])}function XZ(e,t){let r=(0,or.useRef)(!1);Yr(()=>{if(r.current)return e();r.current=!0},t),Yr(()=>()=>{r.current=!1},[])}function QZ(){return(0,or.useReducer)(()=>[],[])}function _o(e){return yt(typeof e=="function"?e:()=>e)}function Pc(e,t,r=[]){let o=(0,or.useCallback)(n=>(e.wrapElement&&(n=e.wrapElement(n)),t(n)),[...r,e.wrapElement]);return{...e,wrapElement:o}}function JZ(e,t,r){let o=e.onLoadedMetadataCapture,n=(0,or.useMemo)(()=>Object.assign(()=>{},{...o,[t]:r}),[o,t,r]);return[o?.[t],{onLoadedMetadataCapture:n}]}var UZ=!1;function $Z(){return(0,or.useEffect)(()=>{UZ||(Cc("mousemove",fAe,!0),Cc("mousedown",A2,!0),Cc("mouseup",A2,!0),Cc("keydown",A2,!0),Cc("scroll",A2,!0),UZ=!0)},[]),yt(()=>vB)}var vB=!1,GZ=0,WZ=0;function dAe(e){let t=e.movementX||e.screenX-GZ,r=e.movementY||e.screenY-WZ;return GZ=e.screenX,WZ=e.screenY,t||r||!1}function fAe(e){dAe(e)&&(vB=!0)}function A2(){vB=!1}var Vi=s(Ye(),1),Gh=s(x(),1);function nr(e){let t=Vi.forwardRef((r,o)=>e({...r,ref:o}));return t.displayName=e.displayName||e.name,t}function bm(e,t){return Vi.memo(e,t)}function mr(e,t){let{wrapElement:r,render:o,...n}=t,i=to(t.ref,DZ(o)),a;if(Vi.isValidElement(o)){let l={...o.props,ref:i};a=Vi.cloneElement(o,LZ(n,l))}else o?a=o(n):a=(0,Gh.jsx)(e,{...n});return r?r(a):a}function pr(e){let t=(r={})=>e(r);return t.displayName=e.name,t}function fs(e=[],t=[]){let r=Vi.createContext(void 0),o=Vi.createContext(void 0),n=()=>Vi.useContext(r),i=(u=!1)=>{let d=Vi.useContext(o),f=n();return u?d:d||f},a=()=>{let u=Vi.useContext(o),d=n();if(!(u&&u===d))return d},l=u=>e.reduceRight((d,f)=>(0,Gh.jsx)(f,{...u,children:d}),(0,Gh.jsx)(r.Provider,{...u}));return{context:r,scopedContext:o,useContext:n,useScopedContext:i,useProviderContext:a,ContextProvider:l,ScopedContextProvider:u=>(0,Gh.jsx)(l,{...u,children:t.reduceRight((d,f)=>(0,Gh.jsx)(f,{...u,children:d}),(0,Gh.jsx)(o.Provider,{...u}))})}}var I_=fs(),eX=I_.useContext,Plt=I_.useScopedContext,Elt=I_.useProviderContext,tX=I_.ContextProvider,rX=I_.ScopedContextProvider;var yB=s(Ye(),1),O_=fs([tX],[rX]),I2=O_.useContext,Ilt=O_.useScopedContext,oX=O_.useProviderContext,Yy=O_.ContextProvider,O2=O_.ScopedContextProvider,nX=(0,yB.createContext)(void 0),iX=(0,yB.createContext)(void 0);function sX(e,t){return e.find(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function Ec(e,t){return t&&e.item(t)||null}function aX(e){let t=[];for(let r of e){let o=t.find(n=>{var i;return((i=n[0])==null?void 0:i.rowId)===r.rowId});o?o.push(r):t.push([r])}return t}function lX(e,t=!1){if(Bi(e))e.setSelectionRange(t?e.value.length:0,e.value.length);else if(e.isContentEditable){let r=nd(e).getSelection();r?.selectAllChildren(e),t&&r?.collapseToEnd()}}var bB=Symbol("FOCUS_SILENTLY");function cX(e){e[bB]=!0,e.focus({preventScroll:!0})}function uX(e){let t=e[bB];return delete e[bB],t}function Wh(e,t,r){if(!t||t===r)return!1;let o=e.item(t.id);return!(!o||r&&o.element===r)}var N2=s(Ye(),1),mAe="div",wB=pr(function({store:t,shouldRegisterItem:r=!0,getItem:o=k_,element:n,...i}){let a=eX();t=t||a;let l=Ma(i.id),c=(0,N2.useRef)(n);return(0,N2.useEffect)(()=>{let u=c.current;if(!l||!u||!r)return;let d=o({id:l,element:u});return t?.renderItem(d)},[l,r,o,t]),i={...i,ref:to(c,i.ref)},Mn(i)}),Vlt=nr(function(t){let r=wB(t);return mr(mAe,r)});var dX=s(Ye(),1),fX=(0,dX.createContext)(!0);var mX="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function N_(e){return!(!e.matches(mX)||!cB(e)||e.closest("[inert]"))}function pX(e){for(;e&&!N_(e);)e=e.closest(mX);return e||null}function Fa(e){let t=zh(e);if(!t)return!1;if(t===e)return!0;let r=t.getAttribute("aria-activedescendant");return r?r===e.id:!1}function SB(e){let t=zh(e);if(!t)return!1;if(xc(e,t))return!0;let r=t.getAttribute("aria-activedescendant");return!r||!("id"in e)?!1:r===e.id?!0:!!e.querySelector(`#${CSS.escape(r)}`)}function hX(e){!SB(e)&&N_(e)&&e.focus()}function gX(e,t){"scrollIntoView"in e?(e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest",...t})):e.focus()}var Zs=s(Ye(),1),pAe="div",vX=Hh(),hAe=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"],gAe=Symbol("safariFocusAncestor");function yX(e,t){e&&(e[gAe]=t)}function vAe(e){let{tagName:t,readOnly:r,type:o}=e;return t==="TEXTAREA"&&!r||t==="SELECT"&&!r?!0:t==="INPUT"&&!r?hAe.includes(o):!!(e.isContentEditable||e.getAttribute("role")==="combobox"&&e.dataset.name)}function yAe(e){return"labels"in e?e.labels:null}function bX(e){return e.tagName.toLowerCase()==="input"&&e.type?e.type==="radio"||e.type==="checkbox":!1}function bAe(e){return e?e==="button"||e==="summary"||e==="input"||e==="select"||e==="textarea"||e==="a":!0}function wAe(e){return e?e==="button"||e==="input"||e==="select"||e==="textarea":!0}function SAe(e,t,r,o,n){return e?t?r&&!o?-1:void 0:r?n:n||0:n}function _B(e,t){return yt(r=>{e?.(r),!r.defaultPrevented&&t&&(r.stopPropagation(),r.preventDefault())})}var wX=!1,xB=!0;function _Ae(e){let t=e.target;t&&"hasAttribute"in t&&(t.hasAttribute("data-focus-visible")||(xB=!1))}function xAe(e){e.metaKey||e.ctrlKey||e.altKey||(xB=!0)}var M_=pr(function({focusable:t=!0,accessibleWhenDisabled:r,autoFocus:o,onFocusVisible:n,...i}){let a=(0,Zs.useRef)(null);(0,Zs.useEffect)(()=>{t&&(wX||(Cc("mousedown",_Ae,!0),Cc("keydown",xAe,!0),wX=!0))},[t]),vX&&(0,Zs.useEffect)(()=>{if(!t)return;let j=a.current;if(!j||!bX(j))return;let z=yAe(j);if(!z)return;let W=()=>queueMicrotask(()=>j.focus());for(let O of z)O.addEventListener("mouseup",W);return()=>{for(let O of z)O.removeEventListener("mouseup",W)}},[t]);let l=t&&jh(i),c=!!l&&!r,[u,d]=(0,Zs.useState)(!1);(0,Zs.useEffect)(()=>{t&&c&&u&&d(!1)},[t,c,u]),(0,Zs.useEffect)(()=>{if(!t||!u)return;let j=a.current;if(!j||typeof IntersectionObserver>"u")return;let z=new IntersectionObserver(()=>{N_(j)||d(!1)});return z.observe(j),()=>z.disconnect()},[t,u]);let f=_B(i.onKeyPressCapture,l),m=_B(i.onMouseDownCapture,l),h=_B(i.onClickCapture,l),g=i.onMouseDown,v=yt(j=>{if(g?.(j),j.defaultPrevented||!t)return;let z=j.currentTarget;if(!vX||k2(j)||!id(z)&&!bX(z))return;let W=!1,O=()=>{W=!0},M={capture:!0,once:!0};z.addEventListener("focusin",O,M);let D=pX(z.parentElement);yX(D,!0),ym(z,"mouseup",()=>{z.removeEventListener("focusin",O,!0),yX(D,!1),!W&&hX(z)})}),y=(j,z)=>{if(z&&(j.currentTarget=z),!t)return;let W=j.currentTarget;W&&Fa(W)&&(n?.(j),!j.defaultPrevented&&(W.dataset.focusVisible="true",d(!0)))},b=i.onKeyDownCapture,S=yt(j=>{if(b?.(j),j.defaultPrevented||!t||u||j.metaKey||j.altKey||j.ctrlKey||!ci(j))return;let z=j.currentTarget;ym(z,"focusout",()=>y(j,z))}),w=i.onFocusCapture,_=yt(j=>{if(w?.(j),j.defaultPrevented||!t)return;if(!ci(j)){d(!1);return}let z=j.currentTarget,W=()=>y(j,z);xB||vAe(j.target)?ym(j.target,"focusout",W):d(!1)}),C=i.onBlur,k=yt(j=>{C?.(j),t&&R2(j)&&(j.currentTarget.removeAttribute("data-focus-visible"),d(!1))}),A=(0,Zs.useContext)(fX),R=yt(j=>{t&&o&&j&&A&&queueMicrotask(()=>{Fa(j)||N_(j)&&j.focus()})}),I=KZ(a),B=t&&bAe(I),E=t&&wAe(I),P=i.style,L=(0,Zs.useMemo)(()=>c?{pointerEvents:"none",...P}:P,[c,P]);return i={"data-focus-visible":t&&u||void 0,"data-autofocus":o||void 0,"aria-disabled":l||void 0,...i,ref:to(a,R,i.ref),style:L,tabIndex:SAe(t,c,B,E,i.tabIndex),disabled:E&&c?!0:void 0,contentEditable:l?void 0:i.contentEditable,onKeyPressCapture:f,onClickCapture:h,onMouseDownCapture:m,onMouseDown:v,onKeyDownCapture:S,onFocusCapture:_,onBlur:k},Mn(i)}),tct=nr(function(t){let r=M_(t);return mr(pAe,r)});var wm=s(Ye(),1),CAe="button";function SX(e){if(!e.isTrusted)return!1;let t=e.currentTarget;return e.key==="Enter"?id(t)||t.tagName==="SUMMARY"||t.tagName==="A":e.key===" "?id(t)||t.tagName==="SUMMARY"||t.tagName==="INPUT"||t.tagName==="SELECT":!1}var TAe=Symbol("command"),CB=pr(function({clickOnEnter:t=!0,clickOnSpace:r=!0,...o}){let n=(0,wm.useRef)(null),[i,a]=(0,wm.useState)(!1);(0,wm.useEffect)(()=>{n.current&&a(id(n.current))},[]);let[l,c]=(0,wm.useState)(!1),u=(0,wm.useRef)(!1),d=jh(o),[f,m]=JZ(o,TAe,!0),h=o.onKeyDown,g=yt(b=>{h?.(b);let S=b.currentTarget;if(b.defaultPrevented||f||d||!ci(b)||Bi(S)||S.isContentEditable)return;let w=t&&b.key==="Enter",_=r&&b.key===" ",C=b.key==="Enter"&&!t,k=b.key===" "&&!r;if(C||k){b.preventDefault();return}if(w||_){let A=SX(b);if(w){if(!A){b.preventDefault();let{view:R,...I}=b,B=()=>hB(S,I);pB()?ym(S,"keyup",B):queueMicrotask(B)}}else _&&(u.current=!0,A||(b.preventDefault(),c(!0)))}}),v=o.onKeyUp,y=yt(b=>{if(v?.(b),b.defaultPrevented||f||d||b.metaKey)return;let S=r&&b.key===" ";if(u.current&&S&&(u.current=!1,!SX(b))){b.preventDefault(),c(!1);let w=b.currentTarget,{view:_,...C}=b;queueMicrotask(()=>hB(w,C))}});return o={"data-active":l||void 0,type:i?"button":void 0,...m,...o,ref:to(n,o.ref),onKeyDown:g,onKeyUp:y},o=M_(o),o}),uct=nr(function(t){let r=CB(t);return mr(CAe,r)});function Yh(e,t){let r=e.__unstableInternals;return Nn(r,"Invalid store"),r[t]}function ji(e,...t){let r=e,o=r,n=Symbol(),i=P_,a=new Set,l=new Set,c=new Set,u=new Set,d=new Set,f=new WeakMap,m=new WeakMap,h=R=>(c.add(R),()=>c.delete(R)),g=()=>{let R=a.size,I=Symbol();a.add(I);let B=()=>{a.delete(I),!a.size&&i()};if(R)return B;let E=sB(r).map(j=>gm(...t.map(z=>{var W;let O=(W=z?.getState)==null?void 0:W.call(z);if(O&&ds(O,j))return ln(z,[j],M=>{k(j,M[j],!0)})}))),P=[];for(let j of c)P.push(j());let L=t.map(qy);return i=gm(...E,...P,...L),B},v=(R,I,B=u)=>(B.add(I),m.set(I,R),()=>{var E;(E=f.get(I))==null||E(),f.delete(I),m.delete(I),B.delete(I)}),y=(R,I)=>v(R,I),b=(R,I)=>(f.set(I,I(r,r)),v(R,I)),S=(R,I)=>(f.set(I,I(r,o)),v(R,I,d)),w=R=>ji(iB(r,R),A),_=R=>ji(nB(r,R),A),C=()=>r,k=(R,I,B=!1)=>{var E;if(!ds(r,R))return;let P=oB(I,r[R]);if(P===r[R])return;if(!B)for(let W of t)(E=W?.setState)==null||E.call(W,R,P);let L=r;r={...r,[R]:P};let j=Symbol();n=j,l.add(R);let z=(W,O,M)=>{var D;let G=m.get(W),q=Z=>M?M.has(Z):Z===R;(!G||G.some(q))&&((D=f.get(W))==null||D(),f.set(W,W(r,O)))};for(let W of u)z(W,L);queueMicrotask(()=>{if(n!==j)return;let W=r;for(let O of d)z(O,o,l);o=W,l.clear()})},A={getState:C,setState:k,__unstableInternals:{setup:h,init:g,subscribe:y,sync:b,batch:S,pick:w,omit:_}};return A}function an(e,...t){if(e)return Yh(e,"setup")(...t)}function qy(e,...t){if(e)return Yh(e,"init")(...t)}function Ky(e,...t){if(e)return Yh(e,"subscribe")(...t)}function ln(e,...t){if(e)return Yh(e,"sync")(...t)}function Sm(e,...t){if(e)return Yh(e,"batch")(...t)}function F_(e,...t){if(e)return Yh(e,"omit")(...t)}function TB(e,...t){if(e)return Yh(e,"pick")(...t)}function qh(...e){var t;let r={};for(let n of e){let i=(t=n?.getState)==null?void 0:t.call(n);i&&Object.assign(r,i)}let o=ji(r,...e);return Object.assign({},...e,o)}var kc=s(Ye(),1),_X=s(VU(),1),{useSyncExternalStore:xX}=_X.default,CX=()=>()=>{};function Zy(e,t=k_){let r=kc.useCallback(n=>e?Ky(e,null,n):CX(),[e]),o=()=>{let n=typeof t=="string"?t:null,i=typeof t=="function"?t:null,a=e?.getState();if(i)return i(a);if(a&&n&&ds(a,n))return a[n]};return xX(r,o,o)}function F2(e,t){let r=kc.useRef({}),o=kc.useCallback(i=>e?Ky(e,null,i):CX(),[e]),n=()=>{let i=e?.getState(),a=!1,l=r.current;for(let c in t){let u=t[c];if(typeof u=="function"){let d=u(i);d!==l[c]&&(l[c]=d,a=!0)}if(typeof u=="string"){if(!i||!ds(i,u))continue;let d=i[u];d!==l[c]&&(l[c]=d,a=!0)}}return a&&(r.current={...l}),r.current};return xX(o,n,n)}function ro(e,t,r,o){let n=ds(t,r)?t[r]:void 0,i=o?t[o]:void 0,a=YZ({value:n,setValue:i});Yr(()=>ln(e,[r],(l,c)=>{let{value:u,setValue:d}=a.current;d&&l[r]!==c[r]&&l[r]!==u&&d(l[r])}),[e,r]),Yr(()=>{if(n!==void 0)return e.setState(r,n),Sm(e,[r],()=>{n!==void 0&&e.setState(r,n)})})}function Xy(e,t){let[r,o]=kc.useState(()=>e(t));Yr(()=>qy(r),[r]);let n=kc.useCallback(l=>Zy(r,l),[r]),i=kc.useMemo(()=>({...r,useState:n}),[r,n]),a=yt(()=>{o(l=>e({...t,...l.getState()}))});return[i,a]}var sd=s(Ye(),1),PX=s(x(),1),PAe="button";function EAe(e){return R_(e)?!0:e.tagName==="INPUT"&&!id(e)}function kAe(e,t=!1){let r=e.clientHeight,{top:o}=e.getBoundingClientRect(),n=Math.max(r*.875,r-40)*1.5,i=t?r-n+o:n+o;return e.tagName==="HTML"?i+e.scrollTop:i}function RAe(e,t=!1){let{top:r}=e.getBoundingClientRect();return t?r+e.clientHeight:r}function TX(e,t,r,o=!1){var n;if(!t||!r)return;let{renderedItems:i}=t.getState(),a=Wy(e);if(!a)return;let l=kAe(a,o),c,u;for(let d=0;d<i.length;d+=1){let f=c;if(c=r(d),!c)break;if(c===f)continue;let m=(n=Ec(t,c))==null?void 0:n.element;if(!m)continue;let g=RAe(m,o)-l,v=Math.abs(g);if(o&&g<=0||!o&&g>=0){u!==void 0&&u<v&&(c=f);break}u=v}return c}function AAe(e,t){return ci(e)?!1:Wh(t,e.target)}var PB=pr(function({store:t,rowId:r,preventScrollOnKeyDown:o=!1,moveOnKeyPress:n=!0,tabbable:i=!1,getItem:a,"aria-setsize":l,"aria-posinset":c,...u}){let d=I2();t=t||d;let f=Ma(u.id),m=(0,sd.useRef)(null),h=(0,sd.useContext)(iX),v=jh(u)&&!u.accessibleWhenDisabled,{rowId:y,baseElement:b,isActiveItem:S,ariaSetSize:w,ariaPosInSet:_,isTabbable:C}=F2(t,{rowId(O){if(r)return r;if(O&&h?.baseElement&&h.baseElement===O.baseElement)return h.id},baseElement(O){return O?.baseElement||void 0},isActiveItem(O){return!!O&&O.activeId===f},ariaSetSize(O){if(l!=null)return l;if(O&&h?.ariaSetSize&&h.baseElement===O.baseElement)return h.ariaSetSize},ariaPosInSet(O){if(c!=null)return c;if(!O||!h?.ariaPosInSet||h.baseElement!==O.baseElement)return;let M=O.renderedItems.filter(D=>D.rowId===y);return h.ariaPosInSet+M.findIndex(D=>D.id===f)},isTabbable(O){if(!O?.renderedItems.length)return!0;if(O.virtualFocus)return!1;if(i)return!0;if(O.activeId===null)return!1;let M=t?.item(O.activeId);return M?.disabled||!M?.element?!0:O.activeId===f}}),k=(0,sd.useCallback)(O=>{var M;let D={...O,id:f||O.id,rowId:y,disabled:!!v,children:(M=O.element)==null?void 0:M.textContent};return a?a(D):D},[f,y,v,a]),A=u.onFocus,R=(0,sd.useRef)(!1),I=yt(O=>{if(A?.(O),O.defaultPrevented||k2(O)||!f||!t||AAe(O,t))return;let{virtualFocus:M,baseElement:D}=t.getState();if(t.setActiveId(f),R_(O.currentTarget)&&lX(O.currentTarget),!M||!ci(O)||EAe(O.currentTarget)||!D?.isConnected)return;Hh()&&O.currentTarget.hasAttribute("data-autofocus")&&O.currentTarget.scrollIntoView({block:"nearest",inline:"nearest"}),R.current=!0,O.relatedTarget===D||Wh(t,O.relatedTarget)?cX(D):D.focus()}),B=u.onBlurCapture,E=yt(O=>{if(B?.(O),O.defaultPrevented)return;let M=t?.getState();M?.virtualFocus&&R.current&&(R.current=!1,O.preventDefault(),O.stopPropagation())}),P=u.onKeyDown,L=_o(o),j=_o(n),z=yt(O=>{if(P?.(O),O.defaultPrevented||!ci(O)||!t)return;let{currentTarget:M}=O,D=t.getState(),G=t.item(f),q=!!G?.rowId,Z=D.orientation!=="horizontal",te=D.orientation!=="vertical",ie=()=>!!(q||te||!D.baseElement||!Bi(D.baseElement)),fe={ArrowUp:(q||Z)&&t.up,ArrowRight:(q||te)&&t.next,ArrowDown:(q||Z)&&t.down,ArrowLeft:(q||te)&&t.previous,Home:()=>{if(ie())return!q||O.ctrlKey?t?.first():t?.previous(-1)},End:()=>{if(ie())return!q||O.ctrlKey?t?.last():t?.next(-1)},PageUp:()=>TX(M,t,t?.up,!0),PageDown:()=>TX(M,t,t?.down)}[O.key];if(fe){if(R_(M)){let ee=Gy(M),pe=te&&O.key==="ArrowLeft",ve=te&&O.key==="ArrowRight",Ie=Z&&O.key==="ArrowUp",et=Z&&O.key==="ArrowDown";if(ve||et){let{length:it}=uB(M);if(ee.end!==it)return}else if((pe||Ie)&&ee.start!==0)return}let X=fe();if(L(O)||X!==void 0){if(!j(O))return;O.preventDefault(),t.move(X)}}}),W=(0,sd.useMemo)(()=>({id:f,baseElement:b}),[f,b]);return u=Pc(u,O=>(0,PX.jsx)(nX.Provider,{value:W,children:O}),[W]),u={id:f,"data-active-item":S||void 0,...u,ref:to(m,u.ref),tabIndex:C?u.tabIndex:-1,onFocus:I,onBlurCapture:E,onKeyDown:z},u=CB(u),u=wB({store:t,...u,getItem:k,shouldRegisterItem:f?u.shouldRegisterItem:!1}),Mn({...u,"aria-setsize":w,"aria-posinset":_})}),Ict=bm(nr(function(t){let r=PB(t);return mr(PAe,r)}));function EB(e){return Array.isArray(e)?e:typeof e<"u"?[e]:[]}function D_(e){let t=[];for(let r of e)t.push(...r);return t}function Qy(e){return e.slice().reverse()}var Rc=s(Ye(),1),kX=s(x(),1),IAe="div";function OAe(e){return e.some(t=>!!t.rowId)}function NAe(e){let t=e.target;return t&&!Bi(t)?!1:e.key.length===1&&!e.ctrlKey&&!e.metaKey}function MAe(e){return e.key==="Shift"||e.key==="Control"||e.key==="Alt"||e.key==="Meta"}function EX(e,t,r){return yt(o=>{var n;if(t?.(o),o.defaultPrevented||o.isPropagationStopped()||!ci(o)||MAe(o)||NAe(o))return;let i=e.getState(),a=(n=Ec(e,i.activeId))==null?void 0:n.element;if(!a)return;let{view:l,...c}=o,u=r?.current;a!==u&&a.focus(),jZ(a,o.type,c)||o.preventDefault(),o.currentTarget.contains(a)&&o.stopPropagation()})}function FAe(e){return sX(D_(Qy(aX(e))))}function DAe(e){let[t,r]=(0,Rc.useState)(!1),o=(0,Rc.useCallback)(()=>r(!0),[]),n=e.useState(i=>Ec(e,i.activeId));return(0,Rc.useEffect)(()=>{let i=n?.element;t&&i&&(r(!1),i.focus({preventScroll:!0}))},[n,t]),o}var kB=pr(function({store:t,composite:r=!0,focusOnMove:o=r,moveOnKeyPress:n=!0,...i}){let a=oX();t=t||a,Nn(t,!1);let l=(0,Rc.useRef)(null),c=(0,Rc.useRef)(null),u=DAe(t),d=t.useState("moves"),[,f]=qZ(r?t.setBaseElement:null);(0,Rc.useEffect)(()=>{var E;if(!t||!d||!r||!o)return;let{activeId:P}=t.getState(),L=(E=Ec(t,P))==null?void 0:E.element;L&&gX(L)},[t,d,r,o]),Yr(()=>{if(!t||!d||!r)return;let{baseElement:E,activeId:P}=t.getState();if(!(P===null)||!E)return;let j=c.current;c.current=null,j&&Uh(j,{relatedTarget:E}),Fa(E)||E.focus()},[t,d,r]);let m=t.useState("activeId"),h=t.useState("virtualFocus");Yr(()=>{var E;if(!t||!r||!h)return;let P=c.current;if(c.current=null,!P)return;let j=((E=Ec(t,m))==null?void 0:E.element)||zh(P);j!==P&&Uh(P,{relatedTarget:j})},[t,m,h,r]);let g=EX(t,i.onKeyDownCapture,c),v=EX(t,i.onKeyUpCapture,c),y=i.onFocusCapture,b=yt(E=>{if(y?.(E),E.defaultPrevented||!t)return;let{virtualFocus:P}=t.getState();if(!P)return;let L=E.relatedTarget,j=uX(E.currentTarget);ci(E)&&j&&(E.stopPropagation(),c.current=L)}),S=i.onFocus,w=yt(E=>{if(S?.(E),E.defaultPrevented||!r||!t)return;let{relatedTarget:P}=E,{virtualFocus:L}=t.getState();L?ci(E)&&!Wh(t,P)&&queueMicrotask(u):ci(E)&&t.setActiveId(null)}),_=i.onBlurCapture,C=yt(E=>{var P;if(_?.(E),E.defaultPrevented||!t)return;let{virtualFocus:L,activeId:j}=t.getState();if(!L)return;let z=(P=Ec(t,j))==null?void 0:P.element,W=E.relatedTarget,O=Wh(t,W),M=c.current;c.current=null,ci(E)&&O?(W===z?M&&M!==W&&Uh(M,E):z?Uh(z,E):M&&Uh(M,E),E.stopPropagation()):!Wh(t,E.target)&&z&&Uh(z,E)}),k=i.onKeyDown,A=_o(n),R=yt(E=>{var P;if(k?.(E),E.nativeEvent.isComposing||E.defaultPrevented||!t||!ci(E))return;let{orientation:L,renderedItems:j,activeId:z}=t.getState(),W=Ec(t,z);if((P=W?.element)!=null&&P.isConnected)return;let O=L!=="horizontal",M=L!=="vertical",D=OAe(j);if((E.key==="ArrowLeft"||E.key==="ArrowRight"||E.key==="Home"||E.key==="End")&&Bi(E.currentTarget))return;let te={ArrowUp:(D||O)&&(()=>{if(D){let ie=FAe(j);return ie?.id}return t?.last()}),ArrowRight:(D||M)&&t.first,ArrowDown:(D||O)&&t.first,ArrowLeft:(D||M)&&t.last,Home:t.first,End:t.last,PageUp:t.first,PageDown:t.last}[E.key];if(te){let ie=te();if(ie!==void 0){if(!A(E))return;E.preventDefault(),t.move(ie)}}});i=Pc(i,E=>(0,kX.jsx)(Yy,{value:t,children:E}),[t]),i={"aria-activedescendant":t.useState(E=>{var P;if(t&&r&&E.virtualFocus)return(P=Ec(t,E.activeId))==null?void 0:P.id}),...i,ref:to(l,f,i.ref),onKeyDownCapture:g,onKeyUpCapture:v,onFocusCapture:b,onFocus:w,onBlurCapture:C,onKeyDown:R};let B=t.useState(E=>r&&(E.virtualFocus||E.activeId===null));return i=M_({focusable:B,...i}),i}),qct=nr(function(t){let r=kB(t);return mr(IAe,r)});var L_=fs(),Xct=L_.useContext,Qct=L_.useScopedContext,RB=L_.useProviderContext,RX=L_.ContextProvider,AX=L_.ScopedContextProvider;var AB=s(Ye(),1),B_=fs([RX],[AX]),tut=B_.useContext,rut=B_.useScopedContext,out=B_.useProviderContext,IX=B_.ContextProvider,D2=B_.ScopedContextProvider,nut=(0,AB.createContext)(void 0),iut=(0,AB.createContext)(void 0);var Jy=s(Ye(),1),MX=s(YP(),1),IB=s(x(),1),LAe="div";function OX(e,t){let r=setTimeout(t,e);return()=>clearTimeout(r)}function BAe(e){let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>cancelAnimationFrame(t)}function NX(...e){return e.join(", ").split(", ").reduce((t,r)=>{let o=r.endsWith("ms")?1:1e3,n=Number.parseFloat(r||"0s")*o;return n>t?n:t},0)}function OB(e,t,r){return!r&&t!==!1&&(!e||!!t)}var VAe=pr(function({store:t,alwaysVisible:r,...o}){let n=RB();t=t||n,Nn(t,!1);let i=(0,Jy.useRef)(null),a=Ma(o.id),[l,c]=(0,Jy.useState)(null),u=t.useState("open"),d=t.useState("mounted"),f=t.useState("animated"),m=t.useState("contentElement"),h=Zy(t.disclosure,"contentElement");Yr(()=>{i.current&&t?.setContentElement(i.current)},[t]),Yr(()=>{let b;return t?.setState("animated",S=>(b=S,!0)),()=>{b!==void 0&&t?.setState("animated",b)}},[t]),Yr(()=>{if(f){if(!m?.isConnected){c(null);return}return BAe(()=>{c(u?"enter":d?"leave":null)})}},[f,m,u,d]),Yr(()=>{if(!t||!f||!l||!m)return;let b=()=>t?.setState("animating",!1),S=()=>(0,MX.flushSync)(b);if(l==="leave"&&u||l==="enter"&&!u)return;if(typeof f=="number")return OX(f,S);let{transitionDuration:w,animationDuration:_,transitionDelay:C,animationDelay:k}=getComputedStyle(m),{transitionDuration:A="0",animationDuration:R="0",transitionDelay:I="0",animationDelay:B="0"}=h?getComputedStyle(h):{},E=NX(C,k,I,B),P=NX(w,_,A,R),L=E+P;if(!L){l==="enter"&&t.setState("animated",!1),b();return}let j=1e3/60,z=Math.max(L-j,0);return OX(z,S)},[t,f,m,h,u,l]),o=Pc(o,b=>(0,IB.jsx)(D2,{value:t,children:b}),[t]);let g=OB(d,o.hidden,r),v=o.style,y=(0,Jy.useMemo)(()=>g?{...v,display:"none"}:v,[g,v]);return o={id:a,"data-open":u||void 0,"data-enter":l==="enter"||void 0,"data-leave":l==="leave"||void 0,hidden:g,...o,ref:to(a?t.setContentElement:null,i,o.ref),style:y},Mn(o)}),jAe=nr(function(t){let r=VAe(t);return mr(LAe,r)}),mut=nr(function({unmountOnHide:t,...r}){let o=RB(),n=r.store||o;return Zy(n,a=>!t||a?.mounted)===!1?null:(0,IB.jsx)(jAe,{...r})});function FX(e={}){let t=qh(e.store,F_(e.disclosure,["contentElement","disclosureElement"]));let r=t?.getState(),o=pt(e.open,r?.open,e.defaultOpen,!1),n=pt(e.animated,r?.animated,!1),i={open:o,animated:n,animating:!!n&&o,mounted:o,contentElement:pt(r?.contentElement,null),disclosureElement:pt(r?.disclosureElement,null)},a=ji(i,t);return an(a,()=>ln(a,["animated","animating"],l=>{l.animated||a.setState("animating",!1)})),an(a,()=>Ky(a,["open"],()=>{a.getState().animated&&a.setState("animating",!0)})),an(a,()=>ln(a,["open","animating"],l=>{a.setState("mounted",l.open||l.animating)})),{...a,disclosure:e.disclosure,setOpen:l=>a.setState("open",l),show:()=>a.setState("open",!0),hide:()=>a.setState("open",!1),toggle:()=>a.setState("open",l=>!l),stopAnimation:()=>a.setState("animating",!1),setContentElement:l=>a.setState("contentElement",l),setDisclosureElement:l=>a.setState("disclosureElement",l)}}function DX(e,t,r){return Tc(t,[r.store,r.disclosure]),ro(e,r,"open","setOpen"),ro(e,r,"mounted","setMounted"),ro(e,r,"animated"),Object.assign(e,{disclosure:r.disclosure})}var V_=fs([IX],[D2]),xut=V_.useContext,Cut=V_.useScopedContext,LX=V_.useProviderContext,BX=V_.ContextProvider,VX=V_.ScopedContextProvider;function zAe(e){var t;let r=e.find(i=>!!i.element),o=[...e].reverse().find(i=>!!i.element),n=(t=r?.element)==null?void 0:t.parentElement;for(;n&&o?.element;){if(o&&n.contains(o.element))return n;n=n.parentElement}return nd(n).body}function HAe(e){return e?.__unstablePrivateStore}function jX(e={}){var t;e.store;let r=(t=e.store)==null?void 0:t.getState(),o=pt(e.items,r?.items,e.defaultItems,[]),n=new Map(o.map(m=>[m.id,m])),i={items:o,renderedItems:pt(r?.renderedItems,[])},a=HAe(e.store),l=ji({items:o,renderedItems:i.renderedItems},a),c=ji(i,e.store),u=m=>{let h=fB(m,g=>g.element);l.setState("renderedItems",h),c.setState("renderedItems",h)};an(c,()=>qy(l)),an(l,()=>Sm(l,["items"],m=>{c.setState("items",m.items)})),an(l,()=>Sm(l,["renderedItems"],m=>{let h=!0,g=requestAnimationFrame(()=>{let{renderedItems:S}=c.getState();m.renderedItems!==S&&u(m.renderedItems)});if(typeof IntersectionObserver!="function")return()=>cancelAnimationFrame(g);let v=()=>{if(h){h=!1;return}cancelAnimationFrame(g),g=requestAnimationFrame(()=>u(m.renderedItems))},y=zAe(m.renderedItems),b=new IntersectionObserver(v,{root:y});for(let S of m.renderedItems)S.element&&b.observe(S.element);return()=>{cancelAnimationFrame(g),b.disconnect()}}));let d=(m,h,g=!1)=>{let v;return h(b=>{let S=b.findIndex(({id:_})=>_===m.id),w=b.slice();if(S!==-1){v=b[S];let _={...v,...m};w[S]=_,n.set(m.id,_)}else w.push(m),n.set(m.id,m);return w}),()=>{h(b=>{if(!v)return g&&n.delete(m.id),b.filter(({id:_})=>_!==m.id);let S=b.findIndex(({id:_})=>_===m.id);if(S===-1)return b;let w=b.slice();return w[S]=v,n.set(m.id,v),w})}},f=m=>d(m,h=>l.setState("items",h),!0);return{...c,registerItem:f,renderItem:m=>gm(f(m),d(m,h=>l.setState("renderedItems",h))),item:m=>{if(!m)return null;let h=n.get(m);if(!h){let{items:g}=l.getState();h=g.find(v=>v.id===m),h&&n.set(m,h)}return h||null},__unstablePrivateStore:l}}function zX(e,t,r){return Tc(t,[r.store]),ro(e,r,"items","setItems"),e}var UAe={id:null};function ad(e,t){return e.find(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function GAe(e,t){return e.filter(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function HX(e,t){return e.filter(r=>r.rowId===t)}function WAe(e,t,r=!1){let o=e.findIndex(n=>n.id===t);return[...e.slice(o+1),...r?[UAe]:[],...e.slice(0,o)]}function UX(e){let t=[];for(let r of e){let o=t.find(n=>{var i;return((i=n[0])==null?void 0:i.rowId)===r.rowId});o?o.push(r):t.push([r])}return t}function GX(e){let t=0;for(let{length:r}of e)r>t&&(t=r);return t}function YAe(e){return{id:"__EMPTY_ITEM__",disabled:!0,rowId:e}}function qAe(e,t,r){let o=GX(e);for(let n of e)for(let i=0;i<o;i+=1){let a=n[i];if(!a||r&&a.disabled){let c=i===0&&r?ad(n):n[i-1];n[i]=c&&t!==c.id&&r?c:YAe(c?.rowId)}}return e}function KAe(e){let t=UX(e),r=GX(t),o=[];for(let n=0;n<r;n+=1)for(let i of t){let a=i[n];a&&o.push({...a,rowId:a.rowId?`${n}`:void 0})}return o}function WX(e={}){var t;let r=(t=e.store)==null?void 0:t.getState(),o=jX(e),n=pt(e.activeId,r?.activeId,e.defaultActiveId),i={...o.getState(),id:pt(e.id,r?.id,`id-${Math.random().toString(36).slice(2,8)}`),activeId:n,baseElement:pt(r?.baseElement,null),includesBaseElement:pt(e.includesBaseElement,r?.includesBaseElement,n===null),moves:pt(r?.moves,0),orientation:pt(e.orientation,r?.orientation,"both"),rtl:pt(e.rtl,r?.rtl,!1),virtualFocus:pt(e.virtualFocus,r?.virtualFocus,!1),focusLoop:pt(e.focusLoop,r?.focusLoop,!1),focusWrap:pt(e.focusWrap,r?.focusWrap,!1),focusShift:pt(e.focusShift,r?.focusShift,!1)},a=ji(i,o,e.store);an(a,()=>ln(a,["renderedItems","activeId"],c=>{a.setState("activeId",u=>{var d;return u!==void 0?u:(d=ad(c.renderedItems))==null?void 0:d.id})}));let l=(c="next",u={})=>{var d,f;let m=a.getState(),{skip:h=0,activeId:g=m.activeId,focusShift:v=m.focusShift,focusLoop:y=m.focusLoop,focusWrap:b=m.focusWrap,includesBaseElement:S=m.includesBaseElement,renderedItems:w=m.renderedItems,rtl:_=m.rtl}=u,C=c==="up"||c==="down",k=c==="next"||c==="down",A=k?_&&!C:!_||C,R=v&&!h,I=C?D_(qAe(UX(w),g,R)):w;if(I=A?Qy(I):I,I=C?KAe(I):I,g==null)return(d=ad(I))==null?void 0:d.id;let B=I.find(D=>D.id===g);if(!B)return(f=ad(I))==null?void 0:f.id;let E=I.some(D=>D.rowId),P=I.indexOf(B),L=I.slice(P+1),j=HX(L,B.rowId);if(h){let D=GAe(j,g),G=D.slice(h)[0]||D[D.length-1];return G?.id}let z=y&&(C?y!=="horizontal":y!=="vertical"),W=E&&b&&(C?b!=="horizontal":b!=="vertical"),O=k?(!E||C)&&z&&S:C?S:!1;if(z){let D=W&&!O?I:HX(I,B.rowId),G=WAe(D,g,O),q=ad(G,g);return q?.id}if(W){let D=ad(O?j:L,g);return O?D?.id||null:D?.id}let M=ad(j,g);return!M&&O?null:M?.id};return{...o,...a,setBaseElement:c=>a.setState("baseElement",c),setActiveId:c=>a.setState("activeId",c),move:c=>{c!==void 0&&(a.setState("activeId",c),a.setState("moves",u=>u+1))},first:()=>{var c;return(c=ad(a.getState().renderedItems))==null?void 0:c.id},last:()=>{var c;return(c=ad(Qy(a.getState().renderedItems)))==null?void 0:c.id},next:c=>(c!==void 0&&typeof c=="number"&&(c={skip:c}),l("next",c)),previous:c=>(c!==void 0&&typeof c=="number"&&(c={skip:c}),l("previous",c)),down:c=>(c!==void 0&&typeof c=="number"&&(c={skip:c}),l("down",c)),up:c=>(c!==void 0&&typeof c=="number"&&(c={skip:c}),l("up",c))}}function YX(e){return{id:Ma(e.id),...e}}function qX(e,t,r){return e=zX(e,t,r),ro(e,r,"activeId","setActiveId"),ro(e,r,"includesBaseElement"),ro(e,r,"virtualFocus"),ro(e,r,"orientation"),ro(e,r,"rtl"),ro(e,r,"focusLoop"),ro(e,r,"focusWrap"),ro(e,r,"focusShift"),e}var L2=s(Ye(),1),B2=(0,L2.createContext)(void 0),j_=fs([BX,Yy],[VX,O2]),NB=j_.useContext,$y=j_.useScopedContext,V2=j_.useProviderContext,KX=j_.ContextProvider,ZX=j_.ScopedContextProvider,j2=(0,L2.createContext)(void 0),XX=(0,L2.createContext)(!1);function QX(e={}){return FX(e)}function JX(e,t,r){return DX(e,t,r)}function $X({popover:e,...t}={}){let r=qh(t.store,F_(e,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"]));let o=r?.getState(),n=QX({...t,store:r}),i=pt(t.placement,o?.placement,"bottom"),a={...n.getState(),placement:i,currentPlacement:i,anchorElement:pt(o?.anchorElement,null),popoverElement:pt(o?.popoverElement,null),arrowElement:pt(o?.arrowElement,null),rendered:Symbol("rendered")},l=ji(a,n,r);return{...n,...l,setAnchorElement:c=>l.setState("anchorElement",c),setPopoverElement:c=>l.setState("popoverElement",c),setArrowElement:c=>l.setState("arrowElement",c),render:()=>l.setState("rendered",Symbol("rendered"))}}function eQ(e,t,r){return Tc(t,[r.popover]),ro(e,r,"placement"),JX(e,t,r)}var ZAe="div",MB=pr(function({store:t,...r}){let o=LX();return t=t||o,r={...r,ref:to(t?.setAnchorElement,r.ref)},r}),adt=nr(function(t){let r=MB(t);return mr(ZAe,r)});var tQ=s(Ye(),1),XAe="div";function rQ(e){let t=e.relatedTarget;return t?.nodeType===Node.ELEMENT_NODE?t:null}function QAe(e){let t=rQ(e);return t?xc(e.currentTarget,t):!1}var FB=Symbol("composite-hover");function JAe(e){let t=rQ(e);if(!t)return!1;do{if(ds(t,FB)&&t[FB])return!0;t=t.parentElement}while(t);return!1}var DB=pr(function({store:t,focusOnHover:r=!0,blurOnHoverEnd:o=!!r,...n}){let i=I2();t=t||i,Nn(t,!1);let a=$Z(),l=n.onMouseMove,c=_o(r),u=yt(g=>{if(l?.(g),!g.defaultPrevented&&a()&&c(g)){if(!SB(g.currentTarget)){let v=t?.getState().baseElement;v&&!Fa(v)&&v.focus()}t?.setActiveId(g.currentTarget.id)}}),d=n.onMouseLeave,f=_o(o),m=yt(g=>{var v;d?.(g),!g.defaultPrevented&&a()&&(QAe(g)||JAe(g)||c(g)&&f(g)&&(t?.setActiveId(null),(v=t?.getState().baseElement)==null||v.focus()))}),h=(0,tQ.useCallback)(g=>{g&&(g[FB]=!0)},[]);return n={...n,ref:to(h,n.ref),onMouseMove:u,onMouseLeave:m},Mn(n)}),hdt=bm(nr(function(t){let r=DB(t);return mr(XAe,r)}));var Fn=s(Ye(),1),$Ae="input";function oQ(e,t,r){if(!r)return!1;let o=e.find(n=>!n.disabled&&n.value);return o?.value===t}function nQ(e,t){return!t||e==null?!1:(e=E_(e),t.length>e.length&&t.toLowerCase().indexOf(e.toLowerCase())===0)}function eIe(e){return e.type==="input"}function tIe(e){return e==="inline"||e==="list"||e==="both"||e==="none"}function rIe(e){let t=e.find(r=>{var o;return r.disabled?!1:((o=r.element)==null?void 0:o.getAttribute("role"))!=="tab"});return t?.id}var oIe=pr(function({store:t,focusable:r=!0,autoSelect:o=!1,getAutoSelectId:n,setValueOnChange:i,showMinLength:a=0,showOnChange:l,showOnMouseDown:c,showOnClick:u=c,showOnKeyDown:d,showOnKeyPress:f=d,blurActiveItemOnClick:m,setValueOnClick:h=!0,moveOnKeyPress:g=!0,autoComplete:v="list",...y}){let b=V2();t=t||b,Nn(t,!1);let S=(0,Fn.useRef)(null),[w,_]=QZ(),C=(0,Fn.useRef)(!1),k=(0,Fn.useRef)(!1),A=t.useState(le=>le.virtualFocus&&o),R=v==="inline"||v==="both",[I,B]=(0,Fn.useState)(R);XZ(()=>{R&&B(!0)},[R]);let E=t.useState("value"),P=(0,Fn.useRef)(void 0);(0,Fn.useEffect)(()=>ln(t,["selectedValue","activeId"],(le,be)=>{P.current=be.selectedValue}),[]);let L=t.useState(le=>{var be;if(R&&I&&!(le.activeValue&&Array.isArray(le.selectedValue)&&(le.selectedValue.includes(le.activeValue)||(be=P.current)!=null&&be.includes(le.activeValue))))return le.activeValue}),j=t.useState("renderedItems"),z=t.useState("open"),W=t.useState("contentElement"),O=(0,Fn.useMemo)(()=>{if(!R||!I)return E;if(oQ(j,L,A)){if(nQ(E,L)){let be=L?.slice(E.length)||"";return E+be}return E}return L||E},[R,I,j,L,A,E]);(0,Fn.useEffect)(()=>{let le=S.current;if(!le)return;let be=()=>B(!0);return le.addEventListener("combobox-item-move",be),()=>{le.removeEventListener("combobox-item-move",be)}},[]),(0,Fn.useEffect)(()=>{if(!R||!I||!L||!oQ(j,L,A)||!nQ(E,L))return;let be=P_;return queueMicrotask(()=>{let ge=S.current;if(!ge)return;let{start:ze,end:bt}=Gy(ge),cr=E.length,Ct=L.length;A_(ge,cr,Ct),be=()=>{if(!Fa(ge))return;let{start:Jt,end:$t}=Gy(ge);Jt===cr&&$t===Ct&&A_(ge,ze,bt)}}),()=>be()},[w,R,I,L,j,A,E]);let M=(0,Fn.useRef)(null),D=yt(n),G=(0,Fn.useRef)(null);(0,Fn.useEffect)(()=>{if(!z||!W)return;let le=Wy(W);if(!le)return;M.current=le;let be=()=>{C.current=!1},ge=()=>{if(!t||!C.current)return;let{activeId:bt}=t.getState();bt!==null&&bt!==G.current&&(C.current=!1)},ze={passive:!0,capture:!0};return le.addEventListener("wheel",be,ze),le.addEventListener("touchmove",be,ze),le.addEventListener("scroll",ge,ze),()=>{le.removeEventListener("wheel",be,!0),le.removeEventListener("touchmove",be,!0),le.removeEventListener("scroll",ge,!0)}},[z,W,t]),Yr(()=>{E&&(k.current||(C.current=!0))},[E]),Yr(()=>{A!=="always"&&z||(C.current=z)},[A,z]);let q=t.useState("resetValueOnSelect");Tc(()=>{var le,be;let ge=C.current;if(!t||!z||!ge&&!q)return;let{baseElement:ze,contentElement:bt,activeId:cr}=t.getState();if(!(ze&&!Fa(ze))){if(bt?.hasAttribute("data-placing")){let Ct=new MutationObserver(_);return Ct.observe(bt,{attributeFilter:["data-placing"]}),()=>Ct.disconnect()}if(A&&ge){let Ct=D(j),Jt=Ct!==void 0?Ct:(le=rIe(j))!=null?le:t.first();G.current=Jt,t.move(Jt??null)}else{let Ct=(be=t.item(cr||t.first()))==null?void 0:be.element;Ct&&"scrollIntoView"in Ct&&Ct.scrollIntoView({block:"nearest",inline:"nearest"})}}},[t,z,w,E,A,q,D,j]),(0,Fn.useEffect)(()=>{if(!R)return;let le=S.current;if(!le)return;let be=[le,W].filter(ze=>!!ze),ge=ze=>{be.every(bt=>R2(ze,bt))&&t?.setValue(O)};for(let ze of be)ze.addEventListener("focusout",ge);return()=>{for(let ze of be)ze.removeEventListener("focusout",ge)}},[R,W,t,O]);let Z=le=>le.currentTarget.value.length>=a,te=y.onChange,ie=_o(l??Z),Se=_o(i??!t.tag),fe=yt(le=>{if(te?.(le),le.defaultPrevented||!t)return;let be=le.currentTarget,{value:ge,selectionStart:ze,selectionEnd:bt}=be,cr=le.nativeEvent;if(C.current=!0,eIe(cr)&&(cr.isComposing&&(C.current=!1,k.current=!0),R)){let Ct=cr.inputType==="insertText"||cr.inputType==="insertCompositionText",Jt=ze===ge.length;B(Ct&&Jt)}if(Se(le)){let Ct=ge===t.getState().value;t.setValue(ge),queueMicrotask(()=>{A_(be,ze,bt)}),R&&A&&Ct&&_()}ie(le)&&t.show(),(!A||!C.current)&&t.setActiveId(null)}),X=y.onCompositionEnd,ee=yt(le=>{C.current=!0,k.current=!1,X?.(le),!le.defaultPrevented&&A&&_()}),pe=y.onMouseDown,ve=_o(m??(()=>!!t?.getState().includesBaseElement)),Ie=_o(h),et=_o(u??Z),it=yt(le=>{pe?.(le),!le.defaultPrevented&&(le.button||le.ctrlKey||t&&(ve(le)&&t.setActiveId(null),Ie(le)&&t.setValue(O),et(le)&&ym(le.currentTarget,"mouseup",t.show)))}),ne=y.onKeyDown,$=_o(f??Z),ue=yt(le=>{if(ne?.(le),le.repeat||(C.current=!1),le.defaultPrevented||le.ctrlKey||le.altKey||le.shiftKey||le.metaKey||!t)return;let{open:be}=t.getState();be||(le.key==="ArrowUp"||le.key==="ArrowDown")&&$(le)&&(le.preventDefault(),t.show())}),oe=y.onBlur,me=yt(le=>{C.current=!1,oe?.(le),le.defaultPrevented}),Ne=Ma(y.id),Oe=tIe(v)?v:void 0,De=t.useState(le=>le.activeId===null);return y={id:Ne,role:"combobox","aria-autocomplete":Oe,"aria-haspopup":dB(W,"listbox"),"aria-expanded":z,"aria-controls":W?.id,"data-active-item":De||void 0,value:O,...y,ref:to(S,y.ref),onChange:fe,onCompositionEnd:ee,onMouseDown:it,onKeyDown:ue,onBlur:me},y=kB({store:t,focusable:r,...y,moveOnKeyPress:le=>aB(g,le)?!1:(R&&B(!0),!0)}),y=MB({store:t,...y}),{autoComplete:"off",...y}}),z2=nr(function(t){let r=oIe(t);return mr($Ae,r)});var H2=s(Ye(),1),LB=s(x(),1),nIe="div";function iIe(e,t){if(t!=null)return e==null?!1:Array.isArray(e)?e.includes(t):e===t}function sIe(e){var t;return(t={menu:"menuitem",listbox:"option",tree:"treeitem"}[e])!=null?t:"option"}var iQ=pr(function({store:t,value:r,hideOnClick:o,setValueOnClick:n,selectValueOnClick:i=!0,resetValueOnSelect:a,focusOnHover:l=!1,moveOnKeyPress:c=!0,getItem:u,...d}){var f;let m=$y();t=t||m,Nn(t,!1);let{resetValueOnSelectState:h,multiSelectable:g,selected:v}=F2(t,{resetValueOnSelectState:"resetValueOnSelect",multiSelectable(E){return Array.isArray(E.selectedValue)},selected(E){return iIe(E.selectedValue,r)}}),y=(0,H2.useCallback)(E=>{let P={...E,value:r};return u?u(P):P},[r,u]);n=n??!g,o=o??(r!=null&&!g);let b=d.onClick,S=_o(n),w=_o(i),_=_o((f=a??h)!=null?f:g),C=_o(o),k=yt(E=>{b?.(E),!E.defaultPrevented&&(VZ(E)||BZ(E)||(r!=null&&(w(E)&&(_(E)&&t?.resetValue(),t?.setSelectedValue(P=>Array.isArray(P)?P.includes(r)?P.filter(L=>L!==r):[...P,r]:r)),S(E)&&t?.setValue(r)),C(E)&&t?.hide()))}),A=d.onKeyDown,R=yt(E=>{if(A?.(E),E.defaultPrevented)return;let P=t?.getState().baseElement;if(!P||Fa(P))return;(E.key.length===1||E.key==="Backspace"||E.key==="Delete")&&(queueMicrotask(()=>P.focus()),Bi(P)&&t?.setValue(P.value))});g&&v!=null&&(d={"aria-selected":v,...d}),d=Pc(d,E=>(0,LB.jsx)(j2.Provider,{value:r,children:(0,LB.jsx)(XX.Provider,{value:v??!1,children:E})}),[r,v]);let I=(0,H2.useContext)(B2);d={role:sIe(I),children:r,...d,onClick:k,onKeyDown:R};let B=_o(c);return d=PB({store:t,...d,getItem:y,moveOnKeyPress:E=>{if(!B(E))return!1;let P=new Event("combobox-item-move"),L=t?.getState().baseElement;return L?.dispatchEvent(P),!0}}),d=DB({store:t,focusOnHover:l,...d}),d}),z_=bm(nr(function(t){let r=iQ(t);return mr(nIe,r)}));var U2=s(Ye(),1),aQ=s(x(),1),aIe="span";function sQ(e){return E_(e).toLowerCase()}function lIe(e,t){let r=[];for(let o of t){let n=0,i=o.length;for(;e.indexOf(o,n)!==-1;){let a=e.indexOf(o,n);a!==-1&&r.push([a,i]),n=a+1}}return r}function cIe(e){return e.filter(([t,r],o,n)=>!n.some(([i,a],l)=>l!==o&&i<=t&&i+a>=t+r))}function uIe(e){return e.sort(([t],[r])=>t-r)}function dIe(e,t){if(!e||!t)return e;let r=EB(t).filter(Boolean).map(sQ),o=[],n=(c,u=!1)=>(0,aQ.jsx)("span",{"data-autocomplete-value":u?"":void 0,"data-user-value":u?void 0:"",children:c},o.length),i=uIe(cIe(lIe(sQ(e),new Set(r))));if(!i.length)return o.push(n(e,!0)),o;let[a]=i[0];return[e.slice(0,a),...i.flatMap(([c,u],d)=>{var f;let m=e.slice(c,c+u),h=(f=i[d+1])==null?void 0:f[0],g=e.slice(c+u,h);return[m,g]})].forEach((c,u)=>{c&&o.push(n(c,u%2===0))}),o}var fIe=pr(function({store:t,value:r,userValue:o,...n}){let i=$y();t=t||i;let a=(0,U2.useContext)(j2),l=r??a,c=Zy(t,d=>o??d?.value);return n={children:(0,U2.useMemo)(()=>{if(l)return c?dIe(l,c):l},[l,c]),...n},Mn(n)}),G2=nr(function(t){let r=fIe(t);return mr(aIe,r)});var mIe="label",pIe=pr(function({store:t,...r}){let o=V2();return t=t||o,Nn(t,!1),r={htmlFor:t.useState(i=>{var a;return(a=i.baseElement)==null?void 0:a.id}),...r},Mn(r)}),W2=bm(nr(function(t){let r=pIe(t);return mr(mIe,r)}));var Y2=s(Ye(),1),BB=s(x(),1),hIe="div",lQ=pr(function({store:t,alwaysVisible:r,...o}){let n=$y(!0),i=NB();t=t||i;let a=!!t&&t===n;Nn(t,!1);let l=(0,Y2.useRef)(null),c=Ma(o.id),u=t.useState("mounted"),d=OB(u,o.hidden,r),f=d?{...o.style,display:"none"}:o.style,m=t.useState(_=>Array.isArray(_.selectedValue)),h=ZZ(l,"role",o.role),v=(h==="listbox"||h==="tree"||h==="grid")&&m||void 0,[y,b]=(0,Y2.useState)(!1),S=t.useState("contentElement");Yr(()=>{if(!u)return;let _=l.current;if(!_||S!==_)return;let C=()=>{b(!!_.querySelector("[role='listbox']"))},k=new MutationObserver(C);return k.observe(_,{subtree:!0,childList:!0,attributeFilter:["role"]}),C(),()=>k.disconnect()},[u,S]),y||(o={role:"listbox","aria-multiselectable":v,...o}),o=Pc(o,_=>(0,BB.jsx)(ZX,{value:t,children:(0,BB.jsx)(B2.Provider,{value:h,children:_})}),[t,h]);let w=c&&(!n||!a)?t.setContentElement:null;return o={id:c,hidden:d,...o,ref:to(w,l,o.ref),style:f},Mn(o)}),H_=nr(function(t){let r=lQ(t);return mr(hIe,r)});var VB=s(Ye(),1),aft=(0,VB.createContext)(null),lft=(0,VB.createContext)(null),U_=fs([Yy],[O2]),cQ=U_.useContext,cft=U_.useScopedContext,uft=U_.useProviderContext,dft=U_.ContextProvider,fft=U_.ScopedContextProvider;var gIe=Hh()&&mB();function uQ({tag:e,...t}={}){let r=qh(t.store,TB(e,["value","rtl"]));let o=e?.getState(),n=r?.getState(),i=pt(t.activeId,n?.activeId,t.defaultActiveId,null),a=WX({...t,activeId:i,includesBaseElement:pt(t.includesBaseElement,n?.includesBaseElement,!0),orientation:pt(t.orientation,n?.orientation,"vertical"),focusLoop:pt(t.focusLoop,n?.focusLoop,!0),focusWrap:pt(t.focusWrap,n?.focusWrap,!0),virtualFocus:pt(t.virtualFocus,n?.virtualFocus,!0)}),l=$X({...t,placement:pt(t.placement,n?.placement,"bottom-start")}),c=pt(t.value,n?.value,t.defaultValue,""),u=pt(t.selectedValue,n?.selectedValue,o?.values,t.defaultSelectedValue,""),d=Array.isArray(u),f={...a.getState(),...l.getState(),value:c,selectedValue:u,resetValueOnSelect:pt(t.resetValueOnSelect,n?.resetValueOnSelect,d),resetValueOnHide:pt(t.resetValueOnHide,n?.resetValueOnHide,d&&!e),activeValue:n?.activeValue},m=ji(f,a,l,r);return gIe&&an(m,()=>ln(m,["virtualFocus"],()=>{m.setState("virtualFocus",!1)})),an(m,()=>{if(e)return gm(ln(m,["selectedValue"],h=>{Array.isArray(h.selectedValue)&&e.setValues(h.selectedValue)}),ln(e,["values"],h=>{m.setState("selectedValue",h.values)}))}),an(m,()=>ln(m,["resetValueOnHide","mounted"],h=>{h.resetValueOnHide&&(h.mounted||m.setState("value",c))})),an(m,()=>ln(m,["open"],h=>{h.open||(m.setState("activeId",i),m.setState("moves",0))})),an(m,()=>ln(m,["moves","activeId"],(h,g)=>{h.moves===g.moves&&m.setState("activeValue",void 0)})),an(m,()=>Sm(m,["moves","renderedItems"],(h,g)=>{if(h.moves===g.moves)return;let{activeId:v}=m.getState(),y=a.item(v);m.setState("activeValue",y?.value)})),{...l,...a,...m,tag:e,setValue:h=>m.setState("value",h),resetValue:()=>m.setState("value",f.value),setSelectedValue:h=>m.setState("selectedValue",h)}}function yIe(e){let t=cQ();return e={...e,tag:e.tag!==void 0?e.tag:t},YX(e)}function bIe(e,t,r){return Tc(t,[r.tag]),ro(e,r,"value","setValue"),ro(e,r,"selectedValue","setSelectedValue"),ro(e,r,"resetValueOnHide"),ro(e,r,"resetValueOnSelect"),Object.assign(qX(eQ(e,t,r),t,r),{tag:r.tag})}function jB(e={}){e=yIe(e);let[t,r]=Xy(uQ,e);return bIe(t,r,e)}var dQ=s(x(),1);function q2(e={}){let t=jB(e);return(0,dQ.jsx)(KX,{value:t,children:e.children})}var hQ=s(c_(),1);var gQ=s(we(),1),_m=s(N(),1),Kh=s(V(),1),Ac=s(H(),1);var SIe=[],G_=(e,t)=>e.singleSelection?t?.value:Array.isArray(t?.value)?t.value:!Array.isArray(t?.value)&&t?.value?[t.value]:SIe;var W_=s(V(),1),_Ie=[];function cn({elements:e,getElements:t}){let r=Array.isArray(e)&&e.length>0?e:_Ie,[o,n]=(0,W_.useState)(r),[i,a]=(0,W_.useState)(!1);return(0,W_.useEffect)(()=>{if(!t){n(r);return}let l=!1;return a(!0),t().then(c=>{if(!l){let u=Array.isArray(c)&&c.length>0?c:r;n(u)}}).catch(()=>{l||n(r)}).finally(()=>{l||a(!1)}),()=>{l=!0}},[t,r]),{elements:o,isLoading:i}}var At=s(x(),1);function fQ(e=""){return(0,hQ.default)(e.trim().toLowerCase())}var mQ=(e,t,r)=>e.singleSelection?r:Array.isArray(t?.value)?t.value.includes(r)?t.value.filter(o=>o!==r):[...t.value,r]:[r];function pQ(e,t){return`${e}-${t}`}var vQ=({selected:e})=>(0,At.jsx)("span",{className:K("dataviews-filters__search-widget-listitem-multi-selection",{"is-selected":e}),children:e&&(0,At.jsx)(Ac.Icon,{icon:Rn})}),yQ=({selected:e})=>(0,At.jsx)("span",{className:K("dataviews-filters__search-widget-listitem-single-selection",{"is-selected":e})});function bQ({view:e,filter:t,onChangeView:r}){let o=(0,gQ.useInstanceId)(bQ,"dataviews-filter-list-box"),[n,i]=(0,Kh.useState)(t.operators?.length===1?void 0:null),a=e.filters?.find(c=>c.field===t.field),l=G_(t,a);return(0,At.jsx)(Ac.Composite,{virtualFocus:!0,focusLoop:!0,activeId:n,setActiveId:i,role:"listbox",className:"dataviews-filters__search-widget-listbox","aria-label":(0,_m.sprintf)((0,_m.__)("List of: %1$s"),t.name),onFocusVisible:()=>{!n&&t.elements.length&&i(pQ(o,t.elements[0].value))},render:(0,At.jsx)(Ac.Composite.Typeahead,{}),children:t.elements.map(c=>(0,At.jsxs)(Ac.Composite.Hover,{render:(0,At.jsx)(Ac.Composite.Item,{id:pQ(o,c.value),render:(0,At.jsx)("div",{"aria-label":c.label,role:"option",className:"dataviews-filters__search-widget-listitem"}),onClick:()=>{let u=a?[...(e.filters??[]).map(d=>d.field===t.field?{...d,operator:a.operator||t.operators[0],value:mQ(t,a,c.value)}:d)]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:mQ(t,a,c.value)}];r({...e,page:1,filters:u})}}),children:[t.singleSelection&&(0,At.jsx)(yQ,{selected:l===c.value}),!t.singleSelection&&(0,At.jsx)(vQ,{selected:l.includes(c.value)}),(0,At.jsx)("span",{className:"dataviews-filters__search-widget-listitem-value",title:c.label,children:c.label})]},c.value))})}function xIe({view:e,filter:t,onChangeView:r}){let[o,n]=(0,Kh.useState)(""),i=(0,Kh.useDeferredValue)(o),a=e.filters?.find(u=>u.field===t.field),l=G_(t,a),c=(0,Kh.useMemo)(()=>{let u=fQ(i);return t.elements.filter(d=>fQ(d.label).includes(u))},[t.elements,i]);return(0,At.jsxs)(q2,{selectedValue:l,setSelectedValue:u=>{let d=a?[...(e.filters??[]).map(f=>f.field===t.field?{...f,operator:a.operator||t.operators[0],value:u}:f)]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:u}];r({...e,page:1,filters:d})},setValue:n,children:[(0,At.jsxs)("div",{className:"dataviews-filters__search-widget-filter-combobox__wrapper",children:[(0,At.jsx)(Kt,{render:(0,At.jsx)(W2,{}),children:(0,_m.__)("Search items")}),(0,At.jsx)(z2,{autoSelect:"always",placeholder:(0,_m.__)("Search"),className:"dataviews-filters__search-widget-filter-combobox__input"}),(0,At.jsx)("div",{className:"dataviews-filters__search-widget-filter-combobox__icon",children:(0,At.jsx)(Ac.Icon,{icon:oF})})]}),(0,At.jsxs)(H_,{className:"dataviews-filters__search-widget-filter-combobox-list",alwaysVisible:!0,children:[c.map(u=>(0,At.jsxs)(z_,{resetValueOnSelect:!1,value:u.value,className:"dataviews-filters__search-widget-listitem",hideOnClick:!1,setValueOnClick:!1,focusOnHover:!0,children:[t.singleSelection&&(0,At.jsx)(yQ,{selected:l===u.value}),!t.singleSelection&&(0,At.jsx)(vQ,{selected:l.includes(u.value)}),(0,At.jsxs)("span",{className:"dataviews-filters__search-widget-listitem-value",title:u.label,children:[(0,At.jsx)(G2,{className:"dataviews-filters__search-widget-filter-combobox-item-value",value:u.label}),!!u.description&&(0,At.jsx)("span",{className:"dataviews-filters__search-widget-listitem-description",children:u.description})]})]},u.value)),!c.length&&(0,At.jsx)("p",{children:(0,_m.__)("No results found")})]})]})}function wQ(e){let{elements:t,isLoading:r}=cn({elements:e.filter.elements,getElements:e.filter.getElements});if(r)return(0,At.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,At.jsx)(Ac.Spinner,{})});if(t.length===0)return(0,At.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,_m.__)("No elements found")});let o=t.length>10?xIe:bQ;return(0,At.jsx)(o,{...e,filter:{...e.filter,elements:t}})}var _Q=s(K2(),1),xQ=s(we(),1),zB=s(V(),1),CQ=s(H(),1);var HB=s(x(),1);function TQ({filter:e,view:t,onChangeView:r,fields:o}){let n=t.filters?.find(u=>u.field===e.field),i=G_(e,n),a=(0,zB.useMemo)(()=>{let u=o.find(d=>d.id===e.field);return u&&{...u,isValid:{},isDisabled:()=>!1,isVisible:()=>!0,getValue:({item:d})=>d[u.id],setValue:({value:d})=>({[u.id]:d})}},[o,e.field]),l=(0,zB.useMemo)(()=>(t.filters??[]).reduce((u,d)=>(u[d.field]=d.value,u),{}),[t.filters]),c=(0,xQ.useEvent)(u=>{if(!a||!n)return;let d=a.getValue({item:u});(0,_Q.default)(d,i)||r({...t,filters:(t.filters??[]).map(f=>f.field===e.field?{...f,operator:n.operator||e.operators[0],value:d===""?void 0:d}:f)})});return!a||!a.Edit||!n?null:(0,HB.jsx)(CQ.Flex,{className:"dataviews-filters__user-input-widget",gap:2.5,direction:"column",children:(0,HB.jsx)(a.Edit,{hideLabelFromVision:!0,data:l,field:a,operator:n.operator,onChange:c})})}var CIe=Math.pow(10,8)*24*60*60*1e3,rmt=-CIe,Z2=6048e5,PQ=864e5,UB=6e4,GB=36e5;var TIe=3600;var EQ=TIe*24,omt=EQ*7,PIe=EQ*365.2425,EIe=PIe/12,nmt=EIe*3,WB=Symbol.for("constructDateFrom");function xo(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&WB in e?e[WB](t):e instanceof Date?new e.constructor(t):new Date(t)}function kt(e,t){return xo(t||e,e)}function X2(e,t,r){let o=kt(e,r?.in);return isNaN(t)?xo(r?.in||e,NaN):(t&&o.setDate(o.getDate()+t),o)}function Q2(e,t,r){let o=kt(e,r?.in);if(isNaN(t))return xo(r?.in||e,NaN);if(!t)return o;let n=o.getDate(),i=xo(r?.in||e,o.getTime());i.setMonth(o.getMonth()+t+1,0);let a=i.getDate();return n>=a?i:(o.setFullYear(i.getFullYear(),i.getMonth(),n),o)}var kIe={};function xm(){return kIe}function ld(e,t){let r=xm(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=kt(e,t?.in),i=n.getDay(),a=(i<o?7:0)+i-o;return n.setDate(n.getDate()-a),n.setHours(0,0,0,0),n}function Zh(e,t){return ld(e,{...t,weekStartsOn:1})}function J2(e,t){let r=kt(e,t?.in),o=r.getFullYear(),n=xo(r,0);n.setFullYear(o+1,0,4),n.setHours(0,0,0,0);let i=Zh(n),a=xo(r,0);a.setFullYear(o,0,4),a.setHours(0,0,0,0);let l=Zh(a);return r.getTime()>=i.getTime()?o+1:r.getTime()>=l.getTime()?o:o-1}function YB(e){let t=kt(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function kQ(e,...t){let r=xo.bind(null,e||t.find(o=>typeof o=="object"));return t.map(r)}function qB(e,t){let r=kt(e,t?.in);return r.setHours(0,0,0,0),r}function RQ(e,t,r){let[o,n]=kQ(r?.in,e,t),i=qB(o),a=qB(n),l=+i-YB(i),c=+a-YB(a);return Math.round((l-c)/PQ)}function AQ(e,t){let r=J2(e,t),o=xo(t?.in||e,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),Zh(o)}function IQ(e,t,r){return X2(e,t*7,r)}function OQ(e,t,r){return Q2(e,t*12,r)}function NQ(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function cd(e){return!(!NQ(e)&&typeof e!="number"||isNaN(+kt(e)))}function MQ(e,t){let r=kt(e,t?.in),o=r.getMonth();return r.setFullYear(r.getFullYear(),o+1,0),r.setHours(23,59,59,999),r}function Y_(e,t){let r=kt(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function $2(e,t){let r=kt(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}var RIe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},FQ=(e,t,r)=>{let o,n=RIe[e];return typeof n=="string"?o=n:t===1?o=n.one:o=n.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+o:o+" ago":o};function ek(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var AIe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},IIe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},OIe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},DQ={date:ek({formats:AIe,defaultWidth:"full"}),time:ek({formats:IIe,defaultWidth:"full"}),dateTime:ek({formats:OIe,defaultWidth:"full"})};var NIe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},LQ=(e,t,r,o)=>NIe[e];function eb(e){return(t,r)=>{let o=r?.context?String(r.context):"standalone",n;if(o==="formatting"&&e.formattingValues){let a=e.defaultFormattingWidth||e.defaultWidth,l=r?.width?String(r.width):a;n=e.formattingValues[l]||e.formattingValues[a]}else{let a=e.defaultWidth,l=r?.width?String(r.width):e.defaultWidth;n=e.values[l]||e.values[a]}let i=e.argumentCallback?e.argumentCallback(t):t;return n[i]}}var MIe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},FIe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},DIe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},LIe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},BIe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},VIe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},jIe=(e,t)=>{let r=Number(e),o=r%100;if(o>20||o<10)switch(o%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},BQ={ordinalNumber:jIe,era:eb({values:MIe,defaultWidth:"wide"}),quarter:eb({values:FIe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:eb({values:DIe,defaultWidth:"wide"}),day:eb({values:LIe,defaultWidth:"wide"}),dayPeriod:eb({values:BIe,defaultWidth:"wide",formattingValues:VIe,defaultFormattingWidth:"wide"})};function tb(e){return(t,r={})=>{let o=r.width,n=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],i=t.match(n);if(!i)return null;let a=i[0],l=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?HIe(l,f=>f.test(a)):zIe(l,f=>f.test(a)),u;u=e.valueCallback?e.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;let d=t.slice(a.length);return{value:u,rest:d}}}function zIe(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function HIe(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function VQ(e){return(t,r={})=>{let o=t.match(e.matchPattern);if(!o)return null;let n=o[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=r.valueCallback?r.valueCallback(a):a;let l=t.slice(n.length);return{value:a,rest:l}}}var UIe=/^(\d+)(th|st|nd|rd)?/i,GIe=/\d+/i,WIe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},YIe={any:[/^b/i,/^(a|c)/i]},qIe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},KIe={any:[/1/i,/2/i,/3/i,/4/i]},ZIe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},XIe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},QIe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},JIe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},$Ie={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},e5e={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},jQ={ordinalNumber:VQ({matchPattern:UIe,parsePattern:GIe,valueCallback:e=>parseInt(e,10)}),era:tb({matchPatterns:WIe,defaultMatchWidth:"wide",parsePatterns:YIe,defaultParseWidth:"any"}),quarter:tb({matchPatterns:qIe,defaultMatchWidth:"wide",parsePatterns:KIe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:tb({matchPatterns:ZIe,defaultMatchWidth:"wide",parsePatterns:XIe,defaultParseWidth:"any"}),day:tb({matchPatterns:QIe,defaultMatchWidth:"wide",parsePatterns:JIe,defaultParseWidth:"any"}),dayPeriod:tb({matchPatterns:$Ie,defaultMatchWidth:"any",parsePatterns:e5e,defaultParseWidth:"any"})};var KB={code:"en-US",formatDistance:FQ,formatLong:DQ,formatRelative:LQ,localize:BQ,match:jQ,options:{weekStartsOn:0,firstWeekContainsDate:1}};function zQ(e,t){let r=kt(e,t?.in);return RQ(r,$2(r))+1}function HQ(e,t){let r=kt(e,t?.in),o=+Zh(r)-+AQ(r);return Math.round(o/Z2)+1}function tk(e,t){let r=kt(e,t?.in),o=r.getFullYear(),n=xm(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=xo(t?.in||e,0);a.setFullYear(o+1,0,i),a.setHours(0,0,0,0);let l=ld(a,t),c=xo(t?.in||e,0);c.setFullYear(o,0,i),c.setHours(0,0,0,0);let u=ld(c,t);return+r>=+l?o+1:+r>=+u?o:o-1}function UQ(e,t){let r=xm(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=tk(e,t),i=xo(t?.in||e,0);return i.setFullYear(n,0,o),i.setHours(0,0,0,0),ld(i,t)}function GQ(e,t){let r=kt(e,t?.in),o=+ld(r,t)-+UQ(r,t);return Math.round(o/Z2)+1}function Dt(e,t){let r=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return r+o}var ud={y(e,t){let r=e.getFullYear(),o=r>0?r:1-r;return Dt(t==="yy"?o%100:o,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):Dt(r+1,2)},d(e,t){return Dt(e.getDate(),t.length)},a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return r==="am"?"a.m.":"p.m."}},h(e,t){return Dt(e.getHours()%12||12,t.length)},H(e,t){return Dt(e.getHours(),t.length)},m(e,t){return Dt(e.getMinutes(),t.length)},s(e,t){return Dt(e.getSeconds(),t.length)},S(e,t){let r=t.length,o=e.getMilliseconds(),n=Math.trunc(o*Math.pow(10,r-3));return Dt(n,t.length)}};var rb={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ZB={G:function(e,t,r){let o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(o,{width:"abbreviated"});case"GGGGG":return r.era(o,{width:"narrow"});default:return r.era(o,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){let o=e.getFullYear(),n=o>0?o:1-o;return r.ordinalNumber(n,{unit:"year"})}return ud.y(e,t)},Y:function(e,t,r,o){let n=tk(e,o),i=n>0?n:1-n;if(t==="YY"){let a=i%100;return Dt(a,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):Dt(i,t.length)},R:function(e,t){let r=J2(e);return Dt(r,t.length)},u:function(e,t){let r=e.getFullYear();return Dt(r,t.length)},Q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return Dt(o,2);case"Qo":return r.ordinalNumber(o,{unit:"quarter"});case"QQQ":return r.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(o,{width:"narrow",context:"formatting"});default:return r.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return Dt(o,2);case"qo":return r.ordinalNumber(o,{unit:"quarter"});case"qqq":return r.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(o,{width:"narrow",context:"standalone"});default:return r.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,r){let o=e.getMonth();switch(t){case"M":case"MM":return ud.M(e,t);case"Mo":return r.ordinalNumber(o+1,{unit:"month"});case"MMM":return r.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(o,{width:"narrow",context:"formatting"});default:return r.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,r){let o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return Dt(o+1,2);case"Lo":return r.ordinalNumber(o+1,{unit:"month"});case"LLL":return r.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(o,{width:"narrow",context:"standalone"});default:return r.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,r,o){let n=GQ(e,o);return t==="wo"?r.ordinalNumber(n,{unit:"week"}):Dt(n,t.length)},I:function(e,t,r){let o=HQ(e);return t==="Io"?r.ordinalNumber(o,{unit:"week"}):Dt(o,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):ud.d(e,t)},D:function(e,t,r){let o=zQ(e);return t==="Do"?r.ordinalNumber(o,{unit:"dayOfYear"}):Dt(o,t.length)},E:function(e,t,r){let o=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,r,o){let n=e.getDay(),i=(n-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Dt(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,r,o){let n=e.getDay(),i=(n-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Dt(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(n,{width:"narrow",context:"standalone"});case"cccccc":return r.day(n,{width:"short",context:"standalone"});default:return r.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,r){let o=e.getDay(),n=o===0?7:o;switch(t){case"i":return String(n);case"ii":return Dt(n,t.length);case"io":return r.ordinalNumber(n,{unit:"day"});case"iii":return r.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,r){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){let o=e.getHours(),n;switch(o===12?n=rb.noon:o===0?n=rb.midnight:n=o/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){let o=e.getHours(),n;switch(o>=17?n=rb.evening:o>=12?n=rb.afternoon:o>=4?n=rb.morning:n=rb.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let o=e.getHours()%12;return o===0&&(o=12),r.ordinalNumber(o,{unit:"hour"})}return ud.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):ud.H(e,t)},K:function(e,t,r){let o=e.getHours()%12;return t==="Ko"?r.ordinalNumber(o,{unit:"hour"}):Dt(o,t.length)},k:function(e,t,r){let o=e.getHours();return o===0&&(o=24),t==="ko"?r.ordinalNumber(o,{unit:"hour"}):Dt(o,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):ud.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):ud.s(e,t)},S:function(e,t){return ud.S(e,t)},X:function(e,t,r){let o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return YQ(o);case"XXXX":case"XX":return Xh(o);default:return Xh(o,":")}},x:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"x":return YQ(o);case"xxxx":case"xx":return Xh(o);default:return Xh(o,":")}},O:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+WQ(o,":");default:return"GMT"+Xh(o,":")}},z:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+WQ(o,":");default:return"GMT"+Xh(o,":")}},t:function(e,t,r){let o=Math.trunc(+e/1e3);return Dt(o,t.length)},T:function(e,t,r){return Dt(+e,t.length)}};function WQ(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=Math.trunc(o/60),i=o%60;return i===0?r+String(n):r+String(n)+t+Dt(i,2)}function YQ(e,t){return e%60===0?(e>0?"-":"+")+Dt(Math.abs(e)/60,2):Xh(e,t)}function Xh(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=Dt(Math.trunc(o/60),2),i=Dt(o%60,2);return r+n+t+i}var qQ=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},KQ=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},t5e=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],o=r[1],n=r[2];if(!n)return qQ(e,t);let i;switch(o){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",qQ(o,t)).replace("{{time}}",KQ(n,t))},ZQ={p:KQ,P:t5e};var r5e=/^D+$/,o5e=/^Y+$/,n5e=["D","DD","YY","YYYY"];function XQ(e){return r5e.test(e)}function QQ(e){return o5e.test(e)}function JQ(e,t,r){let o=i5e(e,t,r);if(console.warn(o),n5e.includes(e))throw new RangeError(o)}function i5e(e,t,r){let o=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var s5e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,a5e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,l5e=/^'([^]*?)'?$/,c5e=/''/g,u5e=/[a-zA-Z]/;function XB(e,t,r){let o=xm(),n=r?.locale??o.locale??KB,i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,l=kt(e,r?.in);if(!cd(l))throw new RangeError("Invalid time value");let c=t.match(a5e).map(d=>{let f=d[0];if(f==="p"||f==="P"){let m=ZQ[f];return m(d,n.formatLong)}return d}).join("").match(s5e).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:d5e(d)};if(ZB[f])return{isToken:!0,value:d};if(f.match(u5e))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:d}});n.localize.preprocessor&&(c=n.localize.preprocessor(l,c));let u={firstWeekContainsDate:i,weekStartsOn:a,locale:n};return c.map(d=>{if(!d.isToken)return d.value;let f=d.value;(!r?.useAdditionalWeekYearTokens&&QQ(f)||!r?.useAdditionalDayOfYearTokens&&XQ(f))&&JQ(f,t,String(e));let m=ZB[f[0]];return m(l,f,n.localize,u)}).join("")}function d5e(e){let t=e.match(l5e);return t?t[1].replace(c5e,"'"):e}function Qh(e,t,r){return X2(e,-t,r)}function $Q(e,t){let r=()=>xo(t?.in,NaN),o=t?.additionalDigits??2,n=h5e(e),i;if(n.date){let u=g5e(n.date,o);i=v5e(u.restDateString,u.year)}if(!i||isNaN(+i))return r();let a=+i,l=0,c;if(n.time&&(l=y5e(n.time),isNaN(l)))return r();if(n.timezone){if(c=b5e(n.timezone),isNaN(c))return r()}else{let u=new Date(a+l),d=kt(0,t?.in);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return kt(a+l+c,t?.in)}var rk={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},f5e=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,m5e=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,p5e=/^([+-])(\d{2})(?::?(\d{2}))?$/;function h5e(e){let t={},r=e.split(rk.dateTimeDelimiter),o;if(r.length>2)return t;if(/:/.test(r[0])?o=r[0]:(t.date=r[0],o=r[1],rk.timeZoneDelimiter.test(t.date)&&(t.date=e.split(rk.timeZoneDelimiter)[0],o=e.substr(t.date.length,e.length))),o){let n=rk.timezone.exec(o);n?(t.time=o.replace(n[1],""),t.timezone=n[1]):t.time=o}return t}function g5e(e,t){let r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),o=e.match(r);if(!o)return{year:NaN,restDateString:""};let n=o[1]?parseInt(o[1]):null,i=o[2]?parseInt(o[2]):null;return{year:i===null?n:i*100,restDateString:e.slice((o[1]||o[2]).length)}}function v5e(e,t){if(t===null)return new Date(NaN);let r=e.match(f5e);if(!r)return new Date(NaN);let o=!!r[4],n=q_(r[1]),i=q_(r[2])-1,a=q_(r[3]),l=q_(r[4]),c=q_(r[5])-1;if(o)return C5e(t,l,c)?w5e(t,l,c):new Date(NaN);{let u=new Date(0);return!_5e(t,i,a)||!x5e(t,n)?new Date(NaN):(u.setUTCFullYear(t,i,Math.max(n,a)),u)}}function q_(e){return e?parseInt(e):1}function y5e(e){let t=e.match(m5e);if(!t)return NaN;let r=QB(t[1]),o=QB(t[2]),n=QB(t[3]);return T5e(r,o,n)?r*GB+o*UB+n*1e3:NaN}function QB(e){return e&&parseFloat(e.replace(",","."))||0}function b5e(e){if(e==="Z")return 0;let t=e.match(p5e);if(!t)return 0;let r=t[1]==="+"?-1:1,o=parseInt(t[2]),n=t[3]&&parseInt(t[3])||0;return P5e(o,n)?r*(o*GB+n*UB):NaN}function w5e(e,t,r){let o=new Date(0);o.setUTCFullYear(e,0,4);let n=o.getUTCDay()||7,i=(t-1)*7+r+1-n;return o.setUTCDate(o.getUTCDate()+i),o}var S5e=[31,null,31,30,31,30,31,31,30,31,30,31];function eJ(e){return e%400===0||e%4===0&&e%100!==0}function _5e(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(S5e[t]||(eJ(e)?29:28))}function x5e(e,t){return t>=1&&t<=(eJ(e)?366:365)}function C5e(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function T5e(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function P5e(e,t){return t>=0&&t<=59}function ok(e,t,r){return Q2(e,-t,r)}function tJ(e,t,r){return IQ(e,-t,r)}function nk(e,t,r){return OQ(e,-t,r)}var ke=s(N(),1),oo=s(V(),1),zi=s(go(),1);var JB=s(x(),1),Co={Name:(0,JB.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,JB.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function rJ(e,t){switch(t){case"days":return Qh(new Date,e);case"weeks":return tJ(new Date,e);case"months":return ok(new Date,e);case"years":return nk(new Date,e);default:return new Date}}var oJ={label:(0,ke.__)("Is none of"),filterText:(e,t)=>(0,oo.createInterpolateElement)((0,ke.sprintf)((0,ke.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),Co),filter:((e,t,r)=>{if(!r?.length)return!0;let o=t.getValue({item:e});return Array.isArray(o)?!r.some(n=>o.includes(n)):typeof o=="string"?!r.includes(o):!1}),selection:"multi"},ik=[{name:Ar,label:(0,ke.__)("Includes"),filterText:(e,t)=>(0,oo.createInterpolateElement)((0,ke.sprintf)((0,ke.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),Co),filter(e,t,r){if(!r?.length)return!0;let o=t.getValue({item:e});return Array.isArray(o)?r.some(n=>o.includes(n)):typeof o=="string"?r.includes(o):!1},selection:"multi"},{name:Ir,...oJ},{name:ni,label:(0,ke.__)("Includes all"),filterText:(e,t)=>(0,oo.createInterpolateElement)((0,ke.sprintf)((0,ke.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),Co),filter(e,t,r){return r?.length?r.every(o=>t.getValue({item:e})?.includes(o)):!0},selection:"multi"},{name:ii,...oJ},{name:Fi,label:(0,ke.__)("Between (inc)"),filterText:(e,t)=>(0,oo.createInterpolateElement)((0,ke.sprintf)((0,ke.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),e.name,t[0].label[0],t[0].label[1]),Co),filter(e,t,r){if(!Array.isArray(r)||r.length!==2||r[0]===void 0||r[1]===void 0)return!0;let o=t.getValue({item:e});return typeof o=="number"||o instanceof Date||typeof o=="string"?o>=r[0]&&o<=r[1]:!1},selection:"custom"},{name:Di,label:(0,ke.__)("In the past"),filterText:(e,t)=>(0,oo.createInterpolateElement)((0,ke.sprintf)((0,ke.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),Co),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=rJ(r.value,r.unit),n=(0,zi.getDate)(t.getValue({item:e}));return n>=o&&n<=new Date},selection:"custom"},{name:cs,label:(0,ke.__)("Over"),filterText:(e,t)=>(0,oo.createInterpolateElement)((0,ke.sprintf)((0,ke.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),Co),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=rJ(r.value,r.unit);return(0,zi.getDate)(t.getValue({item:e}))<o},selection:"custom"},{name:Ur,label:(0,ke.__)("Is"),filterText:(e,t)=>(0,oo.createInterpolateElement)((0,ke.sprintf)((0,ke.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),Co),filter(e,t,r){return r===t.getValue({item:e})||r===void 0},selection:"single"},{name:Gr,label:(0,ke.__)("Is not"),filterText:(e,t)=>(0,oo.createInterpolateElement)((0,ke.sprintf)((0,ke.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),Co),filter(e,t,r){return r!==t.getValue({item:e})},selection:"single"},{name:$f,label:(0,ke.__)("Less than"),filterText:(e,t)=>(0,oo.createInterpolateElement)((0,ke.sprintf)((0,ke.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),Co),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<r},selection:"single"},{name:em,label:(0,ke.__)("Greater than"),filterText:(e,t)=>(0,oo.createInterpolateElement)((0,ke.sprintf)((0,ke.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),Co),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>r},selection:"single"},{name:tm,label:(0,ke.__)("Less than or equal"),filterText:(e,t)=>(0,oo.createInterpolateElement)((0,ke.sprintf)((0,ke.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),Co),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<=r},selection:"single"},{name:rm,label:(0,ke.__)("Greater than or equal"),filterText:(e,t)=>(0,oo.createInterpolateElement)((0,ke.sprintf)((0,ke.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),Co),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>=r},selection:"single"},{name:om,label:(0,ke.__)("Before"),filterText:(e,t)=>(0,oo.createInterpolateElement)((0,ke.sprintf)((0,ke.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),Co),filter(e,t,r){if(r===void 0)return!0;let o=(0,zi.getDate)(r);return(0,zi.getDate)(t.getValue({item:e}))<o},selection:"single"},{name:nm,label:(0,ke.__)("After"),filterText:(e,t)=>(0,oo.createInterpolateElement)((0,ke.sprintf)((0,ke.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),Co),filter(e,t,r){if(r===void 0)return!0;let o=(0,zi.getDate)(r);return(0,zi.getDate)(t.getValue({item:e}))>o},selection:"single"},{name:im,label:(0,ke.__)("Before (inc)"),filterText:(e,t)=>(0,oo.createInterpolateElement)((0,ke.sprintf)((0,ke.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),Co),filter(e,t,r){if(r===void 0)return!0;let o=(0,zi.getDate)(r);return(0,zi.getDate)(t.getValue({item:e}))<=o},selection:"single"},{name:sm,label:(0,ke.__)("After (inc)"),filterText:(e,t)=>(0,oo.createInterpolateElement)((0,ke.sprintf)((0,ke.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),Co),filter(e,t,r){if(r===void 0)return!0;let o=(0,zi.getDate)(r);return(0,zi.getDate)(t.getValue({item:e}))>=o},selection:"single"},{name:bc,label:(0,ke.__)("Contains"),filterText:(e,t)=>(0,oo.createInterpolateElement)((0,ke.sprintf)((0,ke.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),Co),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&o.toLowerCase().includes(String(r).toLowerCase())},selection:"single"},{name:wc,label:(0,ke.__)("Doesn't contain"),filterText:(e,t)=>(0,oo.createInterpolateElement)((0,ke.sprintf)((0,ke.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),Co),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&!o.toLowerCase().includes(String(r).toLowerCase())},selection:"single"},{name:Sc,label:(0,ke.__)("Starts with"),filterText:(e,t)=>(0,oo.createInterpolateElement)((0,ke.sprintf)((0,ke.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),Co),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&o.toLowerCase().startsWith(String(r).toLowerCase())},selection:"single"},{name:am,label:(0,ke.__)("On"),filterText:(e,t)=>(0,oo.createInterpolateElement)((0,ke.sprintf)((0,ke.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),Co),filter(e,t,r){if(r===void 0)return!0;let o=(0,zi.getDate)(r),n=(0,zi.getDate)(t.getValue({item:e}));return o.getTime()===n.getTime()},selection:"single"},{name:lm,label:(0,ke.__)("Not on"),filterText:(e,t)=>(0,oo.createInterpolateElement)((0,ke.sprintf)((0,ke.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),Co),filter(e,t,r){if(r===void 0)return!0;let o=(0,zi.getDate)(r),n=(0,zi.getDate)(t.getValue({item:e}));return o.getTime()!==n.getTime()},selection:"single"}],Jh=e=>ik.find(t=>t.name===e),nJ=()=>ik.map(e=>e.name),iJ=e=>ik.filter(t=>t.selection==="single").some(t=>t.name===e),sJ=e=>ik.some(t=>t.name===e);var Dn=s(x(),1),E5e="Enter",k5e=" ",R5e=({activeElements:e,filterInView:t,filter:r})=>{if(e===void 0||e.length===0)return r.name;let o=Jh(t?.operator);return o!==void 0?o.filterText(r,e):(0,dd.sprintf)((0,dd.__)("Unknown status for %1$s"),r.name)};function A5e({filter:e,view:t,onChangeView:r}){let o=e.operators?.map(a=>({value:a,label:Jh(a)?.label||a})),n=t.filters?.find(a=>a.field===e.field),i=n?.operator||e.operators[0];return o.length>1&&(0,Dn.jsxs)(re,{direction:"row",gap:"sm",justify:"flex-start",className:"dataviews-filters__summary-operators-container",align:"center",children:[(0,Dn.jsx)(Tl.FlexItem,{className:"dataviews-filters__summary-operators-filter-name",children:e.name}),(0,Dn.jsx)(Tl.SelectControl,{className:"dataviews-filters__summary-operators-filter-select",label:(0,dd.__)("Conditions"),value:i,options:o,onChange:a=>{let l=a,c=n?.operator,u=n?[...(t.filters??[]).map(d=>{if(d.field===e.field){let f=Jh(c)?.selection,m=Jh(l)?.selection,h=f!==m||[f,m].includes("custom");return{...d,value:h?void 0:d.value,operator:l}}return d})]:[...t.filters??[],{field:e.field,operator:l,value:void 0}];r({...t,page:1,filters:u})},size:"small",variant:"minimal",hideLabelFromVision:!0})]})}function aJ({addFilterRef:e,openedFilter:t,fields:r,...o}){let n=(0,sk.useRef)(null),{filter:i,view:a,onChangeView:l}=o,c=a.filters?.find(y=>y.field===i.field),u=[],d=(0,sk.useMemo)(()=>{let y=r.find(b=>b.id===i.field);return y&&{...y,getValue:({item:b})=>b[y.id]}},[r,i.field]),{elements:f}=cn({elements:i.elements,getElements:i.getElements});if(f.length>0)u=f.filter(y=>i.singleSelection?y.value===c?.value:c?.value?.includes(y.value));else if(Array.isArray(c?.value)){let y=c.value.map(b=>d?.getValueFormatted({item:{[d.id]:b},field:d})||String(b));u=[{value:c.value,label:y}]}else if(typeof c?.value=="object")u=[{value:c.value,label:c.value}];else if(c?.value!==void 0){let y=d!==void 0?d.getValueFormatted({item:{[d.id]:c.value},field:d}):String(c.value);u=[{value:c.value,label:y}]}let m=i.isPrimary,h=c?.isLocked,g=!h&&c?.value!==void 0,v=!h&&(!m||g);return(0,Dn.jsx)(Tl.Dropdown,{defaultOpen:t===i.field,contentClassName:"dataviews-filters__summary-popover",popoverProps:{placement:"bottom-start",role:"dialog"},onClose:()=>{n.current?.focus()},renderToggle:({isOpen:y,onToggle:b})=>(0,Dn.jsxs)("div",{className:"dataviews-filters__summary-chip-container",children:[(0,Dn.jsx)(Tl.Tooltip,{text:(0,dd.sprintf)((0,dd.__)("Filter by: %1$s"),i.name.toLowerCase()),placement:"top",children:(0,Dn.jsx)("div",{className:K("dataviews-filters__summary-chip",{"has-reset":v,"has-values":g,"is-not-clickable":h}),role:"button",tabIndex:h?-1:0,onClick:()=>{h||b()},onKeyDown:S=>{!h&&[E5e,k5e].includes(S.key)&&(b(),S.preventDefault())},"aria-disabled":h,"aria-pressed":y,"aria-expanded":y,ref:n,children:(0,Dn.jsx)(R5e,{activeElements:u,filterInView:c,filter:i})})}),v&&(0,Dn.jsx)(Tl.Tooltip,{text:m?(0,dd.__)("Reset"):(0,dd.__)("Remove"),placement:"top",children:(0,Dn.jsx)("button",{className:K("dataviews-filters__summary-chip-remove",{"has-values":g}),onClick:()=>{l({...a,page:1,filters:a.filters?.filter(S=>S.field!==i.field)}),m?n.current?.focus():e.current?.focus()},children:(0,Dn.jsx)(Tl.Icon,{icon:rn})})})]}),renderContent:()=>(0,Dn.jsxs)(re,{direction:"column",justify:"flex-start",children:[(0,Dn.jsx)(A5e,{...o}),o.filter.hasElements?(0,Dn.jsx)(wQ,{...o,filter:{...o.filter,elements:f}}):(0,Dn.jsx)(TQ,{...o,fields:r})]})})}var ak=s(H(),1),lJ=s(N(),1),cJ=s(V(),1);var fd=s(x(),1),{Menu:K_}=st(ak.privateApis);function $B({filters:e,view:t,onChangeView:r,setOpenedFilter:o,triggerProps:n}){let i=e.filter(a=>!a.isVisible);return(0,fd.jsxs)(K_,{children:[(0,fd.jsx)(K_.TriggerButton,{...n}),(0,fd.jsx)(K_.Popover,{children:i.map(a=>(0,fd.jsx)(K_.Item,{onClick:()=>{o(a.field),r({...t,page:1,filters:[...t.filters||[],{field:a.field,value:void 0,operator:a.operators[0]}]})},children:(0,fd.jsx)(K_.ItemLabel,{children:a.name})},a.field))})]})}function I5e({filters:e,view:t,onChangeView:r,setOpenedFilter:o},n){if(!e.length||e.every(({isPrimary:a})=>a))return null;let i=e.filter(a=>!a.isVisible);return(0,fd.jsx)($B,{triggerProps:{render:(0,fd.jsx)(ak.Button,{accessibleWhenDisabled:!0,size:"compact",className:"dataviews-filters-button",variant:"tertiary",disabled:!i.length,ref:n}),children:(0,lJ.__)("Add filter")},filters:e,view:t,onChangeView:r,setOpenedFilter:o})}var uJ=(0,cJ.forwardRef)(I5e);var dJ=s(H(),1),fJ=s(N(),1),mJ=s(x(),1);function pJ({filters:e,view:t,onChangeView:r}){let o=i=>e.some(a=>a.field===i&&a.isPrimary),n=!t.search&&!t.filters?.some(i=>!i.isLocked&&(i.value!==void 0||!o(i.field)));return(0,mJ.jsx)(dJ.Button,{disabled:n,accessibleWhenDisabled:!0,size:"compact",variant:"tertiary",className:"dataviews-filters__reset-button",onClick:()=>{r({...t,page:1,search:"",filters:t.filters?.filter(i=>!!i.isLocked)||[]})},children:(0,fJ.__)("Reset")})}var hJ=s(V(),1);function O5e(e,t){return(0,hJ.useMemo)(()=>{let r=[];return e.forEach(o=>{if(o.filterBy===!1||!o.hasElements&&!o.Edit)return;let n=o.filterBy.operators,i=!!o.filterBy?.isPrimary,a=t.filters?.some(l=>l.field===o.id&&!!l.isLocked)??!1;r.push({field:o.id,name:o.label,elements:o.elements,getElements:o.getElements,hasElements:o.hasElements,singleSelection:n.some(l=>iJ(l)),operators:n,isVisible:a||i||!!t.filters?.some(l=>l.field===o.id&&sJ(l.operator)),isPrimary:i,isLocked:a})}),r.sort((o,n)=>o.isLocked&&!n.isLocked?-1:!o.isLocked&&n.isLocked?1:o.isPrimary&&!n.isPrimary?-1:!o.isPrimary&&n.isPrimary?1:o.name.localeCompare(n.name)),r},[e,t])}var Z_=O5e;var X_=s(x(),1);function N5e({className:e}){let{fields:t,view:r,onChangeView:o,openedFilter:n,setOpenedFilter:i}=(0,ob.useContext)(Ze),a=(0,ob.useRef)(null),l=Z_(t,r),c=(0,X_.jsx)(uJ,{filters:l,view:r,onChangeView:o,ref:a,setOpenedFilter:i},"add-filter"),u=l.filter(f=>f.isVisible);if(u.length===0)return null;let d=[...u.map(f=>(0,X_.jsx)(aJ,{filter:f,view:r,fields:t,onChangeView:o,addFilterRef:a,openedFilter:n},f.field)),c];return d.push((0,X_.jsx)(pJ,{filters:l,view:r,onChangeView:o},"reset-filters")),(0,X_.jsx)(re,{direction:"row",justify:"flex-start",gap:"sm",style:{width:"fit-content"},wrap:"wrap",className:e,children:d})}var Q_=(0,ob.memo)(N5e);var Cm=s(V(),1),gJ=s(H(),1);var lk=s(N(),1);var Ic=s(x(),1);function M5e(){let{filters:e,view:t,onChangeView:r,setOpenedFilter:o,isShowingFilter:n,setIsShowingFilter:i}=(0,Cm.useContext)(Ze),a=(0,Cm.useRef)(null),l=(0,Cm.useCallback)(h=>{r(h),i(!0)},[r,i]);if(e.length===0)return null;let c=e.some(h=>h.isVisible),u={label:(0,lk.__)("Add filter"),"aria-expanded":!1,isPressed:!1},d={label:(0,lk._x)("Filter","verb"),"aria-expanded":n,isPressed:n,onClick:()=>{n||o(null),i(!n)}},f=e.some(h=>h.isPrimary||h.isLocked),m=(0,Ic.jsx)(gJ.Button,{ref:a,className:"dataviews-filters__visibility-toggle",size:"compact",icon:nS,disabled:f,accessibleWhenDisabled:!0,...c?d:u});return(0,Ic.jsx)("div",{className:"dataviews-filters__container-visibility-toggle",children:c?(0,Ic.jsx)(F5e,{buttonRef:a,filtersCount:t.filters?.length,children:m}):(0,Ic.jsx)($B,{filters:e,view:t,onChangeView:l,setOpenedFilter:o,triggerProps:{render:m}})})}function F5e({buttonRef:e,filtersCount:t,children:r}){return(0,Cm.useEffect)(()=>()=>{e.current?.focus()},[e]),(0,Ic.jsxs)(Ic.Fragment,{children:[r,!!t&&(0,Ic.jsx)("span",{className:"dataviews-filters-toggle__count",children:t})]})}var ck=M5e;var vJ=s(V(),1);var yJ=s(x(),1);function D5e(e){let{isShowingFilter:t}=(0,vJ.useContext)(Ze);return t?(0,yJ.jsx)(Q_,{...e}):null}var uk=D5e;var bJ=s(V(),1),wJ=s(H(),1),SJ=s(N(),1);var $h=s(x(),1);function eV({className:e}){let{actions:t=[],data:r,fields:o,getItemId:n,getItemLevel:i,hasInitiallyLoaded:a,isLoading:l,view:c,onChangeView:u,selection:d,onChangeSelection:f,setOpenedFilter:m,onClickItem:h,isItemClickable:g,renderItemLink:v,defaultLayouts:y,containerRef:b,empty:S=(0,$h.jsx)("p",{children:(0,SJ.__)("No results")})}=(0,bJ.useContext)(Ze),w=Na(!a,{delay:200});if(!a)return w?(0,$h.jsx)("div",{className:"dataviews-loading",children:(0,$h.jsx)("p",{children:(0,$h.jsx)(wJ.Spinner,{})})}):null;let _=hm.find(C=>C.type===c.type&&y[C.type])?.component;return(0,$h.jsx)("div",{className:"dataviews-layout__container",ref:b,children:(0,$h.jsx)(_,{className:e,actions:t,data:r,fields:o,getItemId:n,getItemLevel:i,isLoading:l,onChangeView:u,onChangeSelection:f,selection:d,setOpenedFilter:m,onClickItem:h,renderItemLink:v,isItemClickable:g,view:c,empty:S})})}var _J=s(V(),1);var nb=s(x(),1),L5e=[];function tV(){let{view:e,paginationInfo:{totalItems:t=0,totalPages:r},data:o,actions:n=L5e,isLoading:i,hasInitiallyLoaded:a}=(0,_J.useContext)(Ze),l=!!i&&a&&!!o?.length,c=Na(!!l),u=Dy(n,o)&&[Oy,a2].includes(e.type);return!l&&(!t||!r||r<=1&&!u)?null:(!!t||l)&&(0,nb.jsx)("div",{className:"dataviews-footer",inert:l?"true":void 0,children:(0,nb.jsxs)(re,{direction:"row",justify:"end",align:"center",className:K("dataviews-footer__content",{"is-refreshing":c}),gap:"sm",children:[u&&(0,nb.jsx)(u2,{}),(0,nb.jsx)(bZ,{})]})})}var xJ=s(N(),1),Pl=s(V(),1),CJ=s(H(),1),TJ=s(we(),1);var PJ=s(x(),1),B5e=(0,Pl.memo)(function({label:t}){let{view:r,onChangeView:o}=(0,Pl.useContext)(Ze),[n,i,a]=(0,TJ.useDebouncedInput)(r.search);(0,Pl.useEffect)(()=>{r.search!==a&&i(r.search??"")},[r.search,i]);let l=(0,Pl.useRef)(o),c=(0,Pl.useRef)(r);(0,Pl.useEffect)(()=>{l.current=o,c.current=r},[o,r]),(0,Pl.useEffect)(()=>{a!==c.current?.search&&l.current({...c.current,page:r.page?1:void 0,startPosition:r.startPosition?1:void 0,search:a})},[a]);let u=t||(0,xJ.__)("Search");return(0,PJ.jsx)(CJ.SearchControl,{className:"dataviews-search",onChange:i,value:n,label:u,placeholder:u,size:"compact"})}),rV=B5e;var To=s(H(),1),md=s(N(),1),El=s(V(),1);var nV=s(oV(),1),kJ=s(we(),1);var _t=s(x(),1),{Menu:J_}=st(To.privateApis),V5e={className:"dataviews-config__popover",placement:"bottom-end",offset:9};function iV(){let{view:e,onChangeView:t,defaultLayouts:r}=(0,El.useContext)(Ze),o=Object.keys(r);if(o.length<=1)return null;let n=hm.find(i=>e.type===i.type);return(0,_t.jsxs)(J_,{children:[(0,_t.jsx)(J_.TriggerButton,{render:(0,_t.jsx)(To.Button,{size:"compact",icon:n?.icon,label:(0,md.__)("Layout")})}),(0,_t.jsx)(J_.Popover,{children:o.map(i=>{let a=hm.find(l=>l.type===i);return a?(0,_t.jsx)(J_.RadioItem,{value:i,name:"view-actions-available-view",checked:i===e.type,hideOnClick:!0,onChange:l=>{switch(l.target.value){case"list":case"grid":case"table":case"pickerGrid":case"pickerTable":case"activity":let c={...e};return"layout"in c&&delete c.layout,t({...c,type:l.target.value,...r[l.target.value]})}(0,nV.default)("Invalid dataview")},children:(0,_t.jsx)(J_.ItemLabel,{children:a.label})},i):null})})]})}function j5e(){let{view:e,fields:t,onChangeView:r}=(0,El.useContext)(Ze),o=(0,El.useMemo)(()=>t.filter(i=>i.enableSorting!==!1).map(i=>({label:i.label,value:i.id})),[t]);return(0,_t.jsx)(To.SelectControl,{__next40pxDefaultSize:!0,label:(0,md.__)("Sort by"),value:e.sort?.field,options:o,onChange:n=>{r({...e,sort:{direction:e?.sort?.direction||"desc",field:n},showLevels:!1})}})}function z5e(){let{view:e,fields:t,onChangeView:r}=(0,El.useContext)(Ze);if(t.filter(i=>i.enableSorting!==!1).length===0)return null;let n=e.sort?.direction;return!n&&e.sort?.field&&(n="desc"),(0,_t.jsx)(To.__experimentalToggleGroupControl,{className:"dataviews-view-config__sort-direction",__next40pxDefaultSize:!0,isBlock:!0,label:(0,md.__)("Order"),value:n,onChange:i=>{if(i==="asc"||i==="desc"){r({...e,sort:{direction:i,field:e.sort?.field||t.find(a=>a.enableSorting!==!1)?.id||""},showLevels:!1});return}(0,nV.default)("Invalid direction")},children:n2.map(i=>(0,_t.jsx)(To.__experimentalToggleGroupControlOptionIcon,{value:i,icon:RK[i],label:s2[i]},i))})}function H5e(){let{view:e,config:t,onChangeView:r}=(0,El.useContext)(Ze),{infiniteScrollEnabled:o}=e;return!t||!t.perPageSizes||t.perPageSizes.length<2||t.perPageSizes.length>6||o?null:(0,_t.jsx)(To.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,md.__)("Items per page"),value:e.perPage||10,disabled:!e?.sort?.field,onChange:n=>{let i=typeof n=="number"||n===void 0?n:parseInt(n,10);r({...e,perPage:i,page:1})},children:t.perPageSizes.map(n=>(0,_t.jsx)(To.__experimentalToggleGroupControlOption,{value:n,label:n.toString()},n))})}function U5e(){let{onReset:e}=(0,El.useContext)(Ze);return e===void 0?null:(0,_t.jsx)(To.Button,{variant:"tertiary",size:"compact",disabled:e===!1,accessibleWhenDisabled:!0,className:"dataviews-view-config__reset-button",onClick:()=>{typeof e=="function"&&e()},children:(0,md.__)("Reset view")})}function sV(){let{view:e,onReset:t}=(0,El.useContext)(Ze),r=(0,kJ.useInstanceId)(RJ,"dataviews-view-config-dropdown"),o=hm.find(i=>i.type===e.type),n=typeof t=="function";return(0,_t.jsx)(To.Dropdown,{expandOnMobile:!0,popoverProps:{...V5e,id:r},renderToggle:({onToggle:i,isOpen:a})=>(0,_t.jsxs)("div",{className:"dataviews-view-config__toggle-wrapper",children:[(0,_t.jsx)(To.Button,{size:"compact",icon:$6,label:(0,md._x)("View options","View is used as a noun"),onClick:i,"aria-expanded":a?"true":"false","aria-controls":r}),n&&(0,_t.jsx)("span",{className:"dataviews-view-config__modified-indicator"})]}),renderContent:()=>(0,_t.jsx)(To.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"dataviews-config__popover-content-wrapper",children:(0,_t.jsxs)(re,{direction:"column",className:"dataviews-view-config",gap:"xl",children:[(0,_t.jsxs)(re,{direction:"row",justify:"space-between",align:"center",className:"dataviews-view-config__header",children:[(0,_t.jsx)(To.__experimentalHeading,{level:2,className:"dataviews-settings-section__title",children:(0,md.__)("Appearance")}),(0,_t.jsx)(U5e,{})]}),(0,_t.jsxs)(re,{direction:"column",gap:"lg",children:[(0,_t.jsxs)(re,{direction:"row",gap:"sm",className:"dataviews-view-config__sort-controls",children:[(0,_t.jsx)(j5e,{}),(0,_t.jsx)(z5e,{})]}),!!o?.viewConfigOptions&&(0,_t.jsx)(o.viewConfigOptions,{}),(0,_t.jsx)(H5e,{}),(0,_t.jsx)(m2,{})]})]})})})}function RJ(){return(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(iV,{}),(0,_t.jsx)(sV,{})]})}var G5e=(0,El.memo)(RJ),AJ=G5e;var IJ=s(H(),1),OJ=s(V(),1);function ir(e,t){let r;return e?.required&&t?.required?r=t?.required?.message?t.required:void 0:e?.pattern&&t?.pattern?r=t.pattern:e?.min&&t?.min?r=t.min:e?.max&&t?.max?r=t.max:e?.minLength&&t?.minLength?r=t.minLength:e?.maxLength&&t?.maxLength?r=t.maxLength:e?.elements&&t?.elements?r=t.elements:t?.custom&&(r=t.custom),r}var NJ=s(x(),1),{ValidatedCheckboxControl:W5e}=st(IJ.privateApis);function MJ({field:e,onChange:t,data:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{getValue:a,setValue:l,label:c,description:u,isValid:d}=e,f=e.isDisabled({item:r,field:e}),m=(0,OJ.useCallback)(()=>{t(l({item:r,value:!a({item:r})}))},[r,a,t,l]);return(0,NJ.jsx)(W5e,{required:!!e.isValid?.required,markWhenOptional:n,customValidity:ir(d,i),hidden:o,label:c,help:u,checked:a({item:r}),onChange:m,disabled:f})}var dk=s(H(),1),FJ=s(V(),1);var aV=s(x(),1),{ValidatedComboboxControl:Y5e}=st(dk.privateApis);function fk({data:e,field:t,onChange:r,hideLabelFromVision:o,validity:n}){let{label:i,description:a,placeholder:l,getValue:c,setValue:u,isValid:d}=t,f=c({item:e})??"",m=(0,FJ.useCallback)(v=>r(u({item:e,value:v??""})),[e,r,u]),{elements:h,isLoading:g}=cn({elements:t.elements,getElements:t.getElements});return g?(0,aV.jsx)(dk.Spinner,{}):(0,aV.jsx)(Y5e,{required:!!t.isValid?.required,customValidity:ir(d,n),label:i,value:f,help:a,placeholder:l,options:h,onChange:m,hideLabelFromVision:o,allowReset:!0,expandOnFocus:!0})}var hk=s(H(),1),Da=s(V(),1),pk=s(N(),1),Xs=s(go(),1);var sb=s(H(),1),lV=s(V(),1),Oc=s(N(),1);var ib=s(x(),1),q5e={[Di]:[{value:"days",label:(0,Oc.__)("Days")},{value:"weeks",label:(0,Oc.__)("Weeks")},{value:"months",label:(0,Oc.__)("Months")},{value:"years",label:(0,Oc.__)("Years")}],[cs]:[{value:"days",label:(0,Oc.__)("Days ago")},{value:"weeks",label:(0,Oc.__)("Weeks ago")},{value:"months",label:(0,Oc.__)("Months ago")},{value:"years",label:(0,Oc.__)("Years ago")}]};function mk({className:e,data:t,field:r,onChange:o,hideLabelFromVision:n,operator:i}){let a=q5e[i===Di?"inThePast":"over"],{id:l,label:c,description:u,getValue:d,setValue:f}=r,m=r.isDisabled({item:t,field:r}),h=d({item:t}),{value:g="",unit:v=a[0].value}=h&&typeof h=="object"?h:{},y=(0,lV.useCallback)(S=>o(f({item:t,value:{value:Number(S),unit:v}})),[o,f,t,v]),b=(0,lV.useCallback)(S=>o(f({item:t,value:{value:g,unit:S}})),[o,f,t,g]);return(0,ib.jsx)(sb.BaseControl,{id:l,className:K(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:n,help:u,children:(0,ib.jsxs)(re,{direction:"row",gap:"sm",children:[(0,ib.jsx)(sb.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:g,onChange:y,disabled:m}),(0,ib.jsx)(sb.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,label:(0,Oc.__)("Unit"),value:v,options:a,onChange:b,hideLabelFromVision:!0,disabled:m})]})})}var DJ=s(V(),1);function $_(e,t){let r=typeof e.min?.constraint=="string"?e.min.constraint:void 0,o=typeof e.max?.constraint=="string"?e.max.constraint:void 0,n=(0,DJ.useMemo)(()=>{let i=[];if(r){let a=t(r);a&&i.push({before:a})}if(o){let a=t(o);a&&i.push({after:a})}return i.length>0?i:void 0},[r,o,t]);return{minConstraint:r,maxConstraint:o,disabledMatchers:n}}var LJ=s(go(),1);function e1(e){if(!e)return null;let t=(0,LJ.getDate)(e);return t&&cd(t)?t:null}var Tm=s(x(),1),{DateCalendar:K5e,ValidatedInputControl:Z5e}=st(hk.privateApis),cV=e=>e?(0,Xs.dateI18n)("Y-m-d\\TH:i",(0,Xs.getDate)(e)):"";function X5e({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,config:a}){let{compact:l}=a||{},{id:c,label:u,description:d,setValue:f,getValue:m,isValid:h}=t,g=t.isDisabled({item:e,field:t}),v=m({item:e}),y=typeof v=="string"?v:void 0,[b,S]=(0,Da.useState)(()=>e1(y)||new Date),w=(0,Da.useRef)(null),_=(0,Da.useRef)(void 0),C=(0,Da.useRef)(null),{minConstraint:k,maxConstraint:A,disabledMatchers:R}=$_(h,e1),I=(0,Da.useCallback)(W=>r(f({item:e,value:W})),[e,r,f]);(0,Da.useEffect)(()=>()=>{_.current&&clearTimeout(_.current)},[]);let B=(0,Da.useCallback)(W=>{let O;if(W){let M=(0,Xs.dateI18n)("Y-m-d",W),D;y?D=(0,Xs.dateI18n)("H:i",(0,Xs.getDate)(y)):D=(0,Xs.dateI18n)("H:i",W),O=(0,Xs.getDate)(`${M}T${D}`).toISOString(),I(O),_.current&&clearTimeout(_.current)}else I(void 0);C.current=w.current&&w.current.ownerDocument.activeElement,_.current=setTimeout(()=>{w.current&&(w.current.focus(),w.current.blur(),I(O),C.current&&C.current instanceof HTMLElement&&C.current.focus())},0)},[I,y]),E=(0,Da.useCallback)(W=>{if(W){let O=(0,Xs.getDate)(W);I(O.toISOString());let M=e1(O.toISOString());M&&S(M)}else I(void 0)},[I]),{format:P}=t,L=P.weekStartsOn??(0,Xs.getSettings)().l10n.startOfWeek,{timezone:{string:j}}=(0,Xs.getSettings)(),z=u;return h?.required&&!n&&!o?z=`${u} (${(0,pk.__)("Required")})`:!h?.required&&n&&!o&&(z=`${u} (${(0,pk.__)("Optional")})`),(0,Tm.jsx)(hk.BaseControl,{id:c,label:z,help:d,hideLabelFromVision:o,children:(0,Tm.jsxs)(re,{direction:"column",gap:"lg",children:[(0,Tm.jsx)(Z5e,{ref:w,__next40pxDefaultSize:!0,required:!!h?.required,customValidity:ir(h,i),type:"datetime-local",label:(0,pk.__)("Date time"),hideLabelFromVision:!0,value:cV(y),onChange:E,disabled:g,min:k?cV(k):void 0,max:A?cV(A):void 0}),!l&&(0,Tm.jsx)(K5e,{style:{width:"100%"},selected:y&&e1(y)||void 0,onSelect:B,month:b,onMonthChange:S,timeZone:j||void 0,weekStartsOn:L,disabled:g||R})]})})}function BJ({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:a,config:l}){return i===Di||i===cs?(0,Tm.jsx)(mk,{className:"dataviews-controls__datetime",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):(0,Tm.jsx)(X5e,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a,config:l})}var di=s(H(),1),Gt=s(V(),1),qo=s(N(),1),ui=s(go(),1);var sr=s(x(),1),{DateCalendar:Q5e,DateRangeCalendar:J5e}=st(di.privateApis),$5e=[{id:"today",label:(0,qo.__)("Today"),getValue:()=>(0,ui.getDate)(null)},{id:"yesterday",label:(0,qo.__)("Yesterday"),getValue:()=>{let e=(0,ui.getDate)(null);return Qh(e,1)}},{id:"past-week",label:(0,qo.__)("Past week"),getValue:()=>{let e=(0,ui.getDate)(null);return Qh(e,7)}},{id:"past-month",label:(0,qo.__)("Past month"),getValue:()=>{let e=(0,ui.getDate)(null);return ok(e,1)}}],eOe=[{id:"last-7-days",label:(0,qo.__)("Last 7 days"),getValue:()=>{let e=(0,ui.getDate)(null);return[Qh(e,7),e]}},{id:"last-30-days",label:(0,qo.__)("Last 30 days"),getValue:()=>{let e=(0,ui.getDate)(null);return[Qh(e,30),e]}},{id:"month-to-date",label:(0,qo.__)("Month to date"),getValue:()=>{let e=(0,ui.getDate)(null);return[Y_(e),e]}},{id:"last-year",label:(0,qo.__)("Last year"),getValue:()=>{let e=(0,ui.getDate)(null);return[nk(e,1),e]}},{id:"year-to-date",label:(0,qo.__)("Year to date"),getValue:()=>{let e=(0,ui.getDate)(null);return[$2(e),e]}}],Pm=e=>{if(!e)return null;let t=(0,ui.getDate)(e);return t&&cd(t)?t:null},uV=e=>e?typeof e=="string"?e:XB(e,"yyyy-MM-dd"):"";function VJ({field:e,validity:t,inputRefs:r,isTouched:o,setIsTouched:n,children:i}){let{isValid:a}=e,[l,c]=(0,Gt.useState)(void 0),u=(0,Gt.useCallback)(()=>{let f=Array.isArray(r)?r:[r];for(let m of f){let h=m.current;if(h&&!h.validity.valid){c({type:"invalid",message:h.validationMessage});return}}c(void 0)},[r]);return(0,Gt.useEffect)(()=>{let f=Array.isArray(r)?r:[r],m=t?ir(a,t):void 0;for(let h of f){let g=h.current;g&&g.setCustomValidity(m?.type==="invalid"&&m.message?m.message:"")}},[r,a,t]),(0,Gt.useEffect)(()=>{let f=Array.isArray(r)?r:[r],m=h=>{h.preventDefault(),n(!0)};for(let h of f)h.current?.addEventListener("invalid",m);return()=>{for(let h of f)h.current?.removeEventListener("invalid",m)}},[r,n]),(0,Gt.useEffect)(()=>{if(!o)return;let f=t?ir(a,t):void 0;f?c(f):u()},[o,a,t,u]),(0,sr.jsxs)("div",{onBlur:f=>{o||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,(0,sr.jsx)("div",{"aria-live":"polite",children:l&&(0,sr.jsxs)("p",{className:K("components-validated-control__indicator",l.type==="invalid"?"is-invalid":void 0),children:[(0,sr.jsx)(di.Icon,{className:"components-validated-control__indicator-icon",icon:Mu,size:16,fill:"currentColor"}),l.message]})})]})}function tOe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:a,label:l,description:c,setValue:u,getValue:d,isValid:f,format:m}=t,h=t.isDisabled({item:e,field:t}),[g,v]=(0,Gt.useState)(null),y=m.weekStartsOn??(0,ui.getSettings)().l10n.startOfWeek,b=d({item:e}),S=typeof b=="string"?b:void 0,[w,_]=(0,Gt.useState)(()=>Pm(S)||new Date),[C,k]=(0,Gt.useState)(!1),A=(0,Gt.useRef)(null),{minConstraint:R,maxConstraint:I,disabledMatchers:B}=$_(f,Pm),E=(0,Gt.useCallback)(O=>r(u({item:e,value:O})),[e,r,u]),P=(0,Gt.useCallback)(O=>{let M=O?XB(O,"yyyy-MM-dd"):void 0;E(M),v(null),k(!0)},[E]),L=(0,Gt.useCallback)(O=>{let M=O.getValue(),D=uV(M);_(M),E(D),v(O.id),k(!0)},[E]),j=(0,Gt.useCallback)(O=>{if(E(O),O){let M=Pm(O);M&&_(M)}v(null),k(!0)},[E]),{timezone:{string:z}}=(0,ui.getSettings)(),W=l;return f?.required&&!n?W=`${l} (${(0,qo.__)("Required")})`:!f?.required&&n&&(W=`${l} (${(0,qo.__)("Optional")})`),(0,sr.jsx)(VJ,{field:t,validity:i,inputRefs:A,isTouched:C,setIsTouched:k,children:(0,sr.jsx)(di.BaseControl,{id:a,className:"dataviews-controls__date",label:W,help:c,hideLabelFromVision:o,children:(0,sr.jsxs)(re,{direction:"column",gap:"lg",children:[(0,sr.jsxs)(re,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[$5e.map(O=>{let M=g===O.id;return(0,sr.jsx)(di.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:M,size:"small",disabled:h,accessibleWhenDisabled:!0,onClick:()=>L(O),children:O.label},O.id)}),(0,sr.jsx)(di.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!g,size:"small",disabled:!!g||h,accessibleWhenDisabled:!0,children:(0,qo.__)("Custom")})]}),(0,sr.jsx)(di.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:A,type:"date",label:(0,qo.__)("Date"),hideLabelFromVision:!0,value:S,onChange:j,required:!!t.isValid?.required,disabled:h,min:R,max:I}),(0,sr.jsx)(Q5e,{style:{width:"100%"},selected:S&&Pm(S)||void 0,onSelect:P,month:w,onMonthChange:_,timeZone:z||void 0,weekStartsOn:y,disabled:h||B,disableNavigation:h})]})})})}function rOe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:a,label:l,description:c,getValue:u,setValue:d,isValid:f,format:m}=t,h=t.isDisabled({item:e,field:t}),g,v=u({item:e});Array.isArray(v)&&v.length===2&&v.every(G=>typeof G=="string")&&(g=v);let y=m.weekStartsOn??(0,ui.getSettings)().l10n.startOfWeek,{minConstraint:b,maxConstraint:S,disabledMatchers:w}=$_(f,Pm),_=(0,Gt.useCallback)(G=>{r(d({item:e,value:G}))},[e,r,d]),[C,k]=(0,Gt.useState)(null),A=(0,Gt.useMemo)(()=>{if(!g)return{from:void 0,to:void 0};let[G,q]=g;return{from:Pm(G)||void 0,to:Pm(q)||void 0}},[g]),[R,I]=(0,Gt.useState)(()=>A.from||new Date),[B,E]=(0,Gt.useState)(!1),P=(0,Gt.useRef)(null),L=(0,Gt.useRef)(null),j=(0,Gt.useCallback)((G,q)=>{G&&q?_([uV(G),uV(q)]):!G&&!q&&_(void 0)},[_]),z=(0,Gt.useCallback)(G=>{j(G?.from,G?.to),k(null),E(!0)},[j]),W=(0,Gt.useCallback)(G=>{let[q,Z]=G.getValue();I(q),j(q,Z),k(G.id),E(!0)},[j]),O=(0,Gt.useCallback)((G,q)=>{let[Z,te]=g||[void 0,void 0];if(j(G==="from"?q:Z,G==="to"?q:te),q){let fe=Pm(q);fe&&I(fe)}k(null),E(!0)},[g,j]),{timezone:M}=(0,ui.getSettings)(),D=l;return t.isValid?.required&&!n?D=`${l} (${(0,qo.__)("Required")})`:!t.isValid?.required&&n&&(D=`${l} (${(0,qo.__)("Optional")})`),(0,sr.jsx)(VJ,{field:t,validity:i,inputRefs:[P,L],isTouched:B,setIsTouched:E,children:(0,sr.jsx)(di.BaseControl,{id:a,className:"dataviews-controls__date",label:D,help:c,hideLabelFromVision:o,children:(0,sr.jsxs)(re,{direction:"column",gap:"lg",children:[(0,sr.jsxs)(re,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[eOe.map(G=>{let q=C===G.id;return(0,sr.jsx)(di.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:q,size:"small",disabled:h,accessibleWhenDisabled:!0,onClick:()=>W(G),children:G.label},G.id)}),(0,sr.jsx)(di.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!C,size:"small",accessibleWhenDisabled:!0,disabled:!!C||h,children:(0,qo.__)("Custom")})]}),(0,sr.jsxs)(re,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,sr.jsx)(di.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:P,type:"date",label:(0,qo.__)("From"),hideLabelFromVision:!0,value:g?.[0],onChange:G=>O("from",G),required:!!t.isValid?.required,disabled:h,min:b,max:S}),(0,sr.jsx)(di.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:L,type:"date",label:(0,qo.__)("To"),hideLabelFromVision:!0,value:g?.[1],onChange:G=>O("to",G),required:!!t.isValid?.required,disabled:h,min:b,max:S})]}),(0,sr.jsx)(J5e,{style:{width:"100%"},selected:A,onSelect:z,month:R,onMonthChange:I,timeZone:M.string||void 0,weekStartsOn:y,disabled:h||w})]})})})}function jJ({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:a}){return i===Di||i===cs?(0,sr.jsx)(mk,{className:"dataviews-controls__date",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):i===Fi?(0,sr.jsx)(rOe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a}):(0,sr.jsx)(tOe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a})}var gk=s(H(),1),zJ=s(V(),1);var dV=s(x(),1),{ValidatedSelectControl:oOe}=st(gk.privateApis);function vk({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{type:a,label:l,description:c,getValue:u,setValue:d,isValid:f}=t,m=t.isDisabled({item:e,field:t}),h=a==="array",g=u({item:e})??(h?[]:""),v=(0,zJ.useCallback)(S=>r(d({item:e,value:S})),[e,r,d]),{elements:y,isLoading:b}=cn({elements:t.elements,getElements:t.getElements});return b?(0,dV.jsx)(gk.Spinner,{}):(0,dV.jsx)(oOe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:ir(f,i),label:l,value:g,help:c,options:y,onChange:v,__next40pxDefaultSize:!0,hideLabelFromVision:o,multiple:h,disabled:m})}var fV=s(x(),1),nOe=10;function HJ(e){let{field:t}=e,{elements:r}=cn({elements:t.elements,getElements:t.getElements});return r.length>=nOe?(0,fV.jsx)(fk,{...e}):(0,fV.jsx)(vk,{...e})}var bk=s(H(),1);var UJ=s(H(),1),GJ=s(V(),1);var WJ=s(x(),1),{ValidatedInputControl:iOe}=st(UJ.privateApis);function Nc({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,type:i,prefix:a,suffix:l,validity:c}){let{label:u,placeholder:d,description:f,getValue:m,setValue:h,isValid:g}=t,v=m({item:e}),y=t.isDisabled({item:e,field:t}),b=(0,GJ.useCallback)(S=>r(h({item:e,value:S})),[e,h,r]);return(0,WJ.jsx)(iOe,{required:!!g.required,markWhenOptional:n,customValidity:ir(g,c),label:u,placeholder:d,value:v??"",help:f,onChange:b,hideLabelFromVision:o,type:i,prefix:a,suffix:l,disabled:y,pattern:g.pattern?g.pattern.constraint:void 0,minLength:g.minLength?g.minLength.constraint:void 0,maxLength:g.maxLength?g.maxLength.constraint:void 0,__next40pxDefaultSize:!0})}var yk=s(x(),1);function YJ({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,yk.jsx)(Nc,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"email",prefix:(0,yk.jsx)(bk.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,yk.jsx)(bk.Icon,{icon:mM})})})}var Sk=s(H(),1);var wk=s(x(),1);function qJ({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,wk.jsx)(Nc,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"tel",prefix:(0,wk.jsx)(Sk.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,wk.jsx)(Sk.Icon,{icon:Hv})})})}var xk=s(H(),1);var _k=s(x(),1);function KJ({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,_k.jsx)(Nc,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"url",prefix:(0,_k.jsx)(xk.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,_k.jsx)(xk.Icon,{icon:OM})})})}var pd=s(H(),1),t1=s(V(),1),Ck=s(N(),1);var Em=s(x(),1),{ValidatedNumberControl:sOe}=st(pd.privateApis);function ZJ(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function aOe({value:e,onChange:t,hideLabelFromVision:r,step:o}){let[n="",i=""]=e,a=(0,t1.useCallback)(c=>t([ZJ(c),i]),[t,i]),l=(0,t1.useCallback)(c=>t([n,ZJ(c)]),[t,n]);return(0,Em.jsx)(pd.BaseControl,{help:(0,Ck.__)("The max. value must be greater than the min. value."),children:(0,Em.jsxs)(pd.Flex,{direction:"row",gap:4,children:[(0,Em.jsx)(pd.__experimentalNumberControl,{label:(0,Ck.__)("Min."),value:n,max:i?Number(i)-o:void 0,onChange:a,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:o}),(0,Em.jsx)(pd.__experimentalNumberControl,{label:(0,Ck.__)("Max."),value:i,min:n?Number(n)+o:void 0,onChange:l,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:o})]})})}function Tk({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:a}){let l=t.format?.decimals??0,c=Math.pow(10,Math.abs(l)*-1),{label:u,description:d,getValue:f,setValue:m,isValid:h}=t,g=f({item:e})??"",v=t.isDisabled({item:e,field:t}),y=(0,t1.useCallback)(S=>{r(m({item:e,value:["",void 0].includes(S)?void 0:Number(S)}))},[e,r,m]),b=(0,t1.useCallback)(S=>{r(m({item:e,value:S}))},[e,r,m]);if(i===Fi){let S=["",""];return Array.isArray(g)&&g.length===2&&g.every(w=>typeof w=="number"||w==="")&&(S=g),(0,Em.jsx)(aOe,{value:S,onChange:b,hideLabelFromVision:o,step:c})}return(0,Em.jsx)(sOe,{required:!!h.required,markWhenOptional:n,customValidity:ir(h,a),label:u,help:d,value:g,onChange:y,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:c,min:h.min?h.min.constraint:void 0,max:h.max?h.max.constraint:void 0,disabled:v})}var XJ=s(x(),1);function QJ(e){return(0,XJ.jsx)(Tk,{...e})}var JJ=s(x(),1);function $J(e){return(0,JJ.jsx)(Tk,{...e})}var Pk=s(H(),1),e$=s(V(),1);var mV=s(x(),1),{ValidatedRadioControl:lOe}=st(Pk.privateApis);function t$({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,description:l,getValue:c,setValue:u,isValid:d}=t,f=t.isDisabled({item:e,field:t}),{elements:m,isLoading:h}=cn({elements:t.elements,getElements:t.getElements}),g=c({item:e}),v=(0,e$.useCallback)(y=>r(u({item:e,value:y})),[e,r,u]);return h?(0,mV.jsx)(Pk.Spinner,{}):(0,mV.jsx)(lOe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:ir(d,i),label:a,help:l,onChange:v,options:m,selected:g,hideLabelFromVision:o,disabled:f})}var pV=s(V(),1);var r$=s(x(),1);function o$({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:a}){let{prefix:l,suffix:c}=i||{};return(0,r$.jsx)(Nc,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a,prefix:l?(0,pV.createElement)(l):void 0,suffix:c?(0,pV.createElement)(c):void 0})}var n$=s(H(),1),i$=s(V(),1);var s$=s(x(),1),{ValidatedToggleControl:cOe}=st(n$.privateApis);function a$({field:e,onChange:t,data:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,description:l,getValue:c,setValue:u,isValid:d}=e,f=e.isDisabled({item:r,field:e}),m=(0,i$.useCallback)(()=>{t(u({item:r,value:!c({item:r})}))},[t,u,r,c]);return(0,s$.jsx)(cOe,{required:!!d.required,markWhenOptional:n,customValidity:ir(d,i),hidden:o,label:a,help:l,checked:c({item:r}),onChange:m,disabled:f})}var l$=s(H(),1),c$=s(V(),1);var u$=s(x(),1),{ValidatedTextareaControl:uOe}=st(l$.privateApis);function d$({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:a}){let{rows:l=4}=i||{},c=t.isDisabled({item:e,field:t}),{label:u,placeholder:d,description:f,setValue:m,isValid:h}=t,g=t.getValue({item:e}),v=(0,c$.useCallback)(y=>r(m({item:e,value:y})),[e,r,m]);return(0,u$.jsx)(uOe,{required:!!h.required,markWhenOptional:n,customValidity:ir(h,a),label:u,placeholder:d,value:g??"",help:f,onChange:v,rows:l,disabled:c,minLength:h.minLength?h.minLength.constraint:void 0,maxLength:h.maxLength?h.maxLength.constraint:void 0,__next40pxDefaultSize:!0,hideLabelFromVision:o})}var ab=s(H(),1),f$=s(V(),1);var Ek=s(x(),1),{ValidatedToggleGroupControl:dOe}=st(ab.privateApis);function m$({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{getValue:a,setValue:l,isValid:c}=t,u=t.isDisabled({item:e,field:t}),d=a({item:e}),f=(0,f$.useCallback)(v=>r(l({item:e,value:v})),[e,r,l]),{elements:m,isLoading:h}=cn({elements:t.elements,getElements:t.getElements});if(h)return(0,Ek.jsx)(ab.Spinner,{});if(m.length===0)return null;let g=m.find(v=>v.value===d);return(0,Ek.jsx)(dOe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:ir(c,i),__next40pxDefaultSize:!0,isBlock:!0,label:t.label,help:g?.description||t.description,onChange:f,value:d,hideLabelFromVision:o,children:m.map(v=>(0,Ek.jsx)(ab.__experimentalToggleGroupControlOption,{label:v.label,value:v.value,disabled:u},v.value))})}var kk=s(H(),1),Rk=s(V(),1);var r1=s(x(),1),{ValidatedFormTokenField:fOe}=st(kk.privateApis);function p$({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,placeholder:l,description:c,getValue:u,setValue:d,isValid:f}=t,m=u({item:e}),h=t.isDisabled({item:e,field:t}),{elements:g,isLoading:v}=cn({elements:t.elements,getElements:t.getElements}),y=(0,Rk.useMemo)(()=>Array.isArray(m)?m.map(S=>g?.find(_=>_.value===S)||{value:S,label:S}):[],[m,g]),b=(0,Rk.useCallback)(S=>{let w=S.map(_=>typeof _=="object"&&"value"in _?_.value:_);r(d({item:e,value:w}))},[r,d,e]);return v?(0,r1.jsx)(kk.Spinner,{}):(0,r1.jsx)(fOe,{required:!!f?.required,markWhenOptional:n,customValidity:ir(f,i),label:o?void 0:a,value:y,onChange:b,placeholder:l,suggestions:g?.map(S=>S.value),disabled:h,__experimentalValidateInput:S=>t.isValid?.elements&&g?g.some(w=>w.value===S||w.label===S):!0,__experimentalExpandOnFocus:g&&g.length>0,help:c??(t.isValid?.elements?"":void 0),displayTransform:S=>typeof S=="object"&&"label"in S?S.label:typeof S=="string"&&g&&g.find(_=>_.value===S)?.label||S,__experimentalRenderItem:({item:S})=>{if(typeof S=="string"&&g){let w=g.find(_=>_.value===S);return(0,r1.jsx)("span",{children:w?.label||S})}return(0,r1.jsx)("span",{children:S})}})}var mOe={grad:.9,turn:360,rad:360/(2*Math.PI)},hd=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},un=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},La=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},_$=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},h$=function(e){return{r:La(e.r,0,255),g:La(e.g,0,255),b:La(e.b,0,255),a:La(e.a)}},hV=function(e){return{r:un(e.r),g:un(e.g),b:un(e.b),a:un(e.a,3)}},pOe=/^#([0-9a-f]{3,8})$/i,Ak=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},x$=function(e){var t=e.r,r=e.g,o=e.b,n=e.a,i=Math.max(t,r,o),a=i-Math.min(t,r,o),l=a?i===t?(r-o)/a:i===r?2+(o-t)/a:4+(t-r)/a:0;return{h:60*(l<0?l+6:l),s:i?a/i*100:0,v:i/255*100,a:n}},C$=function(e){var t=e.h,r=e.s,o=e.v,n=e.a;t=t/360*6,r/=100,o/=100;var i=Math.floor(t),a=o*(1-r),l=o*(1-(t-i)*r),c=o*(1-(1-t+i)*r),u=i%6;return{r:255*[o,l,a,a,c,o][u],g:255*[c,o,o,l,a,a][u],b:255*[a,a,c,o,o,l][u],a:n}},g$=function(e){return{h:_$(e.h),s:La(e.s,0,100),l:La(e.l,0,100),a:La(e.a)}},v$=function(e){return{h:un(e.h),s:un(e.s),l:un(e.l),a:un(e.a,3)}},y$=function(e){return C$((r=(t=e).s,{h:t.h,s:(r*=((o=t.l)<50?o:100-o)/100)>0?2*r/(o+r)*100:0,v:o+r,a:t.a}));var t,r,o},o1=function(e){return{h:(t=x$(e)).h,s:(n=(200-(r=t.s))*(o=t.v)/100)>0&&n<200?r*o/100/(n<=100?n:200-n)*100:0,l:n/2,a:t.a};var t,r,o,n},hOe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,gOe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,vOe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,yOe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,yV={string:[[function(e){var t=pOe.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?un(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?un(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=vOe.exec(e)||yOe.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:h$({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=hOe.exec(e)||gOe.exec(e);if(!t)return null;var r,o,n=g$({h:(r=t[1],o=t[2],o===void 0&&(o="deg"),Number(r)*(mOe[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return y$(n)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,o=e.b,n=e.a,i=n===void 0?1:n;return hd(t)&&hd(r)&&hd(o)?h$({r:Number(t),g:Number(r),b:Number(o),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,r=e.s,o=e.l,n=e.a,i=n===void 0?1:n;if(!hd(t)||!hd(r)||!hd(o))return null;var a=g$({h:Number(t),s:Number(r),l:Number(o),a:Number(i)});return y$(a)},"hsl"],[function(e){var t=e.h,r=e.s,o=e.v,n=e.a,i=n===void 0?1:n;if(!hd(t)||!hd(r)||!hd(o))return null;var a=(function(l){return{h:_$(l.h),s:La(l.s,0,100),v:La(l.v,0,100),a:La(l.a)}})({h:Number(t),s:Number(r),v:Number(o),a:Number(i)});return C$(a)},"hsv"]]},b$=function(e,t){for(var r=0;r<t.length;r++){var o=t[r][0](e);if(o)return[o,t[r][1]]}return[null,void 0]},bOe=function(e){return typeof e=="string"?b$(e.trim(),yV.string):typeof e=="object"&&e!==null?b$(e,yV.object):[null,void 0]};var gV=function(e,t){var r=o1(e);return{h:r.h,s:La(r.s+100*t,0,100),l:r.l,a:r.a}},vV=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},w$=function(e,t){var r=o1(e);return{h:r.h,s:r.s,l:La(r.l+100*t,0,100),a:r.a}},bV=(function(){function e(t){this.parsed=bOe(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return un(vV(this.rgba),2)},e.prototype.isDark=function(){return vV(this.rgba)<.5},e.prototype.isLight=function(){return vV(this.rgba)>=.5},e.prototype.toHex=function(){return t=hV(this.rgba),r=t.r,o=t.g,n=t.b,a=(i=t.a)<1?Ak(un(255*i)):"","#"+Ak(r)+Ak(o)+Ak(n)+a;var t,r,o,n,i,a},e.prototype.toRgb=function(){return hV(this.rgba)},e.prototype.toRgbString=function(){return t=hV(this.rgba),r=t.r,o=t.g,n=t.b,(i=t.a)<1?"rgba("+r+", "+o+", "+n+", "+i+")":"rgb("+r+", "+o+", "+n+")";var t,r,o,n,i},e.prototype.toHsl=function(){return v$(o1(this.rgba))},e.prototype.toHslString=function(){return t=v$(o1(this.rgba)),r=t.h,o=t.s,n=t.l,(i=t.a)<1?"hsla("+r+", "+o+"%, "+n+"%, "+i+")":"hsl("+r+", "+o+"%, "+n+"%)";var t,r,o,n,i},e.prototype.toHsv=function(){return t=x$(this.rgba),{h:un(t.h),s:un(t.s),v:un(t.v),a:un(t.a,3)};var t},e.prototype.invert=function(){return no({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),no(gV(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),no(gV(this.rgba,-t))},e.prototype.grayscale=function(){return no(gV(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),no(w$(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),no(w$(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?no({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):un(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=o1(this.rgba);return typeof t=="number"?no({h:t,s:r.s,l:r.l,a:r.a}):un(r.h)},e.prototype.isEqual=function(t){return this.toHex()===no(t).toHex()},e})(),no=function(e){return e instanceof bV?e:new bV(e)},S$=[],Ik=function(e){e.forEach(function(t){S$.indexOf(t)<0&&(t(bV,yV),S$.push(t))})};var ms=s(H(),1),wV=s(V(),1),T$=s(N(),1);var gd=s(x(),1),{ValidatedInputControl:wOe}=st(ms.privateApis),SOe=({color:e,onColorChange:t,disabled:r})=>{let o=e&&no(e).isValid()?e:"#ffffff";return(0,gd.jsx)(ms.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:n})=>(0,gd.jsx)(ms.Button,{onClick:n,"aria-label":(0,T$.__)("Open color picker"),size:"small",disabled:r,accessibleWhenDisabled:!0,icon:()=>(0,gd.jsx)(ms.ColorIndicator,{colorValue:o})}),renderContent:()=>(0,gd.jsx)(ms.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,gd.jsx)(ms.ColorPicker,{color:o,onChange:t,enableAlpha:!0})})})};function P$({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,placeholder:l,description:c,setValue:u,isValid:d}=t,f=t.isDisabled({item:e,field:t}),m=t.getValue({item:e})||"",h=(0,wV.useCallback)(v=>{r(u({item:e,value:v}))},[e,r,u]),g=(0,wV.useCallback)(v=>{r(u({item:e,value:v||""}))},[e,r,u]);return(0,gd.jsx)(wOe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:ir(d,i),label:a,placeholder:l,value:m,help:c,onChange:g,hideLabelFromVision:o,type:"text",disabled:f,prefix:(0,gd.jsx)(ms.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,gd.jsx)(SOe,{color:m,onColorChange:h,disabled:f})})})}var Nk=s(H(),1),Mk=s(V(),1),SV=s(N(),1);var Ok=s(x(),1);function E$({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let[a,l]=(0,Mk.useState)(!1),c=t.isDisabled({item:e,field:t}),u=(0,Mk.useCallback)(()=>{l(d=>!d)},[]);return(0,Ok.jsx)(Nc,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:a?"text":"password",suffix:(0,Ok.jsx)(Nk.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Ok.jsx)(Nk.Button,{icon:a?xS:Jp,onClick:u,size:"small",label:a?(0,SV.__)("Hide password"):(0,SV.__)("Show password"),disabled:c,accessibleWhenDisabled:!0})})})}function Fk(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var R$=s(x(),1),k$={adaptiveSelect:HJ,array:p$,checkbox:MJ,color:P$,combobox:fk,datetime:BJ,date:jJ,email:YJ,telephone:qJ,url:KJ,integer:QJ,number:$J,password:E$,radio:t$,select:vk,text:o$,toggle:a$,textarea:d$,toggleGroup:m$};function _Oe(e){return e&&typeof e=="object"&&typeof e.control=="string"}function xOe(e){let{control:t,...r}=e,o=Dk(t);return o===null?null:function(i){return(0,R$.jsx)(o,{...i,config:r})}}function A$(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?Dk(e.Edit):_Oe(e.Edit)?xOe(e.Edit):Fk(e)&&e.type!=="array"?Dk("adaptiveSelect"):t===null?null:Dk(t)}function Dk(e){return Object.keys(k$).includes(e)?k$[e]:null}function COe(e,t,r){if(e.filterBy===!1)return!1;let o=e.filterBy?.operators?.filter(n=>r.includes(n))??t;return o.length===0?!1:{isPrimary:!!e.filterBy?.isPrimary,operators:o}}var I$=COe;var TOe=e=>({item:t})=>{let r=e.split("."),o=t;for(let n of r)o.hasOwnProperty(n)?o=o[n]:o=void 0;return o},O$=TOe;var POe=e=>({value:t})=>{let r=e.split("."),o={},n=o;for(let i of r.slice(0,-1))n[i]={},n=n[i];return n[r.at(-1)]=t,o},N$=POe;var F$=s(N(),1);function Lk({item:e,field:t}){let{elements:r,isLoading:o}=cn({elements:t.elements,getElements:t.getElements}),n=t.getValue({item:e});return o||r.length===0?n:r?.find(i=>i.value===n)?.label||t.getValue({item:e})}var M$=s(x(),1);function io({item:e,field:t}){return t.hasElements?(0,M$.jsx)(Lk,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var Mc=(e,t,r)=>r==="asc"?e.localeCompare(t):t.localeCompare(e);function so(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)}function Fc(e,t){if(typeof t.isValid.minLength?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:String(r).length>=t.isValid.minLength.constraint}function Dc(e,t){if(typeof t.isValid.maxLength?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:String(r).length<=t.isValid.maxLength.constraint}function Lc(e,t){if(t.isValid.pattern?.constraint===void 0)return!0;try{let r=new RegExp(t.isValid.pattern.constraint),o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:r.test(String(o))}catch{return!1}}function hr(e,t){let o=(t.elements??[]).map(i=>i.value);if(o.length===0)return!0;let n=t.getValue({item:e});return[].concat(n).every(i=>o.includes(i))}function EOe({item:e,field:t}){return t.getValue({item:e})}var Hi=EOe;var kOe=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function ROe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!kOe.test(r)?(0,F$.__)("Value must be a valid email address."):null}var D$={type:"email",render:io,Edit:"email",sort:Mc,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ar,Ir],validOperators:[Ur,Gr,bc,wc,Sc,Ar,Ir,ni,ii],format:{},getValueFormatted:Hi,validate:{required:so,pattern:Lc,minLength:Fc,maxLength:Dc,elements:hr,custom:ROe}};var L$=s(N(),1);var lb=(e,t,r)=>r==="asc"?e-t:t-e;function Bk(e,t){if(typeof t.isValid.min?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:Number(r)>=t.isValid.min.constraint}function Vk(e,t){if(typeof t.isValid.max?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:Number(r)<=t.isValid.max.constraint}var B$={separatorThousand:","};function AOe({item:e,field:t}){let r=t.getValue({item:e});if(r==null)return"";if(r=Number(r),!Number.isFinite(r))return String(r);let o;t.type!=="integer"?o=B$:o=t.format;let{separatorThousand:n}=o,i=Math.trunc(r);return n?String(i).replace(/\B(?=(\d{3})+(?!\d))/g,n):String(i)}function IOe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Number.isInteger(r)?(0,L$.__)("Value must be an integer."):null}var V$={type:"integer",render:io,Edit:"integer",sort:lb,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ur,Gr,$f,em,tm,rm,Fi],validOperators:[Ur,Gr,$f,em,tm,rm,Fi,Ar,Ir,ni,ii],format:B$,getValueFormatted:AOe,validate:{required:so,min:Bk,max:Vk,elements:hr,custom:IOe}};var j$=s(N(),1);var z$={separatorThousand:",",separatorDecimal:".",decimals:2};function OOe({item:e,field:t}){let r=t.getValue({item:e});if(r==null)return"";if(r=Number(r),!Number.isFinite(r))return String(r);let o;t.type!=="number"?o=z$:o=t.format;let{separatorThousand:n,separatorDecimal:i,decimals:a}=o,l=r.toFixed(a),[c,u]=l.split("."),d=n?c.replace(/\B(?=(\d{3})+(?!\d))/g,n):c;return a===0?d:d+i+u}function NOe(e){return e===""||e===void 0||e===null}function MOe(e,t){let r=t.getValue({item:e});return!NOe(r)&&!Number.isFinite(r)?(0,j$.__)("Value must be a number."):null}var H$={type:"number",render:io,Edit:"number",sort:lb,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ur,Gr,$f,em,tm,rm,Fi],validOperators:[Ur,Gr,$f,em,tm,rm,Fi,Ar,Ir,ni,ii],format:z$,getValueFormatted:OOe,validate:{required:so,min:Bk,max:Vk,elements:hr,custom:MOe}};var U$={type:"text",render:io,Edit:"text",sort:Mc,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ar,Ir],validOperators:[Ur,Gr,bc,wc,Sc,Ar,Ir,ni,ii],format:{},getValueFormatted:Hi,validate:{required:so,pattern:Lc,minLength:Fc,maxLength:Dc,elements:hr}};var eg=s(go(),1);var W$=s(go(),1);function G$(e){if(!e||!cd(new Date(e)))return null;let t=(0,W$.getDate)(e);return t&&cd(t)?t:null}function Y$(e,t,r){let o=t.isValid[r]?.constraint;if(typeof o!="string")return!1;let n=t.getValue({item:e}),i=Array.isArray(n)?n[r==="min"?0:n.length-1]:n;if(i==null||i==="")return!0;let a=G$(o),l=G$(String(i));return!!a&&!!l&&(r==="min"?l.getTime()>=a.getTime():l.getTime()<=a.getTime())}function jk(e,t){return Y$(e,t,"min")}function zk(e,t){return Y$(e,t,"max")}var q$={datetime:(0,eg.getSettings)().formats.datetime,weekStartsOn:(0,eg.getSettings)().l10n.startOfWeek};function FOe({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="datetime"?o=q$:o=t.format,(0,eg.dateI18n)(o.datetime,(0,eg.getDate)(r))}var DOe=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},K$={type:"datetime",render:io,Edit:"datetime",sort:DOe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[am,lm,om,nm,im,sm,Di,cs],validOperators:[am,lm,om,nm,im,sm,Di,cs],format:q$,getValueFormatted:FOe,validate:{required:so,elements:hr,min:jk,max:zk}};var tg=s(go(),1);var Z$={date:(0,tg.getSettings)().formats.date,weekStartsOn:(0,tg.getSettings)().l10n.startOfWeek};function LOe({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="date"?o=Z$:o=t.format,(0,tg.dateI18n)(o.date,(0,tg.getDate)(r))}var BOe=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},X$={type:"date",render:io,Edit:"date",sort:BOe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[am,lm,om,nm,im,sm,Di,cs,Fi],validOperators:[am,lm,om,nm,im,sm,Di,cs,Fi],format:Z$,getValueFormatted:LOe,validate:{required:so,elements:hr,min:jk,max:zk}};var Hk=s(N(),1);function Q$(e,t){return t.getValue({item:e})===!0}function VOe({item:e,field:t}){let r=t.getValue({item:e});return r===!0?(0,Hk.__)("True"):r===!1?(0,Hk.__)("False"):""}function jOe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&![!0,!1].includes(r)?(0,Hk.__)("Value must be true, false, or undefined"):null}var zOe=(e,t,r)=>{let o=!!e;return o===!!t?0:r==="asc"?o?1:-1:o?-1:1},J$={type:"boolean",render:io,Edit:"checkbox",sort:zOe,validate:{required:Q$,elements:hr,custom:jOe},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ur,Gr],validOperators:[Ur,Gr],format:{},getValueFormatted:VOe};var $$={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:Hi,validate:{}};var _V=s(N(),1);function eee(e,t){let r=t.getValue({item:e});return Array.isArray(r)&&r.length>0&&r.every(o=>![void 0,"",null].includes(o))}function tee({item:e,field:t}){let r=t.getValue({item:e});return(Array.isArray(r)?r:[]).join(", ")}function HOe({item:e,field:t}){return tee({item:e,field:t})}function UOe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Array.isArray(r)?(0,_V.__)("Value must be an array."):r.every(o=>typeof o=="string")?null:(0,_V.__)("Every value must be a string.")}var GOe=(e,t,r)=>{let o=Array.isArray(e)?e:[],n=Array.isArray(t)?t:[];if(o.length!==n.length)return r==="asc"?o.length-n.length:n.length-o.length;let i=o.join(","),a=n.join(",");return r==="asc"?i.localeCompare(a):a.localeCompare(i)},ree={type:"array",render:HOe,Edit:"array",sort:GOe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ar,Ir],validOperators:[Ar,Ir,ni,ii],format:{},getValueFormatted:tee,validate:{required:eee,elements:hr,custom:UOe}};function WOe({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var oee={type:"password",render:io,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:WOe,validate:{required:so,pattern:Lc,minLength:Fc,maxLength:Dc,elements:hr}};var nee={type:"telephone",render:io,Edit:"telephone",sort:Mc,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ar,Ir],validOperators:[Ur,Gr,bc,wc,Sc,Ar,Ir,ni,ii],format:{},getValueFormatted:Hi,validate:{required:so,pattern:Lc,minLength:Fc,maxLength:Dc,elements:hr}};var iee=s(N(),1);var cb=s(x(),1);function YOe({item:e,field:t}){if(t.hasElements)return(0,cb.jsx)(Lk,{item:e,field:t});let r=Hi({item:e,field:t});return!r||!no(r).isValid()?r:(0,cb.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,cb.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:r,border:"1px solid #ddd",flexShrink:0}}),(0,cb.jsx)("span",{children:r})]})}function qOe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!no(r).isValid()?(0,iee.__)("Value must be a valid color."):null}var KOe=(e,t,r)=>{let o=no(e),n=no(t);if(!o.isValid()&&!n.isValid())return 0;if(!o.isValid())return r==="asc"?1:-1;if(!n.isValid())return r==="asc"?-1:1;let i=o.toHsl(),a=n.toHsl();return i.h!==a.h?r==="asc"?i.h-a.h:a.h-i.h:i.s!==a.s?r==="asc"?i.s-a.s:a.s-i.s:r==="asc"?i.l-a.l:a.l-i.l},see={type:"color",render:YOe,Edit:"color",sort:KOe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ar,Ir],validOperators:[Ur,Gr,Ar,Ir],format:{},getValueFormatted:Hi,validate:{required:so,elements:hr,custom:qOe}};var aee={type:"url",render:io,Edit:"url",sort:Mc,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ar,Ir],validOperators:[Ur,Gr,bc,wc,Sc,Ar,Ir,ni,ii],format:{},getValueFormatted:Hi,validate:{required:so,pattern:Lc,minLength:Fc,maxLength:Dc,elements:hr}};var ZOe=(e,t,r)=>typeof e=="number"&&typeof t=="number"?lb(e,t,r):Mc(e,t,r),lee={render:io,Edit:null,sort:ZOe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ur,Gr],validOperators:nJ(),format:{},getValueFormatted:Hi,validate:{required:so,elements:hr}};function XOe(e){return e==="integer"||e==="number"}function QOe(e){return e==="date"||e==="datetime"}function cee(e,t,r){let o=t.validate[r];if(o&&(typeof e=="number"&&XOe(t.type)||typeof e=="string"&&QOe(t.type)))return{constraint:e,validate:o}}function uee(e,t){let r=e.isValid,o;r?.required===!0&&t.validate.required!==void 0&&(o={constraint:!0,validate:t.validate.required});let n;(r?.elements===!0||r?.elements===void 0&&(e.elements||e.getElements))&&t.validate.elements!==void 0&&(n={constraint:!0,validate:t.validate.elements});let i=cee(r?.min,t,"min"),a=cee(r?.max,t,"max"),l=r?.minLength,c;typeof l=="number"&&t.validate.minLength!==void 0&&(c={constraint:l,validate:t.validate.minLength});let u=r?.maxLength,d;typeof u=="number"&&t.validate.maxLength!==void 0&&(d={constraint:u,validate:t.validate.maxLength});let f=r?.pattern,m;f!==void 0&&t.validate.pattern!==void 0&&(m={constraint:f,validate:t.validate.pattern});let h=r?.custom??t.validate.custom;return{required:o,elements:n,min:i,max:a,minLength:c,maxLength:d,pattern:m,custom:h}}function dee(e){return e.validOperators.reduce((t,r)=>{let o=Jh(r);return o?.filter&&(t[r]=o.filter),t},{})}function JOe(e,t){return{...t.format,...e.format}}var fee=JOe;function $Oe(e){let t=[D$,V$,H$,U$,K$,X$,J$,$$,ree,oee,nee,see,aee].find(r=>r?.type===e);return t||lee}function rg(e){return e.map(t=>{let r=$Oe(t.type),o=t.getValue||O$(t.id),n=function(i,a,l){let c=o({item:i}),u=o({item:a});return t.sort?t.sort(c,u,l):r.sort(c,u,l)};return{id:t.id,label:t.label||t.id,header:t.header||t.label||t.id,description:t.description,placeholder:t.placeholder,getValue:o,setValue:t.setValue||N$(t.id),elements:t.elements,getElements:t.getElements,hasElements:Fk(t),isVisible:t.isVisible,isDisabled:typeof t.isDisabled=="function"?t.isDisabled:()=>!!t.isDisabled,enableHiding:t.enableHiding??!0,readOnly:t.readOnly??!1,type:r.type,render:t.render??r.render,Edit:A$(t,r.Edit),sort:n,enableSorting:t.enableSorting??r.enableSorting,enableGlobalSearch:t.enableGlobalSearch??r.enableGlobalSearch,isValid:uee(t,r),filterBy:I$(t,r.defaultOperators,r.validOperators),filter:dee(r),format:fee(t,r),getValueFormatted:t.getValueFormatted??r.getValueFormatted}})}var Ln=s(V(),1);function mee({view:e,data:t,getItemId:r,isLoading:o,paginationInfo:n,selection:i}){let a=e.infiniteScrollEnabled,[l,c]=(0,Ln.useState)(!o);(0,Ln.useEffect)(()=>{o||c(!0)},[o]);let u=(0,Ln.useRef)(t),d=(0,Ln.useRef)(n);(0,Ln.useEffect)(()=>{o||(u.current=t,d.current=n)},[t,o,n]);let[f,m]=(0,Ln.useState)([]),h=(0,Ln.useRef)(new Map),g=(0,Ln.useRef)([]),v=(0,Ln.useRef)({search:void 0,filters:void 0,perPage:void 0}),y=(0,Ln.useRef)(void 0),b=(0,Ln.useRef)(void 0),S=(0,Ln.useRef)(!1),w=(0,Ln.useMemo)(()=>{e.startPosition!==void 0&&b.current!==void 0&&(e.startPosition<b.current?y.current="up":e.startPosition>b.current&&(y.current="down")),b.current=e.startPosition;let _=JSON.stringify(e.filters??[]),C=v.current.filters,k=!S.current||!e.infiniteScrollEnabled||e.search!==v.current.search||_!==C||e.perPage!==v.current.perPage;if(S.current=!0,v.current={search:e.search,filters:_,perPage:e.perPage},k){h.current.clear(),y.current=void 0;let z=e.search?1:e.startPosition??1,W=t.map((O,M)=>{let D=z+M;return h.current.set(r(O),D),{...O,position:D}});return g.current=W,W}let A=g.current,R=new Set(t.map(r)),I=y.current,B=e.search?1:e.startPosition??1,E=t.map((z,W)=>{let O=r(z),M=e.infiniteScrollEnabled?B+W:void 0;return M!==void 0&&h.current.set(O,M),{...z,position:M}});if(E.length===0)return A;let P=A.filter(z=>!R.has(r(z))),L=I==="up"?[...E,...P]:[...P,...E];L.sort((z,W)=>{let O=z.position,M=W.position;return O-M});let j=L;if(f.length>0){let z=Math.min(...f),W=Math.max(...f),O=20,M=L.map(Z=>Z.position),D=Math.min(...M);!(Math.max(...M)<z-O||D>W+O)&&(j=L.filter(Z=>{let te=r(Z);if(i?.includes(te))return!0;let Se=Z.position;return I==="up"?Se<=W+O:I==="down"?Se>=z-O:Se>=z-O&&Se<=W+O}))}return g.current=j,j},[t,e.search,e.filters,e.perPage,e.startPosition,e.infiniteScrollEnabled,f,i,r]);return a?{data:w,paginationInfo:n,hasInitiallyLoaded:l,setVisibleEntries:m}:{data:(o&&u.current?.length?u.current:t).map(C=>({...C,position:void 0})),paginationInfo:o&&u.current?.length?d.current:n,hasInitiallyLoaded:l,setVisibleEntries:void 0}}var Ui=s(V(),1),hee=s(we(),1);function pee(e,t,r){let o=e.getBoundingClientRect(),n=o.top+o.height/2,i=Array.from(e.querySelectorAll("[aria-posinset]"));if(i.length===0)return!1;let a=i.reduce((u,d)=>{let f=d.getBoundingClientRect(),m=f.top+f.height/2,h=Math.abs(m-n),g=u.getBoundingClientRect(),v=g.top+g.height/2,y=Math.abs(v-n);return h<y?d:u}),l=Number(a.getAttribute("aria-posinset")),c=a.getBoundingClientRect();return t.current={posinset:l,viewportOffset:c.top-o.top,direction:r},!0}function gee({view:e,onChangeView:t,isLoading:r,paginationInfo:o,containerRef:n,setVisibleEntries:i}){let a=(0,Ui.useRef)(null),l=(0,Ui.useRef)(e),c=(0,Ui.useRef)(r),u=(0,Ui.useRef)(t),d=(0,Ui.useRef)(o.totalItems);(0,Ui.useLayoutEffect)(()=>{l.current=e,c.current=r,u.current=t,d.current=o.totalItems},[e,r,t,o.totalItems]);let f=(0,Ui.useCallback)(h=>{i&&i(g=>{let v=new Set(g),y=!1;return h.forEach(b=>{let S=Number(b.target?.attributes?.getNamedItem("aria-posinset")?.value);isNaN(S)||(b.isIntersecting?v.has(S)||(v.add(S),y=!0):v.has(S)&&(v.delete(S),y=!0))}),y?Array.from(v).sort():g})},[i]);(0,Ui.useLayoutEffect)(()=>{let h=n.current,g=a.current;if(!h||!e.infiniteScrollEnabled||!g||r)return;let v=h.querySelector(`[aria-posinset="${g.posinset}"]`);if(v){let y=h.getBoundingClientRect(),w=v.getBoundingClientRect().top-y.top-g.viewportOffset;Math.abs(w)>1&&(h.scrollTop+=w)}a.current=null},[n,r,e.infiniteScrollEnabled]);let m=(0,Ui.useRef)(null);return(0,Ui.useEffect)(()=>{if(!e.infiniteScrollEnabled||!f){m.current&&(m.current.disconnect(),m.current=null);return}return m.current=new IntersectionObserver(f,{root:null,rootMargin:"0px",threshold:.1}),()=>{m.current&&(m.current.disconnect(),m.current=null)}},[e.infiniteScrollEnabled,f]),(0,Ui.useEffect)(()=>{if(!e.infiniteScrollEnabled||!n.current)return;let h=0,g=600,v=800,y=(0,hee.throttle)(S=>{let w=l.current,_=d.current,C=S.target,k=C.scrollTop,A=C.scrollHeight,R=C.clientHeight,I=k>h?"down":"up";if(h=k,c.current)return;let B=w.startPosition||1,E=w.perPage||10,P=Math.min(B+E,_);if(I==="down"&&k+R>=A-g&&P<_){let L=P;pee(C,a,"down"),u.current({...w,startPosition:L})}if(I==="up"&&k<=v&&B>1){let L=B-E,j=L<6?1:L;pee(C,a,"up"),u.current({...w,startPosition:j})}},50),b=n.current;return b.addEventListener("scroll",y),()=>{b.removeEventListener("scroll",y),y.cancel()}},[n,e.infiniteScrollEnabled]),{intersectionObserver:m.current}}var Bn=s(x(),1),eNe=e=>e.id,tNe=()=>!0,rNe=[],oNe={table:{},grid:{},list:{}},nNe=hm.filter(e=>!e.isPicker);function iNe({header:e,search:t=!0,searchLabel:r=void 0}){let{view:o}=(0,fi.useContext)(Ze),n=o.infiniteScrollEnabled;return(0,Bn.jsxs)(Bn.Fragment,{children:[(0,Bn.jsxs)(re,{direction:"row",align:"top",justify:"space-between",className:K("dataviews__view-actions",{"dataviews__view-actions--infinite-scroll":n}),gap:"xs",children:[(0,Bn.jsxs)(re,{direction:"row",justify:"start",gap:"sm",className:"dataviews__search",children:[t&&(0,Bn.jsx)(rV,{label:r}),(0,Bn.jsx)(ck,{})]}),(0,Bn.jsxs)(re,{direction:"row",gap:"xs",style:{flexShrink:0},children:[(0,Bn.jsx)(AJ,{}),e]})]}),(0,Bn.jsx)(uk,{className:"dataviews-filters__container"}),(0,Bn.jsx)(eV,{}),(0,Bn.jsx)(tV,{})]})}function sNe({view:e,onChangeView:t,fields:r,search:o=!0,searchLabel:n=void 0,actions:i=rNe,data:a,getItemId:l=eNe,getItemLevel:c,isLoading:u=!1,paginationInfo:d,defaultLayouts:f=oNe,selection:m,onChangeSelection:h,onClickItem:g,renderItemLink:v,isItemClickable:y=tNe,header:b,children:S,config:w={perPageSizes:[10,20,50,100]},empty:_,onReset:C}){let[k,A]=(0,fi.useState)([]),R=m===void 0||h===void 0,I=R?k:m,{data:B,paginationInfo:E,hasInitiallyLoaded:P,setVisibleEntries:L}=mee({view:e,data:a,getItemId:l,isLoading:u,selection:I,paginationInfo:d}),j=(0,fi.useRef)(null),[z,W]=(0,fi.useState)(0),O=(0,vee.useResizeObserver)(pe=>{W(pe[0].borderBoxSize[0].inlineSize)},{box:"border-box"}),[M,D]=(0,fi.useState)(null);function G(pe){let ve=typeof pe=="function"?pe(I):pe;R&&A(ve),h&&h(ve)}let q=(0,fi.useMemo)(()=>rg(r),[r]),Z=(0,fi.useMemo)(()=>e.infiniteScrollEnabled?I:I.filter(pe=>a.some(ve=>l(ve)===pe)),[I,a,l,e.infiniteScrollEnabled]),te=Z_(q,e),ie=(0,fi.useMemo)(()=>(te||[]).some(pe=>pe.isPrimary||pe.isLocked),[te]),[Se,fe]=(0,fi.useState)(ie),{intersectionObserver:X}=gee({view:e,onChangeView:t,isLoading:u,paginationInfo:d,containerRef:j,setVisibleEntries:L});(0,fi.useEffect)(()=>{ie&&!Se&&fe(!0)},[ie,Se]);let ee=(0,fi.useMemo)(()=>Object.fromEntries(Object.entries(f).filter(([pe])=>nNe.some(ve=>ve.type===pe)).map(([pe,ve])=>[pe,ve===!0?{}:ve])),[f]);return ee[e.type]?(0,Bn.jsx)(Ze.Provider,{value:{view:e,onChangeView:t,fields:q,actions:i,data:B,isLoading:u,paginationInfo:E,selection:Z,onChangeSelection:G,openedFilter:M,setOpenedFilter:D,getItemId:l,getItemLevel:c,isItemClickable:y,onClickItem:g,renderItemLink:v,containerWidth:z,containerRef:j,resizeObserverRef:O,defaultLayouts:ee,filters:te,isShowingFilter:Se,setIsShowingFilter:fe,config:w,empty:_,hasInitiallyLoaded:P,onReset:C,intersectionObserver:X},children:(0,Bn.jsx)("div",{className:"dataviews-wrapper",children:S??(0,Bn.jsx)(iNe,{header:b,search:o,searchLabel:n})})}):null}var kl=sNe;kl.BulkActionToolbar=u2;kl.Filters=Q_;kl.FiltersToggled=uk;kl.FiltersToggle=ck;kl.Layout=eV;kl.LayoutSwitcher=iV;kl.Pagination=tB;kl.Search=rV;kl.ViewConfig=sV;kl.Footer=tV;var Uk=kl;var EV=s(V(),1);var yee=s(V(),1),bee=s(x(),1),xV=(0,yee.createContext)({fields:[]});xV.displayName="DataFormContext";function wee({fields:e,children:t}){return(0,bee.jsx)(xV.Provider,{value:{fields:e},children:t})}var Ba=xV;var eR=s(V(),1);var Wk=s(V(),1),i1=s(H(),1);var n1=s(N(),1),mi={type:"regular",labelPosition:"top"},aNe=e=>typeof e=="string"?[{id:e,visibility:"when-collapsed"}]:e.map(t=>typeof t=="string"?{id:t,visibility:"when-collapsed"}:{id:t.id,visibility:t.visibility});function See(e){let t=mi;if(e?.type==="regular")t={type:"regular",labelPosition:e?.labelPosition??"top"};else if(e?.type==="panel"){let r=e.summary??[],o=Array.isArray(r)?r:[r],n=e?.openAs,i;typeof n=="object"&&n.type==="modal"?i={type:"modal",applyLabel:n.applyLabel?.trim()||(0,n1.__)("Apply"),cancelLabel:n.cancelLabel?.trim()||(0,n1.__)("Cancel")}:n==="modal"?i={type:"modal",applyLabel:(0,n1.__)("Apply"),cancelLabel:(0,n1.__)("Cancel")}:i={type:"dropdown"},t={type:"panel",labelPosition:e?.labelPosition??"side",openAs:i,summary:o,editVisibility:e?.editVisibility??"on-hover"}}else if(e?.type==="card")if(e.withHeader===!1)t={type:"card",withHeader:!1,isOpened:!0,summary:[],isCollapsible:!1};else{let r=e.summary??[];t={type:"card",withHeader:!0,isOpened:typeof e.isOpened=="boolean"?e.isOpened:!0,summary:aNe(r),isCollapsible:e.isCollapsible===void 0?!0:e.isCollapsible}}else e?.type==="row"?t={type:"row",alignment:e?.alignment??"center",styles:e?.styles??{}}:e?.type==="details"&&(t={type:"details",summary:e?.summary??""});return t}function _ee(e){let t=See(e?.layout),r=(e.fields??[]).map(o=>{if(typeof o=="string")return{id:o,layout:t};let n=o.layout?See(o.layout):t;return{id:o.id,layout:n,...!!o.label&&{label:o.label},...!!o.description&&{description:o.description},..."children"in o&&Array.isArray(o.children)&&{children:_ee({fields:o.children,layout:mi}).fields}}});return{layout:t,fields:r}}var Gk=_ee;var Or=s(x(),1);function lNe({title:e}){return(0,Or.jsx)(re,{direction:"column",className:"dataforms-layouts-regular__header",gap:"lg",children:(0,Or.jsx)(re,{direction:"row",align:"center",children:(0,Or.jsx)(i1.__experimentalHeading,{level:2,size:13,children:e})})})}function xee({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{fields:a}=(0,Wk.useContext)(Ba),l=t.layout,c=(0,Wk.useMemo)(()=>({layout:mi,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,Or.jsxs)(Or.Fragment,{children:[!o&&t.label&&(0,Or.jsx)(lNe,{title:t.label}),(0,Or.jsx)(ps,{data:e,form:c,onChange:r,validity:i?.children})]});let u=l.labelPosition,d=a.find(f=>f.id===t.id);return!d||!d.Edit?null:u==="side"?(0,Or.jsxs)(re,{direction:"row",className:"dataforms-layouts-regular__field",gap:"sm",children:[(0,Or.jsx)("div",{className:K("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${u}`),children:(0,Or.jsx)(i1.BaseControl.VisualLabel,{children:d.label})}),(0,Or.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:d.readOnly===!0?(0,Or.jsx)(d.render,{item:e,field:d}):(0,Or.jsx)(d.Edit,{data:e,field:d,onChange:r,hideLabelFromVision:!0,markWhenOptional:n,validity:i},d.id)})]}):(0,Or.jsx)("div",{className:"dataforms-layouts-regular__field",children:d.readOnly===!0?(0,Or.jsx)(Or.Fragment,{children:(0,Or.jsxs)(Or.Fragment,{children:[!o&&u!=="none"&&(0,Or.jsx)(i1.BaseControl.VisualLabel,{children:d.label}),(0,Or.jsx)(d.render,{item:e,field:d})]})}):(0,Or.jsx)(d.Edit,{data:e,field:d,onChange:r,hideLabelFromVision:u==="none"?!0:o,markWhenOptional:n,validity:i})})}var TV=s(Yk(),1),og=s(H(),1),Rl=s(V(),1),Xk=s(we(),1);var fb=s(H(),1),db=s(N(),1);var Iee=s(we(),1),Oee=s(V(),1);function _Ne(e,t){return K("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${e}`,{"has-error":t})}var Eee=_Ne;var qk=s(H(),1);var a1=s(x(),1);function xNe(e,t,r){return e?(0,a1.jsx)(qk.Tooltip,{text:t,placement:"top",children:(0,a1.jsxs)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:[(0,a1.jsx)(qk.Icon,{icon:Mu,size:16}),r]})}):r}var kee=xNe;function Ree(e){if(!e)return;let t=Object.keys(e).filter(r=>r!=="children");for(let r of t){let o=e[r];if(o!==void 0&&o.type==="invalid")return o.message?o.message:r==="required"?"A required field is empty":"Unidentified validation error"}if(e.children)for(let r of Object.values(e.children)){let o=Ree(r);if(o)return o}}var Aee=Ree;var Qs=s(x(),1);function l1({data:e,field:t,fieldLabel:r,summaryFields:o,validity:n,touched:i,disabled:a,onClick:l,"aria-expanded":c}){let{labelPosition:u,editVisibility:d}=t.layout,f=Aee(n),m=i&&!!f,h=Eee(u,m),g=kee(m,f,r),v=K("dataforms-layouts-panel__field-trigger",`dataforms-layouts-panel__field-trigger--label-${u}`,{"is-disabled":a,"dataforms-layouts-panel__field-trigger--edit-always":d==="always"}),y=(0,Iee.useInstanceId)(l1,"dataforms-layouts-panel__field-control"),b=m?(0,db.sprintf)((0,db._x)("Edit %s (has errors)","field"),r||""):(0,db.sprintf)((0,db._x)("Edit %s","field"),r||""),S=(0,Oee.useRef)(null);return(0,Qs.jsxs)("div",{ref:S,className:v,onClick:a?void 0:()=>{let C=S.current?.ownerDocument.defaultView?.getSelection();C&&C.toString().length>0||l()},onKeyDown:a?void 0:C=>{C.target===C.currentTarget&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),l())},children:[u!=="none"&&(0,Qs.jsx)("span",{className:h,children:g}),u==="none"&&m&&(0,Qs.jsx)(fb.Tooltip,{text:f,placement:"top",children:(0,Qs.jsx)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:(0,Qs.jsx)(fb.Icon,{icon:Mu,size:16})})}),(0,Qs.jsx)("span",{id:`${y}`,className:"dataforms-layouts-panel__field-control",children:o.length>1?(0,Qs.jsx)("span",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:o.map(C=>(0,Qs.jsx)("span",{style:{width:"100%"},children:(0,Qs.jsx)(C.render,{item:e,field:C})},C.id))}):o.map(C=>(0,Qs.jsx)(C.render,{item:e,field:C},C.id))}),!a&&(0,Qs.jsx)(fb.Button,{className:"dataforms-layouts-panel__field-trigger-icon",label:b,icon:pS,size:"small","aria-expanded":c,"aria-haspopup":"dialog","aria-describedby":`${y}`})]})}var Nee=s(Yk(),1),CV=s(K2(),1),Bc=s(V(),1),Gi=s(N(),1);function Mee(e){return e?Object.values(e).every(t=>Object.entries(t).every(([r,o])=>r==="children"&&o&&typeof o=="object"?Mee(o):o.type!=="invalid"&&o.type!=="validating")):!0}function CNe(e,t){let r=Gk(e);if(r.fields.length===0)return[];let o=new Map;t.forEach(a=>{o.set(a.id,a)});function n(a){if("children"in a&&Array.isArray(a.children)){let u=a.children.map(n).filter(f=>f!==null);if(u.length===0)return null;let d=o.get(a.id);if(d){let[f]=rg([d]);return{id:a.id,children:u,field:f}}return{id:a.id,children:u}}let l=o.get(a.id);if(!l)return null;let[c]=rg([l]);return{id:a.id,children:[],field:c}}return r.fields.map(n).filter(a=>a!==null)}function mb(e,t,r){if(e||(e={}),r.length===0)return e;let o={...e},n=o;for(let a=0;a<r.length-1;a++){let l=r[a];n[l]||(n[l]={}),n[l]={...n[l]},n=n[l]}let i=r[r.length-1];return n[i]={...n[i]||{},...t},o}function Fee(e,t,r){if(!e||t.length===0)return e;let o={...e},n=o;for(let l=0;l<t.length-1;l++){let c=t[l];if(!n[c])return e;n[c]={...n[c]},n=n[c]}let i=t[t.length-1];if(!n[i])return e;let a={...n[i]};if(delete a[r],Object.keys(a).length===0?delete n[i]:n[i]=a,Object.keys(o).length!==0)return o}function TNe(e,t,r){let{elementsCounterRef:o,setFormValidity:n,path:i,item:a}=r,l=(o.current[t.id]||0)+1;o.current[t.id]=l,e.then(c=>{if(l===o.current[t.id]){if(!Array.isArray(c)){n(u=>mb(u,{elements:{type:"invalid",message:(0,Gi.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(a,{...t.field,elements:c})?n(u=>mb(u,{elements:{type:"invalid",message:(0,Gi.__)("Value must be one of the elements.")}},[...i,t.id])):n(u=>Fee(u,[...i,t.id],"elements"))}}).catch(c=>{if(l!==o.current[t.id])return;let u;c instanceof Error?u=c.message:u=String(c)||(0,Gi.__)("Unknown error when running elements validation asynchronously."),n(d=>mb(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function PNe(e,t,r){let{customCounterRef:o,setFormValidity:n,path:i}=r,a=(o.current[t.id]||0)+1;o.current[t.id]=a,e.then(l=>{if(a===o.current[t.id]){if(l===null){n(c=>Fee(c,[...i,t.id],"custom"));return}if(typeof l=="string"){n(c=>mb(c,{custom:{type:"invalid",message:l}},[...i,t.id]));return}n(c=>mb(c,{custom:{type:"invalid",message:(0,Gi.__)("Validation could not be processed.")}},[...i,t.id]))}}).catch(l=>{if(a!==o.current[t.id])return;let c;l instanceof Error?c=l.message:c=String(l)||(0,Gi.__)("Unknown error when running custom validation asynchronously."),n(u=>mb(u,{custom:{type:"invalid",message:c}},[...i,t.id]))})}function Dee(e,t,r){if(t.field?.isValid.required&&!t.field.isValid.required.validate(e,t.field))return{required:{type:"invalid"}};if(t.field?.isValid.pattern&&!t.field.isValid.pattern.validate(e,t.field))return{pattern:{type:"invalid",message:(0,Gi.__)("Value does not match the required pattern.")}};if(t.field?.isValid.min&&!t.field.isValid.min.validate(e,t.field))return{min:{type:"invalid",message:(0,Gi.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,Gi.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,Gi.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,Gi.__)("Value is too long.")}};if(t.field?.isValid.elements&&t.field.hasElements&&!t.field.getElements&&Array.isArray(t.field.elements)&&!t.field.isValid.elements.validate(e,t.field))return{elements:{type:"invalid",message:(0,Gi.__)("Value must be one of the elements.")}};let o;if(t.field&&t.field.isValid.custom)try{let i=t.field.getValue({item:e});o=t.field.isValid.custom((0,Nee.default)(e,t.field.setValue({item:e,value:i})),t.field)}catch(i){let a;return i instanceof Error?a=i.message:a=String(i)||(0,Gi.__)("Unknown error when running custom validation."),{custom:{type:"invalid",message:a}}}if(typeof o=="string")return{custom:{type:"invalid",message:o}};let n={};if(t.field&&t.field.isValid.elements&&t.field.hasElements&&typeof t.field.getElements=="function"&&(TNe(t.field.getElements(),t,r),n.elements={type:"validating",message:(0,Gi.__)("Validating\u2026")}),o instanceof Promise&&(PNe(o,t,r),n.custom={type:"validating",message:(0,Gi.__)("Validating\u2026")}),Object.keys(n).length>0)return n;if(t.children.length>0){let i={};t.children.forEach(l=>{i[l.id]=Dee(e,l,{...r,path:[...r.path,t.id,"children"]})});let a={};return Object.entries(i).forEach(([l,c])=>{c!==void 0&&(a[l]=c)}),Object.keys(a).length===0?void 0:{children:a}}}function Lee(e,t){let r=e?.field?.getValue({item:t});if(e.children.length===0)return r;let o=e.children.map(n=>Lee(n,t));return o?{value:r,children:o}:r}function ENe(e,t,r){let[o,n]=(0,Bc.useState)(),i=(0,Bc.useRef)({}),a=(0,Bc.useRef)({}),l=(0,Bc.useRef)({}),c=(0,Bc.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:a,setFormValidity:n,path:[],item:e},d=CNe(r,t);if(d.length===0){n(void 0);return}let f={},m=[];d.forEach(h=>{let g=Lee(h,e);if(l.current.hasOwnProperty(h.id)&&(0,CV.default)(l.current[h.id],g)){m.push(h.id);return}l.current[h.id]=g;let v=Dee(e,h,u);v!==void 0&&(f[h.id]=v)}),n(h=>{let g={...h,...f},v=[...m,...Object.keys(f)];return Object.keys(g).forEach(b=>{g&&!v.includes(b)&&delete g[b]}),Object.keys(g).length===0&&(g=void 0),(0,CV.default)(h,g)?h:g})},[e,t,r]);return(0,Bc.useEffect)(()=>{c()},[c]),{validity:o,isValid:Mee(o)}}var Bee=ENe;var Vee=s(V(),1);function km(e,t){(0,Vee.useEffect)(()=>{t&&e.current&&e.current.querySelectorAll("input, textarea, select").forEach(o=>{o.reportValidity()})},[t,e])}var jee=s(V(),1);function kNe(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var Kk=(e,t)=>Array.isArray(e)&&e.length>0?kNe(e).map(o=>t.find(n=>n.id===o)).filter(o=>o!==void 0):[];var RNe=(e,t)=>{let r=t.find(o=>o.id===e.id);return r||t.find(o=>{if(e.children){let n=e.children.filter(i=>!i.children);return n.length===0?!1:o.id===n[0].id}return o.id===e.id})};function ANe(e){let{fields:t}=(0,jee.useContext)(Ba),r=e.layout,o=Kk(r.summary,t),n=RNe(e,t),i=e.children?e.label:n?.label;return o.length===0?{summaryFields:n?[n]:[],fieldDefinition:n,fieldLabel:i}:{summaryFields:o,fieldDefinition:n,fieldLabel:i}}var Zk=ANe;var Wi=s(x(),1);function INe({data:e,field:t,onChange:r,fieldLabel:o,onClose:n,touched:i}){let{openAs:a}=t.layout,{applyLabel:l,cancelLabel:c}=a,{fields:u}=(0,Rl.useContext)(Ba),[d,f]=(0,Rl.useState)({}),m=(0,Rl.useMemo)(()=>(0,TV.default)(e,d,{arrayMerge:(C,k)=>k}),[e,d]),h=(0,Rl.useMemo)(()=>({layout:mi,fields:t.children?t.children:[{id:t.id,layout:mi}]}),[t]),g=u.map(C=>({...C,Edit:C.Edit===null?void 0:C.Edit,isValid:{required:C.isValid.required?.constraint,elements:C.isValid.elements?.constraint,min:C.isValid.min?.constraint,max:C.isValid.max?.constraint,pattern:C.isValid.pattern?.constraint,minLength:C.isValid.minLength?.constraint,maxLength:C.isValid.maxLength?.constraint}})),{validity:v}=Bee(m,g,h),y=()=>{r(d),n()},b=C=>{f(k=>(0,TV.default)(k,C,{arrayMerge:(A,R)=>R}))},S=(0,Xk.useFocusOnMount)("firstInputElement"),w=(0,Rl.useRef)(null),_=(0,Xk.useMergeRefs)([S,w]);return km(w,i),(0,Wi.jsxs)(og.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:o,size:"medium",children:[(0,Wi.jsx)("div",{ref:_,children:(0,Wi.jsx)(ps,{data:m,form:h,onChange:b,validity:v,children:(C,k,A,R)=>(0,Wi.jsx)(C,{data:m,field:k,onChange:b,hideLabelFromVision:h.fields.length<2,markWhenOptional:R,validity:A},k.id)})}),(0,Wi.jsxs)(re,{direction:"row",className:"dataforms-layouts-panel__modal-footer",gap:"md",children:[(0,Wi.jsx)(og.__experimentalSpacer,{style:{flex:1}}),(0,Wi.jsx)(og.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:c}),(0,Wi.jsx)(og.Button,{variant:"primary",onClick:y,__next40pxDefaultSize:!0,children:l})]})]})}function ONe({data:e,field:t,onChange:r,validity:o}){let[n,i]=(0,Rl.useState)(!1),[a,l]=(0,Rl.useState)(!1),{fieldDefinition:c,fieldLabel:u,summaryFields:d}=Zk(t);if(!c)return null;let f=()=>{l(!1),i(!0)};return(0,Wi.jsxs)(Wi.Fragment,{children:[(0,Wi.jsx)(l1,{data:e,field:t,fieldLabel:u,summaryFields:d,validity:o,touched:n,disabled:c.readOnly===!0,onClick:()=>l(!0),"aria-expanded":a}),a&&(0,Wi.jsx)(INe,{data:e,field:t,onChange:r,fieldLabel:u??"",onClose:f,touched:n})]})}var zee=ONe;var Rm=s(H(),1),Hee=s(N(),1),vd=s(V(),1);var Uee=s(we(),1);var pi=s(x(),1);function NNe({title:e,onClose:t}){return(0,pi.jsx)(re,{direction:"column",className:"dataforms-layouts-panel__dropdown-header",gap:"lg",children:(0,pi.jsxs)(re,{direction:"row",gap:"sm",align:"center",children:[e&&(0,pi.jsx)(Rm.__experimentalHeading,{level:2,size:13,children:e}),(0,pi.jsx)(Rm.__experimentalSpacer,{style:{flex:1}}),t&&(0,pi.jsx)(Rm.Button,{label:(0,Hee.__)("Close"),icon:rn,onClick:t,size:"small"})]})})}function MNe({touched:e,children:t}){let r=(0,vd.useRef)(null);return km(r,e),(0,pi.jsx)("div",{ref:r,children:t})}function FNe({data:e,field:t,onChange:r,validity:o}){let[n,i]=(0,vd.useState)(!1),[a,l]=(0,vd.useState)(null),c=(0,vd.useMemo)(()=>({anchor:a,placement:"left-start",offset:36,shift:!0}),[a]),[u,d]=(0,Uee.__experimentalUseDialog)({focusOnMount:"firstInputElement"}),f=(0,vd.useMemo)(()=>({layout:mi,fields:t.children?t.children:[{id:t.id,layout:mi}]}),[t]),m=(0,vd.useMemo)(()=>{if(o!==void 0)return t.children?o?.children:{[t.id]:o}},[o,t]),{fieldDefinition:h,fieldLabel:g,summaryFields:v}=Zk(t);return h?(0,pi.jsx)("div",{ref:l,className:"dataforms-layouts-panel__field-dropdown-anchor",children:(0,pi.jsx)(Rm.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:c,focusOnMount:!1,onToggle:y=>{y||i(!0)},renderToggle:({isOpen:y,onToggle:b})=>(0,pi.jsx)(l1,{data:e,field:t,fieldLabel:g,summaryFields:v,validity:o,touched:n,disabled:h.readOnly===!0,onClick:b,"aria-expanded":y}),renderContent:({onClose:y})=>(0,pi.jsx)(MNe,{touched:n,children:(0,pi.jsxs)("div",{ref:u,...d,children:[(0,pi.jsx)(NNe,{title:g,onClose:y}),(0,pi.jsx)(ps,{data:e,form:f,onChange:r,validity:m,children:(b,S,w,_)=>(0,pi.jsx)(b,{data:e,field:S,onChange:r,hideLabelFromVision:(f?.fields??[]).length<2,markWhenOptional:_,validity:w},S.id)})]})})})}):null}var Gee=FNe;var PV=s(x(),1);function Wee({data:e,field:t,onChange:r,validity:o}){return t.layout.openAs.type==="modal"?(0,PV.jsx)(zee,{data:e,field:t,onChange:r,validity:o}):(0,PV.jsx)(Gee,{data:e,field:t,onChange:r,validity:o})}var hs=s(V(),1);var Qk=s(N(),1),Yee=s(x(),1);function qee(e){if(!e)return 0;let t=0,r=Object.keys(e).filter(o=>o!=="children");for(let o of r)e[o]?.type==="invalid"&&t++;if(e.children)for(let o of Object.values(e.children))t+=qee(o);return t}function Jk({validity:e}){let t=qee(e);return t===0?null:(0,Yee.jsx)(v4,{intent:"high",children:(0,Qk.sprintf)((0,Qk._n)("%d field needs attention","%d fields need attention",t),t)})}var ao=s(x(),1);function DNe(e,t,r){if(!t||Array.isArray(t)&&t.length===0)return!1;let n=(Array.isArray(t)?t:[t]).find(i=>typeof i=="string"?i===e.id:typeof i=="object"&&"id"in i?i.id===e.id:!1);return n?typeof n=="string"?!0:typeof n=="object"&&"visibility"in n?n.visibility==="always"||n.visibility==="when-collapsed"&&!r:!0:!1}function LNe({data:e,fields:t,label:r,layout:o,isOpen:n,touched:i,validity:a}){let c=Kk(o.summary,t).filter(f=>DNe(f,o.summary,n)),u=i&&o.isCollapsible,d=c.length>0&&o.withHeader;return(0,ao.jsxs)(re,{align:"center",justify:"space-between",className:"dataforms-layouts-card__field-header-content",children:[(0,ao.jsx)(hc.Title,{children:r}),(u||d)&&(0,ao.jsxs)(uh.HeaderDescription,{className:"dataforms-layouts-card__field-header-content-description",children:[u&&(0,ao.jsx)(Jk,{validity:a}),d&&(0,ao.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:c.map(f=>(0,ao.jsx)(f.render,{item:e,field:f},f.id))})]})]})}function BNe({data:e,field:t,form:r,onChange:o,hideLabelFromVision:n,markWhenOptional:i,validity:a,withHeader:l}){if(t.children)return(0,ao.jsxs)(ao.Fragment,{children:[t.description&&(0,ao.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,ao.jsx)(ps,{data:e,form:r,onChange:o,validity:a?.children})]});let c=ng("regular")?.component;return c?(0,ao.jsx)(c,{data:e,field:t,onChange:o,hideLabelFromVision:n||l,markWhenOptional:i,validity:a}):null}function Kee({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{fields:a}=(0,hs.useContext)(Ba),l=t.layout,c=(0,hs.useRef)(null),u=(0,hs.useMemo)(()=>({layout:mi,fields:t.children??[]}),[t]),{isOpened:d,isCollapsible:f}=l,[m,h]=(0,hs.useState)(d),[g,v]=(0,hs.useState)(!1);(0,hs.useEffect)(()=>{h(d)},[d]);let y=(0,hs.useCallback)(k=>{k||v(!0),h(k)},[]),b=(0,hs.useCallback)(()=>{v(!0)},[]);km(c,(f?m:!0)&&g);let S=t.label,w;if(t.children)w=!!S&&l.withHeader;else{let k=a.find(A=>A.id===t.id);if(!k||!k.Edit)return null;S=k.label,w=!!S&&l.withHeader}let _=(0,ao.jsx)(BNe,{data:e,field:t,form:u,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,withHeader:w}),C=(0,ao.jsx)(LNe,{data:e,fields:a,label:S,layout:l,isOpen:f?!!m:!0,touched:g,validity:i});return w&&f?(0,ao.jsxs)(uh.Root,{className:"dataforms-layouts-card__field",open:m,onOpenChange:y,children:[(0,ao.jsx)(uh.Header,{children:C}),(0,ao.jsx)(uh.Content,{ref:c,onBlur:b,children:_})]}):(0,ao.jsxs)(hc.Root,{className:"dataforms-layouts-card__field",children:[w&&(0,ao.jsx)(hc.Header,{children:C}),(0,ao.jsx)(hc.Content,{ref:c,onBlur:b,children:_})]})}var Zee=s(H(),1);var dn=s(x(),1);function VNe({title:e}){return(0,dn.jsx)(re,{direction:"column",className:"dataforms-layouts-row__header",gap:"lg",children:(0,dn.jsx)(re,{direction:"row",align:"center",children:(0,dn.jsx)(Zee.__experimentalHeading,{level:2,size:13,children:e})})})}var jNe=({children:e})=>(0,dn.jsx)(dn.Fragment,{children:e});function Xee({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let a=t.layout;if(t.children){let c={layout:mi,fields:t.children};return(0,dn.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!o&&t.label&&(0,dn.jsx)(VNe,{title:t.label}),(0,dn.jsx)(re,{direction:"row",align:a.alignment,gap:"lg",children:(0,dn.jsx)(ps,{data:e,form:c,onChange:r,validity:i?.children,as:jNe,children:(u,d,f)=>(0,dn.jsx)("div",{className:"dataforms-layouts-row__field-control",style:a.styles[d.id],children:(0,dn.jsx)(u,{data:e,field:d,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:f})},d.id)})})]})}let l=ng("regular")?.component;return l?(0,dn.jsx)(dn.Fragment,{children:(0,dn.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,dn.jsx)(l,{data:e,field:t,onChange:r,markWhenOptional:n,validity:i})})}):null}var gs=s(V(),1),Qee=s(N(),1);var yd=s(x(),1);function Jee({data:e,field:t,onChange:r,validity:o}){let{fields:n}=(0,gs.useContext)(Ba),i=(0,gs.useRef)(null),a=(0,gs.useRef)(null),[l,c]=(0,gs.useState)(!1),[u,d]=(0,gs.useState)(!1),f=(0,gs.useMemo)(()=>({layout:mi,fields:t.children??[]}),[t]);(0,gs.useEffect)(()=>{let y=i.current;if(!y)return;let b=()=>{let S=y.open;S||c(!0),d(S)};return y.addEventListener("toggle",b),()=>{y.removeEventListener("toggle",b)}},[]),km(a,u&&l);let m=(0,gs.useCallback)(()=>{c(!0)},[]);if(!t.children)return null;let h=t.layout.summary??"",g=h?n.find(y=>y.id===h):void 0,v;return g&&g.render?v=(0,yd.jsx)(g.render,{item:e,field:g}):v=t.label||(0,Qee.__)("More details"),(0,yd.jsxs)("details",{ref:i,className:"dataforms-layouts-details__details",children:[(0,yd.jsx)("summary",{className:"dataforms-layouts-details__summary",children:(0,yd.jsxs)(re,{direction:"row",align:"center",gap:"md",className:"dataforms-layouts-details__summary-content",children:[v,l&&(0,yd.jsx)(Jk,{validity:o})]})}),(0,yd.jsx)("div",{ref:a,className:"dataforms-layouts-details__content",onBlur:m,children:(0,yd.jsx)(ps,{data:e,form:f,onChange:r,validity:o?.children})})]})}var ig=s(x(),1),zNe=[{type:"regular",component:xee,wrapper:({children:e})=>(0,ig.jsx)(re,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e})},{type:"panel",component:Wee,wrapper:({children:e})=>(0,ig.jsx)(re,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e})},{type:"card",component:Kee,wrapper:({children:e})=>(0,ig.jsx)(re,{direction:"column",className:"dataforms-layouts__wrapper",gap:"xl",children:e})},{type:"row",component:Xee,wrapper:({children:e,layout:t})=>(0,ig.jsx)(re,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:(0,ig.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,ig.jsx)(re,{direction:"row",gap:"lg",align:t.alignment,children:e})})})},{type:"details",component:Jee}];function ng(e){return zNe.find(t=>t.type===e)}var $k=s(x(),1),HNe=({children:e})=>(0,$k.jsx)(re,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e});function ps({data:e,form:t,onChange:r,validity:o,children:n,as:i}){let{fields:a}=(0,eR.useContext)(Ba),l=(0,eR.useMemo)(()=>{let d=a.filter(m=>!!m.isValid?.required).length,f=a.length-d;return d>f},[a]);function c(d){return a.find(f=>f.id===d.id)}let u=i??ng(t.layout.type)?.wrapper??HNe;return(0,$k.jsx)(u,{layout:t.layout,children:t.fields.map(d=>{let f=ng(d.layout.type)?.component;if(!f)return null;let m=d.children?void 0:c(d);return m&&m.isVisible&&!m.isVisible(e)?null:n?n(f,d,o?.[d.id],l):(0,$k.jsx)(f,{data:e,field:d,onChange:r,markWhenOptional:l,validity:o?.[d.id]},d.id)})})}var kV=s(x(),1);function c1({data:e,form:t,fields:r,onChange:o,validity:n}){let i=(0,EV.useMemo)(()=>Gk(t),[t]),a=(0,EV.useMemo)(()=>rg(r),[r]);return t.fields?(0,kV.jsx)(wee,{fields:a,children:(0,kV.jsx)(ps,{data:e,form:i,onChange:o,validity:n})}):null}var tR=s(H(),1);var $ee=s(N(),1);var bd=s(x(),1);function u1({form:e,header:t}){let{media:r,fields:o,onChange:n}=Iy();if(!r||!n)return(0,bd.jsx)("div",{className:"media-editor-form media-editor-form--loading",children:(0,bd.jsx)(tR.Spinner,{})});let i={layout:{type:"panel"},fields:o.map(l=>["title","alt_text","caption","description"].includes(l.id)?{id:l.id,layout:{type:"regular",labelPosition:"top"}}:l.id)},a=e||i;return(0,bd.jsx)("div",{className:"media-editor-form",children:(0,bd.jsxs)(tR.__experimentalVStack,{spacing:4,children:[(0,bd.jsx)(Kt,{render:(0,bd.jsx)("h2",{}),children:(0,$ee.__)("Media details")}),t,(0,bd.jsx)(c1,{data:r,fields:o,form:a,onChange:n})]})})}var ete=s(th(),1),{lock:tte,unlock:rte}=(0,ete.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/media-editor");var rR=s(U(),1);var ote={isOpen:!1,id:null,onUpdate:null};function nte(e=ote,t){switch(t.type){case"OPEN_MEDIA_EDITOR_MODAL":{let{id:r,onUpdate:o}=t;return{isOpen:!0,id:r,onUpdate:o}}case"CLOSE_MEDIA_EDITOR_MODAL":return ote}return e}var RV={};Jn(RV,{closeMediaEditorModal:()=>GNe,openMediaEditorModal:()=>UNe});function UNe({id:e,onUpdate:t}){return{type:"OPEN_MEDIA_EDITOR_MODAL",id:e,onUpdate:t??null}}function GNe(){return{type:"CLOSE_MEDIA_EDITOR_MODAL"}}var AV={};Jn(AV,{getId:()=>YNe,getOnUpdate:()=>qNe,isOpen:()=>WNe});function WNe(e){return e.isOpen}function YNe(e){return e.id}function qNe(e){return e.onUpdate}var ite="core/media-editor";var pb=(0,rR.createReduxStore)(ite,{reducer:nte,actions:RV,selectors:AV});(0,rR.register)(pb);var Vre=s(H(),1),IR=s(U(),1),jre=s(N(),1);var Lre=s(If(),1),ta=s(H(),1);var mg=s(U(),1),RR=s(Q(),1),Sr=s(V(),1),Po=s(N(),1);var _b=s(Wr(),1),AR=s(wt(),1);var FV={};Jn(FV,{ActionItem:()=>ja,ComplementaryArea:()=>Ha,ComplementaryAreaMoreMenuItem:()=>Om,FullscreenMode:()=>Tte,InterfaceSkeleton:()=>lg,PinnedItems:()=>Nm,store:()=>Me});var za=s(H(),1),p1=s(U(),1),fR=s(N(),1);var jc=s(V(),1),NV=s(ate(),1),Ste=s(vt(),1),Mm=s(we(),1),_te=s(Am(),1);var mte=s(H(),1),sR=s(U(),1),pte=s(Am(),1);var iR=s(U(),1);var IV={};Jn(IV,{closeModal:()=>o3e,disableComplementaryArea:()=>XNe,enableComplementaryArea:()=>ZNe,openModal:()=>r3e,pinItem:()=>QNe,setDefaultComplementaryArea:()=>KNe,setFeatureDefaults:()=>t3e,setFeatureValue:()=>e3e,toggleFeature:()=>$Ne,unpinItem:()=>JNe});var nR=s(ya(),1),Va=s(vt(),1);var oR=s(ya(),1);function Vc(e){return["core/edit-post","core/edit-site"].includes(e)?((0,oR.default)(`${e} interface scope`,{alternative:"core interface scope",hint:"core/edit-post and core/edit-site are merging.",version:"6.6"}),"core"):e}function sg(e,t){return e==="core"&&t==="edit-site/template"?((0,oR.default)("edit-site/template sidebar",{alternative:"edit-post/document",version:"6.6"}),"edit-post/document"):e==="core"&&t==="edit-site/block-inspector"?((0,oR.default)("edit-site/block-inspector sidebar",{alternative:"edit-post/block",version:"6.6"}),"edit-post/block"):t}var KNe=(e,t)=>(e=Vc(e),t=sg(e,t),{type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e,area:t}),ZNe=(e,t)=>({registry:r,dispatch:o})=>{if(!t)return;e=Vc(e),t=sg(e,t),r.select(Va.store).get(e,"isComplementaryAreaVisible")||r.dispatch(Va.store).set(e,"isComplementaryAreaVisible",!0),o({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t})},XNe=e=>({registry:t})=>{e=Vc(e),t.select(Va.store).get(e,"isComplementaryAreaVisible")&&t.dispatch(Va.store).set(e,"isComplementaryAreaVisible",!1)},QNe=(e,t)=>({registry:r})=>{if(!t)return;e=Vc(e),t=sg(e,t);let o=r.select(Va.store).get(e,"pinnedItems");o?.[t]!==!0&&r.dispatch(Va.store).set(e,"pinnedItems",{...o,[t]:!0})},JNe=(e,t)=>({registry:r})=>{if(!t)return;e=Vc(e),t=sg(e,t);let o=r.select(Va.store).get(e,"pinnedItems");r.dispatch(Va.store).set(e,"pinnedItems",{...o,[t]:!1})};function $Ne(e,t){return function({registry:r}){(0,nR.default)("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),r.dispatch(Va.store).toggle(e,t)}}function e3e(e,t,r){return function({registry:o}){(0,nR.default)("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),o.dispatch(Va.store).set(e,t,!!r)}}function t3e(e,t){return function({registry:r}){(0,nR.default)("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),r.dispatch(Va.store).setDefaults(e,t)}}function r3e(e){return{type:"OPEN_MODAL",name:e}}function o3e(){return{type:"CLOSE_MODAL"}}var OV={};Jn(OV,{getActiveComplementaryArea:()=>n3e,isComplementaryAreaLoading:()=>i3e,isFeatureActive:()=>a3e,isItemPinned:()=>s3e,isModalActive:()=>l3e});var d1=s(U(),1),cte=s(ya(),1),f1=s(vt(),1);var n3e=(0,d1.createRegistrySelector)(e=>(t,r)=>{r=Vc(r);let o=e(f1.store).get(r,"isComplementaryAreaVisible");if(o!==void 0)return o===!1?null:t?.complementaryAreas?.[r]}),i3e=(0,d1.createRegistrySelector)(e=>(t,r)=>{r=Vc(r);let o=e(f1.store).get(r,"isComplementaryAreaVisible"),n=t?.complementaryAreas?.[r];return o&&n===void 0}),s3e=(0,d1.createRegistrySelector)(e=>(t,r,o)=>(r=Vc(r),o=sg(r,o),e(f1.store).get(r,"pinnedItems")?.[o]??!0)),a3e=(0,d1.createRegistrySelector)(e=>(t,r,o)=>((0,cte.default)("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(f1.store).get(r,o)));function l3e(e,t){return e.activeModal===t}var ute=s(U(),1);function c3e(e={},t){switch(t.type){case"SET_DEFAULT_COMPLEMENTARY_AREA":{let{scope:r,area:o}=t;return e[r]?e:{...e,[r]:o}}case"ENABLE_COMPLEMENTARY_AREA":{let{scope:r,area:o}=t;return{...e,[r]:o}}}return e}function u3e(e=null,t){switch(t.type){case"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e}var dte=(0,ute.combineReducers)({complementaryAreas:c3e,activeModal:u3e});var fte="core/interface";var Me=(0,iR.createReduxStore)(fte,{reducer:dte,actions:IV,selectors:OV});(0,iR.register)(Me);var hte=s(x(),1);function d3e(e){return["checkbox","option","radio","switch","menuitemcheckbox","menuitemradio","treeitem"].includes(e)}function hb({as:e=mte.Button,scope:t,identifier:r,icon:o,selectedIcon:n,name:i,shortcut:a,...l}){let c=e,u=(0,pte.usePluginContext)(),d=o||u.icon,f=r||`${u.name}/${i}`,m=(0,sR.useSelect)(v=>v(Me).getActiveComplementaryArea(t)===f,[f,t]),{enableComplementaryArea:h,disableComplementaryArea:g}=(0,sR.useDispatch)(Me);return(0,hte.jsx)(c,{icon:n&&m?n:d,"aria-controls":f.replace("/",":"),"aria-checked":d3e(l.role)?m:void 0,onClick:()=>{m?g(t):h(t,f)},shortcut:a,...l})}var aR=s(x(),1),f3e=({children:e,className:t,toggleButtonProps:r})=>{let o=(0,aR.jsx)(hb,{icon:rn,...r});return(0,aR.jsxs)("div",{className:K("components-panel__header","interface-complementary-area-header",t),tabIndex:-1,children:[e,o]})},gte=f3e;var bte=s(H(),1);var Im=s(H(),1),lR=s(V(),1),m1=s(x(),1),vte=()=>{};function m3e({name:e,as:t=Im.MenuGroup,fillProps:r={},bubblesVirtually:o,...n}){return(0,m1.jsx)(Im.Slot,{name:e,bubblesVirtually:o,fillProps:r,children:i=>{if(!lR.Children.toArray(i).length)return null;let a=[];lR.Children.forEach(i,({props:{__unstableExplicitMenuItem:c,__unstableTarget:u}})=>{u&&c&&a.push(u)});let l=lR.Children.map(i,c=>!c.props.__unstableExplicitMenuItem&&a.includes(c.props.__unstableTarget)?null:c);return(0,m1.jsx)(t,{...n,children:l})}})}function yte({name:e,as:t=Im.Button,onClick:r,...o}){return(0,m1.jsx)(Im.Fill,{name:e,children:({onClick:n})=>(0,m1.jsx)(t,{onClick:r||n?(...i)=>{(r||vte)(...i),(n||vte)(...i)}:void 0,...o})})}yte.Slot=m3e;var ja=yte;var cR=s(x(),1),p3e=({__unstableExplicitMenuItem:e,__unstableTarget:t,...r})=>(0,cR.jsx)(bte.MenuItem,{...r});function Om({scope:e,target:t,__unstableExplicitMenuItem:r,...o}){return(0,cR.jsx)(hb,{as:n=>(0,cR.jsx)(ja,{__unstableExplicitMenuItem:r,__unstableTarget:`${e}/${t}`,as:p3e,name:`${e}/plugin-more-menu`,...n}),role:"menuitemcheckbox",selectedIcon:Rn,name:t,scope:e,...o})}var dR=s(H(),1),uR=s(x(),1);function wte({scope:e,...t}){return(0,uR.jsx)(dR.Fill,{name:`PinnedItems/${e}`,...t})}function h3e({scope:e,className:t,...r}){return(0,uR.jsx)(dR.Slot,{name:`PinnedItems/${e}`,...r,children:o=>o?.length>0&&(0,uR.jsx)("div",{className:K(t,"interface-pinned-items"),children:o})})}wte.Slot=h3e;var Nm=wte;var Do=s(x(),1),g3e=.3;function v3e({scope:e,...t}){return(0,Do.jsx)(za.Slot,{name:`ComplementaryArea/${e}`,...t})}var xte=280,y3e={open:{width:xte},closed:{width:0},mobileOpen:{width:"100vw"}};function b3e({activeArea:e,isActive:t,scope:r,children:o,className:n,id:i}){let a=(0,Mm.useReducedMotion)(),l=(0,Mm.useViewportMatch)("medium","<"),c=(0,Mm.usePrevious)(e),u=(0,Mm.usePrevious)(t),[,d]=(0,jc.useState)({});(0,jc.useEffect)(()=>{d({})},[t]);let f={type:"tween",duration:a||l||c&&e&&e!==c?0:g3e,ease:[.6,0,.4,1]};return(0,Do.jsx)(za.Fill,{name:`ComplementaryArea/${r}`,children:(0,Do.jsx)(za.__unstableAnimatePresence,{initial:!1,children:(u||t)&&(0,Do.jsx)(za.__unstableMotion.div,{variants:y3e,initial:"closed",animate:l?"mobileOpen":"open",exit:"closed",transition:f,className:"interface-complementary-area__fill",children:(0,Do.jsx)("div",{id:i,className:n,style:{width:l?"100vw":xte},children:o})})})})}function w3e(e,t,r,o,n){let i=(0,jc.useRef)(!1),a=(0,jc.useRef)(!1),{enableComplementaryArea:l,disableComplementaryArea:c}=(0,p1.useDispatch)(Me);(0,jc.useEffect)(()=>{o&&n&&!i.current?(c(e),a.current=!0):a.current&&!n&&i.current?(a.current=!1,l(e,t)):a.current&&r&&r!==t&&(a.current=!1),n!==i.current&&(i.current=n)},[o,n,e,t,r,c,l])}function Cte({children:e,className:t,closeLabel:r=(0,fR.__)("Close plugin"),identifier:o,header:n,headerClassName:i,icon:a,isPinnable:l=!0,panelClassName:c,scope:u,name:d,title:f,toggleShortcut:m,isActiveByDefault:h}){let g=(0,_te.usePluginContext)(),v=a||g.icon,y=o||`${g.name}/${d}`,[b,S]=(0,jc.useState)(!1),{isLoading:w,isActive:_,isPinned:C,activeArea:k,isSmall:A,isLarge:R,showIconLabels:I}=(0,p1.useSelect)(z=>{let{getActiveComplementaryArea:W,isComplementaryAreaLoading:O,isItemPinned:M}=z(Me),{get:D}=z(Ste.store),G=W(u);return{isLoading:O(u),isActive:G===y,isPinned:M(u,y),activeArea:G,isSmall:z(NV.store).isViewportMatch("< medium"),isLarge:z(NV.store).isViewportMatch("large"),showIconLabels:D("core","showIconLabels")}},[y,u]),B=(0,Mm.useViewportMatch)("medium","<");w3e(u,y,k,_,A);let{enableComplementaryArea:E,disableComplementaryArea:P,pinItem:L,unpinItem:j}=(0,p1.useDispatch)(Me);if((0,jc.useEffect)(()=>{h&&k===void 0&&!A?E(u,y):k===void 0&&A&&P(u,y),S(!0)},[k,h,u,y,A,E,P]),!!b)return(0,Do.jsxs)(Do.Fragment,{children:[l&&(0,Do.jsx)(Nm,{scope:u,children:C&&(0,Do.jsx)(hb,{scope:u,identifier:y,isPressed:_&&(!I||R),"aria-expanded":_,"aria-disabled":w,label:f,icon:I?Rn:v,showTooltip:!I,variant:I?"tertiary":void 0,size:"compact",shortcut:m})}),d&&l&&(0,Do.jsx)(Om,{target:d,scope:u,icon:v,identifier:y,children:f}),(0,Do.jsxs)(b3e,{activeArea:k,isActive:_,className:K("interface-complementary-area",t),scope:u,id:y.replace("/",":"),children:[(0,Do.jsx)(gte,{className:i,closeLabel:r,onClose:()=>P(u),toggleButtonProps:{label:r,size:"compact",shortcut:m,scope:u,identifier:y},children:n||(0,Do.jsxs)(Do.Fragment,{children:[(0,Do.jsx)("h2",{className:"interface-complementary-area-header__title",children:f}),l&&!B&&(0,Do.jsx)(za.Button,{className:"interface-complementary-area__pin-unpin-item",icon:C?hF:mF,label:C?(0,fR.__)("Unpin from toolbar"):(0,fR.__)("Pin to toolbar"),onClick:()=>(C?j:L)(u,y),isPressed:C,"aria-expanded":C,size:"compact"})]})}),(0,Do.jsx)(za.Panel,{className:c,children:e})]})]})}Cte.Slot=v3e;var Ha=Cte;var MV=s(V(),1),S3e=({isActive:e})=>((0,MV.useEffect)(()=>{let t=!1;return document.body.classList.contains("sticky-menu")&&(t=!0,document.body.classList.remove("sticky-menu")),()=>{t&&document.body.classList.add("sticky-menu")}},[]),(0,MV.useEffect)(()=>(e?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode"),()=>{e&&document.body.classList.remove("is-fullscreen-mode")}),[e]),null),Tte=S3e;var Pte=s(V(),1),Ete=s(x(),1),kte=(0,Pte.forwardRef)(({children:e,className:t,ariaLabel:r,as:o="div",...n},i)=>(0,Ete.jsx)(o,{ref:i,className:K("admin-ui-navigable-region",t),"aria-label":r,role:"region",tabIndex:"-1",...n,children:e}));kte.displayName="NavigableRegion";var Fm=kte;var mR=s(V(),1),ag=s(H(),1),Dm=s(N(),1),gb=s(we(),1),Yi=s(x(),1),Ate=.25,Rte={type:"tween",duration:Ate,ease:[.6,0,.4,1]};function _3e(e){(0,mR.useEffect)(()=>{let t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}},[e])}var x3e={hidden:{opacity:1,marginTop:-60},visible:{opacity:1,marginTop:0},distractionFreeHover:{opacity:1,marginTop:0,transition:{...Rte,delay:.2,delayChildren:.2}},distractionFreeHidden:{opacity:0,marginTop:-60},distractionFreeDisabled:{opacity:0,marginTop:0,transition:{...Rte,delay:.8,delayChildren:.8}}};function C3e({isDistractionFree:e,footer:t,header:r,editorNotices:o,sidebar:n,secondarySidebar:i,content:a,actions:l,labels:c,className:u},d){let[f,m]=(0,gb.useResizeObserver)(),h=(0,gb.useViewportMatch)("medium","<"),v={type:"tween",duration:(0,gb.useReducedMotion)()?0:Ate,ease:[.6,0,.4,1]};_3e("interface-interface-skeleton__html-container");let b={...{header:(0,Dm._x)("Header","header landmark area"),body:(0,Dm.__)("Content"),secondarySidebar:(0,Dm.__)("Block Library"),sidebar:(0,Dm._x)("Settings","settings landmark area"),actions:(0,Dm.__)("Publish"),footer:(0,Dm.__)("Footer")},...c};return(0,Yi.jsxs)("div",{ref:d,className:K(u,"interface-interface-skeleton",!!t&&"has-footer"),children:[(0,Yi.jsxs)("div",{className:"interface-interface-skeleton__editor",children:[(0,Yi.jsx)(ag.__unstableAnimatePresence,{initial:!1,children:!!r&&(0,Yi.jsx)(Fm,{as:ag.__unstableMotion.div,className:"interface-interface-skeleton__header",ariaLabel:b.header,initial:e&&!h?"distractionFreeHidden":"hidden",whileHover:e&&!h?"distractionFreeHover":"visible",animate:e&&!h?"distractionFreeDisabled":"visible",exit:e&&!h?"distractionFreeHidden":"hidden",variants:x3e,transition:v,children:r})}),e&&(0,Yi.jsx)("div",{className:"interface-interface-skeleton__header",children:o}),(0,Yi.jsxs)("div",{className:"interface-interface-skeleton__body",children:[(0,Yi.jsx)(ag.__unstableAnimatePresence,{initial:!1,children:!!i&&(0,Yi.jsx)(Fm,{className:"interface-interface-skeleton__secondary-sidebar",ariaLabel:b.secondarySidebar,as:ag.__unstableMotion.div,initial:"closed",animate:"open",exit:"closed",variants:{open:{width:m.width},closed:{width:0}},transition:v,children:(0,Yi.jsxs)(ag.__unstableMotion.div,{style:{position:"absolute",width:h?"100vw":"fit-content",height:"100%",left:0},variants:{open:{x:0},closed:{x:"-100%"}},transition:v,children:[f,i]})})}),(0,Yi.jsx)(Fm,{className:"interface-interface-skeleton__content",ariaLabel:b.body,children:a}),!!n&&(0,Yi.jsx)(Fm,{className:"interface-interface-skeleton__sidebar",ariaLabel:b.sidebar,children:n}),!!l&&(0,Yi.jsx)(Fm,{className:"interface-interface-skeleton__actions",ariaLabel:b.actions,children:l})]})]}),!!t&&(0,Yi.jsx)(Fm,{className:"interface-interface-skeleton__footer",ariaLabel:b.footer,children:t})]})}var lg=(0,mR.forwardRef)(C3e);var Rt=s(V(),1);var zc=s(N(),1),Lm=1,cg=10,Ote=.0025,h1=.01,pR=10,g1=45,T3e={x:0,y:0,width:1,height:1},P3e={horizontal:!1,vertical:!1},Ite={x:0,y:0},vb={image:null,pan:{...Ite},zoom:Lm,rotation:0,basePan:{...Ite},baseZoom:Lm,baseRotation:0,flip:{...P3e},cropRect:{...T3e}},DV=-1,LV=[{label:(0,zc.__)("Free"),value:0},{label:(0,zc.__)("Original"),value:DV},{label:(0,zc.__)("Square (1:1)"),value:1},{label:(0,zc.__)("Landscape (16:9)"),value:16/9},{label:(0,zc.__)("Portrait (9:16)"),value:9/16},{label:(0,zc.__)("Classic (4:3)"),value:4/3},{label:(0,zc.__)("Classic portrait (3:4)"),value:3/4},{label:(0,zc.__)("Photo (3:2)"),value:3/2},{label:(0,zc.__)("Photo portrait (2:3)"),value:2/3}];var Hc=1e-6,Uc=typeof Float32Array<"u"?Float32Array:Array,Nte=Math.random;function BV(e){return e>=0?Math.round(e):e%.5===0?Math.floor(e):Math.round(e)}var C1t=Math.PI/180,T1t=180/Math.PI;var lo={};Jn(lo,{add:()=>U3e,clone:()=>k3e,copy:()=>R3e,create:()=>E3e,determinant:()=>M3e,equals:()=>q3e,exactEquals:()=>Y3e,frob:()=>H3e,fromRotation:()=>B3e,fromScaling:()=>V3e,fromTranslation:()=>j3e,fromValues:()=>I3e,identity:()=>A3e,invert:()=>N3e,mul:()=>K3e,multiply:()=>Fte,multiplyScalar:()=>G3e,multiplyScalarAndAdd:()=>W3e,rotate:()=>F3e,scale:()=>D3e,set:()=>O3e,str:()=>z3e,sub:()=>Z3e,subtract:()=>Dte,translate:()=>L3e});function E3e(){var e=new Uc(6);return Uc!=Float32Array&&(e[1]=0,e[2]=0,e[4]=0,e[5]=0),e[0]=1,e[3]=1,e}function k3e(e){var t=new Uc(6);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function R3e(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function A3e(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function I3e(e,t,r,o,n,i){var a=new Uc(6);return a[0]=e,a[1]=t,a[2]=r,a[3]=o,a[4]=n,a[5]=i,a}function O3e(e,t,r,o,n,i,a){return e[0]=t,e[1]=r,e[2]=o,e[3]=n,e[4]=i,e[5]=a,e}function N3e(e,t){var r=t[0],o=t[1],n=t[2],i=t[3],a=t[4],l=t[5],c=r*i-o*n;return c?(c=1/c,e[0]=i*c,e[1]=-o*c,e[2]=-n*c,e[3]=r*c,e[4]=(n*l-i*a)*c,e[5]=(o*a-r*l)*c,e):null}function M3e(e){return e[0]*e[3]-e[1]*e[2]}function Fte(e,t,r){var o=t[0],n=t[1],i=t[2],a=t[3],l=t[4],c=t[5],u=r[0],d=r[1],f=r[2],m=r[3],h=r[4],g=r[5];return e[0]=o*u+i*d,e[1]=n*u+a*d,e[2]=o*f+i*m,e[3]=n*f+a*m,e[4]=o*h+i*g+l,e[5]=n*h+a*g+c,e}function F3e(e,t,r){var o=t[0],n=t[1],i=t[2],a=t[3],l=t[4],c=t[5],u=Math.sin(r),d=Math.cos(r);return e[0]=o*d+i*u,e[1]=n*d+a*u,e[2]=o*-u+i*d,e[3]=n*-u+a*d,e[4]=l,e[5]=c,e}function D3e(e,t,r){var o=t[0],n=t[1],i=t[2],a=t[3],l=t[4],c=t[5],u=r[0],d=r[1];return e[0]=o*u,e[1]=n*u,e[2]=i*d,e[3]=a*d,e[4]=l,e[5]=c,e}function L3e(e,t,r){var o=t[0],n=t[1],i=t[2],a=t[3],l=t[4],c=t[5],u=r[0],d=r[1];return e[0]=o,e[1]=n,e[2]=i,e[3]=a,e[4]=o*u+i*d+l,e[5]=n*u+a*d+c,e}function B3e(e,t){var r=Math.sin(t),o=Math.cos(t);return e[0]=o,e[1]=r,e[2]=-r,e[3]=o,e[4]=0,e[5]=0,e}function V3e(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e[4]=0,e[5]=0,e}function j3e(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=t[0],e[5]=t[1],e}function z3e(e){return"mat2d("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+")"}function H3e(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]+e[3]*e[3]+e[4]*e[4]+e[5]*e[5]+1)}function U3e(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e}function Dte(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e}function G3e(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e}function W3e(e,t,r,o){return e[0]=t[0]+r[0]*o,e[1]=t[1]+r[1]*o,e[2]=t[2]+r[2]*o,e[3]=t[3]+r[3]*o,e[4]=t[4]+r[4]*o,e[5]=t[5]+r[5]*o,e}function Y3e(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]}function q3e(e,t){var r=e[0],o=e[1],n=e[2],i=e[3],a=e[4],l=e[5],c=t[0],u=t[1],d=t[2],f=t[3],m=t[4],h=t[5];return Math.abs(r-c)<=Hc*Math.max(1,Math.abs(r),Math.abs(c))&&Math.abs(o-u)<=Hc*Math.max(1,Math.abs(o),Math.abs(u))&&Math.abs(n-d)<=Hc*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(i-f)<=Hc*Math.max(1,Math.abs(i),Math.abs(f))&&Math.abs(a-m)<=Hc*Math.max(1,Math.abs(a),Math.abs(m))&&Math.abs(l-h)<=Hc*Math.max(1,Math.abs(l),Math.abs(h))}var K3e=Fte,Z3e=Dte;var wd={};Jn(wd,{add:()=>e6e,angle:()=>w6e,ceil:()=>t6e,clone:()=>X3e,copy:()=>J3e,create:()=>Lte,cross:()=>f6e,dist:()=>A6e,distance:()=>zte,div:()=>R6e,divide:()=>jte,dot:()=>d6e,equals:()=>T6e,exactEquals:()=>C6e,floor:()=>r6e,forEach:()=>N6e,fromValues:()=>Q3e,inverse:()=>c6e,len:()=>P6e,length:()=>Ute,lerp:()=>m6e,max:()=>n6e,min:()=>o6e,mul:()=>k6e,multiply:()=>Vte,negate:()=>l6e,normalize:()=>u6e,random:()=>p6e,rotate:()=>b6e,round:()=>i6e,scale:()=>s6e,scaleAndAdd:()=>a6e,set:()=>$3e,signedAngle:()=>S6e,sqrDist:()=>I6e,sqrLen:()=>O6e,squaredDistance:()=>Hte,squaredLength:()=>Gte,str:()=>x6e,sub:()=>E6e,subtract:()=>Bte,transformMat2:()=>h6e,transformMat2d:()=>g6e,transformMat3:()=>v6e,transformMat4:()=>y6e,zero:()=>_6e});function Lte(){var e=new Uc(2);return Uc!=Float32Array&&(e[0]=0,e[1]=0),e}function X3e(e){var t=new Uc(2);return t[0]=e[0],t[1]=e[1],t}function Q3e(e,t){var r=new Uc(2);return r[0]=e,r[1]=t,r}function J3e(e,t){return e[0]=t[0],e[1]=t[1],e}function $3e(e,t,r){return e[0]=t,e[1]=r,e}function e6e(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}function Bte(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function Vte(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e}function jte(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e}function t6e(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e}function r6e(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e}function o6e(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}function n6e(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}function i6e(e,t){return e[0]=BV(t[0]),e[1]=BV(t[1]),e}function s6e(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function a6e(e,t,r,o){return e[0]=t[0]+r[0]*o,e[1]=t[1]+r[1]*o,e}function zte(e,t){var r=t[0]-e[0],o=t[1]-e[1];return Math.sqrt(r*r+o*o)}function Hte(e,t){var r=t[0]-e[0],o=t[1]-e[1];return r*r+o*o}function Ute(e){var t=e[0],r=e[1];return Math.sqrt(t*t+r*r)}function Gte(e){var t=e[0],r=e[1];return t*t+r*r}function l6e(e,t){return e[0]=-t[0],e[1]=-t[1],e}function c6e(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function u6e(e,t){var r=t[0],o=t[1],n=r*r+o*o;return n>0&&(n=1/Math.sqrt(n)),e[0]=t[0]*n,e[1]=t[1]*n,e}function d6e(e,t){return e[0]*t[0]+e[1]*t[1]}function f6e(e,t,r){var o=t[0]*r[1]-t[1]*r[0];return e[0]=e[1]=0,e[2]=o,e}function m6e(e,t,r,o){var n=t[0],i=t[1];return e[0]=n+o*(r[0]-n),e[1]=i+o*(r[1]-i),e}function p6e(e,t){t=t===void 0?1:t;var r=Nte()*2*Math.PI;return e[0]=Math.cos(r)*t,e[1]=Math.sin(r)*t,e}function h6e(e,t,r){var o=t[0],n=t[1];return e[0]=r[0]*o+r[2]*n,e[1]=r[1]*o+r[3]*n,e}function g6e(e,t,r){var o=t[0],n=t[1];return e[0]=r[0]*o+r[2]*n+r[4],e[1]=r[1]*o+r[3]*n+r[5],e}function v6e(e,t,r){var o=t[0],n=t[1];return e[0]=r[0]*o+r[3]*n+r[6],e[1]=r[1]*o+r[4]*n+r[7],e}function y6e(e,t,r){var o=t[0],n=t[1];return e[0]=r[0]*o+r[4]*n+r[12],e[1]=r[1]*o+r[5]*n+r[13],e}function b6e(e,t,r,o){var n=t[0]-r[0],i=t[1]-r[1],a=Math.sin(o),l=Math.cos(o);return e[0]=n*l-i*a+r[0],e[1]=n*a+i*l+r[1],e}function w6e(e,t){var r=e[0],o=e[1],n=t[0],i=t[1];return Math.abs(Math.atan2(o*n-r*i,r*n+o*i))}function S6e(e,t){var r=e[0],o=e[1],n=t[0],i=t[1];return Math.atan2(r*i-o*n,r*n+o*i)}function _6e(e){return e[0]=0,e[1]=0,e}function x6e(e){return"vec2("+e[0]+", "+e[1]+")"}function C6e(e,t){return e[0]===t[0]&&e[1]===t[1]}function T6e(e,t){var r=e[0],o=e[1],n=t[0],i=t[1];return Math.abs(r-n)<=Hc*Math.max(1,Math.abs(r),Math.abs(n))&&Math.abs(o-i)<=Hc*Math.max(1,Math.abs(o),Math.abs(i))}var P6e=Ute,E6e=Bte,k6e=Vte,R6e=jte,A6e=zte,I6e=Hte,O6e=Gte,N6e=(function(){var e=Lte();return function(t,r,o,n,i,a){var l,c;for(r||(r=2),o||(o=0),n?c=Math.min(n*r+o,t.length):c=t.length,l=o;l<c;l+=r)e[0]=t[l],e[1]=t[l+1],i(e,e,a),t[l]=e[0],t[l+1]=e[1];return t}})();function hR(e){return e>=0?e%360:(360+e%360)%360}function Al(e){return e*Math.PI/180}var A1t=lo.create(),I1t=wd.create();function Ua(e,t,r){let o=Al(r),n=Math.abs(Math.cos(o)),i=Math.abs(Math.sin(o));return{width:n*e+i*t,height:i*e+n*t}}function Wte(e,t,r){if(e.width===0||e.height===0||t.width===0||t.height===0)return{elementSize:{width:0,height:0},visualSize:{width:0,height:0}};let o=Math.round(r/90)*90,n=Ua(t.width,t.height,o),i=Math.min(e.width/n.width,e.height/n.height),a=t.width*i,l=t.height*i,c=Ua(a,l,o);return{elementSize:{width:a,height:l},visualSize:c}}function VV(e,t,r){let o=lo.create();if(t.width===0||t.height===0||r.width===0||r.height===0)return o;let n=Math.round(e.rotation/90)*90,i=Ua(r.width,r.height,n),a=Math.min(t.width/i.width,t.height/i.height),l=r.width*a,c=r.height*a,{width:u,height:d}=Ua(l,c,n);return lo.translate(o,o,[t.width/2,t.height/2]),lo.translate(o,o,[e.pan.x*u,e.pan.y*d]),lo.scale(o,o,[e.flip.horizontal?-1:1,e.flip.vertical?-1:1]),lo.rotate(o,o,Al(e.rotation)),lo.scale(o,o,[e.zoom,e.zoom]),lo.translate(o,o,[-l/2,-c/2]),lo.scale(o,o,[l,c]),o}function M6e(e,t){let r=t.map(l=>{let c=wd.create();return wd.transformMat2d(c,l,e),c}),o=r[0][0],n=r[0][0],i=r[0][1],a=r[0][1];for(let l=1;l<r.length;l++){let c=r[l];c[0]<o&&(o=c[0]),c[0]>n&&(n=c[0]),c[1]<i&&(i=c[1]),c[1]>a&&(a=c[1])}return{left:o,top:i,width:n-o,height:a-i}}function Yte(e){return M6e(e,[[0,0],[1,0],[1,1],[0,1]])}function qte(e,t,r){let o=lo.create(),{rotation:n,flip:i,cropRect:a,zoom:l,pan:c}=e;if(t.width===0||t.height===0||r.width===0||r.height===0)return o;let u=Math.round(n/90)*90,{width:d,height:f}=Ua(t.width,t.height,u),m=a.width*d,h=a.height*f,g=m>0?r.width/m:1,v=h>0?r.height/h:1,y=a.x*d+r.width/2/g,b=a.y*f+r.height/2/v,S=d/2+c.x*d,w=f/2+c.y*f;return lo.scale(o,o,[g,v]),lo.translate(o,o,[S-y+r.width/2/g,w-b+r.height/2/v]),lo.scale(o,o,[i.horizontal?-1:1,i.vertical?-1:1]),lo.rotate(o,o,Al(n)),lo.scale(o,o,[l,l]),lo.translate(o,o,[-t.width/2,-t.height/2]),o}var Kte=.92;function F6e(e){return new Promise((t,r)=>{let o=new Image;o.addEventListener("load",()=>t(o)),o.addEventListener("error",n=>r(n)),o.crossOrigin="anonymous",o.src=e})}function D6e(e,t){let{naturalWidth:r,naturalHeight:o}=e,{rotation:n,cropRect:i}=t,a={width:r,height:o},l=Math.round(n/90)*90,c=Ua(r,o,l),u=Math.round(i.width*c.width),d=Math.round(i.height*c.height),f=document.createElement("canvas");f.width=u,f.height=d;let m=f.getContext("2d");if(!m)throw new Error("Could not obtain a 2D context for the export canvas.");let h=qte(t,a,{width:u,height:d});return m.setTransform(h[0],h[1],h[2],h[3],h[4],h[5]),m.drawImage(e,0,0),f}function L6e(e,t="image/png",r=Kte){return new Promise((o,n)=>{e.toBlob(i=>{i?o(i):n(new Error("Canvas toBlob returned null."))},t,r)})}async function Zte(e,t,r="image/png",o=Kte){let n=await F6e(e),i=D6e(n,t);return L6e(i,r,o)}var Sd=1e-9;function gR(e,t){let r=Al(e),o=Math.abs(Math.cos(r)),n=Math.abs(Math.sin(r)),i=Ua(t,1,e);return{visualW:i.width,visualH:i.height,absC:o,absS:n}}function B6e(e,t,r){let o=Math.max(t,Number.EPSILON),n=Math.round(e/90)*90,{visualW:i,visualH:a}=gR(n,o),{absC:l,absS:c}=gR(e,o),u=r.width*i/2,d=r.height*a/2,f=u*l+d*c,m=u*c+d*l,h=2*f/o,g=2*m;return Math.max(1,h,g)}function $te(e,t,r){if(t.width===0||t.height===0||r.width===0||r.height===0)return{minX:0,minY:0,maxX:1,maxY:1};let o=e.pan.x*r.width,n=e.pan.y*r.height,i=Al(e.rotation),a=Math.cos(i),l=Math.sin(i),c=e.flip.horizontal?-1:1,u=e.flip.vertical?-1:1,d=e.zoom,f=c*a*d,m=u*l*d,h=-c*l*d,g=u*a*d,v=t.width/2,y=t.height/2,b=[[-v,-y],[v,-y],[v,y],[-v,y]],S=1/0,w=-1/0,_=1/0,C=-1/0;for(let[k,A]of b){let R=f*k+h*A+o,I=m*k+g*A+n,B=R/r.width+.5,E=I/r.height+.5;S=Math.min(S,B),w=Math.max(w,B),_=Math.min(_,E),C=Math.max(C,E)}return{minX:S,minY:_,maxX:w,maxY:C}}function ere(e,t,r,o){let n=Math.max(o,Number.EPSILON),i=Math.round(r/90)*90,{visualW:a,visualH:l}=gR(i,n),{absC:c,absS:u}=gR(r,n),d=e.width,f=e.height,m=d*a,h=f*l,g=m*c+h*u,v=m*u+h*c,y=n*t,b=t,S=1;if(g>0&&(S=Math.min(S,y/g)),v>0&&(S=Math.min(S,b/v)),S>=1-Sd)return e;let w=d*S,_=f*S,C=e.x+d/2,k=e.y+f/2,A=C-w/2,R=k-_/2;return A=Math.max(0,Math.min(A,1-w)),R=Math.max(0,Math.min(R,1-_)),{x:A,y:R,width:w,height:_}}var Xte={width:1e3,height:1e3},Qte=lo.create(),Jte=wd.create();function Js(e,t,r){let o=t.width>0&&t.height>0?t.width/t.height:1,n=B6e(e.rotation,o,r),i=Math.max(e.zoom,n),a={...e,zoom:i},l=VV(a,Xte,t),c=Math.round(e.rotation/90)*90,u=VV({...a,pan:{x:0,y:0},zoom:1,rotation:c},Xte,t),d=Yte(u),f=[[d.left+r.x*d.width,d.top+r.y*d.height],[d.left+(r.x+r.width)*d.width,d.top+r.y*d.height],[d.left+(r.x+r.width)*d.width,d.top+(r.y+r.height)*d.height],[d.left+r.x*d.width,d.top+(r.y+r.height)*d.height]];lo.invert(Qte,l);let m=1/0,h=-1/0,g=1/0,v=-1/0;for(let k of f){wd.transformMat2d(Jte,k,Qte);let A=Jte;A[0]<m&&(m=A[0]),A[0]>h&&(h=A[0]),A[1]<g&&(g=A[1]),A[1]>v&&(v=A[1])}if(m>=-Sd&&h<=1+Sd&&g>=-Sd&&v<=1+Sd)return{pan:e.pan,zoom:i};let y=0,b=0;m<0&&h<=1+Sd?y=-m:h>1&&m>=-Sd?y=1-h:m<0&&h>1&&(y=(1-h-m)/2),g<0&&v<=1+Sd?b=-g:v>1&&g>=-Sd?b=1-v:g<0&&v>1&&(b=(1-v-g)/2);let S=l[0]*y+l[2]*b,w=l[1]*y+l[3]*b,_=e.pan.x-(d.width>0?S/d.width:0),C=e.pan.y-(d.height>0?w/d.height:0);return{pan:{x:_,y:C},zoom:i}}var V6e=1e-6;function Bm(e,t){return Math.abs(e-t)<V6e}function j6e(e,t){switch(t.type){case"crop":return{type:"SET_CROP_RECT",payload:{...t.rect}};case"rotate":{let o=e.flip.horizontal!==e.flip.vertical?-t.degrees:t.degrees;return{type:"SET_ROTATION",payload:hR(e.rotation+o)}}case"flip":return{type:"SET_FLIP",payload:{...e.flip,[t.direction]:!e.flip[t.direction]}};case"zoom":return{type:"SET_ZOOM",payload:t.factor}}}function qi(e){if(!e.image)return e;let t={width:e.image.naturalWidth,height:e.image.naturalHeight},r=t.width/t.height,{pan:o,zoom:n}=Js(e,t,e.cropRect),i=ere(e.cropRect,n,e.rotation,r),a=o;return i!==e.cropRect&&({pan:a}=Js({...e,zoom:n,cropRect:i},t,i)),a.x===e.pan.x&&a.y===e.pan.y&&n===e.zoom&&i===e.cropRect?e:{...e,pan:a,zoom:n,cropRect:i}}function _d(e){return e.basePan.x===e.pan.x&&e.basePan.y===e.pan.y&&e.baseZoom===e.zoom&&e.baseRotation===e.rotation?e:{...e,basePan:{x:e.pan.x,y:e.pan.y},baseZoom:e.zoom,baseRotation:e.rotation}}function jV(e,t){switch(t.type){case"SET_IMAGE":return _d(qi({...e,image:t.payload}));case"SET_PAN":return _d(qi({...e,pan:t.payload}));case"SET_ZOOM":{let r=Math.min(cg,Math.max(1,t.payload));return _d(qi({...e,zoom:r}))}case"SET_ZOOM_AT_POINT":{let r=Math.min(cg,Math.max(1,t.payload.zoom));return _d(qi({...e,zoom:r,pan:t.payload.pan}))}case"SET_ROTATION":{let r=hR(t.payload),o=e.flip.horizontal!==e.flip.vertical,n=Al(r-e.baseRotation),i=Math.cos(n),a=Math.sin(n)*(o?-1:1),l=e.cropRect.x+e.cropRect.width/2,c=e.cropRect.y+e.cropRect.height/2,u=l-.5,d=c-.5,f=e.basePan.x-u,m=e.basePan.y-d;return qi({...e,rotation:r,zoom:e.baseZoom,pan:{x:u+i*f-a*m,y:d+a*f+i*m}})}case"SNAP_ROTATE_90":{let r=t.payload.direction,n=e.flip.horizontal!==e.flip.vertical?-r:r,i=hR(e.rotation+n*90),a=e.cropRect,l=a.x+a.width/2,c=a.y+a.height/2,u=r===1?-e.pan.y:e.pan.y,d=r===1?e.pan.x:-e.pan.x;return _d(qi({...e,rotation:i,zoom:e.baseZoom,pan:{x:u,y:d},cropRect:{x:l-a.height/2,y:c-a.width/2,width:a.height,height:a.width}}))}case"SET_FLIP":{let r=e.flip,o=t.payload,n=r.horizontal!==o.horizontal,i=r.vertical!==o.vertical,a=e.cropRect;return _d(qi({...e,flip:o,pan:{x:n?-e.pan.x:e.pan.x,y:i?-e.pan.y:e.pan.y},cropRect:{x:n?1-a.x-a.width:a.x,y:i?1-a.y-a.height:a.y,width:a.width,height:a.height}}))}case"SET_CROP_RECT":return _d(qi({...e,cropRect:t.payload}));case"SETTLE_CROP":{let r=e.cropRect;if(r.width===0||r.height===0||!e.image)return e;let o=r.width/r.height,n=1,i=o;i>1&&(i=1,n=1/o);let a=n/r.height,l=r.x+r.width/2,c=r.y+r.height/2;return _d(qi({...e,zoom:e.zoom*a,pan:{x:(e.pan.x-l+.5)*a,y:(e.pan.y-c+.5)*a},cropRect:{x:(1-i)/2,y:(1-n)/2,width:i,height:n}}))}case"APPLY_OPERATION":return jV(e,j6e(e,t.payload));case"RESET":return _d(qi({...vb,image:e.image,...t.payload}))}}function tre(e,t){return!Bm(e.pan.x,t.pan.x)||!Bm(e.pan.y,t.pan.y)||!Bm(e.zoom,t.zoom)||!Bm(e.rotation,t.rotation)||e.flip.horizontal!==t.flip.horizontal||e.flip.vertical!==t.flip.vertical||!Bm(e.cropRect.x,t.cropRect.x)||!Bm(e.cropRect.y,t.cropRect.y)||!Bm(e.cropRect.width,t.cropRect.width)||!Bm(e.cropRect.height,t.cropRect.height)}var z6e=300,H6e=1e-6;function Vm(e,t){return Math.abs(e-t)<H6e}function v1(e,t){let r=e.image,o=t.image;return r?.src===o?.src&&r?.naturalWidth===o?.naturalWidth&&r?.naturalHeight===o?.naturalHeight&&Vm(e.pan.x,t.pan.x)&&Vm(e.pan.y,t.pan.y)&&Vm(e.zoom,t.zoom)&&Vm(e.rotation,t.rotation)&&e.flip.horizontal===t.flip.horizontal&&e.flip.vertical===t.flip.vertical&&Vm(e.cropRect.x,t.cropRect.x)&&Vm(e.cropRect.y,t.cropRect.y)&&Vm(e.cropRect.width,t.cropRect.width)&&Vm(e.cropRect.height,t.cropRect.height)}function rre(e){let[t,r]=(0,Rt.useReducer)(jV,e,O=>qi({...vb,...O})),o=(0,Rt.useRef)(qi({...vb,...e})),n=(0,Rt.useRef)(t);n.current=t;let i=(0,Rt.useRef)([]),a=(0,Rt.useRef)([]),[l,c]=(0,Rt.useState)(!1),[u,d]=(0,Rt.useState)(!1),f=(0,Rt.useRef)(t),m=(0,Rt.useRef)(),h=(0,Rt.useRef)(!1),g=(0,Rt.useCallback)(O=>{let M=O??n.current,D=i.current[i.current.length-1];D&&v1(D,M)||(i.current=[...i.current,M],a.current=[],c(!0),d(!1))},[]);(0,Rt.useEffect)(()=>{if(h.current){h.current=!1,f.current=n.current;return}if(f.current!==null&&v1(f.current,n.current)){f.current=n.current;return}return clearTimeout(m.current),m.current=setTimeout(()=>{let O=f.current;O!==null&&!v1(O,n.current)&&g(O),f.current=n.current},z6e),()=>clearTimeout(m.current)},[t,g]);let v=(0,Rt.useCallback)(()=>{clearTimeout(m.current);let O=f.current;O!==null&&!v1(O,n.current)&&g(O),f.current=n.current},[g]),y=(0,Rt.useCallback)(()=>{v();let O=i.current[i.current.length-1];O&&(a.current=[n.current,...a.current],i.current=i.current.slice(0,-1),h.current=!0,c(i.current.length>0),d(!0),r({type:"RESET",payload:O}))},[r,v]),b=(0,Rt.useCallback)(()=>{v();let O=a.current[0];O&&(i.current=[...i.current,n.current],a.current=a.current.slice(1),h.current=!0,c(!0),d(a.current.length>0),r({type:"RESET",payload:O}))},[r,v]),S=(0,Rt.useCallback)(O=>{clearTimeout(m.current),h.current=!0,r({type:"SET_IMAGE",payload:O}),o.current=qi({...o.current,image:O})},[r]),w=(0,Rt.useCallback)(O=>{r({type:"SET_PAN",payload:O})},[r]),_=(0,Rt.useCallback)(O=>{r({type:"SET_ZOOM",payload:O})},[r]),C=(0,Rt.useCallback)((O,M)=>{r({type:"SET_ZOOM_AT_POINT",payload:{zoom:O,pan:M}})},[r]),k=(0,Rt.useCallback)(O=>{r({type:"SET_ROTATION",payload:O})},[r]),A=(0,Rt.useCallback)(O=>{v(),g(),h.current=!0,r({type:"SET_FLIP",payload:O})},[r,g,v]),R=(0,Rt.useCallback)(O=>{A({...n.current.flip,[O]:!n.current.flip[O]})},[A]),I=(0,Rt.useCallback)(O=>{v(),g(),h.current=!0,r({type:"SNAP_ROTATE_90",payload:{direction:O}})},[r,g,v]),B=(0,Rt.useCallback)(O=>{r({type:"SET_CROP_RECT",payload:O})},[r]),E=(0,Rt.useCallback)(()=>{v(),h.current=!0,r({type:"SETTLE_CROP"})},[r,v]),P=(0,Rt.useCallback)(O=>{v(),g(),h.current=!0,r({type:"APPLY_OPERATION",payload:O})},[r,g,v]),L=(0,Rt.useCallback)(O=>{v();let M=qi({...vb,image:n.current.image,...O});v1(n.current,M)||g(),h.current=!0,r({type:"RESET",payload:O}),o.current=M},[r,g,v]),j=tre(t,o.current),z=(0,Rt.useCallback)((O,M)=>t.image?Zte(t.image.src,t,O,M):Promise.reject(new Error("No image loaded \u2014 call setImage first.")),[t]);return{state:t,setImage:S,setPan:w,setZoom:_,setZoomAtPoint:C,setRotation:k,setFlip:A,toggleFlip:R,snapRotate90:I,setCropRect:B,settleCrop:E,applyOperation:P,reset:L,isDirty:j,getCroppedImage:z,hasUndo:l,hasRedo:u,undo:y,redo:b,commitHistory:v}}var dt=s(V(),1),HV=s(N(),1);var wr=s(V(),1);var ore=300,U6e=30,G6e=200;function xd(e){return e.image?{width:e.image.naturalWidth,height:e.image.naturalHeight}:{width:1,height:1}}function vR(e,t){let r=e.clientX-t.clientX,o=e.clientY-t.clientY;return Math.sqrt(r*r+o*o)}var nre=class{options;isDragging=!1;isZooming=!1;drag=null;touch=null;touchCleanup=null;pointerCleanup=null;lastTap=null;zoomTimer;wheelGestureTimer;wheelGestureActive=!1;rafId=0;constructor(e){this.options=e}get minZoom(){return this.options.minZoom??Lm}get maxZoom(){return this.options.maxZoom??cg}get zoomSpeed(){return this.options.zoomSpeed??Ote}get keyboardStep(){return this.options.keyboardStep??h1}getKeyboardStep(e){return e.shiftKey?this.keyboardStep*pR:this.keyboardStep}get doubleTapZoom(){return this.options.doubleTapZoom??2}setStatus(e){let t=!1;e.isDragging!==void 0&&e.isDragging!==this.isDragging&&(this.isDragging=e.isDragging,t=!0),e.isZooming!==void 0&&e.isZooming!==this.isZooming&&(this.isZooming=e.isZooming,t=!0),t&&this.options.onStatusChange?.({isDragging:this.isDragging,isZooming:this.isZooming})}handlePointerDown(e,t){if(e.button!==0)return;e.preventDefault();let r=t.ownerDocument;r?.activeElement instanceof HTMLElement&&r.activeElement!==t&&r.activeElement.blur(),t.focus(),t.setPointerCapture(e.pointerId),this.setStatus({isDragging:!0}),this.options.onGestureStart?.();let o=this.options.getState();this.drag={startX:e.clientX,startY:e.clientY,startPanX:o.pan.x,startPanY:o.pan.y};let n=l=>{let c=this.drag;if(!c)return;let u=l;cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(()=>{let d=this.options.getState(),f=this.options.getImageSize(),m=this.options.getContainerSize(),h=f??m,g=h.width>0?(u.clientX-c.startX)/h.width:0,v=h.height>0?(u.clientY-c.startY)/h.height:0,{pan:y}=Js({...d,pan:{x:c.startPanX+g,y:c.startPanY+v}},xd(d),d.cropRect);this.options.actions.setPan(y)})},i=()=>{t.removeEventListener("pointermove",n),t.removeEventListener("pointerup",a),t.removeEventListener("lostpointercapture",a)},a=()=>{this.setStatus({isDragging:!1}),this.options.onGestureEnd?.(),this.drag=null,cancelAnimationFrame(this.rafId),i(),this.pointerCleanup=null};t.addEventListener("pointermove",n),t.addEventListener("pointerup",a),t.addEventListener("lostpointercapture",a),this.pointerCleanup=i}handleWheel(e){if(e.preventDefault(),this.drag)return;this.wheelGestureActive||(this.wheelGestureActive=!0,this.options.onGestureStart?.()),clearTimeout(this.wheelGestureTimer),this.wheelGestureTimer=setTimeout(()=>{this.wheelGestureActive=!1,this.options.onGestureEnd?.()},ore);let t=this.options.getState(),r=-e.deltaY*this.zoomSpeed,o=Math.min(this.maxZoom,Math.max(this.minZoom,t.zoom+r));if(o===t.zoom)return;let n=this.options.getContainerSize(),a=this.options.getImageSize()??n,l=e.currentTarget,c=l instanceof Element?l.getBoundingClientRect():void 0;if(a.width>0&&a.height>0&&c){let u=e.clientX-c.left-n.width/2,d=e.clientY-c.top-n.height/2,f=1-o/t.zoom,m=u/a.width,h=d/a.height,g=t.pan.x+(m-t.pan.x)*f,v=t.pan.y+(h-t.pan.y)*f,{pan:y}=Js({...t,zoom:o,pan:{x:g,y:v}},xd(t),t.cropRect);this.options.actions.setZoomAtPoint(o,y)}else this.options.actions.setZoom(o)}handleTouchStart(e,t,r=document){if(this.touch&&e.touches.length===2){let n=this.options.getState(),i=vR(e.touches[0],e.touches[1]),a=(e.touches[0].clientX+e.touches[1].clientX)/2,l=(e.touches[0].clientY+e.touches[1].clientY)/2;this.touch.didPinch=!0,this.touch.startDistance=i,this.touch.startZoom=n.zoom,this.touch.startPanX=n.pan.x,this.touch.startPanY=n.pan.y,this.touch.startMidX=a,this.touch.startMidY=l,this.touch.containerRect=t,this.setStatus({isDragging:!1});return}if(e.touches.length===1){let n=e.touches[0].clientX,i=e.touches[0].clientY;if(this.tryDoubleTap(e,n,i,t))return;let a=this.options.getState();this.touch={startDistance:0,startZoom:a.zoom,lastTouchX:e.touches[0].clientX,lastTouchY:e.touches[0].clientY,startPanX:a.pan.x,startPanY:a.pan.y,containerRect:t,startMidX:0,startMidY:0,didPinch:!1,moved:!1},this.options.onGestureStart?.()}else if(e.touches.length===2){let n=this.options.getState(),i=vR(e.touches[0],e.touches[1]),a=(e.touches[0].clientX+e.touches[1].clientX)/2,l=(e.touches[0].clientY+e.touches[1].clientY)/2;this.touch={startDistance:i,startZoom:n.zoom,lastTouchX:0,lastTouchY:0,startPanX:n.pan.x,startPanY:n.pan.y,containerRect:t,startMidX:a,startMidY:l,didPinch:!0,moved:!1},this.options.onGestureStart?.()}let o=()=>{this.touch=null,this.touchCleanup=null,cancelAnimationFrame(this.rafId),r.removeEventListener("touchmove",this.handleTouchMove),r.removeEventListener("touchend",o),r.removeEventListener("touchcancel",o),this.setStatus({isDragging:!1}),this.options.onGestureEnd?.()};this.touchCleanup?.(),r.addEventListener("touchmove",this.handleTouchMove,{passive:!1}),r.addEventListener("touchend",o),r.addEventListener("touchcancel",o),this.touchCleanup=o}handleTouchMove=e=>{let t=this.touch;t&&(cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(()=>{let r=this.options.getState();if(e.touches.length===2){if(!t.didPinch){t.didPinch=!0,t.startDistance=vR(e.touches[0],e.touches[1]),t.startZoom=r.zoom,t.startPanX=r.pan.x,t.startPanY=r.pan.y,t.startMidX=(e.touches[0].clientX+e.touches[1].clientX)/2,t.startMidY=(e.touches[0].clientY+e.touches[1].clientY)/2,this.setStatus({isDragging:!1});return}let o=this.options.getContainerSize(),n=this.options.getImageSize(),i=e.touches[0],a=e.touches[1],c=vR(i,a)/t.startDistance,u=Math.min(this.maxZoom,Math.max(this.minZoom,t.startZoom*c)),d=n??o,f=t.containerRect;if(d.width>0&&d.height>0&&f){let m=(i.clientX+a.clientX)/2-f.left-o.width/2,h=(i.clientY+a.clientY)/2-f.top-o.height/2,g=t.startMidX-f.left-o.width/2,v=t.startMidY-f.top-o.height/2,y=d.width>0?(m-g)/d.width:0,b=d.height>0?(h-v)/d.height:0,S=r.zoom!==0?1-u/r.zoom:0,w=m/d.width,_=h/d.height,C=r.pan.x+(w-r.pan.x)*S,k=r.pan.y+(_-r.pan.y)*S,A=t.startPanX+y+(C-r.pan.x),R=t.startPanY+b+(k-r.pan.y),{pan:I}=Js({...r,zoom:u,pan:{x:A,y:R}},xd(r),r.cropRect);this.options.actions.setZoomAtPoint(u,I)}else u!==r.zoom&&this.options.actions.setZoom(u)}else if(e.touches.length===1&&!t.didPinch){t.moved||(t.moved=!0,this.setStatus({isDragging:!0}));let o=this.options.getImageSize(),n=this.options.getContainerSize(),i=o??n,a=i.width>0?(e.touches[0].clientX-t.lastTouchX)/i.width:0,l=i.height>0?(e.touches[0].clientY-t.lastTouchY)/i.height:0,{pan:c}=Js({...r,pan:{x:t.startPanX+a,y:t.startPanY+l}},xd(r),r.cropRect);this.options.actions.setPan(c)}}))};tryDoubleTap(e,t,r,o){let n=Date.now(),i=this.lastTap;if(!i)return this.lastTap={time:n,x:t,y:r},!1;let a=n-i.time,l=Math.sqrt((t-i.x)**2+(r-i.y)**2);if(!(a<ore&&l<U6e))return this.lastTap={time:n,x:t,y:r},!1;e.preventDefault(),this.lastTap=null;let u=this.options.getState(),d=this.options.getContainerSize(),f=this.options.getImageSize(),m=u.zoom>(this.minZoom+this.doubleTapZoom)/2?this.minZoom:this.doubleTapZoom,h=f??d;if(this.setStatus({isZooming:!0}),clearTimeout(this.zoomTimer),this.zoomTimer=setTimeout(()=>{this.setStatus({isZooming:!1})},G6e),this.options.onGestureStart?.(),h.width>0&&h.height>0){let g=t-o.left-d.width/2,v=r-o.top-d.height/2,y=1-m/u.zoom,b=g/h.width,S=v/h.height,w=u.pan.x+(b-u.pan.x)*y,_=u.pan.y+(S-u.pan.y)*y,{pan:C}=Js({...u,zoom:m,pan:{x:w,y:_}},xd(u),u.cropRect);this.options.actions.setZoomAtPoint(m,C)}else this.options.actions.setZoom(m);return this.options.onGestureEnd?.(),!0}handleKeyDown(e){let t=this.options.getState();switch(e.key){case"ArrowUp":{e.preventDefault();let r=this.getKeyboardStep(e),{pan:o}=Js({...t,pan:{x:t.pan.x,y:t.pan.y+r}},xd(t),t.cropRect);this.options.actions.setPan(o);break}case"ArrowDown":{e.preventDefault();let r=this.getKeyboardStep(e),{pan:o}=Js({...t,pan:{x:t.pan.x,y:t.pan.y-r}},xd(t),t.cropRect);this.options.actions.setPan(o);break}case"ArrowLeft":{e.preventDefault();let r=this.getKeyboardStep(e),{pan:o}=Js({...t,pan:{x:t.pan.x+r,y:t.pan.y}},xd(t),t.cropRect);this.options.actions.setPan(o);break}case"ArrowRight":{e.preventDefault();let r=this.getKeyboardStep(e),{pan:o}=Js({...t,pan:{x:t.pan.x-r,y:t.pan.y}},xd(t),t.cropRect);this.options.actions.setPan(o);break}case"+":case"=":{e.preventDefault();let r=Math.min(this.maxZoom,Math.max(this.minZoom,t.zoom+.5));this.options.actions.setZoom(r);break}case"-":case"_":{e.preventDefault();let r=Math.min(this.maxZoom,Math.max(this.minZoom,t.zoom-.5));this.options.actions.setZoom(r);break}case"r":case"R":{if(e.metaKey||e.ctrlKey||e.altKey)break;e.preventDefault(),this.options.actions.snapRotate90(e.shiftKey?-1:1);break}case"h":case"H":{if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)break;e.preventDefault(),this.options.actions.toggleFlip?.("horizontal");break}case"v":case"V":{if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)break;e.preventDefault(),this.options.actions.toggleFlip?.("vertical");break}}}destroy(){cancelAnimationFrame(this.rafId),clearTimeout(this.zoomTimer),clearTimeout(this.wheelGestureTimer),this.touchCleanup?.(),this.touchCleanup=null,this.pointerCleanup?.(),this.pointerCleanup=null,this.drag=null,this.touch=null,this.lastTap=null}};var W6e=300;function Y6e(e){switch(e.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":return!0;default:return!1}}function q6e(e){switch(e.key){case"+":case"=":case"-":case"_":return!0;default:return!1}}function ire(e,t,r,o,n){let[i,a]=(0,wr.useState)(!1),[l,c]=(0,wr.useState)(!1),[u,d]=(0,wr.useState)(!1),[f,m]=(0,wr.useState)(!1),h=(0,wr.useRef)(),g=(0,wr.useRef)(!1),v=(0,wr.useRef)(e);v.current=e;let y=(0,wr.useRef)(r);y.current=r;let b=(0,wr.useRef)(o);b.current=o;let S=(0,wr.useRef)(n);S.current=n;let w=(0,wr.useRef)(t);w.current=t;let _=(0,wr.useRef)(null),C=(0,wr.useCallback)(()=>{d(!0)},[]),k=(0,wr.useCallback)(()=>{d(!1)},[]),A=(0,wr.useCallback)(()=>{g.current||(g.current=!0,S.current?.onGestureStart?.()),clearTimeout(h.current),h.current=setTimeout(()=>{g.current=!1,m(!1),S.current?.onGestureEnd?.()},W6e)},[]);(0,wr.useEffect)(()=>()=>{clearTimeout(h.current)},[]),(0,wr.useEffect)(()=>{let P=new nre({getState:()=>v.current,actions:{setPan:L=>w.current.setPan(L),setZoom:L=>w.current.setZoom(L),setZoomAtPoint:(L,j)=>w.current.setZoomAtPoint(L,j),snapRotate90:L=>w.current.snapRotate90(L),toggleFlip:L=>w.current.toggleFlip?.(L)},getContainerSize:()=>y.current,getImageSize:()=>b.current,get minZoom(){return S.current?.minZoom},get maxZoom(){return S.current?.maxZoom},get zoomSpeed(){return S.current?.zoomSpeed},get keyboardStep(){return S.current?.keyboardStep},get doubleTapZoom(){return S.current?.doubleTapZoom},onGestureStart:()=>{C(),S.current?.onGestureStart?.()},onGestureEnd:()=>{k(),S.current?.onGestureEnd?.()},onStatusChange:L=>{a(L.isDragging),c(L.isZooming)}});return _.current=P,()=>{P.destroy(),_.current=null}},[C,k]);let R=(0,wr.useCallback)(P=>{let L=P.currentTarget;_.current?.handlePointerDown(P.nativeEvent,L)},[]),I=(0,wr.useCallback)(P=>{let L=P.currentTarget,j=L.getBoundingClientRect();_.current?.handleTouchStart(P.nativeEvent,j,L.ownerDocument)},[]),B=(0,wr.useCallback)(P=>{Y6e(P.nativeEvent)?(m(!0),A()):q6e(P.nativeEvent)&&A(),_.current?.handleKeyDown(P.nativeEvent)},[A]),E=(0,wr.useCallback)(P=>{_.current?.handleWheel(P)},[]);return{handlers:{onPointerDown:R,onTouchStart:I,onKeyDown:B},onWheelNative:E,isDragging:i,isZooming:l,isPlacementActive:u||f||l}}var are=s(V(),1);function sre(e,t){let r=e.pan.x*t.width,o=e.pan.y*t.height,n=Al(e.rotation),i=Math.cos(n),a=Math.sin(n),l=e.flip.horizontal?-1:1,c=e.flip.vertical?-1:1,u=e.zoom,d=l*i*u,f=c*a*u,m=-l*a*u,h=c*i*u;return`matrix(${d}, ${f}, ${m}, ${h}, ${r}, ${o})`}function lre(e,t){return(0,are.useMemo)(()=>sre(e,t),[e,t])}var Il=s(V(),1),Ga=s(N(),1),K6e=300;function cre(e){let{horizontal:t,vertical:r}=e.flip;return t&&r?(0,Ga.__)("Flipped horizontally and vertically"):t?(0,Ga.__)("Flipped horizontally"):r?(0,Ga.__)("Flipped vertically"):(0,Ga.__)("Flip removed")}function Z6e(e,t){if(t&&(t.flip.horizontal!==e.flip.horizontal||t.flip.vertical!==e.flip.vertical))return cre(e);let r=[];r.push((0,Ga.sprintf)((0,Ga.__)("Zoom %d%%"),Math.round(e.zoom*100))),e.rotation!==0&&r.push((0,Ga.sprintf)((0,Ga.__)("Rotation %d degrees"),Math.round(e.rotation)));let o=Math.round(e.cropRect.width*100),n=Math.round(e.cropRect.height*100);return r.push((0,Ga.sprintf)((0,Ga.__)("Crop %1$d%% by %2$d%%"),o,n)),(e.flip.horizontal||e.flip.vertical)&&r.push(cre(e)),r.join(", ")}function ure(e){let[t,r]=(0,Il.useState)(""),o=(0,Il.useRef)(),n=(0,Il.useRef)(""),i=(0,Il.useRef)(null),a=(0,Il.useRef)(e);return(0,Il.useLayoutEffect)(()=>{a.current=e},[e]),(0,Il.useEffect)(()=>(clearTimeout(o.current),o.current=setTimeout(()=>{let l=a.current,c=Z6e(l,i.current);i.current=l,c!==n.current&&(n.current=c,r(c))},K6e),()=>{clearTimeout(o.current)}),[e.zoom,e.rotation,e.cropRect.width,e.cropRect.height,e.flip.horizontal,e.flip.vertical]),t}var Vn=s(V(),1),Gc=s(N(),1);var Wa=.05;function yR(e,t,r,o,n){let i=o.width>0?(t-e.startX)/o.width:0,a=o.height>0?(r-e.startY)/o.height:0,l=e.startRect,c=e.handle,u=l.y,d=l.y+l.height,f=l.x,m=l.x+l.width;return(c==="n"||c==="nw"||c==="ne")&&(u=Math.max(n.minY,Math.min(l.y+a,d-Wa))),(c==="s"||c==="sw"||c==="se")&&(d=Math.max(u+Wa,Math.min(l.y+l.height+a,n.maxY))),(c==="w"||c==="nw"||c==="sw")&&(f=Math.max(n.minX,Math.min(l.x+i,m-Wa))),(c==="e"||c==="ne"||c==="se")&&(m=Math.max(f+Wa,Math.min(l.x+l.width+i,n.maxX))),{x:f,y:u,width:m-f,height:d-u}}function zV(e,t,r,o,n,i){if(i<=0||o.width<=0||o.height<=0)return{...e.startRect};let a=(t-e.startX)/o.width,l=(r-e.startY)/o.height,c=e.startRect,u=e.handle,d=u==="nw"||u==="sw"?c.x+c.width:c.x,f=u==="nw"||u==="ne"?c.y+c.height:c.y,m=u==="nw"||u==="sw"?-1:1,h=u==="nw"||u==="ne"?-1:1,g=(u==="nw"||u==="sw"?c.x:c.x+c.width)+a,v=(u==="nw"||u==="ne"?c.y:c.y+c.height)+l,y=(g-d)*m,b=(v-f)*h;y=Math.max(y,Wa),b=Math.max(b,Wa);let S=y*o.width,w=b*o.height,_=i*o.width/o.height;S/w>_?b=y/i:y=b*i;let C=m>0?n.maxX-d:d-n.minX,k=h>0?n.maxY-f:f-n.minY;y>C&&(y=C,b=y/i),b>k&&(b=k,y=b*i),y=Math.max(y,Wa),b=Math.max(b,Wa);let A=m>0?d:d-y,R=h>0?f:f-b;return{x:A,y:R,width:y,height:b}}function dre(e,t,r,o,n){let i=e.startRect,a=i.width*o.width;if(i.height*o.height<=0||a<=0)return yR(e,t,r,o,n);let c=i.width/i.height,u=e.handle;if(u==="nw"||u==="ne"||u==="sw"||u==="se")return zV(e,t,r,o,n,c);let d=yR(e,t,r,o,n);if(u==="n"||u==="s"){let b=d.height,S=b*c,w=i.x+i.width/2,_=Math.min(w-n.minX,n.maxX-w)*2;S>_&&(S=_,b=S/c);let C=Math.max(Wa,Wa/c);b<C&&(b=C,S=b*c);let k=u==="n"?i.y+i.height-b:i.y;return{x:w-S/2,y:k,width:S,height:b}}let f=d.width,m=f/c,h=i.y+i.height/2,g=Math.min(h-n.minY,n.maxY-h)*2;m>g&&(m=g,f=m*c);let v=Math.max(Wa,Wa*c);return f<v&&(f=v,m=f/c),{x:u==="w"?i.x+i.width-f:i.x,y:h-m/2,width:f,height:m}}var y1={position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0};var yb=s(x(),1),X6e=["nw","ne","se","sw"],Q6e=["nw","n","ne","e","se","s","sw","w"];function J6e(e){switch(e){case"n":return(0,Gc.__)("Resize top edge");case"s":return(0,Gc.__)("Resize bottom edge");case"e":return(0,Gc.__)("Resize right edge");case"w":return(0,Gc.__)("Resize left edge");case"nw":return(0,Gc.__)("Resize top-left corner");case"ne":return(0,Gc.__)("Resize top-right corner");case"sw":return(0,Gc.__)("Resize bottom-left corner");case"se":return(0,Gc.__)("Resize bottom-right corner")}}var $6e=500;function fre({cropRect:e,containerSize:t,imageSize:r,onCropChange:o,onResizeStart:n,onResizeEnd:i,aspectRatio:a,freeformCrop:l=!1,stencilTransition:c,cropBounds:u,onEscape:d}){let f=u?.minX??0,m=u?.minY??0,h=u?.maxX??1,g=u?.maxY??1,v=(0,Vn.useMemo)(()=>({minX:f,minY:m,maxX:h,maxY:g}),[f,m,h,g]),y=(0,Vn.useRef)(),b=(0,Vn.useRef)(!1),S=(0,Vn.useId)(),w=!!(a&&a>0);(0,Vn.useEffect)(()=>()=>{clearTimeout(y.current),b.current=!1},[]);let _=(0,Vn.useRef)(null),C=(0,Vn.useMemo)(()=>!w||r.width===0?0:a*r.height/r.width,[a,w,r.width,r.height]),k=(t.width-r.width)/2,A=(t.height-r.height)/2,R=k+e.x*r.width,I=A+e.y*r.height,B=e.width*r.width,E=e.height*r.height,P=(0,Vn.useCallback)((M,D)=>{if(D.button!==0)return;D.preventDefault(),D.stopPropagation();let G=D.currentTarget.ownerDocument;G.activeElement instanceof HTMLElement&&G.activeElement.blur();let q=D.currentTarget;q.setPointerCapture(D.pointerId);let Z={handle:M,startX:D.clientX,startY:D.clientY,startRect:{...e}},te=0,ie=D.clientX,Se=D.clientY,fe=D.shiftKey,X=ve=>{let Ie=ve;ie=Ie.clientX,Se=Ie.clientY,fe=Ie.shiftKey,!te&&(te=requestAnimationFrame(()=>{te=0;let et=_.current;if(!et)return;let it;et.hasLockedRatio?it=et.computeLockedRect(Z,ie,Se):fe?it=et.computeShiftLockedRect(Z,ie,Se):it=et.computeFreeRect(Z,ie,Se),et.onCropChange(it)}))},ee=!1,pe=()=>{ee||(ee=!0,te&&(cancelAnimationFrame(te),te=0),q.removeEventListener("pointermove",X),q.removeEventListener("pointerup",pe),q.removeEventListener("lostpointercapture",pe),_.current?.onResizeEnd?.(),q.focus({preventScroll:!0}))};q.addEventListener("pointermove",X),q.addEventListener("pointerup",pe),q.addEventListener("lostpointercapture",pe),n?.(),clearTimeout(y.current),b.current=!1},[e,n]),L=(0,Vn.useCallback)((M,D,G)=>yR(M,D,G,r,v),[r,v]),j=(0,Vn.useCallback)((M,D,G)=>zV(M,D,G,r,v,C),[r,v,C]),z=(0,Vn.useCallback)((M,D,G)=>dre(M,D,G,r,v),[r,v]);_.current={hasLockedRatio:w,computeLockedRect:j,computeFreeRect:L,computeShiftLockedRect:z,onCropChange:o,onResizeEnd:i};let W=(0,Vn.useCallback)((M,D)=>{let G=D.key;if(G==="Escape"){D.preventDefault(),D.stopPropagation(),d?.();return}if(G!=="ArrowUp"&&G!=="ArrowDown"&&G!=="ArrowLeft"&&G!=="ArrowRight")return;D.preventDefault(),D.stopPropagation(),b.current||(b.current=!0,n?.());let q=()=>{clearTimeout(y.current),y.current=setTimeout(()=>{b.current=!1,i?.()},$6e)},Z=D.shiftKey?h1*pR:h1,te=0,ie=0;if(G==="ArrowLeft"&&(te=-Z),G==="ArrowRight"&&(te=Z),G==="ArrowUp"&&(ie=-Z),G==="ArrowDown"&&(ie=Z),w){let Se={handle:M,startX:0,startY:0,startRect:{...e}},fe=te*r.width,X=ie*r.height;o(j(Se,fe,X)),q()}else{let Se={handle:M,startX:0,startY:0,startRect:{...e}},fe=te*r.width,X=ie*r.height;o(L(Se,fe,X)),q()}},[e,w,r.width,r.height,j,L,o,n,i,d]);if(t.width===0||t.height===0)return null;let O=w?X6e:Q6e;return(0,yb.jsxs)("div",{className:"wp-media-editor-image-editor__stencil",style:{left:R,top:I,width:B,height:E,transition:c},children:[l&&(0,yb.jsx)("div",{id:S,style:y1,children:(0,Gc.__)("Use arrow keys to resize the crop area. Hold Shift for larger steps.")}),(0,yb.jsx)("div",{className:"wp-media-editor-image-editor__stencil-rect",style:{width:"100%",height:"100%",top:0,left:0}}),l&&O.map(M=>(0,yb.jsx)("button",{type:"button",className:`wp-media-editor-image-editor__handle wp-media-editor-image-editor__handle--${M}`,onPointerDown:D=>P(M,D),onTouchStart:D=>D.stopPropagation(),onKeyDown:D=>W(M,D),"aria-label":J6e(M),"aria-describedby":S},M))]})}var mre=s(x(),1);function pre({cropRect:e,containerSize:t,imageSize:r,transition:o}){if(t.width===0||t.height===0)return null;let n=(t.width-r.width)/2,i=(t.height-r.height)/2,a=n+e.x*r.width,l=i+e.y*r.height,c=e.width*r.width,u=e.height*r.height,d=o?`${o}, box-shadow 0.15s ease`:void 0;return(0,mre.jsx)("div",{className:"wp-media-editor-image-editor__dimming",style:{left:a,top:l,width:c,height:u,transition:d}})}var ug=s(x(),1);function hre({cropRect:e,containerSize:t,imageSize:r}){if(t.width===0||t.height===0)return null;let o=(t.width-r.width)/2,n=(t.height-r.height)/2,i=o+e.x*r.width,a=n+e.y*r.height,l=e.width*r.width,c=e.height*r.height,u=l/3,d=c/3;return(0,ug.jsxs)("div",{className:"wp-media-editor-image-editor__grid","data-testid":"cropper-grid",style:{left:i,top:a,width:l,height:c},children:[(0,ug.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--horizontal",style:{top:d}}),(0,ug.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--horizontal",style:{top:d*2}}),(0,ug.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--vertical",style:{left:u}}),(0,ug.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--vertical",style:{left:u*2}})]})}var bR=s(V(),1);var jm=s(V(),1);var bb={zoom:1,pan:{x:0,y:0}};function gre(e,t){switch(t.type){case"SET_VIEWPORT_ZOOM":{let r=Math.min(4,Math.max(.1,t.payload));return r===e.zoom?e:{...e,zoom:r}}case"SET_VIEWPORT_PAN":{let{x:r,y:o}=t.payload;return r===e.pan.x&&o===e.pan.y?e:{...e,pan:t.payload}}case"RESET_VIEWPORT":return e.zoom===bb.zoom&&e.pan.x===bb.pan.x&&e.pan.y===bb.pan.y?e:bb}}function vre(){let[e,t]=(0,jm.useReducer)(gre,bb),r=(0,jm.useCallback)(i=>{t({type:"SET_VIEWPORT_ZOOM",payload:i})},[]),o=(0,jm.useCallback)(i=>{t({type:"SET_VIEWPORT_PAN",payload:i})},[]),n=(0,jm.useCallback)(()=>{t({type:"RESET_VIEWPORT"})},[]);return(0,jm.useMemo)(()=>({viewport:e,setViewportZoom:r,setViewportPan:o,resetViewport:n}),[e,r,o,n])}var yre=s(x(),1),bre=(0,bR.createContext)(null);function wre({children:e}){let t=vre();return(0,yre.jsx)(bre.Provider,{value:t,children:e})}function Sre(){let e=(0,bR.useContext)(bre);if(!e)throw new Error("useViewport must be used within a ViewportProvider.");return e}var $s=s(x(),1),wR=1e-6;function _re(e,t){let r=1,o=1;if(e&&e>0&&t.width>0){let n=e*t.height/t.width;n<=1?r=n:o=1/n}return{x:(1-r)/2,y:(1-o)/2,width:r,height:o}}function eMe({src:e,controller:t,stencil:r=fre,showGrid:o=!1,isPlacementActive:n=!1,showDimming:i=!0,minZoom:a,maxZoom:l,aspectRatio:c,freeformCrop:u=!1,focusOnMount:d=!1,onImageLoaded:f,onStateChange:m,onGestureStart:h,onGestureEnd:g,className:v},y){let{state:b,setImage:S,setCropRect:w,settleCrop:_}=t,{viewport:C,setViewportPan:k,resetViewport:A}=Sre(),R=(0,dt.useRef)(null),I=(0,dt.useId)(),[B,E]=(0,dt.useState)(d),[P,L]=(0,dt.useState)(!1),[j,z]=(0,dt.useState)({width:0,height:0});(0,dt.useLayoutEffect)(()=>{d&&R.current?.focus({preventScroll:!0})},[d]);let W=(0,dt.useCallback)(ye=>{ye.target===ye.currentTarget&&(E(!0),ye.relatedTarget!==null&&ye.currentTarget.matches(":focus-visible")&&L(!0))},[]),O=(0,dt.useCallback)(ye=>{ye.target===ye.currentTarget&&(E(!1),L(!1))},[]);(0,dt.useEffect)(()=>{let ye=R.current;if(!ye)return;let Pr=new ResizeObserver($o=>{for(let Er of $o){let{width:Ru,height:kn}=Er.contentRect;z(Qn=>Qn.width===Ru&&Qn.height===kn?Qn:{width:Ru,height:kn})}});return Pr.observe(ye),()=>{Pr.disconnect()}},[]),(0,dt.useEffect)(()=>{m?.(b)},[b,m]);let M=ure(b),D=b.image?.naturalWidth??0,G=b.image?.naturalHeight??0,{elementSize:q,visualSize:Z}=(0,dt.useMemo)(()=>Wte(j,{width:D,height:G},b.rotation),[j,D,G,b.rotation]);(0,dt.useEffect)(()=>{if(u||Z.width===0||Z.height===0||!c||c<=0)return;let ye=_re(c,Z),Pr=b.cropRect;Math.abs(Pr.x-ye.x)<wR&&Math.abs(Pr.y-ye.y)<wR&&Math.abs(Pr.width-ye.width)<wR&&Math.abs(Pr.height-ye.height)<wR||w(ye)},[u,c,Z,w,b.cropRect]);let te=(0,dt.useRef)(c);(0,dt.useEffect)(()=>{te.current!==c&&(te.current=c,!(!u||Z.width===0||Z.height===0||!c||c<=0)&&w(_re(c,Z)))},[c,u,Z,w]);let ie=(0,dt.useMemo)(()=>{if(!(!b.image||q.width===0))return $te(b,q,Z)},[b,q,Z]),[Se,fe]=(0,dt.useState)(!1),X=(0,dt.useRef)(!1),ee=(0,dt.useRef)(!1),{handlers:pe,onWheelNative:ve,isDragging:Ie,isZooming:et,isPlacementActive:it}=ire(b,t,j,Z,{minZoom:a,maxZoom:l,onGestureStart:h,onGestureEnd:g}),ne={...pe,onPointerDown:ye=>{pe.onPointerDown?.(ye),L(!1)},onKeyDown:ye=>{ye.target===ye.currentTarget&&!["Shift","Control","Alt","Meta"].includes(ye.key)&&L(!0),pe.onKeyDown?.(ye)}};(0,dt.useEffect)(()=>{let ye=R.current;if(!ye)return;let Pr=$o=>{if(X.current||ee.current){$o.preventDefault();return}ve($o)};return ye.addEventListener("wheel",Pr,{passive:!1}),()=>{ye.removeEventListener("wheel",Pr)}},[ve]);let $=lre(b,Z),ue=(0,dt.useCallback)(ye=>{let Pr=ye.currentTarget,$o={width:Pr.naturalWidth,height:Pr.naturalHeight};S({src:e,naturalWidth:$o.width,naturalHeight:$o.height}),f?.($o)},[e,S,f]),oe=(0,dt.useCallback)(ye=>{if(w(ye),X.current&&Z.width>0&&Z.height>0){let Pr=(j.width-Z.width)/2,$o=(j.height-Z.height)/2,Er=Math.max(0,Pr+(ye.x+ye.width)*Z.width-j.width),Ru=Math.max(0,-(Pr+ye.x*Z.width)),kn=Math.max(0,$o+(ye.y+ye.height)*Z.height-j.height),Qn=Math.max(0,-($o+ye.y*Z.height));k({x:-Er+Ru,y:-kn+Qn})}},[w,k,j,Z]),[me,Ne]=(0,dt.useState)(!1),Oe=(0,dt.useRef)();(0,dt.useEffect)(()=>()=>{clearTimeout(Oe.current)},[]);let De=o==="interactive",le=De&&(it||Se||n),be=(0,dt.useCallback)(()=>{L(!0),R.current?.focus({preventScroll:!0})},[]),ge=(0,dt.useCallback)(()=>{X.current=!0,fe(!0),clearTimeout(Oe.current),ee.current=!1,Ne(!1),A(),h?.()},[h,A]),ze=(0,dt.useCallback)(()=>{X.current=!1,fe(!1),ee.current=!0,Ne(!0),A(),_(),g?.(),clearTimeout(Oe.current),Oe.current=setTimeout(()=>{ee.current=!1,Ne(!1)},200)},[_,g,A]),bt;me?bt="transform 200ms ease-out":et&&(bt="transform 150ms linear");let cr=me?"left 200ms ease-out, top 200ms ease-out, width 200ms ease-out, height 200ms ease-out":void 0,Ct=(0,dt.useMemo)(()=>{if(q.width===0||q.height===0)return{};let ye=(j.width-q.width)/2,Pr=(j.height-q.height)/2;return{width:q.width,height:q.height,maxWidth:q.width,maxHeight:q.height,left:ye,top:Pr,transform:$,transition:bt}},[j,q,$,bt]),Jt=me?"transform 200ms ease-out":void 0,$t=Se||me?"transform":void 0,Ro;C.pan.x!==0||C.pan.y!==0?Ro={transform:`translate(${C.pan.x}px, ${C.pan.y}px)`,transition:Jt,willChange:$t}:me&&(Ro={transition:Jt,willChange:$t});let En=(0,dt.useCallback)(ye=>{typeof y=="function"?y(ye):y&&(y.current=ye)},[y]);return(0,$s.jsx)("div",{ref:En,className:K("wp-media-editor-image-editor",Ie&&"wp-media-editor-image-editor--dragging",v),children:(0,$s.jsxs)("div",{ref:R,className:K("wp-media-editor-image-editor__canvas",De&&"wp-media-editor-image-editor__canvas--grid-interactive",le&&"wp-media-editor-image-editor__canvas--show-grid",me&&"wp-media-editor-image-editor__canvas--settling",P&&B&&"wp-media-editor-image-editor__canvas--focus-visible"),tabIndex:0,role:"group","aria-label":(0,HV.__)("Crop area"),"aria-describedby":B?I:void 0,onFocus:W,onBlur:O,...ne,children:[(0,$s.jsx)("div",{id:I,style:y1,children:(0,HV.__)("When this area is focused, use arrow keys to move the image and plus or minus to zoom. Tab to resize handles and controls.")}),(0,$s.jsxs)("div",{className:"wp-media-editor-image-editor__stage","data-testid":"cropper-stage",style:Ro,children:[(0,$s.jsx)("img",{className:"wp-media-editor-image-editor__image",src:e,alt:"",onLoad:ue,style:Ct,draggable:!1}),i&&(0,$s.jsx)(pre,{cropRect:b.cropRect,containerSize:j,imageSize:Z,transition:cr}),(0,$s.jsx)(r,{cropRect:b.cropRect,containerSize:j,imageSize:Z,onCropChange:oe,onResizeStart:ge,onResizeEnd:ze,onEscape:be,aspectRatio:c,freeformCrop:u,stencilTransition:cr,cropBounds:ie}),(o===!0||De)&&(0,$s.jsx)(hre,{cropRect:b.cropRect,containerSize:j,imageSize:Z})]}),(0,$s.jsx)("div",{"aria-live":"polite","aria-atomic":"true",className:"wp-media-editor-image-editor__aria-live",style:y1,children:M})]})})}var tMe=(0,dt.forwardRef)(eMe),SR=(0,dt.forwardRef)((e,t)=>(0,$s.jsx)(wre,{children:(0,$s.jsx)(tMe,{...e,ref:t})}));var _R=s(V(),1);var xre=s(x(),1),Cre=(0,_R.createContext)(null);function xR({initialState:e,children:t}){let r=rre(e);return(0,xre.jsx)(Cre.Provider,{value:r,children:t})}function Ya(){let e=(0,_R.useContext)(Cre);if(!e)throw new Error("useCropper must be used within a CropperProvider.");return e}var UV=s(x(),1);function Tre({aspectRatio:e,freeformCrop:t,focusOnMount:r,isPlacementActive:o=!1,onGestureStart:n,onGestureEnd:i}){let{media:a}=Iy(),l=Ya(),c=a?.source_url,u=Ah(a?.mime_type);return!c||u.type!=="image"?null:(0,UV.jsx)("div",{className:"media-editor-canvas",children:(0,UV.jsx)(SR,{src:c,controller:l,aspectRatio:e,freeformCrop:t,focusOnMount:r,showGrid:"interactive",isPlacementActive:o,onGestureStart:()=>{n?.(),l.commitHistory()},onGestureEnd:()=>{l.commitHistory(),i?.()}})})}var zm=s(H(),1);var Td=s(N(),1),wb=s(Wr(),1);var GV="data-crop-control";function CR(e={}){let{commitOnKeyUp:t=!0}=e,{commitHistory:r}=Ya();return{[GV]:!0,onPointerUp:r,...t?{onKeyUp:r}:{}}}var dg=s(V(),1);var Cd=s(V(),1);function rMe(e,t,r){return-e/t*r}function TR(e,t,r){return e<t?t:e>r?r:e}function oMe(e,t){return Math.round(e/t)*t}function Pre(e){let{value:t,onChange:r,min:o,max:n,step:i,pixelsPerStep:a,disabled:l,onPointerDownStart:c}=e,u=(0,Cd.useRef)({value:t,startX:0,startValue:0,activeStep:i,dragging:!1,captureElement:null,capturePointerId:0,windowPointerUp:null});(0,Cd.useEffect)(()=>{u.current.value=t},[t]);let d=(0,Cd.useCallback)(()=>{let h=u.current;h.dragging&&(h.dragging=!1,h.captureElement&&h.captureElement.hasPointerCapture(h.capturePointerId)&&h.captureElement.releasePointerCapture(h.capturePointerId),h.captureElement=null,h.windowPointerUp&&(window.removeEventListener("pointerup",h.windowPointerUp),window.removeEventListener("pointercancel",h.windowPointerUp),h.windowPointerUp=null))},[]);(0,Cd.useEffect)(()=>d,[d]);let f=(0,Cd.useCallback)(h=>{if(l||h.button!==0)return;let g=u.current;h.currentTarget.setPointerCapture(h.pointerId),g.captureElement=h.currentTarget,g.capturePointerId=h.pointerId,g.startX=h.clientX,g.startValue=g.value,g.activeStep=h.shiftKey?i/2:i,g.dragging=!0,c?.();let v=()=>d();g.windowPointerUp=v,window.addEventListener("pointerup",v),window.addEventListener("pointercancel",v)},[l,c,d,i]),m=(0,Cd.useCallback)(h=>{let g=u.current;if(!g.dragging)return;let v=h.shiftKey?i/2:i;v!==g.activeStep&&(g.startX=h.clientX,g.startValue=g.value,g.activeStep=v);let y=h.clientX-g.startX,b=rMe(y,a,g.activeStep),S=g.startValue+b,w=oMe(S,g.activeStep),_=TR(w,o,n);_!==g.value&&(g.value=_,r(_))},[r,o,n,i,a]);return{onPointerDown:f,onPointerMove:m,onPointerUp:d,onPointerCancel:d}}var Wc=s(x(),1),PR=32,nMe=11,Ere=15,iMe=4,sMe=8,aMe=14;function lMe(e,t){return(0,dg.useMemo)(()=>{let r=[];for(let o=Math.ceil(e);o<=Math.floor(t);o+=1){let n="minor",i=iMe;o%15===0?(n="major",i=aMe):o%5===0&&(n="mid",i=sMe),r.push({value:o,kind:n,height:i})}return r},[e,t])}function cMe(e){let t=Math.round(e*10)/10;return Number.isInteger(t)?t.toFixed(0):t.toFixed(1)}function kre(e){let{value:t,onChange:r,min:o=-45,max:n=45,step:i=1,label:a,unit:l="\xB0",pixelsPerStep:c=6,className:u,id:d,disabled:f=!1}=e,m=(0,dg.useRef)(null),h=(0,dg.useId)(),g=d??h,v=Pre({value:t,onChange:r,min:o,max:n,step:i,pixelsPerStep:c,disabled:f,onPointerDownStart:()=>m.current?.focus()}),y=I=>{let B=I.key==="ArrowRight"||I.key==="ArrowUp",E=I.key==="ArrowLeft"||I.key==="ArrowDown";if(!B&&!E||(I.preventDefault(),f))return;let P=B?1:-1,L=I.shiftKey?i/2:i,j=TR(t+P*L,o,n);j!==t&&r(j)},b=`${cMe(t)}${l}`,S=lMe(o,n),w=c/i,_=(0,dg.useMemo)(()=>({transform:`translateX(calc(-50% + ${-t*w}px))`}),[t,w]),C=Math.round(t/Ere)*Ere,A=Math.abs(t-C)<.01?`${C}${l}`:b,R=S.filter(I=>I.kind==="major");return(0,Wc.jsxs)("div",{className:K("rotation-ruler",u),role:"presentation","data-disabled":f||void 0,...v,children:[(0,Wc.jsx)("input",{ref:m,id:g,type:"range",className:"rotation-ruler__input",min:o,max:n,step:"any",value:t,disabled:f,"aria-label":a,"aria-valuetext":b,onChange:I=>r(TR(I.target.valueAsNumber,o,n)),onKeyDown:y}),(0,Wc.jsx)("div",{className:"rotation-ruler__strip","aria-hidden":"true",children:(0,Wc.jsxs)("svg",{className:"rotation-ruler__ticks",style:_,width:(n-o)*w,height:PR,viewBox:`${o*w} 0 ${(n-o)*w} ${PR}`,preserveAspectRatio:"xMidYMid meet",children:[S.map(I=>(0,Wc.jsx)("line",{x1:I.value*w,x2:I.value*w,y1:PR-I.height,y2:PR,className:`rotation-ruler__tick rotation-ruler__tick--${I.kind}`},I.value)),R.map(I=>(0,Wc.jsxs)("text",{x:I.value*w,y:nMe,textAnchor:"middle",className:"rotation-ruler__label",children:[I.value,l]},I.value))]})}),(0,Wc.jsx)("div",{className:"rotation-ruler__active-label","aria-hidden":"true",children:A}),(0,Wc.jsx)("div",{className:"rotation-ruler__pointer","aria-hidden":"true"})]})}var ea=s(x(),1);function Rre({onReset:e,onPlacementControlInteraction:t,isUndoRedoDisabled:r=!1}){let{state:o,setRotation:n,setFlip:i,snapRotate90:a,reset:l,isDirty:c,hasUndo:u,hasRedo:d,undo:f,redo:m}=Ya(),h=CR({commitOnKeyUp:!1}),g=()=>{l(),e?.()},v=()=>{r||f()},y=()=>{r||m()},b=Math.round(o.rotation/90)*90,w=o.flip.horizontal!==o.flip.vertical?-1:1,_=(o.rotation-b)*w,C=k=>{let R=Math.max(-g1+.01,Math.min(g1-.01,k));t?.(),n(b+R*w)};return(0,ea.jsxs)(re,{className:"media-editor-toolbar",direction:"row",align:"center",justify:"center",gap:"sm",wrap:"wrap",children:[(0,ea.jsx)("div",{role:"presentation",className:"media-editor-toolbar__rotation-slider",...h,children:(0,ea.jsx)(kre,{label:(0,Td.__)("Fine rotation"),min:-g1,max:g1,value:_,onChange:C})}),(0,ea.jsxs)("div",{className:"media-editor-toolbar__action-cluster",children:[(0,ea.jsx)(zm.Button,{size:"compact",icon:gS,label:(0,Td.__)("Rotate 90\xB0 counter-clockwise"),showTooltip:!0,onClick:()=>a(-1)}),(0,ea.jsx)(zm.Button,{size:"compact",icon:vS,label:(0,Td.__)("Rotate 90\xB0 clockwise"),showTooltip:!0,onClick:()=>a(1)}),(0,ea.jsx)(zm.Button,{size:"compact",icon:bM,label:(0,Td.__)("Flip horizontal"),showTooltip:!0,isPressed:o.flip.horizontal,onClick:()=>i({horizontal:!o.flip.horizontal,vertical:o.flip.vertical})}),(0,ea.jsx)(zm.Button,{size:"compact",icon:SM,label:(0,Td.__)("Flip vertical"),showTooltip:!0,isPressed:o.flip.vertical,onClick:()=>i({horizontal:o.flip.horizontal,vertical:!o.flip.vertical})}),(0,ea.jsx)(zm.Button,{size:"compact",icon:eh,label:(0,Td.__)("Undo"),showTooltip:!0,shortcut:wb.displayShortcut.primary("z"),disabled:r||!u,accessibleWhenDisabled:!0,onClick:v}),(0,ea.jsx)(zm.Button,{size:"compact",icon:Xp,label:(0,Td.__)("Redo"),showTooltip:!0,shortcut:(0,wb.isAppleOS)()?wb.displayShortcut.primaryShift("z"):wb.displayShortcut.primary("y"),disabled:r||!d,accessibleWhenDisabled:!0,onClick:y}),(0,ea.jsx)(zm.Button,{size:"compact",variant:"tertiary",disabled:!c,accessibleWhenDisabled:!0,onClick:g,children:(0,Td.__)("Reset")})]})]})}var Sb=s(H(),1);var Pd=s(N(),1);var Ed=s(x(),1);function Are(e,t){let r=parseFloat(e);if(r!==0){if(r===DV&&t)return t;if(r>0)return r}}function Ire({aspectRatioValue:e,onAspectRatioChange:t,freeformCrop:r,onFreeformChange:o,onPlacementControlInteraction:n,aspectRatioPresets:i}){let{state:a,setZoom:l}=Ya(),c=CR(),u=[...LV.filter(f=>f.value<=0),...i??LV.filter(f=>f.value>0)],d=f=>{t(f),f==="0"&&!r&&o(!0)};return(0,Ed.jsxs)(re,{direction:"column",gap:"md",children:[(0,Ed.jsx)(Kt,{render:(0,Ed.jsx)("h2",{}),children:(0,Pd.__)("Crop options")}),(0,Ed.jsx)(Sb.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,Pd.__)("Aspect ratio"),value:e,onChange:d,options:u.map(f=>({label:f.label,value:f.value.toString()}))}),(0,Ed.jsx)(Sb.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Pd.__)("Resize crop area"),help:(0,Pd.__)("Show handles to adjust the crop box."),checked:r,onChange:o}),(0,Ed.jsx)("div",{role:"presentation",...c,children:(0,Ed.jsx)(Sb.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,Pd.__)("Zoom"),min:Lm,max:cg,step:.1,value:a.zoom,onChange:f=>{n?.(),l(typeof f=="number"?f:Lm)},renderTooltipContent:f=>{let m=typeof f=="number"?f:Lm;return(0,Pd.sprintf)((0,Pd.__)("%d%%"),Math.round(m*100))}})})]})}var ER=.1;function Ore(e,t){let r=[];if(t.width===0||t.height===0)return r;let{cropRect:o,pan:n,zoom:i,flip:a}=e,l=a.horizontal,c=a.vertical;(l||c)&&r.push({type:"flip",args:{flip:{horizontal:l,vertical:c}}});let u=(e.rotation%360+360)%360,f=l!==c?(360-u)%360:u;f!==0&&r.push({type:"rotate",args:{angle:f}});let m=Math.round(e.rotation/90)*90,{width:h,height:g}=Ua(t.width,t.height,m),{width:v,height:y}=Ua(t.width,t.height,e.rotation),b=.5+n.x-i/2,S=.5+n.y-i/2,w=(o.x-b)/i*h,_=(o.y-S)/i*g,C=o.width/i*h,k=o.height/i*g,A=(v-h)/2,R=(y-g)/2,I=w+A,B=_+R,E=I/v*100,P=B/y*100,L=C/v*100,j=k/y*100;return E<=ER&&P<=ER&&L>=100-ER&&j>=100-ER||r.push({type:"crop",args:{left:E,top:P,width:L,height:j}}),r}var Nre=s(H(),1),Mre=s(V(),1),Ki=s(N(),1),b1=s(Wr(),1),Ol=s(x(),1),uMe=[{description:(0,Ki.__)("Undo"),keyCombination:{modifier:"primary",character:"z"}},{description:(0,Ki.__)("Redo"),keyCombination:{modifier:"primaryShift",character:"z"}},{description:(0,Ki.__)("Pan"),keyCombination:{character:["\u2191","\u2193","\u2190","\u2192"],ariaLabel:(0,Ki.__)("Arrow keys")}},{description:(0,Ki.__)("Zoom in"),keyCombination:{character:"+"}},{description:(0,Ki.__)("Zoom out"),keyCombination:{character:"-"}},{description:(0,Ki.__)("Rotate 90\xB0 clockwise"),keyCombination:{character:"R"}},{description:(0,Ki.__)("Rotate 90\xB0 counter-clockwise"),keyCombination:{modifier:"shift",character:"R"}},{description:(0,Ki.__)("Flip horizontal"),keyCombination:{character:"H"}},{description:(0,Ki.__)("Flip vertical"),keyCombination:{character:"V"}},{description:(0,Ki.__)("Pan or resize crop (large step)"),keyCombination:{modifier:"shift",character:["\u2191","\u2193","\u2190","\u2192"],ariaLabel:(0,Ki.__)("Shift + Arrow keys")}}];function dMe({keyCombination:e}){let{modifier:t,character:r,ariaLabel:o}=e,n;Array.isArray(r)?t?n=[...b1.displayShortcutList[t](r[0]).slice(0,-1),...r]:n=r:n=t?b1.displayShortcutList[t](r):[r];let i=Array.isArray(r)?r.join(""):r,a;return o?a=o:t?a=b1.shortcutAriaLabel[t](i):a=i,(0,Ol.jsx)("kbd",{className:"media-editor-keyboard-shortcuts-modal__shortcut-term","aria-label":a,children:n.map((l,c)=>l==="+"&&t?(0,Ol.jsx)(Mre.Fragment,{children:l},c):(0,Ol.jsx)("kbd",{className:"media-editor-keyboard-shortcuts-modal__shortcut-key",children:l},c))})}function Fre({onClose:e}){return(0,Ol.jsxs)(Nre.Modal,{className:"media-editor-keyboard-shortcuts-modal",title:(0,Ki.__)("Keyboard shortcuts"),onRequestClose:e,children:[(0,Ol.jsx)("p",{className:"media-editor-keyboard-shortcuts-modal__note",children:(0,Ki.__)("These shortcuts work when the image editor has focus.")}),(0,Ol.jsx)("ul",{className:"media-editor-keyboard-shortcuts-modal__shortcut-list",role:"list",children:uMe.map(({description:t,keyCombination:r},o)=>(0,Ol.jsxs)("li",{className:"media-editor-keyboard-shortcuts-modal__shortcut",children:[(0,Ol.jsx)("span",{className:"media-editor-keyboard-shortcuts-modal__shortcut-description",children:t}),(0,Ol.jsx)(dMe,{keyCombination:r})]},o))})]})}var ft=s(x(),1),fMe=["title","caption","description","alt_text","post"],Dre={_embed:"author,wp:attached-to"},kR="media-editor",mMe=300,{Tabs:fg}=rte(ta.privateApis);function pMe({tabs:e}){let t=(0,Sr.useContext)(fg.Context);return(0,ft.jsx)(Ha,{scope:"media-editor",identifier:"media-editor/details",title:(0,Po.__)("Details"),icon:Nu,isActiveByDefault:!0,className:"media-editor__sidebar",panelClassName:"media-editor__sidebar-panel",headerClassName:"media-editor__sidebar-header",header:(0,ft.jsx)(fg.Context.Provider,{value:t,children:(0,ft.jsx)(fg.TabList,{children:e.map(r=>(0,ft.jsx)(fg.Tab,{tabId:r.id,children:r.title},r.id))})}),children:(0,ft.jsx)(fg.Context.Provider,{value:t,children:e.map(r=>(0,ft.jsx)(fg.TabPanel,{tabId:r.id,focusable:!1,children:r.panel},r.id))})})}function hMe({isSaving:e,hasMedia:t,hasChanges:r,isImage:o,showCloseButton:n=!1,onCancel:i,onSave:a}){let l=e||!t||!r,[c,u]=(0,Sr.useState)(!1);return(0,ft.jsxs)(ta.Flex,{className:"media-editor__header-actions",justify:"flex-end",expanded:!1,gap:2,children:[o&&(0,ft.jsx)(ta.Button,{size:"compact",icon:lS,label:(0,Po.__)("Keyboard shortcuts"),onClick:()=>u(!0)}),(0,ft.jsx)(Nm.Slot,{scope:"media-editor"}),(0,ft.jsx)(ta.Button,{size:"compact",variant:"tertiary",onClick:i,disabled:e,accessibleWhenDisabled:!0,children:(0,Po.__)("Cancel")}),(0,ft.jsx)(ta.Button,{size:"compact",variant:"primary",onClick:a,isBusy:e,disabled:l,accessibleWhenDisabled:!0,children:(0,Po.__)("Save")}),n&&(0,ft.jsx)(ta.Button,{size:"compact",icon:$w,label:(0,Po.__)("Close"),onClick:i,disabled:e,accessibleWhenDisabled:!0}),c&&(0,ft.jsx)(Fre,{onClose:()=>u(!1)})]})}function gMe({fields:e=[],id:t,aspectRatioPresets:r,onClose:o,onSaved:n,renderFrame:i,noticesClassName:a="media-editor__snackbar",noticesPortalElement:l,showCloseButton:c=!1,shouldCloseOnEsc:u=!1}){let d=Ya(),{media:f,hasEdits:m}=(0,mg.useSelect)(ne=>{let{getEditedEntityRecord:$,getEntityRecord:ue,hasEditsForEntityRecord:oe}=ne(RR.store);return ue("postType","attachment",t,Dre),{media:$("postType","attachment",t),hasEdits:oe("postType","attachment",t)}},[t]),h=d.isDirty||m,g=(0,mg.useRegistry)(),{clearEntityRecordEdits:v,editEntityRecord:y,invalidateResolution:b,receiveEntityRecords:S,saveEditedEntityRecord:w}=(0,mg.useDispatch)(RR.store),{createErrorNotice:_,removeAllNotices:C}=(0,mg.useDispatch)(AR.store),[k,A]=(0,Sr.useState)(!1),[R,I]=(0,Sr.useState)(!1),[B,E]=(0,Sr.useState)(!1),[P,L]=(0,Sr.useState)(!1),j=(0,Sr.useRef)(),[z,W]=(0,Sr.useState)("0"),[O,M]=(0,Sr.useState)(!0),D=(0,Sr.useCallback)(()=>{E(!0),clearTimeout(j.current),j.current=setTimeout(()=>{E(!1)},mMe)},[]),G=(0,Sr.useCallback)(()=>{L(!0)},[]),q=(0,Sr.useCallback)(()=>{L(!1)},[]),Z=B||P;(0,Sr.useEffect)(()=>()=>{clearTimeout(j.current)},[]),(0,Sr.useEffect)(()=>{W("0"),M(!0),E(!1),L(!1)},[t]),(0,Sr.useEffect)(()=>{b("getEntityRecord",["postType","attachment",t,Dre])},[t,b]);let te=Ah(f?.mime_type).type,ie=!!f&&te==="image",Se=(0,Sr.useMemo)(()=>{if(!ie)return null;let ne=Number(f?.media_details?.width),$=Number(f?.media_details?.height);return Number.isFinite(ne)&&Number.isFinite($)&&$>0?ne/$:null},[ie,f]),fe=(0,Sr.useMemo)(()=>{let ne={id:"details",title:(0,Po.__)("Details"),panel:(0,ft.jsx)(re,{className:"media-editor__panel",direction:"column",gap:"lg",children:(0,ft.jsx)(u1,{})})};return ie?[{id:"crop",title:(0,Po.__)("Crop"),panel:(0,ft.jsx)(re,{className:"media-editor__panel",direction:"column",gap:"lg",children:(0,ft.jsx)(Ire,{aspectRatioValue:z,onAspectRatioChange:W,freeformCrop:O,onFreeformChange:M,onPlacementControlInteraction:D,aspectRatioPresets:r})})},ne]:[ne]},[ie,z,O,r,D]),X=ne=>{y("postType","attachment",t,ne)},ee=()=>{C("snackbar",kR),v("postType","attachment",t),o?.()},pe=()=>{if(!k){if(h){I(!0);return}ee()}},ve=async()=>{C("snackbar",kR),A(!0);try{let ne,$=d.isDirty&&d.state.image?Ore(d.state,{width:d.state.image.naturalWidth,height:d.state.image.naturalHeight}):[];if($.length>0){let oe=g.select(RR.store).getEntityRecordNonTransientEdits("postType","attachment",t),me={};for(let Ne of fMe)oe&&Ne in oe&&(me[Ne]=oe[Ne]);!("post"in me)&&f?.post!==void 0&&(me.post=f.post),ne=await(0,Lre.default)({path:`/wp/v2/media/${t}/edit`,method:"POST",data:{src:f?.source_url,modifiers:$,...me}}),ne&&S("postType","attachment",ne,void 0,!0)}else ne=await w("postType","attachment",t);let ue=ne??f;ue&&ue.id!==t&&v("postType","attachment",t),ue&&ue.id&&(ue.id===t&&d.reset(),n?.({id:ue.id,url:ue.source_url,media:ue}))}catch(ne){let $=ne instanceof Error?ne.message:ne?.message??(0,Po.__)("An unknown error occurred.");_(ie?(0,Po.sprintf)((0,Po.__)("Could not save image. %s"),$):(0,Po.sprintf)((0,Po.__)("Could not save media. %s"),$),{type:"snackbar",context:kR})}finally{A(!1)}},Ie=ne=>{let $=_b.isKeyboardEvent.primary(ne,"z"),ue=_b.isKeyboardEvent.primaryShift(ne,"z")||!(0,_b.isAppleOS)()&&_b.isKeyboardEvent.primary(ne,"y");if(($||ue)&&ie){let oe=ne.target;if(!((oe.tagName==="INPUT"||oe.tagName==="TEXTAREA"||oe.isContentEditable)&&!oe.closest(`[${GV}]`))){if(ne.preventDefault(),Z)return;ue?d.redo():d.undo()}}if(u){if(ne.code!=="Escape"&&ne.key!=="Escape")return;if(k){ne.preventDefault();return}h&&(ne.preventDefault(),I(!0))}},et=(0,ft.jsx)(AR.SnackbarNotices,{className:a,context:kR}),it=(0,ft.jsxs)(Rh,{value:f??void 0,onChange:X,settings:{fields:e},children:[(0,ft.jsx)("div",{className:"media-editor",children:f?(0,ft.jsxs)(ft.Fragment,{children:[(0,ft.jsx)(fg,{children:(0,ft.jsx)(pMe,{tabs:fe})}),(0,ft.jsx)(lg,{className:"media-editor__skeleton",labels:{body:ie?(0,Po.__)("Image editor"):(0,Po.__)("Media preview"),sidebar:(0,Po.__)("Media details"),footer:(0,Po.__)("Image editing tools")},content:(0,ft.jsx)("div",{className:"media-editor__canvas",children:ie?(0,ft.jsx)(Tre,{aspectRatio:Are(z,Se),freeformCrop:O,focusOnMount:!0,isPlacementActive:B,onGestureStart:G,onGestureEnd:q}):(0,ft.jsx)(y_,{})}),footer:ie?(0,ft.jsx)(Rre,{onReset:()=>{W("0"),M(!0)},onPlacementControlInteraction:D,isUndoRedoDisabled:Z}):void 0,sidebar:(0,ft.jsx)(Ha.Slot,{scope:"media-editor"})})]}):(0,ft.jsx)("div",{className:"media-editor__loading",children:(0,ft.jsx)(ta.Spinner,{})})}),(0,ft.jsx)(ta.__experimentalConfirmDialog,{isOpen:R,confirmButtonText:(0,Po.__)("Discard"),cancelButtonText:(0,Po.__)("Keep editing"),onCancel:()=>I(!1),onConfirm:()=>{I(!1),ee()},children:(0,Po.__)("Are you sure you want to discard your unsaved changes?")}),l?(0,Sr.createPortal)(et,l):et]});return i({children:it,headerActions:(0,ft.jsx)(hMe,{isSaving:k,hasMedia:!!f,hasChanges:h,isImage:ie,showCloseButton:c,onCancel:pe,onSave:ve}),onRequestClose:pe,onKeyDown:Ie,shouldCloseOnClickOutside:!h&&!k,isSaving:k,hasChanges:h,hasMedia:!!f})}function WV(e){return(0,ft.jsx)(xR,{children:(0,ft.jsx)(gMe,{...e})},e.id)}var Bre=WV;var YV=s(x(),1);function zre({fields:e=[],aspectRatioPresets:t}){let{isModalOpen:r,id:o,onUpdate:n}=(0,IR.useSelect)(l=>{let{isOpen:c,getId:u,getOnUpdate:d}=l(pb);return{isModalOpen:c(),id:u(),onUpdate:d()}},[]),{closeMediaEditorModal:i}=(0,IR.useDispatch)(pb);if(!r||!o)return null;let a=typeof document>"u"?null:document.body;return(0,YV.jsx)(Bre,{id:o,fields:e,aspectRatioPresets:t,showCloseButton:!0,shouldCloseOnEsc:!0,noticesClassName:"media-editor-modal__snackbar",noticesPortalElement:a,onClose:i,onSaved:({id:l,url:c})=>{l&&n&&n({id:l,url:c}),i()},renderFrame:({children:l,headerActions:c,onRequestClose:u,onKeyDown:d,shouldCloseOnClickOutside:f})=>(0,YV.jsx)(Vre.Modal,{className:"media-editor-modal",title:(0,jre.__)("Edit media"),size:"fill",isDismissible:!1,shouldCloseOnClickOutside:f,onKeyDown:d,onRequestClose:u,headerActions:c,children:l})})}var xb={};tte(xb,{store:pb,MediaEditor:WV,MediaEditorModal:zre});var Ko=s(N(),1),Hre=s(U(),1),OR=s(St(),1),Ure=s(Q(),1),Hm=(e,t)=>`<a ${KV(e)}>${t}</a>`,KV=e=>`href="${e}" target="_blank" rel="noopener"`,vMe=(e,t)=>{let r=e.trim();return e!=="pdm"&&(r=e.toUpperCase().replace("SAMPLING","Sampling")),t&&(r+=` ${t}`),["pdm","cc0"].includes(e)||(r=`CC ${r}`),r},yMe=e=>{let{title:t,foreign_landing_url:r,creator:o,creator_url:n,license:i,license_version:a,license_url:l}=e,c=vMe(i,a),u=(0,OR.decodeEntities)(o),d;return u?d=t?(0,Ko.sprintf)((0,Ko._x)('"%1$s" by %2$s/ %3$s',"caption"),Hm(r,(0,OR.decodeEntities)(t)),n?Hm(n,u):u,l?Hm(`${l}?ref=openverse`,c):c):(0,Ko.sprintf)((0,Ko._x)("<a %1$s>Work</a> by %2$s/ %3$s","caption"),KV(r),n?Hm(n,u):u,l?Hm(`${l}?ref=openverse`,c):c):d=t?(0,Ko.sprintf)((0,Ko._x)('"%1$s"/ %2$s',"caption"),Hm(r,(0,OR.decodeEntities)(t)),l?Hm(`${l}?ref=openverse`,c):c):(0,Ko.sprintf)((0,Ko._x)("<a %1$s>Work</a>/ %2$s","caption"),KV(r),l?Hm(`${l}?ref=openverse`,c):c),d.replace(/\s{2}/g," ")},qV=async(e={})=>(await(0,Hre.resolveSelect)(Ure.store).getEntityRecords("postType","attachment",{...e,orderBy:e?.search?"relevance":"date"})).map(r=>({...r,alt:r.alt_text,url:r.source_url,previewUrl:r.media_details?.sizes?.medium?.source_url,caption:r.caption?.raw})),bMe=[{name:"images",labels:{name:(0,Ko.__)("Images"),search_items:(0,Ko.__)("Search images")},mediaType:"image",async fetch(e={}){return qV({...e,media_type:"image"})}},{name:"videos",labels:{name:(0,Ko.__)("Videos"),search_items:(0,Ko.__)("Search videos")},mediaType:"video",async fetch(e={}){return qV({...e,media_type:"video"})}},{name:"audio",labels:{name:(0,Ko.__)("Audio"),search_items:(0,Ko.__)("Search audio")},mediaType:"audio",async fetch(e={}){return qV({...e,media_type:"audio"})}},{name:"openverse",labels:{name:(0,Ko.__)("Openverse"),search_items:(0,Ko.__)("Search Openverse")},mediaType:"image",async fetch(e={}){let r={...e,...{mature:!1,excluded_source:"flickr,inaturalist,wikimedia",license:"pdm,cc0"}},o={per_page:"page_size",search:"q"},n=new URL("https://api.openverse.org/v1/images/");return Object.entries(r).forEach(([c,u])=>{let d=o[c]||c;n.searchParams.set(d,u)}),(await(await window.fetch(n,{headers:{"User-Agent":"WordPress/inserter-media-fetch"}})).json()).results.map(c=>({...c,title:c.title?.toLowerCase().startsWith("file:")?c.title.slice(5):c.title,sourceId:c.id,id:void 0,caption:yMe(c),previewUrl:c.thumbnail}))},getReportUrl:({sourceId:e})=>`https://wordpress.org/openverse/image/${e}/report/`,isExternalResource:!0}],Gre=bMe;var Wre=s(U(),1),Yre=s(Q(),1);function qre(e){let{invalidateResolution:t}=(0,Wre.dispatch)(Yre.store);for(let r of e)r.id&&(t("getEntityRecord",["postType","attachment",r.id,{context:"view"}]),t("getEntityRecord",["postType","attachment",r.id]))}var Kre=s(rh(),1);var{sideloadMedia:wMe}=Y(Kre.privateApis),Zre=wMe;var Xre=s(If(),1);async function Qre(e,t=[]){await(0,Xre.default)({path:`/wp/v2/media/${e}/finalize`,method:"POST",data:{sub_sizes:t}})}var Soe=s(ce(),1),Eb=s(Q(),1),kb=s(U(),1),Rb=s(V(),1);function Um(e,t,r){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let o=t.pop(),n=e;for(let i of t){let a=n[i];n=n[i]=Array.isArray(a)?[...a]:{...a}}return n[o]=r,e}var Wt=(e,t,r)=>{let o=Array.isArray(t)?t:t.split("."),n=e;return o.forEach(i=>{n=n?.[i]}),n??r};var SMe=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","background.backgroundPosition","background.gradient","border.color","border.radius","border.radiusSizes","border.style","border.width","shadow.presets","shadow.defaultPresets","color.background","color.button","color.caption","color.custom","color.customDuotone","color.customGradient","color.defaultDuotone","color.defaultGradients","color.defaultPalette","color.duotone","color.gradients","color.heading","color.link","color.palette","color.text","custom","dimensions.aspectRatio","dimensions.height","dimensions.minHeight","dimensions.minWidth","dimensions.width","dimensions.dimensionSizes","layout.contentSize","layout.definitions","layout.wideSize","lightbox.enabled","lightbox.allowEditing","position.fixed","position.sticky","spacing.customSpacingSize","spacing.defaultSpacingSizes","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.defaultFontSizes","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textIndent","typography.textTransform","typography.writingMode"];function pg(e,t,r){let o=r?".blocks."+r:"",n=t?"."+t:"",i=`settings${o}${n}`,a=`settings${n}`;if(t)return Wt(e,i)??Wt(e,a);let l={};return SMe.forEach(c=>{let u=Wt(e,`settings${o}.${c}`)??Wt(e,`settings.${c}`);u!==void 0&&(l=Um(l,c.split("."),u))}),l}function w1(e,t,r,o){let n=o?".blocks."+o:"",i=t?"."+t:"",a=`settings${n}${i}`;return Um(e,a.split("."),r)}var eoe=s(ZV(),1);var _Me="1600px",xMe="320px",CMe=1,TMe=.25,PMe=.75,EMe="14px";function $re({minimumFontSize:e,maximumFontSize:t,fontSize:r,minimumViewportWidth:o=xMe,maximumViewportWidth:n=_Me,scaleFactor:i=CMe,minimumFontSizeLimit:a}){if(a=Yc(a)?a:EMe,r){let w=Yc(r);if(!w?.unit||!w?.value)return null;let _=Yc(a,{coerceTo:w.unit});if(_?.value&&!e&&!t&&w?.value<=_?.value)return null;if(t||(t=`${w.value}${w.unit}`),!e){let C=w.unit==="px"?w.value:w.value*16,k=Math.min(Math.max(1-.075*Math.log2(C),TMe),PMe),A=S1(w.value*k,3);_?.value&&A<_?.value?e=`${_.value}${_.unit}`:e=`${A}${w.unit}`}}let l=Yc(e),c=l?.unit||"rem",u=Yc(t,{coerceTo:c});if(!l||!u)return null;let d=Yc(e,{coerceTo:"rem"}),f=Yc(n,{coerceTo:c}),m=Yc(o,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let g=S1(m.value/100,3),v=S1(g,3)+c,y=100*((u.value-l.value)/h),b=S1((y||1)*i,3),S=`${d.value}${d.unit} + ((1vw - ${v}) * ${b})`;return`clamp(${e}, ${S}, ${t})`}function Yc(e,t={}){if(typeof e!="string"&&typeof e!="number")return null;isFinite(e)&&(e=`${e}px`);let{coerceTo:r,rootSizeValue:o,acceptableUnits:n}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=n?.join("|"),a=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),l=e.toString().match(a);if(!l||l.length<3)return null;let[,c,u]=l,d=parseFloat(c);return r==="px"&&(u==="em"||u==="rem")&&(d=d*o,u=r),u==="px"&&(r==="em"||r==="rem")&&(d=d/o,u=r),(r==="em"||r==="rem")&&(u==="em"||u==="rem")&&(u=r),u?{value:S1(d,3),unit:u}:null}function S1(e,t=3){let r=Math.pow(10,t);return Math.round(e*r)/r}function XV(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function kMe(e){let t=e?.typography??{},r=e?.layout,o=Yc(r?.wideSize)?r?.wideSize:null;return XV(t)&&o?{fluid:{maxViewportWidth:o,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function NR(e,t){let{size:r}=e;if(!r||r==="0"||e?.fluid===!1||!XV(t?.typography)&&!XV(e))return r;let o=kMe(t)?.fluid??{},n=$re({minimumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.min,maximumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.max,fontSize:r,minimumFontSizeLimit:typeof o=="object"?o?.minFontSize:void 0,maximumViewportWidth:typeof o=="object"?o?.maxViewportWidth:void 0,minimumViewportWidth:typeof o=="object"?o?.minViewportWidth:void 0});return n||r}var qc="body",_1=":root",Cb=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:e})=>`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>NR(e,t),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:e})=>e,classes:[]},{path:["border","radiusSizes"],valueKey:"size",cssVarInfix:"border-radius",classes:[]},{path:["dimensions","dimensionSizes"],valueKey:"size",cssVarInfix:"dimension",classes:[]}];function Nl(e,t){if(!e||!t)return t;let r=e.split(","),o=t.split(","),n=[];return r.forEach(i=>{o.forEach(a=>{n.push(`${i.trim()} ${a.trim()}`)})}),n.join(", ")}function toe(e,t){if(!e||!t)return;let r={};return Object.entries(t).forEach(([o,n])=>{typeof n=="string"&&(r[o]=Nl(e,n)),typeof n=="object"&&(r[o]={},Object.entries(n).forEach(([i,a])=>{r[o][i]=Nl(e,a)}))}),r}function MR(e,t){return e.includes(",")?e.split(",").map(n=>n+t).join(","):e+t}function roe(e,t){let r=`.is-style-${e}`;if(!t)return r;let o=/((?::\([^)]+\))?\s*)([^\s:]+)/,n=(a,l,c)=>l+c+r;return t.split(",").map(a=>a.replace(o,n)).join(",")}function RMe(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let r=(0,eoe.getCSSValueFromRawStyle)(Wt(t,e.ref));return typeof r=="object"&&r!==null&&"ref"in r&&r?.ref?void 0:r===void 0?e:r}return e}function AMe(e,t){if(!e||!t||!Array.isArray(t))return e;let r=t.find(o=>o?.name===e);return r?.href?r?.href:e}function QV(e,t){if(!e||!t)return e;let r=RMe(e,t);return typeof r=="object"&&r!==null&&"url"in r&&r?.url&&(r.url=AMe(r.url,t?._links?.["wp:theme-file"])),r}function ooe(e,t,r=[],o="slug",n){let i=[t?Wt(e,["blocks",t,...r]):void 0,Wt(e,r)].filter(Boolean);for(let a of i)if(a){let l=["custom","theme","default"];for(let c of l){let u=a[c];if(u){let d=u.find(f=>f[o]===n);if(d)return o==="slug"||ooe(e,t,r,"slug",d.slug)[o]===d[o]?d:void 0}}}}function IMe(e,t,r,[o,n]=[]){let i=Cb.find(l=>l.cssVarInfix===o);if(!i||!e.settings)return r;let a=ooe(e.settings,t,i.path,"slug",n);if(a){let{valueKey:l}=i,c=a[l];return FR(e,t,c)}return r}function OMe(e,t,r,o=[]){let n=(t?Wt(e?.settings??{},["blocks",t,"custom",...o]):void 0)??Wt(e?.settings??{},["custom",...o]);return n?FR(e,t,n):r}function FR(e,t,r){if(!r||typeof r!="string")if(typeof r=="object"&&r!==null&&"ref"in r&&typeof r.ref=="string"){let u=Wt(e,r.ref);if(!u||typeof u=="object"&&"ref"in u)return u;r=u}else return r;let o="var:",n="var(--wp--",i=")",a;if(r.startsWith(o))a=r.slice(o.length).split("|");else if(r.startsWith(n)&&r.endsWith(i))a=r.slice(n.length,-i.length).split("--");else return r;let[l,...c]=a;return l==="preset"?IMe(e,t,r,c):l==="custom"?OMe(e,t,r,c):r}function Tb(e,t,r,o=!0){let n=t?"."+t:"",i=r?`styles.blocks.${r}${n}`:`styles${n}`;if(!e)return;let a=Wt(e,i);return o?FR(e,r,a):a}function x1(e,t,r,o){let n=t?"."+t:"",i=o?`styles.blocks.${o}${n}`:`styles${n}`;return Um(e,i.split("."),r)}var JV=s(K2(),1);function hg(e,t){return typeof e!="object"||typeof t!="object"?e===t:(0,JV.default)(e?.styles,t?.styles)&&(0,JV.default)(e?.settings,t?.settings)}var soe=s(Yk(),1);function noe(e){return Object.prototype.toString.call(e)==="[object Object]"}function ioe(e){var t,r;return noe(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(noe(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function fn(e,t){return(0,soe.default)(e,t,{isMergeableObject:ioe,customMerge:r=>{if(r==="backgroundImage")return(o,n)=>n??o}})}function aoe(e,t){var r=0,o,n;t=t||{};function i(){var a=o,l=arguments.length,c,u;e:for(;a;){if(a.args.length!==arguments.length){a=a.next;continue}for(u=0;u<l;u++)if(a.args[u]!==arguments[u]){a=a.next;continue e}return a!==o&&(a===n&&(n=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=o,a.prev=null,o.prev=a,o=a),a.val}for(c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return a={args:c,val:e.apply(null,c)},o?(o.prev=a,a.next=o):n=a,r===t.maxSize?(n=n.prev,n.next=null):r++,o=a,a.val}return i.clear=function(){o=null,n=null,r=0},i}var It=s(N(),1),loe=s(lt(),1),DR=new Map,NMe=[],$V={caption:(0,It.__)("Caption"),link:(0,It.__)("Link"),button:(0,It.__)("Button"),heading:(0,It.__)("Heading"),h1:(0,It.__)("H1"),h2:(0,It.__)("H2"),h3:(0,It.__)("H3"),h4:(0,It.__)("H4"),h5:(0,It.__)("H5"),h6:(0,It.__)("H6"),"settings.color":(0,It.__)("Color"),"settings.typography":(0,It.__)("Typography"),"settings.shadow":(0,It.__)("Shadow"),"settings.layout":(0,It.__)("Layout"),"styles.color":(0,It.__)("Colors"),"styles.spacing":(0,It.__)("Spacing"),"styles.background":(0,It.__)("Background"),"styles.typography":(0,It.__)("Typography")},MMe=aoe(()=>(0,loe.getBlockTypes)().reduce((e,{name:t,title:r})=>(e[t]=r,e),{})),LR=e=>e!==null&&typeof e=="object";function FMe(e){if($V[e])return $V[e];let t=e.split(".");if(t?.[0]==="blocks")return MMe()?.[t[1]]||t[1];if(t?.[0]==="elements")return $V[t[1]]||t[1]}function coe(e,t,r=""){if(!LR(e)&&!LR(t))return e!==t?r.split(".").slice(0,2).join("."):void 0;e=LR(e)?e:{},t=LR(t)?t:{};let o=new Set([...Object.keys(e),...Object.keys(t)]),n=[];for(let i of o){let a=r?r+"."+i:i,l=coe(e[i],t[i],a);l&&(n=n.concat(l))}return n}function DMe(e,t){let r=JSON.stringify({next:e,previous:t});if(DR.has(r))return DR.get(r);let o=coe({styles:{background:e?.styles?.background,color:e?.styles?.color,typography:e?.styles?.typography,spacing:e?.styles?.spacing},blocks:e?.styles?.blocks,elements:e?.styles?.elements,settings:e?.settings},{styles:{background:t?.styles?.background,color:t?.styles?.color,typography:t?.styles?.typography,spacing:t?.styles?.spacing},blocks:t?.styles?.blocks,elements:t?.styles?.elements,settings:t?.settings});if(!o||Array.isArray(o)&&!o.length)return DR.set(r,[]),[];let n=Array.isArray(o)?o:[o],i=[...new Set(n)].reduce((a,l)=>{let c=FMe(l);return c&&a.push([l.split(".")[0],c]),a},[]);return DR.set(r,i),i}function C1(e,t,r={}){let o=DMe(e,t),n=o.length,{maxResults:i}=r;return n?(i&&n>i&&(o=o.slice(0,i)),Object.entries(o.reduce((a,l)=>{let c=a[l[0]]||[];return c.includes(l[1])||(a[l[0]]=[...c,l[1]]),a},{})).map(([a,l])=>{let c=l.length,u=l.join((0,It.__)(", "));switch(a){case"blocks":return(0,It.sprintf)((0,It._n)("%s block.","%s blocks.",c),u);case"elements":return(0,It.sprintf)((0,It._n)("%s element.","%s elements.",c),u);case"settings":return(0,It.sprintf)((0,It.__)("%s settings."),u);case"styles":return(0,It.sprintf)((0,It.__)("%s styles."),u);default:return(0,It.sprintf)((0,It.__)("%s."),u)}})):NMe}var hi=s(lt(),1),T1=s(ZV(),1),goe=s(U(),1);function Pb(e,t="root",r={}){if(!t)return null;let{fallback:o=!1}=r,{name:n,selectors:i,supports:a}=e,l=i&&Object.keys(i).length>0,c=Array.isArray(t)?t.join("."):t,u=null;if(l&&i.root?u=i?.root:a?.__experimentalSelector?u=a.__experimentalSelector:u=".wp-block-"+n.replace("core/","").replace("/","-"),c==="root")return u;let d=Array.isArray(t)?t:t.split(".");if(d.length===1){let m=o?u:null;if(l)return Wt(i,`${c}.root`,null)||Wt(i,c,null)||m;let h=a?Wt(a,`${c}.__experimentalSelector`,null):void 0;return h?Nl(u,h):m}let f;return l&&(f=Wt(i,c,null)),f||(o?Pb(e,d[0],r):null)}function LMe(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(r=>{let o=no(r).toRgb();t.r.push(o.r/255),t.g.push(o.g/255),t.b.push(o.b/255),t.a.push(o.a)}),t}function uoe(e,t){let r=LMe(t);return`
2 <svg
3 xmlns:xlink="http://www.w3.org/1999/xlink"
4 viewBox="0 0 0 0"
5 width="0"
6 height="0"
7 focusable="false"
8 role="none"
9 aria-hidden="true"
10 style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
11 >
12 <defs>
13 <filter id="${e}">
14 <!--
15 Use sRGB instead of linearRGB so transparency looks correct.
16 Use perceptual brightness to convert to grayscale.
17 -->
18 <feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>
19 <!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
20 <feComponentTransfer color-interpolation-filters="sRGB">
21 <feFuncR type="table" tableValues="${r.r.join(" ")}"></feFuncR>
22 <feFuncG type="table" tableValues="${r.g.join(" ")}"></feFuncG>
23 <feFuncB type="table" tableValues="${r.b.join(" ")}"></feFuncB>
24 <feFuncA type="table" tableValues="${r.a.join(" ")}"></feFuncA>
25 </feComponentTransfer>
26 <!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
27 <feComposite in2="SourceGraphic" operator="in"></feComposite>
28 </filter>
29 </defs>
30 </svg>`}function Gm(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([0-9])([a-zA-Z])/g,"$1-$2").replace(/([a-zA-Z])([0-9])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function e8(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function BMe(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function t8(e,t="0"){let r=BMe(e);if(!r)return null;let o=e8(r?.top)||t,n=e8(r?.left)||t;return o===n?o:`${o} ${n}`}var doe={backgroundSize:"cover",backgroundPosition:"50% 50%"};function foe(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:doe.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:doe.backgroundPosition}),t}var moe={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};var VMe={button:"wp-element-button",caption:"wp-element-caption"},jMe={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"},voe={"core/button":[":hover",":focus",":focus-visible",":active"],"core/navigation-link":[":hover",":focus",":focus-visible",":active"]},zMe={link:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"],button:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"]},yoe={mobile:"@media (width <= 480px)",tablet:"@media (480px < width <= 782px)"};function HMe(e="*",t={}){return Cb.reduce((r,{path:o,cssVarInfix:n,classes:i})=>{if(!i)return r;let a=Wt(t,o,[]);return["default","theme","custom"].forEach(l=>{a[l]&&a[l].forEach(({slug:c})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${Gm(c)}-${u}`,m=e.split(",").map(g=>`${g}${f}`).join(","),h=`var(--wp--preset--${n}--${Gm(c)})`;r+=`${m}{${d}: ${h} !important;}`})})}),r},"")}function UMe(e={}){return Cb.filter(t=>t.path.at(-1)==="duotone").flatMap(t=>{let r=Wt(e,t.path,{});return["default","theme"].filter(o=>r[o]).flatMap(o=>r[o].map(n=>uoe(`wp-duotone-${n.slug}`,n.colors))).join("")})}function boe(e={},t,r){let o=[];return Object.keys(e).forEach(n=>{let i=t+Gm(n.replace("/","-")),a=e[n];if(a instanceof Object){let l=i+r;o=[...o,...boe(a,l,r)]}else o.push(`${i}: ${a}`)}),o}function poe(e,t){let r=e.split(","),o=[];return r.forEach(n=>{o.push(`${t.trim()}${n.trim()}`)}),o.join(", ")}var GMe=(e,t,r)=>{if(r!=="core/paragraph"||(t?.blocks?.["core/paragraph"]?.typography?.textIndent??t?.typography?.textIndent??"subsequent")!=="all")return e;let i=".wp-block-paragraph + .wp-block-paragraph",a=".wp-block-paragraph";if(i in e){let l=e[i],c={...e};return delete c[i],c[a]=l,c}return e},WMe=(e,t)=>{let r=".wp-block-button";if(!(r in e))return e;let o={...e};return o[r]=o[r].map(n=>{let i=n.match(/^width:\s*(.+)$/);if(!i)return n;let a=i[1],l=null;a.endsWith("%")&&(l=parseFloat(a));let c="var(--wp--preset--dimension--";if(l===null&&a.startsWith(c)&&a.endsWith(")")){let u=a.slice(c.length,-1),d={...t?.dimensions?.dimensionSizes??{},...t?.blocks?.["core/button"]?.dimensions?.dimensionSizes??{}};for(let f of Object.values(d))if(Array.isArray(f)){for(let m of f)if(m.slug===u&&typeof m.size=="string"&&m.size.endsWith("%")){l=parseFloat(m.size);break}if(l!==null)break}}return l===null||isNaN(l)?n:`width: calc(${l} * 1% - (var(--wp--style--block-gap, 0.5em) * (1 - ${l} / 100)))`}),o},YMe=(e,t)=>{let r={};return Object.entries(e).forEach(([o,n])=>{if(o==="root"||!t?.[o])return;let i=typeof n=="string";if(!i&&typeof n=="object"&&n!==null&&Object.entries(n).forEach(([a,l])=>{if(a==="root"||!t?.[o][a])return;let c={[o]:{[a]:t[o][a]}},u=VR(c);r[l]=[...r[l]||[],...u],delete t[o][a]}),i||typeof n=="object"&&n!==null&&"root"in n){let a=i?n:n.root,l={[o]:t[o]},c=VR(l);r[a]=[...r[a]||[],...c],delete t[o]}}),r};function VR(e={},t="",r,o={},n=!1){let i=qc===t,a=Object.entries(hi.__EXPERIMENTAL_STYLE_PROPERTY).reduce((c,[u,{value:d,properties:f,useEngine:m,rootOnly:h}])=>{if(h&&!i)return c;let g=d;if(g[0]==="elements"||m)return c;let v=Wt(e,g);if(u==="--wp--style--root--padding"&&(typeof v=="string"||!r))return c;if(f&&typeof v!="string")Object.entries(f).forEach(y=>{let[b,S]=y;if(!Wt(v,[S],!1))return;let w=b.startsWith("--")?b:Gm(b);c.push(`${w}: ${(0,T1.getCSSValueFromRawStyle)(Wt(v,[S]))}`)});else if(Wt(e,g,!1)){let y=u.startsWith("--")?u:Gm(u);c.push(`${y}: ${(0,T1.getCSSValueFromRawStyle)(Wt(e,g))}`)}return c},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=QV(e.background.backgroundImage,o)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...foe(e.background)}})),(0,T1.getCSSRules)(e).forEach(c=>{if(i&&(r||n)&&c.key.startsWith("padding"))return;let u=c.key.startsWith("--")?c.key:Gm(c.key),d=QV(c.value,o);u==="font-size"&&(d=NR({name:"",slug:"",size:d},o?.settings)),u==="aspect-ratio"&&a.push("min-height: unset"),a.push(`${u}: ${d}`)}),a}function qMe({layoutDefinitions:e=moe,style:t,selector:r,hasBlockGapSupport:o,hasFallbackGapSupport:n,fallbackGapValue:i}){let a="",l=o?t8(t?.spacing?.blockGap):"";if(n&&(r===qc?l=l||"0.5em":!o&&i&&(l=i)),l&&e&&(Object.values(e).forEach(({className:c,name:u,spacingStyles:d})=>{!o&&u!=="flex"&&u!=="grid"||d?.length&&d.forEach(f=>{let m=[];if(f.rules&&Object.entries(f.rules).forEach(([h,g])=>{m.push(`${h}: ${g||l}`)}),m.length){let h="";o?h=r===qc?`:root :where(.${c})${f?.selector||""}`:`:root :where(${r}-${c})${f?.selector||""}`:h=r===qc?`:where(.${c}${f?.selector||""})`:`:where(${r}.${c}${f?.selector||""})`,a+=`${h} { ${m.join("; ")}; }`}})}),r===qc&&o&&(a+=`${_1} { --wp--style--block-gap: ${l}; }`)),r===qc&&e){let c=["block","flex","grid"];Object.values(e).forEach(({className:u,displayMode:d,baseStyles:f})=>{d&&c.includes(d)&&(a+=`${r} .${u} { display:${d}; }`),f?.length&&f.forEach(m=>{let h=[];if(m.rules&&Object.entries(m.rules).forEach(([g,v])=>{h.push(`${g}: ${v}`)}),h.length){let g=`.${u}${m?.selector||""}`;a+=`${g} { ${h.join("; ")}; }`}})})}return a}var KMe=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function ZMe(e){return BR(e)}function BR(e,t){if(!e)return{};let r=Object.entries(e),o=t?voe[t]??[]:[],i=r.filter(([a])=>KMe.includes(a)||o.includes(a)||yoe[a]).map(([a,l])=>[a,JSON.parse(JSON.stringify(l))]);return Object.fromEntries(i)}function hoe(e){let{styles:t,selector:r,featureSelectors:o,name:n,elementName:i,mediaQuery:a}=e,l=n?voe[n]??[]:zMe[i??""]??[];return l.length?l.flatMap(c=>{let u=t?.[c];return!u||typeof u!="object"?[]:[{styles:JSON.parse(JSON.stringify(u)),selector:r,selectorSuffix:c,mediaQuery:a,featureSelectors:o&&typeof o!="string"?o:void 0,name:n,elementName:i}]}):[]}function XMe(e){let{styles:t,selector:r,featureSelectors:o,name:n,elementName:i,isStyleVariation:a}=e;return!n&&!i?[]:Object.entries(yoe).flatMap(([l,c])=>{let u=t?.[l];return!u||typeof u!="object"?[]:[{styles:JSON.parse(JSON.stringify(u)),selector:r,mediaQuery:c,featureSelectors:o&&typeof o!="string"?o:void 0,name:n,elementName:i,isStyleVariation:a}]})}function QMe(e,t){if(!(!e||typeof e=="string"))return Object.fromEntries(Object.entries(e).map(([r,o])=>typeof o=="string"?[r,poe(o,t)]:[r,Object.fromEntries(Object.entries(o).map(([n,i])=>[n,poe(i,t)]))]))}var JMe=(e,t)=>{let r=[];if(!e?.styles)return r;let o=ZMe(e.styles);return o&&r.push({styles:o,selector:qc,skipSelectorWrapper:!0}),Object.entries(hi.__EXPERIMENTAL_ELEMENTS).forEach(([n,i])=>{e.styles?.elements?.[n]&&r.push({styles:e.styles?.elements?.[n]??{},selector:i,elementName:n,skipSelectorWrapper:!VMe[n]})}),Object.entries(e.styles?.blocks??{}).forEach(([n,i])=>{let a=BR(i,n),l=i,c=[],u=[];l?.variations&&Object.entries(l.variations).forEach(([d,f])=>{let m=f,h=BR(m,n);m?.css&&(h.css=m.css);let g=typeof t!="string"?t[n]?.styleVariationSelectors?.[d]:void 0;if(g&&typeof t!="string"){let v=t[n];u.push({styles:h,selector:g,featureSelectors:QMe(v?.featureSelectors,g),fallbackGapValue:v?.fallbackGapValue,hasLayoutSupport:v?.hasLayoutSupport,isStyleVariation:!0,layoutSelector:g+v.selector,layoutHasBlockGapSupport:!0,name:n})}Object.entries(m?.elements??{}).forEach(([v,y])=>{y&&hi.__EXPERIMENTAL_ELEMENTS[v]&&c.push({styles:y,selector:Nl(g,hi.__EXPERIMENTAL_ELEMENTS[v]),elementName:v,isStyleVariation:!0})}),Object.entries(m?.blocks??{}).forEach(([v,y])=>{let b=typeof t!="string"?Nl(g,t[v]?.selector):void 0,S=typeof t!="string"?Nl(g,t[v]?.duotoneSelector):void 0,w=typeof t!="string"?toe(g,t[v]?.featureSelectors??{}):void 0,_=BR(y,v);y?.css&&(_.css=y.css),!(!b||typeof t=="string")&&(c.push({selector:b,name:v,isStyleVariation:!0,duotoneSelector:S,featureSelectors:w,fallbackGapValue:t[v]?.fallbackGapValue,hasLayoutSupport:t[v]?.hasLayoutSupport,styles:_}),Object.entries(y.elements??{}).forEach(([C,k])=>{k&&hi.__EXPERIMENTAL_ELEMENTS[C]&&c.push({styles:k,selector:Nl(b,hi.__EXPERIMENTAL_ELEMENTS[C]),elementName:C,isStyleVariation:!0})}))})}),typeof t!="string"&&t?.[n]?.selector&&r.push({duotoneSelector:t[n].duotoneSelector,fallbackGapValue:t[n].fallbackGapValue,hasLayoutSupport:t[n].hasLayoutSupport,selector:t[n].selector,styles:a,featureSelectors:t[n].featureSelectors,name:n}),r.push(...u),Object.entries(l?.elements??{}).forEach(([d,f])=>{typeof t!="string"&&f&&t?.[n]&&hi.__EXPERIMENTAL_ELEMENTS[d]&&r.push({styles:f,selector:t[n]?.selector.split(",").map(m=>hi.__EXPERIMENTAL_ELEMENTS[d].split(",").map(g=>m+" "+g)).join(","),elementName:d})}),r.push(...c)}),r},r8=(e,t)=>{let r=[];if(!e?.settings)return r;let o=a=>{let l={};return Cb.forEach(({path:c})=>{let u=Wt(a,c,!1);u!==!1&&(l=Um(l,c,u))}),l},n=o(e.settings),i=e.settings?.custom;return(Object.keys(n).length>0||i)&&r.push({presets:n,custom:i,selector:_1}),Object.entries(e.settings?.blocks??{}).forEach(([a,l])=>{let c=l.custom;if(typeof t=="string"||!t[a])return;let u=o(l);(Object.keys(u).length>0||c)&&r.push({presets:u,custom:c,selector:t[a]?.selector,featureSelectors:t[a]?.featureSelectors})}),r};function $Me(e,t,r){if(!e||typeof e=="string")return r;let o=e[t];return typeof o=="string"?o:typeof o=="object"&&o.root?o.root:r}function eFe(e,t,{path:r,valueKey:o,valueFunc:n,cssVarInfix:i}){let a=Wt(e,r,[]),l=[];for(let c of["default","theme","custom"])if(a[c])for(let u of a[c]){let d=Gm(u.slug);o&&!n?l.push(`--wp--preset--${i}--${d}: ${u[o]}`):n&&typeof n=="function"&&l.push(`--wp--preset--${i}--${d}: ${n(u,t)}`)}return l}var tFe=(e,t)=>{let r=r8(e,t),o="";for(let{presets:n,custom:i,selector:a,featureSelectors:l}of r){let c=a,u={[c]:[]};if(e?.settings)for(let f of Cb){let m=eFe(n,e.settings,f);if(m.length===0)continue;let h=$Me(l,f.path[0],c);u[h]||(u[h]=[]),u[h].push(...m)}let d=boe(i,"--wp--custom--","--");d.length>0&&u[c].push(...d);for(let[f,m]of Object.entries(u))m.length>0&&(o+=`${f}{${m.join(";")};}`)}return o};function rFe(e,{tree:t,useRootPaddingAlign:r,disableLayoutStyles:o,hasBlockGapSupport:n,hasFallbackGapSupport:i,disableRootPadding:a}){let{selector:l,selectorSuffix:c,mediaQuery:u,duotoneSelector:d,styles:f,fallbackGapValue:m,hasLayoutSupport:h,featureSelectors:g,layoutSelector:v,layoutHasBlockGapSupport:y,skipSelectorWrapper:b,name:S}=e,w="",_=c?MR(l,c):l;if(g&&typeof g!="string"){let R=YMe(g,f);R=GMe(R,t.settings,S),R=WMe(R,t.settings),Object.entries(R).forEach(([I,B])=>{if(B.length){let E=c?MR(I,c):I,P=B.join(";");w+=`:root :where(${E}){${P};}`}})}if(d){let R={};f?.filter&&(R.filter=f.filter,delete f.filter);let I=VR(R);I.length&&(w+=`${d}{${I.join(";")};}`)}let C=v??_;!o&&(qc===C||h)&&(w+=qMe({style:f,selector:C,hasBlockGapSupport:y??n,hasFallbackGapSupport:i,fallbackGapValue:m}));let A=VR(f,_,r,t,a);if(A?.length){let R=b?_:`:root :where(${_})`;w+=`${R}{${A.join(";")};}`}return f?.css&&(w+=woe(f.css,`:root :where(${_})`)),u&&w?`${u}{${w}}`:w}var oFe=(e,t,r,o,n=!1,i=!1,a={})=>{let l={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...a},c=JMe(e,t),u=r8(e,t),d=e?.settings?.useRootPaddingAwareAlignments,{contentSize:f,wideSize:m}=e?.settings?.layout||{},h=l.marginReset||l.rootPadding||l.layoutStyles,g="";if(l.presets&&(f||m)&&(g+=`${_1} {`,g=f?g+` --wp--style--global--content-size: ${f};`:g,g=m?g+` --wp--style--global--wide-size: ${m};`:g,g+="}"),h&&(g+=":where(body) {margin: 0;",l.rootPadding&&d&&(g+=`padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
31 .has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
32 .has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
33 .has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }
34 .has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;
35 `),g+="}"),l.blockStyles&&c.forEach(v=>{if(v.isStyleVariation&&!l.variationStyles)return;let y=XMe(v);[v,...y,...hoe(v),...y.flatMap(hoe)].forEach(b=>{g+=rFe(b,{tree:e,useRootPaddingAlign:d,disableLayoutStyles:n,hasBlockGapSupport:r,hasFallbackGapSupport:o,disableRootPadding:i})})}),l.layoutStyles&&(g=g+".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",g=g+".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",g=g+".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),l.blockGap&&r){let v=t8(e?.styles?.spacing?.blockGap)||"0.5em";g=g+`:root :where(.wp-site-blocks) > * { margin-block-start: ${v}; margin-block-end: 0; }`,g=g+":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",g=g+":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return l.presets&&u.forEach(({selector:v,presets:y})=>{(qc===v||_1===v)&&(v="");let b=HMe(v,y);b.length>0&&(g+=b)}),g};function nFe(e,t){return r8(e,t).flatMap(({presets:o})=>UMe(o))}var iFe=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let r={root:t};return Object.entries(jMe).forEach(([o,n])=>{let i=Pb(e,o);i&&(r[n]=i)}),r},sFe=(e,t)=>{let{getBlockStyles:r}=(0,goe.select)(hi.store),o={};return e.forEach(n=>{let i=n.name,a=Pb(n);if(!a)return;let l=Pb(n,"filter.duotone");if(!l){let h=Pb(n),g=(0,hi.getBlockSupport)(n,"color.__experimentalDuotone",!1);typeof g=="string"&&h&&(l=Nl(h,g))}let c=!!n?.supports?.layout||!!n?.supports?.__experimentalLayout,u=n?.supports?.spacing?.blockGap?.__experimentalDefault,d=r(i),f={};d?.forEach(h=>{let g=t?`-${t}`:"",v=`${h.name}${g}`,y=roe(v,a);f[v]=y});let m=iFe(n,a);o[i]={duotoneSelector:l??void 0,fallbackGapValue:u,featureSelectors:Object.keys(m).length?m:void 0,hasLayoutSupport:c,name:i,selector:a,styleVariationSelectors:d?.length?f:void 0}}),o};function aFe(e){let t=e.styles?.blocks,r=t?.["core/separator"];return r&&r.color?.background&&!r.color?.text&&!r.border?.color?{...e,styles:{...e.styles,blocks:{...t,"core/separator":{...r,color:{...r.color,text:r.color?.background}}}}}:e}function woe(e,t){let r="";return!e||e.trim()===""||e.split("&").forEach(n=>{if(!n||n.trim()==="")return;if(!n.includes("{"))r+=`:root :where(${t}){${n.trim()}}`;else{let a=n.replace("}","").split("{");if(a.length!==2)return;let[l,c]=a,u=l.match(/([>+~\s]*::[a-zA-Z-]+)/),d=u?u[1]:"",f=u?l.replace(d,"").trim():l.trim(),m;f===""?m=t:m=l.startsWith(" ")?Nl(t,f):MR(t,f),r+=`:root :where(${m})${d}{${c.trim()}}`}}),r}function gg(e={},t=[],r={}){let{hasBlockGapSupport:o,hasFallbackGapSupport:n,disableLayoutStyles:i=!1,disableRootPadding:a=!1,styleOptions:l={}}=r,c=t.length>0?t:(0,hi.getBlockTypes)(),u=pg(e,"spacing.blockGap"),d=o??u!==null,f=n??!d;if(!e?.styles||!e?.settings)return[[],{}];let m=aFe(e),h=sFe(c),g=tFe(m,h),v=oFe(m,h,d,f,i,a,l),y=nFe(m,h),b=[{css:g,isGlobalStyles:!0},{css:v,isGlobalStyles:!0},{css:m?.styles?.css??"",isGlobalStyles:!0},{assets:y,__unstableType:"svgs",isGlobalStyles:!0}];return c.forEach(S=>{let w=m?.styles?.blocks?.[S.name];if(w?.css){let{featureSelectors:_}=h[S.name],C=typeof _=="object"?_?.css:void 0,k;typeof C=="string"?k=C:typeof C=="object"&&(k=C?.root);let A=k??h[S.name].selector;b.push({css:woe(w.css,A),isGlobalStyles:!0})}}),[b,m.settings]}function o8(e,t){if(!e||!t)return"";let r={settings:{},styles:{blocks:{[t]:e}}};try{let[o]=gg(r,[]);return o.map(n=>n.css).join(`
36 `)}catch{return""}}var{cleanEmptyObject:n8}=Y(Soe.privateApis);function lFe(){let{globalStylesId:e,isReady:t,settings:r,styles:o,_links:n}=(0,kb.useSelect)(u=>{let{getEntityRecord:d,getEditedEntityRecord:f,hasFinishedResolution:m,canUser:h}=u(Eb.store),g=u(Eb.store).__experimentalGetCurrentGlobalStylesId(),v,y=g?h("update",{kind:"root",name:"globalStyles",id:g}):null;g&&typeof y=="boolean"&&(y?v=f("root","globalStyles",g):v=d("root","globalStyles",g,{context:"view"}));let b=!1;return m("__experimentalGetCurrentGlobalStylesId")&&(g?b=y?m("getEditedEntityRecord",["root","globalStyles",g]):m("getEntityRecord",["root","globalStyles",g,{context:"view"}]):b=!0),{globalStylesId:g,isReady:b,settings:v?.settings,styles:v?.styles,_links:v?._links}},[]),{getEditedEntityRecord:i}=(0,kb.useSelect)(Eb.store),{editEntityRecord:a}=(0,kb.useDispatch)(Eb.store),l=(0,Rb.useMemo)(()=>({settings:r??{},styles:o??{},_links:n??{}}),[r,o,n]),c=(0,Rb.useCallback)((u,d={})=>{let f=i("root","globalStyles",e),m={styles:f?.styles??{},settings:f?.settings??{},_links:f?._links??{}},h=typeof u=="function"?u(m):u;a("root","globalStyles",e,{styles:n8(h.styles)||{},settings:n8(h.settings)||{},_links:n8(h._links)||{}},d)},[e,a,i]);return[t,l,c]}function cFe(){let e=(0,kb.useSelect)(t=>t(Eb.store).__experimentalGetCurrentThemeBaseGlobalStyles(),[]);return[!!e,e]}function jR(){let[e,t,r]=lFe(),[o,n]=cFe(),i=(0,Rb.useMemo)(()=>!n||!t?{}:fn(n,t),[t,n]);return(0,Rb.useMemo)(()=>({isReady:e&&o,user:t,base:n,merged:i,setUserConfig:r}),[i,t,n,r,e,o])}var{store:uFe}=Y(xb),_oe={};function dFe(e){let{RECEIVE_INTERMEDIATE_RESULTS:t}=Y(ra.privateApis),{getEntityRecords:r}=e(ra.store);return r("postType","wp_block",{per_page:-1,[t]:!0})}var fFe=["__experimentalBlockBindingsSupportedAttributes","__experimentalBlockDirectory","__experimentalDiscussionSettings","__experimentalFeatures","__experimentalGlobalStylesBaseStyles","allImageSizes","alignWide","blockInspectorTabs","maxUploadFileSize","allowedMimeTypes","bodyPlaceholder","canEditCSS","canLockBlocks","canUpdateBlockBindings","capabilities","clearBlockSelection","codeEditingEnabled","colors","disableContentOnlyForUnsyncedPatterns","disableCustomColors","disableCustomFontSizes","disableCustomSpacingSizes","disableCustomGradients","disableLayoutStyles","enableCustomLineHeight","enableCustomSpacing","enableCustomUnits","enableOpenverseMediaCategory","fontSizes","gradients","generateAnchors","onNavigateToEntityRecord","imageDefaultSize","imageDimensions","imageEditing","imageSizes","isPreviewMode","isRTL","locale","maxWidth","postContentAttributes","postsPerPage","readOnly","styles","titlePlaceholder","supportsLayout","widgetTypesToHideFromLegacyWidgetBlock","__unstableHasCustomAppender","__unstableResolvedAssets","__unstableIsBlockBasedTheme"],{globalStylesDataKey:mFe,globalStylesLinksDataKey:pFe,selectBlockPatternsKey:hFe,reusableBlocksSelectKey:gFe,sectionRootClientIdKey:vFe,mediaEditKey:yFe,getMediaSelectKey:bFe,isIsolatedEditorKey:wFe,deviceTypeKey:SFe,isNavigationOverlayContextKey:_Fe,isNavigationPostEditorKey:xFe,mediaUploadOnSuccessKey:CFe,openMediaEditorModalKey:TFe}=Y(zR.privateApis);function PFe(e,t,r,o){let n=(0,Toe.useViewportMatch)("medium"),{allImageSizes:i,bigImageSizeThreshold:a,allowRightClickOverrides:l,blockTypes:c,focusMode:u,hasFixedToolbar:d,isDistractionFree:f,keepCaretInsideBlock:m,hasUploadPermissions:h,hiddenBlockTypes:g,canUseUnfilteredHTML:v,userCanCreatePages:y,pageOnFront:b,pageForPosts:S,userPatternCategories:w,restBlockPatternCategories:_,sectionRootClientId:C,deviceType:k,isNavigationOverlayContext:A,isRevisionsMode:R}=(0,yg.useSelect)(ie=>{let{canUser:Se,getRawEntityRecord:fe,getEntityRecord:X,getUserPatternCategories:ee,getBlockPatternCategories:pe}=ie(ra.store),{get:ve}=ie(Coe.store),{getBlockTypes:Ie}=ie(Poe.store),{getDeviceType:et,isRevisionsMode:it}=Y(ie(T)),{getBlocksByName:ne,getBlockAttributes:$}=ie(zR.store),ue=Se("read",{kind:"root",name:"site"})?X("root","site"):void 0,oe=X("root","__unstableBase");function me(){return o==="template-locked"?ne("core/post-content")?.[0]??"":ne("core/group").find(Ne=>$(Ne)?.tagName==="main")??""}return{allImageSizes:oe?.image_sizes,bigImageSizeThreshold:oe?.image_size_threshold,allowRightClickOverrides:ve("core","allowRightClickOverrides"),blockTypes:Ie(),canUseUnfilteredHTML:fe("postType",t,r)?._links?.hasOwnProperty("wp:action-unfiltered-html"),focusMode:ve("core","focusMode"),hasFixedToolbar:ve("core","fixedToolbar")||!n,hiddenBlockTypes:ve("core","hiddenBlockTypes"),isDistractionFree:ve("core","distractionFree"),keepCaretInsideBlock:ve("core","keepCaretInsideBlock"),hasUploadPermissions:Se("create",{kind:"postType",name:"attachment"})??!0,userCanCreatePages:Se("create",{kind:"postType",name:"page"}),pageOnFront:ue?.page_on_front,pageForPosts:ue?.page_for_posts,userPatternCategories:ee(),restBlockPatternCategories:pe(),sectionRootClientId:me(),deviceType:et(),isNavigationOverlayContext:t==="wp_template_part"&&r?X("postType","wp_template_part",r)?.area==="navigation-overlay":!1,isRevisionsMode:it()}},[t,r,n,o]),{merged:I}=jR(),B=I.styles??_oe,E=I._links??_oe,P=e.__experimentalAdditionalBlockPatterns??e.__experimentalBlockPatterns,L=e.__experimentalAdditionalBlockPatternCategories??e.__experimentalBlockPatternCategories,j=(0,vg.useMemo)(()=>[...P||[]].filter(({postTypes:ie})=>!ie||Array.isArray(ie)&&ie.includes(t)),[P,t]),z=(0,vg.useMemo)(()=>[...L||[],..._||[]].filter((ie,Se,fe)=>Se===fe.findIndex(X=>ie.name===X.name)),[L,_]),{undo:W,setIsInserterOpened:O}=(0,yg.useDispatch)(T),{editMediaEntity:M}=Y((0,yg.useDispatch)(ra.store)),{saveEntityRecord:D}=(0,yg.useDispatch)(ra.store),{openMediaEditorModal:G}=(0,yg.useDispatch)(uFe),q=(0,vg.useCallback)(ie=>y?D("postType","page",ie):Promise.reject({message:(0,xoe.__)("You do not have permission to create Pages.")}),[D,y]),Z=(0,vg.useMemo)(()=>g&&g.length>0?(e.allowedBlockTypes===!0?c.map(({name:Se})=>Se):e.allowedBlockTypes||[]).filter(Se=>!g.includes(Se)):e.allowedBlockTypes,[e.allowedBlockTypes,g,c]),te=e.focusMode===!1;return(0,vg.useMemo)(()=>{let ie={...Object.fromEntries(Object.entries(e).filter(([Se])=>fFe.includes(Se))),[mFe]:B,[pFe]:E,allImageSizes:i,bigImageSizeThreshold:a,allowedBlockTypes:Z,allowRightClickOverrides:l,focusMode:u&&!te,hasFixedToolbar:d,isDistractionFree:f,keepCaretInsideBlock:m,[bFe]:(Se,fe)=>Se(ra.store).getEntityRecord("postType","attachment",fe),[yFe]:h?M:void 0,[TFe]:window?.__experimentalMediaEditorModal?({id:Se,onUpdate:fe})=>G({id:Se,onUpdate:fe}):void 0,mediaUpload:h?MP:void 0,[CFe]:h?qre:void 0,mediaSideload:h?Zre:void 0,mediaFinalize:h?Qre:void 0,__experimentalBlockPatterns:j,[hFe]:Se=>{let{hasFinishedResolution:fe,getBlockPatternsForPostType:X}=Y(Se(ra.store)),ee=X(t);return fe("getBlockPatterns")?ee:void 0},[gFe]:dFe,__experimentalBlockPatternCategories:z,__experimentalUserPatternCategories:w,__experimentalFetchLinkSuggestions:(Se,fe)=>(0,ra.__experimentalFetchLinkSuggestions)(Se,fe,e),inserterMediaCategories:Gre,__experimentalFetchRichUrlData:ra.__experimentalFetchUrlData,__experimentalCanUserUseUnfilteredHTML:v,__experimentalUndo:W,outlineMode:!f&&t==="wp_template",__experimentalCreatePageEntity:q,__experimentalUserCanCreatePages:y,pageOnFront:b,pageForPosts:S,__experimentalPreferPatternsOnRoot:t==="wp_template",templateLock:t==="wp_navigation"?"insert":e.templateLock,template:t==="wp_navigation"?[["core/navigation",{},[]]]:e.template,__experimentalSetIsInserterOpened:O,[vFe]:C,editorTool:o==="post-only"&&t!=="wp_template"?"edit":void 0,[wFe]:["wp_template_part","wp_block","wp_navigation"].includes(t),[xFe]:t==="wp_navigation",disableContentOnlyForTemplateParts:o==="template-locked",...k?{[SFe]:k}:{},[_Fe]:A};return R&&(ie.isPreviewMode=!0),ie},[R,Z,l,u,te,d,f,m,e,h,w,j,z,v,W,q,y,b,S,t,O,C,B,E,o,M,G,e.onNavigateToEntityRecord,k,i,a,A])}var Eoe=PFe;var P1=s(U(),1),Ab=s(ce(),1),UR=s(V(),1);var koe=s(V(),1),Roe=s(tn(),1),EFe=["core/post-title","core/post-featured-image","core/post-content"];function HR(){return(0,koe.useMemo)(()=>[...(0,Roe.applyFilters)("editor.postContentBlockTypes",EFe)],[])}function Aoe(){let e=HR(),{contentOnlyIds:t,templateParts:r}=(0,P1.useSelect)(i=>{let{getPostBlocksByName:a}=Y(i(T)),{getBlocksByName:l}=i(Ab.store);return{contentOnlyIds:a(e),templateParts:l("core/template-part")}},[e]),o=(0,P1.useSelect)(i=>{let{getBlockOrder:a}=i(Ab.store);return r.flatMap(l=>a(l))},[r]),n=(0,P1.useRegistry)();return(0,UR.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:a}=n.dispatch(Ab.store);return i("","disabled"),()=>{a("")}},[n]),(0,UR.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:a}=n.dispatch(Ab.store);return n.batch(()=>{for(let l of r)i(l,"contentOnly")}),()=>{n.batch(()=>{for(let l of r)a(l)})}},[r,n]),(0,UR.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:a}=n.dispatch(Ab.store),l=new Set(t);return n.batch(()=>{for(let c of t)i(c,"contentOnly");for(let c of o)l.has(c)||i(c,"disabled")}),()=>{n.batch(()=>{for(let c of t)a(c);for(let c of o)l.has(c)||a(c)})}},[t,o,n]),null}var Ioe=s(V(),1),GR=s(U(),1),i8=s(ce(),1);function Ooe(){let e=(0,GR.useSelect)(o=>o(i8.store).getBlockOrder()?.[0],[]),{setBlockEditingMode:t,unsetBlockEditingMode:r}=(0,GR.useDispatch)(i8.store);(0,Ioe.useEffect)(()=>{if(e)return t(e,"contentOnly"),()=>{r(e)}},[e,r,t])}var Moe=s(V(),1),Ib=s(tn(),1),Noe=["wp_block","wp_template","wp_template_part"];function Foe(e,t){(0,Moe.useEffect)(()=>((0,Ib.addFilter)("blockEditor.__unstableCanInsertBlockType","removeTemplatePartsFromInserter",(r,o)=>!Noe.includes(e)&&o.name==="core/template-part"&&t==="post-only"?!1:r),(0,Ib.addFilter)("blockEditor.__unstableCanInsertBlockType","removePostContentFromInserter",(r,o,n,{getBlockParentsByBlockName:i})=>!Noe.includes(e)&&o.name==="core/post-content"?i(n,"core/query").length>0:r),()=>{(0,Ib.removeFilter)("blockEditor.__unstableCanInsertBlockType","removeTemplatePartsFromInserter"),(0,Ib.removeFilter)("blockEditor.__unstableCanInsertBlockType","removePostContentFromInserter")}),[e,t])}var Xoe=s(U(),1),YR=s(V(),1),qR=s(lt(),1);var Goe=s(l8(),1),f8=s(u8(),1),d8=s(zoe(),1),WR=s(lt(),1),Zo=s(A1(),1),gi=s(N(),1);var{parseRawBlock:Woe}=Y(WR.privateApis);function Uoe(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function VFe(e,t){if(!e&&!t)return 1;if(!e||!t)return 0;let r=new Intl.Segmenter(void 0,{granularity:"word"}),o=/[\p{L}\p{N}]/u,n=d=>{let f=[];for(let{segment:m,isWordLike:h}of r.segment(d))(h||o.test(m))&&f.push(m);return f},i=n(e),a=n(t);if(i.length===0&&a.length===0)return 1;let l=new Set(i),c=0;for(let d of a)l.has(d)&&c++;let u=Math.max(i.length,a.length);return u>0?c/u:0}function jFe(e){let t=[],r=[];if(e.forEach((d,f)=>{let m=d.__revisionDiffStatus?.status;m==="removed"?t.push({block:d,index:f}):m==="added"&&r.push({block:d,index:f})}),t.length===0||r.length===0)return e;let o=new Set,n=new Set,i=new Map,a=.5,l=new Map;for(let d of r){let f=d.block.blockName;l.has(f)||l.set(f,[]),l.get(f).push(d)}let c=new Map;for(let d of t){let f=d.block.blockName;c.has(f)||c.set(f,[]),c.get(f).push(d)}let u=-1;for(let d of t){let f=l.get(d.block.blockName)||[],m=c.get(d.block.blockName)||[],h=f.filter(v=>!i.has(v.index)&&v.index>u);if(h.length===0)continue;let g=null;if(m.length===1&&h.length===1){let v=h[0],y=JSON.stringify(d.block.attrs)===JSON.stringify(v.block.attrs);(!((d.block.innerHTML||"")===(v.block.innerHTML||""))||!y)&&(g=v)}else{let v=0;for(let y of h){let b=VFe(d.block.innerHTML||"",y.block.innerHTML||""),S=JSON.stringify(d.block.attrs)===JSON.stringify(y.block.attrs);b>v&&b>a&&(b<1||!S)&&(v=b,g=y)}}if(g){u=g.index;let v={...g.block,__revisionDiffStatus:{status:"modified"},__previousRawBlock:d.block},y=Math.min(d.index,g.index),b=Math.max(d.index,g.index),S=!1;for(let w=y+1;w<b;w++)if(e[w].__revisionDiffStatus?.status==="added"&&!n.has(w)){S=!0;break}S?(i.set(g.index,v),o.add(d.index)):(i.set(d.index,v),n.add(g.index))}}return e.map((d,f)=>o.has(f)||n.has(f)?null:i.has(f)?i.get(f):d).filter(Boolean)}function Yoe(e,t){let r=u=>JSON.stringify({name:u.blockName,attrs:u.attrs,html:(u.innerContent||[]).filter(d=>d!==null&&d.trim()!=="")}),o=e.map(r),n=t.map(r),i=(0,Goe.diffArrays)(n,o),a=[],l=0,c=0;for(let u of i)if(u.added)for(let d=0;d<u.count;d++)a.push({...e[l++],__revisionDiffStatus:{status:"added"}});else if(u.removed)for(let d=0;d<u.count;d++)a.push({...t[c++],__revisionDiffStatus:{status:"removed"}});else for(let d=0;d<u.count;d++){let f=e[l++],m=t[c++],h=Yoe(f.innerBlocks||[],m.innerBlocks||[]);a.push({...f,innerBlocks:h})}return jFe(a)}function zFe(e,t,r,o){let n=e[r]||[],i=t[o]||[];if(n.length!==i.length)return!0;for(let a of n)if(!i.find(c=>c.type===a.type&&JSON.stringify(c.attributes)===JSON.stringify(a.attributes)))return!0;return!1}function HFe(e,t,r,o){let n=e[r]||[],i=t[o]||[],a=0,l=0,c=0;for(let d of n){let f=i.find(m=>m.type===d.type);f?JSON.stringify(d.attributes)!==JSON.stringify(f.attributes)&&c++:a++}for(let d of i)n.find(m=>m.type===d.type)||l++;if(a>0&&l===0&&c===0)return{type:"added",description:(0,gi.sprintf)((0,gi._n)("%d format added","%d formats added",a),a)};if(l>0&&a===0&&c===0)return{type:"removed",description:(0,gi.sprintf)((0,gi._n)("%d format removed","%d formats removed",l),l)};let u=[];return a>0&&u.push((0,gi.sprintf)((0,gi._n)("%d format added","%d formats added",a),a)),l>0&&u.push((0,gi.sprintf)((0,gi._n)("%d format removed","%d formats removed",l),l)),c>0&&u.push((0,gi.sprintf)((0,gi._n)("%d format changed","%d formats changed",c),c)),{type:"changed",description:u.join(", ")||(0,gi.__)("Formatting changed")}}function UFe(e,t){let r=e.toPlainText(),o=t.toPlainText(),n=(0,f8.diffWords)(o,r),i=(0,Zo.create)({text:""}),a=0,l=0;for(let c of n)if(c.removed){let u=(0,Zo.slice)(t,l,l+c.value.length),d=(0,Zo.applyFormat)(u,{type:"revision/diff-removed",attributes:{title:(0,gi.__)("Removed")}},0,c.value.length);i=(0,Zo.concat)(i,d),l+=c.value.length}else if(c.added){let u=(0,Zo.slice)(e,a,a+c.value.length),d=(0,Zo.applyFormat)(u,{type:"revision/diff-added",attributes:{title:(0,gi.__)("Added")}},0,c.value.length);i=(0,Zo.concat)(i,d),a+=c.value.length}else{let u=e.formats||[],d=t.formats||[],f=c.value.length,m=v=>zFe(u,d,a+v,l+v),h=0,g=m(0);for(let v=1;v<=f;v++){let y=v<f&&m(v);if(v===f||y!==g){let b=(0,Zo.slice)(e,a+h,a+v);if(g){let{type:S,description:w}=HFe(u,d,a+h,l+h),_={added:"revision/diff-format-added",removed:"revision/diff-format-removed",changed:"revision/diff-format-changed"}[S],C=(0,Zo.applyFormat)(b,{type:_,attributes:{title:w}},0,v-h);i=(0,Zo.concat)(i,C)}else i=(0,Zo.concat)(i,b);h=v,g=y}}a+=c.value.length,l+=c.value.length}return new Zo.RichTextData(i)}function GFe(e,t,r){let o=(0,WR.getBlockType)(e.name);if(!o)return;let n={};for(let[i,a]of Object.entries(o.attributes))if(a.source==="rich-text"){let l=e.attributes[i],c=t.attributes[i];l instanceof Zo.RichTextData&&c instanceof Zo.RichTextData&&(e.attributes[i]=UFe(l,c))}else{let l=Uoe(e.attributes[i]),c=Uoe(t.attributes[i]);l!==c&&(n[i]=(0,f8.diffWords)(c,l))}Object.keys(n).length>0&&(r.changedAttributes=n)}function qoe(e,t){if(t.__revisionDiffStatus){if(t.__revisionDiffStatus.status==="modified"&&t.__previousRawBlock){let r=Woe(t.__previousRawBlock);r&&GFe(e,r,t.__revisionDiffStatus)}e.__revisionDiffStatus=t.__revisionDiffStatus,e.attributes.__revisionDiffStatus=t.__revisionDiffStatus}if(e.innerBlocks&&t.innerBlocks)for(let r=0;r<e.innerBlocks.length;r++){let o=e.innerBlocks[r],n=t.innerBlocks[r];o&&n&&qoe(o,n)}}function Koe(e,t){let r=(0,d8.parse)(e||""),o=(0,d8.parse)(t||"");return Yoe(r,o).map(i=>{let a=Woe(i);return a&&qoe(a,i),a}).filter(Boolean)}var Zoe=s(l8(),1);function m8(e,t){if(!t?.length||!e?.length)return e;let r=e.map(c=>c.name),o=t.map(c=>c.name),n=(0,Zoe.diffArrays)(o,r),i=0,a=0,l=[];for(let c of n)if(c.removed)a+=c.count;else if(c.added)for(let u=0;u<c.count;u++)l.push(e[i++]);else for(let u=0;u<c.count;u++){let d=e[i++],f=t[a++];l.push({...d,clientId:f.clientId,innerBlocks:m8(d.innerBlocks,f.innerBlocks)})}return l}function Qoe(){let{isInRevisionsMode:e,showDiff:t,revision:r,previousRevision:o,postType:n}=(0,Xoe.useSelect)(l=>{let{isRevisionsMode:c,isShowingRevisionDiff:u,getCurrentRevision:d,getPreviousRevision:f}=Y(l(T)),{getCurrentPostType:m}=l(T),h=c();return{isInRevisionsMode:h,showDiff:u(),revision:h?d():void 0,previousRevision:h?f():void 0,postType:m()}},[]),i=(0,YR.useRef)([]);return(0,YR.useMemo)(()=>{if(!e)return i.current=[],null;if(!r)return[];let l=r?.content?.raw??"",c;if(t){let d=o?.content?.raw||"";c=Koe(l,d)}else c=(0,qR.parse)(l);n==="wp_navigation"&&(c=[(0,qR.createBlock)("core/navigation",{templateLock:!1},c)]);let u=m8(c,i.current);return i.current=u,u},[e,r,r?.content?.raw,o?.content?.raw,n,t])}var vs=s(U(),1),ht=s(N(),1);var N1=s(p8(),1),v8=s(vt(),1),ane=s(wt(),1),lne=s(ce(),1),Nb=s(Q(),1);var KR=s(St(),1);var I1=s(U(),1),$oe=s(Sl(),1),ene=s(Q(),1);var tne=s(x(),1),{RenamePatternModal:WFe}=Y($oe.privateApis),h8="editor/pattern-rename";function rne(){let e=(0,I1.useSelect)(n=>n(Me).isModalActive(h8)),{record:t,postType:r}=(0,I1.useSelect)(n=>{if(!e)return{};let{getCurrentPostType:i,getCurrentPostId:a}=n(T),{getEditedEntityRecord:l}=n(ene.store),c=i();return{record:l("postType",c,a()),postType:c}},[e]),{closeModal:o}=(0,I1.useDispatch)(Me);return!e||r!==ba?null:(0,tne.jsx)(WFe,{onClose:o,pattern:t})}var O1=s(U(),1),one=s(Sl(),1),nne=s(Q(),1);var ine=s(x(),1),{DuplicatePatternModal:YFe}=Y(one.privateApis),g8="editor/pattern-duplicate";function sne(){let e=(0,O1.useSelect)(n=>n(Me).isModalActive(g8)),{record:t,postType:r}=(0,O1.useSelect)(n=>{if(!e)return{};let{getCurrentPostType:i,getCurrentPostId:a}=n(T),{getEditedEntityRecord:l}=n(nne.store),c=i();return{record:l("postType",c,a()),postType:c}},[e]),{closeModal:o}=(0,O1.useDispatch)(Me);return!e||r!==ba?null:(0,ine.jsx)(YFe,{onClose:o,onSuccess:()=>o(),pattern:t})}var qFe=()=>function(){let{editorMode:t,isListViewOpen:r,showBlockBreadcrumbs:o,isDistractionFree:n,isFocusMode:i,isPreviewMode:a,isViewable:l,isCodeEditingEnabled:c,isRichEditingEnabled:u,isPublishSidebarEnabled:d}=(0,vs.useSelect)(B=>{let{get:E}=B(v8.store),{isListViewOpened:P,getCurrentPostType:L,getEditorSettings:j}=B(T),{getSettings:z}=B(lne.store),{getPostType:W}=B(Nb.store);return{editorMode:E("core","editorMode")??"visual",isListViewOpen:P(),showBlockBreadcrumbs:E("core","showBlockBreadcrumbs"),isDistractionFree:E("core","distractionFree"),isFocusMode:E("core","focusMode"),isPreviewMode:z().isPreviewMode,isViewable:W(L())?.viewable??!1,isCodeEditingEnabled:j().codeEditingEnabled,isRichEditingEnabled:j().richEditingEnabled,isPublishSidebarEnabled:B(T).isPublishSidebarEnabled()}},[]),{getActiveComplementaryArea:f}=(0,vs.useSelect)(Me),{toggle:m}=(0,vs.useDispatch)(v8.store),{createInfoNotice:h}=(0,vs.useDispatch)(ane.store),{__unstableSaveForPreview:g,setIsListViewOpened:v,switchEditorMode:y,toggleDistractionFree:b,toggleSpotlightMode:S,toggleTopToolbar:w}=(0,vs.useDispatch)(T),{openModal:_,enableComplementaryArea:C,disableComplementaryArea:k}=(0,vs.useDispatch)(Me),{getCurrentPostId:A}=(0,vs.useSelect)(T),R=c&&u;if(a)return{commands:[],isLoading:!1};let I=[];return I.push({name:"core/open-shortcut-help",label:(0,ht.__)("Keyboard shortcuts"),icon:lS,category:"view",callback:({close:B})=>{B(),_("editor/keyboard-shortcut-help")}}),I.push({name:"core/toggle-distraction-free",label:n?(0,ht.__)("Exit Distraction free"):(0,ht.__)("Enter Distraction free"),category:"command",callback:({close:B})=>{b(),B()}}),I.push({name:"core/open-preferences",label:(0,ht.__)("Editor preferences"),category:"view",callback:({close:B})=>{B(),_("editor/preferences")}}),I.push({name:"core/toggle-spotlight-mode",label:i?(0,ht.__)("Exit Spotlight mode"):(0,ht.__)("Enter Spotlight mode"),category:"command",callback:({close:B})=>{S(),B()}}),I.push({name:"core/toggle-list-view",label:r?(0,ht.__)("Close List View"):(0,ht.__)("Open List View"),icon:cS,category:"command",callback:({close:B})=>{v(!r),B(),h(r?(0,ht.__)("List View off."):(0,ht.__)("List View on."),{id:"core/editor/toggle-list-view/notice",type:"snackbar"})}}),I.push({name:"core/toggle-top-toolbar",label:(0,ht.__)("Top toolbar"),category:"command",callback:({close:B})=>{w(),B()}}),R&&I.push({name:"core/toggle-code-editor",label:t==="visual"?(0,ht.__)("Open code editor"):(0,ht.__)("Exit code editor"),icon:Q6,category:"command",callback:({close:B})=>{y(t==="visual"?"text":"visual"),B()}}),I.push({name:"core/toggle-breadcrumbs",label:o?(0,ht.__)("Hide block breadcrumbs"):(0,ht.__)("Show block breadcrumbs"),category:"command",callback:({close:B})=>{m("core","showBlockBreadcrumbs"),B(),h(o?(0,ht.__)("Breadcrumbs hidden."):(0,ht.__)("Breadcrumbs visible."),{id:"core/editor/toggle-breadcrumbs/notice",type:"snackbar"})}}),I.push({name:"core/open-settings-sidebar",label:(0,ht.__)("Show or hide the Settings panel"),icon:(0,ht.isRTL)()?Kp:Nu,category:"command",callback:({close:B})=>{let E=f("core");B(),E==="edit-post/document"?k("core"):C("core","edit-post/document")}}),I.push({name:"core/open-block-inspector",label:(0,ht.__)("Show or hide the Block settings panel"),icon:I6,category:"command",callback:({close:B})=>{let E=f("core");B(),E==="edit-post/block"?k("core"):C("core","edit-post/block")}}),I.push({name:"core/toggle-publish-sidebar",label:d?(0,ht.__)("Disable pre-publish checks"):(0,ht.__)("Enable pre-publish checks"),icon:oS,category:"command",callback:({close:B})=>{B(),m("core","isPublishSidebarEnabled"),h(d?(0,ht.__)("Pre-publish checks disabled."):(0,ht.__)("Pre-publish checks enabled."),{id:"core/editor/publish-sidebar/notice",type:"snackbar"})}}),l&&I.push({name:"core/preview-link",label:(0,ht.__)("Preview in a new tab"),icon:ss,category:"view",callback:async({close:B})=>{B();let E=A(),P=await g();window.open(P,`wp-preview-${E}`)}}),{commands:I,isLoading:!1}},KFe=()=>function(){let{postType:t}=(0,vs.useSelect)(n=>{let{getCurrentPostType:i}=n(T);return{postType:i()}},[]),{openModal:r}=(0,vs.useDispatch)(Me),o=[];return t===ba&&(o.push({name:"core/rename-pattern",label:(0,ht.__)("Rename pattern"),icon:pS,category:"edit",callback:({close:n})=>{r(h8),n()}}),o.push({name:"core/duplicate-pattern",label:(0,ht.__)("Duplicate pattern"),icon:_S,category:"command",callback:({close:n})=>{r(g8),n()}})),{isLoading:!1,commands:o}},ZFe=()=>function(){let{onNavigateToEntityRecord:t,goBack:r,templateId:o,isPreviewMode:n,canEditTemplate:i}=(0,vs.useSelect)(u=>{let{getRenderingMode:d,getEditorSettings:f,getCurrentTemplateId:m}=Y(u(T)),h=f(),g=m();return{isTemplateHidden:d()==="post-only",onNavigateToEntityRecord:h.onNavigateToEntityRecord,getEditorSettings:f,goBack:h.onNavigateToPreviousEntityRecord,templateId:g,isPreviewMode:h.isPreviewMode,canEditTemplate:!!g&&u(Nb.store).canUser("update",{kind:"postType",name:"wp_template",id:g})}},[]),{editedRecord:a,hasResolved:l}=(0,Nb.useEntityRecord)("postType","wp_template",o);if(n)return{isLoading:!1,commands:[]};let c=[];return o&&l&&i&&c.push({name:"core/switch-to-template-focus",label:(0,ht.sprintf)((0,ht.__)("Edit template: %s"),(0,KR.decodeEntities)(a.title)),icon:bl,category:"edit",callback:({close:u})=>{t({postId:o,postType:"wp_template"}),u()}}),r&&c.push({name:"core/switch-to-previous-entity",label:(0,ht.__)("Go back"),icon:kf,category:"view",callback:({close:u})=>{r(),u()}}),{isLoading:!1,commands:c}},XFe=()=>function(){let{postType:t,postId:r}=(0,vs.useSelect)(l=>{let{getCurrentPostId:c,getCurrentPostType:u}=l(T);return{postType:u(),postId:c()}},[]),{editedRecord:o,hasResolved:n}=(0,Nb.useEntityRecord)("postType",t,r),{revertTemplate:i}=Y((0,vs.useDispatch)(T));if(!n||![Oo,Vt].includes(t))return{isLoading:!0,commands:[]};let a=[];if(NP(o)){let l=o.type===Vt?(0,ht.sprintf)((0,ht.__)("Reset template: %s"),(0,KR.decodeEntities)(o.title)):(0,ht.sprintf)((0,ht.__)("Reset template part: %s"),(0,KR.decodeEntities)(o.title));a.push({name:"core/reset-template",label:l,icon:(0,ht.isRTL)()?vS:gS,category:"command",callback:({close:c})=>{i(o),c()}})}return{isLoading:!n,commands:a}};function cne(){(0,N1.useCommandLoader)({name:"core/editor/edit-ui",hook:qFe()}),(0,N1.useCommandLoader)({name:"core/editor/contextual-commands",hook:KFe(),context:"entity-edit"}),(0,N1.useCommandLoader)({name:"core/editor/page-content-focus",hook:ZFe(),context:"entity-edit"}),(0,N1.useCommandLoader)({name:"core/edit-site/manipulate-document",hook:XFe()})}var ZR=s(U(),1),une=s(V(),1),dne=s(jF(),1);var Mb="upload-in-progress";function fne(){let e=(0,ZR.useSelect)(i=>i(dne.store).isUploading(),[]),{lockPostSaving:t,unlockPostSaving:r,lockPostAutosaving:o,unlockPostAutosaving:n}=(0,ZR.useDispatch)(T);(0,une.useEffect)(()=>(e?(t(Mb),o(Mb)):(r(Mb),n(Mb)),()=>{r(Mb),n(Mb)}),[e,t,r,o,n])}var bg=s(N(),1),pne=s(ce(),1),hne=s(U(),1),gne=s(V(),1);var vne=s(x(),1),{BlockRemovalWarningModal:mne}=Y(pne.privateApis),QFe=["core/post-content","core/post-template","core/query"],JFe=[{postTypes:["wp_template","wp_template_part"],callback(e){if(e.filter(({name:o})=>o==="core/post-content").length)return{description:(0,bg.__)("This block displays the content of posts and pages using this template."),warning:(0,bg.__)("If you delete it, posts or pages using this template will not display any content."),subtext:(0,bg.__)("Visitors will see blank pages."),requireConfirmation:!0};if(e.filter(({name:o})=>QFe.includes(o)).length)return(0,bg._n)("Deleting this block will stop your post or page content from displaying on this template. It is not recommended.","Some of the deleted blocks will stop your post or page content from displaying on this template. It is not recommended.",e.length)}},{postTypes:["wp_block"],callback(e){if(e.filter(({attributes:r})=>r?.metadata?.bindings&&Object.values(r.metadata.bindings).some(o=>o.source==="core/pattern-overrides")).length)return(0,bg._n)("The deleted block allows instance overrides. Removing it may result in content not displaying where this pattern is used. Are you sure you want to proceed?","Some of the deleted blocks allow instance overrides. Removing them may result in content not displaying where this pattern is used. Are you sure you want to proceed?",e.length)}}];function yne(){let e=(0,hne.useSelect)(r=>r(T).getCurrentPostType(),[]),t=(0,gne.useMemo)(()=>JFe.filter(r=>r.postTypes.includes(e)),[e]);return!mne||!t?null:(0,vne.jsx)(mne,{rules:t})}var Wm=s(H(),1),y8=s(N(),1),wg=s(V(),1),XR=s(ce(),1),kd=s(U(),1),bne=s(Q(),1),wne=s(lt(),1),b8=s(vt(),1);var Kc=s(x(),1);function $Fe(){let{blockPatternsWithPostContentBlockType:e,postType:t}=(0,kd.useSelect)(r=>{let{getPatternsByBlockTypes:o,getBlocksByName:n}=r(XR.store),{getCurrentPostType:i,getRenderingMode:a}=r(T),l=a()==="post-only"?"":n("core/post-content")?.[0];return{blockPatternsWithPostContentBlockType:o("core/post-content",l),postType:i()}},[]);return(0,wg.useMemo)(()=>e?.length?e.filter(r=>t==="page"&&!r.postTypes||Array.isArray(r.postTypes)&&r.postTypes.includes(t)):[],[t,e])}function e4e({blockPatterns:e,onChoosePattern:t}){let{editEntityRecord:r}=(0,kd.useDispatch)(bne.store),{postType:o,postId:n}=(0,kd.useSelect)(i=>{let{getCurrentPostType:a,getCurrentPostId:l}=i(T);return{postType:a(),postId:l()}},[]);return(0,Kc.jsx)(XR.__experimentalBlockPatternsList,{blockPatterns:e,onClickPattern:(i,a)=>{r("postType",o,n,{blocks:a,content:({blocks:l=[]})=>(0,wne.__unstableSerializeAndClean)(l)}),t()}})}function t4e({onClose:e}){let[t,r]=(0,wg.useState)(!0),{set:o}=(0,kd.useDispatch)(b8.store),n=$Fe();if(!(n.length>0))return null;function a(){e(),o("core","enableChoosePatternModal",t)}return(0,Kc.jsxs)(Wm.Modal,{className:"editor-start-page-options__modal",title:(0,y8.__)("Choose a pattern"),isFullScreen:!0,onRequestClose:a,children:[(0,Kc.jsx)("div",{className:"editor-start-page-options__modal-content",children:(0,Kc.jsx)(e4e,{blockPatterns:n,onChoosePattern:a})}),(0,Kc.jsx)(Wm.Flex,{className:"editor-start-page-options__modal__actions",justify:"flex-start",expanded:!1,children:(0,Kc.jsx)(Wm.FlexItem,{children:(0,Kc.jsx)(Wm.CheckboxControl,{checked:t,label:(0,y8.__)("Always show starter patterns for new pages"),onChange:l=>{r(l)}})})})]})}function Sne(){let[e,t]=(0,wg.useState)(!1),{isEditedPostDirty:r,isEditedPostEmpty:o}=(0,kd.useSelect)(T),{isModalActive:n}=(0,kd.useSelect)(Me),{enabled:i,postId:a}=(0,kd.useSelect)(l=>{let{getCurrentPostId:c,getCurrentPostType:u}=l(T),d=l(b8.store).get("core","enableChoosePatternModal"),f=u();return{postId:c(),enabled:d&&jr!==f&&Vt!==f&&Oo!==f}},[]);return(0,wg.useEffect)(()=>{let l=!r()&&o(),c=n("editor/preferences");!i||!l||c||t(!0)},[i,a,r,o,n]),e?(0,Kc.jsx)(t4e,{onClose:()=>t(!1)}):null}var Ine=s(H(),1),Zc=s(N(),1),eA=s(oa(),1),M1=s(U(),1);var qa=s(N(),1),xne=[{keyCombination:{modifier:"primary",character:"b"},description:(0,qa.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:(0,qa.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:(0,qa.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:(0,qa.__)("Remove a link.")},{keyCombination:{character:"[["},description:(0,qa.__)("Insert a link to a post or page.")},{keyCombination:{modifier:"primary",character:"u"},description:(0,qa.__)("Underline the selected text.")},{keyCombination:{modifier:"access",character:"d"},description:(0,qa.__)("Strikethrough the selected text.")},{keyCombination:{modifier:"access",character:"x"},description:(0,qa.__)("Make the selected text inline code.")},{keyCombination:{modifier:"access",character:"0"},aliases:[{modifier:"access",character:"7"}],description:(0,qa.__)("Convert the current heading to a paragraph.")},{keyCombination:{modifier:"access",character:"1-6"},description:(0,qa.__)("Convert the current paragraph or heading to a heading of level 1 to 6.")},{keyCombination:{modifier:"primaryShift",character:"SPACE"},description:(0,qa.__)("Add non breaking space.")}];var Tne=s(V(),1),QR=s(Wr(),1),Ka=s(x(),1);function Cne({keyCombination:e,forceAriaLabel:t}){let r=e.modifier?QR.displayShortcutList[e.modifier](e.character):e.character,o=e.modifier?QR.shortcutAriaLabel[e.modifier](e.character):e.character;return(0,Ka.jsx)("kbd",{className:"editor-keyboard-shortcut-help-modal__shortcut-key-combination","aria-label":t||o,children:(Array.isArray(r)?r:[r]).map((n,i)=>n==="+"?(0,Ka.jsx)(Tne.Fragment,{children:n},i):(0,Ka.jsx)("kbd",{className:"editor-keyboard-shortcut-help-modal__shortcut-key",children:n},i))})}function r4e({description:e,keyCombination:t,aliases:r=[],ariaLabel:o}){return(0,Ka.jsxs)(Ka.Fragment,{children:[(0,Ka.jsx)("div",{className:"editor-keyboard-shortcut-help-modal__shortcut-description",children:e}),(0,Ka.jsxs)("div",{className:"editor-keyboard-shortcut-help-modal__shortcut-term",children:[(0,Ka.jsx)(Cne,{keyCombination:t,forceAriaLabel:o}),r.map((n,i)=>(0,Ka.jsx)(Cne,{keyCombination:n,forceAriaLabel:o},i))]})]})}var JR=r4e;var Pne=s(U(),1),Ene=s(oa(),1);var kne=s(x(),1);function o4e({name:e}){let{keyCombination:t,description:r,aliases:o}=(0,Pne.useSelect)(n=>{let{getShortcutKeyCombination:i,getShortcutDescription:a,getShortcutAliases:l}=n(Ene.store);return{keyCombination:i(e),aliases:l(e),description:a(e)}},[e]);return t?(0,kne.jsx)(JR,{keyCombination:t,description:r,aliases:o}):null}var Rne=o4e;var jn=s(x(),1),Ane="editor/keyboard-shortcut-help",n4e=({shortcuts:e})=>(0,jn.jsx)("ul",{className:"editor-keyboard-shortcut-help-modal__shortcut-list",role:"list",children:e.map((t,r)=>(0,jn.jsx)("li",{className:"editor-keyboard-shortcut-help-modal__shortcut",children:typeof t=="string"?(0,jn.jsx)(Rne,{name:t}):(0,jn.jsx)(JR,{...t})},r))}),w8=({title:e,shortcuts:t,className:r})=>(0,jn.jsxs)("section",{className:K("editor-keyboard-shortcut-help-modal__section",r),children:[!!e&&(0,jn.jsx)("h2",{className:"editor-keyboard-shortcut-help-modal__section-title",children:e}),(0,jn.jsx)(n4e,{shortcuts:t})]}),$R=({title:e,categoryName:t,additionalShortcuts:r=[]})=>{let o=(0,M1.useSelect)(n=>n(eA.store).getCategoryShortcuts(t),[t]);return(0,jn.jsx)(w8,{title:e,shortcuts:o.concat(r)})};function i4e(){let e=(0,M1.useSelect)(n=>n(Me).isModalActive(Ane),[]),{openModal:t,closeModal:r}=(0,M1.useDispatch)(Me),o=()=>{e?r():t(Ane)};return(0,eA.useShortcut)("core/editor/keyboard-shortcuts",o),e?(0,jn.jsxs)(Ine.Modal,{className:"editor-keyboard-shortcut-help-modal",title:(0,Zc.__)("Keyboard shortcuts"),closeButtonLabel:(0,Zc.__)("Close"),onRequestClose:o,children:[(0,jn.jsx)(w8,{className:"editor-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/editor/keyboard-shortcuts"]}),(0,jn.jsx)($R,{title:(0,Zc.__)("Global shortcuts"),categoryName:"global"}),(0,jn.jsx)($R,{title:(0,Zc.__)("Selection shortcuts"),categoryName:"selection"}),(0,jn.jsx)($R,{title:(0,Zc.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:(0,Zc.__)("Change the block type after adding a new paragraph."),ariaLabel:(0,Zc.__)("Forward-slash")}]}),(0,jn.jsx)(w8,{title:(0,Zc.__)("Text formatting"),shortcuts:xne}),(0,jn.jsx)($R,{title:(0,Zc.__)("List View shortcuts"),categoryName:"list-view"})]}):null}var S8=i4e;var Ym=s(H(),1),F1=s(N(),1),Fb=s(V(),1),One=s(ce(),1),D1=s(U(),1),_8=s(lt(),1),Sg=s(Q(),1);var Xc=s(x(),1);function s4e(e,t=!1){return(0,D1.useSelect)(r=>{let{getEntityRecord:o,getDefaultTemplateId:n}=r(Sg.store),i=n({slug:e,is_custom:t,ignore_empty:!0});return i?o("postType",Vt,i)?.content?.raw:void 0},[e,t])}function a4e(e){let{slug:t,patterns:r}=(0,D1.useSelect)(i=>{let{getCurrentPostType:a,getCurrentPostId:l}=i(T),{getEntityRecord:c,getBlockPatterns:u}=i(Sg.store),d=l(),f=a();return{slug:c("postType",f,d).slug,patterns:u()}},[]),o=(0,D1.useSelect)(i=>i(Sg.store).getCurrentTheme().stylesheet);function n(i){return i.innerBlocks.find(a=>a.name==="core/template-part")&&(i.innerBlocks=i.innerBlocks.map(a=>(a.name==="core/template-part"&&a.attributes.theme===void 0&&(a.attributes.theme=o),a))),i.name==="core/template-part"&&i.attributes.theme===void 0&&(i.attributes.theme=o),i}return(0,Fb.useMemo)(()=>[{name:"fallback",blocks:(0,_8.parse)(e),title:(0,F1.__)("Fallback content")},...r.filter(i=>Array.isArray(i.templateTypes)&&i.templateTypes.some(a=>t.startsWith(a))).map(i=>({...i,blocks:(0,_8.parse)(i.content).map(a=>n(a))}))],[e,t,r])}function l4e({fallbackContent:e,onChoosePattern:t,postType:r}){let[,,o]=(0,Sg.useEntityBlockEditor)("postType",r),n=a4e(e);return(0,Xc.jsx)(One.__experimentalBlockPatternsList,{blockPatterns:n,onClickPattern:(i,a)=>{o(a,{selection:void 0}),t()}})}function c4e({slug:e,isCustom:t,onClose:r,postType:o}){let n=s4e(e,t);return n?(0,Xc.jsxs)(Ym.Modal,{className:"editor-start-template-options__modal",title:(0,F1.__)("Choose a pattern"),closeLabel:(0,F1.__)("Cancel"),focusOnMount:"firstElement",onRequestClose:r,isFullScreen:!0,children:[(0,Xc.jsx)("div",{className:"editor-start-template-options__modal-content",children:(0,Xc.jsx)(l4e,{fallbackContent:n,slug:e,isCustom:t,postType:o,onChoosePattern:()=>{r()}})}),(0,Xc.jsx)(Ym.Flex,{className:"editor-start-template-options__modal__actions",justify:"flex-end",expanded:!1,children:(0,Xc.jsx)(Ym.FlexItem,{children:(0,Xc.jsx)(Ym.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:r,children:(0,F1.__)("Skip")})})})]}):null}function Nne(){let[e,t]=(0,Fb.useState)(!1),{shouldOpenModal:r,slug:o,isCustom:n,postType:i,postId:a}=(0,D1.useSelect)(l=>{let{getCurrentPostType:c,getCurrentPostId:u}=l(T),d=c(),f=u(),{getEditedEntityRecord:m,hasEditsForEntityRecord:h}=l(Sg.store),g=m("postType",d,f);return{shouldOpenModal:!h("postType",d,f)&&g.content===""&&Vt===d,slug:g.slug,isCustom:g.is_custom,postType:d,postId:f}},[]);return(0,Fb.useEffect)(()=>{t(!1)},[i,a]),!r||e?null:(0,Xc.jsx)(c4e,{slug:o,isCustom:n,postType:i,onClose:()=>t(!0)})}var qm=s(oa(),1),Km=s(U(),1);var Mne=s(ce(),1);function _g(){let e=(0,Km.useSelect)(v=>{let{richEditingEnabled:y,codeEditingEnabled:b}=v(T).getEditorSettings();return!y||!b},[]),{getBlockSelectionStart:t}=(0,Km.useSelect)(Mne.store),{getActiveComplementaryArea:r}=(0,Km.useSelect)(Me),{enableComplementaryArea:o,disableComplementaryArea:n}=(0,Km.useDispatch)(Me),{redo:i,undo:a,savePost:l,setIsListViewOpened:c,switchEditorMode:u,toggleDistractionFree:d}=(0,Km.useDispatch)(T),{isEditedPostDirty:f,isPostSavingLocked:m,isListViewOpened:h,getEditorMode:g}=(0,Km.useSelect)(T);return(0,qm.useShortcut)("core/editor/toggle-mode",()=>{u(g()==="visual"?"text":"visual")},{isDisabled:e}),(0,qm.useShortcut)("core/editor/toggle-distraction-free",()=>{d()}),(0,qm.useShortcut)("core/editor/undo",v=>{a(),v.preventDefault()}),(0,qm.useShortcut)("core/editor/redo",v=>{i(),v.preventDefault()}),(0,qm.useShortcut)("core/editor/save",v=>{v.preventDefault(),!m()&&f()&&l()}),(0,qm.useShortcut)("core/editor/toggle-list-view",v=>{h()||(v.preventDefault(),c(!0))}),(0,qm.useShortcut)("core/editor/toggle-sidebar",v=>{if(v.preventDefault(),["edit-post/document","edit-post/block"].includes(r("core")))n("core");else{let b=t()?"edit-post/block":"edit-post/document";o("core",b)}}),null}var Wne=s(U(),1),oA=s(ce(),1);var L1=s(U(),1),tA=s(ce(),1),Fne=s(Q(),1),rA=s(H(),1),Qc=s(N(),1),Dne=s(St(),1),Lne=s(V(),1),xg=s(x(),1);function Bne({clientId:e,onClose:t}){let[r,o]=(0,Lne.useState)(!1),{getBlocks:n}=(0,L1.useSelect)(tA.store),{replaceBlocks:i}=(0,L1.useDispatch)(tA.store),{canRemove:a,templatePartTitle:l}=(0,L1.useSelect)(d=>{let{canRemoveBlock:f,getBlock:m}=d(tA.store),{getEntityRecord:h,getCurrentTheme:g}=d(Fne.store),v=m(e),{slug:y,theme:b}=v?.attributes??{},S=b||g()?.stylesheet,w=S&&y?`${S}//${y}`:null,_=w?h("postType","wp_template_part",w):null;return{canRemove:f(e),templatePartTitle:_?.title?.rendered?(0,Dne.decodeEntities)(_.title.rendered):null}},[e]);if(!a)return null;let c=l?(0,Qc.sprintf)((0,Qc.__)("Detach %s?"),l):(0,Qc.__)("Detach template part?"),u=l?(0,Qc.sprintf)((0,Qc.__)("The blocks will be separated from the original template part and will be fully editable. Future changes to the %s template part will not apply here."),l):(0,Qc.__)("The blocks will be separated from the original template part and will be fully editable. Future changes to the template part will not apply here.");return(0,xg.jsxs)(xg.Fragment,{children:[(0,xg.jsx)(rA.MenuItem,{onClick:()=>o(!0),children:(0,Qc.__)("Detach")}),(0,xg.jsx)(rA.__experimentalConfirmDialog,{isOpen:r,onConfirm:()=>{i(e,n(e)),t()},onCancel:()=>o(!1),confirmButtonText:(0,Qc.__)("Detach"),size:"medium",title:c,__experimentalHideHeader:!1,children:u})]})}var B1=s(U(),1),x8=s(ce(),1),Vne=s(H(),1),jne=s(lt(),1),C8=s(N(),1),zne=s(V(),1),Hne=s(wt(),1);var Une=s(Q(),1);var Cg=s(x(),1);function Gne({clientIds:e,blocks:t}){let[r,o]=(0,zne.useState)(!1),{replaceBlocks:n}=(0,B1.useDispatch)(x8.store),{createSuccessNotice:i}=(0,B1.useDispatch)(Hne.store),{isBlockBasedTheme:a,canCreate:l}=(0,B1.useSelect)(u=>({isBlockBasedTheme:u(Une.store).getCurrentTheme()?.is_block_theme,canCreate:u(x8.store).canInsertBlockType("core/template-part")}),[]);if(!a||!l)return null;let c=async u=>{n(e,(0,jne.createBlock)("core/template-part",{slug:u.slug,theme:u.theme})),i((0,C8.__)("Template part created."),{type:"snackbar"})};return(0,Cg.jsxs)(Cg.Fragment,{children:[(0,Cg.jsx)(Vne.MenuItem,{icon:$p,onClick:()=>{o(!0)},"aria-expanded":r,"aria-haspopup":"dialog",children:(0,C8.__)("Create template part")}),r&&(0,Cg.jsx)(Py,{closeModal:()=>{o(!1)},blocks:t,onCreate:c})]})}var V1=s(x(),1);function Yne(){return(0,V1.jsx)(oA.BlockSettingsMenuControls,{children:({selectedClientIds:e,onClose:t})=>(0,V1.jsx)(u4e,{clientIds:e,onClose:t})})}function u4e({clientIds:e,onClose:t}){let{blocks:r}=(0,Wne.useSelect)(o=>{let{getBlocksByClientId:n}=o(oA.store);return{blocks:n(e)}},[e]);return r.length===1&&r[0]?.name==="core/template-part"?(0,V1.jsx)(Bne,{clientId:e[0],onClose:t}):(0,V1.jsx)(Gne,{clientIds:e,blocks:r})}var Kne=s(ce(),1),Zne=s(V(),1);var qne=s(V(),1),nA=s(U(),1);function d4e({postType:e}){let{registerPostTypeSchema:t}=Y((0,nA.useDispatch)(T));(0,qne.useEffect)(()=>{t(e)},[t,e]);let{fields:r}=(0,nA.useSelect)(o=>{let{getEntityFields:n}=Y(o(T));return{fields:n("postType",e)}},[e]);return r}var Zm=d4e;var Xne=s(x(),1),{MediaEditorModal:f4e}=Y(xb);function m4e(e){if(e==null)return NaN;let[t,r,...o]=String(e).split("/").map(Number);return t<=0||r<=0||Number.isNaN(t)||Number.isNaN(r)||o.length?NaN:r?t/r:t}function p4e({name:e,ratio:t}={}){let r=m4e(t);return!e||!Number.isFinite(r)||r<=0?null:{label:e,value:r}}function Qne(){let e=Zm({postType:"attachment"}),[t,r,o]=(0,Kne.useSettings)("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),n=(0,Zne.useMemo)(()=>{if(!(Array.isArray(t)||Array.isArray(r)||typeof o=="boolean"))return;let l=[...o&&Array.isArray(t)?t:[],...Array.isArray(r)?r:[]].map(p4e).filter(Boolean);if(l.length||o===!1)return l},[t,r,o]);return(0,Xne.jsx)(f4e,{fields:e,aspectRatioPresets:n})}var Zt=s(x(),1),{ExperimentalBlockEditorProvider:h4e}=Y(Lb.privateApis),{PatternsMenuItems:g4e}=Y($ne.privateApis),j1=()=>{},v4e=["wp_block","wp_navigation","wp_template_part"];function y4e(e,t,r){let o=Qoe(),n=r==="template-locked"?"template":"post",[i,a,l]=(0,Ml.useEntityBlockEditor)("postType",e.type,{id:e.id}),[c,u,d]=(0,Ml.useEntityBlockEditor)("postType",t?.type,{id:t?.id}),f=(0,na.useMemo)(()=>{if(e.type==="wp_navigation")return[(0,eie.createBlock)("core/navigation",{ref:e.id,templateLock:!1})]},[e.type,e.id]),m=(0,na.useMemo)(()=>f||(n==="template"?c:i),[f,n,c,i]);return o!==null?[o,j1,j1]:!!t&&r==="template-locked"||e.type==="wp_navigation"?[m,j1,j1]:[m,n==="post"?a:u,n==="post"?l:d]}var P8=xK(({post:e,settings:t,recovery:r,initialEdits:o,children:n,BlockEditorProviderComponent:i=h4e,__unstableTemplate:a})=>{let l=!!a,{editorSettings:c,selection:u,isReady:d,mode:f,defaultMode:m,postTypeEntities:h,isInRevisionsMode:g,currentRevisionId:v}=(0,Db.useSelect)(G=>{let{getEditorSettings:q,getRenderingMode:Z,__unstableIsEditorReady:te,getDefaultRenderingMode:ie,isRevisionsMode:Se,getCurrentRevisionId:fe}=Y(G(T)),{getEntitiesConfig:X,getEntityRecordEdits:ee}=G(Ml.store),pe=Z(),ve=ie(e.type),Ie=ve==="template-locked"?l:ve!==void 0,et=ve!==void 0,it=ee("postType",e.type,e.id);return{editorSettings:q(),isReady:te(),mode:et?pe:void 0,defaultMode:Ie?ve:void 0,selection:it?.selection,postTypeEntities:e.type==="wp_template"?X("postType"):null,isInRevisionsMode:Se(),currentRevisionId:fe()}},[e.type,e.id,l]),y=l&&f!=="post-only",b=y?a:e,S=(0,na.useMemo)(()=>{let G={};if(e.type==="wp_template"){if(e.slug==="page")G.postType="page";else if(e.slug==="single")G.postType="post";else if(e.slug.split("-")[0]==="single"){let q=h?.map(te=>te.name)||[],Z=e.slug.match(`^single-(${q.join("|")})(?:-.+)?$`);Z&&(G.postType=Z[1])}}else(!v4e.includes(b.type)||y)&&(G.postId=e.id,G.postType=e.type);return{...G,templateSlug:b.type==="wp_template"?b.slug:void 0}},[y,e.id,e.type,e.slug,b.type,b.slug,h]),{id:w,type:_}=b,C=Eoe(c,_,w,f),[k,A,R]=y4e(e,a,f),{updatePostLock:I,setupEditor:B,updateEditorSettings:E,setCurrentTemplateId:P,setEditedPost:L,setRenderingMode:j}=Y((0,Db.useDispatch)(T)),{editEntityRecord:z}=(0,Db.useDispatch)(Ml.store),W=(0,na.useCallback)(G=>{z("postType",e.type,e.id,{selection:G},{undoIgnore:!0})},[z,e.type,e.id]),{createWarningNotice:O,removeNotice:M}=(0,Db.useDispatch)(Jne.store);return(0,na.useLayoutEffect)(()=>{r||(I(t.postLock),B(e,o,t.template),t.autosave&&O((0,T8.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:(0,T8.__)("View the autosave"),url:t.autosave.editLink}]}))},[]),(0,na.useEffect)(()=>(L(e.type,e.id),typeof window<"u"&&window.__experimentalTemplateActivate&&M("template-activate-notice"),()=>L(null,null)),[e.type,e.id,L,M]),(0,na.useEffect)(()=>{E(t)},[t,E]),(0,na.useEffect)(()=>{P(a?.id)},[a?.id,P]),(0,na.useEffect)(()=>{m&&j(m)},[m,j]),Foe(e.type,f),cne(),fne(),!d||!f?null:e.type===jr&&window?.__experimentalMediaEditor?(0,Zt.jsx)(Ml.EntityProvider,{kind:"root",type:"site",children:(0,Zt.jsxs)(Ml.EntityProvider,{kind:"postType",type:e.type,id:e.id,children:[n,!t.isPreviewMode&&(0,Zt.jsxs)(Zt.Fragment,{children:[(0,Zt.jsx)(_g,{}),(0,Zt.jsx)(S8,{})]})]})}):(0,Zt.jsx)(Ml.EntityProvider,{kind:"root",type:"site",children:(0,Zt.jsx)(Ml.EntityProvider,{kind:"postType",type:e.type,id:e.id,revisionId:v??void 0,children:(0,Zt.jsx)(Lb.BlockContextProvider,{value:S,children:(0,Zt.jsxs)(i,{value:k,onChange:R,onInput:A,selection:g?void 0:u,onChangeSelection:g?j1:W,settings:C,useSubRegistry:!1,children:[n,!t.isPreviewMode&&(0,Zt.jsxs)(Zt.Fragment,{children:[(0,Zt.jsx)(g4e,{}),(0,Zt.jsx)(Yne,{}),f==="template-locked"&&(0,Zt.jsx)(Aoe,{}),_==="wp_navigation"&&(0,Zt.jsx)(Ooe,{}),(0,Zt.jsx)(_g,{}),(0,Zt.jsx)(S8,{}),(0,Zt.jsx)(yne,{}),(0,Zt.jsx)(Sne,{}),(0,Zt.jsx)(Nne,{}),(0,Zt.jsx)(rne,{}),(0,Zt.jsx)(sne,{}),window?.__experimentalMediaEditorModal&&(0,Zt.jsx)(Qne,{})]})]})})})})});function E8(e){return(0,Zt.jsx)(P8,{...e,BlockEditorProviderComponent:Lb.BlockEditorProvider,children:e.children})}var tie=E8;var Kle=s(Q(),1),Zle=s(U(),1),l7=s(V(),1);var i0=s(H(),1),QA=s(lt(),1),jle=s(U(),1),zle=s(ce(),1),ip=s(V(),1),o7=s(we(),1);var k8=s(V(),1);var rie=s(V(),1),Eo=(0,rie.createContext)({user:{styles:{},settings:{}},base:{styles:{},settings:{}},merged:{styles:{},settings:{}},onChange:()=>{},fontLibraryEnabled:!1});var oie=s(x(),1);function z1({children:e,value:t,baseValue:r,onChange:o,fontLibraryEnabled:n}){let i=(0,k8.useMemo)(()=>fn(r,t),[r,t]),a=(0,k8.useMemo)(()=>({user:t,base:r,merged:i,onChange:o,fontLibraryEnabled:n}),[t,r,i,o,n]);return(0,oie.jsx)(Eo.Provider,{value:a,children:e})}var Kr=s(H(),1),Rg=s(N(),1);var Rie=s(U(),1),Aie=s(Q(),1);var nie=s(x(),1);function H1({className:e,...t}){return(0,nie.jsx)(Uo,{className:K(e,"global-styles-ui-icon-with-current-color"),...t})}var Xm=s(H(),1);var Tg=s(x(),1);function b4e({icon:e,children:t,...r}){return(0,Tg.jsxs)(Xm.__experimentalItem,{...r,children:[e&&(0,Tg.jsxs)(Xm.__experimentalHStack,{justify:"flex-start",children:[(0,Tg.jsx)(H1,{icon:e,size:24}),(0,Tg.jsx)(Xm.FlexItem,{children:t})]}),!e&&t]})}function qr(e){return(0,Tg.jsx)(Xm.Navigator.Button,{as:b4e,...e})}var gie=s(H(),1);var Pg=s(N(),1),vie=s(ce(),1);var R8=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},A8=function(e){return .2126*R8(e.r)+.7152*R8(e.g)+.0722*R8(e.b)};function iA(e){e.prototype.luminance=function(){return t=A8(this.rgba),(r=2)===void 0&&(r=0),o===void 0&&(o=Math.pow(10,r)),Math.round(o*t)/o+0;var t,r,o},e.prototype.contrast=function(t){t===void 0&&(t="#FFF");var r,o,n,i,a,l,c,u=t instanceof e?t:new e(t);return i=this.rgba,a=u.toRgb(),l=A8(i),c=A8(a),r=l>c?(l+.05)/(c+.05):(c+.05)/(l+.05),(o=2)===void 0&&(o=0),n===void 0&&(n=Math.pow(10,o)),Math.floor(n*r)/n+0},e.prototype.isReadable=function(t,r){return t===void 0&&(t="#FFF"),r===void 0&&(r={}),this.contrast(t)>=(l=(a=(o=r).size)===void 0?"normal":a,(i=(n=o.level)===void 0?"AA":n)==="AAA"&&l==="normal"?7:i==="AA"&&l==="large"?3:4.5);var o,n,i,a,l}}var Za=s(V(),1),fie=s(U(),1),mie=s(Q(),1),O8=s(N(),1);var ko=s(N(),1),iie={link:[{value:":link",label:(0,ko.__)("Link")},{value:":any-link",label:(0,ko.__)("Any Link")},{value:":visited",label:(0,ko.__)("Visited")},{value:":hover",label:(0,ko.__)("Hover")},{value:":focus",label:(0,ko.__)("Focus")},{value:":focus-visible",label:(0,ko.__)("Focus-visible")},{value:":active",label:(0,ko.__)("Active")}],button:[{value:":link",label:(0,ko.__)("Link")},{value:":any-link",label:(0,ko.__)("Any Link")},{value:":visited",label:(0,ko.__)("Visited")},{value:":hover",label:(0,ko.__)("Hover")},{value:":focus",label:(0,ko.__)("Focus")},{value:":focus-visible",label:(0,ko.__)("Focus-visible")},{value:":active",label:(0,ko.__)("Active")}]},sie={"core/button":[{value:":hover",label:(0,ko.__)("Hover")},{value:":focus",label:(0,ko.__)("Focus")},{value:":focus-visible",label:(0,ko.__)("Focus-visible")},{value:":active",label:(0,ko.__)("Active")}]},w4e=[{value:"tablet",label:(0,ko.__)("Tablet")},{value:"mobile",label:(0,ko.__)("Mobile")}];function lie(e){return sie[e]?sie[e]??[]:iie[e]?iie[e]:[]}function cie(){return w4e}function I8(e,t){if(!t?.length||typeof e!="object"||!e||!Object.keys(e).length)return e;for(let r in e)t.includes(r)?delete e[r]:typeof e[r]=="object"&&I8(e[r],t);return e}var sA=(e,t)=>{if(!e||!t?.length)return{};let r={};return Object.keys(e).forEach(o=>{if(t.includes(o))r[o]=e[o];else if(typeof e[o]=="object"){let n=sA(e[o],t);Object.keys(n).length&&(r[o]=n)}}),r};function U1(e,t){let r=sA(structuredClone(e),t);return hg(r,e)}function aie(e,t){if(!Array.isArray(e)||!t)return null;let o=t.replace("var(","").replace(")","")?.split("--").slice(-1)[0];return e.find(n=>n.slug===o)}function uie(e){let t=e?.settings?.typography?.fontFamilies?.theme,r=e?.settings?.typography?.fontFamilies?.custom,o=[];t&&r?o=[...t,...r]:t?o=t:r&&(o=r);let n=e?.styles?.typography?.fontFamily,i=aie(o,n),a=e?.styles?.elements?.heading?.typography?.fontFamily,l;return a?l=aie(o,e?.styles?.elements?.heading?.typography?.fontFamily):l=i,[i,l]}function die(e){return e?`is-style-${e}`:""}function aA(e,t){let r=new RegExp(`^${t}([\\d]+)$`);return e.reduce((n,i)=>{if(typeof i?.slug=="string"){let a=i?.slug.match(r);if(a){let l=parseInt(a[1],10);if(l>n)return l}}return n},0)+1}Ik([iA]);function Be(e,t,r="merged",o=!0,n){let{user:i,base:a,merged:l,onChange:c}=(0,Za.useContext)(Eo),u=n?.split(".").filter(Boolean)??[],d=u.find(y=>y.startsWith(":")),f=u.filter(y=>!y.startsWith(":")).join("."),m=[e,f].filter(Boolean).join("."),h=l;r==="base"?h=a:r==="user"&&(h=i);let g=(0,Za.useMemo)(()=>{let y=Tb(h,m,t,o);return d?y?.[d]??{}:y},[h,m,t,o,d]),v=(0,Za.useCallback)(y=>{let b=y;d&&(b={...Tb(i,m,t,!1),[d]:y});let S=x1(i,m,b,t);c(S)},[i,c,m,t,d]);return[g,v]}function Te(e,t,r="merged"){let{user:o,base:n,merged:i,onChange:a}=(0,Za.useContext)(Eo),l=i;r==="base"?l=n:r==="user"&&(l=o);let c=(0,Za.useMemo)(()=>pg(l,e,t),[l,e,t]),u=(0,Za.useCallback)(d=>{let f=w1(o,e,d,t);a(f)},[o,a,e,t]);return[c,u]}var S4e=[];function _4e({title:e,settings:t,styles:r}){return e===(0,O8.__)("Default")||Object.keys(t||{}).length>0||Object.keys(r||{}).length>0}function lA(e=[]){let{variationsFromTheme:t}=(0,fie.useSelect)(o=>({variationsFromTheme:o(mie.store).__experimentalGetCurrentThemeGlobalStylesVariations?.()||S4e}),[]),{user:r}=(0,Za.useContext)(Eo);return(0,Za.useMemo)(()=>{let o=structuredClone(r),n=I8(o,e);n.title=(0,O8.__)("Default");let i=t.filter(l=>U1(l,e)).map(l=>fn(n,l)),a=[n,...i];return a?.length?a.filter(_4e):[]},[e,r,t])}function pie(e){let[t,r]=Te("color.palette.theme",e),o=(0,Za.useCallback)(()=>{if(!t||!t.length)return;let n=Math.floor(Math.random()*225),i=t.map(a=>{let{color:l}=a,c=no(l).rotate(n).toHex();return{...a,color:c}});r(i)},[t,r]);return window.__experimentalEnableColorRandomizer?[o]:[]}var hie=s(th(),1),{lock:g2t,unlock:gt}=(0,hie.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/global-styles-ui");var Fl=s(x(),1),{useHasDimensionsPanel:x4e,useHasTypographyPanel:C4e,useHasColorPanel:T4e,useSettingsForBlockElement:P4e,useHasBackgroundPanel:E4e}=gt(vie.privateApis);function k4e(){let[e]=Te(""),t=P4e(e),r=E4e(e),o=C4e(t),n=T4e(t),i=!0,l=x4e(t);return(0,Fl.jsx)(Fl.Fragment,{children:(0,Fl.jsxs)(gie.__experimentalItemGroup,{children:[o&&(0,Fl.jsx)(qr,{icon:xF,path:"/typography",children:(0,Pg.__)("Typography")}),n&&(0,Fl.jsx)(qr,{icon:tM,path:"/colors",children:(0,Pg.__)("Colors")}),r&&(0,Fl.jsx)(qr,{icon:k6,path:"/background","aria-label":(0,Pg.__)("Background styles"),children:(0,Pg.__)("Background")}),i&&(0,Fl.jsx)(qr,{icon:wS,path:"/shadows",children:(0,Pg.__)("Shadows")}),l&&(0,Fl.jsx)(qr,{icon:bl,path:"/layout",children:(0,Pg.__)("Layout")})]})})}var yie=k4e;var Jc=s(H(),1);function Bb(){let[e="black"]=Be("color.text"),[t="white"]=Be("color.background"),[r=e]=Be("elements.h1.color.text"),[o=r]=Be("elements.link.color.text"),[n=o]=Be("elements.button.color.background"),[i]=Te("color.palette.core")||[],[a]=Te("color.palette.theme")||[],[l]=Te("color.palette.custom")||[],c=(a??[]).concat(l??[]).concat(i??[]),u=c.filter(({color:m})=>m===e),d=c.filter(({color:m})=>m===n),f=u.concat(d).concat(c).filter(({color:m})=>m!==t).slice(0,2);return{paletteColors:c,highlightedColors:f}}var Sie=s(V(),1),_ie=s(H(),1),M8=s(N(),1);function R4e(e,t){return t.length===0?null:(t.sort((r,o)=>Math.abs(e-r)-Math.abs(e-o)),t[0])}function A4e(e){let t=[];return e.forEach(r=>{let o=String(r.fontWeight).split(" ");if(o.length===2){let n=parseInt(o[0]),i=parseInt(o[1]);for(let a=n;a<=i;a+=100)t.push(a)}else o.length===1&&t.push(parseInt(o[0]))}),t}function bie(e){let t=/^(?!generic\([ a-zA-Z\-]+\)$)(?!^[a-zA-Z\-]+$).+/,r=e.trim(),o=n=>(n=n.trim(),n.match(t)?(n=n.replace(/^["']|["']$/g,""),`"${n}"`):n);return r.includes(",")?r.split(",").map(o).filter(n=>n!=="").join(", "):o(r)}function N8(e){if(!e)return"";let t=e.trim();return t.includes(",")&&(t=(t.split(",").find(r=>r.trim()!=="")??"").trim()),t=t.replace(/^["']|["']$/g,""),window.navigator.userAgent.toLowerCase().includes("firefox")&&(t=`"${t}"`),t}function Eg(e){let t={fontFamily:bie(e.fontFamily)};if(!("fontFace"in e)||!Array.isArray(e.fontFace))return t.fontWeight="400",t.fontStyle="normal",t;if(e.fontFace){let r=e.fontFace.filter(o=>o?.fontStyle&&o.fontStyle.toLowerCase()==="normal");if(r.length>0){t.fontStyle="normal";let o=A4e(r),n=R4e(400,o);t.fontWeight=String(n)||"400"}else t.fontStyle=e.fontFace.length&&e.fontFace[0].fontStyle||"normal",t.fontWeight=e.fontFace.length&&String(e.fontFace[0].fontWeight)||"400"}return t}function wie(e){return{fontFamily:bie(e.fontFamily),fontStyle:e.fontStyle||"normal",fontWeight:e.fontWeight||"400"}}var G1=s(x(),1);function cA({fontSize:e,variation:t}){let{base:r}=(0,Sie.useContext)(Eo),o=r;t&&(o={...r,...t});let[n]=Be("color.text"),[i,a]=uie(o),l=i?Eg(i):{},c=a?Eg(a):{};return n&&(l.color=n,c.color=n),e&&(l.fontSize=e,c.fontSize=e),(0,G1.jsxs)(_ie.__unstableMotion.div,{animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"},style:{textAlign:"center",lineHeight:1},children:[(0,G1.jsx)("span",{style:c,children:(0,M8._x)("A","Uppercase letter A")}),(0,G1.jsx)("span",{style:l,children:(0,M8._x)("a","Lowercase letter A")})]})}var xie=s(H(),1);var Cie=s(x(),1);function Tie({normalizedColorSwatchSize:e,ratio:t}){let{highlightedColors:r}=Bb(),o=e*t;return r.map(({slug:n,color:i},a)=>(0,Cie.jsx)(xie.__unstableMotion.div,{style:{height:o,width:o,background:i,borderRadius:o/2},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:a===1?.2:.1}},`${n}-${a}`))}var kie=s(H(),1),Vb=s(we(),1),kg=s(V(),1);var Qm=s(x(),1),Pie=248,Eie=152,I4e={leading:!0,trailing:!0};function O4e({children:e,label:t,isFocused:r,withHoverView:o}){let[n="white"]=Be("color.background"),[i]=Be("color.gradient"),a=(0,Vb.useReducedMotion)(),[l,c]=(0,kg.useState)(!1),[u,{width:d}]=(0,Vb.useResizeObserver)(),[f,m]=(0,kg.useState)(d),[h,g]=(0,kg.useState)(),v=(0,Vb.useThrottle)(m,250,I4e);(0,kg.useLayoutEffect)(()=>{d&&v(d)},[d,v]),(0,kg.useLayoutEffect)(()=>{let w=f?f/Pie:1,_=w-(h||0);(Math.abs(_)>.1||!h)&&g(w)},[f,h]);let y=d?d/Pie:1,b=h||y;return(0,Qm.jsxs)(Qm.Fragment,{children:[(0,Qm.jsx)("div",{style:{position:"relative"},children:u}),!!d&&(0,Qm.jsx)("div",{className:K("global-styles-ui-preview__wrapper",{"is-hoverable":o}),style:{height:Eie*b},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),tabIndex:-1,children:(0,Qm.jsx)(kie.__unstableMotion.div,{style:{height:Eie*b,width:"100%",background:i??n},initial:"start",animate:(l||r)&&!a&&t?"hover":"start",children:[].concat(e).map((w,_)=>w({ratio:b,key:_}))})})]})}var jb=O4e;var ys=s(x(),1),N4e={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},M4e={hover:{opacity:1},start:{opacity:.5}},F4e={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}};function D4e({label:e,isFocused:t,withHoverView:r,variation:o}){let[n]=Be("typography.fontWeight"),[i="serif"]=Be("typography.fontFamily"),[a=i]=Be("elements.h1.typography.fontFamily"),[l=n]=Be("elements.h1.typography.fontWeight"),[c="black"]=Be("color.text"),[u=c]=Be("elements.h1.color.text"),{paletteColors:d}=Bb();return(0,ys.jsxs)(jb,{label:e,isFocused:t,withHoverView:r,children:[({ratio:f,key:m})=>(0,ys.jsx)(Jc.__unstableMotion.div,{variants:N4e,style:{height:"100%",overflow:"hidden"},children:(0,ys.jsxs)(Jc.__experimentalHStack,{spacing:10*f,justify:"center",style:{height:"100%",overflow:"hidden"},children:[(0,ys.jsx)(cA,{fontSize:65*f,variation:o}),(0,ys.jsx)(Jc.__experimentalVStack,{spacing:4*f,children:(0,ys.jsx)(Tie,{normalizedColorSwatchSize:32,ratio:f})})]})},m),({key:f})=>(0,ys.jsx)(Jc.__unstableMotion.div,{variants:r?M4e:void 0,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1},children:(0,ys.jsx)(Jc.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"},children:d.slice(0,4).map(({color:m},h)=>(0,ys.jsx)("div",{style:{height:"100%",background:m,flexGrow:1}},h))})},f),({ratio:f,key:m})=>(0,ys.jsx)(Jc.__unstableMotion.div,{variants:F4e,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0},children:(0,ys.jsx)(Jc.__experimentalVStack,{spacing:3*f,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*f,boxSizing:"border-box"},children:e&&(0,ys.jsx)("div",{style:{fontSize:40*f,fontFamily:a,color:u,fontWeight:l,lineHeight:"1em",textAlign:"center"},children:e})})},m)]})}var uA=D4e;var co=s(x(),1);function L4e(){let e=(0,Rie.useSelect)(t=>{let{__experimentalGetCurrentThemeGlobalStylesVariations:r}=t(Aie.store);return!!r()?.length},[]);return(0,co.jsxs)(Kr.Card,{size:"small",isBorderless:!0,className:"global-styles-ui-screen-root",isRounded:!1,children:[(0,co.jsx)(Kr.CardBody,{children:(0,co.jsxs)(Kr.__experimentalVStack,{spacing:4,children:[(0,co.jsx)(Kr.Card,{className:"global-styles-ui-screen-root__active-style-tile",children:(0,co.jsx)(Kr.CardMedia,{className:"global-styles-ui-screen-root__active-style-tile-preview",children:(0,co.jsx)(uA,{})})}),e&&(0,co.jsx)(Kr.__experimentalItemGroup,{children:(0,co.jsx)(qr,{path:"/variations",children:(0,co.jsxs)(Kr.__experimentalHStack,{justify:"space-between",children:[(0,co.jsx)(Kr.FlexItem,{children:(0,Rg.__)("Browse styles")}),(0,co.jsx)(H1,{icon:(0,Rg.isRTL)()?tr:rr})]})})}),(0,co.jsx)(yie,{})]})}),(0,co.jsx)(Kr.CardDivider,{}),(0,co.jsxs)(Kr.CardBody,{children:[(0,co.jsx)(Kr.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:4,children:(0,Rg.__)("Customize the appearance of specific blocks for the whole site.")}),(0,co.jsx)(Kr.__experimentalItemGroup,{children:(0,co.jsx)(qr,{path:"/blocks",children:(0,co.jsxs)(Kr.__experimentalHStack,{justify:"space-between",children:[(0,co.jsx)(Kr.FlexItem,{children:(0,Rg.__)("Blocks")}),(0,co.jsx)(H1,{icon:(0,Rg.isRTL)()?tr:rr})]})})})]})]})}var Iie=L4e;var D8=s(lt(),1),$c=s(N(),1),Jm=s(H(),1),L8=s(U(),1),eu=s(V(),1),fA=s(ce(),1),Lie=s(we(),1),Bie=s(Wv(),1);var Oie=s(lt(),1),Nie=s(U(),1),Mie=s(H(),1);var F8=s(x(),1);function B4e(e,t){return e?.filter(r=>r.source==="block"||t.includes(r.name))||[]}function W1(e){let t=(0,Nie.useSelect)(n=>{let{getBlockStyles:i}=n(Oie.store);return i(e)},[e]),[r]=Be("variations",e),o=Object.keys(r??{});return B4e(t,o)}function Fie({name:e}){let t=W1(e);return(0,F8.jsx)(Mie.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map((r,o)=>r?.isDefault?null:(0,F8.jsx)(qr,{path:"/blocks/"+encodeURIComponent(e)+"/variations/"+encodeURIComponent(r.name),children:r.label},o))})}var zn=s(H(),1),dA=s(N(),1);var Die=s(ce(),1);var ia=s(x(),1),{StateControl:V4e}=gt(Die.privateApis);function Lt({title:e,description:t,onBack:r,viewportStates:o,pseudoStates:n,selectedViewport:i="default",selectedPseudoState:a="default",onChangeViewport:l,onChangePseudoState:c}){return(0,ia.jsx)(zn.__experimentalVStack,{spacing:0,children:(0,ia.jsx)(zn.__experimentalView,{children:(0,ia.jsx)(zn.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,ia.jsxs)(zn.__experimentalVStack,{spacing:2,children:[(0,ia.jsxs)(zn.__experimentalHStack,{spacing:2,alignment:"top",children:[(0,ia.jsx)(zn.Navigator.BackButton,{icon:(0,dA.isRTL)()?rr:tr,size:"small",label:(0,dA.__)("Back"),onClick:r}),(0,ia.jsx)(zn.__experimentalSpacer,{children:(0,ia.jsxs)(zn.__experimentalHStack,{justify:"space-between",alignment:"top",children:[(0,ia.jsx)(zn.__experimentalHeading,{className:"global-styles-ui-header",level:2,size:13,children:e}),(0,ia.jsx)(V4e,{viewportStates:o,pseudoStates:n,viewportValue:i,pseudoStateValue:a,onChangeViewport:l,onChangePseudoState:c})]})})]}),t&&(0,ia.jsx)(zn.__experimentalText,{className:"global-styles-ui-header__description",children:t})]})})})})}var Zi=s(x(),1),{useHasDimensionsPanel:j4e,useHasTypographyPanel:z4e,useHasBorderPanel:H4e,useSettingsForBlockElement:U4e,useHasColorPanel:G4e}=gt(fA.privateApis);function W4e(){let e=(0,L8.useSelect)(n=>n(D8.store).getBlockTypes(),[]),t=(n,i)=>{let{core:a,noncore:l}=n;return(i.name.startsWith("core/")?a:l).push(i),n},{core:r,noncore:o}=e.reduce(t,{core:[],noncore:[]});return[...r,...o]}function Y4e(e){let[t]=Te("",e),r=U4e(t,e),o=z4e(r),n=G4e(r),i=H4e(r),a=j4e(r),l=i||a,c=!!W1(e)?.length;return o||n||l||c}function q4e({block:e}){return Y4e(e.name)?(0,Zi.jsx)(qr,{path:"/blocks/"+encodeURIComponent(e.name),children:(0,Zi.jsxs)(Jm.__experimentalHStack,{justify:"flex-start",children:[(0,Zi.jsx)(fA.BlockIcon,{icon:e.icon}),(0,Zi.jsx)(Jm.FlexItem,{children:e.title})]})}):null}function K4e({filterValue:e}){let t=W4e(),r=(0,Lie.useDebounce)(Bie.speak,500),{isMatchingSearchTerm:o}=(0,L8.useSelect)(D8.store),n=e?t.filter(a=>o(a,e)):t,i=(0,eu.useRef)(null);return(0,eu.useEffect)(()=>{if(!e)return;let a=i.current?.childElementCount||0,l=(0,$c.sprintf)((0,$c._n)("%d result found.","%d results found.",a),a);r(l,"polite")},[e,r]),(0,Zi.jsx)("div",{ref:i,className:"global-styles-ui-block-types-item-list",role:"list",children:n.length===0?(0,Zi.jsx)(Jm.__experimentalText,{align:"center",as:"p",children:(0,$c.__)("No blocks found.")}):n.map(a=>(0,Zi.jsx)(q4e,{block:a},"menu-itemblock-"+a.name))})}var Z4e=(0,eu.memo)(K4e);function X4e(){let[e,t]=(0,eu.useState)(""),r=(0,eu.useDeferredValue)(e);return(0,Zi.jsxs)(Zi.Fragment,{children:[(0,Zi.jsx)(Lt,{title:(0,$c.__)("Blocks"),description:(0,$c.__)("Customize the appearance of specific blocks and for the whole site.")}),(0,Zi.jsx)(Jm.SearchControl,{className:"global-styles-ui-block-types-search",onChange:t,value:e,label:(0,$c.__)("Search"),placeholder:(0,$c.__)("Search")}),(0,Zi.jsx)(Z4e,{filterValue:r})]})}var Vie=X4e;var Wie=s(lt(),1),Yie=s(ce(),1),Dl=s(V(),1),qie=s(U(),1),Kie=s(Q(),1),Ag=s(H(),1),zb=s(N(),1);var jie=s(ce(),1),pA=s(lt(),1),zie=s(H(),1),B8=s(V(),1);var mA=s(x(),1),Q4e=({name:e,variation:t="",selectedState:r="default",stateStyles:o})=>{let n=(0,pA.getBlockType)(e)?.example,i=(0,B8.useMemo)(()=>{if(!n)return null;let m={...n,attributes:{...n.attributes,style:void 0,className:t?die(t):n.attributes?.className}};return(0,pA.getBlockFromExample)(e,m)},[e,n,t]),a=(0,B8.useMemo)(()=>r==="default"||!o?"":o8(o,e),[r,o,e]),l=n?.viewportWidth??500,c=144,d=235/l,f=d!==0&&d<1&&c?c/d:c;return n?(0,mA.jsx)(zie.__experimentalSpacer,{marginX:4,marginBottom:4,children:(0,mA.jsx)("div",{className:"global-styles-ui__block-preview-panel",style:{maxHeight:c,boxSizing:"initial"},children:(0,mA.jsx)(jie.BlockPreview,{blocks:i,viewportWidth:l,minHeight:c,additionalStyles:[{css:`
37 body{
38 padding: 24px;
39 min-height:${Math.round(f)}px;
40 display:flex;
41 align-items:center;
42 }
43 .is-root-container { width: 100%; }
44 ${a}
45 `}]})})}):null},Hie=Q4e;var Uie=s(H(),1),Gie=s(x(),1);function uo({children:e,level:t=2}){return(0,Gie.jsx)(Uie.__experimentalHeading,{className:"global-styles-ui-subtitle",level:t,children:e})}var Lo=s(x(),1),J4e={backgroundSize:"cover",backgroundPosition:"50% 50%"};function Y1(e){if(!e)return e;let t=e.color||e.width;if(!e.style&&t)return{...e,style:"solid"};if(!(e.style&&!t))return e}function $4e(e){return e&&((0,Ag.__experimentalHasSplitBorders)(e)?{top:Y1(e.top),right:Y1(e.right),bottom:Y1(e.bottom),left:Y1(e.left)}:Y1(e))}var{useHasDimensionsPanel:eDe,useHasTypographyPanel:tDe,useHasBorderPanel:rDe,useSettingsForBlockElement:oDe,useHasColorPanel:nDe,useHasFiltersPanel:iDe,useHasImageSettingsPanel:sDe,useHasBackgroundPanel:aDe,BackgroundPanel:lDe,BorderPanel:cDe,ColorPanel:uDe,TypographyPanel:dDe,DimensionsPanel:fDe,FiltersPanel:mDe,ImageSettingsPanel:pDe,AdvancedPanel:hDe}=gt(Yie.privateApis);function gDe({name:e,variation:t}){let{user:r,onChange:o}=(0,Dl.useContext)(Eo),n=[];t&&(n=["variations",t].concat(n));let i=n.join("."),[a,l]=(0,Dl.useState)("default"),[c,u]=(0,Dl.useState)("default"),d=(0,Dl.useMemo)(()=>cie(),[]),f=(0,Dl.useMemo)(()=>lie(e),[e]),m=[a,c].filter(X=>X!=="default").join("."),h=m.length>0,[g,v]=Be(i,e,"user",!1,h?m:void 0),[y]=Be(i,e,"merged",!1,h?m:void 0),[b]=Te("",e,"user"),[S,w]=Te("",e),_=oDe(S,e),C=(0,Wie.getBlockType)(e),k=!1;_?.spacing?.blockGap&&C?.supports?.spacing?.blockGap&&(C?.supports?.spacing?.__experimentalSkipSerialization===!0||C?.supports?.spacing?.__experimentalSkipSerialization?.some?.(X=>X==="blockGap"))&&(k=!0);let A=!1;_?.dimensions?.aspectRatio&&e==="core/group"&&(A=!0);let R=(0,Dl.useMemo)(()=>{let X=structuredClone(_);return k&&(X.spacing.blockGap=!1),A&&(X.dimensions.aspectRatio=!1),X},[_,k,A]),I=W1(e),B=aDe(R),E=tDe(R),P=nDe(R),L=rDe(R),j=eDe(R),W=iDe(R)&&a==="default",O=sDe(e,b,R),M=!!I?.length&&!t,{canEditCSS:D}=(0,qie.useSelect)(X=>{let{getEntityRecord:ee,__experimentalGetCurrentGlobalStylesId:pe}=X(Kie.store),ve=pe();return{canEditCSS:!!(ve?ee("root","globalStyles",ve):void 0)?._links?.["wp:action-edit-css"]}},[]),G=t?I.find(X=>X.name===t):null,q=(0,Dl.useMemo)(()=>({...y,layout:R.layout}),[y,R.layout]),Z=(0,Dl.useMemo)(()=>({...g,layout:b.layout}),[g,b.layout]),te=X=>{let ee={...X};delete ee.layout,v(ee),X.layout!==b.layout&&w({...b,layout:X.layout})},ie=X=>{w(X===void 0?{...S,lightbox:void 0}:{...S,lightbox:{...S.lightbox,...X}})},Se=X=>{let{settings:ee,...pe}=X;if(ee?.typography){let ve=[i,m].filter(Boolean).join("."),Ie=x1(r,ve,pe,e);Ie=w1(Ie,"typography",{...b.typography,...ee.typography},e),o(Ie)}else v(pe)},fe=X=>{if(!X?.border){v(X);return}let{radius:ee,...pe}=X.border,ve=$4e(pe),Ie=(0,Ag.__experimentalHasSplitBorders)(ve)?{color:null,style:null,width:null,...ve}:{top:ve,right:ve,bottom:ve,left:ve};v({...X,border:{...Ie,radius:ee}})};return(0,Lo.jsxs)(Lo.Fragment,{children:[(0,Lo.jsx)(Lt,{title:t?G?.label:C?.title,viewportStates:d,pseudoStates:f,selectedViewport:a,selectedPseudoState:c,onChangeViewport:l,onChangePseudoState:u}),(0,Lo.jsx)(Hie,{name:e,variation:t,selectedState:h?m:"default",stateStyles:h?g:void 0}),M&&(0,Lo.jsx)("div",{className:"global-styles-ui-screen-variations",children:(0,Lo.jsxs)(Ag.__experimentalVStack,{spacing:3,children:[(0,Lo.jsx)(uo,{children:(0,zb.__)("Style Variations")}),(0,Lo.jsx)(Fie,{name:e})]})}),P&&(0,Lo.jsx)(uDe,{inheritedValue:y,value:g,onChange:v,settings:R}),B&&(0,Lo.jsx)(lDe,{inheritedValue:y,value:g,onChange:v,settings:R,defaultValues:J4e}),E&&(0,Lo.jsx)(dDe,{inheritedValue:y,value:g,onChange:Se,settings:R,isGlobalStyles:!h}),j&&(0,Lo.jsx)(fDe,{inheritedValue:q,value:Z,onChange:te,settings:R,includeLayoutControls:!0}),L&&(0,Lo.jsx)(cDe,{inheritedValue:y,value:g,onChange:fe,settings:R}),W&&(0,Lo.jsx)(mDe,{inheritedValue:q,value:Z,onChange:v,settings:R,includeLayoutControls:!0}),O&&!h&&(0,Lo.jsx)(pDe,{onChange:ie,value:b,inheritedValue:R}),D&&(0,Lo.jsx)(Ag.PanelBody,{title:(0,zb.__)("Advanced"),initialOpen:!1,children:(0,Lo.jsx)(hDe,{value:g,onChange:v,inheritedValue:y,help:(0,zb.sprintf)((0,zb.__)("Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value."),C?.title)})})]})}var V8=gDe;var VA=s(N(),1),lae=s(H(),1),cae=s(V(),1);var Zie=s(H(),1);var Xie=s(x(),1);function $m({children:e,className:t}){return(0,Xie.jsx)(Zie.__experimentalSpacer,{className:K("global-styles-ui-screen-body",t),padding:4,children:e})}var ep=s(N(),1),Rd=s(H(),1);var bs=s(x(),1);function q1({parentMenu:e,element:t,label:r}){let o=t==="text"||!t?"":`elements.${t}.`,n=t==="link"?{textDecoration:"underline"}:{},[i]=Be(o+"typography.fontFamily"),[a]=Be(o+"typography.fontStyle"),[l]=Be(o+"typography.fontWeight"),[c]=Be(o+"color.background"),[u]=Be("color.background"),[d]=Be(o+"color.gradient"),[f]=Be(o+"color.text");return(0,bs.jsx)(qr,{path:e+"/typography/"+t,children:(0,bs.jsxs)(Rd.__experimentalHStack,{justify:"flex-start",children:[(0,bs.jsx)(Rd.FlexItem,{className:"global-styles-ui-screen-typography__indicator","aria-hidden":"true",style:{fontFamily:i??"serif",background:d??c??u,color:f,fontStyle:a,fontWeight:l,...n},children:(0,ep.__)("Aa")}),(0,bs.jsx)(Rd.FlexItem,{children:r})]})})}function vDe(){return(0,bs.jsxs)(Rd.__experimentalVStack,{spacing:3,children:[(0,bs.jsx)(uo,{level:3,children:(0,ep.__)("Elements")}),(0,bs.jsxs)(Rd.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:[(0,bs.jsx)(q1,{parentMenu:"",element:"text",label:(0,ep.__)("Text")}),(0,bs.jsx)(q1,{parentMenu:"",element:"link",label:(0,ep.__)("Links")}),(0,bs.jsx)(q1,{parentMenu:"",element:"heading",label:(0,ep.__)("Headings")}),(0,bs.jsx)(q1,{parentMenu:"",element:"caption",label:(0,ep.__)("Captions")}),(0,bs.jsx)(q1,{parentMenu:"",element:"button",label:(0,ep.__)("Buttons")})]})]})}var Qie=vDe;var vA=s(H(),1);var Jie=s(H(),1);var hA=s(x(),1),yDe=({variation:e,isFocused:t,withHoverView:r})=>(0,hA.jsx)(jb,{label:e.title,isFocused:t,withHoverView:r,children:({ratio:o,key:n})=>(0,hA.jsx)(Jie.__experimentalHStack,{spacing:10*o,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,hA.jsx)(cA,{variation:e,fontSize:85*o})},n)}),$ie=yDe;var ese=s(H(),1),Ig=s(V(),1),tse=s(Wr(),1),gA=s(N(),1);var K1=s(x(),1);function Hb({variation:e,children:t,isPill:r=!1,properties:o,showTooltip:n=!1}){let[i,a]=(0,Ig.useState)(!1),{base:l,user:c,onChange:u}=(0,Ig.useContext)(Eo),d=(0,Ig.useMemo)(()=>{let y=fn(l,e);return o&&(y=sA(y,o)),{user:e,base:l,merged:y,onChange:()=>{}}},[e,l,o]),f=()=>u(e),m=y=>{y.keyCode===tse.ENTER&&(y.preventDefault(),f())},h=(0,Ig.useMemo)(()=>hg(c,e),[c,e]),g=e?.title;e?.description&&(g=(0,gA.sprintf)((0,gA._x)("%1$s (%2$s)","variation label"),e?.title,e?.description));let v=(0,K1.jsx)("div",{className:K("global-styles-ui-variations_item",{"is-active":h}),role:"button",onClick:f,onKeyDown:m,tabIndex:0,"aria-label":g,"aria-current":h,onFocus:()=>a(!0),onBlur:()=>a(!1),children:(0,K1.jsx)("div",{className:K("global-styles-ui-variations_item-preview",{"is-pill":r}),children:t(i)})});return(0,K1.jsx)(Eo.Provider,{value:d,children:n?(0,K1.jsx)(ese.Tooltip,{text:e?.title,children:v}):v})}var Og=s(x(),1),rse=["typography"];function Ub({title:e,gap:t=2}){let r=lA(rse);return r?.length<=1?null:(0,Og.jsxs)(vA.__experimentalVStack,{spacing:3,children:[e&&(0,Og.jsx)(uo,{level:3,children:e}),(0,Og.jsx)(vA.__experimentalGrid,{columns:3,gap:t,className:"global-styles-ui-style-variations-container",children:r.map((o,n)=>(0,Og.jsx)(Hb,{variation:o,properties:rse,showTooltip:!0,children:()=>(0,Og.jsx)($ie,{variation:o})},n))})]})}var Bg=s(N(),1),Bl=s(H(),1);var iae=s(V(),1);var Id=s(V(),1),op=s(U(),1),rp=s(Q(),1),U8=s(N(),1);var j8=s(If(),1),ose=s(Q(),1),nse="/wp/v2/font-families";function ise(e){let{receiveEntityRecords:t}=e.dispatch(ose.store);t("postType","wp_font_family",[],void 0,!0)}async function sse(e,t){let o=await(0,j8.default)({path:nse,method:"POST",body:e});return ise(t),{id:o.id,...o.font_family_settings,fontFace:[]}}async function ase(e,t,r){let o={path:`${nse}/${e}/font-faces`,method:"POST",body:t},n=await(0,j8.default)(o);return ise(r),{id:n.id,...n.font_face_settings}}var use=s(H(),1);var Xa=s(N(),1),z8=["otf","ttf","woff","woff2"],lse={100:(0,Xa._x)("Thin","font weight"),200:(0,Xa._x)("Extra-light","font weight"),300:(0,Xa._x)("Light","font weight"),400:(0,Xa._x)("Normal","font weight"),500:(0,Xa._x)("Medium","font weight"),600:(0,Xa._x)("Semi-bold","font weight"),700:(0,Xa._x)("Bold","font weight"),800:(0,Xa._x)("Extra-bold","font weight"),900:(0,Xa._x)("Black","font weight")},cse={normal:(0,Xa._x)("Normal","font style"),italic:(0,Xa._x)("Italic","font style")};var{File:dse}=window,{kebabCase:bDe}=gt(use.privateApis);function Ad(e,t={}){return!e.name&&(e.fontFamily||e.slug)&&(e.name=e.fontFamily||e.slug),{...e,...t}}function wDe(e){return typeof e!="string"?!1:e!==decodeURIComponent(e)}function yA(e){let t=lse[e.fontWeight??""]||e.fontWeight,r=e.fontStyle==="normal"?"":cse[e.fontStyle??""]||e.fontStyle;return`${t} ${r}`}function SDe(e=[],t=[]){let r=new Map;for(let o of e)r.set(`${o.fontWeight}${o.fontStyle}`,o);for(let o of t)r.set(`${o.fontWeight}${o.fontStyle}`,o);return Array.from(r.values())}function fse(e=[],t=[]){let r=new Map;for(let o of e)r.set(o.slug,{...o});for(let o of t)if(r.has(o.slug)){let{fontFace:n,...i}=o,a=r.get(o.slug),l=SDe(a.fontFace,n);r.set(o.slug,{...i,fontFace:l})}else r.set(o.slug,{...o});return Array.from(r.values())}async function tp(e,t,r="all"){let o;if(typeof t=="string")o=`url(${t})`;else if(t instanceof dse)o=await t.arrayBuffer();else return;let i=await new window.FontFace(N8(e.fontFamily),o,{style:e.fontStyle,weight:String(e.fontWeight)}).load();if((r==="document"||r==="all")&&document.fonts.add(i),r==="iframe"||r==="all"){let a=document.querySelector('iframe[name="editor-canvas"]');a?.contentDocument&&a.contentDocument.fonts.add(i)}}function Z1(e,t="all"){let r=o=>{o.forEach(n=>{n.family===N8(e?.fontFamily)&&n.weight===e?.fontWeight&&n.style===e?.fontStyle&&o.delete(n)})};if((t==="document"||t==="all")&&r(document.fonts),t==="iframe"||t==="all"){let o=document.querySelector('iframe[name="editor-canvas"]');o?.contentDocument&&r(o.contentDocument.fonts)}}function Gb(e){if(!e)return;let t;if(Array.isArray(e)?t=e[0]:t=e,!t.startsWith("file:."))return wDe(t)||(t=encodeURI(t)),t}function mse(e){let t=new FormData,{fontFace:r,category:o,...n}=e,i={...n,slug:bDe(e.slug)};return t.append("font_family_settings",JSON.stringify(i)),t}function pse(e){return(e?.fontFace??[]).map((r,o)=>{let n={...r},i=new FormData;if(n.file){let a=Array.isArray(n.file)?n.file:[n.file],l=[];a.forEach((c,u)=>{let d=`file-${o}-${u}`;i.append(d,c,c.name),l.push(d)}),n.src=l.length===1?l[0]:l,delete n.file,i.append("font_face_settings",JSON.stringify(n))}else i.append("font_face_settings",JSON.stringify(n));return i})}async function hse(e,t,r){let o=[];for(let i of t)try{let a=await ase(e,i,r);o.push({status:"fulfilled",value:a})}catch(a){o.push({status:"rejected",reason:a})}let n={errors:[],successes:[]};return o.forEach((i,a)=>{if(i.status==="fulfilled"&&i.value){let l=i.value;n.successes.push(l)}else i.reason&&n.errors.push({data:t[a],message:i.reason.message})}),n}async function gse(e){e=Array.isArray(e)?e:[e];let t=await Promise.all(e.map(async r=>fetch(new Request(r)).then(o=>{if(!o.ok)throw new Error(`Error downloading font face asset from ${r}. Server responded with status: ${o.status}`);return o.blob()}).then(o=>{let n=r.split("/").pop();return new dse([o],n,{type:o.type})})));return t.length===1?t[0]:t}function H8(e,t){return t.findIndex(r=>r.fontWeight===e.fontWeight&&r.fontStyle===e.fontStyle)!==-1}function vse(e,t,r){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let o=t.pop(),n=e;for(let i of t){let a=n[i];n=n[i]=Array.isArray(a)?[...a]:{...a}}return n[o]=r,e}function bA(e,t,r=[]){let o=c=>c.slug===e.slug,n=c=>c.find(o),i=c=>c?r.filter(u=>!o(u)):[...r,e],a=c=>{let u=f=>f.fontWeight===t.fontWeight&&f.fontStyle===t.fontStyle;if(!c)return[...r,{...e,fontFace:[t]}];let d=c.fontFace||[];return d.find(u)?d=d.filter(f=>!u(f)):d=[...d,t],d.length===0?r.filter(f=>!o(f)):r.map(f=>o(f)?{...f,fontFace:d}:f)},l=n(r);return t?a(l):i(l)}var yse=s(x(),1),Hn=(0,Id.createContext)({});Hn.displayName="FontLibraryContext";function _De({children:e}){let t=(0,op.useRegistry)(),{saveEntityRecord:r,deleteEntityRecord:o}=(0,op.useDispatch)(rp.store),{globalStylesId:n}=(0,op.useSelect)(D=>{let{__experimentalGetCurrentGlobalStylesId:G}=D(rp.store);return{globalStylesId:G()}},[]),i=(0,rp.useEntityRecord)("root","globalStyles",n),[a,l]=(0,Id.useState)(!1),{records:c=[],isResolving:u}=(0,rp.useEntityRecords)("postType","wp_font_family",{_embed:!0}),d=(c||[]).map(D=>({id:D.id,...D.font_family_settings||{},fontFace:D?._embedded?.font_faces?.map(G=>G.font_face_settings)||[]}))||[],[f,m]=Te("typography.fontFamilies"),h=async D=>{if(!i.record)return;let G=i.record,q=vse(G??{},["settings","typography","fontFamilies"],D);await r("root","globalStyles",q)},[g,v]=(0,Id.useState)(""),[y,b]=(0,Id.useState)(void 0),S=f?.theme?f.theme.map(D=>Ad(D,{source:"theme"})).sort((D,G)=>D.name.localeCompare(G.name)):[],w=f?.custom?f.custom.map(D=>Ad(D,{source:"custom"})).sort((D,G)=>D.name.localeCompare(G.name)):[],_=d?d.map(D=>Ad(D,{source:"custom"})).sort((D,G)=>D.name.localeCompare(G.name)):[];(0,Id.useEffect)(()=>{g||b(void 0)},[g]);let C=D=>{if(!D){b(void 0);return}let q=(D.source==="theme"?S:_).find(Z=>Z.slug===D.slug);b({...q||D,source:D.source})},[k]=(0,Id.useState)(new Set),A=D=>D.reduce((q,Z)=>{let te=Z?.fontFace&&Z.fontFace?.length>0?Z?.fontFace.map(ie=>`${ie.fontStyle??""}${ie.fontWeight??""}`):["normal400"];return q[Z.slug]=te,q},{}),R=D=>A(D==="theme"?S:w),I=(D,G,q,Z)=>!G&&!q?!!R(Z)[D]:!!R(Z)[D]?.includes((G??"")+(q??"")),B=(D,G)=>R(G)[D]||[];async function E(D){l(!0);try{let G=[],q=[];for(let te of D){let ie=!1,Se=await(0,op.resolveSelect)(rp.store).getEntityRecords("postType","wp_font_family",{slug:te.slug,per_page:1,_embed:!0}),fe=Se&&Se.length>0?Se[0]:null,X=fe?{id:fe.id,...fe.font_family_settings,fontFace:(fe?._embedded?.font_faces??[]).map(Ie=>Ie.font_face_settings)||[]}:null;X||(ie=!0,X=await sse(mse(te),t));let ee=X.fontFace&&te.fontFace?X.fontFace.filter(Ie=>Ie&&te.fontFace&&H8(Ie,te.fontFace)):[];X.fontFace&&te.fontFace&&(te.fontFace=te.fontFace.filter(Ie=>!H8(Ie,X.fontFace)));let pe=[],ve=[];if(te?.fontFace?.length??!1){let Ie=await hse(X.id,pse(te),t);pe=Ie?.successes,ve=Ie?.errors}(pe?.length>0||ee?.length>0)&&(X.fontFace=[...pe],G.push(X)),X&&!te?.fontFace?.length&&G.push(X),ie&&(te?.fontFace?.length??0)>0&&pe?.length===0&&await o("postType","wp_font_family",X.id,{force:!0}),q=q.concat(ve)}let Z=q.reduce((te,ie)=>te.includes(ie.message)?te:[...te,ie.message],[]);if(G.length>0){let te=j(G);await h(te)}if(Z.length>0){let te=new Error((0,U8.__)("There was an error installing fonts."));throw te.installationErrors=Z,te}}finally{l(!1)}}async function P(D){if(!D?.id)throw new Error((0,U8.__)("Font family to uninstall is not defined."));try{await o("postType","wp_font_family",D.id,{force:!0});let G=L(D);return await h(G),{deleted:!0}}catch(G){throw console.error("There was an error uninstalling the font family:",G),G}}let L=D=>{let q=(f?.[D.source??""]??[]).filter(te=>te.slug!==D.slug),Z={...f,[D.source??""]:q};return m(Z),D.fontFace&&D.fontFace.forEach(te=>{Z1(te,"all")}),Z},j=D=>{let G=z(D),q={...f,custom:fse(f?.custom,G)};return m(q),W(G),q},z=D=>D.map(({id:G,fontFace:q,...Z})=>({...Z,...q&&q.length>0?{fontFace:q.map(({id:te,...ie})=>ie)}:{}})),W=D=>{D.forEach(G=>{G.fontFace&&G.fontFace.forEach(q=>{let Z=Gb(q?.src??"");Z&&tp(q,Z,"all")})})},O=(D,G)=>{let q=f?.[D.source??""]??[],Z=bA(D,G,q);m({...f,[D.source??""]:Z});let te=I(D.slug,G?.fontStyle??"",G?.fontWeight??"",D.source??"custom");if(G&&te)Z1(G,"all");else{let ie=Gb(G?.src??"");G&&ie&&tp(G,ie,"all")}},M=async D=>{if(!D.src)return;let G=Gb(D.src);!G||k.has(G)||(tp(D,G,"document"),k.add(G))};return(0,yse.jsx)(Hn.Provider,{value:{libraryFontSelected:y,handleSetLibraryFontSelected:C,fontFamilies:f??{},baseCustomFonts:_,isFontActivated:I,getFontFacesActivated:B,loadFontFaceAsset:M,installFonts:E,uninstallFontFamily:P,toggleActivateFont:O,getAvailableFontsOutline:A,modalTabOpen:g,setModalTabOpen:v,saveFontFamilies:h,isResolvingLibrary:u,isInstalling:a},children:e})}var wA=_De;var Kb=s(N(),1),DA=s(H(),1),LA=s(Q(),1),eae=s(U(),1);var at=s(H(),1),Q1=s(Q(),1),G8=s(U(),1),Mg=s(V(),1),Nr=s(N(),1);var Yb=s(N(),1),Qa=s(H(),1);var bse=s(H(),1),tu=s(V(),1);var SA=s(x(),1);function xDe(e){if(e.preview)return e.preview;if(e.src)return Array.isArray(e.src)?e.src[0]:e.src}function CDe(e){return"fontStyle"in e&&e.fontStyle||"fontWeight"in e&&e.fontWeight?e:"fontFace"in e&&e.fontFace&&e.fontFace.length?e.fontFace.find(t=>t.fontStyle==="normal"&&t.fontWeight==="400")||e.fontFace[0]:{fontStyle:"normal",fontWeight:"400",fontFamily:e.fontFamily}}function TDe({font:e,text:t}){let r=(0,tu.useRef)(null),o=CDe(e),n=Eg(e);t=t||("name"in e?e.name:"");let i=e.preview,[a,l]=(0,tu.useState)(!1),[c,u]=(0,tu.useState)(!1),{loadFontFaceAsset:d}=(0,tu.useContext)(Hn),f=i??xDe(o),m=f&&f.match(/\.(png|jpg|jpeg|gif|svg)$/i),h=wie(o),g={fontSize:"18px",lineHeight:1,opacity:c?"1":"0",...n,...h};return(0,tu.useEffect)(()=>{let v=new window.IntersectionObserver(([y])=>{l(y.isIntersecting)},{});return r.current&&v.observe(r.current),()=>v.disconnect()},[r]),(0,tu.useEffect)(()=>{(async()=>a&&(!m&&o.src&&await d(o),u(!0)))()},[o,a,d,m]),(0,SA.jsx)("div",{ref:r,children:m?(0,SA.jsx)("img",{src:f,loading:"lazy",alt:t,className:"font-library__font-variant_demo-image"}):(0,SA.jsx)(bse.__experimentalText,{style:g,className:"font-library__font-variant_demo-text",children:t})})}var Wb=TDe;var ru=s(x(),1);function PDe({font:e,onClick:t,variantsText:r,navigatorPath:o}){let n=e.fontFace?.length||1,i={cursor:t?"pointer":"default"},a=(0,Qa.useNavigator)();return(0,ru.jsx)(Qa.Button,{__next40pxDefaultSize:!0,onClick:()=>{t(),o&&a.goTo(o)},style:i,className:"font-library__font-card",children:(0,ru.jsxs)(Qa.Flex,{justify:"space-between",wrap:!1,children:[(0,ru.jsx)(Wb,{font:e}),(0,ru.jsxs)(Qa.Flex,{justify:"flex-end",children:[(0,ru.jsx)(Qa.FlexItem,{children:(0,ru.jsx)(Qa.__experimentalText,{className:"font-library__font-card__count",children:r||(0,Yb.sprintf)((0,Yb._n)("%d variant","%d variants",n),n)})}),(0,ru.jsx)(Qa.FlexItem,{children:(0,ru.jsx)(Uo,{icon:(0,Yb.isRTL)()?tr:rr})})]})]})})}var X1=PDe;var _A=s(V(),1),xA=s(H(),1);var Ng=s(x(),1);function EDe({face:e,font:t}){let{isFontActivated:r,toggleActivateFont:o}=(0,_A.useContext)(Hn),n=(t?.fontFace?.length??0)>0?r(t.slug,e.fontStyle,e.fontWeight,t.source):r(t.slug,void 0,void 0,t.source),i=()=>{if((t?.fontFace?.length??0)>0){o(t,e);return}o(t)},a=t.name+" "+yA(e),l=(0,_A.useId)();return(0,Ng.jsx)("div",{className:"font-library__font-card",children:(0,Ng.jsxs)(xA.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,Ng.jsx)(xA.CheckboxControl,{checked:n,onChange:i,id:l}),(0,Ng.jsx)("label",{htmlFor:l,children:(0,Ng.jsx)(Wb,{font:e,text:a,onClick:i})})]})})}var wse=EDe;function Sse(e){switch(e){case"normal":return 400;case"bold":return 700;case"bolder":return 500;case"lighter":return 300;default:return parseInt(e,10)}}function CA(e){return e.sort((t,r)=>t.fontStyle==="normal"&&r.fontStyle!=="normal"?-1:r.fontStyle==="normal"&&t.fontStyle!=="normal"?1:t.fontStyle===r.fontStyle?Sse(t.fontWeight?.toString()??"normal")-Sse(r.fontWeight?.toString()??"normal"):!t.fontStyle||!r.fontStyle?t.fontStyle?-1:1:t.fontStyle.localeCompare(r.fontStyle))}var $e=s(x(),1);function kDe(){let{baseCustomFonts:e,libraryFontSelected:t,handleSetLibraryFontSelected:r,uninstallFontFamily:o,isResolvingLibrary:n,isInstalling:i,saveFontFamilies:a,getFontFacesActivated:l}=(0,Mg.useContext)(Hn),[c,u]=Te("typography.fontFamilies"),[d,f]=(0,Mg.useState)(!1),[m,h]=(0,Mg.useState)(null),[g]=Te("typography.fontFamilies",void 0,"base"),v=(0,G8.useSelect)(M=>{let{__experimentalGetCurrentGlobalStylesId:D}=M(Q1.store);return D()},[]),b=!!(0,Q1.useEntityRecord)("root","globalStyles",v)?.edits?.settings?.typography?.fontFamilies,S=c?.theme?c.theme.map(M=>Ad(M,{source:"theme"})).sort((M,D)=>M.name.localeCompare(D.name)):[],w=new Set(S.map(M=>M.slug)),_=g?.theme?S.concat(g.theme.filter(M=>!w.has(M.slug)).map(M=>Ad(M,{source:"theme"})).sort((M,D)=>M.name.localeCompare(D.name))):[],C=t?.source==="custom"&&t?.id,k=(0,G8.useSelect)(M=>{let{canUser:D}=M(Q1.store);return C&&D("delete",{kind:"postType",name:"wp_font_family",id:C})},[C]),A=!!t&&t?.source!=="theme"&&k,R=()=>{f(!0)},I=async()=>{h(null);try{await a(c),h({type:"success",message:(0,Nr.__)("Font family updated successfully.")})}catch(M){h({type:"error",message:(0,Nr.sprintf)((0,Nr.__)("There was an error updating the font family. %s"),M.message)})}},B=M=>M?!M.fontFace||!M.fontFace.length?[{fontFamily:M.fontFamily,fontStyle:"normal",fontWeight:"400"}]:CA(M.fontFace):[],E=M=>{let D=M?.fontFace&&(M?.fontFace?.length??0)>0?M.fontFace.length:1,G=l(M.slug,M.source).length;return(0,Nr.sprintf)((0,Nr.__)("%1$d/%2$d variants active"),G,D)};(0,Mg.useEffect)(()=>{r(t)},[]);let P=t?l(t.slug,t.source).length:0,L=t?.fontFace?.length??(t?.fontFamily?1:0),j=P>0&&P!==L,z=P===L,W=()=>{if(!t||!t?.source)return;let M=c?.[t.source]?.filter(G=>G.slug!==t.slug)??[],D=z?M:[...M,t];u({...c,[t.source]:D}),t.fontFace&&t.fontFace.forEach(G=>{if(z)Z1(G,"all");else{let q=Gb(G?.src??"");q&&tp(G,q,"all")}})},O=_.length>0||e.length>0;return(0,$e.jsxs)("div",{className:"font-library__tabpanel-layout",children:[n&&(0,$e.jsx)("div",{className:"font-library__loading",children:(0,$e.jsx)(at.ProgressBar,{})}),!n&&(0,$e.jsxs)($e.Fragment,{children:[(0,$e.jsxs)(at.Navigator,{initialPath:t?"/fontFamily":"/",children:[(0,$e.jsx)(at.Navigator.Screen,{path:"/",children:(0,$e.jsxs)(at.__experimentalVStack,{spacing:"8",children:[m&&(0,$e.jsx)(at.Notice,{status:m.type,onRemove:()=>h(null),children:m.message}),!O&&(0,$e.jsx)(at.__experimentalText,{as:"p",children:(0,Nr.__)("No fonts installed.")}),_.length>0&&(0,$e.jsxs)(at.__experimentalVStack,{children:[(0,$e.jsx)("h2",{className:"font-library__fonts-title",children:(0,Nr._x)("Theme","font source")}),(0,$e.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:_.map(M=>(0,$e.jsx)("li",{className:"font-library__fonts-list-item",children:(0,$e.jsx)(X1,{font:M,navigatorPath:"/fontFamily",variantsText:E(M),onClick:()=>{h(null),r(M)}})},M.slug))})]}),e.length>0&&(0,$e.jsxs)(at.__experimentalVStack,{children:[(0,$e.jsx)("h2",{className:"font-library__fonts-title",children:(0,Nr._x)("Custom","font source")}),(0,$e.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:e.map(M=>(0,$e.jsx)("li",{className:"font-library__fonts-list-item",children:(0,$e.jsx)(X1,{font:M,navigatorPath:"/fontFamily",variantsText:E(M),onClick:()=>{h(null),r(M)}})},M.slug))})]})]})}),(0,$e.jsxs)(at.Navigator.Screen,{path:"/fontFamily",children:[t&&(0,$e.jsx)(RDe,{font:t,isOpen:d,setIsOpen:f,setNotice:h,uninstallFontFamily:o,handleSetLibraryFontSelected:r}),(0,$e.jsxs)(at.Flex,{justify:"flex-start",children:[(0,$e.jsx)(at.Navigator.BackButton,{icon:(0,Nr.isRTL)()?rr:tr,size:"small",onClick:()=>{r(void 0),h(null)},label:(0,Nr.__)("Back")}),(0,$e.jsx)(at.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:t?.name})]}),m&&(0,$e.jsxs)($e.Fragment,{children:[(0,$e.jsx)(at.__experimentalSpacer,{margin:1}),(0,$e.jsx)(at.Notice,{status:m.type,onRemove:()=>h(null),children:m.message}),(0,$e.jsx)(at.__experimentalSpacer,{margin:1})]}),(0,$e.jsx)(at.__experimentalSpacer,{margin:4}),(0,$e.jsx)(at.__experimentalText,{children:(0,Nr.__)("Choose font variants. Keep in mind that too many variants could make your site slower.")}),(0,$e.jsx)(at.__experimentalSpacer,{margin:4}),(0,$e.jsxs)(at.__experimentalVStack,{spacing:0,children:[(0,$e.jsx)(at.CheckboxControl,{className:"font-library__select-all",label:(0,Nr.__)("Select all"),checked:z,onChange:W,indeterminate:j}),(0,$e.jsx)(at.__experimentalSpacer,{margin:8}),(0,$e.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:t&&B(t).map((M,D)=>(0,$e.jsx)("li",{className:"font-library__fonts-list-item",children:(0,$e.jsx)(wse,{font:t,face:M},`face${D}`)},`face${D}`))})]})]})]}),(0,$e.jsxs)(at.__experimentalHStack,{justify:"flex-end",className:"font-library__footer",children:[i&&(0,$e.jsx)(at.ProgressBar,{}),A&&(0,$e.jsx)(at.Button,{__next40pxDefaultSize:!0,isDestructive:!0,variant:"tertiary",onClick:R,children:(0,Nr.__)("Delete")}),(0,$e.jsx)(at.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:I,disabled:!b,accessibleWhenDisabled:!0,children:(0,Nr.__)("Update")})]})]})]})}function RDe({font:e,isOpen:t,setIsOpen:r,setNotice:o,uninstallFontFamily:n,handleSetLibraryFontSelected:i}){let a=(0,at.useNavigator)(),l=async()=>{o(null),r(!1);try{await n(e),a.goBack(),i(void 0),o({type:"success",message:(0,Nr.__)("Font family uninstalled successfully.")})}catch(u){o({type:"error",message:(0,Nr.__)("There was an error uninstalling the font family.")+u.message})}},c=()=>{r(!1)};return(0,$e.jsx)(at.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,Nr.__)("Cancel"),confirmButtonText:(0,Nr.__)("Delete"),onCancel:c,onConfirm:l,size:"medium",children:e&&(0,Nr.sprintf)((0,Nr.__)('Are you sure you want to delete "%s" font and all its variants and assets?'),e.name)})}var TA=kDe;var mn=s(V(),1),Xe=s(H(),1),Rse=s(we(),1),_r=s(N(),1);var Ase=s(Q(),1);function _se(e,t){let{category:r,search:o}=t,n=e||[];return r&&r!=="all"&&(n=n.filter(i=>i.categories&&i.categories.indexOf(r)!==-1)),o&&(n=n.filter(i=>i.font_family_settings&&i.font_family_settings.name.toLowerCase().includes(o.toLowerCase()))),n}function xse(e){return e.reduce((t,r)=>({...t,[r.slug]:(r?.fontFace||[]).reduce((o,n)=>({...o,[`${n.fontStyle}-${n.fontWeight}`]:!0}),{})}),{})}function Cse(e,t,r){return t?!!r[e]?.[`${t.fontStyle}-${t.fontWeight}`]:!!r[e]}var J1=s(N(),1),Xi=s(H(),1),Ja=s(x(),1);function ADe(){let e=()=>{window.localStorage.setItem("wp-font-library-google-fonts-permission","true"),window.dispatchEvent(new Event("storage"))};return(0,Ja.jsx)("div",{className:"font-library__google-fonts-confirm",children:(0,Ja.jsx)(Xi.Card,{children:(0,Ja.jsxs)(Xi.CardBody,{children:[(0,Ja.jsx)(Xi.__experimentalHeading,{level:2,children:(0,J1.__)("Connect to Google Fonts")}),(0,Ja.jsx)(Xi.__experimentalSpacer,{margin:6}),(0,Ja.jsx)(Xi.__experimentalText,{as:"p",children:(0,J1.__)("To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site. Your site will then use these locally-hosted fonts.")}),(0,Ja.jsx)(Xi.__experimentalSpacer,{margin:3}),(0,Ja.jsx)(Xi.__experimentalText,{as:"p",children:(0,J1.__)("You can alternatively upload files directly on the Upload tab.")}),(0,Ja.jsx)(Xi.__experimentalSpacer,{margin:6}),(0,Ja.jsx)(Xi.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,J1.__)("Allow access to Google Fonts")})]})})})}var Tse=ADe;var Pse=s(V(),1),PA=s(H(),1);var Fg=s(x(),1);function IDe({face:e,font:t,handleToggleVariant:r,selected:o}){let n=()=>{if(t?.fontFace){r(t,e);return}r(t)},i=t.name+" "+yA(e),a=(0,Pse.useId)();return(0,Fg.jsx)("div",{className:"font-library__font-card",children:(0,Fg.jsxs)(PA.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,Fg.jsx)(PA.CheckboxControl,{checked:o,onChange:n,id:a}),(0,Fg.jsx)("label",{htmlFor:a,children:(0,Fg.jsx)(Wb,{font:e,text:i,onClick:n})})]})})}var Ese=IDe;var Ue=s(x(),1),ODe={slug:"all",name:(0,_r._x)("All","font categories")},kse="wp-font-library-google-fonts-permission",NDe=500;function MDe({slug:e}){let t=e==="google-fonts",r=()=>window.localStorage.getItem(kse)==="true",[o,n]=(0,mn.useState)(null),[i,a]=(0,mn.useState)(null),[l,c]=(0,mn.useState)([]),[u,d]=(0,mn.useState)(1),[f,m]=(0,mn.useState)({}),[h,g]=(0,mn.useState)(t&&!r()),{installFonts:v,isInstalling:y}=(0,mn.useContext)(Hn),{record:b,isResolving:S}=(0,Ase.useEntityRecord)("root","fontCollection",e);(0,mn.useEffect)(()=>{let X=()=>{g(t&&!r())};return X(),window.addEventListener("storage",X),()=>window.removeEventListener("storage",X)},[e,t]);let w=()=>{window.localStorage.setItem(kse,"false"),window.dispatchEvent(new Event("storage"))};(0,mn.useEffect)(()=>{n(null)},[e]),(0,mn.useEffect)(()=>{c([])},[o]);let _=(0,mn.useMemo)(()=>b?.font_families??[],[b]),C=b?.categories??[],k=[ODe,...C],A=(0,mn.useMemo)(()=>_se(_,f),[_,f]),R=Math.max(window.innerHeight,NDe),I=Math.floor((R-417)/61),B=Math.ceil(A.length/I),E=(u-1)*I,P=u*I,L=A.slice(E,P),j=X=>{m({...f,category:X}),d(1)},W=(0,Rse.debounce)(X=>{m({...f,search:X}),d(1)},300),O=(X,ee)=>{let pe=bA(X,ee,l);c(pe)},M=xse(l),D=()=>{c([])},G=l.length>0?l[0]?.fontFace?.length??0:0,q=G>0&&G!==o?.fontFace?.length,Z=G===o?.fontFace?.length,te=()=>{let X=[];!Z&&o&&X.push(o),c(X)},ie=async()=>{a(null);let X=l[0];try{X?.fontFace&&await Promise.all(X.fontFace.map(async ee=>{ee.src&&(ee.file=await gse(ee.src))}))}catch{a({type:"error",message:(0,_r.__)("Error installing the fonts, could not be downloaded.")});return}try{await v([X]),a({type:"success",message:(0,_r.__)("Fonts were installed successfully.")})}catch(ee){a({type:"error",message:ee.message})}D()},Se=X=>X?!X.fontFace||!X.fontFace.length?[{fontFamily:X.fontFamily,fontStyle:"normal",fontWeight:"400"}]:CA(X.fontFace):[];if(h)return(0,Ue.jsx)(Tse,{});let fe=e==="google-fonts"&&!h&&!o;return(0,Ue.jsxs)("div",{className:"font-library__tabpanel-layout",children:[S&&(0,Ue.jsx)("div",{className:"font-library__loading",children:(0,Ue.jsx)(Xe.ProgressBar,{})}),!S&&b&&(0,Ue.jsxs)(Ue.Fragment,{children:[(0,Ue.jsxs)(Xe.Navigator,{initialPath:"/",className:"font-library__tabpanel-layout",children:[(0,Ue.jsxs)(Xe.Navigator.Screen,{path:"/",children:[(0,Ue.jsxs)(Xe.__experimentalHStack,{justify:"space-between",children:[(0,Ue.jsxs)(Xe.__experimentalVStack,{children:[(0,Ue.jsx)(Xe.__experimentalHeading,{level:2,size:13,children:b.name}),(0,Ue.jsx)(Xe.__experimentalText,{children:b.description})]}),fe&&(0,Ue.jsx)(Xe.DropdownMenu,{icon:zr,label:(0,_r.__)("Actions"),popoverProps:{position:"bottom left"},controls:[{title:(0,_r.__)("Revoke access to Google Fonts"),onClick:w}]})]}),(0,Ue.jsx)(Xe.__experimentalSpacer,{margin:4}),(0,Ue.jsxs)(Xe.__experimentalHStack,{spacing:4,justify:"space-between",children:[(0,Ue.jsx)(Xe.SearchControl,{value:f.search,placeholder:(0,_r.__)("Font name\u2026"),label:(0,_r.__)("Search"),onChange:W,hideLabelFromVision:!1}),(0,Ue.jsx)(Xe.SelectControl,{__next40pxDefaultSize:!0,label:(0,_r.__)("Category"),value:f.category,onChange:j,children:k&&k.map(X=>(0,Ue.jsx)("option",{value:X.slug,children:X.name},X.slug))})]}),(0,Ue.jsx)(Xe.__experimentalSpacer,{margin:4}),!!b?.font_families?.length&&!A.length&&(0,Ue.jsx)(Xe.__experimentalText,{children:(0,_r.__)("No fonts found. Try with a different search term.")}),(0,Ue.jsx)("div",{className:"font-library__fonts-grid__main",children:(0,Ue.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:L.map(X=>(0,Ue.jsx)("li",{className:"font-library__fonts-list-item",children:(0,Ue.jsx)(X1,{font:X.font_family_settings,navigatorPath:"/fontFamily",onClick:()=>{n(X.font_family_settings)}})},X.font_family_settings.slug))})})]}),(0,Ue.jsxs)(Xe.Navigator.Screen,{path:"/fontFamily",children:[(0,Ue.jsxs)(Xe.Flex,{justify:"flex-start",children:[(0,Ue.jsx)(Xe.Navigator.BackButton,{icon:(0,_r.isRTL)()?rr:tr,size:"small",onClick:()=>{n(null),a(null)},label:(0,_r.__)("Back")}),(0,Ue.jsx)(Xe.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:o?.name})]}),i&&(0,Ue.jsxs)(Ue.Fragment,{children:[(0,Ue.jsx)(Xe.__experimentalSpacer,{margin:1}),(0,Ue.jsx)(Xe.Notice,{status:i.type,onRemove:()=>a(null),children:i.message}),(0,Ue.jsx)(Xe.__experimentalSpacer,{margin:1})]}),(0,Ue.jsx)(Xe.__experimentalSpacer,{margin:4}),(0,Ue.jsx)(Xe.__experimentalText,{children:(0,_r.__)("Select font variants to install.")}),(0,Ue.jsx)(Xe.__experimentalSpacer,{margin:4}),(0,Ue.jsx)(Xe.CheckboxControl,{className:"font-library__select-all",label:(0,_r.__)("Select all"),checked:Z,onChange:te,indeterminate:q}),(0,Ue.jsx)(Xe.__experimentalVStack,{spacing:0,children:(0,Ue.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:o&&Se(o).map((X,ee)=>(0,Ue.jsx)("li",{className:"font-library__fonts-list-item",children:(0,Ue.jsx)(Ese,{font:o,face:X,handleToggleVariant:O,selected:Cse(o.slug,o.fontFace?X:null,M)})},`face${ee}`))})}),(0,Ue.jsx)(Xe.__experimentalSpacer,{margin:16})]})]}),o&&(0,Ue.jsx)(Xe.Flex,{justify:"flex-end",className:"font-library__footer",children:(0,Ue.jsx)(Xe.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:ie,isBusy:y,disabled:l.length===0||y,accessibleWhenDisabled:!0,children:(0,_r.__)("Install")})}),!o&&(0,Ue.jsxs)(Xe.__experimentalHStack,{expanded:!1,className:"font-library__footer",justify:"end",spacing:6,children:[(0,Ue.jsx)(Xe.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:1,className:"font-library__page-selection",children:(0,mn.createInterpolateElement)((0,_r.sprintf)((0,_r._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging"),"<CurrentPage />",B),{div:(0,Ue.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,Ue.jsx)(Xe.SelectControl,{"aria-label":(0,_r.__)("Current page"),value:u.toString(),options:[...Array(B)].map((X,ee)=>({label:(ee+1).toString(),value:(ee+1).toString()})),onChange:X=>d(parseInt(X)),size:"small",variant:"minimal"})})}),(0,Ue.jsxs)(Xe.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,Ue.jsx)(Xe.Button,{onClick:()=>d(u-1),disabled:u===1,accessibleWhenDisabled:!0,label:(0,_r.__)("Previous page"),icon:(0,_r.isRTL)()?wa:Sa,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,Ue.jsx)(Xe.Button,{onClick:()=>d(u+1),disabled:u===B,accessibleWhenDisabled:!0,label:(0,_r.__)("Next page"),icon:(0,_r.isRTL)()?Sa:wa,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})]})]})}var EA=MDe;var qb=s(N(),1),vi=s(H(),1),ex=s(V(),1);var kA=(e=>typeof is<"u"?is:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof is<"u"?is:t)[r]}):e)(function(e){if(typeof is<"u")return is.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),Ise=(function(){var e,t,r;return(function(){function o(n,i,a){function l(d,f){if(!i[d]){if(!n[d]){var m=typeof kA=="function"&&kA;if(!f&&m)return m(d,!0);if(c)return c(d,!0);var h=new Error("Cannot find module '"+d+"'");throw h.code="MODULE_NOT_FOUND",h}var g=i[d]={exports:{}};n[d][0].call(g.exports,function(v){var y=n[d][1][v];return l(y||v)},g,g.exports,o,n,i,a)}return i[d].exports}for(var c=typeof kA=="function"&&kA,u=0;u<a.length;u++)l(a[u]);return l}return o})()({1:[function(o,n,i){var a=4096,l=2*a+32,c=2*a-1,u=new Uint32Array([0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215]);function d(f){this.buf_=new Uint8Array(l),this.input_=f,this.reset()}d.READ_SIZE=a,d.IBUF_MASK=c,d.prototype.reset=function(){this.buf_ptr_=0,this.val_=0,this.pos_=0,this.bit_pos_=0,this.bit_end_pos_=0,this.eos_=0,this.readMoreInput();for(var f=0;f<4;f++)this.val_|=this.buf_[this.pos_]<<8*f,++this.pos_;return this.bit_end_pos_>0},d.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var f=this.buf_ptr_,m=this.input_.read(this.buf_,f,a);if(m<0)throw new Error("Unexpected end of input");if(m<a){this.eos_=1;for(var h=0;h<32;h++)this.buf_[f+m+h]=0}if(f===0){for(var h=0;h<32;h++)this.buf_[(a<<1)+h]=this.buf_[h];this.buf_ptr_=a}else this.buf_ptr_=0;this.bit_end_pos_+=m<<3}},d.prototype.fillBitWindow=function(){for(;this.bit_pos_>=8;)this.val_>>>=8,this.val_|=this.buf_[this.pos_&c]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},d.prototype.readBits=function(f){32-this.bit_pos_<f&&this.fillBitWindow();var m=this.val_>>>this.bit_pos_&u[f];return this.bit_pos_+=f,m},n.exports=d},{}],2:[function(o,n,i){var a=0,l=1,c=2,u=3;i.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,28,12,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),i.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},{}],3:[function(o,n,i){var a=o("./streams").BrotliInput,l=o("./streams").BrotliOutput,c=o("./bit_reader"),u=o("./dictionary"),d=o("./huffman").HuffmanCode,f=o("./huffman").BrotliBuildHuffmanTable,m=o("./context"),h=o("./prefix"),g=o("./transform"),v=8,y=16,b=256,S=704,w=26,_=6,C=2,k=8,A=255,R=1080,I=18,B=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),E=16,P=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),L=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),j=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function z(ne){var $;return ne.readBits(1)===0?16:($=ne.readBits(3),$>0?17+$:($=ne.readBits(3),$>0?8+$:17))}function W(ne){if(ne.readBits(1)){var $=ne.readBits(3);return $===0?1:ne.readBits($)+(1<<$)}return 0}function O(){this.meta_block_length=0,this.input_end=0,this.is_uncompressed=0,this.is_metadata=!1}function M(ne){var $=new O,ue,oe,me;if($.input_end=ne.readBits(1),$.input_end&&ne.readBits(1))return $;if(ue=ne.readBits(2)+4,ue===7){if($.is_metadata=!0,ne.readBits(1)!==0)throw new Error("Invalid reserved bit");if(oe=ne.readBits(2),oe===0)return $;for(me=0;me<oe;me++){var Ne=ne.readBits(8);if(me+1===oe&&oe>1&&Ne===0)throw new Error("Invalid size byte");$.meta_block_length|=Ne<<me*8}}else for(me=0;me<ue;++me){var Oe=ne.readBits(4);if(me+1===ue&&ue>4&&Oe===0)throw new Error("Invalid size nibble");$.meta_block_length|=Oe<<me*4}return++$.meta_block_length,!$.input_end&&!$.is_metadata&&($.is_uncompressed=ne.readBits(1)),$}function D(ne,$,ue){var oe=$,me;return ue.fillBitWindow(),$+=ue.val_>>>ue.bit_pos_&A,me=ne[$].bits-k,me>0&&(ue.bit_pos_+=k,$+=ne[$].value,$+=ue.val_>>>ue.bit_pos_&(1<<me)-1),ue.bit_pos_+=ne[$].bits,ne[$].value}function G(ne,$,ue,oe){for(var me=0,Ne=v,Oe=0,De=0,le=32768,be=[],ge=0;ge<32;ge++)be.push(new d(0,0));for(f(be,0,5,ne,I);me<$&&le>0;){var ze=0,bt;if(oe.readMoreInput(),oe.fillBitWindow(),ze+=oe.val_>>>oe.bit_pos_&31,oe.bit_pos_+=be[ze].bits,bt=be[ze].value&255,bt<y)Oe=0,ue[me++]=bt,bt!==0&&(Ne=bt,le-=32768>>bt);else{var cr=bt-14,Ct,Jt,$t=0;if(bt===y&&($t=Ne),De!==$t&&(Oe=0,De=$t),Ct=Oe,Oe>0&&(Oe-=2,Oe<<=cr),Oe+=oe.readBits(cr)+3,Jt=Oe-Ct,me+Jt>$)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var Ro=0;Ro<Jt;Ro++)ue[me+Ro]=De;me+=Jt,De!==0&&(le-=Jt<<15-De)}}if(le!==0)throw new Error("[ReadHuffmanCodeLengths] space = "+le);for(;me<$;me++)ue[me]=0}function q(ne,$,ue,oe){var me=0,Ne,Oe=new Uint8Array(ne);if(oe.readMoreInput(),Ne=oe.readBits(2),Ne===1){for(var De,le=ne-1,be=0,ge=new Int32Array(4),ze=oe.readBits(2)+1;le;)le>>=1,++be;for(De=0;De<ze;++De)ge[De]=oe.readBits(be)%ne,Oe[ge[De]]=2;switch(Oe[ge[0]]=1,ze){case 1:break;case 3:if(ge[0]===ge[1]||ge[0]===ge[2]||ge[1]===ge[2])throw new Error("[ReadHuffmanCode] invalid symbols");break;case 2:if(ge[0]===ge[1])throw new Error("[ReadHuffmanCode] invalid symbols");Oe[ge[1]]=1;break;case 4:if(ge[0]===ge[1]||ge[0]===ge[2]||ge[0]===ge[3]||ge[1]===ge[2]||ge[1]===ge[3]||ge[2]===ge[3])throw new Error("[ReadHuffmanCode] invalid symbols");oe.readBits(1)?(Oe[ge[2]]=3,Oe[ge[3]]=3):Oe[ge[0]]=2;break}}else{var De,bt=new Uint8Array(I),cr=32,Ct=0,Jt=[new d(2,0),new d(2,4),new d(2,3),new d(3,2),new d(2,0),new d(2,4),new d(2,3),new d(4,1),new d(2,0),new d(2,4),new d(2,3),new d(3,2),new d(2,0),new d(2,4),new d(2,3),new d(4,5)];for(De=Ne;De<I&&cr>0;++De){var $t=B[De],Ro=0,En;oe.fillBitWindow(),Ro+=oe.val_>>>oe.bit_pos_&15,oe.bit_pos_+=Jt[Ro].bits,En=Jt[Ro].value,bt[$t]=En,En!==0&&(cr-=32>>En,++Ct)}if(!(Ct===1||cr===0))throw new Error("[ReadHuffmanCode] invalid num_codes or space");G(bt,ne,Oe,oe)}if(me=f($,ue,k,Oe,ne),me===0)throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return me}function Z(ne,$,ue){var oe,me;return oe=D(ne,$,ue),me=h.kBlockLengthPrefixCode[oe].nbits,h.kBlockLengthPrefixCode[oe].offset+ue.readBits(me)}function te(ne,$,ue){var oe;return ne<E?(ue+=P[ne],ue&=3,oe=$[ue]+L[ne]):oe=ne-E+1,oe}function ie(ne,$){for(var ue=ne[$],oe=$;oe;--oe)ne[oe]=ne[oe-1];ne[0]=ue}function Se(ne,$){var ue=new Uint8Array(256),oe;for(oe=0;oe<256;++oe)ue[oe]=oe;for(oe=0;oe<$;++oe){var me=ne[oe];ne[oe]=ue[me],me&&ie(ue,me)}}function fe(ne,$){this.alphabet_size=ne,this.num_htrees=$,this.codes=new Array($+$*j[ne+31>>>5]),this.htrees=new Uint32Array($)}fe.prototype.decode=function(ne){var $,ue,oe=0;for($=0;$<this.num_htrees;++$)this.htrees[$]=oe,ue=q(this.alphabet_size,this.codes,oe,ne),oe+=ue};function X(ne,$){var ue={num_htrees:null,context_map:null},oe,me=0,Ne,Oe;$.readMoreInput();var De=ue.num_htrees=W($)+1,le=ue.context_map=new Uint8Array(ne);if(De<=1)return ue;for(oe=$.readBits(1),oe&&(me=$.readBits(4)+1),Ne=[],Oe=0;Oe<R;Oe++)Ne[Oe]=new d(0,0);for(q(De+me,Ne,0,$),Oe=0;Oe<ne;){var be;if($.readMoreInput(),be=D(Ne,0,$),be===0)le[Oe]=0,++Oe;else if(be<=me)for(var ge=1+(1<<be)+$.readBits(be);--ge;){if(Oe>=ne)throw new Error("[DecodeContextMap] i >= context_map_size");le[Oe]=0,++Oe}else le[Oe]=be-me,++Oe}return $.readBits(1)&&Se(le,ne),ue}function ee(ne,$,ue,oe,me,Ne,Oe){var De=ue*2,le=ue,be=D($,ue*R,Oe),ge;be===0?ge=me[De+(Ne[le]&1)]:be===1?ge=me[De+(Ne[le]-1&1)]+1:ge=be-2,ge>=ne&&(ge-=ne),oe[ue]=ge,me[De+(Ne[le]&1)]=ge,++Ne[le]}function pe(ne,$,ue,oe,me,Ne){var Oe=me+1,De=ue&me,le=Ne.pos_&c.IBUF_MASK,be;if($<8||Ne.bit_pos_+($<<3)<Ne.bit_end_pos_){for(;$-- >0;)Ne.readMoreInput(),oe[De++]=Ne.readBits(8),De===Oe&&(ne.write(oe,Oe),De=0);return}if(Ne.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;Ne.bit_pos_<32;)oe[De]=Ne.val_>>>Ne.bit_pos_,Ne.bit_pos_+=8,++De,--$;if(be=Ne.bit_end_pos_-Ne.bit_pos_>>3,le+be>c.IBUF_MASK){for(var ge=c.IBUF_MASK+1-le,ze=0;ze<ge;ze++)oe[De+ze]=Ne.buf_[le+ze];be-=ge,De+=ge,$-=ge,le=0}for(var ze=0;ze<be;ze++)oe[De+ze]=Ne.buf_[le+ze];if(De+=be,$-=be,De>=Oe){ne.write(oe,Oe),De-=Oe;for(var ze=0;ze<De;ze++)oe[ze]=oe[Oe+ze]}for(;De+$>=Oe;){if(be=Oe-De,Ne.input_.read(oe,De,be)<be)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");ne.write(oe,Oe),$-=be,De=0}if(Ne.input_.read(oe,De,$)<$)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");Ne.reset()}function ve(ne){var $=ne.bit_pos_+7&-8,ue=ne.readBits($-ne.bit_pos_);return ue==0}function Ie(ne){var $=new a(ne),ue=new c($);z(ue);var oe=M(ue);return oe.meta_block_length}i.BrotliDecompressedSize=Ie;function et(ne,$){var ue=new a(ne);$==null&&($=Ie(ne));var oe=new Uint8Array($),me=new l(oe);return it(ue,me),me.pos<me.buffer.length&&(me.buffer=me.buffer.subarray(0,me.pos)),me.buffer}i.BrotliDecompressBuffer=et;function it(ne,$){var ue,oe=0,me=0,Ne=0,Oe,De=0,le,be,ge,ze,bt=[16,15,11,4],cr=0,Ct=0,Jt=0,$t=[new fe(0,0),new fe(0,0),new fe(0,0)],Ro,En,ye,Pr=128+c.READ_SIZE;ye=new c(ne),Ne=z(ye),Oe=(1<<Ne)-16,le=1<<Ne,be=le-1,ge=new Uint8Array(le+Pr+u.maxDictionaryWordLength),ze=le,Ro=[],En=[];for(var $o=0;$o<3*R;$o++)Ro[$o]=new d(0,0),En[$o]=new d(0,0);for(;!me;){var Er=0,Ru,kn=[1<<28,1<<28,1<<28],Qn=[0],Ls=[1,1,1],J=[0,1,0,1,0,1],xe=[0],F,Ee,ur,Ce,Pi=null,Pe=null,Jr,ae=null,se,Gp=0,er=null,Le=0,Wp=0,Yp=null,Br=0,Pt=0,Ao=0,Io,en;for(ue=0;ue<3;++ue)$t[ue].codes=null,$t[ue].htrees=null;ye.readMoreInput();var Au=M(ye);if(Er=Au.meta_block_length,oe+Er>$.buffer.length){var qp=new Uint8Array(oe+Er);qp.set($.buffer),$.buffer=qp}if(me=Au.input_end,Ru=Au.is_uncompressed,Au.is_metadata){for(ve(ye);Er>0;--Er)ye.readMoreInput(),ye.readBits(8);continue}if(Er!==0){if(Ru){ye.bit_pos_=ye.bit_pos_+7&-8,pe($,Er,oe,ge,be,ye),oe+=Er;continue}for(ue=0;ue<3;++ue)Ls[ue]=W(ye)+1,Ls[ue]>=2&&(q(Ls[ue]+2,Ro,ue*R,ye),q(w,En,ue*R,ye),kn[ue]=Z(En,ue*R,ye),xe[ue]=1);for(ye.readMoreInput(),F=ye.readBits(2),Ee=E+(ye.readBits(4)<<F),ur=(1<<F)-1,Ce=Ee+(48<<F),Pe=new Uint8Array(Ls[0]),ue=0;ue<Ls[0];++ue)ye.readMoreInput(),Pe[ue]=ye.readBits(2)<<1;var Vr=X(Ls[0]<<_,ye);Jr=Vr.num_htrees,Pi=Vr.context_map;var Ei=X(Ls[2]<<C,ye);for(se=Ei.num_htrees,ae=Ei.context_map,$t[0]=new fe(b,Jr),$t[1]=new fe(S,Ls[1]),$t[2]=new fe(Ce,se),ue=0;ue<3;++ue)$t[ue].decode(ye);for(er=0,Yp=0,Io=Pe[Qn[0]],Pt=m.lookupOffsets[Io],Ao=m.lookupOffsets[Io+1],en=$t[1].htrees[0];Er>0;){var $r,ki,os,Vv,a6,ns,Bs,Iu,Zw,jv,Xw;for(ye.readMoreInput(),kn[1]===0&&(ee(Ls[1],Ro,1,Qn,J,xe,ye),kn[1]=Z(En,R,ye),en=$t[1].htrees[Qn[1]]),--kn[1],$r=D($t[1].codes,en,ye),ki=$r>>6,ki>=2?(ki-=2,Bs=-1):Bs=0,os=h.kInsertRangeLut[ki]+($r>>3&7),Vv=h.kCopyRangeLut[ki]+($r&7),a6=h.kInsertLengthPrefixCode[os].offset+ye.readBits(h.kInsertLengthPrefixCode[os].nbits),ns=h.kCopyLengthPrefixCode[Vv].offset+ye.readBits(h.kCopyLengthPrefixCode[Vv].nbits),Ct=ge[oe-1&be],Jt=ge[oe-2&be],jv=0;jv<a6;++jv)ye.readMoreInput(),kn[0]===0&&(ee(Ls[0],Ro,0,Qn,J,xe,ye),kn[0]=Z(En,0,ye),Gp=Qn[0]<<_,er=Gp,Io=Pe[Qn[0]],Pt=m.lookupOffsets[Io],Ao=m.lookupOffsets[Io+1]),Zw=m.lookup[Pt+Ct]|m.lookup[Ao+Jt],Le=Pi[er+Zw],--kn[0],Jt=Ct,Ct=D($t[0].codes,$t[0].htrees[Le],ye),ge[oe&be]=Ct,(oe&be)===be&&$.write(ge,le),++oe;if(Er-=a6,Er<=0)break;if(Bs<0){var Zw;if(ye.readMoreInput(),kn[2]===0&&(ee(Ls[2],Ro,2,Qn,J,xe,ye),kn[2]=Z(En,2*R,ye),Wp=Qn[2]<<C,Yp=Wp),--kn[2],Zw=(ns>4?3:ns-2)&255,Br=ae[Yp+Zw],Bs=D($t[2].codes,$t[2].htrees[Br],ye),Bs>=Ee){var l6,rz,Qw;Bs-=Ee,rz=Bs&ur,Bs>>=F,l6=(Bs>>1)+1,Qw=(2+(Bs&1)<<l6)-4,Bs=Ee+(Qw+ye.readBits(l6)<<F)+rz}}if(Iu=te(Bs,bt,cr),Iu<0)throw new Error("[BrotliDecompress] invalid distance");if(oe<Oe&&De!==Oe?De=oe:De=Oe,Xw=oe&be,Iu>De)if(ns>=u.minDictionaryWordLength&&ns<=u.maxDictionaryWordLength){var Qw=u.offsetsByLength[ns],oz=Iu-De-1,nz=u.sizeBitsByLength[ns],s_e=(1<<nz)-1,a_e=oz&s_e,iz=oz>>nz;if(Qw+=a_e*ns,iz<g.kNumTransforms){var c6=g.transformDictionaryWord(ge,Xw,Qw,ns,iz);if(Xw+=c6,oe+=c6,Er-=c6,Xw>=ze){$.write(ge,le);for(var HC=0;HC<Xw-ze;HC++)ge[HC]=ge[ze+HC]}}else throw new Error("Invalid backward reference. pos: "+oe+" distance: "+Iu+" len: "+ns+" bytes left: "+Er)}else throw new Error("Invalid backward reference. pos: "+oe+" distance: "+Iu+" len: "+ns+" bytes left: "+Er);else{if(Bs>0&&(bt[cr&3]=Iu,++cr),ns>Er)throw new Error("Invalid backward reference. pos: "+oe+" distance: "+Iu+" len: "+ns+" bytes left: "+Er);for(jv=0;jv<ns;++jv)ge[oe&be]=ge[oe-Iu&be],(oe&be)===be&&$.write(ge,le),++oe,--Er}Ct=ge[oe-1&be],Jt=ge[oe-2&be]}oe&=1073741823}}$.write(ge,oe&be)}i.BrotliDecompress=it,u.init()},{"./bit_reader":1,"./context":2,"./dictionary":6,"./huffman":7,"./prefix":9,"./streams":10,"./transform":11}],4:[function(o,n,i){var a=o("base64-js");i.init=function(){var l=o("./decode").BrotliDecompressBuffer,c=a.toByteArray(o("./dictionary.bin.js"));return l(c)}},{"./decode":3,"./dictionary.bin.js":5,"base64-js":8}],5:[function(o,n,i){n.exports="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"},{}],6:[function(o,n,i){var a=o("./dictionary-browser");i.init=function(){i.dictionary=a.init()},i.offsetsByLength=new Uint32Array([0,0,0,0,0,4096,9216,21504,35840,44032,53248,63488,74752,87040,93696,100864,104704,106752,108928,113536,115968,118528,119872,121280,122016]),i.sizeBitsByLength=new Uint8Array([0,0,0,0,10,10,11,11,10,10,10,10,10,9,9,8,7,7,8,7,7,6,6,5,5]),i.minDictionaryWordLength=4,i.maxDictionaryWordLength=24},{"./dictionary-browser":4}],7:[function(o,n,i){function a(f,m){this.bits=f,this.value=m}i.HuffmanCode=a;var l=15;function c(f,m){for(var h=1<<m-1;f&h;)h>>=1;return(f&h-1)+h}function u(f,m,h,g,v){do g-=h,f[m+g]=new a(v.bits,v.value);while(g>0)}function d(f,m,h){for(var g=1<<m-h;m<l&&(g-=f[m],!(g<=0));)++m,g<<=1;return m-h}i.BrotliBuildHuffmanTable=function(f,m,h,g,v){var y=m,b,S,w,_,C,k,A,R,I,B,E,P=new Int32Array(l+1),L=new Int32Array(l+1);for(E=new Int32Array(v),w=0;w<v;w++)P[g[w]]++;for(L[1]=0,S=1;S<l;S++)L[S+1]=L[S]+P[S];for(w=0;w<v;w++)g[w]!==0&&(E[L[g[w]]++]=w);if(R=h,I=1<<R,B=I,L[l]===1){for(_=0;_<B;++_)f[m+_]=new a(0,E[0]&65535);return B}for(_=0,w=0,S=1,C=2;S<=h;++S,C<<=1)for(;P[S]>0;--P[S])b=new a(S&255,E[w++]&65535),u(f,m+_,C,I,b),_=c(_,S);for(A=B-1,k=-1,S=h+1,C=2;S<=l;++S,C<<=1)for(;P[S]>0;--P[S])(_&A)!==k&&(m+=I,R=d(P,S,h),I=1<<R,B+=I,k=_&A,f[y+k]=new a(R+h&255,m-y-k&65535)),b=new a(S-h&255,E[w++]&65535),u(f,m+(_>>h),C,I,b),_=c(_,S);return B}},{}],8:[function(o,n,i){"use strict";i.byteLength=h,i.toByteArray=v,i.fromByteArray=S;for(var a=[],l=[],c=typeof Uint8Array<"u"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,f=u.length;d<f;++d)a[d]=u[d],l[u.charCodeAt(d)]=d;l[45]=62,l[95]=63;function m(w){var _=w.length;if(_%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var C=w.indexOf("=");C===-1&&(C=_);var k=C===_?0:4-C%4;return[C,k]}function h(w){var _=m(w),C=_[0],k=_[1];return(C+k)*3/4-k}function g(w,_,C){return(_+C)*3/4-C}function v(w){for(var _,C=m(w),k=C[0],A=C[1],R=new c(g(w,k,A)),I=0,B=A>0?k-4:k,E=0;E<B;E+=4)_=l[w.charCodeAt(E)]<<18|l[w.charCodeAt(E+1)]<<12|l[w.charCodeAt(E+2)]<<6|l[w.charCodeAt(E+3)],R[I++]=_>>16&255,R[I++]=_>>8&255,R[I++]=_&255;return A===2&&(_=l[w.charCodeAt(E)]<<2|l[w.charCodeAt(E+1)]>>4,R[I++]=_&255),A===1&&(_=l[w.charCodeAt(E)]<<10|l[w.charCodeAt(E+1)]<<4|l[w.charCodeAt(E+2)]>>2,R[I++]=_>>8&255,R[I++]=_&255),R}function y(w){return a[w>>18&63]+a[w>>12&63]+a[w>>6&63]+a[w&63]}function b(w,_,C){for(var k,A=[],R=_;R<C;R+=3)k=(w[R]<<16&16711680)+(w[R+1]<<8&65280)+(w[R+2]&255),A.push(y(k));return A.join("")}function S(w){for(var _,C=w.length,k=C%3,A=[],R=16383,I=0,B=C-k;I<B;I+=R)A.push(b(w,I,I+R>B?B:I+R));return k===1?(_=w[C-1],A.push(a[_>>2]+a[_<<4&63]+"==")):k===2&&(_=(w[C-2]<<8)+w[C-1],A.push(a[_>>10]+a[_>>4&63]+a[_<<2&63]+"=")),A.join("")}},{}],9:[function(o,n,i){function a(l,c){this.offset=l,this.nbits=c}i.kBlockLengthPrefixCode=[new a(1,2),new a(5,2),new a(9,2),new a(13,2),new a(17,3),new a(25,3),new a(33,3),new a(41,3),new a(49,4),new a(65,4),new a(81,4),new a(97,4),new a(113,5),new a(145,5),new a(177,5),new a(209,5),new a(241,6),new a(305,6),new a(369,7),new a(497,8),new a(753,9),new a(1265,10),new a(2289,11),new a(4337,12),new a(8433,13),new a(16625,24)],i.kInsertLengthPrefixCode=[new a(0,0),new a(1,0),new a(2,0),new a(3,0),new a(4,0),new a(5,0),new a(6,1),new a(8,1),new a(10,2),new a(14,2),new a(18,3),new a(26,3),new a(34,4),new a(50,4),new a(66,5),new a(98,5),new a(130,6),new a(194,7),new a(322,8),new a(578,9),new a(1090,10),new a(2114,12),new a(6210,14),new a(22594,24)],i.kCopyLengthPrefixCode=[new a(2,0),new a(3,0),new a(4,0),new a(5,0),new a(6,0),new a(7,0),new a(8,0),new a(9,0),new a(10,1),new a(12,1),new a(14,2),new a(18,2),new a(22,3),new a(30,3),new a(38,4),new a(54,4),new a(70,5),new a(102,5),new a(134,6),new a(198,7),new a(326,8),new a(582,9),new a(1094,10),new a(2118,24)],i.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],i.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},{}],10:[function(o,n,i){function a(c){this.buffer=c,this.pos=0}a.prototype.read=function(c,u,d){this.pos+d>this.buffer.length&&(d=this.buffer.length-this.pos);for(var f=0;f<d;f++)c[u+f]=this.buffer[this.pos+f];return this.pos+=d,d},i.BrotliInput=a;function l(c){this.buffer=c,this.pos=0}l.prototype.write=function(c,u){if(this.pos+u>this.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(c.subarray(0,u),this.pos),this.pos+=u,u},i.BrotliOutput=l},{}],11:[function(o,n,i){var a=o("./dictionary"),l=0,c=1,u=2,d=3,f=4,m=5,h=6,g=7,v=8,y=9,b=10,S=11,w=12,_=13,C=14,k=15,A=16,R=17,I=18,B=19,E=20;function P(z,W,O){this.prefix=new Uint8Array(z.length),this.transform=W,this.suffix=new Uint8Array(O.length);for(var M=0;M<z.length;M++)this.prefix[M]=z.charCodeAt(M);for(var M=0;M<O.length;M++)this.suffix[M]=O.charCodeAt(M)}var L=[new P("",l,""),new P("",l," "),new P(" ",l," "),new P("",w,""),new P("",b," "),new P("",l," the "),new P(" ",l,""),new P("s ",l," "),new P("",l," of "),new P("",b,""),new P("",l," and "),new P("",_,""),new P("",c,""),new P(", ",l," "),new P("",l,", "),new P(" ",b," "),new P("",l," in "),new P("",l," to "),new P("e ",l," "),new P("",l,'"'),new P("",l,"."),new P("",l,'">'),new P("",l,`
46 `),new P("",d,""),new P("",l,"]"),new P("",l," for "),new P("",C,""),new P("",u,""),new P("",l," a "),new P("",l," that "),new P(" ",b,""),new P("",l,". "),new P(".",l,""),new P(" ",l,", "),new P("",k,""),new P("",l," with "),new P("",l,"'"),new P("",l," from "),new P("",l," by "),new P("",A,""),new P("",R,""),new P(" the ",l,""),new P("",f,""),new P("",l,". The "),new P("",S,""),new P("",l," on "),new P("",l," as "),new P("",l," is "),new P("",g,""),new P("",c,"ing "),new P("",l,`
47 `),new P("",l,":"),new P(" ",l,". "),new P("",l,"ed "),new P("",E,""),new P("",I,""),new P("",h,""),new P("",l,"("),new P("",b,", "),new P("",v,""),new P("",l," at "),new P("",l,"ly "),new P(" the ",l," of "),new P("",m,""),new P("",y,""),new P(" ",b,", "),new P("",b,'"'),new P(".",l,"("),new P("",S," "),new P("",b,'">'),new P("",l,'="'),new P(" ",l,"."),new P(".com/",l,""),new P(" the ",l," of the "),new P("",b,"'"),new P("",l,". This "),new P("",l,","),new P(".",l," "),new P("",b,"("),new P("",b,"."),new P("",l," not "),new P(" ",l,'="'),new P("",l,"er "),new P(" ",S," "),new P("",l,"al "),new P(" ",S,""),new P("",l,"='"),new P("",S,'"'),new P("",b,". "),new P(" ",l,"("),new P("",l,"ful "),new P(" ",b,". "),new P("",l,"ive "),new P("",l,"less "),new P("",S,"'"),new P("",l,"est "),new P(" ",b,"."),new P("",S,'">'),new P(" ",l,"='"),new P("",b,","),new P("",l,"ize "),new P("",S,"."),new P("\xC2\xA0",l,""),new P(" ",l,","),new P("",b,'="'),new P("",S,'="'),new P("",l,"ous "),new P("",S,", "),new P("",b,"='"),new P(" ",b,","),new P(" ",S,'="'),new P(" ",S,", "),new P("",S,","),new P("",S,"("),new P("",S,". "),new P(" ",S,"."),new P("",S,"='"),new P(" ",S,". "),new P(" ",b,'="'),new P(" ",S,"='"),new P(" ",b,"='")];i.kTransforms=L,i.kNumTransforms=L.length;function j(z,W){return z[W]<192?(z[W]>=97&&z[W]<=122&&(z[W]^=32),1):z[W]<224?(z[W+1]^=32,2):(z[W+2]^=5,3)}i.transformDictionaryWord=function(z,W,O,M,D){var G=L[D].prefix,q=L[D].suffix,Z=L[D].transform,te=Z<w?0:Z-(w-1),ie=0,Se=W,fe;te>M&&(te=M);for(var X=0;X<G.length;)z[W++]=G[X++];for(O+=te,M-=te,Z<=y&&(M-=Z),ie=0;ie<M;ie++)z[W++]=a.dictionary[O+ie];if(fe=W-M,Z===b)j(z,fe);else if(Z===S)for(;M>0;){var ee=j(z,fe);fe+=ee,M-=ee}for(var pe=0;pe<q.length;)z[W++]=q[pe++];return W-Se}},{"./dictionary":6}],12:[function(o,n,i){n.exports=o("./dec/decode").BrotliDecompressBuffer},{"./dec/decode":3}]},{},[12])(12)})();var RA=(e=>typeof is<"u"?is:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof is<"u"?is:t)[r]}):e)(function(e){if(typeof is<"u")return is.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),Ose=(function(){var e,t,r;return(function(){function o(n,i,a){function l(d,f){if(!i[d]){if(!n[d]){var m=typeof RA=="function"&&RA;if(!f&&m)return m(d,!0);if(c)return c(d,!0);var h=new Error("Cannot find module '"+d+"'");throw h.code="MODULE_NOT_FOUND",h}var g=i[d]={exports:{}};n[d][0].call(g.exports,function(v){var y=n[d][1][v];return l(y||v)},g,g.exports,o,n,i,a)}return i[d].exports}for(var c=typeof RA=="function"&&RA,u=0;u<a.length;u++)l(a[u]);return l}return o})()({1:[function(o,n,i){"use strict";var a=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function l(d,f){return Object.prototype.hasOwnProperty.call(d,f)}i.assign=function(d){for(var f=Array.prototype.slice.call(arguments,1);f.length;){var m=f.shift();if(m){if(typeof m!="object")throw new TypeError(m+"must be non-object");for(var h in m)l(m,h)&&(d[h]=m[h])}}return d},i.shrinkBuf=function(d,f){return d.length===f?d:d.subarray?d.subarray(0,f):(d.length=f,d)};var c={arraySet:function(d,f,m,h,g){if(f.subarray&&d.subarray){d.set(f.subarray(m,m+h),g);return}for(var v=0;v<h;v++)d[g+v]=f[m+v]},flattenChunks:function(d){var f,m,h,g,v,y;for(h=0,f=0,m=d.length;f<m;f++)h+=d[f].length;for(y=new Uint8Array(h),g=0,f=0,m=d.length;f<m;f++)v=d[f],y.set(v,g),g+=v.length;return y}},u={arraySet:function(d,f,m,h,g){for(var v=0;v<h;v++)d[g+v]=f[m+v]},flattenChunks:function(d){return[].concat.apply([],d)}};i.setTyped=function(d){d?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,c)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,u))},i.setTyped(a)},{}],2:[function(o,n,i){"use strict";var a=o("./common"),l=!0,c=!0;try{String.fromCharCode.apply(null,[0])}catch{l=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{c=!1}for(var u=new a.Buf8(256),d=0;d<256;d++)u[d]=d>=252?6:d>=248?5:d>=240?4:d>=224?3:d>=192?2:1;u[254]=u[254]=1,i.string2buf=function(m){var h,g,v,y,b,S=m.length,w=0;for(y=0;y<S;y++)g=m.charCodeAt(y),(g&64512)===55296&&y+1<S&&(v=m.charCodeAt(y+1),(v&64512)===56320&&(g=65536+(g-55296<<10)+(v-56320),y++)),w+=g<128?1:g<2048?2:g<65536?3:4;for(h=new a.Buf8(w),b=0,y=0;b<w;y++)g=m.charCodeAt(y),(g&64512)===55296&&y+1<S&&(v=m.charCodeAt(y+1),(v&64512)===56320&&(g=65536+(g-55296<<10)+(v-56320),y++)),g<128?h[b++]=g:g<2048?(h[b++]=192|g>>>6,h[b++]=128|g&63):g<65536?(h[b++]=224|g>>>12,h[b++]=128|g>>>6&63,h[b++]=128|g&63):(h[b++]=240|g>>>18,h[b++]=128|g>>>12&63,h[b++]=128|g>>>6&63,h[b++]=128|g&63);return h};function f(m,h){if(h<65534&&(m.subarray&&c||!m.subarray&&l))return String.fromCharCode.apply(null,a.shrinkBuf(m,h));for(var g="",v=0;v<h;v++)g+=String.fromCharCode(m[v]);return g}i.buf2binstring=function(m){return f(m,m.length)},i.binstring2buf=function(m){for(var h=new a.Buf8(m.length),g=0,v=h.length;g<v;g++)h[g]=m.charCodeAt(g);return h},i.buf2string=function(m,h){var g,v,y,b,S=h||m.length,w=new Array(S*2);for(v=0,g=0;g<S;){if(y=m[g++],y<128){w[v++]=y;continue}if(b=u[y],b>4){w[v++]=65533,g+=b-1;continue}for(y&=b===2?31:b===3?15:7;b>1&&g<S;)y=y<<6|m[g++]&63,b--;if(b>1){w[v++]=65533;continue}y<65536?w[v++]=y:(y-=65536,w[v++]=55296|y>>10&1023,w[v++]=56320|y&1023)}return f(w,v)},i.utf8border=function(m,h){var g;for(h=h||m.length,h>m.length&&(h=m.length),g=h-1;g>=0&&(m[g]&192)===128;)g--;return g<0||g===0?h:g+u[m[g]]>h?g:h}},{"./common":1}],3:[function(o,n,i){"use strict";function a(l,c,u,d){for(var f=l&65535|0,m=l>>>16&65535|0,h=0;u!==0;){h=u>2e3?2e3:u,u-=h;do f=f+c[d++]|0,m=m+f|0;while(--h);f%=65521,m%=65521}return f|m<<16|0}n.exports=a},{}],4:[function(o,n,i){"use strict";n.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(o,n,i){"use strict";function a(){for(var u,d=[],f=0;f<256;f++){u=f;for(var m=0;m<8;m++)u=u&1?3988292384^u>>>1:u>>>1;d[f]=u}return d}var l=a();function c(u,d,f,m){var h=l,g=m+f;u^=-1;for(var v=m;v<g;v++)u=u>>>8^h[(u^d[v])&255];return u^-1}n.exports=c},{}],6:[function(o,n,i){"use strict";function a(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}n.exports=a},{}],7:[function(o,n,i){"use strict";var a=30,l=12;n.exports=function(u,d){var f,m,h,g,v,y,b,S,w,_,C,k,A,R,I,B,E,P,L,j,z,W,O,M,D;f=u.state,m=u.next_in,M=u.input,h=m+(u.avail_in-5),g=u.next_out,D=u.output,v=g-(d-u.avail_out),y=g+(u.avail_out-257),b=f.dmax,S=f.wsize,w=f.whave,_=f.wnext,C=f.window,k=f.hold,A=f.bits,R=f.lencode,I=f.distcode,B=(1<<f.lenbits)-1,E=(1<<f.distbits)-1;e:do{A<15&&(k+=M[m++]<<A,A+=8,k+=M[m++]<<A,A+=8),P=R[k&B];t:for(;;){if(L=P>>>24,k>>>=L,A-=L,L=P>>>16&255,L===0)D[g++]=P&65535;else if(L&16){j=P&65535,L&=15,L&&(A<L&&(k+=M[m++]<<A,A+=8),j+=k&(1<<L)-1,k>>>=L,A-=L),A<15&&(k+=M[m++]<<A,A+=8,k+=M[m++]<<A,A+=8),P=I[k&E];r:for(;;){if(L=P>>>24,k>>>=L,A-=L,L=P>>>16&255,L&16){if(z=P&65535,L&=15,A<L&&(k+=M[m++]<<A,A+=8,A<L&&(k+=M[m++]<<A,A+=8)),z+=k&(1<<L)-1,z>b){u.msg="invalid distance too far back",f.mode=a;break e}if(k>>>=L,A-=L,L=g-v,z>L){if(L=z-L,L>w&&f.sane){u.msg="invalid distance too far back",f.mode=a;break e}if(W=0,O=C,_===0){if(W+=S-L,L<j){j-=L;do D[g++]=C[W++];while(--L);W=g-z,O=D}}else if(_<L){if(W+=S+_-L,L-=_,L<j){j-=L;do D[g++]=C[W++];while(--L);if(W=0,_<j){L=_,j-=L;do D[g++]=C[W++];while(--L);W=g-z,O=D}}}else if(W+=_-L,L<j){j-=L;do D[g++]=C[W++];while(--L);W=g-z,O=D}for(;j>2;)D[g++]=O[W++],D[g++]=O[W++],D[g++]=O[W++],j-=3;j&&(D[g++]=O[W++],j>1&&(D[g++]=O[W++]))}else{W=g-z;do D[g++]=D[W++],D[g++]=D[W++],D[g++]=D[W++],j-=3;while(j>2);j&&(D[g++]=D[W++],j>1&&(D[g++]=D[W++]))}}else if((L&64)===0){P=I[(P&65535)+(k&(1<<L)-1)];continue r}else{u.msg="invalid distance code",f.mode=a;break e}break}}else if((L&64)===0){P=R[(P&65535)+(k&(1<<L)-1)];continue t}else if(L&32){f.mode=l;break e}else{u.msg="invalid literal/length code",f.mode=a;break e}break}}while(m<h&&g<y);j=A>>3,m-=j,A-=j<<3,k&=(1<<A)-1,u.next_in=m,u.next_out=g,u.avail_in=m<h?5+(h-m):5-(m-h),u.avail_out=g<y?257+(y-g):257-(g-y),f.hold=k,f.bits=A}},{}],8:[function(o,n,i){"use strict";var a=o("../utils/common"),l=o("./adler32"),c=o("./crc32"),u=o("./inffast"),d=o("./inftrees"),f=0,m=1,h=2,g=4,v=5,y=6,b=0,S=1,w=2,_=-2,C=-3,k=-4,A=-5,R=8,I=1,B=2,E=3,P=4,L=5,j=6,z=7,W=8,O=9,M=10,D=11,G=12,q=13,Z=14,te=15,ie=16,Se=17,fe=18,X=19,ee=20,pe=21,ve=22,Ie=23,et=24,it=25,ne=26,$=27,ue=28,oe=29,me=30,Ne=31,Oe=32,De=852,le=592,be=15,ge=be;function ze(J){return(J>>>24&255)+(J>>>8&65280)+((J&65280)<<8)+((J&255)<<24)}function bt(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new a.Buf16(320),this.work=new a.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function cr(J){var xe;return!J||!J.state?_:(xe=J.state,J.total_in=J.total_out=xe.total=0,J.msg="",xe.wrap&&(J.adler=xe.wrap&1),xe.mode=I,xe.last=0,xe.havedict=0,xe.dmax=32768,xe.head=null,xe.hold=0,xe.bits=0,xe.lencode=xe.lendyn=new a.Buf32(De),xe.distcode=xe.distdyn=new a.Buf32(le),xe.sane=1,xe.back=-1,b)}function Ct(J){var xe;return!J||!J.state?_:(xe=J.state,xe.wsize=0,xe.whave=0,xe.wnext=0,cr(J))}function Jt(J,xe){var F,Ee;return!J||!J.state||(Ee=J.state,xe<0?(F=0,xe=-xe):(F=(xe>>4)+1,xe<48&&(xe&=15)),xe&&(xe<8||xe>15))?_:(Ee.window!==null&&Ee.wbits!==xe&&(Ee.window=null),Ee.wrap=F,Ee.wbits=xe,Ct(J))}function $t(J,xe){var F,Ee;return J?(Ee=new bt,J.state=Ee,Ee.window=null,F=Jt(J,xe),F!==b&&(J.state=null),F):_}function Ro(J){return $t(J,ge)}var En=!0,ye,Pr;function $o(J){if(En){var xe;for(ye=new a.Buf32(512),Pr=new a.Buf32(32),xe=0;xe<144;)J.lens[xe++]=8;for(;xe<256;)J.lens[xe++]=9;for(;xe<280;)J.lens[xe++]=7;for(;xe<288;)J.lens[xe++]=8;for(d(m,J.lens,0,288,ye,0,J.work,{bits:9}),xe=0;xe<32;)J.lens[xe++]=5;d(h,J.lens,0,32,Pr,0,J.work,{bits:5}),En=!1}J.lencode=ye,J.lenbits=9,J.distcode=Pr,J.distbits=5}function Er(J,xe,F,Ee){var ur,Ce=J.state;return Ce.window===null&&(Ce.wsize=1<<Ce.wbits,Ce.wnext=0,Ce.whave=0,Ce.window=new a.Buf8(Ce.wsize)),Ee>=Ce.wsize?(a.arraySet(Ce.window,xe,F-Ce.wsize,Ce.wsize,0),Ce.wnext=0,Ce.whave=Ce.wsize):(ur=Ce.wsize-Ce.wnext,ur>Ee&&(ur=Ee),a.arraySet(Ce.window,xe,F-Ee,ur,Ce.wnext),Ee-=ur,Ee?(a.arraySet(Ce.window,xe,F-Ee,Ee,0),Ce.wnext=Ee,Ce.whave=Ce.wsize):(Ce.wnext+=ur,Ce.wnext===Ce.wsize&&(Ce.wnext=0),Ce.whave<Ce.wsize&&(Ce.whave+=ur))),0}function Ru(J,xe){var F,Ee,ur,Ce,Pi,Pe,Jr,ae,se,Gp,er,Le,Wp,Yp,Br=0,Pt,Ao,Io,en,Au,qp,Vr,Ei,$r=new a.Buf8(4),ki,os,Vv=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!J||!J.state||!J.output||!J.input&&J.avail_in!==0)return _;F=J.state,F.mode===G&&(F.mode=q),Pi=J.next_out,ur=J.output,Jr=J.avail_out,Ce=J.next_in,Ee=J.input,Pe=J.avail_in,ae=F.hold,se=F.bits,Gp=Pe,er=Jr,Ei=b;e:for(;;)switch(F.mode){case I:if(F.wrap===0){F.mode=q;break}for(;se<16;){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}if(F.wrap&2&&ae===35615){F.check=0,$r[0]=ae&255,$r[1]=ae>>>8&255,F.check=c(F.check,$r,2,0),ae=0,se=0,F.mode=B;break}if(F.flags=0,F.head&&(F.head.done=!1),!(F.wrap&1)||(((ae&255)<<8)+(ae>>8))%31){J.msg="incorrect header check",F.mode=me;break}if((ae&15)!==R){J.msg="unknown compression method",F.mode=me;break}if(ae>>>=4,se-=4,Vr=(ae&15)+8,F.wbits===0)F.wbits=Vr;else if(Vr>F.wbits){J.msg="invalid window size",F.mode=me;break}F.dmax=1<<Vr,J.adler=F.check=1,F.mode=ae&512?M:G,ae=0,se=0;break;case B:for(;se<16;){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}if(F.flags=ae,(F.flags&255)!==R){J.msg="unknown compression method",F.mode=me;break}if(F.flags&57344){J.msg="unknown header flags set",F.mode=me;break}F.head&&(F.head.text=ae>>8&1),F.flags&512&&($r[0]=ae&255,$r[1]=ae>>>8&255,F.check=c(F.check,$r,2,0)),ae=0,se=0,F.mode=E;case E:for(;se<32;){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}F.head&&(F.head.time=ae),F.flags&512&&($r[0]=ae&255,$r[1]=ae>>>8&255,$r[2]=ae>>>16&255,$r[3]=ae>>>24&255,F.check=c(F.check,$r,4,0)),ae=0,se=0,F.mode=P;case P:for(;se<16;){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}F.head&&(F.head.xflags=ae&255,F.head.os=ae>>8),F.flags&512&&($r[0]=ae&255,$r[1]=ae>>>8&255,F.check=c(F.check,$r,2,0)),ae=0,se=0,F.mode=L;case L:if(F.flags&1024){for(;se<16;){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}F.length=ae,F.head&&(F.head.extra_len=ae),F.flags&512&&($r[0]=ae&255,$r[1]=ae>>>8&255,F.check=c(F.check,$r,2,0)),ae=0,se=0}else F.head&&(F.head.extra=null);F.mode=j;case j:if(F.flags&1024&&(Le=F.length,Le>Pe&&(Le=Pe),Le&&(F.head&&(Vr=F.head.extra_len-F.length,F.head.extra||(F.head.extra=new Array(F.head.extra_len)),a.arraySet(F.head.extra,Ee,Ce,Le,Vr)),F.flags&512&&(F.check=c(F.check,Ee,Le,Ce)),Pe-=Le,Ce+=Le,F.length-=Le),F.length))break e;F.length=0,F.mode=z;case z:if(F.flags&2048){if(Pe===0)break e;Le=0;do Vr=Ee[Ce+Le++],F.head&&Vr&&F.length<65536&&(F.head.name+=String.fromCharCode(Vr));while(Vr&&Le<Pe);if(F.flags&512&&(F.check=c(F.check,Ee,Le,Ce)),Pe-=Le,Ce+=Le,Vr)break e}else F.head&&(F.head.name=null);F.length=0,F.mode=W;case W:if(F.flags&4096){if(Pe===0)break e;Le=0;do Vr=Ee[Ce+Le++],F.head&&Vr&&F.length<65536&&(F.head.comment+=String.fromCharCode(Vr));while(Vr&&Le<Pe);if(F.flags&512&&(F.check=c(F.check,Ee,Le,Ce)),Pe-=Le,Ce+=Le,Vr)break e}else F.head&&(F.head.comment=null);F.mode=O;case O:if(F.flags&512){for(;se<16;){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}if(ae!==(F.check&65535)){J.msg="header crc mismatch",F.mode=me;break}ae=0,se=0}F.head&&(F.head.hcrc=F.flags>>9&1,F.head.done=!0),J.adler=F.check=0,F.mode=G;break;case M:for(;se<32;){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}J.adler=F.check=ze(ae),ae=0,se=0,F.mode=D;case D:if(F.havedict===0)return J.next_out=Pi,J.avail_out=Jr,J.next_in=Ce,J.avail_in=Pe,F.hold=ae,F.bits=se,w;J.adler=F.check=1,F.mode=G;case G:if(xe===v||xe===y)break e;case q:if(F.last){ae>>>=se&7,se-=se&7,F.mode=$;break}for(;se<3;){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}switch(F.last=ae&1,ae>>>=1,se-=1,ae&3){case 0:F.mode=Z;break;case 1:if($o(F),F.mode=ee,xe===y){ae>>>=2,se-=2;break e}break;case 2:F.mode=Se;break;case 3:J.msg="invalid block type",F.mode=me}ae>>>=2,se-=2;break;case Z:for(ae>>>=se&7,se-=se&7;se<32;){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}if((ae&65535)!==(ae>>>16^65535)){J.msg="invalid stored block lengths",F.mode=me;break}if(F.length=ae&65535,ae=0,se=0,F.mode=te,xe===y)break e;case te:F.mode=ie;case ie:if(Le=F.length,Le){if(Le>Pe&&(Le=Pe),Le>Jr&&(Le=Jr),Le===0)break e;a.arraySet(ur,Ee,Ce,Le,Pi),Pe-=Le,Ce+=Le,Jr-=Le,Pi+=Le,F.length-=Le;break}F.mode=G;break;case Se:for(;se<14;){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}if(F.nlen=(ae&31)+257,ae>>>=5,se-=5,F.ndist=(ae&31)+1,ae>>>=5,se-=5,F.ncode=(ae&15)+4,ae>>>=4,se-=4,F.nlen>286||F.ndist>30){J.msg="too many length or distance symbols",F.mode=me;break}F.have=0,F.mode=fe;case fe:for(;F.have<F.ncode;){for(;se<3;){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}F.lens[Vv[F.have++]]=ae&7,ae>>>=3,se-=3}for(;F.have<19;)F.lens[Vv[F.have++]]=0;if(F.lencode=F.lendyn,F.lenbits=7,ki={bits:F.lenbits},Ei=d(f,F.lens,0,19,F.lencode,0,F.work,ki),F.lenbits=ki.bits,Ei){J.msg="invalid code lengths set",F.mode=me;break}F.have=0,F.mode=X;case X:for(;F.have<F.nlen+F.ndist;){for(;Br=F.lencode[ae&(1<<F.lenbits)-1],Pt=Br>>>24,Ao=Br>>>16&255,Io=Br&65535,!(Pt<=se);){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}if(Io<16)ae>>>=Pt,se-=Pt,F.lens[F.have++]=Io;else{if(Io===16){for(os=Pt+2;se<os;){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}if(ae>>>=Pt,se-=Pt,F.have===0){J.msg="invalid bit length repeat",F.mode=me;break}Vr=F.lens[F.have-1],Le=3+(ae&3),ae>>>=2,se-=2}else if(Io===17){for(os=Pt+3;se<os;){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}ae>>>=Pt,se-=Pt,Vr=0,Le=3+(ae&7),ae>>>=3,se-=3}else{for(os=Pt+7;se<os;){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}ae>>>=Pt,se-=Pt,Vr=0,Le=11+(ae&127),ae>>>=7,se-=7}if(F.have+Le>F.nlen+F.ndist){J.msg="invalid bit length repeat",F.mode=me;break}for(;Le--;)F.lens[F.have++]=Vr}}if(F.mode===me)break;if(F.lens[256]===0){J.msg="invalid code -- missing end-of-block",F.mode=me;break}if(F.lenbits=9,ki={bits:F.lenbits},Ei=d(m,F.lens,0,F.nlen,F.lencode,0,F.work,ki),F.lenbits=ki.bits,Ei){J.msg="invalid literal/lengths set",F.mode=me;break}if(F.distbits=6,F.distcode=F.distdyn,ki={bits:F.distbits},Ei=d(h,F.lens,F.nlen,F.ndist,F.distcode,0,F.work,ki),F.distbits=ki.bits,Ei){J.msg="invalid distances set",F.mode=me;break}if(F.mode=ee,xe===y)break e;case ee:F.mode=pe;case pe:if(Pe>=6&&Jr>=258){J.next_out=Pi,J.avail_out=Jr,J.next_in=Ce,J.avail_in=Pe,F.hold=ae,F.bits=se,u(J,er),Pi=J.next_out,ur=J.output,Jr=J.avail_out,Ce=J.next_in,Ee=J.input,Pe=J.avail_in,ae=F.hold,se=F.bits,F.mode===G&&(F.back=-1);break}for(F.back=0;Br=F.lencode[ae&(1<<F.lenbits)-1],Pt=Br>>>24,Ao=Br>>>16&255,Io=Br&65535,!(Pt<=se);){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}if(Ao&&(Ao&240)===0){for(en=Pt,Au=Ao,qp=Io;Br=F.lencode[qp+((ae&(1<<en+Au)-1)>>en)],Pt=Br>>>24,Ao=Br>>>16&255,Io=Br&65535,!(en+Pt<=se);){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}ae>>>=en,se-=en,F.back+=en}if(ae>>>=Pt,se-=Pt,F.back+=Pt,F.length=Io,Ao===0){F.mode=ne;break}if(Ao&32){F.back=-1,F.mode=G;break}if(Ao&64){J.msg="invalid literal/length code",F.mode=me;break}F.extra=Ao&15,F.mode=ve;case ve:if(F.extra){for(os=F.extra;se<os;){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}F.length+=ae&(1<<F.extra)-1,ae>>>=F.extra,se-=F.extra,F.back+=F.extra}F.was=F.length,F.mode=Ie;case Ie:for(;Br=F.distcode[ae&(1<<F.distbits)-1],Pt=Br>>>24,Ao=Br>>>16&255,Io=Br&65535,!(Pt<=se);){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}if((Ao&240)===0){for(en=Pt,Au=Ao,qp=Io;Br=F.distcode[qp+((ae&(1<<en+Au)-1)>>en)],Pt=Br>>>24,Ao=Br>>>16&255,Io=Br&65535,!(en+Pt<=se);){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}ae>>>=en,se-=en,F.back+=en}if(ae>>>=Pt,se-=Pt,F.back+=Pt,Ao&64){J.msg="invalid distance code",F.mode=me;break}F.offset=Io,F.extra=Ao&15,F.mode=et;case et:if(F.extra){for(os=F.extra;se<os;){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}F.offset+=ae&(1<<F.extra)-1,ae>>>=F.extra,se-=F.extra,F.back+=F.extra}if(F.offset>F.dmax){J.msg="invalid distance too far back",F.mode=me;break}F.mode=it;case it:if(Jr===0)break e;if(Le=er-Jr,F.offset>Le){if(Le=F.offset-Le,Le>F.whave&&F.sane){J.msg="invalid distance too far back",F.mode=me;break}Le>F.wnext?(Le-=F.wnext,Wp=F.wsize-Le):Wp=F.wnext-Le,Le>F.length&&(Le=F.length),Yp=F.window}else Yp=ur,Wp=Pi-F.offset,Le=F.length;Le>Jr&&(Le=Jr),Jr-=Le,F.length-=Le;do ur[Pi++]=Yp[Wp++];while(--Le);F.length===0&&(F.mode=pe);break;case ne:if(Jr===0)break e;ur[Pi++]=F.length,Jr--,F.mode=pe;break;case $:if(F.wrap){for(;se<32;){if(Pe===0)break e;Pe--,ae|=Ee[Ce++]<<se,se+=8}if(er-=Jr,J.total_out+=er,F.total+=er,er&&(J.adler=F.check=F.flags?c(F.check,ur,er,Pi-er):l(F.check,ur,er,Pi-er)),er=Jr,(F.flags?ae:ze(ae))!==F.check){J.msg="incorrect data check",F.mode=me;break}ae=0,se=0}F.mode=ue;case ue:if(F.wrap&&F.flags){for(;se<32;){if(Pe===0)break e;Pe--,ae+=Ee[Ce++]<<se,se+=8}if(ae!==(F.total&4294967295)){J.msg="incorrect length check",F.mode=me;break}ae=0,se=0}F.mode=oe;case oe:Ei=S;break e;case me:Ei=C;break e;case Ne:return k;case Oe:default:return _}return J.next_out=Pi,J.avail_out=Jr,J.next_in=Ce,J.avail_in=Pe,F.hold=ae,F.bits=se,(F.wsize||er!==J.avail_out&&F.mode<me&&(F.mode<$||xe!==g))&&Er(J,J.output,J.next_out,er-J.avail_out)?(F.mode=Ne,k):(Gp-=J.avail_in,er-=J.avail_out,J.total_in+=Gp,J.total_out+=er,F.total+=er,F.wrap&&er&&(J.adler=F.check=F.flags?c(F.check,ur,er,J.next_out-er):l(F.check,ur,er,J.next_out-er)),J.data_type=F.bits+(F.last?64:0)+(F.mode===G?128:0)+(F.mode===ee||F.mode===te?256:0),(Gp===0&&er===0||xe===g)&&Ei===b&&(Ei=A),Ei)}function kn(J){if(!J||!J.state)return _;var xe=J.state;return xe.window&&(xe.window=null),J.state=null,b}function Qn(J,xe){var F;return!J||!J.state||(F=J.state,(F.wrap&2)===0)?_:(F.head=xe,xe.done=!1,b)}function Ls(J,xe){var F=xe.length,Ee,ur,Ce;return!J||!J.state||(Ee=J.state,Ee.wrap!==0&&Ee.mode!==D)?_:Ee.mode===D&&(ur=1,ur=l(ur,xe,F,0),ur!==Ee.check)?C:(Ce=Er(J,xe,F,F),Ce?(Ee.mode=Ne,k):(Ee.havedict=1,b))}i.inflateReset=Ct,i.inflateReset2=Jt,i.inflateResetKeep=cr,i.inflateInit=Ro,i.inflateInit2=$t,i.inflate=Ru,i.inflateEnd=kn,i.inflateGetHeader=Qn,i.inflateSetDictionary=Ls,i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(o,n,i){"use strict";var a=o("../utils/common"),l=15,c=852,u=592,d=0,f=1,m=2,h=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],v=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],y=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];n.exports=function(S,w,_,C,k,A,R,I){var B=I.bits,E=0,P=0,L=0,j=0,z=0,W=0,O=0,M=0,D=0,G=0,q,Z,te,ie,Se,fe=null,X=0,ee,pe=new a.Buf16(l+1),ve=new a.Buf16(l+1),Ie=null,et=0,it,ne,$;for(E=0;E<=l;E++)pe[E]=0;for(P=0;P<C;P++)pe[w[_+P]]++;for(z=B,j=l;j>=1&&pe[j]===0;j--);if(z>j&&(z=j),j===0)return k[A++]=1<<24|64<<16|0,k[A++]=1<<24|64<<16|0,I.bits=1,0;for(L=1;L<j&&pe[L]===0;L++);for(z<L&&(z=L),M=1,E=1;E<=l;E++)if(M<<=1,M-=pe[E],M<0)return-1;if(M>0&&(S===d||j!==1))return-1;for(ve[1]=0,E=1;E<l;E++)ve[E+1]=ve[E]+pe[E];for(P=0;P<C;P++)w[_+P]!==0&&(R[ve[w[_+P]]++]=P);if(S===d?(fe=Ie=R,ee=19):S===f?(fe=h,X-=257,Ie=g,et-=257,ee=256):(fe=v,Ie=y,ee=-1),G=0,P=0,E=L,Se=A,W=z,O=0,te=-1,D=1<<z,ie=D-1,S===f&&D>c||S===m&&D>u)return 1;for(;;){it=E-O,R[P]<ee?(ne=0,$=R[P]):R[P]>ee?(ne=Ie[et+R[P]],$=fe[X+R[P]]):(ne=96,$=0),q=1<<E-O,Z=1<<W,L=Z;do Z-=q,k[Se+(G>>O)+Z]=it<<24|ne<<16|$|0;while(Z!==0);for(q=1<<E-1;G&q;)q>>=1;if(q!==0?(G&=q-1,G+=q):G=0,P++,--pe[E]===0){if(E===j)break;E=w[_+R[P]]}if(E>z&&(G&ie)!==te){for(O===0&&(O=z),Se+=L,W=E-O,M=1<<W;W+O<j&&(M-=pe[W+O],!(M<=0));)W++,M<<=1;if(D+=1<<W,S===f&&D>c||S===m&&D>u)return 1;te=G&ie,k[te]=z<<24|W<<16|Se-A|0}}return G!==0&&(k[Se+G]=E-O<<24|64<<16|0),I.bits=z,0}},{"../utils/common":1}],10:[function(o,n,i){"use strict";n.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(o,n,i){"use strict";function a(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}n.exports=a},{}],"/lib/inflate.js":[function(o,n,i){"use strict";var a=o("./zlib/inflate"),l=o("./utils/common"),c=o("./utils/strings"),u=o("./zlib/constants"),d=o("./zlib/messages"),f=o("./zlib/zstream"),m=o("./zlib/gzheader"),h=Object.prototype.toString;function g(b){if(!(this instanceof g))return new g(b);this.options=l.assign({chunkSize:16384,windowBits:0,to:""},b||{});var S=this.options;S.raw&&S.windowBits>=0&&S.windowBits<16&&(S.windowBits=-S.windowBits,S.windowBits===0&&(S.windowBits=-15)),S.windowBits>=0&&S.windowBits<16&&!(b&&b.windowBits)&&(S.windowBits+=32),S.windowBits>15&&S.windowBits<48&&(S.windowBits&15)===0&&(S.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var w=a.inflateInit2(this.strm,S.windowBits);if(w!==u.Z_OK)throw new Error(d[w]);if(this.header=new m,a.inflateGetHeader(this.strm,this.header),S.dictionary&&(typeof S.dictionary=="string"?S.dictionary=c.string2buf(S.dictionary):h.call(S.dictionary)==="[object ArrayBuffer]"&&(S.dictionary=new Uint8Array(S.dictionary)),S.raw&&(w=a.inflateSetDictionary(this.strm,S.dictionary),w!==u.Z_OK)))throw new Error(d[w])}g.prototype.push=function(b,S){var w=this.strm,_=this.options.chunkSize,C=this.options.dictionary,k,A,R,I,B,E=!1;if(this.ended)return!1;A=S===~~S?S:S===!0?u.Z_FINISH:u.Z_NO_FLUSH,typeof b=="string"?w.input=c.binstring2buf(b):h.call(b)==="[object ArrayBuffer]"?w.input=new Uint8Array(b):w.input=b,w.next_in=0,w.avail_in=w.input.length;do{if(w.avail_out===0&&(w.output=new l.Buf8(_),w.next_out=0,w.avail_out=_),k=a.inflate(w,u.Z_NO_FLUSH),k===u.Z_NEED_DICT&&C&&(k=a.inflateSetDictionary(this.strm,C)),k===u.Z_BUF_ERROR&&E===!0&&(k=u.Z_OK,E=!1),k!==u.Z_STREAM_END&&k!==u.Z_OK)return this.onEnd(k),this.ended=!0,!1;w.next_out&&(w.avail_out===0||k===u.Z_STREAM_END||w.avail_in===0&&(A===u.Z_FINISH||A===u.Z_SYNC_FLUSH))&&(this.options.to==="string"?(R=c.utf8border(w.output,w.next_out),I=w.next_out-R,B=c.buf2string(w.output,R),w.next_out=I,w.avail_out=_-I,I&&l.arraySet(w.output,w.output,R,I,0),this.onData(B)):this.onData(l.shrinkBuf(w.output,w.next_out))),w.avail_in===0&&w.avail_out===0&&(E=!0)}while((w.avail_in>0||w.avail_out===0)&&k!==u.Z_STREAM_END);return k===u.Z_STREAM_END&&(A=u.Z_FINISH),A===u.Z_FINISH?(k=a.inflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===u.Z_OK):(A===u.Z_SYNC_FLUSH&&(this.onEnd(u.Z_OK),w.avail_out=0),!0)},g.prototype.onData=function(b){this.chunks.push(b)},g.prototype.onEnd=function(b){b===u.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=b,this.msg=this.strm.msg};function v(b,S){var w=new g(S);if(w.push(b,!0),w.err)throw w.msg||d[w.err];return w.result}function y(b,S){return S=S||{},S.raw=!0,v(b,S)}i.Inflate=g,i.inflate=v,i.inflateRaw=y,i.ungzip=v},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")})();var HRt=globalThis.fetch,AA=class{constructor(e,t={},r){this.type=e,this.detail=t,this.msg=r,Object.defineProperty(this,"__mayPropagate",{enumerable:!1,writable:!0}),this.__mayPropagate=!0}preventDefault(){}stopPropagation(){this.__mayPropagate=!1}valueOf(){return this}toString(){return this.msg?`[${this.type} event]: ${this.msg}`:`[${this.type} event]`}},FDe=class{constructor(){this.listeners={}}addEventListener(e,t,r){let o=this.listeners[e]||[];r?o.unshift(t):o.push(t),this.listeners[e]=o}removeEventListener(e,t){let r=this.listeners[e]||[],o=r.findIndex(n=>n===t);o>-1&&(r.splice(o,1),this.listeners[e]=r)}dispatch(e){let t=this.listeners[e.type];if(t)for(let r=0,o=t.length;r<o&&e.__mayPropagate;r++)t[r](e)}},DDe=new Date("1904-01-01T00:00:00+0000").getTime();function LDe(e){return Array.from(e).map(t=>String.fromCharCode(t)).join("")}var BDe=class{constructor(e,t,r){this.name=(r||e.tag||"").trim(),this.length=e.length,this.start=e.offset,this.offset=0,this.data=t,["getInt8","getUint8","getInt16","getUint16","getInt32","getUint32","getBigInt64","getBigUint64"].forEach(o=>{let n=o.replace(/get(Big)?/,"").toLowerCase(),i=parseInt(o.replace(/[^\d]/g,""))/8;Object.defineProperty(this,n,{get:()=>this.getValue(o,i)})})}get currentPosition(){return this.start+this.offset}set currentPosition(e){this.start=e,this.offset=0}skip(e=0,t=8){this.offset+=e*t/8}getValue(e,t){let r=this.start+this.offset;this.offset+=t;try{return this.data[e](r)}catch(o){throw console.error("parser",e,t,this),console.error("parser",this.start,this.offset),o}}flags(e){if(e===8||e===16||e===32||e===64)return this[`uint${e}`].toString(2).padStart(e,0).split("").map(t=>t==="1");console.error("Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long"),console.trace()}get tag(){let e=this.uint32;return LDe([e>>24&255,e>>16&255,e>>8&255,e&255])}get fixed(){let e=this.int16,t=Math.round(1e3*this.uint16/65356);return e+t/1e3}get legacyFixed(){let e=this.uint16,t=this.uint16.toString(16).padStart(4,0);return parseFloat(`${e}.${t}`)}get uint24(){return(this.uint8<<16)+(this.uint8<<8)+this.uint8}get uint128(){let e=0;for(let t=0;t<5;t++){let r=this.uint8;if(e=e*128+(r&127),r<128)break}return e}get longdatetime(){return new Date(DDe+1e3*parseInt(this.int64.toString()))}get fword(){return this.int16}get ufword(){return this.uint16}get Offset16(){return this.uint16}get Offset32(){return this.uint32}get F2DOT14(){let e=p.uint16,t=[0,1,-2,-1][e>>14],r=e&16383;return t+r/16384}verifyLength(){this.offset!=this.length&&console.error(`unexpected parsed table size (${this.offset}) for "${this.name}" (expected ${this.length})`)}readBytes(e=0,t=0,r=8,o=!1){if(e=e||this.length,e===0)return[];t&&(this.currentPosition=t);let n=`${o?"":"u"}int${r}`,i=[];for(;e--;)i.push(this[n]);return i}},Zr=class{constructor(e){Object.defineProperty(this,"parser",{enumerable:!1,get:()=>e});let r=e.currentPosition;Object.defineProperty(this,"start",{enumerable:!1,get:()=>r})}load(e){Object.keys(e).forEach(t=>{let r=Object.getOwnPropertyDescriptor(e,t);r.get?this[t]=r.get.bind(this):r.value!==void 0&&(this[t]=r.value)}),this.parser.length&&this.parser.verifyLength()}},rt=class extends Zr{constructor(e,t,r){let{parser:o,start:n}=super(new BDe(e,t,r));Object.defineProperty(this,"p",{enumerable:!1,get:()=>o}),Object.defineProperty(this,"tableStart",{enumerable:!1,get:()=>n})}};function Ae(e,t,r){let o;Object.defineProperty(e,t,{get:()=>o||(o=r(),o),enumerable:!0})}var VDe=class extends rt{constructor(e,t,r){let{p:o}=super({offset:0,length:12},t,"sfnt");this.version=o.uint32,this.numTables=o.uint16,this.searchRange=o.uint16,this.entrySelector=o.uint16,this.rangeShift=o.uint16,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(n=>new jDe(o)),this.tables={},this.directory.forEach(n=>{let i=()=>r(this.tables,{tag:n.tag,offset:n.offset,length:n.length},t);Ae(this.tables,n.tag.trim(),i)})}},jDe=class{constructor(e){this.tag=e.tag,this.checksum=e.uint32,this.offset=e.uint32,this.length=e.uint32}},Nse=Ose.inflate||void 0,Mse=void 0,zDe=class extends rt{constructor(e,t,r){let{p:o}=super({offset:0,length:44},t,"woff");this.signature=o.tag,this.flavor=o.uint32,this.length=o.uint32,this.numTables=o.uint16,o.uint16,this.totalSfntSize=o.uint32,this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.metaOffset=o.uint32,this.metaLength=o.uint32,this.metaOrigLength=o.uint32,this.privOffset=o.uint32,this.privLength=o.uint32,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(n=>new HDe(o)),UDe(this,t,r)}},HDe=class{constructor(e){this.tag=e.tag,this.offset=e.uint32,this.compLength=e.uint32,this.origLength=e.uint32,this.origChecksum=e.uint32}};function UDe(e,t,r){e.tables={},e.directory.forEach(o=>{Ae(e.tables,o.tag.trim(),()=>{let n=0,i=t;if(o.compLength!==o.origLength){let a=t.buffer.slice(o.offset,o.offset+o.compLength),l;if(Nse)l=Nse(new Uint8Array(a));else if(Mse)l=Mse(new Uint8Array(a));else{let c="no brotli decoder available to decode WOFF2 font";throw font.onerror&&font.onerror(c),new Error(c)}i=new DataView(l.buffer)}else n=o.offset;return r(e.tables,{tag:o.tag,offset:n,length:o.origLength},i)})})}var Fse=Ise,Dse=void 0,GDe=class extends rt{constructor(e,t,r){let{p:o}=super({offset:0,length:48},t,"woff2");this.signature=o.tag,this.flavor=o.uint32,this.length=o.uint32,this.numTables=o.uint16,o.uint16,this.totalSfntSize=o.uint32,this.totalCompressedSize=o.uint32,this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.metaOffset=o.uint32,this.metaLength=o.uint32,this.metaOrigLength=o.uint32,this.privOffset=o.uint32,this.privLength=o.uint32,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(l=>new WDe(o));let n=o.currentPosition;this.directory[0].offset=0,this.directory.forEach((l,c)=>{let u=this.directory[c+1];u&&(u.offset=l.offset+(l.transformLength!==void 0?l.transformLength:l.origLength))});let i,a=t.buffer.slice(n);if(Fse)i=Fse(new Uint8Array(a));else if(Dse)i=new Uint8Array(Dse(a));else{let l="no brotli decoder available to decode WOFF2 font";throw e.onerror&&e.onerror(l),new Error(l)}YDe(this,i,r)}},WDe=class{constructor(e){this.flags=e.uint8;let t=this.tagNumber=this.flags&63;t===63?this.tag=e.tag:this.tag=qDe(t);let o=(this.transformVersion=(this.flags&192)>>6)!==0;(this.tag==="glyf"||this.tag==="loca")&&(o=this.transformVersion!==3),this.origLength=e.uint128,o&&(this.transformLength=e.uint128)}};function YDe(e,t,r){e.tables={},e.directory.forEach(o=>{Ae(e.tables,o.tag.trim(),()=>{let n=o.offset,i=n+(o.transformLength?o.transformLength:o.origLength),a=new DataView(t.slice(n,i).buffer);try{return r(e.tables,{tag:o.tag,offset:0,length:o.origLength},a)}catch(l){console.error(l)}})})}function qDe(e){return["cmap","head","hhea","hmtx","maxp","name","OS/2","post","cvt ","fpgm","glyf","loca","prep","CFF ","VORG","EBDT","EBLC","gasp","hdmx","kern","LTSH","PCLT","VDMX","vhea","vmtx","BASE","GDEF","GPOS","GSUB","EBSC","JSTF","MATH","CBDT","CBLC","COLR","CPAL","SVG ","sbix","acnt","avar","bdat","bloc","bsln","cvar","fdsc","feat","fmtx","fvar","gvar","hsty","just","lcar","mort","morx","opbd","prop","trak","Zapf","Silf","Glat","Gloc","Feat","Sill"][e&63]}var Use={},Gse=!1;Promise.all([Promise.resolve().then(function(){return SLe}),Promise.resolve().then(function(){return xLe}),Promise.resolve().then(function(){return TLe}),Promise.resolve().then(function(){return kLe}),Promise.resolve().then(function(){return ALe}),Promise.resolve().then(function(){return FLe}),Promise.resolve().then(function(){return LLe}),Promise.resolve().then(function(){return VLe}),Promise.resolve().then(function(){return ZLe}),Promise.resolve().then(function(){return sBe}),Promise.resolve().then(function(){return qBe}),Promise.resolve().then(function(){return ZBe}),Promise.resolve().then(function(){return $Be}),Promise.resolve().then(function(){return oVe}),Promise.resolve().then(function(){return iVe}),Promise.resolve().then(function(){return aVe}),Promise.resolve().then(function(){return uVe}),Promise.resolve().then(function(){return fVe}),Promise.resolve().then(function(){return pVe}),Promise.resolve().then(function(){return gVe}),Promise.resolve().then(function(){return yVe}),Promise.resolve().then(function(){return wVe}),Promise.resolve().then(function(){return xVe}),Promise.resolve().then(function(){return PVe}),Promise.resolve().then(function(){return EVe}),Promise.resolve().then(function(){return RVe}),Promise.resolve().then(function(){return IVe}),Promise.resolve().then(function(){return NVe}),Promise.resolve().then(function(){return FVe}),Promise.resolve().then(function(){return BVe}),Promise.resolve().then(function(){return GVe}),Promise.resolve().then(function(){return KVe}),Promise.resolve().then(function(){return QVe}),Promise.resolve().then(function(){return t8e}),Promise.resolve().then(function(){return o8e}),Promise.resolve().then(function(){return i8e}),Promise.resolve().then(function(){return l8e}),Promise.resolve().then(function(){return u8e}),Promise.resolve().then(function(){return h8e}),Promise.resolve().then(function(){return v8e}),Promise.resolve().then(function(){return w8e})]).then(e=>{e.forEach(t=>{let r=Object.keys(t)[0];Use[r]=t[r]}),Gse=!0});function KDe(e,t,r){let o=t.tag.replace(/[^\w\d]/g,""),n=Use[o];return n?new n(t,r,e):(console.warn(`lib-font has no definition for ${o}. The table was skipped.`),{})}function ZDe(){let e=0;function t(r,o){if(!Gse)return e>10?o(new Error("loading took too long")):(e++,setTimeout(()=>t(r),250));r(KDe)}return new Promise((r,o)=>t(r))}function XDe(e,t){let r=e.lastIndexOf("."),o=(e.substring(r+1)||"").toLowerCase(),n={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"}[o];if(n)return n;let i={eot:"The .eot format is not supported: it died in January 12, 2016, when Microsoft retired all versions of IE that didn't already support WOFF.",svg:"The .svg format is not supported: SVG fonts (not to be confused with OpenType with embedded SVG) were so bad we took the entire fonts chapter out of the SVG specification again.",fon:"The .fon format is not supported: this is an ancient Windows bitmap font format.",ttc:"Based on the current CSS specification, font collections are not (yet?) supported."}[o];if(i||(i=`${e} is not a known webfont format.`),t)throw new Error(i);console.warn(`Could not load font: ${i}`)}async function QDe(e,t,r={}){if(!globalThis.document)return;let o=XDe(t,r.errorOnStyle);if(!o)return;let n=document.createElement("style");n.className="injected-by-Font-js";let i=[];return r.styleRules&&(i=Object.entries(r.styleRules).map(([a,l])=>`${a}: ${l};`)),n.textContent=`
48 @font-face {
49 font-family: "${e}";
50 ${i.join(`
51 `)}
52 src: url("${t}") format("${o}");
53 }`,globalThis.document.head.appendChild(n),n}var JDe=[0,1,0,0],$De=[79,84,84,79],eLe=[119,79,70,70],tLe=[119,79,70,50];function IA(e,t){if(e.length===t.length){for(let r=0;r<e.length;r++)if(e[r]!==t[r])return;return!0}}function rLe(e){let t=[e.getUint8(0),e.getUint8(1),e.getUint8(2),e.getUint8(3)];if(IA(t,JDe)||IA(t,$De))return"SFNT";if(IA(t,eLe))return"WOFF";if(IA(t,tLe))return"WOFF2"}function oLe(e){if(!e.ok)throw new Error(`HTTP ${e.status} - ${e.statusText}`);return e}var NA=class extends FDe{constructor(e,t={}){super(),this.name=e,this.options=t,this.metrics=!1}get src(){return this.__src}set src(e){this.__src=e,(async()=>(globalThis.document&&!this.options.skipStyleSheet&&await QDe(this.name,e,this.options),this.loadFont(e)))()}async loadFont(e,t){fetch(e).then(r=>oLe(r)&&r.arrayBuffer()).then(r=>this.fromDataBuffer(r,t||e)).catch(r=>{let o=new AA("error",r,`Failed to load font at ${t||e}`);this.dispatch(o),this.onerror&&this.onerror(o)})}async fromDataBuffer(e,t){this.fontData=new DataView(e);let r=rLe(this.fontData);if(!r)throw new Error(`${t} is either an unsupported font format, or not a font at all.`);await this.parseBasicData(r);let o=new AA("load",{font:this});this.dispatch(o),this.onload&&this.onload(o)}async parseBasicData(e){return ZDe().then(t=>(e==="SFNT"&&(this.opentype=new VDe(this,this.fontData,t)),e==="WOFF"&&(this.opentype=new zDe(this,this.fontData,t)),e==="WOFF2"&&(this.opentype=new GDe(this,this.fontData,t)),this.opentype))}getGlyphId(e){return this.opentype.tables.cmap.getGlyphId(e)}reverse(e){return this.opentype.tables.cmap.reverse(e)}supports(e){return this.getGlyphId(e)!==0}supportsVariation(e){return this.opentype.tables.cmap.supportsVariation(e)!==!1}measureText(e,t=16){if(this.__unloaded)throw new Error("Cannot measure text: font was unloaded. Please reload before calling measureText()");let r=document.createElement("div");r.textContent=e,r.style.fontFamily=this.name,r.style.fontSize=`${t}px`,r.style.color="transparent",r.style.background="transparent",r.style.top="0",r.style.left="0",r.style.position="absolute",document.body.appendChild(r);let o=r.getBoundingClientRect();document.body.removeChild(r);let n=this.opentype.tables["OS/2"];return o.fontSize=t,o.ascender=n.sTypoAscender,o.descender=n.sTypoDescender,o}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);let e=new AA("unload",{font:this});this.dispatch(e),this.onunload&&this.onunload(e)}this._unloaded=!0}load(){if(this.__unloaded){delete this.__unloaded,document.head.appendChild(this.styleElement);let e=new AA("load",{font:this});this.dispatch(e),this.onload&&this.onload(e)}}};globalThis.Font=NA;var Od=class extends Zr{constructor(e,t,r){super(e),this.plaformID=t,this.encodingID=r}},nLe=class extends Od{constructor(e,t,r){super(e,t,r),this.format=0,this.length=e.uint16,this.language=e.uint16,this.glyphIdArray=[...new Array(256)].map(o=>e.uint8)}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.")),0<=e&&e<=255}reverse(e){return console.warn("reverse not implemented for cmap subtable format 0"),{}}getSupportedCharCodes(){return[{start:1,end:256}]}},iLe=class extends Od{constructor(e,t,r){super(e,t,r),this.format=2,this.length=e.uint16,this.language=e.uint16,this.subHeaderKeys=[...new Array(256)].map(a=>e.uint16);let o=Math.max(...this.subHeaderKeys),n=e.currentPosition;Ae(this,"subHeaders",()=>(e.currentPosition=n,[...new Array(o)].map(a=>new sLe(e))));let i=n+o*8;Ae(this,"glyphIndexArray",()=>(e.currentPosition=i,[...new Array(o)].map(a=>e.uint16)))}supports(e){e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented."));let t=e&&255,r=e&&65280,o=this.subHeaders[r],n=this.subHeaders[o],i=n.firstCode,a=i+n.entryCount;return i<=t&&t<=a}reverse(e){return console.warn("reverse not implemented for cmap subtable format 2"),{}}getSupportedCharCodes(e=!1){return e?this.subHeaders.map(t=>({firstCode:t.firstCode,lastCode:t.lastCode})):this.subHeaders.map(t=>({start:t.firstCode,end:t.lastCode}))}},sLe=class{constructor(e){this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.first+this.entryCount,this.idDelta=e.int16,this.idRangeOffset=e.uint16}},aLe=class extends Od{constructor(e,t,r){super(e,t,r),this.format=4,this.length=e.uint16,this.language=e.uint16,this.segCountX2=e.uint16,this.segCount=this.segCountX2/2,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16;let o=e.currentPosition;Ae(this,"endCode",()=>e.readBytes(this.segCount,o,16));let n=o+2+this.segCountX2;Ae(this,"startCode",()=>e.readBytes(this.segCount,n,16));let i=n+this.segCountX2;Ae(this,"idDelta",()=>e.readBytes(this.segCount,i,16,!0));let a=i+this.segCountX2;Ae(this,"idRangeOffset",()=>e.readBytes(this.segCount,a,16));let l=a+this.segCountX2,c=this.length-(l-this.tableStart);Ae(this,"glyphIdArray",()=>e.readBytes(c,l,16)),Ae(this,"segments",()=>this.buildSegments(a,l,e))}buildSegments(e,t,r){let o=(n,i)=>{let a=this.startCode[i],l=this.endCode[i],c=this.idDelta[i],u=this.idRangeOffset[i],d=e+2*i,f=[];if(u===0)for(let m=a+c,h=l+c;m<=h;m++)f.push(m);else for(let m=0,h=l-a;m<=h;m++)r.currentPosition=d+u+m*2,f.push(r.uint16);return{startCode:a,endCode:l,idDelta:c,idRangeOffset:u,glyphIDs:f}};return[...new Array(this.segCount)].map(o)}reverse(e){let t=this.segments.find(o=>o.glyphIDs.includes(e));if(!t)return{};let r=t.startCode+t.glyphIDs.indexOf(e);return{code:r,unicode:String.fromCodePoint(r)}}getGlyphId(e){if(e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343||(e&65534)===65534||(e&65535)===65535)return 0;let t=this.segments.find(r=>r.startCode<=e&&e<=r.endCode);return t?t.glyphIDs[e-t.startCode]:0}supports(e){return this.getGlyphId(e)!==0}getSupportedCharCodes(e=!1){return e?this.segments:this.segments.map(t=>({start:t.startCode,end:t.endCode}))}},lLe=class extends Od{constructor(e,t,r){super(e,t,r),this.format=6,this.length=e.uint16,this.language=e.uint16,this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.firstCode+this.entryCount-1,Ae(this,"glyphIdArray",()=>[...new Array(this.entryCount)].map(n=>e.uint16))}supports(e){if(e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.")),e<this.firstCode)return{};if(e>this.firstCode+this.entryCount)return{};let t=e-this.firstCode;return{code:t,unicode:String.fromCodePoint(t)}}reverse(e){let t=this.glyphIdArray.indexOf(e);if(t>-1)return this.firstCode+t}getSupportedCharCodes(e=!1){return e?[{firstCode:this.firstCode,lastCode:this.lastCode}]:[{start:this.firstCode,end:this.lastCode}]}},cLe=class extends Od{constructor(e,t,r){super(e,t,r),this.format=8,e.uint16,this.length=e.uint32,this.language=e.uint32,this.is32=[...new Array(8192)].map(n=>e.uint8),this.numGroups=e.uint32,Ae(this,"groups",()=>[...new Array(this.numGroups)].map(n=>new uLe(e)))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.")),this.groups.findIndex(t=>t.startcharCode<=e&&e<=t.endcharCode)!==-1}reverse(e){return console.warn("reverse not implemented for cmap subtable format 8"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map(t=>({start:t.startcharCode,end:t.endcharCode}))}},uLe=class{constructor(e){this.startcharCode=e.uint32,this.endcharCode=e.uint32,this.startGlyphID=e.uint32}},dLe=class extends Od{constructor(e,t,r){super(e,t,r),this.format=10,e.uint16,this.length=e.uint32,this.language=e.uint32,this.startCharCode=e.uint32,this.numChars=e.uint32,this.endCharCode=this.startCharCode+this.numChars,Ae(this,"glyphs",()=>[...new Array(this.numChars)].map(n=>e.uint16))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.")),e<this.startCharCode||e>this.startCharCode+this.numChars?!1:e-this.startCharCode}reverse(e){return console.warn("reverse not implemented for cmap subtable format 10"),{}}getSupportedCharCodes(e=!1){return e?[{startCharCode:this.startCharCode,endCharCode:this.endCharCode}]:[{start:this.startCharCode,end:this.endCharCode}]}},fLe=class extends Od{constructor(e,t,r){super(e,t,r),this.format=12,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32,Ae(this,"groups",()=>[...new Array(this.numGroups)].map(n=>new mLe(e)))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343||(e&65534)===65534||(e&65535)===65535?0:this.groups.findIndex(t=>t.startCharCode<=e&&e<=t.endCharCode)!==-1}reverse(e){for(let t of this.groups){let r=t.startGlyphID;if(r>e)continue;if(r===e)return t.startCharCode;if(r+(t.endCharCode-t.startCharCode)<e)continue;let n=t.startCharCode+(e-r);return{code:n,unicode:String.fromCodePoint(n)}}return{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map(t=>({start:t.startCharCode,end:t.endCharCode}))}},mLe=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.startGlyphID=e.uint32}},pLe=class extends Od{constructor(e,t,r){super(e,t,r),this.format=13,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;let o=[...new Array(this.numGroups)].map(n=>new hLe(e));Ae(this,"groups",o)}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),this.groups.findIndex(t=>t.startCharCode<=e&&e<=t.endCharCode)!==-1}reverse(e){return console.warn("reverse not implemented for cmap subtable format 13"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map(t=>({start:t.startCharCode,end:t.endCharCode}))}},hLe=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.glyphID=e.uint32}},gLe=class extends Od{constructor(e,t,r){super(e,t,r),this.subTableStart=e.currentPosition,this.format=14,this.length=e.uint32,this.numVarSelectorRecords=e.uint32,Ae(this,"varSelectors",()=>[...new Array(this.numVarSelectorRecords)].map(o=>new vLe(e)))}supports(){return console.warn("supports not implemented for cmap subtable format 14"),0}getSupportedCharCodes(){return console.warn("getSupportedCharCodes not implemented for cmap subtable format 14"),[]}reverse(e){return console.warn("reverse not implemented for cmap subtable format 14"),{}}supportsVariation(e){let t=this.varSelector.find(r=>r.varSelector===e);return t||!1}getSupportedVariations(){return this.varSelectors.map(e=>e.varSelector)}},vLe=class{constructor(e){this.varSelector=e.uint24,this.defaultUVSOffset=e.Offset32,this.nonDefaultUVSOffset=e.Offset32}};function yLe(e,t,r){let o=e.uint16;return o===0?new nLe(e,t,r):o===2?new iLe(e,t,r):o===4?new aLe(e,t,r):o===6?new lLe(e,t,r):o===8?new cLe(e,t,r):o===10?new dLe(e,t,r):o===12?new fLe(e,t,r):o===13?new pLe(e,t,r):o===14?new gLe(e,t,r):{}}var bLe=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numTables=r.uint16,this.encodingRecords=[...new Array(this.numTables)].map(o=>new wLe(r,this.tableStart))}getSubTable(e){return this.encodingRecords[e].table}getSupportedEncodings(){return this.encodingRecords.map(e=>({platformID:e.platformID,encodingId:e.encodingID}))}getSupportedCharCodes(e,t){let r=this.encodingRecords.findIndex(n=>n.platformID===e&&n.encodingID===t);return r===-1?!1:this.getSubTable(r).getSupportedCharCodes()}reverse(e){for(let t=0;t<this.numTables;t++){let r=this.getSubTable(t).reverse(e);if(r)return r}}getGlyphId(e){let t=0;return this.encodingRecords.some((r,o)=>{let n=this.getSubTable(o);return n.getGlyphId?(t=n.getGlyphId(e),t!==0):!1}),t}supports(e){return this.encodingRecords.some((t,r)=>{let o=this.getSubTable(r);return o.supports&&o.supports(e)!==!1})}supportsVariation(e){return this.encodingRecords.some((t,r)=>{let o=this.getSubTable(r);return o.supportsVariation&&o.supportsVariation(e)!==!1})}},wLe=class{constructor(e,t){let r=this.platformID=e.uint16,o=this.encodingID=e.uint16,n=this.offset=e.Offset32;Ae(this,"table",()=>(e.currentPosition=t+n,yLe(e,r,o)))}},SLe=Object.freeze({__proto__:null,cmap:bLe}),_Le=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.load({majorVersion:r.uint16,minorVersion:r.uint16,fontRevision:r.fixed,checkSumAdjustment:r.uint32,magicNumber:r.uint32,flags:r.flags(16),unitsPerEm:r.uint16,created:r.longdatetime,modified:r.longdatetime,xMin:r.int16,yMin:r.int16,xMax:r.int16,yMax:r.int16,macStyle:r.flags(16),lowestRecPPEM:r.uint16,fontDirectionHint:r.uint16,indexToLocFormat:r.uint16,glyphDataFormat:r.uint16})}},xLe=Object.freeze({__proto__:null,head:_Le}),CLe=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.ascender=r.fword,this.descender=r.fword,this.lineGap=r.fword,this.advanceWidthMax=r.ufword,this.minLeftSideBearing=r.fword,this.minRightSideBearing=r.fword,this.xMaxExtent=r.fword,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,r.int16,r.int16,r.int16,r.int16,this.metricDataFormat=r.int16,this.numberOfHMetrics=r.uint16,r.verifyLength()}},TLe=Object.freeze({__proto__:null,hhea:CLe}),PLe=class extends rt{constructor(e,t,r){let{p:o}=super(e,t),n=r.hhea.numberOfHMetrics,i=r.maxp.numGlyphs,a=o.currentPosition;if(Ae(this,"hMetrics",()=>(o.currentPosition=a,[...new Array(n)].map(l=>new ELe(o.uint16,o.int16)))),n<i){let l=a+n*4;Ae(this,"leftSideBearings",()=>(o.currentPosition=l,[...new Array(i-n)].map(c=>o.int16)))}}},ELe=class{constructor(e,t){this.advanceWidth=e,this.lsb=t}},kLe=Object.freeze({__proto__:null,hmtx:PLe}),RLe=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.version=r.legacyFixed,this.numGlyphs=r.uint16,this.version===1&&(this.maxPoints=r.uint16,this.maxContours=r.uint16,this.maxCompositePoints=r.uint16,this.maxCompositeContours=r.uint16,this.maxZones=r.uint16,this.maxTwilightPoints=r.uint16,this.maxStorage=r.uint16,this.maxFunctionDefs=r.uint16,this.maxInstructionDefs=r.uint16,this.maxStackElements=r.uint16,this.maxSizeOfInstructions=r.uint16,this.maxComponentElements=r.uint16,this.maxComponentDepth=r.uint16),r.verifyLength()}},ALe=Object.freeze({__proto__:null,maxp:RLe}),ILe=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.format=r.uint16,this.count=r.uint16,this.stringOffset=r.Offset16,this.nameRecords=[...new Array(this.count)].map(o=>new NLe(r,this)),this.format===1&&(this.langTagCount=r.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map(o=>new OLe(r.uint16,r.Offset16))),this.stringStart=this.tableStart+this.stringOffset}get(e){let t=this.nameRecords.find(r=>r.nameID===e);if(t)return t.string}},OLe=class{constructor(e,t){this.length=e,this.offset=t}},NLe=class{constructor(e,t){this.platformID=e.uint16,this.encodingID=e.uint16,this.languageID=e.uint16,this.nameID=e.uint16,this.length=e.uint16,this.offset=e.Offset16,Ae(this,"string",()=>(e.currentPosition=t.stringStart+this.offset,MLe(e,this)))}};function MLe(e,t){let{platformID:r,length:o}=t;if(o===0)return"";if(r===0||r===3){let a=[];for(let l=0,c=o/2;l<c;l++)a[l]=String.fromCharCode(e.uint16);return a.join("")}let n=e.readBytes(o),i=[];return n.forEach(function(a,l){i[l]=String.fromCharCode(a)}),i.join("")}var FLe=Object.freeze({__proto__:null,name:ILe}),DLe=class extends rt{constructor(e,t){let{p:r}=super(e,t);if(this.version=r.uint16,this.xAvgCharWidth=r.int16,this.usWeightClass=r.uint16,this.usWidthClass=r.uint16,this.fsType=r.uint16,this.ySubscriptXSize=r.int16,this.ySubscriptYSize=r.int16,this.ySubscriptXOffset=r.int16,this.ySubscriptYOffset=r.int16,this.ySuperscriptXSize=r.int16,this.ySuperscriptYSize=r.int16,this.ySuperscriptXOffset=r.int16,this.ySuperscriptYOffset=r.int16,this.yStrikeoutSize=r.int16,this.yStrikeoutPosition=r.int16,this.sFamilyClass=r.int16,this.panose=[...new Array(10)].map(o=>r.uint8),this.ulUnicodeRange1=r.flags(32),this.ulUnicodeRange2=r.flags(32),this.ulUnicodeRange3=r.flags(32),this.ulUnicodeRange4=r.flags(32),this.achVendID=r.tag,this.fsSelection=r.uint16,this.usFirstCharIndex=r.uint16,this.usLastCharIndex=r.uint16,this.sTypoAscender=r.int16,this.sTypoDescender=r.int16,this.sTypoLineGap=r.int16,this.usWinAscent=r.uint16,this.usWinDescent=r.uint16,this.version===0||(this.ulCodePageRange1=r.flags(32),this.ulCodePageRange2=r.flags(32),this.version===1)||(this.sxHeight=r.int16,this.sCapHeight=r.int16,this.usDefaultChar=r.uint16,this.usBreakChar=r.uint16,this.usMaxContext=r.uint16,this.version<=4)||(this.usLowerOpticalPointSize=r.uint16,this.usUpperOpticalPointSize=r.uint16,this.version===5))return r.verifyLength()}},LLe=Object.freeze({__proto__:null,OS2:DLe}),BLe=class extends rt{constructor(e,t){let{p:r}=super(e,t);if(this.version=r.legacyFixed,this.italicAngle=r.fixed,this.underlinePosition=r.fword,this.underlineThickness=r.fword,this.isFixedPitch=r.uint32,this.minMemType42=r.uint32,this.maxMemType42=r.uint32,this.minMemType1=r.uint32,this.maxMemType1=r.uint32,this.version===1||this.version===3)return r.verifyLength();if(this.numGlyphs=r.uint16,this.version===2){this.glyphNameIndex=[...new Array(this.numGlyphs)].map(o=>r.uint16),this.namesOffset=r.currentPosition,this.glyphNameOffsets=[1];for(let o=0;o<this.numGlyphs;o++){if(this.glyphNameIndex[o]<Lse.length){this.glyphNameOffsets.push(this.glyphNameOffsets[o]);continue}let i=r.int8;r.skip(i),this.glyphNameOffsets.push(this.glyphNameOffsets[o]+i+1)}}this.version===2.5&&(this.offset=[...new Array(this.numGlyphs)].map(o=>r.int8))}getGlyphName(e){if(this.version!==2)return console.warn(`post table version ${this.version} does not support glyph name lookups`),"";let t=this.glyphNameIndex[e];if(t<258)return Lse[t];let r=this.glyphNameOffsets[e],n=this.glyphNameOffsets[e+1]-r-1;return n===0?".notdef.":(this.parser.currentPosition=this.namesOffset+r,this.parser.readBytes(n,this.namesOffset+r,8,!0).map(a=>String.fromCharCode(a)).join(""))}},Lse=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"],VLe=Object.freeze({__proto__:null,post:BLe}),jLe=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.horizAxisOffset=r.Offset16,this.vertAxisOffset=r.Offset16,Ae(this,"horizAxis",()=>new W8({offset:e.offset+this.horizAxisOffset},t)),Ae(this,"vertAxis",()=>new W8({offset:e.offset+this.vertAxisOffset},t)),this.majorVersion===1&&this.minorVersion===1&&(this.itemVarStoreOffset=r.Offset32,Ae(this,"itemVarStore",()=>new W8({offset:e.offset+this.itemVarStoreOffset},t)))}},W8=class extends rt{constructor(e,t){let{p:r}=super(e,t,"AxisTable");this.baseTagListOffset=r.Offset16,this.baseScriptListOffset=r.Offset16,Ae(this,"baseTagList",()=>new zLe({offset:e.offset+this.baseTagListOffset},t)),Ae(this,"baseScriptList",()=>new HLe({offset:e.offset+this.baseScriptListOffset},t))}},zLe=class extends rt{constructor(e,t){let{p:r}=super(e,t,"BaseTagListTable");this.baseTagCount=r.uint16,this.baselineTags=[...new Array(this.baseTagCount)].map(o=>r.tag)}},HLe=class extends rt{constructor(e,t){let{p:r}=super(e,t,"BaseScriptListTable");this.baseScriptCount=r.uint16;let o=r.currentPosition;Ae(this,"baseScriptRecords",()=>(r.currentPosition=o,[...new Array(this.baseScriptCount)].map(n=>new ULe(this.start,r))))}},ULe=class{constructor(e,t){this.baseScriptTag=t.tag,this.baseScriptOffset=t.Offset16,Ae(this,"baseScriptTable",()=>(t.currentPosition=e+this.baseScriptOffset,new GLe(t)))}},GLe=class{constructor(e){this.start=e.currentPosition,this.baseValuesOffset=e.Offset16,this.defaultMinMaxOffset=e.Offset16,this.baseLangSysCount=e.uint16,this.baseLangSysRecords=[...new Array(this.baseLangSysCount)].map(t=>new WLe(this.start,e)),Ae(this,"baseValues",()=>(e.currentPosition=this.start+this.baseValuesOffset,new YLe(e))),Ae(this,"defaultMinMax",()=>(e.currentPosition=this.start+this.defaultMinMaxOffset,new Wse(e)))}},WLe=class{constructor(e,t){this.baseLangSysTag=t.tag,this.minMaxOffset=t.Offset16,Ae(this,"minMax",()=>(t.currentPosition=e+this.minMaxOffset,new Wse(t)))}},YLe=class{constructor(e){this.parser=e,this.start=e.currentPosition,this.defaultBaselineIndex=e.uint16,this.baseCoordCount=e.uint16,this.baseCoords=[...new Array(this.baseCoordCount)].map(t=>e.Offset16)}getTable(e){return this.parser.currentPosition=this.start+this.baseCoords[e],new KLe(this.parser)}},Wse=class{constructor(e){this.minCoord=e.Offset16,this.maxCoord=e.Offset16,this.featMinMaxCount=e.uint16;let t=e.currentPosition;Ae(this,"featMinMaxRecords",()=>(e.currentPosition=t,[...new Array(this.featMinMaxCount)].map(r=>new qLe(e))))}},qLe=class{constructor(e){this.featureTableTag=e.tag,this.minCoord=e.Offset16,this.maxCoord=e.Offset16}},KLe=class{constructor(e){this.baseCoordFormat=e.uint16,this.coordinate=e.int16,this.baseCoordFormat===2&&(this.referenceGlyph=e.uint16,this.baseCoordPoint=e.uint16),this.baseCoordFormat===3&&(this.deviceTable=e.Offset16)}},ZLe=Object.freeze({__proto__:null,BASE:jLe}),Bse=class{constructor(e){this.classFormat=e.uint16,this.classFormat===1&&(this.startGlyphID=e.uint16,this.glyphCount=e.uint16,this.classValueArray=[...new Array(this.glyphCount)].map(t=>e.uint16)),this.classFormat===2&&(this.classRangeCount=e.uint16,this.classRangeRecords=[...new Array(this.classRangeCount)].map(t=>new XLe(e)))}},XLe=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.class=e.uint16}},$1=class extends Zr{constructor(e){super(e),this.coverageFormat=e.uint16,this.coverageFormat===1&&(this.glyphCount=e.uint16,this.glyphArray=[...new Array(this.glyphCount)].map(t=>e.uint16)),this.coverageFormat===2&&(this.rangeCount=e.uint16,this.rangeRecords=[...new Array(this.rangeCount)].map(t=>new QLe(e)))}},QLe=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.startCoverageIndex=e.uint16}},JLe=class{constructor(e,t){this.table=e,this.parser=t,this.start=t.currentPosition,this.format=t.uint16,this.variationRegionListOffset=t.Offset32,this.itemVariationDataCount=t.uint16,this.itemVariationDataOffsets=[...new Array(this.itemVariationDataCount)].map(r=>t.Offset32)}},$Le=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.glyphClassDefOffset=r.Offset16,Ae(this,"glyphClassDefs",()=>{if(this.glyphClassDefOffset!==0)return r.currentPosition=this.tableStart+this.glyphClassDefOffset,new Bse(r)}),this.attachListOffset=r.Offset16,Ae(this,"attachList",()=>{if(this.attachListOffset!==0)return r.currentPosition=this.tableStart+this.attachListOffset,new eBe(r)}),this.ligCaretListOffset=r.Offset16,Ae(this,"ligCaretList",()=>{if(this.ligCaretListOffset!==0)return r.currentPosition=this.tableStart+this.ligCaretListOffset,new rBe(r)}),this.markAttachClassDefOffset=r.Offset16,Ae(this,"markAttachClassDef",()=>{if(this.markAttachClassDefOffset!==0)return r.currentPosition=this.tableStart+this.markAttachClassDefOffset,new Bse(r)}),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=r.Offset16,Ae(this,"markGlyphSetsDef",()=>{if(this.markGlyphSetsDefOffset!==0)return r.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new iBe(r)})),this.minorVersion===3&&(this.itemVarStoreOffset=r.Offset32,Ae(this,"itemVarStore",()=>{if(this.itemVarStoreOffset!==0)return r.currentPosition=this.tableStart+this.itemVarStoreOffset,new JLe(r)}))}},eBe=class extends Zr{constructor(e){super(e),this.coverageOffset=e.Offset16,this.glyphCount=e.uint16,this.attachPointOffsets=[...new Array(this.glyphCount)].map(t=>e.Offset16)}getPoint(e){return this.parser.currentPosition=this.start+this.attachPointOffsets[e],new tBe(this.parser)}},tBe=class{constructor(e){this.pointCount=e.uint16,this.pointIndices=[...new Array(this.pointCount)].map(t=>e.uint16)}},rBe=class extends Zr{constructor(e){super(e),this.coverageOffset=e.Offset16,Ae(this,"coverage",()=>(e.currentPosition=this.start+this.coverageOffset,new $1(e))),this.ligGlyphCount=e.uint16,this.ligGlyphOffsets=[...new Array(this.ligGlyphCount)].map(t=>e.Offset16)}getLigGlyph(e){return this.parser.currentPosition=this.start+this.ligGlyphOffsets[e],new oBe(this.parser)}},oBe=class extends Zr{constructor(e){super(e),this.caretCount=e.uint16,this.caretValueOffsets=[...new Array(this.caretCount)].map(t=>e.Offset16)}getCaretValue(e){return this.parser.currentPosition=this.start+this.caretValueOffsets[e],new nBe(this.parser)}},nBe=class{constructor(e){this.caretValueFormat=e.uint16,this.caretValueFormat===1&&(this.coordinate=e.int16),this.caretValueFormat===2&&(this.caretValuePointIndex=e.uint16),this.caretValueFormat===3&&(this.coordinate=e.int16,this.deviceOffset=e.Offset16)}},iBe=class extends Zr{constructor(e){super(e),this.markGlyphSetTableFormat=e.uint16,this.markGlyphSetCount=e.uint16,this.coverageOffsets=[...new Array(this.markGlyphSetCount)].map(t=>e.Offset32)}getMarkGlyphSet(e){return this.parser.currentPosition=this.start+this.coverageOffsets[e],new $1(this.parser)}},sBe=Object.freeze({__proto__:null,GDEF:$Le}),Vse=class extends Zr{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(e){super(e),this.scriptCount=e.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map(t=>new aBe(e))}},aBe=class{constructor(e){this.scriptTag=e.tag,this.scriptOffset=e.Offset16}},lBe=class extends Zr{constructor(e){super(e),this.defaultLangSys=e.Offset16,this.langSysCount=e.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map(t=>new cBe(e))}},cBe=class{constructor(e){this.langSysTag=e.tag,this.langSysOffset=e.Offset16}},jse=class{constructor(e){this.lookupOrder=e.Offset16,this.requiredFeatureIndex=e.uint16,this.featureIndexCount=e.uint16,this.featureIndices=[...new Array(this.featureIndexCount)].map(t=>e.uint16)}},zse=class extends Zr{static EMPTY={featureCount:0,featureRecords:[]};constructor(e){super(e),this.featureCount=e.uint16,this.featureRecords=[...new Array(this.featureCount)].map(t=>new uBe(e))}},uBe=class{constructor(e){this.featureTag=e.tag,this.featureOffset=e.Offset16}},dBe=class extends Zr{constructor(e){super(e),this.featureParams=e.Offset16,this.lookupIndexCount=e.uint16,this.lookupListIndices=[...new Array(this.lookupIndexCount)].map(t=>e.uint16)}getFeatureParams(){if(this.featureParams>0){let e=this.parser;e.currentPosition=this.start+this.featureParams;let t=this.featureTag;if(t==="size")return new mBe(e);if(t.startsWith("cc"))return new fBe(e);if(t.startsWith("ss"))return new pBe(e)}}},fBe=class{constructor(e){this.format=e.uint16,this.featUiLabelNameId=e.uint16,this.featUiTooltipTextNameId=e.uint16,this.sampleTextNameId=e.uint16,this.numNamedParameters=e.uint16,this.firstParamUiLabelNameId=e.uint16,this.charCount=e.uint16,this.character=[...new Array(this.charCount)].map(t=>e.uint24)}},mBe=class{constructor(e){this.designSize=e.uint16,this.subfamilyIdentifier=e.uint16,this.subfamilyNameID=e.uint16,this.smallEnd=e.uint16,this.largeEnd=e.uint16}},pBe=class{constructor(e){this.version=e.uint16,this.UINameID=e.uint16}};function Yse(e){e.parser.currentPosition-=2,delete e.coverageOffset,delete e.getCoverageTable}var Dg=class extends Zr{constructor(e){super(e),this.substFormat=e.uint16,this.coverageOffset=e.Offset16}getCoverageTable(){let e=this.parser;return e.currentPosition=this.start+this.coverageOffset,new $1(e)}},q8=class{constructor(e){this.glyphSequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},hBe=class extends Dg{constructor(e){super(e),this.deltaGlyphID=e.int16}},gBe=class extends Dg{constructor(e){super(e),this.sequenceCount=e.uint16,this.sequenceOffsets=[...new Array(this.sequenceCount)].map(t=>e.Offset16)}getSequence(e){let t=this.parser;return t.currentPosition=this.start+this.sequenceOffsets[e],new vBe(t)}},vBe=class{constructor(e){this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},yBe=class extends Dg{constructor(e){super(e),this.alternateSetCount=e.uint16,this.alternateSetOffsets=[...new Array(this.alternateSetCount)].map(t=>e.Offset16)}getAlternateSet(e){let t=this.parser;return t.currentPosition=this.start+this.alternateSetOffsets[e],new bBe(t)}},bBe=class{constructor(e){this.glyphCount=e.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},wBe=class extends Dg{constructor(e){super(e),this.ligatureSetCount=e.uint16,this.ligatureSetOffsets=[...new Array(this.ligatureSetCount)].map(t=>e.Offset16)}getLigatureSet(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureSetOffsets[e],new SBe(t)}},SBe=class extends Zr{constructor(e){super(e),this.ligatureCount=e.uint16,this.ligatureOffsets=[...new Array(this.ligatureCount)].map(t=>e.Offset16)}getLigature(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureOffsets[e],new _Be(t)}},_Be=class{constructor(e){this.ligatureGlyph=e.uint16,this.componentCount=e.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map(t=>e.uint16)}},xBe=class extends Dg{constructor(e){super(e),this.substFormat===1&&(this.subRuleSetCount=e.uint16,this.subRuleSetOffsets=[...new Array(this.subRuleSetCount)].map(t=>e.Offset16)),this.substFormat===2&&(this.classDefOffset=e.Offset16,this.subClassSetCount=e.uint16,this.subClassSetOffsets=[...new Array(this.subClassSetCount)].map(t=>e.Offset16)),this.substFormat===3&&(Yse(this),this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.coverageOffsets=[...new Array(this.glyphCount)].map(t=>e.Offset16),this.substLookupRecords=[...new Array(this.substitutionCount)].map(t=>new q8(e)))}getSubRuleSet(e){if(this.substFormat!==1)throw new Error(`lookup type 5.${this.substFormat} has no subrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.subRuleSetOffsets[e],new CBe(t)}getSubClassSet(e){if(this.substFormat!==2)throw new Error(`lookup type 5.${this.substFormat} has no subclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.subClassSetOffsets[e],new TBe(t)}getCoverageTable(e){if(this.substFormat!==3&&!e)return super.getCoverageTable();if(!e)throw new Error(`lookup type 5.${this.substFormat} requires an coverage table index.`);let t=this.parser;return t.currentPosition=this.start+this.coverageOffsets[e],new $1(t)}},CBe=class extends Zr{constructor(e){super(e),this.subRuleCount=e.uint16,this.subRuleOffsets=[...new Array(this.subRuleCount)].map(t=>e.Offset16)}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.subRuleOffsets[e],new qse(t)}},qse=class{constructor(e){this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.inputSequence=[...new Array(this.glyphCount-1)].map(t=>e.uint16),this.substLookupRecords=[...new Array(this.substitutionCount)].map(t=>new q8(e))}},TBe=class extends Zr{constructor(e){super(e),this.subClassRuleCount=e.uint16,this.subClassRuleOffsets=[...new Array(this.subClassRuleCount)].map(t=>e.Offset16)}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.subClassRuleOffsets[e],new PBe(t)}},PBe=class extends qse{constructor(e){super(e)}},EBe=class extends Dg{constructor(e){super(e),this.substFormat===1&&(this.chainSubRuleSetCount=e.uint16,this.chainSubRuleSetOffsets=[...new Array(this.chainSubRuleSetCount)].map(t=>e.Offset16)),this.substFormat===2&&(this.backtrackClassDefOffset=e.Offset16,this.inputClassDefOffset=e.Offset16,this.lookaheadClassDefOffset=e.Offset16,this.chainSubClassSetCount=e.uint16,this.chainSubClassSetOffsets=[...new Array(this.chainSubClassSetCount)].map(t=>e.Offset16)),this.substFormat===3&&(Yse(this),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map(t=>e.Offset16),this.inputGlyphCount=e.uint16,this.inputCoverageOffsets=[...new Array(this.inputGlyphCount)].map(t=>e.Offset16),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[...new Array(this.lookaheadGlyphCount)].map(t=>e.Offset16),this.seqLookupCount=e.uint16,this.seqLookupRecords=[...new Array(this.substitutionCount)].map(t=>new Kse(e)))}getChainSubRuleSet(e){if(this.substFormat!==1)throw new Error(`lookup type 6.${this.substFormat} has no chainsubrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleSetOffsets[e],new kBe(t)}getChainSubClassSet(e){if(this.substFormat!==2)throw new Error(`lookup type 6.${this.substFormat} has no chainsubclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubClassSetOffsets[e],new ABe(t)}getCoverageFromOffset(e){if(this.substFormat!==3)throw new Error(`lookup type 6.${this.substFormat} does not use contextual coverage offsets.`);let t=this.parser;return t.currentPosition=this.start+e,new $1(t)}},kBe=class extends Zr{constructor(e){super(e),this.chainSubRuleCount=e.uint16,this.chainSubRuleOffsets=[...new Array(this.chainSubRuleCount)].map(t=>e.Offset16)}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new RBe(t)}},RBe=class{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map(t=>e.uint16),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map(t=>e.uint16),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map(t=>e.uint16),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.SubstCount)].map(t=>new q8(e))}},ABe=class extends Zr{constructor(e){super(e),this.chainSubClassRuleCount=e.uint16,this.chainSubClassRuleOffsets=[...new Array(this.chainSubClassRuleCount)].map(t=>e.Offset16)}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new IBe(t)}},IBe=class{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map(t=>e.uint16),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map(t=>e.uint16),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map(t=>e.uint16),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.substitutionCount)].map(t=>new Kse(e))}},Kse=class extends Zr{constructor(e){super(e),this.sequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},OBe=class extends Zr{constructor(e){super(e),this.substFormat=e.uint16,this.extensionLookupType=e.uint16,this.extensionOffset=e.Offset32}},NBe=class extends Dg{constructor(e){super(e),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map(t=>e.Offset16),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[new Array(this.lookaheadGlyphCount)].map(t=>e.Offset16),this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},MBe={buildSubtable:function(e,t){let r=new[void 0,hBe,gBe,yBe,wBe,xBe,EBe,OBe,NBe][e](t);return r.type=e,r}},Nd=class extends Zr{constructor(e){super(e)}},FBe=class extends Nd{constructor(e){super(e),console.log("lookup type 1")}},DBe=class extends Nd{constructor(e){super(e),console.log("lookup type 2")}},LBe=class extends Nd{constructor(e){super(e),console.log("lookup type 3")}},BBe=class extends Nd{constructor(e){super(e),console.log("lookup type 4")}},VBe=class extends Nd{constructor(e){super(e),console.log("lookup type 5")}},jBe=class extends Nd{constructor(e){super(e),console.log("lookup type 6")}},zBe=class extends Nd{constructor(e){super(e),console.log("lookup type 7")}},HBe=class extends Nd{constructor(e){super(e),console.log("lookup type 8")}},UBe=class extends Nd{constructor(e){super(e),console.log("lookup type 9")}},GBe={buildSubtable:function(e,t){let r=new[void 0,FBe,DBe,LBe,BBe,VBe,jBe,zBe,HBe,UBe][e](t);return r.type=e,r}},Hse=class extends Zr{static EMPTY={lookupCount:0,lookups:[]};constructor(e){super(e),this.lookupCount=e.uint16,this.lookups=[...new Array(this.lookupCount)].map(t=>e.Offset16)}},WBe=class extends Zr{constructor(e,t){super(e),this.ctType=t,this.lookupType=e.uint16,this.lookupFlag=e.uint16,this.subTableCount=e.uint16,this.subtableOffsets=[...new Array(this.subTableCount)].map(r=>e.Offset16),this.markFilteringSet=e.uint16}get rightToLeft(){return this.lookupFlag&!0}get ignoreBaseGlyphs(){return this.lookupFlag&!0}get ignoreLigatures(){return this.lookupFlag&!0}get ignoreMarks(){return this.lookupFlag&!0}get useMarkFilteringSet(){return this.lookupFlag&!0}get markAttachmentType(){return this.lookupFlag&!0}getSubTable(e){let t=this.ctType==="GSUB"?MBe:GBe;return this.parser.currentPosition=this.start+this.subtableOffsets[e],t.buildSubtable(this.lookupType,this.parser)}},Zse=class extends rt{constructor(e,t,r){let{p:o,tableStart:n}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.scriptListOffset=o.Offset16,this.featureListOffset=o.Offset16,this.lookupListOffset=o.Offset16,this.majorVersion===1&&this.minorVersion===1&&(this.featureVariationsOffset=o.Offset32);let i=!(this.scriptListOffset||this.featureListOffset||this.lookupListOffset);Ae(this,"scriptList",()=>i?Vse.EMPTY:(o.currentPosition=n+this.scriptListOffset,new Vse(o))),Ae(this,"featureList",()=>i?zse.EMPTY:(o.currentPosition=n+this.featureListOffset,new zse(o))),Ae(this,"lookupList",()=>i?Hse.EMPTY:(o.currentPosition=n+this.lookupListOffset,new Hse(o))),this.featureVariationsOffset&&Ae(this,"featureVariations",()=>i?FeatureVariations.EMPTY:(o.currentPosition=n+this.featureVariationsOffset,new FeatureVariations(o)))}getSupportedScripts(){return this.scriptList.scriptRecords.map(e=>e.scriptTag)}getScriptTable(e){let t=this.scriptList.scriptRecords.find(o=>o.scriptTag===e);this.parser.currentPosition=this.scriptList.start+t.scriptOffset;let r=new lBe(this.parser);return r.scriptTag=e,r}ensureScriptTable(e){return typeof e=="string"?this.getScriptTable(e):e}getSupportedLangSys(e){e=this.ensureScriptTable(e);let t=e.defaultLangSys!==0,r=e.langSysRecords.map(o=>o.langSysTag);return t&&r.unshift("dflt"),r}getDefaultLangSysTable(e){e=this.ensureScriptTable(e);let t=e.defaultLangSys;if(t!==0){this.parser.currentPosition=e.start+t;let r=new jse(this.parser);return r.langSysTag="",r.defaultForScript=e.scriptTag,r}}getLangSysTable(e,t="dflt"){if(t==="dflt")return this.getDefaultLangSysTable(e);e=this.ensureScriptTable(e);let r=e.langSysRecords.find(n=>n.langSysTag===t);this.parser.currentPosition=e.start+r.langSysOffset;let o=new jse(this.parser);return o.langSysTag=t,o}getFeatures(e){return e.featureIndices.map(t=>this.getFeature(t))}getFeature(e){let t;if(parseInt(e)==e?t=this.featureList.featureRecords[e]:t=this.featureList.featureRecords.find(o=>o.featureTag===e),!t)return;this.parser.currentPosition=this.featureList.start+t.featureOffset;let r=new dBe(this.parser);return r.featureTag=t.featureTag,r}getLookups(e){return e.lookupListIndices.map(t=>this.getLookup(t))}getLookup(e,t){let r=this.lookupList.lookups[e];return this.parser.currentPosition=this.lookupList.start+r,new WBe(this.parser,t)}},YBe=class extends Zse{constructor(e,t){super(e,t,"GSUB")}getLookup(e){return super.getLookup(e,"GSUB")}},qBe=Object.freeze({__proto__:null,GSUB:YBe}),KBe=class extends Zse{constructor(e,t){super(e,t,"GPOS")}getLookup(e){return super.getLookup(e,"GPOS")}},ZBe=Object.freeze({__proto__:null,GPOS:KBe}),XBe=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.offsetToSVGDocumentList=r.Offset32,r.currentPosition=this.tableStart+this.offsetToSVGDocumentList,this.documentList=new QBe(r)}},QBe=class extends Zr{constructor(e){super(e),this.numEntries=e.uint16,this.documentRecords=[...new Array(this.numEntries)].map(t=>new JBe(e))}getDocument(e){let t=this.documentRecords[e];if(!t)return"";let r=this.start+t.svgDocOffset;return this.parser.currentPosition=r,this.parser.readBytes(t.svgDocLength)}getDocumentForGlyph(e){let t=this.documentRecords.findIndex(r=>r.startGlyphID<=e&&e<=r.endGlyphID);return t===-1?"":this.getDocument(t)}},JBe=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.svgDocOffset=e.Offset32,this.svgDocLength=e.uint32}},$Be=Object.freeze({__proto__:null,SVG:XBe}),eVe=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.axesArrayOffset=r.Offset16,r.uint16,this.axisCount=r.uint16,this.axisSize=r.uint16,this.instanceCount=r.uint16,this.instanceSize=r.uint16;let o=this.tableStart+this.axesArrayOffset;Ae(this,"axes",()=>(r.currentPosition=o,[...new Array(this.axisCount)].map(i=>new tVe(r))));let n=o+this.axisCount*this.axisSize;Ae(this,"instances",()=>{let i=[];for(let a=0;a<this.instanceCount;a++)r.currentPosition=n+a*this.instanceSize,i.push(new rVe(r,this.axisCount,this.instanceSize));return i})}getSupportedAxes(){return this.axes.map(e=>e.tag)}getAxis(e){return this.axes.find(t=>t.tag===e)}},tVe=class{constructor(e){this.tag=e.tag,this.minValue=e.fixed,this.defaultValue=e.fixed,this.maxValue=e.fixed,this.flags=e.flags(16),this.axisNameID=e.uint16}},rVe=class{constructor(e,t,r){let o=e.currentPosition;this.subfamilyNameID=e.uint16,e.uint16,this.coordinates=[...new Array(t)].map(n=>e.fixed),e.currentPosition-o<r&&(this.postScriptNameID=e.uint16)}},oVe=Object.freeze({__proto__:null,fvar:eVe}),nVe=class extends rt{constructor(e,t){let{p:r}=super(e,t),o=e.length/2;Ae(this,"items",()=>[...new Array(o)].map(n=>r.fword))}},iVe=Object.freeze({__proto__:null,cvt:nVe}),sVe=class extends rt{constructor(e,t){let{p:r}=super(e,t);Ae(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},aVe=Object.freeze({__proto__:null,fpgm:sVe}),lVe=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numRanges=r.uint16,Ae(this,"gaspRanges",()=>[...new Array(this.numRanges)].map(n=>new cVe(r)))}},cVe=class{constructor(e){this.rangeMaxPPEM=e.uint16,this.rangeGaspBehavior=e.uint16}},uVe=Object.freeze({__proto__:null,gasp:lVe}),dVe=class extends rt{constructor(e,t){super(e,t)}getGlyphData(e,t){return this.parser.currentPosition=this.tableStart+e,this.parser.readBytes(t)}},fVe=Object.freeze({__proto__:null,glyf:dVe}),mVe=class extends rt{constructor(e,t,r){let{p:o}=super(e,t),n=r.maxp.numGlyphs+1;r.head.indexToLocFormat===0?(this.x2=!0,Ae(this,"offsets",()=>[...new Array(n)].map(i=>o.Offset16))):Ae(this,"offsets",()=>[...new Array(n)].map(i=>o.Offset32))}getGlyphDataOffsetAndLength(e){let t=this.offsets[e]*this.x2?2:1,r=this.offsets[e+1]*this.x2?2:1;return{offset:t,length:r-t}}},pVe=Object.freeze({__proto__:null,loca:mVe}),hVe=class extends rt{constructor(e,t){let{p:r}=super(e,t);Ae(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},gVe=Object.freeze({__proto__:null,prep:hVe}),vVe=class extends rt{constructor(e,t){let{p:r}=super(e,t);Ae(this,"data",()=>r.readBytes())}},yVe=Object.freeze({__proto__:null,CFF:vVe}),bVe=class extends rt{constructor(e,t){let{p:r}=super(e,t);Ae(this,"data",()=>r.readBytes())}},wVe=Object.freeze({__proto__:null,CFF2:bVe}),SVe=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.defaultVertOriginY=r.int16,this.numVertOriginYMetrics=r.uint16,Ae(this,"vertORiginYMetrics",()=>[...new Array(this.numVertOriginYMetrics)].map(o=>new _Ve(r)))}},_Ve=class{constructor(e){this.glyphIndex=e.uint16,this.vertOriginY=e.int16}},xVe=Object.freeze({__proto__:null,VORG:SVe}),CVe=class{constructor(e){this.indexSubTableArrayOffset=e.Offset32,this.indexTablesSize=e.uint32,this.numberofIndexSubTables=e.uint32,this.colorRef=e.uint32,this.hori=new OA(e),this.vert=new OA(e),this.startGlyphIndex=e.uint16,this.endGlyphIndex=e.uint16,this.ppemX=e.uint8,this.ppemY=e.uint8,this.bitDepth=e.uint8,this.flags=e.int8}},TVe=class{constructor(e){this.hori=new OA(e),this.vert=new OA(e),this.ppemX=e.uint8,this.ppemY=e.uint8,this.substitutePpemX=e.uint8,this.substitutePpemY=e.uint8}},OA=class{constructor(e){this.ascender=e.int8,this.descender=e.int8,this.widthMax=e.uint8,this.caretSlopeNumerator=e.int8,this.caretSlopeDenominator=e.int8,this.caretOffset=e.int8,this.minOriginSB=e.int8,this.minAdvanceSB=e.int8,this.maxBeforeBL=e.int8,this.minAfterBL=e.int8,this.pad1=e.int8,this.pad2=e.int8}},Xse=class extends rt{constructor(e,t,r){let{p:o}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.numSizes=o.uint32,Ae(this,"bitMapSizes",()=>[...new Array(this.numSizes)].map(n=>new CVe(o)))}},PVe=Object.freeze({__proto__:null,EBLC:Xse}),Qse=class extends rt{constructor(e,t,r){let{p:o}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16}},EVe=Object.freeze({__proto__:null,EBDT:Qse}),kVe=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.numSizes=r.uint32,Ae(this,"bitmapScales",()=>[...new Array(this.numSizes)].map(o=>new TVe(r)))}},RVe=Object.freeze({__proto__:null,EBSC:kVe}),AVe=class extends Xse{constructor(e,t){super(e,t,"CBLC")}},IVe=Object.freeze({__proto__:null,CBLC:AVe}),OVe=class extends Qse{constructor(e,t){super(e,t,"CBDT")}},NVe=Object.freeze({__proto__:null,CBDT:OVe}),MVe=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.flags=r.flags(16),this.numStrikes=r.uint32,Ae(this,"strikeOffsets",()=>[...new Array(this.numStrikes)].map(o=>r.Offset32))}},FVe=Object.freeze({__proto__:null,sbix:MVe}),DVe=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numBaseGlyphRecords=r.uint16,this.baseGlyphRecordsOffset=r.Offset32,this.layerRecordsOffset=r.Offset32,this.numLayerRecords=r.uint16}getBaseGlyphRecord(e){let t=this.tableStart+this.baseGlyphRecordsOffset;this.parser.currentPosition=t;let r=new Y8(this.parser),o=r.gID,n=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=n;let i=new Y8(this.parser),a=i.gID;if(o===e)return r;if(a===e)return i;for(;t!==n;){let l=t+(n-t)/12;this.parser.currentPosition=l;let c=new Y8(this.parser),u=c.gID;if(u===e)return c;u>e?n=l:u<e&&(t=l)}return!1}getLayers(e){let t=this.getBaseGlyphRecord(e);return this.parser.currentPosition=this.tableStart+this.layerRecordsOffset+4*t.firstLayerIndex,[...new Array(t.numLayers)].map(r=>new LVe(p))}},Y8=class{constructor(e){this.gID=e.uint16,this.firstLayerIndex=e.uint16,this.numLayers=e.uint16}},LVe=class{constructor(e){this.gID=e.uint16,this.paletteIndex=e.uint16}},BVe=Object.freeze({__proto__:null,COLR:DVe}),VVe=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numPaletteEntries=r.uint16;let o=this.numPalettes=r.uint16;this.numColorRecords=r.uint16,this.offsetFirstColorRecord=r.Offset32,this.colorRecordIndices=[...new Array(this.numPalettes)].map(n=>r.uint16),Ae(this,"colorRecords",()=>(r.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map(n=>new jVe(r)))),this.version===1&&(this.offsetPaletteTypeArray=r.Offset32,this.offsetPaletteLabelArray=r.Offset32,this.offsetPaletteEntryLabelArray=r.Offset32,Ae(this,"paletteTypeArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new zVe(r,o))),Ae(this,"paletteLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new HVe(r,o))),Ae(this,"paletteEntryLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new UVe(r,o))))}},jVe=class{constructor(e){this.blue=e.uint8,this.green=e.uint8,this.red=e.uint8,this.alpha=e.uint8}},zVe=class{constructor(e,t){this.paletteTypes=[...new Array(t)].map(r=>e.uint32)}},HVe=class{constructor(e,t){this.paletteLabels=[...new Array(t)].map(r=>e.uint16)}},UVe=class{constructor(e,t){this.paletteEntryLabels=[...new Array(t)].map(r=>e.uint16)}},GVe=Object.freeze({__proto__:null,CPAL:VVe}),WVe=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint32,this.numSignatures=r.uint16,this.flags=r.uint16,this.signatureRecords=[...new Array(this.numSignatures)].map(o=>new YVe(r))}getData(e){let t=this.signatureRecords[e];return this.parser.currentPosition=this.tableStart+t.offset,new qVe(this.parser)}},YVe=class{constructor(e){this.format=e.uint32,this.length=e.uint32,this.offset=e.Offset32}},qVe=class{constructor(e){e.uint16,e.uint16,this.signatureLength=e.uint32,this.signature=e.readBytes(this.signatureLength)}},KVe=Object.freeze({__proto__:null,DSIG:WVe}),ZVe=class extends rt{constructor(e,t,r){let{p:o}=super(e,t),n=r.hmtx.numGlyphs;this.version=o.uint16,this.numRecords=o.int16,this.sizeDeviceRecord=o.int32,this.records=[...new Array(numRecords)].map(i=>new XVe(o,n))}},XVe=class{constructor(e,t){this.pixelSize=e.uint8,this.maxWidth=e.uint8,this.widths=e.readBytes(t)}},QVe=Object.freeze({__proto__:null,hdmx:ZVe}),JVe=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.nTables=r.uint16,Ae(this,"tables",()=>{let o=this.tableStart+4,n=[];for(let i=0;i<this.nTables;i++){r.currentPosition=o;let a=new $Ve(r);n.push(a),o+=a}return n})}},$Ve=class{constructor(e){this.version=e.uint16,this.length=e.uint16,this.coverage=e.flags(8),this.format=e.uint8,this.format===0&&(this.nPairs=e.uint16,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16,Ae(this,"pairs",()=>[...new Array(this.nPairs)].map(t=>new e8e(e)))),this.format===2&&console.warn("Kern subtable format 2 is not supported: this parser currently only parses universal table data.")}get horizontal(){return this.coverage[0]}get minimum(){return this.coverage[1]}get crossstream(){return this.coverage[2]}get override(){return this.coverage[3]}},e8e=class{constructor(e){this.left=e.uint16,this.right=e.uint16,this.value=e.fword}},t8e=Object.freeze({__proto__:null,kern:JVe}),r8e=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numGlyphs=r.uint16,this.yPels=r.readBytes(this.numGlyphs)}},o8e=Object.freeze({__proto__:null,LTSH:r8e}),n8e=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.mergeClassCount=r.uint16,this.mergeDataOffset=r.Offset16,this.classDefCount=r.uint16,this.offsetToClassDefOffsets=r.Offset16,Ae(this,"mergeEntryMatrix",()=>[...new Array(this.mergeClassCount)].map(o=>r.readBytes(this.mergeClassCount))),console.warn("Full MERG parsing is currently not supported."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}},i8e=Object.freeze({__proto__:null,MERG:n8e}),s8e=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint32,this.flags=r.uint32,r.uint32,this.dataMapsCount=r.uint32,this.dataMaps=[...new Array(this.dataMapsCount)].map(o=>new a8e(this.tableStart,r))}},a8e=class{constructor(e,t){this.tableStart=e,this.parser=t,this.tag=t.tag,this.dataOffset=t.Offset32,this.dataLength=t.uint32}getData(){return this.parser.currentField=this.tableStart+this.dataOffset,this.parser.readBytes(this.dataLength)}},l8e=Object.freeze({__proto__:null,meta:s8e}),c8e=class extends rt{constructor(e,t){super(e,t),console.warn("This font uses a PCLT table, which is currently not supported by this parser."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}},u8e=Object.freeze({__proto__:null,PCLT:c8e}),d8e=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numRecs=r.uint16,this.numRatios=r.uint16,this.ratRanges=[...new Array(this.numRatios)].map(o=>new f8e(r)),this.offsets=[...new Array(this.numRatios)].map(o=>r.Offset16),this.VDMXGroups=[...new Array(this.numRecs)].map(o=>new m8e(r))}},f8e=class{constructor(e){this.bCharSet=e.uint8,this.xRatio=e.uint8,this.yStartRatio=e.uint8,this.yEndRatio=e.uint8}},m8e=class{constructor(e){this.recs=e.uint16,this.startsz=e.uint8,this.endsz=e.uint8,this.records=[...new Array(this.recs)].map(t=>new p8e(e))}},p8e=class{constructor(e){this.yPelHeight=e.uint16,this.yMax=e.int16,this.yMin=e.int16}},h8e=Object.freeze({__proto__:null,VDMX:d8e}),g8e=class extends rt{constructor(e,t){let{p:r}=super(e,t);this.version=r.fixed,this.ascent=this.vertTypoAscender=r.int16,this.descent=this.vertTypoDescender=r.int16,this.lineGap=this.vertTypoLineGap=r.int16,this.advanceHeightMax=r.int16,this.minTopSideBearing=r.int16,this.minBottomSideBearing=r.int16,this.yMaxExtent=r.int16,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.metricDataFormat=r.int16,this.numOfLongVerMetrics=r.uint16,r.verifyLength()}},v8e=Object.freeze({__proto__:null,vhea:g8e}),y8e=class extends rt{constructor(e,t,r){super(e,t);let o=r.vhea.numOfLongVerMetrics,n=r.maxp.numGlyphs,i=p.currentPosition;if(lazy(this,"vMetrics",()=>(p.currentPosition=i,[...new Array(o)].map(a=>new b8e(p.uint16,p.int16)))),o<n){let a=i+o*4;lazy(this,"topSideBearings",()=>(p.currentPosition=a,[...new Array(n-o)].map(l=>p.int16)))}}},b8e=class{constructor(e,t){this.advanceHeight=e,this.topSideBearing=t}},w8e=Object.freeze({__proto__:null,vmtx:y8e});var Jse=s(H(),1);var{kebabCase:S8e}=gt(Jse.privateApis);function $se(e){let t=e.reduce((r,o)=>(r[o.fontFamily]||(r[o.fontFamily]={name:o.fontFamily,fontFamily:o.fontFamily,slug:S8e(o.fontFamily.toLowerCase()),fontFace:[]}),r[o.fontFamily].fontFace.push(o),r),{});return Object.values(t)}var ws=s(x(),1);function _8e(){let{installFonts:e}=(0,ex.useContext)(Hn),[t,r]=(0,ex.useState)(!1),[o,n]=(0,ex.useState)(null),i=h=>{l(h)},a=h=>{l(h.target.files)},l=async h=>{if(!h)return;n(null),r(!0);let g=new Set,v=[...h],y=!1,b=v.map(async w=>{if(!await u(w))return y=!0,null;if(g.has(w.name))return null;let C=(((w.name??"").split(".")??[]).pop()??"").toLowerCase();return z8.includes(C)?(g.add(w.name),w):null}),S=(await Promise.all(b)).filter(w=>w!==null);if(S.length>0)c(S);else{let w=y?(0,qb.__)("Sorry, you are not allowed to upload this file type."):(0,qb.__)("No fonts found to install.");n({type:"error",message:w}),r(!1)}},c=async h=>{let g=await Promise.all(h.map(async v=>{let y=await f(v);return await tp(y,y.file,"all"),y}));m(g)};async function u(h){let g=new NA("Uploaded Font");try{let v=await d(h);return await g.fromDataBuffer(v,"font"),!0}catch{return!1}}async function d(h){return new Promise((g,v)=>{let y=new window.FileReader;y.readAsArrayBuffer(h),y.onload=()=>g(y.result),y.onerror=v})}let f=async h=>{let g=await d(h),v=new NA("Uploaded Font");v.fromDataBuffer(g,h.name);let b=(await new Promise(I=>v.onload=I)).detail.font,{name:S}=b.opentype.tables,w=S.get(16)||S.get(1),_=S.get(2).toLowerCase().includes("italic"),C=b.opentype.tables["OS/2"].usWeightClass||"normal",A=!!b.opentype.tables.fvar&&b.opentype.tables.fvar.axes.find(({tag:I})=>I==="wght"),R=A?`${A.minValue} ${A.maxValue}`:null;return{file:h,fontFamily:w,fontStyle:_?"italic":"normal",fontWeight:R||C}},m=async h=>{let g=$se(h);try{await e(g),n({type:"success",message:(0,qb.__)("Fonts were installed successfully.")})}catch(v){let y=v;n({type:"error",message:y.message,errors:y?.installationErrors})}r(!1)};return(0,ws.jsxs)("div",{className:"font-library__tabpanel-layout",children:[(0,ws.jsx)(vi.DropZone,{onFilesDrop:i}),(0,ws.jsxs)(vi.__experimentalVStack,{className:"font-library__local-fonts",justify:"start",children:[o&&(0,ws.jsxs)(vi.Notice,{status:o.type,__unstableHTML:!0,onRemove:()=>n(null),children:[o.message,o.errors&&(0,ws.jsx)("ul",{children:o.errors.map((h,g)=>(0,ws.jsx)("li",{children:h},g))})]}),t&&(0,ws.jsx)(vi.FlexItem,{children:(0,ws.jsx)("div",{className:"font-library__upload-area",children:(0,ws.jsx)(vi.ProgressBar,{})})}),!t&&(0,ws.jsx)(vi.FormFileUpload,{accept:z8.map(h=>`.${h}`).join(","),multiple:!0,onChange:a,render:({openFileDialog:h})=>(0,ws.jsx)(vi.Button,{__next40pxDefaultSize:!0,className:"font-library__upload-area",onClick:h,children:(0,qb.__)("Upload font")})}),(0,ws.jsx)(vi.__experimentalText,{className:"font-library__upload-area__text",children:(0,qb.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.")})]})]})}var MA=_8e;var Ll=s(x(),1),{Tabs:FA}=gt(DA.privateApis),x8e={id:"installed-fonts",title:(0,Kb._x)("Library","Font library")},C8e={id:"upload-fonts",title:(0,Kb._x)("Upload","noun")},T8e=e=>e.map(({slug:t,name:r})=>({id:t,title:e.length===1&&t==="google-fonts"?(0,Kb.__)("Install Fonts"):r}));function P8e({onRequestClose:e,defaultTabId:t="installed-fonts"}){let{records:r=[]}=(0,LA.useEntityRecords)("root","fontCollection",{_fields:"slug,name,description"}),o=(0,eae.useSelect)(i=>i(LA.store).canUser("create",{kind:"postType",name:"wp_font_family"}),[]),n=[x8e];return o&&(n.push(C8e),n.push(...T8e(r||[]))),(0,Ll.jsx)(DA.Modal,{title:(0,Kb.__)("Fonts"),onRequestClose:e,isFullScreen:!0,className:"font-library-modal",children:(0,Ll.jsxs)(FA,{defaultTabId:t,children:[(0,Ll.jsx)("div",{className:"font-library-modal__tablist-container",children:(0,Ll.jsx)(FA.TabList,{children:n.map(({id:i,title:a})=>(0,Ll.jsx)(FA.Tab,{tabId:i,children:a},i))})}),n.map(({id:i})=>{let a;switch(i){case"upload-fonts":a=(0,Ll.jsx)(MA,{});break;case"installed-fonts":a=(0,Ll.jsx)(TA,{});break;default:a=(0,Ll.jsx)(EA,{slug:i})}return(0,Ll.jsx)(FA.TabPanel,{tabId:i,focusable:!1,className:"font-library-modal__tab-panel",children:a},i)})]})})}var tae=P8e;var BA=s(N(),1),Lg=s(H(),1),rae=s(V(),1);var Zb=s(x(),1);function E8e({font:e}){let{handleSetLibraryFontSelected:t,setModalTabOpen:r}=(0,rae.useContext)(Hn),o=e?.fontFace?.length||1,n=()=>{t?.(e),r?.("installed-fonts")},i=Eg(e);return(0,Zb.jsx)(Lg.__experimentalItem,{onClick:n,children:(0,Zb.jsxs)(Lg.__experimentalHStack,{justify:"space-between",children:[(0,Zb.jsx)(Lg.FlexItem,{style:i,children:e.name}),(0,Zb.jsx)(Lg.FlexItem,{className:"global-styles-ui-screen-typography__font-variants-count",children:(0,BA.sprintf)((0,BA._n)("%d variant","%d variants",o),o)})]})})}var oae=E8e;var Bo=s(x(),1);function nae(e,t){return e?e.map(r=>Ad(r,{source:t})):[]}function k8e(){let{baseCustomFonts:e,modalTabOpen:t,setModalTabOpen:r}=(0,iae.useContext)(Hn),[o]=Te("typography.fontFamilies"),[n]=Te("typography.fontFamilies",void 0,"base"),i=nae(o?.theme,"theme"),a=nae(o?.custom,"custom"),l=[...i,...a].sort((d,f)=>d.name.localeCompare(f.name)),c=0<l.length,u=c||n?.theme?.length>0||(e?.length??0)>0;return(0,Bo.jsxs)(Bo.Fragment,{children:[!!t&&(0,Bo.jsx)(tae,{onRequestClose:()=>r?.(""),defaultTabId:t}),(0,Bo.jsxs)(Bl.__experimentalVStack,{spacing:2,children:[(0,Bo.jsxs)(Bl.__experimentalHStack,{justify:"space-between",children:[(0,Bo.jsx)(uo,{level:3,children:(0,Bg.__)("Fonts")}),(0,Bo.jsx)(Bl.Button,{onClick:()=>r?.("installed-fonts"),label:(0,Bg.__)("Manage fonts"),icon:iF,size:"small"})]}),l.length>0&&(0,Bo.jsx)(Bo.Fragment,{children:(0,Bo.jsx)(Bl.__experimentalItemGroup,{size:"large",isBordered:!0,isSeparated:!0,children:l.map(d=>(0,Bo.jsx)(oae,{font:d},d.slug))})}),!c&&(0,Bo.jsxs)(Bo.Fragment,{children:[(0,Bo.jsx)(Bl.__experimentalText,{as:"p",children:u?(0,Bg.__)("No fonts activated."):(0,Bg.__)("No fonts installed.")}),(0,Bo.jsx)(Bl.Button,{className:"global-styles-ui-font-families__manage-fonts",variant:"secondary",__next40pxDefaultSize:!0,onClick:()=>{r?.(u?"installed-fonts":"upload-fonts")},children:u?(0,Bg.__)("Manage fonts"):(0,Bg.__)("Add fonts")})]})]})]})}function sae({...e}){return(0,Bo.jsx)(wA,{children:(0,Bo.jsx)(k8e,{...e})})}var tx=s(N(),1),Md=s(H(),1);var ou=s(x(),1);function R8e(){return(0,ou.jsxs)(Md.__experimentalVStack,{spacing:2,children:[(0,ou.jsx)(Md.__experimentalHStack,{justify:"space-between",children:(0,ou.jsx)(uo,{level:3,children:(0,tx.__)("Font Sizes")})}),(0,ou.jsx)(Md.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,ou.jsx)(qr,{path:"/typography/font-sizes",children:(0,ou.jsxs)(Md.__experimentalHStack,{direction:"row",children:[(0,ou.jsx)(Md.FlexItem,{children:(0,tx.__)("Font size presets")}),(0,ou.jsx)(Uo,{icon:(0,tx.isRTL)()?tr:rr})]})})})]})}var aae=R8e;var $a=s(x(),1);function A8e(){let{fontLibraryEnabled:e}=(0,cae.useContext)(Eo);return(0,$a.jsxs)($a.Fragment,{children:[(0,$a.jsx)(Lt,{title:(0,VA.__)("Typography"),description:(0,VA.__)("Available fonts, typographic styles, and the application of those styles.")}),(0,$a.jsx)($m,{children:(0,$a.jsxs)(lae.__experimentalVStack,{spacing:7,children:[(0,$a.jsx)(Ub,{title:(0,VA.__)("Typesets")}),e&&(0,$a.jsx)(sae,{}),(0,$a.jsx)(Qie,{}),(0,$a.jsx)(aae,{})]})})]})}var uae=A8e;var ar=s(N(),1),sa=s(H(),1),vae=s(V(),1);var dae=s(ce(),1);var fae=s(x(),1),{useSettingsForBlockElement:I8e,TypographyPanel:O8e}=gt(dae.privateApis);function mae({element:e,headingLevel:t}){let r=[];e==="heading"?r=r.concat(["elements",t]):e&&e!=="text"&&(r=r.concat(["elements",e]));let o=r.join("."),[n]=Be(o,"","user",!1),[i,a]=Be(o,"","merged",!1),[l]=Te(""),u=I8e(l,void 0,e==="heading"?t:e);return(0,fae.jsx)(O8e,{inheritedValue:i,value:n,onChange:a,settings:u})}var pae=s(x(),1);function hae({name:e,element:t,headingLevel:r}){let o="";t==="heading"?o=`elements.${r}.`:t&&t!=="text"&&(o=`elements.${t}.`);let[n]=Be(o+"typography.fontFamily",e),[i]=Be(o+"color.gradient",e),[a]=Be(o+"color.background",e),[l]=Be("color.background"),[c]=Be(o+"color.text",e),[u]=Be(o+"typography.fontSize",e),[d]=Be(o+"typography.fontStyle",e),[f]=Be(o+"typography.fontWeight",e),[m]=Be(o+"typography.letterSpacing",e);return(0,pae.jsx)("div",{className:"global-styles-ui-typography-preview",style:{fontFamily:n??"serif",background:i??a??l,color:c,fontSize:u,fontStyle:d,fontWeight:f,letterSpacing:m,...t==="link"?{textDecoration:"underline"}:{}},children:"Aa"})}var pn=s(x(),1),gae={text:{description:(0,ar.__)("Manage the fonts used on the site."),title:(0,ar.__)("Text")},link:{description:(0,ar.__)("Manage the fonts and typography used on the links."),title:(0,ar.__)("Links")},heading:{description:(0,ar.__)("Manage the fonts and typography used on headings."),title:(0,ar.__)("Headings")},caption:{description:(0,ar.__)("Manage the fonts and typography used on captions."),title:(0,ar.__)("Captions")},button:{description:(0,ar.__)("Manage the fonts and typography used on buttons."),title:(0,ar.__)("Buttons")}};function N8e({element:e}){let[t,r]=(0,vae.useState)("heading");return(0,pn.jsxs)(pn.Fragment,{children:[(0,pn.jsx)(Lt,{title:gae[e].title,description:gae[e].description}),(0,pn.jsx)(sa.__experimentalSpacer,{marginX:4,children:(0,pn.jsx)(hae,{element:e,headingLevel:t})}),e==="heading"&&(0,pn.jsx)(sa.__experimentalSpacer,{marginX:4,marginBottom:"1em",children:(0,pn.jsxs)(sa.__experimentalToggleGroupControl,{label:(0,ar.__)("Select heading level"),hideLabelFromVision:!0,value:t,onChange:o=>r(o),isBlock:!0,size:"__unstable-large",children:[(0,pn.jsx)(sa.__experimentalToggleGroupControlOption,{value:"heading",showTooltip:!0,"aria-label":(0,ar.__)("All headings"),label:(0,ar._x)("All","heading levels")}),(0,pn.jsx)(sa.__experimentalToggleGroupControlOption,{value:"h1",showTooltip:!0,"aria-label":(0,ar.__)("Heading 1"),label:(0,ar.__)("H1")}),(0,pn.jsx)(sa.__experimentalToggleGroupControlOption,{value:"h2",showTooltip:!0,"aria-label":(0,ar.__)("Heading 2"),label:(0,ar.__)("H2")}),(0,pn.jsx)(sa.__experimentalToggleGroupControlOption,{value:"h3",showTooltip:!0,"aria-label":(0,ar.__)("Heading 3"),label:(0,ar.__)("H3")}),(0,pn.jsx)(sa.__experimentalToggleGroupControlOption,{value:"h4",showTooltip:!0,"aria-label":(0,ar.__)("Heading 4"),label:(0,ar.__)("H4")}),(0,pn.jsx)(sa.__experimentalToggleGroupControlOption,{value:"h5",showTooltip:!0,"aria-label":(0,ar.__)("Heading 5"),label:(0,ar.__)("H5")}),(0,pn.jsx)(sa.__experimentalToggleGroupControlOption,{value:"h6",showTooltip:!0,"aria-label":(0,ar.__)("Heading 6"),label:(0,ar.__)("H6")})]})}),(0,pn.jsx)(mae,{element:e,headingLevel:t})]})}var Xb=N8e;var K8=s(N(),1),xae=s(H(),1),Cae=s(ce(),1);var aa=s(H(),1),Qb=s(N(),1);var Sae=s(V(),1);var yae=s(H(),1),bae=s(x(),1);function M8e({className:e,children:t,...r}){return(0,bae.jsx)(yae.Flex,{className:K("global-styles-ui__color-indicator-wrapper",e),...r,children:t})}var wae=M8e;var yi=s(x(),1),jA=[];function F8e({name:e}){let[t]=Te("color.palette.custom"),[r]=Te("color.palette.theme"),[o]=Te("color.palette.default"),[n]=Te("color.defaultPalette",e),i=t||jA,a=r||jA,l=o||jA,c=n??!0,u=(0,Sae.useMemo)(()=>[...i,...a,...l&&c?l:jA],[i,a,l,c]),d=e?"/blocks/"+encodeURIComponent(e)+"/colors/palette":"/colors/palette";return(0,yi.jsxs)(aa.__experimentalVStack,{spacing:3,children:[(0,yi.jsx)(uo,{level:3,children:(0,Qb.__)("Palette")}),(0,yi.jsx)(aa.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,yi.jsx)(qr,{path:d,children:(0,yi.jsxs)(aa.__experimentalHStack,{direction:"row",children:[u.length>0?(0,yi.jsxs)(yi.Fragment,{children:[(0,yi.jsx)(aa.__experimentalZStack,{isLayered:!1,offset:-8,children:u.slice(0,5).map(({color:f},m)=>(0,yi.jsx)(wae,{children:(0,yi.jsx)(aa.ColorIndicator,{colorValue:f})},`${f}-${m}`))}),(0,yi.jsx)(aa.FlexItem,{isBlock:!0,children:(0,Qb.__)("Edit palette")})]}):(0,yi.jsx)(aa.FlexItem,{children:(0,Qb.__)("Add colors")}),(0,yi.jsx)(Uo,{icon:(0,Qb.isRTL)()?tr:rr})]})})})]})}var _ae=F8e;var nu=s(x(),1),{useSettingsForBlockElement:D8e,ColorPanel:L8e}=gt(Cae.privateApis);function B8e(){let[e,t]=Be("",void 0,"user",!1),[r]=Be("",void 0,"merged",!1),[o]=Te(""),n=D8e(o);return(0,nu.jsxs)(nu.Fragment,{children:[(0,nu.jsx)(Lt,{title:(0,K8.__)("Colors"),description:(0,K8.__)("Palette colors and the application of those colors on site elements.")}),(0,nu.jsx)($m,{children:(0,nu.jsx)(xae.__experimentalVStack,{spacing:7,children:(0,nu.jsx)(_ae,{})})}),(0,nu.jsx)(L8e,{inheritedValue:r,value:e,onChange:t,settings:n})]})}var Tae=B8e;var nx=s(N(),1),Mae=s(H(),1);var Aae=s(we(),1),Dd=s(H(),1),$b=s(N(),1);var HA=s(H(),1);var zA=s(H(),1);var Pae=s(x(),1);function Eae(){let{paletteColors:e}=Bb();return e.slice(0,4).map(({slug:t,color:r},o)=>(0,Pae.jsx)("div",{style:{flexGrow:1,height:"100%",background:r}},`${t}-${o}`))}var rx=s(x(),1),V8e={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},j8e=({label:e,isFocused:t,withHoverView:r})=>(0,rx.jsx)(jb,{label:e,isFocused:t,withHoverView:r,children:({key:o})=>(0,rx.jsx)(zA.__unstableMotion.div,{variants:V8e,style:{height:"100%",overflow:"hidden"},children:(0,rx.jsx)(zA.__experimentalHStack,{spacing:0,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,rx.jsx)(Eae,{})})},o)}),kae=j8e;var Vg=s(x(),1),Rae=["color"];function Jb({title:e,gap:t=2}){let r=lA(Rae);return r?.length<=1?null:(0,Vg.jsxs)(HA.__experimentalVStack,{spacing:3,children:[e&&(0,Vg.jsx)(uo,{level:3,children:e}),(0,Vg.jsx)(HA.__experimentalGrid,{gap:t,children:r.map((o,n)=>(0,Vg.jsx)(Hb,{variation:o,isPill:!0,properties:Rae,showTooltip:!0,children:()=>(0,Vg.jsx)(kae,{})},n))})]})}var Fd=s(x(),1),z8e={placement:"bottom-start",offset:8};function Iae({name:e}){let[t,r]=Te("color.palette.theme",e),[o]=Te("color.palette.theme",e,"base"),[n,i]=Te("color.palette.default",e),[a]=Te("color.palette.default",e,"base"),[l,c]=Te("color.palette.custom",e),[u]=Te("color.defaultPalette",e),f=(0,Aae.useViewportMatch)("small","<")?z8e:void 0,[m]=pie(e);return(0,Fd.jsxs)(Dd.__experimentalVStack,{className:"global-styles-ui-color-palette-panel",spacing:8,children:[(0,Fd.jsxs)(Dd.__experimentalVStack,{spacing:4,children:[!!t&&!!t.length&&(0,Fd.jsx)(Dd.__experimentalPaletteEdit,{canReset:t!==o,canOnlyChangeValues:!0,colors:t,onChange:r,paletteLabel:(0,$b.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:f}),window.__experimentalEnableColorRandomizer&&t?.length>0&&m&&(0,Fd.jsx)(Dd.Button,{__next40pxDefaultSize:!0,variant:"secondary",icon:lF,onClick:m,children:(0,$b.__)("Randomize colors")})]}),!!n&&!!n.length&&!!u&&(0,Fd.jsx)(Dd.__experimentalPaletteEdit,{canReset:n!==a,canOnlyChangeValues:!0,colors:n,onChange:i,paletteLabel:(0,$b.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:f}),(0,Fd.jsx)(Dd.__experimentalPaletteEdit,{colors:l,onChange:c,paletteLabel:(0,$b.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:f}),(0,Fd.jsx)(Jb,{title:(0,$b.__)("Palettes")})]})}var Oae=s(we(),1),su=s(H(),1),ox=s(N(),1);var iu=s(x(),1),H8e={placement:"bottom-start",offset:8},U8e=()=>{};function Nae({name:e}){let[t,r]=Te("color.gradients.theme",e),[o]=Te("color.gradients.theme",e,"base"),[n,i]=Te("color.gradients.default",e),[a]=Te("color.gradients.default",e,"base"),[l,c]=Te("color.gradients.custom",e),[u]=Te("color.defaultGradients",e),[d]=Te("color.duotone.custom")||[],[f]=Te("color.duotone.default")||[],[m]=Te("color.duotone.theme")||[],[h]=Te("color.defaultDuotone"),g=[...d||[],...m||[],...f&&h?f:[]],y=(0,Oae.useViewportMatch)("small","<")?H8e:void 0;return(0,iu.jsxs)(su.__experimentalVStack,{className:"global-styles-ui-gradient-palette-panel",spacing:8,children:[!!t&&!!t.length&&(0,iu.jsx)(su.__experimentalPaletteEdit,{canReset:t!==o,canOnlyChangeValues:!0,gradients:t,onChange:r,paletteLabel:(0,ox.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:y}),!!n&&!!n.length&&!!u&&(0,iu.jsx)(su.__experimentalPaletteEdit,{canReset:n!==a,canOnlyChangeValues:!0,gradients:n,onChange:i,paletteLabel:(0,ox.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:y}),(0,iu.jsx)(su.__experimentalPaletteEdit,{gradients:l,onChange:c,paletteLabel:(0,ox.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:y}),!!g&&!!g.length&&(0,iu.jsxs)("div",{children:[(0,iu.jsx)(uo,{level:3,children:(0,ox.__)("Duotone")}),(0,iu.jsx)(su.__experimentalSpacer,{margin:3}),(0,iu.jsx)(su.DuotonePicker,{duotonePalette:g,disableCustomDuotone:!0,disableCustomColors:!0,clearable:!1,onChange:U8e,colorPalette:[]})]})]})}var Ss=s(x(),1),{Tabs:e0}=gt(Mae.privateApis);function G8e({name:e}){return(0,Ss.jsxs)(Ss.Fragment,{children:[(0,Ss.jsx)(Lt,{title:(0,nx.__)("Edit palette"),description:(0,nx.__)("The combination of colors used across the site and in color pickers.")}),(0,Ss.jsxs)(e0,{children:[(0,Ss.jsxs)(e0.TabList,{children:[(0,Ss.jsx)(e0.Tab,{tabId:"color",children:(0,nx.__)("Color")}),(0,Ss.jsx)(e0.Tab,{tabId:"gradient",children:(0,nx.__)("Gradient")})]}),(0,Ss.jsx)(e0.TabPanel,{tabId:"color",focusable:!1,children:(0,Ss.jsx)(Iae,{name:e})}),(0,Ss.jsx)(e0.TabPanel,{tabId:"gradient",focusable:!1,children:(0,Ss.jsx)(Nae,{name:e})})]})]})}var Fae=G8e;var Z8=s(N(),1),Vae=s(ce(),1),jae=s(H(),1);var Dae=s(ce(),1);var Lae=s(x(),1),W8e={backgroundSize:"auto"},{BackgroundPanel:Y8e}=gt(Dae.privateApis);function Bae(){let[e]=Be("",void 0,"user",!1),[t,r]=Be("",void 0,"merged",!1),[o]=Te("");return(0,Lae.jsx)(Y8e,{inheritedValue:t,value:e,onChange:r,settings:o,defaultValues:W8e})}var np=s(x(),1),{useHasBackgroundPanel:q8e}=gt(Vae.privateApis);function K8e(){let[e]=Te(""),t=q8e(e);return(0,np.jsxs)(np.Fragment,{children:[(0,np.jsx)(Lt,{title:(0,Z8.__)("Background"),description:(0,np.jsx)(jae.__experimentalText,{children:(0,Z8.__)("Set styles for the site's background.")})}),t&&(0,np.jsx)(Bae,{})]})}var zae=K8e;var wi=s(H(),1),bi=s(N(),1);var Yae=s(V(),1);var Hae=s(H(),1),Uae=s(N(),1),Gae=s(x(),1);function Z8e({text:e,confirmButtonText:t,isOpen:r,toggleOpen:o,onConfirm:n}){let i=async()=>{o(),n()},a=()=>{o()};return(0,Gae.jsx)(Hae.__experimentalConfirmDialog,{isOpen:r,cancelButtonText:(0,Uae.__)("Cancel"),confirmButtonText:t,onCancel:a,onConfirm:i,size:"medium",children:e})}var Wae=Z8e;var Yt=s(x(),1),{Menu:ix}=gt(wi.privateApis),Q8="6px 6px 9px rgba(0, 0, 0, 0.2)";function qae(){let[e]=Te("shadow.presets.default"),[t]=Te("shadow.defaultPresets"),[r]=Te("shadow.presets.theme"),[o,n]=Te("shadow.presets.custom"),i=d=>{n([...o||[],d])},a=()=>{n([])},[l,c]=(0,Yae.useState)(!1),u=()=>c(!l);return(0,Yt.jsxs)(Yt.Fragment,{children:[l&&(0,Yt.jsx)(Wae,{text:(0,bi.__)("Are you sure you want to remove all custom shadows?"),confirmButtonText:(0,bi.__)("Remove"),isOpen:l,toggleOpen:u,onConfirm:a}),(0,Yt.jsx)(Lt,{title:(0,bi.__)("Shadows"),description:(0,bi.__)("Manage and create shadow styles for use across the site.")}),(0,Yt.jsx)($m,{children:(0,Yt.jsxs)(wi.__experimentalVStack,{className:"global-styles-ui__shadows-panel",spacing:7,children:[t&&(0,Yt.jsx)(X8,{label:(0,bi.__)("Default"),shadows:e||[],category:"default"}),r&&r.length>0&&(0,Yt.jsx)(X8,{label:(0,bi.__)("Theme"),shadows:r||[],category:"theme"}),(0,Yt.jsx)(X8,{label:(0,bi.__)("Custom"),shadows:o||[],category:"custom",canCreate:!0,onCreate:i,onReset:u})]})})]})}function X8({label:e,shadows:t,category:r,canCreate:o,onCreate:n,onReset:i}){let a=()=>{let l=aA(t,"shadow-");n?.({name:(0,bi.sprintf)((0,bi.__)("Shadow %d"),l),shadow:Q8,slug:`shadow-${l}`})};return(0,Yt.jsxs)(wi.__experimentalVStack,{spacing:2,children:[(0,Yt.jsxs)(wi.__experimentalHStack,{justify:"space-between",children:[(0,Yt.jsx)(uo,{level:3,children:e}),(0,Yt.jsxs)(wi.FlexItem,{className:"global-styles-ui__shadows-panel__options-container",children:[o&&(0,Yt.jsx)(wi.Button,{size:"small",icon:Fu,label:(0,bi.__)("Add shadow"),onClick:()=>{a()}}),!!t?.length&&r==="custom"&&(0,Yt.jsxs)(ix,{children:[(0,Yt.jsx)(ix.TriggerButton,{render:(0,Yt.jsx)(wi.Button,{size:"small",icon:zr,label:(0,bi.__)("Shadow options")})}),(0,Yt.jsx)(ix.Popover,{children:(0,Yt.jsx)(ix.Item,{onClick:i,children:(0,Yt.jsx)(ix.ItemLabel,{children:(0,bi.__)("Remove all custom shadows")})})})]})]})]}),t.length>0&&(0,Yt.jsx)(wi.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map(l=>(0,Yt.jsx)(X8e,{shadow:l,category:r},l.slug))})]})}function X8e({shadow:e,category:t}){return(0,Yt.jsx)(qr,{path:`/shadows/edit/${t}/${e.slug}`,children:(0,Yt.jsxs)(wi.__experimentalHStack,{children:[(0,Yt.jsx)(wi.FlexItem,{children:e.name}),(0,Yt.jsx)(Uo,{icon:(0,bi.isRTL)()?tr:rr})]})})}var We=s(H(),1),gr=s(N(),1);var la=s(V(),1);function Kae(e){return(e.match(/(?:[^,(]|\([^)]*\))+/g)||[]).map(r=>r.trim())}function Zae(e){let t={x:"0",y:"0",blur:"0",spread:"0",color:"#000",inset:!1};if(!e||e.includes("none"))return t;let r=/((?:^|\s+)(-?\d*\.?\d+(?:px|%|in|cm|mm|em|rem|ex|pt|pc|vh|vw|vmin|vmax|ch|lh)?)(?=\s|$)(?![^(]*\))){1,4}/g,o=e.match(r)||[];if(o.length!==1)return t;let n=o[0].split(" ").map(g=>g.trim()).filter(g=>g);if(n.length<2)return t;let i=e.match(/inset/gi)||[];if(i.length>1)return t;let a=i.length===1,l=e.replace(r,"").trim();a&&(l=l.replace("inset","").replace("INSET","").trim());let c=/^#([0-9a-f]{3}){1,2}$|^#([0-9a-f]{4}){1,2}$|^(?:rgb|hsl)a?\(?[\d*\.?\d+%?,?\/?\s]*\)$/gi,u=(l.match(c)||[]).map(g=>g?.trim()).filter(g=>g);if(u.length>1)return t;if(u.length===0&&(u=l.trim().split(" ").filter(g=>g),u.length>1))return t;let[d,f,m,h]=n;return{x:d,y:f,blur:m||t.blur,spread:h||t.spread,inset:a,color:l||t.color}}function Xae(e){let t=`${e.x||"0px"} ${e.y||"0px"} ${e.blur||"0px"} ${e.spread||"0px"}`;return`${e.inset?"inset":""} ${t} ${e.color||""}`.trim()}var Fe=s(x(),1),{Menu:sx}=gt(We.privateApis),Q8e=[{label:(0,gr.__)("Rename"),action:"rename"},{label:(0,gr.__)("Delete"),action:"delete"}],J8e=[{label:(0,gr.__)("Reset"),action:"reset"}];function Qae(){let{goBack:e,params:t}=(0,We.useNavigator)(),{category:r,slug:o}=t,[n,i]=Te(`shadow.presets.${r}`);(0,la.useEffect)(()=>{let _=n?.some(C=>C.slug===o);o&&!_&&e()},[n,o,e]);let[a]=Te(`shadow.presets.${r}`,void 0,"base"),[l,c]=(0,la.useState)(()=>(n||[]).find(_=>_.slug===o)),u=(0,la.useMemo)(()=>(a||[]).find(_=>_.slug===o),[a,o]),[d,f]=(0,la.useState)(!1),[m,h]=(0,la.useState)(!1),[g,v]=(0,la.useState)(l?.name);if(!r||!o)return null;let y=_=>{c({...l,shadow:_});let C=n.map(k=>k.slug===o?{...l,shadow:_}:k);i(C)},b=_=>{if(_==="reset"){let C=n.map(k=>k.slug===o?u:k);c(u),i(C)}else _==="delete"?f(!0):_==="rename"&&h(!0)},S=()=>{i(n.filter(_=>_.slug!==o))},w=_=>{if(!_)return;let C=n.map(k=>k.slug===o?{...l,name:_}:k);c({...l,name:_}),i(C)};return l?(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsxs)(We.__experimentalHStack,{justify:"space-between",children:[(0,Fe.jsx)(Lt,{title:l.name}),(0,Fe.jsx)(We.FlexItem,{children:(0,Fe.jsx)(We.__experimentalSpacer,{marginTop:2,marginBottom:0,paddingX:4,children:(0,Fe.jsxs)(sx,{children:[(0,Fe.jsx)(sx.TriggerButton,{render:(0,Fe.jsx)(We.Button,{size:"small",icon:zr,label:(0,gr.__)("Menu")})}),(0,Fe.jsx)(sx.Popover,{children:(r==="custom"?Q8e:J8e).map(_=>(0,Fe.jsx)(sx.Item,{onClick:()=>b(_.action),disabled:_.action==="reset"&&l.shadow===u?.shadow,children:(0,Fe.jsx)(sx.ItemLabel,{children:_.label})},_.action))})]})})})]}),(0,Fe.jsxs)($m,{children:[(0,Fe.jsx)($8e,{shadow:l.shadow}),(0,Fe.jsx)(e7e,{shadow:l.shadow,onChange:y})]}),d&&(0,Fe.jsx)(We.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{S(),f(!1)},onCancel:()=>{f(!1)},confirmButtonText:(0,gr.__)("Delete"),size:"medium",children:(0,gr.sprintf)((0,gr.__)('Are you sure you want to delete "%s" shadow preset?'),l.name)}),m&&(0,Fe.jsx)(We.Modal,{title:(0,gr.__)("Rename"),onRequestClose:()=>h(!1),size:"small",children:(0,Fe.jsxs)("form",{onSubmit:_=>{_.preventDefault(),w(g),h(!1)},children:[(0,Fe.jsx)(We.__experimentalInputControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,gr.__)("Name"),placeholder:(0,gr.__)("Shadow name"),value:g??"",onChange:v}),(0,Fe.jsx)(We.__experimentalSpacer,{marginBottom:6}),(0,Fe.jsxs)(We.Flex,{className:"block-editor-shadow-edit-modal__actions",justify:"flex-end",expanded:!1,children:[(0,Fe.jsx)(We.FlexItem,{children:(0,Fe.jsx)(We.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>h(!1),children:(0,gr.__)("Cancel")})}),(0,Fe.jsx)(We.FlexItem,{children:(0,Fe.jsx)(We.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,gr.__)("Save")})})]})]})})]}):(0,Fe.jsx)(Lt,{title:""})}function $8e({shadow:e}){return(0,Fe.jsx)(We.__experimentalSpacer,{marginBottom:4,marginTop:-2,children:(0,Fe.jsx)(We.__experimentalHStack,{alignment:"center",justify:"center",className:"global-styles-ui__shadow-preview-panel",children:(0,Fe.jsx)("div",{className:"global-styles-ui__shadow-preview-block",style:{boxShadow:e}})})})}function e7e({shadow:e,onChange:t}){let r=(0,la.useRef)(null),o=(0,la.useMemo)(()=>Kae(e),[e]),n=(l,c)=>{let u=[...o];u[l]=c,t(u.join(", "))},i=()=>{t([...o,Q8].join(", "))},a=l=>{t(o.filter((c,u)=>u!==l).join(", ")),r.current?.focus()};return(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsx)(We.__experimentalVStack,{spacing:2,children:(0,Fe.jsxs)(We.__experimentalHStack,{justify:"space-between",children:[(0,Fe.jsx)(uo,{level:3,children:(0,gr.__)("Shadows")}),(0,Fe.jsx)(We.FlexItem,{className:"global-styles-ui__shadows-panel__options-container",children:(0,Fe.jsx)(We.Button,{size:"small",icon:Fu,label:(0,gr.__)("Add shadow"),onClick:()=>{i()},ref:r})})]})}),(0,Fe.jsx)(We.__experimentalSpacer,{}),(0,Fe.jsx)(We.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:o.map((l,c)=>(0,Fe.jsx)(t7e,{shadow:l,onChange:u=>n(c,u),canRemove:o.length>1,onRemove:()=>a(c)},c))})]})}function t7e({shadow:e,onChange:t,canRemove:r,onRemove:o}){let n={placement:"left-start",offset:36,shift:!0},i=(0,la.useMemo)(()=>Zae(e),[e]),a=l=>{t(Xae(l))};return(0,Fe.jsx)(We.Dropdown,{popoverProps:n,className:"global-styles-ui__shadow-editor__dropdown",renderToggle:({onToggle:l,isOpen:c})=>{let u={onClick:l,className:K("global-styles-ui__shadow-editor__dropdown-toggle",{"is-open":c}),"aria-expanded":c},d={onClick:()=>{c&&l(),o()},className:K("global-styles-ui__shadow-editor__remove-button",{"is-open":c}),label:(0,gr.__)("Remove shadow")};return(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsx)(We.Button,{__next40pxDefaultSize:!0,icon:wS,...u,children:i.inset?(0,gr.__)("Inner shadow"):(0,gr.__)("Drop shadow")}),r&&(0,Fe.jsx)(We.Button,{size:"small",icon:JM,...d})]})},renderContent:()=>(0,Fe.jsx)(We.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"global-styles-ui__shadow-editor__dropdown-content",children:(0,Fe.jsx)(r7e,{shadowObj:i,onChange:a})})})}function r7e({shadowObj:e,onChange:t}){let n=(i,a)=>{let l={...e,[i]:a};t(l)};return(0,Fe.jsxs)(We.__experimentalVStack,{spacing:4,className:"global-styles-ui__shadow-editor-panel",children:[(0,Fe.jsx)(We.ColorPalette,{clearable:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,value:e.color,onChange:i=>n("color",i)}),(0,Fe.jsxs)(We.__experimentalToggleGroupControl,{label:(0,gr.__)("Shadow Type"),value:e.inset?"inset":"outset",isBlock:!0,onChange:i=>n("inset",i==="inset"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,children:[(0,Fe.jsx)(We.__experimentalToggleGroupControlOption,{value:"outset",label:(0,gr.__)("Outset")}),(0,Fe.jsx)(We.__experimentalToggleGroupControlOption,{value:"inset",label:(0,gr.__)("Inset")})]}),(0,Fe.jsxs)(We.__experimentalGrid,{columns:2,gap:4,children:[(0,Fe.jsx)(UA,{label:(0,gr.__)("X Position"),value:e.x,onChange:i=>n("x",i)}),(0,Fe.jsx)(UA,{label:(0,gr.__)("Y Position"),value:e.y,onChange:i=>n("y",i)}),(0,Fe.jsx)(UA,{label:(0,gr.__)("Blur"),value:e.blur,onChange:i=>n("blur",i)}),(0,Fe.jsx)(UA,{label:(0,gr.__)("Spread"),value:e.spread,onChange:i=>n("spread",i)})]})]})}function UA({label:e,value:t,onChange:r}){return(0,Fe.jsx)(We.__experimentalUnitControl,{label:e,__next40pxDefaultSize:!0,value:t,onChange:n=>{let a=n!==void 0&&!isNaN(parseFloat(n))?n:"0px";r(a)}})}var J8=s(x(),1);function Jae(){return(0,J8.jsx)(qae,{})}function $ae(){return(0,J8.jsx)(Qae,{})}var ole=s(N(),1),nle=s(ce(),1);var ele=s(ce(),1),$8=s(V(),1);var tle=s(x(),1),{useSettingsForBlockElement:o7e,DimensionsPanel:n7e}=gt(ele.privateApis),i7e={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,height:!0,minHeight:!0,minWidth:!0,width:!0,childLayout:!1};function rle(){let[e]=Be("",void 0,"user",!1),[t,r]=Be("",void 0,"merged",!1),[o]=Te("",void 0,"user"),[n,i]=Te(""),a=o7e(n),l=(0,$8.useMemo)(()=>({...t,layout:a.layout}),[t,a.layout]),c=(0,$8.useMemo)(()=>({...e,layout:o.layout}),[e,o.layout]);return(0,tle.jsx)(n7e,{inheritedValue:l,value:c,onChange:d=>{let f={...d};if(delete f.layout,r(f),d.layout!==o.layout){let m={...o,layout:d.layout};m.layout?.definitions&&delete m.layout.definitions,i(m)}},settings:a,includeLayoutControls:!0,defaultControls:i7e})}var jg=s(x(),1),{useHasDimensionsPanel:s7e,useSettingsForBlockElement:a7e}=gt(nle.privateApis);function l7e(){let[e]=Te(""),t=a7e(e),r=s7e(t);return(0,jg.jsxs)(jg.Fragment,{children:[(0,jg.jsx)(Lt,{title:(0,ole.__)("Layout")}),r&&(0,jg.jsx)(rle,{})]})}var ile=l7e;var qA=s(H(),1),t7=s(N(),1);var e7=s(N(),1),ule=s(H(),1);var sle=s(Q(),1),ale=s(U(),1),WA=s(V(),1),lle=s(H(),1),cle=s(N(),1);var GA=s(x(),1);function c7e({gap:e=2}){let{user:t}=(0,WA.useContext)(Eo),r=t?.styles,n=(0,ale.useSelect)(a=>{let l=a(sle.store).__experimentalGetCurrentThemeGlobalStylesVariations();return Array.isArray(l)?l:void 0},[])?.filter(a=>!U1(a,["color"])&&!U1(a,["typography","spacing"])),i=(0,WA.useMemo)(()=>[...[{title:(0,cle.__)("Default"),settings:{},styles:{}},...n??[]].map(l=>{let c=l?.styles?.blocks?{...l.styles.blocks}:{};r?.blocks&&Object.keys(r.blocks).forEach(m=>{if(r.blocks?.[m]?.css){let h=c[m]||{},g={css:`${c[m]?.css||""} ${r.blocks?.[m]?.css?.trim()||""}`};c[m]={...h,...g}}});let u=r?.css||l.styles?.css?{css:`${l.styles?.css||""} ${r?.css||""}`}:{},d=Object.keys(c).length>0?{blocks:c}:{},f={...l.styles,...u,...d};return{...l,settings:l.settings??{},styles:f}})],[n,r?.blocks,r?.css]);return!n||n.length<1?null:(0,GA.jsx)(lle.__experimentalGrid,{columns:2,className:"global-styles-ui-style-variations-container",gap:e,children:i.map((a,l)=>(0,GA.jsx)(Hb,{variation:a,children:c=>(0,GA.jsx)(uA,{label:a?.title,withHoverView:!0,isFocused:c,variation:a})},l))})}var YA=c7e;var t0=s(x(),1);function dle(){return(0,t0.jsxs)(ule.__experimentalVStack,{spacing:10,className:"global-styles-ui-variation-container",children:[(0,t0.jsx)(YA,{gap:3}),(0,t0.jsx)(Jb,{title:(0,e7.__)("Color Variations"),gap:3}),(0,t0.jsx)(Ub,{title:(0,e7.__)("Typography"),gap:3})]})}var Ld=s(x(),1);function u7e(){return(0,Ld.jsxs)(Ld.Fragment,{children:[(0,Ld.jsx)(Lt,{title:(0,t7.__)("Browse styles"),description:(0,t7.__)("Choose a variation to change the look of the site.")}),(0,Ld.jsx)(qA.Card,{size:"small",isBorderless:!0,className:"global-styles-ui-screen-style-variations",children:(0,Ld.jsx)(qA.CardBody,{children:(0,Ld.jsx)(dle,{})})})]})}var fle=u7e;var ax=s(N(),1),mle=s(H(),1),ple=s(ce(),1);var el=s(x(),1),{AdvancedPanel:d7e}=gt(ple.privateApis);function f7e(){let[e]=Be("",void 0,"user",!1),[t,r]=Be("",void 0,"merged",!1);return(0,el.jsxs)(el.Fragment,{children:[(0,el.jsx)(Lt,{title:(0,ax.__)("Additional CSS"),description:(0,el.jsxs)(el.Fragment,{children:[(0,ax.__)("You can add custom CSS to further customize the appearance and layout of your site."),(0,el.jsx)("br",{}),(0,el.jsx)(mle.ExternalLink,{href:(0,ax.__)("https://developer.wordpress.org/advanced-administration/wordpress/css/"),className:"global-styles-ui-screen-css-help-link",children:(0,ax.__)("Learn more about CSS")})]})}),(0,el.jsx)("div",{className:"global-styles-ui-screen-css",children:(0,el.jsx)(d7e,{value:e,onChange:r,inheritedValue:t})})]})}var hle=f7e;var Bd=s(N(),1),r0=s(H(),1),zg=s(V(),1);var gle=s(U(),1),vle=s(Q(),1),lx=s(V(),1);var m7e={per_page:-1,_fields:"id,name,avatar_urls",context:"view",capabilities:["edit_theme_options"]},p7e={per_page:100,page:1},KA=[];function cx({query:e}={}){let{user:t}=(0,lx.useContext)(Eo),r=(0,lx.useMemo)(()=>({...p7e,...e}),[e]),{authors:o,currentUser:n,isDirty:i,revisions:a,isLoadingGlobalStylesRevisions:l,revisionsCount:c}=(0,gle.useSelect)(u=>{let{__experimentalGetDirtyEntityRecords:d,getCurrentUser:f,getUsers:m,getRevisions:h,__experimentalGetCurrentGlobalStylesId:g,getEntityRecord:v,isResolving:y}=u(vle.store),b=d()||[],S=f(),w=b.length>0,_=g(),k=(_?v("root","globalStyles",_):void 0)?._links?.["version-history"]?.[0]?.count??0,A=_&&h("root","globalStyles",_,r)||KA,R=m(m7e)||KA,I=_?y("getRevisions",["root","globalStyles",_,r]):!1;return{authors:R,currentUser:S,isDirty:w,revisions:A,isLoadingGlobalStylesRevisions:I,revisionsCount:k}},[r]);return(0,lx.useMemo)(()=>{if(!o.length||l)return{revisions:KA,hasUnsavedChanges:i,isLoading:!0,revisionsCount:c};let u=a.map(f=>({...f,author:o.find(m=>m.id===f.author)}));if(a.length){if(u[0].id!=="unsaved"&&r.page===1&&(u[0].isLatest=!0),i&&t&&Object.keys(t).length>0&&n&&r.page===1){let f={id:"unsaved",styles:t?.styles,settings:t?.settings,_links:t?._links,author:{name:n?.name||"",avatar_urls:n?.avatar_urls||{}},modified:new Date};u.unshift(f)}r.per_page&&r.page===Math.ceil(c/r.per_page)&&u.push({id:"parent",styles:{},settings:{}})}return{revisions:u,hasUnsavedChanges:i,isLoading:!1,revisionsCount:c}},[i,a,n,o,t,l,c,r.page,r.per_page])}var Un=s(N(),1),ux=s(H(),1),au=s(go(),1),yle=s(Q(),1),ble=s(U(),1);var ZA=s(Wr(),1),hn=s(x(),1),h7e=3600*1e3*24;function g7e({revision:e,previousRevision:t}){let r=C1(e,t,{maxResults:7});return r.length?(0,hn.jsx)("ul",{"data-testid":"global-styles-revision-changes",className:"global-styles-ui-screen-revisions__changes",children:r.map(o=>(0,hn.jsx)("li",{children:o},o))}):null}function v7e(e,t,r,o){return e==="parent"?(0,Un.__)("Reset the styles to the theme defaults"):e==="unsaved"?(0,Un.sprintf)((0,Un.__)("Unsaved changes by %s"),t):o?(0,Un.sprintf)((0,Un.__)("Changes saved by %1$s on %2$s. This revision matches current editor styles."),t,r):(0,Un.sprintf)((0,Un.__)("Changes saved by %1$s on %2$s"),t,r)}function y7e({userRevisions:e,selectedRevisionId:t,onChange:r,canApplyRevision:o,onApplyRevision:n}){let{currentThemeName:i,currentUser:a}=(0,ble.useSelect)(u=>{let{getCurrentTheme:d,getCurrentUser:f}=u(yle.store),m=d();return{currentThemeName:m?.name?.rendered||m?.stylesheet,currentUser:f()}},[]),l=(0,au.getDate)(null).getTime(),{datetimeAbbreviated:c}=(0,au.getSettings)().formats;return(0,hn.jsx)(ux.Composite,{orientation:"vertical",className:"global-styles-ui-screen-revisions__revisions-list","aria-label":(0,Un.__)("Global styles revisions list"),role:"listbox",children:e.map((u,d)=>{let{id:f,author:m,modified:h}=u,g=f==="unsaved",v=g?a:m,y=v?.name||(0,Un.__)("User"),b=v?.avatar_urls?.["48"],w=t?t===f:d===0,_=!o&&w,C=f==="parent",k=h instanceof Date?h.toISOString():h,A=(0,au.getDate)(k??null),R=k&&l-A.getTime()>h7e?(0,au.dateI18n)(c,A):(0,au.humanTimeDiff)(k??A,void 0),I=v7e(f,y,(0,au.dateI18n)(c,A),_);return(0,hn.jsxs)(ux.Composite.Item,{className:"global-styles-ui-screen-revisions__revision-item","aria-current":w,role:"option",onKeyDown:B=>{let{keyCode:E}=B;(E===ZA.ENTER||E===ZA.SPACE)&&r(u)},onClick:B=>{B.preventDefault(),r(u)},"aria-selected":w,"aria-label":I,render:(0,hn.jsx)("div",{}),children:[(0,hn.jsx)("span",{className:"global-styles-ui-screen-revisions__revision-item-wrapper",children:C?(0,hn.jsxs)("span",{className:"global-styles-ui-screen-revisions__description",children:[(0,Un.__)("Default styles"),(0,hn.jsx)("span",{className:"global-styles-ui-screen-revisions__meta",children:i})]}):(0,hn.jsxs)("span",{className:"global-styles-ui-screen-revisions__description",children:[g?(0,hn.jsx)("span",{className:"global-styles-ui-screen-revisions__date",children:(0,Un.__)("(Unsaved)")}):(0,hn.jsx)("time",{className:"global-styles-ui-screen-revisions__date",dateTime:k,children:R}),(0,hn.jsxs)("span",{className:"global-styles-ui-screen-revisions__meta",children:[(0,hn.jsx)("img",{alt:y,src:b}),y]}),w&&(0,hn.jsx)(g7e,{revision:u,previousRevision:d<e.length?e[d+1]:void 0})]})}),w&&(_?(0,hn.jsx)("p",{className:"global-styles-ui-screen-revisions__applied-text",children:(0,Un.__)("These styles are already applied to your site.")}):(0,hn.jsx)(ux.Button,{size:"compact",variant:"primary",className:"global-styles-ui-screen-revisions__apply-button",onClick:n,"aria-label":(0,Un.__)("Apply the selected revision to your site."),children:C?(0,Un.__)("Reset to defaults"):(0,Un.__)("Apply")}))]},f)})})}var wle=y7e;var tl=s(H(),1),gn=s(N(),1);var Vl=s(x(),1);function Sle({currentPage:e,numPages:t,changePage:r,totalItems:o,className:n,disabled:i=!1,buttonVariant:a="tertiary",label:l=(0,gn.__)("Pagination")}){return(0,Vl.jsxs)(tl.__experimentalHStack,{expanded:!1,as:"nav","aria-label":l,spacing:3,justify:"flex-start",className:K("global-styles-ui-pagination",n),children:[(0,Vl.jsx)(tl.__experimentalText,{variant:"muted",className:"global-styles-ui-pagination__total",children:(0,gn.sprintf)((0,gn._n)("%d item","%d items",o),o)}),(0,Vl.jsxs)(tl.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,Vl.jsx)(tl.Button,{variant:a,onClick:()=>r(1),accessibleWhenDisabled:!0,disabled:i||e===1,label:(0,gn.__)("First page"),icon:(0,gn.isRTL)()?wa:Sa,size:"compact"}),(0,Vl.jsx)(tl.Button,{variant:a,onClick:()=>r(e-1),accessibleWhenDisabled:!0,disabled:i||e===1,label:(0,gn.__)("Previous page"),icon:(0,gn.isRTL)()?rr:tr,size:"compact"})]}),(0,Vl.jsx)(tl.__experimentalText,{variant:"muted",children:(0,gn.sprintf)((0,gn._x)("%1$d of %2$d","paging"),e,t)}),(0,Vl.jsxs)(tl.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,Vl.jsx)(tl.Button,{variant:a,onClick:()=>r(e+1),accessibleWhenDisabled:!0,disabled:i||e===t,label:(0,gn.__)("Next page"),icon:(0,gn.isRTL)()?tr:rr,size:"compact"}),(0,Vl.jsx)(tl.Button,{variant:a,onClick:()=>r(t),accessibleWhenDisabled:!0,disabled:i||e===t,label:(0,gn.__)("Last page"),icon:(0,gn.isRTL)()?Sa:wa,size:"compact"})]})]})}var jl=s(x(),1),_le=10;function b7e({onClose:e}={}){let{user:t,onChange:r}=(0,zg.useContext)(Eo),{params:o,goTo:n}=(0,r0.useNavigator)(),{revisionId:i}=o,[a,l]=(0,zg.useState)(1),{revisions:c,isLoading:u,hasUnsavedChanges:d,revisionsCount:f}=cx({query:{per_page:_le,page:a}}),m=Math.ceil(f/_le),[h,g]=(0,zg.useState)(!1),v=(0,zg.useMemo)(()=>i&&c.find(R=>String(R.id)===String(i))||t,[i,c,t]),y=hg(v,t),b=()=>{e&&e()},S=A=>{r(A),g(!1),b()},w=A=>{n(`/revisions/${A.id}`)},_=v?.id??c[0]?.id,C=!!_&&_!=="unsaved"&&!y,k=!!c.length;return(0,jl.jsxs)(jl.Fragment,{children:[(0,jl.jsx)(Lt,{title:f?(0,Bd.sprintf)((0,Bd.__)("Revisions (%d)"),f):(0,Bd.__)("Revisions"),description:(0,Bd.__)(`Click on previously saved styles to preview them. To restore a selected version to the editor, hit "Apply." When you're ready, use the Save button to save your changes.`),onBack:b}),!k&&(0,jl.jsx)(r0.Spinner,{className:"global-styles-ui-screen-revisions__loading"}),(0,jl.jsx)(wle,{onChange:w,selectedRevisionId:_,userRevisions:c,canApplyRevision:C,onApplyRevision:()=>d?g(!0):S(v)}),m>1&&(0,jl.jsx)("div",{className:"global-styles-ui-screen-revisions__footer",children:(0,jl.jsx)(Sle,{className:"global-styles-ui-screen-revisions__pagination",currentPage:a,numPages:m,changePage:l,totalItems:f,disabled:u,label:(0,Bd.__)("Global Styles pagination")})}),h&&(0,jl.jsx)(r0.__experimentalConfirmDialog,{isOpen:h,confirmButtonText:(0,Bd.__)("Apply"),onConfirm:()=>S(v),onCancel:()=>g(!1),size:"medium",children:(0,Bd.__)("Are you sure you want to apply this revision? Any unsaved changes will be lost.")})]})}var xle=b7e;var Xo=s(N(),1),fo=s(H(),1);var kle=s(V(),1);var Cle=s(H(),1),Tle=s(N(),1),Ple=s(x(),1);function w7e({text:e,confirmButtonText:t,isOpen:r,toggleOpen:o,onConfirm:n}){let i=async()=>{o(),n()},a=()=>{o()};return(0,Ple.jsx)(Cle.__experimentalConfirmDialog,{isOpen:r,cancelButtonText:(0,Tle.__)("Cancel"),confirmButtonText:t,onCancel:a,onConfirm:i,size:"medium",children:e})}var Ele=w7e;var Bt=s(x(),1),{Menu:dx}=gt(fo.privateApis);function r7({label:e,origin:t,sizes:r,handleAddFontSize:o,handleResetFontSizes:n}){let[i,a]=(0,kle.useState)(!1),l=()=>a(!i),c=t==="custom"?(0,Xo.__)("Are you sure you want to remove all custom font size presets?"):(0,Xo.__)("Are you sure you want to reset all font size presets to their default values?");return(0,Bt.jsxs)(Bt.Fragment,{children:[n&&i&&(0,Bt.jsx)(Ele,{text:c,confirmButtonText:t==="custom"?(0,Xo.__)("Remove"):(0,Xo.__)("Reset"),isOpen:i,toggleOpen:l,onConfirm:n}),(0,Bt.jsxs)(fo.__experimentalVStack,{spacing:4,children:[(0,Bt.jsxs)(fo.__experimentalHStack,{children:[(0,Bt.jsx)(uo,{level:3,children:e}),(0,Bt.jsxs)(fo.FlexItem,{className:"global-styles-ui__typography-panel__options-container",children:[t==="custom"&&(0,Bt.jsx)(fo.Button,{label:(0,Xo.__)("Add font size"),icon:Fu,size:"small",onClick:o}),!!n&&(0,Bt.jsxs)(dx,{children:[(0,Bt.jsx)(dx.TriggerButton,{render:(0,Bt.jsx)(fo.Button,{size:"small",icon:zr,label:(0,Xo.__)("Font size presets options")})}),(0,Bt.jsx)(dx.Popover,{children:(0,Bt.jsx)(dx.Item,{onClick:l,children:(0,Bt.jsx)(dx.ItemLabel,{children:t==="custom"?(0,Xo.__)("Remove font size presets"):(0,Xo.__)("Reset font size presets")})})})]})]})]}),!!r.length&&(0,Bt.jsx)(fo.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:r.map(u=>(0,Bt.jsx)(qr,{path:`/typography/font-sizes/${t}/${u.slug}`,children:(0,Bt.jsxs)(fo.__experimentalHStack,{children:[(0,Bt.jsx)(fo.FlexItem,{className:"global-styles-ui-font-size__item",children:u.name}),(0,Bt.jsx)(fo.FlexItem,{display:"flex",children:(0,Bt.jsx)(Uo,{icon:(0,Xo.isRTL)()?tr:rr})})]})},u.slug))})]})]})}function S7e(){let[e,t]=Te("typography.fontSizes.theme"),[r]=Te("typography.fontSizes.theme","base"),[o,n]=Te("typography.fontSizes.default"),[i]=Te("typography.fontSizes.default","base"),[a=[],l]=Te("typography.fontSizes.custom"),[c]=Te("typography.defaultFontSizes"),u=()=>{let f=aA(a,"custom-"),m={name:(0,Xo.sprintf)((0,Xo.__)("New Font Size %d"),f),size:"16px",slug:`custom-${f}`};l([...a,m])},d=(f,m)=>f.map(h=>h.size).join("")===m.map(h=>h.size).join("");return(0,Bt.jsxs)(fo.__experimentalVStack,{spacing:2,children:[(0,Bt.jsx)(Lt,{title:(0,Xo.__)("Font size presets"),description:(0,Xo.__)("Create and edit the presets used for font sizes across the site.")}),(0,Bt.jsx)(fo.__experimentalView,{children:(0,Bt.jsx)(fo.__experimentalSpacer,{paddingX:4,children:(0,Bt.jsxs)(fo.__experimentalVStack,{spacing:8,children:[!!e?.length&&(0,Bt.jsx)(r7,{label:(0,Xo.__)("Theme"),origin:"theme",sizes:e,handleAddFontSize:u,handleResetFontSizes:d(e,r)?void 0:()=>t(r)}),c&&!!o?.length&&(0,Bt.jsx)(r7,{label:(0,Xo.__)("Default"),origin:"default",sizes:o,handleAddFontSize:u,handleResetFontSizes:d(o,i)?void 0:()=>n(i)}),(0,Bt.jsx)(r7,{label:(0,Xo.__)("Custom"),origin:"custom",sizes:a,handleAddFontSize:u,handleResetFontSizes:a.length>0?()=>l([]):void 0})]})})})]})}var Rle=S7e;var _s=s(N(),1),mo=s(H(),1);var fx=s(V(),1);var Ale=s(ce(),1),Ile=s(N(),1);var Ole=s(x(),1);function _7e({fontSize:e}){let[t]=Be("typography"),r=typeof e?.fluid=="object"&&e?.fluid?.min&&e?.fluid?.max?{minimumFontSize:e.fluid.min,maximumFontSize:e.fluid.max}:{fontSize:e.size},o=(0,Ale.getComputedFluidTypographyValue)(r);return(0,Ole.jsx)("div",{className:"global-styles-ui-typography-preview",style:{fontSize:o,fontFamily:t?.fontFamily??"serif"},children:(0,Ile.__)("Aa")})}var Nle=_7e;var Mle=s(H(),1),o0=s(N(),1),Fle=s(x(),1);function x7e({fontSize:e,isOpen:t,toggleOpen:r,handleRemoveFontSize:o}){let n=async()=>{r(),o(e)},i=()=>{r()};return(0,Fle.jsx)(Mle.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,o0.__)("Cancel"),confirmButtonText:(0,o0.__)("Delete"),onCancel:i,onConfirm:n,size:"medium",children:e&&(0,o0.sprintf)((0,o0.__)('Are you sure you want to delete "%s" font size preset?'),e.name)})}var Dle=x7e;var zl=s(H(),1),n0=s(N(),1),Lle=s(V(),1),Vd=s(x(),1);function C7e({fontSize:e,toggleOpen:t,handleRename:r}){let[o,n]=(0,Lle.useState)(e.name),i=()=>{o&&o.trim()&&r(o),t()};return(0,Vd.jsx)(zl.Modal,{onRequestClose:t,focusOnMount:"firstContentElement",title:(0,n0.__)("Rename"),size:"small",children:(0,Vd.jsx)("form",{onSubmit:a=>{a.preventDefault(),i(),t()},children:(0,Vd.jsxs)(zl.__experimentalVStack,{spacing:"3",children:[(0,Vd.jsx)(zl.__experimentalInputControl,{__next40pxDefaultSize:!0,autoComplete:"off",value:o,onChange:n,label:(0,n0.__)("Name"),placeholder:(0,n0.__)("Font size preset name")}),(0,Vd.jsxs)(zl.__experimentalHStack,{justify:"right",children:[(0,Vd.jsx)(zl.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,n0.__)("Cancel")}),(0,Vd.jsx)(zl.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,n0.__)("Save")})]})]})})})}var Ble=C7e;var Qo=s(H(),1),jd=s(x(),1),T7e=["px","em","rem","vw","vh"];function XA(e){let{baseControlProps:t}=(0,Qo.useBaseControlProps)(e),{value:r,onChange:o,fallbackValue:n,disabled:i,label:a}=e,l=(0,Qo.__experimentalUseCustomUnits)({availableUnits:T7e}),[c,u="px"]=(0,Qo.__experimentalParseQuantityAndUnitFromRawValue)(r,l),d=!!u&&["em","rem","vw","vh"].includes(u);return(0,jd.jsx)(Qo.BaseControl,{...t,children:(0,jd.jsxs)(Qo.Flex,{children:[(0,jd.jsx)(Qo.FlexItem,{isBlock:!0,children:(0,jd.jsx)(Qo.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:a,hideLabelFromVision:!0,value:r,onChange:h=>{o?.(h)},units:l,min:0,disabled:i})}),(0,jd.jsx)(Qo.FlexItem,{isBlock:!0,children:(0,jd.jsx)(Qo.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,jd.jsx)(Qo.RangeControl,{__next40pxDefaultSize:!0,label:a,hideLabelFromVision:!0,value:c,initialPosition:n,withInputField:!1,onChange:h=>{o?.(h!==void 0?h+u:void 0)},min:0,max:d?10:100,step:d?.1:1,disabled:i})})})]})})}var Ot=s(x(),1),{Menu:Hg}=gt(mo.privateApis);function P7e(){let[e,t]=(0,fx.useState)(!1),[r,o]=(0,fx.useState)(!1),{params:{origin:n,slug:i},goBack:a}=(0,mo.useNavigator)(),[l,c]=Te("typography.fontSizes"),[u]=Te("typography.fluid"),d=l?.[n]??[],f=d.find(R=>R.slug===i);if((0,fx.useEffect)(()=>{i&&!f&&a()},[i,f,a]),!n||!i||!f)return null;let m=f?.fluid!==void 0?!!f.fluid:!!u,h=typeof f?.fluid=="object",g=R=>{_("name",R)},v=R=>{_("size",R)},y=R=>{_("fluid",R)},b=R=>{R?_("fluid",{min:f.size,max:f.size}):_("fluid",!0)},S=R=>{let I=typeof f.fluid=="object"?f.fluid:{};_("fluid",{...I,min:R})},w=R=>{let I=typeof f.fluid=="object"?f.fluid:{};_("fluid",{...I,max:R})},_=(R,I)=>{let B=d.map(E=>E.slug===i?{...E,[R]:I}:E);c({...l,[n]:B})},C=()=>{let R=d.filter(I=>I.slug!==i);c({...l,[n]:R})},k=()=>{t(!e)},A=()=>{o(!r)};return(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)(Dle,{fontSize:f,isOpen:e,toggleOpen:k,handleRemoveFontSize:C}),r&&(0,Ot.jsx)(Ble,{fontSize:f,toggleOpen:A,handleRename:g}),(0,Ot.jsxs)(mo.__experimentalVStack,{spacing:4,children:[(0,Ot.jsxs)(mo.__experimentalHStack,{justify:"space-between",alignment:"flex-start",children:[(0,Ot.jsx)(Lt,{title:f.name,description:(0,_s.sprintf)((0,_s.__)("Manage the font size %s."),f.name)}),n==="custom"&&(0,Ot.jsx)(mo.FlexItem,{children:(0,Ot.jsx)(mo.__experimentalSpacer,{marginTop:3,marginBottom:0,paddingX:4,children:(0,Ot.jsxs)(Hg,{children:[(0,Ot.jsx)(Hg.TriggerButton,{render:(0,Ot.jsx)(mo.Button,{size:"small",icon:zr,label:(0,_s.__)("Font size options")})}),(0,Ot.jsxs)(Hg.Popover,{children:[(0,Ot.jsx)(Hg.Item,{onClick:A,children:(0,Ot.jsx)(Hg.ItemLabel,{children:(0,_s.__)("Rename")})}),(0,Ot.jsx)(Hg.Item,{onClick:k,children:(0,Ot.jsx)(Hg.ItemLabel,{children:(0,_s.__)("Delete")})})]})]})})})]}),(0,Ot.jsx)(mo.__experimentalView,{children:(0,Ot.jsx)(mo.__experimentalSpacer,{paddingX:4,marginBottom:0,paddingBottom:6,children:(0,Ot.jsxs)(mo.__experimentalVStack,{spacing:4,children:[(0,Ot.jsx)(mo.FlexItem,{children:(0,Ot.jsx)(Nle,{fontSize:f})}),(0,Ot.jsx)(XA,{label:(0,_s.__)("Size"),value:!h&&f.size?String(f.size):"",onChange:v,disabled:h}),(0,Ot.jsx)(mo.ToggleControl,{label:(0,_s.__)("Fluid typography"),help:(0,_s.__)("Scale the font size dynamically to fit the screen or viewport."),checked:m,onChange:y}),m&&(0,Ot.jsx)(mo.ToggleControl,{label:(0,_s.__)("Custom fluid values"),help:(0,_s.__)("Set custom min and max values for the fluid font size."),checked:h,onChange:b}),h&&(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)(XA,{label:(0,_s.__)("Minimum"),value:typeof f?.fluid=="object"?f.fluid?.min:void 0,onChange:S}),(0,Ot.jsx)(XA,{label:(0,_s.__)("Maximum"),value:typeof f?.fluid=="object"?f.fluid?.max:void 0,onChange:w})]})]})})})]})]})}var Vle=P7e;var je=s(x(),1);function E7e({parentMenu:e,blockStyles:t,blockName:r}){return(0,je.jsx)(je.Fragment,{children:t.map((o,n)=>(0,je.jsx)(i0.Navigator.Screen,{path:e+"/variations/"+o.name,children:(0,je.jsx)(V8,{name:r,variation:o.name})},n))})}function k7e({name:e,parentMenu:t=""}){let r=(0,jle.useSelect)(o=>{if(!e)return[];let{getBlockStyles:n}=o(QA.store);return n(e)},[e]);return r?.length?(0,je.jsx)(E7e,{parentMenu:t,blockStyles:r,blockName:e||""}):null}function n7({value:e,baseValue:t,onChange:r,path:o,onPathChange:n,fontLibraryEnabled:i=!1,serverCSS:a,serverSettings:l}){let c=(0,QA.getBlockTypes)(),u=(0,ip.useMemo)(()=>fn(t,e),[t,e]),[d,f]=gg(u,[],{styleOptions:{variationStyles:!0}}),m=(0,ip.useMemo)(()=>[...a??[],...d??[]],[a,d]),h=(0,ip.useMemo)(()=>({...l,__experimentalFeatures:f,styles:m}),[f,l,m]);return(0,je.jsx)(z1,{value:e,baseValue:t,onChange:r,fontLibraryEnabled:i,children:(0,je.jsx)(zle.BlockEditorProvider,{settings:h,children:(0,je.jsxs)(i0.Navigator,{className:"global-styles-ui-sidebar__navigator-provider",initialPath:o||"/",children:[(o||n)&&(0,je.jsx)(R7e,{path:o,onPathChange:n}),(0,je.jsx)(Vo,{path:"/",children:(0,je.jsx)(Iie,{})}),(0,je.jsx)(Vo,{path:"/colors",children:(0,je.jsx)(Tae,{})}),(0,je.jsx)(Vo,{path:"/typography",children:(0,je.jsx)(uae,{})}),(0,je.jsx)(Vo,{path:"/typography/font-sizes",children:(0,je.jsx)(Rle,{})}),(0,je.jsx)(Vo,{path:"/typography/font-sizes/:origin/:slug",children:(0,je.jsx)(Vle,{})}),(0,je.jsx)(Vo,{path:"/layout",children:(0,je.jsx)(ile,{})}),(0,je.jsx)(Vo,{path:"/colors/palette",children:(0,je.jsx)(Fae,{})}),(0,je.jsx)(Vo,{path:"/variations",children:(0,je.jsx)(fle,{})}),(0,je.jsx)(Vo,{path:"/css",children:(0,je.jsx)(hle,{})}),(0,je.jsx)(Vo,{path:"/revisions/:revisionId?",children:(0,je.jsx)(xle,{})}),(0,je.jsx)(Vo,{path:"/shadows",children:(0,je.jsx)(Jae,{})}),(0,je.jsx)(Vo,{path:"/shadows/edit/:category/:slug",children:(0,je.jsx)($ae,{})}),(0,je.jsx)(Vo,{path:"/background",children:(0,je.jsx)(zae,{})}),(0,je.jsx)(Vo,{path:"/typography/text",children:(0,je.jsx)(Xb,{element:"text"})}),(0,je.jsx)(Vo,{path:"/typography/link",children:(0,je.jsx)(Xb,{element:"link"})}),(0,je.jsx)(Vo,{path:"/typography/heading",children:(0,je.jsx)(Xb,{element:"heading"})}),(0,je.jsx)(Vo,{path:"/typography/caption",children:(0,je.jsx)(Xb,{element:"caption"})}),(0,je.jsx)(Vo,{path:"/typography/button",children:(0,je.jsx)(Xb,{element:"button"})}),(0,je.jsx)(Vo,{path:"/blocks",children:(0,je.jsx)(Vie,{})}),c.map(g=>(0,je.jsxs)(ip.Fragment,{children:[(0,je.jsx)(Vo,{path:"/blocks/"+encodeURIComponent(g.name),children:(0,je.jsx)(V8,{name:g.name})}),(0,je.jsx)(k7e,{name:g.name,parentMenu:"/blocks/"+encodeURIComponent(g.name)})]},g.name))]})})})}function Vo({path:e,children:t}){return(0,je.jsx)(i0.Navigator.Screen,{className:"global-styles-ui-sidebar__navigator-screen",path:e,children:t})}function R7e({path:e,onPathChange:t}){let r=(0,i0.useNavigator)(),{path:o}=r.location,n=(0,o7.usePrevious)(e),i=(0,o7.usePrevious)(o);return(0,ip.useEffect)(()=>{e&&e!==o&&(e!==n?r.goTo(e):o!==i&&t&&t(o??"/"))},[t,e,i,n,o,r]),null}var i7=s(x(),1);function s0(e){return function({value:r,baseValue:o,onChange:n,...i}){return(0,i7.jsx)(z1,{value:r,baseValue:o,onChange:n,children:(0,i7.jsx)(e,{...i})})}}var A7e=s0(YA);var I7e=s0(Jb);var O7e=s0(Ub);var N7e=s(x(),1);var Xle=s(rh(),1);var Hle=s(U(),1),Ule=s(V(),1),Gle=s(ce(),1),Wle=s(we(),1);function Yle({path:e,onPathChange:t}){let{selectedBlockName:r,selectedBlockClientId:o}=(0,Hle.useSelect)(a=>{let{getSelectedBlockClientId:l,getBlockName:c}=a(Gle.store),u=l();return{selectedBlockName:c(u),selectedBlockClientId:u}},[]),n=!0,i=(0,Wle.usePrevious)(o);return(0,Ule.useEffect)(()=>{if(o===i||!o||!n||!e||e!=="/blocks"&&!e.startsWith("/blocks/"))return;let a="/blocks/"+encodeURIComponent(r);a!==e&&t?.(a)},[o,i,r,n,e,t]),null}var Ug=s(V(),1);var a0=s(Q(),1),l0=s(U(),1),qle=s(ce(),1);var{cleanEmptyObject:s7}=Y(qle.privateApis);function M7e(){let{globalStylesId:e,isReady:t,settings:r,styles:o,_links:n}=(0,l0.useSelect)(u=>{let{getEntityRecord:d,getEditedEntityRecord:f,hasFinishedResolution:m,canUser:h}=u(a0.store),g=u(a0.store).__experimentalGetCurrentGlobalStylesId(),v,y=g?h("update",{kind:"root",name:"globalStyles",id:g}):null;g&&typeof y=="boolean"&&(y?v=f("root","globalStyles",g):v=d("root","globalStyles",g,{context:"view"}));let b=!1;return m("__experimentalGetCurrentGlobalStylesId")&&(g?b=y?m("getEditedEntityRecord",["root","globalStyles",g]):m("getEntityRecord",["root","globalStyles",g,{context:"view"}]):b=!0),{globalStylesId:g,isReady:b,settings:v?.settings,styles:v?.styles,_links:v?._links}},[]),{getEditedEntityRecord:i}=(0,l0.useSelect)(a0.store),{editEntityRecord:a}=(0,l0.useDispatch)(a0.store),l=(0,Ug.useMemo)(()=>({settings:r??{},styles:o??{},_links:n??{}}),[r,o,n]),c=(0,Ug.useCallback)((u,d={})=>{let f=i("root","globalStyles",e),m={styles:f?.styles??{},settings:f?.settings??{},_links:f?._links??{}},h=typeof u=="function"?u(m):u;a("root","globalStyles",e,{styles:s7(h.styles)||{},settings:s7(h.settings)||{},_links:s7(h._links)||{}},d)},[e,a,i]);return[t,l,c]}function F7e(){let e=(0,l0.useSelect)(t=>t(a0.store).__experimentalGetCurrentThemeBaseGlobalStyles(),[]);return[!!e,e]}function vn(){let[e,t,r]=M7e(),[o,n]=F7e();return{merged:(0,Ug.useMemo)(()=>!e||!o?{}:fn(n||{},t),[e,o,n,t]),base:n||{},user:t,setUser:r,isReady:e&&o}}function sp(e,t){let{merged:r}=vn();return(0,Ug.useMemo)(()=>Tb(r,e,t),[r,e,t])}function a7(e,t){let{merged:r}=vn();return(0,Ug.useMemo)(()=>pg(r,e,t),[r,e,t])}var Gg=s(x(),1);function D7e(e){let t=e?.styles,r=e?.__unstableResolvedAssets,o=e?.colors,n=e?.gradients,i=e?.__experimentalDiscussionSettings,a=e?.fontLibraryEnabled??!0,l=(0,Zle.useSelect)(d=>{let{canUser:f}=d(Kle.store);return f("create",{kind:"postType",name:"attachment"})?Xle.uploadMedia:void 0},[]),c=(0,l7.useMemo)(()=>t?t.filter(d=>!d.isGlobalStyles):[],[t]),u=(0,l7.useMemo)(()=>({__unstableResolvedAssets:r,settings:{color:{palette:{theme:o??[]},gradients:{theme:n??[]},duotone:{theme:[]}}},__experimentalDiscussionSettings:i,mediaUpload:l}),[r,o,n,i,l]);return{serverCSS:c,serverSettings:u,fontLibraryEnabled:a}}function JA({path:e,onPathChange:t,settings:r}){let{user:o,base:n,setUser:i,isReady:a}=vn(),{serverCSS:l,serverSettings:c,fontLibraryEnabled:u}=D7e(r);return a?(0,Gg.jsxs)(Gg.Fragment,{children:[(0,Gg.jsx)(n7,{value:o,baseValue:n||{},onChange:i,path:e,onPathChange:t,fontLibraryEnabled:u,serverCSS:l,serverSettings:c}),(0,Gg.jsx)(Yle,{path:e,onPathChange:t})]}):null}var ap=s(x(),1);function L7e({template:e,post:t}){let[r="white"]=sp("color.background"),[o]=(0,mx.useEntityBlockEditor)("postType",t.type,{id:t.id}),[n]=(0,mx.useEntityBlockEditor)("postType",e?.type,{id:e?.id}),i=e&&n?n:o,a=!i?.length;return(0,ap.jsxs)("div",{className:"editor-fields-content-preview",style:{backgroundColor:r},children:[a&&(0,ap.jsx)("span",{className:"editor-fields-content-preview__empty",children:(0,Qle.__)("Empty content")}),!a&&(0,ap.jsx)(c7.BlockPreview.Async,{children:(0,ap.jsx)(c7.BlockPreview,{blocks:i})})]})}function $le({item:e}){let{settings:t,template:r}=(0,Jle.useSelect)(o=>{let{canUser:n,getPostType:i,getTemplateId:a,getEntityRecord:l}=Y(o(mx.store)),c=n("read",{kind:"postType",name:"wp_template"}),u=o(T).getEditorSettings(),d=u.supportsTemplateMode,f=i(e.type)?.viewable??!1,m=d&&f&&c?a(e.type,e.id):null;return{settings:u,template:m?l("postType","wp_template",m):void 0}},[e.type,e.id]);return(0,ap.jsx)(E8,{post:e,settings:t,__unstableTemplate:r,children:(0,ap.jsx)(L7e,{template:r,post:e})})}var B7e={type:"media",id:"content-preview",label:(0,ece.__)("Content preview"),render:$le,enableSorting:!1},tce=B7e;function V7e(e){let t=e?.editor;return Array.isArray(t)?!!t[0]?.notes:!1}function j7e(e,t,r){return{type:"REGISTER_ENTITY_ACTION",kind:e,name:t,config:r}}function z7e(e,t,r){return{type:"UNREGISTER_ENTITY_ACTION",kind:e,name:t,actionId:r}}function H7e(e,t,r){return{type:"REGISTER_ENTITY_FIELD",kind:e,name:t,config:r}}function U7e(e,t,r){return{type:"UNREGISTER_ENTITY_FIELD",kind:e,name:t,fieldId:r}}function G7e(e,t){return{type:"SET_IS_READY",kind:e,name:t}}var W7e=[ML,OL,LL,jL,BL,VL,IL,zP,kL,NL,DL],Y7e=e=>async({registry:t})=>{if(Y(t.select(T)).isEntityReady("postType",e))return;Y(t.dispatch(T)).setIsReady("postType",e);let o=await t.resolveSelect($A.store).getPostType(e),n=await t.resolveSelect($A.store).canUser("create",{kind:"postType",name:e}),i=await t.resolveSelect($A.store).getCurrentTheme(),{disablePostFormats:a}=t.select(T).getEditorSettings(),l=!["wp_block","wp_template_part"].includes(o.slug)&&n&&lL;o.slug==="wp_template"&&!window?.__experimentalTemplateActivate&&(l=void 0);let c=[o.viewable?oL:void 0,o.supports?.revisions?vL:void 0,l,o.slug==="wp_template_part"&&n&&i?.is_block_theme?EL:void 0,n&&o.slug==="wp_block"?fL:void 0,o.supports?.title?uL:void 0,o.supports?.["page-attributes"]?iL:void 0,o.slug==="wp_block"?gL:void 0,wL,dL,TL,_L,bL].filter(Boolean),u;if(e===jr)u=W7e;else if(u=[o.supports?.thumbnail&&i?.theme_supports?.["post-thumbnails"]&&ID,o.supports?.author&&p_,HD,!yl.includes(o.slug)&&qD,!yl.includes(o.slug)&&KD,WF,!yl.includes(o.slug)&&o.supports?.excerpt&&JD,o.supports?.["page-attributes"]&&jD,o.supports?.comments&&UD,o.supports?.trackbacks&&WD,(o.supports?.comments||o.supports?.trackbacks)&&YD,DD,o.supports?.["post-formats"]&&!a&&$D,!yl.includes(o.slug)&&o.supports?.editor&&eL,zD,o.slug==="post"&&rL,o.supports?.editor&&o.viewable&&tce,V7e(o.supports)&&ZD].filter(Boolean),o.supports?.title){let d;e==="page"?d=XF:e==="wp_template"?d=MS:e==="wp_block"?d=FS:d=zP,u.push(d)}t.batch(()=>{c.forEach(d=>{Y(t.dispatch(T)).registerEntityAction("postType",e,d)}),u.forEach(d=>{Y(t.dispatch(T)).registerEntityField("postType",e,d)})}),(0,rce.doAction)("core.registerPostTypeSchema",e)};function q7e(e){return{type:"SET_CURRENT_TEMPLATE_ID",id:e}}var K7e=e=>async({select:t,dispatch:r,registry:o})=>{let n=await o.dispatch(yn.store).saveEntityRecord("postType","wp_template",e);return o.dispatch(yn.store).editEntityRecord("postType",t.getCurrentPostType(),t.getCurrentPostId(),{template:n.slug}),o.dispatch(Qi.store).createSuccessNotice((0,Tt.__)("Custom template created. You're in template mode now."),{type:"snackbar",actions:[{label:(0,Tt.__)("Go back"),onClick:()=>r.setRenderingMode(t.getEditorSettings().defaultRenderingMode)}]}),n},Z7e=e=>({registry:t})=>{let o=(t.select(Wg.store).get("core","hiddenBlockTypes")??[]).filter(n=>!(Array.isArray(e)?e:[e]).includes(n));t.dispatch(Wg.store).set("core","hiddenBlockTypes",o)},X7e=e=>({registry:t})=>{let r=t.select(Wg.store).get("core","hiddenBlockTypes")??[],o=new Set([...r,...Array.isArray(e)?e:[e]]);t.dispatch(Wg.store).set("core","hiddenBlockTypes",[...o])},Q7e=({onSave:e,dirtyEntityRecords:t=[],entitiesToSkip:r=[],close:o,successNoticeContent:n}={})=>({registry:i})=>{let a=[{kind:"postType",name:"wp_navigation"}],l="site-editor-save-success",c=i.select(yn.store).getEntityRecord("root","__unstableBase")?.home;i.dispatch(Qi.store).removeNotice(l);let u=t.filter(({kind:m,name:h,key:g,property:v})=>!r.some(y=>y.kind===m&&y.name===h&&y.key===g&&y.property===v));o?.(u);let d=[],f=[];u.forEach(({kind:m,name:h,key:g,property:v})=>{m==="root"&&h==="site"?d.push(v):(a.some(y=>y.kind===m&&y.name===h)&&i.dispatch(yn.store).editEntityRecord(m,h,g,{status:"publish"}),f.push(i.dispatch(yn.store).saveEditedEntityRecord(m,h,g)))}),d.length&&f.push(i.dispatch(yn.store).__experimentalSaveSpecifiedEntityEdits("root","site",void 0,d)),i.dispatch(oce.store).__unstableMarkLastChangeAsPersistent(),Promise.all(f).then(m=>e?e(m):m).then(m=>{m.some(h=>typeof h>"u")?i.dispatch(Qi.store).createErrorNotice((0,Tt.__)("Saving failed.")):i.dispatch(Qi.store).createSuccessNotice(n||(0,Tt.__)("Site updated."),{type:"snackbar",id:l,actions:[{label:(0,Tt.__)("View site"),url:c,openInNewTab:!0}]})}).catch(m=>i.dispatch(Qi.store).createErrorNotice(`${(0,Tt.__)("Saving failed.")} ${m}`))},J7e=(e,{allowUndo:t=!0}={})=>async({registry:r})=>{let o="edit-site-template-reverted";if(r.dispatch(Qi.store).removeNotice(o),!NP(e)){r.dispatch(Qi.store).createErrorNotice((0,Tt.__)("This template is not revertable."),{type:"snackbar"});return}try{let n=r.select(yn.store).getEntityConfig("postType",e.type);if(!n){r.dispatch(Qi.store).createErrorNotice((0,Tt.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let i=(0,nce.addQueryArgs)(`${n.baseURL}/${e.id}`,{context:"edit",source:e.origin}),a=await(0,ice.default)({path:i});if(!a){r.dispatch(Qi.store).createErrorNotice((0,Tt.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let l=({blocks:d=[]})=>(0,eI.__unstableSerializeAndClean)(d),c=r.select(yn.store).getEditedEntityRecord("postType",e.type,e.id);r.dispatch(yn.store).editEntityRecord("postType",e.type,e.id,{content:l,blocks:c.blocks,source:"custom"},{undoIgnore:!0});let u=(0,eI.parse)(a?.content?.raw);if(r.dispatch(yn.store).editEntityRecord("postType",e.type,a.id,{content:l,blocks:u,source:"theme"}),t){let d=()=>{r.dispatch(yn.store).editEntityRecord("postType",e.type,c.id,{content:l,blocks:c.blocks,source:"custom"})};r.dispatch(Qi.store).createSuccessNotice((0,Tt.__)("Template reset."),{type:"snackbar",id:o,actions:[{label:(0,Tt.__)("Undo"),onClick:d}]})}}catch(n){let i=n.message&&n.code!=="unknown_error"?n.message:(0,Tt.__)("Template revert failed. Please reload.");r.dispatch(Qi.store).createErrorNotice(i,{type:"snackbar"})}},$7e=e=>async({registry:t})=>{let r=e.every(n=>n?.has_theme_file),o=await Promise.allSettled(e.map(n=>t.dispatch(yn.store).deleteEntityRecord("postType",n.type,n.id,{force:!0},{throwOnError:!0})));if(o.every(({status:n})=>n==="fulfilled")){let n;if(e.length===1){let i;typeof e[0].title=="string"?i=e[0].title:typeof e[0].title?.rendered=="string"?i=e[0].title?.rendered:typeof e[0].title?.raw=="string"&&(i=e[0].title?.raw),n=r?(0,Tt.sprintf)((0,Tt.__)('"%s" reset.'),(0,u7.decodeEntities)(i)):(0,Tt.sprintf)((0,Tt._x)('"%s" deleted.',"template part"),(0,u7.decodeEntities)(i))}else n=r?(0,Tt.__)("Items reset."):(0,Tt.__)("Items deleted.");t.dispatch(Qi.store).createSuccessNotice(n,{type:"snackbar",id:"editor-template-deleted-success"})}else{let n;if(o.length===1)o[0].reason?.message?n=o[0].reason.message:n=r?(0,Tt.__)("An error occurred while reverting the item."):(0,Tt.__)("An error occurred while deleting the item.");else{let i=new Set,a=o.filter(({status:l})=>l==="rejected");for(let l of a)l.reason?.message&&i.add(l.reason.message);i.size===0?n=(0,Tt.__)("An error occurred while deleting the items."):i.size===1?n=r?(0,Tt.sprintf)((0,Tt.__)("An error occurred while reverting the items: %s"),[...i][0]):(0,Tt.sprintf)((0,Tt.__)("An error occurred while deleting the items: %s"),[...i][0]):n=r?(0,Tt.sprintf)((0,Tt.__)("Some errors occurred while reverting the items: %s"),[...i].join(",")):(0,Tt.sprintf)((0,Tt.__)("Some errors occurred while deleting the items: %s"),[...i].join(","))}t.dispatch(Qi.store).createErrorNotice(n,{type:"snackbar"})}},e9e=e=>({select:t,registry:r})=>{let o=t.getCurrentPostType(),n=r.select(yn.store).getCurrentTheme()?.stylesheet,i=r.select(Wg.store).get("core","renderingModes")?.[n]??{};if(i[o]===e)return;let a={[n]:{...i,[o]:e}};r.dispatch(Wg.store).set("core","renderingModes",a)};function t9e(e){return{type:"SET_STYLES_PATH",path:e}}function r9e(e){return{type:"SET_SHOW_STYLEBOOK",show:e}}function o9e(){return{type:"RESET_STYLES_NAVIGATION"}}function n9e(e){return{type:"SET_CURRENT_REVISION_ID",revisionId:e}}var i9e=e=>async({dispatch:t,select:r,registry:o})=>{let n=r.getCurrentPostType(),i=r.getCurrentPostId(),l=o.select(yn.store).getEntityConfig("postType",n)?.revisionKey||"id",c=await o.resolveSelect(yn.store).getRevisions("postType",n,i,oh(l,e));o.batch(()=>{t({type:"SET_REVISION_PAGE",page:e}),c?.length&&t.setCurrentRevisionId(c[0][l])})};function s9e(e){return{type:"SET_SHOW_REVISION_DIFF",showDiff:e}}var a9e=e=>async({select:t,dispatch:r,registry:o})=>{let n=t.getCurrentPostType(),i=t.getCurrentPostId(),l=o.select(yn.store).getEntityConfig("postType",n)?.revisionKey||"id",c=await o.resolveSelect(yn.store).getRevision("postType",n,i,e,{context:"edit",_fields:[...new Set(["id","date","modified","author","meta","title.raw","excerpt.raw","content.raw",l])].join()});if(!c)return;let u={blocks:void 0,content:c.content.raw};c.title?.raw!==void 0&&(u.title=c.title.raw),c.excerpt?.raw!==void 0&&(u.excerpt=c.excerpt.raw),c.meta!==void 0&&(u.meta=c.meta),r.editPost(u),r.setCurrentRevisionId(null),await r.savePost(),o.dispatch(Qi.store).createSuccessNotice((0,Tt.sprintf)((0,Tt.__)("Restored to revision from %s."),(0,tI.dateI18n)((0,tI.getSettings)().formats.datetime,c.date)),{type:"snackbar",id:"editor-revision-restored"})};function l9e(e,t={focus:!1}){return{type:"SELECT_NOTE",noteId:e,options:t}}var v_={reducer:yz,selectors:FF,actions:BF},T=(0,rI.createReduxStore)(Tz,{...v_});(0,rI.register)(T);Y(T).registerPrivateActions(d7);Y(T).registerPrivateSelectors(GF);var dce=s(x(),1),c9e=e=>(0,cce.createHigherOrderComponent)(t=>({attributes:r,setAttributes:o,...n})=>{let i=(0,sce.useSelect)(u=>u(T).getCurrentPostType(),[]),[a,l]=(0,ace.useEntityProp)("postType",i,"meta"),c=(0,lce.useMemo)(()=>({...r,...Object.fromEntries(Object.entries(e).map(([u,d])=>[u,a[d]]))}),[r,a]);return(0,dce.jsx)(t,{attributes:c,setAttributes:u=>{let d=Object.fromEntries(Object.entries(u??{}).filter(([f])=>f in e).map(([f,m])=>[e[f],m]));Object.entries(d).length&&l(d),o(u)},...n})},"withMetaAttributeSource");function u9e(e){let t=Object.fromEntries(Object.entries(e.attributes??{}).filter(([,{source:r}])=>r==="meta").map(([r,{meta:o}])=>[r,o]));return Object.entries(t).length&&(e.edit=c9e(t)(e.edit)),e}(0,uce.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",u9e);var bge=s(tn(),1);var fce=s(If(),1),mce=s(vo(),1);var pce=s(St(),1),Yg=s(x(),1),d9e=10,oI={name:"links",className:"editor-autocompleters__link",triggerPrefix:"[[",isDebounced:!0,async options(e){return(await(0,fce.default)({path:(0,mce.addQueryArgs)("/wp/v2/search",{per_page:d9e,search:e,type:"post"})})).filter(r=>r.title!=="")},getOptionKeywords(e){return[...e.title.split(/\s+/)]},getOptionLabel(e){return(0,Yg.jsxs)(Yg.Fragment,{children:[(0,Yg.jsx)(Uo,{icon:e.subtype==="page"?kf:qM}),(0,pce.decodeEntities)(e.title)]})},getOptionCompletion(e){return(0,Yg.jsx)("a",{href:e.url,children:e.title})}};var hce=s(V(),1),gce=s(U(),1),vce=s(Q(),1),zd=s(x(),1);function f9e(e){let t=e.avatar_urls&&e.avatar_urls[24]?(0,zd.jsx)("img",{className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):(0,zd.jsx)("span",{className:"editor-autocompleters__no-avatar"});return(0,zd.jsxs)(zd.Fragment,{children:[t,(0,zd.jsx)("span",{className:"editor-autocompleters__user-name",children:e.name}),(0,zd.jsx)("span",{className:"editor-autocompleters__user-slug",children:e.slug})]})}var nI={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",useItems(e){let t=(0,gce.useSelect)(o=>{let{getUsers:n}=o(vce.store);return n({context:"view",search:encodeURIComponent(e)})},[e]);return[(0,hce.useMemo)(()=>t?t.map(o=>({key:`user-${o.slug}`,value:o,label:f9e(o)})):[],[t])]},getOptionCompletion(e){return`@${e.slug}`}};var yce=s(V(),1),bce=s(we(),1),iI=s(U(),1),wce=s(Q(),1);var m9e=class extends yce.Component{constructor(e){super(e),this.needsAutosave=!!(e.isDirty&&e.isAutosaveable)}componentDidMount(){this.props.disableIntervalChecks||this.setAutosaveTimer()}componentDidUpdate(e){if(this.props.disableIntervalChecks){this.props.editsReference!==e.editsReference&&this.props.autosave();return}if(this.props.interval!==e.interval&&(clearTimeout(this.timerId),this.setAutosaveTimer()),!this.props.isDirty){this.needsAutosave=!1;return}if(this.props.isAutosaving&&!e.isAutosaving){this.needsAutosave=!1;return}this.props.editsReference!==e.editsReference&&(this.needsAutosave=!0)}componentWillUnmount(){clearTimeout(this.timerId)}setAutosaveTimer(e=this.props.interval*1e3){this.timerId=setTimeout(()=>{this.autosaveTimerHandler()},e)}autosaveTimerHandler(){if(!this.props.isAutosaveable){this.setAutosaveTimer(1e3);return}this.needsAutosave&&(this.needsAutosave=!1,this.props.autosave()),this.setAutosaveTimer()}render(){return null}},sI=(0,bce.compose)([(0,iI.withSelect)((e,t)=>{let{getReferenceByDistinctEdits:r}=e(wce.store),{isEditedPostDirty:o,isEditedPostAutosaveable:n,isAutosavingPost:i,getEditorSettings:a}=e(T),{interval:l=a().autosaveInterval}=t;return{editsReference:r(),isDirty:o(),isAutosaveable:n(),isAutosaving:i(),interval:l}}),(0,iI.withDispatch)((e,t)=>({autosave(){let{autosave:r=e(T).autosave}=t;r()}}))])(m9e);var mp=s(N(),1),gx=s(U(),1),Gl=s(H(),1),vx=s(ce(),1);var rue=s(Wr(),1),oue=s(Q(),1),nue=s(p8(),1),_I=s(V(),1),iue=s(we(),1),sue=s(St(),1),aue=s(qg(),1);var f7=s(N(),1),_ce=s(U(),1),xce=s(Q(),1);function aI(e){let{isFrontPage:t,isPostsPage:r}=(0,_ce.useSelect)(o=>{let{canUser:n,getEditedEntityRecord:i}=o(xce.store),a=n("read",{kind:"root",name:"site"})?i("root","site"):void 0,l=parseInt(e,10);return{isFrontPage:a?.page_on_front===l,isPostsPage:a?.page_for_posts===l}});return t?(0,f7.__)("Homepage"):r?(0,f7.__)("Posts Page"):!1}var Zce=s(H(),1),Xce=s(Wr(),1),wI=s(N(),1),hx=s(U(),1);var SI=s(we(),1),Qce=s(vt(),1);var zce=s(V(),1);var Hd=s(H(),1),Hl=s(N(),1),Jo=s(ce(),1),Zg=s(U(),1);var yr=s(V(),1),hI=s(Wr(),1),Nce=s(rh(),1),Mce=s(Q(),1);var vr=s(N(),1),c0=[{slug:"theme-colors",title:(0,vr.__)("Theme Colors"),origin:"theme",type:"colors"},{slug:"theme-gradients",title:(0,vr.__)("Theme Gradients"),origin:"theme",type:"gradients"},{slug:"custom-colors",title:(0,vr.__)("Custom Colors"),origin:"custom",type:"colors"},{slug:"custom-gradients",title:(0,vr.__)("Custom Gradients"),origin:"custom",type:"gradients"},{slug:"duotones",title:(0,vr.__)("Duotones"),origin:"theme",type:"duotones"},{slug:"default-colors",title:(0,vr.__)("Default Colors"),origin:"default",type:"colors"},{slug:"default-gradients",title:(0,vr.__)("Default Gradients"),origin:"default",type:"gradients"}],lI=[{slug:"site-identity",title:(0,vr.__)("Site Identity"),blocks:["core/site-logo","core/site-title","core/site-tagline"]},{slug:"design",title:(0,vr.__)("Design"),blocks:["core/navigation","core/avatar","core/post-time-to-read"],exclude:["core/home-link","core/navigation-link"]},{slug:"posts",title:(0,vr.__)("Posts"),blocks:["core/post-title","core/post-excerpt","core/post-author","core/post-author-name","core/post-author-biography","core/post-date","core/post-terms","core/term-description","core/query-title","core/query-no-results","core/query-pagination","core/query-numbers"]},{slug:"comments",title:(0,vr.__)("Comments"),blocks:["core/comments-title","core/comments-pagination","core/comments-pagination-numbers","core/comments","core/comments-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link","core/comment-template","core/post-comments-count","core/post-comments-link"]}],m7=[{slug:"overview",title:(0,vr.__)("Overview"),blocks:[]},{slug:"text",title:(0,vr.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,vr.__)("Colors"),blocks:[]},{slug:"theme",title:(0,vr.__)("Theme"),subcategories:lI},{slug:"media",title:(0,vr.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,vr.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,vr.__)("Embeds"),include:[]}],p9e=[...lI,{slug:"media",title:(0,vr.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,vr.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,vr.__)("Embeds"),include:[]}],Cce=[{slug:"overview",title:(0,vr.__)("Overview"),blocks:[]},{slug:"text",title:(0,vr.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,vr.__)("Colors"),blocks:[]},{slug:"blocks",title:(0,vr.__)("All Blocks"),blocks:[],subcategories:p9e}],h9e=`
54 .is-root-container {
55 display: flow-root;
56 }
57 `,Tce=`
58 body {
59 position: relative;
60 padding: 32px !important;
61 }
62
63 ${h9e}
64
65 .editor-style-book__examples {
66 max-width: 1200px;
67 margin: 0 auto;
68 }
69
70 .editor-style-book__example {
71 max-width: 900px;
72 border-radius: 2px;
73 cursor: var(--wpds-cursor-control, pointer);
74 display: flex;
75 flex-direction: column;
76 gap: 40px;
77 padding: 16px;
78 width: 100%;
79 box-sizing: border-box;
80 scroll-margin-top: 32px;
81 scroll-margin-bottom: 32px;
82 margin: 0 auto 40px auto;
83 }
84
85 .editor-style-book__example.is-selected {
86 box-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
87 }
88
89 .editor-style-book__example.is-disabled-example {
90 pointer-events: none;
91 }
92
93 .editor-style-book__example:focus:not(:disabled) {
94 box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
95 outline: 3px solid transparent;
96 }
97
98 .editor-style-book__duotone-example > div:first-child {
99 display: flex;
100 aspect-ratio: 16 / 9;
101 grid-row: span 1;
102 grid-column: span 2;
103 }
104 .editor-style-book__duotone-example img {
105 width: 100%;
106 height: 100%;
107 object-fit: cover;
108 }
109 .editor-style-book__duotone-example > div:not(:first-child) {
110 height: 20px;
111 border: 1px solid color-mix( in srgb, currentColor 10%, transparent );
112 }
113
114 .editor-style-book__color-example {
115 border: 1px solid color-mix( in srgb, currentColor 10%, transparent );
116 }
117
118 .editor-style-book__subcategory-title,
119 .editor-style-book__example-title {
120 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
121 font-size: 13px;
122 font-weight: normal;
123 line-height: normal;
124 margin: 0;
125 text-align: left;
126 padding-top: 8px;
127 border-top: 1px solid color-mix( in srgb, currentColor 10%, transparent );
128 color: color-mix( in srgb, currentColor 60%, transparent );
129 }
130
131 .editor-style-book__subcategory-title {
132 font-size: 16px;
133 margin-bottom: 40px;
134 padding-bottom: 8px;
135 }
136
137 .editor-style-book__example-preview {
138 width: 100%;
139 }
140
141 .editor-style-book__example-preview .block-editor-block-list__insertion-point,
142 .editor-style-book__example-preview .block-list-appender {
143 display: none;
144 }
145 :where(.is-root-container > .wp-block:first-child) {
146 margin-top: 0;
147 }
148 :where(.is-root-container > .wp-block:last-child) {
149 margin-bottom: 0;
150 }
151 `;var Pce=s(lt(),1);function px(e,t){if(!e?.slug||!t?.length)return;let r=e?.subcategories??[];if(r.length)return r.reduce((a,l)=>{let c=px(l,t);return c&&(a.subcategories||(a.subcategories=[]),a.subcategories=[...a.subcategories,c]),a},{title:e.title,slug:e.slug});let o=e?.blocks||[],n=e?.exclude||[],i=t.filter(a=>!n.includes(a.name)&&(a.category===e.slug||o.includes(a.name)));if(i.length)return{title:e.title,slug:e.slug,examples:i}}function p7(){let e=[...lI,...m7].map(({slug:o})=>o),r=(0,Pce.getCategories)().filter(({slug:o})=>!e.includes(o));return[...m7,...r]}var lu=s(N(),1),Gn=s(lt(),1);var Ece=s(H(),1),cI=s(ce(),1),h7=s(x(),1),g9e=({colors:e,type:t,templateColumns:r="1fr 1fr",itemHeight:o="52px"})=>e?(0,h7.jsx)(Ece.__experimentalGrid,{templateColumns:r,rowGap:8,columnGap:16,children:e.map(n=>{let i=t==="gradients"?(0,cI.__experimentalGetGradientClass)(n.slug):(0,cI.getColorClassName)("background-color",n.slug),a=K("editor-style-book__color-example",i);return(0,h7.jsx)("div",{className:a,style:{height:o}},n.slug)})}):null,g7=g9e;var v7=s(H(),1),Kg=s(x(),1),v9e=({duotones:e})=>e?(0,Kg.jsx)(v7.__experimentalGrid,{columns:2,rowGap:16,columnGap:16,children:e.map(t=>(0,Kg.jsxs)(v7.__experimentalGrid,{className:"editor-style-book__duotone-example",columns:2,rowGap:8,columnGap:8,children:[(0,Kg.jsx)("div",{children:(0,Kg.jsx)("img",{alt:`Duotone example: ${t.slug}`,src:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",style:{filter:`url(#wp-duotone-${t.slug})`}})}),t.colors.map(r=>(0,Kg.jsx)("div",{className:"editor-style-book__color-example",style:{backgroundColor:r}},r))]},t.slug))}):null,kce=v9e;var uI=s(x(),1);function y9e(e){if(!e)return[];let t=[];return c0.forEach(r=>{let o=e[r.type],n=Array.isArray(o)?o.find(i=>i.slug===r.origin):void 0;if(n?.[r.type]){let i={name:r.slug,title:r.title,category:"colors"};r.type==="duotones"?(i.content=(0,uI.jsx)(kce,{duotones:n[r.type]}),t.push(i)):(i.content=(0,uI.jsx)(g7,{colors:n[r.type],type:r.type}),t.push(i))}}),t}function b9e(e){let t=[],r=Array.isArray(e?.colors)?e.colors.find(i=>i.slug==="theme"):void 0;if(r){let i={name:"theme-colors",title:(0,lu.__)("Colors"),category:"overview",content:(0,uI.jsx)(g7,{colors:r.colors,type:"colors",templateColumns:"repeat(auto-fill, minmax( 200px, 1fr ))",itemHeight:"32px"})};t.push(i)}let o=[];if((0,Gn.getBlockType)("core/heading")){let i=(0,Gn.createBlock)("core/heading",{content:(0,lu.__)("AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789X{(\u2026)},.-<>?!*&:/A@HELFO\u2122\xA9"),level:1});o.push(i)}if((0,Gn.getBlockType)("core/paragraph")){let i=(0,Gn.createBlock)("core/paragraph",{content:(0,lu.__)("A paragraph in a website refers to a distinct block of text that is used to present and organize information. It is a fundamental unit of content in web design and is typically composed of a group of related sentences or thoughts focused on a particular topic or idea. Paragraphs play a crucial role in improving the readability and user experience of a website. They break down the text into smaller, manageable chunks, allowing readers to scan the content more easily.")}),a=(0,Gn.createBlock)("core/paragraph",{content:(0,lu.__)("Additionally, paragraphs help structure the flow of information and provide logical breaks between different concepts or pieces of information. In terms of formatting, paragraphs in websites are commonly denoted by a vertical gap or indentation between each block of text. This visual separation helps visually distinguish one paragraph from another, creating a clear and organized layout that guides the reader through the content smoothly.")});if((0,Gn.getBlockType)("core/group")){let l=(0,Gn.createBlock)("core/group",{layout:{type:"grid",columnCount:2,minimumColumnWidth:"12rem"},style:{spacing:{blockGap:"1.5rem"}}},[i,a]);o.push(l)}else o.push(i)}return o.length&&t.push({name:"typography",title:(0,lu.__)("Typography"),category:"overview",blocks:o}),["core/image","core/separator","core/buttons","core/pullquote","core/search"].forEach(i=>{let a=(0,Gn.getBlockType)(i);if(a&&a.example){let l={name:i,title:a.title,category:"overview",blocks:(0,Gn.getBlockFromExample)(i,{...a.example,attributes:{...a.example.attributes,style:void 0}})};t.push(l)}}),t}function y7(e){let t=(0,Gn.getBlockTypes)().filter(a=>{let{name:l,example:c,supports:u}=a;return l!=="core/heading"&&!!c&&u?.inserter!==!1}).map(a=>({name:a.name,title:a.title,category:a.category,blocks:(0,Gn.getBlockFromExample)(a.name,{...a.example,attributes:{...a.example?.attributes,style:void 0}})}));if(!!!(0,Gn.getBlockType)("core/heading"))return t;let o={name:"core/heading",title:(0,lu.__)("Headings"),category:"text",blocks:[1,2,3,4,5,6].map(a=>(0,Gn.createBlock)("core/heading",{content:(0,lu.sprintf)((0,lu.__)("Heading %d"),a),level:a}))},n=y9e(e),i=b9e(e);return[o,...n,...t,...i]}var Oce=s(V(),1),fI=s(U(),1);var dI=s(lt(),1),Rce=s(U(),1),Ace=s(V(),1);function u0(e={},t=!1){let o=a7("spacing.blockGap")!==null,n=!o,{disableLayoutStyles:i,getBlockStyles:a}=(0,Rce.useSelect)(l=>{let{getEditorSettings:c}=l(T),{getBlockStyles:u}=l(dI.store);return{disableLayoutStyles:!!c()?.disableLayoutStyles,getBlockStyles:u}},[]);return(0,Ace.useMemo)(()=>{if(!e?.styles||!e?.settings)return[[],{}];let l=(0,dI.getBlockTypes)();return gg(e,l,{hasBlockGapSupport:o,hasFallbackGapSupport:n,disableLayoutStyles:i,disableRootPadding:t,getBlockStyles:a})},[o,n,e,i,t,a])}function Ice(e=!1){let{merged:t}=vn();return u0(t,e)}function w9e(e){let[t,r]=Ice(e),{getEditorSettings:o}=(0,fI.useSelect)(T),{updateEditorSettings:n}=(0,fI.useDispatch)(T);(0,Oce.useEffect)(()=>{if(!t||!r)return;let i=o(),a=Object.values(i.styles??[]).filter(l=>!l.isGlobalStyles);n({...i,styles:[...a,...t],__experimentalFeatures:r})},[t,r,n,o])}function mI({disableRootPadding:e}){return w9e(e),null}var xt=s(x(),1),{ExperimentalBlockEditorProvider:S9e}=Y(Jo.privateApis),{Tabs:pI}=Y(Hd.privateApis);function lp(e){return!e||Object.keys(e).length===0}var _9e=(e,t)=>{if(!e||!t||!t?.contentDocument)return;let r=e==="top"?t.contentDocument.body:t.contentDocument.getElementById(e);r&&r.scrollIntoView({behavior:"smooth"})},Fce=e=>e&&typeof e=="string"&&(e==="/"||e.startsWith("/typography")||e.startsWith("/colors")||e.startsWith("/blocks"))?{top:!0}:null;function Dce(){let{colors:e,gradients:t}=(0,Jo.__experimentalUseMultipleOriginColorsAndGradients)(),[r,o,n,i]=(0,Jo.useSettings)("color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default");return(0,yr.useMemo)(()=>{let l={colors:e,gradients:t,duotones:[]};return n&&n.length&&l.duotones.push({name:(0,Hl._x)("Theme","Indicates these duotone filters come from the theme."),slug:"theme",duotones:n}),r&&i&&i.length&&l.duotones.push({name:(0,Hl._x)("Default","Indicates these duotone filters come from WordPress."),slug:"default",duotones:i}),o&&o.length&&l.duotones.push({name:(0,Hl._x)("Custom","Indicates these doutone filters are created by the user."),slug:"custom",duotones:o}),l},[e,t,o,n,i,r])}function Lce(e){let t=[],r=px({slug:"overview"},e);t.push(...r.examples);let o=e.filter(n=>n.category!=="overview"&&!r.examples.find(i=>i.name===n.name));return t.push(...o),t}function x9e(e,t){return t?e.map(r=>({...r,variation:t,blocks:Array.isArray(r.blocks)?r.blocks.map(o=>({...o,attributes:{...o.attributes,style:void 0,className:`is-style-${t}`}})):{...r.blocks,attributes:{...r.blocks.attributes,style:void 0,className:`is-style-${t}`}}})):e}function C9e({isSelected:e,onClick:t,onSelect:r,showTabs:o=!0,userConfig:n={},path:i=""},a){let l=sp("color.text"),c=sp("color.background"),u=Dce(),d=(0,yr.useMemo)(()=>y7(u),[u]),f=(0,yr.useMemo)(()=>p7().filter(w=>d.some(_=>_.category===w.slug)),[d]),m=Lce(d),{base:h}=vn(),g=Fce(i),v=(0,yr.useMemo)(()=>!lp(n)&&!lp(h)?fn(h,n):{},[h,n]),y=(0,Zg.useSelect)(w=>w(Jo.store).getSettings(),[]),[b]=u0(v),S=(0,yr.useMemo)(()=>({...y,styles:!lp(b)&&!lp(n)?b:y.styles,isPreviewMode:!0}),[b,y,n]);return(0,xt.jsx)("div",{ref:a,className:K("editor-style-book",{"is-button":!!t}),style:{color:l,background:c},children:o?(0,xt.jsxs)(pI,{children:[(0,xt.jsx)("div",{className:"editor-style-book__tablist-container",children:(0,xt.jsx)(pI.TabList,{children:f.map(w=>(0,xt.jsx)(pI.Tab,{tabId:w.slug,children:w.title},w.slug))})}),f.map(w=>{let _=w.slug?p7().find(k=>k.slug===w.slug):null,C=_?px(_,d):{examples:d};return(0,xt.jsx)(pI.TabPanel,{tabId:w.slug,focusable:!1,className:"editor-style-book__tabpanel",children:(0,xt.jsx)(b7,{category:w.slug,examples:C,isSelected:e,onSelect:r,settings:S,title:w.title,goTo:g})},w.slug)})]}):(0,xt.jsx)(b7,{examples:{examples:m},isSelected:e,onClick:t,onSelect:r,settings:S,goTo:g})})}var Bce=({userConfig:e={},isStatic:t=!1,path:r,onPathChange:o,settings:n})=>{let i=(0,Zg.useSelect)(B=>n??B(T).getEditorSettings(),[n]),a=(0,Zg.useSelect)(B=>B(Mce.store).canUser("create",{kind:"postType",name:"attachment"}),[]);(0,yr.useEffect)(()=>{(0,Zg.dispatch)(Jo.store).updateSettings({...i,mediaUpload:a?Nce.uploadMedia:void 0})},[i,a]);let[l,c]=(0,yr.useState)("/"),u=r??l,d=o??c,f=B=>u===`/blocks/${encodeURIComponent(B)}`||u.startsWith(`/blocks/${encodeURIComponent(B)}/`),m=(B,E=!1)=>{if(c0.find(P=>P.slug===B)){d("/colors/palette");return}if(B==="typography"){d("/typography");return}E||d(`/blocks/${encodeURIComponent(B)}`)},h=Dce(),g=y7(h),v=Lce(g),y=null,b=null;if(u.includes("/colors"))y="colors";else if(u.includes("/typography"))y="text";else if(u.includes("/blocks")){y="blocks";let B=decodeURIComponent(u).split("/blocks/")[1];B?.includes("/variations")&&([B,b]=B.split("/variations/")),B&&g.find(E=>E.name===B)&&(y=B)}else t||(y="overview");let S=Cce.find(B=>B.slug===y),w=(0,yr.useMemo)(()=>S?px(S,g):{examples:[g.find(B=>B.name===y)]},[S,g,y]),_=(0,yr.useMemo)(()=>y?b?{examples:x9e(w.examples,b)}:w:{examples:v},[y,v,b,w]),{base:C}=vn(),k=Fce(u),A=(0,yr.useMemo)(()=>!lp(e)&&!lp(C)?fn(C,e):{},[C,e]),[R]=u0(A),I=(0,yr.useMemo)(()=>({...i,styles:!lp(R)&&!lp(e)?R:i.styles,isPreviewMode:!0}),[R,i,e]);return(0,xt.jsx)("div",{className:"editor-style-book",children:(0,xt.jsxs)(Jo.BlockEditorProvider,{settings:I,children:[(0,xt.jsx)(mI,{disableRootPadding:!0}),(0,xt.jsx)(b7,{examples:_,settings:I,goTo:k,isSelected:t?null:f,onSelect:t?null:m})]})})},b7=({examples:e,isSelected:t,onClick:r,onSelect:o,settings:n,title:i,goTo:a})=>{let[l,c]=(0,yr.useState)(!1),[u,d]=(0,yr.useState)(!1),f=(0,yr.useRef)(null),m={role:"button",onFocus:()=>c(!0),onBlur:()=>c(!1),onKeyDown:g=>{if(g.defaultPrevented)return;let{keyCode:v}=g;r&&(v===hI.ENTER||v===hI.SPACE)&&(g.preventDefault(),r(g))},onClick:g=>{g.defaultPrevented||r&&(g.preventDefault(),r(g))},readonly:!0},h=()=>d(!0);return(0,yr.useLayoutEffect)(()=>{u&&f.current&&a?.top&&_9e("top",f.current)},[a?.top,u]),(0,xt.jsxs)(Jo.__unstableIframe,{onLoad:h,ref:f,className:K("editor-style-book__iframe",{"is-focused":l&&!!r,"is-button":!!r}),name:"style-book-canvas",tabIndex:0,...r?m:{},children:[(0,xt.jsx)(Jo.__unstableEditorStyles,{styles:n.styles}),(0,xt.jsxs)("style",{children:[Tce,!!r&&"body { cursor: var(--wpds-cursor-control, pointer); } body * { pointer-events: none; }"]}),(0,xt.jsx)(T9e,{className:"editor-style-book__examples",filteredExamples:e,label:i?(0,Hl.sprintf)((0,Hl.__)("Examples of blocks in the %s category"),i):(0,Hl.__)("Examples of blocks"),isSelected:t,onSelect:o},i)]})},T9e=(0,yr.memo)(({className:e,filteredExamples:t,label:r,isSelected:o,onSelect:n})=>(0,xt.jsxs)(Hd.Composite,{orientation:"vertical",className:e,"aria-label":r,role:"grid",children:[!!t?.examples?.length&&t.examples.map(i=>(0,xt.jsx)(Vce,{id:`example-${i.name}`,title:i.title,content:i.content,blocks:i.blocks,isSelected:o?.(i.name),onClick:n?()=>n(i.name,!!i.variation):null},i.name)),!!t?.subcategories?.length&&t.subcategories.map(i=>(0,xt.jsxs)(Hd.Composite.Group,{className:"editor-style-book__subcategory",children:[(0,xt.jsx)(Hd.Composite.GroupLabel,{children:(0,xt.jsx)("h2",{className:"editor-style-book__subcategory-title",children:i.title})}),(0,xt.jsx)(P9e,{examples:i.examples,isSelected:o,onSelect:n})]},`subcategory-${i.slug}`))]})),P9e=({examples:e,isSelected:t,onSelect:r})=>!!e?.length&&e.map(o=>(0,xt.jsx)(Vce,{id:`example-${o.name}`,title:o.title,content:o.content,blocks:o.blocks,isSelected:t?.(o.name),onClick:r?()=>r(o.name):null},o.name)),E9e=["example-duotones"],Vce=({id:e,title:t,blocks:r,isSelected:o,onClick:n,content:i})=>{let a=(0,Zg.useSelect)(d=>d(Jo.store).getSettings(),[]),l=(0,yr.useMemo)(()=>({...a,focusMode:!1,isPreviewMode:!0}),[a]),c=(0,yr.useMemo)(()=>Array.isArray(r)?r:[r],[r]),u=E9e.includes(e)||!n?{disabled:!0,accessibleWhenDisabled:!!n}:{};return(0,xt.jsx)("div",{role:"row",children:(0,xt.jsx)("div",{role:"gridcell",children:(0,xt.jsxs)(Hd.Composite.Item,{className:K("editor-style-book__example",{"is-selected":o,"is-disabled-example":!!u?.disabled}),id:e,"aria-label":n?(0,Hl.sprintf)((0,Hl.__)("Open %s styles in Styles panel"),t):void 0,render:(0,xt.jsx)("div",{}),role:n?"button":null,onClick:n,...u,children:[(0,xt.jsx)("span",{className:"editor-style-book__example-title",children:t}),(0,xt.jsx)("div",{className:"editor-style-book__example-preview","aria-hidden":!0,children:(0,xt.jsx)(Hd.Disabled,{className:"editor-style-book__example-preview__content",children:i||(0,xt.jsxs)(S9e,{value:c,settings:l,children:[(0,xt.jsx)(Jo.__unstableEditorStyles,{}),(0,xt.jsx)(Jo.BlockList,{renderAppender:!1})]})})})]})})})},jce=(0,yr.forwardRef)(C9e);var Hce=s(x(),1);function k9e({path:e,onPathChange:t},r){return(0,Hce.jsx)(jce,{ref:r,isSelected:o=>e===`/blocks/${encodeURIComponent(o)}`||e?.startsWith(`/blocks/${encodeURIComponent(o)}/`),onSelect:o=>{if(c0.find(n=>n.slug===o)){t?.("/colors/palette");return}if(o==="typography"){t?.("/typography");return}t?.("/blocks/"+encodeURIComponent(o))}})}var Uce=(0,zce.forwardRef)(k9e);var Gce=s(H(),1),Ul=s(ce(),1),w7=s(U(),1),cp=s(V(),1);var Ud=s(x(),1),{ExperimentalBlockEditorProvider:R9e,BlockStyleVariationOverridesWithConfig:A9e}=Y(Ul.privateApis);function gI(e){return!e||Object.keys(e).length===0}function I9e({path:e},t){let r=(0,w7.useSelect)(y=>y(Ul.store).getBlocks(),[]),{user:o,base:n}=vn(),{revisions:i,isLoading:a}=cx(),l=(0,cp.useMemo)(()=>{let y=e?.match(/^\/revisions\/(.+)$/);return y?y[1]:null},[e]),u=(0,cp.useMemo)(()=>!l||!i.length?null:i.find(y=>String(y.id)===String(l)),[l,i])||o,d=(0,cp.useMemo)(()=>!gI(u)&&!gI(n)?fn(n,u):{},[n,u]),f=(0,cp.useMemo)(()=>Array.isArray(r)?r:[r],[r]),m=(0,w7.useSelect)(y=>y(Ul.store).getSettings(),[]),h=(0,cp.useMemo)(()=>({...m,isPreviewMode:!0}),[m]),[g]=u0(d),v=!gI(g)&&!gI(u)?g:h.styles;return a?null:(0,Ud.jsxs)(Ul.__unstableIframe,{ref:t,className:"editor-revisions__iframe",name:"revisions",tabIndex:0,children:[(0,Ud.jsx)("style",{children:".is-root-container { display: flow-root; }"}),(0,Ud.jsx)(Gce.Disabled,{className:"editor-revisions__example-preview__content",children:(0,Ud.jsxs)(R9e,{value:f,settings:h,children:[(0,Ud.jsx)(Ul.BlockList,{renderAppender:!1}),(0,Ud.jsx)(Ul.__unstableEditorStyles,{styles:v}),(0,Ud.jsx)(A9e,{config:d})]})})]})}var Wce=(0,cp.forwardRef)(I9e);var d0=s(V(),1),Kce=s(H(),1);var vI=s(N(),1),up=s(Wr(),1),yI=s(H(),1);var dp=s(x(),1),Yce=20;function S7({direction:e,resizeWidthBy:t}){function r(i){let{keyCode:a}=i;a!==up.LEFT&&a!==up.RIGHT||(i.preventDefault(),e==="left"&&a===up.LEFT||e==="right"&&a===up.RIGHT?t(Yce):(e==="left"&&a===up.RIGHT||e==="right"&&a===up.LEFT)&&t(-Yce))}let o={active:{opacity:1,scaleY:1.3}},n=`resizable-editor__resize-help-${e}`;return(0,dp.jsxs)(dp.Fragment,{children:[(0,dp.jsx)(yI.Tooltip,{text:(0,vI.__)("Drag to resize"),children:(0,dp.jsx)(yI.__unstableMotion.button,{className:`editor-resizable-editor__resize-handle is-${e}`,"aria-label":(0,vI.__)("Drag to resize"),"aria-describedby":n,onKeyDown:r,variants:o,whileFocus:"active",whileHover:"active",whileTap:"active",role:"separator","aria-orientation":"vertical"},"handle")}),(0,dp.jsx)(Kt,{id:n,children:(0,vI.__)("Use left and right arrow keys to resize the canvas.")})]})}var bI=s(x(),1),qce={position:void 0,userSelect:void 0,cursor:void 0,width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0};function O9e({className:e,enableResizing:t,height:r,children:o}){let[n,i]=(0,d0.useState)("100%"),a=(0,d0.useRef)(),l=(0,d0.useCallback)(c=>{a.current&&i(a.current.offsetWidth+c)},[]);return(0,bI.jsx)(Kce.ResizableBox,{className:K("editor-resizable-editor",e,{"is-resizable":t}),ref:c=>{a.current=c?.resizable},size:{width:t?n:"100%",height:t&&r?r:"100%"},onResizeStop:(c,u,d)=>{i(d.style.width)},minWidth:300,maxWidth:"100%",maxHeight:"100%",enable:{left:t,right:t},showHandle:t,resizeRatio:2,handleComponent:{left:(0,bI.jsx)(S7,{direction:"left",resizeWidthBy:l}),right:(0,bI.jsx)(S7,{direction:"right",resizeWidthBy:l})},handleClasses:void 0,handleStyles:{left:qce,right:qce},children:o})}var f0=O9e;var fp=s(x(),1);function _7(e,t){return t?(0,wI.__)("Style Book"):e?.startsWith("/revisions")?(0,wI.__)("Style Revisions"):""}function Jce(){let{stylesPath:e,showStylebook:t,showListViewByDefault:r}=(0,hx.useSelect)(m=>{let{getStylesPath:h,getShowStylebook:g}=Y(m(T)),v=m(Qce.store).get("core","showListViewByDefault");return{stylesPath:h(),showStylebook:g(),showListViewByDefault:v}},[]),{resetStylesNavigation:o,setStylesPath:n}=Y((0,hx.useDispatch)(T)),{setIsListViewOpened:i}=(0,hx.useDispatch)(T),a=(0,SI.useFocusOnMount)("firstElement"),l=(0,SI.useFocusReturn)(),c=null;t?c=(0,fp.jsx)(Uce,{path:e,onPathChange:n,ref:l}):e?.startsWith("/revisions")&&(c=(0,fp.jsx)(Wce,{path:e,ref:l}));let u=_7(e,t),d=()=>{i(r),o()};return(0,fp.jsx)("div",{className:"editor-styles-canvas",children:(0,fp.jsx)(f0,{enableResizing:!1,children:(0,fp.jsxs)("section",{className:"editor-styles-canvas__section",ref:a,onKeyDown:m=>{m.keyCode===Xce.ESCAPE&&!m.defaultPrevented&&(m.preventDefault(),d())},"aria-label":u,children:[(0,fp.jsx)(Zce.Button,{size:"compact",className:"editor-styles-canvas__close-button",icon:rn,label:(0,wI.__)("Close"),onClick:d}),c]})})})}var $ce=s(U(),1),x7=s(St(),1),C7=s(ce(),1),eue=s(Q(),1);function tue(){return(0,$ce.useSelect)(e=>{let{getBlockAttributes:t,getBlockName:r,__experimentalGetParsedPattern:o}=e(C7.store),{getEditedEntityRecord:n,getCurrentTheme:i}=e(eue.store),{getEditedContentOnlySection:a}=Y(e(C7.store)),l=a();if(!l)return null;let c=t(l),u=c?.metadata?.patternName;if(u){let f=typeof o=="function"?o(u):null;return{patternName:u,patternTitle:f?.title||c?.metadata?.name,type:"pattern"}}let d=r(l);if(d==="core/block"&&c?.ref){let f=n("postType","wp_block",c.ref);if(f?.title)return{patternName:c.ref,patternTitle:(0,x7.decodeEntities)(f.title),type:"synced-pattern"}}if(d==="core/template-part"&&c?.slug){let f=c.theme||i()?.stylesheet,m=f?`${f}//${c.slug}`:null;if(m){let h=n("postType","wp_template_part",m);if(h?.title)return{patternName:c.slug,patternTitle:(0,x7.decodeEntities)(h.title),type:"template-part"}}}return null},[])}var Si=s(x(),1),N9e=Gl.__unstableMotion.create(Gl.Button);function xI(e){let{stopEditingContentOnlySection:t}=Y((0,gx.useDispatch)(vx.store)),r=tue(),{postId:o,postType:n,postTypeLabel:i,documentTitle:a,isNotFound:l,templateTitle:c,onNavigateToPreviousEntityRecord:u,isTemplatePreview:d,stylesCanvasTitle:f}=(0,gx.useSelect)(k=>{let{getCurrentPostType:A,getCurrentPostId:R,getEditorSettings:I,getRenderingMode:B}=k(T),{getEditedEntityRecord:E,getPostType:P,getCurrentTheme:L,isResolving:j}=k(oue.store),z=A(),W=R(),O=E("postType",z,W),{default_template_types:M=[]}=L()??{},D=_a({templateTypes:M,template:O}),G=P(z)?.labels?.singular_name,{getStylesPath:q,getShowStylebook:Z}=Y(k(T)),te=q(),ie=Z(),Se=_7(te,ie);return{postId:W,postType:z,postTypeLabel:G,documentTitle:O.title,isNotFound:!O&&!j("getEditedEntityRecord","postType",z,W),templateTitle:D.title,onNavigateToPreviousEntityRecord:I().onNavigateToPreviousEntityRecord,isTemplatePreview:B()==="template-locked",stylesCanvasTitle:Se}},[]),{open:m}=(0,gx.useDispatch)(nue.store),h=(0,iue.useReducedMotion)(),g=f6.includes(n),v=!!u||!!r,y=g?c:a,b=r?.patternTitle||e.title||f||y,S=e.icon,w=k=>{k.stopPropagation(),r?t():u&&u()},_=aI(o),C=(0,_I.useRef)(!1);return(0,_I.useEffect)(()=>{C.current=!0},[]),(0,Si.jsxs)("div",{className:K("editor-document-bar",{"has-back-button":v}),children:[(0,Si.jsx)(Gl.__unstableAnimatePresence,{children:v&&(0,Si.jsx)(N9e,{className:"editor-document-bar__back",icon:(0,mp.isRTL)()?j6:L6,onClick:w,size:"compact",initial:C.current?{opacity:0,transform:"translateX(15%)"}:!1,animate:{opacity:1,transform:"translateX(0%)"},exit:{opacity:0,transform:"translateX(15%)"},transition:h?{duration:0}:void 0,children:(0,mp.__)("Back")})}),!g&&d&&!v&&(0,Si.jsx)(vx.BlockIcon,{icon:bl,className:"editor-document-bar__icon-layout"}),l?(0,Si.jsx)(Gl.__experimentalText,{children:(0,mp.__)("Document not found")}):(0,Si.jsxs)(Gl.Button,{className:"editor-document-bar__command",onClick:()=>m(),size:"compact",children:[(0,Si.jsxs)(Gl.__unstableMotion.div,{className:"editor-document-bar__title",initial:C.current?{opacity:0,transform:v?"translateX(15%)":"translateX(-15%)"}:!1,animate:{opacity:1,transform:"translateX(0%)"},transition:h?{duration:0}:void 0,children:[S&&(0,Si.jsx)(vx.BlockIcon,{icon:S}),(0,Si.jsxs)(Gl.__experimentalText,{size:"body",as:"h1",children:[(0,Si.jsx)("span",{className:"editor-document-bar__post-title",children:b?(0,aue.__unstableStripHTML)(b):(0,mp.__)("No title")}),r&&(0,Si.jsx)("span",{className:"editor-document-bar__post-type-label",children:r.type==="template-part"?`\xB7 ${(0,mp.__)("Template Part")}`:`\xB7 ${(0,mp.__)("Pattern")}`}),!r&&_&&(0,Si.jsx)("span",{className:"editor-document-bar__post-type-label",children:`\xB7 ${_}`}),!r&&i&&!e.title&&!_&&(0,Si.jsx)("span",{className:"editor-document-bar__post-type-label",children:`\xB7 ${(0,sue.decodeEntities)(i)}`})]})]},v),(0,Si.jsx)("span",{className:"editor-document-bar__shortcut",children:rue.displayShortcut.primary("k")})]})]})}var Qg=s(N(),1),m0=s(U(),1),TI=s(V(),1),PI=s(A1(),1),CI=s(ce(),1),lue=s(Q(),1),bn=s(H(),1);var Xg=s(x(),1),M9e=({children:e,isValid:t,isDisabled:r,level:o,href:n,onSelect:i})=>{function a(l){if(r){l.preventDefault();return}i()}return(0,Xg.jsx)("li",{className:K("document-outline__item",`is-${o.toLowerCase()}`,{"is-invalid":!t,"is-disabled":r}),children:(0,Xg.jsxs)("a",{href:n,className:"document-outline__button","aria-disabled":r,onClick:a,children:[(0,Xg.jsx)("span",{className:"document-outline__emdash","aria-hidden":"true"}),(0,Xg.jsx)("strong",{className:"document-outline__level",children:o}),(0,Xg.jsx)("span",{className:"document-outline__item-content",children:e})]})})},T7=M9e;var zt=s(x(),1),F9e=(0,zt.jsx)("em",{children:(0,Qg.__)("(Empty heading)")}),D9e=[(0,zt.jsx)("br",{},"incorrect-break"),(0,zt.jsx)("em",{children:(0,Qg.__)("(Incorrect heading level)")},"incorrect-message")],L9e=[(0,zt.jsx)("br",{},"incorrect-break-h1"),(0,zt.jsx)("em",{children:(0,Qg.__)("(Your theme may already use a H1 for the post title)")},"incorrect-message-h1")],B9e=[(0,zt.jsx)("br",{},"incorrect-break-multiple-h1"),(0,zt.jsx)("em",{children:(0,Qg.__)("(Multiple H1 headings are not recommended)")},"incorrect-message-multiple-h1")];function V9e(){return(0,zt.jsxs)(bn.SVG,{width:"138",height:"148",viewBox:"0 0 138 148",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,zt.jsx)(bn.Rect,{width:"138",height:"148",rx:"4",fill:"#F0F6FC"}),(0,zt.jsx)(bn.Line,{x1:"44",y1:"28",x2:"24",y2:"28",stroke:"#DDDDDD"}),(0,zt.jsx)(bn.Rect,{x:"48",y:"16",width:"27",height:"23",rx:"4",fill:"#DDDDDD"}),(0,zt.jsx)(bn.Path,{d:"M54.7585 32V23.2727H56.6037V26.8736H60.3494V23.2727H62.1903V32H60.3494V28.3949H56.6037V32H54.7585ZM67.4574 23.2727V32H65.6122V25.0241H65.5611L63.5625 26.277V24.6406L65.723 23.2727H67.4574Z",fill:"black"}),(0,zt.jsx)(bn.Line,{x1:"55",y1:"59",x2:"24",y2:"59",stroke:"#DDDDDD"}),(0,zt.jsx)(bn.Rect,{x:"59",y:"47",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,zt.jsx)(bn.Path,{d:"M65.7585 63V54.2727H67.6037V57.8736H71.3494V54.2727H73.1903V63H71.3494V59.3949H67.6037V63H65.7585ZM74.6605 63V61.6705L77.767 58.794C78.0313 58.5384 78.2528 58.3082 78.4318 58.1037C78.6136 57.8991 78.7514 57.6989 78.8452 57.5028C78.9389 57.304 78.9858 57.0895 78.9858 56.8594C78.9858 56.6037 78.9276 56.3835 78.8111 56.1989C78.6946 56.0114 78.5355 55.8679 78.3338 55.7685C78.1321 55.6662 77.9034 55.6151 77.6477 55.6151C77.3807 55.6151 77.1477 55.669 76.9489 55.777C76.75 55.8849 76.5966 56.0398 76.4886 56.2415C76.3807 56.4432 76.3267 56.6832 76.3267 56.9616H74.5753C74.5753 56.3906 74.7045 55.8949 74.9631 55.4744C75.2216 55.054 75.5838 54.7287 76.0497 54.4986C76.5156 54.2685 77.0526 54.1534 77.6605 54.1534C78.2855 54.1534 78.8295 54.2642 79.2926 54.4858C79.7585 54.7045 80.1207 55.0085 80.3793 55.3977C80.6378 55.7869 80.767 56.233 80.767 56.7358C80.767 57.0653 80.7017 57.3906 80.571 57.7116C80.4432 58.0327 80.2145 58.3892 79.8849 58.7812C79.5554 59.1705 79.0909 59.6378 78.4915 60.1832L77.2173 61.4318V61.4915H80.8821V63H74.6605Z",fill:"black"}),(0,zt.jsx)(bn.Line,{x1:"80",y1:"90",x2:"24",y2:"90",stroke:"#DDDDDD"}),(0,zt.jsx)(bn.Rect,{x:"84",y:"78",width:"30",height:"23",rx:"4",fill:"#F0B849"}),(0,zt.jsx)(bn.Path,{d:"M90.7585 94V85.2727H92.6037V88.8736H96.3494V85.2727H98.1903V94H96.3494V90.3949H92.6037V94H90.7585ZM99.5284 92.4659V91.0128L103.172 85.2727H104.425V87.2841H103.683L101.386 90.919V90.9872H106.564V92.4659H99.5284ZM103.717 94V92.0227L103.751 91.3793V85.2727H105.482V94H103.717Z",fill:"black"}),(0,zt.jsx)(bn.Line,{x1:"66",y1:"121",x2:"24",y2:"121",stroke:"#DDDDDD"}),(0,zt.jsx)(bn.Rect,{x:"70",y:"109",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,zt.jsx)(bn.Path,{d:"M76.7585 125V116.273H78.6037V119.874H82.3494V116.273H84.1903V125H82.3494V121.395H78.6037V125H76.7585ZM88.8864 125.119C88.25 125.119 87.6832 125.01 87.1861 124.791C86.6918 124.57 86.3011 124.266 86.0142 123.879C85.7301 123.49 85.5838 123.041 85.5753 122.533H87.4332C87.4446 122.746 87.5142 122.933 87.642 123.095C87.7727 123.254 87.946 123.378 88.1619 123.466C88.3778 123.554 88.6207 123.598 88.8906 123.598C89.1719 123.598 89.4205 123.548 89.6364 123.449C89.8523 123.349 90.0213 123.212 90.1435 123.036C90.2656 122.859 90.3267 122.656 90.3267 122.426C90.3267 122.193 90.2614 121.987 90.1307 121.808C90.0028 121.626 89.8182 121.484 89.5767 121.382C89.3381 121.28 89.054 121.229 88.7244 121.229H87.9105V119.874H88.7244C89.0028 119.874 89.2486 119.825 89.4616 119.729C89.6776 119.632 89.8452 119.499 89.9645 119.328C90.0838 119.155 90.1435 118.953 90.1435 118.723C90.1435 118.504 90.0909 118.312 89.9858 118.148C89.8835 117.98 89.7386 117.849 89.5511 117.756C89.3665 117.662 89.1506 117.615 88.9034 117.615C88.6534 117.615 88.4247 117.661 88.2173 117.751C88.0099 117.839 87.8438 117.966 87.7188 118.131C87.5938 118.295 87.527 118.489 87.5185 118.71H85.75C85.7585 118.207 85.902 117.764 86.1804 117.381C86.4588 116.997 86.8338 116.697 87.3054 116.482C87.7798 116.263 88.3153 116.153 88.9119 116.153C89.5142 116.153 90.0412 116.263 90.4929 116.482C90.9446 116.7 91.2955 116.996 91.5455 117.368C91.7983 117.737 91.9233 118.152 91.9205 118.612C91.9233 119.101 91.7713 119.509 91.4645 119.835C91.1605 120.162 90.7642 120.369 90.2756 120.457V120.526C90.9176 120.608 91.4063 120.831 91.7415 121.195C92.0795 121.555 92.2472 122.007 92.2443 122.55C92.2472 123.047 92.1037 123.489 91.8139 123.875C91.527 124.261 91.1307 124.565 90.625 124.787C90.1193 125.009 89.5398 125.119 88.8864 125.119Z",fill:"black"})]})}var j9e=(e=[])=>e.filter(t=>t.name==="core/heading").map(t=>({...t,level:t.attributes.level,isEmpty:z9e(t)})),z9e=e=>!e.attributes.content||e.attributes.content.trim().length===0;function p0({onSelect:e,hasOutlineItemsDisabled:t}){let{selectBlock:r}=(0,m0.useDispatch)(CI.store),{title:o,isTitleSupported:n}=(0,m0.useSelect)(g=>{let{getEditedPostAttribute:v}=g(T),{getPostType:y}=g(lue.store),b=y(v("type"));return{title:v("title"),isTitleSupported:b?.supports?.title??!1}}),i=(0,m0.useSelect)(g=>{let{getClientIdsWithDescendants:v,getBlock:y}=g(CI.store);return v().map(S=>y(S))}),a=(0,m0.useSelect)(g=>{if(g(T).getRenderingMode()==="post-only")return;let{getBlocksByName:v,getClientIdsOfDescendants:y}=g(CI.store),[b]=v("core/post-content");if(b)return y(b)},[]),l=(0,TI.useRef)(1),c=(0,TI.useMemo)(()=>j9e(i),[i]);if(c.length<1)return(0,zt.jsxs)("div",{className:"editor-document-outline has-no-headings",children:[(0,zt.jsx)(V9e,{}),(0,zt.jsx)("p",{children:(0,Qg.__)("Navigate the structure of your document and address issues like empty or incorrect heading levels.")})]});let u=document.querySelector(".editor-post-title__input"),d=n&&o&&u,m=c.reduce((g,v)=>({...g,[v.level]:(g[v.level]||0)+1}),{})[1]>1;function h(g){return Array.isArray(a)?a.includes(g):!0}return(0,zt.jsx)("div",{className:"document-outline",children:(0,zt.jsxs)("ul",{children:[d&&(0,zt.jsx)(T7,{level:(0,Qg.__)("Title"),isValid:!0,onSelect:e,href:`#${u.id}`,isDisabled:t,children:o}),c.map(g=>{let v=g.level>l.current+1,y=!g.isEmpty&&!v&&!!g.level&&(g.level!==1||!m&&!d);return l.current=g.level,(0,zt.jsxs)(T7,{level:`H${g.level}`,isValid:y,isDisabled:t||!h(g.clientId),href:`#block-${g.clientId}`,onSelect:()=>{r(g.clientId),e?.()},children:[g.isEmpty?F9e:(0,PI.getTextContent)((0,PI.create)({html:g.attributes.content})),v&&D9e,g.level===1&&m&&B9e,d&&g.level===1&&!m&&L9e]},g.clientId)})]})})}var cue=s(U(),1),uue=s(ce(),1);function due({children:e}){return(0,cue.useSelect)(r=>{let{getGlobalBlockCount:o}=r(uue.store);return o("core/heading")>0})?e:null}var fue=s(V(),1),mue=s(U(),1),rl=s(N(),1),pue=s(ce(),1),hue=s(oa(),1),gue=s(Wr(),1),vue=s(x(),1);function H9e(){let{registerShortcut:e}=(0,mue.useDispatch)(hue.store);return(0,fue.useEffect)(()=>{e({name:"core/editor/toggle-mode",category:"global",description:(0,rl.__)("Switch between visual editor and code editor."),keyCombination:{modifier:"secondary",character:"m"}}),e({name:"core/editor/save",category:"global",description:(0,rl.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:(0,rl.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:(0,rl.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"},aliases:(0,gue.isAppleOS)()?[]:[{modifier:"primary",character:"y"}]}),e({name:"core/editor/toggle-list-view",category:"global",description:(0,rl.__)("Show or hide the List View."),keyCombination:{modifier:"access",character:"o"}}),e({name:"core/editor/toggle-distraction-free",category:"global",description:(0,rl.__)("Enter or exit distraction free mode."),keyCombination:{modifier:"primaryShift",character:"\\"}}),e({name:"core/editor/toggle-sidebar",category:"global",description:(0,rl.__)("Show or hide the Settings panel."),keyCombination:{modifier:"primaryShift",character:","}}),e({name:"core/editor/keyboard-shortcuts",category:"main",description:(0,rl.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),e({name:"core/editor/new-note",category:"block",description:(0,rl.__)("Add a new note."),keyCombination:{modifier:"primaryAlt",character:"m"}}),e({name:"core/editor/next-region",category:"global",description:(0,rl.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),e({name:"core/editor/previous-region",category:"global",description:(0,rl.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"},{modifier:"ctrlShift",character:"~"}]})},[e]),(0,vue.jsx)(pue.BlockEditorKeyboardShortcuts.Register,{})}var yue=H9e;var EI=s(N(),1),bue=s(H(),1),kI=s(U(),1),yx=s(Wr(),1);var wue=s(V(),1);var Sue=s(x(),1);function U9e(e,t){let r=(0,yx.isAppleOS)()?yx.displayShortcut.primaryShift("z"):yx.displayShortcut.primary("y"),o=(0,kI.useSelect)(i=>i(T).hasEditorRedo(),[]),{redo:n}=(0,kI.useDispatch)(T);return(0,Sue.jsx)(bue.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,EI.isRTL)()?eh:Xp,label:(0,EI.__)("Redo"),shortcut:r,"aria-disabled":!o,onClick:o?n:void 0,className:"editor-history__redo"})}var RI=(0,wue.forwardRef)(U9e);var AI=s(N(),1),_ue=s(H(),1),II=s(U(),1),xue=s(Wr(),1);var Cue=s(V(),1);var Tue=s(x(),1);function G9e(e,t){let r=(0,II.useSelect)(n=>n(T).hasEditorUndo(),[]),{undo:o}=(0,II.useDispatch)(T);return(0,Tue.jsx)(_ue.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,AI.isRTL)()?Xp:eh,label:(0,AI.__)("Undo"),shortcut:xue.displayShortcut.primary("z"),"aria-disabled":!r,onClick:r?o:void 0,className:"editor-history__undo"})}var OI=(0,Cue.forwardRef)(G9e);var Eue=s(ya(),1),kue=s(wt(),1);var NI=s(H(),1),h0=s(N(),1),MI=s(U(),1),Pue=s(V(),1),P7=s(ce(),1),Jg=s(x(),1);function FI(){let[e,t]=(0,Pue.useState)(!1),r=(0,MI.useSelect)(i=>i(P7.store).isValidTemplate(),[]),{setTemplateValidity:o,synchronizeTemplate:n}=(0,MI.useDispatch)(P7.store);return r?null:(0,Jg.jsxs)(Jg.Fragment,{children:[(0,Jg.jsx)(NI.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:(0,h0.__)("Keep it as is"),onClick:()=>o(!0)},{label:(0,h0.__)("Reset the template"),onClick:()=>t(!0)}],children:(0,h0.__)("The content of your post doesn\u2019t match the template assigned to your post type.")}),(0,Jg.jsx)(NI.__experimentalConfirmDialog,{isOpen:e,confirmButtonText:(0,h0.__)("Reset"),onConfirm:()=>{t(!1),n()},onCancel:()=>t(!1),size:"medium",children:(0,h0.__)("Resetting the template may result in loss of content, do you want to continue?")})]})}var E7=s(x(),1);function W9e(){return(0,Eue.default)("wp.editor.EditorNotices",{since:"7.0",version:"7.2",alternative:"wp.notices.InlineNotices"}),(0,E7.jsx)(kue.InlineNotices,{pinnedNoticesClassName:"components-editor-notices__pinned",dismissibleNoticesClassName:"components-editor-notices__dismissible",children:(0,E7.jsx)(FI,{})})}var Rue=W9e;var Aue=s(ya(),1),Iue=s(wt(),1),Oue=s(x(),1);function Nue(){return(0,Aue.default)("wp.editor.EditorSnackbars",{since:"7.0",version:"7.2",alternative:"wp.notices.SnackbarNotices"}),(0,Oue.jsx)(Iue.SnackbarNotices,{className:"components-editor-notices__snackbar"})}var qd=s(H(),1),Yd=s(N(),1),g0=s(V(),1),bx=s(we(),1),jue=s(U(),1);var $g=s(N(),1),A7=s(U(),1),LI=s(H(),1),I7=s(Q(),1);var DI=s(H(),1),k7=s(N(),1),Mue=s(U(),1),R7=s(Q(),1),Fue=s(St(),1);var Gd=s(x(),1);function Due({record:e,checked:t,onChange:r}){let{name:o,kind:n,title:i,key:a}=e,{entityRecordTitle:l,hasPostMetaChanges:c}=(0,Mue.useSelect)(u=>{if(n!=="postType"||o!=="wp_template")return{entityRecordTitle:i,hasPostMetaChanges:Y(u(T)).hasPostMetaChanges(o,a)};let d=u(R7.store).getEditedEntityRecord(n,o,a),{default_template_types:f=[]}=u(R7.store).getCurrentTheme()??{};return{entityRecordTitle:_a({template:d,templateTypes:f}).title,hasPostMetaChanges:Y(u(T)).hasPostMetaChanges(o,a)}},[o,n,i,a]);return(0,Gd.jsxs)(Gd.Fragment,{children:[(0,Gd.jsx)(DI.PanelRow,{children:(0,Gd.jsx)(DI.CheckboxControl,{label:(0,Fue.decodeEntities)(l)||(0,k7.__)("Untitled"),checked:t,onChange:r,className:"entities-saved-states__change-control"})}),c&&(0,Gd.jsx)("ul",{className:"entities-saved-states__changes",children:(0,Gd.jsx)("li",{children:(0,k7.__)("Post Meta.")})})]})}var Wd=s(x(),1);function Y9e(e,t){switch(e){case"site":return t===1?(0,$g.__)("This change will affect your whole site."):(0,$g.__)("These changes will affect your whole site.");case"wp_template":return(0,$g.__)("This change will affect other parts of your site that use this template.");case"page":case"post":return(0,$g.__)("The following has been modified.")}}function q9e({record:e}){let{editedRecord:t,savedRecord:r}=(0,A7.useSelect)(n=>{let{getEditedEntityRecord:i,getEntityRecord:a}=n(I7.store);return{editedRecord:i(e.kind,e.name,e.key),savedRecord:a(e.kind,e.name,e.key)}},[e.kind,e.name,e.key]),o=C1(t,r,{maxResults:10});return o.length?(0,Wd.jsx)("ul",{className:"entities-saved-states__changes",children:o.map(n=>(0,Wd.jsx)("li",{children:n},n))}):null}function K9e({record:e,count:t}){if(e?.name==="globalStyles")return null;let r=Y9e(e?.name,t);return r?(0,Wd.jsx)(LI.PanelRow,{children:r}):null}function Lue({list:e,unselectedEntities:t,setUnselectedEntities:r}){let o=e.length,n=e[0],a=(0,A7.useSelect)(l=>l(I7.store).getEntityConfig(n.kind,n.name),[n.kind,n.name]).label;return n?.name==="wp_template_part"&&(a=o===1?(0,$g.__)("Template Part"):(0,$g.__)("Template Parts")),(0,Wd.jsxs)(LI.PanelBody,{title:a,initialOpen:!0,className:"entities-saved-states__panel-body",children:[(0,Wd.jsx)(K9e,{record:n,count:o}),e.map(l=>(0,Wd.jsx)(Due,{record:l,checked:!t.some(c=>c.kind===l.kind&&c.name===l.name&&c.key===l.key&&c.property===l.property),onChange:c=>r(l,c)},l.key||l.property)),n?.name==="globalStyles"&&(0,Wd.jsx)(q9e,{record:n})]})}var Bue=s(U(),1),Vue=s(Q(),1),BI=s(V(),1),VI=()=>{let{editedEntities:e,siteEdits:t,siteEntityConfig:r}=(0,Bue.useSelect)(c=>{let{__experimentalGetDirtyEntityRecords:u,getEntityRecordEdits:d,getEntityConfig:f}=c(Vue.store);return{editedEntities:u(),siteEdits:d("root","site"),siteEntityConfig:f("root","site")}},[]),o=(0,BI.useMemo)(()=>{let c=e.filter(v=>!(v.kind==="root"&&v.name==="site")),u=r?.meta?.labels??{},{site_logo:d,site_icon:f,...m}=t??{},g=[d!==void 0&&"site_logo",f!==void 0&&"site_icon",...Object.keys(m)].filter(Boolean).map(v=>({kind:"root",name:"site",title:u[v]||v,property:v}));return[...c,...g]},[e,t,r]),[n,i]=(0,BI.useState)([]),a=({kind:c,name:u,key:d,property:f},m)=>{i(m?n.filter(h=>h.kind!==c||h.name!==u||h.key!==d||h.property!==f):[...n,{kind:c,name:u,key:d,property:f}])},l=o.length-n.length>0;return{dirtyEntityRecords:o,isDirty:l,setUnselectedEntities:a,unselectedEntities:n}};var wn=s(x(),1);function Z9e(e){return e}function jI({close:e,renderDialog:t,variant:r}){let o=VI();return(0,wn.jsx)(wx,{close:e,renderDialog:t,variant:r,...o})}function wx({additionalPrompt:e=void 0,close:t,onSave:r=Z9e,saveEnabled:o=void 0,saveLabel:n=(0,Yd.__)("Save"),renderDialog:i,dirtyEntityRecords:a,isDirty:l,setUnselectedEntities:c,unselectedEntities:u,variant:d="default",successNoticeContent:f}){let m=(0,g0.useRef)(),{saveDirtyEntities:h}=Y((0,jue.useDispatch)(T)),g=a.reduce((L,j)=>{let{name:z}=j;return L[z]||(L[z]=[]),L[z].push(j),L},{}),{site:v,wp_template:y,wp_template_part:b,...S}=g,w=[v,y,b,...Object.values(S)].filter(Array.isArray),_=o??l,C=(0,g0.useCallback)(()=>t(),[t]),[k,A]=(0,bx.__experimentalUseDialog)({onClose:()=>C()}),R=(0,bx.useInstanceId)(wx,"entities-saved-states__panel-label"),I=(0,bx.useInstanceId)(wx,"entities-saved-states__panel-description"),B=a.length?(0,Yd.__)("Select the items you want to save."):void 0,E=d==="inline",P=(0,wn.jsxs)(wn.Fragment,{children:[(0,wn.jsx)(qd.FlexItem,{isBlock:!E,as:qd.Button,variant:E?"tertiary":"secondary",size:E?void 0:"compact",onClick:C,children:(0,Yd.__)("Cancel")}),(0,wn.jsx)(qd.FlexItem,{isBlock:!E,as:qd.Button,ref:m,variant:"primary",size:E?void 0:"compact",disabled:!_,accessibleWhenDisabled:!0,onClick:()=>h({onSave:r,dirtyEntityRecords:a,entitiesToSkip:u,close:t,successNoticeContent:f}),className:"editor-entities-saved-states__save-button",children:n})]});return(0,wn.jsxs)("div",{ref:i?k:void 0,...i&&A,className:K("entities-saved-states__panel",{"is-inline":E}),role:i?"dialog":void 0,"aria-labelledby":i?R:void 0,"aria-describedby":i?I:void 0,children:[!E&&(0,wn.jsx)(qd.Flex,{className:"entities-saved-states__panel-header",gap:2,children:P}),(0,wn.jsxs)("div",{className:"entities-saved-states__text-prompt",children:[(0,wn.jsx)("div",{className:"entities-saved-states__text-prompt--header-wrapper",children:(0,wn.jsx)("strong",{id:i?R:void 0,className:"entities-saved-states__text-prompt--header",children:(0,Yd.__)("Are you ready to save?")})}),(0,wn.jsxs)("div",{id:i?I:void 0,children:[e,(0,wn.jsx)("p",{className:"entities-saved-states__text-prompt--changes-count",children:l?(0,g0.createInterpolateElement)((0,Yd.sprintf)((0,Yd._n)("There is <strong>%d site change</strong> waiting to be saved.","There are <strong>%d site changes</strong> waiting to be saved.",a.length),a.length),{strong:(0,wn.jsx)("strong",{})}):B})]})]}),w.map(L=>(0,wn.jsx)(Lue,{list:L,unselectedEntities:u,setUnselectedEntities:c},L[0].name)),E&&(0,wn.jsx)(qd.Flex,{direction:"row",justify:"flex-end",className:"entities-saved-states__panel-footer",children:P})]})}var Hue=s(V(),1),zI=s(N(),1),ev=s(H(),1),Uue=s(U(),1),Gue=s(we(),1),Wue=s(tn(),1);var pp=s(x(),1);function X9e(){try{return(0,Uue.select)(T).getEditedPostContent()}catch{}}function zue({text:e,children:t,variant:r="secondary"}){let o=(0,Gue.useCopyToClipboard)(e);return(0,pp.jsx)(ev.Button,{__next40pxDefaultSize:!0,variant:r,ref:o,children:t})}var Q9e=class extends Hue.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,Wue.doAction)("editor.ErrorBoundary.errorLogged",e)}static getDerivedStateFromError(e){return{error:e}}render(){let{error:e}=this.state,{canCopyContent:t=!1}=this.props;return e?(0,pp.jsxs)(ev.__experimentalHStack,{className:"editor-error-boundary",alignment:"baseline",spacing:4,justify:"space-between",expanded:!1,wrap:!0,children:[(0,pp.jsx)(ev.__experimentalText,{as:"p",children:(0,zI.__)("The editor has encountered an unexpected error.")}),(0,pp.jsxs)(ev.__experimentalHStack,{expanded:!1,children:[t&&(0,pp.jsx)(zue,{text:X9e,children:(0,zI.__)("Copy contents")}),(0,pp.jsx)(zue,{variant:"primary",text:e?.stack,children:(0,zI.__)("Copy error")})]})]}):this.props.children}},Yue=Q9e;var Kd=s(V(),1),_x=s(we(),1),Zd=s(U(),1),O7=s(N(),1),que=s(lt(),1),Kue=s(wt(),1);var Zue=s(x(),1),J9e=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame,Sx,$9e=()=>{if(Sx!==void 0)return Sx;try{window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),Sx=!0}catch{Sx=!1}return Sx};function eje(){let{postId:e,isEditedPostNew:t,hasRemoteAutosave:r}=(0,Zd.useSelect)(c=>({postId:c(T).getCurrentPostId(),isEditedPostNew:c(T).isEditedPostNew(),hasRemoteAutosave:!!c(T).getEditorSettings().autosave}),[]),{getEditedPostAttribute:o}=(0,Zd.useSelect)(T),{createWarningNotice:n,removeNotice:i}=(0,Zd.useDispatch)(Kue.store),{editPost:a,resetEditorBlocks:l}=(0,Zd.useDispatch)(T);(0,Kd.useEffect)(()=>{let c=Kz(e,t);if(!c)return;try{c=JSON.parse(c)}catch{return}let{post_title:u,content:d,excerpt:f}=c,m={title:u,content:d,excerpt:f};if(!Object.keys(m).some(v=>m[v]!==o(v))){OP(e,t);return}if(r)return;let h="wpEditorAutosaveRestore";n((0,O7.__)("The backup of this post in your browser is different from the version below."),{id:h,actions:[{label:(0,O7.__)("Restore the backup"),onClick(){let{content:g,...v}=m;a(v),l((0,que.parse)(m.content)),i(h)}}]})},[t,e])}function tje(){let{postId:e,isEditedPostNew:t,isDirty:r,isAutosaving:o,didError:n}=(0,Zd.useSelect)(u=>({postId:u(T).getCurrentPostId(),isEditedPostNew:u(T).isEditedPostNew(),isDirty:u(T).isEditedPostDirty(),isAutosaving:u(T).isAutosavingPost(),didError:u(T).didPostSaveRequestFail()}),[]),i=(0,Kd.useRef)(r),a=(0,Kd.useRef)(o);(0,Kd.useEffect)(()=>{!n&&(a.current&&!o||i.current&&!r)&&OP(e,t),i.current=r,a.current=o},[r,o,n]);let l=(0,_x.usePrevious)(t),c=(0,_x.usePrevious)(e);(0,Kd.useEffect)(()=>{c===e&&l&&!t&&OP(e,!0)},[t,e])}function rje(){let{autosave:e}=(0,Zd.useDispatch)(T),t=(0,Kd.useCallback)(()=>{J9e(()=>e({local:!0}))},[]);eje(),tje();let r=(0,Zd.useSelect)(o=>o(T).getEditorSettings().localAutosaveInterval,[]);return(0,Zue.jsx)(sI,{interval:r,autosave:t})}var Xue=(0,_x.ifCondition)($9e)(rje);var Que=s(U(),1),Jue=s(Q(),1);function oje({children:e}){return(0,Que.useSelect)(r=>{let{getEditedPostAttribute:o}=r(T),{getPostType:n}=r(Jue.store);return!!n(o("type"))?.supports?.["page-attributes"]},[])?e:null}var v0=oje;var N7=s(N(),1),b0=s(H(),1),HI=s(U(),1),tde=s(V(),1);var $ue=s(U(),1),ede=s(Q(),1);function nje(e={},t){if(e[t]!==void 0)return!!e[t];let[r,o]=t.split("."),[n]=Array.isArray(e[r])?e[r]:[];return Array.isArray(n)?n.includes(o):!!n?.[o]}function ije({children:e,supportKeys:t}){let r=(0,$ue.useSelect)(n=>{let{getEditedPostAttribute:i}=n(T),{getPostType:a}=n(ede.store);return a(i("type"))},[]),o=!!r;return r&&(o=(Array.isArray(t)?t:[t]).some(n=>nje(r.supports,n))),o?e:null}var Mr=ije;var y0=s(x(),1);function sje(){let e=(0,HI.useSelect)(a=>a(T).getEditedPostAttribute("menu_order")??0,[]),{editPost:t}=(0,HI.useDispatch)(T),[r,o]=(0,tde.useState)(null),n=a=>{o(a);let l=Number(a);Number.isInteger(l)&&a.trim?.()!==""&&t({menu_order:l})},i=r??e;return(0,y0.jsx)(b0.Flex,{children:(0,y0.jsx)(b0.FlexBlock,{children:(0,y0.jsx)(b0.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,N7.__)("Order"),help:(0,N7.__)("Set the page order."),value:i,onChange:n,hideLabelFromVision:!0,onBlur:()=>{o(null)}})})})}function rde(){return(0,y0.jsx)(Mr,{supportKeys:"page-attributes",children:(0,y0.jsx)(sje,{})})}var pde=s(U(),1),hde=s(Q(),1);var F7=s(c_(),1),Cs=s(N(),1),hp=s(H(),1),lde=s(we(),1),cu=s(V(),1),S0=s(U(),1),L7=s(St(),1),GI=s(Q(),1),cde=s(ce(),1),ude=s(vo(),1);var ode=s(H(),1),nde=s(V(),1),xx=s(x(),1),aje=(0,nde.forwardRef)(({className:e,label:t,children:r},o)=>(0,xx.jsxs)(ode.__experimentalHStack,{className:K("editor-post-panel__row",e),ref:o,children:[t&&(0,xx.jsx)("div",{className:"editor-post-panel__row-label",children:t}),(0,xx.jsx)("div",{className:"editor-post-panel__row-control",children:r})]})),Nt=aje;var ide=s(St(),1);function UI(e){let t=e.map(n=>({children:[],parent:void 0,...n}));if(t.some(({parent:n})=>n===void 0))return t;let r=t.reduce((n,i)=>{let{parent:a}=i;return n[a]||(n[a]=[]),n[a].push(i),n},{}),o=n=>n.map(i=>{let a=r[i.id];return{...i,children:a&&a.length?o(a):[]}});return o(r[0]||[])}var w0=e=>(0,ide.decodeEntities)(e),M7=e=>({...e,name:w0(e.name)}),sde=e=>(e??[]).map(M7);var xs=s(x(),1);function D7(e){return e?.title?.rendered?(0,L7.decodeEntities)(e.title.rendered):`#${e.id} (${(0,Cs.__)("no title")})`}var ade=(e,t)=>{let r=(0,F7.default)(e||"").toLowerCase(),o=(0,F7.default)(t||"").toLowerCase();return r===o?0:r.startsWith(o)?r.length:1/0};function dde(){let{editPost:e}=(0,S0.useDispatch)(T),[t,r]=(0,cu.useState)(""),{isHierarchical:o,parentPostId:n,parentPostTitle:i,pageItems:a,isLoading:l}=(0,S0.useSelect)(f=>{let{getPostType:m,getEntityRecords:h,getEntityRecord:g,isResolving:v}=f(GI.store),{getCurrentPostId:y,getEditedPostAttribute:b}=f(T),S=b("type"),w=b("parent"),_=m(S),C=y(),k=_?.hierarchical??!1,A={per_page:100,exclude:C,parent_exclude:C,orderby:"menu_order",order:"asc",_fields:"id,title,parent"};t&&(A.search=t,A.orderby="relevance");let R=w?g("postType",S,w):null;return{isHierarchical:k,parentPostId:w,parentPostTitle:R?D7(R):"",pageItems:k?h("postType",S,A):null,isLoading:k?v("getEntityRecords",["postType",S,A]):!1}},[t]),c=(0,cu.useMemo)(()=>{let f=(v,y=0)=>v.map(w=>[{value:w.id,label:"\u2014 ".repeat(y)+(0,L7.decodeEntities)(w.name),rawName:w.name},...f(w.children||[],y+1)]).sort(([w],[_])=>{let C=ade(w.rawName,t),k=ade(_.rawName,t);return C>=k?1:-1}).flat();if(!a)return[];let m=a.map(v=>({id:v.id,parent:v.parent,name:D7(v)}));t||(m=UI(m));let h=f(m),g=h.find(v=>v.value===n);return i&&!g&&h.unshift({value:n,label:i}),h},[a,t,i,n]);if(!o)return null;let u=f=>{r(f)},d=f=>{e({parent:f})};return(0,xs.jsx)(hp.ComboboxControl,{__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,Cs.__)("Parent"),help:(0,Cs.__)("Choose a parent page."),value:n,options:c,onFilterValueChange:(0,lde.debounce)(u,300),onChange:d,hideLabelFromVision:!0,isLoading:l})}function lje({isOpen:e,onClick:t}){let r=(0,S0.useSelect)(n=>{let{getEditedPostAttribute:i}=n(T),a=i("parent");if(!a)return null;let{getEntityRecord:l}=n(GI.store),c=i("type");return l("postType",c,a)},[]),o=(0,cu.useMemo)(()=>r?D7(r):(0,Cs.__)("None"),[r]);return(0,xs.jsx)(hp.Button,{size:"compact",className:"editor-post-parent__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,Cs.sprintf)((0,Cs.__)("Change parent: %s"),o),onClick:t,children:o})}function fde(){let e=(0,S0.useSelect)(n=>n(GI.store).getEntityRecord("root","__unstableBase")?.home,[]),[t,r]=(0,cu.useState)(null),o=(0,cu.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]);return(0,xs.jsx)(Nt,{label:(0,Cs.__)("Parent"),ref:r,children:(0,xs.jsx)(hp.Dropdown,{popoverProps:o,className:"editor-post-parent__panel-dropdown",contentClassName:"editor-post-parent__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:n,onToggle:i})=>(0,xs.jsx)(lje,{isOpen:n,onClick:i}),renderContent:({onClose:n})=>(0,xs.jsxs)("div",{className:"editor-post-parent",children:[(0,xs.jsx)(cde.__experimentalInspectorPopoverHeader,{title:(0,Cs.__)("Parent"),onClose:n}),(0,xs.jsxs)("div",{children:[(0,cu.createInterpolateElement)((0,Cs.sprintf)((0,Cs.__)('Child pages inherit characteristics from their parent, such as URL structure. For instance, if "Pricing" is a child of "Services", its URL would be %s<wbr />/services<wbr />/pricing.'),(0,ude.filterURLForDisplay)(e).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,xs.jsx)("wbr",{})}),(0,xs.jsx)("p",{children:(0,cu.createInterpolateElement)((0,Cs.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,xs.jsx)(hp.ExternalLink,{href:(0,Cs.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes")})})})]}),(0,xs.jsx)(dde,{})]})})})}var mde=dde;var WI=s(x(),1),cje="page-attributes";function uje(){let{isEnabled:e,postType:t}=(0,pde.useSelect)(r=>{let{getEditedPostAttribute:o,isEditorPanelEnabled:n}=r(T),{getPostType:i}=r(hde.store);return{isEnabled:n(cje),postType:i(o("type"))}},[]);return!e||!t?null:(0,WI.jsx)(fde,{})}function YI(){return(0,WI.jsx)(v0,{children:(0,WI.jsx)(uje,{})})}var ol=s(N(),1),Qd=s(H(),1),x0=s(U(),1),z7=s(Q(),1),yde=s(ce(),1),C0=s(V(),1);var bde=s(wt(),1);var qI=s(U(),1),V7=s(V(),1),Wl=s(lt(),1),Yl=s(H(),1),tv=s(N(),1);var Xd=s(x(),1),B7=(0,tv.__)("Custom Template");function gp({onClose:e}){let{defaultBlockTemplate:t,onNavigateToEntityRecord:r}=(0,qI.useSelect)(d=>{let{getEditorSettings:f,getCurrentTemplateId:m}=d(T);return{defaultBlockTemplate:f().defaultBlockTemplate,onNavigateToEntityRecord:f().onNavigateToEntityRecord,getTemplateId:m}}),{createTemplate:o}=Y((0,qI.useDispatch)(T)),[n,i]=(0,V7.useState)(""),[a,l]=(0,V7.useState)(!1),c=()=>{i(""),e()},u=async d=>{if(d.preventDefault(),a)return;l(!0);let f=t??(0,Wl.serialize)([(0,Wl.createBlock)("core/group",{tagName:"header",layout:{inherit:!0}},[(0,Wl.createBlock)("core/site-title"),(0,Wl.createBlock)("core/site-tagline")]),(0,Wl.createBlock)("core/separator"),(0,Wl.createBlock)("core/group",{tagName:"main"},[(0,Wl.createBlock)("core/group",{layout:{inherit:!0}},[(0,Wl.createBlock)("core/post-title")]),(0,Wl.createBlock)("core/post-content",{layout:{inherit:!0}})])]),m=await o({slug:xh(n||B7)||"wp-custom-template",content:f,title:n||B7,status:"publish"});l(!1),r({postId:m.id,postType:"wp_template"}),c()};return(0,Xd.jsx)(Yl.Modal,{title:(0,tv.__)("Create custom template"),onRequestClose:c,focusOnMount:"firstContentElement",size:"small",overlayClassName:"editor-post-template__create-template-modal",children:(0,Xd.jsx)("form",{onSubmit:u,children:(0,Xd.jsxs)(Yl.__experimentalVStack,{spacing:"3",children:[(0,Xd.jsx)(Yl.TextControl,{__next40pxDefaultSize:!0,label:(0,tv.__)("Name"),value:n,onChange:i,placeholder:B7,disabled:a,help:(0,tv.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,Xd.jsxs)(Yl.__experimentalHStack,{justify:"right",children:[(0,Xd.jsx)(Yl.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:c,children:(0,tv.__)("Cancel")}),(0,Xd.jsx)(Yl.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:a,"aria-disabled":a,children:(0,tv.__)("Create")})]})]})})})}var rv=s(U(),1),gde=s(V(),1),vp=s(Q(),1),KI=s(N(),1);function ov(){return(0,rv.useSelect)(e=>{let{getCurrentPostId:t,getCurrentPostType:r}=e(T);return{postId:t(),postType:r()}},[])}function nv(){let{postType:e,postId:t}=ov();return(0,rv.useSelect)(r=>{let{canUser:o,getEntityRecord:n,getEntityRecords:i}=r(vp.store),a=o("read",{kind:"root",name:"site"})?n("root","site"):void 0,l=+t===a?.page_for_posts,c=e==="page"&&+t===a?.page_on_front,u=c?i("postType","wp_template",{per_page:-1}):[],d=c&&!!u?.some(({slug:f})=>f==="front-page");return!l&&!d},[t,e])}function vde(e){return(0,rv.useSelect)(t=>t(vp.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:e}),[e])}function Cx(){let{postType:e,postId:t}=ov(),[r]=(0,vp.useEntityProp)("postType",e,"slug",t),o=j7(),n=nv(),i=vde(e),a=(0,rv.useSelect)(l=>{if(!window?.__experimentalDataFormInspector||!o)return null;let{getDefaultTemplateId:c,getEntityRecord:u}=l(vp.store),d;r?d=e==="page"?`${e}-${r}`:`single-${e}-${r}`:d=e==="page"?"page":`single-${e}`;let f=c({slug:d});return f?u("postType","wp_template",f):null},[o,r,e]);return(0,gde.useMemo)(()=>n&&[...(i||[]).filter(l=>l.is_custom&&l.slug!==o&&!!l.content.raw),a&&{...a,title:{rendered:(0,KI.sprintf)((0,KI.__)("%s (default)"),a.title.rendered)},isDefault:!0}].filter(Boolean),[i,a,o,n])}function _0(){return(0,rv.useSelect)(e=>{let{getEditorSettings:t,getCurrentTemplateId:r,getCurrentPostType:o}=e(T),{getPostType:n,canUser:i}=e(vp.store),a=o(),l=n(a),c=t(),u=c.__unstableIsBlockBasedTheme,d=!!c.availableTemplates&&Object.keys(c.availableTemplates).length>0,f;l?.viewable?d?f=!0:c.supportsTemplateMode?f=i("create",{kind:"postType",name:"wp_template"})??!1:f=!1:f=!1;let m=f?!!i("read",{kind:"postType",name:"wp_template"}):!1;return(!u||!m)&&f?"classic":u&&r()?"block-theme":null},[])}function j7(){let{postType:e,postId:t}=ov(),r=vde(e),o=(0,rv.useSelect)(n=>n(vp.store).getEditedEntityRecord("postType",e,t)?.template,[e,t]);if(o)return r?.find(n=>n.slug===o)?.slug}var Ts=s(x(),1);function dje({isOpen:e,onClick:t}){let r=(0,x0.useSelect)(o=>{let n=o(T).getEditedPostAttribute("template"),{supportsTemplateMode:i,availableTemplates:a}=o(T).getEditorSettings();if(!i&&a[n])return a[n];let l=o(z7.store).canUser("create",{kind:"postType",name:"wp_template"})&&o(T).getCurrentTemplateId();return l?.title||l?.slug||a?.[n]},[]);return(0,Ts.jsx)(Qd.Button,{__next40pxDefaultSize:!0,variant:"tertiary","aria-expanded":e,"aria-label":(0,ol.__)("Template options"),onClick:t,children:r??(0,ol.__)("Default template")})}function fje({onClose:e}){let t=nv(),{availableTemplates:r,fetchedTemplates:o,selectedTemplateSlug:n,canCreate:i,canEdit:a,currentTemplateId:l,onNavigateToEntityRecord:c,getEditorSettings:u}=(0,x0.useSelect)(y=>{let{canUser:b,getEntityRecords:S}=y(z7.store),w=y(T).getEditorSettings(),_=b("create",{kind:"postType",name:"wp_template"}),C=y(T).getCurrentTemplateId();return{availableTemplates:w.availableTemplates,fetchedTemplates:_?S("postType","wp_template",{post_type:y(T).getCurrentPostType(),per_page:-1}):void 0,selectedTemplateSlug:y(T).getEditedPostAttribute("template"),canCreate:t&&_&&w.supportsTemplateMode,canEdit:t&&_&&w.supportsTemplateMode&&!!C,currentTemplateId:C,onNavigateToEntityRecord:w.onNavigateToEntityRecord,getEditorSettings:y(T).getEditorSettings}},[t]),d=(0,C0.useMemo)(()=>Object.entries({...r,...Object.fromEntries((o??[]).map(({slug:y,title:b})=>[y,b.rendered]))}).map(([y,b])=>({value:y,label:b})),[r,o]),f=d.find(y=>y.value===n)??d.find(y=>!y.value),{editPost:m}=(0,x0.useDispatch)(T),{createSuccessNotice:h}=(0,x0.useDispatch)(bde.store),[g,v]=(0,C0.useState)(!1);return(0,Ts.jsxs)("div",{className:"editor-post-template__classic-theme-dropdown",children:[(0,Ts.jsx)(yde.__experimentalInspectorPopoverHeader,{title:(0,ol.__)("Template"),help:(0,ol.__)("Templates define the way content is displayed when viewing your site."),actions:i?[{icon:p6,label:(0,ol.__)("Add template"),onClick:()=>v(!0)}]:[],onClose:e}),t?(0,Ts.jsx)(Qd.SelectControl,{__next40pxDefaultSize:!0,hideLabelFromVision:!0,label:(0,ol.__)("Template"),value:f?.value??"",options:d,onChange:y=>m({template:y||""})}):(0,Ts.jsx)(Qd.Notice,{status:"warning",isDismissible:!1,children:(0,ol.__)("The posts page template cannot be changed.")}),a&&c&&(0,Ts.jsx)("p",{children:(0,Ts.jsx)(Qd.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>{c({postId:l,postType:"wp_template"}),e(),h((0,ol.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:[{label:(0,ol.__)("Go back"),onClick:()=>u().onNavigateToPreviousEntityRecord()}]})},children:(0,ol.__)("Edit template")})}),g&&(0,Ts.jsx)(gp,{onClose:()=>v(!1)})]})}function mje(){let[e,t]=(0,C0.useState)(null),r=(0,C0.useMemo)(()=>({anchor:e,className:"editor-post-template__dropdown",placement:"left-start",offset:36,shift:!0}),[e]);return(0,Ts.jsx)(Nt,{label:(0,ol.__)("Template"),ref:t,children:(0,Ts.jsx)(Qd.Dropdown,{popoverProps:r,focusOnMount:!0,renderToggle:({isOpen:o,onToggle:n})=>(0,Ts.jsx)(dje,{isOpen:o,onClick:n}),renderContent:({onClose:o})=>(0,Ts.jsx)(fje,{onClose:o})})})}var ZI=mje;var JI=s(H(),1),Cde=s(Am(),1),$I=s(U(),1),Tde=s(oV(),1);var _de=s(H(),1);var XI=s(U(),1),wde=s(vt(),1);var Sde=s(x(),1),{PreferenceBaseOption:pje}=Y(wde.privateApis);function yp(e){let{toggleEditorPanelEnabled:t}=(0,XI.useDispatch)(T),{isChecked:r,isRemoved:o}=(0,XI.useSelect)(n=>{let{isEditorPanelEnabled:i,isEditorPanelRemoved:a}=n(T);return{isChecked:i(e.panelName),isRemoved:a(e.panelName)}},[e.panelName]);return o?null:(0,Sde.jsx)(pje,{isChecked:r,onChange:()=>t(e.panelName),...e})}var H7=s(x(),1),{Fill:hje,Slot:gje}=(0,_de.createSlotFill)("EnablePluginDocumentSettingPanelOption"),xde=({label:e,panelName:t})=>(0,H7.jsx)(hje,{children:(0,H7.jsx)(yp,{label:e,panelName:t})});xde.Slot=gje;var QI=xde;var bp=s(x(),1),{Fill:vje,Slot:yje}=(0,JI.createSlotFill)("PluginDocumentSettingPanel"),Pde=({name:e,className:t,title:r,icon:o,children:n})=>{let{name:i}=(0,Cde.usePluginContext)(),a=`${i}/${e}`,{opened:l,isEnabled:c}=(0,$I.useSelect)(d=>{let{isEditorPanelOpened:f,isEditorPanelEnabled:m}=d(T);return{opened:f(a),isEnabled:m(a)}},[a]),{toggleEditorPanelOpened:u}=(0,$I.useDispatch)(T);return e===void 0&&(0,Tde.default)("PluginDocumentSettingPanel requires a name property."),(0,bp.jsxs)(bp.Fragment,{children:[(0,bp.jsx)(QI,{label:r,panelName:a}),(0,bp.jsx)(vje,{children:c&&(0,bp.jsx)(JI.PanelBody,{className:t,title:r,icon:o,opened:l,onToggle:()=>u(a),children:n})})]})};Pde.Slot=yje;var e5=Pde;var Ede=s(ce(),1),kde=s(H(),1),Rde=s(we(),1),U7=s(x(),1),bje=(e,t)=>e.filter(r=>!t.includes(r)).length===0,wje=(e,t)=>!Array.isArray(t)||bje(e,t),Sje=({allowedBlocks:e,icon:t,label:r,onClick:o,small:n,role:i})=>(0,U7.jsx)(Ede.BlockSettingsMenuControls,{children:({selectedBlocks:a,onClose:l})=>wje(a,e)?(0,U7.jsx)(kde.MenuItem,{onClick:(0,Rde.compose)(o,l),icon:t,label:n?r:void 0,role:i,children:!n&&r}):null}),Ade=Sje;var Ide=s(H(),1),Ode=s(Am(),1);var Nde=s(x(),1);function Mde(e){let t=(0,Ode.usePluginContext)();return(0,Nde.jsx)(ja,{name:"core/plugin-more-menu",as:e.as??Ide.MenuItem,icon:e.icon||t.icon,...e})}var Fde=s(Am(),1),t5=s(H(),1),G7=s(x(),1),{Fill:_je,Slot:xje}=(0,t5.createSlotFill)("PluginPostPublishPanel"),Dde=({children:e,className:t,title:r,initialOpen:o=!1,icon:n})=>{let{icon:i}=(0,Fde.usePluginContext)();return(0,G7.jsx)(_je,{children:(0,G7.jsx)(t5.PanelBody,{className:t,initialOpen:o||!r,title:r,icon:n??i,children:e})})};Dde.Slot=xje;var r5=Dde;var o5=s(H(),1),W7=s(x(),1),{Fill:Cje,Slot:Tje}=(0,o5.createSlotFill)("PluginPostStatusInfo"),Lde=({children:e,className:t})=>(0,W7.jsx)(Cje,{children:(0,W7.jsx)(o5.PanelRow,{className:t,children:e})});Lde.Slot=Tje;var n5=Lde;var i5=s(H(),1),Bde=s(Am(),1),Y7=s(x(),1),{Fill:Pje,Slot:Eje}=(0,i5.createSlotFill)("PluginPrePublishPanel"),Vde=({children:e,className:t,title:r,initialOpen:o=!1,icon:n})=>{let{icon:i}=(0,Bde.usePluginContext)();return(0,Y7.jsx)(Pje,{children:(0,Y7.jsx)(i5.PanelBody,{className:t,initialOpen:o||!r,title:r,icon:n??i,children:e})})};Vde.Slot=Eje;var s5=Vde;var jde=s(H(),1),zde=s(Am(),1);var Hde=s(x(),1);function Ude(e){let t=(0,zde.usePluginContext)();return(0,Hde.jsx)(ja,{name:"core/plugin-preview-menu",as:e.as??jde.MenuItem,icon:e.icon||t.icon,...e})}var Gde=s(x(),1);function iv({className:e,...t}){return(0,Gde.jsx)(Ha,{panelClassName:e,className:"editor-sidebar",scope:"core",...t})}var Wde=s(x(),1);function Yde(e){return(0,Wde.jsx)(Om,{__unstableExplicitMenuItem:!0,scope:"core",...e})}var Jd=s(U(),1),pfe=s(St(),1),wp=s(H(),1),a5=s(V(),1),av=s(N(),1),k0=s(Q(),1);var hfe=s(wt(),1),gfe=s(vt(),1);var P0=s(V(),1),Xde=s(St(),1),Qde=s(ce(),1),E0=s(H(),1),T0=s(N(),1),Jde=s(U(),1),$de=s(Q(),1),efe=s(lt(),1);var Kde=s(c_(),1);function qde(e=""){return e=(0,Kde.default)(e),e=e.trim().toLowerCase(),e}function kje(e,t){let r=qde(t),o=qde(e.title),n=0;return r===o?n+=30:o.startsWith(r)?n+=20:r.split(" ").every(l=>o.includes(l))&&(n+=10),n}function Zde(e=[],t=""){if(!t)return e;let r=e.map(o=>[o,kje(o,t)]).filter(([,o])=>o>0);return r.sort(([,o],[,n])=>n-o),r.map(([o])=>o)}var Ps=s(x(),1);function q7({onRequestClose:e,onSelect:t}){let{postType:r,postId:o}=ov(),{editEntityRecord:n}=(0,Jde.useDispatch)($de.store),i=async a=>{n("postType",r,o,{template:a.isDefault?"":a.name},{undoIgnore:!0}),e(),t?.()};return(0,Ps.jsx)(E0.Modal,{title:(0,T0.__)("Choose a template"),onRequestClose:e,overlayClassName:"editor-post-template__swap-template-modal",isFullScreen:!0,children:(0,Ps.jsx)("div",{className:"editor-post-template__swap-template-modal-content",children:(0,Ps.jsx)(Rje,{onSelect:i})})})}function tfe({onClick:e}){let[t,r]=(0,P0.useState)(!1),o=Cx();return(0,Ps.jsxs)(Ps.Fragment,{children:[(0,Ps.jsx)(E0.MenuItem,{disabled:!o?.length,accessibleWhenDisabled:!0,onClick:()=>r(!0),children:(0,T0.__)("Change template")}),t&&(0,Ps.jsx)(q7,{onRequestClose:()=>r(!1),onSelect:e})]})}function Rje({onSelect:e}){let[t,r]=(0,P0.useState)(""),o=Cx(),n=(0,P0.useMemo)(()=>o.map(a=>({name:a.slug,blocks:(0,efe.parse)(a.content.raw),title:(0,Xde.decodeEntities)(a.title.rendered),id:a.id,isDefault:a.isDefault})),[o]),i=(0,P0.useMemo)(()=>Zde(n,t),[n,t]);return(0,Ps.jsxs)(Ps.Fragment,{children:[(0,Ps.jsx)(E0.SearchControl,{onChange:r,value:t,label:(0,T0.__)("Search"),placeholder:(0,T0.__)("Search"),className:"editor-post-template__swap-template-search"}),(0,Ps.jsx)(Qde.__experimentalBlockPatternsList,{label:(0,T0.__)("Templates"),blockPatterns:i,onClickPattern:e})]})}var rfe=s(H(),1),ofe=s(N(),1),nfe=s(U(),1),ife=s(Q(),1);var sfe=s(x(),1);function afe({onClick:e}){let t=j7(),r=nv(),{postType:o,postId:n}=ov(),{editEntityRecord:i}=(0,nfe.useDispatch)(ife.store);return!t||!r?null:(0,sfe.jsx)(rfe.MenuItem,{onClick:()=>{i("postType",o,n,{template:""},{undoIgnore:!0}),e()},children:(0,ofe.__)("Use default template")})}var lfe=s(H(),1),cfe=s(N(),1),ufe=s(U(),1),dfe=s(Q(),1),ffe=s(V(),1);var sv=s(x(),1);function mfe(){let{canCreateTemplates:e}=(0,ufe.useSelect)(n=>{let{canUser:i}=n(dfe.store);return{canCreateTemplates:i("create",{kind:"postType",name:"wp_template"})}},[]),[t,r]=(0,ffe.useState)(!1),o=nv();return!e||!o?null:(0,sv.jsxs)(sv.Fragment,{children:[(0,sv.jsx)(lfe.MenuItem,{onClick:()=>{r(!0)},children:(0,cfe.__)("Create new template")}),t&&(0,sv.jsx)(gp,{onClose:()=>{r(!1)}})]})}var Es=s(x(),1);function vfe(){let{isTemplateHidden:e,onNavigateToEntityRecord:t,getEditorSettings:r,hasGoBack:o,hasSpecificTemplate:n,id:i}=(0,Jd.useSelect)(_=>{let{getRenderingMode:C,getEditorSettings:k,getCurrentPost:A,getCurrentTemplateId:R}=Y(_(T)),I=k(),B=A();return{isTemplateHidden:C()==="post-only",onNavigateToEntityRecord:I.onNavigateToEntityRecord,getEditorSettings:k,hasGoBack:I.hasOwnProperty("onNavigateToPreviousEntityRecord"),hasSpecificTemplate:!!B.template,id:R()}},[]),{get:a}=(0,Jd.useSelect)(gfe.store),{editedRecord:l,hasResolved:c}=(0,k0.useEntityRecord)("postType","wp_template",i),{getEntityRecord:u}=(0,Jd.useSelect)(k0.store),{editEntityRecord:d}=(0,Jd.useDispatch)(k0.store),{createSuccessNotice:f}=(0,Jd.useDispatch)(hfe.store),{setRenderingMode:m,setDefaultRenderingMode:h}=Y((0,Jd.useDispatch)(T)),g=(0,Jd.useSelect)(_=>!!_(k0.store).canUser("create",{kind:"postType",name:"wp_template"}),[]),[v,y]=(0,a5.useState)(null),b=(0,a5.useMemo)(()=>({anchor:v,className:"editor-post-template__dropdown",placement:"left-start",offset:36,shift:!0}),[v]);if(!c)return null;let S=o?[{label:(0,av.__)("Go back"),onClick:()=>r().onNavigateToPreviousEntityRecord()}]:void 0,w=()=>{a("core/edit-site","welcomeGuideTemplate")||f((0,av.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:S})};return(0,Es.jsx)(Nt,{label:(0,av.__)("Template"),ref:y,children:(0,Es.jsx)(wp.DropdownMenu,{popoverProps:b,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},label:(0,av.__)("Template options"),text:(0,pfe.decodeEntities)(l.title),icon:null,children:({onClose:_})=>(0,Es.jsxs)(Es.Fragment,{children:[(0,Es.jsxs)(wp.MenuGroup,{children:[g&&(0,Es.jsx)(wp.MenuItem,{onClick:async()=>{if(t({postId:l.id,postType:"wp_template"}),!n&&window?.__experimentalTemplateActivate){let C=await u("root","site").active_templates;C[l.slug]!==l.id&&d("root","site",void 0,{active_templates:{...C,[l.slug]:l.id}})}_(),w()},children:(0,av.__)("Edit template")}),(0,Es.jsx)(tfe,{onClick:_}),(0,Es.jsx)(afe,{onClick:_}),g&&(0,Es.jsx)(mfe,{})]}),(0,Es.jsx)(wp.MenuGroup,{children:(0,Es.jsx)(wp.MenuItem,{icon:e?void 0:Rn,isSelected:!e,role:"menuitemcheckbox",onClick:()=>{let C=e?"template-locked":"post-only";m(C),h(C)},children:(0,av.__)("Show template")})})]})})})}var K7=s(x(),1);function l5(){let e=_0();return e==="classic"?(0,K7.jsx)(ZI,{}):e==="block-theme"?(0,K7.jsx)(vfe,{}):null}var Mfe=s(U(),1),Ffe=s(Q(),1);var _fe=s(we(),1),xfe=s(V(),1),Cfe=s(U(),1),Tfe=s(N(),1),Pfe=s(H(),1);var yfe=s(N(),1),bfe=s(V(),1),wfe=s(U(),1),Z7=s(St(),1),Sfe=s(Q(),1);var Tx={_fields:"id,name",context:"view"},c5={who:"authors",per_page:100,...Tx};function u5(e){let{authorId:t,authors:r,postAuthor:o,isLoading:n}=(0,wfe.useSelect)(a=>{let{getUser:l,getUsers:c,isResolving:u}=a(Sfe.store),{getEditedPostAttribute:d}=a(T),f=d("author"),m={...c5};return e&&(m.search=e,m.search_columns=["name"]),{authorId:f,authors:c(m),postAuthor:l(f,Tx),isLoading:u("getUsers",[m])}},[e]),i=(0,bfe.useMemo)(()=>{let a=(r??[]).map(u=>({value:u.id,label:(0,Z7.decodeEntities)(u.name)})),l=a.findIndex(({value:u})=>o?.id===u),c=[];return l<0&&o?c=[{value:o.id,label:(0,Z7.decodeEntities)(o.name)}]:l<0&&!o&&(c=[{value:0,label:(0,yfe.__)("(No author)")}]),[...c,...a]},[r,o]);return{authorId:t,authorOptions:i,postAuthor:o,isLoading:n}}var Efe=s(x(),1);function kfe(){let[e,t]=(0,xfe.useState)(),{editPost:r}=(0,Cfe.useDispatch)(T),{authorId:o,authorOptions:n,isLoading:i}=u5(e),a=l=>{l&&r({author:l})};return(0,Efe.jsx)(Pfe.ComboboxControl,{__next40pxDefaultSize:!0,label:(0,Tfe.__)("Author"),options:n,value:o,onFilterValueChange:(0,_fe.debounce)(t,300),onChange:a,allowReset:!1,hideLabelFromVision:!0,isLoading:i})}var Rfe=s(N(),1),Afe=s(U(),1),Ife=s(H(),1);var Ofe=s(x(),1);function Nfe(){let{editPost:e}=(0,Afe.useDispatch)(T),{authorId:t,authorOptions:r}=u5(),o=n=>{let i=Number(n);e({author:i})};return(0,Ofe.jsx)(Ife.SelectControl,{__next40pxDefaultSize:!0,className:"post-author-selector",label:(0,Rfe.__)("Author"),options:r,onChange:o,value:t,hideLabelFromVision:!0})}var X7=s(x(),1),Aje=25;function Ije(){return(0,Mfe.useSelect)(t=>t(Ffe.store).getUsers(c5)?.length>=Aje,[])?(0,X7.jsx)(kfe,{}):(0,X7.jsx)(Nfe,{})}var d5=Ije;var Dfe=s(U(),1);var Lfe=s(x(),1);function f5({children:e}){let{hasAssignAuthorAction:t}=(0,Dfe.useSelect)(r=>({hasAssignAuthorAction:!!r(T).getCurrentPost()?._links?.["wp:action-assign-author"]}),[]);return t?(0,Lfe.jsx)(Mr,{supportKeys:"author",children:e}):null}var lv=s(N(),1),m5=s(H(),1),p5=s(V(),1),Bfe=s(St(),1),Vfe=s(ce(),1),jfe=s(U(),1),zfe=s(Q(),1);var uu=s(x(),1);function Oje({isOpen:e,onClick:t}){let{postAuthor:r}=(0,jfe.useSelect)(n=>{let i=n(T).getEditedPostAttribute("author");return{postAuthor:n(zfe.store).getUser(i,Tx)}},[]),o=(0,Bfe.decodeEntities)(r?.name)||(0,lv.__)("(No author)");return(0,uu.jsx)(m5.Button,{size:"compact",variant:"tertiary","aria-expanded":e,"aria-label":(0,lv.sprintf)((0,lv.__)("Change author: %s"),o),onClick:t,children:o})}function Nje(){let[e,t]=(0,p5.useState)(null),r=(0,p5.useMemo)(()=>({anchor:e,placement:"left-start",offset:36,shift:!0}),[e]);return(0,uu.jsx)(f5,{children:(0,uu.jsx)(Nt,{label:(0,lv.__)("Author"),ref:t,children:(0,uu.jsx)(m5.Dropdown,{popoverProps:r,contentClassName:"editor-post-author__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:o,onToggle:n})=>(0,uu.jsx)(Oje,{isOpen:o,onClick:n}),renderContent:({onClose:o})=>(0,uu.jsxs)("div",{className:"editor-post-author",children:[(0,uu.jsx)(Vfe.__experimentalInspectorPopoverHeader,{title:(0,lv.__)("Author"),onClose:o}),(0,uu.jsx)(d5,{onClose:o})]})})})})}var h5=Nje;var Sp=s(N(),1),v5=s(H(),1),y5=s(U(),1);var g5=s(x(),1),Mje=[{label:(0,Sp._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,Sp.__)("Visitors can add new comments and replies.")},{label:(0,Sp.__)("Closed"),value:"closed",description:[(0,Sp.__)("Visitors cannot add new comments or replies."),(0,Sp.__)("Existing comments remain visible.")].join(" ")}];function Fje(){let e=(0,y5.useSelect)(o=>o(T).getEditedPostAttribute("comment_status")??"open",[]),{editPost:t}=(0,y5.useDispatch)(T),r=o=>t({comment_status:o});return(0,g5.jsx)("form",{children:(0,g5.jsx)(v5.__experimentalVStack,{spacing:4,children:(0,g5.jsx)(v5.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,Sp.__)("Comment status"),options:Mje,onChange:r,selected:e})})})}var b5=Fje;var ql=s(N(),1),R0=s(H(),1),J7=s(U(),1),C5=s(V(),1),Hfe=s(ce(),1),Ufe=s(Q(),1);var w5=s(N(),1),S5=s(H(),1),_5=s(U(),1);var Q7=s(x(),1);function Dje(){let e=(0,_5.useSelect)(o=>o(T).getEditedPostAttribute("ping_status")??"open",[]),{editPost:t}=(0,_5.useDispatch)(T),r=()=>t({ping_status:e==="open"?"closed":"open"});return(0,Q7.jsx)(S5.CheckboxControl,{label:(0,w5.__)("Enable pingbacks & trackbacks"),checked:e==="open",onChange:r,help:(0,Q7.jsx)(S5.ExternalLink,{href:(0,w5.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,w5.__)("Learn more about pingbacks & trackbacks")})})}var x5=Dje;var Ji=s(x(),1),Lje="discussion-panel";function Bje({onClose:e}){return(0,Ji.jsxs)("div",{className:"editor-post-discussion",children:[(0,Ji.jsx)(Hfe.__experimentalInspectorPopoverHeader,{title:(0,ql.__)("Discussion"),onClose:e}),(0,Ji.jsxs)(R0.__experimentalVStack,{spacing:4,children:[(0,Ji.jsx)(Mr,{supportKeys:"comments",children:(0,Ji.jsx)(b5,{})}),(0,Ji.jsx)(Mr,{supportKeys:"trackbacks",children:(0,Ji.jsx)(x5,{})})]})]})}function Vje({isOpen:e,onClick:t}){let{commentStatus:r,pingStatus:o,commentsSupported:n,trackbacksSupported:i}=(0,J7.useSelect)(l=>{let{getEditedPostAttribute:c}=l(T),{getPostType:u}=l(Ufe.store),d=u(c("type"));return{commentStatus:c("comment_status")??"open",pingStatus:c("ping_status")??"open",commentsSupported:!!d.supports.comments,trackbacksSupported:!!d.supports.trackbacks}},[]),a;return r==="open"?o==="open"?a=(0,ql._x)("Open",'Adjective: e.g. "Comments are open"'):a=i?(0,ql.__)("Comments only"):(0,ql._x)("Open",'Adjective: e.g. "Comments are open"'):o==="open"?a=n?(0,ql.__)("Pings only"):(0,ql.__)("Pings enabled"):a=(0,ql.__)("Closed"),(0,Ji.jsx)(R0.Button,{size:"compact",className:"editor-post-discussion__panel-toggle",variant:"tertiary","aria-label":(0,ql.__)("Change discussion options"),"aria-expanded":e,onClick:t,children:a})}function T5(){let{isEnabled:e}=(0,J7.useSelect)(n=>{let{isEditorPanelEnabled:i}=n(T);return{isEnabled:i(Lje)}},[]),[t,r]=(0,C5.useState)(null),o=(0,C5.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]);return e?(0,Ji.jsx)(Mr,{supportKeys:["comments","trackbacks"],children:(0,Ji.jsx)(Nt,{label:(0,ql.__)("Discussion"),ref:r,children:(0,Ji.jsx)(R0.Dropdown,{popoverProps:o,className:"editor-post-discussion__panel-dropdown",contentClassName:"editor-post-discussion__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:n,onToggle:i})=>(0,Ji.jsx)(Vje,{isOpen:n,onClick:i}),renderContent:({onClose:n})=>(0,Ji.jsx)(Bje,{onClose:n})})})}):null}var A0=s(N(),1),E5=s(H(),1),k5=s(U(),1),Gfe=s(V(),1),Wfe=s(St(),1);var P5=s(x(),1);function Px({hideLabelFromVision:e=!1,updateOnBlur:t=!1}){let{excerpt:r,shouldUseDescriptionLabel:o,usedAttribute:n}=(0,k5.useSelect)(d=>{let{getCurrentPostType:f,getEditedPostAttribute:m}=d(T),h=f(),g=["wp_template","wp_template_part"].includes(h)?"description":"excerpt";return{excerpt:m(g),shouldUseDescriptionLabel:["wp_template","wp_template_part","wp_block"].includes(h),usedAttribute:g}},[]),{editPost:i}=(0,k5.useDispatch)(T),[a,l]=(0,Gfe.useState)((0,Wfe.decodeEntities)(r)),c=d=>{i({[n]:d})},u=o?(0,A0.__)("Write a description (optional)"):(0,A0.__)("Write an excerpt (optional)");return(0,P5.jsx)("div",{className:"editor-post-excerpt",children:(0,P5.jsx)(E5.TextareaControl,{label:u,hideLabelFromVision:e,className:"editor-post-excerpt__textarea",onChange:t?l:c,onBlur:t?()=>c(a):void 0,value:t?a:r,help:o?(0,A0.__)("Write a description"):(0,P5.jsx)(E5.ExternalLink,{href:(0,A0.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),children:(0,A0.__)("Learn more about manual excerpts")})})})}var Yfe=s(x(),1);function jje({children:e}){return(0,Yfe.jsx)(Mr,{supportKeys:"excerpt",children:e})}var cv=jje;var $d=s(N(),1),Kl=s(H(),1),kx=s(U(),1),I5=s(V(),1),Kfe=s(ce(),1),e9=s(Q(),1),Zfe=s(St(),1);var R5=s(H(),1),$7=s(x(),1),{Fill:zje,Slot:Hje}=(0,R5.createSlotFill)("PluginPostExcerpt"),qfe=({children:e,className:t})=>(0,$7.jsx)(zje,{children:(0,$7.jsx)(R5.PanelRow,{className:t,children:e})});qfe.Slot=Hje;var Ex=qfe;var Fr=s(x(),1),A5="post-excerpt";function Uje(){let{isOpened:e,isEnabled:t,postType:r}=(0,kx.useSelect)(a=>{let{isEditorPanelOpened:l,isEditorPanelEnabled:c,getCurrentPostType:u}=a(T);return{isOpened:l(A5),isEnabled:c(A5),postType:u()}},[]),{toggleEditorPanelOpened:o}=(0,kx.useDispatch)(T),n=()=>o(A5);if(!t)return null;let i=["wp_template","wp_template_part","wp_block"].includes(r);return(0,Fr.jsx)(Kl.PanelBody,{title:i?(0,$d.__)("Description"):(0,$d.__)("Excerpt"),opened:e,onToggle:n,children:(0,Fr.jsx)(Ex.Slot,{children:a=>(0,Fr.jsxs)(Fr.Fragment,{children:[(0,Fr.jsx)(Px,{}),a]})})})}function Xfe(){return(0,Fr.jsx)(cv,{children:(0,Fr.jsx)(Uje,{})})}function Qfe(){return(0,Fr.jsx)(cv,{children:(0,Fr.jsx)(Gje,{})})}function Gje(){let{shouldRender:e,excerpt:t,shouldBeUsedAsDescription:r,allowEditing:o}=(0,kx.useSelect)(f=>{let{getCurrentPostType:m,getCurrentPostId:h,getEditedPostAttribute:g,isEditorPanelEnabled:v}=f(T),y=m(),b=["wp_template","wp_template_part"].includes(y),S=y==="wp_block",w=b||S,C=g(b?"description":"excerpt"),k=b&&f(e9.store).getEntityRecord("postType",y,h()),A=!C&&b?_a({template:k,templateTypes:f(e9.store).getCurrentTheme()?.default_template_types})?.description:void 0,R=v(A5)||w;return{excerpt:C??A,shouldRender:R,shouldBeUsedAsDescription:w,allowEditing:R&&(!w||S||k&&k.source===WC.custom&&!k.has_theme_file&&k.is_custom)}},[]),[n,i]=(0,I5.useState)(null),a=r?(0,$d.__)("Description"):(0,$d.__)("Excerpt"),l=(0,I5.useMemo)(()=>({anchor:n,"aria-label":a,headerTitle:a,placement:"left-start",offset:36,shift:!0}),[n,a]);if(!e)return!1;let c=!!t&&(0,Fr.jsx)(Kl.__experimentalText,{align:"left",numberOfLines:4,truncate:o,children:(0,Zfe.decodeEntities)(t)});if(!o)return c;let u=r?(0,$d.__)("Add a description\u2026"):(0,$d.__)("Add an excerpt\u2026"),d=r?(0,$d.__)("Edit description"):(0,$d.__)("Edit excerpt");return(0,Fr.jsxs)(Kl.__experimentalVStack,{children:[c,(0,Fr.jsx)(Kl.Dropdown,{className:"editor-post-excerpt__dropdown",contentClassName:"editor-post-excerpt__dropdown__content",popoverProps:l,focusOnMount:!0,ref:i,renderToggle:({onToggle:f})=>(0,Fr.jsx)(Kl.Button,{__next40pxDefaultSize:!0,onClick:f,variant:"link",children:c?d:u}),renderContent:({onClose:f})=>(0,Fr.jsxs)(Fr.Fragment,{children:[(0,Fr.jsx)(Kfe.__experimentalInspectorPopoverHeader,{title:a,onClose:f}),(0,Fr.jsx)(Kl.__experimentalVStack,{spacing:4,children:(0,Fr.jsx)(Ex.Slot,{children:m=>(0,Fr.jsxs)(Fr.Fragment,{children:[(0,Fr.jsx)(Px,{hideLabelFromVision:!0,updateOnBlur:!0}),m]})})})]})})]})}var ca=s(N(),1),r9=s(tn(),1),_i=s(H(),1),tme=s(DS(),1),N5=s(V(),1),rme=s(we(),1),I0=s(U(),1),uv=s(ce(),1),ome=s(Q(),1);var Jfe=s(U(),1),$fe=s(Q(),1);function O5({children:e,supportKeys:t}){let{postType:r,themeSupports:o}=(0,Jfe.useSelect)(i=>({postType:i(T).getEditedPostAttribute("type"),themeSupports:i($fe.store).getThemeSupports()}),[]);return(Array.isArray(t)?t:[t]).some(i=>{let a=o?.[i]??!1;return i==="post-thumbnails"&&Array.isArray(a)?a.includes(r):a})?e:null}var t9=s(x(),1);function Wje({children:e}){return(0,t9.jsx)(O5,{supportKeys:"post-thumbnails",children:(0,t9.jsx)(Mr,{supportKeys:"thumbnail",children:e})})}var ef=Wje;var Wn=s(x(),1),eme=["image"],Yje=(0,ca.__)("Featured image"),qje=(0,ca.__)("Add a featured image"),Kje=(0,Wn.jsx)("p",{children:(0,ca.__)("To edit the featured image, you need permission to upload media.")});function Zje(e,t){if(!e)return{};let r=(0,r9.applyFilters)("editor.PostFeaturedImage.imageSize","large",e.id,t);if(r in(e?.media_details?.sizes??{}))return{mediaWidth:e.media_details.sizes[r].width,mediaHeight:e.media_details.sizes[r].height,mediaSourceUrl:e.media_details.sizes[r].source_url};let o=(0,r9.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",e.id,t);return o in(e?.media_details?.sizes??{})?{mediaWidth:e.media_details.sizes[o].width,mediaHeight:e.media_details.sizes[o].height,mediaSourceUrl:e.media_details.sizes[o].source_url}:{mediaWidth:e.media_details.width,mediaHeight:e.media_details.height,mediaSourceUrl:e.source_url}}function Xje({currentPostId:e,featuredImageId:t,onUpdateImage:r,onRemoveImage:o,media:n,postType:i,noticeUI:a,noticeOperations:l,isRequestingFeaturedImageMedia:c}){let u=(0,N5.useRef)(!1),[d,f]=(0,N5.useState)(!1),{getSettings:m}=(0,I0.useSelect)(uv.store),{mediaSourceUrl:h}=Zje(n,e);function g(S){m().mediaUpload({allowedTypes:eme,filesList:S,onFileChange([w]){if((0,tme.isBlobURL)(w?.url)){f(!0);return}w&&r(w),f(!1)},onError(w){l.removeAllNotices(),l.createErrorNotice(w)},multiple:!1})}function v(S){return S.alt_text?(0,ca.sprintf)((0,ca.__)("Current image: %s"),S.alt_text):(0,ca.sprintf)((0,ca.__)("The current image has no alternative text. The file name is: %s"),S.media_details.sizes?.full?.file||S.slug)}function y(S){u.current&&S&&(S.focus(),u.current=!1)}let b=!c&&!!t&&!n;return(0,Wn.jsxs)(ef,{children:[a,(0,Wn.jsxs)("div",{className:"editor-post-featured-image",children:[n&&(0,Wn.jsx)("div",{id:`editor-post-featured-image-${t}-describedby`,className:"hidden",children:v(n)}),(0,Wn.jsx)(uv.MediaUploadCheck,{fallback:Kje,children:(0,Wn.jsx)(uv.MediaUpload,{title:i?.labels?.featured_image||Yje,onSelect:r,unstableFeaturedImageFlow:!0,allowedTypes:eme,modalClass:"editor-post-featured-image__media-modal",render:({open:S})=>(0,Wn.jsxs)("div",{className:"editor-post-featured-image__container",children:[b?(0,Wn.jsx)(_i.Notice,{status:"warning",isDismissible:!1,children:(0,ca.__)("Could not retrieve the featured image data.")}):(0,Wn.jsxs)(_i.Button,{__next40pxDefaultSize:!0,ref:y,className:t?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:S,"aria-label":t?(0,ca.__)("Edit or replace the featured image"):null,"aria-describedby":t?`editor-post-featured-image-${t}-describedby`:null,"aria-haspopup":"dialog",disabled:d,accessibleWhenDisabled:!0,children:[!!t&&n&&(0,Wn.jsx)("img",{className:"editor-post-featured-image__preview-image",src:h,alt:v(n)}),(d||c)&&(0,Wn.jsx)(_i.Spinner,{}),!t&&!d&&(i?.labels?.set_featured_image||qje)]}),!!t&&(0,Wn.jsxs)(_i.__experimentalHStack,{className:K("editor-post-featured-image__actions",{"editor-post-featured-image__actions-missing-image":b,"editor-post-featured-image__actions-is-requesting-image":c}),children:[(0,Wn.jsx)(_i.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:S,"aria-haspopup":"dialog",variant:b?"secondary":void 0,children:(0,ca.__)("Replace")}),(0,Wn.jsx)(_i.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:()=>{o(),u.current=!0},variant:b?"secondary":void 0,isDestructive:b,children:(0,ca.__)("Remove")})]}),(0,Wn.jsx)(_i.DropZone,{onFilesDrop:g})]}),value:t})})]})]})}var Qje=(0,I0.withSelect)(e=>{let{getEntityRecord:t,getPostType:r,hasFinishedResolution:o}=e(ome.store),{getCurrentPostId:n,getEditedPostAttribute:i}=e(T),a=i("featured_media");return{media:a?t("postType","attachment",a,{context:"view"}):null,currentPostId:n(),postType:r(i("type")),featuredImageId:a,isRequestingFeaturedImageMedia:!!a&&!o("getEntityRecord",["postType","attachment",a,{context:"view"}])}}),Jje=(0,I0.withDispatch)((e,{noticeOperations:t},{select:r})=>{let{editPost:o}=e(T);return{onUpdateImage(n){o({featured_media:n.id})},onDropImage(n){r(uv.store).getSettings().mediaUpload({allowedTypes:["image"],filesList:n,onFileChange([i]){o({featured_media:i.id})},onError(i){t.removeAllNotices(),t.createErrorNotice(i)},multiple:!1})},onRemoveImage(){o({featured_media:0})}}}),Rx=(0,rme.compose)(_i.withNotices,Qje,Jje,(0,_i.withFilters)("editor.PostFeaturedImage"))(Xje);var nme=s(N(),1),ime=s(H(),1),M5=s(U(),1),sme=s(Q(),1);var O0=s(x(),1),o9="featured-image";function F5({withPanelBody:e=!0}){let{postType:t,isEnabled:r,isOpened:o}=(0,M5.useSelect)(i=>{let{getEditedPostAttribute:a,isEditorPanelEnabled:l,isEditorPanelOpened:c}=i(T),{getPostType:u}=i(sme.store);return{postType:u(a("type")),isEnabled:l(o9),isOpened:c(o9)}},[]),{toggleEditorPanelOpened:n}=(0,M5.useDispatch)(T);return r?e?(0,O0.jsx)(ef,{children:(0,O0.jsx)(ime.PanelBody,{title:t?.labels?.featured_image??(0,nme.__)("Featured image"),opened:o,onToggle:()=>n(o9),children:(0,O0.jsx)(Rx,{})})}):(0,O0.jsx)(ef,{children:(0,O0.jsx)(Rx,{})}):null}var $i=s(N(),1),D5=s(H(),1),L5=s(U(),1),cme=s(we(),1),ume=s(Q(),1);var ame=s(U(),1);var lme=s(x(),1);function N0({children:e}){return(0,ame.useSelect)(r=>r(T).getEditorSettings().disablePostFormats,[])?null:(0,lme.jsx)(Mr,{supportKeys:"post-formats",children:e})}var dv=s(x(),1),Ax=[{id:"aside",caption:(0,$i.__)("Aside")},{id:"audio",caption:(0,$i.__)("Audio")},{id:"chat",caption:(0,$i.__)("Chat")},{id:"gallery",caption:(0,$i.__)("Gallery")},{id:"image",caption:(0,$i.__)("Image")},{id:"link",caption:(0,$i.__)("Link")},{id:"quote",caption:(0,$i.__)("Quote")},{id:"standard",caption:(0,$i.__)("Standard")},{id:"status",caption:(0,$i.__)("Status")},{id:"video",caption:(0,$i.__)("Video")}].sort((e,t)=>{let r=e.caption.toUpperCase(),o=t.caption.toUpperCase();return r<o?-1:r>o?1:0});function Ix(){let t=`post-format-selector-${(0,cme.useInstanceId)(Ix)}`,{postFormat:r,suggestedFormat:o,supportedFormats:n}=(0,L5.useSelect)(u=>{let{getEditedPostAttribute:d,getSuggestedPostFormat:f}=u(T),m=d("format"),h=u(ume.store).getThemeSupports();return{postFormat:m??"standard",suggestedFormat:f(),supportedFormats:h.formats}},[]),i=Ax.filter(u=>n?.includes(u.id)||r===u.id),a=i.find(u=>u.id===o),{editPost:l}=(0,L5.useDispatch)(T),c=u=>l({format:u});return(0,dv.jsx)(N0,{children:(0,dv.jsxs)("div",{className:"editor-post-format",children:[(0,dv.jsx)(D5.RadioControl,{className:"editor-post-format__options",label:(0,$i.__)("Post Format"),selected:r,onChange:u=>c(u),id:t,options:i.map(u=>({label:u.caption,value:u.id})),hideLabelFromVision:!0}),a&&a.id!==r&&(0,dv.jsx)("p",{className:"editor-post-format__suggestion",children:(0,dv.jsx)(D5.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>c(a.id),children:(0,$i.sprintf)((0,$i.__)("Apply suggested format: %s"),a.caption)})})]})})}var fv=s(N(),1),n9=s(H(),1),Ox=s(U(),1);var dme=s(U(),1);var fme=s(x(),1);function $je({children:e}){let{lastRevisionId:t,revisionsCount:r}=(0,dme.useSelect)(o=>{let{getCurrentPostLastRevisionId:n,getCurrentPostRevisionsCount:i}=o(T);return{lastRevisionId:n(),revisionsCount:i()}},[]);return!t||r<2?null:(0,fme.jsx)(Mr,{supportKeys:"revisions",children:e})}var tf=$je;var M0=s(x(),1);function mme(){return(0,Ox.useSelect)(e=>{let{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:r}=e(T);return{lastRevisionId:t(),revisionsCount:r()}},[])}function eze(){let{lastRevisionId:e,revisionsCount:t}=mme(),{setCurrentRevisionId:r}=Y((0,Ox.useDispatch)(T));return(0,M0.jsx)(tf,{children:(0,M0.jsx)(n9.Button,{__next40pxDefaultSize:!0,onClick:()=>r(e),className:"editor-post-last-revision__title",icon:Ou,iconPosition:"right",text:(0,fv.sprintf)((0,fv.__)("Revisions (%s)"),t)})})}function pme(){let{lastRevisionId:e,revisionsCount:t}=mme(),{setCurrentRevisionId:r}=Y((0,Ox.useDispatch)(T));return(0,M0.jsx)(tf,{children:(0,M0.jsx)(Nt,{label:(0,fv.__)("Revisions"),children:(0,M0.jsx)(n9.Button,{onClick:()=>r(e),className:"editor-private-post-last-revision__button",text:t,"aria-label":(0,fv.sprintf)((0,fv.__)("Open revisions screen: %s revisions"),t),variant:"tertiary",size:"compact"})})})}var B5=eze;var hme=s(H(),1);var V5=s(x(),1);function tze(){return(0,V5.jsx)(tf,{children:(0,V5.jsx)(hme.PanelBody,{className:"editor-post-last-revision__panel",children:(0,V5.jsx)(B5,{})})})}var gme=tze;var Sn=s(N(),1),ua=s(H(),1),Mx=s(U(),1),s9=s(vo(),1),Nx=s(V(),1),F0=s(tn(),1),Sme=s(we(),1),a9=s(Q(),1);var rf=s(N(),1),rze="authentication-failed",oze="connection-expired",nze="connection-limit-exceeded",vme="document-size-limit-exceeded",yme="unknown-error",i9={[rze]:{title:(0,rf.__)("Unable to connect"),description:(0,rf.__)("Real-time collaboration couldn't verify your permissions. Check that you have access to edit this post or contact your site administrator.")},[oze]:{title:(0,rf.__)("Connection expired"),description:(0,rf.__)("Your connection to real-time collaboration has timed out. Editing is paused to prevent conflicts with other editors.")},[nze]:{title:(0,rf.__)("Too many editors connected"),description:(0,rf.__)("Real-time collaboration has reached its connection limit. Try again later or contact your site administrator.")},[yme]:{title:(0,rf.__)("Connection lost"),description:(0,rf.__)("The connection to real-time collaboration was interrupted. Editing is paused to prevent conflicts with other editors.")}};function bme(e){return e?.code&&i9[e?.code]?i9[e.code]:i9[yme]}var xr=s(x(),1);function wme(){let{isCollaborationSupported:e,syncConnectionStatus:t}=(0,Mx.useSelect)(r=>{let o=Y(r(a9.store));return{isCollaborationSupported:o.isCollaborationSupported(),syncConnectionStatus:o.getSyncConnectionStatus()}},[]);return e?null:vme===t?.error?.code?(0,xr.jsx)("p",{children:(0,Sn.__)("Because this post is too large for real-time collaboration, only one person can edit at a time.")}):(0,xr.jsx)("p",{children:(0,Sn.__)("Because this post uses plugins that aren\u2019t compatible with real-time collaboration, only one person can edit at a time.")})}function _me(){let t="core/editor/post-locked-modal-"+(0,Sme.useInstanceId)(_me),{autosave:r,updatePostLock:o}=(0,Mx.useDispatch)(T),{isCollaborationEnabled:n,isLocked:i,isTakeover:a,user:l,postId:c,postLockUtils:u,activePostLock:d,postType:f,previewLink:m}=(0,Mx.useSelect)(S=>{let{isCollaborationEnabledForCurrentPost:w,isPostLocked:_,isPostLockTakeover:C,getPostLockUser:k,getCurrentPostId:A,getActivePostLock:R,getEditedPostAttribute:I,getEditedPostPreviewLink:B,getEditorSettings:E}=S(T),{getPostType:P}=S(a9.store);return{isCollaborationEnabled:w(),isLocked:_(),isTakeover:C(),user:k(),postId:A(),postLockUtils:E().postLockUtils,activePostLock:R(),postType:P(I("type")),previewLink:B()}},[]);if((0,Nx.useEffect)(()=>{function S(C){i||(C["wp-refresh-post-lock"]={lock:d,post_id:c})}function w(C){if(!C["wp-refresh-post-lock"])return;let k=C["wp-refresh-post-lock"];k.lock_error?(r(),o({isLocked:!0,isTakeover:!0,user:{name:k.lock_error.name,avatar:k.lock_error.avatar_src_2x}})):k.new_lock&&o({isLocked:!1,activePostLock:k.new_lock})}function _(){if(i||!d)return;let C=new window.FormData;if(C.append("action","wp-remove-post-lock"),C.append("_wpnonce",u.unlockNonce),C.append("post_ID",c),C.append("active_post_lock",d),window.navigator.sendBeacon)window.navigator.sendBeacon(u.ajaxUrl,C);else{let k=new window.XMLHttpRequest;k.open("POST",u.ajaxUrl,!1),k.send(C)}}return(0,F0.addAction)("heartbeat.send",t,S),(0,F0.addAction)("heartbeat.tick",t,w),window.addEventListener("beforeunload",_),()=>{(0,F0.removeAction)("heartbeat.send",t),(0,F0.removeAction)("heartbeat.tick",t),window.removeEventListener("beforeunload",_)}},[]),!i||n)return null;let h=l.name,g=l.avatar,v=(0,s9.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:c,action:"edit",_wpnonce:u.nonce}),y=(0,s9.addQueryArgs)("edit.php",{post_type:f?.slug}),b=(0,Sn.__)("Exit editor");return(0,xr.jsx)(ua.Modal,{title:a?(0,Sn.__)("Someone else has taken over this post"):(0,Sn.__)("This post is already being edited"),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"editor-post-locked-modal",size:"medium",children:(0,xr.jsxs)(ua.__experimentalHStack,{alignment:"top",spacing:6,children:[!!g&&(0,xr.jsx)("img",{src:g,alt:(0,Sn.__)("Avatar"),className:"editor-post-locked-modal__avatar",width:64,height:64}),(0,xr.jsxs)("div",{children:[!!a&&(0,xr.jsxs)(xr.Fragment,{children:[(0,xr.jsx)("p",{children:(0,Nx.createInterpolateElement)(h?(0,Sn.sprintf)((0,Sn.__)("<strong>%s</strong> now has editing control of this post (<PreviewLink />). Don\u2019t worry, your changes up to this moment have been saved."),h):(0,Sn.__)("Another user now has editing control of this post (<PreviewLink />). Don\u2019t worry, your changes up to this moment have been saved."),{strong:(0,xr.jsx)("strong",{}),PreviewLink:(0,xr.jsx)(ua.ExternalLink,{href:m,children:(0,Sn.__)("preview")})})}),(0,xr.jsx)(wme,{})]}),!a&&(0,xr.jsxs)(xr.Fragment,{children:[(0,xr.jsx)("p",{children:(0,Nx.createInterpolateElement)(h?(0,Sn.sprintf)((0,Sn.__)("<strong>%s</strong> is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),h):(0,Sn.__)("Another user is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),{strong:(0,xr.jsx)("strong",{}),PreviewLink:(0,xr.jsx)(ua.ExternalLink,{href:m,children:(0,Sn.__)("preview")})})}),(0,xr.jsx)(wme,{}),(0,xr.jsx)("p",{children:(0,Sn.__)("If you take over, the other user will lose editing control to the post, but their changes will be saved.")})]}),(0,xr.jsxs)(ua.__experimentalHStack,{className:"editor-post-locked-modal__buttons",justify:"flex-end",children:[!a&&(0,xr.jsx)(ua.Button,{__next40pxDefaultSize:!0,variant:"tertiary",href:v,children:(0,Sn.__)("Take over")}),(0,xr.jsx)(ua.Button,{__next40pxDefaultSize:!0,variant:"primary",href:y,children:b})]})]})]})})}var xme=(0,ua.withFilters)("editor.PostLockedModal")(_me);var Tme=s(N(),1),Pme=s(H(),1),z5=s(U(),1);var Cme=s(U(),1);function ize({children:e}){let{hasPublishAction:t,isPublished:r}=(0,Cme.useSelect)(o=>{let{isCurrentPostPublished:n,getCurrentPost:i}=o(T);return{hasPublishAction:i()._links?.["wp:action-publish"]??!1,isPublished:n()}},[]);return r||!t?null:e}var j5=ize;var l9=s(x(),1);function sze(){let e=(0,z5.useSelect)(o=>o(T).getEditedPostAttribute("status"),[]),{editPost:t}=(0,z5.useDispatch)(T),r=()=>{t({status:e==="pending"?"draft":"pending"})};return(0,l9.jsx)(j5,{children:(0,l9.jsx)(Pme.CheckboxControl,{label:(0,Tme.__)("Pending review"),checked:e==="pending",onChange:r})})}var Eme=sze;var kme=s(V(),1),mv=s(H(),1),D0=s(N(),1),H5=s(U(),1),Rme=s(tn(),1),Ame=s(Q(),1);var da=s(x(),1);function aze(e){let t=(0,kme.renderToString)((0,da.jsxs)("div",{className:"editor-post-preview-button__interstitial-message",children:[(0,da.jsxs)(mv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96",children:[(0,da.jsx)(mv.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),(0,da.jsx)(mv.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})]}),(0,da.jsx)("p",{children:(0,D0.__)("Generating preview\u2026")})]}));t+=`
152 <style>
153 body {
154 margin: 0;
155 }
156 .editor-post-preview-button__interstitial-message {
157 display: flex;
158 flex-direction: column;
159 align-items: center;
160 justify-content: center;
161 height: 100vh;
162 width: 100vw;
163 }
164 @-webkit-keyframes paint {
165 0% {
166 stroke-dashoffset: 0;
167 }
168 }
169 @-moz-keyframes paint {
170 0% {
171 stroke-dashoffset: 0;
172 }
173 }
174 @-o-keyframes paint {
175 0% {
176 stroke-dashoffset: 0;
177 }
178 }
179 @keyframes paint {
180 0% {
181 stroke-dashoffset: 0;
182 }
183 }
184 .editor-post-preview-button__interstitial-message svg {
185 width: 192px;
186 height: 192px;
187 stroke: #555d66;
188 stroke-width: 0.75;
189 }
190 .editor-post-preview-button__interstitial-message svg .outer,
191 .editor-post-preview-button__interstitial-message svg .inner {
192 stroke-dasharray: 280;
193 stroke-dashoffset: 280;
194 -webkit-animation: paint 1.5s ease infinite alternate;
195 -moz-animation: paint 1.5s ease infinite alternate;
196 -o-animation: paint 1.5s ease infinite alternate;
197 animation: paint 1.5s ease infinite alternate;
198 }
199 p {
200 text-align: center;
201 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
202 }
203 </style>
204 `,t=(0,Rme.applyFilters)("editor.PostPreview.interstitialMarkup",t),e.write(t),e.title=(0,D0.__)("Generating preview\u2026"),e.close()}function _p({className:e,textContent:t,forceIsAutosaveable:r,role:o,onPreview:n}){let{postId:i,currentPostLink:a,previewLink:l,isSaveable:c,isViewable:u}=(0,H5.useSelect)(g=>{let v=g(T),S=g(Ame.store).getPostType(v.getCurrentPostType("type"))?.viewable??!1;return S?{postId:v.getCurrentPostId(),currentPostLink:v.getCurrentPostAttribute("link"),previewLink:v.getEditedPostPreviewLink(),isSaveable:v.isEditedPostSaveable(),isViewable:S}:{isViewable:S}},[]),{__unstableSaveForPreview:d}=(0,H5.useDispatch)(T);if(!u)return null;let f=`wp-preview-${i}`;return(0,da.jsx)(mv.Button,{variant:e?void 0:"tertiary",className:e||"editor-post-preview",href:l||a,target:f,accessibleWhenDisabled:!0,disabled:!c,onClick:async g=>{g.preventDefault();let v=window.open("",f);v.focus(),aze(v.document);let y=await d({forceIsAutosaveable:r});v.location=y,n?.()},role:o,size:"compact",children:t||(0,da.jsxs)(da.Fragment,{children:[(0,D0._x)("Preview","imperative verb"),(0,da.jsx)(Kt,{render:(0,da.jsx)("span",{}),children:(0,D0.__)("(opens in a new tab)")})]})})}var Mme=s(H(),1),Fme=s(V(),1),G5=s(U(),1),Dme=s(we(),1);var of=s(N(),1),Ime=s(U(),1),Ome=s(we(),1);function U5(){let e=(0,Ome.useViewportMatch)("medium","<"),{isPublished:t,isBeingScheduled:r,isSaving:o,isPublishing:n,hasPublishAction:i,isAutosaving:a,hasNonPostEntityChanges:l,postStatusHasChanged:c,postStatus:u,postType:d,isPostSavingLocked:f}=(0,Ime.useSelect)(m=>{let{isCurrentPostPublished:h,isEditedPostBeingScheduled:g,isSavingPost:v,isPublishingPost:y,getCurrentPost:b,getCurrentPostType:S,isAutosavingPost:w,getPostEdits:_,getEditedPostAttribute:C}=m(T);return{isPublished:h(),isBeingScheduled:g(),isSaving:v(),isPublishing:y(),hasPublishAction:b()._links?.["wp:action-publish"]??!1,postType:S(),isAutosaving:w(),hasNonPostEntityChanges:m(T).hasNonPostEntityChanges(),isPostSavingLocked:m(T).isPostSavingLocked(),postStatusHasChanged:!!_()?.status,postStatus:C("status")}},[]);return n?(0,of.__)("Publishing\u2026"):(t||r)&&o&&!a?(0,of.__)("Saving\u2026"):i?l&&!f||t||c&&!["future","publish"].includes(u)||!c&&u==="future"?(0,of.__)("Save"):r?(0,of.__)("Schedule"):(0,of.__)("Publish"):d===jr&&window?.__experimentalMediaEditor?(0,of.__)("Save"):e?(0,of.__)("Publish"):(0,of.__)("Submit for Review")}var L0=s(x(),1),Nme=()=>{},lze=class extends Fme.Component{constructor(e){super(e),this.createOnClick=this.createOnClick.bind(this),this.closeEntitiesSavedStates=this.closeEntitiesSavedStates.bind(this),this.state={entitiesSavedStatesCallback:!1}}createOnClick(e){return(...t)=>{let{hasNonPostEntityChanges:r,setEntitiesSavedStatesCallback:o}=this.props;return r&&o?(this.setState({entitiesSavedStatesCallback:()=>e(...t)}),o(()=>this.closeEntitiesSavedStates),Nme):e(...t)}}closeEntitiesSavedStates(e){let{postType:t,postId:r}=this.props,{entitiesSavedStatesCallback:o}=this.state;this.setState({entitiesSavedStatesCallback:!1},()=>{e&&e.some(n=>n.kind==="postType"&&n.name===t&&n.key===r)&&o()})}render(){let{forceIsDirty:e,hasPublishAction:t,isBeingScheduled:r,isOpen:o,isPostSavingLocked:n,isPublishable:i,isPublished:a,isSaveable:l,isSaving:c,isAutoSaving:u,isToggle:d,savePostStatus:f,onSubmit:m=Nme,onToggle:h,visibility:g,hasNonPostEntityChanges:v,isSavingNonPostEntityChanges:y,postStatus:b,postStatusHasChanged:S}=this.props,w=n||(c||!l||!i&&!e)&&(!v||y),_=n||(a||c||!l||!i&&!e)&&(!v||y),C="publish";S?C=b:t?g==="private"?C="private":r&&(C="future"):C="pending";let k=()=>{w||(m(),f(C))},A=()=>{_||h()},R={"aria-disabled":w,className:"editor-post-publish-button",isBusy:!u&&c,variant:"primary",onClick:this.createOnClick(k),"aria-haspopup":v?"dialog":void 0},I={"aria-disabled":_,"aria-expanded":o,className:"editor-post-publish-panel__toggle",isBusy:c&&a,variant:"primary",size:"compact",onClick:this.createOnClick(A),"aria-haspopup":v?"dialog":void 0},B=d?I:R;return(0,L0.jsx)(L0.Fragment,{children:(0,L0.jsx)(Mme.Button,{...B,className:`${B.className} editor-post-publish-button__button`,size:"compact",children:(0,L0.jsx)(U5,{})})})}},B0=(0,Dme.compose)([(0,G5.withSelect)(e=>{let{isSavingPost:t,isAutosavingPost:r,isEditedPostBeingScheduled:o,getEditedPostVisibility:n,isCurrentPostPublished:i,isEditedPostSaveable:a,isEditedPostPublishable:l,isPostSavingLocked:c,getCurrentPost:u,getCurrentPostType:d,getCurrentPostId:f,hasNonPostEntityChanges:m,isSavingNonPostEntityChanges:h,getEditedPostAttribute:g,getPostEdits:v}=e(T);return{isSaving:t(),isAutoSaving:r(),isBeingScheduled:o(),visibility:n(),isSaveable:a(),isPostSavingLocked:c(),isPublishable:l(),isPublished:i(),hasPublishAction:u()._links?.["wp:action-publish"]??!1,postType:d(),postId:f(),postStatus:g("status"),postStatusHasChanged:v()?.status,hasNonPostEntityChanges:m(),isSavingNonPostEntityChanges:h()}}),(0,G5.withDispatch)(e=>{let{editPost:t,savePost:r}=e(T);return{savePostStatus:o=>{t({status:o},{undoIgnore:!0}),r()}}})])(lze);var sO=s(N(),1),q0=s(V(),1),_v=s(H(),1),aO=s(U(),1),Pp=s(we(),1);var Mpe=s(Q(),1);var Zl=s(N(),1),zx=s(H(),1),_pe=s(U(),1);var xpe=s(vo(),1),Cpe=s(Q(),1),Tpe=s(St(),1);var V0=s(N(),1),Lme=s(V(),1),j0=s(H(),1),Bme=s(we(),1),Y5=s(U(),1),Vme=s(ce(),1);var pv=s(N(),1),W5=[{label:(0,pv.__)("Public"),value:"public",description:(0,pv.__)("Visible to everyone.")},{label:(0,pv.__)("Private"),value:"private",description:(0,pv.__)("Only visible to site admins and editors.")},{label:(0,pv.__)("Password protected"),value:"password",description:(0,pv.__)("Only visible to those who know the password.")}];var hv=s(x(),1);function Fx({onClose:e}){let t=(0,Bme.useInstanceId)(Fx),{status:r,visibility:o,password:n}=(0,Y5.useSelect)(d=>({status:d(T).getEditedPostAttribute("status"),visibility:d(T).getEditedPostVisibility(),password:d(T).getEditedPostAttribute("password")})),{editPost:i}=(0,Y5.useDispatch)(T),[a,l]=(0,Lme.useState)(!!n);function c(d){i({public:{status:o==="private"?"draft":r,password:""},private:{status:"private",password:""},password:{status:o==="private"?"draft":r,password:n||""}}[d]),l(d==="password")}let u=d=>{i({password:d})};return(0,hv.jsxs)("div",{className:"editor-post-visibility",children:[(0,hv.jsx)(Vme.__experimentalInspectorPopoverHeader,{title:(0,V0.__)("Visibility"),help:(0,V0.__)("Control how this post is viewed."),onClose:e}),(0,hv.jsxs)(j0.__experimentalVStack,{spacing:4,children:[(0,hv.jsx)(j0.RadioControl,{label:(0,V0.__)("Visibility"),hideLabelFromVision:!0,options:W5,selected:a?"password":o,onChange:c}),a&&(0,hv.jsx)(j0.TextControl,{label:(0,V0.__)("Password"),onChange:u,value:n,placeholder:(0,V0.__)("Use a secure password"),type:"text",id:`editor-post-visibility__password-input-${t}`,__next40pxDefaultSize:!0,maxLength:255})]})]})}var jme=s(U(),1);function q5(){return c9()}function c9(){let e=(0,jme.useSelect)(t=>t(T).getEditedPostVisibility(),[]);return W5.find(t=>t.value===e)?.label}var zme=s(go(),1),Hme=s(N(),1),Dx=s(U(),1),Ume=s(ce(),1),K5=s(V(),1),Gme=s(Q(),1);var u9=s(x(),1),{PrivatePublishDateTimePicker:cze}=Y(Ume.privateApis);function z0(e){return(0,u9.jsx)(d9,{...e,showPopoverHeaderActions:!0,isCompact:!1})}function d9({onClose:e,showPopoverHeaderActions:t,isCompact:r}){let{postDate:o,postType:n}=(0,Dx.useSelect)(h=>({postDate:h(T).getEditedPostAttribute("date"),postType:h(T).getCurrentPostType()}),[]),{editPost:i}=(0,Dx.useDispatch)(T),a=h=>i({date:h}),[l,c]=(0,K5.useState)(Y_(new Date(o))),u=(0,Dx.useSelect)(h=>h(Gme.store).getEntityRecords("postType",n,{status:"publish,future",after:Y_(l).toISOString(),before:MQ(l).toISOString(),exclude:[h(T).getCurrentPostId()],per_page:100,_fields:"id,date"}),[l,n]),d=(0,K5.useMemo)(()=>(u||[]).map(({date:h})=>({date:new Date(h)})),[u]),f=(0,zme.getSettings)(),m=/a(?!\\)/i.test(f.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,u9.jsx)(cze,{currentDate:o,onChange:a,is12Hour:m,dateOrder:(0,Hme._x)("dmy","date order"),events:d,onMonthPreviewed:h=>c($Q(h)),onClose:e,isCompact:r,showPopoverHeaderActions:t})}var es=s(N(),1),nl=s(go(),1),Yme=s(U(),1);function H0(e){return U0(e)}function U0({full:e=!1}={}){let{date:t,isFloating:r}=(0,Yme.useSelect)(o=>({date:o(T).getEditedPostAttribute("date"),isFloating:o(T).isEditedPostDateFloating()}),[]);return e?qme(t):uze(t,{isFloating:r})}function qme(e){let t=(0,nl.getDate)(e),r=dze(),o=(0,nl.dateI18n)((0,es._x)("F j, Y g:i\xA0a","post schedule full date format"),t);return(0,es.isRTL)()?`${r} ${o}`:`${o} ${r}`}function uze(e,{isFloating:t=!1,now:r=new Date}={}){if(!e||t)return(0,es.__)("Immediately");if(!fze(r))return qme(e);let o=(0,nl.getDate)(e);if(Wme(o,r))return(0,es.sprintf)((0,es.__)("Today at %s"),(0,nl.dateI18n)((0,es._x)("g:i\xA0a","post schedule time format"),o));let n=new Date(r);return n.setDate(n.getDate()+1),Wme(o,n)?(0,es.sprintf)((0,es.__)("Tomorrow at %s"),(0,nl.dateI18n)((0,es._x)("g:i\xA0a","post schedule time format"),o)):o.getFullYear()===r.getFullYear()?(0,nl.dateI18n)((0,es._x)("F j g:i\xA0a","post schedule date format without year"),o):(0,nl.dateI18n)((0,es._x)("F j, Y g:i\xA0a","post schedule full date format"),o)}function dze(){let{timezone:e}=(0,nl.getSettings)();return e.abbr&&isNaN(Number(e.abbr))?e.abbr:`UTC${e.offset<0?"":"+"}${e.offsetFormatted}`}function fze(e){let{timezone:t}=(0,nl.getSettings)(),r=Number(t.offset),o=-1*(e.getTimezoneOffset()/60);return r===o}function Wme(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}var bv=s(N(),1),ope=s(V(),1),h9=s(U(),1),npe=s(H(),1),J5=s(Q(),1);var Yn=s(N(),1),yv=s(V(),1),G0=s(H(),1),vv=s(U(),1),X5=s(Q(),1),Jme=s(we(),1),$me=s(Wv(),1),epe=s(wt(),1);var Z5=s(H(),1),Kme=s(U(),1),Zme=s(Q(),1);var gv=s(x(),1),mze=3,pze={per_page:10,orderby:"count",order:"desc",hide_empty:!0,_fields:"id,name,count",context:"view"};function Xme({onSelect:e,taxonomy:t}){let{_terms:r,showTerms:o}=(0,Kme.useSelect)(i=>{let a=i(Zme.store).getEntityRecords("taxonomy",t.slug,pze);return{_terms:a,showTerms:a?.length>=mze}},[t.slug]);if(!o)return null;let n=sde(r);return(0,gv.jsxs)("div",{className:"editor-post-taxonomies__flat-term-most-used",children:[(0,gv.jsx)(Z5.BaseControl.VisualLabel,{as:"h3",className:"editor-post-taxonomies__flat-term-most-used-label",children:t.labels.most_used}),(0,gv.jsx)("ul",{role:"list",className:"editor-post-taxonomies__flat-term-most-used-list",children:n.map(i=>(0,gv.jsx)("li",{children:(0,gv.jsx)(Z5.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>e(i),children:i.name})},i.id))})]})}var Lx=s(x(),1),f9=[],tpe=100,Qme={per_page:tpe,_fields:"id,name",context:"view"},rpe=(e,t)=>w0(e).toLowerCase()===w0(t).toLowerCase(),m9=(e,t)=>e.map(r=>t.find(o=>rpe(o.name,r))?.id).filter(r=>r!==void 0);function p9({slug:e}){let[t,r]=(0,yv.useState)([]),[o,n]=(0,yv.useState)(""),i=(0,Jme.useDebounce)(n,500),{terms:a,termIds:l,taxonomy:c,hasAssignAction:u,hasCreateAction:d,hasResolvedTerms:f}=(0,vv.useSelect)(B=>{let{getCurrentPost:E,getEditedPostAttribute:P}=B(T),{getEntityRecords:L,getEntityRecord:j,hasFinishedResolution:z}=B(X5.store),W=E(),O=j("root","taxonomy",e),M=O?P(O.rest_base):f9,D={...Qme,include:M?.join(","),per_page:-1};return{hasCreateAction:O?W._links?.["wp:action-create-"+O.rest_base]??!1:!1,hasAssignAction:O?W._links?.["wp:action-assign-"+O.rest_base]??!1:!1,taxonomy:O,termIds:M,terms:M?.length?L("taxonomy",e,D):f9,hasResolvedTerms:z("getEntityRecords",["taxonomy",e,D])}},[e]),{searchResults:m}=(0,vv.useSelect)(B=>{let{getEntityRecords:E}=B(X5.store);return{searchResults:o?E("taxonomy",e,{...Qme,search:o}):f9}},[o,e]);(0,yv.useEffect)(()=>{if(f){let B=(a??[]).map(E=>w0(E.name));r(B)}},[a,f]);let h=(0,yv.useMemo)(()=>(m??[]).map(B=>w0(B.name)),[m]),{editPost:g}=(0,vv.useDispatch)(T),{saveEntityRecord:v}=(0,vv.useDispatch)(X5.store),{createErrorNotice:y}=(0,vv.useDispatch)(epe.store);if(!u)return null;async function b(B){try{let E=await v("taxonomy",e,B,{throwOnError:!0});return M7(E)}catch(E){if(E.code!=="term_exists")throw E;return{id:E.data.term_id,name:B.name}}}function S(B){g({[c.rest_base]:B})}function w(B){let E=[...a??[],...m??[]],P=B.reduce((j,z)=>(j.some(W=>W.toLowerCase()===z.toLowerCase())||j.push(z),j),[]),L=P.filter(j=>!E.find(z=>rpe(z.name,j)));if(r(P),L.length===0){S(m9(P,E));return}d&&Promise.all(L.map(j=>b({name:j}))).then(j=>{let z=E.concat(j);S(m9(P,z))}).catch(j=>{y(j.message,{type:"snackbar"}),S(m9(P,E))})}function _(B){if(l.includes(B.id))return;let E=[...l,B.id],P=e==="post_tag"?(0,Yn.__)("Tag"):(0,Yn.__)("Term"),L=(0,Yn.sprintf)((0,Yn._x)("%s added","term"),c?.labels?.singular_name??P);(0,$me.speak)(L,"assertive"),S(E)}let C=c?.labels?.add_new_item??(e==="post_tag"?(0,Yn.__)("Add Tag"):(0,Yn.__)("Add Term")),k=c?.labels?.singular_name??(e==="post_tag"?(0,Yn.__)("Tag"):(0,Yn.__)("Term")),A=(0,Yn.sprintf)((0,Yn._x)("%s added","term"),k),R=(0,Yn.sprintf)((0,Yn._x)("%s removed","term"),k),I=(0,Yn.sprintf)((0,Yn._x)("Remove %s","term"),k);return(0,Lx.jsxs)(G0.__experimentalVStack,{spacing:4,children:[(0,Lx.jsx)(G0.FormTokenField,{__next40pxDefaultSize:!0,value:t,suggestions:h,onChange:w,onInputChange:i,maxSuggestions:tpe,label:C,messages:{added:A,removed:R,remove:I}}),(0,Lx.jsx)(Xme,{taxonomy:c,onSelect:_})]})}var Q5=(0,G0.withFilters)("editor.PostTaxonomyType")(p9);var wv=s(x(),1),hze=()=>{let e=(0,h9.useSelect)(n=>n(J5.store).getTaxonomy("post_tag")?.labels,[]),t=e?.add_new_item??(0,bv.__)("Add tag"),r=e?.name??(0,bv.__)("Tags"),o=[(0,bv.__)("Suggestion:"),(0,wv.jsx)("span",{className:"editor-post-publish-panel__link",children:t},"label")];return(0,wv.jsxs)(npe.PanelBody,{initialOpen:!1,title:o,children:[(0,wv.jsx)("p",{children:(0,bv.sprintf)((0,bv.__)("%s help users and search engines navigate your site and find your content. Add a few keywords to describe your post."),r)}),(0,wv.jsx)(Q5,{slug:"post_tag"})]})},gze=()=>{let{postHasTags:e,siteHasTags:t,isPostTypeSupported:r}=(0,h9.useSelect)(n=>{let i=n(T).getCurrentPostType(),a=n(J5.store).getEntityRecord("root","taxonomy","post_tag"),l=a?.types?.includes(i),c=a!==void 0,u=a&&n(T).getEditedPostAttribute(a.rest_base),d=l?!!n(J5.store).getEntityRecords("taxonomy","post_tag",{per_page:1})?.length:!1;return{postHasTags:!!u?.length,siteHasTags:d,isPostTypeSupported:c&&l}},[]),[o]=(0,ope.useState)(e);return!r||!t||o?null:(0,wv.jsx)(hze,{})},ipe=gze;var $5=s(H(),1),eO=s(U(),1),Sv=s(N(),1),spe=s(Q(),1);var xp=s(x(),1),vze=(e,t)=>Ax.filter(o=>e?.includes(o.id)).find(o=>o.id===t),yze=({suggestedPostFormat:e,suggestionText:t,onUpdatePostFormat:r})=>(0,xp.jsx)($5.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>r(e),children:t});function ape(){let{currentPostFormat:e,suggestion:t}=(0,eO.useSelect)(i=>{let{getEditedPostAttribute:a,getSuggestedPostFormat:l}=i(T),c=i(spe.store).getThemeSupports().formats??[];return{currentPostFormat:a("format"),suggestion:vze(c,l())}},[]),{editPost:r}=(0,eO.useDispatch)(T),o=i=>r({format:i}),n=[(0,Sv.__)("Suggestion:"),(0,xp.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Sv.__)("Use a post format")},"label")];return!t||t.id===e?null:(0,xp.jsxs)($5.PanelBody,{initialOpen:!1,title:n,children:[(0,xp.jsx)("p",{children:(0,Sv.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")}),(0,xp.jsx)("p",{children:(0,xp.jsx)(yze,{onUpdatePostFormat:o,suggestedPostFormat:t.id,suggestionText:(0,Sv.sprintf)((0,Sv.__)('Apply the "%1$s" format.'),t.caption)})})]})}var rO=s(N(),1),ppe=s(U(),1),hpe=s(H(),1),y9=s(Q(),1),oO=s(V(),1);var xn=s(N(),1),nf=s(V(),1),dpe=s(wt(),1),Dr=s(H(),1),W0=s(U(),1),fpe=s(we(),1),Bx=s(Q(),1),g9=s(Wv(),1),mpe=s(St(),1);var _n=s(x(),1),{normalizeTextString:lpe}=Y(Dr.privateApis),{RECEIVE_INTERMEDIATE_RESULTS:bze}=Y(Bx.privateApis),cpe={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view",[bze]:!0},wze=8,upe=[];function Sze(e,t){let r=i=>t.indexOf(i.id)!==-1?!0:i.children===void 0?!1:i.children.map(r).filter(a=>a).length>0,o=(i,a)=>{let l=r(i),c=r(a);return l===c?0:l&&!c?-1:!l&&c?1:0},n=[...e];return n.sort(o),n}function _ze(e,t,r){return e.find(o=>(!o.parent&&!t||parseInt(o.parent)===parseInt(t))&&o.name.toLowerCase()===r.toLowerCase())}function xze(e){let t=r=>{if(e==="")return r;let o={...r};return o.children.length>0&&(o.children=o.children.map(t).filter(n=>n)),lpe(o.name).indexOf(lpe(e))!==-1||o.children.length>0?o:!1};return t}function v9({slug:e}){let[t,r]=(0,nf.useState)(!1),[o,n]=(0,nf.useState)(""),[i,a]=(0,nf.useState)(""),[l,c]=(0,nf.useState)(!1),[u,d]=(0,nf.useState)(""),[f,m]=(0,nf.useState)([]),h=(0,fpe.useDebounce)(g9.speak,500),{hasCreateAction:g,hasAssignAction:v,terms:y,loading:b,availableTerms:S,taxonomy:w}=(0,W0.useSelect)(fe=>{let{getCurrentPost:X,getEditedPostAttribute:ee}=fe(T),{getEntityRecord:pe,getEntityRecords:ve,isResolving:Ie}=fe(Bx.store),et=pe("root","taxonomy",e),it=X();return{hasCreateAction:et?!!it._links?.["wp:action-create-"+et.rest_base]:!1,hasAssignAction:et?!!it._links?.["wp:action-assign-"+et.rest_base]:!1,terms:et?ee(et.rest_base):upe,loading:Ie("getEntityRecords",["taxonomy",e,cpe]),availableTerms:ve("taxonomy",e,cpe)||upe,taxonomy:et}},[e]),{editPost:_}=(0,W0.useDispatch)(T),{saveEntityRecord:C}=(0,W0.useDispatch)(Bx.store),k=(0,nf.useMemo)(()=>Sze(UI(S),y),[S]),{createErrorNotice:A}=(0,W0.useDispatch)(dpe.store);if(!v)return null;let R=fe=>C("taxonomy",e,fe,{throwOnError:!0}),I=fe=>{_({[w.rest_base]:fe})},B=fe=>{let ee=y.includes(fe)?y.filter(pe=>pe!==fe):[...y,fe];I(ee)},E=fe=>{n(fe)},P=fe=>{a(fe)},L=()=>{c(!l)},j=async fe=>{if(fe.preventDefault(),o===""||t)return;let X=_ze(S,i,o);if(X){y.some(Ie=>Ie===X.id)||I([...y,X.id]),n(""),a("");return}r(!0);let ee;try{ee=await R({name:o,parent:i||void 0})}catch(Ie){A(Ie.message,{type:"snackbar"});return}let pe=e==="category"?(0,xn.__)("Category"):(0,xn.__)("Term"),ve=(0,xn.sprintf)((0,xn._x)("%s added","term"),w?.labels?.singular_name??pe);(0,g9.speak)(ve,"assertive"),r(!1),n(""),a(""),I([...y,ee.id])},z=fe=>{let X=k.map(xze(fe)).filter(Ie=>Ie),ee=Ie=>{let et=0;for(let it=0;it<Ie.length;it++)et++,Ie[it].children!==void 0&&(et+=ee(Ie[it].children));return et};d(fe),m(X);let pe=ee(X),ve=(0,xn.sprintf)((0,xn._n)("%d result found.","%d results found.",pe),pe);h(ve,"assertive")},W=fe=>fe.map(X=>(0,_n.jsxs)("div",{className:"editor-post-taxonomies__hierarchical-terms-choice",children:[(0,_n.jsx)(Dr.CheckboxControl,{checked:y.indexOf(X.id)!==-1,onChange:()=>{let ee=parseInt(X.id,10);B(ee)},label:(0,mpe.decodeEntities)(X.name)}),!!X.children.length&&(0,_n.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices",children:W(X.children)})]},X.id)),O=(fe,X,ee)=>w?.labels?.[fe]??(e==="category"?X:ee),M=O("add_new_item",(0,xn.__)("Add Category"),(0,xn.__)("Add Term")),D=O("new_item_name",(0,xn.__)("Add Category"),(0,xn.__)("Add Term")),G=O("parent_item",(0,xn.__)("Parent Category"),(0,xn.__)("Parent Term")),q=`\u2014 ${G} \u2014`,Z=M,te=w?.labels?.search_items??(0,xn.__)("Search Terms"),ie=w?.name??(0,xn.__)("Terms"),Se=S.length>=wze;return(0,_n.jsxs)(Dr.Flex,{direction:"column",gap:"4",children:[Se&&!b&&(0,_n.jsx)(Dr.SearchControl,{__next40pxDefaultSize:!0,label:te,placeholder:te,value:u,onChange:z}),b&&(0,_n.jsx)(Dr.Flex,{justify:"center",style:{height:"40px"},children:(0,_n.jsx)(Dr.Spinner,{})}),(0,_n.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",tabIndex:"0",role:"group","aria-label":ie,children:W(u!==""?f:k)}),!b&&g&&(0,_n.jsx)(Dr.FlexItem,{children:(0,_n.jsx)(Dr.Button,{__next40pxDefaultSize:!0,onClick:L,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":l,variant:"link",children:M})}),l&&(0,_n.jsx)("form",{onSubmit:j,children:(0,_n.jsxs)(Dr.Flex,{direction:"column",gap:"4",children:[(0,_n.jsx)(Dr.TextControl,{__next40pxDefaultSize:!0,className:"editor-post-taxonomies__hierarchical-terms-input",label:D,value:o,onChange:E,required:!0}),!!S.length&&(0,_n.jsx)(Dr.TreeSelect,{__next40pxDefaultSize:!0,label:G,noOptionLabel:q,onChange:P,selectedId:i,tree:k}),(0,_n.jsx)(Dr.FlexItem,{children:(0,_n.jsx)(Dr.Button,{__next40pxDefaultSize:!0,variant:"secondary",type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit",children:Z})})]})})]})}var tO=(0,Dr.withFilters)("editor.PostTaxonomyType")(v9);var Y0=s(x(),1);function Cze(){let{hasNoCategory:e,hasSiteCategories:t}=(0,ppe.useSelect)(i=>{let a=i(T).getCurrentPostType(),{canUser:l,getEntityRecord:c}=i(y9.store),u=c("root","taxonomy","category"),d=l("read",{kind:"root",name:"site"})?c("root","site")?.default_category:void 0,f=d?c("taxonomy","category",d):void 0,m=u&&u.types.some(y=>y===a),h=u&&i(T).getEditedPostAttribute(u.rest_base),g=m?!!i(y9.store).getEntityRecords("taxonomy","category",{exclude:[d],per_page:1})?.length:!1;return{hasNoCategory:!!u&&!!f&&m&&(h?.length===0||h?.length===1&&f?.id===h[0]),hasSiteCategories:g}},[]),[r,o]=(0,oO.useState)(!1);if((0,oO.useEffect)(()=>{e&&o(!0)},[e]),!r||!t)return null;let n=[(0,rO.__)("Suggestion:"),(0,Y0.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,rO.__)("Assign a category")},"label")];return(0,Y0.jsxs)(hpe.PanelBody,{initialOpen:!1,title:n,children:[(0,Y0.jsx)("p",{children:(0,rO.__)("Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.")}),(0,Y0.jsx)(tO,{slug:"category"})]})}var gpe=Cze;var du=s(H(),1),jx=s(U(),1),Cp=s(N(),1),Vx=s(ce(),1),nO=s(V(),1),bpe=s(DS(),1);var vpe=s(vo(),1);function Tze(e){let t=new Set;return Object.fromEntries(e.map(r=>{let o=(0,vpe.getFilename)(r),n="";if(o){let i=o.split(".");i.length>1&&i.pop(),n=i.join(".")}return n||(n=Kv()),t.has(n)&&(n=`${n}-${Kv()}`),t.add(n),[r,n]}))}function ype(e){return Object.fromEntries(Object.entries(Tze(e)).map(([t,r])=>{let o=window.fetch(t.includes("?")?t:t+"?").then(n=>n.blob()).then(n=>new File([n],`${r}.png`,{type:n.type}));return[t,o]}))}var il=s(x(),1);function wpe(e){let t=[];return e.forEach(r=>{t.push(r),t.push(...wpe(r.innerBlocks))}),t}function Pze(e){if(e.name==="core/image"||e.name==="core/cover")return e.attributes.url&&!e.attributes.id;if(e.name==="core/media-text")return e.attributes.mediaUrl&&!e.attributes.mediaId}function b9(e){if(e.name==="core/image"||e.name==="core/cover"){let{url:t,alt:r,id:o}=e.attributes;return{url:t,alt:r,id:o}}if(e.name==="core/media-text"){let{mediaUrl:t,mediaAlt:r,mediaId:o}=e.attributes;return{url:t,alt:r,id:o}}return{}}function Eze({clientId:e,alt:t,url:r}){let{selectBlock:o}=(0,jx.useDispatch)(Vx.store);return(0,il.jsx)(du.__unstableMotion.img,{tabIndex:0,role:"button","aria-label":(0,Cp.__)("Select image block."),onClick:()=>{o(e)},onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&(o(e),n.preventDefault())},alt:t,src:r,animate:{opacity:1},exit:{opacity:0,scale:0},style:{width:"32px",height:"32px",objectFit:"cover",borderRadius:"2px",cursor:"var(--wpds-cursor-control, pointer)"},whileHover:{scale:1.08}},e)}function Spe(){let[e,t]=(0,nO.useState)(!1),[r,o]=(0,nO.useState)(!1),[n,i]=(0,nO.useState)(!1),{editorBlocks:a,mediaUpload:l}=(0,jx.useSelect)(h=>({editorBlocks:h(Vx.store).getBlocks(),mediaUpload:h(Vx.store).getSettings().mediaUpload}),[]),c=wpe(a).filter(h=>Pze(h)),{updateBlockAttributes:u}=(0,jx.useDispatch)(Vx.store);if(!l||!c.length)return null;let d=[(0,Cp.__)("Suggestion:"),(0,il.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Cp.__)("External media")},"label")];function f(h,g){(h.name==="core/image"||h.name==="core/cover")&&u(h.clientId,{id:g.id,url:g.url}),h.name==="core/media-text"&&u(h.clientId,{mediaId:g.id,mediaUrl:g.url})}function m(){t(!0),i(!1);let h=new Set(c.map(v=>{let{url:y}=b9(v);return y})),g=Object.fromEntries(Object.entries(ype([...h])).map(([v,y])=>{let b=y.then(S=>new Promise((w,_)=>{l({filesList:[S],onFileChange:([C])=>{(0,bpe.isBlobURL)(C.url)||w(C)},onError(){_()}})}));return[v,b]}));Promise.allSettled(c.map(v=>{let{url:y}=b9(v);return g[y].then(b=>f(v,b)).then(()=>o(!0)).catch(()=>i(!0))})).finally(()=>{t(!1)})}return(0,il.jsxs)(du.PanelBody,{initialOpen:!0,title:d,children:[(0,il.jsx)("p",{children:(0,Cp.__)("Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.")}),(0,il.jsxs)("div",{style:{display:"inline-flex",flexWrap:"wrap",gap:"8px"},children:[(0,il.jsx)(du.__unstableAnimatePresence,{onExitComplete:()=>o(!1),children:c.map(h=>{let{url:g,alt:v}=b9(h);return(0,il.jsx)(Eze,{clientId:h.clientId,url:g,alt:v},h.clientId)})}),e||r?(0,il.jsx)(du.Spinner,{}):(0,il.jsx)(du.Button,{size:"compact",variant:"primary",onClick:m,children:(0,Cp._x)("Upload","verb")})]}),n&&(0,il.jsx)("p",{children:(0,Cp.__)("Upload failed, try again.")})]})}var lr=s(x(),1);function kze({children:e}){let{isBeingScheduled:t,isRequestingSiteIcon:r,hasPublishAction:o,siteIconUrl:n,siteTitle:i,siteHome:a}=(0,_pe.useSelect)(d=>{let{getCurrentPost:f,isEditedPostBeingScheduled:m}=d(T),{getEntityRecord:h,isResolving:g}=d(Cpe.store),v=h("root","__unstableBase",void 0)||{};return{hasPublishAction:f()._links?.["wp:action-publish"]??!1,isBeingScheduled:m(),isRequestingSiteIcon:g("getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:v.site_icon_url,siteTitle:v.name,siteHome:v.home&&(0,xpe.filterURLForDisplay)(v.home)}},[]),l=(0,lr.jsx)(zx.Icon,{className:"components-site-icon",size:"36px",icon:IF});n&&(l=(0,lr.jsx)("img",{alt:(0,Zl.__)("Site Icon"),className:"components-site-icon",src:n})),r&&(l=null);let c,u;return o?t?(c=(0,Zl.__)("Are you ready to schedule?"),u=(0,Zl.__)("Your work will be published at the specified date and time.")):(c=(0,Zl.__)("Are you ready to publish?"),u=(0,Zl.__)("Double-check your settings before publishing.")):(c=(0,Zl.__)("Are you ready to submit for review?"),u=(0,Zl.__)("Your work will be reviewed and then approved.")),(0,lr.jsxs)("div",{className:"editor-post-publish-panel__prepublish",children:[(0,lr.jsx)("div",{children:(0,lr.jsx)("strong",{children:c})}),(0,lr.jsx)("p",{children:u}),(0,lr.jsxs)("div",{className:"components-site-card",children:[l,(0,lr.jsxs)("div",{className:"components-site-info",children:[(0,lr.jsx)("span",{className:"components-site-name",children:(0,Tpe.decodeEntities)(i)||(0,Zl.__)("(Untitled)")}),(0,lr.jsx)("span",{className:"components-site-home",children:a})]})]}),(0,lr.jsx)(Spe,{}),o&&(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(zx.PanelBody,{initialOpen:!1,title:[(0,Zl.__)("Visibility:"),(0,lr.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,lr.jsx)(q5,{})},"label")],children:(0,lr.jsx)(Fx,{})}),(0,lr.jsx)(zx.PanelBody,{initialOpen:!1,title:[(0,Zl.__)("Publish:"),(0,lr.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,lr.jsx)(H0,{})},"label")],children:(0,lr.jsx)(z0,{})})]}),(0,lr.jsx)(ape,{}),(0,lr.jsx)(ipe,{}),(0,lr.jsx)(gpe,{}),e]})}var Ppe=kze;var Ql=s(H(),1),Xl=s(N(),1),Tp=s(V(),1),Rpe=s(U(),1),iO=s(vo(),1),Ape=s(St(),1),Ipe=s(we(),1),Ope=s(Q(),1);var po=s(x(),1),Epe="%postname%",kpe="%pagename%",Rze=e=>{let{slug:t}=e;return e.permalink_template.includes(Epe)?e.permalink_template.replace(Epe,t):e.permalink_template.includes(kpe)?e.permalink_template.replace(kpe,t):e.permalink_template};function Aze({text:e}){let[t,r]=(0,Tp.useState)(!1),o=(0,Tp.useRef)(),n=(0,Ipe.useCopyToClipboard)(e,()=>{r(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(!1)},4e3)});return(0,Tp.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]),(0,po.jsx)(Ql.Button,{__next40pxDefaultSize:!0,variant:"secondary",ref:n,children:t?(0,Xl.__)("Copied!"):(0,Xl.__)("Copy")})}function Npe({focusOnMount:e,children:t}){let{post:r,postType:o,isScheduled:n}=(0,Rpe.useSelect)(m=>{let{getEditedPostAttribute:h,getCurrentPost:g,isCurrentPostScheduled:v}=m(T),{getPostType:y}=m(Ope.store);return{post:g(),postType:y(h("type")),isScheduled:v()}},[]),i=o?.labels?.singular_name,a=o?.labels?.view_item,l=o?.labels?.add_new_item,c=r.status==="future"?Rze(r):r.link,u=(0,iO.addQueryArgs)("post-new.php",{post_type:r.type}),d=(0,Tp.useCallback)(m=>{e&&m&&m.focus()},[e]),f=n?(0,po.jsxs)(po.Fragment,{children:[(0,Xl.__)("is now scheduled. It will go live on")," ",(0,po.jsx)(H0,{}),"."]}):(0,Xl.__)("is now live.");return(0,po.jsxs)("div",{className:"post-publish-panel__postpublish",children:[(0,po.jsxs)(Ql.PanelBody,{className:"post-publish-panel__postpublish-header",children:[(0,po.jsx)(Ql.ExternalLink,{ref:d,href:c,children:(0,Ape.decodeEntities)(r.title)||(0,Xl.__)("(no title)")})," ",f]}),(0,po.jsxs)(Ql.PanelBody,{children:[(0,po.jsx)("p",{className:"post-publish-panel__postpublish-subheader",children:(0,po.jsx)("strong",{children:(0,Xl.__)("What\u2019s next?")})}),(0,po.jsxs)("div",{className:"post-publish-panel__postpublish-post-address-container",children:[(0,po.jsx)(Ql.TextControl,{__next40pxDefaultSize:!0,className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:(0,Xl.sprintf)((0,Xl.__)("%s address"),i),value:(0,iO.safeDecodeURIComponent)(c),onFocus:m=>m.target.select()}),(0,po.jsx)("div",{className:"post-publish-panel__postpublish-post-address__copy-button-wrap",children:(0,po.jsx)(Aze,{text:c})})]}),(0,po.jsxs)("div",{className:"post-publish-panel__postpublish-buttons",children:[!n&&(0,po.jsxs)(Ql.Button,{variant:"primary",href:c,__next40pxDefaultSize:!0,icon:ss,iconPosition:"right",target:"_blank",children:[a,(0,po.jsx)(Kt,{render:(0,po.jsx)("span",{}),children:(0,Xl.__)("(opens in a new tab)")})]}),(0,po.jsx)(Ql.Button,{variant:n?"primary":"secondary",__next40pxDefaultSize:!0,href:u,children:l})]})]}),t]})}var jo=s(x(),1);function lO({forceIsDirty:e,onClose:t,PostPublishExtension:r,PrePublishExtension:o,...n}){let{hasPublishAction:i,isPostTypeViewable:a,isBeingScheduled:l,isDirty:c,isPublished:u,isPublishSidebarEnabled:d,isSaving:f,isSavingNonPostEntityChanges:m,isScheduled:h,currentPostId:g}=(0,aO.useSelect)(B=>{let{getPostType:E}=B(Mpe.store),{getCurrentPost:P,getCurrentPostId:L,getEditedPostAttribute:j,isCurrentPostPublished:z,isCurrentPostScheduled:W,isEditedPostBeingScheduled:O,isEditedPostDirty:M,isAutosavingPost:D,isSavingPost:G,isSavingNonPostEntityChanges:q,isPublishSidebarEnabled:Z}=B(T),te=E(j("type"));return{hasPublishAction:P()._links?.["wp:action-publish"]??!1,isPostTypeViewable:te?.viewable,isBeingScheduled:O(),isDirty:M(),isPublished:z(),isPublishSidebarEnabled:Z(),isSaving:G()&&!D(),isSavingNonPostEntityChanges:q(),isScheduled:W(),currentPostId:L()}},[]),{disablePublishSidebar:v,enablePublishSidebar:y}=(0,aO.useDispatch)(T),b=(0,q0.useRef)(null),S=(0,Pp.useMergeRefs)([(0,Pp.useFocusReturn)(),(0,Pp.useConstrainedTabbing)()]);(0,q0.useEffect)(()=>{b.current?.focus()},[]);let w=(0,q0.useRef)(g),_=(0,Pp.useEvent)(t);(0,q0.useEffect)(()=>{let B=g!==w.current;w.current=g,(B||u&&!f&&c)&&_()},[u,f,c,g,_]);function C(){d?v():y()}function k(){(!i||!a)&&t()}let A=u||h&&l,R=!A&&!f,I=A&&!f;return(0,jo.jsxs)("div",{ref:S,tabIndex:-1,className:"editor-post-publish-panel",...n,children:[(0,jo.jsx)("div",{className:"editor-post-publish-panel__header",children:I?(0,jo.jsx)(_v.Button,{size:"compact",onClick:t,icon:rn,label:(0,sO.__)("Close panel")}):(0,jo.jsxs)(jo.Fragment,{children:[(0,jo.jsx)("div",{className:"editor-post-publish-panel__header-cancel-button",children:(0,jo.jsx)(_v.Button,{ref:b,accessibleWhenDisabled:!0,disabled:m,onClick:t,variant:"secondary",size:"compact",children:(0,sO.__)("Cancel")})}),(0,jo.jsx)("div",{className:"editor-post-publish-panel__header-publish-button",children:(0,jo.jsx)(B0,{onSubmit:k,forceIsDirty:e})})]})}),(0,jo.jsxs)("div",{className:"editor-post-publish-panel__content",children:[R&&(0,jo.jsx)(Ppe,{children:o&&(0,jo.jsx)(o,{})}),I&&(0,jo.jsx)(Npe,{focusOnMount:!0,children:r&&(0,jo.jsx)(r,{})}),f&&(0,jo.jsx)(_v.Spinner,{})]}),(0,jo.jsx)("div",{className:"editor-post-publish-panel__footer",children:(0,jo.jsx)(_v.CheckboxControl,{label:(0,sO.__)("Always show pre-publish checks."),checked:d,onChange:C})})]})}var pO=s(H(),1),hO=s(we(),1),gO=s(U(),1),vO=s(V(),1),xv=s(N(),1);var jpe=s(Wr(),1),zpe=s(vt(),1);var fa=s(H(),1),qt=s(N(),1),mO=s(U(),1),Hx=s(V(),1),Lpe=s(Q(),1),Bpe=s(ce(),1),Vpe=s(we(),1);var w9=s(N(),1),Dpe=s(H(),1),uO=s(U(),1);var Fpe=s(U(),1);function cO({children:e}){let{hasStickyAction:t,postType:r}=(0,Fpe.useSelect)(o=>({hasStickyAction:o(T).getCurrentPost()._links?.["wp:action-sticky"]??!1,postType:o(T).getCurrentPostType()}),[]);return r!=="post"||!t?null:e}var S9=s(x(),1);function dO(){let e=(0,uO.useSelect)(r=>r(T).getEditedPostAttribute("sticky")??!1,[]),{editPost:t}=(0,uO.useDispatch)(T);return(0,S9.jsx)(cO,{children:(0,S9.jsx)(Dpe.CheckboxControl,{className:"editor-post-sticky__checkbox-control",label:(0,w9.__)("Sticky"),help:(0,w9.__)("Pin this post to the top of the blog."),checked:e,onChange:()=>t({sticky:!e})})})}var zo=s(x(),1),fO={"auto-draft":{label:(0,qt.__)("Draft"),icon:zv},draft:{label:(0,qt.__)("Draft"),icon:zv},pending:{label:(0,qt.__)("Pending"),icon:hS},private:{label:(0,qt.__)("Private"),icon:dS},future:{label:(0,qt.__)("Scheduled"),icon:Qp},publish:{label:(0,qt.__)("Published"),icon:Zp}},_9=[{label:(0,qt.__)("Draft"),value:"draft",description:(0,qt.__)("Not ready to publish.")},{label:(0,qt.__)("Pending"),value:"pending",description:(0,qt.__)("Waiting for review before publishing.")},{label:(0,qt.__)("Private"),value:"private",description:(0,qt.__)("Only visible to site admins and editors.")},{label:(0,qt.__)("Scheduled"),value:"future",description:(0,qt.__)("Publish automatically on a chosen date.")},{label:(0,qt.__)("Published"),value:"publish",description:(0,qt.__)("Visible to everyone.")}];function x9(){let{status:e,date:t,password:r,postId:o,postType:n,canEdit:i}=(0,mO.useSelect)(y=>{let{getEditedPostAttribute:b,getCurrentPostId:S,getCurrentPostType:w,getCurrentPost:_}=y(T);return{status:b("status"),date:b("date"),password:b("password"),postId:S(),postType:w(),canEdit:_()._links?.["wp:action-publish"]??!1}},[]),[a,l]=(0,Hx.useState)(!!r),c=(0,Vpe.useInstanceId)(x9,"editor-change-status__password-input"),{editEntityRecord:u}=(0,mO.useDispatch)(Lpe.store),[d,f]=(0,Hx.useState)(null),m=(0,Hx.useMemo)(()=>({anchor:d,"aria-label":(0,qt.__)("Status & visibility"),headerTitle:(0,qt.__)("Status & visibility"),placement:"left-start",offset:36,shift:!0}),[d]);if(yl.includes(n))return null;let h=({status:y=e,password:b=r,date:S=t})=>{u("postType",n,o,{status:y,date:S,password:b})},g=y=>{l(y),y||h({password:""})},v=y=>{let b=t,S=r;e==="future"&&new Date(t)>new Date&&(b=null),y==="private"&&r&&(S=""),h({status:y,date:b,password:S})};return(0,zo.jsx)(Nt,{label:(0,qt.__)("Status"),ref:f,children:i?(0,zo.jsx)(fa.Dropdown,{className:"editor-post-status",contentClassName:"editor-change-status__content",popoverProps:m,focusOnMount:!0,renderToggle:({onToggle:y,isOpen:b})=>(0,zo.jsx)(fa.Button,{className:"editor-post-status__toggle",variant:"tertiary",size:"compact",onClick:y,icon:fO[e]?.icon,"aria-label":(0,qt.sprintf)((0,qt.__)("Change status: %s"),fO[e]?.label),"aria-expanded":b,children:fO[e]?.label}),renderContent:({onClose:y})=>(0,zo.jsxs)(zo.Fragment,{children:[(0,zo.jsx)(Bpe.__experimentalInspectorPopoverHeader,{title:(0,qt.__)("Status & visibility"),onClose:y}),(0,zo.jsx)("form",{onSubmit:b=>{b.preventDefault(),y()},children:(0,zo.jsxs)(fa.__experimentalVStack,{spacing:4,children:[(0,zo.jsx)(fa.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,qt.__)("Status"),options:_9,onChange:v,selected:e==="auto-draft"?"draft":e}),e==="future"&&(0,zo.jsx)("div",{className:"editor-change-status__publish-date-wrapper",children:(0,zo.jsx)(d9,{showPopoverHeaderActions:!1,isCompact:!0})}),e!=="private"&&(0,zo.jsxs)(fa.__experimentalVStack,{as:"fieldset",spacing:4,className:"editor-change-status__password-fieldset",children:[(0,zo.jsx)(fa.CheckboxControl,{label:(0,qt.__)("Password protected"),help:(0,qt.__)("Only visible to those who know the password."),checked:a,onChange:g}),a&&(0,zo.jsx)("div",{className:"editor-change-status__password-input",children:(0,zo.jsx)(fa.TextControl,{label:(0,qt.__)("Password"),onChange:b=>h({password:b}),value:r,placeholder:(0,qt.__)("Use a secure password"),type:"text",id:c,__next40pxDefaultSize:!0,maxLength:255})})]}),(0,zo.jsx)(dO,{})]})})]})}):(0,zo.jsx)("div",{className:"editor-post-status is-read-only",children:fO[e]?.label})})}var yO=s(x(),1);function bO({forceIsDirty:e}){let[t,r]=(0,vO.useState)(!1),o=(0,hO.useViewportMatch)("small"),{isAutosaving:n,isDirty:i,isNew:a,isPublished:l,isSaveable:c,isSaving:u,isSavingLocked:d,isScheduled:f,hasPublishAction:m,showIconLabels:h,postStatus:g,postStatusHasChanged:v,postType:y}=(0,gO.useSelect)(E=>{let{isEditedPostNew:P,isCurrentPostPublished:L,isCurrentPostScheduled:j,isEditedPostDirty:z,isSavingPost:W,isEditedPostSaveable:O,isPostSavingLocked:M,getCurrentPost:D,isAutosavingPost:G,getEditedPostAttribute:q,getPostEdits:Z}=E(T),{get:te}=E(zpe.store);return{isAutosaving:G(),isDirty:e||z(),isNew:P(),isPublished:L(),isSaving:W(),isSaveable:O(),isSavingLocked:M(),isScheduled:j(),hasPublishAction:D()?._links?.["wp:action-publish"]??!1,showIconLabels:te("core","showIconLabels"),postStatus:q("status"),postStatusHasChanged:!!Z()?.status,postType:E(T).getCurrentPostType()}},[e]),b=g==="pending",{savePost:S}=(0,gO.useDispatch)(T),w=(0,hO.usePrevious)(u);if((0,vO.useEffect)(()=>{let E;return w&&!u&&(r(!0),E=setTimeout(()=>{r(!1)},1e3)),()=>clearTimeout(E)},[u]),y===jr||!m&&b)return null;let _=!["pending","draft","auto-draft"].includes(g)&&_9.map(({value:E})=>E).includes(g);if(l||f||_||v&&["pending","draft"].includes(g))return null;let C=b?(0,xv.__)("Save as pending"):(0,xv.__)("Save draft"),k=(0,xv.__)("Save"),A=t||!a&&!i,R=u||A,I=u||A||!c||d,B;return u?B=n?(0,xv.__)("Autosaving"):(0,xv.__)("Saving"):A?B=(0,xv.__)("Saved"):o?B=C:h&&(B=k),(0,yO.jsxs)(pO.Button,{className:c||u?K({"editor-post-save-draft":!R,"editor-post-saved-state":R,"is-saving":u,"is-autosaving":n,"is-saved":A,[(0,pO.__unstableGetAnimateClassName)({type:"loading"})]:u}):void 0,onClick:I?void 0:()=>S(),shortcut:I?void 0:jpe.displayShortcut.primary("s"),variant:"tertiary",size:"compact",icon:o?void 0:q6,label:B||C,"aria-disabled":I,children:[R&&(0,yO.jsx)(Uo,{icon:A?Rn:Z6}),B]})}var Hpe=s(U(),1);function wO({children:e}){return(0,Hpe.useSelect)(r=>r(T).getCurrentPost()._links?.["wp:action-publish"]??!1,[])?e:null}var SO=s(H(),1),Z0=s(N(),1),_O=s(V(),1),Upe=s(U(),1);var K0=s(x(),1);function xO(){let[e,t]=(0,_O.useState)(null),r=(0,Upe.useSelect)(a=>a(T).getCurrentPostType(),[]),o=(0,_O.useMemo)(()=>({anchor:e,"aria-label":(0,Z0.__)("Change publish date"),placement:"left-start",offset:36,shift:!0}),[e]),n=U0(),i=U0({full:!0});return yl.includes(r)?null:(0,K0.jsx)(wO,{children:(0,K0.jsx)(Nt,{label:(0,Z0.__)("Publish"),ref:t,children:(0,K0.jsx)(SO.Dropdown,{popoverProps:o,focusOnMount:!0,className:"editor-post-schedule__panel-dropdown",contentClassName:"editor-post-schedule__dialog",renderToggle:({onToggle:a,isOpen:l})=>(0,K0.jsx)(SO.Button,{size:"compact",className:"editor-post-schedule__dialog-toggle",variant:"tertiary",tooltipPosition:"middle left",onClick:a,"aria-label":(0,Z0.sprintf)((0,Z0.__)("Change date: %s"),n),label:i,showTooltip:n!==i,"aria-expanded":l,children:n}),renderContent:({onClose:a})=>(0,K0.jsx)(z0,{onClose:a})})})})}var CO=s(H(),1),X0=s(N(),1),TO=s(U(),1),Gpe=s(V(),1),Wpe=s(ya(),1);var Cv=s(x(),1);function Ype(){(0,Wpe.default)("wp.editor.PostSwitchToDraftButton",{since:"6.7",version:"6.9"});let[e,t]=(0,Gpe.useState)(!1),{editPost:r,savePost:o}=(0,TO.useDispatch)(T),{isSaving:n,isPublished:i,isScheduled:a}=(0,TO.useSelect)(f=>{let{isSavingPost:m,isCurrentPostPublished:h,isCurrentPostScheduled:g}=f(T);return{isSaving:m(),isPublished:h(),isScheduled:g()}},[]),l=n||!i&&!a,c,u;i?(c=(0,X0.__)("Are you sure you want to unpublish this post?"),u=(0,X0.__)("Unpublish")):a&&(c=(0,X0.__)("Are you sure you want to unschedule this post?"),u=(0,X0.__)("Unschedule"));let d=()=>{t(!1),r({status:"draft"}),o()};return(0,Cv.jsxs)(Cv.Fragment,{children:[(0,Cv.jsx)(CO.Button,{__next40pxDefaultSize:!0,className:"editor-post-switch-to-draft",onClick:()=>{l||t(!0)},"aria-disabled":l,variant:"secondary",style:{flexGrow:"1",justifyContent:"center"},children:(0,X0.__)("Switch to draft")}),(0,Cv.jsx)(CO.__experimentalConfirmDialog,{isOpen:e,onConfirm:d,onCancel:()=>t(!1),confirmButtonText:u,children:c})]})}var qpe=s(U(),1),Ux=s(N(),1);var C9=s(x(),1);function PO(){let{syncStatus:e,postType:t}=(0,qpe.useSelect)(r=>{let{getEditedPostAttribute:o}=r(T);return{syncStatus:o("meta")?.wp_pattern_sync_status==="unsynced"?"unsynced":o("wp_pattern_sync_status"),postType:o("type")}});return t!=="wp_block"?null:(0,C9.jsx)(Nt,{label:(0,Ux.__)("Sync status"),children:(0,C9.jsx)("div",{className:"editor-post-sync-status__value",children:e==="unsynced"?(0,Ux._x)("Not synced","pattern (singular)"):(0,Ux._x)("Synced","pattern (singular)")})})}var Kpe=s(V(),1),Zpe=s(U(),1),Xpe=s(Q(),1);var T9=s(x(),1),Ize=e=>e;function Oze({taxonomyWrapper:e=Ize}){let{postType:t,taxonomies:r}=(0,Zpe.useSelect)(n=>({postType:n(T).getCurrentPostType(),taxonomies:n(Xpe.store).getEntityRecords("root","taxonomy",{per_page:-1})}),[]);return(r??[]).filter(n=>n.types.includes(t)&&n.visibility?.show_ui).map(n=>{let i=n.hierarchical?tO:Q5;return(0,T9.jsx)(Kpe.Fragment,{children:e((0,T9.jsx)(i,{slug:n.slug}),n)},`taxonomy-${n.slug}`)})}var Q0=Oze;var Qpe=s(U(),1),Jpe=s(Q(),1);function EO({children:e}){return(0,Qpe.useSelect)(r=>{let o=r(T).getCurrentPostType();return r(Jpe.store).getEntityRecords("root","taxonomy",{per_page:-1})?.some(i=>i.types.includes(o))},[])?e:null}var $pe=s(H(),1),kO=s(U(),1);var Gx=s(x(),1);function Nze({taxonomy:e,children:t}){let r=e?.slug,o=r?`taxonomy-panel-${r}`:"",{isEnabled:n,isOpened:i}=(0,kO.useSelect)(c=>{let{isEditorPanelEnabled:u,isEditorPanelOpened:d}=c(T);return{isEnabled:r?u(o):!1,isOpened:r?d(o):!1}},[o,r]),{toggleEditorPanelOpened:a}=(0,kO.useDispatch)(T);if(!n)return null;let l=e?.labels?.menu_name;return l?(0,Gx.jsx)($pe.PanelBody,{title:l,opened:i,onToggle:()=>a(o),children:t}):null}function RO(){return(0,Gx.jsx)(EO,{children:(0,Gx.jsx)(Q0,{taxonomyWrapper:(e,t)=>(0,Gx.jsx)(Nze,{taxonomy:t,children:e})})})}var vhe=s(k9(),1),R9=s(N(),1),yhe=s(Q(),1),NO=s(U(),1),bhe=s(we(),1);var Ep=s(x(),1);function Yx(){let e=(0,bhe.useInstanceId)(Yx),{value:t,type:r,id:o}=(0,NO.useSelect)(i=>{let{getCurrentPostType:a,getCurrentPostId:l,getEditedPostContent:c}=i(T);return{value:c(),type:a(),id:l()}},[]),{editEntityRecord:n}=(0,NO.useDispatch)(yhe.store);return(0,Ep.jsxs)(Ep.Fragment,{children:[(0,Ep.jsx)(Kt,{render:(0,Ep.jsx)("label",{htmlFor:`post-content-${e}`}),children:(0,R9.__)("Type text or HTML")}),(0,Ep.jsx)(vhe.default,{autoComplete:"off",dir:"auto",value:t,onChange:i=>{n("postType",r,o,{content:i.target.value,blocks:void 0,selection:void 0})},className:"editor-post-text-editor",id:`post-content-${e}`,placeholder:(0,R9.__)("Start writing with text or HTML")})]})}var She=s(N(),1),$0=s(V(),1),_he=s(St(),1),jO=s(U(),1),A9=s(ce(),1),xhe=s(Wr(),1),Che=s(lt(),1),ew=s(A1(),1),The=s(we(),1),I9=s(qg(),1);var MO="wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text",FO=/[\r\n]+/g;var J0=s(V(),1),whe=s(U(),1);function DO(e){let t=(0,J0.useRef)(),{isCleanNewPost:r}=(0,whe.useSelect)(o=>{let{isCleanNewPost:n}=o(T);return{isCleanNewPost:n()}},[]);return(0,J0.useImperativeHandle)(e,()=>({focus:()=>{t?.current?.focus()}})),(0,J0.useEffect)(()=>{if(!t.current)return;let{defaultView:o}=t.current.ownerDocument,{name:n,parent:i}=o,a=n==="editor-canvas"?i.document:o.document,{activeElement:l,body:c}=a;r&&(!l||c===l)&&t.current.focus()},[r]),{ref:t}}var LO=s(U(),1);function BO(){let{editPost:e}=(0,LO.useDispatch)(T),{title:t}=(0,LO.useSelect)(o=>{let{getEditedPostAttribute:n}=o(T);return{title:n("title")}},[]);function r(o){e({title:o})}return{title:t,setTitle:r}}var VO=s(x(),1),{useRichText:Gze}=Y(ew.privateApis),Wze=(0,$0.forwardRef)((e,t)=>{let{placeholder:r,isEditingContentOnlySection:o,isPreview:n}=(0,jO.useSelect)(E=>{let{getSettings:P,getEditedContentOnlySection:L}=Y(E(A9.store)),{titlePlaceholder:j,isPreviewMode:z}=P();return{placeholder:j,isEditingContentOnlySection:!!L(),isPreview:z}},[]),[i,a]=(0,$0.useState)(!1),{ref:l}=DO(t),{title:c,setTitle:u}=BO(),[d,f]=(0,$0.useState)({}),{clearSelectedBlock:m,insertBlocks:h,insertDefaultBlock:g}=(0,jO.useDispatch)(A9.store),v=(0,_he.decodeEntities)(r)||(0,She.__)("Add title"),{value:y,onChange:b,ref:S}=Gze({value:c,onChange(E){u(E.replace(FO," "))},placeholder:v,selectionStart:d.start,selectionEnd:d.end,onSelectionChange(E,P){f(L=>{let{start:j,end:z}=L;return j===E&&z===P?L:{start:E,end:P}})},__unstableDisableFormats:!1});function w(E){h(E,0)}function _(){a(!0),m()}function C(){a(!1),f({})}function k(){g(void 0,void 0,0)}function A(E){E.keyCode===xhe.ENTER&&(E.preventDefault(),k())}function R(E){let P=E.clipboardData,L="",j="";try{L=P.getData("text/plain"),j=P.getData("text/html")}catch{return}let z=(0,Che.pasteHandler)({HTML:j,plainText:L});if(E.preventDefault(),!!z.length)if(typeof z!="string"){let[W]=z;if(!c&&(W.name==="core/heading"||W.name==="core/paragraph")){let O=(0,I9.__unstableStripHTML)(W.attributes.content);u(O),w(z.slice(1))}else w(z)}else{let W=(0,I9.__unstableStripHTML)(z);b((0,ew.insert)(y,(0,ew.create)({html:W})))}}let I=K(MO,{"is-selected":i}),B=o?{opacity:.2}:void 0;return(0,VO.jsx)("h1",{ref:(0,The.useMergeRefs)([S,l]),contentEditable:!o&&!n,className:I,"aria-label":v,role:"textbox","aria-multiline":"true",onFocus:_,onBlur:C,onKeyDown:A,onPaste:R,style:B})}),zO=(0,$0.forwardRef)((e,t)=>(0,VO.jsx)(Mr,{supportKeys:"title",children:(0,VO.jsx)(Wze,{ref:t})}));var Phe=s(H(),1),Ehe=s(N(),1),khe=s(St(),1),Rhe=s(U(),1),Ahe=s(ce(),1),HO=s(V(),1);var Ihe=s(x(),1);function Yze(e,t){let{placeholder:r}=(0,Rhe.useSelect)(h=>{let{getSettings:g}=h(Ahe.store),{titlePlaceholder:v}=g();return{placeholder:v}},[]),[o,n]=(0,HO.useState)(!1),{title:i,setTitle:a}=BO(),{ref:l}=DO(t);function c(h){a(h.replace(FO," "))}function u(){n(!0)}function d(){n(!1)}let f=K(MO,{"is-selected":o,"is-raw-text":!0}),m=(0,khe.decodeEntities)(r)||(0,Ehe.__)("Add title");return(0,Ihe.jsx)(Phe.TextareaControl,{ref:l,value:i,onChange:c,onFocus:u,onBlur:d,label:r,className:f,placeholder:m,hideLabelFromVision:!0,autoComplete:"off",dir:"auto",rows:1})}var UO=(0,HO.forwardRef)(Yze);var tw=s(N(),1),WO=s(H(),1),rw=s(U(),1),Mhe=s(V(),1);var Ohe=s(U(),1),Nhe=s(Q(),1);function GO({children:e}){let{canTrashPost:t}=(0,Ohe.useSelect)(r=>{let{isEditedPostNew:o,getCurrentPostId:n,getCurrentPostType:i}=r(T),{canUser:a}=r(Nhe.store),l=i(),c=n(),u=o(),d=c?a("delete",{kind:"postType",name:l,id:c}):!1;return{canTrashPost:(!u||c)&&d&&!Ez.includes(l)}},[]);return t?e:null}var qx=s(x(),1);function ow({onActionPerformed:e}){let t=(0,rw.useRegistry)(),{isNew:r,isDeleting:o,postId:n,title:i}=(0,rw.useSelect)(d=>{let f=d(T);return{isNew:f.isEditedPostNew(),isDeleting:f.isDeletingPost(),postId:f.getCurrentPostId(),title:f.getCurrentPostAttribute("title")}},[]),{trashPost:a}=(0,rw.useDispatch)(T),[l,c]=(0,Mhe.useState)(!1);if(r||!n)return null;let u=async()=>{c(!1),await a();let d=await t.resolveSelect(T).getCurrentPost();e?.("move-to-trash",[d])};return(0,qx.jsxs)(GO,{children:[(0,qx.jsx)(WO.Button,{__next40pxDefaultSize:!0,className:"editor-post-trash",isDestructive:!0,variant:"secondary",isBusy:o,"aria-disabled":o,onClick:o?void 0:()=>c(!0),children:(0,tw.__)("Move to trash")}),(0,qx.jsx)(WO.__experimentalConfirmDialog,{isOpen:l,onConfirm:u,onCancel:()=>c(!1),confirmButtonText:(0,tw.__)("Move to trash"),size:"small",children:(0,tw.sprintf)((0,tw.__)('Are you sure you want to move "%s" to the trash?'),i)})]})}var Kx=s(U(),1),Zx=s(vo(),1),YO=s(V(),1),Fhe=s(ce(),1),Tv=s(N(),1),ks=s(H(),1),Dhe=s(wt(),1);var Lhe=s(Q(),1),qO=s(we(),1);var Xr=s(x(),1);function Xx({onClose:e}){let{isEditable:t,postSlug:r,postLink:o,permalinkPrefix:n,permalinkSuffix:i,permalink:a}=(0,Kx.useSelect)(h=>{let g=h(T).getCurrentPost(),v=h(T).getCurrentPostType(),y=h(Lhe.store).getPostType(v),b=h(T).getPermalinkParts(),S=g?._links?.["wp:action-publish"]??!1;return{isEditable:h(T).isPermalinkEditable()&&S,postSlug:(0,Zx.safeDecodeURIComponent)(h(T).getEditedPostSlug()),viewPostLabel:y?.labels.view_item,postLink:g.link,permalinkPrefix:b?.prefix,permalinkSuffix:b?.suffix,permalink:(0,Zx.safeDecodeURIComponent)(h(T).getPermalink())}},[]),{editPost:l}=(0,Kx.useDispatch)(T),{createNotice:c}=(0,Kx.useDispatch)(Dhe.store),[u,d]=(0,YO.useState)(!1),f=(0,qO.useCopyToClipboard)(a,()=>{c("info",(0,Tv.__)("Copied Permalink to clipboard."),{isDismissible:!0,type:"snackbar"})}),m="editor-post-url__slug-description-"+(0,qO.useInstanceId)(Xx);return(0,Xr.jsxs)("div",{className:"editor-post-url",children:[(0,Xr.jsx)(Fhe.__experimentalInspectorPopoverHeader,{title:(0,Tv.__)("Slug"),onClose:e}),(0,Xr.jsxs)(ks.__experimentalVStack,{spacing:3,children:[t&&(0,Xr.jsx)("p",{className:"editor-post-url__intro",children:(0,YO.createInterpolateElement)((0,Tv.__)("<span>Customize the last part of the Permalink.</span> <a>Learn more.</a>"),{span:(0,Xr.jsx)("span",{id:m}),a:(0,Xr.jsx)(ks.ExternalLink,{href:(0,Tv.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink")})})}),(0,Xr.jsxs)("div",{children:[t&&(0,Xr.jsxs)(Xr.Fragment,{children:[(0,Xr.jsx)(ks.__experimentalInputControl,{__next40pxDefaultSize:!0,prefix:(0,Xr.jsx)(ks.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,Xr.jsx)(ks.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Xr.jsx)(ks.Button,{icon:tS,ref:f,size:"small",label:"Copy"})}),label:(0,Tv.__)("Slug"),hideLabelFromVision:!0,value:u?"":r,autoComplete:"off",spellCheck:"false",type:"text",className:"editor-post-url__input",onChange:h=>{if(l({slug:h}),!h){u||d(!0);return}u&&d(!1)},onBlur:h=>{l({slug:(0,Zx.cleanForSlug)(h.target.value)}),u&&d(!1)},"aria-describedby":m}),(0,Xr.jsxs)("p",{className:"editor-post-url__permalink",children:[(0,Xr.jsx)("span",{className:"editor-post-url__permalink-visual-label",children:(0,Tv.__)("Permalink:")}),(0,Xr.jsxs)(ks.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:[(0,Xr.jsx)("span",{className:"editor-post-url__link-prefix",children:n}),(0,Xr.jsx)("span",{className:"editor-post-url__link-slug",children:r}),(0,Xr.jsx)("span",{className:"editor-post-url__link-suffix",children:i})]})]})]}),!t&&(0,Xr.jsx)(ks.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:o})]})]})]})}var Bhe=s(U(),1),Vhe=s(Q(),1);function KO({children:e}){return(0,Bhe.useSelect)(r=>{let o=r(T).getCurrentPostType();return!(!r(Vhe.store).getPostType(o)?.viewable||!r(T).getCurrentPost().link||!r(T).getPermalinkParts())},[])?e:null}var jhe=s(U(),1),ZO=s(vo(),1);function zhe(){return O9()}function O9(){let e=(0,jhe.useSelect)(t=>t(T).getPermalink(),[]);return(0,ZO.filterURLForDisplay)((0,ZO.safeDecodeURIComponent)(e))}var XO=s(V(),1),QO=s(U(),1),iw=s(H(),1),nw=s(N(),1),Hhe=s(vo(),1),Uhe=s(Q(),1);var ma=s(x(),1);function JO(){let{isFrontPage:e}=(0,QO.useSelect)(i=>{let{getCurrentPostId:a}=i(T),{getEditedEntityRecord:l,canUser:c}=i(Uhe.store),u=c("read",{kind:"root",name:"site"})?l("root","site"):void 0,d=a();return{isFrontPage:u?.page_on_front===d}},[]),[t,r]=(0,XO.useState)(null),o=(0,XO.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]),n=e?(0,nw.__)("Link"):(0,nw.__)("Slug");return(0,ma.jsx)(KO,{children:(0,ma.jsxs)(Nt,{label:n,ref:r,children:[!e&&(0,ma.jsx)(iw.Dropdown,{popoverProps:o,className:"editor-post-url__panel-dropdown",contentClassName:"editor-post-url__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:i,onToggle:a})=>(0,ma.jsx)(qze,{isOpen:i,onClick:a}),renderContent:({onClose:i})=>(0,ma.jsx)(Xx,{onClose:i})}),e&&(0,ma.jsx)(Kze,{})]})})}function qze({isOpen:e,onClick:t}){let{slug:r}=(0,QO.useSelect)(n=>({slug:n(T).getEditedPostSlug()}),[]),o=(0,Hhe.safeDecodeURIComponent)(r);return(0,ma.jsx)(iw.Button,{size:"compact",className:"editor-post-url__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,nw.sprintf)((0,nw.__)("Change link: %s"),o),onClick:t,children:(0,ma.jsx)(ma.Fragment,{children:o})})}function Kze(){let{postLink:e}=(0,QO.useSelect)(t=>{let{getCurrentPost:r}=t(T);return{postLink:r()?.link}},[]);return(0,ma.jsx)(iw.ExternalLink,{className:"editor-post-url__front-page-link",href:e,target:"_blank",children:e})}var Ghe=s(U(),1);function Whe({render:e}){let t=(0,Ghe.useSelect)(r=>r(T).getCurrentPost()._links?.["wp:action-publish"]??!1);return e({canEdit:t})}var oge=s(N(),1),tN=s(H(),1),nge=s(U(),1);var ige=s(V(),1),sge=s(ce(),1);var af=s(N(),1),ege=s(U(),1),tge=s(ce(),1);var Yhe=s(U(),1),qhe=s(N(),1),Khe=s(wy(),1);var Zhe=s(x(),1);function sw(){let e=(0,Yhe.useSelect)(r=>r(T).getEditedPostAttribute("content"),[]),t=(0,qhe._x)("words","Word count type. Do not translate!");return(0,Zhe.jsx)("span",{className:"word-count",children:(0,Khe.count)(e,t)})}var Xhe=s(U(),1),kp=s(N(),1),Qhe=s(wy(),1),N9=s(V(),1);var $O=s(x(),1),Zze=189;function aw(){let e=(0,Xhe.useSelect)(n=>n(T).getEditedPostAttribute("content"),[]),t=(0,kp._x)("words","Word count type. Do not translate!"),r=Math.round((0,Qhe.count)(e,t)/Zze),o=r===0?(0,N9.createInterpolateElement)((0,kp.__)("<span>< 1</span> minute"),{span:(0,$O.jsx)("span",{})}):(0,N9.createInterpolateElement)((0,kp.sprintf)((0,kp._n)("<span>%s</span> minute","<span>%s</span> minutes",r),r),{span:(0,$O.jsx)("span",{})});return(0,$O.jsx)("span",{className:"time-to-read",children:o})}var Jhe=s(U(),1),$he=s(wy(),1);function lw(){let e=(0,Jhe.useSelect)(t=>t(T).getEditedPostAttribute("content"),[]);return(0,$he.count)(e,"characters_including_spaces")}var Cr=s(x(),1);function Xze({hasOutlineItemsDisabled:e,onRequestClose:t}){let{headingCount:r,paragraphCount:o,numberOfBlocks:n}=(0,ege.useSelect)(i=>{let{getGlobalBlockCount:a}=i(tge.store);return{headingCount:a("core/heading"),paragraphCount:a("core/paragraph"),numberOfBlocks:a()}},[]);return(0,Cr.jsxs)(Cr.Fragment,{children:[(0,Cr.jsx)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":(0,af.__)("Document Statistics"),tabIndex:"0",children:(0,Cr.jsxs)("ul",{role:"list",className:"table-of-contents__counts",children:[(0,Cr.jsxs)("li",{className:"table-of-contents__count",children:[(0,af.__)("Words"),(0,Cr.jsx)(sw,{})]}),(0,Cr.jsxs)("li",{className:"table-of-contents__count",children:[(0,af.__)("Characters"),(0,Cr.jsx)("span",{className:"table-of-contents__number",children:(0,Cr.jsx)(lw,{})})]}),(0,Cr.jsxs)("li",{className:"table-of-contents__count",children:[(0,af.__)("Time to read"),(0,Cr.jsx)(aw,{})]}),(0,Cr.jsxs)("li",{className:"table-of-contents__count",children:[(0,af.__)("Headings"),(0,Cr.jsx)("span",{className:"table-of-contents__number",children:r})]}),(0,Cr.jsxs)("li",{className:"table-of-contents__count",children:[(0,af.__)("Paragraphs"),(0,Cr.jsx)("span",{className:"table-of-contents__number",children:o})]}),(0,Cr.jsxs)("li",{className:"table-of-contents__count",children:[(0,af.__)("Blocks"),(0,Cr.jsx)("span",{className:"table-of-contents__number",children:n})]})]})}),r>0&&(0,Cr.jsxs)(Cr.Fragment,{children:[(0,Cr.jsx)("hr",{}),(0,Cr.jsx)("h2",{className:"table-of-contents__title",children:(0,af.__)("Document Outline")}),(0,Cr.jsx)(p0,{onSelect:t,hasOutlineItemsDisabled:e})]})]})}var rge=Xze;var eN=s(x(),1);function Qze({hasOutlineItemsDisabled:e,repositionDropdown:t,...r},o){let n=(0,nge.useSelect)(i=>!!i(sge.store).getBlockCount(),[]);return(0,eN.jsx)(tN.Dropdown,{popoverProps:{placement:t?"right":"bottom"},className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:({isOpen:i,onToggle:a})=>(0,eN.jsx)(tN.Button,{__next40pxDefaultSize:!0,...r,ref:o,onClick:n?a:void 0,icon:RM,"aria-expanded":i,"aria-haspopup":"true",label:(0,oge.__)("Details"),tooltipPosition:"bottom","aria-disabled":!n}),renderContent:({onClose:i})=>(0,eN.jsx)(rge,{onRequestClose:i,hasOutlineItemsDisabled:e})})}var age=(0,ige.forwardRef)(Qze);var lge=s(N(),1),cge=s(V(),1),uge=s(U(),1),dge=s(Q(),1);function fge(){let{__experimentalGetDirtyEntityRecords:e}=(0,uge.useSelect)(dge.store);return(0,cge.useEffect)(()=>{let t=r=>{if(e().length>0)return r.returnValue=(0,lge.__)("You have unsaved changes. If you proceed, they will be lost."),r.returnValue};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}},[e]),null}var M9=s(ya(),1),hge=s(V(),1),de=s(ce(),1),gge=s(pge(),1),vge=s(x(),1);function ot(e,t,r=[]){let o=(0,hge.forwardRef)((n,i)=>((0,M9.default)("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),(0,vge.jsx)(t,{ref:i,...n})));return r.forEach(n=>{o[n]=ot(e+"."+n,t[n])}),o}function fu(e,t){return(...r)=>((0,M9.default)("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),t(...r))}var yge=ot("RichText",de.RichText,["Content"]);yge.isEmpty=fu("RichText.isEmpty",de.RichText.isEmpty);var Jze=ot("Autocomplete",de.Autocomplete),$ze=ot("AlignmentToolbar",de.AlignmentToolbar),eHe=ot("BlockAlignmentToolbar",de.BlockAlignmentToolbar),tHe=ot("BlockControls",de.BlockControls,["Slot"]),rHe=ot("BlockEdit",de.BlockEdit),oHe=ot("BlockEditorKeyboardShortcuts",de.BlockEditorKeyboardShortcuts),nHe=ot("BlockFormatControls",de.BlockFormatControls,["Slot"]),iHe=ot("BlockIcon",de.BlockIcon),sHe=ot("BlockInspector",de.BlockInspector),aHe=ot("BlockList",de.BlockList),lHe=ot("BlockMover",de.BlockMover),cHe=ot("BlockNavigationDropdown",de.BlockNavigationDropdown),uHe=ot("BlockSelectionClearer",de.BlockSelectionClearer),dHe=ot("BlockSettingsMenu",de.BlockSettingsMenu),fHe=ot("BlockTitle",de.BlockTitle),mHe=ot("BlockToolbar",de.BlockToolbar),pHe=ot("ColorPalette",de.ColorPalette),hHe=ot("ContrastChecker",de.ContrastChecker),gHe=ot("CopyHandler",de.CopyHandler),vHe=ot("DefaultBlockAppender",de.DefaultBlockAppender),yHe=ot("FontSizePicker",de.FontSizePicker),bHe=ot("Inserter",de.Inserter),wHe=ot("InnerBlocks",de.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),SHe=ot("InspectorAdvancedControls",de.InspectorAdvancedControls,["Slot"]),_He=ot("InspectorControls",de.InspectorControls,["Slot"]),xHe=ot("PanelColorSettings",de.PanelColorSettings),CHe=ot("PlainText",de.PlainText),THe=ot("RichTextShortcut",de.RichTextShortcut),PHe=ot("RichTextToolbarButton",de.RichTextToolbarButton),EHe=ot("__unstableRichTextInputEvent",de.__unstableRichTextInputEvent),kHe=ot("MediaPlaceholder",de.MediaPlaceholder),RHe=ot("MediaUpload",de.MediaUpload),AHe=ot("MediaUploadCheck",de.MediaUploadCheck),IHe=ot("MultiSelectScrollIntoView",de.MultiSelectScrollIntoView),OHe=ot("NavigableToolbar",de.NavigableToolbar),NHe=ot("ObserveTyping",de.ObserveTyping),MHe=ot("SkipToSelectedBlock",de.SkipToSelectedBlock),FHe=ot("URLInput",de.URLInput),DHe=ot("URLInputButton",de.URLInputButton),LHe=ot("URLPopover",de.URLPopover),BHe=ot("Warning",de.Warning),VHe=ot("WritingFlow",de.WritingFlow),jHe=fu("createCustomColorsHOC",de.createCustomColorsHOC),zHe=fu("getColorClassName",de.getColorClassName),HHe=fu("getColorObjectByAttributeValues",de.getColorObjectByAttributeValues),UHe=fu("getColorObjectByColorValue",de.getColorObjectByColorValue),GHe=fu("getFontSize",de.getFontSize),WHe=fu("getFontSizeClass",de.getFontSizeClass),YHe=fu("withColorContext",de.withColorContext),qHe=fu("withColors",de.withColors),KHe=fu("withFontSizes",de.withFontSizes);var ZHe=_g,XHe=_g;function QHe(e=[]){return e.push({...oI},{...nI}),e}(0,bge.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",QHe);var wge=s(V(),1),F9=s(tn(),1),Sge=s(ya(),1),rN=s(rh(),1);var cw=s(x(),1),{MediaUploadModal:JHe}=Y(rN.privateApis),$He=class extends wge.Component{constructor(e){super(e),this.state={isOpen:!1},this.openModal=this.openModal.bind(this),this.closeModal=this.closeModal.bind(this)}openModal(){this.setState({isOpen:!0})}closeModal(){this.setState({isOpen:!1}),this.props.onClose?.()}render(){let{allowedTypes:e,multiple:t,value:r,onSelect:o,title:n,modalClass:i,render:a}=this.props,{isOpen:l}=this.state;return(0,cw.jsxs)(cw.Fragment,{children:[a({open:this.openModal}),(0,cw.jsx)(JHe,{allowedTypes:e,multiple:t,value:r,onSelect:c=>{o(c),this.closeModal()},onClose:this.closeModal,title:n,isOpen:l,modalClass:i})]})}};window.__experimentalDataViewsMediaModal?(0,F9.addFilter)("editor.MediaUpload","core/editor/components/media-upload",()=>((0,Sge.default)("Extending MediaUpload as a class component",{since:"7.0",version:"7.2",hint:"MediaUpload will become a function component in WordPress 7.2 Please update any custom implementations to use function components instead."}),$He)):(0,F9.addFilter)("editor.MediaUpload","core/editor/components/media-upload",()=>rN.MediaUpload);var xge=s(tn(),1),Cge=s(Sl(),1),Tge=s(we(),1),oN=s(ce(),1),D9=s(U(),1),Pge=s(lt(),1);var Jl=s(x(),1),{PatternOverridesControls:eUe,ResetOverridesControl:tUe,PATTERN_TYPES:rUe,PATTERN_SYNC_TYPES:_ge}=Y(Cge.privateApis),oUe=(0,Tge.createHigherOrderComponent)(e=>t=>{let r=(0,D9.useSelect)(o=>{let{__experimentalBlockBindingsSupportedAttributes:n}=o(oN.store).getSettings();return!!n?.[t.name]},[t.name]);return(0,Jl.jsxs)(Jl.Fragment,{children:[(0,Jl.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,Jl.jsx)(nUe,{...t})]})},"withPatternOverrideControls");function nUe(e){let t=(0,oN.useBlockEditingMode)(),{hasPatternOverridesSource:r,isEditingSyncedPattern:o}=(0,D9.useSelect)(c=>{let{getCurrentPostType:u,getEditedPostAttribute:d}=c(T);return{hasPatternOverridesSource:!!(0,Pge.getBlockBindingsSource)("core/pattern-overrides"),isEditingSyncedPattern:u()===rUe.user&&d("meta")?.wp_pattern_sync_status!==_ge.unsynced&&d("wp_pattern_sync_status")!==_ge.unsynced}},[]),n=e.attributes.metadata?.bindings,i=!!n&&Object.values(n).some(c=>c.source==="core/pattern-overrides"),a=o&&t==="default",l=!o&&!!e.attributes.metadata?.name&&t!=="disabled"&&i;return r?(0,Jl.jsxs)(Jl.Fragment,{children:[a&&(0,Jl.jsx)(eUe,{...e}),l&&(0,Jl.jsx)(tUe,{...e})]}):null}(0,xge.addFilter)("editor.BlockEdit","core/editor/with-pattern-override-controls",oUe);var Ege=s(tn(),1),kge=s(we(),1),Rge=s(V(),1),L9=s(N(),1),uw=s(ce(),1),nN=s(H(),1),Age=s(U(),1),mu=s(x(),1),iUe=["core/navigation-link","core/navigation-submenu"];function sUe({attributes:e}){let{kind:t,id:r,type:o}=e,n=(0,uw.useBlockEditingMode)(),i=(0,Age.useSelect)(l=>l(uw.store).getSettings().onNavigateToEntityRecord,[]),a=(0,Rge.useCallback)(()=>{t==="post-type"&&o==="page"&&r&&i&&i({postId:r,postType:o})},[t,r,o,i]);return t!=="post-type"||o!=="page"||!r||!i||n!=="contentOnly"?null:(0,mu.jsx)(uw.__unstableBlockToolbarLastItem,{children:(0,mu.jsx)(nN.ToolbarGroup,{children:(0,mu.jsx)(nN.ToolbarButton,{name:"view",title:(0,L9.__)("View"),onClick:a,children:(0,L9.__)("View")})})})}var aUe=(0,kge.createHigherOrderComponent)(e=>t=>{let r=iUe.includes(t.name);return(0,mu.jsxs)(mu.Fragment,{children:[(0,mu.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,mu.jsx)(sUe,{...t})]})},"withNavigationViewButton");(0,Ege.addFilter)("editor.BlockEdit","core/editor/with-navigation-view-button",aUe);var Ige=s(tn(),1),Oge=s(we(),1),Nge=s(V(),1),B9=s(N(),1),dw=s(ce(),1),iN=s(H(),1),Rp=s(U(),1);var pu=s(x(),1),lUe="core/navigation",cUe="core/template-part",uUe="edit-post/block";function dUe({clientId:e}){let t=(0,Rp.useRegistry)(),{selectBlock:r,flashBlock:o}=(0,Rp.useDispatch)(dw.store),{requestInspectorTab:n}=Y((0,Rp.useDispatch)(dw.store)),{enableComplementaryArea:i}=(0,Rp.useDispatch)(Me),{hasNavigationBlocks:a,firstNavigationBlockId:l,isNavigationEditable:c}=(0,Rp.useSelect)(d=>{let{getClientIdsOfDescendants:f,getBlockName:m,getBlockEditingMode:h}=d(dw.store),v=f(e).filter(S=>m(S)===lUe),y=v.length>0,b=y?v[0]:null;return{hasNavigationBlocks:y,firstNavigationBlockId:b,isNavigationEditable:h(b)!=="disabled"}},[e]),u=(0,Nge.useCallback)(()=>{l&&t.batch(()=>{r(l),o(l,500),i("core",uUe),n("list",{openPanel:l})})},[l,t,r,o,i,n]);return!a||!c?null:(0,pu.jsx)(dw.__unstableBlockToolbarLastItem,{children:(0,pu.jsx)(iN.ToolbarGroup,{children:(0,pu.jsx)(iN.ToolbarButton,{label:(0,B9.__)("Edit navigation"),onClick:u,children:(0,B9.__)("Edit navigation")})})})}var fUe=(0,Oge.createHigherOrderComponent)(e=>t=>{let r=t.name===cUe;return(0,pu.jsxs)(pu.Fragment,{children:[(0,pu.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,pu.jsx)(dUe,{clientId:t.clientId})]})},"withTemplatePartNavigationEditButton");(0,Ige.addFilter)("editor.BlockEdit","core/editor/with-template-part-navigation-edit-button",fUe);var Dge=s(tn(),1),Lge=s(we(),1),Ap=s(ce(),1),Qx=s(H(),1),lf=s(N(),1),cf=s(lt(),1),aN=s(V(),1),fw=s(U(),1),Bge=s(wt(),1),Vge=s(Q(),1);function V9(e,t,r){return!e||typeof e!="object"||t.reduce((o,n,i)=>(o[n]===void 0&&(Number.isInteger(t[i+1])?o[n]=[]:o[n]={}),i===t.length-1&&(o[n]=r),o[n]),e),e}var sl=s(x(),1),{cleanEmptyObject:mUe}=Y(Ap.privateApis),Mge={...cf.__EXPERIMENTAL_STYLE_PROPERTY,blockGap:{value:["spacing","blockGap"]}},pUe={"border.color":"color","color.background":"color","color.text":"color","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.caption.color.text":"color","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",blockGap:"spacing","typography.fontSize":"font-size","typography.fontFamily":"font-family"},hUe={"border.color":"borderColor","color.background":"backgroundColor","color.text":"textColor","color.gradient":"gradient","typography.fontSize":"fontSize","typography.fontFamily":"fontFamily"},gUe=["border","color","spacing","typography"],Fge=(e,t)=>{let r=e;return t.forEach(o=>{r=r?.[o]}),r},vUe=["borderColor","borderWidth","borderStyle"],jge=["top","right","bottom","left"];function yUe(e,t,r){if(!e&&!t)return[];let o=[...sN("top",e,r),...sN("right",e,r),...sN("bottom",e,r),...sN("left",e,r)],{color:n,style:i,width:a}=e||{};return(t||n||a)&&!i&&jge.forEach(c=>{r?.[c]?.style||o.push({path:["border",c,"style"],value:"solid"})}),o}function sN(e,t,r){if(!t?.[e]||r?.[e]?.style)return[];let{color:o,style:n,width:i}=t[e];return!(o||i)||n?[]:[{path:["border",e,"style"],value:"solid"}]}function bUe(e,t,r){let o=(0,fw.useSelect)(i=>Y(i(cf.store)).getSupportedStyles(e),[e]),n=r?.styles?.blocks?.[e];return(0,aN.useMemo)(()=>{let i=o.flatMap(a=>{if(!Mge[a])return[];let{value:l}=Mge[a],c=l.join("."),u=t[hUe[c]],d=u?`var:preset|${pUe[c]}|${u}`:Fge(t.style,l);if(a==="linkColor"){let f=d?[{path:l,value:d}]:[],m=["elements","link",":hover","color","text"],h=Fge(t.style,m);return h&&f.push({path:m,value:h}),f}if(vUe.includes(a)&&d){let f=[{path:l,value:d}];return jge.forEach(m=>{let h=[...l];h.splice(-1,0,m),f.push({path:h,value:d})}),f}return d?[{path:l,value:d}]:[]});return yUe(t.style?.border,t.borderColor,n?.border).forEach(a=>i.push(a)),i},[o,t,n])}function wUe({name:e,attributes:t,setAttributes:r}){let{user:o,setUser:n}=vn(),i=bUe(e,t,o),{__unstableMarkNextChangeAsNotPersistent:a}=(0,fw.useDispatch)(Ap.store),{createSuccessNotice:l}=(0,fw.useDispatch)(Bge.store),c=(0,aN.useCallback)(()=>{if(i.length!==0&&i.length>0){let{style:u}=t,d=structuredClone(u),f=structuredClone(o);for(let{path:h,value:g}of i)V9(d,h,void 0),V9(f,["styles","blocks",e,...h],g);let m={borderColor:void 0,backgroundColor:void 0,textColor:void 0,gradient:void 0,fontSize:void 0,fontFamily:void 0,style:mUe(d)};a(),r(m),n(f,{undoIgnore:!0}),l((0,lf.sprintf)((0,lf.__)("%s styles applied."),(0,cf.getBlockType)(e).title),{type:"snackbar",actions:[{label:(0,lf.__)("Undo"),onClick(){a(),r(t),n(o,{undoIgnore:!0})}}]})}},[a,t,i,l,e,r,n,o]);return(0,sl.jsxs)(Qx.BaseControl,{className:"editor-push-changes-to-global-styles-control",help:(0,lf.sprintf)((0,lf.__)("Apply this block\u2019s typography, spacing, dimensions, and color styles to all %s blocks."),(0,cf.getBlockType)(e).title),children:[(0,sl.jsx)(Qx.BaseControl.VisualLabel,{children:(0,lf.__)("Styles")}),(0,sl.jsx)(Qx.Button,{__next40pxDefaultSize:!0,variant:"secondary",accessibleWhenDisabled:!0,disabled:i.length===0,onClick:c,children:(0,lf.__)("Apply globally")})]})}function SUe(e){let t=(0,Ap.useBlockEditingMode)(),r=(0,fw.useSelect)(i=>i(Vge.store).getCurrentTheme()?.is_block_theme,[]),o=gUe.some(i=>(0,cf.hasBlockSupport)(e.name,i));return t==="default"&&o&&r?(0,sl.jsx)(Ap.InspectorAdvancedControls,{children:(0,sl.jsx)(wUe,{...e})}):null}var _Ue=(0,Lge.createHigherOrderComponent)(e=>t=>(0,sl.jsxs)(sl.Fragment,{children:[(0,sl.jsx)(e,{...t},"edit"),t.isSelected&&(0,sl.jsx)(SUe,{...t})]}));(0,Dge.addFilter)("editor.BlockEdit","core/editor/push-changes-to-global-styles",_Ue);var Jx=s(H(),1),zge=s(x(),1),j9="__experimentalMainDashboardButton",Hge=()=>{let e=(0,Jx.__experimentalUseSlotFills)(j9);return!!(e&&e.length)},{Fill:xUe,Slot:CUe}=(0,Jx.createSlotFill)(j9),Uge=xUe,TUe=()=>{let e=(0,Jx.__experimentalUseSlotFills)(j9);return(0,zge.jsx)(CUe,{bubblesVirtually:!0,fillProps:{length:e?e.length:0}})};Uge.Slot=TUe;var lN=Uge;var MSe=s(U(),1),FSe=s(Q(),1),DSe=s(H(),1),LSe=s(N(),1);var h3=s(U(),1),zp=s(N(),1),Wbe=s(vt(),1),g3=s(ce(),1),Ybe=s(we(),1),v3=s(V(),1),qbe=s(St(),1),Kbe=s(wt(),1);var gye=s(ce(),1),vye=s(U(),1),iC=s(we(),1),yye=s(vt(),1),bye=s(V(),1);var mw=s(ce(),1),Gge=s(V(),1),cN=s(H(),1),z9=s(N(),1);var Wge=s(U(),1);var uf=s(x(),1),{useHasBlockToolbar:PUe}=Y(mw.privateApis);function Yge({isCollapsed:e,onToggle:t}){let{blockSelectionStart:r}=(0,Wge.useSelect)(i=>({blockSelectionStart:i(mw.store).getBlockSelectionStart()}),[]),o=PUe(),n=!!r;return(0,Gge.useEffect)(()=>{r&&t(!1)},[r,t]),o?(0,uf.jsxs)(uf.Fragment,{children:[(0,uf.jsx)("div",{className:K("editor-collapsible-block-toolbar",{"is-collapsed":e||!n}),children:(0,uf.jsx)(mw.BlockToolbar,{hideDragHandle:!0})}),(0,uf.jsx)(cN.Popover.Slot,{name:"block-toolbar"}),(0,uf.jsx)(cN.Button,{className:"editor-collapsible-block-toolbar__toggle",icon:e?wa:Sa,onClick:()=>{t(!e)},label:e?(0,z9.__)("Show block tools"):(0,z9.__)("Hide block tools"),size:"compact"})]}):null}var qge=s(we(),1),uN=s(U(),1),Pv=s(N(),1),Kge=s(ce(),1),pw=s(H(),1);var H9=s(V(),1),Zge=s(oa(),1),Xge=s(vt(),1);var $l=s(x(),1);function EUe({className:e,disableBlockTools:t=!1}){let{setIsInserterOpened:r,setIsListViewOpened:o}=(0,uN.useDispatch)(T),{isDistractionFree:n,isInserterOpened:i,isListViewOpen:a,listViewShortcut:l,inserterSidebarToggleRef:c,listViewToggleRef:u,showIconLabels:d}=(0,uN.useSelect)(S=>{let{get:w}=S(Xge.store),{isListViewOpened:_,getEditorMode:C,getInserterSidebarToggleRef:k,getListViewToggleRef:A}=Y(S(T)),{getShortcutRepresentation:R}=S(Zge.store);return{isInserterOpened:S(T).isInserterOpened(),isListViewOpen:_(),listViewShortcut:R("core/editor/toggle-list-view"),inserterSidebarToggleRef:k(),listViewToggleRef:A(),showIconLabels:w("core","showIconLabels"),isDistractionFree:w("core","distractionFree"),isVisualMode:C()==="visual"}},[]),f=S=>{i&&S.preventDefault()},m=(0,qge.useViewportMatch)("wide"),h=(0,Pv.__)("Document tools"),g=(0,H9.useCallback)(()=>o(!a),[o,a]),v=(0,H9.useCallback)(()=>r(!i),[i,r]),y=(0,Pv._x)("Block Inserter","Generic label for block inserter button"),b=i?(0,Pv.__)("Close"):(0,Pv.__)("Add");return(0,$l.jsx)(Kge.NavigableToolbar,{className:K("editor-document-tools","edit-post-header-toolbar",e),"aria-label":h,variant:"unstyled",children:(0,$l.jsxs)("div",{className:"editor-document-tools__left",children:[!n&&(0,$l.jsx)(pw.ToolbarButton,{ref:c,className:"editor-document-tools__inserter-toggle",variant:"primary",isPressed:i,onMouseDown:f,onClick:v,disabled:t,icon:Fu,label:d?b:y,showTooltip:!d,"aria-expanded":i}),(m||!d)&&(0,$l.jsxs)($l.Fragment,{children:[(0,$l.jsx)(pw.ToolbarItem,{as:OI,showTooltip:!d,variant:d?"tertiary":void 0,size:"compact"}),(0,$l.jsx)(pw.ToolbarItem,{as:RI,showTooltip:!d,variant:d?"tertiary":void 0,size:"compact"}),!n&&(0,$l.jsx)(pw.ToolbarButton,{className:"editor-document-tools__document-overview-toggle",icon:cS,disabled:t,isPressed:a,label:(0,Pv.__)("Document Overview"),onClick:g,shortcut:l,showTooltip:!d,variant:d?"tertiary":void 0,"aria-expanded":a,ref:u})]})]})})}var Qge=EUe;var $x=s(H(),1);var Ip=s(x(),1),U9={distractionFreeDisabled:{y:"-50px"},distractionFreeHover:{y:0},distractionFreeHidden:{y:"-50px"},visible:{y:0},hidden:{y:0}},kUe={distractionFreeDisabled:{x:"-100%"},distractionFreeHover:{x:0},distractionFreeHidden:{x:"-100%"},visible:{x:0},hidden:{x:0}};function dN({className:e,toolbar:t,center:r,settings:o}){let n=Hge();return(0,Ip.jsxs)("div",{className:K("editor-header edit-post-header",e),children:[n&&(0,Ip.jsx)($x.__unstableMotion.div,{className:"editor-header__back-button",variants:kUe,transition:{type:"tween"},children:(0,Ip.jsx)(lN.Slot,{})}),(0,Ip.jsx)($x.__unstableMotion.div,{variants:U9,className:"editor-header__toolbar",transition:{type:"tween"},children:t}),r&&(0,Ip.jsx)($x.__unstableMotion.div,{variants:U9,className:"editor-header__center",transition:{type:"tween"},children:r}),(0,Ip.jsx)($x.__unstableMotion.div,{variants:U9,transition:{type:"tween"},className:"editor-header__settings",children:o})]})}var Qr=s(N(),1),hw=s(U(),1),Y9=s(Wr(),1);var hu=s(H(),1),Ev=s(vt(),1);var Jge=s(H(),1),fN=s(U(),1),G9=s(N(),1),$ge=s(we(),1),eve=s(wt(),1);var tve=s(x(),1);function rve(){let{createNotice:e}=(0,fN.useDispatch)(eve.store),{getEditedPostContent:t}=(0,fN.useSelect)(T);function r(){return t()}function o(){e("info",(0,G9.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}let n=(0,$ge.useCopyToClipboard)(r,o);return(0,tve.jsx)(Jge.MenuItem,{ref:n,children:(0,G9.__)("Copy all blocks")})}var eC=s(N(),1),mN=s(H(),1),pN=s(U(),1),ove=s(oa(),1);var W9=s(x(),1),RUe=[{value:"visual",label:(0,eC.__)("Visual editor")},{value:"text",label:(0,eC.__)("Code editor")}];function AUe(){let{shortcut:e,isRichEditingEnabled:t,isCodeEditingEnabled:r,mode:o}=(0,pN.useSelect)(l=>({shortcut:l(ove.store).getShortcutRepresentation("core/editor/toggle-mode"),isRichEditingEnabled:l(T).getEditorSettings().richEditingEnabled,isCodeEditingEnabled:l(T).getEditorSettings().codeEditingEnabled,mode:l(T).getEditorMode()}),[]),{switchEditorMode:n}=(0,pN.useDispatch)(T),i=o;!t&&o==="visual"&&(i="text"),!r&&o==="text"&&(i="visual");let a=RUe.map(l=>(!r&&l.value==="text"&&(l={...l,disabled:!0}),!t&&l.value==="visual"&&(l={...l,disabled:!0,info:(0,eC.__)("You can enable the visual editor in your profile settings.")}),l.value!==i&&!l.disabled?{...l,shortcut:e}:l));return(0,W9.jsx)(mN.MenuGroup,{label:(0,eC.__)("Editor"),children:(0,W9.jsx)(mN.MenuItemsChoice,{choices:a,value:i,onSelect:n})})}var nve=AUe;var ive=s(H(),1),sve=s(x(),1),{Fill:ave,Slot:IUe}=(0,ive.createSlotFill)("ToolsMoreMenuGroup");ave.Slot=({fillProps:e})=>(0,sve.jsx)(IUe,{fillProps:e});var hN=ave;var lve=s(H(),1),cve=s(V(),1),uve=s(x(),1),{Fill:dve,Slot:OUe}=(0,lve.createSlotFill)(cve.Platform.OS==="web"?Symbol("ViewMoreMenuGroup"):"ViewMoreMenuGroup");dve.Slot=({fillProps:e})=>(0,uve.jsx)(OUe,{fillProps:e});var gN=dve;var Lr=s(x(),1);function vN({disabled:e=!1}){let{openModal:t}=(0,hw.useDispatch)(Me),{set:r}=(0,hw.useDispatch)(Ev.store),{toggleDistractionFree:o}=(0,hw.useDispatch)(T),n=(0,hw.useSelect)(a=>a(Ev.store).get("core","showIconLabels"),[]),i=()=>{r("core","distractionFree",!1)};return(0,Lr.jsx)(Lr.Fragment,{children:(0,Lr.jsx)(hu.DropdownMenu,{icon:zr,label:(0,Qr.__)("Options"),popoverProps:{placement:"bottom-end",className:"more-menu-dropdown__content"},toggleProps:{showTooltip:!n,...n&&{variant:"tertiary"},tooltipPosition:"bottom",size:"compact",disabled:e},children:({onClose:a})=>(0,Lr.jsxs)(Lr.Fragment,{children:[(0,Lr.jsxs)(hu.MenuGroup,{label:(0,Qr._x)("View","noun"),children:[(0,Lr.jsx)(Ev.PreferenceToggleMenuItem,{scope:"core",name:"fixedToolbar",onToggle:i,label:(0,Qr.__)("Top toolbar"),info:(0,Qr.__)("Access all block and document tools in a single place"),messageActivated:(0,Qr.__)("Top toolbar activated."),messageDeactivated:(0,Qr.__)("Top toolbar deactivated.")}),(0,Lr.jsx)(Ev.PreferenceToggleMenuItem,{scope:"core",name:"distractionFree",label:(0,Qr.__)("Distraction free"),info:(0,Qr.__)("Write with calmness"),handleToggling:!1,onToggle:()=>o({createNotice:!1}),messageActivated:(0,Qr.__)("Distraction free mode activated."),messageDeactivated:(0,Qr.__)("Distraction free mode deactivated."),shortcut:Y9.displayShortcut.primaryShift("\\")}),(0,Lr.jsx)(Ev.PreferenceToggleMenuItem,{scope:"core",name:"focusMode",label:(0,Qr.__)("Spotlight mode"),info:(0,Qr.__)("Focus on one block at a time"),messageActivated:(0,Qr.__)("Spotlight mode activated."),messageDeactivated:(0,Qr.__)("Spotlight mode deactivated.")}),(0,Lr.jsx)(gN.Slot,{fillProps:{onClose:a}})]}),(0,Lr.jsx)(nve,{}),(0,Lr.jsx)(ja.Slot,{name:"core/plugin-more-menu",label:(0,Qr.__)("Panels"),fillProps:{onClick:a}}),(0,Lr.jsxs)(hu.MenuGroup,{label:(0,Qr.__)("Tools"),children:[(0,Lr.jsx)(hu.MenuItem,{onClick:()=>t("editor/keyboard-shortcut-help"),shortcut:Y9.displayShortcut.access("h"),children:(0,Qr.__)("Keyboard shortcuts")}),(0,Lr.jsx)(rve,{}),(0,Lr.jsxs)(hu.MenuItem,{icon:ss,href:(0,Qr.__)("https://wordpress.org/documentation/article/wordpress-block-editor/"),target:"_blank",rel:"noopener",children:[(0,Qr.__)("Help"),(0,Lr.jsx)(Kt,{render:(0,Lr.jsx)("span",{}),children:(0,Qr.__)("(opens in a new tab)")})]}),(0,Lr.jsx)(hN.Slot,{fillProps:{onClose:a}})]}),(0,Lr.jsx)(hu.MenuGroup,{children:(0,Lr.jsx)(hu.MenuItem,{onClick:()=>t("editor/preferences"),children:(0,Qr.__)("Preferences")})})]})})})}var mve=s(we(),1),yN=s(U(),1);var pve=s(x(),1),fve="toggle",q9="button";function hve({forceIsDirty:e,setEntitiesSavedStatesCallback:t}){let r,o=(0,mve.useViewportMatch)("medium","<"),{togglePublishSidebar:n}=(0,yN.useDispatch)(T),{hasPublishAction:i,isBeingScheduled:a,isPending:l,isPublished:c,isPublishSidebarEnabled:u,isPublishSidebarOpened:d,isScheduled:f,postStatus:m,postStatusHasChanged:h,postType:g}=(0,yN.useSelect)(v=>({hasPublishAction:!!v(T).getCurrentPost()?._links?.["wp:action-publish"],isBeingScheduled:v(T).isEditedPostBeingScheduled(),isPending:v(T).isCurrentPostPending(),isPublished:v(T).isCurrentPostPublished(),isPublishSidebarEnabled:v(T).isPublishSidebarEnabled(),isPublishSidebarOpened:v(T).isPublishSidebarOpened(),isScheduled:v(T).isCurrentPostScheduled(),postStatus:v(T).getEditedPostAttribute("status"),postStatusHasChanged:v(T).getPostEdits()?.status,postType:v(T).getCurrentPostType()}),[]);return g===jr||c||h&&!["future","publish"].includes(m)||f&&a||l&&!i&&!o?r=q9:o||u?r=fve:r=q9,(0,pve.jsx)(B0,{forceIsDirty:e,isOpen:d,isToggle:r===fve,onToggle:n,setEntitiesSavedStatesCallback:t})}var gve=s(N(),1),vve=s(H(),1);var yve=s(Q(),1),bve=s(U(),1),wve=s(vt(),1);var Sve=s(x(),1);function _ve(){let{hasLoaded:e,permalink:t,isPublished:r,label:o,showIconLabels:n}=(0,bve.useSelect)(i=>{let a=i(T).getCurrentPostType(),l=i(yve.store).getPostType(a),{get:c}=i(wve.store);return{permalink:i(T).getPermalink(),isPublished:i(T).isCurrentPostPublished(),label:l?.labels.view_item,hasLoaded:!!l,showIconLabels:c("core","showIconLabels")}},[]);return!r||!t||!e?null:(0,Sve.jsx)(vve.Button,{icon:ss,label:o||(0,gve.__)("View post"),href:t,target:"_blank",showTooltip:!n,size:"compact"})}var xve=s(we(),1),Rs=s(H(),1),ec=s(N(),1);var tC=s(U(),1),Cve=s(Q(),1),Tve=s(vt(),1);var Pve=s(ce(),1);var Ho=s(x(),1);function Eve({forceIsAutosaveable:e,disabled:t}){let{deviceType:r,homeUrl:o,isTemplate:n,isViewable:i,showIconLabels:a,isTemplateHidden:l,templateId:c}=(0,tC.useSelect)(_=>{let{getDeviceType:C,getCurrentPostType:k,getCurrentTemplateId:A,getRenderingMode:R}=_(T),{getEntityRecord:I,getPostType:B}=_(Cve.store),{get:E}=_(Tve.store),P=k();return{deviceType:C(),homeUrl:I("root","__unstableBase")?.home,isTemplate:P==="wp_template",isViewable:B(P)?.viewable??!1,showIconLabels:E("core","showIconLabels"),isTemplateHidden:R()==="post-only",templateId:A()}},[]),{setDeviceType:u,setRenderingMode:d,setDefaultRenderingMode:f}=Y((0,tC.useDispatch)(T)),{resetZoomLevel:m}=Y((0,tC.useDispatch)(Pve.store)),h=_=>{u(_),m()};if((0,xve.useViewportMatch)("medium","<"))return null;let v={placement:"bottom-end"},y={className:"editor-preview-dropdown__toggle",iconPosition:"right",size:"compact",showTooltip:!a,disabled:t,accessibleWhenDisabled:t},b={"aria-label":(0,ec.__)("View options")},S={desktop:TT,mobile:Hv,tablet:SP},w=[{value:"Desktop",label:(0,ec.__)("Desktop"),icon:TT},{value:"Tablet",label:(0,ec.__)("Tablet"),icon:SP},{value:"Mobile",label:(0,ec.__)("Mobile"),icon:Hv}];return(0,Ho.jsx)(Rs.DropdownMenu,{className:K("editor-preview-dropdown",`editor-preview-dropdown--${r.toLowerCase()}`),popoverProps:v,toggleProps:y,menuProps:b,icon:S[r.toLowerCase()],label:(0,ec.__)("View"),disableOpenOnArrowDown:t,children:({onClose:_})=>(0,Ho.jsxs)(Ho.Fragment,{children:[(0,Ho.jsx)(Rs.MenuGroup,{children:(0,Ho.jsx)(Rs.MenuItemsChoice,{choices:w,value:r,onSelect:h})}),n&&(0,Ho.jsx)(Rs.MenuGroup,{children:(0,Ho.jsxs)(Rs.MenuItem,{href:o,target:"_blank",icon:ss,onClick:_,children:[(0,ec.__)("View site"),(0,Ho.jsx)(Kt,{render:(0,Ho.jsx)("span",{}),children:(0,ec.__)("(opens in a new tab)")})]})}),!n&&!!c&&(0,Ho.jsx)(Rs.MenuGroup,{children:(0,Ho.jsx)(Rs.MenuItem,{icon:l?void 0:Rn,isSelected:!l,role:"menuitemcheckbox",onClick:()=>{let C=l?"template-locked":"post-only";d(C),f(C),m()},children:(0,ec.__)("Show template")})}),i&&(0,Ho.jsx)(Rs.MenuGroup,{children:(0,Ho.jsx)(_p,{className:"editor-preview-dropdown__button-external",role:"menuitem",forceIsAutosaveable:e,"aria-label":(0,ec.__)("Preview in new tab"),textContent:(0,Ho.jsxs)(Ho.Fragment,{children:[(0,ec.__)("Preview in new tab"),(0,Ho.jsx)(Rs.Icon,{icon:ss})]}),onPreview:_})}),(0,Ho.jsx)(ja.Slot,{name:"core/plugin-preview-menu",fillProps:{onClick:_}})]})})}var kve=s(H(),1),K9=s(N(),1),Rve=s(V(),1),rC=s(U(),1),Z9=s(ce(),1);var X9=s(vt(),1),bN=s(oa(),1),Ave=s(Wr(),1);var Ive=s(x(),1),NUe=({disabled:e})=>{let{isZoomOut:t,showIconLabels:r,isDistractionFree:o}=(0,rC.useSelect)(u=>({isZoomOut:Y(u(Z9.store)).isZoomOut(),showIconLabels:u(X9.store).get("core","showIconLabels"),isDistractionFree:u(X9.store).get("core","distractionFree")})),{resetZoomLevel:n,setZoomLevel:i}=Y((0,rC.useDispatch)(Z9.store)),{registerShortcut:a,unregisterShortcut:l}=(0,rC.useDispatch)(bN.store);return(0,Rve.useEffect)(()=>(a({name:"core/editor/zoom",category:"global",description:(0,K9.__)("Enter or exit zoom out."),keyCombination:{modifier:(0,Ave.isAppleOS)()?"primaryShift":"secondary",character:"0"}}),()=>{l("core/editor/zoom")}),[a,l]),(0,bN.useShortcut)("core/editor/zoom",()=>{t?n():i("auto-scaled")},{isDisabled:o}),(0,Ive.jsx)(kve.Button,{accessibleWhenDisabled:!0,disabled:e,onClick:()=>{t?n():i("auto-scaled")},icon:dF,label:(0,K9.__)("Zoom Out"),isPressed:t,size:"compact",showTooltip:!r,className:"editor-zoom-out-toggle"})},Ove=NUe;var mye=s(H(),1),bw=s(V(),1),pye=s(Q(),1),MN=s(N(),1);var wN=s(H(),1),Fve=s(V(),1);var gw=s(V(),1);function Nve(e){let[t,r]=(0,gw.useState)(e),[o,n]=(0,gw.useState)(e?"loading":"idle");t!==e&&(r(e),n(e?"loading":"idle"));let i=(0,gw.useCallback)(()=>n("loaded"),[]),a=(0,gw.useCallback)(()=>n("error"),[]);return{status:o,handleLoad:i,handleError:a}}var df=s(x(),1);Ik([iA]);var Mve="#1e1e1e",MUe="#fff";function FUe({className:e,src:t,name:r,label:o,variant:n,size:i="default",borderColor:a,dimmed:l=!1,statusIndicator:c,style:u,...d}){let{status:f,handleLoad:m,handleError:h}=Nve(t),g=f==="loaded",v=n==="badge"&&!!r,y=r?r.split(/\s+/).slice(0,2).map(_=>_[0]).join("").toUpperCase():void 0,b=(0,Fve.useMemo)(()=>a&&no(a).isReadable(Mve,{level:"AA",size:"normal"})?Mve:MUe,[a]),S={...u,...a?{"--editor-avatar-outline-color":a,"--editor-avatar-name-color":b}:{}},w=(0,df.jsxs)("div",{className:K("editor-avatar",e,{"has-avatar-border-color":!!a,"has-src":g,"is-badge":v,"is-small":i==="small","is-dimmed":l}),style:S,role:r?"img":void 0,"aria-label":r||void 0,...d,children:[(0,df.jsxs)("span",{className:"editor-avatar__image",children:[t&&(0,df.jsx)("img",{src:t,alt:"",crossOrigin:"anonymous",className:"editor-avatar__img",onLoad:m,onError:h}),!g&&y]}),l&&!!c&&(0,df.jsx)("span",{className:"editor-avatar__status-indicator",children:(0,df.jsx)(wN.Icon,{icon:c})}),v&&(0,df.jsx)("span",{className:"editor-avatar__name",children:o||r})]});return r&&(!v||o)?(0,df.jsx)(wN.Tooltip,{text:r,children:w}):w}var ff=FUe;var Dve=s(V(),1),SN=s(N(),1),_N=s(x(),1);function DUe({className:e,max:t=3,children:r,...o}){let n=Dve.Children.toArray(r),i=n.slice(0,t),a=n.length-t;return(0,_N.jsxs)("div",{role:"group",className:K("editor-avatar-group",e),...o,children:[i,a>0&&(0,_N.jsx)("span",{className:"editor-avatar-group__overflow","aria-label":(0,SN.sprintf)((0,SN._n)("%d more collaborator","%d more collaborators",a),a),children:`+${a}`})]})}var Q9=DUe;var nC=s(N(),1),xN=s(H(),1);var Wve=s(Wv(),1);function mf(e){return e?.["48"]||e?.["96"]||e?.["24"]}var Vve=s(N(),1);function jve(e){return e.trim()}var oC=-16,LUe=16,Lve=20,Bve=["#C36EFF","#FF51A8","#E4780A","#FF35EE","#879F11","#46A494","#00A2C3"];function al(e){return Bve[e%Bve.length]}function zve(e,t=10){if(!e)return"";let r=(0,Vve._x)("words","Word count type. Do not translate!"),o=e.trim(),n="";if(r==="words")n=o.split(" ",t).join(" ");else if(r==="characters_excluding_spaces"){let a=o.split("",t).join(""),l=a.length-a.replaceAll(" ","").length;n=o.split("",t+l).join("")}else r==="characters_including_spaces"&&(n=o.split("",t).join(""));return n!==o?n+"\u2026":n}function Hve({threads:e,selectedNoteId:t,blockRects:r,heights:o,scrollTop:n=0}){let i={},a=Math.max(0,e.findIndex(v=>v.id===t)),l=e[a];if(!l||!r[l.id])return{positions:{}};let u=r[l.id].top||0,d=o[l.id]||0;i[l.id]=oC;let f=u+oC,m=d;for(let v=a+1;v<e.length;v++){let y=e[v],b=r[y.id];if(!b)continue;let S=b.top||0,w=o[y.id]||0,_=oC,C=f+m;S<C+LUe&&(_=C-S+Lve),i[y.id]=_,f=S+_,m=w}let h=u+oC;for(let v=a-1;v>=0;v--){let y=e[v],b=r[y.id];if(!b)continue;let S=b.top||0,w=o[y.id]||0,_=oC;S+w>h&&(_=h-S-w-Lve),i[y.id]=_,h=S+_}let g={};for(let v of e){let y=r[v.id];y&&i[v.id]!==void 0&&(g[v.id]=y.top+n+i[v.id])}return{positions:g}}function Uve(e,t,r){if(!t)return Promise.resolve(null);let o=e&&e!=="new"?`[role=treeitem][id="note-thread-${e}"]`:"[role=treeitem]:not([id])",n=r?`${o} ${r}`:o;return new Promise(i=>{if(t.querySelector(n))return i(t.querySelector(n));let a=null,l=new window.MutationObserver(()=>{t.querySelector(n)&&(clearTimeout(a),l.disconnect(),i(t.querySelector(n)))});l.observe(t,{childList:!0,subtree:!0}),a=setTimeout(()=>{l.disconnect(),i(null)},3e3)})}function xi(e,t,r){return Uve(e,t,r).then(o=>{o&&(o.focus(),o.scrollIntoView({block:"nearest"}))})}function Gve(e,t){return Uve(e,t).then(r=>{r?.scrollIntoView({block:"nearest"})})}var As=s(x(),1);function Yve({activeCollaborators:e,popoverAnchor:t,setIsPopoverVisible:r,cursorRegistry:o}){let n=i=>{o.scrollToCursor(i,{behavior:"smooth",block:"center",highlightDuration:2e3})&&((0,Wve.speak)((0,nC.__)("Scrolled to cursor"),"polite"),r(!1))};return(0,As.jsx)(xN.Popover,{anchor:t,placement:"bottom",offset:8,className:"editor-collaborators-presence__list",onClose:()=>r(!1),children:(0,As.jsxs)("div",{className:"editor-collaborators-presence__list-content",children:[(0,As.jsxs)("div",{className:"editor-collaborators-presence__list-header",children:[(0,As.jsxs)("div",{className:"editor-collaborators-presence__list-header-title",children:[(0,nC.__)("Collaborators"),(0,As.jsx)("span",{children:e.length})]}),(0,As.jsx)("div",{className:"editor-collaborators-presence__list-header-action",children:(0,As.jsx)(xN.Button,{__next40pxDefaultSize:!0,icon:rn,iconSize:24,label:(0,nC.__)("Close Collaborators List"),onClick:()=>r(!1)})})]}),(0,As.jsx)("div",{className:"editor-collaborators-presence__list-items",children:e.map(i=>{let a=i.isMe;return(0,As.jsxs)("button",{className:"editor-collaborators-presence__list-item",disabled:a,onClick:()=>n(i.clientId),children:[(0,As.jsx)(ff,{src:mf(i.collaboratorInfo.avatar_urls),name:i.collaboratorInfo.name,borderColor:a?"var(--wp-admin-theme-color)":al(i.collaboratorInfo.id),dimmed:!i.isConnected}),(0,As.jsx)("div",{className:"editor-collaborators-presence__list-item-info",children:(0,As.jsx)("div",{className:"editor-collaborators-presence__list-item-name",children:a?(0,nC.__)("You"):i.collaboratorInfo.name})})]},i.clientId)})})]})})}function BUe(e,t){e.classList.add("collaborators-overlay-cursor-highlighted"),setTimeout(()=>{e.classList.remove("collaborators-overlay-cursor-highlighted")},t)}function qve(){let e=new Map;return{registerCursor(t,r){e.set(t,r)},unregisterCursor(t){e.delete(t)},scrollToCursor(t,r){let o=e.get(t);return o?(o.scrollIntoView({behavior:r?.behavior??"smooth",block:r?.block??"center",inline:r?.inline??"nearest"}),r?.highlightDuration&&BUe(o,r.highlightDuration),!0):!1},removeAll(){e.clear()}}}var fye=s(ce(),1);var ON=s(we(),1),tc=s(V(),1),uye=s(N(),1);var CN="0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01)",J9="9999px",$9="32px",ej="24px",TN="4px",PN="8px",tj="1px",Kve="2px",Op="#fff",Zve="11px",Xve="13px",rj="499",Qve="20px";var Jve=`
205 .editor-avatar {
206 position: relative;
207 display: inline-flex;
208 align-items: center;
209 border-radius: ${J9};
210 flex-shrink: 0;
211 box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 2px) ${Op}, ${CN};
212 }
213 .editor-avatar__image {
214 box-sizing: border-box;
215 position: relative;
216 width: ${$9};
217 height: ${$9};
218 border-radius: ${J9};
219 border: 0;
220 background-color: var(--wp-admin-theme-color, #3858e9);
221 overflow: hidden;
222 overflow: clip;
223 flex-shrink: 0;
224 font-size: 0;
225 color: ${Op};
226 }
227 .is-small > .editor-avatar__image {
228 width: ${ej};
229 height: ${ej};
230 }
231 .has-avatar-border-color > .editor-avatar__image {
232 border: var(--wp-admin-border-width-focus, 2px) solid var(--editor-avatar-outline-color);
233 background-clip: padding-box;
234 }
235 .has-avatar-border-color > .editor-avatar__image::after {
236 content: "";
237 position: absolute;
238 inset: 0;
239 border-radius: inherit;
240 box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus, 2px) ${Op};
241 pointer-events: none;
242 z-index: 1;
243 }
244 .editor-avatar__img {
245 position: absolute;
246 inset: 0;
247 width: 100%;
248 height: 100%;
249 object-fit: cover;
250 border-radius: inherit;
251 opacity: 0;
252 }
253 .has-src > .editor-avatar__image > .editor-avatar__img {
254 opacity: 1;
255 }
256 .editor-avatar:not(.has-src) > .editor-avatar__image {
257 display: flex;
258 align-items: center;
259 justify-content: center;
260 font-size: ${Zve};
261 font-weight: ${rj};
262 border: 0;
263 background-clip: border-box;
264 }
265 .editor-avatar:not(.has-src) > .editor-avatar__image::after {
266 content: none;
267 }
268 .editor-avatar:not(.has-src).has-avatar-border-color > .editor-avatar__image {
269 background-color: var(--editor-avatar-outline-color);
270 }
271 .editor-avatar__name {
272 font-size: ${Xve};
273 font-weight: ${rj};
274 line-height: ${Qve};
275 color: var(--editor-avatar-name-color, ${Op});
276 min-width: 0;
277 padding-bottom: 2px; /* $grid-unit-05 / 2 */
278 overflow: hidden;
279 opacity: 0;
280 white-space: nowrap;
281 transition: opacity 0.15s cubic-bezier(0.15, 0, 0.15, 1);
282 }
283 .editor-avatar.is-badge {
284 display: inline-grid;
285 grid-template-columns: min-content 0fr;
286 column-gap: 0;
287 padding-inline-end: 0;
288 background-color: var(--wp-admin-theme-color, #3858e9);
289 transition:
290 grid-template-columns 0.3s cubic-bezier(0.15, 0, 0.15, 1),
291 column-gap 0.3s cubic-bezier(0.15, 0, 0.15, 1),
292 padding-inline-end 0.3s cubic-bezier(0.15, 0, 0.15, 1);
293 }
294 .editor-avatar.is-badge:hover {
295 grid-template-columns: min-content 1fr;
296 column-gap: ${TN};
297 padding-inline-end: ${PN};
298 transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);
299 }
300 .editor-avatar.is-badge:hover .editor-avatar__name {
301 opacity: 1;
302 transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);
303 }
304 .editor-avatar.is-badge.has-avatar-border-color {
305 background-color: var(--editor-avatar-outline-color);
306 }
307 @media (prefers-reduced-motion: reduce) {
308 .editor-avatar.is-badge,
309 .editor-avatar__name {
310 transition: none;
311 }
312 }
313 `;var $ve=`
314 .block-canvas-cover {
315 position: absolute;
316 top: 0;
317 left: 0;
318 width: 100%;
319 height: 100%;
320 pointer-events: none;
321 z-index: 20000;
322 }
323 .block-canvas-cover .collaborators-overlay-full {
324 position: absolute;
325 top: 0;
326 left: 0;
327 width: 100%;
328 height: 100%;
329 }
330 .block-canvas-cover .collaborators-overlay-fixed {
331 position: fixed;
332 width: 100%;
333 height: 100%;
334 }
335 .collaborators-overlay-user {
336 position: absolute;
337 }
338 /* Cursor lines render below avatar labels across all users. The parent
339 .collaborators-overlay-user has no z-index so it does not create a
340 stacking context \u2014 children participate in the shared overlay context. */
341 .collaborators-overlay-user-cursor {
342 position: absolute;
343 z-index: 0;
344 width: ${Kve};
345 border-radius: ${tj};
346 outline: ${tj} solid ${Op};
347 box-shadow: ${CN};
348 animation: collaborators-overlay-cursor-blink 1s infinite;
349 }
350 .collaborators-overlay-selection-rect {
351 position: absolute;
352 opacity: 0.15;
353 pointer-events: none;
354 border-radius: 2px;
355 }
356
357 /* Overlay-specific positioning applied to the Avatar cursor label. */
358 .collaborators-overlay-user-label.editor-avatar {
359 position: absolute;
360 z-index: 1;
361 transform: translate(-11px, -100%);
362 margin-top: -${TN};
363 pointer-events: auto;
364 overflow: visible;
365 width: max-content;
366 }
367 /* Avatar positioned above a highlighted block as a label. */
368 .collaborators-overlay-block-label.editor-avatar {
369 position: absolute;
370 z-index: 1;
371 transform: translateY(calc(-100% - ${PN}));
372 pointer-events: auto;
373 overflow: visible;
374 width: max-content;
375 }
376
377 @keyframes collaborators-overlay-cursor-blink {
378 0%, 45% { opacity: 1; }
379 55%, 95% { opacity: 0; }
380 100% { opacity: 1; }
381 }
382 .collaborators-overlay-cursor-highlighted .collaborators-overlay-user-cursor {
383 animation: collaborators-overlay-cursor-highlight 0.6s ease-in-out 3;
384 }
385 .collaborators-overlay-cursor-highlighted .collaborators-overlay-user-label {
386 animation: collaborators-overlay-label-highlight 0.6s ease-in-out 3;
387 }
388 @keyframes collaborators-overlay-cursor-highlight {
389 0%, 100% {
390 transform: scale(1);
391 filter: drop-shadow(0 0 0 transparent);
392 }
393 50% {
394 transform: scale(1.2);
395 filter: drop-shadow(0 0 8px currentColor);
396 }
397 }
398 @keyframes collaborators-overlay-label-highlight {
399 0%, 100% {
400 transform: translate(-11px, -100%) scale(1);
401 filter: drop-shadow(0 0 0 transparent);
402 }
403 50% {
404 transform: translate(-11px, -100%) scale(1.1);
405 filter: drop-shadow(0 0 6px currentColor);
406 }
407 }
408 .block-editor-block-list__block.is-collaborator-selected:not(:focus)::after {
409 content: "";
410 position: absolute;
411 pointer-events: none;
412 top: 0;
413 right: 0;
414 bottom: 0;
415 left: 0;
416 outline-color: var(--collaborator-outline-color);
417 outline-style: solid;
418 outline-width: calc(var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
419 outline-offset: calc(-1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
420 box-shadow: inset 0 0 0 calc((var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1)) + 0.5px) rgba(${Op}, 0.7);
421 z-index: 1;
422 }
423 @media (prefers-reduced-motion: reduce) {
424 .collaborators-overlay-user-label,
425 .collaborators-overlay-user-cursor {
426 animation: none;
427 }
428 }
429 `;function eye(e,t){let r=null,o=()=>{try{e()}catch{}r=setTimeout(o,t)};return r=setTimeout(o,t),()=>{r&&clearTimeout(r)}}var kN=s(Q(),1),yw=s(V(),1);var vw=s(V(),1);function EN(e){let[t,r]=(0,vw.useState)(0),o=(0,vw.useRef)(null),n=(0,vw.useCallback)(()=>(o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(i=>i+1)},e),()=>{o.current&&clearTimeout(o.current)}),[e]);return[t,n]}var{useActiveCollaborators:VUe,useResolvedSelection:jUe}=Y(kN.privateApis);function tye(e,t,r,o,n){let i=(0,yw.useRef)(new Set),a=VUe(r??null,o??null),l=jUe(r??null,o??null),[c,u]=(0,yw.useState)([]),[d,f]=EN(n);return(0,yw.useEffect)(()=>{if(!t){u([]);return}let m=i.current,h=new Set,g=a.filter(S=>{let w=S.editorState?.selection?.type===kN.SelectionType.WholeBlock;return!S.isMe&&w}).map(S=>{let w;try{({localClientId:w}=l(S.editorState?.selection))}catch{return null}return w?{blockId:w,color:S.isMe?"var(--wp-admin-theme-color)":al(S.collaboratorInfo.id),userName:S.collaboratorInfo.name,avatarUrl:mf(S.collaboratorInfo.avatar_urls)}:null}).filter(S=>!S||h.has(S.blockId)?!1:(h.add(S.blockId),!0)),v=new Set(g.map(S=>S.blockId));for(let S of m)if(!v.has(S)){let w=oj(t,S);w&&(w.classList.remove("is-collaborator-selected"),w.style.removeProperty("--collaborator-outline-color")),m.delete(S)}let y=[],b=e?.getBoundingClientRect()??null;return g.forEach(S=>{let{color:w,blockId:_,userName:C,avatarUrl:k}=S,A=oj(t,_);if(A&&(A.classList.add("is-collaborator-selected"),A.style.setProperty("--collaborator-outline-color",w),m.add(_),b)){let R=A.getBoundingClientRect();y.push({blockId:_,userName:C,avatarUrl:k,color:w,x:R.left-b.left,y:R.top-b.top})}}),u(y),()=>{for(let S of m){let w=oj(t,S);w&&(w.classList.remove("is-collaborator-selected"),w.style.removeProperty("--collaborator-outline-color"))}m.clear()}},[a,t,e,d,l]),{highlights:c,rerenderHighlightsAfterDelay:f}}var oj=(e,t)=>e.querySelector(`[data-block="${t}"]`);var pf=s(Q(),1),sye=s(U(),1),IN=s(V(),1),aye=s(vt(),1);var kv=s(Q(),1);var zUe=500,RN=(e,t,r,o)=>e===null||!t?null:HUe(t,e,r,o)??null,HUe=(e,t,r,o)=>{let{node:n,offset:i}=nj(e,t,r),a=r.createRange();try{a.setStart(n,i)}catch{return null}a.collapse(!0);let l=a.getBoundingClientRect(),c=e.getBoundingClientRect(),u=0,d=0;l.x===0&&l.y===0&&l.width===0&&l.height===0?(u=c.left-o.left,d=c.top-o.top):(u=l.left-o.left,d=l.top-o.top);let f=l.height;if(f===0){let m=r.defaultView??window;f=parseInt(m.getComputedStyle(e).lineHeight,10)||c.height}return{x:u,y:d,height:f}},AN=(e,t,r,o,n)=>{let i=t,a=r;i>a&&([i,a]=[a,i]);let l=nj(e,i,o),c=nj(e,a,o),u=o.createRange();try{u.setStart(l.node,l.offset),u.setEnd(c.node,c.offset)}catch{return null}let d=u.getClientRects(),f=[];for(let m of d){if(m.width===0&&m.height===0)continue;let h=m.left-n.left,g=m.top-n.top;f.some(y=>y.x===h&&y.y===g&&y.width===m.width&&y.height===m.height)||f.push({x:h,y:g,width:m.width,height:m.height})}return f.length>0?f:null},rye=(e,t,r)=>{let o=t.createRange();o.selectNodeContents(e);let n=o.getClientRects(),i=[];for(let a of n)a.width===0&&a.height===0||i.push({x:a.left-r.left,y:a.top-r.top,width:a.width,height:a.height});if(i.length===0){let a=e.getBoundingClientRect();a.width>0&&a.height>0&&i.push({x:a.left-r.left,y:a.top-r.top,width:a.width,height:a.height})}return i},oye=(e,t,r)=>{let o=r.querySelectorAll("[data-block]"),n=-1,i=-1;for(let l=0;l<o.length;l++){let c=o[l].getAttribute("data-block");c===e&&(n=l),c===t&&(i=l)}if(n===-1||i===-1)return[];n>i&&([n,i]=[i,n]);let a=[];for(let l=n+1;l<i;l++)a.push(o[l]);return a},nj=(e,t,r)=>{let o=r.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT),n=0,i=null,a=null,l=1;for(;a=o.nextNode();){if(l++,l>zUe)return i?{node:i,offset:0}:{node:e,offset:0};let c=a.nodeValue?.length??0;if(a.nodeType===Node.ELEMENT_NODE)if(a.nodeName==="BR"){if(n+1>=t){let u=o.nextNode();return u?.nodeType===Node.TEXT_NODE?{node:u,offset:0}:i?{node:i,offset:i.nodeValue?.length??0}:{node:e,offset:0}}n+=1;continue}else continue;if(c!==0){if(n+c>=t)return{node:a,offset:t-n};n+=c,a.nodeType===Node.TEXT_NODE&&(i=a)}}return i&&i.nodeValue?.length?{node:i,offset:i.nodeValue.length}:{node:e,offset:0}},nye=(e,t)=>e.compareDocumentPosition(t)===Node.DOCUMENT_POSITION_FOLLOWING;function iye(e,t,r,o){return e.type===kv.SelectionType.None||e.type===kv.SelectionType.WholeBlock?{}:e.type===kv.SelectionType.Cursor?UUe(t,o):r?GUe(e,t,r,o):{}}function UUe(e,t){if(!e.localClientId)return{};let r=t.editorDocument.querySelector(`[data-block="${e.localClientId}"]`);return{coords:RN(e.richTextOffset,r,t.editorDocument,t.overlayRect)}}function GUe(e,t,r,o){if(!t.localClientId||!r.localClientId||t.richTextOffset===null||r.richTextOffset===null)return{};let i=e.selectionDirection===kv.SelectionDirection.Backward?t:r,a,l=null;if(e.type===kv.SelectionType.SelectionInOneBlock){let u=WUe(t,r,o);a=u.rects,l=u.blockElement}else{let u=YUe(t,r,o);a=u.rects,l=i.localClientId===u.firstBlockClientId?u.firstBlock:u.lastBlock}if(a.length>0)return{coords:RN(i.richTextOffset,l,o.editorDocument,o.overlayRect),selectionRects:a};let c=o.editorDocument.querySelector(`[data-block="${t.localClientId}"]`);return{coords:RN(t.richTextOffset,c,o.editorDocument,o.overlayRect)}}function WUe(e,t,r){let o=r.editorDocument.querySelector(`[data-block="${e.localClientId}"]`);return!o||e.richTextOffset===null||t.richTextOffset===null?{rects:[],blockElement:null}:{rects:AN(o,e.richTextOffset,t.richTextOffset,r.editorDocument,r.overlayRect)??[],blockElement:o}}function YUe(e,t,r){let o=e,n=t,i=r.editorDocument.querySelector(`[data-block="${o.localClientId}"]`),a=r.editorDocument.querySelector(`[data-block="${n.localClientId}"]`);if(i&&a&&nye(a,i)&&(o=t,n=e,[i,a]=[a,i]),!i||!a||o.richTextOffset===null||n.richTextOffset===null||!o.localClientId||!n.localClientId)return{rects:[],firstBlock:null,lastBlock:null,firstBlockClientId:null};let l=[],c=AN(i,o.richTextOffset,Number.MAX_SAFE_INTEGER,r.editorDocument,r.overlayRect);c&&l.push(...c);let u=oye(o.localClientId,n.localClientId,r.editorDocument);for(let f of u){let m=rye(f,r.editorDocument,r.overlayRect);l.push(...m)}let d=AN(a,0,n.richTextOffset,r.editorDocument,r.overlayRect);return d&&l.push(...d),{rects:l,firstBlock:i,lastBlock:a,firstBlockClientId:o.localClientId}}var{useActiveCollaborators:qUe,useResolvedSelection:KUe}=Y(pf.privateApis);function lye(e,t,r,o,n){let i=qUe(r??null,o??null),a=KUe(r??null,o??null),l=(0,sye.useSelect)(m=>m(aye.store).get("core","showCollaborationCursor"),[]),[c,u]=(0,IN.useState)([]),[d,f]=EN(n);return(0,IN.useEffect)(()=>{if(!e||!t){u([]);return}let m=e.getBoundingClientRect(),h={editorDocument:t,overlayRect:m},g=[],v=i.some(y=>!y.isMe);i.forEach(y=>{if(y.isMe&&(!l||!v))return;let b=y.editorState?.selection??{type:pf.SelectionType.None},S={richTextOffset:null,localClientId:null},w;if(b.type===pf.SelectionType.Cursor)try{S=a(b)}catch{return}else if(b.type===pf.SelectionType.SelectionInOneBlock||b.type===pf.SelectionType.SelectionInMultipleBlocks)try{S=a({type:pf.SelectionType.Cursor,cursorPosition:b.cursorStartPosition}),w=a({type:pf.SelectionType.Cursor,cursorPosition:b.cursorEndPosition})}catch{return}let _=y.collaboratorInfo.name,C=y.clientId,k=y.isMe?"var(--wp-admin-theme-color)":al(y.collaboratorInfo.id),A=mf(y.collaboratorInfo.avatar_urls),R=iye(b,S,w,h);if(R.coords){let I={userName:_,clientId:C,color:k,avatarUrl:A,isMe:y.isMe,...R.coords};R.selectionRects&&(I.selectionRects=R.selectionRects),g.push(I)}}),u(g)},[t,a,e,i,l,d]),{cursors:c,rerenderCursorsAfterDelay:f}}var gu=s(x(),1),cye=500,ZUe=1e4;function dye({blockEditorDocument:e,postId:t,postType:r,cursorRegistry:o}){let[n,i]=(0,tc.useState)(null),{cursors:a,rerenderCursorsAfterDelay:l}=lye(n,e??null,t??null,r??null,cye),{highlights:c,rerenderHighlightsAfterDelay:u}=tye(n,e??null,t??null,r??null,cye),d=(0,tc.useCallback)(()=>{l(),u()},[l,u]),f=(0,ON.useResizeObserver)(d);(0,tc.useEffect)(()=>{let v=l(),y=u();return()=>{v(),y()}},[l,u]),(0,tc.useEffect)(()=>{if(a.length!==0)return eye(l,ZUe)},[a.length,l]);let m=(0,ON.useMergeRefs)([i,f]),h=(0,tc.useRef)(new Map);(0,tc.useEffect)(()=>{if(!o)return;let v=h.current,y=new Set(a.map(b=>b.clientId));for(let b of v.keys())y.has(b)||(o.unregisterCursor(b),v.delete(b));for(let[b,S]of v.entries())o.registerCursor(b,S);return()=>o.removeAll()},[a,o]);let g=(0,tc.useCallback)(v=>y=>{y?h.current.set(v,y):h.current.delete(v)},[]);return(0,gu.jsxs)("div",{className:"collaborators-overlay-full",ref:m,children:[(0,gu.jsx)("style",{children:Jve+$ve}),a.map(v=>(0,gu.jsxs)("div",{children:[!v.isMe&&v.selectionRects?.map((y,b)=>(0,gu.jsx)("div",{className:"collaborators-overlay-selection-rect",style:{left:`${y.x}px`,top:`${y.y}px`,width:`${y.width}px`,height:`${y.height}px`,backgroundColor:v.color}},`${v.clientId}-sel-${b}`)),(0,gu.jsxs)("div",{ref:g(v.clientId),className:"collaborators-overlay-user",style:{left:`${v.x}px`,top:`${v.y}px`},children:[!v.isMe&&(0,gu.jsx)("div",{className:"collaborators-overlay-user-cursor",style:{backgroundColor:v.color,height:`${v.height}px`}}),(0,gu.jsx)(ff,{className:"collaborators-overlay-user-label",variant:"badge",size:"small",src:v.avatarUrl,name:v.userName,label:v.isMe?(0,uye.__)("You"):void 0,borderColor:v.color})]})]},v.clientId)),c.map(v=>(0,gu.jsx)(ff,{className:"collaborators-overlay-block-label",variant:"badge",size:"small",src:v.avatarUrl,name:v.userName,borderColor:v.color,style:{left:`${v.x}px`,top:`${v.y}px`}},v.blockId))]})}var ij=s(x(),1),{BlockCanvasCover:XUe}=Y(fye.privateApis);function NN({postId:e,postType:t,cursorRegistry:r}){return(0,ij.jsx)(XUe.Fill,{children:({containerRef:o})=>(0,ij.jsx)(dye,{blockEditorDocument:o.current?.ownerDocument,postId:e,postType:t,cursorRegistry:r})})}var ll=s(x(),1),{useActiveCollaborators:QUe}=Y(pye.privateApis);function hye({postId:e,postType:t}){let r=QUe(e,t),o=r.filter(f=>!f.isMe),n=(0,bw.useMemo)(()=>[...r].sort((f,m)=>f.isMe&&!m.isMe?-1:!f.isMe&&m.isMe?1:0),[r]),[i]=(0,bw.useState)(qve),[a,l]=(0,bw.useState)(!1),[c,u]=(0,bw.useState)(null);if(o.length===0)return null;let d=r.find(f=>f.isMe);return(0,ll.jsxs)(ll.Fragment,{children:[(0,ll.jsxs)("div",{className:"editor-collaborators-presence",children:[(0,ll.jsx)(mye.Button,{__next40pxDefaultSize:!0,className:"editor-collaborators-presence__button",onClick:()=>l(!a),isPressed:a,ref:u,"aria-label":(0,MN.sprintf)((0,MN.__)("Collaborators list, %d online"),n.length),children:(0,ll.jsxs)(Q9,{max:4,children:[d&&(0,ll.jsx)(ff,{src:mf(d.collaboratorInfo.avatar_urls),name:d.collaboratorInfo.name,borderColor:"var(--wp-admin-theme-color)",size:"small"},d.clientId),o.map(f=>(0,ll.jsx)(ff,{src:mf(f.collaboratorInfo.avatar_urls),name:f.collaboratorInfo.name,borderColor:al(f.collaboratorInfo.id),size:"small"},f.clientId))]})}),a&&(0,ll.jsx)(Yve,{activeCollaborators:n,popoverAnchor:c,setIsPopoverVisible:l,cursorRegistry:i})]}),(0,ll.jsx)(NN,{postId:e,postType:t,cursorRegistry:i})]})}var ho=s(x(),1);function JUe({customSaveButton:e,forceIsDirty:t,setEntitiesSavedStatesCallback:r}){let o=(0,iC.useViewportMatch)("large"),n=(0,iC.useViewportMatch)("medium"),i=(0,iC.useMediaQuery)("(max-width: 403px)"),{postId:a,postType:l,isTextEditor:c,isPublishSidebarOpened:u,showIconLabels:d,hasFixedToolbar:f,hasBlockSelection:m,hasSectionRootClientId:h,isStylesCanvasActive:g,isAttachment:v}=(0,vye.useSelect)(C=>{let{get:k}=C(yye.store),{getEditorMode:A,getCurrentPostType:R,getCurrentPostId:I,isPublishSidebarOpened:B}=C(T),{getStylesPath:E,getShowStylebook:P}=Y(C(T)),{getBlockSelectionStart:L,getSectionRootClientId:j}=Y(C(gye.store));return{postId:I(),postType:R(),isTextEditor:A()==="text",isPublishSidebarOpened:B(),showIconLabels:k("core","showIconLabels"),hasFixedToolbar:k("core","fixedToolbar"),hasBlockSelection:!!L(),hasSectionRootClientId:!!j(),isStylesCanvasActive:!!E()?.startsWith("/revisions")||P(),isAttachment:R()===jr&&window?.__experimentalMediaEditor}},[]),y=["post","page","wp_template"].includes(l)&&h,b=[jr,Ef,Oo,ba].includes(l)||g,[S,w]=(0,bye.useState)(!0);return(0,ho.jsx)(dN,{toolbar:(0,ho.jsxs)(ho.Fragment,{children:[!v&&(0,ho.jsx)(Qge,{disableBlockTools:g||c}),f&&n&&(0,ho.jsx)(Yge,{isCollapsed:S,onToggle:w})]}),center:!i&&(!f||f&&(!m||S))?(0,ho.jsxs)(ho.Fragment,{children:[(0,ho.jsx)(hye,{postType:l,postId:a}),(0,ho.jsx)(xI,{})]}):void 0,settings:(0,ho.jsxs)(ho.Fragment,{children:[!e&&!u&&(0,ho.jsx)(bO,{forceIsDirty:t}),(0,ho.jsx)(_ve,{}),(0,ho.jsx)(Eve,{forceIsAutosaveable:t,disabled:b}),(0,ho.jsx)(_p,{className:"editor-header__post-preview-button",forceIsAutosaveable:t}),o&&y&&(0,ho.jsx)(Ove,{disabled:g}),(o||!d)&&(0,ho.jsx)(Nm.Slot,{scope:"core"}),!e&&(0,ho.jsx)(hve,{forceIsDirty:t,setEntitiesSavedStatesCallback:r}),e,!v&&(0,ho.jsx)(vN,{})]})})}var wye=JUe;var sC=s(U(),1),DN=s(ce(),1),Sye=s(we(),1),aC=s(V(),1),_ye=s(vt(),1),xye=s(Wr(),1);var FN=s(x(),1),{PrivateInserterLibrary:$Ue}=Y(DN.privateApis);function Cye(){let{blockSectionRootClientId:e,inserterSidebarToggleRef:t,inserter:r,showMostUsedBlocks:o,sidebarIsOpened:n}=(0,sC.useSelect)(m=>{let{getInserterSidebarToggleRef:h,getInserter:g,isPublishSidebarOpened:v}=Y(m(T)),{getBlockRootClientId:y,isZoomOut:b,getSectionRootClientId:S}=Y(m(DN.store)),{get:w}=m(_ye.store),{getActiveComplementaryArea:_}=m(Me),C=()=>{if(b()){let k=S();if(k)return k}return y()};return{inserterSidebarToggleRef:h(),inserter:g(),showMostUsedBlocks:w("core","mostUsedBlocks"),blockSectionRootClientId:C(),sidebarIsOpened:!!(_("core")||v())}},[]),{setIsInserterOpened:i}=(0,sC.useDispatch)(T),{disableComplementaryArea:a}=(0,sC.useDispatch)(Me),l=(0,Sye.useViewportMatch)("medium","<"),c=(0,aC.useRef)(),u=(0,aC.useCallback)(()=>{i(!1),t.current?.focus()},[t,i]),d=(0,aC.useCallback)(m=>{m.keyCode===xye.ESCAPE&&!m.defaultPrevented&&(m.preventDefault(),u())},[u]),f=(0,FN.jsx)("div",{className:"editor-inserter-sidebar__content",children:(0,FN.jsx)($Ue,{showMostUsedBlocks:o,showInserterHelpPanel:!0,shouldFocusBlock:l,rootClientId:e??r.rootClientId,__experimentalInsertionIndex:r.insertionIndex,onSelect:r.onSelect,__experimentalInitialTab:r.tab,__experimentalInitialCategory:r.category,__experimentalFilterValue:r.filterValue,onPatternCategorySelection:n?()=>a("core"):void 0,ref:c,onClose:u})});return(0,FN.jsx)("div",{onKeyDown:d,className:"editor-inserter-sidebar",children:f})}var BN=s(ce(),1),VN=s(we(),1),jN=s(U(),1),sj=s(qg(),1),rc=s(V(),1),cC=s(N(),1),Pye=s(oa(),1),Eye=s(Wr(),1);var lC=s(H(),1),LN=s(N(),1);var qn=s(x(),1);function Tye(){return(0,qn.jsxs)(qn.Fragment,{children:[(0,qn.jsxs)("div",{className:"editor-list-view-sidebar__outline",children:[(0,qn.jsxs)("div",{children:[(0,qn.jsx)(lC.__experimentalText,{children:(0,LN.__)("Characters:")}),(0,qn.jsx)(lC.__experimentalText,{children:(0,qn.jsx)(lw,{})})]}),(0,qn.jsxs)("div",{children:[(0,qn.jsx)(lC.__experimentalText,{children:(0,LN.__)("Words:")}),(0,qn.jsx)(sw,{})]}),(0,qn.jsxs)("div",{children:[(0,qn.jsx)(lC.__experimentalText,{children:(0,LN.__)("Time to read:")}),(0,qn.jsx)(aw,{})]})]}),(0,qn.jsx)(p0,{})]})}var Np=s(x(),1),{TabbedSidebar:eGe}=Y(BN.privateApis);function kye(){let{setIsListViewOpened:e}=(0,jN.useDispatch)(T),{getListViewToggleRef:t}=Y((0,jN.useSelect)(T)),r=(0,VN.useFocusOnMount)("firstElement"),o=(0,rc.useCallback)(()=>{e(!1),t().current?.focus()},[t,e]),n=(0,rc.useCallback)(v=>{v.keyCode===Eye.ESCAPE&&!v.defaultPrevented&&(v.preventDefault(),o())},[o]),[i,a]=(0,rc.useState)(null),[l,c]=(0,rc.useState)("list-view"),u=(0,rc.useRef)(),d=(0,rc.useRef)(),f=(0,rc.useRef)(),m=(0,VN.useMergeRefs)([r,f,a]);function h(v){let y=sj.focus.tabbable.find(d.current)[0];if(v==="list-view"){let b=sj.focus.tabbable.find(f.current)[0];(u.current.contains(b)?b:y).focus()}else y.focus()}let g=(0,rc.useCallback)(()=>{u.current.contains(u.current.ownerDocument.activeElement)?o():h(l)},[o,l]);return(0,Pye.useShortcut)("core/editor/toggle-list-view",g),(0,Np.jsx)("div",{className:"editor-list-view-sidebar",onKeyDown:n,ref:u,children:(0,Np.jsx)(eGe,{tabs:[{name:"list-view",title:(0,cC._x)("List View","Post overview"),panel:(0,Np.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,Np.jsx)("div",{className:"editor-list-view-sidebar__list-view-panel-content",children:(0,Np.jsx)(BN.__experimentalListView,{dropZoneElement:i})})}),panelRef:m},{name:"outline",title:(0,cC._x)("Outline","Post overview"),panel:(0,Np.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,Np.jsx)(Tye,{})})}],onClose:o,onSelect:v=>c(v),defaultTabId:"list-view",ref:d,closeButtonLabel:(0,cC.__)("Close")})})}var dC=s(U(),1),uC=s(H(),1);var Fp=s(N(),1);var zN=s(U(),1),Mp=s(H(),1),Rye=s(Q(),1),hf=s(N(),1),HN=s(go(),1),Aye=s(V(),1);var oc=s(x(),1);function tGe(){let{revisions:e,perPage:t,currentRevisionId:r,revisionKey:o,revisionPage:n,totalRevisions:i}=(0,zN.useSelect)(S=>{let{getCurrentRevisionId:w,getRevisionPage:_,getPageRevisions:C,getRevisionsPerPage:k}=Y(S(T)),A=S(T).getCurrentPostType();if(!A)return{};let I=S(Rye.store).getEntityConfig("postType",A)?.revisionKey||"id",B=_();return{revisions:C(B),perPage:k(),currentRevisionId:w(),revisionKey:I,revisionPage:B,totalRevisions:S(T).getCurrentPostRevisionsCount()}},[]),{setCurrentRevisionId:a,setRevisionPage:l}=Y((0,zN.useDispatch)(T)),c=!e,u=Math.ceil(i/t)||1,d=(0,Aye.useMemo)(()=>e&&[...e].reverse(),[e]),f=d?.findIndex(S=>S[o]===r),m=S=>{let w=d?.[S];w&&a(w[o])},h=(0,HN.getSettings)(),g=S=>{let w=d?.[S];return w?(0,HN.dateI18n)(h.formats.datetime,w.date):S},v=u>1;if(c&&!v)return(0,oc.jsx)(Mp.Spinner,{});if(!c&&!d?.length)return(0,oc.jsx)("span",{className:"editor-revisions-header__no-revisions",children:(0,hf.__)("No revisions found.")});if(i<=1)return(0,oc.jsx)("span",{className:"editor-revisions-header__no-revisions",children:(0,hf.__)("Only one revision found.")});let y=S=>{let w=i-(S-1)*t,_=Math.max(1,w-t+1);return(0,hf.sprintf)((0,hf.__)("Revisions %1$s\u2013%2$s"),_,w)},b=c||f===-1?(0,oc.jsx)(Mp.Spinner,{}):(0,oc.jsx)(Mp.RangeControl,{__next40pxDefaultSize:!0,"aria-valuetext":g(f),className:"editor-revisions-header__slider",hideLabelFromVision:!0,label:(0,hf.__)("Revision"),max:d?.length-1,min:0,marks:!0,onChange:m,renderTooltipContent:g,value:f,withInputField:!1});return v?(0,oc.jsxs)(re,{direction:"row",gap:"sm",align:"center",style:{flex:1},children:[(0,oc.jsx)(Mp.Button,{icon:tr,label:n<u?y(n+1):(0,hf.__)("No older revisions"),onClick:()=>l(n+1),disabled:c||n>=u,size:"compact",accessibleWhenDisabled:!0}),(0,oc.jsx)("div",{style:{flex:1,minWidth:0,display:"flex",justifyContent:"center"},children:b}),(0,oc.jsx)(Mp.Button,{icon:rr,label:n>1?y(n-1):(0,hf.__)("No newer revisions"),onClick:()=>l(n-1),disabled:c||n<=1,size:"compact",accessibleWhenDisabled:!0})]}):b}var Iye=tGe;var Is={document:"edit-post/document",block:"edit-post/block"};var pa=s(x(),1);function rGe({showDiff:e,onToggleDiff:t}){let{currentRevisionId:r,sidebarIsOpened:o}=(0,dC.useSelect)(d=>({currentRevisionId:Y(d(T)).getCurrentRevisionId(),sidebarIsOpened:!!d(Me).getActiveComplementaryArea("core")}),[]),{setCurrentRevisionId:n,restoreRevision:i}=Y((0,dC.useDispatch)(T)),{enableComplementaryArea:a,disableComplementaryArea:l}=(0,dC.useDispatch)(Me),c=!!r,u=()=>{r&&i(r)};return(0,pa.jsx)(dN,{className:"editor-revisions-header",toolbar:(0,pa.jsx)(uC.Button,{__next40pxDefaultSize:!0,size:"compact",icon:Jp,label:(0,Fp._x)("Show changes","revisions"),isPressed:e,onClick:t}),center:(0,pa.jsx)(Iye,{}),settings:(0,pa.jsxs)(pa.Fragment,{children:[(0,pa.jsx)(_p,{className:"editor-header__post-preview-button"}),(0,pa.jsx)(uC.Button,{__next40pxDefaultSize:!0,icon:(0,Fp.isRTL)()?Kp:Nu,label:(0,Fp._x)("Settings","panel button label"),isPressed:o,"aria-expanded":o,onClick:()=>{o?l("core"):a("core",Is.document)},size:"compact"}),(0,pa.jsx)(uC.Button,{__next40pxDefaultSize:!0,variant:"secondary",size:"compact",onClick:()=>n(null),children:(0,Fp.__)("Exit")}),(0,pa.jsx)(uC.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,variant:"primary",size:"compact",className:"editor-revisions-header__restore-button",disabled:!c,onClick:u,children:(0,Fp.__)("Restore")}),(0,pa.jsx)(vN,{disabled:!0})]})})}var aj=rGe;var cbe=s(H(),1),ube=s(ce(),1),dbe=s(U(),1),fbe=s(V(),1),mbe=s(tn(),1);var Ci=s(ce(),1),sc=s(V(),1),QN=s(U(),1),mj=s(lt(),1),$ye=s(Q(),1),JN=s(we(),1);var lj=s(U(),1),Oye=s(Q(),1),UN=s(V(),1),cj=s(N(),1),Nye=s(H(),1);var Mye=s(x(),1);function Fye({contentRef:e}){let{onNavigateToEntityRecord:t,templateId:r}=(0,lj.useSelect)(a=>{let{getEditorSettings:l,getCurrentTemplateId:c}=a(T);return{onNavigateToEntityRecord:l().onNavigateToEntityRecord,templateId:c()}},[]),o=(0,lj.useSelect)(a=>!!a(Oye.store).canUser("create",{kind:"postType",name:"wp_template"}),[]),[n,i]=(0,UN.useState)(!1);return(0,UN.useEffect)(()=>{let a=c=>{o&&(!c.target.classList.contains("is-root-container")||c.target.dataset?.type==="core/template-part"||c.defaultPrevented||(c.preventDefault(),i(!0)))},l=e.current;return l?.addEventListener("dblclick",a),()=>{l?.removeEventListener("dblclick",a)}},[e,o]),o?(0,Mye.jsx)(Nye.__experimentalConfirmDialog,{isOpen:n,confirmButtonText:(0,cj.__)("Edit template"),onConfirm:()=>{i(!1),t({postId:r,postType:"wp_template"})},onCancel:()=>i(!1),size:"medium",children:(0,cj.__)("You\u2019ve tried to select a block that is part of a template that may be used elsewhere on your site. Would you like to edit the template?")}):null}var Lye=s(we(),1),GN=s(U(),1),uj=s(ce(),1);var oGe=500;function Dye(e,t,r){return Math.min(Math.max(e,t),r)}function nGe(e,t,r){let o=e-Dye(e,r.left,r.right),n=t-Dye(t,r.top,r.bottom);return Math.sqrt(o*o+n*n)}function Bye({isEnabled:e=!0}={}){let{getEnabledClientIdsTree:t,getBlockName:r,getBlockOrder:o}=Y((0,GN.useSelect)(uj.store)),{selectBlock:n}=(0,GN.useDispatch)(uj.store);return(0,Lye.useRefEffect)(i=>{if(!e)return;let a=(c,u)=>{let d=t().flatMap(({clientId:h})=>{let g=r(h);if(g==="core/template-part")return[];if(g==="core/post-content"){let v=o(h);if(v.length)return v}return[h]}),f=1/0,m=null;for(let h of d){let g=i.querySelector(`[data-block="${h}"]`);if(!g)continue;let v=g.getBoundingClientRect(),y=nGe(c,u,v);y<f&&y<oGe&&(f=y,m=h)}m&&n(m)},l=c=>{(c.target===i||c.target.classList.contains("is-root-container"))&&a(c.clientX,c.clientY)};return i.addEventListener("click",l),()=>i.removeEventListener("click",l)},[e])}var WN=s(U(),1),Vye=s(we(),1),dj=s(ce(),1);function jye(){let{getSettings:e,isZoomOut:t}=Y((0,WN.useSelect)(dj.store)),{resetZoomLevel:r}=Y((0,WN.useDispatch)(dj.store));return(0,Vye.useRefEffect)(o=>{function n(i){if(t()&&!i.defaultPrevented){i.preventDefault();let{__experimentalSetIsInserterOpened:a}=e();typeof a=="function"&&a(!1),r()}}return o.addEventListener("dblclick",n),()=>{o.removeEventListener("dblclick",n)}},[e,t,r])}var zye=s(U(),1),Hye=s(we(),1),YN=s(ce(),1),Uye=s(lt(),1),iGe=':root :where(.editor-styles-wrapper)::after {content: ""; display: block; height: 40vh;}';function Gye(e){let t=(0,zye.useRegistry)(),r=(0,Hye.useRefEffect)(o=>{function n(a){if(a.target!==o&&a.target!==o.parentElement)return;let l=o.lastElementChild;if(!l)return;let c=l.getBoundingClientRect();if(a.clientY<c.bottom)return;a.preventDefault();let u=t.select(YN.store).getBlockOrder(""),d=u[u.length-1],f=t.select(YN.store).getBlock(d),{selectBlock:m,insertDefaultBlock:h}=t.dispatch(YN.store);f&&(0,Uye.isUnmodifiedDefaultBlock)(f)?m(d):h()}let{ownerDocument:i}=o;return i.addEventListener("pointerdown",n),()=>{i.removeEventListener("pointerdown",n)}},[t]);return e?[r,iGe]:[]}var qN=s(U(),1),Wye=s(we(),1),fj=s(ce(),1);function Yye(){let{getEditedContentOnlySection:e}=Y((0,qN.useSelect)(fj.store)),{stopEditingContentOnlySection:t}=Y((0,qN.useDispatch)(fj.store));return(0,Wye.useRefEffect)(r=>{function o(n){let i=e();if(!i)return;!n.target.closest(`[data-block="${i}"]`)&&!n.defaultPrevented&&(n.preventDefault(),t())}return r.addEventListener("click",o),()=>{r.removeEventListener("click",o)}},[e,t])}var KN=s(U(),1),Kye=s(we(),1),Zye=s(lt(),1),fC=s(Q(),1),ZN=s(ce(),1),vu=s(H(),1),Xye=s(tn(),1),Dp=s(V(),1),ic=s(N(),1);var ww=s(V(),1);function qye(e){let[t,r]=(0,ww.useState)(),o=(0,ww.useRef)(!1);return(0,ww.useEffect)(()=>{if(!e)return;if(e.status==="connected"){r(void 0),o.current=!1;return}if(e.status!=="disconnected"||!e.willAutoRetryInMs)return;let{willAutoRetryInMs:n}=e,i=Date.now()+n,a=o.current;o.current=!0,a&&r(0);let l=null,c=()=>{r(Math.ceil((i-Date.now())/1e3)),l=setInterval(()=>{let d=Math.ceil((i-Date.now())/1e3);r(Math.max(0,d)),d<=0&&l&&clearInterval(l)},1e3)},u=a?setTimeout(c,500):null;return u||c(),()=>{u&&clearTimeout(u),l&&clearInterval(l)}},[e]),{onManualRetry:()=>{r(0)},secondsRemaining:t}}var nc=s(x(),1),{BlockCanvasCover:sGe}=Y(ZN.privateApis),{retrySyncConnection:aGe}=Y(fC.privateApis),lGe=2e4;function Qye(){let[e,t]=(0,Dp.useState)(!1),[r,o]=(0,Dp.useState)(!1),[n,i]=(0,Dp.useState)(!1),{connectionStatus:a,isCollaborationEnabled:l,postType:c}=(0,KN.useSelect)(w=>{let _=w(T).getCurrentPostType();return{connectionStatus:w(fC.store).getSyncConnectionStatus()||null,isCollaborationEnabled:w(T).isCollaborationEnabledForCurrentPost(),postType:_?w(fC.store).getPostType(_):null}},[]),{onManualRetry:u,secondsRemaining:d}=qye(a),f=(0,Kye.useCopyToClipboard)(()=>{let w=(0,KN.select)(ZN.store).getBlocks();return(0,Zye.serialize)(w)});(0,Dp.useEffect)(()=>{let w=setTimeout(()=>{t(!0)},lGe);return()=>clearTimeout(w)},[]),(0,Dp.useEffect)(()=>{a?.status!=="connecting"&&i(a!==null&&"canManuallyRetry"in a&&a.canManuallyRetry===!0)},[a]);let m=a&&a.status==="disconnected"&&(a.canManuallyRetry||a.willAutoRetryInMs);if((0,Dp.useEffect)(()=>{if(a?.status==="connected"){o(!1);return}a?.status&&a.status!=="connecting"&&(!m||a.backgroundRetriesFailed)&&o(!0)},[a,m]),!l||!e||!r)return null;let h=a&&"error"in a?a?.error:void 0;if(!m&&(0,Xye.applyFilters)("editor.isSyncConnectionErrorHandled",!1,h?.code)!==!1)return null;let g=n?()=>{u(),aGe()}:void 0,v=bme(h),y="",b=!1;d&&d>0?y=(0,ic.sprintf)((0,ic._n)("Retrying connection in %d second\u2026","Retrying connection in %d seconds\u2026",d),d):d===0&&(b=!0,y=(0,ic.__)("Retrying\u2026"));let S="edit.php";return c?.slug&&(S=`edit.php?post_type=${c.slug}`),(0,nc.jsx)(sGe.Fill,{children:(0,nc.jsx)(vu.Modal,{overlayClassName:"editor-sync-connection-error-modal",isDismissible:!1,onRequestClose:()=>{},shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,size:"medium",title:v.title,children:(0,nc.jsxs)(vu.__experimentalVStack,{spacing:6,children:[(0,nc.jsx)("p",{children:v.description}),y&&(0,nc.jsx)("p",{className:"editor-sync-connection-error-modal__retry-countdown",children:y}),(0,nc.jsxs)(vu.__experimentalHStack,{justify:"right",children:[(0,nc.jsx)(vu.Button,{__next40pxDefaultSize:!0,href:S,isDestructive:!0,variant:"tertiary",children:(0,ic.sprintf)((0,ic.__)("Back to %s"),c?.labels?.name??(0,ic.__)("Posts"))}),(0,nc.jsx)(vu.Button,{__next40pxDefaultSize:!0,ref:f,variant:g?"secondary":"primary",children:(0,ic.__)("Copy Post Content")}),g&&(0,nc.jsx)(vu.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,"aria-disabled":b,disabled:b,isBusy:b,variant:"primary",onClick:g,children:(0,ic.__)("Retry")})]})]})})})}var Cn=s(x(),1),{LayoutStyle:XN,useLayoutClasses:cGe,useLayoutStyles:uGe,ExperimentalBlockCanvas:dGe,useFlashEditableBlocks:fGe}=Y(Ci.privateApis);function pj(e){for(let t=0;t<e.length;t++){if(e[t].name==="core/post-content")return e[t].attributes;if(e[t].innerBlocks.length){let r=pj(e[t].innerBlocks);if(r)return r}}}function Jye(e){for(let t=0;t<e.length;t++)if(e[t].name==="core/post-content")return!0;return!1}function mGe({autoFocus:e,disableIframe:t=!1,iframeProps:r,contentRef:o,className:n}){let i=(0,JN.useViewportMatch)("small","<"),{renderingMode:a,postContentAttributes:l,editedPostTemplate:c={},wrapperBlockName:u,wrapperUniqueId:d,deviceType:f,isFocusedEntity:m,isDesignPostType:h,postType:g,isPreview:v,styles:y}=(0,QN.useSelect)(ve=>{let{getCurrentPostId:Ie,getCurrentPostType:et,getCurrentTemplateId:it,getEditorSettings:ne,getRenderingMode:$,getDeviceType:ue}=Y(ve(T)),{getPostType:oe,getEditedEntityRecord:me}=ve($ye.store),Ne=et(),Oe=$(),De;Ne===ba?De="core/block":Oe==="post-only"&&(De="core/post-content");let le=ne(),be=le.supportsTemplateMode,ge=oe(Ne),ze=it(),bt=ze?me("postType",Vt,ze):void 0;return{renderingMode:Oe,postContentAttributes:le.postContentAttributes,isDesignPostType:yl.includes(Ne),editedPostTemplate:ge?.viewable&&be?bt:void 0,wrapperBlockName:De,wrapperUniqueId:Ie(),deviceType:ue(),isFocusedEntity:!!le.onNavigateToPreviousEntityRecord,postType:Ne,isPreview:le.isPreviewMode,styles:le.styles}},[]),{isCleanNewPost:b}=(0,QN.useSelect)(T),{hasRootPaddingAwareAlignments:S,themeHasDisabledLayoutStyles:w,themeSupportsLayout:_,isZoomedOut:C}=(0,QN.useSelect)(ve=>{let{getSettings:Ie,isZoomOut:et}=Y(ve(Ci.store)),it=Ie();return{themeHasDisabledLayoutStyles:it.disableLayoutStyles,themeSupportsLayout:it.supportsLayout,hasRootPaddingAwareAlignments:it.__experimentalFeatures?.useRootPaddingAwareAlignments,isZoomedOut:et()}},[]),k=(0,sc.useRef)(),A=(0,Ci.__experimentalUseResizeCanvas)(f),[R]=(0,Ci.useSettings)("layout"),I=(0,sc.useMemo)(()=>a!=="post-only"||h?{type:"default"}:_?{...R,type:"constrained"}:{type:"default"},[a,_,R,h]),B=(0,sc.useMemo)(()=>{if(!c?.content&&!c?.blocks&&l)return l;if(c?.blocks)return pj(c?.blocks);let ve=typeof c?.content=="string"?c?.content:"";return pj((0,mj.parse)(ve))||{}},[c?.content,c?.blocks,l]),E=(0,sc.useMemo)(()=>{if(!c?.content&&!c?.blocks)return!1;if(c?.blocks)return Jye(c?.blocks);let ve=typeof c?.content=="string"?c?.content:"";return Jye((0,mj.parse)(ve))||!1},[c?.content,c?.blocks]),{layout:P={},align:L=""}=B||{},j=cGe(B,"core/post-content"),z=K({"is-layout-flow":!_},_&&j,L&&`align${L}`),W=uGe(B,"core/post-content",".block-editor-block-list__layout.is-root-container"),O=(0,sc.useMemo)(()=>P&&(P?.type==="constrained"||P?.inherit||P?.contentSize||P?.wideSize)?{...R,...P,type:"constrained"}:{...R,...P,type:"default"},[P?.type,P?.inherit,P?.contentSize,P?.wideSize,R]),M=l?O:I,D=M?.type==="default"&&!E?I:M,G=(0,Ci.__unstableUseTypingObserver)(),q=(0,sc.useRef)();(0,sc.useEffect)(()=>{!e||!b()||q?.current?.focus()},[e,b]);let Z=`.is-root-container.alignwide { max-width: var(--wp--style--global--wide-size); margin-left: auto; margin-right: auto;}
430 .is-root-container.alignwide:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);}
431 .is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;}
432 .is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}`,te=[Ef,Oo,ba].includes(g)&&!v&&!i&&!C,ie=g===Ef&&v,[Se,fe]=Gye(!v&&a==="post-only"&&!h),X="display:flex;align-items:center;justify-content:center;",ee=(0,sc.useMemo)(()=>[...y??[],{css:`:where(.block-editor-iframe__body){display:flow-root;}.is-root-container{display:flow-root;${te||ie?"min-height:0!important;":""}}
433 ${fe||""}
434 ${te?`.block-editor-iframe__html{background:var(--wp-editor-canvas-background);min-height:100vh;${X}}.block-editor-iframe__body{width:100%;}`:""}${ie?`.block-editor-iframe__body{${X}padding:var(--wp--style--block-gap,2em);}`:""}`}],[y,te,ie,fe]),pe=(0,Ci.__unstableUseTypewriter)();return o=(0,JN.useMergeRefs)([k,o,a==="post-only"?pe:null,fGe({isEnabled:a==="template-locked"}),Bye({isEnabled:a==="template-locked"}),jye(),Se,Yye()]),(0,Cn.jsxs)("div",{className:K("editor-visual-editor","edit-post-visual-editor",n,{"has-padding":m||te,"is-resizable":te,"is-iframed":!t}),children:[(0,Cn.jsx)(Qye,{}),(0,Cn.jsx)(f0,{enableResizing:te,height:"100%",children:(0,Cn.jsxs)(dGe,{shouldIframe:!t,contentRef:o,styles:ee,height:"100%",iframeProps:{...r,style:{...r?.style,...A}},children:[_&&!w&&a==="post-only"&&!h&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(XN,{selector:".editor-visual-editor__post-title-wrapper",layout:I}),(0,Cn.jsx)(XN,{selector:".block-editor-block-list__layout.is-root-container",layout:D}),L&&(0,Cn.jsx)(XN,{css:Z}),W&&(0,Cn.jsx)(XN,{layout:O,css:W})]}),a==="post-only"&&!h&&(0,Cn.jsx)("div",{className:K("editor-visual-editor__post-title-wrapper","edit-post-visual-editor__post-title-wrapper",{"has-global-padding":S}),contentEditable:!1,ref:G,style:{marginTop:"4rem"},children:(0,Cn.jsx)(zO,{ref:q})}),(0,Cn.jsxs)(Ci.RecursionProvider,{blockName:u,uniqueId:d,children:[(0,Cn.jsx)(Ci.BlockList,{className:K("is-"+f.toLowerCase()+"-preview",a!=="post-only"||h?"wp-site-blocks":`${z} wp-block-post-content`,{"has-global-padding":a==="post-only"&&!h&&S}),layout:M,dropZoneElement:t?k.current:k.current?.parentNode,__unstableDisableDropZone:a==="template-locked"}),a==="template-locked"&&(0,Cn.jsx)(Fye,{contentRef:k})]})]})})]})}var $N=mGe;var Sw=s(N(),1),e3=s(A1(),1),ebe=[{name:"revision/diff-removed",title:(0,Sw.__)("Removed"),tagName:"del",className:"revision-diff-removed"},{name:"revision/diff-added",title:(0,Sw.__)("Added"),tagName:"ins",className:"revision-diff-added"},{name:"revision/diff-format-added",title:(0,Sw.__)("Format added"),tagName:"span",className:"revision-diff-format-added"},{name:"revision/diff-format-removed",title:(0,Sw.__)("Format removed"),tagName:"span",className:"revision-diff-format-removed"},{name:"revision/diff-format-changed",title:(0,Sw.__)("Format changed"),tagName:"span",className:"revision-diff-format-changed"}];function tbe(){for(let e of ebe)(0,e3.registerFormatType)(e.name,{...e,attributes:{title:"title"},edit:()=>null})}function rbe(){for(let e of ebe)(0,e3.unregisterFormatType)(e.name)}var ha=s(V(),1),t3=s(we(),1),nbe=s(U(),1),r3=s(ce(),1),mC=s(N(),1),ibe=s(H(),1);var pC=s(x(),1),{useBlockElementRef:pGe}=Y(r3.privateApis);function sbe(e){let t=[];for(let r of e)r.__revisionDiffStatus?.status&&t.push({clientId:r.clientId,status:r.__revisionDiffStatus.status}),r.innerBlocks?.length&&t.push(...sbe(r.innerBlocks));return t}var obe={added:(0,mC.__)("Go to added block"),removed:(0,mC.__)("Go to removed block"),modified:(0,mC.__)("Go to modified block")};function hj(e){if(!e)return null;let t=e.ownerDocument,r=t.documentElement.scrollHeight,o=e.getBoundingClientRect(),n=t.documentElement.scrollTop;return{top:(o.top+n)/r*100,height:o.height/r*100}}function hGe({clientId:e,status:t,subscribe:r}){let o=(0,ha.useRef)();pGe(e,o);let[n,i]=(0,ha.useState)(()=>hj(o.current));return(0,ha.useEffect)(()=>r(()=>{i(hj(o.current))}),[r]),(0,ha.useEffect)(()=>{i(hj(o.current))},[t]),n?(0,pC.jsx)(ibe.Tooltip,{text:obe[t],children:(0,pC.jsx)("button",{className:`revision-diff-marker is-${t}`,style:{top:`${n.top}%`,height:`${Math.max(n.height,.5)}%`},onClick:()=>o.current?.focus(),"aria-label":obe[t]})}):null}function abe(){let[e,t]=(0,ha.useState)(!1),r=(0,ha.useRef)(new Set),o=(0,nbe.useSelect)(l=>l(r3.store).getBlocks(),[]),n=(0,ha.useMemo)(()=>sbe(o),[o]),i=(0,ha.useCallback)(l=>(r.current.add(l),()=>r.current.delete(l)),[]),a=(0,t3.useRefEffect)(l=>{let{ownerDocument:c}=l,{defaultView:u}=c,d=new u.ResizeObserver(()=>{r.current.forEach(f=>f())});return d.observe(c.body),()=>{d.disconnect()}},[]);return[(0,t3.useMergeRefs)([a,t]),(0,pC.jsx)("div",{className:"revision-diff-markers",role:"navigation","aria-label":(0,mC.__)("Document changes"),children:e&&n.map(({clientId:l,status:c})=>(0,pC.jsx)(hGe,{clientId:l,status:c,subscribe:i},l))},"diff-markers")]}var Os=s(x(),1),{usePrivateStyleOverride:lbe}=Y(ube.privateApis),gGe=`
435 <svg
436 xmlns="http://www.w3.org/2000/svg"
437 viewBox="0 0 0 0"
438 width="0"
439 height="0"
440 focusable="false"
441 role="none"
442 aria-hidden="true"
443 style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
444 >
445 <defs>
446 <filter id="revision-removed-filter" x="0" y="0" width="100%" height="100%">
447 <!-- Desaturate and add red tint -->
448 <feColorMatrix type="matrix"
449 values="0.5 0.3 0.2 0 0.15
450 0.2 0.2 0.1 0 0
451 0.2 0.2 0.1 0 0
452 0 0 0 0.8 0"/>
453 </filter>
454 </defs>
455 </svg>
456 `,vGe=`
457 .is-revision-added {
458 box-shadow: inset 0 0 0 9999px color-mix(in srgb, currentColor 5%, #00a32a 15%), 0 0 0 4px color-mix(in srgb, currentColor 5%, #00a32a 15%);
459 }
460 .is-revision-removed,
461 .revision-diff-removed {
462 text-decoration: line-through;
463 filter: url(#revision-removed-filter);
464 }
465 .is-revision-modified {
466 outline: 2px solid color-mix(in srgb, currentColor 30%, #dba617 70%) !important;
467 outline-offset: 2px;
468 }
469 .revision-diff-added {
470 background-color: color-mix(in srgb, currentColor 5%, #00a32a 15%);
471 text-decoration: none;
472 }
473 .revision-diff-format-added {
474 text-decoration: underline wavy color-mix(in srgb, currentColor 30%, #00a32a 70%);
475 text-decoration-thickness: 2px;
476 }
477 .revision-diff-format-removed {
478 text-decoration: underline wavy color-mix(in srgb, currentColor 20%, #d63638 80%);
479 text-decoration-thickness: 2px;
480 }
481 .revision-diff-format-changed {
482 text-decoration: underline wavy color-mix(in srgb, currentColor 30%, #dba617 70%);
483 text-decoration-thickness: 2px;
484 }
485 `;function yGe(e){return t=>{let{block:r,className:o}=t,n=r?.__revisionDiffStatus?.status,i=K(o,{"is-revision-added":n==="added","is-revision-removed":n==="removed","is-revision-modified":n==="modified"});return(0,Os.jsx)(e,{...t,className:i})}}var bGe="editor/revisions-canvas/withRevisionDiffClasses";(0,mbe.addFilter)("editor.BlockListBlock",bGe,yGe);function wGe({showDiff:e}){return lbe({css:e?vGe:""}),lbe({assets:e?gGe:"",__unstableType:"svgs"}),null}function SGe({showDiff:e}){let[t,r]=abe();return(0,Os.jsxs)(Os.Fragment,{children:[(0,Os.jsx)($N,{contentRef:t}),e&&r]})}function gj(){(0,fbe.useEffect)(()=>(tbe(),()=>{rbe()}),[]);let{revision:e,showDiff:t}=(0,dbe.useSelect)(r=>{let{getCurrentRevision:o,isShowingRevisionDiff:n}=Y(r(T));return{revision:o(),showDiff:n()}},[]);return e?(0,Os.jsxs)(Os.Fragment,{children:[(0,Os.jsx)(wGe,{showDiff:t}),(0,Os.jsx)("div",{className:"editor-revisions-canvas__content",children:(0,Os.jsx)(SGe,{showDiff:t})})]}):(0,Os.jsx)("div",{className:"editor-revisions-canvas__loading",children:(0,Os.jsx)(cbe.Spinner,{})})}var n3=s(U(),1),o3=s(V(),1),cl=s(N(),1),pbe=s(wt(),1),hbe=s(Q(),1),gbe=s(vt(),1);var{useOnCollaboratorJoin:_Ge,useOnCollaboratorLeave:xGe,useOnPostSave:CGe}=Y(hbe.privateApis),vj={COLLAB_POST_UPDATED:"collab-post-updated",COLLAB_USER_ENTERED:"collab-user-entered",COLLAB_USER_EXITED:"collab-user-exited"},yj=["publish","private","future"];function TGe(e,t,r){return r?(0,cl.sprintf)((0,cl.__)("Post published by %s."),e):yj.includes(t)?(0,cl.sprintf)((0,cl.__)("Post updated by %s."),e):(0,cl.sprintf)((0,cl.__)("Draft saved by %s."),e)}function vbe(e,t){let{postStatus:r,isCollaborationEnabled:o,showNotifications:n}=(0,n3.useSelect)(u=>{let d=u(T);return{postStatus:d.getCurrentPostAttribute("status"),isCollaborationEnabled:d.isCollaborationEnabledForCurrentPost(),showNotifications:u(gbe.store).get("core","showCollaborationNotifications")??!0}},[]),{createNotice:i}=(0,n3.useDispatch)(pbe.store),a=o&&n,l=a?e:null,c=a?t:null;_Ge(l,c,(0,o3.useCallback)((u,d)=>{d&&u.collaboratorInfo.enteredAt<d.collaboratorInfo.enteredAt||i("info",(0,cl.sprintf)((0,cl.__)("%s has joined the post."),u.collaboratorInfo.name),{id:`${vj.COLLAB_USER_ENTERED}-${u.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[i])),xGe(l,c,(0,o3.useCallback)(u=>{i("info",(0,cl.sprintf)((0,cl.__)("%s has left the post."),u.collaboratorInfo.name),{id:`${vj.COLLAB_USER_EXITED}-${u.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[i])),CGe(l,c,(0,o3.useCallback)((u,d,f)=>{if(!r)return;let m=u.postStatus??r??"draft",h=f?.postStatus??r,g=!(h&&yj.includes(h))&&yj.includes(m),v=TGe(d.collaboratorInfo.name,m,g);i("info",v,{id:`${vj.COLLAB_POST_UPDATED}-${d.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[i,r]))}var i3=s(U(),1),hC=s(H(),1),bj=s(N(),1),ybe=s(V(),1);var ul=s(x(),1),{Fill:IGt,Slot:PGe}=(0,hC.createSlotFill)("ActionsPanel");function bbe({setEntitiesSavedStatesCallback:e,closeEntitiesSavedStates:t,isEntitiesSavedStatesOpen:r,forceIsDirtyPublishPanel:o}){let{closePublishSidebar:n,togglePublishSidebar:i}=(0,i3.useDispatch)(T),{publishSidebarOpened:a,isPublishable:l,isDirty:c,hasOtherEntitiesChanges:u}=(0,i3.useSelect)(m=>{let{isPublishSidebarOpened:h,isEditedPostPublishable:g,isCurrentPostPublished:v,isEditedPostDirty:y,hasNonPostEntityChanges:b}=m(T),S=b();return{publishSidebarOpened:h(),isPublishable:!v()&&g(),isDirty:S||y(),hasOtherEntitiesChanges:S}},[]),d=(0,ybe.useCallback)(()=>e(!0),[]),f;return a?f=(0,ul.jsx)(lO,{onClose:n,forceIsDirty:o,PrePublishExtension:s5.Slot,PostPublishExtension:r5.Slot}):l&&!u?f=(0,ul.jsx)("div",{className:"editor-layout__toggle-publish-panel",children:(0,ul.jsx)(hC.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:i,"aria-expanded":!1,children:(0,bj.__)("Open publish panel")})}):f=(0,ul.jsx)("div",{className:"editor-layout__toggle-entities-saved-states-panel",children:(0,ul.jsx)(hC.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:d,"aria-expanded":!1,"aria-haspopup":"dialog",disabled:!c,accessibleWhenDisabled:!0,children:(0,bj.__)("Open save panel")})}),(0,ul.jsxs)(ul.Fragment,{children:[r&&(0,ul.jsx)(jI,{close:t,renderDialog:!0}),(0,ul.jsx)(PGe,{bubblesVirtually:!0}),!r&&f]})}var wbe=s(H(),1),s3=s(U(),1),wj=s(N(),1),Sbe=s(oa(),1),a3=s(V(),1);var gf=s(x(),1);function _be({autoFocus:e=!1}){let{switchEditorMode:t}=(0,s3.useDispatch)(T),{shortcut:r,isRichEditingEnabled:o}=(0,s3.useSelect)(i=>{let{getEditorSettings:a}=i(T),{getShortcutRepresentation:l}=i(Sbe.store);return{shortcut:l("core/editor/toggle-mode"),isRichEditingEnabled:a().richEditingEnabled}},[]),n=(0,a3.useRef)();return(0,a3.useEffect)(()=>{e||n?.current?.focus()},[e]),(0,gf.jsxs)("div",{className:"editor-text-editor",children:[o&&(0,gf.jsxs)("div",{className:"editor-text-editor__toolbar",children:[(0,gf.jsx)("h2",{children:(0,wj.__)("Editing code")}),(0,gf.jsx)(wbe.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t("visual"),shortcut:r,children:(0,wj.__)("Exit code editor")})]}),(0,gf.jsxs)("div",{className:"editor-text-editor__body",children:[(0,gf.jsx)(UO,{ref:n}),(0,gf.jsx)(Yx,{})]})]})}var xbe=s(U(),1);var Sj=s(x(),1);function _j(e){let{media:t}=(0,xbe.useSelect)(r=>({media:r(T).getCurrentPost()}),[]);return(0,Sj.jsx)(Rh,{value:t,children:(0,Sj.jsx)(y_,{...e})})}var p3=s(U(),1),zbe=s(V(),1),Hbe=s(Q(),1);var ga=s(H(),1);var Fbe=s(Q(),1),Dbe=s(U(),1),Lbe=s(V(),1),Vp=s(N(),1),Bbe=s(qg(),1);var m3=s(U(),1),vC=s(V(),1),Obe=s(N(),1),Pw=s(H(),1);var Nbe=s(Q(),1);var gC=s(U(),1),d3=s(V(),1),Abe=s(Q(),1);var dl=s(N(),1),Cbe=s(V(),1),vf=s(H(),1),xw=s(U(),1),c3=s(Q(),1),Tbe=s(wt(),1);var l3=s(St(),1);function _w(e){return typeof e.title=="string"?(0,l3.decodeEntities)(e.title):e.title&&"rendered"in e.title?(0,l3.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title?(0,l3.decodeEntities)(e.title.raw):""}var Lp=s(x(),1),EGe=({items:e,closeModal:t})=>{let[r]=e,o=_w(r),{showOnFront:n,currentHomePage:i,isSaving:a}=(0,xw.useSelect)(g=>{let{getEntityRecord:v,isSavingEntityRecord:y}=g(c3.store),b=v("root","site"),S=v("postType","page",b?.page_on_front);return{showOnFront:b?.show_on_front,currentHomePage:S,isSaving:y("root","site")}}),{saveEntityRecord:l}=(0,xw.useDispatch)(c3.store),{createSuccessNotice:c,createErrorNotice:u}=(0,xw.useDispatch)(Tbe.store);async function d(g){g.preventDefault();try{await l("root","site",{page_on_front:r.id,show_on_front:"page"}),c((0,dl.__)("Homepage updated."),{type:"snackbar"})}catch(v){let y=v.message&&v.code!=="unknown_error"?v.message:(0,dl.__)("An error occurred while setting the homepage.");u(y,{type:"snackbar"})}finally{t?.()}}let f="";n==="posts"?f=(0,dl.__)("This will replace the current homepage which is set to display latest posts."):i&&(f=(0,dl.sprintf)((0,dl.__)('This will replace the current homepage: "%s"'),_w(i)));let m=(0,dl.sprintf)((0,dl.__)('Set "%1$s" as the site homepage? %2$s'),o,f).trim(),h=(0,dl.__)("Set homepage");return(0,Lp.jsx)("form",{onSubmit:d,children:(0,Lp.jsxs)(vf.__experimentalVStack,{spacing:"5",children:[(0,Lp.jsx)(vf.__experimentalText,{children:m}),(0,Lp.jsxs)(vf.__experimentalHStack,{justify:"right",children:[(0,Lp.jsx)(vf.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:a,accessibleWhenDisabled:!0,children:(0,dl.__)("Cancel")}),(0,Lp.jsx)(vf.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:a,accessibleWhenDisabled:!0,children:h})]})]})})},Pbe=()=>{let{pageOnFront:e,pageForPosts:t}=(0,xw.useSelect)(r=>{let{getEntityRecord:o,canUser:n}=r(c3.store),i=n("read",{kind:"root",name:"site"})?o("root","site"):void 0;return{pageOnFront:i?.page_on_front,pageForPosts:i?.page_for_posts}});return(0,Cbe.useMemo)(()=>({id:"set-as-homepage",label:(0,dl.__)("Set as homepage"),isEligible(r){return!(r.status!=="publish"||r.type!=="page"||e===r.id||t===r.id)},modalFocusOnMount:"firstContentElement",RenderModal:EGe}),[t,e])};var fl=s(N(),1),Ebe=s(V(),1),yf=s(H(),1),Cw=s(U(),1),u3=s(Q(),1),kbe=s(wt(),1);var Bp=s(x(),1),kGe=({items:e,closeModal:t})=>{let[r]=e,o=_w(r),{currentPostsPage:n,isPageForPostsSet:i,isSaving:a}=(0,Cw.useSelect)(g=>{let{getEntityRecord:v,isSavingEntityRecord:y}=g(u3.store),b=v("root","site");return{currentPostsPage:v("postType","page",b?.page_for_posts),isPageForPostsSet:b?.page_for_posts!==0,isSaving:y("root","site")}}),{saveEntityRecord:l}=(0,Cw.useDispatch)(u3.store),{createSuccessNotice:c,createErrorNotice:u}=(0,Cw.useDispatch)(kbe.store);async function d(g){g.preventDefault();try{await l("root","site",{page_for_posts:r.id,show_on_front:"page"}),c((0,fl.__)("Posts page updated."),{type:"snackbar"})}catch(v){let y=v.message&&v.code!=="unknown_error"?v.message:(0,fl.__)("An error occurred while setting the posts page.");u(y,{type:"snackbar"})}finally{t?.()}}let f=i&&n?(0,fl.sprintf)((0,fl.__)('This will replace the current posts page: "%s"'),_w(n)):(0,fl.__)("This page will show the latest posts."),m=(0,fl.sprintf)((0,fl.__)('Set "%1$s" as the posts page? %2$s'),o,f),h=(0,fl.__)("Set posts page");return(0,Bp.jsx)("form",{onSubmit:d,children:(0,Bp.jsxs)(yf.__experimentalVStack,{spacing:"5",children:[(0,Bp.jsx)(yf.__experimentalText,{children:m}),(0,Bp.jsxs)(yf.__experimentalHStack,{justify:"right",children:[(0,Bp.jsx)(yf.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:a,accessibleWhenDisabled:!0,children:(0,fl.__)("Cancel")}),(0,Bp.jsx)(yf.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:a,accessibleWhenDisabled:!0,children:h})]})]})})},Rbe=()=>{let{pageOnFront:e,pageForPosts:t}=(0,Cw.useSelect)(r=>{let{getEntityRecord:o,canUser:n}=r(u3.store),i=n("read",{kind:"root",name:"site"})?o("root","site"):void 0;return{pageOnFront:i?.page_on_front,pageForPosts:i?.page_for_posts}});return(0,Ebe.useMemo)(()=>({id:"set-as-posts-page",label:(0,fl.__)("Set as posts page"),isEligible(r){return!(r.status!=="publish"||r.type!=="page"||e===r.id||t===r.id)},modalFocusOnMount:"firstContentElement",RenderModal:kGe}),[t,e])};var Ibe=s(x(),1);function f3({postType:e,onActionPerformed:t,context:r}){let{defaultActions:o}=(0,gC.useSelect)(c=>{let{getEntityActions:u}=Y(c(T));return{defaultActions:u("postType",e)}},[e]),n=(0,gC.useSelect)(c=>{if(e!=="page")return!1;let{getDefaultTemplateId:u,getEntityRecord:d,canUser:f}=c(Abe.store);if(!f("update",{kind:"root",name:"site"}))return!1;let h=u({slug:"front-page"});if(!h)return!0;let g=d("postType","wp_template",h);return g?g.slug!=="front-page":!0},[e]),i=Pbe(),a=Rbe(),{registerPostTypeSchema:l}=Y((0,gC.useDispatch)(T));return(0,d3.useEffect)(()=>{l(e)},[l,e]),(0,d3.useMemo)(()=>{let c=[...o];if(n&&c.push(i,a),c=c.sort((u,d)=>d.id==="move-to-trash"?-1:0),c=c.filter(u=>u.context?u.context===r:!0),t)for(let u=0;u<c.length;++u){if(c[u].callback){let d=c[u].callback;c[u]={...c[u],callback:(f,m)=>{d(f,{...m,onActionPerformed:h=>{m?.onActionPerformed&&m.onActionPerformed(h),t(c[u].id,h)}})}}}if(c[u].RenderModal){let d=c[u].RenderModal;c[u]={...c[u],RenderModal:f=>(0,Ibe.jsx)(d,{...f,onActionPerformed:m=>{f.onActionPerformed&&f.onActionPerformed(m),t(c[u].id,m)}})}}}return c},[r,o,t,i,a,n])}var Kn=s(x(),1),{Menu:Tw,kebabCase:RGe}=Y(Pw.privateApis);function Mbe({postType:e,postId:t,onActionPerformed:r}){let[o,n]=(0,vC.useState)(null),{item:i,permissions:a}=(0,m3.useSelect)(d=>{let{getEditedEntityRecord:f,getEntityRecordPermissions:m}=Y(d(Nbe.store));return{item:f("postType",e,t),permissions:m("postType",e,t)}},[t,e]),l=(0,vC.useMemo)(()=>({...i,permissions:a}),[i,a]),c=f3({postType:e,onActionPerformed:r}),u=(0,vC.useMemo)(()=>c.filter(d=>!d.isEligible||d.isEligible(l)),[c,l]);return(0,Kn.jsxs)(Kn.Fragment,{children:[(0,Kn.jsxs)(Tw,{placement:"bottom-end",children:[(0,Kn.jsx)(Tw.TriggerButton,{render:(0,Kn.jsx)(Pw.Button,{size:"small",icon:zr,label:(0,Obe.__)("Actions"),disabled:!u.length,accessibleWhenDisabled:!0,className:"editor-all-actions-button"})}),(0,Kn.jsx)(Tw.Popover,{children:(0,Kn.jsx)(OGe,{actions:u,items:[l],setActiveModalAction:n})})]}),!!o&&(0,Kn.jsx)(IGe,{action:o,items:[l],closeModal:()=>n(null)})]})}function AGe({action:e,onClick:t,items:r}){let o=typeof e.label=="string"?e.label:e.label(r);return(0,Kn.jsx)(Tw.Item,{onClick:t,children:(0,Kn.jsx)(Tw.ItemLabel,{children:o})})}function IGe({action:e,items:t,closeModal:r}){let o=typeof e.label=="string"?e.label:e.label(t);return(0,Kn.jsx)(Pw.Modal,{title:e.modalHeader||o,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:r??(()=>{}),focusOnMount:"firstContentElement",size:"medium",overlayClassName:`editor-action-modal editor-action-modal__${RGe(e.id)}`,children:(0,Kn.jsx)(e.RenderModal,{items:t,closeModal:r})})}function OGe({actions:e,items:t,setActiveModalAction:r}){let o=(0,m3.useRegistry)();return(0,Kn.jsx)(Tw.Group,{children:e.map(n=>(0,Kn.jsx)(AGe,{action:n,onClick:()=>{if("RenderModal"in n){r(n);return}n.callback(t,{registry:o})},items:t},n.id))})}var ac=s(x(),1),{Badge:NGe}=Y(ga.privateApis);function yu({postType:e,postId:t,hideActions:r=!1,onActionPerformed:o,onClose:n}){let i=(0,Lbe.useMemo)(()=>Array.isArray(t)?t:[t],[t]),{postTitle:a,icon:l,labels:c}=(0,Dbe.useSelect)(f=>{let{getEditedEntityRecord:m,getCurrentTheme:h,getPostType:g}=f(Fbe.store),{getPostIcon:v,getCurrentPostType:y,isRevisionsMode:b,getCurrentRevision:S}=Y(f(T)),w="";if(b()){let C=y(),k=S();return w=k?.title?.rendered||k?.title?.raw||"",{postTitle:w,icon:v(C,{area:k?.area}),labels:g(C)?.labels}}let _=m("postType",e,i[0]);if(i.length===1){let{default_template_types:C=[]}=h()??{};w=([Vt,Oo].includes(e)?_a({template:_,templateTypes:C}):{})?.title||_?.title}return{postTitle:w,icon:v(e,{area:_?.area}),labels:g(e)?.labels}},[i,e]),u=aI(t),d=(0,Vp.__)("No title");return c?.name&&i.length>1?d=(0,Vp.sprintf)((0,Vp.__)("%1$d %2$s"),i.length,c?.name):a&&(d=(0,Bbe.__unstableStripHTML)(a)),(0,ac.jsxs)(ga.__experimentalVStack,{spacing:1,className:"editor-post-card-panel",children:[(0,ac.jsxs)(ga.__experimentalHStack,{spacing:2,className:"editor-post-card-panel__header",alignment:"flex-start",children:[(0,ac.jsx)(ga.Icon,{className:"editor-post-card-panel__icon",icon:l}),(0,ac.jsxs)(ga.__experimentalText,{numberOfLines:2,truncate:!0,className:"editor-post-card-panel__title",as:"h2",children:[(0,ac.jsx)("span",{className:"editor-post-card-panel__title-name",children:d}),u&&i.length===1&&(0,ac.jsx)(NGe,{children:u})]}),!r&&i.length===1&&(0,ac.jsx)(Mbe,{postType:e,postId:i[0],onActionPerformed:o}),n&&(0,ac.jsx)(ga.Button,{size:"small",icon:$w,label:(0,Vp.__)("Close"),onClick:n})]}),i.length>1&&(0,ac.jsx)(ga.__experimentalText,{className:"editor-post-card-panel__description",children:(0,Vp.sprintf)((0,Vp.__)("Changes will be applied to all selected %s."),c?.name.toLowerCase())})]})}var Vbe=s(H(),1),jbe=s(x(),1);function MGe({className:e,children:t}){return(0,jbe.jsx)(Vbe.__experimentalVStack,{className:K("editor-post-panel__section",e),children:t})}var jp=MGe;var yC=s(x(),1);function xj({onActionPerformed:e}){let{media:t,postType:r,postId:o}=(0,p3.useSelect)(c=>{let u=c(T).getCurrentPostType(),d=c(T).getCurrentPostId();return{media:c(Hbe.store).getEditedEntityRecord("postType",u,d,{_embed:"author,wp:attached-to"}),postType:u,postId:d}},[]),{editPost:n}=(0,p3.useDispatch)(T),i=Zm({postType:"attachment"}),a=(0,zbe.useMemo)(()=>({fields:i}),[i]);return(0,yC.jsx)(jp,{className:"editor-media-metadata-panel",children:(0,yC.jsx)(Rh,{value:t,settings:a,onChange:c=>{n(c)},children:(0,yC.jsx)(u1,{header:(0,yC.jsx)(yu,{postType:r,postId:o,onActionPerformed:e})})})})}var Xt=s(x(),1),Ube={header:(0,zp.__)("Editor top bar"),body:(0,zp.__)("Editor content"),sidebar:(0,zp.__)("Editor settings"),actions:(0,zp.__)("Editor publish"),footer:(0,zp.__)("Editor footer")},Gbe=()=>(0,Xt.jsx)(Kbe.InlineNotices,{pinnedNoticesClassName:"editor-notices__pinned",dismissibleNoticesClassName:"editor-notices__dismissible",children:(0,Xt.jsx)(FI,{})});function Zbe({className:e,children:t,forceIsDirty:r,contentRef:o,disableIframe:n,autoFocus:i,customSaveButton:a,customSavePanel:l,forceDisableBlockTools:c,iframeProps:u}){let{mode:d,postId:f,postType:m,isAttachment:h,isInserterOpened:g,isListViewOpened:v,isDistractionFree:y,isPreviewMode:b,showBlockBreadcrumbs:S,postTypeLabel:w,stylesPath:_,showStylebook:C,isRevisionsMode:k,showDiff:A}=(0,h3.useSelect)(O=>{let{get:M}=O(Wbe.store),{getEditorSettings:D,getPostTypeLabel:G,getCurrentPostType:q,getCurrentPostId:Z}=O(T),{getStylesPath:te,getShowStylebook:ie,isRevisionsMode:Se,isShowingRevisionDiff:fe}=Y(O(T)),X=D(),ee=O(T).getEditorMode();return!X.richEditingEnabled&&ee==="visual"&&(ee="text"),!X.codeEditingEnabled&&ee==="text"&&(ee="visual"),{mode:ee,postId:Z(),postType:q(),isInserterOpened:O(T).isInserterOpened(),isListViewOpened:O(T).isListViewOpened(),isDistractionFree:M("core","distractionFree"),isPreviewMode:X.isPreviewMode,showBlockBreadcrumbs:M("core","showBlockBreadcrumbs"),postTypeLabel:G(),stylesPath:te(),showStylebook:ie(),isAttachment:q()==="attachment"&&window?.__experimentalMediaEditor,isRevisionsMode:Se(),showDiff:fe()}},[]),{setShowRevisionDiff:R}=Y((0,h3.useDispatch)(T));vbe(f,m);let I=(0,Ybe.useViewportMatch)("medium"),B=v?(0,zp.__)("Document Overview"):(0,zp.__)("Block Library"),E=!!h,P=!h&&(C||_?.startsWith("/revisions")),L=!E&&!P,[j,z]=(0,v3.useState)(!1),W=(0,v3.useCallback)(O=>{typeof j=="function"&&j(O),z(!1)},[j]);return k?(0,Xt.jsx)(lg,{className:K("editor-editor-interface",e),labels:Ube,header:(0,Xt.jsx)(aj,{showDiff:A,onToggleDiff:()=>R(!A)}),content:(0,Xt.jsx)(gj,{}),sidebar:(0,Xt.jsx)(Ha.Slot,{scope:"core"})}):(0,Xt.jsx)(lg,{isDistractionFree:y,className:K("editor-editor-interface",e,{"is-entity-save-view-open":!!j,"is-distraction-free":y&&!b}),labels:{...Ube,secondarySidebar:B},header:!b&&(0,Xt.jsx)(wye,{forceIsDirty:r,setEntitiesSavedStatesCallback:z,customSaveButton:a,forceDisableBlockTools:c}),editorNotices:(0,Xt.jsx)(Gbe,{}),secondarySidebar:!h&&!b&&d==="visual"&&(g&&(0,Xt.jsx)(Cye,{})||v&&(0,Xt.jsx)(kye,{})),sidebar:!b&&!y&&(0,Xt.jsx)(Ha.Slot,{scope:"core"}),content:(0,Xt.jsxs)(Xt.Fragment,{children:[!y&&!b&&(0,Xt.jsx)(Gbe,{}),E&&(0,Xt.jsx)(_j,{...u}),P&&(0,Xt.jsx)(Jce,{}),L&&(0,Xt.jsxs)(Xt.Fragment,{children:[!b&&d==="text"&&(0,Xt.jsx)(_be,{autoFocus:i}),!b&&!I&&d==="visual"&&(0,Xt.jsx)(g3.BlockToolbar,{hideDragHandle:!0}),(b||d==="visual")&&(0,Xt.jsx)($N,{contentRef:o,disableIframe:n,autoFocus:i,iframeProps:u}),t,(0,Xt.jsx)(NN,{postId:f,postType:m})]})]}),footer:!b&&!y&&I&&S&&d==="visual"&&(0,Xt.jsx)(g3.BlockBreadcrumb,{rootLabelText:w?(0,qbe.decodeEntities)(w):void 0}),actions:b?void 0:l||(0,Xt.jsx)(bbe,{closeEntitiesSavedStates:W,isEntitiesSavedStatesOpen:j,setEntitiesSavedStatesCallback:z,forceIsDirtyPublishPanel:r})})}var L3=s(ce(),1),PC=s(U(),1),xu=s(V(),1),Bw=s(N(),1);var Gwe=s(oa(),1),Wwe=s(H(),1);var Xbe=s(U(),1),Qbe=s(Sl(),1);var Jbe=s(x(),1),{OverridesPanel:FGe}=Y(Qbe.privateApis);function $be(){return(0,Xbe.useSelect)(t=>t(T).getCurrentPostType()==="wp_block",[])?(0,Jbe.jsx)(FGe,{}):null}var bC=s(H(),1),Oj=s(U(),1);var s0e=s(N(),1),Ew=s(U(),1),y3=s(Q(),1);var a0e=s(H(),1),Tj=s(V(),1);var e0e=s(V(),1),t0e=s(U(),1),BGe=s(vt(),1);var VGe=s(U(),1),jGe=s(vt(),1);var n0e=s(U(),1),i0e=s(Q(),1);var r0e=s(th(),1),{lock:QWt,unlock:o0e}=(0,r0e.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/views");function Cj({kind:e,name:t}){return(0,n0e.useSelect)(r=>o0e(r(i0e.store)).getViewConfig(e,t),[e,t])}var Rv=s(x(),1),zGe={layout:{type:"panel"},fields:[]};function l0e({onActionPerformed:e}){let{postType:t,postId:r}=(0,Ew.useSelect)(h=>{let{getCurrentPostType:g,getCurrentPostId:v}=h(T);return{postType:g(),postId:v()}},[]),{form:o}=Cj({kind:"postType",name:t}),n=o??zGe,i=(0,Ew.useSelect)(h=>!t||!r?null:h(y3.store).getEditedEntityRecord("postType",t,r),[t,r]),a=_0(),l=(0,Ew.useSelect)(h=>h(y3.store).getCurrentTheme()?.is_block_theme?null:h(T).getEditorSettings().availableTemplates??{},[]),c=(0,Tj.useMemo)(()=>!i||!l?i:{...i,available_templates:l},[i,l]),{editEntityRecord:u}=(0,Ew.useDispatch)(y3.store),d=Zm({postType:t}),f=(0,Tj.useMemo)(()=>d?.map(h=>h.id==="status"?{...h,elements:h.elements.filter(g=>g.value!=="trash")}:h.id==="template"?a?a==="classic"&&Object.keys(l??{}).length===0?{...h,readOnly:!0,render:()=>(0,s0e.__)("Default template")}:h:null:h).filter(Boolean),[d,a,l]);return(0,Rv.jsx)(jp,{className:"editor-post-summary",children:(0,Rv.jsxs)(a0e.__experimentalVStack,{spacing:4,children:[(0,Rv.jsx)(yu,{postType:t,postId:r,onActionPerformed:e}),(0,Rv.jsx)(c1,{data:c,fields:f,form:n,onChange:h=>{h.status&&h.status!=="future"&&i?.status==="future"&&new Date(i.date)>new Date&&(h.date=null),h.status&&h.status==="private"&&i?.password&&(h.password=""),u("postType",t,r,h)}}),(0,Rv.jsx)(ow,{onActionPerformed:e})]})})}var c0e=s(H(),1),u0e=s(U(),1),ml=s(N(),1),d0e=s(wy(),1),f0e=s(V(),1),Pj=s(Q(),1);var b3=s(x(),1),HGe=189;function m0e(){let e=(0,u0e.useSelect)(t=>{let{getEditedPostAttribute:r,getCurrentPostType:o,getCurrentPostId:n}=t(T),{canUser:i}=t(Pj.store),{getEntityRecord:a}=t(Pj.store),l=i("read",{kind:"root",name:"site"})?a("root","site"):void 0,c=o();return!(+n()===l?.page_for_posts)&&![Vt,Oo].includes(c)&&r("content")},[]);return(0,b3.jsx)(Ej,{postContent:e})}function Ej({postContent:e}){let t=(0,ml._x)("words","Word count type. Do not translate!"),r=(0,f0e.useMemo)(()=>e?(0,d0e.count)(e,t):0,[e,t]);if(!r)return null;let o=Math.round(r/HGe),n=(0,ml.sprintf)((0,ml._n)("%s word","%s words",r),r.toLocaleString()),i=o<=1?(0,ml.__)("1 minute"):(0,ml.sprintf)((0,ml._n)("%s minute","%s minutes",o),o.toLocaleString());return(0,b3.jsx)("div",{className:"editor-post-content-information",children:(0,b3.jsx)(c0e.__experimentalText,{children:(0,ml.sprintf)((0,ml.__)("%1$s, %2$s read time."),n,i)})})}var w3=s(H(),1),kw=s(N(),1),p0e=s(U(),1),S3=s(V(),1),h0e=s(ce(),1);var bf=s(x(),1);function UGe(){let{postFormat:e}=(0,p0e.useSelect)(i=>{let{getEditedPostAttribute:a}=i(T);return{postFormat:a("format")??"standard"}},[]),t=Ax.find(i=>i.id===e),[r,o]=(0,S3.useState)(null),n=(0,S3.useMemo)(()=>({anchor:r,placement:"left-start",offset:36,shift:!0}),[r]);return(0,bf.jsx)(N0,{children:(0,bf.jsx)(Nt,{label:(0,kw.__)("Format"),ref:o,children:(0,bf.jsx)(w3.Dropdown,{popoverProps:n,contentClassName:"editor-post-format__dialog",focusOnMount:!0,renderToggle:({isOpen:i,onToggle:a})=>(0,bf.jsx)(w3.Button,{size:"compact",variant:"tertiary","aria-expanded":i,"aria-label":(0,kw.sprintf)((0,kw.__)("Change format: %s"),t?.caption),onClick:a,children:t?.caption}),renderContent:({onClose:i})=>(0,bf.jsxs)("div",{className:"editor-post-format__dialog-content",children:[(0,bf.jsx)(h0e.__experimentalInspectorPopoverHeader,{title:(0,kw.__)("Format"),onClose:i}),(0,bf.jsx)(Ix,{})]})})})})}var g0e=UGe;var v0e=s(H(),1),y0e=s(U(),1),_3=s(N(),1),b0e=s(go(),1);var kj=s(x(),1);function w0e(){let e=(0,y0e.useSelect)(t=>t(T).getEditedPostAttribute("modified"),[]);return e?(0,kj.jsx)("div",{className:"editor-post-last-edited-panel",children:(0,kj.jsx)(v0e.__experimentalText,{children:(0,_3.sprintf)((0,_3.__)("Last edited %s."),(0,b0e.humanTimeDiff)(e))})}):null}var wf=s(N(),1),S0e=s(we(),1),x3=s(U(),1),Rj=s(Q(),1),_0e=s(St(),1),Rw=s(H(),1),C3=s(V(),1),x0e=s(ce(),1);var bu=s(x(),1),GGe={};function C0e(){let{editEntityRecord:e}=(0,x3.useDispatch)(Rj.store),{postsPageTitle:t,postsPageId:r,isTemplate:o,postSlug:n}=(0,x3.useSelect)(d=>{let{getEntityRecord:f,getEditedEntityRecord:m,canUser:h}=d(Rj.store),g=h("read",{kind:"root",name:"site"})?f("root","site"):void 0,v=g?.page_for_posts?m("postType","page",g?.page_for_posts):GGe,{getEditedPostAttribute:y,getCurrentPostType:b}=d(T);return{postsPageId:v?.id,postsPageTitle:v?.title,isTemplate:b()===Vt,postSlug:y("slug")}},[]),[i,a]=(0,C3.useState)(null),l=(0,C3.useMemo)(()=>({anchor:i,placement:"left-start",offset:36,shift:!0}),[i]);if(!o||!["home","index"].includes(n)||!r)return null;let c=d=>{e("postType","page",r,{title:d})},u=(0,_0e.decodeEntities)(t);return(0,bu.jsx)(Nt,{label:(0,wf.__)("Blog title"),ref:a,children:(0,bu.jsx)(Rw.Dropdown,{popoverProps:l,contentClassName:"editor-blog-title-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:d,onToggle:f})=>(0,bu.jsx)(Rw.Button,{size:"compact",variant:"tertiary","aria-expanded":d,"aria-label":(0,wf.sprintf)((0,wf.__)("Change blog title: %s"),u),onClick:f,children:u}),renderContent:({onClose:d})=>(0,bu.jsxs)(bu.Fragment,{children:[(0,bu.jsx)(x0e.__experimentalInspectorPopoverHeader,{title:(0,wf.__)("Blog title"),onClose:d}),(0,bu.jsx)(Rw.__experimentalInputControl,{placeholder:(0,wf.__)("No title"),size:"__unstable-large",value:t,onChange:(0,S0e.debounce)(c,300),label:(0,wf.__)("Blog title"),help:(0,wf.__)("Set the Posts Page title. Appears in search results, and when the page is shared on social media."),hideLabelFromVision:!0})]})})})}var Aw=s(N(),1),T3=s(U(),1),Aj=s(Q(),1),Iw=s(H(),1),P3=s(V(),1),T0e=s(ce(),1);var wu=s(x(),1);function P0e(){let{editEntityRecord:e}=(0,T3.useDispatch)(Aj.store),{postsPerPage:t,isTemplate:r,postSlug:o}=(0,T3.useSelect)(c=>{let{getEditedPostAttribute:u,getCurrentPostType:d}=c(T),{getEditedEntityRecord:f,canUser:m}=c(Aj.store),h=m("read",{kind:"root",name:"site"})?f("root","site"):void 0;return{isTemplate:d()===Vt,postSlug:u("slug"),postsPerPage:h?.posts_per_page||1}},[]),[n,i]=(0,P3.useState)(null),a=(0,P3.useMemo)(()=>({anchor:n,placement:"left-start",offset:36,shift:!0}),[n]);if(!r||!["home","index"].includes(o))return null;let l=c=>{e("root","site",void 0,{posts_per_page:c})};return(0,wu.jsx)(Nt,{label:(0,Aw.__)("Posts per page"),ref:i,children:(0,wu.jsx)(Iw.Dropdown,{popoverProps:a,contentClassName:"editor-posts-per-page-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:c,onToggle:u})=>(0,wu.jsx)(Iw.Button,{size:"compact",variant:"tertiary","aria-expanded":c,"aria-label":(0,Aw.__)("Change posts per page"),onClick:u,children:t}),renderContent:({onClose:c})=>(0,wu.jsxs)(wu.Fragment,{children:[(0,wu.jsx)(T0e.__experimentalInspectorPopoverHeader,{title:(0,Aw.__)("Posts per page"),onClose:c}),(0,wu.jsx)(Iw.__experimentalNumberControl,{placeholder:0,value:t,size:"__unstable-large",spinControls:"custom",step:"1",min:"1",onChange:l,label:(0,Aw.__)("Posts per page"),help:(0,Aw.__)("Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting."),hideLabelFromVision:!0})]})})})}var Ns=s(N(),1),E3=s(U(),1),Ij=s(Q(),1),Su=s(H(),1),k3=s(V(),1),E0e=s(ce(),1);var pl=s(x(),1),WGe=[{label:(0,Ns._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,Ns.__)("Visitors can add new comments and replies.")},{label:(0,Ns.__)("Closed"),value:"",description:[(0,Ns.__)("Visitors cannot add new comments or replies."),(0,Ns.__)("Existing comments remain visible.")].join(" ")}];function k0e(){let{editEntityRecord:e}=(0,E3.useDispatch)(Ij.store),{allowCommentsOnNewPosts:t,isTemplate:r,postSlug:o}=(0,E3.useSelect)(c=>{let{getEditedPostAttribute:u,getCurrentPostType:d}=c(T),{getEditedEntityRecord:f,canUser:m}=c(Ij.store),h=m("read",{kind:"root",name:"site"})?f("root","site"):void 0;return{isTemplate:d()===Vt,postSlug:u("slug"),allowCommentsOnNewPosts:h?.default_comment_status||""}},[]),[n,i]=(0,k3.useState)(null),a=(0,k3.useMemo)(()=>({anchor:n,placement:"left-start",offset:36,shift:!0}),[n]);if(!r||!["home","index"].includes(o))return null;let l=c=>{e("root","site",void 0,{default_comment_status:c?"open":null})};return(0,pl.jsx)(Nt,{label:(0,Ns.__)("Discussion"),ref:i,children:(0,pl.jsx)(Su.Dropdown,{popoverProps:a,contentClassName:"editor-site-discussion-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:c,onToggle:u})=>(0,pl.jsx)(Su.Button,{size:"compact",variant:"tertiary","aria-expanded":c,"aria-label":(0,Ns.__)("Change discussion settings"),onClick:u,children:t?(0,Ns.__)("Comments open"):(0,Ns.__)("Comments closed")}),renderContent:({onClose:c})=>(0,pl.jsxs)(pl.Fragment,{children:[(0,pl.jsx)(E0e.__experimentalInspectorPopoverHeader,{title:(0,Ns.__)("Discussion"),onClose:c}),(0,pl.jsxs)(Su.__experimentalVStack,{spacing:3,children:[(0,pl.jsx)(Su.__experimentalText,{children:(0,Ns.__)("Changes will apply to new posts only. Individual posts may override these settings.")}),(0,pl.jsx)(Su.RadioControl,{className:"editor-site-discussion__options",hideLabelFromVision:!0,label:(0,Ns.__)("Comment status"),options:WGe,onChange:l,selected:t})]})]})})})}var Mt=s(x(),1),YGe="post-status";function R0e({onActionPerformed:e}){let t=(0,Oj.useSelect)(r=>r(T).getCurrentPostType(),[]);return window?.__experimentalDataFormInspector&&["page","post"].includes(t)?(0,Mt.jsx)(l0e,{onActionPerformed:e}):(0,Mt.jsx)(qGe,{onActionPerformed:e})}function qGe({onActionPerformed:e}){let{isRemovedPostStatusPanel:t,postType:r,postId:o}=(0,Oj.useSelect)(n=>{let{isEditorPanelRemoved:i,getCurrentPostType:a,getCurrentPostId:l}=n(T);return{isRemovedPostStatusPanel:i(YGe),postType:a(),postId:l()}},[]);return(0,Mt.jsx)(jp,{className:"editor-post-summary",children:(0,Mt.jsx)(n5.Slot,{children:n=>(0,Mt.jsx)(Mt.Fragment,{children:(0,Mt.jsxs)(bC.__experimentalVStack,{spacing:4,children:[(0,Mt.jsx)(yu,{postType:r,postId:o,onActionPerformed:e}),(0,Mt.jsx)(F5,{withPanelBody:!1}),(0,Mt.jsx)(Qfe,{}),(0,Mt.jsxs)(bC.__experimentalVStack,{spacing:1,children:[(0,Mt.jsx)(m0e,{}),(0,Mt.jsx)(w0e,{})]}),!t&&(0,Mt.jsxs)(bC.__experimentalVStack,{spacing:4,children:[(0,Mt.jsxs)(bC.__experimentalVStack,{spacing:1,children:[(0,Mt.jsx)(x9,{}),(0,Mt.jsx)(xO,{}),(0,Mt.jsx)(JO,{}),(0,Mt.jsx)(h5,{}),(0,Mt.jsx)(l5,{}),(0,Mt.jsx)(T5,{}),(0,Mt.jsx)(pme,{}),(0,Mt.jsx)(YI,{}),(0,Mt.jsx)(PO,{}),(0,Mt.jsx)(C0e,{}),(0,Mt.jsx)(P0e,{}),(0,Mt.jsx)(k0e,{}),(0,Mt.jsx)(g0e,{}),n]}),(0,Mt.jsx)(ow,{onActionPerformed:e})]})]})})})})}var K0e=s(U(),1),wC=s(H(),1),Z0e=s(N(),1),X0e=s(vo(),1);var A0e=s(U(),1),I0e=s(Q(),1),O0e=s(St(),1),N0e=s(N(),1);var M0e=s(x(),1);function F0e(){let e=(0,A0e.useSelect)(t=>{let{getCurrentRevision:r}=Y(t(T)),o=r();return o?.author?t(I0e.store).getUser(o.author)?.name:null},[]);return e?(0,M0e.jsx)(Nt,{label:(0,N0e.__)("Author"),children:(0,O0e.decodeEntities)(e)}):null}var D0e=s(H(),1),L0e=s(U(),1),R3=s(N(),1),B0e=s(go(),1);var Nj=s(x(),1);function V0e(){let e=(0,L0e.useSelect)(t=>{let{getCurrentRevision:r}=Y(t(T));return r()?.date},[]);return e?(0,Nj.jsx)("div",{className:"editor-post-last-edited-panel",children:(0,Nj.jsx)(D0e.__experimentalText,{children:(0,R3.sprintf)((0,R3.__)("Created %s."),(0,B0e.humanTimeDiff)(e))})}):null}var H0e=s(u8(),1),U0e=s(U(),1),G0e=s(V(),1),W0e=s(N(),1);var j0e=s(H(),1);var Av=s(x(),1);function A3({title:e,entries:t,initialOpen:r}){if(!t)return null;let o=Object.entries(t).map(([n,i])=>(0,Av.jsx)(Nt,{label:n,children:(0,Av.jsx)("span",{className:"editor-revision-fields-diff__value",children:i.map((a,l)=>a.added?(0,Av.jsx)("ins",{className:"editor-revision-fields-diff__added",children:a.value},l):a.removed?(0,Av.jsx)("del",{className:"editor-revision-fields-diff__removed",children:a.value},l):(0,Av.jsx)("span",{children:a.value},l))})},n));return(0,Av.jsx)(j0e.PanelBody,{title:e,initialOpen:r,children:o})}var Y0e=s(x(),1);function z0e(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function q0e(){let{revision:e,previousRevision:t}=(0,U0e.useSelect)(o=>{let{getCurrentRevision:n,getPreviousRevision:i}=Y(o(T));return{revision:n(),previousRevision:i()}},[]),r=(0,G0e.useMemo)(()=>{if(!e)return null;let o=e.meta??{},n=t?.meta??{},i=new Set([...Object.keys(o),...Object.keys(n)]),a={};for(let l of i){let c=z0e(o[l]),u=z0e(n[l]);!c&&!u||(a[l]=(0,H0e.diffWords)(u,c))}return Object.keys(a).length===0?null:a},[e,t]);return(0,Y0e.jsx)(A3,{title:(0,W0e.__)("Meta"),entries:r,initialOpen:!1})}var Ms=s(x(),1);function Q0e(){let{revisionId:e,postId:t,postContent:r}=(0,K0e.useSelect)(o=>{let{getCurrentRevisionId:n,getCurrentRevision:i,getCurrentPostId:a}=Y(o(T)),l=n();return{revisionId:l,postId:a(),postContent:l&&i()?.content?.raw}},[]);return e?(0,Ms.jsxs)(Ms.Fragment,{children:[(0,Ms.jsx)(jp,{className:"editor-post-summary",children:(0,Ms.jsxs)(wC.__experimentalVStack,{spacing:4,children:[(0,Ms.jsx)(yu,{postId:t,hideActions:!0}),(0,Ms.jsxs)(wC.__experimentalVStack,{spacing:1,children:[(0,Ms.jsx)(Ej,{postContent:r}),(0,Ms.jsx)(V0e,{})]}),(0,Ms.jsx)(wC.ExternalLink,{href:(0,X0e.addQueryArgs)("revision.php",{revision:e}),children:(0,Z0e.__)("Open classic revisions screen")}),(0,Ms.jsx)(F0e,{})]})}),(0,Ms.jsx)(q0e,{})]}):null}var _C=s(U(),1),Fj=s(Q(),1),nwe=s(H(),1),Dj=s(N(),1),iwe=s(ce(),1),swe=s(lt(),1);var J0e=s(U(),1),$0e=s(V(),1),Mj=s(Q(),1),ewe=s(lt(),1),twe=s(Sl(),1);var{EXCLUDED_PATTERN_SOURCES:KGe,PATTERN_TYPES:ZGe}=Y(twe.privateApis);function rwe(e,t){return e.innerBlocks=e.innerBlocks.map(r=>rwe(r,t)),e.name==="core/template-part"&&e.attributes.theme===void 0&&(e.attributes.theme=t),e}function XGe(e,t){let r=(i,a,l)=>a===l.findIndex(c=>i.name===c.name),o=i=>t.area==="navigation-overlay"&&i.blockTypes?.includes("core/template-part/navigation-overlay")?!0:!KGe.includes(i.source),n=i=>i.templateTypes?.includes(t.slug)||i.blockTypes?.includes("core/template-part/"+t.area);return e.filter((i,a,l)=>r(i,a,l)&&o(i)&&n(i))}function QGe(e,t){return e.map(r=>({...r,keywords:r.keywords||[],type:ZGe.theme,blocks:(0,ewe.parse)(r.content,{__unstableSkipMigrationLogs:!0}).map(o=>rwe(o,t))}))}function owe({area:e,name:t,slug:r}){let{blockPatterns:o,restBlockPatterns:n,currentThemeStylesheet:i}=(0,J0e.useSelect)(a=>{let{getEditorSettings:l}=a(T),c=l();return{blockPatterns:c.__experimentalAdditionalBlockPatterns??c.__experimentalBlockPatterns,restBlockPatterns:a(Mj.store).getBlockPatterns(),currentThemeStylesheet:a(Mj.store).getCurrentTheme().stylesheet}},[]);return(0,$0e.useMemo)(()=>{let a=[...o||[],...n||[]],l=XGe(a,{area:e,name:t,slug:r});return QGe(l,i)},[e,t,r,o,n,i])}var SC=s(x(),1);function JGe({availableTemplates:e,onSelect:t}){return!e||e?.length===0?null:(0,SC.jsx)(iwe.__experimentalBlockPatternsList,{label:(0,Dj.__)("Templates"),blockPatterns:e,onClickPattern:t,showTitlesAsTooltip:!0})}function $Ge(){let{area:e,name:t,slug:r,postType:o,postId:n}=(0,_C.useSelect)(c=>{let{getCurrentPostType:u,getCurrentPostId:d}=c(T),{getEditedEntityRecord:f}=c(Fj.store),m=u(),h=d(),g=f("postType",m,h);return{area:g?.area,name:g?.name,slug:g?.slug,postType:m,postId:h}},[]),{editEntityRecord:i}=(0,_C.useDispatch)(Fj.store),a=owe({area:e,name:t,slug:r}),l=async c=>{await i("postType",o,n,{blocks:c.blocks,content:(0,swe.serialize)(c.blocks)})};return a?.length?(0,SC.jsx)(nwe.PanelBody,{title:(0,Dj.__)("Design"),initialOpen:o===Oo,children:(0,SC.jsx)(JGe,{availableTemplates:a,onSelect:l})}):null}function awe(){let{postType:e}=(0,_C.useSelect)(t=>{let{getCurrentPostType:r}=t(T);return{postType:r()}},[]);return[Oo,Vt].includes(e)?(0,SC.jsx)($Ge,{}):null}var lwe=s(H(),1),xC=s(N(),1),cwe=s(U(),1),uwe=s(V(),1),dwe=s(St(),1);var CC=s(x(),1),{Tabs:Lj}=Y(lwe.privateApis),eWe=(e,t)=>{let{postTypeLabel:r,isAttachment:o,isRevisionsMode:n}=(0,cwe.useSelect)(a=>{let{getPostTypeLabel:l,getCurrentPostType:c}=a(T),{isRevisionsMode:u}=Y(a(T));return{postTypeLabel:l(),isAttachment:c()===jr&&window?.__experimentalMediaEditor,isRevisionsMode:u()}},[]),i;return n?i=(0,xC.__)("Revision"):r?i=(0,dwe.decodeEntities)(r):i=(0,xC._x)("Document","noun, panel"),(0,CC.jsxs)(Lj.TabList,{ref:t,children:[(0,CC.jsx)(Lj.Tab,{tabId:Is.document,"data-tab-id":Is.document,children:i}),!o&&(0,CC.jsx)(Lj.Tab,{tabId:Is.block,"data-tab-id":Is.block,children:(0,xC.__)("Block")})]})},fwe=(0,uwe.forwardRef)(eWe);var _we=s(U(),1);var Ow=s(U(),1),Nw=s(Q(),1),Bj=s(ce(),1),lc=s(H(),1),Vj=s(V(),1),Sf=s(N(),1),mwe=s(St(),1),pwe=s(wt(),1),hwe=s(vt(),1);var Zn=s(x(),1);function gwe(){let e=(0,Ow.useSelect)(C=>C(T).getCurrentTemplateId(),[]),[t,r]=(0,Vj.useState)(!1),[o,n]=(0,Vj.useState)(!1),a=!!Cx()?.length,{onNavigateToEntityRecord:l,canCreateTemplate:c,hasGoBack:u,getEditorSettings:d}=(0,Ow.useSelect)(C=>{let{getEditorSettings:k}=C(T),A=k();return{onNavigateToEntityRecord:A.onNavigateToEntityRecord,canCreateTemplate:!!C(Nw.store).canUser("create",{kind:"postType",name:"wp_template"}),hasGoBack:A.hasOwnProperty("onNavigateToPreviousEntityRecord"),getEditorSettings:k}},[]),{get:f}=(0,Ow.useSelect)(hwe.store),{createSuccessNotice:m}=(0,Ow.useDispatch)(pwe.store),{editedRecord:h,hasResolved:g}=(0,Nw.useEntityRecord)("postType","wp_template",e),[v]=(0,Nw.useEntityBlockEditor)("postType","wp_template",{id:e});if(!g)return null;let y=u?[{label:(0,Sf.__)("Go back"),onClick:()=>d().onNavigateToPreviousEntityRecord()}]:void 0,b=()=>{f("core/edit-site","welcomeGuideTemplate")||m((0,Sf.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:y})},S=(0,mwe.decodeEntities)(h.title),w=!!v?.length&&(0,Zn.jsx)(Bj.BlockPreview.Async,{children:(0,Zn.jsx)(Bj.BlockPreview,{blocks:v})}),_=()=>{if(!w)return null;if(a){let C=(0,Sf.__)("Change template");return(0,Zn.jsx)(lc.Tooltip,{text:C,children:(0,Zn.jsx)("div",{className:"editor-template-actions-panel__preview",role:"button",tabIndex:0,"aria-label":C,onClick:()=>n(!0),onKeyPress:()=>n(!0),children:w})})}return(0,Zn.jsx)("div",{className:"editor-template-actions-panel__preview",children:w})};return(0,Zn.jsxs)(Zn.Fragment,{children:[(0,Zn.jsx)(lc.PanelBody,{title:(0,Sf.sprintf)((0,Sf.__)("Template: %s"),S),initialOpen:!1,children:(0,Zn.jsxs)(lc.__experimentalVStack,{children:[_(),(0,Zn.jsxs)(lc.__experimentalHStack,{children:[l&&(0,Zn.jsx)(lc.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{l({postId:h.id,postType:"wp_template"}),b()},children:(0,Sf.__)("Edit")}),c&&(0,Zn.jsx)(lc.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(!0),children:(0,Sf.__)("Create new")})]})]})}),t&&(0,Zn.jsx)(gp,{onClose:()=>r(!1)}),o&&(0,Zn.jsx)(q7,{onRequestClose:()=>n(!1)})]})}var Mw=s(U(),1),Fw=s(Q(),1),jj=s(ce(),1),uc=s(H(),1),vwe=s(V(),1),cc=s(N(),1),ywe=s(St(),1),bwe=s(wt(),1),wwe=s(vt(),1);var ts=s(x(),1);function Swe(){let e=(0,Mw.useSelect)(v=>v(T).getCurrentTemplateId(),[]),[t,r]=(0,vwe.useState)(!1),{onNavigateToEntityRecord:o,canCreateTemplate:n,hasGoBack:i,getEditorSettings:a}=(0,Mw.useSelect)(v=>{let{getEditorSettings:y}=v(T),b=y();return{onNavigateToEntityRecord:b.onNavigateToEntityRecord,canCreateTemplate:!!v(Fw.store).canUser("create",{kind:"postType",name:"wp_template"})&&b.supportsTemplateMode,hasGoBack:b.hasOwnProperty("onNavigateToPreviousEntityRecord"),getEditorSettings:y}},[]),{get:l}=(0,Mw.useSelect)(wwe.store),{createSuccessNotice:c}=(0,Mw.useDispatch)(bwe.store),{editedRecord:u}=(0,Fw.useEntityRecord)("postType","wp_template",e),[d]=(0,Fw.useEntityBlockEditor)("postType","wp_template",{id:e});if(!e&&!n)return null;let f=i?[{label:(0,cc.__)("Go back"),onClick:()=>a().onNavigateToPreviousEntityRecord()}]:void 0,m=()=>{l("core/edit-site","welcomeGuideTemplate")||c((0,cc.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:f})},h=u?(0,ywe.decodeEntities)(u.title):void 0,g=!!d?.length&&(0,ts.jsx)(jj.BlockPreview.Async,{children:(0,ts.jsx)(jj.BlockPreview,{blocks:d})});return(0,ts.jsxs)(ts.Fragment,{children:[(0,ts.jsx)(uc.PanelBody,{title:u?(0,cc.sprintf)((0,cc.__)("Template: %s"),h):(0,cc.__)("Template"),initialOpen:!1,children:(0,ts.jsxs)(uc.__experimentalVStack,{children:[!e&&(0,ts.jsx)(uc.__experimentalText,{children:(0,cc.__)("This page uses a classic template. To edit this template with blocks, create a block template.")}),u&&g&&(0,ts.jsx)("div",{className:"editor-template-actions-panel__preview",children:g}),(0,ts.jsxs)(uc.__experimentalHStack,{children:[u&&o&&(0,ts.jsx)(uc.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{o({postId:u.id,postType:"wp_template"}),m()},children:(0,cc.__)("Edit")}),n&&(0,ts.jsx)(uc.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(!0),children:e?(0,cc.__)("Create new"):(0,cc.__)("Create block template")})]})]})}),t&&(0,ts.jsx)(gp,{onClose:()=>r(!1)})]})}var zj=s(x(),1);function xwe(){let e=(0,_we.useSelect)(r=>r(T).getCurrentPostType(),[]),t=_0();return["page","post"].includes(e)?t==="classic"?(0,zj.jsx)(Swe,{}):t==="block-theme"?(0,zj.jsx)(gwe,{}):null:null}var TC=s(U(),1),Cwe=s(ce(),1),Twe=s(H(),1),Pwe=s(N(),1);var I3=s(x(),1),{BlockQuickNavigation:tWe}=Y(Cwe.privateApis),rWe="core/template-part";function oWe({postType:e}){let t=HR(),r=(0,TC.useSelect)(n=>{let{getPostBlocksByName:i}=Y(n(T));return i(Vt===e?rWe:t)},[e,t]),{enableComplementaryArea:o}=(0,TC.useDispatch)(Me);return r.length===0?null:(0,I3.jsx)(Twe.PanelBody,{title:(0,Pwe.__)("Content"),children:(0,I3.jsx)(tWe,{clientIds:r,onSelect:()=>{o("core","edit-post/document")}})})}function Ewe(){let{postType:e,renderingMode:t}=(0,TC.useSelect)(r=>{let{getCurrentPostType:o,getRenderingMode:n}=Y(r(T));return{postType:o(),renderingMode:n()}},[]);return t==="post-only"&&e!==Vt?null:(0,I3.jsx)(oWe,{postType:e})}var O3=s(U(),1),kwe=s(V(),1),Rwe=s(lt(),1),M3=s(ce(),1),Awe=s(H(),1),Iwe=s(N(),1);var N3=s(x(),1),{BlockQuickNavigation:nWe}=Y(M3.privateApis);function iWe(){let e=(0,O3.useSelect)(o=>{let{getBlockTypes:n}=o(Rwe.store);return n()},[]),t=(0,kwe.useMemo)(()=>e.filter(o=>o.category==="theme").map(({name:o})=>o),[e]),r=(0,O3.useSelect)(o=>{let{getBlocksByName:n}=o(M3.store);return n(t)},[t]);return r.length===0?null:(0,N3.jsx)(Awe.PanelBody,{title:(0,Iwe.__)("Content"),children:(0,N3.jsx)(nWe,{clientIds:r})})}function Owe(){return(0,O3.useSelect)(t=>{let{getCurrentPostType:r}=t(T);return r()},[])!==Oo?null:(0,N3.jsx)(iWe,{})}var _u=s(H(),1),Nwe=s(Q(),1);var _f=s(go(),1),D3=s(U(),1),F3=s(N(),1);var va=s(x(),1),{Badge:sWe}=Y(_u.privateApis),aWe=864e5,lWe=[],cWe={activity:!0},uWe=()=>{},dWe={},fWe={type:"activity",titleField:"date",fields:["author"],layout:{density:"compact"}},mWe=[{id:"date",label:(0,F3.__)("Date"),render:({item:e,field:t})=>{let r=(0,_f.getDate)(null).getTime(),o=t.getValue({item:e}),n=(0,_f.getDate)(o??null),i=r-n.getTime()>aWe?(0,_f.dateI18n)((0,_f.getSettings)().formats.datetimeAbbreviated,n):(0,_f.humanTimeDiff)(n);return(0,va.jsx)("time",{className:"editor-post-revisions-panel__revision-date",dateTime:o,children:i})},enableSorting:!1,enableHiding:!1},p_];function pWe(){let{setCurrentRevisionId:e}=Y((0,D3.useDispatch)(T)),{revisionsCount:t,revisions:r,revisionKey:o,isLoading:n,lastRevisionId:i}=(0,D3.useSelect)(a=>{let{getCurrentPostId:l,getCurrentPostType:c}=a(T),{getCurrentPostRevisionsCount:u,getCurrentPostLastRevisionId:d}=a(T),{getRevisions:f,getEntityConfig:m,isResolving:h}=a(Nwe.store),g=c(),y=m("postType",g)?.revisionKey||"id",b={per_page:3,orderby:"date",order:"desc",_fields:`${y},date,author`},S=["postType",g,l(),b],w=f(...S);return{revisionsCount:u(),lastRevisionId:d(),revisions:w,revisionKey:y,isLoading:h("getRevisions",S)}},[]);return(0,va.jsx)(_u.PanelBody,{title:(0,va.jsxs)(_u.__experimentalHStack,{justify:"space-between",align:"center",as:"span",children:[(0,va.jsx)("span",{children:(0,F3.__)("Revisions")}),(0,va.jsx)(sWe,{className:"editor-post-revisions-panel__revisions-count",children:t})]}),initialOpen:!1,children:(0,va.jsxs)(_u.__experimentalVStack,{className:"editor-post-revisions-panel",children:[(0,va.jsx)(Uk,{view:fWe,onChangeView:uWe,fields:mWe,data:r||lWe,isLoading:n,paginationInfo:dWe,defaultLayouts:cWe,getItemId:a=>a[o],isItemClickable:()=>!0,onClickItem:a=>{e(a[o])},children:(0,va.jsx)(Uk.Layout,{})}),(0,va.jsx)(_u.Button,{className:"editor-post-revisions-panel__view-all",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>e(i),children:(0,F3.__)("View all revisions")})]})})}function Mwe(){return(0,va.jsx)(tf,{children:(0,va.jsx)(pWe,{})})}var Fwe=s(ce(),1),Dwe=s(U(),1),Lwe=s(N(),1);var Bwe=s(x(),1);function Vwe(){let{block:e}=(0,Dwe.useSelect)(r=>{let{getSelectedBlock:o}=r(Fwe.store);return{block:o()}},[]);if(!e)return null;let t=e.attributes?.__revisionDiffStatus?.changedAttributes;return(0,Bwe.jsx)(A3,{title:(0,Lwe.__)("Changed attributes"),entries:t,initialOpen:!0})}var Dw=s(U(),1),jwe=s(V(),1),zwe=s(ce(),1),Hwe=s(vt(),1);function hWe(){let{hasBlockSelection:e}=(0,Dw.useSelect)(n=>({hasBlockSelection:!!n(zwe.store).getBlockSelectionStart()}),[]),{getActiveComplementaryArea:t}=(0,Dw.useSelect)(Me),{enableComplementaryArea:r}=(0,Dw.useDispatch)(Me),{get:o}=(0,Dw.useSelect)(Hwe.store);(0,jwe.useEffect)(()=>{let n=t("core"),i=["edit-post/document","edit-post/block"].includes(n),a=o("core","distractionFree");!i||a||(e?r("core","edit-post/block"):r("core","edit-post/document"))},[e,t,r,o])}var Uwe=hWe;var Qt=s(x(),1),{Tabs:Lw}=Y(Wwe.privateApis),gWe=xu.Platform.select({web:!0,native:!1}),vWe=({tabName:e,keyboardShortcut:t,onActionPerformed:r,extraPanels:o,postType:n})=>{let i=(0,xu.useRef)(null),a=(0,xu.useContext)(Lw.Context),l=n===jr,c=(0,PC.useSelect)(d=>Y(d(T)).isRevisionsMode());(0,xu.useEffect)(()=>{let d=Array.from(i.current?.querySelectorAll('[role="tab"]')||[]),f=d.find(g=>g.getAttribute("data-tab-id")===e),m=f?.ownerDocument.activeElement;d.some(g=>m&&m.id===g.id)&&f&&f.id!==m?.id&&f?.focus()},[e]);let u;return l?u=(0,Qt.jsx)(xj,{onActionPerformed:r}):c?u=(0,Qt.jsx)(Q0e,{}):u=(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsx)(R0e,{onActionPerformed:r}),(0,Qt.jsx)(e5.Slot,{}),(0,Qt.jsx)(Ewe,{}),window?.__experimentalDataFormInspector&&["post","page","wp_template","wp_template_part","wp_block"].includes(n)&&(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsx)(xwe,{}),(0,Qt.jsx)(Mwe,{})]}),(0,Qt.jsx)(Owe,{}),(0,Qt.jsx)(awe,{}),(0,Qt.jsx)(RO,{}),(0,Qt.jsx)($be,{}),o]}),(0,Qt.jsx)(iv,{identifier:e,header:(0,Qt.jsx)(Lw.Context.Provider,{value:a,children:(0,Qt.jsx)(fwe,{ref:i})}),closeLabel:(0,Bw.__)("Close Settings"),className:"editor-sidebar__panel",headerClassName:"editor-sidebar__panel-tabs",title:(0,Bw._x)("Settings","panel button label"),toggleShortcut:t,icon:(0,Bw.isRTL)()?Kp:Nu,isActiveByDefault:gWe,children:(0,Qt.jsxs)(Lw.Context.Provider,{value:a,children:[(0,Qt.jsx)(Lw.TabPanel,{tabId:Is.document,focusable:!1,children:u}),!l&&(0,Qt.jsxs)(Lw.TabPanel,{tabId:Is.block,focusable:!1,children:[(0,Qt.jsx)(L3.BlockInspector,{}),c&&(0,Qt.jsx)(Vwe,{})]})]})})},yWe=({extraPanels:e,onActionPerformed:t})=>{Uwe();let{tabName:r,keyboardShortcut:o,showSummary:n,postType:i}=(0,PC.useSelect)(c=>{let u=c(Gwe.store).getShortcutRepresentation("core/editor/toggle-sidebar"),d=c(Me).getActiveComplementaryArea("core"),f=[Is.block,Is.document].includes(d),m=d;f||(m=c(L3.store).getBlockSelectionStart()?Is.block:Is.document);let h=c(T).getCurrentPostType();return{tabName:m,keyboardShortcut:u,showSummary:![Vt,Oo,Ef].includes(h),postType:h}},[]),{enableComplementaryArea:a}=(0,PC.useDispatch)(Me),l=(0,xu.useCallback)(c=>{c&&a("core",c)},[a]);return(0,Qt.jsx)(Lw,{selectedTabId:r,onSelect:l,selectOnMove:!1,children:(0,Qt.jsx)(vWe,{tabName:r,keyboardShortcut:o,showSummary:n,onActionPerformed:t,extraPanels:e,postType:i})})},Ywe=yWe;var Z3=s(N(),1),Eu=s(U(),1),_Se=s(V(),1),xSe=s(we(),1),CSe=s(oa(),1);var Zj=s(ce(),1);var TSe=s(vt(),1);var Vw="edit-post/collab-history-sidebar",Hp="edit-post/collab-sidebar",Hj=[Vw,Hp];var AC=s(V(),1),Wj=s(N(),1),Gw=s(U(),1);var IC=s(ce(),1);var Uw=s(V(),1),U3=s(H(),1);var nSe=s(we(),1),Ti=s(N(),1),Gj=s(U(),1),iSe=s(qg(),1),G3=s(ce(),1);var Uj=s(N(),1),Hw=s(U(),1),EC=s(ce(),1);var Jwe=s(H(),1);var qwe=s(H(),1);var B3=s(N(),1),Tu=s(go(),1),Kwe=s(Q(),1),Zwe=s(U(),1),Xwe=s(ce(),1);var Cu=s(x(),1);function Qwe({avatar:e,name:t,date:r,userId:o}){let n=!!e,i=(0,Tu.getSettings)(),{currentUserAvatar:a,currentUserName:l,currentUserId:c,dateFormat:u=i.formats.date}=(0,Zwe.useSelect)(v=>{let{canUser:y,getCurrentUser:b,getEntityRecord:S}=v(Kwe.store),w=y("read",{kind:"root",name:"site"})?S("root","site"):void 0;if(n)return{dateFormat:w?.date_format};let{getSettings:_}=v(Xwe.store),{__experimentalDiscussionSettings:C}=_(),k=C?.avatarURL,A=b();return{currentUserAvatar:A?.avatar_urls?.[48]??k,currentUserName:A?.name,currentUserId:A?.id,dateFormat:w?.date_format}},[n]),d=(0,Tu.getDate)(r),f=(0,Tu.dateI18n)("c",d),h=Math.floor((new Date-d)/(1e3*60*60*24))<30?(0,Tu.humanTimeDiff)(d):(0,Tu.dateI18n)(u,d),g=(0,Tu.dateI18n)((0,B3._x)("F j, Y g:i\xA0a","Note date full date format"),r);return(0,Cu.jsxs)(Cu.Fragment,{children:[(0,Cu.jsx)("img",{src:e||a,className:"editor-collab-sidebar-panel__user-avatar",alt:(0,B3.__)("User avatar"),width:32,height:32,style:{borderColor:al(o??c)}}),(0,Cu.jsxs)(re,{direction:"column",children:[(0,Cu.jsx)("span",{className:"editor-collab-sidebar-panel__user-name",children:t??l}),r&&(0,Cu.jsx)(qwe.Tooltip,{text:g,children:(0,Cu.jsx)("time",{dateTime:f,className:"editor-collab-sidebar-panel__user-time",children:h})})]})]})}var Iv=s(x(),1);function jw({note:e,actions:t,className:r,children:o,...n}){return(0,Iv.jsxs)(re,{direction:"column",gap:"sm",className:r,...n,children:[(0,Iv.jsxs)(re,{direction:"row",align:"center",justify:"flex-start",gap:"md",children:[(0,Iv.jsx)(Qwe,{avatar:e?.author_avatar_urls?.[48],name:e?.author_name,date:e?.date,userId:e?.author}),t&&(0,Iv.jsx)(Jwe.FlexItem,{className:"editor-collab-sidebar-panel__note-actions",onClick:i=>i.stopPropagation(),children:(0,Iv.jsx)(re,{direction:"row",align:"center",children:t})})]}),o]})}var $we=s(k9(),1),eSe=s(V(),1),zw=s(H(),1);var V3=s(N(),1),tSe=s(we(),1),rSe=s(Wr(),1);var hl=s(x(),1);function Ov({onSubmit:e,onCancel:t,note:r,labels:o}){let[n,i]=(0,eSe.useState)(r?.content?.raw??""),a=(0,tSe.useInstanceId)(Ov,"comment-input"),l=n===r?.content?.raw||!jve(n).length;return(0,hl.jsxs)(re,{className:"editor-collab-sidebar-panel__note-form",direction:"column",gap:"lg",render:(0,hl.jsx)("form",{}),onSubmit:c=>{c.preventDefault(),e(n),i("")},children:[(0,hl.jsx)(Kt,{render:(0,hl.jsx)("label",{htmlFor:a}),children:o?.input??(0,V3.__)("Note")}),(0,hl.jsx)($we.default,{id:a,value:n??"",onChange:c=>i(c.target.value),rows:1,maxRows:20,onKeyDown:c=>{rSe.isKeyboardEvent.primary(c,"Enter")&&!l&&c.target.parentNode.requestSubmit(),c.key==="Escape"&&(c.preventDefault(),t(c))}}),(0,hl.jsxs)(re,{direction:"row",align:"center",justify:"flex-end",gap:"sm",wrap:"wrap",children:[(0,hl.jsx)(zw.Button,{size:"compact",variant:"tertiary",onClick:t,children:(0,hl.jsx)(zw.__experimentalTruncate,{children:(0,V3.__)("Cancel")})}),(0,hl.jsx)(zw.Button,{size:"compact",accessibleWhenDisabled:!0,variant:"primary",type:"submit",disabled:l,children:(0,hl.jsx)(zw.__experimentalTruncate,{children:o?.submit??(0,V3.__)("Add note")})})]})]})}var oSe=s(x(),1);function j3({floating:e,className:t,style:r,children:o,...n}){let i=!!e;return(0,oSe.jsx)(re,{direction:"column",className:K(t,{"is-floating":i}),ref:i?e.ref:void 0,style:i?{top:e.y,...r}:r,...n,children:o})}var z3=s(x(),1),{useBlockElement:bWe}=Y(EC.privateApis);function kC({onSubmit:e,sidebarRef:t,floating:r}){let{clientId:o}=(0,Hw.useSelect)(u=>{let{getSelectedBlockClientId:d}=u(EC.store);return{clientId:d()}},[]),n=(0,Hw.useSelect)(u=>Y(u(T)).getSelectedNote(),[]),i=bWe(o),{toggleBlockSpotlight:a}=Y((0,Hw.useDispatch)(EC.store)),{selectNote:l}=Y((0,Hw.useDispatch)(T)),c=()=>{l(void 0),i?.focus(),a(o,!1)};return n!=="new"||!o?null:(0,z3.jsx)(j3,{floating:r,className:"editor-collab-sidebar-panel__thread is-selected",gap:"md",tabIndex:0,"aria-label":(0,Uj.__)("New note"),role:"treeitem",style:r?{opacity:r.y?void 0:0}:void 0,onBlur:u=>{document.hasFocus()&&(u.currentTarget.contains(u.relatedTarget)||(a(o,!1),l(void 0)))},children:(0,z3.jsx)(jw,{children:(0,z3.jsx)(Ov,{onSubmit:async u=>{let{id:d}=await e({content:u});l(d),xi(d,t.current)},onCancel:c,labels:{input:(0,Uj.__)("New note")}})})})}var Nv=s(V(),1),Mv=s(H(),1),Tn=s(N(),1);var Pn=s(x(),1),{Menu:RC}=Y(Mv.privateApis);function wWe({items:e,buttonRef:t}){return(0,Pn.jsxs)(RC,{placement:"bottom-end",children:[(0,Pn.jsx)(RC.TriggerButton,{render:(0,Pn.jsx)(Mv.Button,{ref:t,size:"small",icon:zr,label:(0,Tn.__)("Actions"),disabled:!e.length,accessibleWhenDisabled:!0})}),(0,Pn.jsx)(RC.Popover,{modal:!1,children:e.map(r=>(0,Pn.jsx)(RC.Item,{onClick:r.onClick,children:(0,Pn.jsx)(RC.ItemLabel,{children:r.title})},r.id))})]})}function H3({note:e,parentNote:t,isSelected:r,onEditNote:o,onDeleteNote:n,onResolve:i}){let[a,l]=(0,Nv.useState)(null),c=(0,Nv.useRef)(null),u=e.parent===0,d=e.type==="note"&&e.meta&&(e.meta._wp_note_status==="resolved"||e.meta._wp_note_status==="reopen"),f=[{id:"edit",title:(0,Tn.__)("Edit"),isEligible:({status:b})=>b!=="approved",onClick:()=>l("edit")},{id:"reopen",title:(0,Tn._x)("Reopen","Reopen note"),isEligible:({status:b})=>b==="approved",onClick:()=>o({id:e.id,status:"hold"})},{id:"delete",title:(0,Tn.__)("Delete"),isEligible:()=>!0,onClick:()=>l("delete")}],m=t?.status!=="approved"?f.filter(b=>b.isEligible(e)):[],h=e.parent===0?(0,Tn.__)("Are you sure you want to delete this note? This will also delete all of this note's replies."):(0,Tn.__)("Are you sure you want to delete this reply?"),g=()=>{l(null),c.current?.focus()},v;if(a==="edit")v=(0,Pn.jsx)(Ov,{onSubmit:b=>{o({id:e.id,content:b}),l(null),c.current?.focus()},onCancel:g,note:e,labels:{submit:(0,Tn._x)("Update","verb"),input:(0,Tn.sprintf)((0,Tn.__)("Edit note %1$s by %2$s"),e.id,e.author_name)}});else if(d){let b=e.meta._wp_note_status==="resolved"?(0,Tn.__)("Marked as resolved"):(0,Tn.__)("Reopened"),S=e?.content?.raw,w=S&&typeof S=="string"&&S.trim()!==""?(0,Tn.sprintf)((0,Tn.__)("%1$s: %2$s"),b,S):b;v=(0,Pn.jsx)(Nv.RawHTML,{className:K("editor-collab-sidebar-panel__note-content","editor-collab-sidebar-panel__resolution-text"),children:w})}else v=(0,Pn.jsx)(Nv.RawHTML,{className:"editor-collab-sidebar-panel__note-content",children:e?.content?.rendered});let y=r?(0,Pn.jsxs)(Pn.Fragment,{children:[u&&i&&(0,Pn.jsx)(Mv.Button,{label:(0,Tn._x)("Resolve","Mark note as resolved"),size:"small",icon:Zp,disabled:e.status==="approved",accessibleWhenDisabled:e.status==="approved",onClick:i}),(0,Pn.jsx)(wWe,{items:m,buttonRef:c})]}):null;return(0,Pn.jsxs)(jw,{note:e,actions:y,role:e.parent!==0?"treeitem":void 0,children:[v,a==="delete"&&(0,Pn.jsx)(Mv.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{n(e),l(null)},onCancel:g,confirmButtonText:(0,Tn.__)("Delete"),children:h})]})}var Fs=s(x(),1),{useBlockElement:SWe}=Y(G3.privateApis);function sSe({note:e,onEditNote:t,onAddReply:r,onDeleteNote:o,isSelected:n,sidebarRef:i,floating:a,onKeyDown:l}){let c=!!a,{toggleBlockHighlight:u,selectBlock:d,toggleBlockSpotlight:f}=Y((0,Gj.useDispatch)(G3.store)),{selectNote:m}=Y((0,Gj.useDispatch)(T)),h=SWe(e.blockClientId),g=(0,nSe.useDebounce)(u,50),v=(0,Uw.useRef)(null),y=(0,Uw.useRef)(!1),b=a?.registerThread,S=a?.unregisterThread;(0,Uw.useEffect)(()=>{let z=v.current;return z&&b&&b(e.id,h,z),()=>S?.(e.id)},[h,e.id,b,S]),(0,Uw.useEffect)(()=>{!n||e.id==="new"||Gve(e.id,i.current)},[n,a?.y,e.id,i]);let w=()=>{g(e.blockClientId,!0)},_=()=>{g(e.blockClientId,!1)},C=()=>{u(e.blockClientId,!0)},k=z=>{if(!document.hasFocus())return;let W=z.relatedTarget?.closest(".editor-collab-sidebar-panel__thread"),O=z.relatedTarget?.closest('[role="dialog"]'),M=y.current;W&&!M||O||M&&z.currentTarget.contains(z.relatedTarget)||(u(e.blockClientId,!1),R())},A=()=>{n||(m(e.id),xi(e.id,i.current),f(e.blockClientId,!0),e.blockClientId&&d(e.blockClientId,null))},R=()=>{m(void 0),f(e.blockClientId,!1)},I=()=>{t({id:e.id,status:"approved"}),R(),c?h?.focus():xi(e.id,i.current)},B=e?.reply||[],E=B.length>0?B[B.length-1]:void 0,P=B.length>0?B.slice(0,-1):[],L=zve((0,iSe.__unstableStripHTML)(e.content?.rendered),10),j=e.blockClientId?(0,Ti.sprintf)((0,Ti.__)("Note: %s"),L):(0,Ti.sprintf)((0,Ti.__)("Original block deleted. Note: %s"),L);return c&&e.id==="new"?(0,Fs.jsx)(kC,{onSubmit:r,sidebarRef:i,floating:{y:a.y,ref:v}}):(0,Fs.jsxs)(j3,{floating:c?{y:a.y,ref:v}:void 0,className:K("editor-collab-sidebar-panel__thread",{"is-selected":n}),id:`note-thread-${e.id}`,gap:"md",onClick:A,onMouseEnter:w,onMouseLeave:_,onFocus:C,onBlur:k,onKeyUp:z=>{z.key==="Tab"&&(y.current=!1)},onKeyDown:z=>{z.key==="Tab"?y.current=!0:l(z)},tabIndex:0,role:"treeitem","aria-label":j,"aria-expanded":n,children:[(0,Fs.jsx)(U3.Button,{className:"editor-collab-sidebar-panel__skip-to-note",variant:"secondary",size:"compact",onClick:()=>{xi(e.id,i.current,"textarea")},children:(0,Ti.__)("Add new reply")}),!e.blockClientId&&(0,Fs.jsx)("p",{className:"editor-collab-sidebar-panel__deleted-block-notice",children:(0,Ti.__)("Original block deleted.")}),(0,Fs.jsx)(H3,{note:e,isSelected:n,onEditNote:t,onDeleteNote:o,onResolve:I}),n&&B.map(z=>(0,Fs.jsx)(H3,{note:z,parentNote:e,isSelected:n,onEditNote:t,onDeleteNote:o},z.id)),!n&&P.length>0&&(0,Fs.jsx)(re,{direction:"row",align:"center",justify:"space-between",className:"editor-collab-sidebar-panel__more-reply-separator",children:(0,Fs.jsx)(U3.Button,{size:"compact",variant:"tertiary",className:"editor-collab-sidebar-panel__more-reply-button",onClick:z=>{z.stopPropagation(),A()},children:(0,Ti.sprintf)((0,Ti._n)("%s more reply","%s more replies",P.length),P.length)})}),!n&&E&&(0,Fs.jsx)(H3,{note:E,parentNote:e,isSelected:!1,onEditNote:t,onDeleteNote:o}),n&&(0,Fs.jsx)(jw,{role:"treeitem",children:(0,Fs.jsx)(Ov,{onSubmit:z=>{e.status==="approved"?t({id:e.id,status:"hold",content:z}):r({content:z,parent:e.id})},onCancel:z=>{z.stopPropagation(),R(),xi(e.id,i.current)},labels:{submit:e.status==="approved"?(0,Ti.__)("Reopen & Reply"):(0,Ti.__)("Reply"),input:(0,Ti.sprintf)((0,Ti.__)("Reply to note %1$s by %2$s"),e.id,e.author_name)}})}),!!e.blockClientId&&(0,Fs.jsx)(U3.Button,{className:"editor-collab-sidebar-panel__skip-to-block",variant:"secondary",size:"compact",onClick:z=>{z.stopPropagation(),h?.focus()},children:(0,Ti.__)("Back to block")})]})}var xf=s(N(),1),Pu=s(V(),1),W3=s(Q(),1),dc=s(U(),1),Fv=s(ce(),1),lSe=s(wt(),1),cSe=s(qg(),1),uSe=s(St(),1);function aSe(){let e=new Set,t=new Map,r=new Map,o=new WeakMap,n={},i={};function a(){i={...n};for(let c of e)c()}let l=new window.ResizeObserver(c=>{let u=!1;for(let d of c){let f=o.get(d.target),m=d.borderBoxSize[0].blockSize;n[f]!==m&&(n[f]=m,u=!0)}u&&a()});return{subscribe(c){return e.add(c),()=>{e.delete(c),e.size===0&&l.disconnect()}},getSnapshot(){return i},registerThread(c,u,d){t.set(c,u);let f=r.get(c);f&&f!==d&&(l.unobserve(f),o.delete(f)),d&&(r.set(c,d),o.set(d,c),l.observe(d)),a()},unregisterThread(c){t.delete(c);let u=r.get(c);u&&(l.unobserve(u),o.delete(u),r.delete(c)),delete n[c]},getBlockRects(){return Object.fromEntries(Array.from(t).flatMap(([c,u])=>u?[[c,u.getBoundingClientRect()]]:[]))},getFirstBlockElement(){return t.values().next().value??null}}}var{cleanEmptyObject:_We}=Y(Fv.privateApis);function dSe(e){let t={post:e,type:"note",status:"all",per_page:-1},{records:r}=(0,W3.useEntityRecords)("root","comment",t,{enabled:!!e&&typeof e=="number"}),{getBlockAttributes:o}=(0,dc.useSelect)(Fv.store),{clientIds:n}=(0,dc.useSelect)(l=>{let{getClientIdsWithDescendants:c}=l(Fv.store);return{clientIds:c()}},[]),{notes:i,unresolvedNotes:a}=(0,Pu.useMemo)(()=>{if(!r||r.length===0)return{notes:[],unresolvedNotes:[]};let l={},c=new Map;for(let g of n){let v=o(g)?.metadata?.noteId;if(v){let y=String(v);l[g]=y,c.set(y,g)}}let u=new Map,d=[];for(let g of r){let v={...g,reply:[],blockClientId:g.parent===0?c.get(String(g.id))??null:null};u.set(g.id,v),g.parent===0&&d.push(v)}for(let g of r)g.parent!==0&&u.get(g.parent)?.reply.unshift(u.get(g.id));if(d.length===0)return{notes:[],unresolvedNotes:[]};let f=[],m=[];for(let g of Object.values(l)){let v=u.get(Number(g))??u.get(g);v&&(v.status==="hold"?f.push(v):v.status==="approved"&&m.push(v))}let h=d.filter(g=>!g.blockClientId);return{notes:[...f,...m,...h],unresolvedNotes:f}},[n,r,o]);return{notes:i,unresolvedNotes:a}}function fSe(){let{createNotice:e}=(0,dc.useDispatch)(lSe.store),{saveEntityRecord:t,deleteEntityRecord:r}=(0,dc.useDispatch)(W3.store),{getCurrentPostId:o}=(0,dc.useSelect)(T),{getBlockAttributes:n,getSelectedBlockClientId:i}=(0,dc.useSelect)(Fv.store),{updateBlockAttributes:a}=(0,dc.useDispatch)(Fv.store),l=f=>{let m=f.message&&f.code!=="unknown_error"?(0,uSe.decodeEntities)(f.message):(0,xf.__)("An error occurred while performing an update.");e("error",m,{type:"snackbar",isDismissible:!0})};return{onCreate:async({content:f,parent:m})=>{try{let h=await t("root","comment",{post:o(),content:f,status:"hold",type:"note",parent:m||0},{throwOnError:!0});if(!m&&h?.id){let g=i(),v=n(g)?.metadata;a(g,{metadata:{...v,noteId:h.id}})}return e("snackbar",m?(0,xf.__)("Reply added."):(0,xf.__)("Note added."),{type:"snackbar",isDismissible:!0}),h}catch(h){l(h)}},onEdit:async({id:f,content:m,status:h})=>{let g=h||"updated",v={approved:(0,xf.__)("Note marked as resolved."),hold:(0,xf.__)("Note reopened."),updated:(0,xf.__)("Note updated.")};try{if(h==="approved"||h==="hold"){await t("root","comment",{id:f,status:h},{throwOnError:!0});let y={post:o(),content:m||"",type:"note",status:h,parent:f,meta:{_wp_note_status:h==="approved"?"resolved":"reopen"}};await t("root","comment",y,{throwOnError:!0})}else await t("root","comment",{id:f,content:m,status:h},{throwOnError:!0});e("snackbar",v[g]??(0,xf.__)("Note updated."),{type:"snackbar",isDismissible:!0})}catch(y){l(y)}},onDelete:async f=>{try{if(await r("root","comment",f.id,void 0,{throwOnError:!0}),!f.parent){let m=i(),h=n(m)?.metadata;a(m,{metadata:_We({...h,noteId:void 0})})}e("snackbar",(0,xf.__)("Note deleted."),{type:"snackbar",isDismissible:!0})}catch(m){l(m)}}}}function mSe(e=!1){let t=(0,dc.useRegistry)();(0,Pu.useEffect)(()=>{if(!e)return;let{getActiveComplementaryArea:r}=t.select(Me),{disableComplementaryArea:o,enableComplementaryArea:n}=t.dispatch(Me),i=t.subscribe(()=>{r("core")===null&&n("core",Hp)});return()=>{i(),r("core")===Hp&&o("core",Hp)}},[e,t])}function pSe({threads:e,selectedNoteId:t,isFloating:r,sidebarRef:o}){let[n,i]=(0,Pu.useState)({}),[a]=(0,Pu.useState)(aSe),l=(0,Pu.useSyncExternalStore)(a.subscribe,a.getSnapshot);return(0,Pu.useEffect)(()=>{if(!r||!o?.current)return;let c=o.current,u=a.getFirstBlockElement(),d=u?.closest(".is-root-container")??u,f=d?(0,cSe.getScrollContainer)(d):null,m=()=>{c.style.setProperty("--canvas-scroll",`${-(f?.scrollTop??0)}px`)},h=window.requestAnimationFrame(()=>{let y=Hve({threads:e,selectedNoteId:t,blockRects:a.getBlockRects(),heights:l,scrollTop:f?.scrollTop??0});i(y.positions),m()}),g=f?.ownerDocument?.defaultView,v={passive:!0,capture:!0};return g?.addEventListener("scroll",m,v),()=>{window.cancelAnimationFrame(h),g?.removeEventListener("scroll",m,v)}},[o,l,r,t,a,e]),{notePositions:n,registerThread:a.registerThread,unregisterThread:a.unregisterThread}}var Cf=s(x(),1),{useBlockElement:xWe}=Y(IC.privateApis);function Yj({notes:e,sidebarRef:t,isFloating:r=!1,styles:o}){let{onCreate:n,onEdit:i,onDelete:a}=fSe(),{selectNote:l}=Y((0,Gw.useDispatch)(T)),{selectBlock:c,toggleBlockSpotlight:u}=Y((0,Gw.useDispatch)(IC.store)),{blockNoteId:d,selectedBlockClientId:f,orderedBlockIds:m}=(0,Gw.useSelect)(A=>{let{getBlockAttributes:R,getSelectedBlockClientId:I,getClientIdsWithDescendants:B}=A(IC.store),E=I();return{blockNoteId:E?R(E)?.metadata?.noteId:null,selectedBlockClientId:E,orderedBlockIds:B()}},[]),{selectedNote:h,noteFocused:g}=(0,Gw.useSelect)(A=>{let{getSelectedNote:R,isNoteFocused:I}=Y(A(T));return{selectedNote:R(),noteFocused:I()}},[]),v=xWe(f),y=(0,AC.useMemo)(()=>{if(!r||h!=="new")return e;let A={id:"new",blockClientId:f,content:{rendered:""}},R=[];return m.forEach(I=>{if(I===f)R.push(A);else{let B=e.find(E=>E.blockClientId===I);B&&R.push(B)}}),R},[e,r,h,f,m]),b=async A=>{let R=y.findIndex(P=>P.id===A.id),I=y[R+1],B=y[R-1];if(await a(A),A.parent!==0){l(A.parent),xi(A.parent,t.current);return}let E=I??B;E?(l(E.id),xi(E.id,t.current),E.blockClientId&&(u(E.blockClientId,!0),c(E.blockClientId,null))):(l(void 0),u(A.blockClientId,!1),v?.focus())};(0,AC.useEffect)(()=>{l(d??void 0)},[d,l]),(0,AC.useEffect)(()=>{g&&h&&(xi(h,t.current,h==="new"?"textarea":void 0),l(h))},[g,h,l,t]);let{notePositions:S,registerThread:w,unregisterThread:_}=pSe({threads:y,selectedNoteId:h,isFloating:r,sidebarRef:t}),C=Array.isArray(y)&&y.length>0,k=(A,R,I)=>{if(A.defaultPrevented)return;let B=y.findIndex(P=>P.id===R.id),E=A.currentTarget===A.target;(A.key==="Enter"||A.key==="ArrowRight")&&E&&!I?(l(R.id),R.blockClientId&&(c(R.blockClientId,null),u(R.blockClientId,!0))):(A.key==="Enter"||A.key==="ArrowLeft")&&E&&I||A.key==="Escape"?(l(void 0),R.blockClientId&&u(R.blockClientId,!1),xi(R.id,t.current)):A.key==="ArrowDown"&&B<y.length-1&&E?xi(y[B+1].id,t.current):A.key==="ArrowUp"&&B>0&&E?xi(y[B-1].id,t.current):A.key==="Home"&&E?xi(y[0].id,t.current):A.key==="End"&&E&&xi(y[y.length-1].id,t.current)};return(0,Cf.jsx)(re,{className:"editor-collab-sidebar-panel",style:o,role:"tree",direction:"column",gap:"md",justify:"flex-start",ref:A=>{A&&(t.current=A)},"aria-label":r?(0,Wj.__)("Unresolved notes"):(0,Wj.__)("All notes"),children:!C&&!r?(0,Cf.jsx)(kC,{onSubmit:n,sidebarRef:t}):(0,Cf.jsxs)(Cf.Fragment,{children:[!r&&h==="new"&&(0,Cf.jsx)(kC,{onSubmit:n,sidebarRef:t}),y.map(A=>(0,Cf.jsx)(sSe,{note:A,onAddReply:n,onDeleteNote:b,onEditNote:i,isSelected:h===A.id,sidebarRef:t,floating:r?{y:S[A.id],registerThread:w,unregisterThread:_}:void 0,onKeyDown:R=>k(R,A,h===A.id)},A.id))]})})}var hSe=s(H(),1),Y3=s(N(),1),K3=s(ce(),1),qj=s(U(),1),gSe=s(lt(),1),vSe=s(oa(),1);var q3=s(x(),1),{NoteIconSlotFill:CWe}=Y(K3.privateApis);function TWe({clientId:e,onClick:t,isDistractionFree:r}){let o=(0,qj.useSelect)(l=>l(K3.store).getBlock(e),[e]),n=(0,qj.useSelect)(l=>l(vSe.store).getShortcutRepresentation("core/editor/new-note"),[]);if(!o?.isValid||o?.name===(0,gSe.getUnregisteredTypeHandlerName)())return null;let i=r||o?.name==="core/freeform",a;return r?a=(0,Y3.__)("Notes are disabled in distraction free mode."):o?.name==="core/freeform"&&(a=(0,Y3.__)("Convert to blocks to add notes.")),(0,q3.jsx)(hSe.MenuItem,{onClick:t,"aria-haspopup":"dialog",disabled:i,info:a,shortcut:n,children:(0,Y3.__)("Add note")})}function Kj({onClick:e,isDistractionFree:t}){return(0,q3.jsx)(CWe.Fill,{children:({clientId:r,onClose:o})=>(0,q3.jsx)(TWe,{clientId:r,isDistractionFree:t,onClick:()=>{e(r),o()}})})}var ySe=s(H(),1);var Ww=s(N(),1),bSe=s(V(),1),wSe=s(ce(),1);var Dv=s(x(),1),{NoteIconToolbarSlotFill:PWe}=Y(wSe.privateApis);function SSe({onClick:e,note:t}){let r=(0,bSe.useMemo)(()=>{if(!t)return[];let u=new Map,d=[t,...t.reply];return d.sort((f,m)=>new Date(f.date)-new Date(m.date)),d.forEach(f=>{f.author_name&&f.author_avatar_urls&&(u.has(f.author)||u.set(f.author,{name:f.author_name,avatar:f.author_avatar_urls?.["48"]||f.author_avatar_urls?.["96"],id:f.author,date:f.date}))}),Array.from(u.values())},[t]);if(!r.length)return null;let o=3,i=r.length>o?r.slice(0,o-1):r,a=Math.max(0,r.length-i.length),c=r.length>100&&a>0?(0,Ww.__)("100+"):(0,Ww.sprintf)((0,Ww.__)("+%s"),a);return(0,Dv.jsx)(PWe.Fill,{children:(0,Dv.jsx)(ySe.ToolbarButton,{className:"editor-note-indicator",label:(0,Ww.__)("View notes"),onClick:()=>e(),showTooltip:!0,children:(0,Dv.jsxs)(re,{direction:"row",align:"center",gap:"xs",children:[i.map(u=>(0,Dv.jsx)("img",{src:u.avatar,alt:u.name,className:"editor-note-indicator__avatar",style:{borderColor:al(u.id)}},u.id)),a>0&&(0,Dv.jsx)("span",{className:"editor-note-indicator__overflow",children:c})]})})})}var rs=s(x(),1);function EWe({postId:e}){let{getActiveComplementaryArea:t}=(0,Eu.useSelect)(Me),{enableComplementaryArea:r}=(0,Eu.useDispatch)(Me),{toggleBlockSpotlight:o,selectBlock:n}=Y((0,Eu.useDispatch)(Zj.store)),{selectNote:i}=Y((0,Eu.useDispatch)(T)),a=(0,xSe.useViewportMatch)("medium"),l=(0,_Se.useRef)(null),{clientId:c,noteId:u,isClassicBlock:d}=(0,Eu.useSelect)(k=>{let{getBlockAttributes:A,getSelectedBlockClientId:R,getBlockName:I}=k(Zj.store),B=R();return{clientId:B,noteId:B?A(B)?.metadata?.noteId:null,isClassicBlock:B?I(B)==="core/freeform":!1}},[]),{isDistractionFree:f}=(0,Eu.useSelect)(k=>{let{get:A}=k(TSe.store);return{isDistractionFree:A("core","distractionFree")}},[]),m=(0,Eu.useSelect)(k=>Y(k(T)).getSelectedNote(),[]),{notes:h,unresolvedNotes:g}=dSe(e),v=a,y=h.length>0||!v;mSe(v&&(g.length>0||m!==void 0));async function b({targetClientId:k,noteId:A,isApproved:R}){if(!k)return;let I=await t("core");R?r("core",Vw):(!Hj.includes(I)||!y)&&r("core",v?Hp:Vw);let B=await t("core");Hj.includes(B)&&(n(k,null),o(k,!0),i(A,{focus:!0}))}function S(k){let A=h.find(R=>R.blockClientId===k);return b({targetClientId:k,noteId:A?.id??"new",isApproved:A?.status==="approved"})}(0,CSe.useShortcut)("core/editor/new-note",k=>{k.preventDefault(),S(c)},{isDisabled:f||d||!c||!!u});let{merged:w}=jR(),_=w?.styles?.color?.background,C=u?h.find(k=>k.id===u):null;return f?(0,rs.jsx)(Kj,{isDistractionFree:!0}):(0,rs.jsxs)(rs.Fragment,{children:[!!C&&(0,rs.jsx)(SSe,{note:C,onClick:()=>S(c)}),(0,rs.jsx)(Kj,{onClick:k=>S(k)}),y&&(0,rs.jsx)(iv,{identifier:Vw,name:Vw,title:(0,Z3.__)("All notes"),header:(0,rs.jsx)("h2",{className:"interface-complementary-area-header__title",children:(0,Z3.__)("All notes")}),icon:nM,closeLabel:(0,Z3.__)("Close Notes"),children:(0,rs.jsx)(Yj,{notes:h,sidebarRef:l})}),a&&(0,rs.jsx)(iv,{isPinnable:!1,header:!1,identifier:Hp,className:"editor-collab-sidebar",headerClassName:"editor-collab-sidebar__header",backgroundColor:_,children:(0,rs.jsx)(Yj,{notes:g,sidebarRef:l,styles:{backgroundColor:_},isFloating:!0})})]})}function PSe(){let{postId:e,editorMode:t,revisionsMode:r}=(0,Eu.useSelect)(o=>{let{getCurrentPostId:n,getEditorMode:i,isRevisionsMode:a}=Y(o(T));return{postId:n(),editorMode:i(),revisionsMode:a()}},[]);return!e||typeof e!="number"||t==="text"||r?null:(0,rs.jsx)(Mr,{supportKeys:"editor.notes",children:(0,rs.jsx)(EWe,{postId:e})})}var ku=s(H(),1),Yw=s(N(),1);var FC=s(U(),1),Qj=s(V(),1),ISe=s(vt(),1),e6=s(we(),1),OSe=s(Q(),1);var Tf=s(H(),1),X3=s(U(),1),OC=s(N(),1),ESe=s(vt(),1);var kSe=s(Q(),1);var fc=s(x(),1);function Q3({hideWelcomeGuide:e=!1,onChangePath:t}){let{user:r,setUser:o}=vn(),n=!!r&&(Object.keys(r?.styles??{}).length>0||Object.keys(r?.settings??{}).length>0),i=()=>{o({styles:{},settings:{}})},{toggle:a}=(0,X3.useDispatch)(ESe.store),{canEditCSS:l}=(0,X3.useSelect)(u=>{let{getEntityRecord:d,__experimentalGetCurrentGlobalStylesId:f}=u(kSe.store),m=f();return{canEditCSS:!!(m?d("root","globalStyles",m):void 0)?._links?.["wp:action-edit-css"]}},[]),c=()=>{t("/css")};return(0,fc.jsx)(Tf.DropdownMenu,{icon:zr,label:(0,OC.__)("More"),toggleProps:{size:"compact"},children:({onClose:u})=>(0,fc.jsxs)(fc.Fragment,{children:[(0,fc.jsxs)(Tf.MenuGroup,{children:[l&&(0,fc.jsx)(Tf.MenuItem,{onClick:c,children:(0,OC.__)("Additional CSS")}),!e&&(0,fc.jsx)(Tf.MenuItem,{onClick:()=>{a("core/edit-site","welcomeGuideStyles"),u()},children:(0,OC.__)("Welcome Guide")})]}),(0,fc.jsx)(Tf.MenuGroup,{children:(0,fc.jsx)(Tf.MenuItem,{onClick:()=>{i(),u()},disabled:!n,children:(0,OC.__)("Reset styles")})})]})})}var Lv=s(x(),1);function RSe({className:e,identifier:t,title:r,icon:o,children:n,closeLabel:i,header:a,headerClassName:l,panelClassName:c,isActiveByDefault:u}){return(0,Lv.jsxs)(Lv.Fragment,{children:[(0,Lv.jsx)(Ha,{className:e,scope:"core",identifier:t,title:r,icon:o,closeLabel:i,header:a,headerClassName:l,panelClassName:c,isActiveByDefault:u,children:n}),(0,Lv.jsx)(Om,{scope:"core",identifier:t,icon:o,children:r})]})}var J3=s(U(),1),$3=s(H(),1),gl=s(N(),1),Xj=s(vt(),1);var NC=s(x(),1);function MC({nonAnimatedSrc:e,animatedSrc:t}){return(0,NC.jsxs)("picture",{className:"editor-welcome-guide__image",children:[(0,NC.jsx)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,NC.jsx)("img",{src:t,width:"312",height:"240",alt:""})]})}var Tr=s(x(),1);function ASe(){let{toggle:e}=(0,J3.useDispatch)(Xj.store),{isActive:t,isStylesOpen:r}=(0,J3.useSelect)(n=>{let i=n(Me).getActiveComplementaryArea("core");return{isActive:!!n(Xj.store).get("core/edit-site","welcomeGuideStyles"),isStylesOpen:i==="edit-site/global-styles"}},[]);if(!t||!r)return null;let o=(0,gl.__)("Welcome to Styles");return(0,Tr.jsx)($3.Guide,{className:"editor-welcome-guide guide-styles",contentLabel:o,finishButtonText:(0,gl.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuideStyles"),pages:[{image:(0,Tr.jsx)(MC,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.svg?1",animatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.gif?1"}),content:(0,Tr.jsxs)(Tr.Fragment,{children:[(0,Tr.jsx)("h1",{className:"editor-welcome-guide__heading",children:o}),(0,Tr.jsx)("p",{className:"editor-welcome-guide__text",children:(0,gl.__)("Tweak your site, or give it a whole new look! Get creative \u2014 how about a new color palette for your buttons, or choosing a new font? Take a look at what you can do here.")})]})},{image:(0,Tr.jsx)(MC,{nonAnimatedSrc:"https://s.w.org/images/block-editor/set-the-design.svg?1",animatedSrc:"https://s.w.org/images/block-editor/set-the-design.gif?1"}),content:(0,Tr.jsxs)(Tr.Fragment,{children:[(0,Tr.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,gl.__)("Set the design")}),(0,Tr.jsx)("p",{className:"editor-welcome-guide__text",children:(0,gl.__)("You can customize your site as much as you like with different colors, typography, and layouts. Or if you prefer, just leave it up to your theme to handle!")})]})},{image:(0,Tr.jsx)(MC,{nonAnimatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.svg?1",animatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.gif?1"}),content:(0,Tr.jsxs)(Tr.Fragment,{children:[(0,Tr.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,gl.__)("Personalize blocks")}),(0,Tr.jsx)("p",{className:"editor-welcome-guide__text",children:(0,gl.__)("You can adjust your blocks to ensure a cohesive experience across your site \u2014 add your unique colors to a branded Button block, or adjust the Heading block to your preferred size.")})]})},{image:(0,Tr.jsx)(MC,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,Tr.jsxs)(Tr.Fragment,{children:[(0,Tr.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,gl.__)("Learn more")}),(0,Tr.jsxs)("p",{className:"editor-welcome-guide__text",children:[(0,gl.__)("New to block themes and styling your site?")," ",(0,Tr.jsx)($3.ExternalLink,{href:(0,gl.__)("https://wordpress.org/documentation/article/styles-overview/"),children:(0,gl.__)("Here\u2019s a detailed guide to learn how to make the most of it.")})]})]})}]})}var Xn=s(x(),1);function NSe(){let{shouldResetNavigation:e,stylesPath:t,showStylebook:r,showListViewByDefault:o,hasRevisions:n,activeComplementaryArea:i,editorSettings:a}=(0,FC.useSelect)(b=>{let{getActiveComplementaryArea:S}=b(Me),{getStylesPath:w,getShowStylebook:_}=Y(b(T)),C=b(T).getEditorMode()==="visual",k=b(ISe.store).get("core","showListViewByDefault"),{getEntityRecord:A,__experimentalGetCurrentGlobalStylesId:R}=b(OSe.store),I=R(),B=I?A("root","globalStyles",I):void 0;return{stylesPath:w(),showStylebook:_(),shouldResetNavigation:S("core")!=="edit-site/global-styles"||!C,showListViewByDefault:k,hasRevisions:!!B?._links?.["version-history"]?.[0]?.count,activeComplementaryArea:b(Me).getActiveComplementaryArea("core"),editorSettings:b(T).getEditorSettings()}},[]),{setStylesPath:l,setShowStylebook:c,resetStylesNavigation:u}=Y((0,FC.useDispatch)(T)),d=(0,e6.useViewportMatch)("medium","<"),f=t.startsWith("/revisions")&&!r,m=t.startsWith("/revisions")&&r,h=(0,e6.usePrevious)(i);(0,Qj.useEffect)(()=>{i==="edit-site/global-styles"&&h!=="edit-site/global-styles"&&u()},[i,h,u]),(0,Qj.useEffect)(()=>{e&&u()},[e,u]);let{setIsListViewOpened:g}=(0,FC.useDispatch)(T),v=()=>{g(!1),l(f||m?"/":"/revisions")},y=()=>{g(r&&o),c(!r)};return(0,Xn.jsxs)(Xn.Fragment,{children:[(0,Xn.jsx)(RSe,{className:"editor-global-styles-sidebar",identifier:"edit-site/global-styles",title:(0,Yw.__)("Styles"),icon:vF,closeLabel:(0,Yw.__)("Close Styles"),panelClassName:"editor-global-styles-sidebar__panel",header:(0,Xn.jsxs)(ku.Flex,{className:"editor-global-styles-sidebar__header",gap:1,children:[(0,Xn.jsx)(ku.FlexItem,{children:(0,Xn.jsx)("h2",{className:"editor-global-styles-sidebar__header-title",children:(0,Yw.__)("Styles")})}),(0,Xn.jsxs)(ku.Flex,{justify:"flex-end",gap:1,className:"editor-global-styles-sidebar__header-actions",children:[!d&&(0,Xn.jsx)(ku.FlexItem,{children:(0,Xn.jsx)(ku.Button,{icon:Jp,label:(0,Yw.__)("Style Book"),isPressed:r,accessibleWhenDisabled:!0,disabled:e,onClick:y,size:"compact"})}),(0,Xn.jsx)(ku.FlexItem,{children:(0,Xn.jsx)(ku.Button,{label:(0,Yw.__)("Revisions"),icon:Ou,onClick:v,accessibleWhenDisabled:!0,disabled:!n,isPressed:f||m,size:"compact"})}),(0,Xn.jsx)(Q3,{onChangePath:l})]})]}),children:(0,Xn.jsx)(JA,{path:t,onPathChange:l,settings:a})}),(0,Xn.jsx)(ASe,{})]})}var vl=s(x(),1);function kWe({postType:e,postId:t,templateId:r,settings:o,children:n,initialEdits:i,onActionPerformed:a,extraContent:l,extraSidebarPanels:c,...u}){let{post:d,template:f,hasLoadedPost:m,error:h,isBlockTheme:g,showGlobalStyles:v}=(0,MSe.useSelect)(y=>{let{getEntityRecord:b,getResolutionError:S,hasFinishedResolution:w,getCurrentTheme:_,__experimentalGetCurrentGlobalStylesId:C,canUser:k}=y(FSe.store),{getRenderingMode:A,getCurrentPostType:R}=y(T),I=["postType",e,t],B=A(),E=R(),P=_()?.is_block_theme,L=C(),j=L?k("update",{kind:"root",name:"globalStyles",id:L}):!1;return{post:b(...I),template:r?b("postType",Vt,r):void 0,hasLoadedPost:w("getEntityRecord",I),error:S("getEntityRecord",I)?.message,isBlockTheme:P,showGlobalStyles:P&&j&&(E==="wp_template"||B==="template-locked")}},[e,t,r]);return(0,vl.jsxs)(vl.Fragment,{children:[m&&!d&&(0,vl.jsx)(DSe.Notice,{status:h?"error":"warning",isDismissible:!1,children:h||(0,LSe.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")}),!!d&&(0,vl.jsxs)(P8,{post:d,__unstableTemplate:f,settings:o,initialEdits:i,useSubRegistry:!1,children:[(0,vl.jsx)(Zbe,{...u,children:l}),n,(0,vl.jsx)(Ywe,{onActionPerformed:a,extraPanels:c}),(0,vl.jsx)(PSe,{}),g&&(0,vl.jsx)(mI,{}),v&&(0,vl.jsx)(NSe,{})]})]})}var BSe=kWe;var Ge=s(N(),1),qSe=s(we(),1),Bv=s(U(),1),KSe=s(V(),1),DC=s(vt(),1);var t6=s(U(),1),VSe=s(vt(),1);var jSe=s(x(),1),{PreferenceBaseOption:RWe}=Y(VSe.privateApis);function zSe(e){let t=(0,t6.useSelect)(n=>n(T).isPublishSidebarEnabled(),[]),{enablePublishSidebar:r,disablePublishSidebar:o}=(0,t6.useDispatch)(T);return(0,jSe.jsx)(RWe,{isChecked:t,onChange:n=>n?r():o(),...e})}var r6=s(U(),1),HSe=s(vt(),1),o6=s(lt(),1),USe=s(V(),1),GSe=s(H(),1),Kw=s(N(),1),WSe=s(ce(),1);var qw=s(x(),1),{BlockManager:AWe}=Y(WSe.privateApis),IWe=[];function YSe(){let{showBlockTypes:e,hideBlockTypes:t}=Y((0,r6.useDispatch)(T)),{blockTypes:r,allowedBlockTypes:o,hiddenBlockTypes:n}=(0,r6.useSelect)(m=>({blockTypes:m(o6.store).getBlockTypes(),allowedBlockTypes:m(T).getEditorSettings().allowedBlockTypes,hiddenBlockTypes:m(HSe.store).get("core","hiddenBlockTypes")??IWe}),[]),a=(0,USe.useMemo)(()=>o===!0?r:r.filter(({name:m})=>o?.includes(m)),[o,r]).filter(m=>(0,o6.hasBlockSupport)(m,"inserter",!0)&&(!m.parent||m.parent.includes("core/post-content"))),l=n.filter(m=>a.some(h=>h.name===m)),c=a.filter(m=>!l.includes(m.name)),u=a.length-c.length;function d(){f(a)}let f=m=>{if(c.length>m.length){let h=c.filter(g=>!m.find(({name:v})=>v===g.name));t(h.map(({name:g})=>g))}else if(c.length<m.length){let h=m.filter(g=>!c.find(({name:v})=>v===g.name));e(h.map(({name:g})=>g))}};return(0,qw.jsxs)("div",{className:"editor-block-visibility",children:[!!u&&(0,qw.jsxs)("div",{className:"editor-block-visibility__disabled-blocks-count",children:[(0,Kw.sprintf)((0,Kw._n)("%d block is hidden.","%d blocks are hidden.",u),u),(0,qw.jsx)(GSe.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:d,children:(0,Kw.__)("Reset")})]}),(0,qw.jsx)(AWe,{blockTypes:a,selectedBlockTypes:c,onChange:f,showSelectAll:!1})]})}var qe=s(x(),1),{PreferencesModal:OWe,PreferencesModalTabs:NWe,PreferencesModalSection:Pf,PreferenceToggleControl:Ds}=Y(DC.privateApis);function ZSe({extraSections:e={}}){let t=(0,Bv.useSelect)(o=>o(Me).isModalActive("editor/preferences"),[]),{closeModal:r}=(0,Bv.useDispatch)(Me);return t?(0,qe.jsx)(OWe,{closeModal:r,children:(0,qe.jsx)(MWe,{extraSections:e})}):null}function MWe({extraSections:e={}}){let t=(0,qSe.useViewportMatch)("medium"),{showBlockBreadcrumbsOption:r,showCollaborationOptions:o}=(0,Bv.useSelect)(c=>{let{getEditorSettings:u,isCollaborationEnabledForCurrentPost:d}=c(T),{get:f}=c(DC.store),m=u().richEditingEnabled;return{showBlockBreadcrumbsOption:!f("core","distractionFree")&&t&&m,showCollaborationOptions:d()}},[t]),{setIsListViewOpened:n,setIsInserterOpened:i}=(0,Bv.useDispatch)(T),{set:a}=(0,Bv.useDispatch)(DC.store),l=(0,KSe.useMemo)(()=>[{name:"general",tabLabel:(0,Ge.__)("General"),content:(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsxs)(Pf,{title:(0,Ge.__)("Interface"),children:[(0,qe.jsx)(Ds,{scope:"core",featureName:"showListViewByDefault",help:(0,Ge.__)("Opens the List View panel by default."),label:(0,Ge.__)("Always open List View")}),r&&(0,qe.jsx)(Ds,{scope:"core",featureName:"showBlockBreadcrumbs",help:(0,Ge.__)("Display the block hierarchy trail at the bottom of the editor."),label:(0,Ge.__)("Show block breadcrumbs")}),(0,qe.jsx)(Ds,{scope:"core",featureName:"allowRightClickOverrides",help:(0,Ge.__)("Allows contextual List View menus via right-click, overriding browser defaults."),label:(0,Ge.__)("Allow right-click contextual menus")}),(0,qe.jsx)(Ds,{scope:"core",featureName:"enableChoosePatternModal",help:(0,Ge.__)("Pick from starter content when creating a new page."),label:(0,Ge.__)("Show starter patterns")}),o&&(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)(Ds,{scope:"core",featureName:"showCollaborationCursor",help:(0,Ge.__)("Show your own avatar inside blocks during collaborative editing sessions."),label:(0,Ge.__)("Show avatar in blocks")}),(0,qe.jsx)(Ds,{scope:"core",featureName:"showCollaborationNotifications",help:(0,Ge.__)("Show notifications when collaborators join, leave, or save the post."),label:(0,Ge.__)("Show collaboration notifications")})]})]}),(0,qe.jsxs)(Pf,{title:(0,Ge.__)("Document settings"),description:(0,Ge.__)("Select what settings are shown in the document panel."),children:[(0,qe.jsx)(QI.Slot,{}),(0,qe.jsx)(Q0,{taxonomyWrapper:(c,u)=>(0,qe.jsx)(yp,{label:u.labels.menu_name,panelName:`taxonomy-panel-${u.slug}`})}),(0,qe.jsx)(ef,{children:(0,qe.jsx)(yp,{label:(0,Ge.__)("Featured image"),panelName:"featured-image"})}),(0,qe.jsx)(cv,{children:(0,qe.jsx)(yp,{label:(0,Ge.__)("Excerpt"),panelName:"post-excerpt"})}),(0,qe.jsx)(Mr,{supportKeys:["comments","trackbacks"],children:(0,qe.jsx)(yp,{label:(0,Ge.__)("Discussion"),panelName:"discussion-panel"})}),(0,qe.jsx)(v0,{children:(0,qe.jsx)(yp,{label:(0,Ge.__)("Page attributes"),panelName:"page-attributes"})})]}),t&&(0,qe.jsx)(Pf,{title:(0,Ge.__)("Publishing"),children:(0,qe.jsx)(zSe,{help:(0,Ge.__)("Review settings, such as visibility and tags."),label:(0,Ge.__)("Enable pre-publish checks")})}),e?.general]})},{name:"appearance",tabLabel:(0,Ge.__)("Appearance"),content:(0,qe.jsxs)(Pf,{title:(0,Ge.__)("Appearance"),description:(0,Ge.__)("Customize the editor interface to suit your needs."),children:[(0,qe.jsx)(Ds,{scope:"core",featureName:"fixedToolbar",onToggle:()=>a("core","distractionFree",!1),help:(0,Ge.__)("Access all block and document tools in a single place."),label:(0,Ge.__)("Top toolbar")}),(0,qe.jsx)(Ds,{scope:"core",featureName:"distractionFree",onToggle:()=>{a("core","fixedToolbar",!0),i(!1),n(!1)},help:(0,Ge.__)("Reduce visual distractions by hiding the toolbar and other elements to focus on writing."),label:(0,Ge.__)("Distraction free")}),(0,qe.jsx)(Ds,{scope:"core",featureName:"focusMode",help:(0,Ge.__)("Highlights the current block and fades other content."),label:(0,Ge.__)("Spotlight mode")}),e?.appearance]})},{name:"accessibility",tabLabel:(0,Ge.__)("Accessibility"),content:(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)(Pf,{title:(0,Ge.__)("Navigation"),description:(0,Ge.__)("Optimize the editing experience for enhanced control."),children:(0,qe.jsx)(Ds,{scope:"core",featureName:"keepCaretInsideBlock",help:(0,Ge.__)("Keeps the text cursor within blocks while navigating with arrow keys, preventing it from moving to other blocks and enhancing accessibility for keyboard users."),label:(0,Ge.__)("Contain text cursor inside block")})}),(0,qe.jsx)(Pf,{title:(0,Ge.__)("Interface"),children:(0,qe.jsx)(Ds,{scope:"core",featureName:"showIconLabels",label:(0,Ge.__)("Show button text labels"),help:(0,Ge.__)("Show text instead of icons on buttons across the interface.")})})]})},{name:"blocks",tabLabel:(0,Ge.__)("Blocks"),content:(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)(Pf,{title:(0,Ge.__)("Inserter"),children:(0,qe.jsx)(Ds,{scope:"core",featureName:"mostUsedBlocks",help:(0,Ge.__)("Adds a category with the most frequently used blocks in the inserter."),label:(0,Ge.__)("Show most used blocks")})}),(0,qe.jsx)(Pf,{title:(0,Ge.__)("Manage block visibility"),description:(0,Ge.__)("Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later."),children:(0,qe.jsx)(YSe,{})})]})},window.__clientSideMediaProcessing&&{name:"media",tabLabel:(0,Ge.__)("Media"),content:(0,qe.jsx)(qe.Fragment,{children:(0,qe.jsxs)(Pf,{title:(0,Ge.__)("General"),description:(0,Ge.__)("Customize options related to the media upload flow."),children:[(0,qe.jsx)(Ds,{scope:"core/media",featureName:"optimizeOnUpload",help:(0,Ge.__)("Compress media items before uploading to the server."),label:(0,Ge.__)("Pre-upload compression")}),(0,qe.jsx)(Ds,{scope:"core/media",featureName:"requireApproval",help:(0,Ge.__)("Require approval step when optimizing existing media."),label:(0,Ge.__)("Approval step")})]})})}].filter(Boolean),[r,o,e,i,n,a,t]);return(0,qe.jsx)(NWe,{sections:l})}var jC=s(lt(),1);var LC=s(ce(),1),XSe="content",QSe={name:"core/pattern-overrides",getValues({select:e,clientId:t,context:r,bindings:o}){let n=r["pattern/overrides"],{getBlockAttributes:i}=e(LC.store),a=i(t),l={};for(let c of Object.keys(o)){let u=n?.[a?.metadata?.name]?.[c];if(u===void 0){l[c]=a[c];continue}else l[c]=u===""?void 0:u}return l},setValues({select:e,dispatch:t,clientId:r,bindings:o}){let{getBlockAttributes:n,getBlockParentsByBlockName:i,getBlocks:a}=e(LC.store),c=n(r)?.metadata?.name;if(!c)return;let[u]=i(r,"core/block",!0),d=Object.entries(o).reduce((m,[h,{newValue:g}])=>(m[h]=g,m),{});if(!u){let m=h=>{for(let g of h)g.attributes?.metadata?.name===c&&t(LC.store).updateBlockAttributes(g.clientId,d),m(g.innerBlocks)};m(a());return}let f=n(u)?.[XSe];t(LC.store).updateBlockAttributes(u,{[XSe]:{...f,[c]:{...f?.[c],...Object.entries(d).reduce((m,[h,g])=>(m[h]=g===void 0?"":g,m),{})}}})},canUserEditValue:()=>!0};var n6=s(N(),1),i6=s(Q(),1),BC=s(ce(),1),Jj=["core/navigation-link","core/navigation-submenu"],JSe=[{label:(0,n6.__)("Post Date"),args:{field:"date"},type:"string"},{label:(0,n6.__)("Post Modified Date"),args:{field:"modified"},type:"string"},{label:(0,n6.__)("Post Link"),args:{field:"link"},type:"string"}],$Se={name:"core/post-data",getValues({select:e,context:t,bindings:r,clientId:o}){let{getBlockAttributes:n,getBlockName:i}=e(BC.store),a=i(o),l=Jj.includes(a),c,u;if(l){let h=n(o);c=h?.id,u=h?.type}else c=t?.postId,u=t?.postType;let{getEditedEntityRecord:d}=e(i6.store),f=d("postType",u,c),m={};for(let[h,g]of Object.entries(r)){let v=JSe.find(y=>y.args.field===g.args.field);v?f?m[h]=f[g.args.field]:m[h]=v.label:m[h]=g.args.field}return m},setValues({dispatch:e,context:t,bindings:r,clientId:o,select:n}){let{getBlockName:i}=n(BC.store),a=i(o);if(Jj.includes(a))return!1;let l={};Object.values(r).forEach(({args:c,newValue:u})=>{l[c.field]=u}),e(i6.store).editEntityRecord("postType",t?.postType,t?.postId,l)},canUserEditValue({select:e,context:t}){let{getBlockName:r,getSelectedBlockClientId:o}=e(BC.store),n=o(),i=r(n);return!(Jj.includes(i)||t?.query||t?.queryId||!t?.postType||!e(i6.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId}))},getFieldsList({context:e,select:t}){return t(BC.store).getSelectedBlock()?.name!=="core/post-date"?[]:!e||!e.postId||!e.postType?[]:JSe}};var VC=s(Q(),1);function $j(e,t){let{getRegisteredPostMeta:r}=Y(e(VC.store)),o=r(t?.postType),n=[];return Object.entries(o).forEach(([i,a])=>{i==="footnotes"||i.charAt(0)==="_"||n.push({label:a.title||i,args:{key:i},default:a.default,type:a.type})}),n}function FWe({select:e,context:t,args:r}){let n=$j(e,t).find(l=>l.args.key===r.key);if(!n)return r.key;if(!t?.postId)return n.default||n.label||r.key;let{getEditedEntityRecord:i}=e(VC.store);return i("postType",t?.postType,t?.postId).meta?.[r.key]??n?.label??r.key}var e_e={name:"core/post-meta",getValues({select:e,context:t,bindings:r}){let o={};for(let[n,i]of Object.entries(r))o[n]=FWe({select:e,context:t,args:i.args});return o},setValues({dispatch:e,context:t,bindings:r}){let o={};Object.values(r).forEach(({args:n,newValue:i})=>{o[n.key]=i}),e(VC.store).editEntityRecord("postType",t?.postType,t?.postId,{meta:o})},canUserEditValue({select:e,context:t,args:r}){return!(t?.query||t?.queryId||!t?.postType||!$j(e,t).some(l=>l.args.key===r.key)||e(T).getEditorSettings().enableCustomFields||!e(VC.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId}))},getFieldsList({select:e,context:t}){return $j(e,t).map(({default:o,...n})=>({...n}))}};var Up=s(N(),1),t_e=s(Q(),1),s6=s(ce(),1),ez=["core/navigation-link","core/navigation-submenu"],tz=[{label:(0,Up.__)("Term ID"),args:{field:"id"},type:"string"},{label:(0,Up.__)("Name"),args:{field:"name"},type:"string"},{label:(0,Up.__)("Slug"),args:{field:"slug"},type:"string"},{label:(0,Up.__)("Link"),args:{field:"link"},type:"string"},{label:(0,Up.__)("Description"),args:{field:"description"},type:"string"},{label:(0,Up.__)("Parent ID"),args:{field:"parent"},type:"string"},{label:(0,Up.__)("Count"),args:{field:"count"},type:"string"}],r_e={name:"core/term-data",usesContext:["taxonomy","termId","termData"],getValues({select:e,context:t,bindings:r,clientId:o}){let{getEntityRecord:n}=e(t_e.store),{getBlockAttributes:i,getBlockName:a}=e(s6.store),l=a(o),c=ez.includes(l),u;if(c){let f=i(o),m=f?.type;u=n("taxonomy",m==="tag"?"post_tag":m,f?.id)}else t.termId&&t.taxonomy&&(u=n("taxonomy",t.taxonomy,t.termId));!u&&t?.termData&&!c&&(u=t.termData);let d={};for(let[f,m]of Object.entries(r)){let h=tz.find(g=>g.args.field===m.args.field);h?!u||u[m.args.field]===void 0?d[f]=h.label:m.args.field==="count"?d[f]="("+u[m.args.field]+")":d[f]=u[m.args.field]:d[f]=m.args.field}return d},setValues({dispatch:e,context:t,bindings:r}){return!1},canUserEditValue({select:e,context:t}){let{getBlockName:r,getSelectedBlockClientId:o}=e(s6.store),n=o(),i=r(n);return ez.includes(i)||t?.termQuery||!t?.taxonomy||!t?.termId,!1},getFieldsList({context:e,select:t}){let{getBlockAttributes:r,getBlockName:o,getSelectedBlockClientId:n}=t(s6.store),i=n(),a=o(i);if(ez.includes(a)){let l=r(i);return!l||!l.id||!l.type?[]:tz}return e?e.taxonomy&&e.termId||e.termData?tz:[]:[]}};function o_e(){(0,jC.registerBlockBindingsSource)(QSe),(0,jC.registerBlockBindingsSource)($Se),(0,jC.registerBlockBindingsSource)(e_e),(0,jC.registerBlockBindingsSource)(r_e)}var{store:DWe,...LWe}=FV,n_e={};Oz(n_e,{CreateTemplatePartModal:Py,patternTitleField:FS,templateTitleField:MS,BackButton:lN,EntitiesSavedStatesExtensible:wx,Editor:BSe,PluginPostExcerpt:Ex,PostCardPanel:yu,PreferencesModal:ZSe,usePostActions:f3,usePostFields:Zm,ToolsMoreMenuGroup:hN,ViewMoreMenuGroup:gN,ResizableEditor:f0,registerCoreBlockBindingsSources:o_e,getTemplateInfo:_a,GlobalStylesUIWrapper:JA,GlobalStylesActionMenu:Q3,StyleBookPreview:Bce,useGlobalStyles:vn,useStyle:sp,interfaceStore:DWe,...LWe});var zC=s(U(),1);function BWe(e,t,r){let{registerEntityAction:o}=Y((0,zC.dispatch)(T));o(e,t,r)}function VWe(e,t,r){let{unregisterEntityAction:o}=Y((0,zC.dispatch)(T));o(e,t,r)}function jWe(e,t,r){let{registerEntityField:o}=Y((0,zC.dispatch)(T));o(e,t,r)}function zWe(e,t,r){let{unregisterEntityField:o}=Y((0,zC.dispatch)(T));o(e,t,r)}var i_e=s(ce(),1);return m_e(HWe);})();
486 /*! Bundled license information:
487
488 use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
489 (**
490 * @license React
491 * use-sync-external-store-shim.production.js
492 *
493 * Copyright (c) Meta Platforms, Inc. and affiliates.
494 *
495 * This source code is licensed under the MIT license found in the
496 * LICENSE file in the root directory of this source tree.
497 *)
498
499 autosize/dist/autosize.js:
500 (*!
501 autosize 4.0.2
502 license: MIT
503 http://www.jacklmoore.com/autosize
504 *)
505
506 is-plain-object/dist/is-plain-object.mjs:
507 (*!
508 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
509 *
510 * Copyright (c) 2014-2017, Jon Schlinkert.
511 * Released under the MIT License.
512 *)
513 */
514 //# sourceMappingURL=index.min.js.map
515