HEX
Server: nginx
System: Linux pool195-106-36.bur.atomicsites.net 6.12.57+deb12-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.57-1~bpo12+1 (2025-11-17) x86_64
User: (0)
PHP: 8.3.32
Disabled: pcntl_fork
Upload Files
File: //srv/wordpress/core/beta/wp-includes/js/dist/editor.min.js
/*! This file is auto-generated */
"use strict";var wp;(wp||={}).editor=(()=>{var eNe=Object.create;var Ck=Object.defineProperty;var tNe=Object.getOwnPropertyDescriptor;var rNe=Object.getOwnPropertyNames;var oNe=Object.getPrototypeOf,nNe=Object.prototype.hasOwnProperty;var oa=(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 Qe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Yr=(e,t)=>{for(var r in t)Ck(e,r,{get:t[r],enumerable:!0})},$K=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of rNe(t))!nNe.call(e,n)&&n!==r&&Ck(e,n,{get:()=>t[n],enumerable:!(o=tNe(t,n))||o.enumerable});return e};var a=(e,t,r)=>(r=e!=null?eNe(oNe(e)):{},$K(t||!e||!e.__esModule?Ck(r,"default",{value:e,enumerable:!0}):r,e)),iNe=e=>$K(Ck({},"__esModule",{value:!0}),e);var Y=Qe((idt,eZ)=>{eZ.exports=window.wp.data});var ae=Qe((sdt,tZ)=>{tZ.exports=window.wp.coreData});var U=Qe((adt,rZ)=>{rZ.exports=window.wp.element});var Te=Qe((ldt,oZ)=>{oZ.exports=window.wp.compose});var jn=Qe((cdt,nZ)=>{nZ.exports=window.wp.hooks});var be=Qe((udt,iZ)=>{iZ.exports=window.wp.blockEditor});var Pt=Qe((gdt,fZ)=>{fZ.exports=window.wp.blocks});var ln=Qe((vdt,pZ)=>{pZ.exports=window.wp.date});var vo=Qe((bdt,mZ)=>{mZ.exports=window.wp.url});var qa=Qe((ydt,hZ)=>{hZ.exports=window.wp.deprecated});var Dt=Qe((wdt,gZ)=>{gZ.exports=window.wp.preferences});var Se=Qe((xdt,_Z)=>{_Z.exports=window.wp.primitives});var E=Qe((Cdt,SZ)=>{SZ.exports=window.ReactJSXRuntime});var xf=Qe((tht,xZ)=>{xZ.exports=window.wp.privateApis});var d8=Qe((dht,PZ)=>{PZ.exports=window.wp.styleEngine});var j=Qe((xht,NZ)=>{NZ.exports=window.wp.i18n});var v2=Qe((Cht,MZ)=>{"use strict";MZ.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 s=i[n];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}});var b2=Qe((Eht,LZ)=>{"use strict";var GNe=function(t){return YNe(t)&&!qNe(t)};function YNe(e){return!!e&&typeof e=="object"}function qNe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||XNe(e)}var KNe=typeof Symbol=="function"&&Symbol.for,ZNe=KNe?Symbol.for("react.element"):60103;function XNe(e){return e.$$typeof===ZNe}function QNe(e){return Array.isArray(e)?[]:{}}function M1(e,t){return t.clone!==!1&&t.isMergeableObject(e)?w0(QNe(e),e,t):e}function JNe(e,t,r){return e.concat(t).map(function(o){return M1(o,r)})}function $Ne(e,t){if(!t.customMerge)return w0;var r=t.customMerge(e);return typeof r=="function"?r:w0}function eMe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function FZ(e){return Object.keys(e).concat(eMe(e))}function DZ(e,t){try{return t in e}catch{return!1}}function tMe(e,t){return DZ(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function rMe(e,t,r){var o={};return r.isMergeableObject(e)&&FZ(e).forEach(function(n){o[n]=M1(e[n],r)}),FZ(t).forEach(function(n){tMe(e,n)||(DZ(e,n)&&r.isMergeableObject(t[n])?o[n]=$Ne(n,r)(e[n],t[n],r):o[n]=M1(t[n],r))}),o}function w0(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||JNe,r.isMergeableObject=r.isMergeableObject||GNe,r.cloneUnlessOtherwiseSpecified=M1;var o=Array.isArray(t),n=Array.isArray(e),i=o===n;return i?o?r.arrayMerge(e,t,r):rMe(e,t,r):M1(t,r)}w0.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(o,n){return w0(o,n,r)},{})};var oMe=w0;LZ.exports=oMe});var Ol=Qe((zgt,AX)=>{AX.exports=window.wp.a11y});var Bu=Qe((Hgt,IX)=>{IX.exports=window.wp.apiFetch});var It=Qe((Ugt,OX)=>{OX.exports=window.wp.notices});var Lt=Qe((qgt,BX)=>{BX.exports=window.wp.htmlEntities});var jX=Qe((Xgt,VX)=>{"use strict";VX.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 s=i[n];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}});var Tf=Qe((ivt,YX)=>{YX.exports=window.wp.mediaUtils});var G=Qe((Svt,lQ)=>{lQ.exports=window.wp.components});var Nl=Qe((Jvt,kQ)=>{kQ.exports=window.wp.patterns});var _e=Qe(($vt,RQ)=>{RQ.exports=window.React});var Vu=Qe((Dyt,iJ)=>{iJ.exports=window.ReactDOM});var g$=Qe(h$=>{"use strict";var V0=_e();function GLe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var YLe=typeof Object.is=="function"?Object.is:GLe,qLe=V0.useState,KLe=V0.useEffect,ZLe=V0.useLayoutEffect,XLe=V0.useDebugValue;function QLe(e,t){var r=t(),o=qLe({inst:{value:r,getSnapshot:t}}),n=o[0].inst,i=o[1];return ZLe(function(){n.value=r,n.getSnapshot=t,L7(n)&&i({inst:n})},[e,r,t]),KLe(function(){return L7(n)&&i({inst:n}),e(function(){L7(n)&&i({inst:n})})},[e]),XLe(r),r}function L7(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!YLe(e,r)}catch{return!0}}function JLe(e,t){return t()}var $Le=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?JLe:QLe;h$.useSyncExternalStore=V0.useSyncExternalStore!==void 0?V0.useSyncExternalStore:$Le});var mC=Qe((Vwt,v$)=>{"use strict";v$.exports=g$()});var y$=Qe(b$=>{"use strict";var vA=_e(),e4e=mC();function t4e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var r4e=typeof Object.is=="function"?Object.is:t4e,o4e=e4e.useSyncExternalStore,n4e=vA.useRef,i4e=vA.useEffect,s4e=vA.useMemo,a4e=vA.useDebugValue;b$.useSyncExternalStoreWithSelector=function(e,t,r,o,n){var i=n4e(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=s4e(function(){function c(h){if(!u){if(u=!0,d=h,h=o(h),n!==void 0&&s.hasValue){var g=s.value;if(n(g,h))return f=g}return f=h}if(g=f,r4e(d,h))return g;var v=o(h);return n!==void 0&&n(g,v)?(d=h,g):(d=h,f=v)}var u=!1,d,f,m=r===void 0?null:r;return[function(){return c(t())},m===null?void 0:function(){return c(m())}]},[t,r,o,n]);var l=o4e(e,i[0],i[1]);return i4e(function(){s.hasValue=!0,s.value=l},[l]),a4e(l),l}});var _$=Qe((zwt,w$)=>{"use strict";w$.exports=y$()});var Z9=Qe((Nkt,lre)=>{lre.exports=window.wp.theme});var nI=Qe((_2t,hoe)=>{hoe.exports=window.wp.blob});var gw=Qe((gAt,II)=>{var Ine={\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"},One=Object.keys(Ine).join("|"),r7e=new RegExp(One,"g"),o7e=new RegExp(One,"");function n7e(e){return Ine[e]}var Nne=function(e){return e.replace(r7e,n7e)},i7e=function(e){return!!e.match(o7e)};II.exports=Nne;II.exports.has=i7e;II.exports.remove=Nne});var Cw=Qe((lIt,Cie)=>{Cie.exports=window.wp.wordcount});var Mo=Qe((fNt,Aae)=>{Aae.exports=window.wp.keycodes});var GU=Qe((e8t,Fde)=>{Fde.exports=window.wp.warning});var hd=Qe((k7t,_fe)=>{_fe.exports=window.wp.richText});var xa=Qe((RWt,pme)=>{pme.exports=window.wp.keyboardShortcuts});var hme=Qe((AWt,mme)=>{mme.exports=window.wp.viewport});var zh=Qe((IWt,gme)=>{gme.exports=window.wp.plugins});var X0e=Qe((Hir,Z0e)=>{Z0e.exports=window.wp.blockSerializationDefaultParser});var OG=Qe((tsr,lwe)=>{lwe.exports=window.wp.commands});var l3=Qe((_sr,wwe)=>{wwe.exports=window.wp.uploadMedia});var Mp=Qe((mlr,B_e)=>{B_e.exports=window.wp.dom});var bEe=Qe((chr,vEe)=>{"use strict";var vst="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";vEe.exports=vst});var SEe=Qe((uhr,_Ee)=>{"use strict";var bst=bEe();function yEe(){}function wEe(){}wEe.resetWarningCache=yEe;_Ee.exports=function(){function e(o,n,i,s,l,c){if(c!==bst){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:wEe,resetWarningCache:yEe};return r.PropTypes=r,r}});var CEe=Qe((phr,xEe)=>{xEe.exports=SEe()();var dhr,fhr});var EEe=Qe((KF,TEe)=>{(function(e,t){if(typeof define=="function"&&define.amd)define(["module","exports"],t);else if(typeof KF<"u")t(TEe,KF);else{var r={exports:{}};t(r,r.exports),e.autosize=r.exports}})(KF,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),b()}function h(w){{var S=c.style.width;c.style.width="0px",c.offsetWidth,c.style.width=S}c.style.overflowY=w}function g(w){for(var S=[];w&&w.parentNode&&w.parentNode instanceof Element;)w.parentNode.scrollTop&&S.push({node:w.parentNode,scrollTop:w.parentNode.scrollTop}),w=w.parentNode;return S}function v(){if(c.scrollHeight!==0){var w=g(c),S=document.documentElement&&document.documentElement.scrollTop;c.style.height="",c.style.height=c.scrollHeight+u+"px",d=c.clientWidth,w.forEach(function(x){x.node.scrollTop=x.scrollTop}),S&&(document.documentElement.scrollTop=S)}}function b(){v();var w=Math.round(parseFloat(c.style.height)),S=window.getComputedStyle(c,null),x=S.boxSizing==="content-box"?Math.round(parseFloat(S.height)):c.offsetHeight;if(x<w?S.overflowY==="hidden"&&(h("scroll"),v(),x=S.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight):S.overflowY!=="hidden"&&(h("hidden"),v(),x=S.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight),f!==x){f=x;var C=o("autosize:resized");try{c.dispatchEvent(C)}catch{}}}var _=function(){c.clientWidth!==d&&b()},y=function(w){window.removeEventListener("resize",_,!1),c.removeEventListener("input",b,!1),c.removeEventListener("keyup",b,!1),c.removeEventListener("autosize:destroy",y,!1),c.removeEventListener("autosize:update",b,!1),Object.keys(w).forEach(function(S){c.style[S]=w[S]}),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",y,!1),"onpropertychange"in c&&"oninput"in c&&c.addEventListener("keyup",b,!1),window.addEventListener("resize",_,!1),c.addEventListener("input",b,!1),c.addEventListener("autosize:update",b,!1),c.style.overflowX="hidden",c.style.wordWrap="break-word",r.set(c,{destroy:y,update:b}),m()}function i(c){var u=r.get(c);u&&u.destroy()}function s(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],s),c}),t.default=l,e.exports=t.default})});var kEe=Qe((mhr,PEe)=>{var yst=function(e,t,r){return r=window.getComputedStyle,(r?r(e):e.currentStyle)[t.replace(/-(\w)/gi,function(o,n){return n.toUpperCase()})]};PEe.exports=yst});var AEe=Qe((hhr,REe)=>{var bq=kEe();function wst(e){var t=bq(e,"line-height"),r=parseFloat(t,10);if(t===r+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=bq(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 s=bq(e,"font-size");i.style.fontSize=s,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}REe.exports=wst});var OEe=Qe(Kp=>{"use strict";var _st=Kp&&Kp.__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)}})(),yq=Kp&&Kp.__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},Sst=Kp&&Kp.__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};Kp.__esModule=!0;var XF=_e(),TP=CEe(),ZF=EEe(),xst=AEe(),Cst=xst,IEe="autosize:resized",Tst=(function(e){_st(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:Cst(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&&ZF(r.textarea)}):this.textarea&&ZF(this.textarea),this.textarea&&this.textarea.addEventListener(IEe,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(IEe,this.onResize),ZF.destroy(this.textarea))},t.prototype.render=function(){var r=this,o=this,n=o.props,i=n.onResize,s=n.maxRows,l=n.onChange,c=n.style,u=n.innerRef,d=n.children,f=Sst(n,["onResize","maxRows","onChange","style","innerRef","children"]),m=o.state.lineHeight,h=s&&m?m*s:null;return XF.createElement("textarea",yq({},f,{onChange:this.onChange,style:h?yq({},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&&ZF.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:TP.number,maxRows:TP.number,onResize:TP.func,innerRef:TP.any,async:TP.bool},t})(XF.Component);Kp.TextareaAutosize=XF.forwardRef(function(e,t){return XF.createElement(Tst,yq({},e,{innerRef:t}))})});var MEe=Qe((vhr,NEe)=>{"use strict";var Est=OEe();NEe.exports=Est.TextareaAutosize});var MPe=Qe((xgr,NPe)=>{NPe.exports=window.wp.serverSideRender});var odt={};Yr(odt,{AlignmentToolbar:()=>Bst,Autocomplete:()=>Lst,AutosaveMonitor:()=>E3,BlockAlignmentToolbar:()=>Vst,BlockControls:()=>jst,BlockEdit:()=>zst,BlockEditorKeyboardShortcuts:()=>Hst,BlockFormatControls:()=>Ust,BlockIcon:()=>Wst,BlockInspector:()=>Gst,BlockList:()=>Yst,BlockMover:()=>qst,BlockNavigationDropdown:()=>Kst,BlockSelectionClearer:()=>Zst,BlockSettingsMenu:()=>Xst,BlockTitle:()=>Qst,BlockToolbar:()=>Jst,CharacterCount:()=>dx,ColorPalette:()=>$st,ContrastChecker:()=>eat,CopyHandler:()=>tat,DefaultBlockAppender:()=>rat,DocumentBar:()=>z3,DocumentOutline:()=>vS,DocumentOutlineCheck:()=>RSe,EditorHistoryRedo:()=>q3,EditorHistoryUndo:()=>X3,EditorKeyboardShortcuts:()=>sS,EditorKeyboardShortcutsRegister:()=>DSe,EditorNotices:()=>ZSe,EditorProvider:()=>m_e,EditorSnackbars:()=>$Se,EntitiesSavedStates:()=>n6,ErrorBoundary:()=>fxe,FontSizePicker:()=>oat,InnerBlocks:()=>iat,Inserter:()=>nat,InspectorAdvancedControls:()=>sat,InspectorControls:()=>aat,LocalAutosaveMonitor:()=>gxe,MediaPlaceholder:()=>pat,MediaUpload:()=>mat,MediaUploadCheck:()=>hat,MultiSelectScrollIntoView:()=>gat,NavigableToolbar:()=>vat,ObserveTyping:()=>bat,PageAttributesCheck:()=>wS,PageAttributesOrder:()=>Sxe,PageAttributesPanel:()=>u6,PageAttributesParent:()=>Nxe,PageTemplate:()=>p6,PanelColorSettings:()=>lat,PlainText:()=>cat,PluginBlockSettingsMenuItem:()=>Xxe,PluginDocumentSettingPanel:()=>b6,PluginMoreMenuItem:()=>e1e,PluginPostPublishPanel:()=>w6,PluginPostStatusInfo:()=>kS,PluginPrePublishPanel:()=>x6,PluginPreviewMenuItem:()=>c1e,PluginSidebar:()=>My,PluginSidebarMoreMenuItem:()=>f1e,PostAuthor:()=>k6,PostAuthorCheck:()=>R6,PostAuthorPanel:()=>O6,PostComments:()=>D6,PostDiscussionPanel:()=>H6,PostExcerpt:()=>aP,PostExcerptCheck:()=>By,PostExcerptPanel:()=>gCe,PostFeaturedImage:()=>uP,PostFeaturedImageCheck:()=>Gp,PostFeaturedImagePanel:()=>J6,PostFormat:()=>fP,PostFormatCheck:()=>LS,PostLastRevision:()=>tF,PostLastRevisionCheck:()=>zy,PostLastRevisionPanel:()=>DCe,PostLockedModal:()=>UCe,PostPendingStatus:()=>qCe,PostPendingStatusCheck:()=>oF,PostPingbacks:()=>j6,PostPreviewButton:()=>jS,PostPublishButton:()=>zS,PostPublishButtonLabel:()=>sF,PostPublishPanel:()=>EF,PostSavedState:()=>LF,PostSchedule:()=>WS,PostScheduleCheck:()=>BF,PostScheduleLabel:()=>GS,PostSchedulePanel:()=>zF,PostSticky:()=>RF,PostStickyCheck:()=>PF,PostSwitchToDraftButton:()=>cEe,PostSyncStatus:()=>WF,PostTaxonomies:()=>$S,PostTaxonomiesCheck:()=>GF,PostTaxonomiesFlatTermSelector:()=>sq,PostTaxonomiesHierarchicalTermSelector:()=>cq,PostTaxonomiesPanel:()=>qF,PostTemplatePanel:()=>T6,PostTextEditor:()=>EP,PostTitle:()=>iD,PostTitleRaw:()=>aD,PostTrash:()=>sx,PostTrashCheck:()=>lD,PostTypeSupportCheck:()=>uo,PostURL:()=>AP,PostURLCheck:()=>fD,PostURLLabel:()=>aPe,PostURLPanel:()=>gD,PostVisibility:()=>gP,PostVisibilityCheck:()=>dPe,PostVisibilityLabel:()=>uF,RichText:()=>BPe,RichTextShortcut:()=>uat,RichTextToolbarButton:()=>dat,ServerSideRender:()=>DPe.default,SkipToSelectedBlock:()=>yat,TableOfContents:()=>PPe,TextEditorGlobalKeyboardShortcuts:()=>Fat,ThemeSupportCheck:()=>Z6,TimeToRead:()=>ux,URLInput:()=>wat,URLInputButton:()=>_at,URLPopover:()=>Sat,UnsavedChangesWarning:()=>OPe,VisualEditorGlobalKeyboardShortcuts:()=>Mat,Warning:()=>xat,WordCount:()=>cx,WritingFlow:()=>Cat,__unstableRichTextInputEvent:()=>fat,cleanForSlug:()=>rQ,createCustomColorsHOC:()=>Tat,getColorClassName:()=>Eat,getColorObjectByAttributeValues:()=>Pat,getColorObjectByColorValue:()=>kat,getFontSize:()=>Rat,getFontSizeClass:()=>Aat,getTemplatePartIcon:()=>gm,linkAutocompleter:()=>C3,mediaUpload:()=>M2,privateApis:()=>X5e,registerEntityAction:()=>$ut,registerEntityField:()=>tdt,store:()=>I,storeConfig:()=>iT,transformStyles:()=>Q5e.transformStyles,unregisterEntityAction:()=>edt,unregisterEntityField:()=>rdt,useEntitiesSavedStatesIsDirty:()=>o6,usePostScheduleLabel:()=>YS,usePostURLLabel:()=>Cq,usePostVisibilityLabel:()=>tq,userAutocompleter:()=>T3,withColorContext:()=>Iat,withColors:()=>Oat,withFontSizes:()=>Nat});var T_e=a(Y(),1),E_e=a(ae(),1),P_e=a(U(),1),k_e=a(Te(),1),R_e=a(jn(),1);var x3=a(Y(),1);var uZ=a(Y(),1);var sZ=a(be(),1),aZ={...sZ.SETTINGS_DEFAULTS,richEditingEnabled:!0,codeEditingEnabled:!0,fontLibraryEnabled:!0,enableCustomFields:void 0,defaultRenderingMode:"post-only"};var lZ=a(Y(),1);function sNe(e={},t){return t.type==="SET_IS_READY"?{...e,[t.kind]:{...e[t.kind],[t.name]:!0}}:e}function aNe(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 lNe(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 cZ=(0,lZ.combineReducers)({actions:aNe,fields:lNe,isReady:sNe});function Tk(e){return e&&typeof e=="object"&&"raw"in e?e.raw:e}function cNe(e=null,t){return t.type==="SET_EDITED_POST"?t.postId:e}function uNe(e=null,t){return t.type==="SET_CURRENT_TEMPLATE_ID"?t.id:e}function dNe(e=null,t){return t.type==="SET_EDITED_POST"?t.postType:e}function fNe(e={isValid:!0},t){return t.type==="SET_TEMPLATE_VALIDITY"?{...e,isValid:t.isValid}:e}function pNe(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 mNe(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 hNe(e={isLocked:!1},t){return t.type==="UPDATE_POST_LOCK"?t.lock:e}function gNe(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 vNe(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 bNe(e=aZ,t){return t.type==="UPDATE_EDITOR_SETTINGS"?{...e,...t.settings}:e}function yNe(e="post-only",t){return t.type==="SET_RENDERING_MODE"?t.mode:e}function wNe(e=void 0,t){return t.type==="SET_CANVAS_WIDTH"?t.width:e}function _Ne(e=[],t){switch(t.type){case"REMOVE_PANEL":if(!e.includes(t.panelName))return[...e,t.panelName]}return e}function SNe(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 xNe(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 CNe(e={current:null}){return e}function TNe(e={current:null}){return e}function ENe(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 PNe(e="/",t){switch(t.type){case"SET_STYLES_PATH":return t.path;case"RESET_STYLES_NAVIGATION":return"/"}return e}function kNe(e=!1,t){switch(t.type){case"SET_SHOW_STYLEBOOK":return t.show;case"RESET_STYLES_NAVIGATION":return!1}return e}function RNe(e=null,t){return t.type==="SET_CURRENT_REVISION_ID"?t.revisionId:e}function ANe(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 INe(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 ONe(e={},t){return t.type==="SELECT_NOTE"?{noteId:t.noteId,options:t.options}:e}var dZ=(0,uZ.combineReducers)({postId:cNe,postType:dNe,templateId:uNe,saving:pNe,deleting:mNe,postLock:hNe,template:fNe,postSavingLock:gNe,editorSettings:bNe,postAutosavingLock:vNe,renderingMode:yNe,canvasWidth:wNe,removedPanels:_Ne,blockInserterPanel:SNe,inserterSidebarToggleRef:TNe,listViewPanel:xNe,listViewToggleRef:CNe,publishSidebarActive:ENe,stylesPath:PNe,showStylebook:kNe,revisionId:RNe,revisionPage:ANe,showRevisionDiff:INe,selectedNote:ONe,dataviews:cZ});var N8={};Yr(N8,{__experimentalGetDefaultTemplatePartAreas:()=>K6e,__experimentalGetDefaultTemplateType:()=>Z6e,__experimentalGetDefaultTemplateTypes:()=>q6e,__experimentalGetTemplateInfo:()=>X6e,__unstableIsEditorReady:()=>U3e,canInsertBlockType:()=>U6e,canUserUseUnfilteredHTML:()=>F3e,didPostSaveRequestFail:()=>S3e,didPostSaveRequestSucceed:()=>_3e,getActivePostLock:()=>M3e,getAdjacentBlockClientId:()=>m6e,getAutosaveAttribute:()=>xX,getBlock:()=>$3e,getBlockAttributes:()=>J3e,getBlockCount:()=>i6e,getBlockHierarchyRootClientId:()=>p6e,getBlockIndex:()=>k6e,getBlockInsertionPoint:()=>B6e,getBlockListSettings:()=>Y6e,getBlockMode:()=>F6e,getBlockName:()=>X3e,getBlockOrder:()=>P6e,getBlockRootClientId:()=>f6e,getBlockSelectionEnd:()=>a6e,getBlockSelectionStart:()=>s6e,getBlocks:()=>e6e,getBlocksByClientId:()=>n6e,getClientIdsOfDescendants:()=>t6e,getClientIdsWithDescendants:()=>r6e,getCurrentPost:()=>Tn,getCurrentPostAttribute:()=>V1,getCurrentPostId:()=>ia,getCurrentPostLastRevisionId:()=>u3e,getCurrentPostRevisionsCount:()=>A8,getCurrentPostType:()=>na,getCurrentTemplateId:()=>c3e,getDeviceType:()=>W3e,getEditedPostAttribute:()=>oo,getEditedPostContent:()=>U1,getEditedPostPreviewLink:()=>T3e,getEditedPostSlug:()=>R3e,getEditedPostVisibility:()=>f3e,getEditorBlocks:()=>L3e,getEditorMode:()=>q3e,getEditorSelection:()=>H3e,getEditorSelectionEnd:()=>z3e,getEditorSelectionStart:()=>j3e,getEditorSettings:()=>O8,getFirstMultiSelectedBlockClientId:()=>w6e,getGlobalBlockCount:()=>o6e,getInserterItems:()=>W6e,getLastMultiSelectedBlockClientId:()=>_6e,getMultiSelectedBlockClientIds:()=>b6e,getMultiSelectedBlocks:()=>y6e,getMultiSelectedBlocksEndClientId:()=>E6e,getMultiSelectedBlocksStartClientId:()=>T6e,getNextBlockClientId:()=>g6e,getPermalink:()=>k3e,getPermalinkParts:()=>PX,getPostEdits:()=>H1,getPostLockUser:()=>N3e,getPostTypeLabel:()=>Q6e,getPreviousBlockClientId:()=>h6e,getRenderingMode:()=>I2,getSelectedBlock:()=>d6e,getSelectedBlockClientId:()=>u6e,getSelectedBlockCount:()=>l6e,getSelectedBlocksInitialCaretPosition:()=>v6e,getStateBeforeOptimisticTransaction:()=>K3e,getSuggestedPostFormat:()=>E3e,getTemplate:()=>z6e,getTemplateLock:()=>H6e,hasChangedContent:()=>SX,hasEditorRedo:()=>s3e,hasEditorUndo:()=>i3e,hasInserterItems:()=>G6e,hasMultiSelection:()=>O6e,hasNonPostEntityChanges:()=>a3e,hasSelectedBlock:()=>c6e,hasSelectedInnerBlock:()=>A6e,inSomeHistory:()=>Z3e,isAncestorMultiSelected:()=>C6e,isAutosavingPost:()=>x3e,isBlockInsertionPointVisible:()=>V6e,isBlockMultiSelected:()=>x6e,isBlockSelected:()=>R6e,isBlockValid:()=>Q3e,isBlockWithinSelection:()=>I6e,isCaretWithinFormattedText:()=>L6e,isCleanNewPost:()=>l3e,isCurrentPostPending:()=>p3e,isCurrentPostPublished:()=>I8,isCurrentPostScheduled:()=>m3e,isDeletingPost:()=>y3e,isEditedPostAutosaveable:()=>g3e,isEditedPostBeingScheduled:()=>v3e,isEditedPostDateFloating:()=>b3e,isEditedPostDirty:()=>R2,isEditedPostEmpty:()=>TX,isEditedPostNew:()=>_X,isEditedPostPublishable:()=>h3e,isEditedPostSaveable:()=>CX,isEditorPanelEnabled:()=>B3e,isEditorPanelOpened:()=>V3e,isEditorPanelRemoved:()=>RX,isFirstMultiSelectedBlock:()=>S6e,isInserterOpened:()=>Y3e,isListViewOpened:()=>G3e,isMultiSelecting:()=>N6e,isPermalinkEditable:()=>EX,isPostAutosavingLocked:()=>kX,isPostLockTakeover:()=>O3e,isPostLocked:()=>A3e,isPostSavingLocked:()=>I3e,isPreviewingPost:()=>C3e,isPublishSidebarEnabled:()=>D3e,isPublishSidebarOpened:()=>J6e,isPublishingPost:()=>P3e,isSavingNonPostEntityChanges:()=>w3e,isSavingPost:()=>T0,isSelectionEnabled:()=>M6e,isTyping:()=>D6e,isValidTemplate:()=>j6e});var xm=a(Pt(),1),C0=a(ln(),1),j1=a(vo(),1),Jt=a(Y(),1),Lu=a(qa(),1),A2=a(be(),1),yo=a(ae(),1),W1=a(Dt(),1);var vZ=new Set(["meta"]),bZ="core/editor",F4=/%(?:postname|pagename)%/,D4=60*1e3,yZ=["title","excerpt","content"];var Cr="wp_template",Ni="wp_template_part",Nu="wp_block",Ek="wp_navigation",Pl="attachment",Pk={custom:"custom",theme:"theme",plugin:"plugin"},L4=["wp_template","wp_template_part"],wZ=[...L4,"wp_block","wp_navigation"],pm=[Cr,Ni,Nu,Ek];var kk=a(U(),1),Cn=(0,kk.forwardRef)(({icon:e,size:t=24,...r},o)=>(0,kk.cloneElement)(e,{width:t,height:t,...r,ref:o}));var Rk=a(Se(),1),B4=a(E(),1),V4=(0,B4.jsx)(Rk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,B4.jsx)(Rk.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 Ak=a(Se(),1),j4=a(E(),1),z4=(0,j4.jsx)(Ak.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,j4.jsx)(Ak.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 Ik=a(Se(),1),H4=a(E(),1),U4=(0,H4.jsx)(Ik.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,H4.jsx)(Ik.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 Ok=a(Se(),1),W4=a(E(),1),G4=(0,W4.jsx)(Ok.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,W4.jsx)(Ok.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var Nk=a(Se(),1),Y4=a(E(),1),q4=(0,Y4.jsx)(Nk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Y4.jsx)(Nk.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 Mk=a(Se(),1),K4=a(E(),1),Z4=(0,K4.jsx)(Mk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,K4.jsx)(Mk.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})});var Fk=a(Se(),1),X4=a(E(),1),Q4=(0,X4.jsx)(Fk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,X4.jsx)(Fk.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"})});var Dk=a(Se(),1),J4=a(E(),1),$4=(0,J4.jsx)(Dk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,J4.jsx)(Dk.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 Lk=a(Se(),1),eB=a(E(),1),tB=(0,eB.jsx)(Lk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,eB.jsx)(Lk.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 Bk=a(Se(),1),rB=a(E(),1),yf=(0,rB.jsx)(Bk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,rB.jsx)(Bk.Path,{d:"M13.75 4.194a8 8 0 0 0-4.812.415l-.301.132a8 8 0 0 0-3.203 2.692L4 6.001v4h4L6.517 8.516q.333-.526.758-.977l.011-.012q.341-.359.733-.662l.025-.02a6.5 6.5 0 0 1 2.469-1.172l.034-.008q.117-.027.236-.05l.015-.002q.32-.06.65-.088.08-.008.16-.013a7 7 0 0 1 .323-.01L12 5.5h.05l.203.005.101.003q.146.008.293.023l.12.014.158.02q.103.015.205.033l.058.011q.107.02.212.043l.068.016a6.5 6.5 0 0 1 1.447.521l.02.01a7 7 0 0 1 .452.25l.02.014a7 7 0 0 1 .468.317l.07.054a7 7 0 0 1 .403.334l.034.03q.091.084.18.172l.047.045q.293.294.548.627l.03.038.07.097.096.135q.037.053.072.107a6 6 0 0 1 .167.265l.042.073q.236.411.413.857l.027.07a6.5 6.5 0 0 1 .418 2.014 6.6 6.6 0 0 1-.034 1.04 6 6 0 0 1-.063.424q-.109.597-.32 1.152-.016.034-.028.07a6.5 6.5 0 0 1-.413.856l-.042.073a6 6 0 0 1-.327.497l-.087.118-.02.028a7 7 0 0 1-.526.604l-.035.035-.035.032q-.089.088-.18.172l-.034.03a7 7 0 0 1-.38.317l-.093.071q-.09.067-.183.13l-.076.053q-.112.076-.227.146-.218.133-.446.247l-.028.015-.192.093-.081.036a6.5 6.5 0 0 1-1.184.396l-.058.012a7 7 0 0 1-.475.087q-.08.012-.157.02l-.122.014q-.145.015-.292.023l-.136.005-.139.003L12 18.5q-.053-.002-.104-.003l-.127-.004-.162-.007q-.08-.005-.159-.013a7 7 0 0 1-.65-.088q-.008 0-.015-.002a7 7 0 0 1-.236-.05l-.034-.008a6.5 6.5 0 0 1-4.14-3.077l-1.3.75a8 8 0 0 0 3.564 3.26l.301.131a8 8 0 0 0 11.055-7.061l.007-.33c0-1.76-.581-3.473-1.653-4.87l-.206-.256a8 8 0 0 0-4.07-2.6zM12 7.75a.75.75 0 0 0-.75.75V12a.75.75 0 0 0 .218.529l1.282-.839-1.28.84 2.5 2.5a.75.75 0 1 0 1.06-1.06l-2.28-2.28V8.5a.75.75 0 0 0-.75-.75"})});var Vk=a(Se(),1),oB=a(E(),1),nB=(0,oB.jsx)(Vk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,oB.jsx)(Vk.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 jk=a(Se(),1),iB=a(E(),1),zk=(0,iB.jsx)(jk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,iB.jsx)(jk.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 Hk=a(Se(),1),sB=a(E(),1),Uk=(0,sB.jsx)(Hk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,sB.jsx)(Hk.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 Wk=a(Se(),1),aB=a(E(),1),Io=(0,aB.jsx)(Wk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,aB.jsx)(Wk.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var Gk=a(Se(),1),lB=a(E(),1),s1=(0,lB.jsx)(Gk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,lB.jsx)(Gk.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var Yk=a(Se(),1),cB=a(E(),1),uB=(0,cB.jsx)(Yk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,cB.jsx)(Yk.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var qk=a(Se(),1),dB=a(E(),1),Ar=(0,dB.jsx)(qk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,dB.jsx)(qk.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var Kk=a(Se(),1),fB=a(E(),1),pB=(0,fB.jsx)(Kk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,fB.jsx)(Kk.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 Zk=a(Se(),1),mB=a(E(),1),hr=(0,mB.jsx)(Zk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,mB.jsx)(Zk.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var Xk=a(Se(),1),hB=a(E(),1),gB=(0,hB.jsx)(Xk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,hB.jsx)(Xk.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var Qk=a(Se(),1),vB=a(E(),1),Mi=(0,vB.jsx)(Qk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,vB.jsx)(Qk.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 Jk=a(Se(),1),bB=a(E(),1),a1=(0,bB.jsx)(Jk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,bB.jsx)(Jk.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 $k=a(Se(),1),yB=a(E(),1),wB=(0,yB.jsx)($k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,yB.jsx)($k.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 eR=a(Se(),1),_B=a(E(),1),SB=(0,_B.jsx)(eR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,_B.jsx)(eR.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 tR=a(Se(),1),xB=a(E(),1),CB=(0,xB.jsx)(tR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,xB.jsx)(tR.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 rR=a(Se(),1),TB=a(E(),1),EB=(0,TB.jsx)(rR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,TB.jsx)(rR.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 oR=a(Se(),1),PB=a(E(),1),kB=(0,PB.jsx)(oR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,PB.jsx)(oR.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 nR=a(Se(),1),RB=a(E(),1),uv=(0,RB.jsx)(nR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,RB.jsx)(nR.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 iR=a(Se(),1),AB=a(E(),1),IB=(0,AB.jsx)(iR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,AB.jsx)(iR.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 sR=a(Se(),1),OB=a(E(),1),l1=(0,OB.jsx)(sR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,OB.jsx)(sR.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 aR=a(Se(),1),NB=a(E(),1),lR=(0,NB.jsx)(aR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,NB.jsx)(aR.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 cR=a(Se(),1),MB=a(E(),1),FB=(0,MB.jsx)(cR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,MB.jsx)(cR.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 uR=a(Se(),1),DB=a(E(),1),m0=(0,DB.jsx)(uR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,DB.jsx)(uR.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 dR=a(Se(),1),LB=a(E(),1),dv=(0,LB.jsx)(dR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,LB.jsx)(dR.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 fR=a(Se(),1),BB=a(E(),1),wf=(0,BB.jsx)(fR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,BB.jsx)(fR.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 pR=a(Se(),1),VB=a(E(),1),jB=(0,VB.jsx)(pR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,VB.jsx)(pR.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 mR=a(Se(),1),zB=a(E(),1),_f=(0,zB.jsx)(mR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,zB.jsx)(mR.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 hR=a(Se(),1),HB=a(E(),1),hs=(0,HB.jsx)(hR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,HB.jsx)(hR.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 gR=a(Se(),1),UB=a(E(),1),WB=(0,UB.jsx)(gR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,UB.jsx)(gR.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 vR=a(Se(),1),GB=a(E(),1),YB=(0,GB.jsx)(vR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,GB.jsx)(vR.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 bR=a(Se(),1),qB=a(E(),1),KB=(0,qB.jsx)(bR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,qB.jsx)(bR.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 yR=a(Se(),1),ZB=a(E(),1),c1=(0,ZB.jsx)(yR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,ZB.jsx)(yR.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 wR=a(Se(),1),XB=a(E(),1),QB=(0,XB.jsx)(wR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,XB.jsx)(wR.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 _R=a(Se(),1),JB=a(E(),1),u1=(0,JB.jsx)(_R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,JB.jsx)(_R.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 SR=a(Se(),1),$B=a(E(),1),d1=(0,$B.jsx)(SR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,$B.jsx)(SR.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"})});var xR=a(Se(),1),eV=a(E(),1),tV=(0,eV.jsx)(xR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,eV.jsx)(xR.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-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z"})});var CR=a(Se(),1),rV=a(E(),1),f1=(0,rV.jsx)(CR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,rV.jsx)(CR.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 TR=a(Se(),1),oV=a(E(),1),nV=(0,oV.jsx)(TR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,oV.jsx)(TR.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 p1=a(Se(),1),m1=a(E(),1),h1=(0,m1.jsxs)(p1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,m1.jsx)(p1.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,m1.jsx)(p1.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 ER=a(Se(),1),iV=a(E(),1),Ka=(0,iV.jsx)(ER.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,iV.jsx)(ER.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 PR=a(Se(),1),sV=a(E(),1),aV=(0,sV.jsx)(PR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,sV.jsx)(PR.Path,{d:"M5 11.25h14v1.5H5z"})});var kR=a(Se(),1),lV=a(E(),1),cV=(0,lV.jsx)(kR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,lV.jsx)(kR.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 RR=a(Se(),1),uV=a(E(),1),g1=(0,uV.jsx)(RR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,uV.jsx)(RR.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var AR=a(Se(),1),dV=a(E(),1),fV=(0,dV.jsx)(AR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,dV.jsx)(AR.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 IR=a(Se(),1),pV=a(E(),1),h0=(0,pV.jsx)(IR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,pV.jsx)(IR.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 OR=a(Se(),1),mV=a(E(),1),bo=(0,mV.jsx)(OR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,mV.jsx)(OR.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var NR=a(Se(),1),hV=a(E(),1),v1=(0,hV.jsx)(NR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,hV.jsx)(NR.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 MR=a(Se(),1),gV=a(E(),1),vV=(0,gV.jsx)(MR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,gV.jsx)(MR.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 FR=a(Se(),1),bV=a(E(),1),kl=(0,bV.jsx)(FR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,bV.jsx)(FR.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 DR=a(Se(),1),yV=a(E(),1),b1=(0,yV.jsx)(DR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,yV.jsx)(DR.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 y1=a(Se(),1),w1=a(E(),1),mm=(0,w1.jsxs)(y1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,w1.jsx)(y1.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,w1.jsx)(y1.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 LR=a(Se(),1),wV=a(E(),1),_1=(0,wV.jsx)(LR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,wV.jsx)(LR.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var BR=a(Se(),1),_V=a(E(),1),S1=(0,_V.jsx)(BR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,_V.jsx)(BR.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 VR=a(Se(),1),SV=a(E(),1),xV=(0,SV.jsx)(VR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,SV.jsx)(VR.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"})});var jR=a(Se(),1),CV=a(E(),1),Cc=(0,CV.jsx)(jR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,CV.jsx)(jR.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var zR=a(Se(),1),TV=a(E(),1),EV=(0,TV.jsx)(zR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,TV.jsx)(zR.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 HR=a(Se(),1),PV=a(E(),1),Rl=(0,PV.jsx)(HR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,PV.jsx)(HR.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 UR=a(Se(),1),kV=a(E(),1),fv=(0,kV.jsx)(UR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,kV.jsx)(UR.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 WR=a(Se(),1),RV=a(E(),1),pv=(0,RV.jsx)(WR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,RV.jsx)(WR.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 GR=a(Se(),1),AV=a(E(),1),IV=(0,AV.jsx)(GR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,AV.jsx)(GR.Path,{d:"M7 11.5h10V13H7z"})});var YR=a(Se(),1),OV=a(E(),1),x1=(0,OV.jsx)(YR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,OV.jsx)(YR.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 qR=a(Se(),1),NV=a(E(),1),C1=(0,NV.jsx)(qR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,NV.jsx)(qR.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 KR=a(Se(),1),MV=a(E(),1),hm=(0,MV.jsx)(KR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,MV.jsx)(KR.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 ZR=a(Se(),1),FV=a(E(),1),DV=(0,FV.jsx)(ZR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,FV.jsx)(ZR.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 XR=a(Se(),1),LV=a(E(),1),mv=(0,LV.jsx)(XR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,LV.jsx)(XR.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 T1=a(Se(),1),E1=a(E(),1),BV=(0,E1.jsxs)(T1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,E1.jsx)(T1.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,E1.jsx)(T1.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 QR=a(Se(),1),VV=a(E(),1),P1=(0,VV.jsx)(QR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,VV.jsx)(QR.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 JR=a(Se(),1),jV=a(E(),1),zV=(0,jV.jsx)(JR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,jV.jsx)(JR.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 $R=a(Se(),1),HV=a(E(),1),k1=(0,HV.jsx)($R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,HV.jsx)($R.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 e2=a(Se(),1),UV=a(E(),1),WV=(0,UV.jsx)(e2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,UV.jsx)(e2.Path,{fill:"none",d:"M5.75 12.75V18.25H11.25M12.75 5.75H18.25V11.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})});var t2=a(Se(),1),GV=a(E(),1),YV=(0,GV.jsx)(t2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,GV.jsx)(t2.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 r2=a(Se(),1),qV=a(E(),1),KV=(0,qV.jsx)(r2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,qV.jsx)(r2.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 o2=a(Se(),1),ZV=a(E(),1),XV=(0,ZV.jsx)(o2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,ZV.jsx)(o2.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 n2=a(Se(),1),QV=a(E(),1),hv=(0,QV.jsx)(n2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,QV.jsx)(n2.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 i2=a(Se(),1),JV=a(E(),1),g0=(0,JV.jsx)(i2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,JV.jsx)(i2.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 s2=a(Se(),1),$V=a(E(),1),a2=(0,$V.jsx)(s2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,$V.jsx)(s2.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 l2=a(Se(),1),e8=a(E(),1),Sf=(0,e8.jsx)(l2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,e8.jsx)(l2.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 c2=a(Se(),1),t8=a(E(),1),r8=(0,t8.jsx)(c2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,t8.jsx)(c2.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 u2=a(Se(),1),o8=a(E(),1),gv=(0,o8.jsx)(u2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o8.jsx)(u2.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 d2=a(Se(),1),n8=a(E(),1),R1=(0,n8.jsx)(d2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,n8.jsx)(d2.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 f2=a(Se(),1),i8=a(E(),1),s8=(0,i8.jsx)(f2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,i8.jsx)(f2.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 p2=a(Se(),1),a8=a(E(),1),l8=(0,a8.jsx)(p2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a8.jsx)(p2.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 m2=a(Se(),1),c8=a(E(),1),u8=(0,c8.jsx)(m2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",fill:"currentColor",children:(0,c8.jsx)(m2.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 gm(e){return e==="header"?f1:e==="footer"?c1:e==="sidebar"?k1:e==="navigation-overlay"?v1:hv}var CZ=a(xf(),1),{lock:TZ,unlock:K}=(0,CZ.__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 EZ={},Al=e=>{if(!e)return EZ;let{templateTypes:t,templateAreas:r,template:o}=e,{description:n,slug:i,title:s,area:l}=o,{title:c,description:u}=Object.values(t).find(g=>g.slug===i)??EZ,d=typeof s=="string"?s:s?.rendered,f=typeof n=="string"?n:n?.raw,h=r?.map(g=>({...g,icon:gm(g.icon)}))?.find(g=>l===g.area)?.icon||Ka;return{title:d&&d!==i?d:c||i,description:f||u,icon:h}};function vm(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 s=n[i];n=n[i]=Array.isArray(s)?[...s]:{...s}}return n[o]=r,e}var zt=(e,t,r)=>{let o=Array.isArray(t)?t:t.split("."),n=e;return o.forEach(i=>{n=n?.[i]}),n??r};var NNe=["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","viewport.mobile","viewport.tablet"];function vv(e,t,r){let o=r?".blocks."+r:"",n=t?"."+t:"",i=`settings${o}${n}`,s=`settings${n}`;if(t)return zt(e,i)??zt(e,s);let l={};return NNe.forEach(c=>{let u=zt(e,`settings${o}.${c}`)??zt(e,`settings.${c}`);u!==void 0&&(l=vm(l,c.split("."),u))}),l}function A1(e,t,r,o){let n=o?".blocks."+o:"",i=t?"."+t:"",s=`settings${n}${i}`;return vm(e,s.split("."),r)}var RZ=a(d8(),1);var MNe="1600px",FNe="320px",DNe=1,LNe=.25,BNe=.75,VNe="14px";function kZ({minimumFontSize:e,maximumFontSize:t,fontSize:r,minimumViewportWidth:o=FNe,maximumViewportWidth:n=MNe,scaleFactor:i=DNe,minimumFontSizeLimit:s}){if(s=Mu(s)?s:VNe,r){let w=Mu(r);if(!w?.unit||!w?.value)return null;let S=Mu(s,{coerceTo:w.unit});if(S?.value&&!e&&!t&&w?.value<=S?.value)return null;if(t||(t=`${w.value}${w.unit}`),!e){let x=w.unit==="px"?w.value:w.value*16,C=Math.min(Math.max(1-.075*Math.log2(x),LNe),BNe),A=I1(w.value*C,3);S?.value&&A<S?.value?e=`${S.value}${S.unit}`:e=`${A}${w.unit}`}}let l=Mu(e),c=l?.unit||"rem",u=Mu(t,{coerceTo:c});if(!l||!u)return null;let d=Mu(e,{coerceTo:"rem"}),f=Mu(n,{coerceTo:c}),m=Mu(o,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let g=I1(m.value/100,3),v=I1(g,3)+c,b=100*((u.value-l.value)/h),_=I1((b||1)*i,3),y=`${d.value}${d.unit} + ((1vw - ${v}) * ${_})`;return`clamp(${e}, ${y}, ${t})`}function Mu(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("|"),s=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),l=e.toString().match(s);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:I1(d,3),unit:u}:null}function I1(e,t=3){let r=Math.pow(10,t);return Math.round(e*r)/r}function f8(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function jNe(e){let t=e?.typography??{},r=e?.layout,o=Mu(r?.wideSize)?r?.wideSize:null;return f8(t)&&o?{fluid:{maxViewportWidth:o,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function h2(e,t){let{size:r}=e;if(!r||r==="0"||e?.fluid===!1||!f8(t?.typography)&&!f8(e))return r;let o=jNe(t)?.fluid??{},n=kZ({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 Fu="body",O1=":root";function v0(e){if(!e.includes(","))return[e];let t=[],r="",o=0;for(let n of e){if(n==="(")o++;else if(n===")"&&o>0)o--;else if(n===","&&o===0){t.push(r),r="";continue}r+=n}return t.push(r),t}var b0=[{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)=>h2(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 Tc(e,t){if(!e||!t)return t;let r=v0(e),o=v0(t),n=[];return r.forEach(i=>{o.forEach(s=>{n.push(`${i.trim()} ${s.trim()}`)})}),n.join(", ")}function AZ(e,t){if(!e||!t)return;let r={};return Object.entries(t).forEach(([o,n])=>{typeof n=="string"&&(r[o]=Tc(e,n)),typeof n=="object"&&(r[o]={},Object.entries(n).forEach(([i,s])=>{r[o][i]=Tc(e,s)}))}),r}function g2(e,t){return e.includes(",")?v0(e).map(n=>n+t).join(","):e+t}function p8(e,t){let r=`.is-style-${e}`;if(!t)return r;let o=/[^\s:]+/,n=s=>s+r;return v0(t).map(s=>s.replace(o,n)).join(",")}function IZ(e,t){let r=`.is-style-${e}`,o=v0(t).map(n=>{let i=n.trim(),s=`${r} `;return i.startsWith(s)?i.slice(s.length):i});return p8(e,o.join(","))}function zNe(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let r=(0,RZ.getCSSValueFromRawStyle)(zt(t,e.ref));return typeof r=="object"&&r!==null&&"ref"in r&&r?.ref?void 0:r===void 0?e:r}return e}function HNe(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 y0(e,t){if(!e||!t)return e;let r=zNe(e,t);return typeof r=="object"&&r!==null&&"url"in r&&r?.url&&(r.url=HNe(r.url,t?._links?.["wp:theme-file"])),r}function OZ(e,t,r=[],o="slug",n){let i=[t?zt(e,["blocks",t,...r]):void 0,zt(e,r)].filter(Boolean);for(let s of i)if(s){let l=["custom","theme","default"];for(let c of l){let u=s[c];if(u){let d=u.find(f=>f[o]===n);if(d)return o==="slug"||OZ(e,t,r,"slug",d.slug)[o]===d[o]?d:void 0}}}}function UNe(e,t,r,[o,n]=[]){let i=b0.find(l=>l.cssVarInfix===o);if(!i||!e.settings)return r;let s=OZ(e.settings,t,i.path,"slug",n);if(s){let{valueKey:l}=i,c=s[l];return bv(e,t,c)}return r}function WNe(e,t,r,o=[]){let n=(t?zt(e?.settings??{},["blocks",t,"custom",...o]):void 0)??zt(e?.settings??{},["custom",...o]);return n?bv(e,t,n):r}function bv(e,t,r){if(!r||typeof r!="string")if(typeof r=="object"&&r!==null&&"ref"in r&&typeof r.ref=="string"){let u=zt(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=")",s;if(r.startsWith(o))s=r.slice(o.length).split("|");else if(r.startsWith(n)&&r.endsWith(i))s=r.slice(n.length,-i.length).split("--");else return r;let[l,...c]=s;return l==="preset"?UNe(e,t,r,c):l==="custom"?WNe(e,t,r,c):r}function bm(e,t,r,o=!0){let n=t?"."+t:"",i=r?`styles.blocks.${r}${n}`:`styles${n}`;if(!e)return;let s=zt(e,i),l=void 0;if(s===void 0&&l){let u=!0,d=e;for(let f of i.split(".")){if(!d||typeof d!="object"||!Object.hasOwn(d,f)){u=!1;break}d=d[f]}u||(s=zt(e,l))}return o?bv(e,r,s):s}function N1(e,t,r,o){let n=t?"."+t:"",i=o?`styles.blocks.${o}${n}`:`styles${n}`;return vm(e,i.split("."),r)}var m8=a(v2(),1);function yv(e,t){return typeof e!="object"||typeof t!="object"?e===t:(0,m8.default)(e?.styles,t?.styles)&&(0,m8.default)(e?.settings,t?.settings)}var jZ=a(b2(),1);function BZ(e){return Object.prototype.toString.call(e)==="[object Object]"}function VZ(e){var t,r;return BZ(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(BZ(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function Fi(e,t){return(0,jZ.default)(e,t,{isMergeableObject:VZ,customMerge:r=>{if(r==="backgroundImage")return(o,n)=>n??o}})}function zZ(e,t){var r=0,o,n;t=t||{};function i(){var s=o,l=arguments.length,c,u;e:for(;s;){if(s.args.length!==arguments.length){s=s.next;continue}for(u=0;u<l;u++)if(s.args[u]!==arguments[u]){s=s.next;continue e}return s!==o&&(s===n&&(n=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=o,s.prev=null,o.prev=s,o=s),s.val}for(c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return s={args:c,val:e.apply(null,c)},o?(o.prev=s,s.next=o):n=s,r===t.maxSize?(n=n.prev,n.next=null):r++,o=s,s.val}return i.clear=function(){o=null,n=null,r=0},i}var Qt=a(j(),1),HZ=a(Pt(),1),y2=new Map,nMe=[],h8={caption:(0,Qt.__)("Caption"),link:(0,Qt.__)("Link"),button:(0,Qt.__)("Button"),heading:(0,Qt.__)("Heading"),h1:(0,Qt.__)("H1"),h2:(0,Qt.__)("H2"),h3:(0,Qt.__)("H3"),h4:(0,Qt.__)("H4"),h5:(0,Qt.__)("H5"),h6:(0,Qt.__)("H6"),"settings.color":(0,Qt.__)("Color"),"settings.typography":(0,Qt.__)("Typography"),"settings.shadow":(0,Qt.__)("Shadow"),"settings.layout":(0,Qt.__)("Layout"),"styles.color":(0,Qt.__)("Colors"),"styles.spacing":(0,Qt.__)("Spacing"),"styles.background":(0,Qt.__)("Background"),"styles.typography":(0,Qt.__)("Typography")},iMe=zZ(()=>(0,HZ.getBlockTypes)().reduce((e,{name:t,title:r})=>(e[t]=r,e),{})),w2=e=>e!==null&&typeof e=="object";function sMe(e){if(h8[e])return h8[e];let t=e.split(".");if(t?.[0]==="blocks")return iMe()?.[t[1]]||t[1];if(t?.[0]==="elements")return h8[t[1]]||t[1]}function UZ(e,t,r=""){if(!w2(e)&&!w2(t))return e!==t?r.split(".").slice(0,2).join("."):void 0;e=w2(e)?e:{},t=w2(t)?t:{};let o=new Set([...Object.keys(e),...Object.keys(t)]),n=[];for(let i of o){let s=r?r+"."+i:i,l=UZ(e[i],t[i],s);l&&(n=n.concat(l))}return n}function aMe(e,t){let r=JSON.stringify({next:e,previous:t});if(y2.has(r))return y2.get(r);let o=UZ({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 y2.set(r,[]),[];let n=Array.isArray(o)?o:[o],i=[...new Set(n)].reduce((s,l)=>{let c=sMe(l);return c&&s.push([l.split(".")[0],c]),s},[]);return y2.set(r,i),i}function F1(e,t,r={}){let o=aMe(e,t),n=o.length,{maxResults:i}=r;return n?(i&&n>i&&(o=o.slice(0,i)),Object.entries(o.reduce((s,l)=>{let c=s[l[0]]||[];return c.includes(l[1])||(s[l[0]]=[...c,l[1]]),s},{})).map(([s,l])=>{let c=l.length,u=l.join((0,Qt.__)(", "));switch(s){case"blocks":return(0,Qt.sprintf)((0,Qt._n)("%s block.","%s blocks.",c),u);case"elements":return(0,Qt.sprintf)((0,Qt._n)("%s element.","%s elements.",c),u);case"settings":return(0,Qt.sprintf)((0,Qt.__)("%s settings."),u);case"styles":return(0,Qt.sprintf)((0,Qt.__)("%s styles."),u);default:return(0,Qt.sprintf)((0,Qt.__)("%s."),u)}})):nMe}var Di=a(Pt(),1),B1=a(d8(),1),aX=a(Y(),1);function _0(e,t="root",r={}){if(!t)return null;let{fallback:o=!1}=r,{name:n,selectors:i,supports:s}=e,l=i&&Object.keys(i).length>0,c=Array.isArray(t)?t.join("."):t,u=null;if(l&&i.root?u=i?.root:s?.__experimentalSelector?u=s.__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 zt(i,`${c}.root`,null)||zt(i,c,null)||m;let h=s?zt(s,`${c}.__experimentalSelector`,null):void 0;return h?Tc(u,h):m}let f;return l&&(f=zt(i,c,null)),f||(o?_0(e,d[0],r):null)}var lMe={grad:.9,turn:360,rad:360/(2*Math.PI)},Cf=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},zn=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},Il=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},QZ=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},WZ=function(e){return{r:Il(e.r,0,255),g:Il(e.g,0,255),b:Il(e.b,0,255),a:Il(e.a)}},g8=function(e){return{r:zn(e.r),g:zn(e.g),b:zn(e.b),a:zn(e.a,3)}},cMe=/^#([0-9a-f]{3,8})$/i,_2=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},JZ=function(e){var t=e.r,r=e.g,o=e.b,n=e.a,i=Math.max(t,r,o),s=i-Math.min(t,r,o),l=s?i===t?(r-o)/s:i===r?2+(o-t)/s:4+(t-r)/s:0;return{h:60*(l<0?l+6:l),s:i?s/i*100:0,v:i/255*100,a:n}},$Z=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),s=o*(1-r),l=o*(1-(t-i)*r),c=o*(1-(1-t+i)*r),u=i%6;return{r:255*[o,l,s,s,c,o][u],g:255*[c,o,o,l,s,s][u],b:255*[s,s,c,o,o,l][u],a:n}},GZ=function(e){return{h:QZ(e.h),s:Il(e.s,0,100),l:Il(e.l,0,100),a:Il(e.a)}},YZ=function(e){return{h:zn(e.h),s:zn(e.s),l:zn(e.l),a:zn(e.a,3)}},qZ=function(e){return $Z((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},D1=function(e){return{h:(t=JZ(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},uMe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,dMe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,fMe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,pMe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y8={string:[[function(e){var t=cMe.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?zn(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?zn(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=fMe.exec(e)||pMe.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:WZ({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=uMe.exec(e)||dMe.exec(e);if(!t)return null;var r,o,n=GZ({h:(r=t[1],o=t[2],o===void 0&&(o="deg"),Number(r)*(lMe[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return qZ(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 Cf(t)&&Cf(r)&&Cf(o)?WZ({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(!Cf(t)||!Cf(r)||!Cf(o))return null;var s=GZ({h:Number(t),s:Number(r),l:Number(o),a:Number(i)});return qZ(s)},"hsl"],[function(e){var t=e.h,r=e.s,o=e.v,n=e.a,i=n===void 0?1:n;if(!Cf(t)||!Cf(r)||!Cf(o))return null;var s=(function(l){return{h:QZ(l.h),s:Il(l.s,0,100),v:Il(l.v,0,100),a:Il(l.a)}})({h:Number(t),s:Number(r),v:Number(o),a:Number(i)});return $Z(s)},"hsv"]]},KZ=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]},mMe=function(e){return typeof e=="string"?KZ(e.trim(),y8.string):typeof e=="object"&&e!==null?KZ(e,y8.object):[null,void 0]};var v8=function(e,t){var r=D1(e);return{h:r.h,s:Il(r.s+100*t,0,100),l:r.l,a:r.a}},b8=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},ZZ=function(e,t){var r=D1(e);return{h:r.h,s:r.s,l:Il(r.l+100*t,0,100),a:r.a}},w8=(function(){function e(t){this.parsed=mMe(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 zn(b8(this.rgba),2)},e.prototype.isDark=function(){return b8(this.rgba)<.5},e.prototype.isLight=function(){return b8(this.rgba)>=.5},e.prototype.toHex=function(){return t=g8(this.rgba),r=t.r,o=t.g,n=t.b,s=(i=t.a)<1?_2(zn(255*i)):"","#"+_2(r)+_2(o)+_2(n)+s;var t,r,o,n,i,s},e.prototype.toRgb=function(){return g8(this.rgba)},e.prototype.toRgbString=function(){return t=g8(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 YZ(D1(this.rgba))},e.prototype.toHslString=function(){return t=YZ(D1(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=JZ(this.rgba),{h:zn(t.h),s:zn(t.s),v:zn(t.v),a:zn(t.a,3)};var t},e.prototype.invert=function(){return Oo({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),Oo(v8(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Oo(v8(this.rgba,-t))},e.prototype.grayscale=function(){return Oo(v8(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Oo(ZZ(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Oo(ZZ(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"?Oo({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):zn(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=D1(this.rgba);return typeof t=="number"?Oo({h:t,s:r.s,l:r.l,a:r.a}):zn(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Oo(t).toHex()},e})(),Oo=function(e){return e instanceof w8?e:new w8(e)},XZ=[],S2=function(e){e.forEach(function(t){XZ.indexOf(t)<0&&(t(w8,y8),XZ.push(t))})};function hMe(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(r=>{let o=Oo(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 eX(e,t){let r=hMe(t);return`
<svg
	xmlns:xlink="http://www.w3.org/1999/xlink"
	viewBox="0 0 0 0"
	width="0"
	height="0"
	focusable="false"
	role="none"
	aria-hidden="true"
	style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
>
	<defs>
		<filter id="${e}">
			<!--
				Use sRGB instead of linearRGB so transparency looks correct.
				Use perceptual brightness to convert to grayscale.
			-->
			<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>
			<!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
			<feComponentTransfer color-interpolation-filters="sRGB">
				<feFuncR type="table" tableValues="${r.r.join(" ")}"></feFuncR>
				<feFuncG type="table" tableValues="${r.g.join(" ")}"></feFuncG>
				<feFuncB type="table" tableValues="${r.b.join(" ")}"></feFuncB>
				<feFuncA type="table" tableValues="${r.a.join(" ")}"></feFuncA>
			</feComponentTransfer>
			<!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
			<feComposite in2="SourceGraphic" operator="in"></feComposite>
		</filter>
	</defs>
</svg>`}function ym(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 _8(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function gMe(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function S8(e,t="0"){let r=gMe(e);if(!r)return null;let o=_8(r?.top)||t,n=_8(r?.left)||t;return o===n?o:`${o} ${n}`}var tX={backgroundSize:"cover",backgroundPosition:"50% 50%"};function rX(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:tX.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:tX.backgroundPosition}),t}var oX={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 nX={mobile:"480px",tablet:"782px"},iX=/^(\d+|\d*\.\d+)(px|em|rem)$/,vMe=16;function bMe(e){return"mobile"in e||"tablet"in e}function yMe(e){return!e||typeof e!="object"?{}:bMe(e)?e:e.settings?.viewport??{}}function wMe(e){return typeof e=="string"&&iX.test(e.trim())}function x8(e){if(typeof e=="number")return e;if(typeof e!="string")return;let t=e.trim().match(iX);if(!t)return;let r=Number.parseFloat(t[1]);return t[2]==="px"?r:r*vMe}function C8(e){let t=yMe(e),r={},o={};Object.keys(nX).forEach(l=>{let c=l,u=t[c],d=x8(u);d!==void 0&&wMe(u)&&(r[c]=u.trim(),o[c]=d)});let n=Object.keys(r);if(!n.length)return{...nX};if(n.length===1)return r;let i=r.mobile,s=r.tablet;return o.mobile>=o.tablet?{mobile:i}:{mobile:i,tablet:s}}function L1(e){let t=C8(e),r={};return t.mobile&&(r["@mobile"]=`@media (width <= ${t.mobile})`),t.tablet&&(r["@tablet"]=t.mobile?`@media (${t.mobile} < width <= ${t.tablet})`:`@media (width <= ${t.tablet})`),r}var _Me={button:"wp-element-button",caption:"wp-element-caption"},SMe={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"},lX={"core/button":[":hover",":focus",":focus-visible",":active"],"core/navigation-link":[":hover",":focus",":focus-visible",":active"]},xMe={link:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"],button:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"]};function CMe(e="*",t={}){return b0.reduce((r,{path:o,cssVarInfix:n,classes:i})=>{if(!i)return r;let s=zt(t,o,[]);return["default","theme","custom"].forEach(l=>{s[l]&&s[l].forEach(({slug:c})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${ym(c)}-${u}`,m=e.split(",").map(g=>`${g}${f}`).join(","),h=`var(--wp--preset--${n}--${ym(c)})`;r+=`${m}{${d}: ${h} !important;}`})})}),r},"")}function TMe(e={}){return b0.filter(t=>t.path.at(-1)==="duotone").flatMap(t=>{let r=zt(e,t.path,{});return["default","theme"].filter(o=>r[o]).flatMap(o=>r[o].map(n=>eX(`wp-duotone-${n.slug}`,n.colors))).join("")})}function cX(e={},t,r){let o=[];return Object.keys(e).forEach(n=>{let i=t+ym(n.replace("/","-")),s=e[n];if(s instanceof Object){let l=i+r;o=[...o,...cX(s,l,r)]}else o.push(`${i}: ${s}`)}),o}var EMe=(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",s=".wp-block-paragraph";if(i in e){let l=e[i],c={...e};return delete c[i],c[s]=l,c}return e},PMe=(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 s=i[1],l=null;s.endsWith("%")&&(l=parseFloat(s));let c="var(--wp--preset--dimension--";if(l===null&&s.startsWith(c)&&s.endsWith(")")){let u=s.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},kMe=(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(([s,l])=>{if(s==="root"||!t?.[o][s])return;let c={[o]:{[s]:t[o][s]}},u=C2(c);r[l]=[...r[l]||[],...u],delete t[o][s]}),i||typeof n=="object"&&n!==null&&"root"in n){let s=i?n:n.root,l={[o]:t[o]},c=C2(l);r[s]=[...r[s]||[],...c],delete t[o]}}),r};function C2(e={},t="",r,o={},n=!1){let i=Fu===t,s=Object.entries(Di.__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=zt(e,g);if(u==="--wp--style--root--padding"&&(typeof v=="string"||!r))return c;if(f&&typeof v!="string")Object.entries(f).forEach(b=>{let[_,y]=b;if(!zt(v,[y],!1))return;let w=_.startsWith("--")?_:ym(_);c.push(`${w}: ${(0,B1.getCSSValueFromRawStyle)(zt(v,[y]))}`)});else if(zt(e,g,!1)){let b=u.startsWith("--")?u:ym(u);c.push(`${b}: ${(0,B1.getCSSValueFromRawStyle)(zt(e,g))}`)}return c},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=y0(e.background.backgroundImage,o)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...rX(e.background)}})),(0,B1.getCSSRules)(e).forEach(c=>{if(i&&(r||n)&&c.key.startsWith("padding"))return;let u=c.key.startsWith("--")?c.key:ym(c.key),d=y0(c.value,o);u==="font-size"&&(d=h2({name:"",slug:"",size:d},o?.settings)),u==="aspect-ratio"&&s.push("min-height: unset"),s.push(`${u}: ${d}`)}),s}function RMe({layoutDefinitions:e=oX,style:t,selector:r,hasBlockGapSupport:o,hasFallbackGapSupport:n,fallbackGapValue:i}){let s="",l=o?S8(t?.spacing?.blockGap):"";if(n&&(r===Fu?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===Fu?`:root :where(.${c})${f?.selector||""}`:`:root :where(${r}-${c})${f?.selector||""}`:h=r===Fu?`:where(.${c}${f?.selector||""})`:`:where(${r}.${c}${f?.selector||""})`,s+=`${h} { ${m.join("; ")}; }`}})}),r===Fu&&o&&(s+=`${O1} { --wp--style--block-gap: ${l}; }`)),r===Fu&&e){let c=["block","flex","grid"];Object.values(e).forEach(({className:u,displayMode:d,baseStyles:f})=>{d&&c.includes(d)&&(s+=`${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||""}`;s+=`${g} { ${h.join("; ")}; }`}})})}return s}var AMe=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function IMe(e,t){return x2(e,void 0,t)}function x2(e,t,r){if(!e)return{};let o=Object.entries(e),n=t?lX[t]??[]:[],s=o.filter(([l])=>AMe.includes(l)||n.includes(l)||r[l]).map(([l,c])=>[l,JSON.parse(JSON.stringify(c))]);return Object.fromEntries(s)}function sX(e){let{styles:t,selector:r,featureSelectors:o,name:n,elementName:i,mediaQuery:s,variationName:l}=e,c=n?lX[n]??[]:xMe[i??""]??[];return c.length?c.flatMap(u=>{let d=t?.[u];return!d||typeof d!="object"?[]:[{styles:JSON.parse(JSON.stringify(d)),selector:r,selectorSuffix:u,mediaQuery:s,featureSelectors:o&&typeof o!="string"?o:void 0,name:n,elementName:i,variationName:l}]}):[]}function OMe(e,t){let{styles:r,selector:o,fallbackGapValue:n,featureSelectors:i,hasLayoutSupport:s,layoutHasBlockGapSupport:l,layoutSelector:c,name:u,elementName:d,isStyleVariation:f,variationName:m}=e;return!u&&!d?[]:Object.entries(t).flatMap(([h,g])=>{let v=r?.[h];return!v||typeof v!="object"?[]:[{styles:JSON.parse(JSON.stringify(v)),selector:o,mediaQuery:g,featureSelectors:i&&typeof i!="string"?i:void 0,fallbackGapValue:n,hasLayoutSupport:s,name:u,elementName:d,isStyleVariation:f,variationName:m,layoutSelector:c,layoutHasBlockGapSupport:l}]})}var NMe=(e,t)=>{let r=[];if(!e?.styles)return r;let o=L1(e),n=IMe(e.styles,o);return n&&r.push({styles:n,selector:Fu,skipSelectorWrapper:!0}),Object.entries(Di.__EXPERIMENTAL_ELEMENTS).forEach(([i,s])=>{e.styles?.elements?.[i]&&r.push({styles:e.styles?.elements?.[i]??{},selector:s,elementName:i,skipSelectorWrapper:!_Me[i]})}),Object.entries(e.styles?.blocks??{}).forEach(([i,s])=>{let l=x2(s,i,o),c=s,u=[],d=[];c?.variations&&Object.entries(c.variations).forEach(([f,m])=>{let h=m,g=x2(h,i,o);h?.css&&(g.css=h.css);let v=typeof t!="string"?t[i]?.styleVariationSelectors?.[f]:void 0;if(v&&typeof t!="string"){let b=t[i];d.push({styles:g,selector:v,featureSelectors:b?.featureSelectors,fallbackGapValue:b?.fallbackGapValue,hasLayoutSupport:b?.hasLayoutSupport,isStyleVariation:!0,variationName:f,layoutSelector:v+b.selector,layoutHasBlockGapSupport:!0,name:i})}Object.entries(h?.elements??{}).forEach(([b,_])=>{_&&Di.__EXPERIMENTAL_ELEMENTS[b]&&u.push({styles:_,selector:Tc(v,Di.__EXPERIMENTAL_ELEMENTS[b]),elementName:b,isStyleVariation:!0})}),Object.entries(h?.blocks??{}).forEach(([b,_])=>{let y=typeof t!="string"?Tc(v,t[b]?.selector):void 0,w=typeof t!="string"?Tc(v,t[b]?.duotoneSelector):void 0,S=typeof t!="string"?AZ(v,t[b]?.featureSelectors??{}):void 0,x=x2(_,b,o);_?.css&&(x.css=_.css),!(!y||typeof t=="string")&&(u.push({selector:y,name:b,isStyleVariation:!0,duotoneSelector:w,featureSelectors:S,fallbackGapValue:t[b]?.fallbackGapValue,hasLayoutSupport:t[b]?.hasLayoutSupport,styles:x}),Object.entries(_.elements??{}).forEach(([C,A])=>{A&&Di.__EXPERIMENTAL_ELEMENTS[C]&&u.push({styles:A,selector:Tc(y,Di.__EXPERIMENTAL_ELEMENTS[C]),elementName:C,isStyleVariation:!0})}))})}),typeof t!="string"&&t?.[i]?.selector&&r.push({duotoneSelector:t[i].duotoneSelector,fallbackGapValue:t[i].fallbackGapValue,hasLayoutSupport:t[i].hasLayoutSupport,selector:t[i].selector,styles:l,featureSelectors:t[i].featureSelectors,name:i}),r.push(...d),Object.entries(c?.elements??{}).forEach(([f,m])=>{typeof t!="string"&&m&&t?.[i]&&Di.__EXPERIMENTAL_ELEMENTS[f]&&r.push({styles:m,selector:t[i]?.selector.split(",").map(h=>Di.__EXPERIMENTAL_ELEMENTS[f].split(",").map(v=>h+" "+v)).join(","),elementName:f})}),r.push(...u)}),r},T8=(e,t)=>{let r=[];if(!e?.settings)return r;let o=s=>{let l={};return b0.forEach(({path:c})=>{let u=zt(s,c,!1);u!==!1&&(l=vm(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:O1}),Object.entries(e.settings?.blocks??{}).forEach(([s,l])=>{let c=l.custom;if(typeof t=="string"||!t[s])return;let u=o(l);(Object.keys(u).length>0||c)&&r.push({presets:u,custom:c,selector:t[s]?.selector,featureSelectors:t[s]?.featureSelectors})}),r};function MMe(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 FMe(e,t,{path:r,valueKey:o,valueFunc:n,cssVarInfix:i}){let s=zt(e,r,[]),l=[];for(let c of["default","theme","custom"])if(s[c])for(let u of s[c]){let d=ym(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 DMe=(e,t)=>{let r=T8(e,t),o="";for(let{presets:n,custom:i,selector:s,featureSelectors:l}of r){let c=s,u={[c]:[]};if(e?.settings)for(let f of b0){let m=FMe(n,e.settings,f);if(m.length===0)continue;let h=MMe(l,f.path[0],c);u[h]||(u[h]=[]),u[h].push(...m)}let d=cX(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 LMe(e,{tree:t,useRootPaddingAlign:r,disableLayoutStyles:o,hasBlockGapSupport:n,hasFallbackGapSupport:i,disableRootPadding:s}){let{selector:l,selectorSuffix:c,mediaQuery:u,duotoneSelector:d,styles:f,fallbackGapValue:m,hasLayoutSupport:h,featureSelectors:g,layoutSelector:v,layoutHasBlockGapSupport:b,skipSelectorWrapper:_,name:y,variationName:w}=e,S="",x=c?g2(l,c):l;if(g&&typeof g!="string"){let R=kMe(g,f);R=EMe(R,t.settings,y),R=PMe(R,t.settings),Object.entries(R).forEach(([M,P])=>{if(P.length){let T=w?IZ(w,M):M;T=c?g2(T,c):T;let N=P.join(";");S+=`:root :where(${T}){${N};}`}})}if(d){let R={};f?.filter&&(R.filter=f.filter,delete f.filter);let M=C2(R);M.length&&(S+=`${d}{${M.join(";")};}`)}let C=v??x;!o&&(Fu===C||h)&&(S+=RMe({style:f,selector:C,hasBlockGapSupport:b??n,hasFallbackGapSupport:i,fallbackGapValue:m}));let k=C2(f,x,r,t,s);if(k?.length){let R=_?x:`:root :where(${x})`;S+=`${R}{${k.join(";")};}`}return f?.css&&(S+=uX(f.css,`:root :where(${x})`)),u&&S?`${u}{${S}}`:S}var BMe=(e,t,r,o,n=!1,i=!1,s={})=>{let l={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...s},c=e,u=NMe(c,t),d=T8(c,t),f=c?.settings?.useRootPaddingAwareAlignments,{contentSize:m,wideSize:h}=c?.settings?.layout||{},g=l.marginReset||l.rootPadding||l.layoutStyles,v="";if(l.presets&&(m||h)&&(v+=`${O1} {`,v=m?v+` --wp--style--global--content-size: ${m};`:v,v=h?v+` --wp--style--global--wide-size: ${h};`:v,v+="}"),g&&(v+=":where(body) {margin: 0;",l.rootPadding&&f&&(v+=`padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
				.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
				.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;
				`),v+="}"),l.blockStyles){let b=L1(e);u.forEach(_=>{if(_.isStyleVariation&&!l.variationStyles)return;let y=OMe(_,b);[_,...y,...sX(_),...y.flatMap(sX)].forEach(w=>{v+=LMe(w,{tree:c,useRootPaddingAlign:f,disableLayoutStyles:n,hasBlockGapSupport:r,hasFallbackGapSupport:o,disableRootPadding:i})})})}if(l.layoutStyles&&(v=v+".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",v=v+".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",v=v+".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),l.blockGap&&r){let b=S8(c?.styles?.spacing?.blockGap)||"0.5em";v=v+`:root :where(.wp-site-blocks) > * { margin-block-start: ${b}; margin-block-end: 0; }`,v=v+":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",v=v+":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return l.presets&&d.forEach(({selector:b,presets:_})=>{(Fu===b||O1===b)&&(b="");let y=CMe(b,_);y.length>0&&(v+=y)}),v};function VMe(e,t){return T8(e,t).flatMap(({presets:o})=>TMe(o))}var jMe=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let r={root:t};return Object.entries(SMe).forEach(([o,n])=>{let i=_0(e,o);i&&(r[n]=i)}),r},zMe=(e,t)=>{let{getBlockStyles:r}=(0,aX.select)(Di.store),o={};return e.forEach(n=>{let i=n.name,s=_0(n);if(!s)return;let l=_0(n,"filter.duotone");if(!l){let h=_0(n),g=(0,Di.getBlockSupport)(n,"color.__experimentalDuotone",!1);typeof g=="string"&&h&&(l=Tc(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}`,b=p8(v,s);f[v]=b});let m=jMe(n,s);o[i]={duotoneSelector:l??void 0,fallbackGapValue:u,featureSelectors:Object.keys(m).length?m:void 0,hasLayoutSupport:c,name:i,selector:s,styleVariationSelectors:d?.length?f:void 0}}),o};function HMe(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 uX(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 s=n.replace("}","").split("{");if(s.length!==2)return;let[l,c]=s,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(" ")?Tc(t,f):g2(t,f),r+=`:root :where(${m})${d}{${c.trim()}}`}}),r}function wv(e={},t=[],r={}){let{hasBlockGapSupport:o,hasFallbackGapSupport:n,disableLayoutStyles:i=!1,disableRootPadding:s=!1,styleOptions:l={}}=r,c=t.length>0?t:(0,Di.getBlockTypes)(),u=vv(e,"spacing.blockGap"),d=o??u!==null,f=n??!d;if(!e?.styles||!e?.settings)return[[],{}];let m=HMe(e),h=zMe(c),g=DMe(m,h),v=BMe(m,h,d,f,i,s,l),b=VMe(m,h),_=[{css:g,isGlobalStyles:!0},{css:v,isGlobalStyles:!0},{css:m?.styles?.css??"",isGlobalStyles:!0},{assets:b,__unstableType:"svgs",isGlobalStyles:!0}];return c.forEach(y=>{let w=m?.styles?.blocks?.[y.name];if(w?.css){let{featureSelectors:S}=h[y.name],x=typeof S=="object"?S?.css:void 0,C;typeof x=="string"?C=x:typeof x=="object"&&(C=x?.root);let A=C??h[y.name].selector;_.push({css:uX(w.css,A),isGlobalStyles:!0})}}),[_,m.settings]}function T2(e,t,r,{resolveRefs:o=!0}={}){if(!e?.styles?.blocks?.[t]?.variations?.[r])return;let n=s=>{Object.keys(s).forEach(l=>{let c=s[l];if(typeof c=="object"&&c!==null)if(c.ref!==void 0)if(typeof c.ref!="string"||c.ref.trim()==="")delete s[l];else{let u=zt(e,c.ref);u!=null?s[l]=u:delete s[l]}else n(c),Object.keys(c).length===0&&delete s[l]})},i=JSON.parse(JSON.stringify(e.styles.blocks[t].variations[r]));return o&&n(i),i}var k8="default";function mX(e){let t=e?.viewport,r=e?.pseudoState;return(!t||t===k8)&&(!r||r===k8)}function UMe(e){return mX(e)?[]:[e.viewport,e.pseudoState].filter(t=>!!t&&t!==k8)}function WMe(e,t){let r=UMe(t);return r.length?zt(e,r):e}var GMe=new Set(["blocks","variations","css"]),E8=Object.freeze({value:{},sources:{}}),YMe={root:{layer:"root"},element:{layer:"element"},block:{layer:"block"},blockVariation:{layer:"blockVariation"}};function wm(e){let t=YMe[e];return t?{...t}:null}function _m(e,t){return!e||!t?null:{styles:e,source:t}}function qMe(e){return e.join(".")}function KMe(e){return{...e}}function hX(e){return e===""||e===null||typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}function P8(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&typeof e.ref=="string"}function Sm(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t={};for(let r of Object.keys(e))if(!GMe.has(r)){if(r==="elements"){e.elements&&typeof e.elements=="object"&&(t.elements=e.elements);continue}hX(e[r])||(t[r]=e[r])}return Object.keys(t).length===0?null:t}var dX=new Set(["backgroundImage"]);function gX(e,t,r,o,n,i=[]){if(!t||typeof t!="object"||Array.isArray(t))return e;for(let s of Object.keys(t)){let l=t[s];if(hX(l))continue;if(P8(l)){if(l.ref.trim()==="")continue;let u=zt(r,l.ref);if(u==null||P8(u))continue;l=u}let c=[...i,s];if(!dX.has(s)&&l!==null&&typeof l=="object"&&!Array.isArray(l)&&!P8(l)){let u=e[s]&&typeof e[s]=="object"&&!Array.isArray(e[s])?e[s]:{};e[s]=gX({...u},l,r,o,n,c)}else e[s]=dX.has(s)&&l!==null&&typeof l=="object"&&!Array.isArray(l)?{...l}:l,o&&n&&(n[qMe(c)]=KMe(o))}return e}function E2(e,t){if(!e)return null;let r=WMe(e,t);return r&&typeof r=="object"&&!Array.isArray(r)?r:null}var ZMe=["color.background","color.gradient","background","spacing","dimensions","border","shadow","filter"];function XMe(e){return e.startsWith("elements.")?!1:ZMe.some(t=>e===t||e.startsWith(`${t}.`))}function vX(e,t){if(!e||typeof e!="object")return;let[r,...o]=t;if(o.length===0){delete e[r];return}let n=e[r];n&&typeof n=="object"&&(vX(n,o),Object.keys(n).length===0&&delete e[r])}function QMe(e,t){for(let r of Object.keys(t))t[r].layer==="root"&&XMe(r)&&(vX(e,r.split(".")),delete t[r])}function JMe(e,t,r){let o=e?.background?.backgroundImage;if(!o)return;let n=y0(o,{...t,_links:r??void 0});n!==void 0&&(e.background.backgroundImage=n)}function fX(e,{blockName:t,variationName:r=null,elements:o=null,viewport:n=null,pseudoState:i=null}={}){if(!e||!e.styles||!t)return E8;let s=e.styles,l={viewport:n,pseudoState:i},c=s,u=s.blocks?.[t]??null,d=(o??[]).map(b=>s.elements?.[b]??null).filter(b=>!!b),f=r?T2(e,t,r)??null:null,m=[_m(Sm(c),wm("root")),...d.map(b=>_m(Sm(b),wm("element"))),u?_m(Sm(u),wm("block")):null,f?_m(Sm(f),wm("blockVariation")):null];mX(l)||m.push(_m(Sm(E2(c,l)),wm("root")),...d.map(b=>_m(Sm(E2(b,l)),wm("element"))),u?_m(Sm(E2(u,l)),wm("block")):null,f?_m(Sm(E2(f,l)),wm("blockVariation")):null);let h=m.filter(Boolean);if(h.length===0)return E8;let g={},v=h.reduce((b,_)=>gX(b,_.styles,e,_.source,g),{});return QMe(v,g),JMe(v,e,e._links??null),{value:v,sources:g}}var $Me={},pX=new WeakMap;function bX(e,t={}){let r=e?.styles;if(!r||typeof r!="object")return fX(e,t);let o=pX.get(r);o||(o=new WeakMap,pX.set(r,o));let n=e?._links??$Me,i=o.get(n);i||(i=new Map,o.set(n,i));let s=`${t.elements?.join(",")??""}:${t.viewport??""}:${t.pseudoState??""}`,l=(t.blockName||"")+""+(t.variationName||"")+""+s;if(i.has(l))return i.get(l);let c=fX(e,t);return i.set(l,c),c}var yX=a(xf(),1),{lock:wX,unlock:ugt}=(0,yX.__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-engine");var Du={};wX(Du,{getResponsiveMediaQueries:L1,getViewportBreakpoints:C8,getViewportBreakpointValueInPixels:x8,resolveStyle:bX,getVariationStyle:T2});function R8(e,t){if(!e||!t)return"";let r={settings:{},styles:{blocks:{[t]:e}}};try{let[o]=wv(r,[]);return o.map(n=>n.css).join(`
`)}catch{return""}}var{getViewportBreakpoints:e3e,getViewportBreakpointValueInPixels:P2}=K(Du),t3e={Tablet:"tablet",Mobile:"mobile"},r3e="Desktop",o3e="Tablet",n3e="Mobile",k2={Desktop:"default",Tablet:"@tablet",Mobile:"@mobile"};function x0(e,t){let r=P2(e);return r&&r<=P2(S0("Mobile",t))?n3e:r&&r<=P2(S0("Tablet",t))?o3e:r3e}function S0(e,t){let r=t3e[e];if(r)return P2(e3e(t)[r])}var z1={},i3e=(0,Jt.createRegistrySelector)(e=>()=>e(yo.store).hasUndo()),s3e=(0,Jt.createRegistrySelector)(e=>()=>e(yo.store).hasRedo());function _X(e){return Tn(e).status==="auto-draft"}function SX(e){return"content"in H1(e)}var R2=(0,Jt.createRegistrySelector)(e=>t=>{let r=na(t),o=ia(t);return e(yo.store).hasEditsForEntityRecord("postType",r,o)}),a3e=(0,Jt.createRegistrySelector)(e=>t=>{let r=e(yo.store).__experimentalGetDirtyEntityRecords(),{type:o,id:n}=Tn(t);return r.some(i=>i.kind!=="postType"||i.name!==o||i.key!==n)});function l3e(e){return!R2(e)&&_X(e)}var Tn=(0,Jt.createRegistrySelector)(e=>t=>{let r=ia(t),o=na(t),n=e(yo.store).getRawEntityRecord("postType",o,r);return n||z1});function na(e){return e.postType}function ia(e){return e.postId}function c3e(e){return e.templateId}function A8(e){return Tn(e)._links?.["version-history"]?.[0]?.count??0}function u3e(e){return Tn(e)._links?.["predecessor-version"]?.[0]?.id??null}var H1=(0,Jt.createRegistrySelector)(e=>t=>{let r=na(t),o=ia(t);return e(yo.store).getEntityRecordEdits("postType",r,o)||z1});function V1(e,t){switch(t){case"type":return na(e);case"id":return ia(e);default:let r=Tn(e);if(!r.hasOwnProperty(t))break;return Tk(r[t])}}var d3e=(0,Jt.createSelector)((e,t)=>{let r=H1(e);return r.hasOwnProperty(t)?{...V1(e,t),...r[t]}:V1(e,t)},(e,t)=>[V1(e,t),H1(e)[t]]);function oo(e,t){if(t==="content")return U1(e);let r=H1(e);return r.hasOwnProperty(t)?vZ.has(t)?d3e(e,t):r[t]:V1(e,t)}var xX=(0,Jt.createRegistrySelector)(e=>(t,r)=>{if(!yZ.includes(r)&&r!=="preview_link")return;let o=na(t),n=ia(t),i=e(yo.store).getCurrentUser()?.id,s=e(yo.store).getAutosave(o,n,i);if(s)return Tk(s[r])});function f3e(e){return oo(e,"status")==="private"?"private":oo(e,"password")?"password":"public"}function p3e(e){return Tn(e).status==="pending"}function I8(e,t){let r=t||Tn(e);return["publish","private"].indexOf(r.status)!==-1||r.status==="future"&&!(0,C0.isInTheFuture)(new Date(Number((0,C0.getDate)(r.date))-D4))}function m3e(e){return Tn(e).status==="future"&&!I8(e)}function h3e(e){let t=Tn(e);return t.type===Pl?R2(e):R2(e)||["publish","private","future"].indexOf(t.status)===-1}function CX(e){return T0(e)?!1:!!oo(e,"title")||!!oo(e,"excerpt")||!TX(e)}var TX=(0,Jt.createRegistrySelector)(e=>t=>{let r=ia(t),o=na(t),n=e(yo.store).getEditedEntityRecord("postType",o,r);if(typeof n.content!="function")return!n.content;let i=oo(t,"blocks");if(i.length===0)return!0;if(i.length>1)return!1;let s=i[0].name;return s!==(0,xm.getDefaultBlockName)()&&s!==(0,xm.getFreeformContentHandlerName)()?!1:!U1(t)}),g3e=(0,Jt.createRegistrySelector)(e=>t=>{if(!CX(t)||kX(t))return!1;let r=na(t);if(!e(yo.store).getPostType(r)?.supports?.autosave)return!1;let n=ia(t),i=e(yo.store).hasFetchedAutosaves(r,n),s=e(yo.store).getCurrentUser()?.id,l=e(yo.store).getAutosave(r,n,s);return i?!l||SX(t)?!0:["title","excerpt","meta"].some(c=>Tk(l[c])!==oo(t,c)):!1});function v3e(e){let t=oo(e,"date"),r=new Date(Number((0,C0.getDate)(t))-D4);return(0,C0.isInTheFuture)(r)}function b3e(e){let t=oo(e,"date"),r=oo(e,"modified"),o=Tn(e).status;return o==="draft"||o==="auto-draft"||o==="pending"?t===r||t===null:!1}function y3e(e){return!!e.deleting.pending}function T0(e){return!!e.saving.pending}var w3e=(0,Jt.createRegistrySelector)(e=>t=>{let r=e(yo.store).__experimentalGetEntitiesBeingSaved(),{type:o,id:n}=Tn(t);return r.some(i=>i.kind!=="postType"||i.name!==o||i.key!==n)}),_3e=(0,Jt.createRegistrySelector)(e=>t=>{let r=na(t),o=ia(t);return!e(yo.store).getLastEntitySaveError("postType",r,o)}),S3e=(0,Jt.createRegistrySelector)(e=>t=>{let r=na(t),o=ia(t);return!!e(yo.store).getLastEntitySaveError("postType",r,o)});function x3e(e){return T0(e)&&!!e.saving.options?.isAutosave}function C3e(e){return T0(e)&&!!e.saving.options?.isPreview}function T3e(e){if(e.saving.pending||T0(e))return;let t=xX(e,"preview_link");(!t||Tn(e).status==="draft")&&(t=oo(e,"link"),t&&(t=(0,j1.addQueryArgs)(t,{preview:!0})));let r=oo(e,"featured_media");return t&&r?(0,j1.addQueryArgs)(t,{_thumbnail_id:r}):t}var E3e=(0,Jt.createRegistrySelector)(e=>()=>{let t=e(A2.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}}),U1=(0,Jt.createRegistrySelector)(e=>t=>{let r=ia(t),o=na(t),n=e(yo.store).getEditedEntityRecord("postType",o,r);if(n){if(typeof n.content=="function")return n.content(n);if(n.blocks)return(0,xm.__unstableSerializeAndClean)(n.blocks);if(n.content)return n.content}return""});function P3e(e){return T0(e)&&!I8(e)&&oo(e,"status")==="publish"}function EX(e){let t=oo(e,"permalink_template");return F4.test(t)}function k3e(e){let t=PX(e);if(!t)return null;let{prefix:r,postName:o,suffix:n}=t;return EX(e)?r+o+n:r}function R3e(e){return oo(e,"slug")||(0,j1.cleanForSlug)(oo(e,"title"))||ia(e)}function PX(e){let t=oo(e,"permalink_template");if(!t)return null;let r=oo(e,"slug")||oo(e,"generated_slug"),[o,n]=t.split(F4);return{prefix:o,postName:r,suffix:n}}function A3e(e){return e.postLock.isLocked}function I3e(e){return Object.keys(e.postSavingLock).length>0}function kX(e){return Object.keys(e.postAutosavingLock).length>0}function O3e(e){return e.postLock.isTakeover}function N3e(e){return e.postLock.user}function M3e(e){return e.postLock.activePostLock}function F3e(e){return!!Tn(e)._links?.hasOwnProperty("wp:action-unfiltered-html")}var D3e=(0,Jt.createRegistrySelector)(e=>()=>!!e(W1.store).get("core","isPublishSidebarEnabled")),L3e=(0,Jt.createSelector)(e=>oo(e,"blocks")||(0,xm.parse)(U1(e)),e=>[oo(e,"blocks"),U1(e)]);function RX(e,t){return e.removedPanels.includes(t)}var B3e=(0,Jt.createRegistrySelector)(e=>(t,r)=>{let o=e(W1.store).get("core","inactivePanels");return!RX(t,r)&&!o?.includes(r)}),V3e=(0,Jt.createRegistrySelector)(e=>(t,r)=>!!e(W1.store).get("core","openPanels")?.includes(r));function j3e(e){return(0,Lu.default)("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),oo(e,"selection")?.selectionStart}function z3e(e){return(0,Lu.default)("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),oo(e,"selection")?.selectionEnd}function H3e(e){return oo(e,"selection")}function U3e(e){return!!e.postId}function O8(e){return e.editorSettings}function I2(e){return e.renderingMode}var W3e=(0,Jt.createRegistrySelector)(e=>t=>{let r=K(e(A2.store));if(r.isZoomOut())return"Desktop";let n=t.canvasWidth,i=r.getSettings().__experimentalFeatures?.viewport;return x0(n,i)});function G3e(e){return e.listViewPanel}function Y3e(e){return!!e.blockInserterPanel}var q3e=(0,Jt.createRegistrySelector)(e=>()=>e(W1.store).get("core","editorMode")??"visual");function K3e(){return(0,Lu.default)("select('core/editor').getStateBeforeOptimisticTransaction",{since:"5.7",hint:"No state history is kept on this store anymore"}),null}function Z3e(){return(0,Lu.default)("select('core/editor').inSomeHistory",{since:"5.7",hint:"No state history is kept on this store anymore"}),!1}function at(e){return(0,Jt.createRegistrySelector)(t=>(r,...o)=>((0,Lu.default)("`wp.data.select( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.select( 'core/block-editor' )."+e+"`",version:"6.2"}),t(A2.store)[e](...o)))}var X3e=at("getBlockName"),Q3e=at("isBlockValid"),J3e=at("getBlockAttributes"),$3e=at("getBlock"),e6e=at("getBlocks"),t6e=at("getClientIdsOfDescendants"),r6e=at("getClientIdsWithDescendants"),o6e=at("getGlobalBlockCount"),n6e=at("getBlocksByClientId"),i6e=at("getBlockCount"),s6e=at("getBlockSelectionStart"),a6e=at("getBlockSelectionEnd"),l6e=at("getSelectedBlockCount"),c6e=at("hasSelectedBlock"),u6e=at("getSelectedBlockClientId"),d6e=at("getSelectedBlock"),f6e=at("getBlockRootClientId"),p6e=at("getBlockHierarchyRootClientId"),m6e=at("getAdjacentBlockClientId"),h6e=at("getPreviousBlockClientId"),g6e=at("getNextBlockClientId"),v6e=at("getSelectedBlocksInitialCaretPosition"),b6e=at("getMultiSelectedBlockClientIds"),y6e=at("getMultiSelectedBlocks"),w6e=at("getFirstMultiSelectedBlockClientId"),_6e=at("getLastMultiSelectedBlockClientId"),S6e=at("isFirstMultiSelectedBlock"),x6e=at("isBlockMultiSelected"),C6e=at("isAncestorMultiSelected"),T6e=at("getMultiSelectedBlocksStartClientId"),E6e=at("getMultiSelectedBlocksEndClientId"),P6e=at("getBlockOrder"),k6e=at("getBlockIndex"),R6e=at("isBlockSelected"),A6e=at("hasSelectedInnerBlock"),I6e=at("isBlockWithinSelection"),O6e=at("hasMultiSelection"),N6e=at("isMultiSelecting"),M6e=at("isSelectionEnabled"),F6e=at("getBlockMode"),D6e=at("isTyping"),L6e=at("isCaretWithinFormattedText"),B6e=at("getBlockInsertionPoint"),V6e=at("isBlockInsertionPointVisible"),j6e=at("isValidTemplate"),z6e=at("getTemplate"),H6e=at("getTemplateLock"),U6e=at("canInsertBlockType"),W6e=at("getInserterItems"),G6e=at("hasInserterItems"),Y6e=at("getBlockListSettings"),q6e=(0,Jt.createRegistrySelector)(e=>()=>((0,Lu.default)("select('core/editor').__experimentalGetDefaultTemplateTypes",{since:"6.8",alternative:"select('core/core-data').getCurrentTheme()?.default_template_types"}),e(yo.store).getCurrentTheme()?.default_template_types)),K6e=(0,Jt.createRegistrySelector)(e=>(0,Jt.createSelector)(()=>((0,Lu.default)("select('core/editor').__experimentalGetDefaultTemplatePartAreas",{since:"6.8",alternative:"select('core/core-data').getCurrentTheme()?.default_template_part_areas"}),(e(yo.store).getCurrentTheme()?.default_template_part_areas||[]).map(r=>({...r,icon:gm(r.icon)}))))),Z6e=(0,Jt.createRegistrySelector)(e=>(0,Jt.createSelector)((t,r)=>{(0,Lu.default)("select('core/editor').__experimentalGetDefaultTemplateType",{since:"6.8"});let o=e(yo.store).getCurrentTheme()?.default_template_types;return o?Object.values(o).find(n=>n.slug===r)??z1:z1})),X6e=(0,Jt.createRegistrySelector)(e=>(0,Jt.createSelector)((t,r)=>{if((0,Lu.default)("select('core/editor').__experimentalGetTemplateInfo",{since:"6.8"}),!r)return z1;let o=e(yo.store).getCurrentTheme(),n=o?.default_template_types||[],i=o?.default_template_part_areas||[];return Al({template:r,templateAreas:i,templateTypes:n})})),Q6e=(0,Jt.createRegistrySelector)(e=>t=>{let r=na(t);return e(yo.store).getPostType(r)?.labels?.singular_name});function J6e(e){return e.publishSidebarActive}var $G={};Yr($G,{__experimentalTearDownEditor:()=>Art,__unstableSaveForPreview:()=>jrt,autosave:()=>Vrt,clearSelectedBlock:()=>_ot,closePublishSidebar:()=>dot,createUndoLevel:()=>Urt,disablePublishSidebar:()=>Yrt,editPost:()=>Mrt,enablePublishSidebar:()=>Grt,enterFormattedText:()=>jot,exitFormattedText:()=>zot,hideInsertionPoint:()=>Iot,insertBlock:()=>kot,insertBlocks:()=>Rot,insertDefaultBlock:()=>Hot,lockPostAutosaving:()=>Zrt,lockPostSaving:()=>qrt,mergeBlocks:()=>Mot,moveBlockToPosition:()=>Pot,moveBlocksDown:()=>Tot,moveBlocksUp:()=>Eot,multiSelect:()=>wot,openPublishSidebar:()=>uot,receiveBlocks:()=>mot,redo:()=>zrt,refreshPost:()=>Lrt,removeBlock:()=>Dot,removeBlocks:()=>Fot,removeEditorPanel:()=>oot,replaceBlock:()=>Cot,replaceBlocks:()=>xot,resetBlocks:()=>pot,resetEditorBlocks:()=>Qrt,resetPost:()=>Irt,savePost:()=>Frt,selectBlock:()=>vot,setDeviceType:()=>eot,setEditedPost:()=>C_e,setIsInserterOpened:()=>not,setIsListViewOpened:()=>iot,setRenderingMode:()=>$rt,setTemplateValidity:()=>Oot,setupEditor:()=>Rrt,setupEditorState:()=>Nrt,showInsertionPoint:()=>Aot,startMultiSelect:()=>bot,startTyping:()=>Bot,stopMultiSelect:()=>yot,stopTyping:()=>Vot,switchEditorMode:()=>cot,synchronizeTemplate:()=>Not,toggleBlockMode:()=>Lot,toggleDistractionFree:()=>sot,toggleEditorPanelEnabled:()=>tot,toggleEditorPanelOpened:()=>rot,togglePublishSidebar:()=>fot,toggleSelection:()=>Sot,toggleSpotlightMode:()=>aot,toggleTopToolbar:()=>lot,trashPost:()=>Brt,undo:()=>Hrt,unlockPostAutosaving:()=>Xrt,unlockPostSaving:()=>Krt,updateBlock:()=>hot,updateBlockAttributes:()=>got,updateBlockListSettings:()=>Uot,updateEditorSettings:()=>Jrt,updatePost:()=>Ort,updatePostLock:()=>Wrt});var JG=a(Ol(),1),x_e=a(Bu(),1),vg=a(qa(),1),cS=a(Pt(),1),nu=a(It(),1),Ks=a(ae(),1),Op=a(be(),1),uS=a(jn(),1),sn=a(Dt(),1),wn=a(j(),1);function M8(e,t){return`wp-autosave-block-editor-post-${t?"auto-draft":e}`}function NX(e,t){return window.sessionStorage.getItem(M8(e,t))}function MX(e,t,r,o,n){window.sessionStorage.setItem(M8(e,t),JSON.stringify({post_title:r,content:o,excerpt:n}))}function O2(e,t){window.sessionStorage.removeItem(M8(e,t))}var Za=a(j(),1);function FX(e){let{previousPost:t,post:r,postType:o}=e;if(e.options?.isAutosave)return[];let n=["publish","private","future"],i=n.includes(t.status),s=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===Pl?(c=(0,Za.__)("Media updated."),u=!1):!i&&!s?(c=(0,Za.__)("Draft saved."),d=!0):i&&!s?(c=o.labels.item_reverted_to_draft,u=!1):!i&&s?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,Za.__)("View Preview"):o.labels.view_item,url:r.link,openInNewTab:!0}),[c,{id:"editor-save",type:"snackbar",actions:f}]}function DX(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,Za.__)("Publishing failed because you were offline. Please verify your connection and try again."),private:(0,Za.__)("Publishing failed because you were offline. Please verify your connection and try again."),future:(0,Za.__)("Scheduling failed because you were offline. Please verify your connection and try again."),default:(0,Za.__)("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 s={publish:(0,Za.__)("Publishing failed."),private:(0,Za.__)("Publishing failed."),future:(0,Za.__)("Scheduling failed."),default:(0,Za.__)("Updating failed.")},l=!i&&r.status in s?s[r.status]:s.default;return o.message&&!/<\/?[^>]*>/.test(o.message)&&(l=[l,o.message].join(" ")),[l,{id:"editor-save"}]}function LX(e){return[e.error.message&&e.error.code!=="unknown_error"?e.error.message:(0,Za.__)("Trashing failed"),{id:"editor-trash-fail"}]}var QG={};Yr(QG,{createTemplate:()=>mrt,hideBlockTypes:()=>grt,registerEntityAction:()=>srt,registerEntityField:()=>lrt,registerPostTypeSchema:()=>frt,removeTemplates:()=>yrt,resetStylesNavigation:()=>xrt,restoreRevision:()=>Prt,revertTemplate:()=>brt,saveDirtyEntities:()=>vrt,selectNote:()=>krt,setCanvasWidth:()=>XG,setCurrentRevisionId:()=>Crt,setCurrentTemplateId:()=>prt,setDefaultRenderingMode:()=>wrt,setIsReady:()=>urt,setRevisionPage:()=>Trt,setShowRevisionDiff:()=>Ert,setShowStylebook:()=>Srt,setStylesPath:()=>_rt,showBlockTypes:()=>hrt,unregisterEntityAction:()=>art,unregisterEntityField:()=>crt});var ni=a(ae(),1),qt=a(j(),1),ss=a(It(),1),w3=a(be(),1),yy=a(Dt(),1),__e=a(vo(),1),S_e=a(Bu(),1),_3=a(Pt(),1),ZG=a(Lt(),1),S3=a(ln(),1);function N2(e){return e?e.source===Pk.custom&&(!!e?.plugin||e?.has_theme_file):!1}var H8={};Yr(H8,{buildRevisionsPageQuery:()=>Sv,getCanvasHeight:()=>bFe,getCanvasWidth:()=>vFe,getCurrentRevision:()=>xFe,getCurrentRevisionId:()=>z8,getDefaultRenderingMode:()=>mFe,getEntityActions:()=>uFe,getEntityFields:()=>fFe,getInserter:()=>iFe,getInserterSidebarToggleRef:()=>aFe,getListViewToggleRef:()=>sFe,getPageRevisions:()=>wFe,getPostBlocksByName:()=>pFe,getPostIcon:()=>lFe,getPreviousRevision:()=>EFe,getRevisionPage:()=>j8,getRevisionsPerPage:()=>yFe,getSelectedNote:()=>CFe,getShowStylebook:()=>gFe,getStylesPath:()=>hFe,hasPostMetaChanges:()=>cFe,isCollaborationEnabledForCurrentPost:()=>PFe,isEntityReady:()=>dFe,isNoteFocused:()=>TFe,isRevisionsMode:()=>_Fe,isShowingRevisionDiff:()=>SFe});var iQ=a(jX(),1),_v=a(be(),1),bs=a(Y(),1);var vs=a(ae(),1),sQ=a(Dt(),1);var zX=[];function HX(e,t,r){return e.actions[t]?.[r]??zX}function UX(e,t,r){return e.fields[t]?.[r]??zX}function WX(e,t,r){return e.isReady[t]?.[r]}var fi=[];for(let e=0;e<256;++e)fi.push((e+256).toString(16).slice(1));function GX(e,t=0){return(fi[e[t+0]]+fi[e[t+1]]+fi[e[t+2]]+fi[e[t+3]]+"-"+fi[e[t+4]]+fi[e[t+5]]+"-"+fi[e[t+6]]+fi[e[t+7]]+"-"+fi[e[t+8]]+fi[e[t+9]]+"-"+fi[e[t+10]]+fi[e[t+11]]+fi[e[t+12]]+fi[e[t+13]]+fi[e[t+14]]+fi[e[t+15]]).toLowerCase()}var $6e=new Uint8Array(16);function F8(){return crypto.getRandomValues($6e)}function eFe(e,t,r){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():tFe(e,t,r)}function tFe(e,t,r){e=e||{};let o=e.random??e.rng?.()??F8();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 GX(o)}var D8=eFe;var G1=a(Y(),1),JX=a(ae(),1),$X=a(Tf(),1);var KX=a(U(),1),gs=null,L8=new Set;function ZX(){L8.forEach(e=>e())}function XX(e){e.length&&(gs||(gs={total:0,completed:0,pending:[]}),gs={total:gs.total+e.length,completed:gs.completed,pending:[...gs.pending,...e]},ZX())}function B8(e){if(!gs||e<=0)return;let t=Math.min(gs.total,gs.completed+e),r=gs.pending.slice(e);t>=gs.total?gs=null:gs={total:gs.total,completed:t,pending:r},ZX()}function qX(){return gs}function rFe(e){return L8.add(e),()=>{L8.delete(e)}}function QX(){return(0,KX.useSyncExternalStore)(rFe,qX,qX)}var oFe=()=>{};function M2({additionalData:e={},allowedTypes:t,filesList:r,maxUploadFileSize:o,onError:n=oFe,onFileChange:i,onSuccess:s,multiple:l=!0,isTransportOnly:c=!1}){let{receiveEntityRecords:u}=(0,G1.dispatch)(JX.store),{getCurrentPost:d,getEditorSettings:f}=(0,G1.select)(I),{lockPostAutosaving:m,unlockPostAutosaving:h,lockPostSaving:g,unlockPostSaving:v}=(0,G1.dispatch)(I),b=f().allowedMimeTypes,_=`image-upload-${D8()}`;o=o||f().maxUploadFileSize;let y=d(),w=typeof y?.id=="number"?y.id:y?.wp_id,S=()=>{v(_),h(_)};c||(g(_),m(_));let x=w?{post:w}:{};if(!c){let A=Array.from(r).map(k=>k?.name||"");XX(A)}let C=0;(0,$X.uploadMedia)({allowedTypes:t,filesList:r,onFileChange:A=>{i?.(A);let k=A.filter(R=>R?.id);if(k?.length&&u("postType","attachment",k,void 0,!0),!c&&k.length===A.length&&S(),!c){let R=k.length;R>C&&(B8(R-C),C=R)}},onSuccess:s,additionalData:{...x,...e},maxUploadFileSize:o,onError:({message:A})=>{c||(S(),B8(1)),n(A)},wpAllowedMimeTypes:b,multiple:l})}var eQ=a(vo(),1),tQ=a(qa(),1);function rQ(e){return(0,tQ.default)("wp.editor.cleanForSlug",{since:"12.7",plugin:"Gutenberg",alternative:"wp.url.cleanForSlug"}),(0,eQ.cleanForSlug)(e)}var nFe={Mobile:8/5,Tablet:4/3},oQ={rootClientId:void 0,insertionIndex:void 0,filterValue:void 0},V8=["post-only","template-locked"],iFe=(0,bs.createRegistrySelector)(e=>(0,bs.createSelector)(t=>{if(typeof t.blockInserterPanel=="object")return t.blockInserterPanel;if(I2(t)==="template-locked"){let{getBlocksByName:r,getSelectedBlockClientId:o,getBlockParents:n,getBlockOrder:i}=e(_v.store),[s]=r("core/post-content");if(s){let l=o();return l&&l!==s&&n(l).includes(s)?oQ:{rootClientId:s,insertionIndex:i(s).length,filterValue:void 0}}}return oQ},t=>{let{getBlocksByName:r,getSelectedBlockClientId:o,getBlockParents:n,getBlockOrder:i}=e(_v.store),[s]=r("core/post-content"),l=o();return[t.blockInserterPanel,I2(t),s,l,l?n(l):void 0,s?i(s).length:void 0]}));function sFe(e){return e.listViewToggleRef}function aFe(e){return e.inserterSidebarToggleRef}var nQ={wp_block:g0,wp_navigation:vV,page:mm,post:s8},lFe=(0,bs.createRegistrySelector)(e=>(t,r,o)=>{{if(r==="wp_template_part"||r==="wp_template"){let s=(e(vs.store).getCurrentTheme()?.default_template_part_areas||[]).find(l=>o.area===l.area);return s?.icon?gm(s.icon):Ka}if(nQ[r])return nQ[r];let n=e(vs.store).getPostType(r);return typeof n?.icon=="string"&&n.icon.startsWith("dashicons-")?n.icon.slice(10):mm}}),cFe=(0,bs.createRegistrySelector)(e=>(t,r,o)=>{let{type:n,id:i}=Tn(t),s=e(vs.store).getEntityRecordNonTransientEdits("postType",r||n,o||i);if(!s?.meta)return!1;let l=e(vs.store).getEntityRecord("postType",r||n,o||i)?.meta;return!(0,iQ.default)({...l,footnotes:void 0},{...s.meta,footnotes:void 0})});function uFe(e,...t){return HX(e.dataviews,...t)}function dFe(e,...t){return WX(e.dataviews,...t)}function fFe(e,...t){return UX(e.dataviews,...t)}var pFe=(0,bs.createRegistrySelector)(e=>(0,bs.createSelector)((t,r)=>{r=Array.isArray(r)?r:[r];let{getBlocksByName:o,getBlockParents:n,getBlockName:i}=e(_v.store);return o(r).filter(s=>n(s).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(_v.store),i=o(r),s=i.map(l=>n(l));return[i,...s]})),mFe=(0,bs.createRegistrySelector)(e=>(t,r)=>{let{getPostType:o,getCurrentTheme:n,hasFinishedResolution:i}=e(vs.store),s=n(),l=o(r);if(!i("getPostType",[r])||!i("getCurrentTheme"))return;let c=s?.stylesheet,u=e(sQ.store).get("core","renderingModes")?.[c]?.[r];if(V8.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(V8.includes(d))return d;let f=O8(t).defaultRenderingMode;return V8.includes(f)?f:"post-only"});function hFe(e){return e.stylesPath??"/"}function gFe(e){return e.showStylebook??!1}var vFe=(0,bs.createRegistrySelector)(e=>t=>{if(!K(e(_v.store)).isZoomOut())return t.canvasWidth}),bFe=(0,bs.createRegistrySelector)(e=>t=>{let r=K(e(_v.store));if(r.isZoomOut())return;let o=t.canvasWidth,n=r.getSettings().__experimentalFeatures?.viewport,i=x0(o,n);if(o!==S0(i,n))return;let s=nFe[i];if(s&&o>0)return Math.round(o*s)});function j8(e){return e.revisionPage}function Sv(e,t){return{per_page:aQ,page:t,context:"edit",orderby:"date",order:"desc",_fields:[...new Set(["id","date","modified","author","slug","meta","title.raw","excerpt.raw","content.raw",e])].join()}}var aQ=100;function yFe(){return aQ}var wFe=(0,bs.createRegistrySelector)(e=>(t,r)=>{if(!r)return null;let{type:o,id:n}=Tn(t);if(!o||!n)return null;let s=e(vs.store).getEntityConfig("postType",o)?.revisionKey||"id";return e(vs.store).getRevisions("postType",o,n,Sv(s,r))});function _Fe(e){return e.revisionId!==null}function SFe(e){return e.showRevisionDiff}function z8(e){return e.revisionId}var xFe=(0,bs.createRegistrySelector)(e=>t=>{let r=z8(t);if(!r)return;let o=j8(t);if(!o)return null;let{type:n,id:i}=Tn(t),l=e(vs.store).getEntityConfig("postType",n)?.revisionKey||"id",c=e(vs.store).getRevisions("postType",n,i,Sv(l,o));return c?c.find(u=>u[l]===r)??null:null});function CFe(e){return e.selectedNote?.noteId}function TFe(e){return!!e.selectedNote?.options?.focus}var EFe=(0,bs.createRegistrySelector)(e=>t=>{let r=z8(t);if(!r)return;let o=j8(t);if(!o)return null;let{type:n,id:i}=Tn(t),l=e(vs.store).getEntityConfig("postType",n)?.revisionKey||"id",c=Sv(l,o),u=e(vs.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=A8(t),m=Math.ceil(f/c.per_page)||1;return d===u.length-1&&o<m?e(vs.store).getRevisions("postType",n,i,Sv(l,o+1))?.[0]??null:null}),PFe=(0,bs.createRegistrySelector)(e=>t=>{if(!K(e(vs.store)).isCollaborationSupported())return!1;let r=na(t),o=ia(t),i=e(vs.store).getEntityConfig("postType",r)?.syncConfig;return!!(i&&i.supportsPersistence&&window._wpCollaborationEnabled&&i.shouldSync?.(`postType/${r}`,o)!==!1)});var y3=a(ae(),1),w_e=a(jn(),1);var yQ=a(j(),1);var ys=a(G(),1);var B2=a(Te(),1),pQ=a(Y(),1),E0=a(U(),1),mQ=a(It(),1),hQ=a(vo(),1),xv=a(j(),1);var fQ=a(vo(),1);var F2=a(Lt(),1),cQ=a(j(),1);function uQ(e){return e.type==="wp_template"}function dQ(e){return e.type==="wp_template_part"}function Ef(e){return e.type==="wp_template"||e.type==="wp_template_part"}function ft(e,t=(0,cQ.__)("(no title)")){let r="";return typeof e.title=="string"?r=(0,F2.decodeEntities)(e.title):e.title&&"rendered"in e.title?r=(0,F2.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title&&(r=(0,F2.decodeEntities)(e.title.raw)),r||t}function D2(e){return e?[e.source,e.source].includes("custom")&&!(e.type==="wp_template"&&e?.plugin)&&!e.has_theme_file:!1}var L2=e=>typeof e!="object"?"":e.slug||(0,fQ.cleanForSlug)(ft(e))||e.id.toString();var Hn=a(E(),1),gQ=({field:e,onChange:t,data:r})=>{let{id:o}=e,n=e.getValue({item:r})||L2(r),i=r.permalink_template||"",s=/%(?:postname|pagename)%/,[l,c]=i.split(s),u=l,d=c,f=s.test(i),m=(0,E0.useRef)(n),h=n||m.current,g=f?`${u}${h}${d}`:(0,hQ.safeDecodeURIComponent)(r.link||"");(0,E0.useEffect)(()=>{n&&m.current===void 0&&(m.current=n)},[n]);let v=(0,E0.useCallback)(w=>t({[o]:w}),[o,t]),{createNotice:b}=(0,pQ.useDispatch)(mQ.store),_=(0,B2.useCopyToClipboard)(g,()=>{b("info",(0,xv.__)("Copied Permalink to clipboard."),{isDismissible:!0,type:"snackbar"})}),y="editor-post-url__slug-description-"+(0,B2.useInstanceId)(gQ);return(0,Hn.jsxs)("fieldset",{className:"fields-controls__slug",children:[f&&(0,Hn.jsxs)(ys.__experimentalVStack,{children:[(0,Hn.jsxs)(ys.__experimentalVStack,{spacing:"0px",children:[(0,Hn.jsx)("span",{children:(0,xv.__)("Customize the last part of the Permalink.")}),(0,Hn.jsx)(ys.ExternalLink,{href:"https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink",children:(0,xv.__)("Learn more")})]}),(0,Hn.jsx)(ys.__experimentalInputControl,{prefix:(0,Hn.jsx)(ys.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,Hn.jsx)(ys.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Hn.jsx)(ys.Button,{size:"small",icon:l1,ref:_,label:(0,xv.__)("Copy")})}),label:(0,xv.__)("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":y}),(0,Hn.jsxs)("div",{className:"fields-controls__slug-help",children:[(0,Hn.jsx)("span",{className:"fields-controls__slug-help-visual-label",children:(0,xv.__)("Permalink:")}),(0,Hn.jsxs)(ys.ExternalLink,{className:"fields-controls__slug-help-link",href:g,children:[(0,Hn.jsx)("span",{className:"fields-controls__slug-help-prefix",children:u}),(0,Hn.jsx)("span",{className:"fields-controls__slug-help-slug",children:h}),(0,Hn.jsx)("span",{className:"fields-controls__slug-help-suffix",children:d})]})]})]}),!f&&(0,Hn.jsx)(ys.ExternalLink,{className:"fields-controls__slug-help",href:g,children:g})]})},vQ=gQ;var V2=a(U(),1);var kFe=({item:e})=>{let t=L2(e),r=(0,V2.useRef)(t);return(0,V2.useEffect)(()=>{t&&r.current===void 0&&(r.current=t)},[t]),`${t||r.current}`},bQ=kFe;var RFe={id:"slug",type:"text",label:(0,yQ.__)("Slug"),Edit:vQ,render:bQ,filterBy:!1},U8=RFe;var W8=a(j(),1);function wQ(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=wQ(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function AFe(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=wQ(e))&&(o&&(o+=" "),o+=t);return o}var J=AFe;var _Q=a(G(),1),SQ=a(j(),1);var Y1=a(E(),1);function q1({item:e,className:t,children:r}){let o=ft(e);return(0,Y1.jsxs)(_Q.__experimentalHStack,{className:J("fields-field__title",t),alignment:"center",justify:"flex-start",children:[(0,Y1.jsx)("span",{children:o||(0,SQ.__)("(no title)")}),r]})}function j2({item:e}){return(0,Y1.jsx)(q1,{item:e})}var IFe={type:"text",id:"title",label:(0,W8.__)("Title"),placeholder:(0,W8.__)("No title"),getValue:({item:e})=>ft(e),render:j2,enableHiding:!0,enableGlobalSearch:!0,filterBy:!1},z2=IFe;var q8=a(j(),1);var G8=a(j(),1),CQ=a(Y(),1),TQ=a(ae(),1),EQ=a(G(),1);var xQ=a(xf(),1),{lock:zvt,unlock:cn}=(0,xQ.__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 Y8=a(E(),1),{Badge:OFe}=cn(EQ.privateApis);function PQ({item:e}){let{frontPageId:t,postsPageId:r}=(0,CQ.useSelect)(o=>{let{getEntityRecord:n}=o(TQ.store),i=n("root","site");return{frontPageId:i?.page_on_front,postsPageId:i?.page_for_posts}},[]);return(0,Y8.jsx)(q1,{item:e,className:"fields-field__page-title",children:[t,r].includes(e.id)&&(0,Y8.jsx)(OFe,{children:e.id===t?(0,G8.__)("Homepage"):(0,G8.__)("Posts Page")})})}var NFe={type:"text",id:"title",label:(0,q8.__)("Title"),placeholder:(0,q8.__)("No title"),getValue:({item:e})=>ft(e),render:PQ,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},K8=NFe;var Z8=a(j(),1);var MFe={id:"title",type:"text",label:(0,Z8.__)("Template"),placeholder:(0,Z8.__)("No title"),getValue:({item:e})=>ft(e),render:j2,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},K1=MFe;var Sj=a(j(),1);var aoe=a(j(),1);var loe=a(Nl(),1);var vte=a(U(),1);var Cv=a(_e(),1);function H2({controlled:e,default:t,name:r,state:o="value"}){let{current:n}=Cv.useRef(e!==void 0),[i,s]=Cv.useState(t),l=n?e:i,c=Cv.useCallback(u=>{n||s(u)},[]);return[l,c]}var FFe=a(_e(),1),Z1={...FFe};var IQ=a(_e(),1),AQ={};function un(e,t){let r=IQ.useRef(AQ);return r.current===AQ&&(r.current=e(t)),r}var X8=Z1.useInsertionEffect,DFe=X8&&X8!==Z1.useLayoutEffect?X8:e=>e();function De(e){let t=un(LFe).current;return t.next=e,DFe(t.effect),t.trampoline}function LFe(){let e={next:void 0,callback:BFe,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function BFe(){}var OQ=a(_e(),1),VFe=()=>{},Re=typeof document<"u"?OQ.useLayoutEffect:VFe;var Cm=a(_e(),1);var U2=a(_e(),1),Q8=U2.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function NQ(){return U2.useContext(Q8)}var MQ=a(E(),1);function W2(e){let{children:t,elementsRef:r,labelsRef:o,onMapChange:n}=e,i=De(n),s=Cm.useRef(0),l=un(zFe).current,c=un(jFe).current,[u,d]=Cm.useState(0),f=Cm.useRef(u),m=De((_,y)=>{c.set(_,y??null),f.current+=1,d(f.current)}),h=De(_=>{c.delete(_),f.current+=1,d(f.current)}),g=Cm.useMemo(()=>{let _=new Map;return Array.from(c.keys()).filter(w=>w.isConnected).sort(HFe).forEach((w,S)=>{let x=c.get(w)??{};_.set(w,{...x,index:S})}),_},[c,u]);Re(()=>{if(typeof MutationObserver!="function"||g.size===0)return;let _=new MutationObserver(y=>{let w=new Set,S=x=>w.has(x)?w.delete(x):w.add(x);y.forEach(x=>{x.removedNodes.forEach(S),x.addedNodes.forEach(S)}),w.size===0&&(f.current+=1,d(f.current))});return g.forEach((y,w)=>{w.parentElement&&_.observe(w.parentElement,{childList:!0})}),()=>{_.disconnect()}},[g]),Re(()=>{f.current===u&&(r.current.length!==g.size&&(r.current.length=g.size),o&&o.current.length!==g.size&&(o.current.length=g.size),s.current=g.size),i(g)},[i,g,r,o,u]),Re(()=>()=>{r.current=[]},[r]),Re(()=>()=>{o&&(o.current=[])},[o]);let v=De(_=>(l.add(_),()=>{l.delete(_)}));Re(()=>{l.forEach(_=>_(g))},[l,g]);let b=Cm.useMemo(()=>({register:m,unregister:h,subscribeMapChange:v,elementsRef:r,labelsRef:o,nextIndexRef:s}),[m,h,v,r,o,s]);return(0,MQ.jsx)(Q8.Provider,{value:b,children:t})}function jFe(){return new Map}function zFe(){return new Set}function HFe(e,t){let r=e.compareDocumentPosition(t);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0}var G2=a(_e(),1),UFe=G2.createContext(void 0);function Tm(){return G2.useContext(UFe)?.direction??"ltr"}function WFe(e,t){return function(o,...n){let i=new URL(e);return i.searchParams.set("code",o.toString()),n.forEach(s=>i.searchParams.append("args[]",s)),`${t} error #${o}; visit ${i} for the full message.`}}var GFe=WFe("https://base-ui.com/production-error","Base UI"),No=GFe;var Tv=a(_e(),1);function Pf(e,t,r,o){let n=un(DQ).current;return YFe(n,e,t,r,o)&&LQ(n,[e,t,r,o]),n.callback}function FQ(e){let t=un(DQ).current;return qFe(t,e)&&LQ(t,e),t.callback}function DQ(){return{callback:null,cleanup:null,refs:[]}}function YFe(e,t,r,o,n){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==o||e.refs[3]!==n}function qFe(e,t){return e.refs.length!==t.length||e.refs.some((r,o)=>r!==t[o])}function LQ(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 s=i(r);typeof s=="function"&&(o[n]=s);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 s=o[n];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}default:}}}}}}var VQ=a(_e(),1);var BQ=a(_e(),1),KFe=parseInt(BQ.version,10);function P0(e){return KFe>=e}function J8(e){if(!VQ.isValidElement(e))return null;let t=e,r=t.props;return(P0(19)?r?.ref:t.ref)??null}function X1(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Ec(){}var Q1=Object.freeze([]),no=Object.freeze({});function jQ(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 zQ(e,t){return typeof e=="function"?e(t):e}function Y2(e,t){return typeof e=="function"?e(t):e}var $8={};function gr(e,t,r,o,n){if(!r&&!o&&!n&&!e)return q2(t);let i=q2(e);return t&&(i=J1(i,t)),r&&(i=J1(i,r)),o&&(i=J1(i,o)),n&&(i=J1(i,n)),i}function HQ(e){if(e.length===0)return $8;if(e.length===1)return q2(e[0]);let t=q2(e[0]);for(let r=1;r<e.length;r+=1)t=J1(t,e[r]);return t}function q2(e){return e7(e)?{...WQ(e,$8)}:ZFe(e)}function J1(e,t){return e7(t)?WQ(t,e):XFe(e,t)}function ZFe(e){let t={...e};for(let r in t){let o=t[r];UQ(r,o)&&(t[r]=GQ(o))}return t}function XFe(e,t){if(!t)return e;for(let r in t){let o=t[r];switch(r){case"style":{e[r]=X1(e.style,o);break}case"className":{e[r]=t7(e.className,o);break}default:UQ(r,o)?e[r]=QFe(e[r],o):e[r]=o}}return e}function UQ(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 e7(e){return typeof e=="function"}function WQ(e,t){return e7(e)?e(t):e??$8}function QFe(e,t){return t?e?(...r)=>{let o=r[0];if(YQ(o)){let i=o;$1(i);let s=t(...r);return i.baseUIHandlerPrevented||e?.(...r),s}let n=t(...r);return e?.(...r),n}:GQ(t):e}function GQ(e){return e&&((...t)=>{let r=t[0];return YQ(r)&&$1(r),e(...t)})}function $1(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function t7(e,t){return t?e?t+" "+e:t:e}function YQ(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var r7=a(_e(),1);function $t(e,t,r={}){let o=t.render,n=JFe(t,r);if(r.enabled===!1)return null;let i=r.state??no;return tDe(e,o,n,i)}function JFe(e,t={}){let{className:r,style:o,render:n}=e,{state:i=no,ref:s,props:l,stateAttributesMapping:c,enabled:u=!0}=t,d=u?zQ(r,i):void 0,f=u?Y2(o,i):void 0,m=u?jQ(i,c):no,h=u&&l?$Fe(l):void 0,g=u?X1(m,h)??{}:no;return typeof document<"u"&&(u?Array.isArray(s)?g.ref=FQ([g.ref,J8(n),...s]):g.ref=Pf(g.ref,J8(n),s):Pf(null,null)),u?(d!==void 0&&(g.className=t7(g.className,d)),f!==void 0&&(g.style=X1(g.style,f)),g):no}function $Fe(e){return Array.isArray(e)?HQ(e):gr(void 0,e)}var eDe=Symbol.for("react.lazy");function tDe(e,t,r,o){if(t){if(typeof t=="function")return t(r,o);let n=gr(r,t.props);n.ref=r.ref;let i=t;return i?.$$typeof===eDe&&(i=Tv.Children.toArray(t)[0]),Tv.cloneElement(i,n)}if(e&&typeof e=="string")return rDe(e,r);throw new Error(No(8))}function rDe(e,t){return e==="button"?(0,r7.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,r7.createElement)("img",{alt:"",...t,key:t.key}):Tv.createElement(e,t)}var K2=a(_e(),1);var qQ=0;function oDe(e,t="mui"){let[r,o]=K2.useState(e),n=e||r;return K2.useEffect(()=>{r==null&&(qQ+=1,o(`${t}-${qQ}`))},[r,t]),n}var KQ=Z1.useId;function Em(e,t){if(KQ!==void 0){let r=KQ();return e??(t?`${t}-${r}`:r)}return oDe(e,t)}function Pm(e){return Em(e,"base-ui")}var Q2=a(_e(),1);var Ke={};Yr(Ke,{cancelOpen:()=>IDe,chipRemovePress:()=>pDe,clearPress:()=>fDe,closePress:()=>uDe,closeWatcher:()=>CDe,decrementPress:()=>gDe,disabled:()=>NDe,drag:()=>kDe,escapeKey:()=>xDe,focusOut:()=>SDe,imperativeAction:()=>DDe,incrementPress:()=>hDe,initial:()=>FDe,inputBlur:()=>yDe,inputChange:()=>vDe,inputClear:()=>bDe,inputPaste:()=>wDe,inputPress:()=>_De,itemPress:()=>cDe,keyboard:()=>EDe,linkPress:()=>dDe,listNavigation:()=>TDe,missing:()=>MDe,none:()=>nDe,outsidePress:()=>lDe,pointer:()=>PDe,scrub:()=>ADe,siblingOpen:()=>ODe,swipe:()=>LDe,trackPress:()=>mDe,triggerFocus:()=>aDe,triggerHover:()=>sDe,triggerPress:()=>iDe,wheel:()=>RDe,windowResize:()=>BDe});var nDe="none",iDe="trigger-press",sDe="trigger-hover",aDe="trigger-focus",lDe="outside-press",cDe="item-press",uDe="close-press",dDe="link-press",fDe="clear-press",pDe="chip-remove-press",mDe="track-press",hDe="increment-press",gDe="decrement-press",vDe="input-change",bDe="input-clear",yDe="input-blur",wDe="input-paste",_De="input-press",SDe="focus-out",xDe="escape-key",CDe="close-watcher",TDe="list-navigation",EDe="keyboard",PDe="pointer",kDe="drag",RDe="wheel",ADe="scrub",IDe="cancel-open",ODe="sibling-open",NDe="disabled",MDe="missing",FDe="initial",DDe="imperative-action",LDe="swipe",BDe="window-resize";function Ct(e,t,r,o){let n=!1,i=!1,s=o??no;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,...s}}var n7=a(_e(),1);var ZQ=a(_e(),1),VDe=[];function k0(e){ZQ.useEffect(e,VDe)}var Z2=null,qbt=globalThis.requestAnimationFrame,o7=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)}},X2=new o7,ws=class e{static create(){return new e}static request(t){return X2.request(t)}static cancel(t){return X2.cancel(t)}currentId=Z2;request(t){this.cancel(),this.currentId=X2.request(()=>{this.currentId=Z2,t()})}cancel=()=>{this.currentId!==Z2&&(X2.cancel(this.currentId),this.currentId=Z2)};disposeEffect=()=>this.cancel};function R0(){let e=un(ws.create).current;return k0(e.disposeEffect),e}function A0(e,t=!1,r=!1){let[o,n]=n7.useState(e&&t?"idle":void 0),[i,s]=n7.useState(e);return e&&!i&&(s(!0),n("starting")),!e&&i&&o!=="ending"&&!r&&n("ending"),!e&&!i&&o==="ending"&&n(void 0),Re(()=>{if(!e&&i&&o!=="ending"&&r){let l=ws.request(()=>{n("ending")});return()=>{ws.cancel(l)}}},[e,i,o,r]),Re(()=>{if(!e||t)return;let l=ws.request(()=>{n(void 0)});return()=>{ws.cancel(l)}},[t,e]),Re(()=>{if(!e||!t)return;e&&i&&o!=="idle"&&n("starting");let l=ws.request(()=>{n("idle")});return()=>{ws.cancel(l)}},[t,e,i,o]),{mounted:i,setMounted:s,transitionStatus:o}}function XQ(e){let{open:t,defaultOpen:r,onOpenChange:o,disabled:n}=e,[i,s]=H2({controlled:t,default:r,name:"Collapsible",state:"open"}),{mounted:l,setMounted:c,transitionStatus:u}=A0(i,!0,!0),d=Pm(),[f,m]=Q2.useState(),h=f??d,g=De(v=>{let b=!i,_=Ct(Ke.triggerPress,v.nativeEvent);o(b,_),!_.isCanceled&&s(b)});return Q2.useMemo(()=>({disabled:n,handleTrigger:g,mounted:l,open:i,panelId:h,setMounted:c,setOpen:s,setPanelIdState:m,transitionStatus:u}),[n,g,l,i,h,c,s,m,u])}var J2=a(_e(),1),i7=J2.createContext(void 0);function $2(){let e=J2.useContext(i7);if(e===void 0)throw new Error(No(15));return e}var Ev=a(_e(),1);var jDe=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function eA(e={}){let{label:t,metadata:r,textRef:o,indexGuessBehavior:n,index:i}=e,{register:s,unregister:l,subscribeMapChange:c,elementsRef:u,labelsRef:d,nextIndexRef:f}=NQ(),m=Ev.useRef(-1),[h,g]=Ev.useState(i??(n===jDe.GuessFromOrder?()=>{if(m.current===-1){let _=f.current;f.current+=1,m.current=_}return m.current}:-1)),v=Ev.useRef(null),b=Ev.useCallback(_=>{if(v.current=_,h!==-1&&_!==null&&(u.current[h]=_,d)){let y=t!==void 0;d.current[h]=y?t:o?.current?.textContent??_.textContent}},[h,u,d,t,o]);return Re(()=>{if(i!=null)return;let _=v.current;if(_)return s(_,r),()=>{l(_)}},[i,s,l,r]),Re(()=>{if(i==null)return c(_=>{let y=v.current?_.get(v.current)?.index:null;y!=null&&g(y)})},[i,c,g]),{ref:b,index:h}}var Xa=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({}),zDe={[Xa.startingStyle]:""},HDe={[Xa.endingStyle]:""},km={transitionStatus(e){return e==="starting"?zDe:e==="ending"?HDe:null}};var eC=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Xa.startingStyle]="startingStyle",e[e.endingStyle=Xa.endingStyle]="endingStyle",e})({});var QQ=(function(e){return e.panelOpen="data-panel-open",e})({});var UDe={[eC.open]:""},WDe={[eC.closed]:""},JQ={open(e){return e?{[QQ.panelOpen]:""}:null}},$Q={open(e){return e?UDe:WDe}};var N0=a(_e(),1);function tA(){return typeof window<"u"}function kv(e){return rA(e)?(e.nodeName||"").toLowerCase():"#document"}function qr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kc(e){var t;return(t=(rA(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function rA(e){return tA()?e instanceof Node||e instanceof qr(e).Node:!1}function lt(e){return tA()?e instanceof Element||e instanceof qr(e).Element:!1}function wo(e){return tA()?e instanceof HTMLElement||e instanceof qr(e).HTMLElement:!1}function I0(e){return!tA()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qr(e).ShadowRoot}function O0(e){let{overflow:t,overflowX:r,overflowY:o,display:n}=Un(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&n!=="inline"&&n!=="contents"}function eJ(e){return/^(table|td|th)$/.test(kv(e))}function tC(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var GDe=/transform|translate|scale|rotate|perspective|filter/,YDe=/paint|layout|strict|content/,Pv=e=>!!e&&e!=="none",s7;function oA(e){let t=lt(e)?Un(e):e;return Pv(t.transform)||Pv(t.translate)||Pv(t.scale)||Pv(t.rotate)||Pv(t.perspective)||!nA()&&(Pv(t.backdropFilter)||Pv(t.filter))||GDe.test(t.willChange||"")||YDe.test(t.contain||"")}function tJ(e){let t=Pc(e);for(;wo(t)&&!Rc(t);){if(oA(t))return t;if(tC(t))return null;t=Pc(t)}return null}function nA(){return s7==null&&(s7=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),s7}function Rc(e){return/^(html|body|#document)$/.test(kv(e))}function Un(e){return qr(e).getComputedStyle(e)}function rC(e){return lt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pc(e){if(kv(e)==="html")return e;let t=e.assignedSlot||e.parentNode||I0(e)&&e.host||kc(e);return I0(t)?t.host:t}function rJ(e){let t=Pc(e);return Rc(t)?e.ownerDocument?e.ownerDocument.body:e.body:wo(t)&&O0(t)?t:rJ(t)}function Rm(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=rJ(e),i=n===((o=e.ownerDocument)==null?void 0:o.body),s=qr(n);if(i){let l=iA(s);return t.concat(s,s.visualViewport||[],O0(n)?n:[],l&&r?Rm(l):[])}else return t.concat(n,Rm(n,[],r))}function iA(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var sA=a(_e(),1),a7=sA.createContext(void 0);function aA(e=!1){let t=sA.useContext(a7);if(t===void 0&&!e)throw new Error(No(16));return t}var oJ=a(_e(),1);function nJ(e){let{focusableWhenDisabled:t,disabled:r,composite:o=!1,tabIndex:n=0,isNativeButton:i}=e,s=o&&t!==!1,l=o&&t===!1;return{props:oJ.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||s)||!i&&r)&&(u["aria-disabled"]=r),i&&(!t||l)&&(u.disabled=r),u},[o,r,t,s,l,i,n])}}function Rv(e={}){let{disabled:t=!1,focusableWhenDisabled:r,tabIndex:o=0,native:n=!0,composite:i}=e,s=N0.useRef(null),l=aA(!0),c=i??l!==void 0,{props:u}=nJ({focusableWhenDisabled:r,disabled:t,composite:c,tabIndex:o,isNativeButton:n}),d=N0.useCallback(()=>{let h=s.current;l7(h)&&c&&t&&u.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,u.disabled,c]);Re(d,[d]);let f=N0.useCallback((h={})=>{let{onClick:g,onMouseDown:v,onKeyUp:b,onKeyDown:_,onPointerDown:y,...w}=h;return gr({onClick(S){if(t){S.preventDefault();return}g?.(S)},onMouseDown(S){t||v?.(S)},onKeyDown(S){if(t||($1(S),_?.(S),S.baseUIHandlerPrevented))return;let x=S.target===S.currentTarget,C=S.currentTarget,A=l7(C),k=!n&&qDe(C),R=x&&(n?A:!k),M=S.key==="Enter",P=S.key===" ",T=C.getAttribute("role"),N=T?.startsWith("menuitem")||T==="option"||T==="gridcell";if(x&&c&&P){if(S.defaultPrevented&&N)return;S.preventDefault(),k||n&&A?(C.click(),S.preventBaseUIHandler()):R&&(g?.(S),S.preventBaseUIHandler());return}R&&(!n&&(P||M)&&S.preventDefault(),!n&&M&&g?.(S))},onKeyUp(S){if(!t){if($1(S),b?.(S),S.target===S.currentTarget&&n&&c&&l7(S.currentTarget)&&S.key===" "){S.preventDefault();return}S.baseUIHandlerPrevented||S.target===S.currentTarget&&!n&&!c&&S.key===" "&&g?.(S)}},onPointerDown(S){if(t){S.preventDefault();return}y?.(S)}},n?{type:"button"}:{role:"button"},u,w)},[t,u,c,n]),m=De(h=>{s.current=h,d()});return{getButtonProps:f,buttonRef:m}}function l7(e){return wo(e)&&e.tagName==="BUTTON"}function qDe(e){return!!(e?.tagName==="A"&&e?.href)}var _s=a(_e(),1);function er(e,t,r,o){return e.addEventListener(t,r,o),()=>{e.removeEventListener(t,r,o)}}function Li(e){let t=un(KDe,e).current;return t.next=e,Re(t.effect),t}function KDe(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function Ko(e){return e?.ownerDocument||document}var lJ=a(_e(),1);var aJ=a(Vu(),1);function sJ(e){return e==null?e:"current"in e?e.current:e}function Am(e,t=!1,r=!0){let o=R0();return De((n,i=null)=>{o.cancel();let s=sJ(e);if(s==null)return;let l=s,c=()=>{aJ.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=Xa.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)})}function Im(e){let{enabled:t=!0,open:r,ref:o,onComplete:n}=e,i=De(n),s=Am(o,r,!1);lJ.useEffect(()=>{if(!t)return;let l=new AbortController;return s(i,l.signal),()=>{l.abort()}},[t,r,i,s])}var oC={height:void 0,width:void 0};function uJ(e){let{externalRef:t,hiddenUntilFound:r,id:o,keepMounted:n,mounted:i,onOpenChange:s,open:l,setMounted:c,setOpen:u,transitionStatus:d}=e,f=_s.useRef(null),m=_s.useRef(null),[h,g]=_s.useState(oC),v=_s.useRef(oC),b=_s.useRef(!1),_=_s.useRef(l),y=_s.useRef(!1),[w,S]=_s.useState(!1),x=_s.useRef(null),C=Pf(t,f),A=Li({mounted:i,open:l}),k=Am(f,!1,!1),R=!l&&!i,M=w?"idle":d,P=l&&(_.current||y.current),T=!l&&i&&m.current==="css-animation"&&h.height===void 0&&h.width===void 0?v.current:h,N=r&&R&&m.current!=="css-animation",L=De((O,V=!0)=>{V&&(v.current=O),g(O)}),F=De(()=>{x.current?.(),x.current=null}),D=De(O=>{F(),x.current=()=>{x.current=null,O()}}),z=De(()=>{l&&i&&m.current==="css-animation"&&(y.current=!0)});Re(()=>{!w||d==="starting"||S(!1)},[w,d]),_s.useEffect(()=>()=>{z(),F()},[z,F]),Re(()=>{let O=f.current;if(!O)return;!l&&x.current&&F();let V=ZDe(O,P);if(m.current=V,l&&d==="idle"&&_.current&&V==="css-animation"){v.current=M0(O);return}if(l&&d==="starting"){let Z=b.current;if(b.current=!1,V==="none"){L(M0(O)),S(!0);return}if(V==="css-transition"){let Q=XDe(O);if(L(M0(O)),!Z)return Q;let ce=nC(O,"transition-duration","0s");return D(ce),S(!0),Q}if(V==="css-animation"){if(L(M0(O)),!Z){nC(O,"animation-name","none")();return}let Q=nC(O,"animation-name","none"),ce=nC(O,"animation-duration","0s");Q(),D(ce),S(!0);return}}if(!l&&i&&(d==="idle"||d==="starting")){if(_.current=!1,y.current=!1,V==="none"){L(oC,!1),c(!1);return}L(M0(O));return}if(d!=="ending")return;if(V==="none"){c(!1);return}let W=M0(O);if(!((W.height??0)>0||(W.width??0)>0)){c(!1);return}L(W),V==="css-animation"&&nC(O,"animation-name","none")()},[i,l,F,L,c,D,P,d]),Im({enabled:l&&i&&M==="idle",open:!0,ref:f,onComplete(){l&&L(oC,!1)}}),_s.useEffect(()=>{if(l||!i||M!=="ending"||!f.current)return;let V=new AbortController,W=-1;function q(){A.current.open||(c(!1),L(oC,!1))}return W=ws.request(()=>{V.signal.aborted||k(q,V.signal)}),()=>{ws.cancel(W),V.abort()}},[A,i,l,M,k,L,c]),Re(()=>{let O=f.current;!O||!r||!R||O.setAttribute("hidden","until-found")},[R,r]),_s.useEffect(function(){let V=f.current;if(!V)return;function W(q){let Z=Ct(Ke.none,q);s(!0,Z),!Z.isCanceled&&(b.current=!0,u(!0))}return er(V,"beforematch",W)},[s,u]);let B=n||r||i||l;return{height:T.height,props:{...N?{[eC.startingStyle]:""}:void 0,hidden:R,id:o},ref:C,shouldPreventOpenAnimation:P,shouldRender:B,transitionStatus:M,width:T.width}}function M0(e){return{height:e.scrollHeight,width:e.scrollWidth}}function ZDe(e,t=!1){let r=qr(e).getComputedStyle(e),o=(r.animationName.split(",").map(i=>i.trim()).some(i=>i!==""&&i!=="none")||t)&&cJ(r.animationDuration),n=cJ(r.transitionDuration);return o&&n||n?"css-transition":o?"css-animation":"none"}function cJ(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function nC(e,t,r){let o=e.style.getPropertyValue(t),n=e.style.getPropertyPriority(t);return e.style.setProperty(t,r),()=>{if(o===""){e.style.removeProperty(t);return}e.style.setProperty(t,o,n)}}function XDe(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(n=>{e.style.setProperty(n,"initial","important")});function r(){Object.entries(t).forEach(([n,i])=>{if(i===""){e.style.removeProperty(n);return}e.style.setProperty(n,i)})}let o=ws.request(r);return()=>{ws.cancel(o),r()}}var dJ=a(_e(),1);function fJ(e){let t=dJ.useRef(!0);t.current&&(t.current=!1,e())}var kf={};Yr(kf,{engine:()=>p7,env:()=>h7,os:()=>d7,screenReader:()=>m7});var d7={};Yr(d7,{android:()=>hJ,apple:()=>u7,ios:()=>c7,linux:()=>tLe,mac:()=>gJ,windows:()=>eLe});function QDe(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:JDe,platform:$De,maxTouchPoints:pJ}=QDe(),Av=JDe.toLowerCase(),Iv=$De.toLowerCase();var c7=/^i(os$|p)/.test(Iv)||Iv==="macintel"&&pJ>1,mJ="android",hJ=Iv===mJ||Av.includes(mJ),gJ=!c7&&Iv.startsWith("mac"),eLe=Iv.startsWith("win"),tLe=!hJ&&/^(linux|chrome os)/.test(Iv),u7=gJ||c7;var p7={};Yr(p7,{blink:()=>oLe,gecko:()=>rLe,webkit:()=>f7});var f7=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none"),rLe=!f7&&Av.includes("firefox"),oLe=!f7&&Av.includes("chrom");var m7={};Yr(m7,{voiceOver:()=>nLe});var nLe=u7;var h7={};Yr(h7,{jsdom:()=>iLe});var iLe=/jsdom|happydom/.test(Av);var iC=0,Qa=class e{static create(){return new e}currentId=iC;start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=iC,r()},t)}isStarted(){return this.currentId!==iC}clear=()=>{this.currentId!==iC&&(clearTimeout(this.currentId),this.currentId=iC)};disposeEffect=()=>this.clear};function Ac(){let e=un(Qa.create).current;return k0(e.disposeEffect),e}var Bi=a(_e(),1);function vJ(e){return"nativeEvent"in e}function Rf(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function bJ(e){let t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}var g7="data-base-ui-focusable";var v7="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function F0(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function or(e,t){if(!e||!t)return!1;let r=t.getRootNode?.();if(e.contains(t))return!0;if(r&&I0(r)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Wn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Om(e,t){if(!lt(e))return!1;let r=e;if(t.hasElement(r))return!r.hasAttribute("data-trigger-disabled");for(let[,o]of t.entries())if(or(o,r))return!o.hasAttribute("data-trigger-disabled");return!1}function lA(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let r=e;return r.target!=null&&t.contains(r.target)}function yJ(e){return e.matches("html,body")}function wJ(e){return wo(e)&&e.matches(v7)}function b7(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${v7}`)!=null}function _J(e){if(!e||kf.env.jsdom)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function sLe(e,t){return t!=null&&!Rf(t)?0:typeof e=="function"?e():e}function Af(e,t,r){let o=sLe(e,r);return typeof o=="number"?o:o?.[t]}function y7(e){return typeof e=="function"?e():e}function cA(e,t){return t||e==="click"||e==="mousedown"}function SJ(e){return e?.includes("mouse")&&e!=="mousedown"}var xJ=a(E(),1),CJ=Bi.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Qa,currentIdRef:{current:null},currentContextRef:{current:null}});function aLe(e,t){e.current=t.current}function w7(e){let{children:t,delay:r,timeoutMs:o=0}=e,n=Bi.useRef(r),i=Bi.useRef(r),s=Bi.useRef(null),l=Bi.useRef(null),c=Ac();return Re(()=>{if(i.current=r,!s.current){n.current=r;return}n.current={open:Af(n.current,"open"),close:Af(r,"close")}},[r,s,n,i]),(0,xJ.jsx)(CJ.Provider,{value:Bi.useMemo(()=>({hasProvider:!0,delayRef:n,initialDelayRef:i,currentIdRef:s,timeoutMs:o,currentContextRef:l,timeout:c}),[o,c]),children:t})}function _7(e,t={open:!1}){let{open:r}=t,o="rootStore"in e?e.rootStore:e,n=o.useState("floatingId"),i=Bi.useContext(CJ),{currentIdRef:s,delayRef:l,timeoutMs:c,initialDelayRef:u,currentContextRef:d,hasProvider:f,timeout:m}=i,[h,g]=Bi.useState(!1),v=Bi.useRef(r),b=Bi.useRef(!1);return Re(()=>{v.current=r},[r]),Re(()=>()=>{b.current=!0},[]),Re(()=>{function _(){b.current||g(!1),d.current?.setIsInstantPhase(!1),s.current=null,d.current=null,l.current=u.current,m.clear()}if(s.current&&!r&&s.current===n){if(g(!1),c){let y=n;return m.start(c,()=>{o.select("open")||s.current&&s.current!==y||_()}),()=>{(v.current||s.current!==y)&&m.clear()}}_()}},[r,n,s,l,c,u,d,m,o]),Re(()=>{if(!r)return;let _=d.current,y=s.current;m.clear(),d.current={onOpenChange:o.setOpen,setIsInstantPhase:g},s.current=n,l.current={open:0,close:Af(u.current,"close")},y!==null&&y!==n?(g(!0),_?.setIsInstantPhase(!0),_?.onOpenChange(!1,Ct(Ke.none))):(g(!1),_?.setIsInstantPhase(!1))},[r,n,o,s,l,u,d,m]),Re(()=>()=>{if(s.current===n){if(d.current=null,!v.current)return;s.current=null,aLe(l,u),m.clear()}},[d,s,l,n,u,m]),Bi.useMemo(()=>({hasProvider:f,delayRef:l,isInstantPhase:h}),[f,l,h])}function Ic(...e){return()=>{for(let t=0;t<e.length;t+=1){let r=e[t];r&&r()}}}var PJ=["top","right","bottom","left"];var Nm=Math.min,Ss=Math.max,Mm=Math.round,aC=Math.floor,Oc=e=>({x:e,y:e}),lLe={left:"right",right:"left",bottom:"top",top:"bottom"};function lC(e,t,r){return Ss(e,Nm(t,r))}function Nc(e,t){return typeof e=="function"?e(t):e}function pi(e){return e.split("-")[0]}function Mc(e){return e.split("-")[1]}function dA(e){return e==="x"?"y":"x"}function cC(e){return e==="y"?"height":"width"}function sa(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function uC(e){return dA(sa(e))}function kJ(e,t,r){r===void 0&&(r=!1);let o=Mc(e),n=uC(e),i=cC(n),s=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=sC(s)),[s,sC(s)]}function RJ(e){let t=sC(e);return[uA(e),t,uA(t)]}function uA(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var TJ=["left","right"],EJ=["right","left"],cLe=["top","bottom"],uLe=["bottom","top"];function dLe(e,t,r){switch(e){case"top":case"bottom":return r?t?EJ:TJ:t?TJ:EJ;case"left":case"right":return t?cLe:uLe;default:return[]}}function AJ(e,t,r,o){let n=Mc(e),i=dLe(pi(e),r==="start",o);return n&&(i=i.map(s=>s+"-"+n),t&&(i=i.concat(i.map(uA)))),i}function sC(e){let t=pi(e);return lLe[t]+e.slice(t.length)}function fLe(e){return{top:0,right:0,bottom:0,left:0,...e}}function fA(e){return typeof e!="number"?fLe(e):{top:e,right:e,bottom:e,left:e}}function Ov(e){let{x:t,y:r,width:o,height:n}=e;return{width:o,height:n,top:r,left:t,right:t+o,bottom:r+n,x:t,y:r}}function dC(e,t){return t<0||t>=e.length}function S7(e,t){return Nv(e.current,{disabledIndices:t})}function x7(e,t){return Nv(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Nv(e,{startingIndex:t=-1,decrement:r=!1,disabledIndices:o,amount:n=1}={}){let i=t;do i+=r?-n:n;while(i>=0&&i<=e.length-1&&fC(e,i,o));return i}function fC(e,t,r){if(typeof r=="function"?r(t):r?.includes(t)??!1)return!0;let n=e[t];return n?mLe(n)?!r&&(n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"):!0:!1}function pLe(e){return e.visibility==="hidden"||e.visibility==="collapse"}function mLe(e,t=e?Un(e):null){return!e||!e.isConnected||!t||pLe(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}function If(e,t,r=!0){return e.filter(n=>n.parentId===t).flatMap(n=>[...!r||n.context?.open?[n]:[],...If(e,n.id,r)])}function D0(e){return`data-base-ui-${e}`}var Ja=a(_e(),1),NJ=a(Vu(),1);var IJ={style:{transition:"none"}};var hLe="data-base-ui-swipe-ignore",gLe="data-swipe-ignore",V0t=`[${hLe}]`,j0t=`[${gLe}]`;var OJ={fallbackAxisSide:"end"};var MJ=a(E(),1),vLe=Ja.createContext(null),bLe=()=>Ja.useContext(vLe),yLe=D0("portal");function C7(e={}){let{ref:t,container:r,componentProps:o=no,elementProps:n}=e,i=Em(),l=bLe()?.portalNode,[c,u]=Ja.useState(null),[d,f]=Ja.useState(null),m=De(b=>{b!==null&&f(b)}),h=Ja.useRef(null);Re(()=>{if(r===null){h.current&&(h.current=null,f(null),u(null));return}if(i==null)return;let b=(r&&(rA(r)?r:r.current))??l??document.body;if(b==null){h.current&&(h.current=null,f(null),u(null));return}h.current!==b&&(h.current=b,f(null),u(b))},[r,l,i]);let g=$t("div",o,{ref:[t,m],props:[{id:i,[yLe]:""},n]});return{portalNode:d,portalSubtree:c&&g?NJ.createPortal(g,c):null}}var Mv=a(_e(),1);function FJ(){let e=new Map;return{emit(t,r){e.get(t)?.forEach(o=>o(r))},on(t,r){e.has(t)||e.set(t,new Set),e.get(t).add(r)},off(t,r){e.get(t)?.delete(r)}}}var wLe=a(E(),1),_Le=Mv.createContext(null),SLe=Mv.createContext(null),L0=()=>Mv.useContext(_Le)?.id||null,Fm=e=>{let t=Mv.useContext(SLe);return e??t};var aa=a(_e(),1);function xLe(e,t){let r=null,o=null,n=!1;return{contextElement:e||void 0,getBoundingClientRect(){let i=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch",u=i.width,d=i.height,f=i.x,m=i.y;return r==null&&t.x&&s&&(r=i.x-t.x),o==null&&t.y&&l&&(o=i.y-t.y),f-=r||0,m-=o||0,u=0,d=0,!n||c?(u=t.axis==="y"?i.width:0,d=t.axis==="x"?i.height:0,f=s&&t.x!=null?t.x:f,m=l&&t.y!=null?t.y:m):n&&!c&&(d=t.axis==="x"?i.height:d,u=t.axis==="y"?i.width:u),n=!0,{width:u,height:d,x:f,y:m,top:m,right:f+u,bottom:m+d,left:f}}}}function DJ(e){return e!=null&&e.clientX!=null}function T7(e,t={}){let{enabled:r=!0,axis:o="both"}=t,n="rootStore"in e?e.rootStore:e,i=n.useState("open"),s=n.useState("floatingElement"),l=n.useState("domReferenceElement"),c=n.context.dataRef,u=aa.useRef(!1),d=aa.useRef(null),[f,m]=aa.useState(),[h,g]=aa.useState([]),v=De(S=>{n.set("positionReference",S)}),b=De((S,x,C)=>{u.current||c.current.openEvent&&!DJ(c.current.openEvent)||n.set("positionReference",xLe(C??l,{x:S,y:x,axis:o,dataRef:c,pointerType:f}))}),_=De(S=>{i?d.current||(b(S.clientX,S.clientY,S.currentTarget),g([])):b(S.clientX,S.clientY,S.currentTarget)}),y=Rf(f)?s:i;aa.useEffect(()=>{if(!r){v(l);return}if(!y)return;function S(){d.current?.(),d.current=null}let x=qr(s);function C(A){let k=Wn(A);or(s,k)?S():b(A.clientX,A.clientY)}return!c.current.openEvent||DJ(c.current.openEvent)?d.current=er(x,"mousemove",C):v(l),S},[y,r,s,c,l,n,b,v,h]),aa.useEffect(()=>()=>{n.set("positionReference",null)},[n]),aa.useEffect(()=>{r&&!s&&(u.current=!1)},[r,s]),aa.useEffect(()=>{!r&&i&&(u.current=!0)},[r,i]);let w=aa.useMemo(()=>{function S(x){m(x.pointerType)}return{onPointerDown:S,onPointerEnter:S,onMouseMove:_,onMouseEnter:_}},[_]);return aa.useMemo(()=>r?{reference:w,trigger:w}:{},[r,w])}var la=a(_e(),1);function CLe(){return!1}function TLe(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function E7(e,t={}){let{enabled:r=!0,escapeKey:o=!0,outsidePress:n=!0,outsidePressEvent:i="sloppy",referencePress:s=CLe,bubbles:l,externalTree:c}=t,u="rootStore"in e?e.rootStore:e,d=u.useState("open"),f=u.useState("floatingElement"),{dataRef:m}=u.context,h=Fm(c),g=De(typeof n=="function"?n:()=>!1),v=typeof n=="function"?g:n,b=v!==!1,_=De(()=>i),{escapeKey:y,outsidePress:w}=TLe(l),S=la.useRef(!1),x=la.useRef(!1),C=la.useRef(!1),A=la.useRef(!1),k=la.useRef(""),R=la.useRef(null),M=Ac(),P=Ac(),T=De(()=>{P.clear(),m.current.insideReactTree=!1}),N=De(q=>{let Z=m.current.floatingContext?.nodeId;return(h?If(h.nodesRef.current,Z):[]).some(ce=>ce.context?.open&&!ce.context.dataRef.current[q])}),L=De(q=>lA(q,u.select("floatingElement"))||lA(q,u.select("domReferenceElement"))),F=De(q=>{s()&&u.setOpen(!1,Ct(Ke.triggerPress,q.nativeEvent))}),D=De(q=>{if(!d||!r||!o||q.key!=="Escape"||A.current||!y&&N("__escapeKeyBubbles"))return;let Z=vJ(q)?q.nativeEvent:q,Q=Ct(Ke.escapeKey,Z);u.setOpen(!1,Q),Q.isCanceled||q.preventDefault(),!y&&!Q.isPropagationAllowed&&q.stopPropagation()}),z=De(()=>{m.current.insideReactTree=!0,P.start(0,T)}),B=De(q=>{if(!d||!r||q.button!==0)return;let Z=Wn(q.nativeEvent);or(u.select("floatingElement"),Z)&&(S.current||(S.current=!0,x.current=!1))}),O=De(q=>{!d||!r||(q.defaultPrevented||q.nativeEvent.defaultPrevented)&&S.current&&(x.current=!0)});la.useEffect(()=>{if(!d||!r)return;m.current.__escapeKeyBubbles=y,m.current.__outsidePressBubbles=w;let q=new Qa,Z=new Qa;function Q(){q.clear(),A.current=!0}function ce(){q.start(kf.engine.webkit?5:0,()=>{A.current=!1})}function re(){C.current=!0,Z.start(0,()=>{C.current=!1})}function fe(){S.current=!1,x.current=!1}function pe(){let X=k.current,ge=X==="pen"||!X?"mouse":X,Ue=_(),Ye=typeof Ue=="function"?Ue():Ue;return typeof Ye=="string"?Ye:Ye[ge]}function $(X){let ge=pe();return ge==="intentional"&&X.type!=="click"||ge==="sloppy"&&X.type==="click"}function te(X){let ge=m.current.floatingContext?.nodeId,Ue=h&&If(h.nodesRef.current,ge).some(Ye=>lA(X,Ye.context?.elements.floating));return L(X)||Ue}function de(X){if($(X)){X.type!=="click"&&!L(X)&&(Z.clear(),C.current=!1),T();return}if(m.current.insideReactTree){T();return}let ge=Wn(X),Ue=`[${D0("inert")}]`,Ye=lt(ge)?ge.getRootNode():null,st=Array.from((I0(Ye)?Ye:Ko(u.select("floatingElement"))).querySelectorAll(Ue)),St=u.context.triggerElements;if(ge&&(St.hasElement(ge)||St.hasMatchingElement(xt=>or(xt,ge))))return;let dt=lt(ge)?ge:null;for(;dt&&!Rc(dt);){let xt=Pc(dt);if(Rc(xt)||!lt(xt))break;dt=xt}if(!(st.length&&lt(ge)&&!yJ(ge)&&!or(ge,u.select("floatingElement"))&&st.every(xt=>!or(dt,xt)))){if(wo(ge)&&!("touches"in X)){let xt=Rc(ge),Xt=Un(ge),Xe=/auto|scroll/,fs=xt||Xe.test(Xt.overflowX),Ga=xt||Xe.test(Xt.overflowY),kr=fs&&ge.clientWidth>0&&ge.scrollWidth>ge.clientWidth,Oi=Ga&&ge.clientHeight>0&&ge.scrollHeight>ge.clientHeight,an=Xt.direction==="rtl",vt=Oi&&(an?X.offsetX<=ge.offsetWidth-ge.clientWidth:X.offsetX>ge.clientWidth),Ft=kr&&X.offsetY>ge.clientHeight;if(vt||Ft)return}if(!te(X)){if(pe()==="intentional"&&C.current){Z.clear(),C.current=!1;return}typeof v=="function"&&!v(X)||N("__outsidePressBubbles")||(u.setOpen(!1,Ct(Ke.outsidePress,X)),T())}}}function ve(X){pe()!=="sloppy"||X.pointerType==="touch"||!u.select("open")||!r||L(X)||de(X)}function we(X){if(pe()!=="sloppy"||!u.select("open")||!r||L(X))return;let ge=X.touches[0];ge&&(R.current={startTime:Date.now(),startX:ge.clientX,startY:ge.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},M.start(1e3,()=>{R.current&&(R.current.dismissOnTouchEnd=!1,R.current.dismissOnMouseDown=!1)}))}function oe(X,ge){let Ue=Wn(X);if(!Ue)return;let Ye=er(Ue,X.type,()=>{ge(X),Ye()})}function ee(X){k.current="touch",oe(X,we)}function ue(X){M.clear(),X.type==="pointerdown"&&(k.current=X.pointerType),!(X.type==="mousedown"&&R.current&&!R.current.dismissOnMouseDown)&&oe(X,ge=>{ge.type==="pointerdown"?ve(ge):de(ge)})}function ie(X){if(!S.current)return;let ge=x.current;if(fe(),pe()==="intentional"){if(X.type==="pointercancel"){ge&&re();return}if(!te(X)){if(ge){re();return}typeof v=="function"&&!v(X)||(Z.clear(),C.current=!0,T())}}}function le(X){if(pe()!=="sloppy"||!R.current||L(X))return;let ge=X.touches[0];if(!ge)return;let Ue=Math.abs(ge.clientX-R.current.startX),Ye=Math.abs(ge.clientY-R.current.startY),st=Math.sqrt(Ue*Ue+Ye*Ye);st>5&&(R.current.dismissOnTouchEnd=!0),st>10&&(de(X),M.clear(),R.current=null)}function Oe(X){oe(X,le)}function ke(X){pe()!=="sloppy"||!R.current||L(X)||(R.current.dismissOnTouchEnd&&de(X),M.clear(),R.current=null)}function Me(X){oe(X,ke)}let Ne=Ko(f),Fe=Ic(o&&Ic(er(Ne,"keydown",D),er(Ne,"compositionstart",Q),er(Ne,"compositionend",ce)),b&&Ic(er(Ne,"click",ue,!0),er(Ne,"pointerdown",ue,!0),er(Ne,"pointerup",ie,!0),er(Ne,"pointercancel",ie,!0),er(Ne,"mousedown",ue,!0),er(Ne,"mouseup",ie,!0),er(Ne,"touchstart",ee,!0),er(Ne,"touchmove",Oe,!0),er(Ne,"touchend",Me,!0)));return()=>{Fe(),q.clear(),Z.clear(),fe(),C.current=!1}},[m,f,o,b,v,d,r,y,w,D,T,_,N,L,h,u,M]),la.useEffect(T,[v,T]);let V=la.useMemo(()=>({onKeyDown:D,onPointerDown:F,onClick:F}),[D,F]),W=la.useMemo(()=>({onKeyDown:D,onPointerDown:O,onMouseDown:O,onClickCapture:z,onMouseDownCapture(q){z(),B(q)},onPointerDownCapture(q){z(),B(q)},onMouseUpCapture:z,onTouchEndCapture:z,onTouchMoveCapture:z}),[D,z,B,O]);return la.useMemo(()=>r?{reference:V,floating:W,trigger:V}:{},[r,V,W])}var Vi=a(_e(),1);function LJ(e,t,r){let{reference:o,floating:n}=e,i=sa(t),s=uC(t),l=cC(s),c=pi(t),u=i==="y",d=o.x+o.width/2-n.width/2,f=o.y+o.height/2-n.height/2,m=o[l]/2-n[l]/2,h;switch(c){case"top":h={x:d,y:o.y-n.height};break;case"bottom":h={x:d,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-n.width,y:f};break;default:h={x:o.x,y:o.y}}switch(Mc(t)){case"start":h[s]-=m*(r&&u?-1:1);break;case"end":h[s]+=m*(r&&u?-1:1);break}return h}async function jJ(e,t){var r;t===void 0&&(t={});let{x:o,y:n,platform:i,rects:s,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:h=0}=Nc(t,e),g=fA(h),b=l[m?f==="floating"?"reference":"floating":f],_=Ov(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),y=f==="floating"?{x:o,y:n,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),S=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},x=Ov(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:w,strategy:c}):y);return{top:(_.top-x.top+g.top)/S.y,bottom:(x.bottom-_.bottom+g.bottom)/S.y,left:(_.left-x.left+g.left)/S.x,right:(x.right-_.right+g.right)/S.x}}var ELe=50,zJ=async(e,t,r)=>{let{placement:o="bottom",strategy:n="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:jJ},c=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:f}=LJ(u,o,c),m=o,h=0,g={};for(let v=0;v<i.length;v++){let b=i[v];if(!b)continue;let{name:_,fn:y}=b,{x:w,y:S,data:x,reset:C}=await y({x:d,y:f,initialPlacement:o,placement:m,strategy:n,middlewareData:g,rects:u,platform:l,elements:{reference:e,floating:t}});d=w??d,f=S??f,g[_]={...g[_],...x},C&&h<ELe&&(h++,typeof C=="object"&&(C.placement&&(m=C.placement),C.rects&&(u=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):C.rects),{x:d,y:f}=LJ(u,m,c)),v=-1)}return{x:d,y:f,placement:m,strategy:n,middlewareData:g}};var HJ=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;let{placement:n,middlewareData:i,rects:s,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...b}=Nc(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};let _=pi(n),y=sa(l),w=pi(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),x=m||(w||!v?[sC(l)]:RJ(l)),C=g!=="none";!m&&C&&x.push(...AJ(l,v,g,S));let A=[l,...x],k=await c.detectOverflow(t,b),R=[],M=((o=i.flip)==null?void 0:o.overflows)||[];if(d&&R.push(k[_]),f){let L=kJ(n,s,S);R.push(k[L[0]],k[L[1]])}if(M=[...M,{placement:n,overflows:R}],!R.every(L=>L<=0)){var P,T;let L=(((P=i.flip)==null?void 0:P.index)||0)+1,F=A[L];if(F&&(!(f==="alignment"?y!==sa(F):!1)||M.every(B=>sa(B.placement)===y?B.overflows[0]>0:!0)))return{data:{index:L,overflows:M},reset:{placement:F}};let D=(T=M.filter(z=>z.overflows[0]<=0).sort((z,B)=>z.overflows[1]-B.overflows[1])[0])==null?void 0:T.placement;if(!D)switch(h){case"bestFit":{var N;let z=(N=M.filter(B=>{if(C){let O=sa(B.placement);return O===y||O==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(O=>O>0).reduce((O,V)=>O+V,0)]).sort((B,O)=>B[1]-O[1])[0])==null?void 0:N[0];z&&(D=z);break}case"initialPlacement":D=l;break}if(n!==D)return{reset:{placement:D}}}return{}}}};function BJ(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function VJ(e){return PJ.some(t=>e[t]>=0)}var UJ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r,platform:o}=t,{strategy:n="referenceHidden",...i}=Nc(e,t);switch(n){case"referenceHidden":{let s=await o.detectOverflow(t,{...i,elementContext:"reference"}),l=BJ(s,r.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:VJ(l)}}}case"escaped":{let s=await o.detectOverflow(t,{...i,altBoundary:!0}),l=BJ(s,r.floating);return{data:{escapedOffsets:l,escaped:VJ(l)}}}default:return{}}}}};var WJ=new Set(["left","top"]);async function PLe(e,t){let{placement:r,platform:o,elements:n}=e,i=await(o.isRTL==null?void 0:o.isRTL(n.floating)),s=pi(r),l=Mc(r),c=sa(r)==="y",u=WJ.has(s)?-1:1,d=i&&c?-1:1,f=Nc(t,e),{mainAxis:m,crossAxis:h,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof g=="number"&&(h=l==="end"?g*-1:g),c?{x:h*d,y:m*u}:{x:m*u,y:h*d}}var GJ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;let{x:n,y:i,placement:s,middlewareData:l}=t,c=await PLe(t,e);return s===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:n+c.x,y:i+c.y,data:{...c,placement:s}}}}},YJ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:o,placement:n,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:c={fn:_=>{let{x:y,y:w}=_;return{x:y,y:w}}},...u}=Nc(e,t),d={x:r,y:o},f=await i.detectOverflow(t,u),m=sa(pi(n)),h=dA(m),g=d[h],v=d[m];if(s){let _=h==="y"?"top":"left",y=h==="y"?"bottom":"right",w=g+f[_],S=g-f[y];g=lC(w,g,S)}if(l){let _=m==="y"?"top":"left",y=m==="y"?"bottom":"right",w=v+f[_],S=v-f[y];v=lC(w,v,S)}let b=c.fn({...t,[h]:g,[m]:v});return{...b,data:{x:b.x-r,y:b.y-o,enabled:{[h]:s,[m]:l}}}}}},qJ=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:o,placement:n,rects:i,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Nc(e,t),d={x:r,y:o},f=sa(n),m=dA(f),h=d[m],g=d[f],v=Nc(l,t),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){let w=m==="y"?"height":"width",S=i.reference[m]-i.floating[w]+b.mainAxis,x=i.reference[m]+i.reference[w]-b.mainAxis;h<S?h=S:h>x&&(h=x)}if(u){var _,y;let w=m==="y"?"width":"height",S=WJ.has(pi(n)),x=i.reference[f]-i.floating[w]+(S&&((_=s.offset)==null?void 0:_[f])||0)+(S?0:b.crossAxis),C=i.reference[f]+i.reference[w]+(S?0:((y=s.offset)==null?void 0:y[f])||0)-(S?b.crossAxis:0);g<x?g=x:g>C&&(g=C)}return{[m]:h,[f]:g}}}},KJ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,o;let{placement:n,rects:i,platform:s,elements:l}=t,{apply:c=()=>{},...u}=Nc(e,t),d=await s.detectOverflow(t,u),f=pi(n),m=Mc(n),h=sa(n)==="y",{width:g,height:v}=i.floating,b,_;f==="top"||f==="bottom"?(b=f,_=m===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(_=f,b=m==="end"?"top":"bottom");let y=v-d.top-d.bottom,w=g-d.left-d.right,S=Nm(v-d[b],y),x=Nm(g-d[_],w),C=!t.middlewareData.shift,A=S,k=x;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(k=w),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(A=y),C&&!m){let M=Ss(d.left,0),P=Ss(d.right,0),T=Ss(d.top,0),N=Ss(d.bottom,0);h?k=g-2*(M!==0||P!==0?M+P:Ss(d.left,d.right)):A=v-2*(T!==0||N!==0?T+N:Ss(d.top,d.bottom))}await c({...t,availableWidth:k,availableHeight:A});let R=await s.getDimensions(l.floating);return g!==R.width||v!==R.height?{reset:{rects:!0}}:{}}}};function JJ(e){let t=Un(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=wo(e),i=n?e.offsetWidth:r,s=n?e.offsetHeight:o,l=Mm(r)!==i||Mm(o)!==s;return l&&(r=i,o=s),{width:r,height:o,$:l}}function k7(e){return lt(e)?e:e.contextElement}function B0(e){let t=k7(e);if(!wo(t))return Oc(1);let r=t.getBoundingClientRect(),{width:o,height:n,$:i}=JJ(t),s=(i?Mm(r.width):r.width)/o,l=(i?Mm(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var kLe=Oc(0);function $J(e){let t=qr(e);return!nA()||!t.visualViewport?kLe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function RLe(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==qr(e)?!1:t}function Fv(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),i=k7(e),s=Oc(1);t&&(o?lt(o)&&(s=B0(o)):s=B0(e));let l=RLe(i,r,o)?$J(i):Oc(0),c=(n.left+l.x)/s.x,u=(n.top+l.y)/s.y,d=n.width/s.x,f=n.height/s.y;if(i){let m=qr(i),h=o&&lt(o)?qr(o):o,g=m,v=iA(g);for(;v&&o&&h!==g;){let b=B0(v),_=v.getBoundingClientRect(),y=Un(v),w=_.left+(v.clientLeft+parseFloat(y.paddingLeft))*b.x,S=_.top+(v.clientTop+parseFloat(y.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,f*=b.y,c+=w,u+=S,g=qr(v),v=iA(g)}}return Ov({width:d,height:f,x:c,y:u})}function pA(e,t){let r=rC(e).scrollLeft;return t?t.left+r:Fv(kc(e)).left+r}function e$(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-pA(e,r),n=r.top+t.scrollTop;return{x:o,y:n}}function ALe(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e,i=n==="fixed",s=kc(o),l=t?tC(t.floating):!1;if(o===s||l&&i)return r;let c={scrollLeft:0,scrollTop:0},u=Oc(1),d=Oc(0),f=wo(o);if((f||!f&&!i)&&((kv(o)!=="body"||O0(s))&&(c=rC(o)),f)){let h=Fv(o);u=B0(o),d.x=h.x+o.clientLeft,d.y=h.y+o.clientTop}let m=s&&!f&&!i?e$(s,c):Oc(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+m.x,y:r.y*u.y-c.scrollTop*u.y+d.y+m.y}}function ILe(e){return Array.from(e.getClientRects())}function OLe(e){let t=kc(e),r=rC(e),o=e.ownerDocument.body,n=Ss(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=Ss(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),s=-r.scrollLeft+pA(e),l=-r.scrollTop;return Un(o).direction==="rtl"&&(s+=Ss(t.clientWidth,o.clientWidth)-n),{width:n,height:i,x:s,y:l}}var ZJ=25;function NLe(e,t){let r=qr(e),o=kc(e),n=r.visualViewport,i=o.clientWidth,s=o.clientHeight,l=0,c=0;if(n){i=n.width,s=n.height;let d=nA();(!d||d&&t==="fixed")&&(l=n.offsetLeft,c=n.offsetTop)}let u=pA(o);if(u<=0){let d=o.ownerDocument,f=d.body,m=getComputedStyle(f),h=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(o.clientWidth-f.clientWidth-h);g<=ZJ&&(i-=g)}else u<=ZJ&&(i+=u);return{width:i,height:s,x:l,y:c}}function MLe(e,t){let r=Fv(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,i=wo(e)?B0(e):Oc(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,c=n*i.x,u=o*i.y;return{width:s,height:l,x:c,y:u}}function XJ(e,t,r){let o;if(t==="viewport")o=NLe(e,r);else if(t==="document")o=OLe(kc(e));else if(lt(t))o=MLe(t,r);else{let n=$J(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ov(o)}function t$(e,t){let r=Pc(e);return r===t||!lt(r)||Rc(r)?!1:Un(r).position==="fixed"||t$(r,t)}function FLe(e,t){let r=t.get(e);if(r)return r;let o=Rm(e,[],!1).filter(l=>lt(l)&&kv(l)!=="body"),n=null,i=Un(e).position==="fixed",s=i?Pc(e):e;for(;lt(s)&&!Rc(s);){let l=Un(s),c=oA(s);!c&&l.position==="fixed"&&(n=null),(i?!c&&!n:!c&&l.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||O0(s)&&!c&&t$(e,s))?o=o.filter(d=>d!==s):n=l,s=Pc(s)}return t.set(e,o),o}function DLe(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e,s=[...r==="clippingAncestors"?tC(t)?[]:FLe(t,this._c):[].concat(r),o],l=XJ(t,s[0],n),c=l.top,u=l.right,d=l.bottom,f=l.left;for(let m=1;m<s.length;m++){let h=XJ(t,s[m],n);c=Ss(h.top,c),u=Nm(h.right,u),d=Nm(h.bottom,d),f=Ss(h.left,f)}return{width:u-f,height:d-c,x:f,y:c}}function LLe(e){let{width:t,height:r}=JJ(e);return{width:t,height:r}}function BLe(e,t,r){let o=wo(t),n=kc(t),i=r==="fixed",s=Fv(e,!0,i,t),l={scrollLeft:0,scrollTop:0},c=Oc(0);function u(){c.x=pA(n)}if(o||!o&&!i)if((kv(t)!=="body"||O0(n))&&(l=rC(t)),o){let h=Fv(t,!0,i,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else n&&u();i&&!o&&n&&u();let d=n&&!o&&!i?e$(n,l):Oc(0),f=s.left+l.scrollLeft-c.x-d.x,m=s.top+l.scrollTop-c.y-d.y;return{x:f,y:m,width:s.width,height:s.height}}function P7(e){return Un(e).position==="static"}function QJ(e,t){if(!wo(e)||Un(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return kc(e)===r&&(r=r.ownerDocument.body),r}function r$(e,t){let r=qr(e);if(tC(e))return r;if(!wo(e)){let n=Pc(e);for(;n&&!Rc(n);){if(lt(n)&&!P7(n))return n;n=Pc(n)}return r}let o=QJ(e,t);for(;o&&eJ(o)&&P7(o);)o=QJ(o,t);return o&&Rc(o)&&P7(o)&&!oA(o)?r:o||tJ(e)||r}var VLe=async function(e){let t=this.getOffsetParent||r$,r=this.getDimensions,o=await r(e.floating);return{reference:BLe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function jLe(e){return Un(e).direction==="rtl"}var R7={convertOffsetParentRelativeRectToViewportRelativeRect:ALe,getDocumentElement:kc,getClippingRect:DLe,getOffsetParent:r$,getElementRects:VLe,getClientRects:ILe,getDimensions:LLe,getScale:B0,isElement:lt,isRTL:jLe};function o$(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function zLe(e,t){let r=null,o,n=kc(e);function i(){var l;clearTimeout(o),(l=r)==null||l.disconnect(),r=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();let u=e.getBoundingClientRect(),{left:d,top:f,width:m,height:h}=u;if(l||t(),!m||!h)return;let g=aC(f),v=aC(n.clientWidth-(d+m)),b=aC(n.clientHeight-(f+h)),_=aC(d),w={rootMargin:-g+"px "+-v+"px "+-b+"px "+-_+"px",threshold:Ss(0,Nm(1,c))||1},S=!0;function x(C){let A=C[0].intersectionRatio;if(A!==c){if(!S)return s();A?s(!1,A):o=setTimeout(()=>{s(!1,1e-7)},1e3)}A===1&&!o$(u,e.getBoundingClientRect())&&s(),S=!1}try{r=new IntersectionObserver(x,{...w,root:n.ownerDocument})}catch{r=new IntersectionObserver(x,w)}r.observe(e)}return s(!0),i}function pC(e,t,r,o){o===void 0&&(o={});let{ancestorScroll:n=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,u=k7(e),d=n||i?[...u?Rm(u):[],...t?Rm(t):[]]:[];d.forEach(_=>{n&&_.addEventListener("scroll",r,{passive:!0}),i&&_.addEventListener("resize",r)});let f=u&&l?zLe(u,r):null,m=-1,h=null;s&&(h=new ResizeObserver(_=>{let[y]=_;y&&y.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),r()}),u&&!c&&h.observe(u),t&&h.observe(t));let g,v=c?Fv(e):null;c&&b();function b(){let _=Fv(e);v&&!o$(v,_)&&r(),v=_,g=requestAnimationFrame(b)}return r(),()=>{var _;d.forEach(y=>{n&&y.removeEventListener("scroll",r),i&&y.removeEventListener("resize",r)}),f?.(),(_=h)==null||_.disconnect(),h=null,c&&cancelAnimationFrame(g)}}var n$=GJ;var i$=YJ,s$=HJ,a$=KJ,l$=UJ;var c$=qJ,mA=(e,t,r)=>{let o=new Map,n={platform:R7,...r},i={...n.platform,_c:o};return zJ(e,t,{...n,platform:i})};var dn=a(_e(),1),d$=a(_e(),1),f$=a(Vu(),1),ULe=typeof document<"u",WLe=function(){},hA=ULe?d$.useLayoutEffect:WLe;function gA(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,o,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(o=r;o--!==0;)if(!gA(e[o],t[o]))return!1;return!0}if(n=Object.keys(e),r=n.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(t,n[o]))return!1;for(o=r;o--!==0;){let i=n[o];if(!(i==="_owner"&&e.$$typeof)&&!gA(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function p$(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function u$(e,t){let r=p$(e);return Math.round(t*r)/r}function A7(e){let t=dn.useRef(e);return hA(()=>{t.current=e}),t}function m$(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:n,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=dn.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=dn.useState(o);gA(m,o)||h(o);let[g,v]=dn.useState(null),[b,_]=dn.useState(null),y=dn.useCallback(B=>{B!==C.current&&(C.current=B,v(B))},[]),w=dn.useCallback(B=>{B!==A.current&&(A.current=B,_(B))},[]),S=i||g,x=s||b,C=dn.useRef(null),A=dn.useRef(null),k=dn.useRef(d),R=c!=null,M=A7(c),P=A7(n),T=A7(u),N=dn.useCallback(()=>{if(!C.current||!A.current)return;let B={placement:t,strategy:r,middleware:m};P.current&&(B.platform=P.current),mA(C.current,A.current,B).then(O=>{let V={...O,isPositioned:T.current!==!1};L.current&&!gA(k.current,V)&&(k.current=V,f$.flushSync(()=>{f(V)}))})},[m,t,r,P,T]);hA(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,f(B=>({...B,isPositioned:!1})))},[u]);let L=dn.useRef(!1);hA(()=>(L.current=!0,()=>{L.current=!1}),[]),hA(()=>{if(S&&(C.current=S),x&&(A.current=x),S&&x){if(M.current)return M.current(S,x,N);N()}},[S,x,N,M,R]);let F=dn.useMemo(()=>({reference:C,floating:A,setReference:y,setFloating:w}),[y,w]),D=dn.useMemo(()=>({reference:S,floating:x}),[S,x]),z=dn.useMemo(()=>{let B={position:r,left:0,top:0};if(!D.floating)return B;let O=u$(D.floating,d.x),V=u$(D.floating,d.y);return l?{...B,transform:"translate("+O+"px, "+V+"px)",...p$(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:V}},[r,l,D.floating,d.x,d.y]);return dn.useMemo(()=>({...d,update:N,refs:F,elements:D,floatingStyles:z}),[d,N,F,D,z])}var I7=(e,t)=>{let r=n$(e);return{name:r.name,fn:r.fn,options:[e,t]}},O7=(e,t)=>{let r=i$(e);return{name:r.name,fn:r.fn,options:[e,t]}},N7=(e,t)=>({fn:c$(e).fn,options:[e,t]}),M7=(e,t)=>{let r=s$(e);return{name:r.name,fn:r.fn,options:[e,t]}},F7=(e,t)=>{let r=a$(e);return{name:r.name,fn:r.fn,options:[e,t]}};var D7=(e,t)=>{let r=l$(e);return{name:r.name,fn:r.fn,options:[e,t]}};var z0=a(_e(),1),I$=a(Vu(),1);var R$=a(_e(),1);var jt=(e,t,r,o,n,i,...s)=>{if(s.length>0)throw new Error(No(1));let l;if(e&&t&&r&&o&&n&&i)l=(c,u,d,f)=>{let m=e(c,u,d,f),h=t(c,u,d,f),g=r(c,u,d,f),v=o(c,u,d,f),b=n(c,u,d,f);return i(m,h,g,v,b,u,d,f)};else if(e&&t&&r&&o&&n)l=(c,u,d,f)=>{let m=e(c,u,d,f),h=t(c,u,d,f),g=r(c,u,d,f),v=o(c,u,d,f);return n(m,h,g,v,u,d,f)};else if(e&&t&&r&&o)l=(c,u,d,f)=>{let m=e(c,u,d,f),h=t(c,u,d,f),g=r(c,u,d,f);return o(m,h,g,u,d,f)};else if(e&&t&&r)l=(c,u,d,f)=>{let m=e(c,u,d,f),h=t(c,u,d,f);return r(m,h,u,d,f)};else if(e&&t)l=(c,u,d,f)=>{let m=e(c,u,d,f);return t(m,u,d,f)};else if(e)l=e;else throw new Error("Missing arguments");return l};var E$=a(_e(),1),z7=a(mC(),1),P$=a(_$(),1);var S$=a(_e(),1);var B7=[],V7;function x$(){return V7}function C$(e){B7.push(e)}function j7(e){let t=(r,o)=>{let n=un(l4e).current,i;try{V7=n;for(let s of B7)s.before(n);i=e(r,o);for(let s of B7)s.after(n);n.didInitialize=!0}finally{V7=void 0}return i};return t.displayName=e.displayName||e.name,t}function T$(e){return S$.forwardRef(j7(e))}function l4e(){return{didInitialize:!1}}var c4e=P0(19),u4e=c4e?f4e:p4e;function bA(e,t,r,o,n){return u4e(e,t,r,o,n)}function d4e(e,t,r,o,n){let i=E$.useCallback(()=>t(e.getSnapshot(),r,o,n),[e,t,r,o,n]);return(0,z7.useSyncExternalStore)(e.subscribe,i,i)}C$({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let r=0;r<e.syncHooks.length;r+=1){let o=e.syncHooks[r],n=o.selector(o.store.state,o.a1,o.a2,o.a3);Object.is(o.value,n)||(t=!0,o.value=n)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let r=new Set;for(let n of e.syncHooks)r.add(n.store);let o=[];for(let n of r)o.push(n.subscribe(t));return()=>{for(let n of o)n()}}),(0,z7.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function f4e(e,t,r,o,n){let i=x$();if(!i)return d4e(e,t,r,o,n);let s=i.syncIndex;i.syncIndex+=1;let l;return i.didInitialize?(l=i.syncHooks[s],(l.store!==e||l.selector!==t||!Object.is(l.a1,r)||!Object.is(l.a2,o)||!Object.is(l.a3,n))&&(l.store!==e&&(i.didChangeStore=!0),l.store=e,l.selector=t,l.a1=r,l.a2=o,l.a3=n,l.value=t(e.getSnapshot(),r,o,n))):(l={store:e,selector:t,a1:r,a2:o,a3:n,value:t(e.getSnapshot(),r,o,n)},i.syncHooks.push(l)),l.value}function p4e(e,t,r,o,n){return(0,P$.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,r,o,n))}var yA=class{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;let r=this.updateTick;for(let o of this.listeners){if(r!==this.updateTick)return;o(t)}}update(t){for(let r in t)if(!Object.is(this.state[r],t[r])){this.setState({...this.state,...t});return}}set(t,r){Object.is(this.state[t],r)||this.setState({...this.state,[t]:r})}notifyAll(){let t={...this.state};this.setState(t)}use(t,r,o,n){return bA(this,t,r,o,n)}};var Dv=a(_e(),1);var j0=class extends yA{constructor(t,r={},o){super(t),this.context=r,this.selectors=o}useSyncedValue(t,r){Dv.useDebugValue(t);let o=this;Re(()=>{o.state[t]!==r&&o.set(t,r)},[o,t,r])}useSyncedValueWithCleanup(t,r){let o=this;Re(()=>(o.state[t]!==r&&o.set(t,r),()=>{o.set(t,void 0)}),[o,t,r])}useSyncedValues(t){let r=this,o=Object.values(t);Re(()=>{r.update(t)},[r,...o])}useControlledProp(t,r){Dv.useDebugValue(t);let o=this,n=r!==void 0;Re(()=>{n&&!Object.is(o.state[t],r)&&o.setState({...o.state,[t]:r})},[o,t,r,n])}select(t,r,o,n){let i=this.selectors[t];return i(this.state,r,o,n)}useState(t,r,o,n){return Dv.useDebugValue(t),bA(this,this.selectors[t],r,o,n)}useContextCallback(t,r){Dv.useDebugValue(t);let o=De(r??Ec);this.context[t]=o}useStateSetter(t){let r=Dv.useRef(void 0);return r.current===void 0&&(r.current=o=>{this.set(t,o)}),r.current}observe(t,r){let o;typeof t=="function"?o=t:o=this.selectors[t];let n=o(this.state);return r(n,n,this),this.subscribe(i=>{let s=o(i);if(!Object.is(n,s)){let l=n;n=s,r(s,l,this)}})}};var wA=a(_e(),1);function k$(){let[,e]=wA.useState({});return wA.useCallback(()=>{e({})},[])}var m4e={open:jt(e=>e.open),transitionStatus:jt(e=>e.transitionStatus),domReferenceElement:jt(e=>e.domReferenceElement),referenceElement:jt(e=>e.positionReference??e.referenceElement),floatingElement:jt(e=>e.floatingElement),floatingId:jt(e=>e.floatingId)},ju=class extends j0{constructor(t){let{syncOnly:r,nested:o,onOpenChange:n,triggerElements:i,...s}=t;super({...s,positionReference:s.referenceElement,domReferenceElement:s.referenceElement},{onOpenChange:n,dataRef:{current:{}},events:FJ(),nested:o,triggerElements:i},m4e),this.syncOnly=r}syncOpenEvent=(t,r)=>{(!t||!this.state.open||r!=null&&bJ(r))&&(this.context.dataRef.current.openEvent=t?r:void 0)};dispatchOpenChange=(t,r)=>{this.syncOpenEvent(t,r.event);let o={open:t,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",o)};setOpen=(t,r)=>{if(this.syncOnly){this.context.onOpenChange?.(t,r);return}this.dispatchOpenChange(t,r),this.context.onOpenChange?.(t,r)}};function A$(e){let{popupStore:t,treatPopupAsFloatingElement:r=!1,floatingRootContext:o,floatingId:n,nested:i,onOpenChange:s}=e,l=t.useState("open"),c=t.useState("activeTriggerElement"),u=t.useState(r?"popupElement":"positionerElement"),d=t.context.triggerElements,f=s,m=R$.useRef(null);o===void 0&&m.current===null&&(m.current=new ju({open:l,transitionStatus:void 0,referenceElement:c,floatingElement:u,triggerElements:d,onOpenChange:f,floatingId:n,syncOnly:!0,nested:i}));let h=o??m.current;return t.useSyncedValue("floatingId",n),Re(()=>{let g={open:l,floatingId:n,referenceElement:c,floatingElement:u};lt(c)&&(g.domReferenceElement=c),h.state.positionReference===h.state.referenceElement&&(g.positionReference=c),h.update(g)},[l,n,c,u,h]),h.context.onOpenChange=f,h.context.nested=i,h}var O$={tabIndex:-1,[g7]:""};function N$(e,t,r=!1){let o=Em(),n=L0()!=null,i=z0.useRef(null);e===void 0&&i.current===null&&(i.current=t(o,n));let s=e??i.current;return A$({popupStore:s,treatPopupAsFloatingElement:r,floatingRootContext:s.state.floatingRootContext,floatingId:o,nested:n,onOpenChange:s.setOpen}),{store:s,internalStore:i.current}}function h4e(e,t){let r=z0.useRef(null),o=z0.useRef(null);return z0.useCallback(n=>{if(e===void 0)return;let i=!1;if(r.current!==null){let s=r.current,l=o.current,c=t.context.triggerElements.getById(s);l&&c===l&&(t.context.triggerElements.delete(s),i=!0),r.current=null,o.current=null}if(n!==null&&(r.current=e,o.current=n,t.context.triggerElements.add(e,n),i=!0),i){let s=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==s&&t.set("triggerCount",s)}},[t,e])}function g4e(e,t,r,o=!1){t?e.preventUnmountingOnClose=!1:o&&(e.preventUnmountingOnClose=!0);let n=r?.id??null;(n||t)&&(e.activeTriggerId=n,e.activeTriggerElement=r??null)}function v4e(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function M$(e,t,r,o={}){let n=r.reason,i=n===Ke.triggerHover,s=t&&n===Ke.triggerFocus,l=!t&&(n===Ke.triggerPress||n===Ke.escapeKey),c=v4e(r);if(e.context.onOpenChange?.(t,r),r.isCanceled)return;o.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,r);let u=()=>{let d={...o.extraState,open:t};s?d.instantType="focus":l?d.instantType="dismiss":i&&(d.instantType=void 0),g4e(d,t,r.trigger,c()),e.update(d)};i?I$.flushSync(u):u()}function F$(e,t,r,o){fJ(()=>{t===void 0&&e.state.open===!1&&r&&(e.state={...e.state,open:!0,activeTriggerId:o,preventUnmountingOnClose:!1})})}function D$(e,t,r,o){let n=r.useState("isMountedByTrigger",e),i=h4e(e,r),s=De(l=>{if(i(l),!l)return;let c=r.select("open"),u=r.select("activeTriggerId");if(u===e){r.update({activeTriggerElement:l,...c?o:null});return}u==null&&c&&r.update({activeTriggerId:e,activeTriggerElement:l,...o})});return Re(()=>{n&&r.update({activeTriggerElement:t.current,...o})},[n,r,t,...Object.values(o)]),{registerTrigger:s,isMountedByThisTrigger:n}}function L$(e,t={}){let{closeOnActiveTriggerUnmount:r=!1}=t,o=e.useState("open"),n=e.useState("triggerCount");Re(()=>{if(!o){e.state.triggerCount!==0&&e.set("triggerCount",0);return}let i=e.context.triggerElements.size,s={};e.state.triggerCount!==i&&(s.triggerCount=i);let l=e.select("activeTriggerId"),c=null;if(l){let u=e.context.triggerElements.getById(l);u?u!==e.state.activeTriggerElement&&(s.activeTriggerElement=u):c=l}if(!c&&!l&&i===1){let u=e.context.triggerElements.entries().next();if(!u.done){let[d,f]=u.value;s.activeTriggerId=d,s.activeTriggerElement=f}}(s.triggerCount!==void 0||s.activeTriggerId!==void 0||s.activeTriggerElement!==void 0)&&e.update(s),c&&r&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===c&&!e.context.triggerElements.getById(c)){let u=Ct(Ke.none);e.setOpen(!1,u),u.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[o,e,n,r])}function B$(e,t,r){let{mounted:o,setMounted:n,transitionStatus:i}=A0(e),s=t.useState("preventUnmountingOnClose"),l=e?!1:s;t.useSyncedValues({mounted:o,transitionStatus:i,preventUnmountingOnClose:l});let c=De(()=>{n(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),r?.(),t.context.onOpenChangeComplete?.(!1)});return Im({enabled:o&&!e&&!l,open:e,ref:t.context.popupRef,onComplete(){e||c()}}),{forceUnmount:c,transitionStatus:i}}function V$(e,t){e.useSyncedValues(t),Re(()=>()=>{e.update({activeTriggerProps:no,inactiveTriggerProps:no,popupProps:no})},[e])}var Dm=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,r){let o=this.idMap.get(t);o!==r&&(o!==void 0&&this.elementsSet.delete(o),this.elementsSet.add(r),this.idMap.set(t,r))}delete(t){let r=this.idMap.get(t);r&&(this.elementsSet.delete(r),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(let r of this.elementsSet)if(t(r))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function j$(){return new ju({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Dm,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function H$(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:j$(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:no,inactiveTriggerProps:no,popupProps:no}}function U$(e,t,r=!1){return new ju({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:r,onOpenChange:void 0})}var hC=jt(e=>e.triggerIdProp??e.activeTriggerId),H7=jt(e=>e.openProp??e.open),z$=jt(e=>(e.popupElement?.id??e.floatingId)||void 0);function W$(e,t){return t!==void 0&&H7(e)&&hC(e)===t}function b4e(e,t){return W$(e,t)?!0:t!==void 0&&H7(e)&&hC(e)==null&&e.triggerCount===1}var G$={open:H7,mounted:jt(e=>e.mounted),transitionStatus:jt(e=>e.transitionStatus),floatingRootContext:jt(e=>e.floatingRootContext),triggerCount:jt(e=>e.triggerCount),preventUnmountingOnClose:jt(e=>e.preventUnmountingOnClose),payload:jt(e=>e.payload),activeTriggerId:hC,activeTriggerElement:jt(e=>e.mounted?e.activeTriggerElement:null),popupId:z$,isTriggerActive:jt((e,t)=>t!==void 0&&hC(e)===t),isOpenedByTrigger:jt((e,t)=>W$(e,t)),isMountedByTrigger:jt((e,t)=>t!==void 0&&hC(e)===t&&e.mounted),triggerProps:jt((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:jt((e,t)=>b4e(e,t)?z$(e):void 0),popupProps:jt(e=>e.popupProps),popupElement:jt(e=>e.popupElement),positionerElement:jt(e=>e.positionerElement)};function Y$(e){let{open:t=!1,onOpenChange:r,elements:o={}}=e,n=Em(),i=L0()!=null,s=un(()=>new ju({open:t,transitionStatus:void 0,onOpenChange:r,referenceElement:o.reference??null,floatingElement:o.floating??null,triggerElements:new Dm,floatingId:n,syncOnly:!1,nested:i})).current;return Re(()=>{let l={open:t,floatingId:n};o.reference!==void 0&&(l.referenceElement=o.reference,l.domReferenceElement=lt(o.reference)?o.reference:null),o.floating!==void 0&&(l.floatingElement=o.floating),s.update(l)},[t,n,o.reference,o.floating,s]),s.context.onOpenChange=r,s.context.nested=i,s}function U7(e={}){let{nodeId:t,externalTree:r}=e,o=Y$(e),n=e.rootContext||o,i=n.useState("referenceElement"),s=n.useState("floatingElement"),l=n.useState("domReferenceElement"),c=n.useState("open"),u=n.useState("floatingId"),[d,f]=Vi.useState(null),[m,h]=Vi.useState(void 0),[g,v]=Vi.useState(void 0),b=Vi.useRef(null),_=Fm(r),y=Vi.useMemo(()=>({reference:i,floating:s,domReference:l}),[i,s,l]),w=m$({...e,elements:{...y,...d&&{reference:d}}}),S=lt(m)?m:null,x=g===void 0?n.state.floatingElement:g;n.useSyncedValue("referenceElement",m??null),n.useSyncedValue("domReferenceElement",m===void 0?l:S),n.useSyncedValue("floatingElement",x);let C=Vi.useCallback(T=>{let N=lt(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),getClientRects:()=>T.getClientRects(),contextElement:T}:T;f(N),w.refs.setReference(N)},[w.refs]),A=Vi.useCallback(T=>{(lt(T)||T===null)&&(b.current=T,h(T)),(lt(w.refs.reference.current)||w.refs.reference.current===null||T!==null&&!lt(T))&&w.refs.setReference(T)},[w.refs,h]),k=Vi.useCallback(T=>{v(T),w.refs.setFloating(T)},[w.refs]),R=Vi.useMemo(()=>({...w.refs,setReference:A,setFloating:k,setPositionReference:C,domReference:b}),[w.refs,A,k,C]),M=Vi.useMemo(()=>({...w.elements,domReference:l}),[w.elements,l]),P=Vi.useMemo(()=>({...w,dataRef:n.context.dataRef,open:c,onOpenChange:n.setOpen,events:n.context.events,floatingId:u,refs:R,elements:M,nodeId:t,rootStore:n}),[w,R,M,t,n,c,u]);return Re(()=>{l&&(b.current=l)},[l]),Re(()=>{n.context.dataRef.current.floatingContext=P;let T=_?.nodesRef.current.find(N=>N.id===t);T&&(T.context=P)}),Vi.useMemo(()=>({...w,context:P,refs:R,elements:M,rootStore:n}),[w,R,M,P,n])}var zu=a(_e(),1);var W7=kf.os.mac&&kf.engine.webkit;function G7(e,t={}){let{enabled:r=!0,delay:o}=t,n="rootStore"in e?e.rootStore:e,{events:i,dataRef:s}=n.context,l=zu.useRef(!1),c=zu.useRef(null),u=zu.useRef(!0),d=Ac();zu.useEffect(()=>{let m=n.select("domReferenceElement");if(!r)return;let h=qr(m);function g(){let _=n.select("domReferenceElement");!n.select("open")&&wo(_)&&_===F0(Ko(_))&&(l.current=!0)}function v(){u.current=!0}function b(){u.current=!1}return Ic(er(h,"blur",g),W7&&er(h,"keydown",v,!0),W7&&er(h,"pointerdown",b,!0))},[n,r]),zu.useEffect(()=>{if(!r)return;function m(h){if(h.reason===Ke.triggerPress||h.reason===Ke.escapeKey){let g=n.select("domReferenceElement");lt(g)&&(c.current=g,l.current=!0)}}return i.on("openchange",m),()=>{i.off("openchange",m)}},[i,r,n]);let f=zu.useMemo(()=>{function m(){l.current=!1,c.current=null}return{onMouseLeave(){m()},onFocus(h){let g=h.currentTarget;if(l.current){if(c.current===g)return;m()}let v=Wn(h.nativeEvent);if(lt(v)){if(W7&&!h.relatedTarget){if(!u.current&&!wJ(v))return}else if(!_J(v))return}let b=Om(h.relatedTarget,n.context.triggerElements),{nativeEvent:_,currentTarget:y}=h,w=typeof o=="function"?o():o;if(n.select("open")&&b||w===0||w===void 0){n.setOpen(!0,Ct(Ke.triggerFocus,_,y));return}d.start(w,()=>{l.current||n.setOpen(!0,Ct(Ke.triggerFocus,_,y))})},onBlur(h){m();let g=h.relatedTarget,v=h.nativeEvent,b=lt(g)&&g.hasAttribute(D0("focus-guard"))&&g.getAttribute("data-type")==="outside";d.start(0,()=>{let _=n.select("domReferenceElement"),y=F0(Ko(_));!g&&y===_||or(s.current.floatingContext?.refs.floating.current,y)||or(_,y)||b||Om(g??y,n.context.triggerElements)||n.setOpen(!1,Ct(Ke.triggerFocus,v))})}}},[s,o,n,d]);return zu.useMemo(()=>r?{reference:f,trigger:f}:{},[r,f])}var q7=a(_e(),1);var Y7=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Qa,this.restTimeout=new Qa,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},_A=new WeakMap;function H0(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&_A.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),_A.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function SA(e,t){let{scopeElement:r,referenceElement:o,floatingElement:n}=t,i=_A.get(r);i&&i!==e&&H0(i),H0(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=r,e.pointerEventsReferenceElement=o,e.pointerEventsFloatingElement=n,_A.set(r,e),r.style.pointerEvents="none",o.style.pointerEvents="auto",n.style.pointerEvents="auto"}function U0(e){let t=e.context.dataRef.current,r=un(()=>t.hoverInteractionState??Y7.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=r),k0(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function K7(e,t={}){let{enabled:r=!0,closeDelay:o=0,nodeId:n}=t,i="rootStore"in e?e.rootStore:e,s=i.useState("open"),l=i.useState("floatingElement"),c=i.useState("domReferenceElement"),{dataRef:u}=i.context,d=Fm(),f=L0(),m=U0(i),h=Ac(),g=De(()=>cA(u.current.openEvent?.type,m.interactedInside)),v=De(()=>SJ(u.current.openEvent?.type)),b=De(()=>{H0(m)});Re(()=>{s||(m.pointerType=void 0,m.restTimeoutPending=!1,m.interactedInside=!1,b())},[s,m,b]),q7.useEffect(()=>b,[b]),Re(()=>{if(r&&s&&m.handleCloseOptions?.blockPointerEvents&&v()&&lt(c)&&l){let _=c,y=l,w=Ko(l),S=d?.nodesRef.current.find(k=>k.id===f)?.context?.elements.floating;S&&(S.style.pointerEvents="");let x=m.pointerEventsScopeElement!==y?m.pointerEventsScopeElement:null,C=S!==y?S:null,A=m.handleCloseOptions?.getScope?.()??x??C??_.closest("[data-rootownerid]")??w.body;return SA(m,{scopeElement:A,referenceElement:_,floatingElement:y}),()=>{b()}}},[r,s,c,l,m,v,d,f,b]),q7.useEffect(()=>{if(!r)return;function _(){return!!(d&&f&&If(d.nodesRef.current,f).length>0)}function y(k){let R=Af(o,"close",m.pointerType),M=()=>{i.setOpen(!1,Ct(Ke.triggerHover,k)),d?.events.emit("floating.closed",k)};R?m.openChangeTimeout.start(R,M):(m.openChangeTimeout.clear(),M())}function w(k){let R=Wn(k);if(!b7(R)){m.interactedInside=!1;return}m.interactedInside=R?.closest("[aria-haspopup]")!=null}function S(){m.openChangeTimeout.clear(),h.clear(),d?.events.off("floating.closed",C),b()}function x(k){if(_()&&d){d.events.on("floating.closed",C);return}if(Om(k.relatedTarget,i.context.triggerElements))return;let R=u.current.floatingContext?.nodeId??n,M=k.relatedTarget;if(!(d&&R&&lt(M)&&If(d.nodesRef.current,R,!1).some(T=>or(T.context?.elements.floating,M)))){if(m.handler){m.handler(k);return}b(),v()&&!g()&&y(k)}}function C(k){!d||!f||_()||h.start(0,()=>{d.events.off("floating.closed",C),i.setOpen(!1,Ct(Ke.triggerHover,k)),d.events.emit("floating.closed",k)})}let A=l;return Ic(A&&er(A,"mouseenter",S),A&&er(A,"mouseleave",x),A&&er(A,"pointerdown",w,!0),()=>{d?.events.off("floating.closed",C)})},[r,l,i,u,o,n,v,g,b,m,d,f,h])}var Lm=a(_e(),1),q$=a(Vu(),1);var y4e={current:null};function Z7(e,t={}){let{enabled:r=!0,delay:o=0,handleClose:n=null,mouseOnly:i=!1,restMs:s=0,move:l=!0,triggerElementRef:c=y4e,externalTree:u,isActiveTrigger:d=!0,getHandleCloseContext:f,isClosing:m,shouldOpen:h}=t,g="rootStore"in e?e.rootStore:e,{dataRef:v,events:b}=g.context,_=Fm(u),y=U0(g),w=Lm.useRef(!1),S=Li(n),x=Li(o),C=Li(s),A=Li(r),k=Li(h),R=Li(m),M=De(()=>cA(v.current.openEvent?.type,y.interactedInside)),P=De(()=>k.current?.()!==!1),T=De((F,D,z)=>{let B=g.context.triggerElements;if(B.hasElement(D))return!F||!or(F,D);if(!lt(z))return!1;let O=z;return B.hasMatchingElement(V=>or(V,O))&&(!F||!or(F,O))}),N=De(()=>{if(!y.handler)return;Ko(g.select("domReferenceElement")).removeEventListener("mousemove",y.handler),y.handler=void 0}),L=De(()=>{H0(y)});return d&&(y.handleCloseOptions=S.current?.__options),Lm.useEffect(()=>N,[N]),Lm.useEffect(()=>{if(!r)return;function F(D){D.open?w.current=!1:(w.current=D.reason===Ke.triggerHover,N(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}return b.on("openchange",F),()=>{b.off("openchange",F)}},[r,b,y,N]),Lm.useEffect(()=>{if(!r)return;function F(O,V=!0){let W=Af(x.current,"close",y.pointerType);W?y.openChangeTimeout.start(W,()=>{g.setOpen(!1,Ct(Ke.triggerHover,O)),_?.events.emit("floating.closed",O)}):V&&(y.openChangeTimeout.clear(),g.setOpen(!1,Ct(Ke.triggerHover,O)),_?.events.emit("floating.closed",O))}let D=c.current??(d?g.select("domReferenceElement"):null);if(!lt(D))return;function z(O){if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,i&&!Rf(y.pointerType))return;let V=y7(C.current),W=Af(x.current,"open",y.pointerType),q=Wn(O),Z=O.currentTarget??null,Q=g.select("domReferenceElement"),ce=Z;if(lt(q)&&!g.context.triggerElements.hasElement(q)){for(let oe of g.context.triggerElements.elements())if(or(oe,q)){ce=oe;break}}lt(Z)&&lt(Q)&&!g.context.triggerElements.hasElement(Z)&&or(Z,Q)&&(ce=Q);let re=ce==null?!1:T(Q,ce,q),fe=g.select("open"),pe=R.current?.()??g.select("transitionStatus")==="ending",$=!fe&&pe&&w.current,te=!re&&lt(ce)&&lt(Q)&&or(Q,ce)&&$,de=V>0&&!W,ve=re&&(fe||$)||te,we=!fe||re;if(ve){P()&&g.setOpen(!0,Ct(Ke.triggerHover,O,ce));return}de||(W?y.openChangeTimeout.start(W,()=>{we&&P()&&g.setOpen(!0,Ct(Ke.triggerHover,O,ce))}):we&&P()&&g.setOpen(!0,Ct(Ke.triggerHover,O,ce)))}function B(O){if(M()){L();return}N();let V=g.select("domReferenceElement"),W=Ko(V);y.restTimeout.clear(),y.restTimeoutPending=!1;let q=v.current.floatingContext??f?.();if(Om(O.relatedTarget,g.context.triggerElements))return;if(S.current&&q){g.select("open")||y.openChangeTimeout.clear();let Q=c.current;y.handler=S.current({...q,tree:_,x:O.clientX,y:O.clientY,onClose(){L(),N(),A.current&&!M()&&Q===g.select("domReferenceElement")&&F(O,!0)}}),W.addEventListener("mousemove",y.handler),y.handler(O);return}(y.pointerType!=="touch"||!or(g.select("floatingElement"),O.relatedTarget))&&F(O)}return l?Ic(er(D,"mousemove",z,{once:!0}),er(D,"mouseenter",z),er(D,"mouseleave",B)):Ic(er(D,"mouseenter",z),er(D,"mouseleave",B))},[N,L,v,x,g,r,S,y,d,T,M,i,l,C,c,_,A,f,R,P]),Lm.useMemo(()=>{if(!r)return;function F(D){y.pointerType=D.pointerType}return{onPointerDown:F,onPointerEnter:F,onMouseMove(D){let{nativeEvent:z}=D,B=D.currentTarget,O=g.select("domReferenceElement"),V=g.select("open"),W=T(O,B,D.target);if(i&&!Rf(y.pointerType))return;if(V&&W&&y.handleCloseOptions?.blockPointerEvents){let Q=g.select("floatingElement");if(Q){let ce=y.handleCloseOptions?.getScope?.()??B.ownerDocument.body;SA(y,{scopeElement:ce,referenceElement:B,floatingElement:Q})}}let q=y7(C.current);if(V&&!W||q===0||!W&&y.restTimeoutPending&&D.movementX**2+D.movementY**2<2)return;y.restTimeout.clear();function Z(){if(y.restTimeoutPending=!1,M())return;let Q=g.select("open");!y.blockMouseMove&&(!Q||W)&&P()&&g.setOpen(!0,Ct(Ke.triggerHover,z,B))}y.pointerType==="touch"?q$.flushSync(()=>{Z()}):W&&V?Z():(y.restTimeoutPending=!0,y.restTimeout.start(q,Z))}}},[r,y,M,T,i,g,C,P])}var K$=.1,w4e=K$*K$,Tr=.5;function xA(e,t,r,o,n,i){return o>=t!=i>=t&&e<=(n-r)*(t-o)/(i-o)+r}function CA(e,t,r,o,n,i,s,l,c,u){let d=!1;return xA(e,t,r,o,n,i)&&(d=!d),xA(e,t,n,i,s,l)&&(d=!d),xA(e,t,s,l,c,u)&&(d=!d),xA(e,t,c,u,r,o)&&(d=!d),d}function _4e(e,t,r){return e>=r.x&&e<=r.x+r.width&&t>=r.y&&t<=r.y+r.height}function TA(e,t,r,o,n,i){let s=Math.min(r,n),l=Math.max(r,n),c=Math.min(o,i),u=Math.max(o,i);return e>=s&&e<=l&&t>=c&&t<=u}function X7(e={}){let{blockPointerEvents:t=!1}=e,r=new Qa,o=({x:n,y:i,placement:s,elements:l,onClose:c,nodeId:u,tree:d})=>{let f=s?.split("-")[0],m=!1,h=null,g=null,v=typeof performance<"u"?performance.now():0;function b(y,w){let S=performance.now(),x=S-v;if(h===null||g===null||x===0)return h=y,g=w,v=S,!1;let C=y-h,A=w-g,k=C*C+A*A,R=x*x*w4e;return h=y,g=w,v=S,k<R}function _(){r.clear(),c()}return function(w){r.clear();let S=l.domReference,x=l.floating;if(!S||!x||f==null||n==null||i==null)return;let{clientX:C,clientY:A}=w,k=Wn(w),R=w.type==="mouseleave",M=or(x,k),P=or(S,k);if(M&&(m=!0,!R))return;if(P&&(m=!1,!R)){m=!0;return}if(R&&lt(w.relatedTarget)&&or(x,w.relatedTarget))return;function T(){return!!(d&&If(d.nodesRef.current,u).length>0)}function N(){T()||_()}if(T())return;let L=S.getBoundingClientRect(),F=x.getBoundingClientRect(),D=n>F.right-F.width/2,z=i>F.bottom-F.height/2,B=F.width>L.width,O=F.height>L.height,V=(B?L:F).left,W=(B?L:F).right,q=(O?L:F).top,Z=(O?L:F).bottom;if(f==="top"&&i>=L.bottom-1||f==="bottom"&&i<=L.top+1||f==="left"&&n>=L.right-1||f==="right"&&n<=L.left+1){N();return}let Q=!1;switch(f){case"top":Q=TA(C,A,V,L.top+1,W,F.bottom-1);break;case"bottom":Q=TA(C,A,V,F.top+1,W,L.bottom-1);break;case"left":Q=TA(C,A,F.right-1,Z,L.left+1,q);break;case"right":Q=TA(C,A,L.right-1,Z,F.left+1,q);break;default:}if(Q)return;if(m&&!_4e(C,A,L)){N();return}if(!R&&b(C,A)){N();return}let ce=!1;switch(f){case"top":{let re=B?Tr/2:Tr*4,fe=B||D?n+re:n-re,pe=B?n-re:D?n+re:n-re,$=i+Tr+1,te=D||B?F.bottom-Tr:F.top,de=D?B?F.bottom-Tr:F.top:F.bottom-Tr;ce=CA(C,A,fe,$,pe,$,F.left,te,F.right,de);break}case"bottom":{let re=B?Tr/2:Tr*4,fe=B||D?n+re:n-re,pe=B?n-re:D?n+re:n-re,$=i-Tr,te=D||B?F.top+Tr:F.bottom,de=D?B?F.top+Tr:F.bottom:F.top+Tr;ce=CA(C,A,fe,$,pe,$,F.left,te,F.right,de);break}case"left":{let re=O?Tr/2:Tr*4,fe=O||z?i+re:i-re,pe=O?i-re:z?i+re:i-re,$=n+Tr+1,te=z||O?F.right-Tr:F.left,de=z?O?F.right-Tr:F.left:F.right-Tr;ce=CA(C,A,te,F.top,de,F.bottom,$,fe,$,pe);break}case"right":{let re=O?Tr/2:Tr*4,fe=O||z?i+re:i-re,pe=O?i-re:z?i+re:i-re,$=n-Tr,te=z||O?F.left+Tr:F.right,de=z?O?F.left+Tr:F.right:F.left+Tr;ce=CA(C,A,$,fe,$,pe,te,F.top,de,F.bottom);break}default:}ce?m||r.start(40,N):N()}};return o.__options={...e,blockPointerEvents:t},o}var Q7=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Xa.startingStyle]="startingStyle",e[e.endingStyle=Xa.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),gC=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({}),S4e={[gC.popupOpen]:""},nxt={[gC.popupOpen]:"",[gC.pressed]:""},x4e={[Q7.open]:""},C4e={[Q7.closed]:""},T4e={[Q7.anchorHidden]:""},Z$={open(e){return e?S4e:null}};var W0={open(e){return e?x4e:C4e},anchorHidden(e){return e?T4e:null}};var G0="ArrowUp",Y0="ArrowDown",vC="ArrowLeft",bC="ArrowRight",yC="Home",wC="End";var J7=new Set([vC,bC]),Q$=new Set([vC,bC,yC,wC]),$7=new Set([G0,Y0]),J$=new Set([G0,Y0,yC,wC]),e9=new Set([...J7,...$7]),$$=new Set([...e9,yC,wC]),E4e="Shift",P4e="Control",k4e="Alt",R4e="Meta",eee=new Set([E4e,P4e,k4e,R4e]);function A4e(e){return wo(e)&&e.tagName==="INPUT"}function t9(e){return!!(A4e(e)&&e.selectionStart!=null||wo(e)&&e.tagName==="TEXTAREA")}function r9(e,t,r,o){if(!e||!t||!t.scrollTo)return;let n=e.scrollLeft,i=e.scrollTop,s=e.clientWidth<e.scrollWidth,l=e.clientHeight<e.scrollHeight;if(s&&o!=="vertical"){let c=X$(e,t,"left"),u=EA(e),d=EA(t);r==="ltr"&&(c+t.offsetWidth+d.scrollMarginRight>e.scrollLeft+e.clientWidth-u.scrollPaddingRight?n=c+t.offsetWidth+d.scrollMarginRight-e.clientWidth+u.scrollPaddingRight:c-d.scrollMarginLeft<e.scrollLeft+u.scrollPaddingLeft&&(n=c-d.scrollMarginLeft-u.scrollPaddingLeft)),r==="rtl"&&(c-d.scrollMarginRight<e.scrollLeft+u.scrollPaddingLeft?n=c-d.scrollMarginLeft-u.scrollPaddingLeft:c+t.offsetWidth+d.scrollMarginRight>e.scrollLeft+e.clientWidth-u.scrollPaddingRight&&(n=c+t.offsetWidth+d.scrollMarginRight-e.clientWidth+u.scrollPaddingRight))}if(l&&o!=="horizontal"){let c=X$(e,t,"top"),u=EA(e),d=EA(t);c-d.scrollMarginTop<e.scrollTop+u.scrollPaddingTop?i=c-d.scrollMarginTop-u.scrollPaddingTop:c+t.offsetHeight+d.scrollMarginBottom>e.scrollTop+e.clientHeight-u.scrollPaddingBottom&&(i=c+t.offsetHeight+d.scrollMarginBottom-e.clientHeight+u.scrollPaddingBottom)}e.scrollTo({left:n,top:i,behavior:"auto"})}function X$(e,t,r){let o=r==="left"?"offsetLeft":"offsetTop",n=0;for(;t.offsetParent&&(n+=t[o],t.offsetParent!==e);)t=t.offsetParent;return n}function EA(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}function PA(e){return P0(19)?e:e?"true":void 0}var $a=a(_e(),1);var I4e=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:o,placement:n,rects:i,platform:s,elements:l,middlewareData:c}=t,{element:u,padding:d=0,offsetParent:f="real"}=Nc(e,t)||{};if(u==null)return{};let m=fA(d),h={x:r,y:o},g=uC(n),v=cC(g),b=await s.getDimensions(u),_=g==="y",y=_?"top":"left",w=_?"bottom":"right",S=_?"clientHeight":"clientWidth",x=i.reference[v]+i.reference[g]-h[g]-i.floating[v],C=h[g]-i.reference[g],A=f==="real"?await s.getOffsetParent?.(u):l.floating,k=l.floating[S]||i.floating[v];(!k||!await s.isElement?.(A))&&(k=l.floating[S]||i.floating[v]);let R=x/2-C/2,M=k/2-b[v]/2-1,P=Math.min(m[y],M),T=Math.min(m[w],M),N=P,L=k-b[v]-T,F=k/2-b[v]/2+R,D=lC(N,F,L),z=!c.arrow&&Mc(n)!=null&&F!==D&&i.reference[v]/2-(F<N?P:T)-b[v]/2<0,B=z?F<N?F-N:F-L:0;return{[g]:h[g]+B,data:{[g]:D,centerOffset:F-D-B,...z&&{alignmentOffset:B}},reset:z}}}),tee=(e,t)=>({...I4e(e),options:[e,t]});var O4e=D7().fn,ree={name:"hide",async fn(e){let{width:t,height:r,x:o,y:n}=e.rects.reference,i=t===0&&r===0&&o===0&&n===0;return{data:{referenceHidden:(await O4e(e)).data?.referenceHidden||i}}}};var _C={sideX:"left",sideY:"top"},oee={name:"adaptiveOrigin",async fn(e){let{x:t,y:r,rects:{floating:o},elements:{floating:n},platform:i,strategy:s,placement:l}=e,c=qr(n),u=c.getComputedStyle(n);if(!(u.transitionDuration!=="0s"&&u.transitionDuration!==""))return{x:t,y:r,data:_C};let f=await i.getOffsetParent?.(n),m={width:0,height:0};if(s==="fixed"&&c?.visualViewport)m={width:c.visualViewport.width,height:c.visualViewport.height};else if(f===c){let y=Ko(n);m={width:y.documentElement.clientWidth,height:y.documentElement.clientHeight}}else await i.isElement?.(f)&&(m=await i.getDimensions(f));let h=pi(l),g=t,v=r;h==="left"&&(g=m.width-(t+o.width)),h==="top"&&(v=m.height-(r+o.height));let b=h==="left"?"right":_C.sideX,_=h==="top"?"bottom":_C.sideY;return{x:g,y:v,data:{sideX:b,sideY:_}}}};function see(e,t,r){let o=e==="inline-start"||e==="inline-end";return{top:"top",right:o?r?"inline-start":"inline-end":"right",bottom:"bottom",left:o?r?"inline-end":"inline-start":"left"}[t]}function nee(e,t,r){let{rects:o,placement:n}=e;return{side:see(t,pi(n),r),align:Mc(n)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function aee(e){let{anchor:t,positionMethod:r="absolute",side:o="bottom",sideOffset:n=0,align:i="center",alignOffset:s=0,collisionBoundary:l,collisionPadding:c=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:m,keepMounted:h=!1,floatingRootContext:g,mounted:v,collisionAvoidance:b,shiftCrossAxis:_=!1,nodeId:y,adaptiveOrigin:w,lazyFlip:S=!1,externalTree:x}=e,[C,A]=$a.useState(null);!v&&C!==null&&A(null);let k=b.side||"flip",R=b.align||"flip",M=b.fallbackAxisSide||"end",P=typeof t=="function"?t:void 0,T=De(P),N=P?T:t,L=Li(t),F=Li(v),z=Tm()==="rtl",B=C||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":z?"left":"right","inline-start":z?"right":"left"}[o],O=i==="center"?B:`${B}-${i}`,V=c,W=1,q=o==="bottom"?W:0,Z=o==="top"?W:0,Q=o==="right"?W:0,ce=o==="left"?W:0;typeof V=="number"?V={top:V+q,right:V+ce,bottom:V+Z,left:V+Q}:V&&(V={top:(V.top||0)+q,right:(V.right||0)+ce,bottom:(V.bottom||0)+Z,left:(V.left||0)+Q});let re={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:V},fe=$a.useRef(null),pe=Li(n),$=Li(s),te=typeof n!="function"?n:0,de=typeof s!="function"?s:0,ve=[];m&&ve.push(m),ve.push(I7(vt=>{let Ft=nee(vt,o,z),ne=typeof pe.current=="function"?pe.current(Ft):pe.current,xe=typeof $.current=="function"?$.current(Ft):$.current;return{mainAxis:ne,crossAxis:xe,alignmentAxis:xe}},[te,de,z,o]));let we=R==="none"&&k!=="shift",oe=!we&&(u||_||k==="shift"),ee=k==="none"?null:M7({...re,padding:{top:V.top+W,right:V.right+W,bottom:V.bottom+W,left:V.left+W},mainAxis:!_&&k==="flip",crossAxis:R==="flip"?"alignment":!1,fallbackAxisSideDirection:M}),ue=we?null:O7(vt=>{let Ft=Ko(vt.elements.floating).documentElement;return{...re,rootBoundary:_?{x:0,y:0,width:Ft.clientWidth,height:Ft.clientHeight}:void 0,mainAxis:R!=="none",crossAxis:oe,limiter:u||_?void 0:N7(ne=>{if(!fe.current)return{};let{width:xe,height:H}=fe.current.getBoundingClientRect(),Pe=sa(pi(ne.placement)),Vt=Pe==="y"?xe:H,Ee=Pe==="y"?V.left+V.right:V.top+V.bottom;return{offset:Vt/2+Ee/2}})}},[re,u,_,V,R]);k==="shift"||R==="shift"||i==="center"?ve.push(ue,ee):ve.push(ee,ue),ve.push(F7({...re,apply({elements:{floating:vt},availableWidth:Ft,availableHeight:ne,rects:xe}){if(!F.current)return;let H=vt.style;H.setProperty("--available-width",`${Ft}px`),H.setProperty("--available-height",`${ne}px`);let Pe=qr(vt).devicePixelRatio||1,{x:Vt,y:Ee,width:Ro,height:Ie}=xe.reference,mr=(Math.round((Vt+Ro)*Pe)-Math.round(Vt*Pe))/Pe,me=(Math.round((Ee+Ie)*Pe)-Math.round(Ee*Pe))/Pe;H.setProperty("--anchor-width",`${mr}px`),H.setProperty("--anchor-height",`${me}px`)}}),tee(vt=>({element:fe.current||Ko(vt.elements.floating).createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(vt){let{elements:Ft,middlewareData:ne,placement:xe,rects:H,y:Pe}=vt,Vt=pi(xe),Ee=sa(Vt),Ro=fe.current,Ie=ne.arrow?.x||0,mr=ne.arrow?.y||0,me=Ro?.clientWidth||0,he=Ro?.clientHeight||0,ea=Ie+me/2,Wt=mr+he/2,ze=Math.abs(ne.shift?.y||0),Ce=H.reference.height/2,it=typeof n=="function"?n(nee(vt,o,z)):n,ht=ze>it,bt={top:`${ea}px calc(100% + ${it}px)`,bottom:`${ea}px ${-it}px`,left:`calc(100% + ${it}px) ${Wt}px`,right:`${-it}px ${Wt}px`}[Vt],Rr=`${ea}px ${H.reference.y+Ce-Pe}px`;return Ft.floating.style.setProperty("--transform-origin",oe&&Ee==="y"&&ht?Rr:bt),{}}},ree,w),Re(()=>{!v&&g&&g.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[v,g]);let ie=$a.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:le,elements:Oe,x:ke,y:Me,middlewareData:Ne,update:Fe,placement:X,context:ge,isPositioned:Ue,floatingStyles:Ye}=U7({rootContext:g,open:h?v:void 0,placement:O,middleware:ve,strategy:r,whileElementsMounted:h?void 0:(...vt)=>pC(...vt,ie),nodeId:y,externalTree:x}),{sideX:st,sideY:St}=Ne.adaptiveOrigin||_C,dt=Ue?r:"fixed",xt=$a.useMemo(()=>{let vt=w?{position:dt,[st]:ke,[St]:Me}:{position:dt,...Ye};return Ue||(vt.opacity=0),vt},[w,dt,st,ke,St,Me,Ye,Ue]),Xt=$a.useRef(null);Re(()=>{if(!v)return;let vt=L.current,Ft=typeof vt=="function"?vt():vt,xe=(iee(Ft)?Ft.current:Ft)||null||null;xe!==Xt.current&&(le.setPositionReference(xe),Xt.current=xe)},[v,le,N,L]),$a.useEffect(()=>{if(!v)return;let vt=L.current;typeof vt!="function"&&iee(vt)&&vt.current!==Xt.current&&(le.setPositionReference(vt.current),Xt.current=vt.current)},[v,le,N,L]),$a.useEffect(()=>{if(h&&v&&Oe.reference&&Oe.floating)return pC(Oe.reference,Oe.floating,Fe,ie)},[h,v,Oe,Fe,ie]);let Xe=pi(X),fs=see(o,Xe,z),Ga=Mc(X)||"center",kr=!!Ne.hide?.referenceHidden;Re(()=>{S&&v&&Ue&&A(Xe)},[S,v,Ue,Xe]);let Oi=$a.useMemo(()=>({position:"absolute",top:Ne.arrow?.y,left:Ne.arrow?.x}),[Ne.arrow]),an=Ne.arrow?.centerOffset!==0;return $a.useMemo(()=>({positionerStyles:xt,arrowStyles:Oi,arrowRef:fe,arrowUncentered:an,side:fs,align:Ga,physicalSide:Xe,anchorHidden:kr,refs:le,context:ge,isPositioned:Ue,update:Fe}),[xt,Oi,fe,an,fs,Ga,Xe,kr,le,ge,Ue,Fe])}function iee(e){return e!=null&&"current"in e}function kA(e){return e==="starting"?IJ:no}function lee(e,t,{styles:r,transitionStatus:o,props:n,refs:i,hidden:s,inert:l=!1}){let c={...r};return l&&(c.pointerEvents="none"),$t("div",e,{state:t,ref:i,props:[{role:"presentation",hidden:s,style:c},kA(o),n],stateAttributesMapping:W0})}var cee=a(_e(),1);var o9=cee.forwardRef(function(t,r){let{render:o,className:n,disabled:i=!1,focusableWhenDisabled:s=!1,nativeButton:l=!0,style:c,...u}=t,{getButtonProps:d,buttonRef:f}=Rv({disabled:i,focusableWhenDisabled:s,native:l});return $t("button",t,{state:{disabled:i},ref:[r,f],props:[u,d]})});var Bm={};Yr(Bm,{Panel:()=>hee,Root:()=>dee,Trigger:()=>pee});var SC=a(_e(),1);var RA={...$Q,...km};var uee=a(E(),1),dee=SC.forwardRef(function(t,r){let{render:o,className:n,defaultOpen:i=!1,disabled:s=!1,onOpenChange:l,open:c,style:u,...d}=t,f=De(l),m=XQ({open:c,defaultOpen:i,onOpenChange:f,disabled:s}),h=SC.useMemo(()=>({open:m.open,disabled:m.disabled,transitionStatus:m.transitionStatus}),[m.open,m.disabled,m.transitionStatus]),g=SC.useMemo(()=>({...m,onOpenChange:f,state:h}),[m,f,h]),v=$t("div",t,{state:h,ref:r,props:d,stateAttributesMapping:RA});return(0,uee.jsx)(i7.Provider,{value:g,children:v})});var fee=a(_e(),1);var N4e={...JQ,...km},pee=fee.forwardRef(function(t,r){let{panelId:o,open:n,handleTrigger:i,state:s,disabled:l}=$2(),{className:c,disabled:u=l,render:d,nativeButton:f=!0,style:m,...h}=t,{getButtonProps:g,buttonRef:v}=Rv({disabled:u,focusableWhenDisabled:!0,native:f});return $t("button",t,{state:s,ref:[r,v],props:[{"aria-controls":n?o:void 0,"aria-expanded":n,onClick:i},h,g],stateAttributesMapping:N4e})});var mee=a(_e(),1);var n9=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});var hee=mee.forwardRef(function(t,r){let{className:o,hiddenUntilFound:n,keepMounted:i,render:s,id:l,style:c,...u}=t,{mounted:d,onOpenChange:f,open:m,panelId:h,setMounted:g,setPanelIdState:v,setOpen:b,state:_,transitionStatus:y}=$2(),w=n??!1,S=i??!1;Re(()=>{if(l)return v(l),()=>{v(void 0)}},[l,v]);let{height:x,props:C,ref:A,shouldPreventOpenAnimation:k,shouldRender:R,transitionStatus:M,width:P}=uJ({externalRef:r,hiddenUntilFound:w,id:h,keepMounted:S,mounted:d,onOpenChange:f,open:m,setMounted:g,setOpen:b,transitionStatus:y}),T={..._,transitionStatus:M},N=Y2(c,T),L=$t("div",{...t,style:void 0},{state:T,ref:A,props:[C,{style:{[n9.collapsiblePanelHeight]:x===void 0?"auto":`${x}px`,[n9.collapsiblePanelWidth]:P===void 0?"auto":`${P}px`}},u,N?{style:N}:void 0,k?{style:{animationName:"none"}}:void 0],stateAttributesMapping:RA});return R?L:null});var gee=a(_e(),1);function vee(e={}){let{highlightItemOnHover:t,highlightedIndex:r,onHighlightedIndexChange:o}=aA(),{ref:n,index:i}=eA(e),s=r===i,l=gee.useRef(null),c=Pf(n,l);return{compositeProps:{tabIndex:s?0:-1,onFocus(){o(i)},onMouseMove(){let d=l.current;if(!t||!d)return;let f=d.hasAttribute("disabled")||d.ariaDisabled==="true";!s&&!f&&d.focus()}},compositeRef:c,index:i}}var ji=a(_e(),1),xee=a(Vu(),1);var bee=a(_e(),1);function yee(e){let[t,r]=bee.useState({current:e,previous:null});return e!==t.current&&r({current:e,previous:t.current}),t.previous}var K0=a(_e(),1);function q0(e){let t=Un(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=wo(e),i=n?e.offsetWidth:r,s=n?e.offsetHeight:o;return(Mm(r)!==i||Mm(o)!==s)&&(r=i,o=s),{width:r,height:o}}function _ee(e){let{popupElement:t,positionerElement:r,content:o,mounted:n,onMeasureLayout:i,onMeasureLayoutComplete:s,side:l,direction:c}=e,u=Am(t,!0,!1),d=R0(),f=K0.useRef(null),m=K0.useRef(!0),h=K0.useRef(Ec),g=De(i),v=De(s),b=K0.useMemo(()=>{let _=l==="top",y=l==="left";return c==="rtl"?(_=_||l==="inline-end",y=y||l==="inline-end"):(_=_||l==="inline-start",y=y||l==="inline-start"),_?{position:"absolute",[l==="top"?"bottom":"top"]:"0",[y?"right":"left"]:"0"}:no},[l,c]);Re(()=>{if(!n){h.current=Ec,m.current=!0,f.current=null;return}if(!t||!r)return;h.current=wee(t,b),i9(t,"auto");let _=IA(t,"position","static"),y=IA(t,"transform","none"),w=IA(t,"scale","1"),S=wee(r,{"--available-width":"max-content","--available-height":"max-content"});function x(){_(),y(),S()}function C(){x(),w()}if(g?.(),m.current||f.current===null){AA(r,"max-content");let M=q0(t);return f.current=M,AA(r,M),C(),v?.(null,M),m.current=!1,()=>{h.current(),h.current=Ec}}AA(r,"max-content");let A=f.current,k=q0(t);f.current=k,i9(t,A),C(),v?.(A,k),AA(r,k);let R=new AbortController;return d.request(()=>{i9(t,k),u(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},R.signal)}),()=>{R.abort(),d.cancel(),h.current(),h.current=Ec}},[o,t,r,u,d,n,g,v,b])}function IA(e,t,r){let o=e.style.getPropertyValue(t);return e.style.setProperty(t,r),()=>{e.style.setProperty(t,o)}}function wee(e,t){let r=[];for(let[o,n]of Object.entries(t))r.push(IA(e,o,n));return r.length?()=>{r.forEach(o=>o())}:Ec}function i9(e,t){let r=t==="auto"?"auto":`${t.width}px`,o=t==="auto"?"auto":`${t.height}px`;e.style.setProperty("--popup-width",r),e.style.setProperty("--popup-height",o)}function AA(e,t){let r=t==="max-content"?"max-content":`${t.width}px`,o=t==="max-content"?"max-content":`${t.height}px`;e.style.setProperty("--positioner-width",r),e.style.setProperty("--positioner-height",o)}var Z0=a(E(),1);function Cee(e){let{store:t,side:r,cssVars:o,children:n}=e,i=Tm(),s=t.useState("activeTriggerElement"),l=t.useState("activeTriggerId"),c=t.useState("open"),u=t.useState("payload"),d=t.useState("mounted"),f=t.useState("popupElement"),m=t.useState("positionerElement"),h=yee(c?s:null),g=D4e(l,u),v=ji.useRef(null),[b,_]=ji.useState(null),[y,w]=ji.useState(null),S=ji.useRef(null),x=ji.useRef(null),C=Am(S,!0,!1),A=R0(),[k,R]=ji.useState(null),[M,P]=ji.useState(!1);Re(()=>(t.set("hasViewport",!0),()=>{t.set("hasViewport",!1)}),[t]);let T=De(()=>{S.current?.style.setProperty("animation","none"),S.current?.style.setProperty("transition","none"),x.current?.style.setProperty("display","none")}),N=De(B=>{S.current?.style.removeProperty("animation"),S.current?.style.removeProperty("transition"),x.current?.style.removeProperty("display"),B&&R(B)}),L=ji.useRef(null);Re(()=>{(!c||!d)&&(L.current=null)},[c,d]),Re(()=>{if(s&&h&&s!==h&&L.current!==s&&v.current){_(v.current),P(!0);let B=F4e(h,s);w(B),A.request(()=>{xee.flushSync(()=>{P(!1)}),C(()=>{_(null),R(null),v.current=null})}),L.current=s}},[s,h,b,C,A]),Re(()=>{let B=S.current;if(!B)return;let O=Ko(B).createElement("div");for(let V of Array.from(B.childNodes))O.appendChild(V.cloneNode(!0));v.current=O});let F=b!=null,D;F?D=(0,Z0.jsxs)(ji.Fragment,{children:[(0,Z0.jsx)("div",{"data-previous":!0,inert:PA(!0),ref:x,style:{...k?{[o.popupWidth]:`${k.width}px`,[o.popupHeight]:`${k.height}px`}:null,position:"absolute"},"data-ending-style":M?void 0:""},"previous"),(0,Z0.jsx)("div",{"data-current":!0,ref:S,"data-starting-style":M?"":void 0,children:n},g)]}):D=(0,Z0.jsx)("div",{"data-current":!0,ref:S,children:n},g),Re(()=>{let B=x.current;!B||!b||B.replaceChildren(...Array.from(b.childNodes))},[b]),_ee({popupElement:f,positionerElement:m,mounted:d,content:u,onMeasureLayout:T,onMeasureLayoutComplete:N,side:r,direction:i});let z={activationDirection:M4e(y),transitioning:F};return{children:D,state:z}}function M4e(e){if(e)return`${See(e.horizontal,5,"right","left")} ${See(e.vertical,5,"down","up")}`}function See(e,t,r,o){return e>t?r:e<-t?o:""}function F4e(e,t){let r=e.getBoundingClientRect(),o=t.getBoundingClientRect(),n={x:r.left+r.width/2,y:r.top+r.height/2},i={x:o.left+o.width/2,y:o.top+o.height/2};return{horizontal:i.x-n.x,vertical:i.y-n.y}}function D4e(e,t){let[r,o]=ji.useState(0),n=ji.useRef(e),i=ji.useRef(t),s=ji.useRef(!1);return Re(()=>{let l=n.current,c=i.current,u=e!==l,d=t!==c;u?(o(f=>f+1),s.current=!d):s.current&&d&&(o(f=>f+1),s.current=!1),n.current=e,i.current=t},[e,t]),`${e??"current"}-${r}`}function Tee(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}var OA=a(_e(),1),L4e=OA.createContext(void 0),B4e={disableStyleElements:!1};function Eee(){return OA.useContext(L4e)??B4e}var kee=a(_e(),1);var X0=a(_e(),1);var NA="data-composite-item-active";var V4e=[];function Pee(e){let{loopFocus:t=!0,orientation:r="both",grid:o,onLoop:n,direction:i,highlightedIndex:s,onHighlightedIndexChange:l,rootRef:c,enableHomeAndEndKeys:u=!1,stopEventPropagation:d=!1,disabledIndices:f,modifierKeys:m=V4e}=e,[h,g]=X0.useState(0),v=o!=null,b=X0.useRef(null),_=Pf(b,c),y=X0.useRef([]),w=X0.useRef(!1),S=s??h,x=De((M,P=!1)=>{if((l??g)(M),P){let T=y.current[M];r9(b.current,T,i,r)}}),C=De(M=>{if(M.size===0||w.current)return;w.current=!0;let P=Array.from(M.keys()),T=P.find(L=>L?.hasAttribute(NA))??null,N=T?P.indexOf(T):-1;if(N!==-1)x(N);else if(fC(P,S,f)){let L=Nv(P,{disabledIndices:f});dC(P,L)||x(L)}r9(b.current,T,i,r)});Re(()=>{if(f==null||s!=null||!w.current)return;let M=y.current;if(fC(M,S,f)){let P=Nv(M,{disabledIndices:f});dC(M,P)||x(P)}},[f,s,S,y,x]);let A=De((M,P,T)=>n?n(M,P,T,y):T),k=De(M=>{let P=u?$$:e9;if(!P.has(M.key)||j4e(M,m)||!b.current)return;let N=i==="rtl",L=N?vC:bC,F={horizontal:L,vertical:Y0,both:L}[r],D=N?bC:vC,z={horizontal:D,vertical:G0,both:D}[r],B=Wn(M.nativeEvent);if(B!=null&&t9(B)&&!Tee(B)){let ce=B.selectionStart,re=B.selectionEnd,fe=B.value??"";if(ce==null||M.shiftKey||ce!==re||M.key!==z&&ce<fe.length||M.key!==F&&ce>0)return}let O=S,V=S7(y,f),W=x7(y,f);o!=null&&(O=o({disabledIndices:f,elementsRef:y,event:M,highlightedIndex:S,loopFocus:t,maxIndex:W,minIndex:V,onLoop:A,orientation:r,rtl:N}));let q={horizontal:[L],vertical:[Y0],both:[L,Y0]}[r],Z={horizontal:[D],vertical:[G0],both:[D,G0]}[r],Q=v?P:{horizontal:u?Q$:J7,vertical:u?J$:$7,both:P}[r];u&&(M.key===yC?O=V:M.key===wC&&(O=W)),O===S&&(q.includes(M.key)||Z.includes(M.key))&&(t&&O===W&&q.includes(M.key)?(O=V,n&&(O=n(M,S,O,y))):t&&O===V&&Z.includes(M.key)?(O=W,n&&(O=n(M,S,O,y))):O=Nv(y.current,{startingIndex:O,decrement:Z.includes(M.key),disabledIndices:f})),O!==S&&!dC(y.current,O)&&(d&&M.stopPropagation(),Q.has(M.key)&&M.preventDefault(),x(O,!0),queueMicrotask(()=>{y.current[O]?.focus()}))});return{props:{ref:_,onFocus(M){let P=b.current,T=Wn(M.nativeEvent);!P||T==null||!t9(T)||T.setSelectionRange(0,T.value.length??0)},onKeyDown:k},highlightedIndex:S,onHighlightedIndexChange:x,elementsRef:y,disabledIndices:f,onMapChange:C,relayKeyboardEvent:k}}function j4e(e,t){for(let r of eee.values())if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}var s9=a(E(),1);function Ree(e){let{render:t,className:r,style:o,refs:n=Q1,props:i=Q1,state:s=no,stateAttributesMapping:l,highlightedIndex:c,onHighlightedIndexChange:u,orientation:d,grid:f,loopFocus:m,onLoop:h,enableHomeAndEndKeys:g,onMapChange:v,stopEventPropagation:b=!0,rootRef:_,disabledIndices:y,modifierKeys:w,highlightItemOnHover:S=!1,tag:x="div",...C}=e,A=Tm(),{props:k,highlightedIndex:R,onHighlightedIndexChange:M,elementsRef:P,onMapChange:T,relayKeyboardEvent:N}=Pee({grid:f,loopFocus:m,onLoop:h,orientation:d,highlightedIndex:c,onHighlightedIndexChange:u,rootRef:_,stopEventPropagation:b,enableHomeAndEndKeys:g,direction:A,disabledIndices:y,modifierKeys:w}),L=$t(x,e,{state:s,ref:n,props:[k,...i,C],stateAttributesMapping:l}),F=kee.useMemo(()=>({highlightedIndex:R,onHighlightedIndexChange:M,highlightItemOnHover:S,relayKeyboardEvent:N}),[R,M,S,N]);return(0,s9.jsx)(a7.Provider,{value:F,children:(0,s9.jsx)(W2,{elementsRef:P,onMapChange:D=>{v?.(D),T(D)},children:L})})}var MA=a(_e(),1),Aee=a(Vu(),1);var Iee=a(E(),1),Oee=MA.forwardRef(function(t,r){let{children:o,container:n,className:i,render:s,style:l,...c}=t,{portalNode:u,portalSubtree:d}=C7({container:n,ref:r,componentProps:t,elementProps:c});return!d&&!u?null:(0,Iee.jsxs)(MA.Fragment,{children:[d,u&&Aee.createPortal(o,u)]})});var Nee=a(mC(),1);function z4e(){return Ec}function H4e(){return!1}function U4e(){return!0}function Mee(){return(0,Nee.useSyncExternalStore)(z4e,H4e,U4e)}var Dc={};Yr(Dc,{Indicator:()=>jee,List:()=>Uee,Panel:()=>Hee,Root:()=>Lee,Tab:()=>Bee});var Zo=a(_e(),1);var FA=a(_e(),1),a9=FA.createContext(void 0);function Vm(){let e=FA.useContext(a9);if(e===void 0)throw new Error(No(64));return e}var Fee=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});var Hu={tabActivationDirection:e=>({[Fee.activationDirection]:e})};var l9=a(E(),1),Lee=Zo.forwardRef(function(t,r){let{className:o,defaultValue:n=0,onValueChange:i,orientation:s="horizontal",render:l,value:c,style:u,...d}=t,f=t.defaultValue!==void 0,m=Zo.useRef([]),[h,g]=Zo.useState(()=>new Map),[v,b]=H2({controlled:c,default:n,name:"Tabs",state:"value"}),_=c!==void 0,[y,w]=Zo.useState(()=>new Map),S=Zo.useRef(void 0),x=Zo.useCallback($=>{if($===void 0)return null;for(let[te,de]of y.entries())if(de!=null&&$===(de.value??de.index))return te;return null},[y]),[C,A]=Zo.useState(()=>({previousValue:v,tabActivationDirection:"none"})),{previousValue:k,tabActivationDirection:R}=C,M=R,P=!1;k!==v&&(M=Dee(k,v,s,y),P=k!=null&&v!=null&&x(v)==null);let T=P?k:v,N=k!==T||R!==M;Re(()=>{N&&A({previousValue:T,tabActivationDirection:M})},[T,N,M]);let L=De(($,te)=>{let de=Dee(v,$,s,y);te.activationDirection=de,i?.($,te),!te.isCanceled&&b($)}),F=De(($,te)=>{i?.($,Ct(te,void 0,void 0,{activationDirection:"none"}))}),D=De(($,te)=>{g(de=>{if(de.get($)===te)return de;let ve=new Map(de);return ve.set($,te),ve})}),z=De(($,te)=>{g(de=>{if(!de.has($)||de.get($)!==te)return de;let ve=new Map(de);return ve.delete($),ve})}),B=Zo.useCallback($=>h.get($),[h]),O=Zo.useCallback($=>{for(let te of y.values())if($===te?.value)return te?.id},[y]),V=Zo.useMemo(()=>({getTabElementBySelectedValue:x,getTabIdByPanelValue:O,getTabPanelIdByValue:B,onValueChange:L,orientation:s,registerMountedTabPanel:D,setTabMap:w,unregisterMountedTabPanel:z,tabActivationDirection:M,value:v}),[x,O,B,L,s,D,w,z,M,v]),W=Zo.useMemo(()=>{for(let $ of y.values())if($!=null&&$.value===v)return $},[y,v]),q=Zo.useMemo(()=>{for(let $ of y.values())if($!=null&&!$.disabled)return $.value},[y]),Z=Zo.useRef(!f),Q=Zo.useRef(n),ce=Zo.useRef(f),re=Zo.useRef(!1);Re(()=>{if(_)return;function $(we,oe){b(we),A(ee=>ee.previousValue===we&&ee.tabActivationDirection==="none"?ee:{previousValue:we,tabActivationDirection:"none"}),F(we,oe),Z.current=!1}if(y.size===0){re.current&&v!==null&&!S.current?.isConnected&&$(null,Ke.missing);return}re.current=!0,S.current=y.keys().next().value;let te=W?.disabled,de=W==null&&v!==null;if(!te&&v===Q.current&&(ce.current=!1),ce.current&&te&&v===Q.current)return;let ve=Z.current;if(te||de){let we=q??null;if(v===we){Z.current=!1;return}let oe=Ke.missing;ve?oe=Ke.initial:te&&(oe=Ke.disabled),$(we,oe);return}ve&&W!=null&&(F(v,Ke.initial),Z.current=!1)},[q,_,F,W,b,y,v]);let pe=$t("div",t,{state:{orientation:s,tabActivationDirection:M},ref:r,props:d,stateAttributesMapping:Hu});return(0,l9.jsx)(a9.Provider,{value:V,children:(0,l9.jsx)(W2,{elementsRef:m,children:pe})})});function Dee(e,t,r,o){if(e==null||t==null)return"none";let n=null,i=null;for(let[c,u]of o.entries()){if(u==null)continue;let d=u.value??u.index;if(e===d&&(n=c),t===d&&(i=c),n!=null&&i!=null)break}if(n==null||i==null)return n!==i&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?r==="horizontal"?t>e?"right":"left":t>e?"down":"up":"none";let s=n.getBoundingClientRect(),l=i.getBoundingClientRect();if(r==="horizontal"){if(l.left<s.left)return"left";if(l.left>s.left)return"right"}else{if(l.top<s.top)return"up";if(l.top>s.top)return"down"}return"none"}var Of=a(_e(),1);var DA=a(_e(),1),c9=DA.createContext(void 0);function LA(){let e=DA.useContext(c9);if(e===void 0)throw new Error(No(65));return e}var Bee=Of.forwardRef(function(t,r){let{className:o,disabled:n=!1,render:i,value:s,id:l,nativeButton:c=!0,style:u,...d}=t,{value:f,getTabPanelIdByValue:m,orientation:h,tabActivationDirection:g}=Vm(),{activateOnFocus:v,highlightedTabIndex:b,onTabActivation:_,registerTabResizeObserverElement:y,setHighlightedTabIndex:w,tabsListElement:S}=LA(),x=Pm(l),C=Of.useMemo(()=>({disabled:n,id:x,value:s}),[n,x,s]),{compositeProps:A,compositeRef:k,index:R}=vee({metadata:C}),M=s===f,P=Of.useRef(!1),T=Of.useRef(null);Re(()=>{let Z=T.current;if(Z)return y(Z)},[y]),Re(()=>{if(P.current){P.current=!1;return}if(!(M&&R>-1&&b!==R))return;let Z=S;if(Z!=null){let Q=F0(Ko(Z));if(Q&&or(Z,Q))return}n||w(R)},[M,R,b,w,n,S]);let{getButtonProps:N,buttonRef:L}=Rv({disabled:n,native:c,focusableWhenDisabled:!0}),F=m(s),D=Of.useRef(!1),z=Of.useRef(!1);function B(Z){M||n||_(s,Ct(Ke.none,Z.nativeEvent,void 0,{activationDirection:"none"}))}function O(Z){M||(R>-1&&!n&&w(R),!n&&v&&(!D.current||D.current&&z.current)&&_(s,Ct(Ke.none,Z.nativeEvent,void 0,{activationDirection:"none"})))}function V(Z){if(M||n)return;D.current=!0;function Q(){D.current=!1,z.current=!1}(!Z.button||Z.button===0)&&(z.current=!0,Ko(Z.currentTarget).addEventListener("pointerup",Q,{once:!0}))}return $t("button",t,{state:{disabled:n,active:M,orientation:h,tabActivationDirection:g},ref:[r,L,k,T],props:[A,{role:"tab","aria-controls":F,"aria-selected":M,id:x,onClick:B,onFocus:O,onPointerDown:V,[NA]:M?"":void 0,onKeyDownCapture(){P.current=!0}},d,N],stateAttributesMapping:Hu})});var Q0=a(_e(),1);var Vee='!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();';var Lv=(function(e){return e.activeTabLeft="--active-tab-left",e.activeTabRight="--active-tab-right",e.activeTabTop="--active-tab-top",e.activeTabBottom="--active-tab-bottom",e.activeTabWidth="--active-tab-width",e.activeTabHeight="--active-tab-height",e})({});var BA=a(E(),1),W4e={...Hu,activeTabPosition:()=>null,activeTabSize:()=>null},jee=Q0.forwardRef(function(t,r){let{className:o,render:n,renderBeforeHydration:i=!1,style:s,...l}=t,{nonce:c}=Eee(),{getTabElementBySelectedValue:u,orientation:d,tabActivationDirection:f,value:m}=Vm(),{tabsListElement:h,registerIndicatorUpdateListener:g}=LA(),v=Mee(),b=k$();Q0.useEffect(()=>g(b),[g,b]);let _=0,y=0,w=0,S=0,x=0,C=0,A=!1;if(m!=null&&h!=null){let L=u(m);if(L!=null){A=!0;let{width:F,height:D}=q0(L),{width:z,height:B}=q0(h),O=L.getBoundingClientRect(),V=h.getBoundingClientRect(),W=z>0?V.width/z:1,q=B>0?V.height/B:1;if(Math.abs(W)>Number.EPSILON&&Math.abs(q)>Number.EPSILON){let Q=O.left-V.left,ce=O.top-V.top;_=Q/W+h.scrollLeft-h.clientLeft,w=ce/q+h.scrollTop-h.clientTop}else _=L.offsetLeft,w=L.offsetTop;x=F,C=D,y=h.scrollWidth-_-x,S=h.scrollHeight-w-C}}let k=A?{left:_,right:y,top:w,bottom:S}:null,R=A?{width:x,height:C}:null,M=A?{[Lv.activeTabLeft]:`${_}px`,[Lv.activeTabRight]:`${y}px`,[Lv.activeTabTop]:`${w}px`,[Lv.activeTabBottom]:`${S}px`,[Lv.activeTabWidth]:`${x}px`,[Lv.activeTabHeight]:`${C}px`}:void 0,P=A&&x>0&&C>0,N=$t("span",t,{state:{orientation:d,activeTabPosition:k,activeTabSize:R,tabActivationDirection:f},ref:r,props:[{role:"presentation",style:M,hidden:!P},l,{suppressHydrationWarning:!0}],stateAttributesMapping:W4e});return m==null?null:(0,BA.jsxs)(Q0.Fragment,{children:[N,v&&i&&(0,BA.jsx)("script",{nonce:c,dangerouslySetInnerHTML:{__html:Vee},suppressHydrationWarning:!0})]})});var J0=a(_e(),1);var zee=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e[e.startingStyle=Xa.startingStyle]="startingStyle",e[e.endingStyle=Xa.endingStyle]="endingStyle",e})({});var G4e={...Hu,...km},Hee=J0.forwardRef(function(t,r){let{className:o,value:n,render:i,keepMounted:s=!1,style:l,...c}=t,{value:u,getTabIdByPanelValue:d,orientation:f,tabActivationDirection:m,registerMountedTabPanel:h,unregisterMountedTabPanel:g}=Vm(),v=Pm(),b=J0.useMemo(()=>({id:v,value:n}),[v,n]),{ref:_,index:y}=eA({metadata:b}),w=n===u,{mounted:S,transitionStatus:x,setMounted:C}=A0(w),A=!S,k=d(n),R={hidden:A,orientation:f,tabActivationDirection:m,transitionStatus:x},M=J0.useRef(null),P=$t("div",t,{state:R,ref:[r,_,M],props:[{"aria-labelledby":k,hidden:A,id:v,role:"tabpanel",tabIndex:w?0:-1,inert:PA(!w),[zee.index]:y},c],stateAttributesMapping:G4e});return Im({open:w,ref:M,onComplete(){w||C(!1)}}),Re(()=>{if(!(A&&!s)&&v!=null)return h(n,v),()=>{g(n,v)}},[A,s,n,v,h,g]),s||S?P:null});var Fc=a(_e(),1);var u9=a(E(),1),Uee=Fc.forwardRef(function(t,r){let{activateOnFocus:o=!1,className:n,loopFocus:i=!0,render:s,style:l,...c}=t,{onValueChange:u,orientation:d,value:f,setTabMap:m,tabActivationDirection:h}=Vm(),[g,v]=Fc.useState(0),[b,_]=Fc.useState(null),y=Fc.useRef(new Set),w=Fc.useRef(new Set),S=Fc.useRef(null);Re(()=>{if(typeof ResizeObserver>"u")return;let P=new ResizeObserver(()=>{y.current.forEach(T=>{T()})});return S.current=P,b&&P.observe(b),w.current.forEach(T=>{P.observe(T)}),()=>{P.disconnect(),S.current=null}},[b]);let x=De(P=>(y.current.add(P),()=>{y.current.delete(P)})),C=De(P=>(w.current.add(P),S.current?.observe(P),()=>{w.current.delete(P),S.current?.unobserve(P)})),A=De((P,T)=>{P!==f&&u(P,T)}),k={orientation:d,tabActivationDirection:h},R={"aria-orientation":d==="vertical"?"vertical":void 0,role:"tablist"},M=Fc.useMemo(()=>({activateOnFocus:o,highlightedTabIndex:g,registerIndicatorUpdateListener:x,registerTabResizeObserverElement:C,onTabActivation:A,setHighlightedTabIndex:v,tabsListElement:b}),[o,g,x,C,A,v,b]);return(0,u9.jsx)(c9.Provider,{value:M,children:(0,u9.jsx)(Ree,{render:s,className:n,style:l,state:k,refs:[r,_],props:[R,c],stateAttributesMapping:Hu,highlightedIndex:g,enableHomeAndEndKeys:!0,loopFocus:i,orientation:d,onHighlightedIndexChange:v,onMapChange:m,disabledIndices:Q1})})});var ca={};Yr(ca,{Arrow:()=>ite,Handle:()=>xC,Popup:()=>ote,Portal:()=>$ee,Positioner:()=>tte,Provider:()=>ste,Root:()=>Gee,Trigger:()=>Xee,Viewport:()=>cte,createHandle:()=>ute});var Uu=a(_e(),1);var VA=a(_e(),1),d9=VA.createContext(void 0);function Ml(e){let t=VA.useContext(d9);if(t===void 0&&!e)throw new Error(No(72));return t}var Wee=a(_e(),1);var Y4e={...G$,disabled:jt(e=>e.disabled),instantType:jt(e=>e.instantType),isInstantPhase:jt(e=>e.isInstantPhase),trackCursorAxis:jt(e=>e.trackCursorAxis),disableHoverablePopup:jt(e=>e.disableHoverablePopup),lastOpenChangeReason:jt(e=>e.openChangeReason),closeOnClick:jt(e=>e.closeOnClick),closeDelay:jt(e=>e.closeDelay),hasViewport:jt(e=>e.hasViewport)},$0=class e extends j0{constructor(t,r,o=!1){let n=new Dm,i={...q4e(),...t};i.floatingRootContext=U$(n,r,o),super(i,{popupRef:Wee.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:n},Y4e)}setOpen=(t,r)=>{M$(this,t,r,{extraState:{openChangeReason:r.reason}})};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,Ct(Ke.triggerPress,t))}static useStore(t,r){return N$(t,(n,i)=>new e(r,n,i)).store}};function q4e(){return{...H$(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var jA=a(E(),1),Gee=j7(function(t){let{disabled:r=!1,defaultOpen:o=!1,open:n,disableHoverablePopup:i=!1,trackCursorAxis:s="none",actionsRef:l,onOpenChange:c,onOpenChangeComplete:u,handle:d,triggerId:f,defaultTriggerId:m=null,children:h}=t,g=$0.useStore(d?.store,{open:o,openProp:n,activeTriggerId:m,triggerIdProp:f});F$(g,n,o,m),g.useControlledProp("openProp",n),g.useControlledProp("triggerIdProp",f),g.useContextCallback("onOpenChange",c),g.useContextCallback("onOpenChangeComplete",u);let v=g.useState("open"),b=!r&&v,_=g.useState("activeTriggerId"),y=g.useState("mounted"),w=g.useState("payload");g.useSyncedValues({trackCursorAxis:s,disableHoverablePopup:i}),g.useSyncedValue("disabled",r),L$(g,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:S,transitionStatus:x}=B$(b,g),C=g.useState("isInstantPhase"),A=g.useState("instantType"),k=g.useState("lastOpenChangeReason"),R=Uu.useRef(null);Re(()=>{v&&r&&g.setOpen(!1,Ct(Ke.disabled))},[v,r,g]),Re(()=>{x==="ending"&&k===Ke.none||x!=="ending"&&C?(A!=="delay"&&(R.current=A),g.set("instantType","delay")):R.current!==null&&(g.set("instantType",R.current),R.current=null)},[x,C,k,A,g]),Re(()=>{b&&_==null&&g.set("payload",void 0)},[g,_,b]);let M=Uu.useCallback(()=>{g.setOpen(!1,Ct(Ke.imperativeAction))},[g]);Uu.useImperativeHandle(l,()=>({unmount:S,close:M}),[S,M]);let P=b||y||!r&&s!=="none";return(0,jA.jsxs)(d9.Provider,{value:g,children:[P&&(0,jA.jsx)(K4e,{store:g,disabled:r,trackCursorAxis:s}),typeof h=="function"?h({payload:w}):h]})});function K4e({store:e,disabled:t,trackCursorAxis:r}){let o=e.useState("floatingRootContext"),n=E7(o,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),i=T7(o,{enabled:!t&&r!=="none",axis:r==="none"?void 0:r}),s=Uu.useMemo(()=>gr(i.reference,n.reference),[i.reference,n.reference]),l=Uu.useMemo(()=>gr(i.trigger,n.trigger),[i.trigger,n.trigger]),c=Uu.useMemo(()=>gr(O$,i.floating,n.floating),[i.floating,n.floating]);return V$(e,{activeTriggerProps:s,inactiveTriggerProps:l,popupProps:c}),null}var HA=a(_e(),1);var zA=a(_e(),1),f9=zA.createContext(void 0);function Yee(){return zA.useContext(f9)}var qee=(function(e){return e[e.popupOpen=gC.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});var Zee="data-base-ui-tooltip-trigger";function Kee(e){if("composedPath"in e){let r=e.composedPath();for(let o=0;o<r.length;o+=1){let n=r[o];if(lt(n))return n}}let t=e.target;return lt(t)?t:null}function Z4e(e){let t=e;for(;t;){if(t.hasAttribute(Zee))return t;let r=t.parentElement;if(r){t=r;continue}let o=t.getRootNode();t="host"in o&&lt(o.host)?o.host:null}return null}var Xee=T$(function(t,r){let{render:o,className:n,style:i,handle:s,payload:l,disabled:c,delay:u,closeOnClick:d=!0,closeDelay:f,id:m,...h}=t,g=Ml(!0),v=s?.store??g;if(!v)throw new Error(No(82));let b=Pm(m),_=v.useState("isTriggerActive",b),y=v.useState("isOpenedByTrigger",b),w=v.useState("floatingRootContext"),S=HA.useRef(null),x=u??600,C=f??0,{registerTrigger:A,isMountedByThisTrigger:k}=D$(b,S,v,{payload:l,closeOnClick:d,closeDelay:C}),R=Yee(),{delayRef:M,isInstantPhase:P,hasProvider:T}=_7(w,{open:y}),N=U0(w);v.useSyncedValue("isInstantPhase",P);let L=v.useState("disabled"),F=c??L,D=Li(F),z=v.useState("trackCursorAxis"),B=v.useState("disableHoverablePopup"),O=HA.useRef(!1),V=Ac(),W=HA.useRef(void 0);function q(){let ve=R?.delay,we=typeof M.current=="object"?M.current.open:void 0,oe=x;return T&&(we!==0?oe=u??ve??x:oe=0),oe}function Z(ve){let we=S.current;if(!we||!ve)return!1;let oe=Z4e(ve);return oe!==null&&oe!==we&&or(we,oe)}function Q(ve){let we=Z(ve);return O.current=we,we&&(N.openChangeTimeout.clear(),N.restTimeout.clear(),N.restTimeoutPending=!1,V.clear()),we}let ce=Z7(w,{enabled:!F,mouseOnly:!0,move:!1,handleClose:!B&&z!=="both"?X7():null,restMs:q,delay(){let ve=typeof M.current=="object"?M.current.close:void 0,we=C;return f==null&&T&&(we=ve),{close:we}},triggerElementRef:S,isActiveTrigger:_,isClosing:()=>v.select("transitionStatus")==="ending",shouldOpen(){return!O.current}}),re=G7(w,{enabled:!F}).reference,fe=ve=>{let we=O.current,oe=Kee(ve),ee=Q(oe),ue=S.current,ie=ue&&oe&&or(ue,oe);if(ee&&v.select("open")&&v.select("lastOpenChangeReason")===Ke.triggerHover){v.setOpen(!1,Ct(Ke.triggerHover,ve));return}if(we&&!ee&&ie&&!D.current&&!v.select("open")&&ue&&Rf(W.current)){let le=()=>{!O.current&&!D.current&&!v.select("open")&&v.setOpen(!0,Ct(Ke.triggerHover,ve,ue))},Oe=q();Oe===0?(V.clear(),le()):V.start(Oe,le)}},pe=v.useState("triggerProps",k);return $t("button",t,{state:{open:y},ref:[r,A,S],props:[ce,re,k||z!=="none"?pe:void 0,{onMouseOver(ve){fe(ve.nativeEvent)},onFocus(ve){Z(Kee(ve.nativeEvent))&&ve.preventBaseUIHandler()},onMouseLeave(){O.current=!1,V.clear(),W.current=void 0},onPointerEnter(ve){W.current=ve.pointerType},onPointerDown(ve){W.current=ve.pointerType,v.set("closeOnClick",d),d&&!v.select("open")&&v.cancelPendingOpen(ve.nativeEvent)},onClick(ve){d&&!v.select("open")&&v.cancelPendingOpen(ve.nativeEvent)},id:b,[qee.triggerDisabled]:F?"":void 0,[Zee]:F?void 0:""},h],stateAttributesMapping:Z$})});var Jee=a(_e(),1);var UA=a(_e(),1),p9=UA.createContext(void 0);function Qee(){let e=UA.useContext(p9);if(e===void 0)throw new Error(No(70));return e}var m9=a(E(),1),$ee=Jee.forwardRef(function(t,r){let{keepMounted:o=!1,...n}=t;return Ml().useState("mounted")||o?(0,m9.jsx)(p9.Provider,{value:o,children:(0,m9.jsx)(Oee,{ref:r,...n})}):null});var GA=a(_e(),1);var WA=a(_e(),1),h9=WA.createContext(void 0);function ew(){let e=WA.useContext(h9);if(e===void 0)throw new Error(No(71));return e}var ete=a(E(),1),tte=GA.forwardRef(function(t,r){let{render:o,className:n,anchor:i,positionMethod:s="absolute",side:l="top",align:c="center",sideOffset:u=0,alignOffset:d=0,collisionBoundary:f="clipping-ancestors",collisionPadding:m=5,arrowPadding:h=5,sticky:g=!1,disableAnchorTracking:v=!1,collisionAvoidance:b=OJ,style:_,...y}=t,w=Ml(),S=Qee(),x=w.useState("open"),C=w.useState("mounted"),A=w.useState("trackCursorAxis"),k=w.useState("disableHoverablePopup"),R=w.useState("floatingRootContext"),M=w.useState("instantType"),P=w.useState("transitionStatus"),T=w.useState("hasViewport"),N=aee({anchor:i,positionMethod:s,floatingRootContext:R,mounted:C,side:l,sideOffset:u,align:c,alignOffset:d,collisionBoundary:f,collisionPadding:m,sticky:g,arrowPadding:h,disableAnchorTracking:v,keepMounted:S,collisionAvoidance:b,adaptiveOrigin:T?oee:void 0}),L=GA.useMemo(()=>({open:x,side:N.side,align:N.align,anchorHidden:N.anchorHidden,instant:A!=="none"?"tracking-cursor":M}),[x,N.side,N.align,N.anchorHidden,A,M]),F=lee(t,L,{styles:N.positionerStyles,transitionStatus:P,props:y,refs:[r,w.useStateSetter("positionerElement")],hidden:!C,inert:!x||A==="both"||k});return(0,ete.jsx)(h9.Provider,{value:N,children:F})});var rte=a(_e(),1);var X4e={...W0,...km},ote=rte.forwardRef(function(t,r){let{render:o,className:n,style:i,...s}=t,l=Ml(),{side:c,align:u}=ew(),d=l.useState("open"),f=l.useState("instantType"),m=l.useState("transitionStatus"),h=l.useState("popupProps"),g=l.useState("floatingRootContext"),v=l.useState("disabled"),b=l.useState("closeDelay");Im({open:d,ref:l.context.popupRef,onComplete(){d&&l.context.onOpenChangeComplete?.(!0)}}),K7(g,{enabled:!v,closeDelay:b});let _=l.useStateSetter("popupElement");return $t("div",t,{state:{open:d,side:c,align:u,instant:f,transitionStatus:m},ref:[r,l.context.popupRef,_],props:[h,kA(m),s],stateAttributesMapping:X4e})});var nte=a(_e(),1);var ite=nte.forwardRef(function(t,r){let{render:o,className:n,style:i,...s}=t,l=Ml(),{arrowRef:c,side:u,align:d,arrowUncentered:f,arrowStyles:m}=ew(),h=l.useState("open"),g=l.useState("instantType");return $t("div",t,{state:{open:h,side:u,align:d,uncentered:f,instant:g},ref:[r,c],props:[{style:m,"aria-hidden":!0},s],stateAttributesMapping:W0})});var g9=a(_e(),1);var v9=a(E(),1),ste=function(t){let{delay:r,closeDelay:o,timeout:n=400}=t,i=g9.useMemo(()=>({delay:r,closeDelay:o}),[r,o]),s=g9.useMemo(()=>({open:r,close:o}),[r,o]);return(0,v9.jsx)(f9.Provider,{value:i,children:(0,v9.jsx)(w7,{delay:s,timeoutMs:n,children:t.children})})};var lte=a(_e(),1);var ate=(function(e){return e.popupWidth="--popup-width",e.popupHeight="--popup-height",e})({});var Q4e={activationDirection:e=>e?{"data-activation-direction":e}:null},cte=lte.forwardRef(function(t,r){let{render:o,className:n,style:i,children:s,...l}=t,c=Ml(),u=ew(),d=c.useState("instantType"),{children:f,state:m}=Cee({store:c,side:u.side,cssVars:ate,children:s}),h={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:d};return $t("div",t,{state:h,ref:r,props:[l,{children:f}],stateAttributesMapping:Q4e})});var xC=class{constructor(){this.store=new $0}open(t){let r=t?this.store.context.triggerElements.getById(t):void 0;if(t&&!r)throw new Error(No(81,t));this.store.setOpen(!0,Ct(Ke.imperativeAction,void 0,r))}close(){this.store.setOpen(!1,Ct(Ke.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function ute(){return new xC}function fn(e){return $t(e.defaultTagName??"div",e,e)}var pte=a(U(),1),b9="data-wp-hash";function y9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&$4e(document)),e.__wpStyleRuntime}function J4e(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${b9}]`))if(r.getAttribute(b9)===t)return!0;return!1}function mte(e,t,r){if(!e.head)return;let o=y9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(J4e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(b9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function $4e(e){let t=y9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)mte(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 hte(e,t){let r=y9();r.styles.set(e,t);for(let o of r.documents.keys())mte(o,e,t)}typeof process>"u",hte("a495f9d138",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer 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-emphasis,600);--_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-emphasis,600)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_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-emphasis,600);--_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-emphasis,600);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-emphasis,600);--_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-emphasis,600);--_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-emphasis,600);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-default,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-default,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,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-default,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-default,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,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 dte={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",hte("af6d9984a6","._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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}");var fte={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},xs=(0,pte.forwardRef)(function({variant:t="body-md",render:r,className:o,...n},i){return fn({render:r,defaultTagName:"span",ref:i,props:gr(n,{className:J(dte.text,fte.heading,fte.p,dte[t],o)})})});var yte=a(E(),1),w9="data-wp-hash";function _9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&tBe(document)),e.__wpStyleRuntime}function eBe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${w9}]`))if(r.getAttribute(w9)===t)return!0;return!1}function bte(e,t,r){if(!e.head)return;let o=_9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(eBe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(w9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function tBe(e){let t=_9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)bte(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 rBe(e,t){let r=_9();r.styles.set(e,t);for(let o of r.documents.keys())bte(o,e,t)}typeof process>"u",rBe("9db2873e7f","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer 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-background-surface-error,#f6e6e3);color:var(--wpds-color-foreground-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-background-surface-warning,#fde6be);color:var(--wpds-color-foreground-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-background-surface-caution,#fee995);color:var(--wpds-color-foreground-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-background-surface-success,#c6f7cd);color:var(--wpds-color-foreground-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-background-surface-info,#deebfa);color:var(--wpds-color-foreground-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-foreground-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);color:var(--wpds-color-foreground-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 gte={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"},CC=(0,vte.forwardRef)(function({intent:t="none",className:r,...o},n){return(0,yte.jsx)(xs,{ref:n,className:J(gte.badge,gte[`is-${t}-intent`],r),...o,variant:"body-sm"})});var wte=a(Ol(),1),YA=a(U(),1),_te=a(j(),1),xte=a(E(),1),S9="data-wp-hash";function x9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&nBe(document)),e.__wpStyleRuntime}function oBe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${S9}]`))if(r.getAttribute(S9)===t)return!0;return!1}function Ste(e,t,r){if(!e.head)return;let o=x9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(oBe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(S9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function nBe(e){let t=x9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Ste(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 qA(e,t){let r=x9();r.styles.set(e,t);for(let o of r.documents.keys())Ste(o,e,t)}typeof process>"u",qA("b74f1ac304",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-emphasis,600);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:border-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&:before{aspect-ratio:1;border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid;border-block-end-color:transparent;border-block-start-color:var(--wp-ui-button-foreground-color);border-inline-end-color:var(--wp-ui-button-foreground-color);border-inline-start-color:transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:var(--wp-ui-button-font-size);inset-inline-start:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);@media not (prefers-reduced-motion){transition:opacity .1s ease-out}@media (forced-colors:active){border-block-end-style:none;border-bottom-color:ButtonText;border-inline-start-style:none;border-left-color:ButtonText;border-right-color:ButtonText;border-top-color:ButtonText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0px;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}*{opacity:0}&:before{opacity:1;transition-delay:.05s;@media not (prefers-reduced-motion){animation:_5a1d53da6f830c8d__loading-animation 1s linear infinite}}}}@keyframes _5a1d53da6f830c8d__loading-animation{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}}');var TC={button:"_97b0fc33c028be1a__button","is-unstyled":"abbb272e2ce49bd6__is-unstyled","is-loading":"_914b42f315c0e580__is-loading","is-small":"_908205475f9f2a92__is-small",icon:"_9f6fc6553aeb36fe__icon","is-brand":"dd460c965226cc77__is-brand","is-outline":"_62d5a778b7b258ee__is-outline","is-minimal":"ad0619a3217c6a5b__is-minimal","is-neutral":"e722a8f96726aa99__is-neutral","is-solid":"b50b3358c5fb4d0b__is-solid","is-compact":"cf59cf1b69629838__is-compact","loading-animation":"_5a1d53da6f830c8d__loading-animation"};typeof process>"u",qA("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var iBe={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",qA("5f8e7aa0bc","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._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,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,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,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");var sBe={"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"};typeof process>"u",qA("af6d9984a6","._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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}");var aBe={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},Cte=(0,YA.forwardRef)(function({tone:t="brand",variant:r="solid",size:o="default",className:n,focusableWhenDisabled:i=!0,disabled:s,loading:l,loadingAnnouncement:c=(0,_te.__)("Loading"),children:u,...d},f){let m=J(aBe.button,iBe["box-sizing"],sBe["outset-ring--focus-except-active"],r!=="unstyled"&&TC.button,TC[`is-${t}`],TC[`is-${r}`],TC[`is-${o}`],l&&TC["is-loading"],n);return(0,YA.useEffect)(()=>{l&&c&&(0,wte.speak)(c)},[l,c]),(0,xte.jsx)(o9,{ref:f,className:m,focusableWhenDisabled:i,disabled:s??l,...d,children:u})});var kte=a(U(),1);var Tte=a(U(),1),Ete=a(Se(),1),Pte=a(E(),1),Nf=(0,Tte.forwardRef)(function({icon:t,size:r=24,...o},n){return(0,Pte.jsx)(Ete.SVG,{ref:n,...t.props,...o,width:r,height:r})});var Ate=a(E(),1),C9="data-wp-hash";function T9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&cBe(document)),e.__wpStyleRuntime}function lBe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${C9}]`))if(r.getAttribute(C9)===t)return!0;return!1}function Rte(e,t,r){if(!e.head)return;let o=T9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(lBe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(C9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function cBe(e){let t=T9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Rte(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 uBe(e,t){let r=T9();r.styles.set(e,t);for(let o of r.documents.keys())Rte(o,e,t)}typeof process>"u",uBe("b74f1ac304",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-emphasis,600);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:border-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&:before{aspect-ratio:1;border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid;border-block-end-color:transparent;border-block-start-color:var(--wp-ui-button-foreground-color);border-inline-end-color:var(--wp-ui-button-foreground-color);border-inline-start-color:transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:var(--wp-ui-button-font-size);inset-inline-start:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);@media not (prefers-reduced-motion){transition:opacity .1s ease-out}@media (forced-colors:active){border-block-end-style:none;border-bottom-color:ButtonText;border-inline-start-style:none;border-left-color:ButtonText;border-right-color:ButtonText;border-top-color:ButtonText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0px;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}*{opacity:0}&:before{opacity:1;transition-delay:.05s;@media not (prefers-reduced-motion){animation:_5a1d53da6f830c8d__loading-animation 1s linear infinite}}}}@keyframes _5a1d53da6f830c8d__loading-animation{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}}');var dBe={button:"_97b0fc33c028be1a__button","is-unstyled":"abbb272e2ce49bd6__is-unstyled","is-loading":"_914b42f315c0e580__is-loading","is-small":"_908205475f9f2a92__is-small",icon:"_9f6fc6553aeb36fe__icon","is-brand":"dd460c965226cc77__is-brand","is-outline":"_62d5a778b7b258ee__is-outline","is-minimal":"ad0619a3217c6a5b__is-minimal","is-neutral":"e722a8f96726aa99__is-neutral","is-solid":"b50b3358c5fb4d0b__is-solid","is-compact":"cf59cf1b69629838__is-compact","loading-animation":"_5a1d53da6f830c8d__loading-animation"},E9=(0,kte.forwardRef)(function({className:t,icon:r,...o},n){return(0,Ate.jsx)(Nf,{ref:n,icon:r,className:J(dBe.icon,t),size:24,...o})});E9.displayName="Button.Icon";var Ite=Object.assign(Cte,{Icon:E9});var Wu={};Yr(Wu,{Content:()=>XA,FullBleed:()=>zte,Header:()=>ZA,Root:()=>KA,Title:()=>Ute});var Ote=a(U(),1),P9="data-wp-hash";function k9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&pBe(document)),e.__wpStyleRuntime}function fBe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${P9}]`))if(r.getAttribute(P9)===t)return!0;return!1}function Nte(e,t,r){if(!e.head)return;let o=k9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(fBe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(P9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function pBe(e){let t=k9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Nte(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 Mte(e,t){let r=k9();r.styles.set(e,t);for(let o of r.documents.keys())Nte(o,e,t)}typeof process>"u",Mte("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var mBe={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",Mte("5d38cbdd27","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer 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-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-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)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");var hBe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},KA=(0,Ote.forwardRef)(function({render:t,...r},o){let n=J(hBe.root,mBe["box-sizing"]);return fn({defaultTagName:"div",render:t,ref:o,props:gr({className:n},r)})});var Fte=a(U(),1),R9="data-wp-hash";function A9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&vBe(document)),e.__wpStyleRuntime}function gBe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${R9}]`))if(r.getAttribute(R9)===t)return!0;return!1}function Dte(e,t,r){if(!e.head)return;let o=A9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(gBe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(R9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function vBe(e){let t=A9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Dte(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 bBe(e,t){let r=A9();r.styles.set(e,t);for(let o of r.documents.keys())Dte(o,e,t)}typeof process>"u",bBe("5d38cbdd27","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer 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-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-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)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");var yBe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},ZA=(0,Fte.forwardRef)(function({render:t,...r},o){return fn({defaultTagName:"div",render:t,ref:o,props:gr({className:yBe.header},r)})});var Lte=a(U(),1),I9="data-wp-hash";function O9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&_Be(document)),e.__wpStyleRuntime}function wBe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${I9}]`))if(r.getAttribute(I9)===t)return!0;return!1}function Bte(e,t,r){if(!e.head)return;let o=O9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(wBe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(I9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function _Be(e){let t=O9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Bte(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 SBe(e,t){let r=O9();r.styles.set(e,t);for(let o of r.documents.keys())Bte(o,e,t)}typeof process>"u",SBe("5d38cbdd27","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer 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-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-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)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");var xBe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},XA=(0,Lte.forwardRef)(function({render:t,...r},o){return fn({defaultTagName:"div",render:t,ref:o,props:gr({className:xBe.content},r)})});var Vte=a(U(),1),N9="data-wp-hash";function M9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&TBe(document)),e.__wpStyleRuntime}function CBe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${N9}]`))if(r.getAttribute(N9)===t)return!0;return!1}function jte(e,t,r){if(!e.head)return;let o=M9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(CBe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(N9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function TBe(e){let t=M9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)jte(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 EBe(e,t){let r=M9();r.styles.set(e,t);for(let o of r.documents.keys())jte(o,e,t)}typeof process>"u",EBe("5d38cbdd27","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer 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-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-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)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");var PBe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},zte=(0,Vte.forwardRef)(function({render:t,...r},o){return fn({defaultTagName:"div",render:t,ref:o,props:gr({className:PBe.fullbleed},r)})});var Hte=a(U(),1);var F9=a(E(),1),kBe=(0,F9.jsx)("div",{}),Ute=(0,Hte.forwardRef)(function({render:t=kBe,children:r,...o},n){return(0,F9.jsx)(xs,{ref:n,variant:"heading-lg",render:t,...o,children:r})});var Wte=a(U(),1),Gte=a(E(),1),D9=(0,Wte.forwardRef)(function(t,r){return(0,Gte.jsx)(Bm.Panel,{ref:r,...t})});var Yte=a(U(),1),qte=a(E(),1),L9=(0,Yte.forwardRef)(function(t,r){return(0,qte.jsx)(Bm.Root,{ref:r,...t})});var Kte=a(U(),1),Zte=a(E(),1),B9=(0,Kte.forwardRef)(function(t,r){return(0,Zte.jsx)(Bm.Trigger,{ref:r,...t})});var Bv={};Yr(Bv,{Content:()=>sre,Header:()=>tre,HeaderDescription:()=>ore,Root:()=>Qte});var Xte=a(U(),1);var j9=a(E(),1),Qte=(0,Xte.forwardRef)(function({render:t,...r},o){return(0,j9.jsx)(L9,{ref:o,render:(0,j9.jsx)(KA,{render:t}),...r})});var rw=a(U(),1);var Jte=a(U(),1),QA=(0,Jte.createContext)({setDescriptionId:()=>{}});var Mf=a(E(),1),z9="data-wp-hash";function H9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&ABe(document)),e.__wpStyleRuntime}function RBe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${z9}]`))if(r.getAttribute(z9)===t)return!0;return!1}function ere(e,t,r){if(!e.head)return;let o=H9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(RBe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(z9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function ABe(e){let t=H9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)ere(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 U9(e,t){let r=H9();r.styles.set(e,t);for(let o of r.documents.keys())ere(o,e,t)}typeof process>"u",U9("78199613cf","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer 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-foreground-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&._03cfdbcd710393c9__overflow-visible{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 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 tw={"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","overflow-visible":"_03cfdbcd710393c9__overflow-visible","content-inner":"_41bfdbf7b6c087c2__content-inner"};typeof process>"u",U9("af6d9984a6","._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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}");var $te={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"};typeof process>"u",U9("5f8e7aa0bc","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._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,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,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,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");var IBe={"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"},tre=(0,rw.forwardRef)(function({children:t,className:r,render:o,...n},i){let[s,l]=(0,rw.useState)(),c=(0,rw.useMemo)(()=>({setDescriptionId:l}),[l]);return fn({defaultTagName:"div",render:o,ref:i,props:gr(n,{className:J($te.heading,tw["heading-wrapper"],r),children:(0,Mf.jsx)(QA.Provider,{value:c,children:(0,Mf.jsxs)(B9,{className:tw.header,render:(0,Mf.jsx)(ZA,{}),nativeButton:!1,"aria-describedby":s,children:[(0,Mf.jsx)("div",{className:tw["header-content"],children:t}),(0,Mf.jsx)("div",{className:J(tw["header-trigger-positioner"]),children:(0,Mf.jsx)("div",{className:J(tw["header-trigger-wrapper"],$te.div,IBe["outset-ring--focus-parent-visible"]),children:(0,Mf.jsx)(Nf,{icon:s1,className:tw["header-trigger"]})})})]})})})})});var jm=a(U(),1);var rre=a(E(),1),ore=(0,jm.forwardRef)(function({children:t,className:r,...o},n){let i=(0,jm.useId)(),{setDescriptionId:s}=(0,jm.useContext)(QA);return(0,jm.useEffect)(()=>(s(i),()=>s(void 0)),[i,s]),(0,rre.jsx)("div",{ref:n,id:i,"aria-hidden":"true",className:r,...o,children:t})});var nre=a(U(),1);var Y9=a(E(),1),G9="data-wp-hash";function q9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&NBe(document)),e.__wpStyleRuntime}function OBe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${G9}]`))if(r.getAttribute(G9)===t)return!0;return!1}function ire(e,t,r){if(!e.head)return;let o=q9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(OBe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(G9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function NBe(e){let t=q9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)ire(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 MBe(e,t){let r=q9();r.styles.set(e,t);for(let o of r.documents.keys())ire(o,e,t)}typeof process>"u",MBe("78199613cf","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer 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-foreground-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&._03cfdbcd710393c9__overflow-visible{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 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 W9={"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","overflow-visible":"_03cfdbcd710393c9__overflow-visible","content-inner":"_41bfdbf7b6c087c2__content-inner"},sre=(0,nre.forwardRef)(function({className:t,render:r,children:o,hiddenUntilFound:n=!0,...i},s){return(0,Y9.jsx)(D9,{ref:s,className:l=>J(W9.content,l.open&&l.transitionStatus==="idle"&&W9["overflow-visible"],t),hiddenUntilFound:n,...i,children:(0,Y9.jsx)(XA,{className:W9["content-inner"],render:r,children:o})})});var are=a(U(),1);function K9(e,t,r){return(0,are.cloneElement)(e??t,{children:r})}var FBe=a(Z9(),1);var cre=a(xf(),1),{lock:Mkt,unlock:ure}=(0,cre.__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/ui");function DBe(){let e=FBe;if(e.ThemeProvider)return e.ThemeProvider;if(!e.privateApis)throw new Error("@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`.");return ure(e.privateApis).ThemeProvider}var dre=DBe();var fre=a(U(),1),X9="data-wp-hash";function Q9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&BBe(document)),e.__wpStyleRuntime}function LBe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${X9}]`))if(r.getAttribute(X9)===t)return!0;return!1}function pre(e,t,r){if(!e.head)return;let o=Q9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(LBe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(X9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function BBe(e){let t=Q9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)pre(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 VBe(e,t){let r=Q9();r.styles.set(e,t);for(let o of r.documents.keys())pre(o,e,t)}typeof process>"u",VBe("32aba35fe1","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");var jBe={stack:"_19ce0419607e1896__stack"},zBe={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)"},se=(0,fre.forwardRef)(function({direction:t,gap:r,align:o,justify:n,wrap:i,render:s,...l},c){let u={gap:r&&zBe[r],alignItems:o,justifyContent:n,flexDirection:t,flexWrap:i};return fn({render:s,ref:c,props:gr(l,{style:u,className:jBe.stack})})});var Ze={};Yr(Ze,{Popup:()=>Ere,Portal:()=>JA,Positioner:()=>$A,Provider:()=>Nre,Root:()=>Ire,Trigger:()=>Rre});var Cre=a(U(),1);var bre=a(U(),1);var $9="data-wp-hash";function ej(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&UBe(document)),e.__wpStyleRuntime}function HBe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${$9}]`))if(r.getAttribute($9)===t)return!0;return!1}function hre(e,t,r){if(!e.head)return;let o=ej(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(HBe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute($9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function UBe(e){let t=ej();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)hre(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 WBe(e,t){let r=ej();r.styles.set(e,t);for(let o of r.documents.keys())hre(o,e,t)}typeof process>"u",WBe("be37f31c1e","._11fc52b637ff8a7e__slot{inset:0;isolation:isolate;pointer-events:none;position:fixed;z-index:1000000003}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._11fc52b637ff8a7e__slot>*{pointer-events:auto}}}");var mre={slot:"_11fc52b637ff8a7e__slot"},gre="data-wp-compat-overlay-slot";function GBe(){return typeof document>"u"?null:document}function YBe(){let e;try{e=window.top?.wp}catch{}let t=e??window.wp;return typeof t?.components=="object"&&t.components!==null}var Gu=null;function J9(e){return e.setAttribute("aria-hidden","false"),e}function qBe(e){let t=e.createElement("div");return t.setAttribute(gre,""),mre.slot&&t.classList.add(mre.slot),e.body.appendChild(t),t}function vre(){if(typeof window>"u"||!YBe()&&window.__wpUiCompatOverlaySlotEnabled!==!0)return;let e=GBe();if(!e||!e.body)return;if(Gu&&Gu.ownerDocument===e&&Gu.isConnected)return J9(Gu);let t=e.querySelector(`[${gre}]`);return t instanceof HTMLDivElement?(Gu=J9(t),Gu):(Gu?.isConnected&&Gu.remove(),Gu=J9(qBe(e)),Gu)}var yre=a(E(),1),JA=(0,bre.forwardRef)(function({container:t,...r},o){return(0,yre.jsx)(ca.Portal,{container:t??vre(),...r,ref:o})});var wre=a(U(),1),xre=a(E(),1),tj="data-wp-hash";function rj(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&ZBe(document)),e.__wpStyleRuntime}function KBe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${tj}]`))if(r.getAttribute(tj)===t)return!0;return!1}function _re(e,t,r){if(!e.head)return;let o=rj(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(KBe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(tj,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function ZBe(e){let t=rj();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)_re(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 Sre(e,t){let r=rj();r.styles.set(e,t);for(let o of r.documents.keys())_re(o,e,t)}typeof process>"u",Sre("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var XBe={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",Sre("19fcc06039",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');var QBe={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},$A=(0,wre.forwardRef)(function({align:t="center",className:r,side:o="top",sideOffset:n=4,...i},s){return(0,xre.jsx)(ca.Positioner,{ref:s,align:t,side:o,sideOffset:n,...i,className:J(XBe["box-sizing"],QBe.positioner,r)})});var EC=a(E(),1),oj="data-wp-hash";function nj(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&$Be(document)),e.__wpStyleRuntime}function JBe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${oj}]`))if(r.getAttribute(oj)===t)return!0;return!1}function Tre(e,t,r){if(!e.head)return;let o=nj(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(JBe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(oj,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function $Be(e){let t=nj();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Tre(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 eVe(e,t){let r=nj();r.styles.set(e,t);for(let o of r.documents.keys())Tre(o,e,t)}typeof process>"u",eVe("19fcc06039",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');var tVe={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},rVe={background:"#1e1e1e"},Ere=(0,Cre.forwardRef)(function({portal:t,positioner:r,children:o,className:n,...i},s){let l=(0,EC.jsx)(dre,{color:rVe,children:(0,EC.jsx)(ca.Popup,{ref:s,className:J(tVe.popup,n),...i,children:o})}),c=K9(r,(0,EC.jsx)($A,{}),l);return K9(t,(0,EC.jsx)(JA,{}),c)});var Pre=a(U(),1),kre=a(E(),1),Rre=(0,Pre.forwardRef)(function(t,r){return(0,kre.jsx)(ca.Trigger,{ref:r,...t})});var Are=a(E(),1);function Ire(e){return(0,Are.jsx)(ca.Root,{...e})}var Ore=a(E(),1);function Nre({...e}){return(0,Ore.jsx)(ca.Provider,{...e})}var zm=a(U(),1);function Mre(e){let t=(0,zm.useRef)(e);t.current=e;let r=(0,zm.useRef)(null),o=(0,zm.useRef)(!1),n=(0,zm.useCallback)(()=>{o.current||(r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t.current(),r.current=null},0))},[]);return(0,zm.useEffect)(()=>(o.current=!1,()=>{o.current=!0,r.current&&clearTimeout(r.current)}),[]),n}var Fre=a(U(),1),ij="data-wp-hash";function sj(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&nVe(document)),e.__wpStyleRuntime}function oVe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${ij}]`))if(r.getAttribute(ij)===t)return!0;return!1}function Dre(e,t,r){if(!e.head)return;let o=sj(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(oVe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(ij,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function nVe(e){let t=sj();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Dre(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 iVe(e,t){let r=sj();r.styles.set(e,t);for(let o of r.documents.keys())Dre(o,e,t)}typeof process>"u",iVe("fa606a57ae","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer 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 sVe={"visually-hidden":"f37b9e2e191ebd66__visually-hidden"},Gt=(0,Fre.forwardRef)(function({render:t,...r},o){return fn({render:t,ref:o,props:gr({className:sVe["visually-hidden"]},r,{"data-visually-hidden":""})})});var Lre=a(U(),1),Bre=a(j(),1),ow=a(E(),1),aj="data-wp-hash";function lj(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&lVe(document)),e.__wpStyleRuntime}function aVe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${aj}]`))if(r.getAttribute(aj)===t)return!0;return!1}function Vre(e,t,r){if(!e.head)return;let o=lj(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(aVe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(aj,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function lVe(e){let t=lj();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Vre(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 tI(e,t){let r=lj();r.styles.set(e,t);for(let o of r.documents.keys())Vre(o,e,t)}typeof process>"u",tI("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var cVe={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",tI("5f8e7aa0bc","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._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,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,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,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");var uVe={"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"};typeof process>"u",tI("e8e6a9be37",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.d4250949359b05ce__link{text-decoration-thickness:from-font;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{--_gcd-a-color:inherit;color:inherit;text-decoration:none}._0cb411afac4c86c7__link-icon{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-padding-xs,4px);text-decoration:none}._0cb411afac4c86c7__link-icon:after{content:"\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2196"}}}');var eI={link:"d4250949359b05ce__link","is-brand":"c6055659b8e2cd2c__is-brand","is-neutral":"_92e0dfcaeee15b88__is-neutral","is-unstyled":"cf122a9bf1035d42__is-unstyled","link-icon":"_0cb411afac4c86c7__link-icon"};typeof process>"u",tI("af6d9984a6","._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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}");var dVe={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},cj=(0,Lre.forwardRef)(function({children:t,variant:r="default",tone:o="brand",openInNewTab:n=!1,render:i,className:s,...l},c){return fn({render:i,defaultTagName:"a",ref:c,props:gr(l,{className:J(dVe.a,cVe["box-sizing"],uVe["outset-ring--focus-except-active"],r!=="unstyled"&&eI.link,r!=="unstyled"&&eI[`is-${o}`],r==="unstyled"&&eI["is-unstyled"],s),target:n?"_blank":void 0,children:(0,ow.jsxs)(ow.Fragment,{children:[t,n&&(0,ow.jsx)("span",{className:eI["link-icon"],role:"img","aria-label":(0,Bre.__)("(opens in a new tab)")})]})})})});var zre=a(U(),1),uj="data-wp-hash";function dj(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&pVe(document)),e.__wpStyleRuntime}function fVe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${uj}]`))if(r.getAttribute(uj)===t)return!0;return!1}function Hre(e,t,r){if(!e.head)return;let o=dj(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(fVe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(uj,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function pVe(e){let t=dj();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Hre(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 Ure(e,t){let r=dj();r.styles.set(e,t);for(let o of r.documents.keys())Hre(o,e,t)}typeof process>"u",Ure("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var mVe={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",Ure("ed2c39ec90","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.b20cc1690085c2f0__skeleton{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);display:block;@media (forced-colors:active){border:var(--wpds-border-width-xs,1px) solid CanvasText}}._9b143194fdb45f93__pulse{@media not (prefers-reduced-motion){animation:e2b9fe0690281bc8__skeleton-pulse 1.5s ease-in-out infinite}}@keyframes e2b9fe0690281bc8__skeleton-pulse{0%,to{opacity:1}50%{opacity:.4}}}}");var jre={skeleton:"b20cc1690085c2f0__skeleton",pulse:"_9b143194fdb45f93__pulse","skeleton-pulse":"e2b9fe0690281bc8__skeleton-pulse"},fj=(0,zre.forwardRef)(function({render:t,...r},o){return fn({render:t,ref:o,props:gr({className:J(jre.skeleton,jre.pulse,mVe["box-sizing"]),"aria-hidden":!0},r)})});var En={};Yr(En,{List:()=>qre,Panel:()=>toe,Root:()=>ooe,Tab:()=>soe});var Vv=a(U(),1);var Gre=a(Te(),1),rI=a(E(),1),pj="data-wp-hash";function mj(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&gVe(document)),e.__wpStyleRuntime}function hVe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${pj}]`))if(r.getAttribute(pj)===t)return!0;return!1}function Yre(e,t,r){if(!e.head)return;let o=mj(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(hVe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(pj,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function gVe(e){let t=mj();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Yre(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 vVe(e,t){let r=mj();r.styles.set(e,t);for(let o of r.documents.keys())Yre(o,e,t)}typeof process>"u",vVe("bb8cbb8f31",`@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7313adbc8a112e90__tablist{--direction-factor:1;--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-factor:-1;--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:transparent 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,transparent 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid transparent;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6e6e6e);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)
			&[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:transparent;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:var(--wpds-dimension-size-lg,40px);padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]
				[role=tab]:is([aria-selected=true])
				&{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}`);var PC={tablist:"_7313adbc8a112e90__tablist","is-overflowing-first":"_9f2ac729c68a735a__is-overflowing-first","is-overflowing-last":"_81c799c1f3cdd261__is-overflowing-last","is-minimal-variant":"_59228b5227f38a99__is-minimal-variant",indicator:"_1c37dcfaa1ad8cda__indicator",tab:"a5fd8814f195aa5e__tab","tab-children":"_5dfc77e6edd345d4__tab-children","tab-chevron":"_4a20e969d15e5ac1__tab-chevron"},Wre=1,qre=(0,Vv.forwardRef)(function({children:t,variant:r="default",className:o,activateOnFocus:n,...i},s){let[l,c]=(0,Vv.useState)(null),[u,d]=(0,Vv.useState)({first:!1,last:!1,isScrolling:!1});(0,Vv.useEffect)(()=>{if(!l)return;let m=()=>{let{scrollWidth:y,clientWidth:w,scrollLeft:S}=l,x=Math.max(y-w,0),A=(l.dir||(typeof window<"u"?window.getComputedStyle(l).direction:"ltr"))==="rtl"&&S<0?-S:S,k={first:A>Wre,last:A<x-Wre,isScrolling:y>w};d(R=>R.first===k.first&&R.last===k.last&&R.isScrolling===k.isScrolling?R:k)},h=new ResizeObserver(m),g=()=>{h.disconnect(),h.observe(l),l.querySelectorAll('[role="tab"]').forEach(y=>h.observe(y))},v=new MutationObserver(g);v.observe(l,{childList:!0,subtree:!0});let b=!1,_=()=>{b||(requestAnimationFrame(()=>{m(),b=!1}),b=!0)};return l.addEventListener("scroll",_,{passive:!0}),g(),m(),()=>{l.removeEventListener("scroll",_),h.disconnect(),v.disconnect()}},[l]);let f=(0,Gre.useMergeRefs)([s,m=>c(m)]);return(0,rI.jsxs)(Dc.List,{ref:f,activateOnFocus:n,"data-select-on-move":n?"true":"false",className:J(PC.tablist,u.first&&PC["is-overflowing-first"],u.last&&PC["is-overflowing-last"],PC[`is-${r}-variant`],o),...i,tabIndex:i.tabIndex??(u.isScrolling?-1:void 0),children:[t,(0,rI.jsx)(Dc.Indicator,{className:PC.indicator})]})});var Qre=a(U(),1);var zi=a(U(),1);var kC=a(E(),1),oI=!1,hj=oI?(0,zi.createContext)(null):null;function bVe(){let e=(0,zi.useContext)(hj);(0,zi.useEffect)(()=>{if(e)return e.registerTab()},[e])}function yVe(){}var Kre=oI?bVe:yVe;function wVe(){let e=(0,zi.useContext)(hj);(0,zi.useEffect)(()=>{if(e)return e.registerPanel()},[e])}function _Ve(){}var Zre=oI?wVe:_Ve;function SVe({children:e}){let t=(0,zi.useRef)(0),r=(0,zi.useRef)(0),o=Mre(()=>{let l=t.current,c=r.current;if(l!==c)throw new Error(`Tabs: Tab/Panel count mismatch (${l} Tabs, ${c} Panels). Each Tab must be associated with exactly one Panel. Mismatched or missing associations can break screen reader navigation and violate WAI-ARIA Tabs pattern requirements.`)}),n=(0,zi.useCallback)(()=>(t.current+=1,o(),()=>{t.current-=1,o()}),[o]),i=(0,zi.useCallback)(()=>(r.current+=1,o(),()=>{r.current-=1,o()}),[o]),s=(0,zi.useMemo)(()=>({registerTab:n,registerPanel:i}),[n,i]);return(0,kC.jsx)(hj.Provider,{value:s,children:e})}function xVe({children:e}){return(0,kC.jsx)(kC.Fragment,{children:e})}var Xre=oI?SVe:xVe;var eoe=a(E(),1),gj="data-wp-hash";function vj(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&TVe(document)),e.__wpStyleRuntime}function CVe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${gj}]`))if(r.getAttribute(gj)===t)return!0;return!1}function Jre(e,t,r){if(!e.head)return;let o=vj(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(CVe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(gj,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function TVe(e){let t=vj();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Jre(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 $re(e,t){let r=vj();r.styles.set(e,t);for(let o of r.documents.keys())Jre(o,e,t)}typeof process>"u",$re("af6d9984a6","._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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}");var EVe={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"};typeof process>"u",$re("5f8e7aa0bc","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._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,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,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,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");var PVe={"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"},toe=(0,Qre.forwardRef)(function({className:t,...r},o){return Zre(),(0,eoe.jsx)(Dc.Panel,{ref:o,className:J(EVe.div,PVe["outset-ring--focus-visible"],t),...r})});var roe=a(U(),1);var bj=a(E(),1),ooe=(0,roe.forwardRef)(function({...t},r){return(0,bj.jsx)(Xre,{children:(0,bj.jsx)(Dc.Root,{ref:r,...t})})});var noe=a(U(),1);var RC=a(E(),1),wj="data-wp-hash";function _j(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&RVe(document)),e.__wpStyleRuntime}function kVe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${wj}]`))if(r.getAttribute(wj)===t)return!0;return!1}function ioe(e,t,r){if(!e.head)return;let o=_j(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(kVe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(wj,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function RVe(e){let t=_j();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)ioe(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 AVe(e,t){let r=_j();r.styles.set(e,t);for(let o of r.documents.keys())ioe(o,e,t)}typeof process>"u",AVe("bb8cbb8f31",`@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7313adbc8a112e90__tablist{--direction-factor:1;--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-factor:-1;--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:transparent 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,transparent 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid transparent;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6e6e6e);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)
			&[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:transparent;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:var(--wpds-dimension-size-lg,40px);padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]
				[role=tab]:is([aria-selected=true])
				&{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}`);var yj={tablist:"_7313adbc8a112e90__tablist","is-overflowing-first":"_9f2ac729c68a735a__is-overflowing-first","is-overflowing-last":"_81c799c1f3cdd261__is-overflowing-last","is-minimal-variant":"_59228b5227f38a99__is-minimal-variant",indicator:"_1c37dcfaa1ad8cda__indicator",tab:"a5fd8814f195aa5e__tab","tab-children":"_5dfc77e6edd345d4__tab-children","tab-chevron":"_4a20e969d15e5ac1__tab-chevron"},soe=(0,noe.forwardRef)(function({className:t,children:r,...o},n){return Kre(),(0,RC.jsxs)(Dc.Tab,{ref:n,className:J(yj.tab,t),...o,children:[(0,RC.jsx)("span",{className:yj["tab-children"],children:r}),(0,RC.jsx)(Nf,{icon:hr,className:yj["tab-chevron"]})]})});var Lc=a(E(),1),{PATTERN_TYPES:IVe}=cn(loe.privateApis);function coe({item:e}){let t=(0,aoe.__)("This pattern cannot be edited.");return(0,Lc.jsx)(q1,{item:e,className:"fields-field__pattern-title",children:e.type===IVe.theme&&(0,Lc.jsxs)(Lc.Fragment,{children:[(0,Lc.jsx)(Gt,{children:t}),(0,Lc.jsxs)(Ze.Root,{children:[(0,Lc.jsx)(Ze.Trigger,{render:(0,Lc.jsx)(Cn,{icon:fV,size:24})}),(0,Lc.jsx)(Ze.Popup,{children:t})]})]})})}var OVe={type:"text",id:"title",label:(0,Sj.__)("Title"),placeholder:(0,Sj.__)("No title"),getValue:({item:e})=>ft(e),render:coe,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},AC=OVe;var xj=a(Lt(),1),Cj=a(j(),1);var doe=a(E(),1);function uoe(e){return typeof e.excerpt=="string"?(0,xj.decodeEntities)(e.excerpt):(0,xj.decodeEntities)(e.excerpt?.raw||"")}var NVe={id:"excerpt",type:"text",label:(0,Cj.__)("Description"),placeholder:(0,Cj.__)("Add a description"),getValue:({item:e})=>uoe(e),render:({item:e})=>{let t=uoe(e);return t?(0,doe.jsx)(xs,{children:t}):null},Edit:{control:"textarea",rows:4},enableSorting:!1,enableHiding:!1,filterBy:!1,enableGlobalSearch:!0},Tj=NVe;var jv=a(j(),1),poe=a(Nl(),1);var moe=a(E(),1),{PATTERN_SYNC_TYPES:nw,PATTERN_TYPES:MVe}=cn(poe.privateApis),foe=[{value:nw.full,label:(0,jv._x)("Synced","pattern (singular)"),description:(0,jv.__)("Patterns that are kept in sync across the site.")},{value:nw.unsynced,label:(0,jv._x)("Not synced","pattern (singular)"),description:(0,jv.__)("Patterns that can be changed freely without affecting the site.")}];function FVe(e){return e.type&&e.type!==MVe.user||e.meta?.wp_pattern_sync_status===nw.unsynced?nw.unsynced:e.wp_pattern_sync_status||nw.full}var DVe={id:"sync-status",type:"text",label:(0,jv.__)("Sync status"),readOnly:!0,enableSorting:!1,enableHiding:!0,elements:foe,filterBy:{operators:["is"],isPrimary:!0},render:({item:e})=>{let t=FVe(e);return(0,moe.jsx)("span",{className:`fields-field__pattern-sync-status fields-field__pattern-sync-status-${t}`,children:foe.find(({value:r})=>r===t)?.label})}},Ej=DVe;var pz=a(j(),1);var Er=a(G(),1),Kv=a(nI(),1),uz=a(ae(),1),KC=a(Y(),1),Kr=a(U(),1),Es=a(j(),1);var gne=a(Ol(),1),hw=a(Tf(),1),vne=a(It(),1);var kj=OC(),pt=e=>IC(e,kj),Rj=OC();pt.write=e=>IC(e,Rj);var iI=OC();pt.onStart=e=>IC(e,iI);var Aj=OC();pt.onFrame=e=>IC(e,Aj);var Ij=OC();pt.onFinish=e=>IC(e,Ij);var iw=[];pt.setTimeout=(e,t)=>{let r=pt.now()+t,o=()=>{let i=iw.findIndex(s=>s.cancel==o);~i&&iw.splice(i,1),Um-=~i?1:0},n={time:r,handler:e,cancel:o};return iw.splice(goe(r),0,n),Um+=1,voe(),n};var goe=e=>~(~iw.findIndex(t=>t.time>e)||~iw.length);pt.cancel=e=>{iI.delete(e),Aj.delete(e),Ij.delete(e),kj.delete(e),Rj.delete(e)};pt.sync=e=>{Pj=!0,pt.batchedUpdates(e),Pj=!1};pt.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function o(...n){t=n,pt.onStart(r)}return o.handler=e,o.cancel=()=>{iI.delete(r),t=null},o};var Oj=typeof window<"u"?window.requestAnimationFrame:()=>{};pt.use=e=>Oj=e;pt.now=typeof performance<"u"?()=>performance.now():Date.now;pt.batchedUpdates=e=>e();pt.catch=console.error;pt.frameLoop="always";pt.advance=()=>{pt.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):yoe()};var Hm=-1,Um=0,Pj=!1;function IC(e,t){Pj?(t.delete(e),e(0)):(t.add(e),voe())}function voe(){Hm<0&&(Hm=0,pt.frameLoop!=="demand"&&Oj(boe))}function LVe(){Hm=-1}function boe(){~Hm&&(Oj(boe),pt.batchedUpdates(yoe))}function yoe(){let e=Hm;Hm=pt.now();let t=goe(Hm);if(t&&(woe(iw.splice(0,t),r=>r.handler()),Um-=t),!Um){LVe();return}iI.flush(),kj.flush(e?Math.min(64,Hm-e):16.667),Aj.flush(),Rj.flush(),Ij.flush()}function OC(){let e=new Set,t=e;return{add(r){Um+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return Um-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,Um-=t.size,woe(t,o=>o(r)&&e.add(o)),Um+=e.size,t=e)}}}function woe(e,t){e.forEach(r=>{try{t(r)}catch(o){pt.catch(o)}})}var Dl=a(_e());function uI(){}var Eoe=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),Ae={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 Yu(e,t){if(Ae.arr(e)){if(!Ae.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 Mr=(e,t)=>e.forEach(t);function Ll(e,t,r){if(Ae.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 ua=e=>Ae.und(e)?[]:Ae.arr(e)?e:[e];function cw(e,t){if(e.size){let r=Array.from(e);e.clear(),Mr(r,t)}}var uw=(e,...t)=>cw(e,r=>r(...t)),Bj=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Vj,Poe,Wm=null,koe=!1,jj=uI,BVe=e=>{e.to&&(Poe=e.to),e.now&&(pt.now=e.now),e.colors!==void 0&&(Wm=e.colors),e.skipAnimation!=null&&(koe=e.skipAnimation),e.createStringInterpolator&&(Vj=e.createStringInterpolator),e.requestAnimationFrame&&pt.use(e.requestAnimationFrame),e.batchedUpdates&&(pt.batchedUpdates=e.batchedUpdates),e.willAdvance&&(jj=e.willAdvance),e.frameLoop&&(pt.frameLoop=e.frameLoop)},el=Object.freeze({__proto__:null,get createStringInterpolator(){return Vj},get to(){return Poe},get colors(){return Wm},get skipAnimation(){return koe},get willAdvance(){return jj},assign:BVe}),NC=new Set,Fl=[],Nj=[],lI=0,dw={get idle(){return!NC.size&&!Fl.length},start(e){lI>e.priority?(NC.add(e),pt.onStart(VVe)):(Roe(e),pt(Dj))},advance:Dj,sort(e){if(lI)pt.onFrame(()=>dw.sort(e));else{let t=Fl.indexOf(e);~t&&(Fl.splice(t,1),Aoe(e))}},clear(){Fl=[],NC.clear()}};function VVe(){NC.forEach(Roe),NC.clear(),pt(Dj)}function Roe(e){Fl.includes(e)||Aoe(e)}function Aoe(e){Fl.splice(jVe(Fl,t=>t.priority>e.priority),0,e)}function Dj(e){let t=Nj;for(let r=0;r<Fl.length;r++){let o=Fl[r];lI=o.priority,o.idle||(jj(o),o.advance(e),o.idle||t.push(o))}return lI=0,Nj=Fl,Nj.length=0,Fl=t,Fl.length>0}function jVe(e,t){let r=e.findIndex(t);return r<0?e.length:r}var Ioe={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},Bc="[-+]?\\d*\\.?\\d+",cI=Bc+"%";function dI(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var zVe=new RegExp("rgb"+dI(Bc,Bc,Bc)),HVe=new RegExp("rgba"+dI(Bc,Bc,Bc,Bc)),UVe=new RegExp("hsl"+dI(Bc,cI,cI)),WVe=new RegExp("hsla"+dI(Bc,cI,cI,Bc)),GVe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,YVe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,qVe=/^#([0-9a-fA-F]{6})$/,KVe=/^#([0-9a-fA-F]{8})$/;function ZVe(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=qVe.exec(e))?parseInt(t[1]+"ff",16)>>>0:Wm&&Wm[e]!==void 0?Wm[e]:(t=zVe.exec(e))?(sw(t[1])<<24|sw(t[2])<<16|sw(t[3])<<8|255)>>>0:(t=HVe.exec(e))?(sw(t[1])<<24|sw(t[2])<<16|sw(t[3])<<8|xoe(t[4]))>>>0:(t=GVe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=KVe.exec(e))?parseInt(t[1],16)>>>0:(t=YVe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=UVe.exec(e))?(_oe(Soe(t[1]),sI(t[2]),sI(t[3]))|255)>>>0:(t=WVe.exec(e))?(_oe(Soe(t[1]),sI(t[2]),sI(t[3]))|xoe(t[4]))>>>0:null}function Mj(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 _oe(e,t,r){let o=r<.5?r*(1+t):r+t-r*t,n=2*r-o,i=Mj(n,o,e+1/3),s=Mj(n,o,e),l=Mj(n,o,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(l*255)<<8}function sw(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function Soe(e){return(parseFloat(e)%360+360)%360/360}function xoe(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function sI(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function Coe(e){let t=ZVe(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 Gm=(e,t,r)=>{if(Ae.fun(e))return e;if(Ae.arr(e))return Gm({range:e,output:t,extrapolate:r});if(Ae.str(e.output[0]))return Vj(e);let o=e,n=o.output,i=o.range||[0,1],s=o.extrapolateLeft||o.extrapolate||"extend",l=o.extrapolateRight||o.extrapolate||"extend",c=o.easing||(u=>u);return u=>{let d=QVe(u,i);return XVe(u,i[d],i[d+1],n[d],n[d+1],c,s,l,o.map)}};function XVe(e,t,r,o,n,i,s,l,c){let u=c?c(e):e;if(u<t){if(s==="identity")return u;s==="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 QVe(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}function Lj(){return Lj=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},Lj.apply(this,arguments)}var aw=Symbol.for("FluidValue.get"),zv=Symbol.for("FluidValue.observers"),Cs=e=>!!(e&&e[aw]),mi=e=>e&&e[aw]?e[aw]():e,zj=e=>e[zv]||null;function JVe(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Hv(e,t){let r=e[zv];r&&r.forEach(o=>{JVe(o,t)})}var lw=class{constructor(t){if(this[aw]=void 0,this[zv]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");$Ve(this,t)}},$Ve=(e,t)=>Ooe(e,aw,t);function Ym(e,t){if(e[aw]){let r=e[zv];r||Ooe(e,zv,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function qm(e,t){let r=e[zv];if(r&&r.has(t)){let o=r.size-1;o?r.delete(t):e[zv]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var Ooe=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),aI=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,e8e=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Toe=new RegExp(`(${aI.source})(%|[a-z]+)`,"i"),t8e=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,fI=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Noe=e=>{let[t,r]=r8e(e);if(!t||Bj())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&&fI.test(r))return Noe(r);if(r)return r}return e},r8e=e=>{let t=fI.exec(e);if(!t)return[,];let[,r,o]=t;return[r,o]},Fj,o8e=(e,t,r,o,n)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(o)}, ${n})`,pI=e=>{Fj||(Fj=Wm?new RegExp(`(${Object.keys(Wm).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>mi(i).replace(fI,Noe).replace(e8e,Coe).replace(Fj,Coe)),r=t.map(i=>i.match(aI).map(Number)),n=r[0].map((i,s)=>r.map(l=>{if(!(s in l))throw Error('The arity of each "output" value must be equal');return l[s]})).map(i=>Gm(Lj({},e,{output:i})));return i=>{var s;let l=!Toe.test(t[0])&&((s=t.find(u=>Toe.test(u)))==null?void 0:s.replace(aI,"")),c=0;return t[0].replace(aI,()=>`${n[c++](i)}${l||""}`).replace(t8e,o8e)}},Moe="react-spring: ",Foe=e=>{let t=e,r=!1;if(typeof t!="function")throw new TypeError(`${Moe}once requires a function parameter`);return(...o)=>{r||(t(...o),r=!0)}},n8e=Foe(console.warn);function Doe(){n8e(`${Moe}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var C2t=Foe(console.warn);function fw(e){return Ae.str(e)&&(e[0]=="#"||/\d/.test(e)||!Bj()&&fI.test(e)||e in(Wm||{}))}var MC=Bj()?Dl.useEffect:Dl.useLayoutEffect,i8e=()=>{let e=(0,Dl.useRef)(!1);return MC(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Hj(){let e=(0,Dl.useState)()[1],t=i8e();return()=>{t.current&&e(Math.random())}}function Loe(e,t){let[r]=(0,Dl.useState)(()=>({inputs:t,result:e()})),o=(0,Dl.useRef)(),n=o.current,i=n;return i?t&&i.inputs&&s8e(t,i.inputs)||(i={inputs:t,result:e()}):i=r,(0,Dl.useEffect)(()=>{o.current=i,n==r&&(r.inputs=r.result=void 0)},[i]),i.result}function s8e(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 Uj=e=>(0,Dl.useEffect)(e,a8e),a8e=[];var WC=a(_e()),GC=a(_e());var zoe=a(_e()),Ff=a(_e()),FC=Symbol.for("Animated:node"),l8e=e=>!!e&&e[FC]===e,Vc=e=>e&&e[FC],vI=(e,t)=>Eoe(e,FC,t),DC=e=>e&&e[FC]&&e[FC].getPayload(),mI=class{constructor(){this.payload=void 0,vI(this,this)}getPayload(){return this.payload||[]}},Uv=class e extends mI{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,Ae.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 Ae.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,Ae.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},Wv=class e extends Uv{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=Gm({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(Ae.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=Gm({output:[this.getValue(),t]})),this._value=0,super.reset()}},hI={dependencies:null},Gv=class extends mI{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let r={};return Ll(this.source,(o,n)=>{l8e(o)?r[n]=o.getValue(t):Cs(o)?r[n]=mi(o):t||(r[n]=o)}),r}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&Mr(this.payload,t=>t.reset())}_makePayload(t){if(t){let r=new Set;return Ll(t,this._addToPayload,r),Array.from(r)}}_addToPayload(t){hI.dependencies&&Cs(t)&&hI.dependencies.add(t);let r=DC(t);r&&Mr(r,o=>this.add(o))}},Wj=class e extends Gv{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(c8e)),!0)}};function c8e(e){return(fw(e)?Wv:Uv).create(e)}function bI(e){let t=Vc(e);return t?t.constructor:Ae.arr(e)?Wj:fw(e)?Wv:Uv}function gI(){return gI=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},gI.apply(this,arguments)}var Boe=(e,t)=>{let r=!Ae.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Ff.forwardRef)((o,n)=>{let i=(0,Ff.useRef)(null),s=r&&(0,Ff.useCallback)(g=>{i.current=d8e(n,g)},[n]),[l,c]=u8e(o,t),u=Hj(),d=()=>{let g=i.current;if(r&&!g)return;(g?t.applyAnimatedValues(g,l.getValue(!0)):!1)===!1&&u()},f=new Gj(d,c),m=(0,Ff.useRef)();MC(()=>(m.current=f,Mr(c,g=>Ym(g,f)),()=>{m.current&&(Mr(m.current.deps,g=>qm(g,m.current)),pt.cancel(m.current.update))})),(0,Ff.useEffect)(d,[]),Uj(()=>()=>{let g=m.current;Mr(g.deps,v=>qm(v,g))});let h=t.getComponentProps(l.getValue());return zoe.createElement(e,gI({},h,{ref:s}))})},Gj=class{constructor(t,r){this.update=t,this.deps=r}eventObserved(t){t.type=="change"&&pt.write(this.update)}};function u8e(e,t){let r=new Set;return hI.dependencies=r,e.style&&(e=gI({},e,{style:t.createAnimatedStyle(e.style)})),e=new Gv(e),hI.dependencies=null,[e,r]}function d8e(e,t){return e&&(Ae.fun(e)?e(t):e.current=t),t}var Voe=Symbol.for("AnimatedComponent"),Hoe=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=n=>new Gv(n),getComponentProps:o=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:o},i=s=>{let l=joe(s)||"Anonymous";return Ae.str(s)?s=i[s]||(i[s]=Boe(s,n)):s=s[Voe]||(s[Voe]=Boe(s,n)),s.displayName=`Animated(${l})`,s};return Ll(e,(s,l)=>{Ae.arr(e)&&(l=joe(s)),i[l]=i(s)}),{animated:i}},joe=e=>Ae.str(e)?e:e&&Ae.str(e.displayName)?e.displayName:Ae.fun(e)&&e.name||null;function Ts(){return Ts=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},Ts.apply(this,arguments)}function Yv(e,...t){return Ae.fun(e)?e(...t):e}var jC=(e,t)=>e===!0||!!(t&&e&&(Ae.fun(e)?e(t):ua(e).includes(t))),ene=(e,t)=>Ae.obj(e)?t&&e[t]:e,tne=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,f8e=e=>e,rne=(e,t=f8e)=>{let r=p8e;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);Ae.und(i)||(o[n]=i)}return o},p8e=["config","onProps","onStart","onChange","onPause","onResume","onRest"],m8e={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 h8e(e){let t={},r=0;if(Ll(e,(o,n)=>{m8e[n]||(t[n]=o,r++)}),r)return t}function one(e){let t=h8e(e);if(t){let r={to:t};return Ll(e,(o,n)=>n in t||(r[n]=o)),r}return Ts({},e)}function zC(e){return e=mi(e),Ae.arr(e)?e.map(zC):fw(e)?el.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Kj(e){return Ae.fun(e)||Ae.arr(e)&&Ae.obj(e[0])}var g8e={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}},_I=1.70158,yI=_I*1.525,Uoe=_I+1,Woe=2*Math.PI/3,Goe=2*Math.PI/4.5,wI=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,v8e={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=>Uoe*e*e*e-_I*e*e,easeOutBack:e=>1+Uoe*Math.pow(e-1,3)+_I*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((yI+1)*2*e-yI)/2:(Math.pow(2*e-2,2)*((yI+1)*(e*2-2)+yI)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Woe),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Woe)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Goe))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Goe)/2+1,easeInBounce:e=>1-wI(1-e),easeOutBounce:wI,easeInOutBounce:e=>e<.5?(1-wI(1-2*e))/2:(1+wI(2*e-1))/2},Zj=Ts({},g8e.default,{mass:1,damping:1,easing:v8e.linear,clamp:!1}),Xj=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,Zj)}};function b8e(e,t,r){r&&(r=Ts({},r),Yoe(r,t),t=Ts({},r,t)),Yoe(e,t),Object.assign(e,t);for(let s in Zj)e[s]==null&&(e[s]=Zj[s]);let{mass:o,frequency:n,damping:i}=e;return Ae.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 Yoe(e,t){if(!Ae.und(t.decay))e.duration=void 0;else{let r=!Ae.und(t.tension)||!Ae.und(t.friction);(r||!Ae.und(t.frequency)||!Ae.und(t.damping)||!Ae.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}var qoe=[],Qj=class{constructor(){this.changed=!1,this.values=qoe,this.toValues=null,this.fromValues=qoe,this.to=void 0,this.from=void 0,this.config=new Xj,this.immediate=!1}};function nne(e,{key:t,props:r,defaultProps:o,state:n,actions:i}){return new Promise((s,l)=>{var c;let u,d,f=jC((c=r.cancel)!=null?c:o?.cancel,t);if(f)g();else{Ae.und(r.pause)||(n.paused=jC(r.pause,t));let v=o?.pause;v!==!0&&(v=n.paused||jC(v,t)),u=Yv(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-pt.now()}function h(){u>0&&!el.skipAnimation?(n.delayed=!0,d=pt.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(Ts({},r,{callId:e,cancel:f}),s)}catch(v){l(v)}}})}var nz=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?pw(e.get()):t.every(r=>r.noop)?ine(e.get()):jc(e.get(),t.every(r=>r.finished)),ine=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),jc=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),pw=e=>({value:e,cancelled:!0,finished:!1});function sne(e,t,r,o){let{callId:n,parentId:i,onRest:s}=t,{asyncTo:l,promise:c}=r;return!i&&e===l&&!t.reset?c:r.promise=(async()=>{r.asyncId=n,r.asyncTo=e;let u=rne(t,(b,_)=>_==="onRest"?void 0:b),d,f,m=new Promise((b,_)=>(d=b,f=_)),h=b=>{let _=n<=(r.cancelId||0)&&pw(o)||n!==r.asyncId&&jc(o,!1);if(_)throw b.result=_,f(b),b},g=(b,_)=>{let y=new SI,w=new xI;return(async()=>{if(el.skipAnimation)throw HC(r),w.result=jc(o,!1),f(w),w;h(y);let S=Ae.obj(b)?Ts({},b):Ts({},_,{to:b});S.parentId=n,Ll(u,(C,A)=>{Ae.und(S[A])&&(S[A]=C)});let x=await o.start(S);return h(y),r.paused&&await new Promise(C=>{r.resumeQueue.add(C)}),x})()},v;if(el.skipAnimation)return HC(r),jc(o,!1);try{let b;Ae.arr(e)?b=(async _=>{for(let y of _)await g(y)})(e):b=Promise.resolve(e(g,o.stop.bind(o))),await Promise.all([b.then(d),m]),v=jc(o.get(),!0,!1)}catch(b){if(b instanceof SI)v=b.result;else if(b instanceof xI)v=b.result;else throw b}finally{n==r.asyncId&&(r.asyncId=i,r.asyncTo=i?l:void 0,r.promise=i?c:void 0)}return Ae.fun(s)&&pt.batchedUpdates(()=>{s(v,o,o.item)}),v})()}function HC(e,t){cw(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var SI=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}},xI=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},Jj=e=>e instanceof UC,y8e=1,UC=class extends lw{constructor(...t){super(...t),this.id=y8e++,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=Vc(this);return t&&t.getValue()}to(...t){return el.to(this,t)}interpolate(...t){return Doe(),el.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){Hv(this,{type:"change",parent:this,value:t,idle:r})}_onPriorityChange(t){this.idle||dw.sort(this),Hv(this,{type:"priority",parent:this,priority:t})}},qv=Symbol.for("SpringPhase"),ane=1,$j=2,ez=4,Yj=e=>(e[qv]&ane)>0,Km=e=>(e[qv]&$j)>0,LC=e=>(e[qv]&ez)>0,Koe=(e,t)=>t?e[qv]|=$j|ane:e[qv]&=~$j,Zoe=(e,t)=>t?e[qv]|=ez:e[qv]&=~ez,tz=class extends UC{constructor(t,r){if(super(),this.key=void 0,this.animation=new Qj,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,!Ae.und(t)||!Ae.und(r)){let o=Ae.obj(t)?Ts({},t):Ts({},r,{from:t});Ae.und(o.default)&&(o.default=!0),this.start(o)}}get idle(){return!(Km(this)||this._state.asyncTo)||LC(this)}get goal(){return mi(this.animation.to)}get velocity(){let t=Vc(this);return t instanceof Uv?t.lastVelocity||0:t.getPayload().map(r=>r.lastVelocity||0)}get hasAnimated(){return Yj(this)}get isAnimating(){return Km(this)}get isPaused(){return LC(this)}get isDelayed(){return this._state.delayed}advance(t){let r=!0,o=!1,n=this.animation,{config:i,toValues:s}=n,l=DC(n.to);!l&&Cs(n.to)&&(s=ua(mi(n.to))),n.values.forEach((d,f)=>{if(d.done)return;let m=d.constructor==Wv?1:l?l[f].lastPosition:s[f],h=n.immediate,g=m;if(!h){if(g=d.lastPosition,i.tension<=0){d.done=!0;return}let v=d.elapsedTime+=t,b=n.fromValues[f],_=d.v0!=null?d.v0:d.v0=Ae.arr(i.velocity)?i.velocity[f]:i.velocity,y,w=i.precision||(b==m?.005:Math.min(1,Math.abs(m-b)*.001));if(Ae.und(i.duration))if(i.decay){let S=i.decay===!0?.998:i.decay,x=Math.exp(-(1-S)*v);g=b+_/(1-S)*(1-x),h=Math.abs(d.lastPosition-g)<=w,y=_*x}else{y=d.lastVelocity==null?_:d.lastVelocity;let S=i.restVelocity||w/10,x=i.clamp?0:i.bounce,C=!Ae.und(x),A=b==m?d.v0>0:b<m,k,R=!1,M=1,P=Math.ceil(t/M);for(let T=0;T<P&&(k=Math.abs(y)>S,!(!k&&(h=Math.abs(m-g)<=w,h)));++T){C&&(R=g==m||g>m==A,R&&(y=-y*x,g=m));let N=-i.tension*1e-6*(g-m),L=-i.friction*.001*y,F=(N+L)/i.mass;y=y+F*M,g=g+y*M}}else{let S=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)),S=(i.progress||0)+v/this._memoizedDuration,S=S>1?1:S<0?0:S,d.durationProgress=S),g=b+i.easing(S)*(m-b),y=(g-d.lastPosition)/t,h=S==1}d.lastVelocity=y,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=Vc(this),u=c.getValue();if(r){let d=mi(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 pt.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Km(this)){let{to:t,config:r}=this.animation;pt.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 Ae.und(t)?(o=this.queue||[],this.queue=[]):o=[Ae.obj(t)?t:Ts({},r,{to:t})],Promise.all(o.map(n=>this._update(n))).then(n=>nz(this,n))}stop(t){let{to:r}=this.animation;return this._focus(this.get()),HC(this._state,t&&this._lastCallId),pt.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=Ae.obj(o)?o[r]:o,(o==null||Kj(o))&&(o=void 0),n=Ae.obj(n)?n[r]:n,n==null&&(n=void 0);let i={to:o,from:n};return Yj(this)||(t.reverse&&([o,n]=[n,o]),n=mi(n),Ae.und(n)?Vc(this)||this._set(o):this._set(n)),i}_update(t,r){let o=Ts({},t),{key:n,defaultProps:i}=this;o.default&&Object.assign(i,rne(o,(c,u)=>/^on/.test(u)?ene(c,n):c)),Qoe(this,o,"onProps"),VC(this,"onProps",o,this);let s=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 nne(++this._lastCallId,{key:n,props:o,defaultProps:i,state:l,actions:{pause:()=>{LC(this)||(Zoe(this,!0),uw(l.pauseQueue),VC(this,"onPause",jc(this,BC(this,this.animation.to)),this))},resume:()=>{LC(this)&&(Zoe(this,!1),Km(this)&&this._resume(),uw(l.resumeQueue),VC(this,"onResume",jc(this,BC(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(c=>{if(o.loop&&c.finished&&!(r&&c.noop)){let u=lne(o);if(u)return this._update(u,!0)}return c})}_merge(t,r,o){if(r.cancel)return this.stop(!0),o(pw(this));let n=!Ae.und(t.to),i=!Ae.und(t.from);if(n||i)if(r.callId>this._lastToId)this._lastToId=r.callId;else return o(pw(this));let{key:s,defaultProps:l,animation:c}=this,{to:u,from:d}=c,{to:f=u,from:m=d}=t;i&&!n&&(!r.default||Ae.und(f))&&(f=m),r.reverse&&([f,m]=[m,f]);let h=!Yu(m,d);h&&(c.from=m),m=mi(m);let g=!Yu(f,u);g&&this._focus(f);let v=Kj(r.to),{config:b}=c,{decay:_,velocity:y}=b;(n||i)&&(b.velocity=0),r.config&&!v&&b8e(b,Yv(r.config,s),r.config!==l.config?Yv(l.config,s):void 0);let w=Vc(this);if(!w||Ae.und(f))return o(jc(this,!0));let S=Ae.und(r.reset)?i&&!r.default:!Ae.und(m)&&jC(r.reset,s),x=S?m:this.get(),C=zC(f),A=Ae.num(C)||Ae.arr(C)||fw(C),k=!v&&(!A||jC(l.immediate||r.immediate,s));if(g){let T=bI(f);if(T!==w.constructor)if(k)w=this._set(C);else throw Error(`Cannot animate between ${w.constructor.name} and ${T.name}, as the "to" prop suggests`)}let R=w.constructor,M=Cs(f),P=!1;if(!M){let T=S||!Yj(this)&&h;(g||T)&&(P=Yu(zC(x),C),M=!P),(!Yu(c.immediate,k)&&!k||!Yu(b.decay,_)||!Yu(b.velocity,y))&&(M=!0)}if(P&&Km(this)&&(c.changed&&!S?M=!0:M||this._stop(u)),!v&&((M||Cs(u))&&(c.values=w.getPayload(),c.toValues=Cs(f)?null:R==Wv?[1]:ua(C)),c.immediate!=k&&(c.immediate=k,!k&&!S&&this._set(u)),M)){let{onRest:T}=c;Mr(w8e,L=>Qoe(this,r,L));let N=jc(this,BC(this,u));uw(this._pendingCalls,N),this._pendingCalls.add(o),c.changed&&pt.batchedUpdates(()=>{c.changed=!S,T?.(N,this),S?Yv(l.onRest,N):c.onStart==null||c.onStart(N,this)})}S&&this._set(x),v?o(sne(r.to,r,this._state,this)):M?this._start():Km(this)&&!g?this._pendingCalls.add(o):o(ine(x))}_focus(t){let r=this.animation;t!==r.to&&(zj(this)&&this._detach(),r.to=t,zj(this)&&this._attach())}_attach(){let t=0,{to:r}=this.animation;Cs(r)&&(Ym(r,this),Jj(r)&&(t=r.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;Cs(t)&&qm(t,this)}_set(t,r=!0){let o=mi(t);if(!Ae.und(o)){let n=Vc(this);if(!n||!Yu(o,n.getValue())){let i=bI(o);!n||n.constructor!=i?vI(this,i.create(o)):n.setValue(o),n&&pt.batchedUpdates(()=>{this._onChange(o,r)})}}return Vc(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,VC(this,"onStart",jc(this,BC(this,t.to)),this))}_onChange(t,r){r||(this._onStart(),Yv(this.animation.onChange,t,this)),Yv(this.defaultProps.onChange,t,this),super._onChange(t,r)}_start(){let t=this.animation;Vc(this).reset(mi(t.to)),t.immediate||(t.fromValues=t.values.map(r=>r.lastPosition)),Km(this)||(Koe(this,!0),LC(this)||this._resume())}_resume(){el.skipAnimation?this.finish():dw.start(this)}_stop(t,r){if(Km(this)){Koe(this,!1);let o=this.animation;Mr(o.values,i=>{i.done=!0}),o.toValues&&(o.onChange=o.onPause=o.onResume=void 0),Hv(this,{type:"idle",parent:this});let n=r?pw(this.get()):jc(this.get(),BC(this,t??o.to));uw(this._pendingCalls,n),o.changed&&(o.changed=!1,VC(this,"onRest",n,this))}}};function BC(e,t){let r=zC(t),o=zC(e.get());return Yu(o,r)}function lne(e,t=e.loop,r=e.to){let o=Yv(t);if(o){let n=o!==!0&&one(o),i=(n||e).reverse,s=!n||n.reset;return rz(Ts({},e,{loop:t,default:!1,pause:void 0,to:!i||Kj(r)?r:void 0,from:s?e.from:void 0,reset:s},n))}}function rz(e){let{to:t,from:r}=e=one(e),o=new Set;return Ae.obj(t)&&Xoe(t,o),Ae.obj(r)&&Xoe(r,o),e.keys=o.size?Array.from(o):null,e}function Xoe(e,t){Ll(e,(r,o)=>r!=null&&t.add(o))}var w8e=["onStart","onRest","onChange","onPause","onResume"];function Qoe(e,t,r){e.animation[r]=t[r]!==tne(t,r)?ene(t[r],e.key):void 0}function VC(e,t,...r){var o,n,i,s;(o=(n=e.animation)[t])==null||o.call(n,...r),(i=(s=e.defaultProps)[t])==null||i.call(s,...r)}var _8e=["onStart","onChange","onRest"],S8e=1,CI=class{constructor(t,r){this.id=S8e++,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(Ts({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];Ae.und(o)||this.springs[r].set(o)}}update(t){return t&&this.queue.push(rz(t)),this}start(t){let{queue:r}=this;return t?r=ua(t).map(rz):this.queue=[],this._flush?this._flush(this,r):(une(this,r),x8e(this,r))}stop(t,r){if(t!==!!t&&(r=t),r){let o=this.springs;Mr(ua(r),n=>o[n].stop(!!t))}else HC(this._state,this._lastAsyncId),this.each(o=>o.stop(!!t));return this}pause(t){if(Ae.und(t))this.start({pause:!0});else{let r=this.springs;Mr(ua(t),o=>r[o].pause())}return this}resume(t){if(Ae.und(t))this.start({pause:!1});else{let r=this.springs;Mr(ua(t),o=>r[o].resume())}return this}each(t){Ll(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,cw(t,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));let s=!n&&this._started,l=i||s&&o.size?this.get():null;i&&r.size&&cw(r,([c,u])=>{u.value=l,c(u,this,this._item)}),s&&(this._started=!1,cw(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;pt.onFrame(this._onFrame)}};function x8e(e,t){return Promise.all(t.map(r=>cne(e,r))).then(r=>nz(e,r))}async function cne(e,t,r){let{keys:o,to:n,from:i,loop:s,onRest:l,onResolve:c}=t,u=Ae.obj(t.default)&&t.default;s&&(t.loop=!1),n===!1&&(t.to=null),i===!1&&(t.from=null);let d=Ae.arr(n)||Ae.fun(n)?n:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):Mr(_8e,v=>{let b=t[v];if(Ae.fun(b)){let _=e._events[v];t[v]=({finished:y,cancelled:w})=>{let S=_.get(b);S?(y||(S.finished=!1),w&&(S.cancelled=!0)):_.set(b,{value:null,finished:y||!1,cancelled:w||!1})},u&&(u[v]=t[v])}});let f=e._state;t.pause===!f.paused?(f.paused=t.pause,uw(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||tne(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(nne(++e._lastAsyncId,{props:t,state:f,actions:{pause:uI,resume:uI,start(v,b){h?(HC(f,e._lastAsyncId),b(pw(e))):(v.onRest=l,b(sne(d,v,f,e)))}}})),f.paused&&await new Promise(v=>{f.resumeQueue.add(v)});let g=nz(e,await Promise.all(m));if(s&&g.finished&&!(r&&g.noop)){let v=lne(t,s,n);if(v)return une(e,[v]),cne(e,v,!0)}return c&&pt.batchedUpdates(()=>c(g,e,e.item)),g}function C8e(e,t){let r=new tz;return r.key=e,t&&Ym(r,t),r}function T8e(e,t,r){t.keys&&Mr(t.keys,o=>{(e[o]||(e[o]=r(o)))._prepareNode(t)})}function une(e,t){Mr(t,r=>{T8e(e.springs,r,o=>C8e(o,e))})}function E8e(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 P8e=["children"],iz=e=>{let{children:t}=e,r=E8e(e,P8e),o=(0,GC.useContext)(TI),n=r.pause||!!o.pause,i=r.immediate||!!o.immediate;r=Loe(()=>({pause:n,immediate:i}),[n,i]);let{Provider:s}=TI;return WC.createElement(s,{value:r},t)},TI=k8e(iz,{});iz.Provider=TI.Provider;iz.Consumer=TI.Consumer;function k8e(e,t){return Object.assign(e,WC.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var Joe;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(Joe||(Joe={}));var oz=class extends UC{constructor(t,r){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=Gm(...r);let o=this._get(),n=bI(o);vI(this,n.create(o))}advance(t){let r=this._get(),o=this.get();Yu(r,o)||(Vc(this).setValue(r),this._onChange(r,this.idle)),!this.idle&&$oe(this._active)&&qj(this)}_get(){let t=Ae.arr(this.source)?this.source.map(mi):ua(mi(this.source));return this.calc(...t)}_start(){this.idle&&!$oe(this._active)&&(this.idle=!1,Mr(DC(this),t=>{t.done=!1}),el.skipAnimation?(pt.batchedUpdates(()=>this.advance()),qj(this)):dw.start(this))}_attach(){let t=1;Mr(ua(this.source),r=>{Cs(r)&&Ym(r,this),Jj(r)&&(r.idle||this._active.add(r),t=Math.max(t,r.priority+1))}),this.priority=t,this._start()}_detach(){Mr(ua(this.source),t=>{Cs(t)&&qm(t,this)}),this._active.clear(),qj(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=ua(this.source).reduce((r,o)=>Math.max(r,(Jj(o)?o.priority:0)+1),0))}};function R8e(e){return e.idle!==!1}function $oe(e){return!e.size||Array.from(e).every(R8e)}function qj(e){e.idle||(e.idle=!0,Mr(DC(e),t=>{t.done=!0}),Hv(e,{type:"idle",parent:e}))}el.assign({createStringInterpolator:pI,to:(e,t)=>new oz(e,t)});var M2t=dw.advance;var fne=a(Vu());function cz(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 A8e=["style","children","scrollTop","scrollLeft"],pne=/^--/;function I8e(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!pne.test(e)&&!(YC.hasOwnProperty(e)&&YC[e])?t+"px":(""+t).trim()}var dne={};function O8e(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:s,scrollLeft:l}=o,c=cz(o,A8e),u=Object.values(c),d=Object.keys(c).map(f=>r||e.hasAttribute(f)?f:dne[f]||(dne[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=I8e(f,n[f]);pne.test(f)?e.style.setProperty(f,m):e.style[f]=m}d.forEach((f,m)=>{e.setAttribute(f,u[m])}),s!==void 0&&(e.scrollTop=s),l!==void 0&&(e.scrollLeft=l)}var YC={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},N8e=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),M8e=["Webkit","Ms","Moz","O"];YC=Object.keys(YC).reduce((e,t)=>(M8e.forEach(r=>e[N8e(r,t)]=e[t]),e),YC);var F8e=["x","y","z"],D8e=/^(matrix|translate|scale|rotate|skew)/,L8e=/^(translate)/,B8e=/^(rotate|skew)/,sz=(e,t)=>Ae.num(e)&&e!==0?e+t:e,EI=(e,t)=>Ae.arr(e)?e.every(r=>EI(r,t)):Ae.num(e)?e===t:parseFloat(e)===t,az=class extends Gv{constructor(t){let{x:r,y:o,z:n}=t,i=cz(t,F8e),s=[],l=[];(r||o||n)&&(s.push([r||0,o||0,n||0]),l.push(c=>[`translate3d(${c.map(u=>sz(u,"px")).join(",")})`,EI(c,0)])),Ll(i,(c,u)=>{if(u==="transform")s.push([c||""]),l.push(d=>[d,d===""]);else if(D8e.test(u)){if(delete i[u],Ae.und(c))return;let d=L8e.test(u)?"px":B8e.test(u)?"deg":"";s.push(ua(c)),l.push(u==="rotate3d"?([f,m,h,g])=>[`rotate3d(${f},${m},${h},${sz(g,d)})`,EI(g,0)]:f=>[`${u}(${f.map(m=>sz(m,d)).join(",")})`,EI(f,u.startsWith("scale")?1:0)])}}),s.length&&(i.transform=new lz(s,l)),super(i)}},lz=class extends lw{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 Mr(this.inputs,(o,n)=>{let i=mi(o[0]),[s,l]=this.transforms[n](Ae.arr(i)?i:o.map(mi));t+=" "+s,r=r&&l}),r?"none":t}observerAdded(t){t==1&&Mr(this.inputs,r=>Mr(r,o=>Cs(o)&&Ym(o,this)))}observerRemoved(t){t==0&&Mr(this.inputs,r=>Mr(r,o=>Cs(o)&&qm(o,this)))}eventObserved(t){t.type=="change"&&(this._value=null),Hv(this,t)}},V8e=["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"],j8e=["scrollTop","scrollLeft"];el.assign({batchedUpdates:fne.unstable_batchedUpdates,createStringInterpolator:pI,colors:Ioe});var z8e=Hoe(V8e,{applyAnimatedValues:O8e,createAnimatedStyle:e=>new az(e),getComponentProps:e=>cz(e,j8e)}),H2t=z8e.animated;var qC=a(U(),1);function mne(e){return{top:e.offsetTop,left:e.offsetLeft}}function hne(e){let t=(0,qC.useRef)(null),r=(0,qC.useRef)(void 0);return t.current&&(r.current=mne(t.current)),(0,qC.useLayoutEffect)(()=>{let o=r.current;if(!o||!t.current||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let n=new CI({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=mne(t.current),s=Math.round(o.left-i.left),l=Math.round(o.top-i.top);return n.start({x:0,y:0,from:{x:s,y:l}}),()=>{n.stop(),n.set({x:0,y:0})}},[e]),t}var Be=a(E(),1),{MediaUploadModal:H8e}=cn(hw.privateApis);function bne({children:e,index:t,className:r}){let o=hne(t);return(0,Be.jsx)("div",{ref:o,className:r,children:e})}function mw(e){return Array.isArray(e)?e:e?[e]:[]}function U8e({render:e,multiple:t,...r}){let[o,n]=(0,Kr.useState)(!1);return window.__experimentalDataViewsMediaModal?(0,Be.jsxs)(Be.Fragment,{children:[e&&e({open:()=>n(!0)}),o&&(0,Be.jsx)(H8e,{...r,multiple:t,isOpen:o,onClose:()=>{n(!1),r.onClose?.()},onSelect:i=>{n(!1),r.onSelect?.(i)}})]}):(0,Be.jsx)(hw.MediaUpload,{...r,render:e,multiple:t?"add":void 0})}function dz({open:e,children:t,label:r,showTooltip:o=!1,onFilesDrop:n,attachment:i,isUploading:s=!1}){let l=i&&(0,Kv.isBlobURL)(i.source_url),c=(0,Be.jsxs)("div",{className:J("fields__media-edit-picker-button",{"has-attachment":i}),role:"button",tabIndex:0,onClick:()=>{s||e()},onKeyDown:u=>{s||(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),e())},"aria-label":r,"aria-disabled":s,children:[t,l&&(0,Be.jsx)("span",{className:"fields__media-edit-picker-button-spinner",children:(0,Be.jsx)(Er.Spinner,{})}),!s&&(0,Be.jsx)(Er.DropZone,{onFilesDrop:u=>n(u,i?.id)})]});return o?(0,Be.jsxs)(Ze.Root,{children:[(0,Be.jsx)(Ze.Trigger,{render:c}),(0,Be.jsx)(Ze.Popup,{children:r})]}):c}var W8e=["application/zip","application/x-zip-compressed","application/x-rar-compressed","application/x-7z-compressed","application/x-tar","application/x-gzip"];function G8e({attachment:e}){return(0,Be.jsx)(Er.__experimentalTruncate,{className:"fields__media-edit-filename",children:e.title.rendered})}function yne(e){return(0,Be.jsx)(dz,{...e,children:(0,Be.jsx)("span",{className:"fields__media-edit-placeholder",children:e.label})})}function wne({itemId:e,index:t,totalItems:r,isUploading:o,moveItem:n,orientation:i="vertical"}){let s=i==="horizontal";return(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(Er.Button,{__next40pxDefaultSize:!0,icon:s?Ar:gB,label:s?(0,Es.__)("Move left"):(0,Es.__)("Move up"),size:"small",disabled:o||t===0,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:l=>{l.stopPropagation(),n(e,"up")}}),(0,Be.jsx)(Er.Button,{__next40pxDefaultSize:!0,icon:s?hr:s1,label:s?(0,Es.__)("Move right"):(0,Es.__)("Move down"),size:"small",disabled:o||t===r-1,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:l=>{l.stopPropagation(),n(e,"down")}})]})}function _ne({attachment:e}){let t=e.source_url,r=e.mime_type||"";return r.startsWith("image")?(0,Be.jsx)("img",{className:"fields__media-edit-thumbnail",alt:e.alt_text||"",src:t}):r.startsWith("audio")?(0,Be.jsx)(Er.Icon,{icon:$4}):r.startsWith("video")?(0,Be.jsx)(Er.Icon,{icon:l8}):W8e.includes(r)?(0,Be.jsx)(Er.Icon,{icon:z4}):(0,Be.jsx)(Er.Icon,{icon:WB})}function Y8e({allItems:e,addButtonLabel:t,multiple:r,removeItem:o,moveItem:n,open:i,onFilesDrop:s,isUploading:l,setTargetItemId:c}){return(0,Be.jsxs)("div",{className:J("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,Kv.isBlobURL)(u.source_url),h=u.id;return(0,Be.jsxs)(bne,{index:d,className:J("fields__media-edit-expanded-item",{"has-preview-image":f}),children:[(0,Be.jsx)(dz,{open:()=>{c(h),i()},label:m?(0,Es.__)("Replace"):(0,Es.sprintf)((0,Es.__)("Replace %s"),u.title.rendered),showTooltip:!0,onFilesDrop:s,attachment:u,isUploading:l,children:(0,Be.jsx)("div",{className:"fields__media-edit-expanded-preview",children:(0,Be.jsx)(Er.__experimentalVStack,{spacing:0,alignment:"center",justify:"center",className:"fields__media-edit-expanded-preview-stack",children:(!m||f)&&(0,Be.jsx)(_ne,{attachment:u})})})}),!m&&(0,Be.jsx)("div",{className:"fields__media-edit-expanded-overlay",children:(0,Be.jsxs)(Er.__experimentalHStack,{className:"fields__media-edit-expanded-actions",spacing:0,alignment:"flex-end",expanded:!1,children:[r&&e.length>1&&(0,Be.jsx)(wne,{itemId:h,index:d,totalItems:e.length,isUploading:l,moveItem:n,orientation:"horizontal"}),(0,Be.jsx)(Er.Button,{__next40pxDefaultSize:!0,icon:Mi,label:(0,Es.__)("Remove"),size:"small",disabled:l,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:g=>{g.stopPropagation(),o(h)}})]})})]},u.id)}),(r||!e?.length)&&(0,Be.jsx)(yne,{open:()=>{c(void 0),i()},label:t,onFilesDrop:s,isUploading:l})]})}function q8e({allItems:e,addButtonLabel:t,multiple:r,removeItem:o,moveItem:n,open:i,onFilesDrop:s,isUploading:l,setTargetItemId:c}){return(0,Be.jsxs)(Be.Fragment,{children:[!!e?.length&&(0,Be.jsx)("div",{className:J("fields__media-edit-compact-group",{"is-single":e.length===1}),children:(0,Be.jsx)(Er.__experimentalVStack,{spacing:0,children:e.map((u,d)=>{let f=(0,Kv.isBlobURL)(u.source_url),m=r&&e.length>1,h=u.id;return(0,Be.jsxs)(bne,{index:d,className:"fields__media-edit-compact",children:[(0,Be.jsx)(dz,{open:()=>{c(h),i()},label:(0,Es.__)("Replace"),showTooltip:!0,onFilesDrop:s,attachment:u,isUploading:l,children:(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(_ne,{attachment:u}),!f&&(0,Be.jsx)(G8e,{attachment:u})]})}),!f&&(0,Be.jsxs)(Er.__experimentalHStack,{className:"fields__media-edit-compact-movers",spacing:0,alignment:"flex-end",expanded:!1,children:[m&&(0,Be.jsx)(wne,{itemId:h,index:d,totalItems:e.length,isUploading:l,moveItem:n,orientation:"vertical"}),(0,Be.jsx)(Er.Button,{__next40pxDefaultSize:!0,icon:Mi,label:(0,Es.__)("Remove"),size:"small",disabled:l,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:g=>{g.stopPropagation(),o(h)}})]})]},u.id)})})}),(r||!e?.length)&&(0,Be.jsx)(yne,{open:()=>{c(void 0),i()},label:t,onFilesDrop:s,isUploading:l})]})}function Sne({data:e,field:t,onChange:r,hideLabelFromVision:o,allowedTypes:n=["image"],multiple:i,isExpanded:s,validity:l}){let c=t.getValue({item:e}),[u,d]=(0,Kr.useState)(!1),f=(0,Kr.useRef)(null),[m,h]=(0,Kr.useState)(void 0);(0,Kr.useEffect)(()=>{let B=f.current,O=()=>{d(!0)};return B?.addEventListener("invalid",O),()=>B?.removeEventListener("invalid",O)},[]);let g=(0,KC.useSelect)(B=>{if(!c)return null;let V=mw(c).toSorted((q,Z)=>q-Z),{getEntityRecords:W}=B(uz.store);return W("postType","attachment",{include:V})},[c]),v=(0,Kr.useRef)(null);g!==null&&(v.current=g);let b=g;if(g===null&&v.current&&c){let B=new Set(v.current.map(O=>O.id));mw(c).every(O=>B.has(O))&&(b=v.current)}let _=(0,Kr.useMemo)(()=>{if(!b)return null;let B=mw(c),O=new Map(b.map(V=>[V.id,V]));return B.map(V=>O.get(V)).filter(V=>V!==void 0)},[b,c]),{createErrorNotice:y}=(0,KC.useDispatch)(vne.store),{receiveEntityRecords:w}=(0,KC.useDispatch)(uz.store),[S,x]=(0,Kr.useState)(),C=(0,Kr.useRef)(void 0),[A,k]=(0,Kr.useState)(!1),[R,M]=(0,Kr.useState)([]);(0,Kr.useEffect)(()=>{A&&(k(!1),C.current?.())},[A]);let P=(0,Kr.useCallback)(B=>r(t.setValue({item:e,value:B})),[e,t,r]),T=(0,Kr.useCallback)(B=>{let V=mw(c).filter(W=>W!==B);d(!0),P(V.length?V:void 0)},[c,P]),N=(0,Kr.useCallback)((B,O)=>{if(!_)return;let V=_.map(Z=>Z.id),W=V.indexOf(B),q=O==="up"?W-1:W+1;[V[W],V[q]]=[V[q],V[W]],P(V)},[_,P]),L=(0,Kr.useCallback)((B,O)=>{x(O),(0,hw.uploadMedia)({allowedTypes:n?.length?n:void 0,filesList:B,onFileChange(V){let W=V.filter(Q=>(0,Kv.isBlobURL)(Q.url)).map(Q=>Q.url);if(M(W),W.length)return;w("postType","attachment",[],void 0,!0);let q=V.map(Q=>Q.id);if(!i){P(q[0]),x(void 0);return}let Z=mw(c);if(O===void 0)P([...Z,...q]);else{let Q=[...Z];Q.splice(Z.indexOf(O),1,...q),P(Q)}x(void 0)},onError(V){x(void 0),M([]),y(V.message,{type:"snackbar"})},multiple:!!i})},[n,c,i,y,P,w]),F=t.placeholder||(i?(0,Es.__)("Choose files"):(0,Es.__)("Choose file")),D=(0,Kr.useMemo)(()=>{if(!R.length)return _;let B=[..._||[]],O=R.map(V=>({id:V,source_url:V,mime_type:(0,Kv.getBlobTypeByURL)(V)}));if(S!==void 0){let V=B.findIndex(W=>W.id===S);B.splice(V,1,...O)}else B.push(...O);return B},[_,S,R]);(0,Kr.useEffect)(()=>{if(!u)return;let B=f.current;if(B)if(l){let O=l?.custom;h(O),O?.type==="invalid"?B.setCustomValidity(O.message||(0,Es.__)("Invalid")):B.setCustomValidity("")}else B.setCustomValidity(""),h(void 0)},[u,t.isValid,l]),(0,Kr.useEffect)(()=>{u&&m?.message&&(0,gne.speak)(m.message)},[u,m?.message]);let z=(0,Kr.useCallback)(B=>{u||(!B.relatedTarget||!B.currentTarget.contains(B.relatedTarget))&&d(!0)},[u]);return(0,Be.jsxs)("div",{onBlur:z,children:[(0,Be.jsx)("fieldset",{className:"fields__media-edit","data-field-id":t.id,children:(0,Be.jsx)(U8e,{onSelect:B=>{if(!i){P(B.id),x(void 0);return}let O=Array.isArray(B)?B.map(W=>W.id):[B.id],V=mw(c);if(!V.length)P(O);else if(S===void 0){let W=V.filter(Z=>O.includes(Z)),q=O.filter(Z=>!V.includes(Z));P([...W,...q])}else if(B.id!==S){let W=V.filter(q=>q!==B.id);P(W.map(q=>q===S?B.id:q))}x(void 0)},onClose:()=>x(void 0),allowedTypes:n,value:S!==void 0?S:c,multiple:i&&S===void 0,title:t.label,render:({open:B})=>{C.current=B;let O=s?Y8e:q8e;return(0,Be.jsxs)(Er.__experimentalVStack,{spacing:2,children:[t.label&&(o?(0,Be.jsx)(Gt,{render:(0,Be.jsx)("legend",{}),children:t.label}):(0,Be.jsx)(Er.BaseControl.VisualLabel,{as:"legend",style:{marginBottom:0},children:t.label})),(0,Be.jsx)(O,{allItems:D,addButtonLabel:F,multiple:i,removeItem:T,moveItem:N,open:()=>k(!0),onFilesDrop:L,isUploading:!!R.length,setTargetItemId:x}),t.description&&(0,Be.jsx)(Er.__experimentalText,{variant:"muted",className:"fields__media-edit-description",children:t.description})]})}})}),(0,Be.jsx)(Gt,{children:(0,Be.jsx)("input",{type:"text",ref:f,value:c??"",tabIndex:-1,"aria-hidden":"true",onChange:()=>{}})}),m&&(0,Be.jsxs)("p",{className:J("components-validated-control__indicator",{"is-invalid":m.type==="invalid","is-valid":m.type==="valid"}),children:[(0,Be.jsx)(Er.Icon,{className:"components-validated-control__indicator-icon",icon:_f,size:16,fill:"currentColor"}),m.message]})]})}var fz=a(E(),1),xne=({item:e,config:t})=>{let r=e?._embedded?.["wp:featuredmedia"]?.[0],o=r?.source_url;return o?(0,fz.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,fz.jsx)("span",{className:"fields-controls__featured-image-placeholder"})};var Cne=a(E(),1),K8e={id:"featured_media",type:"media",label:(0,pz.__)("Featured Image"),placeholder:(0,pz.__)("Set featured image"),Edit:e=>(0,Cne.jsx)(Sne,{...e,isExpanded:!0}),render:xne,setValue:({value:e})=>({featured_media:e??0}),enableSorting:!1,filterBy:!1},mz=K8e;var Ane=a(j(),1);var XC=a(U(),1),RI=a(ae(),1),gz=a(G(),1),vz=a(Y(),1),bz=a(j(),1);var hz=a(Y(),1),Bl=a(ae(),1);function PI(e){let t=e.type,r=e?.available_templates??{},o=Object.keys(r).length>0;return(0,hz.useSelect)(n=>{let i=!!n(Bl.store).getCurrentTheme()?.is_block_theme;if(!n(Bl.store).getPostType(t)?.viewable)return null;let l=i&&(n(Bl.store).canUser("create",{kind:"postType",name:"wp_template"})??!1),c=o||l,u=c?!!n(Bl.store).canUser("read",{kind:"postType",name:"wp_template"}):!1;return(!i||!u)&&c?"classic":i&&u?"block-theme":null},[t,o])}function Z8e(e,t){return t?e==="page"?`${e}-${t}`:`single-${e}-${t}`:e==="page"?"page":`single-${e}`}var ZC="";function kI(e,t,r){return(0,hz.useSelect)(o=>{if(!e||!t)return ZC;let n=String(t),i=cn(o(Bl.store)).getHomePage();if(e==="page"&&i?.postType==="page"&&i?.postId===n){let f=o(Bl.store).getEntityRecords("postType","wp_template",{per_page:-1})?.find(m=>m.slug==="front-page");if(f)return ft(f)}let s=cn(o(Bl.store)).getPostsPageId();if(e==="page"&&s===n){let d=o(Bl.store).getDefaultTemplateId({slug:"home"});if(!d)return ZC;let f=o(Bl.store).getEntityRecord("postType","wp_template",d);return f?ft(f):ZC}let l=Z8e(e,r),c=o(Bl.store).getDefaultTemplateId({slug:l});if(!c)return ZC;let u=o(Bl.store).getEntityRecord("postType","wp_template",c);return u?ft(u):ZC},[e,t,r])}var AI=a(E(),1),X8e=[];function Q8e({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,XC.useMemo)(()=>Object.entries(e?.available_templates??{}).map(([l,c])=>({label:c,value:l})),[e]),s=(0,vz.useSelect)(l=>{let{getHomePage:c,getPostsPageId:u}=cn(l(RI.store)),d=String(o),f=u()===d,m=e.type==="page"&&c()?.postId===d;return!f&&!m},[o,e.type]);return(0,AI.jsx)(gz.SelectControl,{label:(0,bz.__)("Template"),hideLabelFromVision:!0,value:n,options:i,onChange:r,disabled:!s})}function J8e({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:s,canSwitchTemplate:l}=(0,vz.useSelect)(f=>{let m=f(RI.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:o})??X8e,{getHomePage:h,getPostsPageId:g}=cn(f(RI.store)),v=String(n),b=g()===v,_=o==="page"&&h()?.postId===v;return{templates:m,canSwitchTemplate:!b&&!_}},[n,o]),c=kI(o,n,i),u=t.getValue({item:e}),d=(0,XC.useMemo)(()=>{let f=s.map(m=>({label:ft(m),value:m.slug}));return[{label:c,value:""},...f]},[s,c]);return(0,AI.jsx)(gz.SelectControl,{label:(0,bz.__)("Template"),hideLabelFromVision:!0,value:u,options:d,onChange:r,disabled:!l})}var Tne=({data:e,field:t,onChange:r})=>{let o=(0,XC.useCallback)(s=>r({[t.id]:s}),[t.id,r]),n=PI(e);return!n||!["block-theme","classic"].includes(n)?null:(0,AI.jsx)(n==="classic"?Q8e:J8e,{data:e,field:t,onChange:o})};var Ene=a(Y(),1),Pne=a(ae(),1),kne=a(j(),1);var Zv=a(E(),1);function $8e({item:e,field:t}){let r=t.getValue({item:e}),o=e?.available_templates??{},n=r&&o[r]?o[r]:(0,kne.__)("Default template");return(0,Zv.jsx)(Zv.Fragment,{children:n})}function e7e({item:e,field:t}){let r=e.type,o=e.slug,n=e.id,i=t.getValue({item:e}),s=kI(r,n,o),l=(0,Ene.useSelect)(c=>{if(!i)return;let d=c(Pne.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:r})?.find(f=>f.slug===i);return d?ft(d):void 0},[r,i]);return(0,Zv.jsx)(Zv.Fragment,{children:l??s})}var Rne=({item:e,field:t})=>{let r=PI(e);return!r||!["block-theme","classic"].includes(r)?null:(0,Zv.jsx)(r==="classic"?$8e:e7e,{item:e,field:t})};var t7e={id:"template",type:"text",label:(0,Ane.__)("Template"),Edit:Tne,render:Rne,enableSorting:!1,filterBy:!1},yz=t7e;var Gne=a(j(),1);var wz=a(gw(),1),OI=a(G(),1),_z=a(Y(),1),Lf=a(U(),1),Sz=a(ae(),1),Lne=a(Te(),1),Bne=a(Lt(),1),Zm=a(j(),1),Vne=a(vo(),1);var Mne=a(Lt(),1),Fne=a(j(),1);function QC(e){return typeof e.title=="object"&&"rendered"in e.title&&e.title.rendered?(0,Mne.decodeEntities)(e.title.rendered):`#${e?.id} (${(0,Fne.__)("no title")})`}var Df=a(E(),1);function s7e(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:s}=i;return n[s]||(n[s]=[]),n[s].push(i),n},{}),o=n=>n.map(i=>{let s=r[i.id];return{...i,children:s&&s.length?o(s):[]}});return o(r[0]||[])}var Dne=(e,t)=>{let r=(0,wz.default)(e||"").toLowerCase(),o=(0,wz.default)(t||"").toLowerCase();return r===o?0:r.startsWith(o)?r.length:1/0};function a7e({data:e,onChangeControl:t}){let[r,o]=(0,Lf.useState)(""),n=e.parent,i=e.id,s=e.type,{parentPostTitle:l,pageItems:c,isHierarchical:u}=(0,_z.useSelect)(h=>{let{getEntityRecord:g,getEntityRecords:v,getPostType:b}=h(Sz.store),_=b(s),y=_?.hierarchical&&_.viewable,w=n?g("postType",s,n):null,S={per_page:100,exclude:i,parent_exclude:i,orderby:"menu_order",order:"asc",_fields:"id,title,parent",...!!r&&{search:r,orderby:"relevance",search_columns:["post_title"]}};return{isHierarchical:y,parentPostTitle:w?QC(w):"",pageItems:y?v("postType",s,S):null}},[r,n,i,s]),d=(0,Lf.useMemo)(()=>{let h=(_,y=0)=>_.map(x=>[{value:x.id,label:"\u2014 ".repeat(y)+(0,Bne.decodeEntities)(x.name),rawName:x.name},...h(x.children||[],y+1)]).sort(([x],[C])=>{let A=Dne(x.rawName,r),k=Dne(C.rawName,r);return A>=k?1:-1}).flat();if(!c)return[];let g=c.map(_=>({id:_.id,parent:_.parent??null,name:QC(_)}));r||(g=s7e(g));let v=h(g),b=v.find(_=>_.value===n);return n&&l&&!b&&v.unshift({value:n,label:l,rawName:""}),v.map(_=>({..._,value:_.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,Df.jsx)(OI.ComboboxControl,{label:(0,Zm.__)("Parent"),help:(0,Zm.__)("Choose a parent page."),value:n?.toString(),options:d,onFilterValueChange:(0,Lne.debounce)(h=>f(h),300),onChange:m,hideLabelFromVision:!0})}var jne=({data:e,field:t,onChange:r})=>{let{id:o}=t,n=(0,_z.useSelect)(s=>s(Sz.store).getEntityRecord("root","__unstableBase")?.home,[]),i=(0,Lf.useCallback)(s=>r({[o]:s}),[o,r]);return(0,Df.jsx)("fieldset",{className:"fields-controls__parent",children:(0,Df.jsxs)("div",{children:[(0,Lf.createInterpolateElement)((0,Zm.sprintf)((0,Zm.__)('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,Vne.filterURLForDisplay)(n).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,Df.jsx)("wbr",{})}),(0,Df.jsx)("p",{children:(0,Lf.createInterpolateElement)((0,Zm.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,Df.jsx)(OI.ExternalLink,{href:(0,Zm.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes"),children:void 0})})}),(0,Df.jsx)(a7e,{data:e,onChangeControl:i})]})})};var zne=a(Y(),1),Hne=a(ae(),1),Une=a(j(),1);var vw=a(E(),1),Wne=({item:e})=>{let t=(0,zne.useSelect)(r=>{let{getEntityRecord:o}=r(Hne.store);return e?.parent?o("postType",e.type,e.parent):null},[e.parent,e.type]);return t?(0,vw.jsx)(vw.Fragment,{children:QC(t)}):(0,vw.jsx)(vw.Fragment,{children:(0,Une.__)("None")})};var l7e={id:"parent",type:"text",label:(0,Gne.__)("Parent"),Edit:jne,render:Wne,enableSorting:!0,filterBy:!1},xz=l7e;var Kne=a(j(),1);var yw=a(G(),1),Yne=a(U(),1),JC=a(j(),1),bw=a(E(),1);function c7e({data:e,onChange:t,field:r}){let[o,n]=(0,Yne.useState)(!!r.getValue({item:e})),i=s=>{n(s),s||t({password:""})};return(0,bw.jsxs)(yw.__experimentalVStack,{as:"fieldset",spacing:4,className:"fields-controls__password",children:[(0,bw.jsx)(yw.CheckboxControl,{label:(0,JC.__)("Password protected"),help:(0,JC.__)("Only visible to those who know the password"),checked:o,onChange:i}),o&&(0,bw.jsx)("div",{className:"fields-controls__password-input",children:(0,bw.jsx)(yw.TextControl,{label:(0,JC.__)("Password"),onChange:s=>t({password:s}),value:r.getValue({item:e})||"",placeholder:(0,JC.__)("Use a secure password"),type:"text",maxLength:255})})]})}var qne=c7e;var u7e={id:"password",type:"text",label:(0,Kne.__)("Password"),Edit:qne,enableSorting:!1,enableHiding:!1,isVisible:e=>e.status!=="private",filterBy:!1},Cz=u7e;var Xne=a(j(),1);var MI=a(G(),1);var Vl=a(j(),1),d7e=[{value:"draft",label:(0,Vl.__)("Draft"),icon:m0,description:(0,Vl.__)("Not ready to publish.")},{value:"future",label:(0,Vl.__)("Scheduled"),icon:hm,description:(0,Vl.__)("Publish automatically on a chosen date.")},{value:"pending",label:(0,Vl.__)("Pending Review"),icon:S1,description:(0,Vl.__)("Waiting for review before publishing.")},{value:"private",label:(0,Vl.__)("Private"),icon:b1,description:(0,Vl.__)("Only visible to site admins and editors.")},{value:"publish",label:(0,Vl.__)("Published"),icon:fv,description:(0,Vl.__)("Visible to everyone.")},{value:"trash",label:(0,Vl.__)("Trash"),icon:Sf}],NI=d7e;var ww=a(E(),1);function f7e({item:e,field:t}){let r=t.getValue({item:e}),o=NI.find(({value:s})=>s===r),n=o?.label||r,i=o?.icon;return(0,ww.jsxs)(MI.__experimentalHStack,{alignment:"left",spacing:0,children:[i&&(0,ww.jsx)("div",{className:"fields-controls__status-icon",children:(0,ww.jsx)(MI.Icon,{icon:i})}),(0,ww.jsx)("span",{children:n})]})}var Zne=f7e;var p7e="isAny",m7e={label:(0,Xne.__)("Status"),id:"status",type:"text",elements:NI,getValue:({item:e})=>e.status==="auto-draft"?"draft":e.status,render:Zne,Edit:"radio",enableSorting:!1,filterBy:{operators:[p7e]}},Tz=m7e;var _w=a(j(),1),h7e={id:"comment_status",label:(0,_w.__)("Comments"),type:"text",Edit:"radio",enableSorting:!1,enableHiding:!1,filterBy:!1,elements:[{value:"open",label:(0,_w.__)("Open"),description:(0,_w.__)("Visitors can add new comments and replies.")},{value:"closed",label:(0,_w.__)("Closed"),description:(0,_w.__)("Visitors cannot add new comments or replies. Existing comments remain visible.")}]},Ez=h7e;var Bf=a(j(),1),FI=a(G(),1),Pz=a(E(),1);function g7e({data:e,onChange:t}){let r=e?.ping_status??"open",o=n=>{t({...e,ping_status:n?"open":"closed"})};return(0,Pz.jsx)(FI.CheckboxControl,{label:(0,Bf.__)("Enable pingbacks & trackbacks"),checked:r==="open",onChange:o,help:(0,Pz.jsx)(FI.ExternalLink,{href:(0,Bf.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,Bf.__)("Learn more about pingbacks & trackbacks")})})}var v7e={id:"ping_status",label:(0,Bf.__)("Trackbacks & Pingbacks"),type:"text",Edit:g7e,enableSorting:!1,enableHiding:!1,filterBy:!1,elements:[{value:"open",label:(0,Bf.__)("Allow"),description:(0,Bf.__)("Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.")},{value:"closed",label:(0,Bf.__)("Don't allow"),description:(0,Bf.__)("Don't allow link notifications from other blogs (pingbacks and trackbacks) on new articles.")}]},kz=v7e;var Sw=a(j(),1),b7e={id:"discussion",label:(0,Sw.__)("Discussion"),type:"text",render:({item:e})=>{let t=e.comment_status==="open",r=e.ping_status==="open";return t&&r?(0,Sw.__)("Open"):t&&!r?(0,Sw.__)("Comments only"):!t&&r?(0,Sw.__)("Pings only"):(0,Sw.__)("Closed")},filterBy:!1},Rz=b7e;var Jne=a(j(),1);var Ku=a(j(),1),eT=a(U(),1),Xm=a(ln(),1),qu=a(E(),1),$C=e=>(0,Xm.dateI18n)((0,Xm.getSettings)().formats.datetimeAbbreviated,(0,Xm.getDate)(e)),y7e=({item:e})=>{if(["draft","private"].includes(e.status??""))return(0,eT.createInterpolateElement)((0,Ku.sprintf)((0,Ku.__)("<span>Modified: <time>%s</time></span>"),$C(e.date??null)),{span:(0,qu.jsx)("span",{}),time:(0,qu.jsx)("time",{})});if(e.status==="future")return(0,eT.createInterpolateElement)((0,Ku.sprintf)((0,Ku.__)("<span>Scheduled: <time>%s</time></span>"),$C(e.date??null)),{span:(0,qu.jsx)("span",{}),time:(0,qu.jsx)("time",{})});if(e.status==="publish")return(0,eT.createInterpolateElement)((0,Ku.sprintf)((0,Ku.__)("<span>Published: <time>%s</time></span>"),$C(e.date??null)),{span:(0,qu.jsx)("span",{}),time:(0,qu.jsx)("time",{})});let n=(0,Xm.getDate)(e.modified??null)>(0,Xm.getDate)(e.date??null)?e.modified:e.date;return e.status==="pending"?(0,eT.createInterpolateElement)((0,Ku.sprintf)((0,Ku.__)("<span>Modified: <time>%s</time></span>"),$C(n??null)),{span:(0,qu.jsx)("span",{}),time:(0,qu.jsx)("time",{})}):(0,qu.jsx)("time",{children:$C(e.date??null)})},Qne=y7e;var w7e={id:"date",type:"datetime",label:(0,Jne.__)("Date"),render:Qne,filterBy:{operators:["before","after"]}},Az=w7e;var $ne=a(j(),1),_7e={id:"scheduled_date",type:"datetime",label:(0,$ne.__)("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},Iz=_7e;var oie=a(j(),1);var DI=a(j(),1),eie=a(ln(),1),tie=a(E(),1);function rie({item:e}){return e.modified?(0,tie.jsx)(xs,{children:(0,DI.sprintf)((0,DI.__)("Last edited %s."),(0,eie.humanTimeDiff)(e.modified))}):null}var S7e={id:"last_edited_date",type:"datetime",label:(0,oie.__)("Last edited"),render:rie,getValue:({item:e})=>e.modified,isVisible:e=>!!e.modified,readOnly:!0,enableHiding:!1,enableSorting:!1,filterBy:!1},Oz=S7e;var cie=a(j(),1),uie=a(Y(),1),die=a(ae(),1);var nie=a(j(),1),iie=a(U(),1);var LI=a(G(),1),sie=a(Y(),1),aie=a(ae(),1),Qm=a(E(),1);function x7e({item:e}){let t=e?.author,r=e?._embedded?.author?.[0]?.id,o=!!(t&&(!r||t!==r)),n=(0,sie.useSelect)(u=>{if(!o)return null;let{getEntityRecord:d}=u(aie.store);return t?d("root","user",t):null},[t,o]),i=n?.name||e?._embedded?.author?.[0]?.name,s=n?.avatar_urls?.[48]||e?._embedded?.author?.[0]?.avatar_urls?.[48],[l,c]=(0,iie.useState)(!1);return(0,Qm.jsxs)(LI.__experimentalHStack,{alignment:"left",spacing:0,children:[!!s&&(0,Qm.jsx)("div",{className:J("fields-controls__author-avatar",{"is-loaded":l}),children:(0,Qm.jsx)("img",{onLoad:()=>c(!0),alt:(0,nie.__)("Author avatar"),src:s})}),!s&&(0,Qm.jsx)("div",{className:"fields-controls__author-icon",children:(0,Qm.jsx)(LI.Icon,{icon:uv})}),(0,Qm.jsx)("span",{className:"fields-controls__author-name",children:i})]})}var lie=x7e;var C7e={label:(0,cie.__)("Author"),id:"author",type:"integer",getElements:async()=>(await(0,uie.resolveSelect)(die.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:lie,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"]}},tT=C7e;var Mz=a(j(),1),mie=a(Y(),1),hie=a(ae(),1);var fie=a(U(),1),pie=a(Y(),1),BI=a(ae(),1);var Jm=a(E(),1);function T7e(e){switch(e){case"theme":return Ka;case"plugin":return xV;case"site":return tV;default:return uv}}function Nz({item:e}){let[t,r]=(0,fie.useState)(!1),o=e.original_source,n=T7e(o),i=e.author_text,s=e.author,l=(0,pie.useSelect)(c=>{if(o==="site"){let d=c(BI.store).getEntityRecord("root","__unstableBase")?.site_logo;return d?c(BI.store).getEntityRecord("postType","attachment",d)?.source_url:void 0}if(!(o!=="user"||!s))return c(BI.store).getUser(s)?.avatar_urls?.[48]},[o,s]);return(0,Jm.jsxs)(se,{direction:"row",align:"center",children:[l&&(0,Jm.jsx)("div",{className:J("fields-controls__author-avatar",{"is-loaded":t}),children:(0,Jm.jsx)("img",{onLoad:()=>r(!0),alt:"",src:l})}),!l&&(0,Jm.jsx)("div",{className:"fields-controls__author-icon",children:(0,Jm.jsx)(Nf,{icon:n})}),(0,Jm.jsx)("span",{className:"fields-controls__author-name",children:i})]})}async function gie(e){let t=await(0,mie.resolveSelect)(hie.store).getEntityRecords("postType",e,{per_page:-1,_fields:"id,author_text"}),r=new Set,o=[];for(let n of t??[]){let i=n.author_text;i&&!r.has(i)&&(r.add(i),o.push({value:i,label:i}))}return o}var Fz={label:(0,Mz.__)("Author"),id:"author",getValue:({item:e})=>e.author_text,render:Nz,getElements:()=>gie("wp_template")},Dz={label:(0,Mz.__)("Author"),id:"author",getValue:({item:e})=>e.author_text,render:Nz,enableSorting:!1,filterBy:{isPrimary:!0},getElements:()=>gie("wp_template_part")};var vie=a(j(),1),E7e={id:"notesCount",label:(0,vie.__)("Notes"),type:"integer",enableSorting:!1,filterBy:!1},Lz=E7e;var Bz=a(Lt(),1),xw=a(j(),1),VI=a(G(),1),Vz=a(E(),1),P7e={id:"excerpt",type:"text",label:(0,xw.__)("Excerpt"),placeholder:(0,xw.__)("Add an excerpt"),description:(0,Vz.jsx)(VI.ExternalLink,{href:(0,xw.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),children:(0,xw.__)("Learn more about manual excerpts")}),render:({item:e})=>{let t;return typeof e.excerpt=="string"?t=e.excerpt?(0,Bz.decodeEntities)(e.excerpt):(0,xw.__)("Add an excerpt"):t=(0,Bz.decodeEntities)(e.excerpt?.raw||""),(0,Vz.jsx)(VI.__experimentalText,{align:"left",numberOfLines:3,truncate:!0,children:t})},Edit:{control:"textarea",rows:4},enableSorting:!1,filterBy:!1},jz=P7e;var zz=a(Lt(),1),jI=a(j(),1);var bie=a(E(),1),yie=e=>e.source==="custom"&&!e.has_theme_file&&e.is_custom,wie=({item:e})=>(0,zz.decodeEntities)(e.description||""),_ie=({item:e})=>{let{description:t}=e;return t&&(0,bie.jsx)(xs,{children:(0,zz.decodeEntities)(t)})},k7e={id:"description",type:"text",label:(0,jI.__)("Description"),placeholder:(0,jI.__)("Add a description"),getValue:wie,render:_ie,Edit:{control:"textarea",rows:4},isVisible:yie,enableSorting:!1,filterBy:!1,enableGlobalSearch:!0},Hz={id:"description_readonly",type:"text",label:(0,jI.__)("Description"),getValue:wie,render:_ie,readOnly:!0,isVisible:e=>!yie(e)&&!!e.description,enableSorting:!1,enableHiding:!1,filterBy:!1},Uz=k7e;var jl=a(j(),1),Sie=a(Y(),1),xie=a(ae(),1),R7e=[{id:"aside",caption:(0,jl.__)("Aside")},{id:"audio",caption:(0,jl.__)("Audio")},{id:"chat",caption:(0,jl.__)("Chat")},{id:"gallery",caption:(0,jl.__)("Gallery")},{id:"image",caption:(0,jl.__)("Image")},{id:"link",caption:(0,jl.__)("Link")},{id:"quote",caption:(0,jl.__)("Quote")},{id:"standard",caption:(0,jl.__)("Standard")},{id:"status",caption:(0,jl.__)("Status")},{id:"video",caption:(0,jl.__)("Video")}].sort((e,t)=>{let r=e.caption.toUpperCase(),o=t.caption.toUpperCase();return r<o?-1:r>o?1:0}),A7e={id:"format",label:(0,jl.__)("Format"),type:"text",Edit:"radio",enableSorting:!1,enableHiding:!1,filterBy:!1,getElements:async()=>{let e=await(0,Sie.resolveSelect)(xie.store).getThemeSupports();return R7e.filter(t=>e?.formats?.includes(t.id)).map(t=>({value:t.id,label:t.caption}))}},Wz=A7e;var Rie=a(j(),1);var rT=a(G(),1),da=a(j(),1),Tie=a(Cw(),1),Eie=a(ln(),1),Pie=a(U(),1),oT=a(E(),1),I7e=189;function kie({item:e}){let t="";typeof e.content=="string"?t=e.content:typeof e.content=="function"&&(t=e.content(e));let r=(0,da._x)("words","Word count type. Do not translate!"),o=(0,Pie.useMemo)(()=>t?(0,Tie.count)(t,r):0,[t,r]),n=e.modified;if(!o&&!n)return null;let i;if(o){let s=Math.round(o/I7e),l=(0,da.sprintf)((0,da._n)("%s word","%s words",o),o.toLocaleString()),c=s<=1?(0,da.__)("1 minute"):(0,da.sprintf)((0,da._n)("%s minute","%s minutes",s),s.toLocaleString());i=(0,da.sprintf)((0,da.__)("%1$s, %2$s read time."),l,c)}return(0,oT.jsxs)(rT.__experimentalVStack,{spacing:1,children:[i&&(0,oT.jsx)(rT.__experimentalText,{variant:"muted",children:i}),n&&(0,oT.jsx)(rT.__experimentalText,{variant:"muted",children:(0,da.sprintf)((0,da.__)("Last edited %s."),(0,Eie.humanTimeDiff)(n))})]})}var O7e={label:(0,Rie.__)("Post content information"),id:"post-content-info",type:"text",readOnly:!0,render:kie,enableSorting:!1,enableHiding:!1,filterBy:!1},Gz=O7e;var Yz=a(j(),1),N7e={id:"sticky",type:"boolean",label:(0,Yz.__)("Sticky"),description:(0,Yz.__)("Pin this post to the top of the blog."),enableSorting:!1,enableHiding:!1,isVisible:e=>!!e._links?.["wp:action-sticky"],filterBy:!1},qz=N7e;var Kz=a(j(),1),M7e={id:"posts_per_page",type:"integer",label:(0,Kz.__)("Posts per page"),description:(0,Kz.__)("Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting."),getValue:({item:e})=>e.posts_per_page??1,setValue:({value:e})=>({posts_per_page:e}),isValid:{min:1},enableSorting:!1,enableHiding:!1,filterBy:!1},Zz=M7e;var $m=a(j(),1),F7e={id:"default_comment_status",type:"text",label:(0,$m.__)("Discussion"),Edit:"radio",getValue:({item:e})=>e.default_comment_status||"",setValue:({value:e})=>({default_comment_status:e||null}),render:({item:e})=>e.default_comment_status==="open"?(0,$m.__)("Comments open"):(0,$m.__)("Comments closed"),elements:[{value:"open",label:(0,$m.__)("Open"),description:(0,$m.__)("Visitors can add new comments and replies.")},{value:"",label:(0,$m.__)("Closed"),description:(0,$m.__)("Visitors cannot add new comments or replies. Existing comments remain visible.")}],enableSorting:!1,enableHiding:!1,filterBy:!1},Xz=F7e;var Qz=a(j(),1),D7e={id:"posts_page_title",type:"text",label:(0,Qz.__)("Blog title"),description:(0,Qz.__)("Set the Posts Page title. Appears in search results, and when the page is shared on social media."),getValue:({item:e})=>{let t=e.title;return typeof t=="string"?t:t?.raw??""},setValue:({value:e})=>({title:e}),enableSorting:!1,enableHiding:!1,filterBy:!1},Jz=D7e;var Aie=a(j(),1),L7e={id:"view-post",label:(0,Aie._x)("View","verb"),isPrimary:!0,icon:hs,isEligible(e){return e.status!=="trash"},callback(e,{onActionPerformed:t}){let r=e[0];window.open(r?.link,"_blank"),t&&t(e)}},$z=L7e;var eH=a(Y(),1),Iie=a(ae(),1),eh=a(j(),1),Oie=a(It(),1),Nie=a(U(),1),jf=a(G(),1),Vf=a(E(),1);function B7e(e){return typeof e.menu_order=="number"&&Number.isInteger(e.menu_order)}function V7e({items:e,closeModal:t,onActionPerformed:r}){let[o,n]=(0,Nie.useState)(e[0]),{editEntityRecord:i,saveEditedEntityRecord:s}=(0,eH.useDispatch)(Iie.store),{createSuccessNotice:l,createErrorNotice:c}=(0,eH.useDispatch)(Oie.store),u=B7e(o);async function d(f){if(f.preventDefault(),!!u)try{await i("postType",o.type,o.id,{menu_order:o.menu_order}),t?.(),await s("postType",o.type,o.id,{throwOnError:!0}),l((0,eh.__)("Order updated."),{type:"snackbar"}),r?.(e)}catch(m){let h=m,g=h.message&&h.code!=="unknown_error"?h.message:(0,eh.__)("An error occurred while updating the order");c(g,{type:"snackbar"})}}return(0,Vf.jsx)("form",{onSubmit:d,children:(0,Vf.jsxs)(jf.__experimentalVStack,{spacing:"5",children:[(0,Vf.jsx)("div",{children:(0,eh.__)("Determines the order of pages. Pages with the same order value are sorted alphabetically. Negative order values are supported.")}),(0,Vf.jsx)(jf.__experimentalInputControl,{label:(0,eh.__)("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,Vf.jsxs)(jf.__experimentalHStack,{justify:"right",children:[(0,Vf.jsx)(jf.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,eh.__)("Cancel")}),(0,Vf.jsx)(jf.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",accessibleWhenDisabled:!0,disabled:!u,children:(0,eh.__)("Save")})]})]})})}var j7e={id:"order-pages",label:(0,eh.__)("Order"),isEligible({status:e}){return e!=="trash"},modalFocusOnMount:"firstContentElement",RenderModal:V7e},tH=j7e;var rH=a(Y(),1),Mie=a(ae(),1),Hi=a(j(),1),Fie=a(It(),1),oH=a(U(),1),Hf=a(G(),1);var zf=a(E(),1),z7e={id:"duplicate-post",label:(0,Hi._x)("Duplicate","action label"),isEligible({status:e}){return e!=="trash"},modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,oH.useState)({...e[0],title:(0,Hi.sprintf)((0,Hi._x)("%s (Copy)","post"),ft(e[0]))}),[i,s]=(0,oH.useState)(!1),{saveEntityRecord:l}=(0,rH.useDispatch)(Mie.store),{createSuccessNotice:c,createErrorNotice:u}=(0,rH.useDispatch)(Fie.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,Hi.__)("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(b=>b.startsWith(g)).map(b=>b.slice(g.length)).forEach(b=>{o.hasOwnProperty(b)&&(h[b]=o[b])}),s(!0);try{let b=await l("postType",o.type,h,{throwOnError:!0});c((0,Hi.sprintf)((0,Hi.__)('"%s" successfully created.'),ft(b)),{id:"duplicate-post-action",type:"snackbar"}),r&&r([b])}catch(b){let _=b,y=_.message&&_.code!=="unknown_error"?_.message:(0,Hi.__)("An error occurred while duplicating the page.");u(y,{type:"snackbar"})}finally{s(!1),t?.()}}return(0,zf.jsx)("form",{onSubmit:d,children:(0,zf.jsxs)(Hf.__experimentalVStack,{spacing:3,children:[typeof o.id=="string"&&(0,zf.jsx)("div",{children:(0,Hi.__)("You are about to duplicate a bundled template. Changes will not be live until you activate the new template.")}),(0,zf.jsx)(Hf.__experimentalInputControl,{label:(0,Hi.__)("Title"),placeholder:(0,Hi.__)("No title"),value:ft(o),onChange:f=>n(m=>({...m,title:f||(0,Hi.__)("No title")}))}),(0,zf.jsxs)(Hf.__experimentalHStack,{spacing:2,justify:"end",children:[(0,zf.jsx)(Hf.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,Hi.__)("Cancel")}),(0,zf.jsx)(Hf.Button,{variant:"primary",type:"submit",isBusy:i,"aria-disabled":i,__next40pxDefaultSize:!0,children:(0,Hi._x)("Duplicate","action label")})]})]})})}},nH=z7e;var iH=a(Y(),1),Die=a(ae(),1),Xv=a(j(),1),Lie=a(U(),1),Bie=a(Nl(),1),Uf=a(G(),1),Vie=a(It(),1);var th=a(E(),1),{PATTERN_TYPES:H7e}=cn(Bie.privateApis),U7e={id:"rename-post",label:(0,Xv.__)("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)?uQ(e)&&!window?.__experimentalTemplateActivate?D2(e)&&e.is_custom&&e.permissions?.update:dQ(e)?e.source==="custom"&&!e?.has_theme_file&&e.permissions?.update:e.type===H7e.user&&e.permissions?.update:e.permissions?.update},RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o]=e,[n,i]=(0,Lie.useState)(()=>ft(o,"")),{editEntityRecord:s,saveEditedEntityRecord:l}=(0,iH.useDispatch)(Die.store),{createSuccessNotice:c,createErrorNotice:u}=(0,iH.useDispatch)(Vie.store);async function d(f){f.preventDefault();try{await s("postType",o.type,o.id,{title:n}),i(""),t?.(),await l("postType",o.type,o.id,{throwOnError:!0}),c((0,Xv.__)("Name updated"),{type:"snackbar"}),r?.(e)}catch(m){let h=m,g=h.message&&h.code!=="unknown_error"?h.message:(0,Xv.__)("An error occurred while updating the name");u(g,{type:"snackbar"})}}return(0,th.jsx)("form",{onSubmit:d,children:(0,th.jsxs)(Uf.__experimentalVStack,{spacing:"5",children:[(0,th.jsx)(Uf.TextControl,{label:(0,Xv.__)("Name"),value:n,onChange:i,required:!0}),(0,th.jsxs)(Uf.__experimentalHStack,{justify:"right",children:[(0,th.jsx)(Uf.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,Xv.__)("Cancel")}),(0,th.jsx)(Uf.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,Xv.__)("Save")})]})]})})}},sH=U7e;var Ui=a(Y(),1),Qv=a(ae(),1),pn=a(j(),1),rh=a(It(),1),jie=a(U(),1),zI=a(Pt(),1),Wf=a(G(),1),zie=a(vo(),1),Hie=a(Bu(),1);var Jv=a(E(),1),W7e=e=>e?e.source==="custom"&&(!!e?.plugin||e?.has_theme_file):!1,G7e=async(e,{allowUndo:t=!0}={})=>{let r="edit-site-template-reverted";if((0,Ui.dispatch)(rh.store).removeNotice(r),!W7e(e)){(0,Ui.dispatch)(rh.store).createErrorNotice((0,pn.__)("This template is not revertable."),{type:"snackbar"});return}try{let o=(0,Ui.select)(Qv.store).getEntityConfig("postType",e.type);if(!o){(0,Ui.dispatch)(rh.store).createErrorNotice((0,pn.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let n=(0,zie.addQueryArgs)(`${o.baseURL}/${e.id}`,{context:"edit",source:e.origin}),i=await(0,Hie.default)({path:n});if(!i){(0,Ui.dispatch)(rh.store).createErrorNotice((0,pn.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let s=({blocks:u=[]})=>(0,zI.__unstableSerializeAndClean)(u),l=(0,Ui.select)(Qv.store).getEditedEntityRecord("postType",e.type,e.id);(0,Ui.dispatch)(Qv.store).editEntityRecord("postType",e.type,e.id,{content:s,blocks:l.blocks,source:"custom"},{undoIgnore:!0});let c=(0,zI.parse)(i?.content?.raw);if((0,Ui.dispatch)(Qv.store).editEntityRecord("postType",e.type,i.id,{content:s,blocks:c,source:"theme"}),t){let u=()=>{(0,Ui.dispatch)(Qv.store).editEntityRecord("postType",e.type,l.id,{content:s,blocks:l.blocks,source:"custom"})};(0,Ui.dispatch)(rh.store).createSuccessNotice((0,pn.__)("Template reset."),{type:"snackbar",id:r,actions:[{label:(0,pn.__)("Undo"),onClick:u}]})}}catch(o){let n=o.message&&o.code!=="unknown_error"?o.message:(0,pn.__)("Template revert failed. Please reload.");(0,Ui.dispatch)(rh.store).createErrorNotice(n,{type:"snackbar"})}},Y7e={id:"reset-post",label:(0,pn.__)("Reset"),isEligible:e=>window?.__experimentalTemplateActivate?e.type==="wp_template_part"&&e?.source==="custom"&&e?.has_theme_file:Ef(e)&&e?.source==="custom"&&(!!(e.type==="wp_template"&&e?.plugin)||e?.has_theme_file),icon:yf,supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,jie.useState)(!1),{saveEditedEntityRecord:i}=(0,Ui.useDispatch)(Qv.store),{createSuccessNotice:s,createErrorNotice:l}=(0,Ui.useDispatch)(rh.store),c=async()=>{try{for(let u of e)await G7e(u,{allowUndo:!1}),await i("postType",u.type,u.id);s(e.length>1?(0,pn.sprintf)((0,pn.__)("%d items reset."),e.length):(0,pn.sprintf)((0,pn.__)('"%s" reset.'),ft(e[0])),{type:"snackbar",id:"revert-template-action"})}catch(u){let d;e[0].type==="wp_template"?d=e.length===1?(0,pn.__)("An error occurred while reverting the template."):(0,pn.__)("An error occurred while reverting the templates."):d=e.length===1?(0,pn.__)("An error occurred while reverting the template part."):(0,pn.__)("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,Jv.jsxs)(Wf.__experimentalVStack,{spacing:"5",children:[(0,Jv.jsx)(Wf.__experimentalText,{children:(0,pn.__)("Reset to default and clear all customizations?")}),(0,Jv.jsxs)(Wf.__experimentalHStack,{justify:"right",children:[(0,Jv.jsx)(Wf.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,pn.__)("Cancel")}),(0,Jv.jsx)(Wf.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{n(!0),await c(),r?.(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,children:(0,pn.__)("Reset")})]})]})}},aH=Y7e;var HI=a(j(),1),Uie=a(Nl(),1);var Wie=a(E(),1),{CreatePatternModalContents:q7e,useDuplicatePatternProps:K7e}=cn(Uie.privateApis),Z7e={id:"duplicate-pattern",label:(0,HI._x)("Duplicate","action label"),isEligible:e=>e.type!=="wp_template_part",modalHeader:(0,HI._x)("Duplicate pattern","action label"),modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t})=>{let[r]=e,o=K7e({pattern:r,onSuccess:()=>t?.()});return(0,Wie.jsx)(q7e,{onClose:t,confirmLabel:(0,HI._x)("Duplicate","action label"),...o})}},lH=Z7e;var oh=function(){return oh=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},oh.apply(this,arguments)};function Gie(e){return e.toLowerCase()}var X7e=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Q7e=/[^A-Z0-9]+/gi;function UI(e,t){t===void 0&&(t={});for(var r=t.splitRegexp,o=r===void 0?X7e:r,n=t.stripRegexp,i=n===void 0?Q7e:n,s=t.transform,l=s===void 0?Gie:s,c=t.delimiter,u=c===void 0?" ":c,d=Yie(Yie(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 Yie(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce(function(o,n){return o.replace(n,r)},e)}function qie(e){return e.charAt(0).toUpperCase()+e.substr(1)}function J7e(e){return qie(e.toLowerCase())}function WI(e,t){return t===void 0&&(t={}),UI(e,oh({delimiter:" ",transform:J7e},t))}function Kie(e,t){return t===void 0&&(t={}),UI(e,oh({delimiter:"."},t))}function $v(e,t){return t===void 0&&(t={}),Kie(e,oh({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 Ew=e=>new DataView(new ArrayBuffer(e)),Gf=e=>new Uint8Array(e.buffer||e),Tw=e=>new TextEncoder().encode(String(e)),eb=e=>Math.min(4294967295,Number(e)),Zie=e=>Math.min(65535,Number(e));function $7e(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:Tw(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:Gf(e)};if(Symbol.asyncIterator in e)return{isFile:1,t,i:Qie(e[Symbol.asyncIterator]())};throw new TypeError("Unsupported input format.")}function Qie(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=e9e(n.value);r.enqueue(i),o+=i.byteLength}}},cancel(r){t.throw?.(r)}})}function e9e(e){return typeof e=="string"?Tw(e):e instanceof Uint8Array?e:Gf(e)}function Jie(e,t,r){let[o,n]=(function(i){return i?i instanceof Uint8Array?[i,1]:ArrayBuffer.isView(i)||i instanceof ArrayBuffer?[Gf(i),1]:[Tw(i),0]:[void 0,0]})(t);if(e instanceof File)return{o:cH(o||Tw(e.name)),u:BigInt(e.size),l:n};if(e instanceof Response){let i=e.headers.get("content-disposition"),s=i&&i.match(/;\s*filename\*?=["']?(.*?)["']?$/i),l=s&&s[1]||e.url&&new URL(e.url).pathname.split("/").findLast(Boolean),c=l&&decodeURIComponent(l),u=r||+e.headers.get("content-length");return{o:cH(o||Tw(c)),u:BigInt(u),l:n}}return o=cH(o,e!==void 0||r!==void 0),typeof e=="string"?{o,u:BigInt(Tw(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:t9e(e,r),l:n}}function t9e(e,t){return t>-1?BigInt(t):e?void 0:0n}function cH(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 $ie=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);$ie[e]=t}function Xie(e,t=0){t^=-1;for(var r=0,o=e.length;r<o;r++)t=t>>>8^$ie[255&t^e[r]];return(-1^t)>>>0}function ese(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 r9e({o:e,l:t},r){return 8*(!t||(r??(function(o){try{o9e.decode(o)}catch{return 0}return 1})(e)))}var o9e=new TextDecoder("utf8",{fatal:1});function n9e(e,t=0){let r=Ew(30);return r.setUint32(0,1347093252),r.setUint32(4,754976768|t),ese(e.t,r,10),r.setUint16(26,e.o.length,1),Gf(r)}async function*i9e(e){let{i:t}=e;if("then"in t&&(t=await t),t instanceof Uint8Array)yield t,e.m=Xie(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=Xie(o,e.m),e.u+=BigInt(o.length),yield o}}}function s9e(e,t){let r=Ew(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,eb(e.u),1),r.setUint32(12,eb(e.u),1)),Gf(r)}function a9e(e,t,r=0,o=0){let n=Ew(46);return n.setUint32(0,1347092738),n.setUint32(4,755182848),n.setUint16(8,2048|r),ese(e.t,n,12),n.setUint32(16,e.isFile?e.m:0,1),n.setUint32(20,eb(e.u),1),n.setUint32(24,eb(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,eb(t),1),Gf(n)}function l9e(e,t,r){let o=Ew(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),Gf(o)}function tse(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}var c9e=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 s=i.u>=0xffffffffn,l=o>=0xffffffffn;o+=BigInt(46+i.o.length+(s&&8))+i.u,r+=BigInt(i.o.length+46+(12*l|28*s)),n||(n=s)}return(n||o>=0xffffffffn)&&(r+=BigInt(76)),r+o})((function*(t){for(let r of t)yield Jie(...tse(r)[0])})(e));function rse(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(c9e(t.metadata))),new Response(u9e(e,t),{headers:r})}function u9e(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[s,l]=tse(i.value);return{done:0,value:Object.assign($7e(...l),Jie(...s))}},throw:n.throw?.bind(n),[Symbol.asyncIterator](){return this}}})(e);return Qie((async function*(o,n){let i=[],s=0n,l=0n,c=0;for await(let f of o){let m=r9e(f,n.buffersAreUTF8);yield n9e(f,m),yield new Uint8Array(f.o),f.isFile&&(yield*i9e(f));let h=f.u>=0xffffffffn,g=12*(s>=0xffffffffn)|28*h;yield s9e(f,h),i.push(a9e(f,s,m,g)),i.push(f.o),g&&i.push(l9e(f,s,g)),h&&(s+=8n),l++,s+=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||s>=0xffffffffn){let f=Ew(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,s,1),f.setUint32(56,1347094023),f.setBigUint64(64,s+u,1),f.setUint32(72,1,1),yield Gf(f)}let d=Ew(22);d.setUint32(0,1347093766),d.setUint16(8,Zie(l),1),d.setUint16(10,Zie(l),1),d.setUint32(12,eb(u),1),d.setUint32(16,eb(s),1),yield Gf(d)})(r,t),r)}var uH=a(nI(),1),dH=a(j(),1);function ose(e){return JSON.stringify({__file:e.type,title:ft(e),content:typeof e.content=="string"?e.content:e.content?.raw,syncStatus:e.wp_pattern_sync_status},null,2)}var d9e={id:"export-pattern",label:(0,dH.__)("Export as JSON"),icon:FB,supportsBulk:!0,isEligible:e=>e.type==="wp_block",callback:async e=>{if(e.length===1)return(0,uH.downloadBlob)(`${$v(ft(e[0])||e[0].slug)}.json`,ose(e[0]),"application/json");let t={},r=e.map(o=>{let n=$v(ft(o)||o.slug);return t[n]=(t[n]||0)+1,{name:`${n+(t[n]>1?"-"+(t[n]-1):"")}.json`,lastModified:new Date,input:ose(o)}});return(0,uH.downloadBlob)((0,dH.__)("patterns-export")+".zip",await rse(r).blob(),"application/zip")}},fH=d9e;var nse=a(vo(),1),GI=a(j(),1),f9e={id:"view-post-revisions",context:"list",label(e){let t=e[0]._links?.["version-history"]?.[0]?.count??0;return(0,GI.sprintf)((0,GI.__)("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,nse.addQueryArgs)("revision.php",{revision:r?._links?.["predecessor-version"]?.[0]?.id});document.location.href=o,t&&t(e)}},pH=f9e;var ise=a(ae(),1),Pn=a(j(),1),sse=a(It(),1);var ase=a(U(),1),mH=a(Y(),1),Yf=a(G(),1),lse=a(Lt(),1);var tb=a(E(),1),p9e={id:"permanently-delete",label:(0,Pn.__)("Permanently delete"),supportsBulk:!0,icon:Sf,isEligible(e){if(Ef(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,ase.useState)(!1),{createSuccessNotice:i,createErrorNotice:s}=(0,mH.useDispatch)(sse.store),{deleteEntityRecord:l}=(0,mH.useDispatch)(ise.store);return(0,tb.jsxs)(Yf.__experimentalVStack,{spacing:"5",children:[(0,tb.jsx)(Yf.__experimentalText,{children:e.length>1?(0,Pn.sprintf)((0,Pn._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,Pn.sprintf)((0,Pn.__)('Are you sure you want to permanently delete "%s"?'),(0,lse.decodeEntities)(ft(e[0])))}),(0,tb.jsxs)(Yf.__experimentalHStack,{justify:"right",children:[(0,tb.jsx)(Yf.Button,{variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,Pn.__)("Cancel")}),(0,tb.jsx)(Yf.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,Pn.sprintf)((0,Pn.__)('"%s" permanently deleted.'),ft(e[0])):u=(0,Pn.__)("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,Pn.__)("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,Pn.__)("An error occurred while permanently deleting the items."):d.size===1?u=(0,Pn.sprintf)((0,Pn.__)("An error occurred while permanently deleting the items: %s"),[...d][0]):u=(0,Pn.sprintf)((0,Pn.__)("Some errors occurred while permanently deleting the items: %s"),[...d].join(","))}s(u,{type:"snackbar"})}n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,Pn.__)("Delete permanently")})]})]})}},hH=p9e;var cse=a(ae(),1),Ps=a(j(),1),use=a(It(),1);var m9e={id:"restore",label:(0,Ps.__)("Restore"),isPrimary:!0,icon:yf,supportsBulk:!0,isEligible(e){return!Ef(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(use.store),{editEntityRecord:i,saveEditedEntityRecord:s}=t.dispatch(cse.store);await Promise.allSettled(e.map(c=>i("postType",c.type,c.id,{status:"draft"})));let l=await Promise.allSettled(e.map(c=>s("postType",c.type,c.id,{throwOnError:!0})));if(l.every(({status:c})=>c==="fulfilled")){let c;e.length===1?c=(0,Ps.sprintf)((0,Ps.__)('"%s" has been restored.'),ft(e[0])):e[0].type==="page"?c=(0,Ps.sprintf)((0,Ps.__)("%d pages have been restored."),e.length):c=(0,Ps.sprintf)((0,Ps.__)("%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,Ps.__)("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,Ps.__)("An error occurred while restoring the posts."):u.size===1?c=(0,Ps.sprintf)((0,Ps.__)("An error occurred while restoring the posts: %s"),[...u][0]):c=(0,Ps.sprintf)((0,Ps.__)("Some errors occurred while restoring the posts: %s"),[...u].join(","))}n(c,{type:"snackbar"})}}},gH=m9e;var vH=a(Y(),1),dse=a(ae(),1),Xo=a(j(),1),fse=a(It(),1),pse=a(U(),1),qf=a(G(),1);var rb=a(E(),1),h9e={id:"move-to-trash",label:(0,Xo._x)("Trash","verb"),isPrimary:!0,icon:Sf,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,pse.useState)(!1),{createSuccessNotice:i,createErrorNotice:s}=(0,vH.useDispatch)(fse.store),{deleteEntityRecord:l}=(0,vH.useDispatch)(dse.store);return(0,rb.jsxs)(qf.__experimentalVStack,{spacing:"5",children:[(0,rb.jsx)(qf.__experimentalText,{children:e.length===1?(0,Xo.sprintf)((0,Xo.__)('Are you sure you want to move "%s" to the trash?'),ft(e[0])):(0,Xo.sprintf)((0,Xo._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,rb.jsxs)(qf.__experimentalHStack,{justify:"right",children:[(0,rb.jsx)(qf.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,Xo.__)("Cancel")}),(0,rb.jsx)(qf.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,Xo.sprintf)((0,Xo.__)('"%s" moved to the trash.'),ft(e[0])):u=(0,Xo.sprintf)((0,Xo._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,Xo.__)("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,Xo.__)("An error occurred while moving the items to the trash."):d.size===1?u=(0,Xo.sprintf)((0,Xo.__)("An error occurred while moving the item to the trash: %s"),[...d][0]):u=(0,Xo.sprintf)((0,Xo.__)("Some errors occurred while moving the items to the trash: %s"),[...d].join(","))}s(u,{type:"snackbar"})}r&&r(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,children:(0,Xo._x)("Trash","verb")})]})]})}},bH=h9e;var vr=a(j(),1),vse=a(U(),1),Kf=a(G(),1),bse=a(Nl(),1),wH=a(Lt(),1);var mse=a(It(),1),hse=a(ae(),1),yH=a(Y(),1);function g9e(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 gse=async(e,t,r)=>{let{createSuccessNotice:o,createErrorNotice:n}=(0,yH.dispatch)(mse.store),{deleteEntityRecord:i}=(0,yH.dispatch)(hse.store),s=await Promise.allSettled(e.map(l=>i("postType",l.type,l.id,{force:!0},{throwOnError:!0})));if(s.every(({status:l})=>l==="fulfilled")){let l;s.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=g9e(s),c="";s.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 ob=a(E(),1),{PATTERN_TYPES:v9e}=cn(bse.privateApis),b9e={id:"delete-post",label:(0,vr.__)("Delete"),isPrimary:!0,icon:Sf,isEligible(e){return Ef(e)?D2(e):e.type===v9e.user},supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,vse.useState)(!1),i=e.every(s=>Ef(s)&&s?.has_theme_file);return(0,ob.jsxs)(Kf.__experimentalVStack,{spacing:"5",children:[(0,ob.jsx)(Kf.__experimentalText,{children:e.length>1?(0,vr.sprintf)((0,vr._n)("Delete %d item?","Delete %d items?",e.length),e.length):(0,vr.sprintf)((0,vr._x)('Delete "%s"?',"template part"),ft(e[0]))}),(0,ob.jsxs)(Kf.__experimentalHStack,{justify:"right",children:[(0,ob.jsx)(Kf.Button,{variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,vr.__)("Cancel")}),(0,ob.jsx)(Kf.Button,{variant:"primary",onClick:async()=>{n(!0),await gse(e,{success:{messages:{getMessage:l=>i?(0,vr.sprintf)((0,vr.__)('"%s" reset.'),(0,wH.decodeEntities)(ft(l))):(0,vr.sprintf)((0,vr._x)('"%s" deleted.',"template part"),(0,wH.decodeEntities)(ft(l))),getBatchMessage:()=>i?(0,vr.__)("Items reset."):(0,vr.__)("Items deleted.")}},error:{messages:{getMessage:l=>l.size===1?[...l][0]:i?(0,vr.__)("An error occurred while reverting the item."):(0,vr.__)("An error occurred while deleting the item."),getBatchMessage:l=>l.size===0?i?(0,vr.__)("An error occurred while reverting the items."):(0,vr.__)("An error occurred while deleting the items."):l.size===1?i?(0,vr.sprintf)((0,vr.__)("An error occurred while reverting the items: %s"),[...l][0]):(0,vr.sprintf)((0,vr.__)("An error occurred while deleting the items: %s"),[...l][0]):i?(0,vr.sprintf)((0,vr.__)("Some errors occurred while reverting the items: %s"),[...l].join(",")):(0,vr.sprintf)((0,vr.__)("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,vr.__)("Delete")})]})]})}},_H=b9e;var Rse=a(Y(),1),Zf=a(j(),1),Ase=a(It(),1),Ise=a(U(),1),Ose=a(Pt(),1);var Wi=a(G(),1),Ese=a(Te(),1),qI=a(ae(),1),kw=a(Y(),1),YI=a(U(),1),Pw=a(j(),1);var Pse=a(It(),1),kse=a(Pt(),1);var yse=a(Y(),1),wse=a(ae(),1),_se=()=>(0,yse.useSelect)(e=>e(wse.store).getEntityRecords("postType","wp_template_part",{per_page:-1}),[])??[],Sse=(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}`},xse=e=>$v(e).replace(/[^\w-]+/g,"")||"wp-custom-part";var kn=a(E(),1);function Cse(e,t){return`fields-create-template-part-modal__area-option-${e}-${t}`}function Tse(e,t){return`fields-create-template-part-modal__area-option-description-${e}-${t}`}function Rw({modalTitle:e,...t}){let r=(0,kw.useSelect)(o=>o(qI.store).getPostType("wp_template_part")?.labels?.add_new_item,[]);return(0,kn.jsx)(Wi.Modal,{title:e||r,onRequestClose:t.closeModal,overlayClassName:"fields-create-template-part-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,kn.jsx)(SH,{...t})})}var y9e=e=>e==="header"?f1:e==="footer"?c1:e==="sidebar"?k1:e==="navigation-overlay"?v1:hv;function SH({defaultArea:e="uncategorized",blocks:t=[],confirmLabel:r=(0,Pw.__)("Add"),closeModal:o,onCreate:n,onError:i,defaultTitle:s=""}){let{createErrorNotice:l}=(0,kw.useDispatch)(Pse.store),{saveEntityRecord:c}=(0,kw.useDispatch)(qI.store),u=_se(),[d,f]=(0,YI.useState)(s),[m,h]=(0,YI.useState)(e),[g,v]=(0,YI.useState)(!1),b=(0,Ese.useInstanceId)(Rw),_=(0,kw.useSelect)(w=>w(qI.store).getCurrentTheme()?.default_template_part_areas,[]);async function y(){if(!(!d||g))try{v(!0);let w=Sse(d,u),S=xse(w),x=await c("postType","wp_template_part",{slug:S,title:w,content:(0,kse.serialize)(t),area:m},{throwOnError:!0});await n(x)}catch(w){let S=w instanceof Error&&"code"in w&&w.message&&w.code!=="unknown_error"?w.message:(0,Pw.__)("An error occurred while creating the template part.");l(S,{type:"snackbar"}),i?.()}finally{v(!1)}}return(0,kn.jsx)("form",{onSubmit:async w=>{w.preventDefault(),await y()},children:(0,kn.jsxs)(Wi.__experimentalVStack,{spacing:"4",children:[(0,kn.jsx)(Wi.TextControl,{label:(0,Pw.__)("Name"),value:d,onChange:f,required:!0}),(0,kn.jsxs)("fieldset",{className:"fields-create-template-part-modal__area-fieldset",children:[(0,kn.jsx)(Wi.BaseControl.VisualLabel,{as:"legend",children:(0,Pw.__)("Area")}),(0,kn.jsx)("div",{className:"fields-create-template-part-modal__area-radio-group",children:(_??[]).map(w=>{let S=y9e(w.icon);return(0,kn.jsxs)("div",{className:"fields-create-template-part-modal__area-radio-wrapper",children:[(0,kn.jsx)("input",{type:"radio",id:Cse(w.area,b),name:`fields-create-template-part-modal__area-${b}`,value:w.area,checked:m===w.area,onChange:()=>{h(w.area)},"aria-describedby":Tse(w.area,b)}),(0,kn.jsx)(Wi.Icon,{icon:S,className:"fields-create-template-part-modal__area-radio-icon"}),(0,kn.jsx)("label",{htmlFor:Cse(w.area,b),className:"fields-create-template-part-modal__area-radio-label",children:w.label}),(0,kn.jsx)(Wi.Icon,{icon:Io,className:"fields-create-template-part-modal__area-radio-checkmark"}),(0,kn.jsx)("p",{className:"fields-create-template-part-modal__area-radio-description",id:Tse(w.area,b),children:w.description})]},w.area)})})]}),(0,kn.jsxs)(Wi.__experimentalHStack,{justify:"right",children:[(0,kn.jsx)(Wi.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{o()},children:(0,Pw.__)("Cancel")}),(0,kn.jsx)(Wi.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!d||g,isBusy:g,children:r})]})]})})}var Nse=a(E(),1),w9e={id:"duplicate-template-part",label:(0,Zf._x)("Duplicate","action label"),isEligible:e=>e.type==="wp_template_part",modalHeader:(0,Zf._x)("Duplicate template part","action label"),modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t})=>{let[r]=e,o=(0,Ise.useMemo)(()=>r.blocks??(0,Ose.parse)(typeof r.content=="string"?r.content:r.content.raw,{__unstableSkipMigrationLogs:!0}),[r.content,r.blocks]),{createSuccessNotice:n}=(0,Rse.useDispatch)(Ase.store);function i(s){n((0,Zf.sprintf)((0,Zf._x)('"%s" duplicated.',"template part"),ft(s)),{type:"snackbar",id:"edit-site-patterns-success"}),t?.()}return(0,Nse.jsx)(SH,{blocks:o,defaultArea:r.area,defaultTitle:(0,Zf.sprintf)((0,Zf._x)("%s (Copy)","template part"),ft(r)),onCreate:i,onError:t,confirmLabel:(0,Zf._x)("Duplicate","action label"),closeModal:t??(()=>{})})}},xH=w9e;var nT=a(j(),1),Mse=a(G(),1);var nh=a(E(),1),_9e={id:"alt_text",type:"text",label:(0,nT.__)("Alt text"),isVisible:e=>e?.media_type==="image",render:({item:e})=>e?.alt_text||"-",Edit:({field:e,onChange:t,data:r})=>(0,nh.jsx)(Mse.TextareaControl,{label:e.label,value:r.alt_text||"",onChange:o=>t({alt_text:o}),help:(0,nh.jsxs)(nh.Fragment,{children:[(0,nh.jsx)(cj,{href:(0,nT.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),openInNewTab:!0,children:(0,nT.__)("Describe the purpose of the image.")}),(0,nh.jsx)("br",{}),(0,nT.__)("Leave empty if decorative.")]}),rows:2}),enableSorting:!1,filterBy:!1},CH=_9e;var Vse=a(j(),1);var ZI=a(U(),1),TH=a(j(),1);function KI(e){return e?typeof e=="string"?e:typeof e=="object"&&(e.rendered||e.raw)||"":""}var XI=a(E(),1);function Fse({item:e}){let[t,r]=(0,ZI.useState)(null),o=e.post,n=e._embedded?.["wp:attached-to"]?.[0]?.id,i=e._embedded?.["wp:attached-to"]?.[0]?.title;return(0,ZI.useEffect)(()=>{o&&o===n&&r(KI(i)||(0,TH.__)("(no title)")),o||r((0,TH.__)("(Unattached)"))},[o,n,i]),(0,XI.jsx)(XI.Fragment,{children:t})}var QI=a(ae(),1),JI=a(G(),1),EH=a(j(),1),nb=a(U(),1),Dse=a(Te(),1),Lse=a(Y(),1);var PH=a(E(),1);function Bse({data:e,onChange:t}){let r=e.post&&e?._embedded?.["wp:attached-to"]?.[0]?[{label:KI(e._embedded?.["wp:attached-to"]?.[0]?.title),value:e.post.toString()}]:[],[o,n]=(0,nb.useState)(r),[i,s]=(0,nb.useState)([]),[l,c]=(0,nb.useState)(!1),[u,d]=(0,nb.useState)(e?.post?.toString()??null),f=(0,Lse.useSelect)(b=>b(QI.store).getPostTypes(),[]),m=()=>{t({post:0,_embedded:{...e?._embedded,"wp:attached-to":void 0}}),d(null),n([])},h=async b=>{c(!0);let _=await(0,QI.__experimentalFetchLinkSuggestions)(b,{type:"post",isInitialSuggestions:!0},{});s(_);let y=_.map(S=>({label:S.title,value:S.id.toString()})),w=!b&&y.findIndex(S=>S.value===u)===-1;n(y.concat(w?r:[])),c(!1)},g=b=>{if(!b){m();return}if(d(b),b){let _=i.find(y=>y.id===Number(b));if(_&&f){let y=f.find(S=>S.slug===_?.type),w={...y&&{type:y.slug},id:Number(b),title:{raw:_.title,rendered:_.title}};t({post:Number(b),_embedded:{...e?._embedded,"wp:attached-to":[w]}})}}},v=(0,nb.createInterpolateElement)((0,EH.__)("Search for a post or page to attach this media to or <button>detach current</button>."),{button:(0,PH.jsx)(JI.Button,{__next40pxDefaultSize:!0,onClick:m,variant:"link",accessibleWhenDisabled:!0,disabled:!u})});return(0,PH.jsx)(JI.ComboboxControl,{className:"dataviews-media-field__attached-to",isLoading:l,label:(0,EH.__)("Attached to"),help:v,value:u,options:o,onFilterValueChange:(0,Dse.debounce)(b=>h(b),300),onChange:g,hideLabelFromVision:!0})}var S9e={id:"attached_to",type:"text",label:(0,Vse.__)("Attached to"),Edit:Bse,render:Fse,enableSorting:!1,filterBy:!1},kH=S9e;var Hse=a(j(),1),Use=a(Y(),1),Wse=a(ae(),1);var jse=a(j(),1),Aw=a(U(),1);var $I=a(G(),1),ih=a(E(),1);function zse({item:e}){let t=e?._embedded?.author?.[0],r=t?.name,o=t?.avatar_urls?.[48],[n,i]=(0,Aw.useState)("loading");(0,Aw.useEffect)(()=>{i("loading")},[o]);let s=(0,Aw.useCallback)(c=>{c?.complete&&i("instant")},[]),l=()=>{n==="loading"&&i("loaded")};return(0,ih.jsxs)($I.__experimentalHStack,{alignment:"left",spacing:0,children:[!!o&&(0,ih.jsx)("div",{className:J("media-author-field__avatar",{"is-loading":n==="loading","is-loaded":n==="loaded"}),children:(0,ih.jsx)("img",{ref:s,onLoad:l,alt:(0,jse.__)("Author avatar"),src:o})}),!o&&(0,ih.jsx)("div",{className:"media-author-field__icon",children:(0,ih.jsx)($I.Icon,{icon:uv})}),(0,ih.jsx)("span",{className:"media-author-field__name",children:r})]})}var x9e={label:(0,Hse.__)("Author"),id:"author",type:"integer",getElements:async()=>(await(0,Use.resolveSelect)(Wse.store).getEntityRecords("root","user",{per_page:-1,who:"authors",_fields:"id,name",context:"view"})??[]).map(({id:t,name:r})=>({value:t,label:r})),render:zse,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},RH=x9e;var Gse=a(j(),1),Yse=a(G(),1);function sh(e){return e?typeof e=="string"?e:typeof e=="object"&&"raw"in e&&e.raw||"":""}var qse=a(E(),1),C9e={id:"caption",type:"text",label:(0,Gse.__)("Caption"),getValue:({item:e})=>sh(e?.caption),render:({item:e})=>sh(e?.caption)||"-",Edit:({field:e,onChange:t,data:r})=>(0,qse.jsx)(Yse.TextareaControl,{label:e.label,value:sh(r.caption)||"",onChange:o=>t({caption:o}),rows:2}),enableSorting:!1,filterBy:!1},AH=C9e;var Kse=a(j(),1),T9e={id:"date",type:"datetime",label:(0,Kse.__)("Date added"),filterBy:{operators:["before","after"]},readOnly:!0},IH=T9e;var Zse=a(j(),1),Xse=a(G(),1);var OH=a(E(),1),E9e={id:"description",type:"text",label:(0,Zse.__)("Description"),getValue:({item:e})=>sh(e?.description),render:({item:e})=>(0,OH.jsx)("div",{children:sh(e?.description)||"-"}),Edit:({field:e,onChange:t,data:r})=>(0,OH.jsx)(Xse.TextareaControl,{label:e.label,value:sh(r.description)||"",onChange:o=>t({description:o}),rows:5}),enableSorting:!1,filterBy:!1},NH=E9e;var eae=a(j(),1),tae=a(vo(),1);var Qse=a(U(),1),Jse=a(vo(),1);var ib=a(E(),1),P9e=15;function $se({item:e}){let t=(0,Qse.useMemo)(()=>e?.source_url?(0,Jse.getFilename)(e.source_url):null,[e?.source_url]);return t?t.length<=P9e?(0,ib.jsx)("span",{className:"dataviews-media-field__filename",children:t}):(0,ib.jsxs)(Ze.Root,{children:[(0,ib.jsx)(Ze.Trigger,{render:(0,ib.jsx)("span",{className:"dataviews-media-field__filename",children:t})}),(0,ib.jsx)(Ze.Popup,{children:t})]}):""}var k9e={id:"filename",type:"text",label:(0,eae.__)("File name"),getValue:({item:e})=>(0,tae.getFilename)(e?.source_url||""),render:$se,enableSorting:!1,filterBy:!1,readOnly:!0},MH=k9e;var Gi=a(j(),1),oae=1024,nae=1024*oae,iae=1024*nae,sae=1024*iae,aae=1024*sae,lae=1024*aae,cae=1024*lae,R9e=1024*cae;function rae(e,t,r=2){return(0,Gi.sprintf)((0,Gi._x)("%1$s %2$s","file size"),e.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:r}),t)}function A9e(e,t=2){if(e===0)return rae(0,(0,Gi._x)("B","unit symbol"),t);let r={[(0,Gi._x)("YB","unit symbol")]:R9e,[(0,Gi._x)("ZB","unit symbol")]:cae,[(0,Gi._x)("EB","unit symbol")]:lae,[(0,Gi._x)("PB","unit symbol")]:aae,[(0,Gi._x)("TB","unit symbol")]:sae,[(0,Gi._x)("GB","unit symbol")]:iae,[(0,Gi._x)("MB","unit symbol")]:nae,[(0,Gi._x)("KB","unit symbol")]:oae,[(0,Gi._x)("B","unit symbol")]:1};for(let[o,n]of Object.entries(r))if(e>=n)return rae(e/n,o,t);return""}var I9e={id:"filesize",type:"text",label:(0,Gi.__)("File size"),getValue:({item:e})=>e?.media_details?.filesize?A9e(e?.media_details?.filesize):"",isVisible:e=>!!e?.media_details?.filesize,enableSorting:!1,filterBy:!1,readOnly:!0},FH=I9e;var Iw=a(j(),1),O9e={id:"media_dimensions",type:"text",label:(0,Iw.__)("Dimensions"),getValue:({item:e})=>e?.media_details?.width&&e?.media_details?.height?(0,Iw.sprintf)((0,Iw._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},DH=O9e;var uae=a(j(),1),N9e={id:"mime_type",type:"text",label:(0,uae.__)("File type"),getValue:({item:e})=>e?.mime_type||"",render:({item:e})=>e?.mime_type||"-",enableSorting:!1,filterBy:!1,readOnly:!0},LH=N9e;var b_e=a(j(),1);var h_e=a(j(),1),KG=a(be(),1),g_e=a(Y(),1),YE=a(ae(),1);var gl=a(U(),1),hg=a(Y(),1),GG=a(j(),1),Ip=a(ae(),1),lS=a(be(),1),u_e=a(It(),1),d_e=a(Nl(),1),f_e=a(Pt(),1),p_e=a(vo(),1);var dae=a(U(),1),Ow=a(Y(),1),fae=a(Te(),1),pae=a(be(),1);var eO=a(E(),1);function M9e(e,t,r){if(!r)return t;let o=e.get(t);return o||(o=(0,Ow.createRegistry)({"core/block-editor":pae.storeConfig},t),o.registerStore("core/editor",iT),e.set(t,o)),o}var F9e=(0,fae.createHigherOrderComponent)(e=>({useSubRegistry:t=!0,...r})=>{let o=(0,Ow.useRegistry)(),[n]=(0,dae.useState)(()=>new WeakMap),i=M9e(n,o,t);return i===o?(0,eO.jsx)(e,{registry:o,...r}):(0,eO.jsx)(Ow.RegistryProvider,{value:i,children:(0,eO.jsx)(e,{registry:i,...r})})},"withRegistryProvider"),mae=F9e;var ug=a(U(),1),fy=a(Y(),1),Ia=a(ae(),1),O0e=a(j(),1),N0e=a(Dt(),1),M0e=a(Te(),1),F0e=a(Pt(),1),ZM=a(be(),1);var tO=a(U(),1),hae=a(E(),1),gae=(0,tO.createContext)(void 0);function vae({value:e,onChange:t,settings:r={},children:o}){let n={media:e,onChange:t,fields:r.fields||[]};return(0,hae.jsx)(gae.Provider,{value:n,children:o})}function Nw(){let e=(0,tO.useContext)(gae);if(!e)throw new Error("useMediaEditorContext must be used within MediaEditorProvider");return e}var bae=a(G(),1),yae=a(U(),1),rO=a(j(),1);function sb(e){return e?e.startsWith("image/")?{type:"image"}:e.startsWith("video/")?{type:"video"}:e.startsWith("audio/")?{type:"audio"}:{type:"application"}:{type:"application"}}var Gn=a(E(),1);function D9e({mediaType:e,mediaUrl:t,altText:r,displayTitle:o,mimeType:n,onLoad:i,onError:s,loadingState:l}){switch(e.type){case"image":return(0,Gn.jsx)("img",{className:l==="loaded"?"loaded":"",src:t,alt:r||"",onLoad:i,onError:s});case"video":return(0,Gn.jsx)("video",{src:t,controls:!0,onError:s,children:o});case"audio":return(0,Gn.jsx)("audio",{src:t,controls:!0,onError:s,children:o});default:return(0,Gn.jsxs)("div",{className:"media-editor-preview__file-info",children:[(0,Gn.jsx)("p",{className:"media-editor-preview__file-name",children:o}),(0,Gn.jsx)("p",{className:"media-editor-preview__mime-type",children:n}),(0,Gn.jsx)("a",{href:t,target:"_blank",rel:"noopener",className:"media-editor-preview__download-link",children:(0,rO.__)("View file")})]})}}function wae(e){let[t,r]=(0,yae.useState)("loading"),{media:o}=Nw(),{source_url:n,mime_type:i,alt_text:s,title:l}=o||{},c=sb(i);if(!n)return(0,Gn.jsx)("div",{className:"media-editor-preview media-editor-preview--empty",children:(0,Gn.jsx)("p",{children:(0,rO.__)("No media file available.")})});if(t==="error")return(0,Gn.jsxs)("div",{className:"media-editor-preview media-editor-preview--error",children:[(0,Gn.jsx)("p",{children:(0,rO.__)("Failed to load media file.")}),(0,Gn.jsx)("p",{className:"media-editor-preview__url",children:n})]});let u=typeof l=="string"?l:l?.rendered||l?.raw;return(0,Gn.jsxs)("div",{...e,className:`media-editor-preview media-editor-preview--${c.type}`,children:[c.type==="image"&&t==="loading"&&(0,Gn.jsx)("div",{className:"media-editor-preview__spinner",children:(0,Gn.jsx)(bae.Spinner,{})}),(0,Gn.jsx)(D9e,{mediaType:c,mediaUrl:n,altText:s,displayTitle:u,mimeType:i,onLoad:()=>r("loaded"),onError:()=>r("error"),loadingState:t})]})}var aO=a(U(),1);var BH=a(j(),1);var io="isAny",so="isNone",Yi="isAll",Yn="isNotAll",ks="between",Rs="inThePast",fa="over",_o="is",So="isNot",ah="lessThan",lh="greaterThan",ch="lessThanOrEqual",uh="greaterThanOrEqual",dh="before",fh="after",ph="beforeInc",mh="afterInc",Zu="contains",Xu="notContains",Qu="startsWith",hh="on",gh="notOn",oO=["asc","desc"],_ae={asc:"\u2191",desc:"\u2193"},nO={asc:"ascending",desc:"descending"},iO={asc:(0,BH.__)("Sort ascending"),desc:(0,BH.__)("Sort descending")},Sae={asc:Z4,desc:U4},sO="table",xae="grid",Cae="list",Tae="activity",Eae="pickerGrid",Pae="pickerTable",kae="pickerActivity";var Rae=(0,aO.createContext)({view:{type:sO},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,aO.createRef)(),resizeObserverRef:()=>{},defaultLayouts:{list:{},grid:{},table:{}},filters:[],isShowingFilter:!1,setIsShowingFilter:()=>{},hasInitiallyLoaded:!1,config:{perPageSizes:[]},intersectionObserver:null});Rae.displayName="DataViewsContext";var et=Rae;var td=a(j(),1);var ub=a(j(),1),yO=a(G(),1),rl=a(U(),1),Zae=a(Mo(),1);var Iae=a(G(),1),Oae=a(j(),1),Nae=a(E(),1),VH="dataviews-selection-checkbox";function vh({selection:e,onChangeSelection:t,item:r,getItemId:o,titleField:n,disabled:i,...s}){let l=o(r),c=e.includes(l),u=!i&&c,d=n?.getValue?.({item:r})||(0,Oae.__)("(no title)");return(0,Nae.jsx)(Iae.CheckboxControl,{className:VH,"aria-label":d,"aria-disabled":i,checked:u,onChange:()=>{i||t(c?e.filter(f=>l!==f):[...e,l])},...s})}var ab=a(G(),1),Lae=a(j(),1),Fw=a(U(),1);var Bae=a(Y(),1),jH=a(Te(),1);var Mae=a(xf(),1),{lock:Fae,unlock:_t}=(0,Mae.__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=a(E(),1),{Menu:Mw,kebabCase:L9e}=_t(ab.privateApis);function B9e({action:e,onClick:t,items:r,variant:o}){let n=typeof e.label=="string"?e.label:e.label(r);return(0,Fr.jsx)(ab.Button,{disabled:!!e.disabled,accessibleWhenDisabled:!0,size:"compact",variant:o,onClick:t,children:n})}function V9e({action:e,onClick:t,items:r}){let o=typeof e.label=="string"?e.label:e.label(r);return(0,Fr.jsx)(Mw.Item,{disabled:e.disabled,onClick:t,children:(0,Fr.jsx)(Mw.ItemLabel,{children:o})})}function sT({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)(ab.Modal,{title:n||o,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:r,focusOnMount:e.modalFocusOnMount??!0,size:e.modalSize||"medium",overlayClassName:`dataviews-action-modal dataviews-action-modal__${L9e(e.id)}`,children:(0,Fr.jsx)(e.RenderModal,{items:t,closeModal:r})})}function zH({actions:e,item:t,registry:r,setActiveModalAction:o}){let{primaryActions:n,regularActions:i}=(0,Fw.useMemo)(()=>e.reduce((l,c)=>((c.isPrimary?l.primaryActions:l.regularActions).push(c),l),{primaryActions:[],regularActions:[]}),[e]),s=l=>l.map(c=>(0,Fr.jsx)(V9e,{action:c,onClick:()=>{if("RenderModal"in c){o(c);return}c.callback([t],{registry:r})},items:[t]},c.id));return(0,Fr.jsxs)(Mw.Group,{children:[s(n),s(i)]})}function Dw({item:e,actions:t,isCompact:r}){let o=(0,Bae.useRegistry)(),{primaryActions:n,eligibleActions:i}=(0,Fw.useMemo)(()=>{let l=t.filter(u=>!u.isEligible||u.isEligible(e));return{primaryActions:l.filter(u=>u.isPrimary),eligibleActions:l}},[t,e]),s=(0,jH.useViewportMatch)("medium","<");return r?(0,Fr.jsx)(Dae,{item:e,actions:i,isSmall:!0,registry:o}):(0,Fr.jsxs)(se,{direction:"row",justify:"flex-end",className:"dataviews-item-actions",style:{flexShrink:0,width:"auto"},children:[(0,Fr.jsx)(HH,{item:e,actions:n,registry:o}),(n.length<i.length||s)&&(0,Fr.jsx)(Dae,{item:e,actions:i,registry:o})]})}function Dae({item:e,actions:t,isSmall:r,registry:o}){let[n,i]=(0,Fw.useState)(null);return(0,Fr.jsxs)(Fr.Fragment,{children:[(0,Fr.jsxs)(Mw,{placement:"bottom-end",children:[(0,Fr.jsx)(Mw.TriggerButton,{render:(0,Fr.jsx)(ab.Button,{size:r?"small":"compact",icon:bo,label:(0,Lae.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,className:"dataviews-all-actions-button"})}),(0,Fr.jsx)(Mw.Popover,{children:(0,Fr.jsx)(zH,{actions:t,item:e,registry:o,setActiveModalAction:i})})]}),!!n&&(0,Fr.jsx)(sT,{action:n,items:[e],closeModal:()=>i(null)})]})}function HH({item:e,actions:t,registry:r,buttonVariant:o}){let[n,i]=(0,Fw.useState)(null);return(0,jH.useViewportMatch)("medium","<")||!Array.isArray(t)||t.length===0?null:(0,Fr.jsxs)(Fr.Fragment,{children:[t.map(l=>(0,Fr.jsx)(B9e,{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)(sT,{action:n,items:[e],closeModal:()=>i(null)})]})}var cO=a(G(),1),lO=a(j(),1),lb=a(U(),1),j9e=a(Y(),1);var z9e=a(Te(),1);var bh=a(j(),1);function Vae(e,t,r,o=!1){return e>0?(0,bh.sprintf)((0,bh._n)("%d Item selected","%d Items selected",e),e):o||r<=t?(0,bh.sprintf)((0,bh._n)("%d Item","%d Items",r),r):(0,bh.sprintf)((0,bh._n)("%1$d of %2$d Item","%1$d of %2$d Items",r),t,r)}var aT=a(E(),1);function uO(e,t){return e.some(r=>r.supportsBulk&&(!r.isEligible||r.isEligible(t)))}function dO(e,t){return(0,lb.useMemo)(()=>uO(e,t),[e,t])}function fO(e,t){return(0,lb.useMemo)(()=>t.some(r=>uO(e,r)),[e,t])}function pO({selection:e,onChangeSelection:t,data:r,actions:o,getItemId:n,disableSelectAll:i=!1}){let s=(0,lb.useMemo)(()=>r.filter(d=>o.some(f=>f.supportsBulk&&(!f.isEligible||f.isEligible(d)))),[r,o]),l=r.filter(d=>e.includes(n(d))&&s.includes(d)),c=e.length>0,u=l.length===s.length;return i?(0,aT.jsx)(cO.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",checked:c,disabled:!c,onChange:()=>{t([])},"aria-label":(0,lO.__)("Deselect all")}):(0,aT.jsx)(cO.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",checked:u,indeterminate:!u&&!!l.length,onChange:()=>{t(u?[]:s.map(d=>n(d)))},"aria-label":u?(0,lO.__)("Deselect all"):(0,lO.__)("Select all")})}var Xf=a(j(),1);var Qf=a(G(),1),yh=a(U(),1);function mO(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 Ot=a(E(),1),{Menu:br}=_t(Qf.privateApis);function H9e({children:e}){return yh.Children.toArray(e).filter(Boolean).map((t,r)=>(0,Ot.jsxs)(yh.Fragment,{children:[r>0&&(0,Ot.jsx)(br.Separator,{}),t]},r))}var U9e=(0,yh.forwardRef)(function({fieldId:t,view:r,fields:o,onChangeView:n,onHide:i,setOpenedFilter:s,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,b=!1,_=[],y=o.find(k=>k.id===t),{setIsShowingFilter:w}=(0,yh.useContext)(et);if(!y)return null;g=y.enableHiding!==!1,v=y.enableSorting!==!1;let S=y.header;if(_=!!y.filterBy&&y.filterBy?.operators||[],b=!r.filters?.some(k=>t===k.field)&&!!(y.hasElements||y.Edit)&&y.filterBy!==!1&&!y.filterBy?.isPrimary,!v&&!l&&!g&&!b)return S;let x=mO(r,o).filter(k=>!f.includes(k.id)),C=(c||u)&&!!x.length,A=(0,Xf.isRTL)();return(0,Ot.jsxs)(br,{children:[(0,Ot.jsxs)(br.TriggerButton,{render:(0,Ot.jsx)(Qf.Button,{size:"compact",className:"dataviews-view-table-header-button",ref:d,variant:"tertiary"}),children:[S,r.sort&&h&&(0,Ot.jsx)("span",{"aria-hidden":"true",children:_ae[r.sort.direction]})]}),(0,Ot.jsx)(br.Popover,{style:{minWidth:"240px"},children:(0,Ot.jsxs)(H9e,{children:[v&&(0,Ot.jsx)(br.Group,{children:oO.map(k=>{let R=r.sort&&h&&r.sort.direction===k,M=`${t}-${k}`;return(0,Ot.jsx)(br.RadioItem,{name:"view-table-sorting",value:M,checked:R,onChange:()=>{n({...r,sort:{field:t,direction:k},showLevels:!1})},children:(0,Ot.jsx)(br.ItemLabel,{children:iO[k]})},M)})}),b&&(0,Ot.jsx)(br.Group,{children:(0,Ot.jsx)(br.Item,{prefix:(0,Ot.jsx)(Qf.Icon,{icon:d1}),onClick:()=>{s(t),w(!0),n({...r,page:1,filters:[...r.filters||[],{field:t,value:void 0,operator:_[0]}]})},children:(0,Ot.jsx)(br.ItemLabel,{children:(0,Xf.__)("Add filter")})})}),(l||g||C)&&y&&(0,Ot.jsxs)(br.Group,{children:[l&&(0,Ot.jsx)(br.Item,{prefix:(0,Ot.jsx)(Qf.Icon,{icon:G4}),disabled:A?m>=f.length-1:m<1,onClick:()=>{let k=A?m+1:m-1,R=[...f];R.splice(m,1),R.splice(k,0,t),n({...r,fields:R})},children:(0,Ot.jsx)(br.ItemLabel,{children:(0,Xf.__)("Move left")})}),l&&(0,Ot.jsx)(br.Item,{prefix:(0,Ot.jsx)(Qf.Icon,{icon:q4}),disabled:A?m<1:m>=f.length-1,onClick:()=>{let k=A?m-1:m+1,R=[...f];R.splice(m,1),R.splice(k,0,t),n({...r,fields:R})},children:(0,Ot.jsx)(br.ItemLabel,{children:(0,Xf.__)("Move right")})}),c&&!!x.length&&(0,Ot.jsxs)(br,{children:[(0,Ot.jsx)(br.SubmenuTriggerItem,{children:(0,Ot.jsx)(br.ItemLabel,{children:(0,Xf.__)("Insert left")})}),(0,Ot.jsx)(br.Popover,{children:x.map(k=>{let R=A?m+1:m;return(0,Ot.jsx)(br.Item,{onClick:()=>{n({...r,fields:[...f.slice(0,R),k.id,...f.slice(R)]})},children:(0,Ot.jsx)(br.ItemLabel,{children:k.label})},k.id)})})]}),u&&!!x.length&&(0,Ot.jsxs)(br,{children:[(0,Ot.jsx)(br.SubmenuTriggerItem,{children:(0,Ot.jsx)(br.ItemLabel,{children:(0,Xf.__)("Insert right")})}),(0,Ot.jsx)(br.Popover,{children:x.map(k=>{let R=A?m:m+1;return(0,Ot.jsx)(br.Item,{onClick:()=>{n({...r,fields:[...f.slice(0,R),k.id,...f.slice(R)]})},children:(0,Ot.jsx)(br.ItemLabel,{children:k.label})},k.id)})})]}),g&&y&&(0,Ot.jsx)(br.Item,{prefix:(0,Ot.jsx)(Qf.Icon,{icon:R1}),onClick:()=>{i(y),n({...r,fields:f.filter(k=>k!==t)})},children:(0,Ot.jsx)(br.ItemLabel,{children:(0,Xf.__)("Hide column")})})]})]})})]})}),W9e=U9e,Lw=W9e;var jae=a(U(),1),UH=a(E(),1);function G9e({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 wh({item:e,isItemClickable:t,onClickItem:r,renderItemLink:o,className:n,children:i,...s}){if(!t(e))return(0,UH.jsx)("div",{className:n,...s,children:i});if(o){let c=o({item:e,className:`${n} ${n}--clickable`,...s,children:i});return(0,jae.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=G9e({item:e,isItemClickable:t,onClickItem:r,className:n});return(0,UH.jsx)("div",{...l,...s,children:i})}var Ju=a(E(),1);function Y9e({item:e,level:t,titleField:r,mediaField:o,descriptionField:n,onClickItem:i,renderItemLink:s,isItemClickable:l}){return(0,Ju.jsxs)(se,{direction:"row",gap:"md",align:"flex-start",justify:"flex-start",children:[o&&(0,Ju.jsx)(wh,{item:e,isItemClickable:l,onClickItem:i,renderItemLink:s,className:"dataviews-view-table__cell-content-wrapper dataviews-column-primary__media","aria-label":l(e)&&(i||s)&&r?r.getValue?.({item:e}):void 0,children:(0,Ju.jsx)(o.render,{item:e,field:o,config:{sizes:"32px"}})}),(0,Ju.jsxs)(se,{direction:"column",align:"flex-start",className:"dataviews-view-table__primary-column-content",children:[r&&(0,Ju.jsxs)(wh,{item:e,isItemClickable:l,onClickItem:i,renderItemLink:s,className:"dataviews-view-table__cell-content-wrapper dataviews-title-field",children:[t!==void 0&&t>0&&(0,Ju.jsxs)("span",{className:"dataviews-view-table__level",children:[Array(t).fill("\u2014").join(" "),"\xA0"]}),(0,Ju.jsx)(r.render,{item:e,field:r})]}),n&&(0,Ju.jsx)(n.render,{item:e,field:n})]})]})}var hO=Y9e;var cb=a(U(),1),zae=a(j(),1),q9e=e=>(0,zae.isRTL)()?Math.abs(e.scrollLeft)<=1:e.scrollLeft+e.clientWidth>=e.scrollWidth-1;function Hae({scrollContainerRef:e,enabledHorizontal:t=!1}){let[r,o]=(0,cb.useState)(!1),[n,i]=(0,cb.useState)(!1),s=(0,cb.useCallback)(()=>{let l=e.current;l&&(t&&o(q9e(l)),i(l.scrollTop>0))},[e,t]);return(0,cb.useEffect)(()=>{if(typeof window>"u"||!e.current)return()=>{};let l=e.current;return s(),l.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{l.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[e,t,s]),{isHorizontalScrollEnd:r,isVerticallyScrolled:n}}function pa(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 lT=a(U(),1),Wae=a(Mo(),1);function Uae(e,t,r){return e.slice(Math.min(t,r),Math.max(t,r)+1)}function K9e({anchorId:e,targetId:t,lastTargetId:r,orderedIds:o,selection:n}){let i=o.indexOf(t);if(i===-1)return n;let s=e===null?-1:o.indexOf(e),l=s!==-1,c=l?s:i,u=l&&r!==null?o.indexOf(r):-1,d=u===-1?[]:Uae(o,c,u),f=n.filter(m=>!d.includes(m));return[...new Set([...f,...Uae(o,c,i)])]}function Z9e({targetId:e,orderedIds:t,selection:r}){let o=t.indexOf(e);if(o===-1)return null;let n=new Set(r),i=null,s=1/0;return t.forEach((l,c)=>{if(!n.has(l))return;let u=Math.abs(c-o);u<s&&(s=u,i=l)}),i}function gO({data:e,actions:t,getItemId:r,selection:o,onChangeSelection:n}){let i=(0,lT.useRef)(null),s=(0,lT.useRef)(!1);(0,lT.useEffect)(()=>{let f=()=>{s.current=!0};return document.addEventListener("touchstart",f,{once:!0}),()=>document.removeEventListener("touchstart",f)},[]);let l=e.filter(f=>uO(t,f)).map(r),c=new Set(l),u=l.length>0;return{getSelectionProps:f=>{let m=c.has(f);return{onMouseDown:h=>{h.button===0&&h.shiftKey&&u&&h.preventDefault()},onClickCapture:h=>{if(!u)return;let g=(0,Wae.isAppleOS)()?h.metaKey:h.ctrlKey,v=h.target instanceof Element&&!!h.target.closest(`.${VH}`);if(!g&&!h.shiftKey){m&&v&&(i.current={anchorId:f,lastTargetId:null});return}if(!(s.current||document.getSelection()?.type==="Range")&&(h.stopPropagation(),v||h.preventDefault(),!!m))if(h.shiftKey){let b=i.current;(!b||!c.has(b.anchorId))&&(b={anchorId:Z9e({targetId:f,orderedIds:l,selection:o})??f,lastTargetId:null}),n(K9e({anchorId:b.anchorId,targetId:f,lastTargetId:b.lastTargetId,orderedIds:l,selection:o})),i.current={anchorId:b.anchorId,lastTargetId:f}}else n(o.includes(f)?o.filter(b=>f!==b):[...o,f]),i.current={anchorId:f,lastTargetId:null}}}}}}var _h=a(G(),1),Yae=a(j(),1),qae=a(U(),1);var tl=a(E(),1);function Gae({field:e,isVisible:t,onToggleVisibility:r}){return(0,tl.jsx)(_h.__experimentalItem,{onClick:e.enableHiding?r:void 0,children:(0,tl.jsxs)(se,{direction:"row",gap:"sm",justify:"flex-start",align:"center",children:[(0,tl.jsx)("div",{style:{height:24,width:24},children:t&&(0,tl.jsx)(_h.Icon,{icon:Io})}),(0,tl.jsx)("span",{className:"dataviews-view-config__label",children:e.label})]})})}function X9e(e){return!!e}function vO({showLabel:e=!0}){let{view:t,fields:r,onChangeView:o}=(0,qae.useContext)(et),n=mO(t,r);if(!n?.length)return null;let i=r.find(g=>g.id===t.titleField),s=r.find(g=>g.id===t.mediaField),l=r.find(g=>g.id===t.descriptionField),c=[{field:i,isVisibleFlag:"showTitle"},{field:s,isVisibleFlag:"showMedia"},{field:l,isVisibleFlag:"showDescription"}].filter(({field:g})=>X9e(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,tl.jsxs)(se,{direction:"column",className:"dataviews-field-control",children:[e&&(0,tl.jsx)(_h.BaseControl.VisualLabel,{children:(0,Yae.__)("Properties")}),(0,tl.jsx)(se,{direction:"column",className:"dataviews-view-config__properties",children:(0,tl.jsxs)(_h.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,size:"medium",children:[c.map(({field:g,isVisibleFlag:v})=>{let b=t[v]??!0,_=h&&b?{...g,enableHiding:!1}:g;return(0,tl.jsx)(Gae,{field:_,isVisible:b,onToggleVisibility:()=>{o({...t,[v]:!b})}},g.id)}),n.map(g=>{let v=u.includes(g.id),b=m===1&&v?{...g,enableHiding:!1}:g;return(0,tl.jsx)(Gae,{field:b,isVisible:v,onToggleVisibility:()=>{o({...t,fields:v?u.filter(_=>_!==g.id):[...u,g.id]})}},g.id)})]})})]})}var bO=a(U(),1);function $u(e,t={delay:400}){let[r,o]=(0,bO.useState)(!1);return(0,bO.useEffect)(()=>{if(!e)return;let n=setTimeout(()=>{o(!0)},t.delay);return()=>{clearTimeout(n),o(!1)}},[e,t.delay]),r}var gt=a(E(),1);function Xae(e,t){if(e)return e;if(t==="integer"||t==="number")return"end"}function Q9e({item:e,fields:t,column:r,align:o}){let n=t.find(s=>s.id===r);if(!n)return null;let i=J("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__cell-align-end":o==="end","dataviews-view-table__cell-align-center":o==="center"});return(0,gt.jsx)("div",{className:i,children:(0,gt.jsx)(n.render,{item:e,field:n})})}function Kae({hasBulkActions:e,item:t,level:r,actions:o,fields:n,id:i,view:s,titleField:l,mediaField:c,descriptionField:u,selection:d,getItemId:f,isItemClickable:m,onClickItem:h,renderItemLink:g,onChangeSelection:v,onMouseDown:b,onClickCapture:_,isActionsColumnSticky:y,posinset:w}){let{paginationInfo:S}=(0,rl.useContext)(et),x=dO(o,t),C=x&&d.includes(i),{showTitle:A=!0,showMedia:k=!0,showDescription:R=!0,infiniteScrollEnabled:M}=s,P=s.fields??[],T=l&&A||c&&k||u&&R;return(0,gt.jsxs)("tr",{className:J("dataviews-view-table__row",{"is-selected":x&&C,"has-bulk-actions":x}),"aria-setsize":M?S.totalItems:void 0,"aria-posinset":w,role:M?"article":void 0,onClickCapture:_,onMouseDown:N=>{let L=(0,Zae.isAppleOS)()?N.metaKey:N.ctrlKey;N.button===0&&L&&window.navigator.userAgent.toLowerCase().includes("firefox")&&N.preventDefault(),b(N)},children:[e&&(0,gt.jsx)("td",{className:"dataviews-view-table__checkbox-column",children:(0,gt.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,gt.jsx)(vh,{item:t,selection:d,onChangeSelection:v,getItemId:f,titleField:l,disabled:!x})})}),T&&(0,gt.jsx)("td",{children:(0,gt.jsx)(hO,{item:t,level:r,titleField:A?l:void 0,mediaField:k?c:void 0,descriptionField:R?u:void 0,isItemClickable:m,onClickItem:h,renderItemLink:g})}),P.map(N=>{let{width:L,maxWidth:F,minWidth:D,align:z}=s.layout?.styles?.[N]??{},B=n.find(V=>V.id===N),O=Xae(z,B?.type);return(0,gt.jsx)("td",{style:{width:L,maxWidth:F,minWidth:D},children:(0,gt.jsx)(Q9e,{fields:n,item:t,column:N,align:O})},N)}),!!o?.length&&(0,gt.jsx)("td",{className:J("dataviews-view-table__actions-column",{"dataviews-view-table__actions-column--sticky":!0,"dataviews-view-table__actions-column--stuck":y}),onClick:N=>N.stopPropagation(),children:(0,gt.jsx)(Dw,{item:t,actions:o})})]})}function J9e({actions:e,data:t,fields:r,getItemId:o,getItemLevel:n,isLoading:i=!1,onChangeView:s,onChangeSelection:l,selection:c,setOpenedFilter:u,onClickItem:d,isItemClickable:f,renderItemLink:m,view:h,className:g,empty:v}){let{containerRef:b}=(0,rl.useContext)(et),_=$u(i),y=h.groupBy?.field?r.find(te=>te.id===h.groupBy?.field):null,w=y?pa(t,y):null,S=w?Array.from(w.values()).flat():t,{getSelectionProps:x}=gO({data:S,actions:e,getItemId:o,selection:c,onChangeSelection:l}),C=(0,rl.useRef)(new Map),A=(0,rl.useRef)(void 0),[k,R]=(0,rl.useState)(),[M,P]=(0,rl.useState)(null);(0,rl.useEffect)(()=>{A.current&&(A.current.focus(),A.current=void 0)});let T=(0,rl.useId)(),{isHorizontalScrollEnd:N,isVerticallyScrolled:L}=Hae({scrollContainerRef:b,enabledHorizontal:!!e?.length}),F=fO(e,t);if(k){A.current=k,R(void 0);return}let D=te=>{let de=C.current.get(te.id),ve=de?C.current.get(de.fallback):void 0;R(ve?.node)},z=te=>{te.preventDefault(),te.stopPropagation();let de={getBoundingClientRect:()=>({x:te.clientX,y:te.clientY,top:te.clientY,left:te.clientX,right:te.clientX,bottom:te.clientY,width:0,height:0,toJSON:()=>({})})};window.requestAnimationFrame(()=>{P(de)})},B=!!t?.length,O=r.find(te=>te.id===h.titleField),V=r.find(te=>te.id===h.mediaField),W=r.find(te=>te.id===h.descriptionField),{showTitle:q=!0,showMedia:Z=!0,showDescription:Q=!0}=h,ce=O&&q||V&&Z||W&&Q,re=h.fields??[],fe=(te,de)=>ve=>{ve?C.current.set(te,{node:ve,fallback:re[de>0?de-1:1]}):C.current.delete(te)},pe=h.infiniteScrollEnabled&&!w,$=(0,ub.isRTL)();return B?(0,gt.jsxs)(gt.Fragment,{children:[(0,gt.jsxs)("table",{className:J("dataviews-view-table",g,{[`has-${h.layout?.density}-density`]:h.layout?.density&&["compact","comfortable"].includes(h.layout.density),"has-bulk-actions":F,"is-refreshing":!pe&&_}),"aria-busy":i,"aria-describedby":T,role:pe?"feed":void 0,inert:!pe&&i?"true":void 0,children:[(0,gt.jsxs)("colgroup",{children:[F&&(0,gt.jsx)("col",{className:"dataviews-view-table__col-checkbox"}),ce&&(0,gt.jsx)("col",{className:"dataviews-view-table__col-first-data"}),re.map((te,de)=>(0,gt.jsx)("col",{className:J(`dataviews-view-table__col-${te}`,{"dataviews-view-table__col-expand":!ce&&de===re.length-1})},`col-${te}`)),!!e?.length&&(0,gt.jsx)("col",{className:"dataviews-view-table__col-actions"})]}),M&&(0,gt.jsx)(yO.Popover,{anchor:M,onClose:()=>P(null),placement:"bottom-start",children:(0,gt.jsx)(vO,{showLabel:!1})}),(0,gt.jsx)("thead",{className:J({"dataviews-view-table__thead--stuck":L}),onContextMenu:z,children:(0,gt.jsxs)("tr",{className:"dataviews-view-table__row",children:[F&&(0,gt.jsx)("th",{className:"dataviews-view-table__checkbox-column",scope:"col",onContextMenu:z,children:(0,gt.jsx)(pO,{selection:c,onChangeSelection:l,data:t,actions:e,getItemId:o})}),ce&&(0,gt.jsx)("th",{scope:"col",children:O&&(0,gt.jsx)(Lw,{ref:fe(O.id,0),fieldId:O.id,view:h,fields:r,onChangeView:s,onHide:D,setOpenedFilter:u,canMove:!1,canInsertLeft:$?h.layout?.enableMoving??!0:!1,canInsertRight:$?!1:h.layout?.enableMoving??!0})}),re.map((te,de)=>{let{width:ve,maxWidth:we,minWidth:oe,align:ee}=h.layout?.styles?.[te]??{},ue=r.find(Oe=>Oe.id===te),ie=Xae(ee,ue?.type),le=h.layout?.enableMoving??!0;return(0,gt.jsx)("th",{style:{width:ve,maxWidth:we,minWidth:oe,textAlign:ie},"aria-sort":h.sort?.direction&&h.sort?.field===te?nO[h.sort.direction]:void 0,scope:"col",children:(0,gt.jsx)(Lw,{ref:fe(te,de),fieldId:te,view:h,fields:r,onChangeView:s,onHide:D,setOpenedFilter:u,canMove:le,canInsertLeft:le,canInsertRight:le})},te)}),!!e?.length&&(0,gt.jsx)("th",{className:J("dataviews-view-table__actions-column",{"dataviews-view-table__actions-column--sticky":!0,"dataviews-view-table__actions-column--stuck":!N}),children:(0,gt.jsx)("span",{className:"dataviews-view-table-header",children:(0,ub.__)("Actions")})})]})}),B&&y&&w?Array.from(w.entries()).map(([te,de])=>(0,gt.jsxs)("tbody",{children:[(0,gt.jsx)("tr",{className:"dataviews-view-table__group-header-row",children:(0,gt.jsx)("td",{colSpan:re.length+(ce?1:0)+(F?1:0)+(e?.length?1:0),className:"dataviews-view-table__group-header-cell",children:h.groupBy?.showLabel===!1?te:(0,ub.sprintf)((0,ub.__)("%1$s: %2$s"),y.label,te)})}),de.map((ve,we)=>{let oe=o(ve)||we.toString();return(0,gt.jsx)(Kae,{item:ve,level:h.showLevels&&typeof n=="function"?n(ve):void 0,hasBulkActions:F,actions:e,fields:r,id:oe,view:h,titleField:O,mediaField:V,descriptionField:W,selection:c,getItemId:o,onChangeSelection:l,...x(oe),onClickItem:d,renderItemLink:m,isItemClickable:f,isActionsColumnSticky:!N},o(ve))})]},`group-${te}`)):(0,gt.jsx)("tbody",{children:B&&t.map((te,de)=>{let ve=o(te)||de.toString();return(0,gt.jsx)(Kae,{item:te,level:h.showLevels&&typeof n=="function"?n(te):void 0,hasBulkActions:F,actions:e,fields:r,id:ve,view:h,titleField:O,mediaField:V,descriptionField:W,selection:c,getItemId:o,onChangeSelection:l,...x(ve),onClickItem:d,renderItemLink:m,isItemClickable:f,isActionsColumnSticky:!N,posinset:pe?de+1:void 0},o(te))})})]}),pe&&i&&(0,gt.jsx)("div",{className:"dataviews-loading",id:T,children:(0,gt.jsx)("p",{className:"dataviews-loading-more",children:(0,gt.jsx)(yO.Spinner,{})})})]}):(0,gt.jsx)("div",{className:J("dataviews-no-results",{"is-refreshing":_}),id:T,children:v})}var Qae=J9e;var rle=a(G(),1),CO=a(j(),1);var ma=a(G(),1);var uT=a(j(),1),tle=a(Te(),1),xh=a(U(),1);var $9e=a(G(),1),eje=a(j(),1),wO=a(U(),1);var tje=a(E(),1),rje=[{value:120,breakpoint:1},{value:170,breakpoint:1},{value:230,breakpoint:1},{value:290,breakpoint:1112},{value:350,breakpoint:1636},{value:430,breakpoint:588}],oje=rje[2].value;function _O(){let e=(0,wO.useContext)(et),t=e.view;return(0,wO.useMemo)(()=>{let r=e.containerWidth,o=32,n=t.layout?.previewSize??oje,i=Math.floor((r+o)/(n+o));return Math.max(1,i)},[e.containerWidth,t.layout?.previewSize])}var Jae=a(U(),1);var $ae=a(E(),1),cT=(0,Jae.forwardRef)(({className:e,previewSize:t,...r},o)=>(0,$ae.jsx)("div",{ref:o,className:J("dataviews-view-grid-items",e),style:{gridTemplateColumns:t&&`repeat(auto-fill, minmax(${t}px, 1fr))`},...r}));var SO=a(U(),1);function Sh(e,t){let{intersectionObserver:r}=(0,SO.useContext)(et);(0,SO.useEffect)(()=>{let o=e.current;if(!(!o||t===void 0||!r))return r.observe(o),()=>{r.unobserve(o)}},[e,r,t])}function xO(e,t,r){let n=!!e?.length&&t?e[0].position:void 0;return n&&r?(n-1)%r:0}var kt=a(E(),1),{Badge:nje}=_t(ma.privateApis);function ije(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 ele=(0,xh.forwardRef)(function e({view:t,selection:r,onChangeSelection:o,onClickItem:n,isItemClickable:i,renderItemLink:s,getItemId:l,item:c,actions:u,mediaField:d,titleField:f,descriptionField:m,regularFields:h,badgeFields:g,hasBulkActions:v,config:b,posinset:_,setsize:y,...w},S){let{showTitle:x=!0,showMedia:C=!0,showDescription:A=!0}=t,k=dO(u,c),R=l(c),M=(0,xh.useRef)(null),P=(0,xh.useCallback)(V=>{M.current=V,typeof S=="function"?S(V):S&&(S.current=V)},[S]);Sh(M,_);let T=(0,tle.useInstanceId)(e),N=r.includes(R),L=(0,kt.jsx)("span",{className:"dataviews-view-grid__media-placeholder"}),F=C&&d?.render,D=F?(0,kt.jsx)(d.render,{item:c,field:d,config:b}):L,z=x&&f?.render?(0,kt.jsx)(f.render,{item:c,field:f}):null,B,O;return i(c)&&n&&(z?(B={"aria-labelledby":`dataviews-view-grid__title-field-${T}`},O={id:`dataviews-view-grid__title-field-${T}`}):B={"aria-label":(0,uT.__)("Navigate to item")}),(0,kt.jsxs)(se,{direction:"column",...w,ref:P,"aria-setsize":y,"aria-posinset":_,className:J(w.className,"dataviews-view-grid__row__gridcell","dataviews-view-grid__card",{"is-selected":k&&N}),children:[(0,kt.jsx)(wh,{item:c,isItemClickable:i,onClickItem:n,renderItemLink:s,className:J("dataviews-view-grid__media",{"dataviews-view-grid__media--placeholder":!F}),...B,children:D}),v&&(0,kt.jsx)(vh,{item:c,selection:r,onChangeSelection:o,getItemId:l,titleField:f,disabled:!k}),!!u?.length&&(0,kt.jsx)("div",{className:"dataviews-view-grid__media-actions",children:(0,kt.jsx)(Dw,{item:c,actions:u,isCompact:!0})}),x&&(0,kt.jsx)("div",{className:"dataviews-view-grid__title-actions",children:(0,kt.jsx)(wh,{item:c,isItemClickable:i,onClickItem:n,renderItemLink:s,className:"dataviews-view-grid__title-field dataviews-title-field",...O,title:f?.getValueFormatted({item:c,field:f})||void 0,children:z})}),(0,kt.jsxs)(se,{direction:"column",gap:"xs",children:[A&&m?.render&&(0,kt.jsx)(m.render,{item:c,field:m}),!!g?.length&&(0,kt.jsx)(se,{direction:"row",className:"dataviews-view-grid__badge-fields",gap:"sm",wrap:"wrap",align:"top",justify:"flex-start",children:g.map(V=>(0,kt.jsx)(nje,{className:"dataviews-view-grid__field-value",children:(0,kt.jsx)(V.render,{item:c,field:V})},V.id))}),!!h?.length&&(0,kt.jsx)(se,{direction:"column",className:"dataviews-view-grid__fields",gap:"xs",children:h.map(V=>(0,kt.jsx)(ma.Flex,{className:"dataviews-view-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,kt.jsxs)(kt.Fragment,{children:[(0,kt.jsxs)(Ze.Root,{children:[(0,kt.jsx)(Ze.Trigger,{render:(0,kt.jsx)(ma.FlexItem,{className:"dataviews-view-grid__field-name",children:V.header})}),(0,kt.jsx)(Ze.Popup,{children:V.label})]}),(0,kt.jsx)(ma.FlexItem,{className:"dataviews-view-grid__field-value",style:{maxHeight:"none"},children:(0,kt.jsx)(V.render,{item:c,field:V})})]})},V.id))})]})]})});function WH({data:e,isInfiniteScroll:t,className:r,inert:o,isLoading:n,view:i,fields:s,selection:l,onChangeSelection:c,onClickItem:u,isItemClickable:d,renderItemLink:f,getItemId:m,actions:h,getSelectionProps:g}){let{paginationInfo:v,resizeObserverRef:b}=(0,xh.useContext)(et),_=_O(),y=fO(h,e),w=s.find(T=>T.id===i?.titleField),S=s.find(T=>T.id===i?.mediaField),x=s.find(T=>T.id===i?.descriptionField),C=i.fields??[],{regularFields:A,badgeFields:k}=C.reduce((T,N)=>{let L=s.find(D=>D.id===N);if(!L)return T;let F=i.layout?.badgeFields?.includes(N)?"badgeFields":"regularFields";return T[F].push(L),T},{regularFields:[],badgeFields:[]}),R="900px",M=Math.ceil(e.length/_),P=xO(e,t,_);return(0,kt.jsxs)(kt.Fragment,{children:[t&&(0,kt.jsxs)(ma.Composite,{render:(0,kt.jsx)(cT,{className:J("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:b}),role:"feed",focusWrap:!0,inert:o,children:[Array.from({length:P}).map((T,N)=>(0,kt.jsx)(ma.Composite.Item,{render:L=>(0,kt.jsx)(se,{...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-${N}`)),e.map(T=>{let N=m(T),L=g(N),F=T.position;return(0,kt.jsx)(ma.Composite.Item,{render:D=>(0,kt.jsx)(ele,{...D,id:N,role:"article",view:i,selection:l,onChangeSelection:c,onClickItem:u,isItemClickable:d,renderItemLink:f,getItemId:m,item:T,actions:h,onMouseDown:z=>{D.onMouseDown?.(z),L.onMouseDown(z)},onClickCapture:z=>{D.onClickCapture?.(z),L.onClickCapture(z)},mediaField:S,titleField:w,descriptionField:x,regularFields:A,badgeFields:k,hasBulkActions:y,posinset:F,setsize:v.totalItems,config:{sizes:R}})},N)})]}),!t&&(0,kt.jsx)(ma.Composite,{role:"grid",className:J("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":M,ref:b,inert:o,children:ije(e,_).map((T,N)=>(0,kt.jsx)(ma.Composite.Row,{render:(0,kt.jsx)("div",{role:"row","aria-rowindex":N+1,"aria-label":(0,uT.sprintf)((0,uT.__)("Row %d"),N+1),className:"dataviews-view-grid__row",style:{gridTemplateColumns:`repeat( ${_}, minmax(0, 1fr) )`}}),children:T.map(L=>{let F=m(L),D=g(F);return(0,kt.jsx)(ma.Composite.Item,{render:z=>(0,kt.jsx)(ele,{...z,id:F,role:"gridcell",view:i,selection:l,onChangeSelection:c,onClickItem:u,isItemClickable:d,renderItemLink:f,getItemId:m,item:L,actions:h,onMouseDown:B=>{z.onMouseDown?.(B),D.onMouseDown(B)},onClickCapture:B=>{z.onClickCapture?.(B),D.onClickCapture(B)},mediaField:S,titleField:w,descriptionField:x,regularFields:A,badgeFields:k,hasBulkActions:y,config:{sizes:R}})},F)})},N))})]})}var ol=a(E(),1);function sje({actions:e,data:t,fields:r,getItemId:o,isLoading:n,onChangeSelection:i,onClickItem:s,isItemClickable:l,renderItemLink:c,selection:u,view:d,className:f,empty:m}){let h=$u(!!n),g=!!t?.length,v=d.groupBy?.field?r.find(x=>x.id===d.groupBy?.field):null,b=v?pa(t,v):null,_=d.infiniteScrollEnabled&&!b,y=b?Array.from(b.values()).flat():t,{getSelectionProps:w}=gO({data:y,actions:e,getItemId:o,selection:u,onChangeSelection:i});if(!g)return(0,ol.jsx)("div",{className:J("dataviews-no-results",{"is-refreshing":h}),children:m});let S={className:J(f,{"is-refreshing":!_&&h}),inert:!_&&n?"true":void 0,isLoading:n,view:d,fields:r,selection:u,onChangeSelection:i,onClickItem:s,isItemClickable:l,renderItemLink:c,getItemId:o,actions:e,getSelectionProps:w};return(0,ol.jsxs)(ol.Fragment,{children:[g&&v&&b&&(0,ol.jsx)(se,{direction:"column",gap:"lg",children:Array.from(b.entries()).map(([x,C])=>(0,ol.jsxs)(se,{direction:"column",gap:"sm",children:[(0,ol.jsx)("h3",{className:"dataviews-view-grid__group-header",children:d.groupBy?.showLabel===!1?x:(0,CO.sprintf)((0,CO.__)("%1$s: %2$s"),v.label,x)}),(0,ol.jsx)(WH,{...S,data:C,isInfiniteScroll:!1})]},x))}),!b&&(0,ol.jsx)(WH,{...S,data:t,isInfiniteScroll:!!_}),_&&n&&(0,ol.jsx)("p",{className:"dataviews-loading-more",children:(0,ol.jsx)(rle.Spinner,{})})]})}var ole=sje;var TO=a(Te(),1),qi=a(G(),1),Fo=a(U(),1),dT=a(j(),1);var KH=a(Y(),1);var rt=a(E(),1),{Menu:GH}=_t(qi.privateApis);function YH(e){return`${e}-item-wrapper`}function aje(e,t){return`${e}-primary-action-${t}`}function qH(e){return`${e}-dropdown`}function lje({idPrefix:e,primaryAction:t,item:r}){let o=(0,KH.useRegistry)(),[n,i]=(0,Fo.useState)(!1),s=aje(e,t.id),l=typeof t.label=="string"?t.label:t.label([r]);return"RenderModal"in t?(0,rt.jsx)("div",{role:"gridcell",children:(0,rt.jsx)(qi.Composite.Item,{id:s,render:(0,rt.jsx)(qi.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,text:l,size:"small",onClick:()=>i(!0)}),children:n&&(0,rt.jsx)(sT,{action:t,items:[r],closeModal:()=>i(!1)})})},t.id):(0,rt.jsx)("div",{role:"gridcell",children:(0,rt.jsx)(qi.Composite.Item,{id:s,render:(0,rt.jsx)(qi.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,size:"small",onClick:()=>{t.callback([r],{registry:o})},children:l})})},t.id)}function nle({view:e,actions:t,idPrefix:r,isSelected:o,item:n,titleField:i,mediaField:s,descriptionField:l,onSelect:c,otherFields:u,onDropdownTriggerKeyDown:d,posinset:f}){let{showTitle:m=!0,showMedia:h=!0,showDescription:g=!0,infiniteScrollEnabled:v}=e,b=(0,Fo.useRef)(null),_=`${r}-label`,y=`${r}-description`,w=(0,KH.useRegistry)(),[S,x]=(0,Fo.useState)(!1),[C,A]=(0,Fo.useState)(null),k=({type:B})=>{x(B==="mouseenter")},{paginationInfo:R}=(0,Fo.useContext)(et);(0,Fo.useEffect)(()=>{o&&b.current?.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})},[o]);let{primaryAction:M,eligibleActions:P}=(0,Fo.useMemo)(()=>{let B=t.filter(V=>!V.isEligible||V.isEligible(n));return{primaryAction:B.filter(V=>V.isPrimary)[0],eligibleActions:B}},[t,n]),T=M&&t.length===1,N=h&&s?.render?(0,rt.jsx)("div",{className:"dataviews-view-list__media-wrapper",children:(0,rt.jsx)(s.render,{item:n,field:s,config:{sizes:"52px"}})}):null,L=m&&i?.render?(0,rt.jsx)(i.render,{item:n,field:i}):null,F=g&&l?.render,D=!!N&&!F&&!u.length,z=P?.length>0&&(0,rt.jsxs)(se,{direction:"row",gap:"md",className:"dataviews-view-list__item-actions",children:[M&&(0,rt.jsx)(lje,{idPrefix:r,primaryAction:M,item:n}),!T&&(0,rt.jsxs)("div",{role:"gridcell",children:[(0,rt.jsxs)(GH,{placement:"bottom-end",children:[(0,rt.jsx)(GH.TriggerButton,{render:(0,rt.jsx)(qi.Composite.Item,{id:qH(r),render:(0,rt.jsx)(qi.Button,{size:"small",icon:bo,label:(0,dT.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,onKeyDown:d})})}),(0,rt.jsx)(GH.Popover,{children:(0,rt.jsx)(zH,{actions:P,item:n,registry:w,setActiveModalAction:A})})]}),!!C&&(0,rt.jsx)(sT,{action:C,items:[n],closeModal:()=>A(null)})]})]});return(0,rt.jsx)(qi.Composite.Row,{ref:b,render:(0,rt.jsx)("div",{"aria-posinset":f,"aria-setsize":v?R.totalItems:void 0}),role:v?"article":"row",className:J({"is-selected":o,"is-hovered":S}),onMouseEnter:k,onMouseLeave:k,children:(0,rt.jsxs)(se,{direction:"row",className:"dataviews-view-list__item-wrapper",children:[(0,rt.jsx)("div",{role:"gridcell",children:(0,rt.jsx)(qi.Composite.Item,{id:YH(r),"aria-pressed":o,"aria-labelledby":_,"aria-describedby":y,className:"dataviews-view-list__item",onClick:()=>c(n)})}),(0,rt.jsxs)(se,{direction:"row",gap:"md",justify:"start",align:D?"center":"flex-start",style:{flex:1,minWidth:0},children:[N,(0,rt.jsxs)(se,{direction:"column",gap:"xs",className:"dataviews-view-list__field-wrapper",children:[(0,rt.jsxs)(se,{direction:"row",align:"center",children:[(0,rt.jsx)("div",{className:"dataviews-title-field dataviews-view-list__title-field",id:_,children:L}),z]}),F&&(0,rt.jsx)("div",{className:"dataviews-view-list__field",children:(0,rt.jsx)(l.render,{item:n,field:l})}),(0,rt.jsx)("div",{className:"dataviews-view-list__fields",id:y,children:u.map(B=>(0,rt.jsxs)("div",{className:"dataviews-view-list__field",children:[(0,rt.jsx)(Gt,{className:"dataviews-view-list__field-label",render:(0,rt.jsx)("span",{}),children:B.label}),(0,rt.jsx)("span",{className:"dataviews-view-list__field-value",children:(0,rt.jsx)(B.render,{item:n,field:B})})]},B.id))})]})]})]})})}function cje(e){return!!e}function ZH(e){let{actions:t,data:r,fields:o,getItemId:n,isLoading:i,onChangeSelection:s,selection:l,view:c,className:u,empty:d}=e,f=(0,TO.useInstanceId)(ZH,"view-list"),m=$u(!!i),{paginationInfo:h}=(0,Fo.useContext)(et),g=r?.findLast(W=>l.includes(n(W))),v=o.find(W=>W.id===c.titleField),b=o.find(W=>W.id===c.mediaField),_=o.find(W=>W.id===c.descriptionField),y=(c?.fields??[]).map(W=>o.find(q=>W===q.id)).filter(cje),w=W=>s([n(W)]),S=(0,Fo.useCallback)(W=>`${f}-${n(W)}`,[f,n]),x=(0,Fo.useCallback)((W,q)=>q.startsWith(S(W)),[S]),[C,A]=(0,Fo.useState)(void 0),k=(0,Fo.useRef)(null);(0,Fo.useEffect)(()=>{g&&A(YH(S(g)))},[g,S]);let R=r.findIndex(W=>x(W,C??"")),M=(0,TO.usePrevious)(R),P=R!==-1,T=(0,Fo.useCallback)((W,q)=>{let Z=Math.min(r.length-1,Math.max(0,W));if(!r[Z])return;let Q=S(r[Z]),ce=q(Q);A(ce),k.current?.contains(k.current.ownerDocument.activeElement)&&document.getElementById(ce)?.focus()},[r,S]);(0,Fo.useEffect)(()=>{!P&&(M!==void 0&&M!==-1)&&T(M,YH)},[P,T,M]);let N=(0,Fo.useCallback)(W=>{W.key==="ArrowDown"&&(W.preventDefault(),T(R+1,qH)),W.key==="ArrowUp"&&(W.preventDefault(),T(R-1,qH))},[T,R]),L=!!r?.length,F=c.groupBy?.field?o.find(W=>W.id===c.groupBy?.field):null,D=L&&F?pa(r,F):null,z=c.infiniteScrollEnabled&&!D,B=z&&(c.startPosition??1)+(c.perPage??0)<h.totalItems,O=J("dataviews-view-list",u,{[`has-${c.layout?.density}-density`]:c.layout?.density&&["compact","comfortable"].includes(c.layout.density),"is-refreshing":!z&&m}),V={ref:k,id:f,render:(0,rt.jsx)("div",{}),activeId:C,setActiveId:A,inert:!z&&i?"true":void 0};return L?L&&F&&D?(0,rt.jsx)(qi.Composite,{...V,className:"dataviews-view-list__group",role:"grid",children:(0,rt.jsx)(se,{direction:"column",gap:"lg",className:O,children:Array.from(D.entries()).map(([W,q])=>(0,rt.jsxs)(se,{direction:"column",children:[(0,rt.jsx)("h3",{className:"dataviews-view-list__group-header",children:c.groupBy?.showLabel===!1?W:(0,dT.sprintf)((0,dT.__)("%1$s: %2$s"),F.label,W)}),q.map(Z=>{let Q=S(Z);return(0,rt.jsx)(nle,{view:c,idPrefix:Q,actions:t,item:Z,isSelected:Z===g,onSelect:w,mediaField:b,titleField:v,descriptionField:_,otherFields:y,onDropdownTriggerKeyDown:N},Q)})]},W))})}):(0,rt.jsxs)(rt.Fragment,{children:[(0,rt.jsx)(qi.Composite,{...V,className:O,role:c.infiniteScrollEnabled?"feed":"grid",children:r.map((W,q)=>{let Z=S(W);return(0,rt.jsx)(nle,{view:c,idPrefix:Z,actions:t,item:W,isSelected:W===g,onSelect:w,mediaField:b,titleField:v,descriptionField:_,otherFields:y,onDropdownTriggerKeyDown:N,posinset:c.infiniteScrollEnabled?q+1:void 0},Z)})}),(B||z&&i)&&(0,rt.jsx)("p",{className:"dataviews-loading-more","aria-hidden":!i,children:(0,rt.jsx)(qi.Spinner,{})})]}):(0,rt.jsx)("div",{className:J("dataviews-no-results",{"is-refreshing":m}),children:d})}var dle=a(G(),1);var EO=a(j(),1),ile=a(U(),1);var Bw=a(E(),1);function sle({groupName:e,groupData:t,groupField:r,showLabel:o=!0,children:n}){let i=o?(0,ile.createInterpolateElement)((0,EO.sprintf)((0,EO.__)("%s: <groupName />"),r.label).trim(),{groupName:(0,Bw.jsx)(r.render,{item:t[0],field:r})}):(0,Bw.jsx)(r.render,{item:t[0],field:r});return(0,Bw.jsxs)(se,{direction:"column",className:"dataviews-view-activity__group",children:[(0,Bw.jsx)("h3",{className:"dataviews-view-activity__group-header",children:i}),n]},e)}var db=a(U(),1),ale=a(Y(),1),lle=a(Te(),1);var Do=a(E(),1);function uje(e){let{view:t,actions:r,item:o,titleField:n,mediaField:i,descriptionField:s,otherFields:l,posinset:c,onClickItem:u,renderItemLink:d,isItemClickable:f}=e,{showTitle:m=!0,showMedia:h=!0,showDescription:g=!0,infiniteScrollEnabled:v}=t,b=(0,db.useRef)(null),_=(0,ale.useRegistry)(),{paginationInfo:y}=(0,db.useContext)(et),{primaryActions:w,eligibleActions:S}=(0,db.useMemo)(()=>{let P=r.filter(N=>!N.isEligible||N.isEligible(o));return{primaryActions:P.filter(N=>N.isPrimary),eligibleActions:P}},[r,o]),x=(0,lle.useViewportMatch)("medium","<"),C=t.layout?.density??"balanced",A=h&&C!=="compact"&&i?.render?(0,Do.jsx)(i.render,{item:o,field:i,config:{sizes:C==="comfortable"?"32px":"24px"}}):null,k=(0,Do.jsx)("div",{className:"dataviews-view-activity__item-type-icon",children:A||(0,Do.jsx)("span",{className:"dataviews-view-activity__item-bullet","aria-hidden":"true"})}),R=m&&n?.render?(0,Do.jsx)(n.render,{item:o,field:n}):null,M=(0,db.useMemo)(()=>C==="comfortable"?"md":"sm",[C]);return(0,Do.jsx)("div",{ref:b,role:v?"article":void 0,"aria-posinset":c,"aria-setsize":v?y.totalItems:void 0,className:J("dataviews-view-activity__item",C==="compact"&&"is-compact",C==="balanced"&&"is-balanced",C==="comfortable"&&"is-comfortable"),children:(0,Do.jsxs)(se,{direction:"row",gap:"lg",justify:"start",align:"flex-start",children:[(0,Do.jsx)(se,{direction:"column",gap:"xs",align:"center",className:"dataviews-view-activity__item-type",children:k}),(0,Do.jsxs)(se,{direction:"column",gap:M,align:"flex-start",className:"dataviews-view-activity__item-content",children:[R&&(0,Do.jsx)(wh,{item:o,isItemClickable:f,onClickItem:u,renderItemLink:d,className:"dataviews-view-activity__item-title",children:R}),g&&s&&(0,Do.jsx)("div",{className:"dataviews-view-activity__item-description",children:(0,Do.jsx)(s.render,{item:o,field:s})}),(0,Do.jsx)("div",{className:"dataviews-view-activity__item-fields",children:l.map(P=>(0,Do.jsxs)("div",{className:"dataviews-view-activity__item-field",children:[(0,Do.jsx)(Gt,{className:"dataviews-view-activity__item-field-label",render:(0,Do.jsx)("span",{}),children:P.label}),(0,Do.jsx)("span",{className:"dataviews-view-activity__item-field-value",children:(0,Do.jsx)(P.render,{item:o,field:P})})]},P.id))}),!!w?.length&&(0,Do.jsx)(HH,{item:o,actions:w,registry:_,buttonVariant:"secondary"})]}),(w.length<S.length||x&&S.length>0)&&(0,Do.jsx)("div",{className:"dataviews-view-activity__item-actions",children:(0,Do.jsx)(Dw,{item:o,actions:S,isCompact:!0})})]})})}var cle=uje;var ule=a(_e(),1);function dje(e){return!!e}function XH(e){let{data:t,fields:r,getItemId:o,view:n}=e,i=r.find(u=>u.id===n.titleField),s=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(dje);return t.map((u,d)=>(0,ule.createElement)(cle,{...e,key:o(u),item:u,mediaField:s,titleField:i,descriptionField:l,otherFields:c,posinset:n.infiniteScrollEnabled?d+1:void 0}))}var nl=a(E(),1);function fle(e){let{empty:t,data:r,fields:o,isLoading:n,view:i,className:s}=e,l=$u(!!n),c=!!r?.length,u=i.groupBy?.field?o.find(v=>v.id===i.groupBy?.field):null,d=c&&u?pa(r,u):null,f=i.infiniteScrollEnabled&&!d;if(!c)return(0,nl.jsx)("div",{className:J("dataviews-no-results",{"is-refreshing":l}),children:t});let m=!f&&!!n,h=J("dataviews-view-activity",s,{"is-refreshing":!f&&l}),g=d?Array.from(d.entries()):[];return c&&u&&d?(0,nl.jsx)(se,{direction:"column",gap:"sm",className:h,inert:m?"true":void 0,children:g.map(([v,b])=>(0,nl.jsx)(sle,{groupName:v,groupData:b,groupField:u,showLabel:i.groupBy?.showLabel!==!1,children:(0,nl.jsx)(XH,{...e,data:b})},v))}):(0,nl.jsxs)(nl.Fragment,{children:[(0,nl.jsx)("div",{className:h,role:i.infiniteScrollEnabled?"feed":void 0,inert:m?"true":void 0,children:(0,nl.jsx)(XH,{...e})}),f&&n&&(0,nl.jsx)("p",{className:"dataviews-loading-more",children:(0,nl.jsx)(dle.Spinner,{})})]})}var As=a(G(),1),mT=a(j(),1),yle=a(Te(),1),kO=a(U(),1);var pT=a(G(),1),mle=a(Y(),1),ed=a(U(),1);var PO=a(j(),1);var fT=a(G(),1),Vw=a(U(),1),il=a(j(),1);var Jf=a(E(),1);function fje(e,t){return!e.infiniteScrollEnabled&&t.totalItems>0&&t.totalPages>1}function QH(){let{view:e,onChangeView:t,paginationInfo:r}=(0,Vw.useContext)(et);if(!fje(e,r))return null;let{totalPages:o}=r,n=e.page??1,i=Array.from(Array(o)).map((s,l)=>{let c=l+1;return{value:c.toString(),label:c.toString(),"aria-label":n===c?(0,il.sprintf)((0,il.__)("Page %1$d of %2$d"),n,o):c.toString()}});return(0,Jf.jsxs)(se,{direction:"row",className:"dataviews-pagination",justify:"end",align:"center",gap:"xl",children:[(0,Jf.jsx)(se,{direction:"row",justify:"flex-start",align:"center",gap:"xs",className:"dataviews-pagination__page-select",children:(0,Vw.createInterpolateElement)((0,il.sprintf)((0,il._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging"),"<CurrentPage />",o),{div:(0,Jf.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,Jf.jsx)(fT.SelectControl,{"aria-label":(0,il.__)("Current page"),value:n.toString(),options:i,onChange:s=>{t({...e,page:+s})},size:"small",variant:"minimal"})})}),(0,Jf.jsxs)(se,{direction:"row",gap:"xs",align:"center",children:[(0,Jf.jsx)(fT.Button,{onClick:()=>t({...e,page:n-1}),disabled:n===1,accessibleWhenDisabled:!0,label:(0,il.__)("Previous page"),icon:(0,il.isRTL)()?kl:Rl,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,Jf.jsx)(fT.Button,{onClick:()=>t({...e,page:n+1}),disabled:n>=o,accessibleWhenDisabled:!0,label:(0,il.__)("Next page"),icon:(0,il.isRTL)()?Rl:kl,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})}var ple=(0,Vw.memo)(QH);var qn=a(E(),1),JH=[];function fb(e){return(0,ed.useMemo)(()=>!!e?.length&&e?.every(t=>t.supportsBulk),[e])}function pje({selection:e,selectedItems:t,onChangeSelection:r,data:o,getItemId:n,disableSelectAll:i=!1}){let s=e.length>0,l=t.length===o.length;return i?(0,qn.jsx)(pT.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",checked:s,disabled:!s,onChange:()=>{r([])},"aria-label":(0,PO.__)("Deselect all")}):(0,qn.jsx)(pT.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",checked:l,indeterminate:!l&&!!t.length,onChange:()=>{if(l)r(e.filter(c=>!o.some(u=>c===n(u))));else{let c=new Set([...e,...o.map(u=>n(u))]);r(Array.from(c))}},"aria-label":l?(0,PO.__)("Deselect all"):(0,PO.__)("Select all")})}function mje({actions:e,items:t,selection:r}){let o=(0,mle.useRegistry)(),[n,i]=(0,ed.useState)(null);return(0,qn.jsx)(se,{direction:"row",gap:"xs",children:e.map(s=>{if(!("callback"in s))return null;let{id:l,label:c,icon:u,isPrimary:d,callback:f}=s,m=typeof c=="string"?c:c(t),h=d?"primary":"tertiary",g=l===n;return(0,qn.jsx)(pT.Button,{accessibleWhenDisabled:!0,icon:u,disabled:g||!r?.length,isBusy:g,onClick:async()=>{i(l),await f(t,{registry:o}),i(null)},size:"compact",variant:h,children:m},l)})})}function hle(){let{data:e,selection:t,onChangeSelection:r,getItemId:o,actions:n=JH,paginationInfo:i,view:s}=(0,ed.useContext)(et),l=fb(n),c=(0,ed.useMemo)(()=>e.filter(d=>t.includes(o(d))),[t,o,e]);if(!n.length)return null;let u=Vae(t.length,e.length,i.totalItems,!!s.infiniteScrollEnabled);return(0,qn.jsxs)(se,{direction:"row",className:"dataviews-picker-footer__bulk-selection",gap:"md",align:"center",children:[l&&(0,qn.jsx)(pje,{selection:t,selectedItems:c,onChangeSelection:r,data:e,getItemId:o,disableSelectAll:!!s.infiniteScrollEnabled}),(0,qn.jsx)("span",{className:"dataviews-bulk-actions-footer__item-count",children:u})]})}function gle(){let{data:e,selection:t,getItemId:r,actions:o=JH}=(0,ed.useContext)(et),n=(0,ed.useMemo)(()=>e.filter(i=>t.includes(r(i))),[t,r,e]);return o.length?(0,qn.jsx)("div",{className:"dataviews-picker-footer__actions",children:(0,qn.jsx)(mje,{actions:o,items:n,selection:t})}):null}function vle(){return(0,qn.jsxs)(se,{direction:"row",gap:"md",align:"center",children:[(0,qn.jsx)(hle,{}),(0,qn.jsx)(gle,{})]})}function $H(){let{actions:e=JH,paginationInfo:t,view:r}=(0,ed.useContext)(et),o=!r.infiniteScrollEnabled&&!!t.totalItems&&t.totalPages>1;return!e.length&&!o?null:(0,qn.jsxs)(se,{direction:"row",justify:"space-between",align:"center",className:"dataviews-footer",gap:"sm",children:[(0,qn.jsx)(hle,{}),(0,qn.jsx)(ple,{}),(0,qn.jsx)(gle,{})]})}var Tt=a(E(),1),{Badge:hje}=_t(As.privateApis);function ble({view:e,multiselect:t,selection:r,onChangeSelection:o,getItemId:n,item:i,mediaField:s,titleField:l,descriptionField:c,regularFields:u,badgeFields:d,config:f,posinset:m,setsize:h}){let{showTitle:g=!0,showMedia:v=!0,showDescription:b=!0}=e,_=n(i),y=(0,kO.useRef)(null),w=r.includes(_);Sh(y,m);let S=s?.render?(0,Tt.jsx)(s.render,{item:i,field:s,config:f}):null,x=g&&l?.render?(0,Tt.jsx)(l.render,{item:i,field:l}):null;return(0,Tt.jsxs)(As.Composite.Item,{ref:y,"aria-label":l?l.getValue({item:i})||(0,mT.__)("(no title)"):void 0,render:({children:C,...A})=>(0,Tt.jsx)(se,{direction:"column",children:C,...A}),role:"option","aria-posinset":m,"aria-setsize":h,className:J("dataviews-view-picker-grid__card",{"is-selected":w}),"aria-selected":w,onClick:()=>{if(w)o(r.filter(C=>_!==C));else{let C=t?[...r,_]:[_];o(C)}},children:[v&&S&&(0,Tt.jsx)("div",{className:"dataviews-view-picker-grid__media",children:S}),v&&S&&(0,Tt.jsx)(vh,{item:i,selection:r,onChangeSelection:o,getItemId:n,titleField:l,disabled:!1,"aria-hidden":!0,tabIndex:-1}),g&&(0,Tt.jsx)(se,{direction:"row",justify:"space-between",className:"dataviews-view-picker-grid__title-actions",children:(0,Tt.jsx)("div",{className:"dataviews-view-picker-grid__title-field dataviews-title-field",children:x})}),(0,Tt.jsxs)(se,{direction:"column",gap:"xs",children:[b&&c?.render&&(0,Tt.jsx)(c.render,{item:i,field:c}),!!d?.length&&(0,Tt.jsx)(se,{direction:"row",className:"dataviews-view-picker-grid__badge-fields",gap:"sm",wrap:"wrap",align:"top",justify:"flex-start",children:d.map(C=>(0,Tt.jsx)(hje,{className:"dataviews-view-picker-grid__field-value",children:(0,Tt.jsx)(C.render,{item:i,field:C})},C.id))}),!!u?.length&&(0,Tt.jsx)(se,{direction:"column",className:"dataviews-view-picker-grid__fields",gap:"xs",children:u.map(C=>(0,Tt.jsx)(As.Flex,{className:"dataviews-view-picker-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,Tt.jsxs)(Tt.Fragment,{children:[(0,Tt.jsx)(As.FlexItem,{className:"dataviews-view-picker-grid__field-name",children:C.header}),(0,Tt.jsx)(As.FlexItem,{className:"dataviews-view-picker-grid__field-value",style:{maxHeight:"none"},children:(0,Tt.jsx)(C.render,{item:i,field:C})})]})},C.id))})]})]},_)}function wle({groupName:e,groupField:t,showLabel:r=!0,children:o}){let n=(0,yle.useInstanceId)(wle,"dataviews-view-picker-grid-group__header");return(0,Tt.jsxs)(se,{direction:"column",gap:"sm",role:"group","aria-labelledby":n,children:[(0,Tt.jsx)("h3",{className:"dataviews-view-picker-grid-group__header",id:n,children:r?(0,mT.sprintf)((0,mT.__)("%1$s: %2$s"),t.label,e):e}),o]},e)}function gje({actions:e,data:t,fields:r,getItemId:o,isLoading:n,onChangeSelection:i,selection:s,view:l,className:c,empty:u}){let{resizeObserverRef:d,paginationInfo:f,itemListLabel:m}=(0,kO.useContext)(et),h=r.find(F=>F.id===l?.titleField),g=r.find(F=>F.id===l?.mediaField),v=r.find(F=>F.id===l?.descriptionField),b=l.fields??[],{regularFields:_,badgeFields:y}=b.reduce((F,D)=>{let z=r.find(O=>O.id===D);if(!z)return F;let B=l.layout?.badgeFields?.includes(D)?"badgeFields":"regularFields";return F[B].push(z),F},{regularFields:[],badgeFields:[]}),w=!!t?.length,S=l.layout?.previewSize,x=fb(e),C="900px",A=l.groupBy?.field?r.find(F=>F.id===l.groupBy?.field):null,k=A?pa(t,A):null,R=(l.infiniteScrollEnabled&&!k)??!1,M=l?.page??1,P=l?.perPage??0,T=R?f?.totalItems:void 0,N=_O(),L=xO(t,R,N);return(0,Tt.jsxs)(Tt.Fragment,{children:[w&&A&&k&&(0,Tt.jsx)(As.Composite,{virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":x,className:J("dataviews-view-picker-grid",c,{[`has-${l.layout?.density}-density`]:l.layout?.density&&["compact","comfortable"].includes(l.layout.density)}),"aria-label":m,render:({children:F,...D})=>(0,Tt.jsx)(se,{direction:"column",gap:"lg",children:F,...D}),children:Array.from(k.entries()).map(([F,D])=>(0,Tt.jsx)(wle,{groupName:F,groupField:A,showLabel:l.groupBy?.showLabel!==!1,children:(0,Tt.jsx)(cT,{previewSize:S,style:{gridTemplateColumns:S&&`repeat(auto-fill, minmax(${S}px, 1fr))`},"aria-busy":n,ref:d,children:D.map(z=>{let B=z.position??(M-1)*P+t.indexOf(z)+1;return(0,Tt.jsx)(ble,{view:l,multiselect:x,selection:s,onChangeSelection:i,getItemId:o,item:z,mediaField:g,titleField:h,descriptionField:v,regularFields:_,badgeFields:y,config:{sizes:C},posinset:B,setsize:T},o(z))})})},F))}),w&&!k&&(0,Tt.jsxs)(As.Composite,{render:(0,Tt.jsx)(cT,{className:J("dataviews-view-picker-grid",c,{[`has-${l.layout?.density}-density`]:l.layout?.density&&["compact","comfortable"].includes(l.layout.density)}),previewSize:S,"aria-busy":n,ref:d}),virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":x,"aria-label":m,children:[Array.from({length:L}).map((F,D)=>(0,Tt.jsx)(As.Composite.Item,{render:({children:z,...B})=>(0,Tt.jsx)(se,{direction:"column",children:z,...B}),role:"option","aria-hidden":!0,tabIndex:-1,className:"dataviews-view-picker-grid__card dataviews-view-picker-grid__placeholder"},`placeholder-${D}`)),t.map(F=>{let D=F.position;return(0,Tt.jsx)(ble,{view:l,multiselect:x,selection:s,onChangeSelection:i,getItemId:o,item:F,mediaField:g,titleField:h,descriptionField:v,regularFields:_,badgeFields:y,config:{sizes:C},posinset:D,setsize:T},o(F))})]}),!w&&(0,Tt.jsx)("div",{className:J({"dataviews-loading":n,"dataviews-no-results":!n}),children:n?(0,Tt.jsx)("p",{children:(0,Tt.jsx)(As.Spinner,{})}):u}),w&&n&&(0,Tt.jsx)("p",{className:"dataviews-loading-more",children:(0,Tt.jsx)(As.Spinner,{})})]})}var _le=gje;var RO=a(j(),1),pb=a(G(),1),sl=a(U(),1);var Nt=a(E(),1);function vje({item:e,fields:t,column:r,align:o}){let n=t.find(s=>s.id===r);if(!n)return null;let i=J("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__cell-align-end":o==="end","dataviews-view-table__cell-align-center":o==="center"});return(0,Nt.jsx)("div",{className:i,children:(0,Nt.jsx)(n.render,{item:e,field:n})})}function Sle({item:e,fields:t,id:r,view:o,titleField:n,mediaField:i,descriptionField:s,selection:l,getItemId:c,onChangeSelection:u,multiselect:d,posinset:f}){let{paginationInfo:m}=(0,sl.useContext)(et),h=l.includes(r),[g,v]=(0,sl.useState)(!1),b=(0,sl.useRef)(null);Sh(b,f);let{showTitle:_=!0,showMedia:y=!0,showDescription:w=!0,infiniteScrollEnabled:S}=o,x=()=>{v(!0)},C=()=>{v(!1)},A=o.fields??[],k=n&&_||i&&y||s&&w;return(0,Nt.jsxs)(pb.Composite.Item,{ref:b,render:({children:R,...M})=>(0,Nt.jsx)("tr",{className:J("dataviews-view-table__row",{"is-selected":h,"is-hovered":g}),onMouseEnter:x,onMouseLeave:C,children:R,...M}),"aria-selected":h,"aria-setsize":m.totalItems||void 0,"aria-posinset":f,role:S?"article":"option",onMouseDown:R=>{R.button===0&&R.currentTarget.parentElement?.focus({preventScroll:!0})},onClick:()=>{if(h)u(l.filter(R=>r!==R));else{let R=d?[...l,r]:[r];u(R)}},children:[(0,Nt.jsx)("td",{className:"dataviews-view-table__checkbox-column",role:"presentation",children:(0,Nt.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,Nt.jsx)(vh,{item:e,selection:l,onChangeSelection:u,getItemId:c,titleField:n,disabled:!1,"aria-hidden":!0,tabIndex:-1})})}),k&&(0,Nt.jsx)("td",{role:"presentation",children:(0,Nt.jsx)(hO,{item:e,titleField:_?n:void 0,mediaField:y?i:void 0,descriptionField:w?s:void 0,isItemClickable:()=>!1})}),A.map(R=>{let{width:M,maxWidth:P,minWidth:T,align:N}=o.layout?.styles?.[R]??{};return(0,Nt.jsx)("td",{style:{width:M,maxWidth:P,minWidth:T},role:"presentation",children:(0,Nt.jsx)(vje,{fields:t,item:e,column:R,align:N})},R)})]},r)}function bje({actions:e,data:t,fields:r,getItemId:o,isLoading:n=!1,onChangeView:i,onChangeSelection:s,selection:l,setOpenedFilter:c,view:u,className:d,empty:f}){let m=(0,sl.useRef)(new Map),h=(0,sl.useRef)(void 0),[g,v]=(0,sl.useState)(),b=fb(e)??!1;(0,sl.useEffect)(()=>{h.current&&(h.current.focus(),h.current=void 0)});let _=u.groupBy?.field?r.find(D=>D.id===u.groupBy?.field):null,y=_?pa(t,_):null,w=u.infiniteScrollEnabled&&!y,S=(0,sl.useId)();if(g){h.current=g,v(void 0);return}let x=D=>{let z=m.current.get(D.id),B=z?m.current.get(z.fallback):void 0;v(B?.node)},C=!!t?.length,A=r.find(D=>D.id===u.titleField),k=r.find(D=>D.id===u.mediaField),R=r.find(D=>D.id===u.descriptionField),{showTitle:M=!0,showMedia:P=!0,showDescription:T=!0}=u,N=A&&M||k&&P||R&&T,L=u.fields??[],F=(D,z)=>B=>{B?m.current.set(D,{node:B,fallback:L[z>0?z-1:1]}):m.current.delete(D)};return(0,Nt.jsxs)(Nt.Fragment,{children:[(0,Nt.jsxs)("table",{className:J("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":S,role:w?"feed":"listbox",children:[(0,Nt.jsx)("thead",{role:"presentation",children:(0,Nt.jsxs)("tr",{className:"dataviews-view-table__row",role:"presentation",children:[(0,Nt.jsx)("th",{className:"dataviews-view-table__checkbox-column",children:b&&(0,Nt.jsx)(pO,{selection:l,onChangeSelection:s,data:t,actions:e,getItemId:o,disableSelectAll:w})}),N&&(0,Nt.jsx)("th",{children:A&&(0,Nt.jsx)(Lw,{ref:F(A.id,0),fieldId:A.id,view:u,fields:r,onChangeView:i,onHide:x,setOpenedFilter:c,canMove:!1})}),L.map((D,z)=>{let{width:B,maxWidth:O,minWidth:V,align:W}=u.layout?.styles?.[D]??{};return(0,Nt.jsx)("th",{style:{width:B,maxWidth:O,minWidth:V,textAlign:W},"aria-sort":u.sort?.direction&&u.sort?.field===D?nO[u.sort.direction]:void 0,scope:"col",children:(0,Nt.jsx)(Lw,{ref:F(D,z),fieldId:D,view:u,fields:r,onChangeView:i,onHide:x,setOpenedFilter:c,canMove:u.layout?.enableMoving??!0})},D)})]})}),C&&_&&y?Array.from(y.entries()).map(([D,z])=>(0,Nt.jsxs)(pb.Composite,{virtualFocus:!0,orientation:"vertical",render:(0,Nt.jsx)("tbody",{role:"group"}),children:[(0,Nt.jsx)("tr",{className:"dataviews-view-table__group-header-row",role:"presentation",children:(0,Nt.jsx)("td",{colSpan:L.length+(N?1:0)+1,className:"dataviews-view-table__group-header-cell",role:"presentation",children:u.groupBy?.showLabel===!1?D:(0,RO.sprintf)((0,RO.__)("%1$s: %2$s"),_.label,D)})}),z.map((B,O)=>(0,Nt.jsx)(Sle,{item:B,fields:r,id:o(B)||O.toString(),view:u,titleField:A,mediaField:k,descriptionField:R,selection:l,getItemId:o,onChangeSelection:s,multiselect:b},o(B)))]},`group-${D}`)):(0,Nt.jsx)(pb.Composite,{render:(0,Nt.jsx)("tbody",{role:"presentation"}),virtualFocus:!0,orientation:"vertical",children:C&&t.map((D,z)=>{let B=o(D),O=D.position;return(0,Nt.jsx)(Sle,{item:D,fields:r,id:B||z.toString(),view:u,titleField:A,mediaField:k,descriptionField:R,selection:l,getItemId:o,onChangeSelection:s,multiselect:b,posinset:O},B)})})]}),(0,Nt.jsxs)("div",{className:J({"dataviews-loading":n,"dataviews-no-results":!C&&!n}),id:S,children:[!C&&(n?(0,Nt.jsx)("p",{children:(0,Nt.jsx)(pb.Spinner,{})}):f),C&&n&&(0,Nt.jsx)("p",{className:"dataviews-loading-more",children:(0,Nt.jsx)(pb.Spinner,{})})]})]})}var xle=bje;var jw=a(G(),1),zw=a(U(),1),Cle=a(Te(),1),AO=a(j(),1);var Yt=a(E(),1);function yje(e){return!!e}function wje({view:e,multiselect:t,selection:r,onChangeSelection:o,getItemId:n,item:i,titleField:s,mediaField:l,descriptionField:c,otherFields:u,posinset:d,setsize:f}){let m=(0,zw.useRef)(null);Sh(m,d);let{showTitle:h=!0,showMedia:g=!0,showDescription:v=!0}=e,b=n(i),_=r.includes(b),y=e.layout?.density??"balanced",w=g&&y!=="compact"&&l?.render?(0,Yt.jsx)(l.render,{item:i,field:l,config:{sizes:y==="comfortable"?"32px":"24px"}}):null,S=(0,Yt.jsx)("div",{className:"dataviews-view-picker-activity__item-type-icon",children:w||(0,Yt.jsx)("span",{className:"dataviews-view-picker-activity__item-bullet","aria-hidden":"true"})}),x=h&&s?.render?(0,Yt.jsx)(s.render,{item:i,field:s}):null,C=v&&c?.render?(0,Yt.jsx)(c.render,{item:i,field:c}):null,A=(0,zw.useMemo)(()=>y==="comfortable"?"md":"sm",[y]);return(0,Yt.jsx)(jw.Composite.Item,{ref:m,role:"option","aria-label":s&&s.getValue({item:i})||void 0,"aria-posinset":d,"aria-setsize":f,"aria-selected":_,className:J("dataviews-view-picker-activity__item",y==="compact"&&"is-compact",y==="balanced"&&"is-balanced",y==="comfortable"&&"is-comfortable",_&&"is-selected"),onClick:()=>{if(_)o(r.filter(k=>b!==k));else{let k=t?[...r,b]:[b];o(k)}},render:(0,Yt.jsx)("div",{}),children:(0,Yt.jsxs)(se,{direction:"row",gap:"lg",justify:"start",align:"flex-start",children:[(0,Yt.jsx)(se,{direction:"column",gap:"xs",align:"center",className:"dataviews-view-picker-activity__item-type",children:S}),(0,Yt.jsxs)(se,{direction:"column",gap:A,align:"flex-start",className:"dataviews-view-picker-activity__item-content",children:[x&&(0,Yt.jsx)("div",{className:"dataviews-view-picker-activity__item-title",children:x}),C&&(0,Yt.jsx)("div",{className:"dataviews-view-picker-activity__item-description",children:C}),(0,Yt.jsx)("div",{className:"dataviews-view-picker-activity__item-fields",children:u.map(k=>(0,Yt.jsxs)("div",{className:"dataviews-view-picker-activity__item-field",children:[(0,Yt.jsx)(Gt,{render:(0,Yt.jsx)("span",{}),className:"dataviews-view-picker-activity__item-field-label",children:k.label}),(0,Yt.jsx)("span",{className:"dataviews-view-picker-activity__item-field-value",children:(0,Yt.jsx)(k.render,{item:i,field:k})})]},k.id))})]})]})})}function Tle({groupName:e,groupField:t,showLabel:r=!0,children:o}){let n=(0,Cle.useInstanceId)(Tle,"dataviews-view-picker-activity-group__header");return(0,Yt.jsxs)(se,{direction:"column",role:"group","aria-labelledby":n,className:"dataviews-view-picker-activity-group",children:[(0,Yt.jsx)("h3",{className:"dataviews-view-picker-activity-group__header",id:n,children:r?(0,AO.sprintf)((0,AO.__)("%1$s: %2$s"),t.label,e):e}),o]})}function Ele({data:e,fields:t,getItemId:r,isLoading:o,onChangeSelection:n,selection:i,view:s,actions:l,className:c,empty:u}){let{itemListLabel:d,paginationInfo:f}=(0,zw.useContext)(et),m=fb(l),h=t.find(k=>k.id===s?.titleField),g=t.find(k=>k.id===s?.mediaField),v=t.find(k=>k.id===s?.descriptionField),b=(s?.fields??[]).map(k=>t.find(R=>k===R.id)).filter(yje),_=s.groupBy?.field?t.find(k=>k.id===s.groupBy?.field):null,y=_?pa(e,_):null,S=(s.infiniteScrollEnabled&&!y)??!1?f?.totalItems:void 0,x=!!e?.length,C=!!(_&&y),A=k=>(0,Yt.jsx)(wje,{view:s,multiselect:m,selection:i,onChangeSelection:n,getItemId:r,item:k,titleField:h,mediaField:g,descriptionField:v,otherFields:b,posinset:k.position,setsize:S},r(k));return x?(0,Yt.jsxs)(Yt.Fragment,{children:[(0,Yt.jsx)(jw.Composite,{virtualFocus:!0,orientation:"vertical",role:"listbox","aria-multiselectable":m,"aria-label":d,"aria-busy":o,render:C?(0,Yt.jsx)(se,{direction:"column",gap:"sm"}):void 0,className:J("dataviews-view-picker-activity",c),children:C&&y?Array.from(y.entries()).map(([k,R])=>(0,Yt.jsx)(Tle,{groupName:k,groupField:_,showLabel:s.groupBy?.showLabel!==!1,children:R.map(A)},k)):e.map(A)}),o&&(0,Yt.jsx)("p",{className:"dataviews-loading-more",children:(0,Yt.jsx)(jw.Spinner,{})})]}):(0,Yt.jsx)("div",{className:J({"dataviews-loading":o,"dataviews-no-results":!o}),children:o?(0,Yt.jsx)("p",{children:(0,Yt.jsx)(jw.Spinner,{})}):u})}var Hw=a(G(),1),Uw=a(j(),1),Ple=a(U(),1);var Ww=a(E(),1);function Ch(){let e=(0,Ple.useContext)(et),t=e.view;return(0,Ww.jsxs)(Hw.__experimentalToggleGroupControl,{label:(0,Uw.__)("Density"),value:t.layout?.density||"balanced",onChange:r=>{e.onChangeView({...t,layout:{...t.layout,density:r}})},isBlock:!0,children:[(0,Ww.jsx)(Hw.__experimentalToggleGroupControlOption,{value:"comfortable",label:(0,Uw._x)("Comfortable","Density option for DataView layout")},"comfortable"),(0,Ww.jsx)(Hw.__experimentalToggleGroupControlOption,{value:"balanced",label:(0,Uw._x)("Balanced","Density option for DataView layout")},"balanced"),(0,Ww.jsx)(Hw.__experimentalToggleGroupControlOption,{value:"compact",label:(0,Uw._x)("Compact","Density option for DataView layout")},"compact")]})}var kle=a(G(),1),Rle=a(j(),1),Ale=a(U(),1);var Ile=a(E(),1),_je=[{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 Ole(){let e=(0,Ale.useContext)(et),t=e.view,r=_je.filter(s=>e.containerWidth>=s.breakpoint),o=t.layout?.previewSize??230,n=r.map((s,l)=>({...s,index:l})).filter(s=>s.value<=o).sort((s,l)=>l.value-s.value)[0]?.index??0,i=r.map((s,l)=>({value:l}));return(0,Ile.jsx)(kle.RangeControl,{showTooltip:!1,label:(0,Rle.__)("Preview size"),value:n,min:0,max:r.length-1,withInputField:!1,onChange:(s=0)=>{e.onChangeView({...t,layout:{...t.layout,previewSize:r[s].value}})},step:1,marks:i})}var mb=a(E(),1);function eU(){return(0,mb.jsxs)(mb.Fragment,{children:[(0,mb.jsx)(Ch,{}),(0,mb.jsx)(Ole,{})]})}var Th=[{type:sO,label:(0,td.__)("Table"),component:Qae,icon:zk,viewConfigOptions:Ch},{type:xae,label:(0,td.__)("Grid"),component:ole,icon:Uk,viewConfigOptions:eU},{type:Cae,label:(0,td.__)("List"),component:ZH,icon:(0,td.isRTL)()?QB:u1,viewConfigOptions:Ch},{type:Tae,label:(0,td.__)("Activity"),component:fle,icon:hm,viewConfigOptions:Ch},{type:Eae,label:(0,td.__)("Grid"),component:_le,icon:Uk,viewConfigOptions:eU,isPicker:!0},{type:Pae,label:(0,td.__)("Table"),component:xle,icon:zk,viewConfigOptions:Ch,isPicker:!0},{type:kae,label:(0,td.__)("Activity"),component:Ele,icon:hm,viewConfigOptions:Ch,isPicker:!0}];var o_=a(U(),1);var Ih=a(G(),1),rp=a(j(),1),w5=a(U(),1);var Nle=a(_e(),1),Mle=(0,Nle.createContext)(!0);function Dle(e){return Array.isArray(e)?e:typeof e<"u"?[e]:[]}function IO(e){let t=[];for(let r of e)t.push(...r);return t}function hT(e){return e.slice().reverse()}function gT(...e){}function ha(e,t){return typeof Object.hasOwn=="function"?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function Gw(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}function vT(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function Lle(e,t){let r={...e};for(let o of t)ha(r,o)&&delete r[o];return r}function Ble(e,t){let r={};for(let o of t)ha(e,o)&&(r[o]=e[o]);return r}function OO(e){return e}function Vle(e=gT){let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>cancelAnimationFrame(t)}function Ki(e,t){if(!e)throw typeof t!="string"?new Error("Invariant failed"):new Error(t)}function tU(e){return Object.keys(e)}function jle(e,...t){let r=typeof e=="function"?e(...t):e;return r==null?!1:!r}function Yw(e){return e.disabled||e["aria-disabled"]===!0||e["aria-disabled"]==="true"}function Zi(e){let t={};for(let r in e)e[r]!==void 0&&(t[r]=e[r]);return t}function Bt(...e){for(let t of e)if(t!==void 0)return t}var qw=Sje();function Sje(){return typeof window<"u"&&!!window.document?.createElement}function rd(e){return e?"self"in e?e.document:e.ownerDocument||document:document}function gb(e,t=!1){let{activeElement:r}=rd(e);if(!r?.nodeName)return null;if(xje(r)&&r.contentDocument?.body)return gb(r.contentDocument.body,t);if(t){let o=r.getAttribute("aria-activedescendant");if(o){let n=rd(r).getElementById(o);if(n)return n}}return r}function hb(e,t){return e===t||e.contains(t)}function Kw(e){return e?.nodeType===1}function zle(e){return typeof e?.nodeType=="number"}function xje(e){return e.tagName==="IFRAME"}function Eh(e){let t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?Cje.indexOf(e.type)!==-1:!1}var Cje=["button","color","file","image","reset","submit"];function Tje(e){if(typeof e.checkVisibility=="function")return e.checkVisibility();let t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}function Is(e){try{return e.tagName==="TEXTAREA"?!0:e.tagName!=="INPUT"?!1:e.selectionStart!==null}catch{return!1}}function NO(e){return e.isContentEditable||Is(e)}function Hle(e){if(Is(e))return e.value;if(e.isContentEditable){let t=rd(e).createRange();return t.selectNodeContents(e),t.toString()}return""}function bT(e){let t=0,r=0;if(Is(e))t=e.selectionStart||0,r=e.selectionEnd||0;else if(e.isContentEditable){let o=rd(e).getSelection();if(o?.rangeCount&&o.anchorNode&&hb(e,o.anchorNode)&&o.focusNode&&hb(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}}var Eje=["dialog","menu","listbox","tree","grid"],Fle={menu:"menuitem",listbox:"option",tree:"treeitem"};function Ule(e,t){let r=e?.getAttribute("role");return r&&Eje.indexOf(r)!==-1?r:t}function Wle(e){if(e!=null&&ha(Fle,e))return Fle[e]}function yT(e){if(!e)return null;let t=o=>o==="auto"||o==="scroll";if(e.clientHeight&&e.scrollHeight>e.clientHeight){let{overflowY:o}=getComputedStyle(e);if(t(o))return e}else if(e.clientWidth&&e.scrollWidth>e.clientWidth){let{overflowX:o}=getComputedStyle(e);if(t(o))return e}let r=rd(e);return yT(e.parentElement)||r.scrollingElement||r.body}function MO(e,...t){/text|search|password|tel|url/i.test(e.type)&&e.setSelectionRange(...t)}function Gle(e,t){let r=e.map((n,i)=>[i,n]),o=!1;return r.sort(([n,i],[s,l])=>{let c=t(i),u=t(l);return c===u||!c||!u?0:Pje(c,u)?(n>s&&(o=!0),-1):(n<s&&(o=!0),1)}),o?r.map(([n,i])=>i):e}function Pje(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function Yle(){return qw&&!!navigator.maxTouchPoints}function FO(){return qw?/mac|iphone|ipad|ipod/i.test(navigator.platform):!1}function Zw(){return qw&&FO()&&/apple/i.test(navigator.vendor)}function qle(){return qw&&/firefox\//i.test(navigator.userAgent)}function Kle(e){let{currentTarget:t,target:r}=e;return t?zle(r)?!hb(t,r):!0:!1}function hi(e){return e.target===e.currentTarget}function Zle(e){if(!Kw(e))return!1;let t=e,r=t.tagName.toLowerCase();return r==="a"||r==="button"&&t.type==="submit"||r==="input"&&t.type==="submit"}function Xle(e){let t=FO();return t&&!e.metaKey||!t&&!e.ctrlKey?!1:Zle(e.currentTarget)}function Qle(e){return e.altKey?Zle(e.currentTarget):!1}function vb(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 Jle(e,t,r){let o=new KeyboardEvent(t,r);return e.dispatchEvent(o)}function rU(e,t){let r=new MouseEvent("click",t);return e.dispatchEvent(r)}function DO(e,t){let r=t||e.currentTarget,o=e.relatedTarget;return!zle(o)||!hb(r,o)}function $le(e){return e.type==="input"}function bb(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,s,!0),r()}),s=()=>{i(),r()};return e.addEventListener(t,s,{once:!0,capture:!0}),()=>{i(),e.removeEventListener(t,s,!0)}}function od(e,t,r,o=window){let n=[];try{o.document.addEventListener(e,t,r);for(let s of Array.from(o.frames))n.push(od(e,t,r,s))}catch{}return()=>{try{o.document.removeEventListener(e,t,r)}catch{}for(let s of n)s()}}var kje="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 LO(e){return!(!e.matches(kje)||!Tje(e)||e.closest("[inert]"))}function zl(e){let t=gb(e);if(!t)return!1;if(t===e)return!0;let r=t.getAttribute("aria-activedescendant");return r?r===e.id:!1}function ece(e){let t=gb(e);if(!t)return!1;if(hb(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 tce(e,t){"scrollIntoView"in e?(e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest",...t})):e.focus()}function rce(e){return async()=>{let t=await e?.();return rce(async()=>(await t?.(),e))}}var n6t=Rje();function Rje({limit:e=100}={}){let t=[],r=[],o=null,n=()=>t.length>0,i=()=>r.length>0;return{canUndo:n,canRedo:i,undo:async()=>{n()&&(o=null,r.push(await t.pop()?.()))},redo:async()=>{i()&&(o=null,t.push(await r.pop()?.()))},execute:async(u,d)=>{if(!u)return;let f=d===o;o=d??null;let m=f?Math.max(0,t.length-1):t.length,h=await u();if(!h)return;r=[];let g=t[m];for(t[m]=rce(async()=>{await h?.();let v=await g?.();return async()=>{await v?.(),await u?.()}});t.length>e;)t.shift()}}}var Xi=a(_e(),1),yr=a(_e(),1),yb=a(E(),1);function oce(e,t){if(typeof e=="function"){let r=e(t);if(typeof r=="function")return r}else e&&(e.current=t)}function Aje(e){return!e||!(0,yr.isValidElement)(e)?!1:"ref"in e.props||"ref"in e}function Ije(e){return Aje(e)?{...e.props}.ref||e.ref:null}function Oje(e,t){let r={...e};for(let o in t){if(!ha(t,o))continue;if(o==="className"){let i="className",s=e[i],l=t[i];s&&l?r[i]=`${s} ${l}`:r[i]=l||s;continue}if(o==="style"){let i="style";r[i]=e[i]?{...e[i],...t[i]}:t[i];continue}let n=t[o];if(o.startsWith("on")){if(typeof n!="function")continue;let i=e[o];if(typeof i=="function"){r[o]=(...s)=>{n(...s),i(...s)};continue}}r[o]=n}return r}var oU={...Xi},nce=oU.useId,a6t=oU.useDeferredValue,ice=oU.useInsertionEffect,Dr=qw?yr.useLayoutEffect:yr.useEffect;function Nje(e){let[t]=(0,yr.useState)(e);return t}function cce(e){let t=(0,yr.useRef)(e);return Dr(()=>{t.current=e}),t}function Mt(e){let t=(0,yr.useRef)(()=>{throw new Error("Cannot call an event handler while rendering.")});return ice?ice(()=>{t.current=e}):t.current=e,(0,yr.useCallback)((...r)=>t.current?.(...r),[])}function uce(e){let[t,r]=(0,yr.useState)(null);return Dr(()=>{if(t==null||!e)return;let o=null;return e(n=>(o=n,t)),()=>{e(o)}},[t,e]),[t,r]}function Qo(...e){return(0,yr.useMemo)(()=>{if(e.some(Boolean))return t=>{let r=[];for(let o of e){if(!o)continue;let n=oce(o,t);r.push({ref:o,cleanup:typeof n=="function"?n:void 0})}if(r.some(o=>o.cleanup))return()=>{for(let{ref:o,cleanup:n}of r)n?n():oce(o,null)}}},e)}function Hl(e){if(nce){let o=nce();return e||o}let[t,r]=(0,yr.useState)(e);return Dr(()=>{e||t||r(`id-${Math.random().toString(36).slice(2,8)}`)},[e,t]),e||t}function dce(e,t){let r=i=>{if(typeof i=="string")return i},[o,n]=(0,yr.useState)(()=>r(t));return Dr(()=>{n((e&&"current"in e?e.current:e)?.tagName.toLowerCase()||r(t))},[e,t]),o}function fce(e,t,r){let o=Nje(r),[n,i]=(0,yr.useState)(o);return(0,yr.useEffect)(()=>{let s=e&&"current"in e?e.current:e;if(!s)return;let l=()=>{let u=s.getAttribute(t);i(u??o)},c=new MutationObserver(l);return c.observe(s,{attributeFilter:[t]}),l(),()=>c.disconnect()},[e,t,o]),n}function nd(e,t){let r=(0,yr.useRef)(!1);(0,yr.useEffect)(()=>{if(r.current)return e();r.current=!0},t),(0,yr.useEffect)(()=>()=>{r.current=!1},[])}function pce(e,t){let r=(0,yr.useRef)(!1);Dr(()=>{if(r.current)return e();r.current=!0},t),Dr(()=>()=>{r.current=!1},[])}function mce(){return(0,yr.useReducer)(()=>[],[])}function Jo(e){return Mt(typeof e=="function"?e:()=>e)}function id(e,t,r=[]){let o=(0,yr.useCallback)(n=>(e.wrapElement&&(n=e.wrapElement(n)),t(n)),[...r,e.wrapElement]);return{...e,wrapElement:o}}function VO(e,t,r){let o=e.onLoadedMetadataCapture,n=(0,yr.useMemo)(()=>Object.assign(()=>{},o,...r!==void 0?[{[t]:r}]:[]),[o,t,r]);return[o?.[t],{onLoadedMetadataCapture:n}]}var sce=!1;function hce(){return(0,yr.useEffect)(()=>{sce||(od("mousemove",Fje,!0),od("mousedown",BO,!0),od("mouseup",BO,!0),od("keydown",BO,!0),od("scroll",BO,!0),sce=!0)},[]),Mt(()=>nU)}var nU=!1,ace=0,lce=0;function Mje(e){let t=e.movementX||e.screenX-ace,r=e.movementY||e.screenY-lce;return ace=e.screenX,lce=e.screenY,t||r||!1}function Fje(e){Mje(e)&&(nU=!0)}function BO(){nU=!1}function Ir(e){let t=Xi.forwardRef((r,o)=>e({...r,ref:o}));return t.displayName=e.displayName||e.name,t}function sd(e,t){return Xi.memo(e,t)}function Lr(e,t){let{wrapElement:r,render:o,...n}=t,i=Qo(t.ref,Ije(o)),s;if(Xi.isValidElement(o)){let l={...o.props,ref:i};s=Xi.cloneElement(o,Oje(n,l))}else o?s=o(n):s=(0,yb.jsx)(e,{...n});return r?r(s):s}function Br(e){let t=(r={})=>e(r);return t.displayName=e.name,t}function ga(e=[],t=[]){let r=Xi.createContext(void 0),o=Xi.createContext(void 0),n=()=>Xi.useContext(r),i=(u=!1)=>{let d=Xi.useContext(o),f=n();return u?d:d||f},s=()=>{let u=Xi.useContext(o),d=n();if(!(u&&u===d))return d},l=u=>e.reduceRight((d,f)=>(0,yb.jsx)(f,{...u,children:d}),(0,yb.jsx)(r.Provider,{...u}));return{context:r,scopedContext:o,useContext:n,useScopedContext:i,useProviderContext:s,ContextProvider:l,ScopedContextProvider:u=>(0,yb.jsx)(l,{...u,children:t.reduceRight((d,f)=>(0,yb.jsx)(f,{...u,children:d}),(0,yb.jsx)(o.Provider,{...u}))})}}var gi=a(_e(),1),Dje="div",Lje=Symbol("accessibleWhenDisabled"),Bje=Zw(),Vje=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"];function jje(e){let{tagName:t,readOnly:r,type:o}=e;return t==="TEXTAREA"&&!r||t==="SELECT"&&!r?!0:t==="INPUT"&&!r?Vje.includes(o):!!(e.isContentEditable||e.getAttribute("role")==="combobox"&&e.dataset.name)}function zje(e){return e?e==="button"||e==="summary"||e==="input"||e==="select"||e==="textarea"||e==="a":!0}function Hje(e){return e?e==="button"||e==="input"||e==="select"||e==="textarea":!0}function Uje(e){if(e.tagName==="BUTTON"){let{type:t}=e;return t==="submit"}if(e.tagName==="INPUT"){let{type:t}=e;return t==="submit"||t==="image"}return!1}function Wje({focusable:e,trulyDisabled:t,nativeTabbable:r,supportsDisabled:o,safariTabIndex:n,tabIndexProp:i}){return e?t?r&&!o?-1:void 0:r?n&&i==null?0:i:i??0:i}function iU(e,t){return Mt(r=>{e?.(r),!r.defaultPrevented&&t&&(r.stopPropagation(),r.preventDefault())})}var gce=!1,sU=!0;function Gje(e){let t=e.target;Kw(t)&&!t.hasAttribute("data-focus-visible")&&(sU=!1)}function Yje(e){e.metaKey||e.ctrlKey||e.altKey||(sU=!0)}var wT=Br(function({focusable:t=!0,accessibleWhenDisabled:r,autoFocus:o,onFocusVisible:n,...i}){let s=(0,gi.useRef)(null),[l,c]=VO(i,Lje,r);r??=l,(0,gi.useEffect)(()=>{t&&(gce||(od("mousedown",Gje,!0),od("keydown",Yje,!0),gce=!0))},[t]);let u=t&&Yw(i),d=u&&!r,[f,m]=(0,gi.useState)(!1),h=(0,gi.useRef)(!1),g=(0,gi.useRef)(null),v=Mt(O=>{g.current?.(),g.current=null,h.current=!1,O?.removeAttribute("data-focus-visible")});(0,gi.useEffect)(()=>{t&&d&&(v(s.current),f&&m(!1))},[t,d,f,v]),(0,gi.useEffect)(()=>{if(!t||!f)return;let O=s.current;if(!O||typeof IntersectionObserver>"u")return;let V=new IntersectionObserver(()=>{LO(O)||(h.current=!1,m(!1))});return V.observe(O),()=>V.disconnect()},[t,f]),(0,gi.useEffect)(()=>()=>g.current?.(),[]);let b=iU(i.onKeyPressCapture,u),_=iU(i.onMouseDownCapture,u),y=iU(i.onClickCapture,u),w=(O,V)=>{if(V&&(O.currentTarget=V),!t)return;let W=O.currentTarget;if(W&&zl(W)&&(n?.(O),!O.defaultPrevented)){if(W.dataset.focusVisible="true",h.current=!0,Uje(W)){if(g.current?.(),g.current=null,typeof IntersectionObserver<"u"){let q=new IntersectionObserver(()=>{LO(W)||v(W)});q.observe(W),g.current=()=>q.disconnect()}return}m(!0)}},S=i.onKeyDownCapture,x=Mt(O=>{if(S?.(O),O.defaultPrevented||!t||f||h.current||O.metaKey||O.altKey||O.ctrlKey||!hi(O))return;let V=O.currentTarget;bb(V,"focusout",()=>w(O,V))}),C=i.onFocusCapture,A=Mt(O=>{if(C?.(O),O.defaultPrevented||!t)return;if(!hi(O)){m(!1);return}let V=O.currentTarget,W=()=>w(O,V);sU||jje(O.target)?bb(O.target,"focusout",W):m(!1)}),k=i.onBlur,R=Mt(O=>{k?.(O),t&&DO(O)&&(v(O.currentTarget),m(!1))}),M=(0,gi.useContext)(Mle),P=Mt(O=>{t&&o&&O&&M&&queueMicrotask(()=>{zl(O)||LO(O)&&O.focus()})}),T=dce(s),N=t&&zje(T),L=t&&Hje(T),[F,D]=(0,gi.useState)(!1);Bje&&(0,gi.useEffect)(()=>{if(!t)return;let O=s.current;if(!O)return;let{type:V}=O,W=O.tagName==="INPUT"&&(V==="checkbox"||V==="radio");D(Eh(O)||W)},[t]);let z=i.style,B=(0,gi.useMemo)(()=>d?{pointerEvents:"none",...z}:z,[d,z]);return i={"data-focus-visible":t&&f||void 0,"data-autofocus":o||void 0,"aria-disabled":u||void 0,...i,...c,ref:Qo(s,P,i.ref),style:B,tabIndex:Wje({focusable:t,trulyDisabled:d,nativeTabbable:N,supportsDisabled:L,safariTabIndex:F,tabIndexProp:i.tabIndex}),disabled:L&&d?!0:void 0,contentEditable:u?void 0:i.contentEditable,onKeyPressCapture:b,onClickCapture:y,onMouseDownCapture:_,onKeyDownCapture:x,onFocusCapture:A,onBlur:R},Zi(i)}),f6t=Ir(function(t){return Lr(Dje,wT(t))});var Ph=a(_e(),1),qje="button";function vce(e){if(!e.isTrusted)return!1;let t=e.currentTarget;return e.key==="Enter"?Eh(t)||t.tagName==="SUMMARY"||t.tagName==="A":e.key===" "?Eh(t)||t.tagName==="SUMMARY"||t.tagName==="INPUT"||t.tagName==="SELECT":!1}var Kje=Symbol("command"),aU=Br(function({clickOnEnter:t=!0,clickOnSpace:r=!0,...o}){let n=(0,Ph.useRef)(null),[i,s]=(0,Ph.useState)(!1);(0,Ph.useEffect)(()=>{n.current&&s(Eh(n.current))},[]);let[l,c]=(0,Ph.useState)(!1),u=(0,Ph.useRef)(!1),d=Yw(o),[f,m]=VO(o,Kje,!0);Dr(()=>{d&&(u.current=!1,c(!1))},[d]);let h=o.onKeyDown,g=Mt(w=>{h?.(w);let S=w.currentTarget;if(w.defaultPrevented||f||d||!hi(w)||Is(S)||S.isContentEditable)return;let x=t&&w.key==="Enter",C=r&&w.key===" ",A=w.key==="Enter"&&!t,k=w.key===" "&&!r;if(A||k){w.preventDefault();return}if(x||C){let R=vce(w);if(x){if(!R){w.preventDefault();let{view:M,...P}=w,T=()=>rU(S,P);qle()?bb(S,"keyup",T):queueMicrotask(T)}}else C&&(u.current=!0,R||(w.preventDefault(),c(!0)))}}),v=o.onKeyUp,b=Mt(w=>{if(v?.(w),f)return;let S=r&&w.key===" ";if(!u.current||!S)return;let x=vce(w);if(u.current=!1,x||c(!1),w.defaultPrevented||!hi(w)||d||w.metaKey||x)return;w.preventDefault();let C=w.currentTarget,{view:A,...k}=w;queueMicrotask(()=>rU(C,k))}),_=o.onBlur,y=Mt(w=>{_?.(w),u.current&&(u.current=!1,c(!1))});return o={"data-active":l||void 0,type:i?"button":void 0,...m,...o,ref:Qo(n,o.ref),onKeyDown:g,onKeyUp:b,onBlur:y},o=wT(o),o}),v6t=Ir(function(t){return Lr(qje,aU(t))});var _T=ga(),bce=_T.useContext,w6t=_T.useScopedContext,_6t=_T.useProviderContext,yce=_T.ContextProvider,wce=_T.ScopedContextProvider;var jO=a(_e(),1),Zje="div",lU=Br(function({store:t,shouldRegisterItem:r=!0,getItem:o=OO,element:n,...i}){let s=bce();t=t||s;let l=Hl(i.id),c=(0,jO.useRef)(n);return(0,jO.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:Qo(c,i.ref)},Zi(i)}),E6t=Ir(function(t){return Lr(Zje,lU(t))});var cU=a(_e(),1),ST=ga([yce],[wce]),A6t=ST.useContext,zO=ST.useScopedContext,_ce=ST.useProviderContext,HO=ST.ContextProvider,Xw=ST.ScopedContextProvider,Sce=(0,cU.createContext)(void 0),xce=(0,cU.createContext)(void 0);function wb(e,t){let r=e.__unstableInternals;return Ki(r,"Invalid store"),r[t]}function Tce(e,t){if(!e)return!0;for(let r of e)if(t instanceof Set){if(t.has(r))return!0}else if(r===t)return!0;return!1}function UO(e,t){return e===t||e!==e&&t!==t}function Ece(e,t,r,o){let n;for(let i of tU(t))UO(t[i],r[i])||o!==void 0&&Tce([i],o)||(n??={...e},n[i]=t[i]);return n}var Xje=100;function Qje(e,t,r){if(t)for(let o of t){let n=e.get(o);n||(n=new Set,e.set(o,n)),n.add(r)}}function Jje(e,t,r){if(e&&t)for(let o of t){let n=e.get(o);n&&(n.delete(r),n.size||e.delete(o))}}function Pce(e){let t=new Set,r=e.currentListener;if(!r)return t;for(let o of e.keyedListeners)if(t.add(o),o===r)return t;return t.clear(),t.add(r),t}function WO(e){e.notifiedListeners??=Pce(e)}function dU(e,t){if(!e.currentListener)return!1;let r=!1;for(let n of e.keyedListeners){if(n===e.currentListener){r=!0;continue}if(r&&n===t)return!1}let o=!1;for(let n of e.group.listeners){if(n===e.currentListener)return o;n===t&&(o=!0)}return!1}function uU(e,t,r){for(let o of e)if(o.group===t&&!o.recovering&&!(r&&!o.keyedListeners.has(r))){WO(o);for(let n of o.group.listeners){if(n===o.currentListener)break;dU(o,n)&&o.notifiedListeners?.add(n)}}}function $je(e,t,r){for(let o of e)o.group===t&&(o.recovering||dU(o,r)&&(WO(o),o.notifiedListeners?.add(r)))}function eze({fastPathFrames:e,group:t,keys:r,listener:o}){let n=t.listeners.has(o);for(let i of e)i.group===t&&(i.recovering||r.includes(i.updatedKey)&&(dU(i,o)?(WO(i),i.notifiedListeners?.add(o)):n&&(WO(i),i.recoverToLive=!0)))}function tze(e,t,r){for(let o of e)o.group===t&&o.notifiedListeners?.delete(r)}function rze({fastPathFrames:e,group:t,keys:r,listener:o}){for(let n of e)n.group===t&&(n.recovering||r.includes(n.updatedKey)&&n.keyedListeners.add(o))}function oze(e,t){if(!e.disposables.size)return;let r=e.disposables.get(t);r&&(e.disposables.delete(t),r())}function kce(e,t,r){let o=e.disposables.get(t);if(!o){e.disposables.set(t,r);return}e.disposables.set(t,()=>{o(),r()})}function Rce(e,t,r,o,n,i){if(e.suspendCounts?.has(t))return;let{disposables:s}=e,l=s.size?s.get(t):void 0;if(l){s.delete(t);let u=r;l(),r=n?.()??r,r!==u&&(o=Ece(o,r,u,i)??o)}let c=t(r,o);c&&kce(e,t,c)}function Cce({group:e,getState:t,prevState:r,updatedKey:o,notifiedListeners:n}){let i=e.allKeysListeners;for(let s of e.listeners)n?.has(s)||!i?.has(s)&&!Tce(e.listenerKeys.get(s),o)||(n?.add(s),Rce(e,s,t(),r,t,o))}function va(e,...t){let r=e,o=r,n=gT,i=!1,s=!1,l=new Set,c=new Set,u=new Set,d={listeners:new Set,disposables:new Map,listenerKeys:new WeakMap},f={listeners:new Set,disposables:new Map,listenerKeys:new WeakMap},m=P=>(u.add(P),()=>u.delete(P)),h=()=>{let P=c.size,T=Symbol();c.add(T);let N=()=>{c.delete(T)&&(c.size||n())};if(P)return N;let L=tU(r),F=[];for(let B of t){let O=B?.getState?.();if(!O)continue;let V=L.filter(W=>ha(O,W));if(V.length){if(t.length===1||V.length===L.length){for(let W of V)F.push(bi(B,[W],q=>{R(W,q[W],!0)}));continue}F.push(kh(B,V,(W,q)=>{for(let Z of V)W[Z]!==q[Z]&&R(Z,W[Z],!0)}));for(let W of V){let q=B?.getState?.();q&&R(W,q[W],!0)}}}let D=[];for(let B of u)D.push(B());let z=t.map(xT);return n=Gw(...F,...D,...z),N},g=(P,T,N)=>{N!==void 0&&(N?Jje(P.listenersByKey,N,T):P.allKeysListeners?.delete(T))},v=[],b=(P,T,N=d)=>{let L=P?[...P]:null,F=N.listeners.has(T);return F||tze(v,N,T),L?eze({fastPathFrames:v,group:N,keys:L,listener:T}):(F&&uU(v,N),$je(v,N,T)),F&&(uU(v,N,T),g(N,T,N.listenerKeys.get(T))),N.listeners.add(T),L?(N.listenersByKey??=new Map,Qje(N.listenersByKey,L,T),rze({fastPathFrames:v,group:N,keys:L,listener:T})):(N.allKeysListeners??=new Set,N.allKeysListeners.add(T)),N.listenerKeys.set(T,L),()=>{let D=N.disposables.get(T);N.disposables.delete(T),uU(v,N,T);let z=N.listenerKeys.get(T);g(N,T,L),z!==L&&g(N,T,z),N.listenerKeys.delete(T),N.listeners.delete(T),D?.()}},_=(P,T)=>b(P,T),y=(P,T,N)=>{let L=P.listeners.has(T);if(L){P.suspendCounts??=new Map;let D=P.suspendCounts.get(T)??0;P.suspendCounts.set(T,D+1)}let F;try{let D=r;oze(P,T),r!==D&&(F=Ece(N,r,D));let z=T(r,F??N);z&&kce(P,T,z)}finally{if(L){let D=P.suspendCounts,z=D?.get(T);z&&z>1?D?.set(T,z-1):D?.delete(T),D?.size||delete P.suspendCounts}}},w=(P,T)=>(y(d,T,r),b(P,T)),S=(P,T)=>(!f.listeners.size&&!s&&(o=r),y(f,T,o),b(P,T,f)),x=P=>va(Ble(r,P),M),C=P=>va(Lle(r,P),M),A=()=>r,k=(P,T,N)=>{if(!(N instanceof Set)&&!P.allKeysListeners?.size){let L=P.listenersByKey?.get(N);if(!L)return;let F={group:P,keyedListeners:L,updatedKey:N,currentListener:null};v.push(F);try{for(let D of L){if(F.notifiedListeners?.has(D)||(F.currentListener=D,F.notifiedListeners?.add(D),Rce(P,D,r,T,A,N),!P.allKeysListeners?.size&&!F.recoverToLive))continue;let z=F.notifiedListeners??Pce(F);F.notifiedListeners=z,F.recovering=!0,Cce({group:P,getState:A,prevState:T,updatedKey:N,notifiedListeners:z});return}}finally{v.pop()}return}Cce({group:P,getState:A,prevState:T,updatedKey:N})},R=(P,T,N=!1)=>{if(!ha(r,P))return;let L=r[P],F=typeof T=="function"?T(L):T;if(UO(F,L))return;let D=s;s=!0;let z=r,B={...r,[P]:F};r=B;let O=!1;try{if(!N&&t.length){for(let V of t)if(V?.setState?.(P,F),!UO(r[P],F)){O=!0;break}if(O){let V=0;for(;V<Xje;V+=1){let W=!1;for(let q of t){let Z=r[P];q?.setState?.(P,Z),UO(r[P],Z)||(W=!0)}if(!W)break}}}O||k(d,r===B?z:{...r,[P]:z[P]},P)}finally{s=D}if(!f.listeners.size){s||(o=r);return}l.add(P),!i&&(i=!0,queueMicrotask(()=>{i=!1;let V=r,W=l;l=new Set;let q=o;k(f,q,W),o===q&&(o=V)}))},M={getState:A,setState:R,__unstableInternals:{setup:m,init:h,subscribe:_,sync:w,batch:S,pick:x,omit:C}};return M}function vi(e,...t){if(e)return wb(e,"setup")(...t)}function xT(e,...t){if(e)return wb(e,"init")(...t)}function kh(e,...t){if(e)return wb(e,"subscribe")(...t)}function bi(e,...t){if(e)return wb(e,"sync")(...t)}function _b(e,...t){if(e)return wb(e,"batch")(...t)}function GO(e,...t){if(e)return wb(e,"omit")(...t)}function Ace(e,...t){if(e)return wb(e,"pick")(...t)}function Qw(...e){let t={};for(let o of e){let n=o?.getState?.();n&&Object.assign(t,n)}let r=va(t,...e);return Object.assign({},...e,r)}function nze(e){let t=e.find(n=>!!n.element),r=[...e].reverse().find(n=>!!n.element)?.element,o=t?.element?.parentElement;if(!r)return rd(o).body;for(;o;){if(o.contains(r))return o;o=o.parentElement}return rd(o).body}function ize(e){return e?.__unstablePrivateStore}function Ice(e={}){e.store;let t=e.store?.getState(),r=Bt(e.items,t?.items,e.defaultItems,[]),o=new Map(r.map(f=>[f.id,f])),n={items:r,renderedItems:Bt(t?.renderedItems,[])},i=ize(e.store),s=va({items:r,renderedItems:n.renderedItems},i),l=va(n,e.store),c=f=>{let m=Gle(f,h=>h.element);s.setState("renderedItems",m),l.setState("renderedItems",m)};vi(l,()=>xT(s)),vi(s,()=>_b(s,["items"],f=>{l.setState("items",f.items)})),vi(s,()=>_b(s,["renderedItems"],f=>{let m=!0,h=requestAnimationFrame(()=>{let{renderedItems:_}=l.getState();f.renderedItems!==_&&c(f.renderedItems)});if(typeof IntersectionObserver!="function")return()=>cancelAnimationFrame(h);let g=()=>{if(m){m=!1;return}cancelAnimationFrame(h),h=requestAnimationFrame(()=>c(f.renderedItems))},v=nze(f.renderedItems),b=new IntersectionObserver(g,{root:v});for(let _ of f.renderedItems)_.element&&b.observe(_.element);return()=>{cancelAnimationFrame(h),b.disconnect()}}));let u=(f,m,h=!1)=>{let g;return m(b=>{let _=b.findIndex(({id:w})=>w===f.id),y=b.slice();if(_!==-1){g=b[_];let w={...g,...f};y[_]=w,o.set(f.id,w)}else y.push(f),o.set(f.id,f);return y}),()=>{m(b=>{if(!g)return h&&o.delete(f.id),b.filter(({id:w})=>w!==f.id);let _=b.findIndex(({id:w})=>w===f.id);if(_===-1)return b;let y=b.slice();return y[_]=g,o.set(f.id,g),y})}},d=f=>u(f,m=>s.setState("items",m),!0);return{...l,registerItem:d,renderItem:f=>Gw(d(f),u(f,m=>s.setState("renderedItems",m))),item:f=>{if(!f)return null;let m=o.get(f);if(!m){let{items:h}=s.getState();m=h.find(g=>g.id===f),m&&o.set(f,m)}return m||null},__unstablePrivateStore:s}}var sze={id:null};function zc(e,t){return e.find(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function aze(e,t){return e.filter(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function Oce(e,t){return e.filter(r=>r.rowId===t)}function Nce({items:e,fromIndex:t,step:r,rowId:o,excludeId:n}){for(let i=t;i>=0&&i<e.length;i+=r){let s=e[i];if(s&&s.rowId===o&&!s.disabled&&!(n!=null&&s.id===n))return s.id}}function Mce(e,t,r=!1){let o=e.findIndex(n=>n.id===t);return[...e.slice(o+1),...r?[sze]:[],...e.slice(0,o)]}function YO(e){let t=[];for(let r of e){let o=t.find(n=>n[0]?.rowId===r.rowId);o?o.push(r):t.push([r])}return t}function Fce(e){let t=0;for(let{length:r}of e)r>t&&(t=r);return t}function lze(e){return{id:"__EMPTY_ITEM__",disabled:!0,rowId:e}}function cze(e,t,r){let o=Fce(e);for(let n of e)for(let i=0;i<o;i+=1){let s=n[i];if(!s||r&&s.disabled){let l=i===0&&r?zc(n):n[i-1];n[i]=l&&t!==l.id&&r?l:lze(l?.rowId)}}return e}function uze(e){let t=YO(e),r=Fce(t),o=[];for(let n=0;n<r;n+=1)for(let i of t){let s=i[n];s&&o.push({...s,rowId:s.rowId?`${n}`:void 0})}return o}function Dce(e={}){let t=e.store?.getState(),r=Ice(e),o=Bt(e.activeId,t?.activeId,e.defaultActiveId),n=va({...r.getState(),id:Bt(e.id,t?.id)??`id-${Math.random().toString(36).slice(2,8)}`,activeId:o,baseElement:Bt(t?.baseElement,null),includesBaseElement:Bt(e.includesBaseElement,t?.includesBaseElement,o===null),moves:Bt(t?.moves,0),orientation:Bt(e.orientation,t?.orientation,"both"),rtl:Bt(e.rtl,t?.rtl,!1),virtualFocus:Bt(e.virtualFocus,t?.virtualFocus,!1),focusLoop:Bt(e.focusLoop,t?.focusLoop,!1),focusWrap:Bt(e.focusWrap,t?.focusWrap,!1),focusShift:Bt(e.focusShift,t?.focusShift,!1)},r,e.store);vi(n,()=>bi(n,["renderedItems","activeId"],l=>{n.setState("activeId",c=>c!==void 0?c:zc(l.renderedItems)?.id)}));let i=(l="next",c={})=>{let u=n.getState(),{skip:d=0,activeId:f=u.activeId,focusShift:m=u.focusShift,focusLoop:h=u.focusLoop,focusWrap:g=u.focusWrap,includesBaseElement:v=u.includesBaseElement,renderedItems:b=u.renderedItems,rtl:_=u.rtl}=c,y=l==="up"||l==="down",w=l==="next"||l==="down",S=w?_&&!y:!_||y,x=m&&!d;if(!d&&!g&&!v&&f!=null&&(!y||!x&&!b.some(D=>D.rowId!=null))){let D=b.findIndex(B=>B.id===f),z=b[D];if(z){let B=S?-1:1,O=Nce({items:b,fromIndex:D+B,step:B,rowId:z.rowId,excludeId:f});return O!==void 0?O:h&&(y?h!=="horizontal":h!=="vertical")?Nce({items:b,fromIndex:B===1?0:b.length-1,step:B,rowId:z.rowId,excludeId:f}):void 0}}let C=y?IO(cze(YO(b),f,x)):b;if(C=S?hT(C):C,C=y?uze(C):C,f==null)return zc(C)?.id;let A=C.find(D=>D.id===f);if(!A)return zc(C)?.id;let k=C.some(D=>D.rowId),R=C.indexOf(A),M=C.slice(R+1),P=Oce(M,A.rowId);if(d){let D=aze(P,f);return(D.slice(d)[0]||D[D.length-1])?.id}let T=h&&(y?h!=="horizontal":h!=="vertical"),N=k&&g&&(y?g!=="horizontal":g!=="vertical"),L=w?(!k||y)&&T&&v:y?v:!1;if(T)return zc(Mce(N&&!L?C:Oce(C,A.rowId),f,L),f)?.id;if(N){let D=zc(L?P:M,f);return L?D?.id||null:D?.id}let F=zc(P,f);return!F&&L?null:F?.id},s=(l,c)=>typeof c=="number"?i(l,{skip:c}):i(l,c);return{...r,...n,setBaseElement:l=>n.setState("baseElement",l),setActiveId:l=>n.setState("activeId",l),move:l=>{l!==void 0&&(n.setState("activeId",l),n.setState("moves",c=>c+1))},first:()=>zc(n.getState().renderedItems)?.id,last:()=>zc(hT(n.getState().renderedItems))?.id,next:l=>s("next",l),previous:l=>s("previous",l),down:l=>s("down",l),up:l=>s("up",l)}}var Lce=zc,Bce=YO;function ad(e,t){return t&&e.item(t)||null}function Vce(e,t=!1){if(Is(e))e.setSelectionRange(t?e.value.length:0,e.value.length);else if(e.isContentEditable){let r=rd(e).getSelection();r?.selectAllChildren(e),t&&r?.collapseToEnd()}}var pU=Symbol("FOCUS_SILENTLY");function jce(e){e[pU]=!0,e.focus({preventScroll:!0})}function zce(e){let t=e[pU];return delete e[pU],t}function Sb(e,t,r){if(!t||t===r)return!1;let o=e.item(t.id);return!(!o||r&&o.element===r)}var cd=a(_e(),1),Wce=a(E(),1);var ld=a(_e(),1),mU=a(mC(),1),Hce=()=>()=>{};function Kt(e,t=OO){let r=ld.useCallback(n=>e?kh(e,null,n):Hce(),[e]),o=()=>{let n=typeof t=="string"?t:null,i=typeof t=="function"?t:null,s=e?.getState();if(i)return i(s);if(s&&n&&ha(s,n))return s[n]};return(0,mU.useSyncExternalStore)(r,o,o)}function qO(e,t){let r=ld.useRef({}),o=ld.useCallback(i=>e?kh(e,null,i):Hce(),[e]),n=()=>{let i=e?.getState(),s=!1,l=r.current;for(let c in t){let u=t[c];if(typeof u=="function"){let d=u(i);Object.is(d,l[c])||(l[c]=d,s=!0)}if(typeof u=="string"){if(!i||!ha(i,u))continue;let d=i[u];Object.is(d,l[c])||(l[c]=d,s=!0)}}return s&&(r.current={...l}),r.current};return(0,mU.useSyncExternalStore)(o,n,n)}function Lo(e,t,r,o){let n=ha(t,r)?t[r]:void 0,i=cce({value:n,setValue:o?t[o]:void 0});Dr(()=>bi(e,[r],(s,l)=>{let{value:c,setValue:u}=i.current;u&&s[r]!==l[r]&&s[r]!==c&&u(s[r])}),[e,r]),Dr(()=>{if(n!==void 0)return e.setState(r,n),_b(e,[r],()=>{n!==void 0&&e.setState(r,n)})})}function Jw(e,t){let[r,o]=ld.useState(()=>e(t));Dr(()=>xT(r),[r]);let n=ld.useCallback(i=>Kt(r,i),[r]);return[ld.useMemo(()=>({...r,useState:n}),[r,n]),Mt(()=>{o(i=>e({...t,...i.getState()}))})]}var fze="button";function pze(e){return NO(e)?!0:e.tagName==="INPUT"&&!Eh(e)}function mze(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 hze(e,t=!1){let{top:r}=e.getBoundingClientRect();return t?r+e.clientHeight:r}function Uce(e,t,r,o=!1){if(!t||!r)return;let{renderedItems:n}=t.getState(),i=yT(e);if(!i)return;let s=mze(i,o),l,c;for(let u=0;u<n.length;u+=1){let d=l;if(l=r(u),!l)break;if(l===d)continue;let f=ad(t,l)?.element;if(!f)continue;let m=hze(f,o)-s,h=Math.abs(m);if(o&&m<=0||!o&&m>=0){c!==void 0&&c<h&&(l=d);break}c=h}return l}function gze(e,t){return hi(e)?!1:Sb(t,e.target)}var hU=Br(function({store:t,rowId:r,preventScrollOnKeyDown:o=!1,moveOnKeyPress:n=!0,tabbable:i=!1,getItem:s,"aria-setsize":l,"aria-posinset":c,...u}){let d=zO();t=t||d;let f=Hl(u.id),m=(0,cd.useRef)(null),h=(0,cd.useContext)(xce),g=Yw(u)&&!u.accessibleWhenDisabled,v=u.shouldRegisterItem,b=O=>{if(r)return r;if(O&&h?.baseElement&&h.baseElement===O.baseElement)return h.id},{rowId:_,baseElement:y,isActiveItem:w,ariaSetSize:S,ariaPosInSet:x,isTabbable:C}=qO(t,{rowId:b,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 V=b(O),W=O.renderedItems.filter(q=>q.rowId===V);return h.ariaPosInSet+W.findIndex(q=>q.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 V=t?.item(O.activeId);return V?.disabled||!V?.element?!0:O.activeId===f}}),A=(0,cd.useCallback)(O=>{let V={...O,id:f||O.id,rowId:_,disabled:g,children:O.element?.textContent};return s?s(V):V},[f,_,g,s]),k=u.onFocus,R=(0,cd.useRef)(!1),M=(0,cd.useRef)(null),P=Mt(O=>{if(k?.(O),O.defaultPrevented||Kle(O)||!f||!t||gze(O,t))return;let{virtualFocus:V,baseElement:W}=t.getState();if(t.setActiveId(f),NO(O.currentTarget)&&Vce(O.currentTarget),!V||!hi(O)||pze(O.currentTarget))return;let q=(re,fe,pe)=>{Zw()&&re.hasAttribute("data-autofocus")&&re.scrollIntoView({block:"nearest",inline:"nearest"}),R.current=!0,fe===pe||Sb(t,fe)?jce(pe):pe.focus()};if(W?.isConnected){q(O.currentTarget,O.relatedTarget,W);return}if(v===!1)return;let{currentTarget:Z,relatedTarget:Q}=O,ce=()=>{M.current?.(),M.current=null};ce(),M.current=kh(t,null,()=>{if(gb(Z)!==Z){ce();return}let re=t.getState(),fe=re.baseElement;fe?.isConnected&&(ce(),re.virtualFocus&&q(Z,Q,fe))})}),T=u.onBlurCapture,N=Mt(O=>{T?.(O),!O.defaultPrevented&&t?.getState()?.virtualFocus&&R.current&&(R.current=!1,O.preventDefault(),O.stopPropagation())}),L=u.onKeyDown,F=Jo(o),D=Jo(n),z=Mt(O=>{if(L?.(O),O.defaultPrevented||!hi(O)||!t)return;let{currentTarget:V}=O,W=t.getState(),q=!!t.item(f)?.rowId,Z=W.orientation!=="horizontal",Q=W.orientation!=="vertical",ce=()=>!!(q||Q||!W.baseElement||!Is(W.baseElement)),re={ArrowUp:(q||Z)&&t.up,ArrowRight:(q||Q)&&t.next,ArrowDown:(q||Z)&&t.down,ArrowLeft:(q||Q)&&t.previous,Home:()=>{if(ce())return!q||O.ctrlKey?t?.first():t?.previous(-1)},End:()=>{if(ce())return!q||O.ctrlKey?t?.last():t?.next(-1)},PageUp:()=>Uce(V,t,t?.up,!0),PageDown:()=>Uce(V,t,t?.down)}[O.key];if(re){if(NO(V)){let pe=bT(V),$=Q&&O.key==="ArrowLeft",te=Q&&O.key==="ArrowRight",de=Z&&O.key==="ArrowUp",ve=Z&&O.key==="ArrowDown";if(te||ve){let{length:we}=Hle(V);if(pe.end!==we)return}else if(($||de)&&pe.start!==0)return}let fe=re();if(F(O)||fe!==void 0){if(!D(O))return;O.preventDefault(),t.move(fe)}}}),B=(0,cd.useMemo)(()=>({id:f,baseElement:y}),[f,y]);return u=id(u,O=>(0,Wce.jsx)(Sce.Provider,{value:B,children:O}),[B]),u={"data-active-item":w||void 0,...u,id:f,ref:Qo(m,u.ref),tabIndex:C?u.tabIndex:-1,onFocus:P,onBlurCapture:N,onKeyDown:z},u=aU(u),u=lU({store:t,...u,getItem:A,shouldRegisterItem:f?v:!1}),Zi({...u,"aria-setsize":S,"aria-posinset":x})}),eFt=sd(Ir(function(t){return Lr(fze,hU(t))}));var ud=a(_e(),1),KO=a(E(),1);var vze="div";function bze(e){return e.some(t=>!!t.rowId)}function yze(e){let t=e.target;return t&&!Is(t)?!1:e.key.length===1&&!e.ctrlKey&&!e.metaKey}function wze(e){return e.key==="Shift"||e.key==="Control"||e.key==="Alt"||e.key==="Meta"}function Gce(e,t,r){return Mt(o=>{if(t?.(o),o.defaultPrevented||o.isPropagationStopped()||!hi(o)||wze(o)||yze(o))return;let n=ad(e,e.getState().activeId)?.element;if(!n)return;let{view:i,...s}=o;n!==r?.current&&n.focus(),Jle(n,o.type,s)||o.preventDefault(),o.currentTarget.contains(n)&&o.stopPropagation()})}function _ze(e){return Lce(IO(hT(Bce(e))))}function Yce(e,t){let{virtualFocus:r,baseElement:o}=e.getState();if(!r||!o||!Is(o)){t();return}let n=o.scrollLeft,i=o.scrollTop;t(),o.scrollLeft=n,o.scrollTop=i}function Sze(e){let[t,r]=(0,ud.useState)(!1),o=(0,ud.useCallback)(()=>r(!0),[]),n=Kt(e,i=>t?ad(e,i.activeId):null);return(0,ud.useEffect)(()=>{let i=n?.element;t&&i&&(r(!1),Yce(e,()=>{i.focus({preventScroll:!0})}))},[e,n,t]),o}var xze=sd(function({store:t,focusOnMove:r,previousElementRef:o}){let n=Kt(t,"moves"),i=Kt(t,"baseElement");return(0,ud.useEffect)(()=>{if(!n||!r)return;let{activeId:s}=t.getState(),l=ad(t,s)?.element;l&&Yce(t,()=>tce(l))},[t,n,r]),Dr(()=>{if(!n||!i)return;let{activeId:s}=t.getState();if(s!==null)return;let l=o.current;o.current=null,l&&vb(l,{relatedTarget:i}),zl(i)||i.focus()},[t,n,i]),null}),gU=Br(function({store:t,composite:r=!0,focusOnMove:o=r,moveOnKeyPress:n=!0,...i}){let s=_ce();t=t||s,Ki(t,!1);let l=(0,ud.useRef)(null),c=(0,ud.useRef)(null),u=Sze(t),[,d]=uce(r?t.setBaseElement:null),f=Kt(t,"virtualFocus"),m=Kt(t,k=>k.virtualFocus?k.activeId:null);Dr(()=>{if(!t||!r||!f)return;let k=c.current;if(c.current=null,!k)return;let R=ad(t,m)?.element||gb(k);R!==k&&vb(k,{relatedTarget:R})},[t,m,f,r]);let h=Gce(t,i.onKeyDownCapture,c),g=Gce(t,i.onKeyUpCapture,c),v=i.onFocusCapture,b=Mt(k=>{if(v?.(k),k.defaultPrevented||!t)return;let{virtualFocus:R}=t.getState();if(!R)return;let M=k.relatedTarget,P=zce(k.currentTarget);hi(k)&&P&&(k.stopPropagation(),c.current=M)}),_=i.onFocus,y=Mt(k=>{if(_?.(k),k.defaultPrevented||!r||!t)return;let{relatedTarget:R}=k,{virtualFocus:M}=t.getState();M?hi(k)&&!Sb(t,R)&&queueMicrotask(u):hi(k)&&t.setActiveId(null)}),w=i.onBlurCapture,S=Mt(k=>{if(w?.(k),k.defaultPrevented||!t)return;let{virtualFocus:R,activeId:M}=t.getState();if(!R)return;let P=ad(t,M)?.element,T=k.relatedTarget,N=Sb(t,T),L=c.current;c.current=null,hi(k)&&N?(T===P?L&&L!==T&&vb(L,k):P?vb(P,k):L&&vb(L,k),k.stopPropagation()):!Sb(t,k.target)&&P&&vb(P,k)}),x=i.onKeyDown,C=Jo(n),A=Mt(k=>{if(x?.(k),k.nativeEvent.isComposing||k.defaultPrevented||!t||!hi(k))return;let{orientation:R,renderedItems:M,activeId:P,rtl:T}=t.getState();if(ad(t,P)?.element?.isConnected)return;let N=R!=="horizontal",L=R!=="vertical",F=bze(M);if((k.key==="ArrowLeft"||k.key==="ArrowRight"||k.key==="Home"||k.key==="End")&&Is(k.currentTarget))return;let z={ArrowUp:(F||N)&&(()=>F?_ze(M)?.id:t?.last()),ArrowRight:(F||L)&&(T?t.last:t.first),ArrowDown:(F||N)&&t.first,ArrowLeft:(F||L)&&(T?t.first:t.last),Home:t.first,End:t.last,PageUp:t.first,PageDown:t.last}[k.key];if(z){let B=z();if(B!==void 0){if(!C(k))return;k.preventDefault(),t.move(B)}}});return i=id(i,k=>(0,KO.jsxs)(Xw,{value:t,children:[k,r&&(0,KO.jsx)(xze,{store:t,focusOnMove:o,previousElementRef:c})]}),[t,r,o]),i={"aria-activedescendant":Kt(t,k=>{if(t&&r&&k.virtualFocus)return ad(t,k.activeId)?.id}),...i,ref:Qo(l,d,i.ref),onKeyDownCapture:h,onKeyUpCapture:g,onFocusCapture:b,onFocus:y,onBlurCapture:S,onKeyDown:A},i=wT({focusable:Kt(t,k=>r&&(k.virtualFocus||k.activeId===null)),...i}),i}),lFt=Ir(function(t){return Lr(vze,gU(t))});var CT=ga(),dFt=CT.useContext,fFt=CT.useScopedContext,vU=CT.useProviderContext,qce=CT.ContextProvider,Kce=CT.ScopedContextProvider;var bU=a(_e(),1),TT=ga([qce],[Kce]),gFt=TT.useContext,vFt=TT.useScopedContext,bFt=TT.useProviderContext,Zce=TT.ContextProvider,ZO=TT.ScopedContextProvider,yFt=(0,bU.createContext)(void 0),wFt=(0,bU.createContext)(void 0);var xb=a(_e(),1),yU=a(E(),1);var $ce=a(Vu(),1),Cze="div";function Xce(e,t){let r=setTimeout(t,e);return()=>clearTimeout(r)}function Qce(e){let t=e?.trim()||"0s",r=t.endsWith("ms")?1:1e3,o=Number.parseFloat(t)*r;return Number.isNaN(o)?0:o}function Jce(e,t,r){let o=e.split(","),n=t.split(","),i=r.split(","),s=0;for(let[l,c]of o.entries()){if(c.trim()==="none")continue;let u=Qce(n[l%n.length]),d=Qce(i[l%i.length]);s=Math.max(s,u+d)}return s}function Tze(e){let{transitionProperty:t,transitionDuration:r,transitionDelay:o,animationName:n,animationDuration:i,animationDelay:s}=getComputedStyle(e);return Math.max(Jce(t,o,r),Jce(n,s,i))}function wU(e,t,r){return!r&&t!==!1&&(!e||!!t)}var Eze=Br(function({store:t,alwaysVisible:r,unstable_otherElementRef:o,...n}){let i=vU();t=t||i,Ki(t,!1);let s=(0,xb.useRef)(null),l=Hl(n.id),[c,u]=(0,xb.useState)(null),d=Kt(t,"open"),f=Kt(t,"mounted"),m=Kt(t,"animated"),h=Kt(t,"contentElement"),g=Kt(t.disclosure,"contentElement"),v=(0,xb.useRef)(!1);Dr(()=>{s.current&&t?.setContentElement(s.current)},[t]),Dr(()=>{let w;return t?.setState("animated",S=>(w=S,!0)),()=>{w!==void 0&&t?.setState("animated",w)}},[t]),Dr(()=>{if(!m){d?v.current&&(v.current=!1,u("enter")):(v.current=!0,u(null));return}if(!h?.isConnected){u(null);return}return Vle(()=>{u(d?"enter":f?"leave":null)})},[m,h,d,f]),Dr(()=>{if(!t||!m||!c||!h)return;let w=()=>t?.setState("animating",!1),S=()=>(0,$ce.flushSync)(w);if(c==="leave"&&d||c==="enter"&&!d)return;if(typeof m=="number")return Xce(m,S);let x=[h];g&&x.push(g);let C=o?.current;C&&x.push(C);let A=Math.max(...x.map(Tze));if(!A){c==="enter"&&t.setState("animated",!1),w();return}return Xce(Math.max(A-1e3/60,0),S)},[t,m,h,g,o,d,c]),n=id(n,w=>(0,yU.jsx)(ZO,{value:t,children:w}),[t]);let b=wU(f,n.hidden,r),_=n.style,y=(0,xb.useMemo)(()=>b?{..._,display:"none"}:_,[b,_]);return n={"data-open":d||void 0,"data-enter":c==="enter"||void 0,"data-leave":c==="leave"||void 0,hidden:b,...n,id:l,ref:Qo(l?t.setContentElement:null,s,n.ref),style:y},Zi(n)}),Pze=Ir(function(t){return Lr(Cze,Eze(t))}),PFt=Ir(function({unmountOnHide:t,...r}){let o=vU();return Kt(r.store||o,n=>!t||n?.mounted)===!1?null:(0,yU.jsx)(Pze,{...r})});function eue(e={}){let t=Qw(e.store,GO(e.disclosure,["contentElement","disclosureElement"]));let r=t?.getState(),o=Bt(e.open,r?.open,e.defaultOpen,!1),n=Bt(e.animated,r?.animated,!1),i=va({open:o,animated:n,animating:!!n&&o,mounted:o,contentElement:Bt(r?.contentElement,null),disclosureElement:Bt(r?.disclosureElement,null)},t);return vi(i,()=>bi(i,["animated","animating"],s=>{s.animated||i.setState("animating",!1)})),vi(i,()=>kh(i,["open"],()=>{i.getState().animated&&i.setState("animating",!0)})),vi(i,()=>bi(i,["open","animating"],s=>{i.setState("mounted",s.open||s.animating)})),{...i,disclosure:e.disclosure,setOpen:s=>i.setState("open",s),show:()=>i.setState("open",!0),hide:()=>i.setState("open",!1),toggle:()=>i.setState("open",s=>!s),stopAnimation:()=>i.setState("animating",!1),setContentElement:s=>i.setState("contentElement",s),setDisclosureElement:s=>i.setState("disclosureElement",s)}}function tue(e,t,r){return nd(t,[r.store,r.disclosure]),Lo(e,r,"open","setOpen"),Lo(e,r,"mounted","setMounted"),Lo(e,r,"animated"),Object.assign(e,{disclosure:r.disclosure})}var ET=ga([Zce],[ZO]),LFt=ET.useContext,BFt=ET.useScopedContext,rue=ET.useProviderContext,oue=ET.ContextProvider,nue=ET.ScopedContextProvider;var XO=a(_e(),1),QO=(0,XO.createContext)(void 0),PT=ga([oue,HO],[nue,Xw]),_U=PT.useContext,$w=PT.useScopedContext,JO=PT.useProviderContext,iue=PT.ContextProvider,sue=PT.ScopedContextProvider,$O=(0,XO.createContext)(void 0),aue=(0,XO.createContext)(!1);function lue(e,t,r){return nd(t,[r.store]),Lo(e,r,"items","setItems"),e}function cue(e){return{id:Hl(e.id),...e}}function uue(e,t,r){return e=lue(e,t,r),Lo(e,r,"activeId","setActiveId"),Lo(e,r,"includesBaseElement"),Lo(e,r,"virtualFocus"),Lo(e,r,"orientation"),Lo(e,r,"rtl"),Lo(e,r,"focusLoop"),Lo(e,r,"focusWrap"),Lo(e,r,"focusShift"),e}function due(e={}){return eue(e)}function fue(e,t,r){return tue(e,t,r)}function pue({popover:e,...t}={}){let r=Qw(t.store,GO(e,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"]));let o=r?.getState(),n=due({...t,store:r}),i=Bt(t.placement,o?.placement,"bottom"),s=va({...n.getState(),placement:i,currentPlacement:i,anchorElement:Bt(o?.anchorElement,null),popoverElement:Bt(o?.popoverElement,null),arrowElement:Bt(o?.arrowElement,null),rendered:Symbol("rendered")},n,r);return{...n,...s,setAnchorElement:l=>s.setState("anchorElement",l),setPopoverElement:l=>s.setState("popoverElement",l),setArrowElement:l=>s.setState("arrowElement",l),render:()=>s.setState("rendered",Symbol("rendered"))}}function mue(e,t,r){return nd(t,[r.popover]),Lo(e,r,"placement"),fue(e,t,r)}var kze="div",SU=Br(function({store:t,...r}){let o=rue();return t=t||o,r={...r,ref:Qo(t?.setAnchorElement,r.ref)},r}),dDt=Ir(function(t){return Lr(kze,SU(t))});var hue=a(_e(),1),Rze="div";function Aze(e){let t=e.relatedTarget;return Kw(t)?hb(e.currentTarget,t):!1}var xU=Symbol("composite-hover");function Ize(e){let{relatedTarget:t}=e;if(!Kw(t))return!1;let r=t;do{if(ha(r,xU)&&r[xU])return!0;r=r.parentElement}while(r);return!1}var CU=Br(function({store:t,focusOnHover:r=!0,blurOnHoverEnd:o=!!r,...n}){let i=zO();t=t||i,Ki(t,!1);let s=hce(),l=n.onMouseMove,c=Jo(r),u=Mt(g=>{if(l?.(g),!g.defaultPrevented&&s()&&c(g)){if(!ece(g.currentTarget)){let v=t?.getState().baseElement;v&&!zl(v)&&v.focus()}t?.setActiveId(g.currentTarget.id)}}),d=n.onMouseLeave,f=Jo(o),m=Mt(g=>{d?.(g),!g.defaultPrevented&&s()&&(Aze(g)||Ize(g)||c(g)&&f(g)&&(t?.setActiveId(null),t?.getState().baseElement?.focus()))}),h=(0,hue.useCallback)(g=>{g&&(g[xU]=!0)},[]);return n={...n,ref:Qo(h,n.ref),onMouseMove:u,onMouseLeave:m},Zi(n)}),gDt=sd(Ir(function(t){return Lr(Rze,CU(t))}));var Rn=a(_e(),1);var Oze="input";function gue(e,t,r){return r?e.find(o=>!o.disabled&&o.value)?.value===t:!1}function vue(e,t){if(!t||e==null)return!1;let r=vT(e),o=vT(t);return r.length!==e.length||o.length!==t.length?!1:o.length>r.length&&o.toLowerCase().startsWith(r.toLowerCase())}function Nze(e){return e==="inline"||e==="list"||e==="both"||e==="none"}function Mze(e){return e.find(t=>t.disabled?!1:t.element?.getAttribute("role")!=="tab")?.id}var Fze=Br(function({store:t,focusable:r=!0,autoSelect:o=!1,getAutoSelectId:n,setValueOnChange:i,showMinLength:s=0,showOnChange:l,showOnMouseDown:c,showOnClick:u=c,showOnKeyDown:d,showOnKeyPress:f=d,blurActiveItemOnClick:m,setValueOnClick:h=!0,moveOnKeyPress:g=!0,autoComplete:v="list",...b}){let _=JO();t=t||_,Ki(t,!1);let y=(0,Rn.useRef)(null),[w,S]=mce(),x=(0,Rn.useRef)(!1),C=(0,Rn.useRef)(!1),A=Kt(t,X=>X.virtualFocus&&o),k=v==="inline"||v==="both",[R,M]=(0,Rn.useState)(k);pce(()=>{k&&M(!0)},[k]);let P=Kt(t,"value"),T=(0,Rn.useRef)(void 0);(0,Rn.useEffect)(()=>bi(t,["selectedValue","activeId"],(X,ge)=>{T.current=ge.selectedValue}),[t]);let N=Kt(t,X=>{if(k&&R&&!(X.activeValue&&Array.isArray(X.selectedValue)&&(X.selectedValue.includes(X.activeValue)||T.current?.includes(X.activeValue))))return X.activeValue}),L=Kt(t,"renderedItems"),F=Kt(t,"open"),D=Kt(t,"contentElement"),z=(0,Rn.useMemo)(()=>!k||!R?P:gue(L,N,A)?vue(P,N)?P+(N?.slice(P.length)||""):P:N||P,[k,R,L,N,A,P]);(0,Rn.useEffect)(()=>{let X=y.current;if(!X)return;let ge=()=>M(!0);return X.addEventListener("combobox-item-move",ge),()=>{X.removeEventListener("combobox-item-move",ge)}},[]),(0,Rn.useEffect)(()=>{if(!k||!R||!N||!gue(L,N,A)||!vue(P,N))return;let X=gT;return queueMicrotask(()=>{let ge=y.current;if(!ge)return;let{start:Ue,end:Ye}=bT(ge),st=P.length,St=N.length;MO(ge,st,St),X=()=>{if(!zl(ge))return;let{start:dt,end:xt}=bT(ge);dt===st&&xt===St&&MO(ge,Ue,Ye)}}),()=>X()},[w,k,R,N,L,A,P]);let B=Mt(n),O=(0,Rn.useRef)(null),V=(0,Rn.useRef)(void 0),W=(0,Rn.useRef)(!1),q=(0,Rn.useRef)(!1);(0,Rn.useEffect)(()=>{if(!F||!D)return;let X=yT(D);if(!X)return;let ge=()=>{x.current=!1,W.current=!0},Ue=()=>{if(q.current||(W.current=!0),!t||!x.current)return;let{activeId:st}=t.getState();st!==null&&st!==O.current&&(x.current=!1)},Ye={passive:!0,capture:!0};return X.addEventListener("wheel",ge,Ye),X.addEventListener("touchmove",ge,Ye),X.addEventListener("scroll",Ue,Ye),()=>{X.removeEventListener("wheel",ge,!0),X.removeEventListener("touchmove",ge,!0),X.removeEventListener("scroll",Ue,!0)}},[F,D,t]),Dr(()=>{W.current=!1,P&&(C.current||(x.current=!0))},[P]),Dr(()=>{A!=="always"&&F||(x.current=F)},[A,F]),Dr(()=>{F||(V.current=void 0)},[F]);let Z=Kt(t,"resetValueOnSelect");nd(()=>{let X=x.current;if(!t||!F||!X&&(!Z||W.current))return;let{baseElement:ge,contentElement:Ue,activeId:Ye}=t.getState();if(!(ge&&!zl(ge))){if(Ue?.hasAttribute("data-placing")){let st=new MutationObserver(S);return st.observe(Ue,{attributeFilter:["data-placing"]}),()=>st.disconnect()}if(A&&X){let st=B(L),St=st!==void 0?st:Mze(L)??t.first();O.current=St;let dt=St??null,xt=t.item(dt)?.value,Xt=V.current;dt!==Ye||Xt?.id!==dt||Xt?.value!==xt?(V.current={id:dt,value:xt},t.move(dt)):t.setState("activeValue",xt)}else{let st=t.item(Ye||t.first())?.element;st&&"scrollIntoView"in st&&(q.current=!0,st.scrollIntoView({block:"nearest",inline:"nearest"}),requestAnimationFrame(()=>{q.current=!1}))}}},[t,F,w,P,A,Z,B,L]),(0,Rn.useEffect)(()=>{if(!k)return;let X=y.current;if(!X)return;let ge=[X,D].filter(Ye=>!!Ye),Ue=Ye=>{ge.every(st=>DO(Ye,st))&&t?.setValue(z)};for(let Ye of ge)Ye.addEventListener("focusout",Ue);return()=>{for(let Ye of ge)Ye.removeEventListener("focusout",Ue)}},[k,D,t,z]);let Q=X=>X.currentTarget.value.length>=s,ce=b.onChange,re=Jo(l??Q),fe=Jo(i??!t.tag),pe=Mt(X=>{if(ce?.(X),X.defaultPrevented||!t)return;let ge=X.currentTarget,{value:Ue,selectionStart:Ye,selectionEnd:st}=ge,St=X.nativeEvent;if(x.current=!0,$le(St)&&(St.isComposing&&(x.current=!1,C.current=!0),k)){let dt=St.inputType==="insertText"||St.inputType==="insertCompositionText",xt=Ye===Ue.length;M(dt&&xt)}if(fe(X)){let dt=Ue===t.getState().value;t.setValue(Ue),queueMicrotask(()=>{MO(ge,Ye,st)}),k&&A&&dt&&S()}re(X)&&t.show(),(!A||!x.current)&&t.setActiveId(null)}),$=b.onCompositionEnd,te=Mt(X=>{x.current=!0,C.current=!1,$?.(X),!X.defaultPrevented&&A&&S()}),de=b.onMouseDown,ve=Jo(m??(()=>t.getState().includesBaseElement)),we=Jo(h),oe=Jo(u??Q),ee=Mt(X=>{de?.(X),!X.defaultPrevented&&(X.button||X.ctrlKey||t&&(ve(X)&&t.setActiveId(null),we(X)&&t.setValue(z),oe(X)&&bb(X.currentTarget,"mouseup",t.show)))}),ue=b.onKeyDown,ie=Jo(f??Q),le=Mt(X=>{if(ue?.(X),X.repeat||(x.current=!1),X.defaultPrevented||!t)return;let{open:ge}=t.getState();if(ge&&X.key==="Enter"){X.preventDefault();return}X.ctrlKey||X.altKey||X.shiftKey||X.metaKey||ge||(X.key==="ArrowUp"||X.key==="ArrowDown")&&ie(X)&&(X.preventDefault(),t.show())}),Oe=b.onBlur,ke=Mt(X=>{x.current=!1,Oe?.(X)}),Me=Hl(b.id),Ne=Nze(v)?v:void 0,Fe=Kt(t,X=>X.activeId===null);return b={role:"combobox","aria-autocomplete":Ne,"aria-haspopup":Ule(D,"listbox"),"aria-expanded":F,"aria-controls":D?.id,"data-active-item":Fe||void 0,value:z,...b,id:Me,ref:Qo(y,b.ref),onChange:pe,onCompositionEnd:te,onMouseDown:ee,onKeyDown:le,onBlur:ke},b=gU({store:t,focusable:r,...b,moveOnKeyPress:X=>jle(g,X)?!1:(k&&M(!0),!0)}),b=SU({store:t,...b}),{autoComplete:"off",...b}}),e5=Ir(function(t){return Lr(Oze,Fze(t))});var t5=a(_e(),1),TU=a(E(),1);var Dze="div";function Lze(e,t){if(t!=null)return e==null?!1:Array.isArray(e)?e.includes(t):e===t}function Bze(e){return Wle(e)??"option"}var Vze=Br(function({store:t,value:r,hideOnClick:o,setValueOnClick:n,selectValueOnClick:i=!0,resetValueOnSelect:s,focusOnHover:l=!1,moveOnKeyPress:c=!0,getItem:u,...d}){let f=$w();t=t||f,Ki(t,!1);let{resetValueOnSelectState:m,multiSelectable:h,selected:g}=qO(t,{resetValueOnSelectState:"resetValueOnSelect",multiSelectable(R){return Array.isArray(R.selectedValue)},selected(R){return Lze(R.selectedValue,r)}}),v=(0,t5.useCallback)(R=>{let M={...R,value:r};return u?u(M):M},[r,u]);n=n??!h,o=o??(r!=null&&!h);let b=d.onClick,_=Jo(n),y=Jo(i),w=Jo(s??m??h),S=Jo(o),x=Mt(R=>{b?.(R),!R.defaultPrevented&&(Qle(R)||Xle(R)||(r!=null&&(y(R)&&(w(R)&&t?.resetValue(),t?.setSelectedValue(M=>Array.isArray(M)?M.includes(r)?M.filter(P=>P!==r):[...M,r]:r)),_(R)&&t?.setValue(r)),S(R)&&t?.hide()))}),C=d.onKeyDown,A=Mt(R=>{if(C?.(R),R.defaultPrevented)return;let M=t?.getState().baseElement;if(!M||zl(M))return;let P=R.key.length===1&&!R.ctrlKey&&!R.metaKey,T=(FO()?R.metaKey:R.ctrlKey)&&R.key.toLowerCase()==="v",N=R.key==="Backspace"||R.key==="Delete";(P||T||N)&&(queueMicrotask(()=>M.focus()),Is(M)&&t?.setValue(M.value))});h&&g!=null&&(d={"aria-selected":g,...d}),d=id(d,R=>(0,TU.jsx)($O.Provider,{value:r,children:(0,TU.jsx)(aue.Provider,{value:g??!1,children:R})}),[r,g]),d={role:Bze((0,t5.useContext)(QO)),children:r,...d,onClick:x,onKeyDown:A};let k=Jo(c);return d=hU({store:t,...d,getItem:v,moveOnKeyPress:R=>{if(!k(R))return!1;let M=new Event("combobox-item-move");return t?.getState().baseElement?.dispatchEvent(M),!0}}),d=CU({store:t,focusOnHover:l,...d}),d}),r5=sd(Ir(function(t){return Lr(Dze,Vze(t))}));var o5=a(_e(),1),bue=a(E(),1);var jze="span";function EU(e){return vT(e).toLowerCase()}function zze(e,t){let r=[];for(let o of t){if(!o)continue;let n=0,i=o.length,s=e.indexOf(o,n);for(;s!==-1;)r.push([s,i]),n=s+1,s=e.indexOf(o,n)}return r}function Hze(e){e.sort(([r],[o])=>r-o);let t=[];for(let[r,o]of e){let n=t[t.length-1];n&&r<n[0]+n[1]?n[1]=Math.max(n[1],r+o-n[0]):t.push([r,o])}return t}function Uze(e){let t=[],r=[],o=0;for(let i of e){let s=EU(i).length;for(let l=0;l<s;l+=1)t.push(l===0?o:-1),r.push(o);o+=i.length}t.push(e.length),r.push(e.length);let n=e.length;for(let i=t.length-1;i>=0;i-=1){let s=t[i];s!=null&&(s===-1?t[i]=n:n=s)}return{starts:t,ends:r}}function Wze(e,t){if(!t.length)return t;let{starts:r,ends:o}=Uze(e),n=[];for(let[i,s]of t){let l=r[i],c=o[i+s];l==null||c==null||c<=l||n.push([l,c-l])}return n}function Gze(e,t){if(!e||!t)return e;let r=Dle(t).map(EU),o=[],n=(c,u=!1)=>(0,bue.jsx)("span",{"data-autocomplete-value":u?"":void 0,"data-user-value":u?void 0:"",children:c},o.length),i=Wze(e,Hze(zze(EU(e),new Set(r)))),s=i[0];if(!s)return o.push(n(e,!0)),o;let[l]=s;return[e.slice(0,l),...i.flatMap(([c,u],d)=>{let f=e.slice(c,c+u),m=i[d+1]?.[0];return[f,e.slice(c+u,m)]})].forEach((c,u)=>{c&&o.push(n(c,u%2===0))}),o}var Yze=Br(function({store:t,value:r,userValue:o,...n}){let i=$w();t=t||i;let s=(0,o5.useContext)($O),l=r??s,c=Kt(t,u=>o??u?.value);return n={children:(0,o5.useMemo)(()=>{if(l)return c?Gze(l,c):l},[l,c]),...n},Zi(n)}),n5=Ir(function(t){return Lr(jze,Yze(t))});var qze="label",Kze=Br(function({store:t,...r}){let o=JO();return t=t||o,Ki(t,!1),r={htmlFor:Kt(t,n=>n.baseElement?.id),...r},Zi(r)}),i5=sd(Ir(function(t){return Lr(qze,Kze(t))}));var s5=a(_e(),1),PU=a(E(),1);var Zze="div",Xze=Br(function({store:t,alwaysVisible:r,...o}){let n=$w(!0),i=_U();t=t||i;let s=!!t&&t===n;Ki(t,!1);let l=(0,s5.useRef)(null),c=Hl(o.id),u=Kt(t,"mounted"),d=wU(u,o.hidden,r),f=d?{...o.style,display:"none"}:o.style,m=Kt(t,w=>Array.isArray(w.selectedValue)),h=fce(l,"role",o.role),g=(h==="listbox"||h==="tree"||h==="grid")&&m||void 0,[v,b]=(0,s5.useState)(!1),_=Kt(t,"contentElement");Dr(()=>{if(!u)return;let w=l.current;if(!w||_!==w)return;let S=()=>{b(!!w.querySelector("[role='listbox']"))},x=new MutationObserver(S);return x.observe(w,{subtree:!0,childList:!0,attributeFilter:["role"]}),S(),()=>x.disconnect()},[u,_]),v||(o={role:"listbox","aria-multiselectable":g,...o}),o=id(o,w=>(0,PU.jsx)(sue,{value:t,children:(0,PU.jsx)(QO.Provider,{value:h,children:w})}),[t,h]);let y=c&&(!n||!s)?t.setContentElement:null;return o={hidden:d,...o,id:c,ref:Qo(y,l,o.ref),style:f},Zi(o)}),a5=Ir(function(t){return Lr(Zze,Xze(t))});var kU=a(_e(),1),QDt=(0,kU.createContext)(null),JDt=(0,kU.createContext)(null),kT=ga([HO],[Xw]),yue=kT.useContext,$Dt=kT.useScopedContext,eLt=kT.useProviderContext,tLt=kT.ContextProvider,rLt=kT.ScopedContextProvider;var Qze=Zw()&&Yle();function wue({tag:e,...t}={}){let r=Qw(t.store,Ace(e,["value","rtl"]));let o=e?.getState(),n=r?.getState(),i=Bt(t.activeId,n?.activeId,t.defaultActiveId,null),s=Dce({...t,activeId:i,includesBaseElement:Bt(t.includesBaseElement,n?.includesBaseElement,!0),orientation:Bt(t.orientation,n?.orientation,"vertical"),focusLoop:Bt(t.focusLoop,n?.focusLoop,!0),focusWrap:Bt(t.focusWrap,n?.focusWrap,!0),virtualFocus:Bt(t.virtualFocus,n?.virtualFocus,!0)}),l=pue({...t,placement:Bt(t.placement,n?.placement,"bottom-start")}),c=Bt(t.value,n?.value,t.defaultValue,""),u=Bt(t.selectedValue,n?.selectedValue,o?.values,t.defaultSelectedValue,""),d=Array.isArray(u),f={...s.getState(),...l.getState(),value:c,selectedValue:u,resetValueOnSelect:Bt(t.resetValueOnSelect,n?.resetValueOnSelect,d),resetValueOnHide:Bt(t.resetValueOnHide,n?.resetValueOnHide,d&&!e),activeValue:n?.activeValue},m=va(f,s,l,r);return Qze&&vi(m,()=>bi(m,["virtualFocus"],()=>{m.setState("virtualFocus",!1)})),vi(m,()=>{if(e)return Gw(bi(m,["selectedValue"],h=>{Array.isArray(h.selectedValue)&&e.setValues(h.selectedValue)}),bi(e,["values"],h=>{m.setState("selectedValue",h.values)}))}),vi(m,()=>bi(m,["resetValueOnHide","mounted"],h=>{h.resetValueOnHide&&(h.mounted||m.setState("value",c))})),vi(m,()=>bi(m,["open"],h=>{h.open||(m.setState("activeId",i),m.setState("moves",0))})),vi(m,()=>bi(m,["moves","activeId"],(h,g)=>{h.moves===g.moves&&m.setState("activeValue",void 0)})),vi(m,()=>_b(m,["moves","renderedItems"],(h,g)=>{if(h.moves===g.moves)return;let{activeId:v}=m.getState(),b=s.item(v);m.setState("activeValue",b?.value)})),{...l,...s,...m,tag:e,setValue:h=>m.setState("value",h),resetValue:()=>m.setState("value",f.value),setSelectedValue:h=>m.setState("selectedValue",h)}}function $ze(e){let t=yue();return e={...e,tag:e.tag!==void 0?e.tag:t},cue(e)}function eHe(e,t,r){return nd(t,[r.tag]),Lo(e,r,"value","setValue"),Lo(e,r,"selectedValue","setSelectedValue"),Lo(e,r,"resetValueOnHide"),Lo(e,r,"resetValueOnSelect"),Object.assign(uue(mue(e,t,r),t,r),{tag:r.tag})}function RU(e={}){e=$ze(e);let[t,r]=Jw(wue,e);return eHe(t,r,e)}var _ue=a(E(),1);function l5(e={}){return(0,_ue.jsx)(iue,{value:RU(e),children:e.children})}var Tue=a(gw(),1);var Eue=a(Te(),1),Rh=a(j(),1),Cb=a(U(),1),dd=a(G(),1);var rHe=[],RT=(e,t)=>e.singleSelection?t?.value:Array.isArray(t?.value)?t.value:!Array.isArray(t?.value)&&t?.value?[t.value]:rHe;var AT=a(U(),1),oHe=[];function Kn({elements:e,getElements:t}){let r=Array.isArray(e)&&e.length>0?e:oHe,[o,n]=(0,AT.useState)(r),[i,s]=(0,AT.useState)(!1);return(0,AT.useEffect)(()=>{if(!t){n(r);return}let l=!1;return s(!0),t().then(c=>{if(!l){let u=Array.isArray(c)&&c.length>0?c:r;n(u)}}).catch(()=>{l||n(r)}).finally(()=>{l||s(!1)}),()=>{l=!0}},[t,r]),{elements:o,isLoading:i}}var tr=a(E(),1);function Sue(e=""){return(0,Tue.default)(e.trim().toLowerCase())}var xue=(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 Cue(e,t){return`${e}-${t}`}var Pue=({selected:e})=>(0,tr.jsx)("span",{className:J("dataviews-filters__search-widget-listitem-multi-selection",{"is-selected":e}),children:e&&(0,tr.jsx)(dd.Icon,{icon:Io})}),kue=({selected:e})=>(0,tr.jsx)("span",{className:J("dataviews-filters__search-widget-listitem-single-selection",{"is-selected":e})});function Rue({view:e,filter:t,onChangeView:r}){let o=(0,Eue.useInstanceId)(Rue,"dataviews-filter-list-box"),[n,i]=(0,Cb.useState)(t.operators?.length===1?void 0:null),s=e.filters?.find(c=>c.field===t.field),l=RT(t,s);return(0,tr.jsx)(dd.Composite,{virtualFocus:!0,focusLoop:!0,activeId:n,setActiveId:i,role:"listbox",className:"dataviews-filters__search-widget-listbox","aria-label":(0,Rh.sprintf)((0,Rh.__)("List of: %1$s"),t.name),onFocusVisible:()=>{!n&&t.elements.length&&i(Cue(o,t.elements[0].value))},render:(0,tr.jsx)(dd.Composite.Typeahead,{}),children:t.elements.map(c=>(0,tr.jsxs)(dd.Composite.Hover,{render:(0,tr.jsx)(dd.Composite.Item,{id:Cue(o,c.value),render:(0,tr.jsx)("div",{"aria-label":c.label,role:"option",className:"dataviews-filters__search-widget-listitem"}),onClick:()=>{let u=s?[...(e.filters??[]).map(d=>d.field===t.field?{...d,operator:s.operator||t.operators[0],value:xue(t,s,c.value)}:d)]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:xue(t,s,c.value)}];r({...e,page:1,filters:u})}}),children:[t.singleSelection&&(0,tr.jsx)(kue,{selected:l===c.value}),!t.singleSelection&&(0,tr.jsx)(Pue,{selected:l.includes(c.value)}),(0,tr.jsx)("span",{className:"dataviews-filters__search-widget-listitem-value",title:c.label,children:c.label})]},c.value))})}function nHe({view:e,filter:t,onChangeView:r}){let[o,n]=(0,Cb.useState)(""),i=(0,Cb.useDeferredValue)(o),s=e.filters?.find(u=>u.field===t.field),l=RT(t,s),c=(0,Cb.useMemo)(()=>{let u=Sue(i);return t.elements.filter(d=>Sue(d.label).includes(u))},[t.elements,i]);return(0,tr.jsxs)(l5,{selectedValue:l,setSelectedValue:u=>{let d=s?[...(e.filters??[]).map(f=>f.field===t.field?{...f,operator:s.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,tr.jsxs)("div",{className:"dataviews-filters__search-widget-filter-combobox__wrapper",children:[(0,tr.jsx)(Gt,{render:(0,tr.jsx)(i5,{}),children:(0,Rh.__)("Search items")}),(0,tr.jsx)(e5,{autoSelect:"always",placeholder:(0,Rh.__)("Search"),className:"dataviews-filters__search-widget-filter-combobox__input"}),(0,tr.jsx)("div",{className:"dataviews-filters__search-widget-filter-combobox__icon",children:(0,tr.jsx)(dd.Icon,{icon:DV})})]}),(0,tr.jsxs)(a5,{className:"dataviews-filters__search-widget-filter-combobox-list",alwaysVisible:!0,children:[c.map(u=>(0,tr.jsxs)(r5,{resetValueOnSelect:!1,value:u.value,className:"dataviews-filters__search-widget-listitem",hideOnClick:!1,setValueOnClick:!1,focusOnHover:!0,children:[t.singleSelection&&(0,tr.jsx)(kue,{selected:l===u.value}),!t.singleSelection&&(0,tr.jsx)(Pue,{selected:l.includes(u.value)}),(0,tr.jsxs)("span",{className:"dataviews-filters__search-widget-listitem-value",title:u.label,children:[(0,tr.jsx)(n5,{className:"dataviews-filters__search-widget-filter-combobox-item-value",value:u.label}),!!u.description&&(0,tr.jsx)("span",{className:"dataviews-filters__search-widget-listitem-description",children:u.description})]})]},u.value)),!c.length&&(0,tr.jsx)("p",{children:(0,Rh.__)("No results found")})]})]})}function Aue(e){let{elements:t,isLoading:r}=Kn({elements:e.filter.elements,getElements:e.filter.getElements});if(r)return(0,tr.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,tr.jsx)(dd.Spinner,{})});if(t.length===0)return(0,tr.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,Rh.__)("No elements found")});let o=t.length>10?nHe:Rue;return(0,tr.jsx)(o,{...e,filter:{...e.filter,elements:t}})}var Iue=a(v2(),1),Oue=a(Te(),1),AU=a(U(),1),Nue=a(G(),1);var IU=a(E(),1);function Mue({filter:e,view:t,onChangeView:r,fields:o}){let n=t.filters?.find(u=>u.field===e.field),i=RT(e,n),s=(0,AU.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,AU.useMemo)(()=>(t.filters??[]).reduce((u,d)=>(u[d.field]=d.value,u),{}),[t.filters]),c=(0,Oue.useEvent)(u=>{if(!s||!n)return;let d=s.getValue({item:u});(0,Iue.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!s||!s.Edit||!n?null:(0,IU.jsx)(Nue.Flex,{className:"dataviews-filters__user-input-widget",gap:2.5,direction:"column",children:(0,IU.jsx)(s.Edit,{hideLabelFromVision:!0,data:l,field:s,operator:n.operator,onChange:c})})}var iHe=Math.pow(10,8)*24*60*60*1e3,WLt=-iHe,c5=6048e5,Fue=864e5,OU=6e4,NU=36e5;var sHe=3600;var Due=sHe*24,GLt=Due*7,aHe=Due*365.2425,lHe=aHe/12,YLt=lHe*3,MU=Symbol.for("constructDateFrom");function $o(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&MU in e?e[MU](t):e instanceof Date?new e.constructor(t):new Date(t)}function Zt(e,t){return $o(t||e,e)}function u5(e,t,r){let o=Zt(e,r?.in);return isNaN(t)?$o(r?.in||e,NaN):(t&&o.setDate(o.getDate()+t),o)}function d5(e,t,r){let o=Zt(e,r?.in);if(isNaN(t))return $o(r?.in||e,NaN);if(!t)return o;let n=o.getDate(),i=$o(r?.in||e,o.getTime());i.setMonth(o.getMonth()+t+1,0);let s=i.getDate();return n>=s?i:(o.setFullYear(i.getFullYear(),i.getMonth(),n),o)}var cHe={};function Ah(){return cHe}function $f(e,t){let r=Ah(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=Zt(e,t?.in),i=n.getDay(),s=(i<o?7:0)+i-o;return n.setDate(n.getDate()-s),n.setHours(0,0,0,0),n}function Tb(e,t){return $f(e,{...t,weekStartsOn:1})}function f5(e,t){let r=Zt(e,t?.in),o=r.getFullYear(),n=$o(r,0);n.setFullYear(o+1,0,4),n.setHours(0,0,0,0);let i=Tb(n),s=$o(r,0);s.setFullYear(o,0,4),s.setHours(0,0,0,0);let l=Tb(s);return r.getTime()>=i.getTime()?o+1:r.getTime()>=l.getTime()?o:o-1}function FU(e){let t=Zt(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 Lue(e,...t){let r=$o.bind(null,e||t.find(o=>typeof o=="object"));return t.map(r)}function DU(e,t){let r=Zt(e,t?.in);return r.setHours(0,0,0,0),r}function Bue(e,t,r){let[o,n]=Lue(r?.in,e,t),i=DU(o),s=DU(n),l=+i-FU(i),c=+s-FU(s);return Math.round((l-c)/Fue)}function Vue(e,t){let r=f5(e,t),o=$o(t?.in||e,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),Tb(o)}function jue(e,t,r){return u5(e,t*7,r)}function zue(e,t,r){return d5(e,t*12,r)}function Hue(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ep(e){return!(!Hue(e)&&typeof e!="number"||isNaN(+Zt(e)))}function Uue(e,t){let r=Zt(e,t?.in),o=r.getMonth();return r.setFullYear(r.getFullYear(),o+1,0),r.setHours(23,59,59,999),r}function IT(e,t){let r=Zt(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function p5(e,t){let r=Zt(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}var uHe={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"}},Wue=(e,t,r)=>{let o,n=uHe[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 m5(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var dHe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},fHe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},pHe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Gue={date:m5({formats:dHe,defaultWidth:"full"}),time:m5({formats:fHe,defaultWidth:"full"}),dateTime:m5({formats:pHe,defaultWidth:"full"})};var mHe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Yue=(e,t,r,o)=>mHe[e];function e_(e){return(t,r)=>{let o=r?.context?String(r.context):"standalone",n;if(o==="formatting"&&e.formattingValues){let s=e.defaultFormattingWidth||e.defaultWidth,l=r?.width?String(r.width):s;n=e.formattingValues[l]||e.formattingValues[s]}else{let s=e.defaultWidth,l=r?.width?String(r.width):e.defaultWidth;n=e.values[l]||e.values[s]}let i=e.argumentCallback?e.argumentCallback(t):t;return n[i]}}var hHe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},gHe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},vHe={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"]},bHe={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"]},yHe={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"}},wHe={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"}},_He=(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"},que={ordinalNumber:_He,era:e_({values:hHe,defaultWidth:"wide"}),quarter:e_({values:gHe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:e_({values:vHe,defaultWidth:"wide"}),day:e_({values:bHe,defaultWidth:"wide"}),dayPeriod:e_({values:yHe,defaultWidth:"wide",formattingValues:wHe,defaultFormattingWidth:"wide"})};function t_(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 s=i[0],l=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?xHe(l,f=>f.test(s)):SHe(l,f=>f.test(s)),u;u=e.valueCallback?e.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;let d=t.slice(s.length);return{value:u,rest:d}}}function SHe(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function xHe(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function Kue(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 s=e.valueCallback?e.valueCallback(i[0]):i[0];s=r.valueCallback?r.valueCallback(s):s;let l=t.slice(n.length);return{value:s,rest:l}}}var CHe=/^(\d+)(th|st|nd|rd)?/i,THe=/\d+/i,EHe={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},PHe={any:[/^b/i,/^(a|c)/i]},kHe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},RHe={any:[/1/i,/2/i,/3/i,/4/i]},AHe={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},IHe={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]},OHe={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},NHe={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]},MHe={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},FHe={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}},Zue={ordinalNumber:Kue({matchPattern:CHe,parsePattern:THe,valueCallback:e=>parseInt(e,10)}),era:t_({matchPatterns:EHe,defaultMatchWidth:"wide",parsePatterns:PHe,defaultParseWidth:"any"}),quarter:t_({matchPatterns:kHe,defaultMatchWidth:"wide",parsePatterns:RHe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:t_({matchPatterns:AHe,defaultMatchWidth:"wide",parsePatterns:IHe,defaultParseWidth:"any"}),day:t_({matchPatterns:OHe,defaultMatchWidth:"wide",parsePatterns:NHe,defaultParseWidth:"any"}),dayPeriod:t_({matchPatterns:MHe,defaultMatchWidth:"any",parsePatterns:FHe,defaultParseWidth:"any"})};var LU={code:"en-US",formatDistance:Wue,formatLong:Gue,formatRelative:Yue,localize:que,match:Zue,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Xue(e,t){let r=Zt(e,t?.in);return Bue(r,p5(r))+1}function Que(e,t){let r=Zt(e,t?.in),o=+Tb(r)-+Vue(r);return Math.round(o/c5)+1}function h5(e,t){let r=Zt(e,t?.in),o=r.getFullYear(),n=Ah(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=$o(t?.in||e,0);s.setFullYear(o+1,0,i),s.setHours(0,0,0,0);let l=$f(s,t),c=$o(t?.in||e,0);c.setFullYear(o,0,i),c.setHours(0,0,0,0);let u=$f(c,t);return+r>=+l?o+1:+r>=+u?o:o-1}function Jue(e,t){let r=Ah(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=h5(e,t),i=$o(t?.in||e,0);return i.setFullYear(n,0,o),i.setHours(0,0,0,0),$f(i,t)}function $ue(e,t){let r=Zt(e,t?.in),o=+$f(r,t)-+Jue(r,t);return Math.round(o/c5)+1}function nr(e,t){let r=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return r+o}var tp={y(e,t){let r=e.getFullYear(),o=r>0?r:1-r;return nr(t==="yy"?o%100:o,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):nr(r+1,2)},d(e,t){return nr(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 nr(e.getHours()%12||12,t.length)},H(e,t){return nr(e.getHours(),t.length)},m(e,t){return nr(e.getMinutes(),t.length)},s(e,t){return nr(e.getSeconds(),t.length)},S(e,t){let r=t.length,o=e.getMilliseconds(),n=Math.trunc(o*Math.pow(10,r-3));return nr(n,t.length)}};var r_={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},BU={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 tp.y(e,t)},Y:function(e,t,r,o){let n=h5(e,o),i=n>0?n:1-n;if(t==="YY"){let s=i%100;return nr(s,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):nr(i,t.length)},R:function(e,t){let r=f5(e);return nr(r,t.length)},u:function(e,t){let r=e.getFullYear();return nr(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 nr(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 nr(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 tp.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 nr(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=$ue(e,o);return t==="wo"?r.ordinalNumber(n,{unit:"week"}):nr(n,t.length)},I:function(e,t,r){let o=Que(e);return t==="Io"?r.ordinalNumber(o,{unit:"week"}):nr(o,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):tp.d(e,t)},D:function(e,t,r){let o=Xue(e);return t==="Do"?r.ordinalNumber(o,{unit:"dayOfYear"}):nr(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 nr(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 nr(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 nr(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=r_.noon:o===0?n=r_.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=r_.evening:o>=12?n=r_.afternoon:o>=4?n=r_.morning:n=r_.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 tp.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):tp.H(e,t)},K:function(e,t,r){let o=e.getHours()%12;return t==="Ko"?r.ordinalNumber(o,{unit:"hour"}):nr(o,t.length)},k:function(e,t,r){let o=e.getHours();return o===0&&(o=24),t==="ko"?r.ordinalNumber(o,{unit:"hour"}):nr(o,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):tp.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):tp.s(e,t)},S:function(e,t){return tp.S(e,t)},X:function(e,t,r){let o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return tde(o);case"XXXX":case"XX":return Eb(o);default:return Eb(o,":")}},x:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"x":return tde(o);case"xxxx":case"xx":return Eb(o);default:return Eb(o,":")}},O:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ede(o,":");default:return"GMT"+Eb(o,":")}},z:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ede(o,":");default:return"GMT"+Eb(o,":")}},t:function(e,t,r){let o=Math.trunc(+e/1e3);return nr(o,t.length)},T:function(e,t,r){return nr(+e,t.length)}};function ede(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+nr(i,2)}function tde(e,t){return e%60===0?(e>0?"-":"+")+nr(Math.abs(e)/60,2):Eb(e,t)}function Eb(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=nr(Math.trunc(o/60),2),i=nr(o%60,2);return r+n+t+i}var rde=(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"})}},ode=(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"})}},DHe=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],o=r[1],n=r[2];if(!n)return rde(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}}",rde(o,t)).replace("{{time}}",ode(n,t))},nde={p:ode,P:DHe};var LHe=/^D+$/,BHe=/^Y+$/,VHe=["D","DD","YY","YYYY"];function ide(e){return LHe.test(e)}function sde(e){return BHe.test(e)}function ade(e,t,r){let o=jHe(e,t,r);if(console.warn(o),VHe.includes(e))throw new RangeError(o)}function jHe(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 zHe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,HHe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,UHe=/^'([^]*?)'?$/,WHe=/''/g,GHe=/[a-zA-Z]/;function VU(e,t,r){let o=Ah(),n=r?.locale??o.locale??LU,i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,l=Zt(e,r?.in);if(!ep(l))throw new RangeError("Invalid time value");let c=t.match(HHe).map(d=>{let f=d[0];if(f==="p"||f==="P"){let m=nde[f];return m(d,n.formatLong)}return d}).join("").match(zHe).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:YHe(d)};if(BU[f])return{isToken:!0,value:d};if(f.match(GHe))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:s,locale:n};return c.map(d=>{if(!d.isToken)return d.value;let f=d.value;(!r?.useAdditionalWeekYearTokens&&sde(f)||!r?.useAdditionalDayOfYearTokens&&ide(f))&&ade(f,t,String(e));let m=BU[f[0]];return m(l,f,n.localize,u)}).join("")}function YHe(e){let t=e.match(UHe);return t?t[1].replace(WHe,"'"):e}function Pb(e,t,r){return u5(e,-t,r)}function lde(e,t){let r=()=>$o(t?.in,NaN),o=t?.additionalDigits??2,n=XHe(e),i;if(n.date){let u=QHe(n.date,o);i=JHe(u.restDateString,u.year)}if(!i||isNaN(+i))return r();let s=+i,l=0,c;if(n.time&&(l=$He(n.time),isNaN(l)))return r();if(n.timezone){if(c=eUe(n.timezone),isNaN(c))return r()}else{let u=new Date(s+l),d=Zt(0,t?.in);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return Zt(s+l+c,t?.in)}var g5={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},qHe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,KHe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ZHe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function XHe(e){let t={},r=e.split(g5.dateTimeDelimiter),o;if(r.length>2)return t;if(/:/.test(r[0])?o=r[0]:(t.date=r[0],o=r[1],g5.timeZoneDelimiter.test(t.date)&&(t.date=e.split(g5.timeZoneDelimiter)[0],o=e.substr(t.date.length,e.length))),o){let n=g5.timezone.exec(o);n?(t.time=o.replace(n[1],""),t.timezone=n[1]):t.time=o}return t}function QHe(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 JHe(e,t){if(t===null)return new Date(NaN);let r=e.match(qHe);if(!r)return new Date(NaN);let o=!!r[4],n=OT(r[1]),i=OT(r[2])-1,s=OT(r[3]),l=OT(r[4]),c=OT(r[5])-1;if(o)return iUe(t,l,c)?tUe(t,l,c):new Date(NaN);{let u=new Date(0);return!oUe(t,i,s)||!nUe(t,n)?new Date(NaN):(u.setUTCFullYear(t,i,Math.max(n,s)),u)}}function OT(e){return e?parseInt(e):1}function $He(e){let t=e.match(KHe);if(!t)return NaN;let r=jU(t[1]),o=jU(t[2]),n=jU(t[3]);return sUe(r,o,n)?r*NU+o*OU+n*1e3:NaN}function jU(e){return e&&parseFloat(e.replace(",","."))||0}function eUe(e){if(e==="Z")return 0;let t=e.match(ZHe);if(!t)return 0;let r=t[1]==="+"?-1:1,o=parseInt(t[2]),n=t[3]&&parseInt(t[3])||0;return aUe(o,n)?r*(o*NU+n*OU):NaN}function tUe(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 rUe=[31,null,31,30,31,30,31,31,30,31,30,31];function cde(e){return e%400===0||e%4===0&&e%100!==0}function oUe(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(rUe[t]||(cde(e)?29:28))}function nUe(e,t){return t>=1&&t<=(cde(e)?366:365)}function iUe(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function sUe(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function aUe(e,t){return t>=0&&t<=59}function v5(e,t,r){return d5(e,-t,r)}function ude(e,t,r){return jue(e,-t,r)}function b5(e,t,r){return zue(e,-t,r)}var Ve=a(j(),1),Bo=a(U(),1),Os=a(ln(),1);var zU=a(E(),1),en={Name:(0,zU.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,zU.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function dde(e,t){switch(t){case"days":return Pb(new Date,e);case"weeks":return ude(new Date,e);case"months":return v5(new Date,e);case"years":return b5(new Date,e);default:return new Date}}var fde={label:(0,Ve.__)("Is none of"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),en),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"},y5=[{name:io,label:(0,Ve.__)("Includes"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),en),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:so,...fde},{name:Yi,label:(0,Ve.__)("Includes all"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),en),filter(e,t,r){return r?.length?r.every(o=>t.getValue({item:e})?.includes(o)):!0},selection:"multi"},{name:Yn,...fde},{name:ks,label:(0,Ve.__)("Between (inc)"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),e.name,t[0].label[0],t[0].label[1]),en),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:Rs,label:(0,Ve.__)("In the past"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),en),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=dde(r.value,r.unit),n=(0,Os.getDate)(t.getValue({item:e}));return n>=o&&n<=new Date},selection:"custom"},{name:fa,label:(0,Ve.__)("Over"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),en),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=dde(r.value,r.unit);return(0,Os.getDate)(t.getValue({item:e}))<o},selection:"custom"},{name:_o,label:(0,Ve.__)("Is"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),en),filter(e,t,r){return r===t.getValue({item:e})||r===void 0},selection:"single"},{name:So,label:(0,Ve.__)("Is not"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),en),filter(e,t,r){return r!==t.getValue({item:e})},selection:"single"},{name:ah,label:(0,Ve.__)("Less than"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),en),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<r},selection:"single"},{name:lh,label:(0,Ve.__)("Greater than"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),en),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>r},selection:"single"},{name:ch,label:(0,Ve.__)("Less than or equal"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),en),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<=r},selection:"single"},{name:uh,label:(0,Ve.__)("Greater than or equal"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),en),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>=r},selection:"single"},{name:dh,label:(0,Ve.__)("Before"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),en),filter(e,t,r){if(r===void 0)return!0;let o=(0,Os.getDate)(r);return(0,Os.getDate)(t.getValue({item:e}))<o},selection:"single"},{name:fh,label:(0,Ve.__)("After"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),en),filter(e,t,r){if(r===void 0)return!0;let o=(0,Os.getDate)(r);return(0,Os.getDate)(t.getValue({item:e}))>o},selection:"single"},{name:ph,label:(0,Ve.__)("Before (inc)"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),en),filter(e,t,r){if(r===void 0)return!0;let o=(0,Os.getDate)(r);return(0,Os.getDate)(t.getValue({item:e}))<=o},selection:"single"},{name:mh,label:(0,Ve.__)("After (inc)"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),en),filter(e,t,r){if(r===void 0)return!0;let o=(0,Os.getDate)(r);return(0,Os.getDate)(t.getValue({item:e}))>=o},selection:"single"},{name:Zu,label:(0,Ve.__)("Contains"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),en),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:Xu,label:(0,Ve.__)("Doesn't contain"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),en),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:Qu,label:(0,Ve.__)("Starts with"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),en),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:hh,label:(0,Ve.__)("On"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),en),filter(e,t,r){if(r===void 0)return!0;let o=(0,Os.getDate)(r),n=(0,Os.getDate)(t.getValue({item:e}));return o.getTime()===n.getTime()},selection:"single"},{name:gh,label:(0,Ve.__)("Not on"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),en),filter(e,t,r){if(r===void 0)return!0;let o=(0,Os.getDate)(r),n=(0,Os.getDate)(t.getValue({item:e}));return o.getTime()!==n.getTime()},selection:"single"}],kb=e=>y5.find(t=>t.name===e),pde=()=>y5.map(e=>e.name),mde=e=>y5.filter(t=>t.selection==="single").some(t=>t.name===e),hde=e=>y5.some(t=>t.name===e);var tn=a(E(),1),lUe="Enter",cUe=" ",uUe=({activeElements:e,filterInView:t,filter:r})=>{if(e===void 0||e.length===0)return r.name;let o=kb(t?.operator);return o!==void 0?o.filterText(r,e):(0,rp.sprintf)((0,rp.__)("Unknown status for %1$s"),r.name)};function dUe({filter:e,view:t,onChangeView:r}){let o=e.operators?.map(s=>({value:s,label:kb(s)?.label||s})),n=t.filters?.find(s=>s.field===e.field),i=n?.operator||e.operators[0];return o.length>1&&(0,tn.jsxs)(se,{direction:"row",gap:"sm",justify:"flex-start",className:"dataviews-filters__summary-operators-container",align:"center",children:[(0,tn.jsx)(Ih.FlexItem,{className:"dataviews-filters__summary-operators-filter-name",children:e.name}),(0,tn.jsx)(Ih.SelectControl,{className:"dataviews-filters__summary-operators-filter-select",label:(0,rp.__)("Conditions"),value:i,options:o,onChange:s=>{let l=s,c=n?.operator,u=n?[...(t.filters??[]).map(d=>{if(d.field===e.field){let f=kb(c)?.selection,m=kb(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 gde({addFilterRef:e,openedFilter:t,fields:r,...o}){let n=(0,w5.useRef)(null),{filter:i,view:s,onChangeView:l}=o,c=s.filters?.find(_=>_.field===i.field),u=[],d=(0,w5.useMemo)(()=>{let _=r.find(y=>y.id===i.field);return _&&{..._,getValue:({item:y})=>y[_.id]}},[r,i.field]),{elements:f}=Kn({elements:i.elements,getElements:i.getElements});if(f.length>0)u=f.filter(_=>i.singleSelection?_.value===c?.value:c?.value?.includes(_.value));else if(Array.isArray(c?.value)){let _=c.value.map(y=>d?.getValueFormatted({item:{[d.id]:y},field:d})||String(y));u=[{value:c.value,label:_}]}else if(typeof c?.value=="object")u=[{value:c.value,label:c.value}];else if(c?.value!==void 0){let _=d!==void 0?d.getValueFormatted({item:{[d.id]:c.value},field:d}):String(c.value);u=[{value:c.value,label:_}]}let m=i.isPrimary,h=c?.isLocked,g=!h&&c?.value!==void 0,v=!h&&(!m||g),b=m?(0,rp.__)("Reset"):(0,rp.__)("Remove");return(0,tn.jsx)(Ih.Dropdown,{defaultOpen:t===i.field,contentClassName:"dataviews-filters__summary-popover",popoverProps:{placement:"bottom-start",role:"dialog"},onClose:()=>{n.current?.focus()},renderToggle:({isOpen:_,onToggle:y})=>(0,tn.jsxs)("div",{className:"dataviews-filters__summary-chip-container",children:[(0,tn.jsxs)(Ze.Root,{children:[(0,tn.jsx)(Ze.Trigger,{render:(0,tn.jsx)("div",{className:J("dataviews-filters__summary-chip",{"has-reset":v,"has-values":g,"is-not-clickable":h}),role:"button",tabIndex:h?-1:0,onClick:()=>{h||y()},onKeyDown:w=>{!h&&[lUe,cUe].includes(w.key)&&(y(),w.preventDefault())},"aria-disabled":h,"aria-pressed":_,"aria-expanded":_,ref:n,children:(0,tn.jsx)(uUe,{activeElements:u,filterInView:c,filter:i})})}),(0,tn.jsx)(Ze.Popup,{children:(0,rp.sprintf)((0,rp.__)("Filter by: %1$s"),i.name.toLowerCase())})]}),v&&(0,tn.jsxs)(Ze.Root,{children:[(0,tn.jsx)(Ze.Trigger,{render:(0,tn.jsx)("button",{className:J("dataviews-filters__summary-chip-remove",{"has-values":g}),"aria-label":b,onClick:()=>{l({...s,page:1,filters:s.filters?.filter(w=>w.field!==i.field)}),m?n.current?.focus():e.current?.focus()},children:(0,tn.jsx)(Ih.Icon,{icon:Mi})})}),(0,tn.jsx)(Ze.Popup,{children:b})]})]}),renderContent:()=>(0,tn.jsxs)(se,{direction:"column",justify:"flex-start",children:[(0,tn.jsx)(dUe,{...o}),o.filter.hasElements?(0,tn.jsx)(Aue,{...o,filter:{...o.filter,elements:f}}):(0,tn.jsx)(Mue,{...o,fields:r})]})})}var _5=a(G(),1),vde=a(j(),1),bde=a(U(),1);var op=a(E(),1),{Menu:NT}=_t(_5.privateApis);function HU({filters:e,view:t,onChangeView:r,setOpenedFilter:o,triggerProps:n}){let i=e.filter(s=>!s.isVisible);return(0,op.jsxs)(NT,{children:[(0,op.jsx)(NT.TriggerButton,{...n}),(0,op.jsx)(NT.Popover,{children:i.map(s=>(0,op.jsx)(NT.Item,{onClick:()=>{o(s.field),r({...t,page:1,filters:[...t.filters||[],{field:s.field,value:void 0,operator:s.operators[0]}]})},children:(0,op.jsx)(NT.ItemLabel,{children:s.name})},s.field))})]})}function fUe({filters:e,view:t,onChangeView:r,setOpenedFilter:o},n){if(!e.length||e.every(({isPrimary:s})=>s))return null;let i=e.filter(s=>!s.isVisible);return(0,op.jsx)(HU,{triggerProps:{render:(0,op.jsx)(_5.Button,{accessibleWhenDisabled:!0,size:"compact",className:"dataviews-filters-button",variant:"tertiary",disabled:!i.length,ref:n}),children:(0,vde.__)("Add filter")},filters:e,view:t,onChangeView:r,setOpenedFilter:o})}var yde=(0,bde.forwardRef)(fUe);var wde=a(G(),1),_de=a(j(),1),Sde=a(E(),1);function xde({filters:e,view:t,onChangeView:r}){let o=i=>e.some(s=>s.field===i&&s.isPrimary),n=!t.search&&!t.filters?.some(i=>!i.isLocked&&(i.value!==void 0||!o(i.field)));return(0,Sde.jsx)(wde.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,_de.__)("Reset")})}var Cde=a(U(),1);function pUe(e,t){return(0,Cde.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,s=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=>mde(l)),operators:n,isVisible:s||i||!!t.filters?.some(l=>l.field===o.id&&hde(l.operator)),isPrimary:i,isLocked:s})}),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 MT=pUe;var FT=a(E(),1);function mUe({className:e}){let{fields:t,view:r,onChangeView:o,openedFilter:n,setOpenedFilter:i}=(0,o_.useContext)(et),s=(0,o_.useRef)(null),l=MT(t,r),c=(0,FT.jsx)(yde,{filters:l,view:r,onChangeView:o,ref:s,setOpenedFilter:i},"add-filter"),u=l.filter(f=>f.isVisible);if(u.length===0)return null;let d=[...u.map(f=>(0,FT.jsx)(gde,{filter:f,view:r,fields:t,onChangeView:o,addFilterRef:s,openedFilter:n},f.field)),c];return d.push((0,FT.jsx)(xde,{filters:l,view:r,onChangeView:o},"reset-filters")),(0,FT.jsx)(se,{direction:"row",justify:"flex-start",gap:"sm",style:{width:"fit-content"},wrap:"wrap",className:e,children:d})}var DT=(0,o_.memo)(mUe);var Oh=a(U(),1),Tde=a(G(),1);var S5=a(j(),1);var fd=a(E(),1);function hUe(){let{filters:e,view:t,onChangeView:r,setOpenedFilter:o,isShowingFilter:n,setIsShowingFilter:i}=(0,Oh.useContext)(et),s=(0,Oh.useRef)(null),l=(0,Oh.useCallback)(h=>{r(h),i(!0)},[r,i]);if(e.length===0)return null;let c=e.some(h=>h.isVisible),u={label:(0,S5.__)("Add filter"),"aria-expanded":!1,isPressed:!1},d={label:(0,S5._x)("Filter","verb"),"aria-expanded":n,isPressed:n,onClick:()=>{n||o(null),i(!n)}},f=e.some(h=>h.isPrimary||h.isLocked),m=(0,fd.jsx)(Tde.Button,{ref:s,className:"dataviews-filters__visibility-toggle",size:"compact",icon:d1,disabled:f,accessibleWhenDisabled:!0,...c?d:u});return(0,fd.jsx)("div",{className:"dataviews-filters__container-visibility-toggle",children:c?(0,fd.jsx)(gUe,{buttonRef:s,filtersCount:t.filters?.length,children:m}):(0,fd.jsx)(HU,{filters:e,view:t,onChangeView:l,setOpenedFilter:o,triggerProps:{render:m}})})}function gUe({buttonRef:e,filtersCount:t,children:r}){return(0,Oh.useEffect)(()=>()=>{e.current?.focus()},[e]),(0,fd.jsxs)(fd.Fragment,{children:[r,!!t&&(0,fd.jsx)("span",{className:"dataviews-filters-toggle__count",children:t})]})}var x5=hUe;var Ede=a(U(),1);var Pde=a(E(),1);function vUe(e){let{isShowingFilter:t}=(0,Ede.useContext)(et);return t?(0,Pde.jsx)(DT,{...e}):null}var C5=vUe;var kde=a(U(),1),Rde=a(G(),1),Ade=a(j(),1);var Rb=a(E(),1);function UU({className:e}){let{actions:t=[],data:r,fields:o,getItemId:n,getItemLevel:i,hasInitiallyLoaded:s,isLoading:l,view:c,onChangeView:u,selection:d,onChangeSelection:f,setOpenedFilter:m,onClickItem:h,isItemClickable:g,renderItemLink:v,defaultLayouts:b,containerRef:_,empty:y=(0,Rb.jsx)("p",{children:(0,Ade.__)("No results")})}=(0,kde.useContext)(et),w=$u(!s,{delay:200});if(!s)return w?(0,Rb.jsx)("div",{className:"dataviews-loading",children:(0,Rb.jsx)("p",{children:(0,Rb.jsx)(Rde.Spinner,{})})}):null;let S=Th.find(x=>x.type===c.type&&b[x.type])?.component;return(0,Rb.jsx)("div",{className:"dataviews-layout__container",ref:_,children:(0,Rb.jsx)(S,{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:y})})}var Ide=a(j(),1),Hc=a(U(),1),Ode=a(G(),1),Nde=a(Te(),1);var Mde=a(E(),1),bUe=(0,Hc.memo)(function({label:t}){let{view:r,onChangeView:o}=(0,Hc.useContext)(et),[n,i,s]=(0,Nde.useDebouncedInput)(r.search);(0,Hc.useEffect)(()=>{r.search!==s&&i(r.search??"")},[r.search,i]);let l=(0,Hc.useRef)(o),c=(0,Hc.useRef)(r);(0,Hc.useEffect)(()=>{l.current=o,c.current=r},[o,r]),(0,Hc.useEffect)(()=>{s!==c.current?.search&&l.current({...c.current,page:r.page?1:void 0,startPosition:r.startPosition?1:void 0,search:s})},[s]);let u=t||(0,Ide.__)("Search");return(0,Mde.jsx)(Ode.SearchControl,{className:"dataviews-search",onChange:i,value:n,label:u,placeholder:u,size:"compact"})}),WU=bUe;var rn=a(G(),1),np=a(j(),1),Uc=a(U(),1);var YU=a(GU(),1),Dde=a(Te(),1);var Ht=a(E(),1),{Menu:LT}=_t(rn.privateApis),yUe={className:"dataviews-config__popover",placement:"bottom-end",offset:9};function qU(){let{view:e,onChangeView:t,defaultLayouts:r}=(0,Uc.useContext)(et),o=Object.keys(r);if(o.length<=1)return null;let n=Th.find(i=>e.type===i.type);return(0,Ht.jsxs)(LT,{children:[(0,Ht.jsx)(LT.TriggerButton,{render:(0,Ht.jsx)(rn.Button,{size:"compact",icon:n?.icon,label:(0,np.__)("Layout")})}),(0,Ht.jsx)(LT.Popover,{children:o.map(i=>{let s=Th.find(l=>l.type===i);return s?(0,Ht.jsx)(LT.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"pickerActivity":case"activity":let c={...e};return"layout"in c&&delete c.layout,t({...c,type:l.target.value,...r[l.target.value]})}(0,YU.default)("Invalid dataview")},children:(0,Ht.jsx)(LT.ItemLabel,{children:s.label})},i):null})})]})}function wUe(){let{view:e,fields:t,onChangeView:r}=(0,Uc.useContext)(et),o=(0,Uc.useMemo)(()=>t.filter(i=>i.enableSorting!==!1).map(i=>({label:i.label,value:i.id})),[t]);return(0,Ht.jsx)(rn.SelectControl,{label:(0,np.__)("Sort by"),value:e.sort?.field,options:o,onChange:n=>{r({...e,sort:{direction:e?.sort?.direction||"desc",field:n},showLevels:!1})}})}function _Ue(){let{view:e,fields:t,onChangeView:r}=(0,Uc.useContext)(et);if(t.filter(i=>i.enableSorting!==!1).length===0)return null;let n=e.sort?.direction;return!n&&e.sort?.field&&(n="desc"),(0,Ht.jsx)(rn.__experimentalToggleGroupControl,{className:"dataviews-view-config__sort-direction",isBlock:!0,label:(0,np.__)("Order"),value:n,onChange:i=>{if(i==="asc"||i==="desc"){r({...e,sort:{direction:i,field:e.sort?.field||t.find(s=>s.enableSorting!==!1)?.id||""},showLevels:!1});return}(0,YU.default)("Invalid direction")},children:oO.map(i=>(0,Ht.jsx)(rn.__experimentalToggleGroupControlOptionIcon,{value:i,icon:Sae[i],label:iO[i]},i))})}function SUe(){let{view:e,config:t,onChangeView:r}=(0,Uc.useContext)(et),{infiniteScrollEnabled:o}=e;return!t||!t.perPageSizes||t.perPageSizes.length<2||t.perPageSizes.length>6||o?null:(0,Ht.jsx)(rn.__experimentalToggleGroupControl,{isBlock:!0,label:(0,np.__)("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,Ht.jsx)(rn.__experimentalToggleGroupControlOption,{value:n,label:n.toString()},n))})}function xUe(){let{onReset:e}=(0,Uc.useContext)(et);return e===void 0?null:(0,Ht.jsx)(rn.Button,{variant:"tertiary",size:"compact",disabled:e===!1,accessibleWhenDisabled:!0,className:"dataviews-view-config__reset-button",onClick:()=>{typeof e=="function"&&e()},children:(0,np.__)("Reset view")})}function KU(){let{view:e,onReset:t}=(0,Uc.useContext)(et),r=(0,Dde.useInstanceId)(Lde,"dataviews-view-config-dropdown"),o=Th.find(i=>i.type===e.type),n=typeof t=="function";return(0,Ht.jsx)(rn.Dropdown,{expandOnMobile:!0,popoverProps:{...yUe,id:r},renderToggle:({onToggle:i,isOpen:s})=>(0,Ht.jsxs)("div",{className:"dataviews-view-config__toggle-wrapper",children:[(0,Ht.jsx)(rn.Button,{size:"compact",icon:EB,label:(0,np._x)("View options","View is used as a noun"),onClick:i,"aria-expanded":s?"true":"false","aria-controls":r}),n&&(0,Ht.jsx)("span",{className:"dataviews-view-config__modified-indicator"})]}),renderContent:()=>(0,Ht.jsx)(rn.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"dataviews-config__popover-content-wrapper",children:(0,Ht.jsxs)(se,{direction:"column",className:"dataviews-view-config",gap:"xl",children:[(0,Ht.jsxs)(se,{direction:"row",justify:"space-between",align:"center",className:"dataviews-view-config__header",children:[(0,Ht.jsx)(rn.__experimentalHeading,{level:2,className:"dataviews-settings-section__title",children:(0,np.__)("Appearance")}),(0,Ht.jsx)(xUe,{})]}),(0,Ht.jsxs)(se,{direction:"column",gap:"lg",children:[(0,Ht.jsxs)(se,{direction:"row",gap:"sm",className:"dataviews-view-config__sort-controls",children:[(0,Ht.jsx)(wUe,{}),(0,Ht.jsx)(_Ue,{})]}),!!o?.viewConfigOptions&&(0,Ht.jsx)(o.viewConfigOptions,{}),(0,Ht.jsx)(SUe,{}),(0,Ht.jsx)(vO,{})]})]})})})}function Lde(){return(0,Ht.jsxs)(Ht.Fragment,{children:[(0,Ht.jsx)(qU,{}),(0,Ht.jsx)(KU,{})]})}var CUe=(0,Uc.memo)(Lde),Bde=CUe;var Vde=a(G(),1),jde=a(U(),1);function wr(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 zde=a(E(),1),{ValidatedCheckboxControl:TUe}=_t(Vde.privateApis);function Hde({field:e,onChange:t,data:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{getValue:s,setValue:l,label:c,description:u,isValid:d}=e,f=e.isDisabled({item:r,field:e}),m=(0,jde.useCallback)(()=>{t(l({item:r,value:!s({item:r})}))},[r,s,t,l]);return(0,zde.jsx)(TUe,{required:!!e.isValid?.required,markWhenOptional:n,customValidity:wr(d,i),hidden:o,label:c,help:u,checked:s({item:r}),onChange:m,disabled:f})}var T5=a(G(),1),Ude=a(U(),1);var ZU=a(E(),1),{ValidatedComboboxControl:EUe}=_t(T5.privateApis);function E5({data:e,field:t,onChange:r,hideLabelFromVision:o,validity:n}){let{label:i,description:s,placeholder:l,getValue:c,setValue:u,isValid:d}=t,f=c({item:e})??"",m=(0,Ude.useCallback)(v=>r(u({item:e,value:v??""})),[e,r,u]),{elements:h,isLoading:g}=Kn({elements:t.elements,getElements:t.getElements});return g?(0,ZU.jsx)(T5.Spinner,{}):(0,ZU.jsx)(EUe,{required:!!t.isValid?.required,customValidity:wr(d,n),label:i,value:f,help:s,placeholder:l,options:h,onChange:m,hideLabelFromVision:o,allowReset:!0,expandOnFocus:!0})}var R5=a(G(),1),Ul=a(U(),1),k5=a(j(),1),al=a(ln(),1);var i_=a(G(),1),XU=a(U(),1),pd=a(j(),1);var n_=a(E(),1),PUe={[Rs]:[{value:"days",label:(0,pd.__)("Days")},{value:"weeks",label:(0,pd.__)("Weeks")},{value:"months",label:(0,pd.__)("Months")},{value:"years",label:(0,pd.__)("Years")}],[fa]:[{value:"days",label:(0,pd.__)("Days ago")},{value:"weeks",label:(0,pd.__)("Weeks ago")},{value:"months",label:(0,pd.__)("Months ago")},{value:"years",label:(0,pd.__)("Years ago")}]};function P5({className:e,data:t,field:r,onChange:o,hideLabelFromVision:n,operator:i}){let s=PUe[i===Rs?"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=s[0].value}=h&&typeof h=="object"?h:{},b=(0,XU.useCallback)(y=>o(f({item:t,value:{value:Number(y),unit:v}})),[o,f,t,v]),_=(0,XU.useCallback)(y=>o(f({item:t,value:{value:g,unit:y}})),[o,f,t,g]);return(0,n_.jsx)(i_.BaseControl,{id:l,className:J(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:n,help:u,children:(0,n_.jsxs)(se,{direction:"row",gap:"sm",children:[(0,n_.jsx)(i_.__experimentalNumberControl,{className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:g,onChange:b,disabled:m}),(0,n_.jsx)(i_.SelectControl,{className:"dataviews-controls__relative-date-unit",label:(0,pd.__)("Unit"),value:v,options:s,onChange:_,hideLabelFromVision:!0,disabled:m})]})})}var Wde=a(U(),1);function BT(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,Wde.useMemo)(()=>{let i=[];if(r){let s=t(r);s&&i.push({before:s})}if(o){let s=t(o);s&&i.push({after:s})}return i.length>0?i:void 0},[r,o,t]);return{minConstraint:r,maxConstraint:o,disabledMatchers:n}}var Gde=a(ln(),1);function VT(e){if(!e)return null;let t=(0,Gde.getDate)(e);return t&&ep(t)?t:null}var Nh=a(E(),1),{DateCalendar:kUe,ValidatedInputControl:RUe}=_t(R5.privateApis),QU=e=>e?(0,al.dateI18n)("Y-m-d\\TH:i",(0,al.getDate)(e)):"";function AUe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,config:s}){let{compact:l}=s||{},{id:c,label:u,description:d,setValue:f,getValue:m,isValid:h}=t,g=t.isDisabled({item:e,field:t}),v=m({item:e}),b=typeof v=="string"?v:void 0,[_,y]=(0,Ul.useState)(()=>VT(b)||new Date),w=(0,Ul.useRef)(null),S=(0,Ul.useRef)(void 0),x=(0,Ul.useRef)(null),{minConstraint:C,maxConstraint:A,disabledMatchers:k}=BT(h,VT),R=(0,Ul.useCallback)(D=>r(f({item:e,value:D})),[e,r,f]);(0,Ul.useEffect)(()=>()=>{S.current&&clearTimeout(S.current)},[]);let M=(0,Ul.useCallback)(D=>{let z;if(D){let B=(0,al.dateI18n)("Y-m-d",D),O;b?O=(0,al.dateI18n)("H:i",(0,al.getDate)(b)):O=(0,al.dateI18n)("H:i",D),z=(0,al.getDate)(`${B}T${O}`).toISOString(),R(z),S.current&&clearTimeout(S.current)}else R(void 0);x.current=w.current&&w.current.ownerDocument.activeElement,S.current=setTimeout(()=>{w.current&&(w.current.focus(),w.current.blur(),R(z),x.current&&x.current instanceof HTMLElement&&x.current.focus())},0)},[R,b]),P=(0,Ul.useCallback)(D=>{if(D){let z=(0,al.getDate)(D);R(z.toISOString());let B=VT(z.toISOString());B&&y(B)}else R(void 0)},[R]),{format:T}=t,N=T.weekStartsOn??(0,al.getSettings)().l10n.startOfWeek,{timezone:{string:L}}=(0,al.getSettings)(),F=u;return h?.required&&!n&&!o?F=`${u} (${(0,k5.__)("Required")})`:!h?.required&&n&&!o&&(F=`${u} (${(0,k5.__)("Optional")})`),(0,Nh.jsx)(R5.BaseControl,{id:c,label:F,help:d,hideLabelFromVision:o,children:(0,Nh.jsxs)(se,{direction:"column",gap:"lg",children:[(0,Nh.jsx)(RUe,{ref:w,required:!!h?.required,customValidity:wr(h,i),type:"datetime-local",label:(0,k5.__)("Date time"),hideLabelFromVision:!0,value:QU(b),onChange:P,disabled:g,min:C?QU(C):void 0,max:A?QU(A):void 0}),!l&&(0,Nh.jsx)(kUe,{style:{width:"100%"},selected:b&&VT(b)||void 0,onSelect:M,month:_,onMonthChange:y,timeZone:L||void 0,weekStartsOn:N,disabled:g||k})]})})}function Yde({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:s,config:l}){return i===Rs||i===fa?(0,Nh.jsx)(P5,{className:"dataviews-controls__datetime",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):(0,Nh.jsx)(AUe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s,config:l})}var Ji=a(G(),1),qde=a(Ol(),1),cr=a(U(),1),An=a(j(),1),Qi=a(ln(),1);var Vr=a(E(),1),{DateCalendar:IUe,DateRangeCalendar:OUe}=_t(Ji.privateApis),NUe=[{id:"today",label:(0,An.__)("Today"),getValue:()=>(0,Qi.getDate)(null)},{id:"yesterday",label:(0,An.__)("Yesterday"),getValue:()=>{let e=(0,Qi.getDate)(null);return Pb(e,1)}},{id:"past-week",label:(0,An.__)("Past week"),getValue:()=>{let e=(0,Qi.getDate)(null);return Pb(e,7)}},{id:"past-month",label:(0,An.__)("Past month"),getValue:()=>{let e=(0,Qi.getDate)(null);return v5(e,1)}}],MUe=[{id:"last-7-days",label:(0,An.__)("Last 7 days"),getValue:()=>{let e=(0,Qi.getDate)(null);return[Pb(e,7),e]}},{id:"last-30-days",label:(0,An.__)("Last 30 days"),getValue:()=>{let e=(0,Qi.getDate)(null);return[Pb(e,30),e]}},{id:"month-to-date",label:(0,An.__)("Month to date"),getValue:()=>{let e=(0,Qi.getDate)(null);return[IT(e),e]}},{id:"last-year",label:(0,An.__)("Last year"),getValue:()=>{let e=(0,Qi.getDate)(null);return[b5(e,1),e]}},{id:"year-to-date",label:(0,An.__)("Year to date"),getValue:()=>{let e=(0,Qi.getDate)(null);return[p5(e),e]}}],Mh=e=>{if(!e)return null;let t=(0,Qi.getDate)(e);return t&&ep(t)?t:null},JU=e=>e?typeof e=="string"?e:VU(e,"yyyy-MM-dd"):"";function Kde({field:e,validity:t,inputRefs:r,isTouched:o,setIsTouched:n,children:i}){let{isValid:s}=e,[l,c]=(0,cr.useState)(void 0),u=(0,cr.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,cr.useEffect)(()=>{let f=Array.isArray(r)?r:[r],m=t?wr(s,t):void 0;for(let h of f){let g=h.current;g&&g.setCustomValidity(m?.type==="invalid"&&m.message?m.message:"")}},[r,s,t]),(0,cr.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,cr.useEffect)(()=>{if(!o)return;let f=t?wr(s,t):void 0;f?c(f):u()},[o,s,t,u]),(0,cr.useEffect)(()=>{o&&l?.message&&(0,qde.speak)(l.message)},[o,l?.message]),(0,Vr.jsxs)("div",{onBlur:f=>{o||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,l&&(0,Vr.jsxs)("p",{className:J("components-validated-control__indicator",l.type==="invalid"?"is-invalid":void 0),children:[(0,Vr.jsx)(Ji.Icon,{className:"components-validated-control__indicator-icon",icon:_f,size:16,fill:"currentColor"}),l.message]})]})}function FUe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:s,label:l,description:c,setValue:u,getValue:d,isValid:f,format:m}=t,h=t.isDisabled({item:e,field:t}),[g,v]=(0,cr.useState)(null),b=m.weekStartsOn??(0,Qi.getSettings)().l10n.startOfWeek,_=d({item:e}),y=typeof _=="string"?_:void 0,[w,S]=(0,cr.useState)(()=>Mh(y)||new Date),[x,C]=(0,cr.useState)(!1),A=(0,cr.useRef)(null),{minConstraint:k,maxConstraint:R,disabledMatchers:M}=BT(f,Mh),P=(0,cr.useCallback)(z=>r(u({item:e,value:z})),[e,r,u]),T=(0,cr.useCallback)(z=>{let B=z?VU(z,"yyyy-MM-dd"):void 0;P(B),v(null),C(!0)},[P]),N=(0,cr.useCallback)(z=>{let B=z.getValue(),O=JU(B);S(B),P(O),v(z.id),C(!0)},[P]),L=(0,cr.useCallback)(z=>{if(P(z),z){let B=Mh(z);B&&S(B)}v(null),C(!0)},[P]),{timezone:{string:F}}=(0,Qi.getSettings)(),D=l;return f?.required&&!n?D=`${l} (${(0,An.__)("Required")})`:!f?.required&&n&&(D=`${l} (${(0,An.__)("Optional")})`),(0,Vr.jsx)(Kde,{field:t,validity:i,inputRefs:A,isTouched:x,setIsTouched:C,children:(0,Vr.jsx)(Ji.BaseControl,{id:s,className:"dataviews-controls__date",label:D,help:c,hideLabelFromVision:o,children:(0,Vr.jsxs)(se,{direction:"column",gap:"lg",children:[(0,Vr.jsxs)(se,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[NUe.map(z=>{let B=g===z.id;return(0,Vr.jsx)(Ji.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:B,size:"small",disabled:h,accessibleWhenDisabled:!0,onClick:()=>N(z),children:z.label},z.id)}),(0,Vr.jsx)(Ji.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!g,size:"small",disabled:!!g||h,accessibleWhenDisabled:!0,children:(0,An.__)("Custom")})]}),(0,Vr.jsx)(Ji.__experimentalInputControl,{ref:A,type:"date",label:(0,An.__)("Date"),hideLabelFromVision:!0,value:y,onChange:L,required:!!t.isValid?.required,disabled:h,min:k,max:R}),(0,Vr.jsx)(IUe,{style:{width:"100%"},selected:y&&Mh(y)||void 0,onSelect:T,month:w,onMonthChange:S,timeZone:F||void 0,weekStartsOn:b,disabled:h||M,disableNavigation:h})]})})})}function DUe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:s,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(V=>typeof V=="string")&&(g=v);let b=m.weekStartsOn??(0,Qi.getSettings)().l10n.startOfWeek,{minConstraint:_,maxConstraint:y,disabledMatchers:w}=BT(f,Mh),S=(0,cr.useCallback)(V=>{r(d({item:e,value:V}))},[e,r,d]),[x,C]=(0,cr.useState)(null),A=(0,cr.useMemo)(()=>{if(!g)return{from:void 0,to:void 0};let[V,W]=g;return{from:Mh(V)||void 0,to:Mh(W)||void 0}},[g]),[k,R]=(0,cr.useState)(()=>A.from||new Date),[M,P]=(0,cr.useState)(!1),T=(0,cr.useRef)(null),N=(0,cr.useRef)(null),L=(0,cr.useCallback)((V,W)=>{V&&W?S([JU(V),JU(W)]):!V&&!W&&S(void 0)},[S]),F=(0,cr.useCallback)(V=>{L(V?.from,V?.to),C(null),P(!0)},[L]),D=(0,cr.useCallback)(V=>{let[W,q]=V.getValue();R(W),L(W,q),C(V.id),P(!0)},[L]),z=(0,cr.useCallback)((V,W)=>{let[q,Z]=g||[void 0,void 0];if(L(V==="from"?W:q,V==="to"?W:Z),W){let re=Mh(W);re&&R(re)}C(null),P(!0)},[g,L]),{timezone:B}=(0,Qi.getSettings)(),O=l;return t.isValid?.required&&!n?O=`${l} (${(0,An.__)("Required")})`:!t.isValid?.required&&n&&(O=`${l} (${(0,An.__)("Optional")})`),(0,Vr.jsx)(Kde,{field:t,validity:i,inputRefs:[T,N],isTouched:M,setIsTouched:P,children:(0,Vr.jsx)(Ji.BaseControl,{id:s,className:"dataviews-controls__date",label:O,help:c,hideLabelFromVision:o,children:(0,Vr.jsxs)(se,{direction:"column",gap:"lg",children:[(0,Vr.jsxs)(se,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[MUe.map(V=>{let W=x===V.id;return(0,Vr.jsx)(Ji.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:W,size:"small",disabled:h,accessibleWhenDisabled:!0,onClick:()=>D(V),children:V.label},V.id)}),(0,Vr.jsx)(Ji.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!x,size:"small",accessibleWhenDisabled:!0,disabled:!!x||h,children:(0,An.__)("Custom")})]}),(0,Vr.jsxs)(se,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,Vr.jsx)(Ji.__experimentalInputControl,{ref:T,type:"date",label:(0,An.__)("From"),hideLabelFromVision:!0,value:g?.[0],onChange:V=>z("from",V),required:!!t.isValid?.required,disabled:h,min:_,max:y}),(0,Vr.jsx)(Ji.__experimentalInputControl,{ref:N,type:"date",label:(0,An.__)("To"),hideLabelFromVision:!0,value:g?.[1],onChange:V=>z("to",V),required:!!t.isValid?.required,disabled:h,min:_,max:y})]}),(0,Vr.jsx)(OUe,{style:{width:"100%"},selected:A,onSelect:F,month:k,onMonthChange:R,timeZone:B.string||void 0,weekStartsOn:b,disabled:h||w})]})})})}function Zde({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:s}){return i===Rs||i===fa?(0,Vr.jsx)(P5,{className:"dataviews-controls__date",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):i===ks?(0,Vr.jsx)(DUe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s}):(0,Vr.jsx)(FUe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s})}var A5=a(G(),1),Xde=a(U(),1);var $U=a(E(),1),{ValidatedSelectControl:LUe}=_t(A5.privateApis);function I5({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{type:s,label:l,description:c,getValue:u,setValue:d,isValid:f}=t,m=t.isDisabled({item:e,field:t}),h=s==="array",g=u({item:e})??(h?[]:""),v=(0,Xde.useCallback)(y=>r(d({item:e,value:y})),[e,r,d]),{elements:b,isLoading:_}=Kn({elements:t.elements,getElements:t.getElements});return _?(0,$U.jsx)(A5.Spinner,{}):(0,$U.jsx)(LUe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:wr(f,i),label:l,value:g,help:c,options:b,onChange:v,hideLabelFromVision:o,multiple:h,disabled:m})}var eW=a(E(),1),BUe=10;function Qde(e){let{field:t}=e,{elements:r}=Kn({elements:t.elements,getElements:t.getElements});return r.length>=BUe?(0,eW.jsx)(E5,{...e}):(0,eW.jsx)(I5,{...e})}var N5=a(G(),1);var Jde=a(G(),1),$de=a(U(),1);var efe=a(E(),1),{ValidatedInputControl:VUe}=_t(Jde.privateApis);function md({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,type:i,prefix:s,suffix:l,validity:c}){let{label:u,placeholder:d,description:f,getValue:m,setValue:h,isValid:g}=t,v=m({item:e}),b=t.isDisabled({item:e,field:t}),_=(0,$de.useCallback)(y=>r(h({item:e,value:y})),[e,h,r]);return(0,efe.jsx)(VUe,{required:!!g.required,markWhenOptional:n,customValidity:wr(g,c),label:u,placeholder:d,value:v??"",help:f,onChange:_,hideLabelFromVision:o,type:i,prefix:s,suffix:l,disabled:b,pattern:g.pattern?g.pattern.constraint:void 0,minLength:g.minLength?g.minLength.constraint:void 0,maxLength:g.maxLength?g.maxLength.constraint:void 0})}var O5=a(E(),1);function tfe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,O5.jsx)(md,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"email",prefix:(0,O5.jsx)(N5.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,O5.jsx)(N5.Icon,{icon:jB})})})}var F5=a(G(),1);var M5=a(E(),1);function rfe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,M5.jsx)(md,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"tel",prefix:(0,M5.jsx)(F5.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,M5.jsx)(F5.Icon,{icon:h0})})})}var L5=a(G(),1);var D5=a(E(),1);function ofe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,D5.jsx)(md,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"url",prefix:(0,D5.jsx)(L5.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,D5.jsx)(L5.Icon,{icon:cV})})})}var ip=a(G(),1),jT=a(U(),1),B5=a(j(),1);var Fh=a(E(),1),{ValidatedNumberControl:jUe}=_t(ip.privateApis);function nfe(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function zUe({value:e,onChange:t,hideLabelFromVision:r,step:o}){let[n="",i=""]=e,s=(0,jT.useCallback)(c=>t([nfe(c),i]),[t,i]),l=(0,jT.useCallback)(c=>t([n,nfe(c)]),[t,n]);return(0,Fh.jsx)(ip.BaseControl,{help:(0,B5.__)("The max. value must be greater than the min. value."),children:(0,Fh.jsxs)(ip.Flex,{direction:"row",gap:4,children:[(0,Fh.jsx)(ip.__experimentalNumberControl,{label:(0,B5.__)("Min."),value:n,max:i?Number(i)-o:void 0,onChange:s,hideLabelFromVision:r,step:o}),(0,Fh.jsx)(ip.__experimentalNumberControl,{label:(0,B5.__)("Max."),value:i,min:n?Number(n)+o:void 0,onChange:l,hideLabelFromVision:r,step:o})]})})}function V5({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:s}){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}),b=(0,jT.useCallback)(y=>{r(m({item:e,value:["",void 0].includes(y)?void 0:Number(y)}))},[e,r,m]),_=(0,jT.useCallback)(y=>{r(m({item:e,value:y}))},[e,r,m]);if(i===ks){let y=["",""];return Array.isArray(g)&&g.length===2&&g.every(w=>typeof w=="number"||w==="")&&(y=g),(0,Fh.jsx)(zUe,{value:y,onChange:_,hideLabelFromVision:o,step:c})}return(0,Fh.jsx)(jUe,{required:!!h.required,markWhenOptional:n,customValidity:wr(h,s),label:u,help:d,value:g,onChange:b,hideLabelFromVision:o,step:c,min:h.min?h.min.constraint:void 0,max:h.max?h.max.constraint:void 0,disabled:v})}var ife=a(E(),1);function sfe(e){return(0,ife.jsx)(V5,{...e})}var afe=a(E(),1);function lfe(e){return(0,afe.jsx)(V5,{...e})}var j5=a(G(),1),cfe=a(U(),1);var tW=a(E(),1),{ValidatedRadioControl:HUe}=_t(j5.privateApis);function ufe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:s,description:l,getValue:c,setValue:u,isValid:d}=t,f=t.isDisabled({item:e,field:t}),{elements:m,isLoading:h}=Kn({elements:t.elements,getElements:t.getElements}),g=c({item:e}),v=(0,cfe.useCallback)(b=>r(u({item:e,value:b})),[e,r,u]);return h?(0,tW.jsx)(j5.Spinner,{}):(0,tW.jsx)(HUe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:wr(d,i),label:s,help:l,onChange:v,options:m,selected:g,hideLabelFromVision:o,disabled:f})}var rW=a(U(),1);var dfe=a(E(),1);function ffe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:s}){let{prefix:l,suffix:c}=i||{};return(0,dfe.jsx)(md,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s,prefix:l?(0,rW.createElement)(l):void 0,suffix:c?(0,rW.createElement)(c):void 0})}var pfe=a(G(),1),mfe=a(U(),1);var hfe=a(E(),1),{ValidatedToggleControl:UUe}=_t(pfe.privateApis);function gfe({field:e,onChange:t,data:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:s,description:l,getValue:c,setValue:u,isValid:d}=e,f=e.isDisabled({item:r,field:e}),m=(0,mfe.useCallback)(()=>{t(u({item:r,value:!c({item:r})}))},[t,u,r,c]);return(0,hfe.jsx)(UUe,{required:!!d.required,markWhenOptional:n,customValidity:wr(d,i),hidden:o,label:s,help:l,checked:c({item:r}),onChange:m,disabled:f})}var vfe=a(G(),1),bfe=a(U(),1);var yfe=a(E(),1),{ValidatedTextareaControl:WUe}=_t(vfe.privateApis);function wfe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:s}){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,bfe.useCallback)(b=>r(m({item:e,value:b})),[e,r,m]);return(0,yfe.jsx)(WUe,{required:!!h.required,markWhenOptional:n,customValidity:wr(h,s),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 Efe=a(U(),1);var s_=a(G(),1),Lh=a(Te(),1),ll=a(U(),1),H5=a(hd(),1);var GUe=[];function Sfe({allowedFormats:e,disableFormats:t}){return t?GUe:e}var z5=a(hd(),1),xfe=a(E(),1),Cfe=a(_e(),1),YUe={};function qUe({onChange:e,onFocus:t,value:r,forwardedRef:o,settings:n,isVisible:i}){let{name:s,edit:l}=n;if(!l)return null;let c=(0,z5.getActiveFormat)(r,s),u=c!==void 0,d=(0,z5.getActiveObject)(r),f=d!==void 0&&d.type===s;return(0,xfe.jsx)(l,{isActive:u,isVisible:i,activeAttributes:u?c.attributes||{}:{},isObjectActive:f,activeObjectAttributes:f?d.attributes||{}:{},value:r,onChange:e,onFocus:t,contentRef:o,context:YUe},s)}function Tfe({formatTypes:e,...t}){return e.map(r=>(0,Cfe.createElement)(qUe,{settings:r,...t,key:r.name}))}var Dh=a(E(),1),{ValidatedContentEditableControl:KUe,withIgnoreIMEEvents:ZUe}=_t(s_.privateApis),{useRichText:XUe,KeyboardShortcutContext:QUe,InputEventContext:JUe,shortcutsListener:$Ue,inputEventsListener:eWe}=_t(H5.privateApis),tWe=[];function U5({label:e,value:t,onChange:r,placeholder:o,id:n,clientId:i,className:s,hideLabelFromVision:l,help:c,disabled:u,required:d,markWhenOptional:f,customValidity:m,allowedFormats:h,disableFormats:g,withoutInteractiveFormatting:v,preserveWhiteSpace:b,disableLineBreaks:_,focusOnMount:y,completers:w=tWe}){let[S,x]=(0,ll.useState)({start:void 0,end:void 0}),[C,A]=(0,ll.useState)(!1),k=(0,ll.useRef)(void 0),R=(0,ll.useRef)(new Set),M=(0,ll.useRef)(new Set),P=(0,Lh.__experimentalUseFocusOutside)(()=>A(!1)),T=Sfe({allowedFormats:h,disableFormats:g}),{value:N,onChange:L,ref:F,formatTypes:D,getValue:z}=XUe({value:t,onChange:r,selectionStart:S.start,selectionEnd:S.end,onSelectionChange:(fe,pe)=>x({start:fe,end:pe}),__unstableIsSelected:C,preserveWhiteSpace:!!b,placeholder:o,__unstableDisableFormats:g,allowedFormats:T,withoutInteractiveFormatting:v,__unstableFormatTypeHandlerContext:(0,ll.useMemo)(()=>({richTextIdentifier:n,blockClientId:i}),[n,i])});function B(){k.current?.focus()}let O=(0,ll.useRef)({keyboardShortcuts:M,inputEvents:R}),V=(0,ll.useRef)({formatTypes:D,getValue:z,onChange:L});(0,ll.useInsertionEffect)(()=>{V.current={formatTypes:D,getValue:z,onChange:L}});let W=(0,Lh.useRefEffect)(fe=>{if(u)return;let pe=ZUe($=>{if($.key!=="Enter"||$.defaultPrevented||$.metaKey||$.ctrlKey||($.preventDefault(),_))return;let{getValue:te,onChange:de}=V.current,ve=te();de((0,H5.insert)(ve,`
`,ve.start??ve.text.length,ve.end??ve.text.length))});return fe.addEventListener("keydown",pe),()=>fe.removeEventListener("keydown",pe)},[_,u]),q=(0,Lh.useRefEffect)(fe=>{if(!C)return;let pe=$Ue(O)(fe),$=eWe(O)(fe);function te(de){if(de.inputType!=="insertText"&&de.type!=="compositionend")return;let{formatTypes:ve,getValue:we,onChange:oe}=V.current,ee=we(),ue=ve.reduce((ie,{__unstableInputRule:le})=>le?le(ie):ie,ee);ue!==ee&&oe({...ue,activeFormats:ee.activeFormats})}return fe.addEventListener("input",te),fe.addEventListener("compositionend",te),()=>{pe(),$(),fe.removeEventListener("input",te),fe.removeEventListener("compositionend",te)}},[C]),{ref:Z,...Q}=(0,s_.__unstableUseAutocompleteProps)({completers:w,record:N,onChange:L,onReplace:()=>{}}),ce=(0,Lh.useRefEffect)(fe=>{y&&!u&&fe.focus()},[y,u]),re=(0,Lh.useMergeRefs)([F,k,q,W,ce,Z]);return(0,Dh.jsx)("div",{...P,onFocus:fe=>{A(!0),P.onFocus(fe)},children:(0,Dh.jsxs)(s_.SlotFillProvider,{children:[(0,Dh.jsx)(KUe,{label:e,id:n,className:J("dataviews-controls__richtext",s),placeholder:o,hideLabelFromVision:l,help:c,disabled:u,required:d,markWhenOptional:f,customValidity:m,value:N.text,"aria-multiline":!_,...Q,ref:re}),C&&!u&&(0,Dh.jsx)(QUe.Provider,{value:M,children:(0,Dh.jsx)(JUe.Provider,{value:R,children:(0,Dh.jsx)(Tfe,{value:N,onChange:L,onFocus:B,formatTypes:D,forwardedRef:k,isVisible:!0})})})]})})}var Pfe=a(E(),1);function kfe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:s}){let{className:l,clientId:c,allowedFormats:u,disableFormats:d,withoutInteractiveFormatting:f,preserveWhiteSpace:m,disableLineBreaks:h}=i||{},g=t.isDisabled({item:e,field:t}),{label:v,placeholder:b,description:_,id:y,setValue:w,isValid:S}=t,x=t.getValue({item:e})??"",C=(0,Efe.useCallback)(A=>r(w({item:e,value:A})),[e,r,w]);return(0,Pfe.jsx)(U5,{label:v,value:x,onChange:C,placeholder:b,id:y,hideLabelFromVision:o,help:_,disabled:g,required:!!S.required,markWhenOptional:n,customValidity:wr(S,s),className:l,clientId:c,allowedFormats:u,disableFormats:d,withoutInteractiveFormatting:f,preserveWhiteSpace:m,disableLineBreaks:h})}var a_=a(G(),1),Rfe=a(U(),1);var W5=a(E(),1),{ValidatedToggleGroupControl:rWe}=_t(a_.privateApis);function Afe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{getValue:s,setValue:l,isValid:c}=t,u=t.isDisabled({item:e,field:t}),d=s({item:e}),f=(0,Rfe.useCallback)(v=>r(l({item:e,value:v})),[e,r,l]),{elements:m,isLoading:h}=Kn({elements:t.elements,getElements:t.getElements});if(h)return(0,W5.jsx)(a_.Spinner,{});if(m.length===0)return null;let g=m.find(v=>v.value===d);return(0,W5.jsx)(rWe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:wr(c,i),isBlock:!0,label:t.label,help:g?.description||t.description,onChange:f,value:d,hideLabelFromVision:o,children:m.map(v=>(0,W5.jsx)(a_.__experimentalToggleGroupControlOption,{label:v.label,value:v.value,disabled:u},v.value))})}var G5=a(G(),1),Y5=a(U(),1);var zT=a(E(),1),{ValidatedFormTokenField:oWe}=_t(G5.privateApis);function Ife({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:s,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}=Kn({elements:t.elements,getElements:t.getElements}),b=(0,Y5.useMemo)(()=>Array.isArray(m)?m.map(y=>g?.find(S=>S.value===y)||{value:y,label:y}):[],[m,g]),_=(0,Y5.useCallback)(y=>{let w=y.map(S=>typeof S=="object"&&"value"in S?S.value:S);r(d({item:e,value:w}))},[r,d,e]);return v?(0,zT.jsx)(G5.Spinner,{}):(0,zT.jsx)(oWe,{required:!!f?.required,markWhenOptional:n,customValidity:wr(f,i),label:o?void 0:s,value:b,onChange:_,placeholder:l,suggestions:g?.map(y=>y.value),disabled:h,__experimentalValidateInput:y=>t.isValid?.elements&&g?g.some(w=>w.value===y||w.label===y):!0,__experimentalExpandOnFocus:g&&g.length>0,help:c??(t.isValid?.elements?"":void 0),displayTransform:y=>typeof y=="object"&&"label"in y?y.label:typeof y=="string"&&g&&g.find(S=>S.value===y)?.label||y,__experimentalRenderItem:({item:y})=>{if(typeof y=="string"&&g){let w=g.find(S=>S.value===y);return(0,zT.jsx)("span",{children:w?.label||y})}return(0,zT.jsx)("span",{children:y})}})}var ba=a(G(),1),oW=a(U(),1),Ofe=a(j(),1);var sp=a(E(),1),{ValidatedInputControl:nWe}=_t(ba.privateApis),iWe=({color:e,onColorChange:t,disabled:r})=>{let o=e&&Oo(e).isValid()?e:"#ffffff";return(0,sp.jsx)(ba.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:n})=>(0,sp.jsx)(ba.Button,{onClick:n,"aria-label":(0,Ofe.__)("Open color picker"),size:"small",disabled:r,accessibleWhenDisabled:!0,icon:()=>(0,sp.jsx)(ba.ColorIndicator,{colorValue:o})}),renderContent:()=>(0,sp.jsx)(ba.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,sp.jsx)(ba.ColorPicker,{color:o,onChange:t,enableAlpha:!0})})})};function Nfe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:s,placeholder:l,description:c,setValue:u,isValid:d}=t,f=t.isDisabled({item:e,field:t}),m=t.getValue({item:e})||"",h=(0,oW.useCallback)(v=>{r(u({item:e,value:v}))},[e,r,u]),g=(0,oW.useCallback)(v=>{r(u({item:e,value:v||""}))},[e,r,u]);return(0,sp.jsx)(nWe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:wr(d,i),label:s,placeholder:l,value:m,help:c,onChange:g,hideLabelFromVision:o,type:"text",disabled:f,prefix:(0,sp.jsx)(ba.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,sp.jsx)(iWe,{color:m,onColorChange:h,disabled:f})})})}var K5=a(G(),1),Z5=a(U(),1),nW=a(j(),1);var q5=a(E(),1);function Mfe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let[s,l]=(0,Z5.useState)(!1),c=t.isDisabled({item:e,field:t}),u=(0,Z5.useCallback)(()=>{l(d=>!d)},[]);return(0,q5.jsx)(md,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:s?"text":"password",suffix:(0,q5.jsx)(K5.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,q5.jsx)(K5.Button,{icon:s?R1:mv,onClick:u,size:"small",label:s?(0,nW.__)("Hide password"):(0,nW.__)("Show password"),disabled:c,accessibleWhenDisabled:!0})})})}function X5(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var Dfe=a(E(),1),Ffe={adaptiveSelect:Qde,array:Ife,checkbox:Hde,color:Nfe,combobox:E5,datetime:Yde,date:Zde,email:tfe,telephone:rfe,url:ofe,integer:sfe,number:lfe,password:Mfe,radio:ufe,select:I5,text:ffe,toggle:gfe,textarea:wfe,richtext:kfe,toggleGroup:Afe};function sWe(e){return e&&typeof e=="object"&&typeof e.control=="string"}function aWe(e){let{control:t,...r}=e,o=Q5(t);return o===null?null:function(i){return(0,Dfe.jsx)(o,{...i,config:r})}}function Lfe(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?Q5(e.Edit):sWe(e.Edit)?aWe(e.Edit):X5(e)&&e.type!=="array"?Q5("adaptiveSelect"):t===null?null:Q5(t)}function Q5(e){return Object.keys(Ffe).includes(e)?Ffe[e]:null}function lWe(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 Bfe=lWe;var cWe=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},Vfe=cWe;var uWe=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},jfe=uWe;var Hfe=a(j(),1);function J5({item:e,field:t}){let{elements:r,isLoading:o}=Kn({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 zfe=a(E(),1);function Vo({item:e,field:t}){return t.hasElements?(0,zfe.jsx)(J5,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var gd=(e,t,r)=>r==="asc"?e.localeCompare(t):t.localeCompare(e);function jo(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)}function vd(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 bd(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 yd(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 jr(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 dWe({item:e,field:t}){return t.getValue({item:e})}var Ns=dWe;var fWe=/^[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 pWe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!fWe.test(r)?(0,Hfe.__)("Value must be a valid email address."):null}var Ufe={type:"email",render:Vo,Edit:"email",sort:gd,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[io,so],validOperators:[_o,So,Zu,Xu,Qu,io,so,Yi,Yn],format:{},getValueFormatted:Ns,validate:{required:jo,pattern:yd,minLength:vd,maxLength:bd,elements:jr,custom:pWe}};var Wfe=a(j(),1);var l_=(e,t,r)=>r==="asc"?e-t:t-e;function $5(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 eN(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 Gfe={separatorThousand:","};function mWe({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=Gfe: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 hWe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Number.isInteger(r)?(0,Wfe.__)("Value must be an integer."):null}var Yfe={type:"integer",render:Vo,Edit:"integer",sort:l_,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[_o,So,ah,lh,ch,uh,ks],validOperators:[_o,So,ah,lh,ch,uh,ks,io,so,Yi,Yn],format:Gfe,getValueFormatted:mWe,validate:{required:jo,min:$5,max:eN,elements:jr,custom:hWe}};var qfe=a(j(),1);var Kfe={separatorThousand:",",separatorDecimal:".",decimals:2};function gWe({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=Kfe:o=t.format;let{separatorThousand:n,separatorDecimal:i,decimals:s}=o,l=r.toFixed(s),[c,u]=l.split("."),d=n?c.replace(/\B(?=(\d{3})+(?!\d))/g,n):c;return s===0?d:d+i+u}function vWe(e){return e===""||e===void 0||e===null}function bWe(e,t){let r=t.getValue({item:e});return!vWe(r)&&!Number.isFinite(r)?(0,qfe.__)("Value must be a number."):null}var Zfe={type:"number",render:Vo,Edit:"number",sort:l_,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[_o,So,ah,lh,ch,uh,ks],validOperators:[_o,So,ah,lh,ch,uh,ks,io,so,Yi,Yn],format:Kfe,getValueFormatted:gWe,validate:{required:jo,min:$5,max:eN,elements:jr,custom:bWe}};var Xfe={type:"text",render:Vo,Edit:"text",sort:gd,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[io,so],validOperators:[_o,So,Zu,Xu,Qu,io,so,Yi,Yn],format:{},getValueFormatted:Ns,validate:{required:jo,pattern:yd,minLength:vd,maxLength:bd,elements:jr}};var Ab=a(ln(),1);var Jfe=a(ln(),1);function Qfe(e){if(!e||!ep(new Date(e)))return null;let t=(0,Jfe.getDate)(e);return t&&ep(t)?t:null}function $fe(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 s=Qfe(o),l=Qfe(String(i));return!!s&&!!l&&(r==="min"?l.getTime()>=s.getTime():l.getTime()<=s.getTime())}function tN(e,t){return $fe(e,t,"min")}function rN(e,t){return $fe(e,t,"max")}var epe={datetime:(0,Ab.getSettings)().formats.datetime,weekStartsOn:(0,Ab.getSettings)().l10n.startOfWeek};function yWe({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="datetime"?o=epe:o=t.format,(0,Ab.dateI18n)(o.datetime,(0,Ab.getDate)(r))}var wWe=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},tpe={type:"datetime",render:Vo,Edit:"datetime",sort:wWe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[hh,gh,dh,fh,ph,mh,Rs,fa],validOperators:[hh,gh,dh,fh,ph,mh,Rs,fa],format:epe,getValueFormatted:yWe,validate:{required:jo,elements:jr,min:tN,max:rN}};var Ib=a(ln(),1);var rpe={date:(0,Ib.getSettings)().formats.date,weekStartsOn:(0,Ib.getSettings)().l10n.startOfWeek};function _We({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="date"?o=rpe:o=t.format,(0,Ib.dateI18n)(o.date,(0,Ib.getDate)(r))}var SWe=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},ope={type:"date",render:Vo,Edit:"date",sort:SWe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[hh,gh,dh,fh,ph,mh,Rs,fa,ks],validOperators:[hh,gh,dh,fh,ph,mh,Rs,fa,ks],format:rpe,getValueFormatted:_We,validate:{required:jo,elements:jr,min:tN,max:rN}};var oN=a(j(),1);function npe(e,t){return t.getValue({item:e})===!0}function xWe({item:e,field:t}){let r=t.getValue({item:e});return r===!0?(0,oN.__)("True"):r===!1?(0,oN.__)("False"):""}function CWe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&![!0,!1].includes(r)?(0,oN.__)("Value must be true, false, or undefined"):null}var TWe=(e,t,r)=>{let o=!!e;return o===!!t?0:r==="asc"?o?1:-1:o?-1:1},ipe={type:"boolean",render:Vo,Edit:"checkbox",sort:TWe,validate:{required:npe,elements:jr,custom:CWe},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[_o,So],validOperators:[_o,So],format:{},getValueFormatted:xWe};var spe={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:Ns,validate:{}};var iW=a(j(),1);function ape(e,t){let r=t.getValue({item:e});return Array.isArray(r)&&r.length>0&&r.every(o=>![void 0,"",null].includes(o))}function lpe({item:e,field:t}){let r=t.getValue({item:e});return(Array.isArray(r)?r:[]).join(", ")}function EWe({item:e,field:t}){return lpe({item:e,field:t})}function PWe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Array.isArray(r)?(0,iW.__)("Value must be an array."):r.every(o=>typeof o=="string")?null:(0,iW.__)("Every value must be a string.")}var kWe=(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(","),s=n.join(",");return r==="asc"?i.localeCompare(s):s.localeCompare(i)},cpe={type:"array",render:EWe,Edit:"array",sort:kWe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[io,so],validOperators:[io,so,Yi,Yn],format:{},getValueFormatted:lpe,validate:{required:ape,elements:jr,custom:PWe}};function RWe({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var upe={type:"password",render:Vo,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:RWe,validate:{required:jo,pattern:yd,minLength:vd,maxLength:bd,elements:jr}};var dpe={type:"telephone",render:Vo,Edit:"telephone",sort:gd,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[io,so],validOperators:[_o,So,Zu,Xu,Qu,io,so,Yi,Yn],format:{},getValueFormatted:Ns,validate:{required:jo,pattern:yd,minLength:vd,maxLength:bd,elements:jr}};var fpe=a(j(),1);var c_=a(E(),1);function AWe({item:e,field:t}){if(t.hasElements)return(0,c_.jsx)(J5,{item:e,field:t});let r=Ns({item:e,field:t});return!r||!Oo(r).isValid()?r:(0,c_.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,c_.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:r,border:"1px solid #ddd",flexShrink:0}}),(0,c_.jsx)("span",{children:r})]})}function IWe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Oo(r).isValid()?(0,fpe.__)("Value must be a valid color."):null}var OWe=(e,t,r)=>{let o=Oo(e),n=Oo(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(),s=n.toHsl();return i.h!==s.h?r==="asc"?i.h-s.h:s.h-i.h:i.s!==s.s?r==="asc"?i.s-s.s:s.s-i.s:r==="asc"?i.l-s.l:s.l-i.l},ppe={type:"color",render:AWe,Edit:"color",sort:OWe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[io,so],validOperators:[_o,So,io,so],format:{},getValueFormatted:Ns,validate:{required:jo,elements:jr,custom:IWe}};var mpe={type:"url",render:Vo,Edit:"url",sort:gd,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[io,so],validOperators:[_o,So,Zu,Xu,Qu,io,so,Yi,Yn],format:{},getValueFormatted:Ns,validate:{required:jo,pattern:yd,minLength:vd,maxLength:bd,elements:jr}};var NWe=(e,t,r)=>typeof e=="number"&&typeof t=="number"?l_(e,t,r):gd(e,t,r),hpe={render:Vo,Edit:null,sort:NWe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[_o,So],validOperators:pde(),format:{},getValueFormatted:Ns,validate:{required:jo,elements:jr}};function MWe(e){return e==="integer"||e==="number"}function FWe(e){return e==="date"||e==="datetime"}function gpe(e,t,r){let o=t.validate[r];if(o&&(typeof e=="number"&&MWe(t.type)||typeof e=="string"&&FWe(t.type)))return{constraint:e,validate:o}}function vpe(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=gpe(r?.min,t,"min"),s=gpe(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:s,minLength:c,maxLength:d,pattern:m,custom:h}}function bpe(e){return e.validOperators.reduce((t,r)=>{let o=kb(r);return o?.filter&&(t[r]=o.filter),t},{})}function DWe(e,t){return{...t.format,...e.format}}var ype=DWe;function LWe(e){let t=[Ufe,Yfe,Zfe,Xfe,tpe,ope,ipe,spe,cpe,upe,dpe,ppe,mpe].find(r=>r?.type===e);return t||hpe}function ap(e){return e.map(t=>{let r=LWe(t.type),o=t.getValue||Vfe(t.id),n=function(i,s,l){let c=o({item:i}),u=o({item:s});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||jfe(t.id),elements:t.elements,getElements:t.getElements,hasElements:X5(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:Lfe(t,r.Edit),sort:n,enableSorting:t.enableSorting??r.enableSorting,enableGlobalSearch:t.enableGlobalSearch??r.enableGlobalSearch,isValid:vpe(t,r),filterBy:Bfe(t,r.defaultOperators,r.validOperators),filter:bpe(r),format:ype(t,r),getValueFormatted:t.getValueFormatted??r.getValueFormatted}})}var yi=a(U(),1);function wpe({view:e,data:t,getItemId:r,isLoading:o,paginationInfo:n,selection:i}){let s=e.infiniteScrollEnabled,[l,c]=(0,yi.useState)(!o);(0,yi.useEffect)(()=>{o||c(!0)},[o]);let u=(0,yi.useRef)(t),d=(0,yi.useRef)(n);(0,yi.useEffect)(()=>{o||(u.current=t,d.current=n)},[t,o,n]);let[f,m]=(0,yi.useState)([]),h=(0,yi.useRef)(new Map),g=(0,yi.useRef)([]),v=(0,yi.useRef)({search:void 0,filters:void 0,perPage:void 0}),b=(0,yi.useRef)(void 0),_=(0,yi.useRef)(void 0),y=(0,yi.useRef)(!1),w=(0,yi.useMemo)(()=>{e.startPosition!==void 0&&_.current!==void 0&&(e.startPosition<_.current?b.current="up":e.startPosition>_.current&&(b.current="down")),_.current=e.startPosition;let S=JSON.stringify(e.filters??[]),x=v.current.filters,C=!y.current||!e.infiniteScrollEnabled||e.search!==v.current.search||S!==x||e.perPage!==v.current.perPage;if(y.current=!0,v.current={search:e.search,filters:S,perPage:e.perPage},C){h.current.clear(),b.current=void 0;let F=e.search?1:e.startPosition??1,D=t.map((z,B)=>{let O=F+B;return h.current.set(r(z),O),{...z,position:O}});return g.current=D,D}let A=g.current,k=new Set(t.map(r)),R=b.current,M=e.search?1:e.startPosition??1,P=t.map((F,D)=>{let z=r(F),B=e.infiniteScrollEnabled?M+D:void 0;return B!==void 0&&h.current.set(z,B),{...F,position:B}});if(P.length===0)return A;let T=A.filter(F=>!k.has(r(F))),N=R==="up"?[...P,...T]:[...T,...P];N.sort((F,D)=>{let z=F.position,B=D.position;return z-B});let L=N;if(f.length>0){let F=Math.min(...f),D=Math.max(...f),z=20,B=N.map(q=>q.position),O=Math.min(...B);!(Math.max(...B)<F-z||O>D+z)&&(L=N.filter(q=>{let Z=r(q);if(i?.includes(Z))return!0;let ce=q.position;return R==="up"?ce<=D+z:R==="down"?ce>=F-z:ce>=F-z&&ce<=D+z}))}return g.current=L,L},[t,e.search,e.filters,e.perPage,e.startPosition,e.infiniteScrollEnabled,f,i,r]);return s?{data:w,paginationInfo:n,hasInitiallyLoaded:l,setVisibleEntries:m}:{data:(o&&u.current?.length?u.current:t).map(x=>({...x,position:void 0})),paginationInfo:o&&u.current?.length?d.current:n,hasInitiallyLoaded:l,setVisibleEntries:void 0}}var Ms=a(U(),1),Spe=a(Te(),1);function _pe(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 s=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,b=Math.abs(v-n);return h<b?d:u}),l=Number(s.getAttribute("aria-posinset")),c=s.getBoundingClientRect();return t.current={posinset:l,viewportOffset:c.top-o.top,scrollTop:e.scrollTop,direction:r},!0}function xpe({view:e,onChangeView:t,isLoading:r,paginationInfo:o,containerRef:n,setVisibleEntries:i}){let s=(0,Ms.useRef)(null),l=(0,Ms.useRef)(e),c=(0,Ms.useRef)(r),u=(0,Ms.useRef)(t),d=(0,Ms.useRef)(o.totalItems);(0,Ms.useLayoutEffect)(()=>{l.current=e,c.current=r,u.current=t,d.current=o.totalItems},[e,r,t,o.totalItems]);let f=(0,Ms.useCallback)(h=>{i&&i(g=>{let v=new Set(g),b=!1;return h.forEach(_=>{let y=Number(_.target?.attributes?.getNamedItem("aria-posinset")?.value);isNaN(y)||(_.isIntersecting?v.has(y)||(v.add(y),b=!0):v.has(y)&&(v.delete(y),b=!0))}),b?Array.from(v).sort():g})},[i]);(0,Ms.useLayoutEffect)(()=>{let h=n.current,g=s.current;if(!h||!e.infiniteScrollEnabled||!g||r)return;let v=h.querySelector(`[aria-posinset="${g.posinset}"]`);if(v){let b=h.getBoundingClientRect(),w=v.getBoundingClientRect().top-b.top-g.viewportOffset+(h.scrollTop-g.scrollTop);Math.abs(w)>1&&(h.scrollTop+=w)}s.current=null},[n,r,e.infiniteScrollEnabled]);let m=(0,Ms.useRef)(null);return(0,Ms.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,Ms.useEffect)(()=>{if(!e.infiniteScrollEnabled||!n.current)return;let h=0,g=600,v=800,b=(0,Spe.throttle)(y=>{let w=l.current,S=d.current,x=y.target,C=x.scrollTop,A=x.scrollHeight,k=x.clientHeight,R=C>h?"down":"up";if(h=C,c.current)return;let M=w.startPosition||1,P=w.perPage||10,T=Math.min(M+P,S);if(R==="down"&&C+k>=A-g&&T<S){let N=T;_pe(x,s,"down"),u.current({...w,startPosition:N})}if(R==="up"&&C<=v&&M>1){let N=M-P,L=N<6?1:N;_pe(x,s,"up"),u.current({...w,startPosition:L})}},50),_=n.current;return _.addEventListener("scroll",b),()=>{_.removeEventListener("scroll",b),b.cancel()}},[n,e.infiniteScrollEnabled]),{intersectionObserver:m.current}}var ya=a(U(),1),Cpe=a(Te(),1);var wi=a(E(),1),BWe=()=>!1,VWe=Th.filter(e=>e.isPicker),jWe=e=>e.id,zWe=[],HWe={pickerGrid:!0,pickerTable:!0};function UWe({search:e=!0,searchLabel:t=void 0}){let{view:r}=(0,ya.useContext)(et),o=r.infiniteScrollEnabled;return(0,wi.jsxs)(wi.Fragment,{children:[(0,wi.jsxs)(se,{direction:"row",align:"top",justify:"space-between",className:J("dataviews__view-actions",{"dataviews__view-actions--infinite-scroll":o}),gap:"xs",children:[(0,wi.jsxs)(se,{direction:"row",gap:"sm",justify:"start",className:"dataviews__search",children:[e&&(0,wi.jsx)(WU,{label:t}),(0,wi.jsx)(x5,{})]}),(0,wi.jsx)(se,{direction:"row",gap:"xs",style:{flexShrink:0},children:(0,wi.jsx)(Bde,{})})]}),(0,wi.jsx)(C5,{className:"dataviews-filters__container"}),(0,wi.jsx)(UU,{}),(0,wi.jsx)($H,{})]})}function WWe({view:e,onChangeView:t,fields:r,search:o=!0,searchLabel:n=void 0,actions:i=zWe,data:s,getItemId:l=jWe,isLoading:c=!1,paginationInfo:u,defaultLayouts:d=HWe,selection:f,onChangeSelection:m,children:h,config:g={perPageSizes:[10,20,50,100]},itemListLabel:v,empty:b,onReset:_}){let{data:y,setVisibleEntries:w}=wpe({view:e,data:s,getItemId:l,selection:f,paginationInfo:u}),S=(0,ya.useRef)(null),[x,C]=(0,ya.useState)(0),A=(0,Cpe.useResizeObserver)(B=>{C(B[0].borderBoxSize[0].inlineSize)},{box:"border-box"}),[k,R]=(0,ya.useState)(null);function M(B){let O=typeof B=="function"?B(f):B;m&&m(O)}let P=(0,ya.useMemo)(()=>ap(r),[r]),T=MT(P,e),N=(0,ya.useMemo)(()=>(T||[]).some(B=>B.isPrimary||B.isLocked),[T]),[L,F]=(0,ya.useState)(N),{intersectionObserver:D}=xpe({view:e,onChangeView:t,isLoading:c,paginationInfo:u,containerRef:S,setVisibleEntries:w});(0,ya.useEffect)(()=>{N&&!L&&F(!0)},[N,L]);let z=(0,ya.useMemo)(()=>Object.fromEntries(Object.entries(d).filter(([B])=>VWe.some(O=>O.type===B)).map(([B,O])=>[B,O===!0?{}:O])),[d]);return z[e.type]?(0,wi.jsx)(et.Provider,{value:{view:e,onChangeView:t,fields:P,actions:i,data:y,isLoading:c,paginationInfo:u,isItemClickable:BWe,selection:f,onChangeSelection:M,openedFilter:k,setOpenedFilter:R,getItemId:l,containerWidth:x,containerRef:S,resizeObserverRef:A,defaultLayouts:z,filters:T,isShowingFilter:L,setIsShowingFilter:F,config:g,itemListLabel:v,empty:b,onReset:_,hasInitiallyLoaded:!0,intersectionObserver:D},children:(0,wi.jsx)("div",{className:"dataviews-picker-wrapper",children:h??(0,wi.jsx)(UWe,{search:o,searchLabel:n})})}):null}var Wc=WWe;Wc.BulkActionToolbar=vle;Wc.Footer=$H;Wc.Filters=DT;Wc.FiltersToggled=C5;Wc.FiltersToggle=x5;Wc.Layout=UU;Wc.LayoutSwitcher=qU;Wc.Pagination=QH;Wc.Search=WU;Wc.ViewConfig=KU;var lp=Wc;var dW=a(U(),1);var Tpe=a(U(),1),Epe=a(E(),1),sW=(0,Tpe.createContext)({fields:[]});sW.displayName="DataFormContext";function Ppe({fields:e,children:t}){return(0,Epe.jsx)(sW.Provider,{value:{fields:e},children:t})}var Wl=sW;var pN=a(U(),1);var iN=a(U(),1),UT=a(G(),1);var HT=a(j(),1),$i={type:"regular",labelPosition:"top"},GWe=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 kpe(e){let t=$i;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,HT.__)("Apply"),cancelLabel:n.cancelLabel?.trim()||(0,HT.__)("Cancel")}:n==="modal"?i={type:"modal",applyLabel:(0,HT.__)("Apply"),cancelLabel:(0,HT.__)("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:GWe(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 Rpe(e){let t=kpe(e?.layout),r=(e.fields??[]).map(o=>{if(typeof o=="string")return{id:o,layout:t};let n=o.layout?kpe(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:Rpe({fields:o.children,layout:$i}).fields}}});return{layout:t,fields:r}}var nN=Rpe;var ao=a(E(),1);function YWe({title:e}){return(0,ao.jsx)(se,{direction:"column",className:"dataforms-layouts-regular__header",gap:"lg",children:(0,ao.jsx)(se,{direction:"row",align:"center",children:(0,ao.jsx)(UT.__experimentalHeading,{level:2,size:13,children:e})})})}function Ape({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{fields:s}=(0,iN.useContext)(Wl),l=t.layout,c=(0,iN.useMemo)(()=>({layout:$i,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,ao.jsxs)(ao.Fragment,{children:[!o&&t.label&&(0,ao.jsx)(YWe,{title:t.label}),(0,ao.jsx)(wa,{data:e,form:c,onChange:r,validity:i?.children})]});let u=l.labelPosition,d=s.find(f=>f.id===t.id);return!d||!d.Edit?null:u==="side"?(0,ao.jsxs)(se,{direction:"row",className:"dataforms-layouts-regular__field",gap:"sm",children:[(0,ao.jsx)("div",{className:J("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${u}`),children:(0,ao.jsx)(UT.BaseControl.VisualLabel,{children:d.label})}),(0,ao.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:d.readOnly===!0?(0,ao.jsx)(d.render,{item:e,field:d}):(0,ao.jsx)(d.Edit,{data:e,field:d,onChange:r,hideLabelFromVision:!0,markWhenOptional:n,validity:i},d.id)})]}):(0,ao.jsx)("div",{className:"dataforms-layouts-regular__field",children:d.readOnly===!0?(0,ao.jsx)(ao.Fragment,{children:(0,ao.jsxs)(ao.Fragment,{children:[!o&&u!=="none"&&(0,ao.jsx)(UT.BaseControl.VisualLabel,{children:d.label}),(0,ao.jsx)(d.render,{item:e,field:d})]})}):(0,ao.jsx)(d.Edit,{data:e,field:d,onChange:r,hideLabelFromVision:u==="none"?!0:o,markWhenOptional:n,validity:i})})}var cW=a(b2(),1),Ob=a(G(),1),Gc=a(U(),1),cN=a(Te(),1);var sN=a(G(),1),u_=a(j(),1);var Dpe=a(Te(),1);var aW=a(U(),1);function qWe(e,t){return J("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${e}`,{"has-error":t})}var Ipe=qWe;var Ope=a(G(),1);var Bh=a(E(),1);function KWe(e,t,r){return e?(0,Bh.jsxs)(Ze.Root,{children:[(0,Bh.jsx)(Ze.Trigger,{render:(0,Bh.jsxs)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:[(0,Bh.jsx)(Ope.Icon,{icon:_f,size:16}),(0,Bh.jsxs)(Gt,{children:[t,": "]}),r]})}),(0,Bh.jsx)(Ze.Popup,{children:t})]}):r}var Npe=KWe;function Mpe(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=Mpe(r);if(o)return o}}var Fpe=Mpe;var Fs=a(E(),1);function WT({data:e,field:t,fieldLabel:r,summaryFields:o,validity:n,touched:i,disabled:s,isOpen:l,onClick:c}){let{labelPosition:u,editVisibility:d}=t.layout,f=Fpe(n),m=i&&!!f,h=Ipe(u,m),g=Npe(m,f,r),v=J("dataforms-layouts-panel__field-trigger",`dataforms-layouts-panel__field-trigger--label-${u}`,{"is-disabled":s,"dataforms-layouts-panel__field-trigger--edit-always":d==="always"}),b=(0,Dpe.useInstanceId)(WT,"dataforms-layouts-panel__field-control"),_=m?(0,u_.sprintf)((0,u_._x)("Edit %s (has errors)","field"),r||""):(0,u_.sprintf)((0,u_._x)("Edit %s","field"),r||""),y=(0,aW.useRef)(null),w=(0,aW.useRef)(null);return(0,Fs.jsxs)("div",{ref:y,className:v,onClick:s?void 0:C=>{!l&&C.detail<2&&!w.current?.contains(C.target)&&y.current?.ownerDocument.defaultView?.getSelection()?.toString()||c()},onKeyDown:s?void 0:C=>{C.target===C.currentTarget&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),c())},children:[u!=="none"&&(0,Fs.jsx)("span",{className:h,children:g}),u==="none"&&m&&(0,Fs.jsxs)(Ze.Root,{children:[(0,Fs.jsx)(Ze.Trigger,{render:(0,Fs.jsx)("span",{className:"dataforms-layouts-panel__field-label-error-content",role:"img","aria-label":f,children:(0,Fs.jsx)(sN.Icon,{icon:_f,size:16})})}),(0,Fs.jsx)(Ze.Popup,{children:f})]}),(0,Fs.jsx)("span",{id:`${b}`,className:"dataforms-layouts-panel__field-control",children:o.length>1?(0,Fs.jsx)("span",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:o.map(C=>(0,Fs.jsx)("span",{style:{width:"100%"},children:(0,Fs.jsx)(C.render,{item:e,field:C})},C.id))}):o.map(C=>(0,Fs.jsx)(C.render,{item:e,field:C},C.id))}),!s&&(0,Fs.jsx)(sN.Button,{ref:w,className:"dataforms-layouts-panel__field-trigger-icon",label:_,icon:_1,size:"small","aria-expanded":l,"aria-haspopup":"dialog","aria-describedby":`${b}`})]})}var Lpe=a(b2(),1),lW=a(v2(),1),wd=a(U(),1),Ds=a(j(),1);function Bpe(e){return e?Object.values(e).every(t=>Object.entries(t).every(([r,o])=>r==="children"&&o&&typeof o=="object"?Bpe(o):o.type!=="invalid"&&o.type!=="validating")):!0}function ZWe(e,t){let r=nN(e);if(r.fields.length===0)return[];let o=new Map;t.forEach(s=>{o.set(s.id,s)});function n(s){if("children"in s&&Array.isArray(s.children)){let u=s.children.map(n).filter(f=>f!==null);if(u.length===0)return null;let d=o.get(s.id);if(d){let[f]=ap([d]);return{id:s.id,children:u,field:f}}return{id:s.id,children:u}}let l=o.get(s.id);if(!l)return null;let[c]=ap([l]);return{id:s.id,children:[],field:c}}return r.fields.map(n).filter(s=>s!==null)}function d_(e,t,r){if(e||(e={}),r.length===0)return e;let o={...e},n=o;for(let s=0;s<r.length-1;s++){let l=r[s];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 Vpe(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 s={...n[i]};if(delete s[r],Object.keys(s).length===0?delete n[i]:n[i]=s,Object.keys(o).length!==0)return o}function XWe(e,t,r){let{elementsCounterRef:o,setFormValidity:n,path:i,item:s}=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=>d_(u,{elements:{type:"invalid",message:(0,Ds.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(s,{...t.field,elements:c})?n(u=>d_(u,{elements:{type:"invalid",message:(0,Ds.__)("Value must be one of the elements.")}},[...i,t.id])):n(u=>Vpe(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,Ds.__)("Unknown error when running elements validation asynchronously."),n(d=>d_(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function QWe(e,t,r){let{customCounterRef:o,setFormValidity:n,path:i}=r,s=(o.current[t.id]||0)+1;o.current[t.id]=s,e.then(l=>{if(s===o.current[t.id]){if(l===null){n(c=>Vpe(c,[...i,t.id],"custom"));return}if(typeof l=="string"){n(c=>d_(c,{custom:{type:"invalid",message:l}},[...i,t.id]));return}n(c=>d_(c,{custom:{type:"invalid",message:(0,Ds.__)("Validation could not be processed.")}},[...i,t.id]))}}).catch(l=>{if(s!==o.current[t.id])return;let c;l instanceof Error?c=l.message:c=String(l)||(0,Ds.__)("Unknown error when running custom validation asynchronously."),n(u=>d_(u,{custom:{type:"invalid",message:c}},[...i,t.id]))})}function jpe(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,Ds.__)("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,Ds.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,Ds.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,Ds.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,Ds.__)("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,Ds.__)("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,Lpe.default)(e,t.field.setValue({item:e,value:i})),t.field)}catch(i){let s;return i instanceof Error?s=i.message:s=String(i)||(0,Ds.__)("Unknown error when running custom validation."),{custom:{type:"invalid",message:s}}}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"&&(XWe(t.field.getElements(),t,r),n.elements={type:"validating",message:(0,Ds.__)("Validating\u2026")}),o instanceof Promise&&(QWe(o,t,r),n.custom={type:"validating",message:(0,Ds.__)("Validating\u2026")}),Object.keys(n).length>0)return n;if(t.children.length>0){let i={};t.children.forEach(l=>{i[l.id]=jpe(e,l,{...r,path:[...r.path,t.id,"children"]})});let s={};return Object.entries(i).forEach(([l,c])=>{c!==void 0&&(s[l]=c)}),Object.keys(s).length===0?void 0:{children:s}}}function zpe(e,t){let r=e?.field?.getValue({item:t});if(e.children.length===0)return r;let o=e.children.map(n=>zpe(n,t));return o?{value:r,children:o}:r}function JWe(e,t,r){let[o,n]=(0,wd.useState)(),i=(0,wd.useRef)({}),s=(0,wd.useRef)({}),l=(0,wd.useRef)({}),c=(0,wd.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:s,setFormValidity:n,path:[],item:e},d=ZWe(r,t);if(d.length===0){n(void 0);return}let f={},m=[];d.forEach(h=>{let g=zpe(h,e);if(l.current.hasOwnProperty(h.id)&&(0,lW.default)(l.current[h.id],g)){m.push(h.id);return}l.current[h.id]=g;let v=jpe(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(_=>{g&&!v.includes(_)&&delete g[_]}),Object.keys(g).length===0&&(g=void 0),(0,lW.default)(h,g)?h:g})},[e,t,r]);return(0,wd.useEffect)(()=>{c()},[c]),{validity:o,isValid:Bpe(o)}}var Hpe=JWe;var Upe=a(U(),1);function Vh(e,t){(0,Upe.useEffect)(()=>{t&&e.current&&e.current.querySelectorAll("input, textarea, select").forEach(o=>{o.reportValidity()})},[t,e])}var Wpe=a(U(),1);function $We(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var aN=(e,t)=>Array.isArray(e)&&e.length>0?$We(e).map(o=>t.find(n=>n.id===o)).filter(o=>o!==void 0):[];var eGe=(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 tGe(e){let{fields:t}=(0,Wpe.useContext)(Wl),r=e.layout,o=aN(r.summary,t),n=eGe(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 lN=tGe;var Ls=a(E(),1);function rGe({data:e,field:t,onChange:r,fieldLabel:o,onClose:n,touched:i}){let{openAs:s}=t.layout,{applyLabel:l,cancelLabel:c}=s,{fields:u}=(0,Gc.useContext)(Wl),[d,f]=(0,Gc.useState)({}),m=(0,Gc.useMemo)(()=>(0,cW.default)(e,d,{arrayMerge:(x,C)=>C}),[e,d]),h=(0,Gc.useMemo)(()=>({layout:$i,fields:t.children?t.children:[{id:t.id,layout:$i}]}),[t]),g=u.map(x=>({...x,Edit:x.Edit===null?void 0:x.Edit,isValid:{required:x.isValid.required?.constraint,elements:x.isValid.elements?.constraint,min:x.isValid.min?.constraint,max:x.isValid.max?.constraint,pattern:x.isValid.pattern?.constraint,minLength:x.isValid.minLength?.constraint,maxLength:x.isValid.maxLength?.constraint}})),{validity:v}=Hpe(m,g,h),b=()=>{r(d),n()},_=x=>{f(C=>(0,cW.default)(C,x,{arrayMerge:(A,k)=>k}))},y=(0,cN.useFocusOnMount)("firstInputElement"),w=(0,Gc.useRef)(null),S=(0,cN.useMergeRefs)([y,w]);return Vh(w,i),(0,Ls.jsxs)(Ob.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:o,size:"medium",children:[(0,Ls.jsx)("div",{ref:S,children:(0,Ls.jsx)(wa,{data:m,form:h,onChange:_,validity:v,children:(x,C,A,k)=>(0,Ls.jsx)(x,{data:m,field:C,onChange:_,hideLabelFromVision:h.fields.length<2,markWhenOptional:k,validity:A},C.id)})}),(0,Ls.jsxs)(se,{direction:"row",className:"dataforms-layouts-panel__modal-footer",gap:"md",children:[(0,Ls.jsx)(Ob.__experimentalSpacer,{style:{flex:1}}),(0,Ls.jsx)(Ob.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:c}),(0,Ls.jsx)(Ob.Button,{variant:"primary",onClick:b,__next40pxDefaultSize:!0,children:l})]})]})}function oGe({data:e,field:t,onChange:r,validity:o}){let[n,i]=(0,Gc.useState)(!1),[s,l]=(0,Gc.useState)(!1),{fieldDefinition:c,fieldLabel:u,summaryFields:d}=lN(t);if(!c)return null;let f=()=>{l(!1),i(!0)};return(0,Ls.jsxs)(Ls.Fragment,{children:[(0,Ls.jsx)(WT,{data:e,field:t,fieldLabel:u,summaryFields:d,validity:o,touched:n,disabled:c.readOnly===!0,onClick:()=>l(!0),isOpen:s}),s&&(0,Ls.jsx)(rGe,{data:e,field:t,onChange:r,fieldLabel:u??"",onClose:f,touched:n})]})}var Gpe=oGe;var jh=a(G(),1),Ype=a(j(),1),cp=a(U(),1);var qpe=a(Te(),1);var es=a(E(),1);function nGe({title:e,onClose:t}){return(0,es.jsx)(se,{direction:"column",className:"dataforms-layouts-panel__dropdown-header",gap:"lg",children:(0,es.jsxs)(se,{direction:"row",gap:"sm",align:"center",children:[e&&(0,es.jsx)(jh.__experimentalHeading,{level:2,size:13,children:e}),(0,es.jsx)(jh.__experimentalSpacer,{style:{flex:1}}),t&&(0,es.jsx)(jh.Button,{label:(0,Ype.__)("Close"),icon:Mi,onClick:t,size:"small"})]})})}function iGe({touched:e,children:t}){let r=(0,cp.useRef)(null);return Vh(r,e),(0,es.jsx)("div",{ref:r,children:t})}function sGe({data:e,field:t,onChange:r,validity:o}){let[n,i]=(0,cp.useState)(!1),[s,l]=(0,cp.useState)(null),c=(0,cp.useMemo)(()=>({anchor:s,placement:"left-start",offset:36,shift:!0}),[s]),[u,d]=(0,qpe.__experimentalUseDialog)({focusOnMount:"firstInputElement"}),f=(0,cp.useMemo)(()=>({layout:$i,fields:t.children?t.children:[{id:t.id,layout:$i}]}),[t]),m=(0,cp.useMemo)(()=>{if(o!==void 0)return t.children?o?.children:{[t.id]:o}},[o,t]),{fieldDefinition:h,fieldLabel:g,summaryFields:v}=lN(t);return h?(0,es.jsx)("div",{ref:l,className:"dataforms-layouts-panel__field-dropdown-anchor",children:(0,es.jsx)(jh.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:c,focusOnMount:!1,onToggle:b=>{b||i(!0)},renderToggle:({isOpen:b,onToggle:_})=>(0,es.jsx)(WT,{data:e,field:t,fieldLabel:g,summaryFields:v,validity:o,touched:n,disabled:h.readOnly===!0,isOpen:b,onClick:_}),renderContent:({onClose:b})=>(0,es.jsx)(iGe,{touched:n,children:(0,es.jsxs)("div",{ref:u,...d,children:[(0,es.jsx)(nGe,{title:g,onClose:b}),(0,es.jsx)(wa,{data:e,form:f,onChange:r,validity:m,children:(_,y,w,S)=>(0,es.jsx)(_,{data:e,field:y,onChange:r,hideLabelFromVision:(f?.fields??[]).length<2,markWhenOptional:S,validity:w},y.id)})]})})})}):null}var Kpe=sGe;var uW=a(E(),1);function Zpe({data:e,field:t,onChange:r,validity:o}){return t.layout.openAs.type==="modal"?(0,uW.jsx)(Gpe,{data:e,field:t,onChange:r,validity:o}):(0,uW.jsx)(Kpe,{data:e,field:t,onChange:r,validity:o})}var _a=a(U(),1);var uN=a(j(),1),Xpe=a(E(),1);function Qpe(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+=Qpe(o);return t}function dN({validity:e}){let t=Qpe(e);return t===0?null:(0,Xpe.jsx)(CC,{intent:"high",children:(0,uN.sprintf)((0,uN._n)("%d field needs attention","%d fields need attention",t),t)})}var zo=a(E(),1);function aGe(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 lGe({data:e,fields:t,label:r,layout:o,isOpen:n,touched:i,validity:s}){let c=aN(o.summary,t).filter(f=>aGe(f,o.summary,n)),u=i&&o.isCollapsible,d=c.length>0&&o.withHeader;return(0,zo.jsxs)(se,{align:"center",justify:"space-between",className:"dataforms-layouts-card__field-header-content",children:[(0,zo.jsx)(Wu.Title,{children:r}),(u||d)&&(0,zo.jsxs)(Bv.HeaderDescription,{className:"dataforms-layouts-card__field-header-content-description",children:[u&&(0,zo.jsx)(dN,{validity:s}),d&&(0,zo.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:c.map(f=>(0,zo.jsx)(f.render,{item:e,field:f},f.id))})]})]})}function cGe({data:e,field:t,form:r,onChange:o,hideLabelFromVision:n,markWhenOptional:i,validity:s,withHeader:l}){if(t.children)return(0,zo.jsxs)(zo.Fragment,{children:[t.description&&(0,zo.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,zo.jsx)(wa,{data:e,form:r,onChange:o,validity:s?.children})]});let c=Nb("regular")?.component;return c?(0,zo.jsx)(c,{data:e,field:t,onChange:o,hideLabelFromVision:n||l,markWhenOptional:i,validity:s}):null}function Jpe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{fields:s}=(0,_a.useContext)(Wl),l=t.layout,c=(0,_a.useRef)(null),u=(0,_a.useMemo)(()=>({layout:$i,fields:t.children??[]}),[t]),{isOpened:d,isCollapsible:f}=l,[m,h]=(0,_a.useState)(d),[g,v]=(0,_a.useState)(!1);(0,_a.useEffect)(()=>{h(d)},[d]);let b=(0,_a.useCallback)(C=>{C||v(!0),h(C)},[]),_=(0,_a.useCallback)(()=>{v(!0)},[]);Vh(c,(f?m:!0)&&g);let y=t.label,w;if(t.children)w=!!y&&l.withHeader;else{let C=s.find(A=>A.id===t.id);if(!C||!C.Edit)return null;y=C.label,w=!!y&&l.withHeader}let S=(0,zo.jsx)(cGe,{data:e,field:t,form:u,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,withHeader:w}),x=(0,zo.jsx)(lGe,{data:e,fields:s,label:y,layout:l,isOpen:f?!!m:!0,touched:g,validity:i});return w&&f?(0,zo.jsxs)(Bv.Root,{className:"dataforms-layouts-card__field",open:m,onOpenChange:b,children:[(0,zo.jsx)(Bv.Header,{children:x}),(0,zo.jsx)(Bv.Content,{ref:c,onBlur:_,children:S})]}):(0,zo.jsxs)(Wu.Root,{className:"dataforms-layouts-card__field",children:[w&&(0,zo.jsx)(Wu.Header,{children:x}),(0,zo.jsx)(Wu.Content,{ref:c,onBlur:_,children:S})]})}var $pe=a(G(),1);var Zn=a(E(),1);function uGe({title:e}){return(0,Zn.jsx)(se,{direction:"column",className:"dataforms-layouts-row__header",gap:"lg",children:(0,Zn.jsx)(se,{direction:"row",align:"center",children:(0,Zn.jsx)($pe.__experimentalHeading,{level:2,size:13,children:e})})})}var dGe=({children:e})=>(0,Zn.jsx)(Zn.Fragment,{children:e});function eme({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let s=t.layout;if(t.children){let c={layout:$i,fields:t.children};return(0,Zn.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!o&&t.label&&(0,Zn.jsx)(uGe,{title:t.label}),(0,Zn.jsx)(se,{direction:"row",align:s.alignment,gap:"lg",children:(0,Zn.jsx)(wa,{data:e,form:c,onChange:r,validity:i?.children,as:dGe,children:(u,d,f)=>(0,Zn.jsx)("div",{className:"dataforms-layouts-row__field-control",style:s.styles[d.id],children:(0,Zn.jsx)(u,{data:e,field:d,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:f})},d.id)})})]})}let l=Nb("regular")?.component;return l?(0,Zn.jsx)(Zn.Fragment,{children:(0,Zn.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,Zn.jsx)(l,{data:e,field:t,onChange:r,markWhenOptional:n,validity:i})})}):null}var Sa=a(U(),1),tme=a(j(),1);var up=a(E(),1);function rme({data:e,field:t,onChange:r,validity:o}){let{fields:n}=(0,Sa.useContext)(Wl),i=(0,Sa.useRef)(null),s=(0,Sa.useRef)(null),[l,c]=(0,Sa.useState)(!1),[u,d]=(0,Sa.useState)(!1),f=(0,Sa.useMemo)(()=>({layout:$i,fields:t.children??[]}),[t]);(0,Sa.useEffect)(()=>{let b=i.current;if(!b)return;let _=()=>{let y=b.open;y||c(!0),d(y)};return b.addEventListener("toggle",_),()=>{b.removeEventListener("toggle",_)}},[]),Vh(s,u&&l);let m=(0,Sa.useCallback)(()=>{c(!0)},[]);if(!t.children)return null;let h=t.layout.summary??"",g=h?n.find(b=>b.id===h):void 0,v;return g&&g.render?v=(0,up.jsx)(g.render,{item:e,field:g}):v=t.label||(0,tme.__)("More details"),(0,up.jsxs)("details",{ref:i,className:"dataforms-layouts-details__details",children:[(0,up.jsx)("summary",{className:"dataforms-layouts-details__summary",children:(0,up.jsxs)(se,{direction:"row",align:"center",gap:"md",className:"dataforms-layouts-details__summary-content",children:[v,l&&(0,up.jsx)(dN,{validity:o})]})}),(0,up.jsx)("div",{ref:s,className:"dataforms-layouts-details__content",onBlur:m,children:(0,up.jsx)(wa,{data:e,form:f,onChange:r,validity:o?.children})})]})}var Mb=a(E(),1),fGe=[{type:"regular",component:Ape,wrapper:({children:e})=>(0,Mb.jsx)(se,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e})},{type:"panel",component:Zpe,wrapper:({children:e})=>(0,Mb.jsx)(se,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e})},{type:"card",component:Jpe,wrapper:({children:e})=>(0,Mb.jsx)(se,{direction:"column",className:"dataforms-layouts__wrapper",gap:"xl",children:e})},{type:"row",component:eme,wrapper:({children:e,layout:t})=>(0,Mb.jsx)(se,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:(0,Mb.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,Mb.jsx)(se,{direction:"row",gap:"lg",align:t.alignment,children:e})})})},{type:"details",component:rme}];function Nb(e){return fGe.find(t=>t.type===e)}var fN=a(E(),1),pGe=({children:e})=>(0,fN.jsx)(se,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e});function wa({data:e,form:t,onChange:r,validity:o,children:n,as:i}){let{fields:s}=(0,pN.useContext)(Wl),l=(0,pN.useMemo)(()=>{let d=s.filter(m=>!!m.isValid?.required).length,f=s.length-d;return d>f},[s]);function c(d){return s.find(f=>f.id===d.id)}let u=i??Nb(t.layout.type)?.wrapper??pGe;return(0,fN.jsx)(u,{layout:t.layout,children:t.fields.map(d=>{let f=Nb(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,fN.jsx)(f,{data:e,field:d,onChange:r,markWhenOptional:l,validity:o?.[d.id]},d.id)})})}var fW=a(E(),1);function GT({data:e,form:t,fields:r,onChange:o,validity:n}){let i=(0,dW.useMemo)(()=>nN(t),[t]),s=(0,dW.useMemo)(()=>ap(r),[r]);return t.fields?(0,fW.jsx)(Ppe,{fields:s,children:(0,fW.jsx)(wa,{data:e,form:i,onChange:o,validity:n})}):null}var nme=a(gw(),1),ime=a(qa(),1);function ome(e=""){return(0,nme.default)(e.trim().toLowerCase())}var mGe=[];function pW(e,t,r){if(!e)return{data:mGe,paginationInfo:{totalItems:0,totalPages:0}};let o=ap(r),n=[...e];if(t.search){let u=ome(t.search);n=n.filter(d=>o.filter(f=>f.enableGlobalSearch).some(f=>{let m=f.getValue({item:d});return(Array.isArray(m)?m:[m]).some(g=>ome(String(g)).includes(u))}))}t.filters&&t.filters?.length>0&&t.filters.forEach(u=>{let d=o.find(f=>f.id===u.field);if(d){u.operator===Yn&&(0,ime.default)("The 'isNotAll' filter operator",{since:"7.0",alternative:"'isNone'"});let f=d.filter[u.operator];f&&(n=n.filter(m=>f(m,d,u.value)))}});let i=t.sort?.field?o.find(u=>u.enableSorting!==!1&&u.id===t.sort?.field):null,s=t.groupBy?.field?o.find(u=>u.enableSorting!==!1&&u.id===t.groupBy?.field):null;(i||s)&&n.sort((u,d)=>{if(s){let f=s.sort(u,d,t.groupBy?.direction??"asc");if(f!==0)return f}return i?i.sort(u,d,t.sort?.direction??"desc"):0});let l=n.length,c=1;if(t.infiniteScrollEnabled&&t.startPosition!==void 0&&t.perPage!==void 0){let u=t.startPosition-1,d=Math.min(u+t.perPage,l);n=n?.slice(u,d)}else if(t.page!==void 0&&t.perPage!==void 0){let u=(t.page-1)*t.perPage;l=n?.length||0,c=Math.ceil(l/t.perPage),n=n?.slice(u,u+t.perPage)}return{data:n,paginationInfo:{totalItems:l,totalPages:c}}}var mN={};Fae(mN,{RichTextControl:U5});var hN=a(G(),1);var sme=a(j(),1);var dp=a(E(),1);function ame({form:e,header:t}){let{media:r,fields:o,onChange:n}=Nw();if(!r||!n)return(0,dp.jsx)("div",{className:"media-editor-form media-editor-form--loading",children:(0,dp.jsx)(hN.Spinner,{})});let i=["title","alt_text","caption","description"],s=[...o.filter(u=>i.includes(u.id)),...o.filter(u=>!i.includes(u.id))],l={layout:{type:"panel"},fields:s.map(u=>i.includes(u.id)?{id:u.id,layout:{type:"regular",labelPosition:"top"}}:u.id)},c=e||l;return(0,dp.jsx)("div",{className:"media-editor-form",children:(0,dp.jsxs)(hN.__experimentalVStack,{spacing:4,children:[(0,dp.jsx)(Gt,{render:(0,dp.jsx)("h2",{}),children:(0,sme.__)("Media details")}),t,(0,dp.jsx)(GT,{data:r,fields:o,form:c,onChange:n})]})})}var lme=a(xf(),1),{lock:cme,unlock:SWt}=(0,lme.__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 gN=a(Y(),1);var ume={isOpen:!1,id:null,onUpdate:null,onClose:null};function dme(e=ume,t){switch(t.type){case"OPEN_MEDIA_EDITOR_MODAL":{let{id:r,onUpdate:o,onClose:n}=t;return{isOpen:!0,id:r,onUpdate:o,onClose:n}}case"CLOSE_MEDIA_EDITOR_MODAL":return ume}return e}var mW={};Yr(mW,{closeMediaEditorModal:()=>gGe,openMediaEditorModal:()=>hGe});function hGe({id:e,onUpdate:t,onClose:r}){return{type:"OPEN_MEDIA_EDITOR_MODAL",id:e,onUpdate:t??null,onClose:r??null}}function gGe(){return{type:"CLOSE_MEDIA_EDITOR_MODAL"}}var hW={};Yr(hW,{getId:()=>bGe,getOnClose:()=>wGe,getOnUpdate:()=>yGe,isOpen:()=>vGe});function vGe(e){return e.isOpen}function bGe(e){return e.id}function yGe(e){return e.onUpdate}function wGe(e){return e.onClose}var fme="core/media-editor";var f_=(0,gN.createReduxStore)(fme,{reducer:dme,actions:mW,selectors:hW});(0,gN.register)(f_);var hge=a(G(),1),cE=a(Y(),1),lE=a(j(),1),gge=a(xa(),1),vge=a(It(),1);var ts=a(G(),1);var pge=a(Te(),1),aE=a(Y(),1),OW=a(ae(),1),gn=a(U(),1),Jn=a(j(),1);var Zc=a(Mo(),1),QN=a(It(),1);var wW={};Yr(wW,{ActionItem:()=>Yl,ComplementaryArea:()=>Kl,ComplementaryAreaMoreMenuItem:()=>Uh,FullscreenMode:()=>Nme,InterfaceSkeleton:()=>Lb,PinnedItems:()=>Wh,store:()=>He});var ql=a(G(),1),ZT=a(Y(),1),EN=a(j(),1);var Sd=a(U(),1),bW=a(hme(),1),Rme=a(Dt(),1),Gh=a(Te(),1),Ame=a(zh(),1);var _me=a(G(),1),wN=a(Y(),1),Sme=a(zh(),1);var yN=a(Y(),1);var gW={};Yr(gW,{closeModal:()=>AGe,disableComplementaryArea:()=>xGe,enableComplementaryArea:()=>SGe,openModal:()=>RGe,pinItem:()=>CGe,setDefaultComplementaryArea:()=>_Ge,setFeatureDefaults:()=>kGe,setFeatureValue:()=>PGe,toggleFeature:()=>EGe,unpinItem:()=>TGe});var bN=a(qa(),1),Gl=a(Dt(),1);var vN=a(qa(),1);function _d(e){return["core/edit-post","core/edit-site"].includes(e)?((0,vN.default)(`${e} interface scope`,{alternative:"core interface scope",hint:"core/edit-post and core/edit-site are merging.",version:"6.6"}),"core"):e}function Fb(e,t){return e==="core"&&t==="edit-site/template"?((0,vN.default)("edit-site/template sidebar",{alternative:"edit-post/document",version:"6.6"}),"edit-post/document"):e==="core"&&t==="edit-site/block-inspector"?((0,vN.default)("edit-site/block-inspector sidebar",{alternative:"edit-post/block",version:"6.6"}),"edit-post/block"):t}var _Ge=(e,t)=>(e=_d(e),t=Fb(e,t),{type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e,area:t}),SGe=(e,t)=>({registry:r,dispatch:o})=>{if(!t)return;e=_d(e),t=Fb(e,t),r.select(Gl.store).get(e,"isComplementaryAreaVisible")||r.dispatch(Gl.store).set(e,"isComplementaryAreaVisible",!0),o({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t})},xGe=e=>({registry:t})=>{e=_d(e),t.select(Gl.store).get(e,"isComplementaryAreaVisible")&&t.dispatch(Gl.store).set(e,"isComplementaryAreaVisible",!1)},CGe=(e,t)=>({registry:r})=>{if(!t)return;e=_d(e),t=Fb(e,t);let o=r.select(Gl.store).get(e,"pinnedItems");o?.[t]!==!0&&r.dispatch(Gl.store).set(e,"pinnedItems",{...o,[t]:!0})},TGe=(e,t)=>({registry:r})=>{if(!t)return;e=_d(e),t=Fb(e,t);let o=r.select(Gl.store).get(e,"pinnedItems");r.dispatch(Gl.store).set(e,"pinnedItems",{...o,[t]:!1})};function EGe(e,t){return function({registry:r}){(0,bN.default)("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),r.dispatch(Gl.store).toggle(e,t)}}function PGe(e,t,r){return function({registry:o}){(0,bN.default)("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),o.dispatch(Gl.store).set(e,t,!!r)}}function kGe(e,t){return function({registry:r}){(0,bN.default)("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),r.dispatch(Gl.store).setDefaults(e,t)}}function RGe(e){return{type:"OPEN_MODAL",name:e}}function AGe(){return{type:"CLOSE_MODAL"}}var vW={};Yr(vW,{getActiveComplementaryArea:()=>IGe,isComplementaryAreaLoading:()=>OGe,isFeatureActive:()=>MGe,isItemPinned:()=>NGe,isModalActive:()=>FGe});var YT=a(Y(),1),vme=a(qa(),1),qT=a(Dt(),1);var IGe=(0,YT.createRegistrySelector)(e=>(t,r)=>{r=_d(r);let o=e(qT.store).get(r,"isComplementaryAreaVisible");if(o!==void 0)return o===!1?null:t?.complementaryAreas?.[r]}),OGe=(0,YT.createRegistrySelector)(e=>(t,r)=>{r=_d(r);let o=e(qT.store).get(r,"isComplementaryAreaVisible"),n=t?.complementaryAreas?.[r];return o&&n===void 0}),NGe=(0,YT.createRegistrySelector)(e=>(t,r,o)=>(r=_d(r),o=Fb(r,o),e(qT.store).get(r,"pinnedItems")?.[o]??!0)),MGe=(0,YT.createRegistrySelector)(e=>(t,r,o)=>((0,vme.default)("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(qT.store).get(r,o)));function FGe(e,t){return e.activeModal===t}var bme=a(Y(),1);function DGe(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 LGe(e=null,t){switch(t.type){case"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e}var yme=(0,bme.combineReducers)({complementaryAreas:DGe,activeModal:LGe});var wme="core/interface";var He=(0,yN.createReduxStore)(wme,{reducer:yme,actions:gW,selectors:vW});(0,yN.register)(He);var xme=a(E(),1);function BGe(e){return["checkbox","option","radio","switch","menuitemcheckbox","menuitemradio","treeitem"].includes(e)}function p_({as:e=_me.Button,scope:t,identifier:r,icon:o,selectedIcon:n,name:i,shortcut:s,...l}){let c=e,u=(0,Sme.usePluginContext)(),d=o||u.icon,f=r||`${u.name}/${i}`,m=(0,wN.useSelect)(v=>v(He).getActiveComplementaryArea(t)===f,[f,t]),{enableComplementaryArea:h,disableComplementaryArea:g}=(0,wN.useDispatch)(He);return(0,xme.jsx)(c,{icon:n&&m?n:d,"aria-controls":f.replace("/",":"),"aria-checked":BGe(l.role)?m:void 0,onClick:()=>{m?g(t):h(t,f)},shortcut:s,...l})}var _N=a(E(),1),VGe=({children:e,className:t,toggleButtonProps:r})=>{let o=(0,_N.jsx)(p_,{icon:Mi,...r});return(0,_N.jsxs)("div",{className:J("components-panel__header","interface-complementary-area-header",t),tabIndex:-1,children:[e,o]})},Cme=VGe;var Pme=a(G(),1);var Hh=a(G(),1),SN=a(U(),1),KT=a(E(),1),Tme=()=>{};function jGe({name:e,as:t=Hh.MenuGroup,fillProps:r={},bubblesVirtually:o,...n}){return(0,KT.jsx)(Hh.Slot,{name:e,bubblesVirtually:o,fillProps:r,children:i=>{if(!SN.Children.toArray(i).length)return null;let s=[];SN.Children.forEach(i,({props:{__unstableExplicitMenuItem:c,__unstableTarget:u}})=>{u&&c&&s.push(u)});let l=SN.Children.map(i,c=>!c.props.__unstableExplicitMenuItem&&s.includes(c.props.__unstableTarget)?null:c);return(0,KT.jsx)(t,{...n,children:l})}})}function Eme({name:e,as:t=Hh.Button,onClick:r,...o}){return(0,KT.jsx)(Hh.Fill,{name:e,children:({onClick:n})=>(0,KT.jsx)(t,{onClick:r||n?(...i)=>{(r||Tme)(...i),(n||Tme)(...i)}:void 0,...o})})}Eme.Slot=jGe;var Yl=Eme;var xN=a(E(),1),zGe=({__unstableExplicitMenuItem:e,__unstableTarget:t,...r})=>(0,xN.jsx)(Pme.MenuItem,{...r});function Uh({scope:e,target:t,__unstableExplicitMenuItem:r,...o}){return(0,xN.jsx)(p_,{as:n=>(0,xN.jsx)(Yl,{__unstableExplicitMenuItem:r,__unstableTarget:`${e}/${t}`,as:zGe,name:`${e}/plugin-more-menu`,...n}),role:"menuitemcheckbox",selectedIcon:Io,name:t,scope:e,...o})}var TN=a(G(),1),CN=a(E(),1);function kme({scope:e,...t}){return(0,CN.jsx)(TN.Fill,{name:`PinnedItems/${e}`,...t})}function HGe({scope:e,className:t,...r}){return(0,CN.jsx)(TN.Slot,{name:`PinnedItems/${e}`,...r,children:o=>o?.length>0&&(0,CN.jsx)("div",{className:J(t,"interface-pinned-items"),children:o})})}kme.Slot=HGe;var Wh=kme;var mn=a(E(),1),UGe=.3;function WGe({scope:e,...t}){return(0,mn.jsx)(ql.Slot,{name:`ComplementaryArea/${e}`,...t})}var Ime=280,GGe={open:{width:Ime},closed:{width:0},mobileOpen:{width:"100vw"}};function YGe({activeArea:e,isActive:t,scope:r,children:o,className:n,id:i}){let s=(0,Gh.useReducedMotion)(),l=(0,Gh.useViewportMatch)("medium","<"),c=(0,Gh.usePrevious)(e),u=(0,Gh.usePrevious)(t),[,d]=(0,Sd.useState)({});(0,Sd.useEffect)(()=>{d({})},[t]);let f={type:"tween",duration:s||l||c&&e&&e!==c?0:UGe,ease:[.6,0,.4,1]};return(0,mn.jsx)(ql.Fill,{name:`ComplementaryArea/${r}`,children:(0,mn.jsx)(ql.__unstableAnimatePresence,{initial:!1,children:(u||t)&&(0,mn.jsx)(ql.__unstableMotion.div,{variants:GGe,initial:"closed",animate:l?"mobileOpen":"open",exit:"closed",transition:f,className:"interface-complementary-area__fill",children:(0,mn.jsx)("div",{id:i,className:n,style:{width:l?"100vw":Ime},children:o})})})})}function qGe(e,t,r,o,n){let i=(0,Sd.useRef)(!1),s=(0,Sd.useRef)(!1),{enableComplementaryArea:l,disableComplementaryArea:c}=(0,ZT.useDispatch)(He);(0,Sd.useEffect)(()=>{o&&n&&!i.current?(c(e),s.current=!0):s.current&&!n&&i.current?(s.current=!1,l(e,t)):s.current&&r&&r!==t&&(s.current=!1),n!==i.current&&(i.current=n)},[o,n,e,t,r,c,l])}function Ome({children:e,className:t,closeLabel:r=(0,EN.__)("Close plugin"),identifier:o,header:n,headerClassName:i,icon:s,isPinnable:l=!0,panelClassName:c,scope:u,name:d,title:f,toggleShortcut:m,isActiveByDefault:h}){let g=(0,Ame.usePluginContext)(),v=s||g.icon,b=o||`${g.name}/${d}`,[_,y]=(0,Sd.useState)(!1),{isLoading:w,isActive:S,isPinned:x,activeArea:C,isSmall:A,isLarge:k,showIconLabels:R}=(0,ZT.useSelect)(F=>{let{getActiveComplementaryArea:D,isComplementaryAreaLoading:z,isItemPinned:B}=F(He),{get:O}=F(Rme.store),V=D(u);return{isLoading:z(u),isActive:V===b,isPinned:B(u,b),activeArea:V,isSmall:F(bW.store).isViewportMatch("< medium"),isLarge:F(bW.store).isViewportMatch("large"),showIconLabels:O("core","showIconLabels")}},[b,u]),M=(0,Gh.useViewportMatch)("medium","<");qGe(u,b,C,S,A);let{enableComplementaryArea:P,disableComplementaryArea:T,pinItem:N,unpinItem:L}=(0,ZT.useDispatch)(He);if((0,Sd.useEffect)(()=>{h&&C===void 0&&!A?P(u,b):C===void 0&&A&&T(u,b),y(!0)},[C,h,u,b,A,P,T]),!!_)return(0,mn.jsxs)(mn.Fragment,{children:[l&&(0,mn.jsx)(Wh,{scope:u,children:x&&(0,mn.jsx)(p_,{scope:u,identifier:b,isPressed:S&&(!R||k),"aria-expanded":S,"aria-disabled":w,label:f,icon:R?Io:v,showTooltip:!R,variant:R?"tertiary":void 0,size:"compact",shortcut:m})}),d&&l&&(0,mn.jsx)(Uh,{target:d,scope:u,icon:v,identifier:b,children:f}),(0,mn.jsxs)(YGe,{activeArea:C,isActive:S,className:J("interface-complementary-area",t),scope:u,id:b.replace("/",":"),children:[(0,mn.jsx)(Cme,{className:i,closeLabel:r,onClose:()=>T(u),toggleButtonProps:{label:r,size:"compact",shortcut:m,scope:u,identifier:b},children:n||(0,mn.jsxs)(mn.Fragment,{children:[(0,mn.jsx)("h2",{className:"interface-complementary-area-header__title",children:f}),l&&!M&&(0,mn.jsx)(ql.Button,{className:"interface-complementary-area__pin-unpin-item",icon:x?KV:YV,label:x?(0,EN.__)("Unpin from toolbar"):(0,EN.__)("Pin to toolbar"),onClick:()=>(x?L:N)(u,b),isPressed:x,"aria-expanded":x,size:"compact"})]})}),(0,mn.jsx)(ql.Panel,{className:c,children:e})]})]})}Ome.Slot=WGe;var Kl=Ome;var yW=a(U(),1),KGe=({isActive:e})=>((0,yW.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,yW.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),Nme=KGe;var Mme=a(U(),1),Fme=a(E(),1),Dme=(0,Mme.forwardRef)(({children:e,className:t,ariaLabel:r,as:o="div",...n},i)=>(0,Fme.jsx)(o,{ref:i,className:J("admin-ui-navigable-region",t),"aria-label":r,role:"region",tabIndex:"-1",...n,children:e}));Dme.displayName="NavigableRegion";var Yh=Dme;var PN=a(U(),1),Db=a(G(),1),qh=a(j(),1),m_=a(Te(),1),Bs=a(E(),1),Bme=.25,Lme={type:"tween",duration:Bme,ease:[.6,0,.4,1]};function ZGe(e){(0,PN.useEffect)(()=>{let t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}},[e])}var XGe={hidden:{opacity:1,marginTop:-60},visible:{opacity:1,marginTop:0},distractionFreeHover:{opacity:1,marginTop:0,transition:{...Lme,delay:.2,delayChildren:.2}},distractionFreeHidden:{opacity:0,marginTop:-60},distractionFreeDisabled:{opacity:0,marginTop:0,transition:{...Lme,delay:.8,delayChildren:.8}}};function QGe({isDistractionFree:e,footer:t,header:r,editorNotices:o,sidebar:n,secondarySidebar:i,content:s,actions:l,labels:c,className:u},d){let[f,m]=(0,m_.useResizeObserver)(),h=(0,m_.useViewportMatch)("medium","<"),v={type:"tween",duration:(0,m_.useReducedMotion)()?0:Bme,ease:[.6,0,.4,1]};ZGe("interface-interface-skeleton__html-container");let _={...{header:(0,qh._x)("Header","header landmark area"),body:(0,qh.__)("Content"),secondarySidebar:(0,qh.__)("Block Library"),sidebar:(0,qh._x)("Settings","settings landmark area"),actions:(0,qh.__)("Publish"),footer:(0,qh.__)("Footer")},...c};return(0,Bs.jsxs)("div",{ref:d,className:J(u,"interface-interface-skeleton",!!t&&"has-footer"),children:[(0,Bs.jsxs)("div",{className:"interface-interface-skeleton__editor",children:[(0,Bs.jsx)(Db.__unstableAnimatePresence,{initial:!1,children:!!r&&(0,Bs.jsx)(Yh,{as:Db.__unstableMotion.div,className:"interface-interface-skeleton__header",ariaLabel:_.header,initial:e&&!h?"distractionFreeHidden":"hidden",whileHover:e&&!h?"distractionFreeHover":"visible",animate:e&&!h?"distractionFreeDisabled":"visible",exit:e&&!h?"distractionFreeHidden":"hidden",variants:XGe,transition:v,children:r})}),e&&(0,Bs.jsx)("div",{className:"interface-interface-skeleton__header",children:o}),(0,Bs.jsxs)("div",{className:"interface-interface-skeleton__body",children:[(0,Bs.jsx)(Db.__unstableAnimatePresence,{initial:!1,children:!!i&&(0,Bs.jsx)(Yh,{className:"interface-interface-skeleton__secondary-sidebar",ariaLabel:_.secondarySidebar,as:Db.__unstableMotion.div,initial:"closed",animate:"open",exit:"closed",variants:{open:{width:m.width},closed:{width:0}},transition:v,children:(0,Bs.jsxs)(Db.__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,Bs.jsx)(Yh,{className:"interface-interface-skeleton__content",ariaLabel:_.body,children:s}),!!n&&(0,Bs.jsx)(Yh,{className:"interface-interface-skeleton__sidebar",ariaLabel:_.sidebar,children:n}),!!l&&(0,Bs.jsx)(Yh,{className:"interface-interface-skeleton__actions",ariaLabel:_.actions,children:l})]})]}),!!t&&(0,Bs.jsx)(Yh,{className:"interface-interface-skeleton__footer",ariaLabel:_.footer,children:t})]})}var Lb=(0,PN.forwardRef)(QGe);var kd=a(U(),1),qhe=a(G(),1),Khe=a(j(),1);var xd=a(j(),1),fp=1,XT=.1,cl=10,_W=16,jme=44,zme=.8,Hme=8,kN=1,Ume=.0025,QT=.01,RN=10,JT=45,JGe={x:0,y:0,width:1,height:1},$Ge={horizontal:!1,vertical:!1},Vme={x:0,y:0},h_={image:null,pan:{...Vme},zoom:fp,rotation:0,basePan:{...Vme},baseZoom:fp,baseRotation:0,flip:{...$Ge},cropRect:{...JGe}},$T=-1,eE=[{label:(0,xd.__)("Free"),value:0},{label:(0,xd.__)("Original"),value:$T},{label:(0,xd.__)("Square (1:1)"),value:1},{label:(0,xd.__)("Landscape (16:9)"),value:16/9},{label:(0,xd.__)("Portrait (9:16)"),value:9/16},{label:(0,xd.__)("Classic (4:3)"),value:4/3},{label:(0,xd.__)("Classic portrait (3:4)"),value:3/4},{label:(0,xd.__)("Photo (3:2)"),value:3/2},{label:(0,xd.__)("Photo portrait (2:3)"),value:2/3}];var Cd=1e-6,Td=typeof Float32Array<"u"?Float32Array:Array,Wme=Math.random;function SW(e){return e>=0?Math.round(e):e%.5===0?Math.floor(e):Math.round(e)}var TGt=Math.PI/180,EGt=180/Math.PI;var Zr={};Yr(Zr,{add:()=>gYe,clone:()=>tYe,copy:()=>rYe,create:()=>eYe,determinant:()=>aYe,equals:()=>wYe,exactEquals:()=>yYe,frob:()=>hYe,fromRotation:()=>dYe,fromScaling:()=>fYe,fromTranslation:()=>pYe,fromValues:()=>nYe,identity:()=>oYe,invert:()=>sYe,mul:()=>_Ye,multiply:()=>Yme,multiplyScalar:()=>vYe,multiplyScalarAndAdd:()=>bYe,rotate:()=>lYe,scale:()=>cYe,set:()=>iYe,str:()=>mYe,sub:()=>SYe,subtract:()=>qme,translate:()=>uYe});function eYe(){var e=new Td(6);return Td!=Float32Array&&(e[1]=0,e[2]=0,e[4]=0,e[5]=0),e[0]=1,e[3]=1,e}function tYe(e){var t=new Td(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 rYe(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 oYe(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function nYe(e,t,r,o,n,i){var s=new Td(6);return s[0]=e,s[1]=t,s[2]=r,s[3]=o,s[4]=n,s[5]=i,s}function iYe(e,t,r,o,n,i,s){return e[0]=t,e[1]=r,e[2]=o,e[3]=n,e[4]=i,e[5]=s,e}function sYe(e,t){var r=t[0],o=t[1],n=t[2],i=t[3],s=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*s)*c,e[5]=(o*s-r*l)*c,e):null}function aYe(e){return e[0]*e[3]-e[1]*e[2]}function Yme(e,t,r){var o=t[0],n=t[1],i=t[2],s=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+s*d,e[2]=o*f+i*m,e[3]=n*f+s*m,e[4]=o*h+i*g+l,e[5]=n*h+s*g+c,e}function lYe(e,t,r){var o=t[0],n=t[1],i=t[2],s=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+s*u,e[2]=o*-u+i*d,e[3]=n*-u+s*d,e[4]=l,e[5]=c,e}function cYe(e,t,r){var o=t[0],n=t[1],i=t[2],s=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]=s*d,e[4]=l,e[5]=c,e}function uYe(e,t,r){var o=t[0],n=t[1],i=t[2],s=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]=s,e[4]=o*u+i*d+l,e[5]=n*u+s*d+c,e}function dYe(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 fYe(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 pYe(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 mYe(e){return"mat2d("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+")"}function hYe(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 gYe(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 qme(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 vYe(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 bYe(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 yYe(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 wYe(e,t){var r=e[0],o=e[1],n=e[2],i=e[3],s=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)<=Cd*Math.max(1,Math.abs(r),Math.abs(c))&&Math.abs(o-u)<=Cd*Math.max(1,Math.abs(o),Math.abs(u))&&Math.abs(n-d)<=Cd*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(i-f)<=Cd*Math.max(1,Math.abs(i),Math.abs(f))&&Math.abs(s-m)<=Cd*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(l-h)<=Cd*Math.max(1,Math.abs(l),Math.abs(h))}var _Ye=Yme,SYe=qme;var Vs={};Yr(Vs,{add:()=>PYe,angle:()=>qYe,ceil:()=>kYe,clone:()=>xYe,copy:()=>TYe,create:()=>Kme,cross:()=>VYe,dist:()=>oqe,distance:()=>Jme,div:()=>rqe,divide:()=>Qme,dot:()=>BYe,equals:()=>JYe,exactEquals:()=>QYe,floor:()=>RYe,forEach:()=>sqe,fromValues:()=>CYe,inverse:()=>DYe,len:()=>$Ye,length:()=>ehe,lerp:()=>jYe,max:()=>IYe,min:()=>AYe,mul:()=>tqe,multiply:()=>Xme,negate:()=>FYe,normalize:()=>LYe,random:()=>zYe,rotate:()=>YYe,round:()=>OYe,scale:()=>NYe,scaleAndAdd:()=>MYe,set:()=>EYe,signedAngle:()=>KYe,sqrDist:()=>nqe,sqrLen:()=>iqe,squaredDistance:()=>$me,squaredLength:()=>the,str:()=>XYe,sub:()=>eqe,subtract:()=>Zme,transformMat2:()=>HYe,transformMat2d:()=>UYe,transformMat3:()=>WYe,transformMat4:()=>GYe,zero:()=>ZYe});function Kme(){var e=new Td(2);return Td!=Float32Array&&(e[0]=0,e[1]=0),e}function xYe(e){var t=new Td(2);return t[0]=e[0],t[1]=e[1],t}function CYe(e,t){var r=new Td(2);return r[0]=e,r[1]=t,r}function TYe(e,t){return e[0]=t[0],e[1]=t[1],e}function EYe(e,t,r){return e[0]=t,e[1]=r,e}function PYe(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}function Zme(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function Xme(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e}function Qme(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e}function kYe(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e}function RYe(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e}function AYe(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}function IYe(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}function OYe(e,t){return e[0]=SW(t[0]),e[1]=SW(t[1]),e}function NYe(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function MYe(e,t,r,o){return e[0]=t[0]+r[0]*o,e[1]=t[1]+r[1]*o,e}function Jme(e,t){var r=t[0]-e[0],o=t[1]-e[1];return Math.sqrt(r*r+o*o)}function $me(e,t){var r=t[0]-e[0],o=t[1]-e[1];return r*r+o*o}function ehe(e){var t=e[0],r=e[1];return Math.sqrt(t*t+r*r)}function the(e){var t=e[0],r=e[1];return t*t+r*r}function FYe(e,t){return e[0]=-t[0],e[1]=-t[1],e}function DYe(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function LYe(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 BYe(e,t){return e[0]*t[0]+e[1]*t[1]}function VYe(e,t,r){var o=t[0]*r[1]-t[1]*r[0];return e[0]=e[1]=0,e[2]=o,e}function jYe(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 zYe(e,t){t=t===void 0?1:t;var r=Wme()*2*Math.PI;return e[0]=Math.cos(r)*t,e[1]=Math.sin(r)*t,e}function HYe(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 UYe(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 WYe(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 GYe(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 YYe(e,t,r,o){var n=t[0]-r[0],i=t[1]-r[1],s=Math.sin(o),l=Math.cos(o);return e[0]=n*l-i*s+r[0],e[1]=n*s+i*l+r[1],e}function qYe(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 KYe(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 ZYe(e){return e[0]=0,e[1]=0,e}function XYe(e){return"vec2("+e[0]+", "+e[1]+")"}function QYe(e,t){return e[0]===t[0]&&e[1]===t[1]}function JYe(e,t){var r=e[0],o=e[1],n=t[0],i=t[1];return Math.abs(r-n)<=Cd*Math.max(1,Math.abs(r),Math.abs(n))&&Math.abs(o-i)<=Cd*Math.max(1,Math.abs(o),Math.abs(i))}var $Ye=ehe,eqe=Zme,tqe=Xme,rqe=Qme,oqe=Jme,nqe=$me,iqe=the,sqe=(function(){var e=Kme();return function(t,r,o,n,i,s){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,s),t[l]=e[0],t[l+1]=e[1];return t}})();function g_(e){return e>=0?e%360:(360+e%360)%360}function Yc(e){return e*Math.PI/180}var AN=1e6;function Xn(e,t){return!Number.isFinite(e)||Math.abs(e)>AN?t:e}function IN(e){return Number.isFinite(e)&&Math.abs(e)<=AN}function hn(e){return Number.isFinite(e.width)&&Number.isFinite(e.height)&&e.width>=Number.EPSILON&&e.height>=Number.EPSILON&&e.width<=AN&&e.height<=AN}function ON(e){let t=Xn(e.x,0),r=Xn(e.y,0),o=Xn(e.width,0),n=Xn(e.height,0);return t===e.x&&r===e.y&&o===e.width&&n===e.height?e:{x:t,y:r,width:o,height:n}}function Ca(e){let t=Xn(e.pan.x,0),r=Xn(e.pan.y,0),o=Xn(e.basePan.x,0),n=Xn(e.basePan.y,0),i=Xn(e.rotation,0),s=Xn(e.baseRotation,0),l=Xn(e.zoom,1),c=l>=Number.EPSILON?l:1,u=Xn(e.baseZoom,1),d=u>=Number.EPSILON?u:1,f=ON(e.cropRect),m=t===e.pan.x&&r===e.pan.y,h=o===e.basePan.x&&n===e.basePan.y;return m&&h&&c===e.zoom&&d===e.baseZoom&&i===e.rotation&&s===e.baseRotation&&f===e.cropRect?e:{...e,pan:m?e.pan:{x:t,y:r},zoom:c,rotation:i,basePan:h?e.basePan:{x:o,y:n},baseZoom:d,baseRotation:s,cropRect:f}}var NGt=Zr.create(),MGt=Vs.create();function Qn(e,t,r){if(!IN(e)||!IN(t)||!IN(r)||e<=0||t<=0)return{width:0,height:0};let o=Yc(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 rhe(e,t,r){if(!hn(e)||!hn(t))return{elementSize:{width:0,height:0},visualSize:{width:0,height:0}};let o=Xn(r,0),n=Math.round(o/90)*90,i=Qn(t.width,t.height,n);if(i.width===0||i.height===0)return{elementSize:{width:0,height:0},visualSize:{width:0,height:0}};let s=Math.min(e.width/i.width,e.height/i.height),l=t.width*s,c=t.height*s,u=Qn(l,c,n);return{elementSize:{width:l,height:c},visualSize:u}}function ohe(e,t,r,o,n){let i=e.width*r.width,s=e.height*r.height;if(!hn(t)||!hn(r)||!(i>0)||!(s>0)||!Number.isFinite(o)||!Number.isFinite(n)||!(o>0)||!(n>=1))return 1;let l=o*t.width/i,c=o*t.height/s,u=Math.min(l,c);return Math.min(n,Math.max(1,u))}function Kh(e,t,r){let o=Zr.create();if(!hn(t)||!hn(r))return o;let n=Ca(e),i=Math.round(n.rotation/90)*90,s=Qn(r.width,r.height,i);if(s.width===0||s.height===0)return o;let l=Math.min(t.width/s.width,t.height/s.height),c=r.width*l,u=r.height*l,{width:d,height:f}=Qn(c,u,i);return Zr.translate(o,o,[t.width/2,t.height/2]),Zr.translate(o,o,[n.pan.x*d,n.pan.y*f]),Zr.scale(o,o,[n.flip.horizontal?-1:1,n.flip.vertical?-1:1]),Zr.rotate(o,o,Yc(n.rotation)),Zr.scale(o,o,[n.zoom,n.zoom]),Zr.translate(o,o,[-c/2,-u/2]),Zr.scale(o,o,[c,u]),o}function aqe(e,t){let r=t.map(l=>{let c=Vs.create();return Vs.transformMat2d(c,l,e),c}),o=r[0][0],n=r[0][0],i=r[0][1],s=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]>s&&(s=c[1])}return{left:o,top:i,width:n-o,height:s-i}}function tE(e){return aqe(e,[[0,0],[1,0],[1,1],[0,1]])}function nhe(e,t,r){let o=Zr.create();if(!hn(t)||!hn(r))return o;let{rotation:n,flip:i,cropRect:s,zoom:l,pan:c}=Ca(e),u=Math.round(n/90)*90,{width:d,height:f}=Qn(t.width,t.height,u),m=s.width*d,h=s.height*f,g=m>0?r.width/m:1,v=h>0?r.height/h:1,b=s.x*d+r.width/2/g,_=s.y*f+r.height/2/v,y=d/2+c.x*d,w=f/2+c.y*f;return Zr.scale(o,o,[g,v]),Zr.translate(o,o,[y-b+r.width/2/g,w-_+r.height/2/v]),Zr.scale(o,o,[i.horizontal?-1:1,i.vertical?-1:1]),Zr.rotate(o,o,Yc(n)),Zr.scale(o,o,[l,l]),Zr.translate(o,o,[-t.width/2,-t.height/2]),o}var ihe=.92;function lqe(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 cqe(e,t){let{naturalWidth:r,naturalHeight:o}=e,{rotation:n,cropRect:i}=t,s={width:r,height:o},l=Math.round(n/90)*90,c=Qn(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=nhe(t,s,{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 uqe(e,t="image/png",r=ihe){return new Promise((o,n)=>{e.toBlob(i=>{i?o(i):n(new Error("Canvas toBlob returned null."))},t,r)})}async function NN(e,t,r="image/png",o=ihe){let n=await lqe(e),i=cqe(n,t);return uqe(i,r,o)}var pp=1e-9;function MN(e,t){let r=Yc(e),o=Math.abs(Math.cos(r)),n=Math.abs(Math.sin(r)),i=Qn(t,1,e);return{visualW:i.width,visualH:i.height,absC:o,absS:n}}function che(e,t,r){let o=Math.max(t,Number.EPSILON),n=Math.round(e/90)*90,{visualW:i,visualH:s}=MN(n,o),{absC:l,absS:c}=MN(e,o),u=r.width*i/2,d=r.height*s/2,f=u*l+d*c,m=u*c+d*l,h=2*f/o,g=2*m;return Math.max(h,g)}function v_(e){if(!e.image)return fp;let t={width:e.image.naturalWidth,height:e.image.naturalHeight};if(!hn(t))return fp;let r=Ca(e),o=t.width/t.height;return Math.max(XT,che(r.rotation,o,r.cropRect))}function uhe(e,t,r){if(!hn(t)||!hn(r))return{minX:0,minY:0,maxX:1,maxY:1};let o=Ca(e),n=o.pan.x*r.width,i=o.pan.y*r.height,s=Yc(o.rotation),l=Math.cos(s),c=Math.sin(s),u=o.flip.horizontal?-1:1,d=o.flip.vertical?-1:1,f=o.zoom,m=u*l*f,h=d*c*f,g=-u*c*f,v=d*l*f,b=t.width/2,_=t.height/2,y=[[-b,-_],[b,-_],[b,_],[-b,_]],w=1/0,S=-1/0,x=1/0,C=-1/0;for(let[A,k]of y){let R=m*A+g*k+n,M=h*A+v*k+i,P=R/r.width+.5,T=M/r.height+.5;w=Math.min(w,P),S=Math.max(S,P),x=Math.min(x,T),C=Math.max(C,T)}return{minX:w,minY:x,maxX:S,maxY:C}}function dhe(e,t,r,o){let n=ON(e),i=Xn(t,1),s=i>=Number.EPSILON?i:1,l=Xn(r,0),c=Xn(o,1),u=Math.max(c,Number.EPSILON),d=Math.round(l/90)*90,{visualW:f,visualH:m}=MN(d,u),{absC:h,absS:g}=MN(l,u),v=n.width,b=n.height,_=v*f,y=b*m,w=_*h+y*g,S=_*g+y*h,x=u*s,C=s,A=1;if(w>0&&(A=Math.min(A,x/w)),S>0&&(A=Math.min(A,C/S)),A>=1-pp)return n;let k=v*A,R=b*A,M=n.x+v/2,P=n.y+b/2,T=M-k/2,N=P-R/2;return T=Math.max(0,Math.min(T,1-k)),N=Math.max(0,Math.min(N,1-R)),{x:T,y:N,width:k,height:R}}var she={width:1e3,height:1e3},ahe=Zr.create(),lhe=Vs.create();function js(e,t,r){let o=Ca(e),n=ON(r),i=hn(t)?t.width/t.height:1,s=Math.max(XT,che(o.rotation,i,n)),l=Math.min(cl,Math.max(o.zoom,s)),c={...o,zoom:l},u=Kh(c,she,t),d=Math.round(o.rotation/90)*90,f=Kh({...c,pan:{x:0,y:0},zoom:1,rotation:d},she,t),m=tE(f),h=[[m.left+n.x*m.width,m.top+n.y*m.height],[m.left+(n.x+n.width)*m.width,m.top+n.y*m.height],[m.left+(n.x+n.width)*m.width,m.top+(n.y+n.height)*m.height],[m.left+n.x*m.width,m.top+(n.y+n.height)*m.height]];Zr.invert(ahe,u);let g=1/0,v=-1/0,b=1/0,_=-1/0;for(let k of h){Vs.transformMat2d(lhe,k,ahe);let R=lhe;R[0]<g&&(g=R[0]),R[0]>v&&(v=R[0]),R[1]<b&&(b=R[1]),R[1]>_&&(_=R[1])}if(g>=-pp&&v<=1+pp&&b>=-pp&&_<=1+pp)return{pan:o.pan,zoom:l};let y=0,w=0;g<0&&v<=1+pp?y=-g:v>1&&g>=-pp?y=1-v:g<0&&v>1&&(y=(1-v-g)/2),b<0&&_<=1+pp?w=-b:_>1&&b>=-pp?w=1-_:b<0&&_>1&&(w=(1-_-b)/2);let S=u[0]*y+u[2]*w,x=u[1]*y+u[3]*w,C=o.pan.x-(m.width>0?S/m.width:0),A=o.pan.y-(m.height>0?x/m.height:0);return{pan:{x:C,y:A},zoom:l}}var dqe=1e-6;function Zh(e,t){return Math.abs(e-t)<dqe}function b_(e,t){let r=e.image,o=t.image;return r?.src===o?.src&&r?.naturalWidth===o?.naturalWidth&&r?.naturalHeight===o?.naturalHeight&&Zh(e.pan.x,t.pan.x)&&Zh(e.pan.y,t.pan.y)&&Zh(e.zoom,t.zoom)&&Zh(e.rotation,t.rotation)&&e.flip.horizontal===t.flip.horizontal&&e.flip.vertical===t.flip.vertical&&Zh(e.cropRect.x,t.cropRect.x)&&Zh(e.cropRect.y,t.cropRect.y)&&Zh(e.cropRect.width,t.cropRect.width)&&Zh(e.cropRect.height,t.cropRect.height)}function fhe(e,t){return e.image?Math.min(cl,Math.max(XT,t)):Math.min(cl,Math.max(fp,t))}function fqe(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:g_(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 Ta(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=dhe(e.cropRect,n,e.rotation,r),s=o;return i!==e.cropRect&&({pan:s}=js({...e,zoom:n,cropRect:i},t,i)),s.x===e.pan.x&&s.y===e.pan.y&&n===e.zoom&&i===e.cropRect?e:{...e,pan:s,zoom:n,cropRect:i}}function mp(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 Bb(e,t){switch(t.type){case"SET_IMAGE":return mp(Ta({...e,image:t.payload}));case"SET_PAN":return mp(Ta({...e,pan:t.payload}));case"SET_ZOOM":{let r=fhe(e,t.payload);return mp(Ta({...e,zoom:r}))}case"SET_ZOOM_AT_POINT":{let r=fhe(e,t.payload.zoom);return mp(Ta({...e,zoom:r,pan:t.payload.pan}))}case"SET_ROTATION":{let r=g_(t.payload),o=e.flip.horizontal!==e.flip.vertical,n=Yc(r-e.baseRotation),i=Math.cos(n),s=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 Ta({...e,rotation:r,zoom:e.baseZoom,pan:{x:u+i*f-s*m,y:d+s*f+i*m}})}case"SNAP_ROTATE_90":{let r=t.payload.direction,n=e.flip.horizontal!==e.flip.vertical?-r:r,i=g_(e.rotation+n*90),s=e.cropRect,l=s.x+s.width/2,c=s.y+s.height/2,u=r===1?-e.pan.y:e.pan.y,d=r===1?e.pan.x:-e.pan.x;return mp(Ta({...e,rotation:i,zoom:e.baseZoom,pan:{x:u,y:d},cropRect:{x:l-s.height/2,y:c-s.width/2,width:s.height,height:s.width}}))}case"SET_FLIP":{let r=e.flip,o=t.payload,n=r.horizontal!==o.horizontal,i=r.vertical!==o.vertical,s=e.cropRect;return mp(Ta({...e,flip:o,pan:{x:n?-e.pan.x:e.pan.x,y:i?-e.pan.y:e.pan.y},cropRect:{x:n?1-s.x-s.width:s.x,y:i?1-s.y-s.height:s.y,width:s.width,height:s.height}}))}case"SET_CROP_RECT":return mp(Ta({...e,cropRect:t.payload}));case"SETTLE_CROP":{let r=e.cropRect;if(r.width===0||r.height===0||!e.image)return e;let o=1/Math.max(r.width,r.height),n=e.zoom>0?cl/e.zoom:o,i=Math.min(o,n),s=r.width*i,l=r.height*i,c=r.x+r.width/2,u=r.y+r.height/2;return mp(Ta({...e,zoom:e.zoom*i,pan:{x:(e.pan.x-c+.5)*i,y:(e.pan.y-u+.5)*i},cropRect:{x:(1-s)/2,y:(1-l)/2,width:s,height:l}}))}case"APPLY_OPERATION":return Bb(e,fqe(e,t.payload));case"RESET":return mp(Ta({...h_,image:e.image,...t.payload}))}}function phe(e,t){let r=Math.min(cl,Math.max(v_(e),t));if(r===e.zoom)return null;let{cropRect:o}=e,n=o.x+o.width/2-.5,i=o.y+o.height/2-.5,s=1-r/e.zoom,l=e.pan.x+(n-e.pan.x)*s,c=e.pan.y+(i-e.pan.y)*s,u=e.image?{width:e.image.naturalWidth,height:e.image.naturalHeight}:{width:1,height:1},{pan:d}=js({...e,zoom:r,pan:{x:l,y:c}},u,e.cropRect);return{type:"SET_ZOOM_AT_POINT",payload:{zoom:r,pan:d}}}function FN(e,t){return{setPan:r=>e({type:"SET_PAN",payload:r}),setZoom:r=>{let o=phe(t(),r);o&&e(o)},setZoomAtPoint:(r,o)=>e({type:"SET_ZOOM_AT_POINT",payload:{zoom:r,pan:o}}),setRotation:r=>e({type:"SET_ROTATION",payload:r}),setFlip:r=>e({type:"SET_FLIP",payload:r}),toggleFlip:r=>{let{flip:o}=t();e({type:"SET_FLIP",payload:{...o,[r]:!o[r]}})},snapRotate90:r=>e({type:"SNAP_ROTATE_90",payload:{direction:r}}),setCropRect:r=>e({type:"SET_CROP_RECT",payload:r}),settleCrop:()=>e({type:"SETTLE_CROP"}),applyOperation:r=>e({type:"APPLY_OPERATION",payload:r})}}var Je=a(U(),1),TW=a(j(),1);function Vb(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 mhe(e){return e<=0?_W:Math.max(_W,jme/e)}var xW={width:.05,height:.05};function DN(e,t,r,o,n,i=xW){let s=o.width>0?(t-e.startX)/o.width:0,l=o.height>0?(r-e.startY)/o.height:0,c=e.startRect,u=e.handle,d=c.y,f=c.y+c.height,m=c.x,h=c.x+c.width;return(u==="n"||u==="nw"||u==="ne")&&(d=Math.max(n.minY,Math.min(c.y+l,f-i.height))),(u==="s"||u==="sw"||u==="se")&&(f=Math.max(d+i.height,Math.min(c.y+c.height+l,n.maxY))),(u==="w"||u==="nw"||u==="sw")&&(m=Math.max(n.minX,Math.min(c.x+s,h-i.width))),(u==="e"||u==="ne"||u==="se")&&(h=Math.max(m+i.width,Math.min(c.x+c.width+s,n.maxX))),{x:m,y:d,width:h-m,height:f-d}}function CW(e,t,r,o,n,i,s=xW,l){if(i<=0||o.width<=0||o.height<=0)return{...e.startRect};let c=(t-e.startX)/o.width,u=(r-e.startY)/o.height,d=e.startRect,f=e.handle,m=f==="nw"||f==="sw"?d.x+d.width:d.x,h=f==="nw"||f==="ne"?d.y+d.height:d.y,g=f==="nw"||f==="sw"?-1:1,v=f==="nw"||f==="ne"?-1:1,b=(f==="nw"||f==="sw"?d.x:d.x+d.width)+c,_=(f==="nw"||f==="ne"?d.y:d.y+d.height)+u,y=(b-m)*g,w=(_-h)*v,S=Math.max(s.width,s.height*i),x=S/i;y=Math.max(y,S),w=Math.max(w,x);let C=i*o.width/o.height;l==="width"||!l&&y*o.width/(w*o.height)>C?w=y/i:y=w*i;let k=g>0?n.maxX-m:m-n.minX,R=v>0?n.maxY-h:h-n.minY;y>k&&(y=k,w=y/i),w>R&&(w=R,y=w*i),y=Math.max(y,S),w=Math.max(w,x);let M=g>0?m:m-y,P=v>0?h:h-w;return{x:M,y:P,width:y,height:w}}function hhe(e,t,r,o,n,i=xW){let s=e.startRect,l=s.width*o.width;if(s.height*o.height<=0||l<=0)return DN(e,t,r,o,n,i);let u=s.width/s.height,d=e.handle;if(d==="nw"||d==="ne"||d==="sw"||d==="se")return CW(e,t,r,o,n,u,i);let f=DN(e,t,r,o,n,i);if(d==="n"||d==="s"){let y=f.height,w=y*u,S=s.x+s.width/2,x=Math.min(S-n.minX,n.maxX-S)*2;w>x&&(w=x,y=w/u);let C=Math.max(i.height,i.width/u);y<C&&(y=C,w=y*u);let A=d==="n"?s.y+s.height-y:s.y;return{x:S-w/2,y:A,width:w,height:y}}let m=f.width,h=m/u,g=s.y+s.height/2,v=Math.min(g-n.minY,n.maxY-g)*2;h>v&&(h=v,m=h*u);let b=Math.max(i.width,i.height*u);return m<b&&(m=b,h=m/u),{x:d==="w"?s.x+s.width-m:s.x,y:g-h/2,width:m,height:h}}var Xr=a(U(),1);var ghe=300,pqe=30,mqe=200;function hp(e){return e.image?{width:e.image.naturalWidth,height:e.image.naturalHeight}:{width:1,height:1}}function LN(e,t){let r=e.clientX-t.clientX,o=e.clientY-t.clientY;return Math.sqrt(r*r+o*o)}var vhe=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??fp}get maxZoom(){return this.options.maxZoom??cl}get zoomSpeed(){return this.options.zoomSpeed??Ume}get keyboardStep(){return this.options.keyboardStep??QT}getKeyboardStep(e){return e.shiftKey?this.keyboardStep*RN: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||e.pointerType==="touch")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:b}=js({...d,pan:{x:c.startPanX+g,y:c.startPanY+v}},hp(d),d.cropRect);this.options.actions.setPan(b)})},i=()=>{t.removeEventListener("pointermove",n),t.removeEventListener("pointerup",s),t.removeEventListener("lostpointercapture",s)},s=()=>{this.setStatus({isDragging:!1}),this.options.onGestureEnd?.(),this.drag=null,cancelAnimationFrame(this.rafId),i(),this.pointerCleanup=null};t.addEventListener("pointermove",n),t.addEventListener("pointerup",s),t.addEventListener("lostpointercapture",s),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?.()},ghe);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(),s=this.options.getImageSize()??n,l=e.currentTarget,c=l instanceof Element?l.getBoundingClientRect():void 0;if(s.width>0&&s.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/s.width,h=d/s.height,g=t.pan.x+(m-t.pan.x)*f,v=t.pan.y+(h-t.pan.y)*f,{pan:b}=js({...t,zoom:o,pan:{x:g,y:v}},hp(t),t.cropRect);this.options.actions.setZoomAtPoint(o,b)}else this.options.actions.setZoom(o)}handleTouchStart(e,t,r=document){if(this.touch&&e.touches.length===2){let n=this.options.getState(),i=LN(e.touches[0],e.touches[1]),s=(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=s,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 s=this.options.getState();this.touch={startDistance:0,startZoom:s.zoom,lastTouchX:e.touches[0].clientX,lastTouchY:e.touches[0].clientY,startPanX:s.pan.x,startPanY:s.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=LN(e.touches[0],e.touches[1]),s=(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:s,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&&(e.preventDefault(),cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(()=>{let r=this.options.getState();if(e.touches.length===2){if(!t.didPinch){t.didPinch=!0,t.startDistance=LN(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],s=e.touches[1],c=LN(i,s)/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+s.clientX)/2-f.left-o.width/2,h=(i.clientY+s.clientY)/2-f.top-o.height/2,g=t.startMidX-f.left-o.width/2,v=t.startMidY-f.top-o.height/2,b=d.width>0?(m-g)/d.width:0,_=d.height>0?(h-v)/d.height:0,y=t.startZoom!==0?1-u/t.startZoom:0,w=g/d.width,S=v/d.height,x=t.startPanX+b+(w-t.startPanX)*y,C=t.startPanY+_+(S-t.startPanY)*y,{pan:A}=js({...r,zoom:u,pan:{x,y:C}},hp(r),r.cropRect);this.options.actions.setZoomAtPoint(u,A)}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,s=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+s,y:t.startPanY+l}},hp(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 s=n-i.time,l=Math.sqrt((t-i.x)**2+(r-i.y)**2);if(!(s<ghe&&l<pqe))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})},mqe),this.options.onGestureStart?.(),h.width>0&&h.height>0){let g=t-o.left-d.width/2,v=r-o.top-d.height/2,b=1-m/u.zoom,_=g/h.width,y=v/h.height,w=u.pan.x+(_-u.pan.x)*b,S=u.pan.y+(y-u.pan.y)*b,{pan:x}=js({...u,zoom:m,pan:{x:w,y:S}},hp(u),u.cropRect);this.options.actions.setZoomAtPoint(m,x)}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}},hp(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}},hp(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}},hp(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}},hp(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 hqe=300;function gqe(e){switch(e.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":return!0;default:return!1}}function vqe(e){switch(e.key){case"+":case"=":case"-":case"_":return!0;default:return!1}}function bhe(e,t,r,o,n){let[i,s]=(0,Xr.useState)(!1),[l,c]=(0,Xr.useState)(!1),[u,d]=(0,Xr.useState)(!1),[f,m]=(0,Xr.useState)(!1),h=(0,Xr.useRef)(),g=(0,Xr.useRef)(!1),v=(0,Xr.useRef)(e);v.current=e;let b=(0,Xr.useRef)(r);b.current=r;let _=(0,Xr.useRef)(o);_.current=o;let y=(0,Xr.useRef)(n);y.current=n;let w=(0,Xr.useRef)(t);w.current=t;let S=(0,Xr.useRef)(null),x=(0,Xr.useCallback)(()=>{d(!0)},[]),C=(0,Xr.useCallback)(()=>{d(!1)},[]),A=(0,Xr.useCallback)(()=>{g.current||(g.current=!0,y.current?.onGestureStart?.()),clearTimeout(h.current),h.current=setTimeout(()=>{g.current=!1,m(!1),y.current?.onGestureEnd?.()},hqe)},[]);(0,Xr.useEffect)(()=>()=>{clearTimeout(h.current)},[]),(0,Xr.useEffect)(()=>{let T=new vhe({getState:()=>v.current,actions:{setPan:N=>w.current.setPan(N),setZoom:N=>w.current.setZoom(N),setZoomAtPoint:(N,L)=>w.current.setZoomAtPoint(N,L),snapRotate90:N=>w.current.snapRotate90(N),toggleFlip:N=>w.current.toggleFlip?.(N)},getContainerSize:()=>b.current,getImageSize:()=>_.current,get minZoom(){return y.current?.minZoom},get maxZoom(){return y.current?.maxZoom},get zoomSpeed(){return y.current?.zoomSpeed},get keyboardStep(){return y.current?.keyboardStep},get doubleTapZoom(){return y.current?.doubleTapZoom},onGestureStart:()=>{x(),y.current?.onGestureStart?.()},onGestureEnd:()=>{C(),y.current?.onGestureEnd?.()},onStatusChange:N=>{s(N.isDragging),c(N.isZooming)}});return S.current=T,()=>{T.destroy(),S.current=null}},[x,C]);let k=(0,Xr.useCallback)(T=>{let N=T.currentTarget;S.current?.handlePointerDown(T.nativeEvent,N)},[]),R=(0,Xr.useCallback)(T=>{let N=T.currentTarget,L=N.getBoundingClientRect();S.current?.handleTouchStart(T.nativeEvent,L,N.ownerDocument)},[]),M=(0,Xr.useCallback)(T=>{gqe(T.nativeEvent)?(m(!0),A()):vqe(T.nativeEvent)&&A(),S.current?.handleKeyDown(T.nativeEvent)},[A]),P=(0,Xr.useCallback)(T=>{S.current?.handleWheel(T)},[]);return{handlers:{onPointerDown:k,onTouchStart:R,onKeyDown:M},onWheelNative:P,isDragging:i,isZooming:l,isPlacementActive:u||f||l}}var whe=a(U(),1);var bqe="matrix(1, 0, 0, 1, 0, 0)";function yhe(e,t){if(!hn(t))return bqe;let r=Ca(e),o=r.pan.x*t.width,n=r.pan.y*t.height,i=Yc(r.rotation),s=Math.cos(i),l=Math.sin(i),c=r.flip.horizontal?-1:1,u=r.flip.vertical?-1:1,d=r.zoom,f=c*s*d,m=u*l*d,h=-c*l*d,g=u*s*d;return`matrix(${f}, ${m}, ${h}, ${g}, ${o}, ${n})`}function _he(e,t){return(0,whe.useMemo)(()=>yhe(e,t),[e,t])}var The=a(Ol(),1),gp=a(U(),1),zs=a(j(),1);function jb(e,t){let r=Ca(e);if(!hn(t))return{x:0,y:0,width:0,height:0,rotation:r.rotation,flip:{...r.flip},zoom:r.zoom};let o={width:1e3,height:1e3},n=Kh(r,o,t),i=Zr.create();Zr.invert(i,n);let s=Kh({...r,pan:{x:0,y:0},zoom:1},o,t),l=tE(s),c=r.cropRect,u=l.left+(c.x+c.width/2)*l.width,d=l.top+(c.y+c.height/2)*l.height,f=Vs.create();Vs.transformMat2d(f,[u,d],i);let m=Math.round(r.rotation/90)*90,{width:h,height:g}=Qn(t.width,t.height,m),v=c.width*h/r.zoom,b=c.height*g/r.zoom;return{x:f[0]*t.width-v/2,y:f[1]*t.height-b/2,width:v,height:b,rotation:r.rotation,flip:{...r.flip},zoom:r.zoom}}function yqe(e,t,r){if(!hn(t)||r.width<=0||r.height<=0)return null;let o=Ca(e),n={width:1e3,height:1e3},i=Kh({...o,pan:{x:0,y:0},zoom:1},n,t),s=tE(i);if(s.width<=0||s.height<=0)return null;let l=Vs.fromValues((r.x+r.width/2)/t.width,(r.y+r.height/2)/t.height),c=Vs.create(),u=Kh(o,n,t);Vs.transformMat2d(c,l,u);let d=Math.round(o.rotation/90)*90,{width:f,height:m}=Qn(t.width,t.height,d);if(f<=0||m<=0)return null;let h=r.width*o.zoom/f,g=r.height*o.zoom/m,v=(c[0]-s.left)/s.width,b=(c[1]-s.top)/s.height;return{x:v-h/2,y:b-g/2,width:h,height:g}}var wqe=1e-6;function _qe(e){let t=g_(e),r=Math.round(t/90)*90;return Math.abs(t-r)<wqe}function She(e,t,r,o){let n=Ca(e);return _qe(n.rotation)?Che(n,t,r,{left:o.includes("w"),top:o.includes("n"),right:o.includes("e"),bottom:o.includes("s")}):r}function xhe(e,t,r){return Che(e,t,r,{left:!0,top:!0,right:!0,bottom:!0})}function Che(e,t,r,o){if(!hn(t))return r;let n=Ca({...e,cropRect:r}),i=jb(n,t),s=o.left||o.right,l=o.top||o.bottom,c=o.left?Math.round(i.x):i.x,u=o.top?Math.round(i.y):i.y,d=o.right?Math.round(i.x+i.width):i.x+i.width,f=o.bottom?Math.round(i.y+i.height):i.y+i.height;if(d<=c||f<=u)return r;let m=yqe(n,t,{...i,x:c,y:u,width:d-c,height:f-u});return m?{x:s?m.x:r.x,y:l?m.y:r.y,width:s?m.width:r.width,height:l?m.height:r.height}:r}var Sqe=300;function xqe(e,t){if(!t||t.flip.horizontal===e.flip.horizontal&&t.flip.vertical===e.flip.vertical)return;let{horizontal:r,vertical:o}=e.flip;return r&&o?(0,zs.__)("Flipped horizontally and vertically"):r?(0,zs.__)("Flipped horizontally"):o?(0,zs.__)("Flipped vertically"):(0,zs.__)("Flip removed")}function Cqe(e,t){if(t&&Math.round(t.rotation)===Math.round(e.rotation))return;let o=e.flip.horizontal!==e.flip.vertical?-1:1,n=Math.round(e.rotation)*o%360;return n>180&&(n-=360),n<=-180&&(n+=360),n===0?t?(0,zs.__)("Rotation 0 degrees"):void 0:n>0?(0,zs.sprintf)((0,zs.__)("Rotated %d degrees clockwise"),n):(0,zs.sprintf)((0,zs.__)("Rotated %d degrees counterclockwise"),Math.abs(n))}function Tqe(e,t){if(!e.image)return;let r={width:e.image.naturalWidth,height:e.image.naturalHeight},o=jb(e,r);if(t?.image){let n=jb({...e,cropRect:t.cropRect},r);if(Math.round(n.width)===Math.round(o.width)&&Math.round(n.height)===Math.round(o.height))return}return(0,zs.sprintf)((0,zs.__)("Crop %1$d by %2$d pixels"),Math.round(o.width),Math.round(o.height))}function Eqe(e,t){if(!(t&&Math.round(t.zoom*100)===Math.round(e.zoom*100)))return(0,zs.sprintf)((0,zs.__)("Zoom %d%%"),Math.round(e.zoom*100))}function Pqe(e,t){let r=xqe(e,t);return r||[Cqe(e,t),Eqe(e,t),Tqe(e,t)].filter(n=>n!==void 0).join(", ")}function Ehe(e){let t=(0,gp.useRef)(),r=(0,gp.useRef)(""),o=(0,gp.useRef)(null),n=(0,gp.useRef)(e);(0,gp.useLayoutEffect)(()=>{n.current=e},[e]),(0,gp.useEffect)(()=>(clearTimeout(t.current),t.current=setTimeout(()=>{let i=n.current,s=Pqe(i,o.current);o.current=i,s!==r.current&&(r.current=s,(0,The.speak)(s))},Sqe),()=>{clearTimeout(t.current)}),[e.zoom,e.rotation,e.cropRect.width,e.cropRect.height,e.flip.horizontal,e.flip.vertical])}var In=a(U(),1),Ed=a(j(),1);var BN={position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0};var y_=a(E(),1),kqe=["nw","ne","se","sw"],Rqe=["nw","n","ne","e","se","s","sw","w"];function Aqe(e){switch(e){case"n":return(0,Ed.__)("Resize from top edge");case"s":return(0,Ed.__)("Resize from bottom edge");case"e":return(0,Ed.__)("Resize from right edge");case"w":return(0,Ed.__)("Resize from left edge");case"nw":return(0,Ed.__)("Resize from top-left corner");case"ne":return(0,Ed.__)("Resize from top-right corner");case"sw":return(0,Ed.__)("Resize from bottom-left corner");case"se":return(0,Ed.__)("Resize from bottom-right corner")}}var Iqe=500;function Phe({cropRect:e,containerSize:t,imageSize:r,onCropChange:o,onResizeStart:n,onResizeEnd:i,aspectRatio:s,freeformCrop:l=!1,isResizeDisabled:c=!1,stencilTransition:u,cropBounds:d,onEscape:f,minCropSize:m,snapCropRect:h,keyboardResizeStep:g}){let v=d?.minX??0,b=d?.minY??0,_=d?.maxX??1,y=d?.maxY??1,w=(0,In.useMemo)(()=>({minX:v,minY:b,maxX:_,maxY:y}),[v,b,_,y]),S=(0,In.useRef)(),x=(0,In.useRef)(!1),C=(0,In.useId)(),A=!!(s&&s>0),k=(0,In.useRef)(null);(0,In.useEffect)(()=>()=>{clearTimeout(S.current),x.current=!1,k.current?.cancel(!1)},[]),(0,In.useEffect)(()=>{c&&k.current?.cancel()},[c]);let R=(0,In.useRef)(null),M=(0,In.useMemo)(()=>!A||r.width===0?0:s*r.height/r.width,[s,A,r.width,r.height]),P=(t.width-r.width)/2,T=(t.height-r.height)/2,N=P+e.x*r.width,L=T+e.y*r.height,F=e.width*r.width,D=e.height*r.height,z=(0,In.useCallback)((Z,Q)=>{if(c||Q.pointerType==="touch"&&Q.isPrimary===!1){Q.preventDefault(),Q.stopPropagation();return}if(Q.button!==0)return;Q.preventDefault(),Q.stopPropagation();let ce=Q.currentTarget.ownerDocument;ce.activeElement instanceof HTMLElement&&ce.activeElement.blur();let re=Q.currentTarget;re.setPointerCapture(Q.pointerId);let fe={handle:Z,startX:Q.clientX,startY:Q.clientY,startRect:{...e}},pe=0,$=Q.clientX,te=Q.clientY,de=Q.shiftKey,ve=ie=>{let le=ie;$=le.clientX,te=le.clientY,de=le.shiftKey,!pe&&(pe=requestAnimationFrame(()=>{pe=0;let Oe=R.current;if(!Oe)return;let ke;Oe.hasLockedRatio?ke=Oe.computeLockedRect(fe,$,te):de?ke=Oe.computeShiftLockedRect(fe,$,te):(ke=Oe.computeFreeRect(fe,$,te),ke=Oe.snapCropRect?.(ke,fe.handle)??ke),Oe.onCropChange(ke)}))},we=!1,oe=(ie=!0,le=!0)=>{we||(we=!0,pe&&(cancelAnimationFrame(pe),pe=0),re.removeEventListener("pointermove",ve),re.removeEventListener("pointerup",ue),re.removeEventListener("lostpointercapture",ue),k.current=null,ie&&R.current?.onResizeEnd?.(),le&&re.focus({preventScroll:!0}))},ee=(ie=!0)=>oe(ie,!1),ue=()=>oe();re.addEventListener("pointermove",ve),re.addEventListener("pointerup",ue),re.addEventListener("lostpointercapture",ue),k.current={cancel:ee},n?.(Z),clearTimeout(S.current),x.current=!1},[e,c,n]),B=(0,In.useCallback)((Z,Q,ce)=>DN(Z,Q,ce,r,w,m),[r,w,m]),O=(0,In.useCallback)((Z,Q,ce,re)=>CW(Z,Q,ce,r,w,M,m,re),[r,w,M,m]),V=(0,In.useCallback)((Z,Q,ce)=>hhe(Z,Q,ce,r,w,m),[r,w,m]);R.current={hasLockedRatio:A,computeLockedRect:O,computeFreeRect:B,computeShiftLockedRect:V,onCropChange:o,onResizeEnd:i,snapCropRect:h};let W=(0,In.useCallback)((Z,Q)=>{let ce=Q.key;if(c)return;if(ce==="Escape"){Q.preventDefault(),Q.stopPropagation(),f?.();return}if(ce!=="ArrowUp"&&ce!=="ArrowDown"&&ce!=="ArrowLeft"&&ce!=="ArrowRight")return;Q.preventDefault(),Q.stopPropagation(),x.current||(x.current=!0,n?.(Z));let re=()=>{clearTimeout(S.current),S.current=setTimeout(()=>{x.current=!1,i?.()},Iqe)},fe=Q.shiftKey?RN:1,pe=g?.width??QT,$=g?.height??QT,te=pe*fe,de=$*fe,ve=0,we=0;ce==="ArrowLeft"&&(ve=-te),ce==="ArrowRight"&&(ve=te),ce==="ArrowUp"&&(we=-de),ce==="ArrowDown"&&(we=de);let oe=ve!==0?"width":"height";if(A){let ee={handle:Z,startX:0,startY:0,startRect:{...e}},ue=ve*r.width,ie=we*r.height;o(O(ee,ue,ie,oe)),re()}else{let ee={handle:Z,startX:0,startY:0,startRect:{...e}},ue=ve*r.width,ie=we*r.height,le=B(ee,ue,ie);o(h?.(le,Z)??le),re()}},[e,A,r.width,r.height,O,B,o,n,i,f,g,h,c]);if(t.width===0||t.height===0)return null;let q=A?kqe:Rqe;return(0,y_.jsxs)("div",{className:"wp-media-editor-image-editor__stencil","data-testid":"cropper-stencil",style:{left:N,top:L,width:F,height:D,transition:u},children:[l&&(0,y_.jsx)("div",{id:C,style:BN,children:(0,Ed.__)("Use arrow keys to resize the crop area. Hold Shift for larger steps.")}),(0,y_.jsx)("div",{className:"wp-media-editor-image-editor__stencil-rect",style:{width:"100%",height:"100%",top:0,left:0}}),l&&q.map(Z=>(0,y_.jsx)("button",{type:"button",className:`wp-media-editor-image-editor__handle wp-media-editor-image-editor__handle--${Z}`,onPointerDown:Q=>z(Z,Q),onTouchStart:Q=>{Q.touches.length<2&&Q.stopPropagation()},onKeyDown:Q=>W(Z,Q),"aria-label":Aqe(Z),"aria-describedby":C},Z))]})}var khe=a(E(),1);function Rhe({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,s=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,khe.jsx)("div",{className:"wp-media-editor-image-editor__dimming","data-testid":"cropper-dimming",style:{left:s,top:l,width:c,height:u,transition:d}})}var zb=a(E(),1);function Ahe({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,s=n+e.y*r.height,l=e.width*r.width,c=e.height*r.height,u=l/3,d=c/3;return(0,zb.jsxs)("div",{className:"wp-media-editor-image-editor__grid","data-testid":"cropper-grid",style:{left:i,top:s,width:l,height:c},children:[(0,zb.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--horizontal",style:{top:d}}),(0,zb.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--horizontal",style:{top:d*2}}),(0,zb.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--vertical",style:{left:u}}),(0,zb.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--vertical",style:{left:u*2}})]})}var w_=a(U(),1),Fhe=a(E(),1),VN=12,Ihe={before:"-100%",center:"-50%",after:"0"},Ohe={before:-1,center:0,after:1},Oqe={before:"after",center:"center",after:"before"};function Nqe(e){let t="center";e.includes("w")?t="before":e.includes("e")&&(t="after");let r="center";return e.includes("n")?r="before":e.includes("s")&&(r="after"),{x:t,y:r}}function Nhe(e,t,r){return e==="before"?t-VN-r:e==="after"?t+VN:t-r/2}function Mhe(e,t,r,o){let n=c=>{let u=Nhe(c,t,r);return u>=0&&u+r<=o};if(n(e))return e;let i=Oqe[e];if(i!==e&&n(i))return i;if(e!=="center"&&n("center"))return"center";let s=c=>{let u=Nhe(c,t,r);return Math.max(0,-u)+Math.max(0,u+r-o)};return[e,i,"center"].reduce((c,u)=>s(u)<s(c)?u:c)}function Dhe({cropRect:e,containerSize:t,imageSize:r,activeHandle:o,outputWidth:n,outputHeight:i}){let s=(0,w_.useRef)(null),[l,c]=(0,w_.useState)(null);if((0,w_.useLayoutEffect)(()=>{if(!s.current)return;let w=s.current.getBoundingClientRect();c(S=>S&&S.width===w.width&&S.height===w.height?S:{width:w.width,height:w.height})},[n,i]),!o||t.width===0||t.height===0)return null;let u=(t.width-r.width)/2,d=(t.height-r.height)/2,f=u+e.x*r.width,m=d+e.y*r.height,h=e.width*r.width,g=e.height*r.height,v=f+h/2;o.includes("w")?v=f:o.includes("e")&&(v=f+h);let b=m+g/2;o.includes("n")?b=m:o.includes("s")&&(b=m+g);let _=Nqe(o),y=l?{x:Mhe(_.x,v,l.width,t.width),y:Mhe(_.y,b,l.height,t.height)}:_;return(0,Fhe.jsx)("div",{ref:s,className:"wp-media-editor-image-editor__dimensions-tooltip","data-testid":"cropper-dimensions-tooltip",style:{left:v+Ohe[y.x]*VN,top:b+Ohe[y.y]*VN,transform:`translate(${Ihe[y.x]}, ${Ihe[y.y]})`},"aria-hidden":"true",children:`W: ${Math.round(n)}px H: ${Math.round(i)}px`})}var jN=a(U(),1);var Xh=a(U(),1);var __={zoom:1,pan:{x:0,y:0}};function Lhe(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===__.zoom&&e.pan.x===__.pan.x&&e.pan.y===__.pan.y?e:__}}function Bhe(){let[e,t]=(0,Xh.useReducer)(Lhe,__),r=(0,Xh.useCallback)(i=>{t({type:"SET_VIEWPORT_ZOOM",payload:i})},[]),o=(0,Xh.useCallback)(i=>{t({type:"SET_VIEWPORT_PAN",payload:i})},[]),n=(0,Xh.useCallback)(()=>{t({type:"RESET_VIEWPORT"})},[]);return(0,Xh.useMemo)(()=>({viewport:e,setViewportZoom:r,setViewportPan:o,resetViewport:n}),[e,r,o,n])}var Vhe=a(E(),1),jhe=(0,jN.createContext)(null);function zhe({children:e}){let t=Bhe();return(0,Vhe.jsx)(jhe.Provider,{value:t,children:e})}function Hhe(){let e=(0,jN.useContext)(jhe);if(!e)throw new Error("useViewport must be used within a ViewportProvider.");return e}var ul=a(E(),1),Zl=1e-6,Mqe=1e-6,S_=200,Fqe=S_+100,Uhe=`transform ${S_}ms ease-out`,Dqe=[`left ${S_}ms ease-out`,`top ${S_}ms ease-out`,`width ${S_}ms ease-out`,`height ${S_}ms ease-out`].join(", ");function Lqe({src:e,controller:t,stencil:r=Phe,showGrid:o=!1,isPlacementActive:n=!1,showDimming:i=!0,showDimensions:s=!0,minZoom:l,maxZoom:c,aspectRatio:u,freeformCrop:d=!1,focusOnMount:f=!1,onImageLoaded:m,onStateChange:h,onGestureStart:g,onGestureEnd:v,className:b},_){let{state:y,setImage:w,setCropRect:S,settleCrop:x,setVisualSize:C,adjustCropRectForViewport:A}=t,{viewport:k,setViewportPan:R,resetViewport:M}=Hhe(),P=(0,Je.useRef)(null),T=(0,Je.useId)(),[N,L]=(0,Je.useState)(f),[F,D]=(0,Je.useState)(!1),[z,B]=(0,Je.useState)({width:0,height:0});(0,Je.useLayoutEffect)(()=>{f&&P.current?.focus({preventScroll:!0})},[f]);let O=(0,Je.useCallback)(Ce=>{let it=Ce.target;it===Ce.currentTarget&&L(!0),Ce.relatedTarget!==null&&it.matches(":focus-visible")&&D(!0)},[]),V=(0,Je.useCallback)(Ce=>{Ce.target===Ce.currentTarget&&L(!1),Ce.currentTarget.contains(Ce.relatedTarget)||D(!1)},[]);(0,Je.useEffect)(()=>{let Ce=P.current;if(!Ce)return;let it=new ResizeObserver(ht=>{for(let bt of ht){let{width:Rr,height:Gr}=bt.contentRect;B(ro=>ro.width===Rr&&ro.height===Gr?ro:{width:Rr,height:Gr})}});return it.observe(Ce),()=>{it.disconnect()}},[]),(0,Je.useEffect)(()=>{h?.(y)},[y,h]),Ehe(y);let W=y.image?.naturalWidth??0,q=y.image?.naturalHeight??0,{elementSize:Z,visualSize:Q}=(0,Je.useMemo)(()=>rhe(z,{width:W,height:q},y.rotation),[z,W,q,y.rotation]);(0,Je.useEffect)(()=>{C(Q)},[Q,C]),(0,Je.useEffect)(()=>{if(d||Q.width===0||Q.height===0||!u||u<=0)return;let Ce=Vb(u,Q),it=y.cropRect;Math.abs(it.x-Ce.x)<Zl&&Math.abs(it.y-Ce.y)<Zl&&Math.abs(it.width-Ce.width)<Zl&&Math.abs(it.height-Ce.height)<Zl||A(Ce)},[d,u,Q,A,y.cropRect]);let ce=(0,Je.useRef)(u);(0,Je.useEffect)(()=>{if(ce.current===u||(ce.current=u,!d||Q.width===0||Q.height===0||!u||u<=0))return;let Ce=Vb(u,Q),it=y.cropRect;Math.abs(it.x-Ce.x)<Zl&&Math.abs(it.y-Ce.y)<Zl&&Math.abs(it.width-Ce.width)<Zl&&Math.abs(it.height-Ce.height)<Zl||A(Ce)},[u,d,Q,A,y.cropRect]);let re=(0,Je.useMemo)(()=>{if(!(!y.image||Z.width===0))return uhe(y,Z,Q)},[y,Z,Q]),fe=l!==void 0?l:v_(y),[pe,$]=(0,Je.useState)(!1),te=(0,Je.useRef)(!1),de=(0,Je.useRef)(!1),[ve,we]=(0,Je.useState)(!1),oe=(0,Je.useRef)(!1),ee=(0,Je.useCallback)(Ce=>{oe.current=Ce,we(Ce)},[]),[ue,ie]=(0,Je.useState)(null),le=(0,Je.useMemo)(()=>ohe(y.cropRect,z,Q,zme,Hme),[y.cropRect,z,Q]),[Oe,ke]=(0,Je.useState)(1),Me=pe?Oe:le,Ne=(0,Je.useMemo)(()=>({width:Q.width*Me,height:Q.height*Me}),[Q.width,Q.height,Me]),Fe=W>0?Z.width/W*y.zoom*Me:0,X=(0,Je.useMemo)(()=>{if(Fe<kN||u&&u>0||W<=0||q<=0)return;let Ce=Math.round(y.rotation/90)*90;if(Math.abs(y.rotation-Ce)>=Mqe)return;let it=Qn(W,q,Ce);if(!(it.width<=0||it.height<=0))return{width:y.zoom/it.width,height:y.zoom/it.height}},[Fe,u,W,q,y.rotation,y.zoom]),ge=(0,Je.useMemo)(()=>{if(W<=0||q<=0)return;let Ce=Math.round(y.rotation/90)*90,it=Qn(W,q,Ce),ht=mhe(Fe);return{width:Math.min(1,ht*y.zoom/it.width),height:Math.min(1,ht*y.zoom/it.height)}},[W,q,y.rotation,y.zoom,Fe]),Ue=(0,Je.useCallback)((Ce,it)=>Fe<kN||W<=0||q<=0?Ce:She(y,{width:W,height:q},Ce,it),[Fe,W,q,y]),Ye=(0,Je.useRef)(!1);(0,Je.useEffect)(()=>{let Ce=d&&(!u||u<=0)&&Fe>=kN&&W>0&&q>0,it=Ye.current;if(Ye.current=Ce,!Ce||it)return;let ht=xhe(y,{width:W,height:q},y.cropRect),bt=y.cropRect;Math.abs(bt.x-ht.x)<Zl&&Math.abs(bt.y-ht.y)<Zl&&Math.abs(bt.width-ht.width)<Zl&&Math.abs(bt.height-ht.height)<Zl||S(ht)},[u,Fe,d,W,q,S,y]);let{handlers:st,onWheelNative:St,isDragging:dt,isZooming:xt,isPlacementActive:Xt}=bhe(y,t,z,Ne,{minZoom:fe,maxZoom:c,onGestureStart:g,onGestureEnd:v}),Xe={...st,onPointerDownCapture:()=>{D(!1)},onTouchStartCapture:Ce=>{Ce.touches.length>1&&ee(!0)},onTouchMoveCapture:Ce=>{Ce.touches.length>1&&ee(!0)},onTouchEndCapture:Ce=>{Ce.touches.length===0&&ee(!1)},onTouchCancelCapture:Ce=>{Ce.touches.length===0&&ee(!1)},onKeyDownCapture:Ce=>{["Shift","Control","Alt","Meta"].includes(Ce.key)||D(!0)},onPointerDown:Ce=>{if(te.current||oe.current||Ce.pointerType==="touch"&&Ce.isPrimary===!1){Ce.preventDefault();return}st.onPointerDown?.(Ce),D(!1)}};(0,Je.useEffect)(()=>{let Ce=P.current;if(!Ce)return;let it=ht=>{if(te.current||de.current){ht.preventDefault();return}St(ht)};return Ce.addEventListener("wheel",it,{passive:!1}),()=>{Ce.removeEventListener("wheel",it)}},[St]);let fs=_he(y,Q),Ga=(0,Je.useCallback)(Ce=>{let it=Ce.currentTarget,ht={width:it.naturalWidth,height:it.naturalHeight};w({src:e,naturalWidth:ht.width,naturalHeight:ht.height}),m?.(ht)},[e,w,m]),kr=(0,Je.useCallback)(Ce=>{if(!oe.current&&(S(Ce),te.current&&Ne.width>0&&Ne.height>0)){let it=(z.width-Ne.width)/2,ht=(z.height-Ne.height)/2,bt=Math.max(0,it+(Ce.x+Ce.width)*Ne.width-z.width),Rr=Math.max(0,-(it+Ce.x*Ne.width)),Gr=Math.max(0,ht+(Ce.y+Ce.height)*Ne.height-z.height),ro=Math.max(0,-(ht+Ce.y*Ne.height));R({x:-bt+Rr,y:-Gr+ro})}},[S,R,z,Ne]),[Oi,an]=(0,Je.useState)(!1),vt=(0,Je.useRef)(),Ft=(0,Je.useCallback)(()=>{clearTimeout(vt.current),de.current=!1,an(!1)},[]);(0,Je.useEffect)(()=>()=>{clearTimeout(vt.current)},[]);let ne=o==="interactive",xe=ne&&(Xt||pe||n),H=(0,Je.useMemo)(()=>{if(!s||!ue||!y.image)return null;let Ce=jb(y,{width:y.image.naturalWidth,height:y.image.naturalHeight});return{width:Ce.width,height:Ce.height}},[s,ue,y]),Pe=(0,Je.useCallback)(()=>{D(!0),P.current?.focus({preventScroll:!0})},[]),Vt=(0,Je.useCallback)(Ce=>{oe.current||(ke(le),te.current=!0,$(!0),ie(Ce??null),Ft(),M(),g?.())},[Ft,g,M,le]),Ee=(0,Je.useCallback)(()=>{let Ce=oe.current;if(te.current=!1,$(!1),ie(null),clearTimeout(vt.current),Ce){Ft(),M();return}de.current=!0,an(!0),M(),x(),v?.(),vt.current=setTimeout(Ft,Fqe)},[Ft,x,v,M]),Ro=(0,Je.useCallback)(Ce=>{!de.current||Ce.propertyName!=="transform"||Ft()},[Ft]),Ie;Oi?Ie=Uhe:xt&&(Ie="transform 150ms linear");let mr=Oi?Dqe:void 0,me=(0,Je.useMemo)(()=>{if(Z.width===0||Z.height===0)return{};let Ce=(z.width-Z.width)/2,it=(z.height-Z.height)/2;return{width:Z.width,height:Z.height,maxWidth:Z.width,maxHeight:Z.height,left:Ce,top:it,transform:`scale(${Me}) ${fs}`,transition:Ie,imageRendering:Fe>1?"pixelated":void 0}},[z,Z,fs,Ie,Fe,Me]),he=Oi?Uhe:void 0,ea=pe||Oi?"transform":void 0,Wt;k.pan.x!==0||k.pan.y!==0?Wt={transform:`translate(${k.pan.x}px, ${k.pan.y}px)`,transition:he,willChange:ea}:Oi&&(Wt={transform:"translate(0px, 0px)",transition:he,willChange:ea});let ze=(0,Je.useCallback)(Ce=>{typeof _=="function"?_(Ce):_&&(_.current=Ce)},[_]);return(0,ul.jsx)("div",{ref:ze,className:J("wp-media-editor-image-editor",dt&&"wp-media-editor-image-editor--dragging",b),children:(0,ul.jsxs)("div",{ref:P,className:J("wp-media-editor-image-editor__canvas",ne&&"wp-media-editor-image-editor__canvas--grid-interactive",xe&&"wp-media-editor-image-editor__canvas--show-grid",Oi&&"wp-media-editor-image-editor__canvas--settling",F&&"wp-media-editor-image-editor__canvas--focus-visible"),tabIndex:0,role:"group","aria-label":(0,TW.__)("Crop area"),"aria-describedby":N?T:void 0,onFocus:O,onBlur:V,...Xe,children:[(0,ul.jsx)("div",{id:T,style:BN,children:(0,TW.__)("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,ul.jsxs)("div",{className:"wp-media-editor-image-editor__stage","data-testid":"cropper-stage",style:Wt,onTransitionEnd:Ro,children:[(0,ul.jsx)("img",{className:"wp-media-editor-image-editor__image","data-testid":"cropper-image",src:e,alt:"",onLoad:Ga,style:me,draggable:!1}),i&&(0,ul.jsx)(Rhe,{cropRect:y.cropRect,containerSize:z,imageSize:Ne,transition:mr}),(0,ul.jsx)(r,{cropRect:y.cropRect,containerSize:z,imageSize:Ne,onCropChange:kr,onResizeStart:Vt,onResizeEnd:Ee,onEscape:Pe,aspectRatio:u,freeformCrop:d,isResizeDisabled:ve,stencilTransition:mr,cropBounds:re,minCropSize:ge,snapCropRect:Ue,keyboardResizeStep:X}),(o===!0||ne)&&(0,ul.jsx)(Ahe,{cropRect:y.cropRect,containerSize:z,imageSize:Ne}),ue&&H&&(0,ul.jsx)(Dhe,{cropRect:y.cropRect,containerSize:z,imageSize:Ne,activeHandle:ue,outputWidth:H.width,outputHeight:H.height})]})]})})}var Bqe=(0,Je.forwardRef)(Lqe),zN=(0,Je.forwardRef)((e,t)=>(0,ul.jsx)(zhe,{children:(0,ul.jsx)(Bqe,{...e,ref:t})}));var ir=a(U(),1);var HN={aspectRatioValue:"0"};function UN(e,t){switch(t.type){case"CROPPER":{let r=Bb(e.cropper,t.action);return r===e.cropper?e:{...e,cropper:r}}case"SET_ASPECT_RATIO_VALUE":{let{presetKey:r,resolved:o,visualSize:n}=t.payload,i=o!==void 0&&o>0&&n.width>0&&n.height>0,s={...e.cropOptions,aspectRatioValue:r};if(!i)return e.cropOptions.aspectRatioValue===r?e:{...e,cropOptions:s};let l=Vb(o,n);return{cropper:Bb(e.cropper,{type:"SET_CROP_RECT",payload:l}),cropOptions:s}}case"RESET_CROP_OPTIONS":return e.cropOptions.aspectRatioValue===HN.aspectRatioValue?e:{...e,cropOptions:{...HN}};case"RESTORE_SNAPSHOT":return t.payload;case"VIEWPORT_ADJUST_CROP_RECT":{let r=Bb(e.cropper,{type:"SET_CROP_RECT",payload:t.payload});return r===e.cropper?e:{...e,cropper:r}}}}function rE(e,t){return e===t?!0:b_(e.cropper,t.cropper)&&e.cropOptions.aspectRatioValue===t.cropOptions.aspectRatioValue}function Whe(e,t){return{cropper:e,cropOptions:{...HN,...t}}}function x_(e,t){let r=parseFloat(e);if(!(r===0||Number.isNaN(r))){if(r===$T)return t&&t.naturalWidth>0&&t.naturalHeight>0?t.naturalWidth/t.naturalHeight:void 0;if(r>0)return r}}function jqe(e,t){return e?.src===t?.src&&e?.naturalWidth===t?.naturalWidth&&e?.naturalHeight===t?.naturalHeight}function EW(e){let[t,r]=(0,ir.useReducer)(UN,null,()=>Whe(Ta({...h_,...e?.cropper}),e?.cropOptions)),[o,n]=(0,ir.useState)(()=>t),i=(0,ir.useRef)(t),s=(0,ir.useRef)({width:0,height:0}),l=(0,ir.useRef)([]),c=(0,ir.useRef)([]),[u,d]=(0,ir.useState)(!1),[f,m]=(0,ir.useState)(!1),h=(0,ir.useRef)(!1),g=(0,ir.useRef)(null),v=(0,ir.useCallback)(z=>{let B=l.current[l.current.length-1];B&&rE(B,z)||(l.current=[...l.current,z],c.current=[],d(!0),m(!1))},[]),b=(0,ir.useCallback)((z,B=!0)=>{let O=i.current,V=UN(O,z);B&&(rE(O,V)||(h.current?g.current===null&&(g.current=O):v(O))),i.current=V,r(z)},[v]),_=(0,ir.useCallback)(()=>{h.current||(h.current=!0,g.current=null)},[]),y=(0,ir.useCallback)(()=>{let z=g.current;z&&!rE(z,i.current)&&v(z),g.current=null,h.current=!1},[v]),w=(0,ir.useCallback)(z=>{b({type:"CROPPER",action:z})},[b]),S=(0,ir.useMemo)(()=>FN(w,()=>i.current.cropper),[w]),x=(0,ir.useCallback)(z=>{if(jqe(i.current.cropper.image,z))return;let B={type:"CROPPER",action:{type:"SET_IMAGE",payload:z}},O=UN(i.current,B);i.current=O,r(B),n(O),h.current=!1,g.current=null,l.current=[],c.current=[],d(!1),m(!1)},[]),C=(0,ir.useCallback)(z=>{b({type:"CROPPER",action:{type:"RESET",payload:z}})},[b]),A=(0,ir.useCallback)(z=>{let B=x_(z,i.current.cropper.image);b({type:"SET_ASPECT_RATIO_VALUE",payload:{presetKey:z,resolved:B,visualSize:s.current}})},[b]),k=(0,ir.useCallback)(()=>{b({type:"RESET_CROP_OPTIONS"})},[b]),R=(0,ir.useCallback)(()=>{y();let z=l.current[l.current.length-1];z&&(c.current=[i.current,...c.current],l.current=l.current.slice(0,-1),d(l.current.length>0),m(!0),i.current=z,r({type:"RESTORE_SNAPSHOT",payload:z}))},[y]),M=(0,ir.useCallback)(()=>{y();let z=c.current[0];z&&(l.current=[...l.current,i.current],c.current=c.current.slice(1),d(!0),m(c.current.length>0),i.current=z,r({type:"RESTORE_SNAPSHOT",payload:z}))},[y]),P=(0,ir.useCallback)(z=>{s.current=z},[]),T=(0,ir.useCallback)(z=>{b({type:"VIEWPORT_ADJUST_CROP_RECT",payload:z},!1)},[b]),N=!rE(t,o),L=!b_(t.cropper,o.cropper),F=(0,ir.useCallback)((z,B)=>t.cropper.image?NN(t.cropper.image.src,t.cropper,z,B):Promise.reject(new Error("No image loaded \u2014 call setImage first.")),[t.cropper]);return(0,ir.useMemo)(()=>({...S,state:t.cropper,setImage:x,reset:C,isDirty:N,getCroppedImage:F,cropOptions:t.cropOptions,setAspectRatioValue:A,resetCropOptions:k,isCropperDirty:L,hasUndo:u,hasRedo:f,undo:R,redo:M,beginGesture:_,endGesture:y,setVisualSize:P,adjustCropRectForViewport:T}),[S,t.cropper,x,C,N,F,t.cropOptions,A,k,L,u,f,R,M,_,y,P,T])}var WN=a(U(),1);var Ghe=a(E(),1),Yhe=(0,WN.createContext)(null);function PW({initialCropperState:e,initialCropOptions:t,children:r}){let o=EW({cropper:e,cropOptions:t});return(0,Ghe.jsx)(Yhe.Provider,{value:o,children:r})}function Ea(){let e=(0,WN.useContext)(Yhe);if(!e)throw new Error("useMediaEditor must be used within a MediaEditorStateProvider.");return e}var Pd=a(E(),1);function Zhe({focusOnMount:e,isPlacementActive:t=!1,onGestureStart:r,onGestureEnd:o}){let{media:n}=Nw(),i=Ea(),{aspectRatioValue:s}=i.cropOptions,l=i.state.image,{beginGesture:c,endGesture:u,setImage:d}=i,[f,m]=(0,kd.useState)("loading"),h=(0,kd.useMemo)(()=>x_(s,l),[s,l]),g=(0,kd.useCallback)(()=>{c(),r?.()},[c,r]),v=(0,kd.useCallback)(()=>{u(),o?.()},[u,o]),b=n?.source_url,_=sb(n?.mime_type),y=Number(n?.media_details?.width),w=Number(n?.media_details?.height);(0,kd.useEffect)(()=>{l||!b||!Number.isFinite(y)||!Number.isFinite(w)||y<=0||w<=0||d({src:b,naturalWidth:y,naturalHeight:w})},[l,b,y,w,d]);let S=_.type==="image";return(0,kd.useEffect)(()=>{if(!b||!S)return;m("loading");let x=new window.Image;return x.onload=()=>m("loaded"),x.onerror=()=>m("error"),x.src=b,x.complete&&m(x.naturalWidth>0?"loaded":"error"),()=>{x.onload=null,x.onerror=null}},[b,S]),!b||!S?null:f==="error"?(0,Pd.jsx)("div",{className:"media-editor-canvas",children:(0,Pd.jsx)("div",{className:"media-editor-canvas__error",role:"alert",children:(0,Pd.jsx)("p",{children:(0,Khe.__)("Failed to load image.")})})}):(0,Pd.jsxs)("div",{className:"media-editor-canvas",children:[f==="loading"&&(0,Pd.jsx)("div",{className:"media-editor-canvas__spinner",children:(0,Pd.jsx)(qhe.Spinner,{})}),(0,Pd.jsx)("div",{className:J("media-editor-canvas__cropper",{"is-loaded":f==="loaded"}),children:(0,Pd.jsx)(zN,{src:b,controller:i,aspectRatio:h,freeformCrop:!0,focusOnMount:e&&f==="loaded",showGrid:"interactive",isPlacementActive:t,onGestureStart:g,onGestureEnd:v})})]})}var tge=a(j(),1);var qc=a(U(),1);var oE="data-crop-control",zqe=300;function Xhe(e={}){let{commitOnKeyUp:t=!0}=e,{beginGesture:r,endGesture:o}=Ea(),n=(0,qc.useRef)(),i=(0,qc.useCallback)(()=>{clearTimeout(n.current)},[]),s=(0,qc.useCallback)(()=>{i(),n.current=setTimeout(()=>{o()},zqe)},[i,o]);(0,qc.useEffect)(()=>i,[i]);let l=(0,qc.useCallback)(()=>{i(),r()},[r,i]),c=(0,qc.useCallback)(()=>{i(),o()},[i,o]),u=(0,qc.useCallback)(()=>{r(),t||s()},[r,t,s]),d=(0,qc.useCallback)(()=>{if(t){o();return}s()},[t,o,s]);return{[oE]:!0,onPointerDownCapture:l,onPointerUp:c,onPointerCancel:c,onKeyDownCapture:u,onKeyUp:d}}var Hb=a(U(),1);var vp=a(U(),1);function Hqe(e,t,r){return-e/t*r}function GN(e,t,r){return e<t?t:e>r?r:e}function Uqe(e,t){return Math.round(e/t)*t}function Qhe(e){let{value:t,onChange:r,min:o,max:n,step:i,pixelsPerStep:s,disabled:l,onPointerDownStart:c}=e,u=(0,vp.useRef)({value:t,startX:0,startValue:0,activeStep:i,dragging:!1,captureElement:null,capturePointerId:0,windowPointerUp:null});(0,vp.useEffect)(()=>{u.current.value=t},[t]);let d=(0,vp.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,vp.useEffect)(()=>d,[d]);let f=(0,vp.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,vp.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 b=h.clientX-g.startX,_=Hqe(b,s,g.activeStep),y=g.startValue+_,w=Uqe(y,g.activeStep),S=GN(w,o,n);S!==g.value&&(g.value=S,r(S))},[r,o,n,i,s]);return{onPointerDown:f,onPointerMove:m,onPointerUp:d,onPointerCancel:d}}var dl=a(E(),1),YN=32,Wqe=11,Jhe=15,Gqe=4,Yqe=8,qqe=14;function Kqe(e,t){return(0,Hb.useMemo)(()=>{let r=[];for(let o=Math.ceil(e);o<=Math.floor(t);o+=1){let n="minor",i=Gqe;o%15===0?(n="major",i=qqe):o%5===0&&(n="mid",i=Yqe),r.push({value:o,kind:n,height:i})}return r},[e,t])}function $he(e){let t=Math.round(e*10)/10;return Number.isInteger(t)?t.toFixed(0):t.toFixed(1)}function ege(e){let{value:t,onChange:r,min:o=-45,max:n=45,step:i=1,label:s,unit:l="\xB0",pixelsPerStep:c=6,className:u,id:d,disabled:f=!1}=e,m=(0,Hb.useRef)(null),h=(0,Hb.useId)(),g=d??h,v=Qhe({value:t,onChange:r,min:o,max:n,step:i,pixelsPerStep:c,disabled:f,onPointerDownStart:()=>m.current?.focus()}),b=P=>{let T=P.key==="ArrowRight"||P.key==="ArrowUp",N=P.key==="ArrowLeft"||P.key==="ArrowDown";if(!T&&!N||(P.preventDefault(),f))return;let L=T?1:-1,F=P.shiftKey?i/2:i,D=GN(t+L*F,o,n);D!==t&&r(D)},_=`${$he(t)}${l}`,y=Kqe(o,n),w=c/i,S=(0,Hb.useMemo)(()=>({transform:`translateX(calc(-50% + ${-t*w}px))`}),[t,w]),x=Math.round(t/Jhe)*Jhe,A=Math.abs(t-x)<.01?`${x}`:$he(t),k=A.startsWith("-"),R=k?A.slice(1):A,M=y.filter(P=>P.kind==="major");return(0,dl.jsxs)("div",{className:J("rotation-ruler",u),role:"presentation","data-disabled":f||void 0,...v,children:[(0,dl.jsx)("input",{ref:m,id:g,type:"range",className:"rotation-ruler__input",min:o,max:n,step:"any",value:t,disabled:f,"aria-label":s,"aria-valuetext":_,onChange:P=>r(GN(P.target.valueAsNumber,o,n)),onKeyDown:b}),(0,dl.jsx)("div",{className:"rotation-ruler__strip","aria-hidden":"true",children:(0,dl.jsxs)("svg",{className:"rotation-ruler__ticks",style:S,width:(n-o)*w,height:YN,viewBox:`${o*w} 0 ${(n-o)*w} ${YN}`,preserveAspectRatio:"xMidYMid meet",children:[y.map(P=>(0,dl.jsx)("line",{x1:P.value*w,x2:P.value*w,y1:YN-P.height,y2:YN,className:`rotation-ruler__tick rotation-ruler__tick--${P.kind}`},P.value)),M.map(P=>(0,dl.jsxs)("text",{x:P.value*w,y:Wqe,textAnchor:"middle",className:"rotation-ruler__label",children:[P.value,l]},P.value))]})}),(0,dl.jsx)("div",{className:"rotation-ruler__active-label","aria-hidden":"true",children:(0,dl.jsxs)("span",{className:"rotation-ruler__active-label-number",children:[k&&(0,dl.jsx)("span",{className:"rotation-ruler__active-label-sign",children:"-"}),R,(0,dl.jsx)("span",{className:"rotation-ruler__active-label-unit",children:l})]})}),(0,dl.jsx)("div",{className:"rotation-ruler__pointer","aria-hidden":"true"})]})}var kW=a(E(),1);function rge({onPlacementControlInteraction:e}){let{state:t,setRotation:r}=Ea(),o=Xhe({commitOnKeyUp:!1}),n=Math.round(t.rotation/90)*90,s=t.flip.horizontal!==t.flip.vertical?-1:1,l=(t.rotation-n)*s,c=u=>{let f=Math.max(-JT+.01,Math.min(JT-.01,u));e?.(),r(n+f*s)};return(0,kW.jsx)("div",{role:"presentation",className:"media-editor-fine-rotation",...o,children:(0,kW.jsx)(ege,{label:(0,tge.__)("Fine rotation"),min:-JT,max:JT,value:l,onChange:c})})}var fl=a(G(),1),Hs=a(j(),1);var RW=a(U(),1);function Zqe(e){return[...eE.filter(t=>t.value<=0),...e??eE.filter(t=>t.value>0)]}function qN({aspectRatioPresets:e}={}){let t=Ea(),{aspectRatioValue:r}=t.cropOptions,o=t.state.image,n=(0,RW.useMemo)(()=>Zqe(e),[e]),i=(0,RW.useMemo)(()=>x_(r,o),[r,o]);return{aspectRatioValue:r,setAspectRatioValue:t.setAspectRatioValue,aspectRatioOptions:n,resolvedAspectRatio:i,resetCropOptions:t.resetCropOptions}}var ur=a(E(),1),Xqe=1.2;function KN({withLabels:e=!1,showAspectRatioControl:t=!1,aspectRatioPresets:r,zoomFactor:o=Xqe}){let{state:n,setFlip:i,snapRotate90:s,setZoom:l}=Ea(),{aspectRatioValue:c,setAspectRatioValue:u,aspectRatioOptions:d}=qN({aspectRatioPresets:r}),f=!e&&t,m=v_(n),h=y=>{l(Math.min(cl,Math.max(m,n.zoom*y)))},g=(0,ur.jsxs)(ur.Fragment,{children:[(0,ur.jsx)(fl.Button,{size:"compact",icon:x1,label:(0,Hs.__)("Rotate 90\xB0 counter-clockwise"),showTooltip:!0,onClick:()=>s(-1)}),(0,ur.jsx)(fl.Button,{size:"compact",icon:C1,label:(0,Hs.__)("Rotate 90\xB0 clockwise"),showTooltip:!0,onClick:()=>s(1)})]}),v=(0,ur.jsxs)(ur.Fragment,{children:[(0,ur.jsx)(fl.Button,{size:"compact",icon:YB,label:(0,Hs.__)("Flip horizontal"),showTooltip:!0,isPressed:n.flip.horizontal,onClick:()=>i({horizontal:!n.flip.horizontal,vertical:n.flip.vertical})}),(0,ur.jsx)(fl.Button,{size:"compact",icon:KB,label:(0,Hs.__)("Flip vertical"),showTooltip:!0,isPressed:n.flip.vertical,onClick:()=>i({horizontal:n.flip.horizontal,vertical:!n.flip.vertical})})]}),b=(0,ur.jsxs)(ur.Fragment,{children:[(0,ur.jsx)(fl.Button,{size:"compact",icon:Cc,label:(0,Hs.__)("Zoom in"),showTooltip:!0,disabled:n.zoom>=cl,accessibleWhenDisabled:!0,onClick:()=>h(o)}),(0,ur.jsx)(fl.Button,{size:"compact",icon:aV,label:(0,Hs.__)("Zoom out"),showTooltip:!0,disabled:n.zoom<=m,accessibleWhenDisabled:!0,onClick:()=>h(1/o)})]}),_=f?(0,ur.jsx)(fl.DropdownMenu,{icon:Q4,label:(0,Hs.__)("Aspect ratio"),popoverProps:{placement:"top"},toggleProps:{size:"compact"},children:({onClose:y})=>(0,ur.jsx)(fl.MenuGroup,{label:(0,Hs.__)("Aspect ratio"),children:d.map(w=>{let S=w.value.toString(),x=S===c;return(0,ur.jsx)(fl.MenuItem,{role:"menuitemradio",isSelected:x,icon:x?Io:void 0,onClick:()=>{u(S),y()},children:w.label},S)})})}):null;return e?(0,ur.jsxs)("div",{className:"media-editor-image-controls is-stacked",children:[(0,ur.jsxs)("div",{className:"media-editor-image-controls__transforms",children:[(0,ur.jsxs)("div",{className:"media-editor-image-controls__group",role:"group","aria-label":(0,Hs.__)("Rotate"),children:[(0,ur.jsx)("span",{className:"media-editor-image-controls__label","aria-hidden":"true",children:(0,Hs.__)("Rotate")}),(0,ur.jsx)("div",{className:"media-editor-image-controls__buttons",children:g})]}),(0,ur.jsxs)("div",{className:"media-editor-image-controls__group",role:"group","aria-label":(0,Hs.__)("Flip"),children:[(0,ur.jsx)("span",{className:"media-editor-image-controls__label","aria-hidden":"true",children:(0,Hs.__)("Flip")}),(0,ur.jsx)("div",{className:"media-editor-image-controls__buttons",children:v})]})]}),(0,ur.jsxs)("div",{className:"media-editor-image-controls__group",role:"group","aria-label":(0,Hs.__)("Zoom"),children:[(0,ur.jsx)("span",{className:"media-editor-image-controls__label","aria-hidden":"true",children:(0,Hs.__)("Zoom")}),(0,ur.jsx)("div",{className:"media-editor-image-controls__buttons",children:b})]})]}):(0,ur.jsxs)("div",{className:"media-editor-image-controls",children:[g,v,b,_]})}var oge=a(G(),1);var AW=a(j(),1);var Ub=a(E(),1);function nge({aspectRatioValue:e,onAspectRatioChange:t,aspectRatioOptions:r,showTransformControls:o=!1}){return(0,Ub.jsxs)(se,{direction:"column",gap:"xl",[oE]:!0,children:[(0,Ub.jsx)(Gt,{render:(0,Ub.jsx)("h2",{}),children:(0,AW.__)("Crop options")}),o&&(0,Ub.jsx)(KN,{withLabels:!0}),(0,Ub.jsx)(oge.SelectControl,{label:(0,AW.__)("Aspect ratio"),value:e,onChange:t,options:r.map(n=>({label:n.label,value:n.value.toString()}))})]})}var ige=a(G(),1),sge=a(U(),1),Us=a(j(),1),nE=a(Mo(),1),Kc=a(E(),1),Qqe=[{description:(0,Us.__)("Undo"),keyCombination:{modifier:"primary",character:"z"}},{description:(0,Us.__)("Redo"),keyCombination:{modifier:"primaryShift",character:"z"}},{description:(0,Us.__)("Pan"),keyCombination:{character:["\u2191","\u2193","\u2190","\u2192"],ariaLabel:(0,Us.__)("Arrow keys")}},{description:(0,Us.__)("Zoom in"),keyCombination:{character:"+"}},{description:(0,Us.__)("Zoom out"),keyCombination:{character:"-"}},{description:(0,Us.__)("Rotate 90\xB0 clockwise"),keyCombination:{character:"R"}},{description:(0,Us.__)("Rotate 90\xB0 counter-clockwise"),keyCombination:{modifier:"shift",character:"R"}},{description:(0,Us.__)("Flip horizontal"),keyCombination:{character:"H"}},{description:(0,Us.__)("Flip vertical"),keyCombination:{character:"V"}},{description:(0,Us.__)("Pan or resize crop (large step)"),keyCombination:{modifier:"shift",character:["\u2191","\u2193","\u2190","\u2192"],ariaLabel:(0,Us.__)("Shift + Arrow keys")}}];function Jqe({keyCombination:e}){let{modifier:t,character:r,ariaLabel:o}=e,n;Array.isArray(r)?t?n=[...nE.displayShortcutList[t](r[0]).slice(0,-1),...r]:n=r:n=t?nE.displayShortcutList[t](r):[r];let i=Array.isArray(r)?r.join(""):r,s;return o?s=o:t?s=nE.shortcutAriaLabel[t](i):s=i,(0,Kc.jsx)("kbd",{className:"media-editor-keyboard-shortcuts-modal__shortcut-term","aria-label":s,children:n.map((l,c)=>l==="+"&&t?(0,Kc.jsx)(sge.Fragment,{children:l},c):(0,Kc.jsx)("kbd",{className:"media-editor-keyboard-shortcuts-modal__shortcut-key",children:l},c))})}function age({onClose:e}){return(0,Kc.jsxs)(ige.Modal,{className:"media-editor-keyboard-shortcuts-modal",title:(0,Us.__)("Keyboard shortcuts"),onRequestClose:e,children:[(0,Kc.jsx)("p",{className:"media-editor-keyboard-shortcuts-modal__note",children:(0,Us.__)("These shortcuts work when the image editor has focus.")}),(0,Kc.jsx)("ul",{className:"media-editor-keyboard-shortcuts-modal__shortcut-list",role:"list",children:Qqe.map(({description:t,keyCombination:r},o)=>(0,Kc.jsxs)("li",{className:"media-editor-keyboard-shortcuts-modal__shortcut",children:[(0,Kc.jsx)("span",{className:"media-editor-keyboard-shortcuts-modal__shortcut-description",children:t}),(0,Kc.jsx)(Jqe,{keyCombination:r})]},o))})]})}var cge=a(Bu(),1),iE=a(Y(),1),IW=a(ae(),1),XN=a(U(),1),Wb=a(j(),1),uge=a(It(),1);var ZN=.1;function lge(e,t){let r=[];if(t.width===0||t.height===0)return r;let{cropRect:o,pan:n,zoom:i,flip:s}=e,l=s.horizontal,c=s.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}=Qn(t.width,t.height,m),{width:v,height:b}=Qn(t.width,t.height,e.rotation),_=.5+n.x-i/2,y=.5+n.y-i/2,w=(o.x-_)/i*h,S=(o.y-y)/i*g,x=o.width/i*h,C=o.height/i*g,A=(v-h)/2,k=(b-g)/2,R=w+A,M=S+k,P=R/v*100,T=M/b*100,N=x/v*100,L=C/b*100;return P<=ZN&&T<=ZN&&N>=100-ZN&&L>=100-ZN||r.push({type:"crop",args:{left:P,top:T,width:N,height:L}}),r}var $qe=["title","caption","description","alt_text","post"],sE="media-editor";function eKe(e){return!e.isCropperDirty||!e.state.image?[]:lge(e.state,{width:e.state.image.naturalWidth,height:e.state.image.naturalHeight})}function tKe(e,t){let r={};for(let o of $qe)e&&o in e&&(r[o]=e[o]);return!("post"in r)&&t?.post!==void 0&&(r.post=t.post),r}function dge({cropper:e,id:t,isImage:r,media:o,onSaved:n}){let i=(0,iE.useRegistry)(),{clearEntityRecordEdits:s,receiveEntityRecords:l,saveEditedEntityRecord:c}=(0,iE.useDispatch)(IW.store),{createErrorNotice:u,removeAllNotices:d}=(0,iE.useDispatch)(uge.store),[f,m]=(0,XN.useState)(!1),h=(0,XN.useCallback)(async()=>{d("snackbar",sE),m(!0);try{let g,v=eKe(e),b=v.length>0&&o?{id:t,url:o.source_url}:void 0;if(v.length>0){let y=i.select(IW.store).getEntityRecordNonTransientEdits("postType","attachment",t),w=tKe(y,o);g=await(0,cge.default)({path:`/wp/v2/media/${t}/edit`,method:"POST",data:{src:o?.source_url,modifiers:v,...w}}),g&&l("postType","attachment",g,void 0,!0)}else g=await c("postType","attachment",t);let _=g??o;_&&_.id!==t&&s("postType","attachment",t),_&&_.id&&(_.id===t&&e.reset(),n?.({id:_.id,url:_.source_url,media:_,previous:b}))}catch(g){let v=g instanceof Error?g.message:g?.message??(0,Wb.__)("An unknown error occurred.");u(r?(0,Wb.sprintf)((0,Wb.__)("Could not save image. %s"),v):(0,Wb.sprintf)((0,Wb.__)("Could not save media. %s"),v),{type:"snackbar",context:sE})}finally{m(!1)}},[s,u,e,t,r,o,n,l,i,d,c]);return{isSaving:f,save:h}}var ct=a(E(),1),fge={_embed:"author,wp:attached-to"},rKe=300;function oKe({tabs:e}){return(0,ct.jsx)(Kl,{scope:"media-editor",identifier:"media-editor/details",title:(0,Jn.__)("Details"),icon:wf,isActiveByDefault:!0,className:"media-editor__sidebar",panelClassName:"media-editor__sidebar-panel",headerClassName:"media-editor__sidebar-header",closeLabel:(0,Jn.__)("Close media panel"),header:(0,ct.jsx)(En.List,{variant:"minimal",children:e.map(t=>(0,ct.jsx)(En.Tab,{value:t.id,children:t.title},t.id))}),children:e.map(t=>(0,ct.jsx)(En.Panel,{value:t.id,tabIndex:-1,children:t.panel},t.id))})}function nKe({isSaving:e,isImage:t,showCloseButton:r=!1,onCancel:o}){let[n,i]=(0,gn.useState)(!1);return(0,ct.jsxs)(ts.Flex,{className:"media-editor__header-actions",justify:"flex-end",expanded:!1,gap:2,children:[t&&(0,ct.jsx)(ts.Button,{size:"compact",icon:h1,label:(0,Jn.__)("Keyboard shortcuts"),onClick:()=>i(!0)}),(0,ct.jsx)(Wh.Slot,{scope:"media-editor"}),r&&(0,ct.jsx)(ts.Button,{size:"compact",icon:a1,label:(0,Jn.__)("Close"),onClick:o,disabled:e,accessibleWhenDisabled:!0}),n&&(0,ct.jsx)(age,{onClose:()=>i(!1)})]})}function iKe({isUndoRedoDisabled:e=!1,onReset:t}){let{reset:r,isDirty:o,hasUndo:n,hasRedo:i,undo:s,redo:l,beginGesture:c,endGesture:u}=Ea(),d=()=>{e||s()},f=()=>{e||l()};return(0,ct.jsxs)(ts.Flex,{className:"media-editor__history-actions",expanded:!1,gap:2,children:[(0,ct.jsx)(ts.Button,{size:"compact",variant:"tertiary",disabled:!o,accessibleWhenDisabled:!0,onClick:()=>{c(),r(),t(),u()},children:(0,Jn.__)("Reset")}),(0,ct.jsx)(ts.Button,{size:"compact",icon:gv,label:(0,Jn.__)("Undo"),showTooltip:!0,shortcut:Zc.displayShortcut.primary("z"),disabled:e||!n,accessibleWhenDisabled:!0,onClick:d}),(0,ct.jsx)(ts.Button,{size:"compact",icon:pv,label:(0,Jn.__)("Redo"),showTooltip:!0,shortcut:(0,Zc.isAppleOS)()?Zc.displayShortcut.primaryShift("z"):Zc.displayShortcut.primary("y"),disabled:e||!i,accessibleWhenDisabled:!0,onClick:f})]})}function sKe({isSaving:e,hasMedia:t,hasChanges:r,onCancel:o,onSave:n}){let i=e||!t||!r;return(0,ct.jsxs)(ts.Flex,{className:"media-editor__footer-actions",justify:"flex-end",expanded:!1,gap:2,children:[(0,ct.jsx)(ts.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:o,disabled:e,accessibleWhenDisabled:!0,children:(0,Jn.__)("Cancel")}),(0,ct.jsx)(ts.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:n,isBusy:e,disabled:i,accessibleWhenDisabled:!0,children:(0,Jn.__)("Save")})]})}function aKe({fields:e=[],id:t,aspectRatioPresets:r,onClose:o,onSaved:n,renderFrame:i,noticesClassName:s="media-editor__snackbar",noticesPortalElement:l,showCloseButton:c=!1,shouldCloseOnEsc:u=!1}){let d=Ea(),f=(0,pge.useViewportMatch)("small"),m=f?"wide":"narrow",{media:h,hasEdits:g}=(0,aE.useSelect)(le=>{let{getEditedEntityRecord:Oe,getEntityRecord:ke,hasEditsForEntityRecord:Me}=le(OW.store);return ke("postType","attachment",t,fge),{media:Oe("postType","attachment",t),hasEdits:Me("postType","attachment",t)}},[t]),v=d.isCropperDirty||g,{clearEntityRecordEdits:b,editEntityRecord:_,invalidateResolution:y}=(0,aE.useDispatch)(OW.store),{removeAllNotices:w}=(0,aE.useDispatch)(QN.store),[S,x]=(0,gn.useState)(!1),[C,A]=(0,gn.useState)(!1),[k,R]=(0,gn.useState)(!1),M=(0,gn.useRef)(),P=(0,gn.useCallback)(()=>{A(!0),clearTimeout(M.current),M.current=setTimeout(()=>{A(!1)},rKe)},[]),T=(0,gn.useCallback)(()=>{R(!0)},[]),N=(0,gn.useCallback)(()=>{R(!1)},[]),L=C||k;(0,gn.useEffect)(()=>()=>{clearTimeout(M.current)},[]),(0,gn.useEffect)(()=>{A(!1),R(!1)},[t]),(0,gn.useEffect)(()=>{y("getEntityRecord",["postType","attachment",t,fge])},[t,y]);let F=sb(h?.mime_type).type,D=!!h&&F==="image",{aspectRatioValue:z,setAspectRatioValue:B,aspectRatioOptions:O,resetCropOptions:V}=qN({aspectRatioPresets:r}),{isSaving:W,save:q}=dge({cropper:d,id:t,isImage:D,media:h,onSaved:n}),Z=(0,gn.useMemo)(()=>{let le={id:"details",title:(0,Jn.__)("Details"),panel:(0,ct.jsx)(se,{className:"media-editor__panel",direction:"column",gap:"lg",children:(0,ct.jsx)(ame,{})})};return D?[{id:"crop",title:(0,Jn.__)("Crop"),panel:(0,ct.jsx)(se,{className:"media-editor__panel",direction:"column",gap:"lg",children:(0,ct.jsx)(nge,{aspectRatioValue:z,onAspectRatioChange:B,aspectRatioOptions:O,showTransformControls:f})})},le]:[le]},[D,z,B,O,f]),[Q,ce]=(0,gn.useState)(),re=Q??Z[0]?.id,fe=le=>{_("postType","attachment",t,le)},pe=()=>{w("snackbar",sE),b("postType","attachment",t),o?.()},$=()=>{if(!W){if(v){x(!0);return}pe()}},te=le=>{let Oe=Zc.isKeyboardEvent.primary(le,"z"),ke=Zc.isKeyboardEvent.primaryShift(le,"z")||!(0,Zc.isAppleOS)()&&Zc.isKeyboardEvent.primary(le,"y");if((Oe||ke)&&D){let Me=le.target;if(!((Me.tagName==="INPUT"||Me.tagName==="TEXTAREA"||Me.isContentEditable)&&!Me.closest(`[${oE}]`))){if(le.preventDefault(),L)return;ke?d.redo():d.undo()}}if(u){if(le.code!=="Escape"&&le.key!=="Escape")return;if(W){le.preventDefault();return}v&&(le.preventDefault(),x(!0))}},de=(0,ct.jsx)(QN.SnackbarNotices,{className:s,context:sE}),ve=D?(0,ct.jsx)(rge,{onPlacementControlInteraction:P}):null,we=(0,ct.jsxs)(vae,{value:h??void 0,onChange:fe,settings:{fields:e},children:[h?(0,ct.jsxs)(En.Root,{className:"media-editor",value:re,onValueChange:le=>ce(le),children:[(0,ct.jsx)(oKe,{tabs:Z}),(0,ct.jsx)(Lb,{className:"media-editor__skeleton",labels:{body:D?(0,Jn.__)("Image editor"):(0,Jn.__)("Media preview"),sidebar:(0,Jn.__)("Media details")},content:(0,ct.jsxs)("div",{className:"media-editor__content",children:[(0,ct.jsx)("div",{className:"media-editor__canvas-area",children:D?(0,ct.jsx)(Zhe,{focusOnMount:!0,isPlacementActive:C,onGestureStart:T,onGestureEnd:N}):(0,ct.jsx)(wae,{})}),D&&(0,ct.jsx)("div",{className:"media-editor__canvas-toolbar",children:ve})]}),sidebar:(0,ct.jsx)(Kl.Slot,{scope:"media-editor"})})]}):(0,ct.jsx)("div",{className:"media-editor",children:(0,ct.jsx)("div",{className:"media-editor__loading",children:(0,ct.jsx)(ts.Spinner,{})})}),(0,ct.jsx)(ts.__experimentalConfirmDialog,{isOpen:S,confirmButtonText:(0,Jn.__)("Discard"),cancelButtonText:(0,Jn.__)("Keep editing"),onCancel:()=>x(!1),onConfirm:()=>{x(!1),pe()},children:(0,Jn.__)("Are you sure you want to discard your unsaved changes?")}),l?(0,gn.createPortal)(de,l):de]}),oe=D?(0,ct.jsx)(iKe,{isUndoRedoDisabled:L,onReset:V}):null,ee=D?(0,ct.jsx)(KN,{showAspectRatioControl:!0,aspectRatioPresets:r}):null,ue=(0,ct.jsx)(sKe,{isSaving:W,hasMedia:!!h,hasChanges:v,onCancel:$,onSave:q}),ie;return m==="wide"?ie=(0,ct.jsxs)(ct.Fragment,{children:[oe,ue]}):ie=(0,ct.jsxs)(ct.Fragment,{children:[ee,(0,ct.jsxs)("div",{className:"media-editor-modal__footer-row",children:[oe,ue]})]}),i({children:we,headerActions:(0,ct.jsx)(nKe,{isSaving:W,isImage:D,showCloseButton:c,onCancel:$}),footerActions:ie,footerLayout:m,onRequestClose:$,onKeyDown:te,shouldCloseOnClickOutside:!v&&!W,isSaving:W,hasChanges:v,hasMedia:!!h})}function NW(e){return(0,ct.jsx)(PW,{children:(0,ct.jsx)(aKe,{...e})},e.id)}var mge=NW;var C_=a(E(),1);function bge({fields:e=[],aspectRatioPresets:t}){let{isModalOpen:r,id:o,onUpdate:n,onClose:i}=(0,cE.useSelect)(f=>{let{isOpen:m,getId:h,getOnUpdate:g,getOnClose:v}=f(f_);return{isModalOpen:m(),id:h(),onUpdate:g(),onClose:v()}},[]),{closeMediaEditorModal:s}=(0,cE.useDispatch)(f_),{createSuccessNotice:l}=(0,cE.useDispatch)(vge.store);if(!r||!o)return null;let c=typeof document>"u"?null:document.body,u=f=>{f.stopPropagation()},d=()=>{s(),i?.()};return(0,C_.jsx)(mge,{id:o,fields:e,aspectRatioPresets:t,showCloseButton:!0,shouldCloseOnEsc:!0,noticesClassName:"media-editor-modal__snackbar",noticesPortalElement:c,onClose:d,onSaved:({id:f,url:m,previous:h})=>{f&&n&&n({id:f,url:m}),d(),h&&f!==h.id&&n&&l((0,lE.__)("Image edited."),{type:"snackbar",actions:[{label:(0,lE.__)("Undo"),onClick:()=>{n({id:h.id,url:h.url})}}]})},renderFrame:({children:f,headerActions:m,footerActions:h,footerLayout:g,onRequestClose:v,onKeyDown:b,shouldCloseOnClickOutside:_})=>(0,C_.jsx)(gge.ShortcutProvider,{className:"media-editor-modal__shortcut-scope",onKeyDown:u,children:(0,C_.jsxs)(hge.Modal,{className:"media-editor-modal",title:(0,lE.__)("Edit media"),size:"fill",isDismissible:!1,shouldCloseOnClickOutside:_,onKeyDown:b,onRequestClose:v,headerActions:m,children:[f,(0,C_.jsx)("div",{className:`media-editor-modal__footer is-${g}`,role:"region","aria-label":(0,lE.__)("Editor actions"),children:h})]})})})}var T_={};cme(T_,{store:f_,MediaEditor:NW,MediaEditorModal:bge});var lo=a(j(),1),Xc=a(Y(),1),JN=a(Lt(),1),Jh=a(ae(),1),Qh=(e,t)=>`<a ${MW(e)}>${t}</a>`,MW=e=>`href="${e}" target="_blank" rel="noopener"`,lKe=(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},cKe=e=>{let{title:t,foreign_landing_url:r,creator:o,creator_url:n,license:i,license_version:s,license_url:l}=e,c=lKe(i,s),u=(0,JN.decodeEntities)(o),d;return u?d=t?(0,lo.sprintf)((0,lo._x)('"%1$s" by %2$s/ %3$s',"caption"),Qh(r,(0,JN.decodeEntities)(t)),n?Qh(n,u):u,l?Qh(`${l}?ref=openverse`,c):c):(0,lo.sprintf)((0,lo._x)("<a %1$s>Work</a> by %2$s/ %3$s","caption"),MW(r),n?Qh(n,u):u,l?Qh(`${l}?ref=openverse`,c):c):d=t?(0,lo.sprintf)((0,lo._x)('"%1$s"/ %2$s',"caption"),Qh(r,(0,JN.decodeEntities)(t)),l?Qh(`${l}?ref=openverse`,c):c):(0,lo.sprintf)((0,lo._x)("<a %1$s>Work</a>/ %2$s","caption"),MW(r),l?Qh(`${l}?ref=openverse`,c):c),d.replace(/\s{2}/g," ")},FW=(e={})=>({...e,orderBy:e?.search?"relevance":"date"}),uKe=async(e={})=>{let t=FW(e),r=await(0,Xc.resolveSelect)(Jh.store).getEntityRecords("postType","attachment",t),o=(0,Xc.select)(Jh.store).getEntityRecordsTotalItems("postType","attachment",t),n=(0,Xc.select)(Jh.store).getEntityRecordsTotalPages("postType","attachment",t);return{mediaItems:r.map(i=>({...i,alt:i.alt_text,url:i.source_url,previewUrl:i.media_details?.sizes?.medium?.source_url,caption:i.caption?.raw})),totalItems:o,totalPages:n}},_ge=(e,t={})=>({...t,media_type:"image",parent:e}),dKe=e=>{let t=typeof e=="number"?e:Number(e);return Number.isInteger(t)&&t>0?t:void 0},yge=(e,t)=>(0,Xc.dispatch)(Jh.store).saveEntityRecord("postType","attachment",{id:e,post:t},{throwOnError:!0}),fKe=e=>e?.media_type||e?.mime_type?.split("/")[0]||e?.type,pKe=e=>[...new Set((Array.isArray(e)?e:[e]).filter(t=>fKe(t)==="image").map(t=>t?.id).filter(Boolean))],mKe=(e,t={})=>{let{invalidateResolution:r}=(0,Xc.dispatch)(Jh.store);r("getEntityRecords",["postType","attachment",FW(_ge(e,t))])},hKe=(e,t)=>{let r=()=>(0,Xc.select)(Jh.store).hasFinishedResolution("getEntityRecords",e),o=r();return(0,Xc.subscribe)(()=>{let n=r();o&&!n&&t(),o=n},Jh.store)},$N=({getQuery:e,...t})=>({...t,async fetch(r={}){return uKe(e(r))},subscribe(r,o={}){return hKe(["postType","attachment",FW(e(o))],r)}}),gKe=(e,t)=>$N({name:"attached-images",labels:{name:(0,lo.__)("Attached images"),search_items:(0,lo.__)("Search attachments")},mediaType:"image",getQuery:r=>_ge(e,r),postTypeLabel:t,emptyMessage:t?(0,lo.sprintf)((0,lo.__)("No images attached to this %s."),t):(0,lo.__)("No images attached to this post."),async attach(r){let o=pKe(r);return await Promise.all(o.map(n=>yge(n,e))),o.length},async detach(r){await yge(r.id,0)},invalidate(r={}){mKe(e,r)}}),wge=[$N({name:"images",labels:{name:(0,lo.__)("Images"),search_items:(0,lo.__)("Search images")},mediaType:"image",getQuery:e=>({...e,media_type:"image"})}),$N({name:"videos",labels:{name:(0,lo.__)("Videos"),search_items:(0,lo.__)("Search videos")},mediaType:"video",getQuery:e=>({...e,media_type:"video"})}),$N({name:"audio",labels:{name:(0,lo.__)("Audio"),search_items:(0,lo.__)("Search audio")},mediaType:"audio",getQuery:e=>({...e,media_type:"audio"})}),{name:"openverse",labels:{name:(0,lo.__)("Openverse"),search_items:(0,lo.__)("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:cKe(c),previewUrl:c.thumbnail}))},getReportUrl:({sourceId:e})=>`https://wordpress.org/openverse/image/${e}/report/`,isExternalResource:!0}];function Sge(e,t){let r=dKe(e);return!r||!t?wge:[gKe(r,t),...wge]}var xge=a(Y(),1),Cge=a(ae(),1);function Tge(e){let{invalidateResolution:t}=(0,xge.dispatch)(Cge.store);for(let r of e)r.id&&(t("getEntityRecord",["postType","attachment",r.id,{context:"view"}]),t("getEntityRecord",["postType","attachment",r.id]))}var Ege=a(Tf(),1);var{sideloadMedia:vKe}=K(Ege.privateApis),Pge=vKe;var kge=a(Bu(),1),Rge=a(Y(),1),Age=a(Tf(),1);var bKe=()=>{};function Ige({url:e,onSuccess:t,onError:r=bKe}){let o=(0,Rge.select)(I).getCurrentPost(),n=typeof o?.id=="number"?o.id:o?.wp_id;(0,kge.default)({path:"/wp/v2/media",method:"POST",data:{url:e,...n?{post:n}:{}}}).then(s=>{t?.((0,Age.transformAttachment)(s))}).catch(s=>{r(s?.message||s)})}var Oge=a(Bu(),1),Nge=a(Tf(),1);async function Mge(e,t=[]){let r=await(0,Oge.default)({path:`/wp/v2/media/${e}/finalize`,method:"POST",data:{sub_sizes:t}});return r?(0,Nge.transformAttachment)(r):void 0}var Fge=a(Bu(),1);async function Dge(e){await(0,Fge.default)({path:`/wp/v2/media/${e}?force=true`,method:"DELETE"})}var k0e=a(ae(),1),R0e=a(Y(),1),bG=a(U(),1);var Y_=a(G(),1),qM=a(Pt(),1),w0e=a(Y(),1),_0e=a(be(),1),lg=a(U(),1),pG=a(Te(),1);var DW=a(U(),1);var Lge=a(U(),1),on=(0,Lge.createContext)({user:{styles:{},settings:{}},base:{styles:{},settings:{}},merged:{styles:{},settings:{}},onChange:()=>{},fontLibraryEnabled:!1});var Bge=a(E(),1);function uE({children:e,value:t,baseValue:r,onChange:o,fontLibraryEnabled:n}){let i=(0,DW.useMemo)(()=>Fi(r,t),[r,t]),s=(0,DW.useMemo)(()=>({user:t,base:r,merged:i,onChange:o,fontLibraryEnabled:n}),[t,r,i,o,n]);return(0,Bge.jsx)(on.Provider,{value:s,children:e})}var Co=a(G(),1),Zb=a(j(),1);var lve=a(Y(),1),cve=a(ae(),1);var Vge=a(E(),1);function dE({className:e,...t}){return(0,Vge.jsx)(Cn,{className:J(e,"global-styles-ui-icon-with-current-color"),...t})}var $h=a(G(),1);var Gb=a(E(),1);function yKe({icon:e,children:t,...r}){return(0,Gb.jsxs)($h.__experimentalItem,{...r,children:[e&&(0,Gb.jsxs)($h.__experimentalHStack,{justify:"flex-start",children:[(0,Gb.jsx)(dE,{icon:e,size:24}),(0,Gb.jsx)($h.FlexItem,{children:t})]}),!e&&t]})}function xo(e){return(0,Gb.jsx)($h.Navigator.Button,{as:yKe,...e})}var Qge=a(G(),1);var Yb=a(j(),1),Jge=a(be(),1);var LW=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},BW=function(e){return .2126*LW(e.r)+.7152*LW(e.g)+.0722*LW(e.b)};function eM(e){e.prototype.luminance=function(){return t=BW(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,s,l,c,u=t instanceof e?t:new e(t);return i=this.rgba,s=u.toRgb(),l=BW(i),c=BW(s),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=(s=(o=r).size)===void 0?"normal":s,(i=(n=o.level)===void 0?"AA":n)==="AAA"&&l==="normal"?7:i==="AA"&&l==="large"?3:4.5);var o,n,i,s,l}}var Xl=a(U(),1),Kge=a(Y(),1),Zge=a(ae(),1),jW=a(j(),1);var nn=a(j(),1);var jge=a(xf(),1),{lock:eZt,unlock:Et}=(0,jge.__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{getViewportBreakpoints:wKe}=Et(Du),zge={link:[{value:":link",label:(0,nn.__)("Link")},{value:":any-link",label:(0,nn.__)("Any Link")},{value:":visited",label:(0,nn.__)("Visited")},{value:":hover",label:(0,nn.__)("Hover")},{value:":focus",label:(0,nn.__)("Focus")},{value:":focus-visible",label:(0,nn.__)("Focus-visible")},{value:":active",label:(0,nn.__)("Active")}],button:[{value:":link",label:(0,nn.__)("Link")},{value:":any-link",label:(0,nn.__)("Any Link")},{value:":visited",label:(0,nn.__)("Visited")},{value:":hover",label:(0,nn.__)("Hover")},{value:":focus",label:(0,nn.__)("Focus")},{value:":focus-visible",label:(0,nn.__)("Focus-visible")},{value:":active",label:(0,nn.__)("Active")}]},Hge={"core/button":[{value:":hover",label:(0,nn.__)("Hover")},{value:":focus",label:(0,nn.__)("Focus")},{value:":focus-visible",label:(0,nn.__)("Focus-visible")},{value:":active",label:(0,nn.__)("Active")}]},_Ke=[{value:"@tablet",label:(0,nn.__)("Tablet")},{value:"@mobile",label:(0,nn.__)("Mobile")}];function Wge(e){return Hge[e]?Hge[e]??[]:zge[e]?zge[e]:[]}function Gge(e){let t=wKe(e);return _Ke.filter(r=>(r.value!=="@tablet"||t.tablet!==void 0)&&(r.value!=="@mobile"||t.mobile!==void 0))}function VW(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"&&VW(e[r],t);return e}var tM=(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=tM(e[o],t);Object.keys(n).length&&(r[o]=n)}}),r};function fE(e,t){let r=tM(structuredClone(e),t);return yv(r,e)}function Uge(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 Yge(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=Uge(o,n),s=e?.styles?.elements?.heading?.typography?.fontFamily,l;return s?l=Uge(o,e?.styles?.elements?.heading?.typography?.fontFamily):l=i,[i,l]}function qge(e){return e?`is-style-${e}`:""}function rM(e,t){let r=new RegExp(`^${t}([\\d]+)$`);return e.reduce((n,i)=>{if(typeof i?.slug=="string"){let s=i?.slug.match(r);if(s){let l=parseInt(s[1],10);if(l>n)return l}}return n},0)+1}S2([eM]);function qe(e,t,r="merged",o=!0,n){let{user:i,base:s,merged:l,onChange:c}=(0,Xl.useContext)(on),u=n?.split(".").filter(Boolean)??[],d=u.find(b=>b.startsWith(":")),f=u.filter(b=>!b.startsWith(":")).join("."),m=[e,f].filter(Boolean).join("."),h=l;r==="base"?h=s:r==="user"&&(h=i);let g=(0,Xl.useMemo)(()=>{let b=bm(h,m,t,o);return d?b?.[d]??{}:b},[h,m,t,o,d]),v=(0,Xl.useCallback)(b=>{let _=b;d&&(_={...bm(i,m,t,!1),[d]:b});let y=N1(i,m,_,t);c(y)},[i,c,m,t,d]);return[g,v]}function Le(e,t,r="merged"){let{user:o,base:n,merged:i,onChange:s}=(0,Xl.useContext)(on),l=i;r==="base"?l=n:r==="user"&&(l=o);let c=(0,Xl.useMemo)(()=>vv(l,e,t),[l,e,t]),u=(0,Xl.useCallback)(d=>{let f=A1(o,e,d,t);s(f)},[o,s,e,t]);return[c,u]}var SKe=[];function xKe({title:e,settings:t,styles:r}){return e===(0,jW.__)("Default")||Object.keys(t||{}).length>0||Object.keys(r||{}).length>0}function oM(e=[]){let{variationsFromTheme:t}=(0,Kge.useSelect)(o=>({variationsFromTheme:o(Zge.store).__experimentalGetCurrentThemeGlobalStylesVariations?.()||SKe}),[]),{user:r}=(0,Xl.useContext)(on);return(0,Xl.useMemo)(()=>{let o=structuredClone(r),n=VW(o,e);n.title=(0,jW.__)("Default");let i=t.filter(l=>fE(l,e)).map(l=>Fi(n,l)),s=[n,...i];return s?.length?s.filter(xKe):[]},[e,r,t])}function Xge(e){let[t,r]=Le("color.palette.theme",e),o=(0,Xl.useCallback)(()=>{if(!t||!t.length)return;let n=Math.floor(Math.random()*225),i=t.map(s=>{let{color:l}=s,c=Oo(l).rotate(n).toHex();return{...s,color:c}});r(i)},[t,r]);return window.__experimentalEnableColorRandomizer?[o]:[]}var Qc=a(E(),1),{useHasDimensionsPanel:CKe,useHasTypographyPanel:TKe,useHasColorPanel:EKe,useSettingsForBlockElement:PKe,useHasBackgroundPanel:kKe}=Et(Jge.privateApis);function RKe(){let[e]=Le(""),t=PKe(e),r=kKe(e),o=TKe(t),n=EKe(t),i=!0,l=CKe(t);return(0,Qc.jsx)(Qc.Fragment,{children:(0,Qc.jsxs)(Qge.__experimentalItemGroup,{children:[o&&(0,Qc.jsx)(xo,{icon:r8,path:"/typography",children:(0,Yb.__)("Typography")}),n&&(0,Qc.jsx)(xo,{icon:kB,path:"/colors",children:(0,Yb.__)("Colors")}),r&&(0,Qc.jsx)(xo,{icon:tB,path:"/background","aria-label":(0,Yb.__)("Background styles"),children:(0,Yb.__)("Background")}),i&&(0,Qc.jsx)(xo,{icon:P1,path:"/shadows",children:(0,Yb.__)("Shadows")}),l&&(0,Qc.jsx)(xo,{icon:Ka,path:"/layout",children:(0,Yb.__)("Layout")})]})})}var $ge=RKe;var Rd=a(G(),1);function E_(){let[e="black"]=qe("color.text"),[t="white"]=qe("color.background"),[r=e]=qe("elements.h1.color.text"),[o=r]=qe("elements.link.color.text"),[n=o]=qe("elements.button.color.background"),[i]=Le("color.palette.core")||[],[s]=Le("color.palette.theme")||[],[l]=Le("color.palette.custom")||[],c=(s??[]).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 rve=a(U(),1),ove=a(G(),1),HW=a(j(),1);function AKe(e,t){return t.length===0?null:(t.sort((r,o)=>Math.abs(e-r)-Math.abs(e-o)),t[0])}function IKe(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 s=n;s<=i;s+=100)t.push(s)}else o.length===1&&t.push(parseInt(o[0]))}),t}function eve(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 zW(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 qb(e){let t={fontFamily:eve(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=IKe(r),n=AKe(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 tve(e){return{fontFamily:eve(e.fontFamily),fontStyle:e.fontStyle||"normal",fontWeight:e.fontWeight||"400"}}var pE=a(E(),1);function nM({fontSize:e,variation:t}){let{base:r}=(0,rve.useContext)(on),o=r;t&&(o={...r,...t});let[n]=qe("color.text"),[i,s]=Yge(o),l=i?qb(i):{},c=s?qb(s):{};return n&&(l.color=n,c.color=n),e&&(l.fontSize=e,c.fontSize=e),(0,pE.jsxs)(ove.__unstableMotion.div,{animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"},style:{textAlign:"center",lineHeight:1},children:[(0,pE.jsx)("span",{style:c,children:(0,HW._x)("A","Uppercase letter A")}),(0,pE.jsx)("span",{style:l,children:(0,HW._x)("a","Lowercase letter A")})]})}var nve=a(G(),1);var ive=a(E(),1);function sve({normalizedColorSwatchSize:e,ratio:t}){let{highlightedColors:r}=E_(),o=e*t;return r.map(({slug:n,color:i},s)=>(0,ive.jsx)(nve.__unstableMotion.div,{style:{height:o,width:o,background:i,borderRadius:o/2},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:s===1?.2:.1}},`${n}-${s}`))}var ave=a(G(),1),P_=a(Te(),1),Kb=a(U(),1);var bp=a(E(),1),UW=248,WW=152,OKe={leading:!0,trailing:!0};function NKe({children:e,label:t,isFocused:r,withHoverView:o}){let[n="white"]=qe("color.background"),[i]=qe("color.gradient"),s=(0,P_.useReducedMotion)(),[l,c]=(0,Kb.useState)(!1),[u,{width:d}]=(0,P_.useResizeObserver)(),[f,m]=(0,Kb.useState)(d),[h,g]=(0,Kb.useState)(),v=(0,P_.useThrottle)(m,250,OKe);(0,Kb.useLayoutEffect)(()=>{d&&v(d)},[d,v]),(0,Kb.useLayoutEffect)(()=>{let w=f?f/UW:1,S=w-(h||0);(Math.abs(S)>.1||!h)&&g(w)},[f,h]);let b=d?d/UW:1,_=h||b,y=!!d;return(0,bp.jsxs)(bp.Fragment,{children:[(0,bp.jsx)("div",{style:{position:"relative"},children:u}),!y&&(0,bp.jsx)(fj,{className:"global-styles-ui-preview__wrapper",style:{aspectRatio:UW/WW}}),y&&(0,bp.jsx)("div",{className:J("global-styles-ui-preview__wrapper",{"is-hoverable":o}),style:{height:WW*_},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),tabIndex:-1,children:(0,bp.jsx)(ave.__unstableMotion.div,{style:{height:WW*_,width:"100%",background:i??n},initial:"start",animate:(l||r)&&!s&&t?"hover":"start",children:[].concat(e).map((w,S)=>w({ratio:_,key:S}))})})]})}var k_=NKe;var Pa=a(E(),1),MKe={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},FKe={hover:{opacity:1},start:{opacity:.5}},DKe={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}};function LKe({label:e,isFocused:t,withHoverView:r,variation:o}){let[n]=qe("typography.fontWeight"),[i="serif"]=qe("typography.fontFamily"),[s=i]=qe("elements.h1.typography.fontFamily"),[l=n]=qe("elements.h1.typography.fontWeight"),[c="black"]=qe("color.text"),[u=c]=qe("elements.h1.color.text"),{paletteColors:d}=E_();return(0,Pa.jsxs)(k_,{label:e,isFocused:t,withHoverView:r,children:[({ratio:f,key:m})=>(0,Pa.jsx)(Rd.__unstableMotion.div,{variants:MKe,style:{height:"100%",overflow:"hidden"},children:(0,Pa.jsxs)(Rd.__experimentalHStack,{spacing:10*f,justify:"center",style:{height:"100%",overflow:"hidden"},children:[(0,Pa.jsx)(nM,{fontSize:65*f,variation:o}),(0,Pa.jsx)(Rd.__experimentalVStack,{spacing:4*f,children:(0,Pa.jsx)(sve,{normalizedColorSwatchSize:32,ratio:f})})]})},m),({key:f})=>(0,Pa.jsx)(Rd.__unstableMotion.div,{variants:r?FKe:void 0,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1},children:(0,Pa.jsx)(Rd.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"},children:d.slice(0,4).map(({color:m},h)=>(0,Pa.jsx)("div",{style:{height:"100%",background:m,flexGrow:1}},h))})},f),({ratio:f,key:m})=>(0,Pa.jsx)(Rd.__unstableMotion.div,{variants:DKe,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0},children:(0,Pa.jsx)(Rd.__experimentalVStack,{spacing:3*f,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*f,boxSizing:"border-box"},children:e&&(0,Pa.jsx)("div",{style:{fontSize:40*f,fontFamily:s,color:u,fontWeight:l,lineHeight:"1em",textAlign:"center"},children:e})})},m)]})}var iM=LKe;var Ho=a(E(),1);function BKe(){let e=(0,lve.useSelect)(t=>{let{__experimentalGetCurrentThemeGlobalStylesVariations:r}=t(cve.store);return!!r()?.length},[]);return(0,Ho.jsxs)(Co.Card,{size:"small",isBorderless:!0,className:"global-styles-ui-screen-root",isRounded:!1,children:[(0,Ho.jsx)(Co.CardBody,{children:(0,Ho.jsxs)(Co.__experimentalVStack,{spacing:4,children:[(0,Ho.jsx)(Co.Card,{className:"global-styles-ui-screen-root__active-style-tile",children:(0,Ho.jsx)(Co.CardMedia,{className:"global-styles-ui-screen-root__active-style-tile-preview",children:(0,Ho.jsx)(iM,{})})}),e&&(0,Ho.jsx)(Co.__experimentalItemGroup,{children:(0,Ho.jsx)(xo,{path:"/variations",children:(0,Ho.jsxs)(Co.__experimentalHStack,{justify:"space-between",children:[(0,Ho.jsx)(Co.FlexItem,{children:(0,Zb.__)("Browse styles")}),(0,Ho.jsx)(dE,{icon:(0,Zb.isRTL)()?Ar:hr})]})})}),(0,Ho.jsx)($ge,{})]})}),(0,Ho.jsx)(Co.CardDivider,{}),(0,Ho.jsxs)(Co.CardBody,{children:[(0,Ho.jsx)(Co.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:4,children:(0,Zb.__)("Customize the appearance of specific blocks for the whole site.")}),(0,Ho.jsx)(Co.__experimentalItemGroup,{children:(0,Ho.jsx)(xo,{path:"/blocks",children:(0,Ho.jsxs)(Co.__experimentalHStack,{justify:"space-between",children:[(0,Ho.jsx)(Co.FlexItem,{children:(0,Zb.__)("Blocks")}),(0,Ho.jsx)(dE,{icon:(0,Zb.isRTL)()?Ar:hr})]})})})]})]})}var uve=BKe;var YW=a(Pt(),1),Ad=a(j(),1),eg=a(G(),1),qW=a(Y(),1),Id=a(U(),1),aM=a(be(),1),gve=a(Te(),1),vve=a(Ol(),1);var dve=a(Pt(),1),fve=a(Y(),1),pve=a(G(),1);var GW=a(E(),1);function VKe(e,t){return e?.filter(r=>r.source==="block"||t.includes(r.name))||[]}function mE(e){let t=(0,fve.useSelect)(n=>{let{getBlockStyles:i}=n(dve.store);return i(e)},[e]),[r]=qe("variations",e),o=Object.keys(r??{});return VKe(t,o)}function mve({name:e}){let t=mE(e);return(0,GW.jsx)(pve.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map((r,o)=>r?.isDefault?null:(0,GW.jsx)(xo,{path:"/blocks/"+encodeURIComponent(e)+"/variations/"+encodeURIComponent(r.name),children:r.label},o))})}var $n=a(G(),1),sM=a(j(),1);var hve=a(be(),1);var Ws=a(E(),1),{StateControl:jKe,StateControlBadges:zKe}=Et(hve.privateApis);function sr({title:e,description:t,onBack:r,viewportStates:o,pseudoStates:n,selectedViewport:i="default",selectedPseudoState:s="default",onChangeViewport:l,onChangePseudoState:c,showResponsiveStateControls:u=!0}){return(0,Ws.jsx)($n.__experimentalVStack,{spacing:0,children:(0,Ws.jsx)($n.__experimentalView,{children:(0,Ws.jsx)($n.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,Ws.jsxs)($n.__experimentalVStack,{spacing:2,children:[(0,Ws.jsxs)($n.__experimentalHStack,{spacing:2,alignment:"top",children:[(0,Ws.jsx)($n.Navigator.BackButton,{icon:(0,sM.isRTL)()?hr:Ar,size:"small",label:(0,sM.__)("Back"),onClick:r}),(0,Ws.jsx)($n.__experimentalSpacer,{children:(0,Ws.jsxs)($n.__experimentalHStack,{justify:"space-between",alignment:"top",children:[(0,Ws.jsx)($n.__experimentalHeading,{className:"global-styles-ui-header",level:2,size:13,children:e}),(0,Ws.jsxs)($n.__experimentalVStack,{spacing:2,alignment:"right",children:[(0,Ws.jsx)(jKe,{viewportStates:u?o:[],pseudoStates:n,viewportValue:i,pseudoStateValue:s,onChangeViewport:l,onChangePseudoState:c}),(0,Ws.jsx)(zKe,{viewportStates:o,pseudoStates:n,viewportValue:i,pseudoStateValue:s})]})]})})]}),t&&(0,Ws.jsx)($n.__experimentalText,{className:"global-styles-ui-header__description",children:t})]})})})})}var Gs=a(E(),1),{useHasDimensionsPanel:HKe,useHasTypographyPanel:UKe,useHasBorderPanel:WKe,useSettingsForBlockElement:GKe,useHasColorPanel:YKe,useHasBackgroundPanel:qKe}=Et(aM.privateApis);function KKe(){let e=(0,qW.useSelect)(n=>n(YW.store).getBlockTypes(),[]),t=(n,i)=>{let{core:s,noncore:l}=n;return(i.name.startsWith("core/")?s:l).push(i),n},{core:r,noncore:o}=e.reduce(t,{core:[],noncore:[]});return[...r,...o]}function ZKe(e){let[t]=Le("",e),r=GKe(t,e),o=UKe(r),n=YKe(r),i=qKe(r),s=WKe(r),l=HKe(r),c=s||l,u=!!mE(e)?.length;return o||n||i||c||u}function XKe({block:e}){return ZKe(e.name)?(0,Gs.jsx)(xo,{path:"/blocks/"+encodeURIComponent(e.name),children:(0,Gs.jsxs)(eg.__experimentalHStack,{justify:"flex-start",children:[(0,Gs.jsx)(aM.BlockIcon,{icon:e.icon}),(0,Gs.jsx)(eg.FlexItem,{children:e.title})]})}):null}function QKe({filterValue:e}){let t=KKe(),r=(0,gve.useDebounce)(vve.speak,500),{isMatchingSearchTerm:o}=(0,qW.useSelect)(YW.store),n=e?t.filter(s=>o(s,e)):t,i=(0,Id.useRef)(null);return(0,Id.useEffect)(()=>{if(!e)return;let s=i.current?.childElementCount||0,l=(0,Ad.sprintf)((0,Ad._n)("%d result found.","%d results found.",s),s);r(l,"polite")},[e,r]),(0,Gs.jsx)("div",{ref:i,className:"global-styles-ui-block-types-item-list",role:"list",children:n.length===0?(0,Gs.jsx)(eg.__experimentalText,{align:"center",as:"p",children:(0,Ad.__)("No blocks found.")}):n.map(s=>(0,Gs.jsx)(XKe,{block:s},"menu-itemblock-"+s.name))})}var JKe=(0,Id.memo)(QKe);function $Ke(){let[e,t]=(0,Id.useState)(""),r=(0,Id.useDeferredValue)(e);return(0,Gs.jsxs)(Gs.Fragment,{children:[(0,Gs.jsx)(sr,{title:(0,Ad.__)("Blocks"),description:(0,Ad.__)("Customize the appearance of specific blocks and for the whole site.")}),(0,Gs.jsx)(eg.SearchControl,{className:"global-styles-ui-block-types-search",onChange:t,value:e,label:(0,Ad.__)("Search"),placeholder:(0,Ad.__)("Search")}),(0,Gs.jsx)(JKe,{filterValue:r})]})}var bve=$Ke;var Eve=a(Pt(),1),Pve=a(be(),1),Jc=a(U(),1),kve=a(Y(),1),Rve=a(ae(),1),Xb=a(G(),1),R_=a(j(),1);var _ve=a(be(),1),cM=a(Pt(),1),Sve=a(G(),1),KW=a(U(),1);var lM=a(E(),1),{getViewportBreakpoints:eZe,getViewportBreakpointValueInPixels:yve}=Et(Du),wve={default:783,"@tablet":600,"@mobile":480};function tZe(e,t){let r=eZe(t),o=yve(r.mobile);if(e==="@mobile"&&o)return o;let n=yve(r.tablet);if(e==="@tablet"&&n)return o?r.mobile==="480px"&&r.tablet==="782px"?wve["@tablet"]:Math.round((o+n)/2):n;if(e==="default"){let i=n??o;if(i)return i+1}return wve[e]}var rZe=({name:e,variation:t="",selectedViewport:r="default",selectedState:o="default",stateStyles:n,viewportSettings:i})=>{let s=(0,cM.getBlockType)(e)?.example,l=(0,KW.useMemo)(()=>{if(!s)return null;let _={...s,attributes:{...s.attributes,style:void 0,className:t?qge(t):s.attributes?.className}};return(0,cM.getBlockFromExample)(e,_)},[e,s,t]),c=(0,KW.useMemo)(()=>o==="default"||!n?"":R8(n,e),[o,n,e]);if(!s)return null;let u=tZe(r,i)??s.viewportWidth??500,d=s.viewportWidth??500,f=Math.max(u/d,1),m=24*f,h=144,v=235/u,b=v!==0&&v<1&&h?h/v:h;return(0,lM.jsx)(Sve.__experimentalSpacer,{marginX:4,marginBottom:4,children:(0,lM.jsx)("div",{className:"global-styles-ui__block-preview-panel",style:{maxHeight:h,boxSizing:"initial"},children:(0,lM.jsx)(_ve.BlockPreview,{blocks:l,viewportWidth:u,minHeight:h,additionalStyles:[{css:`
								body{
									padding: ${m}px;
									min-height:${Math.round(b)}px;
									display:flex;
								}
								.is-root-container {
									width: ${100/f}%;
									transform: scale(${f});
									transform-origin: top left;
								}
								${c}
							`}]})})})},xve=rZe;var Cve=a(G(),1),Tve=a(E(),1);function Uo({children:e,level:t=2}){return(0,Tve.jsx)(Cve.__experimentalHeading,{className:"global-styles-ui-subtitle",level:t,children:e})}var vn=a(E(),1),oZe={backgroundSize:"cover",backgroundPosition:"50% 50%"};function hE(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 nZe(e){return e&&((0,Xb.__experimentalHasSplitBorders)(e)?{top:hE(e.top),right:hE(e.right),bottom:hE(e.bottom),left:hE(e.left)}:hE(e))}var{useHasDimensionsPanel:iZe,useHasTypographyPanel:sZe,useHasBorderPanel:aZe,useSettingsForBlockElement:lZe,useHasColorPanel:cZe,useHasFiltersPanel:uZe,useHasImageSettingsPanel:dZe,useHasBackgroundPanel:fZe,BackgroundPanel:pZe,BorderPanel:mZe,ColorPanel:hZe,TypographyPanel:gZe,DimensionsPanel:vZe,FiltersPanel:bZe,ImageSettingsPanel:yZe,AdvancedPanel:wZe}=Et(Pve.privateApis);function _Ze({name:e,variation:t,selectedViewport:r,showResponsiveStateControls:o=!0}){let{user:n,merged:i,onChange:s}=(0,Jc.useContext)(on),l=[];t&&(l=["variations",t].concat(l));let c=l.join("."),[u,d]=(0,Jc.useState)("default"),[f,m]=(0,Jc.useState)("default"),h=r??u,g=i.settings?.viewport,v=(0,Jc.useMemo)(()=>Gge(g),[g]),b=h==="default"||v.some(we=>we.value===h)?h:"default",_=(0,Jc.useMemo)(()=>Wge(e),[e]),y=[b,f].filter(we=>we!=="default").join("."),w=y.length>0,[S,x]=qe(c,e,"user",!1,w?y:void 0),[C]=qe(c,e,"merged",!1,w?y:void 0),[A]=Le("",e,"user"),[k,R]=Le("",e),M=lZe(k,e),P=(0,Eve.getBlockType)(e),T=!1;M?.spacing?.blockGap&&P?.supports?.spacing?.blockGap&&(P?.supports?.spacing?.__experimentalSkipSerialization===!0||P?.supports?.spacing?.__experimentalSkipSerialization?.some?.(we=>we==="blockGap"))&&(T=!0);let N=!1;M?.dimensions?.aspectRatio&&e==="core/group"&&(N=!0);let L=(0,Jc.useMemo)(()=>{let we=structuredClone(M);return T&&(we.spacing.blockGap=!1),N&&(we.dimensions.aspectRatio=!1),we},[M,T,N]),F=mE(e),D=fZe(L),z=sZe(L),B=cZe(L),O=aZe(L),V=iZe(L),q=uZe(L)&&b==="default",Z=dZe(e,A,L),Q=!!F?.length&&!t&&!w,{canEditCSS:ce}=(0,kve.useSelect)(we=>{let{getEntityRecord:oe,__experimentalGetCurrentGlobalStylesId:ee}=we(Rve.store),ue=ee();return{canEditCSS:!!(ue?oe("root","globalStyles",ue):void 0)?._links?.["wp:action-edit-css"]}},[]),re=t?F.find(we=>we.name===t):null,fe=(0,Jc.useMemo)(()=>({...C,layout:L.layout}),[C,L.layout]),pe=(0,Jc.useMemo)(()=>({...S,layout:A.layout}),[S,A.layout]),$=we=>{let oe={...we};delete oe.layout,x(oe),we.layout!==A.layout&&R({...A,layout:we.layout})},te=we=>{R(we===void 0?{...k,lightbox:void 0}:{...k,lightbox:{...k.lightbox,...we}})},de=we=>{let{settings:oe,...ee}=we;if(oe?.typography){let ue=[c,y].filter(Boolean).join("."),ie=N1(n,ue,ee,e);ie=A1(ie,"typography",{...A.typography,...oe.typography},e),s(ie)}else x(ee)},ve=we=>{if(!we?.border){x(we);return}let{radius:oe,...ee}=we.border,ue=nZe(ee),ie=(0,Xb.__experimentalHasSplitBorders)(ue)?{color:null,style:null,width:null,...ue}:{top:ue,right:ue,bottom:ue,left:ue};x({...we,border:{...ie,radius:oe}})};return(0,vn.jsxs)(vn.Fragment,{children:[(0,vn.jsx)(sr,{title:t?re?.label:P?.title,viewportStates:v,pseudoStates:_,selectedViewport:b,selectedPseudoState:f,onChangeViewport:o?d:void 0,onChangePseudoState:m,showResponsiveStateControls:o}),(0,vn.jsx)(xve,{name:e,variation:t,selectedViewport:b,selectedState:w?y:"default",stateStyles:w?C:void 0,viewportSettings:g}),Q&&(0,vn.jsx)("div",{className:"global-styles-ui-screen-variations",children:(0,vn.jsxs)(Xb.__experimentalVStack,{spacing:3,children:[(0,vn.jsx)(Uo,{children:(0,R_.__)("Style Variations")}),(0,vn.jsx)(mve,{name:e})]})}),z&&(0,vn.jsx)(gZe,{inheritedValue:C,value:S,onChange:de,settings:L,isGlobalStyles:!w,showInheritanceLabelIndicators:!1}),D&&(0,vn.jsx)(pZe,{inheritedValue:C,value:S,onChange:x,settings:L,defaultValues:oZe,showInheritanceLabelIndicators:!1}),q&&(0,vn.jsx)(bZe,{inheritedValue:fe,value:pe,onChange:x,settings:L,includeLayoutControls:!0,showInheritanceLabelIndicators:!1}),V&&(0,vn.jsx)(vZe,{inheritedValue:fe,value:pe,onChange:$,settings:L,includeLayoutControls:!0,showInheritanceLabelIndicators:!1}),O&&(0,vn.jsx)(mZe,{inheritedValue:C,value:S,onChange:ve,settings:L,showInheritanceLabelIndicators:!1}),B&&(0,vn.jsx)(hZe,{inheritedValue:C,value:S,onChange:x,settings:L,showInheritanceLabelIndicators:!1}),Z&&!w&&(0,vn.jsx)(yZe,{onChange:te,value:A,inheritedValue:L}),ce&&(0,vn.jsx)(Xb.PanelBody,{title:(0,R_.__)("Advanced"),initialOpen:!1,children:(0,vn.jsx)(wZe,{value:S,onChange:x,inheritedValue:C,help:(0,R_.sprintf)((0,R_.__)("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."),P?.title)})})]})}var ZW=_Ze;var FM=a(j(),1),Ube=a(G(),1),Wbe=a(U(),1);var Ave=a(G(),1);var Ive=a(E(),1);function tg({children:e,className:t}){return(0,Ive.jsx)(Ave.__experimentalSpacer,{className:J("global-styles-ui-screen-body",t),padding:4,children:e})}var rg=a(j(),1),yp=a(G(),1);var ka=a(E(),1);function gE({parentMenu:e,element:t,label:r}){let o=t==="text"||!t?"":`elements.${t}.`,n=t==="link"?{textDecoration:"underline"}:{},[i]=qe(o+"typography.fontFamily"),[s]=qe(o+"typography.fontStyle"),[l]=qe(o+"typography.fontWeight"),[c]=qe(o+"color.background"),[u]=qe("color.background"),[d]=qe(o+"color.gradient"),[f]=qe(o+"color.text");return(0,ka.jsx)(xo,{path:e+"/typography/"+t,children:(0,ka.jsxs)(yp.__experimentalHStack,{justify:"flex-start",children:[(0,ka.jsx)(yp.FlexItem,{className:"global-styles-ui-screen-typography__indicator","aria-hidden":"true",style:{fontFamily:i??"serif",background:d??c??u,color:f,fontStyle:s,fontWeight:l,...n},children:(0,rg.__)("Aa")}),(0,ka.jsx)(yp.FlexItem,{children:r})]})})}function SZe(){return(0,ka.jsxs)(yp.__experimentalVStack,{spacing:3,children:[(0,ka.jsx)(Uo,{level:3,children:(0,rg.__)("Elements")}),(0,ka.jsxs)(yp.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:[(0,ka.jsx)(gE,{parentMenu:"",element:"text",label:(0,rg.__)("Text")}),(0,ka.jsx)(gE,{parentMenu:"",element:"link",label:(0,rg.__)("Links")}),(0,ka.jsx)(gE,{parentMenu:"",element:"heading",label:(0,rg.__)("Headings")}),(0,ka.jsx)(gE,{parentMenu:"",element:"caption",label:(0,rg.__)("Captions")}),(0,ka.jsx)(gE,{parentMenu:"",element:"button",label:(0,rg.__)("Buttons")})]})]})}var Ove=SZe;var fM=a(G(),1);var Nve=a(G(),1);var uM=a(E(),1),xZe=({variation:e,isFocused:t,withHoverView:r})=>(0,uM.jsx)(k_,{label:e.title,isFocused:t,withHoverView:r,children:({ratio:o,key:n})=>(0,uM.jsx)(Nve.__experimentalHStack,{spacing:10*o,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,uM.jsx)(nM,{variation:e,fontSize:85*o})},n)}),Mve=xZe;var Qb=a(U(),1),Fve=a(Mo(),1),dM=a(j(),1);var og=a(E(),1);function A_({variation:e,children:t,isPill:r=!1,properties:o,showTooltip:n=!1}){let[i,s]=(0,Qb.useState)(!1),{base:l,user:c,onChange:u}=(0,Qb.useContext)(on),d=(0,Qb.useMemo)(()=>{let b=Fi(l,e);return o&&(b=tM(b,o)),{user:e,base:l,merged:b,onChange:()=>{}}},[e,l,o]),f=()=>u(e),m=b=>{b.keyCode===Fve.ENTER&&(b.preventDefault(),f())},h=(0,Qb.useMemo)(()=>yv(c,e),[c,e]),g=e?.title;e?.description&&(g=(0,dM.sprintf)((0,dM._x)("%1$s (%2$s)","variation label"),e?.title,e?.description));let v=(0,og.jsx)("div",{className:J("global-styles-ui-variations_item",{"is-active":h}),role:"button",onClick:f,onKeyDown:m,tabIndex:0,"aria-label":g,"aria-current":h,onFocus:()=>s(!0),onBlur:()=>s(!1),children:(0,og.jsx)("div",{className:J("global-styles-ui-variations_item-preview",{"is-pill":r}),children:t(i)})});return(0,og.jsx)(on.Provider,{value:d,children:n?(0,og.jsxs)(Ze.Root,{children:[(0,og.jsx)(Ze.Trigger,{render:v}),(0,og.jsx)(Ze.Popup,{children:e?.title})]}):v})}var Jb=a(E(),1),Dve=["typography"];function I_({title:e,gap:t=2}){let r=oM(Dve);return r?.length<=1?null:(0,Jb.jsxs)(fM.__experimentalVStack,{spacing:3,children:[e&&(0,Jb.jsx)(Uo,{level:3,children:e}),(0,Jb.jsx)(fM.__experimentalGrid,{columns:3,gap:t,className:"global-styles-ui-style-variations-container",children:r.map((o,n)=>(0,Jb.jsx)(A_,{variation:o,properties:Dve,showTooltip:!0,children:()=>(0,Jb.jsx)(Mve,{variation:o})},n))})]})}var oy=a(j(),1),eu=a(G(),1);var jbe=a(U(),1);var _p=a(U(),1),sg=a(Y(),1),ig=a(ae(),1),$W=a(j(),1);var XW=a(Bu(),1),Lve=a(ae(),1),Bve="/wp/v2/font-families";function Vve(e){let{receiveEntityRecords:t}=e.dispatch(Lve.store);t("postType","wp_font_family",[],void 0,!0)}async function jve(e,t){let o=await(0,XW.default)({path:Bve,method:"POST",body:e});return Vve(t),{id:o.id,...o.font_family_settings,fontFace:[]}}async function zve(e,t,r){let o={path:`${Bve}/${e}/font-faces`,method:"POST",body:t},n=await(0,XW.default)(o);return Vve(r),{id:n.id,...n.font_face_settings}}var Wve=a(G(),1);var Ql=a(j(),1),QW=["otf","ttf","woff","woff2"],Hve={100:(0,Ql._x)("Thin","font weight"),200:(0,Ql._x)("Extra-light","font weight"),300:(0,Ql._x)("Light","font weight"),400:(0,Ql._x)("Normal","font weight"),500:(0,Ql._x)("Medium","font weight"),600:(0,Ql._x)("Semi-bold","font weight"),700:(0,Ql._x)("Bold","font weight"),800:(0,Ql._x)("Extra-bold","font weight"),900:(0,Ql._x)("Black","font weight")},Uve={normal:(0,Ql._x)("Normal","font style"),italic:(0,Ql._x)("Italic","font style")};var{File:Gve}=window,{kebabCase:CZe}=Et(Wve.privateApis);function wp(e,t={}){return!e.name&&(e.fontFamily||e.slug)&&(e.name=e.fontFamily||e.slug),{...e,...t}}function TZe(e){return typeof e!="string"?!1:e!==decodeURIComponent(e)}function pM(e){let t=Hve[e.fontWeight??""]||e.fontWeight,r=e.fontStyle==="normal"?"":Uve[e.fontStyle??""]||e.fontStyle;return`${t} ${r}`}function EZe(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 Yve(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,s=r.get(o.slug),l=EZe(s.fontFace,n);r.set(o.slug,{...i,fontFace:l})}else r.set(o.slug,{...o});return Array.from(r.values())}async function ng(e,t,r="all"){let o;if(typeof t=="string")o=`url(${t})`;else if(t instanceof Gve)o=await t.arrayBuffer();else return;let i=await new window.FontFace(zW(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 s=document.querySelector('iframe[name="editor-canvas"]');s?.contentDocument&&s.contentDocument.fonts.add(i)}}function vE(e,t="all"){let r=o=>{o.forEach(n=>{n.family===zW(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 O_(e){if(!e)return;let t;if(Array.isArray(e)?t=e[0]:t=e,!t.startsWith("file:."))return TZe(t)||(t=encodeURI(t)),t}function qve(e){let t=new FormData,{fontFace:r,category:o,...n}=e,i={...n,slug:CZe(e.slug)};return t.append("font_family_settings",JSON.stringify(i)),t}function Kve(e){return(e?.fontFace??[]).map((r,o)=>{let n={...r},i=new FormData;if(n.file){let s=Array.isArray(n.file)?n.file:[n.file],l=[];s.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 Zve(e,t,r){let o=[];for(let i of t)try{let s=await zve(e,i,r);o.push({status:"fulfilled",value:s})}catch(s){o.push({status:"rejected",reason:s})}let n={errors:[],successes:[]};return o.forEach((i,s)=>{if(i.status==="fulfilled"&&i.value){let l=i.value;n.successes.push(l)}else i.reason&&n.errors.push({data:t[s],message:i.reason.message})}),n}async function Xve(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 Gve([o],n,{type:o.type})})));return t.length===1?t[0]:t}function JW(e,t){return t.findIndex(r=>r.fontWeight===e.fontWeight&&r.fontStyle===e.fontStyle)!==-1}function Qve(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 s=n[i];n=n[i]=Array.isArray(s)?[...s]:{...s}}return n[o]=r,e}function mM(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],s=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?s(l):i(l)}var Jve=a(E(),1),_i=(0,_p.createContext)({});_i.displayName="FontLibraryContext";function PZe({children:e}){let t=(0,sg.useRegistry)(),{saveEntityRecord:r,deleteEntityRecord:o}=(0,sg.useDispatch)(ig.store),{globalStylesId:n}=(0,sg.useSelect)(O=>{let{__experimentalGetCurrentGlobalStylesId:V}=O(ig.store);return{globalStylesId:V()}},[]),i=(0,ig.useEntityRecord)("root","globalStyles",n),[s,l]=(0,_p.useState)(!1),{records:c=[],isResolving:u}=(0,ig.useEntityRecords)("postType","wp_font_family",{_embed:!0}),d=(c||[]).map(O=>({id:O.id,...O.font_family_settings||{},fontFace:O?._embedded?.font_faces?.map(V=>V.font_face_settings)||[]}))||[],[f,m]=Le("typography.fontFamilies"),h=async O=>{if(!i.record)return;let V=i.record,W=Qve(V??{},["settings","typography","fontFamilies"],O);await r("root","globalStyles",W)},[g,v]=(0,_p.useState)(""),[b,_]=(0,_p.useState)(void 0),y=f?.theme?f.theme.map(O=>wp(O,{source:"theme"})).sort((O,V)=>O.name.localeCompare(V.name)):[],w=f?.custom?f.custom.map(O=>wp(O,{source:"custom"})).sort((O,V)=>O.name.localeCompare(V.name)):[],S=d?d.map(O=>wp(O,{source:"custom"})).sort((O,V)=>O.name.localeCompare(V.name)):[];(0,_p.useEffect)(()=>{g||_(void 0)},[g]);let x=O=>{if(!O){_(void 0);return}let W=(O.source==="theme"?y:S).find(q=>q.slug===O.slug);_({...W||O,source:O.source})},[C]=(0,_p.useState)(new Set),A=O=>O.reduce((W,q)=>{let Z=q?.fontFace&&q.fontFace?.length>0?q?.fontFace.map(Q=>`${Q.fontStyle??""}${Q.fontWeight??""}`):["normal400"];return W[q.slug]=Z,W},{}),k=O=>A(O==="theme"?y:w),R=(O,V,W,q)=>!V&&!W?!!k(q)[O]:!!k(q)[O]?.includes((V??"")+(W??"")),M=(O,V)=>k(V)[O]||[];async function P(O){l(!0);try{let V=[],W=[];for(let Z of O){let Q=!1,ce=await(0,sg.resolveSelect)(ig.store).getEntityRecords("postType","wp_font_family",{slug:Z.slug,per_page:1,_embed:!0}),re=ce&&ce.length>0?ce[0]:null,fe=re?{id:re.id,...re.font_family_settings,fontFace:(re?._embedded?.font_faces??[]).map(de=>de.font_face_settings)||[]}:null;fe||(Q=!0,fe=await jve(qve(Z),t));let pe=fe.fontFace&&Z.fontFace?fe.fontFace.filter(de=>de&&Z.fontFace&&JW(de,Z.fontFace)):[];fe.fontFace&&Z.fontFace&&(Z.fontFace=Z.fontFace.filter(de=>!JW(de,fe.fontFace)));let $=[],te=[];if(Z?.fontFace?.length??!1){let de=await Zve(fe.id,Kve(Z),t);$=de?.successes,te=de?.errors}($?.length>0||pe?.length>0)&&(fe.fontFace=[...$],V.push(fe)),fe&&!Z?.fontFace?.length&&V.push(fe),Q&&(Z?.fontFace?.length??0)>0&&$?.length===0&&await o("postType","wp_font_family",fe.id,{force:!0}),W=W.concat(te)}let q=W.reduce((Z,Q)=>Z.includes(Q.message)?Z:[...Z,Q.message],[]);if(V.length>0){let Z=L(V);await h(Z)}if(q.length>0){let Z=new Error((0,$W.__)("There was an error installing fonts."));throw Z.installationErrors=q,Z}}finally{l(!1)}}async function T(O){if(!O?.id)throw new Error((0,$W.__)("Font family to uninstall is not defined."));try{await o("postType","wp_font_family",O.id,{force:!0});let V=N(O);return await h(V),{deleted:!0}}catch(V){throw console.error("There was an error uninstalling the font family:",V),V}}let N=O=>{let W=(f?.[O.source??""]??[]).filter(Z=>Z.slug!==O.slug),q={...f,[O.source??""]:W};return m(q),O.fontFace&&O.fontFace.forEach(Z=>{vE(Z,"all")}),q},L=O=>{let V=F(O),W={...f,custom:Yve(f?.custom,V)};return m(W),D(V),W},F=O=>O.map(({id:V,fontFace:W,...q})=>({...q,...W&&W.length>0?{fontFace:W.map(({id:Z,...Q})=>Q)}:{}})),D=O=>{O.forEach(V=>{V.fontFace&&V.fontFace.forEach(W=>{let q=O_(W?.src??"");q&&ng(W,q,"all")})})},z=(O,V)=>{let W=f?.[O.source??""]??[],q=mM(O,V,W);m({...f,[O.source??""]:q});let Z=R(O.slug,V?.fontStyle??"",V?.fontWeight??"",O.source??"custom");if(V&&Z)vE(V,"all");else{let Q=O_(V?.src??"");V&&Q&&ng(V,Q,"all")}},B=async O=>{if(!O.src)return;let V=O_(O.src);!V||C.has(V)||(ng(O,V,"document"),C.add(V))};return(0,Jve.jsx)(_i.Provider,{value:{libraryFontSelected:b,handleSetLibraryFontSelected:x,fontFamilies:f??{},baseCustomFonts:S,isFontActivated:R,getFontFacesActivated:M,loadFontFaceAsset:B,installFonts:P,uninstallFontFamily:T,toggleActivateFont:z,getAvailableFontsOutline:A,modalTabOpen:g,setModalTabOpen:v,saveFontFamilies:h,isResolvingLibrary:u,isInstalling:s},children:e})}var hM=PZe;var D_=a(j(),1),OM=a(G(),1),NM=a(ae(),1),Fbe=a(Y(),1);var Rt=a(G(),1),yE=a(ae(),1),eG=a(Y(),1),Md=a(U(),1),co=a(j(),1);var M_=a(j(),1),vM=a(U(),1),Jl=a(G(),1);var $ve=a(G(),1),Od=a(U(),1);var gM=a(E(),1);function kZe(e){if(e.preview)return e.preview;if(e.src)return Array.isArray(e.src)?e.src[0]:e.src}function RZe(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 AZe({font:e,text:t}){let r=(0,Od.useRef)(null),o=RZe(e),n=qb(e);t=t||("name"in e?e.name:"");let i=e.preview,[s,l]=(0,Od.useState)(!1),[c,u]=(0,Od.useState)(!1),{loadFontFaceAsset:d}=(0,Od.useContext)(_i),f=i??kZe(o),m=f&&f.match(/\.(png|jpg|jpeg|gif|svg)$/i),h=tve(o),g={fontSize:"18px",lineHeight:1,opacity:c?"1":"0",...n,...h};return(0,Od.useEffect)(()=>{let v=new window.IntersectionObserver(([b])=>{l(b.isIntersecting)},{});return r.current&&v.observe(r.current),()=>v.disconnect()},[r]),(0,Od.useEffect)(()=>{(async()=>s&&(!m&&o.src&&await d(o),u(!0)))()},[o,s,d,m]),(0,gM.jsx)("div",{ref:r,children:m?(0,gM.jsx)("img",{src:f,loading:"lazy",alt:t,className:"font-library__font-variant_demo-image"}):(0,gM.jsx)($ve.__experimentalText,{style:g,className:"font-library__font-variant_demo-text",children:t})})}var N_=AZe;var Nd=a(E(),1);function IZe({font:e,onClick:t,variantsText:r,navigatorPath:o,shouldFocus:n}){let i=e.fontFace?.length||1,s={cursor:t?"pointer":"default"},l=(0,Jl.useNavigator)(),c=(0,vM.useRef)(null);return(0,vM.useEffect)(()=>{n&&c.current?.focus()},[n]),(0,Nd.jsx)(Jl.Button,{ref:c,__next40pxDefaultSize:!0,onClick:()=>{t(),o&&l.goTo(o)},style:s,className:"font-library__font-card",children:(0,Nd.jsxs)(Jl.Flex,{justify:"space-between",wrap:!1,children:[(0,Nd.jsx)(N_,{font:e}),(0,Nd.jsxs)(Jl.Flex,{justify:"flex-end",children:[(0,Nd.jsx)(Jl.FlexItem,{children:(0,Nd.jsx)(Jl.__experimentalText,{className:"font-library__font-card__count",children:r||(0,M_.sprintf)((0,M_._n)("%d variant","%d variants",i),i)})}),(0,Nd.jsx)(Jl.FlexItem,{children:(0,Nd.jsx)(Cn,{icon:(0,M_.isRTL)()?Ar:hr})})]})]})})}var bE=IZe;var bM=a(U(),1),yM=a(G(),1);var $b=a(E(),1);function OZe({face:e,font:t}){let{isFontActivated:r,toggleActivateFont:o}=(0,bM.useContext)(_i),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)},s=t.name+" "+pM(e),l=(0,bM.useId)();return(0,$b.jsx)("div",{className:"font-library__font-card",children:(0,$b.jsxs)(yM.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,$b.jsx)(yM.CheckboxControl,{checked:n,onChange:i,id:l}),(0,$b.jsx)("label",{htmlFor:l,children:(0,$b.jsx)(N_,{font:e,text:s,onClick:i})})]})})}var ebe=OZe;function tbe(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 wM(e){return e.sort((t,r)=>t.fontStyle==="normal"&&r.fontStyle!=="normal"?-1:r.fontStyle==="normal"&&t.fontStyle!=="normal"?1:t.fontStyle===r.fontStyle?tbe(t.fontWeight?.toString()??"normal")-tbe(r.fontWeight?.toString()??"normal"):!t.fontStyle||!r.fontStyle?t.fontStyle?-1:1:t.fontStyle.localeCompare(r.fontStyle))}var mt=a(E(),1);function rbe(e){if(!e)return"";let t={};for(let r of Object.keys(e).sort())t[r]=(e[r]??[]).map(o=>({slug:o.slug,fontFace:(o.fontFace??[]).map(n=>`${n.fontStyle}-${n.fontWeight}`).sort()})).sort((o,n)=>o.slug.localeCompare(n.slug));return JSON.stringify(t)}function NZe(){let{baseCustomFonts:e,libraryFontSelected:t,handleSetLibraryFontSelected:r,uninstallFontFamily:o,isResolvingLibrary:n,isInstalling:i,saveFontFamilies:s,getFontFacesActivated:l}=(0,Md.useContext)(_i),[c,u]=Le("typography.fontFamilies"),[d,f]=(0,Md.useState)(void 0),[m,h]=(0,Md.useState)(!1),[g,v]=(0,Md.useState)(null),[b]=Le("typography.fontFamilies",void 0,"base"),_=(0,eG.useSelect)(q=>{let{__experimentalGetCurrentGlobalStylesId:Z}=q(yE.store);return Z()},[]),y=(0,yE.useEntityRecord)("root","globalStyles",_),w=y?.edits?.settings?.typography?.fontFamilies,S=y?.record?.settings?.typography?.fontFamilies,x=(0,Md.useMemo)(()=>w===void 0?!1:rbe(w)!==rbe(S),[w,S]),C=c?.theme?c.theme.map(q=>wp(q,{source:"theme"})).sort((q,Z)=>q.name.localeCompare(Z.name)):[],A=new Set(C.map(q=>q.slug)),k=b?.theme?C.concat(b.theme.filter(q=>!A.has(q.slug)).map(q=>wp(q,{source:"theme"})).sort((q,Z)=>q.name.localeCompare(Z.name))):[],R=t?.source==="custom"&&t?.id,M=(0,eG.useSelect)(q=>{let{canUser:Z}=q(yE.store);return R&&Z("delete",{kind:"postType",name:"wp_font_family",id:R})},[R]),P=!!t&&t?.source!=="theme"&&M,T=()=>{h(!0)},N=async()=>{v(null);try{await s(c),v({type:"success",message:(0,co.__)("Font family updated successfully.")})}catch(q){v({type:"error",message:(0,co.sprintf)((0,co.__)("There was an error updating the font family. %s"),q.message)})}},L=q=>q?!q.fontFace||!q.fontFace.length?[{fontFamily:q.fontFamily,fontStyle:"normal",fontWeight:"400"}]:wM(q.fontFace):[],F=q=>{let Z=q?.fontFace&&(q?.fontFace?.length??0)>0?q.fontFace.length:1,Q=l(q.slug,q.source).length;return(0,co.sprintf)((0,co.__)("%1$d of %2$d active"),Q,Z)};(0,Md.useEffect)(()=>{r(t)},[]);let D=t?l(t.slug,t.source).length:0,z=t?.fontFace?.length??(t?.fontFamily?1:0),B=D>0&&D!==z,O=D===z,V=()=>{if(!t||!t?.source)return;let q=c?.[t.source]?.filter(Q=>Q.slug!==t.slug)??[],Z=O?q:[...q,t];u({...c,[t.source]:Z}),t.fontFace&&t.fontFace.forEach(Q=>{if(O)vE(Q,"all");else{let ce=O_(Q?.src??"");ce&&ng(Q,ce,"all")}})},W=k.length>0||e.length>0;return(0,mt.jsxs)("div",{className:"font-library__tabpanel-layout",children:[n&&(0,mt.jsx)("div",{className:"font-library__loading",children:(0,mt.jsx)(Rt.ProgressBar,{})}),!n&&(0,mt.jsxs)(mt.Fragment,{children:[(0,mt.jsxs)(Rt.Navigator,{initialPath:t?"/fontFamily":"/",children:[(0,mt.jsx)(Rt.Navigator.Screen,{path:"/",children:(0,mt.jsxs)(Rt.__experimentalVStack,{spacing:"8",children:[g&&(0,mt.jsx)(Rt.Notice,{status:g.type,onRemove:()=>v(null),children:g.message}),!W&&(0,mt.jsx)(Rt.__experimentalText,{as:"p",children:(0,co.__)("No fonts installed.")}),k.length>0&&(0,mt.jsxs)(Rt.__experimentalVStack,{children:[(0,mt.jsx)("h2",{className:"font-library__fonts-title",children:(0,co._x)("Theme","font source")}),(0,mt.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:k.map(q=>(0,mt.jsx)("li",{className:"font-library__fonts-list-item",children:(0,mt.jsx)(bE,{font:q,navigatorPath:"/fontFamily",variantsText:F(q),shouldFocus:q.slug===d,onClick:()=>{v(null),r(q)}})},q.slug))})]}),e.length>0&&(0,mt.jsxs)(Rt.__experimentalVStack,{children:[(0,mt.jsx)("h2",{className:"font-library__fonts-title",children:(0,co._x)("Custom","font source")}),(0,mt.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:e.map(q=>(0,mt.jsx)("li",{className:"font-library__fonts-list-item",children:(0,mt.jsx)(bE,{font:q,navigatorPath:"/fontFamily",variantsText:F(q),shouldFocus:q.slug===d,onClick:()=>{v(null),r(q)}})},q.slug))})]})]})}),(0,mt.jsxs)(Rt.Navigator.Screen,{path:"/fontFamily",children:[t&&(0,mt.jsx)(MZe,{font:t,isOpen:m,setIsOpen:h,setNotice:v,uninstallFontFamily:o,handleSetLibraryFontSelected:r}),(0,mt.jsxs)(Rt.Flex,{justify:"flex-start",children:[(0,mt.jsx)(Rt.Navigator.BackButton,{icon:(0,co.isRTL)()?hr:Ar,size:"small",onClick:()=>{f(t?.slug),r(void 0),v(null)},label:(0,co.__)("Back")}),(0,mt.jsx)(Rt.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:t?.name})]}),g&&(0,mt.jsxs)(mt.Fragment,{children:[(0,mt.jsx)(Rt.__experimentalSpacer,{margin:1}),(0,mt.jsx)(Rt.Notice,{status:g.type,onRemove:()=>v(null),children:g.message}),(0,mt.jsx)(Rt.__experimentalSpacer,{margin:1})]}),(0,mt.jsx)(Rt.__experimentalSpacer,{margin:4}),(0,mt.jsx)(Rt.__experimentalText,{children:(0,co.__)("Choose font variants. Keep in mind that too many variants could make your site slower.")}),(0,mt.jsx)(Rt.__experimentalSpacer,{margin:4}),(0,mt.jsxs)(Rt.__experimentalVStack,{spacing:0,children:[(0,mt.jsx)(Rt.CheckboxControl,{className:"font-library__select-all",label:(0,co.__)("Select all"),checked:O,onChange:V,indeterminate:B}),(0,mt.jsx)(Rt.__experimentalSpacer,{margin:8}),(0,mt.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:t&&L(t).map((q,Z)=>(0,mt.jsx)("li",{className:"font-library__fonts-list-item",children:(0,mt.jsx)(ebe,{font:t,face:q},`face${Z}`)},`face${Z}`))})]})]})]}),(0,mt.jsxs)(Rt.__experimentalHStack,{justify:"flex-end",className:"font-library__footer",children:[i&&(0,mt.jsx)(Rt.ProgressBar,{}),P&&(0,mt.jsx)(Rt.Button,{__next40pxDefaultSize:!0,isDestructive:!0,variant:"tertiary",onClick:T,children:(0,co.__)("Delete")}),(0,mt.jsx)(Rt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:N,disabled:!x,accessibleWhenDisabled:!0,children:(0,co.__)("Update")})]})]})]})}function MZe({font:e,isOpen:t,setIsOpen:r,setNotice:o,uninstallFontFamily:n,handleSetLibraryFontSelected:i}){let s=(0,Rt.useNavigator)(),l=async()=>{o(null),r(!1);try{await n(e),s.goBack(),i(void 0),o({type:"success",message:(0,co.__)("Font family uninstalled successfully.")})}catch(u){o({type:"error",message:(0,co.__)("There was an error uninstalling the font family.")+u.message})}},c=()=>{r(!1)};return(0,mt.jsx)(Rt.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,co.__)("Cancel"),confirmButtonText:(0,co.__)("Delete"),onCancel:c,onConfirm:l,size:"medium",children:e&&(0,co.sprintf)((0,co.__)('Are you sure you want to delete "%s" font and all its variants and assets?'),e.name)})}var _M=NZe;var On=a(U(),1),ut=a(G(),1),ube=a(Te(),1),Qr=a(j(),1);var dbe=a(ae(),1);function obe(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 nbe(e){return e.reduce((t,r)=>({...t,[r.slug]:(r?.fontFace||[]).reduce((o,n)=>({...o,[`${n.fontStyle}-${n.fontWeight}`]:!0}),{})}),{})}function ibe(e,t,r){return t?!!r[e]?.[`${t.fontStyle}-${t.fontWeight}`]:!!r[e]}var wE=a(j(),1),Ys=a(G(),1),$l=a(E(),1);function FZe(){let e=()=>{window.localStorage.setItem("wp-font-library-google-fonts-permission","true"),window.dispatchEvent(new Event("storage"))};return(0,$l.jsx)("div",{className:"font-library__google-fonts-confirm",children:(0,$l.jsx)(Ys.Card,{children:(0,$l.jsxs)(Ys.CardBody,{children:[(0,$l.jsx)(Ys.__experimentalHeading,{level:2,children:(0,wE.__)("Connect to Google Fonts")}),(0,$l.jsx)(Ys.__experimentalSpacer,{margin:6}),(0,$l.jsx)(Ys.__experimentalText,{as:"p",children:(0,wE.__)("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,$l.jsx)(Ys.__experimentalSpacer,{margin:3}),(0,$l.jsx)(Ys.__experimentalText,{as:"p",children:(0,wE.__)("You can alternatively upload files directly on the Upload tab.")}),(0,$l.jsx)(Ys.__experimentalSpacer,{margin:6}),(0,$l.jsx)(Ys.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,wE.__)("Allow access to Google Fonts")})]})})})}var sbe=FZe;var abe=a(U(),1),SM=a(G(),1);var ey=a(E(),1);function DZe({face:e,font:t,handleToggleVariant:r,selected:o}){let n=()=>{if(t?.fontFace){r(t,e);return}r(t)},i=t.name+" "+pM(e),s=(0,abe.useId)();return(0,ey.jsx)("div",{className:"font-library__font-card",children:(0,ey.jsxs)(SM.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,ey.jsx)(SM.CheckboxControl,{checked:o,onChange:n,id:s}),(0,ey.jsx)("label",{htmlFor:s,children:(0,ey.jsx)(N_,{font:e,text:i,onClick:n})})]})})}var lbe=DZe;var tt=a(E(),1),LZe={slug:"all",name:(0,Qr._x)("All","font categories")},cbe="wp-font-library-google-fonts-permission",BZe=500;function VZe({slug:e}){let t=e==="google-fonts",r=()=>window.localStorage.getItem(cbe)==="true",[o,n]=(0,On.useState)(null),[i,s]=(0,On.useState)(void 0),[l,c]=(0,On.useState)(null),[u,d]=(0,On.useState)([]),[f,m]=(0,On.useState)(1),[h,g]=(0,On.useState)({}),[v,b]=(0,On.useState)(t&&!r()),{installFonts:_,isInstalling:y}=(0,On.useContext)(_i),{record:w,isResolving:S}=(0,dbe.useEntityRecord)("root","fontCollection",e);(0,On.useEffect)(()=>{let $=()=>{b(t&&!r())};return $(),window.addEventListener("storage",$),()=>window.removeEventListener("storage",$)},[e,t]);let x=()=>{window.localStorage.setItem(cbe,"false"),window.dispatchEvent(new Event("storage"))};(0,On.useEffect)(()=>{n(null)},[e]),(0,On.useEffect)(()=>{d([])},[o]);let C=(0,On.useMemo)(()=>w?.font_families??[],[w]),A=w?.categories??[],k=[LZe,...A],R=(0,On.useMemo)(()=>obe(C,h),[C,h]),M=Math.max(window.innerHeight,BZe),P=Math.floor((M-417)/61),T=Math.ceil(R.length/P),N=(f-1)*P,L=f*P,F=R.slice(N,L),D=$=>{g({...h,category:$}),m(1)},B=(0,ube.debounce)($=>{g({...h,search:$}),m(1)},300),O=($,te)=>{let de=mM($,te,u);d(de)},V=nbe(u),W=()=>{d([])},q=u.length>0?u[0]?.fontFace?.length??0:0,Z=q>0&&q!==o?.fontFace?.length,Q=q===o?.fontFace?.length,ce=()=>{let $=[];!Q&&o&&$.push(o),d($)},re=async()=>{c(null);let $=u[0];try{$?.fontFace&&await Promise.all($.fontFace.map(async te=>{te.src&&(te.file=await Xve(te.src))}))}catch{c({type:"error",message:(0,Qr.__)("Error installing the fonts, could not be downloaded.")});return}try{await _([$]),c({type:"success",message:(0,Qr.__)("Fonts were installed successfully.")})}catch(te){c({type:"error",message:te.message})}W()},fe=$=>$?!$.fontFace||!$.fontFace.length?[{fontFamily:$.fontFamily,fontStyle:"normal",fontWeight:"400"}]:wM($.fontFace):[];if(v)return(0,tt.jsx)(sbe,{});let pe=e==="google-fonts"&&!v&&!o;return(0,tt.jsxs)("div",{className:"font-library__tabpanel-layout",children:[S&&(0,tt.jsx)("div",{className:"font-library__loading",children:(0,tt.jsx)(ut.ProgressBar,{})}),!S&&w&&(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsxs)(ut.Navigator,{initialPath:"/",className:"font-library__tabpanel-layout",children:[(0,tt.jsxs)(ut.Navigator.Screen,{path:"/",children:[(0,tt.jsxs)(ut.__experimentalHStack,{justify:"space-between",children:[(0,tt.jsxs)(ut.__experimentalVStack,{children:[(0,tt.jsx)(ut.__experimentalHeading,{level:2,size:13,children:w.name}),(0,tt.jsx)(ut.__experimentalText,{children:w.description})]}),pe&&(0,tt.jsx)(ut.DropdownMenu,{icon:bo,label:(0,Qr.__)("Actions"),popoverProps:{position:"bottom left"},controls:[{title:(0,Qr.__)("Revoke access to Google Fonts"),onClick:x}]})]}),(0,tt.jsx)(ut.__experimentalSpacer,{margin:4}),(0,tt.jsxs)(ut.__experimentalHStack,{spacing:4,justify:"space-between",children:[(0,tt.jsx)(ut.SearchControl,{value:h.search,placeholder:(0,Qr.__)("Font name\u2026"),label:(0,Qr.__)("Search"),onChange:B,hideLabelFromVision:!1}),(0,tt.jsx)(ut.SelectControl,{label:(0,Qr.__)("Category"),value:h.category,onChange:D,children:k&&k.map($=>(0,tt.jsx)("option",{value:$.slug,children:$.name},$.slug))})]}),(0,tt.jsx)(ut.__experimentalSpacer,{margin:4}),!!w?.font_families?.length&&!R.length&&(0,tt.jsx)(ut.__experimentalText,{children:(0,Qr.__)("No fonts found. Try with a different search term.")}),(0,tt.jsx)("div",{className:"font-library__fonts-grid__main",children:(0,tt.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:F.map($=>(0,tt.jsx)("li",{className:"font-library__fonts-list-item",children:(0,tt.jsx)(bE,{font:$.font_family_settings,navigatorPath:"/fontFamily",shouldFocus:$.font_family_settings.slug===i,onClick:()=>{n($.font_family_settings)}})},$.font_family_settings.slug))})})]}),(0,tt.jsxs)(ut.Navigator.Screen,{path:"/fontFamily",children:[(0,tt.jsxs)(ut.Flex,{justify:"flex-start",children:[(0,tt.jsx)(ut.Navigator.BackButton,{icon:(0,Qr.isRTL)()?hr:Ar,size:"small",onClick:()=>{s(o?.slug),n(null),c(null)},label:(0,Qr.__)("Back")}),(0,tt.jsx)(ut.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:o?.name})]}),l&&(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(ut.__experimentalSpacer,{margin:1}),(0,tt.jsx)(ut.Notice,{status:l.type,onRemove:()=>c(null),children:l.message}),(0,tt.jsx)(ut.__experimentalSpacer,{margin:1})]}),(0,tt.jsx)(ut.__experimentalSpacer,{margin:4}),(0,tt.jsx)(ut.__experimentalText,{children:(0,Qr.__)("Select font variants to install.")}),(0,tt.jsx)(ut.__experimentalSpacer,{margin:4}),(0,tt.jsx)(ut.CheckboxControl,{className:"font-library__select-all",label:(0,Qr.__)("Select all"),checked:Q,onChange:ce,indeterminate:Z}),(0,tt.jsx)(ut.__experimentalVStack,{spacing:0,children:(0,tt.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:o&&fe(o).map(($,te)=>(0,tt.jsx)("li",{className:"font-library__fonts-list-item",children:(0,tt.jsx)(lbe,{font:o,face:$,handleToggleVariant:O,selected:ibe(o.slug,o.fontFace?$:null,V)})},`face${te}`))})}),(0,tt.jsx)(ut.__experimentalSpacer,{margin:16})]})]}),o&&(0,tt.jsx)(ut.Flex,{justify:"flex-end",className:"font-library__footer",children:(0,tt.jsx)(ut.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:re,isBusy:y,disabled:u.length===0||y,accessibleWhenDisabled:!0,children:(0,Qr.__)("Install")})}),!o&&(0,tt.jsxs)(ut.__experimentalHStack,{expanded:!1,className:"font-library__footer",justify:"end",spacing:6,children:[(0,tt.jsx)(ut.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:1,className:"font-library__page-selection",children:(0,On.createInterpolateElement)((0,Qr.sprintf)((0,Qr._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging"),"<CurrentPage />",T),{div:(0,tt.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,tt.jsx)(ut.SelectControl,{"aria-label":(0,Qr.__)("Current page"),value:f.toString(),options:[...Array(T)].map(($,te)=>({label:(te+1).toString(),value:(te+1).toString()})),onChange:$=>m(parseInt($)),size:"small",variant:"minimal"})})}),(0,tt.jsxs)(ut.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,tt.jsx)(ut.Button,{onClick:()=>m(f-1),disabled:f===1,accessibleWhenDisabled:!0,label:(0,Qr.__)("Previous page"),icon:(0,Qr.isRTL)()?kl:Rl,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,tt.jsx)(ut.Button,{onClick:()=>m(f+1),disabled:f===T,accessibleWhenDisabled:!0,label:(0,Qr.__)("Next page"),icon:(0,Qr.isRTL)()?Rl:kl,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})]})]})}var xM=VZe;var F_=a(j(),1),rs=a(G(),1),SE=a(U(),1);var CM=(e=>typeof oa<"u"?oa:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof oa<"u"?oa:t)[r]}):e)(function(e){if(typeof oa<"u")return oa.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),fbe=(function(){var e,t,r;return(function(){function o(n,i,s){function l(d,f){if(!i[d]){if(!n[d]){var m=typeof CM=="function"&&CM;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 b=n[d][1][v];return l(b||v)},g,g.exports,o,n,i,s)}return i[d].exports}for(var c=typeof CM=="function"&&CM,u=0;u<s.length;u++)l(s[u]);return l}return o})()({1:[function(o,n,i){var s=4096,l=2*s+32,c=2*s-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=s,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,s);if(m<0)throw new Error("Unexpected end of input");if(m<s){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_[(s<<1)+h]=this.buf_[h];this.buf_ptr_=s}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 s=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 s=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,b=16,_=256,y=704,w=26,S=6,x=2,C=8,A=255,k=1080,R=18,M=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),P=16,T=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),N=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),L=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 F(oe){var ee;return oe.readBits(1)===0?16:(ee=oe.readBits(3),ee>0?17+ee:(ee=oe.readBits(3),ee>0?8+ee:17))}function D(oe){if(oe.readBits(1)){var ee=oe.readBits(3);return ee===0?1:oe.readBits(ee)+(1<<ee)}return 0}function z(){this.meta_block_length=0,this.input_end=0,this.is_uncompressed=0,this.is_metadata=!1}function B(oe){var ee=new z,ue,ie,le;if(ee.input_end=oe.readBits(1),ee.input_end&&oe.readBits(1))return ee;if(ue=oe.readBits(2)+4,ue===7){if(ee.is_metadata=!0,oe.readBits(1)!==0)throw new Error("Invalid reserved bit");if(ie=oe.readBits(2),ie===0)return ee;for(le=0;le<ie;le++){var Oe=oe.readBits(8);if(le+1===ie&&ie>1&&Oe===0)throw new Error("Invalid size byte");ee.meta_block_length|=Oe<<le*8}}else for(le=0;le<ue;++le){var ke=oe.readBits(4);if(le+1===ue&&ue>4&&ke===0)throw new Error("Invalid size nibble");ee.meta_block_length|=ke<<le*4}return++ee.meta_block_length,!ee.input_end&&!ee.is_metadata&&(ee.is_uncompressed=oe.readBits(1)),ee}function O(oe,ee,ue){var ie=ee,le;return ue.fillBitWindow(),ee+=ue.val_>>>ue.bit_pos_&A,le=oe[ee].bits-C,le>0&&(ue.bit_pos_+=C,ee+=oe[ee].value,ee+=ue.val_>>>ue.bit_pos_&(1<<le)-1),ue.bit_pos_+=oe[ee].bits,oe[ee].value}function V(oe,ee,ue,ie){for(var le=0,Oe=v,ke=0,Me=0,Ne=32768,Fe=[],X=0;X<32;X++)Fe.push(new d(0,0));for(f(Fe,0,5,oe,R);le<ee&&Ne>0;){var ge=0,Ue;if(ie.readMoreInput(),ie.fillBitWindow(),ge+=ie.val_>>>ie.bit_pos_&31,ie.bit_pos_+=Fe[ge].bits,Ue=Fe[ge].value&255,Ue<b)ke=0,ue[le++]=Ue,Ue!==0&&(Oe=Ue,Ne-=32768>>Ue);else{var Ye=Ue-14,st,St,dt=0;if(Ue===b&&(dt=Oe),Me!==dt&&(ke=0,Me=dt),st=ke,ke>0&&(ke-=2,ke<<=Ye),ke+=ie.readBits(Ye)+3,St=ke-st,le+St>ee)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var xt=0;xt<St;xt++)ue[le+xt]=Me;le+=St,Me!==0&&(Ne-=St<<15-Me)}}if(Ne!==0)throw new Error("[ReadHuffmanCodeLengths] space = "+Ne);for(;le<ee;le++)ue[le]=0}function W(oe,ee,ue,ie){var le=0,Oe,ke=new Uint8Array(oe);if(ie.readMoreInput(),Oe=ie.readBits(2),Oe===1){for(var Me,Ne=oe-1,Fe=0,X=new Int32Array(4),ge=ie.readBits(2)+1;Ne;)Ne>>=1,++Fe;for(Me=0;Me<ge;++Me)X[Me]=ie.readBits(Fe)%oe,ke[X[Me]]=2;switch(ke[X[0]]=1,ge){case 1:break;case 3:if(X[0]===X[1]||X[0]===X[2]||X[1]===X[2])throw new Error("[ReadHuffmanCode] invalid symbols");break;case 2:if(X[0]===X[1])throw new Error("[ReadHuffmanCode] invalid symbols");ke[X[1]]=1;break;case 4:if(X[0]===X[1]||X[0]===X[2]||X[0]===X[3]||X[1]===X[2]||X[1]===X[3]||X[2]===X[3])throw new Error("[ReadHuffmanCode] invalid symbols");ie.readBits(1)?(ke[X[2]]=3,ke[X[3]]=3):ke[X[0]]=2;break}}else{var Me,Ue=new Uint8Array(R),Ye=32,st=0,St=[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(Me=Oe;Me<R&&Ye>0;++Me){var dt=M[Me],xt=0,Xt;ie.fillBitWindow(),xt+=ie.val_>>>ie.bit_pos_&15,ie.bit_pos_+=St[xt].bits,Xt=St[xt].value,Ue[dt]=Xt,Xt!==0&&(Ye-=32>>Xt,++st)}if(!(st===1||Ye===0))throw new Error("[ReadHuffmanCode] invalid num_codes or space");V(Ue,oe,ke,ie)}if(le=f(ee,ue,C,ke,oe),le===0)throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return le}function q(oe,ee,ue){var ie,le;return ie=O(oe,ee,ue),le=h.kBlockLengthPrefixCode[ie].nbits,h.kBlockLengthPrefixCode[ie].offset+ue.readBits(le)}function Z(oe,ee,ue){var ie;return oe<P?(ue+=T[oe],ue&=3,ie=ee[ue]+N[oe]):ie=oe-P+1,ie}function Q(oe,ee){for(var ue=oe[ee],ie=ee;ie;--ie)oe[ie]=oe[ie-1];oe[0]=ue}function ce(oe,ee){var ue=new Uint8Array(256),ie;for(ie=0;ie<256;++ie)ue[ie]=ie;for(ie=0;ie<ee;++ie){var le=oe[ie];oe[ie]=ue[le],le&&Q(ue,le)}}function re(oe,ee){this.alphabet_size=oe,this.num_htrees=ee,this.codes=new Array(ee+ee*L[oe+31>>>5]),this.htrees=new Uint32Array(ee)}re.prototype.decode=function(oe){var ee,ue,ie=0;for(ee=0;ee<this.num_htrees;++ee)this.htrees[ee]=ie,ue=W(this.alphabet_size,this.codes,ie,oe),ie+=ue};function fe(oe,ee){var ue={num_htrees:null,context_map:null},ie,le=0,Oe,ke;ee.readMoreInput();var Me=ue.num_htrees=D(ee)+1,Ne=ue.context_map=new Uint8Array(oe);if(Me<=1)return ue;for(ie=ee.readBits(1),ie&&(le=ee.readBits(4)+1),Oe=[],ke=0;ke<k;ke++)Oe[ke]=new d(0,0);for(W(Me+le,Oe,0,ee),ke=0;ke<oe;){var Fe;if(ee.readMoreInput(),Fe=O(Oe,0,ee),Fe===0)Ne[ke]=0,++ke;else if(Fe<=le)for(var X=1+(1<<Fe)+ee.readBits(Fe);--X;){if(ke>=oe)throw new Error("[DecodeContextMap] i >= context_map_size");Ne[ke]=0,++ke}else Ne[ke]=Fe-le,++ke}return ee.readBits(1)&&ce(Ne,oe),ue}function pe(oe,ee,ue,ie,le,Oe,ke){var Me=ue*2,Ne=ue,Fe=O(ee,ue*k,ke),X;Fe===0?X=le[Me+(Oe[Ne]&1)]:Fe===1?X=le[Me+(Oe[Ne]-1&1)]+1:X=Fe-2,X>=oe&&(X-=oe),ie[ue]=X,le[Me+(Oe[Ne]&1)]=X,++Oe[Ne]}function $(oe,ee,ue,ie,le,Oe){var ke=le+1,Me=ue&le,Ne=Oe.pos_&c.IBUF_MASK,Fe;if(ee<8||Oe.bit_pos_+(ee<<3)<Oe.bit_end_pos_){for(;ee-- >0;)Oe.readMoreInput(),ie[Me++]=Oe.readBits(8),Me===ke&&(oe.write(ie,ke),Me=0);return}if(Oe.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;Oe.bit_pos_<32;)ie[Me]=Oe.val_>>>Oe.bit_pos_,Oe.bit_pos_+=8,++Me,--ee;if(Fe=Oe.bit_end_pos_-Oe.bit_pos_>>3,Ne+Fe>c.IBUF_MASK){for(var X=c.IBUF_MASK+1-Ne,ge=0;ge<X;ge++)ie[Me+ge]=Oe.buf_[Ne+ge];Fe-=X,Me+=X,ee-=X,Ne=0}for(var ge=0;ge<Fe;ge++)ie[Me+ge]=Oe.buf_[Ne+ge];if(Me+=Fe,ee-=Fe,Me>=ke){oe.write(ie,ke),Me-=ke;for(var ge=0;ge<Me;ge++)ie[ge]=ie[ke+ge]}for(;Me+ee>=ke;){if(Fe=ke-Me,Oe.input_.read(ie,Me,Fe)<Fe)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");oe.write(ie,ke),ee-=Fe,Me=0}if(Oe.input_.read(ie,Me,ee)<ee)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");Oe.reset()}function te(oe){var ee=oe.bit_pos_+7&-8,ue=oe.readBits(ee-oe.bit_pos_);return ue==0}function de(oe){var ee=new s(oe),ue=new c(ee);F(ue);var ie=B(ue);return ie.meta_block_length}i.BrotliDecompressedSize=de;function ve(oe,ee){var ue=new s(oe);ee==null&&(ee=de(oe));var ie=new Uint8Array(ee),le=new l(ie);return we(ue,le),le.pos<le.buffer.length&&(le.buffer=le.buffer.subarray(0,le.pos)),le.buffer}i.BrotliDecompressBuffer=ve;function we(oe,ee){var ue,ie=0,le=0,Oe=0,ke,Me=0,Ne,Fe,X,ge,Ue=[16,15,11,4],Ye=0,st=0,St=0,dt=[new re(0,0),new re(0,0),new re(0,0)],xt,Xt,Xe,fs=128+c.READ_SIZE;Xe=new c(oe),Oe=F(Xe),ke=(1<<Oe)-16,Ne=1<<Oe,Fe=Ne-1,X=new Uint8Array(Ne+fs+u.maxDictionaryWordLength),ge=Ne,xt=[],Xt=[];for(var Ga=0;Ga<3*k;Ga++)xt[Ga]=new d(0,0),Xt[Ga]=new d(0,0);for(;!le;){var kr=0,Oi,an=[1<<28,1<<28,1<<28],vt=[0],Ft=[1,1,1],ne=[0,1,0,1,0,1],xe=[0],H,Pe,Vt,Ee,Ro=null,Ie=null,mr,me=null,he,ea=0,Wt=null,ze=0,Ce=0,it=null,ht=0,bt=0,Rr=0,Gr,ro;for(ue=0;ue<3;++ue)dt[ue].codes=null,dt[ue].htrees=null;Xe.readMoreInput();var vf=B(Xe);if(kr=vf.meta_block_length,ie+kr>ee.buffer.length){var cv=new Uint8Array(ie+kr);cv.set(ee.buffer),ee.buffer=cv}if(le=vf.input_end,Oi=vf.is_uncompressed,vf.is_metadata){for(te(Xe);kr>0;--kr)Xe.readMoreInput(),Xe.readBits(8);continue}if(kr!==0){if(Oi){Xe.bit_pos_=Xe.bit_pos_+7&-8,$(ee,kr,ie,X,Fe,Xe),ie+=kr;continue}for(ue=0;ue<3;++ue)Ft[ue]=D(Xe)+1,Ft[ue]>=2&&(W(Ft[ue]+2,xt,ue*k,Xe),W(w,Xt,ue*k,Xe),an[ue]=q(Xt,ue*k,Xe),xe[ue]=1);for(Xe.readMoreInput(),H=Xe.readBits(2),Pe=P+(Xe.readBits(4)<<H),Vt=(1<<H)-1,Ee=Pe+(48<<H),Ie=new Uint8Array(Ft[0]),ue=0;ue<Ft[0];++ue)Xe.readMoreInput(),Ie[ue]=Xe.readBits(2)<<1;var go=fe(Ft[0]<<S,Xe);mr=go.num_htrees,Ro=go.context_map;var ps=fe(Ft[2]<<x,Xe);for(he=ps.num_htrees,me=ps.context_map,dt[0]=new re(_,mr),dt[1]=new re(y,Ft[1]),dt[2]=new re(Ee,he),ue=0;ue<3;++ue)dt[ue].decode(Xe);for(Wt=0,it=0,Gr=Ie[vt[0]],bt=m.lookupOffsets[Gr],Rr=m.lookupOffsets[Gr+1],ro=dt[1].htrees[0];kr>0;){var Ao,ms,ta,f0,O4,ra,Ya,bf,o1,p0,n1;for(Xe.readMoreInput(),an[1]===0&&(pe(Ft[1],xt,1,vt,ne,xe,Xe),an[1]=q(Xt,k,Xe),ro=dt[1].htrees[vt[1]]),--an[1],Ao=O(dt[1].codes,ro,Xe),ms=Ao>>6,ms>=2?(ms-=2,Ya=-1):Ya=0,ta=h.kInsertRangeLut[ms]+(Ao>>3&7),f0=h.kCopyRangeLut[ms]+(Ao&7),O4=h.kInsertLengthPrefixCode[ta].offset+Xe.readBits(h.kInsertLengthPrefixCode[ta].nbits),ra=h.kCopyLengthPrefixCode[f0].offset+Xe.readBits(h.kCopyLengthPrefixCode[f0].nbits),st=X[ie-1&Fe],St=X[ie-2&Fe],p0=0;p0<O4;++p0)Xe.readMoreInput(),an[0]===0&&(pe(Ft[0],xt,0,vt,ne,xe,Xe),an[0]=q(Xt,0,Xe),ea=vt[0]<<S,Wt=ea,Gr=Ie[vt[0]],bt=m.lookupOffsets[Gr],Rr=m.lookupOffsets[Gr+1]),o1=m.lookup[bt+st]|m.lookup[Rr+St],ze=Ro[Wt+o1],--an[0],St=st,st=O(dt[0].codes,dt[0].htrees[ze],Xe),X[ie&Fe]=st,(ie&Fe)===Fe&&ee.write(X,Ne),++ie;if(kr-=O4,kr<=0)break;if(Ya<0){var o1;if(Xe.readMoreInput(),an[2]===0&&(pe(Ft[2],xt,2,vt,ne,xe,Xe),an[2]=q(Xt,2*k,Xe),Ce=vt[2]<<x,it=Ce),--an[2],o1=(ra>4?3:ra-2)&255,ht=me[it+o1],Ya=O(dt[2].codes,dt[2].htrees[ht],Xe),Ya>=Pe){var N4,ZK,i1;Ya-=Pe,ZK=Ya&Vt,Ya>>=H,N4=(Ya>>1)+1,i1=(2+(Ya&1)<<N4)-4,Ya=Pe+(i1+Xe.readBits(N4)<<H)+ZK}}if(bf=Z(Ya,Ue,Ye),bf<0)throw new Error("[BrotliDecompress] invalid distance");if(ie<ke&&Me!==ke?Me=ie:Me=ke,n1=ie&Fe,bf>Me)if(ra>=u.minDictionaryWordLength&&ra<=u.maxDictionaryWordLength){var i1=u.offsetsByLength[ra],XK=bf-Me-1,QK=u.sizeBitsByLength[ra],J5e=(1<<QK)-1,$5e=XK&J5e,JK=XK>>QK;if(i1+=$5e*ra,JK<g.kNumTransforms){var M4=g.transformDictionaryWord(X,n1,i1,ra,JK);if(n1+=M4,ie+=M4,kr-=M4,n1>=ge){ee.write(X,Ne);for(var xk=0;xk<n1-ge;xk++)X[xk]=X[ge+xk]}}else throw new Error("Invalid backward reference. pos: "+ie+" distance: "+bf+" len: "+ra+" bytes left: "+kr)}else throw new Error("Invalid backward reference. pos: "+ie+" distance: "+bf+" len: "+ra+" bytes left: "+kr);else{if(Ya>0&&(Ue[Ye&3]=bf,++Ye),ra>kr)throw new Error("Invalid backward reference. pos: "+ie+" distance: "+bf+" len: "+ra+" bytes left: "+kr);for(p0=0;p0<ra;++p0)X[ie&Fe]=X[ie-bf&Fe],(ie&Fe)===Fe&&ee.write(X,Ne),++ie,--kr}st=X[ie-1&Fe],St=X[ie-2&Fe]}ie&=1073741823}}ee.write(X,ie&Fe)}i.BrotliDecompress=we,u.init()},{"./bit_reader":1,"./context":2,"./dictionary":6,"./huffman":7,"./prefix":9,"./streams":10,"./transform":11}],4:[function(o,n,i){var s=o("base64-js");i.init=function(){var l=o("./decode").BrotliDecompressBuffer,c=s.toByteArray(o("./dictionary.bin.js"));return l(c)}},{"./decode":3,"./dictionary.bin.js":5,"base64-js":8}],5:[function(o,n,i){n.exports="W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYMGCkV0fXWEoMFbESXrKEZ9wdUEsyw9g4bJlEt1Y6oVMxMRTEVbCIwZzJzboK5j8m4YH02qgXYhv1V+PM435sLVxyHJihaJREEhZGqL03txGFQLm76caGO/ovxKvzCby/3vMTtX/459f0igi7WutnKiMQ6wODSoRh/8Lx1V3Q99MvKtwB6bHdERYRY0hStJoMjNeTsNX7bn+Y7e4EQ3bf8xBc7L0BsyfFPK43dGSXpL6clYC/I328h54/VYrQ5i0648FgbGtl837svJ35L3Mot/+nPlNpWgKx1gGXQYqX6n+bbZ7wuyCHKcUok12Xjqub7NXZGzqBx0SD+uziNf87t7ve42jxSKQoW3nyxVrWIGlFShhCKxjpZZ5MeGna0+lBkk+kaN8F9qFBAFgEogyMBdcX/T1W/WnMOi/7ycWUQloEBKGeC48MkiwqJkJO+12eQiOFHMmck6q/IjWW3RZlany23TBm+cNr/84/oi5GGmGBZWrZ6j+zykVozz5fT/QH/Da6WTbZYYPynVNO7kxzuNN2kxKKWche5WveitPKAecB8YcAHz/+zXLjcLzkdDSktNIDwZE9J9X+tto43oJy65wApM3mDzYtCwX9lM+N5VR3kXYo0Z3t0TtXfgBFg7gU8oN0Dgl7fZlUbhNll+0uuohRVKjrEd8egrSndy5/Tgd2gqjA4CAVuC7ESUmL3DZoGnfhQV8uwnpi8EGvAVVsowNRxPudck7+oqAUDkwZopWqFnW1riss0t1z6iCISVKreYGNvQcXv+1L9+jbP8cd/dPUiqBso2q+7ZyFBvENCkkVr44iyPbtOoOoCecWsiuqMSML5lv+vN5MzUr+Dnh73G7Q1YnRYJVYXHRJaNAOByiaK6CusgFdBPE40r0rvqXV7tksKO2DrHYXBTv8P5ysqxEx8VDXUDDqkPH6NNOV/a2WH8zlkXRELSa8P+heNyJBBP7PgsG1EtWtNef6/i+lcayzQwQCsduidpbKfhWUDgAEmyhGu/zVTacI6RS0zTABrOYueemnVa19u9fT23N/Ta6RvTpof5DWygqreCqrDAgM4LID1+1T/taU6yTFVLqXOv+/MuQOFnaF8vLMKD7tKWDoBdALgxF33zQccCcdHx8fKIVdW69O7qHtXpeGr9jbbpFA+qRMWr5hp0s67FPc7HAiLV0g0/peZlW7hJPYEhZyhpSwahnf93/tZgfqZWXFdmdXBzqxGHLrQKxoAY6fRoBhgCRPmmGueYZ5JexTVDKUIXzkG/fqp/0U3hAgQdJ9zumutK6nqWbaqvm1pgu03IYR+G+8s0jDBBz8cApZFSBeuWasyqo2OMDKAZCozS+GWSvL/HsE9rHxooe17U3s/lTE+VZAk4j3dp6uIGaC0JMiqR5CUsabPyM0dOYDR7Ea7ip4USZlya38YfPtvrX/tBlhHilj55nZ1nfN24AOAi9BVtz/Mbn8AEDJCqJgsVUa6nQnSxv2Fs7l/NlCzpfYEjmPrNyib/+t0ei2eEMjvNhLkHCZlci4WhBe7ePZTmzYqlY9+1pxtS4GB+5lM1BHT9tS270EWUDYFq1I0yY/fNiAk4bk9yBgmef/f2k6AlYQZHsNFnW8wBQxCd68iWv7/35bXfz3JZmfGligWAKRjIs3IpzxQ27vAglHSiOzCYzJ9L9A1CdiyFvyR66ucA4jKifu5ehwER26yV7HjKqn5Mfozo7Coxxt8LWWPT47BeMxX8p0Pjb7hZn+6bw7z3Lw+7653j5sI8CLu5kThpMlj1m4c2ch3jGcP1FsT13vuK3qjecKTZk2kHcOZY40UX+qdaxstZqsqQqgXz+QGF99ZJLqr3VYu4aecl1Ab5GmqS8k/GV5b95zxQ5d4EfXUJ6kTS/CXF/aiqKDOT1T7Jz5z0PwDUcwr9clLN1OJGCiKfqvah+h3XzrBOiLOW8wvn8gW6qE8vPxi+Efv+UH55T7PQFVMh6cZ1pZQlzJpKZ7P7uWvwPGJ6DTlR6wbyj3Iv2HyefnRo/dv7dNx+qaa0N38iBsR++Uil7Wd4afwDNsrzDAK4fXZwvEY/jdKuIKXlfrQd2C39dW7ntnRbIp9OtGy9pPBn/V2ASoi/2UJZfS+xuGLH8bnLuPlzdTNS6zdyk8Dt/h6sfOW5myxh1f+zf3zZ3MX/mO9cQPp5pOx967ZA6/pqHvclNfnUFF+rq+Vd7alKr6KWPcIDhpn6v2K6NlUu6LrKo8b/pYpU/Gazfvtwhn7tEOUuXht5rUJdSf6sLjYf0VTYDgwJ81yaqKTUYej/tbHckSRb/HZicwGJqh1mAHB/IuNs9dc9yuvF3D5Xocm3elWFdq5oEy70dYFit79yaLiNjPj5UUcVmZUVhQEhW5V2Z6Cm4HVH/R8qlamRYwBileuh07CbEce3TXa2JmXWBf+ozt319psboobeZhVnwhMZzOeQJzhpTDbP71Tv8HuZxxUI/+ma3XW6DFDDs4+qmpERwHGBd2edxwUKlODRdUWZ/g0GOezrbzOZauFMai4QU6GVHV6aPNBiBndHSsV4IzpvUiiYyg6OyyrL4Dj5q/Lw3N5kAwftEVl9rNd7Jk5PDij2hTH6wIXnsyXkKePxbmHYgC8A6an5Fob/KH5GtC0l4eFso+VpxedtJHdHpNm+Bvy4C79yVOkrZsLrQ3OHCeB0Ra+kBIRldUGlDCEmq2RwXnfyh6Dz+alk6eftI2n6sastRrGwbwszBeDRS/Fa/KwRJkCzTsLr/JCs5hOPE/MPLYdZ1F1fv7D+VmysX6NpOC8aU9F4Qs6HvDyUy9PvFGDKZ/P5101TYHFl8pjj6wm/qyS75etZhhfg0UEL4OYmHk6m6dO192AzoIyPSV9QedDA4Ml23rRbqxMPMxf7FJnDc5FTElVS/PyqgePzmwVZ26NWhRDQ+oaT7ly7ell4s3DypS1s0g+tOr7XHrrkZj9+x/mJBttrLx98lFIaRZzHz4aC7r52/JQ4VjHahY2/YVXZn/QC2ztQb/sY3uRlyc5vQS8nLPGT/n27495i8HPA152z7Fh5aFpyn1GPJKHuPL8Iw94DuW3KjkURAWZXn4EQy89xiKEHN1mk/tkM4gYDBxwNoYvRfE6LFqsxWJtPrDGbsnLMap3Ka3MUoytW0cvieozOmdERmhcqzG+3HmZv2yZeiIeQTKGdRT4HHNxekm1tY+/n06rGmFleqLscSERzctTKM6G9P0Pc1RmVvrascIxaO1CQCiYPE15bD7c3xSeW7gXxYjgxcrUlcbIvO0r+Yplhx0kTt3qafDOmFyMjgGxXu73rddMHpV1wMubyAGcf/v5dLr5P72Ta9lBF+fzMJrMycwv+9vnU3ANIl1cH9tfW7af8u0/HG0vV47jNFXzFTtaha1xvze/s8KMtCYucXc1nzfd/MQydUXn/b72RBt5wO/3jRcMH9BdhC/yctKBIveRYPrNpDWqBsO8VMmP+WvRaOcA4zRMR1PvSoO92rS7pYEv+fZfEfTMzEdM+6X5tLlyxExhqLRkms5EuLovLfx66de5fL2/yX02H52FPVwahrPqmN/E0oVXnsCKhbi/yRxX83nRbUKWhzYceXOntfuXn51NszJ6MO73pQf5Pl4in3ec4JU8hF7ppV34+mm9r1LY0ee/i1O1wpd8+zfLztE0cqBxggiBi5Bu95v9l3r9r/U5hweLn+TbfxowrWDqdJauKd8+q/dH8sbPkc9ttuyO94f7/XK/nHX46MPFLEb5qQlNPvhJ50/59t9ft3LXu7uVaWaO2bDrDCnRSzZyWvFKxO1+vT8MwwunR3bX0CkfPjqb4K9O19tn5X50PvmYpEwHtiW9WtzuV/s76B1zvLLNkViNd8ySxIl/3orfqP90TyTGaf7/rx8jQzeHJXdmh/N6YDvbvmTBwCdxfEQ1NcL6wNMdSIXNq7b1EUzRy1/Axsyk5p22GMG1b+GxFgbHErZh92wuvco0AuOLXct9hvw2nw/LqIcDRRmJmmZzcgUa7JpM/WV/S9IUfbF56TL2orzqwebdRD8nIYNJ41D/hz37Fo11p2Y21wzPcn713qVGhqtevStYfGH4n69OEJtPvbbLYWvscDqc3Hgnu166+tAyLnxrX0Y5zoYjV++1sI7t5kMr02KT/+uwtkc+rZLOf/qn/s3nYCf13Dg8/sB2diJgjGqjQ+TLhxbzyue2Ob7X6/9lUwW7a+lbznHzOYy8LKW1C/uRPbQY3KW/0gO9LXunHLvPL97afba9bFtc9hmz7GAttjVYlCvQAiOwAk/gC5+hkLEs6tr3AZKxLJtOEwk2dLxTYWsIB/j/ToWtIWzo906FrSG8iaqqqqqqiIiIiAgzMzMzNz+AyK+01/zi8n8S+Y1MjoRaQ80WU/G8MBlO+53VPXANrWm4wzGUVZUjjBJZVdhpcfkjsmcWaO+UEldXi1e+zq+HOsCpknYshuh8pOLISJun7TN0EIGW2xTnlOImeecnoGW4raxe2G1T3HEvfYUYMhG+gAFOAwh5nK8mZhwJMmN7r224QVsNFvZ87Z0qatvknklyPDK3Hy45PgVKXji52Wen4d4PlFVVYGnNap+fSpFbK90rYnhUc6n91Q3AY9E0tJOFrcfZtm/491XbcG/jsViUPPX76qmeuiz+qY1Hk7/1VPM405zWVuoheLUimpWYdVzCmUdKHebMdzgrYrb8mL2eeLSnRWHdonfZa8RsOU9F37w+591l5FLYHiOqWeHtE/lWrBHcRKp3uhtr8yXm8LU/5ms+NM6ZKsqu90cFZ4o58+k4rdrtB97NADFbwmEG7lXqvirhOTOqU14xuUF2myIjURcPHrPOQ4lmM3PeMg7bUuk0nnZi67bXsU6H8lhqIo8TaOrEafCO1ARK9PjC0QOoq2BxmMdgYB9G/lIb9++fqNJ2s7BHGFyBNmZAR8J3KCo012ikaSP8BCrf6VI0X5xdnbhHIO+B5rbOyB54zXkzfObyJ4ecwxfqBJMLFc7m59rNcw7hoHnFZ0b00zee+gTqvjm61Pb4xn0kcDX4jvHM0rBXZypG3DCKnD/Waa/ZtHmtFPgO5eETx+k7RrVg3aSwm2YoNXnCs3XPQDhNn+Fia6IlOOuIG6VJH7TP6ava26ehKHQa2T4N0tcZ9dPCGo3ZdnNltsHQbeYt5vPnJezV/cAeNypdml1vCHI8M81nSRP5Qi2+mI8v/sxiZru9187nRtp3f/42NemcONa+4eVC3PCZzc88aZh851CqSsshe70uPxeN/dmYwlwb3trwMrN1Gq8jbnApcVDx/yDPeYs5/7r62tsQ6lLg+DiFXTEhzR9dHqv0iT4tgj825W+H3XiRUNUZT2kR9Ri0+lp+UM3iQtS8uOE23Ly4KYtvqH13jghUntJRAewuzNLDXp8RxdcaA3cMY6TO2IeSFRXezeWIjCqyhsUdMYuCgYTZSKpBype1zRfq8FshvfBPc6BAQWl7/QxIDp3VGo1J3vn42OEs3qznws+YLRXbymyB19a9XBx6n/owcyxlEYyFWCi+kG9F+EyD/4yn80+agaZ9P7ay2Dny99aK2o91FkfEOY8hBwyfi5uwx2y5SaHmG+oq/zl1FX/8irOf8Y3vAcX/6uLP6A6nvMO24edSGPjQc827Rw2atX+z2bKq0CmW9mOtYnr5/AfDa1ZfPaXnKtlWborup7QYx+Or2uWb+N3N//2+yDcXMqIJdf55xl7/vsj4WoPPlxLxtVrkJ4w/tTe3mLdATOOYwxcq52w5Wxz5MbPdVs5O8/lhfE7dPj0bIiPQ3QV0iqm4m3YX8hRfc6jQ3fWepevMqUDJd86Z4vwM40CWHnn+WphsGHfieF02D3tmZvpWD+kBpNCFcLnZhcmmrhpGzzbdA+sQ1ar18OJD87IOKOFoRNznaHPNHUfUNhvY1iU+uhvEvpKHaUn3qK3exVVyX4joipp3um7FmYJWmA+WbIDshRpbVRx5/nqstCgy87FGbfVB8yDGCqS+2qCsnRwnSAN6zgzxfdB2nBT/vZ4/6uxb6oH8b4VBRxiIB93wLa47hG3w2SL/2Z27yOXJFwZpSJaBYyvajA7vRRYNKqljXKpt/CFD/tSMr18DKKbwB0xggBePatl1nki0yvqW5zchlyZmJ0OTxJ3D+fsYJs/mxYN5+Le5oagtcl+YsVvy8kSjI2YGvGjvmpkRS9W2dtXqWnVuxUhURm1lKtou/hdEq19VBp9OjGvHEQSmrpuf2R24mXGheil8KeiANY8fW1VERUfBImb64j12caBZmRViZHbeVMjCrPDg9A90IXrtnsYCuZtRQ0PyrKDjBNOsPfKsg1pA02gHlVr0OXiFhtp6nJqXVzcbfM0KnzC3ggOENPE9VBdmHKN6LYaijb4wXxJn5A0FSDF5j+h1ooZx885Jt3ZKzO5n7Z5WfNEOtyyPqQEnn7WLv5Fis3PdgMshjF1FRydbNyeBbyKI1oN1TRVrVK7kgsb/zjX4NDPIRMctVeaxVB38Vh1x5KbeJbU138AM5KzmZu3uny0ErygxiJF7GVXUrPzFxrlx1uFdAaZFDN9cvIb74qD9tzBMo7L7WIEYK+sla1DVMHpF0F7b3+Y6S+zjvLeDMCpapmJo1weBWuxKF3rOocih1gun4BoJh1kWnV/Jmiq6uOhK3VfKxEHEkafjLgK3oujaPzY6SXg8phhL4TNR1xvJd1Wa0aYFfPUMLrNBDCh4AuGRTbtKMc6Z1Udj8evY/ZpCuMAUefdo69DZUngoqE1P9A3PJfOf7WixCEj+Y6t7fYeHbbxUAoFV3M89cCKfma3fc1+jKRe7MFWEbQqEfyzO2x/wrO2VYH7iYdQ9BkPyI8/3kXBpLaCpU7eC0Yv/am/tEDu7HZpqg0EvHo0nf/R/gRzUWy33/HXMJQeu1GylKmOkXzlCfGFruAcPPhaGqZOtu19zsJ1SO2Jz4Ztth5cBX6mRQwWmDwryG9FUMlZzNckMdK+IoMJv1rOWnBamS2w2KHiaPMPLC15hCZm4KTpoZyj4E2TqC/P6r7/EhnDMhKicZZ1ZwxuC7DPzDGs53q8gXaI9kFTK+2LTq7bhwsTbrMV8Rsfua5lMS0FwbTitUVnVa1yTb5IX51mmYnUcP9wPr8Ji1tiYJeJV9GZTrQhF7vvdU2OTU42ogJ9FDwhmycI2LIg++03C6scYhUyUuMV5tkw6kGUoL+mjNC38+wMdWNljn6tGPpRES7veqrSn5TRuv+dh6JVL/iDHU1db4c9WK3++OrH3PqziF916UMUKn8G67nN60GfWiHrXYhUG3yVWmyYak59NHj8t1smG4UDiWz2rPHNrKnN4Zo1LBbr2/eF9YZ0n0blx2nG4X+EKFxvS3W28JESD+FWk61VCD3z/URGHiJl++7TdBwkCj6tGOH3qDb0QqcOF9Kzpj0HUb/KyFW3Yhj2VMKJqGZleFBH7vqvf7WqLC3XMuHV8q8a4sTFuxUtkD/6JIBvKaVjv96ndgruKZ1k/BHzqf2K9fLk7HGXANyLDd1vxkK/i055pnzl+zw6zLnwXlVYVtfmacJgEpRP1hbGgrYPVN6v2lG+idQNGmwcKXu/8xEj/P6qe/sB2WmwNp6pp8jaISMkwdleFXYK55NHWLTTbutSUqjBfDGWo/Yg918qQ+8BRZSAHZbfuNZz2O0sov1Ue4CWlVg3rFhM3Kljj9ksGd/NUhk4nH+a5UN2+1i8+NM3vRNp7uQ6sqexSCukEVlVZriHNqFi5rLm9TMWa4qm3idJqppQACol2l4VSuvWLfta4JcXy3bROPNbXOgdOhG47LC0CwW/dMlSx4Jf17aEU3yA1x9p+Yc0jupXgcMuYNku64iYOkGToVDuJvlbEKlJqsmiHbvNrIVZEH+yFdF8DbleZ6iNiWwMqvtMp/mSpwx5KxRrT9p3MAPTHGtMbfvdFhyj9vhaKcn3At8Lc16Ai+vBcSp1ztXi7rCJZx/ql7TXcclq6Q76UeKWDy9boS0WHIjUuWhPG8LBmW5y2rhuTpM5vsLt+HOLh1Yf0DqXa9tsfC+kaKt2htA0ai/L2i7RKoNjEwztkmRU0GfgW1TxUvPFhg0V7DdfWJk5gfrccpYv+MA9M0dkGTLECeYwUixRzjRFdmjG7zdZIl3XKB9YliNKI31lfa7i2JG5C8Ss+rHe0D7Z696/V3DEAOWHnQ9yNahMUl5kENWS6pHKKp2D1BaSrrHdE1w2qNxIztpXgUIrF0bm15YML4b6V1k+GpNysTahKMVrrS85lTVo9OGJ96I47eAy5rYWpRf/mIzeoYU1DKaQCTUVwrhHeyNoDqHel+lLxr9WKzhSYw7vrR6+V5q0pfi2k3L1zqkubY6rrd9ZLvSuWNf0uqnkY+FpTvFzSW9Fp0b9l8JA7THV9eCi/PY/SCZIUYx3BU2alj7Cm3VV6eYpios4b6WuNOJdYXUK3zTqj5CVG2FqYM4Z7CuIU0qO05XR0d71FHM0YhZmJmTRfLlXEumN82BGtzdX0S19t1e+bUieK8zRmqpa4Qc5TSjifmaQsY2ETLjhI36gMR1+7qpjdXXHiceUekfBaucHShAOiFXmv3sNmGQyU5iVgnoocuonQXEPTFwslHtS8R+A47StI9wj0iSrtbi5rMysczFiImsQ+bdFClnFjjpXXwMy6O7qfjOr8Fb0a7ODItisjnn3EQO16+ypd1cwyaAW5Yzxz5QknfMO7643fXW/I9y3U2xH27Oapqr56Z/tEzglj6IbT6HEHjopiXqeRbe5mQQvxtcbDOVverN0ZgMdzqRYRjaXtMRd56Q4cZSmdPvZJdSrhJ1D9zNXPqAEqPIavPdfubt5oke2kmv0dztIszSv2VYuoyf1UuopbsYb+uX9h6WpwjpgtZ6fNNawNJ4q8O3CFoSbioAaOSZMx2GYaPYB+rEb6qjQiNRFQ76TvwNFVKD+BhH9VhcKGsXzmMI7BptU/CNWolM7YzROvpFAntsiWJp6eR2d3GarcYShVYSUqhmYOWj5E96NK2WvmYNTeY7Zs4RUEdv9h9QT4EseKt6LzLrqEOs3hxAY1MaNWpSa6zZx8F3YOVeCYMS88W+CYHDuWe4yoc6YK+djDuEOrBR5lvh0r+Q9uM88lrjx9x9AtgpQVNE8r+3O6Gvw59D+kBF/UMXyhliYUtPjmvXGY6Dk3x+kEOW+GtdMVC4EZTqoS/jmR0P0LS75DOc/w2vnri97M4SdbZ8qeU7gg8DVbERkU5geaMQO3mYrSYyAngeUQqrN0C0/vsFmcgWNXNeidsTAj7/4MncJR0caaBUpbLK1yBCBNRjEv6KvuVSdpPnEMJdsRRtqJ+U8tN1gXA4ePHc6ZT0eviI73UOJF0fEZ8YaneAQqQdGphNvwM4nIqPnXxV0xA0fnCT+oAhJuyw/q8jO0y8CjSteZExwBpIN6SvNp6A5G/abi6egeND/1GTguhuNjaUbbnSbGd4L8937Ezm34Eyi6n1maeOBxh3PI0jzJDf5mh/BsLD7F2GOKvlA/5gtvxI3/eV4sLfKW5Wy+oio+es/u6T8UU+nsofy57Icb/JlZHPFtCgd/x+bwt3ZT+xXTtTtTrGAb4QehC6X9G+8YT+ozcLxDsdCjsuOqwPFnrdLYaFc92Ui0m4fr39lYmlCaqTit7G6O/3kWDkgtXjNH4BiEm/+jegQnihOtfffn33WxsFjhfMd48HT+f6o6X65j7XR8WLSHMFkxbvOYsrRsF1bowDuSQ18Mkxk4qz2zoGPL5fu9h2Hqmt1asl3Q3Yu3szOc+spiCmX4AETBM3pLoTYSp3sVxahyhL8eC4mPN9k2x3o0xkiixIzM3CZFzf5oR4mecQ5+ax2wCah3/crmnHoqR0+KMaOPxRif1oEFRFOO/kTPPmtww+NfMXxEK6gn6iU32U6fFruIz8Q4WgljtnaCVTBgWx7diUdshC9ZEa5yKpRBBeW12r/iNc/+EgNqmhswNB8SBoihHXeDF7rrWDLcmt3V8GYYN7pXRy4DZjj4DJuUBL5iC3DQAaoo4vkftqVTYRGLS3mHZ7gdmdTTqbgNN/PTdTCOTgXolc88MhXAEUMdX0iy1JMuk5wLsgeu0QUYlz2S4skTWwJz6pOm/8ihrmgGfFgri+ZWUK2gAPHgbWa8jaocdSuM4FJYoKicYX/ZSENkg9Q1ZzJfwScfVnR2DegOGwCvmogaWJCLQepv9WNlU6QgsmOwICquU28Mlk3d9W5E81lU/5Ez0LcX6lwKMWDNluNKfBDUy/phJgBcMnfkh9iRxrdOzgs08JdPB85Lwo+GUSb4t3nC+0byqMZtO2fQJ4U2zGIr49t/28qmmGv2RanDD7a3FEcdtutkW8twwwlUSpb8QalodddbBfNHKDQ828BdE7OBgFdiKYohLawFYqpybQoxATZrheLhdI7+0Zlu9Q1myRcd15r9UIm8K2LGJxqTegntqNVMKnf1a8zQiyUR1rxoqjiFxeHxqFcYUTHfDu7rhbWng6qOxOsI+5A1p9mRyEPdVkTlE24vY54W7bWc6jMgZvNXdfC9/9q7408KDsbdL7Utz7QFSDetz2picArzrdpL8OaCHC9V26RroemtDZ5yNM/KGkWMyTmfnInEvwtSD23UcFcjhaE3VKzkoaEMKGBft4XbIO6forTY1lmGQwVmKicBCiArDzE+1oIxE08fWeviIOD5TznqH+OoHadvoOP20drMPe5Irg3XBQziW2XDuHYzjqQQ4wySssjXUs5H+t3FWYMHppUnBHMx/nYIT5d7OmjDbgD9F6na3m4l7KdkeSO3kTEPXafiWinogag7b52taiZhL1TSvBFmEZafFq2H8khQaZXuitCewT5FBgVtPK0j4xUHPfUz3Q28eac1Z139DAP23dgki94EC8vbDPTQC97HPPSWjUNG5tWKMsaxAEMKC0665Xvo1Ntd07wCLNf8Q56mrEPVpCxlIMVlQlWRxM3oAfpgIc+8KC3rEXUog5g06vt7zgXY8grH7hhwVSaeuvC06YYRAwpbyk/Unzj9hLEZNs2oxPQB9yc+GnL6zTgq7rI++KDJwX2SP8Sd6YzTuw5lV/kU6eQxRD12omfQAW6caTR4LikYkBB1CMOrvgRr/VY75+NSB40Cni6bADAtaK+vyxVWpf9NeKJxN2KYQ8Q2xPB3K1s7fuhvWbr2XpgW044VD6DRs0qXoqKf1NFsaGvKJc47leUV3pppP/5VTKFhaGuol4Esfjf5zyCyUHmHthChcYh4hYLQF+AFWsuq4t0wJyWgdwQVOZiV0efRHPoK5+E1vjz9wTJmVkITC9oEstAsyZSgE/dbicwKr89YUxKZI+owD205Tm5lnnmDRuP/JnzxX3gMtlrcX0UesZdxyQqYQuEW4R51vmQ5xOZteUd8SJruMlTUzhtVw/Nq7eUBcqN2/HVotgfngif60yKEtoUx3WYOZlVJuJOh8u59fzSDPFYtQgqDUAGyGhQOAvKroXMcOYY0qjnStJR/G3aP+Jt1sLVlGV8POwr/6OGsqetnyF3TmTqZjENfnXh51oxe9qVUw2M78EzAJ+IM8lZ1MBPQ9ZWSVc4J3mWSrLKrMHReA5qdGoz0ODRsaA+vwxXA2cAM4qlfzBJA6581m4hzxItQw5dxrrBL3Y6kCbUcFxo1S8jyV44q//+7ASNNudZ6xeaNOSIUffqMn4A9lIjFctYn2gpEPAb3f7p3iIBN8H14FUGQ9ct2hPsL+cEsTgUrR47uJVN4n4wt/wgfwwHuOnLd4yobkofy8JvxSQTA7rMpDIc608SlZFJfZYcmbT0tAHpPE8MrtQ42siTUNWxqvWZOmvu9f0JPoQmg+6l7sZWwyfi6PXkxJnwBraUG0MYG4zYHQz3igy/XsFkx5tNQxw43qvI9dU3f0DdhOUlHKjmi1VAr2Kiy0HZwD8VeEbhh0OiDdMYspolQsYdSwjCcjeowIXNZVUPmL2wwIkYhmXKhGozdCJ4lRKbsf4NBh/XnQoS92NJEWOVOFs2YhN8c5QZFeK0pRdAG40hqvLbmoSA8xQmzOOEc7wLcme9JOsjPCEgpCwUs9E2DohMHRhUeyGIN6TFvrbny8nDuilsDpzrH5mS76APoIEJmItS67sQJ+nfwddzmjPxcBEBBCw0kWDwd0EZCkNeOD7NNQhtBm7KHL9mRxj6U1yWU2puzlIDtpYxdH4ZPeXBJkTGAJfUr/oTCz/iypY6uXaR2V1doPxJYlrw2ghH0D5gbrhFcIxzYwi4a/4hqVdf2DdxBp6vGYDjavxMAAoy+1+3aiO6S3W/QAKNVXagDtvsNtx7Ks+HKgo6U21B+QSZgIogV5Bt+BnXisdVfy9VyXV+2P5fMuvdpAjM1o/K9Z+XnE4EOCrue+kcdYHqAQ0/Y/OmNlQ6OI33jH/uD1RalPaHpJAm2av0/xtpqdXVKNDrc9F2izo23Wu7firgbURFDNX9eGGeYBhiypyXZft2j3hTvzE6PMWKsod//rEILDkzBXfi7xh0eFkfb3/1zzPK/PI5Nk3FbZyTl4mq5BfBoVoqiPHO4Q4QKZAlrQ3MdNfi3oxIjvsM3kAFv3fdufurqYR3PSwX/mpGy/GFI/B2MNPiNdOppWVbs/gjF3YH+QA9jMhlAbhvasAHstB0IJew09iAkmXHl1/TEj+jvHOpOGrPRQXbPADM+Ig2/OEcUcpgPTItMtW4DdqgfYVI/+4hAFWYjUGpOP/UwNuB7+BbKOcALbjobdgzeBQfjgNSp2GOpxzGLj70Vvq5cw2AoYENwKLUtJUX8sGRox4dVa/TN4xKwaKcl9XawQR/uNus700Hf17pyNnezrUgaY9e4MADhEDBpsJT6y1gDJs1q6wlwGhuUzGR7C8kgpjPyHWwsvrf3yn1zJEIRa5eSxoLAZOCR9xbuztxFRJW9ZmMYfCFJ0evm9F2fVnuje92Rc4Pl6A8bluN8MZyyJGZ0+sNSb//DvAFxC2BqlEsFwccWeAl6CyBcQV1bx4mQMBP1Jxqk1EUADNLeieS2dUFbQ/c/kvwItbZ7tx0st16viqd53WsRmPTKv2AD8CUnhtPWg5aUegNpsYgasaw2+EVooeNKmrW3MFtj76bYHJm5K9gpAXZXsE5U8DM8XmVOSJ1F1WnLy6nQup+jx52bAb+rCq6y9WXl2B2oZDhfDkW7H3oYfT/4xx5VncBuxMXP2lNfhUVQjSSzSRbuZFE4vFawlzveXxaYKVs8LpvAb8IRYF3ZHiRnm0ADeNPWocwxSzNseG7NrSEVZoHdKWqaGEBz1N8Pt7kFbqh3LYmAbm9i1IChIpLpM5AS6mr6OAPHMwwznVy61YpBYX8xZDN/a+lt7n+x5j4bNOVteZ8lj3hpAHSx1VR8vZHec4AHO9XFCdjZ9eRkSV65ljMmZVzaej2qFn/qt1lvWzNZEfHxK3qOJrHL6crr0CRzMox5f2e8ALBB4UGFZKA3tN6F6IXd32GTJXGQ7DTi9j/dNcLF9jCbDcWGKxoKTYblIwbLDReL00LRcDPMcQuXLMh5YzgtfjkFK1DP1iDzzYYVZz5M/kWYRlRpig1htVRjVCknm+h1M5LiEDXOyHREhvzCGpFZjHS0RsK27o2avgdilrJkalWqPW3D9gmwV37HKmfM3F8YZj2ar+vHFvf3B8CRoH4kDHIK9mrAg+owiEwNjjd9V+FsQKYR8czJrUkf7Qoi2YaW6EVDZp5zYlqiYtuXOTHk4fAcZ7qBbdLDiJq0WNV1l2+Hntk1mMWvxrYmc8kIx8G3rW36J6Ra4lLrTOCgiOihmow+YnzUT19jbV2B3RWqSHyxkhmgsBqMYWvOcUom1jDQ436+fcbu3xf2bbeqU/ca+C4DOKE+e3qvmeMqW3AxejfzBRFVcwVYPq4L0APSWWoJu+5UYX4qg5U6YTioqQGPG9XrnuZ/BkxuYpe6Li87+18EskyQW/uA+uk2rpHpr6hut2TlVbKgWkFpx+AZffweiw2+VittkEyf/ifinS/0ItRL2Jq3tQOcxPaWO2xrG68GdFoUpZgFXaP2wYVtRc6xYCfI1CaBqyWpg4bx8OHBQwsV4XWMibZZ0LYjWEy2IxQ1mZrf1/UNbYCJplWu3nZ4WpodIGVA05d+RWSS+ET9tH3RfGGmNI1cIY7evZZq7o+a0bjjygpmR3mVfalkT/SZGT27Q8QGalwGlDOS9VHCyFAIL0a1Q7JiW3saz9gqY8lqKynFrPCzxkU4SIfLc9VfCI5edgRhDXs0edO992nhTKHriREP1NJC6SROMgQ0xO5kNNZOhMOIT99AUElbxqeZF8A3xrfDJsWtDnUenAHdYWSwAbYjFqQZ+D5gi3hNK8CSxU9i6f6ClL9IGlj1OPMQAsr84YG6ijsJpCaGWj75c3yOZKBB9mNpQNPUKkK0D6wgLH8MGoyRxTX6Y05Q4AnYNXMZwXM4eij/9WpsM/9CoRnFQXGR6MEaY+FXvXEO3RO0JaStk6OXuHVATHJE+1W+TU3bSZ2ksMtqjO0zfSJCdBv7y2d8DMx6TfVme3q0ZpTKMMu4YL/t7ciTNtdDkwPogh3Cnjx7qk08SHwf+dksZ7M2vCOlfsF0hQ6J4ehPCaHTNrM/zBSOqD83dBEBCW/F/LEmeh0nOHd7oVl3/Qo/9GUDkkbj7yz+9cvvu+dDAtx8NzCDTP4iKdZvk9MWiizvtILLepysflSvTLFBZ37RLwiriqyRxYv/zrgFd/9XVHh/OmzBvDX4mitMR/lUavs2Vx6cR94lzAkplm3IRNy4TFfu47tuYs9EQPIPVta4P64tV+sZ7n3ued3cgEx2YK+QL5+xms6osk8qQbTyuKVGdaX9FQqk6qfDnT5ykxk0VK7KZ62b6DNDUfQlqGHxSMKv1P0XN5BqMeKG1P4Wp5QfZDUCEldppoX0U6ss2jIko2XpURKCIhfaOqLPfShdtS37ZrT+jFRSH2xYVV1rmT/MBtRQhxiO4MQ3iAGlaZi+9PWBEIXOVnu9jN1f921lWLZky9bqbM3J2MAAI9jmuAx3gyoEUa6P2ivs0EeNv/OR+AX6q5SW6l5HaoFuS6jr6yg9limu+P0KYKzfMXWcQSfTXzpOzKEKpwI3YGXZpSSy2LTlMgfmFA3CF6R5c9xWEtRuCg2ZPUQ2Nb6dRFTNd4TfGHrnEWSKHPuRyiJSDAZ+KX0VxmSHjGPbQTLVpqixia2uyhQ394gBMt7C3ZAmxn/DJS+l1fBsAo2Eir/C0jG9csd4+/tp12pPc/BVJGaK9mfvr7M/CeztrmCO5qY06Edi4xAGtiEhnWAbzLy2VEyazE1J5nPmgU4RpW4Sa0TnOT6w5lgt3/tMpROigHHmexBGAMY0mdcDbDxWIz41NgdD6oxgHsJRgr5RnT6wZAkTOcStU4NMOQNemSO7gxGahdEsC+NRVGxMUhQmmM0llWRbbmFGHzEqLM4Iw0H7577Kyo+Zf+2cUFIOw93gEY171vQaM0HLwpjpdRR6Jz7V0ckE7XzYJ0TmY9znLdzkva0vNrAGGT5SUZ5uaHDkcGvI0ySpwkasEgZPMseYcu85w8HPdSNi+4T6A83iAwDbxgeFcB1ZM2iGXzFcEOUlYVrEckaOyodfvaYSQ7GuB4ISE0nYJc15X/1ciDTPbPCgYJK55VkEor4LvzL9S2WDy4xj+6FOqVyTAC2ZNowheeeSI5hA/02l8UYkv4nk9iaVn+kCVEUstgk5Hyq+gJm6R9vG3rhuM904he/hFmNQaUIATB1y3vw+OmxP4X5Yi6A5I5jJufHCjF9+AGNwnEllZjUco6XhsO5T5+R3yxz5yLVOnAn0zuS+6zdj0nTJbEZCbXJdtpfYZfCeCOqJHoE2vPPFS6eRLjIJlG69X93nfR0mxSFXzp1Zc0lt/VafDaImhUMtbnqWVb9M4nGNQLN68BHP7AR8Il9dkcxzmBv8PCZlw9guY0lurbBsmNYlwJZsA/B15/HfkbjbwPddaVecls/elmDHNW2r4crAx43feNkfRwsaNq/yyJ0d/p5hZ6AZajz7DBfUok0ZU62gCzz7x8eVfJTKA8IWn45vINLSM1q+HF9CV9qF3zP6Ml21kPPL3CXzkuYUlnSqT+Ij4tI/od5KwIs+tDajDs64owN7tOAd6eucGz+KfO26iNcBFpbWA5732bBNWO4kHNpr9D955L61bvHCF/mwSrz6eQaDjfDEANqGMkFc+NGxpKZzCD2sj/JrHd+zlPQ8Iz7Q+2JVIiVCuCKoK/hlAEHzvk/Piq3mRL1rT/fEh9hoT5GJmeYswg1otiKydizJ/fS2SeKHVu6Z3JEHjiW8NaTQgP5xdBli8nC57XiN9hrquBu99hn9zqwo92+PM2JXtpeVZS0PdqR5mDyDreMMtEws+CpwaRyyzoYtfcvt9PJIW0fJVNNi/FFyRsea7peLvJrL+5b4GOXJ8tAr+ATk9f8KmiIsRhqRy0vFzwRV3Z5dZ3QqIU8JQ/uQpkJbjMUMFj2F9sCFeaBjI4+fL/oN3+LQgjI4zuAfQ+3IPIPFQBccf0clJpsfpnBxD84atwtupkGqKvrH7cGNl/QcWcSi6wcVDML6ljOgYbo+2BOAWNNjlUBPiyitUAwbnhFvLbnqw42kR3Yp2kv2dMeDdcGOX5kT4S6M44KHEB/SpCfl7xgsUvs+JNY9G3O2X/6FEt9FyAn57lrbiu+tl83sCymSvq9eZbe9mchL7MTf/Ta78e80zSf0hYY5eUU7+ff14jv7Xy8qjzfzzzvaJnrIdvFb5BLWKcWGy5/w7+vV2cvIfwHqdTB+RuJK5oj9mbt0Hy94AmjMjjwYNZlNS6uiyxNnwNyt3gdreLb64p/3+08nXkb92LTkkRgFOwk1oGEVllcOj5lv1hfAZywDows0944U8vUFw+A/nuVq/UCygsrmWIBnHyU01d0XJPwriEOvx/ISK6Pk4y2w0gmojZs7lU8TtakBAdne4v/aNxmMpK4VcGMp7si0yqsiolXRuOi1Z1P7SqD3Zmp0CWcyK4Ubmp2SXiXuI5nGLCieFHKHNRIlcY3Pys2dwMTYCaqlyWSITwr2oGXvyU3h1Pf8eQ3w1bnD7ilocVjYDkcXR3Oo1BXgMLTUjNw2xMVwjtp99NhSVc5aIWrDQT5DHPKtCtheBP4zHcw4dz2eRdTMamhlHhtfgqJJHI7NGDUw1XL8vsSeSHyKqDtqoAmrQqsYwvwi7HW3ojWyhIa5oz5xJTaq14NAzFLjVLR12rRNUQ6xohDnrWFb5bG9yf8aCD8d5phoackcNJp+Dw3Due3RM+5Rid7EuIgsnwgpX0rUWh/nqPtByMhMZZ69NpgvRTKZ62ViZ+Q7Dp5r4K0d7EfJuiy06KuIYauRh5Ecrhdt2QpTS1k1AscEHvapNbU3HL1F2TFyR33Wxb5MvH5iZsrn3SDcsxlnnshO8PLwmdGN+paWnQuORtZGX37uhFT64SeuPsx8UOokY6ON85WdQ1dki5zErsJGazcBOddWJEKqNPiJpsMD1GrVLrVY+AOdPWQneTyyP1hRX/lMM4ZogGGOhYuAdr7F/DOiAoc++cn5vlf0zkMUJ40Z1rlgv9BelPqVOpxKeOpzKdF8maK+1Vv23MO9k/8+qpLoxrIGH2EDQlnGmH8CD31G8QqlyQIcpmR5bwmSVw9/Ns6IHgulCRehvZ/+VrM60Cu/r3AontFfrljew74skYe2uyn7JKQtFQBQRJ9ryGic/zQOsbS4scUBctA8cPToQ3x6ZBQu6DPu5m1bnCtP8TllLYA0UTQNVqza5nfew3Mopy1GPUwG5jsl0OVXniPmAcmLqO5HG8Hv3nSLecE9oOjPDXcsTxoCBxYyzBdj4wmnyEV4kvFDunipS8SSkvdaMnTBN9brHUR8xdmmEAp/Pdqk9uextp1t+JrtXwpN/MG2w/qhRMpSNxQ1uhg/kKO30eQ/FyHUDkWHT8V6gGRU4DhDMxZu7xXij9Ui6jlpWmQCqJg3FkOTq3WKneCRYZxBXMNAVLQgHXSCGSqNdjebY94oyIpVjMYehAiFx/tqzBXFHZaL5PeeD74rW5OysFoUXY8sebUZleFTUa/+zBKVTFDopTReXNuZq47QjkWnxjirCommO4L/GrFtVV21EpMyw8wyThL5Y59d88xtlx1g1ttSICDwnof6lt/6zliPzgVUL8jWBjC0o2D6Kg+jNuThkAlaDJsq/AG2aKA//A76avw2KNqtv223P+Wq3StRDDNKFFgtsFukYt1GFDWooFVXitaNhb3RCyJi4cMeNjROiPEDb4k+G3+hD8tsg+5hhmSc/8t2JTSwYoCzAI75doq8QTHe+E/Tw0RQSUDlU+6uBeNN3h6jJGX/mH8oj0i3caCNsjvTnoh73BtyZpsflHLq6AfwJNCDX4S98h4+pCOhGKDhV3rtkKHMa3EG4J9y8zFWI4UsfNzC/Rl5midNn7gwoN9j23HGCQQ+OAZpTTPMdiVow740gIyuEtd0qVxMyNXhHcnuXRKdw5wDUSL358ktjMXmAkvIB73BLa1vfF9BAUZInPYJiwxqFWQQBVk7gQH4ojfUQ/KEjn+A/WR6EEe4CtbpoLe1mzHkajgTIoE0SLDHVauKhrq12zrAXBGbPPWKCt4DGedq3JyGRbmPFW32bE7T20+73BatV/qQhhBWfWBFHfhYWXjALts38FemnoT+9bn1jDBMcUMmYgSc0e7GQjv2MUBwLU8ionCpgV+Qrhg7iUIfUY6JFxR0Y+ZTCPM+rVuq0GNLyJXX6nrUTt8HzFBRY1E/FIm2EeVA9NcXrj7S6YYIChVQCWr/m2fYUjC4j0XLkzZ8GCSLfmkW3PB/xq+nlXsKVBOj7vTvqKCOMq7Ztqr3cQ+N8gBnPaAps+oGwWOkbuxnRYj/x/WjiDclVrs22xMK4qArE1Ztk1456kiJriw6abkNeRHogaPRBgbgF9Z8i/tbzWELN4CvbqtrqV9TtGSnmPS2F9kqOIBaazHYaJ9bi3AoDBvlZasMluxt0BDXfhp02Jn411aVt6S4TUB8ZgFDkI6TP6gwPY85w+oUQSsjIeXVminrwIdK2ZAawb8Se6XOJbOaliQxHSrnAeONDLuCnFejIbp4YDtBcQCwMsYiRZfHefuEJqJcwKTTJ8sx5hjHmJI1sPFHOr6W9AhZ2NAod38mnLQk1gOz2LCAohoQbgMbUK9RMEA3LkiF7Sr9tLZp6lkciIGhE2V546w3Mam53VtVkGbB9w0Yk2XiRnCmbpxmHr2k4eSC0RuNbjNsUfDIfc8DZvRvgUDe1IlKdZTzcT4ZGEb53dp8VtsoZlyXzLHOdAbsp1LPTVaHvLA0GYDFMbAW/WUBfUAdHwqLFAV+3uHvYWrCfhUOR2i89qvCBoOb48usAGdcF2M4aKn79k/43WzBZ+xR1L0uZfia70XP9soQReeuhZiUnXFDG1T8/OXNmssTSnYO+3kVLAgeiY719uDwL9FQycgLPessNihMZbAKG7qwPZyG11G1+ZA3jAX2yddpYfmaKBlmfcK/V0mwIRUDC0nJSOPUl2KB8h13F4dlVZiRhdGY5farwN+f9hEb1cRi41ZcGDn6Xe9MMSTOY81ULJyXIHSWFIQHstVYLiJEiUjktlHiGjntN5/btB8Fu+vp28zl2fZXN+dJDyN6EXhS+0yzqpl/LSJNEUVxmu7BsNdjAY0jVsAhkNuuY0E1G48ej25mSt+00yPbQ4SRCVkIwb6ISvYtmJRPz9Zt5dk76blf+lJwAPH5KDF+vHAmACLoCdG2Adii6dOHnNJnTmZtoOGO8Q1jy1veMw6gbLFToQmfJa7nT7Al89mRbRkZZQxJTKgK5Kc9INzmTJFp0tpAPzNmyL/F08bX3nhCumM/cR/2RPn9emZ3VljokttZD1zVWXlUIqEU7SLk5I0lFRU0AcENXBYazNaVzsVHA/sD3o9hm42wbHIRb/BBQTKzAi8s3+bMtpOOZgLdQzCYPfX3UUxKd1WYVkGH7lh/RBBgMZZwXzU9+GYxdBqlGs0LP+DZ5g2BWNh6FAcR944B+K/JTWI3t9YyVyRhlP4CCoUk/mmF7+r2pilVBjxXBHFaBfBtr9hbVn2zDuI0kEOG3kBx8CGdPOjX1ph1POOZJUO1JEGG0jzUy2tK4X0CgVNYhmkqqQysRNtKuPdCJqK3WW57kaV17vXgiyPrl4KEEWgiGF1euI4QkSFHFf0TDroQiLNKJiLbdhH0YBhriRNCHPxSqJmNNoketaioohqMglh6wLtEGWSM1EZbQg72h0UJAIPVFCAJOThpQGGdKfFovcwEeiBuZHN2Ob4uVM7+gwZLz1D9E7ta4RmMZ24OBBAg7Eh6dLXGofZ4U2TFOCQMKjwhVckjrydRS+YaqCw1kYt6UexuzbNEDyYLTZnrY1PzsHZJT4U+awO2xlqTSYu6n/U29O2wPXgGOEKDMSq+zTUtyc8+6iLp0ivav4FKx+xxVy4FxhIF/pucVDqpsVe2jFOfdZhTzLz2QjtzvsTCvDPU7bzDH2eXVKUV9TZ+qFtaSSxnYgYdXKwVreIgvWhT9eGDB2OvnWyPLfIIIfNnfIxU8nW7MbcH05nhlsYtaW9EZRsxWcKdEqInq1DiZPKCz7iGmAU9/ccnnQud2pNgIGFYOTAWjhIrd63aPDgfj8/sdlD4l+UTlcxTI9jbaMqqN0gQxSHs60IAcW3cH4p3V1aSciTKB29L1tz2eUQhRiTgTvmqc+sGtBNh4ky0mQJGsdycBREP+fAaSs1EREDVo5gvgi5+aCN7NECw30owbCc1mSpjiahyNVwJd1jiGgzSwfTpzf2c5XJvG/g1n0fH88KHNnf+u7ZiRMlXueSIsloJBUtW9ezvsx9grfsX/FNxnbxU1Lvg0hLxixypHKGFAaPu0xCD8oDTeFSyfRT6s8109GMUZL8m2xXp8X2dpPCWWdX84iga4BrTlOfqox4shqEgh/Ht4qRst52cA1xOIUuOxgfUivp6v5f8IVyaryEdpVk72ERAwdT4aoY1usBgmP+0m06Q216H/nubtNYxHaOIYjcach3A8Ez/zc0KcShhel0HCYjFsA0FjYqyJ5ZUH1aZw3+zWC0hLpM6GDfcAdn9fq2orPmZbW6XXrf+Krc9RtvII5jeD3dFoT1KwZJwxfUMvc5KLfn8rROW23Jw89sJ2a5dpB3qWDUBWF2iX8OCuKprHosJ2mflBR+Wqs86VvgI/XMnsqb97+VlKdPVysczPj8Jhzf+WCvGBHijAqYlavbF60soMWlHbvKT+ScvhprgeTln51xX0sF+Eadc/l2s2a5BgkVbHYyz0E85p0LstqH+gEGiR84nBRRFIn8hLSZrGwqjZ3E29cuGi+5Z5bp7EM8MWFa9ssS/vy4VrDfECSv7DSU84DaP0sXI3Ap4lWznQ65nQoTKRWU30gd7Nn8ZowUvGIx4aqyXGwmA/PB4qN8msJUODezUHEl0VP9uo+cZ8vPFodSIB4C7lQYjEFj8yu49C2KIV3qxMFYTevG8KqAr0TPlkbzHHnTpDpvpzziAiNFh8xiT7C/TiyH0EguUw4vxAgpnE27WIypV+uFN2zW7xniF/n75trs9IJ5amB1zXXZ1LFkJ6GbS/dFokzl4cc2mamVwhL4XU0Av5gDWAl+aEWhAP7t2VIwU+EpvfOPDcLASX7H7lZpXA2XQfbSlD4qU18NffNPoAKMNSccBfO9YVVgmlW4RydBqfHAV7+hrZ84WJGho6bNT0YMhxxLdOx/dwGj0oyak9aAkNJ8lRJzUuA8sR+fPyiyTgUHio5+Pp+YaKlHrhR41jY5NESPS3x+zTMe0S2HnLOKCOQPpdxKyviBvdHrCDRqO+l96HhhNBLXWv4yEMuEUYo8kXnYJM8oIgVM4XJ+xXOev4YbWeqsvgq0lmw4/PiYr9sYLt+W5EAuYSFnJEan8CwJwbtASBfLBBpJZiRPor/aCJBZsM+MhvS7ZepyHvU8m5WSmaZnxuLts8ojl6KkS8oSAHkq5GWlCB/NgJ5W3rO2Cj1MK7ahxsCrbTT3a0V/QQH+sErxV4XUWDHx0kkFy25bPmBMBQ6BU3HoHhhYcJB9JhP6NXUWKxnE0raXHB6U9KHpWdQCQI72qevp5fMzcm+AvC85rsynVQhruDA9fp9COe7N56cg1UKGSas89vrN+WlGLYTwi5W+0xYdKEGtGCeNJwXKDU0XqU5uQYnWsMwTENLGtbQMvoGjIFIEMzCRal4rnBAg7D/CSn8MsCvS+FDJJAzoiioJEhZJgAp9n2+1Yznr7H+6eT4YkJ9Mpj60ImcW4i4iHDLn9RydB8dx3QYm3rsX6n4VRrZDsYK6DCGwkwd5n3/INFEpk16fYpP6JtMQpqEMzcOfQGAHXBTEGzuLJ03GYQL9bmV2/7ExDlRf+Uvf1sM2frRtCWmal12pMgtonvSCtR4n1CLUZRdTHDHP1Otwqd+rcdlavnKjUB/OYXQHUJzpNyFoKpQK+2OgrEKpGyIgIBgn2y9QHnTJihZOpEvOKIoHAMGAXHmj21Lym39Mbiow4IF+77xNuewziNVBxr6KD5e+9HzZSBIlUa/AmsDFJFXeyrQakR3FwowTGcADJHcEfhGkXYNGSYo4dh4bxwLM+28xjiqkdn0/3R4UEkvcBrBfn/SzBc1XhKM2VPlJgKSorjDac96V2UnQYXl1/yZPT4DVelgO+soMjexXwYO58VLl5xInQUZI8jc3H2CPnCNb9X05nOxIy4MlecasTqGK6s2az4RjpF2cQP2G28R+7wDPsZDZC/kWtjdoHC7SpdPmqQrUAhMwKVuxCmYTiD9q/O7GHtZvPSN0CAUQN/rymXZNniYLlJDE70bsk6Xxsh4kDOdxe7A2wo7P9F5YvqqRDI6brf79yPCSp4I0jVoO4YnLYtX5nzspR5WB4AKOYtR1ujXbOQpPyYDvfRE3FN5zw0i7reehdi7yV0YDRKRllGCGRk5Yz+Uv1fYl2ZwrnGsqsjgAVo0xEUba8ohjaNMJNwTwZA/wBDWFSCpg1eUH8MYL2zdioxRTqgGQrDZxQyNzyBJPXZF0+oxITJAbj7oNC5JwgDMUJaM5GqlGCWc//KCIrI+aclEe4IA0uzv7cuj6GCdaJONpi13O544vbtIHBF+A+JeDFUQNy61Gki3rtyQ4aUywn6ru314/dkGiP8Iwjo0J/2Txs49ZkwEl4mx+iYUUO55I6pJzU4P+7RRs+DXZkyKUYZqVWrPF4I94m4Wx1tXeE74o9GuX977yvJ/jkdak8+AmoHVjI15V+WwBdARFV2IPirJgVMdsg1Pez2VNHqa7EHWdTkl3XTcyjG9BiueWFvQfXI8aWSkuuRmqi/HUuzqyvLJfNfs0txMqldYYflWB1BS31WkuPJGGwXUCpjiQSktkuBMWwHjSkQxeehqw1Kgz0Trzm7QbtgxiEPDVmWCNCAeCfROTphd1ZNOhzLy6XfJyG6Xgd5MCAZw4xie0Sj5AnY1/akDgNS9YFl3Y06vd6FAsg2gVQJtzG7LVq1OH2frbXNHWH/NY89NNZ4QUSJqL2yEcGADbT38X0bGdukqYlSoliKOcsSTuqhcaemUeYLLoI8+MZor2RxXTRThF1LrHfqf/5LcLAjdl4EERgUysYS2geE+yFdasU91UgUDsc2cSQ1ZoT9+uLOwdgAmifwQqF028INc2IQEDfTmUw3eZxvz7Ud1z3xc1PQfeCvfKsB9jOhRj7rFyb9XcDWLcYj0bByosychMezMLVkFiYcdBBQtvI6K0KRuOZQH2kBsYHJaXTkup8F0eIhO1/GcIwWKpr2mouB7g5TUDJNvORXPXa/mU8bh27TAZYBe2sKx4NSv5OjnHIWD2RuysCzBlUfeNXhDd2jxnHoUlheJ3jBApzURy0fwm2FwwsSU0caQGl0Kv8hopRQE211NnvtLRsmCNrhhpEDoNiZEzD2QdJWKbRRWnaFedXHAELSN0t0bfsCsMf0ktfBoXBoNA+nZN9+pSlmuzspFevmsqqcMllzzvkyXrzoA+Ryo1ePXpdGOoJvhyru+EBRsmOp7MXZ0vNUMUqHLUoKglg1p73sWeZmPc+KAw0pE2zIsFFE5H4192KwDvDxdxEYoDBDNZjbg2bmADTeUKK57IPD4fTYF4c6EnXx/teYMORBDtIhPJneiZny7Nv/zG+YmekIKCoxr6kauE2bZtBLufetNG0BtBY7f+/ImUypMBvdWu/Q7vTMRzw5aQGZWuc1V0HEsItFYMIBnoKGZ0xcarba/TYZq50kCaflFysYjA4EDKHqGdpYWdKYmm+a7TADmW35yfnOYpZYrkpVEtiqF0EujI00aeplNs2k+qyFZNeE3CDPL9P6b4PQ/kataHkVpLSEVGK7EX6rAa7IVNrvZtFvOA6okKvBgMtFDAGZOx88MeBcJ8AR3AgUUeIznAN6tjCUipGDZONm1FjWJp4A3QIzSaIOmZ7DvF/ysYYbM/fFDOV0jntAjRdapxJxL0eThpEhKOjCDDq2ks+3GrwxqIFKLe1WdOzII8XIOPGnwy6LKXVfpSDOTEfaRsGujhpS4hBIsMOqHbl16PJxc4EkaVu9wpEYlF/84NSv5Zum4drMfp9yXbzzAOJqqS4YkI4cBrFrC7bMPiCfgI3nNZAqkk3QOZqR+yyqx+nDQKBBBZ7QKrfGMCL+XpqFaBJU0wpkBdAhbR4hJsmT5aynlvkouoxm/NjD5oe6BzVIO9uktM+/5dEC5P7vZvarmuO/lKXz4sBabVPIATuKTrwbJP8XUkdM6uEctHKXICUJGjaZIWRbZp8czquQYfY6ynBUCfIU+gG6wqSIBmYIm9pZpXdaL121V7q0VjDjmQnXvMe7ysoEZnZL15B0SpxS1jjd83uNIOKZwu5MPzg2NhOx3xMOPYwEn2CUzbSrwAs5OAtrz3GAaUkJOU74XwjaYUmGJdZBS1NJVkGYrToINLKDjxcuIlyfVsKQSG/G4DyiO2SlQvJ0d0Ot1uOG5IFSAkq+PRVMgVMDvOIJMdqjeCFKUGRWBW9wigYvcbU7CQL/7meF2KZAaWl+4y9uhowAX7elogAvItAAxo2+SFxGRsHGEW9BnhlTuWigYxRcnVUBRQHV41LV+Fr5CJYV7sHfeywswx4XMtUx6EkBhR+q8AXXUA8uPJ73Pb49i9KG9fOljvXeyFj9ixgbo6CcbAJ7WHWqKHy/h+YjBwp6VcN7M89FGzQ04qbrQtgrOFybg3gQRTYG5xn73ArkfQWjCJROwy3J38Dx/D7jOa6BBNsitEw1wGq780EEioOeD+ZGp2J66ADiVGMayiHYucMk8nTK2zzT9CnEraAk95kQjy4k0GRElLL5YAKLQErJ5rp1eay9O4Fb6yJGm9U4FaMwPGxtKD6odIIHKoWnhKo1U8KIpFC+MVn59ZXmc7ZTBZfsg6FQ8W10YfTr4u0nYrpHZbZ1jXiLmooF0cOm0+mPnJBXQtepc7n0BqOipNCqI6yyloTeRShNKH04FIo0gcMk0H/xThyN4pPAWjDDkEp3lNNPRNVfpMI44CWRlRgViP64eK0JSRp0WUvCWYumlW/c58Vcz/yMwVcW5oYb9+26TEhwvbxiNg48hl1VI1UXTU//Eta+BMKnGUivctfL5wINDD0giQL1ipt6U7C9cd4+lgqY2lMUZ02Uv6Prs+ZEZer7ZfWBXVghlfOOrClwsoOFKzWEfz6RZu1eCs+K8fLvkts5+BX0gyrFYve0C3qHrn5U/Oh6D/CihmWIrY7HUZRhJaxde+tldu6adYJ+LeXupQw0XExC36RETdNFxcq9glMu4cNQSX9cqR/GQYp+IxUkIcNGWVU7ZtGa6P3XAyodRt0XeS3Tp01AnCh0ZbUh4VrSZeV9RWfSoWyxnY3hzcZ30G/InDq4wxRrEejreBxnhIQbkxenxkaxl+k7eLUQkUR6vKJ2iDFNGX3WmVA1yaOH+mvhBd+sE6vacQzFobwY5BqEAFmejwW5ne7HtVNolOUgJc8CsUxmc/LBi8N5mu9VsIA5HyErnS6zeCz7VLI9+n/hbT6hTokMXTVyXJRKSG2hd2labXTbtmK4fNH3IZBPreSA4FMeVouVN3zG5x9CiGpLw/3pceo4qGqp+rVp+z+7yQ98oEf+nyH4F3+J9IheDBa94Wi63zJbLBCIZm7P0asHGpIJt3PzE3m0S4YIWyXBCVXGikj8MudDPB/6Nm2v4IxJ5gU0ii0guy5SUHqGUYzTP0jIJU5E82RHUXtX4lDdrihBLdP1YaG1AGUC12rQKuIaGvCpMjZC9bWSCYnjDlvpWbkdXMTNeBHLKiuoozMGIvkczmP0aRJSJ8PYnLCVNhKHXBNckH79e8Z8Kc2wUej4sQZoH8qDRGkg86maW/ZQWGNnLcXmq3FlXM6ssR/3P6E/bHMvm6HLrv1yRixit25JsH3/IOr2UV4BWJhxXW5BJ6Xdr07n9kF3ZNAk6/Xpc5MSFmYJ2R7bdL8Kk7q1OU9Elg/tCxJ8giT27wSTySF0GOxg4PbYJdi/Nyia9Nn89CGDulfJemm1aiEr/eleGSN+5MRrVJ4K6lgyTTIW3i9cQ0dAi6FHt0YMbH3wDSAtGLSAccezzxHitt1QdhW36CQgPcA8vIIBh3/JNjf/Obmc2yzpk8edSlS4lVdwgW5vzbYEyFoF4GCBBby1keVNueHAH+evi+H7oOVfS3XuPQSNTXOONAbzJeSb5stwdQHl1ZjrGoE49I8+A9j3t+ahhQj74FCSWpZrj7wRSFJJnnwi1T9HL5qrCFW/JZq6P62XkMWTb+u4lGpKfmmwiJWx178GOG7KbrZGqyWwmuyKWPkNswkZ1q8uptUlviIi+AXh2bOOTOLsrtNkfqbQJeh24reebkINLkjut5r4d9GR/r8CBa9SU0UQhsnZp5cP+RqWCixRm7i4YRFbtZ4EAkhtNa6jHb6gPYQv7MKqkPLRmX3dFsK8XsRLVZ6IEVrCbmNDc8o5mqsogjAQfoC9Bc7R6gfw03m+lQpv6kTfhxscDIX6s0w+fBxtkhjXAXr10UouWCx3C/p/FYwJRS/AXRKkjOb5CLmK4XRe0+xeDDwVkJPZau52bzLEDHCqV0f44pPgKOkYKgTZJ33fmk3Tu8SdxJ02SHM8Fem5SMsWqRyi2F1ynfRJszcFKykdWlNqgDA/L9lKYBmc7Zu/q9ii1FPF47VJkqhirUob53zoiJtVVRVwMR34gV9iqcBaHbRu9kkvqk3yMpfRFG49pKKjIiq7h/VpRwPGTHoY4cg05X5028iHsLvUW/uz+kjPyIEhhcKUwCkJAwbR9pIEGOn8z6svAO8i89sJ3dL5qDWFYbS+HGPRMxYwJItFQN86YESeJQhn2urGiLRffQeLptDl8dAgb+Tp47UQPxWOw17OeChLN1WnzlkPL1T5O+O3Menpn4C3IY5LEepHpnPeZHbvuWfeVtPlkH4LZjPbBrkJT3NoRJzBt86CO0Xq59oQ+8dsm0ymRcmQyn8w71mhmcuEI5byuF+C88VPYly2sEzjlzAQ3vdn/1+Hzguw6qFNNbqenhZGbdiG6RwZaTG7jTA2X9RdXjDN9yj1uQpyO4Lx8KRAcZcbZMafp4wPOd5MdXoFY52V1A8M9hi3sso93+uprE0qYNMjkE22CvK4HuUxqN7oIz5pWuETq1lQAjqlSlqdD2Rnr/ggp/TVkQYjn9lMfYelk2sH5HPdopYo7MHwlV1or9Bxf+QCyLzm92vzG2wjiIjC/ZHEJzeroJl6bdFPTpZho5MV2U86fLQqxNlGIMqCGy+9WYhJ8ob1r0+Whxde9L2PdysETv97O+xVw+VNN1TZSQN5I6l9m5Ip6pLIqLm4a1B1ffH6gHyqT9p82NOjntRWGIofO3bJz5GhkvSWbsXueTAMaJDou99kGLqDlhwBZNEQ4mKPuDvVwSK4WmLluHyhA97pZiVe8g+JxmnJF8IkV/tCs4Jq/HgOoAEGR9tCDsDbDmi3OviUQpG5D8XmKcSAUaFLRXb2lmJTNYdhtYyfjBYZQmN5qT5CNuaD3BVnlkCk7bsMW3AtXkNMMTuW4HjUERSJnVQ0vsBGa1wo3Qh7115XGeTF3NTz8w0440AgU7c3bSXO/KMINaIWXd0oLpoq/0/QJxCQSJ9XnYy1W7TYLBJpHsVWD1ahsA7FjNvRd6mxCiHsm8g6Z0pnzqIpF1dHUtP2ITU5Z1hZHbu+L3BEEStBbL9XYvGfEakv1bmf+bOZGnoiuHEdlBnaChxYKNzB23b8sw8YyT7Ajxfk49eJIAvdbVkdFCe2J0gMefhQ0bIZxhx3fzMIysQNiN8PgOUKxOMur10LduigREDRMZyP4oGWrP1GFY4t6groASsZ421os48wAdnrbovNhLt7ScNULkwZ5AIZJTrbaKYTLjA1oJ3sIuN/aYocm/9uoQHEIlacF1s/TM1fLcPTL38O9fOsjMEIwoPKfvt7opuI9G2Hf/PR4aCLDQ7wNmIdEuXJ/QNL72k5q4NejAldPfe3UVVqzkys8YZ/jYOGOp6c+YzRCrCuq0M11y7TiN6qk7YXRMn/gukxrEimbMQjr3jwRM6dKVZ4RUfWQr8noPXLJq6yh5R3EH1IVOHESst/LItbG2D2vRsZRkAObzvQAAD3mb3/G4NzopI0FAiHfbpq0X72adg6SRj+8OHMShtFxxLZlf/nLgRLbClwl5WmaYSs+yEjkq48tY7Z2bE0N91mJwt+ua0NlRJIDh0HikF4UvSVorFj2YVu9YeS5tfvlVjPSoNu/Zu6dEUfBOT555hahBdN3Sa5Xuj2Rvau1lQNIaC944y0RWj9UiNDskAK1WoL+EfXcC6IbBXFRyVfX/WKXxPAwUyIAGW8ggZ08hcijKTt1YKnUO6QPvcrmDVAb0FCLIXn5id4fD/Jx4tw/gbXs7WF9b2RgXtPhLBG9vF5FEkdHAKrQHZAJC/HWvk7nvzzDzIXZlfFTJoC3JpGgLPBY7SQTjGlUvG577yNutZ1hTfs9/1nkSXK9zzKLRZ3VODeKUovJe0WCq1zVMYxCJMenmNzPIU2S8TA4E7wWmbNkxq9rI2dd6v0VpcAPVMxnDsvWTWFayyqvKZO7Z08a62i/oH2/jxf8rpmfO64in3FLiL1GX8IGtVE9M23yGsIqJbxDTy+LtaMWDaPqkymb5VrQdzOvqldeU0SUi6IirG8UZ3jcpRbwHa1C0Dww9G/SFX3gPvTJQE+kyz+g1BeMILKKO+olcHzctOWgzxYHnOD7dpCRtuZEXACjgqesZMasoPgnuDC4nUviAAxDc5pngjoAITIkvhKwg5d608pdrZcA+qn5TMT6Uo/QzBaOxBCLTJX3Mgk85rMfsnWx86oLxf7p2PX5ONqieTa/qM3tPw4ZXvlAp83NSD8F7+ZgctK1TpoYwtiU2h02HCGioH5tkVCqNVTMH5p00sRy2JU1qyDBP2CII/Dg4WDsIl+zgeX7589srx6YORRQMBfKbodbB743Tl4WLKOEnwWUVBsm94SOlCracU72MSyj068wdpYjyz1FwC2bjQnxnB6Mp/pZ+yyZXtguEaYB+kqhjQ6UUmwSFazOb+rhYjLaoiM+aN9/8KKn0zaCTFpN9eKwWy7/u4EHzO46TdFSNjMfn2iPSJwDPCFHc0I1+vjdAZw5ZjqR/uzi9Zn20oAa5JnLEk/EA3VRWE7J/XrupfFJPtCUuqHPpnlL7ISJtRpSVcB8qsZCm2QEkWoROtCKKxUh3yEcMbWYJwk6DlEBG0bZP6eg06FL3v6RPb7odGuwm7FN8fG4woqtB8e7M5klPpo97GoObNwt+ludTAmxyC5hmcFx+dIvEZKI6igFKHqLH01iY1o7903VzG9QGetyVx5RNmBYUU+zIuSva/yIcECUi4pRmE3VkF2avqulQEUY4yZ/wmNboBzPmAPey3+dSYtBZUjeWWT0pPwCz4Vozxp9xeClIU60qvEFMQCaPvPaA70WlOP9f/ey39macvpGCVa+zfa8gO44wbxpJUlC8GN/pRMTQtzY8Z8/hiNrU+Zq64ZfFGIkdj7m7abcK1EBtws1X4J/hnqvasPvvDSDYWN+QcQVGMqXalkDtTad5rYY0TIR1Eqox3czwPMjKPvF5sFv17Thujr1IZ1Ytl4VX1J0vjXKmLY4lmXipRAro0qVGEcXxEVMMEl54jQMd4J7RjgomU0j1ptjyxY+cLiSyXPfiEcIS2lWDK3ISAy6UZ3Hb5vnPncA94411jcy75ay6B6DSTzK6UTCZR9uDANtPBrvIDgjsfarMiwoax2OlLxaSoYn4iRgkpEGqEkwox5tyI8aKkLlfZ12lO11TxsqRMY89j5JaO55XfPJPDL1LGSnC88Re9Ai+Nu5bZjtwRrvFITUFHPR4ZmxGslQMecgbZO7nHk32qHxYkdvWpup07ojcMCaVrpFAyFZJJbNvBpZfdf39Hdo2kPtT7v0/f8R/B5Nz4f1t9/3zNM/7n6SUHfcWk5dfQFJvcJMgPolGCpOFb/WC0FGWU2asuQyT+rm88ZKZ78Cei/CAh939CH0JYbpZIPtxc2ufXqjS3pHH9lnWK4iJ7OjR/EESpCo2R3MYKyE7rHfhTvWho4cL1QdN4jFTyR6syMwFm124TVDDRXMNveI1Dp/ntwdz8k8kxw7iFSx6+Yx6O+1LzMVrN0BBzziZi9kneZSzgollBnVwBh6oSOPHXrglrOj+QmR/AESrhDpKrWT+8/AiMDxS/5wwRNuGQPLlJ9ovomhJWn8sMLVItQ8N/7IXvtD8kdOoHaw+vBSbFImQsv/OCAIui99E+YSIOMlMvBXkAt+NAZK8wB9Jf8CPtB+TOUOR+z71d/AFXpPBT6+A5FLjxMjLIEoJzrQfquvxEIi+WoUzGR1IzQFNvbYOnxb2PyQ0kGdyXKzW2axQL8lNAXPk6NEjqrRD1oZtKLlFoofrXw0dCNWASHzy+7PSzOUJ3XtaPZsxLDjr+o41fKuKWNmjiZtfkOzItvlV2MDGSheGF0ma04qE3TUEfqJMrXFm7DpK+27DSvCUVf7rbNoljPhha5W7KBqVq0ShUSTbRmuqPtQreVWH4JET5yMhuqMoSd4r/N8sDmeQiQQvi1tcZv7Moc7dT5X5AtCD6kNEGZOzVcNYlpX4AbTsLgSYYliiPyVoniuYYySxsBy5cgb3pD+EK0Gpb0wJg031dPgaL8JZt6sIvzNPEHfVPOjXmaXj4bd4voXzpZ5GApMhILgMbCEWZ2zwgdeQgjNHLbPIt+KqxRwWPLTN6HwZ0Ouijj4UF+Sg0Au8XuIKW0WxlexdrFrDcZJ8Shauat3X0XmHygqgL1nAu2hrJFb4wZXkcS+i36KMyU1yFvYv23bQUJi/3yQpqr/naUOoiEWOxckyq/gq43dFou1DVDaYMZK9tho7+IXXokBCs5GRfOcBK7g3A+jXQ39K4YA8PBRW4m5+yR0ZAxWJncjRVbITvIAPHYRt1EJ3YLiUbqIvoKHtzHKtUy1ddRUQ0AUO41vonZDUOW+mrszw+SW/6Q/IUgNpcXFjkM7F4CSSQ2ExZg85otsMs7kqsQD4OxYeBNDcSpifjMoLb7GEbGWTwasVObmB/bfPcUlq0wYhXCYEDWRW02TP5bBrYsKTGWjnWDDJ1F7zWai0zW/2XsCuvBQjPFcTYaQX3tSXRSm8hsAoDdjArK/OFp6vcWYOE7lizP0Yc+8p16i7/NiXIiiQTp7c7Xus925VEtlKAjUdFhyaiLT7VxDagprMFwix4wZ05u0qj7cDWFd0W9OYHIu3JbJKMXRJ1aYNovugg+QqRN7fNHSi26VSgBpn+JfMuPo3aeqPWik/wI5Rz3BWarPQX4i5+dM0npwVOsX+KsOhC7vDg+OJsz4Q5zlnIeflUWL6QYMbf9WDfLmosLF4Qev3mJiOuHjoor/dMeBpA9iKDkMjYBNbRo414HCxjsHrB4EXNbHzNMDHCLuNBG6Sf+J4MZ/ElVsDSLxjIiGsTPhw8BPjxbfQtskj+dyNMKOOcUYIRBEIqbazz3lmjlRQhplxq673VklMMY6597vu+d89ec/zq7Mi4gQvh87ehYbpOuZEXj5g/Q7S7BFDAAB9DzG35SC853xtWVcnZQoH54jeOqYLR9NDuwxsVthTV7V99n/B7HSbAytbEyVTz/5NhJ8gGIjG0E5j3griULUd5Rg7tQR+90hJgNQKQH2btbSfPcaTOfIexc1db1BxUOhM1vWCpLaYuKr3FdNTt/T3PWCpEUWDKEtzYrjpzlL/wri3MITKsFvtF8QVV/NhVo97aKIBgdliNc10dWdXVDpVtsNn+2UIolrgqdWA4EY8so0YvB4a+aLzMXiMAuOHQrXY0tr+CL10JbvZzgjJJuB1cRkdT7DUqTvnswVUp5kkUSFVtIIFYK05+tQxT6992HHNWVhWxUsD1PkceIrlXuUVRogwmfdhyrf6zzaL8+c0L7GXMZOteAhAVQVwdJh+7nrX7x4LaIIfz2F2v7Dg/uDfz2Fa+4gFm2zHAor8UqimJG3VTJtZEoFXhnDYXvxMJFc6ku2bhbCxzij2z5UNuK0jmp1mnvkVNUfR+SEmj1Lr94Lym75PO7Fs0MIr3GdsWXRXSfgLTVY0FLqba97u1In8NAcY7IC6TjWLigwKEIm43NxTdaVTv9mcKkzuzBkKd8x/xt1p/9BbP7Wyb4bpo1K1gnOpbLvKz58pWl3B55RJ/Z5mRDLPtNQg14jdOEs9+h/V5UVpwrAI8kGbX8KPVPDIMfIqKDjJD9UyDOPhjZ3vFAyecwyq4akUE9mDOtJEK1hpDyi6Ae87sWAClXGTiwPwN7PXWwjxaR79ArHRIPeYKTunVW24sPr/3HPz2IwH8oKH4OlWEmt4BLM6W5g4kMcYbLwj2usodD1088stZA7VOsUSpEVl4w7NMb1EUHMRxAxLF0CIV+0L3iZb+ekB1vSDSFjAZ3hfLJf7gFaXrOKn+mhR+rWw/eTXIcAgl4HvFuBg1LOmOAwJH3eoVEjjwheKA4icbrQCmvAtpQ0mXG0agYp5mj4Rb6mdQ+RV4QBPbxMqh9C7o8nP0Wko2ocnCHeRGhN1XVyT2b9ACsL+6ylUy+yC3QEnaKRIJK91YtaoSrcWZMMwxuM0E9J68Z+YyjA0g8p1PfHAAIROy6Sa04VXOuT6A351FOWhKfTGsFJ3RTJGWYPoLk5FVK4OaYR9hkJvezwF9vQN1126r6isMGXWTqFW+3HL3I/jurlIdDWIVvYY+s6yq7lrFSPAGRdnU7PVwY/SvWbZGpXzy3BQ2LmAJlrONUsZs4oGkly0V267xbD5KMY8woNNsmWG1VVgLCra8aQBBcI4DP2BlNwxhiCtHlaz6OWFoCW0vMR3ErrG7JyMjTSCnvRcsEHgmPnwA6iNpJ2DrFb4gLlhKJyZGaWkA97H6FFdwEcLT6DRQQL++fOkVC4cYGW1TG/3iK5dShRSuiBulmihqgjR45Vi03o2RbQbP3sxt90VxQ6vzdlGfkXmmKmjOi080JSHkLntjvsBJnv7gKscOaTOkEaRQqAnCA4HWtB4XnMtOhpRmH2FH8tTXrIjAGNWEmudQLCkcVlGTQ965Kh0H6ixXbgImQP6b42B49sO5C8pc7iRlgyvSYvcnH9FgQ3azLbQG2cUW96SDojTQStxkOJyOuDGTHAnnWkz29aEwN9FT8EJ4yhXOg+jLTrCPKeEoJ9a7lDXOjEr8AgX4BmnMQ668oW0zYPyQiVMPxKRHtpfnEEyaKhdzNVThlxxDQNdrHeZiUFb6NoY2KwvSb7BnRcpJy+/g/zAYx3fYSN5QEaVD2Y1VsNWxB0BSO12MRsRY8JLfAezRMz5lURuLUnG1ToKk6Q30FughqWN6gBNcFxP/nY/iv+iaUQOa+2Nuym46wtI/DvSfzSp1jEi4SdYBE7YhTiVV5cX9gwboVDMVgZp5YBQlHOQvaDNfcCoCJuYhf5kz5kwiIKPjzgpcRJHPbOhJajeoeRL53cuMahhV8Z7IRr6M4hW0JzT7mzaMUzQpm866zwM7Cs07fJYXuWvjAMkbe5O6V4bu71sOG6JQ4oL8zIeXHheFVavzxmlIyBkgc9IZlEDplMPr8xlcyss4pVUdwK1e7CK2kTsSdq7g5SHRAl3pYUB9Ko4fsh4qleOyJv1z3KFSTSvwEcRO/Ew8ozEDYZSqpfoVW9uhJfYrNAXR0Z3VmeoAD+rVWtwP/13sE/3ICX3HhDG3CMc476dEEC0K3umSAD4j+ZQLVdFOsWL2C1TH5+4KiSWH+lMibo+B55hR3Gq40G1n25sGcN0mEcoU2wN9FCVyQLBhYOu9aHVLWjEKx2JIUZi5ySoHUAI9b8hGzaLMxCZDMLhv8MkcpTqEwz9KFDpCpqQhVmsGQN8m24wyB82FAKNmjgfKRsXRmsSESovAwXjBIoMKSG51p6Um8b3i7GISs7kjTq/PZoioCfJzfKdJTN0Q45kQEQuh9H88M3yEs3DbtRTKALraM0YC8laiMiOOe6ADmTcCiREeAWZelBaEXRaSuj2lx0xHaRYqF65O0Lo5OCFU18A8cMDE4MLYm9w2QSr9NgQAIcRxZsNpA7UJR0e71JL+VU+ISWFk5I97lra8uGg7GlQYhGd4Gc6rxsLFRiIeGO4abP4S4ekQ1fiqDCy87GZHd52fn5aaDGuvOmIofrzpVwMvtbreZ/855OaXTRcNiNE0wzGZSxbjg26v8ko8L537v/XCCWP2MFaArJpvnkep0pA+O86MWjRAZPQRfznZiSIaTppy6m3p6HrNSsY7fDtz7Cl4V/DJAjQDoyiL2uwf1UHVd2AIrzBUSlJaTj4k6NL97a/GqhWKU9RUmjnYKpm2r+JYUcrkCuZKvcYvrg8pDoUKQywY9GDWg03DUFSirlUXBS5SWn/KAntnf0IdHGL/7mwXqDG+LZYjbEdQmqUqq4y54TNmWUP7IgcAw5816YBzwiNIJiE9M4lPCzeI/FGBeYy3p6IAmH4AjXXmvQ4Iy0Y82NTobcAggT2Cdqz6Mx4TdGoq9fn2etrWKUNFyatAHydQTVUQ2S5OWVUlugcNvoUrlA8cJJz9MqOa/W3iVno4zDHfE7zhoY5f5lRTVZDhrQbR8LS4eRLz8iPMyBL6o4PiLlp89FjdokQLaSBmKHUwWp0na5fE3v9zny2YcDXG/jfI9sctulHRbdkI5a4GOPJx4oAJQzVZ/yYAado8KNZUdEFs9ZPiBsausotXMNebEgr0dyopuqfScFJ3ODNPHgclACPdccwv0YJGQdsN2lhoV4HVGBxcEUeUX/alr4nqpcc1CCR3vR7g40zteQg/JvWmFlUE4mAiTpHlYGrB7w+U2KdSwQz2QJKBe/5eiixWipmfP15AFWrK8Sh1GBBYLgzki1wTMhGQmagXqJ2+FuqJ8f0XzXCVJFHQdMAw8xco11HhM347alrAu+wmX3pDFABOvkC+WPX0Uhg1Z5MVHKNROxaR84YV3s12UcM+70cJ460SzEaKLyh472vOMD3XnaK7zxZcXlWqenEvcjmgGNR2OKbI1s8U+iwiW+HotHalp3e1MGDy6BMVIvajnAzkFHbeVsgjmJUkrP9OAwnEHYXVBqYx3q7LvXjoVR0mY8h+ZaOnh053pdsGkmbqhyryN01eVHySr+CkDYkSMeZ1xjPNVM+gVLTDKu2VGsMUJqWO4TwPDP0VOg2/8ITbAUaMGb4LjL7L+Pi11lEVMXTYIlAZ/QHmTENjyx3kDkBdfcvvQt6tKk6jYFM4EG5UXDTaF5+1ZjRz6W7MdJPC+wTkbDUim4p5QQH3b9kGk2Bkilyeur8Bc20wm5uJSBO95GfYDI1EZipoRaH7uVveneqz43tlTZGRQ4a7CNmMHgXyOQQOL6WQkgMUTQDT8vh21aSdz7ERiZT1jK9F+v6wgFvuEmGngSvIUR2CJkc5tx1QygfZnAruONobB1idCLB1FCfO7N1ZdRocT8/Wye+EnDiO9pzqIpnLDl4bkaRKW+ekBVwHn46Shw1X0tclt/0ROijuUB4kIInrVJU4buWf4YITJtjOJ6iKdr1u+flgQeFH70GxKjhdgt/MrwfB4K/sXczQ+9zYcrD4dhY6qZhZ010rrxggWA8JaZyg2pYij8ieYEg1aZJkZK9O1Re7sB0iouf60rK0Gd+AYlp7soqCBCDGwfKeUQhCBn0E0o0GS6PdmjLi0TtCYZeqazqwN+yNINIA8Lk3iPDnWUiIPLGNcHmZDxfeK0iAdxm/T7LnN+gemRL61hHIc0NCAZaiYJR+OHnLWSe8sLrK905B5eEJHNlWq4RmEXIaFTmo49f8w61+NwfEUyuJAwVqZCLFcyHBKAcIVj3sNzfEOXzVKIndxHw+AR93owhbCxUZf6Gs8cz6/1VdrFEPrv330+9s6BtMVPJ3zl/Uf9rUi0Z/opexfdL3ykF76e999GPfVv8fJv/Y/+/5hEMon1tqNFyVRevV9y9/uIvsG3dbB8GRRrgaEXfhx+2xeOFt+cEn3RZanNxdEe2+B6MHpNbrRE53PlDifPvFcp4kO78ILR0T4xyW/WGPyBsqGdoA7zJJCu1TKbGfhnqgnRbxbB2B3UZoeQ2bz2sTVnUwokTcTU21RxN1PYPS3Sar7T0eRIsyCNowr9amwoMU/od9s2APtiKNL6ENOlyKADstAEWKA+sdKDhrJ6BOhRJmZ+QJbAaZ3/5Fq0/lumCgEzGEbu3yi0Y4I4EgVAjqxh4HbuQn0GrRhOWyAfsglQJAVL1y/6yezS2k8RE2MstJLh92NOB3GCYgFXznF4d25qiP4ZCyI4RYGesut6FXK6GwPpKK8WHEkhYui0AyEmr5Ml3uBFtPFdnioI8RiCooa7Z1G1WuyIi3nSNglutc+xY8BkeW3JJXPK6jd2VIMpaSxpVtFq+R+ySK9J6WG5Qvt+C+QH1hyYUOVK7857nFmyDBYgZ/o+AnibzNVqyYCJQvyDXDTK+iXdkA71bY7TL3bvuLxLBQ8kbTvTEY9aqkQ3+MiLWbEgjLzOH+lXgco1ERgzd80rDCymlpaRQbOYnKG/ODoFl46lzT0cjM5FYVvv0qLUbD5lyJtMUaC1pFlTkNONx6lliaX9o0i/1vws5bNKn5OuENQEKmLlcP4o2ZmJjD4zzd3Fk32uQ4uRWkPSUqb4LBe3EXHdORNB2BWsws5daRnMfNVX7isPSb1hMQdAJi1/qmDMfRUlCU74pmnzjbXfL8PVG8NsW6IQM2Ne23iCPIpryJjYbVnm5hCvKpMa7HLViNiNc+xTfDIaKm3jctViD8A1M9YPJNk003VVr4Zo2MuGW8vil8SLaGpPXqG7I4DLdtl8a4Rbx1Lt4w5Huqaa1XzZBtj208EJVGcmKYEuaeN27zT9EE6a09JerXdEbpaNgNqYJdhP1NdqiPKsbDRUi86XvvNC7rME5mrSQtrzAZVndtSjCMqd8BmaeGR4l4YFULGRBeXIV9Y4yxLFdyoUNpiy2IhePSWzBofYPP0eIa2q5JP4j9G8at/AqoSsLAUuRXtvgsqX/zYwsE+of6oSDbUOo4RMJw+DOUTJq+hnqwKim9Yy/napyZNTc2rCq6V9jHtJbxGPDwlzWj/Sk3zF/BHOlT/fSjSq7FqlPI1q6J+ru8Aku008SFINXZfOfnZNOvGPMtEmn2gLPt+H4QLA+/SYe4j398auzhKIp2Pok3mPC5q1IN1HgR+mnEfc4NeeHYwd2/kpszR3cBn7ni9NbIqhtSWFW8xbUJuUPVOeeXu3j0IGZmFNiwaNZ6rH4/zQ2ODz6tFxRLsUYZu1bfd1uIvfQDt4YD/efKYv8VF8bHGDgK22w2Wqwpi43vNCOXFJZCGMqWiPbL8mil6tsmOTXAWCyMCw73e2rADZj2IK6rqksM3EXF2cbLb4vjB14wa/yXK5vwU+05MzERJ5nXsXsW21o7M+gO0js2OyKciP5uF2iXyb2DiptwQeHeqygkrNsqVCSlldxBMpwHi1vfc8RKpP/4L3Lmpq6DZcvhDDfxTCE3splacTcOtXdK2g303dIWBVe2wD/Gvja1cClFQ67gw0t1ZUttsUgQ1Veky8oOpS6ksYEc4bqseCbZy766SvL3FodmnahlWJRgVCNjPxhL/fk2wyvlKhITH/VQCipOI0dNcRa5B1M5HmOBjTLeZQJy237e2mobwmDyJNHePhdDmiknvLKaDbShL+Is1XTCJuLQd2wmdJL7+mKvs294whXQD+vtd88KKk0DXP8B1Xu9J+xo69VOuFgexgTrcvI6SyltuLix9OPuE6/iRJYoBMEXxU4shQMf4Fjqwf1PtnJ/wWSZd29rhZjRmTGgiGTAUQqRz+nCdjeMfYhsBD5Lv60KILWEvNEHfmsDs2L0A252351eUoYxAysVaCJVLdH9QFWAmqJDCODUcdoo12+gd6bW2boY0pBVHWL6LQDK5bYWh1V8vFvi0cRpfwv7cJiMX3AZNJuTddHehTIdU0YQ/sQ1dLoF2xQPcCuHKiuCWOY30DHe1OwcClLAhqAKyqlnIbH/8u9ScJpcS4kgp6HKDUdiOgRaRGSiUCRBjzI5gSksMZKqy7Sd51aeg0tgJ+x0TH9YH2Mgsap9N7ENZdEB0bey2DMTrBA1hn56SErNHf3tKtqyL9b6yXEP97/rc+jgD2N1LNUH6RM9AzP3kSipr06RkKOolR7HO768jjWiH1X92jA7dkg7gcNcjqsZCgfqWw0tPXdLg20cF6vnQypg7gLtkazrHAodyYfENPQZsdfnjMZiNu4nJO97D1/sQE+3vNFzrSDOKw+keLECYf7RJwVHeP/j79833oZ0egonYB2FlFE5qj02B/LVOMJQlsB8uNg3Leg4qtZwntsOSNidR0abbZmAK4sCzvt8Yiuz2yrNCJoH5O8XvX/vLeR/BBYTWj0sOPYM/jyxRd5+/JziKAABaPcw/34UA3aj/gLZxZgRCWN6m4m3demanNgsx0P237/Q+Ew5VYnJPkyCY0cIVHoFn2Ay/e7U4P19APbPFXEHX94N6KhEMPG7iwB3+I+O1jd5n6VSgHegxgaSawO6iQCYFgDsPSMsNOcUj4q3sF6KzGaH/0u5PQoAj/8zq6Uc9MoNrGqhYeb2jQo0WlGlXjxtanZLS24/OIN5Gx/2g684BPDQpwlqnkFcxpmP/osnOXrFuu4PqifouQH0eF5qCkvITQbJw/Zvy5mAHWC9oU+cTiYhJmSfKsCyt1cGVxisKu+NymEQIAyaCgud/V09qT3nk/9s/SWsYtha7yNpzBIMM40rCSGaJ9u6lEkl00vXBiEt7p9P5IBCiavynEOv7FgLqPdeqxRiCwuFVMolSIUBcoyfUC2e2FJSAUgYdVGFf0b0Kn2EZlK97yyxrT2MVgvtRikfdaAW8RwEEfN+B7/eK8bBdp7URpbqn1xcrC6d2UjdsKbzCjBFqkKkoZt7Mrhg6YagE7spkqj0jOrWM+UGQ0MUlG2evP1uE1p2xSv4dMK0dna6ENcNUF+xkaJ7B764NdxLCpuvhblltVRAf7vK5qPttJ/9RYFUUSGcLdibnz6mf7WkPO3MkUUhR2mAOuGv8IWw5XG1ZvoVMnjSAZe6T7WYA99GENxoHkMiKxHlCuK5Gd0INrISImHQrQmv6F4mqU/TTQ8nHMDzCRivKySQ8dqkpQgnUMnwIkaAuc6/FGq1hw3b2Sba398BhUwUZSAIO8XZvnuLdY2n6hOXws+gq9BHUKcKFA6kz6FDnpxLPICa3qGhnc97bo1FT/XJk48LrkHJ2CAtBv0RtN97N21plfpXHvZ8gMJb7Zc4cfI6MbPwsW7AilCSXMFIEUEmir8XLEklA0ztYbGpTTGqttp5hpFTTIqUyaAIqvMT9A/x+Ji5ejA4Bhxb/cl1pUdOD6epd3yilIdO6j297xInoiBPuEDW2/UfslDyhGkQs7Wy253bVnlT+SWg89zYIK/9KXFl5fe+jow2rd5FXv8zDPrmfMXiUPt9QBO/iK4QGbX5j/7Rx1c1vzsY8ONbP3lVIaPrhL4+1QrECTN3nyKavGG0gBBtHvTKhGoBHgMXHStFowN+HKrPriYu+OZ05Frn8okQrPaaxoKP1ULCS/cmKFN3gcH7HQlVjraCeQmtjg1pSQxeuqXiSKgLpxc/1OiZsU4+n4lz4hpahGyWBURLi4642n1gn9qz9bIsaCeEPJ0uJmenMWp2tJmIwLQ6VSgDYErOeBCfSj9P4G/vI7oIF+l/n5fp956QgxGvur77ynawAu3G9MdFbJbu49NZnWnnFcQHjxRuhUYvg1U/e84N4JTecciDAKb/KYIFXzloyuE1eYXf54MmhjTq7B/yBToDzzpx3tJCTo3HCmVPYfmtBRe3mPYEE/6RlTIxbf4fSOcaKFGk4gbaUWe44hVk9SZzhW80yfW5QWBHxmtUzvMhfVQli4gZTktIOZd9mjJ5hsbmzttaHQB29Am3dZkmx3g/qvYocyhZ2PXAWsNQiIaf+Q8W/MWPIK7/TjvCx5q2XRp4lVWydMc2wIQkhadDB0xsnw/kSEyGjLKjI4coVIwtubTF3E7MJ6LS6UOsJKj82XVAVPJJcepfewbzE91ivXZvOvYfsmMevwtPpfMzGmC7WJlyW2j0jh7AF1JLmwEJSKYwIvu6DHc3YnyLH9ZdIBnQ+nOVDRiP+REpqv++typYHIvoJyICGA40d8bR7HR2k7do6UQTHF4oriYeIQbxKe4Th6+/l1BjUtS9hqORh3MbgvYrStXTfSwaBOmAVQZzpYNqsAmQyjY56MUqty3c/xH6GuhNvNaG9vGbG6cPtBM8UA3e8r51D0AR9kozKuGGSMgLz3nAHxDNnc7GTwpLj7/6HeWp1iksDeTjwCLpxejuMtpMnGJgsiku1sOACwQ9ukzESiDRN77YNESxR5LphOlcASXA5uIts1LnBIcn1J7BLWs49DMALSnuz95gdOrTZr0u1SeYHinno/pE58xYoXbVO/S+FEMMs5qyWkMnp8Q3ClyTlZP52Y9nq7b8fITPuVXUk9ohG5EFHw4gAEcjFxfKb3xuAsEjx2z1wxNbSZMcgS9GKyW3R6KwJONgtA64LTyxWm8Bvudp0M1FdJPEGopM4Fvg7G/hsptkhCfHFegv4ENwxPeXmYhxwZy7js+BeM27t9ODBMynVCLJ7RWcBMteZJtvjOYHb5lOnCLYWNEMKC59BA7covu1cANa2PXL05iGdufOzkgFqqHBOrgQVUmLEc+Mkz4Rq8O6WkNr7atNkH4M8d+SD1t/tSzt3oFql+neVs+AwEI5JaBJaxARtY2Z4mKoUqxds4UpZ0sv3zIbNoo0J4fihldQTX3XNcuNcZmcrB5LTWMdzeRuAtBk3cZHYQF6gTi3PNuDJ0nmR+4LPLoHvxQIxRgJ9iNNXqf2SYJhcvCtJiVWo85TsyFOuq7EyBPJrAdhEgE0cTq16FQXhYPJFqSfiVn0IQnPOy0LbU4BeG94QjdYNB0CiQ3QaxQqD2ebSMiNjaVaw8WaM4Z5WnzcVDsr4eGweSLa2DE3BWViaxhZFIcSTjgxNCAfelg+hznVOYoe5VqTYs1g7WtfTm3e4/WduC6p+qqAM8H4ZyrJCGpewThTDPe6H7CzX/zQ8Tm+r65HeZn+MsmxUciEWPlAVaK/VBaQBWfoG/aRL/jSZIQfep/89GjasWmbaWzeEZ2R1FOjvyJT37O9B8046SRSKVEnXWlBqbkb5XCS3qFeuE9xb9+frEknxWB5h1D/hruz2iVDEAS7+qkEz5Ot5agHJc7WCdY94Ws61sURcX5nG8UELGBAHZ3i+3VulAyT0nKNNz4K2LBHBWJcTBX1wzf+//u/j/9+//v87+9/l9Lbh/L/uyNYiTsWV2LwsjaA6MxTuzFMqmxW8Jw/+IppdX8t/Clgi1rI1SN0UC/r6tX/4lUc2VV1OQReSeCsjUpKZchw4XUcjHfw6ryCV3R8s6VXm67vp4n+lcPV9gJwmbKQEsmrJi9c2vkwrm8HFbVYNTaRGq8D91t9n5+U+aD/hNtN3HjC/nC/vUoGFSCkXP+NlRcmLUqLbiUBl4LYf1U/CCvwtd3ryCH8gUmGITAxiH1O5rnGTz7y1LuFjmnFGQ1UWuM7HwfXtWl2fPFKklYwNUpF2IL/TmaRETjQiM5SJacI+3Gv5MBU8lP5Io6gWkawpyzNEVGqOdx4YlO1dCvjbWFZWbCmeiFKPSlMKtKcMFLs/KQxtgAHi7NZNCQ32bBAW2mbHflVZ8wXKi1JKVHkW20bnYnl3dKWJeWJOiX3oKPBD6Zbi0ZvSIuWktUHB8qDR8DMMh1ZfkBL9FS9x5r0hBGLJ8pUCJv3NYH+Ae8p40mZWd5m5fhobFjQeQvqTT4VKWIYfRL0tfaXKiVl75hHReuTJEcqVlug+eOIIc4bdIydtn2K0iNZPsYWQvQio2qbO3OqAlPHDDOB7DfjGEfVF51FqqNacd6QmgFKJpMfLp5DHTv4wXlONKVXF9zTJpDV4m1sYZqJPhotcsliZM8yksKkCkzpiXt+EcRQvSQqmBS9WdWkxMTJXPSw94jqI3varCjQxTazjlMH8jTS8ilaW8014/vwA/LNa+YiFoyyx3s/KswP3O8QW1jtq45yTM/DX9a8M4voTVaO2ebvw1EooDw/yg6Y1faY+WwrdVs5Yt0hQ5EwRfYXSFxray1YvSM+kYmlpLG2/9mm1MfmbKHXr44Ih8nVKb1M537ZANUkCtdsPZ80JVKVKabVHCadaLXg+IV8i5GSwpZti0h6diTaKs9sdpUKEpd7jDUpYmHtiX33SKiO3tuydkaxA7pEc9XIQEOfWJlszj5YpL5bKeQyT7aZSBOamvSHl8xsWvgo26IP/bqk+0EJUz+gkkcvlUlyPp2kdKFtt7y5aCdks9ZJJcFp5ZWeaWKgtnXMN3ORwGLBE0PtkEIek5FY2aVssUZHtsWIvnljMVJtuVIjpZup/5VL1yPOHWWHkOMc6YySWMckczD5jUj2mlLVquFaMU8leGVaqeXis+aRRL8zm4WuBk6cyWfGMxgtr8useQEx7k/PvRoZyd9nde1GUCV84gMX8Ogu/BWezYPSR27llzQnA97oo0pYyxobYUJfsj+ysTm9zJ+S4pk0TGo9VTG0KjqYhTmALfoDZVKla2b5yhv241PxFaLJs3i05K0AAIdcGxCJZmT3ZdT7CliR7q+kur7WdQjygYtOWRL9B8E4s4LI8KpAj7bE0dg7DLOaX+MGeAi0hMMSSWZEz+RudXbZCsGYS0QqiXjH9XQbd8sCB+nIVTq7/T/FDS+zWY9q7Z2fdq1tdLb6v3hKKVDAw5gjj6o9r1wHFROdHc18MJp4SJ2Ucvu+iQ9EgkekW8VCM+psM6y+/2SBy8tNN4a3L1MzP+OLsyvESo5gS7IQOnIqMmviJBVc6zbVG1n8eXiA3j46kmvvtJlewwNDrxk4SbJOtP/TV/lIVK9ueShNbbMHfwnLTLLhbZuO79ec5XvfgRwLFK+w1r5ZWW15rVFZrE+wKqNRv5KqsLNfpGgnoUU6Y71NxEmN7MyqwqAQqoIULOw/LbuUB2+uE75gJt+kq1qY4LoxV+qR/zalupea3D5+WMeaRIn0sAI6DDWDh158fqUb4YhAxhREbUN0qyyJYkBU4V2KARXDT65gW3gRsiv7xSPYEKLwzgriWcWgPr0sbZnv7m1XHNFW6xPdGNZUdxFiUYlmXNjDVWuu7LCkX/nVkrXaJhiYktBISC2xgBXQnNEP+cptWl1eG62a7CPXrnrkTQ5BQASbEqUZWMDiZUisKyHDeLFOaJILUo5f6iDt4ZO8MlqaKLto0AmTHVVbkGuyPa1R/ywZsWRoRDoRdNMMHwYTsklMVnlAd2S0282bgMI8fiJpDh69OSL6K3qbo20KfpNMurnYGQSr/stFqZ7hYsxKlLnKAKhsmB8AIpEQ4bd/NrTLTXefsE6ChRmKWjXKVgpGoPs8GAicgKVw4K0qgDgy1A6hFq1WRat3fHF+FkU+b6H4NWpOU3KXTxrIb2qSHAb+qhm8hiSROi/9ofapjxhyKxxntPpge6KL5Z4+WBMYkAcE6+0Hd3Yh2zBsK2MV3iW0Y6cvOCroXlRb2MMJtdWx+3dkFzGh2Pe3DZ9QpSqpaR/rE1ImOrHqYYyccpiLC22amJIjRWVAherTfpQLmo6/K2pna85GrDuQPlH1Tsar8isAJbXLafSwOof4gg9RkAGm/oYpBQQiPUoyDk2BCQ1k+KILq48ErFo4WSRhHLq/y7mgw3+L85PpP6xWr6cgp9sOjYjKagOrxF148uhuaWtjet953fh1IQiEzgC+d2IgBCcUZqgTAICm2bR8oCjDLBsmg+ThyhfD+zBalsKBY1Ce54Y/t9cwfbLu9SFwEgphfopNA3yNxgyDafUM3mYTovZNgPGdd4ZFFOj1vtfFW3u7N+iHEN1HkeesDMXKPyoCDCGVMo4GCCD6PBhQ3dRZIHy0Y/3MaE5zU9mTCrwwnZojtE+qNpMSkJSpmGe0EzLyFelMJqhfFQ7a50uXxZ8pCc2wxtAKWgHoeamR2O7R+bq7IbPYItO0esdRgoTaY38hZLJ5y02oIVwoPokGIzxAMDuanQ1vn2WDQ00Rh6o5QOaCRu99fwDbQcN0XAuqkFpxT/cfz3slGRVokrNU0iqiMAJFEbKScZdmSkTUznC0U+MfwFOGdLgsewRyPKwBZYSmy6U325iUhBQNxbAC3FLKDV9VSOuQpOOukJ/GAmu/tyEbX9DgEp6dv1zoU0IqzpG6gssSjIYRVPGgU1QAQYRgIT8gEV0EXr1sqeh2I6rXjtmoCYyEDCe/PkFEi/Q48FuT29p557iN+LCwk5CK/CZ2WdAdfQZh2Z9QGrzPLSNRj5igUWzl9Vi0rCqH8G1Kp4QMLkuwMCAypdviDXyOIk0AHTM8HBYKh3b0/F+DxoNj4ZdoZfCpQVdnZarqoMaHWnMLNVcyevytGsrXQEoIbubqWYNo7NRHzdc0zvT21fWVirj7g36iy6pxogfvgHp1xH1Turbz8QyyHnXeBJicpYUctbzApwzZ1HT+FPEXMAgUZetgeGMwt4G+DHiDT2Lu+PT21fjJCAfV16a/Wu1PqOkUHSTKYhWW6PhhHUlNtWzFnA7MbY+r64vkwdpfNB2JfWgWXAvkzd42K4lN9x7Wrg4kIKgXCb4mcW595MCPJ/cTfPAMQMFWwnqwde4w8HZYJFpQwcSMhjVz4B8p6ncSCN1X4klxoIH4BN2J6taBMj6lHkAOs8JJAmXq5xsQtrPIPIIp/HG6i21xMGcFgqDXSRF0xQg14d2uy6HgKE13LSvQe52oShF5Jx1R6avyL4thhXQZHfC94oZzuPUBKFYf1VvDaxIrtV6dNGSx7DO0i1p6CzBkuAmEqyWceQY7F9+U0ObYDzoa1iKao/cOD/v6Q9gHrrr1uCeOk8fST9MG23Ul0KmM3r+Wn6Hi6WAcL7gEeaykicvgjzkjSwFsAXIR81Zx4QJ6oosVyJkCcT+4xAldCcihqvTf94HHUPXYp3REIaR4dhpQF6+FK1H0i9i7Pvh8owu3lO4PT1iuqu+DkL2Bj9+kdfGAg2TXw03iNHyobxofLE2ibjsYDPgeEQlRMR7afXbSGQcnPjI2D+sdtmuQ771dbASUsDndU7t58jrrNGRzISvwioAlHs5FA+cBE5Ccznkd8NMV6BR6ksnKLPZnMUawRDU1MZ/ib3xCdkTblHKu4blNiylH5n213yM0zubEie0o4JhzcfAy3H5qh2l17uLooBNLaO+gzonTH2uF8PQu9EyH+pjGsACTMy4cHzsPdymUSXYJOMP3yTkXqvO/lpvt0cX5ekDEu9PUfBeZODkFuAjXCaGdi6ew4qxJ8PmFfwmPpkgQjQlWqomFY6UkjmcnAtJG75EVR+NpzGpP1Ef5qUUbfowrC3zcSLX3BxgWEgEx/v9cP8H8u1Mvt9/rMDYf6sjwU1xSOPBgzFEeJLMRVFtKo5QHsUYT8ZRLCah27599EuqoC9PYjYO6aoAMHB8X1OHwEAYouHfHB3nyb2B+SnZxM/vw/bCtORjLMSy5aZoEpvgdGvlJfNPFUu/p7Z4VVK1hiI0/UTuB3ZPq4ohEbm7Mntgc1evEtknaosgZSwnDC2BdMmibpeg48X8Ixl+/8+xXdbshQXUPPvx8jT3fkELivHSmqbhblfNFShWAyQnJ3WBU6SMYSIpTDmHjdLVAdlADdz9gCplZw6mTiHqDwIsxbm9ErGusiVpg2w8Q3khKV/R9Oj8PFeF43hmW/nSd99nZzhyjCX3QOZkkB6BsH4H866WGyv9E0hVAzPYah2tkRfQZMmP2rinfOeQalge0ovhduBjJs9a1GBwReerceify49ctOh5/65ATYuMsAkVltmvTLBk4oHpdl6i+p8DoNj4Fb2vhdFYer2JSEilEwPd5n5zNoGBXEjreg/wh2NFnNRaIUHSOXa4eJRwygZoX6vnWnqVdCRT1ARxeFrNBJ+tsdooMwqnYhE7zIxnD8pZH+P0Nu1wWxCPTADfNWmqx626IBJJq6NeapcGeOmbtXvl0TeWG0Y7OGGV4+EHTtNBIT5Wd0Bujl7inXgZgfXTM5efD3qDTJ54O9v3Bkv+tdIRlq1kXcVD0BEMirmFxglNPt5pedb1AnxuCYMChUykwsTIWqT23XDpvTiKEru1cTcEMeniB+HQDehxPXNmkotFdwUPnilB/u4Nx5Xc6l8J9jH1EgKZUUt8t8cyoZleDBEt8oibDmJRAoMKJ5Oe9CSWS5ZMEJvacsGVdXDWjp/Ype5x0p9PXB2PAwt2LRD3d+ftNgpuyvxlP8pB84oB1i73vAVpwyrmXW72hfW6Dzn9Jkj4++0VQ4d0KSx1AsDA4OtXXDo63/w+GD+zC7w5SJaxsmnlYRQ4dgdjA7tTl2KNLnpJ+mvkoDxtt1a4oPaX3EVqj96o9sRKBQqU7ZOiupeAIyLMD+Y3YwHx30XWHB5CQiw7q3mj1EDlP2eBsZbz79ayUMbyHQ7s8gu4Lgip1LiGJj7NQj905/+rgUYKAA5qdrlHKIknWmqfuR+PB8RdBkDg/NgnlT89G72h2NvySnj7UyBwD+mi/IWs1xWbxuVwUIVXun5cMqBtFbrccI+DILjsVQg6eeq0itiRfedn89CvyFtpkxaauEvSANuZmB1p8FGPbU94J9medwsZ9HkUYjmI7OH5HuxendLbxTaYrPuIfE2ffXFKhoNBUp33HsFAXmCV/Vxpq5AYgFoRr5Ay93ZLRlgaIPjhZjXZZChT+aE5iWAXMX0oSFQEtwjiuhQQItTQX5IYrKfKB+queTNplR1Hoflo5/I6aPPmACwQCE2jTOYo5Dz1cs7Sod0KTG/3kEDGk3kUaUCON19xSJCab3kNpWZhSWkO8l+SpW70Wn3g0ciOIJO5JXma6dbos6jyisuxXwUUhj2+1uGhcvuliKtWwsUTw4gi1c/diEEpZHoKoxTBeMDmhPhKTx7TXWRakV8imJR355DcIHkR9IREHxohP4TbyR5LtFU24umRPRmEYHbpe1LghyxPx7YgUHjNbbQFRQhh4KeU1EabXx8FS3JAxp2rwRDoeWkJgWRUSKw6gGP5U2PuO9V4ZuiKXGGzFQuRuf+tkSSsbBtRJKhCi3ENuLlXhPbjTKD4djXVnfXFds6Zb+1XiUrRfyayGxJq1+SYBEfbKlgjiSmk0orgTqzSS+DZ5rTqsJbttiNtp+KMqGE2AHGFw6jQqM5vD6vMptmXV9OAjq49Uf/Lx9Opam+Hn5O9p8qoBBAQixzQZ4eNVkO9sPzJAMyR1y4/RCQQ1s0pV5KAU5sKLw3tkcFbI/JqrjCsK4Mw+W8aod4lioYuawUiCyVWBE/qPaFi5bnkgpfu/ae47174rI1fqQoTbW0HrU6FAejq7ByM0V4zkZTg02/YJK2N7hUQRCeZ4BIgSEqgD8XsjzG6LIsSbuHoIdz/LhFzbNn1clci1NHWJ0/6/O8HJMdIpEZbqi1RrrFfoo/rI/7ufm2MPG5lUI0IYJ4MAiHRTSOFJ2oTverFHYXThkYFIoyFx6rMYFgaOKM4xNWdlOnIcKb/suptptgTOTdVIf4YgdaAjJnIAm4qNNHNQqqAzvi53GkyRCEoseUBrHohZsjUbkR8gfKtc/+Oa72lwxJ8Mq6HDfDATbfbJhzeIuFQJSiw1uZprHlzUf90WgqG76zO0eCB1WdPv1IT6sNxxh91GEL2YpgC97ikFHyoaH92ndwduqZ6IYjkg20DX33MWdoZk7QkcKUCgisIYslOaaLyvIIqRKWQj16jE1DlQWJJaPopWTJjXfixEjRJJo8g4++wuQjbq+WVYjsqCuNIQW3YjnxKe2M5ZKEqq+cX7ZVgnkbsU3RWIyXA1rxv4kGersYJjD//auldXGmcEbcfTeF16Y1708FB1HIfmWv6dSFi6oD4E+RIjCsEZ+kY7dKnwReJJw3xCjKvi3kGN42rvyhUlIz0Bp+fNSV5xwFiuBzG296e5s/oHoFtUyUplmPulIPl+e1CQIQVtjlzLzzzbV+D/OVQtYzo5ixtMi5BmHuG4N/uKfJk5UIREp7+12oZlKtPBomXSzAY0KgtbPzzZoHQxujnREUgBU+O/jKKhgxVhRPtbqyHiUaRwRpHv7pgRPyUrnE7fYkVblGmfTY28tFCvlILC04Tz3ivkNWVazA+OsYrxvRM/hiNn8Fc4bQBeUZABGx5S/xFf9Lbbmk298X7iFg2yeimvsQqqJ+hYbt6uq+Zf9jC+Jcwiccd61NKQtFvGWrgJiHB5lwi6fR8KzYS7EaEHf/ka9EC7H8D+WEa3TEACHBkNSj/cXxFeq4RllC+fUFm2xtstYLL2nos1DfzsC9vqDDdRVcPA3Ho95aEQHvExVThXPqym65llkKlfRXbPTRiDepdylHjmV9YTWAEjlD9DdQnCem7Aj/ml58On366392214B5zrmQz/9ySG2mFqEwjq5sFl5tYJPw5hNz8lyZPUTsr5E0F2C9VMPnZckWP7+mbwp/BiN7f4kf7vtGnZF2JGvjK/sDX1RtcFY5oPQnE4lIAYV49U3C9SP0LCY/9i/WIFK9ORjzM9kG/KGrAuwFmgdEpdLaiqQNpCTGZVuAO65afkY1h33hrqyLjZy92JK3/twdj9pafFcwfXONmPQWldPlMe7jlP24Js0v9m8bIJ9TgS2IuRvE9ZVRaCwSJYOtAfL5H/YS4FfzKWKbek+GFulheyKtDNlBtrdmr+KU+ibHTdalzFUmMfxw3f36x+3cQbJLItSilW9cuvZEMjKw987jykZRlsH/UI+HlKfo2tLwemBEeBFtmxF2xmItA/dAIfQ+rXnm88dqvXa+GapOYVt/2waFimXFx3TC2MUiOi5/Ml+3rj/YU6Ihx2hXgiDXFsUeQkRAD6wF3SCPi2flk7XwKAA4zboqynuELD312EJ88lmDEVOMa1W/K/a8tGylZRMrMoILyoMQzzbDJHNZrhH77L9qSC42HVmKiZ5S0016UTp83gOhCwz9XItK9fgXfK3F5d7nZCBUekoLxrutQaPHa16Rjsa0gTrzyjqTnmcIcrxg6X6dkKiucudc0DD5W4pJPf0vuDW8r5/uw24YfMuxFRpD2ovT2mFX79xH6Jf+MVdv2TYqR6/955QgVPe3JCD/WjAYcLA9tpXgFiEjge2J5ljeI/iUzg91KQuHkII4mmHZxC3XQORLAC6G7uFn5LOmlnXkjFdoO976moNTxElS8HdxWoPAkjjocDR136m2l+f5t6xaaNgdodOvTu0rievnhNAB79WNrVs6EsPgkgfahF9gSFzzAd+rJSraw5Mllit7vUP5YxA843lUpu6/5jAR0RvH4rRXkSg3nE+O5GFyfe+L0s5r3k05FyghSFnKo4TTgs07qj4nTLqOYj6qaW9knJTDkF5OFMYbmCP+8H16Ty482OjvERV6OFyw043L9w3hoJi408sR+SGo1WviXUu8d7qS+ehKjpKwxeCthsm2LBFSFeetx0x4AaKPxtp3CxdWqCsLrB1s/j5TAhc1jNZsXWl6tjo/WDoewxzg8T8NnhZ1niUwL/nhfygLanCnRwaFGDyLw+sfZhyZ1UtYTp8TYB6dE7R3VsKKH95CUxJ8u8N+9u2/9HUNKHW3x3w5GQrfOPafk2w5qZq8MaHT0ebeY3wIsp3rN9lrpIsW9c1ws3VNV+JwNz0Lo9+V7zZr6GD56We6gWVIvtmam5GPPkVAbr74r6SwhuL+TRXtW/0pgyX16VNl4/EAD50TnUPuwrW6OcUO2VlWXS0inq872kk7GUlW6o/ozFKq+Sip6LcTtSDfDrPTcCHhx75H8BeRon+KG2wRwzfDgWhALmiWOMO6h3pm1UCZEPEjScyk7tdLx6WrdA2N1QTPENvNnhCQjW6kl057/qv7IwRryHrZBCwVSbLLnFRiHdTwk8mlYixFt1slEcPD7FVht13HyqVeyD55HOXrh2ElAxJyinGeoFzwKA91zfrdLvDxJSjzmImfvTisreI25EDcVfGsmxLVbfU8PGe/7NmWWKjXcdTJ11jAlVIY/Bv/mcxg/Q10vCHwKG1GW/XbJq5nxDhyLqiorn7Wd7VEVL8UgVzpHMjQ+Z8DUgSukiVwWAKkeTlVVeZ7t1DGnCgJVIdBPZAEK5f8CDyDNo7tK4/5DBjdD5MPV86TaEhGsLVFPQSI68KlBYy84FievdU9gWh6XZrugvtCZmi9vfd6db6V7FmoEcRHnG36VZH8N4aZaldq9zZawt1uBFgxYYx+Gs/qW1jwANeFy+LCoymyM6zgG7j8bGzUyLhvrbJkTYAEdICEb4kMKusKT9V3eIwMLsjdUdgijMc+7iKrr+TxrVWG0U+W95SGrxnxGrE4eaJFfgvAjUM4SAy8UaRwE9j6ZQH5qYAWGtXByvDiLSDfOD0yFA3UCMKSyQ30fyy1mIRg4ZcgZHLNHWl+c9SeijOvbOJxoQy7lTN2r3Y8p6ovxvUY74aOYbuVezryqXA6U+fcp6wSV9X5/OZKP18tB56Ua0gMyxJI7XyNT7IrqN8GsB9rL/kP5KMrjXxgqKLDa+V5OCH6a5hmOWemMUsea9vQl9t5Oce76PrTyTv50ExOqngE3PHPfSL//AItPdB7kGnyTRhVUUFNdJJ2z7RtktZwgmQzhBG/G7QsjZmJfCE7k75EmdIKH7xlnmDrNM/XbTT6FzldcH/rcRGxlPrv4qDScqE7JSmQABJWqRT/TUcJSwoQM+1jvDigvrjjH8oeK2in1S+/yO1j8xAws/T5u0VnIvAPqaE1atNuN0cuRliLcH2j0nTL4JpcR7w9Qya0JoaHgsOiALLCCzRkl1UUESz+ze/gIXHGtDwgYrK6pCFKJ1webSDog4zTlPkgXZqxlQDiYMjhDpwTtBW2WxthWbov9dt2X9XFLFmcF+eEc1UaQ74gqZiZsdj63pH1qcv3Vy8JYciogIVKsJ8Yy3J9w/GhjWVSQAmrS0BPOWK+RKV+0lWqXgYMnIFwpcZVD7zPSp547i9HlflB8gVnSTGmmq1ClO081OW/UH11pEQMfkEdDFzjLC1Cdo/BdL3s7cXb8J++Hzz1rhOUVZFIPehRiZ8VYu6+7Er7j5PSZu9g/GBdmNzJmyCD9wiswj9BZw+T3iBrg81re36ihMLjoVLoWc+62a1U/7qVX5CpvTVF7rocSAKwv4cBVqZm7lLDS/qoXs4fMs/VQi6BtVbNA3uSzKpQfjH1o3x4LrvkOn40zhm6hjduDglzJUwA0POabgdXIndp9fzhOo23Pe+Rk9GSLX0d71Poqry8NQDTzNlsa+JTNG9+UrEf+ngxCjGEsDCc0bz+udVRyHQI1jmEO3S+IOQycEq7XwB6z3wfMfa73m8PVRp+iOgtZfeSBl01xn03vMaQJkyj7vnhGCklsCWVRUl4y+5oNUzQ63B2dbjDF3vikd/3RUMifPYnX5Glfuk2FsV/7RqjI9yKTbE8wJY+74p7qXO8+dIYgjtLD/N8TJtRh04N9tXJA4H59IkMmLElgvr0Q5OCeVfdAt+5hkh4pQgfRMHpL74XatLQpPiOyHRs/OdmHtBf8nOZcxVKzdGclIN16lE7kJ+pVMjspOI+5+TqLRO6m0ZpNXJoZRv9MPDRcAfJUtNZHyig/s2wwReakFgPPJwCQmu1I30/tcBbji+Na53i1W1N+BqoY7Zxo+U/M9XyJ4Ok2SSkBtoOrwuhAY3a03Eu6l8wFdIG1cN+e8hopTkiKF093KuH/BcB39rMiGDLn6XVhGKEaaT/vqb/lufuAdpGExevF1+J9itkFhCfymWr9vGb3BTK4j598zRH7+e+MU9maruZqb0pkGxRDRE1CD4Z8LV4vhgPidk5w2Bq816g3nHw1//j3JStz7NR9HIWELO8TMn3QrP/zZp//+Dv9p429/ogv+GATR+n/UdF+ns9xNkXZQJXY4t9jMkJNUFygAtzndXwjss+yWH9HAnLQQfhAskdZS2l01HLWv7L7us5uTH409pqitvfSOQg/c+Zt7k879P3K9+WV68n7+3cZfuRd/dDPP/03rn+d+/nBvWfgDlt8+LzjqJ/vx3CnNOwiXhho778C96iD+1TBvRZYeP+EH81LE0vVwOOrmCLB3iKzI1x+vJEsrPH4uF0UB4TJ4X3uDfOCo3PYpYe0MF4bouh0DQ/l43fxUF7Y+dpWuvTSffB0yO2UQUETI/LwCZE3BvnevJ7c9zUlY3H58xzke6DNFDQG8n0WtDN4LAYN4nogKav1ezOfK/z+t6tsCTp+dhx4ymjWuCJk1dEUifDP+HyS4iP/Vg9B2jTo9L4NbiBuDS4nuuHW6H+JDQn2JtqRKGkEQPEYE7uzazXIkcxIAqUq1esasZBETlEZY7y7Jo+RoV/IsjY9eIMkUvr42Hc0xqtsavZvhz1OLwSxMOTuqzlhb0WbdOwBH9EYiyBjatz40bUxTHbiWxqJ0uma19qhPruvcWJlbiSSH48OLDDpaHPszvyct41ZfTu10+vjox6kOqK6v0K/gEPphEvMl/vwSv+A4Hhm36JSP9IXTyCZDm4kKsqD5ay8b1Sad/vaiyO5N/sDfEV6Z4q95E+yfjxpqBoBETW2C7xl4pIO2bDODDFurUPwE7EWC2Uplq+AHmBHvir2PSgkR12/Ry65O0aZtQPeXi9mTlF/Wj5GQ+vFkYyhXsLTjrBSP9hwk4GPqDP5rBn5/l8b0mLRAvRSzXHc293bs3s8EsdE3m2exxidWVB4joHR+S+dz5/W+v00K3TqN14CDBth8eWcsTbiwXPsygHdGid0PEdy6HHm2v/IUuV5RVapYmzGsX90mpnIdNGcOOq64Dbc5GUbYpD9M7S+6cLY//QmjxFLP5cuTFRm3vA5rkFZroFnO3bjHF35uU3s8mvL7Tp9nyTc4mymTJ5sLIp7umSnGkO23faehtz3mmTS7fbVx5rP7x3HXIjRNeq/A3xCs9JNB08c9S9BF2O3bOur0ItslFxXgRPdaapBIi4dRpKGxVz7ir69t/bc9qTxjvtOyGOfiLGDhR4fYywHv1WdOplxIV87TpLBy3Wc0QP0P9s4G7FBNOdITS/tep3o3h1TEa5XDDii7fWtqRzUEReP2fbxz7bHWWJdbIOxOUJZtItNZpTFRfj6vm9sYjRxQVO+WTdiOhdPeTJ+8YirPvoeL88l5iLYOHd3b/Imkq+1ZN1El3UikhftuteEYxf1Wujof8Pr4ICTu5ezZyZ4tHQMxlzUHLYO2VMOoNMGL/20S5i2o2obfk+8qqdR7xzbRDbgU0lnuIgz4LelQ5XS7xbLuSQtNS95v3ZUOdaUx/Qd8qxCt6xf2E62yb/HukLO6RyorV8KgYl5YNc75y+KvefrxY+lc/64y9kvWP0a0bDz/rojq+RWjO06WeruWqNFU7r3HPIcLWRql8ICZsz2Ls/qOm/CLn6++X+Qf7mGspYCrZod/lpl6Rw4xN/yuq8gqV4B6aHk1hVE1SfILxWu5gvXqbfARYQpspcxKp1F/c8XOPzkZvmoSw+vEqBLdrq1fr3wAPv5NnM9i8F+jdAuxkP5Z71c6uhK3enlnGymr7UsWZKC12qgUiG8XXGQ9mxnqz4GSIlybF9eXmbqj2sHX+a1jf0gRoONHRdRSrIq03Ty89eQ1GbV/Bk+du4+V15zls+vvERvZ4E7ZbnxWTVjDjb4o/k8jlw44pTIrUGxxuJvBeO+heuhOjpFsO6lVJ/aXnJDa/bM0Ql1cLbXE/Pbv3EZ3vj3iVrB5irjupZTzlnv677NrI9UNYNqbPgp/HZXS+lJmk87wec+7YOxTDo2aw2l3NfDr34VNlvqWJBknuK7oSlZ6/T10zuOoPZOeoIk81N+sL843WJ2Q4Z0fZ3scsqC/JV2fuhWi1jGURSKZV637lf53Xnnx16/vKEXY89aVJ0fv91jGdfG+G4+sniwHes4hS+udOr4RfhFhG/F5gUG35QaU+McuLmclb5ZWmR+sG5V6nf+PxYzlrnFGxpZaK8eqqVo0NfmAWoGfXDiT/FnUbWvzGDOTr8aktOZWg4BYvz5YH12ZbfCcGtNk+dDAZNGWvHov+PIOnY9Prjg8h/wLRrT69suaMVZ5bNuK00lSVpnqSX1NON/81FoP92rYndionwgOiA8WMf4vc8l15KqEEG4yAm2+WAN5Brfu1sq9suWYqgoajgOYt/JCk1gC8wPkK+XKCtRX6TAtgvrnuBgNRmn6I8lVDipOVB9kX6Oxkp4ZKyd1M6Gj8/v2U7k+YQBL95Kb9PQENucJb0JlW3b5tObN7m/Z1j1ev388d7o15zgXsI9CikAGAViR6lkJv7nb4Ak40M2G8TJ447kN+pvfHiOFjSUSP6PM+QfbAywKJCBaxSVxpizHseZUyUBhq59vFwrkyGoRiHbo0apweEZeSLuNiQ+HAekOnarFg00dZNXaPeoHPTRR0FmEyqYExOVaaaO8c0uFUh7U4e/UxdBmthlBDgg257Q33j1hA7HTxSeTTSuVnPZbgW1nodwmG16aKBDKxEetv7D9OjO0JhrbJTnoe+kcGoDJazFSO8/fUN9Jy/g4XK5PUkw2dgPDGpJqBfhe7GA+cjzfE/EGsMM+FV9nj9IAhrSfT/J3QE5TEIYyk5UjsI6ZZcCPr6A8FZUF4g9nnpVmjX90MLSQysIPD0nFzqwCcSJmIb5mYv2Cmk+C1MDFkZQyCBq4c/Yai9LJ6xYkGS/x2s5/frIW2vmG2Wrv0APpCdgCA9snFvfpe8uc0OwdRs4G9973PGEBnQB5qKrCQ6m6X/H7NInZ7y/1674/ZXOVp7OeuCRk8JFS516VHrnH1HkIUIlTIljjHaQtEtkJtosYul77cVwjk3gW1Ajaa6zWeyHGLlpk3VHE2VFzT2yI/EvlGUSz2H9zYE1s4nsKMtMqNyKNtL/59CpFJki5Fou6VXGm8vWATEPwrUVOLvoA8jLuwOzVBCgHB2Cr5V6OwEWtJEKokJkfc87h+sNHTvMb0KVTp5284QTPupoWvQVUwUeogZR3kBMESYo0mfukewRVPKh5+rzLQb7HKjFFIgWhj1w3yN/qCNoPI8XFiUgBNT1hCHBsAz8L7Oyt8wQWUFj92ONn/APyJFg8hzueqoJdNj57ROrFbffuS/XxrSXLTRgj5uxZjpgQYceeMc2wJrahReSKpm3QjHfqExTLAB2ipVumE8pqcZv8LYXQiPHHsgb5BMW8zM5pvQit+mQx8XGaVDcfVbLyMTlY8xcfmm/RSAT/H09UQol5gIz7rESDmnrQ4bURIB4iRXMDQwxgex1GgtDxKp2HayIkR+E/aDmCttNm2C6lytWdfOVzD6X2SpDWjQDlMRvAp1symWv4my1bPCD+E1EmGnMGWhNwmycJnDV2WrQNxO45ukEb08AAffizYKVULp15I4vbNK5DzWwCSUADfmKhfGSUqii1L2UsE8rB7mLuHuUJZOx4+WiizHBJ/hwboaBzhpNOVvgFTf5cJsHef7L1HCI9dOUUbb+YxUJWn6dYOLz+THi91kzY5dtO5c+grX7v0jEbsuoOGnoIreDIg/sFMyG+TyCLIcAWd1IZ1UNFxE8Uie13ucm40U2fcxC0u3WLvLOxwu+F7MWUsHsdtFQZ7W+nlfCASiAKyh8rnP3EyDByvtJb6Kax6/HkLzT9SyEyTMVM1zPtM0MJY14DmsWh4MgD15Ea9Hd00AdkTZ0EiG5NAGuIBzQJJ0JR0na+OB7lQA6UKxMfihIQ7GCCnVz694QvykWXTxpS2soDu+smru1UdIxSvAszBFD1c8c6ZOobA8bJiJIvuycgIXBQIXWwhyTgZDQxJTRXgEwRNAawGSXO0a1DKjdihLVNp/taE/xYhsgwe+VpKEEB4LlraQyE84gEihxCnbfoyOuJIEXy2FIYw+JjRusybKlU2g/vhTSGTydvCvXhYBdtAXtS2v7LkHtmXh/8fly1do8FI/D0f8UbzVb5h+KRhMGSAmR2mhi0YG/uj7wgxcfzCrMvdjitUIpXDX8ae2JcF/36qUWIMwN6JsjaRGNj+jEteGDcFyTUb8X/NHSucKMJp7pduxtD6KuxVlyxxwaeiC1FbGBESO84lbyrAugYxdl+2N8/6AgWpo/IeoAOcsG35IA/b3AuSyoa55L7llBLlaWlEWvuCFd8f8NfcTUgzJv6CbB+6ohWwodlk9nGWFpBAOaz5uEW5xBvmjnHFeDsb0mXwayj3mdYq5gxxNf3H3/tnCgHwjSrpSgVxLmiTtuszdRUFIsn6LiMPjL808vL1uQhDbM7aA43mISXReqjSskynIRcHCJ9qeFopJfx9tqyUoGbSwJex/0aDE3plBPGtNBYgWbdLom3+Q/bjdizR2/AS/c/dH/d3G7pyl1qDXgtOFtEqidwLqxPYtrNEveasWq3vPUUtqTeu8gpov4bdOQRI2kneFvRNMrShyVeEupK1PoLDPMSfWMIJcs267mGB8X9CehQCF0gIyhpP10mbyM7lwW1e6TGvHBV1sg/UyTghHPGRqMyaebC6pbB1WKNCQtlai1GGvmq9zUKaUzLaXsXEBYtHxmFbEZ2kJhR164LhWW2Tlp1dhsGE7ZgIWRBOx3Zcu2DxgH+G83WTPceKG0TgQKKiiNNOlWgvqNEbnrk6fVD+AqRam2OguZb0YWSTX88N+i/ELSxbaUUpPx4vJUzYg/WonSeA8xUK6u7DPHgpqWpEe6D4cXg5uK9FIYVba47V/nb+wyOtk+zG8RrS4EA0ouwa04iByRLSvoJA2FzaobbZtXnq8GdbfqEp5I2dpfpj59TCVif6+E75p665faiX8gS213RqBxTZqfHP46nF6NSenOneuT+vgbLUbdTH2/t0REFXZJOEB6DHvx6N6g9956CYrY/AYcm9gELJXYkrSi+0F0geKDZgOCIYkLU/+GOW5aGj8mvLFgtFH5+XC8hvAE3CvHRfl4ofM/Qwk4x2A+R+nyc9gNu/9Tem7XW4XRnyRymf52z09cTOdr+PG6+P/Vb4QiXlwauc5WB1z3o+IJjlbxI8MyWtSzT+k4sKVbhF3xa+vDts3NxXa87iiu+xRH9cAprnOL2h6vV54iQRXuOAj1s8nLFK8gZ70ThIQcWdF19/2xaJmT0efrkNDkWbpAQPdo92Z8+Hn/aLjbOzB9AI/k12fPs9HhUNDJ1u6ax2VxD3R6PywN7BrLJ26z6s3QoMp76qzzwetrDABKSGkfW5PwS1GvYNUbK6uRqxfyVGNyFB0E+OugMM8kKwmJmupuRWO8XkXXXQECyRVw9UyIrtCtcc4oNqXqr7AURBmKn6Khz3eBN96LwIJrAGP9mr/59uTOSx631suyT+QujDd4beUFpZ0kJEEnjlP+X/Kr2kCKhnENTg4BsMTOmMqlj2WMFLRUlVG0fzdCBgUta9odrJfpVdFomTi6ak0tFjXTcdqqvWBAzjY6hVrH9sbt3Z9gn+AVDpTcQImefbB4edirjzrsNievve4ZT4EUZWV3TxEsIW+9MT/RJoKfZZYSRGfC1CwPG/9rdMOM8qR/LUYvw5f/emUSoD7YSFuOoqchdUg2UePd1eCtFSKgxLSZ764oy4lvRCIH6bowPxZWwxNFctksLeil47pfevcBipkkBIc4ngZG+kxGZ71a72KQ7VaZ6MZOZkQJZXM6kb/Ac0/XkJx8dvyfJcWbI3zONEaEPIW8GbkYjsZcwy+eMoKrYjDmvEEixHzkCSCRPRzhOfJZuLdcbx19EL23MA8rnjTZZ787FGMnkqnpuzB5/90w1gtUSRaWcb0eta8198VEeZMUSfIhyuc4/nywFQ9uqn7jdqXh+5wwv+RK9XouNPbYdoEelNGo34KyySwigsrfCe0v/PlWPvQvQg8R0KgHO18mTVThhQrlbEQ0Kp/JxPdjHyR7E1QPw/ut0r+HDDG7BwZFm9IqEUZRpv2WpzlMkOemeLcAt5CsrzskLGaVOAxyySzZV/D2EY7ydNZMf8e8VhHcKGHAWNszf1EOq8fNstijMY4JXyATwTdncFFqcNDfDo+mWFvxJJpc4sEZtjXyBdoFcxbUmniCoKq5jydUHNjYJxMqN1KzYV62MugcELVhS3Bnd+TLLOh7dws/zSXWzxEb4Nj4aFun5x4kDWLK5TUF/yCXB/cZYvI9kPgVsG2jShtXkxfgT+xzjJofXqPEnIXIQ1lnIdmVzBOM90EXvJUW6a0nZ/7XjJGl8ToO3H/fdxnxmTNKBZxnkpXLVgLXCZywGT3YyS75w/PAH5I/jMuRspej8xZObU9kREbRA+kqjmKRFaKGWAmFQspC+QLbKPf0RaK3OXvBSWqo46p70ws/eZpu6jCtZUgQy6r4tHMPUdAgWGGUYNbuv/1a6K+MVFsd3T183+T8capSo6m0+Sh57fEeG/95dykGJBQMj09DSW2bY0mUonDy9a8trLnnL5B5LW3Nl8rJZNysO8Zb+80zXxqUGFpud3Qzwb7bf+8mq6x0TAnJU9pDQR9YQmZhlna2xuxJt0aCO/f1SU8gblOrbIyMsxTlVUW69VJPzYU2HlRXcqE2lLLxnObZuz2tT9CivfTAUYfmzJlt/lOPgsR6VN64/xQd4Jlk/RV7UKVv2Gx/AWsmTAuCWKhdwC+4HmKEKYZh2Xis4KsUR1BeObs1c13wqFRnocdmuheaTV30gvVXZcouzHKK5zwrN52jXJEuX6dGx3BCpV/++4f3hyaW/cQJLFKqasjsMuO3B3WlMq2gyYfdK1e7L2pO/tRye2mwzwZPfdUMrl5wdLqdd2Kv/wVtnpyWYhd49L6rsOV+8HXPrWH2Kup89l2tz6bf80iYSd+V4LROSOHeamvexR524q4r43rTmtFzQvArpvWfLYFZrbFspBsXNUqqenjxNNsFXatZvlIhk7teUPfK+YL32F8McTnjv0BZNppb+vshoCrtLXjIWq3EJXpVXIlG6ZNL0dh6qEm2WMwDjD3LfOfkGh1/czYc/0qhiD2ozNnH4882MVVt3JbVFkbwowNCO3KL5IoYW5wlVeGCViOuv1svZx7FbzxKzA4zGqBlRRaRWCobXaVq4yYCWbZf8eiJwt3OY+MFiSJengcFP2t0JMfzOiJ7cECvpx7neg1Rc5x+7myPJOXt2FohVRyXtD+/rDoTOyGYInJelZMjolecVHUhUNqvdZWg2J2t0jPmiLFeRD/8fOT4o+NGILb+TufCo9ceBBm3JLVn+MO2675n7qiEX/6W+188cYg3Zn5NSTjgOKfWFSAANa6raCxSoVU851oJLY11WIoYK0du0ec5E4tCnAPoKh71riTsjVIp3gKvBbEYQiNYrmH22oLQWA2AdwMnID6PX9b58dR2QKo4qag1D1Z+L/FwEKTR7osOZPWECPJIHQqPUsM5i/CH5YupVPfFA5pHUBcsesh8eO5YhyWnaVRPZn/BmdXVumZWPxMP5e28zm2uqHgFoT9CymHYNNrzrrjlXZM06HnzDxYNlI5b/QosxLmmrqDFqmogQdqk0WLkUceoAvQxHgkIyvWU69BPFr24VB6+lx75Rna6dGtrmOxDnvBojvi1/4dHjVeg8owofPe1cOnxU1ioh016s/Vudv9mhV9f35At+Sh28h1bpp8xhr09+vf47Elx3Ms6hyp6QvB3t0vnLbOhwo660cp7K0vvepabK7YJfxEWWfrC2YzJfYOjygPwfwd/1amTqa0hZ5ueebhWYVMubRTwIjj+0Oq0ohU3zfRfuL8gt59XsHdwKtxTQQ4Y2qz6gisxnm2UdlmpEkgOsZz7iEk6QOt8BuPwr+NR01LTqXmJo1C76o1N274twJvl+I069TiLpenK/miRxhyY8jvYV6W1WuSwhH9q7kuwnJMtm7IWcqs7HsnyHSqWXLSpYtZGaR1V3t0gauninFPZGtWskF65rtti48UV9uV9KM8kfDYs0pgB00S+TlzTXV6P8mxq15b9En8sz3jWSszcifZa/NuufPNnNTb031pptt0+sRSH/7UG8pzbsgtt3OG3ut7B9JzDMt2mTZuyRNIV8D54TuTrpNcHtgmMlYJeiY9XS83NYJicjRjtJSf9BZLsQv629QdDsKQhTK5CnXhpk7vMNkHzPhm0ExW/VCGApHfPyBagtZQTQmPHx7g5IXXsrQDPzIVhv2LB6Ih138iSDww1JNHrDvzUxvp73MsQBVhW8EbrReaVUcLB1R3PUXyaYG4HpJUcLVxMgDxcPkVRQpL7VTAGabDzbKcvg12t5P8TSGQkrj/gOrpnbiDHwluA73xbXts/L7u468cRWSWRtgTwlQnA47EKg0OiZDgFxAKQQUcsbGomITgeXUAAyKe03eA7Mp4gnyKQmm0LXJtEk6ddksMJCuxDmmHzmVhO+XaN2A54MIh3niw5CF7PwiXFZrnA8wOdeHLvvhdoqIDG9PDI7UnWWHq526T8y6ixJPhkuVKZnoUruOpUgOOp3iIKBjk+yi1vHo5cItHXb1PIKzGaZlRS0g5d3MV2pD8FQdGYLZ73aae/eEIUePMc4NFz8pIUfLCrrF4jVWH5gQneN3S8vANBmUXrEcKGn6hIUN95y1vpsvLwbGpzV9L0ZKTan6TDXM05236uLJcIEMKVAxKNT0K8WljuwNny3BNQRfzovA85beI9zr1AGNYnYCVkR1aGngWURUrgqR+gRrQhxW81l3CHevjvGEPzPMTxdsIfB9dfGRbZU0cg/1mcubtECX4tvaedmNAvTxCJtc2QaoUalGfENCGK7IS/O8CRpdOVca8EWCRwv2sSWE8CJPW5PCugjCXPd3h6U60cPD+bdhtXZuYB6stcoveE7Sm5MM2yvfUHXFSW7KzLmi7/EeEWL0wqcOH9MOSKjhCHHmw+JGLcYE/7SBZQCRggox0ZZTAxrlzNNXYXL5fNIjkdT4YMqVUz6p8YDt049v4OXGdg3qTrtLBUXOZf7ahPlZAY/O+7Sp0bvGSHdyQ8B1LOsplqMb9Se8VAE7gIdSZvxbRSrfl+Lk5Qaqi5QJceqjitdErcHXg/3MryljPSIAMaaloFm1cVwBJ8DNmkDqoGROSHFetrgjQ5CahuKkdH5pRPigMrgTtlFI8ufJPJSUlGgTjbBSvpRc0zypiUn6U5KZqcRoyrtzhmJ7/caeZkmVRwJQeLOG8LY6vP5ChpKhc8Js0El+n6FXqbx9ItdtLtYP92kKfaTLtCi8StLZdENJa9Ex1nOoz1kQ7qxoiZFKRyLf4O4CHRT0T/0W9F8epNKVoeyxUXhy3sQMMsJjQJEyMOjmOhMFgOmmlscV4eFi1CldU92yjwleirEKPW3bPAuEhRZV7JsKV3Lr5cETAiFuX5Nw5UlF7d2HZ96Bh0sgFIL5KGaKSoVYVlvdKpZJVP5+NZ7xDEkQhmDgsDKciazJCXJ6ZN2B3FY2f6VZyGl/t4aunGIAk/BHaS+i+SpdRfnB/OktOvyjinWNfM9Ksr6WwtCa1hCmeRI6icpFM4o8quCLsikU0tMoZI/9EqXRMpKGaWzofl4nQuVQm17d5fU5qXCQeCDqVaL9XJ9qJ08n3G3EFZS28SHEb3cdRBdtO0YcTzil3QknNKEe/smQ1fTb0XbpyNB5xAeuIlf+5KWlEY0DqJbsnzJlQxJPOVyHiKMx5Xu9FcEv1Fbg6Fhm4t+Jyy5JC1W3YO8dYLsO0PXPbxodBgttTbH3rt9Cp1lJIk2r3O1Zqu94eRbnIz2f50lWolYzuKsj4PMok4abHLO8NAC884hiXx5Fy5pWKO0bWL7uEGXaJCtznhP67SlQ4xjWIfgq6EpZ28QMtuZK7JC0RGbl9nA4XtFLug/NLMoH1pGt9IonAJqcEDLyH6TDROcbsmGPaGIxMo41IUAnQVPMPGByp4mOmh9ZQMkBAcksUK55LsZj7E5z5XuZoyWCKu6nHmDq22xI/9Z8YdxJy4kWpD16jLVrpwGLWfyOD0Wd+cBzFBxVaGv7S5k9qwh/5t/LQEXsRqI3Q9Rm3QIoaZW9GlsDaKOUyykyWuhNOprSEi0s1G4rgoiX1V743EELti+pJu5og6X0g6oTynUqlhH9k6ezyRi05NGZHz0nvp3HOJr7ebrAUFrDjbkFBObEvdQWkkUbL0pEvMU46X58vF9j9F3j6kpyetNUBItrEubW9ZvMPM4qNqLlsSBJqOH3XbNwv/cXDXNxN8iFLzUhteisYY+RlHYOuP29/Cb+L+xv+35Rv7xudnZ6ohK4cMPfCG8KI7dNmjNk/H4e84pOxn/sZHK9psfvj8ncA8qJz7O8xqbxESDivGJOZzF7o5PJLQ7g34qAWoyuA+x3btU98LT6ZyGyceIXjrqob2CAVql4VOTQPUQYvHV/g4zAuCZGvYQBtf0wmd5lilrvuEn1BXLny01B4h4SMDlYsnNpm9d7m9h578ufpef9Z4WplqWQvqo52fyUA7J24eZD5av6SyGIV9kpmHNqyvdfzcpEMw97BvknV2fq+MFHun9BT3Lsf8pbzvisWiIQvYkng+8Vxk1V+dli1u56kY50LRjaPdotvT5BwqtwyF+emo/z9J3yVUVGfKrxQtJMOAQWoQii/4dp9wgybSa5mkucmRLtEQZ/pz0tL/NVcgWAd95nEQ3Tg6tNbuyn3Iepz65L3huMUUBntllWuu4DbtOFSMSbpILV4fy6wlM0SOvi6CpLh81c1LreIvKd61uEWBcDw1lUBUW1I0Z+m/PaRlX+PQ/oxg0Ye6KUiIiTF4ADNk59Ydpt5/rkxmq9tV5Kcp/eQLUVVmBzQNVuytQCP6Ezd0G8eLxWyHpmZWJ3bAzkWTtg4lZlw42SQezEmiUPaJUuR/qklVA/87S4ArFCpALdY3QRdUw3G3XbWUp6aq9z0zUizcPa7351p9JXOZyfdZBFnqt90VzQndXB/mwf8LC9STj5kenVpNuqOQQP3mIRJj7eV21FxG8VAxKrEn3c+XfmZ800EPb9/5lIlijscUbB6da0RQaMook0zug1G0tKi/JBC4rw7/D3m4ARzAkzMcVrDcT2SyFtUdWAsFlsPDFqV3N+EjyXaoEePwroaZCiLqEzb8MW+PNE9TmTC01EzWli51PzZvUqkmyuROU+V6ik+Le/9qT6nwzUzf9tP68tYei0YaDGx6kAd7jn1cKqOCuYbiELH9zYqcc4MnRJjkeGiqaGwLImhyeKs+xKJMBlOJ05ow9gGCKZ1VpnMKoSCTbMS+X+23y042zOb5MtcY/6oBeAo1Vy89OTyhpavFP78jXCcFH0t7Gx24hMEOm2gsEfGabVpQgvFqbQKMsknFRRmuPHcZu0Su/WMFphZvB2r/EGbG72rpGGho3h+Msz0uGzJ7hNK2uqQiE1qmn0zgacKYYZBCqsxV+sjbpoVdSilW/b94n2xNb648VmNIoizqEWhBnsen+d0kbCPmRItfWqSBeOd9Wne3c6bcd6uvXOJ6WdiSsuXq0ndhqrQ4QoWUjCjYtZ0EAhnSOP1m44xkf0O7jXghrzSJWxP4a/t72jU29Vu2rvu4n7HfHkkmQOMGSS+NPeLGO5I73mC2B7+lMiBQQZRM9/9liLIfowupUFAbPBbR+lxDM6M8Ptgh1paJq5Rvs7yEuLQv/7d1oU2woFSb3FMPWQOKMuCuJ7pDDjpIclus5TeEoMBy2YdVB4fxmesaCeMNsEgTHKS5WDSGyNUOoEpcC2OFWtIRf0w27ck34/DjxRTVIcc9+kqZE6iMSiVDsiKdP/Xz5XfEhm/sBhO50p1rvJDlkyyxuJ9SPgs7YeUJBjXdeAkE+P9OQJm6SZnn1svcduI78dYmbkE2mtziPrcjVisXG78spLvbZaSFx/Rks9zP4LKn0Cdz/3JsetkT06A8f/yCgMO6Mb1Hme0JJ7b2wZz1qleqTuKBGokhPVUZ0dVu+tnQYNEY1fmkZSz6+EGZ5EzL7657mreZGR3jUfaEk458PDniBzsSmBKhDRzfXameryJv9/D5m6HIqZ0R+ouCE54Dzp4IJuuD1e4Dc5i+PpSORJfG23uVgqixAMDvchMR0nZdH5brclYwRoJRWv/rlxGRI5ffD5NPGmIDt7vDE1434pYdVZIFh89Bs94HGGJbTwrN8T6lh1HZFTOB4lWzWj6EVqxSMvC0/ljWBQ3F2kc/mO2b6tWonT2JEqEwFts8rz2h+oWNds9ceR2cb7zZvJTDppHaEhK5avWqsseWa2Dt5BBhabdWSktS80oMQrL4TvAM9b5HMmyDnO+OkkbMXfUJG7eXqTIG6lqSOEbqVR+qYdP7uWb57WEJqzyh411GAVsDinPs7KvUeXItlcMdOUWzXBH6zscymV1LLVCtc8IePojzXHF9m5b5zGwBRdzcyUJkiu938ApmAayRdJrX1PmVguWUvt2ThQ62czItTyWJMW2An/hdDfMK7SiFQlGIdAbltHz3ycoh7j9V7GxNWBpbtcSdqm4XxRwTawc3cbZ+xfSv9qQfEkDKfZTwCkqWGI/ur250ItXlMlh6vUNWEYIg9A3GzbgmbqvTN8js2YMo87CU5y6nZ4dbJLDQJj9fc7yM7tZzJDZFtqOcU8+mZjYlq4VmifI23iHb1ZoT9E+kT2dolnP1AfiOkt7PQCSykBiXy5mv637IegWSKj9IKrYZf4Lu9+I7ub+mkRdlvYzehh/jaJ9n7HUH5b2IbgeNdkY7wx1yVzxS7pbvky6+nmVUtRllEFfweUQ0/nG017WoUYSxs+j2B4FV/F62EtHlMWZXYrjGHpthnNb1x66LKZ0Qe92INWHdfR/vqp02wMS8r1G4dJqHok8KmQ7947G13a4YXbsGgHcBvRuVu1eAi4/A5+ZixmdSXM73LupB/LH7O9yxLTVXJTyBbI1S49TIROrfVCOb/czZ9pM4JsZx8kUz8dQGv7gUWKxXvTH7QM/3J2OuXXgciUhqY+cgtaOliQQVOYthBLV3xpESZT3rmfEYNZxmpBbb24CRao86prn+i9TNOh8VxRJGXJfXHATJHs1T5txgc/opYrY8XjlGQQbRcoxIBcnVsMjmU1ymmIUL4dviJXndMAJ0Yet+c7O52/p98ytlmAsGBaTAmMhimAnvp1TWNGM9BpuitGj+t810CU2UhorrjPKGtThVC8WaXw04WFnT5fTjqmPyrQ0tN3CkLsctVy2xr0ZWgiWVZ1OrlFjjxJYsOiZv2cAoOvE+7sY0I/TwWcZqMoyIKNOftwP7w++Rfg67ljfovKYa50if3fzE/8aPYVey/Nq35+nH2sLPh/fP5TsylSKGOZ4k69d2PnH43+kq++sRXHQqGArWdwhx+hpwQC6JgT2uxehYU4Zbw7oNb6/HLikPyJROGK2ouyr+vzseESp9G50T4AyFrSqOQ0rroCYP4sMDFBrHn342EyZTMlSyk47rHSq89Y9/nI3zG5lX16Z5lxphguLOcZUndL8wNcrkyjH82jqg8Bo8OYkynrxZvbFno5lUS3OPr8Ko3mX9NoRPdYOKKjD07bvgFgpZ/RF+YzkWvJ/Hs/tUbfeGzGWLxNAjfDzHHMVSDwB5SabQLsIZHiBp43FjGkaienYoDd18hu2BGwOK7U3o70K/WY/kuuKdmdrykIBUdG2mvE91L1JtTbh20mOLbk1vCAamu7utlXeGU2ooVikbU/actcgmsC1FKk2qmj3GWeIWbj4tGIxE7BLcBWUvvcnd/lYxsMV4F917fWeFB/XbINN3qGvIyTpCalz1lVewdIGqeAS/gB8Mi+sA+BqDiX3VGD2eUunTRbSY+AuDy4E3Qx3hAhwnSXX+B0zuj3eQ1miS8Vux2z/l6/BkWtjKGU72aJkOCWhGcSf3+kFkkB15vGOsQrSdFr6qTj0gBYiOlnBO41170gOWHSUoBVRU2JjwppYdhIFDfu7tIRHccSNM5KZOFDPz0TGMAjzzEpeLwTWp+kn201kU6NjbiMQJx83+LX1e1tZ10kuChJZ/XBUQ1dwaBHjTDJDqOympEk8X2M3VtVw21JksChA8w1tTefO3RJ1FMbqZ01bHHkudDB/OhLfe7P5GOHaI28ZXKTMuqo0hLWQ4HabBsGG7NbP1RiXtETz074er6w/OerJWEqjmkq2y51q1BVI+JUudnVa3ogBpzdhFE7fC7kybrAt2Z6RqDjATAUEYeYK45WMupBKQRtQlU+uNsjnzj6ZmGrezA+ASrWxQ6LMkHRXqXwNq7ftv28dUx/ZSJciDXP2SWJsWaN0FjPX9Yko6LobZ7aYW/IdUktI9apTLyHS8DyWPyuoZyxN1TK/vtfxk3HwWh6JczZC8Ftn0bIJay2g+n5wd7lm9rEsKO+svqVmi+c1j88hSCxbzrg4+HEP0Nt1/B6YW1XVm09T1CpAKjc9n18hjqsaFGdfyva1ZG0Xu3ip6N6JGpyTSqY5h4BOlpLPaOnyw45PdXTN+DtAKg7DLrLFTnWusoSBHk3s0d7YouJHq85/R09Tfc37ENXZF48eAYLnq9GLioNcwDZrC6FW6godB8JnqYUPvn0pWLfQz0lM0Yy8Mybgn84Ds3Q9bDP10bLyOV+qzxa4Rd9Dhu7cju8mMaONXK3UqmBQ9qIg7etIwEqM/kECk/Dzja4Bs1xR+Q/tCbc8IKrSGsTdJJ0vge7IG20W687uVmK6icWQ6cD3lwFzgNMGtFvO5qyJeKflGLAAcQZOrkxVwy3cWvqlGpvjmf9Qe6Ap20MPbV92DPV0OhFM4kz8Yr0ffC2zLWSQ1kqY6QdQrttR3kh1YLtQd1kCEv5hVoPIRWl5ERcUTttBIrWp6Xs5Ehh5OUUwI5aEBvuiDmUoENmnVw1FohCrbRp1A1E+XSlWVOTi7ADW+5Ohb9z1vK4qx5R5lPdGCPBJZ00mC+Ssp8VUbgpGAvXWMuWQQRbCqI6Rr2jtxZxtfP7W/8onz+yz0Gs76LaT5HX9ecyiZCB/ZR/gFtMxPsDwohoeCRtiuLxE1GM1vUEUgBv86+eehL58/P56QFGQ/MqOe/vC76L63jzmeax4exd/OKTUvkXg+fOJUHych9xt/9goJMrapSgvXrj8+8vk/N80f22Sewj6cyGqt1B6mztoeklVHHraouhvHJaG/OuBz6DHKMpFmQULU1bRWlyYE0RPXYYkUycIemN7TLtgNCJX6BqdyxDKkegO7nJK5xQ7OVYDZTMf9bVHidtk6DQX9Et+V9M7esgbsYBdEeUpsB0Xvw2kd9+rI7V+m47u+O/tq7mw7262HU1WlS9uFzsV6JxIHNmUCy0QS9e077JGRFbG65z3/dOKB/Zk+yDdKpUmdXjn/aS3N5nv4fK7bMHHmPlHd4E2+iTbV5rpzScRnxk6KARuDTJ8Q1LpK2mP8gj1EbuJ9RIyY+EWK4hCiIDBAS1Tm2IEXAFfgKPgdL9O6mAa06wjCcUAL6EsxPQWO9VNegBPm/0GgkZbDxCynxujX/92vmGcjZRMAY45puak2sFLCLSwXpEsyy5fnF0jGJBhm+fNSHKKUUfy+276A7/feLOFxxUuHRNJI2Osenxyvf8DAGObT60pfTTlhEg9u/KKkhJqm5U1/+BEcSkpFDA5XeCqxwXmPac1jcuZ3JWQ+p0NdWzb/5v1ZvF8GtMTFFEdQjpLO0bwPb0BHNWnip3liDXI2fXf05jjvfJ0NpjLCUgfTh9CMFYVFKEd4Z/OG/2C+N435mnK+9t1gvCiVcaaH7rK4+PjCvpVNiz+t2QyqH1O8x3JKZVl6Q+Lp/XK8wMjVMslOq9FdSw5FtUs/CptXH9PW+wbWHgrV17R5jTVOtGtKFu3nb80T+E0tv9QkzW3J2dbaw/8ddAKZ0pxIaEqLjlPrji3VgJ3GvdFvlqD8075woxh4fVt0JZE0KVFsAvqhe0dqN9b35jtSpnYMXkU+vZq+IAHad3IHc2s/LYrnD1anfG46IFiMIr9oNbZDWvwthqYNqOigaKd/XlLU4XHfk/PXIjPsLy/9/kAtQ+/wKH+hI/IROWj5FPvTZAT9f7j4ZXQyG4M0TujMAFXYkKvEHv1xhySekgXGGqNxWeWKlf8dDAlLuB1cb/qOD+rk7cmwt+1yKpk9cudqBanTi6zTbXRtV8qylNtjyOVKy1HTz0GW9rjt6sSjAZcT5R+KdtyYb0zyqG9pSLuCw5WBwAn7fjBjKLLoxLXMI+52L9cLwIR2B6OllJZLHJ8vDxmWdtF+QJnmt1rsHPIWY20lftk8fYePkAIg6Hgn532QoIpegMxiWgAOfe5/U44APR8Ac0NeZrVh3gEhs12W+tVSiWiUQekf/YBECUy5fdYbA08dd7VzPAP9aiVcIB9k6tY7WdJ1wNV+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg="},{}],6:[function(o,n,i){var s=o("./dictionary-browser");i.init=function(){i.dictionary=s.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 s(f,m){this.bits=f,this.value=m}i.HuffmanCode=s;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 s(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 b=m,_,y,w,S,x,C,A,k,R,M,P,T=new Int32Array(l+1),N=new Int32Array(l+1);for(P=new Int32Array(v),w=0;w<v;w++)T[g[w]]++;for(N[1]=0,y=1;y<l;y++)N[y+1]=N[y]+T[y];for(w=0;w<v;w++)g[w]!==0&&(P[N[g[w]]++]=w);if(k=h,R=1<<k,M=R,N[l]===1){for(S=0;S<M;++S)f[m+S]=new s(0,P[0]&65535);return M}for(S=0,w=0,y=1,x=2;y<=h;++y,x<<=1)for(;T[y]>0;--T[y])_=new s(y&255,P[w++]&65535),u(f,m+S,x,R,_),S=c(S,y);for(A=M-1,C=-1,y=h+1,x=2;y<=l;++y,x<<=1)for(;T[y]>0;--T[y])(S&A)!==C&&(m+=R,k=d(T,y,h),R=1<<k,M+=R,C=S&A,f[b+C]=new s(k+h&255,m-b-C&65535)),_=new s(y-h&255,P[w++]&65535),u(f,m+(S>>h),x,R,_),S=c(S,y);return M}},{}],8:[function(o,n,i){"use strict";i.byteLength=h,i.toByteArray=v,i.fromByteArray=y;for(var s=[],l=[],c=typeof Uint8Array<"u"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,f=u.length;d<f;++d)s[d]=u[d],l[u.charCodeAt(d)]=d;l[45]=62,l[95]=63;function m(w){var S=w.length;if(S%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var x=w.indexOf("=");x===-1&&(x=S);var C=x===S?0:4-x%4;return[x,C]}function h(w){var S=m(w),x=S[0],C=S[1];return(x+C)*3/4-C}function g(w,S,x){return(S+x)*3/4-x}function v(w){for(var S,x=m(w),C=x[0],A=x[1],k=new c(g(w,C,A)),R=0,M=A>0?C-4:C,P=0;P<M;P+=4)S=l[w.charCodeAt(P)]<<18|l[w.charCodeAt(P+1)]<<12|l[w.charCodeAt(P+2)]<<6|l[w.charCodeAt(P+3)],k[R++]=S>>16&255,k[R++]=S>>8&255,k[R++]=S&255;return A===2&&(S=l[w.charCodeAt(P)]<<2|l[w.charCodeAt(P+1)]>>4,k[R++]=S&255),A===1&&(S=l[w.charCodeAt(P)]<<10|l[w.charCodeAt(P+1)]<<4|l[w.charCodeAt(P+2)]>>2,k[R++]=S>>8&255,k[R++]=S&255),k}function b(w){return s[w>>18&63]+s[w>>12&63]+s[w>>6&63]+s[w&63]}function _(w,S,x){for(var C,A=[],k=S;k<x;k+=3)C=(w[k]<<16&16711680)+(w[k+1]<<8&65280)+(w[k+2]&255),A.push(b(C));return A.join("")}function y(w){for(var S,x=w.length,C=x%3,A=[],k=16383,R=0,M=x-C;R<M;R+=k)A.push(_(w,R,R+k>M?M:R+k));return C===1?(S=w[x-1],A.push(s[S>>2]+s[S<<4&63]+"==")):C===2&&(S=(w[x-2]<<8)+w[x-1],A.push(s[S>>10]+s[S>>4&63]+s[S<<2&63]+"=")),A.join("")}},{}],9:[function(o,n,i){function s(l,c){this.offset=l,this.nbits=c}i.kBlockLengthPrefixCode=[new s(1,2),new s(5,2),new s(9,2),new s(13,2),new s(17,3),new s(25,3),new s(33,3),new s(41,3),new s(49,4),new s(65,4),new s(81,4),new s(97,4),new s(113,5),new s(145,5),new s(177,5),new s(209,5),new s(241,6),new s(305,6),new s(369,7),new s(497,8),new s(753,9),new s(1265,10),new s(2289,11),new s(4337,12),new s(8433,13),new s(16625,24)],i.kInsertLengthPrefixCode=[new s(0,0),new s(1,0),new s(2,0),new s(3,0),new s(4,0),new s(5,0),new s(6,1),new s(8,1),new s(10,2),new s(14,2),new s(18,3),new s(26,3),new s(34,4),new s(50,4),new s(66,5),new s(98,5),new s(130,6),new s(194,7),new s(322,8),new s(578,9),new s(1090,10),new s(2114,12),new s(6210,14),new s(22594,24)],i.kCopyLengthPrefixCode=[new s(2,0),new s(3,0),new s(4,0),new s(5,0),new s(6,0),new s(7,0),new s(8,0),new s(9,0),new s(10,1),new s(12,1),new s(14,2),new s(18,2),new s(22,3),new s(30,3),new s(38,4),new s(54,4),new s(70,5),new s(102,5),new s(134,6),new s(198,7),new s(326,8),new s(582,9),new s(1094,10),new s(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 s(c){this.buffer=c,this.pos=0}s.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=s;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 s=o("./dictionary"),l=0,c=1,u=2,d=3,f=4,m=5,h=6,g=7,v=8,b=9,_=10,y=11,w=12,S=13,x=14,C=15,A=16,k=17,R=18,M=19,P=20;function T(F,D,z){this.prefix=new Uint8Array(F.length),this.transform=D,this.suffix=new Uint8Array(z.length);for(var B=0;B<F.length;B++)this.prefix[B]=F.charCodeAt(B);for(var B=0;B<z.length;B++)this.suffix[B]=z.charCodeAt(B)}var N=[new T("",l,""),new T("",l," "),new T(" ",l," "),new T("",w,""),new T("",_," "),new T("",l," the "),new T(" ",l,""),new T("s ",l," "),new T("",l," of "),new T("",_,""),new T("",l," and "),new T("",S,""),new T("",c,""),new T(", ",l," "),new T("",l,", "),new T(" ",_," "),new T("",l," in "),new T("",l," to "),new T("e ",l," "),new T("",l,'"'),new T("",l,"."),new T("",l,'">'),new T("",l,`
`),new T("",d,""),new T("",l,"]"),new T("",l," for "),new T("",x,""),new T("",u,""),new T("",l," a "),new T("",l," that "),new T(" ",_,""),new T("",l,". "),new T(".",l,""),new T(" ",l,", "),new T("",C,""),new T("",l," with "),new T("",l,"'"),new T("",l," from "),new T("",l," by "),new T("",A,""),new T("",k,""),new T(" the ",l,""),new T("",f,""),new T("",l,". The "),new T("",y,""),new T("",l," on "),new T("",l," as "),new T("",l," is "),new T("",g,""),new T("",c,"ing "),new T("",l,`
	`),new T("",l,":"),new T(" ",l,". "),new T("",l,"ed "),new T("",P,""),new T("",R,""),new T("",h,""),new T("",l,"("),new T("",_,", "),new T("",v,""),new T("",l," at "),new T("",l,"ly "),new T(" the ",l," of "),new T("",m,""),new T("",b,""),new T(" ",_,", "),new T("",_,'"'),new T(".",l,"("),new T("",y," "),new T("",_,'">'),new T("",l,'="'),new T(" ",l,"."),new T(".com/",l,""),new T(" the ",l," of the "),new T("",_,"'"),new T("",l,". This "),new T("",l,","),new T(".",l," "),new T("",_,"("),new T("",_,"."),new T("",l," not "),new T(" ",l,'="'),new T("",l,"er "),new T(" ",y," "),new T("",l,"al "),new T(" ",y,""),new T("",l,"='"),new T("",y,'"'),new T("",_,". "),new T(" ",l,"("),new T("",l,"ful "),new T(" ",_,". "),new T("",l,"ive "),new T("",l,"less "),new T("",y,"'"),new T("",l,"est "),new T(" ",_,"."),new T("",y,'">'),new T(" ",l,"='"),new T("",_,","),new T("",l,"ize "),new T("",y,"."),new T("\xC2\xA0",l,""),new T(" ",l,","),new T("",_,'="'),new T("",y,'="'),new T("",l,"ous "),new T("",y,", "),new T("",_,"='"),new T(" ",_,","),new T(" ",y,'="'),new T(" ",y,", "),new T("",y,","),new T("",y,"("),new T("",y,". "),new T(" ",y,"."),new T("",y,"='"),new T(" ",y,". "),new T(" ",_,'="'),new T(" ",y,"='"),new T(" ",_,"='")];i.kTransforms=N,i.kNumTransforms=N.length;function L(F,D){return F[D]<192?(F[D]>=97&&F[D]<=122&&(F[D]^=32),1):F[D]<224?(F[D+1]^=32,2):(F[D+2]^=5,3)}i.transformDictionaryWord=function(F,D,z,B,O){var V=N[O].prefix,W=N[O].suffix,q=N[O].transform,Z=q<w?0:q-(w-1),Q=0,ce=D,re;Z>B&&(Z=B);for(var fe=0;fe<V.length;)F[D++]=V[fe++];for(z+=Z,B-=Z,q<=b&&(B-=q),Q=0;Q<B;Q++)F[D++]=s.dictionary[z+Q];if(re=D-B,q===_)L(F,re);else if(q===y)for(;B>0;){var pe=L(F,re);re+=pe,B-=pe}for(var $=0;$<W.length;)F[D++]=W[$++];return D-ce}},{"./dictionary":6}],12:[function(o,n,i){n.exports=o("./dec/decode").BrotliDecompressBuffer},{"./dec/decode":3}]},{},[12])(12)})();var TM=(e=>typeof oa<"u"?oa:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof oa<"u"?oa:t)[r]}):e)(function(e){if(typeof oa<"u")return oa.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),pbe=(function(){var e,t,r;return(function(){function o(n,i,s){function l(d,f){if(!i[d]){if(!n[d]){var m=typeof TM=="function"&&TM;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 b=n[d][1][v];return l(b||v)},g,g.exports,o,n,i,s)}return i[d].exports}for(var c=typeof TM=="function"&&TM,u=0;u<s.length;u++)l(s[u]);return l}return o})()({1:[function(o,n,i){"use strict";var s=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,b;for(h=0,f=0,m=d.length;f<m;f++)h+=d[f].length;for(b=new Uint8Array(h),g=0,f=0,m=d.length;f<m;f++)v=d[f],b.set(v,g),g+=v.length;return b}},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(s)},{}],2:[function(o,n,i){"use strict";var s=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 s.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,b,_,y=m.length,w=0;for(b=0;b<y;b++)g=m.charCodeAt(b),(g&64512)===55296&&b+1<y&&(v=m.charCodeAt(b+1),(v&64512)===56320&&(g=65536+(g-55296<<10)+(v-56320),b++)),w+=g<128?1:g<2048?2:g<65536?3:4;for(h=new s.Buf8(w),_=0,b=0;_<w;b++)g=m.charCodeAt(b),(g&64512)===55296&&b+1<y&&(v=m.charCodeAt(b+1),(v&64512)===56320&&(g=65536+(g-55296<<10)+(v-56320),b++)),g<128?h[_++]=g:g<2048?(h[_++]=192|g>>>6,h[_++]=128|g&63):g<65536?(h[_++]=224|g>>>12,h[_++]=128|g>>>6&63,h[_++]=128|g&63):(h[_++]=240|g>>>18,h[_++]=128|g>>>12&63,h[_++]=128|g>>>6&63,h[_++]=128|g&63);return h};function f(m,h){if(h<65534&&(m.subarray&&c||!m.subarray&&l))return String.fromCharCode.apply(null,s.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 s.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,b,_,y=h||m.length,w=new Array(y*2);for(v=0,g=0;g<y;){if(b=m[g++],b<128){w[v++]=b;continue}if(_=u[b],_>4){w[v++]=65533,g+=_-1;continue}for(b&=_===2?31:_===3?15:7;_>1&&g<y;)b=b<<6|m[g++]&63,_--;if(_>1){w[v++]=65533;continue}b<65536?w[v++]=b:(b-=65536,w[v++]=55296|b>>10&1023,w[v++]=56320|b&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 s(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=s},{}],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 s(){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=s();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 s(){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=s},{}],7:[function(o,n,i){"use strict";var s=30,l=12;n.exports=function(u,d){var f,m,h,g,v,b,_,y,w,S,x,C,A,k,R,M,P,T,N,L,F,D,z,B,O;f=u.state,m=u.next_in,B=u.input,h=m+(u.avail_in-5),g=u.next_out,O=u.output,v=g-(d-u.avail_out),b=g+(u.avail_out-257),_=f.dmax,y=f.wsize,w=f.whave,S=f.wnext,x=f.window,C=f.hold,A=f.bits,k=f.lencode,R=f.distcode,M=(1<<f.lenbits)-1,P=(1<<f.distbits)-1;e:do{A<15&&(C+=B[m++]<<A,A+=8,C+=B[m++]<<A,A+=8),T=k[C&M];t:for(;;){if(N=T>>>24,C>>>=N,A-=N,N=T>>>16&255,N===0)O[g++]=T&65535;else if(N&16){L=T&65535,N&=15,N&&(A<N&&(C+=B[m++]<<A,A+=8),L+=C&(1<<N)-1,C>>>=N,A-=N),A<15&&(C+=B[m++]<<A,A+=8,C+=B[m++]<<A,A+=8),T=R[C&P];r:for(;;){if(N=T>>>24,C>>>=N,A-=N,N=T>>>16&255,N&16){if(F=T&65535,N&=15,A<N&&(C+=B[m++]<<A,A+=8,A<N&&(C+=B[m++]<<A,A+=8)),F+=C&(1<<N)-1,F>_){u.msg="invalid distance too far back",f.mode=s;break e}if(C>>>=N,A-=N,N=g-v,F>N){if(N=F-N,N>w&&f.sane){u.msg="invalid distance too far back",f.mode=s;break e}if(D=0,z=x,S===0){if(D+=y-N,N<L){L-=N;do O[g++]=x[D++];while(--N);D=g-F,z=O}}else if(S<N){if(D+=y+S-N,N-=S,N<L){L-=N;do O[g++]=x[D++];while(--N);if(D=0,S<L){N=S,L-=N;do O[g++]=x[D++];while(--N);D=g-F,z=O}}}else if(D+=S-N,N<L){L-=N;do O[g++]=x[D++];while(--N);D=g-F,z=O}for(;L>2;)O[g++]=z[D++],O[g++]=z[D++],O[g++]=z[D++],L-=3;L&&(O[g++]=z[D++],L>1&&(O[g++]=z[D++]))}else{D=g-F;do O[g++]=O[D++],O[g++]=O[D++],O[g++]=O[D++],L-=3;while(L>2);L&&(O[g++]=O[D++],L>1&&(O[g++]=O[D++]))}}else if((N&64)===0){T=R[(T&65535)+(C&(1<<N)-1)];continue r}else{u.msg="invalid distance code",f.mode=s;break e}break}}else if((N&64)===0){T=k[(T&65535)+(C&(1<<N)-1)];continue t}else if(N&32){f.mode=l;break e}else{u.msg="invalid literal/length code",f.mode=s;break e}break}}while(m<h&&g<b);L=A>>3,m-=L,A-=L<<3,C&=(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<b?257+(b-g):257-(g-b),f.hold=C,f.bits=A}},{}],8:[function(o,n,i){"use strict";var s=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,b=6,_=0,y=1,w=2,S=-2,x=-3,C=-4,A=-5,k=8,R=1,M=2,P=3,T=4,N=5,L=6,F=7,D=8,z=9,B=10,O=11,V=12,W=13,q=14,Z=15,Q=16,ce=17,re=18,fe=19,pe=20,$=21,te=22,de=23,ve=24,we=25,oe=26,ee=27,ue=28,ie=29,le=30,Oe=31,ke=32,Me=852,Ne=592,Fe=15,X=Fe;function ge(ne){return(ne>>>24&255)+(ne>>>8&65280)+((ne&65280)<<8)+((ne&255)<<24)}function Ue(){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 s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Ye(ne){var xe;return!ne||!ne.state?S:(xe=ne.state,ne.total_in=ne.total_out=xe.total=0,ne.msg="",xe.wrap&&(ne.adler=xe.wrap&1),xe.mode=R,xe.last=0,xe.havedict=0,xe.dmax=32768,xe.head=null,xe.hold=0,xe.bits=0,xe.lencode=xe.lendyn=new s.Buf32(Me),xe.distcode=xe.distdyn=new s.Buf32(Ne),xe.sane=1,xe.back=-1,_)}function st(ne){var xe;return!ne||!ne.state?S:(xe=ne.state,xe.wsize=0,xe.whave=0,xe.wnext=0,Ye(ne))}function St(ne,xe){var H,Pe;return!ne||!ne.state||(Pe=ne.state,xe<0?(H=0,xe=-xe):(H=(xe>>4)+1,xe<48&&(xe&=15)),xe&&(xe<8||xe>15))?S:(Pe.window!==null&&Pe.wbits!==xe&&(Pe.window=null),Pe.wrap=H,Pe.wbits=xe,st(ne))}function dt(ne,xe){var H,Pe;return ne?(Pe=new Ue,ne.state=Pe,Pe.window=null,H=St(ne,xe),H!==_&&(ne.state=null),H):S}function xt(ne){return dt(ne,X)}var Xt=!0,Xe,fs;function Ga(ne){if(Xt){var xe;for(Xe=new s.Buf32(512),fs=new s.Buf32(32),xe=0;xe<144;)ne.lens[xe++]=8;for(;xe<256;)ne.lens[xe++]=9;for(;xe<280;)ne.lens[xe++]=7;for(;xe<288;)ne.lens[xe++]=8;for(d(m,ne.lens,0,288,Xe,0,ne.work,{bits:9}),xe=0;xe<32;)ne.lens[xe++]=5;d(h,ne.lens,0,32,fs,0,ne.work,{bits:5}),Xt=!1}ne.lencode=Xe,ne.lenbits=9,ne.distcode=fs,ne.distbits=5}function kr(ne,xe,H,Pe){var Vt,Ee=ne.state;return Ee.window===null&&(Ee.wsize=1<<Ee.wbits,Ee.wnext=0,Ee.whave=0,Ee.window=new s.Buf8(Ee.wsize)),Pe>=Ee.wsize?(s.arraySet(Ee.window,xe,H-Ee.wsize,Ee.wsize,0),Ee.wnext=0,Ee.whave=Ee.wsize):(Vt=Ee.wsize-Ee.wnext,Vt>Pe&&(Vt=Pe),s.arraySet(Ee.window,xe,H-Pe,Vt,Ee.wnext),Pe-=Vt,Pe?(s.arraySet(Ee.window,xe,H-Pe,Pe,0),Ee.wnext=Pe,Ee.whave=Ee.wsize):(Ee.wnext+=Vt,Ee.wnext===Ee.wsize&&(Ee.wnext=0),Ee.whave<Ee.wsize&&(Ee.whave+=Vt))),0}function Oi(ne,xe){var H,Pe,Vt,Ee,Ro,Ie,mr,me,he,ea,Wt,ze,Ce,it,ht=0,bt,Rr,Gr,ro,vf,cv,go,ps,Ao=new s.Buf8(4),ms,ta,f0=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!ne||!ne.state||!ne.output||!ne.input&&ne.avail_in!==0)return S;H=ne.state,H.mode===V&&(H.mode=W),Ro=ne.next_out,Vt=ne.output,mr=ne.avail_out,Ee=ne.next_in,Pe=ne.input,Ie=ne.avail_in,me=H.hold,he=H.bits,ea=Ie,Wt=mr,ps=_;e:for(;;)switch(H.mode){case R:if(H.wrap===0){H.mode=W;break}for(;he<16;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}if(H.wrap&2&&me===35615){H.check=0,Ao[0]=me&255,Ao[1]=me>>>8&255,H.check=c(H.check,Ao,2,0),me=0,he=0,H.mode=M;break}if(H.flags=0,H.head&&(H.head.done=!1),!(H.wrap&1)||(((me&255)<<8)+(me>>8))%31){ne.msg="incorrect header check",H.mode=le;break}if((me&15)!==k){ne.msg="unknown compression method",H.mode=le;break}if(me>>>=4,he-=4,go=(me&15)+8,H.wbits===0)H.wbits=go;else if(go>H.wbits){ne.msg="invalid window size",H.mode=le;break}H.dmax=1<<go,ne.adler=H.check=1,H.mode=me&512?B:V,me=0,he=0;break;case M:for(;he<16;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}if(H.flags=me,(H.flags&255)!==k){ne.msg="unknown compression method",H.mode=le;break}if(H.flags&57344){ne.msg="unknown header flags set",H.mode=le;break}H.head&&(H.head.text=me>>8&1),H.flags&512&&(Ao[0]=me&255,Ao[1]=me>>>8&255,H.check=c(H.check,Ao,2,0)),me=0,he=0,H.mode=P;case P:for(;he<32;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}H.head&&(H.head.time=me),H.flags&512&&(Ao[0]=me&255,Ao[1]=me>>>8&255,Ao[2]=me>>>16&255,Ao[3]=me>>>24&255,H.check=c(H.check,Ao,4,0)),me=0,he=0,H.mode=T;case T:for(;he<16;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}H.head&&(H.head.xflags=me&255,H.head.os=me>>8),H.flags&512&&(Ao[0]=me&255,Ao[1]=me>>>8&255,H.check=c(H.check,Ao,2,0)),me=0,he=0,H.mode=N;case N:if(H.flags&1024){for(;he<16;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}H.length=me,H.head&&(H.head.extra_len=me),H.flags&512&&(Ao[0]=me&255,Ao[1]=me>>>8&255,H.check=c(H.check,Ao,2,0)),me=0,he=0}else H.head&&(H.head.extra=null);H.mode=L;case L:if(H.flags&1024&&(ze=H.length,ze>Ie&&(ze=Ie),ze&&(H.head&&(go=H.head.extra_len-H.length,H.head.extra||(H.head.extra=new Array(H.head.extra_len)),s.arraySet(H.head.extra,Pe,Ee,ze,go)),H.flags&512&&(H.check=c(H.check,Pe,ze,Ee)),Ie-=ze,Ee+=ze,H.length-=ze),H.length))break e;H.length=0,H.mode=F;case F:if(H.flags&2048){if(Ie===0)break e;ze=0;do go=Pe[Ee+ze++],H.head&&go&&H.length<65536&&(H.head.name+=String.fromCharCode(go));while(go&&ze<Ie);if(H.flags&512&&(H.check=c(H.check,Pe,ze,Ee)),Ie-=ze,Ee+=ze,go)break e}else H.head&&(H.head.name=null);H.length=0,H.mode=D;case D:if(H.flags&4096){if(Ie===0)break e;ze=0;do go=Pe[Ee+ze++],H.head&&go&&H.length<65536&&(H.head.comment+=String.fromCharCode(go));while(go&&ze<Ie);if(H.flags&512&&(H.check=c(H.check,Pe,ze,Ee)),Ie-=ze,Ee+=ze,go)break e}else H.head&&(H.head.comment=null);H.mode=z;case z:if(H.flags&512){for(;he<16;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}if(me!==(H.check&65535)){ne.msg="header crc mismatch",H.mode=le;break}me=0,he=0}H.head&&(H.head.hcrc=H.flags>>9&1,H.head.done=!0),ne.adler=H.check=0,H.mode=V;break;case B:for(;he<32;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}ne.adler=H.check=ge(me),me=0,he=0,H.mode=O;case O:if(H.havedict===0)return ne.next_out=Ro,ne.avail_out=mr,ne.next_in=Ee,ne.avail_in=Ie,H.hold=me,H.bits=he,w;ne.adler=H.check=1,H.mode=V;case V:if(xe===v||xe===b)break e;case W:if(H.last){me>>>=he&7,he-=he&7,H.mode=ee;break}for(;he<3;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}switch(H.last=me&1,me>>>=1,he-=1,me&3){case 0:H.mode=q;break;case 1:if(Ga(H),H.mode=pe,xe===b){me>>>=2,he-=2;break e}break;case 2:H.mode=ce;break;case 3:ne.msg="invalid block type",H.mode=le}me>>>=2,he-=2;break;case q:for(me>>>=he&7,he-=he&7;he<32;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}if((me&65535)!==(me>>>16^65535)){ne.msg="invalid stored block lengths",H.mode=le;break}if(H.length=me&65535,me=0,he=0,H.mode=Z,xe===b)break e;case Z:H.mode=Q;case Q:if(ze=H.length,ze){if(ze>Ie&&(ze=Ie),ze>mr&&(ze=mr),ze===0)break e;s.arraySet(Vt,Pe,Ee,ze,Ro),Ie-=ze,Ee+=ze,mr-=ze,Ro+=ze,H.length-=ze;break}H.mode=V;break;case ce:for(;he<14;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}if(H.nlen=(me&31)+257,me>>>=5,he-=5,H.ndist=(me&31)+1,me>>>=5,he-=5,H.ncode=(me&15)+4,me>>>=4,he-=4,H.nlen>286||H.ndist>30){ne.msg="too many length or distance symbols",H.mode=le;break}H.have=0,H.mode=re;case re:for(;H.have<H.ncode;){for(;he<3;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}H.lens[f0[H.have++]]=me&7,me>>>=3,he-=3}for(;H.have<19;)H.lens[f0[H.have++]]=0;if(H.lencode=H.lendyn,H.lenbits=7,ms={bits:H.lenbits},ps=d(f,H.lens,0,19,H.lencode,0,H.work,ms),H.lenbits=ms.bits,ps){ne.msg="invalid code lengths set",H.mode=le;break}H.have=0,H.mode=fe;case fe:for(;H.have<H.nlen+H.ndist;){for(;ht=H.lencode[me&(1<<H.lenbits)-1],bt=ht>>>24,Rr=ht>>>16&255,Gr=ht&65535,!(bt<=he);){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}if(Gr<16)me>>>=bt,he-=bt,H.lens[H.have++]=Gr;else{if(Gr===16){for(ta=bt+2;he<ta;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}if(me>>>=bt,he-=bt,H.have===0){ne.msg="invalid bit length repeat",H.mode=le;break}go=H.lens[H.have-1],ze=3+(me&3),me>>>=2,he-=2}else if(Gr===17){for(ta=bt+3;he<ta;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}me>>>=bt,he-=bt,go=0,ze=3+(me&7),me>>>=3,he-=3}else{for(ta=bt+7;he<ta;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}me>>>=bt,he-=bt,go=0,ze=11+(me&127),me>>>=7,he-=7}if(H.have+ze>H.nlen+H.ndist){ne.msg="invalid bit length repeat",H.mode=le;break}for(;ze--;)H.lens[H.have++]=go}}if(H.mode===le)break;if(H.lens[256]===0){ne.msg="invalid code -- missing end-of-block",H.mode=le;break}if(H.lenbits=9,ms={bits:H.lenbits},ps=d(m,H.lens,0,H.nlen,H.lencode,0,H.work,ms),H.lenbits=ms.bits,ps){ne.msg="invalid literal/lengths set",H.mode=le;break}if(H.distbits=6,H.distcode=H.distdyn,ms={bits:H.distbits},ps=d(h,H.lens,H.nlen,H.ndist,H.distcode,0,H.work,ms),H.distbits=ms.bits,ps){ne.msg="invalid distances set",H.mode=le;break}if(H.mode=pe,xe===b)break e;case pe:H.mode=$;case $:if(Ie>=6&&mr>=258){ne.next_out=Ro,ne.avail_out=mr,ne.next_in=Ee,ne.avail_in=Ie,H.hold=me,H.bits=he,u(ne,Wt),Ro=ne.next_out,Vt=ne.output,mr=ne.avail_out,Ee=ne.next_in,Pe=ne.input,Ie=ne.avail_in,me=H.hold,he=H.bits,H.mode===V&&(H.back=-1);break}for(H.back=0;ht=H.lencode[me&(1<<H.lenbits)-1],bt=ht>>>24,Rr=ht>>>16&255,Gr=ht&65535,!(bt<=he);){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}if(Rr&&(Rr&240)===0){for(ro=bt,vf=Rr,cv=Gr;ht=H.lencode[cv+((me&(1<<ro+vf)-1)>>ro)],bt=ht>>>24,Rr=ht>>>16&255,Gr=ht&65535,!(ro+bt<=he);){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}me>>>=ro,he-=ro,H.back+=ro}if(me>>>=bt,he-=bt,H.back+=bt,H.length=Gr,Rr===0){H.mode=oe;break}if(Rr&32){H.back=-1,H.mode=V;break}if(Rr&64){ne.msg="invalid literal/length code",H.mode=le;break}H.extra=Rr&15,H.mode=te;case te:if(H.extra){for(ta=H.extra;he<ta;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}H.length+=me&(1<<H.extra)-1,me>>>=H.extra,he-=H.extra,H.back+=H.extra}H.was=H.length,H.mode=de;case de:for(;ht=H.distcode[me&(1<<H.distbits)-1],bt=ht>>>24,Rr=ht>>>16&255,Gr=ht&65535,!(bt<=he);){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}if((Rr&240)===0){for(ro=bt,vf=Rr,cv=Gr;ht=H.distcode[cv+((me&(1<<ro+vf)-1)>>ro)],bt=ht>>>24,Rr=ht>>>16&255,Gr=ht&65535,!(ro+bt<=he);){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}me>>>=ro,he-=ro,H.back+=ro}if(me>>>=bt,he-=bt,H.back+=bt,Rr&64){ne.msg="invalid distance code",H.mode=le;break}H.offset=Gr,H.extra=Rr&15,H.mode=ve;case ve:if(H.extra){for(ta=H.extra;he<ta;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}H.offset+=me&(1<<H.extra)-1,me>>>=H.extra,he-=H.extra,H.back+=H.extra}if(H.offset>H.dmax){ne.msg="invalid distance too far back",H.mode=le;break}H.mode=we;case we:if(mr===0)break e;if(ze=Wt-mr,H.offset>ze){if(ze=H.offset-ze,ze>H.whave&&H.sane){ne.msg="invalid distance too far back",H.mode=le;break}ze>H.wnext?(ze-=H.wnext,Ce=H.wsize-ze):Ce=H.wnext-ze,ze>H.length&&(ze=H.length),it=H.window}else it=Vt,Ce=Ro-H.offset,ze=H.length;ze>mr&&(ze=mr),mr-=ze,H.length-=ze;do Vt[Ro++]=it[Ce++];while(--ze);H.length===0&&(H.mode=$);break;case oe:if(mr===0)break e;Vt[Ro++]=H.length,mr--,H.mode=$;break;case ee:if(H.wrap){for(;he<32;){if(Ie===0)break e;Ie--,me|=Pe[Ee++]<<he,he+=8}if(Wt-=mr,ne.total_out+=Wt,H.total+=Wt,Wt&&(ne.adler=H.check=H.flags?c(H.check,Vt,Wt,Ro-Wt):l(H.check,Vt,Wt,Ro-Wt)),Wt=mr,(H.flags?me:ge(me))!==H.check){ne.msg="incorrect data check",H.mode=le;break}me=0,he=0}H.mode=ue;case ue:if(H.wrap&&H.flags){for(;he<32;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}if(me!==(H.total&4294967295)){ne.msg="incorrect length check",H.mode=le;break}me=0,he=0}H.mode=ie;case ie:ps=y;break e;case le:ps=x;break e;case Oe:return C;case ke:default:return S}return ne.next_out=Ro,ne.avail_out=mr,ne.next_in=Ee,ne.avail_in=Ie,H.hold=me,H.bits=he,(H.wsize||Wt!==ne.avail_out&&H.mode<le&&(H.mode<ee||xe!==g))&&kr(ne,ne.output,ne.next_out,Wt-ne.avail_out)?(H.mode=Oe,C):(ea-=ne.avail_in,Wt-=ne.avail_out,ne.total_in+=ea,ne.total_out+=Wt,H.total+=Wt,H.wrap&&Wt&&(ne.adler=H.check=H.flags?c(H.check,Vt,Wt,ne.next_out-Wt):l(H.check,Vt,Wt,ne.next_out-Wt)),ne.data_type=H.bits+(H.last?64:0)+(H.mode===V?128:0)+(H.mode===pe||H.mode===Z?256:0),(ea===0&&Wt===0||xe===g)&&ps===_&&(ps=A),ps)}function an(ne){if(!ne||!ne.state)return S;var xe=ne.state;return xe.window&&(xe.window=null),ne.state=null,_}function vt(ne,xe){var H;return!ne||!ne.state||(H=ne.state,(H.wrap&2)===0)?S:(H.head=xe,xe.done=!1,_)}function Ft(ne,xe){var H=xe.length,Pe,Vt,Ee;return!ne||!ne.state||(Pe=ne.state,Pe.wrap!==0&&Pe.mode!==O)?S:Pe.mode===O&&(Vt=1,Vt=l(Vt,xe,H,0),Vt!==Pe.check)?x:(Ee=kr(ne,xe,H,H),Ee?(Pe.mode=Oe,C):(Pe.havedict=1,_))}i.inflateReset=st,i.inflateReset2=St,i.inflateResetKeep=Ye,i.inflateInit=xt,i.inflateInit2=dt,i.inflate=Oi,i.inflateEnd=an,i.inflateGetHeader=vt,i.inflateSetDictionary=Ft,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 s=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],b=[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(y,w,S,x,C,A,k,R){var M=R.bits,P=0,T=0,N=0,L=0,F=0,D=0,z=0,B=0,O=0,V=0,W,q,Z,Q,ce,re=null,fe=0,pe,$=new s.Buf16(l+1),te=new s.Buf16(l+1),de=null,ve=0,we,oe,ee;for(P=0;P<=l;P++)$[P]=0;for(T=0;T<x;T++)$[w[S+T]]++;for(F=M,L=l;L>=1&&$[L]===0;L--);if(F>L&&(F=L),L===0)return C[A++]=1<<24|64<<16|0,C[A++]=1<<24|64<<16|0,R.bits=1,0;for(N=1;N<L&&$[N]===0;N++);for(F<N&&(F=N),B=1,P=1;P<=l;P++)if(B<<=1,B-=$[P],B<0)return-1;if(B>0&&(y===d||L!==1))return-1;for(te[1]=0,P=1;P<l;P++)te[P+1]=te[P]+$[P];for(T=0;T<x;T++)w[S+T]!==0&&(k[te[w[S+T]]++]=T);if(y===d?(re=de=k,pe=19):y===f?(re=h,fe-=257,de=g,ve-=257,pe=256):(re=v,de=b,pe=-1),V=0,T=0,P=N,ce=A,D=F,z=0,Z=-1,O=1<<F,Q=O-1,y===f&&O>c||y===m&&O>u)return 1;for(;;){we=P-z,k[T]<pe?(oe=0,ee=k[T]):k[T]>pe?(oe=de[ve+k[T]],ee=re[fe+k[T]]):(oe=96,ee=0),W=1<<P-z,q=1<<D,N=q;do q-=W,C[ce+(V>>z)+q]=we<<24|oe<<16|ee|0;while(q!==0);for(W=1<<P-1;V&W;)W>>=1;if(W!==0?(V&=W-1,V+=W):V=0,T++,--$[P]===0){if(P===L)break;P=w[S+k[T]]}if(P>F&&(V&Q)!==Z){for(z===0&&(z=F),ce+=N,D=P-z,B=1<<D;D+z<L&&(B-=$[D+z],!(B<=0));)D++,B<<=1;if(O+=1<<D,y===f&&O>c||y===m&&O>u)return 1;Z=V&Q,C[Z]=F<<24|D<<16|ce-A|0}}return V!==0&&(C[ce+V]=P-z<<24|64<<16|0),R.bits=F,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 s(){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=s},{}],"/lib/inflate.js":[function(o,n,i){"use strict";var s=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(_){if(!(this instanceof g))return new g(_);this.options=l.assign({chunkSize:16384,windowBits:0,to:""},_||{});var y=this.options;y.raw&&y.windowBits>=0&&y.windowBits<16&&(y.windowBits=-y.windowBits,y.windowBits===0&&(y.windowBits=-15)),y.windowBits>=0&&y.windowBits<16&&!(_&&_.windowBits)&&(y.windowBits+=32),y.windowBits>15&&y.windowBits<48&&(y.windowBits&15)===0&&(y.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var w=s.inflateInit2(this.strm,y.windowBits);if(w!==u.Z_OK)throw new Error(d[w]);if(this.header=new m,s.inflateGetHeader(this.strm,this.header),y.dictionary&&(typeof y.dictionary=="string"?y.dictionary=c.string2buf(y.dictionary):h.call(y.dictionary)==="[object ArrayBuffer]"&&(y.dictionary=new Uint8Array(y.dictionary)),y.raw&&(w=s.inflateSetDictionary(this.strm,y.dictionary),w!==u.Z_OK)))throw new Error(d[w])}g.prototype.push=function(_,y){var w=this.strm,S=this.options.chunkSize,x=this.options.dictionary,C,A,k,R,M,P=!1;if(this.ended)return!1;A=y===~~y?y:y===!0?u.Z_FINISH:u.Z_NO_FLUSH,typeof _=="string"?w.input=c.binstring2buf(_):h.call(_)==="[object ArrayBuffer]"?w.input=new Uint8Array(_):w.input=_,w.next_in=0,w.avail_in=w.input.length;do{if(w.avail_out===0&&(w.output=new l.Buf8(S),w.next_out=0,w.avail_out=S),C=s.inflate(w,u.Z_NO_FLUSH),C===u.Z_NEED_DICT&&x&&(C=s.inflateSetDictionary(this.strm,x)),C===u.Z_BUF_ERROR&&P===!0&&(C=u.Z_OK,P=!1),C!==u.Z_STREAM_END&&C!==u.Z_OK)return this.onEnd(C),this.ended=!0,!1;w.next_out&&(w.avail_out===0||C===u.Z_STREAM_END||w.avail_in===0&&(A===u.Z_FINISH||A===u.Z_SYNC_FLUSH))&&(this.options.to==="string"?(k=c.utf8border(w.output,w.next_out),R=w.next_out-k,M=c.buf2string(w.output,k),w.next_out=R,w.avail_out=S-R,R&&l.arraySet(w.output,w.output,k,R,0),this.onData(M)):this.onData(l.shrinkBuf(w.output,w.next_out))),w.avail_in===0&&w.avail_out===0&&(P=!0)}while((w.avail_in>0||w.avail_out===0)&&C!==u.Z_STREAM_END);return C===u.Z_STREAM_END&&(A=u.Z_FINISH),A===u.Z_FINISH?(C=s.inflateEnd(this.strm),this.onEnd(C),this.ended=!0,C===u.Z_OK):(A===u.Z_SYNC_FLUSH&&(this.onEnd(u.Z_OK),w.avail_out=0),!0)},g.prototype.onData=function(_){this.chunks.push(_)},g.prototype.onEnd=function(_){_===u.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=_,this.msg=this.strm.msg};function v(_,y){var w=new g(y);if(w.push(_,!0),w.err)throw w.msg||d[w.err];return w.result}function b(_,y){return y=y||{},y.raw=!0,v(_,y)}i.Inflate=g,i.inflate=v,i.inflateRaw=b,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 BQt=globalThis.fetch,EM=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]`}},jZe=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)}},zZe=new Date("1904-01-01T00:00:00+0000").getTime();function HZe(e){return Array.from(e).map(t=>String.fromCharCode(t)).join("")}var UZe=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 HZe([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(zZe+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}},To=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()}},yt=class extends To{constructor(e,t,r){let{parser:o,start:n}=super(new UZe(e,t,r));Object.defineProperty(this,"p",{enumerable:!1,get:()=>o}),Object.defineProperty(this,"tableStart",{enumerable:!1,get:()=>n})}};function je(e,t,r){let o;Object.defineProperty(e,t,{get:()=>o||(o=r(),o),enumerable:!0})}var WZe=class extends yt{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 GZe(o)),this.tables={},this.directory.forEach(n=>{let i=()=>r(this.tables,{tag:n.tag,offset:n.offset,length:n.length},t);je(this.tables,n.tag.trim(),i)})}},GZe=class{constructor(e){this.tag=e.tag,this.checksum=e.uint32,this.offset=e.uint32,this.length=e.uint32}},mbe=pbe.inflate||void 0,hbe=void 0,YZe=class extends yt{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 qZe(o)),KZe(this,t,r)}},qZe=class{constructor(e){this.tag=e.tag,this.offset=e.uint32,this.compLength=e.uint32,this.origLength=e.uint32,this.origChecksum=e.uint32}};function KZe(e,t,r){e.tables={},e.directory.forEach(o=>{je(e.tables,o.tag.trim(),()=>{let n=0,i=t;if(o.compLength!==o.origLength){let s=t.buffer.slice(o.offset,o.offset+o.compLength),l;if(mbe)l=mbe(new Uint8Array(s));else if(hbe)l=hbe(new Uint8Array(s));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 gbe=fbe,vbe=void 0,ZZe=class extends yt{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 XZe(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,s=t.buffer.slice(n);if(gbe)i=gbe(new Uint8Array(s));else if(vbe)i=new Uint8Array(vbe(s));else{let l="no brotli decoder available to decode WOFF2 font";throw e.onerror&&e.onerror(l),new Error(l)}QZe(this,i,r)}},XZe=class{constructor(e){this.flags=e.uint8;let t=this.tagNumber=this.flags&63;t===63?this.tag=e.tag:this.tag=JZe(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 QZe(e,t,r){e.tables={},e.directory.forEach(o=>{je(e.tables,o.tag.trim(),()=>{let n=o.offset,i=n+(o.transformLength?o.transformLength:o.origLength),s=new DataView(t.slice(n,i).buffer);try{return r(e.tables,{tag:o.tag,offset:0,length:o.origLength},s)}catch(l){console.error(l)}})})}function JZe(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 Cbe={},Tbe=!1;Promise.all([Promise.resolve().then(function(){return EXe}),Promise.resolve().then(function(){return kXe}),Promise.resolve().then(function(){return AXe}),Promise.resolve().then(function(){return NXe}),Promise.resolve().then(function(){return FXe}),Promise.resolve().then(function(){return jXe}),Promise.resolve().then(function(){return HXe}),Promise.resolve().then(function(){return WXe}),Promise.resolve().then(function(){return eQe}),Promise.resolve().then(function(){return dQe}),Promise.resolve().then(function(){return JQe}),Promise.resolve().then(function(){return eJe}),Promise.resolve().then(function(){return nJe}),Promise.resolve().then(function(){return lJe}),Promise.resolve().then(function(){return uJe}),Promise.resolve().then(function(){return fJe}),Promise.resolve().then(function(){return hJe}),Promise.resolve().then(function(){return vJe}),Promise.resolve().then(function(){return yJe}),Promise.resolve().then(function(){return _Je}),Promise.resolve().then(function(){return xJe}),Promise.resolve().then(function(){return TJe}),Promise.resolve().then(function(){return kJe}),Promise.resolve().then(function(){return IJe}),Promise.resolve().then(function(){return OJe}),Promise.resolve().then(function(){return MJe}),Promise.resolve().then(function(){return DJe}),Promise.resolve().then(function(){return BJe}),Promise.resolve().then(function(){return jJe}),Promise.resolve().then(function(){return UJe}),Promise.resolve().then(function(){return ZJe}),Promise.resolve().then(function(){return $Je}),Promise.resolve().then(function(){return r$e}),Promise.resolve().then(function(){return s$e}),Promise.resolve().then(function(){return l$e}),Promise.resolve().then(function(){return u$e}),Promise.resolve().then(function(){return p$e}),Promise.resolve().then(function(){return h$e}),Promise.resolve().then(function(){return w$e}),Promise.resolve().then(function(){return S$e}),Promise.resolve().then(function(){return T$e})]).then(e=>{e.forEach(t=>{let r=Object.keys(t)[0];Cbe[r]=t[r]}),Tbe=!0});function $Ze(e,t,r){let o=t.tag.replace(/[^\w\d]/g,""),n=Cbe[o];return n?new n(t,r,e):(console.warn(`lib-font has no definition for ${o}. The table was skipped.`),{})}function eXe(){let e=0;function t(r,o){if(!Tbe)return e>10?o(new Error("loading took too long")):(e++,setTimeout(()=>t(r),250));r($Ze)}return new Promise((r,o)=>t(r))}function tXe(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 rXe(e,t,r={}){if(!globalThis.document)return;let o=tXe(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(([s,l])=>`${s}: ${l};`)),n.textContent=`
@font-face {
    font-family: "${e}";
    ${i.join(`
	`)}
    src: url("${t}") format("${o}");
}`,globalThis.document.head.appendChild(n),n}var oXe=[0,1,0,0],nXe=[79,84,84,79],iXe=[119,79,70,70],sXe=[119,79,70,50];function PM(e,t){if(e.length===t.length){for(let r=0;r<e.length;r++)if(e[r]!==t[r])return;return!0}}function aXe(e){let t=[e.getUint8(0),e.getUint8(1),e.getUint8(2),e.getUint8(3)];if(PM(t,oXe)||PM(t,nXe))return"SFNT";if(PM(t,iXe))return"WOFF";if(PM(t,sXe))return"WOFF2"}function lXe(e){if(!e.ok)throw new Error(`HTTP ${e.status} - ${e.statusText}`);return e}var RM=class extends jZe{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 rXe(this.name,e,this.options),this.loadFont(e)))()}async loadFont(e,t){fetch(e).then(r=>lXe(r)&&r.arrayBuffer()).then(r=>this.fromDataBuffer(r,t||e)).catch(r=>{let o=new EM("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=aXe(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 EM("load",{font:this});this.dispatch(o),this.onload&&this.onload(o)}async parseBasicData(e){return eXe().then(t=>(e==="SFNT"&&(this.opentype=new WZe(this,this.fontData,t)),e==="WOFF"&&(this.opentype=new YZe(this,this.fontData,t)),e==="WOFF2"&&(this.opentype=new ZZe(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 EM("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 EM("load",{font:this});this.dispatch(e),this.onload&&this.onload(e)}}};globalThis.Font=RM;var Sp=class extends To{constructor(e,t,r){super(e),this.plaformID=t,this.encodingID=r}},cXe=class extends Sp{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}]}},uXe=class extends Sp{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(s=>e.uint16);let o=Math.max(...this.subHeaderKeys),n=e.currentPosition;je(this,"subHeaders",()=>(e.currentPosition=n,[...new Array(o)].map(s=>new dXe(e))));let i=n+o*8;je(this,"glyphIndexArray",()=>(e.currentPosition=i,[...new Array(o)].map(s=>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,s=i+n.entryCount;return i<=t&&t<=s}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}))}},dXe=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}},fXe=class extends Sp{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;je(this,"endCode",()=>e.readBytes(this.segCount,o,16));let n=o+2+this.segCountX2;je(this,"startCode",()=>e.readBytes(this.segCount,n,16));let i=n+this.segCountX2;je(this,"idDelta",()=>e.readBytes(this.segCount,i,16,!0));let s=i+this.segCountX2;je(this,"idRangeOffset",()=>e.readBytes(this.segCount,s,16));let l=s+this.segCountX2,c=this.length-(l-this.tableStart);je(this,"glyphIdArray",()=>e.readBytes(c,l,16)),je(this,"segments",()=>this.buildSegments(s,l,e))}buildSegments(e,t,r){let o=(n,i)=>{let s=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=s+c,h=l+c;m<=h;m++)f.push(m);else for(let m=0,h=l-s;m<=h;m++)r.currentPosition=d+u+m*2,f.push(r.uint16);return{startCode:s,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}))}},pXe=class extends Sp{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,je(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}]}},mXe=class extends Sp{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,je(this,"groups",()=>[...new Array(this.numGroups)].map(n=>new hXe(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}))}},hXe=class{constructor(e){this.startcharCode=e.uint32,this.endcharCode=e.uint32,this.startGlyphID=e.uint32}},gXe=class extends Sp{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,je(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}]}},vXe=class extends Sp{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,je(this,"groups",()=>[...new Array(this.numGroups)].map(n=>new bXe(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}))}},bXe=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.startGlyphID=e.uint32}},yXe=class extends Sp{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 wXe(e));je(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}))}},wXe=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.glyphID=e.uint32}},_Xe=class extends Sp{constructor(e,t,r){super(e,t,r),this.subTableStart=e.currentPosition,this.format=14,this.length=e.uint32,this.numVarSelectorRecords=e.uint32,je(this,"varSelectors",()=>[...new Array(this.numVarSelectorRecords)].map(o=>new SXe(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)}},SXe=class{constructor(e){this.varSelector=e.uint24,this.defaultUVSOffset=e.Offset32,this.nonDefaultUVSOffset=e.Offset32}};function xXe(e,t,r){let o=e.uint16;return o===0?new cXe(e,t,r):o===2?new uXe(e,t,r):o===4?new fXe(e,t,r):o===6?new pXe(e,t,r):o===8?new mXe(e,t,r):o===10?new gXe(e,t,r):o===12?new vXe(e,t,r):o===13?new yXe(e,t,r):o===14?new _Xe(e,t,r):{}}var CXe=class extends yt{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 TXe(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})}},TXe=class{constructor(e,t){let r=this.platformID=e.uint16,o=this.encodingID=e.uint16,n=this.offset=e.Offset32;je(this,"table",()=>(e.currentPosition=t+n,xXe(e,r,o)))}},EXe=Object.freeze({__proto__:null,cmap:CXe}),PXe=class extends yt{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})}},kXe=Object.freeze({__proto__:null,head:PXe}),RXe=class extends yt{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()}},AXe=Object.freeze({__proto__:null,hhea:RXe}),IXe=class extends yt{constructor(e,t,r){let{p:o}=super(e,t),n=r.hhea.numberOfHMetrics,i=r.maxp.numGlyphs,s=o.currentPosition;if(je(this,"hMetrics",()=>(o.currentPosition=s,[...new Array(n)].map(l=>new OXe(o.uint16,o.int16)))),n<i){let l=s+n*4;je(this,"leftSideBearings",()=>(o.currentPosition=l,[...new Array(i-n)].map(c=>o.int16)))}}},OXe=class{constructor(e,t){this.advanceWidth=e,this.lsb=t}},NXe=Object.freeze({__proto__:null,hmtx:IXe}),MXe=class extends yt{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()}},FXe=Object.freeze({__proto__:null,maxp:MXe}),DXe=class extends yt{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 BXe(r,this)),this.format===1&&(this.langTagCount=r.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map(o=>new LXe(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}},LXe=class{constructor(e,t){this.length=e,this.offset=t}},BXe=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,je(this,"string",()=>(e.currentPosition=t.stringStart+this.offset,VXe(e,this)))}};function VXe(e,t){let{platformID:r,length:o}=t;if(o===0)return"";if(r===0||r===3){let s=[];for(let l=0,c=o/2;l<c;l++)s[l]=String.fromCharCode(e.uint16);return s.join("")}let n=e.readBytes(o),i=[];return n.forEach(function(s,l){i[l]=String.fromCharCode(s)}),i.join("")}var jXe=Object.freeze({__proto__:null,name:DXe}),zXe=class extends yt{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()}},HXe=Object.freeze({__proto__:null,OS2:zXe}),UXe=class extends yt{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]<bbe.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 bbe[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(s=>String.fromCharCode(s)).join(""))}},bbe=[".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"],WXe=Object.freeze({__proto__:null,post:UXe}),GXe=class extends yt{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,je(this,"horizAxis",()=>new tG({offset:e.offset+this.horizAxisOffset},t)),je(this,"vertAxis",()=>new tG({offset:e.offset+this.vertAxisOffset},t)),this.majorVersion===1&&this.minorVersion===1&&(this.itemVarStoreOffset=r.Offset32,je(this,"itemVarStore",()=>new tG({offset:e.offset+this.itemVarStoreOffset},t)))}},tG=class extends yt{constructor(e,t){let{p:r}=super(e,t,"AxisTable");this.baseTagListOffset=r.Offset16,this.baseScriptListOffset=r.Offset16,je(this,"baseTagList",()=>new YXe({offset:e.offset+this.baseTagListOffset},t)),je(this,"baseScriptList",()=>new qXe({offset:e.offset+this.baseScriptListOffset},t))}},YXe=class extends yt{constructor(e,t){let{p:r}=super(e,t,"BaseTagListTable");this.baseTagCount=r.uint16,this.baselineTags=[...new Array(this.baseTagCount)].map(o=>r.tag)}},qXe=class extends yt{constructor(e,t){let{p:r}=super(e,t,"BaseScriptListTable");this.baseScriptCount=r.uint16;let o=r.currentPosition;je(this,"baseScriptRecords",()=>(r.currentPosition=o,[...new Array(this.baseScriptCount)].map(n=>new KXe(this.start,r))))}},KXe=class{constructor(e,t){this.baseScriptTag=t.tag,this.baseScriptOffset=t.Offset16,je(this,"baseScriptTable",()=>(t.currentPosition=e+this.baseScriptOffset,new ZXe(t)))}},ZXe=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 XXe(this.start,e)),je(this,"baseValues",()=>(e.currentPosition=this.start+this.baseValuesOffset,new QXe(e))),je(this,"defaultMinMax",()=>(e.currentPosition=this.start+this.defaultMinMaxOffset,new Ebe(e)))}},XXe=class{constructor(e,t){this.baseLangSysTag=t.tag,this.minMaxOffset=t.Offset16,je(this,"minMax",()=>(t.currentPosition=e+this.minMaxOffset,new Ebe(t)))}},QXe=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 $Xe(this.parser)}},Ebe=class{constructor(e){this.minCoord=e.Offset16,this.maxCoord=e.Offset16,this.featMinMaxCount=e.uint16;let t=e.currentPosition;je(this,"featMinMaxRecords",()=>(e.currentPosition=t,[...new Array(this.featMinMaxCount)].map(r=>new JXe(e))))}},JXe=class{constructor(e){this.featureTableTag=e.tag,this.minCoord=e.Offset16,this.maxCoord=e.Offset16}},$Xe=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)}},eQe=Object.freeze({__proto__:null,BASE:GXe}),ybe=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 tQe(e)))}},tQe=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.class=e.uint16}},_E=class extends To{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 rQe(e)))}},rQe=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.startCoverageIndex=e.uint16}},oQe=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)}},nQe=class extends yt{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.glyphClassDefOffset=r.Offset16,je(this,"glyphClassDefs",()=>{if(this.glyphClassDefOffset!==0)return r.currentPosition=this.tableStart+this.glyphClassDefOffset,new ybe(r)}),this.attachListOffset=r.Offset16,je(this,"attachList",()=>{if(this.attachListOffset!==0)return r.currentPosition=this.tableStart+this.attachListOffset,new iQe(r)}),this.ligCaretListOffset=r.Offset16,je(this,"ligCaretList",()=>{if(this.ligCaretListOffset!==0)return r.currentPosition=this.tableStart+this.ligCaretListOffset,new aQe(r)}),this.markAttachClassDefOffset=r.Offset16,je(this,"markAttachClassDef",()=>{if(this.markAttachClassDefOffset!==0)return r.currentPosition=this.tableStart+this.markAttachClassDefOffset,new ybe(r)}),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=r.Offset16,je(this,"markGlyphSetsDef",()=>{if(this.markGlyphSetsDefOffset!==0)return r.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new uQe(r)})),this.minorVersion===3&&(this.itemVarStoreOffset=r.Offset32,je(this,"itemVarStore",()=>{if(this.itemVarStoreOffset!==0)return r.currentPosition=this.tableStart+this.itemVarStoreOffset,new oQe(r)}))}},iQe=class extends To{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 sQe(this.parser)}},sQe=class{constructor(e){this.pointCount=e.uint16,this.pointIndices=[...new Array(this.pointCount)].map(t=>e.uint16)}},aQe=class extends To{constructor(e){super(e),this.coverageOffset=e.Offset16,je(this,"coverage",()=>(e.currentPosition=this.start+this.coverageOffset,new _E(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 lQe(this.parser)}},lQe=class extends To{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 cQe(this.parser)}},cQe=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)}},uQe=class extends To{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 _E(this.parser)}},dQe=Object.freeze({__proto__:null,GDEF:nQe}),wbe=class extends To{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(e){super(e),this.scriptCount=e.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map(t=>new fQe(e))}},fQe=class{constructor(e){this.scriptTag=e.tag,this.scriptOffset=e.Offset16}},pQe=class extends To{constructor(e){super(e),this.defaultLangSys=e.Offset16,this.langSysCount=e.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map(t=>new mQe(e))}},mQe=class{constructor(e){this.langSysTag=e.tag,this.langSysOffset=e.Offset16}},_be=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)}},Sbe=class extends To{static EMPTY={featureCount:0,featureRecords:[]};constructor(e){super(e),this.featureCount=e.uint16,this.featureRecords=[...new Array(this.featureCount)].map(t=>new hQe(e))}},hQe=class{constructor(e){this.featureTag=e.tag,this.featureOffset=e.Offset16}},gQe=class extends To{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 bQe(e);if(t.startsWith("cc"))return new vQe(e);if(t.startsWith("ss"))return new yQe(e)}}},vQe=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)}},bQe=class{constructor(e){this.designSize=e.uint16,this.subfamilyIdentifier=e.uint16,this.subfamilyNameID=e.uint16,this.smallEnd=e.uint16,this.largeEnd=e.uint16}},yQe=class{constructor(e){this.version=e.uint16,this.UINameID=e.uint16}};function Pbe(e){e.parser.currentPosition-=2,delete e.coverageOffset,delete e.getCoverageTable}var ty=class extends To{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 _E(e)}},oG=class{constructor(e){this.glyphSequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},wQe=class extends ty{constructor(e){super(e),this.deltaGlyphID=e.int16}},_Qe=class extends ty{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 SQe(t)}},SQe=class{constructor(e){this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},xQe=class extends ty{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 CQe(t)}},CQe=class{constructor(e){this.glyphCount=e.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},TQe=class extends ty{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 EQe(t)}},EQe=class extends To{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 PQe(t)}},PQe=class{constructor(e){this.ligatureGlyph=e.uint16,this.componentCount=e.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map(t=>e.uint16)}},kQe=class extends ty{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&&(Pbe(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 oG(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 RQe(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 AQe(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 _E(t)}},RQe=class extends To{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 kbe(t)}},kbe=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 oG(e))}},AQe=class extends To{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 IQe(t)}},IQe=class extends kbe{constructor(e){super(e)}},OQe=class extends ty{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&&(Pbe(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 Rbe(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 NQe(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 FQe(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 _E(t)}},NQe=class extends To{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 MQe(t)}},MQe=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 oG(e))}},FQe=class extends To{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 DQe(t)}},DQe=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 Rbe(e))}},Rbe=class extends To{constructor(e){super(e),this.sequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},LQe=class extends To{constructor(e){super(e),this.substFormat=e.uint16,this.extensionLookupType=e.uint16,this.extensionOffset=e.Offset32}},BQe=class extends ty{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)}},VQe={buildSubtable:function(e,t){let r=new[void 0,wQe,_Qe,xQe,TQe,kQe,OQe,LQe,BQe][e](t);return r.type=e,r}},xp=class extends To{constructor(e){super(e)}},jQe=class extends xp{constructor(e){super(e),console.log("lookup type 1")}},zQe=class extends xp{constructor(e){super(e),console.log("lookup type 2")}},HQe=class extends xp{constructor(e){super(e),console.log("lookup type 3")}},UQe=class extends xp{constructor(e){super(e),console.log("lookup type 4")}},WQe=class extends xp{constructor(e){super(e),console.log("lookup type 5")}},GQe=class extends xp{constructor(e){super(e),console.log("lookup type 6")}},YQe=class extends xp{constructor(e){super(e),console.log("lookup type 7")}},qQe=class extends xp{constructor(e){super(e),console.log("lookup type 8")}},KQe=class extends xp{constructor(e){super(e),console.log("lookup type 9")}},ZQe={buildSubtable:function(e,t){let r=new[void 0,jQe,zQe,HQe,UQe,WQe,GQe,YQe,qQe,KQe][e](t);return r.type=e,r}},xbe=class extends To{static EMPTY={lookupCount:0,lookups:[]};constructor(e){super(e),this.lookupCount=e.uint16,this.lookups=[...new Array(this.lookupCount)].map(t=>e.Offset16)}},XQe=class extends To{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"?VQe:ZQe;return this.parser.currentPosition=this.start+this.subtableOffsets[e],t.buildSubtable(this.lookupType,this.parser)}},Abe=class extends yt{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);je(this,"scriptList",()=>i?wbe.EMPTY:(o.currentPosition=n+this.scriptListOffset,new wbe(o))),je(this,"featureList",()=>i?Sbe.EMPTY:(o.currentPosition=n+this.featureListOffset,new Sbe(o))),je(this,"lookupList",()=>i?xbe.EMPTY:(o.currentPosition=n+this.lookupListOffset,new xbe(o))),this.featureVariationsOffset&&je(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 pQe(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 _be(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 _be(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 gQe(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 XQe(this.parser,t)}},QQe=class extends Abe{constructor(e,t){super(e,t,"GSUB")}getLookup(e){return super.getLookup(e,"GSUB")}},JQe=Object.freeze({__proto__:null,GSUB:QQe}),$Qe=class extends Abe{constructor(e,t){super(e,t,"GPOS")}getLookup(e){return super.getLookup(e,"GPOS")}},eJe=Object.freeze({__proto__:null,GPOS:$Qe}),tJe=class extends yt{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 rJe(r)}},rJe=class extends To{constructor(e){super(e),this.numEntries=e.uint16,this.documentRecords=[...new Array(this.numEntries)].map(t=>new oJe(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)}},oJe=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.svgDocOffset=e.Offset32,this.svgDocLength=e.uint32}},nJe=Object.freeze({__proto__:null,SVG:tJe}),iJe=class extends yt{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;je(this,"axes",()=>(r.currentPosition=o,[...new Array(this.axisCount)].map(i=>new sJe(r))));let n=o+this.axisCount*this.axisSize;je(this,"instances",()=>{let i=[];for(let s=0;s<this.instanceCount;s++)r.currentPosition=n+s*this.instanceSize,i.push(new aJe(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)}},sJe=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}},aJe=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)}},lJe=Object.freeze({__proto__:null,fvar:iJe}),cJe=class extends yt{constructor(e,t){let{p:r}=super(e,t),o=e.length/2;je(this,"items",()=>[...new Array(o)].map(n=>r.fword))}},uJe=Object.freeze({__proto__:null,cvt:cJe}),dJe=class extends yt{constructor(e,t){let{p:r}=super(e,t);je(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},fJe=Object.freeze({__proto__:null,fpgm:dJe}),pJe=class extends yt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numRanges=r.uint16,je(this,"gaspRanges",()=>[...new Array(this.numRanges)].map(n=>new mJe(r)))}},mJe=class{constructor(e){this.rangeMaxPPEM=e.uint16,this.rangeGaspBehavior=e.uint16}},hJe=Object.freeze({__proto__:null,gasp:pJe}),gJe=class extends yt{constructor(e,t){super(e,t)}getGlyphData(e,t){return this.parser.currentPosition=this.tableStart+e,this.parser.readBytes(t)}},vJe=Object.freeze({__proto__:null,glyf:gJe}),bJe=class extends yt{constructor(e,t,r){let{p:o}=super(e,t),n=r.maxp.numGlyphs+1;r.head.indexToLocFormat===0?(this.x2=!0,je(this,"offsets",()=>[...new Array(n)].map(i=>o.Offset16))):je(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}}},yJe=Object.freeze({__proto__:null,loca:bJe}),wJe=class extends yt{constructor(e,t){let{p:r}=super(e,t);je(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},_Je=Object.freeze({__proto__:null,prep:wJe}),SJe=class extends yt{constructor(e,t){let{p:r}=super(e,t);je(this,"data",()=>r.readBytes())}},xJe=Object.freeze({__proto__:null,CFF:SJe}),CJe=class extends yt{constructor(e,t){let{p:r}=super(e,t);je(this,"data",()=>r.readBytes())}},TJe=Object.freeze({__proto__:null,CFF2:CJe}),EJe=class extends yt{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,je(this,"vertORiginYMetrics",()=>[...new Array(this.numVertOriginYMetrics)].map(o=>new PJe(r)))}},PJe=class{constructor(e){this.glyphIndex=e.uint16,this.vertOriginY=e.int16}},kJe=Object.freeze({__proto__:null,VORG:EJe}),RJe=class{constructor(e){this.indexSubTableArrayOffset=e.Offset32,this.indexTablesSize=e.uint32,this.numberofIndexSubTables=e.uint32,this.colorRef=e.uint32,this.hori=new kM(e),this.vert=new kM(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}},AJe=class{constructor(e){this.hori=new kM(e),this.vert=new kM(e),this.ppemX=e.uint8,this.ppemY=e.uint8,this.substitutePpemX=e.uint8,this.substitutePpemY=e.uint8}},kM=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}},Ibe=class extends yt{constructor(e,t,r){let{p:o}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.numSizes=o.uint32,je(this,"bitMapSizes",()=>[...new Array(this.numSizes)].map(n=>new RJe(o)))}},IJe=Object.freeze({__proto__:null,EBLC:Ibe}),Obe=class extends yt{constructor(e,t,r){let{p:o}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16}},OJe=Object.freeze({__proto__:null,EBDT:Obe}),NJe=class extends yt{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.numSizes=r.uint32,je(this,"bitmapScales",()=>[...new Array(this.numSizes)].map(o=>new AJe(r)))}},MJe=Object.freeze({__proto__:null,EBSC:NJe}),FJe=class extends Ibe{constructor(e,t){super(e,t,"CBLC")}},DJe=Object.freeze({__proto__:null,CBLC:FJe}),LJe=class extends Obe{constructor(e,t){super(e,t,"CBDT")}},BJe=Object.freeze({__proto__:null,CBDT:LJe}),VJe=class extends yt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.flags=r.flags(16),this.numStrikes=r.uint32,je(this,"strikeOffsets",()=>[...new Array(this.numStrikes)].map(o=>r.Offset32))}},jJe=Object.freeze({__proto__:null,sbix:VJe}),zJe=class extends yt{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 rG(this.parser),o=r.gID,n=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=n;let i=new rG(this.parser),s=i.gID;if(o===e)return r;if(s===e)return i;for(;t!==n;){let l=t+(n-t)/12;this.parser.currentPosition=l;let c=new rG(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 HJe(p))}},rG=class{constructor(e){this.gID=e.uint16,this.firstLayerIndex=e.uint16,this.numLayers=e.uint16}},HJe=class{constructor(e){this.gID=e.uint16,this.paletteIndex=e.uint16}},UJe=Object.freeze({__proto__:null,COLR:zJe}),WJe=class extends yt{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),je(this,"colorRecords",()=>(r.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map(n=>new GJe(r)))),this.version===1&&(this.offsetPaletteTypeArray=r.Offset32,this.offsetPaletteLabelArray=r.Offset32,this.offsetPaletteEntryLabelArray=r.Offset32,je(this,"paletteTypeArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new YJe(r,o))),je(this,"paletteLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new qJe(r,o))),je(this,"paletteEntryLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new KJe(r,o))))}},GJe=class{constructor(e){this.blue=e.uint8,this.green=e.uint8,this.red=e.uint8,this.alpha=e.uint8}},YJe=class{constructor(e,t){this.paletteTypes=[...new Array(t)].map(r=>e.uint32)}},qJe=class{constructor(e,t){this.paletteLabels=[...new Array(t)].map(r=>e.uint16)}},KJe=class{constructor(e,t){this.paletteEntryLabels=[...new Array(t)].map(r=>e.uint16)}},ZJe=Object.freeze({__proto__:null,CPAL:WJe}),XJe=class extends yt{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 QJe(r))}getData(e){let t=this.signatureRecords[e];return this.parser.currentPosition=this.tableStart+t.offset,new JJe(this.parser)}},QJe=class{constructor(e){this.format=e.uint32,this.length=e.uint32,this.offset=e.Offset32}},JJe=class{constructor(e){e.uint16,e.uint16,this.signatureLength=e.uint32,this.signature=e.readBytes(this.signatureLength)}},$Je=Object.freeze({__proto__:null,DSIG:XJe}),e$e=class extends yt{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 t$e(o,n))}},t$e=class{constructor(e,t){this.pixelSize=e.uint8,this.maxWidth=e.uint8,this.widths=e.readBytes(t)}},r$e=Object.freeze({__proto__:null,hdmx:e$e}),o$e=class extends yt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.nTables=r.uint16,je(this,"tables",()=>{let o=this.tableStart+4,n=[];for(let i=0;i<this.nTables;i++){r.currentPosition=o;let s=new n$e(r);n.push(s),o+=s}return n})}},n$e=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,je(this,"pairs",()=>[...new Array(this.nPairs)].map(t=>new i$e(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]}},i$e=class{constructor(e){this.left=e.uint16,this.right=e.uint16,this.value=e.fword}},s$e=Object.freeze({__proto__:null,kern:o$e}),a$e=class extends yt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numGlyphs=r.uint16,this.yPels=r.readBytes(this.numGlyphs)}},l$e=Object.freeze({__proto__:null,LTSH:a$e}),c$e=class extends yt{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,je(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.")}},u$e=Object.freeze({__proto__:null,MERG:c$e}),d$e=class extends yt{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 f$e(this.tableStart,r))}},f$e=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)}},p$e=Object.freeze({__proto__:null,meta:d$e}),m$e=class extends yt{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.")}},h$e=Object.freeze({__proto__:null,PCLT:m$e}),g$e=class extends yt{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 v$e(r)),this.offsets=[...new Array(this.numRatios)].map(o=>r.Offset16),this.VDMXGroups=[...new Array(this.numRecs)].map(o=>new b$e(r))}},v$e=class{constructor(e){this.bCharSet=e.uint8,this.xRatio=e.uint8,this.yStartRatio=e.uint8,this.yEndRatio=e.uint8}},b$e=class{constructor(e){this.recs=e.uint16,this.startsz=e.uint8,this.endsz=e.uint8,this.records=[...new Array(this.recs)].map(t=>new y$e(e))}},y$e=class{constructor(e){this.yPelHeight=e.uint16,this.yMax=e.int16,this.yMin=e.int16}},w$e=Object.freeze({__proto__:null,VDMX:g$e}),_$e=class extends yt{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()}},S$e=Object.freeze({__proto__:null,vhea:_$e}),x$e=class extends yt{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(s=>new C$e(p.uint16,p.int16)))),o<n){let s=i+o*4;lazy(this,"topSideBearings",()=>(p.currentPosition=s,[...new Array(n-o)].map(l=>p.int16)))}}},C$e=class{constructor(e,t){this.advanceHeight=e,this.topSideBearing=t}},T$e=Object.freeze({__proto__:null,vmtx:x$e});var Nbe=a(G(),1);var{kebabCase:E$e}=Et(Nbe.privateApis);function Mbe(e){let t=e.reduce((r,o)=>(r[o.fontFamily]||(r[o.fontFamily]={name:o.fontFamily,fontFamily:o.fontFamily,slug:E$e(o.fontFamily.toLowerCase()),fontFace:[]}),r[o.fontFamily].fontFace.push(o),r),{});return Object.values(t)}var Ra=a(E(),1);function P$e(){let{installFonts:e}=(0,SE.useContext)(_i),[t,r]=(0,SE.useState)(!1),[o,n]=(0,SE.useState)(null),i=h=>{l(h)},s=h=>{l(h.target.files)},l=async h=>{if(!h)return;n(null),r(!0);let g=new Set,v=[...h],b=!1,_=v.map(async w=>{if(!await u(w))return b=!0,null;if(g.has(w.name))return null;let x=(((w.name??"").split(".")??[]).pop()??"").toLowerCase();return QW.includes(x)?(g.add(w.name),w):null}),y=(await Promise.all(_)).filter(w=>w!==null);if(y.length>0)c(y);else{let w=b?(0,F_.__)("Sorry, you are not allowed to upload this file type."):(0,F_.__)("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 b=await f(v);return await ng(b,b.file,"all"),b}));m(g)};async function u(h){let g=new RM("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 b=new window.FileReader;b.readAsArrayBuffer(h),b.onload=()=>g(b.result),b.onerror=v})}let f=async h=>{let g=await d(h),v=new RM("Uploaded Font");v.fromDataBuffer(g,h.name);let _=(await new Promise(R=>v.onload=R)).detail.font,{name:y}=_.opentype.tables,w=y.get(16)||y.get(1),S=y.get(2).toLowerCase().includes("italic"),x=_.opentype.tables["OS/2"].usWeightClass||"normal",A=!!_.opentype.tables.fvar&&_.opentype.tables.fvar.axes.find(({tag:R})=>R==="wght"),k=A?`${A.minValue} ${A.maxValue}`:null;return{file:h,fontFamily:w,fontStyle:S?"italic":"normal",fontWeight:k||x}},m=async h=>{let g=Mbe(h);try{await e(g),n({type:"success",message:(0,F_.__)("Fonts were installed successfully.")})}catch(v){let b=v;n({type:"error",message:b.message,errors:b?.installationErrors})}r(!1)};return(0,Ra.jsxs)("div",{className:"font-library__tabpanel-layout",children:[(0,Ra.jsx)(rs.DropZone,{onFilesDrop:i}),(0,Ra.jsxs)(rs.__experimentalVStack,{className:"font-library__local-fonts",justify:"start",children:[o&&(0,Ra.jsxs)(rs.Notice,{status:o.type,__unstableHTML:!0,onRemove:()=>n(null),children:[o.message,o.errors&&(0,Ra.jsx)("ul",{children:o.errors.map((h,g)=>(0,Ra.jsx)("li",{children:h},g))})]}),t&&(0,Ra.jsx)(rs.FlexItem,{children:(0,Ra.jsx)("div",{className:"font-library__upload-area",children:(0,Ra.jsx)(rs.ProgressBar,{})})}),!t&&(0,Ra.jsx)(rs.FormFileUpload,{accept:QW.map(h=>`.${h}`).join(","),multiple:!0,onChange:s,render:({openFileDialog:h})=>(0,Ra.jsx)(rs.Button,{__next40pxDefaultSize:!0,className:"font-library__upload-area",onClick:h,children:(0,F_.__)("Upload font")})}),(0,Ra.jsx)(rs.__experimentalText,{className:"font-library__upload-area__text",children:(0,F_.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.")})]})]})}var AM=P$e;var $c=a(E(),1),{Tabs:IM}=Et(OM.privateApis),k$e={id:"installed-fonts",title:(0,D_._x)("Library","Font library")},R$e={id:"upload-fonts",title:(0,D_._x)("Upload","noun")},A$e=e=>e.map(({slug:t,name:r})=>({id:t,title:e.length===1&&t==="google-fonts"?(0,D_.__)("Install Fonts"):r}));function I$e({onRequestClose:e,defaultTabId:t="installed-fonts"}){let{records:r=[]}=(0,NM.useEntityRecords)("root","fontCollection",{_fields:"slug,name,description"}),o=(0,Fbe.useSelect)(i=>i(NM.store).canUser("create",{kind:"postType",name:"wp_font_family"}),[]),n=[k$e];return o&&(n.push(R$e),n.push(...A$e(r||[]))),(0,$c.jsx)(OM.Modal,{title:(0,D_.__)("Fonts"),onRequestClose:e,isFullScreen:!0,className:"font-library-modal",children:(0,$c.jsxs)(IM,{defaultTabId:t,children:[(0,$c.jsx)("div",{className:"font-library-modal__tablist-container",children:(0,$c.jsx)(IM.TabList,{children:n.map(({id:i,title:s})=>(0,$c.jsx)(IM.Tab,{tabId:i,children:s},i))})}),n.map(({id:i})=>{let s;switch(i){case"upload-fonts":s=(0,$c.jsx)(AM,{});break;case"installed-fonts":s=(0,$c.jsx)(_M,{});break;default:s=(0,$c.jsx)(xM,{slug:i})}return(0,$c.jsx)(IM.TabPanel,{tabId:i,focusable:!1,className:"font-library-modal__tab-panel",children:s},i)})]})})}var Dbe=I$e;var MM=a(j(),1),ry=a(G(),1),Lbe=a(U(),1);var L_=a(E(),1);function O$e({font:e}){let{handleSetLibraryFontSelected:t,setModalTabOpen:r}=(0,Lbe.useContext)(_i),o=e?.fontFace?.length||1,n=()=>{t?.(e),r?.("installed-fonts")},i=qb(e);return(0,L_.jsx)(ry.__experimentalItem,{onClick:n,children:(0,L_.jsxs)(ry.__experimentalHStack,{justify:"space-between",children:[(0,L_.jsx)(ry.FlexItem,{style:i,children:e.name}),(0,L_.jsx)(ry.FlexItem,{className:"global-styles-ui-screen-typography__font-variants-count",children:(0,MM.sprintf)((0,MM._n)("%d variant","%d variants",o),o)})]})})}var Bbe=O$e;var bn=a(E(),1);function Vbe(e,t){return e?e.map(r=>wp(r,{source:t})):[]}function N$e(){let{baseCustomFonts:e,modalTabOpen:t,setModalTabOpen:r}=(0,jbe.useContext)(_i),[o]=Le("typography.fontFamilies"),[n]=Le("typography.fontFamilies",void 0,"base"),i=Vbe(o?.theme,"theme"),s=Vbe(o?.custom,"custom"),l=[...i,...s].sort((d,f)=>d.name.localeCompare(f.name)),c=0<l.length,u=c||n?.theme?.length>0||(e?.length??0)>0;return(0,bn.jsxs)(bn.Fragment,{children:[!!t&&(0,bn.jsx)(Dbe,{onRequestClose:()=>r?.(""),defaultTabId:t}),(0,bn.jsxs)(eu.__experimentalVStack,{spacing:2,children:[(0,bn.jsxs)(eu.__experimentalHStack,{justify:"space-between",children:[(0,bn.jsx)(Uo,{level:3,children:(0,oy.__)("Fonts")}),(0,bn.jsx)(eu.Button,{onClick:()=>r?.("installed-fonts"),label:(0,oy.__)("Manage fonts"),icon:BV,size:"small"})]}),l.length>0&&(0,bn.jsx)(bn.Fragment,{children:(0,bn.jsx)(eu.__experimentalItemGroup,{size:"large",isBordered:!0,isSeparated:!0,children:l.map(d=>(0,bn.jsx)(Bbe,{font:d},d.slug))})}),!c&&(0,bn.jsxs)(bn.Fragment,{children:[(0,bn.jsx)(eu.__experimentalText,{as:"p",children:u?(0,oy.__)("No fonts activated."):(0,oy.__)("No fonts installed.")}),(0,bn.jsx)(eu.Button,{className:"global-styles-ui-font-families__manage-fonts",variant:"secondary",__next40pxDefaultSize:!0,onClick:()=>{r?.(u?"installed-fonts":"upload-fonts")},children:u?(0,oy.__)("Manage fonts"):(0,oy.__)("Add fonts")})]})]})]})}function zbe({...e}){return(0,bn.jsx)(hM,{children:(0,bn.jsx)(N$e,{...e})})}var xE=a(j(),1),Cp=a(G(),1);var Fd=a(E(),1);function M$e(){return(0,Fd.jsxs)(Cp.__experimentalVStack,{spacing:2,children:[(0,Fd.jsx)(Cp.__experimentalHStack,{justify:"space-between",children:(0,Fd.jsx)(Uo,{level:3,children:(0,xE.__)("Font Sizes")})}),(0,Fd.jsx)(Cp.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,Fd.jsx)(xo,{path:"/typography/font-sizes",children:(0,Fd.jsxs)(Cp.__experimentalHStack,{direction:"row",children:[(0,Fd.jsx)(Cp.FlexItem,{children:(0,xE.__)("Font size presets")}),(0,Fd.jsx)(Cn,{icon:(0,xE.isRTL)()?Ar:hr})]})})})]})}var Hbe=M$e;var ec=a(E(),1);function F$e(){let{fontLibraryEnabled:e}=(0,Wbe.useContext)(on);return(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)(sr,{title:(0,FM.__)("Typography"),description:(0,FM.__)("Available fonts, typographic styles, and the application of those styles.")}),(0,ec.jsx)(tg,{children:(0,ec.jsxs)(Ube.__experimentalVStack,{spacing:7,children:[(0,ec.jsx)(I_,{title:(0,FM.__)("Typesets")}),e&&(0,ec.jsx)(zbe,{}),(0,ec.jsx)(Ove,{}),(0,ec.jsx)(Hbe,{})]})})]})}var Gbe=F$e;var Or=a(j(),1),pl=a(G(),1),Jbe=a(U(),1);var Ybe=a(be(),1);var qbe=a(E(),1),{useSettingsForBlockElement:D$e,TypographyPanel:L$e}=Et(Ybe.privateApis);function Kbe({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]=qe(o,"","user",!1),[i,s]=qe(o,"","merged",!1),[l]=Le(""),u=D$e(l,void 0,e==="heading"?t:e);return(0,qbe.jsx)(L$e,{inheritedValue:i,value:n,onChange:s,settings:u,showInheritanceLabelIndicators:!1})}var Zbe=a(E(),1);function Xbe({name:e,element:t,headingLevel:r}){let o="";t==="heading"?o=`elements.${r}.`:t&&t!=="text"&&(o=`elements.${t}.`);let[n]=qe(o+"typography.fontFamily",e),[i]=qe(o+"color.gradient",e),[s]=qe(o+"color.background",e),[l]=qe("color.background"),[c]=qe(o+"color.text",e),[u]=qe(o+"typography.fontSize",e),[d]=qe(o+"typography.fontStyle",e),[f]=qe(o+"typography.fontWeight",e),[m]=qe(o+"typography.letterSpacing",e);return(0,Zbe.jsx)("div",{className:"global-styles-ui-typography-preview",style:{fontFamily:n??"serif",background:i??s??l,color:c,fontSize:u,fontStyle:d,fontWeight:f,letterSpacing:m,...t==="link"?{textDecoration:"underline"}:{}},children:"Aa"})}var ei=a(E(),1),Qbe={text:{description:(0,Or.__)("Manage the fonts used on the site."),title:(0,Or.__)("Text")},link:{description:(0,Or.__)("Manage the fonts and typography used on the links."),title:(0,Or.__)("Links")},heading:{description:(0,Or.__)("Manage the fonts and typography used on headings."),title:(0,Or.__)("Headings")},caption:{description:(0,Or.__)("Manage the fonts and typography used on captions."),title:(0,Or.__)("Captions")},button:{description:(0,Or.__)("Manage the fonts and typography used on buttons."),title:(0,Or.__)("Buttons")}};function B$e({element:e}){let[t,r]=(0,Jbe.useState)("heading");return(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)(sr,{title:Qbe[e].title,description:Qbe[e].description}),(0,ei.jsx)(pl.__experimentalSpacer,{marginX:4,children:(0,ei.jsx)(Xbe,{element:e,headingLevel:t})}),e==="heading"&&(0,ei.jsx)(pl.__experimentalSpacer,{marginX:4,marginBottom:"1em",children:(0,ei.jsxs)(pl.__experimentalToggleGroupControl,{label:(0,Or.__)("Select heading level"),hideLabelFromVision:!0,value:t,onChange:o=>r(o),isBlock:!0,children:[(0,ei.jsx)(pl.__experimentalToggleGroupControlOption,{value:"heading",showTooltip:!0,"aria-label":(0,Or.__)("All headings"),label:(0,Or._x)("All","heading levels")}),(0,ei.jsx)(pl.__experimentalToggleGroupControlOption,{value:"h1",showTooltip:!0,"aria-label":(0,Or.__)("Heading 1"),label:(0,Or.__)("H1")}),(0,ei.jsx)(pl.__experimentalToggleGroupControlOption,{value:"h2",showTooltip:!0,"aria-label":(0,Or.__)("Heading 2"),label:(0,Or.__)("H2")}),(0,ei.jsx)(pl.__experimentalToggleGroupControlOption,{value:"h3",showTooltip:!0,"aria-label":(0,Or.__)("Heading 3"),label:(0,Or.__)("H3")}),(0,ei.jsx)(pl.__experimentalToggleGroupControlOption,{value:"h4",showTooltip:!0,"aria-label":(0,Or.__)("Heading 4"),label:(0,Or.__)("H4")}),(0,ei.jsx)(pl.__experimentalToggleGroupControlOption,{value:"h5",showTooltip:!0,"aria-label":(0,Or.__)("Heading 5"),label:(0,Or.__)("H5")}),(0,ei.jsx)(pl.__experimentalToggleGroupControlOption,{value:"h6",showTooltip:!0,"aria-label":(0,Or.__)("Heading 6"),label:(0,Or.__)("H6")})]})}),(0,ei.jsx)(Kbe,{element:e,headingLevel:t})]})}var B_=B$e;var nG=a(j(),1),nye=a(G(),1),iye=a(be(),1);var ml=a(G(),1),V_=a(j(),1);var rye=a(U(),1);var $be=a(G(),1),eye=a(E(),1);function V$e({className:e,children:t,...r}){return(0,eye.jsx)($be.Flex,{className:J("global-styles-ui__color-indicator-wrapper",e),...r,children:t})}var tye=V$e;var os=a(E(),1),DM=[];function j$e({name:e}){let[t]=Le("color.palette.custom"),[r]=Le("color.palette.theme"),[o]=Le("color.palette.default"),[n]=Le("color.defaultPalette",e),i=t||DM,s=r||DM,l=o||DM,c=n??!0,u=(0,rye.useMemo)(()=>[...i,...s,...l&&c?l:DM],[i,s,l,c]),d=e?"/blocks/"+encodeURIComponent(e)+"/colors/palette":"/colors/palette";return(0,os.jsxs)(ml.__experimentalVStack,{spacing:3,children:[(0,os.jsx)(Uo,{level:3,children:(0,V_.__)("Palette")}),(0,os.jsx)(ml.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,os.jsx)(xo,{path:d,children:(0,os.jsxs)(ml.__experimentalHStack,{direction:"row",children:[u.length>0?(0,os.jsxs)(os.Fragment,{children:[(0,os.jsx)(ml.__experimentalZStack,{isLayered:!1,offset:-8,children:u.slice(0,5).map(({color:f},m)=>(0,os.jsx)(tye,{children:(0,os.jsx)(ml.ColorIndicator,{colorValue:f})},`${f}-${m}`))}),(0,os.jsx)(ml.FlexItem,{isBlock:!0,children:(0,V_.__)("Edit palette")})]}):(0,os.jsx)(ml.FlexItem,{children:(0,V_.__)("Add colors")}),(0,os.jsx)(Cn,{icon:(0,V_.isRTL)()?Ar:hr})]})})})]})}var oye=j$e;var Dd=a(E(),1),{useSettingsForBlockElement:z$e,ColorPanel:H$e}=Et(iye.privateApis);function U$e(){let[e,t]=qe("",void 0,"user",!1),[r]=qe("",void 0,"merged",!1),[o]=Le(""),n=z$e(o);return(0,Dd.jsxs)(Dd.Fragment,{children:[(0,Dd.jsx)(sr,{title:(0,nG.__)("Colors"),description:(0,nG.__)("Palette colors and the application of those colors on site elements.")}),(0,Dd.jsx)(tg,{children:(0,Dd.jsx)(nye.__experimentalVStack,{spacing:7,children:(0,Dd.jsx)(oye,{})})}),(0,Dd.jsx)(H$e,{inheritedValue:r,value:e,onChange:t,settings:n,showInheritanceLabelIndicators:!1})]})}var sye=U$e;var EE=a(j(),1);var dye=a(Te(),1),Ep=a(G(),1),z_=a(j(),1);var BM=a(G(),1);var LM=a(G(),1);var aye=a(E(),1);function lye(){let{paletteColors:e}=E_();return e.slice(0,4).map(({slug:t,color:r},o)=>(0,aye.jsx)("div",{style:{flexGrow:1,height:"100%",background:r}},`${t}-${o}`))}var CE=a(E(),1),W$e={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},G$e=({label:e,isFocused:t,withHoverView:r})=>(0,CE.jsx)(k_,{label:e,isFocused:t,withHoverView:r,children:({key:o})=>(0,CE.jsx)(LM.__unstableMotion.div,{variants:W$e,style:{height:"100%",overflow:"hidden"},children:(0,CE.jsx)(LM.__experimentalHStack,{spacing:0,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,CE.jsx)(lye,{})})},o)}),cye=G$e;var ny=a(E(),1),uye=["color"];function j_({title:e,gap:t=2}){let r=oM(uye);return r?.length<=1?null:(0,ny.jsxs)(BM.__experimentalVStack,{spacing:3,children:[e&&(0,ny.jsx)(Uo,{level:3,children:e}),(0,ny.jsx)(BM.__experimentalGrid,{gap:t,children:r.map((o,n)=>(0,ny.jsx)(A_,{variation:o,isPill:!0,properties:uye,showTooltip:!0,children:()=>(0,ny.jsx)(cye,{})},n))})]})}var Tp=a(E(),1),Y$e={placement:"bottom-start",offset:8};function fye({name:e}){let[t,r]=Le("color.palette.theme",e),[o]=Le("color.palette.theme",e,"base"),[n,i]=Le("color.palette.default",e),[s]=Le("color.palette.default",e,"base"),[l,c]=Le("color.palette.custom",e),[u]=Le("color.defaultPalette",e),f=(0,dye.useViewportMatch)("small","<")?Y$e:void 0,[m]=Xge(e);return(0,Tp.jsxs)(Ep.__experimentalVStack,{className:"global-styles-ui-color-palette-panel",spacing:8,children:[(0,Tp.jsxs)(Ep.__experimentalVStack,{spacing:4,children:[!!t&&!!t.length&&(0,Tp.jsx)(Ep.__experimentalPaletteEdit,{canReset:t!==o,canOnlyChangeValues:!0,colors:t,onChange:r,paletteLabel:(0,z_.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:f}),window.__experimentalEnableColorRandomizer&&t?.length>0&&m&&(0,Tp.jsx)(Ep.Button,{__next40pxDefaultSize:!0,variant:"secondary",icon:zV,onClick:m,children:(0,z_.__)("Randomize colors")})]}),!!n&&!!n.length&&!!u&&(0,Tp.jsx)(Ep.__experimentalPaletteEdit,{canReset:n!==s,canOnlyChangeValues:!0,colors:n,onChange:i,paletteLabel:(0,z_.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:f}),(0,Tp.jsx)(Ep.__experimentalPaletteEdit,{colors:l,onChange:c,paletteLabel:(0,z_.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:f}),(0,Tp.jsx)(j_,{title:(0,z_.__)("Palettes")})]})}var pye=a(Te(),1),Bd=a(G(),1),TE=a(j(),1);var Ld=a(E(),1),q$e={placement:"bottom-start",offset:8},K$e=()=>{};function mye({name:e}){let[t,r]=Le("color.gradients.theme",e),[o]=Le("color.gradients.theme",e,"base"),[n,i]=Le("color.gradients.default",e),[s]=Le("color.gradients.default",e,"base"),[l,c]=Le("color.gradients.custom",e),[u]=Le("color.defaultGradients",e),[d]=Le("color.duotone.custom")||[],[f]=Le("color.duotone.default")||[],[m]=Le("color.duotone.theme")||[],[h]=Le("color.defaultDuotone"),g=[...d||[],...m||[],...f&&h?f:[]],b=(0,pye.useViewportMatch)("small","<")?q$e:void 0;return(0,Ld.jsxs)(Bd.__experimentalVStack,{className:"global-styles-ui-gradient-palette-panel",spacing:8,children:[!!t&&!!t.length&&(0,Ld.jsx)(Bd.__experimentalPaletteEdit,{canReset:t!==o,canOnlyChangeValues:!0,gradients:t,onChange:r,paletteLabel:(0,TE.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:b}),!!n&&!!n.length&&!!u&&(0,Ld.jsx)(Bd.__experimentalPaletteEdit,{canReset:n!==s,canOnlyChangeValues:!0,gradients:n,onChange:i,paletteLabel:(0,TE.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:b}),(0,Ld.jsx)(Bd.__experimentalPaletteEdit,{gradients:l,onChange:c,paletteLabel:(0,TE.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:b}),!!g&&!!g.length&&(0,Ld.jsxs)("div",{children:[(0,Ld.jsx)(Uo,{level:3,children:(0,TE.__)("Duotone")}),(0,Ld.jsx)(Bd.__experimentalSpacer,{margin:3}),(0,Ld.jsx)(Bd.DuotonePicker,{duotonePalette:g,disableCustomDuotone:!0,disableCustomColors:!0,clearable:!1,onChange:K$e,colorPalette:[]})]})]})}var qs=a(E(),1);function Z$e({name:e}){return(0,qs.jsxs)(qs.Fragment,{children:[(0,qs.jsx)(sr,{title:(0,EE.__)("Edit palette"),description:(0,EE.__)("The combination of colors used across the site and in color pickers.")}),(0,qs.jsxs)(En.Root,{defaultValue:"color",children:[(0,qs.jsx)("div",{className:"global-styles-ui-color-palette__tablist-container",children:(0,qs.jsxs)(En.List,{className:"global-styles-ui-color-palette__tablist",children:[(0,qs.jsx)(En.Tab,{value:"color",children:(0,EE.__)("Color")}),(0,qs.jsx)(En.Tab,{value:"gradient",children:(0,EE.__)("Gradient")})]})}),(0,qs.jsx)(En.Panel,{value:"color",tabIndex:-1,children:(0,qs.jsx)(fye,{name:e})}),(0,qs.jsx)(En.Panel,{value:"gradient",tabIndex:-1,children:(0,qs.jsx)(mye,{name:e})})]})]})}var hye=Z$e;var iG=a(j(),1),yye=a(be(),1),wye=a(G(),1);var gye=a(be(),1);var vye=a(E(),1),X$e={backgroundSize:"auto"},{BackgroundPanel:Q$e}=Et(gye.privateApis);function bye(){let[e]=qe("",void 0,"user",!1),[t,r]=qe("",void 0,"merged",!1),[o]=Le("");return(0,vye.jsx)(Q$e,{inheritedValue:t,value:e,onChange:r,settings:o,defaultValues:X$e,showInheritanceLabelIndicators:!1})}var ag=a(E(),1),{useHasBackgroundPanel:J$e}=Et(yye.privateApis);function $$e(){let[e]=Le(""),t=J$e(e);return(0,ag.jsxs)(ag.Fragment,{children:[(0,ag.jsx)(sr,{title:(0,iG.__)("Background"),description:(0,ag.jsx)(wye.__experimentalText,{children:(0,iG.__)("Set styles for the site's background.")})}),t&&(0,ag.jsx)(bye,{})]})}var _ye=$$e;var is=a(G(),1),ns=a(j(),1);var Eye=a(U(),1);var Sye=a(G(),1),xye=a(j(),1),Cye=a(E(),1);function eet({text:e,confirmButtonText:t,isOpen:r,toggleOpen:o,onConfirm:n}){let i=async()=>{o(),n()},s=()=>{o()};return(0,Cye.jsx)(Sye.__experimentalConfirmDialog,{isOpen:r,cancelButtonText:(0,xye.__)("Cancel"),confirmButtonText:t,onCancel:s,onConfirm:i,size:"medium",children:e})}var Tye=eet;var _r=a(E(),1),{Menu:PE}=Et(is.privateApis),aG="6px 6px 9px rgba(0, 0, 0, 0.2)";function Pye(){let[e]=Le("shadow.presets.default"),[t]=Le("shadow.defaultPresets"),[r]=Le("shadow.presets.theme"),[o,n]=Le("shadow.presets.custom"),i=d=>{n([...o||[],d])},s=()=>{n([])},[l,c]=(0,Eye.useState)(!1),u=()=>c(!l);return(0,_r.jsxs)(_r.Fragment,{children:[l&&(0,_r.jsx)(Tye,{text:(0,ns.__)("Are you sure you want to remove all custom shadows?"),confirmButtonText:(0,ns.__)("Remove"),isOpen:l,toggleOpen:u,onConfirm:s}),(0,_r.jsx)(sr,{title:(0,ns.__)("Shadows"),description:(0,ns.__)("Manage and create shadow styles for use across the site.")}),(0,_r.jsx)(tg,{children:(0,_r.jsxs)(is.__experimentalVStack,{className:"global-styles-ui__shadows-panel",spacing:7,children:[t&&(0,_r.jsx)(sG,{label:(0,ns.__)("Default"),shadows:e||[],category:"default"}),r&&r.length>0&&(0,_r.jsx)(sG,{label:(0,ns.__)("Theme"),shadows:r||[],category:"theme"}),(0,_r.jsx)(sG,{label:(0,ns.__)("Custom"),shadows:o||[],category:"custom",canCreate:!0,onCreate:i,onReset:u})]})})]})}function sG({label:e,shadows:t,category:r,canCreate:o,onCreate:n,onReset:i}){let s=()=>{let l=rM(t,"shadow-");n?.({name:(0,ns.sprintf)((0,ns.__)("Shadow %d"),l),shadow:aG,slug:`shadow-${l}`})};return(0,_r.jsxs)(is.__experimentalVStack,{spacing:2,children:[(0,_r.jsxs)(is.__experimentalHStack,{justify:"space-between",children:[(0,_r.jsx)(Uo,{level:3,children:e}),(0,_r.jsxs)(is.FlexItem,{className:"global-styles-ui__shadows-panel__options-container",children:[o&&(0,_r.jsx)(is.Button,{size:"small",icon:Cc,label:(0,ns.__)("Add shadow"),onClick:()=>{s()}}),!!t?.length&&r==="custom"&&(0,_r.jsxs)(PE,{children:[(0,_r.jsx)(PE.TriggerButton,{render:(0,_r.jsx)(is.Button,{size:"small",icon:bo,label:(0,ns.__)("Shadow options")})}),(0,_r.jsx)(PE.Popover,{children:(0,_r.jsx)(PE.Item,{onClick:i,children:(0,_r.jsx)(PE.ItemLabel,{children:(0,ns.__)("Remove all custom shadows")})})})]})]})]}),t.length>0&&(0,_r.jsx)(is.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map(l=>(0,_r.jsx)(tet,{shadow:l,category:r},l.slug))})]})}function tet({shadow:e,category:t}){return(0,_r.jsx)(xo,{path:`/shadows/edit/${t}/${e.slug}`,children:(0,_r.jsxs)(is.__experimentalHStack,{children:[(0,_r.jsx)(is.FlexItem,{children:e.name}),(0,_r.jsx)(Cn,{icon:(0,ns.isRTL)()?Ar:hr})]})})}var ot=a(G(),1),zr=a(j(),1);var hl=a(U(),1);function kye(e){return(e.match(/(?:[^,(]|\([^)]*\))+/g)||[]).map(r=>r.trim())}function Rye(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 s=i.length===1,l=e.replace(r,"").trim();s&&(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:s,color:l||t.color}}function Aye(e){let t=`${e.x||"0px"} ${e.y||"0px"} ${e.blur||"0px"} ${e.spread||"0px"}`;return`${e.inset?"inset":""} ${t} ${e.color||""}`.trim()}var We=a(E(),1),{Menu:kE}=Et(ot.privateApis),ret=[{label:(0,zr.__)("Rename"),action:"rename"},{label:(0,zr.__)("Delete"),action:"delete"}],oet=[{label:(0,zr.__)("Reset"),action:"reset"}];function Iye(){let{goBack:e,params:t}=(0,ot.useNavigator)(),{category:r,slug:o}=t,[n,i]=Le(`shadow.presets.${r}`);(0,hl.useEffect)(()=>{let S=n?.some(x=>x.slug===o);o&&!S&&e()},[n,o,e]);let[s]=Le(`shadow.presets.${r}`,void 0,"base"),[l,c]=(0,hl.useState)(()=>(n||[]).find(S=>S.slug===o)),u=(0,hl.useMemo)(()=>(s||[]).find(S=>S.slug===o),[s,o]),[d,f]=(0,hl.useState)(!1),[m,h]=(0,hl.useState)(!1),[g,v]=(0,hl.useState)(l?.name);if(!r||!o)return null;let b=S=>{c({...l,shadow:S});let x=n.map(C=>C.slug===o?{...l,shadow:S}:C);i(x)},_=S=>{if(S==="reset"){let x=n.map(C=>C.slug===o?u:C);c(u),i(x)}else S==="delete"?f(!0):S==="rename"&&h(!0)},y=()=>{i(n.filter(S=>S.slug!==o))},w=S=>{if(!S)return;let x=n.map(C=>C.slug===o?{...l,name:S}:C);c({...l,name:S}),i(x)};return l?(0,We.jsxs)(We.Fragment,{children:[(0,We.jsxs)(ot.__experimentalHStack,{justify:"space-between",children:[(0,We.jsx)(sr,{title:l.name}),(0,We.jsx)(ot.FlexItem,{children:(0,We.jsx)(ot.__experimentalSpacer,{marginTop:2,marginBottom:0,paddingX:4,children:(0,We.jsxs)(kE,{children:[(0,We.jsx)(kE.TriggerButton,{render:(0,We.jsx)(ot.Button,{size:"small",icon:bo,label:(0,zr.__)("Menu")})}),(0,We.jsx)(kE.Popover,{children:(r==="custom"?ret:oet).map(S=>(0,We.jsx)(kE.Item,{onClick:()=>_(S.action),disabled:S.action==="reset"&&l.shadow===u?.shadow,children:(0,We.jsx)(kE.ItemLabel,{children:S.label})},S.action))})]})})})]}),(0,We.jsxs)(tg,{children:[(0,We.jsx)(net,{shadow:l.shadow}),(0,We.jsx)(iet,{shadow:l.shadow,onChange:b})]}),d&&(0,We.jsx)(ot.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{y(),f(!1)},onCancel:()=>{f(!1)},confirmButtonText:(0,zr.__)("Delete"),size:"medium",children:(0,zr.sprintf)((0,zr.__)('Are you sure you want to delete "%s" shadow preset?'),l.name)}),m&&(0,We.jsx)(ot.Modal,{title:(0,zr.__)("Rename"),onRequestClose:()=>h(!1),size:"small",children:(0,We.jsxs)("form",{onSubmit:S=>{S.preventDefault(),w(g),h(!1)},children:[(0,We.jsx)(ot.__experimentalInputControl,{autoComplete:"off",label:(0,zr.__)("Name"),placeholder:(0,zr.__)("Shadow name"),value:g??"",onChange:v}),(0,We.jsx)(ot.__experimentalSpacer,{marginBottom:6}),(0,We.jsxs)(ot.Flex,{className:"block-editor-shadow-edit-modal__actions",justify:"flex-end",expanded:!1,children:[(0,We.jsx)(ot.FlexItem,{children:(0,We.jsx)(ot.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>h(!1),children:(0,zr.__)("Cancel")})}),(0,We.jsx)(ot.FlexItem,{children:(0,We.jsx)(ot.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,zr.__)("Save")})})]})]})})]}):(0,We.jsx)(sr,{title:""})}function net({shadow:e}){return(0,We.jsx)(ot.__experimentalSpacer,{marginBottom:4,marginTop:-2,children:(0,We.jsx)(ot.__experimentalHStack,{alignment:"center",justify:"center",className:"global-styles-ui__shadow-preview-panel",children:(0,We.jsx)("div",{className:"global-styles-ui__shadow-preview-block",style:{boxShadow:e}})})})}function iet({shadow:e,onChange:t}){let r=(0,hl.useRef)(null),o=(0,hl.useMemo)(()=>kye(e),[e]),n=(l,c)=>{let u=[...o];u[l]=c,t(u.join(", "))},i=()=>{t([...o,aG].join(", "))},s=l=>{t(o.filter((c,u)=>u!==l).join(", ")),r.current?.focus()};return(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(ot.__experimentalVStack,{spacing:2,children:(0,We.jsxs)(ot.__experimentalHStack,{justify:"space-between",children:[(0,We.jsx)(Uo,{level:3,children:(0,zr.__)("Shadows")}),(0,We.jsx)(ot.FlexItem,{className:"global-styles-ui__shadows-panel__options-container",children:(0,We.jsx)(ot.Button,{size:"small",icon:Cc,label:(0,zr.__)("Add shadow"),onClick:()=>{i()},ref:r})})]})}),(0,We.jsx)(ot.__experimentalSpacer,{}),(0,We.jsx)(ot.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:o.map((l,c)=>(0,We.jsx)(set,{shadow:l,onChange:u=>n(c,u),canRemove:o.length>1,onRemove:()=>s(c)},c))})]})}function set({shadow:e,onChange:t,canRemove:r,onRemove:o}){let n={placement:"left-start",offset:36,shift:!0},i=(0,hl.useMemo)(()=>Rye(e),[e]),s=l=>{t(Aye(l))};return(0,We.jsx)(ot.Dropdown,{popoverProps:n,className:"global-styles-ui__shadow-editor__dropdown",renderToggle:({onToggle:l,isOpen:c})=>{let u={onClick:l,className:J("global-styles-ui__shadow-editor__dropdown-toggle",{"is-open":c}),"aria-expanded":c},d={onClick:()=>{c&&l(),o()},className:J("global-styles-ui__shadow-editor__remove-button",{"is-open":c}),label:(0,zr.__)("Remove shadow")};return(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(ot.Button,{__next40pxDefaultSize:!0,icon:P1,...u,children:i.inset?(0,zr.__)("Inner shadow"):(0,zr.__)("Drop shadow")}),r&&(0,We.jsx)(ot.Button,{size:"small",icon:IV,...d})]})},renderContent:()=>(0,We.jsx)(ot.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"global-styles-ui__shadow-editor__dropdown-content",children:(0,We.jsx)(aet,{shadowObj:i,onChange:s})})})}function aet({shadowObj:e,onChange:t}){let n=(i,s)=>{let l={...e,[i]:s};t(l)};return(0,We.jsxs)(ot.__experimentalVStack,{spacing:4,className:"global-styles-ui__shadow-editor-panel",children:[(0,We.jsx)(ot.ColorPalette,{clearable:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,value:e.color,onChange:i=>n("color",i)}),(0,We.jsxs)(ot.__experimentalToggleGroupControl,{label:(0,zr.__)("Shadow Type"),value:e.inset?"inset":"outset",isBlock:!0,onChange:i=>n("inset",i==="inset"),hideLabelFromVision:!0,children:[(0,We.jsx)(ot.__experimentalToggleGroupControlOption,{value:"outset",label:(0,zr.__)("Outset")}),(0,We.jsx)(ot.__experimentalToggleGroupControlOption,{value:"inset",label:(0,zr.__)("Inset")})]}),(0,We.jsxs)(ot.__experimentalGrid,{columns:2,gap:4,children:[(0,We.jsx)(VM,{label:(0,zr.__)("X Position"),value:e.x,onChange:i=>n("x",i)}),(0,We.jsx)(VM,{label:(0,zr.__)("Y Position"),value:e.y,onChange:i=>n("y",i)}),(0,We.jsx)(VM,{label:(0,zr.__)("Blur"),value:e.blur,onChange:i=>n("blur",i)}),(0,We.jsx)(VM,{label:(0,zr.__)("Spread"),value:e.spread,onChange:i=>n("spread",i)})]})]})}function VM({label:e,value:t,onChange:r}){return(0,We.jsx)(ot.__experimentalUnitControl,{label:e,value:t,onChange:n=>{let s=n!==void 0&&!isNaN(parseFloat(n))?n:"0px";r(s)}})}var lG=a(E(),1);function Oye(){return(0,lG.jsx)(Pye,{})}function Nye(){return(0,lG.jsx)(Iye,{})}var Lye=a(j(),1),Bye=a(be(),1);var Mye=a(be(),1),cG=a(U(),1);var Fye=a(E(),1),{useSettingsForBlockElement:cet,DimensionsPanel:uet}=Et(Mye.privateApis),det={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,height:!0,minHeight:!0,minWidth:!0,width:!0,childLayout:!1};function Dye(){let[e]=qe("",void 0,"user",!1),[t,r]=qe("",void 0,"merged",!1),[o]=Le("",void 0,"user"),[n,i]=Le(""),s=cet(n),l=(0,cG.useMemo)(()=>({...t,layout:s.layout}),[t,s.layout]),c=(0,cG.useMemo)(()=>({...e,layout:o.layout}),[e,o.layout]);return(0,Fye.jsx)(uet,{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:s,includeLayoutControls:!0,defaultControls:det,showInheritanceLabelIndicators:!1})}var iy=a(E(),1),{useHasDimensionsPanel:fet,useSettingsForBlockElement:pet}=Et(Bye.privateApis);function met(){let[e]=Le(""),t=pet(e),r=fet(t);return(0,iy.jsxs)(iy.Fragment,{children:[(0,iy.jsx)(sr,{title:(0,Lye.__)("Layout")}),r&&(0,iy.jsx)(Dye,{})]})}var Vye=met;var UM=a(G(),1),dG=a(j(),1);var uG=a(j(),1),Wye=a(G(),1);var jye=a(ae(),1),zye=a(Y(),1),zM=a(U(),1),Hye=a(G(),1),Uye=a(j(),1);var jM=a(E(),1);function het({gap:e=2}){let{user:t}=(0,zM.useContext)(on),r=t?.styles,n=(0,zye.useSelect)(s=>{let l=s(jye.store).__experimentalGetCurrentThemeGlobalStylesVariations();return Array.isArray(l)?l:void 0},[])?.filter(s=>!fE(s,["color"])&&!fE(s,["typography","spacing"])),i=(0,zM.useMemo)(()=>[...[{title:(0,Uye.__)("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,jM.jsx)(Hye.__experimentalGrid,{columns:2,className:"global-styles-ui-style-variations-container",gap:e,children:i.map((s,l)=>(0,jM.jsx)(A_,{variation:s,children:c=>(0,jM.jsx)(iM,{label:s?.title,withHoverView:!0,isFocused:c,variation:s})},l))})}var HM=het;var H_=a(E(),1);function Gye(){return(0,H_.jsxs)(Wye.__experimentalVStack,{spacing:10,className:"global-styles-ui-variation-container",children:[(0,H_.jsx)(HM,{gap:3}),(0,H_.jsx)(j_,{title:(0,uG.__)("Color Variations"),gap:3}),(0,H_.jsx)(I_,{title:(0,uG.__)("Typography"),gap:3})]})}var Pp=a(E(),1);function get(){return(0,Pp.jsxs)(Pp.Fragment,{children:[(0,Pp.jsx)(sr,{title:(0,dG.__)("Browse styles"),description:(0,dG.__)("Choose a variation to change the look of the site.")}),(0,Pp.jsx)(UM.Card,{size:"small",isBorderless:!0,className:"global-styles-ui-screen-style-variations",children:(0,Pp.jsx)(UM.CardBody,{children:(0,Pp.jsx)(Gye,{})})})]})}var Yye=get;var RE=a(j(),1),qye=a(G(),1),Kye=a(be(),1);var tc=a(E(),1),{AdvancedPanel:vet}=Et(Kye.privateApis);function bet(){let[e]=qe("",void 0,"user",!1),[t,r]=qe("",void 0,"merged",!1);return(0,tc.jsxs)(tc.Fragment,{children:[(0,tc.jsx)(sr,{title:(0,RE.__)("Additional CSS"),description:(0,tc.jsxs)(tc.Fragment,{children:[(0,RE.__)("You can add custom CSS to further customize the appearance and layout of your site."),(0,tc.jsx)("br",{}),(0,tc.jsx)(qye.ExternalLink,{href:(0,RE.__)("https://developer.wordpress.org/advanced-administration/wordpress/css/"),className:"global-styles-ui-screen-css-help-link",children:(0,RE.__)("Learn more about CSS")})]})}),(0,tc.jsx)("div",{className:"global-styles-ui-screen-css",children:(0,tc.jsx)(vet,{value:e,onChange:r,inheritedValue:t})})]})}var Zye=bet;var kp=a(j(),1),U_=a(G(),1),ly=a(U(),1);var Xye=a(Y(),1),Qye=a(ae(),1),AE=a(U(),1);var yet={per_page:-1,_fields:"id,name,avatar_urls",context:"view",capabilities:["edit_theme_options"]},wet={per_page:100,page:1},WM=[];function sy({query:e}={}){let{user:t}=(0,AE.useContext)(on),r=(0,AE.useMemo)(()=>({...wet,...e}),[e]),{authors:o,currentUser:n,isDirty:i,revisions:s,isLoadingGlobalStylesRevisions:l,revisionsCount:c}=(0,Xye.useSelect)(u=>{let{__experimentalGetDirtyEntityRecords:d,getCurrentUser:f,getUsers:m,getRevisions:h,__experimentalGetCurrentGlobalStylesId:g,getEntityRecord:v,isResolving:b}=u(Qye.store),_=d()||[],y=f(),w=_.length>0,S=g(),C=(S?v("root","globalStyles",S):void 0)?._links?.["version-history"]?.[0]?.count??0,A=S&&h("root","globalStyles",S,r)||WM,k=m(yet)||WM,R=S?b("getRevisions",["root","globalStyles",S,r]):!1;return{authors:k,currentUser:y,isDirty:w,revisions:A,isLoadingGlobalStylesRevisions:R,revisionsCount:C}},[r]);return(0,AE.useMemo)(()=>{if(!o.length||l)return{revisions:WM,hasUnsavedChanges:i,isLoading:!0,revisionsCount:c};let u=s.map(f=>({...f,author:o.find(m=>m.id===f.author)}));if(s.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,s,n,o,t,l,c,r.page,r.per_page])}var Si=a(j(),1),ay=a(G(),1),Vd=a(ln(),1),Jye=a(ae(),1),$ye=a(Y(),1);var GM=a(Mo(),1);var ti=a(E(),1),{Badge:_et}=Et(ay.privateApis),xet=3600*1e3*24;function Cet({revision:e,previousRevision:t}){let r=F1(e,t,{maxResults:7});return r.length?(0,ti.jsx)("ul",{"data-testid":"global-styles-revision-changes",className:"global-styles-ui-screen-revisions__changes",children:r.map(o=>(0,ti.jsx)("li",{children:o},o))}):null}function Tet(e,t,r,o){return e==="parent"?(0,Si.__)("Reset the styles to the theme defaults"):e==="unsaved"?(0,Si.sprintf)((0,Si.__)("Unsaved changes by %s"),t):o?(0,Si.sprintf)((0,Si.__)("Changes saved by %1$s on %2$s. This revision matches current editor styles."),t,r):(0,Si.sprintf)((0,Si.__)("Changes saved by %1$s on %2$s"),t,r)}function Eet({userRevisions:e,selectedRevisionId:t,onChange:r,canApplyRevision:o,onApplyRevision:n}){let{currentThemeName:i,currentUser:s}=(0,$ye.useSelect)(u=>{let{getCurrentTheme:d,getCurrentUser:f}=u(Jye.store),m=d();return{currentThemeName:m?.name?.rendered||m?.stylesheet,currentUser:f()}},[]),l=(0,Vd.getDate)(null).getTime(),{datetimeAbbreviated:c}=(0,Vd.getSettings)().formats;return(0,ti.jsx)(ay.Composite,{orientation:"vertical",className:"global-styles-ui-screen-revisions__revisions-list","aria-label":(0,Si.__)("Global styles revisions list"),role:"listbox",children:e.map((u,d)=>{let{id:f,author:m,modified:h}=u,g=f==="unsaved",v=g?s:m,b=v?.name||(0,Si.__)("User"),_=v?.avatar_urls?.["48"],w=t?t===f:d===0,S=!o&&w,x=f==="parent",C=h instanceof Date?h.toISOString():h,A=(0,Vd.getDate)(C??null),k=C&&l-A.getTime()>xet?(0,Vd.dateI18n)(c,A):(0,Vd.humanTimeDiff)(C??A,void 0),R=Tet(f,b,(0,Vd.dateI18n)(c,A),S);return(0,ti.jsxs)(ay.Composite.Item,{className:"global-styles-ui-screen-revisions__revision-item","aria-current":w,role:"option",onKeyDown:M=>{let{keyCode:P}=M;(P===GM.ENTER||P===GM.SPACE)&&r(u)},onClick:M=>{M.preventDefault(),r(u)},"aria-selected":w,"aria-label":R,render:(0,ti.jsx)("div",{}),children:[(0,ti.jsx)("span",{className:"global-styles-ui-screen-revisions__revision-item-wrapper",children:x?(0,ti.jsxs)("span",{className:"global-styles-ui-screen-revisions__description",children:[(0,Si.__)("Default styles"),(0,ti.jsx)("span",{className:"global-styles-ui-screen-revisions__meta",children:i})]}):(0,ti.jsxs)("span",{className:"global-styles-ui-screen-revisions__description",children:[g?(0,ti.jsx)("span",{className:"global-styles-ui-screen-revisions__date",children:(0,Si.__)("(Unsaved)")}):(0,ti.jsx)("time",{className:"global-styles-ui-screen-revisions__date",dateTime:C,children:k}),(0,ti.jsxs)("span",{className:"global-styles-ui-screen-revisions__meta",children:[(0,ti.jsx)("img",{alt:b,src:_}),b]}),w&&(0,ti.jsx)(Cet,{revision:u,previousRevision:d<e.length?e[d+1]:void 0})]})}),w&&(S?(0,ti.jsx)(_et,{className:"global-styles-ui-screen-revisions__active-badge",intent:"info",children:(0,Si.__)("Active")}):(0,ti.jsx)(ay.Button,{size:"compact",variant:"primary",className:"global-styles-ui-screen-revisions__apply-button",onClick:n,"aria-label":(0,Si.__)("Apply the selected revision to your site."),children:x?(0,Si.__)("Reset to defaults"):(0,Si.__)("Apply")}))]},f)})})}var e0e=Eet;var rc=a(G(),1),ri=a(j(),1);var tu=a(E(),1);function t0e({currentPage:e,numPages:t,changePage:r,totalItems:o,className:n,disabled:i=!1,buttonVariant:s="tertiary",label:l=(0,ri.__)("Pagination")}){return(0,tu.jsxs)(rc.__experimentalHStack,{expanded:!1,as:"nav","aria-label":l,spacing:3,justify:"flex-start",className:J("global-styles-ui-pagination",n),children:[(0,tu.jsx)(rc.__experimentalText,{variant:"muted",className:"global-styles-ui-pagination__total",children:(0,ri.sprintf)((0,ri._n)("%d item","%d items",o),o)}),(0,tu.jsxs)(rc.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,tu.jsx)(rc.Button,{variant:s,onClick:()=>r(1),accessibleWhenDisabled:!0,disabled:i||e===1,label:(0,ri.__)("First page"),icon:(0,ri.isRTL)()?kl:Rl,size:"compact"}),(0,tu.jsx)(rc.Button,{variant:s,onClick:()=>r(e-1),accessibleWhenDisabled:!0,disabled:i||e===1,label:(0,ri.__)("Previous page"),icon:(0,ri.isRTL)()?hr:Ar,size:"compact"})]}),(0,tu.jsx)(rc.__experimentalText,{variant:"muted",children:(0,ri.sprintf)((0,ri._x)("%1$d of %2$d","paging"),e,t)}),(0,tu.jsxs)(rc.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,tu.jsx)(rc.Button,{variant:s,onClick:()=>r(e+1),accessibleWhenDisabled:!0,disabled:i||e===t,label:(0,ri.__)("Next page"),icon:(0,ri.isRTL)()?Ar:hr,size:"compact"}),(0,tu.jsx)(rc.Button,{variant:s,onClick:()=>r(t),accessibleWhenDisabled:!0,disabled:i||e===t,label:(0,ri.__)("Last page"),icon:(0,ri.isRTL)()?Rl:kl,size:"compact"})]})]})}var ru=a(E(),1),r0e=10;function Pet({onClose:e}={}){let{user:t,onChange:r}=(0,ly.useContext)(on),{params:o,goTo:n}=(0,U_.useNavigator)(),{revisionId:i}=o,[s,l]=(0,ly.useState)(1),{revisions:c,isLoading:u,hasUnsavedChanges:d,revisionsCount:f}=sy({query:{per_page:r0e,page:s}}),m=Math.ceil(f/r0e),[h,g]=(0,ly.useState)(!1),v=(0,ly.useMemo)(()=>i&&c.find(k=>String(k.id)===String(i))||t,[i,c,t]),b=yv(v,t),_=()=>{e&&e()},y=A=>{r(A),g(!1),_()},w=A=>{n(`/revisions/${A.id}`)},S=v?.id??c[0]?.id,x=!!S&&S!=="unsaved"&&!b,C=!!c.length;return(0,ru.jsxs)(ru.Fragment,{children:[(0,ru.jsx)(sr,{title:f?(0,kp.sprintf)((0,kp.__)("Revisions (%d)"),f):(0,kp.__)("Revisions"),description:(0,kp.__)(`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:_}),!C&&(0,ru.jsx)(U_.Spinner,{className:"global-styles-ui-screen-revisions__loading"}),(0,ru.jsx)(e0e,{onChange:w,selectedRevisionId:S,userRevisions:c,canApplyRevision:x,onApplyRevision:()=>d?g(!0):y(v)}),m>1&&(0,ru.jsx)("div",{className:"global-styles-ui-screen-revisions__footer",children:(0,ru.jsx)(t0e,{className:"global-styles-ui-screen-revisions__pagination",currentPage:s,numPages:m,changePage:l,totalItems:f,disabled:u,label:(0,kp.__)("Global Styles pagination")})}),h&&(0,ru.jsx)(U_.__experimentalConfirmDialog,{isOpen:h,confirmButtonText:(0,kp.__)("Apply"),onConfirm:()=>y(v),onCancel:()=>g(!1),size:"medium",children:(0,kp.__)("Are you sure you want to apply this revision? Any unsaved changes will be lost.")})]})}var o0e=Pet;var Nn=a(j(),1),Wo=a(G(),1);var l0e=a(U(),1);var n0e=a(G(),1),i0e=a(j(),1),s0e=a(E(),1);function ket({text:e,confirmButtonText:t,isOpen:r,toggleOpen:o,onConfirm:n}){let i=async()=>{o(),n()},s=()=>{o()};return(0,s0e.jsx)(n0e.__experimentalConfirmDialog,{isOpen:r,cancelButtonText:(0,i0e.__)("Cancel"),confirmButtonText:t,onCancel:s,onConfirm:i,size:"medium",children:e})}var a0e=ket;var ar=a(E(),1),{Menu:IE}=Et(Wo.privateApis);function fG({label:e,origin:t,sizes:r,handleAddFontSize:o,handleResetFontSizes:n}){let[i,s]=(0,l0e.useState)(!1),l=()=>s(!i),c=t==="custom"?(0,Nn.__)("Are you sure you want to remove all custom font size presets?"):(0,Nn.__)("Are you sure you want to reset all font size presets to their default values?");return(0,ar.jsxs)(ar.Fragment,{children:[n&&i&&(0,ar.jsx)(a0e,{text:c,confirmButtonText:t==="custom"?(0,Nn.__)("Remove"):(0,Nn.__)("Reset"),isOpen:i,toggleOpen:l,onConfirm:n}),(0,ar.jsxs)(Wo.__experimentalVStack,{spacing:4,children:[(0,ar.jsxs)(Wo.__experimentalHStack,{children:[(0,ar.jsx)(Uo,{level:3,children:e}),(0,ar.jsxs)(Wo.FlexItem,{className:"global-styles-ui__typography-panel__options-container",children:[t==="custom"&&(0,ar.jsx)(Wo.Button,{label:(0,Nn.__)("Add font size"),icon:Cc,size:"small",onClick:o}),!!n&&(0,ar.jsxs)(IE,{children:[(0,ar.jsx)(IE.TriggerButton,{render:(0,ar.jsx)(Wo.Button,{size:"small",icon:bo,label:(0,Nn.__)("Font size presets options")})}),(0,ar.jsx)(IE.Popover,{children:(0,ar.jsx)(IE.Item,{onClick:l,children:(0,ar.jsx)(IE.ItemLabel,{children:t==="custom"?(0,Nn.__)("Remove font size presets"):(0,Nn.__)("Reset font size presets")})})})]})]})]}),!!r.length&&(0,ar.jsx)(Wo.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:r.map(u=>(0,ar.jsx)(xo,{path:`/typography/font-sizes/${t}/${u.slug}`,children:(0,ar.jsxs)(Wo.__experimentalHStack,{children:[(0,ar.jsx)(Wo.FlexItem,{className:"global-styles-ui-font-size__item",children:u.name}),(0,ar.jsx)(Wo.FlexItem,{display:"flex",children:(0,ar.jsx)(Cn,{icon:(0,Nn.isRTL)()?Ar:hr})})]})},u.slug))})]})]})}function Ret(){let[e,t]=Le("typography.fontSizes.theme"),[r]=Le("typography.fontSizes.theme","base"),[o,n]=Le("typography.fontSizes.default"),[i]=Le("typography.fontSizes.default","base"),[s=[],l]=Le("typography.fontSizes.custom"),[c]=Le("typography.defaultFontSizes"),u=()=>{let f=rM(s,"custom-"),m={name:(0,Nn.sprintf)((0,Nn.__)("New Font Size %d"),f),size:"16px",slug:`custom-${f}`};l([...s,m])},d=(f,m)=>f.map(h=>h.size).join("")===m.map(h=>h.size).join("");return(0,ar.jsxs)(Wo.__experimentalVStack,{spacing:2,children:[(0,ar.jsx)(sr,{title:(0,Nn.__)("Font size presets"),description:(0,Nn.__)("Create and edit the presets used for font sizes across the site.")}),(0,ar.jsx)(Wo.__experimentalView,{children:(0,ar.jsx)(Wo.__experimentalSpacer,{paddingX:4,children:(0,ar.jsxs)(Wo.__experimentalVStack,{spacing:8,children:[!!e?.length&&(0,ar.jsx)(fG,{label:(0,Nn.__)("Theme"),origin:"theme",sizes:e,handleAddFontSize:u,handleResetFontSizes:d(e,r)?void 0:()=>t(r)}),c&&!!o?.length&&(0,ar.jsx)(fG,{label:(0,Nn.__)("Default"),origin:"default",sizes:o,handleAddFontSize:u,handleResetFontSizes:d(o,i)?void 0:()=>n(i)}),(0,ar.jsx)(fG,{label:(0,Nn.__)("Custom"),origin:"custom",sizes:s,handleAddFontSize:u,handleResetFontSizes:s.length>0?()=>l([]):void 0})]})})})]})}var c0e=Ret;var Aa=a(j(),1),Go=a(G(),1);var OE=a(U(),1);var u0e=a(be(),1),d0e=a(j(),1);var f0e=a(E(),1);function Aet({fontSize:e}){let[t]=qe("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,u0e.getComputedFluidTypographyValue)(r);return(0,f0e.jsx)("div",{className:"global-styles-ui-typography-preview",style:{fontSize:o,fontFamily:t?.fontFamily??"serif"},children:(0,d0e.__)("Aa")})}var p0e=Aet;var m0e=a(G(),1),W_=a(j(),1),h0e=a(E(),1);function Iet({fontSize:e,isOpen:t,toggleOpen:r,handleRemoveFontSize:o}){let n=async()=>{r(),o(e)},i=()=>{r()};return(0,h0e.jsx)(m0e.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,W_.__)("Cancel"),confirmButtonText:(0,W_.__)("Delete"),onCancel:i,onConfirm:n,size:"medium",children:e&&(0,W_.sprintf)((0,W_.__)('Are you sure you want to delete "%s" font size preset?'),e.name)})}var g0e=Iet;var ou=a(G(),1),G_=a(j(),1),v0e=a(U(),1),Rp=a(E(),1);function Oet({fontSize:e,toggleOpen:t,handleRename:r}){let[o,n]=(0,v0e.useState)(e.name),i=()=>{o&&o.trim()&&r(o),t()};return(0,Rp.jsx)(ou.Modal,{onRequestClose:t,focusOnMount:"firstContentElement",title:(0,G_.__)("Rename"),size:"small",children:(0,Rp.jsx)("form",{onSubmit:s=>{s.preventDefault(),i(),t()},children:(0,Rp.jsxs)(ou.__experimentalVStack,{spacing:"3",children:[(0,Rp.jsx)(ou.__experimentalInputControl,{autoComplete:"off",value:o,onChange:n,label:(0,G_.__)("Name"),placeholder:(0,G_.__)("Font size preset name")}),(0,Rp.jsxs)(ou.__experimentalHStack,{justify:"right",children:[(0,Rp.jsx)(ou.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,G_.__)("Cancel")}),(0,Rp.jsx)(ou.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,G_.__)("Save")})]})]})})})}var b0e=Oet;var Mn=a(G(),1),Ap=a(E(),1),Net=["px","em","rem","vw","vh"];function YM(e){let{baseControlProps:t}=(0,Mn.useBaseControlProps)(e),{value:r,onChange:o,fallbackValue:n,disabled:i,label:s}=e,l=(0,Mn.__experimentalUseCustomUnits)({availableUnits:Net}),[c,u="px"]=(0,Mn.__experimentalParseQuantityAndUnitFromRawValue)(r,l),d=!!u&&["em","rem","vw","vh"].includes(u);return(0,Ap.jsx)(Mn.BaseControl,{...t,children:(0,Ap.jsxs)(Mn.Flex,{children:[(0,Ap.jsx)(Mn.FlexItem,{isBlock:!0,children:(0,Ap.jsx)(Mn.__experimentalUnitControl,{label:s,hideLabelFromVision:!0,value:r,onChange:h=>{o?.(h)},units:l,min:0,disabled:i})}),(0,Ap.jsx)(Mn.FlexItem,{isBlock:!0,children:(0,Ap.jsx)(Mn.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,Ap.jsx)(Mn.RangeControl,{label:s,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 rr=a(E(),1),{Menu:cy}=Et(Go.privateApis);function Met(){let[e,t]=(0,OE.useState)(!1),[r,o]=(0,OE.useState)(!1),{params:{origin:n,slug:i},goBack:s}=(0,Go.useNavigator)(),[l,c]=Le("typography.fontSizes"),[u]=Le("typography.fluid"),d=l?.[n]??[],f=d.find(k=>k.slug===i);if((0,OE.useEffect)(()=>{i&&!f&&s()},[i,f,s]),!n||!i||!f)return null;let m=f?.fluid!==void 0?!!f.fluid:!!u,h=typeof f?.fluid=="object",g=k=>{S("name",k)},v=k=>{S("size",k)},b=k=>{S("fluid",k)},_=k=>{k?S("fluid",{min:f.size,max:f.size}):S("fluid",!0)},y=k=>{let R=typeof f.fluid=="object"?f.fluid:{};S("fluid",{...R,min:k})},w=k=>{let R=typeof f.fluid=="object"?f.fluid:{};S("fluid",{...R,max:k})},S=(k,R)=>{let M=d.map(P=>P.slug===i?{...P,[k]:R}:P);c({...l,[n]:M})},x=()=>{let k=d.filter(R=>R.slug!==i);c({...l,[n]:k})},C=()=>{t(!e)},A=()=>{o(!r)};return(0,rr.jsxs)(rr.Fragment,{children:[(0,rr.jsx)(g0e,{fontSize:f,isOpen:e,toggleOpen:C,handleRemoveFontSize:x}),r&&(0,rr.jsx)(b0e,{fontSize:f,toggleOpen:A,handleRename:g}),(0,rr.jsxs)(Go.__experimentalVStack,{spacing:4,children:[(0,rr.jsxs)(Go.__experimentalHStack,{justify:"space-between",alignment:"flex-start",children:[(0,rr.jsx)(sr,{title:f.name,description:(0,Aa.sprintf)((0,Aa.__)("Manage the font size %s."),f.name)}),n==="custom"&&(0,rr.jsx)(Go.FlexItem,{children:(0,rr.jsx)(Go.__experimentalSpacer,{marginTop:3,marginBottom:0,paddingX:4,children:(0,rr.jsxs)(cy,{children:[(0,rr.jsx)(cy.TriggerButton,{render:(0,rr.jsx)(Go.Button,{size:"small",icon:bo,label:(0,Aa.__)("Font size options")})}),(0,rr.jsxs)(cy.Popover,{children:[(0,rr.jsx)(cy.Item,{onClick:A,children:(0,rr.jsx)(cy.ItemLabel,{children:(0,Aa.__)("Rename")})}),(0,rr.jsx)(cy.Item,{onClick:C,children:(0,rr.jsx)(cy.ItemLabel,{children:(0,Aa.__)("Delete")})})]})]})})})]}),(0,rr.jsx)(Go.__experimentalView,{children:(0,rr.jsx)(Go.__experimentalSpacer,{paddingX:4,marginBottom:0,paddingBottom:6,children:(0,rr.jsxs)(Go.__experimentalVStack,{spacing:4,children:[(0,rr.jsx)(Go.FlexItem,{children:(0,rr.jsx)(p0e,{fontSize:f})}),(0,rr.jsx)(YM,{label:(0,Aa.__)("Size"),value:!h&&f.size?String(f.size):"",onChange:v,disabled:h}),(0,rr.jsx)(Go.ToggleControl,{label:(0,Aa.__)("Fluid typography"),help:(0,Aa.__)("Scale the font size dynamically to fit the screen or viewport."),checked:m,onChange:b}),m&&(0,rr.jsx)(Go.ToggleControl,{label:(0,Aa.__)("Custom fluid values"),help:(0,Aa.__)("Set custom min and max values for the fluid font size."),checked:h,onChange:_}),h&&(0,rr.jsxs)(rr.Fragment,{children:[(0,rr.jsx)(YM,{label:(0,Aa.__)("Minimum"),value:typeof f?.fluid=="object"?f.fluid?.min:void 0,onChange:y}),(0,rr.jsx)(YM,{label:(0,Aa.__)("Maximum"),value:typeof f?.fluid=="object"?f.fluid?.max:void 0,onChange:w})]})]})})})]})]})}var y0e=Met;var $e=a(E(),1);function Fet({parentMenu:e,blockStyles:t,blockName:r,selectedViewport:o,showResponsiveStateControls:n}){return(0,$e.jsx)($e.Fragment,{children:t.map((i,s)=>(0,$e.jsx)(Y_.Navigator.Screen,{path:e+"/variations/"+i.name,children:(0,$e.jsx)(ZW,{name:r,variation:i.name,selectedViewport:o,showResponsiveStateControls:n})},s))})}function Det({name:e,parentMenu:t="",selectedViewport:r,showResponsiveStateControls:o}){let n=(0,w0e.useSelect)(i=>{if(!e)return[];let{getBlockStyles:s}=i(qM.store);return s(e)},[e]);return n?.length?(0,$e.jsx)(Fet,{parentMenu:t,blockStyles:n,blockName:e||"",selectedViewport:r,showResponsiveStateControls:o}):null}function mG({value:e,baseValue:t,onChange:r,path:o,onPathChange:n,fontLibraryEnabled:i=!1,serverCSS:s,serverSettings:l,selectedViewport:c,showResponsiveStateControls:u=!0}){let d=(0,qM.getBlockTypes)(),f=(0,lg.useMemo)(()=>Fi(t,e),[t,e]),[m,h]=wv(f,[],{styleOptions:{variationStyles:!0}}),g=(0,lg.useMemo)(()=>[...s??[],...m??[]],[s,m]),v=(0,lg.useMemo)(()=>({...l,__experimentalFeatures:h,styles:g}),[h,l,g]);return(0,$e.jsx)(uE,{value:e,baseValue:t,onChange:r,fontLibraryEnabled:i,children:(0,$e.jsx)(_0e.BlockEditorProvider,{settings:v,children:(0,$e.jsxs)(Y_.Navigator,{className:"global-styles-ui-sidebar__navigator-provider",initialPath:o||"/",children:[(o||n)&&(0,$e.jsx)(Let,{path:o,onPathChange:n}),(0,$e.jsx)(yn,{path:"/",children:(0,$e.jsx)(uve,{})}),(0,$e.jsx)(yn,{path:"/colors",children:(0,$e.jsx)(sye,{})}),(0,$e.jsx)(yn,{path:"/typography",children:(0,$e.jsx)(Gbe,{})}),(0,$e.jsx)(yn,{path:"/typography/font-sizes",children:(0,$e.jsx)(c0e,{})}),(0,$e.jsx)(yn,{path:"/typography/font-sizes/:origin/:slug",children:(0,$e.jsx)(y0e,{})}),(0,$e.jsx)(yn,{path:"/layout",children:(0,$e.jsx)(Vye,{})}),(0,$e.jsx)(yn,{path:"/colors/palette",children:(0,$e.jsx)(hye,{})}),(0,$e.jsx)(yn,{path:"/variations",children:(0,$e.jsx)(Yye,{})}),(0,$e.jsx)(yn,{path:"/css",children:(0,$e.jsx)(Zye,{})}),(0,$e.jsx)(yn,{path:"/revisions/:revisionId?",children:(0,$e.jsx)(o0e,{})}),(0,$e.jsx)(yn,{path:"/shadows",children:(0,$e.jsx)(Oye,{})}),(0,$e.jsx)(yn,{path:"/shadows/edit/:category/:slug",children:(0,$e.jsx)(Nye,{})}),(0,$e.jsx)(yn,{path:"/background",children:(0,$e.jsx)(_ye,{})}),(0,$e.jsx)(yn,{path:"/typography/text",children:(0,$e.jsx)(B_,{element:"text"})}),(0,$e.jsx)(yn,{path:"/typography/link",children:(0,$e.jsx)(B_,{element:"link"})}),(0,$e.jsx)(yn,{path:"/typography/heading",children:(0,$e.jsx)(B_,{element:"heading"})}),(0,$e.jsx)(yn,{path:"/typography/caption",children:(0,$e.jsx)(B_,{element:"caption"})}),(0,$e.jsx)(yn,{path:"/typography/button",children:(0,$e.jsx)(B_,{element:"button"})}),(0,$e.jsx)(yn,{path:"/blocks",children:(0,$e.jsx)(bve,{})}),d.map(b=>(0,$e.jsxs)(lg.Fragment,{children:[(0,$e.jsx)(yn,{path:"/blocks/"+encodeURIComponent(b.name),children:(0,$e.jsx)(ZW,{name:b.name,selectedViewport:c,showResponsiveStateControls:u})}),(0,$e.jsx)(Det,{name:b.name,parentMenu:"/blocks/"+encodeURIComponent(b.name),selectedViewport:c,showResponsiveStateControls:u})]},b.name))]})})})}function yn({path:e,children:t}){return(0,$e.jsx)(Y_.Navigator.Screen,{className:"global-styles-ui-sidebar__navigator-screen",path:e,children:t})}function Let({path:e,onPathChange:t}){let r=(0,Y_.useNavigator)(),{path:o}=r.location,n=(0,pG.usePrevious)(e),i=(0,pG.usePrevious)(o);return(0,lg.useEffect)(()=>{e&&e!==o&&(e!==n?r.goTo(e):o!==i&&t&&t(o??"/"))},[t,e,i,n,o,r]),null}var hG=a(E(),1);function q_(e){return function({value:r,baseValue:o,onChange:n,...i}){return(0,hG.jsx)(uE,{value:r,baseValue:o,onChange:n,children:(0,hG.jsx)(e,{...i})})}}var Bet=q_(HM);var Vet=q_(j_);var jet=q_(I_);var zet=a(E(),1);var A0e=a(Tf(),1);var S0e=a(Y(),1),x0e=a(U(),1),C0e=a(be(),1),T0e=a(Te(),1);function E0e({path:e,onPathChange:t}){let{selectedBlockName:r,selectedBlockClientId:o}=(0,S0e.useSelect)(s=>{let{getSelectedBlockClientId:l,getBlockName:c}=s(C0e.store),u=l();return{selectedBlockName:c(u),selectedBlockClientId:u}},[]),n=!0,i=(0,T0e.usePrevious)(o);return(0,x0e.useEffect)(()=>{if(o===i||!o||!n||!e||e!=="/blocks"&&!e.startsWith("/blocks/"))return;let s="/blocks/"+encodeURIComponent(r);s!==e&&t?.(s)},[o,i,r,n,e,t]),null}var uy=a(U(),1);var K_=a(ae(),1),Z_=a(Y(),1),P0e=a(be(),1);var{cleanEmptyObject:gG}=K(P0e.privateApis);function Het(){let{globalStylesId:e,isReady:t,settings:r,styles:o,_links:n}=(0,Z_.useSelect)(u=>{let{getEntityRecord:d,getEditedEntityRecord:f,hasFinishedResolution:m,canUser:h}=u(K_.store),g=u(K_.store).__experimentalGetCurrentGlobalStylesId(),v,b=g?h("update",{kind:"root",name:"globalStyles",id:g}):null;g&&typeof b=="boolean"&&(b?v=f("root","globalStyles",g):v=d("root","globalStyles",g,{context:"view"}));let _=!1;return m("__experimentalGetCurrentGlobalStylesId")&&(g?_=b?m("getEditedEntityRecord",["root","globalStyles",g]):m("getEntityRecord",["root","globalStyles",g,{context:"view"}]):_=!0),{globalStylesId:g,isReady:_,settings:v?.settings,styles:v?.styles,_links:v?._links}},[]),{getEditedEntityRecord:i}=(0,Z_.useSelect)(K_.store),{editEntityRecord:s}=(0,Z_.useDispatch)(K_.store),l=(0,uy.useMemo)(()=>({settings:r??{},styles:o??{},_links:n??{}}),[r,o,n]),c=(0,uy.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;s("root","globalStyles",e,{styles:gG(h.styles)||{},settings:gG(h.settings)||{},_links:gG(h._links)||{}},d)},[e,s,i]);return[t,l,c]}function Uet(){let e=(0,Z_.useSelect)(t=>t(K_.store).__experimentalGetCurrentThemeBaseGlobalStyles(),[]);return[!!e,e]}function Hr(){let[e,t,r]=Het(),[o,n]=Uet();return{merged:(0,uy.useMemo)(()=>!e||!o?{}:Fi(n||{},t),[e,o,n,t]),base:n||{},user:t,setUser:r,isReady:e&&o}}function cg(e,t){let{merged:r}=Hr();return(0,uy.useMemo)(()=>bm(r,e,t),[r,e,t])}function vG(e,t){let{merged:r}=Hr();return(0,uy.useMemo)(()=>vv(r,e,t),[r,e,t])}var dy=a(E(),1);function Wet(e){let t=e?.styles,r=e?.__unstableResolvedAssets,o=e?.colors,n=e?.gradients,i=e?.__experimentalDiscussionSettings,s=e?.fontLibraryEnabled??!0,l=(0,R0e.useSelect)(d=>{let{canUser:f}=d(k0e.store);return f("create",{kind:"postType",name:"attachment"})?A0e.uploadMedia:void 0},[]),c=(0,bG.useMemo)(()=>t?t.filter(d=>!d.isGlobalStyles):[],[t]),u=(0,bG.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:s}}function KM({path:e,onPathChange:t,settings:r,selectedViewport:o,showResponsiveStateControls:n}){let{user:i,base:s,setUser:l,isReady:c}=Hr(),{serverCSS:u,serverSettings:d,fontLibraryEnabled:f}=Wet(r);return c?(0,dy.jsxs)(dy.Fragment,{children:[(0,dy.jsx)(mG,{value:i,baseValue:s||{},onChange:l,path:e,onPathChange:t,fontLibraryEnabled:f,serverCSS:u,serverSettings:d,selectedViewport:o,showResponsiveStateControls:n}),(0,dy.jsx)(E0e,{path:e,onPathChange:t})]}):null}var{store:Get}=K(T_),I0e={};function Yet(e){let{RECEIVE_INTERMEDIATE_RESULTS:t}=K(Ia.privateApis),{getEntityRecords:r}=e(Ia.store);return r("postType","wp_block",{per_page:-1,[t]:!0})}function qet(e){return e(Ia.store).getUserPatternCategories()}var Ket=["__experimentalBlockBindingsSupportedAttributes","__experimentalBlockDirectory","__experimentalDiscussionSettings","__experimentalFeatures","__experimentalGlobalStylesBaseStyles","allImageSizes","alignWide","blockInspectorTabs","maxUploadFileSize","allowedMimeTypes","bodyPlaceholder","canEditCSS","canLockBlocks","canUpdateBlockBindings","capabilities","clearBlockSelection","codeEditingEnabled","colors","disableContentOnlyForTemplateParts","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:Zet,globalStylesLinksDataKey:Xet,selectBlockPatternsKey:Qet,reusableBlocksSelectKey:Jet,userPatternCategoriesSelectKey:$et,sectionRootClientIdKey:ett,mediaEditKey:ttt,getMediaSelectKey:rtt,isIsolatedEditorKey:ott,deviceTypeKey:ntt,isNavigationOverlayContextKey:itt,isNavigationPostEditorKey:stt,mediaUploadOnSuccessKey:att,mediaSideloadFromUrlKey:ltt,openMediaEditorModalKey:ctt}=K(ZM.privateApis);function utt(e,t,r,o){let n=(0,M0e.useViewportMatch)("medium"),{allImageSizes:i,bigImageSizeThreshold:s,imageStripMeta:l,imageMaxBitDepth:c,allowRightClickOverrides:u,blockTypes:d,focusMode:f,hasFixedToolbar:m,isDistractionFree:h,keepCaretInsideBlock:g,hasUploadPermissions:v,hiddenBlockTypes:b,canUseUnfilteredHTML:_,userCanCreatePages:y,pageOnFront:w,pageForPosts:S,restBlockPatternCategories:x,sectionRootClientId:C,deviceType:A,isNavigationOverlayContext:k,isRevisionsMode:R,viewablePostTypeLabel:M,currentPostId:P}=(0,fy.useSelect)(pe=>{let{canUser:$,getRawEntityRecord:te,getEntityRecord:de,getBlockPatternCategories:ve,getPostType:we}=pe(Ia.store),{get:oe}=pe(N0e.store),{getBlockTypes:ee}=pe(F0e.store),{getCurrentPostId:ue,getCurrentPostType:ie}=pe(I),{getDeviceType:le,isRevisionsMode:Oe}=K(pe(I)),{getBlocksByName:ke,getBlockAttributes:Me}=pe(ZM.store),Ne=$("read",{kind:"root",name:"site"})?de("root","site"):void 0,Fe=de("root","__unstableBase"),X=ie(),ge=X?we(X):void 0;function Ue(){return o==="template-locked"?ke("core/post-content")?.[0]??"":ke("core/group").find(Ye=>Me(Ye)?.tagName==="main")??""}return{allImageSizes:Fe?.image_sizes,bigImageSizeThreshold:Fe?.image_size_threshold,imageStripMeta:Fe?.image_strip_meta,imageMaxBitDepth:Fe?.image_max_bit_depth,allowRightClickOverrides:oe("core","allowRightClickOverrides"),blockTypes:ee(),canUseUnfilteredHTML:te("postType",t,r)?._links?.hasOwnProperty("wp:action-unfiltered-html"),focusMode:oe("core","focusMode"),hasFixedToolbar:oe("core","fixedToolbar")||!n,hiddenBlockTypes:oe("core","hiddenBlockTypes"),isDistractionFree:oe("core","distractionFree"),keepCaretInsideBlock:oe("core","keepCaretInsideBlock"),hasUploadPermissions:$("create",{kind:"postType",name:"attachment"})??!0,userCanCreatePages:$("create",{kind:"postType",name:"page"}),pageOnFront:Ne?.page_on_front,pageForPosts:Ne?.page_for_posts,viewablePostTypeLabel:ge?.viewable?ge?.labels?.singular_name:void 0,currentPostId:ue(),restBlockPatternCategories:ve(),sectionRootClientId:Ue(),deviceType:le(),isNavigationOverlayContext:t==="wp_template_part"&&r?de("postType","wp_template_part",r)?.area==="navigation-overlay":!1,isRevisionsMode:Oe()}},[t,r,n,o]),{merged:T}=Hr(),N=T.styles??I0e,L=T._links??I0e,F=e.__experimentalAdditionalBlockPatterns??e.__experimentalBlockPatterns,D=e.__experimentalAdditionalBlockPatternCategories??e.__experimentalBlockPatternCategories,z=(0,ug.useMemo)(()=>[...F||[]].filter(({postTypes:pe})=>!pe||Array.isArray(pe)&&pe.includes(t)),[F,t]),B=(0,ug.useMemo)(()=>[...D||[],...x||[]].filter((pe,$,te)=>$===te.findIndex(de=>pe.name===de.name)),[D,x]),{undo:O,setIsInserterOpened:V}=(0,fy.useDispatch)(I),{editMediaEntity:W}=K((0,fy.useDispatch)(Ia.store)),{saveEntityRecord:q}=(0,fy.useDispatch)(Ia.store),{openMediaEditorModal:Z}=(0,fy.useDispatch)(Get),Q=(0,ug.useCallback)(pe=>y?q("postType","page",pe):Promise.reject({message:(0,O0e.__)("You do not have permission to create Pages.")}),[q,y]),ce=(0,ug.useMemo)(()=>b&&b.length>0?(e.allowedBlockTypes===!0?d.map(({name:$})=>$):e.allowedBlockTypes||[]).filter($=>!b.includes($)):e.allowedBlockTypes,[e.allowedBlockTypes,b,d]),re=e.focusMode===!1,fe=(0,ug.useMemo)(()=>Sge(P,M),[P,M]);return(0,ug.useMemo)(()=>{let pe={...Object.fromEntries(Object.entries(e).filter(([$])=>Ket.includes($))),[Zet]:N,[Xet]:L,allImageSizes:i,bigImageSizeThreshold:s,imageStripMeta:l,imageMaxBitDepth:c,allowedBlockTypes:ce,allowRightClickOverrides:u,focusMode:f&&!re,hasFixedToolbar:m,isDistractionFree:h,keepCaretInsideBlock:g,[rtt]:($,te)=>$(Ia.store).getEntityRecord("postType","attachment",te),[ttt]:v?W:void 0,[ctt]:({id:$,onUpdate:te,onClose:de})=>Z({id:$,onUpdate:te,onClose:de}),mediaUpload:v?M2:void 0,[att]:v?Tge:void 0,mediaSideload:v?Pge:void 0,[ltt]:v?Ige:void 0,mediaFinalize:v?Mge:void 0,mediaDelete:v?Dge:void 0,__experimentalBlockPatterns:z,[Qet]:$=>{let{hasFinishedResolution:te,getBlockPatternsForPostType:de}=K($(Ia.store)),ve=de(t);return te("getBlockPatterns")?ve:void 0},[Jet]:Yet,[$et]:qet,__experimentalBlockPatternCategories:B,__experimentalFetchLinkSuggestions:($,te)=>(0,Ia.__experimentalFetchLinkSuggestions)($,te,e),inserterMediaCategories:fe,__experimentalFetchRichUrlData:Ia.__experimentalFetchUrlData,__experimentalCanUserUseUnfilteredHTML:_,__experimentalUndo:O,outlineMode:!h&&t==="wp_template",__experimentalCreatePageEntity:Q,__experimentalUserCanCreatePages:y,pageOnFront:w,pageForPosts:S,__experimentalPreferPatternsOnRoot:t==="wp_template",templateLock:t==="wp_navigation"?"insert":e.templateLock,template:t==="wp_navigation"?[["core/navigation",{},[]]]:e.template,__experimentalSetIsInserterOpened:V,[ett]:C,editorTool:o==="post-only"&&t!=="wp_template"?"edit":void 0,[ott]:["wp_template_part","wp_block","wp_navigation"].includes(t),[stt]:t==="wp_navigation",disableContentOnlyForTemplateParts:o==="template-locked"||e.disableContentOnlyForTemplateParts,...A?{[ntt]:A}:{},[itt]:k};return R&&(pe.isPreviewMode=!0),pe},[R,ce,u,f,re,m,h,g,e,v,z,B,fe,_,O,Q,y,w,S,t,V,C,N,L,o,W,Z,A,i,s,l,c,k])}var D0e=utt;var NE=a(Y(),1),X_=a(be(),1),QM=a(U(),1);var L0e=a(U(),1),B0e=a(jn(),1),dtt=["core/post-title","core/post-featured-image","core/post-content"];function XM(){return(0,L0e.useMemo)(()=>[...(0,B0e.applyFilters)("editor.postContentBlockTypes",dtt)],[])}function V0e(){let e=XM(),{contentOnlyIds:t,templateParts:r}=(0,NE.useSelect)(i=>{let{getPostBlocksByName:s}=K(i(I)),{getBlocksByName:l}=i(X_.store);return{contentOnlyIds:s(e),templateParts:l("core/template-part")}},[e]),o=(0,NE.useSelect)(i=>{let{getBlockOrder:s}=i(X_.store);return r.flatMap(l=>s(l))},[r]),n=(0,NE.useRegistry)();return(0,QM.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:s,__unstableMarkNextChangeAsNotPersistent:l}=n.dispatch(X_.store);return l(),i("","disabled"),()=>{l(),s("")}},[n]),(0,QM.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:s,__unstableMarkNextChangeAsNotPersistent:l}=n.dispatch(X_.store);return n.batch(()=>{for(let c of r)l(),i(c,"contentOnly")}),()=>{n.batch(()=>{for(let c of r)l(),s(c)})}},[r,n]),(0,QM.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:s,__unstableMarkNextChangeAsNotPersistent:l}=n.dispatch(X_.store),c=new Set(t);return n.batch(()=>{for(let u of t)l(),i(u,"contentOnly");for(let u of o)c.has(u)||(l(),i(u,"disabled"))}),()=>{n.batch(()=>{for(let u of t)l(),s(u);for(let u of o)c.has(u)||(l(),s(u))})}},[t,o,n]),null}var j0e=a(U(),1),JM=a(Y(),1),yG=a(be(),1);function z0e(){let e=(0,JM.useRegistry)(),t=(0,JM.useSelect)(r=>r(yG.store).getBlockOrder()?.[0],[]);(0,j0e.useEffect)(()=>{if(!t)return;let{setBlockEditingMode:r,unsetBlockEditingMode:o,__unstableMarkNextChangeAsNotPersistent:n}=e.dispatch(yG.store);return n(),r(t,"contentOnly"),()=>{n(),o(t)}},[e,t])}var U0e=a(U(),1),Q_=a(jn(),1),H0e=["wp_block","wp_template","wp_template_part"];function W0e(e,t){(0,U0e.useEffect)(()=>((0,Q_.addFilter)("blockEditor.__unstableCanInsertBlockType","removeTemplatePartsFromInserter",(r,o)=>!H0e.includes(e)&&o.name==="core/template-part"&&t==="post-only"?!1:r),(0,Q_.addFilter)("blockEditor.__unstableCanInsertBlockType","removePostContentFromInserter",(r,o,n,{getBlockParentsByBlockName:i})=>!H0e.includes(e)&&o.name==="core/post-content"?i(n,"core/query").length>0:r),()=>{(0,Q_.removeFilter)("blockEditor.__unstableCanInsertBlockType","removeTemplatePartsFromInserter"),(0,Q_.removeFilter)("blockEditor.__unstableCanInsertBlockType","removePostContentFromInserter")}),[e,t])}var swe=a(Y(),1),i3=a(U(),1),s3=a(Pt(),1);var oc=class{diff(t,r,o={}){let n;typeof o=="function"?(n=o,o={}):"callback"in o&&(n=o.callback);let i=this.castInput(t,o),s=this.castInput(r,o),l=this.removeEmpty(this.tokenize(i,o)),c=this.removeEmpty(this.tokenize(s,o));return this.diffWithOptionsObj(l,c,o,n)}diffWithOptionsObj(t,r,o,n){var i;let s=y=>{if(y=this.postProcess(y,o),n){setTimeout(function(){n(y)},0);return}else return y},l=r.length,c=t.length,u=1,d=l+c;o.maxEditLength!=null&&(d=Math.min(d,o.maxEditLength));let f=(i=o.timeout)!==null&&i!==void 0?i:1/0,m=Date.now()+f,h=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(h[0],r,t,0,o);if(h[0].oldPos+1>=c&&g+1>=l)return s(this.buildValues(h[0].lastComponent,r,t));let v=-1/0,b=1/0,_=()=>{for(let y=Math.max(v,-u);y<=Math.min(b,u);y+=2){let w,S=h[y-1],x=h[y+1];S&&(h[y-1]=void 0);let C=!1;if(x){let k=x.oldPos-y;C=x&&0<=k&&k<l}let A=S&&S.oldPos+1<c;if(!C&&!A){h[y]=void 0;continue}if(!A||C&&S.oldPos<x.oldPos?w=this.addToPath(x,!0,!1,0,o):w=this.addToPath(S,!1,!0,1,o),g=this.extractCommon(w,r,t,y,o),w.oldPos+1>=c&&g+1>=l)return s(this.buildValues(w.lastComponent,r,t))||!0;h[y]=w,w.oldPos+1>=c&&(b=Math.min(b,y-1)),g+1>=l&&(v=Math.max(v,y+1))}u++};if(n)(function y(){setTimeout(function(){if(u>d||Date.now()>m)return n(void 0);_()||y()},0)})();else for(;u<=d&&Date.now()<=m;){let y=_();if(y)return y}}addToPath(t,r,o,n,i){let s=t.lastComponent;return s&&!i.oneChangePerToken&&s.added===r&&s.removed===o?{oldPos:t.oldPos+n,lastComponent:{count:s.count+1,added:r,removed:o,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+n,lastComponent:{count:1,added:r,removed:o,previousComponent:s}}}extractCommon(t,r,o,n,i){let s=r.length,l=o.length,c=t.oldPos,u=c-n,d=0;for(;u+1<s&&c+1<l&&this.equals(o[c+1],r[u+1],i);)u++,c++,d++,i.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return d&&!i.oneChangePerToken&&(t.lastComponent={count:d,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=c,u}equals(t,r,o){return o.comparator?o.comparator(t,r):t===r||!!o.ignoreCase&&t.toLowerCase()===r.toLowerCase()}removeEmpty(t){let r=[];for(let o=0;o<t.length;o++)t[o]&&r.push(t[o]);return r}castInput(t,r){return t}tokenize(t,r){return Array.from(t)}join(t){return t.join("")}postProcess(t,r){return t}get useLongestToken(){return!1}buildValues(t,r,o){let n=[],i;for(;t;)n.push(t),i=t.previousComponent,delete t.previousComponent,t=i;n.reverse();let s=n.length,l=0,c=0,u=0;for(;l<s;l++){let d=n[l];if(d.removed)d.value=this.join(o.slice(u,u+d.count)),u+=d.count;else{if(!d.added&&this.useLongestToken){let f=r.slice(c,c+d.count);f=f.map(function(m,h){let g=o[u+h];return g.length>m.length?g:m}),d.value=this.join(f)}else d.value=this.join(r.slice(c,c+d.count));c+=d.count,d.added||(u+=d.count)}}return n}};var wG=class extends oc{},ftt=new wG;function _G(e,t,r){return ftt.diff(e,t,r)}function SG(e,t){let r;for(r=0;r<e.length&&r<t.length;r++)if(e[r]!=t[r])return e.slice(0,r);return e.slice(0,r)}function xG(e,t){let r;if(!e||!t||e[e.length-1]!=t[t.length-1])return"";for(r=0;r<e.length&&r<t.length;r++)if(e[e.length-(r+1)]!=t[t.length-(r+1)])return e.slice(-r);return e.slice(-r)}function $M(e,t,r){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return r+e.slice(t.length)}function e3(e,t,r){if(!t)return e+r;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+r}function J_(e,t){return $M(e,t,"")}function ME(e,t){return e3(e,t,"")}function CG(e,t){return t.slice(0,ptt(e,t))}function ptt(e,t){let r=0;e.length>t.length&&(r=e.length-t.length);let o=t.length;e.length<t.length&&(o=e.length);let n=Array(o),i=0;n[0]=0;for(let s=1;s<o;s++){for(t[s]==t[i]?n[s]=n[i]:n[s]=i;i>0&&t[s]!=t[i];)i=n[i];t[s]==t[i]&&i++}i=0;for(let s=r;s<e.length;s++){for(;i>0&&e[s]!=t[i];)i=n[i];e[s]==t[i]&&i++}return i}function TG(e,t){let r=[];for(let o of Array.from(t.segment(e))){let n=o.segment;r.length&&/\s/.test(r[r.length-1])&&/\s/.test(n)?r[r.length-1]+=n:r.push(n)}return r}function t3(e,t){if(t)return $_(e,t)[1];let r;for(r=e.length-1;r>=0&&e[r].match(/\s/);r--);return e.substring(r+1)}function py(e,t){if(t)return $_(e,t)[0];let r=e.match(/^\s*/);return r?r[0]:""}function $_(e,t){if(!t)return[py(e),t3(e)];if(t.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');let r=TG(e,t),o=r[0],n=r[r.length-1],i=/\s/.test(o)?o:"",s=/\s/.test(n)?n:"";return[i,s]}var r3="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",mtt=new RegExp(`[${r3}]+|\\s+|[^${r3}]`,"ug"),EG=class extends oc{equals(t,r,o){return o.ignoreCase&&(t=t.toLowerCase(),r=r.toLowerCase()),t.trim()===r.trim()}tokenize(t,r={}){let o;if(r.intlSegmenter){let s=r.intlSegmenter;if(s.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');o=TG(t,s)}else o=t.match(mtt)||[];let n=[],i=null;return o.forEach(s=>{/\s/.test(s)?i==null?n.push(s):n.push(n.pop()+s):i!=null&&/\s/.test(i)?n[n.length-1]==i?n.push(n.pop()+s):n.push(i+s):n.push(s),i=s}),n}join(t){return t.map((r,o)=>o==0?r:r.replace(/^\s+/,"")).join("")}postProcess(t,r){if(!t||r.oneChangePerToken)return t;let o=null,n=null,i=null;return t.forEach(s=>{s.added?n=s:s.removed?i=s:((n||i)&&G0e(o,i,n,s,r.intlSegmenter),o=s,n=null,i=null)}),(n||i)&&G0e(o,i,n,null,r.intlSegmenter),t}},htt=new EG;function G0e(e,t,r,o,n){if(t&&r){let[i,s]=$_(t.value,n),[l,c]=$_(r.value,n);if(e){let u=SG(i,l);e.value=e3(e.value,l,u),t.value=J_(t.value,u),r.value=J_(r.value,u)}if(o){let u=xG(s,c);o.value=$M(o.value,c,u),t.value=ME(t.value,u),r.value=ME(r.value,u)}}else if(r){if(e){let i=py(r.value,n);r.value=r.value.substring(i.length)}if(o){let i=py(o.value,n);o.value=o.value.substring(i.length)}}else if(e&&o){let i=py(o.value,n),[s,l]=$_(t.value,n),c=SG(i,s);t.value=J_(t.value,c);let u=xG(J_(i,c),l);t.value=ME(t.value,u),o.value=$M(o.value,i,u),e.value=e3(e.value,i,i.slice(0,i.length-u.length))}else if(o){let i=py(o.value,n),s=t3(t.value,n),l=CG(s,i);t.value=ME(t.value,l)}else if(e){let i=t3(e.value,n),s=py(t.value,n),l=CG(i,s);t.value=J_(t.value,l)}}var PG=class extends oc{tokenize(t){let r=new RegExp(`(\\r?\\n)|[${r3}]+|[^\\S\\n\\r]+|[^${r3}]`,"ug");return t.match(r)||[]}},Y0e=new PG;function eS(e,t,r){return Y0e.diff(e,t,r)}var kG=class extends oc{constructor(){super(...arguments),this.tokenize=vtt}equals(t,r,o){return o.ignoreWhitespace?((!o.newlineIsToken||!t.includes(`
`))&&(t=t.trim()),(!o.newlineIsToken||!r.includes(`
`))&&(r=r.trim())):o.ignoreNewlineAtEof&&!o.newlineIsToken&&(t.endsWith(`
`)&&(t=t.slice(0,-1)),r.endsWith(`
`)&&(r=r.slice(0,-1))),super.equals(t,r,o)}},gtt=new kG;function q0e(e,t,r){return gtt.diff(e,t,r)}function vtt(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
`));let r=[],o=e.split(/(\n|\r\n)/);o[o.length-1]||o.pop();for(let n=0;n<o.length;n++){let i=o[n];n%2&&!t.newlineIsToken?r[r.length-1]+=i:r.push(i)}return r}var RG=class extends oc{tokenize(t){return t.slice()}join(t){return t}removeEmpty(t){return t}},K0e=new RG;function FE(e,t,r){return K0e.diff(e,t,r)}var AG=a(X0e(),1),n3=a(Pt(),1),Fn=a(hd(),1),Oa=a(j(),1);var tS=a(j(),1),o3=a(hd(),1),nc={removed:"revision-diff-removed-desc",added:"revision-diff-added-desc",formatAdded:"revision-diff-format-added-desc",formatRemoved:"revision-diff-format-removed-desc",formatChanged:"revision-diff-format-changed-desc"},Q0e=[{name:"revision/diff-removed",title:(0,tS.__)("Removed"),tagName:"del",className:"revision-diff-removed"},{name:"revision/diff-added",title:(0,tS.__)("Added"),tagName:"ins",className:"revision-diff-added"},{name:"revision/diff-format-added",title:(0,tS.__)("Format added"),tagName:"mark",className:"revision-diff-format-added"},{name:"revision/diff-format-removed",title:(0,tS.__)("Format removed"),tagName:"mark",className:"revision-diff-format-removed"},{name:"revision/diff-format-changed",title:(0,tS.__)("Format changed"),tagName:"mark",className:"revision-diff-format-changed"}];function J0e(){for(let e of Q0e)(0,o3.registerFormatType)(e.name,{...e,attributes:{"aria-describedby":"aria-describedby"},edit:()=>null})}function $0e(){for(let e of Q0e)(0,o3.unregisterFormatType)(e.name)}var{parseRawBlock:rwe}=K(n3.privateApis);function ewe(e){return e.blockName===null&&(!e.innerHTML||!e.innerHTML.trim())}function twe(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function btt(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),s=n(t);if(i.length===0&&s.length===0)return 1;let l=new Set(i),c=0;for(let d of s)l.has(d)&&c++;let u=Math.max(i.length,s.length);return u>0?c/u:0}function ytt(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,s=.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],b=JSON.stringify(d.block.attrs)===JSON.stringify(v.block.attrs);(!((d.block.innerHTML||"")===(v.block.innerHTML||""))||!b)&&(g=v)}else{let v=0;for(let b of h){let _=btt(d.block.innerHTML||"",b.block.innerHTML||""),y=JSON.stringify(d.block.attrs)===JSON.stringify(b.block.attrs);_>v&&_>s&&(_<1||!y)&&(v=_,g=b)}}if(g){u=g.index;let v={...g.block,__revisionDiffStatus:{status:"modified"},__previousRawBlock:d.block},b=Math.min(d.index,g.index),_=Math.max(d.index,g.index),y=!1;for(let w=b+1;w<_;w++){let S=e[w].__revisionDiffStatus?.status;if(S===void 0){y=!0;break}if(S==="added"&&!n.has(w)){y=!0;break}}y?(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 owe(e,t){e=e.filter(u=>!ewe(u)),t=t.filter(u=>!ewe(u));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=FE(n,o),s=[],l=0,c=0;for(let u of i)if(u.added)for(let d=0;d<u.count;d++)s.push({...e[l++],__revisionDiffStatus:{status:"added"}});else if(u.removed)for(let d=0;d<u.count;d++)s.push({...t[c++],__revisionDiffStatus:{status:"removed"}});else for(let d=0;d<u.count;d++){let f=e[l++],m=t[c++],h=owe(f.innerBlocks||[],m.innerBlocks||[]);s.push({...f,innerBlocks:h})}return ytt(s)}function wtt(e,t,r,o){let n=e[r]||[],i=t[o]||[];if(n.length!==i.length)return!0;for(let s of n)if(!i.find(c=>c.type===s.type&&JSON.stringify(c.attributes)===JSON.stringify(s.attributes)))return!0;return!1}function _tt(e,t,r,o){let n=e[r]||[],i=t[o]||[],s=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++:s++}for(let d of i)n.find(m=>m.type===d.type)||l++;if(s>0&&l===0&&c===0)return{type:"added",description:(0,Oa.sprintf)((0,Oa._n)("%d format added","%d formats added",s),s)};if(l>0&&s===0&&c===0)return{type:"removed",description:(0,Oa.sprintf)((0,Oa._n)("%d format removed","%d formats removed",l),l)};let u=[];return s>0&&u.push((0,Oa.sprintf)((0,Oa._n)("%d format added","%d formats added",s),s)),l>0&&u.push((0,Oa.sprintf)((0,Oa._n)("%d format removed","%d formats removed",l),l)),c>0&&u.push((0,Oa.sprintf)((0,Oa._n)("%d format changed","%d formats changed",c),c)),{type:"changed",description:u.join(", ")||(0,Oa.__)("Formatting changed")}}function Stt(e,t){let r=e.toPlainText(),o=t.toPlainText(),n=eS(o,r),i=(0,Fn.create)({text:""}),s=0,l=0;for(let c of n)if(c.removed){let u=(0,Fn.slice)(t,l,l+c.value.length),d=(0,Fn.applyFormat)(u,{type:"revision/diff-removed",attributes:{"aria-describedby":nc.removed}},0,c.value.length);i=(0,Fn.concat)(i,d),l+=c.value.length}else if(c.added){let u=(0,Fn.slice)(e,s,s+c.value.length),d=(0,Fn.applyFormat)(u,{type:"revision/diff-added",attributes:{"aria-describedby":nc.added}},0,c.value.length);i=(0,Fn.concat)(i,d),s+=c.value.length}else{let u=e.formats||[],d=t.formats||[],f=c.value.length,m=v=>wtt(u,d,s+v,l+v),h=0,g=m(0);for(let v=1;v<=f;v++){let b=v<f&&m(v);if(v===f||b!==g){let _=(0,Fn.slice)(e,s+h,s+v);if(g){let{type:y}=_tt(u,d,s+h,l+h),w={added:"revision/diff-format-added",removed:"revision/diff-format-removed",changed:"revision/diff-format-changed"}[y],S={added:nc.formatAdded,removed:nc.formatRemoved,changed:nc.formatChanged}[y],x=(0,Fn.applyFormat)(_,{type:w,attributes:{"aria-describedby":S}},0,v-h);i=(0,Fn.concat)(i,x)}else i=(0,Fn.concat)(i,_);h=v,g=b}}s+=c.value.length,l+=c.value.length}return new Fn.RichTextData(i)}function xtt(e,t,r){let o=(0,n3.getBlockType)(e.name);if(!o)return;let n={};for(let[i,s]of Object.entries(o.attributes))if(s.source==="rich-text"){let l=e.attributes[i],c=t.attributes[i];l instanceof Fn.RichTextData&&c instanceof Fn.RichTextData&&(e.attributes[i]=Stt(l,c))}else{let l=twe(e.attributes[i]),c=twe(t.attributes[i]);l!==c&&(n[i]=eS(c,l))}Object.keys(n).length>0&&(r.changedAttributes=n)}function nwe(e,t){if(t.__revisionDiffStatus){if(t.__revisionDiffStatus.status==="modified"&&t.__previousRawBlock){let r=rwe(t.__previousRawBlock);r&&xtt(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&&nwe(o,n)}}function iwe(e,t){let r=(0,AG.parse)(e||""),o=(0,AG.parse)(t||"");return owe(r,o).map(i=>{let s=rwe(i);return s&&nwe(s,i),s}).filter(Boolean)}function IG(e,t){if(!t?.length||!e?.length)return e;let r=e.map(c=>c.name),o=t.map(c=>c.name),n=FE(o,r),i=0,s=0,l=[];for(let c of n)if(c.removed)s+=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[s++];l.push({...d,clientId:f.clientId,innerBlocks:IG(d.innerBlocks,f.innerBlocks)})}return l}function awe(){let{isInRevisionsMode:e,showDiff:t,revision:r,previousRevision:o,postType:n}=(0,swe.useSelect)(l=>{let{isRevisionsMode:c,isShowingRevisionDiff:u,getCurrentRevision:d,getPreviousRevision:f}=K(l(I)),{getCurrentPostType:m}=l(I),h=c();return{isInRevisionsMode:h,showDiff:u(),revision:h?d():void 0,previousRevision:h?f():void 0,postType:m()}},[]),i=(0,i3.useRef)([]);return(0,i3.useMemo)(()=>{if(!e)return i.current=[],null;if(!r)return[];let l=r?.content?.raw??"",c;if(t){let d=o?.content?.raw||"";c=iwe(l,d)}else c=(0,s3.parse)(l);n==="wp_navigation"&&(c=[(0,s3.createBlock)("core/navigation",{templateLock:!1},c)]);let u=IG(c,i.current);return i.current=u,u},[e,r,r?.content?.raw,o?.content?.raw,n,t])}var oi=a(Y(),1),At=a(j(),1);var rS=a(OG(),1),FG=a(Dt(),1),vwe=a(It(),1),BE=a(be(),1),oS=a(ae(),1);var a3=a(Lt(),1);var DE=a(Y(),1),cwe=a(Nl(),1),uwe=a(ae(),1);var dwe=a(E(),1),{RenamePatternModal:Ctt}=K(cwe.privateApis),NG="editor/pattern-rename";function fwe(){let e=(0,DE.useSelect)(n=>n(He).isModalActive(NG)),{record:t,postType:r}=(0,DE.useSelect)(n=>{if(!e)return{};let{getCurrentPostType:i,getCurrentPostId:s}=n(I),{getEditedEntityRecord:l}=n(uwe.store),c=i();return{record:l("postType",c,s()),postType:c}},[e]),{closeModal:o}=(0,DE.useDispatch)(He);return!e||r!==Nu?null:(0,dwe.jsx)(Ctt,{onClose:o,pattern:t})}var LE=a(Y(),1),pwe=a(Nl(),1),mwe=a(ae(),1);var hwe=a(E(),1),{DuplicatePatternModal:Ttt}=K(pwe.privateApis),MG="editor/pattern-duplicate";function gwe(){let e=(0,LE.useSelect)(n=>n(He).isModalActive(MG)),{record:t,postType:r}=(0,LE.useSelect)(n=>{if(!e)return{};let{getCurrentPostType:i,getCurrentPostId:s}=n(I),{getEditedEntityRecord:l}=n(mwe.store),c=i();return{record:l("postType",c,s()),postType:c}},[e]),{closeModal:o}=(0,LE.useDispatch)(He);return!e||r!==Nu?null:(0,hwe.jsx)(Ttt,{onClose:o,onSuccess:()=>o(),pattern:t})}function bwe({disableContentOnlyForPatternsAndTemplateParts:e,stopEditingContentOnlySection:t,updateEditorSettings:r}){return{name:"core/toggle-pattern-editing",label:e?(0,At.__)("Disable editing all patterns"):(0,At.__)("Enable editing all patterns"),icon:g0,category:"command",callback:({close:o})=>{let n=!e;t(),r({disableContentOnlyForUnsyncedPatterns:n,disableContentOnlyForTemplateParts:n}),o()}}}function Ett(e,t){return!!t?.metadata?.patternName||e==="core/template-part"}var Ptt=()=>function(){let{editorMode:t,isListViewOpen:r,showBlockBreadcrumbs:o,isDistractionFree:n,isFocusMode:i,isPreviewMode:s,isViewable:l,isCodeEditingEnabled:c,isRichEditingEnabled:u,isPublishSidebarEnabled:d,disableContentOnlyForUnsyncedPatterns:f,disableContentOnlyForTemplateParts:m}=(0,oi.useSelect)(F=>{let{get:D}=F(FG.store),{isListViewOpened:z,getCurrentPostType:B,getEditorSettings:O}=F(I),{getSettings:V}=F(BE.store),{getPostType:W}=F(oS.store);return{editorMode:D("core","editorMode")??"visual",isListViewOpen:z(),showBlockBreadcrumbs:D("core","showBlockBreadcrumbs"),isDistractionFree:D("core","distractionFree"),isFocusMode:D("core","focusMode"),isPreviewMode:V().isPreviewMode,isViewable:W(B())?.viewable??!1,isCodeEditingEnabled:O().codeEditingEnabled,isRichEditingEnabled:O().richEditingEnabled,isPublishSidebarEnabled:F(I).isPublishSidebarEnabled(),disableContentOnlyForUnsyncedPatterns:!!O().disableContentOnlyForUnsyncedPatterns,disableContentOnlyForTemplateParts:!!O().disableContentOnlyForTemplateParts}},[]),{getActiveComplementaryArea:h}=(0,oi.useSelect)(He),{toggle:g}=(0,oi.useDispatch)(FG.store),{createInfoNotice:v}=(0,oi.useDispatch)(vwe.store),{__unstableSaveForPreview:b,setIsListViewOpened:_,switchEditorMode:y,toggleDistractionFree:w,toggleSpotlightMode:S,toggleTopToolbar:x,updateEditorSettings:C}=(0,oi.useDispatch)(I),{stopEditingContentOnlySection:A}=K((0,oi.useDispatch)(BE.store)),{openModal:k,enableComplementaryArea:R,disableComplementaryArea:M}=(0,oi.useDispatch)(He),{getCurrentPostId:P}=(0,oi.useSelect)(I),T=c&&u;if(s)return{commands:[],isLoading:!1};let N=[],L=f&&m;return N.push({name:"core/open-shortcut-help",label:(0,At.__)("Keyboard shortcuts"),icon:h1,category:"view",callback:({close:F})=>{F(),k("editor/keyboard-shortcut-help")}}),N.push({name:"core/toggle-distraction-free",label:n?(0,At.__)("Exit Distraction free"):(0,At.__)("Enter Distraction free"),category:"command",callback:({close:F})=>{w(),F()}}),N.push({name:"core/open-preferences",label:(0,At.__)("Editor preferences"),category:"view",callback:({close:F})=>{F(),k("editor/preferences")}}),N.push({name:"core/toggle-spotlight-mode",label:i?(0,At.__)("Exit Spotlight mode"):(0,At.__)("Enter Spotlight mode"),category:"command",callback:({close:F})=>{S(),F()}}),N.push({name:"core/toggle-list-view",label:r?(0,At.__)("Close List View"):(0,At.__)("Open List View"),icon:g1,category:"command",callback:({close:F})=>{_(!r),F(),v(r?(0,At.__)("List View off."):(0,At.__)("List View on."),{id:"core/editor/toggle-list-view/notice",type:"snackbar"})}}),N.push({name:"core/toggle-top-toolbar",label:(0,At.__)("Top toolbar"),category:"command",callback:({close:F})=>{x(),F()}}),N.push(bwe({disableContentOnlyForPatternsAndTemplateParts:L,stopEditingContentOnlySection:A,updateEditorSettings:C})),T&&N.push({name:"core/toggle-code-editor",label:t==="visual"?(0,At.__)("Open code editor"):(0,At.__)("Exit code editor"),icon:CB,category:"command",callback:({close:F})=>{y(t==="visual"?"text":"visual"),F()}}),N.push({name:"core/toggle-breadcrumbs",label:o?(0,At.__)("Hide block breadcrumbs"):(0,At.__)("Show block breadcrumbs"),category:"command",callback:({close:F})=>{g("core","showBlockBreadcrumbs"),F(),v(o?(0,At.__)("Breadcrumbs hidden."):(0,At.__)("Breadcrumbs visible."),{id:"core/editor/toggle-breadcrumbs/notice",type:"snackbar"})}}),N.push({name:"core/open-settings-sidebar",label:(0,At.__)("Show or hide the Settings panel"),icon:(0,At.isRTL)()?dv:wf,category:"command",callback:({close:F})=>{let D=h("core");F(),D==="edit-post/document"?M("core"):R("core","edit-post/document")}}),N.push({name:"core/open-block-inspector",label:(0,At.__)("Show or hide the Block settings panel"),icon:nB,category:"command",callback:({close:F})=>{let D=h("core");F(),D==="edit-post/block"?M("core"):R("core","edit-post/block")}}),N.push({name:"core/toggle-publish-sidebar",label:d?(0,At.__)("Disable pre-publish checks"):(0,At.__)("Enable pre-publish checks"),icon:u1,category:"command",callback:({close:F})=>{F(),g("core","isPublishSidebarEnabled"),v(d?(0,At.__)("Pre-publish checks disabled."):(0,At.__)("Pre-publish checks enabled."),{id:"core/editor/publish-sidebar/notice",type:"snackbar"})}}),l&&N.push({name:"core/preview-link",label:(0,At.__)("Preview in a new tab"),icon:hs,category:"view",callback:async({close:F})=>{F();let D=P(),z=await b();window.open(z,`wp-preview-${D}`)}}),{commands:N,isLoading:!1}},ktt=()=>function({search:t}){let{disableContentOnlyForPatternsAndTemplateParts:r,hasPatternOrTemplatePartSelection:o,isPreviewMode:n}=(0,oi.useSelect)(l=>{let{getBlockAttributes:c,getBlockName:u,getBlockParents:d,getSelectedBlockClientId:f,getSelectedBlockClientIds:m,getSettings:h}=l(BE.store),{getEditorSettings:g}=l(I),v=g(),b=f(),_=m(),y=b&&_.length===1?[b,...d(b,!0)]:[];return{disableContentOnlyForPatternsAndTemplateParts:!!v.disableContentOnlyForUnsyncedPatterns&&!!v.disableContentOnlyForTemplateParts,hasPatternOrTemplatePartSelection:y.some(w=>Ett(u(w),c(w))),isPreviewMode:h().isPreviewMode}},[]),{updateEditorSettings:i}=(0,oi.useDispatch)(I),{stopEditingContentOnlySection:s}=K((0,oi.useDispatch)(BE.store));return t||!o&&!r||n?{isLoading:!1,commands:[]}:{isLoading:!1,commands:[bwe({disableContentOnlyForPatternsAndTemplateParts:r,stopEditingContentOnlySection:s,updateEditorSettings:i})]}},Rtt=()=>function(){let{postType:t}=(0,oi.useSelect)(n=>{let{getCurrentPostType:i}=n(I);return{postType:i()}},[]),{openModal:r}=(0,oi.useDispatch)(He),o=[];return t===Nu&&(o.push({name:"core/rename-pattern",label:(0,At.__)("Rename pattern"),icon:_1,category:"edit",callback:({close:n})=>{r(NG),n()}}),o.push({name:"core/duplicate-pattern",label:(0,At.__)("Duplicate pattern"),icon:g0,category:"command",callback:({close:n})=>{r(MG),n()}})),{isLoading:!1,commands:o}},Att=()=>function(){let{onNavigateToEntityRecord:t,goBack:r,templateId:o,isPreviewMode:n,canEditTemplate:i}=(0,oi.useSelect)(u=>{let{getRenderingMode:d,getEditorSettings:f,getCurrentTemplateId:m}=K(u(I)),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(oS.store).canUser("update",{kind:"postType",name:"wp_template",id:g})}},[]),{editedRecord:s,hasResolved:l}=(0,oS.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,At.sprintf)((0,At.__)("Edit template: %s"),(0,a3.decodeEntities)(s.title)),icon:Ka,category:"edit",callback:({close:u})=>{t({postId:o,postType:"wp_template"}),u()}}),r&&c.push({name:"core/switch-to-previous-entity",label:(0,At.__)("Go back"),icon:mm,category:"view",callback:({close:u})=>{r(),u()}}),{isLoading:!1,commands:c}},Itt=()=>function(){let{postType:t,postId:r}=(0,oi.useSelect)(l=>{let{getCurrentPostId:c,getCurrentPostType:u}=l(I);return{postType:u(),postId:c()}},[]),{editedRecord:o,hasResolved:n}=(0,oS.useEntityRecord)("postType",t,r),{revertTemplate:i}=K((0,oi.useDispatch)(I));if(!n||![Ni,Cr].includes(t))return{isLoading:!0,commands:[]};let s=[];if(N2(o)){let l=o.type===Cr?(0,At.sprintf)((0,At.__)("Reset template: %s"),(0,a3.decodeEntities)(o.title)):(0,At.sprintf)((0,At.__)("Reset template part: %s"),(0,a3.decodeEntities)(o.title));s.push({name:"core/reset-template",label:l,icon:(0,At.isRTL)()?C1:x1,category:"command",callback:({close:c})=>{i(o),c()}})}return{isLoading:!n,commands:s}};function ywe(){(0,rS.useCommandLoader)({name:"core/editor/edit-ui",hook:Ptt()}),(0,rS.useCommandLoader)({name:"core/editor/contextual-commands",hook:Rtt(),context:"entity-edit"}),(0,rS.useCommandLoader)({name:"core/editor/pattern-editing-contextual-commands",hook:ktt(),context:"block-selection-edit"}),(0,rS.useCommandLoader)({name:"core/editor/page-content-focus",hook:Att(),context:"entity-edit"}),(0,rS.useCommandLoader)({name:"core/edit-site/manipulate-document",hook:Itt()})}var c3=a(Y(),1),_we=a(U(),1),Swe=a(l3(),1);var nS="upload-in-progress";function xwe(){let e=(0,c3.useSelect)(i=>i(Swe.store).isUploading(),[]),{lockPostSaving:t,unlockPostSaving:r,lockPostAutosaving:o,unlockPostAutosaving:n}=(0,c3.useDispatch)(I);(0,_we.useEffect)(()=>(e?(t(nS),o(nS)):(r(nS),n(nS)),()=>{r(nS),n(nS)}),[e,t,r,o,n])}var Cwe=a(U(),1),Twe=a(Y(),1),DG=a(l3(),1);function Ewe(){let e=window.__clientSideMediaProcessing,t=(0,Twe.useRegistry)();(0,Cwe.useEffect)(()=>{if(!e)return;let r=()=>{K(t.dispatch(DG.store)).pauseQueue()},o=()=>{K(t.dispatch(DG.store)).resumeQueue()};return window.addEventListener("offline",r),window.addEventListener("online",o),()=>{window.removeEventListener("offline",r),window.removeEventListener("online",o)}},[e,t])}var my=a(j(),1),Pwe=a(be(),1),kwe=a(Y(),1),Rwe=a(U(),1);var Awe=a(E(),1),{BlockRemovalWarningModal:Ott}=K(Pwe.privateApis),Ntt=["core/post-content","core/post-template","core/query"],Mtt=[{postTypes:["wp_template","wp_template_part"],callback(e){if(e.filter(({name:o})=>o==="core/post-content").length)return{description:(0,my.__)("This block displays the content of posts and pages using this template."),warning:(0,my.__)("If you delete it, posts or pages using this template will not display any content."),subtext:(0,my.__)("Visitors will see blank pages."),requireConfirmation:!0};if(e.filter(({name:o})=>Ntt.includes(o)).length)return(0,my._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,my._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 Iwe(){let e=(0,kwe.useSelect)(r=>r(I).getCurrentPostType(),[]),t=(0,Rwe.useMemo)(()=>Mtt.filter(r=>r.postTypes.includes(e)),[e]);return t?(0,Awe.jsx)(Ott,{rules:t}):null}var dg=a(G(),1),LG=a(j(),1),hy=a(U(),1),u3=a(be(),1),zd=a(Y(),1),BG=a(ae(),1),Owe=a(Pt(),1),VG=a(Dt(),1);var jd=a(E(),1);function Ftt(){let{blockPatternsWithPostContentBlockType:e,postType:t}=(0,zd.useSelect)(r=>{let{getPatternsByBlockTypes:o,getBlocksByName:n}=r(u3.store),{getCurrentPostType:i,getRenderingMode:s}=r(I),l=s()==="post-only"?"":n("core/post-content")?.[0];return{blockPatternsWithPostContentBlockType:o("core/post-content",l),postType:i()}},[]);return(0,hy.useMemo)(()=>e?.length?e.filter(r=>t==="page"&&!r.postTypes||Array.isArray(r.postTypes)&&r.postTypes.includes(t)):[],[t,e])}function Dtt({blockPatterns:e,onChoosePattern:t}){let{editEntityRecord:r}=(0,zd.useDispatch)(BG.store),{postType:o,postId:n}=(0,zd.useSelect)(i=>{let{getCurrentPostType:s,getCurrentPostId:l}=i(I);return{postType:s(),postId:l()}},[]);return(0,jd.jsx)(u3.__experimentalBlockPatternsList,{blockPatterns:e,onClickPattern:(i,s)=>{r("postType",o,n,{blocks:s,content:({blocks:l=[]})=>(0,Owe.__unstableSerializeAndClean)(l)}),t()}})}function Ltt({onClose:e}){let[t,r]=(0,hy.useState)(!0),{set:o}=(0,zd.useDispatch)(VG.store),n=Ftt();if(!(n.length>0))return null;function s(){e(),o("core","enableChoosePatternModal",t)}return(0,jd.jsxs)(dg.Modal,{className:"editor-start-page-options__modal",title:(0,LG.__)("Choose a pattern"),isFullScreen:!0,onRequestClose:s,children:[(0,jd.jsx)("div",{className:"editor-start-page-options__modal-content",children:(0,jd.jsx)(Dtt,{blockPatterns:n,onChoosePattern:s})}),(0,jd.jsx)(dg.Flex,{className:"editor-start-page-options__modal__actions",justify:"flex-start",expanded:!1,children:(0,jd.jsx)(dg.FlexItem,{children:(0,jd.jsx)(dg.CheckboxControl,{checked:t,label:(0,LG.__)("Always show starter patterns for new pages"),onChange:l=>{r(l)}})})})]})}function Nwe(){let[e,t]=(0,hy.useState)(!1),{isEditedPostEmpty:r}=(0,zd.useSelect)(I),{getEntityRecordNonTransientEdits:o}=(0,zd.useSelect)(BG.store),{isModalActive:n}=(0,zd.useSelect)(He),{enabled:i,postType:s,postId:l}=(0,zd.useSelect)(c=>{let{getCurrentPostId:u,getCurrentPostType:d}=c(I),f=c(VG.store).get("core","enableChoosePatternModal"),m=d();return{postType:m,postId:u(),enabled:f&&Pl!==m&&Cr!==m&&Ni!==m}},[]);return(0,hy.useEffect)(()=>{let u=!(Object.keys(o("postType",s,l)??{}).length>0)&&r(),d=n("editor/preferences");!i||!u||d||t(!0)},[i,s,l,o,r,n]),e?(0,jd.jsx)(Ltt,{onClose:()=>t(!1)}):null}var Hwe=a(G(),1),Hd=a(j(),1),m3=a(xa(),1),VE=a(Y(),1);var ic=a(j(),1),Mwe=[{keyCombination:{modifier:"primary",character:"b"},description:(0,ic.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:(0,ic.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:(0,ic.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:(0,ic.__)("Remove a link.")},{keyCombination:{character:"[["},description:(0,ic.__)("Insert a link to a post or page.")},{keyCombination:{modifier:"primary",character:"u"},description:(0,ic.__)("Underline the selected text.")},{keyCombination:{modifier:"access",character:"d"},description:(0,ic.__)("Strikethrough the selected text.")},{keyCombination:{modifier:"access",character:"x"},description:(0,ic.__)("Make the selected text inline code.")},{keyCombination:{modifier:"access",character:"0"},aliases:[{modifier:"access",character:"7"}],description:(0,ic.__)("Convert the current heading to a paragraph.")},{keyCombination:{modifier:"access",character:"1-6"},description:(0,ic.__)("Convert the current paragraph or heading to a heading of level 1 to 6.")},{keyCombination:{modifier:"primaryShift",character:"SPACE"},description:(0,ic.__)("Add non breaking space.")}];var Dwe=a(U(),1),d3=a(Mo(),1),sc=a(E(),1);function Fwe({keyCombination:e,forceAriaLabel:t}){let r=e.modifier?d3.displayShortcutList[e.modifier](e.character):e.character,o=e.modifier?d3.shortcutAriaLabel[e.modifier](e.character):e.character;return(0,sc.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,sc.jsx)(Dwe.Fragment,{children:n},i):(0,sc.jsx)("kbd",{className:"editor-keyboard-shortcut-help-modal__shortcut-key",children:n},i))})}function Btt({description:e,keyCombination:t,aliases:r=[],ariaLabel:o}){return(0,sc.jsxs)(sc.Fragment,{children:[(0,sc.jsx)("div",{className:"editor-keyboard-shortcut-help-modal__shortcut-description",children:e}),(0,sc.jsxs)("div",{className:"editor-keyboard-shortcut-help-modal__shortcut-term",children:[(0,sc.jsx)(Fwe,{keyCombination:t,forceAriaLabel:o}),r.map((n,i)=>(0,sc.jsx)(Fwe,{keyCombination:n,forceAriaLabel:o},i))]})]})}var f3=Btt;var Lwe=a(Y(),1),Bwe=a(xa(),1);var Vwe=a(E(),1);function Vtt({name:e}){let{keyCombination:t,description:r,aliases:o}=(0,Lwe.useSelect)(n=>{let{getShortcutKeyCombination:i,getShortcutDescription:s,getShortcutAliases:l}=n(Bwe.store);return{keyCombination:i(e),aliases:l(e),description:s(e)}},[e]);return t?(0,Vwe.jsx)(f3,{keyCombination:t,description:r,aliases:o}):null}var jwe=Vtt;var xi=a(E(),1),zwe="editor/keyboard-shortcut-help",jtt=({shortcuts:e})=>(0,xi.jsx)("ul",{className:"editor-keyboard-shortcut-help-modal__shortcut-list",role:"list",children:e.map((t,r)=>(0,xi.jsx)("li",{className:"editor-keyboard-shortcut-help-modal__shortcut",children:typeof t=="string"?(0,xi.jsx)(jwe,{name:t}):(0,xi.jsx)(f3,{...t})},r))}),jG=({title:e,shortcuts:t,className:r})=>(0,xi.jsxs)("section",{className:J("editor-keyboard-shortcut-help-modal__section",r),children:[!!e&&(0,xi.jsx)("h2",{className:"editor-keyboard-shortcut-help-modal__section-title",children:e}),(0,xi.jsx)(jtt,{shortcuts:t})]}),p3=({title:e,categoryName:t,additionalShortcuts:r=[]})=>{let o=(0,VE.useSelect)(n=>n(m3.store).getCategoryShortcuts(t),[t]);return(0,xi.jsx)(jG,{title:e,shortcuts:o.concat(r)})};function ztt(){let e=(0,VE.useSelect)(n=>n(He).isModalActive(zwe),[]),{openModal:t,closeModal:r}=(0,VE.useDispatch)(He),o=()=>{e?r():t(zwe)};return(0,m3.useShortcut)("core/editor/keyboard-shortcuts",o),e?(0,xi.jsxs)(Hwe.Modal,{className:"editor-keyboard-shortcut-help-modal",title:(0,Hd.__)("Keyboard shortcuts"),closeButtonLabel:(0,Hd.__)("Close"),onRequestClose:o,children:[(0,xi.jsx)(jG,{className:"editor-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/editor/keyboard-shortcuts"]}),(0,xi.jsx)(p3,{title:(0,Hd.__)("Global shortcuts"),categoryName:"global"}),(0,xi.jsx)(p3,{title:(0,Hd.__)("Selection shortcuts"),categoryName:"selection"}),(0,xi.jsx)(p3,{title:(0,Hd.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:(0,Hd.__)("Change the block type after adding a new paragraph."),ariaLabel:(0,Hd.__)("Forward-slash")}]}),(0,xi.jsx)(jG,{title:(0,Hd.__)("Text formatting"),shortcuts:Mwe}),(0,xi.jsx)(p3,{title:(0,Hd.__)("List View shortcuts"),categoryName:"list-view"})]}):null}var Uwe=ztt;var fg=a(G(),1),jE=a(j(),1),iS=a(U(),1),Wwe=a(be(),1),zE=a(Y(),1),zG=a(Pt(),1),gy=a(ae(),1);var Ud=a(E(),1);function Htt(e,t=!1){return(0,zE.useSelect)(r=>{let{getEntityRecord:o,getDefaultTemplateId:n}=r(gy.store),i=n({slug:e,is_custom:t,ignore_empty:!0});return i?o("postType",Cr,i)?.content?.raw:void 0},[e,t])}function Utt(e){let{slug:t,patterns:r}=(0,zE.useSelect)(i=>{let{getCurrentPostType:s,getCurrentPostId:l}=i(I),{getEntityRecord:c,getBlockPatterns:u}=i(gy.store),d=l(),f=s();return{slug:c("postType",f,d).slug,patterns:u()}},[]),o=(0,zE.useSelect)(i=>i(gy.store).getCurrentTheme().stylesheet);function n(i){return i.innerBlocks.find(s=>s.name==="core/template-part")&&(i.innerBlocks=i.innerBlocks.map(s=>(s.name==="core/template-part"&&s.attributes.theme===void 0&&(s.attributes.theme=o),s))),i.name==="core/template-part"&&i.attributes.theme===void 0&&(i.attributes.theme=o),i}return(0,iS.useMemo)(()=>[{name:"fallback",blocks:(0,zG.parse)(e),title:(0,jE.__)("Fallback content")},...r.filter(i=>Array.isArray(i.templateTypes)&&i.templateTypes.some(s=>t.startsWith(s))).map(i=>({...i,blocks:(0,zG.parse)(i.content).map(s=>n(s))}))],[e,t,r])}function Wtt({fallbackContent:e,onChoosePattern:t,postType:r}){let[,,o]=(0,gy.useEntityBlockEditor)("postType",r),n=Utt(e);return(0,Ud.jsx)(Wwe.__experimentalBlockPatternsList,{blockPatterns:n,onClickPattern:(i,s)=>{o(s,{selection:void 0}),t()}})}function Gtt({slug:e,isCustom:t,onClose:r,postType:o}){let n=Htt(e,t);return n?(0,Ud.jsxs)(fg.Modal,{className:"editor-start-template-options__modal",title:(0,jE.__)("Choose a pattern"),closeLabel:(0,jE.__)("Cancel"),focusOnMount:"firstElement",onRequestClose:r,isFullScreen:!0,children:[(0,Ud.jsx)("div",{className:"editor-start-template-options__modal-content",children:(0,Ud.jsx)(Wtt,{fallbackContent:n,slug:e,isCustom:t,postType:o,onChoosePattern:()=>{r()}})}),(0,Ud.jsx)(fg.Flex,{className:"editor-start-template-options__modal__actions",justify:"flex-end",expanded:!1,children:(0,Ud.jsx)(fg.FlexItem,{children:(0,Ud.jsx)(fg.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:r,children:(0,jE.__)("Skip")})})})]}):null}function Gwe(){let[e,t]=(0,iS.useState)(!1),{shouldOpenModal:r,slug:o,isCustom:n,postType:i,postId:s}=(0,zE.useSelect)(l=>{let{getCurrentPostType:c,getCurrentPostId:u}=l(I),d=c(),f=u(),{getEditedEntityRecord:m,getEntityRecordNonTransientEdits:h}=l(gy.store),g=m("postType",d,f);return{shouldOpenModal:!(Object.keys(h("postType",d,f)??{}).length>0)&&g.content===""&&Cr===d,slug:g.slug,isCustom:g.is_custom,postType:d,postId:f}},[]);return(0,iS.useEffect)(()=>{t(!1)},[i,s]),!r||e?null:(0,Ud.jsx)(Gtt,{slug:o,isCustom:n,postType:i,onClose:()=>t(!0)})}var pg=a(xa(),1),mg=a(Y(),1);var Ywe=a(be(),1);function sS(){let e=(0,mg.useSelect)(b=>{let{richEditingEnabled:_,codeEditingEnabled:y}=b(I).getEditorSettings();return!_||!y},[]),{getBlockSelectionStart:t}=(0,mg.useSelect)(Ywe.store),{getActiveComplementaryArea:r}=(0,mg.useSelect)(He),{enableComplementaryArea:o,disableComplementaryArea:n}=(0,mg.useDispatch)(He),{redo:i,undo:s,savePost:l,setIsListViewOpened:c,switchEditorMode:u,toggleDistractionFree:d}=(0,mg.useDispatch)(I),{isEditedPostDirty:f,isPostSavingLocked:m,isListViewOpened:h,getEditorMode:g,isSavingNonPostEntityChanges:v}=(0,mg.useSelect)(I);return(0,pg.useShortcut)("core/editor/toggle-mode",()=>{u(g()==="visual"?"text":"visual")},{isDisabled:e}),(0,pg.useShortcut)("core/editor/toggle-distraction-free",()=>{d()}),(0,pg.useShortcut)("core/editor/undo",b=>{s(),b.preventDefault()}),(0,pg.useShortcut)("core/editor/redo",b=>{i(),b.preventDefault()}),(0,pg.useShortcut)("core/editor/save",b=>{b.preventDefault(),!(m()||v())&&f()&&l()}),(0,pg.useShortcut)("core/editor/toggle-list-view",b=>{h()||(b.preventDefault(),c(!0))}),(0,pg.useShortcut)("core/editor/toggle-sidebar",b=>{if(b.preventDefault(),["edit-post/document","edit-post/block"].includes(r("core")))n("core");else{let y=t()?"edit-post/block":"edit-post/document";o("core",y)}}),null}var o_e=a(Y(),1),v3=a(be(),1);var HE=a(Y(),1),h3=a(be(),1),qwe=a(ae(),1),g3=a(G(),1),Wd=a(j(),1),Kwe=a(Lt(),1),Zwe=a(U(),1),vy=a(E(),1);function Xwe({clientId:e,onClose:t}){let[r,o]=(0,Zwe.useState)(!1),{getBlocks:n}=(0,HE.useSelect)(h3.store),{replaceBlocks:i}=(0,HE.useDispatch)(h3.store),{canRemove:s,templatePartTitle:l}=(0,HE.useSelect)(d=>{let{canRemoveBlock:f,getBlock:m}=d(h3.store),{getEntityRecord:h,getCurrentTheme:g}=d(qwe.store),v=m(e),{slug:b,theme:_}=v?.attributes??{},y=_||g()?.stylesheet,w=y&&b?`${y}//${b}`:null,S=w?h("postType","wp_template_part",w):null;return{canRemove:f(e),templatePartTitle:S?.title?.rendered?(0,Kwe.decodeEntities)(S.title.rendered):null}},[e]);if(!s)return null;let c=l?(0,Wd.sprintf)((0,Wd.__)("Detach %s?"),l):(0,Wd.__)("Detach template part?"),u=l?(0,Wd.sprintf)((0,Wd.__)("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,Wd.__)("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,vy.jsxs)(vy.Fragment,{children:[(0,vy.jsx)(g3.MenuItem,{onClick:()=>o(!0),children:(0,Wd.__)("Detach")}),(0,vy.jsx)(g3.__experimentalConfirmDialog,{isOpen:r,onConfirm:()=>{i(e,n(e)),t()},onCancel:()=>o(!1),confirmButtonText:(0,Wd.__)("Detach"),size:"medium",title:c,__experimentalHideHeader:!1,children:u})]})}var UE=a(Y(),1),HG=a(be(),1),Qwe=a(G(),1),Jwe=a(Pt(),1),UG=a(j(),1),$we=a(U(),1),e_e=a(It(),1);var t_e=a(ae(),1);var by=a(E(),1);function r_e({clientIds:e,blocks:t}){let[r,o]=(0,$we.useState)(!1),{replaceBlocks:n}=(0,UE.useDispatch)(HG.store),{createSuccessNotice:i}=(0,UE.useDispatch)(e_e.store),{isBlockBasedTheme:s,canCreate:l}=(0,UE.useSelect)(u=>({isBlockBasedTheme:u(t_e.store).getCurrentTheme()?.is_block_theme,canCreate:u(HG.store).canInsertBlockType("core/template-part")}),[]);if(!s||!l)return null;let c=async u=>{n(e,(0,Jwe.createBlock)("core/template-part",{slug:u.slug,theme:u.theme})),i((0,UG.__)("Template part created."),{type:"snackbar"})};return(0,by.jsxs)(by.Fragment,{children:[(0,by.jsx)(Qwe.MenuItem,{icon:hv,onClick:()=>{o(!0)},"aria-expanded":r,"aria-haspopup":"dialog",children:(0,UG.__)("Create template part")}),r&&(0,by.jsx)(Rw,{closeModal:()=>{o(!1)},blocks:t,onCreate:c})]})}var WE=a(E(),1);function n_e(){return(0,WE.jsx)(v3.BlockSettingsMenuControls,{children:({selectedClientIds:e,onClose:t})=>(0,WE.jsx)(Ytt,{clientIds:e,onClose:t})})}function Ytt({clientIds:e,onClose:t}){let{blocks:r}=(0,o_e.useSelect)(o=>{let{getBlocksByClientId:n}=o(v3.store);return{blocks:n(e)}},[e]);return r.length===1&&r[0]?.name==="core/template-part"?(0,WE.jsx)(Xwe,{clientId:e[0],onClose:t}):(0,WE.jsx)(r_e,{clientIds:e,blocks:r})}var s_e=a(be(),1),a_e=a(Y(),1),l_e=a(U(),1);var i_e=a(U(),1),b3=a(Y(),1);function qtt({postType:e}){let{registerPostTypeSchema:t}=K((0,b3.useDispatch)(I));(0,i_e.useEffect)(()=>{t(e)},[t,e]);let{fields:r}=(0,b3.useSelect)(o=>{let{getEntityFields:n}=K(o(I));return{fields:n("postType",e)}},[e]);return r}var aS=qtt;var WG=a(E(),1),{MediaEditorModal:Ktt,store:Ztt}=K(T_);function Xtt(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 Qtt({name:e,ratio:t}={}){let r=Xtt(t);return!e||!Number.isFinite(r)||r<=0?null:{label:e,value:r}}function c_e(){return(0,a_e.useSelect)(t=>t(Ztt).isOpen(),[])?(0,WG.jsx)(Jtt,{}):null}function Jtt(){let e=aS({postType:"attachment"}),[t,r,o]=(0,s_e.useSettings)("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),n=(0,l_e.useMemo)(()=>{if(!(Array.isArray(t)||Array.isArray(r)||typeof o=="boolean"))return;let l=[...o&&Array.isArray(t)?t:[],...Array.isArray(r)?r:[]].map(Qtt).filter(Boolean);if(l.length||o===!1)return l},[t,r,o]);return(0,WG.jsx)(Ktt,{fields:e,aspectRatioPresets:n})}var Yo=a(E(),1),{ExperimentalBlockEditorProvider:$tt}=K(lS.privateApis),{PatternsMenuItems:ert}=K(d_e.privateApis),GE=()=>{},trt=["wp_block","wp_navigation","wp_template_part"];function rrt(e,t,r){let o=awe(),n=r==="template-locked"?"template":"post",[i,s,l]=(0,Ip.useEntityBlockEditor)("postType",e.type,{id:e.id}),[c,u,d]=(0,Ip.useEntityBlockEditor)("postType",t?.type,{id:t?.id}),f=(0,gl.useMemo)(()=>{if(e.type==="wp_navigation")return[(0,f_e.createBlock)("core/navigation",{ref:e.id,templateLock:!1})]},[e.type,e.id]),m=(0,gl.useMemo)(()=>f||(n==="template"?c:i),[f,n,c,i]);return o!==null?[o,GE,GE]:!!t&&r==="template-locked"||e.type==="wp_navigation"?[m,GE,GE]:[m,n==="post"?s:u,n==="post"?l:d]}var YG=mae(({post:e,settings:t,recovery:r,initialEdits:o,children:n,BlockEditorProviderComponent:i=$tt,__unstableTemplate:s})=>{let l=!!s,{editorSettings:c,selection:u,isReady:d,mode:f,defaultMode:m,postTypeEntities:h,isInRevisionsMode:g,currentRevisionId:v}=(0,hg.useSelect)(W=>{let{getEditorSettings:q,getRenderingMode:Z,__unstableIsEditorReady:Q,getDefaultRenderingMode:ce,isRevisionsMode:re,getCurrentRevisionId:fe}=K(W(I)),{getEntitiesConfig:pe,getEntityRecordEdits:$}=W(Ip.store),te=Z(),de=ce(e.type),ve=de==="template-locked"?l:de!==void 0,we=de!==void 0,oe=$("postType",e.type,e.id);return{editorSettings:q(),isReady:Q(),mode:we?te:void 0,defaultMode:ve?de:void 0,selection:oe?.selection,postTypeEntities:e.type==="wp_template"?pe("postType"):null,isInRevisionsMode:re(),currentRevisionId:fe()}},[e.type,e.id,l]),b=l&&f!=="post-only",_=b?s:e,y=(0,gl.useMemo)(()=>{let W={};if(e.type==="wp_template"){if(e.slug==="page")W.postType="page";else if(e.slug==="single")W.postType="post";else if(e.slug.split("-")[0]==="single"){let q=h?.map(Q=>Q.name)||[],Z=e.slug.match(`^single-(${q.join("|")})(?:-.+)?$`);Z&&(W.postType=Z[1])}}else(!trt.includes(_.type)||b)&&(W.postId=e.id,W.postType=e.type);return{...W,templateSlug:_.type==="wp_template"?_.slug:void 0}},[b,e.id,e.type,e.slug,_.type,_.slug,h]),{id:w,type:S}=_,x=D0e(c,S,w,f),[C,A,k]=rrt(e,s,f),{updatePostLock:R,setupEditor:M,updateEditorSettings:P,setCurrentTemplateId:T,setEditedPost:N,setRenderingMode:L,setCurrentRevisionId:F}=K((0,hg.useDispatch)(I)),{editEntityRecord:D}=(0,hg.useDispatch)(Ip.store),z=(0,hg.useRegistry)(),B=(0,gl.useCallback)(W=>{D("postType",e.type,e.id,{selection:W},{undoIgnore:!0})},[D,e.type,e.id]),{createWarningNotice:O,removeNotice:V}=(0,hg.useDispatch)(u_e.store);return(0,gl.useLayoutEffect)(()=>{if(!r&&(R(t.postLock),z.select(I).__unstableIsEditorReady()||M(e,o,t.template),t.autosave)){let W=Number((0,p_e.getQueryArg)(t.autosave.editLink,"revision"));O((0,GG.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:(0,GG.__)("View the autosave"),...W?{onClick:()=>{let{disableVisualRevisions:q}=z.select(I).getEditorSettings();if(q){window.location.href=t.autosave.editLink;return}F(W)}}:{url:t.autosave.editLink}}]})}},[]),(0,gl.useEffect)(()=>(N(e.type,e.id),typeof window<"u"&&window.__experimentalTemplateActivate&&V("template-activate-notice"),()=>N(null,null)),[e.type,e.id,N,V]),(0,gl.useLayoutEffect)(()=>{P(t)},[t,P]),(0,gl.useEffect)(()=>{T(s?.id)},[s?.id,T]),(0,gl.useEffect)(()=>{m&&L(m)},[m,L]),W0e(e.type,f),ywe(),xwe(),Ewe(),!d||!f?null:(0,Yo.jsx)(Ip.EntityProvider,{kind:"root",type:"site",children:(0,Yo.jsx)(Ip.EntityProvider,{kind:"postType",type:e.type,id:e.id,revisionId:v??void 0,children:(0,Yo.jsx)(lS.BlockContextProvider,{value:y,children:(0,Yo.jsxs)(i,{value:C,onChange:k,onInput:A,selection:g?void 0:u,onChangeSelection:g?GE:B,settings:x,useSubRegistry:!1,children:[n,!t.isPreviewMode&&(0,Yo.jsxs)(Yo.Fragment,{children:[(0,Yo.jsx)(ert,{}),(0,Yo.jsx)(n_e,{}),f==="template-locked"&&(0,Yo.jsx)(V0e,{}),S==="wp_navigation"&&(0,Yo.jsx)(z0e,{}),(0,Yo.jsx)(sS,{}),(0,Yo.jsx)(Uwe,{}),(0,Yo.jsx)(Iwe,{}),(0,Yo.jsx)(Nwe,{}),(0,Yo.jsx)(Gwe,{}),(0,Yo.jsx)(fwe,{}),(0,Yo.jsx)(gwe,{}),(0,Yo.jsx)(c_e,{})]})]})})})})});function qG(e){return(0,Yo.jsx)(YG,{...e,BlockEditorProviderComponent:lS.BlockEditorProvider,children:e.children})}var m_e=qG;var gg=a(E(),1);function ort({template:e,post:t}){let[r="white"]=cg("color.background"),[o]=(0,YE.useEntityBlockEditor)("postType",t.type,{id:t.id}),[n]=(0,YE.useEntityBlockEditor)("postType",e?.type,{id:e?.id}),i=e&&n?n:o,s=!i?.length;return(0,gg.jsxs)("div",{className:"editor-fields-content-preview",style:{backgroundColor:r},children:[s&&(0,gg.jsx)("span",{className:"editor-fields-content-preview__empty",children:(0,h_e.__)("Empty content")}),!s&&(0,gg.jsx)(KG.BlockPreview.Async,{children:(0,gg.jsx)(KG.BlockPreview,{blocks:i})})]})}function v_e({item:e}){let{settings:t,template:r}=(0,g_e.useSelect)(o=>{let{canUser:n,getPostType:i,getTemplateId:s,getEntityRecord:l}=K(o(YE.store)),c=n("read",{kind:"postType",name:"wp_template"}),u=o(I).getEditorSettings(),d=u.supportsTemplateMode,f=i(e.type)?.viewable??!1,m=d&&f&&c?s(e.type,e.id):null;return{settings:u,template:m?l("postType","wp_template",m):void 0}},[e.type,e.id]);return(0,gg.jsx)(qG,{post:e,settings:t,__unstableTemplate:r,children:(0,gg.jsx)(ort,{template:r,post:e})})}var nrt={type:"media",id:"content-preview",label:(0,b_e.__)("Content preview"),render:v_e,enableSorting:!1},y_e=nrt;function irt(e){let t=e?.editor;return Array.isArray(t)?!!t[0]?.notes:!1}function srt(e,t,r){return{type:"REGISTER_ENTITY_ACTION",kind:e,name:t,config:r}}function art(e,t,r){return{type:"UNREGISTER_ENTITY_ACTION",kind:e,name:t,actionId:r}}function lrt(e,t,r){return{type:"REGISTER_ENTITY_FIELD",kind:e,name:t,config:r}}function crt(e,t,r){return{type:"UNREGISTER_ENTITY_FIELD",kind:e,name:t,fieldId:r}}function urt(e,t){return{type:"SET_IS_READY",kind:e,name:t}}var drt=[IH,RH,MH,LH,FH,DH,kH,z2,CH,AH,NH],frt=e=>async({registry:t})=>{if(K(t.select(I)).isEntityReady("postType",e))return;K(t.dispatch(I)).setIsReady("postType",e);let o=await t.resolveSelect(y3.store).getPostType(e),n=await t.resolveSelect(y3.store).canUser("create",{kind:"postType",name:e}),i=await t.resolveSelect(y3.store).getCurrentTheme(),{disablePostFormats:s}=t.select(I).getEditorSettings(),l=!["wp_block","wp_template_part"].includes(o.slug)&&n&&nH;o.slug!=="wp_template"&&(l=void 0),o.slug==="wp_template"&&!window?.__experimentalTemplateActivate&&(l=void 0);let c=[o.viewable?$z:void 0,o.supports?.revisions?pH:void 0,l,o.slug==="wp_template_part"&&n&&i?.is_block_theme?xH:void 0,n&&o.slug==="wp_block"?lH:void 0,o.supports?.title?sH:void 0,o.supports?.["page-attributes"]?tH:void 0,o.slug==="wp_block"?fH:void 0,gH,aH,_H,bH,hH].filter(Boolean),u;if(e===Pl)u=drt;else{let d=o.slug,f=pm.includes(d),m=d==="wp_block";if(u=[o.supports?.thumbnail&&i?.theme_supports?.["post-thumbnails"]&&mz,!f&&o.supports?.author&&tT,d==="wp_template"&&Fz,d==="wp_template_part"&&Dz,!f&&Tz,!f&&Az,!f&&Iz,Oz,!f&&U8,!f&&o.supports?.excerpt&&jz,m&&o.supports?.excerpt&&Tj,o.supports?.["page-attributes"]&&xz,o.supports?.comments&&Ez,o.supports?.trackbacks&&kz,(o.supports?.comments||o.supports?.trackbacks)&&Rz,!f&&yz,o.supports?.["post-formats"]&&!s&&Wz,(!f||m)&&o.supports?.editor&&Gz,!f&&Cz,d==="post"&&qz,d==="wp_template"&&Uz,d==="wp_template"&&Hz,d==="wp_template"&&Jz,d==="wp_template"&&Zz,d==="wp_template"&&Xz,o.supports?.editor&&o.viewable&&y_e,irt(o.supports)&&Lz,m&&Ej].filter(Boolean),o.supports?.title){let h;e==="page"?h=K8:e==="wp_template"?h=K1:["wp_block","wp_template_part"].includes(e)?h=AC:h=z2,u.push(h)}}t.batch(()=>{c.forEach(d=>{K(t.dispatch(I)).registerEntityAction("postType",e,d)}),u.forEach(d=>{K(t.dispatch(I)).registerEntityField("postType",e,d)})}),(0,w_e.doAction)("core.registerPostTypeSchema",e)};function prt(e){return{type:"SET_CURRENT_TEMPLATE_ID",id:e}}var mrt=e=>async({select:t,dispatch:r,registry:o})=>{let n=await o.dispatch(ni.store).saveEntityRecord("postType","wp_template",e);return o.dispatch(ni.store).editEntityRecord("postType",t.getCurrentPostType(),t.getCurrentPostId(),{template:n.slug}),o.dispatch(ss.store).createSuccessNotice((0,qt.__)("Custom template created. You're in template mode now."),{type:"snackbar",actions:[{label:(0,qt.__)("Go back"),onClick:()=>r.setRenderingMode(t.getEditorSettings().defaultRenderingMode)}]}),n},hrt=e=>({registry:t})=>{let o=(t.select(yy.store).get("core","hiddenBlockTypes")??[]).filter(n=>!(Array.isArray(e)?e:[e]).includes(n));t.dispatch(yy.store).set("core","hiddenBlockTypes",o)},grt=e=>({registry:t})=>{let r=t.select(yy.store).get("core","hiddenBlockTypes")??[],o=new Set([...r,...Array.isArray(e)?e:[e]]);t.dispatch(yy.store).set("core","hiddenBlockTypes",[...o])},vrt=({onSave:e,dirtyEntityRecords:t=[],entitiesToSkip:r=[],close:o,successNoticeContent:n}={})=>({registry:i})=>{let s=[{kind:"postType",name:"wp_navigation"}],l="site-editor-save-success",c=i.select(ni.store).getEntityRecord("root","__unstableBase")?.home;i.dispatch(ss.store).removeNotice(l);let u=t.filter(({kind:m,name:h,key:g,property:v})=>!r.some(b=>b.kind===m&&b.name===h&&b.key===g&&b.property===v));o?.(u);let d=[],f=[];u.forEach(({kind:m,name:h,key:g,property:v})=>{m==="root"&&h==="site"?d.push(v):(s.some(b=>b.kind===m&&b.name===h)&&i.dispatch(ni.store).editEntityRecord(m,h,g,{status:"publish"}),f.push(i.dispatch(ni.store).saveEditedEntityRecord(m,h,g)))}),d.length&&f.push(i.dispatch(ni.store).__experimentalSaveSpecifiedEntityEdits("root","site",void 0,d)),i.dispatch(w3.store).__unstableMarkLastChangeAsPersistent(),Promise.all(f).then(async m=>(e&&await e(),m)).then(m=>{m.some(h=>typeof h>"u")?i.dispatch(ss.store).createErrorNotice((0,qt.__)("Saving failed.")):i.dispatch(ss.store).createSuccessNotice(n||(0,qt.__)("Site updated."),{type:"snackbar",id:l,actions:[{label:(0,qt.__)("View site"),url:c,openInNewTab:!0}]})}).catch(m=>i.dispatch(ss.store).createErrorNotice(`${(0,qt.__)("Saving failed.")} ${m}`))},brt=(e,{allowUndo:t=!0}={})=>async({registry:r})=>{let o="edit-site-template-reverted";if(r.dispatch(ss.store).removeNotice(o),!N2(e)){r.dispatch(ss.store).createErrorNotice((0,qt.__)("This template is not revertable."),{type:"snackbar"});return}try{let n=r.select(ni.store).getEntityConfig("postType",e.type);if(!n){r.dispatch(ss.store).createErrorNotice((0,qt.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let i=(0,__e.addQueryArgs)(`${n.baseURL}/${e.id}`,{context:"edit",source:e.origin}),s=await(0,S_e.default)({path:i});if(!s){r.dispatch(ss.store).createErrorNotice((0,qt.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let l=({blocks:d=[]})=>(0,_3.__unstableSerializeAndClean)(d),c=r.select(ni.store).getEditedEntityRecord("postType",e.type,e.id);r.dispatch(ni.store).editEntityRecord("postType",e.type,e.id,{content:l,blocks:c.blocks,source:"custom"},{undoIgnore:!0});let u=(0,_3.parse)(s?.content?.raw);if(r.dispatch(ni.store).editEntityRecord("postType",e.type,s.id,{content:l,blocks:u,source:"theme"}),t){let d=()=>{r.dispatch(ni.store).editEntityRecord("postType",e.type,c.id,{content:l,blocks:c.blocks,source:"custom"})};r.dispatch(ss.store).createSuccessNotice((0,qt.__)("Template reset."),{type:"snackbar",id:o,actions:[{label:(0,qt.__)("Undo"),onClick:d}]})}}catch(n){let i=n.message&&n.code!=="unknown_error"?n.message:(0,qt.__)("Template revert failed. Please reload.");r.dispatch(ss.store).createErrorNotice(i,{type:"snackbar"})}},yrt=e=>async({registry:t})=>{let r=e.every(n=>n?.has_theme_file),o=await Promise.allSettled(e.map(n=>t.dispatch(ni.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,qt.sprintf)((0,qt.__)('"%s" reset.'),(0,ZG.decodeEntities)(i)):(0,qt.sprintf)((0,qt._x)('"%s" deleted.',"template part"),(0,ZG.decodeEntities)(i))}else n=r?(0,qt.__)("Items reset."):(0,qt.__)("Items deleted.");t.dispatch(ss.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,qt.__)("An error occurred while reverting the item."):(0,qt.__)("An error occurred while deleting the item.");else{let i=new Set,s=o.filter(({status:l})=>l==="rejected");for(let l of s)l.reason?.message&&i.add(l.reason.message);i.size===0?n=(0,qt.__)("An error occurred while deleting the items."):i.size===1?n=r?(0,qt.sprintf)((0,qt.__)("An error occurred while reverting the items: %s"),[...i][0]):(0,qt.sprintf)((0,qt.__)("An error occurred while deleting the items: %s"),[...i][0]):n=r?(0,qt.sprintf)((0,qt.__)("Some errors occurred while reverting the items: %s"),[...i].join(",")):(0,qt.sprintf)((0,qt.__)("Some errors occurred while deleting the items: %s"),[...i].join(","))}t.dispatch(ss.store).createErrorNotice(n,{type:"snackbar"})}},wrt=e=>({select:t,registry:r})=>{let o=t.getCurrentPostType(),n=r.select(ni.store).getCurrentTheme()?.stylesheet,i=r.select(yy.store).get("core","renderingModes")?.[n]??{};if(i[o]===e)return;let s={[n]:{...i,[o]:e}};r.dispatch(yy.store).set("core","renderingModes",s)};function _rt(e){return{type:"SET_STYLES_PATH",path:e}}function Srt(e){return{type:"SET_SHOW_STYLEBOOK",show:e}}function xrt(){return{type:"RESET_STYLES_NAVIGATION"}}function XG(e){return({dispatch:t,registry:r})=>{t({type:"SET_CANVAS_WIDTH",width:e});let o=K(r.select(w3.store));if(o.isResponsiveEditing()){let n=o.getSettings().__experimentalFeatures?.viewport,i=x0(e,n);K(r.dispatch(w3.store)).setStyleStateViewport(k2[i]??"default")}}}function Crt(e){return{type:"SET_CURRENT_REVISION_ID",revisionId:e}}var Trt=e=>async({dispatch:t,select:r,registry:o})=>{let n=r.getCurrentPostType(),i=r.getCurrentPostId(),l=o.select(ni.store).getEntityConfig("postType",n)?.revisionKey||"id",c=await o.resolveSelect(ni.store).getRevisions("postType",n,i,Sv(l,e));o.batch(()=>{t({type:"SET_REVISION_PAGE",page:e}),c?.length&&t.setCurrentRevisionId(c[0][l])})};function Ert(e){return{type:"SET_SHOW_REVISION_DIFF",showDiff:e}}var Prt=e=>async({select:t,dispatch:r,registry:o})=>{let n=t.getCurrentPostType(),i=t.getCurrentPostId(),l=o.select(ni.store).getEntityConfig("postType",n)?.revisionKey||"id",c=await o.resolveSelect(ni.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(),!t.didPostSaveRequestFail()&&(o.dispatch(ss.store).removeNotice("autosave-exists"),o.dispatch(ss.store).createSuccessNotice((0,qt.sprintf)((0,qt.__)("Restored to revision from %s."),(0,S3.dateI18n)((0,S3.getSettings)().formats.datetime,c.date)),{type:"snackbar",id:"editor-revision-restored"}))};function krt(e,t={focus:!1}){return{type:"SELECT_NOTE",noteId:e,options:t}}var Rrt=(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 s=(0,cS.parse)(i);s=(0,cS.synchronizeBlocksWithTemplate)(s,r),o.resetEditorBlocks(s,{__unstableShouldCreateUndoLevel:!1})}t&&Object.entries(t).some(([i,s])=>s!==(e[i]?.raw??e[i]))&&o.editPost(t)};function Art(){return(0,vg.default)("wp.data.dispatch( 'core/editor' ).__experimentalTearDownEditor",{since:"6.5"}),{type:"DO_NOTHING"}}function Irt(){return(0,vg.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 Ort(){return(0,vg.default)("wp.data.dispatch( 'core/editor' ).updatePost",{since:"5.7",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function Nrt(e){return(0,vg.default)("wp.data.dispatch( 'core/editor' ).setupEditorState",{since:"6.5",alternative:"wp.data.dispatch( 'core/editor' ).setEditedPost"}),C_e(e.type,e.id)}function C_e(e,t){return{type:"SET_EDITED_POST",postType:e,postId:t}}var Mrt=(e,t)=>({select:r,registry:o})=>{let{id:n,type:i}=r.getCurrentPost();o.dispatch(Ks.store).editEntityRecord("postType",i,n,e,t)},Frt=(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(),s={id:i.id,...o.select(Ks.store).getEntityRecordNonTransientEdits("postType",i.type,i.id),content:n};r({type:"REQUEST_POST_UPDATE_START",options:e});let l=!1;try{s=await(0,uS.applyFiltersAsync)("editor.preSavePost",s,e)}catch(c){l=c}if(!l)try{await o.dispatch(Ks.store).saveEntityRecord("postType",i.type,s,e)}catch(c){l=c.message&&c.code!=="unknown_error"?c.message:(0,wn.__)("An error occurred while updating.")}if(l||(l=o.select(Ks.store).getLastEntitySaveError("postType",i.type,i.id)),!l)try{await(0,uS.applyFilters)("editor.__unstableSavePost",Promise.resolve(),e)}catch(c){l=c}if(!l)try{await(0,uS.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))&&Drt({select:t,dispatch:r,registry:o}),l){let c=DX({post:i,edits:s,error:l});c.length&&o.dispatch(nu.store).createErrorNotice(...c)}else{let c=t.getCurrentPost(),u=FX({previousPost:i,post:c,postType:await o.resolveSelect(Ks.store).getPostType(c.type),options:e});u.length&&o.dispatch(nu.store).createSuccessNotice(...u),e.isAutosave||o.dispatch(Op.store).__unstableMarkLastChangeAsPersistent()}};async function Drt({select:e,registry:t}){if(e.getEditorSettings().onNavigateToPreviousEntityRecord)return;let{id:o,slug:n}=e.getCurrentPost();if((await t.select(Ks.store).getEntityRecord("root","site")).active_templates[n]===o)return;let l=(await t.resolveSelect(Ks.store).getCurrentTheme())?.default_template_types.find(c=>c.slug===n);await t.dispatch(nu.store).createNotice("info",(0,wn.sprintf)((0,wn.__)('Do you want to activate this "%s" template?'),l?.title??n),{id:"template-activate-notice",actions:[{label:(0,wn.__)("Activate"),onClick:async()=>{await t.dispatch(nu.store).createNotice("info",(0,wn.__)("Activating template\u2026"),{id:"template-activate-notice"});try{let c=await t.select(Ks.store).getEntityRecord("root","site");await t.dispatch(Ks.store).saveEntityRecord("root","site",{active_templates:{...c.active_templates,[n]:o}},{throwOnError:!0}),await t.dispatch(nu.store).createSuccessNotice((0,wn.__)("Template activated."),{id:"template-activate-notice"})}catch(c){throw await t.dispatch(nu.store).createErrorNotice((0,wn.__)("Template activation failed."),{id:"template-activate-notice"}),c}}}]})}function Lrt(){return(0,vg.default)("wp.data.dispatch( 'core/editor' ).refreshPost",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}var Brt=()=>async({select:e,dispatch:t,registry:r})=>{let o=e.getCurrentPostType(),n=await r.resolveSelect(Ks.store).getPostType(o),{rest_base:i,rest_namespace:s="wp/v2"}=n;t({type:"REQUEST_POST_DELETE_START"});try{let l=e.getCurrentPost();await(0,x_e.default)({path:`/${s}/${i}/${l.id}`,method:"DELETE"}),await t.savePost()}catch(l){r.dispatch(nu.store).createErrorNotice(...LX({error:l}))}t({type:"REQUEST_POST_DELETE_FINISH"})},Vrt=({local:e=!1,...t}={})=>async({select:r,dispatch:o})=>{let n=r.getCurrentPost();if(e){let i=r.isEditedPostNew(),s=r.getEditedPostAttribute("title"),l=r.getEditedPostAttribute("content"),c=r.getEditedPostAttribute("excerpt");MX(n.id,i,s,l,c)}else await o.savePost({isAutosave:!0,...t})},jrt=({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()),zrt=()=>({registry:e})=>{e.dispatch(Ks.store).redo()},Hrt=()=>({registry:e})=>{e.dispatch(Ks.store).undo()};function Urt(){return(0,vg.default)("wp.data.dispatch( 'core/editor' ).createUndoLevel",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function Wrt(e){return{type:"UPDATE_POST_LOCK",lock:e}}var Grt=()=>({registry:e})=>{e.dispatch(sn.store).set("core","isPublishSidebarEnabled",!0)},Yrt=()=>({registry:e})=>{e.dispatch(sn.store).set("core","isPublishSidebarEnabled",!1)};function qrt(e){return{type:"LOCK_POST_SAVING",lockName:e}}function Krt(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function Zrt(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function Xrt(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}var Qrt=(e,t={})=>({select:r,dispatch:o,registry:n})=>{let{__unstableShouldCreateUndoLevel:i,selection:s}=t,l={blocks:e,selection:s};if(i!==!1){let{id:c,type:u}=r.getCurrentPost();if(n.select(Ks.store).getEditedEntityRecord("postType",u,c).blocks===l.blocks){n.dispatch(Ks.store).__unstableCreateUndoLevel("postType",u,c);return}l.content=({blocks:f=[]})=>(0,cS.__unstableSerializeAndClean)(f)}o.editPost(l)};function Jrt(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}var $rt=e=>({dispatch:t,registry:r,select:o})=>{o.__unstableIsEditorReady()&&!o.getEditorSettings().isPreviewMode&&r.dispatch(Op.store).clearSelectedBlock(),t({type:"SET_RENDERING_MODE",mode:e})};function eot(e){return({dispatch:t,registry:r})=>{let o=K(r.select(Op.store)).getSettings().__experimentalFeatures?.viewport,n=S0(e,o);t(XG(n))}}var tot=e=>({registry:t})=>{let r=t.select(sn.store).get("core","inactivePanels")??[],o=!!r?.includes(e),n;o?n=r.filter(i=>i!==e):n=[...r,e],t.dispatch(sn.store).set("core","inactivePanels",n)},rot=e=>({registry:t})=>{let r=t.select(sn.store).get("core","openPanels")??[],o=!!r?.includes(e),n;o?n=r.filter(i=>i!==e):n=[...r,e],t.dispatch(sn.store).set("core","openPanels",n)};function oot(e){return{type:"REMOVE_PANEL",panelName:e}}var not=e=>({dispatch:t,registry:r})=>{typeof e=="object"&&e.hasOwnProperty("rootClientId")&&e.hasOwnProperty("insertionIndex")&&K(r.dispatch(Op.store)).setInsertionPoint({rootClientId:e.rootClientId,index:e.insertionIndex}),t({type:"SET_IS_INSERTER_OPENED",value:e})};function iot(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}var sot=({createNotice:e=!0}={})=>({dispatch:t,registry:r})=>{let o=r.select(sn.store).get("core","distractionFree");o&&r.dispatch(sn.store).set("core","fixedToolbar",!1),o||r.batch(()=>{r.dispatch(sn.store).set("core","fixedToolbar",!0),t.setIsInserterOpened(!1),t.setIsListViewOpened(!1),K(r.dispatch(Op.store)).resetZoomLevel()}),r.batch(()=>{r.dispatch(sn.store).set("core","distractionFree",!o),e&&r.dispatch(nu.store).createInfoNotice(o?(0,wn.__)("Distraction free mode deactivated."):(0,wn.__)("Distraction free mode activated."),{id:"core/editor/distraction-free-mode/notice",type:"snackbar",actions:[{label:(0,wn.__)("Undo"),onClick:()=>{r.batch(()=>{r.dispatch(sn.store).set("core","fixedToolbar",o),r.dispatch(sn.store).toggle("core","distractionFree")})}}]})})},aot=()=>({registry:e})=>{e.dispatch(sn.store).toggle("core","focusMode");let t=e.select(sn.store).get("core","focusMode");e.dispatch(nu.store).createInfoNotice(t?(0,wn.__)("Spotlight mode activated."):(0,wn.__)("Spotlight mode deactivated."),{id:"core/editor/toggle-spotlight-mode/notice",type:"snackbar",actions:[{label:(0,wn.__)("Undo"),onClick:()=>{e.dispatch(sn.store).toggle("core","focusMode")}}]})},lot=()=>({registry:e})=>{e.dispatch(sn.store).toggle("core","fixedToolbar");let t=e.select(sn.store).get("core","fixedToolbar");e.dispatch(nu.store).createInfoNotice(t?(0,wn.__)("Top toolbar activated."):(0,wn.__)("Top toolbar deactivated."),{id:"core/editor/toggle-top-toolbar/notice",type:"snackbar",actions:[{label:(0,wn.__)("Undo"),onClick:()=>{e.dispatch(sn.store).toggle("core","fixedToolbar")}}]})},cot=e=>({dispatch:t,registry:r})=>{r.dispatch(sn.store).set("core","editorMode",e),e!=="visual"&&(r.dispatch(Op.store).clearSelectedBlock(),K(r.dispatch(Op.store)).resetZoomLevel()),e==="visual"?(0,JG.speak)((0,wn.__)("Visual editor selected"),"assertive"):e==="text"&&(r.select(sn.store).get("core","distractionFree")&&t.toggleDistractionFree(),(0,JG.speak)((0,wn.__)("Code editor selected"),"assertive"))};function uot(){return{type:"OPEN_PUBLISH_SIDEBAR"}}function dot(){return{type:"CLOSE_PUBLISH_SIDEBAR"}}function fot(){return{type:"TOGGLE_PUBLISH_SIDEBAR"}}var lr=e=>(...t)=>({registry:r})=>{(0,vg.default)("`wp.data.dispatch( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`",version:"6.2"}),r.dispatch(Op.store)[e](...t)},pot=lr("resetBlocks"),mot=lr("receiveBlocks"),hot=lr("updateBlock"),got=lr("updateBlockAttributes"),vot=lr("selectBlock"),bot=lr("startMultiSelect"),yot=lr("stopMultiSelect"),wot=lr("multiSelect"),_ot=lr("clearSelectedBlock"),Sot=lr("toggleSelection"),xot=lr("replaceBlocks"),Cot=lr("replaceBlock"),Tot=lr("moveBlocksDown"),Eot=lr("moveBlocksUp"),Pot=lr("moveBlockToPosition"),kot=lr("insertBlock"),Rot=lr("insertBlocks"),Aot=lr("showInsertionPoint"),Iot=lr("hideInsertionPoint"),Oot=lr("setTemplateValidity"),Not=lr("synchronizeTemplate"),Mot=lr("mergeBlocks"),Fot=lr("removeBlocks"),Dot=lr("removeBlock"),Lot=lr("toggleBlockMode"),Bot=lr("startTyping"),Vot=lr("stopTyping"),jot=lr("enterFormattedText"),zot=lr("exitFormattedText"),Hot=lr("insertDefaultBlock"),Uot=lr("updateBlockListSettings");var iT={reducer:dZ,selectors:N8,actions:$G},I=(0,x3.createReduxStore)(bZ,{...iT});(0,x3.register)(I);K(I).registerPrivateActions(QG);K(I).registerPrivateSelectors(H8);var A_e=a(E(),1),Wot=e=>(0,k_e.createHigherOrderComponent)(t=>({attributes:r,setAttributes:o,...n})=>{let i=(0,T_e.useSelect)(u=>u(I).getCurrentPostType(),[]),[s,l]=(0,E_e.useEntityProp)("postType",i,"meta"),c=(0,P_e.useMemo)(()=>({...r,...Object.fromEntries(Object.entries(e).map(([u,d])=>[u,s[d]]))}),[r,s]);return(0,A_e.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 Got(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=Wot(t)(e.edit)),e}(0,R_e.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",Got);var VPe=a(jn(),1);var I_e=a(Bu(),1),O_e=a(vo(),1);var N_e=a(Lt(),1),wy=a(E(),1),Yot=10,C3={name:"links",className:"editor-autocompleters__link",triggerPrefix:"[[",isDebounced:!0,async options(e){return(await(0,I_e.default)({path:(0,O_e.addQueryArgs)("/wp/v2/search",{per_page:Yot,search:e,type:"post"})})).filter(r=>r.title!=="")},getOptionKeywords(e){return[...e.title.split(/\s+/)]},getOptionLabel(e){return(0,wy.jsxs)(wy.Fragment,{children:[(0,wy.jsx)(Cn,{icon:e.subtype==="page"?mm:EV}),(0,N_e.decodeEntities)(e.title)]})},getOptionCompletion(e){return(0,wy.jsx)("a",{href:e.url,children:e.title})}};var M_e=a(U(),1),F_e=a(Y(),1),D_e=a(ae(),1),Np=a(E(),1);function eY(e){let t=e.avatar_urls&&e.avatar_urls[24]?(0,Np.jsx)("img",{className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):(0,Np.jsx)("span",{className:"editor-autocompleters__no-avatar"});return(0,Np.jsxs)(Np.Fragment,{children:[t,(0,Np.jsx)("span",{className:"editor-autocompleters__user-name",children:e.name}),(0,Np.jsx)("span",{className:"editor-autocompleters__user-slug",children:e.slug})]})}var T3={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",useItems(e){let t=(0,F_e.useSelect)(o=>{let{getUsers:n}=o(D_e.store);return n({context:"view",search:e})},[e]);return[(0,M_e.useMemo)(()=>t?t.map(o=>({key:`user-${o.slug}`,value:o,label:eY(o)})):[],[t])]},getOptionCompletion(e){return`@${e.slug}`}};var fS=a(U(),1),dS=a(Y(),1),L_e=a(ae(),1);function qot(e,t){let r=(0,fS.useRef)(e);(0,fS.useEffect)(()=>{r.current=e},[e]),(0,fS.useEffect)(()=>{if(!t)return;let o=setInterval(()=>r.current(),t*1e3);return()=>clearInterval(o)},[t])}function E3({interval:e,autosave:t}){let{autosave:r}=(0,dS.useDispatch)(I),o=t??r,{getReferenceByDistinctEdits:n}=(0,dS.useSelect)(L_e.store),{isEditedPostDirty:i,isEditedPostAutosaveable:s,isAutosavingPost:l}=(0,dS.useSelect)(I),c=(0,dS.useSelect)(d=>e!==void 0?e:d(I).getEditorSettings().autosaveInterval,[e]),u=(0,fS.useRef)();return qot(()=>{if(!s())return;let d=n();d!==u.current&&i()&&!l()&&(u.current=d,o())},c),null}var Sg=a(j(),1),QE=a(Y(),1),au=a(G(),1),JE=a(be(),1);var _Se=a(ae(),1),SSe=a(OG(),1),j3=a(U(),1),xSe=a(Te(),1),CSe=a(Lt(),1),TSe=a(Mp(),1);var tY=a(j(),1),V_e=a(Y(),1),j_e=a(ae(),1);function P3(e){let{isFrontPage:t,isPostsPage:r}=(0,V_e.useSelect)(o=>{let{canUser:n,getEditedEntityRecord:i}=o(j_e.store),s=n("read",{kind:"root",name:"site"})?i("root","site"):void 0,l=parseInt(e,10);return{isFrontPage:s?.page_on_front===l,isPostsPage:s?.page_for_posts===l}});return t?(0,tY.__)("Homepage"):r?(0,tY.__)("Posts Page"):!1}var mSe=a(G(),1),hSe=a(Mo(),1),B3=a(j(),1),XE=a(Y(),1);var V3=a(Te(),1),gSe=a(Dt(),1);var KE=a(U(),1);var Sy=a(G(),1),iu=a(j(),1),Dn=a(be(),1),xy=a(Y(),1);var Wr=a(U(),1),M3=a(Mo(),1),X_e=a(Tf(),1),Q_e=a(ae(),1);var Ur=a(j(),1),pS=[{slug:"theme-colors",title:(0,Ur.__)("Theme Colors"),origin:"theme",type:"colors"},{slug:"theme-gradients",title:(0,Ur.__)("Theme Gradients"),origin:"theme",type:"gradients"},{slug:"custom-colors",title:(0,Ur.__)("Custom Colors"),origin:"custom",type:"colors"},{slug:"custom-gradients",title:(0,Ur.__)("Custom Gradients"),origin:"custom",type:"gradients"},{slug:"duotones",title:(0,Ur.__)("Duotones"),origin:"theme",type:"duotones"},{slug:"default-colors",title:(0,Ur.__)("Default Colors"),origin:"default",type:"colors"},{slug:"default-gradients",title:(0,Ur.__)("Default Gradients"),origin:"default",type:"gradients"}],k3=[{slug:"site-identity",title:(0,Ur.__)("Site Identity"),blocks:["core/site-logo","core/site-title","core/site-tagline"]},{slug:"design",title:(0,Ur.__)("Design"),blocks:["core/navigation","core/avatar","core/post-time-to-read"],exclude:["core/home-link","core/navigation-link"]},{slug:"posts",title:(0,Ur.__)("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,Ur.__)("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"]}],rY=[{slug:"overview",title:(0,Ur.__)("Overview"),blocks:[]},{slug:"text",title:(0,Ur.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,Ur.__)("Colors"),blocks:[]},{slug:"theme",title:(0,Ur.__)("Theme"),subcategories:k3},{slug:"media",title:(0,Ur.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,Ur.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,Ur.__)("Embeds"),include:[]}],Kot=[...k3,{slug:"media",title:(0,Ur.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,Ur.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,Ur.__)("Embeds"),include:[]}],z_e=[{slug:"overview",title:(0,Ur.__)("Overview"),blocks:[]},{slug:"text",title:(0,Ur.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,Ur.__)("Colors"),blocks:[]},{slug:"blocks",title:(0,Ur.__)("All Blocks"),blocks:[],subcategories:Kot}],Zot=`
	.is-root-container {
		display: flow-root;
	}
`,H_e=`
	body {
		position: relative;
		padding: 32px !important;
	}

	${Zot}

	.editor-style-book__examples {
		max-width: 1200px;
		margin: 0 auto;
	}

	.editor-style-book__example {
	    max-width: 900px;
		border-radius: 2px;
		cursor: var(--wpds-cursor-control, pointer);
		display: flex;
		flex-direction: column;
		gap: 40px;
		padding: 16px;
		width: 100%;
		box-sizing: border-box;
		scroll-margin-top: 32px;
		scroll-margin-bottom: 32px;
		margin: 0 auto 40px auto;
	}

	.editor-style-book__example.is-selected {
		box-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
	}

	.editor-style-book__example.is-disabled-example {
		pointer-events: none;
	}

	.editor-style-book__example:focus:not(:disabled) {
		box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
		outline: 3px solid transparent;
	}

	.editor-style-book__duotone-example > div:first-child {
		display: flex;
		aspect-ratio: 16 / 9;
		grid-row: span 1;
		grid-column: span 2;
	}
	.editor-style-book__duotone-example img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}
	.editor-style-book__duotone-example > div:not(:first-child) {
		height: 20px;
		border: 1px solid color-mix( in srgb, currentColor 10%, transparent );
	}

	.editor-style-book__color-example {
		border: 1px solid color-mix( in srgb, currentColor 10%, transparent );
	}

	.editor-style-book__subcategory-title,
	.editor-style-book__example-title {
		font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
		font-size: 13px;
		font-weight: normal;
		line-height: normal;
		margin: 0;
		text-align: left;
		padding-top: 8px;
		border-top: 1px solid color-mix( in srgb, currentColor 10%, transparent );
		color: color-mix( in srgb, currentColor 60%, transparent );
	}

	.editor-style-book__subcategory-title {
		font-size: 16px;
		margin-bottom: 40px;
    	padding-bottom: 8px;
	}

	.editor-style-book__example-preview {
		width: 100%;
	}

	.editor-style-book__example-preview .block-editor-block-list__insertion-point,
	.editor-style-book__example-preview .block-list-appender {
		display: none;
	}
	:where(.is-root-container > .wp-block:first-child) {
		margin-top: 0;
	}
	:where(.is-root-container > .wp-block:last-child) {
		margin-bottom: 0;
	}
`;var U_e=a(Pt(),1);function qE(e,t){if(!e?.slug||!t?.length)return;let r=e?.subcategories??[];if(r.length)return r.reduce((s,l)=>{let c=qE(l,t);return c&&(s.subcategories||(s.subcategories=[]),s.subcategories=[...s.subcategories,c]),s},{title:e.title,slug:e.slug});let o=e?.blocks||[],n=e?.exclude||[],i=t.filter(s=>!n.includes(s.name)&&(s.category===e.slug||o.includes(s.name)));if(i.length)return{title:e.title,slug:e.slug,examples:i}}function oY(){let e=[...k3,...rY].map(({slug:o})=>o),r=(0,U_e.getCategories)().filter(({slug:o})=>!e.includes(o));return[...rY,...r]}var Gd=a(j(),1),Ci=a(Pt(),1);var W_e=a(G(),1),R3=a(be(),1),nY=a(E(),1),Xot=({colors:e,type:t,templateColumns:r="1fr 1fr",itemHeight:o="52px"})=>e?(0,nY.jsx)(W_e.__experimentalGrid,{templateColumns:r,rowGap:8,columnGap:16,children:e.map(n=>{let i=t==="gradients"?(0,R3.__experimentalGetGradientClass)(n.slug):(0,R3.getColorClassName)("background-color",n.slug),s=J("editor-style-book__color-example",i);return(0,nY.jsx)("div",{className:s,style:{height:o}},n.slug)})}):null,iY=Xot;var sY=a(G(),1),_y=a(E(),1),Qot=({duotones:e})=>e?(0,_y.jsx)(sY.__experimentalGrid,{columns:2,rowGap:16,columnGap:16,children:e.map(t=>(0,_y.jsxs)(sY.__experimentalGrid,{className:"editor-style-book__duotone-example",columns:2,rowGap:8,columnGap:8,children:[(0,_y.jsx)("div",{children:(0,_y.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,_y.jsx)("div",{className:"editor-style-book__color-example",style:{backgroundColor:r}},r))]},t.slug))}):null,G_e=Qot;var A3=a(E(),1);function Jot(e){if(!e)return[];let t=[];return pS.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,A3.jsx)(G_e,{duotones:n[r.type]}),t.push(i)):(i.content=(0,A3.jsx)(iY,{colors:n[r.type],type:r.type}),t.push(i))}}),t}function $ot(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,Gd.__)("Colors"),category:"overview",content:(0,A3.jsx)(iY,{colors:r.colors,type:"colors",templateColumns:"repeat(auto-fill, minmax( 200px, 1fr ))",itemHeight:"32px"})};t.push(i)}let o=[];if((0,Ci.getBlockType)("core/heading")){let i=(0,Ci.createBlock)("core/heading",{content:(0,Gd.__)("AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789X{(\u2026)},.-<>?!*&:/A@HELFO\u2122\xA9"),level:1});o.push(i)}if((0,Ci.getBlockType)("core/paragraph")){let i=(0,Ci.createBlock)("core/paragraph",{content:(0,Gd.__)("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.")}),s=(0,Ci.createBlock)("core/paragraph",{content:(0,Gd.__)("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,Ci.getBlockType)("core/group")){let l=(0,Ci.createBlock)("core/group",{layout:{type:"grid",columnCount:2,minimumColumnWidth:"12rem"},style:{spacing:{blockGap:"1.5rem"}}},[i,s]);o.push(l)}else o.push(i)}return o.length&&t.push({name:"typography",title:(0,Gd.__)("Typography"),category:"overview",blocks:o}),["core/image","core/separator","core/buttons","core/pullquote","core/search"].forEach(i=>{let s=(0,Ci.getBlockType)(i);if(s&&s.example){let l={name:i,title:s.title,category:"overview",blocks:(0,Ci.getBlockFromExample)(i,{...s.example,attributes:{...s.example.attributes,style:void 0}})};t.push(l)}}),t}function aY(e){let t=(0,Ci.getBlockTypes)().filter(s=>{let{name:l,example:c,supports:u}=s;return l!=="core/heading"&&!!c&&u?.inserter!==!1}).map(s=>({name:s.name,title:s.title,category:s.category,blocks:(0,Ci.getBlockFromExample)(s.name,{...s.example,attributes:{...s.example?.attributes,style:void 0}})}));if(!!!(0,Ci.getBlockType)("core/heading"))return t;let o={name:"core/heading",title:(0,Gd.__)("Headings"),category:"text",blocks:[1,2,3,4,5,6].map(s=>(0,Ci.createBlock)("core/heading",{content:(0,Gd.sprintf)((0,Gd.__)("Heading %d"),s),level:s}))},n=Jot(e),i=$ot(e);return[o,...n,...t,...i]}var Z_e=a(U(),1),O3=a(Y(),1);var I3=a(Pt(),1),Y_e=a(Y(),1),q_e=a(U(),1);function mS(e={},t=!1){let o=vG("spacing.blockGap")!==null,n=!o,{disableLayoutStyles:i,getBlockStyles:s}=(0,Y_e.useSelect)(l=>{let{getEditorSettings:c}=l(I),{getBlockStyles:u}=l(I3.store);return{disableLayoutStyles:!!c()?.disableLayoutStyles,getBlockStyles:u}},[]);return(0,q_e.useMemo)(()=>{if(!e?.styles||!e?.settings)return[[],{}];let l=(0,I3.getBlockTypes)();return wv(e,l,{hasBlockGapSupport:o,hasFallbackGapSupport:n,disableLayoutStyles:i,disableRootPadding:t,getBlockStyles:s})},[o,n,e,i,t,s])}function K_e(e=!1){let{merged:t}=Hr();return mS(t,e)}function ent(e){let[t,r]=K_e(e),{getEditorSettings:o}=(0,O3.useSelect)(I),{updateEditorSettings:n}=(0,O3.useDispatch)(I);(0,Z_e.useEffect)(()=>{if(!t||!r)return;let i=o(),s=Object.values(i.styles??[]).filter(l=>!l.isGlobalStyles);n({...i,styles:[...s,...t],__experimentalFeatures:r})},[t,r,n,o])}function N3({disableRootPadding:e}){return ent(e),null}var Ut=a(E(),1),{ExperimentalBlockEditorProvider:tnt}=K(Dn.privateApis);function bg(e){return!e||Object.keys(e).length===0}var rnt=(e,t)=>{if(!e||!t||!t?.contentDocument)return;let r=e==="top"?t.contentDocument.body:t.contentDocument.getElementById(e);r&&r.scrollIntoView({behavior:"smooth"})},J_e=e=>e&&typeof e=="string"&&(e==="/"||e.startsWith("/typography")||e.startsWith("/colors")||e.startsWith("/blocks"))?{top:!0}:null;function $_e(){let{colors:e,gradients:t}=(0,Dn.__experimentalUseMultipleOriginColorsAndGradients)(),[r,o,n,i]=(0,Dn.useSettings)("color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default");return(0,Wr.useMemo)(()=>{let l={colors:e,gradients:t,duotones:[]};return n&&n.length&&l.duotones.push({name:(0,iu._x)("Theme","Indicates these duotone filters come from the theme."),slug:"theme",duotones:n}),r&&i&&i.length&&l.duotones.push({name:(0,iu._x)("Default","Indicates these duotone filters come from WordPress."),slug:"default",duotones:i}),o&&o.length&&l.duotones.push({name:(0,iu._x)("Custom","Indicates these doutone filters are created by the user."),slug:"custom",duotones:o}),l},[e,t,o,n,i,r])}function eSe(e){let t=[],r=qE({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 ont(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 nnt({isSelected:e,onClick:t,onSelect:r,showTabs:o=!0,userConfig:n={},path:i=""},s){let l=cg("color.text"),c=cg("color.background"),u=$_e(),d=(0,Wr.useMemo)(()=>aY(u),[u]),f=(0,Wr.useMemo)(()=>oY().filter(w=>d.some(S=>S.category===w.slug)),[d]),m=eSe(d),{base:h}=Hr(),g=J_e(i),v=(0,Wr.useMemo)(()=>!bg(n)&&!bg(h)?Fi(h,n):{},[h,n]),b=(0,xy.useSelect)(w=>w(Dn.store).getSettings(),[]),[_]=mS(v),y=(0,Wr.useMemo)(()=>({...b,styles:!bg(_)&&!bg(n)?_:b.styles,isPreviewMode:!0}),[_,b,n]);return(0,Ut.jsx)("div",{ref:s,className:J("editor-style-book",{"is-button":!!t}),style:{color:l,background:c},children:o?(0,Ut.jsxs)(En.Root,{className:"editor-style-book__tabs",defaultValue:f[0]?.slug,children:[(0,Ut.jsx)("div",{className:"editor-style-book__tablist-container",children:(0,Ut.jsx)(En.List,{children:f.map(w=>(0,Ut.jsx)(En.Tab,{value:w.slug,children:w.title},w.slug))})}),f.map(w=>{let S=w.slug?oY().find(C=>C.slug===w.slug):null,x=S?qE(S,d):{examples:d};return(0,Ut.jsx)(En.Panel,{value:w.slug,tabIndex:-1,className:"editor-style-book__tabpanel",children:(0,Ut.jsx)(lY,{category:w.slug,examples:x,isSelected:e,onSelect:r,settings:y,title:w.title,goTo:g})},w.slug)})]}):(0,Ut.jsx)(lY,{examples:{examples:m},isSelected:e,onClick:t,onSelect:r,settings:y,goTo:g})})}var tSe=({userConfig:e={},isStatic:t=!1,path:r,onPathChange:o,settings:n})=>{let i=(0,xy.useSelect)(M=>n??M(I).getEditorSettings(),[n]),s=(0,xy.useSelect)(M=>M(Q_e.store).canUser("create",{kind:"postType",name:"attachment"}),[]);(0,Wr.useEffect)(()=>{(0,xy.dispatch)(Dn.store).updateSettings({...i,mediaUpload:s?X_e.uploadMedia:void 0})},[i,s]);let[l,c]=(0,Wr.useState)("/"),u=r??l,d=o??c,f=M=>u===`/blocks/${encodeURIComponent(M)}`||u.startsWith(`/blocks/${encodeURIComponent(M)}/`),m=(M,P=!1)=>{if(pS.find(T=>T.slug===M)){d("/colors/palette");return}if(M==="typography"){d("/typography");return}P||d(`/blocks/${encodeURIComponent(M)}`)},h=$_e(),g=aY(h),v=eSe(g),b=null,_=null;if(u.includes("/colors"))b="colors";else if(u.includes("/typography"))b="text";else if(u.includes("/blocks")){b="blocks";let M=decodeURIComponent(u).split("/blocks/")[1];M?.includes("/variations")&&([M,_]=M.split("/variations/")),M&&g.find(P=>P.name===M)&&(b=M)}else t||(b="overview");let y=z_e.find(M=>M.slug===b),w=(0,Wr.useMemo)(()=>y?qE(y,g):{examples:[g.find(M=>M.name===b)]},[y,g,b]),S=(0,Wr.useMemo)(()=>b?_&&w?.examples?.length?{examples:ont(w.examples,_)}:w:{examples:v},[b,v,_,w]),{base:x}=Hr(),C=J_e(u),A=(0,Wr.useMemo)(()=>!bg(e)&&!bg(x)?Fi(x,e):{},[x,e]),[k]=mS(A),R=(0,Wr.useMemo)(()=>({...i,styles:!bg(k)&&!bg(e)?k:i.styles,isPreviewMode:!0}),[k,i,e]);return(0,Ut.jsx)("div",{className:"editor-style-book",children:(0,Ut.jsxs)(Dn.BlockEditorProvider,{settings:R,children:[(0,Ut.jsx)(N3,{disableRootPadding:!0}),(0,Ut.jsx)(lY,{examples:S,settings:R,goTo:C,isSelected:t?null:f,onSelect:t?null:m})]})})},lY=({examples:e,isSelected:t,onClick:r,onSelect:o,settings:n,title:i,goTo:s})=>{let[l,c]=(0,Wr.useState)(!1),[u,d]=(0,Wr.useState)(!1),f=(0,Wr.useRef)(null),m={role:"button",onFocus:()=>c(!0),onBlur:()=>c(!1),onKeyDown:g=>{if(g.defaultPrevented)return;let{keyCode:v}=g;r&&(v===M3.ENTER||v===M3.SPACE)&&(g.preventDefault(),r(g))},onClick:g=>{g.defaultPrevented||r&&(g.preventDefault(),r(g))},readonly:!0},h=()=>d(!0);return(0,Wr.useLayoutEffect)(()=>{u&&f.current&&s?.top&&rnt("top",f.current)},[s?.top,u]),(0,Ut.jsxs)(Dn.__unstableIframe,{onLoad:h,ref:f,className:J("editor-style-book__iframe",{"is-focused":l&&!!r,"is-button":!!r}),name:"style-book-canvas",tabIndex:0,...r?m:{},children:[(0,Ut.jsx)(Dn.__unstableEditorStyles,{styles:n.styles}),(0,Ut.jsxs)("style",{children:[H_e,!!r&&"body { cursor: var(--wpds-cursor-control, pointer); } body * { pointer-events: none; }"]}),(0,Ut.jsx)(int,{className:"editor-style-book__examples",filteredExamples:e,label:i?(0,iu.sprintf)((0,iu.__)("Examples of blocks in the %s category"),i):(0,iu.__)("Examples of blocks"),isSelected:t,onSelect:o},i)]})},int=(0,Wr.memo)(({className:e,filteredExamples:t,label:r,isSelected:o,onSelect:n})=>(0,Ut.jsxs)(Sy.Composite,{orientation:"vertical",className:e,"aria-label":r,role:"grid",children:[!!t?.examples?.length&&t.examples.map(i=>(0,Ut.jsx)(rSe,{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,Ut.jsxs)(Sy.Composite.Group,{className:"editor-style-book__subcategory",children:[(0,Ut.jsx)(Sy.Composite.GroupLabel,{children:(0,Ut.jsx)("h2",{className:"editor-style-book__subcategory-title",children:i.title})}),(0,Ut.jsx)(snt,{examples:i.examples,isSelected:o,onSelect:n})]},`subcategory-${i.slug}`))]})),snt=({examples:e,isSelected:t,onSelect:r})=>!!e?.length&&e.map(o=>(0,Ut.jsx)(rSe,{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)),ant=["example-duotones"],rSe=({id:e,title:t,blocks:r,isSelected:o,onClick:n,content:i})=>{let s=(0,xy.useSelect)(d=>d(Dn.store).getSettings(),[]),l=(0,Wr.useMemo)(()=>({...s,focusMode:!1,isPreviewMode:!0}),[s]),c=(0,Wr.useMemo)(()=>Array.isArray(r)?r:[r],[r]),u=ant.includes(e)||!n?{disabled:!0,accessibleWhenDisabled:!!n}:{};return(0,Ut.jsx)("div",{role:"row",children:(0,Ut.jsx)("div",{role:"gridcell",children:(0,Ut.jsxs)(Sy.Composite.Item,{className:J("editor-style-book__example",{"is-selected":o,"is-disabled-example":!!u?.disabled}),id:e,"aria-label":n?(0,iu.sprintf)((0,iu.__)("Open %s styles in Styles panel"),t):void 0,render:(0,Ut.jsx)("div",{}),role:n?"button":null,onClick:n,...u,children:[(0,Ut.jsx)("span",{className:"editor-style-book__example-title",children:t}),(0,Ut.jsx)("div",{className:"editor-style-book__example-preview","aria-hidden":!0,children:(0,Ut.jsx)(Sy.Disabled,{className:"editor-style-book__example-preview__content",children:i||(0,Ut.jsxs)(tnt,{value:c,settings:l,children:[(0,Ut.jsx)(Dn.__unstableEditorStyles,{}),(0,Ut.jsx)(Dn.BlockList,{renderAppender:!1})]})})})]})})})},oSe=(0,Wr.forwardRef)(nnt);var ZE=a(E(),1);function nSe({path:e,onPathChange:t,userConfig:r,forwardedRef:o}){return(0,ZE.jsx)(oSe,{ref:o,path:e,userConfig:r,isSelected:n=>e===`/blocks/${encodeURIComponent(n)}`||e?.startsWith(`/blocks/${encodeURIComponent(n)}/`),onSelect:n=>{if(pS.find(i=>i.slug===n)){t?.("/colors/palette");return}if(n==="typography"){t?.("/typography");return}t?.("/blocks/"+encodeURIComponent(n))}})}function lnt({path:e,onPathChange:t,forwardedRef:r}){let{user:o}=Hr(),{revisions:n,isLoading:i}=sy(),s=(0,KE.useMemo)(()=>{let c=e?.match(/^\/revisions\/(.+)$/);return c?c[1]:null},[e]),l=(0,KE.useMemo)(()=>!s||!n.length?null:n.find(c=>String(c.id)===String(s)),[s,n]);return i?null:(0,ZE.jsx)(nSe,{forwardedRef:r,path:e,onPathChange:t,userConfig:l||o})}function cnt({path:e,onPathChange:t},r){return e?.startsWith("/revisions")?(0,ZE.jsx)(lnt,{forwardedRef:r,path:e,onPathChange:t}):(0,ZE.jsx)(nSe,{forwardedRef:r,path:e,onPathChange:t})}var iSe=(0,KE.forwardRef)(cnt);var sSe=a(G(),1),su=a(be(),1),cY=a(Y(),1),yg=a(U(),1);var Fp=a(E(),1),{ExperimentalBlockEditorProvider:unt,BlockStyleVariationOverridesWithConfig:dnt}=K(su.privateApis);function F3(e){return!e||Object.keys(e).length===0}function fnt({path:e},t){let r=(0,cY.useSelect)(b=>b(su.store).getBlocks(),[]),{user:o,base:n}=Hr(),{revisions:i,isLoading:s}=sy(),l=(0,yg.useMemo)(()=>{let b=e?.match(/^\/revisions\/(.+)$/);return b?b[1]:null},[e]),u=(0,yg.useMemo)(()=>!l||!i.length?null:i.find(b=>String(b.id)===String(l)),[l,i])||o,d=(0,yg.useMemo)(()=>!F3(u)&&!F3(n)?Fi(n,u):{},[n,u]),f=(0,yg.useMemo)(()=>Array.isArray(r)?r:[r],[r]),m=(0,cY.useSelect)(b=>b(su.store).getSettings(),[]),h=(0,yg.useMemo)(()=>({...m,isPreviewMode:!0}),[m]),[g]=mS(d),v=!F3(g)&&!F3(u)?g:h.styles;return s?null:(0,Fp.jsxs)(su.__unstableIframe,{ref:t,className:"editor-revisions__iframe",name:"revisions",tabIndex:0,children:[(0,Fp.jsx)("style",{children:".is-root-container { display: flow-root; }"}),(0,Fp.jsx)(sSe.Disabled,{className:"editor-revisions__example-preview__content",children:(0,Fp.jsxs)(unt,{value:f,settings:h,children:[(0,Fp.jsx)(su.BlockList,{renderAppender:!1}),(0,Fp.jsx)(su.__unstableEditorStyles,{styles:v}),(0,Fp.jsx)(dnt,{config:d})]})})]})}var aSe=(0,yg.forwardRef)(fnt);var fSe=a(Y(),1),Cy=a(U(),1),pSe=a(G(),1);var D3=a(j(),1),wg=a(Mo(),1),cSe=a(G(),1);var Yd=a(E(),1),lSe=20;function uY({direction:e,resizeWidthBy:t}){function r(i){let{keyCode:s}=i;s!==wg.LEFT&&s!==wg.RIGHT||(i.preventDefault(),e==="left"&&s===wg.LEFT||e==="right"&&s===wg.RIGHT?t(lSe):(e==="left"&&s===wg.RIGHT||e==="right"&&s===wg.LEFT)&&t(-lSe))}let o={active:{opacity:1,scaleY:1.3}},n=`resizable-editor__resize-help-${e}`;return(0,Yd.jsxs)(Yd.Fragment,{children:[(0,Yd.jsxs)(Ze.Root,{children:[(0,Yd.jsx)(Ze.Trigger,{render:(0,Yd.jsx)(cSe.__unstableMotion.button,{className:`editor-resizable-editor__resize-handle is-${e}`,"aria-label":(0,D3.__)("Drag to resize"),"aria-describedby":n,onKeyDown:r,variants:o,whileFocus:"active",whileHover:"active",whileTap:"active",role:"separator","aria-orientation":"vertical"},"handle")}),(0,Yd.jsx)(Ze.Popup,{children:(0,D3.__)("Drag to resize")})]}),(0,Yd.jsx)(Gt,{id:n,children:(0,D3.__)("Use left and right arrow keys to resize the canvas.")})]})}var L3=a(E(),1),uSe={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 dSe(e,t,r=0){return t>0&&e>=t-r}function pnt({className:e,enableResizing:t,width:r="100%",height:o="100%",onResizeStart:n,onResizeStop:i,children:s}){let[l,c]=(0,Cy.useState)(!1),{setCanvasWidth:u}=K((0,fSe.useDispatch)(I)),d=(0,Cy.useRef)(),f=(0,Cy.useCallback)(h=>{if(d.current){let g=dSe(d.current.offsetWidth+h,d.current.parentElement?.offsetWidth??0,80);u(g?void 0:d.current.offsetWidth+h)}},[u]),m=(0,Cy.useCallback)(h=>{let g=h.offsetWidth,v=h.parentElement?.offsetWidth??0;u(dSe(g,v,80)?void 0:g)},[u]);return(0,L3.jsx)(pSe.ResizableBox,{className:J("editor-resizable-editor",e,{"is-resizable":t,"is-resizing":l}),ref:h=>{d.current=h?.resizable},size:{width:r,height:o},onResizeStart:()=>{c(!0),n?.()},onResize:(h,g,v)=>{m(v)},onResizeStop:(h,g,v)=>{m(v),c(!1),i?.()},minWidth:300,maxWidth:"100%",maxHeight:"100%",enable:{left:t,right:t},showHandle:t,resizeRatio:2,handleComponent:{left:(0,L3.jsx)(uY,{direction:"left",resizeWidthBy:f}),right:(0,L3.jsx)(uY,{direction:"right",resizeWidthBy:f})},handleClasses:void 0,handleStyles:{left:uSe,right:uSe},children:s})}var hS=pnt;var _g=a(E(),1);function dY(e,t){return t?(0,B3.__)("Style Book"):e?.startsWith("/revisions")?(0,B3.__)("Style Revisions"):""}function vSe(){let{stylesPath:e,showStylebook:t,showListViewByDefault:r}=(0,XE.useSelect)(m=>{let{getStylesPath:h,getShowStylebook:g}=K(m(I)),v=m(gSe.store).get("core","showListViewByDefault");return{stylesPath:h(),showStylebook:g(),showListViewByDefault:v}},[]),{resetStylesNavigation:o,setStylesPath:n}=K((0,XE.useDispatch)(I)),{setIsListViewOpened:i}=(0,XE.useDispatch)(I),s=(0,V3.useFocusOnMount)("firstElement"),l=(0,V3.useFocusReturn)(),c=null;t?c=(0,_g.jsx)(iSe,{path:e,onPathChange:n,ref:l}):e?.startsWith("/revisions")&&(c=(0,_g.jsx)(aSe,{path:e,ref:l}));let u=dY(e,t),d=()=>{i(r),o()};return(0,_g.jsx)("div",{className:"editor-styles-canvas",children:(0,_g.jsx)(hS,{enableResizing:!1,children:(0,_g.jsxs)("section",{className:"editor-styles-canvas__section",ref:s,onKeyDown:m=>{m.keyCode===hSe.ESCAPE&&!m.defaultPrevented&&(m.preventDefault(),d())},"aria-label":u,children:[(0,_g.jsx)(mSe.Button,{size:"compact",className:"editor-styles-canvas__close-button",icon:Mi,label:(0,B3.__)("Close"),onClick:d}),c]})})})}var bSe=a(Y(),1),fY=a(Lt(),1),pY=a(be(),1),ySe=a(ae(),1);function wSe(){return(0,bSe.useSelect)(e=>{let{getBlockAttributes:t,getBlockName:r,__experimentalGetParsedPattern:o}=e(pY.store),{getEditedEntityRecord:n,getCurrentTheme:i}=e(ySe.store),{getEditedContentOnlySection:s}=K(e(pY.store)),l=s();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,fY.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,fY.decodeEntities)(h.title),type:"template-part"}}}return null},[])}var Zs=a(E(),1),mnt=au.__unstableMotion.create(au.Button);function z3(e){let{stopEditingContentOnlySection:t}=K((0,QE.useDispatch)(JE.store)),r=wSe(),{postId:o,postType:n,postTypeLabel:i,documentTitle:s,isNotFound:l,templateTitle:c,onNavigateToPreviousEntityRecord:u,isTemplatePreview:d,stylesCanvasTitle:f}=(0,QE.useSelect)(C=>{let{getCurrentPostType:A,getCurrentPostId:k,getEditorSettings:R,getRenderingMode:M}=C(I),{getEditedEntityRecord:P,getPostType:T,getCurrentTheme:N,isResolving:L}=C(_Se.store),F=A(),D=k(),z=P("postType",F,D),{default_template_types:B=[]}=N()??{},O=Al({templateTypes:B,template:z}),V=T(F)?.labels?.singular_name,{getStylesPath:W,getShowStylebook:q}=K(C(I)),Z=W(),Q=q(),ce=dY(Z,Q);return{postId:D,postType:F,postTypeLabel:V,documentTitle:z.title,isNotFound:!z&&!L("getEditedEntityRecord","postType",F,D),templateTitle:O.title,onNavigateToPreviousEntityRecord:R().onNavigateToPreviousEntityRecord,isTemplatePreview:M()==="template-locked",stylesCanvasTitle:ce}},[]),{open:m}=(0,QE.useDispatch)(SSe.store),h=(0,xSe.useReducedMotion)(),g=L4.includes(n),v=!!u||!!r,b=g?c:s,_=r?.patternTitle||e.title||f||b,y=e.icon,w=C=>{C.stopPropagation(),r?t():u&&u()},S=P3(o),x=(0,j3.useRef)(!1);return(0,j3.useEffect)(()=>{x.current=!0},[]),(0,Zs.jsxs)("div",{className:J("editor-document-bar",{"has-back-button":v}),children:[(0,Zs.jsx)(au.__unstableAnimatePresence,{children:v&&(0,Zs.jsx)(mnt,{className:"editor-document-bar__back",icon:(0,Sg.isRTL)()?pB:uB,onClick:w,size:"compact",initial:x.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,Sg.__)("Back")})}),!g&&d&&!v&&(0,Zs.jsx)(JE.BlockIcon,{icon:Ka,className:"editor-document-bar__icon-layout"}),l?(0,Zs.jsx)(au.__experimentalText,{children:(0,Sg.__)("Document not found")}):(0,Zs.jsx)(au.Button,{className:"editor-document-bar__command",onClick:()=>m(),size:"compact",children:(0,Zs.jsxs)(au.__unstableMotion.div,{className:"editor-document-bar__title",initial:x.current?{opacity:0,transform:v?"translateX(15%)":"translateX(-15%)"}:!1,animate:{opacity:1,transform:"translateX(0%)"},transition:h?{duration:0}:void 0,children:[y&&(0,Zs.jsx)(JE.BlockIcon,{icon:y}),(0,Zs.jsxs)(au.__experimentalText,{size:"body",as:"h1",children:[(0,Zs.jsx)("span",{className:"editor-document-bar__post-title",children:_?(0,TSe.__unstableStripHTML)(_):(0,Sg.__)("No title")}),r&&(0,Zs.jsx)("span",{className:"editor-document-bar__post-type-label",children:r.type==="template-part"?`\xB7 ${(0,Sg.__)("Template Part")}`:`\xB7 ${(0,Sg.__)("Pattern")}`}),!r&&S&&(0,Zs.jsx)("span",{className:"editor-document-bar__post-type-label",children:`\xB7 ${S}`}),!r&&i&&!e.title&&!S&&(0,Zs.jsx)("span",{className:"editor-document-bar__post-type-label",children:`\xB7 ${(0,CSe.decodeEntities)(i)}`})]})]},v)})]})}var Ey=a(j(),1),gS=a(Y(),1),U3=a(U(),1),W3=a(hd(),1),H3=a(be(),1),ESe=a(ae(),1),ii=a(G(),1);var Ty=a(E(),1),hnt=({children:e,isValid:t,isDisabled:r,level:o,href:n,onSelect:i})=>{function s(l){if(r){l.preventDefault();return}i()}return(0,Ty.jsx)("li",{className:J("document-outline__item",`is-${o.toLowerCase()}`,{"is-invalid":!t,"is-disabled":r}),children:(0,Ty.jsxs)("a",{href:n,className:"document-outline__button","aria-disabled":r,onClick:s,children:[(0,Ty.jsx)("span",{className:"document-outline__emdash","aria-hidden":"true"}),(0,Ty.jsx)("strong",{className:"document-outline__level",children:o}),(0,Ty.jsx)("span",{className:"document-outline__item-content",children:e})]})})},mY=hnt;var dr=a(E(),1),gnt=(0,dr.jsx)("em",{children:(0,Ey.__)("(Empty heading)")}),vnt=[(0,dr.jsx)("br",{},"incorrect-break"),(0,dr.jsx)("em",{children:(0,Ey.__)("(Incorrect heading level)")},"incorrect-message")],bnt=[(0,dr.jsx)("br",{},"incorrect-break-h1"),(0,dr.jsx)("em",{children:(0,Ey.__)("(Your theme may already use a H1 for the post title)")},"incorrect-message-h1")],ynt=[(0,dr.jsx)("br",{},"incorrect-break-multiple-h1"),(0,dr.jsx)("em",{children:(0,Ey.__)("(Multiple H1 headings are not recommended)")},"incorrect-message-multiple-h1")];function wnt(){return(0,dr.jsxs)(ii.SVG,{width:"138",height:"148",viewBox:"0 0 138 148",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,dr.jsx)(ii.Rect,{width:"138",height:"148",rx:"4",fill:"#F0F6FC"}),(0,dr.jsx)(ii.Line,{x1:"44",y1:"28",x2:"24",y2:"28",stroke:"#DDDDDD"}),(0,dr.jsx)(ii.Rect,{x:"48",y:"16",width:"27",height:"23",rx:"4",fill:"#DDDDDD"}),(0,dr.jsx)(ii.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,dr.jsx)(ii.Line,{x1:"55",y1:"59",x2:"24",y2:"59",stroke:"#DDDDDD"}),(0,dr.jsx)(ii.Rect,{x:"59",y:"47",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,dr.jsx)(ii.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,dr.jsx)(ii.Line,{x1:"80",y1:"90",x2:"24",y2:"90",stroke:"#DDDDDD"}),(0,dr.jsx)(ii.Rect,{x:"84",y:"78",width:"30",height:"23",rx:"4",fill:"#F0B849"}),(0,dr.jsx)(ii.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,dr.jsx)(ii.Line,{x1:"66",y1:"121",x2:"24",y2:"121",stroke:"#DDDDDD"}),(0,dr.jsx)(ii.Rect,{x:"70",y:"109",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,dr.jsx)(ii.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 _nt=(e=[])=>e.filter(t=>t.name==="core/heading").map(t=>({...t,level:t.attributes.level,isEmpty:Snt(t)})),Snt=e=>!e.attributes.content||e.attributes.content.trim().length===0;function vS({onSelect:e,hasOutlineItemsDisabled:t}){let{selectBlock:r}=(0,gS.useDispatch)(H3.store),{title:o,isTitleSupported:n}=(0,gS.useSelect)(g=>{let{getEditedPostAttribute:v}=g(I),{getPostType:b}=g(ESe.store),_=b(v("type"));return{title:v("title"),isTitleSupported:_?.supports?.title??!1}}),i=(0,gS.useSelect)(g=>{let{getClientIdsWithDescendants:v,getBlock:b}=g(H3.store);return v().map(y=>b(y))}),s=(0,gS.useSelect)(g=>{if(g(I).getRenderingMode()==="post-only")return;let{getBlocksByName:v,getClientIdsOfDescendants:b}=g(H3.store),[_]=v("core/post-content");if(_)return b(_)},[]),l=(0,U3.useRef)(1),c=(0,U3.useMemo)(()=>_nt(i),[i]);if(c.length<1)return(0,dr.jsxs)("div",{className:"editor-document-outline has-no-headings",children:[(0,dr.jsx)(wnt,{}),(0,dr.jsx)("p",{children:(0,Ey.__)("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(s)?s.includes(g):!0}return(0,dr.jsx)("div",{className:"document-outline",children:(0,dr.jsxs)("ul",{children:[d&&(0,dr.jsx)(mY,{level:(0,Ey.__)("Title"),isValid:!0,onSelect:e,href:`#${u.id}`,isDisabled:t,children:o}),c.map(g=>{let v=g.level>l.current+1,b=!g.isEmpty&&!v&&!!g.level&&(g.level!==1||!m&&!d);return l.current=g.level,(0,dr.jsxs)(mY,{level:`H${g.level}`,isValid:b,isDisabled:t||!h(g.clientId),href:`#block-${g.clientId}`,onSelect:()=>{r(g.clientId),e?.()},children:[g.isEmpty?gnt:(0,W3.getTextContent)((0,W3.create)({html:g.attributes.content})),v&&vnt,g.level===1&&m&&ynt,d&&g.level===1&&!m&&bnt]},g.clientId)})]})})}var PSe=a(Y(),1),kSe=a(be(),1);function RSe({children:e}){return(0,PSe.useSelect)(r=>{let{getGlobalBlockCount:o}=r(kSe.store);return o("core/heading")>0})?e:null}var ASe=a(U(),1),ISe=a(Y(),1),ac=a(j(),1),OSe=a(be(),1),NSe=a(xa(),1),MSe=a(Mo(),1),FSe=a(E(),1);function xnt(){let{registerShortcut:e}=(0,ISe.useDispatch)(NSe.store);return(0,ASe.useEffect)(()=>{e({name:"core/editor/toggle-mode",category:"global",description:(0,ac.__)("Switch between visual editor and code editor."),keyCombination:{modifier:"secondary",character:"m"}}),e({name:"core/editor/save",category:"global",description:(0,ac.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:(0,ac.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:(0,ac.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"},aliases:(0,MSe.isAppleOS)()?[]:[{modifier:"primary",character:"y"}]}),e({name:"core/editor/toggle-list-view",category:"global",description:(0,ac.__)("Show or hide the List View."),keyCombination:{modifier:"access",character:"o"}}),e({name:"core/editor/toggle-distraction-free",category:"global",description:(0,ac.__)("Enter or exit distraction free mode."),keyCombination:{modifier:"primaryShift",character:"\\"}}),e({name:"core/editor/toggle-sidebar",category:"global",description:(0,ac.__)("Show or hide the Settings panel."),keyCombination:{modifier:"primaryShift",character:","}}),e({name:"core/editor/keyboard-shortcuts",category:"main",description:(0,ac.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),e({name:"core/editor/new-note",category:"block",description:(0,ac.__)("Add a new note."),keyCombination:{modifier:"primaryAlt",character:"m"}}),e({name:"core/editor/next-region",category:"global",description:(0,ac.__)("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,ac.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"},{modifier:"ctrlShift",character:"~"}]})},[e]),(0,FSe.jsx)(OSe.BlockEditorKeyboardShortcuts.Register,{})}var DSe=xnt;var G3=a(j(),1),LSe=a(G(),1),Y3=a(Y(),1),$E=a(Mo(),1);var BSe=a(U(),1);var VSe=a(E(),1);function Cnt(e,t){let r=(0,$E.isAppleOS)()?$E.displayShortcut.primaryShift("z"):$E.displayShortcut.primary("y"),o=(0,Y3.useSelect)(i=>i(I).hasEditorRedo(),[]),{redo:n}=(0,Y3.useDispatch)(I);return(0,VSe.jsx)(LSe.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,G3.isRTL)()?gv:pv,label:(0,G3.__)("Redo"),shortcut:r,"aria-disabled":!o,onClick:o?n:void 0,className:"editor-history__redo"})}var q3=(0,BSe.forwardRef)(Cnt);var K3=a(j(),1),jSe=a(G(),1),Z3=a(Y(),1),zSe=a(Mo(),1);var HSe=a(U(),1);var USe=a(E(),1);function Tnt(e,t){let r=(0,Z3.useSelect)(n=>n(I).hasEditorUndo(),[]),{undo:o}=(0,Z3.useDispatch)(I);return(0,USe.jsx)(jSe.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,K3.isRTL)()?pv:gv,label:(0,K3.__)("Undo"),shortcut:zSe.displayShortcut.primary("z"),"aria-disabled":!r,onClick:r?o:void 0,className:"editor-history__undo"})}var X3=(0,HSe.forwardRef)(Tnt);var GSe=a(qa(),1),YSe=a(Y(),1),qSe=a(be(),1),KSe=a(It(),1);var Q3=a(G(),1),bS=a(j(),1),J3=a(Y(),1),WSe=a(U(),1),hY=a(be(),1),Py=a(E(),1);function $3(){let[e,t]=(0,WSe.useState)(!1),r=(0,J3.useSelect)(i=>i(hY.store).isValidTemplate(),[]),{setTemplateValidity:o,synchronizeTemplate:n}=(0,J3.useDispatch)(hY.store);return r?null:(0,Py.jsxs)(Py.Fragment,{children:[(0,Py.jsx)(Q3.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:(0,bS.__)("Keep it as is"),onClick:()=>o(!0)},{label:(0,bS.__)("Reset the template"),onClick:()=>t(!0)}],children:(0,bS.__)("The content of your post doesn\u2019t match the template assigned to your post type.")}),(0,Py.jsx)(Q3.__experimentalConfirmDialog,{isOpen:e,confirmButtonText:(0,bS.__)("Reset"),onConfirm:()=>{t(!1),n()},onCancel:()=>t(!1),size:"medium",children:(0,bS.__)("Resetting the template may result in loss of content, do you want to continue?")})]})}var gY=a(E(),1);function Ent(){(0,GSe.default)("wp.editor.EditorNotices",{since:"7.0",version:"7.2",alternative:"wp.notices.InlineNotices"});let e=(0,YSe.useSelect)(t=>t(qSe.store).isValidTemplate(),[]);return(0,gY.jsx)(KSe.InlineNotices,{pinnedNoticesClassName:"components-editor-notices__pinned",dismissibleNoticesClassName:"components-editor-notices__dismissible",children:!e&&(0,gY.jsx)($3,{})})}var ZSe=Ent;var XSe=a(qa(),1),QSe=a(It(),1),JSe=a(E(),1);function $Se(){return(0,XSe.default)("wp.editor.EditorSnackbars",{since:"7.0",version:"7.2",alternative:"wp.notices.SnackbarNotices"}),(0,JSe.jsx)(QSe.SnackbarNotices,{className:"components-editor-notices__snackbar"})}var Vp=a(G(),1),Bp=a(j(),1),yS=a(U(),1),eP=a(Te(),1),sxe=a(Y(),1);var ky=a(j(),1),yY=a(Y(),1),t6=a(G(),1),wY=a(ae(),1);var e6=a(G(),1),vY=a(j(),1),exe=a(Y(),1),bY=a(ae(),1),txe=a(Lt(),1);var Dp=a(E(),1);function rxe({record:e,checked:t,onChange:r}){let{name:o,kind:n,title:i,key:s}=e,{entityRecordTitle:l,hasPostMetaChanges:c}=(0,exe.useSelect)(u=>{if(n!=="postType"||o!=="wp_template")return{entityRecordTitle:i,hasPostMetaChanges:K(u(I)).hasPostMetaChanges(o,s)};let d=u(bY.store).getEditedEntityRecord(n,o,s),{default_template_types:f=[]}=u(bY.store).getCurrentTheme()??{};return{entityRecordTitle:Al({template:d,templateTypes:f}).title,hasPostMetaChanges:K(u(I)).hasPostMetaChanges(o,s)}},[o,n,i,s]);return(0,Dp.jsxs)(Dp.Fragment,{children:[(0,Dp.jsx)(e6.PanelRow,{children:(0,Dp.jsx)(e6.CheckboxControl,{label:(0,txe.decodeEntities)(l)||(0,vY.__)("Untitled"),checked:t,onChange:r,className:"entities-saved-states__change-control"})}),c&&(0,Dp.jsx)("ul",{className:"entities-saved-states__changes",children:(0,Dp.jsx)("li",{children:(0,vY.__)("Post Meta.")})})]})}var Lp=a(E(),1);function Pnt(e,t){switch(e){case"site":return t===1?(0,ky.__)("This change will affect your whole site."):(0,ky.__)("These changes will affect your whole site.");case"wp_template":return(0,ky.__)("This change will affect other parts of your site that use this template.");case"page":case"post":return(0,ky.__)("The following has been modified.")}}function knt({record:e}){let{editedRecord:t,savedRecord:r}=(0,yY.useSelect)(n=>{let{getEditedEntityRecord:i,getEntityRecord:s}=n(wY.store);return{editedRecord:i(e.kind,e.name,e.key),savedRecord:s(e.kind,e.name,e.key)}},[e.kind,e.name,e.key]),o=F1(t,r,{maxResults:10});return o.length?(0,Lp.jsx)("ul",{className:"entities-saved-states__changes",children:o.map(n=>(0,Lp.jsx)("li",{children:n},n))}):null}function Rnt({record:e,count:t}){if(e?.name==="globalStyles")return null;let r=Pnt(e?.name,t);return r?(0,Lp.jsx)(t6.PanelRow,{children:r}):null}function oxe({list:e,unselectedEntities:t,setUnselectedEntities:r}){let o=e.length,n=e[0],s=(0,yY.useSelect)(l=>l(wY.store).getEntityConfig(n.kind,n.name),[n.kind,n.name]).label;return n?.name==="wp_template_part"&&(s=o===1?(0,ky.__)("Template Part"):(0,ky.__)("Template Parts")),(0,Lp.jsxs)(t6.PanelBody,{title:s,initialOpen:!0,className:"entities-saved-states__panel-body",children:[(0,Lp.jsx)(Rnt,{record:n,count:o}),e.map(l=>(0,Lp.jsx)(rxe,{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,Lp.jsx)(knt,{record:n})]})}var nxe=a(Y(),1),ixe=a(ae(),1),r6=a(U(),1),o6=()=>{let{editedEntities:e,siteEdits:t,siteEntityConfig:r}=(0,nxe.useSelect)(c=>{let{__experimentalGetDirtyEntityRecords:u,getEntityRecordEdits:d,getEntityConfig:f}=c(ixe.store);return{editedEntities:u(),siteEdits:d("root","site"),siteEntityConfig:f("root","site")}},[]),o=(0,r6.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,r6.useState)([]),s=({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:s,unselectedEntities:n}};var si=a(E(),1);function n6({close:e,renderDialog:t,variant:r}){let o=o6();return(0,si.jsx)(tP,{close:e,renderDialog:t,variant:r,...o})}function tP({additionalPrompt:e=void 0,close:t,onSave:r=void 0,saveEnabled:o=void 0,saveLabel:n=(0,Bp.__)("Save"),renderDialog:i,dirtyEntityRecords:s,isDirty:l,setUnselectedEntities:c,unselectedEntities:u,variant:d="default",successNoticeContent:f}){let m=(0,yS.useRef)(),{saveDirtyEntities:h}=K((0,sxe.useDispatch)(I)),g=s.reduce((N,L)=>{let{name:F}=L;return N[F]||(N[F]=[]),N[F].push(L),N},{}),{site:v,wp_template:b,wp_template_part:_,...y}=g,w=[v,b,_,...Object.values(y)].filter(Array.isArray),S=o??l,x=(0,yS.useCallback)(()=>t(),[t]),[C,A]=(0,eP.__experimentalUseDialog)({onClose:()=>x()}),k=(0,eP.useInstanceId)(tP,"entities-saved-states__panel-label"),R=(0,eP.useInstanceId)(tP,"entities-saved-states__panel-description"),M=s.length?(0,Bp.__)("Select the items you want to save."):void 0,P=d==="inline",T=(0,si.jsxs)(si.Fragment,{children:[(0,si.jsx)(Vp.FlexItem,{isBlock:!P,as:Vp.Button,variant:P?"tertiary":"secondary",size:P?void 0:"compact",onClick:x,children:(0,Bp.__)("Cancel")}),(0,si.jsx)(Vp.FlexItem,{isBlock:!P,as:Vp.Button,ref:m,variant:"primary",size:P?void 0:"compact",disabled:!S,accessibleWhenDisabled:!0,onClick:()=>h({onSave:r,dirtyEntityRecords:s,entitiesToSkip:u,close:t,successNoticeContent:f}),className:"editor-entities-saved-states__save-button",children:n})]});return(0,si.jsxs)("div",{ref:i?C:void 0,...i&&A,className:J("entities-saved-states__panel",{"is-inline":P}),role:i?"dialog":void 0,"aria-labelledby":i?k:void 0,"aria-describedby":i?R:void 0,children:[!P&&(0,si.jsx)(Vp.Flex,{className:"entities-saved-states__panel-header",gap:2,children:T}),(0,si.jsxs)("div",{className:"entities-saved-states__text-prompt",children:[(0,si.jsx)("div",{className:"entities-saved-states__text-prompt--header-wrapper",children:(0,si.jsx)("strong",{id:i?k:void 0,className:"entities-saved-states__text-prompt--header",children:(0,Bp.__)("Are you ready to save?")})}),(0,si.jsxs)("div",{id:i?R:void 0,children:[e,(0,si.jsx)("p",{className:"entities-saved-states__text-prompt--changes-count",children:l?(0,yS.createInterpolateElement)((0,Bp.sprintf)((0,Bp._n)("There is <strong>%d site change</strong> waiting to be saved.","There are <strong>%d site changes</strong> waiting to be saved.",s.length),s.length),{strong:(0,si.jsx)("strong",{})}):M})]})]}),w.map(N=>(0,si.jsx)(oxe,{list:N,unselectedEntities:u,setUnselectedEntities:c},N[0].name)),P&&(0,si.jsx)(Vp.Flex,{direction:"row",justify:"flex-end",className:"entities-saved-states__panel-footer",children:T})]})}var lxe=a(U(),1),i6=a(j(),1),Ry=a(G(),1),cxe=a(Y(),1),uxe=a(Te(),1),dxe=a(jn(),1);var xg=a(E(),1);function Ant(){try{return(0,cxe.select)(I).getEditedPostContent()}catch{}}function axe({text:e,children:t,variant:r="secondary"}){let o=(0,uxe.useCopyToClipboard)(e);return(0,xg.jsx)(Ry.Button,{__next40pxDefaultSize:!0,variant:r,ref:o,children:t})}var Int=class extends lxe.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,dxe.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,xg.jsxs)(Ry.__experimentalHStack,{className:"editor-error-boundary",alignment:"baseline",spacing:4,justify:"space-between",expanded:!1,wrap:!0,children:[(0,xg.jsx)(Ry.__experimentalText,{as:"p",children:(0,i6.__)("The editor has encountered an unexpected error.")}),(0,xg.jsxs)(Ry.__experimentalHStack,{expanded:!1,children:[t&&(0,xg.jsx)(axe,{text:Ant,children:(0,i6.__)("Copy contents")}),(0,xg.jsx)(axe,{variant:"primary",text:e?.stack,children:(0,i6.__)("Copy error")})]})]}):this.props.children}},fxe=Int;var jp=a(U(),1),oP=a(Te(),1),Cg=a(Y(),1),_Y=a(j(),1),pxe=a(Pt(),1),mxe=a(It(),1);var hxe=a(E(),1),Ont=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame,rP,Nnt=()=>{if(rP!==void 0)return rP;try{window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),rP=!0}catch{rP=!1}return rP};function Mnt(){let e=(0,Cg.useRegistry)(),{postId:t,isEditedPostNew:r}=(0,Cg.useSelect)(o=>({postId:o(I).getCurrentPostId(),isEditedPostNew:o(I).isEditedPostNew()}),[]);(0,jp.useEffect)(()=>{let o=NX(t,r);if(!o)return;try{o=JSON.parse(o)}catch{return}let{post_title:n,content:i,excerpt:s}=o,l={title:n,content:i,excerpt:s},{getEditedPostAttribute:c,getEditorSettings:u}=e.select(I);if(!Object.keys(l).some(_=>l[_]!==c(_))){O2(t,r);return}if(!!u().autosave)return;let{createWarningNotice:m,removeNotice:h}=e.dispatch(mxe.store),{editPost:g,resetEditorBlocks:v}=e.dispatch(I),b="wpEditorAutosaveRestore";m((0,_Y.__)("The backup of this post in your browser is different from the version below."),{id:b,actions:[{label:(0,_Y.__)("Restore the backup"),onClick(){let{content:_,...y}=l;g(y),v((0,pxe.parse)(l.content)),h(b)}}]})},[e,t,r])}function Fnt(){let{postId:e,isEditedPostNew:t,isDirty:r,isAutosaving:o,didError:n}=(0,Cg.useSelect)(u=>({postId:u(I).getCurrentPostId(),isEditedPostNew:u(I).isEditedPostNew(),isDirty:u(I).isEditedPostDirty(),isAutosaving:u(I).isAutosavingPost(),didError:u(I).didPostSaveRequestFail()}),[]),i=(0,jp.useRef)(r),s=(0,jp.useRef)(o);(0,jp.useEffect)(()=>{!n&&(s.current&&!o||i.current&&!r)&&O2(e,t),i.current=r,s.current=o},[r,o,n]);let l=(0,oP.usePrevious)(t),c=(0,oP.usePrevious)(e);(0,jp.useEffect)(()=>{c===e&&l&&!t&&O2(e,!0)},[t,e])}function Dnt(){let{autosave:e}=(0,Cg.useDispatch)(I),t=(0,jp.useCallback)(()=>{Ont(()=>e({local:!0}))},[]);Mnt(),Fnt();let r=(0,Cg.useSelect)(o=>o(I).getEditorSettings().localAutosaveInterval,[]);return(0,hxe.jsx)(E3,{interval:r,autosave:t})}var gxe=(0,oP.ifCondition)(Nnt)(Dnt);var vxe=a(Y(),1),bxe=a(ae(),1);function Lnt({children:e}){return(0,vxe.useSelect)(r=>{let{getEditedPostAttribute:o}=r(I),{getPostType:n}=r(bxe.store);return!!n(o("type"))?.supports?.["page-attributes"]},[])?e:null}var wS=Lnt;var SY=a(j(),1),SS=a(G(),1),s6=a(Y(),1),_xe=a(U(),1);var yxe=a(Y(),1),wxe=a(ae(),1);function Bnt(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 Vnt({children:e,supportKeys:t}){let r=(0,yxe.useSelect)(n=>{let{getEditedPostAttribute:i}=n(I),{getPostType:s}=n(wxe.store);return s(i("type"))},[]),o=!!r;return r&&(o=(Array.isArray(t)?t:[t]).some(n=>Bnt(r.supports,n))),o?e:null}var uo=Vnt;var _S=a(E(),1);function jnt(){let e=(0,s6.useSelect)(s=>s(I).getEditedPostAttribute("menu_order")??0,[]),{editPost:t}=(0,s6.useDispatch)(I),[r,o]=(0,_xe.useState)(null),n=s=>{o(s);let l=Number(s);Number.isInteger(l)&&s.trim?.()!==""&&t({menu_order:l})},i=r??e;return(0,_S.jsx)(SS.Flex,{children:(0,_S.jsx)(SS.FlexBlock,{children:(0,_S.jsx)(SS.__experimentalNumberControl,{label:(0,SY.__)("Order"),help:(0,SY.__)("Set the page order."),value:i,onChange:n,hideLabelFromVision:!0,onBlur:()=>{o(null)}})})})}function Sxe(){return(0,_S.jsx)(uo,{supportKeys:"page-attributes",children:(0,_S.jsx)(jnt,{})})}var Mxe=a(Y(),1),Fxe=a(ae(),1);var CY=a(gw(),1),Ma=a(j(),1),Tg=a(G(),1),kxe=a(Te(),1),qd=a(U(),1),CS=a(Y(),1),EY=a(Lt(),1),l6=a(ae(),1),Rxe=a(be(),1),Axe=a(vo(),1);var xxe=a(G(),1),Cxe=a(U(),1),nP=a(E(),1),znt=(0,Cxe.forwardRef)(({className:e,label:t,children:r},o)=>(0,nP.jsxs)(xxe.__experimentalHStack,{className:J("editor-post-panel__row",e),ref:o,children:[t&&(0,nP.jsx)("div",{className:"editor-post-panel__row-label",children:t}),(0,nP.jsx)("div",{className:"editor-post-panel__row-control",children:r})]})),fr=znt;var Txe=a(Lt(),1);function a6(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:s}=i;return n[s]||(n[s]=[]),n[s].push(i),n},{}),o=n=>n.map(i=>{let s=r[i.id];return{...i,children:s&&s.length?o(s):[]}});return o(r[0]||[])}var xS=e=>(0,Txe.decodeEntities)(e),xY=e=>({...e,name:xS(e.name)}),Exe=e=>(e??[]).map(xY);var Na=a(E(),1);function TY(e){return e?.title?.rendered?(0,EY.decodeEntities)(e.title.rendered):`#${e.id} (${(0,Ma.__)("no title")})`}var Pxe=(e,t)=>{let r=(0,CY.default)(e||"").toLowerCase(),o=(0,CY.default)(t||"").toLowerCase();return r===o?0:r.startsWith(o)?r.length:1/0};function Ixe(){let{editPost:e}=(0,CS.useDispatch)(I),[t,r]=(0,qd.useState)(""),{isHierarchical:o,parentPostId:n,parentPostTitle:i,pageItems:s,isLoading:l}=(0,CS.useSelect)(f=>{let{getPostType:m,getEntityRecords:h,getEntityRecord:g,isResolving:v}=f(l6.store),{getCurrentPostId:b,getEditedPostAttribute:_}=f(I),y=_("type"),w=_("parent"),S=m(y),x=b(),C=S?.hierarchical??!1,A={per_page:100,exclude:x,parent_exclude:x,orderby:"menu_order",order:"asc",_fields:"id,title,parent"};t&&(A.search=t,A.orderby="relevance",A.search_columns=["post_title"]);let k=w?g("postType",y,w):null;return{isHierarchical:C,parentPostId:w,parentPostTitle:k?TY(k):"",pageItems:C?h("postType",y,A):null,isLoading:C?v("getEntityRecords",["postType",y,A]):!1}},[t]),c=(0,qd.useMemo)(()=>{let f=(v,b=0)=>v.map(w=>[{value:w.id,label:"\u2014 ".repeat(b)+(0,EY.decodeEntities)(w.name),rawName:w.name},...f(w.children||[],b+1)]).sort(([w],[S])=>{let x=Pxe(w.rawName,t),C=Pxe(S.rawName,t);return x>=C?1:-1}).flat();if(!s)return[];let m=s.map(v=>({id:v.id,parent:v.parent,name:TY(v)}));t||(m=a6(m));let h=f(m),g=h.find(v=>v.value===n);return i&&!g&&h.unshift({value:n,label:i}),h},[s,t,i,n]);if(!o)return null;let u=f=>{r(f)},d=f=>{e({parent:f})};return(0,Na.jsx)(Tg.ComboboxControl,{className:"editor-page-attributes__parent",label:(0,Ma.__)("Parent"),help:(0,Ma.__)("Choose a parent page."),value:n,options:c,onFilterValueChange:(0,kxe.debounce)(u,300),onChange:d,hideLabelFromVision:!0,isLoading:l})}function Hnt({isOpen:e,onClick:t}){let r=(0,CS.useSelect)(n=>{let{getEditedPostAttribute:i}=n(I),s=i("parent");if(!s)return null;let{getEntityRecord:l}=n(l6.store),c=i("type");return l("postType",c,s)},[]),o=(0,qd.useMemo)(()=>r?TY(r):(0,Ma.__)("None"),[r]);return(0,Na.jsx)(Tg.Button,{size:"compact",className:"editor-post-parent__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,Ma.sprintf)((0,Ma.__)("Change parent: %s"),o),onClick:t,children:o})}function Oxe(){let e=(0,CS.useSelect)(n=>n(l6.store).getEntityRecord("root","__unstableBase")?.home,[]),[t,r]=(0,qd.useState)(null),o=(0,qd.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]);return(0,Na.jsx)(fr,{label:(0,Ma.__)("Parent"),ref:r,children:(0,Na.jsx)(Tg.Dropdown,{popoverProps:o,className:"editor-post-parent__panel-dropdown",contentClassName:"editor-post-parent__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:n,onToggle:i})=>(0,Na.jsx)(Hnt,{isOpen:n,onClick:i}),renderContent:({onClose:n})=>(0,Na.jsxs)("div",{className:"editor-post-parent",children:[(0,Na.jsx)(Rxe.__experimentalInspectorPopoverHeader,{title:(0,Ma.__)("Parent"),onClose:n}),(0,Na.jsxs)("div",{children:[(0,qd.createInterpolateElement)((0,Ma.sprintf)((0,Ma.__)('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,Axe.filterURLForDisplay)(e).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,Na.jsx)("wbr",{})}),(0,Na.jsx)("p",{children:(0,qd.createInterpolateElement)((0,Ma.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,Na.jsx)(Tg.ExternalLink,{href:(0,Ma.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes")})})})]}),(0,Na.jsx)(Ixe,{})]})})})}var Nxe=Ixe;var c6=a(E(),1),Unt="page-attributes";function Wnt(){let{isEnabled:e,postType:t}=(0,Mxe.useSelect)(r=>{let{getEditedPostAttribute:o,isEditorPanelEnabled:n}=r(I),{getPostType:i}=r(Fxe.store);return{isEnabled:n(Unt),postType:i(o("type"))}},[]);return!e||!t?null:(0,c6.jsx)(Oxe,{})}function u6(){return(0,c6.jsx)(wS,{children:(0,c6.jsx)(Wnt,{})})}var lc=a(j(),1),Hp=a(G(),1),ES=a(Y(),1),AY=a(ae(),1),Bxe=a(be(),1),PS=a(U(),1);var Vxe=a(It(),1);var d6=a(Y(),1),kY=a(U(),1),lu=a(Pt(),1),cu=a(G(),1),Ay=a(j(),1);var zp=a(E(),1),PY=(0,Ay.__)("Custom Template");function Eg({onClose:e}){let{defaultBlockTemplate:t,onNavigateToEntityRecord:r}=(0,d6.useSelect)(d=>{let{getEditorSettings:f,getCurrentTemplateId:m}=d(I);return{defaultBlockTemplate:f().defaultBlockTemplate,onNavigateToEntityRecord:f().onNavigateToEntityRecord,getTemplateId:m}}),{createTemplate:o}=K((0,d6.useDispatch)(I)),[n,i]=(0,kY.useState)(""),[s,l]=(0,kY.useState)(!1),c=()=>{i(""),e()},u=async d=>{if(d.preventDefault(),s)return;l(!0);let f=t??(0,lu.serialize)([(0,lu.createBlock)("core/group",{tagName:"header",layout:{inherit:!0}},[(0,lu.createBlock)("core/site-title"),(0,lu.createBlock)("core/site-tagline")]),(0,lu.createBlock)("core/separator"),(0,lu.createBlock)("core/group",{tagName:"main"},[(0,lu.createBlock)("core/group",{layout:{inherit:!0}},[(0,lu.createBlock)("core/post-title")]),(0,lu.createBlock)("core/post-content",{layout:{inherit:!0}})])]),m=await o({slug:$v(n||PY)||"wp-custom-template",content:f,title:n||PY,status:"publish"});l(!1),r({postId:m.id,postType:"wp_template"}),c()};return(0,zp.jsx)(cu.Modal,{title:(0,Ay.__)("Create custom template"),onRequestClose:c,focusOnMount:"firstContentElement",size:"small",overlayClassName:"editor-post-template__create-template-modal",children:(0,zp.jsx)("form",{onSubmit:u,children:(0,zp.jsxs)(cu.__experimentalVStack,{spacing:"3",children:[(0,zp.jsx)(cu.TextControl,{label:(0,Ay.__)("Name"),value:n,onChange:i,placeholder:PY,disabled:s,help:(0,Ay.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,zp.jsxs)(cu.__experimentalHStack,{justify:"right",children:[(0,zp.jsx)(cu.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:c,children:(0,Ay.__)("Cancel")}),(0,zp.jsx)(cu.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:s,"aria-disabled":s,children:(0,Ay.__)("Create")})]})]})})})}var Iy=a(Y(),1),Dxe=a(U(),1),Pg=a(ae(),1),f6=a(j(),1);function Oy(){return(0,Iy.useSelect)(e=>{let{getCurrentPostId:t,getCurrentPostType:r}=e(I);return{postId:t(),postType:r()}},[])}function Ny(){let{postType:e,postId:t}=Oy();return(0,Iy.useSelect)(r=>{let{canUser:o,getEntityRecord:n,getEntityRecords:i}=r(Pg.store),s=o("read",{kind:"root",name:"site"})?n("root","site"):void 0,l=+t===s?.page_for_posts,c=e==="page"&&+t===s?.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 Lxe(e){return(0,Iy.useSelect)(t=>t(Pg.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:e}),[e])}function iP(){let{postType:e,postId:t}=Oy(),[r]=(0,Pg.useEntityProp)("postType",e,"slug",t),o=RY(),n=Ny(),i=Lxe(e),s=(0,Iy.useSelect)(l=>{if(!window?.__experimentalDataFormInspector||!o)return null;let{getDefaultTemplateId:c,getEntityRecord:u}=l(Pg.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,Dxe.useMemo)(()=>n&&[...(i||[]).filter(l=>l.is_custom&&l.slug!==o&&!!l.content.raw),s&&{...s,title:{rendered:(0,f6.sprintf)((0,f6.__)("%s (default)"),s.title.rendered)},isDefault:!0}].filter(Boolean),[i,s,o,n])}function TS(){return(0,Iy.useSelect)(e=>{let{getEditorSettings:t,getCurrentTemplateId:r,getCurrentPostType:o}=e(I),{getPostType:n,canUser:i}=e(Pg.store),s=o(),l=n(s),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 RY(){let{postType:e,postId:t}=Oy(),r=Lxe(e),o=(0,Iy.useSelect)(n=>n(Pg.store).getEditedEntityRecord("postType",e,t)?.template,[e,t]);if(o)return r?.find(n=>n.slug===o)?.slug}var Fa=a(E(),1);function Gnt({isOpen:e,onClick:t}){let r=(0,ES.useSelect)(o=>{let n=o(I).getEditedPostAttribute("template"),{supportsTemplateMode:i,availableTemplates:s}=o(I).getEditorSettings();if(!i&&s[n])return s[n];let l=o(AY.store).canUser("create",{kind:"postType",name:"wp_template"})&&o(I).getCurrentTemplateId();return l?.title||l?.slug||s?.[n]},[]);return(0,Fa.jsx)(Hp.Button,{__next40pxDefaultSize:!0,variant:"tertiary","aria-expanded":e,"aria-label":(0,lc.__)("Template options"),onClick:t,children:r??(0,lc.__)("Default template")})}function Ynt({onClose:e}){let t=Ny(),{availableTemplates:r,fetchedTemplates:o,selectedTemplateSlug:n,canCreate:i,canEdit:s,currentTemplateId:l,onNavigateToEntityRecord:c,getEditorSettings:u}=(0,ES.useSelect)(b=>{let{canUser:_,getEntityRecords:y}=b(AY.store),w=b(I).getEditorSettings(),S=_("create",{kind:"postType",name:"wp_template"}),x=b(I).getCurrentTemplateId();return{availableTemplates:w.availableTemplates,fetchedTemplates:S?y("postType","wp_template",{post_type:b(I).getCurrentPostType(),per_page:-1}):void 0,selectedTemplateSlug:b(I).getEditedPostAttribute("template"),canCreate:t&&S&&w.supportsTemplateMode,canEdit:t&&S&&w.supportsTemplateMode&&!!x,currentTemplateId:x,onNavigateToEntityRecord:w.onNavigateToEntityRecord,getEditorSettings:b(I).getEditorSettings}},[t]),d=(0,PS.useMemo)(()=>Object.entries({...r,...Object.fromEntries((o??[]).map(({slug:b,title:_})=>[b,_.rendered]))}).map(([b,_])=>({value:b,label:_})),[r,o]),f=d.find(b=>b.value===n)??d.find(b=>!b.value),{editPost:m}=(0,ES.useDispatch)(I),{createSuccessNotice:h}=(0,ES.useDispatch)(Vxe.store),[g,v]=(0,PS.useState)(!1);return(0,Fa.jsxs)("div",{className:"editor-post-template__classic-theme-dropdown",children:[(0,Fa.jsx)(Bxe.__experimentalInspectorPopoverHeader,{title:(0,lc.__)("Template"),help:(0,lc.__)("Templates define the way content is displayed when viewing your site."),actions:i?[{icon:V4,label:(0,lc.__)("Add template"),onClick:()=>v(!0)}]:[],onClose:e}),t?(0,Fa.jsx)(Hp.SelectControl,{hideLabelFromVision:!0,label:(0,lc.__)("Template"),value:f?.value??"",options:d,onChange:b=>m({template:b||""})}):(0,Fa.jsx)(Hp.Notice,{status:"warning",isDismissible:!1,children:(0,lc.__)("The posts page template cannot be changed.")}),s&&c&&(0,Fa.jsx)("p",{children:(0,Fa.jsx)(Hp.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>{c({postId:l,postType:"wp_template"}),e(),h((0,lc.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:[{label:(0,lc.__)("Go back"),onClick:()=>u().onNavigateToPreviousEntityRecord()}]})},children:(0,lc.__)("Edit template")})}),g&&(0,Fa.jsx)(Eg,{onClose:()=>v(!1)})]})}function qnt(){let[e,t]=(0,PS.useState)(null),r=(0,PS.useMemo)(()=>({anchor:e,className:"editor-post-template__dropdown",placement:"left-start",offset:36,shift:!0}),[e]);return(0,Fa.jsx)(fr,{label:(0,lc.__)("Template"),ref:t,children:(0,Fa.jsx)(Hp.Dropdown,{popoverProps:r,focusOnMount:!0,renderToggle:({isOpen:o,onToggle:n})=>(0,Fa.jsx)(Gnt,{isOpen:o,onClick:n}),renderContent:({onClose:o})=>(0,Fa.jsx)(Ynt,{onClose:o})})})}var p6=qnt;var g6=a(G(),1),Wxe=a(zh(),1),v6=a(Y(),1),Gxe=a(GU(),1);var Hxe=a(G(),1);var m6=a(Y(),1),jxe=a(Dt(),1);var zxe=a(E(),1),{PreferenceBaseOption:Knt}=K(jxe.privateApis);function kg(e){let{toggleEditorPanelEnabled:t}=(0,m6.useDispatch)(I),{isChecked:r,isRemoved:o}=(0,m6.useSelect)(n=>{let{isEditorPanelEnabled:i,isEditorPanelRemoved:s}=n(I);return{isChecked:i(e.panelName),isRemoved:s(e.panelName)}},[e.panelName]);return o?null:(0,zxe.jsx)(Knt,{isChecked:r,onChange:()=>t(e.panelName),...e})}var IY=a(E(),1),{Fill:Znt,Slot:Xnt}=(0,Hxe.createSlotFill)("EnablePluginDocumentSettingPanelOption"),Uxe=({label:e,panelName:t})=>(0,IY.jsx)(Znt,{children:(0,IY.jsx)(kg,{label:e,panelName:t})});Uxe.Slot=Xnt;var h6=Uxe;var Rg=a(E(),1),{Fill:Qnt,Slot:Jnt}=(0,g6.createSlotFill)("PluginDocumentSettingPanel"),Yxe=({name:e,className:t,title:r,icon:o,children:n})=>{let{name:i}=(0,Wxe.usePluginContext)(),s=`${i}/${e}`,{opened:l,isEnabled:c}=(0,v6.useSelect)(d=>{let{isEditorPanelOpened:f,isEditorPanelEnabled:m}=d(I);return{opened:f(s),isEnabled:m(s)}},[s]),{toggleEditorPanelOpened:u}=(0,v6.useDispatch)(I);return e===void 0&&(0,Gxe.default)("PluginDocumentSettingPanel requires a name property."),(0,Rg.jsxs)(Rg.Fragment,{children:[(0,Rg.jsx)(h6,{label:r,panelName:s}),(0,Rg.jsx)(Qnt,{children:c&&(0,Rg.jsx)(g6.PanelBody,{className:t,title:r,icon:o,opened:l,onToggle:()=>u(s),children:n})})]})};Yxe.Slot=Jnt;var b6=Yxe;var qxe=a(be(),1),Kxe=a(G(),1),Zxe=a(Te(),1),OY=a(E(),1),$nt=(e,t)=>e.filter(r=>!t.includes(r)).length===0,eit=(e,t)=>!Array.isArray(t)||$nt(e,t),tit=({allowedBlocks:e,icon:t,label:r,onClick:o,small:n,role:i})=>(0,OY.jsx)(qxe.BlockSettingsMenuControls,{children:({selectedBlocks:s,onClose:l})=>eit(s,e)?(0,OY.jsx)(Kxe.MenuItem,{onClick:(0,Zxe.compose)(o,l),icon:t,label:n?r:void 0,role:i,children:!n&&r}):null}),Xxe=tit;var Qxe=a(G(),1),Jxe=a(zh(),1);var $xe=a(E(),1);function e1e(e){let t=(0,Jxe.usePluginContext)();return(0,$xe.jsx)(Yl,{name:"core/plugin-more-menu",as:e.as??Qxe.MenuItem,icon:e.icon||t.icon,...e})}var t1e=a(zh(),1),y6=a(G(),1),NY=a(E(),1),{Fill:rit,Slot:oit}=(0,y6.createSlotFill)("PluginPostPublishPanel"),r1e=({children:e,className:t,title:r,initialOpen:o=!1,icon:n})=>{let{icon:i}=(0,t1e.usePluginContext)();return(0,NY.jsx)(rit,{children:(0,NY.jsx)(y6.PanelBody,{className:t,initialOpen:o||!r,title:r,icon:n??i,children:e})})};r1e.Slot=oit;var w6=r1e;var _6=a(G(),1),MY=a(E(),1),{Fill:nit,Slot:iit}=(0,_6.createSlotFill)("PluginPostStatusInfo"),o1e=({children:e,className:t})=>(0,MY.jsx)(nit,{children:(0,MY.jsx)(_6.PanelRow,{className:t,children:e})});o1e.Slot=iit;var kS=o1e;var S6=a(G(),1),n1e=a(zh(),1),FY=a(E(),1),{Fill:sit,Slot:ait}=(0,S6.createSlotFill)("PluginPrePublishPanel"),i1e=({children:e,className:t,title:r,initialOpen:o=!1,icon:n})=>{let{icon:i}=(0,n1e.usePluginContext)();return(0,FY.jsx)(sit,{children:(0,FY.jsx)(S6.PanelBody,{className:t,initialOpen:o||!r,title:r,icon:n??i,children:e})})};i1e.Slot=ait;var x6=i1e;var s1e=a(G(),1),a1e=a(zh(),1);var l1e=a(E(),1);function c1e(e){let t=(0,a1e.usePluginContext)();return(0,l1e.jsx)(Yl,{name:"core/plugin-preview-menu",as:e.as??s1e.MenuItem,icon:e.icon||t.icon,...e})}var u1e=a(E(),1);function My({className:e,...t}){return(0,u1e.jsx)(Kl,{panelClassName:e,className:"editor-sidebar",scope:"core",...t})}var d1e=a(E(),1);function f1e(e){return(0,d1e.jsx)(Uh,{__unstableExplicitMenuItem:!0,scope:"core",...e})}var Up=a(Y(),1),M1e=a(Lt(),1),Ag=a(G(),1),C6=a(U(),1),Dy=a(j(),1),OS=a(ae(),1);var F1e=a(It(),1),D1e=a(Dt(),1);var AS=a(U(),1),g1e=a(Lt(),1),v1e=a(be(),1),IS=a(G(),1),RS=a(j(),1),b1e=a(Y(),1),y1e=a(ae(),1),w1e=a(Pt(),1);var m1e=a(gw(),1);function p1e(e=""){return e=(0,m1e.default)(e),e=e.trim().toLowerCase(),e}function lit(e,t){let r=p1e(t),o=p1e(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 h1e(e=[],t=""){if(!t)return e;let r=e.map(o=>[o,lit(o,t)]).filter(([,o])=>o>0);return r.sort(([,o],[,n])=>n-o),r.map(([o])=>o)}var Da=a(E(),1);function DY({onRequestClose:e,onSelect:t}){let{postType:r,postId:o}=Oy(),{editEntityRecord:n}=(0,b1e.useDispatch)(y1e.store),i=async s=>{n("postType",r,o,{template:s.isDefault?"":s.name},{undoIgnore:!0}),e(),t?.()};return(0,Da.jsx)(IS.Modal,{title:(0,RS.__)("Choose a template"),onRequestClose:e,overlayClassName:"editor-post-template__swap-template-modal",isFullScreen:!0,children:(0,Da.jsx)("div",{className:"editor-post-template__swap-template-modal-content",children:(0,Da.jsx)(cit,{onSelect:i})})})}function _1e({onClick:e}){let[t,r]=(0,AS.useState)(!1),o=iP();return(0,Da.jsxs)(Da.Fragment,{children:[(0,Da.jsx)(IS.MenuItem,{disabled:!o?.length,accessibleWhenDisabled:!0,onClick:()=>r(!0),children:(0,RS.__)("Change template")}),t&&(0,Da.jsx)(DY,{onRequestClose:()=>r(!1),onSelect:e})]})}function cit({onSelect:e}){let[t,r]=(0,AS.useState)(""),o=iP(),n=(0,AS.useMemo)(()=>o.map(s=>({name:s.slug,blocks:(0,w1e.parse)(s.content.raw),title:(0,g1e.decodeEntities)(s.title.rendered),id:s.id,isDefault:s.isDefault})),[o]),i=(0,AS.useMemo)(()=>h1e(n,t),[n,t]);return(0,Da.jsxs)(Da.Fragment,{children:[(0,Da.jsx)(IS.SearchControl,{onChange:r,value:t,label:(0,RS.__)("Search"),placeholder:(0,RS.__)("Search"),className:"editor-post-template__swap-template-search"}),(0,Da.jsx)(v1e.__experimentalBlockPatternsList,{label:(0,RS.__)("Templates"),blockPatterns:i,onClickPattern:e})]})}var S1e=a(G(),1),x1e=a(j(),1),C1e=a(Y(),1),T1e=a(ae(),1);var E1e=a(E(),1);function P1e({onClick:e}){let t=RY(),r=Ny(),{postType:o,postId:n}=Oy(),{editEntityRecord:i}=(0,C1e.useDispatch)(T1e.store);return!t||!r?null:(0,E1e.jsx)(S1e.MenuItem,{onClick:()=>{i("postType",o,n,{template:""},{undoIgnore:!0}),e()},children:(0,x1e.__)("Use default template")})}var k1e=a(G(),1),R1e=a(j(),1),A1e=a(Y(),1),I1e=a(ae(),1),O1e=a(U(),1);var Fy=a(E(),1);function N1e(){let{canCreateTemplates:e}=(0,A1e.useSelect)(n=>{let{canUser:i}=n(I1e.store);return{canCreateTemplates:i("create",{kind:"postType",name:"wp_template"})}},[]),[t,r]=(0,O1e.useState)(!1),o=Ny();return!e||!o?null:(0,Fy.jsxs)(Fy.Fragment,{children:[(0,Fy.jsx)(k1e.MenuItem,{onClick:()=>{r(!0)},children:(0,R1e.__)("Create new template")}),t&&(0,Fy.jsx)(Eg,{onClose:()=>{r(!1)}})]})}var La=a(E(),1);function L1e(){let{isTemplateHidden:e,onNavigateToEntityRecord:t,getEditorSettings:r,hasGoBack:o,hasSpecificTemplate:n,id:i}=(0,Up.useSelect)(S=>{let{getRenderingMode:x,getEditorSettings:C,getCurrentPost:A,getCurrentTemplateId:k}=K(S(I)),R=C(),M=A();return{isTemplateHidden:x()==="post-only",onNavigateToEntityRecord:R.onNavigateToEntityRecord,getEditorSettings:C,hasGoBack:R.hasOwnProperty("onNavigateToPreviousEntityRecord"),hasSpecificTemplate:!!M.template,id:k()}},[]),{get:s}=(0,Up.useSelect)(D1e.store),{editedRecord:l,hasResolved:c}=(0,OS.useEntityRecord)("postType","wp_template",i),{getEntityRecord:u}=(0,Up.useSelect)(OS.store),{editEntityRecord:d}=(0,Up.useDispatch)(OS.store),{createSuccessNotice:f}=(0,Up.useDispatch)(F1e.store),{setRenderingMode:m,setDefaultRenderingMode:h}=K((0,Up.useDispatch)(I)),g=(0,Up.useSelect)(S=>!!S(OS.store).canUser("create",{kind:"postType",name:"wp_template"}),[]),[v,b]=(0,C6.useState)(null),_=(0,C6.useMemo)(()=>({anchor:v,className:"editor-post-template__dropdown",placement:"left-start",offset:36,shift:!0}),[v]);if(!c)return null;let y=o?[{label:(0,Dy.__)("Go back"),onClick:()=>r().onNavigateToPreviousEntityRecord()}]:void 0,w=()=>{s("core/edit-site","welcomeGuideTemplate")||f((0,Dy.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:y})};return(0,La.jsx)(fr,{label:(0,Dy.__)("Template"),ref:b,children:(0,La.jsx)(Ag.DropdownMenu,{popoverProps:_,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},label:(0,Dy.__)("Template options"),text:(0,M1e.decodeEntities)(l.title),icon:null,children:({onClose:S})=>(0,La.jsxs)(La.Fragment,{children:[(0,La.jsxs)(Ag.MenuGroup,{children:[g&&(0,La.jsx)(Ag.MenuItem,{onClick:async()=>{if(t({postId:l.id,postType:"wp_template"}),!n&&window?.__experimentalTemplateActivate){let x=await u("root","site").active_templates;x[l.slug]!==l.id&&d("root","site",void 0,{active_templates:{...x,[l.slug]:l.id}})}S(),w()},children:(0,Dy.__)("Edit template")}),(0,La.jsx)(_1e,{onClick:S}),(0,La.jsx)(P1e,{onClick:S}),g&&(0,La.jsx)(N1e,{})]}),(0,La.jsx)(Ag.MenuGroup,{children:(0,La.jsx)(Ag.MenuItem,{icon:e?void 0:Io,isSelected:!e,role:"menuitemcheckbox",onClick:()=>{let x=e?"template-locked":"post-only";m(x),h(x)},children:(0,Dy.__)("Show template")})})]})})})}var LY=a(E(),1);function T6(){let e=TS();return e==="classic"?(0,LY.jsx)(p6,{}):e==="block-theme"?(0,LY.jsx)(L1e,{}):null}var eCe=a(Y(),1),tCe=a(ae(),1);var H1e=a(Te(),1),U1e=a(U(),1),W1e=a(Y(),1),G1e=a(j(),1),Y1e=a(G(),1);var B1e=a(j(),1),V1e=a(U(),1),j1e=a(Y(),1),BY=a(Lt(),1),z1e=a(ae(),1);var sP={_fields:"id,name",context:"view"},E6={who:"authors",per_page:100,...sP};function P6(e){let{authorId:t,authors:r,postAuthor:o,isLoading:n}=(0,j1e.useSelect)(s=>{let{getUser:l,getUsers:c,isResolving:u}=s(z1e.store),{getEditedPostAttribute:d}=s(I),f=d("author"),m={...E6};return e&&(m.search=e,m.search_columns=["name"]),{authorId:f,authors:c(m),postAuthor:l(f,sP),isLoading:u("getUsers",[m])}},[e]),i=(0,V1e.useMemo)(()=>{let s=(r??[]).map(u=>({value:u.id,label:(0,BY.decodeEntities)(u.name)})),l=s.findIndex(({value:u})=>o?.id===u),c=[];return l<0&&o?c=[{value:o.id,label:(0,BY.decodeEntities)(o.name)}]:l<0&&!o&&(c=[{value:0,label:(0,B1e.__)("(No author)")}]),[...c,...s]},[r,o]);return{authorId:t,authorOptions:i,postAuthor:o,isLoading:n}}var q1e=a(E(),1);function K1e(){let[e,t]=(0,U1e.useState)(),{editPost:r}=(0,W1e.useDispatch)(I),{authorId:o,authorOptions:n,isLoading:i}=P6(e),s=l=>{l&&r({author:l})};return(0,q1e.jsx)(Y1e.ComboboxControl,{label:(0,G1e.__)("Author"),options:n,value:o,onFilterValueChange:(0,H1e.debounce)(t,300),onChange:s,allowReset:!1,hideLabelFromVision:!0,isLoading:i})}var Z1e=a(j(),1),X1e=a(Y(),1),Q1e=a(G(),1);var J1e=a(E(),1);function $1e(){let{editPost:e}=(0,X1e.useDispatch)(I),{authorId:t,authorOptions:r}=P6(),o=n=>{let i=Number(n);e({author:i})};return(0,J1e.jsx)(Q1e.SelectControl,{className:"post-author-selector",label:(0,Z1e.__)("Author"),options:r,onChange:o,value:t,hideLabelFromVision:!0})}var VY=a(E(),1),uit=25;function dit(){return(0,eCe.useSelect)(t=>t(tCe.store).getUsers(E6)?.length>=uit,[])?(0,VY.jsx)(K1e,{}):(0,VY.jsx)($1e,{})}var k6=dit;var rCe=a(Y(),1);var oCe=a(E(),1);function R6({children:e}){let{hasAssignAuthorAction:t}=(0,rCe.useSelect)(r=>({hasAssignAuthorAction:!!r(I).getCurrentPost()?._links?.["wp:action-assign-author"]}),[]);return t?(0,oCe.jsx)(uo,{supportKeys:"author",children:e}):null}var Ly=a(j(),1),A6=a(G(),1),I6=a(U(),1),nCe=a(Lt(),1),iCe=a(be(),1),sCe=a(Y(),1),aCe=a(ae(),1);var Kd=a(E(),1);function fit({isOpen:e,onClick:t}){let{postAuthor:r}=(0,sCe.useSelect)(n=>{let i=n(I).getEditedPostAttribute("author");return{postAuthor:n(aCe.store).getUser(i,sP)}},[]),o=(0,nCe.decodeEntities)(r?.name)||(0,Ly.__)("(No author)");return(0,Kd.jsx)(A6.Button,{size:"compact",variant:"tertiary","aria-expanded":e,"aria-label":(0,Ly.sprintf)((0,Ly.__)("Change author: %s"),o),onClick:t,children:o})}function pit(){let[e,t]=(0,I6.useState)(null),r=(0,I6.useMemo)(()=>({anchor:e,placement:"left-start",offset:36,shift:!0}),[e]);return(0,Kd.jsx)(R6,{children:(0,Kd.jsx)(fr,{label:(0,Ly.__)("Author"),ref:t,children:(0,Kd.jsx)(A6.Dropdown,{popoverProps:r,contentClassName:"editor-post-author__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:o,onToggle:n})=>(0,Kd.jsx)(fit,{isOpen:o,onClick:n}),renderContent:({onClose:o})=>(0,Kd.jsxs)("div",{className:"editor-post-author",children:[(0,Kd.jsx)(iCe.__experimentalInspectorPopoverHeader,{title:(0,Ly.__)("Author"),onClose:o}),(0,Kd.jsx)(k6,{onClose:o})]})})})})}var O6=pit;var Ig=a(j(),1),M6=a(G(),1),F6=a(Y(),1);var N6=a(E(),1),mit=[{label:(0,Ig._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,Ig.__)("Visitors can add new comments and replies.")},{label:(0,Ig.__)("Closed"),value:"closed",description:[(0,Ig.__)("Visitors cannot add new comments or replies."),(0,Ig.__)("Existing comments remain visible.")].join(" ")}];function hit(){let e=(0,F6.useSelect)(o=>o(I).getEditedPostAttribute("comment_status")??"open",[]),{editPost:t}=(0,F6.useDispatch)(I),r=o=>t({comment_status:o});return(0,N6.jsx)("form",{children:(0,N6.jsx)(M6.__experimentalVStack,{spacing:4,children:(0,N6.jsx)(M6.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,Ig.__)("Comment status"),options:mit,onChange:r,selected:e})})})}var D6=hit;var uu=a(j(),1),NS=a(G(),1),zY=a(Y(),1),z6=a(U(),1),lCe=a(be(),1),cCe=a(ae(),1);var L6=a(j(),1),B6=a(G(),1),V6=a(Y(),1);var jY=a(E(),1);function git(){let e=(0,V6.useSelect)(o=>o(I).getEditedPostAttribute("ping_status")??"open",[]),{editPost:t}=(0,V6.useDispatch)(I),r=()=>t({ping_status:e==="open"?"closed":"open"});return(0,jY.jsx)(B6.CheckboxControl,{label:(0,L6.__)("Enable pingbacks & trackbacks"),checked:e==="open",onChange:r,help:(0,jY.jsx)(B6.ExternalLink,{href:(0,L6.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,L6.__)("Learn more about pingbacks & trackbacks")})})}var j6=git;var Xs=a(E(),1),vit="discussion-panel";function bit({onClose:e}){return(0,Xs.jsxs)("div",{className:"editor-post-discussion",children:[(0,Xs.jsx)(lCe.__experimentalInspectorPopoverHeader,{title:(0,uu.__)("Discussion"),onClose:e}),(0,Xs.jsxs)(NS.__experimentalVStack,{spacing:4,children:[(0,Xs.jsx)(uo,{supportKeys:"comments",children:(0,Xs.jsx)(D6,{})}),(0,Xs.jsx)(uo,{supportKeys:"trackbacks",children:(0,Xs.jsx)(j6,{})})]})]})}function yit({isOpen:e,onClick:t}){let{commentStatus:r,pingStatus:o,commentsSupported:n,trackbacksSupported:i}=(0,zY.useSelect)(l=>{let{getEditedPostAttribute:c}=l(I),{getPostType:u}=l(cCe.store),d=u(c("type"));return{commentStatus:c("comment_status")??"open",pingStatus:c("ping_status")??"open",commentsSupported:!!d.supports.comments,trackbacksSupported:!!d.supports.trackbacks}},[]),s;return r==="open"?o==="open"?s=(0,uu._x)("Open",'Adjective: e.g. "Comments are open"'):s=i?(0,uu.__)("Comments only"):(0,uu._x)("Open",'Adjective: e.g. "Comments are open"'):o==="open"?s=n?(0,uu.__)("Pings only"):(0,uu.__)("Pings enabled"):s=(0,uu.__)("Closed"),(0,Xs.jsx)(NS.Button,{size:"compact",className:"editor-post-discussion__panel-toggle",variant:"tertiary","aria-label":(0,uu.__)("Change discussion options"),"aria-expanded":e,onClick:t,children:s})}function H6(){let{isEnabled:e}=(0,zY.useSelect)(n=>{let{isEditorPanelEnabled:i}=n(I);return{isEnabled:i(vit)}},[]),[t,r]=(0,z6.useState)(null),o=(0,z6.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]);return e?(0,Xs.jsx)(uo,{supportKeys:["comments","trackbacks"],children:(0,Xs.jsx)(fr,{label:(0,uu.__)("Discussion"),ref:r,children:(0,Xs.jsx)(NS.Dropdown,{popoverProps:o,className:"editor-post-discussion__panel-dropdown",contentClassName:"editor-post-discussion__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:n,onToggle:i})=>(0,Xs.jsx)(yit,{isOpen:n,onClick:i}),renderContent:({onClose:n})=>(0,Xs.jsx)(bit,{onClose:n})})})}):null}var MS=a(j(),1),W6=a(G(),1),G6=a(Y(),1),uCe=a(U(),1),dCe=a(Lt(),1);var U6=a(E(),1);function aP({hideLabelFromVision:e=!1,updateOnBlur:t=!1}){let{excerpt:r,shouldUseDescriptionLabel:o,usedAttribute:n}=(0,G6.useSelect)(d=>{let{getCurrentPostType:f,getEditedPostAttribute:m}=d(I),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,G6.useDispatch)(I),[s,l]=(0,uCe.useState)((0,dCe.decodeEntities)(r)),c=d=>{i({[n]:d})},u=o?(0,MS.__)("Write a description (optional)"):(0,MS.__)("Write an excerpt (optional)");return(0,U6.jsx)("div",{className:"editor-post-excerpt",children:(0,U6.jsx)(W6.TextareaControl,{label:u,hideLabelFromVision:e,className:"editor-post-excerpt__textarea",onChange:t?l:c,onBlur:t?()=>c(s):void 0,value:t?s:r,help:o?(0,MS.__)("Write a description"):(0,U6.jsx)(W6.ExternalLink,{href:(0,MS.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),children:(0,MS.__)("Learn more about manual excerpts")})})})}var fCe=a(E(),1);function wit({children:e}){return(0,fCe.jsx)(uo,{supportKeys:"excerpt",children:e})}var By=wit;var Wp=a(j(),1),du=a(G(),1),cP=a(Y(),1),K6=a(U(),1),mCe=a(be(),1),UY=a(ae(),1),hCe=a(Lt(),1);var Y6=a(G(),1),HY=a(E(),1),{Fill:_it,Slot:Sit}=(0,Y6.createSlotFill)("PluginPostExcerpt"),pCe=({children:e,className:t})=>(0,HY.jsx)(_it,{children:(0,HY.jsx)(Y6.PanelRow,{className:t,children:e})});pCe.Slot=Sit;var lP=pCe;var fo=a(E(),1),q6="post-excerpt";function xit(){let{isOpened:e,isEnabled:t,postType:r}=(0,cP.useSelect)(s=>{let{isEditorPanelOpened:l,isEditorPanelEnabled:c,getCurrentPostType:u}=s(I);return{isOpened:l(q6),isEnabled:c(q6),postType:u()}},[]),{toggleEditorPanelOpened:o}=(0,cP.useDispatch)(I),n=()=>o(q6);if(!t)return null;let i=["wp_template","wp_template_part","wp_block"].includes(r);return(0,fo.jsx)(du.PanelBody,{title:i?(0,Wp.__)("Description"):(0,Wp.__)("Excerpt"),opened:e,onToggle:n,children:(0,fo.jsx)(lP.Slot,{children:s=>(0,fo.jsxs)(fo.Fragment,{children:[(0,fo.jsx)(aP,{}),s]})})})}function gCe(){return(0,fo.jsx)(By,{children:(0,fo.jsx)(xit,{})})}function vCe(){return(0,fo.jsx)(By,{children:(0,fo.jsx)(Cit,{})})}function Cit(){let{shouldRender:e,excerpt:t,shouldBeUsedAsDescription:r,allowEditing:o}=(0,cP.useSelect)(f=>{let{getCurrentPostType:m,getCurrentPostId:h,getEditedPostAttribute:g,isEditorPanelEnabled:v}=f(I),b=m(),_=["wp_template","wp_template_part"].includes(b),y=b==="wp_block",w=_||y,x=g(_?"description":"excerpt"),C=_&&f(UY.store).getEntityRecord("postType",b,h()),A=!x&&_?Al({template:C,templateTypes:f(UY.store).getCurrentTheme()?.default_template_types})?.description:void 0,k=v(q6)||w;return{excerpt:x??A,shouldRender:k,shouldBeUsedAsDescription:w,allowEditing:k&&(!w||y||C&&C.source===Pk.custom&&!C.has_theme_file&&C.is_custom)}},[]),[n,i]=(0,K6.useState)(null),s=r?(0,Wp.__)("Description"):(0,Wp.__)("Excerpt"),l=(0,K6.useMemo)(()=>({anchor:n,"aria-label":s,headerTitle:s,placement:"left-start",offset:36,shift:!0}),[n,s]);if(!e)return!1;let c=!!t&&(0,fo.jsx)(du.__experimentalText,{align:"left",numberOfLines:4,truncate:o,children:(0,hCe.decodeEntities)(t)});if(!o)return c;let u=r?(0,Wp.__)("Add a description\u2026"):(0,Wp.__)("Add an excerpt\u2026"),d=r?(0,Wp.__)("Edit description"):(0,Wp.__)("Edit excerpt");return(0,fo.jsxs)(du.__experimentalVStack,{children:[c,(0,fo.jsx)(du.Dropdown,{className:"editor-post-excerpt__dropdown",contentClassName:"editor-post-excerpt__dropdown__content",popoverProps:l,focusOnMount:!0,ref:i,renderToggle:({onToggle:f})=>(0,fo.jsx)(du.Button,{__next40pxDefaultSize:!0,onClick:f,variant:"link",children:c?d:u}),renderContent:({onClose:f})=>(0,fo.jsxs)(fo.Fragment,{children:[(0,fo.jsx)(mCe.__experimentalInspectorPopoverHeader,{title:s,onClose:f}),(0,fo.jsx)(du.__experimentalVStack,{spacing:4,children:(0,fo.jsx)(lP.Slot,{children:m=>(0,fo.jsxs)(fo.Fragment,{children:[(0,fo.jsx)(aP,{hideLabelFromVision:!0,updateOnBlur:!0}),m]})})})]})})]})}var vl=a(j(),1),GY=a(jn(),1),as=a(G(),1),_Ce=a(nI(),1),X6=a(U(),1),SCe=a(Te(),1),FS=a(Y(),1),Vy=a(be(),1),xCe=a(ae(),1);var bCe=a(Y(),1),yCe=a(ae(),1);function Z6({children:e,supportKeys:t}){let{postType:r,themeSupports:o}=(0,bCe.useSelect)(i=>({postType:i(I).getEditedPostAttribute("type"),themeSupports:i(yCe.store).getThemeSupports()}),[]);return(Array.isArray(t)?t:[t]).some(i=>{let s=o?.[i]??!1;return i==="post-thumbnails"&&Array.isArray(s)?s.includes(r):s})?e:null}var WY=a(E(),1);function Tit({children:e}){return(0,WY.jsx)(Z6,{supportKeys:"post-thumbnails",children:(0,WY.jsx)(uo,{supportKeys:"thumbnail",children:e})})}var Gp=Tit;var Ti=a(E(),1),wCe=["image"],Eit=(0,vl.__)("Featured image"),Pit=(0,vl.__)("Add a featured image"),kit=(0,Ti.jsx)("p",{children:(0,vl.__)("To edit the featured image, you need permission to upload media.")});function Rit(e,t){if(!e)return{};let r=(0,GY.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,GY.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 Ait({currentPostId:e,featuredImageId:t,onUpdateImage:r,onRemoveImage:o,media:n,postType:i,noticeUI:s,noticeOperations:l,isRequestingFeaturedImageMedia:c}){let u=(0,X6.useRef)(!1),[d,f]=(0,X6.useState)(!1),{getSettings:m}=(0,FS.useSelect)(Vy.store),{mediaSourceUrl:h}=Rit(n,e);function g(y){m().mediaUpload({allowedTypes:wCe,filesList:y,onFileChange([w]){if((0,_Ce.isBlobURL)(w?.url)){f(!0);return}w&&r(w),f(!1)},onError(w){l.removeAllNotices(),l.createErrorNotice(w)},multiple:!1})}function v(y){return y.alt_text?(0,vl.sprintf)((0,vl.__)("Current image: %s"),y.alt_text):(0,vl.sprintf)((0,vl.__)("The current image has no alternative text. The file name is: %s"),y.media_details.sizes?.full?.file||y.slug)}function b(y){u.current&&y&&(y.focus(),u.current=!1)}let _=!c&&!!t&&!n;return(0,Ti.jsxs)(Gp,{children:[s,(0,Ti.jsxs)("div",{className:"editor-post-featured-image",children:[n&&(0,Ti.jsx)("div",{id:`editor-post-featured-image-${t}-describedby`,className:"hidden",children:v(n)}),(0,Ti.jsx)(Vy.MediaUploadCheck,{fallback:kit,children:(0,Ti.jsx)(Vy.MediaUpload,{title:i?.labels?.featured_image||Eit,onSelect:r,unstableFeaturedImageFlow:!0,allowedTypes:wCe,modalClass:"editor-post-featured-image__media-modal",render:({open:y})=>(0,Ti.jsxs)("div",{className:"editor-post-featured-image__container",children:[_?(0,Ti.jsx)(as.Notice,{status:"warning",isDismissible:!1,children:(0,vl.__)("Could not retrieve the featured image data.")}):(0,Ti.jsxs)(as.Button,{__next40pxDefaultSize:!0,ref:b,className:t?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:y,"aria-label":t?(0,vl.__)("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,Ti.jsx)("img",{className:"editor-post-featured-image__preview-image",src:h,alt:v(n)}),(d||c)&&(0,Ti.jsx)(as.Spinner,{}),!t&&!d&&(i?.labels?.set_featured_image||Pit)]}),!!t&&(0,Ti.jsxs)(as.__experimentalHStack,{className:J("editor-post-featured-image__actions",{"editor-post-featured-image__actions-missing-image":_,"editor-post-featured-image__actions-is-requesting-image":c}),children:[(0,Ti.jsx)(as.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:y,"aria-haspopup":"dialog",variant:_?"secondary":void 0,children:(0,vl.__)("Replace")}),(0,Ti.jsx)(as.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:()=>{o(),u.current=!0},variant:_?"secondary":void 0,isDestructive:_,children:(0,vl.__)("Remove")})]}),(0,Ti.jsx)(as.DropZone,{onFilesDrop:g})]}),value:t})})]})]})}var Iit=(0,FS.withSelect)(e=>{let{getEntityRecord:t,getPostType:r,hasFinishedResolution:o}=e(xCe.store),{getCurrentPostId:n,getEditedPostAttribute:i}=e(I),s=i("featured_media");return{media:s?t("postType","attachment",s,{context:"view"}):null,currentPostId:n(),postType:r(i("type")),featuredImageId:s,isRequestingFeaturedImageMedia:!!s&&!o("getEntityRecord",["postType","attachment",s,{context:"view"}])}}),Oit=(0,FS.withDispatch)((e,{noticeOperations:t},{select:r})=>{let{editPost:o}=e(I);return{onUpdateImage(n){o({featured_media:n.id})},onDropImage(n){r(Vy.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})}}}),uP=(0,SCe.compose)(as.withNotices,Iit,Oit,(0,as.withFilters)("editor.PostFeaturedImage"))(Ait);var CCe=a(j(),1),TCe=a(G(),1),Q6=a(Y(),1),ECe=a(ae(),1);var DS=a(E(),1),YY="featured-image";function J6({withPanelBody:e=!0}){let{postType:t,isEnabled:r,isOpened:o}=(0,Q6.useSelect)(i=>{let{getEditedPostAttribute:s,isEditorPanelEnabled:l,isEditorPanelOpened:c}=i(I),{getPostType:u}=i(ECe.store);return{postType:u(s("type")),isEnabled:l(YY),isOpened:c(YY)}},[]),{toggleEditorPanelOpened:n}=(0,Q6.useDispatch)(I);return r?e?(0,DS.jsx)(Gp,{children:(0,DS.jsx)(TCe.PanelBody,{title:t?.labels?.featured_image??(0,CCe.__)("Featured image"),opened:o,onToggle:()=>n(YY),children:(0,DS.jsx)(uP,{})})}):(0,DS.jsx)(Gp,{children:(0,DS.jsx)(uP,{})}):null}var Qs=a(j(),1),$6=a(G(),1),eF=a(Y(),1),RCe=a(Te(),1),ACe=a(ae(),1);var PCe=a(Y(),1);var kCe=a(E(),1);function LS({children:e}){return(0,PCe.useSelect)(r=>r(I).getEditorSettings().disablePostFormats,[])?null:(0,kCe.jsx)(uo,{supportKeys:"post-formats",children:e})}var jy=a(E(),1),dP=[{id:"aside",caption:(0,Qs.__)("Aside")},{id:"audio",caption:(0,Qs.__)("Audio")},{id:"chat",caption:(0,Qs.__)("Chat")},{id:"gallery",caption:(0,Qs.__)("Gallery")},{id:"image",caption:(0,Qs.__)("Image")},{id:"link",caption:(0,Qs.__)("Link")},{id:"quote",caption:(0,Qs.__)("Quote")},{id:"standard",caption:(0,Qs.__)("Standard")},{id:"status",caption:(0,Qs.__)("Status")},{id:"video",caption:(0,Qs.__)("Video")}].sort((e,t)=>{let r=e.caption.toUpperCase(),o=t.caption.toUpperCase();return r<o?-1:r>o?1:0});function fP(){let t=`post-format-selector-${(0,RCe.useInstanceId)(fP)}`,{postFormat:r,suggestedFormat:o,supportedFormats:n}=(0,eF.useSelect)(u=>{let{getEditedPostAttribute:d,getSuggestedPostFormat:f}=u(I),m=d("format"),h=u(ACe.store).getThemeSupports();return{postFormat:m??"standard",suggestedFormat:f(),supportedFormats:h.formats}},[]),i=dP.filter(u=>n?.includes(u.id)||r===u.id),s=i.find(u=>u.id===o),{editPost:l}=(0,eF.useDispatch)(I),c=u=>l({format:u});return(0,jy.jsx)(LS,{children:(0,jy.jsxs)("div",{className:"editor-post-format",children:[(0,jy.jsx)($6.RadioControl,{className:"editor-post-format__options",label:(0,Qs.__)("Post Format"),selected:r,onChange:u=>c(u),id:t,options:i.map(u=>({label:u.caption,value:u.id})),hideLabelFromVision:!0}),s&&s.id!==r&&(0,jy.jsx)("p",{className:"editor-post-format__suggestion",children:(0,jy.jsx)($6.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>c(s.id),children:(0,Qs.sprintf)((0,Qs.__)("Apply suggested format: %s"),s.caption)})})]})})}var Og=a(j(),1),qY=a(G(),1),pP=a(Y(),1);var KY=a(vo(),1);var ICe=a(Y(),1);var OCe=a(E(),1);function Nit({children:e}){let{lastRevisionId:t,revisionsCount:r}=(0,ICe.useSelect)(o=>{let{getCurrentPostLastRevisionId:n,getCurrentPostRevisionsCount:i}=o(I);return{lastRevisionId:n(),revisionsCount:i()}},[]);return!t||r<2?null:(0,OCe.jsx)(uo,{supportKeys:"revisions",children:e})}var zy=Nit;var BS=a(E(),1);function NCe(){return(0,pP.useSelect)(e=>{let{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:r,getEditorSettings:o}=e(I);return{lastRevisionId:t(),revisionsCount:r(),disableVisualRevisions:!!o().disableVisualRevisions}},[])}function Mit(){let{lastRevisionId:e,revisionsCount:t,disableVisualRevisions:r}=NCe(),{setCurrentRevisionId:o}=K((0,pP.useDispatch)(I)),n=r?{href:(0,KY.addQueryArgs)("revision.php",{revision:e})}:{onClick:()=>o(e)};return(0,BS.jsx)(zy,{children:(0,BS.jsx)(qY.Button,{__next40pxDefaultSize:!0,...n,className:"editor-post-last-revision__title",icon:yf,iconPosition:"right",text:(0,Og.sprintf)((0,Og.__)("Revisions (%s)"),t)})})}function MCe(){let{lastRevisionId:e,revisionsCount:t,disableVisualRevisions:r}=NCe(),{setCurrentRevisionId:o}=K((0,pP.useDispatch)(I)),n=r?{href:(0,KY.addQueryArgs)("revision.php",{revision:e})}:{onClick:()=>o(e)};return(0,BS.jsx)(zy,{children:(0,BS.jsx)(fr,{label:(0,Og.__)("Revisions"),children:(0,BS.jsx)(qY.Button,{...n,className:"editor-private-post-last-revision__button",text:t,"aria-label":(0,Og.sprintf)((0,Og._n)("Open revisions screen: %d revision","Open revisions screen: %d revisions",t),t),variant:"tertiary",size:"compact"})})})}var tF=Mit;var FCe=a(G(),1);var rF=a(E(),1);function Fit(){return(0,rF.jsx)(zy,{children:(0,rF.jsx)(FCe.PanelBody,{className:"editor-post-last-revision__panel",children:(0,rF.jsx)(tF,{})})})}var DCe=Fit;var ai=a(j(),1),pu=a(G(),1),hP=a(Y(),1),QY=a(vo(),1),mP=a(U(),1),VS=a(jn(),1),zCe=a(Te(),1),JY=a(ae(),1);var fu=a(j(),1),Dit="authentication-failed",Lit="connection-expired",Bit="connection-limit-exceeded",LCe="document-size-limit-exceeded",XY="protocol-mismatch",BCe="unknown-error",ZY={[Dit]:{title:(0,fu.__)("Unable to connect"),description:(0,fu.__)("Real-time collaboration couldn't verify your permissions. Check that you have access to edit this post or contact your site administrator.")},[Lit]:{title:(0,fu.__)("Connection expired"),description:(0,fu.__)("Your connection to real-time collaboration has timed out. Editing is paused to prevent conflicts with other editors.")},[Bit]:{title:(0,fu.__)("Too many editors connected"),description:(0,fu.__)("Real-time collaboration has reached its connection limit. Try again later or contact your site administrator.")},[XY]:{title:(0,fu.__)("Protocol update"),description:(0,fu.__)("Real-time collaboration has been updated. Please refresh the page to continue editing.")},[BCe]:{title:(0,fu.__)("Connection lost"),description:(0,fu.__)("The connection to real-time collaboration was interrupted. Editing is paused to prevent conflicts with other editors.")}};function VCe(e){return e?.code&&ZY[e?.code]?ZY[e.code]:ZY[BCe]}var Jr=a(E(),1);function jCe(){let{isCollaborationSupported:e,syncConnectionStatus:t}=(0,hP.useSelect)(r=>{let{isCollaborationSupported:o,getSyncConnectionStatus:n}=K(r(JY.store));return{isCollaborationSupported:o(),syncConnectionStatus:n()}},[]);return e?null:LCe===t?.error?.code?(0,Jr.jsx)("p",{children:(0,ai.__)("Because this post is too large for real-time collaboration, only one person can edit at a time.")}):(0,Jr.jsx)("p",{children:(0,ai.__)("Because this post uses plugins that aren\u2019t compatible with real-time collaboration, only one person can edit at a time.")})}function HCe(){let t="core/editor/post-locked-modal-"+(0,zCe.useInstanceId)(HCe),{autosave:r,updatePostLock:o}=(0,hP.useDispatch)(I),{isCollaborationEnabled:n,isLocked:i,isTakeover:s,user:l,postId:c,postLockUtils:u,activePostLock:d,postType:f,previewLink:m}=(0,hP.useSelect)(y=>{let{isPostLocked:w,isPostLockTakeover:S,getPostLockUser:x,getCurrentPostId:C,getActivePostLock:A,getEditedPostAttribute:k,getEditedPostPreviewLink:R,getEditorSettings:M,isCollaborationEnabledForCurrentPost:P}=K(y(I)),{getPostType:T}=y(JY.store);return{isCollaborationEnabled:P(),isLocked:w(),isTakeover:S(),user:x(),postId:C(),postLockUtils:M().postLockUtils,activePostLock:A(),postType:T(k("type")),previewLink:R()}},[]);if((0,mP.useEffect)(()=>{function y(x){i||(x["wp-refresh-post-lock"]={lock:d,post_id:c})}function w(x){if(!x["wp-refresh-post-lock"])return;let C=x["wp-refresh-post-lock"];C.lock_error?(r(),o({isLocked:!0,isTakeover:!0,user:{name:C.lock_error.name,avatar:C.lock_error.avatar_src_2x}})):C.new_lock&&o({isLocked:!1,activePostLock:C.new_lock})}function S(){if(i||!d)return;let x=new window.FormData;if(x.append("action","wp-remove-post-lock"),x.append("_wpnonce",u.unlockNonce),x.append("post_ID",c),x.append("active_post_lock",d),window.navigator.sendBeacon)window.navigator.sendBeacon(u.ajaxUrl,x);else{let C=new window.XMLHttpRequest;C.open("POST",u.ajaxUrl,!1),C.send(x)}}return(0,VS.addAction)("heartbeat.send",t,y),(0,VS.addAction)("heartbeat.tick",t,w),window.addEventListener("beforeunload",S),()=>{(0,VS.removeAction)("heartbeat.send",t),(0,VS.removeAction)("heartbeat.tick",t),window.removeEventListener("beforeunload",S)}},[]),!i||n)return null;let h=l.name,g=l.avatar,v=(0,QY.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:c,action:"edit",_wpnonce:u.nonce}),b=(0,QY.addQueryArgs)("edit.php",{post_type:f?.slug}),_=(0,ai.__)("Exit editor");return(0,Jr.jsx)(pu.Modal,{title:s?(0,ai.__)("Someone else has taken over this post"):(0,ai.__)("This post is already being edited"),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"editor-post-locked-modal",size:"medium",children:(0,Jr.jsxs)(pu.__experimentalHStack,{alignment:"top",spacing:6,children:[!!g&&(0,Jr.jsx)("img",{src:g,alt:(0,ai.__)("Avatar"),className:"editor-post-locked-modal__avatar",width:64,height:64}),(0,Jr.jsxs)("div",{children:[!!s&&(0,Jr.jsxs)(Jr.Fragment,{children:[(0,Jr.jsx)("p",{children:(0,mP.createInterpolateElement)(h?(0,ai.sprintf)((0,ai.__)("<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,ai.__)("Another user now has editing control of this post (<PreviewLink />). Don\u2019t worry, your changes up to this moment have been saved."),{strong:(0,Jr.jsx)("strong",{}),PreviewLink:(0,Jr.jsx)(pu.ExternalLink,{href:m,children:(0,ai.__)("preview")})})}),(0,Jr.jsx)(jCe,{})]}),!s&&(0,Jr.jsxs)(Jr.Fragment,{children:[(0,Jr.jsx)("p",{children:(0,mP.createInterpolateElement)(h?(0,ai.sprintf)((0,ai.__)("<strong>%s</strong> is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),h):(0,ai.__)("Another user is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),{strong:(0,Jr.jsx)("strong",{}),PreviewLink:(0,Jr.jsx)(pu.ExternalLink,{href:m,children:(0,ai.__)("preview")})})}),(0,Jr.jsx)(jCe,{}),(0,Jr.jsx)("p",{children:(0,ai.__)("If you take over, the other user will lose editing control to the post, but their changes will be saved.")})]}),(0,Jr.jsxs)(pu.__experimentalHStack,{className:"editor-post-locked-modal__buttons",justify:"flex-end",children:[!s&&(0,Jr.jsx)(pu.Button,{__next40pxDefaultSize:!0,variant:"tertiary",href:v,children:(0,ai.__)("Take over")}),(0,Jr.jsx)(pu.Button,{__next40pxDefaultSize:!0,variant:"primary",href:b,children:_})]})]})]})})}var UCe=HCe;var GCe=a(j(),1),YCe=a(G(),1),nF=a(Y(),1);var WCe=a(Y(),1);function Vit({children:e}){let{hasPublishAction:t,isPublished:r}=(0,WCe.useSelect)(o=>{let{isCurrentPostPublished:n,getCurrentPost:i}=o(I);return{hasPublishAction:i()._links?.["wp:action-publish"]??!1,isPublished:n()}},[]);return r||!t?null:e}var oF=Vit;var $Y=a(E(),1);function jit(){let e=(0,nF.useSelect)(o=>o(I).getEditedPostAttribute("status"),[]),{editPost:t}=(0,nF.useDispatch)(I),r=()=>{t({status:e==="pending"?"draft":"pending"})};return(0,$Y.jsx)(oF,{children:(0,$Y.jsx)(YCe.CheckboxControl,{label:(0,GCe.__)("Pending review"),checked:e==="pending",onChange:r})})}var qCe=jit;var KCe=a(U(),1),Yp=a(G(),1),Hy=a(j(),1),iF=a(Y(),1),ZCe=a(jn(),1),XCe=a(ae(),1);var Ba=a(E(),1);function zit(){let e=(0,KCe.renderToString)((0,Ba.jsxs)("div",{className:"editor-post-preview-button__interstitial-message",children:[(0,Ba.jsxs)(Yp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96",children:[(0,Ba.jsx)(Yp.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,Ba.jsx)(Yp.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,Ba.jsx)("p",{children:(0,Hy.__)("Generating preview\u2026")})]}));return e+=`
		<style>
			body {
				margin: 0;
			}
			.editor-post-preview-button__interstitial-message {
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: center;
				height: 100vh;
				width: 100vw;
			}
			@-webkit-keyframes paint {
				0% {
					stroke-dashoffset: 0;
				}
			}
			@-moz-keyframes paint {
				0% {
					stroke-dashoffset: 0;
				}
			}
			@-o-keyframes paint {
				0% {
					stroke-dashoffset: 0;
				}
			}
			@keyframes paint {
				0% {
					stroke-dashoffset: 0;
				}
			}
			.editor-post-preview-button__interstitial-message svg {
				width: 192px;
				height: 192px;
				stroke: #555d66;
				stroke-width: 0.75;
			}
			.editor-post-preview-button__interstitial-message svg .outer,
			.editor-post-preview-button__interstitial-message svg .inner {
				stroke-dasharray: 280;
				stroke-dashoffset: 280;
				-webkit-animation: paint 1.5s ease infinite alternate;
				-moz-animation: paint 1.5s ease infinite alternate;
				-o-animation: paint 1.5s ease infinite alternate;
				animation: paint 1.5s ease infinite alternate;
			}
			p {
				text-align: center;
				font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
			}
		</style>
	`,e=(0,ZCe.applyFilters)("editor.PostPreview.interstitialMarkup",e),e}function Hit(e,t){e.write(t),e.title=(0,Hy.__)("Generating preview\u2026"),e.close()}async function Uit(e){try{return e.document}catch{}e.location="about:blank";let t=1e3,r=50,o=Date.now()+t;do{await new Promise(n=>setTimeout(n,r));try{return e.document}catch{}}while(Date.now()<o);return null}async function Wit(e){let t=await Uit(e);t&&Hit(t,zit())}function QCe({forceIsAutosaveable:e,onPreview:t}){let{postId:r,currentPostLink:o,previewLink:n,isSaveable:i,isViewable:s}=(0,iF.useSelect)(f=>{let m=f(I),v=f(XCe.store).getPostType(m.getCurrentPostType("type"))?.viewable??!1;return v?{postId:m.getCurrentPostId(),currentPostLink:m.getCurrentPostAttribute("link"),previewLink:m.getEditedPostPreviewLink(),isSaveable:m.isEditedPostSaveable(),isViewable:v}:{isViewable:v}},[]),{__unstableSaveForPreview:l}=(0,iF.useDispatch)(I);if(!s)return null;let c=`wp-preview-${r}`;return{href:n||o,target:c,disabled:!i,onClick:async f=>{f.preventDefault();let m=window.open("",c);m.focus(),await Wit(m);let h=await l({forceIsAutosaveable:e});m.location=h,t?.()}}}function JCe({forceIsAutosaveable:e,onPreview:t}){let r=QCe({forceIsAutosaveable:e,onPreview:t});return r?(0,Ba.jsx)(Yp.MenuItem,{icon:hs,...r,children:(0,Hy.__)("Preview in new tab")}):null}function jS({className:e,textContent:t,forceIsAutosaveable:r,role:o,onPreview:n}){let i=QCe({forceIsAutosaveable:r,onPreview:n});return i?(0,Ba.jsx)(Yp.Button,{variant:e?void 0:"tertiary",className:e||"editor-post-preview",role:o,size:"compact",accessibleWhenDisabled:!0,...i,children:t||(0,Ba.jsxs)(Ba.Fragment,{children:[(0,Hy._x)("Preview","imperative verb"),(0,Ba.jsx)(Gt,{render:(0,Ba.jsx)("span",{}),children:(0,Hy.__)("(opens in a new tab)")})]})}):null}var rTe=a(G(),1),aF=a(Y(),1);var Ng=a(j(),1),$Ce=a(Y(),1),eTe=a(Te(),1);function sF(){let e=(0,eTe.useViewportMatch)("medium","<"),{isPublished:t,isBeingScheduled:r,isSaving:o,isPublishing:n,hasPublishAction:i,isAutosaving:s,hasNonPostEntityChanges:l,postStatusHasChanged:c,postStatus:u,isPostSavingLocked:d}=(0,$Ce.useSelect)(f=>{let{isCurrentPostPublished:m,isEditedPostBeingScheduled:h,isSavingPost:g,isPublishingPost:v,getCurrentPost:b,isAutosavingPost:_,getPostEdits:y,getEditedPostAttribute:w}=f(I);return{isPublished:m(),isBeingScheduled:h(),isSaving:g(),isPublishing:v(),hasPublishAction:b()._links?.["wp:action-publish"]??!1,isAutosaving:_(),hasNonPostEntityChanges:f(I).hasNonPostEntityChanges(),isPostSavingLocked:f(I).isPostSavingLocked(),postStatusHasChanged:!!y()?.status,postStatus:w("status")}},[]);return n?(0,Ng.__)("Publishing\u2026"):(t||r)&&o&&!s?(0,Ng.__)("Saving\u2026"):i?l&&!d||t||c&&!["future","publish"].includes(u)||!c&&u==="future"?(0,Ng.__)("Save"):r?(0,Ng.__)("Schedule"):(0,Ng.__)("Publish"):e?(0,Ng.__)("Publish"):(0,Ng.__)("Submit for Review")}var eq=a(E(),1),tTe=()=>{};function Git({forceIsDirty:e,isOpen:t,isToggle:r,onSubmit:o=tTe,onToggle:n,setEntitiesSavedStatesCallback:i}){let{hasPublishAction:s,isBeingScheduled:l,isPostSavingLocked:c,isPublishable:u,isPublished:d,isSaveable:f,isSaving:m,isAutoSaving:h,visibility:g,hasNonPostEntityChanges:v,isSavingNonPostEntityChanges:b,postStatus:_,postStatusHasChanged:y,postType:w,postId:S}=(0,aF.useSelect)(z=>{let B=z(I);return{isSaving:B.isSavingPost(),isAutoSaving:B.isAutosavingPost(),isBeingScheduled:B.isEditedPostBeingScheduled(),visibility:B.getEditedPostVisibility(),isSaveable:B.isEditedPostSaveable(),isPostSavingLocked:B.isPostSavingLocked(),isPublishable:B.isEditedPostPublishable(),isPublished:B.isCurrentPostPublished(),hasPublishAction:!!B.getCurrentPost()?._links?.["wp:action-publish"],postType:B.getCurrentPostType(),postId:B.getCurrentPostId(),postStatus:B.getEditedPostAttribute("status"),postStatusHasChanged:B.getPostEdits()?.status,hasNonPostEntityChanges:B.hasNonPostEntityChanges(),isSavingNonPostEntityChanges:B.isSavingNonPostEntityChanges()}},[]),{editPost:x,savePost:C}=(0,aF.useDispatch)(I),A=z=>{x({status:z},{undoIgnore:!0}),C()},k=z=>(...B)=>{if(v&&i){let O=V=>{V&&V.some(W=>W.kind==="postType"&&W.name===w&&W.key===S)&&z(...B)};return i(()=>O),tTe}return z(...B)},R=c||b||(m||!f||!u&&!e)&&!v,M=c||b||(d||m||!f||!u&&!e)&&!v,P="publish";y?P=_:s?g==="private"?P="private":l&&(P="future"):P="pending";let T=()=>{R||(o(),A(P))},N=()=>{M||n()},L={"aria-disabled":R,className:"editor-post-publish-button",isBusy:!h&&m,variant:"primary",onClick:k(T),"aria-haspopup":v?"dialog":void 0},F={"aria-disabled":M,"aria-expanded":t,className:"editor-post-publish-panel__toggle",isBusy:m&&d,variant:"primary",size:"compact",onClick:k(N),"aria-haspopup":v?"dialog":void 0},D=r?F:L;return(0,eq.jsx)(rTe.Button,{...D,className:`${D.className} editor-post-publish-button__button`,size:"compact",children:(0,eq.jsx)(sF,{})})}var zS=Git;var CF=a(j(),1),ZS=a(U(),1),Jy=a(G(),1),TF=a(Y(),1),Lg=a(Te(),1);var QTe=a(ae(),1);var mu=a(j(),1),_P=a(G(),1),VTe=a(Y(),1);var jTe=a(vo(),1),zTe=a(ae(),1),HTe=a(Lt(),1);var HS=a(j(),1),oTe=a(U(),1),US=a(G(),1),nTe=a(Te(),1),cF=a(Y(),1),iTe=a(be(),1);var Uy=a(j(),1),lF=[{label:(0,Uy.__)("Public"),value:"public",description:(0,Uy.__)("Visible to everyone.")},{label:(0,Uy.__)("Private"),value:"private",description:(0,Uy.__)("Only visible to site admins and editors.")},{label:(0,Uy.__)("Password protected"),value:"password",description:(0,Uy.__)("Only visible to those who know the password.")}];var Wy=a(E(),1);function gP({onClose:e}){let t=(0,nTe.useInstanceId)(gP),{status:r,visibility:o,password:n}=(0,cF.useSelect)(d=>({status:d(I).getEditedPostAttribute("status"),visibility:d(I).getEditedPostVisibility(),password:d(I).getEditedPostAttribute("password")})),{editPost:i}=(0,cF.useDispatch)(I),[s,l]=(0,oTe.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,Wy.jsxs)("div",{className:"editor-post-visibility",children:[(0,Wy.jsx)(iTe.__experimentalInspectorPopoverHeader,{title:(0,HS.__)("Visibility"),help:(0,HS.__)("Control how this post is viewed."),onClose:e}),(0,Wy.jsxs)(US.__experimentalVStack,{spacing:4,children:[(0,Wy.jsx)(US.RadioControl,{label:(0,HS.__)("Visibility"),hideLabelFromVision:!0,options:lF,selected:s?"password":o,onChange:c}),s&&(0,Wy.jsx)(US.TextControl,{label:(0,HS.__)("Password"),onChange:u,value:n,placeholder:(0,HS.__)("Use a secure password"),type:"text",id:`editor-post-visibility__password-input-${t}`,maxLength:255})]})]})}var sTe=a(Y(),1);function uF(){return tq()}function tq(){let e=(0,sTe.useSelect)(t=>t(I).getEditedPostVisibility(),[]);return lF.find(t=>t.value===e)?.label}var aTe=a(ln(),1),lTe=a(j(),1),vP=a(Y(),1),cTe=a(be(),1),dF=a(U(),1),uTe=a(ae(),1);var rq=a(E(),1),{PrivatePublishDateTimePicker:Yit}=K(cTe.privateApis);function WS(e){return(0,rq.jsx)(oq,{...e,showPopoverHeaderActions:!0,isCompact:!1})}function oq({onClose:e,showPopoverHeaderActions:t,isCompact:r}){let{postDate:o,postType:n}=(0,vP.useSelect)(h=>({postDate:h(I).getEditedPostAttribute("date"),postType:h(I).getCurrentPostType()}),[]),{editPost:i}=(0,vP.useDispatch)(I),s=h=>i({date:h}),[l,c]=(0,dF.useState)(IT(new Date(o))),u=(0,vP.useSelect)(h=>h(uTe.store).getEntityRecords("postType",n,{status:"publish,future",after:IT(l).toISOString(),before:Uue(l).toISOString(),exclude:[h(I).getCurrentPostId()],per_page:100,_fields:"id,date"}),[l,n]),d=(0,dF.useMemo)(()=>(u||[]).map(({date:h})=>({date:new Date(h)})),[u]),f=(0,aTe.getSettings)(),m=/a(?!\\)/i.test(f.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,rq.jsx)(Yit,{currentDate:o,onChange:s,is12Hour:m,dateOrder:(0,lTe._x)("dmy","date order"),events:d,onMonthPreviewed:h=>c(lde(h)),onClose:e,isCompact:r,showPopoverHeaderActions:t})}var Js=a(j(),1),cc=a(ln(),1),fTe=a(Y(),1);function GS(e){return YS(e)}function YS({full:e=!1}={}){let{date:t,isFloating:r}=(0,fTe.useSelect)(o=>({date:o(I).getEditedPostAttribute("date"),isFloating:o(I).isEditedPostDateFloating()}),[]);return e?pTe(t):qit(t,{isFloating:r})}function pTe(e){let t=(0,cc.getDate)(e),r=Kit(),o=(0,cc.dateI18n)((0,Js._x)("F j, Y g:i\xA0a","post schedule full date format"),t);return(0,Js.isRTL)()?`${r} ${o}`:`${o} ${r}`}function qit(e,{isFloating:t=!1,now:r=new Date}={}){if(!e||t)return(0,Js.__)("Immediately");if(!Zit(r))return pTe(e);let o=(0,cc.getDate)(e);if(dTe(o,r))return(0,Js.sprintf)((0,Js.__)("Today at %s"),(0,cc.dateI18n)((0,Js._x)("g:i\xA0a","post schedule time format"),o));let n=new Date(r);return n.setDate(n.getDate()+1),dTe(o,n)?(0,Js.sprintf)((0,Js.__)("Tomorrow at %s"),(0,cc.dateI18n)((0,Js._x)("g:i\xA0a","post schedule time format"),o)):o.getFullYear()===r.getFullYear()?(0,cc.dateI18n)((0,Js._x)("F j g:i\xA0a","post schedule date format without year"),o):(0,cc.dateI18n)((0,Js._x)("F j, Y g:i\xA0a","post schedule full date format"),o)}function Kit(){let{timezone:e}=(0,cc.getSettings)();return e.abbr&&isNaN(Number(e.abbr))?e.abbr:`UTC${e.offset<0?"":"+"}${e.offsetFormatted}`}function Zit(e){let{timezone:t}=(0,cc.getSettings)(),r=Number(t.offset),o=-1*(e.getTimezoneOffset()/60);return r===o}function dTe(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}var Ky=a(j(),1),xTe=a(U(),1),aq=a(Y(),1),CTe=a(G(),1),gF=a(ae(),1);var Ei=a(j(),1),qy=a(U(),1),mF=a(G(),1);var Yy=a(Y(),1),pF=a(ae(),1),bTe=a(Te(),1),yTe=a(Ol(),1),wTe=a(It(),1);var fF=a(G(),1),mTe=a(Y(),1),hTe=a(ae(),1);var Gy=a(E(),1),Xit=3,Qit={per_page:10,orderby:"count",order:"desc",hide_empty:!0,_fields:"id,name,count",context:"view"};function gTe({onSelect:e,taxonomy:t}){let{_terms:r,showTerms:o}=(0,mTe.useSelect)(i=>{let s=i(hTe.store).getEntityRecords("taxonomy",t.slug,Qit);return{_terms:s,showTerms:s?.length>=Xit}},[t.slug]);if(!o)return null;let n=Exe(r);return(0,Gy.jsxs)("div",{className:"editor-post-taxonomies__flat-term-most-used",children:[(0,Gy.jsx)(fF.BaseControl.VisualLabel,{as:"h3",className:"editor-post-taxonomies__flat-term-most-used-label",children:t.labels.most_used}),(0,Gy.jsx)("ul",{role:"list",className:"editor-post-taxonomies__flat-term-most-used-list",children:n.map(i=>(0,Gy.jsx)("li",{children:(0,Gy.jsx)(fF.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>e(i),children:i.name})},i.id))})]})}var bP=a(E(),1),nq=[],_Te=100,vTe={per_page:_Te,_fields:"id,name",context:"view"},STe=(e,t)=>xS(e).toLowerCase()===xS(t).toLowerCase(),iq=(e,t)=>e.map(r=>t.find(o=>STe(o.name,r))?.id).filter(r=>r!==void 0);function sq({slug:e}){let[t,r]=(0,qy.useState)([]),[o,n]=(0,qy.useState)(""),i=(0,bTe.useDebounce)(n,500),{terms:s,termIds:l,taxonomy:c,hasAssignAction:u,hasCreateAction:d,hasResolvedTerms:f}=(0,Yy.useSelect)(M=>{let{getCurrentPost:P,getEditedPostAttribute:T}=M(I),{getEntityRecords:N,getEntityRecord:L,hasFinishedResolution:F}=M(pF.store),D=P(),z=L("root","taxonomy",e),B=z?T(z.rest_base):nq,O={...vTe,include:B?.join(","),per_page:-1};return{hasCreateAction:z?D._links?.["wp:action-create-"+z.rest_base]??!1:!1,hasAssignAction:z?D._links?.["wp:action-assign-"+z.rest_base]??!1:!1,taxonomy:z,termIds:B,terms:B?.length?N("taxonomy",e,O):nq,hasResolvedTerms:F("getEntityRecords",["taxonomy",e,O])}},[e]),{searchResults:m}=(0,Yy.useSelect)(M=>{let{getEntityRecords:P}=M(pF.store);return{searchResults:o?P("taxonomy",e,{...vTe,search:o}):nq}},[o,e]);(0,qy.useEffect)(()=>{if(f){let M=(s??[]).map(P=>xS(P.name));r(M)}},[s,f]);let h=(0,qy.useMemo)(()=>(m??[]).map(M=>xS(M.name)),[m]),{editPost:g}=(0,Yy.useDispatch)(I),{saveEntityRecord:v}=(0,Yy.useDispatch)(pF.store),{createErrorNotice:b}=(0,Yy.useDispatch)(wTe.store);if(!u)return null;async function _(M){try{let P=await v("taxonomy",e,M,{throwOnError:!0});return xY(P)}catch(P){if(P.code!=="term_exists")throw P;return{id:P.data.term_id,name:M.name}}}function y(M){g({[c.rest_base]:M})}function w(M){let P=[...s??[],...m??[]],T=M.reduce((L,F)=>(L.some(D=>D.toLowerCase()===F.toLowerCase())||L.push(F),L),[]),N=T.filter(L=>!P.find(F=>STe(F.name,L)));if(r(T),N.length===0){y(iq(T,P));return}d&&Promise.all(N.map(L=>_({name:L}))).then(L=>{let F=P.concat(L);y(iq(T,F))}).catch(L=>{b(L.message,{type:"snackbar"}),y(iq(T,P))})}function S(M){if(l.includes(M.id))return;let P=[...l,M.id],T=e==="post_tag"?(0,Ei.__)("Tag"):(0,Ei.__)("Term"),N=(0,Ei.sprintf)((0,Ei._x)("%s added","term"),c?.labels?.singular_name??T);(0,yTe.speak)(N,"assertive"),y(P)}let x=c?.labels?.add_new_item??(e==="post_tag"?(0,Ei.__)("Add Tag"):(0,Ei.__)("Add Term")),C=c?.labels?.singular_name??(e==="post_tag"?(0,Ei.__)("Tag"):(0,Ei.__)("Term")),A=(0,Ei.sprintf)((0,Ei._x)("%s added","term"),C),k=(0,Ei.sprintf)((0,Ei._x)("%s removed","term"),C),R=(0,Ei.sprintf)((0,Ei._x)("Remove %s","term"),C);return(0,bP.jsxs)(se,{direction:"column",gap:"lg",children:[(0,bP.jsx)(mF.FormTokenField,{value:t,suggestions:h,onChange:w,onInputChange:i,maxSuggestions:_Te,label:x,messages:{added:A,removed:k,remove:R}}),(0,bP.jsx)(gTe,{taxonomy:c,onSelect:S})]})}var hF=(0,mF.withFilters)("editor.PostTaxonomyType")(sq);var Zy=a(E(),1),Jit=()=>{let e=(0,aq.useSelect)(n=>n(gF.store).getTaxonomy("post_tag")?.labels,[]),t=e?.add_new_item??(0,Ky.__)("Add tag"),r=e?.name??(0,Ky.__)("Tags"),o=[(0,Ky.__)("Suggestion:"),(0,Zy.jsx)("span",{className:"editor-post-publish-panel__link",children:t},"label")];return(0,Zy.jsxs)(CTe.PanelBody,{initialOpen:!1,title:o,children:[(0,Zy.jsx)("p",{children:(0,Ky.sprintf)((0,Ky.__)("%s help users and search engines navigate your site and find your content. Add a few keywords to describe your post."),r)}),(0,Zy.jsx)(hF,{slug:"post_tag"})]})},$it=()=>{let{postHasTags:e,siteHasTags:t,isPostTypeSupported:r}=(0,aq.useSelect)(n=>{let i=n(I).getCurrentPostType(),s=n(gF.store).getEntityRecord("root","taxonomy","post_tag"),l=s?.types?.includes(i),c=s!==void 0,u=s&&n(I).getEditedPostAttribute(s.rest_base),d=l?!!n(gF.store).getEntityRecords("taxonomy","post_tag",{per_page:1})?.length:!1;return{postHasTags:!!u?.length,siteHasTags:d,isPostTypeSupported:c&&l}},[]),[o]=(0,xTe.useState)(e);return!r||!t||o?null:(0,Zy.jsx)(Jit,{})},TTe=$it;var vF=a(G(),1),bF=a(Y(),1),Xy=a(j(),1),ETe=a(ae(),1);var Mg=a(E(),1),est=(e,t)=>dP.filter(o=>e?.includes(o.id)).find(o=>o.id===t),tst=({suggestedPostFormat:e,suggestionText:t,onUpdatePostFormat:r})=>(0,Mg.jsx)(vF.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>r(e),children:t});function PTe(){let{currentPostFormat:e,suggestion:t}=(0,bF.useSelect)(i=>{let{getEditedPostAttribute:s,getSuggestedPostFormat:l}=i(I),c=i(ETe.store).getThemeSupports().formats??[];return{currentPostFormat:s("format"),suggestion:est(c,l())}},[]),{editPost:r}=(0,bF.useDispatch)(I),o=i=>r({format:i}),n=[(0,Xy.__)("Suggestion:"),(0,Mg.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Xy.__)("Use a post format")},"label")];return!t||t.id===e?null:(0,Mg.jsxs)(vF.PanelBody,{initialOpen:!1,title:n,children:[(0,Mg.jsx)("p",{children:(0,Xy.__)("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,Mg.jsx)("p",{children:(0,Mg.jsx)(tst,{onUpdatePostFormat:o,suggestedPostFormat:t.id,suggestionText:(0,Xy.sprintf)((0,Xy.__)('Apply the "%1$s" format.'),t.caption)})})]})}var wF=a(j(),1),MTe=a(Y(),1),FTe=a(G(),1),uq=a(ae(),1),_F=a(U(),1);var ci=a(j(),1),qp=a(U(),1),ITe=a(It(),1),po=a(G(),1),qS=a(Y(),1),OTe=a(Te(),1),yP=a(ae(),1),lq=a(Ol(),1),NTe=a(Lt(),1);var li=a(E(),1),{normalizeTextString:kTe}=K(po.privateApis),{RECEIVE_INTERMEDIATE_RESULTS:rst}=K(yP.privateApis),RTe={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view",[rst]:!0},ost=8,ATe=[];function nst(e,t){let r=i=>t.indexOf(i.id)!==-1?!0:i.children===void 0?!1:i.children.map(r).filter(s=>s).length>0,o=(i,s)=>{let l=r(i),c=r(s);return l===c?0:l&&!c?-1:!l&&c?1:0},n=[...e];return n.sort(o),n}function ist(e,t,r){return e.find(o=>(!o.parent&&!t||parseInt(o.parent)===parseInt(t))&&o.name.toLowerCase()===r.toLowerCase())}function sst(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)),kTe(o.name).indexOf(kTe(e))!==-1||o.children.length>0?o:!1};return t}function cq({slug:e}){let[t,r]=(0,qp.useState)(!1),[o,n]=(0,qp.useState)(""),[i,s]=(0,qp.useState)(""),[l,c]=(0,qp.useState)(!1),[u,d]=(0,qp.useState)(""),[f,m]=(0,qp.useState)([]),h=(0,OTe.useDebounce)(lq.speak,500),{hasCreateAction:g,hasAssignAction:v,terms:b,loading:_,availableTerms:y,taxonomy:w}=(0,qS.useSelect)(re=>{let{getCurrentPost:fe,getEditedPostAttribute:pe}=re(I),{getEntityRecord:$,getEntityRecords:te,isResolving:de}=re(yP.store),ve=$("root","taxonomy",e),we=fe();return{hasCreateAction:ve?!!we._links?.["wp:action-create-"+ve.rest_base]:!1,hasAssignAction:ve?!!we._links?.["wp:action-assign-"+ve.rest_base]:!1,terms:ve?pe(ve.rest_base):ATe,loading:de("getEntityRecords",["taxonomy",e,RTe]),availableTerms:te("taxonomy",e,RTe)||ATe,taxonomy:ve}},[e]),{editPost:S}=(0,qS.useDispatch)(I),{saveEntityRecord:x}=(0,qS.useDispatch)(yP.store),C=(0,qp.useMemo)(()=>nst(a6(y),b),[y]),{createErrorNotice:A}=(0,qS.useDispatch)(ITe.store);if(!v)return null;let k=re=>x("taxonomy",e,re,{throwOnError:!0}),R=re=>{S({[w.rest_base]:re})},M=re=>{let pe=b.includes(re)?b.filter($=>$!==re):[...b,re];R(pe)},P=re=>{n(re)},T=re=>{s(re)},N=()=>{c(!l)},L=async re=>{if(re.preventDefault(),o===""||t)return;let fe=ist(y,i,o);if(fe){b.some(de=>de===fe.id)||R([...b,fe.id]),n(""),s("");return}r(!0);let pe;try{pe=await k({name:o,parent:i||void 0})}catch(de){A(de.message,{type:"snackbar"});return}let $=e==="category"?(0,ci.__)("Category"):(0,ci.__)("Term"),te=(0,ci.sprintf)((0,ci._x)("%s added","term"),w?.labels?.singular_name??$);(0,lq.speak)(te,"assertive"),r(!1),n(""),s(""),R([...b,pe.id])},F=re=>{let fe=C.map(sst(re)).filter(de=>de),pe=de=>{let ve=0;for(let we=0;we<de.length;we++)ve++,de[we].children!==void 0&&(ve+=pe(de[we].children));return ve};d(re),m(fe);let $=pe(fe),te=(0,ci.sprintf)((0,ci._n)("%d result found.","%d results found.",$),$);h(te,"assertive")},D=re=>re.map(fe=>(0,li.jsxs)("div",{className:"editor-post-taxonomies__hierarchical-terms-choice",children:[(0,li.jsx)(po.CheckboxControl,{checked:b.indexOf(fe.id)!==-1,onChange:()=>{let pe=parseInt(fe.id,10);M(pe)},label:(0,NTe.decodeEntities)(fe.name)}),!!fe.children.length&&(0,li.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices",children:D(fe.children)})]},fe.id)),z=(re,fe,pe)=>w?.labels?.[re]??(e==="category"?fe:pe),B=z("add_new_item",(0,ci.__)("Add Category"),(0,ci.__)("Add Term")),O=z("new_item_name",(0,ci.__)("Add Category"),(0,ci.__)("Add Term")),V=z("parent_item",(0,ci.__)("Parent Category"),(0,ci.__)("Parent Term")),W=`\u2014 ${V} \u2014`,q=B,Z=w?.labels?.search_items??(0,ci.__)("Search Terms"),Q=w?.name??(0,ci.__)("Terms"),ce=y.length>=ost;return(0,li.jsxs)(po.Flex,{direction:"column",gap:"4",children:[ce&&!_&&(0,li.jsx)(po.SearchControl,{label:Z,placeholder:Z,value:u,onChange:F}),_&&(0,li.jsx)(po.Flex,{justify:"center",style:{height:"40px"},children:(0,li.jsx)(po.Spinner,{})}),(0,li.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",tabIndex:"0",role:"group","aria-label":Q,children:D(u!==""?f:C)}),!_&&g&&(0,li.jsx)(po.FlexItem,{children:(0,li.jsx)(po.Button,{__next40pxDefaultSize:!0,onClick:N,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":l,variant:"link",children:B})}),l&&(0,li.jsx)("form",{onSubmit:L,children:(0,li.jsxs)(po.Flex,{direction:"column",gap:"4",children:[(0,li.jsx)(po.TextControl,{className:"editor-post-taxonomies__hierarchical-terms-input",label:O,value:o,onChange:P,required:!0}),!!y.length&&(0,li.jsx)(po.TreeSelect,{label:V,noOptionLabel:W,onChange:T,selectedId:i,tree:C}),(0,li.jsx)(po.FlexItem,{children:(0,li.jsx)(po.Button,{__next40pxDefaultSize:!0,variant:"secondary",type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit",children:q})})]})})]})}var yF=(0,po.withFilters)("editor.PostTaxonomyType")(cq);var KS=a(E(),1);function ast(){let{hasNoCategory:e,hasSiteCategories:t}=(0,MTe.useSelect)(i=>{let s=i(I).getCurrentPostType(),{canUser:l,getEntityRecord:c}=i(uq.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(b=>b===s),h=u&&i(I).getEditedPostAttribute(u.rest_base),g=m?!!i(uq.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,_F.useState)(!1);if((0,_F.useEffect)(()=>{e&&o(!0)},[e]),!r||!t)return null;let n=[(0,wF.__)("Suggestion:"),(0,KS.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,wF.__)("Assign a category")},"label")];return(0,KS.jsxs)(FTe.PanelBody,{initialOpen:!1,title:n,children:[(0,KS.jsx)("p",{children:(0,wF.__)("Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.")}),(0,KS.jsx)(yF,{slug:"category"})]})}var DTe=ast;var Zd=a(G(),1),wP=a(Y(),1),Fg=a(j(),1),Qy=a(be(),1),SF=a(U(),1);var uc=a(E(),1),{mediaSideloadFromUrlKey:lst}=K(Qy.privateApis);function LTe(e){let t=[];return e.forEach(r=>{t.push(r),t.push(...LTe(r.innerBlocks))}),t}function cst(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 dq(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 ust({clientId:e,alt:t,url:r}){let{selectBlock:o}=(0,wP.useDispatch)(Qy.store);return(0,uc.jsx)(Zd.__unstableMotion.img,{tabIndex:0,role:"button","aria-label":(0,Fg.__)("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 BTe(){let[e,t]=(0,SF.useState)(!1),[r,o]=(0,SF.useState)(!1),[n,i]=(0,SF.useState)(!1),{editorBlocks:s,mediaSideloadFromUrl:l}=(0,wP.useSelect)(h=>({editorBlocks:h(Qy.store).getBlocks(),mediaSideloadFromUrl:h(Qy.store).getSettings()[lst]}),[]),c=LTe(s).filter(h=>cst(h)),{updateBlockAttributes:u}=(0,wP.useDispatch)(Qy.store);if(!l||!c.length)return null;let d=[(0,Fg.__)("Suggestion:"),(0,uc.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Fg.__)("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:b}=dq(v);return b})),g=Object.fromEntries([...h].map(v=>{let b=new Promise((_,y)=>{l({url:v,onSuccess:w=>_(w),onError:()=>y()})});return[v,b]}));Promise.allSettled(c.map(v=>{let{url:b}=dq(v);return g[b].then(_=>f(v,_)).then(()=>o(!0)).catch(()=>i(!0))})).finally(()=>{t(!1)})}return(0,uc.jsxs)(Zd.PanelBody,{initialOpen:!0,title:d,children:[(0,uc.jsx)("p",{children:(0,Fg.__)("Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.")}),(0,uc.jsxs)("div",{style:{display:"inline-flex",flexWrap:"wrap",gap:"8px"},children:[(0,uc.jsx)(Zd.__unstableAnimatePresence,{onExitComplete:()=>o(!1),children:c.map(h=>{let{url:g,alt:v}=dq(h);return(0,uc.jsx)(ust,{clientId:h.clientId,url:g,alt:v},h.clientId)})}),e||r?(0,uc.jsx)(Zd.Spinner,{}):(0,uc.jsx)(Zd.Button,{size:"compact",variant:"primary",onClick:m,children:(0,Fg._x)("Upload","verb")})]}),n&&(0,uc.jsx)("p",{children:(0,Fg.__)("Upload failed, try again.")})]})}var Nr=a(E(),1);function dst({children:e}){let{isBeingScheduled:t,isRequestingSiteIcon:r,hasPublishAction:o,siteIconUrl:n,siteTitle:i,siteHome:s}=(0,VTe.useSelect)(d=>{let{getCurrentPost:f,isEditedPostBeingScheduled:m}=d(I),{getEntityRecord:h,isResolving:g}=d(zTe.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,jTe.filterURLForDisplay)(v.home)}},[]),l=(0,Nr.jsx)(_P.Icon,{className:"components-site-icon",size:"36px",icon:u8});n&&(l=(0,Nr.jsx)("img",{alt:(0,mu.__)("Site Icon"),className:"components-site-icon",src:n})),r&&(l=null);let c,u;return o?t?(c=(0,mu.__)("Are you ready to schedule?"),u=(0,mu.__)("Your work will be published at the specified date and time.")):(c=(0,mu.__)("Are you ready to publish?"),u=(0,mu.__)("Double-check your settings before publishing.")):(c=(0,mu.__)("Are you ready to submit for review?"),u=(0,mu.__)("Your work will be reviewed and then approved.")),(0,Nr.jsxs)("div",{className:"editor-post-publish-panel__prepublish",children:[(0,Nr.jsx)("div",{children:(0,Nr.jsx)("strong",{children:c})}),(0,Nr.jsx)("p",{children:u}),(0,Nr.jsxs)("div",{className:"components-site-card",children:[l,(0,Nr.jsxs)("div",{className:"components-site-info",children:[(0,Nr.jsx)("span",{className:"components-site-name",children:(0,HTe.decodeEntities)(i)||(0,mu.__)("(Untitled)")}),(0,Nr.jsx)("span",{className:"components-site-home",children:s})]})]}),(0,Nr.jsx)(BTe,{}),o&&(0,Nr.jsxs)(Nr.Fragment,{children:[(0,Nr.jsx)(_P.PanelBody,{initialOpen:!1,title:[(0,mu.__)("Visibility:"),(0,Nr.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Nr.jsx)(uF,{})},"label")],children:(0,Nr.jsx)(gP,{})}),(0,Nr.jsx)(_P.PanelBody,{initialOpen:!1,title:[(0,mu.__)("Publish:"),(0,Nr.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Nr.jsx)(GS,{})},"label")],children:(0,Nr.jsx)(WS,{})})]}),(0,Nr.jsx)(PTe,{}),(0,Nr.jsx)(TTe,{}),(0,Nr.jsx)(DTe,{}),e]})}var UTe=dst;var gu=a(G(),1),hu=a(j(),1),Dg=a(U(),1),YTe=a(Y(),1),xF=a(vo(),1),qTe=a(Lt(),1),KTe=a(Te(),1),ZTe=a(ae(),1);var qo=a(E(),1),WTe="%postname%",GTe="%pagename%",fst=e=>{let{slug:t}=e;return e.permalink_template.includes(WTe)?e.permalink_template.replace(WTe,t):e.permalink_template.includes(GTe)?e.permalink_template.replace(GTe,t):e.permalink_template};function pst({text:e}){let[t,r]=(0,Dg.useState)(!1),o=(0,Dg.useRef)(),n=(0,KTe.useCopyToClipboard)(e,()=>{r(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(!1)},4e3)});return(0,Dg.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]),(0,qo.jsx)(gu.Button,{__next40pxDefaultSize:!0,variant:"secondary",ref:n,children:t?(0,hu.__)("Copied!"):(0,hu.__)("Copy")})}function XTe({focusOnMount:e,children:t}){let{post:r,postType:o,isScheduled:n}=(0,YTe.useSelect)(m=>{let{getEditedPostAttribute:h,getCurrentPost:g,isCurrentPostScheduled:v}=m(I),{getPostType:b}=m(ZTe.store);return{post:g(),postType:b(h("type")),isScheduled:v()}},[]),i=o?.labels?.singular_name,s=o?.labels?.view_item,l=o?.labels?.add_new_item,c=r.status==="future"?fst(r):r.link,u=(0,xF.addQueryArgs)("post-new.php",{post_type:r.type}),d=(0,Dg.useCallback)(m=>{e&&m&&m.focus()},[e]),f=n?(0,qo.jsxs)(qo.Fragment,{children:[(0,hu.__)("is now scheduled. It will go live on")," ",(0,qo.jsx)(GS,{}),"."]}):(0,hu.__)("is now live.");return(0,qo.jsxs)("div",{className:"post-publish-panel__postpublish",children:[(0,qo.jsxs)(gu.PanelBody,{className:"post-publish-panel__postpublish-header",children:[(0,qo.jsx)(gu.ExternalLink,{ref:d,href:c,children:(0,qTe.decodeEntities)(r.title)||(0,hu.__)("(no title)")})," ",f]}),(0,qo.jsxs)(gu.PanelBody,{children:[(0,qo.jsx)("p",{className:"post-publish-panel__postpublish-subheader",children:(0,qo.jsx)("strong",{children:(0,hu.__)("What\u2019s next?")})}),(0,qo.jsxs)("div",{className:"post-publish-panel__postpublish-post-address-container",children:[(0,qo.jsx)(gu.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:(0,hu.sprintf)((0,hu.__)("%s address"),i),value:(0,xF.safeDecodeURIComponent)(c),onFocus:m=>m.target.select()}),(0,qo.jsx)("div",{className:"post-publish-panel__postpublish-post-address__copy-button-wrap",children:(0,qo.jsx)(pst,{text:c})})]}),(0,qo.jsxs)("div",{className:"post-publish-panel__postpublish-buttons",children:[!n&&(0,qo.jsxs)(gu.Button,{variant:"primary",href:c,__next40pxDefaultSize:!0,icon:hs,iconPosition:"right",target:"_blank",children:[s,(0,qo.jsx)(Gt,{render:(0,qo.jsx)("span",{}),children:(0,hu.__)("(opens in a new tab)")})]}),(0,qo.jsx)(gu.Button,{variant:n?"primary":"secondary",__next40pxDefaultSize:!0,href:u,children:l})]})]}),t]})}var _n=a(E(),1);function EF({forceIsDirty:e,onClose:t,PostPublishExtension:r,PrePublishExtension:o,...n}){let{hasPublishAction:i,isPostTypeViewable:s,isBeingScheduled:l,isDirty:c,isPublished:u,isPublishSidebarEnabled:d,isSaving:f,isSavingNonPostEntityChanges:m,isScheduled:h,currentPostId:g}=(0,TF.useSelect)(M=>{let{getPostType:P}=M(QTe.store),{getCurrentPost:T,getCurrentPostId:N,getEditedPostAttribute:L,isCurrentPostPublished:F,isCurrentPostScheduled:D,isEditedPostBeingScheduled:z,isEditedPostDirty:B,isAutosavingPost:O,isSavingPost:V,isSavingNonPostEntityChanges:W,isPublishSidebarEnabled:q}=M(I),Z=P(L("type"));return{hasPublishAction:T()._links?.["wp:action-publish"]??!1,isPostTypeViewable:Z?.viewable,isBeingScheduled:z(),isDirty:B(),isPublished:F(),isPublishSidebarEnabled:q(),isSaving:V()&&!O(),isSavingNonPostEntityChanges:W(),isScheduled:D(),currentPostId:N()}},[]),{disablePublishSidebar:v,enablePublishSidebar:b}=(0,TF.useDispatch)(I),_=(0,ZS.useRef)(null),y=(0,Lg.useMergeRefs)([(0,Lg.useFocusReturn)(),(0,Lg.useConstrainedTabbing)()]);(0,ZS.useEffect)(()=>{_.current?.focus()},[]);let w=(0,ZS.useRef)(g),S=(0,Lg.useEvent)(t);(0,ZS.useEffect)(()=>{let M=g!==w.current;w.current=g,(M||u&&!f&&c)&&S()},[u,f,c,g,S]);function x(){d?v():b()}function C(){(!i||!s)&&t()}let A=u||h&&l,k=!A&&!f,R=A&&!f;return(0,_n.jsxs)("div",{ref:y,tabIndex:-1,className:"editor-post-publish-panel",...n,children:[(0,_n.jsx)("div",{className:"editor-post-publish-panel__header",children:R?(0,_n.jsx)(Jy.Button,{size:"compact",onClick:t,icon:Mi,label:(0,CF.__)("Close panel")}):(0,_n.jsxs)(_n.Fragment,{children:[(0,_n.jsx)("div",{className:"editor-post-publish-panel__header-cancel-button",children:(0,_n.jsx)(Jy.Button,{ref:_,accessibleWhenDisabled:!0,disabled:m,onClick:t,variant:"secondary",size:"compact",children:(0,CF.__)("Cancel")})}),(0,_n.jsx)("div",{className:"editor-post-publish-panel__header-publish-button",children:(0,_n.jsx)(zS,{onSubmit:C,forceIsDirty:e})})]})}),(0,_n.jsxs)("div",{className:"editor-post-publish-panel__content",children:[k&&(0,_n.jsx)(UTe,{children:o&&(0,_n.jsx)(o,{})}),R&&(0,_n.jsx)(XTe,{focusOnMount:!0,children:r&&(0,_n.jsx)(r,{})}),f&&(0,_n.jsx)(Jy.Spinner,{})]}),(0,_n.jsx)("div",{className:"editor-post-publish-panel__footer",children:(0,_n.jsx)(Jy.CheckboxControl,{label:(0,CF.__)("Always show pre-publish checks."),checked:d,onChange:x})})]})}var OF=a(G(),1),NF=a(Te(),1),MF=a(Y(),1),FF=a(U(),1),$y=a(j(),1);var oEe=a(Mo(),1),nEe=a(Dt(),1);var bl=a(G(),1),Sr=a(j(),1),IF=a(Y(),1),SP=a(U(),1),eEe=a(ae(),1),tEe=a(be(),1),rEe=a(Te(),1);var fq=a(j(),1),$Te=a(G(),1),kF=a(Y(),1);var JTe=a(Y(),1);function PF({children:e}){let{hasStickyAction:t,postType:r}=(0,JTe.useSelect)(o=>({hasStickyAction:o(I).getCurrentPost()._links?.["wp:action-sticky"]??!1,postType:o(I).getCurrentPostType()}),[]);return r!=="post"||!t?null:e}var pq=a(E(),1);function RF(){let e=(0,kF.useSelect)(r=>r(I).getEditedPostAttribute("sticky")??!1,[]),{editPost:t}=(0,kF.useDispatch)(I);return(0,pq.jsx)(PF,{children:(0,pq.jsx)($Te.CheckboxControl,{className:"editor-post-sticky__checkbox-control",label:(0,fq.__)("Sticky"),help:(0,fq.__)("Pin this post to the top of the blog."),checked:e,onChange:()=>t({sticky:!e})})})}var Sn=a(E(),1),AF={"auto-draft":{label:(0,Sr.__)("Draft"),icon:m0},draft:{label:(0,Sr.__)("Draft"),icon:m0},pending:{label:(0,Sr.__)("Pending"),icon:S1},private:{label:(0,Sr.__)("Private"),icon:b1},future:{label:(0,Sr.__)("Scheduled"),icon:hm},publish:{label:(0,Sr.__)("Published"),icon:fv}},mq=[{label:(0,Sr.__)("Draft"),value:"draft",description:(0,Sr.__)("Not ready to publish.")},{label:(0,Sr.__)("Pending"),value:"pending",description:(0,Sr.__)("Waiting for review before publishing.")},{label:(0,Sr.__)("Private"),value:"private",description:(0,Sr.__)("Only visible to site admins and editors.")},{label:(0,Sr.__)("Scheduled"),value:"future",description:(0,Sr.__)("Publish automatically on a chosen date.")},{label:(0,Sr.__)("Published"),value:"publish",description:(0,Sr.__)("Visible to everyone.")}];function hq(){let{status:e,date:t,password:r,postId:o,postType:n,canEdit:i}=(0,IF.useSelect)(b=>{let{getEditedPostAttribute:_,getCurrentPostId:y,getCurrentPostType:w,getCurrentPost:S}=b(I);return{status:_("status"),date:_("date"),password:_("password"),postId:y(),postType:w(),canEdit:S()._links?.["wp:action-publish"]??!1}},[]),[s,l]=(0,SP.useState)(!!r),c=(0,rEe.useInstanceId)(hq,"editor-change-status__password-input"),{editEntityRecord:u}=(0,IF.useDispatch)(eEe.store),[d,f]=(0,SP.useState)(null),m=(0,SP.useMemo)(()=>({anchor:d,"aria-label":(0,Sr.__)("Status & visibility"),headerTitle:(0,Sr.__)("Status & visibility"),placement:"left-start",offset:36,shift:!0}),[d]);if(pm.includes(n))return null;let h=({status:b=e,password:_=r,date:y=t})=>{u("postType",n,o,{status:b,date:y,password:_})},g=b=>{l(b),b||h({password:""})},v=b=>{let _=t,y=r;e==="future"&&new Date(t)>new Date&&(_=null),b==="private"&&r&&(y=""),h({status:b,date:_,password:y})};return(0,Sn.jsx)(fr,{label:(0,Sr.__)("Status"),ref:f,children:i?(0,Sn.jsx)(bl.Dropdown,{className:"editor-post-status",contentClassName:"editor-change-status__content",popoverProps:m,focusOnMount:!0,renderToggle:({onToggle:b,isOpen:_})=>(0,Sn.jsx)(bl.Button,{className:"editor-post-status__toggle",variant:"tertiary",size:"compact",onClick:b,icon:AF[e]?.icon,"aria-label":(0,Sr.sprintf)((0,Sr.__)("Change status: %s"),AF[e]?.label),"aria-expanded":_,children:AF[e]?.label}),renderContent:({onClose:b})=>(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)(tEe.__experimentalInspectorPopoverHeader,{title:(0,Sr.__)("Status & visibility"),onClose:b}),(0,Sn.jsx)("form",{onSubmit:_=>{_.preventDefault(),b()},children:(0,Sn.jsxs)(bl.__experimentalVStack,{spacing:4,children:[(0,Sn.jsx)(bl.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,Sr.__)("Status"),options:mq,onChange:v,selected:e==="auto-draft"?"draft":e}),e==="future"&&(0,Sn.jsx)("div",{className:"editor-change-status__publish-date-wrapper",children:(0,Sn.jsx)(oq,{showPopoverHeaderActions:!1,isCompact:!0})}),e!=="private"&&(0,Sn.jsxs)(bl.__experimentalVStack,{as:"fieldset",spacing:4,className:"editor-change-status__password-fieldset",children:[(0,Sn.jsx)(bl.CheckboxControl,{label:(0,Sr.__)("Password protected"),help:(0,Sr.__)("Only visible to those who know the password."),checked:s,onChange:g}),s&&(0,Sn.jsx)("div",{className:"editor-change-status__password-input",children:(0,Sn.jsx)(bl.TextControl,{label:(0,Sr.__)("Password"),onChange:_=>h({password:_}),value:r,placeholder:(0,Sr.__)("Use a secure password"),type:"text",id:c,maxLength:255})})]}),(0,Sn.jsx)(RF,{})]})})]})}):(0,Sn.jsx)("div",{className:"editor-post-status is-read-only",children:AF[e]?.label})})}var DF=a(E(),1);function LF({forceIsDirty:e}){let[t,r]=(0,FF.useState)(!1),o=(0,NF.useViewportMatch)("small"),{isAutosaving:n,isDirty:i,isNew:s,isPublished:l,isSaveable:c,isSaving:u,isSavingLocked:d,isSavingNonPostEntityChanges:f,isScheduled:m,hasPublishAction:h,showIconLabels:g,postStatus:v,postStatusHasChanged:b,postType:_}=(0,MF.useSelect)(T=>{let N=T(I),{get:L}=T(nEe.store);return{isAutosaving:N.isAutosavingPost(),isDirty:e||N.isEditedPostDirty(),isNew:N.isEditedPostNew(),isPublished:N.isCurrentPostPublished(),isSaving:N.isSavingPost(),isSaveable:N.isEditedPostSaveable(),isSavingLocked:N.isPostSavingLocked(),isSavingNonPostEntityChanges:N.isSavingNonPostEntityChanges(),isScheduled:N.isCurrentPostScheduled(),hasPublishAction:!!N.getCurrentPost()?._links?.["wp:action-publish"],showIconLabels:L("core","showIconLabels"),postStatus:N.getEditedPostAttribute("status"),postStatusHasChanged:!!N.getPostEdits()?.status,postType:N.getCurrentPostType()}},[e]),y=v==="pending",{savePost:w}=(0,MF.useDispatch)(I),S=(0,NF.usePrevious)(u);if((0,FF.useEffect)(()=>{let T;return S&&!u&&(r(!0),T=setTimeout(()=>{r(!1)},1e3)),()=>clearTimeout(T)},[u]),_===Pl||!h&&y)return null;let x=!["pending","draft","auto-draft"].includes(v)&&mq.map(({value:T})=>T).includes(v);if(l||m||x||b&&["pending","draft"].includes(v))return null;let C=y?(0,$y.__)("Save as pending"):(0,$y.__)("Save draft"),A=(0,$y.__)("Save"),k=t||!s&&!i,R=u||k,M=u||k||!c||d||f,P;return u?P=n?(0,$y.__)("Autosaving"):(0,$y.__)("Saving"):k?P=(0,$y.__)("Saved"):o?P=C:g&&(P=A),(0,DF.jsxs)(OF.Button,{className:c||u?J({"editor-post-save-draft":!R,"editor-post-saved-state":R,"is-saving":u,"is-autosaving":n,"is-saved":k,[(0,OF.__unstableGetAnimateClassName)({type:"loading"})]:u}):void 0,onClick:M?void 0:()=>w(),shortcut:M?void 0:oEe.displayShortcut.primary("s"),variant:"tertiary",size:"compact",icon:o?void 0:wB,label:P||C,"aria-disabled":M,children:[R&&(0,DF.jsx)(Cn,{icon:k?Io:SB}),P]})}var iEe=a(Y(),1);function BF({children:e}){return(0,iEe.useSelect)(r=>r(I).getCurrentPost()._links?.["wp:action-publish"]??!1,[])?e:null}var VF=a(G(),1),QS=a(j(),1),jF=a(U(),1),sEe=a(Y(),1);var XS=a(E(),1);function zF(){let[e,t]=(0,jF.useState)(null),r=(0,sEe.useSelect)(s=>s(I).getCurrentPostType(),[]),o=(0,jF.useMemo)(()=>({anchor:e,"aria-label":(0,QS.__)("Change publish date"),placement:"left-start",offset:36,shift:!0}),[e]),n=YS(),i=YS({full:!0});return pm.includes(r)?null:(0,XS.jsx)(BF,{children:(0,XS.jsx)(fr,{label:(0,QS.__)("Publish"),ref:t,children:(0,XS.jsx)(VF.Dropdown,{popoverProps:o,focusOnMount:!0,className:"editor-post-schedule__panel-dropdown",contentClassName:"editor-post-schedule__dialog",renderToggle:({onToggle:s,isOpen:l})=>(0,XS.jsx)(VF.Button,{size:"compact",className:"editor-post-schedule__dialog-toggle",variant:"tertiary",tooltipPosition:"middle left",onClick:s,"aria-label":(0,QS.sprintf)((0,QS.__)("Change date: %s"),n),label:i,showTooltip:n!==i,"aria-expanded":l,children:n}),renderContent:({onClose:s})=>(0,XS.jsx)(WS,{onClose:s})})})})}var HF=a(G(),1),JS=a(j(),1),UF=a(Y(),1),aEe=a(U(),1),lEe=a(qa(),1);var e0=a(E(),1);function cEe(){(0,lEe.default)("wp.editor.PostSwitchToDraftButton",{since:"6.7",version:"6.9"});let[e,t]=(0,aEe.useState)(!1),{editPost:r,savePost:o}=(0,UF.useDispatch)(I),{isSaving:n,isPublished:i,isScheduled:s}=(0,UF.useSelect)(f=>{let{isSavingPost:m,isCurrentPostPublished:h,isCurrentPostScheduled:g}=f(I);return{isSaving:m(),isPublished:h(),isScheduled:g()}},[]),l=n||!i&&!s,c,u;i?(c=(0,JS.__)("Are you sure you want to unpublish this post?"),u=(0,JS.__)("Unpublish")):s&&(c=(0,JS.__)("Are you sure you want to unschedule this post?"),u=(0,JS.__)("Unschedule"));let d=()=>{t(!1),r({status:"draft"}),o()};return(0,e0.jsxs)(e0.Fragment,{children:[(0,e0.jsx)(HF.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,JS.__)("Switch to draft")}),(0,e0.jsx)(HF.__experimentalConfirmDialog,{isOpen:e,onConfirm:d,onCancel:()=>t(!1),confirmButtonText:u,children:c})]})}var uEe=a(Y(),1),xP=a(j(),1);var gq=a(E(),1);function WF(){let{syncStatus:e,postType:t}=(0,uEe.useSelect)(r=>{let{getEditedPostAttribute:o}=r(I);return{syncStatus:o("meta")?.wp_pattern_sync_status==="unsynced"?"unsynced":o("wp_pattern_sync_status"),postType:o("type")}});return t!=="wp_block"?null:(0,gq.jsx)(fr,{label:(0,xP.__)("Sync status"),children:(0,gq.jsx)("div",{className:"editor-post-sync-status__value",children:e==="unsynced"?(0,xP._x)("Not synced","pattern (singular)"):(0,xP._x)("Synced","pattern (singular)")})})}var dEe=a(U(),1),fEe=a(Y(),1),pEe=a(ae(),1);var vq=a(E(),1),mst=e=>e;function hst({taxonomyWrapper:e=mst}){let{postType:t,taxonomies:r}=(0,fEe.useSelect)(n=>({postType:n(I).getCurrentPostType(),taxonomies:n(pEe.store).getEntityRecords("root","taxonomy")}),[]);return(r??[]).filter(n=>n.types.includes(t)&&n.visibility?.show_ui).map(n=>{let i=n.hierarchical?yF:hF;return(0,vq.jsx)(dEe.Fragment,{children:e((0,vq.jsx)(i,{slug:n.slug}),n)},`taxonomy-${n.slug}`)})}var $S=hst;var mEe=a(Y(),1),hEe=a(ae(),1);function GF({children:e}){return(0,mEe.useSelect)(r=>{let o=r(I).getCurrentPostType();return r(hEe.store).getEntityRecords("root","taxonomy")?.some(i=>i.types.includes(o))},[])?e:null}var gEe=a(G(),1),YF=a(Y(),1);var CP=a(E(),1);function gst({taxonomy:e,children:t}){let r=e?.slug,o=r?`taxonomy-panel-${r}`:"",{isEnabled:n,isOpened:i}=(0,YF.useSelect)(c=>{let{isEditorPanelEnabled:u,isEditorPanelOpened:d}=c(I);return{isEnabled:r?u(o):!1,isOpened:r?d(o):!1}},[o,r]),{toggleEditorPanelOpened:s}=(0,YF.useDispatch)(I);if(!n)return null;let l=e?.labels?.menu_name;return l?(0,CP.jsx)(gEe.PanelBody,{title:l,opened:i,onToggle:()=>s(o),children:t}):null}function qF(){return(0,CP.jsx)(GF,{children:(0,CP.jsx)($S,{taxonomyWrapper:(e,t)=>(0,CP.jsx)(gst,{taxonomy:t,children:e})})})}var LEe=a(MEe(),1),ex=a(U(),1),_q=a(j(),1),BEe=a(ae(),1),QF=a(Y(),1),VEe=a(Te(),1);var FEe=1e3;function DEe(e,t){if(Math.max(e.length,t.length)<=FEe)return _G(e,t);let o=0,n=Math.min(e.length,t.length);for(;o<n&&e[o]===t[o];)o++;let i=e.length,s=t.length;for(;i>o&&s>o&&e[i-1]===t[s-1];)i--,s--;let l=e.slice(o,i),c=t.slice(o,s),u=Math.max(l.length,c.length),d;return u<=FEe?d=_G(l,c):d=q0e(l,c),o>0&&d.unshift({value:e.slice(0,o)}),i<e.length&&d.push({value:e.slice(i)}),d}function Pst(e,t){return Math.max(0,Math.min(t.length,e))}function kst(e,t,r){let o=e.slice(0,r),n=1,i=o.length,s;for(;n<=i;){let l=Math.floor((n+i)/2),c=t.indexOf(o.slice(o.length-l));c===-1?i=l-1:(s=c+l,n=l+1)}return s}function wq(e,t,r,o){let n=0,i=0,s=e;for(let l=0;l<t.length;l++){let c=t[l];if(!c.added&&!c.removed){n+=c.value.length,i+=c.value.length;continue}let u=n,d=i,f=0,m=0;for(;l<t.length&&(t[l].added||t[l].removed);)t[l].removed?f+=t[l].value.length:m+=t[l].value.length,l++;l--;let h=u+f,g=d+m;if(e<u)break;if(f===0)s+=m;else if(e<=h){let v=kst(r.slice(u,h),o.slice(d,g),e-u);s=v===void 0?g:d+v;break}else s+=m-f;n+=f,i+=m}return Pst(s,o)}var Bg=a(E(),1);function EP(){let e=(0,VEe.useInstanceId)(EP),t=(0,ex.useRef)(),r=(0,ex.useRef)(),o=(0,ex.useRef)(),{value:n,type:i,id:s}=(0,QF.useSelect)(u=>{let{getCurrentPostType:d,getCurrentPostId:f,getEditedPostContent:m}=u(I);return{value:m(),type:d(),id:f()}},[]),{editEntityRecord:l}=(0,QF.useDispatch)(BEe.store);(0,ex.useLayoutEffect)(()=>{let u=t.current,d=r.current;if(r.current=n,!u||d===void 0||d===n||!o.current)return;let{selectionStart:f,selectionEnd:m,selectionDirection:h}=o.current,g=DEe(d,n),v=wq(f,g,d,n),b=wq(m,g,d,n);u.setSelectionRange(v,b,h),o.current={selectionStart:v,selectionEnd:b,selectionDirection:h}},[n]);let c=u=>{let{selectionStart:d,selectionEnd:f,selectionDirection:m}=u.target;o.current={selectionStart:d,selectionEnd:f,selectionDirection:m}};return(0,Bg.jsxs)(Bg.Fragment,{children:[(0,Bg.jsx)(Gt,{render:(0,Bg.jsx)("label",{htmlFor:`post-content-${e}`}),children:(0,_q.__)("Type text or HTML")}),(0,Bg.jsx)(LEe.default,{autoComplete:"off",dir:"auto",ref:t,value:n,onChange:u=>{c(u),r.current=u.target.value,l("postType",i,s,{content:u.target.value,blocks:void 0,selection:void 0})},onFocus:c,onMouseUp:c,onKeyUp:c,className:"editor-post-text-editor",id:`post-content-${e}`,placeholder:(0,_q.__)("Start writing with text or HTML")})]})}var zEe=a(j(),1),rx=a(U(),1),HEe=a(Lt(),1),nD=a(Y(),1),Sq=a(be(),1),UEe=a(Mo(),1),WEe=a(Pt(),1),ox=a(hd(),1),GEe=a(Te(),1),xq=a(Mp(),1);var JF="wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text",$F=/[\r\n]+/g;var tx=a(U(),1),jEe=a(Y(),1);function eD(e){let t=(0,tx.useRef)(),{isCleanNewPost:r}=(0,jEe.useSelect)(o=>{let{isCleanNewPost:n}=o(I);return{isCleanNewPost:n()}},[]);return(0,tx.useImperativeHandle)(e,()=>({focus:()=>{t?.current?.focus()}})),(0,tx.useEffect)(()=>{if(!t.current)return;let{defaultView:o}=t.current.ownerDocument,{name:n,parent:i}=o,s=n==="editor-canvas"?i.document:o.document,{activeElement:l,body:c}=s;r&&(!l||c===l)&&t.current.focus()},[r]),{ref:t}}var tD=a(Y(),1);function rD(){let{editPost:e}=(0,tD.useDispatch)(I),{title:t}=(0,tD.useSelect)(o=>{let{getEditedPostAttribute:n}=o(I);return{title:n("title")}},[]);function r(o){e({title:o})}return{title:t,setTitle:r}}var oD=a(E(),1),{useRichText:Rst}=K(ox.privateApis),Ast=(0,rx.forwardRef)((e,t)=>{let{placeholder:r,isEditingContentOnlySection:o,isPreview:n}=(0,nD.useSelect)(P=>{let{getSettings:T,getEditedContentOnlySection:N}=K(P(Sq.store)),{titlePlaceholder:L,isPreviewMode:F}=T();return{placeholder:L,isEditingContentOnlySection:!!N(),isPreview:F}},[]),[i,s]=(0,rx.useState)(!1),{ref:l}=eD(t),{title:c,setTitle:u}=rD(),[d,f]=(0,rx.useState)({}),{clearSelectedBlock:m,insertBlocks:h,insertDefaultBlock:g}=(0,nD.useDispatch)(Sq.store),v=(0,HEe.decodeEntities)(r)||(0,zEe.__)("Add title"),{value:b,onChange:_,ref:y}=Rst({value:c,onChange(P){u(P.replace($F," "))},placeholder:v,selectionStart:d.start,selectionEnd:d.end,onSelectionChange(P,T){f(N=>{let{start:L,end:F}=N;return L===P&&F===T?N:{start:P,end:T}})},__unstableDisableFormats:!1});function w(P){h(P,0)}function S(){s(!0),m()}function x(){s(!1),f({})}function C(){g(void 0,void 0,0)}function A(P){P.keyCode===UEe.ENTER&&(P.preventDefault(),C())}function k(P){let T=P.clipboardData,N="",L="";try{N=T.getData("text/plain"),L=T.getData("text/html")}catch{return}let F=(0,WEe.pasteHandler)({HTML:L,plainText:N});if(P.preventDefault(),!!F.length)if(typeof F!="string"){let[D]=F;if(!c&&(D.name==="core/heading"||D.name==="core/paragraph")){let z=(0,xq.__unstableStripHTML)(D.attributes.content);u(z),w(F.slice(1))}else w(F)}else{let D=(0,xq.__unstableStripHTML)(F);_((0,ox.insert)(b,(0,ox.create)({html:D})))}}let R=J(JF,{"is-selected":i}),M=o?{opacity:.2}:void 0;return(0,oD.jsx)("h1",{ref:(0,GEe.useMergeRefs)([y,l]),contentEditable:!o&&!n,className:R,"aria-label":v,role:"textbox","aria-multiline":"true",onFocus:S,onBlur:x,onKeyDown:A,onPaste:k,style:M})}),iD=(0,rx.forwardRef)((e,t)=>(0,oD.jsx)(uo,{supportKeys:"title",children:(0,oD.jsx)(Ast,{ref:t})}));var YEe=a(G(),1),qEe=a(j(),1),KEe=a(Lt(),1),ZEe=a(Y(),1),XEe=a(be(),1),sD=a(U(),1);var QEe=a(E(),1);function Ist(e,t){let{placeholder:r}=(0,ZEe.useSelect)(h=>{let{getSettings:g}=h(XEe.store),{titlePlaceholder:v}=g();return{placeholder:v}},[]),[o,n]=(0,sD.useState)(!1),{title:i,setTitle:s}=rD(),{ref:l}=eD(t);function c(h){s(h.replace($F," "))}function u(){n(!0)}function d(){n(!1)}let f=J(JF,{"is-selected":o,"is-raw-text":!0}),m=(0,KEe.decodeEntities)(r)||(0,qEe.__)("Add title");return(0,QEe.jsx)(YEe.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 aD=(0,sD.forwardRef)(Ist);var nx=a(j(),1),cD=a(G(),1),ix=a(Y(),1),ePe=a(U(),1);var JEe=a(Y(),1),$Ee=a(ae(),1);function lD({children:e}){let{canTrashPost:t}=(0,JEe.useSelect)(r=>{let{isEditedPostNew:o,getCurrentPostId:n,getCurrentPostType:i}=r(I),{canUser:s}=r($Ee.store),l=i(),c=n(),u=o(),d=c?s("delete",{kind:"postType",name:l,id:c}):!1;return{canTrashPost:(!u||c)&&d&&!wZ.includes(l)}},[]);return t?e:null}var PP=a(E(),1);function sx({onActionPerformed:e}){let t=(0,ix.useRegistry)(),{isNew:r,isDeleting:o,postId:n,title:i}=(0,ix.useSelect)(d=>{let f=d(I);return{isNew:f.isEditedPostNew(),isDeleting:f.isDeletingPost(),postId:f.getCurrentPostId(),title:f.getCurrentPostAttribute("title")}},[]),{trashPost:s}=(0,ix.useDispatch)(I),[l,c]=(0,ePe.useState)(!1);if(r||!n)return null;let u=async()=>{c(!1),await s();let d=await t.resolveSelect(I).getCurrentPost();e?.("move-to-trash",[d])};return(0,PP.jsxs)(lD,{children:[(0,PP.jsx)(cD.Button,{__next40pxDefaultSize:!0,className:"editor-post-trash",isDestructive:!0,variant:"secondary",isBusy:o,"aria-disabled":o,onClick:o?void 0:()=>c(!0),children:(0,nx.__)("Move to trash")}),(0,PP.jsx)(cD.__experimentalConfirmDialog,{isOpen:l,onConfirm:u,onCancel:()=>c(!1),confirmButtonText:(0,nx.__)("Move to trash"),size:"small",children:(0,nx.sprintf)((0,nx.__)('Are you sure you want to move "%s" to the trash?'),i)})]})}var kP=a(Y(),1),RP=a(vo(),1),uD=a(U(),1),tPe=a(be(),1),t0=a(j(),1),Va=a(G(),1),rPe=a(It(),1);var oPe=a(ae(),1),dD=a(Te(),1);var Eo=a(E(),1);function AP({onClose:e}){let{isEditable:t,postSlug:r,postLink:o,permalinkPrefix:n,permalinkSuffix:i,permalink:s}=(0,kP.useSelect)(h=>{let g=h(I).getCurrentPost(),v=h(I).getCurrentPostType(),b=h(oPe.store).getPostType(v),_=h(I).getPermalinkParts(),y=g?._links?.["wp:action-publish"]??!1;return{isEditable:h(I).isPermalinkEditable()&&y,postSlug:(0,RP.safeDecodeURIComponent)(h(I).getEditedPostSlug()),viewPostLabel:b?.labels?.view_item,postLink:g.link,permalinkPrefix:_?.prefix,permalinkSuffix:_?.suffix,permalink:(0,RP.safeDecodeURIComponent)(h(I).getPermalink())}},[]),{editPost:l}=(0,kP.useDispatch)(I),{createNotice:c}=(0,kP.useDispatch)(rPe.store),[u,d]=(0,uD.useState)(!1),f=(0,dD.useCopyToClipboard)(s,()=>{c("info",(0,t0.__)("Copied Permalink to clipboard."),{isDismissible:!0,type:"snackbar"})}),m="editor-post-url__slug-description-"+(0,dD.useInstanceId)(AP);return(0,Eo.jsxs)("div",{className:"editor-post-url",children:[(0,Eo.jsx)(tPe.__experimentalInspectorPopoverHeader,{title:(0,t0.__)("Slug"),onClose:e}),(0,Eo.jsxs)(Va.__experimentalVStack,{spacing:3,children:[t&&(0,Eo.jsx)("p",{className:"editor-post-url__intro",children:(0,uD.createInterpolateElement)((0,t0.__)("<span>Customize the last part of the Permalink.</span> <a>Learn more.</a>"),{span:(0,Eo.jsx)("span",{id:m}),a:(0,Eo.jsx)(Va.ExternalLink,{href:(0,t0.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink")})})}),(0,Eo.jsxs)("div",{children:[t&&(0,Eo.jsxs)(Eo.Fragment,{children:[(0,Eo.jsx)(Va.__experimentalInputControl,{prefix:(0,Eo.jsx)(Va.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,Eo.jsx)(Va.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Eo.jsx)(Va.Button,{icon:l1,ref:f,size:"small",label:"Copy"})}),label:(0,t0.__)("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,RP.cleanForSlug)(h.target.value)}),u&&d(!1)},"aria-describedby":m}),(0,Eo.jsxs)("p",{className:"editor-post-url__permalink",children:[(0,Eo.jsx)("span",{className:"editor-post-url__permalink-visual-label",children:(0,t0.__)("Permalink:")}),(0,Eo.jsxs)(Va.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:[(0,Eo.jsx)("span",{className:"editor-post-url__link-prefix",children:n}),(0,Eo.jsx)("span",{className:"editor-post-url__link-slug",children:r}),(0,Eo.jsx)("span",{className:"editor-post-url__link-suffix",children:i})]})]})]}),!t&&(0,Eo.jsx)(Va.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:o})]})]})]})}var nPe=a(Y(),1),iPe=a(ae(),1);function fD({children:e}){return(0,nPe.useSelect)(r=>{let o=r(I).getCurrentPostType();return!(!r(iPe.store).getPostType(o)?.viewable||!r(I).getCurrentPost().link||!r(I).getPermalinkParts())},[])?e:null}var sPe=a(Y(),1),pD=a(vo(),1);function aPe(){return Cq()}function Cq(){let e=(0,sPe.useSelect)(t=>t(I).getPermalink(),[]);return(0,pD.filterURLForDisplay)((0,pD.safeDecodeURIComponent)(e))}var mD=a(U(),1),hD=a(Y(),1),lx=a(G(),1),ax=a(j(),1),lPe=a(vo(),1),cPe=a(ae(),1);var yl=a(E(),1);function gD(){let{isFrontPage:e}=(0,hD.useSelect)(i=>{let{getCurrentPostId:s}=i(I),{getEditedEntityRecord:l,canUser:c}=i(cPe.store),u=c("read",{kind:"root",name:"site"})?l("root","site"):void 0,d=s();return{isFrontPage:u?.page_on_front===d}},[]),[t,r]=(0,mD.useState)(null),o=(0,mD.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]),n=e?(0,ax.__)("Link"):(0,ax.__)("Slug");return(0,yl.jsx)(fD,{children:(0,yl.jsxs)(fr,{label:n,ref:r,children:[!e&&(0,yl.jsx)(lx.Dropdown,{popoverProps:o,className:"editor-post-url__panel-dropdown",contentClassName:"editor-post-url__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:i,onToggle:s})=>(0,yl.jsx)(Ost,{isOpen:i,onClick:s}),renderContent:({onClose:i})=>(0,yl.jsx)(AP,{onClose:i})}),e&&(0,yl.jsx)(Nst,{})]})})}function Ost({isOpen:e,onClick:t}){let{slug:r}=(0,hD.useSelect)(n=>({slug:n(I).getEditedPostSlug()}),[]),o=(0,lPe.safeDecodeURIComponent)(r);return(0,yl.jsx)(lx.Button,{size:"compact",className:"editor-post-url__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,ax.sprintf)((0,ax.__)("Change link: %s"),o),onClick:t,children:(0,yl.jsx)(yl.Fragment,{children:o})})}function Nst(){let{postLink:e}=(0,hD.useSelect)(t=>{let{getCurrentPost:r}=t(I);return{postLink:r()?.link}},[]);return(0,yl.jsx)(lx.ExternalLink,{className:"editor-post-url__front-page-link",href:e,target:"_blank",children:e})}var uPe=a(Y(),1);function dPe({render:e}){let t=(0,uPe.useSelect)(r=>r(I).getCurrentPost()._links?.["wp:action-publish"]??!1);return e({canEdit:t})}var xPe=a(j(),1),yD=a(G(),1),CPe=a(Y(),1);var TPe=a(U(),1),EPe=a(be(),1);var Zp=a(j(),1),wPe=a(Y(),1),_Pe=a(be(),1);var fPe=a(Y(),1),pPe=a(j(),1),mPe=a(Cw(),1);var hPe=a(E(),1);function cx(){let e=(0,fPe.useSelect)(r=>r(I).getEditedPostAttribute("content"),[]),t=(0,pPe._x)("words","Word count type. Do not translate!");return(0,hPe.jsx)("span",{className:"word-count",children:(0,mPe.count)(e,t)})}var gPe=a(Y(),1),Vg=a(j(),1),vPe=a(Cw(),1),Tq=a(U(),1);var vD=a(E(),1),Mst=189;function ux(){let e=(0,gPe.useSelect)(n=>n(I).getEditedPostAttribute("content"),[]),t=(0,Vg._x)("words","Word count type. Do not translate!"),r=Math.round((0,vPe.count)(e,t)/Mst),o=r===0?(0,Tq.createInterpolateElement)((0,Vg.__)("<span>< 1</span> minute"),{span:(0,vD.jsx)("span",{})}):(0,Tq.createInterpolateElement)((0,Vg.sprintf)((0,Vg._n)("<span>%s</span> minute","<span>%s</span> minutes",r),r),{span:(0,vD.jsx)("span",{})});return(0,vD.jsx)("span",{className:"time-to-read",children:o})}var bPe=a(Y(),1),yPe=a(Cw(),1);function dx(){let e=(0,bPe.useSelect)(t=>t(I).getEditedPostAttribute("content"),[]);return(0,yPe.count)(e,"characters_including_spaces")}var $r=a(E(),1);function Fst({hasOutlineItemsDisabled:e,onRequestClose:t}){let{headingCount:r,paragraphCount:o,numberOfBlocks:n}=(0,wPe.useSelect)(i=>{let{getGlobalBlockCount:s}=i(_Pe.store);return{headingCount:s("core/heading"),paragraphCount:s("core/paragraph"),numberOfBlocks:s()}},[]);return(0,$r.jsxs)($r.Fragment,{children:[(0,$r.jsx)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":(0,Zp.__)("Document Statistics"),tabIndex:"0",children:(0,$r.jsxs)("ul",{role:"list",className:"table-of-contents__counts",children:[(0,$r.jsxs)("li",{className:"table-of-contents__count",children:[(0,Zp.__)("Words"),(0,$r.jsx)(cx,{})]}),(0,$r.jsxs)("li",{className:"table-of-contents__count",children:[(0,Zp.__)("Characters"),(0,$r.jsx)("span",{className:"table-of-contents__number",children:(0,$r.jsx)(dx,{})})]}),(0,$r.jsxs)("li",{className:"table-of-contents__count",children:[(0,Zp.__)("Time to read"),(0,$r.jsx)(ux,{})]}),(0,$r.jsxs)("li",{className:"table-of-contents__count",children:[(0,Zp.__)("Headings"),(0,$r.jsx)("span",{className:"table-of-contents__number",children:r})]}),(0,$r.jsxs)("li",{className:"table-of-contents__count",children:[(0,Zp.__)("Paragraphs"),(0,$r.jsx)("span",{className:"table-of-contents__number",children:o})]}),(0,$r.jsxs)("li",{className:"table-of-contents__count",children:[(0,Zp.__)("Blocks"),(0,$r.jsx)("span",{className:"table-of-contents__number",children:n})]})]})}),r>0&&(0,$r.jsxs)($r.Fragment,{children:[(0,$r.jsx)("hr",{}),(0,$r.jsx)("h2",{className:"table-of-contents__title",children:(0,Zp.__)("Document Outline")}),(0,$r.jsx)(vS,{onSelect:t,hasOutlineItemsDisabled:e})]})]})}var SPe=Fst;var bD=a(E(),1);function Dst({hasOutlineItemsDisabled:e,repositionDropdown:t,...r},o){let n=(0,CPe.useSelect)(i=>!!i(EPe.store).getBlockCount(),[]);return(0,bD.jsx)(yD.Dropdown,{popoverProps:{placement:t?"right":"bottom"},className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:({isOpen:i,onToggle:s})=>(0,bD.jsx)(yD.Button,{__next40pxDefaultSize:!0,...r,ref:o,onClick:n?s:void 0,icon:nV,"aria-expanded":i,"aria-haspopup":"true",label:(0,xPe.__)("Details"),tooltipPosition:"bottom","aria-disabled":!n}),renderContent:({onClose:i})=>(0,bD.jsx)(SPe,{onRequestClose:i,hasOutlineItemsDisabled:e})})}var PPe=(0,TPe.forwardRef)(Dst);var kPe=a(j(),1),RPe=a(U(),1),APe=a(Y(),1),IPe=a(ae(),1);function OPe(){let{__experimentalGetDirtyEntityRecords:e}=(0,APe.useSelect)(IPe.store);return(0,RPe.useEffect)(()=>{let t=r=>{if(e().length>0)return r.returnValue=(0,kPe.__)("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 Eq=a(qa(),1),FPe=a(U(),1),ye=a(be(),1),DPe=a(MPe(),1),LPe=a(E(),1);function wt(e,t,r=[]){let o=(0,FPe.forwardRef)((n,i)=>((0,Eq.default)("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),(0,LPe.jsx)(t,{ref:i,...n})));return r.forEach(n=>{o[n]=wt(e+"."+n,t[n])}),o}function Xd(e,t){return(...r)=>((0,Eq.default)("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),t(...r))}var BPe=wt("RichText",ye.RichText,["Content"]);BPe.isEmpty=Xd("RichText.isEmpty",ye.RichText.isEmpty);var Lst=wt("Autocomplete",ye.Autocomplete),Bst=wt("AlignmentToolbar",ye.AlignmentToolbar),Vst=wt("BlockAlignmentToolbar",ye.BlockAlignmentToolbar),jst=wt("BlockControls",ye.BlockControls,["Slot"]),zst=wt("BlockEdit",ye.BlockEdit),Hst=wt("BlockEditorKeyboardShortcuts",ye.BlockEditorKeyboardShortcuts),Ust=wt("BlockFormatControls",ye.BlockFormatControls,["Slot"]),Wst=wt("BlockIcon",ye.BlockIcon),Gst=wt("BlockInspector",ye.BlockInspector),Yst=wt("BlockList",ye.BlockList),qst=wt("BlockMover",ye.BlockMover),Kst=wt("BlockNavigationDropdown",ye.BlockNavigationDropdown),Zst=wt("BlockSelectionClearer",ye.BlockSelectionClearer),Xst=wt("BlockSettingsMenu",ye.BlockSettingsMenu),Qst=wt("BlockTitle",ye.BlockTitle),Jst=wt("BlockToolbar",ye.BlockToolbar),$st=wt("ColorPalette",ye.ColorPalette),eat=wt("ContrastChecker",ye.ContrastChecker),tat=wt("CopyHandler",ye.CopyHandler),rat=wt("DefaultBlockAppender",ye.DefaultBlockAppender),oat=wt("FontSizePicker",ye.FontSizePicker),nat=wt("Inserter",ye.Inserter),iat=wt("InnerBlocks",ye.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),sat=wt("InspectorAdvancedControls",ye.InspectorAdvancedControls,["Slot"]),aat=wt("InspectorControls",ye.InspectorControls,["Slot"]),lat=wt("PanelColorSettings",ye.PanelColorSettings),cat=wt("PlainText",ye.PlainText),uat=wt("RichTextShortcut",ye.RichTextShortcut),dat=wt("RichTextToolbarButton",ye.RichTextToolbarButton),fat=wt("__unstableRichTextInputEvent",ye.__unstableRichTextInputEvent),pat=wt("MediaPlaceholder",ye.MediaPlaceholder),mat=wt("MediaUpload",ye.MediaUpload),hat=wt("MediaUploadCheck",ye.MediaUploadCheck),gat=wt("MultiSelectScrollIntoView",ye.MultiSelectScrollIntoView),vat=wt("NavigableToolbar",ye.NavigableToolbar),bat=wt("ObserveTyping",ye.ObserveTyping),yat=wt("SkipToSelectedBlock",ye.SkipToSelectedBlock),wat=wt("URLInput",ye.URLInput),_at=wt("URLInputButton",ye.URLInputButton),Sat=wt("URLPopover",ye.URLPopover),xat=wt("Warning",ye.Warning),Cat=wt("WritingFlow",ye.WritingFlow),Tat=Xd("createCustomColorsHOC",ye.createCustomColorsHOC),Eat=Xd("getColorClassName",ye.getColorClassName),Pat=Xd("getColorObjectByAttributeValues",ye.getColorObjectByAttributeValues),kat=Xd("getColorObjectByColorValue",ye.getColorObjectByColorValue),Rat=Xd("getFontSize",ye.getFontSize),Aat=Xd("getFontSizeClass",ye.getFontSizeClass),Iat=Xd("withColorContext",ye.withColorContext),Oat=Xd("withColors",ye.withColors),Nat=Xd("withFontSizes",ye.withFontSizes);var Mat=sS,Fat=sS;function Dat(e=[]){return e.push({...C3},{...T3}),e}(0,VPe.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",Dat);var jPe=a(U(),1),Pq=a(jn(),1),zPe=a(qa(),1),wD=a(Tf(),1);var fx=a(E(),1),{MediaUploadModal:Lat}=K(wD.privateApis),Bat=class extends jPe.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:s}=this.props,{isOpen:l}=this.state;return(0,fx.jsxs)(fx.Fragment,{children:[s({open:this.openModal}),(0,fx.jsx)(Lat,{allowedTypes:e,multiple:t,value:r,onSelect:c=>{o(c),this.closeModal()},onClose:this.closeModal,title:n,isOpen:l,modalClass:i})]})}};window.__experimentalDataViewsMediaModal?(0,Pq.addFilter)("editor.MediaUpload","core/editor/components/media-upload",()=>((0,zPe.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."}),Bat)):(0,Pq.addFilter)("editor.MediaUpload","core/editor/components/media-upload",()=>wD.MediaUpload);var UPe=a(jn(),1),WPe=a(Nl(),1),GPe=a(Te(),1),_D=a(be(),1),kq=a(Y(),1),YPe=a(Pt(),1);var vu=a(E(),1),{PatternOverridesControls:Vat,ResetOverridesControl:jat,PATTERN_TYPES:zat,PATTERN_SYNC_TYPES:HPe}=K(WPe.privateApis),Hat=(0,GPe.createHigherOrderComponent)(e=>t=>{let r=(0,kq.useSelect)(o=>{let{__experimentalBlockBindingsSupportedAttributes:n}=o(_D.store).getSettings();return!!n?.[t.name]},[t.name]);return(0,vu.jsxs)(vu.Fragment,{children:[(0,vu.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,vu.jsx)(Uat,{...t})]})},"withPatternOverrideControls");function Uat(e){let t=(0,_D.useBlockEditingMode)(),{hasPatternOverridesSource:r,isEditingSyncedPattern:o}=(0,kq.useSelect)(c=>{let{getCurrentPostType:u,getEditedPostAttribute:d}=c(I);return{hasPatternOverridesSource:!!(0,YPe.getBlockBindingsSource)("core/pattern-overrides"),isEditingSyncedPattern:u()===zat.user&&d("meta")?.wp_pattern_sync_status!==HPe.unsynced&&d("wp_pattern_sync_status")!==HPe.unsynced}},[]),n=e.attributes.metadata?.bindings,i=!!n&&Object.values(n).some(c=>c.source==="core/pattern-overrides"),s=o&&t==="default",l=!o&&!!e.attributes.metadata?.name&&t!=="disabled"&&i;return r?(0,vu.jsxs)(vu.Fragment,{children:[s&&(0,vu.jsx)(Vat,{...e}),l&&(0,vu.jsx)(jat,{...e})]}):null}(0,UPe.addFilter)("editor.BlockEdit","core/editor/with-pattern-override-controls",Hat);var qPe=a(jn(),1),KPe=a(Te(),1),ZPe=a(U(),1),Rq=a(j(),1),px=a(be(),1),SD=a(G(),1),XPe=a(Y(),1),Qd=a(E(),1),Wat=["core/navigation-link","core/navigation-submenu"];function Gat({attributes:e}){let{kind:t,id:r,type:o}=e,n=(0,px.useBlockEditingMode)(),i=(0,XPe.useSelect)(l=>l(px.store).getSettings().onNavigateToEntityRecord,[]),s=(0,ZPe.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,Qd.jsx)(px.__unstableBlockToolbarLastItem,{children:(0,Qd.jsx)(SD.ToolbarGroup,{children:(0,Qd.jsx)(SD.ToolbarButton,{name:"view",title:(0,Rq.__)("View"),onClick:s,children:(0,Rq.__)("View")})})})}var Yat=(0,KPe.createHigherOrderComponent)(e=>t=>{let r=Wat.includes(t.name);return(0,Qd.jsxs)(Qd.Fragment,{children:[(0,Qd.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,Qd.jsx)(Gat,{...t})]})},"withNavigationViewButton");(0,qPe.addFilter)("editor.BlockEdit","core/editor/with-navigation-view-button",Yat);var QPe=a(jn(),1),JPe=a(Te(),1),$Pe=a(U(),1),Aq=a(j(),1),mx=a(be(),1),xD=a(G(),1),jg=a(Y(),1);var Jd=a(E(),1),qat="core/navigation",Kat="core/template-part",Zat="edit-post/block";function Xat({clientId:e}){let t=(0,jg.useRegistry)(),{selectBlock:r,flashBlock:o}=(0,jg.useDispatch)(mx.store),{requestInspectorTab:n}=K((0,jg.useDispatch)(mx.store)),{enableComplementaryArea:i}=(0,jg.useDispatch)(He),{hasNavigationBlocks:s,firstNavigationBlockId:l,isNavigationEditable:c}=(0,jg.useSelect)(d=>{let{getClientIdsOfDescendants:f,getBlockName:m,getBlockEditingMode:h}=d(mx.store),v=f(e).filter(y=>m(y)===qat),b=v.length>0,_=b?v[0]:null;return{hasNavigationBlocks:b,firstNavigationBlockId:_,isNavigationEditable:h(_)!=="disabled"}},[e]),u=(0,$Pe.useCallback)(()=>{l&&t.batch(()=>{r(l),o(l,500),i("core",Zat),n("list",{openPanel:l})})},[l,t,r,o,i,n]);return!s||!c?null:(0,Jd.jsx)(mx.__unstableBlockToolbarLastItem,{children:(0,Jd.jsx)(xD.ToolbarGroup,{children:(0,Jd.jsx)(xD.ToolbarButton,{label:(0,Aq.__)("Edit navigation"),onClick:u,children:(0,Aq.__)("Edit navigation")})})})}var Qat=(0,JPe.createHigherOrderComponent)(e=>t=>{let r=t.name===Kat;return(0,Jd.jsxs)(Jd.Fragment,{children:[(0,Jd.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,Jd.jsx)(Xat,{clientId:t.clientId})]})},"withTemplatePartNavigationEditButton");(0,QPe.addFilter)("editor.BlockEdit","core/editor/with-template-part-navigation-edit-button",Qat);var mke=a(jn(),1),hke=a(Te(),1),zg=a(be(),1),IP=a(G(),1),Qp=a(j(),1),Jp=a(Pt(),1),vx=a(U(),1),gx=a(Y(),1),gke=a(It(),1),vke=a(ae(),1);function Iq(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 cke=a(G(),1);var bu=a(j(),1),uke=a(Pt(),1),hx=a(U(),1);var ake=a(U(),1);var xr=a(j(),1),eke={"typography.fontFamily":(0,xr.__)("Font family"),"typography.fontSize":(0,xr.__)("Font size"),"typography.fontStyle":(0,xr.__)("Font style"),"typography.fontWeight":(0,xr.__)("Font weight"),"typography.lineHeight":(0,xr.__)("Line height"),"typography.letterSpacing":(0,xr.__)("Letter spacing"),"typography.textDecoration":(0,xr.__)("Text decoration"),"typography.textTransform":(0,xr.__)("Letter case"),"typography.textColumns":(0,xr.__)("Text columns"),"typography.writingMode":(0,xr.__)("Orientation"),"color.text":(0,xr.__)("Text color"),"color.background":(0,xr.__)("Background color"),"color.gradient":(0,xr.__)("Gradient"),"elements.link.color.text":(0,xr.__)("Link color"),"spacing.padding":(0,xr.__)("Padding"),"spacing.margin":(0,xr.__)("Margin"),"spacing.blockGap":(0,xr.__)("Block spacing"),border:(0,xr.__)("Border"),"border.top":(0,xr.__)("Border top"),"border.right":(0,xr.__)("Border right"),"border.bottom":(0,xr.__)("Border bottom"),"border.left":(0,xr.__)("Border left"),"border.color":(0,xr.__)("Border color"),"border.width":(0,xr.__)("Border width"),"border.style":(0,xr.__)("Border style"),"border.radius":(0,xr.__)("Border radius"),"dimensions.minHeight":(0,xr.__)("Minimum height"),"dimensions.aspectRatio":(0,xr.__)("Aspect ratio")};function tke(e){let t=e.join(".");return eke[t]?eke[t]:WI(e[e.length-1]??"")}var $d="\u2014",Jat="var:preset|",$at=/^var\(\s*--wp--preset--[a-z0-9-]+?\s*(?:,[^)]*)?\)$/i;function elt(e){if(e.startsWith(Jat))return e.split("|").pop();if($at.test(e))return e.replace(/^var\(\s*/,"").replace(/\s*(?:,[^)]*)?\)$/,"").split("--").pop()}var Ln=e=>e!=null&&e!=="",tlt=["top","right","bottom","left"];function rlt(e){if(Ln(e.width)||Ln(e.style)||Ln(e.color))return e;let t=tlt.filter(o=>e[o]);if(!t.length)return e;let r=o=>{let n=t.map(i=>e[i]?.[o]);return n.every(i=>i===n[0])?n[0]:void 0};return{width:r("width"),style:r("style"),color:r("color")}}function r0(e){if(!Ln(e))return $d;if(typeof e=="string"){let t=elt(e);return t?WI(t):e}if(typeof e=="number")return String(e);if(typeof e=="object")try{let t=JSON.stringify(e);return t&&t!=="{}"&&t!=="[]"?t:$d}catch{return $d}return String(e)}function rke(e){if(!e||typeof e!="object")return r0(e);let{width:t,style:r,color:o}=rlt(e),n=[t,r,o].filter(Ln).map(i=>r0(i));return n.length?n.join(" "):$d}var olt=["topLeft","topRight","bottomRight","bottomLeft"];function oke(e){if(e&&typeof e=="object"){let t=olt.map(r=>e[r]).filter(Ln);return t.length?t.join(" "):$d}return r0(e)}function nke(e,t=r=>r){let r=l=>r0(t(l));if(!e||typeof e!="object")return r(e);let{top:o,right:n,bottom:i,left:s}=e;return Ln(o)&&Ln(n)&&Ln(i)&&Ln(s)?o===n&&n===i&&i===s?r(o):o===i&&s===n?`${r(o)} ${r(s)}`:[o,n,i,s].map(r).join(" "):!Ln(o)&&!Ln(n)&&!Ln(i)&&!Ln(s)?$d:[o,n,i,s].map(l=>Ln(l)?r(l):$d).join(" ")}function ike(e,t=r=>r){let r=l=>r0(t(l));if(!e||typeof e!="object")return r(e);let{top:o,left:n}=e;if(!Ln(o)&&!Ln(n))return $d;if(o===n)return r(o);let i=Ln(o)?r(o):$d,s=Ln(n)?r(n):$d;return`${i} - ${s}`}function ske(e,t,r){return e==="border"?rke(t):e==="borderRadius"?oke(t):e==="spacing"?nke(t,r):e==="blockGap"?ike(t,r):r0(t)}function lke(e,t,r){return(0,ake.useMemo)(()=>{let o=n=>bv(t,r,n);return e.map(n=>{let i=bm(t,n.primaryPath.join("."),r,!1);return{...n,label:tke(n.primaryPath),currentValue:i,formattedCurrentValue:ske(n.format,i,o),formattedNewValue:ske(n.format,n.newValue,o)}})},[e,t,r])}var Xp=a(E(),1),nlt={pickerTable:{}},ilt=e=>e.id;function dke({name:e,rows:t,onApply:r,onRequestClose:o}){let{merged:n}=Hr(),i=lke(t,n,e),[s,l]=(0,hx.useState)(()=>i.map(h=>h.id)),[c,u]=(0,hx.useState)(()=>({type:"pickerTable",titleField:"label",fields:["current","new"],page:1,perPage:i.length,layout:{enableMoving:!1}})),d=(0,hx.useMemo)(()=>[{id:"label",label:(0,bu.__)("Style"),enableSorting:!1,enableHiding:!1,filterBy:!1,getValue:({item:h})=>h.label,render:({item:h})=>h.label},{id:"current",label:(0,bu.__)("Current"),enableSorting:!1,enableHiding:!1,filterBy:!1,getValue:({item:h})=>h.formattedCurrentValue,render:({item:h})=>(0,Xp.jsx)("span",{className:"editor-push-changes-to-global-styles-modal__value",children:h.formattedCurrentValue})},{id:"new",label:(0,bu.__)("New"),enableSorting:!1,enableHiding:!1,filterBy:!1,getValue:({item:h})=>h.formattedNewValue,render:({item:h})=>(0,Xp.jsx)("span",{className:"editor-push-changes-to-global-styles-modal__value",children:h.formattedNewValue})}],[]),f=(0,hx.useMemo)(()=>[{id:"apply",label:(0,bu.__)("Apply"),isPrimary:!0,supportsBulk:!0,callback(h){r(h),o()}}],[r,o]),m=(0,uke.getBlockType)(e)?.title;return(0,Xp.jsxs)(cke.Modal,{title:(0,bu.sprintf)((0,bu.__)("Apply %s styles globally"),m),onRequestClose:o,size:"large",className:"editor-push-changes-to-global-styles-modal",children:[(0,Xp.jsx)("p",{children:(0,bu.sprintf)((0,bu.__)("Choose which styles to make default for all %s blocks."),m)}),(0,Xp.jsxs)(lp,{data:i,fields:d,view:c,onChangeView:u,actions:f,selection:s,onChangeSelection:l,getItemId:ilt,paginationInfo:{totalItems:i.length,totalPages:1},defaultLayouts:nlt,search:!1,itemListLabel:(0,bu.__)("Styles to apply"),children:[(0,Xp.jsx)(lp.Layout,{}),(0,Xp.jsx)(lp.Footer,{})]})]})}var wl=a(E(),1),{cleanEmptyObject:slt}=K(zg.privateApis),Oq={...Jp.__EXPERIMENTAL_STYLE_PROPERTY,blockGap:{value:["spacing","blockGap"]}},alt={"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"},llt={"border.color":"borderColor","color.background":"backgroundColor","color.text":"textColor","color.gradient":"gradient","typography.fontSize":"fontSize","typography.fontFamily":"fontFamily"},clt=["border","color","spacing","typography"],fke=(e,t)=>{let r=e;return t.forEach(o=>{r=r?.[o]}),r},bke=["top","right","bottom","left"];function ult(e,t,r){let o=[],n=t.style?.border,i=r?.border,s=e.includes("borderColor"),l=e.includes("borderWidth"),c=e.includes("borderStyle"),u=t.borderColor,d=u?`var:preset|color|${u}`:n?.color,f=pke({id:"border",primaryPath:["border"],side:null,color:s?d:void 0,width:l?n?.width:void 0,style:c?n?.style:void 0,userBorder:i,presetAttributes:u?["borderColor"]:[]});return f&&o.push(f),bke.forEach(m=>{let h=n?.[m],g=pke({id:`border.${m}`,primaryPath:["border",m],side:m,color:s?h?.color:void 0,width:l?h?.width:void 0,style:c?h?.style:void 0,userBorder:i,presetAttributes:[]});g&&o.push(g)}),e.includes("borderRadius")&&n?.radius!==void 0&&n?.radius!==""&&o.push({id:"border.radius",primaryPath:["border","radius"],paths:[{path:["border","radius"],value:n.radius}],presetAttributes:[],newValue:n.radius,format:"borderRadius"}),o}function pke({id:e,primaryPath:t,side:r,color:o,width:n,style:i,userBorder:s,presetAttributes:l}){if(!o&&!n&&!i)return null;let c=[],u=r?[r]:bke,d=(m,h)=>{h!==void 0&&(r||c.push({path:["border",m],value:h}),u.forEach(g=>{c.push({path:["border",g,m],value:h})}))};d("color",o),d("width",n),d("style",i);let f=i;if(!i&&(o||n)){let m=u.map(g=>s?.[g]?.style);u.forEach((g,v)=>{m[v]||c.push({path:["border",g,"style"],value:"solid"})}),f=(m.every(g=>g===m[0])?m[0]:void 0)||"solid"}return{id:e,primaryPath:t,paths:c,presetAttributes:l,newValue:{color:o,width:n,style:f},format:"border"}}function dlt(e,t,r){let o=[];return e.forEach(n=>{if(!Oq[n]||n.startsWith("border")||Oq[n].rootOnly)return;let{value:i}=Oq[n],s=i.join("."),l=llt[s],c=l?t[l]:void 0,u=c?`var:preset|${alt[s]}|${c}`:fke(t.style,i),d=c?[l]:[];if(n==="linkColor"){let f=u?[{path:i,value:u}]:[],m=["elements","link",":hover","color","text"],h=fke(t.style,m);if(h&&f.push({path:m,value:h}),f.length===0)return;o.push({id:s,primaryPath:i,paths:f,presetAttributes:d,newValue:u??h});return}if(u){let f;n==="padding"||n==="margin"?f="spacing":n==="blockGap"&&(f="blockGap"),o.push({id:s,primaryPath:i,paths:[{path:i,value:u}],presetAttributes:d,newValue:u,format:f})}}),o.push(...ult(e,t,r)),o}function flt(e,t,r){let o=(0,gx.useSelect)(i=>K(i(Jp.store)).getSupportedStyles(e),[e]),n=r?.styles?.blocks?.[e];return(0,vx.useMemo)(()=>dlt(o,t,n),[o,t,n])}function plt({rowsToPush:e,attributes:t,userConfig:r,name:o}){if(!e||e.length===0)return null;let n=e.flatMap(u=>u.paths);if(n.length===0)return null;let{style:i}=t,s=structuredClone(i),l=structuredClone(r);for(let{path:u,value:d}of n)Iq(s,u,void 0),Iq(l,["styles","blocks",o,...u],d);let c={style:slt(s)};for(let u of e.flatMap(d=>d.presetAttributes))c[u]=void 0;return{newBlockAttributes:c,newUserConfig:l}}function mlt({name:e,attributes:t,setAttributes:r}){let{user:o,setUser:n}=Hr(),i=flt(e,t,o),[s,l]=(0,vx.useState)(!1),{__unstableMarkNextChangeAsNotPersistent:c}=(0,gx.useDispatch)(zg.store),{createSuccessNotice:u}=(0,gx.useDispatch)(gke.store),d=(0,vx.useCallback)(f=>{let m=plt({rowsToPush:f,attributes:t,userConfig:o,name:e});if(!m)return;let{newBlockAttributes:h,newUserConfig:g}=m;c(),r(h),n(g,{undoIgnore:!0}),u((0,Qp.sprintf)((0,Qp.__)("%s styles applied."),(0,Jp.getBlockType)(e).title),{type:"snackbar",actions:[{label:(0,Qp.__)("Undo"),onClick(){c(),r(t),n(o,{undoIgnore:!0})}}]})},[c,t,u,e,r,n,o]);return(0,wl.jsxs)(IP.BaseControl,{className:"editor-push-changes-to-global-styles-control",help:(0,Qp.sprintf)((0,Qp.__)("Review and apply this block\u2019s typography, spacing, dimensions, and color styles to all %s blocks."),(0,Jp.getBlockType)(e).title),children:[(0,wl.jsx)(IP.BaseControl.VisualLabel,{children:(0,Qp.__)("Styles")}),(0,wl.jsx)(IP.Button,{__next40pxDefaultSize:!0,variant:"secondary",accessibleWhenDisabled:!0,disabled:i.length===0,onClick:()=>l(!0),children:(0,Qp.__)("Apply globally")}),s&&(0,wl.jsx)(dke,{name:e,rows:i,onApply:d,onRequestClose:()=>l(!1)})]})}function hlt(e){let t=(0,zg.useBlockEditingMode)(),r=(0,gx.useSelect)(i=>i(vke.store).getCurrentTheme()?.is_block_theme,[]),o=clt.some(i=>(0,Jp.hasBlockSupport)(e.name,i));return t==="default"&&o&&r?(0,wl.jsx)(zg.InspectorAdvancedControls,{children:(0,wl.jsx)(mlt,{...e})}):null}var glt=(0,hke.createHigherOrderComponent)(e=>t=>(0,wl.jsxs)(wl.Fragment,{children:[(0,wl.jsx)(e,{...t},"edit"),t.isSelected&&(0,wl.jsx)(hlt,{...t})]}));(0,mke.addFilter)("editor.BlockEdit","core/editor/push-changes-to-global-styles",glt);var OP=a(G(),1),yke=a(E(),1),Nq="__experimentalMainDashboardButton",wke=()=>{let e=(0,OP.__experimentalUseSlotFills)(Nq);return!!(e&&e.length)},{Fill:vlt,Slot:blt}=(0,OP.createSlotFill)(Nq),_ke=vlt,ylt=()=>{let e=(0,OP.__experimentalUseSlotFills)(Nq);return(0,yke.jsx)(blt,{bubblesVirtually:!0,fillProps:{length:e?e.length:0}})};_ke.Slot=ylt;var CD=_ke;var S5e=a(Y(),1),x5e=a(ae(),1),C5e=a(G(),1),T5e=a(j(),1);var XP=a(Y(),1),Qg=a(j(),1),iAe=a(Dt(),1),kx=a(be(),1),sAe=a(Te(),1),EL=a(U(),1),aAe=a(Lt(),1),lAe=a(It(),1),cAe=a(Z9(),1);var $Re=a(be(),1),e2e=a(Y(),1),zP=a(Te(),1),t2e=a(Dt(),1),r2e=a(U(),1);var bx=a(be(),1),Ske=a(U(),1),TD=a(G(),1),Mq=a(j(),1);var xke=a(Y(),1);var $p=a(E(),1),{useHasBlockToolbar:wlt}=K(bx.privateApis);function Cke({isCollapsed:e,onToggle:t}){let{blockSelectionStart:r}=(0,xke.useSelect)(i=>({blockSelectionStart:i(bx.store).getBlockSelectionStart()}),[]),o=wlt(),n=!!r;return(0,Ske.useEffect)(()=>{r&&t(!1)},[r,t]),o?(0,$p.jsxs)($p.Fragment,{children:[(0,$p.jsx)("div",{className:J("editor-collapsible-block-toolbar",{"is-collapsed":e||!n}),children:(0,$p.jsx)(bx.BlockToolbar,{hideDragHandle:!0})}),(0,$p.jsx)(TD.Popover.Slot,{name:"block-toolbar"}),(0,$p.jsx)(TD.Button,{className:"editor-collapsible-block-toolbar__toggle",icon:e?kl:Rl,onClick:()=>{t(!e)},label:e?(0,Mq.__)("Show block tools"):(0,Mq.__)("Hide block tools"),size:"compact"})]}):null}var Tke=a(Te(),1),ED=a(Y(),1),o0=a(j(),1),Eke=a(be(),1),yx=a(G(),1);var Fq=a(U(),1),Pke=a(xa(),1),kke=a(Dt(),1);var yu=a(E(),1);function _lt({className:e,disableBlockTools:t=!1}){let{setIsInserterOpened:r,setIsListViewOpened:o}=(0,ED.useDispatch)(I),{isDistractionFree:n,isInserterOpened:i,isListViewOpen:s,listViewShortcut:l,inserterSidebarToggleRef:c,listViewToggleRef:u,showIconLabels:d}=(0,ED.useSelect)(y=>{let{get:w}=y(kke.store),{isListViewOpened:S,getEditorMode:x,getInserterSidebarToggleRef:C,getListViewToggleRef:A}=K(y(I)),{getShortcutRepresentation:k}=y(Pke.store);return{isInserterOpened:y(I).isInserterOpened(),isListViewOpen:S(),listViewShortcut:k("core/editor/toggle-list-view"),inserterSidebarToggleRef:C(),listViewToggleRef:A(),showIconLabels:w("core","showIconLabels"),isDistractionFree:w("core","distractionFree"),isVisualMode:x()==="visual"}},[]),f=y=>{i&&y.preventDefault()},m=(0,Tke.useViewportMatch)("wide"),h=(0,o0.__)("Document tools"),g=(0,Fq.useCallback)(()=>o(!s),[o,s]),v=(0,Fq.useCallback)(()=>r(!i),[i,r]),b=(0,o0._x)("Block Inserter","Generic label for block inserter button"),_=i?(0,o0.__)("Close"):(0,o0.__)("Add");return(0,yu.jsx)(Eke.NavigableToolbar,{className:J("editor-document-tools","edit-post-header-toolbar",e),"aria-label":h,variant:"unstyled",children:(0,yu.jsxs)("div",{className:"editor-document-tools__left",children:[!n&&(0,yu.jsx)(yx.ToolbarButton,{ref:c,className:"editor-document-tools__inserter-toggle",variant:"primary",isPressed:i,onMouseDown:f,onClick:v,disabled:t,icon:Cc,label:d?_:b,showTooltip:!d,"aria-expanded":i}),(m||!d)&&(0,yu.jsxs)(yu.Fragment,{children:[(0,yu.jsx)(yx.ToolbarItem,{as:X3,showTooltip:!d,variant:d?"tertiary":void 0,size:"compact"}),(0,yu.jsx)(yx.ToolbarItem,{as:q3,showTooltip:!d,variant:d?"tertiary":void 0,size:"compact"}),!n&&(0,yu.jsx)(yx.ToolbarButton,{className:"editor-document-tools__document-overview-toggle",icon:g1,disabled:t,isPressed:s,label:(0,o0.__)("Document Overview"),onClick:g,shortcut:l,showTooltip:!d,variant:d?"tertiary":void 0,"aria-expanded":s,ref:u})]})]})})}var Rke=_lt;var NP=a(G(),1);var Hg=a(E(),1),Dq={distractionFreeDisabled:{y:"-50px"},distractionFreeHover:{y:0},distractionFreeHidden:{y:"-50px"},visible:{y:0},hidden:{y:0}},Slt={distractionFreeDisabled:{x:"-100%"},distractionFreeHover:{x:0},distractionFreeHidden:{x:"-100%"},visible:{x:0},hidden:{x:0}};function PD({className:e,toolbar:t,center:r,settings:o}){let n=wke();return(0,Hg.jsxs)("div",{className:J("editor-header edit-post-header",e),children:[n&&(0,Hg.jsx)(NP.__unstableMotion.div,{className:"editor-header__back-button",variants:Slt,transition:{type:"tween"},children:(0,Hg.jsx)(CD.Slot,{})}),(0,Hg.jsx)(NP.__unstableMotion.div,{variants:Dq,className:"editor-header__toolbar",transition:{type:"tween"},children:t}),r&&(0,Hg.jsx)(NP.__unstableMotion.div,{variants:Dq,className:"editor-header__center",transition:{type:"tween"},children:r}),(0,Hg.jsx)(NP.__unstableMotion.div,{variants:Dq,transition:{type:"tween"},className:"editor-header__settings",children:o})]})}var Po=a(j(),1),wx=a(Y(),1),Vq=a(Mo(),1);var ef=a(G(),1),n0=a(Dt(),1);var Ake=a(G(),1),kD=a(Y(),1),Lq=a(j(),1),Ike=a(Te(),1),Oke=a(It(),1);var Nke=a(E(),1);function Mke(){let{createNotice:e}=(0,kD.useDispatch)(Oke.store),{getEditedPostContent:t}=(0,kD.useSelect)(I);function r(){return t()}function o(){e("info",(0,Lq.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}let n=(0,Ike.useCopyToClipboard)(r,o);return(0,Nke.jsx)(Ake.MenuItem,{ref:n,children:(0,Lq.__)("Copy all blocks")})}var MP=a(j(),1),RD=a(G(),1),AD=a(Y(),1),Fke=a(xa(),1);var Bq=a(E(),1),xlt=[{value:"visual",label:(0,MP.__)("Visual editor")},{value:"text",label:(0,MP.__)("Code editor")}];function Clt(){let{shortcut:e,isRichEditingEnabled:t,isCodeEditingEnabled:r,mode:o}=(0,AD.useSelect)(l=>({shortcut:l(Fke.store).getShortcutRepresentation("core/editor/toggle-mode"),isRichEditingEnabled:l(I).getEditorSettings().richEditingEnabled,isCodeEditingEnabled:l(I).getEditorSettings().codeEditingEnabled,mode:l(I).getEditorMode()}),[]),{switchEditorMode:n}=(0,AD.useDispatch)(I),i=o;!t&&o==="visual"&&(i="text"),!r&&o==="text"&&(i="visual");let s=xlt.map(l=>(!r&&l.value==="text"&&(l={...l,disabled:!0}),!t&&l.value==="visual"&&(l={...l,disabled:!0,info:(0,MP.__)("You can enable the visual editor in your profile settings.")}),l.value!==i&&!l.disabled?{...l,shortcut:e}:l));return(0,Bq.jsx)(RD.MenuGroup,{label:(0,MP.__)("Editor"),children:(0,Bq.jsx)(RD.MenuItemsChoice,{choices:s,value:i,onSelect:n})})}var Dke=Clt;var Lke=a(G(),1),Bke=a(E(),1),{Fill:Vke,Slot:Tlt}=(0,Lke.createSlotFill)("ToolsMoreMenuGroup");Vke.Slot=({fillProps:e})=>(0,Bke.jsx)(Tlt,{fillProps:e});var ID=Vke;var jke=a(G(),1),zke=a(E(),1),{Fill:Hke,Slot:Elt}=(0,jke.createSlotFill)(Symbol("ViewMoreMenuGroup"));Hke.Slot=({fillProps:e})=>(0,zke.jsx)(Elt,{fillProps:e});var OD=Hke;var mo=a(E(),1);function ND({disabled:e=!1}){let{openModal:t}=(0,wx.useDispatch)(He),{set:r}=(0,wx.useDispatch)(n0.store),{toggleDistractionFree:o}=(0,wx.useDispatch)(I),n=(0,wx.useSelect)(s=>s(n0.store).get("core","showIconLabels"),[]),i=()=>{r("core","distractionFree",!1)};return(0,mo.jsx)(mo.Fragment,{children:(0,mo.jsx)(ef.DropdownMenu,{icon:bo,label:(0,Po.__)("Options"),popoverProps:{placement:"bottom-end",className:"more-menu-dropdown__content"},toggleProps:{showTooltip:!n,...n&&{variant:"tertiary"},tooltipPosition:"bottom",size:"compact",disabled:e},children:({onClose:s})=>(0,mo.jsxs)(mo.Fragment,{children:[(0,mo.jsxs)(ef.MenuGroup,{label:(0,Po._x)("View","noun"),children:[(0,mo.jsx)(n0.PreferenceToggleMenuItem,{scope:"core",name:"fixedToolbar",onToggle:i,label:(0,Po.__)("Top toolbar"),info:(0,Po.__)("Access all block and document tools in a single place"),messageActivated:(0,Po.__)("Top toolbar activated."),messageDeactivated:(0,Po.__)("Top toolbar deactivated.")}),(0,mo.jsx)(n0.PreferenceToggleMenuItem,{scope:"core",name:"distractionFree",label:(0,Po.__)("Distraction free"),info:(0,Po.__)("Write with calmness"),handleToggling:!1,onToggle:()=>o({createNotice:!1}),messageActivated:(0,Po.__)("Distraction free mode activated."),messageDeactivated:(0,Po.__)("Distraction free mode deactivated."),shortcut:Vq.displayShortcut.primaryShift("\\")}),(0,mo.jsx)(n0.PreferenceToggleMenuItem,{scope:"core",name:"focusMode",label:(0,Po.__)("Spotlight mode"),info:(0,Po.__)("Focus on one block at a time"),messageActivated:(0,Po.__)("Spotlight mode activated."),messageDeactivated:(0,Po.__)("Spotlight mode deactivated.")}),(0,mo.jsx)(OD.Slot,{fillProps:{onClose:s}})]}),(0,mo.jsx)(Dke,{}),(0,mo.jsx)(Yl.Slot,{name:"core/plugin-more-menu",label:(0,Po.__)("Panels"),fillProps:{onClick:s}}),(0,mo.jsxs)(ef.MenuGroup,{label:(0,Po.__)("Tools"),children:[(0,mo.jsx)(ef.MenuItem,{onClick:()=>t("editor/keyboard-shortcut-help"),shortcut:Vq.displayShortcut.access("h"),children:(0,Po.__)("Keyboard shortcuts")}),(0,mo.jsx)(Mke,{}),(0,mo.jsxs)(ef.MenuItem,{icon:hs,href:(0,Po.__)("https://wordpress.org/documentation/article/wordpress-block-editor/"),target:"_blank",rel:"noopener",children:[(0,Po.__)("Help"),(0,mo.jsx)(Gt,{render:(0,mo.jsx)("span",{}),children:(0,Po.__)("(opens in a new tab)")})]}),(0,mo.jsx)(ID.Slot,{fillProps:{onClose:s}})]}),(0,mo.jsx)(ef.MenuGroup,{children:(0,mo.jsx)(ef.MenuItem,{onClick:()=>t("editor/preferences"),children:(0,Po.__)("Preferences")})})]})})})}var Wke=a(Te(),1),MD=a(Y(),1);var Gke=a(E(),1),Uke="toggle",jq="button";function Yke({forceIsDirty:e,setEntitiesSavedStatesCallback:t}){let r,o=(0,Wke.useViewportMatch)("medium","<"),{togglePublishSidebar:n}=(0,MD.useDispatch)(I),{hasPublishAction:i,isBeingScheduled:s,isPending:l,isPublished:c,isPublishSidebarEnabled:u,isPublishSidebarOpened:d,isScheduled:f,postStatus:m,postStatusHasChanged:h,postType:g}=(0,MD.useSelect)(v=>({hasPublishAction:!!v(I).getCurrentPost()?._links?.["wp:action-publish"],isBeingScheduled:v(I).isEditedPostBeingScheduled(),isPending:v(I).isCurrentPostPending(),isPublished:v(I).isCurrentPostPublished(),isPublishSidebarEnabled:v(I).isPublishSidebarEnabled(),isPublishSidebarOpened:v(I).isPublishSidebarOpened(),isScheduled:v(I).isCurrentPostScheduled(),postStatus:v(I).getEditedPostAttribute("status"),postStatusHasChanged:v(I).getPostEdits()?.status,postType:v(I).getCurrentPostType()}),[]);return g===Pl||c||h&&!["future","publish"].includes(m)||f&&s||l&&!i&&!o?r=jq:o||u?r=Uke:r=jq,(0,Gke.jsx)(zS,{forceIsDirty:e,isOpen:d,isToggle:r===Uke,onToggle:n,setEntitiesSavedStatesCallback:t})}var qke=a(j(),1),Kke=a(G(),1);var Zke=a(ae(),1),Xke=a(Y(),1),Qke=a(Dt(),1);var Jke=a(E(),1);function $ke(){let{hasLoaded:e,permalink:t,isPublished:r,label:o,showIconLabels:n}=(0,Xke.useSelect)(i=>{let s=i(I).getCurrentPostType(),l=i(Zke.store).getPostType(s),{get:c}=i(Qke.store);return{permalink:i(I).getPermalink(),isPublished:i(I).isCurrentPostPublished(),label:l?.labels?.view_item,hasLoaded:!!l,showIconLabels:c("core","showIconLabels")}},[]);return!r||!t||!e?null:(0,Jke.jsx)(Kke.Button,{icon:hs,label:o||(0,qke.__)("View post"),href:t,target:"_blank",showTooltip:!n,size:"compact"})}var eRe=a(Te(),1),ja=a(G(),1),Pi=a(j(),1);var _x=a(Y(),1),tRe=a(ae(),1),rRe=a(Dt(),1);var zq=a(be(),1);var ls={document:"edit-post/document",block:"edit-post/block"};var Bn=a(E(),1),{getViewportBreakpoints:Plt}=K(Du);function oRe({forceIsAutosaveable:e,disabled:t}){let{deviceType:r,homeUrl:o,hasMobileViewport:n,hasTabletViewport:i,isTemplate:s,isViewable:l,showIconLabels:c,isTemplateHidden:u,templateId:d,isResponsiveEditing:f,hasBlockSelection:m,activeComplementaryArea:h}=(0,_x.useSelect)(N=>{let{getCurrentPostType:L,getCurrentTemplateId:F,getRenderingMode:D,getDeviceType:z}=K(N(I)),{isResponsiveEditing:B,getBlockSelectionStart:O,getSettings:V}=K(N(zq.store)),{getEntityRecord:W,getPostType:q}=N(tRe.store),{get:Z}=N(rRe.store),Q=L(),ce=Plt(V().__experimentalFeatures?.viewport);return{deviceType:z(),homeUrl:W("root","__unstableBase")?.home,hasMobileViewport:ce.mobile!==void 0,hasTabletViewport:ce.tablet!==void 0,isTemplate:Q==="wp_template",isViewable:q(Q)?.viewable??!1,showIconLabels:Z("core","showIconLabels"),isTemplateHidden:D()==="post-only",templateId:F(),isResponsiveEditing:B(),hasBlockSelection:!!O(),activeComplementaryArea:N(He).getActiveComplementaryArea("core")}},[]),{setDeviceType:g,setRenderingMode:v,setDefaultRenderingMode:b}=K((0,_x.useDispatch)(I)),{resetZoomLevel:_,setStyleStateViewport:y,setResponsiveEditing:w}=K((0,_x.useDispatch)(zq.store)),{enableComplementaryArea:S}=(0,_x.useDispatch)(He),x=N=>{g(N),_()},C=()=>{let N=!f;w(N),y(N?k2[r]??"default":"default"),N&&m&&!h&&S("core",ls.block)};if((0,eRe.useViewportMatch)("medium","<"))return null;let k={placement:"bottom-end"},R={className:"editor-preview-dropdown__toggle",iconPosition:"right",size:"compact",showTooltip:!c,disabled:t,accessibleWhenDisabled:t},M={"aria-label":(0,Pi.__)("View options")},P={desktop:lR,mobile:h0,tablet:a2},T=[{value:"Desktop",label:(0,Pi.__)("Desktop"),icon:lR,info:f?(0,Pi.__)("Style all viewports."):(0,Pi.__)("Preview desktop viewport.")},...i?[{value:"Tablet",label:(0,Pi.__)("Tablet"),icon:a2,info:f?(0,Pi.__)("Style tablet only."):(0,Pi.__)("Preview tablet viewport.")}]:[],...n?[{value:"Mobile",label:(0,Pi.__)("Mobile"),icon:h0,info:f?(0,Pi.__)("Style mobile only."):(0,Pi.__)("Preview mobile viewport.")}]:[]];return(0,Bn.jsx)(ja.DropdownMenu,{className:J("editor-preview-dropdown",`editor-preview-dropdown--${r.toLowerCase()}`,{"is-responsive-editing":f}),popoverProps:k,toggleProps:R,menuProps:M,icon:P[r.toLowerCase()],label:(0,Pi.__)("View"),disableOpenOnArrowDown:t,children:({onClose:N})=>(0,Bn.jsxs)(Bn.Fragment,{children:[(0,Bn.jsx)(ja.MenuGroup,{children:(0,Bn.jsx)(ja.MenuItemsChoice,{choices:T,value:r,onSelect:x})}),(0,Bn.jsx)(ja.MenuGroup,{children:(0,Bn.jsx)(ja.MenuItem,{icon:f?Io:void 0,isSelected:f,role:"menuitemcheckbox",onClick:C,info:(0,Pi.__)("Style changes apply only to the selected viewport."),children:(0,Pi.__)("Responsive styles")})}),s&&(0,Bn.jsx)(ja.MenuGroup,{children:(0,Bn.jsxs)(ja.MenuItem,{href:o,target:"_blank",icon:hs,onClick:N,children:[(0,Pi.__)("View site"),(0,Bn.jsx)(Gt,{render:(0,Bn.jsx)("span",{}),children:(0,Pi.__)("(opens in a new tab)")})]})}),!s&&!!d&&(0,Bn.jsx)(ja.MenuGroup,{children:(0,Bn.jsx)(ja.MenuItem,{icon:u?void 0:Io,isSelected:!u,role:"menuitemcheckbox",onClick:()=>{let L=u?"template-locked":"post-only";v(L),b(L),_()},children:(0,Pi.__)("Show template")})}),l&&(0,Bn.jsx)(ja.MenuGroup,{children:(0,Bn.jsx)(JCe,{forceIsAutosaveable:e,onPreview:N})}),(0,Bn.jsx)(Yl.Slot,{name:"core/plugin-preview-menu",fillProps:{onClick:N}})]})})}var nRe=a(G(),1),Hq=a(j(),1),iRe=a(U(),1),FP=a(Y(),1),Uq=a(be(),1);var Wq=a(Dt(),1),FD=a(xa(),1),sRe=a(Mo(),1);var aRe=a(E(),1),klt=({disabled:e})=>{let{isZoomOut:t,showIconLabels:r,isDistractionFree:o}=(0,FP.useSelect)(u=>({isZoomOut:K(u(Uq.store)).isZoomOut(),showIconLabels:u(Wq.store).get("core","showIconLabels"),isDistractionFree:u(Wq.store).get("core","distractionFree")})),{resetZoomLevel:n,setZoomLevel:i}=K((0,FP.useDispatch)(Uq.store)),{registerShortcut:s,unregisterShortcut:l}=(0,FP.useDispatch)(FD.store);return(0,iRe.useEffect)(()=>(s({name:"core/editor/zoom",category:"global",description:(0,Hq.__)("Enter or exit zoom out."),keyCombination:{modifier:(0,sRe.isAppleOS)()?"primaryShift":"secondary",character:"0"}}),()=>{l("core/editor/zoom")}),[s,l]),(0,FD.useShortcut)("core/editor/zoom",()=>{t?n():i("auto-scaled")},{isDisabled:o}),(0,aRe.jsx)(nRe.Button,{accessibleWhenDisabled:!0,disabled:e,onClick:()=>{t?n():i("auto-scaled")},icon:WV,label:(0,Hq.__)("Zoom Out"),isPressed:t,size:"compact",showTooltip:!r,className:"editor-zoom-out-toggle"})},lRe=klt;var QRe=a(G(),1),Ex=a(U(),1),JRe=a(ae(),1),QD=a(j(),1);var dRe=a(G(),1),fRe=a(U(),1);var Sx=a(U(),1);function cRe(e){let[t,r]=(0,Sx.useState)(e),[o,n]=(0,Sx.useState)(e?"loading":"idle");t!==e&&(r(e),n(e?"loading":"idle"));let i=(0,Sx.useCallback)(()=>n("loaded"),[]),s=(0,Sx.useCallback)(()=>n("error"),[]);return{status:o,handleLoad:i,handleError:s}}var wu=a(E(),1);S2([eM]);var uRe="#1e1e1e",Rlt="#fff";function Alt({className:e,src:t,name:r,label:o,variant:n,size:i="default",borderColor:s,dimmed:l=!1,statusIndicator:c,style:u,...d}){let{status:f,handleLoad:m,handleError:h}=cRe(t),g=f==="loaded",v=n==="badge"&&!!r,b=r?r.split(/\s+/).slice(0,2).map(S=>S[0]).join("").toUpperCase():void 0,_=(0,fRe.useMemo)(()=>s&&Oo(s).isReadable(uRe,{level:"AA",size:"normal"})?uRe:Rlt,[s]),y={...u,...s?{"--editor-avatar-outline-color":s,"--editor-avatar-name-color":_}:{}},w=(0,wu.jsxs)("div",{className:J("editor-avatar",e,{"has-avatar-border-color":!!s,"has-src":g,"is-badge":v,"is-small":i==="small","is-dimmed":l}),style:y,role:r?"img":void 0,"aria-label":r||void 0,...d,children:[(0,wu.jsxs)("span",{className:"editor-avatar__image",children:[t&&(0,wu.jsx)("img",{src:t,alt:"",crossOrigin:"anonymous",className:"editor-avatar__img",onLoad:m,onError:h}),!g&&b]}),l&&!!c&&(0,wu.jsx)("span",{className:"editor-avatar__status-indicator",children:(0,wu.jsx)(dRe.Icon,{icon:c})}),v&&(0,wu.jsx)("span",{className:"editor-avatar__name",children:o||r})]});return r&&(!v||o)?(0,wu.jsxs)(Ze.Root,{children:[(0,wu.jsx)(Ze.Trigger,{render:w}),(0,wu.jsx)(Ze.Popup,{children:r})]}):w}var em=Alt;var pRe=a(U(),1),DD=a(j(),1),LD=a(E(),1);function Ilt({className:e,max:t=3,children:r,...o}){let n=pRe.Children.toArray(r),i=n.slice(0,t),s=n.length-t;return(0,LD.jsxs)("div",{role:"group",className:J("editor-avatar-group",e),...o,children:[i,s>0&&(0,LD.jsx)("span",{className:"editor-avatar-group__overflow","aria-label":(0,DD.sprintf)((0,DD._n)("%d more collaborator","%d more collaborators",s),s),children:`+${s}`})]})}var Gq=Ilt;var VP=a(j(),1),jD=a(G(),1);var kRe=a(Ol(),1);function tm(e){return e?.["48"]||e?.["96"]||e?.["24"]}var gRe=a(j(),1),Ug=a(hd(),1),vRe=a(Mp(),1);function bRe(e){return e.trim()}var DP=-16,Olt=16,mRe=20,hRe=["#6F42C1","#D94145","#FBBF24","#FF35EE","#879F11","#0F766E","#00CFFF"];function za(e){return hRe[e%hRe.length]}function yRe(e,t=10){if(!e)return"";let r=(0,gRe._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 s=o.split("",t).join(""),l=s.length-s.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 Wg(e){let t=e?.noteId,r=Array.isArray(t)?t:[t],o=new Set;for(let n of r){let i=Number(n);Number.isFinite(i)&&i>0&&o.add(i)}return[...o]}function wRe(e,t){let r=new Set(Wg(e)),o=Number(t);return r.has(o)?e:(r.add(o),{...e,noteId:[...r]})}var LP="core/note";function Nlt(e,t){if(t==null)return null;let r=null;if(e instanceof Ug.RichTextData?r=e.toHTMLString():typeof e=="string"&&(r=e),!r||r.indexOf("wp-note")===-1)return null;let o=String(t),i=(0,Ug.create)({html:r}).formats,s=-1;for(let l=0;l<i.length;l++)if(i[l]?.find(d=>d.type===LP&&d.attributes&&d.attributes["data-id"]===o))s===-1&&(s=l);else if(s!==-1)return{start:s,end:l};return s!==-1?{start:s,end:i.length}:null}function BD(e,t){if(!e)return null;for(let r of Object.keys(e)){let o=Nlt(e[r],t);if(o)return{attributeKey:r,start:o.start,end:o.end}}return null}function VD(e){return`mark.wp-note[data-id="${String(e).replace(/["\\\n\r\f]/g,r=>r==='"'||r==="\\"?`\\${r}`:`\\${r.codePointAt(0).toString(16)} `)}"]`}function _Re(e){let t=e.ownerDocument.defaultView?.getSelection();if(!t||t.rangeCount===0||t.isCollapsed)return null;let r=t.getRangeAt(0);if(r.collapsed||!e.contains(r.commonAncestorContainer))return null;let o=(0,vRe.getRectangleFromRange)(r);return!o||o.width===0&&o.height===0?null:o}var Mlt=-1;function SRe(e,t){let r=BD(t,e?.id);return r?r.start:Mlt}function xRe(e,t,r,o){let n=e.formats.slice();for(let l=r;l<o;l++){let c=n[l]?n[l].slice():[];c.push(t),n[l]=c}let i=new Map;for(let l=0;l<n.length;l++){let c=n[l];if(c)for(let u of c){if(u.type!==LP)continue;let d=u.attributes?.["data-id"],f=i.get(d);f?f.end=l:i.set(d,{start:l,end:l})}}let s=l=>{let c=i.get(l);return c?c.end-c.start:0};for(let l=0;l<n.length;l++){let c=n[l];if(!c||c.length<2)continue;let u=c.filter(f=>f.type===LP);if(u.length===0)continue;u.length>1&&u.sort((f,m)=>s(m.attributes?.["data-id"])-s(f.attributes?.["data-id"]));let d=c.filter(f=>f.type!==LP);n[l]=[...u,...d]}return{...e,formats:n}}function Yq(e,t){if(!(e instanceof Ug.RichTextData))return null;let r=String(t),o=(0,Ug.create)({html:e.toHTMLString()}),n=!1,i=o.formats.map(s=>{if(!s)return s;let l=s.filter(c=>!(c.type===LP&&c.attributes?.["data-id"]===r));return l.length===s.length?s:(n=!0,l.length?l:void 0)});return n?Ug.RichTextData.fromHTMLString(new Ug.RichTextData({...o,formats:i}).toHTMLString()):null}function BP(e){return e.find(t=>t.status==="hold")??e[0]??null}function CRe(e,t){let r=new Set(Wg(e));return r.delete(Number(t)),{...e,noteId:r.size>0?[...r]:void 0}}function TRe({threads:e,selectedNoteId:t,blockRects:r,heights:o,scrollTop:n=0}){let i={},s=[...e].sort((b,_)=>(r[b.id]?.top??Number.MAX_VALUE)-(r[_.id]?.top??Number.MAX_VALUE)),l=Math.max(0,s.findIndex(b=>b.id===t)),c=s[l];if(!c||!r[c.id])return{positions:{}};let d=r[c.id].top||0,f=o[c.id]||0;i[c.id]=DP;let m=d+DP,h=f;for(let b=l+1;b<s.length;b++){let _=s[b],y=r[_.id];if(!y)continue;let w=y.top||0,S=o[_.id]||0,x=DP,C=m+h;w<C+Olt&&(x=C-w+mRe),i[_.id]=x,m=w+x,h=S}let g=d+DP;for(let b=l-1;b>=0;b--){let _=s[b],y=r[_.id];if(!y)continue;let w=y.top||0,S=o[_.id]||0,x=DP;w+S>g&&(x=g-w-S-mRe),i[_.id]=x,g=w+x}let v={};for(let b of s){let _=r[b.id];_&&i[b.id]!==void 0&&(v[b.id]=_.top+n+i[b.id])}return{positions:v}}function ERe(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 s=null,l=new window.MutationObserver(()=>{t.querySelector(n)&&(clearTimeout(s),l.disconnect(),i(t.querySelector(n)))});l.observe(t,{childList:!0,subtree:!0}),s=setTimeout(()=>{l.disconnect(),i(null)},3e3)})}function cs(e,t,r){return ERe(e,t,r).then(o=>{o&&(o.focus(),o.scrollIntoView({block:"nearest"}))})}function PRe(e,t){return ERe(e,t).then(r=>{r?.scrollIntoView({block:"nearest"})})}var Ha=a(E(),1);function RRe({activeCollaborators:e,popoverAnchor:t,setIsPopoverVisible:r,cursorRegistry:o}){let n=i=>{o.scrollToCursor(i,{behavior:"smooth",block:"center",highlightDuration:2e3})&&((0,kRe.speak)((0,VP.__)("Scrolled to cursor"),"polite"),r(!1))};return(0,Ha.jsx)(jD.Popover,{anchor:t,placement:"bottom",offset:8,className:"editor-collaborators-presence__list",onClose:()=>r(!1),children:(0,Ha.jsxs)("div",{className:"editor-collaborators-presence__list-content",children:[(0,Ha.jsxs)("div",{className:"editor-collaborators-presence__list-header",children:[(0,Ha.jsxs)("div",{className:"editor-collaborators-presence__list-header-title",children:[(0,VP.__)("Collaborators"),(0,Ha.jsx)("span",{children:e.length})]}),(0,Ha.jsx)("div",{className:"editor-collaborators-presence__list-header-action",children:(0,Ha.jsx)(jD.Button,{__next40pxDefaultSize:!0,icon:Mi,iconSize:24,label:(0,VP.__)("Close Collaborators List"),onClick:()=>r(!1)})})]}),(0,Ha.jsx)("div",{className:"editor-collaborators-presence__list-items",children:e.map(i=>{let s=i.isMe;return(0,Ha.jsxs)("button",{className:"editor-collaborators-presence__list-item",disabled:s,onClick:()=>n(i.clientId),children:[(0,Ha.jsx)(em,{src:tm(i.collaboratorInfo.avatar_urls),name:i.collaboratorInfo.name,borderColor:s?"var(--wp-admin-theme-color)":za(i.collaboratorInfo.id),dimmed:!i.isConnected}),(0,Ha.jsx)("div",{className:"editor-collaborators-presence__list-item-info",children:(0,Ha.jsx)("div",{className:"editor-collaborators-presence__list-item-name",children:s?(0,VP.__)("You"):i.collaboratorInfo.name})})]},i.clientId)})})]})})}function Flt(e,t){e.classList.add("collaborators-overlay-cursor-highlighted"),setTimeout(()=>{e.classList.remove("collaborators-overlay-cursor-highlighted")},t)}function ARe(){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&&Flt(o,r.highlightDuration),!0):!1},removeAll(){e.clear()}}}var XRe=a(be(),1);var ZD=a(Te(),1),_u=a(U(),1),KRe=a(j(),1);var zD="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)",qq="9999px",Kq="32px",Zq="24px",HD="4px",UD="8px",Xq="1px",IRe="2px",Gg="#fff",ORe="11px",NRe="13px",Qq="var(--wpds-typography-font-weight-emphasis, 600)",MRe="20px";var FRe=`
.editor-avatar {
	position: relative;
	display: inline-flex;
	align-items: center;
	border-radius: ${qq};
	flex-shrink: 0;
	box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 2px) ${Gg}, ${zD};
}
.editor-avatar__image {
	box-sizing: border-box;
	position: relative;
	width: ${Kq};
	height: ${Kq};
	border-radius: ${qq};
	border: 0;
	background-color: var(--wp-admin-theme-color, #3858e9);
	overflow: hidden;
	overflow: clip;
	flex-shrink: 0;
	font-size: 0;
	color: ${Gg};
}
.is-small > .editor-avatar__image {
	width: ${Zq};
	height: ${Zq};
}
.has-avatar-border-color > .editor-avatar__image {
	border: var(--wp-admin-border-width-focus, 2px) solid var(--editor-avatar-outline-color);
	background-clip: padding-box;
}
.has-avatar-border-color > .editor-avatar__image::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus, 2px) ${Gg};
	pointer-events: none;
	z-index: 1;
}
.editor-avatar__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
	opacity: 0;
}
.has-src > .editor-avatar__image > .editor-avatar__img {
	opacity: 1;
}
.editor-avatar:not(.has-src) > .editor-avatar__image {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: ${ORe};
	font-weight: ${Qq};
	border: 0;
	background-clip: border-box;
}
.editor-avatar:not(.has-src) > .editor-avatar__image::after {
	content: none;
}
.editor-avatar:not(.has-src).has-avatar-border-color > .editor-avatar__image {
	background-color: var(--editor-avatar-outline-color);
}
.editor-avatar__name {
	font-size: ${NRe};
	font-weight: ${Qq};
	line-height: ${MRe};
	color: var(--editor-avatar-name-color, ${Gg});
	min-width: 0;
	padding-bottom: 2px; /* $grid-unit-05 / 2 */
	overflow: hidden;
	opacity: 0;
	white-space: nowrap;
	transition: opacity 0.15s cubic-bezier(0.15, 0, 0.15, 1);
}
.editor-avatar.is-badge {
	display: inline-grid;
	grid-template-columns: min-content 0fr;
	column-gap: 0;
	padding-inline-end: 0;
	background-color: var(--wp-admin-theme-color, #3858e9);
	transition:
		grid-template-columns 0.3s cubic-bezier(0.15, 0, 0.15, 1),
		column-gap 0.3s cubic-bezier(0.15, 0, 0.15, 1),
		padding-inline-end 0.3s cubic-bezier(0.15, 0, 0.15, 1);
}
.editor-avatar.is-badge:hover {
	grid-template-columns: min-content 1fr;
	column-gap: ${HD};
	padding-inline-end: ${UD};
	transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);
}
.editor-avatar.is-badge:hover .editor-avatar__name {
	opacity: 1;
	transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);
}
.editor-avatar.is-badge.has-avatar-border-color {
	background-color: var(--editor-avatar-outline-color);
}
@media (prefers-reduced-motion: reduce) {
	.editor-avatar.is-badge,
	.editor-avatar__name {
		transition: none;
	}
}
`;var DRe=`
.block-canvas-cover {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 20000;
}
.block-canvas-cover .collaborators-overlay-full {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
.block-canvas-cover .collaborators-overlay-fixed {
	position: fixed;
	width: 100%;
	height: 100%;
}
.collaborators-overlay-user {
	position: absolute;
}
/* Cursor lines render below avatar labels across all users. The parent
   .collaborators-overlay-user has no z-index so it does not create a
   stacking context \u2014 children participate in the shared overlay context. */
.collaborators-overlay-user-cursor {
	position: absolute;
	z-index: 0;
	width: ${IRe};
	border-radius: ${Xq};
	outline: ${Xq} solid ${Gg};
	box-shadow: ${zD};
	animation: collaborators-overlay-cursor-blink 1s infinite;
}
.collaborators-overlay-selection-rect {
	position: absolute;
	opacity: 0.15;
	pointer-events: none;
	border-radius: 2px;
}

/* Overlay-specific positioning applied to the Avatar cursor label. */
.collaborators-overlay-user-label.editor-avatar {
	position: absolute;
	z-index: 1;
	transform: translate(-11px, -100%);
	margin-top: -${HD};
	pointer-events: auto;
	overflow: visible;
	width: max-content;
}
/* Avatar positioned above a highlighted block as a label. */
.collaborators-overlay-block-label.editor-avatar {
	position: absolute;
	z-index: 1;
	transform: translateY(calc(-100% - ${UD}));
	pointer-events: auto;
	overflow: visible;
	width: max-content;
}

@keyframes collaborators-overlay-cursor-blink {
	0%, 45% { opacity: 1; }
	55%, 95% { opacity: 0; }
	100% { opacity: 1; }
}
.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-cursor {
	animation: collaborators-overlay-cursor-highlight 0.6s ease-in-out 3;
}
.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-label {
	animation: collaborators-overlay-label-highlight 0.6s ease-in-out 3;
}
@keyframes collaborators-overlay-cursor-highlight {
	0%, 100% {
		transform: scale(1);
		filter: drop-shadow(0 0 0 transparent);
	}
	50% {
		transform: scale(1.2);
		filter: drop-shadow(0 0 8px currentColor);
	}
}
@keyframes collaborators-overlay-label-highlight {
	0%, 100% {
		transform: translate(-11px, -100%) scale(1);
		filter: drop-shadow(0 0 0 transparent);
	}
	50% {
		transform: translate(-11px, -100%) scale(1.1);
		filter: drop-shadow(0 0 6px currentColor);
	}
}
.block-editor-block-list__block.is-collaborator-selected:not(:focus)::after {
	content: "";
	position: absolute;
	pointer-events: none;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	outline-color: var(--collaborator-outline-color);
	outline-style: solid;
	outline-width: calc(var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
	outline-offset: calc(-1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
	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(${Gg}, 0.7);
	z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
	.collaborators-overlay-user-label,
	.collaborators-overlay-user-cursor {
		animation: none;
	}
}
`;function LRe(e,t){let r=null,o=()=>{try{e()}catch{}r=setTimeout(o,t)};return r=setTimeout(o,t),()=>{r&&clearTimeout(r)}}var $q=a(ae(),1),Cx=a(U(),1);var xx=a(U(),1);function WD(e){let[t,r]=(0,xx.useState)(0),o=(0,xx.useRef)(null),n=(0,xx.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:Dlt,useResolvedSelection:Llt}=K($q.privateApis),{SelectionType:Blt}=K($q.privateApis);function BRe(e,t,r,o,n){let i=(0,Cx.useRef)(new Set),s=Dlt(r??null,o??null),l=Llt(r??null,o??null),[c,u]=(0,Cx.useState)([]),[d,f]=WD(n);return(0,Cx.useEffect)(()=>{if(!t){u([]);return}let m=i.current,h=new Set,g=s.filter(y=>{let w=y.editorState?.selection?.type===Blt.WholeBlock;return!y.isMe&&w}).map(y=>{let w;try{({localClientId:w}=l(y.editorState?.selection))}catch{return null}return w?{blockId:w,color:y.isMe?"var(--wp-admin-theme-color)":za(y.collaboratorInfo.id),userName:y.collaboratorInfo.name,avatarUrl:tm(y.collaboratorInfo.avatar_urls)}:null}).filter(y=>!y||h.has(y.blockId)?!1:(h.add(y.blockId),!0)),v=new Set(g.map(y=>y.blockId));for(let y of m)if(!v.has(y)){let w=Jq(t,y);w&&(w.classList.remove("is-collaborator-selected"),w.style.removeProperty("--collaborator-outline-color")),m.delete(y)}let b=[],_=e?.getBoundingClientRect()??null;return g.forEach(y=>{let{color:w,blockId:S,userName:x,avatarUrl:C}=y,A=Jq(t,S);if(A&&(A.classList.add("is-collaborator-selected"),A.style.setProperty("--collaborator-outline-color",w),m.add(S),_)){let k=A.getBoundingClientRect();b.push({blockId:S,userName:x,avatarUrl:C,color:w,x:k.left-_.left,y:k.top-_.top})}}),u(b),()=>{for(let y of m){let w=Jq(t,y);w&&(w.classList.remove("is-collaborator-selected"),w.style.removeProperty("--collaborator-outline-color"))}m.clear()}},[s,t,e,d,l]),{highlights:c,rerenderHighlightsAfterDelay:f}}var Jq=(e,t)=>e.querySelector(`[data-block="${t}"]`);var tK=a(ae(),1),WRe=a(Y(),1),KD=a(U(),1),GRe=a(Dt(),1);var HRe=a(ae(),1);var Vlt=500,GD=(e,t,r,o)=>e===null||!t?null:jlt(t,e,r,o)??null,jlt=(e,t,r,o)=>{let{node:n,offset:i}=eK(e,t,r),s=r.createRange();try{s.setStart(n,i)}catch{return null}s.collapse(!0);let l=s.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}},YD=(e,t,r,o,n)=>{let i=t,s=r;i>s&&([i,s]=[s,i]);let l=eK(e,i,o),c=eK(e,s,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(b=>b.x===h&&b.y===g&&b.width===m.width&&b.height===m.height)||f.push({x:h,y:g,width:m.width,height:m.height})}return f.length>0?f:null},VRe=(e,t,r)=>{let o=t.createRange();o.selectNodeContents(e);let n=o.getClientRects(),i=[];for(let s of n)s.width===0&&s.height===0||i.push({x:s.left-r.left,y:s.top-r.top,width:s.width,height:s.height});if(i.length===0){let s=e.getBoundingClientRect();s.width>0&&s.height>0&&i.push({x:s.left-r.left,y:s.top-r.top,width:s.width,height:s.height})}return i},jRe=(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 s=[];for(let l=n+1;l<i;l++)s.push(o[l]);return s},eK=(e,t,r)=>{let o=r.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT),n=0,i=null,s=null,l=1;for(;s=o.nextNode();){if(l++,l>Vlt)return i?{node:i,offset:0}:{node:e,offset:0};let c=s.nodeValue?.length??0;if(s.nodeType===Node.ELEMENT_NODE)if(s.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:s,offset:t-n};n+=c,s.nodeType===Node.TEXT_NODE&&(i=s)}}return i&&i.nodeValue?.length?{node:i,offset:i.nodeValue.length}:{node:e,offset:0}},zRe=(e,t)=>e.compareDocumentPosition(t)===Node.DOCUMENT_POSITION_FOLLOWING;var{SelectionDirection:zlt,SelectionType:qD}=K(HRe.privateApis);function jP(e,t){if(!t.localClientId)return null;let r=e.querySelector(`[data-block="${t.localClientId}"]`);if(!r||!t.attributeKey)return r;let o=CSS.escape(t.attributeKey);return r.querySelector(`[data-wp-block-attribute-key="${o}"]`)??r}function URe(e,t,r,o){return e.type===qD.None||e.type===qD.WholeBlock?{}:e.type===qD.Cursor?Hlt(t,o):r?Ult(e,t,r,o):{}}function Hlt(e,t){if(!e.localClientId)return{};let r=jP(t.editorDocument,e);return{coords:GD(e.richTextOffset,r,t.editorDocument,t.overlayRect)}}function Ult(e,t,r,o){if(!t.localClientId||!r.localClientId||t.richTextOffset===null||r.richTextOffset===null)return{};let i=e.selectionDirection===zlt.Backward?t:r,s,l=null;if(e.type===qD.SelectionInOneBlock){let u=Wlt(t,r,o);s=u.rects,l=u.blockElement}else{let u=Glt(t,r,o);s=u.rects,l=i.localClientId===u.firstBlockClientId?u.firstBlock:u.lastBlock}if(s.length>0)return{coords:GD(i.richTextOffset,l,o.editorDocument,o.overlayRect),selectionRects:s};let c=jP(o.editorDocument,t);return{coords:GD(t.richTextOffset,c,o.editorDocument,o.overlayRect)}}function Wlt(e,t,r){let o=jP(r.editorDocument,e);return!o||e.richTextOffset===null||t.richTextOffset===null?{rects:[],blockElement:null}:{rects:YD(o,e.richTextOffset,t.richTextOffset,r.editorDocument,r.overlayRect)??[],blockElement:o}}function Glt(e,t,r){let o=e,n=t,i=jP(r.editorDocument,o),s=jP(r.editorDocument,n);if(i&&s&&zRe(s,i)&&(o=t,n=e,[i,s]=[s,i]),!i||!s||o.richTextOffset===null||n.richTextOffset===null||!o.localClientId||!n.localClientId)return{rects:[],firstBlock:null,lastBlock:null,firstBlockClientId:null};let l=[],c=YD(i,o.richTextOffset,Number.MAX_SAFE_INTEGER,r.editorDocument,r.overlayRect);c&&l.push(...c);let u=jRe(o.localClientId,n.localClientId,r.editorDocument);for(let f of u){let m=VRe(f,r.editorDocument,r.overlayRect);l.push(...m)}let d=YD(s,0,n.richTextOffset,r.editorDocument,r.overlayRect);return d&&l.push(...d),{rects:l,firstBlock:i,lastBlock:s,firstBlockClientId:o.localClientId}}var{useActiveCollaborators:Ylt,useResolvedSelection:qlt}=K(tK.privateApis),{SelectionType:Tx}=K(tK.privateApis);function YRe(e,t,r,o,n){let i=Ylt(r??null,o??null),s=qlt(r??null,o??null),l=(0,WRe.useSelect)(m=>m(GRe.store).get("core","showCollaborationCursor"),[]),[c,u]=(0,KD.useState)([]),[d,f]=WD(n);return(0,KD.useEffect)(()=>{if(!e||!t){u([]);return}let m=e.getBoundingClientRect(),h={editorDocument:t,overlayRect:m},g=[],v=i.some(b=>!b.isMe);i.forEach(b=>{if(b.isMe&&(!l||!v))return;let _=b.editorState?.selection??{type:Tx.None},y={richTextOffset:null,localClientId:null,attributeKey:null},w;if(_.type===Tx.Cursor)try{y=s(_)}catch{return}else if(_.type===Tx.SelectionInOneBlock||_.type===Tx.SelectionInMultipleBlocks)try{y=s({type:Tx.Cursor,cursorPosition:_.cursorStartPosition}),w=s({type:Tx.Cursor,cursorPosition:_.cursorEndPosition})}catch{return}let S=b.collaboratorInfo.name,x=b.clientId,C=b.isMe?"var(--wp-admin-theme-color)":za(b.collaboratorInfo.id),A=tm(b.collaboratorInfo.avatar_urls),k=URe(_,y,w,h);if(k.coords){let R={userName:S,clientId:x,color:C,avatarUrl:A,isMe:b.isMe,...k.coords};k.selectionRects&&(R.selectionRects=k.selectionRects),g.push(R)}}),u(g)},[t,s,e,i,l,d]),{cursors:c,rerenderCursorsAfterDelay:f}}var tf=a(E(),1),qRe=500,Klt=1e4;function ZRe({blockEditorDocument:e,postId:t,postType:r,cursorRegistry:o}){let[n,i]=(0,_u.useState)(null),{cursors:s,rerenderCursorsAfterDelay:l}=YRe(n,e??null,t??null,r??null,qRe),{highlights:c,rerenderHighlightsAfterDelay:u}=BRe(n,e??null,t??null,r??null,qRe),d=(0,_u.useCallback)(()=>{l(),u()},[l,u]),f=(0,ZD.useResizeObserver)(d);(0,_u.useEffect)(()=>{let v=l(),b=u();return()=>{v(),b()}},[l,u]),(0,_u.useEffect)(()=>{if(s.length!==0)return LRe(l,Klt)},[s.length,l]);let m=(0,ZD.useMergeRefs)([i,f]),h=(0,_u.useRef)(new Map);(0,_u.useEffect)(()=>{if(!o)return;let v=h.current,b=new Set(s.map(_=>_.clientId));for(let _ of v.keys())b.has(_)||(o.unregisterCursor(_),v.delete(_));for(let[_,y]of v.entries())o.registerCursor(_,y);return()=>o.removeAll()},[s,o]);let g=(0,_u.useCallback)(v=>b=>{b?h.current.set(v,b):h.current.delete(v)},[]);return(0,tf.jsxs)("div",{className:"collaborators-overlay-full",ref:m,children:[(0,tf.jsx)("style",{children:FRe+DRe}),s.map(v=>(0,tf.jsxs)("div",{children:[!v.isMe&&v.selectionRects?.map((b,_)=>(0,tf.jsx)("div",{className:"collaborators-overlay-selection-rect",style:{left:`${b.x}px`,top:`${b.y}px`,width:`${b.width}px`,height:`${b.height}px`,backgroundColor:v.color}},`${v.clientId}-sel-${_}`)),(0,tf.jsxs)("div",{ref:g(v.clientId),className:"collaborators-overlay-user",style:{left:`${v.x}px`,top:`${v.y}px`},children:[!v.isMe&&(0,tf.jsx)("div",{className:"collaborators-overlay-user-cursor",style:{backgroundColor:v.color,height:`${v.height}px`}}),(0,tf.jsx)(em,{className:"collaborators-overlay-user-label",variant:"badge",size:"small",src:v.avatarUrl,name:v.userName,label:v.isMe?(0,KRe.__)("You"):void 0,borderColor:v.color})]})]},v.clientId)),c.map(v=>(0,tf.jsx)(em,{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 rK=a(E(),1),{BlockCanvasCover:Zlt}=K(XRe.privateApis);function XD({postId:e,postType:t,cursorRegistry:r}){return(0,rK.jsx)(Zlt.Fill,{children:({containerRef:o})=>(0,rK.jsx)(ZRe,{blockEditorDocument:o.current?.ownerDocument,postId:e,postType:t,cursorRegistry:r})})}var dc=a(E(),1),{useActiveCollaborators:Xlt}=K(JRe.privateApis);function oK({postId:e,postType:t}){let r=Xlt(e,t),o=r.filter(f=>!f.isMe),n=(0,Ex.useMemo)(()=>[...r].sort((f,m)=>f.isMe&&!m.isMe?-1:!f.isMe&&m.isMe?1:0),[r]),[i]=(0,Ex.useState)(ARe),[s,l]=(0,Ex.useState)(!1),[c,u]=(0,Ex.useState)(null);if(o.length===0)return null;let d=r.find(f=>f.isMe);return(0,dc.jsxs)(dc.Fragment,{children:[(0,dc.jsxs)("div",{className:"editor-collaborators-presence",children:[(0,dc.jsx)(QRe.Button,{__next40pxDefaultSize:!0,className:"editor-collaborators-presence__button",onClick:()=>l(!s),isPressed:s,ref:u,"aria-label":(0,QD.sprintf)((0,QD.__)("Collaborators list, %d online"),n.length),children:(0,dc.jsxs)(Gq,{max:4,children:[d&&(0,dc.jsx)(em,{src:tm(d.collaboratorInfo.avatar_urls),name:d.collaboratorInfo.name,borderColor:"var(--wp-admin-theme-color)",size:"small"},d.clientId),o.map(f=>(0,dc.jsx)(em,{src:tm(f.collaboratorInfo.avatar_urls),name:f.collaboratorInfo.name,borderColor:za(f.collaboratorInfo.id),size:"small"},f.clientId))]})}),s&&(0,dc.jsx)(RRe,{activeCollaborators:n,popoverAnchor:c,setIsPopoverVisible:l,cursorRegistry:i})]}),(0,dc.jsx)(XD,{postId:e,postType:t,cursorRegistry:i})]})}var ko=a(E(),1);function Qlt({customSaveButton:e,forceIsDirty:t,setEntitiesSavedStatesCallback:r}){let o=(0,zP.useViewportMatch)("large"),n=(0,zP.useViewportMatch)("medium"),i=(0,zP.useMediaQuery)("(max-width: 403px)"),{postId:s,postType:l,isTextEditor:c,isPublishSidebarOpened:u,showIconLabels:d,hasFixedToolbar:f,hasBlockSelection:m,hasSectionRootClientId:h,isStylesCanvasActive:g}=(0,e2e.useSelect)(w=>{let{get:S}=w(t2e.store),{getEditorMode:x,getCurrentPostType:C,getCurrentPostId:A,isPublishSidebarOpened:k}=w(I),{getStylesPath:R,getShowStylebook:M}=K(w(I)),{getBlockSelectionStart:P,getSectionRootClientId:T}=K(w($Re.store));return{postId:A(),postType:C(),isTextEditor:x()==="text",isPublishSidebarOpened:k(),showIconLabels:S("core","showIconLabels"),hasFixedToolbar:S("core","fixedToolbar"),hasBlockSelection:!!P(),hasSectionRootClientId:!!T(),isStylesCanvasActive:!!R()?.startsWith("/revisions")||M()}},[]),v=["post","page","wp_template"].includes(l)&&h,[b,_]=(0,r2e.useState)(!0),y=!i&&(!f||f&&(!m||b));return(0,ko.jsx)(PD,{toolbar:(0,ko.jsxs)(ko.Fragment,{children:[(0,ko.jsx)(Rke,{disableBlockTools:g||c}),f&&n&&(0,ko.jsx)(Cke,{isCollapsed:b,onToggle:_})]}),center:y?(0,ko.jsxs)(ko.Fragment,{children:[(0,ko.jsx)(oK,{postType:l,postId:s}),(0,ko.jsx)(z3,{})]}):void 0,settings:(0,ko.jsxs)(ko.Fragment,{children:[!y&&!i&&(0,ko.jsx)(oK,{postType:l,postId:s}),!e&&!u&&(0,ko.jsx)(LF,{forceIsDirty:t}),(0,ko.jsx)($ke,{}),(0,ko.jsx)(oRe,{forceIsAutosaveable:t,disabled:g}),(0,ko.jsx)(jS,{className:"editor-header__post-preview-button",forceIsAutosaveable:t}),o&&v&&(0,ko.jsx)(lRe,{disabled:g}),(o||!d)&&(0,ko.jsx)(Wh.Slot,{scope:"core"}),!e&&(0,ko.jsx)(Yke,{forceIsDirty:t,setEntitiesSavedStatesCallback:r}),e,(0,ko.jsx)(ND,{})]})})}var o2e=Qlt;var HP=a(Y(),1),$D=a(be(),1),n2e=a(Te(),1),UP=a(U(),1),i2e=a(Dt(),1),s2e=a(Mo(),1);var JD=a(E(),1),{PrivateInserterLibrary:Jlt}=K($D.privateApis);function a2e(){let{blockSectionRootClientId:e,inserterSidebarToggleRef:t,inserter:r,showMostUsedBlocks:o,sidebarIsOpened:n}=(0,HP.useSelect)(m=>{let{getInserterSidebarToggleRef:h,getInserter:g,isPublishSidebarOpened:v}=K(m(I)),{getBlockRootClientId:b,isZoomOut:_,getSectionRootClientId:y}=K(m($D.store)),{get:w}=m(i2e.store),{getActiveComplementaryArea:S}=m(He),x=()=>{if(_()){let C=y();if(C)return C}return b()};return{inserterSidebarToggleRef:h(),inserter:g(),showMostUsedBlocks:w("core","mostUsedBlocks"),blockSectionRootClientId:x(),sidebarIsOpened:!!(S("core")||v())}},[]),{setIsInserterOpened:i}=(0,HP.useDispatch)(I),{disableComplementaryArea:s}=(0,HP.useDispatch)(He),l=(0,n2e.useViewportMatch)("medium","<"),c=(0,UP.useRef)(),u=(0,UP.useCallback)(()=>{i(!1),t.current?.focus()},[t,i]),d=(0,UP.useCallback)(m=>{m.keyCode===s2e.ESCAPE&&!m.defaultPrevented&&(m.preventDefault(),u())},[u]),f=(0,JD.jsx)("div",{className:"editor-inserter-sidebar__content",children:(0,JD.jsx)(Jlt,{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?()=>s("core"):void 0,ref:c,onClose:u})});return(0,JD.jsx)("div",{onKeyDown:d,className:"editor-inserter-sidebar",children:f})}var tL=a(be(),1),rL=a(Te(),1),oL=a(Y(),1),nK=a(Mp(),1),Su=a(U(),1),GP=a(j(),1),c2e=a(xa(),1),u2e=a(Mo(),1);var WP=a(G(),1),eL=a(j(),1);var ki=a(E(),1);function l2e(){return(0,ki.jsxs)(ki.Fragment,{children:[(0,ki.jsxs)("div",{className:"editor-list-view-sidebar__outline",children:[(0,ki.jsxs)("div",{children:[(0,ki.jsx)(WP.__experimentalText,{children:(0,eL.__)("Characters:")}),(0,ki.jsx)(WP.__experimentalText,{children:(0,ki.jsx)(dx,{})})]}),(0,ki.jsxs)("div",{children:[(0,ki.jsx)(WP.__experimentalText,{children:(0,eL.__)("Words:")}),(0,ki.jsx)(cx,{})]}),(0,ki.jsxs)("div",{children:[(0,ki.jsx)(WP.__experimentalText,{children:(0,eL.__)("Time to read:")}),(0,ki.jsx)(ux,{})]})]}),(0,ki.jsx)(vS,{})]})}var Yg=a(E(),1),{TabbedSidebar:$lt}=K(tL.privateApis);function d2e(){let{setIsListViewOpened:e}=(0,oL.useDispatch)(I),{getListViewToggleRef:t}=K((0,oL.useSelect)(I)),r=(0,rL.useFocusOnMount)("firstElement"),o=(0,Su.useCallback)(()=>{e(!1),t().current?.focus()},[t,e]),n=(0,Su.useCallback)(v=>{v.keyCode===u2e.ESCAPE&&!v.defaultPrevented&&(v.preventDefault(),o())},[o]),[i,s]=(0,Su.useState)(null),[l,c]=(0,Su.useState)("list-view"),u=(0,Su.useRef)(),d=(0,Su.useRef)(),f=(0,Su.useRef)(),m=(0,rL.useMergeRefs)([r,f,s]);function h(v){let b=nK.focus.tabbable.find(d.current)[0];if(v==="list-view"){let _=nK.focus.tabbable.find(f.current)[0];(u.current.contains(_)?_:b).focus()}else b.focus()}let g=(0,Su.useCallback)(()=>{u.current.contains(u.current.ownerDocument.activeElement)?o():h(l)},[o,l]);return(0,c2e.useShortcut)("core/editor/toggle-list-view",g),(0,Yg.jsx)("div",{className:"editor-list-view-sidebar",onKeyDown:n,ref:u,children:(0,Yg.jsx)($lt,{tabs:[{name:"list-view",title:(0,GP._x)("List View","Post overview"),panel:(0,Yg.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,Yg.jsx)("div",{className:"editor-list-view-sidebar__list-view-panel-content",children:(0,Yg.jsx)(tL.__experimentalListView,{dropZoneElement:i})})}),panelRef:m},{name:"outline",title:(0,GP._x)("Outline","Post overview"),panel:(0,Yg.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,Yg.jsx)(l2e,{})})}],onClose:o,onSelect:v=>c(v),defaultTabId:"list-view",ref:d,closeButtonLabel:(0,GP.__)("Close")})})}var qP=a(Y(),1),YP=a(G(),1);var Kg=a(j(),1);var nL=a(Y(),1),qg=a(G(),1),f2e=a(ae(),1),rm=a(j(),1),iL=a(ln(),1),p2e=a(U(),1);var m2e=a(Te(),1);var xu=a(E(),1);function ect(){let{revisions:e,perPage:t,currentRevisionId:r,revisionKey:o,revisionPage:n,totalRevisions:i}=(0,nL.useSelect)(w=>{let{getCurrentRevisionId:S,getRevisionPage:x,getPageRevisions:C,getRevisionsPerPage:A}=K(w(I)),k=w(I).getCurrentPostType();if(!k)return{};let M=w(f2e.store).getEntityConfig("postType",k)?.revisionKey||"id",P=x();return{revisions:C(P),perPage:A(),currentRevisionId:S(),revisionKey:M,revisionPage:P,totalRevisions:w(I).getCurrentPostRevisionsCount()}},[]),{setCurrentRevisionId:s,setRevisionPage:l}=K((0,nL.useDispatch)(I)),c=(0,m2e.useFocusOnMount)(!0),u=!e,d=Math.ceil(i/t)||1,f=(0,p2e.useMemo)(()=>e&&[...e].reverse(),[e]),m=f?.findIndex(w=>w[o]===r),h=w=>{let S=f?.[w];S&&s(S[o])},g=(0,iL.getSettings)(),v=w=>{let S=f?.[w];return S?(0,iL.dateI18n)(g.formats.datetime,S.date):w},b=d>1;if(u&&!b)return(0,xu.jsx)(qg.Spinner,{});if(!u&&!f?.length)return(0,xu.jsx)("span",{className:"editor-revisions-header__no-revisions",children:(0,rm.__)("No revisions found.")});if(i<=1)return(0,xu.jsx)("span",{className:"editor-revisions-header__no-revisions",children:(0,rm.__)("Only one revision found.")});let _=w=>{let S=i-(w-1)*t,x=Math.max(1,S-t+1);return(0,rm.sprintf)((0,rm.__)("Revisions %1$s\u2013%2$s"),x,S)},y=u||m===-1?(0,xu.jsx)(qg.Spinner,{}):(0,xu.jsx)(qg.RangeControl,{ref:c,"aria-valuetext":v(m),className:"editor-revisions-header__slider",hideLabelFromVision:!0,label:(0,rm.__)("Revision"),max:f?.length-1,min:0,marks:!0,onChange:h,renderTooltipContent:v,value:m,withInputField:!1});return b?(0,xu.jsxs)(se,{direction:"row",gap:"sm",align:"center",style:{flex:1},children:[(0,xu.jsx)(qg.Button,{icon:Ar,label:n<d?_(n+1):(0,rm.__)("No older revisions"),onClick:()=>l(n+1),disabled:u||n>=d,size:"compact",accessibleWhenDisabled:!0}),(0,xu.jsx)("div",{style:{flex:1,minWidth:0,display:"flex",justifyContent:"center"},children:y}),(0,xu.jsx)(qg.Button,{icon:hr,label:n>1?_(n-1):(0,rm.__)("No newer revisions"),onClick:()=>l(n-1),disabled:u||n<=1,size:"compact",accessibleWhenDisabled:!0})]}):y}var h2e=ect;var _l=a(E(),1);function tct({showDiff:e,onToggleDiff:t}){let{currentRevisionId:r,sidebarIsOpened:o}=(0,qP.useSelect)(d=>({currentRevisionId:K(d(I)).getCurrentRevisionId(),sidebarIsOpened:!!d(He).getActiveComplementaryArea("core")}),[]),{setCurrentRevisionId:n,restoreRevision:i}=K((0,qP.useDispatch)(I)),{enableComplementaryArea:s,disableComplementaryArea:l}=(0,qP.useDispatch)(He),c=!!r,u=()=>{r&&i(r)};return(0,_l.jsx)(PD,{className:"editor-revisions-header",toolbar:(0,_l.jsx)(YP.Button,{__next40pxDefaultSize:!0,size:"compact",icon:mv,label:(0,Kg._x)("Show changes","revisions"),isPressed:e,onClick:t}),center:(0,_l.jsx)(h2e,{}),settings:(0,_l.jsxs)(_l.Fragment,{children:[(0,_l.jsx)(jS,{className:"editor-header__post-preview-button"}),(0,_l.jsx)(YP.Button,{__next40pxDefaultSize:!0,icon:(0,Kg.isRTL)()?dv:wf,label:(0,Kg._x)("Settings","panel button label"),isPressed:o,"aria-expanded":o,onClick:()=>{o?l("core"):s("core",ls.document)},size:"compact"}),(0,_l.jsx)(YP.Button,{__next40pxDefaultSize:!0,variant:"secondary",size:"compact",onClick:()=>n(null),children:(0,Kg.__)("Exit")}),(0,_l.jsx)(YP.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,variant:"primary",size:"compact",className:"editor-revisions-header__restore-button",disabled:!c,onClick:u,children:(0,Kg.__)("Restore")}),(0,_l.jsx)(ND,{disabled:!0})]})})}var iK=tct;var W2e=a(G(),1),G2e=a(be(),1),mK=a(Y(),1),wL=a(U(),1),Y2e=a(jn(),1),q2e=a(Pt(),1),Cl=a(j(),1);var fc=a(be(),1),Sl=a(U(),1),hL=a(Y(),1),dK=a(Pt(),1),L2e=a(ae(),1),gL=a(Te(),1);var sK=a(Y(),1),g2e=a(ae(),1),sL=a(U(),1),aK=a(j(),1),v2e=a(G(),1);var b2e=a(E(),1);function y2e({contentRef:e}){let{onNavigateToEntityRecord:t,templateId:r}=(0,sK.useSelect)(s=>{let{getEditorSettings:l,getCurrentTemplateId:c}=s(I);return{onNavigateToEntityRecord:l().onNavigateToEntityRecord,templateId:c()}},[]),o=(0,sK.useSelect)(s=>!!s(g2e.store).canUser("create",{kind:"postType",name:"wp_template"}),[]),[n,i]=(0,sL.useState)(!1);return(0,sL.useEffect)(()=>{let s=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",s),()=>{l?.removeEventListener("dblclick",s)}},[e,o]),o?(0,b2e.jsx)(v2e.__experimentalConfirmDialog,{isOpen:n,confirmButtonText:(0,aK.__)("Edit template"),onConfirm:()=>{i(!1),t({postId:r,postType:"wp_template"})},onCancel:()=>i(!1),size:"medium",children:(0,aK.__)("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 _2e=a(Te(),1),aL=a(Y(),1),lK=a(be(),1);var rct=500;function w2e(e,t,r){return Math.min(Math.max(e,t),r)}function oct(e,t,r){let o=e-w2e(e,r.left,r.right),n=t-w2e(t,r.top,r.bottom);return Math.sqrt(o*o+n*n)}function S2e({isEnabled:e=!0}={}){let{getEnabledClientIdsTree:t,getBlockName:r,getBlockOrder:o}=K((0,aL.useSelect)(lK.store)),{selectBlock:n}=(0,aL.useDispatch)(lK.store);return(0,_2e.useRefEffect)(i=>{if(!e)return;let s=(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(),b=oct(c,u,v);b<f&&b<rct&&(f=b,m=h)}m&&n(m)},l=c=>{(c.target===i||c.target.classList.contains("is-root-container"))&&s(c.clientX,c.clientY)};return i.addEventListener("click",l),()=>i.removeEventListener("click",l)},[e])}var lL=a(Y(),1),x2e=a(Te(),1),cK=a(be(),1);function C2e(){let{getSettings:e,isZoomOut:t}=K((0,lL.useSelect)(cK.store)),{resetZoomLevel:r}=K((0,lL.useDispatch)(cK.store));return(0,x2e.useRefEffect)(o=>{function n(i){if(t()&&!i.defaultPrevented){i.preventDefault();let{__experimentalSetIsInserterOpened:s}=e();typeof s=="function"&&s(!1),r()}}return o.addEventListener("dblclick",n),()=>{o.removeEventListener("dblclick",n)}},[e,t,r])}var T2e=a(Y(),1),E2e=a(Te(),1),cL=a(be(),1),P2e=a(Pt(),1),nct=':root :where(.editor-styles-wrapper)::after {content: ""; display: block; height: 40vh;}';function k2e(e){let t=(0,T2e.useRegistry)(),r=(0,E2e.useRefEffect)(o=>{function n(s){if(s.target!==o&&s.target!==o.parentElement)return;let l=o.lastElementChild;if(!l)return;let c=l.getBoundingClientRect();if(s.clientY<c.bottom)return;s.preventDefault();let u=t.select(cL.store).getBlockOrder(""),d=u[u.length-1],f=t.select(cL.store).getBlock(d),{selectBlock:m,insertDefaultBlock:h}=t.dispatch(cL.store);f&&(0,P2e.isUnmodifiedDefaultBlock)(f)?m(d):h()}let{ownerDocument:i}=o;return i.addEventListener("pointerdown",n),()=>{i.removeEventListener("pointerdown",n)}},[t]);return e?[r,nct]:[]}var uL=a(Y(),1),R2e=a(Te(),1),uK=a(be(),1);function A2e(){let{getEditedContentOnlySection:e}=K((0,uL.useSelect)(uK.store)),{stopEditingContentOnlySection:t}=K((0,uL.useDispatch)(uK.store));return(0,R2e.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 dL=a(Y(),1),O2e=a(Te(),1),N2e=a(Pt(),1),fL=a(ae(),1),pL=a(be(),1),rf=a(G(),1),M2e=a(jn(),1),Zg=a(U(),1),Tu=a(j(),1);var Px=a(U(),1);function I2e(e){let[t,r]=(0,Px.useState)(),o=(0,Px.useRef)(!1);return(0,Px.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,s=o.current;o.current=!0,s&&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=s?setTimeout(c,500):null;return u||c(),()=>{u&&clearTimeout(u),l&&clearInterval(l)}},[e]),{onManualRetry:()=>{r(0)},secondsRemaining:t}}var Cu=a(E(),1),{BlockCanvasCover:ict}=K(pL.privateApis),{retrySyncConnection:sct}=K(fL.privateApis),act=2e4;function F2e(){let[e,t]=(0,Zg.useState)(!1),[r,o]=(0,Zg.useState)(!1),[n,i]=(0,Zg.useState)(!1),{connectionStatus:s,isCollaborationEnabled:l,postType:c}=(0,dL.useSelect)(S=>{let{getSyncConnectionStatus:x,getPostType:C}=K(S(fL.store)),{getCurrentPostType:A,isCollaborationEnabledForCurrentPost:k}=K(S(I)),R=A();return{connectionStatus:x()||null,isCollaborationEnabled:k(),postType:R?C(R):null}},[]),{onManualRetry:u,secondsRemaining:d}=I2e(s),f=(0,O2e.useCopyToClipboard)(()=>{let S=(0,dL.select)(pL.store).getBlocks();return(0,N2e.serialize)(S)});(0,Zg.useEffect)(()=>{let S=setTimeout(()=>{t(!0)},act);return()=>clearTimeout(S)},[]),(0,Zg.useEffect)(()=>{s?.status!=="connecting"&&i(s!==null&&"canManuallyRetry"in s&&s.canManuallyRetry===!0)},[s]);let m=s&&s.status==="disconnected"&&(s.canManuallyRetry||s.willAutoRetryInMs);(0,Zg.useEffect)(()=>{if(s?.status==="connected"){o(!1);return}s?.status&&s.status!=="connecting"&&(!m||s.backgroundRetriesFailed)&&o(!0)},[s,m]);let h=s?.status==="disconnected"&&"error"in s&&s.error?.code===XY;if(!l||!e&&!h||!r)return null;let g=s&&"error"in s?s?.error:void 0;if(!m&&(0,M2e.applyFilters)("editor.isSyncConnectionErrorHandled",!1,g?.code)!==!1)return null;let v=n?()=>{u(),sct()}:void 0,b=VCe(g),_="",y=!1;d&&d>0?_=(0,Tu.sprintf)((0,Tu._n)("Retrying connection in %d second\u2026","Retrying connection in %d seconds\u2026",d),d):d===0&&(y=!0,_=(0,Tu.__)("Retrying\u2026"));let w="edit.php";return c?.slug&&(w=`edit.php?post_type=${c.slug}`),(0,Cu.jsx)(ict.Fill,{children:(0,Cu.jsx)(rf.Modal,{overlayClassName:"editor-sync-connection-error-modal",isDismissible:!1,onRequestClose:()=>{},shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,size:"medium",title:b.title,children:(0,Cu.jsxs)(rf.__experimentalVStack,{spacing:6,children:[(0,Cu.jsx)("p",{children:b.description}),_&&(0,Cu.jsx)("p",{className:"editor-sync-connection-error-modal__retry-countdown",children:_}),(0,Cu.jsxs)(rf.__experimentalHStack,{justify:"right",children:[(0,Cu.jsx)(rf.Button,{__next40pxDefaultSize:!0,href:w,isDestructive:!0,variant:"tertiary",children:(0,Tu.sprintf)((0,Tu.__)("Back to %s"),c?.labels?.name??(0,Tu.__)("Posts"))}),(0,Cu.jsx)(rf.Button,{__next40pxDefaultSize:!0,ref:f,variant:v?"secondary":"primary",children:(0,Tu.__)("Copy Post Content")}),v&&(0,Cu.jsx)(rf.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,"aria-disabled":y,disabled:y,isBusy:y,variant:"primary",onClick:v,children:(0,Tu.__)("Retry")})]})]})})})}var ui=a(E(),1),{LayoutStyle:mL,useLayoutClasses:lct,useLayoutStyles:cct,ExperimentalBlockCanvas:uct,useFlashEditableBlocks:dct}=K(fc.privateApis);function fK(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=fK(e[t].innerBlocks);if(r)return r}}}function D2e(e){for(let t=0;t<e.length;t++)if(e[t].name==="core/post-content")return!0;return!1}function fct({autoFocus:e,iframeProps:t,contentRef:r,className:o}){let n=(0,gL.useViewportMatch)("small","<"),{renderingMode:i,postContentAttributes:s,editedPostTemplate:l={},wrapperBlockName:c,wrapperUniqueId:u,deviceType:d,isFocusedEntity:f,isDesignPostType:m,postType:h,isPreview:g,styles:v,hasCanvasWidth:b,canvasWidth:_,canvasHeight:y}=(0,hL.useSelect)(ee=>{let{getCurrentPostId:ue,getCurrentPostType:ie,getCurrentTemplateId:le,getEditorSettings:Oe,getRenderingMode:ke,getDeviceType:Me,getCanvasWidth:Ne,getCanvasHeight:Fe}=K(ee(I)),{getPostType:X,getEditedEntityRecord:ge}=ee(L2e.store),Ue=ie(),Ye=ke(),st;Ue===Nu?st="core/block":Ye==="post-only"&&(st="core/post-content");let St=Oe(),dt=St.supportsTemplateMode,xt=X(Ue),Xt=le(),Xe=Ne(),fs=Xt?ge("postType",Cr,Xt):void 0;return{renderingMode:Ye,postContentAttributes:St.postContentAttributes,isDesignPostType:pm.includes(Ue),editedPostTemplate:xt?.viewable&&dt?fs:void 0,wrapperBlockName:st,wrapperUniqueId:ue(),deviceType:Me(),isFocusedEntity:!!St.onNavigateToPreviousEntityRecord,postType:Ue,isPreview:St.isPreviewMode,styles:St.styles,hasCanvasWidth:Xe!==void 0,canvasWidth:Xe,canvasHeight:Fe()}},[]),{isCleanNewPost:w}=(0,hL.useSelect)(I),{hasRootPaddingAwareAlignments:S,themeHasDisabledLayoutStyles:x,themeSupportsLayout:C,isZoomedOut:A}=(0,hL.useSelect)(ee=>{let{getSettings:ue,isZoomOut:ie}=K(ee(fc.store)),le=ue();return{themeHasDisabledLayoutStyles:le.disableLayoutStyles,themeSupportsLayout:le.supportsLayout,hasRootPaddingAwareAlignments:le.__experimentalFeatures?.useRootPaddingAwareAlignments,isZoomedOut:ie()}},[]),k=(0,Sl.useRef)(),[R,M]=(0,Sl.useState)(!1),[P]=(0,fc.useSettings)("layout"),T=(0,Sl.useMemo)(()=>i!=="post-only"||m?{type:"default"}:C?{...P,type:"constrained"}:{type:"default"},[i,C,P,m]),N=(0,Sl.useMemo)(()=>{if(!l?.content&&!l?.blocks&&s)return s;if(l?.blocks)return fK(l?.blocks);let ee=typeof l?.content=="string"?l?.content:"";return fK((0,dK.parse)(ee))||{}},[l?.content,l?.blocks,s]),L=(0,Sl.useMemo)(()=>{if(!l?.content&&!l?.blocks)return!1;if(l?.blocks)return D2e(l?.blocks);let ee=typeof l?.content=="string"?l?.content:"";return D2e((0,dK.parse)(ee))||!1},[l?.content,l?.blocks]),{layout:F={},align:D=""}=N||{},z=lct(N,"core/post-content"),B=J({"is-layout-flow":!C},C&&z,D&&`align${D}`),O=cct(N,"core/post-content",".block-editor-block-list__layout.is-root-container"),V=(0,Sl.useMemo)(()=>F&&(F?.type==="constrained"||F?.inherit||F?.contentSize||F?.wideSize)?{...P,...F,type:"constrained"}:{...P,...F,type:"default"},[F?.type,F?.inherit,F?.contentSize,F?.wideSize,P]),W=s?V:T,q=W?.type==="default"&&!L?T:W,Z=(0,Sl.useRef)();(0,Sl.useEffect)(()=>{!e||!w()||Z?.current?.focus()},[e,w]);let Q=`.is-root-container.alignwide { max-width: var(--wp--style--global--wide-size); margin-left: auto; margin-right: auto;}
		.is-root-container.alignwide:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);}
		.is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;}
		.is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}`,ce=[Ek,Ni,Nu].includes(h),re=ce&&!g&&!n&&!A||b,fe=h===Ek&&g,[pe,$]=k2e(!g&&i==="post-only"&&!m),te="display:flex;align-items:center;justify-content:center;",ve=y!==void 0&&!ce&&!R?"min-height:100vh;":"",we=(0,Sl.useMemo)(()=>[...v??[],{css:`:where(.block-editor-iframe__body){display:flow-root;}.is-root-container{display:flow-root;${re||fe?"min-height:0!important;":""}}
				${$||""}
				${re?`.block-editor-iframe__html{background:var(--wp-editor-canvas-background);min-height:100vh;${te}}.block-editor-iframe__body{width:100%;${ve}}`:""}${fe?`.block-editor-iframe__body{${te}padding:var(--wp--style--block-gap,2em);}`:""}`}],[v,re,te,ve,fe,$]),oe=(0,fc.__unstableUseTypewriter)();return r=(0,gL.useMergeRefs)([k,r,i==="post-only"?oe:null,dct({isEnabled:i==="template-locked"}),S2e({isEnabled:i==="template-locked"}),C2e(),pe,A2e()]),(0,ui.jsxs)("div",{className:J("editor-visual-editor","edit-post-visual-editor",o,{"has-vertical-padding":f||b,"has-horizontal-padding":f||re}),children:[(0,ui.jsx)(F2e,{}),(0,ui.jsx)(hS,{enableResizing:re,width:re&&_?_+"px":"100%",height:re&&y&&!R?y+"px":"100%",onResizeStart:()=>M(!0),onResizeStop:()=>M(!1),children:(0,ui.jsxs)(uct,{shouldIframe:!0,contentRef:r,styles:we,height:"100%",iframeProps:{...t,style:t?.style},children:[C&&!x&&i==="post-only"&&!m&&(0,ui.jsxs)(ui.Fragment,{children:[(0,ui.jsx)(mL,{selector:".editor-visual-editor__post-title-wrapper",layout:T}),(0,ui.jsx)(mL,{selector:".block-editor-block-list__layout.is-root-container",layout:q}),D&&(0,ui.jsx)(mL,{css:Q}),O&&(0,ui.jsx)(mL,{layout:V,css:O})]}),i==="post-only"&&!m&&(0,ui.jsx)("div",{className:J("editor-visual-editor__post-title-wrapper","edit-post-visual-editor__post-title-wrapper",{"has-global-padding":S}),contentEditable:!1,style:{marginTop:"4rem"},children:(0,ui.jsx)(iD,{ref:Z})}),(0,ui.jsxs)(fc.RecursionProvider,{blockName:c,uniqueId:u,children:[(0,ui.jsx)(fc.BlockList,{className:J("is-"+d.toLowerCase()+"-preview",i!=="post-only"||m?"wp-site-blocks":`${B} wp-block-post-content`,{"has-global-padding":i==="post-only"&&!m&&S}),layout:W,dropZoneElement:k.current?.parentNode,__unstableDisableDropZone:i==="template-locked"}),i==="template-locked"&&(0,ui.jsx)(y2e,{contentRef:k})]})]})})]})}var vL=fct;var xl=a(U(),1),bL=a(Te(),1),V2e=a(Y(),1),yL=a(be(),1),KP=a(j(),1);var Xg=a(E(),1),{useBlockElementRef:pct}=K(yL.privateApis);function j2e(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(...j2e(r.innerBlocks));return t}var B2e={added:(0,KP.__)("Go to added block"),removed:(0,KP.__)("Go to removed block"),modified:(0,KP.__)("Go to modified block")};function pK(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 mct({clientId:e,status:t,subscribe:r}){let o=(0,xl.useRef)();pct(e,o);let[n,i]=(0,xl.useState)(()=>pK(o.current));return(0,xl.useEffect)(()=>r(()=>{i(pK(o.current))}),[r]),(0,xl.useEffect)(()=>{i(pK(o.current))},[t]),n?(0,Xg.jsxs)(Ze.Root,{children:[(0,Xg.jsx)(Ze.Trigger,{render:(0,Xg.jsx)("button",{className:`revision-diff-marker is-${t}`,style:{top:`${n.top}%`,height:`${Math.max(n.height,.5)}%`},onClick:()=>o.current?.focus(),"aria-label":B2e[t]})}),(0,Xg.jsx)(Ze.Popup,{children:B2e[t]})]}):null}function z2e(){let[e,t]=(0,xl.useState)(!1),r=(0,xl.useRef)(new Set),o=(0,V2e.useSelect)(l=>l(yL.store).getBlocks(),[]),n=(0,xl.useMemo)(()=>j2e(o),[o]),i=(0,xl.useCallback)(l=>(r.current.add(l),()=>r.current.delete(l)),[]),s=(0,bL.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,bL.useMergeRefs)([s,t]),(0,Xg.jsx)("div",{className:"revision-diff-markers",role:"navigation","aria-label":(0,KP.__)("Document changes"),children:e&&n.map(({clientId:l,status:c})=>(0,Xg.jsx)(mct,{clientId:l,status:c,subscribe:i},l))},"diff-markers")]}var ho=a(E(),1),{usePrivateStyleOverride:H2e,PrivateBlockContext:U2e}=K(G2e.privateApis),hct=`
<svg
	xmlns="http://www.w3.org/2000/svg"
	viewBox="0 0 0 0"
	width="0"
	height="0"
	focusable="false"
	role="none"
	aria-hidden="true"
	style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
>
	<defs>
		<filter id="revision-removed-filter" x="0" y="0" width="100%" height="100%">
			<!-- Desaturate and add red tint -->
			<feColorMatrix type="matrix"
				values="0.5 0.3 0.2 0 0.15
				        0.2 0.2 0.1 0 0
				        0.2 0.2 0.1 0 0
				        0   0   0   0.8 0"/>
		</filter>
	</defs>
</svg>
`,gct=`
	.is-revision-added {
		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%);
		outline: 3px solid #00a32a;
		outline-offset: 2px;
	}
	.is-revision-removed,
	.revision-diff-removed {
		text-decoration: line-through;
		filter: url(#revision-removed-filter);
	}
	.is-revision-removed {
		outline: 3px dashed #d63638;
		outline-offset: 2px;
	}
	.is-revision-modified {
		outline: 3px dotted #9a7000 !important;
		outline-offset: 2px;
	}
	.revision-diff-added {
		background-color: color-mix(in srgb, currentColor 5%, #00a32a 15%);
		text-decoration: none;
	}
	/* Reset UA <mark> styles so format markers keep the same look as before. */
	mark.revision-diff-format-added,
	mark.revision-diff-format-removed,
	mark.revision-diff-format-changed {
		background: transparent;
		color: inherit;
		padding: 0;
	}
	.revision-diff-format-added {
		text-decoration: underline wavy color-mix(in srgb, currentColor 30%, #00a32a 70%);
		text-decoration-thickness: 2px;
	}
	.revision-diff-format-removed {
		text-decoration: underline wavy color-mix(in srgb, currentColor 20%, #d63638 80%);
		text-decoration-thickness: 2px;
	}
	.revision-diff-format-changed {
		text-decoration: underline wavy color-mix(in srgb, currentColor 30%, #dba617 70%);
		text-decoration-thickness: 2px;
	}
`;function vct(e,t){switch(e){case"added":return(0,Cl.sprintf)((0,Cl.__)("Added block: %s"),t);case"removed":return(0,Cl.sprintf)((0,Cl.__)("Removed block: %s"),t);case"modified":return(0,Cl.sprintf)((0,Cl.__)("Modified block: %s"),t)}}function bct({status:e,name:t,attributes:r,children:o}){let n=(0,wL.useContext)(U2e),i=(0,mK.useSelect)(s=>{let{getActiveBlockVariation:l,getBlockType:c}=s(q2e.store);return l(t,r)?.title??c(t)?.title},[t,r]);return(0,ho.jsx)(U2e.Provider,{value:{...n,ariaLabel:i?vct(e,i):void 0},children:o})}function yct(e){return function(r){let{block:o,className:n,name:i,attributes:s}=r,l=o?.__revisionDiffStatus?.status,c=J(n,{"is-revision-added":l==="added","is-revision-removed":l==="removed","is-revision-modified":l==="modified"});return l?(0,ho.jsx)(bct,{status:l,name:i,attributes:s,children:(0,ho.jsx)(e,{...r,className:c})}):(0,ho.jsx)(e,{...r,className:c})}}var wct="editor/revisions-canvas/withRevisionDiffClasses";(0,Y2e.addFilter)("editor.BlockListBlock",wct,yct);function _ct({showDiff:e}){return H2e({css:e?gct:""}),H2e({assets:e?hct:"",__unstableType:"svgs"}),null}function Sct(){return(0,ho.jsxs)(Gt,{children:[(0,ho.jsx)("span",{id:nc.removed,children:(0,Cl.__)("Removed")}),(0,ho.jsx)("span",{id:nc.added,children:(0,Cl.__)("Added")}),(0,ho.jsx)("span",{id:nc.formatAdded,children:(0,Cl.__)("Format added")}),(0,ho.jsx)("span",{id:nc.formatRemoved,children:(0,Cl.__)("Format removed")}),(0,ho.jsx)("span",{id:nc.formatChanged,children:(0,Cl.__)("Format changed")})]})}function xct({showDiff:e}){let[t,r]=z2e();return(0,ho.jsxs)(ho.Fragment,{children:[e&&(0,ho.jsx)(Sct,{}),(0,ho.jsx)(vL,{contentRef:t}),e&&r]})}function hK(){(0,wL.useEffect)(()=>(J0e(),()=>{$0e()}),[]);let{revision:e,showDiff:t}=(0,mK.useSelect)(r=>{let{getCurrentRevision:o,isShowingRevisionDiff:n}=K(r(I));return{revision:o(),showDiff:n()}},[]);return e?(0,ho.jsxs)(ho.Fragment,{children:[(0,ho.jsx)(_ct,{showDiff:t}),(0,ho.jsx)("div",{className:"editor-revisions-canvas__content",children:(0,ho.jsx)(xct,{showDiff:t})})]}):(0,ho.jsx)("div",{className:"editor-revisions-canvas__loading",children:(0,ho.jsx)(W2e.Spinner,{})})}var SL=a(Y(),1),_L=a(U(),1),pc=a(j(),1),K2e=a(It(),1),Z2e=a(ae(),1),X2e=a(Dt(),1);var{useOnCollaboratorJoin:Cct,useOnCollaboratorLeave:Tct,useOnPostSave:Ect}=K(Z2e.privateApis),gK={COLLAB_POST_UPDATED:"collab-post-updated",COLLAB_USER_ENTERED:"collab-user-entered",COLLAB_USER_EXITED:"collab-user-exited"},vK=["publish","private","future"];function Pct(e,t,r){return r?(0,pc.sprintf)((0,pc.__)("Post published by %s."),e):vK.includes(t)?(0,pc.sprintf)((0,pc.__)("Post updated by %s."),e):(0,pc.sprintf)((0,pc.__)("Draft saved by %s."),e)}function Q2e(e,t){let{postStatus:r,isCollaborationEnabled:o,showJoinNotifications:n,showLeaveNotifications:i,showPostSaveNotifications:s}=(0,SL.useSelect)(y=>{let{getCurrentPostAttribute:w,isCollaborationEnabledForCurrentPost:S}=K(y(I)),x=C=>y(X2e.store).get("core",C)??!0;return{postStatus:w("status"),isCollaborationEnabled:S(),showJoinNotifications:x("showCollaborationJoinNotifications"),showLeaveNotifications:x("showCollaborationLeaveNotifications"),showPostSaveNotifications:x("showCollaborationPostSaveNotifications")}},[]),{createNotice:l}=(0,SL.useDispatch)(K2e.store),c=o&&n,u=o&&i,d=o&&s,f=y=>y?[e,t]:[null,null],[m,h]=f(c),[g,v]=f(u),[b,_]=f(d);Cct(m,h,(0,_L.useCallback)((y,w)=>{c&&(w&&y.collaboratorInfo.enteredAt<w.collaboratorInfo.enteredAt||l("info",(0,pc.sprintf)((0,pc.__)("%s has joined the post."),y.collaboratorInfo.name),{id:`${gK.COLLAB_USER_ENTERED}-${y.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1}))},[l,c])),Tct(g,v,(0,_L.useCallback)(y=>{u&&l("info",(0,pc.sprintf)((0,pc.__)("%s has left the post."),y.collaboratorInfo.name),{id:`${gK.COLLAB_USER_EXITED}-${y.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[l,u])),Ect(b,_,(0,_L.useCallback)((y,w,S)=>{if(!d||!r)return;let x=y.postStatus??r??"draft",C=S?.postStatus??r,A=!(C&&vK.includes(C))&&vK.includes(x),k=Pct(w.collaboratorInfo.name,x,A);l("info",k,{id:`${gK.COLLAB_POST_UPDATED}-${w.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[l,r,d]))}var xL=a(Y(),1),ZP=a(G(),1),bK=a(j(),1),J2e=a(U(),1);var mc=a(E(),1),{Fill:I_r,Slot:kct}=(0,ZP.createSlotFill)("ActionsPanel");function $2e({setEntitiesSavedStatesCallback:e,closeEntitiesSavedStates:t,isEntitiesSavedStatesOpen:r,forceIsDirtyPublishPanel:o}){let{closePublishSidebar:n,togglePublishSidebar:i}=(0,xL.useDispatch)(I),{publishSidebarOpened:s,isPublishable:l,isDirty:c,hasOtherEntitiesChanges:u}=(0,xL.useSelect)(m=>{let{isPublishSidebarOpened:h,isEditedPostPublishable:g,isCurrentPostPublished:v,isEditedPostDirty:b,hasNonPostEntityChanges:_}=m(I),y=_();return{publishSidebarOpened:h(),isPublishable:!v()&&g(),isDirty:y||b(),hasOtherEntitiesChanges:y}},[]),d=(0,J2e.useCallback)(()=>e(!0),[]),f;return s?f=(0,mc.jsx)(EF,{onClose:n,forceIsDirty:o,PrePublishExtension:x6.Slot,PostPublishExtension:w6.Slot}):l&&!u?f=(0,mc.jsx)("div",{className:"editor-layout__toggle-publish-panel",children:(0,mc.jsx)(ZP.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:i,"aria-expanded":!1,children:(0,bK.__)("Open publish panel")})}):f=(0,mc.jsx)("div",{className:"editor-layout__toggle-entities-saved-states-panel",children:(0,mc.jsx)(ZP.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:d,"aria-expanded":!1,"aria-haspopup":"dialog",disabled:!c,accessibleWhenDisabled:!0,children:(0,bK.__)("Open save panel")})}),(0,mc.jsxs)(mc.Fragment,{children:[r&&(0,mc.jsx)(n6,{close:t,renderDialog:!0}),(0,mc.jsx)(kct,{bubblesVirtually:!0}),!r&&f]})}var eAe=a(G(),1),CL=a(Y(),1),yK=a(j(),1),tAe=a(xa(),1),TL=a(U(),1);var om=a(E(),1);function rAe({autoFocus:e=!1}){let{switchEditorMode:t}=(0,CL.useDispatch)(I),{shortcut:r,isRichEditingEnabled:o}=(0,CL.useSelect)(i=>{let{getEditorSettings:s}=i(I),{getShortcutRepresentation:l}=i(tAe.store);return{shortcut:l("core/editor/toggle-mode"),isRichEditingEnabled:s().richEditingEnabled}},[]),n=(0,TL.useRef)();return(0,TL.useEffect)(()=>{e||n?.current?.focus()},[e]),(0,om.jsxs)("div",{className:"editor-text-editor",children:[o&&(0,om.jsxs)("div",{className:"editor-text-editor__toolbar",children:[(0,om.jsx)("h2",{children:(0,yK.__)("Editing code")}),(0,om.jsx)(eAe.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t("visual"),shortcut:r,children:(0,yK.__)("Exit code editor")})]}),(0,om.jsxs)("div",{className:"editor-text-editor__body",children:[(0,om.jsx)(aD,{ref:n}),(0,om.jsx)(EP,{})]})]})}var Pr=a(E(),1),oAe={header:(0,Qg.__)("Editor top bar"),body:(0,Qg.__)("Editor content"),sidebar:(0,Qg.__)("Editor settings"),actions:(0,Qg.__)("Editor publish"),footer:(0,Qg.__)("Editor footer")};function nAe(){let e=(0,XP.useSelect)(t=>t(kx.store).isValidTemplate(),[]);return(0,Pr.jsx)(cAe.ThemeProvider,{cornerRadius:"none",children:(0,Pr.jsx)(lAe.InlineNotices,{className:"editor-notices",pinnedNoticesClassName:"editor-notices__pinned",dismissibleNoticesClassName:"editor-notices__dismissible",children:!e&&(0,Pr.jsx)($3,{})})})}function uAe({className:e,children:t,forceIsDirty:r,contentRef:o,autoFocus:n,customSaveButton:i,customSavePanel:s,forceDisableBlockTools:l,iframeProps:c}){let{mode:u,postId:d,postType:f,isInserterOpened:m,isListViewOpened:h,isDistractionFree:g,isPreviewMode:v,showBlockBreadcrumbs:b,postTypeLabel:_,stylesPath:y,showStylebook:w,isRevisionsMode:S,showDiff:x}=(0,XP.useSelect)(L=>{let{get:F}=L(iAe.store),{getEditorSettings:D,getPostTypeLabel:z,getCurrentPostType:B,getCurrentPostId:O}=L(I),{getStylesPath:V,getShowStylebook:W,isRevisionsMode:q,isShowingRevisionDiff:Z}=K(L(I)),Q=D(),ce=L(I).getEditorMode();return!Q.richEditingEnabled&&ce==="visual"&&(ce="text"),!Q.codeEditingEnabled&&ce==="text"&&(ce="visual"),{mode:ce,postId:O(),postType:B(),isInserterOpened:L(I).isInserterOpened(),isListViewOpened:L(I).isListViewOpened(),isDistractionFree:F("core","distractionFree"),isPreviewMode:Q.isPreviewMode,showBlockBreadcrumbs:F("core","showBlockBreadcrumbs"),postTypeLabel:z(),stylesPath:V(),showStylebook:W(),isRevisionsMode:q(),showDiff:Z()}},[]),{setShowRevisionDiff:C}=K((0,XP.useDispatch)(I));Q2e(d,f);let A=(0,sAe.useViewportMatch)("medium"),k=h?(0,Qg.__)("Document Overview"):(0,Qg.__)("Block Library"),R=w||y?.startsWith("/revisions"),M=!R,[P,T]=(0,EL.useState)(!1),N=(0,EL.useCallback)(L=>{typeof P=="function"&&P(L),T(!1)},[P]);return S?(0,Pr.jsx)(Lb,{className:J("editor-editor-interface",e),labels:oAe,header:(0,Pr.jsx)(iK,{showDiff:x,onToggleDiff:()=>C(!x)}),content:(0,Pr.jsx)(hK,{}),sidebar:(0,Pr.jsx)(Kl.Slot,{scope:"core"})}):(0,Pr.jsx)(Lb,{isDistractionFree:g,className:J("editor-editor-interface",e,{"is-entity-save-view-open":!!P,"is-distraction-free":g&&!v}),labels:{...oAe,secondarySidebar:k},header:!v&&(0,Pr.jsx)(o2e,{forceIsDirty:r,setEntitiesSavedStatesCallback:T,customSaveButton:i,forceDisableBlockTools:l}),editorNotices:(0,Pr.jsx)(nAe,{}),secondarySidebar:!v&&u==="visual"&&(m&&(0,Pr.jsx)(a2e,{})||h&&(0,Pr.jsx)(d2e,{})),sidebar:!v&&!g&&(0,Pr.jsx)(Kl.Slot,{scope:"core"}),content:(0,Pr.jsxs)(Pr.Fragment,{children:[!g&&!v&&(0,Pr.jsx)(nAe,{}),R&&(0,Pr.jsx)(vSe,{}),M&&(0,Pr.jsxs)(Pr.Fragment,{children:[!v&&u==="text"&&(0,Pr.jsx)(rAe,{autoFocus:n}),!v&&!A&&u==="visual"&&(0,Pr.jsx)(kx.BlockToolbar,{hideDragHandle:!0}),(v||u==="visual")&&(0,Pr.jsx)(vL,{contentRef:o,autoFocus:n,iframeProps:c}),t,(0,Pr.jsx)(XD,{postId:d,postType:f})]})]}),footer:!v&&!g&&A&&b&&u==="visual"&&(0,Pr.jsx)(kx.BlockBreadcrumb,{rootLabelText:_?(0,aAe.decodeEntities)(_):void 0}),actions:v?void 0:s||(0,Pr.jsx)($2e,{closeEntitiesSavedStates:N,isEntitiesSavedStatesOpen:P,setEntitiesSavedStatesCallback:T,forceIsDirtyPublishPanel:r})})}var e4=a(be(),1),ik=a(Y(),1),nv=a(U(),1),Yx=a(j(),1);var wOe=a(xa(),1),_Oe=a(G(),1);var dAe=a(Y(),1),fAe=a(Nl(),1);var pAe=a(E(),1),{OverridesPanel:Rct}=K(fAe.privateApis);function mAe(){return(0,dAe.useSelect)(t=>t(I).getCurrentPostType()==="wp_block",[])?(0,pAe.jsx)(Rct,{}):null}var JAe=a(Y(),1);var Tl=a(G(),1);var EAe=a(ae(),1),PAe=a(Y(),1),kAe=a(U(),1),ev=a(j(),1),RAe=a(Mp(),1);var OL=a(Y(),1),JP=a(U(),1),xAe=a(j(),1),Nx=a(G(),1);var CAe=a(ae(),1);var QP=a(Y(),1),AL=a(U(),1),_Ae=a(ae(),1);var hc=a(j(),1),hAe=a(U(),1),nm=a(G(),1),Ax=a(Y(),1),kL=a(ae(),1),gAe=a(It(),1);var PL=a(Lt(),1);function Rx(e){return typeof e.title=="string"?(0,PL.decodeEntities)(e.title):e.title&&"rendered"in e.title?(0,PL.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title?(0,PL.decodeEntities)(e.title.raw):""}var Jg=a(E(),1),Act=({items:e,closeModal:t})=>{let[r]=e,o=Rx(r),{showOnFront:n,currentHomePage:i,isSaving:s}=(0,Ax.useSelect)(g=>{let{getEntityRecord:v,isSavingEntityRecord:b}=g(kL.store),_=v("root","site"),y=v("postType","page",_?.page_on_front);return{showOnFront:_?.show_on_front,currentHomePage:y,isSaving:b("root","site")}}),{saveEntityRecord:l}=(0,Ax.useDispatch)(kL.store),{createSuccessNotice:c,createErrorNotice:u}=(0,Ax.useDispatch)(gAe.store);async function d(g){g.preventDefault();try{await l("root","site",{page_on_front:r.id,show_on_front:"page"}),c((0,hc.__)("Homepage updated."),{type:"snackbar"})}catch(v){let b=v.message&&v.code!=="unknown_error"?v.message:(0,hc.__)("An error occurred while setting the homepage.");u(b,{type:"snackbar"})}finally{t?.()}}let f="";n==="posts"?f=(0,hc.__)("This will replace the current homepage which is set to display latest posts."):i&&(f=(0,hc.sprintf)((0,hc.__)('This will replace the current homepage: "%s"'),Rx(i)));let m=(0,hc.sprintf)((0,hc.__)('Set "%1$s" as the site homepage? %2$s'),o,f).trim(),h=(0,hc.__)("Set homepage");return(0,Jg.jsx)("form",{onSubmit:d,children:(0,Jg.jsxs)(nm.__experimentalVStack,{spacing:"5",children:[(0,Jg.jsx)(nm.__experimentalText,{children:m}),(0,Jg.jsxs)(nm.__experimentalHStack,{justify:"right",children:[(0,Jg.jsx)(nm.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:s,accessibleWhenDisabled:!0,children:(0,hc.__)("Cancel")}),(0,Jg.jsx)(nm.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:s,accessibleWhenDisabled:!0,children:h})]})]})})},vAe=()=>{let{pageOnFront:e,pageForPosts:t}=(0,Ax.useSelect)(r=>{let{getEntityRecord:o,canUser:n}=r(kL.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,hAe.useMemo)(()=>({id:"set-as-homepage",label:(0,hc.__)("Set as homepage"),isEligible(r){return!(r.status!=="publish"||r.type!=="page"||e===r.id||t===r.id)},modalFocusOnMount:"firstContentElement",RenderModal:Act}),[t,e])};var gc=a(j(),1),bAe=a(U(),1),im=a(G(),1),Ix=a(Y(),1),RL=a(ae(),1),yAe=a(It(),1);var $g=a(E(),1),Ict=({items:e,closeModal:t})=>{let[r]=e,o=Rx(r),{currentPostsPage:n,isPageForPostsSet:i,isSaving:s}=(0,Ix.useSelect)(g=>{let{getEntityRecord:v,isSavingEntityRecord:b}=g(RL.store),_=v("root","site");return{currentPostsPage:v("postType","page",_?.page_for_posts),isPageForPostsSet:_?.page_for_posts!==0,isSaving:b("root","site")}}),{saveEntityRecord:l}=(0,Ix.useDispatch)(RL.store),{createSuccessNotice:c,createErrorNotice:u}=(0,Ix.useDispatch)(yAe.store);async function d(g){g.preventDefault();try{await l("root","site",{page_for_posts:r.id,show_on_front:"page"}),c((0,gc.__)("Posts page updated."),{type:"snackbar"})}catch(v){let b=v.message&&v.code!=="unknown_error"?v.message:(0,gc.__)("An error occurred while setting the posts page.");u(b,{type:"snackbar"})}finally{t?.()}}let f=i&&n?(0,gc.sprintf)((0,gc.__)('This will replace the current posts page: "%s"'),Rx(n)):(0,gc.__)("This page will show the latest posts."),m=(0,gc.sprintf)((0,gc.__)('Set "%1$s" as the posts page? %2$s'),o,f),h=(0,gc.__)("Set posts page");return(0,$g.jsx)("form",{onSubmit:d,children:(0,$g.jsxs)(im.__experimentalVStack,{spacing:"5",children:[(0,$g.jsx)(im.__experimentalText,{children:m}),(0,$g.jsxs)(im.__experimentalHStack,{justify:"right",children:[(0,$g.jsx)(im.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:s,accessibleWhenDisabled:!0,children:(0,gc.__)("Cancel")}),(0,$g.jsx)(im.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:s,accessibleWhenDisabled:!0,children:h})]})]})})},wAe=()=>{let{pageOnFront:e,pageForPosts:t}=(0,Ix.useSelect)(r=>{let{getEntityRecord:o,canUser:n}=r(RL.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,bAe.useMemo)(()=>({id:"set-as-posts-page",label:(0,gc.__)("Set as posts page"),isEligible(r){return!(r.status!=="publish"||r.type!=="page"||e===r.id||t===r.id)},modalFocusOnMount:"firstContentElement",RenderModal:Ict}),[t,e])};var SAe=a(E(),1);function IL({postType:e,onActionPerformed:t,context:r}){let{defaultActions:o}=(0,QP.useSelect)(c=>{let{getEntityActions:u}=K(c(I));return{defaultActions:u("postType",e)}},[e]),n=(0,QP.useSelect)(c=>{if(e!=="page")return!1;let{getDefaultTemplateId:u,getEntityRecord:d,canUser:f}=c(_Ae.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=vAe(),s=wAe(),{registerPostTypeSchema:l}=K((0,QP.useDispatch)(I));return(0,AL.useEffect)(()=>{l(e)},[l,e]),(0,AL.useMemo)(()=>{let c=[...o];if(n&&c.push(i,s),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,SAe.jsx)(d,{...f,onActionPerformed:m=>{f.onActionPerformed&&f.onActionPerformed(m),t(c[u].id,m)}})}}}return c},[r,o,t,i,s,n])}var Ri=a(E(),1),{Menu:Ox,kebabCase:Oct}=K(Nx.privateApis);function TAe({postType:e,postId:t,onActionPerformed:r}){let[o,n]=(0,JP.useState)(null),{item:i,permissions:s}=(0,OL.useSelect)(d=>{let{getEditedEntityRecord:f,getEntityRecordPermissions:m}=K(d(CAe.store));return{item:f("postType",e,t),permissions:m("postType",e,t)}},[t,e]),l=(0,JP.useMemo)(()=>({...i,permissions:s}),[i,s]),c=IL({postType:e,onActionPerformed:r}),u=(0,JP.useMemo)(()=>c.filter(d=>!d.isEligible||d.isEligible(l)),[c,l]);return(0,Ri.jsxs)(Ri.Fragment,{children:[(0,Ri.jsxs)(Ox,{placement:"bottom-end",children:[(0,Ri.jsx)(Ox.TriggerButton,{render:(0,Ri.jsx)(Nx.Button,{size:"small",icon:bo,label:(0,xAe.__)("Actions"),disabled:!u.length,accessibleWhenDisabled:!0,className:"editor-all-actions-button"})}),(0,Ri.jsx)(Ox.Popover,{children:(0,Ri.jsx)(Fct,{actions:u,items:[l],setActiveModalAction:n})})]}),!!o&&(0,Ri.jsx)(Mct,{action:o,items:[l],closeModal:()=>n(null)})]})}function Nct({action:e,onClick:t,items:r}){let o=typeof e.label=="string"?e.label:e.label(r);return(0,Ri.jsx)(Ox.Item,{onClick:t,children:(0,Ri.jsx)(Ox.ItemLabel,{children:o})})}function Mct({action:e,items:t,closeModal:r}){let o=typeof e.label=="string"?e.label:e.label(t);return(0,Ri.jsx)(Nx.Modal,{title:e.modalHeader||o,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:r??(()=>{}),focusOnMount:"firstContentElement",size:"medium",overlayClassName:`editor-action-modal editor-action-modal__${Oct(e.id)}`,children:(0,Ri.jsx)(e.RenderModal,{items:t,closeModal:r})})}function Fct({actions:e,items:t,setActiveModalAction:r}){let o=(0,OL.useRegistry)();return(0,Ri.jsx)(Ox.Group,{children:e.map(n=>(0,Ri.jsx)(Nct,{action:n,onClick:()=>{if("RenderModal"in n){r(n);return}n.callback(t,{registry:o})},items:t},n.id))})}var Eu=a(E(),1),{Badge:Dct}=K(Tl.privateApis);function tv({postType:e,postId:t,hideActions:r=!1,onActionPerformed:o,onClose:n}){let i=(0,kAe.useMemo)(()=>Array.isArray(t)?t:[t],[t]),{postTitle:s,icon:l,labels:c}=(0,PAe.useSelect)(f=>{let{getEditedEntityRecord:m,getCurrentTheme:h,getPostType:g}=f(EAe.store),{getPostIcon:v,getCurrentPostType:b,isRevisionsMode:_,getCurrentRevision:y}=K(f(I)),w="";if(_()){let x=b(),C=y();return w=C?.title?.rendered||C?.title?.raw||"",{postTitle:w,icon:v(x,{area:C?.area}),labels:g(x)?.labels}}let S=m("postType",e,i[0]);if(i.length===1){let{default_template_types:x=[]}=h()??{};w=([Cr,Ni].includes(e)?Al({template:S,templateTypes:x}):{})?.title||S?.title}return{postTitle:w,icon:v(e,{area:S?.area}),labels:g(e)?.labels}},[i,e]),u=P3(t),d=(0,ev.__)("No title");return c?.name&&i.length>1?d=(0,ev.sprintf)((0,ev.__)("%1$d %2$s"),i.length,c?.name):s&&(d=(0,RAe.__unstableStripHTML)(s)),(0,Eu.jsxs)(Tl.__experimentalVStack,{spacing:1,className:"editor-post-card-panel",children:[(0,Eu.jsxs)(Tl.__experimentalHStack,{spacing:2,className:"editor-post-card-panel__header",alignment:"flex-start",children:[(0,Eu.jsx)(Tl.Icon,{className:"editor-post-card-panel__icon",icon:l}),(0,Eu.jsxs)(Tl.__experimentalText,{numberOfLines:2,truncate:!0,className:"editor-post-card-panel__title",as:"h2",children:[(0,Eu.jsx)("span",{className:"editor-post-card-panel__title-name",children:d}),u&&i.length===1&&(0,Eu.jsx)(Dct,{children:u})]}),!r&&i.length===1&&(0,Eu.jsx)(TAe,{postType:e,postId:i[0],onActionPerformed:o}),n&&(0,Eu.jsx)(Tl.Button,{size:"small",icon:a1,label:(0,ev.__)("Close"),onClick:n})]}),i.length>1&&(0,Eu.jsx)(Tl.__experimentalText,{className:"editor-post-card-panel__description",children:(0,ev.sprintf)((0,ev.__)("Changes will be applied to all selected %s."),c?.name?.toLowerCase())})]})}var AAe=a(G(),1),IAe=a(Y(),1),vc=a(j(),1),OAe=a(Cw(),1),NAe=a(U(),1),wK=a(ae(),1);var NL=a(E(),1),Lct=189;function MAe(){let e=(0,IAe.useSelect)(t=>{let{getEditedPostAttribute:r,getCurrentPostType:o,getCurrentPostId:n}=t(I),{canUser:i}=t(wK.store),{getEntityRecord:s}=t(wK.store),l=i("read",{kind:"root",name:"site"})?s("root","site"):void 0,c=o();return!(+n()===l?.page_for_posts)&&![Cr,Ni].includes(c)&&r("content")},[]);return(0,NL.jsx)(_K,{postContent:e})}function _K({postContent:e}){let t=(0,vc._x)("words","Word count type. Do not translate!"),r=(0,NAe.useMemo)(()=>e?(0,OAe.count)(e,t):0,[e,t]);if(!r)return null;let o=Math.round(r/Lct),n=(0,vc.sprintf)((0,vc._n)("%s word","%s words",r),r.toLocaleString()),i=o<=1?(0,vc.__)("1 minute"):(0,vc.sprintf)((0,vc._n)("%s minute","%s minutes",o),o.toLocaleString());return(0,NL.jsx)("div",{className:"editor-post-content-information",children:(0,NL.jsx)(AAe.__experimentalText,{children:(0,vc.sprintf)((0,vc.__)("%1$s, %2$s read time."),n,i)})})}var ML=a(G(),1),Mx=a(j(),1),FAe=a(Y(),1),FL=a(U(),1),DAe=a(be(),1);var sm=a(E(),1);function Bct(){let{postFormat:e}=(0,FAe.useSelect)(i=>{let{getEditedPostAttribute:s}=i(I);return{postFormat:s("format")??"standard"}},[]),t=dP.find(i=>i.id===e),[r,o]=(0,FL.useState)(null),n=(0,FL.useMemo)(()=>({anchor:r,placement:"left-start",offset:36,shift:!0}),[r]);return(0,sm.jsx)(LS,{children:(0,sm.jsx)(fr,{label:(0,Mx.__)("Format"),ref:o,children:(0,sm.jsx)(ML.Dropdown,{popoverProps:n,contentClassName:"editor-post-format__dialog",focusOnMount:!0,renderToggle:({isOpen:i,onToggle:s})=>(0,sm.jsx)(ML.Button,{size:"compact",variant:"tertiary","aria-expanded":i,"aria-label":(0,Mx.sprintf)((0,Mx.__)("Change format: %s"),t?.caption),onClick:s,children:t?.caption}),renderContent:({onClose:i})=>(0,sm.jsxs)("div",{className:"editor-post-format__dialog-content",children:[(0,sm.jsx)(DAe.__experimentalInspectorPopoverHeader,{title:(0,Mx.__)("Format"),onClose:i}),(0,sm.jsx)(fP,{})]})})})})}var LAe=Bct;var BAe=a(G(),1),VAe=a(Y(),1),DL=a(j(),1),jAe=a(ln(),1);var SK=a(E(),1);function zAe(){let e=(0,VAe.useSelect)(t=>t(I).getEditedPostAttribute("modified"),[]);return e?(0,SK.jsx)("div",{className:"editor-post-last-edited-panel",children:(0,SK.jsx)(BAe.__experimentalText,{children:(0,DL.sprintf)((0,DL.__)("Last edited %s."),(0,jAe.humanTimeDiff)(e))})}):null}var HAe=a(G(),1),UAe=a(E(),1);function Vct({className:e,children:t}){return(0,UAe.jsx)(HAe.__experimentalVStack,{className:J("editor-post-panel__section",e),children:t})}var Fx=Vct;var am=a(j(),1),WAe=a(Te(),1),LL=a(Y(),1),xK=a(ae(),1),GAe=a(Lt(),1),Dx=a(G(),1),BL=a(U(),1),YAe=a(be(),1);var of=a(E(),1),jct={};function qAe(){let{editEntityRecord:e}=(0,LL.useDispatch)(xK.store),{postsPageTitle:t,postsPageId:r,isTemplate:o,postSlug:n}=(0,LL.useSelect)(d=>{let{getEntityRecord:f,getEditedEntityRecord:m,canUser:h}=d(xK.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):jct,{getEditedPostAttribute:b,getCurrentPostType:_}=d(I);return{postsPageId:v?.id,postsPageTitle:v?.title,isTemplate:_()===Cr,postSlug:b("slug")}},[]),[i,s]=(0,BL.useState)(null),l=(0,BL.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,GAe.decodeEntities)(t);return(0,of.jsx)(fr,{label:(0,am.__)("Blog title"),ref:s,children:(0,of.jsx)(Dx.Dropdown,{popoverProps:l,contentClassName:"editor-blog-title-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:d,onToggle:f})=>(0,of.jsx)(Dx.Button,{size:"compact",variant:"tertiary","aria-expanded":d,"aria-label":(0,am.sprintf)((0,am.__)("Change blog title: %s"),u),onClick:f,children:u}),renderContent:({onClose:d})=>(0,of.jsxs)(of.Fragment,{children:[(0,of.jsx)(YAe.__experimentalInspectorPopoverHeader,{title:(0,am.__)("Blog title"),onClose:d}),(0,of.jsx)(Dx.__experimentalInputControl,{placeholder:(0,am.__)("No title"),value:t,onChange:(0,WAe.debounce)(c,300),label:(0,am.__)("Blog title"),help:(0,am.__)("Set the Posts Page title. Appears in search results, and when the page is shared on social media."),hideLabelFromVision:!0})]})})})}var Lx=a(j(),1),VL=a(Y(),1),CK=a(ae(),1),Bx=a(G(),1),jL=a(U(),1),KAe=a(be(),1);var nf=a(E(),1);function ZAe(){let{editEntityRecord:e}=(0,VL.useDispatch)(CK.store),{postsPerPage:t,isTemplate:r,postSlug:o}=(0,VL.useSelect)(c=>{let{getEditedPostAttribute:u,getCurrentPostType:d}=c(I),{getEditedEntityRecord:f,canUser:m}=c(CK.store),h=m("read",{kind:"root",name:"site"})?f("root","site"):void 0;return{isTemplate:d()===Cr,postSlug:u("slug"),postsPerPage:h?.posts_per_page||1}},[]),[n,i]=(0,jL.useState)(null),s=(0,jL.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,nf.jsx)(fr,{label:(0,Lx.__)("Posts per page"),ref:i,children:(0,nf.jsx)(Bx.Dropdown,{popoverProps:s,contentClassName:"editor-posts-per-page-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:c,onToggle:u})=>(0,nf.jsx)(Bx.Button,{size:"compact",variant:"tertiary","aria-expanded":c,"aria-label":(0,Lx.__)("Change posts per page"),onClick:u,children:t}),renderContent:({onClose:c})=>(0,nf.jsxs)(nf.Fragment,{children:[(0,nf.jsx)(KAe.__experimentalInspectorPopoverHeader,{title:(0,Lx.__)("Posts per page"),onClose:c}),(0,nf.jsx)(Bx.__experimentalNumberControl,{placeholder:0,value:t,spinControls:"custom",step:"1",min:"1",onChange:l,label:(0,Lx.__)("Posts per page"),help:(0,Lx.__)("Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting."),hideLabelFromVision:!0})]})})})}var Ua=a(j(),1),zL=a(Y(),1),TK=a(ae(),1),sf=a(G(),1),HL=a(U(),1),XAe=a(be(),1);var bc=a(E(),1),zct=[{label:(0,Ua._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,Ua.__)("Visitors can add new comments and replies.")},{label:(0,Ua.__)("Closed"),value:"",description:[(0,Ua.__)("Visitors cannot add new comments or replies."),(0,Ua.__)("Existing comments remain visible.")].join(" ")}];function QAe(){let{editEntityRecord:e}=(0,zL.useDispatch)(TK.store),{allowCommentsOnNewPosts:t,isTemplate:r,postSlug:o}=(0,zL.useSelect)(c=>{let{getEditedPostAttribute:u,getCurrentPostType:d}=c(I),{getEditedEntityRecord:f,canUser:m}=c(TK.store),h=m("read",{kind:"root",name:"site"})?f("root","site"):void 0;return{isTemplate:d()===Cr,postSlug:u("slug"),allowCommentsOnNewPosts:h?.default_comment_status||""}},[]),[n,i]=(0,HL.useState)(null),s=(0,HL.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,bc.jsx)(fr,{label:(0,Ua.__)("Discussion"),ref:i,children:(0,bc.jsx)(sf.Dropdown,{popoverProps:s,contentClassName:"editor-site-discussion-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:c,onToggle:u})=>(0,bc.jsx)(sf.Button,{size:"compact",variant:"tertiary","aria-expanded":c,"aria-label":(0,Ua.__)("Change discussion settings"),onClick:u,children:t?(0,Ua.__)("Comments open"):(0,Ua.__)("Comments closed")}),renderContent:({onClose:c})=>(0,bc.jsxs)(bc.Fragment,{children:[(0,bc.jsx)(XAe.__experimentalInspectorPopoverHeader,{title:(0,Ua.__)("Discussion"),onClose:c}),(0,bc.jsxs)(sf.__experimentalVStack,{spacing:3,children:[(0,bc.jsx)(sf.__experimentalText,{children:(0,Ua.__)("Changes will apply to new posts only. Individual posts may override these settings.")}),(0,bc.jsx)(sf.RadioControl,{className:"editor-site-discussion__options",hideLabelFromVision:!0,label:(0,Ua.__)("Comment status"),options:zct,onChange:l,selected:t})]})]})})})}var pr=a(E(),1),Hct="post-status";function $Ae({onActionPerformed:e}){let{isRemovedPostStatusPanel:t,postType:r,postId:o}=(0,JAe.useSelect)(n=>{let{isEditorPanelRemoved:i,getCurrentPostType:s,getCurrentPostId:l}=n(I);return{isRemovedPostStatusPanel:i(Hct),postType:s(),postId:l()}},[]);return(0,pr.jsx)(Fx,{className:"editor-post-summary",children:(0,pr.jsx)(kS.Slot,{children:n=>(0,pr.jsx)(pr.Fragment,{children:(0,pr.jsxs)(se,{direction:"column",gap:"lg",children:[(0,pr.jsx)(tv,{postType:r,postId:o,onActionPerformed:e}),(0,pr.jsx)(J6,{withPanelBody:!1}),(0,pr.jsx)(vCe,{}),(0,pr.jsxs)(se,{direction:"column",gap:"xs",children:[(0,pr.jsx)(MAe,{}),(0,pr.jsx)(zAe,{})]}),!t&&(0,pr.jsxs)(se,{direction:"column",gap:"lg",children:[(0,pr.jsxs)(se,{direction:"column",gap:"xs",children:[(0,pr.jsx)(hq,{}),(0,pr.jsx)(zF,{}),(0,pr.jsx)(gD,{}),(0,pr.jsx)(O6,{}),(0,pr.jsx)(T6,{}),(0,pr.jsx)(H6,{}),(0,pr.jsx)(MCe,{}),(0,pr.jsx)(u6,{}),(0,pr.jsx)(WF,{}),(0,pr.jsx)(qAe,{}),(0,pr.jsx)(ZAe,{}),(0,pr.jsx)(QAe,{}),(0,pr.jsx)(LAe,{}),n]}),(0,pr.jsx)(sx,{onActionPerformed:e})]})]})})})})}var fIe=a(j(),1),lm=a(Y(),1),Vx=a(ae(),1);var $P=a(U(),1);var eIe=a(U(),1),tIe=a(Y(),1),Gct=a(Dt(),1);var Yct=a(Y(),1),qct=a(Dt(),1);var nIe=a(Y(),1),iIe=a(ae(),1);var rIe=a(xf(),1),{lock:Axr,unlock:oIe}=(0,rIe.__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 EK({kind:e,name:t,fields:r}){let o=Array.isArray(r)?r:r?.split(","),n=o?[...o].sort().join(","):void 0;return(0,nIe.useSelect)(i=>oIe(i(iIe.store)).getViewConfig(e,t,{fields:n}),[e,t,n])}var uIe=a(j(),1);var sIe=a(G(),1),UL=a(Y(),1),WL=a(j(),1),aIe=a(vo(),1);var lIe=a(E(),1);function cIe(){let{lastRevisionId:e,revisionsCount:t,disableVisualRevisions:r}=(0,UL.useSelect)(i=>{let{getCurrentPostLastRevisionId:s,getCurrentPostRevisionsCount:l,getEditorSettings:c}=i(I);return{lastRevisionId:s(),revisionsCount:l(),disableVisualRevisions:!!c().disableVisualRevisions}},[]),{setCurrentRevisionId:o}=K((0,UL.useDispatch)(I)),n=r?{href:(0,aIe.addQueryArgs)("revision.php",{revision:e})}:{onClick:()=>o(e)};return(0,lIe.jsx)(sIe.Button,{...n,variant:"link",text:String(t),"aria-label":(0,WL.sprintf)((0,WL._n)("Open revisions screen: %d revision","Open revisions screen: %d revisions",t),t)})}var Kct={id:"revisions",label:(0,uIe.__)("Revisions"),readOnly:!0,enableSorting:!1,render:cIe,isVisible:e=>{let t=e._links?.["version-history"]?.[0]?.count??0;return!!(e._links?.["predecessor-version"]?.[0]?.id??null)&&t>=2}},dIe=Kct;var yc=a(E(),1),Zct={layout:{type:"panel"},fields:[]},Xct=["form"];function Qct(e){let{isPostStatusRemoved:t,featuredImageEnabled:r,excerptEnabled:o,discussionEnabled:n,pageAttributesEnabled:i}=(0,lm.useSelect)(l=>{let{isEditorPanelRemoved:c,isEditorPanelEnabled:u}=l(I);return{isPostStatusRemoved:c("post-status"),featuredImageEnabled:u("featured-image"),excerptEnabled:u("post-excerpt"),discussionEnabled:u("discussion-panel"),pageAttributesEnabled:u("page-attributes")}},[]);return(0,$P.useMemo)(()=>{if(!e.fields?.length)return e;let l={featured_media:r,excerpt:o,"post-content-info":!0,discussion:n&&!t,parent:i&&!t},c=d=>d in l?l[d]:!t,u=d=>d.reduce((f,m)=>{let h=typeof m=="string"?m:m.id;if(!c(h))return f;if(typeof m!="string"&&Array.isArray(m.children)){let g=u(m.children);return g.length&&f.push({...m,children:g}),f}return f.push(m),f},[]);return{...e,fields:u(e.fields)}},[e,t,r,o,n,i])}var GL={wp_template:{root_site:{kind:"root",name:"site",fields:["posts_per_page","default_comment_status"],isVisible:e=>["home","index"].includes(e.slug??"")},posttype_page:{kind:"postType",name:"page",getId:e=>e(Vx.store).getEditedEntityRecord("root","site")?.page_for_posts,fields:["posts_page_title"],isVisible:e=>["home","index"].includes(e.slug??"")}}};function Jct(e,t,r=()=>!0){let o=n=>n?.[t]??{};return{...e,getValue:({item:n})=>e.getValue?e.getValue({item:o(n)}):o(n)[e.id],setValue:({item:n,value:i})=>({[t]:e.setValue({item:o(n),value:i})}),render:e.render?n=>e.render({...n,item:o(n.item)}):void 0,isVisible:n=>r(n)&&!!n[t]}}function pIe({onActionPerformed:e}){let{postType:t,postId:r,isPostStatusRemoved:o,availableTemplates:n}=(0,lm.useSelect)(_=>{let{getCurrentPostType:y,getCurrentPostId:w,isEditorPanelRemoved:S,getEditorSettings:x}=_(I),C=_(Vx.store).getCurrentTheme()?.is_block_theme?null:x().availableTemplates??null;return{postType:y(),postId:w(),isPostStatusRemoved:S("post-status"),availableTemplates:C}},[]),{form:i}=EK({kind:"postType",name:t,fields:Xct}),s=Qct(i??Zct),l=(0,lm.useSelect)(_=>!t||!r?null:_(Vx.store).getEditedEntityRecord("postType",t,r),[t,r]),c=TS(),u=(0,lm.useSelect)(_=>{let{getEditedEntityRecord:y,canUser:w}=_(Vx.store),S={};for(let[x,C]of Object.entries(GL[t]??{})){if(!w("read",{kind:C.kind,name:C.name}))continue;let A=C.getId?C.getId(_):void 0;C.getId&&!A||(S[x]=y(C.kind,C.name,A))}return S},[t]),d=(0,$P.useMemo)(()=>{if(!l)return l;let _={...u};return n&&Object.keys(n).length&&(_.available_templates=n),{...l,..._}},[l,u,n]),{editEntityRecord:f}=(0,lm.useDispatch)(Vx.store),m=(0,lm.useRegistry)(),h=(0,$P.useMemo)(()=>{let _={};for(let[y,w]of Object.entries(GL[t]??{}))for(let S of w.fields??[])_[S]=y;return _},[t]),g=aS({postType:t}),v=(0,$P.useMemo)(()=>g?.map(_=>{let y=h[_.id];return y?Jct(_,y,GL[t]?.[y]?.isVisible):_.id==="status"?{..._,elements:_.elements.filter(w=>w.value!=="trash")}:_.id==="template"?c?c==="classic"&&Object.keys(n??{}).length===0?{..._,readOnly:!0,render:()=>(0,fIe.__)("Default template")}:_:null:_}).filter(Boolean).concat(dIe),[g,c,n,h,t]);return(0,yc.jsx)(Fx,{className:"editor-post-summary",children:(0,yc.jsxs)(se,{direction:"column",gap:"lg",children:[(0,yc.jsx)(tv,{postType:t,postId:r,onActionPerformed:e}),(0,yc.jsx)(GT,{data:d,fields:v,form:s,onChange:_=>{let y=GL[t]??{},w={};for(let[S,x]of Object.entries(_)){let C=y[S];if(C){let A=C.getId?C.getId(m.select):void 0;f(C.kind,C.name,A,x)}else w[S]=x}Object.keys(w).length&&(w.status&&w.status!=="future"&&l?.status==="future"&&new Date(l.date)>new Date&&(w.date=null),w.status&&w.status==="private"&&l?.password&&(w.password=""),f("postType",t,r,w))}}),!o&&(0,yc.jsxs)(yc.Fragment,{children:[(0,yc.jsx)(kS.Slot,{children:_=>_.length>0&&(0,yc.jsx)(se,{direction:"column",gap:"xs",children:_})}),(0,yc.jsx)(sx,{onActionPerformed:e})]})]})})}var PIe=a(Y(),1),KL=a(G(),1),kIe=a(j(),1),RIe=a(vo(),1);var YL=a(Y(),1),gIe=a(ae(),1);var cm=a(ln(),1),Pu=a(U(),1),rv=a(j(),1);var wc=a(E(),1),$ct=10,mIe=[],eut={pickerActivity:!0},tut={type:"pickerActivity",titleField:"date",descriptionField:"details",fields:["author"],layout:{density:"compact"},page:1,perPage:$ct},rut=864e5;function hIe(e){let t=(0,cm.getDate)(null).getTime(),r=(0,cm.getDate)(e??null);return t-r.getTime()>rut?(0,cm.dateI18n)((0,cm.getSettings)().formats.datetimeAbbreviated,r):(0,cm.humanTimeDiff)(r)}function vIe(e){return e.slug?.endsWith("-autosave-v1")??!1}function out({item:e}){return vIe(e)?(0,wc.jsx)(CC,{intent:"none",children:(0,rv.__)("Autosave")}):null}function bIe(){let{setCurrentRevisionId:e}=K((0,YL.useDispatch)(I)),[t,r]=(0,Pu.useState)(tut),{revisions:o,revisionKey:n,currentRevisionId:i}=(0,YL.useSelect)(h=>{let{getCurrentPostType:g}=h(I),{getCurrentRevisionId:v,getRevisionPage:b,getPageRevisions:_}=K(h(I)),{getEntityConfig:y}=h(gIe.store),w=g(),x=y("postType",w)?.revisionKey||"id",C=v();return{revisions:_(b()),revisionKey:x,currentRevisionId:C}},[]),s=!o,l=(0,Pu.useMemo)(()=>[{id:"date",label:(0,rv.__)("Date"),getValue:({item:h})=>{let g=hIe(h.date);return vIe(h)?(0,rv.sprintf)((0,rv.__)("%1$s, %2$s"),g,(0,rv.__)("Autosave")):g},render:({item:h})=>(0,wc.jsxs)(se,{direction:"row",align:"center",gap:"sm",children:[(0,wc.jsx)(xs,{variant:"heading-sm",render:(0,wc.jsx)("time",{dateTime:h.date}),children:hIe(h.date)}),(0,wc.jsx)(out,{item:h})]}),enableSorting:!1,enableHiding:!1},tT,{id:"details",label:(0,rv.__)("Details"),render:({item:h})=>String(h[n])!==String(i)?null:(0,wc.jsx)(_K,{postContent:h.content?.raw}),enableSorting:!1,enableHiding:!1}],[n,i]),{data:c,paginationInfo:u}=(0,Pu.useMemo)(()=>pW(o||mIe,t,l),[o,t,l]);(0,Pu.useEffect)(()=>{if(!i||!o)return;let h=o.findIndex(v=>String(v[n])===String(i));if(h<0)return;let g=Math.floor(h/t.perPage)+1;r(v=>v.page===g?v:{...v,page:g})},[i,o,n,t.perPage]);let d=(0,Pu.useMemo)(()=>i?[String(i)]:mIe,[i]),f=(0,Pu.useCallback)(h=>{if(h.length===0)return;let g=h[h.length-1];e(Number(g))},[e]),m=(0,Pu.useCallback)(h=>String(h[n]),[n]);return(0,wc.jsx)("div",{className:"editor-post-revisions-timeline",children:(0,wc.jsxs)(lp,{view:t,onChangeView:r,fields:l,data:c,isLoading:s,paginationInfo:u,defaultLayouts:eut,getItemId:m,selection:d,onChangeSelection:f,children:[(0,wc.jsx)(lp.Layout,{}),(0,wc.jsx)(lp.Footer,{})]})})}var SIe=a(Y(),1),xIe=a(U(),1),CIe=a(j(),1);var yIe=a(G(),1);var ov=a(E(),1);function qL({title:e,entries:t,initialOpen:r,className:o}){if(!t)return null;let n=Object.entries(t).map(([i,s])=>(0,ov.jsx)(fr,{label:i,children:(0,ov.jsx)("span",{className:"editor-revision-fields-diff__value",children:s.map((l,c)=>l.added?(0,ov.jsx)("ins",{className:"editor-revision-fields-diff__added",children:l.value},c):l.removed?(0,ov.jsx)("del",{className:"editor-revision-fields-diff__removed",children:l.value},c):(0,ov.jsx)("span",{children:l.value},c))})},i));return(0,ov.jsx)(yIe.PanelBody,{title:e,initialOpen:r,children:(0,ov.jsx)("div",{className:o,children:n})})}var TIe=a(E(),1);function wIe(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function _Ie(e){return!e||e==="[]"||e==="{}"}function EIe(){let{revision:e,previousRevision:t}=(0,SIe.useSelect)(o=>{let{getCurrentRevision:n,getPreviousRevision:i}=K(o(I));return{revision:n(),previousRevision:i()}},[]),r=(0,xIe.useMemo)(()=>{if(!e)return null;let o=e.meta??{},n=t?.meta??{},i=new Set([...Object.keys(o),...Object.keys(n)]),s={};for(let l of i){let c=wIe(o[l]),u=wIe(n[l]);_Ie(c)&&_Ie(u)||(s[l]=eS(u,c))}return Object.keys(s).length===0?null:s},[e,t]);return(0,TIe.jsx)(qL,{title:(0,CIe.__)("Meta"),entries:r,initialOpen:!1,className:"editor-revision-meta-diff__content"})}var ku=a(E(),1);function AIe(){let{revisionId:e,postId:t}=(0,PIe.useSelect)(r=>{let{getCurrentRevisionId:o,getCurrentPostId:n}=K(r(I));return{revisionId:o(),postId:n()}},[]);return e?(0,ku.jsxs)(ku.Fragment,{children:[(0,ku.jsx)(Fx,{className:"editor-post-summary",children:(0,ku.jsxs)(KL.__experimentalVStack,{spacing:4,children:[(0,ku.jsx)(tv,{postId:t,hideActions:!0}),(0,ku.jsx)(KL.ExternalLink,{href:(0,RIe.addQueryArgs)("revision.php",{revision:e}),children:(0,kIe.__)("Open classic revisions screen")})]})}),(0,ku.jsx)(EIe,{}),(0,ku.jsx)(bIe,{})]}):null}var tk=a(Y(),1),kK=a(ae(),1),LIe=a(G(),1),RK=a(j(),1),BIe=a(be(),1),VIe=a(Pt(),1);var IIe=a(Y(),1),OIe=a(U(),1),PK=a(ae(),1),NIe=a(Pt(),1),MIe=a(Nl(),1);var{EXCLUDED_PATTERN_SOURCES:nut,PATTERN_TYPES:iut}=K(MIe.privateApis);function FIe(e,t){return e.innerBlocks=e.innerBlocks.map(r=>FIe(r,t)),e.name==="core/template-part"&&e.attributes.theme===void 0&&(e.attributes.theme=t),e}function sut(e,t){let r=(i,s,l)=>s===l.findIndex(c=>i.name===c.name),o=i=>t.area==="navigation-overlay"&&i.blockTypes?.includes("core/template-part/navigation-overlay")?!0:!nut.includes(i.source),n=i=>i.templateTypes?.includes(t.slug)||i.blockTypes?.includes("core/template-part/"+t.area);return e.filter((i,s,l)=>r(i,s,l)&&o(i)&&n(i))}function aut(e,t){return e.map(r=>({...r,keywords:r.keywords||[],type:iut.theme,blocks:(0,NIe.parse)(r.content,{__unstableSkipMigrationLogs:!0}).map(o=>FIe(o,t))}))}function DIe({area:e,name:t,slug:r}){let{blockPatterns:o,restBlockPatterns:n,currentThemeStylesheet:i}=(0,IIe.useSelect)(s=>{let{getEditorSettings:l}=s(I),c=l();return{blockPatterns:c.__experimentalAdditionalBlockPatterns??c.__experimentalBlockPatterns,restBlockPatterns:s(PK.store).getBlockPatterns(),currentThemeStylesheet:s(PK.store).getCurrentTheme().stylesheet}},[]);return(0,OIe.useMemo)(()=>{let s=[...o||[],...n||[]],l=sut(s,{area:e,name:t,slug:r});return aut(l,i)},[e,t,r,o,n,i])}var ek=a(E(),1);function lut({availableTemplates:e,onSelect:t}){return!e||e?.length===0?null:(0,ek.jsx)(BIe.__experimentalBlockPatternsList,{label:(0,RK.__)("Templates"),blockPatterns:e,onClickPattern:t,showTitlesAsTooltip:!0})}function cut(){let{area:e,name:t,slug:r,postType:o,postId:n}=(0,tk.useSelect)(c=>{let{getCurrentPostType:u,getCurrentPostId:d}=c(I),{getEditedEntityRecord:f}=c(kK.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,tk.useDispatch)(kK.store),s=DIe({area:e,name:t,slug:r}),l=async c=>{await i("postType",o,n,{blocks:c.blocks,content:(0,VIe.serialize)(c.blocks)})};return s?.length?(0,ek.jsx)(LIe.PanelBody,{title:(0,RK.__)("Design"),initialOpen:o===Ni,children:(0,ek.jsx)(lut,{availableTemplates:s,onSelect:l})}):null}function jIe(){let{postType:e}=(0,tk.useSelect)(t=>{let{getCurrentPostType:r}=t(I);return{postType:r()}},[]);return[Ni,Cr].includes(e)?(0,ek.jsx)(cut,{}):null}var zIe=a(G(),1),rk=a(j(),1),HIe=a(Y(),1),UIe=a(U(),1),WIe=a(Lt(),1);var ok=a(E(),1),{Tabs:AK}=K(zIe.privateApis),uut=(e,t)=>{let{postTypeLabel:r,isRevisionsMode:o}=(0,HIe.useSelect)(i=>{let{getPostTypeLabel:s}=i(I),{isRevisionsMode:l}=K(i(I));return{postTypeLabel:s(),isRevisionsMode:l()}},[]),n;return o?n=(0,rk.__)("Revision"):r?n=(0,WIe.decodeEntities)(r):n=(0,rk._x)("Document","noun, panel"),(0,ok.jsxs)(AK.TabList,{ref:t,children:[(0,ok.jsx)(AK.Tab,{tabId:ls.document,"data-tab-id":ls.document,children:n}),(0,ok.jsx)(AK.Tab,{tabId:ls.block,"data-tab-id":ls.block,children:(0,rk.__)("Block")})]})},GIe=(0,UIe.forwardRef)(uut);var jx=a(Y(),1),zx=a(ae(),1),IK=a(be(),1),dm=a(G(),1),OK=a(U(),1),um=a(j(),1),YIe=a(Lt(),1),ZL=a(Mo(),1),qIe=a(It(),1),KIe=a(Dt(),1);var Vn=a(E(),1);function ZIe(){let e=(0,jx.useSelect)(x=>x(I).getCurrentTemplateId(),[]),[t,r]=(0,OK.useState)(!1),[o,n]=(0,OK.useState)(!1),s=!!iP()?.length,{onNavigateToEntityRecord:l,canCreateTemplate:c,hasGoBack:u,getEditorSettings:d}=(0,jx.useSelect)(x=>{let{getEditorSettings:C}=x(I),A=C();return{onNavigateToEntityRecord:A.onNavigateToEntityRecord,canCreateTemplate:!!x(zx.store).canUser("create",{kind:"postType",name:"wp_template"}),hasGoBack:A.hasOwnProperty("onNavigateToPreviousEntityRecord"),getEditorSettings:C}},[]),{get:f}=(0,jx.useSelect)(KIe.store),{createSuccessNotice:m}=(0,jx.useDispatch)(qIe.store),{editedRecord:h,hasResolved:g}=(0,zx.useEntityRecord)("postType","wp_template",e),[v]=(0,zx.useEntityBlockEditor)("postType","wp_template",{id:e});if(!g)return null;let b=u?[{label:(0,um.__)("Go back"),onClick:()=>d().onNavigateToPreviousEntityRecord()}]:void 0,_=()=>{f("core/edit-site","welcomeGuideTemplate")||m((0,um.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:b})},y=(0,YIe.decodeEntities)(h.title),w=!!v?.length&&(0,Vn.jsx)(IK.BlockPreview.Async,{children:(0,Vn.jsx)(IK.BlockPreview,{blocks:v})}),S=()=>{if(!w)return null;if(s){let x=(0,um.__)("Change template");return(0,Vn.jsxs)(Ze.Root,{children:[(0,Vn.jsx)(Ze.Trigger,{render:(0,Vn.jsx)("div",{className:"editor-template-actions-panel__preview",role:"button",tabIndex:0,"aria-label":x,onClick:()=>n(!0),onKeyDown:C=>{(C.keyCode===ZL.ENTER||C.keyCode===ZL.SPACE)&&(C.preventDefault(),n(!0))},children:w})}),(0,Vn.jsx)(Ze.Popup,{children:x})]})}return(0,Vn.jsx)("div",{className:"editor-template-actions-panel__preview",children:w})};return(0,Vn.jsxs)(Vn.Fragment,{children:[(0,Vn.jsx)(dm.PanelBody,{title:(0,um.sprintf)((0,um.__)("Template: %s"),y),initialOpen:!1,children:(0,Vn.jsxs)(dm.__experimentalVStack,{children:[S(),(0,Vn.jsxs)(dm.__experimentalHStack,{children:[l&&(0,Vn.jsx)(dm.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{l({postId:h.id,postType:"wp_template"}),_()},children:(0,um.__)("Edit")}),c&&(0,Vn.jsx)(dm.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(!0),children:(0,um.__)("Create new")})]})]})}),t&&(0,Vn.jsx)(Eg,{onClose:()=>r(!1)}),o&&(0,Vn.jsx)(DY,{onRequestClose:()=>n(!1)})]})}var Hx=a(Y(),1),Ux=a(ae(),1),NK=a(be(),1),Au=a(G(),1),XIe=a(U(),1),Ru=a(j(),1),QIe=a(Lt(),1),JIe=a(It(),1),$Ie=a(Dt(),1);var $s=a(E(),1);function eOe(){let e=(0,Hx.useSelect)(v=>v(I).getCurrentTemplateId(),[]),[t,r]=(0,XIe.useState)(!1),{onNavigateToEntityRecord:o,canCreateTemplate:n,hasGoBack:i,getEditorSettings:s}=(0,Hx.useSelect)(v=>{let{getEditorSettings:b}=v(I),_=b();return{onNavigateToEntityRecord:_.onNavigateToEntityRecord,canCreateTemplate:!!v(Ux.store).canUser("create",{kind:"postType",name:"wp_template"})&&_.supportsTemplateMode,hasGoBack:_.hasOwnProperty("onNavigateToPreviousEntityRecord"),getEditorSettings:b}},[]),{get:l}=(0,Hx.useSelect)($Ie.store),{createSuccessNotice:c}=(0,Hx.useDispatch)(JIe.store),{editedRecord:u}=(0,Ux.useEntityRecord)("postType","wp_template",e),[d]=(0,Ux.useEntityBlockEditor)("postType","wp_template",{id:e});if(!e&&!n)return null;let f=i?[{label:(0,Ru.__)("Go back"),onClick:()=>s().onNavigateToPreviousEntityRecord()}]:void 0,m=()=>{l("core/edit-site","welcomeGuideTemplate")||c((0,Ru.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:f})},h=u?(0,QIe.decodeEntities)(u.title):void 0,g=!!d?.length&&(0,$s.jsx)(NK.BlockPreview.Async,{children:(0,$s.jsx)(NK.BlockPreview,{blocks:d})});return(0,$s.jsxs)($s.Fragment,{children:[(0,$s.jsx)(Au.PanelBody,{title:u?(0,Ru.sprintf)((0,Ru.__)("Template: %s"),h):(0,Ru.__)("Template"),initialOpen:!1,children:(0,$s.jsxs)(Au.__experimentalVStack,{children:[!e&&(0,$s.jsx)(Au.__experimentalText,{children:(0,Ru.__)("This page uses a classic template. To edit this template with blocks, create a block template.")}),u&&g&&(0,$s.jsx)("div",{className:"editor-template-actions-panel__preview",children:g}),(0,$s.jsxs)(Au.__experimentalHStack,{children:[u&&o&&(0,$s.jsx)(Au.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{o({postId:u.id,postType:"wp_template"}),m()},children:(0,Ru.__)("Edit")}),n&&(0,$s.jsx)(Au.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(!0),children:e?(0,Ru.__)("Create new"):(0,Ru.__)("Create block template")})]})]})}),t&&(0,$s.jsx)(Eg,{onClose:()=>r(!1)})]})}var MK=a(E(),1);function tOe(){let e=TS();return e==="classic"?(0,MK.jsx)(eOe,{}):e==="block-theme"?(0,MK.jsx)(ZIe,{}):null}var nk=a(Y(),1),rOe=a(be(),1),oOe=a(G(),1),nOe=a(j(),1);var XL=a(E(),1),{BlockQuickNavigation:dut}=K(rOe.privateApis),fut="core/template-part";function put({postType:e}){let t=XM(),r=(0,nk.useSelect)(n=>{let{getPostBlocksByName:i}=K(n(I));return i(Cr===e?fut:t)},[e,t]),{enableComplementaryArea:o}=(0,nk.useDispatch)(He);return r.length===0?null:(0,XL.jsx)(oOe.PanelBody,{title:(0,nOe.__)("Content"),children:(0,XL.jsx)(dut,{clientIds:r,onSelect:()=>{o("core","edit-post/document")}})})}function iOe(){let{postType:e,renderingMode:t}=(0,nk.useSelect)(r=>{let{getCurrentPostType:o,getRenderingMode:n}=K(r(I));return{postType:o(),renderingMode:n()}},[]);return t==="post-only"&&e!==Cr?null:(0,XL.jsx)(put,{postType:e})}var QL=a(Y(),1),sOe=a(U(),1),aOe=a(Pt(),1),$L=a(be(),1),lOe=a(G(),1),cOe=a(j(),1);var JL=a(E(),1),{BlockQuickNavigation:mut}=K($L.privateApis);function hut(){let e=(0,QL.useSelect)(o=>{let{getBlockTypes:n}=o(aOe.store);return n()},[]),t=(0,sOe.useMemo)(()=>e.filter(o=>o.category==="theme").map(({name:o})=>o),[e]),r=(0,QL.useSelect)(o=>{let{getBlocksByName:n}=o($L.store);return n(t)},[t]);return r.length===0?null:(0,JL.jsx)(lOe.PanelBody,{title:(0,cOe.__)("Content"),children:(0,JL.jsx)(mut,{clientIds:r})})}function uOe(){return(0,QL.useSelect)(t=>{let{getCurrentPostType:r}=t(I);return r()},[])!==Ni?null:(0,JL.jsx)(hut,{})}var dOe=a(be(),1),fOe=a(Y(),1),pOe=a(j(),1);var mOe=a(E(),1);function hOe(){let{block:e}=(0,fOe.useSelect)(r=>{let{getSelectedBlock:o}=r(dOe.store);return{block:o()}},[]);if(!e)return null;let t=e.attributes?.__revisionDiffStatus?.changedAttributes;return(0,mOe.jsx)(qL,{title:(0,pOe.__)("Changed attributes"),entries:t,initialOpen:!0})}var Wx=a(Y(),1),gOe=a(U(),1),vOe=a(be(),1),bOe=a(Dt(),1);function gut(){let{hasBlockSelection:e}=(0,Wx.useSelect)(n=>({hasBlockSelection:!!n(vOe.store).getBlockSelectionStart()}),[]),{getActiveComplementaryArea:t}=(0,Wx.useSelect)(He),{enableComplementaryArea:r}=(0,Wx.useDispatch)(He),{get:o}=(0,Wx.useSelect)(bOe.store);(0,gOe.useEffect)(()=>{let n=t("core"),i=["edit-post/document","edit-post/block"].includes(n),s=o("core","distractionFree");!i||s||(e?r("core","edit-post/block"):r("core","edit-post/document"))},[e,t,r,o])}var yOe=gut;var eo=a(E(),1),{Tabs:Gx}=K(_Oe.privateApis),vut=!0,but=({tabName:e,keyboardShortcut:t,onActionPerformed:r,extraPanels:o})=>{let n=(0,nv.useRef)(null),i=(0,nv.useContext)(Gx.Context),s=(0,ik.useSelect)(c=>K(c(I)).isRevisionsMode());(0,nv.useEffect)(()=>{let c=Array.from(n.current?.querySelectorAll('[role="tab"]')||[]),u=c.find(m=>m.getAttribute("data-tab-id")===e),d=u?.ownerDocument.activeElement;c.some(m=>d&&d.id===m.id)&&u&&u.id!==d?.id&&u?.focus()},[e]);let l;if(s)l=(0,eo.jsx)(AIe,{});else{let c=window?.__experimentalDataFormInspector;l=(0,eo.jsxs)(eo.Fragment,{children:[c?(0,eo.jsx)(pIe,{onActionPerformed:r}):(0,eo.jsx)($Ae,{onActionPerformed:r}),(0,eo.jsx)(b6.Slot,{}),(0,eo.jsx)(iOe,{}),c&&(0,eo.jsx)(tOe,{}),(0,eo.jsx)(uOe,{}),(0,eo.jsx)(jIe,{}),(0,eo.jsx)(qF,{}),(0,eo.jsx)(mAe,{}),o]})}return(0,eo.jsx)(My,{identifier:e,header:(0,eo.jsx)(Gx.Context.Provider,{value:i,children:(0,eo.jsx)(GIe,{ref:n})}),closeLabel:(0,Yx.__)("Close Settings"),className:"editor-sidebar__panel",headerClassName:"editor-sidebar__panel-tabs",title:(0,Yx._x)("Settings","panel button label"),toggleShortcut:t,icon:(0,Yx.isRTL)()?dv:wf,isActiveByDefault:vut,children:(0,eo.jsxs)(Gx.Context.Provider,{value:i,children:[(0,eo.jsx)(Gx.TabPanel,{tabId:ls.document,focusable:!1,children:l}),(0,eo.jsxs)(Gx.TabPanel,{tabId:ls.block,focusable:!1,children:[(0,eo.jsx)(e4.BlockInspector,{}),s&&(0,eo.jsx)(hOe,{})]})]})})},yut=({extraPanels:e,onActionPerformed:t})=>{yOe();let{tabName:r,keyboardShortcut:o}=(0,ik.useSelect)(s=>{let l=s(wOe.store).getShortcutRepresentation("core/editor/toggle-sidebar"),c=s(He).getActiveComplementaryArea("core"),u=[ls.block,ls.document].includes(c),d=c;return u||(d=s(e4.store).getBlockSelectionStart()?ls.block:ls.document),{tabName:d,keyboardShortcut:l}},[]),{enableComplementaryArea:n}=(0,ik.useDispatch)(He),i=(0,nv.useCallback)(s=>{s&&n("core",s)},[n]);return(0,eo.jsx)(Gx,{selectedTabId:r,onSelect:i,selectOnMove:!1,children:(0,eo.jsx)(but,{tabName:r,keyboardShortcut:o,onActionPerformed:t,extraPanels:e})})},SOe=yut;var g4=a(j(),1),ff=a(Y(),1),v4=a(U(),1),u5e=a(Te(),1),d5e=a(xa(),1);var jK=a(be(),1);var f5e=a(Dt(),1),b4=a(hd(),1);var qx="edit-post/collab-history-sidebar",iv="edit-post/collab-sidebar",FK=[qx,iv];var df=a(U(),1),d4=a(j(),1),Jx=a(Y(),1);var dk=a(be(),1);var Xx=a(U(),1),a4=a(G(),1);var l4=a(Te(),1),Ai=a(j(),1),ck=a(Y(),1),VOe=a(Mp(),1),c4=a(be(),1);var n4=a(j(),1),LOe=a(U(),1),BOe=a(Te(),1),a0=a(Y(),1),sk=a(be(),1);var POe=a(G(),1);var t4=a(j(),1),af=a(ln(),1),xOe=a(ae(),1),COe=a(Y(),1),TOe=a(be(),1);var _c=a(E(),1);function EOe({avatar:e,name:t,date:r,userId:o}){let n=!!e,i=(0,af.getSettings)(),{currentUserAvatar:s,currentUserName:l,currentUserId:c,dateFormat:u=i.formats.date}=(0,COe.useSelect)(v=>{let{canUser:b,getCurrentUser:_,getEntityRecord:y}=v(xOe.store),w=b("read",{kind:"root",name:"site"})?y("root","site"):void 0;if(n)return{dateFormat:w?.date_format};let{getSettings:S}=v(TOe.store),{__experimentalDiscussionSettings:x}=S(),C=x?.avatarURL,A=_();return{currentUserAvatar:A?.avatar_urls?.[48]??C,currentUserName:A?.name,currentUserId:A?.id,dateFormat:w?.date_format}},[n]),d=(0,af.getDate)(r),f=(0,af.dateI18n)("c",d),h=Math.floor((new Date-d)/(1e3*60*60*24))<30?(0,af.humanTimeDiff)(d):(0,af.dateI18n)(u,d),g=(0,af.dateI18n)((0,t4._x)("F j, Y g:i\xA0a","Note date full date format"),r);return(0,_c.jsxs)(_c.Fragment,{children:[(0,_c.jsx)("img",{src:e||s,className:"editor-collab-sidebar-panel__user-avatar",alt:(0,t4.__)("User avatar"),width:32,height:32,style:{borderColor:za(o??c)}}),(0,_c.jsxs)(se,{direction:"column",children:[(0,_c.jsx)("span",{className:"editor-collab-sidebar-panel__user-name",children:t??l}),r&&(0,_c.jsxs)(Ze.Root,{children:[(0,_c.jsx)(Ze.Trigger,{render:(0,_c.jsx)("time",{dateTime:f,className:"editor-collab-sidebar-panel__user-time",children:h})}),(0,_c.jsx)(Ze.Popup,{children:g})]})]})]})}var i0=a(E(),1);function Kx({note:e,actions:t,className:r,children:o,...n}){return(0,i0.jsxs)(se,{direction:"column",gap:"sm",className:r,...n,children:[(0,i0.jsxs)(se,{direction:"row",align:"center",justify:"flex-start",gap:"md",children:[(0,i0.jsx)(EOe,{avatar:e?.author_avatar_urls?.[48],name:e?.author_name,date:e?.date,userId:e?.author}),t&&(0,i0.jsx)(POe.FlexItem,{className:"editor-collab-sidebar-panel__note-actions",onClick:i=>i.stopPropagation(),children:(0,i0.jsx)(se,{direction:"row",align:"center",children:t})})]}),o]})}var DK=a(U(),1),Zx=a(G(),1);var r4=a(j(),1),NOe=a(Te(),1),MOe=a(Mo(),1);var FOe=a(Mp(),1);var kOe=a(U(),1),ROe=a(Y(),1),AOe=a(ae(),1);var IOe=a(E(),1),wut={name:"note-mentions",className:"editor-autocompleters__user editor-collab-sidebar-panel__mention-suggestion",triggerPrefix:"@",useItems(e){let t=(0,ROe.useSelect)(o=>{let{getUsers:n}=o(AOe.store);return n({context:"view",search:e})},[e]);return[(0,kOe.useMemo)(()=>t?t.map(o=>({key:`note-mention-${o.slug}`,value:o,label:eY(o)})):[],[t])]},getOptionCompletion(e){return{action:"insert-at-caret",value:(0,IOe.jsx)("span",{className:`wp-note-mention user-${e.id}`,children:"@"+e.name})}}},OOe=wut;var lf=a(E(),1),{RichTextControl:_ut}=K(mN),Sut=["core/bold","core/italic","core/link","core/code"],xut=[OOe];function s0({onSubmit:e,onCancel:t,note:r,labels:o}){let[n,i]=(0,DK.useState)(r?.content?.raw??""),[s,l]=(0,DK.useState)(!1),c=(0,NOe.useInstanceId)(s0,"comment-input"),u=bRe((0,FOe.__unstableStripHTML)(n)),d=s||n===r?.content?.raw||!u.length;async function f(){if(d)return;l(!0);let m=n;try{await e(m)!==void 0&&i(g=>g===m?"":g)}catch{}finally{l(!1)}}return(0,lf.jsxs)(se,{className:"editor-collab-sidebar-panel__note-form",direction:"column",gap:"lg",render:(0,lf.jsx)("form",{}),onSubmit:m=>{m.preventDefault(),f()},onKeyDown:m=>{if(MOe.isKeyboardEvent.primary(m,"Enter")){m.preventDefault(),f();return}m.key==="Escape"&&!m.defaultPrevented&&(m.preventDefault(),t(m))},children:[(0,lf.jsx)(_ut,{id:c,label:o?.input??(0,r4.__)("Note"),hideLabelFromVision:!0,value:n,onChange:i,placeholder:o?.placeholder,allowedFormats:Sut,completers:xut}),(0,lf.jsxs)(se,{direction:"row",align:"center",justify:"flex-end",gap:"sm",wrap:"wrap",children:[(0,lf.jsx)(Zx.Button,{size:"compact",variant:"tertiary",onClick:t,children:(0,lf.jsx)(Zx.__experimentalTruncate,{children:(0,r4.__)("Cancel")})}),(0,lf.jsx)(Zx.Button,{size:"compact",accessibleWhenDisabled:!0,variant:"primary",type:"submit",disabled:d,children:(0,lf.jsx)(Zx.__experimentalTruncate,{children:o?.submit??(0,r4.__)("Add note")})})]})]})}var DOe=a(E(),1);function o4({floating:e,className:t,style:r,children:o,...n}){let i=!!e;return(0,DOe.jsx)(se,{direction:"column",className:J(t,{"is-floating":i}),ref:i?e.ref:void 0,style:i?{top:e.y,...r}:r,...n,children:o})}var i4=a(E(),1),{useBlockElement:Cut}=K(sk.privateApis);function ak({onSubmit:e,sidebarRef:t,floating:r}){let{clientId:o}=(0,a0.useSelect)(m=>{let{getSelectedBlockClientId:h}=m(sk.store);return{clientId:h()}},[]),n=(0,a0.useSelect)(m=>K(m(I)).getSelectedNote(),[]),i=Cut(o),{toggleBlockSpotlight:s}=K((0,a0.useDispatch)(sk.store)),{selectNote:l}=K((0,a0.useDispatch)(I)),{getSelectedNote:c}=K((0,a0.useSelect)(I)),u=(0,LOe.useRef)(!1),d=(0,BOe.__experimentalUseFocusOutside)(m=>{m.relatedTarget?.closest(".editor-collab-sidebar-panel__add-note")||u.current||c()==="new"&&(s(o,!1),l(void 0))}),f=()=>{l(void 0),i?.focus(),s(o,!1)};return n!=="new"||!o?null:(0,i4.jsx)(o4,{floating:r,className:"editor-collab-sidebar-panel__add-note is-selected",gap:"md",tabIndex:0,"aria-label":(0,n4.__)("New note"),role:"treeitem",style:r?{opacity:r.y?void 0:0}:void 0,...d,children:(0,i4.jsx)(Kx,{children:(0,i4.jsx)(s0,{onSubmit:async m=>{u.current=!0;try{let h=await e({content:m});return h&&(l(h.id),cs(h.id,t.current)),h}finally{u.current=!1}},onCancel:f,labels:{input:(0,n4.__)("New note"),placeholder:(0,n4.__)("Add a note or @ mention")}})})})}var cf=a(U(),1),l0=a(G(),1);var xn=a(j(),1);var di=a(E(),1),{Menu:lk}=K(l0.privateApis);function Tut({items:e,buttonRef:t}){return(0,di.jsxs)(lk,{placement:"bottom-end",children:[(0,di.jsx)(lk.TriggerButton,{render:(0,di.jsx)(l0.Button,{ref:t,size:"small",icon:bo,label:(0,xn.__)("Actions"),disabled:!e.length,accessibleWhenDisabled:!0})}),(0,di.jsx)(lk.Popover,{modal:!1,children:e.map(r=>(0,di.jsx)(lk.Item,{onClick:r.onClick,children:(0,di.jsx)(lk.ItemLabel,{children:r.title})},r.id))})]})}function s4({note:e,parentNote:t,isSelected:r,onEditNote:o,onDeleteNote:n,onResolve:i}){let[s,l]=(0,cf.useState)(null),c=(0,cf.useRef)(null),u=(0,cf.useRef)(null),d=e?.content?.raw,[f,m]=(0,cf.useState)(d),[h,g]=(0,cf.useState)(!1),[v,b]=(0,cf.useState)(!1);f!==d&&(m(d),g(!1)),(0,cf.useLayoutEffect)(()=>{let R=u.current;R&&b(R.scrollHeight>R.clientHeight)},[d]);let _=e.parent===0,y=e.type==="note"&&e.meta&&(e.meta._wp_note_status==="resolved"||e.meta._wp_note_status==="reopen"),w=[{id:"edit",title:(0,xn.__)("Edit"),isEligible:({status:R})=>R!=="approved",onClick:()=>l("edit")},{id:"reopen",title:(0,xn._x)("Reopen","Reopen note"),isEligible:({status:R})=>R==="approved",onClick:()=>o({id:e.id,status:"hold"})},{id:"delete",title:(0,xn.__)("Delete"),isEligible:()=>!0,onClick:()=>l("delete")}],S=t?.status!=="approved"?w.filter(R=>R.isEligible(e)):[],x=e.parent===0?(0,xn.__)("Are you sure you want to delete this note? This will also delete all of this note's replies."):(0,xn.__)("Are you sure you want to delete this reply?"),C=()=>{l(null),c.current?.focus()},A;if(s==="edit")A=(0,di.jsx)(s0,{onSubmit:R=>{o({id:e.id,content:R}),l(null),c.current?.focus()},onCancel:C,note:e,labels:{submit:(0,xn._x)("Update","verb"),input:(0,xn.sprintf)((0,xn.__)("Edit note %1$s by %2$s"),e.id,e.author_name)}});else{let R;if(y){let M=e.meta._wp_note_status==="resolved"?(0,xn.__)("Marked as resolved"):(0,xn.__)("Reopened"),P=e?.content?.raw;R=P&&typeof P=="string"&&P.trim()!==""?(0,xn.sprintf)((0,xn.__)("%1$s: %2$s"),M,P):M}else R=e?.content?.rendered;A=(0,di.jsx)("div",{ref:u,className:J("editor-collab-sidebar-panel__note-content",{"editor-collab-sidebar-panel__resolution-text":y,"is-collapsed":!h}),dangerouslySetInnerHTML:{__html:R??""}})}let k=r?(0,di.jsxs)(di.Fragment,{children:[_&&i&&(0,di.jsx)(l0.Button,{label:(0,xn._x)("Resolve","Mark note as resolved"),size:"small",icon:fv,disabled:e.status==="approved",accessibleWhenDisabled:e.status==="approved",onClick:i}),(0,di.jsx)(Tut,{items:S,buttonRef:c})]}):null;return(0,di.jsxs)(Kx,{note:e,actions:k,role:e.parent!==0?"treeitem":void 0,children:[A,s==="delete"&&(0,di.jsx)(l0.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{n(e),l(null)},onCancel:C,confirmButtonText:(0,xn.__)("Delete"),children:x}),v&&s!=="edit"&&(0,di.jsx)(Ite,{className:"editor-collab-sidebar-panel__show-more-button",variant:"unstyled",size:"small",onClick:()=>g(!h),children:h?(0,xn.__)("Show less"):(0,xn.__)("Show more")})]})}var Wa=a(E(),1),{useBlockElement:Eut}=K(c4.privateApis);function jOe({note:e,onEditNote:t,onAddReply:r,onDeleteNote:o,isSelected:n,sidebarRef:i,floating:s,onKeyDown:l}){let c=!!s,{toggleBlockHighlight:u,selectBlock:d,toggleBlockSpotlight:f}=K((0,ck.useDispatch)(c4.store)),{selectNote:m}=K((0,ck.useDispatch)(I)),{getSelectedNote:h}=K((0,ck.useSelect)(I)),g=Eut(e.blockClientId),v=(0,l4.useDebounce)(u,50),b=(0,Xx.useRef)(null),_=(0,Xx.useRef)(!1),y=s?.registerThread,w=s?.unregisterThread;(0,Xx.useEffect)(()=>{let D=b.current;return D&&y&&y(e.id,g,D),()=>w?.(e.id)},[g,e.id,y,w]),(0,Xx.useEffect)(()=>{!n||e.id==="new"||PRe(e.id,i.current)},[n,s?.y,e.id,i]);let S=(0,l4.__experimentalUseFocusOutside)(D=>{let z=D.relatedTarget?.closest(".editor-collab-sidebar-panel__thread");z&&!_.current||(z||u(e.blockClientId,!1),h()===e.id&&R())});function x(){v(e.blockClientId,!0)}function C(){v(e.blockClientId,!1)}function A(D){S.onFocus(D),u(e.blockClientId,!0)}function k(){n||(m(e.id),cs(e.id,i.current),f(e.blockClientId,!0),e.blockClientId&&d(e.blockClientId,null))}function R(){m(void 0),f(e.blockClientId,!1)}function M(){t({id:e.id,status:"approved"}),R(),c?g?.focus():cs(e.id,i.current)}let P=e?.reply||[],T=P.length>0?P[P.length-1]:void 0,N=P.length>0?P.slice(0,-1):[],L=yRe((0,VOe.__unstableStripHTML)(e.content?.rendered),10),F=e.blockClientId?(0,Ai.sprintf)((0,Ai.__)("Note: %s"),L):(0,Ai.sprintf)((0,Ai.__)("Original block deleted. Note: %s"),L);return c&&e.id==="new"?(0,Wa.jsx)(ak,{onSubmit:r,sidebarRef:i,floating:{y:s.y,ref:b}}):(0,Wa.jsxs)(o4,{floating:c?{y:s.y,ref:b}:void 0,className:J("editor-collab-sidebar-panel__thread",{"is-selected":n}),id:`note-thread-${e.id}`,gap:"md",onClick:k,onMouseEnter:x,onMouseLeave:C,...S,onFocus:A,onKeyUp:D=>{D.key==="Tab"&&(_.current=!1)},onKeyDown:D=>{D.key==="Tab"?_.current=!0:l(D)},tabIndex:0,role:"treeitem","aria-label":F,"aria-expanded":n,children:[(0,Wa.jsx)(a4.Button,{className:"editor-collab-sidebar-panel__skip-to-note",variant:"secondary",size:"compact",onClick:()=>{cs(e.id,i.current,'[role="textbox"]')},children:(0,Ai.__)("Add new reply")}),!e.blockClientId&&(0,Wa.jsx)("p",{className:"editor-collab-sidebar-panel__deleted-block-notice",children:(0,Ai.__)("Original block deleted.")}),(0,Wa.jsx)(s4,{note:e,isSelected:n,onEditNote:t,onDeleteNote:o,onResolve:M}),n&&P.map(D=>(0,Wa.jsx)(s4,{note:D,parentNote:e,isSelected:n,onEditNote:t,onDeleteNote:o},D.id)),!n&&N.length>0&&(0,Wa.jsx)(se,{direction:"row",align:"center",justify:"space-between",className:"editor-collab-sidebar-panel__more-reply-separator",children:(0,Wa.jsx)(a4.Button,{size:"compact",variant:"tertiary",className:"editor-collab-sidebar-panel__more-reply-button",onClick:D=>{D.stopPropagation(),k()},children:(0,Ai.sprintf)((0,Ai._n)("%s more reply","%s more replies",N.length),N.length)})}),!n&&T&&(0,Wa.jsx)(s4,{note:T,parentNote:e,isSelected:!1,onEditNote:t,onDeleteNote:o}),n&&(0,Wa.jsx)(Kx,{role:"treeitem",children:(0,Wa.jsx)(s0,{onSubmit:D=>e.status==="approved"?t({id:e.id,status:"hold",content:D}):r({content:D,parent:e.id}),onCancel:D=>{D.stopPropagation(),R(),cs(e.id,i.current)},labels:{submit:e.status==="approved"?(0,Ai.__)("Reopen & Reply"):(0,Ai.__)("Reply"),input:(0,Ai.sprintf)((0,Ai.__)("Reply to note %1$s by %2$s"),e.id,e.author_name),placeholder:(0,Ai.__)("Reply or @ mention")}})}),!!e.blockClientId&&(0,Wa.jsx)(a4.Button,{className:"editor-collab-sidebar-panel__skip-to-block",variant:"secondary",size:"compact",onClick:D=>{D.stopPropagation(),g?.focus()},children:(0,Ai.__)("Back to block")})]})}var GOe=a(Ol(),1),sv=a(j(),1),uf=a(U(),1),u4=a(ae(),1),Iu=a(Y(),1),c0=a(be(),1),YOe=a(It(),1),qOe=a(Mp(),1),KOe=a(Lt(),1);var Qx=a(hd(),1);function zOe(){let e=new Set,t=new Map,r=new Map,o=new WeakMap,n={},i={};function s(){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&&s()});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)),s()},unregisterThread(c){t.delete(c);let u=r.get(c);u&&(l.unobserve(u),o.delete(u),r.delete(c)),delete n[c]},getAnchorRects(){return Object.fromEntries(Array.from(t).flatMap(([c,u])=>{if(!u)return[];if(c==="new"){let f=_Re(u)??u.getBoundingClientRect();return[[c,f]]}let d=u.querySelector(VD(c))??u;return[[c,d.getBoundingClientRect()]]}))},getFirstBlockElement(){return t.values().next().value??null}}}var HOe=a(j(),1),uk="core/note",UOe={title:(0,HOe.__)("Note"),tagName:"mark",className:"wp-note",attributes:{"data-id":"data-id"}};var{cleanEmptyObject:WOe}=K(c0.privateApis);function ZOe(e){let t={post:e,type:"note",status:"all",per_page:-1},{records:r}=(0,u4.useEntityRecords)("root","comment",t,{enabled:!!e&&typeof e=="number"}),{getBlockAttributes:o}=(0,Iu.useSelect)(c0.store),{clientIds:n}=(0,Iu.useSelect)(l=>{let{getClientIdsWithDescendants:c}=l(c0.store);return{clientIds:c()}},[]),{notes:i,unresolvedNotes:s}=(0,uf.useMemo)(()=>{if(!r||r.length===0)return{notes:[],unresolvedNotes:[]};let l={},c=new Map;for(let g of n){let v=o(g)?.metadata,b=Wg(v);if(b.length>0){l[g]=b;for(let _ of b)c.set(_,g)}}let u=new Map,d=[];for(let g of r){let v={...g,reply:[],blockClientId:g.parent===0?c.get(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,v]of Object.entries(l)){let b=o(g),_=v.map(y=>{let w=u.get(y);return w?{thread:w,start:SRe(w,b)}:null}).filter(Boolean).sort((y,w)=>y.start!==w.start?y.start-w.start:y.thread.id-w.thread.id);for(let{thread:y}of _)y.status==="hold"?f.push(y):y.status==="approved"&&m.push(y)}let h=d.filter(g=>!g.blockClientId);return{notes:[...f,...h,...m],unresolvedNotes:f}},[n,r,o]);return{notes:i,unresolvedNotes:s}}function Put(e,t){let r=e(),o=t();if(!r?.clientId||r.clientId!==o.clientId||!r.attributeKey||r.offset===void 0||o.offset===void 0||r.offset===o.offset)return null;let[n,i]=r.offset<o.offset?[r.offset,o.offset]:[o.offset,r.offset];return{clientId:r.clientId,attributeKey:r.attributeKey,start:n,end:i}}function kut(e,t,r,o){if(!(e instanceof Qx.RichTextData))return null;let n=xRe((0,Qx.create)({html:e.toHTMLString()}),{type:uk,attributes:{"data-id":String(t)}},r,o);return Qx.RichTextData.fromHTMLString(new Qx.RichTextData(n).toHTMLString())}function Rut(e,t,r,o){for(let n of t()){let i=r(n),s=BD(i,e);if(!s)continue;let l=Yq(i[s.attributeKey],e);l&&o(n,{[s.attributeKey]:l});return}}function XOe(){let{createNotice:e}=(0,Iu.useDispatch)(YOe.store),{saveEntityRecord:t,deleteEntityRecord:r}=(0,Iu.useDispatch)(u4.store),{getCurrentPostId:o}=(0,Iu.useSelect)(I),{getBlockAttributes:n,getClientIdsWithDescendants:i,getSelectedBlockClientId:s,getSelectionStart:l,getSelectionEnd:c}=(0,Iu.useSelect)(c0.store),{updateBlockAttributes:u}=(0,Iu.useDispatch)(c0.store),d=g=>{let v=g.message&&g.code!=="unknown_error"?(0,KOe.decodeEntities)(g.message):(0,sv.__)("An error occurred while performing an update.");e("error",v,{type:"snackbar",isDismissible:!0})};return{onCreate:async({content:g,parent:v})=>{try{let b=v?null:Put(l,c),_=await t("root","comment",{post:o(),content:g,status:"hold",type:"note",parent:v||0},{throwOnError:!0});if(!v&&_?.id){let y=b?.clientId||s();if(!y)return _;let w=n(y),S=w?.metadata,x=wRe(S,_.id),C={metadata:WOe(x)};if(b){let A=kut(w?.[b.attributeKey],_.id,b.start,b.end);A&&(C[b.attributeKey]=A)}u(y,C)}return e("snackbar",v?(0,sv.__)("Reply added."):(0,sv.__)("Note added."),{type:"snackbar",isDismissible:!0}),_}catch(b){d(b)}},onEdit:async({id:g,content:v,status:b})=>{try{if(b==="approved"||b==="hold"){await t("root","comment",{id:g,status:b},{throwOnError:!0});let _={post:o(),content:v||"",type:"note",status:b,parent:g,meta:{_wp_note_status:b==="approved"?"resolved":"reopen"}};await t("root","comment",_,{throwOnError:!0}),b==="approved"&&Rut(g,i,n,u),(0,GOe.speak)(b==="approved"?(0,sv.__)("Note marked as resolved."):(0,sv.__)("Note reopened."))}else await t("root","comment",{id:g,content:v,status:b},{throwOnError:!0}),e("snackbar",(0,sv.__)("Note updated."),{type:"snackbar",isDismissible:!0})}catch(_){d(_)}},onDelete:async g=>{try{if(await r("root","comment",g.id,void 0,{throwOnError:!0}),!g.parent){let v=g.blockClientId||s();if(!v)return;let b=n(v),_={metadata:WOe(CRe(b?.metadata,g.id))},y=BD(b,g.id);if(y){let w=Yq(b[y.attributeKey],g.id);w&&(_[y.attributeKey]=w)}u(v,_)}e("snackbar",(0,sv.__)("Note deleted."),{type:"snackbar",isDismissible:!0})}catch(v){d(v)}}}}function QOe(e=!1){let t=(0,Iu.useRegistry)();(0,uf.useEffect)(()=>{if(!e)return;let{getActiveComplementaryArea:r}=t.select(He),{disableComplementaryArea:o,enableComplementaryArea:n}=t.dispatch(He),i=t.subscribe(()=>{r("core")===null&&n("core",iv)});return()=>{i(),r("core")===iv&&o("core",iv)}},[e,t])}function JOe({threads:e,selectedNoteId:t,isFloating:r,sidebarRef:o}){let[n,i]=(0,uf.useState)({}),[s]=(0,uf.useState)(zOe),l=(0,uf.useSyncExternalStore)(s.subscribe,s.getSnapshot);return(0,uf.useEffect)(()=>{if(!r||!o?.current)return;let c=o.current,u=s.getFirstBlockElement(),d=u?.closest(".is-root-container")??u,f=d?(0,qOe.getScrollContainer)(d):null,m=()=>{c.style.setProperty("--canvas-scroll",`${-(f?.scrollTop??0)}px`)},h,g=()=>{window.cancelAnimationFrame(h),h=window.requestAnimationFrame(()=>{let y=TRe({threads:e,selectedNoteId:t,blockRects:s.getAnchorRects(),heights:l,scrollTop:f?.scrollTop??0});i(y.positions),m()})};g();let v=new window.ResizeObserver(g);d&&v.observe(d);let b=f?.ownerDocument?.defaultView,_={passive:!0,capture:!0};return b?.addEventListener("scroll",m,_),()=>{window.cancelAnimationFrame(h),v.disconnect(),b?.removeEventListener("scroll",m,_)}},[o,l,r,t,s,e]),{notePositions:n,registerThread:s.registerThread,unregisterThread:s.unregisterThread}}var El=a(E(),1),{useBlockElement:Aut}=K(dk.privateApis);function LK({notes:e,sidebarRef:t,isFloating:r=!1,styles:o}){let{onCreate:n,onEdit:i,onDelete:s}=XOe(),{selectNote:l}=K((0,Jx.useDispatch)(I)),{selectBlock:c,toggleBlockSpotlight:u}=K((0,Jx.useDispatch)(dk.store)),{noteId:d,selectedBlockClientId:f,orderedBlockIds:m}=(0,Jx.useSelect)(M=>{let{getBlockAttributes:P,getSelectedBlockClientId:T,getClientIdsWithDescendants:N}=M(dk.store),L=T();return{noteId:L?P(L)?.metadata?.noteId:null,selectedBlockClientId:L,orderedBlockIds:N()}},[]),{selectedNote:h,noteFocused:g}=(0,Jx.useSelect)(M=>{let{getSelectedNote:P,isNoteFocused:T}=K(M(I));return{selectedNote:P(),noteFocused:T()}},[]),v=Aut(f),b=(0,df.useMemo)(()=>{if(!r||h!=="new")return e;let M={id:"new",blockClientId:f,content:{rendered:""}},P=[];return m.forEach(T=>{let N=e.filter(L=>L.blockClientId===T);P.push(...N),T===f&&P.push(M)}),P},[e,r,h,f,m]),_=async M=>{let P=b.findIndex(F=>F.id===M.id),T=b[P+1],N=b[P-1];if(await s(M),M.parent!==0){l(M.parent),cs(M.parent,t.current);return}let L=T??N;L?(l(L.id),cs(L.id,t.current),L.blockClientId&&(u(L.blockClientId,!0),c(L.blockClientId,null))):(l(void 0),u(M.blockClientId,!1),v?.focus())},y=(0,df.useMemo)(()=>{let M=Wg({noteId:d}),P=e.filter(T=>M.includes(T.id));return BP(P)?.id},[d,e]),w=(0,df.useRef)(f);(0,df.useEffect)(()=>{w.current!==f&&(w.current=f,l(y))},[f,y,l]),(0,df.useEffect)(()=>{g&&h&&(cs(h,t.current,h==="new"?'[role="textbox"]':void 0),l(h))},[g,h,l,t]);let{notePositions:S,registerThread:x,unregisterThread:C}=JOe({threads:b,selectedNoteId:h,isFloating:r,sidebarRef:t}),A=Array.isArray(b)&&b.length>0,k=(M,P,T)=>{if(M.defaultPrevented)return;let N=b.findIndex(F=>F.id===P.id),L=M.currentTarget===M.target;(M.key==="Enter"||M.key==="ArrowRight")&&L&&!T?(l(P.id),P.blockClientId&&(c(P.blockClientId,null),u(P.blockClientId,!0))):(M.key==="Enter"||M.key==="ArrowLeft")&&L&&T||M.key==="Escape"?(l(void 0),P.blockClientId&&u(P.blockClientId,!1),cs(P.id,t.current)):M.key==="ArrowDown"&&N<b.length-1&&L?cs(b[N+1].id,t.current):M.key==="ArrowUp"&&N>0&&L?cs(b[N-1].id,t.current):M.key==="Home"&&L?cs(b[0].id,t.current):M.key==="End"&&L&&cs(b[b.length-1].id,t.current)},R=r?-1:b.findIndex(M=>M.status==="approved"&&!!M.blockClientId);return(0,El.jsx)(se,{className:"editor-collab-sidebar-panel",style:o,role:"tree",direction:"column",gap:"md",justify:"flex-start",ref:M=>{M&&(t.current=M)},"aria-label":r?(0,d4.__)("Unresolved notes"):(0,d4.__)("All notes"),children:!A&&!r?(0,El.jsx)(ak,{onSubmit:n,sidebarRef:t}):(0,El.jsxs)(El.Fragment,{children:[!r&&h==="new"&&(0,El.jsx)(ak,{onSubmit:n,sidebarRef:t}),b.map((M,P)=>(0,El.jsxs)(df.Fragment,{children:[P===R&&(0,El.jsx)(se,{direction:"row",align:"center",justify:"center",gap:"sm",className:"editor-collab-sidebar-panel__status-separator",children:(0,El.jsx)(xs,{variant:"heading-sm",render:(0,El.jsx)("p",{}),children:(0,d4.__)("Resolved")})}),(0,El.jsx)(jOe,{note:M,onAddReply:n,onDeleteNote:_,onEditNote:i,isSelected:h===M.id,sidebarRef:t,floating:r?{y:S[M.id],registerThread:x,unregisterThread:C}:void 0,onKeyDown:T=>k(T,M,h===M.id)})]},M.id))]})})}var $Oe=a(G(),1),f4=a(j(),1),m4=a(be(),1),BK=a(Y(),1),e5e=a(Pt(),1),t5e=a(xa(),1);var p4=a(E(),1),{NoteIconSlotFill:Iut}=K(m4.privateApis);function Out({clientId:e,onClick:t,isDistractionFree:r}){let o=(0,BK.useSelect)(l=>l(m4.store).getBlock(e),[e]),n=(0,BK.useSelect)(l=>l(t5e.store).getShortcutRepresentation("core/editor/new-note"),[]);if(!o?.isValid||o?.name===(0,e5e.getUnregisteredTypeHandlerName)())return null;let i=r||o?.name==="core/freeform",s;return r?s=(0,f4.__)("Notes are disabled in distraction free mode."):o?.name==="core/freeform"&&(s=(0,f4.__)("Convert to blocks to add notes.")),(0,p4.jsx)($Oe.MenuItem,{onClick:t,"aria-haspopup":"dialog",disabled:i,info:s,shortcut:n,children:(0,f4.__)("Add note")})}function VK({onClick:e,isDistractionFree:t}){return(0,p4.jsx)(Iut.Fill,{children:({clientId:r,onClose:o})=>(0,p4.jsx)(Out,{clientId:r,isDistractionFree:t,onClick:()=>{e(r),o()}})})}var r5e=a(G(),1);var $x=a(j(),1),o5e=a(U(),1),h4=a(be(),1),n5e=a(Y(),1);var av=a(E(),1),{NoteIconToolbarSlotFill:Nut}=K(h4.privateApis);function Mut({participants:e}){let t=(0,n5e.useSelect)(c=>{let{getSettings:u}=c(h4.store),{__experimentalDiscussionSettings:d}=u();return d?.avatarURL},[]),r=3,n=e.length>r?e.slice(0,r-1):e,i=Math.max(0,e.length-n.length),l=e.length>100&&i>0?(0,$x.__)("100+"):(0,$x.sprintf)((0,$x.__)("+%s"),i);return(0,av.jsxs)(se,{direction:"row",align:"center",gap:"xs",children:[n.map(c=>(0,av.jsx)("img",{src:c.avatar||t,alt:c.name,className:"editor-note-indicator__avatar",style:{borderColor:za(c.id)}},c.id)),i>0&&(0,av.jsx)("span",{className:"editor-note-indicator__overflow",children:l})]})}function i5e({onClick:e,note:t}){let r=(0,o5e.useMemo)(()=>{if(!t)return[];let o=new Map,n=[t,...t.reply].sort((i,s)=>new Date(i.date)-new Date(s.date));for(let i of n)!i.author_name||o.has(i.author)||o.set(i.author,{id:i.author,name:i.author_name,avatar:i.author_avatar_urls?.["48"]||i.author_avatar_urls?.["96"]});return Array.from(o.values())},[t]);return r.length?(0,av.jsx)(Nut.Fill,{children:(0,av.jsx)(r5e.ToolbarButton,{className:"editor-note-indicator",label:(0,$x.__)("View notes"),onClick:()=>e(),showTooltip:!0,children:(0,av.jsx)(Mut,{participants:r})})}):null}var a5e=a(U(),1),l5e=a(be(),1);var Fut="40",s5e="80",Dut="mark.wp-note{background-color:transparent;color:inherit;}";function Lut(e,t=null){let r=[Dut];for(let o of e??[]){if(!o?.id)continue;let n=za(o.author??0),i=VD(o.id);r.push(`${i}{background-color:${n}${Fut};}`),r.push(`${i}:hover,${i}:focus-within{background-color:${n}${s5e};}`),t&&String(t)===String(o.id)&&r.push(`${i}{background-color:${n}${s5e};}`)}return r.join("")}function c5e({threads:e,selectedId:t}){let r=(0,a5e.useMemo)(()=>Lut(e,t),[e,t]);return(0,l5e.useStyleOverride)({id:"core-note-highlights",css:r}),null}var us=a(E(),1);function But({postId:e}){(0,v4.useEffect)(()=>((0,b4.registerFormatType)(uk,UOe),()=>{(0,b4.unregisterFormatType)(uk)}),[]);let{getActiveComplementaryArea:t}=(0,ff.useSelect)(He),{enableComplementaryArea:r}=(0,ff.useDispatch)(He),{toggleBlockSpotlight:o,selectBlock:n}=K((0,ff.useDispatch)(jK.store)),{selectNote:i}=K((0,ff.useDispatch)(I)),s=(0,u5e.useViewportMatch)("medium"),l=(0,v4.useRef)(null),{clientId:c,noteId:u,isClassicBlock:d}=(0,ff.useSelect)(R=>{let{getBlockAttributes:M,getSelectedBlockClientId:P,getBlockName:T}=R(jK.store),N=P();return{clientId:N,noteId:N?M(N)?.metadata?.noteId:null,isClassicBlock:N?T(N)==="core/freeform":!1}},[]),f=Wg({noteId:u}),{isDistractionFree:m}=(0,ff.useSelect)(R=>{let{get:M}=R(f5e.store);return{isDistractionFree:M("core","distractionFree")}},[]),h=(0,ff.useSelect)(R=>K(R(I)).getSelectedNote(),[]),{notes:g,unresolvedNotes:v}=ZOe(e),b=s,_=g.length>0||!b;QOe(b&&(v.length>0||h!==void 0));async function y({targetClientId:R,noteId:M,isApproved:P}){if(!R)return;let T=await t("core");P?r("core",qx):(!FK.includes(T)||!_)&&r("core",b?iv:qx);let N=await t("core");FK.includes(N)&&(n(R,null),o(R,!0),i(M,{focus:!0}))}function w(R){let M=g.filter(T=>T.blockClientId===R),P=BP(M);return y({targetClientId:R,noteId:P?.id??"new",isApproved:P?.status==="approved"})}function S(R){return y({targetClientId:R,noteId:"new",isApproved:!1})}(0,d5e.useShortcut)("core/editor/new-note",R=>{R.preventDefault(),S(c)},{isDisabled:m||d||!c});let{merged:x}=Hr(),C=x?.styles?.color?.background,A=f.length>0?g.filter(R=>f.includes(R.id)):[],k=BP(A);return m?(0,us.jsx)(VK,{isDistractionFree:!0}):(0,us.jsxs)(us.Fragment,{children:[(0,us.jsx)(c5e,{threads:v,selectedId:h}),!!k&&(0,us.jsx)(i5e,{note:k,onClick:()=>w(c)}),(0,us.jsx)(VK,{onClick:R=>S(R)}),_&&(0,us.jsx)(My,{identifier:qx,name:qx,title:(0,g4.__)("All notes"),header:(0,us.jsx)("h2",{className:"interface-complementary-area-header__title",children:(0,g4.__)("All notes")}),icon:IB,closeLabel:(0,g4.__)("Close Notes"),children:(0,us.jsx)(LK,{notes:g,sidebarRef:l})}),s&&(0,us.jsx)(My,{isPinnable:!1,header:!1,identifier:iv,className:"editor-collab-sidebar",headerClassName:"editor-collab-sidebar__header",backgroundColor:C,children:(0,us.jsx)(LK,{notes:v,sidebarRef:l,styles:{backgroundColor:C},isFloating:!0})})]})}function p5e(){let{postId:e,editorMode:t,revisionsMode:r}=(0,ff.useSelect)(o=>{let{getCurrentPostId:n,getEditorMode:i,isRevisionsMode:s}=K(o(I));return{postId:n(),editorMode:i(),revisionsMode:s()}},[]);return!e||typeof e!="number"||t==="text"||r?null:(0,us.jsx)(uo,{supportKeys:"editor.notes",children:(0,us.jsx)(But,{postId:e})})}var pf=a(G(),1),e1=a(j(),1);var hk=a(Y(),1),HK=a(U(),1),b5e=a(Dt(),1),x4=a(Te(),1),y5e=a(ae(),1);var w5e=a(be(),1);var fm=a(G(),1),y4=a(Y(),1),fk=a(j(),1),m5e=a(Dt(),1);var h5e=a(ae(),1);var Ou=a(E(),1);function w4({hideWelcomeGuide:e=!1,onChangePath:t}){let{user:r,setUser:o}=Hr(),n=!!r&&(Object.keys(r?.styles??{}).length>0||Object.keys(r?.settings??{}).length>0),i=()=>{o({styles:{},settings:{}})},{toggle:s}=(0,y4.useDispatch)(m5e.store),{canEditCSS:l}=(0,y4.useSelect)(u=>{let{getEntityRecord:d,__experimentalGetCurrentGlobalStylesId:f}=u(h5e.store),m=f();return{canEditCSS:!!(m?d("root","globalStyles",m):void 0)?._links?.["wp:action-edit-css"]}},[]),c=()=>{t("/css")};return(0,Ou.jsx)(fm.DropdownMenu,{icon:bo,label:(0,fk.__)("More"),toggleProps:{size:"compact"},children:({onClose:u})=>(0,Ou.jsxs)(Ou.Fragment,{children:[(0,Ou.jsxs)(fm.MenuGroup,{children:[l&&(0,Ou.jsx)(fm.MenuItem,{onClick:c,children:(0,fk.__)("Additional CSS")}),!e&&(0,Ou.jsx)(fm.MenuItem,{onClick:()=>{s("core/edit-site","welcomeGuideStyles"),u()},children:(0,fk.__)("Welcome Guide")})]}),(0,Ou.jsx)(fm.MenuGroup,{children:(0,Ou.jsx)(fm.MenuItem,{onClick:()=>{i(),u()},disabled:!n,children:(0,fk.__)("Reset styles")})})]})})}var u0=a(E(),1);function g5e({className:e,identifier:t,title:r,icon:o,children:n,closeLabel:i,header:s,headerClassName:l,panelClassName:c,isActiveByDefault:u}){return(0,u0.jsxs)(u0.Fragment,{children:[(0,u0.jsx)(Kl,{className:e,scope:"core",identifier:t,title:r,icon:o,closeLabel:i,header:s,headerClassName:l,panelClassName:c,isActiveByDefault:u,children:n}),(0,u0.jsx)(Uh,{scope:"core",identifier:t,icon:o,children:r})]})}var _4=a(Y(),1),S4=a(G(),1),Sc=a(j(),1),zK=a(Dt(),1);var pk=a(E(),1);function mk({nonAnimatedSrc:e,animatedSrc:t}){return(0,pk.jsxs)("picture",{className:"editor-welcome-guide__image",children:[(0,pk.jsx)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,pk.jsx)("img",{src:t,width:"312",height:"240",alt:""})]})}var to=a(E(),1);function v5e(){let{toggle:e}=(0,_4.useDispatch)(zK.store),{isActive:t,isStylesOpen:r}=(0,_4.useSelect)(n=>{let i=n(He).getActiveComplementaryArea("core");return{isActive:!!n(zK.store).get("core/edit-site","welcomeGuideStyles"),isStylesOpen:i==="edit-site/global-styles"}},[]);if(!t||!r)return null;let o=(0,Sc.__)("Welcome to Styles");return(0,to.jsx)(S4.Guide,{className:"editor-welcome-guide guide-styles",contentLabel:o,finishButtonText:(0,Sc.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuideStyles"),pages:[{image:(0,to.jsx)(mk,{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,to.jsxs)(to.Fragment,{children:[(0,to.jsx)("h1",{className:"editor-welcome-guide__heading",children:o}),(0,to.jsx)("p",{className:"editor-welcome-guide__text",children:(0,Sc.__)("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,to.jsx)(mk,{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,to.jsxs)(to.Fragment,{children:[(0,to.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,Sc.__)("Set the design")}),(0,to.jsx)("p",{className:"editor-welcome-guide__text",children:(0,Sc.__)("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,to.jsx)(mk,{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,to.jsxs)(to.Fragment,{children:[(0,to.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,Sc.__)("Personalize blocks")}),(0,to.jsx)("p",{className:"editor-welcome-guide__text",children:(0,Sc.__)("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,to.jsx)(mk,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,to.jsxs)(to.Fragment,{children:[(0,to.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,Sc.__)("Learn more")}),(0,to.jsxs)("p",{className:"editor-welcome-guide__text",children:[(0,Sc.__)("New to block themes and styling your site?")," ",(0,to.jsx)(S4.ExternalLink,{href:(0,Sc.__)("https://wordpress.org/documentation/article/styles-overview/"),children:(0,Sc.__)("Here\u2019s a detailed guide to learn how to make the most of it.")})]})]})}]})}var Ii=a(E(),1);function _5e(){let{shouldResetNavigation:e,stylesPath:t,showStylebook:r,showListViewByDefault:o,hasRevisions:n,activeComplementaryArea:i,editorSettings:s,styleStateViewport:l}=(0,hk.useSelect)(y=>{let{getActiveComplementaryArea:w}=y(He),{getStylesPath:S,getShowStylebook:x}=K(y(I)),C=y(I).getEditorMode()==="visual",A=y(b5e.store).get("core","showListViewByDefault"),{getEntityRecord:k,__experimentalGetCurrentGlobalStylesId:R}=y(y5e.store),M=R(),P=M?k("root","globalStyles",M):void 0;return{stylesPath:S(),showStylebook:x(),shouldResetNavigation:w("core")!=="edit-site/global-styles"||!C,showListViewByDefault:A,hasRevisions:!!P?._links?.["version-history"]?.[0]?.count,activeComplementaryArea:y(He).getActiveComplementaryArea("core"),editorSettings:y(I).getEditorSettings(),styleStateViewport:K(y(w5e.store)).getStyleStateViewport()}},[]),{setStylesPath:c,setShowStylebook:u,resetStylesNavigation:d}=K((0,hk.useDispatch)(I)),f=(0,x4.useViewportMatch)("medium","<"),m=t.startsWith("/revisions")&&!r,h=t.startsWith("/revisions")&&r,g=(0,x4.usePrevious)(i);(0,HK.useEffect)(()=>{i==="edit-site/global-styles"&&g!=="edit-site/global-styles"&&d()},[i,g,d]),(0,HK.useEffect)(()=>{e&&d()},[e,d]);let{setIsListViewOpened:v}=(0,hk.useDispatch)(I),b=()=>{v(!1),c(m||h?"/":"/revisions")},_=()=>{v(r&&o),u(!r)};return(0,Ii.jsxs)(Ii.Fragment,{children:[(0,Ii.jsx)(g5e,{className:"editor-global-styles-sidebar",identifier:"edit-site/global-styles",title:(0,e1.__)("Styles"),icon:XV,closeLabel:(0,e1.__)("Close Styles"),panelClassName:"editor-global-styles-sidebar__panel",header:(0,Ii.jsxs)(pf.Flex,{className:"editor-global-styles-sidebar__header",gap:1,children:[(0,Ii.jsx)(pf.FlexItem,{children:(0,Ii.jsx)("h2",{className:"editor-global-styles-sidebar__header-title",children:(0,e1.__)("Styles")})}),(0,Ii.jsxs)(pf.Flex,{justify:"flex-end",gap:1,className:"editor-global-styles-sidebar__header-actions",children:[!f&&(0,Ii.jsx)(pf.FlexItem,{children:(0,Ii.jsx)(pf.Button,{icon:mv,label:(0,e1.__)("Style Book"),isPressed:r,accessibleWhenDisabled:!0,disabled:e,onClick:_,size:"compact"})}),(0,Ii.jsx)(pf.FlexItem,{children:(0,Ii.jsx)(pf.Button,{label:(0,e1.__)("Revisions"),icon:yf,onClick:b,accessibleWhenDisabled:!0,disabled:!n,isPressed:m||h,size:"compact"})}),(0,Ii.jsx)(w4,{onChangePath:c})]})]}),children:(0,Ii.jsx)(KM,{path:t,onPathChange:c,settings:s,selectedViewport:l,showResponsiveStateControls:!1})}),(0,Ii.jsx)(v5e,{})]})}var xc=a(E(),1);function Vut({postType:e,postId:t,templateId:r,settings:o,children:n,initialEdits:i,onActionPerformed:s,extraContent:l,extraSidebarPanels:c,...u}){let{post:d,template:f,hasLoadedPost:m,error:h,isBlockTheme:g,showGlobalStyles:v}=(0,S5e.useSelect)(b=>{let{getEntityRecord:_,getResolutionError:y,hasFinishedResolution:w,getCurrentTheme:S,__experimentalGetCurrentGlobalStylesId:x,canUser:C}=b(x5e.store),{getRenderingMode:A,getCurrentPostType:k}=b(I),R=["postType",e,t],M=A(),P=k(),T=S()?.is_block_theme,N=x(),L=N?C("update",{kind:"root",name:"globalStyles",id:N}):!1;return{post:_(...R),template:r?_("postType",Cr,r):void 0,hasLoadedPost:w("getEntityRecord",R),error:y("getEntityRecord",R)?.message,isBlockTheme:T,showGlobalStyles:T&&L&&(P==="wp_template"||M==="template-locked")}},[e,t,r]);return(0,xc.jsxs)(xc.Fragment,{children:[m&&!d&&(0,xc.jsx)(C5e.Notice,{status:h?"error":"warning",isDismissible:!1,children:h||(0,T5e.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")}),!!d&&(0,xc.jsxs)(YG,{post:d,__unstableTemplate:f,settings:o,initialEdits:i,useSubRegistry:!1,children:[(0,xc.jsx)(uAe,{...u,children:l}),n,(0,xc.jsx)(SOe,{onActionPerformed:s,extraPanels:c}),(0,xc.jsx)(p5e,{}),g&&(0,xc.jsx)(N3,{}),v&&(0,xc.jsx)(_5e,{})]})]})}var E5e=Vut;var Ge=a(j(),1),F5e=a(Te(),1),d0=a(Y(),1),D5e=a(U(),1),gk=a(Dt(),1);var C4=a(Y(),1),P5e=a(Dt(),1);var k5e=a(E(),1),{PreferenceBaseOption:jut}=K(P5e.privateApis);function R5e(e){let t=(0,C4.useSelect)(n=>n(I).isPublishSidebarEnabled(),[]),{enablePublishSidebar:r,disablePublishSidebar:o}=(0,C4.useDispatch)(I);return(0,k5e.jsx)(jut,{isChecked:t,onChange:n=>n?r():o(),...e})}var T4=a(Y(),1),A5e=a(Dt(),1),E4=a(Pt(),1),I5e=a(U(),1),O5e=a(G(),1),r1=a(j(),1),N5e=a(be(),1);var t1=a(E(),1),{BlockManager:zut}=K(N5e.privateApis),Hut=[];function M5e(){let{showBlockTypes:e,hideBlockTypes:t}=K((0,T4.useDispatch)(I)),{blockTypes:r,allowedBlockTypes:o,hiddenBlockTypes:n}=(0,T4.useSelect)(m=>({blockTypes:m(E4.store).getBlockTypes(),allowedBlockTypes:m(I).getEditorSettings().allowedBlockTypes,hiddenBlockTypes:m(A5e.store).get("core","hiddenBlockTypes")??Hut}),[]),s=(0,I5e.useMemo)(()=>o===!0?r:r.filter(({name:m})=>o?.includes(m)),[o,r]).filter(m=>(0,E4.hasBlockSupport)(m,"inserter",!0)&&(!m.parent||m.parent.includes("core/post-content"))),l=n.filter(m=>s.some(h=>h.name===m)),c=s.filter(m=>!l.includes(m.name)),u=s.length-c.length;function d(){f(s)}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,t1.jsxs)("div",{className:"editor-block-visibility",children:[!!u&&(0,t1.jsxs)("div",{className:"editor-block-visibility__disabled-blocks-count",children:[(0,r1.sprintf)((0,r1._n)("%d block is hidden.","%d blocks are hidden.",u),u),(0,t1.jsx)(O5e.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:d,children:(0,r1.__)("Reset")})]}),(0,t1.jsx)(zut,{blockTypes:s,selectedBlockTypes:c,onChange:f,showSelectAll:!1})]})}var nt=a(E(),1),{PreferencesModal:Uut,PreferencesModalTabs:Wut,PreferencesModalSection:mf,PreferenceToggleControl:ds}=K(gk.privateApis);function L5e({extraSections:e={}}){let t=(0,d0.useSelect)(o=>o(He).isModalActive("editor/preferences"),[]),{closeModal:r}=(0,d0.useDispatch)(He);return t?(0,nt.jsx)(Uut,{closeModal:r,children:(0,nt.jsx)(Gut,{extraSections:e})}):null}function Gut({extraSections:e={}}){let t=(0,F5e.useViewportMatch)("medium"),{showBlockBreadcrumbsOption:r,showCollaborationOptions:o}=(0,d0.useSelect)(c=>{let{getEditorSettings:u,isCollaborationEnabledForCurrentPost:d}=K(c(I)),{get:f}=c(gk.store),m=u().richEditingEnabled;return{showBlockBreadcrumbsOption:!f("core","distractionFree")&&t&&m,showCollaborationOptions:d()}},[t]),{setIsListViewOpened:n,setIsInserterOpened:i}=(0,d0.useDispatch)(I),{set:s}=(0,d0.useDispatch)(gk.store),l=(0,D5e.useMemo)(()=>[{name:"general",tabLabel:(0,Ge.__)("General"),content:(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsxs)(mf,{title:(0,Ge.__)("Interface"),children:[(0,nt.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,nt.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,nt.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,nt.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,nt.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")})]}),o&&(0,nt.jsxs)(mf,{title:(0,Ge.__)("Collaboration notifications"),children:[(0,nt.jsx)(ds,{scope:"core",featureName:"showCollaborationJoinNotifications",help:(0,Ge.__)("Show notifications when collaborators join the post."),label:(0,Ge.__)("Collaborator joined")}),(0,nt.jsx)(ds,{scope:"core",featureName:"showCollaborationLeaveNotifications",help:(0,Ge.__)("Show notifications when collaborators leave the post."),label:(0,Ge.__)("Collaborator left")}),(0,nt.jsx)(ds,{scope:"core",featureName:"showCollaborationPostSaveNotifications",help:(0,Ge.__)("Show notifications when collaborators save, update, or publish the post."),label:(0,Ge.__)("Post updated")})]}),(0,nt.jsxs)(mf,{title:(0,Ge.__)("Document settings"),description:(0,Ge.__)("Select what settings are shown in the document panel."),children:[(0,nt.jsx)(h6.Slot,{}),(0,nt.jsx)($S,{taxonomyWrapper:(c,u)=>(0,nt.jsx)(kg,{label:u.labels.menu_name,panelName:`taxonomy-panel-${u.slug}`})}),(0,nt.jsx)(Gp,{children:(0,nt.jsx)(kg,{label:(0,Ge.__)("Featured image"),panelName:"featured-image"})}),(0,nt.jsx)(By,{children:(0,nt.jsx)(kg,{label:(0,Ge.__)("Excerpt"),panelName:"post-excerpt"})}),(0,nt.jsx)(uo,{supportKeys:["comments","trackbacks"],children:(0,nt.jsx)(kg,{label:(0,Ge.__)("Discussion"),panelName:"discussion-panel"})}),(0,nt.jsx)(wS,{children:(0,nt.jsx)(kg,{label:(0,Ge.__)("Page attributes"),panelName:"page-attributes"})})]}),t&&(0,nt.jsx)(mf,{title:(0,Ge.__)("Publishing"),children:(0,nt.jsx)(R5e,{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,nt.jsxs)(mf,{title:(0,Ge.__)("Appearance"),description:(0,Ge.__)("Customize the editor interface to suit your needs."),children:[(0,nt.jsx)(ds,{scope:"core",featureName:"fixedToolbar",onToggle:()=>s("core","distractionFree",!1),help:(0,Ge.__)("Access all block and document tools in a single place."),label:(0,Ge.__)("Top toolbar")}),(0,nt.jsx)(ds,{scope:"core",featureName:"distractionFree",onToggle:()=>{s("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,nt.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,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsx)(mf,{title:(0,Ge.__)("Navigation"),description:(0,Ge.__)("Optimize the editing experience for enhanced control."),children:(0,nt.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,nt.jsx)(mf,{title:(0,Ge.__)("Interface"),children:(0,nt.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,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsx)(mf,{title:(0,Ge.__)("Inserter"),children:(0,nt.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,nt.jsx)(mf,{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,nt.jsx)(M5e,{})})]})},window.__clientSideMediaProcessing&&{name:"media",tabLabel:(0,Ge.__)("Media"),content:(0,nt.jsx)(nt.Fragment,{children:(0,nt.jsxs)(mf,{title:(0,Ge.__)("General"),description:(0,Ge.__)("Customize options related to the media upload flow."),children:[(0,nt.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,nt.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,s,t]);return(0,nt.jsx)(Wut,{sections:l})}var wk=a(Pt(),1);var vk=a(be(),1),B5e="content",V5e={name:"core/pattern-overrides",getValues({select:e,clientId:t,context:r,bindings:o}){let n=r["pattern/overrides"],{getBlockAttributes:i}=e(vk.store),s=i(t),l={};for(let c of Object.keys(o)){let u=n?.[s?.metadata?.name]?.[c];if(u===void 0){l[c]=s?.[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:s}=e(vk.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(vk.store).updateBlockAttributes(g.clientId,d),m(g.innerBlocks)};m(s());return}let f=n(u)?.[B5e];t(vk.store).updateBlockAttributes(u,{[B5e]:{...f,[c]:{...f?.[c],...Object.entries(d).reduce((m,[h,g])=>(m[h]=g===void 0?"":g,m),{})}}})},canUserEditValue:()=>!0};var P4=a(j(),1),k4=a(ae(),1),bk=a(be(),1),UK=["core/navigation-link","core/navigation-submenu"],j5e=[{label:(0,P4.__)("Post Date"),args:{field:"date"},type:"string"},{label:(0,P4.__)("Post Modified Date"),args:{field:"modified"},type:"string"},{label:(0,P4.__)("Post Link"),args:{field:"link"},type:"string"}],z5e={name:"core/post-data",getValues({select:e,context:t,bindings:r,clientId:o}){let{getBlockAttributes:n,getBlockName:i}=e(bk.store),s=i(o),l=UK.includes(s),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(k4.store),f=d("postType",u,c),m={};for(let[h,g]of Object.entries(r)){let v=j5e.find(b=>b.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(bk.store),s=i(o);if(UK.includes(s))return!1;let l={};Object.values(r).forEach(({args:c,newValue:u})=>{l[c.field]=u}),e(k4.store).editEntityRecord("postType",t?.postType,t?.postId,l)},canUserEditValue({select:e,context:t}){let{getBlockName:r,getSelectedBlockClientId:o}=e(bk.store),n=o(),i=r(n);return!(UK.includes(i)||t?.query||t?.queryId||!t?.postType||!e(k4.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId}))},getFieldsList({context:e,select:t}){return t(bk.store).getSelectedBlock()?.name!=="core/post-date"?[]:!e||!e.postId||!e.postType?[]:j5e}};var yk=a(ae(),1);function WK(e,t){let{getRegisteredPostMeta:r}=K(e(yk.store)),o=r(t?.postType),n=[];return Object.entries(o).forEach(([i,s])=>{i==="footnotes"||i.charAt(0)==="_"||n.push({label:s.title||i,args:{key:i},default:s.default,type:s.type})}),n}function Yut({select:e,context:t,args:r}){let n=WK(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(yk.store);return i("postType",t?.postType,t?.postId).meta?.[r.key]??n?.label??r.key}var H5e={name:"core/post-meta",getValues({select:e,context:t,bindings:r}){let o={};for(let[n,i]of Object.entries(r))o[n]=Yut({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(yk.store).editEntityRecord("postType",t?.postType,t?.postId,{meta:o})},canUserEditValue({select:e,context:t,args:r}){return!(t?.query||t?.queryId||!t?.postType||!WK(e,t).some(l=>l.args.key===r.key)||e(I).getEditorSettings().enableCustomFields||!e(yk.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId}))},getFieldsList({select:e,context:t}){return WK(e,t).map(({default:o,...n})=>({...n}))}};var lv=a(j(),1),U5e=a(ae(),1),R4=a(be(),1),GK=["core/navigation-link","core/navigation-submenu"],YK=[{label:(0,lv.__)("Term ID"),args:{field:"id"},type:"string"},{label:(0,lv.__)("Name"),args:{field:"name"},type:"string"},{label:(0,lv.__)("Slug"),args:{field:"slug"},type:"string"},{label:(0,lv.__)("Link"),args:{field:"link"},type:"string"},{label:(0,lv.__)("Description"),args:{field:"description"},type:"string"},{label:(0,lv.__)("Parent ID"),args:{field:"parent"},type:"string"},{label:(0,lv.__)("Count"),args:{field:"count"},type:"string"}],W5e={name:"core/term-data",usesContext:["taxonomy","termId","termData"],getValues({select:e,context:t,bindings:r,clientId:o}){let{getEntityRecord:n}=e(U5e.store),{getBlockAttributes:i,getBlockName:s}=e(R4.store),l=s(o),c=GK.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=YK.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(R4.store),n=o(),i=r(n);return GK.includes(i)||t?.termQuery||!t?.taxonomy||!t?.termId,!1},getFieldsList({context:e,select:t}){let{getBlockAttributes:r,getBlockName:o,getSelectedBlockClientId:n}=t(R4.store),i=n(),s=o(i);if(GK.includes(s)){let l=r(i);return!l||!l.id||!l.type?[]:YK}return e?e.taxonomy&&e.termId||e.termData?YK:[]:[]}};function G5e(){(0,wk.registerBlockBindingsSource)(V5e),(0,wk.registerBlockBindingsSource)(z5e),(0,wk.registerBlockBindingsSource)(H5e),(0,wk.registerBlockBindingsSource)(W5e)}var A4=a(Y(),1),gf=a(U(),1),hf=a(j(),1),KK=a(Ol(),1),q5e=a(l3(),1),K5e=a(It(),1),I4=a(G(),1);var _k=a(E(),1),qK="upload-progress",qut=3e3,Y5e=40;function Kut(e){if(e.length<=Y5e)return e;let t="\u2026",r=Y5e-t.length,o=Math.ceil(r/2),n=Math.floor(r/2);return e.slice(0,o)+t+e.slice(e.length-n)}var Zut=(0,_k.jsx)("span",{className:"editor-upload-progress-snackbar__spinner","aria-hidden":"true",children:(0,_k.jsx)(I4.Spinner,{})}),Xut=(0,_k.jsx)("span",{className:"editor-upload-progress-snackbar__check","aria-hidden":"true",children:(0,_k.jsx)(I4.Icon,{icon:Io})});function Z5e(){let e=(0,A4.useSelect)(h=>h(q5e.store).getItems(),[]),t=QX(),r=(0,gf.useMemo)(()=>e.filter(h=>!h.parentId),[e]),o=r.length,n=t?t.total-t.completed:0,i=o+n,s=o+(t?t.total:0),l=(0,gf.useRef)(0),{createNotice:c,removeNotice:u}=(0,A4.useDispatch)(K5e.store),d=(0,gf.useRef)(!1),f=(0,gf.useRef)(!1),m=(0,gf.useRef)(null);return(0,gf.useEffect)(()=>()=>{m.current&&clearTimeout(m.current)},[]),(0,gf.useEffect)(()=>{let h=i>0;if(h&&!f.current?(d.current=!1,(0,KK.speak)((0,hf.__)("Media upload started"),"polite"),m.current&&(clearTimeout(m.current),m.current=null,l.current=0)):!h&&f.current&&((0,KK.speak)((0,hf.__)("Media upload complete"),"polite"),d.current?l.current=0:(c("info",(0,hf.__)("Upload complete"),{id:qK,type:"snackbar",isDismissible:!1,explicitDismiss:!1,speak:!1,icon:Xut,onDismiss:()=>{d.current=!0}}),m.current=setTimeout(()=>{u(qK),m.current=null,l.current=0},qut))),f.current=h,!h||d.current)return;s>l.current&&(l.current=s);let g=l.current,v=g-i+1,b=Kut(r[0]?.sourceFile?.name||t?.pending[0]||(0,hf.__)("Uploading")),_=g===1?(0,hf.sprintf)((0,hf.__)("Uploading \u2014 %s"),b):(0,hf.sprintf)((0,hf.__)("Uploading %1$d of %2$d \u2014 %3$s"),v,g,b);c("info",_,{id:qK,type:"snackbar",isDismissible:!1,explicitDismiss:!0,speak:!1,icon:Zut,onDismiss:()=>{d.current=!0}})},[i,s,r,t,c,u]),null}var{store:Qut,...Jut}=wW,X5e={};TZ(X5e,{CreateTemplatePartModal:Rw,patternTitleField:AC,templateTitleField:K1,BackButton:CD,EntitiesSavedStatesExtensible:tP,Editor:E5e,PluginPostExcerpt:lP,PostCardPanel:tv,PreferencesModal:L5e,usePostActions:IL,usePostFields:aS,ToolsMoreMenuGroup:ID,ViewMoreMenuGroup:OD,ResizableEditor:hS,UploadProgressSnackbar:Z5e,registerCoreBlockBindingsSources:G5e,getTemplateInfo:Al,GlobalStylesUIWrapper:KM,GlobalStylesActionMenu:w4,StyleBookPreview:tSe,useGlobalStyles:Hr,useStyle:cg,interfaceStore:Qut,...Jut});var Sk=a(Y(),1);function $ut(e,t,r){let{registerEntityAction:o}=K((0,Sk.dispatch)(I))}function edt(e,t,r){let{unregisterEntityAction:o}=K((0,Sk.dispatch)(I))}function tdt(e,t,r){let{registerEntityField:o}=K((0,Sk.dispatch)(I))}function rdt(e,t,r){let{unregisterEntityField:o}=K((0,Sk.dispatch)(I))}var Q5e=a(be(),1);return iNe(odt);})();
/*! Bundled license information:

use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
  (**
   * @license React
   * use-sync-external-store-shim.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
  (**
   * @license React
   * use-sync-external-store-shim/with-selector.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

autosize/dist/autosize.js:
  (*!
  	autosize 4.0.2
  	license: MIT
  	http://www.jacklmoore.com/autosize
  *)

is-plain-object/dist/is-plain-object.mjs:
  (*!
   * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)
*/